xmlui 0.9.61 → 0.9.63

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xmlui",
3
- "version": "0.9.61",
3
+ "version": "0.9.63",
4
4
  "sideEffects": false,
5
5
  "scripts": {
6
6
  "start-test-bed": "cd src/testing/infrastructure && xmlui start",
@@ -1,19 +1,41 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.formSectionRenderer = exports.FormSectionMd = void 0;
7
4
  const compound_utils_1 = require("../../components-core/utils/compound-utils");
8
5
  const metadata_helpers_1 = require("../metadata-helpers");
9
- const FormSection_xmlui_raw_1 = __importDefault(require("./FormSection.xmlui?raw"));
6
+ // --- We cannot use this with nextra
7
+ // import componentSource from "./FormSection.xmlui?raw";
10
8
  const COMP = "FormSection";
11
9
  exports.FormSectionMd = (0, metadata_helpers_1.createMetadata)({
12
10
  status: "experimental",
13
11
  description: "`FormSection` groups elements within a `Form`. Child components are placed in " +
14
12
  "a [FlowLayout](/components/FlowLayout).",
15
13
  });
14
+ const componentSource = `
15
+ <Component name="FormSection">
16
+ <VStack paddingBottom="{$props.paddingBottom ?? '1rem'}" gap="0" width="100%">
17
+ <Heading
18
+ when="{!!$props.heading}"
19
+ marginBottom="$space-tight"
20
+ level="{$props.headingLevel ?? 'h3'}"
21
+ fontWeight="{$props.headingWeight ?? 'bold'}"
22
+ value="{$props.heading}" />
23
+ <Text
24
+ when="{!!$props.info}"
25
+ fontSize="{$props.infoFontSize ?? '0.8rem'}"
26
+ paddingBottom="$space-normal"
27
+ value="{$props.info}" />
28
+ <FlowLayout
29
+ width="100%"
30
+ paddingTop="{$props.paddingTop ?? '$space-normal'}"
31
+ columnGap="{$props.columnGap ?? '3rem'}"
32
+ rowGap="{$props.rowGap ?? '$space-normal'}" >
33
+ <Slot />
34
+ </FlowLayout>
35
+ </VStack>
36
+ </Component>
37
+ `;
16
38
  exports.formSectionRenderer = {
17
- compoundComponentDef: (0, compound_utils_1.compoundComponentDefFromSource)(COMP, FormSection_xmlui_raw_1.default),
39
+ compoundComponentDef: (0, compound_utils_1.compoundComponentDefFromSource)(COMP, componentSource),
18
40
  metadata: exports.FormSectionMd,
19
41
  };
@@ -371,7 +371,9 @@ exports.ListNative = (0, react_1.forwardRef)(function DynamicHeightList({ items
371
371
  scrollToId,
372
372
  });
373
373
  }, [registerComponentApi, scrollToBottom, scrollToId, scrollToIndex, scrollToTop]);
374
- const rowTypeContextValue = (0, react_1.useCallback)((index) => rows[index]._row_type, [rows]);
374
+ // REVIEW: I changed this code line because in the build version rows[index] was undefined
375
+ // const rowTypeContextValue = useCallback((index: number) => rows[index]._row_type, [rows]);
376
+ const rowTypeContextValue = (0, react_1.useCallback)((index) => { var _a; return (_a = rows === null || rows === void 0 ? void 0 : rows[index]) === null || _a === void 0 ? void 0 : _a._row_type; }, [rows]);
375
377
  const rowCount = (_a = rows === null || rows === void 0 ? void 0 : rows.length) !== null && _a !== void 0 ? _a : 0;
376
378
  const startMargin = (0, hooks_1.useStartMargin)(hasOutsideScroll, parentRef, scrollRef);
377
379
  return ((0, jsx_runtime_1.jsx)(ListItemTypeContext.Provider, { value: rowTypeContextValue, children: (0, jsx_runtime_1.jsx)(exports.ListContext.Provider, { value: expandContextValue, children: (0, jsx_runtime_1.jsxs)("div", { ref: rootRef, style: style, className: (0, classnames_1.default)(List_module_scss_1.default.outerWrapper, {
@@ -383,8 +385,16 @@ exports.ListNative = (0, react_1.forwardRef)(function DynamicHeightList({ items
383
385
  [List_module_scss_1.default.borderCollapse]: borderCollapse,
384
386
  [List_module_scss_1.default.sectioned]: groupBy !== undefined,
385
387
  }), "data-list-container": true, children: (0, jsx_runtime_1.jsx)(virtua_1.Virtualizer, { ref: virtualizerRef, scrollRef: scrollElementRef, shift: shift, onScroll: onScroll, startMargin: startMargin, item: Item, count: rowCount, children: (rowIndex) => {
386
- const row = rows[rowIndex];
387
- const key = row[idKey];
388
+ // REVIEW: I changed this code line because in the build version rows[rowIndex]
389
+ // was undefined
390
+ // const row = rows[rowIndex];
391
+ // const key = row[idKey];
392
+ const row = rows === null || rows === void 0 ? void 0 : rows[rowIndex];
393
+ const key = row === null || row === void 0 ? void 0 : row[idKey];
394
+ if (!row) {
395
+ return (0, jsx_runtime_1.jsx)("div", {}, rowIndex);
396
+ }
397
+ // --- End change
388
398
  switch (row._row_type) {
389
399
  case RowType.SECTION:
390
400
  return ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: (sectionRenderer === null || sectionRenderer === void 0 ? void 0 : sectionRenderer(row, key)) || (0, jsx_runtime_1.jsx)("div", {}) }, key));
@@ -71,7 +71,7 @@ function AppWithCodeViewNative({ markdown, splitView, initiallyShowCode = false,
71
71
  }, children: (0, jsx_runtime_1.jsx)(rx_1.RxOpenInNewWindow, {}) }), label: "View and edit in new full-width window" })), (0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { trigger: (0, jsx_runtime_1.jsx)("button", { className: NestedApp_module_scss_1.default.headerButton, onClick: () => {
72
72
  setShowCode(false);
73
73
  setRefreshVersion(refreshVersion + 1);
74
- }, children: (0, jsx_runtime_1.jsx)(lia_1.LiaUndoAltSolid, {}) }), label: "Reset the app" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: NestedApp_module_scss_1.default.contentContainer, children: [showCode && (0, jsx_runtime_1.jsx)(Markdown_1.Markdown, { style: { height: "100%" }, children: markdown }), !showCode && ((0, jsx_runtime_1.jsx)(NestedAppNative_1.IndexAwareNestedApp, { refVersion: refreshVersion, app: app, api: api, components: components, config: config, activeTone: activeTone, activeTheme: activeTheme, title: title, allowPlaygroundPopup: allowPlaygroundPopup, withFrame: false, popOutUrl: popOutUrl }))] })] }));
74
+ }, children: (0, jsx_runtime_1.jsx)(lia_1.LiaUndoAltSolid, {}) }), label: "Reset the app" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: NestedApp_module_scss_1.default.contentContainer, children: [showCode && (0, jsx_runtime_1.jsx)(Markdown_1.Markdown, { style: { height: "100%" }, children: markdown }), !showCode && ((0, jsx_runtime_1.jsx)(NestedAppNative_1.IndexAwareNestedApp, { height: "100%", refVersion: refreshVersion, app: app, api: api, components: components, config: config, activeTone: activeTone, activeTheme: activeTheme, title: title, allowPlaygroundPopup: allowPlaygroundPopup, withFrame: false, popOutUrl: popOutUrl }))] })] }));
75
75
  }
76
76
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(Markdown_1.Markdown, { children: markdown }) }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(NestedAppNative_1.IndexAwareNestedApp, { app: app, api: api, components: components, config: config, activeTone: activeTone, activeTheme: activeTheme, title: title, height: height, allowPlaygroundPopup: allowPlaygroundPopup, withFrame: true, popOutUrl: popOutUrl }) })] }));
77
77
  }
@@ -1159,7 +1159,7 @@ declare const Stack: ForwardRefExoticComponent<Props_2 & RefAttributes<any>>;
1159
1159
  * representation); ApiInterceptor can emulate some backend functionality
1160
1160
  * running in the browser.
1161
1161
  */
1162
- declare function StandaloneApp({ appDef, decorateComponentsWithTestId, debugEnabled, waitForApiInterceptor, runtime, extensionManager, }: StandaloneAppProps): JSX_2.Element;
1162
+ declare function StandaloneApp({ appDef, decorateComponentsWithTestId, debugEnabled, runtime, extensionManager, }: StandaloneAppProps): JSX_2.Element;
1163
1163
 
1164
1164
  declare type StandaloneAppDescription = {
1165
1165
  name?: string;
@@ -1182,7 +1182,6 @@ declare type StandaloneAppProps = {
1182
1182
  debugEnabled?: boolean;
1183
1183
  runtime?: any;
1184
1184
  extensionManager?: StandaloneExtensionManager;
1185
- waitForApiInterceptor?: boolean;
1186
1185
  };
1187
1186
 
1188
1187
  declare const standaloneExports: {