xmlui 0.10.19 → 0.10.20

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 (109) hide show
  1. package/dist/lib/{apiInterceptorWorker-DPgtUtdA.mjs → apiInterceptorWorker-QiltRtq1.mjs} +1 -1
  2. package/dist/lib/{index-cuh97e2e.mjs → index-Ckhnrf1F.mjs} +848 -615
  3. package/dist/lib/index.css +1 -1
  4. package/dist/{metadata/initMock-C-cnv--V.mjs → lib/initMock-qnCFw6Zc.mjs} +25 -15
  5. package/dist/lib/language-server-web-worker.mjs +1 -1
  6. package/dist/lib/language-server.mjs +1 -1
  7. package/dist/lib/{metadata-utils-CtY0QcvH.mjs → metadata-utils-BTIt1_wE.mjs} +1 -1
  8. package/dist/lib/{server-common-Cine5nRR.mjs → server-common-DYZtsdM7.mjs} +51 -14
  9. package/dist/lib/{transform-bHBjkKSL.mjs → transform-Tooy42EB.mjs} +16 -18
  10. package/dist/lib/xmlui-parser.mjs +2 -2
  11. package/dist/lib/{xmlui-serializer-DB6BLiXK.mjs → xmlui-serializer-uCYa8_tZ.mjs} +1 -1
  12. package/dist/lib/xmlui.d.ts +11 -3
  13. package/dist/lib/xmlui.mjs +2 -2
  14. package/dist/metadata/{apiInterceptorWorker-BmKP8bnq.mjs → apiInterceptorWorker-Dql7QGw2.mjs} +1 -1
  15. package/dist/metadata/{collectedComponentMetadata-Cp-9lpnG.mjs → collectedComponentMetadata-Dg7P-zOz.mjs} +824 -600
  16. package/dist/{lib/initMock-BMxsanHc.mjs → metadata/initMock-ZyyFNOpL.mjs} +25 -15
  17. package/dist/metadata/style.css +1 -1
  18. package/dist/metadata/xmlui-metadata.mjs +1 -1
  19. package/dist/metadata/xmlui-metadata.umd.js +3 -3
  20. package/dist/scripts/package.json +1 -1
  21. package/dist/scripts/src/components/Animation/AnimationNative.js +28 -28
  22. package/dist/scripts/src/components/App/App.spec.js +17 -17
  23. package/dist/scripts/src/components/AppState/AppState.js +3 -2
  24. package/dist/scripts/src/components/AppState/AppState.spec.js +26 -2
  25. package/dist/scripts/src/components/AppState/AppStateNative.js +3 -4
  26. package/dist/scripts/src/components/AutoComplete/AutoComplete.js +15 -10
  27. package/dist/scripts/src/components/AutoComplete/AutoCompleteNative.js +4 -4
  28. package/dist/scripts/src/components/Carousel/Carousel.spec.js +214 -0
  29. package/dist/scripts/src/components/CodeBlock/CodeBlockNative.js +1 -1
  30. package/dist/scripts/src/components/ContentSeparator/ContentSeparator.js +2 -0
  31. package/dist/scripts/src/components/ContentSeparator/ContentSeparator.spec.js +193 -0
  32. package/dist/scripts/src/components/DateInput/DateInput.spec.js +6 -6
  33. package/dist/scripts/src/components/DropdownMenu/DropdownMenu.spec.js +3 -3
  34. package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZoneNative.js +4 -13
  35. package/dist/scripts/src/components/Form/Form.spec.js +25 -9
  36. package/dist/scripts/src/components/Form/FormNative.js +7 -4
  37. package/dist/scripts/src/components/FormItem/FormItem.js +3 -1
  38. package/dist/scripts/src/components/FormItem/FormItem.spec.js +5 -14
  39. package/dist/scripts/src/components/FormItem/FormItemNative.js +12 -8
  40. package/dist/scripts/src/components/FormItem/Validations.js +2 -2
  41. package/dist/scripts/src/components/IconRegistryContext.js +1 -1
  42. package/dist/scripts/src/components/List/ListNative.js +2 -2
  43. package/dist/scripts/src/components/ModalDialog/ConfirmationModalContextProvider.js +3 -12
  44. package/dist/scripts/src/components/ModalDialog/ModalDialog.js +2 -2
  45. package/dist/scripts/src/components/ModalDialog/ModalDialogNative.js +6 -3
  46. package/dist/scripts/src/components/NestedApp/AppWithCodeViewNative.js +1 -1
  47. package/dist/scripts/src/components/NestedApp/NestedAppNative.js +3 -3
  48. package/dist/scripts/src/components/NumberBox/NumberBox.spec.js +2 -2
  49. package/dist/scripts/src/components/Pagination/Pagination.spec.js +5 -0
  50. package/dist/scripts/src/components/Pagination/PaginationNative.js +1 -3
  51. package/dist/scripts/src/components/Queue/Queue.spec.js +45 -47
  52. package/dist/scripts/src/components/Queue/QueueNative.js +1 -1
  53. package/dist/scripts/src/components/RadioGroup/RadioGroup.spec.js +5 -5
  54. package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapterNative.js +1 -1
  55. package/dist/scripts/src/components/Select/MultiSelectOption.js +42 -0
  56. package/dist/scripts/src/components/Select/Select.js +3 -3
  57. package/dist/scripts/src/components/Select/SelectContext.js +8 -1
  58. package/dist/scripts/src/components/Select/SelectNative.js +134 -142
  59. package/dist/scripts/src/components/Select/SelectOption.js +34 -0
  60. package/dist/scripts/src/components/Select/SimpleSelect.js +57 -0
  61. package/dist/scripts/src/components/Spinner/Spinner.spec.js +1 -1
  62. package/dist/scripts/src/components/Table/useRowSelection.js +14 -23
  63. package/dist/scripts/src/components/TextArea/TextArea.spec.js +8 -8
  64. package/dist/scripts/src/components/Theme/Theme.js +2 -1
  65. package/dist/scripts/src/components/Theme/Theme.spec.js +266 -0
  66. package/dist/scripts/src/components/Theme/ThemeNative.js +8 -1
  67. package/dist/scripts/src/components/TimeInput/TimeInput.spec.js +3 -3
  68. package/dist/scripts/src/components/Tree/TreeNative.js +9 -11
  69. package/dist/scripts/src/components-core/InspectorContext.js +1 -1
  70. package/dist/scripts/src/components-core/StandaloneApp.js +6 -8
  71. package/dist/scripts/src/components-core/action/FileUploadAction.js +1 -1
  72. package/dist/scripts/src/components-core/behaviors/BehaviorContext.js +50 -0
  73. package/dist/scripts/src/components-core/behaviors/CoreBehaviors.js +6 -1
  74. package/dist/scripts/src/components-core/interception/ApiInterceptor.js +9 -11
  75. package/dist/scripts/src/components-core/interception/ApiInterceptorProvider.js +3 -3
  76. package/dist/scripts/src/components-core/interception/Backend.js +1 -1
  77. package/dist/scripts/src/components-core/interception/IndexedDb.js +64 -66
  78. package/dist/scripts/src/components-core/interception/apiInterceptorWorker.js +2 -2
  79. package/dist/scripts/src/components-core/loader/DataLoader.js +6 -14
  80. package/dist/scripts/src/components-core/loader/Loader.js +11 -11
  81. package/dist/scripts/src/components-core/loader/MockLoaderRenderer.js +4 -2
  82. package/dist/scripts/src/components-core/loader/PageableLoader.js +10 -9
  83. package/dist/scripts/src/components-core/rendering/AppContent.js +1 -7
  84. package/dist/scripts/src/components-core/rendering/ErrorBoundary.js +1 -1
  85. package/dist/scripts/src/components-core/script-runner/bannedFunctions.js +1 -1
  86. package/dist/scripts/src/components-core/script-runner/eval-tree-async.js +180 -186
  87. package/dist/scripts/src/components-core/script-runner/eval-tree-sync.js +6 -6
  88. package/dist/scripts/src/components-core/script-runner/process-statement-sync.js +2 -2
  89. package/dist/scripts/src/components-core/utils/actionUtils.js +1 -1
  90. package/dist/scripts/src/components-core/utils/hooks.js +1 -1
  91. package/dist/scripts/src/components-core/utils/misc.js +4 -4
  92. package/dist/scripts/src/components-core/xmlui-parser.js +47 -31
  93. package/dist/scripts/src/language-server/server-common.js +25 -24
  94. package/dist/scripts/src/language-server/services/common/lsp-utils.js +2 -2
  95. package/dist/scripts/src/language-server/services/completion.js +20 -2
  96. package/dist/scripts/src/language-server/services/diagnostic.js +1 -1
  97. package/dist/scripts/src/language-server/services/hover.js +2 -2
  98. package/dist/scripts/src/parsers/common/utils.js +2 -2
  99. package/dist/scripts/src/parsers/scripting/Lexer.js +21 -15
  100. package/dist/scripts/src/parsers/scripting/Parser.js +8 -9
  101. package/dist/scripts/src/parsers/style-parser/StyleLexer.js +22 -22
  102. package/dist/scripts/src/parsers/style-parser/StyleParser.js +70 -68
  103. package/dist/scripts/src/testing/ComponentDrivers.js +20 -39
  104. package/dist/scripts/src/testing/component-test-helpers.js +34 -50
  105. package/dist/scripts/src/testing/fixtures.js +114 -113
  106. package/dist/scripts/src/testing/themed-app-test-helpers.js +7 -13
  107. package/dist/standalone/xmlui-standalone.es.d.ts +11 -3
  108. package/dist/standalone/xmlui-standalone.umd.js +12 -12
  109. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { delay as delay$1, HttpResponse, matchRequestUrl } from "msw";
2
2
  import { isArray, isObject, mapValues } from "lodash-es";
3
- import { r as runEventHandlerCode, g as getDate, d as delay, m as miscellaneousUtils, a as dateFunctions, o as orderBy, T as ThrowStatementError } from "./collectedComponentMetadata-Cp-9lpnG.mjs";
3
+ import { r as runEventHandlerCode, g as getDate, d as delay, m as miscellaneousUtils, a as dateFunctions, o as orderBy, T as ThrowStatementError } from "./index-Ckhnrf1F.mjs";
4
4
  import Dexie from "dexie";
5
5
  var HttpStatusCode = /* @__PURE__ */ ((HttpStatusCode2) => {
6
6
  HttpStatusCode2[HttpStatusCode2["Continue"] = 100] = "Continue";
@@ -180,7 +180,7 @@ class Backend {
180
180
  return helper;
181
181
  });
182
182
  if (definition.initialize) {
183
- this.runFn(definition.initialize);
183
+ void this.runFn(definition.initialize);
184
184
  }
185
185
  }
186
186
  async executeOperation(operationId, requestParams, cookieService, headerService) {
@@ -370,8 +370,8 @@ class IndexedDb {
370
370
  return ret.find((_v, index) => results[index]);
371
371
  };
372
372
  this.getItemById = async (resourceId, id) => {
373
- return await this.getItem(resourceId, async (item) => {
374
- return item.id + "" === id + "";
373
+ return await this.getItem(resourceId, (item) => {
374
+ return Promise.resolve(item.id + "" === id + "");
375
375
  });
376
376
  };
377
377
  this.deleteItems = async (resourceId, predicate) => {
@@ -460,11 +460,11 @@ class IndexedDb {
460
460
  await this.db.transaction("rw", tables, actions);
461
461
  }
462
462
  }
463
- async function createTableWrapper(table) {
463
+ function createTableWrapper(table) {
464
464
  const getDataFn = () => table.db.table(table.name);
465
465
  const filteredData = async (predicate) => {
466
466
  const dataSnapshot = await table.toArray();
467
- const results = await Promise.all(dataSnapshot.map(predicate ?? (async () => true)));
467
+ const results = await Promise.all(dataSnapshot.map(predicate ?? (() => Promise.resolve(true))));
468
468
  return dataSnapshot.filter((_v, index) => results[index]);
469
469
  };
470
470
  return {
@@ -492,7 +492,7 @@ async function createTableWrapper(table) {
492
492
  if (table.schema.primKey.src === "++id") {
493
493
  safeId = Number(id);
494
494
  }
495
- return table.get(safeId);
495
+ return await table.get(safeId);
496
496
  },
497
497
  toArray: async () => await table.toArray(),
498
498
  single: async (predicate) => await new ReadOnlyCollection(await table.toArray()).single(predicate),
@@ -755,10 +755,7 @@ class ApiInterceptor {
755
755
  headers.append("Content-type", ret.type);
756
756
  headers.append("Content-Length", ret.size + "");
757
757
  const encodedFilename = encodeURIComponent(ret.name);
758
- headers.append(
759
- "Content-Disposition",
760
- `attachment; filename*=UTF-8''${encodedFilename}`
761
- );
758
+ headers.append("Content-Disposition", `attachment; filename*=UTF-8''${encodedFilename}`);
762
759
  return HttpResponse.arrayBuffer(await ret.arrayBuffer(), {
763
760
  headers,
764
761
  status: successStatusCode
@@ -804,20 +801,33 @@ class ApiInterceptor {
804
801
  }
805
802
  getMockForRequest(url, options) {
806
803
  return Object.entries(this.getOperations()).find(([operationId, operationDef]) => {
807
- if (matchRequestUrl(new URL(url, window.location.href), `${this.getApiUrl()}${operationDef.url}`, `${window.location.href}`).matches && (options.method || "get").toLowerCase() === operationDef.method.toLowerCase()) {
804
+ if (matchRequestUrl(
805
+ new URL(url, window.location.href),
806
+ `${this.getApiUrl()}${operationDef.url}`,
807
+ `${window.location.href}`
808
+ ).matches && (options.method || "get").toLowerCase() === operationDef.method.toLowerCase()) {
808
809
  return true;
809
810
  }
810
811
  return false;
811
812
  });
812
813
  }
813
- async executeMockedFetch(url, options) {
814
+ executeMockedFetch(url, options) {
814
815
  const mockForRequest = this.getMockForRequest(url, options);
815
816
  if (!mockForRequest) {
816
817
  throw new Error(`No mock found for request: ${url} with options: ${JSON.stringify(options)}`);
817
818
  }
818
819
  const [operationId, operationDef] = mockForRequest;
819
- const match = matchRequestUrl(new URL(url, window.location.href), `${this.getApiUrl()}${operationDef.url}`, `${window.location.href}`);
820
- return this.executeOperation(operationId, new Request(url, options), getCookiesAsObject(), match.params);
820
+ const match = matchRequestUrl(
821
+ new URL(url, window.location.href),
822
+ `${this.getApiUrl()}${operationDef.url}`,
823
+ `${window.location.href}`
824
+ );
825
+ return this.executeOperation(
826
+ operationId,
827
+ new Request(url, options),
828
+ getCookiesAsObject(),
829
+ match.params
830
+ );
821
831
  }
822
832
  }
823
833
  function getCookiesAsObject() {
@@ -1,4 +1,4 @@
1
- import { m as main, s as start } from "./server-common-Cine5nRR.mjs";
1
+ import { m as main, s as start } from "./server-common-DYZtsdM7.mjs";
2
2
  var browser = main;
3
3
  const messageReader = new browser.BrowserMessageReader(self);
4
4
  messageReader.listen((message) => {
@@ -1,4 +1,4 @@
1
- import { m as main, s as start$1 } from "./server-common-Cine5nRR.mjs";
1
+ import { m as main, s as start$1 } from "./server-common-DYZtsdM7.mjs";
2
2
  var node = main;
3
3
  function start() {
4
4
  const connection = node.createConnection(node.ProposedFeatures.all);
@@ -1,4 +1,4 @@
1
- import { u as onPrefixRegex, x as stripOnPrefix } from "./transform-bHBjkKSL.mjs";
1
+ import { u as onPrefixRegex, x as stripOnPrefix } from "./transform-Tooy42EB.mjs";
2
2
  const LinkTargetMd = [
3
3
  {
4
4
  value: "_self",
@@ -1,7 +1,7 @@
1
1
  import { CompletionItemKind as CompletionItemKind$1, MarkupKind as MarkupKind$1, TextDocuments as TextDocuments$1, TextDocumentSyncKind, DidChangeConfigurationNotification } from "vscode-languageserver";
2
2
  import { TextDocument as TextDocument$1 } from "vscode-languageserver-textdocument";
3
- import { S as SyntaxKind, B as findTokenAtPos, h as createXmlUiParser } from "./transform-bHBjkKSL.mjs";
4
- import { a as addOnPrefix, M as MetadataProvider } from "./metadata-utils-CtY0QcvH.mjs";
3
+ import { S as SyntaxKind, B as findTokenAtPos, h as createXmlUiParser } from "./transform-Tooy42EB.mjs";
4
+ import { a as addOnPrefix, M as MetadataProvider } from "./metadata-utils-BTIt1_wE.mjs";
5
5
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
6
6
  function getAugmentedNamespace(n) {
7
7
  if (n.__esModule) return n;
@@ -24475,7 +24475,7 @@ function handleCompletionResolve({
24475
24475
  }
24476
24476
  return item;
24477
24477
  }
24478
- function handleCompletion({ parseResult: { node }, getText, metaByComp: metaByComp2 }, position) {
24478
+ function handleCompletion({ parseResult: { node }, getText, metaByComp: metaByComp2, offsetToPos }, position) {
24479
24479
  const findRes = findTokenAtPos(node, position);
24480
24480
  if (!findRes) {
24481
24481
  return null;
@@ -24497,7 +24497,7 @@ function handleCompletion({ parseResult: { node }, getText, metaByComp: metaByCo
24497
24497
  if (!matchingNode) return defaultCompNames;
24498
24498
  const compName = getNameFromElement(matchingNode, getText);
24499
24499
  if (!compName) return defaultCompNames;
24500
- const compNameSuggestion = componentCompletionItem("/" + compName, 0);
24500
+ const compNameSuggestion = closingComponentCompletionItem(compName, offsetToPos, position);
24501
24501
  return [compNameSuggestion, ...defaultCompNames.map((c) => ({ ...c, sortText: "1" }))];
24502
24502
  }
24503
24503
  return defaultCompNames;
@@ -24649,6 +24649,27 @@ function componentCompletionItem(componentName, sortingOrder) {
24649
24649
  }
24650
24650
  };
24651
24651
  }
24652
+ function closingComponentCompletionItem(componentName, offsetToPos, cursorOffset) {
24653
+ const cursorPos = offsetToPos(cursorOffset);
24654
+ const updatedText = (
24655
+ /* TODO globals.clientSupports.insertReplaceEdit ? Handle this case : */
24656
+ {
24657
+ newText: `/${componentName}>`,
24658
+ range: { start: cursorPos, end: cursorPos }
24659
+ }
24660
+ );
24661
+ return {
24662
+ label: `/${componentName}`,
24663
+ kind: CompletionItemKind$1.Constructor,
24664
+ sortText: "0",
24665
+ textEdit: updatedText,
24666
+ data: {
24667
+ metadataAccessInfo: {
24668
+ componentName
24669
+ }
24670
+ }
24671
+ };
24672
+ }
24652
24673
  function markupContent(content) {
24653
24674
  return {
24654
24675
  kind: MarkupKind$1.Markdown,
@@ -24670,7 +24691,7 @@ function attributeDisplayOrder(kind) {
24670
24691
  }
24671
24692
  }
24672
24693
  }
24673
- function offsetToPosRange(offsetToPos, range) {
24694
+ function offsetRangeToPosRange(offsetToPos, range) {
24674
24695
  return {
24675
24696
  start: offsetToPos(range.pos),
24676
24697
  end: offsetToPos(range.end)
@@ -24719,7 +24740,7 @@ function handleHover(ctx, position) {
24719
24740
  kind: MarkupKind$1.Markdown,
24720
24741
  value
24721
24742
  },
24722
- range: offsetToPosRange(ctx.offsetToPosition, range)
24743
+ range: offsetRangeToPosRange(ctx.offsetToPosition, range)
24723
24744
  };
24724
24745
  }
24725
24746
  function hoverAttr({
@@ -25225,7 +25246,7 @@ function getDiagnostics(ctx) {
25225
25246
  function errorToLspDiag(e, offsetToPos) {
25226
25247
  return {
25227
25248
  severity: e.category,
25228
- range: offsetToPosRange(offsetToPos, e),
25249
+ range: offsetRangeToPosRange(offsetToPos, e),
25229
25250
  message: e.message,
25230
25251
  code: e.code
25231
25252
  };
@@ -25237,7 +25258,7 @@ function start(connection2) {
25237
25258
  let hasConfigurationCapability = false;
25238
25259
  let hasWorkspaceFolderCapability = false;
25239
25260
  connection2.onInitialize((params) => {
25240
- connection2.console.log("initing!");
25261
+ connection2.console.log("Initializing!");
25241
25262
  const capabilities = params.capabilities;
25242
25263
  hasConfigurationCapability = !!(capabilities.workspace && !!capabilities.workspace.configuration);
25243
25264
  hasWorkspaceFolderCapability = !!(capabilities.workspace && !!capabilities.workspace.workspaceFolders);
@@ -25264,7 +25285,7 @@ function start(connection2) {
25264
25285
  });
25265
25286
  connection2.onInitialized(() => {
25266
25287
  if (hasConfigurationCapability) {
25267
- connection2.client.register(DidChangeConfigurationNotification.type, void 0);
25288
+ void connection2.client.register(DidChangeConfigurationNotification.type, void 0);
25268
25289
  }
25269
25290
  if (hasWorkspaceFolderCapability) {
25270
25291
  connection2.workspace.onDidChangeWorkspaceFolders((_event) => {
@@ -25272,13 +25293,21 @@ function start(connection2) {
25272
25293
  });
25273
25294
  }
25274
25295
  });
25275
- connection2.onCompletion(async ({ position, textDocument }) => {
25296
+ connection2.onCompletion(({ position, textDocument }) => {
25276
25297
  const document = documents.get(textDocument.uri);
25277
25298
  if (!document) {
25278
25299
  return [];
25279
25300
  }
25280
25301
  const parseResult = parseDocument(document);
25281
- return handleCompletion({ parseResult: parseResult.parseResult, getText: parseResult.getText, metaByComp: metadataProvider }, document.offsetAt(position));
25302
+ return handleCompletion(
25303
+ {
25304
+ parseResult: parseResult.parseResult,
25305
+ getText: parseResult.getText,
25306
+ metaByComp: metadataProvider,
25307
+ offsetToPos: (offset) => document.positionAt(offset)
25308
+ },
25309
+ document.offsetAt(position)
25310
+ );
25282
25311
  });
25283
25312
  connection2.onCompletionResolve((completionItem) => {
25284
25313
  return handleCompletionResolve({ metaByComp: metadataProvider, item: completionItem });
@@ -25302,8 +25331,16 @@ function start(connection2) {
25302
25331
  if (!document) {
25303
25332
  return null;
25304
25333
  }
25305
- const { parseResult: { node }, getText } = parseDocument(document);
25306
- return handleDocumentFormatting({ node, getText, options, offsetToPosition: (offset) => document.positionAt(offset) });
25334
+ const {
25335
+ parseResult: { node },
25336
+ getText
25337
+ } = parseDocument(document);
25338
+ return handleDocumentFormatting({
25339
+ node,
25340
+ getText,
25341
+ options,
25342
+ offsetToPosition: (offset) => document.positionAt(offset)
25343
+ });
25307
25344
  });
25308
25345
  const parsedDocuments = /* @__PURE__ */ new Map();
25309
25346
  function parseDocument(document) {
@@ -25336,7 +25373,7 @@ function start(connection2) {
25336
25373
  offsetToPos: (offset) => document.positionAt(offset)
25337
25374
  };
25338
25375
  const diagnostics = getDiagnostics(ctx);
25339
- connection2.sendDiagnostics({
25376
+ void connection2.sendDiagnostics({
25340
25377
  version: document.version,
25341
25378
  uri: document.uri,
25342
25379
  diagnostics
@@ -385,7 +385,6 @@ class Lexer {
385
385
  * Fetches the next token from the input stream
386
386
  */
387
387
  fetch() {
388
- const lexer = this;
389
388
  const input = this.input;
390
389
  const startPos = this._prefetchedPos || input.position;
391
390
  const line = input.line;
@@ -398,6 +397,14 @@ class Lexer {
398
397
  let lastEndColumn = input.column;
399
398
  let ch = null;
400
399
  let useResolver = false;
400
+ const appendTokenChar = () => {
401
+ text += ch;
402
+ this._prefetched = null;
403
+ this._prefetchedPos = null;
404
+ this._prefetchedColumn = null;
405
+ lastEndPos = input.position;
406
+ lastEndColumn = input.position;
407
+ };
401
408
  let phase = this.getStartingPhaseThenReset();
402
409
  while (true) {
403
410
  ch = this.fetchNextChar();
@@ -986,14 +993,6 @@ class Lexer {
986
993
  }
987
994
  appendTokenChar();
988
995
  }
989
- function appendTokenChar() {
990
- text += ch;
991
- lexer._prefetched = null;
992
- lexer._prefetchedPos = null;
993
- lexer._prefetchedColumn = null;
994
- lastEndPos = input.position;
995
- lastEndColumn = input.position;
996
- }
997
996
  function makeToken() {
998
997
  if (useResolver) {
999
998
  tokenType = resolverHash.get(text) ?? (isIdStart(text[0]) && text[text.length - 1] !== "'" ? TokenType.Identifier : TokenType.Unknown);
@@ -2102,9 +2101,16 @@ class Parser {
2102
2101
  * : "finally" blockStatement
2103
2102
  */
2104
2103
  parseTryStatement() {
2104
+ const getBlock = () => {
2105
+ const nextToken2 = this._lexer.peek();
2106
+ if (nextToken2.type !== TokenType.LBrace) {
2107
+ this.reportError("W012", nextToken2);
2108
+ return null;
2109
+ }
2110
+ return this.parseBlockStatement();
2111
+ };
2105
2112
  const startToken = this._lexer.peek();
2106
2113
  let endToken = this._lexer.get();
2107
- const parser = this;
2108
2114
  const tryB = getBlock();
2109
2115
  let catchB;
2110
2116
  let catchV;
@@ -2156,14 +2162,6 @@ class Parser {
2156
2162
  startToken,
2157
2163
  endToken
2158
2164
  );
2159
- function getBlock() {
2160
- const nextToken2 = parser._lexer.peek();
2161
- if (nextToken2.type !== TokenType.LBrace) {
2162
- parser.reportError("W012", nextToken2);
2163
- return null;
2164
- }
2165
- return parser.parseBlockStatement();
2166
- }
2167
2165
  }
2168
2166
  /**
2169
2167
  * Parses a switch statement
@@ -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-bHBjkKSL.mjs";
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-DB6BLiXK.mjs";
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-Tooy42EB.mjs";
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-uCYa8_tZ.mjs";
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-bHBjkKSL.mjs";
1
+ import { v as CORE_NAMESPACE_VALUE, t as COMPOUND_COMP_ID } from "./transform-Tooy42EB.mjs";
2
2
  const componentFileExtension = "xmlui";
3
3
  const codeBehindFileExtension = "xmlui.xs";
4
4
  const moduleFileExtension = "xs";
@@ -1263,6 +1263,7 @@ declare type Props_6 = {
1263
1263
  declare type Props_7 = {
1264
1264
  id?: string;
1265
1265
  isRoot?: boolean;
1266
+ applyIf?: boolean;
1266
1267
  layoutContext?: LayoutContext;
1267
1268
  renderChild?: RenderChildFn;
1268
1269
  node?: ComponentDef;
@@ -1310,6 +1311,13 @@ declare type RootComponentProps = {
1310
1311
  vars?: Record<string, any>;
1311
1312
  };
1312
1313
 
1314
+ declare type RuntimeProps = {
1315
+ default?: any;
1316
+ component?: ComponentDef | CompoundComponentDef;
1317
+ file?: string;
1318
+ src?: string;
1319
+ };
1320
+
1313
1321
  declare type SchemaDescriptor = {
1314
1322
  tables: Array<TableDescriptor>;
1315
1323
  relationships?: any;
@@ -1404,7 +1412,7 @@ export declare const Stack: ForwardRefExoticComponent<Props_2 & RefAttributes<an
1404
1412
  * representation); ApiInterceptor can emulate some backend functionality
1405
1413
  * running in the browser.
1406
1414
  */
1407
- export declare function StandaloneApp({ appDef, appGlobals: globals, decorateComponentsWithTestId, debugEnabled, runtime, extensionManager, waitForApiInterceptor, children }: StandaloneAppProps): JSX_2.Element;
1415
+ export declare function StandaloneApp({ appDef, appGlobals: globals, decorateComponentsWithTestId, debugEnabled, runtime, extensionManager, waitForApiInterceptor, children, }: StandaloneAppProps): JSX_2.Element;
1408
1416
 
1409
1417
  export declare type StandaloneAppDescription = {
1410
1418
  name?: string;
@@ -1426,7 +1434,7 @@ declare type StandaloneAppProps = {
1426
1434
  appGlobals?: Record<string, any>;
1427
1435
  decorateComponentsWithTestId?: boolean;
1428
1436
  debugEnabled?: boolean;
1429
- runtime?: any;
1437
+ runtime?: RuntimeProps;
1430
1438
  extensionManager?: StandaloneExtensionManager;
1431
1439
  waitForApiInterceptor?: boolean;
1432
1440
  children?: ReactNode;
@@ -1706,7 +1714,7 @@ declare type TextVariant = (typeof TextVariantKeys)[number];
1706
1714
 
1707
1715
  declare const TextVariantKeys: readonly ["abbr", "cite", "code", "deleted", "inherit", "inserted", "keyboard", "marked", "sample", "sub", "sup", "var", "strong", "em", "mono", "title", "subtitle", "small", "caption", "placeholder", "paragraph", "subheading", "tableheading", "secondary"];
1708
1716
 
1709
- export declare function Theme({ id, isRoot, renderChild, node, tone, toastDuration, themeVars, layoutContext, children, }: Props_7): string | number | boolean | Iterable<ReactNode> | JSX_2.Element;
1717
+ export declare function Theme({ id, isRoot, applyIf, renderChild, node, tone, toastDuration, themeVars, layoutContext, children, }: Props_7): string | number | boolean | Iterable<ReactNode> | JSX_2.Element;
1710
1718
 
1711
1719
  export declare interface ThemeDefinition extends ThemeDefinitionDetails {
1712
1720
  id: string;
@@ -1,5 +1,5 @@
1
- import { ac, Z, an, a1, _, $, ak, am, ai, ad, a2, a0, S, at, b, aq, ar, a4, a5, ag, ah, au, al, aj, af, 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, aa, a3, W, X, a7, ap, a6, a8, as, a9, ao, Y, ae, ab } from "./index-cuh97e2e.mjs";
2
- import { X as X2 } from "./xmlui-serializer-DB6BLiXK.mjs";
1
+ import { ac, Z, an, a1, _, $, ak, am, ai, ad, a2, a0, S, at, b, aq, ar, a4, a5, ag, ah, au, al, aj, af, 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, aa, a3, W, X, a7, ap, a6, a8, as, a9, ao, Y, ae, ab } from "./index-Ckhnrf1F.mjs";
2
+ import { X as X2 } from "./xmlui-serializer-uCYa8_tZ.mjs";
3
3
  export {
4
4
  ac as ApiInterceptorProvider,
5
5
  Z as AppRoot,
@@ -17103,7 +17103,7 @@ function createHandlers(api) {
17103
17103
  });
17104
17104
  return handlers;
17105
17105
  }
17106
- const createApiInterceptorWorker = async (apiInstance, parentWorker) => {
17106
+ const createApiInterceptorWorker = (apiInstance, parentWorker) => {
17107
17107
  const handlers = createHandlers(apiInstance);
17108
17108
  let worker = parentWorker;
17109
17109
  if (!parentWorker) {