xmlui 0.9.59 → 0.9.60

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 (86) hide show
  1. package/dist/lib/{apiInterceptorWorker-BYU_Trhx.mjs → apiInterceptorWorker-CNiXy9XE.mjs} +1 -1
  2. package/dist/lib/{index-JqY6G28u.mjs → index-B1V2vJWh.mjs} +12728 -13275
  3. package/dist/lib/index.css +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/{metadata-utils-BXdiMJQN.mjs → metadata-utils-4EQ6kQIM.mjs} +31 -40
  7. package/dist/lib/{server-common-DGglaqCL.mjs → server-common-SNl_47nE.mjs} +858 -1450
  8. package/dist/lib/{transform-BboeJCuA.mjs → transform-CgRMkbb0.mjs} +733 -798
  9. package/dist/lib/xmlui-parser.d.ts +6 -31
  10. package/dist/lib/xmlui-parser.mjs +42 -49
  11. package/dist/lib/{xmlui-serializer-D0p6Hyum.mjs → xmlui-serializer-EDw51UFN.mjs} +1 -1
  12. package/dist/lib/xmlui.d.ts +6 -45
  13. package/dist/lib/xmlui.mjs +2 -2
  14. package/dist/metadata/{apiInterceptorWorker-CqXRCP46.mjs → apiInterceptorWorker-DsjW46f_.mjs} +1 -1
  15. package/dist/metadata/{collectedComponentMetadata-BA6d7xt-.mjs → collectedComponentMetadata-CBiI_eDf.mjs} +13515 -14148
  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 +124 -124
  19. package/dist/scripts/package.json +5 -5
  20. package/dist/scripts/src/components/Accordion/Accordion.js +1 -1
  21. package/dist/scripts/src/components/App/App.js +1 -5
  22. package/dist/scripts/src/components/App/AppNative.js +1 -11
  23. package/dist/scripts/src/components/Card/Card.js +1 -1
  24. package/dist/scripts/src/components/Card/CardNative.js +1 -2
  25. package/dist/scripts/src/components/Charts/DonutChart/DonutChart.js +5 -6
  26. package/dist/scripts/src/components/Charts/PieChart/PieChart.js +7 -11
  27. package/dist/scripts/src/components/Charts/PieChart/PieChartNative.js +4 -9
  28. package/dist/scripts/src/components/CodeBlock/CodeBlock.js +1 -4
  29. package/dist/scripts/src/components/CodeBlock/CodeBlockNative.js +1 -1
  30. package/dist/scripts/src/components/ColorPicker/ColorPickerNative.js +2 -2
  31. package/dist/scripts/src/components/ComponentProvider.js +0 -4
  32. package/dist/scripts/src/components/ExpandableItem/ExpandableItem.js +3 -3
  33. package/dist/scripts/src/components/FlowLayout/FlowLayoutNative.js +6 -35
  34. package/dist/scripts/src/components/Footer/Footer.js +1 -2
  35. package/dist/scripts/src/components/Form/Form.js +0 -4
  36. package/dist/scripts/src/components/Form/FormNative.js +4 -12
  37. package/dist/scripts/src/components/FormItem/ItemWithLabel.js +1 -1
  38. package/dist/scripts/src/components/Link/LinkNative.js +1 -46
  39. package/dist/scripts/src/components/Markdown/Markdown.js +3 -3
  40. package/dist/scripts/src/components/Markdown/MarkdownNative.js +3 -2
  41. package/dist/scripts/src/components/Markdown/utils.js +12 -21
  42. package/dist/scripts/src/components/NavGroup/NavGroupContext.js +0 -1
  43. package/dist/scripts/src/components/NavGroup/NavGroupNative.js +2 -6
  44. package/dist/scripts/src/components/NavLink/NavLinkNative.js +9 -10
  45. package/dist/scripts/src/components/NavPanel/NavPanel.js +2 -3
  46. package/dist/scripts/src/components/NavPanel/NavPanelNative.js +3 -132
  47. package/dist/scripts/src/components/NestedApp/AppWithCodeView.js +3 -22
  48. package/dist/scripts/src/components/NestedApp/AppWithCodeViewNative.js +7 -66
  49. package/dist/scripts/src/components/NestedApp/NestedApp.js +7 -13
  50. package/dist/scripts/src/components/NestedApp/NestedAppNative.js +6 -8
  51. package/dist/scripts/src/components/Pages/Pages.js +4 -4
  52. package/dist/scripts/src/components/Pages/PagesNative.js +3 -8
  53. package/dist/scripts/src/components/RadioGroup/RadioGroup.js +11 -12
  54. package/dist/scripts/src/components/RadioGroup/RadioGroupNative.js +28 -13
  55. package/dist/scripts/src/components/Select/Select.js +1 -2
  56. package/dist/scripts/src/components/Select/SelectNative.js +1 -1
  57. package/dist/scripts/src/components/StickyBox/StickyBoxNative.js +0 -2
  58. package/dist/scripts/src/components/Switch/Switch.js +2 -6
  59. package/dist/scripts/src/components/Table/TableNative.js +2 -6
  60. package/dist/scripts/src/components/Table/useRowSelection.js +2 -6
  61. package/dist/scripts/src/components/Tabs/Tabs.js +2 -5
  62. package/dist/scripts/src/components/Text/Text.js +2 -2
  63. package/dist/scripts/src/components/TextBox/TextBox.js +1 -1
  64. package/dist/scripts/src/components/Theme/NotificationToast.js +0 -11
  65. package/dist/scripts/src/components/Theme/ThemeNative.js +4 -4
  66. package/dist/scripts/src/components/TreeDisplay/TreeDisplay.js +0 -2
  67. package/dist/scripts/src/components-core/Fragment.js +2 -5
  68. package/dist/scripts/src/components-core/RestApiProxy.js +7 -10
  69. package/dist/scripts/src/components-core/appContext/date-functions.js +0 -1
  70. package/dist/scripts/src/components-core/descriptorHelper.js +0 -9
  71. package/dist/scripts/src/components-core/interception/ApiInterceptorProvider.js +2 -2
  72. package/dist/scripts/src/components-core/rendering/AppContent.js +2 -6
  73. package/dist/scripts/src/components-core/rendering/AppRoot.js +2 -4
  74. package/dist/scripts/src/components-core/rendering/StateContainer.js +0 -6
  75. package/dist/scripts/src/components-core/theming/layout-resolver.js +0 -18
  76. package/dist/scripts/src/components-core/theming/themes/root.js +0 -3
  77. package/dist/scripts/src/components-core/utils/date-utils.js +0 -60
  78. package/dist/scripts/src/parsers/xmlui-parser/parser.js +39 -42
  79. package/dist/scripts/src/parsers/xmlui-parser/syntax-node.js +0 -65
  80. package/dist/scripts/src/parsers/xmlui-parser/transform.js +8 -10
  81. package/dist/scripts/src/parsers/xmlui-parser/utils.js +2 -1
  82. package/dist/standalone/xmlui-standalone.es.d.ts +6 -45
  83. package/dist/standalone/xmlui-standalone.umd.js +248 -248
  84. package/package.json +5 -5
  85. package/dist/scripts/src/components/HelloWorld/HelloWorld.js +0 -103
  86. package/dist/scripts/src/components/HelloWorld/HelloWorldNative.js +0 -92
@@ -13,7 +13,6 @@ exports.smartFormatDate = smartFormatDate;
13
13
  exports.isDateToday = isDateToday;
14
14
  exports.isDateYesterday = isDateYesterday;
15
15
  exports.isDateTomorrow = isDateTomorrow;
16
- exports.formatHumanElapsedTime = formatHumanElapsedTime;
17
16
  const date_fns_1 = require("date-fns");
18
17
  const misc_1 = require("../utils/misc");
19
18
  function isoDateString(date) {
@@ -77,62 +76,3 @@ function isDateYesterday(date) {
77
76
  function isDateTomorrow(date) {
78
77
  return (0, date_fns_1.isTomorrow)(new Date(date));
79
78
  }
80
- /**
81
- * Formats a date into a human-readable elapsed time string.
82
- * Returns strings like "now", "12 seconds ago", "3 hours ago", "today", "yesterday", "3 weeks ago", etc.
83
- *
84
- * @param date The date to format
85
- * @returns A human-readable elapsed time string
86
- */
87
- function formatHumanElapsedTime(date) {
88
- const now = new Date();
89
- const inputDate = new Date(date);
90
- // Calculate time difference in milliseconds
91
- const diffMs = now.getTime() - inputDate.getTime();
92
- // Handle future dates
93
- if (diffMs < 0) {
94
- return formatDate(date);
95
- }
96
- // Convert to seconds, minutes, hours, days, weeks
97
- const diffSeconds = Math.floor(diffMs / 1000);
98
- const diffMinutes = Math.floor(diffSeconds / 60);
99
- const diffHours = Math.floor(diffMinutes / 60);
100
- const diffDays = Math.floor(diffHours / 24);
101
- const diffWeeks = Math.floor(diffDays / 7);
102
- const diffMonths = Math.floor(diffDays / 30);
103
- const diffYears = Math.floor(diffDays / 365);
104
- // Just now (within 10 seconds)
105
- if (diffSeconds < 10) {
106
- return "now";
107
- }
108
- // Seconds ago (up to 1 minute)
109
- if (diffSeconds < 60) {
110
- return `${diffSeconds} second${diffSeconds === 1 ? "" : "s"} ago`;
111
- }
112
- // Minutes ago (up to 1 hour)
113
- if (diffMinutes < 60) {
114
- return `${diffMinutes} minute${diffMinutes === 1 ? "" : "s"} ago`;
115
- }
116
- // Hours ago (up to today)
117
- if ((0, date_fns_1.isToday)(inputDate)) {
118
- return `${diffHours} hour${diffHours === 1 ? "" : "s"} ago`;
119
- }
120
- // Yesterday
121
- if ((0, date_fns_1.isYesterday)(inputDate)) {
122
- return "yesterday";
123
- }
124
- // Days ago (up to 1 week)
125
- if (diffDays < 7) {
126
- return `${diffDays} day${diffDays === 1 ? "" : "s"} ago`;
127
- }
128
- // Weeks ago (up to 4 weeks / 1 month)
129
- if (diffWeeks < 4) {
130
- return `${diffWeeks} week${diffWeeks === 1 ? "" : "s"} ago`;
131
- }
132
- // Months ago (up to 12 months / 1 year)
133
- if (diffMonths < 12) {
134
- return `${diffMonths} month${diffMonths === 1 ? "" : "s"} ago`;
135
- }
136
- // Years ago
137
- return `${diffYears} year${diffYears === 1 ? "" : "s"} ago`;
138
- }
@@ -2,37 +2,16 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createXmlUiParser = createXmlUiParser;
4
4
  exports.parseXmlUiMarkup = parseXmlUiMarkup;
5
- const syntax_node_1 = require("./syntax-node");
6
5
  const CharacterCodes_1 = require("./CharacterCodes");
7
6
  const scanner_1 = require("./scanner");
8
7
  const syntax_kind_1 = require("./syntax-kind");
9
8
  const utils_1 = require("./utils");
10
9
  const diagnostics_1 = require("./diagnostics");
11
10
  const RECOVER_FILE = [syntax_kind_1.SyntaxKind.CData, syntax_kind_1.SyntaxKind.Script, syntax_kind_1.SyntaxKind.OpenNodeStart];
12
- const RECOVER_OPEN_TAG = [
13
- syntax_kind_1.SyntaxKind.OpenNodeStart,
14
- syntax_kind_1.SyntaxKind.NodeEnd,
15
- syntax_kind_1.SyntaxKind.NodeClose,
16
- syntax_kind_1.SyntaxKind.CloseNodeStart,
17
- syntax_kind_1.SyntaxKind.CData,
18
- syntax_kind_1.SyntaxKind.Script,
19
- ];
11
+ const RECOVER_OPEN_TAG = [syntax_kind_1.SyntaxKind.OpenNodeStart, syntax_kind_1.SyntaxKind.NodeEnd, syntax_kind_1.SyntaxKind.NodeClose, syntax_kind_1.SyntaxKind.CloseNodeStart, syntax_kind_1.SyntaxKind.CData, syntax_kind_1.SyntaxKind.Script];
20
12
  const RECOVER_ATTR = [syntax_kind_1.SyntaxKind.Identifier, ...RECOVER_OPEN_TAG];
21
- const RECOVER_CONTENT_LIST = [
22
- syntax_kind_1.SyntaxKind.TextNode,
23
- syntax_kind_1.SyntaxKind.StringLiteral,
24
- syntax_kind_1.SyntaxKind.CData,
25
- syntax_kind_1.SyntaxKind.Script,
26
- syntax_kind_1.SyntaxKind.OpenNodeStart,
27
- syntax_kind_1.SyntaxKind.CloseNodeStart,
28
- ];
29
- const RECOVER_CLOSE_TAG = [
30
- syntax_kind_1.SyntaxKind.NodeEnd,
31
- syntax_kind_1.SyntaxKind.OpenNodeStart,
32
- syntax_kind_1.SyntaxKind.CloseNodeStart,
33
- syntax_kind_1.SyntaxKind.CData,
34
- syntax_kind_1.SyntaxKind.Script,
35
- ];
13
+ const RECOVER_CONTENT_LIST = [syntax_kind_1.SyntaxKind.TextNode, syntax_kind_1.SyntaxKind.StringLiteral, syntax_kind_1.SyntaxKind.CData, syntax_kind_1.SyntaxKind.Script, syntax_kind_1.SyntaxKind.OpenNodeStart, syntax_kind_1.SyntaxKind.CloseNodeStart];
14
+ const RECOVER_CLOSE_TAG = [syntax_kind_1.SyntaxKind.NodeEnd, syntax_kind_1.SyntaxKind.OpenNodeStart, syntax_kind_1.SyntaxKind.CloseNodeStart, syntax_kind_1.SyntaxKind.CData, syntax_kind_1.SyntaxKind.Script];
36
15
  function createXmlUiParser(source) {
37
16
  return {
38
17
  parse: () => parseXmlUiMarkup(source),
@@ -229,11 +208,7 @@ function parseXmlUiMarkup(text) {
229
208
  nameIdent = bump(syntax_kind_1.SyntaxKind.Identifier);
230
209
  }
231
210
  else {
232
- const errNode = errNodeUntil([
233
- syntax_kind_1.SyntaxKind.Equal,
234
- syntax_kind_1.SyntaxKind.Identifier,
235
- ...RECOVER_OPEN_TAG,
236
- ]);
211
+ const errNode = errNodeUntil([syntax_kind_1.SyntaxKind.Equal, syntax_kind_1.SyntaxKind.Identifier, ...RECOVER_OPEN_TAG]);
237
212
  if (errNode) {
238
213
  errorAt(diagnostics_1.DIAGS.expAttrNameAfterNamespace, errNode.pos, errNode.end);
239
214
  }
@@ -250,8 +225,7 @@ function parseXmlUiMarkup(text) {
250
225
  if (at(syntax_kind_1.SyntaxKind.Identifier)) {
251
226
  const closeTagName = parseClosingTagName();
252
227
  if (!skipNameMatching) {
253
- const namesMismatch = openTagName !== null &&
254
- !(0, utils_1.tagNameNodesWithoutErrorsMatch)(openTagName, closeTagName, getText);
228
+ const namesMismatch = openTagName !== null && !(0, utils_1.tagNameNodesWithoutErrorsMatch)(openTagName, closeTagName, getText);
255
229
  if (namesMismatch) {
256
230
  const msg = diagnostics_1.DIAGS.tagNameMismatch(getText(openTagName), getText(closeTagName));
257
231
  errorAt(msg, closeTagName.pos, closeTagName.end);
@@ -332,10 +306,10 @@ function parseXmlUiMarkup(text) {
332
306
  });
333
307
  }
334
308
  /**
335
- *
336
- * @param tokens that won't be consumed
337
- * @returns the error node with the consumed tokens, or null if there were no tokens consumed
338
- */
309
+ *
310
+ * @param tokens that won't be consumed
311
+ * @returns the error node with the consumed tokens, or null if there were no tokens consumed
312
+ */
339
313
  function errNodeUntil(tokens) {
340
314
  startNode();
341
315
  advance(tokens);
@@ -448,7 +422,7 @@ function parseXmlUiMarkup(text) {
448
422
  }
449
423
  end = scanner.getTokenEnd();
450
424
  }
451
- peekedToken = new syntax_node_1.Node(kind, pos, end, triviaBefore);
425
+ peekedToken = { kind, start, pos, end, triviaBefore };
452
426
  return peekedToken;
453
427
  }
454
428
  /** Same as bumpAny, but with an assertion of the token that was bumped over.
@@ -505,14 +479,20 @@ function parseXmlUiMarkup(text) {
505
479
  err = errFromScanner.message;
506
480
  }
507
481
  const pos = scanner.getTokenStart();
508
- const triviaBefore = triviaCollected.length > 0 ? triviaCollected : undefined;
482
+ const token = {
483
+ kind,
484
+ start,
485
+ pos,
486
+ end: scanner.getTokenEnd(),
487
+ triviaBefore: triviaCollected.length > 0 ? triviaCollected : undefined,
488
+ };
509
489
  triviaCollected = [];
510
490
  if (inContent && err.code === diagnostics_1.ErrCodes.invalidChar) {
511
491
  errFromScanner = undefined;
512
- return new syntax_node_1.Node(kind, pos, scanner.getTokenEnd(), triviaBefore);
492
+ return token;
513
493
  }
514
494
  const badPrefixEnd = pos + errFromScanner.prefixLength;
515
- const token = new syntax_node_1.Node(kind, pos, badPrefixEnd, triviaBefore);
495
+ token.end = badPrefixEnd;
516
496
  scanner.resetTokenState(badPrefixEnd);
517
497
  startNode();
518
498
  node.children.push(token);
@@ -525,10 +505,21 @@ function parseXmlUiMarkup(text) {
525
505
  case syntax_kind_1.SyntaxKind.CommentTrivia:
526
506
  case syntax_kind_1.SyntaxKind.NewLineTrivia:
527
507
  case syntax_kind_1.SyntaxKind.WhitespaceTrivia:
528
- triviaCollected.push(new syntax_node_1.Node(kind, scanner.getTokenStart(), scanner.getTokenEnd()));
508
+ triviaCollected.push({
509
+ kind,
510
+ start,
511
+ pos: scanner.getTokenStart(),
512
+ end: scanner.getTokenEnd(),
513
+ });
529
514
  break;
530
515
  default:
531
- return new syntax_node_1.Node(kind, scanner.getTokenStart(), scanner.getTokenEnd(), triviaCollected.length > 0 ? triviaCollected : undefined);
516
+ return {
517
+ kind,
518
+ start,
519
+ pos: scanner.getTokenStart(),
520
+ end: scanner.getTokenEnd(),
521
+ triviaBefore: triviaCollected.length > 0 ? triviaCollected : undefined,
522
+ };
532
523
  }
533
524
  }
534
525
  }
@@ -542,5 +533,11 @@ function parseXmlUiMarkup(text) {
542
533
  function createNode(kind, children) {
543
534
  const firstChild = children[0];
544
535
  const lastChild = children[children.length - 1];
545
- return new syntax_node_1.Node(kind, firstChild.pos, lastChild.end, undefined, children);
536
+ return {
537
+ kind,
538
+ start: firstChild.start,
539
+ pos: firstChild.pos,
540
+ end: lastChild.end,
541
+ children,
542
+ };
546
543
  }
@@ -1,67 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TagNameNode = exports.AttributeListNode = exports.ContentListNode = exports.AttributeKeyNode = exports.AttributeNode = exports.ElementNode = exports.Node = void 0;
4
- const syntax_kind_1 = require("./syntax-kind");
5
- const utils_1 = require("./utils");
6
- class Node {
7
- constructor(kind, pos, end, triviaBefore, children) {
8
- var _a, _b, _c, _d;
9
- this.kind = kind;
10
- this.pos = pos;
11
- this.end = end;
12
- this.triviaBefore = triviaBefore;
13
- this.children = children;
14
- if (triviaBefore) {
15
- this.start = (_b = (_a = triviaBefore[0]) === null || _a === void 0 ? void 0 : _a.start) !== null && _b !== void 0 ? _b : pos;
16
- }
17
- else if (children) {
18
- this.start = (_d = (_c = children[0]) === null || _c === void 0 ? void 0 : _c.start) !== null && _d !== void 0 ? _d : pos;
19
- }
20
- else {
21
- this.start = pos;
22
- }
23
- }
24
- isElementNode() {
25
- return this.kind === syntax_kind_1.SyntaxKind.ElementNode;
26
- }
27
- isAttributeNode() {
28
- return this.kind === syntax_kind_1.SyntaxKind.AttributeNode;
29
- }
30
- isAttributeKeyNode() {
31
- return this.kind === syntax_kind_1.SyntaxKind.AttributeKeyNode;
32
- }
33
- isContentListNode() {
34
- return this.kind === syntax_kind_1.SyntaxKind.ContentListNode;
35
- }
36
- isAttributeListNode() {
37
- return this.kind === syntax_kind_1.SyntaxKind.AttributeListNode;
38
- }
39
- isTagNameNode() {
40
- return this.kind === syntax_kind_1.SyntaxKind.TagNameNode;
41
- }
42
- findTokenAtPos(position) {
43
- return (0, utils_1.findTokenAtPos)(this, position);
44
- }
45
- }
46
- exports.Node = Node;
47
- class ElementNode extends Node {
48
- getAttributeListNode() {
49
- return this.children.find((c) => c.isContentListNode());
50
- }
51
- }
52
- exports.ElementNode = ElementNode;
53
- class AttributeNode extends Node {
54
- }
55
- exports.AttributeNode = AttributeNode;
56
- class AttributeKeyNode extends Node {
57
- }
58
- exports.AttributeKeyNode = AttributeKeyNode;
59
- class ContentListNode extends Node {
60
- }
61
- exports.ContentListNode = ContentListNode;
62
- class AttributeListNode extends Node {
63
- }
64
- exports.AttributeListNode = AttributeListNode;
65
- class TagNameNode extends Node {
66
- }
67
- exports.TagNameNode = TagNameNode;
@@ -4,7 +4,6 @@ exports.CORE_NAMESPACE_VALUE = exports.onPrefixRegex = exports.UCRegex = exports
4
4
  exports.nodeToComponentDef = nodeToComponentDef;
5
5
  exports.stripOnPrefix = stripOnPrefix;
6
6
  const code_behind_collect_1 = require("../scripting/code-behind-collect");
7
- const syntax_node_1 = require("./syntax-node");
8
7
  const syntax_kind_1 = require("./syntax-kind");
9
8
  const ParserError_1 = require("./ParserError");
10
9
  const Parser_1 = require("../scripting/Parser");
@@ -1013,17 +1012,16 @@ function getChildNodes(node) {
1013
1012
  return (_c = (_b = (_a = node.children) === null || _a === void 0 ? void 0 : _a.find((c) => c.kind === syntax_kind_1.SyntaxKind.ContentListNode)) === null || _b === void 0 ? void 0 : _b.children) !== null && _c !== void 0 ? _c : [];
1014
1013
  }
1015
1014
  function withNewChildNodes(node, newChildren) {
1016
- var _a, _b, _c, _d, _e;
1015
+ var _a;
1017
1016
  const childrenListIdx = (_a = node.children) === null || _a === void 0 ? void 0 : _a.findIndex((c) => c.kind === syntax_kind_1.SyntaxKind.ContentListNode);
1018
1017
  if (childrenListIdx === undefined || childrenListIdx === -1) {
1019
1018
  return node;
1020
1019
  }
1021
- const contentListChild = node.children[childrenListIdx];
1022
- return new syntax_node_1.Node(node.kind, (_b = node.pos) !== null && _b !== void 0 ? _b : 0, (_c = node.end) !== null && _c !== void 0 ? _c : 0, node.triviaBefore, [
1023
- ...node.children.slice(0, childrenListIdx),
1024
- new syntax_node_1.Node(contentListChild.kind, (_d = contentListChild.pos) !== null && _d !== void 0 ? _d : 0, (_e = contentListChild.end) !== null && _e !== void 0 ? _e : 0, undefined, newChildren),
1025
- ...node.children.slice(childrenListIdx),
1026
- ]);
1020
+ return Object.assign(Object.assign({}, node), { children: [
1021
+ ...node.children.slice(0, childrenListIdx),
1022
+ Object.assign(Object.assign({}, node.children[childrenListIdx]), { children: newChildren }),
1023
+ ...node.children.slice(childrenListIdx),
1024
+ ] });
1027
1025
  }
1028
1026
  function desugarKeyOnlyAttrs(attrs) {
1029
1027
  var _a;
@@ -1115,8 +1113,8 @@ function getNamespaceResolvedComponentName(node, getText, namespaceStack) {
1115
1113
  return resolvedNamespace + "." + name;
1116
1114
  }
1117
1115
  /**
1118
- * @param name - The name of the event in camelCase, with "on" prefix.
1119
- */
1116
+ * @param name - The name of the event in camelCase, with "on" prefix.
1117
+ */
1120
1118
  function stripOnPrefix(name) {
1121
1119
  return name[2].toLowerCase() + name.substring(3);
1122
1120
  }
@@ -37,6 +37,7 @@ function tagNameNodesWithoutErrorsMatch(name1, name2, getText) {
37
37
  }
38
38
  function findTokenAtPos(node, position) {
39
39
  const chain = [node];
40
+ let chainBeforePos;
40
41
  let sharedParents;
41
42
  if (node.start > position || position > node.end) {
42
43
  return undefined;
@@ -44,7 +45,7 @@ function findTokenAtPos(node, position) {
44
45
  const res = {
45
46
  chainAtPos: chain,
46
47
  chainBeforePos: undefined,
47
- sharedParents: undefined,
48
+ sharedParents: undefined
48
49
  };
49
50
  while (node.children !== undefined && node.children.length > 0) {
50
51
  //todo: make it a binary search before finding a fork
@@ -66,12 +66,11 @@ declare type ApiInterceptorDefinition = {
66
66
  auth?: AuthDefinition;
67
67
  };
68
68
 
69
- declare function ApiInterceptorProvider({ interceptor, children, apiWorker, useHashBasedRouting, waitForApiInterceptor }: {
69
+ declare function ApiInterceptorProvider({ interceptor, children, apiWorker, useHashBasedRouting, }: {
70
70
  interceptor?: ApiInterceptorDefinition;
71
71
  children: ReactNode;
72
72
  apiWorker?: SetupWorker;
73
73
  useHashBasedRouting?: boolean;
74
- waitForApiInterceptor?: boolean;
75
74
  }): JSX_2.Element;
76
75
 
77
76
  /**
@@ -207,13 +206,6 @@ declare type AppContextObject = {
207
206
  * @returns True, if the date is in the current year; otherwise, false.
208
207
  */
209
208
  isThisYear: (date: Date | number) => boolean;
210
- /**
211
- * Formats a date into a human-readable elapsed time string.
212
- * @param date Date to format
213
- * @returns Returns strings like "now", "12 seconds ago", "3 hours ago",
214
- * "today", "yesterday", "3 weeks ago", etc.
215
- */
216
- formatHumanElapsedTime: (date: string | Date) => string;
217
209
  /**
218
210
  * This function calculates the average of the specified values and returns it.
219
211
  * @param values Values to calculate the average
@@ -339,9 +331,8 @@ declare type AppLayoutType = (typeof appLayoutNames)[number];
339
331
  * from either code-behind files or inlined markup expressions) and executes
340
332
  * the app accordingly.
341
333
  */
342
- declare function AppRoot({ apiInterceptor, contributes, node, decorateComponentsWithTestId, debugEnabled, defaultTheme, defaultTone, resources, globalProps, standalone, trackContainerHeight, routerBaseName, previewMode, resourceMap, sources, extensionManager, children, projectCompilation, isNested, }: AppWrapperProps & {
334
+ declare function AppRoot({ apiInterceptor, contributes, node, decorateComponentsWithTestId, debugEnabled, defaultTheme, defaultTone, resources, globalProps, standalone, trackContainerHeight, routerBaseName, previewMode, resourceMap, sources, extensionManager, children, projectCompilation, }: AppWrapperProps & {
343
335
  extensionManager?: StandaloneExtensionManager;
344
- isNested?: boolean;
345
336
  }): JSX_2.Element;
346
337
 
347
338
  declare type AppWrapperProps = {
@@ -1104,9 +1095,6 @@ declare interface IAppLayoutContext {
1104
1095
  subNavPanelSlot?: HTMLElement;
1105
1096
  scrollWholePage?: boolean;
1106
1097
  isFullVerticalWidth?: boolean;
1107
- isNested?: boolean;
1108
- linkMap?: Map<string, NavHierarchyNode>;
1109
- registerLinkMap?: (linkMap: Map<string, NavHierarchyNode>) => void;
1110
1098
  }
1111
1099
 
1112
1100
  declare const Icon: default_2.ForwardRefExoticComponent<IconBaseProps & default_2.RefAttributes<unknown>>;
@@ -1315,30 +1303,7 @@ declare type Message = ValueOrFunction<Renderable, Toast>;
1315
1303
  */
1316
1304
  declare type ModuleErrors = Record<string, ScriptParserErrorMessage[]>;
1317
1305
 
1318
- declare interface NavHierarchyNode {
1319
- /** The type of navigation node - either a clickable link or a grouping container */
1320
- type: "NavLink" | "NavGroup";
1321
- /** The display label/text for this navigation item */
1322
- label: string;
1323
- /** The URL/route path for navigation (only present for NavLink types) */
1324
- to?: string;
1325
- /** Child navigation nodes nested under this node (only present for NavGroup types) */
1326
- children?: NavHierarchyNode[];
1327
- /** Reference to the immediate parent node in the hierarchy (undefined for root-level nodes) */
1328
- parent?: NavHierarchyNode;
1329
- /** Array of ancestor nodes from root to this node, excluding this node itself (empty for root-level nodes) */
1330
- pathSegments?: NavHierarchyNode[];
1331
- /** Reference to the previous NavLink in the flattened navigation order */
1332
- prevLink?: NavHierarchyNode;
1333
- /** Reference to the next NavLink in the flattened navigation order */
1334
- nextLink?: NavHierarchyNode;
1335
- /** True if this is the first NavLink within its immediate parent container */
1336
- firstLink?: boolean;
1337
- /** True if this is the last NavLink within its immediate parent container */
1338
- lastLink?: boolean;
1339
- }
1340
-
1341
- declare function NestedApp({ api, app, components, config, activeTheme, activeTone, title, height, allowPlaygroundPopup, withFrame, style, refVersion, }: NestedAppProps): JSX_2.Element;
1306
+ declare function NestedApp({ api, app, components, config, activeTheme, activeTone, title, height, allowPlaygroundPopup, withFrame, }: NestedAppProps): JSX_2.Element;
1342
1307
 
1343
1308
  declare type NestedAppProps = {
1344
1309
  api?: any;
@@ -1351,9 +1316,6 @@ declare type NestedAppProps = {
1351
1316
  height?: string | number;
1352
1317
  allowPlaygroundPopup?: boolean;
1353
1318
  withFrame?: boolean;
1354
- style?: CSSProperties;
1355
- splitView?: boolean;
1356
- refVersion?: number;
1357
1319
  };
1358
1320
 
1359
1321
  declare type NO_ARG_EXPRESSION = typeof T_NO_ARG_EXPRESSION;
@@ -1662,7 +1624,7 @@ declare const Stack: ForwardRefExoticComponent<Props_2 & RefAttributes<any>>;
1662
1624
  * representation); ApiInterceptor can emulate some backend functionality
1663
1625
  * running in the browser.
1664
1626
  */
1665
- declare function StandaloneApp({ appDef, decorateComponentsWithTestId, debugEnabled, waitForApiInterceptor, runtime, extensionManager, }: StandaloneAppProps): JSX_2.Element;
1627
+ declare function StandaloneApp({ appDef, decorateComponentsWithTestId, debugEnabled, runtime, extensionManager, }: StandaloneAppProps): JSX_2.Element;
1666
1628
 
1667
1629
  declare type StandaloneAppDescription = {
1668
1630
  name?: string;
@@ -1685,7 +1647,6 @@ declare type StandaloneAppProps = {
1685
1647
  debugEnabled?: boolean;
1686
1648
  runtime?: any;
1687
1649
  extensionManager?: StandaloneExtensionManager;
1688
- waitForApiInterceptor?: boolean;
1689
1650
  };
1690
1651
 
1691
1652
  declare const standaloneExports: {
@@ -2120,13 +2081,13 @@ declare type ThemeScope = {
2120
2081
  activeTheme: ThemeDefinition;
2121
2082
  /**
2122
2083
  * This hash object stores the CSS theme variable names with their CSS values definition,
2123
- * like "--xmlui-verticalAlignment-Text-sub": "sub";
2084
+ * like "--xmlui-verticalAlign-Text-sub": "sub";
2124
2085
  * "--xmlui-backgroundColor": "var(--xmlui-color-surface-50)"
2125
2086
  */
2126
2087
  themeStyles: Record<string, string>;
2127
2088
  /**
2128
2089
  * This hash object stores the theme variable names with their CSS values definition, like
2129
- * "verticalAlignment-Text-sub": "sub"; "backgroundColor": "var(--xmlui-color-surface-50)".
2090
+ * "verticalAlign-Text-sub": "sub"; "backgroundColor": "var(--xmlui-color-surface-50)".
2130
2091
  */
2131
2092
  themeVars: Record<string, string>;
2132
2093
  /**