xmlui 0.9.10 → 0.9.12

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 (59) hide show
  1. package/dist/{apiInterceptorWorker-BJYj3y8V.mjs → apiInterceptorWorker-dYrfbzdh.mjs} +1 -1
  2. package/dist/{index-6PAZN2xn.mjs → index-Dh2MThrK.mjs} +2127 -2300
  3. package/dist/index.css +112 -198
  4. package/dist/language-server-web-worker.mjs +1 -1
  5. package/dist/language-server.mjs +1 -1
  6. package/dist/{lint-DmJOJSJa.mjs → lint-Cd70ckJ6.mjs} +1 -11
  7. package/dist/{parser-B3m9ZEAK.mjs → parser-CBXS8ft2.mjs} +7 -5
  8. package/dist/scripts/bin/build-lib.js +42 -1
  9. package/dist/scripts/bin/vite-xmlui-plugin.js +2 -22
  10. package/dist/scripts/bin/viteConfig.js +3 -1
  11. package/dist/scripts/src/abstractions/ComponentDefs.js +2 -20
  12. package/dist/scripts/src/components/App/App.js +61 -21
  13. package/dist/scripts/src/components/Button/Button.js +5 -1
  14. package/dist/scripts/src/components/Button/ButtonNative.js +9 -2
  15. package/dist/scripts/src/components/Checkbox/Checkbox.js +2 -2
  16. package/dist/scripts/src/components/ComponentProvider.js +2 -0
  17. package/dist/scripts/src/components/Footer/Footer.js +1 -1
  18. package/dist/scripts/src/components/Form/FormContext.js +2 -0
  19. package/dist/scripts/src/components/FormItem/FormItemNative.js +9 -0
  20. package/dist/scripts/src/components/Items/Items.js +2 -1
  21. package/dist/scripts/src/components/List/List.js +2 -1
  22. package/dist/scripts/src/components/Markdown/Markdown.js +2 -0
  23. package/dist/scripts/src/components/NavPanel/NavPanel.js +2 -2
  24. package/dist/scripts/src/components/NumberBox/NumberBox2.js +85 -0
  25. package/dist/scripts/src/components/NumberBox/NumberBox2Native.js +395 -0
  26. package/dist/scripts/src/components/NumberBox/numberbox-abstractions.js +35 -0
  27. package/dist/scripts/src/components/Option/Option.js +2 -1
  28. package/dist/scripts/src/components/Select/Select.js +8 -0
  29. package/dist/scripts/src/components/Select/SelectNative.js +24 -10
  30. package/dist/scripts/src/components/Theme/ThemeNative.js +1 -0
  31. package/dist/scripts/src/components/VisuallyHidden.js +21 -0
  32. package/dist/scripts/src/components-core/InspectorContext.js +15 -4
  33. package/dist/scripts/src/components-core/loader/DataLoader.js +110 -3
  34. package/dist/scripts/src/components-core/loader/Loader.js +29 -7
  35. package/dist/scripts/src/components-core/rendering/ComponentAdapter.js +4 -1
  36. package/dist/scripts/src/components-core/rendering/ComponentWrapper.js +23 -5
  37. package/dist/scripts/src/components-core/rendering/Container.js +23 -26
  38. package/dist/scripts/src/components-core/rendering/StateContainer.js +2 -4
  39. package/dist/scripts/src/components-core/rendering/reducer.js +6 -5
  40. package/dist/scripts/src/components-core/utils/extractParam.js +24 -7
  41. package/dist/scripts/src/components-core/xmlui-parser.js +1 -1
  42. package/dist/scripts/src/parsers/xmlui-parser/parser.js +1 -1
  43. package/dist/scripts/src/parsers/xmlui-parser/transform.js +0 -10
  44. package/dist/scripts/src/parsers/xmlui-parser/utils.js +6 -9
  45. package/dist/{server-common-oCD2CuF9.mjs → server-common-DW5h7Q34.mjs} +122 -64
  46. package/dist/style.css +112 -98
  47. package/dist/xmlui-metadata.mjs +688 -229
  48. package/dist/xmlui-metadata.umd.js +687 -230
  49. package/dist/xmlui-parser.d.ts +14 -9
  50. package/dist/xmlui-parser.mjs +3 -3
  51. package/dist/xmlui-standalone.umd.js +4483 -7327
  52. package/dist/xmlui.d.ts +14 -1
  53. package/dist/xmlui.mjs +2 -1
  54. package/package.json +6 -4
  55. package/dist/scripts/src/components-core/devtools/DevTools.js +0 -225
  56. package/dist/scripts/src/syntax/monaco/grammar.monacoLanguage.js +0 -286
  57. package/dist/scripts/src/syntax/monaco/xmlui-dark.js +0 -27
  58. package/dist/scripts/src/syntax/monaco/xmlui-light.js +0 -26
  59. package/dist/scripts/src/syntax/monaco/xmluiscript.monacoLanguage.js +0 -310
@@ -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;
@@ -1,310 +0,0 @@
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
- };