xmlui 0.9.84 → 0.9.86

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.
Files changed (75) hide show
  1. package/dist/lib/{index-BSCmaXIB.mjs → index-Bm0sNu3Q.mjs} +17098 -21599
  2. package/dist/lib/index.css +1 -1
  3. package/dist/lib/{initMock-CSQJ_OLe.mjs → initMock-BJWFwa64.mjs} +1 -1
  4. package/dist/lib/language-server-web-worker.mjs +1 -1
  5. package/dist/lib/language-server.mjs +1 -1
  6. package/dist/lib/{server-common-LUcdzTQs.mjs → server-common-CfdMYx46.mjs} +4453 -4423
  7. package/dist/lib/syntax-monaco.d.ts +64 -0
  8. package/dist/lib/syntax-monaco.mjs +639 -0
  9. package/dist/lib/syntax-textmate.d.ts +2127 -0
  10. package/dist/lib/syntax-textmate.mjs +2491 -0
  11. package/dist/lib/xmlui-parser.d.ts +7 -1
  12. package/dist/lib/xmlui.d.ts +8 -2
  13. package/dist/lib/xmlui.mjs +1 -1
  14. package/dist/metadata/{collectedComponentMetadata-CTbfFAXY.mjs → collectedComponentMetadata-BLxDndi5.mjs} +19018 -23504
  15. package/dist/metadata/{initMock-MSZ7AoaC.mjs → initMock-DRxSMFJz.mjs} +1 -1
  16. package/dist/metadata/style.css +1 -1
  17. package/dist/metadata/xmlui-metadata.mjs +1 -1
  18. package/dist/metadata/xmlui-metadata.umd.js +138 -285
  19. package/dist/scripts/package.json +19 -2
  20. package/dist/scripts/src/components/APICall/APICall.js +4 -0
  21. package/dist/scripts/src/components/Accordion/Accordion.js +14 -4
  22. package/dist/scripts/src/components/AppState/AppState.js +7 -2
  23. package/dist/scripts/src/components/AutoComplete/AutoComplete.js +17 -3
  24. package/dist/scripts/src/components/Bookmark/Bookmark.js +1 -0
  25. package/dist/scripts/src/components/Carousel/Carousel.js +23 -5
  26. package/dist/scripts/src/components/Checkbox/Checkbox.js +15 -5
  27. package/dist/scripts/src/components/ColorPicker/ColorPicker.js +15 -3
  28. package/dist/scripts/src/components/ComponentProvider.js +0 -4
  29. package/dist/scripts/src/components/DatePicker/DatePicker.js +15 -3
  30. package/dist/scripts/src/components/DropdownMenu/DropdownMenu.js +8 -1
  31. package/dist/scripts/src/components/DropdownMenu/DropdownMenuNative.js +1 -0
  32. package/dist/scripts/src/components/ExpandableItem/ExpandableItem.js +16 -4
  33. package/dist/scripts/src/components/FileInput/FileInput.js +19 -6
  34. package/dist/scripts/src/components/Form/Form.js +12 -3
  35. package/dist/scripts/src/components/FormItem/FormItem.js +16 -5
  36. package/dist/scripts/src/components/FormItem/ItemWithLabel.js +5 -2
  37. package/dist/scripts/src/components/FormItem/Validations.js +4 -1
  38. package/dist/scripts/src/components/Heading/Heading.js +6 -0
  39. package/dist/scripts/src/components/Heading/HeadingNative.js +11 -1
  40. package/dist/scripts/src/components/HelloWorld/HelloWorld.js +8 -2
  41. package/dist/scripts/src/components/List/List.js +22 -4
  42. package/dist/scripts/src/components/ModalDialog/ModalDialog.js +14 -5
  43. package/dist/scripts/src/components/NumberBox/NumberBox.js +12 -3
  44. package/dist/scripts/src/components/NumberBox/NumberBox2.js +12 -3
  45. package/dist/scripts/src/components/Queue/Queue.js +38 -15
  46. package/dist/scripts/src/components/Select/Select.js +19 -4
  47. package/dist/scripts/src/components/Slider/Slider.js +15 -3
  48. package/dist/scripts/src/components/Switch/Switch.js +13 -3
  49. package/dist/scripts/src/components/Table/Table.js +26 -8
  50. package/dist/scripts/src/components/Tabs/Tabs.js +4 -1
  51. package/dist/scripts/src/components/TextArea/TextArea.js +8 -2
  52. package/dist/scripts/src/components/TextBox/TextBox.js +16 -4
  53. package/dist/scripts/src/components/Toggle/Toggle.js +9 -2
  54. package/dist/scripts/src/components/metadata-helpers.js +3 -3
  55. package/dist/standalone/xmlui-standalone.es.d.ts +9 -3
  56. package/dist/standalone/xmlui-standalone.umd.js +246 -246
  57. package/package.json +19 -2
  58. package/src/syntax/monaco/grammar.monacoLanguage.ts +283 -0
  59. package/src/syntax/monaco/index.ts +4 -0
  60. package/src/syntax/monaco/xmlui-dark.ts +24 -0
  61. package/src/syntax/monaco/xmlui-light.ts +24 -0
  62. package/src/syntax/monaco/xmluiscript.monacoLanguage.ts +337 -0
  63. package/src/syntax/textMate/index.ts +6 -0
  64. package/src/syntax/textMate/xmlui-dark.json +631 -0
  65. package/src/syntax/textMate/xmlui-light.json +565 -0
  66. package/src/syntax/textMate/xmlui.json +564 -0
  67. package/src/syntax/textMate/xmlui.tmLanguage.json +341 -0
  68. package/dist/lib/core-CvFpTAHi.mjs +0 -5775
  69. package/dist/lib/wasm-DQxwEHae.mjs +0 -7
  70. package/dist/metadata/core-D3puiNN6.mjs +0 -5771
  71. package/dist/metadata/wasm-DQxwEHae.mjs +0 -7
  72. package/dist/scripts/src/components-core/XmluiCodeHighlighter.js +0 -109
  73. package/dist/scripts/src/syntax/grammar.tmLanguage.json +0 -341
  74. package/dist/scripts/src/syntax/textMate/xmlui-dark.json +0 -631
  75. package/dist/scripts/src/syntax/textMate/xmlui-light.json +0 -565
@@ -0,0 +1,337 @@
1
+ /* Based on https://github.com/microsoft/monaco-editor/blob/main/src/basic-languages/javascript/javascript.ts */
2
+
3
+ export const XmluiScripGrammar: { id: string; config: any; language: any } = {
4
+ id: "xmluiscript",
5
+ config: {
6
+ wordPattern:
7
+ /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
8
+
9
+ comments: {
10
+ lineComment: "//",
11
+ blockComment: ["/*", "*/"],
12
+ },
13
+
14
+ brackets: [
15
+ ["{", "}"],
16
+ ["[", "]"],
17
+ ["(", ")"],
18
+ ],
19
+
20
+ onEnterRules: [
21
+ {
22
+ // e.g. /** | */
23
+ beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
24
+ afterText: /^\s*\*\/$/,
25
+ action: {
26
+ // numeric repr of indentAction: languages.IndentAction.IndentOutdent, but without the "monaco-core" package
27
+ indentAction: 2,
28
+ appendText: " * ",
29
+ },
30
+ },
31
+ {
32
+ // e.g. /** ...|
33
+ beforeText: /^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,
34
+ action: {
35
+ // numeric repr of indentAction: languages.IndentAction.None, but without the "monaco-core" package
36
+ indentAction: 0,
37
+ appendText: " * ",
38
+ },
39
+ },
40
+ {
41
+ // e.g. * ...|
42
+ beforeText: /^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,
43
+ action: {
44
+ // numeric repr of indentAction: languages.IndentAction.None, but without the "monaco-core" package
45
+ indentAction: 0,
46
+ appendText: "* ",
47
+ },
48
+ },
49
+ {
50
+ // e.g. */|
51
+ beforeText: /^(\t|(\ \ ))*\ \*\/\s*$/,
52
+ action: {
53
+ // numeric repr of indentAction: languages.IndentAction.None, but without the "monaco-core" package
54
+ indentAction: 0,
55
+ removeText: 1,
56
+ },
57
+ },
58
+ ],
59
+
60
+ autoClosingPairs: [
61
+ { open: "{", close: "}" },
62
+ { open: "[", close: "]" },
63
+ { open: "(", close: ")" },
64
+ { open: '"', close: '"', notIn: ["string"] },
65
+ { open: "'", close: "'", notIn: ["string", "comment"] },
66
+ { open: "`", close: "`", notIn: ["string", "comment"] },
67
+ { open: "/**", close: " */", notIn: ["string"] },
68
+ ],
69
+
70
+ folding: {
71
+ markers: {
72
+ start: new RegExp("^\\s*//\\s*#?region\\b"),
73
+ end: new RegExp("^\\s*//\\s*#?endregion\\b"),
74
+ },
75
+ },
76
+ },
77
+
78
+ language: {
79
+ // Set defaultToken to invalid to see what you do not tokenize yet
80
+ defaultToken: "invalid",
81
+ tokenPostfix: ".xs",
82
+
83
+ typeKeywords: [],
84
+
85
+ keywords: [
86
+ "break",
87
+ "case",
88
+ "catch",
89
+ "class",
90
+ "continue",
91
+ "const",
92
+ "constructor",
93
+ "debugger",
94
+ "default",
95
+ "delete",
96
+ "do",
97
+ "else",
98
+ "export",
99
+ "extends",
100
+ "false",
101
+ "finally",
102
+ "for",
103
+ "from",
104
+ "function",
105
+ "get",
106
+ "if",
107
+ "import",
108
+ "in",
109
+ "instanceof",
110
+ "let",
111
+ "new",
112
+ "null",
113
+ "return",
114
+ "set",
115
+ "static",
116
+ "super",
117
+ "switch",
118
+ "symbol",
119
+ "this",
120
+ "throw",
121
+ "true",
122
+ "try",
123
+ "typeof",
124
+ "undefined",
125
+ "var",
126
+ "void",
127
+ "while",
128
+ "with",
129
+ "yield",
130
+ "async",
131
+ "await",
132
+ "of",
133
+ ],
134
+
135
+ operators: [
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
+ "<<=",
173
+ ">>=",
174
+ ">>>=",
175
+ "&=",
176
+ "|=",
177
+ "^=",
178
+ "@",
179
+ ],
180
+
181
+ // we include these common regular expressions
182
+ symbols: /[=><!~?:&|+\-*\/\^%]+/,
183
+ escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
184
+ digits: /\d+(_+\d+)*/,
185
+ octaldigits: /[0-7]+(_+[0-7]+)*/,
186
+ binarydigits: /[0-1]+(_+[0-1]+)*/,
187
+ hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
188
+
189
+ regexpctl: /[(){}\[\]\$\^|\-*+?\.]/,
190
+ regexpesc: /\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,
191
+
192
+ // The main tokenizer for our languages
193
+ tokenizer: {
194
+ root: [[/[{}]/, "delimiter.bracket"], { include: "common" }],
195
+
196
+ common: [
197
+ // identifiers and keywords
198
+ [
199
+ /#?[a-z_$][\w$]*/,
200
+ {
201
+ cases: {
202
+ "@keywords": "keyword",
203
+ "@default": "identifier",
204
+ },
205
+ },
206
+ ],
207
+ [/[A-Z][\w\$]*/, "type.identifier"], // to show class names nicely
208
+ // [/[A-Z][\w\$]*/, 'identifier'],
209
+
210
+ // whitespace
211
+ { include: "@whitespace" },
212
+
213
+ // regular expression: ensure it is terminated before beginning (otherwise it is an opeator)
214
+ [
215
+ /\/(?=([^\\\/]|\\.)+\/([dgimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,
216
+ { token: "regexp", bracket: "@open", next: "@regexp" },
217
+ ],
218
+
219
+ // delimiters and operators
220
+ [/[()\[\]]/, "@brackets"],
221
+ [/[<>](?!@symbols)/, "@brackets"],
222
+ [/!(?=([^=]|$))/, "delimiter"],
223
+ [
224
+ /@symbols/,
225
+ {
226
+ cases: {
227
+ "@operators": "delimiter",
228
+ "@default": "",
229
+ },
230
+ },
231
+ ],
232
+
233
+ // numbers
234
+ [/(@digits)[eE]([\-+]?(@digits))?/, "number.float"],
235
+ [/(@digits)\.(@digits)([eE][\-+]?(@digits))?/, "number.float"],
236
+ [/0[xX](@hexdigits)n?/, "number.hex"],
237
+ [/0[oO]?(@octaldigits)n?/, "number.octal"],
238
+ [/0[bB](@binarydigits)n?/, "number.binary"],
239
+ [/(@digits)n?/, "number"],
240
+
241
+ // delimiter: after number because of .\d floats
242
+ [/[;,.]/, "delimiter"],
243
+
244
+ // strings
245
+ [/"([^"\\]|\\.)*$/, "string.invalid"], // non-teminated string
246
+ [/'([^'\\]|\\.)*$/, "string.invalid"], // non-teminated string
247
+ [/"/, "string", "@string_double"],
248
+ [/'/, "string", "@string_single"],
249
+ [/`/, "string", "@string_backtick"],
250
+ ],
251
+
252
+ whitespace: [
253
+ [/[ \t\r\n]+/, ""],
254
+ [/\/\*\*(?!\/)/, "comment.doc", "@jsdoc"],
255
+ [/\/\*/, "comment", "@comment"],
256
+ [/\/\/.*$/, "comment"],
257
+ ],
258
+
259
+ comment: [
260
+ [/[^\/*]+/, "comment"],
261
+ [/\*\//, "comment", "@pop"],
262
+ [/[\/*]/, "comment"],
263
+ ],
264
+
265
+ jsdoc: [
266
+ [/[^\/*]+/, "comment.doc"],
267
+ [/\*\//, "comment.doc", "@pop"],
268
+ [/[\/*]/, "comment.doc"],
269
+ ],
270
+
271
+ // We match regular expression quite precisely
272
+ regexp: [
273
+ [
274
+ /(\{)(\d+(?:,\d*)?)(\})/,
275
+ ["regexp.escape.control", "regexp.escape.control", "regexp.escape.control"],
276
+ ],
277
+ [
278
+ /(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,
279
+ ["regexp.escape.control", { token: "regexp.escape.control", next: "@regexrange" }],
280
+ ],
281
+ [/(\()(\?:|\?=|\?!)/, ["regexp.escape.control", "regexp.escape.control"]],
282
+ [/[()]/, "regexp.escape.control"],
283
+ [/@regexpctl/, "regexp.escape.control"],
284
+ [/[^\\\/]/, "regexp"],
285
+ [/@regexpesc/, "regexp.escape"],
286
+ [/\\\./, "regexp.invalid"],
287
+ [
288
+ /(\/)([dgimsuy]*)/,
289
+ [{ token: "regexp", bracket: "@close", next: "@pop" }, "keyword.other"],
290
+ ],
291
+ ],
292
+
293
+ regexrange: [
294
+ [/-/, "regexp.escape.control"],
295
+ [/\^/, "regexp.invalid"],
296
+ [/@regexpesc/, "regexp.escape"],
297
+ [/[^\]]/, "regexp"],
298
+ [
299
+ /\]/,
300
+ {
301
+ token: "regexp.escape.control",
302
+ next: "@pop",
303
+ bracket: "@close",
304
+ },
305
+ ],
306
+ ],
307
+
308
+ string_double: [
309
+ [/[^\\"]+/, "string"],
310
+ [/@escapes/, "string.escape"],
311
+ [/\\./, "string.escape.invalid"],
312
+ [/"/, "string", "@pop"],
313
+ ],
314
+
315
+ string_single: [
316
+ [/[^\\']+/, "string"],
317
+ [/@escapes/, "string.escape"],
318
+ [/\\./, "string.escape.invalid"],
319
+ [/'/, "string", "@pop"],
320
+ ],
321
+
322
+ string_backtick: [
323
+ [/\$\{/, { token: "delimiter.bracket", next: "@bracketCounting" }],
324
+ [/[^\\`$]+/, "string"],
325
+ [/@escapes/, "string.escape"],
326
+ [/\\./, "string.escape.invalid"],
327
+ [/`/, "string", "@pop"],
328
+ ],
329
+
330
+ bracketCounting: [
331
+ [/\{/, "delimiter.bracket", "@bracketCounting"],
332
+ [/\}/, "delimiter.bracket", "@pop"],
333
+ { include: "common" },
334
+ ],
335
+ },
336
+ },
337
+ };
@@ -0,0 +1,6 @@
1
+ import xmluiThemeDark from "./xmlui-dark.json";
2
+ import xmluiThemeLight from "./xmlui-light.json";
3
+ import xmluiTheme from "./xmlui.json";
4
+ import xmluiGrammar from "./xmlui.tmLanguage.json";
5
+
6
+ export { xmluiThemeDark, xmluiThemeLight, xmluiTheme, xmluiGrammar };