xmlui 0.11.22 → 0.11.24

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 (32) hide show
  1. package/dist/bin/index.cjs +67 -73
  2. package/dist/bin/index.js +51 -57
  3. package/dist/lib/{index-BvICspZ1.js → index-9UB61miF.js} +4548 -4060
  4. package/dist/lib/index.css +1 -1
  5. package/dist/lib/{initMock-Bq5003sR.js → initMock-DppAqVHs.js} +1 -1
  6. package/dist/lib/language-server-web-worker.js +1 -1
  7. package/dist/lib/language-server.js +1 -1
  8. package/dist/lib/{metadata-utils-DFy9QKH6.js → metadata-utils-X4ryJQBa.js} +1 -1
  9. package/dist/lib/scss/components-core/theming/_themes.scss +35 -7
  10. package/dist/lib/scss/index.scss +113 -66
  11. package/dist/lib/{server-common-BwQMbLFd.js → server-common-BZY2B446.js} +2464 -1296
  12. package/dist/lib/syntax-textmate.d.ts +1 -1
  13. package/dist/lib/syntax-textmate.js +1 -1
  14. package/dist/lib/testing.d.ts +8 -1
  15. package/dist/lib/testing.js +2 -2
  16. package/dist/lib/{transform-CQ_6R-43.js → transform-FiPBuy3W.js} +9 -3
  17. package/dist/lib/vite-xmlui-plugin.js +7 -3
  18. package/dist/lib/{xmlui-parser-9Yk-asFP.js → xmlui-parser-DXCqrM50.js} +1 -1
  19. package/dist/lib/xmlui-parser.d.ts +8 -1
  20. package/dist/lib/xmlui-parser.js +2 -2
  21. package/dist/lib/{xmlui-serializer-CeCcgdVR.js → xmlui-serializer-D4ixnQay.js} +1 -1
  22. package/dist/lib/xmlui.d.ts +15 -5
  23. package/dist/lib/xmlui.js +65 -64
  24. package/dist/metadata/{collectedComponentMetadata-CiXsnuT1.js → collectedComponentMetadata-CkHQSF65.js} +2237 -1751
  25. package/dist/metadata/{initMock-B3RWJ2uL.js → initMock-KBzfT81H.js} +1 -1
  26. package/dist/metadata/xmlui-metadata.css +1 -1
  27. package/dist/metadata/xmlui-metadata.js +1 -1
  28. package/dist/metadata/xmlui-metadata.umd.cjs +3 -3
  29. package/dist/standalone/xmlui-standalone.es.d.ts +17 -5
  30. package/dist/standalone/xmlui-standalone.umd.js +36 -36
  31. package/package.json +1 -1
  32. package/src/syntax/textMate/xmlui.tmLanguage.json +1 -1
@@ -239,7 +239,7 @@ export declare const xmluiGrammar: {
239
239
  "patterns": [{ "include": "#attribute" }, { "include": "#comments" }]
240
240
  },
241
241
  "componentTag": {
242
- "begin": "(\\s*</?)((?:[a-zA-Z_][\\w\\.\\-]*?:)?)([a-zA-Z][\\w\\.\\-]*)",
242
+ "begin": "(\\s*</?\\s*)((?:[a-zA-Z_][\\w\\.\\-]*?:)?)([a-zA-Z][\\w\\.\\-]*)",
243
243
  "beginCaptures": {
244
244
  "1": { "name": "punctuation.definition.tag.xmlui" },
245
245
  "2": { "name": "keyword.operator.namespace.xmlui" },
@@ -31,7 +31,7 @@ const xmlui = {
31
31
  const name = "xmlui";
32
32
  const scopeName = "source.xmlui";
33
33
  const patterns = [{ "include": "#root" }];
34
- const repository = { "root": { "patterns": [{ "include": "#comments" }, { "include": "#helperTag" }, { "include": "#componentTag" }, { "include": "#entity" }, { "include": "#textWithBindingExpr" }, { "begin": "(<!\\[)(CDATA)(\\[)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" }, "2": { "name": "storage.xmlui" }, "3": { "name": "punctuation.definition.tag.xmlui" } }, "end": "]]>", "endCaptures": { "0": { "name": "punctuation.definition.tag.xmlui" } }, "contentName": "string.unquoted.cdata.xmlui" }] }, "methodTag": { "begin": "(<)((?:[a-zA-Z_][\\w\\.\\-]*?:)?)(method)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" }, "2": { "name": "keyword.operator.namespace.xmlui" }, "3": { "name": "entity.name.tag.localname.xmlui" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.xmlui" } }, "applyEndPatternLast": "1", "patterns": [{ "include": "#comments" }, { "include": "#valueAttributeScriptInside" }, { "include": "#attribute" }, { "begin": "(?<!/|(?:/\\s*(?:method))\\s*)>", "beginCaptures": { "0": { "name": "punctuation.definition.tag.xmlui" } }, "endCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" }, "2": { "name": "keyword.operator.namespace.xmlui" }, "3": { "name": "entity.name.tag.localname.xmlui" } }, "contentName": "meta.embedded.block.javascript", "patterns": [{ "include": "source.js" }], "end": "(</)((?:[a-zA-Z_][\\w\\.\\-]*?:)?)(method)(?=\\s*>)" }], "end": "/?>" }, "eventTag": { "begin": "(<)((?:[a-zA-Z_][\\w\\.\\-]*?:)?)(event)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" }, "2": { "name": "keyword.operator.namespace.xmlui" }, "3": { "name": "entity.name.tag.localname.xmlui" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.xmlui" } }, "applyEndPatternLast": "1", "patterns": [{ "include": "#comments" }, { "include": "#valueAttributeScriptInside" }, { "include": "#attribute" }, { "begin": "(?<!/|(?:/\\s*event)\\s*)(>)", "beginCaptures": { "0": { "name": "punctuation.definition.tag.xmlui" } }, "endCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" }, "2": { "name": "keyword.operator.namespace.xmlui" }, "3": { "name": "entity.name.tag.localname.xmlui" } }, "patterns": [{ "include": "#comments" }, { "include": "#componentTag" }, { "include": "source.js" }], "end": "(</)((?:[a-zA-Z_][\\w\\.\\-]*?:)?)(event)(?=\\s*>)" }], "end": ">" }, "fieldTag": { "begin": "(<)((?:[a-zA-Z_][\\w\\.\\-]*?:)?)(field)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" }, "2": { "name": "keyword.operator.namespace.xmlui" }, "3": { "name": "entity.name.tag.localname.xmlui" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.xmlui" } }, "applyEndPatternLast": "1", "patterns": [{ "include": "#comments" }, { "include": "#valueAttributeScriptInside" }, { "include": "#attribute" }, { "begin": "(?<!/|(?:/\\s*field)\\s*)(>)", "beginCaptures": { "0": { "name": "punctuation.definition.tag.xmlui" } }, "endCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" }, "2": { "name": "keyword.operator.namespace.xmlui" }, "3": { "name": "entity.name.tag.localname.xmlui" } }, "patterns": [{ "include": "#comments" }, { "include": "#componentTag" }, { "include": "source.js" }], "end": "(</)((?:[a-zA-Z_][\\w\\.\\-]*?:)?)(field)(?=\\s*>)" }], "end": ">" }, "itemTag": { "begin": "(<)((?:[a-zA-Z_][\\w\\.\\-]*?:)?)(item)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" }, "2": { "name": "keyword.operator.namespace.xmlui" }, "3": { "name": "entity.name.tag.localname.xmlui" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.xmlui" } }, "applyEndPatternLast": "1", "patterns": [{ "include": "#comments" }, { "include": "#valueAttributeScriptInside" }, { "include": "#attribute" }, { "begin": "(?<!/|(?:/\\s*item)\\s*)(>)", "beginCaptures": { "0": { "name": "punctuation.definition.tag.xmlui" } }, "endCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" }, "2": { "name": "keyword.operator.namespace.xmlui" }, "3": { "name": "entity.name.tag.localname.xmlui" } }, "patterns": [{ "include": "#comments" }, { "include": "#componentTag" }, { "include": "source.js" }], "end": "(</)((?:[a-zA-Z_][\\w\\.\\-]*?:)?)(item)(?=\\s*>)" }], "end": ">" }, "bindingExpr": { "contentName": "meta.embedded.block.javascript", "begin": "\\{", "end": "\\}", "beginCaptures": { "0": { "name": "entity.name.function.xmlui punctuation.definition.block.xmlui" } }, "endCaptures": { "0": { "name": "entity.name.function.xmlui punctuation.definition.block.xmlui" } }, "patterns": [{ "include": "source.js" }] }, "helperTag": { "patterns": [{ "include": "#scriptTag" }, { "include": "#eventTag" }, { "include": "#fieldTag" }, { "include": "#itemTag" }, { "include": "#methodTag" }, { "include": "#propOrVarTag" }] }, "valueAttributeScriptInside": { "patterns": [{ "captures": { "1": { "name": "entity.other.attribute-name.localname.xmlui" }, "2": { "name": "keyword.operator.xmlui" } }, "match": "(?:^|\\s+)(value)(\\s*=)" }, { "include": "#quotedStringJsInside" }] }, "scriptTag": { "begin": "(\\s*<)((?:[a-zA-Z_][\\w\\.\\-]*?:)?)(script)(\\s*>)", "end": "(\\s*</)(\\2)(\\3)(\\s*>)", "contentName": "meta.embedded.block.javascript", "beginCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" }, "2": { "name": "keyword.operator.namespace.xmlui" }, "3": { "name": "entity.name.function.xmlui" }, "4": { "name": "punctuation.definition.tag.xmlui" } }, "endCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" }, "2": { "name": "keyword.operator.namespace.xmlui" }, "3": { "name": "entity.name.function.xmlui" }, "4": { "name": "punctuation.definition.tag.xmlui" } }, "patterns": [{ "include": "source.js" }] }, "textWithBindingExpr": { "patterns": [{ "include": "#entity" }, { "match": "\\\\{" }, { "include": "#bindingExpr" }] }, "propOrVarTag": { "begin": "(</?)([a-zA-Z_][\\w\\.\\-]*?:)?((?:variable)|(?:property)|(?:prop))", "beginCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" }, "2": { "name": "keyword.operator.namespace.xmlui" }, "3": { "name": "entity.name.tag.localname.xmlui" } }, "end": "(/?>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" } }, "patterns": [{ "include": "#attribute" }, { "include": "#comments" }] }, "componentTag": { "begin": "(\\s*</?)((?:[a-zA-Z_][\\w\\.\\-]*?:)?)([a-zA-Z][\\w\\.\\-]*)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" }, "2": { "name": "keyword.operator.namespace.xmlui" }, "3": { "name": "support.class.tag.component.xmlui" } }, "end": "(/?>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" } }, "patterns": [{ "include": "#comments" }, { "include": "#eventHandler" }, { "include": "#attribute" }] }, "quotedStringJsInside": { "begin": "\"|'|`", "beginCaptures": { "0": { "name": "string.xmlui" } }, "end": "\\0", "endCaptures": { "0": { "name": "string.xmlui" } }, "contentName": "meta.embedded.block.javascript", "patterns": [{ "include": "source.js" }] }, "entity": { "captures": { "1": { "name": "punctuation.definition.constant.xmlui" }, "2": { "name": "punctuation.definition.constant.xmlui" }, "3": { "name": "punctuation.definition.constant.xmlui" } }, "match": "(&)((?:amp)|(?:lt)|(?:gt)|(?:quot)|(?:apos))(;)" }, "eventHandler": { "patterns": [{ "captures": { "1": { "name": "entity.other.attribute-name.localname.xmlui" }, "2": { "name": "keyword.operator.xmlui" } }, "match": "(?:^|\\s+)(on[A-Z][-\\w.:$]*)(\\s*=)" }, { "include": "#quotedStringJsInside" }] }, "attribute": { "patterns": [{ "begin": "(?:^|\\s+)((?:[a-zA-Z$_][-\\w.$]*:)?)([a-zA-Z$_][-\\w.$]*)(\\s*=\\s*)(['\"`])", "end": "\\4", "beginCaptures": { "1": { "name": "keyword.operator.namespace.xmlui" }, "2": { "name": "entity.other.attribute-name.localname.xmlui" }, "3": { "name": "keyword.operator.xmlui" }, "4": { "name": "string.xmlui" } }, "endCaptures": { "0": { "name": "string.xmlui" } }, "contentName": "string.xmlui", "patterns": [{ "include": "#textWithBindingExpr" }] }, { "match": "(?:^|\\s+)((?:[a-zA-Z$_][-\\w.$]*:)?)([a-zA-Z$_][-\\w.$]*)(\\s*=\\s*)([a-zA-Z$_][-\\w.$]*)", "captures": { "1": { "name": "keyword.operator.namespace.xmlui" }, "2": { "name": "entity.other.attribute-name.localname.xmlui" }, "3": { "name": "keyword.operator.xmlui" }, "4": { "name": "string.xmlui" } } }, { "match": "(?:^|\\s+)((?:[a-zA-Z$_][-\\w.$]*:)?)([a-zA-Z$_][-\\w.$]*)", "name": "entity.other.attribute-name.localname.xmlui", "captures": { "1": { "name": "keyword.operator.namespace.xmlui" }, "2": { "name": "entity.other.attribute-name.localname.xmlui" } } }] }, "comments": { "patterns": [{ "begin": "<!--", "captures": { "0": { "name": "punctuation.definition.comment.xmlui" } }, "end": "-->", "name": "comment.block.xmlui" }] } };
34
+ const repository = { "root": { "patterns": [{ "include": "#comments" }, { "include": "#helperTag" }, { "include": "#componentTag" }, { "include": "#entity" }, { "include": "#textWithBindingExpr" }, { "begin": "(<!\\[)(CDATA)(\\[)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" }, "2": { "name": "storage.xmlui" }, "3": { "name": "punctuation.definition.tag.xmlui" } }, "end": "]]>", "endCaptures": { "0": { "name": "punctuation.definition.tag.xmlui" } }, "contentName": "string.unquoted.cdata.xmlui" }] }, "methodTag": { "begin": "(<)((?:[a-zA-Z_][\\w\\.\\-]*?:)?)(method)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" }, "2": { "name": "keyword.operator.namespace.xmlui" }, "3": { "name": "entity.name.tag.localname.xmlui" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.xmlui" } }, "applyEndPatternLast": "1", "patterns": [{ "include": "#comments" }, { "include": "#valueAttributeScriptInside" }, { "include": "#attribute" }, { "begin": "(?<!/|(?:/\\s*(?:method))\\s*)>", "beginCaptures": { "0": { "name": "punctuation.definition.tag.xmlui" } }, "endCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" }, "2": { "name": "keyword.operator.namespace.xmlui" }, "3": { "name": "entity.name.tag.localname.xmlui" } }, "contentName": "meta.embedded.block.javascript", "patterns": [{ "include": "source.js" }], "end": "(</)((?:[a-zA-Z_][\\w\\.\\-]*?:)?)(method)(?=\\s*>)" }], "end": "/?>" }, "eventTag": { "begin": "(<)((?:[a-zA-Z_][\\w\\.\\-]*?:)?)(event)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" }, "2": { "name": "keyword.operator.namespace.xmlui" }, "3": { "name": "entity.name.tag.localname.xmlui" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.xmlui" } }, "applyEndPatternLast": "1", "patterns": [{ "include": "#comments" }, { "include": "#valueAttributeScriptInside" }, { "include": "#attribute" }, { "begin": "(?<!/|(?:/\\s*event)\\s*)(>)", "beginCaptures": { "0": { "name": "punctuation.definition.tag.xmlui" } }, "endCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" }, "2": { "name": "keyword.operator.namespace.xmlui" }, "3": { "name": "entity.name.tag.localname.xmlui" } }, "patterns": [{ "include": "#comments" }, { "include": "#componentTag" }, { "include": "source.js" }], "end": "(</)((?:[a-zA-Z_][\\w\\.\\-]*?:)?)(event)(?=\\s*>)" }], "end": ">" }, "fieldTag": { "begin": "(<)((?:[a-zA-Z_][\\w\\.\\-]*?:)?)(field)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" }, "2": { "name": "keyword.operator.namespace.xmlui" }, "3": { "name": "entity.name.tag.localname.xmlui" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.xmlui" } }, "applyEndPatternLast": "1", "patterns": [{ "include": "#comments" }, { "include": "#valueAttributeScriptInside" }, { "include": "#attribute" }, { "begin": "(?<!/|(?:/\\s*field)\\s*)(>)", "beginCaptures": { "0": { "name": "punctuation.definition.tag.xmlui" } }, "endCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" }, "2": { "name": "keyword.operator.namespace.xmlui" }, "3": { "name": "entity.name.tag.localname.xmlui" } }, "patterns": [{ "include": "#comments" }, { "include": "#componentTag" }, { "include": "source.js" }], "end": "(</)((?:[a-zA-Z_][\\w\\.\\-]*?:)?)(field)(?=\\s*>)" }], "end": ">" }, "itemTag": { "begin": "(<)((?:[a-zA-Z_][\\w\\.\\-]*?:)?)(item)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" }, "2": { "name": "keyword.operator.namespace.xmlui" }, "3": { "name": "entity.name.tag.localname.xmlui" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.xmlui" } }, "applyEndPatternLast": "1", "patterns": [{ "include": "#comments" }, { "include": "#valueAttributeScriptInside" }, { "include": "#attribute" }, { "begin": "(?<!/|(?:/\\s*item)\\s*)(>)", "beginCaptures": { "0": { "name": "punctuation.definition.tag.xmlui" } }, "endCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" }, "2": { "name": "keyword.operator.namespace.xmlui" }, "3": { "name": "entity.name.tag.localname.xmlui" } }, "patterns": [{ "include": "#comments" }, { "include": "#componentTag" }, { "include": "source.js" }], "end": "(</)((?:[a-zA-Z_][\\w\\.\\-]*?:)?)(item)(?=\\s*>)" }], "end": ">" }, "bindingExpr": { "contentName": "meta.embedded.block.javascript", "begin": "\\{", "end": "\\}", "beginCaptures": { "0": { "name": "entity.name.function.xmlui punctuation.definition.block.xmlui" } }, "endCaptures": { "0": { "name": "entity.name.function.xmlui punctuation.definition.block.xmlui" } }, "patterns": [{ "include": "source.js" }] }, "helperTag": { "patterns": [{ "include": "#scriptTag" }, { "include": "#eventTag" }, { "include": "#fieldTag" }, { "include": "#itemTag" }, { "include": "#methodTag" }, { "include": "#propOrVarTag" }] }, "valueAttributeScriptInside": { "patterns": [{ "captures": { "1": { "name": "entity.other.attribute-name.localname.xmlui" }, "2": { "name": "keyword.operator.xmlui" } }, "match": "(?:^|\\s+)(value)(\\s*=)" }, { "include": "#quotedStringJsInside" }] }, "scriptTag": { "begin": "(\\s*<)((?:[a-zA-Z_][\\w\\.\\-]*?:)?)(script)(\\s*>)", "end": "(\\s*</)(\\2)(\\3)(\\s*>)", "contentName": "meta.embedded.block.javascript", "beginCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" }, "2": { "name": "keyword.operator.namespace.xmlui" }, "3": { "name": "entity.name.function.xmlui" }, "4": { "name": "punctuation.definition.tag.xmlui" } }, "endCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" }, "2": { "name": "keyword.operator.namespace.xmlui" }, "3": { "name": "entity.name.function.xmlui" }, "4": { "name": "punctuation.definition.tag.xmlui" } }, "patterns": [{ "include": "source.js" }] }, "textWithBindingExpr": { "patterns": [{ "include": "#entity" }, { "match": "\\\\{" }, { "include": "#bindingExpr" }] }, "propOrVarTag": { "begin": "(</?)([a-zA-Z_][\\w\\.\\-]*?:)?((?:variable)|(?:property)|(?:prop))", "beginCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" }, "2": { "name": "keyword.operator.namespace.xmlui" }, "3": { "name": "entity.name.tag.localname.xmlui" } }, "end": "(/?>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" } }, "patterns": [{ "include": "#attribute" }, { "include": "#comments" }] }, "componentTag": { "begin": "(\\s*</?\\s*)((?:[a-zA-Z_][\\w\\.\\-]*?:)?)([a-zA-Z][\\w\\.\\-]*)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" }, "2": { "name": "keyword.operator.namespace.xmlui" }, "3": { "name": "support.class.tag.component.xmlui" } }, "end": "(/?>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.xmlui" } }, "patterns": [{ "include": "#comments" }, { "include": "#eventHandler" }, { "include": "#attribute" }] }, "quotedStringJsInside": { "begin": "\"|'|`", "beginCaptures": { "0": { "name": "string.xmlui" } }, "end": "\\0", "endCaptures": { "0": { "name": "string.xmlui" } }, "contentName": "meta.embedded.block.javascript", "patterns": [{ "include": "source.js" }] }, "entity": { "captures": { "1": { "name": "punctuation.definition.constant.xmlui" }, "2": { "name": "punctuation.definition.constant.xmlui" }, "3": { "name": "punctuation.definition.constant.xmlui" } }, "match": "(&)((?:amp)|(?:lt)|(?:gt)|(?:quot)|(?:apos))(;)" }, "eventHandler": { "patterns": [{ "captures": { "1": { "name": "entity.other.attribute-name.localname.xmlui" }, "2": { "name": "keyword.operator.xmlui" } }, "match": "(?:^|\\s+)(on[A-Z][-\\w.:$]*)(\\s*=)" }, { "include": "#quotedStringJsInside" }] }, "attribute": { "patterns": [{ "begin": "(?:^|\\s+)((?:[a-zA-Z$_][-\\w.$]*:)?)([a-zA-Z$_][-\\w.$]*)(\\s*=\\s*)(['\"`])", "end": "\\4", "beginCaptures": { "1": { "name": "keyword.operator.namespace.xmlui" }, "2": { "name": "entity.other.attribute-name.localname.xmlui" }, "3": { "name": "keyword.operator.xmlui" }, "4": { "name": "string.xmlui" } }, "endCaptures": { "0": { "name": "string.xmlui" } }, "contentName": "string.xmlui", "patterns": [{ "include": "#textWithBindingExpr" }] }, { "match": "(?:^|\\s+)((?:[a-zA-Z$_][-\\w.$]*:)?)([a-zA-Z$_][-\\w.$]*)(\\s*=\\s*)([a-zA-Z$_][-\\w.$]*)", "captures": { "1": { "name": "keyword.operator.namespace.xmlui" }, "2": { "name": "entity.other.attribute-name.localname.xmlui" }, "3": { "name": "keyword.operator.xmlui" }, "4": { "name": "string.xmlui" } } }, { "match": "(?:^|\\s+)((?:[a-zA-Z$_][-\\w.$]*:)?)([a-zA-Z$_][-\\w.$]*)", "name": "entity.other.attribute-name.localname.xmlui", "captures": { "1": { "name": "keyword.operator.namespace.xmlui" }, "2": { "name": "entity.other.attribute-name.localname.xmlui" } } }] }, "comments": { "patterns": [{ "begin": "<!--", "captures": { "0": { "name": "punctuation.definition.comment.xmlui" } }, "end": "-->", "name": "comment.block.xmlui" }] } };
35
35
  const xmlui_tmLanguage = {
36
36
  name,
37
37
  scopeName,
@@ -224,6 +224,7 @@ declare type CollectedDeclarations = {
224
224
  vars: Record<string, CodeDeclaration>;
225
225
  functions: Record<string, CodeDeclaration>;
226
226
  moduleErrors?: ModuleErrors;
227
+ hasInvalidStatements?: boolean;
227
228
  };
228
229
 
229
230
  declare type ComponentApiMetadata = {
@@ -345,9 +346,15 @@ declare type ComponentDriverParams = {
345
346
  page: Page_2;
346
347
  };
347
348
 
349
+ declare type ComponentEventMetadata = {
350
+ readonly description: string;
351
+ readonly signature?: string;
352
+ readonly parameters?: Record<string, string>;
353
+ };
354
+
348
355
  declare type ComponentLike = ComponentDef | CompoundComponentDef;
349
356
 
350
- declare type ComponentMetadata<TProps extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TEvents extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TContextValues extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TApis extends Record<string, ComponentApiMetadata> = Record<string, any>> = {
357
+ declare type ComponentMetadata<TProps extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TEvents extends Record<string, ComponentEventMetadata> = Record<string, any>, TContextValues extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TApis extends Record<string, ComponentApiMetadata> = Record<string, any>> = {
351
358
  status?: "stable" | "experimental" | "deprecated" | "in progress" | "internal";
352
359
  description?: string;
353
360
  shortDescription?: string;
@@ -1,5 +1,5 @@
1
1
  import { expect as expect$1, test as test$1 } from "@playwright/test";
2
- import { x as xmlUiMarkupToComponent, P as PART_START_ADORNMENT, a as PART_END_ADORNMENT, b as PART_INPUT } from "./xmlui-parser-9Yk-asFP.js";
2
+ import { x as xmlUiMarkupToComponent, P as PART_START_ADORNMENT, a as PART_END_ADORNMENT, b as PART_INPUT } from "./xmlui-parser-DXCqrM50.js";
3
3
  import "chroma-js";
4
4
  function parseComponentIfNecessary(rawComponent) {
5
5
  if (typeof rawComponent === "string") {
@@ -401,7 +401,7 @@ class BackdropDriver extends ComponentDriver {
401
401
  return this.component.locator("> *").nth(1);
402
402
  }
403
403
  getDefaultBackgroundColor() {
404
- return "rgb(0, 0, 0)";
404
+ return "rgba(0, 0, 0, 0)";
405
405
  }
406
406
  getDefaultOpacity() {
407
407
  return "0.1";
@@ -6188,7 +6188,8 @@ function collectCodeBehindFromSource(moduleName, source) {
6188
6188
  const result = {
6189
6189
  vars: {},
6190
6190
  moduleErrors: {},
6191
- functions: {}
6191
+ functions: {},
6192
+ hasInvalidStatements: false
6192
6193
  };
6193
6194
  const collectedFunctions = {};
6194
6195
  const parsedModule = parseScriptModule(moduleName, source);
@@ -6212,7 +6213,7 @@ function collectCodeBehindFromSource(moduleName, source) {
6212
6213
  addFunctionDeclaration(stmt);
6213
6214
  break;
6214
6215
  default:
6215
- throw new Error(`Only reactive variable and function definitions are allowed in a code-behind module.`);
6216
+ result.hasInvalidStatements = true;
6216
6217
  }
6217
6218
  });
6218
6219
  return result;
@@ -6335,6 +6336,7 @@ const CORE_NS_KEY = "core-ns";
6335
6336
  const CORE_NAMESPACE_VALUE = "#xmlui-core-ns";
6336
6337
  const HelperNode = {
6337
6338
  property: "property",
6339
+ template: "template",
6338
6340
  event: "event",
6339
6341
  variable: "variable",
6340
6342
  loaders: "loaders",
@@ -6527,6 +6529,7 @@ function nodeToComponentDef(node, originalGetText, fileId) {
6527
6529
  }
6528
6530
  switch (childName) {
6529
6531
  case "property":
6532
+ case "template":
6530
6533
  collectElementHelper(
6531
6534
  usesStack2,
6532
6535
  comp,
@@ -6601,6 +6604,9 @@ function nodeToComponentDef(node, originalGetText, fileId) {
6601
6604
  try {
6602
6605
  parser.parseStatements();
6603
6606
  comp.scriptCollected = collectCodeBehindFromSource("Main", comp.script);
6607
+ if (comp.scriptCollected.hasInvalidStatements) {
6608
+ comp.scriptError = new Error(`Only reactive variable and function definitions are allowed in a code-behind module.`);
6609
+ }
6604
6610
  } catch (err) {
6605
6611
  if (parser.errors && parser.errors.length > 0) {
6606
6612
  const errMsg = parser.errors[0];
@@ -6883,7 +6889,7 @@ function nodeToComponentDef(node, originalGetText, fileId) {
6883
6889
  const childNodes = getChildNodes(node2);
6884
6890
  const tagName = getComponentName(node2, getText);
6885
6891
  const hasComponentName = !(tagName in HelperNode);
6886
- const shouldUseTextNodeElement = hasComponentName || tagName === "property";
6892
+ const shouldUseTextNodeElement = hasComponentName || tagName === "property" || tagName === "template";
6887
6893
  const shouldCollapseWhitespace = tagName !== "event" && tagName !== "method";
6888
6894
  const attrs = getAttributes(node2);
6889
6895
  desugarKeyOnlyAttrs(attrs);
@@ -5707,7 +5707,8 @@ function collectCodeBehindFromSource(moduleName, source) {
5707
5707
  const result = {
5708
5708
  vars: {},
5709
5709
  moduleErrors: {},
5710
- functions: {}
5710
+ functions: {},
5711
+ hasInvalidStatements: false
5711
5712
  };
5712
5713
  const collectedFunctions = {};
5713
5714
  const parsedModule = parseScriptModule(moduleName, source);
@@ -5729,7 +5730,7 @@ function collectCodeBehindFromSource(moduleName, source) {
5729
5730
  case T_FUNCTION_DECLARATION:
5730
5731
  addFunctionDeclaration(stmt);
5731
5732
  break;
5732
- default: throw new Error(`Only reactive variable and function definitions are allowed in a code-behind module.`);
5733
+ default: result.hasInvalidStatements = true;
5733
5734
  }
5734
5735
  });
5735
5736
  return result;
@@ -7114,6 +7115,7 @@ const CORE_NS_KEY = "core-ns";
7114
7115
  const CORE_NAMESPACE_VALUE = "#xmlui-core-ns";
7115
7116
  const HelperNode = {
7116
7117
  property: "property",
7118
+ template: "template",
7117
7119
  event: "event",
7118
7120
  variable: "variable",
7119
7121
  loaders: "loaders",
@@ -7262,6 +7264,7 @@ function nodeToComponentDef(node, originalGetText, fileId) {
7262
7264
  }
7263
7265
  switch (childName) {
7264
7266
  case "property":
7267
+ case "template":
7265
7268
  collectElementHelper(usesStack$1, comp, child, (name) => isComponent(comp) ? comp.props?.[name] : void 0, (name, value) => {
7266
7269
  if (!isComponent(comp)) return;
7267
7270
  comp.props ??= {};
@@ -7307,6 +7310,7 @@ function nodeToComponentDef(node, originalGetText, fileId) {
7307
7310
  try {
7308
7311
  parser.parseStatements();
7309
7312
  comp.scriptCollected = collectCodeBehindFromSource("Main", comp.script);
7313
+ if (comp.scriptCollected.hasInvalidStatements) comp.scriptError = /* @__PURE__ */ new Error(`Only reactive variable and function definitions are allowed in a code-behind module.`);
7310
7314
  } catch (err) {
7311
7315
  if (parser.errors && parser.errors.length > 0) {
7312
7316
  const errMsg = parser.errors[0];
@@ -7552,7 +7556,7 @@ function nodeToComponentDef(node, originalGetText, fileId) {
7552
7556
  function prepNode(node$1) {
7553
7557
  const childNodes = getChildNodes(node$1);
7554
7558
  const tagName = getComponentName(node$1, getText);
7555
- const shouldUseTextNodeElement = !(tagName in HelperNode) || tagName === "property";
7559
+ const shouldUseTextNodeElement = !(tagName in HelperNode) || tagName === "property" || tagName === "template";
7556
7560
  const shouldCollapseWhitespace = tagName !== "event" && tagName !== "method";
7557
7561
  const attrs = getAttributes(node$1);
7558
7562
  desugarKeyOnlyAttrs(attrs);
@@ -1,4 +1,4 @@
1
- import { h as createXmlUiParser, w as nodeToComponentDef, D as DiagnosticCategory, E as ErrCodes, S as SyntaxKind } from "./transform-CQ_6R-43.js";
1
+ import { h as createXmlUiParser, w as nodeToComponentDef, D as DiagnosticCategory, E as ErrCodes, S as SyntaxKind } from "./transform-FiPBuy3W.js";
2
2
  const PART_LABEL = "label";
3
3
  const PART_LABELED_ITEM = "labeledItem";
4
4
  const PART_INPUT = "input";
@@ -244,6 +244,7 @@ declare type CollectedDeclarations = {
244
244
  vars: Record<string, CodeDeclaration>;
245
245
  functions: Record<string, CodeDeclaration>;
246
246
  moduleErrors?: ModuleErrors;
247
+ hasInvalidStatements?: boolean;
247
248
  };
248
249
 
249
250
  declare type ComponentApiMetadata = {
@@ -329,6 +330,12 @@ declare interface ComponentDefCore {
329
330
  debug?: Record<string, any>;
330
331
  }
331
332
 
333
+ declare type ComponentEventMetadata = {
334
+ readonly description: string;
335
+ readonly signature?: string;
336
+ readonly parameters?: Record<string, string>;
337
+ };
338
+
332
339
  export declare const componentFileExtension = "xmlui";
333
340
 
334
341
  declare type ComponentLike = ComponentDef | CompoundComponentDef;
@@ -341,7 +348,7 @@ export declare type ComponentLints = {
341
348
  componentName: string;
342
349
  };
343
350
 
344
- declare type ComponentMetadata<TProps extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TEvents extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TContextValues extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TApis extends Record<string, ComponentApiMetadata> = Record<string, any>> = {
351
+ declare type ComponentMetadata<TProps extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TEvents extends Record<string, ComponentEventMetadata> = Record<string, any>, TContextValues extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TApis extends Record<string, ComponentApiMetadata> = Record<string, any>> = {
345
352
  status?: "stable" | "experimental" | "deprecated" | "in progress" | "internal";
346
353
  description?: string;
347
354
  shortDescription?: string;
@@ -1,5 +1,5 @@
1
- import { q, s, A, t, v, C, r, a, b, f, e, g, c, D, o, E, N, P, S, T, U, j, h, d, i, B, n, k, m, l, w, u, p, x, z, y } from "./transform-CQ_6R-43.js";
2
- import { b as b2, L, X, a as a2, c as c2, g as g2, e as e2, l as l2, d as d2, m as m2, p as p2 } from "./xmlui-serializer-CeCcgdVR.js";
1
+ import { q, s, A, t, v, C, r, a, b, f, e, g, c, D, o, E, N, P, S, T, U, j, h, d, i, B, n, k, m, l, w, u, p, x, z, y } from "./transform-FiPBuy3W.js";
2
+ import { b as b2, L, X, a as a2, c as c2, g as g2, e as e2, l as l2, d as d2, m as m2, p as p2 } from "./xmlui-serializer-D4ixnQay.js";
3
3
  export {
4
4
  q as AttributeKeyNode,
5
5
  s as AttributeListNode,
@@ -1,4 +1,4 @@
1
- import { v as CORE_NAMESPACE_VALUE, t as COMPOUND_COMP_ID } from "./transform-CQ_6R-43.js";
1
+ import { v as CORE_NAMESPACE_VALUE, t as COMPOUND_COMP_ID } from "./transform-FiPBuy3W.js";
2
2
  const componentFileExtension = "xmlui";
3
3
  const codeBehindFileExtension = "xmlui.xs";
4
4
  const moduleFileExtension = "xs";
@@ -375,6 +375,7 @@ declare type CollectedDeclarations = {
375
375
  vars: Record<string, CodeDeclaration>;
376
376
  functions: Record<string, CodeDeclaration>;
377
377
  moduleErrors?: ModuleErrors;
378
+ hasInvalidStatements?: boolean;
378
379
  };
379
380
 
380
381
  declare type ColorDef = {
@@ -488,11 +489,17 @@ declare interface ComponentDefCore {
488
489
  debug?: Record<string, any>;
489
490
  }
490
491
 
492
+ declare type ComponentEventMetadata = {
493
+ readonly description: string;
494
+ readonly signature?: string;
495
+ readonly parameters?: Record<string, string>;
496
+ };
497
+
491
498
  declare type ComponentExtension = ComponentRendererDef | CompoundComponentRendererInfo;
492
499
 
493
500
  export declare type ComponentLike = ComponentDef | CompoundComponentDef;
494
501
 
495
- export declare type ComponentMetadata<TProps extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TEvents extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TContextValues extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TApis extends Record<string, ComponentApiMetadata> = Record<string, any>> = {
502
+ export declare type ComponentMetadata<TProps extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TEvents extends Record<string, ComponentEventMetadata> = Record<string, any>, TContextValues extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TApis extends Record<string, ComponentApiMetadata> = Record<string, any>> = {
496
503
  status?: "stable" | "experimental" | "deprecated" | "in progress" | "internal";
497
504
  description?: string;
498
505
  shortDescription?: string;
@@ -645,13 +652,13 @@ export declare function d(description: string, availableValues?: readonly Proper
645
652
 
646
653
  export declare function dAutoFocus(): ComponentPropertyMetadata;
647
654
 
648
- export declare function dClick(comp: string): ComponentPropertyMetadata;
655
+ export declare function dClick(comp: string): ComponentEventMetadata;
649
656
 
650
657
  export declare function dCollapse(comp: string): ComponentPropertyMetadata;
651
658
 
652
659
  export declare function dComponent(description: string): ComponentPropertyMetadata;
653
660
 
654
- export declare function dDidChange(comp: string): ComponentPropertyMetadata;
661
+ export declare function dDidChange(comp: string): ComponentEventMetadata;
655
662
 
656
663
  export declare function dDidClose(comp: string): ComponentPropertyMetadata;
657
664
 
@@ -687,7 +694,7 @@ export declare function dExpanded(comp: string): ComponentPropertyMetadata;
687
694
 
688
695
  export declare function dFocus(comp: string): ComponentPropertyMetadata;
689
696
 
690
- export declare function dGotFocus(comp: string): ComponentPropertyMetadata;
697
+ export declare function dGotFocus(comp: string): ComponentEventMetadata;
691
698
 
692
699
  declare enum DiagnosticCategory {
693
700
  Error = 1,
@@ -698,6 +705,8 @@ declare enum DiagnosticCategory {
698
705
 
699
706
  export declare function dIndeterminate(defaultValue?: boolean): ComponentPropertyMetadata;
700
707
 
708
+ export declare function dInit(comp: string): ComponentEventMetadata;
709
+
701
710
  export declare function dInitialValue(value?: any): ComponentPropertyMetadata;
702
711
 
703
712
  export declare function dInternal(description?: string): ComponentPropertyMetadata;
@@ -710,7 +719,7 @@ export declare function dLabelPosition(def?: string): ComponentPropertyMetadata;
710
719
 
711
720
  export declare function dLabelWidth(comp: string): ComponentPropertyMetadata;
712
721
 
713
- export declare function dLostFocus(comp: string): ComponentPropertyMetadata;
722
+ export declare function dLostFocus(comp: string): ComponentEventMetadata;
714
723
 
715
724
  export declare function dMaxLength(): ComponentPropertyMetadata;
716
725
 
@@ -983,6 +992,7 @@ declare interface IAppLayoutContext {
983
992
  scrollWholePage?: boolean;
984
993
  isFullVerticalWidth?: boolean;
985
994
  isNested?: boolean;
995
+ setScrollRestorationEnabled?: (enabled: boolean) => void;
986
996
  }
987
997
 
988
998
  export declare const Icon: default_2.ForwardRefExoticComponent<IconBaseProps & default_2.RefAttributes<HTMLElement>>;
package/dist/lib/xmlui.js CHANGED
@@ -1,39 +1,39 @@
1
- import { aa, Z, al, a1, ax, av, _, $, ai, ak, ay, aw, ag, ab, a2, a0, S, ar, b, ao, ap, a4, a5, ae, af, as, aj, at, au, ah, ad, c, f, e, h, j, k, l, i, n, p, q, s, u, v, x, w, t, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, P, N, O, Q, R, U, V, a3, W, X, a7, an, a6, a8, aq, a9, am, Y, ac } from "./index-BvICspZ1.js";
2
- import { f as f2, x as x2 } from "./xmlui-parser-9Yk-asFP.js";
3
- import { X as X2 } from "./xmlui-serializer-CeCcgdVR.js";
1
+ import { ab, _, am, a2, ay, aw, $, a0, aj, al, az, ax, ah, ac, a3, a1, S, as, b, ap, aq, a5, a6, af, ag, at, ak, au, av, ai, ae, c, f, e, h, j, k, l, i, n, p, q, s, u, v, x, w, t, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, Q, O, P, R, U, V, W, a4, X, Y, a8, ao, a7, a9, ar, aa, an, Z, ad } from "./index-9UB61miF.js";
2
+ import { f as f2, x as x2 } from "./xmlui-parser-DXCqrM50.js";
3
+ import { X as X2 } from "./xmlui-serializer-D4ixnQay.js";
4
4
  export {
5
- aa as ApiInterceptorProvider,
6
- Z as AppRoot,
7
- al as Breakout,
8
- a1 as Button,
9
- ax as ContentSeparator,
10
- av as DropdownMenu,
11
- _ as ErrorBoundary,
12
- $ as Icon,
13
- ai as LinkNative,
14
- ak as Logo,
15
- ay as MemoizedItem,
16
- aw as MenuItem,
17
- ag as NestedApp,
18
- ab as Spinner,
19
- a2 as Splitter,
20
- a0 as Stack,
5
+ ab as ApiInterceptorProvider,
6
+ _ as AppRoot,
7
+ am as Breakout,
8
+ a2 as Button,
9
+ ay as ContentSeparator,
10
+ aw as DropdownMenu,
11
+ $ as ErrorBoundary,
12
+ a0 as Icon,
13
+ aj as LinkNative,
14
+ al as Logo,
15
+ az as MemoizedItem,
16
+ ax as MenuItem,
17
+ ah as NestedApp,
18
+ ac as Spinner,
19
+ a3 as Splitter,
20
+ a1 as Stack,
21
21
  S as StandaloneApp,
22
- ar as StandaloneComponent,
22
+ as as StandaloneComponent,
23
23
  b as StandaloneExtensionManager,
24
- ao as StyleProvider,
25
- ap as StyleRegistry,
26
- a4 as TabItem,
27
- a5 as Tabs,
28
- ae as Text,
29
- af as TextBox,
30
- as as Theme,
31
- aj as ToneChangerButton,
32
- at as ToneSwitch,
33
- au as Tooltip,
34
- ah as VisuallyHidden,
24
+ ap as StyleProvider,
25
+ aq as StyleRegistry,
26
+ a5 as TabItem,
27
+ a6 as Tabs,
28
+ af as Text,
29
+ ag as TextBox,
30
+ at as Theme,
31
+ ak as ToneChangerButton,
32
+ au as ToneSwitch,
33
+ av as Tooltip,
34
+ ai as VisuallyHidden,
35
35
  X2 as XmlUiHelper,
36
- ad as builtInThemes,
36
+ ae as builtInThemes,
37
37
  c as createComponentRenderer,
38
38
  f as createMetadata,
39
39
  e as createUserDefinedComponentRenderer,
@@ -53,38 +53,39 @@ export {
53
53
  t as dFocus,
54
54
  y as dGotFocus,
55
55
  z as dIndeterminate,
56
- A as dInitialValue,
57
- B as dInternal,
58
- C as dLabel,
59
- D as dLabelBreak,
60
- E as dLabelPosition,
61
- F as dLabelWidth,
62
- G as dLostFocus,
63
- H as dMaxLength,
64
- I as dMulti,
65
- J as dOrientation,
66
- K as dPlaceholder,
67
- L as dReadonly,
68
- M as dRequired,
69
- P as dSetValueApi,
70
- N as dStartIcon,
71
- O as dStartText,
72
- Q as dTriggerTemplate,
73
- R as dValidationStatus,
74
- U as dValue,
75
- V as dValueApi,
56
+ A as dInit,
57
+ B as dInitialValue,
58
+ C as dInternal,
59
+ D as dLabel,
60
+ E as dLabelBreak,
61
+ F as dLabelPosition,
62
+ G as dLabelWidth,
63
+ H as dLostFocus,
64
+ I as dMaxLength,
65
+ J as dMulti,
66
+ K as dOrientation,
67
+ L as dPlaceholder,
68
+ M as dReadonly,
69
+ N as dRequired,
70
+ Q as dSetValueApi,
71
+ O as dStartIcon,
72
+ P as dStartText,
73
+ R as dTriggerTemplate,
74
+ U as dValidationStatus,
75
+ V as dValue,
76
+ W as dValueApi,
76
77
  f2 as errReportComponent,
77
- a3 as getColor,
78
- W as parseScssVar,
79
- X as startApp,
80
- a7 as toCssVar,
81
- an as useAppLayoutContext,
82
- a6 as useColors,
83
- a8 as useDevTools,
84
- aq as useEvent,
85
- a9 as useLogger,
86
- am as useSearchContextContent,
87
- Y as useTheme,
88
- ac as useThemes,
78
+ a4 as getColor,
79
+ X as parseScssVar,
80
+ Y as startApp,
81
+ a8 as toCssVar,
82
+ ao as useAppLayoutContext,
83
+ a7 as useColors,
84
+ a9 as useDevTools,
85
+ ar as useEvent,
86
+ aa as useLogger,
87
+ an as useSearchContextContent,
88
+ Z as useTheme,
89
+ ad as useThemes,
89
90
  x2 as xmlUiMarkupToComponent
90
91
  };