xmlui 0.9.11 → 0.9.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{apiInterceptorWorker-BZP06llg.mjs → apiInterceptorWorker-dYrfbzdh.mjs} +1 -1
- package/dist/core-XLM8cuFP.mjs +7491 -0
- package/dist/{index-CFJ5_K_a.mjs → index-Dh2MThrK.mjs} +1672 -803
- package/dist/index.css +112 -98
- package/dist/language-server-web-worker.mjs +1 -1
- package/dist/language-server.mjs +1 -1
- package/dist/{lint-CiMcsEWf.mjs → lint-Cd70ckJ6.mjs} +84 -94
- package/dist/{parser-mzWvH7dz.mjs → parser-CBXS8ft2.mjs} +19 -17
- package/dist/scripts/bin/build-lib.js +42 -1
- package/dist/scripts/bin/vite-xmlui-plugin.js +2 -22
- package/dist/scripts/bin/viteConfig.js +3 -1
- package/dist/scripts/src/abstractions/ComponentDefs.js +2 -20
- package/dist/scripts/src/components/App/App.js +61 -21
- package/dist/scripts/src/components/Button/Button.js +5 -1
- package/dist/scripts/src/components/Button/ButtonNative.js +9 -2
- package/dist/scripts/src/components/Checkbox/Checkbox.js +2 -2
- package/dist/scripts/src/components/ComponentProvider.js +2 -0
- package/dist/scripts/src/components/Footer/Footer.js +1 -1
- package/dist/scripts/src/components/Form/FormContext.js +2 -0
- package/dist/scripts/src/components/FormItem/FormItemNative.js +9 -0
- package/dist/scripts/src/components/Items/Items.js +2 -1
- package/dist/scripts/src/components/List/List.js +2 -1
- package/dist/scripts/src/components/Markdown/Markdown.js +2 -0
- package/dist/scripts/src/components/NavPanel/NavPanel.js +2 -2
- package/dist/scripts/src/components/NumberBox/NumberBox2.js +85 -0
- package/dist/scripts/src/components/NumberBox/NumberBox2Native.js +395 -0
- package/dist/scripts/src/components/NumberBox/numberbox-abstractions.js +35 -0
- package/dist/scripts/src/components/Option/Option.js +2 -1
- package/dist/scripts/src/components/Select/Select.js +8 -0
- package/dist/scripts/src/components/Select/SelectNative.js +24 -10
- package/dist/scripts/src/components/Theme/ThemeNative.js +1 -0
- package/dist/scripts/src/components/VisuallyHidden.js +21 -0
- package/dist/scripts/src/components-core/loader/DataLoader.js +110 -3
- package/dist/scripts/src/components-core/loader/Loader.js +29 -7
- package/dist/scripts/src/components-core/rendering/ComponentAdapter.js +4 -1
- package/dist/scripts/src/components-core/rendering/ComponentWrapper.js +23 -5
- package/dist/scripts/src/components-core/rendering/Container.js +23 -26
- package/dist/scripts/src/components-core/rendering/StateContainer.js +2 -4
- package/dist/scripts/src/components-core/rendering/reducer.js +6 -5
- package/dist/scripts/src/components-core/utils/extractParam.js +24 -7
- package/dist/scripts/src/components-core/xmlui-parser.js +1 -1
- package/dist/scripts/src/parsers/xmlui-parser/parser.js +1 -1
- package/dist/scripts/src/parsers/xmlui-parser/transform.js +0 -10
- package/dist/scripts/src/parsers/xmlui-parser/utils.js +6 -9
- package/dist/{server-common-DxRVCeIE.mjs → server-common-DW5h7Q34.mjs} +122 -64
- package/dist/style.css +112 -98
- package/dist/xmlui-metadata.mjs +861 -296
- package/dist/xmlui-metadata.umd.js +861 -298
- package/dist/xmlui-parser.d.ts +14 -9
- package/dist/xmlui-parser.mjs +34 -34
- package/dist/xmlui-standalone.umd.js +7204 -5266
- package/dist/xmlui.d.ts +3 -1
- package/dist/xmlui.mjs +1 -1
- package/package.json +5 -5
- package/dist/core-C-osEDc2.mjs +0 -2
package/dist/xmlui-parser.d.ts
CHANGED
|
@@ -345,6 +345,7 @@ declare type ComponentMetadata<TProps extends Record<string, ComponentPropertyMe
|
|
|
345
345
|
contextVars?: TContextValues;
|
|
346
346
|
apis?: TApis;
|
|
347
347
|
nonVisual?: boolean;
|
|
348
|
+
childrenAsTemplate?: string;
|
|
348
349
|
opaque?: boolean;
|
|
349
350
|
themeVars?: Array<string>;
|
|
350
351
|
themeVarDescriptions?: Record<string, string>;
|
|
@@ -647,16 +648,20 @@ declare interface ExpressionStatement extends ScripNodeBase {
|
|
|
647
648
|
|
|
648
649
|
export declare function findTokenAtPos(node: Node_2, position: number): FindTokenSuccess | undefined;
|
|
649
650
|
|
|
650
|
-
/** If the position is in-between two tokens, the chain to the token just before the cursor is provided as well
|
|
651
|
-
declare type FindTokenSuccess = {
|
|
651
|
+
/** If the position is in-between two tokens, the chain to the token just before the cursor is provided as well*/
|
|
652
|
+
export declare type FindTokenSuccess = {
|
|
652
653
|
chainAtPos: Node_2[];
|
|
653
|
-
/** If the position is in-between two tokens, the chain to the token just before the position is provided.
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
* chainBeforePos
|
|
658
|
-
|
|
659
|
-
sharedParents
|
|
654
|
+
/** If the position is in-between two tokens, the chain to the token just before the position is provided. */
|
|
655
|
+
chainBeforePos: Node_2[];
|
|
656
|
+
/**
|
|
657
|
+
* This field specifies the first index where
|
|
658
|
+
* `chainBeforePos` differs from chainAtPos
|
|
659
|
+
*/
|
|
660
|
+
sharedParents: number;
|
|
661
|
+
} | {
|
|
662
|
+
chainBeforePos: undefined;
|
|
663
|
+
chainAtPos: Node_2[];
|
|
664
|
+
sharedParents: undefined;
|
|
660
665
|
};
|
|
661
666
|
|
|
662
667
|
/**
|
package/dist/xmlui-parser.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { C, o, k, i, n, h, l, a, m, j, f, e, g, b, D, E, S, q, c, d, x, u, r, t, s, p, w, v } from "./parser-CBXS8ft2.mjs";
|
|
2
|
+
import { am as COMPOUND_COMP_ID } from "./lint-Cd70ckJ6.mjs";
|
|
3
|
+
import { au, ao, ag, aq, as, ae, ad, ar, af, ap, ah, aj, an, a5, at, ai } from "./lint-Cd70ckJ6.mjs";
|
|
4
4
|
const attrBreakRegex = /[\r\n<>'"&]/;
|
|
5
5
|
class XmlUiHelper {
|
|
6
6
|
/**
|
|
@@ -12,7 +12,7 @@ class XmlUiHelper {
|
|
|
12
12
|
const fragment = Array.isArray(xml) ? xml : [xml];
|
|
13
13
|
return serializeFragment(fragment, 0);
|
|
14
14
|
function serializeFragment(nodes, depth) {
|
|
15
|
-
return nodes.map((
|
|
15
|
+
return nodes.map((n2) => serializeNode(n2, depth)).join((options == null ? void 0 : options.prettify) ? "\n" + getIndent(depth) : "");
|
|
16
16
|
}
|
|
17
17
|
function serializeNode(node, depth) {
|
|
18
18
|
switch (node.type) {
|
|
@@ -37,7 +37,7 @@ class XmlUiHelper {
|
|
|
37
37
|
const hasChildren = (((_b = node.childNodes) == null ? void 0 : _b.length) ?? 0) > 0;
|
|
38
38
|
if (node.text || hasAttrs || hasChildren) {
|
|
39
39
|
if (hasAttrs) {
|
|
40
|
-
const attrTexts = node.attributes.map((
|
|
40
|
+
const attrTexts = node.attributes.map((a2) => serializeXmlAttribute(a2));
|
|
41
41
|
if (!(options == null ? void 0 : options.prettify)) {
|
|
42
42
|
elementStr += " " + attrTexts.join(" ");
|
|
43
43
|
} else {
|
|
@@ -67,7 +67,7 @@ class XmlUiHelper {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
if (hasChildren) {
|
|
70
|
-
const childrenTexts = node.childNodes.map((
|
|
70
|
+
const childrenTexts = node.childNodes.map((c2) => serializeNode(c2, depth + 1));
|
|
71
71
|
if (!(options == null ? void 0 : options.prettify)) {
|
|
72
72
|
elementStr += childrenTexts.join("");
|
|
73
73
|
} else {
|
|
@@ -493,49 +493,49 @@ class XmlUiHelper {
|
|
|
493
493
|
}
|
|
494
494
|
export {
|
|
495
495
|
COMPOUND_COMP_ID,
|
|
496
|
-
|
|
496
|
+
au as CORE_NAMESPACE_VALUE,
|
|
497
497
|
C as CharacterCodes,
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
498
|
+
o as Diag_Attr_Identifier_Expected,
|
|
499
|
+
k as Diag_Attr_Value_Expected,
|
|
500
|
+
i as Diag_CloseNodeStart_Token_Expected,
|
|
501
|
+
n as Diag_End_Or_Close_Token_Expected,
|
|
502
|
+
h as Diag_End_Token_Expected,
|
|
503
|
+
l as Diag_Eq_Token_Expected,
|
|
504
504
|
a as Diag_Invalid_Character,
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
505
|
+
m as Diag_OpenNodeStart_Token_Expected,
|
|
506
|
+
j as Diag_Tag_Identifier_Expected,
|
|
507
|
+
f as Diag_Unterminated_CData,
|
|
508
|
+
e as Diag_Unterminated_Comment,
|
|
509
|
+
g as Diag_Unterminated_Script,
|
|
510
510
|
b as Diag_Unterminated_String_Literal,
|
|
511
511
|
D as DiagnosticCategory,
|
|
512
512
|
E as ErrCodes,
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
513
|
+
ao as LintDiagKind,
|
|
514
|
+
ag as LintSeverity,
|
|
515
|
+
aq as ParserError,
|
|
516
516
|
S as SyntaxKind,
|
|
517
|
-
|
|
517
|
+
as as UCRegex,
|
|
518
518
|
XmlUiHelper,
|
|
519
|
-
|
|
520
|
-
|
|
519
|
+
ae as codeBehindFileExtension,
|
|
520
|
+
ad as componentFileExtension,
|
|
521
521
|
q as createScanner,
|
|
522
|
-
|
|
522
|
+
c as createXmlUiParser,
|
|
523
523
|
d as diagnosticCategoryName,
|
|
524
|
-
|
|
524
|
+
ar as errorMessages,
|
|
525
525
|
x as findTokenAtPos,
|
|
526
|
-
|
|
526
|
+
af as getLintSeverity,
|
|
527
527
|
u as getSyntaxKindStrRepr,
|
|
528
528
|
r as isIdentifierStart,
|
|
529
529
|
t as isInnerNode,
|
|
530
530
|
s as isTrivia,
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
531
|
+
ap as lint,
|
|
532
|
+
ah as lintApp,
|
|
533
|
+
aj as lintErrorsComponent,
|
|
534
|
+
an as moduleFileExtension,
|
|
535
|
+
a5 as nodeToComponentDef,
|
|
536
|
+
at as onPrefixRegex,
|
|
537
537
|
p as parseXmlUiMarkup,
|
|
538
|
-
|
|
538
|
+
ai as printComponentLints,
|
|
539
539
|
w as tagNameNodesWithoutErrorsMatch,
|
|
540
540
|
v as toDbgString
|
|
541
541
|
};
|