2153 lines
76 KiB
JavaScript
2153 lines
76 KiB
JavaScript
import {
|
|
javascript,
|
|
javascriptLanguage,
|
|
jsxLanguage,
|
|
tsxLanguage,
|
|
typescriptLanguage
|
|
} from "./chunk-Q3KCCTLX.js";
|
|
import {
|
|
ContextTracker,
|
|
ExternalTokenizer,
|
|
LRParser,
|
|
LocalTokenGroup
|
|
} from "./chunk-JSDLYWAN.js";
|
|
import "./chunk-FTVURZJQ.js";
|
|
import {
|
|
IterMode,
|
|
LRLanguage,
|
|
LanguageSupport,
|
|
NodeWeakMap,
|
|
bracketMatchingHandle,
|
|
continuedIndent,
|
|
foldInside,
|
|
foldNodeProp,
|
|
indentNodeProp,
|
|
parseMixed,
|
|
styleTags,
|
|
syntaxTree,
|
|
tags
|
|
} from "./chunk-UIRP74HC.js";
|
|
import {
|
|
EditorView
|
|
} from "./chunk-M6T3QFJD.js";
|
|
import {
|
|
EditorSelection
|
|
} from "./chunk-4MUKC4ON.js";
|
|
|
|
// node_modules/@lezer/html/dist/index.js
|
|
var scriptText = 55;
|
|
var StartCloseScriptTag = 1;
|
|
var styleText = 56;
|
|
var StartCloseStyleTag = 2;
|
|
var textareaText = 57;
|
|
var StartCloseTextareaTag = 3;
|
|
var EndTag = 4;
|
|
var SelfClosingEndTag = 5;
|
|
var StartTag = 6;
|
|
var StartScriptTag = 7;
|
|
var StartStyleTag = 8;
|
|
var StartTextareaTag = 9;
|
|
var StartSelfClosingTag = 10;
|
|
var StartCloseTag = 11;
|
|
var NoMatchStartCloseTag = 12;
|
|
var MismatchedStartCloseTag = 13;
|
|
var missingCloseTag = 58;
|
|
var IncompleteTag = 14;
|
|
var IncompleteCloseTag = 15;
|
|
var commentContent$1 = 59;
|
|
var Element = 21;
|
|
var TagName = 23;
|
|
var Attribute = 24;
|
|
var AttributeName = 25;
|
|
var AttributeValue = 27;
|
|
var UnquotedAttributeValue = 28;
|
|
var ScriptText = 29;
|
|
var StyleText = 32;
|
|
var TextareaText = 35;
|
|
var OpenTag = 37;
|
|
var CloseTag = 38;
|
|
var Dialect_noMatch = 0;
|
|
var Dialect_selfClosing = 1;
|
|
var selfClosers = {
|
|
area: true,
|
|
base: true,
|
|
br: true,
|
|
col: true,
|
|
command: true,
|
|
embed: true,
|
|
frame: true,
|
|
hr: true,
|
|
img: true,
|
|
input: true,
|
|
keygen: true,
|
|
link: true,
|
|
meta: true,
|
|
param: true,
|
|
source: true,
|
|
track: true,
|
|
wbr: true,
|
|
menuitem: true
|
|
};
|
|
var implicitlyClosed = {
|
|
dd: true,
|
|
li: true,
|
|
optgroup: true,
|
|
option: true,
|
|
p: true,
|
|
rp: true,
|
|
rt: true,
|
|
tbody: true,
|
|
td: true,
|
|
tfoot: true,
|
|
th: true,
|
|
tr: true
|
|
};
|
|
var closeOnOpen = {
|
|
dd: { dd: true, dt: true },
|
|
dt: { dd: true, dt: true },
|
|
li: { li: true },
|
|
option: { option: true, optgroup: true },
|
|
optgroup: { optgroup: true },
|
|
p: {
|
|
address: true,
|
|
article: true,
|
|
aside: true,
|
|
blockquote: true,
|
|
dir: true,
|
|
div: true,
|
|
dl: true,
|
|
fieldset: true,
|
|
footer: true,
|
|
form: true,
|
|
h1: true,
|
|
h2: true,
|
|
h3: true,
|
|
h4: true,
|
|
h5: true,
|
|
h6: true,
|
|
header: true,
|
|
hgroup: true,
|
|
hr: true,
|
|
menu: true,
|
|
nav: true,
|
|
ol: true,
|
|
p: true,
|
|
pre: true,
|
|
section: true,
|
|
table: true,
|
|
ul: true
|
|
},
|
|
rp: { rp: true, rt: true },
|
|
rt: { rp: true, rt: true },
|
|
tbody: { tbody: true, tfoot: true },
|
|
td: { td: true, th: true },
|
|
tfoot: { tbody: true },
|
|
th: { td: true, th: true },
|
|
thead: { tbody: true, tfoot: true },
|
|
tr: { tr: true }
|
|
};
|
|
function nameChar(ch) {
|
|
return ch == 45 || ch == 46 || ch == 58 || ch >= 65 && ch <= 90 || ch == 95 || ch >= 97 && ch <= 122 || ch >= 161;
|
|
}
|
|
var cachedName = null;
|
|
var cachedInput = null;
|
|
var cachedPos = 0;
|
|
function tagNameAfter(input, offset) {
|
|
let pos = input.pos + offset;
|
|
if (cachedPos == pos && cachedInput == input) return cachedName;
|
|
let next = input.peek(offset), name = "";
|
|
for (; ; ) {
|
|
if (!nameChar(next)) break;
|
|
name += String.fromCharCode(next);
|
|
next = input.peek(++offset);
|
|
}
|
|
cachedInput = input;
|
|
cachedPos = pos;
|
|
return cachedName = name ? name.toLowerCase() : next == question || next == bang ? void 0 : null;
|
|
}
|
|
var lessThan = 60;
|
|
var greaterThan = 62;
|
|
var slash = 47;
|
|
var question = 63;
|
|
var bang = 33;
|
|
var dash = 45;
|
|
function ElementContext(name, parent) {
|
|
this.name = name;
|
|
this.parent = parent;
|
|
}
|
|
var startTagTerms = [StartTag, StartSelfClosingTag, StartScriptTag, StartStyleTag, StartTextareaTag];
|
|
var elementContext = new ContextTracker({
|
|
start: null,
|
|
shift(context, term, stack, input) {
|
|
return startTagTerms.indexOf(term) > -1 ? new ElementContext(tagNameAfter(input, 1) || "", context) : context;
|
|
},
|
|
reduce(context, term) {
|
|
return term == Element && context ? context.parent : context;
|
|
},
|
|
reuse(context, node, stack, input) {
|
|
let type = node.type.id;
|
|
return type == StartTag || type == OpenTag ? new ElementContext(tagNameAfter(input, 1) || "", context) : context;
|
|
},
|
|
strict: false
|
|
});
|
|
var tagStart = new ExternalTokenizer((input, stack) => {
|
|
if (input.next != lessThan) {
|
|
if (input.next < 0 && stack.context) input.acceptToken(missingCloseTag);
|
|
return;
|
|
}
|
|
input.advance();
|
|
let close = input.next == slash;
|
|
if (close) input.advance();
|
|
let name = tagNameAfter(input, 0);
|
|
if (name === void 0) return;
|
|
if (!name) return input.acceptToken(close ? IncompleteCloseTag : IncompleteTag);
|
|
let parent = stack.context ? stack.context.name : null;
|
|
if (close) {
|
|
if (name == parent) return input.acceptToken(StartCloseTag);
|
|
if (parent && implicitlyClosed[parent]) return input.acceptToken(missingCloseTag, -2);
|
|
if (stack.dialectEnabled(Dialect_noMatch)) return input.acceptToken(NoMatchStartCloseTag);
|
|
for (let cx = stack.context; cx; cx = cx.parent) if (cx.name == name) return;
|
|
input.acceptToken(MismatchedStartCloseTag);
|
|
} else {
|
|
if (name == "script") return input.acceptToken(StartScriptTag);
|
|
if (name == "style") return input.acceptToken(StartStyleTag);
|
|
if (name == "textarea") return input.acceptToken(StartTextareaTag);
|
|
if (selfClosers.hasOwnProperty(name)) return input.acceptToken(StartSelfClosingTag);
|
|
if (parent && closeOnOpen[parent] && closeOnOpen[parent][name]) input.acceptToken(missingCloseTag, -1);
|
|
else input.acceptToken(StartTag);
|
|
}
|
|
}, { contextual: true });
|
|
var commentContent = new ExternalTokenizer((input) => {
|
|
for (let dashes = 0, i = 0; ; i++) {
|
|
if (input.next < 0) {
|
|
if (i) input.acceptToken(commentContent$1);
|
|
break;
|
|
}
|
|
if (input.next == dash) {
|
|
dashes++;
|
|
} else if (input.next == greaterThan && dashes >= 2) {
|
|
if (i >= 3) input.acceptToken(commentContent$1, -2);
|
|
break;
|
|
} else {
|
|
dashes = 0;
|
|
}
|
|
input.advance();
|
|
}
|
|
});
|
|
function inForeignElement(context) {
|
|
for (; context; context = context.parent)
|
|
if (context.name == "svg" || context.name == "math") return true;
|
|
return false;
|
|
}
|
|
var endTag = new ExternalTokenizer((input, stack) => {
|
|
if (input.next == slash && input.peek(1) == greaterThan) {
|
|
let selfClosing = stack.dialectEnabled(Dialect_selfClosing) || inForeignElement(stack.context);
|
|
input.acceptToken(selfClosing ? SelfClosingEndTag : EndTag, 2);
|
|
} else if (input.next == greaterThan) {
|
|
input.acceptToken(EndTag, 1);
|
|
}
|
|
});
|
|
function contentTokenizer(tag, textToken, endToken) {
|
|
let lastState = 2 + tag.length;
|
|
return new ExternalTokenizer((input) => {
|
|
for (let state = 0, matchedLen = 0, i = 0; ; i++) {
|
|
if (input.next < 0) {
|
|
if (i) input.acceptToken(textToken);
|
|
break;
|
|
}
|
|
if (state == 0 && input.next == lessThan || state == 1 && input.next == slash || state >= 2 && state < lastState && input.next == tag.charCodeAt(state - 2)) {
|
|
state++;
|
|
matchedLen++;
|
|
} else if (state == lastState && input.next == greaterThan) {
|
|
if (i > matchedLen)
|
|
input.acceptToken(textToken, -matchedLen);
|
|
else
|
|
input.acceptToken(endToken, -(matchedLen - 2));
|
|
break;
|
|
} else if ((input.next == 10 || input.next == 13) && i) {
|
|
input.acceptToken(textToken, 1);
|
|
break;
|
|
} else {
|
|
state = matchedLen = 0;
|
|
}
|
|
input.advance();
|
|
}
|
|
});
|
|
}
|
|
var scriptTokens = contentTokenizer("script", scriptText, StartCloseScriptTag);
|
|
var styleTokens = contentTokenizer("style", styleText, StartCloseStyleTag);
|
|
var textareaTokens = contentTokenizer("textarea", textareaText, StartCloseTextareaTag);
|
|
var htmlHighlighting = styleTags({
|
|
"Text RawText IncompleteTag IncompleteCloseTag": tags.content,
|
|
"StartTag StartCloseTag SelfClosingEndTag EndTag": tags.angleBracket,
|
|
TagName: tags.tagName,
|
|
"MismatchedCloseTag/TagName": [tags.tagName, tags.invalid],
|
|
AttributeName: tags.attributeName,
|
|
"AttributeValue UnquotedAttributeValue": tags.attributeValue,
|
|
Is: tags.definitionOperator,
|
|
"EntityReference CharacterReference": tags.character,
|
|
Comment: tags.blockComment,
|
|
ProcessingInst: tags.processingInstruction,
|
|
DoctypeDecl: tags.documentMeta
|
|
});
|
|
var parser = LRParser.deserialize({
|
|
version: 14,
|
|
states: ",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jO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T}OiyO~OS}OT}OiyO~O!XfOPmX![mX~OP!WO![!XO~O!YiOQpX![pX~OQ!ZO![!XO~O!ZlORsX![sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",
|
|
goto: "%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",
|
|
nodeNames: "⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",
|
|
maxTerm: 68,
|
|
context: elementContext,
|
|
nodeProps: [
|
|
["closedBy", -10, 1, 2, 3, 7, 8, 9, 10, 11, 12, 13, "EndTag", 6, "EndTag SelfClosingEndTag", -4, 22, 31, 34, 37, "CloseTag"],
|
|
["openedBy", 4, "StartTag StartCloseTag", 5, "StartTag", -4, 30, 33, 36, 38, "OpenTag"],
|
|
["group", -10, 14, 15, 18, 19, 20, 21, 40, 41, 42, 43, "Entity", 17, "Entity TextContent", -3, 29, 32, 35, "TextContent Entity"],
|
|
["isolate", -11, 22, 30, 31, 33, 34, 36, 37, 38, 39, 42, 43, "ltr", -3, 27, 28, 40, ""]
|
|
],
|
|
propSources: [htmlHighlighting],
|
|
skippedNodes: [0],
|
|
repeatNodeCount: 9,
|
|
tokenData: "!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|caPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bXaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UVaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pTaPOv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!dpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({WaP!b`Or(trs'ksv(tw!^(t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dpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",
|
|
tokenizers: [scriptTokens, styleTokens, textareaTokens, endTag, tagStart, commentContent, 0, 1, 2, 3, 4, 5],
|
|
topRules: { "Document": [0, 16] },
|
|
dialects: { noMatch: 0, selfClosing: 515 },
|
|
tokenPrec: 517
|
|
});
|
|
function getAttrs(openTag, input) {
|
|
let attrs = /* @__PURE__ */ Object.create(null);
|
|
for (let att of openTag.getChildren(Attribute)) {
|
|
let name = att.getChild(AttributeName), value = att.getChild(AttributeValue) || att.getChild(UnquotedAttributeValue);
|
|
if (name) attrs[input.read(name.from, name.to)] = !value ? "" : value.type.id == AttributeValue ? input.read(value.from + 1, value.to - 1) : input.read(value.from, value.to);
|
|
}
|
|
return attrs;
|
|
}
|
|
function findTagName(openTag, input) {
|
|
let tagNameNode = openTag.getChild(TagName);
|
|
return tagNameNode ? input.read(tagNameNode.from, tagNameNode.to) : " ";
|
|
}
|
|
function maybeNest(node, input, tags3) {
|
|
let attrs;
|
|
for (let tag of tags3) {
|
|
if (!tag.attrs || tag.attrs(attrs || (attrs = getAttrs(node.node.parent.firstChild, input))))
|
|
return { parser: tag.parser, bracketed: true };
|
|
}
|
|
return null;
|
|
}
|
|
function configureNesting(tags3 = [], attributes = []) {
|
|
let script = [], style = [], textarea = [], other = [];
|
|
for (let tag of tags3) {
|
|
let array = tag.tag == "script" ? script : tag.tag == "style" ? style : tag.tag == "textarea" ? textarea : other;
|
|
array.push(tag);
|
|
}
|
|
let attrs = attributes.length ? /* @__PURE__ */ Object.create(null) : null;
|
|
for (let attr of attributes) (attrs[attr.name] || (attrs[attr.name] = [])).push(attr);
|
|
return parseMixed((node, input) => {
|
|
let id = node.type.id;
|
|
if (id == ScriptText) return maybeNest(node, input, script);
|
|
if (id == StyleText) return maybeNest(node, input, style);
|
|
if (id == TextareaText) return maybeNest(node, input, textarea);
|
|
if (id == Element && other.length) {
|
|
let n = node.node, open = n.firstChild, tagName = open && findTagName(open, input), attrs2;
|
|
if (tagName) for (let tag of other) {
|
|
if (tag.tag == tagName && (!tag.attrs || tag.attrs(attrs2 || (attrs2 = getAttrs(open, input))))) {
|
|
let close = n.lastChild;
|
|
let to = close.type.id == CloseTag ? close.from : n.to;
|
|
if (to > open.to)
|
|
return { parser: tag.parser, overlay: [{ from: open.to, to }] };
|
|
}
|
|
}
|
|
}
|
|
if (attrs && id == Attribute) {
|
|
let n = node.node, nameNode;
|
|
if (nameNode = n.firstChild) {
|
|
let matches = attrs[input.read(nameNode.from, nameNode.to)];
|
|
if (matches) for (let attr of matches) {
|
|
if (attr.tagName && attr.tagName != findTagName(n.parent, input)) continue;
|
|
let value = n.lastChild;
|
|
if (value.type.id == AttributeValue) {
|
|
let from = value.from + 1;
|
|
let last = value.lastChild, to = value.to - (last && last.isError ? 0 : 1);
|
|
if (to > from) return { parser: attr.parser, overlay: [{ from, to }], bracketed: true };
|
|
} else if (value.type.id == UnquotedAttributeValue) {
|
|
return { parser: attr.parser, overlay: [{ from: value.from, to: value.to }] };
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return null;
|
|
});
|
|
}
|
|
|
|
// node_modules/@lezer/css/dist/index.js
|
|
var descendantOp = 135;
|
|
var Unit = 1;
|
|
var identifier = 136;
|
|
var callee = 137;
|
|
var VariableName = 2;
|
|
var queryIdentifier = 138;
|
|
var queryVariableName = 3;
|
|
var QueryCallee = 4;
|
|
var space = [
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
32,
|
|
133,
|
|
160,
|
|
5760,
|
|
8192,
|
|
8193,
|
|
8194,
|
|
8195,
|
|
8196,
|
|
8197,
|
|
8198,
|
|
8199,
|
|
8200,
|
|
8201,
|
|
8202,
|
|
8232,
|
|
8233,
|
|
8239,
|
|
8287,
|
|
12288
|
|
];
|
|
var colon = 58;
|
|
var parenL = 40;
|
|
var underscore = 95;
|
|
var bracketL = 91;
|
|
var dash2 = 45;
|
|
var period = 46;
|
|
var hash = 35;
|
|
var percent = 37;
|
|
var ampersand = 38;
|
|
var backslash = 92;
|
|
var newline = 10;
|
|
var asterisk = 42;
|
|
function isAlpha(ch) {
|
|
return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122 || ch >= 161;
|
|
}
|
|
function isDigit(ch) {
|
|
return ch >= 48 && ch <= 57;
|
|
}
|
|
function isHex(ch) {
|
|
return isDigit(ch) || ch >= 97 && ch <= 102 || ch >= 65 && ch <= 70;
|
|
}
|
|
var identifierTokens = (id, varName, callee2) => (input, stack) => {
|
|
for (let inside = false, dashes = 0, i = 0; ; i++) {
|
|
let { next } = input;
|
|
if (isAlpha(next) || next == dash2 || next == underscore || inside && isDigit(next)) {
|
|
if (!inside && (next != dash2 || i > 0)) inside = true;
|
|
if (dashes === i && next == dash2) dashes++;
|
|
input.advance();
|
|
} else if (next == backslash && input.peek(1) != newline) {
|
|
input.advance();
|
|
if (isHex(input.next)) {
|
|
do {
|
|
input.advance();
|
|
} while (isHex(input.next));
|
|
if (input.next == 32) input.advance();
|
|
} else if (input.next > -1) {
|
|
input.advance();
|
|
}
|
|
inside = true;
|
|
} else {
|
|
if (inside) input.acceptToken(
|
|
dashes == 2 && stack.canShift(VariableName) ? varName : next == parenL ? callee2 : id
|
|
);
|
|
break;
|
|
}
|
|
}
|
|
};
|
|
var identifiers = new ExternalTokenizer(
|
|
identifierTokens(identifier, VariableName, callee),
|
|
{ contextual: true }
|
|
);
|
|
var queryIdentifiers = new ExternalTokenizer(
|
|
identifierTokens(queryIdentifier, queryVariableName, QueryCallee),
|
|
{ contextual: true }
|
|
);
|
|
var descendant = new ExternalTokenizer((input) => {
|
|
if (space.includes(input.peek(-1))) {
|
|
let { next } = input;
|
|
if (isAlpha(next) || next == underscore || next == hash || next == period || next == asterisk || next == bracketL || next == colon && isAlpha(input.peek(1)) || next == dash2 || next == ampersand)
|
|
input.acceptToken(descendantOp);
|
|
}
|
|
});
|
|
var unitToken = new ExternalTokenizer((input) => {
|
|
if (!space.includes(input.peek(-1))) {
|
|
let { next } = input;
|
|
if (next == percent) {
|
|
input.advance();
|
|
input.acceptToken(Unit);
|
|
}
|
|
if (isAlpha(next)) {
|
|
do {
|
|
input.advance();
|
|
} while (isAlpha(input.next) || isDigit(input.next));
|
|
input.acceptToken(Unit);
|
|
}
|
|
}
|
|
});
|
|
var cssHighlighting = styleTags({
|
|
"AtKeyword import charset namespace keyframes media supports font-feature-values": tags.definitionKeyword,
|
|
"from to selector scope MatchFlag": tags.keyword,
|
|
NamespaceName: tags.namespace,
|
|
KeyframeName: tags.labelName,
|
|
KeyframeRangeName: tags.operatorKeyword,
|
|
TagName: tags.tagName,
|
|
ClassName: tags.className,
|
|
PseudoClassName: tags.constant(tags.className),
|
|
IdName: tags.labelName,
|
|
"FeatureName PropertyName": tags.propertyName,
|
|
AttributeName: tags.attributeName,
|
|
NumberLiteral: tags.number,
|
|
KeywordQuery: tags.keyword,
|
|
UnaryQueryOp: tags.operatorKeyword,
|
|
"CallTag ValueName FontName": tags.atom,
|
|
VariableName: tags.variableName,
|
|
Callee: tags.operatorKeyword,
|
|
Unit: tags.unit,
|
|
"UniversalSelector NestingSelector": tags.definitionOperator,
|
|
"MatchOp CompareOp": tags.compareOperator,
|
|
"ChildOp SiblingOp, LogicOp": tags.logicOperator,
|
|
BinOp: tags.arithmeticOperator,
|
|
Important: tags.modifier,
|
|
Comment: tags.blockComment,
|
|
ColorLiteral: tags.color,
|
|
"ParenthesizedContent StringLiteral": tags.string,
|
|
":": tags.punctuation,
|
|
"PseudoOp #": tags.derefOperator,
|
|
"; , |": tags.separator,
|
|
"( )": tags.paren,
|
|
"[ ]": tags.squareBracket,
|
|
"{ }": tags.brace
|
|
});
|
|
var spec_callee = { __proto__: null, lang: 44, "nth-child": 44, "nth-last-child": 44, "nth-of-type": 44, "nth-last-of-type": 44, dir: 44, "host-context": 44, if: 90, url: 132, "url-prefix": 132, domain: 132, regexp: 132 };
|
|
var spec_queryIdentifier = { __proto__: null, or: 104, and: 104, not: 112, only: 112, layer: 186 };
|
|
var spec_QueryCallee = { __proto__: null, selector: 118, layer: 182 };
|
|
var spec_AtKeyword = { __proto__: null, "@import": 178, "@media": 190, "@charset": 194, "@namespace": 198, "@keyframes": 204, "@supports": 216, "@scope": 220, "@font-feature-values": 226 };
|
|
var spec_identifier = { __proto__: null, to: 223 };
|
|
var parser2 = LRParser.deserialize({
|
|
version: 14,
|
|
states: "IpQYQdOOO#}QdOOP$UO`OOO%OQaO'#CfOOQP'#Ce'#CeO%VQdO'#CgO%[Q`O'#CgO%aQaO'#FdO&XQdO'#CkO&xQaO'#CcO'SQdO'#CnO'_QdO'#DtO'dQdO'#DvO'oQdO'#D}O'oQdO'#EQOOQP'#Fd'#FdO)OQhO'#EsOOQS'#Fc'#FcOOQS'#Ev'#EvQYQdOOO)VQdO'#E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S#dQ!ZZR#fzQ!_[R#g{T!^[{Q#r!]R%]#sQ!SXQ!i`Q#SjQ#m!QQ$P!dQ$l!yQ$r#QQ$u#UQ$x#XQ%e$OQ&S$tQ&y&OQ&|&TR'h&xSnP!RQ#]oQ$|#ZR&Z$}ZmPo!R#Z$}Q${#YQ&X$yR'P&WR$e!qQ&n%oR'm'_R!}gR#PhR$q#PS&O$p&PR'f&wV%|$p&P&wR#XkQ#_qR%Q#_QcOSoP!RU!kco$}R$}#ZQ%Z#pY&`%Z&f'U'^'sQ&f%_Q'U&aQ'^&kR's'kQ$Y!mQ$[!nQ$^!oV%j$Y$[$^Q%t$gR&t%tQ&j%gS']&j'lR'l'^Q&b%ZR'V&bQ&^%WR'T&^Q!QXR#l!QQ&W$yR'O&WQ#[nS%O#[%PR%P#]Q'`&nR'n'`Q$k!xR%x$kQ&P$pR&z&PQ&x&OR'g&xQ#WkR$w#WQ$O!dR%d$O_bOPco!R#Z$}^XOPco!R#Z$}Q!`]Q!a^Q#h|Q#i}Q#j!OQ#k!PQ$s#RQ%W#oR'S&]R%[#pQ!qdQ!zf[$V!m!n!o$Y$[$^Q$y#Yd%Y#p%Z%_&a&f&k'U'^'k'sQ%^#uQ%n$aS&U$y&WQ&[%UQ&}&VR'b&p]$X!m!n!o$Y$[$^Q!d`U!xe!q$eQ#QiQ#x!cS#{!d$OQ$Q!eQ%b#|Q%c#}Q%g$RS%r$g%tQ%w$jR'Z&iQ#z!cQ&h%`R'j'YR%i$RR%X#oQpPR#n!RQ!yeQ$d!qR%q$e",
|
|
nodeNames: "⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NamespacedTagSelector NamespaceName TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , PseudoQuery CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName NamespacedAttribute NamespaceName AttributeName MatchOp MatchFlag ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to FontFeatureStatement font-feature-values FontName AtRule Styles",
|
|
maxTerm: 159,
|
|
nodeProps: [
|
|
["isolate", -2, 5, 39, ""],
|
|
["openedBy", 23, "(", 31, "[", 34, "{"],
|
|
["closedBy", 24, ")", 32, "]", 35, "}"]
|
|
],
|
|
propSources: [cssHighlighting],
|
|
skippedNodes: [0, 5, 117],
|
|
repeatNodeCount: 17,
|
|
tokenData: "K`~R!bOX%ZX^&R^p%Zpq&Rqr)ers)vst+jtu2Xuv%Zvw3Rwx3dxy5Ryz5dz{5i{|6S|}:u}!O;W!O!P;u!P!Q<^!Q![=V![!]>Q!]!^>|!^!_?_!_!`@Z!`!a@n!a!b%Z!b!cAo!c!k%Z!k!lC|!l!u%Z!u!vC|!v!}%Z!}#OD_#O#P%Z#P#QDp#Q#R2X#R#]%Z#]#^ER#^#g%Z#g#hC|#h#o%Z#o#pIf#p#qIw#q#rJ`#r#sJq#s#y%Z#y#z&R#z$f%Z$f$g&R$g#BY%Z#BY#BZ&R#BZ$IS%Z$IS$I_&R$I_$I|%Z$I|$JO&R$JO$JT%Z$JT$JU&R$JU$KV%Z$KV$KW&R$KW&FU%Z&FU&FV&R&FV;'S%Z;'S;=`KY<%lO%Z`%^SOy%jz;'S%j;'S;=`%{<%lO%j`%oS!e`Oy%jz;'S%j;'S;=`%{<%lO%j`&OP;=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=`%{<%lO%jbIYS$cQ!e`Oy%jz;'S%j;'S;=`%{<%lO%jjIkSsYOy%jz;'S%j;'S;=`%{<%lO%jfI|U$XUOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%jjJeSrYOy%jz;'S%j;'S;=`%{<%lO%jfJvU!uQOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%j`K]P;=`<%l%Z",
|
|
tokenizers: [descendant, unitToken, identifiers, queryIdentifiers, 1, 2, 3, 4, new LocalTokenGroup("m~RRYZ[z{a~~g~aO$T~~dP!P!Qg~lO$U~~", 28, 142)],
|
|
topRules: { "StyleSheet": [0, 6], "Styles": [1, 116] },
|
|
dynamicPrecedences: { "84": 1 },
|
|
specialized: [{ term: 137, get: (value) => spec_callee[value] || -1 }, { term: 138, get: (value) => spec_queryIdentifier[value] || -1 }, { term: 4, get: (value) => spec_QueryCallee[value] || -1 }, { term: 28, get: (value) => spec_AtKeyword[value] || -1 }, { term: 136, get: (value) => spec_identifier[value] || -1 }],
|
|
tokenPrec: 2256
|
|
});
|
|
|
|
// node_modules/@codemirror/lang-css/dist/index.js
|
|
var _properties = null;
|
|
function properties() {
|
|
if (!_properties && typeof document == "object" && document.body) {
|
|
let { style } = document.body, names = [], seen = /* @__PURE__ */ new Set();
|
|
for (let prop in style)
|
|
if (prop != "cssText" && prop != "cssFloat") {
|
|
if (typeof style[prop] == "string") {
|
|
if (/[A-Z]/.test(prop))
|
|
prop = prop.replace(/[A-Z]/g, (ch) => "-" + ch.toLowerCase());
|
|
if (!seen.has(prop)) {
|
|
names.push(prop);
|
|
seen.add(prop);
|
|
}
|
|
}
|
|
}
|
|
_properties = names.sort().map((name) => ({ type: "property", label: name, apply: name + ": " }));
|
|
}
|
|
return _properties || [];
|
|
}
|
|
var pseudoClasses = [
|
|
"active",
|
|
"after",
|
|
"any-link",
|
|
"autofill",
|
|
"backdrop",
|
|
"before",
|
|
"checked",
|
|
"cue",
|
|
"default",
|
|
"defined",
|
|
"disabled",
|
|
"empty",
|
|
"enabled",
|
|
"file-selector-button",
|
|
"first",
|
|
"first-child",
|
|
"first-letter",
|
|
"first-line",
|
|
"first-of-type",
|
|
"focus",
|
|
"focus-visible",
|
|
"focus-within",
|
|
"fullscreen",
|
|
"has",
|
|
"host",
|
|
"host-context",
|
|
"hover",
|
|
"in-range",
|
|
"indeterminate",
|
|
"invalid",
|
|
"is",
|
|
"lang",
|
|
"last-child",
|
|
"last-of-type",
|
|
"left",
|
|
"link",
|
|
"marker",
|
|
"modal",
|
|
"not",
|
|
"nth-child",
|
|
"nth-last-child",
|
|
"nth-last-of-type",
|
|
"nth-of-type",
|
|
"only-child",
|
|
"only-of-type",
|
|
"optional",
|
|
"out-of-range",
|
|
"part",
|
|
"placeholder",
|
|
"placeholder-shown",
|
|
"read-only",
|
|
"read-write",
|
|
"required",
|
|
"right",
|
|
"root",
|
|
"scope",
|
|
"selection",
|
|
"slotted",
|
|
"target",
|
|
"target-text",
|
|
"valid",
|
|
"visited",
|
|
"where"
|
|
].map((name) => ({ type: "class", label: name }));
|
|
var values = [
|
|
"above",
|
|
"absolute",
|
|
"activeborder",
|
|
"additive",
|
|
"activecaption",
|
|
"after-white-space",
|
|
"ahead",
|
|
"alias",
|
|
"all",
|
|
"all-scroll",
|
|
"alphabetic",
|
|
"alternate",
|
|
"always",
|
|
"antialiased",
|
|
"appworkspace",
|
|
"asterisks",
|
|
"attr",
|
|
"auto",
|
|
"auto-flow",
|
|
"avoid",
|
|
"avoid-column",
|
|
"avoid-page",
|
|
"avoid-region",
|
|
"axis-pan",
|
|
"background",
|
|
"backwards",
|
|
"baseline",
|
|
"below",
|
|
"bidi-override",
|
|
"blink",
|
|
"block",
|
|
"block-axis",
|
|
"bold",
|
|
"bolder",
|
|
"border",
|
|
"border-box",
|
|
"both",
|
|
"bottom",
|
|
"break",
|
|
"break-all",
|
|
"break-word",
|
|
"bullets",
|
|
"button",
|
|
"button-bevel",
|
|
"buttonface",
|
|
"buttonhighlight",
|
|
"buttonshadow",
|
|
"buttontext",
|
|
"calc",
|
|
"capitalize",
|
|
"caps-lock-indicator",
|
|
"caption",
|
|
"captiontext",
|
|
"caret",
|
|
"cell",
|
|
"center",
|
|
"checkbox",
|
|
"circle",
|
|
"cjk-decimal",
|
|
"clear",
|
|
"clip",
|
|
"close-quote",
|
|
"col-resize",
|
|
"collapse",
|
|
"color",
|
|
"color-burn",
|
|
"color-dodge",
|
|
"column",
|
|
"column-reverse",
|
|
"compact",
|
|
"condensed",
|
|
"contain",
|
|
"content",
|
|
"contents",
|
|
"content-box",
|
|
"context-menu",
|
|
"continuous",
|
|
"copy",
|
|
"counter",
|
|
"counters",
|
|
"cover",
|
|
"crop",
|
|
"cross",
|
|
"crosshair",
|
|
"currentcolor",
|
|
"cursive",
|
|
"cyclic",
|
|
"darken",
|
|
"dashed",
|
|
"decimal",
|
|
"decimal-leading-zero",
|
|
"default",
|
|
"default-button",
|
|
"dense",
|
|
"destination-atop",
|
|
"destination-in",
|
|
"destination-out",
|
|
"destination-over",
|
|
"difference",
|
|
"disc",
|
|
"discard",
|
|
"disclosure-closed",
|
|
"disclosure-open",
|
|
"document",
|
|
"dot-dash",
|
|
"dot-dot-dash",
|
|
"dotted",
|
|
"double",
|
|
"down",
|
|
"e-resize",
|
|
"ease",
|
|
"ease-in",
|
|
"ease-in-out",
|
|
"ease-out",
|
|
"element",
|
|
"ellipse",
|
|
"ellipsis",
|
|
"embed",
|
|
"end",
|
|
"ethiopic-abegede-gez",
|
|
"ethiopic-halehame-aa-er",
|
|
"ethiopic-halehame-gez",
|
|
"ew-resize",
|
|
"exclusion",
|
|
"expanded",
|
|
"extends",
|
|
"extra-condensed",
|
|
"extra-expanded",
|
|
"fantasy",
|
|
"fast",
|
|
"fill",
|
|
"fill-box",
|
|
"fixed",
|
|
"flat",
|
|
"flex",
|
|
"flex-end",
|
|
"flex-start",
|
|
"footnotes",
|
|
"forwards",
|
|
"from",
|
|
"geometricPrecision",
|
|
"graytext",
|
|
"grid",
|
|
"groove",
|
|
"hand",
|
|
"hard-light",
|
|
"help",
|
|
"hidden",
|
|
"hide",
|
|
"higher",
|
|
"highlight",
|
|
"highlighttext",
|
|
"horizontal",
|
|
"hsl",
|
|
"hsla",
|
|
"hue",
|
|
"icon",
|
|
"ignore",
|
|
"inactiveborder",
|
|
"inactivecaption",
|
|
"inactivecaptiontext",
|
|
"infinite",
|
|
"infobackground",
|
|
"infotext",
|
|
"inherit",
|
|
"initial",
|
|
"inline",
|
|
"inline-axis",
|
|
"inline-block",
|
|
"inline-flex",
|
|
"inline-grid",
|
|
"inline-table",
|
|
"inset",
|
|
"inside",
|
|
"intrinsic",
|
|
"invert",
|
|
"italic",
|
|
"justify",
|
|
"keep-all",
|
|
"landscape",
|
|
"large",
|
|
"larger",
|
|
"left",
|
|
"level",
|
|
"lighter",
|
|
"lighten",
|
|
"line-through",
|
|
"linear",
|
|
"linear-gradient",
|
|
"lines",
|
|
"list-item",
|
|
"listbox",
|
|
"listitem",
|
|
"local",
|
|
"logical",
|
|
"loud",
|
|
"lower",
|
|
"lower-hexadecimal",
|
|
"lower-latin",
|
|
"lower-norwegian",
|
|
"lowercase",
|
|
"ltr",
|
|
"luminosity",
|
|
"manipulation",
|
|
"match",
|
|
"matrix",
|
|
"matrix3d",
|
|
"medium",
|
|
"menu",
|
|
"menutext",
|
|
"message-box",
|
|
"middle",
|
|
"min-intrinsic",
|
|
"mix",
|
|
"monospace",
|
|
"move",
|
|
"multiple",
|
|
"multiple_mask_images",
|
|
"multiply",
|
|
"n-resize",
|
|
"narrower",
|
|
"ne-resize",
|
|
"nesw-resize",
|
|
"no-close-quote",
|
|
"no-drop",
|
|
"no-open-quote",
|
|
"no-repeat",
|
|
"none",
|
|
"normal",
|
|
"not-allowed",
|
|
"nowrap",
|
|
"ns-resize",
|
|
"numbers",
|
|
"numeric",
|
|
"nw-resize",
|
|
"nwse-resize",
|
|
"oblique",
|
|
"opacity",
|
|
"open-quote",
|
|
"optimizeLegibility",
|
|
"optimizeSpeed",
|
|
"outset",
|
|
"outside",
|
|
"outside-shape",
|
|
"overlay",
|
|
"overline",
|
|
"padding",
|
|
"padding-box",
|
|
"painted",
|
|
"page",
|
|
"paused",
|
|
"perspective",
|
|
"pinch-zoom",
|
|
"plus-darker",
|
|
"plus-lighter",
|
|
"pointer",
|
|
"polygon",
|
|
"portrait",
|
|
"pre",
|
|
"pre-line",
|
|
"pre-wrap",
|
|
"preserve-3d",
|
|
"progress",
|
|
"push-button",
|
|
"radial-gradient",
|
|
"radio",
|
|
"read-only",
|
|
"read-write",
|
|
"read-write-plaintext-only",
|
|
"rectangle",
|
|
"region",
|
|
"relative",
|
|
"repeat",
|
|
"repeating-linear-gradient",
|
|
"repeating-radial-gradient",
|
|
"repeat-x",
|
|
"repeat-y",
|
|
"reset",
|
|
"reverse",
|
|
"rgb",
|
|
"rgba",
|
|
"ridge",
|
|
"right",
|
|
"rotate",
|
|
"rotate3d",
|
|
"rotateX",
|
|
"rotateY",
|
|
"rotateZ",
|
|
"round",
|
|
"row",
|
|
"row-resize",
|
|
"row-reverse",
|
|
"rtl",
|
|
"run-in",
|
|
"running",
|
|
"s-resize",
|
|
"sans-serif",
|
|
"saturation",
|
|
"scale",
|
|
"scale3d",
|
|
"scaleX",
|
|
"scaleY",
|
|
"scaleZ",
|
|
"screen",
|
|
"scroll",
|
|
"scrollbar",
|
|
"scroll-position",
|
|
"se-resize",
|
|
"self-start",
|
|
"self-end",
|
|
"semi-condensed",
|
|
"semi-expanded",
|
|
"separate",
|
|
"serif",
|
|
"show",
|
|
"single",
|
|
"skew",
|
|
"skewX",
|
|
"skewY",
|
|
"skip-white-space",
|
|
"slide",
|
|
"slider-horizontal",
|
|
"slider-vertical",
|
|
"sliderthumb-horizontal",
|
|
"sliderthumb-vertical",
|
|
"slow",
|
|
"small",
|
|
"small-caps",
|
|
"small-caption",
|
|
"smaller",
|
|
"soft-light",
|
|
"solid",
|
|
"source-atop",
|
|
"source-in",
|
|
"source-out",
|
|
"source-over",
|
|
"space",
|
|
"space-around",
|
|
"space-between",
|
|
"space-evenly",
|
|
"spell-out",
|
|
"square",
|
|
"start",
|
|
"static",
|
|
"status-bar",
|
|
"stretch",
|
|
"stroke",
|
|
"stroke-box",
|
|
"sub",
|
|
"subpixel-antialiased",
|
|
"svg_masks",
|
|
"super",
|
|
"sw-resize",
|
|
"symbolic",
|
|
"symbols",
|
|
"system-ui",
|
|
"table",
|
|
"table-caption",
|
|
"table-cell",
|
|
"table-column",
|
|
"table-column-group",
|
|
"table-footer-group",
|
|
"table-header-group",
|
|
"table-row",
|
|
"table-row-group",
|
|
"text",
|
|
"text-bottom",
|
|
"text-top",
|
|
"textarea",
|
|
"textfield",
|
|
"thick",
|
|
"thin",
|
|
"threeddarkshadow",
|
|
"threedface",
|
|
"threedhighlight",
|
|
"threedlightshadow",
|
|
"threedshadow",
|
|
"to",
|
|
"top",
|
|
"transform",
|
|
"translate",
|
|
"translate3d",
|
|
"translateX",
|
|
"translateY",
|
|
"translateZ",
|
|
"transparent",
|
|
"ultra-condensed",
|
|
"ultra-expanded",
|
|
"underline",
|
|
"unidirectional-pan",
|
|
"unset",
|
|
"up",
|
|
"upper-latin",
|
|
"uppercase",
|
|
"url",
|
|
"var",
|
|
"vertical",
|
|
"vertical-text",
|
|
"view-box",
|
|
"visible",
|
|
"visibleFill",
|
|
"visiblePainted",
|
|
"visibleStroke",
|
|
"visual",
|
|
"w-resize",
|
|
"wait",
|
|
"wave",
|
|
"wider",
|
|
"window",
|
|
"windowframe",
|
|
"windowtext",
|
|
"words",
|
|
"wrap",
|
|
"wrap-reverse",
|
|
"x-large",
|
|
"x-small",
|
|
"xor",
|
|
"xx-large",
|
|
"xx-small"
|
|
].map((name) => ({ type: "keyword", label: name })).concat([
|
|
"aliceblue",
|
|
"antiquewhite",
|
|
"aqua",
|
|
"aquamarine",
|
|
"azure",
|
|
"beige",
|
|
"bisque",
|
|
"black",
|
|
"blanchedalmond",
|
|
"blue",
|
|
"blueviolet",
|
|
"brown",
|
|
"burlywood",
|
|
"cadetblue",
|
|
"chartreuse",
|
|
"chocolate",
|
|
"coral",
|
|
"cornflowerblue",
|
|
"cornsilk",
|
|
"crimson",
|
|
"cyan",
|
|
"darkblue",
|
|
"darkcyan",
|
|
"darkgoldenrod",
|
|
"darkgray",
|
|
"darkgreen",
|
|
"darkkhaki",
|
|
"darkmagenta",
|
|
"darkolivegreen",
|
|
"darkorange",
|
|
"darkorchid",
|
|
"darkred",
|
|
"darksalmon",
|
|
"darkseagreen",
|
|
"darkslateblue",
|
|
"darkslategray",
|
|
"darkturquoise",
|
|
"darkviolet",
|
|
"deeppink",
|
|
"deepskyblue",
|
|
"dimgray",
|
|
"dodgerblue",
|
|
"firebrick",
|
|
"floralwhite",
|
|
"forestgreen",
|
|
"fuchsia",
|
|
"gainsboro",
|
|
"ghostwhite",
|
|
"gold",
|
|
"goldenrod",
|
|
"gray",
|
|
"grey",
|
|
"green",
|
|
"greenyellow",
|
|
"honeydew",
|
|
"hotpink",
|
|
"indianred",
|
|
"indigo",
|
|
"ivory",
|
|
"khaki",
|
|
"lavender",
|
|
"lavenderblush",
|
|
"lawngreen",
|
|
"lemonchiffon",
|
|
"lightblue",
|
|
"lightcoral",
|
|
"lightcyan",
|
|
"lightgoldenrodyellow",
|
|
"lightgray",
|
|
"lightgreen",
|
|
"lightpink",
|
|
"lightsalmon",
|
|
"lightseagreen",
|
|
"lightskyblue",
|
|
"lightslategray",
|
|
"lightsteelblue",
|
|
"lightyellow",
|
|
"lime",
|
|
"limegreen",
|
|
"linen",
|
|
"magenta",
|
|
"maroon",
|
|
"mediumaquamarine",
|
|
"mediumblue",
|
|
"mediumorchid",
|
|
"mediumpurple",
|
|
"mediumseagreen",
|
|
"mediumslateblue",
|
|
"mediumspringgreen",
|
|
"mediumturquoise",
|
|
"mediumvioletred",
|
|
"midnightblue",
|
|
"mintcream",
|
|
"mistyrose",
|
|
"moccasin",
|
|
"navajowhite",
|
|
"navy",
|
|
"oldlace",
|
|
"olive",
|
|
"olivedrab",
|
|
"orange",
|
|
"orangered",
|
|
"orchid",
|
|
"palegoldenrod",
|
|
"palegreen",
|
|
"paleturquoise",
|
|
"palevioletred",
|
|
"papayawhip",
|
|
"peachpuff",
|
|
"peru",
|
|
"pink",
|
|
"plum",
|
|
"powderblue",
|
|
"purple",
|
|
"rebeccapurple",
|
|
"red",
|
|
"rosybrown",
|
|
"royalblue",
|
|
"saddlebrown",
|
|
"salmon",
|
|
"sandybrown",
|
|
"seagreen",
|
|
"seashell",
|
|
"sienna",
|
|
"silver",
|
|
"skyblue",
|
|
"slateblue",
|
|
"slategray",
|
|
"snow",
|
|
"springgreen",
|
|
"steelblue",
|
|
"tan",
|
|
"teal",
|
|
"thistle",
|
|
"tomato",
|
|
"turquoise",
|
|
"violet",
|
|
"wheat",
|
|
"white",
|
|
"whitesmoke",
|
|
"yellow",
|
|
"yellowgreen"
|
|
].map((name) => ({ type: "constant", label: name })));
|
|
var tags2 = [
|
|
"a",
|
|
"abbr",
|
|
"address",
|
|
"article",
|
|
"aside",
|
|
"b",
|
|
"bdi",
|
|
"bdo",
|
|
"blockquote",
|
|
"body",
|
|
"br",
|
|
"button",
|
|
"canvas",
|
|
"caption",
|
|
"cite",
|
|
"code",
|
|
"col",
|
|
"colgroup",
|
|
"dd",
|
|
"del",
|
|
"details",
|
|
"dfn",
|
|
"dialog",
|
|
"div",
|
|
"dl",
|
|
"dt",
|
|
"em",
|
|
"figcaption",
|
|
"figure",
|
|
"footer",
|
|
"form",
|
|
"header",
|
|
"hgroup",
|
|
"h1",
|
|
"h2",
|
|
"h3",
|
|
"h4",
|
|
"h5",
|
|
"h6",
|
|
"hr",
|
|
"html",
|
|
"i",
|
|
"iframe",
|
|
"img",
|
|
"input",
|
|
"ins",
|
|
"kbd",
|
|
"label",
|
|
"legend",
|
|
"li",
|
|
"main",
|
|
"meter",
|
|
"nav",
|
|
"ol",
|
|
"output",
|
|
"p",
|
|
"pre",
|
|
"ruby",
|
|
"section",
|
|
"select",
|
|
"small",
|
|
"source",
|
|
"span",
|
|
"strong",
|
|
"sub",
|
|
"summary",
|
|
"sup",
|
|
"table",
|
|
"tbody",
|
|
"td",
|
|
"template",
|
|
"textarea",
|
|
"tfoot",
|
|
"th",
|
|
"thead",
|
|
"tr",
|
|
"u",
|
|
"ul"
|
|
].map((name) => ({ type: "type", label: name }));
|
|
var atRules = [
|
|
"@charset",
|
|
"@color-profile",
|
|
"@container",
|
|
"@counter-style",
|
|
"@font-face",
|
|
"@font-feature-values",
|
|
"@font-palette-values",
|
|
"@import",
|
|
"@keyframes",
|
|
"@layer",
|
|
"@media",
|
|
"@namespace",
|
|
"@page",
|
|
"@position-try",
|
|
"@property",
|
|
"@scope",
|
|
"@starting-style",
|
|
"@supports",
|
|
"@view-transition"
|
|
].map((label) => ({ type: "keyword", label }));
|
|
var identifier2 = /^(\w[\w-]*|-\w[\w-]*|)$/;
|
|
var variable = /^-(-[\w-]*)?$/;
|
|
function isVarArg(node, doc) {
|
|
var _a;
|
|
if (node.name == "(" || node.type.isError)
|
|
node = node.parent || node;
|
|
if (node.name != "ArgList")
|
|
return false;
|
|
let callee2 = (_a = node.parent) === null || _a === void 0 ? void 0 : _a.firstChild;
|
|
if ((callee2 === null || callee2 === void 0 ? void 0 : callee2.name) != "Callee")
|
|
return false;
|
|
return doc.sliceString(callee2.from, callee2.to) == "var";
|
|
}
|
|
var VariablesByNode = new NodeWeakMap();
|
|
var declSelector = ["Declaration"];
|
|
function astTop(node) {
|
|
for (let cur = node; ; ) {
|
|
if (cur.type.isTop)
|
|
return cur;
|
|
if (!(cur = cur.parent))
|
|
return node;
|
|
}
|
|
}
|
|
function variableNames(doc, node, isVariable) {
|
|
if (node.to - node.from > 4096) {
|
|
let known = VariablesByNode.get(node);
|
|
if (known)
|
|
return known;
|
|
let result = [], seen = /* @__PURE__ */ new Set(), cursor = node.cursor(IterMode.IncludeAnonymous);
|
|
if (cursor.firstChild())
|
|
do {
|
|
for (let option of variableNames(doc, cursor.node, isVariable))
|
|
if (!seen.has(option.label)) {
|
|
seen.add(option.label);
|
|
result.push(option);
|
|
}
|
|
} while (cursor.nextSibling());
|
|
VariablesByNode.set(node, result);
|
|
return result;
|
|
} else {
|
|
let result = [], seen = /* @__PURE__ */ new Set();
|
|
node.cursor().iterate((node2) => {
|
|
var _a;
|
|
if (isVariable(node2) && node2.matchContext(declSelector) && ((_a = node2.node.nextSibling) === null || _a === void 0 ? void 0 : _a.name) == ":") {
|
|
let name = doc.sliceString(node2.from, node2.to);
|
|
if (!seen.has(name)) {
|
|
seen.add(name);
|
|
result.push({ label: name, type: "variable" });
|
|
}
|
|
}
|
|
});
|
|
return result;
|
|
}
|
|
}
|
|
var defineCSSCompletionSource = (isVariable) => (context) => {
|
|
let { state, pos } = context, node = syntaxTree(state).resolveInner(pos, -1);
|
|
let isDash = node.type.isError && node.from == node.to - 1 && state.doc.sliceString(node.from, node.to) == "-";
|
|
if (node.name == "PropertyName" || (isDash || node.name == "TagName") && /^(Block|Styles)$/.test(node.resolve(node.to).name))
|
|
return { from: node.from, options: properties(), validFor: identifier2 };
|
|
if (node.name == "ValueName")
|
|
return { from: node.from, options: values, validFor: identifier2 };
|
|
if (node.name == "PseudoClassName")
|
|
return { from: node.from, options: pseudoClasses, validFor: identifier2 };
|
|
if (isVariable(node) || (context.explicit || isDash) && isVarArg(node, state.doc))
|
|
return {
|
|
from: isVariable(node) || isDash ? node.from : pos,
|
|
options: variableNames(state.doc, astTop(node), isVariable),
|
|
validFor: variable
|
|
};
|
|
if (node.name == "TagName") {
|
|
for (let { parent } = node; parent; parent = parent.parent)
|
|
if (parent.name == "Block")
|
|
return { from: node.from, options: properties(), validFor: identifier2 };
|
|
return { from: node.from, options: tags2, validFor: identifier2 };
|
|
}
|
|
if (node.name == "AtKeyword")
|
|
return { from: node.from, options: atRules, validFor: identifier2 };
|
|
if (!context.explicit)
|
|
return null;
|
|
let above = node.resolve(pos), before = above.childBefore(pos);
|
|
if (before && before.name == ":" && above.name == "PseudoClassSelector")
|
|
return { from: pos, options: pseudoClasses, validFor: identifier2 };
|
|
if (before && before.name == ":" && above.name == "Declaration" || above.name == "ArgList")
|
|
return { from: pos, options: values, validFor: identifier2 };
|
|
if (above.name == "Block" || above.name == "Styles")
|
|
return { from: pos, options: properties(), validFor: identifier2 };
|
|
return null;
|
|
};
|
|
var cssCompletionSource = defineCSSCompletionSource((n) => n.name == "VariableName");
|
|
var cssLanguage = LRLanguage.define({
|
|
name: "css",
|
|
parser: parser2.configure({
|
|
props: [
|
|
indentNodeProp.add({
|
|
Declaration: continuedIndent()
|
|
}),
|
|
foldNodeProp.add({
|
|
"Block KeyframeList": foldInside
|
|
})
|
|
]
|
|
}),
|
|
languageData: {
|
|
commentTokens: { block: { open: "/*", close: "*/" } },
|
|
indentOnInput: /^\s*\}$/,
|
|
wordChars: "-"
|
|
}
|
|
});
|
|
function css() {
|
|
return new LanguageSupport(cssLanguage, cssLanguage.data.of({ autocomplete: cssCompletionSource }));
|
|
}
|
|
|
|
// node_modules/@codemirror/lang-html/dist/index.js
|
|
var Targets = ["_blank", "_self", "_top", "_parent"];
|
|
var Charsets = ["ascii", "utf-8", "utf-16", "latin1", "latin1"];
|
|
var Methods = ["get", "post", "put", "delete"];
|
|
var Encs = ["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"];
|
|
var Bool = ["true", "false"];
|
|
var S = {};
|
|
var Tags = {
|
|
a: {
|
|
attrs: {
|
|
href: null,
|
|
ping: null,
|
|
type: null,
|
|
media: null,
|
|
target: Targets,
|
|
hreflang: null
|
|
}
|
|
},
|
|
abbr: S,
|
|
address: S,
|
|
area: {
|
|
attrs: {
|
|
alt: null,
|
|
coords: null,
|
|
href: null,
|
|
target: null,
|
|
ping: null,
|
|
media: null,
|
|
hreflang: null,
|
|
type: null,
|
|
shape: ["default", "rect", "circle", "poly"]
|
|
}
|
|
},
|
|
article: S,
|
|
aside: S,
|
|
audio: {
|
|
attrs: {
|
|
src: null,
|
|
mediagroup: null,
|
|
crossorigin: ["anonymous", "use-credentials"],
|
|
preload: ["none", "metadata", "auto"],
|
|
autoplay: ["autoplay"],
|
|
loop: ["loop"],
|
|
controls: ["controls"]
|
|
}
|
|
},
|
|
b: S,
|
|
base: { attrs: { href: null, target: Targets } },
|
|
bdi: S,
|
|
bdo: S,
|
|
blockquote: { attrs: { cite: null } },
|
|
body: S,
|
|
br: S,
|
|
button: {
|
|
attrs: {
|
|
form: null,
|
|
formaction: null,
|
|
name: null,
|
|
value: null,
|
|
autofocus: ["autofocus"],
|
|
disabled: ["autofocus"],
|
|
formenctype: Encs,
|
|
formmethod: Methods,
|
|
formnovalidate: ["novalidate"],
|
|
formtarget: Targets,
|
|
type: ["submit", "reset", "button"]
|
|
}
|
|
},
|
|
canvas: { attrs: { width: null, height: null } },
|
|
caption: S,
|
|
center: S,
|
|
cite: S,
|
|
code: S,
|
|
col: { attrs: { span: null } },
|
|
colgroup: { attrs: { span: null } },
|
|
command: {
|
|
attrs: {
|
|
type: ["command", "checkbox", "radio"],
|
|
label: null,
|
|
icon: null,
|
|
radiogroup: null,
|
|
command: null,
|
|
title: null,
|
|
disabled: ["disabled"],
|
|
checked: ["checked"]
|
|
}
|
|
},
|
|
data: { attrs: { value: null } },
|
|
datagrid: { attrs: { disabled: ["disabled"], multiple: ["multiple"] } },
|
|
datalist: { attrs: { data: null } },
|
|
dd: S,
|
|
del: { attrs: { cite: null, datetime: null } },
|
|
details: { attrs: { open: ["open"] } },
|
|
dfn: S,
|
|
div: S,
|
|
dl: S,
|
|
dt: S,
|
|
em: S,
|
|
embed: { attrs: { src: null, type: null, width: null, height: null } },
|
|
eventsource: { attrs: { src: null } },
|
|
fieldset: { attrs: { disabled: ["disabled"], form: null, name: null } },
|
|
figcaption: S,
|
|
figure: S,
|
|
footer: S,
|
|
form: {
|
|
attrs: {
|
|
action: null,
|
|
name: null,
|
|
"accept-charset": Charsets,
|
|
autocomplete: ["on", "off"],
|
|
enctype: Encs,
|
|
method: Methods,
|
|
novalidate: ["novalidate"],
|
|
target: Targets
|
|
}
|
|
},
|
|
h1: S,
|
|
h2: S,
|
|
h3: S,
|
|
h4: S,
|
|
h5: S,
|
|
h6: S,
|
|
head: {
|
|
children: ["title", "base", "link", "style", "meta", "script", "noscript", "command"]
|
|
},
|
|
header: S,
|
|
hgroup: S,
|
|
hr: S,
|
|
html: {
|
|
attrs: { manifest: null }
|
|
},
|
|
i: S,
|
|
iframe: {
|
|
attrs: {
|
|
src: null,
|
|
srcdoc: null,
|
|
name: null,
|
|
width: null,
|
|
height: null,
|
|
sandbox: ["allow-top-navigation", "allow-same-origin", "allow-forms", "allow-scripts"],
|
|
seamless: ["seamless"]
|
|
}
|
|
},
|
|
img: {
|
|
attrs: {
|
|
alt: null,
|
|
src: null,
|
|
ismap: null,
|
|
usemap: null,
|
|
width: null,
|
|
height: null,
|
|
crossorigin: ["anonymous", "use-credentials"]
|
|
}
|
|
},
|
|
input: {
|
|
attrs: {
|
|
alt: null,
|
|
dirname: null,
|
|
form: null,
|
|
formaction: null,
|
|
height: null,
|
|
list: null,
|
|
max: null,
|
|
maxlength: null,
|
|
min: null,
|
|
name: null,
|
|
pattern: null,
|
|
placeholder: null,
|
|
size: null,
|
|
src: null,
|
|
step: null,
|
|
value: null,
|
|
width: null,
|
|
accept: ["audio/*", "video/*", "image/*"],
|
|
autocomplete: ["on", "off"],
|
|
autofocus: ["autofocus"],
|
|
checked: ["checked"],
|
|
disabled: ["disabled"],
|
|
formenctype: Encs,
|
|
formmethod: Methods,
|
|
formnovalidate: ["novalidate"],
|
|
formtarget: Targets,
|
|
multiple: ["multiple"],
|
|
readonly: ["readonly"],
|
|
required: ["required"],
|
|
type: [
|
|
"hidden",
|
|
"text",
|
|
"search",
|
|
"tel",
|
|
"url",
|
|
"email",
|
|
"password",
|
|
"datetime",
|
|
"date",
|
|
"month",
|
|
"week",
|
|
"time",
|
|
"datetime-local",
|
|
"number",
|
|
"range",
|
|
"color",
|
|
"checkbox",
|
|
"radio",
|
|
"file",
|
|
"submit",
|
|
"image",
|
|
"reset",
|
|
"button"
|
|
]
|
|
}
|
|
},
|
|
ins: { attrs: { cite: null, datetime: null } },
|
|
kbd: S,
|
|
keygen: {
|
|
attrs: {
|
|
challenge: null,
|
|
form: null,
|
|
name: null,
|
|
autofocus: ["autofocus"],
|
|
disabled: ["disabled"],
|
|
keytype: ["RSA"]
|
|
}
|
|
},
|
|
label: { attrs: { for: null, form: null } },
|
|
legend: S,
|
|
li: { attrs: { value: null } },
|
|
link: {
|
|
attrs: {
|
|
href: null,
|
|
type: null,
|
|
hreflang: null,
|
|
media: null,
|
|
sizes: ["all", "16x16", "16x16 32x32", "16x16 32x32 64x64"]
|
|
}
|
|
},
|
|
map: { attrs: { name: null } },
|
|
mark: S,
|
|
menu: { attrs: { label: null, type: ["list", "context", "toolbar"] } },
|
|
meta: {
|
|
attrs: {
|
|
content: null,
|
|
charset: Charsets,
|
|
name: ["viewport", "application-name", "author", "description", "generator", "keywords"],
|
|
"http-equiv": ["content-language", "content-type", "default-style", "refresh"]
|
|
}
|
|
},
|
|
meter: { attrs: { value: null, min: null, low: null, high: null, max: null, optimum: null } },
|
|
nav: S,
|
|
noscript: S,
|
|
object: {
|
|
attrs: {
|
|
data: null,
|
|
type: null,
|
|
name: null,
|
|
usemap: null,
|
|
form: null,
|
|
width: null,
|
|
height: null,
|
|
typemustmatch: ["typemustmatch"]
|
|
}
|
|
},
|
|
ol: {
|
|
attrs: { reversed: ["reversed"], start: null, type: ["1", "a", "A", "i", "I"] },
|
|
children: ["li", "script", "template", "ul", "ol"]
|
|
},
|
|
optgroup: { attrs: { disabled: ["disabled"], label: null } },
|
|
option: { attrs: { disabled: ["disabled"], label: null, selected: ["selected"], value: null } },
|
|
output: { attrs: { for: null, form: null, name: null } },
|
|
p: S,
|
|
param: { attrs: { name: null, value: null } },
|
|
pre: S,
|
|
progress: { attrs: { value: null, max: null } },
|
|
q: { attrs: { cite: null } },
|
|
rp: S,
|
|
rt: S,
|
|
ruby: S,
|
|
samp: S,
|
|
script: {
|
|
attrs: {
|
|
type: ["text/javascript"],
|
|
src: null,
|
|
async: ["async"],
|
|
defer: ["defer"],
|
|
charset: Charsets
|
|
}
|
|
},
|
|
section: S,
|
|
select: {
|
|
attrs: {
|
|
form: null,
|
|
name: null,
|
|
size: null,
|
|
autofocus: ["autofocus"],
|
|
disabled: ["disabled"],
|
|
multiple: ["multiple"]
|
|
}
|
|
},
|
|
slot: { attrs: { name: null } },
|
|
small: S,
|
|
source: { attrs: { src: null, type: null, media: null } },
|
|
span: S,
|
|
strong: S,
|
|
style: {
|
|
attrs: {
|
|
type: ["text/css"],
|
|
media: null,
|
|
scoped: null
|
|
}
|
|
},
|
|
sub: S,
|
|
summary: S,
|
|
sup: S,
|
|
table: S,
|
|
tbody: S,
|
|
td: { attrs: { colspan: null, rowspan: null, headers: null } },
|
|
template: S,
|
|
textarea: {
|
|
attrs: {
|
|
dirname: null,
|
|
form: null,
|
|
maxlength: null,
|
|
name: null,
|
|
placeholder: null,
|
|
rows: null,
|
|
cols: null,
|
|
autofocus: ["autofocus"],
|
|
disabled: ["disabled"],
|
|
readonly: ["readonly"],
|
|
required: ["required"],
|
|
wrap: ["soft", "hard"]
|
|
}
|
|
},
|
|
tfoot: S,
|
|
th: { attrs: { colspan: null, rowspan: null, headers: null, scope: ["row", "col", "rowgroup", "colgroup"] } },
|
|
thead: S,
|
|
time: { attrs: { datetime: null } },
|
|
title: S,
|
|
tr: S,
|
|
track: {
|
|
attrs: {
|
|
src: null,
|
|
label: null,
|
|
default: null,
|
|
kind: ["subtitles", "captions", "descriptions", "chapters", "metadata"],
|
|
srclang: null
|
|
}
|
|
},
|
|
ul: { children: ["li", "script", "template", "ul", "ol"] },
|
|
var: S,
|
|
video: {
|
|
attrs: {
|
|
src: null,
|
|
poster: null,
|
|
width: null,
|
|
height: null,
|
|
crossorigin: ["anonymous", "use-credentials"],
|
|
preload: ["auto", "metadata", "none"],
|
|
autoplay: ["autoplay"],
|
|
mediagroup: ["movie"],
|
|
muted: ["muted"],
|
|
controls: ["controls"]
|
|
}
|
|
},
|
|
wbr: S
|
|
};
|
|
var GlobalAttrs = {
|
|
accesskey: null,
|
|
class: null,
|
|
contenteditable: Bool,
|
|
contextmenu: null,
|
|
dir: ["ltr", "rtl", "auto"],
|
|
draggable: ["true", "false", "auto"],
|
|
dropzone: ["copy", "move", "link", "string:", "file:"],
|
|
hidden: ["hidden"],
|
|
id: null,
|
|
inert: ["inert"],
|
|
itemid: null,
|
|
itemprop: null,
|
|
itemref: null,
|
|
itemscope: ["itemscope"],
|
|
itemtype: null,
|
|
lang: ["ar", "bn", "de", "en-GB", "en-US", "es", "fr", "hi", "id", "ja", "pa", "pt", "ru", "tr", "zh"],
|
|
spellcheck: Bool,
|
|
autocorrect: Bool,
|
|
autocapitalize: Bool,
|
|
style: null,
|
|
tabindex: null,
|
|
title: null,
|
|
translate: ["yes", "no"],
|
|
rel: ["stylesheet", "alternate", "author", "bookmark", "help", "license", "next", "nofollow", "noreferrer", "prefetch", "prev", "search", "tag"],
|
|
role: "alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),
|
|
"aria-activedescendant": null,
|
|
"aria-atomic": Bool,
|
|
"aria-autocomplete": ["inline", "list", "both", "none"],
|
|
"aria-busy": Bool,
|
|
"aria-checked": ["true", "false", "mixed", "undefined"],
|
|
"aria-controls": null,
|
|
"aria-describedby": null,
|
|
"aria-disabled": Bool,
|
|
"aria-dropeffect": null,
|
|
"aria-expanded": ["true", "false", "undefined"],
|
|
"aria-flowto": null,
|
|
"aria-grabbed": ["true", "false", "undefined"],
|
|
"aria-haspopup": Bool,
|
|
"aria-hidden": Bool,
|
|
"aria-invalid": ["true", "false", "grammar", "spelling"],
|
|
"aria-label": null,
|
|
"aria-labelledby": null,
|
|
"aria-level": null,
|
|
"aria-live": ["off", "polite", "assertive"],
|
|
"aria-multiline": Bool,
|
|
"aria-multiselectable": Bool,
|
|
"aria-owns": null,
|
|
"aria-posinset": null,
|
|
"aria-pressed": ["true", "false", "mixed", "undefined"],
|
|
"aria-readonly": Bool,
|
|
"aria-relevant": null,
|
|
"aria-required": Bool,
|
|
"aria-selected": ["true", "false", "undefined"],
|
|
"aria-setsize": null,
|
|
"aria-sort": ["ascending", "descending", "none", "other"],
|
|
"aria-valuemax": null,
|
|
"aria-valuemin": null,
|
|
"aria-valuenow": null,
|
|
"aria-valuetext": null
|
|
};
|
|
var eventAttributes = "beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map((n) => "on" + n);
|
|
for (let a of eventAttributes)
|
|
GlobalAttrs[a] = null;
|
|
var Schema = class {
|
|
constructor(extraTags, extraAttrs) {
|
|
this.tags = { ...Tags, ...extraTags };
|
|
this.globalAttrs = { ...GlobalAttrs, ...extraAttrs };
|
|
this.allTags = Object.keys(this.tags);
|
|
this.globalAttrNames = Object.keys(this.globalAttrs);
|
|
}
|
|
};
|
|
Schema.default = new Schema();
|
|
function elementName(doc, tree, max = doc.length) {
|
|
if (!tree)
|
|
return "";
|
|
let tag = tree.firstChild;
|
|
let name = tag && tag.getChild("TagName");
|
|
return name ? doc.sliceString(name.from, Math.min(name.to, max)) : "";
|
|
}
|
|
function findParentElement(tree, skip = false) {
|
|
for (; tree; tree = tree.parent)
|
|
if (tree.name == "Element") {
|
|
if (skip)
|
|
skip = false;
|
|
else
|
|
return tree;
|
|
}
|
|
return null;
|
|
}
|
|
function allowedChildren(doc, tree, schema) {
|
|
let parentInfo = schema.tags[elementName(doc, findParentElement(tree))];
|
|
return (parentInfo === null || parentInfo === void 0 ? void 0 : parentInfo.children) || schema.allTags;
|
|
}
|
|
function openTags(doc, tree) {
|
|
let open = [];
|
|
for (let parent = findParentElement(tree); parent && !parent.type.isTop; parent = findParentElement(parent.parent)) {
|
|
let tagName = elementName(doc, parent);
|
|
if (tagName && parent.lastChild.name == "CloseTag")
|
|
break;
|
|
if (tagName && open.indexOf(tagName) < 0 && (tree.name == "EndTag" || tree.from >= parent.firstChild.to))
|
|
open.push(tagName);
|
|
}
|
|
return open;
|
|
}
|
|
var identifier3 = /^[:\-\.\w\u00b7-\uffff]*$/;
|
|
function completeTag(state, schema, tree, from, to) {
|
|
let end = /\s*>/.test(state.sliceDoc(to, to + 5)) ? "" : ">";
|
|
let parent = findParentElement(tree, tree.name == "StartTag" || tree.name == "TagName");
|
|
return {
|
|
from,
|
|
to,
|
|
options: allowedChildren(state.doc, parent, schema).map((tagName) => ({ label: tagName, type: "type" })).concat(openTags(state.doc, tree).map((tag, i) => ({
|
|
label: "/" + tag,
|
|
apply: "/" + tag + end,
|
|
type: "type",
|
|
boost: 99 - i
|
|
}))),
|
|
validFor: /^\/?[:\-\.\w\u00b7-\uffff]*$/
|
|
};
|
|
}
|
|
function completeCloseTag(state, tree, from, to) {
|
|
let end = /\s*>/.test(state.sliceDoc(to, to + 5)) ? "" : ">";
|
|
return {
|
|
from,
|
|
to,
|
|
options: openTags(state.doc, tree).map((tag, i) => ({ label: tag, apply: tag + end, type: "type", boost: 99 - i })),
|
|
validFor: identifier3
|
|
};
|
|
}
|
|
function completeStartTag(state, schema, tree, pos) {
|
|
let options = [], level = 0;
|
|
for (let tagName of allowedChildren(state.doc, tree, schema))
|
|
options.push({ label: "<" + tagName, type: "type" });
|
|
for (let open of openTags(state.doc, tree))
|
|
options.push({ label: "</" + open + ">", type: "type", boost: 99 - level++ });
|
|
return { from: pos, to: pos, options, validFor: /^<\/?[:\-\.\w\u00b7-\uffff]*$/ };
|
|
}
|
|
function completeAttrName(state, schema, tree, from, to) {
|
|
let elt = findParentElement(tree), info = elt ? schema.tags[elementName(state.doc, elt)] : null;
|
|
let localAttrs = info && info.attrs ? Object.keys(info.attrs) : [];
|
|
let names = info && info.globalAttrs === false ? localAttrs : localAttrs.length ? localAttrs.concat(schema.globalAttrNames) : schema.globalAttrNames;
|
|
return {
|
|
from,
|
|
to,
|
|
options: names.map((attrName) => ({ label: attrName, type: "property" })),
|
|
validFor: identifier3
|
|
};
|
|
}
|
|
function completeAttrValue(state, schema, tree, from, to) {
|
|
var _a;
|
|
let nameNode = (_a = tree.parent) === null || _a === void 0 ? void 0 : _a.getChild("AttributeName");
|
|
let options = [], token = void 0;
|
|
if (nameNode) {
|
|
let attrName = state.sliceDoc(nameNode.from, nameNode.to);
|
|
let attrs = schema.globalAttrs[attrName];
|
|
if (!attrs) {
|
|
let elt = findParentElement(tree), info = elt ? schema.tags[elementName(state.doc, elt)] : null;
|
|
attrs = (info === null || info === void 0 ? void 0 : info.attrs) && info.attrs[attrName];
|
|
}
|
|
if (attrs) {
|
|
let base = state.sliceDoc(from, to).toLowerCase(), quoteStart = '"', quoteEnd = '"';
|
|
if (/^['"]/.test(base)) {
|
|
token = base[0] == '"' ? /^[^"]*$/ : /^[^']*$/;
|
|
quoteStart = "";
|
|
quoteEnd = state.sliceDoc(to, to + 1) == base[0] ? "" : base[0];
|
|
base = base.slice(1);
|
|
from++;
|
|
} else {
|
|
token = /^[^\s<>='"]*$/;
|
|
}
|
|
for (let value of attrs)
|
|
options.push({ label: value, apply: quoteStart + value + quoteEnd, type: "constant" });
|
|
}
|
|
}
|
|
return { from, to, options, validFor: token };
|
|
}
|
|
function htmlCompletionFor(schema, context) {
|
|
let { state, pos } = context, tree = syntaxTree(state).resolveInner(pos, -1), around = tree.resolve(pos);
|
|
for (let scan = pos, before; around == tree && (before = tree.childBefore(scan)); ) {
|
|
let last = before.lastChild;
|
|
if (!last || !last.type.isError || last.from < last.to)
|
|
break;
|
|
around = tree = before;
|
|
scan = last.from;
|
|
}
|
|
if (tree.name == "TagName") {
|
|
return tree.parent && /CloseTag$/.test(tree.parent.name) ? completeCloseTag(state, tree, tree.from, pos) : completeTag(state, schema, tree, tree.from, pos);
|
|
} else if (tree.name == "StartTag" || tree.name == "IncompleteTag") {
|
|
return completeTag(state, schema, tree, pos, pos);
|
|
} else if (tree.name == "StartCloseTag" || tree.name == "IncompleteCloseTag") {
|
|
return completeCloseTag(state, tree, pos, pos);
|
|
} else if (tree.name == "OpenTag" || tree.name == "SelfClosingTag" || tree.name == "AttributeName") {
|
|
return completeAttrName(state, schema, tree, tree.name == "AttributeName" ? tree.from : pos, pos);
|
|
} else if (tree.name == "Is" || tree.name == "AttributeValue" || tree.name == "UnquotedAttributeValue") {
|
|
return completeAttrValue(state, schema, tree, tree.name == "Is" ? pos : tree.from, pos);
|
|
} else if (context.explicit && (around.name == "Element" || around.name == "Text" || around.name == "Document")) {
|
|
return completeStartTag(state, schema, tree, pos);
|
|
} else {
|
|
return null;
|
|
}
|
|
}
|
|
function htmlCompletionSource(context) {
|
|
return htmlCompletionFor(Schema.default, context);
|
|
}
|
|
function htmlCompletionSourceWith(config) {
|
|
let { extraTags, extraGlobalAttributes: extraAttrs } = config;
|
|
let schema = extraAttrs || extraTags ? new Schema(extraTags, extraAttrs) : Schema.default;
|
|
return (context) => htmlCompletionFor(schema, context);
|
|
}
|
|
var jsonParser = javascriptLanguage.parser.configure({ top: "SingleExpression" });
|
|
var defaultNesting = [
|
|
{
|
|
tag: "script",
|
|
attrs: (attrs) => attrs.type == "text/typescript" || attrs.lang == "ts",
|
|
parser: typescriptLanguage.parser
|
|
},
|
|
{
|
|
tag: "script",
|
|
attrs: (attrs) => attrs.type == "text/babel" || attrs.type == "text/jsx",
|
|
parser: jsxLanguage.parser
|
|
},
|
|
{
|
|
tag: "script",
|
|
attrs: (attrs) => attrs.type == "text/typescript-jsx",
|
|
parser: tsxLanguage.parser
|
|
},
|
|
{
|
|
tag: "script",
|
|
attrs(attrs) {
|
|
return /^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(attrs.type);
|
|
},
|
|
parser: jsonParser
|
|
},
|
|
{
|
|
tag: "script",
|
|
attrs(attrs) {
|
|
return !attrs.type || /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(attrs.type);
|
|
},
|
|
parser: javascriptLanguage.parser
|
|
},
|
|
{
|
|
tag: "style",
|
|
attrs(attrs) {
|
|
return (!attrs.lang || attrs.lang == "css") && (!attrs.type || /^(text\/)?(x-)?(stylesheet|css)$/i.test(attrs.type));
|
|
},
|
|
parser: cssLanguage.parser
|
|
}
|
|
];
|
|
var defaultAttrs = [
|
|
{
|
|
name: "style",
|
|
parser: cssLanguage.parser.configure({ top: "Styles" })
|
|
}
|
|
].concat(eventAttributes.map((name) => ({ name, parser: javascriptLanguage.parser })));
|
|
var htmlPlain = LRLanguage.define({
|
|
name: "html",
|
|
parser: parser.configure({
|
|
props: [
|
|
indentNodeProp.add({
|
|
Element(context) {
|
|
let after = /^(\s*)(<\/)?/.exec(context.textAfter);
|
|
if (context.node.to <= context.pos + after[0].length)
|
|
return context.continue();
|
|
return context.lineIndent(context.node.from) + (after[2] ? 0 : context.unit);
|
|
},
|
|
"OpenTag CloseTag SelfClosingTag"(context) {
|
|
return context.column(context.node.from) + context.unit;
|
|
},
|
|
Document(context) {
|
|
if (context.pos + /\s*/.exec(context.textAfter)[0].length < context.node.to)
|
|
return context.continue();
|
|
let endElt = null, close;
|
|
for (let cur = context.node; ; ) {
|
|
let last = cur.lastChild;
|
|
if (!last || last.name != "Element" || last.to != cur.to)
|
|
break;
|
|
endElt = cur = last;
|
|
}
|
|
if (endElt && !((close = endElt.lastChild) && (close.name == "CloseTag" || close.name == "SelfClosingTag")))
|
|
return context.lineIndent(endElt.from) + context.unit;
|
|
return null;
|
|
}
|
|
}),
|
|
foldNodeProp.add({
|
|
Element(node) {
|
|
let first = node.firstChild, last = node.lastChild;
|
|
if (!first || first.name != "OpenTag")
|
|
return null;
|
|
return { from: first.to, to: last.name == "CloseTag" ? last.from : node.to };
|
|
}
|
|
}),
|
|
bracketMatchingHandle.add({
|
|
"OpenTag CloseTag": (node) => node.getChild("TagName")
|
|
})
|
|
]
|
|
}),
|
|
languageData: {
|
|
commentTokens: { block: { open: "<!--", close: "-->" } },
|
|
indentOnInput: /^\s*<\/\w+\W$/,
|
|
wordChars: "-_"
|
|
}
|
|
});
|
|
var htmlLanguage = htmlPlain.configure({
|
|
wrap: configureNesting(defaultNesting, defaultAttrs)
|
|
});
|
|
function html(config = {}) {
|
|
let dialect = "", wrap;
|
|
if (config.matchClosingTags === false)
|
|
dialect = "noMatch";
|
|
if (config.selfClosingTags === true)
|
|
dialect = (dialect ? dialect + " " : "") + "selfClosing";
|
|
if (config.nestedLanguages && config.nestedLanguages.length || config.nestedAttributes && config.nestedAttributes.length)
|
|
wrap = configureNesting((config.nestedLanguages || []).concat(defaultNesting), (config.nestedAttributes || []).concat(defaultAttrs));
|
|
let lang = wrap ? htmlPlain.configure({ wrap, dialect }) : dialect ? htmlLanguage.configure({ dialect }) : htmlLanguage;
|
|
return new LanguageSupport(lang, [
|
|
htmlLanguage.data.of({ autocomplete: htmlCompletionSourceWith(config) }),
|
|
config.autoCloseTags !== false ? autoCloseTags : [],
|
|
javascript().support,
|
|
css().support
|
|
]);
|
|
}
|
|
var selfClosers2 = new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" "));
|
|
var autoCloseTags = EditorView.inputHandler.of((view, from, to, text, insertTransaction) => {
|
|
if (view.composing || view.state.readOnly || from != to || text != ">" && text != "/" || !htmlLanguage.isActiveAt(view.state, from, -1))
|
|
return false;
|
|
let base = insertTransaction(), { state } = base;
|
|
let closeTags = state.changeByRange((range) => {
|
|
var _a, _b, _c;
|
|
let didType = state.doc.sliceString(range.from - 1, range.to) == text;
|
|
let { head } = range, after = syntaxTree(state).resolveInner(head, -1), name;
|
|
if (didType && text == ">" && after.name == "EndTag") {
|
|
let tag = after.parent;
|
|
if (((_b = (_a = tag.parent) === null || _a === void 0 ? void 0 : _a.lastChild) === null || _b === void 0 ? void 0 : _b.name) != "CloseTag" && (name = elementName(state.doc, tag.parent, head)) && !selfClosers2.has(name)) {
|
|
let to2 = head + (state.doc.sliceString(head, head + 1) === ">" ? 1 : 0);
|
|
let insert = `</${name}>`;
|
|
return { range, changes: { from: head, to: to2, insert } };
|
|
}
|
|
} else if (didType && text == "/" && after.name == "IncompleteCloseTag") {
|
|
let tag = after.parent;
|
|
if (after.from == head - 2 && ((_c = tag.lastChild) === null || _c === void 0 ? void 0 : _c.name) != "CloseTag" && (name = elementName(state.doc, tag, head)) && !selfClosers2.has(name)) {
|
|
let to2 = head + (state.doc.sliceString(head, head + 1) === ">" ? 1 : 0);
|
|
let insert = `${name}>`;
|
|
return {
|
|
range: EditorSelection.cursor(head + insert.length, -1),
|
|
changes: { from: head, to: to2, insert }
|
|
};
|
|
}
|
|
}
|
|
return { range };
|
|
});
|
|
if (closeTags.changes.empty)
|
|
return false;
|
|
view.dispatch([
|
|
base,
|
|
state.update(closeTags, {
|
|
userEvent: "input.complete",
|
|
scrollIntoView: true
|
|
})
|
|
]);
|
|
return true;
|
|
});
|
|
export {
|
|
autoCloseTags,
|
|
html,
|
|
htmlCompletionSource,
|
|
htmlCompletionSourceWith,
|
|
htmlLanguage
|
|
};
|
|
//# sourceMappingURL=@codemirror_lang-html.js.map
|