xmlui 0.9.10 → 0.9.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{apiInterceptorWorker-BJYj3y8V.mjs → apiInterceptorWorker-BZP06llg.mjs} +1 -1
- package/dist/core-C-osEDc2.mjs +2 -0
- package/dist/{index-6PAZN2xn.mjs → index-CFJ5_K_a.mjs} +921 -1963
- package/dist/index.css +0 -100
- package/dist/language-server-web-worker.mjs +1 -1
- package/dist/language-server.mjs +1 -1
- package/dist/{lint-DmJOJSJa.mjs → lint-CiMcsEWf.mjs} +84 -84
- package/dist/{parser-B3m9ZEAK.mjs → parser-mzWvH7dz.mjs} +12 -12
- package/dist/scripts/src/components-core/InspectorContext.js +15 -4
- package/dist/{server-common-oCD2CuF9.mjs → server-common-DxRVCeIE.mjs} +1 -1
- package/dist/xmlui-metadata.mjs +281 -387
- package/dist/xmlui-metadata.umd.js +283 -389
- package/dist/xmlui-parser.mjs +34 -34
- package/dist/xmlui-standalone.umd.js +9463 -14245
- package/dist/xmlui.d.ts +11 -0
- package/dist/xmlui.mjs +2 -1
- package/package.json +3 -1
- package/dist/core-XLM8cuFP.mjs +0 -7491
- package/dist/scripts/src/components-core/devtools/DevTools.js +0 -225
- package/dist/scripts/src/syntax/monaco/grammar.monacoLanguage.js +0 -286
- package/dist/scripts/src/syntax/monaco/xmlui-dark.js +0 -27
- package/dist/scripts/src/syntax/monaco/xmlui-light.js +0 -26
- package/dist/scripts/src/syntax/monaco/xmluiscript.monacoLanguage.js +0 -310
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.DevTools = void 0;
|
|
40
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
|
-
const react_1 = require("react");
|
|
42
|
-
const react_2 = require("react");
|
|
43
|
-
const react_rnd_1 = require("react-rnd");
|
|
44
|
-
const ThemeContext_1 = require("../theming/ThemeContext");
|
|
45
|
-
const react_dom_1 = require("react-dom");
|
|
46
|
-
const InspectorContext_1 = require("../InspectorContext");
|
|
47
|
-
const ButtonNative_1 = require("../../components/Button/ButtonNative");
|
|
48
|
-
const DevTools_module_scss_1 = __importDefault(require("./DevTools.module.scss"));
|
|
49
|
-
const react_tabs_1 = require("@radix-ui/react-tabs");
|
|
50
|
-
const bi_1 = require("react-icons/bi");
|
|
51
|
-
const DropdownMenu = __importStar(require("@radix-ui/react-dropdown-menu"));
|
|
52
|
-
const hi_1 = require("react-icons/hi");
|
|
53
|
-
const hi2_1 = require("react-icons/hi2");
|
|
54
|
-
const IconNative_1 = __importDefault(require("../../components/Icon/IconNative"));
|
|
55
|
-
const loader_1 = __importDefault(require("@monaco-editor/loader"));
|
|
56
|
-
const grammar_monacoLanguage_1 = require("../../syntax/monaco/grammar.monacoLanguage");
|
|
57
|
-
const xmluiscript_monacoLanguage_1 = require("../../syntax/monaco/xmluiscript.monacoLanguage");
|
|
58
|
-
const xmlui_light_1 = __importDefault(require("../../syntax/monaco/xmlui-light"));
|
|
59
|
-
const xmlui_dark_1 = __importDefault(require("../../syntax/monaco/xmlui-dark"));
|
|
60
|
-
const DevTools = ({ setIsOpen, node }) => {
|
|
61
|
-
var _a;
|
|
62
|
-
const [side, setSide] = (0, react_2.useState)("bottom");
|
|
63
|
-
const { root, activeThemeTone } = (0, ThemeContext_1.useTheme)();
|
|
64
|
-
const { setDevToolsSize, setDevToolsSide } = (0, InspectorContext_1.useDevTools)();
|
|
65
|
-
const [copied, setCopied] = (0, react_2.useState)(false);
|
|
66
|
-
const monacoEditorInstance = (0, react_1.useRef)(null);
|
|
67
|
-
const editorRef = (0, react_1.useRef)(null);
|
|
68
|
-
const [activeTab, setActiveTab] = (0, react_2.useState)("code");
|
|
69
|
-
const monacoSetupDone = (0, react_1.useRef)(false);
|
|
70
|
-
const copyToClipboard = () => {
|
|
71
|
-
var _a;
|
|
72
|
-
setCopied(true);
|
|
73
|
-
if (monacoEditorInstance === null || monacoEditorInstance === void 0 ? void 0 : monacoEditorInstance.current) {
|
|
74
|
-
const code = (_a = monacoEditorInstance === null || monacoEditorInstance === void 0 ? void 0 : monacoEditorInstance.current) === null || _a === void 0 ? void 0 : _a.getValue();
|
|
75
|
-
navigator.clipboard.writeText(code);
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
const { sources } = (0, react_1.useContext)(InspectorContext_1.InspectorContext);
|
|
79
|
-
const value = (0, react_1.useMemo)(() => {
|
|
80
|
-
var _a;
|
|
81
|
-
const compSrc = (_a = node.debug) === null || _a === void 0 ? void 0 : _a.source;
|
|
82
|
-
if (!compSrc) {
|
|
83
|
-
return "";
|
|
84
|
-
}
|
|
85
|
-
if (!sources) {
|
|
86
|
-
return "";
|
|
87
|
-
}
|
|
88
|
-
const { start, end, fileId } = compSrc;
|
|
89
|
-
const slicedSrc = sources[fileId].slice(start, end);
|
|
90
|
-
let dropEmptyLines = true;
|
|
91
|
-
const prunedLines = [];
|
|
92
|
-
let trimBeginCount = undefined;
|
|
93
|
-
slicedSrc.split("\n").forEach((line) => {
|
|
94
|
-
if (line.trim() === "" && dropEmptyLines) {
|
|
95
|
-
//drop empty lines from the beginning
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
dropEmptyLines = false;
|
|
100
|
-
prunedLines.push(line);
|
|
101
|
-
const startingWhiteSpaces = line.search(/\S|$/);
|
|
102
|
-
if (line.trim() !== "" &&
|
|
103
|
-
(trimBeginCount === undefined || startingWhiteSpaces < trimBeginCount)) {
|
|
104
|
-
trimBeginCount = startingWhiteSpaces;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
return prunedLines.map((line) => line.slice(trimBeginCount)).join("\n");
|
|
109
|
-
}, [(_a = node.debug) === null || _a === void 0 ? void 0 : _a.source, sources]);
|
|
110
|
-
(0, react_1.useEffect)(() => {
|
|
111
|
-
if (activeTab === "code") {
|
|
112
|
-
if (monacoEditorInstance.current) {
|
|
113
|
-
monacoEditorInstance.current.layout();
|
|
114
|
-
}
|
|
115
|
-
else if (editorRef.current) {
|
|
116
|
-
loader_1.default.init().then((monaco) => {
|
|
117
|
-
if (!editorRef.current || monacoEditorInstance.current)
|
|
118
|
-
return;
|
|
119
|
-
if (!monacoSetupDone.current) {
|
|
120
|
-
monaco.languages.register({ id: grammar_monacoLanguage_1.XmluiGrammar.id });
|
|
121
|
-
monaco.languages.setMonarchTokensProvider(grammar_monacoLanguage_1.XmluiGrammar.id, grammar_monacoLanguage_1.XmluiGrammar.language);
|
|
122
|
-
monaco.languages.setLanguageConfiguration(grammar_monacoLanguage_1.XmluiGrammar.id, grammar_monacoLanguage_1.XmluiGrammar.config);
|
|
123
|
-
monaco.languages.register({ id: xmluiscript_monacoLanguage_1.XmluiScripGrammar.id });
|
|
124
|
-
monaco.languages.setMonarchTokensProvider(xmluiscript_monacoLanguage_1.XmluiScripGrammar.id, xmluiscript_monacoLanguage_1.XmluiScripGrammar.language);
|
|
125
|
-
monaco.languages.setLanguageConfiguration(xmluiscript_monacoLanguage_1.XmluiScripGrammar.id, xmluiscript_monacoLanguage_1.XmluiScripGrammar.config);
|
|
126
|
-
monaco.editor.defineTheme("xmlui-light", xmlui_light_1.default);
|
|
127
|
-
monaco.editor.defineTheme("xmlui-dark", xmlui_dark_1.default);
|
|
128
|
-
monacoSetupDone.current = true;
|
|
129
|
-
}
|
|
130
|
-
monaco.editor.setTheme(activeThemeTone === "dark" ? "xmlui-dark" : "xmlui-light");
|
|
131
|
-
monacoEditorInstance.current = monaco.editor.create(editorRef.current, {
|
|
132
|
-
value,
|
|
133
|
-
language: "xmlui",
|
|
134
|
-
readOnly: true,
|
|
135
|
-
scrollBeyondLastLine: false,
|
|
136
|
-
overviewRulerLanes: 0,
|
|
137
|
-
hideCursorInOverviewRuler: true,
|
|
138
|
-
minimap: { enabled: false },
|
|
139
|
-
padding: {
|
|
140
|
-
top: 10,
|
|
141
|
-
bottom: 10
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
return () => {
|
|
148
|
-
if (monacoEditorInstance.current) {
|
|
149
|
-
monacoEditorInstance.current.dispose();
|
|
150
|
-
monacoEditorInstance.current = null;
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
}, [activeTab, activeThemeTone, value]);
|
|
154
|
-
const getInitialSize = (0, react_1.useCallback)(() => {
|
|
155
|
-
switch (side) {
|
|
156
|
-
case "bottom":
|
|
157
|
-
return { width: window.innerWidth, height: 300 };
|
|
158
|
-
case "left":
|
|
159
|
-
case "right":
|
|
160
|
-
return { width: 400, height: window.innerHeight };
|
|
161
|
-
default:
|
|
162
|
-
return { width: 300, height: 300 };
|
|
163
|
-
}
|
|
164
|
-
}, [side]);
|
|
165
|
-
const getInitialPosition = (0, react_1.useCallback)(() => {
|
|
166
|
-
switch (side) {
|
|
167
|
-
case "bottom":
|
|
168
|
-
return { x: 0, y: window.innerHeight - 300 };
|
|
169
|
-
case "left":
|
|
170
|
-
return { x: 0, y: 0 };
|
|
171
|
-
case "right":
|
|
172
|
-
return { x: window.innerWidth - 400, y: 0 };
|
|
173
|
-
default:
|
|
174
|
-
return { x: 0, y: 0 };
|
|
175
|
-
}
|
|
176
|
-
}, [side]);
|
|
177
|
-
const [size, setSize] = (0, react_2.useState)(getInitialSize());
|
|
178
|
-
const [position, setPosition] = (0, react_2.useState)(getInitialPosition());
|
|
179
|
-
(0, react_1.useEffect)(() => {
|
|
180
|
-
if ((monacoEditorInstance === null || monacoEditorInstance === void 0 ? void 0 : monacoEditorInstance.current) && activeTab === "code") {
|
|
181
|
-
monacoEditorInstance.current.layout();
|
|
182
|
-
}
|
|
183
|
-
}, [activeTab, size, position]);
|
|
184
|
-
(0, react_1.useEffect)(() => {
|
|
185
|
-
const handleResize = () => {
|
|
186
|
-
setSize(getInitialSize());
|
|
187
|
-
setPosition(getInitialPosition());
|
|
188
|
-
};
|
|
189
|
-
window.addEventListener("resize", handleResize);
|
|
190
|
-
return () => window.removeEventListener("resize", handleResize);
|
|
191
|
-
}, [getInitialPosition, getInitialSize, side]);
|
|
192
|
-
(0, react_1.useEffect)(() => {
|
|
193
|
-
setPosition(getInitialPosition());
|
|
194
|
-
setSize(getInitialSize());
|
|
195
|
-
}, [getInitialPosition, getInitialSize]);
|
|
196
|
-
(0, react_1.useEffect)(() => {
|
|
197
|
-
setDevToolsSide(side);
|
|
198
|
-
if (side === "bottom") {
|
|
199
|
-
setDevToolsSize(size.height);
|
|
200
|
-
}
|
|
201
|
-
else {
|
|
202
|
-
setDevToolsSize(size.width);
|
|
203
|
-
}
|
|
204
|
-
}, [setDevToolsSide, setDevToolsSize, side, size]);
|
|
205
|
-
return (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(react_rnd_1.Rnd, { className: DevTools_module_scss_1.default.wrapper, size: size, position: position, disableDragging: true, enableResizing: {
|
|
206
|
-
top: side === "bottom",
|
|
207
|
-
right: side === "left",
|
|
208
|
-
left: side === "right",
|
|
209
|
-
}, minWidth: 300, minHeight: 200, maxWidth: window.innerWidth, maxHeight: window.innerHeight, onDragStop: (e, d) => {
|
|
210
|
-
setPosition({ x: d.x, y: d.y });
|
|
211
|
-
}, onResizeStop: (e, direction, ref, delta, position) => {
|
|
212
|
-
setSize({
|
|
213
|
-
width: ref.offsetWidth,
|
|
214
|
-
height: ref.offsetHeight,
|
|
215
|
-
});
|
|
216
|
-
setPosition(position);
|
|
217
|
-
}, bounds: "window", children: (0, jsx_runtime_1.jsxs)(react_tabs_1.Root, { defaultValue: "code", className: DevTools_module_scss_1.default.tabs, style: { width: "100%", height: "100%" }, onValueChange: setActiveTab, children: [(0, jsx_runtime_1.jsxs)(react_tabs_1.List, { className: DevTools_module_scss_1.default.list, children: [(0, jsx_runtime_1.jsxs)("div", { className: DevTools_module_scss_1.default.tabItems, children: [(0, jsx_runtime_1.jsx)(react_tabs_1.Trigger, { value: "code", children: (0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { variant: "ghost", size: "sm", children: "Code" }) }), (0, jsx_runtime_1.jsx)(react_tabs_1.Trigger, { value: "console", children: (0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { variant: "ghost", size: "sm", children: "Console" }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: DevTools_module_scss_1.default.actions, children: [(0, jsx_runtime_1.jsxs)(DropdownMenu.Root, { children: [(0, jsx_runtime_1.jsx)(DropdownMenu.Trigger, { children: (0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { variant: "ghost", size: "xs", children: (0, jsx_runtime_1.jsx)(hi_1.HiOutlineDotsVertical, { color: "currentColor" }) }) }), (0, jsx_runtime_1.jsx)(DropdownMenu.Portal, { container: root, children: (0, jsx_runtime_1.jsx)(DropdownMenu.Content, { className: DevTools_module_scss_1.default.menu, children: (0, jsx_runtime_1.jsxs)(DropdownMenu.Item, { className: DevTools_module_scss_1.default.menuItem, children: ["Dock side", (0, jsx_runtime_1.jsxs)("div", { className: DevTools_module_scss_1.default.sideButtons, children: [(0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { style: { padding: 8 }, onClick: () => {
|
|
218
|
-
setSide("left");
|
|
219
|
-
}, variant: "ghost", children: (0, jsx_runtime_1.jsx)(bi_1.BiDockLeft, { color: "currentColor", size: 16 }) }), (0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { style: { padding: 8 }, onClick: () => {
|
|
220
|
-
setSide("bottom");
|
|
221
|
-
}, variant: "ghost", children: (0, jsx_runtime_1.jsx)(bi_1.BiDockBottom, { color: "currentColor", size: 16 }) }), (0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { style: { padding: 8 }, onClick: () => {
|
|
222
|
-
setSide("right");
|
|
223
|
-
}, variant: "ghost", children: (0, jsx_runtime_1.jsx)(bi_1.BiDockRight, { color: "currentColor", size: 16 }) })] })] }) }) })] }), (0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { onClick: () => setIsOpen(false), size: "xs", variant: "ghost", icon: (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: "close" }) })] })] }), (0, jsx_runtime_1.jsxs)(react_tabs_1.Content, { value: "code", className: DevTools_module_scss_1.default.content, children: [(0, jsx_runtime_1.jsx)("div", { ref: editorRef, className: DevTools_module_scss_1.default.xmluiEditor }), (0, jsx_runtime_1.jsx)("div", { className: DevTools_module_scss_1.default.copyButton, children: (0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { onClick: copyToClipboard, variant: "solid", themeColor: "secondary", style: { padding: 8 }, size: "sm", children: copied ? ((0, jsx_runtime_1.jsx)(hi2_1.HiOutlineClipboardDocumentCheck, { size: 16 })) : ((0, jsx_runtime_1.jsx)(hi2_1.HiOutlineClipboardDocument, { size: 16 })) }) })] }), (0, jsx_runtime_1.jsx)(react_tabs_1.Content, { value: "console", className: DevTools_module_scss_1.default.content, children: "Debug console" })] }) }), root);
|
|
224
|
-
};
|
|
225
|
-
exports.DevTools = DevTools;
|
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.XmluiGrammar = void 0;
|
|
4
|
-
exports.XmluiGrammar = {
|
|
5
|
-
id: "xmlui",
|
|
6
|
-
config: {
|
|
7
|
-
comments: {
|
|
8
|
-
blockComment: ["<!--", "-->"],
|
|
9
|
-
},
|
|
10
|
-
brackets: [["<", ">"]],
|
|
11
|
-
autoClosingPairs: [
|
|
12
|
-
{ open: "<", close: ">" },
|
|
13
|
-
{ open: "'", close: "'" },
|
|
14
|
-
{ open: '"', close: '"' },
|
|
15
|
-
{ open: "`", close: "`" },
|
|
16
|
-
],
|
|
17
|
-
surroundingPairs: [
|
|
18
|
-
{ open: "<", close: ">" },
|
|
19
|
-
{ open: "'", close: "'" },
|
|
20
|
-
{ open: '"', close: '"' },
|
|
21
|
-
{ open: "`", close: "`" },
|
|
22
|
-
],
|
|
23
|
-
},
|
|
24
|
-
language: {
|
|
25
|
-
defaultToken: "",
|
|
26
|
-
tokenPostfix: ".xmlui",
|
|
27
|
-
ignoreCase: false,
|
|
28
|
-
identifier: /[a-zA-Z$_][-\w.$]*/,
|
|
29
|
-
tokenizer: {
|
|
30
|
-
root: [
|
|
31
|
-
{ include: "@commentStart" },
|
|
32
|
-
{ include: "@helperTag" },
|
|
33
|
-
{ include: "@componentTagStart" },
|
|
34
|
-
{ include: "@escapeCharacter" },
|
|
35
|
-
{ include: "@textWithBindingExpr" },
|
|
36
|
-
{ include: "@entity" },
|
|
37
|
-
{ include: "@cdataStart" },
|
|
38
|
-
],
|
|
39
|
-
helperTag: [
|
|
40
|
-
{ include: "@scriptTagStart" },
|
|
41
|
-
{ include: "@eventTagStart" },
|
|
42
|
-
{ include: "@apiTagStart" },
|
|
43
|
-
{ include: "@methodTagStart" },
|
|
44
|
-
{ include: "@propOrVarTagStart" },
|
|
45
|
-
],
|
|
46
|
-
eventTagStart: [
|
|
47
|
-
[
|
|
48
|
-
/(<)((?:[a-zA-Z_][\w\.\-]*?:)?)(event)/,
|
|
49
|
-
["delimiter.angle", "namespace", { token: "tag-event", next: "@eventTag" }],
|
|
50
|
-
],
|
|
51
|
-
],
|
|
52
|
-
eventTag: [
|
|
53
|
-
{ include: "@commentStart" },
|
|
54
|
-
{ include: "@valueAttributeScriptInsideStart" },
|
|
55
|
-
{ include: "@attributeStart" },
|
|
56
|
-
[/\/>/, "delimiter.angle", "@pop"],
|
|
57
|
-
[
|
|
58
|
-
/(<\/)(event)(\s*>)/,
|
|
59
|
-
["delimiter.angle", "tag-event", { token: "delimiter.angle", next: "@pop" }],
|
|
60
|
-
],
|
|
61
|
-
[/>/, { token: "delimiter.angle", next: "@eventTagContent" }],
|
|
62
|
-
],
|
|
63
|
-
eventTagContent: [
|
|
64
|
-
{ include: "commentStart" },
|
|
65
|
-
{ include: "componentTagStart" },
|
|
66
|
-
[
|
|
67
|
-
/[^<]/,
|
|
68
|
-
{ token: "@rematch", next: "@eventTagScriptContent", nextEmbedded: "xmluiscript" },
|
|
69
|
-
],
|
|
70
|
-
[/<\/event\s*>/, { token: "@rematch", next: "@pop" }],
|
|
71
|
-
],
|
|
72
|
-
eventTagScriptContent: [
|
|
73
|
-
[/<\/event\s*>/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }],
|
|
74
|
-
[/[^<]/, ""],
|
|
75
|
-
],
|
|
76
|
-
methodTagStart: [
|
|
77
|
-
[
|
|
78
|
-
/(<)((?:[a-zA-Z_][\w\.\-]*?:)?)(method)/,
|
|
79
|
-
["delimiter.angle", "namespace", { token: "tag-helper", next: "@methodTag" }],
|
|
80
|
-
],
|
|
81
|
-
],
|
|
82
|
-
methodTag: [
|
|
83
|
-
{ include: "@commentStart" },
|
|
84
|
-
{ include: "@valueAttributeScriptInsideStart" },
|
|
85
|
-
{ include: "@attributeStart" },
|
|
86
|
-
[/\/>/, "delimiter.angle", "@pop"],
|
|
87
|
-
[
|
|
88
|
-
/>/,
|
|
89
|
-
{
|
|
90
|
-
token: "delimiter.angle",
|
|
91
|
-
next: "@methodTagScriptContent",
|
|
92
|
-
nextEmbedded: "xmluiscript",
|
|
93
|
-
},
|
|
94
|
-
],
|
|
95
|
-
[
|
|
96
|
-
/(<\/)(method)(\s*>)/,
|
|
97
|
-
["delimiter.angle", "tag-helper", { token: "delimiter.angle", next: "@pop" }],
|
|
98
|
-
],
|
|
99
|
-
],
|
|
100
|
-
methodTagScriptContent: [
|
|
101
|
-
[/<\/method\s*>/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }],
|
|
102
|
-
[/[^</]/, ""],
|
|
103
|
-
],
|
|
104
|
-
apiTagStart: [
|
|
105
|
-
[
|
|
106
|
-
/(<)((?:[a-zA-Z_][\w\.\-]*?:)?)(api)/,
|
|
107
|
-
["delimiter.angle", "namespace", { token: "tag-helper", next: "@apiTag" }],
|
|
108
|
-
],
|
|
109
|
-
],
|
|
110
|
-
apiTag: [
|
|
111
|
-
{ include: "@commentStart" },
|
|
112
|
-
{ include: "@valueAttributeScriptInsideStart" },
|
|
113
|
-
{ include: "@attributeStart" },
|
|
114
|
-
[/\/>/, "delimiter.angle", "@pop"],
|
|
115
|
-
[
|
|
116
|
-
/>/,
|
|
117
|
-
{ token: "delimiter.angle", next: "@apiTagScriptContent", nextEmbedded: "xmluiscript" },
|
|
118
|
-
],
|
|
119
|
-
[
|
|
120
|
-
/(<\/)(api)(\s*>)/,
|
|
121
|
-
["delimiter.angle", "tag-helper", { token: "delimiter.angle", next: "@pop" }],
|
|
122
|
-
],
|
|
123
|
-
],
|
|
124
|
-
apiTagScriptContent: [
|
|
125
|
-
[/<\/api\s*>/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }],
|
|
126
|
-
[/[^</]/, ""],
|
|
127
|
-
],
|
|
128
|
-
valueAttributeScriptInsideStart: [
|
|
129
|
-
[
|
|
130
|
-
/(^|\s+)(value)(\s*=)(['\"`])/,
|
|
131
|
-
[
|
|
132
|
-
"",
|
|
133
|
-
"attribute",
|
|
134
|
-
"operators",
|
|
135
|
-
{
|
|
136
|
-
cases: {
|
|
137
|
-
"'": { token: "string", next: "@singleQuotedScript", nextEmbedded: "xmluiscript" },
|
|
138
|
-
'"': { token: "string", next: "@doubleQuotedScript", nextEmbedded: "xmluiscript" },
|
|
139
|
-
"`": {
|
|
140
|
-
token: "string",
|
|
141
|
-
next: "@backtickQuotedScript",
|
|
142
|
-
nextEmbedded: "xmluiscript",
|
|
143
|
-
},
|
|
144
|
-
},
|
|
145
|
-
},
|
|
146
|
-
],
|
|
147
|
-
],
|
|
148
|
-
],
|
|
149
|
-
scriptTagStart: [
|
|
150
|
-
[
|
|
151
|
-
/(<)(script\s*)(>)/,
|
|
152
|
-
[
|
|
153
|
-
"delimiter.angle",
|
|
154
|
-
"tag-script",
|
|
155
|
-
{ token: "delimiter.angle", nextEmbedded: "xmluiscript", next: "@scriptTag" },
|
|
156
|
-
],
|
|
157
|
-
],
|
|
158
|
-
[/(<\/)(script\s*)(>)/, ["delimiter.angle", "tag-script", "delimiter.angle"]],
|
|
159
|
-
],
|
|
160
|
-
scriptTag: [
|
|
161
|
-
[/<\/script>/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }],
|
|
162
|
-
[/[^<]+/, ""],
|
|
163
|
-
],
|
|
164
|
-
propOrVarTagStart: [
|
|
165
|
-
[
|
|
166
|
-
/(<\/?)((?:[a-zA-Z_][\w\.\-]*?:)?)((?:property)|(?:prop)|(?:var))/,
|
|
167
|
-
["delimiter.angle", "namespace", { token: "tag-helper", next: "@propOrVarTag" }],
|
|
168
|
-
],
|
|
169
|
-
],
|
|
170
|
-
propOrVarTag: [
|
|
171
|
-
[/\/?>/, { token: "delimiter.angle", next: "@pop" }],
|
|
172
|
-
{ include: "@commentStart" },
|
|
173
|
-
{ include: "@attributeStart" },
|
|
174
|
-
],
|
|
175
|
-
componentTagStart: [
|
|
176
|
-
[
|
|
177
|
-
/(\s*<\/?)((?:[a-zA-Z_][\w\.\-]*?:)?)([A-Z][\w\.\-]*)/,
|
|
178
|
-
["delimiter.angle", "namespace", { token: "tag-component", next: "@componentTag" }],
|
|
179
|
-
],
|
|
180
|
-
],
|
|
181
|
-
componentTag: [
|
|
182
|
-
[/\/?>/, { token: "delimiter.angle", next: "@pop" }],
|
|
183
|
-
{ include: "@commentStart" },
|
|
184
|
-
{ include: "@eventHandler" },
|
|
185
|
-
{ include: "@attributeStart" },
|
|
186
|
-
],
|
|
187
|
-
eventHandler: [
|
|
188
|
-
[
|
|
189
|
-
/(^|\s+)(on[A-Z][-\w.]*)(\s*=)(['\"`])/,
|
|
190
|
-
[
|
|
191
|
-
"",
|
|
192
|
-
"attribute",
|
|
193
|
-
"operators",
|
|
194
|
-
{
|
|
195
|
-
cases: {
|
|
196
|
-
"'": { token: "string", next: "@singleQuotedScript", nextEmbedded: "xmluiscript" },
|
|
197
|
-
'"': { token: "string", next: "@doubleQuotedScript", nextEmbedded: "xmluiscript" },
|
|
198
|
-
"`": {
|
|
199
|
-
token: "string",
|
|
200
|
-
next: "@backtickQuotedScript",
|
|
201
|
-
nextEmbedded: "xmluiscript",
|
|
202
|
-
},
|
|
203
|
-
},
|
|
204
|
-
},
|
|
205
|
-
],
|
|
206
|
-
],
|
|
207
|
-
],
|
|
208
|
-
doubleQuotedScript: [
|
|
209
|
-
[/"/, { token: "string", next: "@pop", nextEmbedded: "@pop" }],
|
|
210
|
-
[/[^"]/, ""],
|
|
211
|
-
],
|
|
212
|
-
singleQuotedScript: [
|
|
213
|
-
[/'/, { token: "string", next: "@pop", nextEmbedded: "@pop" }],
|
|
214
|
-
[/[^']/, ""],
|
|
215
|
-
],
|
|
216
|
-
backtickQuotedScript: [
|
|
217
|
-
[/`/, { token: "string", next: "@pop", nextEmbedded: "@pop" }],
|
|
218
|
-
[/[^`]/, ""],
|
|
219
|
-
],
|
|
220
|
-
attributeStart: [
|
|
221
|
-
[
|
|
222
|
-
/(^|\s+)(@identifier(?::@identifier)?)(\s*=\s*)(['\"`])/,
|
|
223
|
-
[
|
|
224
|
-
"",
|
|
225
|
-
"attribute",
|
|
226
|
-
"operators",
|
|
227
|
-
{
|
|
228
|
-
cases: {
|
|
229
|
-
"'": { token: "string", next: "@singleQuotedString" },
|
|
230
|
-
'"': { token: "string", next: "@doubleQuotedString" },
|
|
231
|
-
"`": { token: "string", next: "@backtickQuotedString" },
|
|
232
|
-
},
|
|
233
|
-
},
|
|
234
|
-
],
|
|
235
|
-
],
|
|
236
|
-
[
|
|
237
|
-
/(^|\s+)(@identifier(?::@identifier)?)(\s*=\s*)(@identifier)/,
|
|
238
|
-
["", "attribute", "operators", "string"],
|
|
239
|
-
],
|
|
240
|
-
[/(^|\s+)(@identifier(?::@identifier)?)/, ["", "attribute"]],
|
|
241
|
-
],
|
|
242
|
-
singleQuotedString: [
|
|
243
|
-
[/'/, "string", "@pop"],
|
|
244
|
-
{ include: "@textWithBindingExpr" },
|
|
245
|
-
[/[^']/, "string"],
|
|
246
|
-
],
|
|
247
|
-
doubleQuotedString: [
|
|
248
|
-
[/"/, "string", "@pop"],
|
|
249
|
-
{ include: "@textWithBindingExpr" },
|
|
250
|
-
[/[^"]/, "string"],
|
|
251
|
-
],
|
|
252
|
-
backtickQuotedString: [
|
|
253
|
-
[/`/, "string", "@pop"],
|
|
254
|
-
{ include: "@textWithBindingExpr" },
|
|
255
|
-
[/[^`]/, "string"],
|
|
256
|
-
],
|
|
257
|
-
textWithBindingExpr: [
|
|
258
|
-
{ include: "@escapeCharacter" },
|
|
259
|
-
{ include: "@entity" },
|
|
260
|
-
[/{/, { token: "delimiter.curly", next: "@bindingExpr", nextEmbedded: "xmluiscript" }],
|
|
261
|
-
],
|
|
262
|
-
bindingExpr: [
|
|
263
|
-
[/}/, { token: "delimiter.curly", next: "@pop", nextEmbedded: "@pop" }],
|
|
264
|
-
[/[^}]+/, ""],
|
|
265
|
-
],
|
|
266
|
-
cdataStart: [
|
|
267
|
-
[
|
|
268
|
-
/(<!\[)(CDATA)(\[)/,
|
|
269
|
-
["delimiter.angle", "tag-cdata", { token: "delimiter.angle", next: "@cdata" }],
|
|
270
|
-
],
|
|
271
|
-
],
|
|
272
|
-
cdata: [
|
|
273
|
-
[/]]>/, "delimiter.angle", "@pop"],
|
|
274
|
-
[/./, "string"],
|
|
275
|
-
],
|
|
276
|
-
commentStart: [[/<!--/, "comment", "@comment"]],
|
|
277
|
-
comment: [
|
|
278
|
-
[/[^<\-]+/, "comment.content"],
|
|
279
|
-
[/-->/, { token: "comment", next: "@pop" }],
|
|
280
|
-
[/[<\-]/, "comment.content"],
|
|
281
|
-
],
|
|
282
|
-
escapeCharacter: [[/\\S/, "string.escape"]],
|
|
283
|
-
entity: [[/&(amp|lt|gt|quot|apos|nbsp);/, "string.escape"]],
|
|
284
|
-
},
|
|
285
|
-
},
|
|
286
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const darkTheme = {
|
|
4
|
-
base: "vs-dark",
|
|
5
|
-
inherit: true,
|
|
6
|
-
rules: [
|
|
7
|
-
{ token: "comment", foreground: "#4E4E4E" },
|
|
8
|
-
{ token: "comment.content", foreground: "#4E4E4E" },
|
|
9
|
-
{ token: "tag-component", foreground: "#F07100" },
|
|
10
|
-
{ token: "tag-event", foreground: "#3572F6" },
|
|
11
|
-
{ token: "tag-helper", foreground: "#3572F6" },
|
|
12
|
-
{ token: "attribute", foreground: "#C79B00" },
|
|
13
|
-
{ token: "operators", foreground: "#7235C7" },
|
|
14
|
-
{ token: "delimiter.angle", foreground: "#66748E" },
|
|
15
|
-
{ token: "delimiter.curly", foreground: "#000000" },
|
|
16
|
-
{ token: "string", foreground: "#497A48" },
|
|
17
|
-
{ token: "tag-cdata", foreground: "#1BADFF" },
|
|
18
|
-
{ token: "tag-script", foreground: "#0CA6A6" },
|
|
19
|
-
{ token: "string.escape", foreground: "#1BB95A" },
|
|
20
|
-
{ token: "constant", foreground: "#FF00E8" },
|
|
21
|
-
],
|
|
22
|
-
colors: {
|
|
23
|
-
"editor.background": "#17232b",
|
|
24
|
-
"editor.foreground": "#497A48",
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
exports.default = darkTheme;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const lightTheme = {
|
|
4
|
-
base: "vs",
|
|
5
|
-
inherit: true,
|
|
6
|
-
rules: [
|
|
7
|
-
{ token: "comment", foreground: "#4E4E4E" },
|
|
8
|
-
{ token: "comment.content", foreground: "#4E4E4E" },
|
|
9
|
-
{ token: "tag-component", foreground: "#F07100" },
|
|
10
|
-
{ token: "tag-event", foreground: "#3572F6" },
|
|
11
|
-
{ token: "tag-helper", foreground: "#3572F6" },
|
|
12
|
-
{ token: "attribute", foreground: "#C79B00" },
|
|
13
|
-
{ token: "operators", foreground: "#7235C7" },
|
|
14
|
-
{ token: "delimiter.angle", foreground: "#66748E" },
|
|
15
|
-
{ token: "delimiter.curly", foreground: "#000000" },
|
|
16
|
-
{ token: "string", foreground: "#497A48" },
|
|
17
|
-
{ token: "tag-cdata", foreground: "#1BADFF" },
|
|
18
|
-
{ token: "tag-script", foreground: "#0CA6A6" },
|
|
19
|
-
{ token: "string.escape", foreground: "#1BB95A" },
|
|
20
|
-
{ token: "constant", foreground: "#FF00E8" },
|
|
21
|
-
],
|
|
22
|
-
colors: {
|
|
23
|
-
"editor.foreground": "#497A48",
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
exports.default = lightTheme;
|