xmlui 0.9.43 → 0.9.45

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 (43) hide show
  1. package/dist/lib/{index-ODN_c1bh.mjs → apiInterceptorWorker-DzZYVTsV.mjs} +1920 -1362
  2. package/dist/lib/{core-BZ7lCE9p.mjs → core-CvFpTAHi.mjs} +154 -154
  3. package/dist/lib/{index-ClyH3BAn.mjs → index-erPY1EdW.mjs} +8823 -8695
  4. package/dist/lib/index.css +1 -1
  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-DI1nTN3y.mjs → metadata-utils-Cf8v_9Lr.mjs} +7 -7
  8. package/dist/lib/{server-common-C3t9MFME.mjs → server-common-kMTAr-QU.mjs} +210 -178
  9. package/dist/lib/{transform-BV--wKhF.mjs → transform-DU7v4c9h.mjs} +1193 -1158
  10. package/dist/lib/xmlui-parser.d.ts +10 -3
  11. package/dist/lib/xmlui-parser.mjs +31 -30
  12. package/dist/lib/{xmlui-serializer-D5UV-ftG.mjs → xmlui-serializer-B3OkRzrr.mjs} +9 -9
  13. package/dist/lib/xmlui.d.ts +72 -1
  14. package/dist/lib/xmlui.mjs +33 -27
  15. package/dist/metadata/style.css +1 -1
  16. package/dist/metadata/xmlui-metadata.mjs +4264 -4234
  17. package/dist/metadata/xmlui-metadata.umd.js +10 -10
  18. package/dist/scripts/package.json +5 -1
  19. package/dist/scripts/src/components/App/App.js +140 -27
  20. package/dist/scripts/src/components/App/AppNative.js +2 -1
  21. package/dist/scripts/src/components/App/IndexerContext.js +44 -0
  22. package/dist/scripts/src/components/App/SearchContext.js +35 -0
  23. package/dist/scripts/src/components/CodeBlock/CodeBlock.js +1 -0
  24. package/dist/scripts/src/components/CodeBlock/CodeBlockNative.js +42 -34
  25. package/dist/scripts/src/components/CodeBlock/highlight-code.js +18 -6
  26. package/dist/scripts/src/components/Markdown/MarkdownNative.js +63 -27
  27. package/dist/scripts/src/components/NestedApp/NestedApp.js +4 -3
  28. package/dist/scripts/src/components/NestedApp/NestedAppNative.js +61 -66
  29. package/dist/scripts/src/components/Table/TableNative.js +4 -4
  30. package/dist/scripts/src/components/TableOfContents/TableOfContents.js +9 -1
  31. package/dist/scripts/src/components/Text/Text.js +2 -2
  32. package/dist/scripts/src/components/TextBox/TextBoxNative.js +2 -1
  33. package/dist/scripts/src/components/Theme/ThemeNative.js +5 -0
  34. package/dist/scripts/src/components/ToneChangerButton/ToneChangerButton.js +1 -0
  35. package/dist/scripts/src/components-core/loader/DataLoader.js +9 -1
  36. package/dist/scripts/src/components-core/rendering/Container.js +7 -0
  37. package/dist/scripts/src/components-core/theming/ThemeProvider.js +1 -2
  38. package/dist/scripts/src/parsers/xmlui-parser/diagnostics.js +10 -4
  39. package/dist/scripts/src/parsers/xmlui-parser/parser.js +74 -30
  40. package/dist/standalone/xmlui-standalone.es.d.ts +132 -2
  41. package/dist/standalone/xmlui-standalone.umd.js +234 -223
  42. package/package.json +5 -1
  43. package/dist/lib/apiInterceptorWorker-D4BjYgiG.mjs +0 -563
@@ -565,8 +565,14 @@ export declare const Diag_OpenNodeStart_Token_Expected: {
565
565
 
566
566
  export declare const Diag_Tag_Identifier_Expected: {
567
567
  readonly category: DiagnosticCategory.Error;
568
- readonly code: ErrCodes.expTagIdent;
569
- readonly message: "A tag identifier expected.";
568
+ readonly code: ErrCodes.expTagName;
569
+ readonly message: "A tag name expected.";
570
+ };
571
+
572
+ export declare const Diag_Tag_Name_Afterd_Namespace_Expected: {
573
+ readonly category: DiagnosticCategory.Error;
574
+ readonly code: ErrCodes.tagNameExpAfterNamespace;
575
+ readonly message: "A tag name expected after a namespaces.";
570
576
  };
571
577
 
572
578
  export declare const Diag_Unterminated_CData: {
@@ -627,7 +633,7 @@ declare interface EmptyStatement extends ScripNodeBase {
627
633
  export declare enum ErrCodes {
628
634
  onlyOneElem = "U002",
629
635
  expTagOpen = "U003",
630
- expTagIdent = "U004",
636
+ expTagName = "U004",
631
637
  expCloseStart = "U005",
632
638
  expEndOrClose = "U006",
633
639
  tagNameMismatch = "U007",
@@ -637,6 +643,7 @@ export declare enum ErrCodes {
637
643
  expAttrValue = "U011",
638
644
  duplAttr = "U012",
639
645
  uppercaseAttr = "U013",
646
+ tagNameExpAfterNamespace = "U014",
640
647
  invalidChar = "W001",
641
648
  untermStr = "W002",
642
649
  untermComment = "W007",
@@ -1,5 +1,5 @@
1
- import { w as t, y as s, C as i, n, j as r, h as o, m as _, g as d, k as g, a as p, l as E, i as c, e as D, c as m, f as x, b as C, D as l, E as S, P as U, S as f, U as P, r as T, o as k, d as A, q as N, G as y, v as L, s as O, u as h, t as I, z as M, x as u, p as v, A as F, F as R, B as X } from "./transform-BV--wKhF.mjs";
2
- import { b as K, L as q, X as B, a as V, c as j, g as w, e as z, l as G, d as H, m as W, p as J } from "./xmlui-serializer-D5UV-ftG.mjs";
1
+ import { x as t, z as s, C as i, n, j as r, h as o, m as _, g as d, k as g, a as p, l as E, i as c, o as m, e as D, c as x, f as C, b as l, D as S, E as f, P as U, S as N, U as T, s as A, p as P, d as k, r as y, H as L, w as O, t as h, v as I, u as M, A as u, y as v, q as F, B as R, G as X, F as b } from "./transform-DU7v4c9h.mjs";
2
+ import { b as q, L as B, X as H, a as V, c as j, g as w, e as z, l as G, d as W, m as J, p as Q } from "./xmlui-serializer-B3OkRzrr.mjs";
3
3
  export {
4
4
  t as COMPOUND_COMP_ID,
5
5
  s as CORE_NAMESPACE_VALUE,
@@ -13,39 +13,40 @@ export {
13
13
  p as Diag_Invalid_Character,
14
14
  E as Diag_OpenNodeStart_Token_Expected,
15
15
  c as Diag_Tag_Identifier_Expected,
16
+ m as Diag_Tag_Name_Afterd_Namespace_Expected,
16
17
  D as Diag_Unterminated_CData,
17
- m as Diag_Unterminated_Comment,
18
- x as Diag_Unterminated_Script,
19
- C as Diag_Unterminated_String_Literal,
20
- l as DiagnosticCategory,
21
- S as ErrCodes,
22
- K as LintDiagKind,
23
- q as LintSeverity,
18
+ x as Diag_Unterminated_Comment,
19
+ C as Diag_Unterminated_Script,
20
+ l as Diag_Unterminated_String_Literal,
21
+ S as DiagnosticCategory,
22
+ f as ErrCodes,
23
+ q as LintDiagKind,
24
+ B as LintSeverity,
24
25
  U as ParserError,
25
- f as SyntaxKind,
26
- P as UCRegex,
27
- B as XmlUiHelper,
26
+ N as SyntaxKind,
27
+ T as UCRegex,
28
+ H as XmlUiHelper,
28
29
  V as codeBehindFileExtension,
29
30
  j as componentFileExtension,
30
- T as createScanner,
31
- k as createXmlUiParser,
32
- A as diagnosticCategoryName,
33
- N as errorMessages,
34
- y as findTokenAtPos,
31
+ A as createScanner,
32
+ P as createXmlUiParser,
33
+ k as diagnosticCategoryName,
34
+ y as errorMessages,
35
+ L as findTokenAtPos,
35
36
  w as getLintSeverity,
36
- L as getSyntaxKindStrRepr,
37
- O as isIdentifierStart,
38
- h as isInnerNode,
39
- I as isTrivia,
37
+ O as getSyntaxKindStrRepr,
38
+ h as isIdentifierStart,
39
+ I as isInnerNode,
40
+ M as isTrivia,
40
41
  z as lint,
41
42
  G as lintApp,
42
- H as lintErrorsComponent,
43
- W as moduleFileExtension,
44
- M as nodeToComponentDef,
45
- u as onPrefixRegex,
46
- v as parseXmlUiMarkup,
47
- J as printComponentLints,
48
- F as stripOnPrefix,
49
- R as tagNameNodesWithoutErrorsMatch,
50
- X as toDbgString
43
+ W as lintErrorsComponent,
44
+ J as moduleFileExtension,
45
+ u as nodeToComponentDef,
46
+ v as onPrefixRegex,
47
+ F as parseXmlUiMarkup,
48
+ Q as printComponentLints,
49
+ R as stripOnPrefix,
50
+ X as tagNameNodesWithoutErrorsMatch,
51
+ b as toDbgString
51
52
  };
@@ -1,7 +1,7 @@
1
- import { y as A, w as j } from "./transform-BV--wKhF.mjs";
1
+ import { z as A, x as j } from "./transform-DU7v4c9h.mjs";
2
2
  const k = "xmlui", P = "xmlui.xs", D = "xs";
3
- var w = /* @__PURE__ */ ((l) => (l[l.Skip = 0] = "Skip", l[l.Warning = 1] = "Warning", l[l.Error = 2] = "Error", l))(w || {}), V = /* @__PURE__ */ ((l) => (l[l.UnrecognisedProp = 0] = "UnrecognisedProp", l))(V || {});
4
- function L(l) {
3
+ var x = /* @__PURE__ */ ((l) => (l[l.Skip = 0] = "Skip", l[l.Warning = 1] = "Warning", l[l.Error = 2] = "Error", l))(x || {}), V = /* @__PURE__ */ ((l) => (l[l.UnrecognisedProp = 0] = "UnrecognisedProp", l))(V || {});
4
+ function z(l) {
5
5
  if (!l)
6
6
  return 1;
7
7
  switch (l.toLowerCase()) {
@@ -15,7 +15,7 @@ function L(l) {
15
15
  return console.warn(`Invalid lint severity option '${l}'. Must be one of: 'warning', 'error', 'skip'. Defaulting to 'warning'.`), 1;
16
16
  }
17
17
  }
18
- function z({
18
+ function L({
19
19
  appDef: l,
20
20
  metadataProvider: e
21
21
  }) {
@@ -98,13 +98,13 @@ function C({
98
98
  }
99
99
  function g(l, e, t) {
100
100
  const r = l.type.startsWith(A) ? l.type.slice(A.length + 1) : l.type, n = e.getComponent(r);
101
- if (n !== null && !n.allowArbitraryProps && x(l, n, t), !l.children)
101
+ if (n !== null && !n.allowArbitraryProps && w(l, n, t), !l.children)
102
102
  return t;
103
103
  for (const s of l.children)
104
104
  g(s, e, t);
105
105
  return t;
106
106
  }
107
- function x(l, e, t) {
107
+ function w(l, e, t) {
108
108
  const r = Object.keys(l.props ?? {}).filter((a) => !e.getAttr(a)), n = Object.keys(l.events ?? {}).filter((a) => !e.getEvent(a)), s = Object.keys(l.api ?? {}).filter((a) => !e.getApi(a));
109
109
  r.push(...n), r.push(...s);
110
110
  for (const a of r)
@@ -475,15 +475,15 @@ class M {
475
475
  }
476
476
  }
477
477
  export {
478
- w as L,
478
+ x as L,
479
479
  M as X,
480
480
  P as a,
481
481
  V as b,
482
482
  k as c,
483
483
  I as d,
484
484
  C as e,
485
- L as g,
486
- z as l,
485
+ z as g,
486
+ L as l,
487
487
  D as m,
488
488
  T as p
489
489
  };
@@ -871,7 +871,7 @@ declare type EntrypointCompilation = CompilationUnit & {
871
871
  declare enum ErrCodes {
872
872
  onlyOneElem = "U002",
873
873
  expTagOpen = "U003",
874
- expTagIdent = "U004",
874
+ expTagName = "U004",
875
875
  expCloseStart = "U005",
876
876
  expEndOrClose = "U006",
877
877
  tagNameMismatch = "U007",
@@ -881,6 +881,7 @@ declare enum ErrCodes {
881
881
  expAttrValue = "U011",
882
882
  duplAttr = "U012",
883
883
  uppercaseAttr = "U013",
884
+ tagNameExpAfterNamespace = "U014",
884
885
  invalidChar = "W001",
885
886
  untermStr = "W002",
886
887
  untermComment = "W007",
@@ -1142,6 +1143,19 @@ declare interface LetStatement extends ScripNodeBase {
1142
1143
  decls: VarDeclaration[];
1143
1144
  }
1144
1145
 
1146
+ export declare const LinkNative: ForwardRefExoticComponent< {
1147
+ to: string | {
1148
+ pathname: string;
1149
+ queryParams?: Record<string, any>;
1150
+ };
1151
+ children: ReactNode;
1152
+ icon?: string;
1153
+ active?: boolean;
1154
+ disabled?: boolean;
1155
+ onClick?: () => void;
1156
+ style?: CSSProperties;
1157
+ } & Partial<Pick<HTMLAnchorElement, "type" | "target" | "rel" | "download" | "ping" | "referrerPolicy" | "hreflang">> & RefAttributes<HTMLDivElement>>;
1158
+
1145
1159
  declare type LITERAL = typeof T_LITERAL;
1146
1160
 
1147
1161
  declare interface Literal extends ExpressionBase {
@@ -1167,6 +1181,10 @@ declare type LoggedInUserDto = {
1167
1181
  permissions: Record<string, string>;
1168
1182
  };
1169
1183
 
1184
+ export declare const Logo: ForwardRefExoticComponent< {
1185
+ style?: CSSProperties;
1186
+ } & RefAttributes<HTMLImageElement>>;
1187
+
1170
1188
  /**
1171
1189
  * This type represents the options to use for looking up actions.
1172
1190
  */
@@ -1378,6 +1396,36 @@ declare type Props_3 = {
1378
1396
  distributeEvenly?: boolean;
1379
1397
  };
1380
1398
 
1399
+ declare type Props_4 = {
1400
+ id?: string;
1401
+ type?: "text" | "password" | "search";
1402
+ value?: string;
1403
+ updateState?: UpdateStateFn;
1404
+ initialValue?: string;
1405
+ style?: CSSProperties;
1406
+ maxLength?: number;
1407
+ enabled?: boolean;
1408
+ placeholder?: string;
1409
+ validationStatus?: ValidationStatus;
1410
+ onDidChange?: (newValue: string) => void;
1411
+ onFocus?: () => void;
1412
+ onBlur?: () => void;
1413
+ registerComponentApi?: RegisterComponentApiFn;
1414
+ startText?: string;
1415
+ startIcon?: string;
1416
+ endText?: string;
1417
+ endIcon?: string;
1418
+ gap?: string;
1419
+ autoFocus?: boolean;
1420
+ readOnly?: boolean;
1421
+ tabIndex?: number;
1422
+ label?: string;
1423
+ labelPosition?: string;
1424
+ labelWidth?: string;
1425
+ labelBreak?: boolean;
1426
+ required?: boolean;
1427
+ };
1428
+
1381
1429
  declare type REACTIVE_VAR_DECLARATION = typeof T_REACTIVE_VAR_DECLARATION;
1382
1430
 
1383
1431
  declare interface ReactiveVarDeclaration extends ExpressionBase {
@@ -1485,6 +1533,12 @@ declare interface ScriptParserErrorMessage {
1485
1533
 
1486
1534
  declare type ScriptParsingErrorCodes = "W001" | "W002" | "W003" | "W004" | "W005" | "W006" | "W007" | "W008" | "W009" | "W010" | "W011" | "W012" | "W013" | "W014" | "W015" | "W016" | "W017" | "W018" | "W019" | "W020" | "W021" | "W022" | "W023" | "W024" | "W025" | "W026" | "W027" | "W028" | "W029" | "W030" | "W031";
1487
1535
 
1536
+ declare type SearchEntry = {
1537
+ path: string;
1538
+ title: string;
1539
+ content: string;
1540
+ };
1541
+
1488
1542
  declare type SEQUENCE_EXPRESSION = typeof T_SEQUENCE_EXPRESSION;
1489
1543
 
1490
1544
  declare interface SequenceExpression extends ExpressionBase {
@@ -1753,6 +1807,8 @@ declare interface TemplateLiteralExpression extends ExpressionBase {
1753
1807
  declare const Text_2: default_2.ForwardRefExoticComponent<Omit<TextProps, "ref"> & default_2.RefAttributes<unknown>>;
1754
1808
  export { Text_2 as Text }
1755
1809
 
1810
+ export declare const TextBox: default_2.ForwardRefExoticComponent<Props_4 & default_2.RefAttributes<HTMLDivElement>>;
1811
+
1756
1812
  declare type TextProps = {
1757
1813
  uid?: string;
1758
1814
  children?: default_2.ReactNode;
@@ -1982,6 +2038,11 @@ declare enum TokenType {
1982
2038
  From = 97
1983
2039
  }
1984
2040
 
2041
+ export declare function ToneChangerButton({ lightToDarkIcon, darkToLightIcon }: {
2042
+ lightToDarkIcon?: string;
2043
+ darkToLightIcon?: string;
2044
+ }): JSX_2.Element;
2045
+
1985
2046
  declare type TrackContainerHeight = "auto" | "fixed";
1986
2047
 
1987
2048
  export declare interface TreeNode {
@@ -2040,8 +2101,14 @@ export declare function useDevTools(): {
2040
2101
 
2041
2102
  export declare const useLogger: () => LogContextType;
2042
2103
 
2104
+ export declare const useSearchContextContent: () => Record<string, SearchEntry>;
2105
+
2043
2106
  export declare function useTheme(): ThemeScope;
2044
2107
 
2108
+ declare type ValidationStatus = (typeof validationStatusValues)[number];
2109
+
2110
+ declare const validationStatusValues: readonly ["none", "error", "warning", "valid"];
2111
+
2045
2112
  /**
2046
2113
  * This type represent the function that extracts the value from a component property
2047
2114
  */
@@ -2119,6 +2186,10 @@ declare interface VarStatement extends ScripNodeBase {
2119
2186
  decls: ReactiveVarDeclaration[];
2120
2187
  }
2121
2188
 
2189
+ export declare const VisuallyHidden: ({ children, ...props }: {
2190
+ children: React.ReactNode;
2191
+ }) => JSX_2.Element;
2192
+
2122
2193
  declare type WHILE_STATEMENT = typeof T_WHILE_STATEMENT;
2123
2194
 
2124
2195
  declare interface WhileStatement extends ScripNodeBase {
@@ -1,33 +1,39 @@
1
- import { y as e, A as o, B as r, E as t, I as n, N as p, z as l, i as m, h as i, S as u, b as d, k as c, l as C, D as S, C as T, c as x, e as A, f as I, w as b, j as g, p as f, s as h, t as k, n as v, q as B, v as E, u as M, x as R } from "./index-ClyH3BAn.mjs";
2
- import { X as D } from "./xmlui-serializer-D5UV-ftG.mjs";
1
+ import { y as e, A as o, B as t, E as r, I as n, L as p, H as i, N as l, z as u, i as d, h as m, S as C, b as x, k as T, l as c, D as S, F as g, G as A, V as h, C as B, c as I, e as b, f as k, w as v, j as L, p as V, s as f, t as y, n as E, q as H, v as M, J as N, u as R, x as D } from "./index-erPY1EdW.mjs";
2
+ import { X } from "./xmlui-serializer-B3OkRzrr.mjs";
3
3
  export {
4
4
  e as ApiInterceptorProvider,
5
5
  o as AppRoot,
6
- r as Button,
7
- t as ErrorBoundary,
6
+ t as Button,
7
+ r as ErrorBoundary,
8
8
  n as Icon,
9
- p as NestedApp,
10
- l as Spinner,
11
- m as Splitter,
12
- i as Stack,
13
- u as StandaloneApp,
14
- d as StandaloneExtensionManager,
15
- c as TabItem,
16
- C as Tabs,
9
+ p as LinkNative,
10
+ i as Logo,
11
+ l as NestedApp,
12
+ u as Spinner,
13
+ d as Splitter,
14
+ m as Stack,
15
+ C as StandaloneApp,
16
+ x as StandaloneExtensionManager,
17
+ T as TabItem,
18
+ c as Tabs,
17
19
  S as Text,
18
- D as XmlUiHelper,
19
- T as builtInThemes,
20
- x as createComponentRenderer,
21
- A as createMetadata,
22
- I as d,
23
- b as errReportComponent,
24
- g as getColor,
25
- f as parseScssVar,
26
- h as startApp,
27
- k as toCssVar,
28
- v as useColors,
29
- B as useDevTools,
30
- E as useLogger,
31
- M as useTheme,
32
- R as xmlUiMarkupToComponent
20
+ g as TextBox,
21
+ A as ToneChangerButton,
22
+ h as VisuallyHidden,
23
+ X as XmlUiHelper,
24
+ B as builtInThemes,
25
+ I as createComponentRenderer,
26
+ b as createMetadata,
27
+ k as d,
28
+ v as errReportComponent,
29
+ L as getColor,
30
+ V as parseScssVar,
31
+ f as startApp,
32
+ y as toCssVar,
33
+ E as useColors,
34
+ H as useDevTools,
35
+ M as useLogger,
36
+ N as useSearchContextContent,
37
+ R as useTheme,
38
+ D as xmlUiMarkupToComponent
33
39
  };