xmlui 0.10.10 → 0.10.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/{metadata/apiInterceptorWorker-Bb5-fQup.mjs → lib/apiInterceptorWorker-DPgtUtdA.mjs} +5870 -3195
- package/dist/lib/index-CDOoBf2R.mjs +49626 -0
- package/dist/lib/index.css +1 -1
- package/dist/lib/initMock-BAV9RKui.mjs +843 -0
- package/dist/lib/language-server-web-worker.mjs +8 -7
- package/dist/lib/language-server.mjs +6 -6
- package/dist/lib/{metadata-utils-gIOZMGG7.mjs → metadata-utils-D90qqMGc.mjs} +159 -114
- package/dist/lib/scss/components-core/theming/_themes.scss +6 -7
- package/dist/lib/{server-common-BfCSNpXG.mjs → server-common-lmBDLpUh.mjs} +14848 -10785
- package/dist/lib/syntax-monaco.mjs +14 -11
- package/dist/lib/syntax-textmate.d.ts +2 -2
- package/dist/lib/syntax-textmate.mjs +128 -109
- package/dist/lib/transform-bHBjkKSL.mjs +7376 -0
- package/dist/lib/xmlui-parser.d.ts +17 -8
- package/dist/lib/xmlui-parser.mjs +49 -49
- package/dist/lib/xmlui-serializer-DB6BLiXK.mjs +667 -0
- package/dist/lib/xmlui.d.ts +5 -2
- package/dist/lib/xmlui.mjs +43 -43
- package/dist/{lib/apiInterceptorWorker-DH8wqOVq.mjs → metadata/apiInterceptorWorker-BmKP8bnq.mjs} +5432 -3502
- package/dist/metadata/collectedComponentMetadata-Dp8BqWQO.mjs +55444 -0
- package/dist/metadata/initMock-BvEO8W8r.mjs +843 -0
- package/dist/metadata/style.css +1 -1
- package/dist/metadata/xmlui-metadata.mjs +3 -3
- package/dist/metadata/xmlui-metadata.umd.js +207 -419
- package/dist/scripts/package.json +3 -1
- package/dist/scripts/src/components/APICall/APICall.js +4 -4
- package/dist/scripts/src/components/Accordion/Accordion.js +1 -1
- package/dist/scripts/src/components/Animation/AnimationNative.js +259 -0
- package/dist/scripts/src/components/App/App.js +10 -0
- package/dist/scripts/src/components/App/AppNative.js +23 -2
- package/dist/scripts/src/components/AppHeader/AppHeaderNative.js +1 -1
- package/dist/scripts/src/components/AutoComplete/AutoComplete.js +6 -2
- package/dist/scripts/src/components/AutoComplete/AutoCompleteNative.js +11 -7
- package/dist/scripts/src/components/Avatar/Avatar.js +1 -1
- package/dist/scripts/src/components/Button/Button.js +1 -1
- package/dist/scripts/src/components/Charts/AreaChart/AreaChart.js +92 -0
- package/dist/scripts/src/components/Charts/AreaChart/AreaChartNative.js +127 -0
- package/dist/scripts/src/components/Charts/BarChart/BarChart.js +6 -6
- package/dist/scripts/src/components/Charts/BarChart/BarChartNative.js +110 -96
- package/dist/scripts/src/components/Charts/LineChart/LineChart.js +5 -5
- package/dist/scripts/src/components/Charts/LineChart/LineChartNative.js +14 -4
- package/dist/scripts/src/components/Charts/RadarChart/RadarChart.js +92 -0
- package/dist/scripts/src/components/Charts/RadarChart/RadarChartNative.js +125 -0
- package/dist/scripts/src/components/Checkbox/Checkbox.js +2 -1
- package/dist/scripts/src/components/ComponentProvider.js +4 -2
- package/dist/scripts/src/components/DataSource/DataSource.js +124 -0
- package/dist/scripts/src/components/DropdownMenu/DropdownMenu.js +1 -1
- package/dist/scripts/src/components/Footer/Footer.js +1 -1
- package/dist/scripts/src/components/Footer/FooterNative.js +1 -1
- package/dist/scripts/src/components/Form/FormNative.js +5 -3
- package/dist/scripts/src/components/FormItem/FormItem.js +1 -1
- package/dist/scripts/src/components/FormItem/FormItemNative.js +0 -9
- package/dist/scripts/src/components/FormItem/ItemWithLabel.js +3 -3
- package/dist/scripts/src/components/Heading/Heading.js +83 -28
- package/dist/scripts/src/components/Heading/HeadingNative.js +10 -1
- package/dist/scripts/src/components/HtmlTags/HtmlTags.js +1 -1
- package/dist/scripts/src/components/Icon/IconNative.js +24 -6
- package/dist/scripts/src/components/Image/ImageNative.js +13 -0
- package/dist/scripts/src/components/ModalDialog/ModalDialog.js +8 -0
- package/dist/scripts/src/components/ModalDialog/ModalDialogNative.js +5 -3
- package/dist/scripts/src/components/NavLink/NavLink.js +1 -1
- package/dist/scripts/src/components/NumberBox/NumberBoxNative.js +208 -78
- package/dist/scripts/src/components/Option/Option.js +2 -2
- package/dist/scripts/src/components/Option/OptionNative.js +12 -1
- package/dist/scripts/src/components/RadioGroup/RadioGroup.js +7 -3
- package/dist/scripts/src/components/RadioGroup/RadioGroupNative.js +20 -5
- package/dist/scripts/src/components/RadioGroup/RadioItemNative.js +2 -1
- package/dist/scripts/src/components/Select/Select.js +1 -1
- package/dist/scripts/src/components/Select/SelectNative.js +1 -1
- package/dist/scripts/src/components/Spinner/SpinnerNative.js +3 -2
- package/dist/scripts/src/components/Switch/Switch.js +2 -1
- package/dist/scripts/src/components/Table/Table.js +1 -1
- package/dist/scripts/src/components/TableOfContents/TableOfContents.js +1 -1
- package/dist/scripts/src/components/Text/Text.js +32 -14
- package/dist/scripts/src/components/Text/TextNative.js +17 -5
- package/dist/scripts/src/components/TextBox/TextBoxNative.js +1 -1
- package/dist/scripts/src/components/Toggle/Toggle.js +2 -2
- package/dist/scripts/src/components/abstractions.js +2 -1
- package/dist/scripts/src/components/collectedComponentMetadata.js +316 -0
- package/dist/scripts/src/components-core/RestApiProxy.js +3 -1
- package/dist/scripts/src/components-core/StandaloneApp.js +823 -0
- package/dist/scripts/src/components-core/markup-check.js +279 -0
- package/dist/scripts/src/components-core/rendering/ComponentAdapter.js +36 -16
- package/dist/scripts/src/components-core/script-runner/eval-tree-async.js +4 -1
- package/dist/scripts/src/components-core/script-runner/eval-tree-sync.js +4 -1
- package/dist/scripts/src/components-core/theming/themes/root.js +30 -17
- package/dist/scripts/src/components-core/theming/transformThemeVars.js +14 -7
- package/dist/scripts/src/components-core/xmlui-parser.js +60 -43
- package/dist/scripts/src/index.js +120 -0
- package/dist/scripts/src/parsers/xmlui-parser/syntax-kind.js +9 -0
- package/dist/scripts/src/parsers/xmlui-parser/transform.js +17 -5
- package/dist/standalone/xmlui-standalone.es.d.ts +6 -2
- package/dist/standalone/xmlui-standalone.umd.js +319 -823
- package/package.json +3 -1
- package/src/syntax/textMate/xmlui.tmLanguage.json +2 -2
- package/dist/lib/index-C71PAj7E.mjs +0 -38677
- package/dist/lib/initMock-Bvbl2Pa3.mjs +0 -571
- package/dist/lib/transform-SMWeyMoq.mjs +0 -5391
- package/dist/lib/xmlui-serializer-a0O0jFY-.mjs +0 -497
- package/dist/metadata/collectedComponentMetadata-Dn91__HO.mjs +0 -43087
- package/dist/metadata/initMock-ghNfStAu.mjs +0 -571
- package/dist/scripts/src/components/NumberBox/NumberBox2.js +0 -99
- package/dist/scripts/src/components/NumberBox/NumberBox2Native.js +0 -420
|
@@ -9,9 +9,11 @@ const parser_1 = require("../parsers/xmlui-parser/parser");
|
|
|
9
9
|
const transform_1 = require("../parsers/xmlui-parser/transform");
|
|
10
10
|
const diagnostics_1 = require("../parsers/xmlui-parser/diagnostics");
|
|
11
11
|
const syntax_kind_1 = require("../parsers/xmlui-parser/syntax-kind");
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
12
|
+
const COLOR_DANGER_100 = "hsl(356, 100%, 91%)";
|
|
13
|
+
const COLOR_DANGER_300 = "hsl(356, 100%, 70%)";
|
|
14
|
+
const COLOR_PRIMARY = "hsl(204, 30.3%, 13%)";
|
|
15
|
+
const COLOR_PRIMARY_LINE_NUMS = "#555b5e";
|
|
16
|
+
const RADIUS = "0.5rem";
|
|
15
17
|
function xmlUiMarkupToComponent(source, fileId = 0) {
|
|
16
18
|
const { parse, getText } = (0, parser_1.createXmlUiParser)(source);
|
|
17
19
|
const { node, errors } = parse();
|
|
@@ -119,13 +121,20 @@ function createErrorReportComponent(errors, fileName) {
|
|
|
119
121
|
const lineEnd = currentPos + line.length;
|
|
120
122
|
const lineChildren = [
|
|
121
123
|
{
|
|
122
|
-
type: "
|
|
123
|
-
props: {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
type: "Theme",
|
|
125
|
+
props: {},
|
|
126
|
+
children: [
|
|
127
|
+
{
|
|
128
|
+
type: "Text",
|
|
129
|
+
props: {
|
|
130
|
+
value: linePrefix,
|
|
131
|
+
fontFamily: "monospace",
|
|
132
|
+
color: COLOR_PRIMARY_LINE_NUMS,
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
],
|
|
128
136
|
},
|
|
137
|
+
,
|
|
129
138
|
];
|
|
130
139
|
if (errorStartInContext >= lineStart && errorStartInContext < lineEnd) {
|
|
131
140
|
// Error starts on this line
|
|
@@ -149,7 +158,7 @@ function createErrorReportComponent(errors, fileName) {
|
|
|
149
158
|
fontFamily: "monospace",
|
|
150
159
|
textDecorationLine: "underline",
|
|
151
160
|
textDecorationColor: "$color-error",
|
|
152
|
-
backgroundColor:
|
|
161
|
+
backgroundColor: COLOR_DANGER_100,
|
|
153
162
|
},
|
|
154
163
|
});
|
|
155
164
|
}
|
|
@@ -172,7 +181,7 @@ function createErrorReportComponent(errors, fileName) {
|
|
|
172
181
|
fontFamily: "monospace",
|
|
173
182
|
textDecorationLine: "underline",
|
|
174
183
|
textDecorationColor: "$color-error",
|
|
175
|
-
backgroundColor:
|
|
184
|
+
backgroundColor: COLOR_DANGER_100,
|
|
176
185
|
},
|
|
177
186
|
});
|
|
178
187
|
}
|
|
@@ -190,7 +199,7 @@ function createErrorReportComponent(errors, fileName) {
|
|
|
190
199
|
fontFamily: "monospace",
|
|
191
200
|
textDecorationLine: "underline",
|
|
192
201
|
textDecorationColor: "$color-error",
|
|
193
|
-
backgroundColor:
|
|
202
|
+
backgroundColor: COLOR_DANGER_100,
|
|
194
203
|
},
|
|
195
204
|
});
|
|
196
205
|
}
|
|
@@ -221,7 +230,7 @@ function createErrorReportComponent(errors, fileName) {
|
|
|
221
230
|
textDecorationLine: "underline",
|
|
222
231
|
fontFamily: "monospace",
|
|
223
232
|
fontWeight: "bold",
|
|
224
|
-
backgroundColor:
|
|
233
|
+
backgroundColor: COLOR_DANGER_100,
|
|
225
234
|
color: "$color-error",
|
|
226
235
|
},
|
|
227
236
|
});
|
|
@@ -250,7 +259,7 @@ function createErrorReportComponent(errors, fileName) {
|
|
|
250
259
|
type: "Text",
|
|
251
260
|
props: {
|
|
252
261
|
value: `#${idx + 1}: ${fileName} (${e.errPosLine}:${e.errPosCol}):`,
|
|
253
|
-
color: "hsl(204, 30.3%, 27%)",
|
|
262
|
+
// color: "hsl(204, 30.3%, 27%)",
|
|
254
263
|
},
|
|
255
264
|
},
|
|
256
265
|
{
|
|
@@ -285,7 +294,7 @@ function createErrorReportComponent(errors, fileName) {
|
|
|
285
294
|
gap: "$gap-none",
|
|
286
295
|
padding: "16px",
|
|
287
296
|
backgroundColor: "white",
|
|
288
|
-
borderRadius:
|
|
297
|
+
borderRadius: RADIUS,
|
|
289
298
|
},
|
|
290
299
|
children: [errMsgComponenet],
|
|
291
300
|
};
|
|
@@ -295,51 +304,59 @@ function createErrorReportComponent(errors, fileName) {
|
|
|
295
304
|
return errComponent;
|
|
296
305
|
});
|
|
297
306
|
const comp = {
|
|
298
|
-
type: "
|
|
307
|
+
type: "Theme",
|
|
299
308
|
props: {
|
|
300
|
-
|
|
301
|
-
gap: 0,
|
|
302
|
-
backgroundColor: COLOR_DANER_100,
|
|
303
|
-
margin: "10px",
|
|
304
|
-
border: "2px solid " + COLOR_DANER_300,
|
|
305
|
-
borderRadius: SPACE_2,
|
|
309
|
+
"textColor-primary": COLOR_PRIMARY,
|
|
306
310
|
},
|
|
307
311
|
children: [
|
|
308
312
|
{
|
|
309
|
-
type: "
|
|
313
|
+
type: "VStack",
|
|
310
314
|
props: {
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
+
padding: "16px 32px 16px 38px",
|
|
316
|
+
gap: 0,
|
|
317
|
+
backgroundColor: COLOR_DANGER_100,
|
|
318
|
+
margin: "10px",
|
|
319
|
+
border: "2px solid " + COLOR_DANGER_300,
|
|
320
|
+
borderRadius: RADIUS,
|
|
315
321
|
},
|
|
316
322
|
children: [
|
|
317
323
|
{
|
|
318
|
-
type: "
|
|
324
|
+
type: "HStack",
|
|
319
325
|
props: {
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
326
|
+
verticalAlignment: "center",
|
|
327
|
+
marginLeft: "-34px",
|
|
328
|
+
padding: "0px 0px 15px 0px",
|
|
329
|
+
gap: "4px",
|
|
323
330
|
},
|
|
331
|
+
children: [
|
|
332
|
+
{
|
|
333
|
+
type: "Icon",
|
|
334
|
+
props: {
|
|
335
|
+
name: "error",
|
|
336
|
+
size: "30px",
|
|
337
|
+
color: "$color-error",
|
|
338
|
+
},
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
type: "H2",
|
|
342
|
+
props: {
|
|
343
|
+
value: `${errList.length} ${errList.length > 1 ? "errors" : "error"} while processing XMLUI markup`,
|
|
344
|
+
fontWeight: "bold",
|
|
345
|
+
showAnchor: false,
|
|
346
|
+
},
|
|
347
|
+
},
|
|
348
|
+
],
|
|
324
349
|
},
|
|
325
350
|
{
|
|
326
|
-
type: "
|
|
351
|
+
type: "VStack",
|
|
327
352
|
props: {
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
showAnchor: false,
|
|
353
|
+
padding: "$padding-none",
|
|
354
|
+
gap: "16px",
|
|
331
355
|
},
|
|
356
|
+
children: errList,
|
|
332
357
|
},
|
|
333
358
|
],
|
|
334
359
|
},
|
|
335
|
-
{
|
|
336
|
-
type: "VStack",
|
|
337
|
-
props: {
|
|
338
|
-
padding: "$padding-none",
|
|
339
|
-
gap: "16px",
|
|
340
|
-
},
|
|
341
|
-
children: errList,
|
|
342
|
-
},
|
|
343
360
|
],
|
|
344
361
|
};
|
|
345
362
|
return comp;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.StandaloneComponent = exports.useEvent = exports.StyleRegistry = exports.StyleProvider = exports.useAppLayoutContext = exports.useSearchContextContent = exports.Breakout = exports.Logo = exports.ToneChangerButton = exports.LinkNative = exports.VisuallyHidden = exports.NestedApp = exports.TextBox = exports.Text = exports.XmlUiHelper = exports.builtInThemes = exports.useThemes = exports.Spinner = exports.ApiInterceptorProvider = exports.xmlUiMarkupToComponent = exports.errReportComponent = exports.useLogger = exports.useDevTools = exports.toCssVar = exports.useColors = exports.Tabs = exports.TabItem = exports.getColor = exports.Splitter = exports.Button = exports.Stack = exports.Icon = exports.ErrorBoundary = exports.AppRoot = exports.useTheme = exports.startApp = exports.parseScssVar = exports.dComponent = exports.d = exports.createMetadata = exports.createComponentRenderer = exports.StandaloneExtensionManager = exports.StandaloneApp = void 0;
|
|
40
|
+
const StandaloneApp_1 = __importStar(require("./components-core/StandaloneApp"));
|
|
41
|
+
exports.StandaloneApp = StandaloneApp_1.default;
|
|
42
|
+
Object.defineProperty(exports, "startApp", { enumerable: true, get: function () { return StandaloneApp_1.startApp; } });
|
|
43
|
+
const AppRoot_1 = require("./components-core/rendering/AppRoot");
|
|
44
|
+
Object.defineProperty(exports, "AppRoot", { enumerable: true, get: function () { return AppRoot_1.AppRoot; } });
|
|
45
|
+
const renderers_1 = require("./components-core/renderers");
|
|
46
|
+
Object.defineProperty(exports, "createComponentRenderer", { enumerable: true, get: function () { return renderers_1.createComponentRenderer; } });
|
|
47
|
+
const IconNative_1 = require("./components/Icon/IconNative");
|
|
48
|
+
Object.defineProperty(exports, "Icon", { enumerable: true, get: function () { return IconNative_1.Icon; } });
|
|
49
|
+
const ErrorBoundary_1 = require("./components-core/rendering/ErrorBoundary");
|
|
50
|
+
Object.defineProperty(exports, "ErrorBoundary", { enumerable: true, get: function () { return ErrorBoundary_1.ErrorBoundary; } });
|
|
51
|
+
const StackNative_1 = require("./components/Stack/StackNative");
|
|
52
|
+
Object.defineProperty(exports, "Stack", { enumerable: true, get: function () { return StackNative_1.Stack; } });
|
|
53
|
+
const ButtonNative_1 = require("./components/Button/ButtonNative");
|
|
54
|
+
Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return ButtonNative_1.Button; } });
|
|
55
|
+
const SplitterNative_1 = require("./components/Splitter/SplitterNative");
|
|
56
|
+
Object.defineProperty(exports, "Splitter", { enumerable: true, get: function () { return SplitterNative_1.Splitter; } });
|
|
57
|
+
const ThemeContext_1 = require("./components-core/theming/ThemeContext");
|
|
58
|
+
Object.defineProperty(exports, "useTheme", { enumerable: true, get: function () { return ThemeContext_1.useTheme; } });
|
|
59
|
+
Object.defineProperty(exports, "useThemes", { enumerable: true, get: function () { return ThemeContext_1.useThemes; } });
|
|
60
|
+
const StyleParser_1 = require("./parsers/style-parser/StyleParser");
|
|
61
|
+
Object.defineProperty(exports, "toCssVar", { enumerable: true, get: function () { return StyleParser_1.toCssVar; } });
|
|
62
|
+
const css_utils_1 = require("./components-core/utils/css-utils");
|
|
63
|
+
Object.defineProperty(exports, "getColor", { enumerable: true, get: function () { return css_utils_1.getColor; } });
|
|
64
|
+
const hooks_1 = require("./components-core/utils/hooks");
|
|
65
|
+
Object.defineProperty(exports, "useColors", { enumerable: true, get: function () { return hooks_1.useColors; } });
|
|
66
|
+
const themeVars_1 = require("./components-core/theming/themeVars");
|
|
67
|
+
Object.defineProperty(exports, "parseScssVar", { enumerable: true, get: function () { return themeVars_1.parseScssVar; } });
|
|
68
|
+
const StandaloneExtensionManager_1 = __importDefault(require("./components-core/StandaloneExtensionManager"));
|
|
69
|
+
exports.StandaloneExtensionManager = StandaloneExtensionManager_1.default;
|
|
70
|
+
const InspectorContext_1 = require("./components-core/InspectorContext");
|
|
71
|
+
Object.defineProperty(exports, "useDevTools", { enumerable: true, get: function () { return InspectorContext_1.useDevTools; } });
|
|
72
|
+
const LoggerContext_1 = require("./logging/LoggerContext");
|
|
73
|
+
Object.defineProperty(exports, "useLogger", { enumerable: true, get: function () { return LoggerContext_1.useLogger; } });
|
|
74
|
+
const TabItemNative_1 = require("./components/Tabs/TabItemNative");
|
|
75
|
+
Object.defineProperty(exports, "TabItem", { enumerable: true, get: function () { return TabItemNative_1.TabItemComponent; } });
|
|
76
|
+
const TabsNative_1 = require("./components/Tabs/TabsNative");
|
|
77
|
+
Object.defineProperty(exports, "Tabs", { enumerable: true, get: function () { return TabsNative_1.Tabs; } });
|
|
78
|
+
const xmlui_parser_1 = require("./components-core/xmlui-parser");
|
|
79
|
+
Object.defineProperty(exports, "errReportComponent", { enumerable: true, get: function () { return xmlui_parser_1.errReportComponent; } });
|
|
80
|
+
Object.defineProperty(exports, "xmlUiMarkupToComponent", { enumerable: true, get: function () { return xmlui_parser_1.xmlUiMarkupToComponent; } });
|
|
81
|
+
const ApiInterceptorProvider_1 = require("./components-core/interception/ApiInterceptorProvider");
|
|
82
|
+
Object.defineProperty(exports, "ApiInterceptorProvider", { enumerable: true, get: function () { return ApiInterceptorProvider_1.ApiInterceptorProvider; } });
|
|
83
|
+
const SpinnerNative_1 = require("./components/Spinner/SpinnerNative");
|
|
84
|
+
Object.defineProperty(exports, "Spinner", { enumerable: true, get: function () { return SpinnerNative_1.Spinner; } });
|
|
85
|
+
const xmlui_parser_2 = require("./parsers/xmlui-parser");
|
|
86
|
+
Object.defineProperty(exports, "XmlUiHelper", { enumerable: true, get: function () { return xmlui_parser_2.XmlUiHelper; } });
|
|
87
|
+
const TextNative_1 = require("./components/Text/TextNative");
|
|
88
|
+
Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return TextNative_1.Text; } });
|
|
89
|
+
const TextBoxNative_1 = require("./components/TextBox/TextBoxNative");
|
|
90
|
+
Object.defineProperty(exports, "TextBox", { enumerable: true, get: function () { return TextBoxNative_1.TextBox; } });
|
|
91
|
+
const NestedAppNative_1 = require("./components/NestedApp/NestedAppNative");
|
|
92
|
+
Object.defineProperty(exports, "NestedApp", { enumerable: true, get: function () { return NestedAppNative_1.NestedApp; } });
|
|
93
|
+
const ThemeProvider_1 = require("./components-core/theming/ThemeProvider");
|
|
94
|
+
Object.defineProperty(exports, "builtInThemes", { enumerable: true, get: function () { return ThemeProvider_1.builtInThemes; } });
|
|
95
|
+
const VisuallyHidden_1 = require("./components/VisuallyHidden");
|
|
96
|
+
Object.defineProperty(exports, "VisuallyHidden", { enumerable: true, get: function () { return VisuallyHidden_1.VisuallyHidden; } });
|
|
97
|
+
const LinkNative_1 = require("./components/Link/LinkNative");
|
|
98
|
+
Object.defineProperty(exports, "LinkNative", { enumerable: true, get: function () { return LinkNative_1.LinkNative; } });
|
|
99
|
+
const BreakoutNative_1 = require("./components/Breakout/BreakoutNative");
|
|
100
|
+
Object.defineProperty(exports, "Breakout", { enumerable: true, get: function () { return BreakoutNative_1.Breakout; } });
|
|
101
|
+
const ToneChangerButton_1 = require("./components/ToneChangerButton/ToneChangerButton");
|
|
102
|
+
Object.defineProperty(exports, "ToneChangerButton", { enumerable: true, get: function () { return ToneChangerButton_1.ToneChangerButton; } });
|
|
103
|
+
const LogoNative_1 = require("./components/Logo/LogoNative");
|
|
104
|
+
Object.defineProperty(exports, "Logo", { enumerable: true, get: function () { return LogoNative_1.Logo; } });
|
|
105
|
+
const SearchContext_1 = require("./components/App/SearchContext");
|
|
106
|
+
Object.defineProperty(exports, "useSearchContextContent", { enumerable: true, get: function () { return SearchContext_1.useSearchContextContent; } });
|
|
107
|
+
const AppLayoutContext_1 = require("./components/App/AppLayoutContext");
|
|
108
|
+
Object.defineProperty(exports, "useAppLayoutContext", { enumerable: true, get: function () { return AppLayoutContext_1.useAppLayoutContext; } });
|
|
109
|
+
const StyleContext_1 = require("./components-core/theming/StyleContext");
|
|
110
|
+
Object.defineProperty(exports, "StyleProvider", { enumerable: true, get: function () { return StyleContext_1.StyleProvider; } });
|
|
111
|
+
const StyleRegistry_1 = require("./components-core/theming/StyleRegistry");
|
|
112
|
+
Object.defineProperty(exports, "StyleRegistry", { enumerable: true, get: function () { return StyleRegistry_1.StyleRegistry; } });
|
|
113
|
+
const misc_1 = require("./components-core/utils/misc");
|
|
114
|
+
Object.defineProperty(exports, "useEvent", { enumerable: true, get: function () { return misc_1.useEvent; } });
|
|
115
|
+
const metadata_helpers_1 = require("./components/metadata-helpers");
|
|
116
|
+
Object.defineProperty(exports, "createMetadata", { enumerable: true, get: function () { return metadata_helpers_1.createMetadata; } });
|
|
117
|
+
Object.defineProperty(exports, "d", { enumerable: true, get: function () { return metadata_helpers_1.d; } });
|
|
118
|
+
Object.defineProperty(exports, "dComponent", { enumerable: true, get: function () { return metadata_helpers_1.dComponent; } });
|
|
119
|
+
const StandaloneComponent_1 = __importDefault(require("./components-core/rendering/StandaloneComponent"));
|
|
120
|
+
exports.StandaloneComponent = StandaloneComponent_1.default;
|
|
@@ -15,14 +15,23 @@ var SyntaxKind;
|
|
|
15
15
|
SyntaxKind[SyntaxKind["WhitespaceTrivia"] = 4] = "WhitespaceTrivia";
|
|
16
16
|
// Effective tokens
|
|
17
17
|
SyntaxKind[SyntaxKind["Identifier"] = 5] = "Identifier";
|
|
18
|
+
/** < */
|
|
18
19
|
SyntaxKind[SyntaxKind["OpenNodeStart"] = 6] = "OpenNodeStart";
|
|
20
|
+
/** </ */
|
|
19
21
|
SyntaxKind[SyntaxKind["CloseNodeStart"] = 7] = "CloseNodeStart";
|
|
22
|
+
/** > */
|
|
20
23
|
SyntaxKind[SyntaxKind["NodeEnd"] = 8] = "NodeEnd";
|
|
24
|
+
/** /> */
|
|
21
25
|
SyntaxKind[SyntaxKind["NodeClose"] = 9] = "NodeClose";
|
|
26
|
+
/** : */
|
|
22
27
|
SyntaxKind[SyntaxKind["Colon"] = 10] = "Colon";
|
|
28
|
+
/** = */
|
|
23
29
|
SyntaxKind[SyntaxKind["Equal"] = 11] = "Equal";
|
|
30
|
+
/** string literal */
|
|
24
31
|
SyntaxKind[SyntaxKind["StringLiteral"] = 12] = "StringLiteral";
|
|
32
|
+
/** <![CDATA[ ... ]]> */
|
|
25
33
|
SyntaxKind[SyntaxKind["CData"] = 13] = "CData";
|
|
34
|
+
/** <script>...</script> */
|
|
26
35
|
SyntaxKind[SyntaxKind["Script"] = 14] = "Script";
|
|
27
36
|
// A token created by the parser which contains arbitrary text, but not the '<' character
|
|
28
37
|
SyntaxKind[SyntaxKind["TextNode"] = 15] = "TextNode";
|
|
@@ -304,7 +304,8 @@ function nodeToComponentDef(node, originalGetText, fileId) {
|
|
|
304
304
|
}
|
|
305
305
|
catch (err) {
|
|
306
306
|
if (parser.errors && parser.errors.length > 0) {
|
|
307
|
-
|
|
307
|
+
const errMsg = parser.errors[0];
|
|
308
|
+
throw new ParserError_1.ParserError(`${errMsg.text} [${errMsg.line}: ${errMsg.column}]`, errMsg.code);
|
|
308
309
|
}
|
|
309
310
|
else {
|
|
310
311
|
comp.scriptError = err;
|
|
@@ -354,6 +355,9 @@ function nodeToComponentDef(node, originalGetText, fileId) {
|
|
|
354
355
|
case "when":
|
|
355
356
|
comp.when = value;
|
|
356
357
|
return;
|
|
358
|
+
case "uses":
|
|
359
|
+
comp.uses = splitUsesValue(value);
|
|
360
|
+
return;
|
|
357
361
|
default:
|
|
358
362
|
if (startSegment === "var") {
|
|
359
363
|
(_a = comp.vars) !== null && _a !== void 0 ? _a : (comp.vars = {});
|
|
@@ -565,21 +569,26 @@ function nodeToComponentDef(node, originalGetText, fileId) {
|
|
|
565
569
|
setter(name, updatedValue);
|
|
566
570
|
}
|
|
567
571
|
}
|
|
568
|
-
function collectUsesElements(comp,
|
|
569
|
-
var _a;
|
|
572
|
+
function collectUsesElements(comp, usesNode) {
|
|
570
573
|
// --- Compound component do not have a uses
|
|
571
574
|
if (!isComponent(comp)) {
|
|
572
575
|
reportError("T009", "uses");
|
|
573
576
|
return;
|
|
574
577
|
}
|
|
575
|
-
const attributes = getAttributes(
|
|
578
|
+
const attributes = getAttributes(usesNode).map(segmentAttr);
|
|
576
579
|
const valueAttr = attributes.find((attr) => attr.name === "value");
|
|
577
580
|
if (!(valueAttr === null || valueAttr === void 0 ? void 0 : valueAttr.value) || attributes.length !== 1) {
|
|
578
581
|
reportError("T015", "uses");
|
|
579
582
|
return;
|
|
580
583
|
}
|
|
581
584
|
// --- Extract the value
|
|
582
|
-
|
|
585
|
+
const usesValues = splitUsesValue(valueAttr.value);
|
|
586
|
+
if (comp.uses) {
|
|
587
|
+
comp.uses.push(...usesValues);
|
|
588
|
+
}
|
|
589
|
+
else {
|
|
590
|
+
comp.uses = usesValues;
|
|
591
|
+
}
|
|
583
592
|
}
|
|
584
593
|
function segmentAttr(attr) {
|
|
585
594
|
let key = attr.children[0];
|
|
@@ -1117,3 +1126,6 @@ function getNamespaceResolvedComponentName(node, getText, namespaceStack) {
|
|
|
1117
1126
|
function stripOnPrefix(name) {
|
|
1118
1127
|
return name[2].toLowerCase() + name.substring(3);
|
|
1119
1128
|
}
|
|
1129
|
+
function splitUsesValue(value) {
|
|
1130
|
+
return value.split(",").map((v) => v.trim());
|
|
1131
|
+
}
|
|
@@ -557,7 +557,7 @@ declare type ContributesDefinition = {
|
|
|
557
557
|
* @param metadata Optional hints to help fix the rendering errors coming from invalid component property definitions
|
|
558
558
|
* @returns The view renderer definition composed of the arguments
|
|
559
559
|
*/
|
|
560
|
-
declare function createComponentRenderer<TMd extends ComponentMetadata>(type: string, metadata: TMd, renderer: ComponentRendererFn<ComponentDef<
|
|
560
|
+
declare function createComponentRenderer<TMd extends ComponentMetadata>(type: string, metadata: TMd, renderer: ComponentRendererFn<ComponentDef<any>>): ComponentRendererDef;
|
|
561
561
|
|
|
562
562
|
declare function createMetadata<TProps extends Record<string, ComponentPropertyMetadata>, TEvents extends Record<string, ComponentPropertyMetadata>, TContextVars extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TApis extends Record<string, ComponentPropertyMetadata> = Record<string, any>>(metadata: ComponentMetadata<TProps, TEvents, TContextVars, TApis>): ComponentMetadata<TProps, TEvents, TContextVars, TApis>;
|
|
563
563
|
|
|
@@ -828,6 +828,8 @@ declare interface IconBaseProps extends default_2.SVGAttributes<SVGElement> {
|
|
|
828
828
|
fallback?: string;
|
|
829
829
|
style?: CSSProperties;
|
|
830
830
|
className?: string;
|
|
831
|
+
tabIndex?: number;
|
|
832
|
+
onKeyDown?: default_2.KeyboardEventHandler<any>;
|
|
831
833
|
}
|
|
832
834
|
|
|
833
835
|
declare type IconPosition = (typeof iconPositionValues)[number];
|
|
@@ -1267,7 +1269,7 @@ declare interface SequenceExpression extends ExpressionBase {
|
|
|
1267
1269
|
|
|
1268
1270
|
declare type SizeType = (typeof sizeValues)[number];
|
|
1269
1271
|
|
|
1270
|
-
declare const sizeValues: readonly ["xs", "sm", "md", "lg"];
|
|
1272
|
+
declare const sizeValues: readonly ["xs", "sm", "md", "lg", "xl"];
|
|
1271
1273
|
|
|
1272
1274
|
declare const Spinner: ForwardRefExoticComponent<SpinnerProps & RefAttributes<HTMLDivElement>>;
|
|
1273
1275
|
|
|
@@ -1454,6 +1456,7 @@ declare const standaloneExports: {
|
|
|
1454
1456
|
breakMode?: BreakMode;
|
|
1455
1457
|
style?: default_2.CSSProperties;
|
|
1456
1458
|
className?: string;
|
|
1459
|
+
registerComponentApi?: xmluiExports.RegisterComponentApiFn;
|
|
1457
1460
|
}, "ref"> & default_2.RefAttributes<unknown>>;
|
|
1458
1461
|
TextBox: default_2.ForwardRefExoticComponent<{
|
|
1459
1462
|
id?: string;
|
|
@@ -1793,6 +1796,7 @@ declare type TextProps = {
|
|
|
1793
1796
|
breakMode?: BreakMode;
|
|
1794
1797
|
style?: CSSProperties;
|
|
1795
1798
|
className?: string;
|
|
1799
|
+
registerComponentApi?: RegisterComponentApiFn;
|
|
1796
1800
|
[variantSpecificProps: string]: any;
|
|
1797
1801
|
};
|
|
1798
1802
|
|