xmlui 0.9.33 → 0.9.34
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/lib/{apiInterceptorWorker-C0U8QH8_.mjs → apiInterceptorWorker-B2l5dDUx.mjs} +1 -1
- package/dist/lib/{index-EIC8XLtz.mjs → index-BN2rPcEc.mjs} +1731 -4204
- package/dist/lib/index.css +11 -9
- package/dist/lib/language-server-web-worker.mjs +1 -1
- package/dist/lib/language-server.mjs +1 -1
- package/dist/lib/{metadata-utils-DyYovNew.mjs → metadata-utils-BzHSWB2j.mjs} +12 -39
- package/dist/lib/{server-common-CUmSKua6.mjs → server-common-B1bqw3bO.mjs} +26 -1
- package/dist/lib/xmlui-parser.mjs +1 -1
- package/dist/lib/{lint-B5OU130e.mjs → xmlui-serializer-CQnuXBof.mjs} +156 -156
- package/dist/lib/xmlui.d.ts +19 -8
- package/dist/lib/xmlui.mjs +10 -11
- package/dist/metadata/style.css +11 -9
- package/dist/metadata/xmlui-metadata.mjs +18 -14
- package/dist/metadata/xmlui-metadata.umd.js +18 -14
- package/dist/scripts/bin/index.js +5 -4
- package/dist/scripts/package.json +1 -1
- package/dist/scripts/src/components/CodeBlock/CodeBlock.js +7 -6
- package/dist/scripts/src/components/ComponentProvider.js +4 -0
- package/dist/scripts/src/components/NavGroup/NavGroupNative.js +1 -1
- package/dist/scripts/src/components/NavPanel/NavPanelNative.js +3 -1
- package/dist/scripts/src/components/NestedApp/NestedAppNative.js +23 -16
- package/dist/scripts/src/components/NestedApp/utils.js +0 -485
- package/dist/scripts/src/components/Splitter/Splitter.js +1 -1
- package/dist/standalone/xmlui-standalone.es.d.ts +2418 -0
- package/dist/standalone/xmlui-standalone.umd.js +1396 -3935
- package/package.json +1 -1
- package/dist/scripts/src/parsers/xmlui-parser/xmlui-serializer.js +0 -582
- package/dist/scripts/src/parsers/xmlui-parser/xmlui-tree.js +0 -2
package/dist/lib/index.css
CHANGED
|
@@ -1880,7 +1880,7 @@
|
|
|
1880
1880
|
* This function allows other CSS modules to get the value of the CSS variable specified in $componentVariable.
|
|
1881
1881
|
Optionally, you can provide a $fallbackValue to set the variable's value if that is not defined.
|
|
1882
1882
|
*/
|
|
1883
|
-
.
|
|
1883
|
+
._wrapper_19swn_13 {
|
|
1884
1884
|
--footer-height: 0;
|
|
1885
1885
|
height: 100%;
|
|
1886
1886
|
width: 100%;
|
|
@@ -1915,21 +1915,23 @@
|
|
|
1915
1915
|
position: relative;
|
|
1916
1916
|
display: flex;
|
|
1917
1917
|
flex-direction: column;
|
|
1918
|
-
scrollbar-color: var(--xmlui-color-scrollbar-NavPanel) var(--xmlui-backgroundColor-scrollbar-NavPanel);
|
|
1919
1918
|
scrollbar-width: thin;
|
|
1920
1919
|
}
|
|
1921
|
-
.
|
|
1920
|
+
._wrapper_19swn_13:not(._condensed_19swn_50) {
|
|
1922
1921
|
background-color: var(--xmlui-backgroundColor-NavPanel);
|
|
1923
1922
|
}
|
|
1924
|
-
.
|
|
1923
|
+
._wrapper_19swn_13._vertical_19swn_53 {
|
|
1924
|
+
scrollbar-gutter: stable;
|
|
1925
|
+
}
|
|
1926
|
+
._wrapper_19swn_13._horizontal_19swn_56 {
|
|
1925
1927
|
box-shadow: none;
|
|
1926
1928
|
height: var(--xmlui-height-AppHeader);
|
|
1927
1929
|
}
|
|
1928
|
-
.
|
|
1930
|
+
._wrapper_19swn_13._horizontal_19swn_56:not(._condensed_19swn_50) ._wrapperInner_19swn_60 {
|
|
1929
1931
|
padding-inline: var(--xmlui-paddingHorizontal-NavPanel);
|
|
1930
1932
|
justify-content: var(--xmlui-align-content-AppHeader);
|
|
1931
1933
|
}
|
|
1932
|
-
.
|
|
1934
|
+
._wrapper_19swn_13._horizontal_19swn_56 ._wrapperInner_19swn_60 {
|
|
1933
1935
|
height: 100%;
|
|
1934
1936
|
flex-direction: row;
|
|
1935
1937
|
max-width: var(--xmlui-maxWidth-content-App);
|
|
@@ -1938,13 +1940,13 @@
|
|
|
1938
1940
|
justify-content: var(--xmlui-align-content-AppHeader);
|
|
1939
1941
|
}
|
|
1940
1942
|
|
|
1941
|
-
.
|
|
1943
|
+
._wrapperInner_19swn_60 {
|
|
1942
1944
|
display: flex;
|
|
1943
1945
|
flex-direction: column;
|
|
1944
1946
|
justify-content: var(--xmlui-align-content-AppHeader);
|
|
1945
1947
|
}
|
|
1946
1948
|
|
|
1947
|
-
.
|
|
1949
|
+
._logoWrapper_19swn_79:not(:empty) {
|
|
1948
1950
|
display: flex;
|
|
1949
1951
|
justify-content: center;
|
|
1950
1952
|
flex-shrink: 0;
|
|
@@ -1954,7 +1956,7 @@
|
|
|
1954
1956
|
padding-inline: var(--xmlui-paddingHorizontal-logo-NavPanel);
|
|
1955
1957
|
margin-bottom: var(--xmlui-marginBottom-logo-NavPanel);
|
|
1956
1958
|
}
|
|
1957
|
-
.
|
|
1959
|
+
._logoWrapper_19swn_79._inDrawer_19swn_89 {
|
|
1958
1960
|
min-height: 40px;
|
|
1959
1961
|
}/*
|
|
1960
1962
|
* This file contains all CSS variables AppEngine uses for styling the UI, including individual visual components.
|
|
@@ -1,29 +1,4 @@
|
|
|
1
1
|
import { x as onPrefixRegex, A as stripOnPrefix } from "./transform-B-MhfH46.mjs";
|
|
2
|
-
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
3
|
-
function getAugmentedNamespace(n) {
|
|
4
|
-
if (n.__esModule) return n;
|
|
5
|
-
var f = n.default;
|
|
6
|
-
if (typeof f == "function") {
|
|
7
|
-
var a = function a2() {
|
|
8
|
-
if (this instanceof a2) {
|
|
9
|
-
return Reflect.construct(f, arguments, this.constructor);
|
|
10
|
-
}
|
|
11
|
-
return f.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
a.prototype = f.prototype;
|
|
14
|
-
} else a = {};
|
|
15
|
-
Object.defineProperty(a, "__esModule", { value: true });
|
|
16
|
-
Object.keys(n).forEach(function(k) {
|
|
17
|
-
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
18
|
-
Object.defineProperty(a, k, d.get ? d : {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function() {
|
|
21
|
-
return n[k];
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
return a;
|
|
26
|
-
}
|
|
27
2
|
const LinkTargetMd = [
|
|
28
3
|
{
|
|
29
4
|
value: "_self",
|
|
@@ -470,24 +445,22 @@ export {
|
|
|
470
445
|
VariantPropsKeys as V,
|
|
471
446
|
addOnPrefix as a,
|
|
472
447
|
alignmentOptionValues as b,
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
448
|
+
alignmentOptionMd as c,
|
|
449
|
+
buttonTypesMd as d,
|
|
450
|
+
buttonThemeMd as e,
|
|
451
|
+
buttonVariantMd as f,
|
|
452
|
+
variantOptionsMd as g,
|
|
453
|
+
scrollAnchoringValues as h,
|
|
479
454
|
iconPositionMd as i,
|
|
480
|
-
|
|
481
|
-
|
|
455
|
+
buttonThemeNames as j,
|
|
456
|
+
iconPositionNames as k,
|
|
482
457
|
labelPositionMd as l,
|
|
483
|
-
|
|
484
|
-
|
|
458
|
+
buttonVariantNames as m,
|
|
459
|
+
httpMethodNames as n,
|
|
485
460
|
orientationOptionMd as o,
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
layoutOptionKeys as r,
|
|
461
|
+
layoutOptionKeys as p,
|
|
462
|
+
viewportSizeNames as q,
|
|
489
463
|
sizeMd as s,
|
|
490
464
|
triggerPositionNames as t,
|
|
491
|
-
viewportSizeNames as u,
|
|
492
465
|
validationStatusMd as v
|
|
493
466
|
};
|
|
@@ -1,7 +1,32 @@
|
|
|
1
|
-
import { c as commonjsGlobal, g as getAugmentedNamespace, a as addOnPrefix, M as MetadataProvider } from "./metadata-utils-DyYovNew.mjs";
|
|
2
1
|
import { MarkupKind as MarkupKind$1, CompletionItemKind as CompletionItemKind$1, TextDocuments as TextDocuments$1, TextDocumentSyncKind, DidChangeConfigurationNotification } from "vscode-languageserver";
|
|
3
2
|
import { TextDocument as TextDocument$1 } from "vscode-languageserver-textdocument";
|
|
4
3
|
import { S as SyntaxKind, G as findTokenAtPos, o as createXmlUiParser } from "./transform-B-MhfH46.mjs";
|
|
4
|
+
import { a as addOnPrefix, M as MetadataProvider } from "./metadata-utils-BzHSWB2j.mjs";
|
|
5
|
+
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
6
|
+
function getAugmentedNamespace(n) {
|
|
7
|
+
if (n.__esModule) return n;
|
|
8
|
+
var f = n.default;
|
|
9
|
+
if (typeof f == "function") {
|
|
10
|
+
var a = function a2() {
|
|
11
|
+
if (this instanceof a2) {
|
|
12
|
+
return Reflect.construct(f, arguments, this.constructor);
|
|
13
|
+
}
|
|
14
|
+
return f.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
a.prototype = f.prototype;
|
|
17
|
+
} else a = {};
|
|
18
|
+
Object.defineProperty(a, "__esModule", { value: true });
|
|
19
|
+
Object.keys(n).forEach(function(k) {
|
|
20
|
+
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
21
|
+
Object.defineProperty(a, k, d.get ? d : {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function() {
|
|
24
|
+
return n[k];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
return a;
|
|
29
|
+
}
|
|
5
30
|
var main$3 = {};
|
|
6
31
|
var api$2 = {};
|
|
7
32
|
var semanticTokens = {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { w, y, C, n, j, h, m, g, k, a, l, i, e, c, f, b, D, E, P, S, U, r, o, d, q, G, v, s, u, t, z, x, p, A, F, B } from "./transform-B-MhfH46.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 "./
|
|
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-CQnuXBof.mjs";
|
|
3
3
|
export {
|
|
4
4
|
w as COMPOUND_COMP_ID,
|
|
5
5
|
y as CORE_NAMESPACE_VALUE,
|
|
@@ -1,4 +1,159 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { y as CORE_NAMESPACE_VALUE, w as COMPOUND_COMP_ID } from "./transform-B-MhfH46.mjs";
|
|
2
|
+
const componentFileExtension = "xmlui";
|
|
3
|
+
const codeBehindFileExtension = "xmlui.xs";
|
|
4
|
+
const moduleFileExtension = "xs";
|
|
5
|
+
var LintSeverity = /* @__PURE__ */ ((LintSeverity2) => {
|
|
6
|
+
LintSeverity2[LintSeverity2["Skip"] = 0] = "Skip";
|
|
7
|
+
LintSeverity2[LintSeverity2["Warning"] = 1] = "Warning";
|
|
8
|
+
LintSeverity2[LintSeverity2["Error"] = 2] = "Error";
|
|
9
|
+
return LintSeverity2;
|
|
10
|
+
})(LintSeverity || {});
|
|
11
|
+
var LintDiagKind = /* @__PURE__ */ ((LintDiagKind2) => {
|
|
12
|
+
LintDiagKind2[LintDiagKind2["UnrecognisedProp"] = 0] = "UnrecognisedProp";
|
|
13
|
+
return LintDiagKind2;
|
|
14
|
+
})(LintDiagKind || {});
|
|
15
|
+
function getLintSeverity(lintSeverityOption) {
|
|
16
|
+
if (!lintSeverityOption) {
|
|
17
|
+
return 1;
|
|
18
|
+
}
|
|
19
|
+
switch (lintSeverityOption.toLowerCase()) {
|
|
20
|
+
case "warning":
|
|
21
|
+
return 1;
|
|
22
|
+
case "error":
|
|
23
|
+
return 2;
|
|
24
|
+
case "skip":
|
|
25
|
+
return 0;
|
|
26
|
+
default:
|
|
27
|
+
console.warn(`Invalid lint severity option '${lintSeverityOption}'. Must be one of: 'warning', 'error', 'skip'. Defaulting to 'warning'.`);
|
|
28
|
+
return 1;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function lintApp({
|
|
32
|
+
appDef,
|
|
33
|
+
metadataProvider
|
|
34
|
+
}) {
|
|
35
|
+
const entryPointLints = {
|
|
36
|
+
componentName: "Main",
|
|
37
|
+
lints: lint({
|
|
38
|
+
component: appDef.entryPoint,
|
|
39
|
+
metadataProvider
|
|
40
|
+
})
|
|
41
|
+
};
|
|
42
|
+
const compoundCompLints = (appDef.components ?? []).map((c) => {
|
|
43
|
+
const lints = lint({
|
|
44
|
+
component: c,
|
|
45
|
+
metadataProvider
|
|
46
|
+
});
|
|
47
|
+
return { lints, componentName: c.name };
|
|
48
|
+
});
|
|
49
|
+
return [entryPointLints, ...compoundCompLints].filter((diags) => diags.lints.length > 0);
|
|
50
|
+
}
|
|
51
|
+
function printComponentLints(lintDiags) {
|
|
52
|
+
console.group(`Validation on '${lintDiags.componentName}':`);
|
|
53
|
+
lintDiags.lints.forEach(({ message }) => {
|
|
54
|
+
console.warn(message);
|
|
55
|
+
});
|
|
56
|
+
console.groupEnd();
|
|
57
|
+
}
|
|
58
|
+
function lintErrorsComponent(lints) {
|
|
59
|
+
function makeComponent() {
|
|
60
|
+
const errList = lints.map((lint2, idx) => {
|
|
61
|
+
return {
|
|
62
|
+
type: "VStack",
|
|
63
|
+
props: { gap: "0px" },
|
|
64
|
+
children: [
|
|
65
|
+
{
|
|
66
|
+
type: "VStack",
|
|
67
|
+
props: { "backgroundColor": "lightgrey", padding: "10px" },
|
|
68
|
+
children: [
|
|
69
|
+
{
|
|
70
|
+
type: "H2",
|
|
71
|
+
props: {
|
|
72
|
+
value: `#${idx + 1}: In component '${lint2.componentName}':`,
|
|
73
|
+
color: "$color-info"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
type: "VStack",
|
|
78
|
+
children: lint2.lints.map(({ message }, msgIdx) => {
|
|
79
|
+
return {
|
|
80
|
+
type: "Text",
|
|
81
|
+
props: { value: `${idx + 1}.${msgIdx + 1}: ${message}`, fontWeight: "bold" }
|
|
82
|
+
};
|
|
83
|
+
})
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
};
|
|
89
|
+
});
|
|
90
|
+
const comp = {
|
|
91
|
+
type: "VStack",
|
|
92
|
+
props: { padding: "$padding-normal", gap: 0 },
|
|
93
|
+
children: [
|
|
94
|
+
{
|
|
95
|
+
type: "H1",
|
|
96
|
+
props: {
|
|
97
|
+
value: `Errors found while checking Xmlui markup`,
|
|
98
|
+
padding: "$padding-normal",
|
|
99
|
+
backgroundColor: "$color-error",
|
|
100
|
+
color: "white"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
type: "VStack",
|
|
105
|
+
props: {
|
|
106
|
+
gap: "$gap-tight",
|
|
107
|
+
padding: "$padding-normal"
|
|
108
|
+
},
|
|
109
|
+
children: errList
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
};
|
|
113
|
+
return comp;
|
|
114
|
+
}
|
|
115
|
+
return makeComponent();
|
|
116
|
+
}
|
|
117
|
+
function lint({
|
|
118
|
+
component,
|
|
119
|
+
metadataProvider
|
|
120
|
+
}) {
|
|
121
|
+
if ("component" in component) {
|
|
122
|
+
return lintHelp(component.component, metadataProvider, []);
|
|
123
|
+
}
|
|
124
|
+
return lintHelp(component, metadataProvider, []);
|
|
125
|
+
}
|
|
126
|
+
function lintHelp(component, metadataProvider, acc) {
|
|
127
|
+
const componentName = component.type.startsWith(CORE_NAMESPACE_VALUE) ? component.type.slice(CORE_NAMESPACE_VALUE.length + 1) : component.type;
|
|
128
|
+
const componentMdProvider = metadataProvider.getComponent(componentName);
|
|
129
|
+
if (componentMdProvider !== null && !componentMdProvider.allowArbitraryProps) {
|
|
130
|
+
lintAttrs(component, componentMdProvider, acc);
|
|
131
|
+
}
|
|
132
|
+
if (!component.children) {
|
|
133
|
+
return acc;
|
|
134
|
+
}
|
|
135
|
+
for (const child of component.children) {
|
|
136
|
+
lintHelp(child, metadataProvider, acc);
|
|
137
|
+
}
|
|
138
|
+
return acc;
|
|
139
|
+
}
|
|
140
|
+
function lintAttrs(component, metadataForCurrentComponent, diags) {
|
|
141
|
+
const invalidAttrNames = Object.keys(component.props ?? {}).filter((name) => !metadataForCurrentComponent.getAttr(name));
|
|
142
|
+
const invalidEvents = Object.keys(component.events ?? {}).filter((event) => !metadataForCurrentComponent.getEvent(event));
|
|
143
|
+
const invalidApis = Object.keys(component.api ?? {}).filter((api) => !metadataForCurrentComponent.getApi(api));
|
|
144
|
+
invalidAttrNames.push(...invalidEvents);
|
|
145
|
+
invalidAttrNames.push(...invalidApis);
|
|
146
|
+
for (const invalidAttrName of invalidAttrNames) {
|
|
147
|
+
diags.push(toUnrecognisedAttrDiag(component, invalidAttrName));
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
function toUnrecognisedAttrDiag(component, attr) {
|
|
151
|
+
return {
|
|
152
|
+
message: `Unrecognised property '${attr}' on component '${component.type}'.`,
|
|
153
|
+
kind: 0
|
|
154
|
+
/* UnrecognisedProp */
|
|
155
|
+
};
|
|
156
|
+
}
|
|
2
157
|
const attrBreakRegex = /[\r\n<>'"&]/;
|
|
3
158
|
class XmlUiHelper {
|
|
4
159
|
/**
|
|
@@ -489,161 +644,6 @@ class XmlUiHelper {
|
|
|
489
644
|
element.childNodes.push(listElement);
|
|
490
645
|
}
|
|
491
646
|
}
|
|
492
|
-
const componentFileExtension = "xmlui";
|
|
493
|
-
const codeBehindFileExtension = "xmlui.xs";
|
|
494
|
-
const moduleFileExtension = "xs";
|
|
495
|
-
var LintSeverity = /* @__PURE__ */ ((LintSeverity2) => {
|
|
496
|
-
LintSeverity2[LintSeverity2["Skip"] = 0] = "Skip";
|
|
497
|
-
LintSeverity2[LintSeverity2["Warning"] = 1] = "Warning";
|
|
498
|
-
LintSeverity2[LintSeverity2["Error"] = 2] = "Error";
|
|
499
|
-
return LintSeverity2;
|
|
500
|
-
})(LintSeverity || {});
|
|
501
|
-
var LintDiagKind = /* @__PURE__ */ ((LintDiagKind2) => {
|
|
502
|
-
LintDiagKind2[LintDiagKind2["UnrecognisedProp"] = 0] = "UnrecognisedProp";
|
|
503
|
-
return LintDiagKind2;
|
|
504
|
-
})(LintDiagKind || {});
|
|
505
|
-
function getLintSeverity(lintSeverityOption) {
|
|
506
|
-
if (!lintSeverityOption) {
|
|
507
|
-
return 1;
|
|
508
|
-
}
|
|
509
|
-
switch (lintSeverityOption.toLowerCase()) {
|
|
510
|
-
case "warning":
|
|
511
|
-
return 1;
|
|
512
|
-
case "error":
|
|
513
|
-
return 2;
|
|
514
|
-
case "skip":
|
|
515
|
-
return 0;
|
|
516
|
-
default:
|
|
517
|
-
console.warn(`Invalid lint severity option '${lintSeverityOption}'. Must be one of: 'warning', 'error', 'skip'. Defaulting to 'warning'.`);
|
|
518
|
-
return 1;
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
function lintApp({
|
|
522
|
-
appDef,
|
|
523
|
-
metadataProvider
|
|
524
|
-
}) {
|
|
525
|
-
const entryPointLints = {
|
|
526
|
-
componentName: "Main",
|
|
527
|
-
lints: lint({
|
|
528
|
-
component: appDef.entryPoint,
|
|
529
|
-
metadataProvider
|
|
530
|
-
})
|
|
531
|
-
};
|
|
532
|
-
const compoundCompLints = (appDef.components ?? []).map((c) => {
|
|
533
|
-
const lints = lint({
|
|
534
|
-
component: c,
|
|
535
|
-
metadataProvider
|
|
536
|
-
});
|
|
537
|
-
return { lints, componentName: c.name };
|
|
538
|
-
});
|
|
539
|
-
return [entryPointLints, ...compoundCompLints].filter((diags) => diags.lints.length > 0);
|
|
540
|
-
}
|
|
541
|
-
function printComponentLints(lintDiags) {
|
|
542
|
-
console.group(`Validation on '${lintDiags.componentName}':`);
|
|
543
|
-
lintDiags.lints.forEach(({ message }) => {
|
|
544
|
-
console.warn(message);
|
|
545
|
-
});
|
|
546
|
-
console.groupEnd();
|
|
547
|
-
}
|
|
548
|
-
function lintErrorsComponent(lints) {
|
|
549
|
-
function makeComponent() {
|
|
550
|
-
const errList = lints.map((lint2, idx) => {
|
|
551
|
-
return {
|
|
552
|
-
type: "VStack",
|
|
553
|
-
props: { gap: "0px" },
|
|
554
|
-
children: [
|
|
555
|
-
{
|
|
556
|
-
type: "VStack",
|
|
557
|
-
props: { "backgroundColor": "lightgrey", padding: "10px" },
|
|
558
|
-
children: [
|
|
559
|
-
{
|
|
560
|
-
type: "H2",
|
|
561
|
-
props: {
|
|
562
|
-
value: `#${idx + 1}: In component '${lint2.componentName}':`,
|
|
563
|
-
color: "$color-info"
|
|
564
|
-
}
|
|
565
|
-
},
|
|
566
|
-
{
|
|
567
|
-
type: "VStack",
|
|
568
|
-
children: lint2.lints.map(({ message }, msgIdx) => {
|
|
569
|
-
return {
|
|
570
|
-
type: "Text",
|
|
571
|
-
props: { value: `${idx + 1}.${msgIdx + 1}: ${message}`, fontWeight: "bold" }
|
|
572
|
-
};
|
|
573
|
-
})
|
|
574
|
-
}
|
|
575
|
-
]
|
|
576
|
-
}
|
|
577
|
-
]
|
|
578
|
-
};
|
|
579
|
-
});
|
|
580
|
-
const comp = {
|
|
581
|
-
type: "VStack",
|
|
582
|
-
props: { padding: "$padding-normal", gap: 0 },
|
|
583
|
-
children: [
|
|
584
|
-
{
|
|
585
|
-
type: "H1",
|
|
586
|
-
props: {
|
|
587
|
-
value: `Errors found while checking Xmlui markup`,
|
|
588
|
-
padding: "$padding-normal",
|
|
589
|
-
backgroundColor: "$color-error",
|
|
590
|
-
color: "white"
|
|
591
|
-
}
|
|
592
|
-
},
|
|
593
|
-
{
|
|
594
|
-
type: "VStack",
|
|
595
|
-
props: {
|
|
596
|
-
gap: "$gap-tight",
|
|
597
|
-
padding: "$padding-normal"
|
|
598
|
-
},
|
|
599
|
-
children: errList
|
|
600
|
-
}
|
|
601
|
-
]
|
|
602
|
-
};
|
|
603
|
-
return comp;
|
|
604
|
-
}
|
|
605
|
-
return makeComponent();
|
|
606
|
-
}
|
|
607
|
-
function lint({
|
|
608
|
-
component,
|
|
609
|
-
metadataProvider
|
|
610
|
-
}) {
|
|
611
|
-
if ("component" in component) {
|
|
612
|
-
return lintHelp(component.component, metadataProvider, []);
|
|
613
|
-
}
|
|
614
|
-
return lintHelp(component, metadataProvider, []);
|
|
615
|
-
}
|
|
616
|
-
function lintHelp(component, metadataProvider, acc) {
|
|
617
|
-
const componentName = component.type.startsWith(CORE_NAMESPACE_VALUE) ? component.type.slice(CORE_NAMESPACE_VALUE.length + 1) : component.type;
|
|
618
|
-
const componentMdProvider = metadataProvider.getComponent(componentName);
|
|
619
|
-
if (componentMdProvider !== null && !componentMdProvider.allowArbitraryProps) {
|
|
620
|
-
lintAttrs(component, componentMdProvider, acc);
|
|
621
|
-
}
|
|
622
|
-
if (!component.children) {
|
|
623
|
-
return acc;
|
|
624
|
-
}
|
|
625
|
-
for (const child of component.children) {
|
|
626
|
-
lintHelp(child, metadataProvider, acc);
|
|
627
|
-
}
|
|
628
|
-
return acc;
|
|
629
|
-
}
|
|
630
|
-
function lintAttrs(component, metadataForCurrentComponent, diags) {
|
|
631
|
-
const invalidAttrNames = Object.keys(component.props ?? {}).filter((name) => !metadataForCurrentComponent.getAttr(name));
|
|
632
|
-
const invalidEvents = Object.keys(component.events ?? {}).filter((event) => !metadataForCurrentComponent.getEvent(event));
|
|
633
|
-
const invalidApis = Object.keys(component.api ?? {}).filter((api) => !metadataForCurrentComponent.getApi(api));
|
|
634
|
-
invalidAttrNames.push(...invalidEvents);
|
|
635
|
-
invalidAttrNames.push(...invalidApis);
|
|
636
|
-
for (const invalidAttrName of invalidAttrNames) {
|
|
637
|
-
diags.push(toUnrecognisedAttrDiag(component, invalidAttrName));
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
function toUnrecognisedAttrDiag(component, attr) {
|
|
641
|
-
return {
|
|
642
|
-
message: `Unrecognised property '${attr}' on component '${component.type}'.`,
|
|
643
|
-
kind: 0
|
|
644
|
-
/* UnrecognisedProp */
|
|
645
|
-
};
|
|
646
|
-
}
|
|
647
647
|
export {
|
|
648
648
|
LintSeverity as L,
|
|
649
649
|
XmlUiHelper as X,
|
package/dist/lib/xmlui.d.ts
CHANGED
|
@@ -425,6 +425,8 @@ declare interface BreakStatement extends ScripNodeBase {
|
|
|
425
425
|
type: BREAK_STATEMENT;
|
|
426
426
|
}
|
|
427
427
|
|
|
428
|
+
export declare const builtInThemes: Array<ThemeDefinition>;
|
|
429
|
+
|
|
428
430
|
export declare const Button: default_2.ForwardRefExoticComponent<{
|
|
429
431
|
id?: string;
|
|
430
432
|
type?: ButtonType;
|
|
@@ -1250,6 +1252,21 @@ declare type Message = ValueOrFunction<Renderable, Toast>;
|
|
|
1250
1252
|
*/
|
|
1251
1253
|
declare type ModuleErrors = Record<string, ScriptParserErrorMessage[]>;
|
|
1252
1254
|
|
|
1255
|
+
export declare function NestedApp({ api, app, components, config, activeTheme, activeTone, title, height, allowPlaygroundPopup, withFrame }: NestedAppProps): JSX_2.Element;
|
|
1256
|
+
|
|
1257
|
+
declare type NestedAppProps = {
|
|
1258
|
+
api?: any;
|
|
1259
|
+
app: string;
|
|
1260
|
+
components?: any[];
|
|
1261
|
+
config?: any;
|
|
1262
|
+
activeTone?: ThemeTone;
|
|
1263
|
+
activeTheme?: string;
|
|
1264
|
+
title?: string;
|
|
1265
|
+
height?: string | number;
|
|
1266
|
+
allowPlaygroundPopup?: boolean;
|
|
1267
|
+
withFrame?: boolean;
|
|
1268
|
+
};
|
|
1269
|
+
|
|
1253
1270
|
declare type NO_ARG_EXPRESSION = typeof T_NO_ARG_EXPRESSION;
|
|
1254
1271
|
|
|
1255
1272
|
declare interface NoArgExpression extends ExpressionBase {
|
|
@@ -1478,15 +1495,13 @@ declare interface SequenceExpression extends ExpressionBase {
|
|
|
1478
1495
|
|
|
1479
1496
|
declare const sizeValues: string[];
|
|
1480
1497
|
|
|
1481
|
-
export declare const SolidThemeDefinition: ThemeDefinition;
|
|
1482
|
-
|
|
1483
1498
|
export declare const Spinner: ForwardRefExoticComponent<SpinnerProps & RefAttributes<HTMLDivElement>>;
|
|
1484
1499
|
|
|
1485
|
-
declare
|
|
1500
|
+
declare type SpinnerProps = {
|
|
1486
1501
|
delay?: number;
|
|
1487
1502
|
fullScreen?: boolean;
|
|
1488
1503
|
style?: CSSProperties;
|
|
1489
|
-
}
|
|
1504
|
+
};
|
|
1490
1505
|
|
|
1491
1506
|
export declare const Splitter: ({ initialPrimarySize, minPrimarySize, maxPrimarySize, orientation, children, style, swapped, floating, splitterTemplate, resize, }: SplitterProps) => JSX_2.Element;
|
|
1492
1507
|
|
|
@@ -2008,8 +2023,6 @@ declare type UnaryOpSymbols = "+" | "-" | "~" | "!" | "typeof" | "delete";
|
|
|
2008
2023
|
*/
|
|
2009
2024
|
declare type UpdateStateFn = (componentState: any, options?: any) => void;
|
|
2010
2025
|
|
|
2011
|
-
export declare function useApiWorkerContext(): SetupWorker;
|
|
2012
|
-
|
|
2013
2026
|
export declare function useColors(...colorNames: (string | ColorDef)[]): Record<string, string>;
|
|
2014
2027
|
|
|
2015
2028
|
export declare function useDevTools(): {
|
|
@@ -2238,8 +2251,6 @@ declare type XmluiSerializationOptions = {
|
|
|
2238
2251
|
breakClosingTag?: boolean;
|
|
2239
2252
|
};
|
|
2240
2253
|
|
|
2241
|
-
export declare const XmlUiThemeDefinition: ThemeDefinition;
|
|
2242
|
-
|
|
2243
2254
|
/**
|
|
2244
2255
|
* Options to use with markup transformation from memory format to XMLUI structure
|
|
2245
2256
|
*/
|
package/dist/lib/xmlui.mjs
CHANGED
|
@@ -1,34 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { X
|
|
1
|
+
import { z, A, B, E, I, N, C, j, i, S, b, l, n, F, D, c, e, f, x, k, p, h, t, q, v, w, u, y } from "./index-BN2rPcEc.mjs";
|
|
2
|
+
import { X } from "./xmlui-serializer-CQnuXBof.mjs";
|
|
3
3
|
export {
|
|
4
|
-
|
|
4
|
+
z as ApiInterceptorProvider,
|
|
5
5
|
A as AppRoot,
|
|
6
6
|
B as Button,
|
|
7
7
|
E as ErrorBoundary,
|
|
8
8
|
I as Icon,
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
N as NestedApp,
|
|
10
|
+
C as Spinner,
|
|
11
11
|
j as Splitter,
|
|
12
12
|
i as Stack,
|
|
13
13
|
S as StandaloneApp,
|
|
14
14
|
b as StandaloneExtensionManager,
|
|
15
15
|
l as TabItem,
|
|
16
16
|
n as Tabs,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
F as Text,
|
|
18
|
+
X as XmlUiHelper,
|
|
19
|
+
D as builtInThemes,
|
|
20
20
|
c as createComponentRenderer,
|
|
21
21
|
e as createMetadata,
|
|
22
22
|
f as d,
|
|
23
|
-
|
|
23
|
+
x as errReportComponent,
|
|
24
24
|
k as getColor,
|
|
25
25
|
p as parseScssVar,
|
|
26
26
|
h as startApp,
|
|
27
27
|
t as toCssVar,
|
|
28
|
-
x as useApiWorkerContext,
|
|
29
28
|
q as useColors,
|
|
30
29
|
v as useDevTools,
|
|
31
30
|
w as useLogger,
|
|
32
31
|
u as useTheme,
|
|
33
|
-
|
|
32
|
+
y as xmlUiMarkupToComponent
|
|
34
33
|
};
|
package/dist/metadata/style.css
CHANGED
|
@@ -2963,7 +2963,7 @@ See this source for details: https://css-tricks.com/line-clampin/
|
|
|
2963
2963
|
* This function allows other CSS modules to get the value of the CSS variable specified in $componentVariable.
|
|
2964
2964
|
Optionally, you can provide a $fallbackValue to set the variable's value if that is not defined.
|
|
2965
2965
|
*/
|
|
2966
|
-
.
|
|
2966
|
+
._wrapper_19swn_13 {
|
|
2967
2967
|
--footer-height: 0;
|
|
2968
2968
|
height: 100%;
|
|
2969
2969
|
width: 100%;
|
|
@@ -2998,21 +2998,23 @@ See this source for details: https://css-tricks.com/line-clampin/
|
|
|
2998
2998
|
position: relative;
|
|
2999
2999
|
display: flex;
|
|
3000
3000
|
flex-direction: column;
|
|
3001
|
-
scrollbar-color: var(--xmlui-color-scrollbar-NavPanel) var(--xmlui-backgroundColor-scrollbar-NavPanel);
|
|
3002
3001
|
scrollbar-width: thin;
|
|
3003
3002
|
}
|
|
3004
|
-
.
|
|
3003
|
+
._wrapper_19swn_13:not(._condensed_19swn_50) {
|
|
3005
3004
|
background-color: var(--xmlui-backgroundColor-NavPanel);
|
|
3006
3005
|
}
|
|
3007
|
-
.
|
|
3006
|
+
._wrapper_19swn_13._vertical_19swn_53 {
|
|
3007
|
+
scrollbar-gutter: stable;
|
|
3008
|
+
}
|
|
3009
|
+
._wrapper_19swn_13._horizontal_19swn_56 {
|
|
3008
3010
|
box-shadow: none;
|
|
3009
3011
|
height: var(--xmlui-height-AppHeader);
|
|
3010
3012
|
}
|
|
3011
|
-
.
|
|
3013
|
+
._wrapper_19swn_13._horizontal_19swn_56:not(._condensed_19swn_50) ._wrapperInner_19swn_60 {
|
|
3012
3014
|
padding-inline: var(--xmlui-paddingHorizontal-NavPanel);
|
|
3013
3015
|
justify-content: var(--xmlui-align-content-AppHeader);
|
|
3014
3016
|
}
|
|
3015
|
-
.
|
|
3017
|
+
._wrapper_19swn_13._horizontal_19swn_56 ._wrapperInner_19swn_60 {
|
|
3016
3018
|
height: 100%;
|
|
3017
3019
|
flex-direction: row;
|
|
3018
3020
|
max-width: var(--xmlui-maxWidth-content-App);
|
|
@@ -3021,13 +3023,13 @@ See this source for details: https://css-tricks.com/line-clampin/
|
|
|
3021
3023
|
justify-content: var(--xmlui-align-content-AppHeader);
|
|
3022
3024
|
}
|
|
3023
3025
|
|
|
3024
|
-
.
|
|
3026
|
+
._wrapperInner_19swn_60 {
|
|
3025
3027
|
display: flex;
|
|
3026
3028
|
flex-direction: column;
|
|
3027
3029
|
justify-content: var(--xmlui-align-content-AppHeader);
|
|
3028
3030
|
}
|
|
3029
3031
|
|
|
3030
|
-
.
|
|
3032
|
+
._logoWrapper_19swn_79:not(:empty) {
|
|
3031
3033
|
display: flex;
|
|
3032
3034
|
justify-content: center;
|
|
3033
3035
|
flex-shrink: 0;
|
|
@@ -3037,7 +3039,7 @@ See this source for details: https://css-tricks.com/line-clampin/
|
|
|
3037
3039
|
padding-inline: var(--xmlui-paddingHorizontal-logo-NavPanel);
|
|
3038
3040
|
margin-bottom: var(--xmlui-marginBottom-logo-NavPanel);
|
|
3039
3041
|
}
|
|
3040
|
-
.
|
|
3042
|
+
._logoWrapper_19swn_79._inDrawer_19swn_89 {
|
|
3041
3043
|
min-height: 40px;
|
|
3042
3044
|
}/*
|
|
3043
3045
|
* This file contains all CSS variables AppEngine uses for styling the UI, including individual visual components.
|