xmlui 0.10.13 → 0.10.15
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/lib/{index-Db5iQkFp.mjs → index-axjeT2uJ.mjs} +1626 -1080
- package/dist/lib/index.css +1 -1
- package/dist/lib/{initMock-B9LtmFJG.mjs → initMock-BoTWMs19.mjs} +1 -1
- package/dist/lib/language-server-web-worker.mjs +1 -1
- package/dist/lib/language-server.mjs +1 -1
- package/dist/lib/{metadata-utils-D90qqMGc.mjs → metadata-utils-CtY0QcvH.mjs} +2 -1
- package/dist/lib/{server-common-lmBDLpUh.mjs → server-common-Cine5nRR.mjs} +1 -1
- package/dist/lib/xmlui.d.ts +99 -6
- package/dist/lib/xmlui.mjs +78 -42
- package/dist/metadata/{collectedComponentMetadata-BN8eg9Gr.mjs → collectedComponentMetadata-CQywuPDB.mjs} +17448 -16984
- package/dist/metadata/{initMock-J7pN8owj.mjs → initMock-Bi5kF5Af.mjs} +1 -1
- package/dist/metadata/style.css +1 -1
- package/dist/metadata/xmlui-metadata.mjs +1 -1
- package/dist/metadata/xmlui-metadata.umd.js +3 -3
- package/dist/scripts/bin/build-lib.js +21 -13
- package/dist/scripts/bin/viteConfig.js +3 -1
- package/dist/scripts/package.json +2 -3
- package/dist/scripts/src/abstractions/scripting/Token.js +2 -0
- package/dist/scripts/src/abstractions/scripting/TryScope.js +2 -0
- package/dist/scripts/src/abstractions/scripting/modules.js +2 -0
- package/dist/scripts/src/components/APICall/APICall.spec.js +910 -0
- package/dist/scripts/src/components/Accordion/Accordion.spec.js +969 -0
- package/dist/scripts/src/components/Animation/Animation.js +50 -0
- package/dist/scripts/src/components/App/App.spec.js +219 -0
- package/dist/scripts/src/components/AppHeader/AppHeader.spec.js +169 -0
- package/dist/scripts/src/components/AppState/AppState.js +32 -2
- package/dist/scripts/src/components/AppState/AppState.spec.js +268 -0
- package/dist/scripts/src/components/AppState/AppStateNative.js +27 -3
- package/dist/scripts/src/components/AutoComplete/AutoComplete.spec.js +383 -0
- package/dist/scripts/src/components/Avatar/Avatar.spec.js +1543 -0
- package/dist/scripts/src/components/Backdrop/Backdrop.spec.js +131 -0
- package/dist/scripts/src/components/Badge/Badge.spec.js +2214 -0
- package/dist/scripts/src/components/Bookmark/Bookmark.spec.js +230 -0
- package/dist/scripts/src/components/Breakout/Breakout.spec.js +56 -0
- package/dist/scripts/src/components/Button/Button-style.spec.js +274 -0
- package/dist/scripts/src/components/Button/Button.js +5 -1
- package/dist/scripts/src/components/Button/Button.spec.js +454 -0
- package/dist/scripts/src/components/Card/Card.spec.js +150 -0
- package/dist/scripts/src/components/Carousel/Carousel.spec.js +343 -0
- package/dist/scripts/src/components/Carousel/CarouselNative.js +2 -2
- package/dist/scripts/src/components/ChangeListener/ChangeListener.spec.js +169 -0
- package/dist/scripts/src/components/Charts/AreaChart/AreaChart.spec.js +999 -0
- package/dist/scripts/src/components/Charts/BarChart/BarChart.spec.js +597 -0
- package/dist/scripts/src/components/Charts/DonutChart/DonutChart.spec.js +608 -0
- package/dist/scripts/src/components/Charts/LabelList/LabelList.spec.js +539 -0
- package/dist/scripts/src/components/Charts/Legend/Legend.spec.js +558 -0
- package/dist/scripts/src/components/Charts/LineChart/LineChart.spec.js +450 -0
- package/dist/scripts/src/components/Charts/PieChart/PieChart.spec.js +584 -0
- package/dist/scripts/src/components/Charts/PieChart/PieChartNative.js +41 -2
- package/dist/scripts/src/components/Charts/RadarChart/RadarChart.spec.js +571 -0
- package/dist/scripts/src/components/Charts/Tooltip/TooltipContent.spec.js +449 -0
- package/dist/scripts/src/components/Checkbox/Checkbox.spec.js +964 -0
- package/dist/scripts/src/components/CodeBlock/CodeBlock.spec.js +196 -0
- package/dist/scripts/src/components/ColorPicker/ColorPicker.spec.js +283 -0
- package/dist/scripts/src/components/ColorPicker/ColorPickerNative.js +9 -26
- package/dist/scripts/src/components/Column/doc-resources/list-component-data.js +53 -0
- package/dist/scripts/src/components/ComponentProvider.js +6 -2
- package/dist/scripts/src/components/ContentSeparator/ContentSeparator.spec.js +338 -0
- package/dist/scripts/src/components/DateInput/DateInput.spec.js +918 -0
- package/dist/scripts/src/components/DatePicker/DatePicker.spec.js +362 -0
- package/dist/scripts/src/components/DatePicker/DatePickerNative.js +3 -3
- package/dist/scripts/src/components/DropdownMenu/DropdownMenu.spec.js +331 -0
- package/dist/scripts/src/components/DropdownMenu/DropdownMenuNative.js +7 -9
- package/dist/scripts/src/components/EmojiSelector/EmojiSelector.spec.js +29 -0
- package/dist/scripts/src/components/ExpandableItem/ExpandableItem.spec.js +435 -0
- package/dist/scripts/src/components/FileInput/FileInput.spec.js +249 -0
- package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZone.spec.js +296 -0
- package/dist/scripts/src/components/FlowLayout/FlowLayout.spec.js +518 -0
- package/dist/scripts/src/components/Footer/Footer.spec.js +991 -0
- package/dist/scripts/src/components/Form/Form.spec.js +1257 -0
- package/dist/scripts/src/components/FormItem/FormItem.spec.js +723 -0
- package/dist/scripts/src/components/FormItem/ItemWithLabel.js +3 -3
- package/dist/scripts/src/components/FormSection/FormSection.js +6 -31
- package/dist/scripts/src/components/Fragment/Fragment.spec.js +50 -0
- package/dist/scripts/src/components/Heading/H1.spec.js +66 -0
- package/dist/scripts/src/components/Heading/H2.spec.js +66 -0
- package/dist/scripts/src/components/Heading/H3.spec.js +66 -0
- package/dist/scripts/src/components/Heading/H4.spec.js +66 -0
- package/dist/scripts/src/components/Heading/H5.spec.js +66 -0
- package/dist/scripts/src/components/Heading/H6.spec.js +66 -0
- package/dist/scripts/src/components/Heading/Heading.spec.js +897 -0
- package/dist/scripts/src/components/HtmlTags/HtmlTags.spec.js +69 -0
- package/dist/scripts/src/components/IFrame/IFrame.spec.js +527 -0
- package/dist/scripts/src/components/Icon/ArrowDropDown.js +11 -0
- package/dist/scripts/src/components/Icon/ArrowDropUp.js +11 -0
- package/dist/scripts/src/components/Icon/ArrowLeft.js +11 -0
- package/dist/scripts/src/components/Icon/ArrowRight.js +11 -0
- package/dist/scripts/src/components/Icon/ChevronDownIcon.js +7 -0
- package/dist/scripts/src/components/Icon/ChevronUpIcon.js +7 -0
- package/dist/scripts/src/components/Icon/Icon.spec.js +527 -0
- package/dist/scripts/src/components/Icon/SunIcon.js +10 -0
- package/dist/scripts/src/components/Image/Image.js +2 -1
- package/dist/scripts/src/components/Image/Image.spec.js +198 -0
- package/dist/scripts/src/components/Image/ImageNative.js +30 -2
- package/dist/scripts/src/components/Input/InputLabel.js +25 -0
- package/dist/scripts/src/components/Input/index.js +5 -0
- package/dist/scripts/src/components/Items/Items.spec.js +397 -0
- package/dist/scripts/src/components/Link/Link.spec.js +894 -0
- package/dist/scripts/src/components/List/List.spec.js +927 -0
- package/dist/scripts/src/components/List/doc-resources/list-component-data.js +53 -0
- package/dist/scripts/src/components/Markdown/Markdown.spec.js +188 -0
- package/dist/scripts/src/components/ModalDialog/ModalDialog.spec.js +162 -0
- package/dist/scripts/src/components/NavGroup/NavGroup.spec.js +212 -0
- package/dist/scripts/src/components/NavGroup/NavGroupNative.js +15 -7
- package/dist/scripts/src/components/NavLink/NavLink.spec.js +864 -0
- package/dist/scripts/src/components/NavPanel/NavPanel.spec.js +864 -0
- package/dist/scripts/src/components/NoResult/NoResult.spec.js +863 -0
- package/dist/scripts/src/components/NumberBox/NumberBox.spec.js +1237 -0
- package/dist/scripts/src/components/Option/Option.spec.js +472 -0
- package/dist/scripts/src/components/PageMetaTitle/PageMetaTitle.spec.js +80 -0
- package/dist/scripts/src/components/Pagination/Pagination.spec.js +1003 -0
- package/dist/scripts/src/components/ProfileMenu/ProfileMenu.js +20 -0
- package/dist/scripts/src/components/ProgressBar/ProgressBar.spec.js +166 -0
- package/dist/scripts/src/components/Queue/Queue.spec.js +626 -0
- package/dist/scripts/src/components/RadioGroup/RadioGroup.spec.js +479 -0
- package/dist/scripts/src/components/Redirect/Redirect.spec.js +527 -0
- package/dist/scripts/src/components/ResponsiveBar/ResponsiveBar.spec.js +76 -0
- package/dist/scripts/src/components/Select/Select.spec.js +527 -0
- package/dist/scripts/src/components/SelectionStore/SelectionStoreNative.js +3 -1
- package/dist/scripts/src/components/Slider/Slider.js +2 -0
- package/dist/scripts/src/components/Slider/Slider.spec.js +574 -0
- package/dist/scripts/src/components/Slider/SliderNative.js +63 -26
- package/dist/scripts/src/components/Slot/Slot.spec.js +368 -0
- package/dist/scripts/src/components/SpaceFiller/SpaceFiller.spec.js +184 -0
- package/dist/scripts/src/components/Spinner/Spinner.spec.js +161 -0
- package/dist/scripts/src/components/Splitter/HSplitter.spec.js +104 -0
- package/dist/scripts/src/components/Splitter/Splitter.spec.js +543 -0
- package/dist/scripts/src/components/Splitter/VSplitter.spec.js +104 -0
- package/dist/scripts/src/components/Stack/CHStack.spec.js +86 -0
- package/dist/scripts/src/components/Stack/CVStack.spec.js +86 -0
- package/dist/scripts/src/components/Stack/HStack.spec.js +67 -0
- package/dist/scripts/src/components/Stack/Stack.spec.js +654 -0
- package/dist/scripts/src/components/Stack/VStack.spec.js +67 -0
- package/dist/scripts/src/components/Switch/Switch.spec.js +829 -0
- package/dist/scripts/src/components/Table/Table.js +7 -1
- package/dist/scripts/src/components/Table/Table.spec.js +555 -0
- package/dist/scripts/src/components/Table/TableNative.js +4 -1
- package/dist/scripts/src/components/Table/doc-resources/list-component-data.js +53 -0
- package/dist/scripts/src/components/Table/useRowSelection.js +215 -1
- package/dist/scripts/src/components/TableOfContents/TableOfContents.spec.js +838 -0
- package/dist/scripts/src/components/Tabs/Tabs.spec.js +875 -0
- package/dist/scripts/src/components/Text/Text.spec.js +1075 -0
- package/dist/scripts/src/components/TextArea/TextArea.spec.js +714 -0
- package/dist/scripts/src/components/TextBox/TextBox.js +1 -5
- package/dist/scripts/src/components/TextBox/TextBox.spec.js +687 -0
- package/dist/scripts/src/components/TextBox/TextBoxNative.js +10 -15
- package/dist/scripts/src/components/Theme/Theme.spec.js +124 -0
- package/dist/scripts/src/components/Theme/ThemeNative.js +2 -6
- package/dist/scripts/src/components/TimeInput/TimeInput.js +1 -5
- package/dist/scripts/src/components/TimeInput/TimeInput.spec.js +1122 -0
- package/dist/scripts/src/components/TimeInput/TimeInputNative.js +2 -9
- package/dist/scripts/src/components/Timer/Timer.spec.js +358 -0
- package/dist/scripts/src/components/ToneChangerButton/ToneChangerButton.spec.js +414 -0
- package/dist/scripts/src/components/ToneSwitch/ToneSwitch.spec.js +89 -0
- package/dist/scripts/src/components/Tooltip/Tooltip.spec.js +418 -0
- package/dist/scripts/src/components/chart-color-schemes.js +43 -0
- package/dist/scripts/src/components-core/ApiBoundComponent.js +38 -24
- package/dist/scripts/src/components-core/CompoundComponent.js +1 -1
- package/dist/scripts/src/components-core/RestApiProxy.js +84 -8
- package/dist/scripts/src/components-core/behaviors/BehaviorContext.js +54 -0
- package/dist/scripts/src/components-core/behaviors/CoreBehaviors.js +80 -0
- package/dist/scripts/src/components-core/descriptorHelper.js +1 -0
- package/dist/scripts/src/components-core/devtools/InspectorDialogVisibilityContext.js +8 -0
- package/dist/scripts/src/components-core/parts.js +4 -1
- package/dist/scripts/src/components-core/renderers.js +31 -0
- package/dist/scripts/src/components-core/rendering/AppRoot.js +2 -1
- package/dist/scripts/src/components-core/rendering/ComponentAdapter.js +31 -46
- package/dist/scripts/src/components-core/rendering/nodeUtils.js +6 -0
- package/dist/scripts/src/components-core/script-runner/simplify-expression.js +386 -0
- package/dist/scripts/src/components-core/theming/component-layout-resolver.js +153 -0
- package/dist/scripts/src/components-core/theming/layout-resolver.js +2 -0
- package/dist/scripts/src/components-core/theming/parse-layout-props.js +98 -0
- package/dist/scripts/src/components-core/theming/themes/solid.js +16 -0
- package/dist/scripts/src/components-core/utils/audio-utils.js +83 -0
- package/dist/scripts/src/index-standalone.js +61 -0
- package/dist/scripts/src/index.js +39 -1
- package/dist/scripts/src/language-server/server-common.js +151 -0
- package/dist/scripts/src/language-server/server-web-worker.js +47 -0
- package/dist/scripts/src/language-server/server.js +42 -0
- package/dist/scripts/src/language-server/services/common/docs-generation.js +73 -0
- package/dist/scripts/src/language-server/services/common/lsp-utils.js +9 -0
- package/dist/scripts/src/language-server/services/common/syntax-node-utilities.js +135 -0
- package/dist/scripts/src/language-server/services/completion.js +270 -0
- package/dist/scripts/src/language-server/services/diagnostic.js +19 -0
- package/dist/scripts/src/language-server/services/format.js +430 -0
- package/dist/scripts/src/language-server/services/hover.js +164 -0
- package/dist/scripts/src/language-server/xmlui-metadata-generated.mjs +16266 -0
- package/dist/scripts/src/logging/xmlui.js +21 -0
- package/dist/scripts/src/parsers/common/utils.js +19 -0
- package/dist/scripts/src/syntax/monaco/grammar.monacoLanguage.js +286 -0
- package/dist/scripts/src/syntax/monaco/index.js +14 -0
- package/dist/scripts/src/syntax/monaco/xmlui-dark.js +25 -0
- package/dist/scripts/src/syntax/monaco/xmlui-light.js +25 -0
- package/dist/scripts/src/syntax/monaco/xmluiscript.monacoLanguage.js +310 -0
- package/dist/scripts/src/syntax/textMate/index.js +14 -0
- package/dist/scripts/src/syntax/textMate/xmlui-dark.json +631 -0
- package/dist/scripts/src/syntax/textMate/xmlui-light.json +565 -0
- package/dist/scripts/src/syntax/textMate/xmlui.json +564 -0
- package/dist/scripts/src/syntax/textMate/xmlui.tmLanguage.json +341 -0
- package/dist/scripts/src/testing/ComponentDrivers.js +1327 -0
- package/dist/scripts/src/testing/assertions.js +444 -0
- package/dist/scripts/src/testing/component-test-helpers.js +389 -0
- package/dist/scripts/src/testing/drivers/DateInputDriver.js +19 -0
- package/dist/scripts/src/testing/drivers/ModalDialogDriver.js +10 -0
- package/dist/scripts/src/testing/drivers/NumberBoxDriver.js +44 -0
- package/dist/scripts/src/testing/drivers/SliderDriver.js +20 -0
- package/dist/scripts/src/testing/drivers/TextBoxDriver.js +20 -0
- package/dist/scripts/src/testing/drivers/TimeInputDriver.js +22 -0
- package/dist/scripts/src/testing/drivers/TimerDriver.js +64 -0
- package/dist/scripts/src/testing/fixtures.js +513 -0
- package/dist/scripts/src/testing/infrastructure/TestBed.js +17 -0
- package/dist/scripts/src/testing/infrastructure/main.js +9 -0
- package/dist/scripts/src/testing/infrastructure/public/mockServiceWorker.js +266 -0
- package/dist/scripts/src/testing/themed-app-test-helpers.js +139 -0
- package/dist/standalone/xmlui-standalone.es.d.ts +172 -10
- package/dist/standalone/xmlui-standalone.umd.js +36 -36
- package/package.json +2 -3
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* Based on https://github.com/microsoft/monaco-editor/blob/main/src/basic-languages/javascript/javascript.ts */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.XmluiScripGrammar = void 0;
|
|
5
|
+
exports.XmluiScripGrammar = {
|
|
6
|
+
id: "xmluiscript",
|
|
7
|
+
config: {
|
|
8
|
+
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
|
|
9
|
+
comments: {
|
|
10
|
+
lineComment: "//",
|
|
11
|
+
blockComment: ["/*", "*/"],
|
|
12
|
+
},
|
|
13
|
+
brackets: [
|
|
14
|
+
["{", "}"],
|
|
15
|
+
["[", "]"],
|
|
16
|
+
["(", ")"],
|
|
17
|
+
],
|
|
18
|
+
onEnterRules: [
|
|
19
|
+
{
|
|
20
|
+
// e.g. /** | */
|
|
21
|
+
beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
|
|
22
|
+
afterText: /^\s*\*\/$/,
|
|
23
|
+
action: {
|
|
24
|
+
// numeric repr of indentAction: languages.IndentAction.IndentOutdent, but without the "monaco-core" package
|
|
25
|
+
indentAction: 2,
|
|
26
|
+
appendText: " * ",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
// e.g. /** ...|
|
|
31
|
+
beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
|
|
32
|
+
action: {
|
|
33
|
+
// numeric repr of indentAction: languages.IndentAction.None, but without the "monaco-core" package
|
|
34
|
+
indentAction: 0,
|
|
35
|
+
appendText: " * ",
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
// e.g. * ...|
|
|
40
|
+
beforeText: /^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,
|
|
41
|
+
action: {
|
|
42
|
+
// numeric repr of indentAction: languages.IndentAction.None, but without the "monaco-core" package
|
|
43
|
+
indentAction: 0,
|
|
44
|
+
appendText: "* ",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
// e.g. */|
|
|
49
|
+
beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/,
|
|
50
|
+
action: {
|
|
51
|
+
// numeric repr of indentAction: languages.IndentAction.None, but without the "monaco-core" package
|
|
52
|
+
indentAction: 0,
|
|
53
|
+
removeText: 1,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
autoClosingPairs: [
|
|
58
|
+
{ open: "{", close: "}" },
|
|
59
|
+
{ open: "[", close: "]" },
|
|
60
|
+
{ open: "(", close: ")" },
|
|
61
|
+
{ open: '"', close: '"', notIn: ["string"] },
|
|
62
|
+
{ open: "'", close: "'", notIn: ["string", "comment"] },
|
|
63
|
+
{ open: "`", close: "`", notIn: ["string", "comment"] },
|
|
64
|
+
{ open: "/**", close: " */", notIn: ["string"] },
|
|
65
|
+
],
|
|
66
|
+
folding: {
|
|
67
|
+
markers: {
|
|
68
|
+
start: new RegExp("^\\s*//\\s*#?region\\b"),
|
|
69
|
+
end: new RegExp("^\\s*//\\s*#?endregion\\b"),
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
language: {
|
|
74
|
+
// Set defaultToken to invalid to see what you do not tokenize yet
|
|
75
|
+
defaultToken: "invalid",
|
|
76
|
+
tokenPostfix: ".xs",
|
|
77
|
+
typeKeywords: [],
|
|
78
|
+
keywords: [
|
|
79
|
+
"break",
|
|
80
|
+
"case",
|
|
81
|
+
"catch",
|
|
82
|
+
"class",
|
|
83
|
+
"continue",
|
|
84
|
+
"const",
|
|
85
|
+
"constructor",
|
|
86
|
+
"debugger",
|
|
87
|
+
"default",
|
|
88
|
+
"delete",
|
|
89
|
+
"do",
|
|
90
|
+
"else",
|
|
91
|
+
"export",
|
|
92
|
+
"extends",
|
|
93
|
+
"false",
|
|
94
|
+
"finally",
|
|
95
|
+
"for",
|
|
96
|
+
"from",
|
|
97
|
+
"function",
|
|
98
|
+
"get",
|
|
99
|
+
"if",
|
|
100
|
+
"import",
|
|
101
|
+
"in",
|
|
102
|
+
"instanceof",
|
|
103
|
+
"let",
|
|
104
|
+
"new",
|
|
105
|
+
"null",
|
|
106
|
+
"return",
|
|
107
|
+
"set",
|
|
108
|
+
"static",
|
|
109
|
+
"super",
|
|
110
|
+
"switch",
|
|
111
|
+
"symbol",
|
|
112
|
+
"this",
|
|
113
|
+
"throw",
|
|
114
|
+
"true",
|
|
115
|
+
"try",
|
|
116
|
+
"typeof",
|
|
117
|
+
"undefined",
|
|
118
|
+
"var",
|
|
119
|
+
"void",
|
|
120
|
+
"while",
|
|
121
|
+
"with",
|
|
122
|
+
"yield",
|
|
123
|
+
"async",
|
|
124
|
+
"await",
|
|
125
|
+
"of",
|
|
126
|
+
],
|
|
127
|
+
operators: [
|
|
128
|
+
"<=",
|
|
129
|
+
">=",
|
|
130
|
+
"==",
|
|
131
|
+
"!=",
|
|
132
|
+
"===",
|
|
133
|
+
"!==",
|
|
134
|
+
"=>",
|
|
135
|
+
"+",
|
|
136
|
+
"-",
|
|
137
|
+
"**",
|
|
138
|
+
"*",
|
|
139
|
+
"/",
|
|
140
|
+
"%",
|
|
141
|
+
"++",
|
|
142
|
+
"--",
|
|
143
|
+
"<<",
|
|
144
|
+
"</",
|
|
145
|
+
">>",
|
|
146
|
+
">>>",
|
|
147
|
+
"&",
|
|
148
|
+
"|",
|
|
149
|
+
"^",
|
|
150
|
+
"!",
|
|
151
|
+
"~",
|
|
152
|
+
"&&",
|
|
153
|
+
"||",
|
|
154
|
+
"??",
|
|
155
|
+
"?",
|
|
156
|
+
":",
|
|
157
|
+
"=",
|
|
158
|
+
"+=",
|
|
159
|
+
"-=",
|
|
160
|
+
"*=",
|
|
161
|
+
"**=",
|
|
162
|
+
"/=",
|
|
163
|
+
"%=",
|
|
164
|
+
"<<=",
|
|
165
|
+
">>=",
|
|
166
|
+
">>>=",
|
|
167
|
+
"&=",
|
|
168
|
+
"|=",
|
|
169
|
+
"^=",
|
|
170
|
+
"@",
|
|
171
|
+
],
|
|
172
|
+
// we include these common regular expressions
|
|
173
|
+
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
|
174
|
+
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
|
175
|
+
digits: /\d+(_+\d+)*/,
|
|
176
|
+
octaldigits: /[0-7]+(_+[0-7]+)*/,
|
|
177
|
+
binarydigits: /[0-1]+(_+[0-1]+)*/,
|
|
178
|
+
hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
|
|
179
|
+
regexpctl: /[(){}\[\]\$\^|\-*+?\.]/,
|
|
180
|
+
regexpesc: /\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,
|
|
181
|
+
// The main tokenizer for our languages
|
|
182
|
+
tokenizer: {
|
|
183
|
+
root: [[/[{}]/, "delimiter.bracket"], { include: "common" }],
|
|
184
|
+
common: [
|
|
185
|
+
// identifiers and keywords
|
|
186
|
+
[
|
|
187
|
+
/#?[a-z_$][\w$]*/,
|
|
188
|
+
{
|
|
189
|
+
cases: {
|
|
190
|
+
"@keywords": "keyword",
|
|
191
|
+
"@default": "identifier",
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
],
|
|
195
|
+
[/[A-Z][\w\$]*/, "type.identifier"], // to show class names nicely
|
|
196
|
+
// [/[A-Z][\w\$]*/, 'identifier'],
|
|
197
|
+
// whitespace
|
|
198
|
+
{ include: "@whitespace" },
|
|
199
|
+
// regular expression: ensure it is terminated before beginning (otherwise it is an opeator)
|
|
200
|
+
[
|
|
201
|
+
/\/(?=([^\\\/]|\\.)+\/([dgimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,
|
|
202
|
+
{ token: "regexp", bracket: "@open", next: "@regexp" },
|
|
203
|
+
],
|
|
204
|
+
// delimiters and operators
|
|
205
|
+
[/[()\[\]]/, "@brackets"],
|
|
206
|
+
[/[<>](?!@symbols)/, "@brackets"],
|
|
207
|
+
[/!(?=([^=]|$))/, "delimiter"],
|
|
208
|
+
[
|
|
209
|
+
/@symbols/,
|
|
210
|
+
{
|
|
211
|
+
cases: {
|
|
212
|
+
"@operators": "delimiter",
|
|
213
|
+
"@default": "",
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
],
|
|
217
|
+
// numbers
|
|
218
|
+
[/(@digits)[eE]([\-+]?(@digits))?/, "number.float"],
|
|
219
|
+
[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/, "number.float"],
|
|
220
|
+
[/0[xX](@hexdigits)n?/, "number.hex"],
|
|
221
|
+
[/0[oO]?(@octaldigits)n?/, "number.octal"],
|
|
222
|
+
[/0[bB](@binarydigits)n?/, "number.binary"],
|
|
223
|
+
[/(@digits)n?/, "number"],
|
|
224
|
+
// delimiter: after number because of .\d floats
|
|
225
|
+
[/[;,.]/, "delimiter"],
|
|
226
|
+
// strings
|
|
227
|
+
[/"([^"\\]|\\.)*$/, "string.invalid"], // non-teminated string
|
|
228
|
+
[/'([^'\\]|\\.)*$/, "string.invalid"], // non-teminated string
|
|
229
|
+
[/"/, "string", "@string_double"],
|
|
230
|
+
[/'/, "string", "@string_single"],
|
|
231
|
+
[/`/, "string", "@string_backtick"],
|
|
232
|
+
],
|
|
233
|
+
whitespace: [
|
|
234
|
+
[/[ \t\r\n]+/, ""],
|
|
235
|
+
[/\/\*\*(?!\/)/, "comment.doc", "@jsdoc"],
|
|
236
|
+
[/\/\*/, "comment", "@comment"],
|
|
237
|
+
[/\/\/.*$/, "comment"],
|
|
238
|
+
],
|
|
239
|
+
comment: [
|
|
240
|
+
[/[^\/*]+/, "comment"],
|
|
241
|
+
[/\*\//, "comment", "@pop"],
|
|
242
|
+
[/[\/*]/, "comment"],
|
|
243
|
+
],
|
|
244
|
+
jsdoc: [
|
|
245
|
+
[/[^\/*]+/, "comment.doc"],
|
|
246
|
+
[/\*\//, "comment.doc", "@pop"],
|
|
247
|
+
[/[\/*]/, "comment.doc"],
|
|
248
|
+
],
|
|
249
|
+
// We match regular expression quite precisely
|
|
250
|
+
regexp: [
|
|
251
|
+
[
|
|
252
|
+
/(\{)(\d+(?:,\d*)?)(\})/,
|
|
253
|
+
["regexp.escape.control", "regexp.escape.control", "regexp.escape.control"],
|
|
254
|
+
],
|
|
255
|
+
[
|
|
256
|
+
/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,
|
|
257
|
+
["regexp.escape.control", { token: "regexp.escape.control", next: "@regexrange" }],
|
|
258
|
+
],
|
|
259
|
+
[/(\()(\?:|\?=|\?!)/, ["regexp.escape.control", "regexp.escape.control"]],
|
|
260
|
+
[/[()]/, "regexp.escape.control"],
|
|
261
|
+
[/@regexpctl/, "regexp.escape.control"],
|
|
262
|
+
[/[^\\\/]/, "regexp"],
|
|
263
|
+
[/@regexpesc/, "regexp.escape"],
|
|
264
|
+
[/\\\./, "regexp.invalid"],
|
|
265
|
+
[
|
|
266
|
+
/(\/)([dgimsuy]*)/,
|
|
267
|
+
[{ token: "regexp", bracket: "@close", next: "@pop" }, "keyword.other"],
|
|
268
|
+
],
|
|
269
|
+
],
|
|
270
|
+
regexrange: [
|
|
271
|
+
[/-/, "regexp.escape.control"],
|
|
272
|
+
[/\^/, "regexp.invalid"],
|
|
273
|
+
[/@regexpesc/, "regexp.escape"],
|
|
274
|
+
[/[^\]]/, "regexp"],
|
|
275
|
+
[
|
|
276
|
+
/\]/,
|
|
277
|
+
{
|
|
278
|
+
token: "regexp.escape.control",
|
|
279
|
+
next: "@pop",
|
|
280
|
+
bracket: "@close",
|
|
281
|
+
},
|
|
282
|
+
],
|
|
283
|
+
],
|
|
284
|
+
string_double: [
|
|
285
|
+
[/[^\\"]+/, "string"],
|
|
286
|
+
[/@escapes/, "string.escape"],
|
|
287
|
+
[/\\./, "string.escape.invalid"],
|
|
288
|
+
[/"/, "string", "@pop"],
|
|
289
|
+
],
|
|
290
|
+
string_single: [
|
|
291
|
+
[/[^\\']+/, "string"],
|
|
292
|
+
[/@escapes/, "string.escape"],
|
|
293
|
+
[/\\./, "string.escape.invalid"],
|
|
294
|
+
[/'/, "string", "@pop"],
|
|
295
|
+
],
|
|
296
|
+
string_backtick: [
|
|
297
|
+
[/\$\{/, { token: "delimiter.bracket", next: "@bracketCounting" }],
|
|
298
|
+
[/[^\\`$]+/, "string"],
|
|
299
|
+
[/@escapes/, "string.escape"],
|
|
300
|
+
[/\\./, "string.escape.invalid"],
|
|
301
|
+
[/`/, "string", "@pop"],
|
|
302
|
+
],
|
|
303
|
+
bracketCounting: [
|
|
304
|
+
[/\{/, "delimiter.bracket", "@bracketCounting"],
|
|
305
|
+
[/\}/, "delimiter.bracket", "@pop"],
|
|
306
|
+
{ include: "common" },
|
|
307
|
+
],
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.xmluiGrammar = exports.xmluiTheme = exports.xmluiThemeLight = exports.xmluiThemeDark = void 0;
|
|
7
|
+
const xmlui_dark_json_1 = __importDefault(require("./xmlui-dark.json"));
|
|
8
|
+
exports.xmluiThemeDark = xmlui_dark_json_1.default;
|
|
9
|
+
const xmlui_light_json_1 = __importDefault(require("./xmlui-light.json"));
|
|
10
|
+
exports.xmluiThemeLight = xmlui_light_json_1.default;
|
|
11
|
+
const xmlui_json_1 = __importDefault(require("./xmlui.json"));
|
|
12
|
+
exports.xmluiTheme = xmlui_json_1.default;
|
|
13
|
+
const xmlui_tmLanguage_json_1 = __importDefault(require("./xmlui.tmLanguage.json"));
|
|
14
|
+
exports.xmluiGrammar = xmlui_tmLanguage_json_1.default;
|