xmlui 0.9.90 → 0.9.92
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/{index-Bs4hp2dn.mjs → index-C5eOg7bB.mjs} +1908 -1904
- package/dist/lib/{initMock-DwAYhsKb.mjs → initMock-DLD4GmW7.mjs} +1 -1
- package/dist/lib/language-server-web-worker.mjs +1 -1
- package/dist/lib/language-server.mjs +1 -1
- package/dist/lib/{metadata-utils-DJhOKFL6.mjs → metadata-utils-BE5_Lmoa.mjs} +46 -48
- package/dist/lib/{server-common-CIqrGYx-.mjs → server-common-xCK0Af2K.mjs} +4446 -4476
- package/dist/lib/xmlui.mjs +1 -1
- package/dist/metadata/{collectedComponentMetadata-fh2ak2QN.mjs → collectedComponentMetadata-iKGyD6r3.mjs} +2061 -2057
- package/dist/metadata/{initMock-8hLEm7iV.mjs → initMock-CZGAyfXr.mjs} +1 -1
- package/dist/metadata/xmlui-metadata.mjs +1 -1
- package/dist/metadata/xmlui-metadata.umd.js +41 -41
- package/dist/scripts/package.json +1 -1
- package/dist/scripts/src/components/ComponentProvider.js +2 -2
- package/dist/scripts/src/{components-core → components/Fragment}/Fragment.js +2 -2
- package/dist/scripts/src/{components-core → components/Slot}/Slot.js +2 -2
- package/dist/scripts/src/components/abstractions.js +25 -6
- package/dist/scripts/src/components-core/rendering/ComponentAdapter.js +4 -5
- package/dist/standalone/xmlui-standalone.umd.js +185 -185
- package/package.json +1 -1
|
@@ -15,7 +15,7 @@ const Button_1 = require("./Button/Button");
|
|
|
15
15
|
const HelloWorld_1 = require("./HelloWorld/HelloWorld");
|
|
16
16
|
const Heading_1 = require("./Heading/Heading");
|
|
17
17
|
const Text_1 = require("./Text/Text");
|
|
18
|
-
const Fragment_1 = require("
|
|
18
|
+
const Fragment_1 = require("./Fragment/Fragment");
|
|
19
19
|
const Table_1 = require("./Table/Table");
|
|
20
20
|
const StickyBox_1 = require("./StickyBox/StickyBox");
|
|
21
21
|
const Badge_1 = require("./Badge/Badge");
|
|
@@ -53,7 +53,7 @@ const Footer_1 = require("./Footer/Footer");
|
|
|
53
53
|
const NavGroup_1 = require("./NavGroup/NavGroup");
|
|
54
54
|
const Logo_1 = require("./Logo/Logo");
|
|
55
55
|
const RadioGroup_1 = require("./RadioGroup/RadioGroup");
|
|
56
|
-
const Slot_1 = require("
|
|
56
|
+
const Slot_1 = require("./Slot/Slot");
|
|
57
57
|
const FileInput_1 = require("./FileInput/FileInput");
|
|
58
58
|
const Spinner_1 = require("./Spinner/Spinner");
|
|
59
59
|
const Markdown_1 = require("./Markdown/Markdown");
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.fragmentComponentRenderer = exports.FragmentMd = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const renderers_1 = require("
|
|
7
|
-
const metadata_helpers_1 = require("../
|
|
6
|
+
const renderers_1 = require("../../components-core/renderers");
|
|
7
|
+
const metadata_helpers_1 = require("../metadata-helpers");
|
|
8
8
|
const COMP = "Fragment";
|
|
9
9
|
exports.FragmentMd = (0, metadata_helpers_1.createMetadata)({
|
|
10
10
|
status: "stable",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SlotHolder = exports.SlotMd = void 0;
|
|
4
|
-
const metadata_helpers_1 = require("../
|
|
5
|
-
const renderers_1 = require("
|
|
4
|
+
const metadata_helpers_1 = require("../metadata-helpers");
|
|
5
|
+
const renderers_1 = require("../../components-core/renderers");
|
|
6
6
|
const COMP = "Slot";
|
|
7
7
|
exports.SlotMd = (0, metadata_helpers_1.createMetadata)({
|
|
8
8
|
status: "experimental",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.httpMethodNames = exports.VariantPropsKeys = exports.variantOptionsMd = exports.TextVariantElement = exports.orderingValues = exports.scrollAnchoringNames = exports.scrollAnchoringValues = exports.validationStatusMd = exports.validationStatusNames = exports.validationStatusValues = exports.triggerPositionNames = exports.labelPositionMd = exports.labelPositionNames = exports.labelPositionValues = exports.placementMd = exports.placementNames = exports.statusColorMd = exports.statusColorNames = exports.iconPositionMd = exports.iconPositionNames = exports.iconPositionValues = exports.orientationOptionMd = exports.orientationOptionNames = exports.alignmentOptionMd = exports.alignmentOptionNames = exports.alignmentOptionValues = exports.buttonAriaNames = exports.buttonVariantMd = exports.buttonVariantNames = exports.buttonVariantValues = exports.buttonTypesMd = exports.buttonTypeNames = exports.buttonTypeValues = exports.buttonThemeMd = exports.buttonThemeNames = exports.buttonThemeValues = exports.
|
|
3
|
+
exports.httpMethodNames = exports.VariantPropsKeys = exports.variantOptionsMd = exports.TextVariantElement = exports.orderingValues = exports.scrollAnchoringNames = exports.scrollAnchoringValues = exports.validationStatusMd = exports.validationStatusNames = exports.validationStatusValues = exports.triggerPositionNames = exports.labelPositionMd = exports.labelPositionNames = exports.labelPositionValues = exports.placementMd = exports.placementNames = exports.statusColorMd = exports.statusColorNames = exports.iconPositionMd = exports.iconPositionNames = exports.iconPositionValues = exports.orientationOptionMd = exports.orientationOptionNames = exports.alignmentOptionMd = exports.alignmentOptionNames = exports.alignmentOptionValues = exports.buttonAriaNames = exports.buttonVariantMd = exports.buttonVariantNames = exports.buttonVariantValues = exports.buttonTypesMd = exports.buttonTypeNames = exports.buttonTypeValues = exports.buttonThemeMd = exports.buttonThemeNames = exports.buttonThemeValues = exports.sizeMd = exports.sizeNames = exports.viewportSizeNames = exports.viewportSizeMd = exports.LinkTargetMd = exports.LinkTargetNames = void 0;
|
|
4
4
|
exports.LinkTargetNames = ["_self", "_blank", "_parent", "_top", "_unfencedTop"];
|
|
5
5
|
exports.LinkTargetMd = [
|
|
6
6
|
{
|
|
@@ -38,14 +38,14 @@ exports.viewportSizeMd = [
|
|
|
38
38
|
];
|
|
39
39
|
exports.viewportSizeNames = Object.keys(exports.viewportSizeMd);
|
|
40
40
|
// --- Available button sizes
|
|
41
|
+
exports.sizeNames = ["xs", "sm", "md", "lg"];
|
|
41
42
|
exports.sizeMd = [
|
|
42
|
-
{ value: "xs", description: "Extra small
|
|
43
|
-
{ value: "sm", description: "Small
|
|
44
|
-
{ value: "md", description: "Medium
|
|
45
|
-
{ value: "lg", description: "Large
|
|
43
|
+
{ value: "xs", description: "Extra small" },
|
|
44
|
+
{ value: "sm", description: "Small" },
|
|
45
|
+
{ value: "md", description: "Medium" },
|
|
46
|
+
{ value: "lg", description: "Large" },
|
|
46
47
|
];
|
|
47
48
|
const sizeValues = Object.keys(exports.sizeMd);
|
|
48
|
-
exports.sizeNames = [...sizeValues];
|
|
49
49
|
// --- Available button themes
|
|
50
50
|
exports.buttonThemeValues = ["attention", "primary", "secondary"];
|
|
51
51
|
exports.buttonThemeNames = [...exports.buttonThemeValues];
|
|
@@ -219,6 +219,25 @@ const TextVariantKeys = [
|
|
|
219
219
|
"tableheading", // use a H3 with some specific defaults
|
|
220
220
|
"secondary", // use a secondary text style
|
|
221
221
|
];
|
|
222
|
+
const TextVariantMapping = [
|
|
223
|
+
"abbr",
|
|
224
|
+
"cite",
|
|
225
|
+
"code",
|
|
226
|
+
"del",
|
|
227
|
+
"em",
|
|
228
|
+
"ins",
|
|
229
|
+
"kbd",
|
|
230
|
+
"mark",
|
|
231
|
+
"p",
|
|
232
|
+
"pre",
|
|
233
|
+
"samp",
|
|
234
|
+
"strong",
|
|
235
|
+
"sub",
|
|
236
|
+
"sup",
|
|
237
|
+
"var",
|
|
238
|
+
"h6",
|
|
239
|
+
"span",
|
|
240
|
+
];
|
|
222
241
|
exports.TextVariantElement = {
|
|
223
242
|
abbr: "abbr",
|
|
224
243
|
cite: "cite",
|
|
@@ -135,10 +135,6 @@ const ComponentAdapter = (0, react_1.forwardRef)(function ComponentAdapter(_a, r
|
|
|
135
135
|
// --- Obtain the component renderer and descriptor from the component registry
|
|
136
136
|
const componentRegistry = (0, ComponentRegistryContext_1.useComponentRegistry)();
|
|
137
137
|
const { renderer, descriptor, isCompoundComponent } = componentRegistry.lookupComponentRenderer(safeNode.type) || {};
|
|
138
|
-
// if (safeNode.type.startsWith("Component")) {
|
|
139
|
-
// console.log("renderer", renderer, safeNode.type);
|
|
140
|
-
// console.log("registry", componentRegistry.getRegisteredComponentKeys().length);
|
|
141
|
-
// }
|
|
142
138
|
// --- Obtain a function that can lookup an event handler, which is bound to a
|
|
143
139
|
// --- particular event of this component instance
|
|
144
140
|
const memoedLookupEventHandler = (0, react_1.useCallback)((eventName, actionOptions) => {
|
|
@@ -299,7 +295,10 @@ function slotRenderer({ node, extractValue, renderChild, lookupAction, layoutCon
|
|
|
299
295
|
// --- The slot is not named
|
|
300
296
|
if (!slotProps) {
|
|
301
297
|
// --- simply render the children from the parent
|
|
302
|
-
|
|
298
|
+
// --- The parent does not provide a template for the slot.
|
|
299
|
+
if (parentRenderContext.children) {
|
|
300
|
+
return parentRenderContext.renderChild(parentRenderContext.children, layoutContext);
|
|
301
|
+
}
|
|
303
302
|
}
|
|
304
303
|
else {
|
|
305
304
|
// --- The slot has properties; let's render the children with the slot properties
|