@signalsafe/content-editor-react 0.0.0-stage → 0.1.1

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.
Files changed (196) hide show
  1. package/README.md +105 -2
  2. package/dist/BootstrapBlockRenderer.d.ts +10 -0
  3. package/dist/BootstrapBlockRenderer.js +256 -0
  4. package/dist/BootstrapInlineCanvasEditor.d.ts +11 -0
  5. package/dist/BootstrapInlineCanvasEditor.js +38 -0
  6. package/dist/BootstrapInlineText.d.ts +9 -0
  7. package/dist/BootstrapInlineText.js +121 -0
  8. package/dist/BootstrapNavigationBlocks.d.ts +13 -0
  9. package/dist/BootstrapNavigationBlocks.js +33 -0
  10. package/dist/BootstrapProgressGroup.d.ts +11 -0
  11. package/dist/BootstrapProgressGroup.js +13 -0
  12. package/dist/BootstrapProperties.d.ts +15 -0
  13. package/dist/BootstrapProperties.js +217 -0
  14. package/dist/CanvasTheme.d.ts +25 -0
  15. package/dist/CanvasTheme.js +34 -0
  16. package/dist/CollectionRowActions.d.ts +19 -0
  17. package/dist/CollectionRowActions.js +9 -0
  18. package/dist/ColorModeSelect.d.ts +9 -0
  19. package/dist/ColorModeSelect.js +28 -0
  20. package/dist/ColumnContent.d.ts +6 -0
  21. package/dist/ColumnContent.js +6 -0
  22. package/dist/ComponentPicker.d.ts +10 -0
  23. package/dist/ComponentPicker.js +22 -0
  24. package/dist/ComponentPickerIcon.d.ts +3 -0
  25. package/dist/ComponentPickerIcon.js +52 -0
  26. package/dist/ContentEditor.d.ts +16 -0
  27. package/dist/ContentEditor.js +73 -0
  28. package/dist/ContentImage.d.ts +16 -0
  29. package/dist/ContentImage.js +45 -0
  30. package/dist/ContentInteractionProvider.d.ts +21 -0
  31. package/dist/ContentInteractionProvider.js +102 -0
  32. package/dist/ContentKeyboardHelp.d.ts +4 -0
  33. package/dist/ContentKeyboardHelp.js +8 -0
  34. package/dist/ContentOutline.d.ts +20 -0
  35. package/dist/ContentOutline.js +71 -0
  36. package/dist/ContentRuntime.d.ts +28 -0
  37. package/dist/ContentRuntime.js +13 -0
  38. package/dist/EditorActionIcon.d.ts +18 -0
  39. package/dist/EditorActionIcon.js +32 -0
  40. package/dist/EditorCanvasScroll.d.ts +6 -0
  41. package/dist/EditorCanvasScroll.js +82 -0
  42. package/dist/EditorCanvasSettings.d.ts +5 -0
  43. package/dist/EditorCanvasSettings.js +21 -0
  44. package/dist/EditorCanvasToolbar.d.ts +16 -0
  45. package/dist/EditorCanvasToolbar.js +22 -0
  46. package/dist/EditorCollectionAdd.d.ts +6 -0
  47. package/dist/EditorCollectionAdd.js +6 -0
  48. package/dist/EditorCollectionRow.d.ts +18 -0
  49. package/dist/EditorCollectionRow.js +6 -0
  50. package/dist/EditorCommandBar.d.ts +7 -0
  51. package/dist/EditorCommandBar.js +9 -0
  52. package/dist/EditorContainerFields.d.ts +17 -0
  53. package/dist/EditorContainerFields.js +27 -0
  54. package/dist/EditorHistoryControls.d.ts +8 -0
  55. package/dist/EditorHistoryControls.js +6 -0
  56. package/dist/EditorIssuesPanel.d.ts +5 -0
  57. package/dist/EditorIssuesPanel.js +6 -0
  58. package/dist/EditorLayoutMenu.d.ts +23 -0
  59. package/dist/EditorLayoutMenu.js +13 -0
  60. package/dist/EditorMenuChoice.d.ts +8 -0
  61. package/dist/EditorMenuChoice.js +6 -0
  62. package/dist/EditorPanel.d.ts +10 -0
  63. package/dist/EditorPanel.js +12 -0
  64. package/dist/EditorPreviewToggle.d.ts +6 -0
  65. package/dist/EditorPreviewToggle.js +6 -0
  66. package/dist/EditorSidebarLayout.d.ts +8 -0
  67. package/dist/EditorSidebarLayout.js +29 -0
  68. package/dist/EditorStatusBar.d.ts +5 -0
  69. package/dist/EditorStatusBar.js +8 -0
  70. package/dist/EditorStatusBarContext.d.ts +2 -0
  71. package/dist/EditorStatusBarContext.js +3 -0
  72. package/dist/EditorSubmenu.d.ts +18 -0
  73. package/dist/EditorSubmenu.js +74 -0
  74. package/dist/EditorTabs.d.ts +9 -0
  75. package/dist/EditorTabs.js +28 -0
  76. package/dist/EditorTemplateMenu.d.ts +12 -0
  77. package/dist/EditorTemplateMenu.js +7 -0
  78. package/dist/EditorViewportSelect.d.ts +30 -0
  79. package/dist/EditorViewportSelect.js +17 -0
  80. package/dist/EditorWorkflowActions.d.ts +12 -0
  81. package/dist/EditorWorkflowActions.js +6 -0
  82. package/dist/EmptyContent.d.ts +6 -0
  83. package/dist/EmptyContent.js +18 -0
  84. package/dist/InlineCanvasEditor.d.ts +7 -0
  85. package/dist/InlineCanvasEditor.js +12 -0
  86. package/dist/InteractiveBootstrapBlocks.d.ts +17 -0
  87. package/dist/InteractiveBootstrapBlocks.js +434 -0
  88. package/dist/JsonEditor.css +163 -0
  89. package/dist/JsonTextEditor.d.ts +11 -0
  90. package/dist/JsonTextEditor.js +70 -0
  91. package/dist/JsonViewer.d.ts +15 -0
  92. package/dist/JsonViewer.js +109 -0
  93. package/dist/LayoutPresets.d.ts +8 -0
  94. package/dist/LayoutPresets.js +66 -0
  95. package/dist/LayoutPropertyFields.d.ts +8 -0
  96. package/dist/LayoutPropertyFields.js +43 -0
  97. package/dist/MarkdownEditor.d.ts +13 -0
  98. package/dist/MarkdownEditor.js +82 -0
  99. package/dist/PracticeInputBlock.d.ts +12 -0
  100. package/dist/PracticeInputBlock.js +21 -0
  101. package/dist/ReadableButton.d.ts +5 -0
  102. package/dist/ReadableButton.js +20 -0
  103. package/dist/ReadableDropdownSurface.d.ts +6 -0
  104. package/dist/ReadableDropdownSurface.js +16 -0
  105. package/dist/ReadableDropdownToggle.d.ts +2 -0
  106. package/dist/ReadableDropdownToggle.js +14 -0
  107. package/dist/ReadableFormSelect.d.ts +3 -0
  108. package/dist/ReadableFormSelect.js +10 -0
  109. package/dist/ReorderHandle.d.ts +15 -0
  110. package/dist/ReorderHandle.js +31 -0
  111. package/dist/ReorderTarget.d.ts +10 -0
  112. package/dist/ReorderTarget.js +7 -0
  113. package/dist/SpacingEditor.d.ts +9 -0
  114. package/dist/SpacingEditor.js +53 -0
  115. package/dist/authoringActions.d.ts +18 -0
  116. package/dist/authoringActions.js +172 -0
  117. package/dist/authoringText.d.ts +4 -0
  118. package/dist/authoringText.js +45 -0
  119. package/dist/authoringUuid.d.ts +2 -0
  120. package/dist/authoringUuid.js +11 -0
  121. package/dist/bootstrapFamilies.d.ts +10 -0
  122. package/dist/bootstrapFamilies.js +151 -0
  123. package/dist/bootstrapGridImport.d.ts +8 -0
  124. package/dist/bootstrapGridImport.js +122 -0
  125. package/dist/bootstrapGridMigration.d.ts +3 -0
  126. package/dist/bootstrapGridMigration.js +27 -0
  127. package/dist/bootstrapRegistry.d.ts +69 -0
  128. package/dist/bootstrapRegistry.js +966 -0
  129. package/dist/canvasPreferences.d.ts +27 -0
  130. package/dist/canvasPreferences.js +28 -0
  131. package/dist/collectionNavigation.d.ts +20 -0
  132. package/dist/collectionNavigation.js +38 -0
  133. package/dist/componentPickerFamilies.d.ts +5 -0
  134. package/dist/componentPickerFamilies.js +40 -0
  135. package/dist/componentPolicy.d.ts +31 -0
  136. package/dist/componentPolicy.js +25 -0
  137. package/dist/componentValidation.d.ts +23707 -0
  138. package/dist/componentValidation.js +7 -0
  139. package/dist/content-editor.css +584 -0
  140. package/dist/content-layout.css +597 -0
  141. package/dist/contentContainment.d.ts +4 -0
  142. package/dist/contentContainment.js +117 -0
  143. package/dist/contentCssPath.d.ts +5 -0
  144. package/dist/contentCssPath.js +63 -0
  145. package/dist/contentEditingCommands.d.ts +35 -0
  146. package/dist/contentEditingCommands.js +69 -0
  147. package/dist/contentInsertion.d.ts +3 -0
  148. package/dist/contentInsertion.js +16 -0
  149. package/dist/contentModel.d.ts +3 -0
  150. package/dist/contentModel.js +1 -0
  151. package/dist/contentTreeValidation.d.ts +8 -0
  152. package/dist/contentTreeValidation.js +211 -0
  153. package/dist/contracts/semantics.gen.d.ts +2 -0
  154. package/dist/contracts/semantics.gen.js +3 -0
  155. package/dist/contracts/types.gen.d.ts +3741 -0
  156. package/dist/contracts/types.gen.js +1 -0
  157. package/dist/contracts/zod.gen.d.ts +62365 -0
  158. package/dist/contracts/zod.gen.js +3036 -0
  159. package/dist/controlBackgroundIconContrast.d.ts +3 -0
  160. package/dist/controlBackgroundIconContrast.js +60 -0
  161. package/dist/dropdownContrast.d.ts +5 -0
  162. package/dist/dropdownContrast.js +34 -0
  163. package/dist/editor-ui-colors.css +40 -0
  164. package/dist/editorThemes.d.ts +10 -0
  165. package/dist/editorThemes.js +12 -0
  166. package/dist/inlineMarkup.d.ts +6 -0
  167. package/dist/inlineMarkup.js +171 -0
  168. package/dist/layout.d.ts +17 -0
  169. package/dist/layout.js +37 -0
  170. package/dist/nestedComponentLabel.d.ts +2 -0
  171. package/dist/nestedComponentLabel.js +17 -0
  172. package/dist/responsiveLayout.d.ts +51 -0
  173. package/dist/responsiveLayout.js +97 -0
  174. package/dist/slideAppearance.d.ts +25 -0
  175. package/dist/slideAppearance.js +283 -0
  176. package/dist/source-manifest.json +105 -0
  177. package/dist/spacingShorthand.d.ts +12 -0
  178. package/dist/spacingShorthand.js +47 -0
  179. package/dist/themes/canvas-themes.css +131 -0
  180. package/dist/useCanvasSelectionScroll.d.ts +3 -0
  181. package/dist/useCanvasSelectionScroll.js +51 -0
  182. package/dist/useContentHistory.d.ts +40 -0
  183. package/dist/useContentHistory.js +42 -0
  184. package/dist/useContentReorderTarget.d.ts +6 -0
  185. package/dist/useContentReorderTarget.js +44 -0
  186. package/dist/useContentSelection.d.ts +10 -0
  187. package/dist/useContentSelection.js +23 -0
  188. package/dist/useDropdownContrast.d.ts +16 -0
  189. package/dist/useDropdownContrast.js +145 -0
  190. package/dist/useEditorControlContrast.d.ts +3 -0
  191. package/dist/useEditorControlContrast.js +188 -0
  192. package/dist/useSiteThemeStyles.d.ts +3 -0
  193. package/dist/useSiteThemeStyles.js +30 -0
  194. package/dist/useValidationFocus.d.ts +5 -0
  195. package/dist/useValidationFocus.js +17 -0
  196. package/package.json +74 -5
@@ -0,0 +1,70 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useRef, useState } from 'react';
3
+ import './JsonEditor.css';
4
+ /** The existing JSONEditor library, with raw text preserved for incomplete drafts and array roots. */
5
+ export default function JsonTextEditor({ value, onChange, disabled = false, ariaLabel = 'JSON editor', describedBy, invalid = false, }) {
6
+ const container = useRef(null);
7
+ const editor = useRef(null);
8
+ const latest = useRef({ value, onChange });
9
+ const [fallback, setFallback] = useState(false);
10
+ useEffect(() => {
11
+ latest.current = { value, onChange };
12
+ }, [value, onChange]);
13
+ useEffect(() => {
14
+ const host = container.current;
15
+ const runtime = globalThis;
16
+ if (!host || !runtime.JSONEditor) {
17
+ setFallback(true);
18
+ return;
19
+ }
20
+ const labelInputs = () => host
21
+ .querySelectorAll('textarea')
22
+ .forEach((input) => input.setAttribute('aria-label', ariaLabel));
23
+ let instance;
24
+ let observer;
25
+ let destroyed = false;
26
+ try {
27
+ instance = new runtime.JSONEditor(host, {
28
+ mode: disabled ? 'view' : 'code',
29
+ modes: disabled ? undefined : ['code', 'tree', 'text'],
30
+ search: true,
31
+ history: !disabled,
32
+ onEditable: disabled ? () => false : undefined,
33
+ onModeChange: labelInputs,
34
+ onChange: () => {
35
+ if (!disabled && editor.current)
36
+ latest.current.onChange(editor.current.getText());
37
+ },
38
+ });
39
+ instance.setText(latest.current.value);
40
+ editor.current = instance;
41
+ labelInputs();
42
+ setFallback(false);
43
+ if (typeof ResizeObserver === 'function') {
44
+ observer = new ResizeObserver(() => {
45
+ if (!destroyed)
46
+ instance?.resize?.();
47
+ });
48
+ observer.observe(host);
49
+ }
50
+ }
51
+ catch {
52
+ instance?.destroy();
53
+ instance = undefined;
54
+ editor.current = null;
55
+ host.replaceChildren();
56
+ setFallback(true);
57
+ }
58
+ return () => {
59
+ destroyed = true;
60
+ observer?.disconnect();
61
+ instance?.destroy();
62
+ editor.current = null;
63
+ };
64
+ }, [disabled, ariaLabel]);
65
+ useEffect(() => {
66
+ if (editor.current && editor.current.getText() !== value)
67
+ editor.current.setText(value);
68
+ }, [value]);
69
+ return (_jsxs("div", { className: "json-text-editor", children: [_jsx("div", { ref: container, hidden: fallback, role: "application", "aria-label": fallback ? undefined : ariaLabel, "aria-invalid": invalid, "aria-describedby": describedBy, style: { height: '36rem', maxWidth: '100%', minWidth: 0 } }), fallback && (_jsx("textarea", { className: "form-control font-monospace", "aria-label": ariaLabel, "aria-invalid": invalid, "aria-describedby": describedBy, rows: 24, maxLength: 4000000, value: value, onChange: (event) => onChange(event.target.value), disabled: disabled }))] }));
70
+ }
@@ -0,0 +1,15 @@
1
+ import './JsonEditor.css';
2
+ export interface JsonEditorProps {
3
+ /** Current JSON value (object). */
4
+ value: Record<string, unknown>;
5
+ className?: string;
6
+ }
7
+ export interface JsonEditorHandle {
8
+ expandAll: () => void;
9
+ collapseAll: () => void;
10
+ }
11
+ /**
12
+ * Graph JSON uses view mode with package-owned styling and a read-only fallback.
13
+ */
14
+ declare const JsonEditor: import("react").ForwardRefExoticComponent<JsonEditorProps & import("react").RefAttributes<JsonEditorHandle>>;
15
+ export default JsonEditor;
@@ -0,0 +1,109 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /**
3
+ * Reusable read-only JSON display using the host-supplied JSONEditor runtime.
4
+ * Falls back to a disabled textarea when the library is not available.
5
+ */
6
+ import { forwardRef, useEffect, useImperativeHandle, useId, useRef, useState } from 'react';
7
+ import { Form } from 'react-bootstrap';
8
+ import './JsonEditor.css';
9
+ function getJsonEditorConstructor() {
10
+ const w = globalThis;
11
+ return typeof w.JSONEditor === 'function' ? w.JSONEditor : null;
12
+ }
13
+ function buildJsonEditorOptions(reportError) {
14
+ return {
15
+ mode: 'view',
16
+ search: true,
17
+ mainMenuBar: false,
18
+ navigationBar: true,
19
+ history: false,
20
+ onEditable: () => false,
21
+ onError: () => {
22
+ reportError('The JSON display could not render this value.');
23
+ },
24
+ };
25
+ }
26
+ function attachResizeObserver(container, editor) {
27
+ if (typeof ResizeObserver !== 'function')
28
+ return undefined;
29
+ const resizeObserver = new ResizeObserver(() => {
30
+ editor.resize?.();
31
+ });
32
+ resizeObserver.observe(container);
33
+ requestAnimationFrame(() => {
34
+ editor.resize?.();
35
+ });
36
+ return resizeObserver;
37
+ }
38
+ function destroyJsonEditor(editor) {
39
+ try {
40
+ editor.destroy();
41
+ }
42
+ catch {
43
+ // A third-party cleanup failure must not prevent the owner from unmounting.
44
+ }
45
+ }
46
+ /**
47
+ * Graph JSON uses view mode with package-owned styling and a read-only fallback.
48
+ */
49
+ const JsonEditor = forwardRef(function JsonEditor({ value, className }, ref) {
50
+ const errorId = useId();
51
+ const [editorError, setEditorError] = useState('');
52
+ const containerRef = useRef(null);
53
+ const editorRef = useRef(null);
54
+ const initialValue = useRef(value);
55
+ useImperativeHandle(ref, () => ({
56
+ expandAll: () => editorRef.current?.expandAll?.(),
57
+ collapseAll: () => editorRef.current?.collapseAll?.(),
58
+ }), []);
59
+ const [useFallback, setUseFallback] = useState(false);
60
+ useEffect(() => {
61
+ const container = containerRef.current;
62
+ if (!container)
63
+ return undefined;
64
+ const JSONEditorClass = getJsonEditorConstructor();
65
+ if (!JSONEditorClass) {
66
+ setUseFallback(true);
67
+ return undefined;
68
+ }
69
+ setUseFallback(false);
70
+ try {
71
+ const editor = new JSONEditorClass(container, buildJsonEditorOptions(setEditorError), initialValue.current);
72
+ editorRef.current = editor;
73
+ const resizeObserver = attachResizeObserver(container, editor);
74
+ return () => {
75
+ resizeObserver?.disconnect();
76
+ destroyJsonEditor(editor);
77
+ editorRef.current = null;
78
+ };
79
+ }
80
+ catch {
81
+ setUseFallback(true);
82
+ return undefined;
83
+ }
84
+ }, []);
85
+ // Sync value from parent into editor (e.g. after load)
86
+ useEffect(() => {
87
+ if (editorRef.current && !useFallback) {
88
+ try {
89
+ if (typeof editorRef.current.update === 'function') {
90
+ editorRef.current.update(value);
91
+ }
92
+ else {
93
+ editorRef.current.set(value);
94
+ }
95
+ }
96
+ catch {
97
+ editorRef.current.set(value);
98
+ }
99
+ }
100
+ if (useFallback) {
101
+ setEditorError('');
102
+ }
103
+ }, [value, useFallback]);
104
+ if (useFallback) {
105
+ return (_jsxs(Form.Group, { className: `h-100 d-flex flex-column min-h-0 json-editor-embedded-in-panel ${className ?? ''}`, children: [_jsx(Form.Control, { as: "textarea", "aria-label": "JSON editor", "aria-invalid": editorError ? true : undefined, "aria-describedby": editorError ? errorId : undefined, rows: 4, className: "font-monospace small flex-grow-1 min-h-0 border-top-0 rounded-top-0", style: { minHeight: 0, height: '100%', resize: 'none' }, value: JSON.stringify(value, null, 2), disabled: true }), editorError && (_jsx("p", { id: errorId, role: "alert", className: "text-danger mb-0", children: editorError }))] }));
106
+ }
107
+ return (_jsxs(_Fragment, { children: [_jsx("div", { ref: containerRef, className: `h-100 min-h-0 json-editor-embedded-in-panel ${className ?? ''}`, style: { height: '100%', minHeight: 0, minWidth: 0 }, role: "application", "aria-label": "JSON editor", "aria-describedby": editorError ? errorId : undefined }), editorError && (_jsx("p", { id: errorId, role: "alert", className: "text-danger mb-0", children: editorError }))] }));
108
+ });
109
+ export default JsonEditor;
@@ -0,0 +1,8 @@
1
+ import type { ContentBlock } from "./contentModel.js";
2
+ type Block = ContentBlock;
3
+ export declare function LayoutPresets({ selected, blocks, onChange, }: Readonly<{
4
+ selected: Block;
5
+ blocks: readonly ContentBlock[];
6
+ onChange: (blocks: readonly ContentBlock[], label: string) => void;
7
+ }>): import("react").JSX.Element | null;
8
+ export {};
@@ -0,0 +1,66 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ const COLUMN_LAYOUTS = [
3
+ { label: "Equal columns", widths: [6, 6] },
4
+ { label: "Wide left", widths: [8, 4] },
5
+ { label: "Wide right", widths: [4, 8] },
6
+ { label: "Three equal columns", widths: [4, 4, 4] },
7
+ ];
8
+ export function LayoutPresets({ selected, blocks, onChange, }) {
9
+ if (selected.type === "Column") {
10
+ let mobileLayout = "custom";
11
+ if (selected.props.mobileWidth === 12)
12
+ mobileLayout = "stack";
13
+ else if (selected.props.mobileWidth === selected.props.width)
14
+ mobileLayout = "keep";
15
+ return (_jsxs("label", { children: ["Mobile layout", " ", _jsxs("select", { className: "form-select", value: mobileLayout, onChange: (event) => {
16
+ if (event.target.value === "custom")
17
+ return;
18
+ onChange(blocks.map((block) => block === selected
19
+ ? {
20
+ ...selected,
21
+ props: {
22
+ ...selected.props,
23
+ mobileWidth: event.target.value === "stack"
24
+ ? 12
25
+ : selected.props.width,
26
+ },
27
+ }
28
+ : block), "Mobile layout changed");
29
+ }, children: [_jsx("option", { value: "stack", children: "Stack full width" }), _jsx("option", { value: "keep", children: "Use desktop width" }), _jsx("option", { value: "custom", disabled: true, children: "Custom width below" })] })] }));
30
+ }
31
+ if (selected.type !== "Row")
32
+ return null;
33
+ const columns = blocks
34
+ .filter((block) => block.type === "Column")
35
+ .filter((block) => block.props.parentId === selected.props.id);
36
+ const preset = COLUMN_LAYOUTS.findIndex((layout) => layout.widths.length === columns.length &&
37
+ columns.every((column, index) => column.props.width === layout.widths[index]));
38
+ return (_jsxs(_Fragment, { children: [_jsxs("label", { children: ["Column layout", " ", _jsxs("select", { className: "form-select", value: preset < 0 ? "" : String(preset), disabled: columns.length < 2, onChange: (event) => {
39
+ const layout = COLUMN_LAYOUTS[Number(event.target.value)];
40
+ if (layout?.widths.length !== columns.length)
41
+ return;
42
+ onChange(blocks.map((block) => {
43
+ if (block.type !== "Column")
44
+ return block;
45
+ const index = columns.indexOf(block);
46
+ const width = layout.widths[index];
47
+ return width !== undefined
48
+ ? {
49
+ ...block,
50
+ props: { ...block.props, width },
51
+ }
52
+ : block;
53
+ }), "Column layout changed");
54
+ }, children: [_jsx("option", { value: "", disabled: true, children: "Custom widths" }), COLUMN_LAYOUTS.map((layout, index) => (_jsx("option", { value: index, disabled: layout.widths.length !== columns.length, children: layout.label }, layout.label)))] })] }), _jsx("button", { type: "button", className: "btn btn-outline-primary", disabled: !columns.length, onClick: () => onChange(blocks.map((block) => block.type === "Column" &&
55
+ block.props.parentId === selected.props.id
56
+ ? {
57
+ ...block,
58
+ props: {
59
+ ...block.props,
60
+ mobileWidth: 12,
61
+ },
62
+ }
63
+ : block), "Columns stacked on mobile"), children: "Stack columns on mobile" }), _jsx("small", { className: "text-muted", children: columns.length
64
+ ? `${columns.length} columns · ${columns.reduce((total, column) => total + column.props.width, 0)} of 12 desktop units. Columns exceeding 12 wrap to the next line.`
65
+ : "Add columns to this row to arrange content side by side." })] }));
66
+ }
@@ -0,0 +1,8 @@
1
+ import { type BootstrapPropertyValue } from './bootstrapRegistry.js';
2
+ import type { ContentBlock } from './contentModel.js';
3
+ export declare function LayoutPropertyFields({ block, onChange }: Readonly<{
4
+ block: Extract<ContentBlock, {
5
+ type: 'Row' | 'Column';
6
+ }>;
7
+ onChange: (name: string, value: BootstrapPropertyValue) => void;
8
+ }>): import("react").JSX.Element[];
@@ -0,0 +1,43 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useId } from 'react';
3
+ import { Form } from 'react-bootstrap';
4
+ import { bootstrapPropertyValue } from './bootstrapRegistry.js';
5
+ import { responsiveColumnProperties, responsiveRowProperties } from './responsiveLayout.js';
6
+ const numeric = (name, label, min, max) => ({ name, label, kind: 'number', min, max, step: 1 });
7
+ const ROW_FIELDS = [
8
+ numeric('gap', 'Spacing', 0, 5), numeric('horizontalGap', 'Horizontal gap', 0, 5), numeric('verticalGap', 'Vertical gap', 0, 5),
9
+ { name: 'alignment', label: 'Vertical alignment', kind: 'select', options: ['start', 'center', 'end', 'stretch'].map(value => ({ label: value, value })) },
10
+ { name: "justify", label: "Horizontal distribution", kind: "select", options: ["start", "center", "end", "between", "around", "evenly"].map(value => ({ label: value, value })) },
11
+ ...responsiveRowProperties,
12
+ ];
13
+ const COLUMN_FIELDS = [
14
+ numeric('mobileWidth', 'Mobile width (out of 12)', 1, 12),
15
+ numeric('smallWidth', 'Small width (out of 12)', 1, 12),
16
+ numeric('width', 'Desktop width (out of 12)', 1, 12),
17
+ numeric('mediumWidth', 'Medium width (out of 12)', 1, 12),
18
+ numeric('largeWidth', 'Large width (out of 12)', 1, 12),
19
+ numeric('extraLargeWidth', 'Extra large width (out of 12)', 1, 12),
20
+ numeric('offset', 'Column offset', 0, 11), numeric('order', 'Column order', -1, 12),
21
+ ...responsiveColumnProperties,
22
+ ];
23
+ export function LayoutPropertyFields({ block, onChange }) {
24
+ const id = useId();
25
+ return (block.type === 'Row' ? ROW_FIELDS : COLUMN_FIELDS).map(field => {
26
+ const value = bootstrapPropertyValue(block, field.name);
27
+ const controlId = `${id}-${field.name}`;
28
+ if (field.kind === 'boolean')
29
+ return _jsx(Form.Check, { id: controlId, className: "mb-2", label: field.label, checked: value === true, onChange: event => onChange(field.name, event.currentTarget.checked) }, field.name);
30
+ return _jsxs(Form.Group, { controlId: controlId, className: "mb-2", children: [_jsx(Form.Label, { children: field.label }), field.kind === 'select' ? _jsxs(Form.Select, { value: value === null ? '' : String(value), onChange: event => onChange(field.name, event.currentTarget.value || null), children: [_jsx("option", { value: "", children: "Default" }), field.options?.map(option => _jsx("option", { value: option.value, children: option.label }, option.value))] }) : _jsx(Form.Control, { type: "number", value: typeof value === 'number' ? value : '', min: field.min, max: field.max, step: field.step, onChange: event => {
31
+ const text = event.currentTarget.value;
32
+ if (!text.trim()) {
33
+ onChange(field.name, null);
34
+ return;
35
+ }
36
+ const number = Number(text);
37
+ // The closed row/column inventories create every numeric field with both bounds.
38
+ const bounds = field;
39
+ if (Number.isInteger(number) && number >= bounds.min && number <= bounds.max)
40
+ onChange(field.name, number);
41
+ } })] }, field.name);
42
+ });
43
+ }
@@ -0,0 +1,13 @@
1
+ import { type ReactNode } from 'react';
2
+ import '@mdxeditor/editor/style.css';
3
+ import './content-editor.css';
4
+ export declare function MarkdownEditor({ label, markdown, disabled, focusOnMount, hideLabel, toolbarEnd, onChange, onHtmlChange, }: Readonly<{
5
+ label: string;
6
+ markdown: string;
7
+ disabled?: boolean;
8
+ focusOnMount?: boolean;
9
+ hideLabel?: boolean;
10
+ toolbarEnd?: ReactNode;
11
+ onChange: (markdown: string) => void;
12
+ onHtmlChange?: (html: string) => void;
13
+ }>): import("react").JSX.Element;
@@ -0,0 +1,82 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEditorControlContrast } from './useEditorControlContrast.js';
3
+ import { useCanvasTheme } from './CanvasTheme.js';
4
+ import { useEffect, useId, useRef, useCallback } from 'react';
5
+ import { MDXEditor, lexicalTheme, BlockTypeSelect, BoldItalicUnderlineToggles, CodeToggle, ListsToggle, UndoRedo, CreateLink, headingsPlugin, listsPlugin, quotePlugin, linkPlugin, linkDialogPlugin, tablePlugin, thematicBreakPlugin, codeBlockPlugin, codeMirrorPlugin, markdownShortcutPlugin, toolbarPlugin, } from '@mdxeditor/editor';
6
+ import '@mdxeditor/editor/style.css';
7
+ import './content-editor.css';
8
+ /** Preserve Lexical theme formats as portable HTML before the display sanitizer strips editor classes. */
9
+ function semanticEditorHtml(html) {
10
+ const document = new DOMParser().parseFromString(html, 'text/html');
11
+ const hasFormat = (node, classes) => Boolean(classes && classes.split(/\s+/).every(name => node.classList.contains(name)));
12
+ for (const span of document.querySelectorAll('span')) {
13
+ const combined = hasFormat(span, lexicalTheme.text?.underlineStrikethrough);
14
+ const tags = [
15
+ ...(combined || hasFormat(span, lexicalTheme.text?.underline) ? ['u'] : []),
16
+ ...(combined || hasFormat(span, lexicalTheme.text?.strikethrough) ? ['s'] : []),
17
+ ];
18
+ for (const tag of tags) {
19
+ const semantic = document.createElement(tag);
20
+ semantic.append(...span.childNodes);
21
+ span.append(semantic);
22
+ }
23
+ }
24
+ return document.body.innerHTML;
25
+ }
26
+ function MarkdownToolbar({ toolbarEnd }) {
27
+ return _jsxs(_Fragment, { children: [_jsx(UndoRedo, {}), _jsx(BlockTypeSelect, {}), _jsx(BoldItalicUnderlineToggles, {}), _jsx(CodeToggle, {}), _jsx(ListsToggle, {}), _jsx(CreateLink, {}), toolbarEnd] });
28
+ }
29
+ export function MarkdownEditor({ label, markdown, disabled, focusOnMount = false, hideLabel = false, toolbarEnd, onChange, onHtmlChange, }) {
30
+ const canvasTheme = useCanvasTheme();
31
+ const toolbarContents = useCallback(() => _jsx(MarkdownToolbar, { toolbarEnd: toolbarEnd }), [toolbarEnd]);
32
+ const labelId = useId();
33
+ const contrast = useRef(null);
34
+ const portalClassName = `editor-text-${labelId.replace(/[^a-z0-9_-]/gi, '')}`;
35
+ useEditorControlContrast(contrast, portalClassName);
36
+ const editor = useRef(null);
37
+ useEffect(() => {
38
+ if (!focusOnMount)
39
+ return;
40
+ // Used only after the author explicitly enters inline editing.
41
+ const frame = requestAnimationFrame(() => editor.current?.focus());
42
+ return () => cancelAnimationFrame(frame);
43
+ }, [focusOnMount]);
44
+ useEffect(() => {
45
+ if (editor.current && editor.current.getMarkdown() !== markdown)
46
+ editor.current.setMarkdown(markdown);
47
+ }, [markdown]);
48
+ return (_jsxs("section", { ref: contrast, className: "content-text-field mb-3", "aria-labelledby": labelId, children: [_jsx("span", { id: labelId, className: hideLabel ? 'visually-hidden' : 'form-label d-block', children: label }), _jsx(MDXEditor, { ref: editor, markdown: markdown, readOnly: disabled, suppressHtmlProcessing: !onHtmlChange, className: `content-text-editor ${portalClassName}${canvasTheme ? ` canvas-palette-${canvasTheme.theme} canvas-mode-${canvasTheme.colorMode}` : ''}`, contentEditableClassName: "content-text-content", translation: (key, fallback, values) => key === 'contentArea.editableMarkdown'
49
+ ? label
50
+ : Object.entries(values ?? {}).reduce((text, [name, value]) => typeof value === 'string' || typeof value === 'number'
51
+ ? text.replaceAll(`{{${name}}}`, String(value))
52
+ : text, fallback), onChange: (value, initialNormalization) => {
53
+ if (!disabled && !initialNormalization) {
54
+ onChange(value);
55
+ if (onHtmlChange && editor.current)
56
+ onHtmlChange(semanticEditorHtml(editor.current.getContentEditableHTML()));
57
+ }
58
+ }, plugins: [
59
+ headingsPlugin(),
60
+ listsPlugin(),
61
+ quotePlugin(),
62
+ linkPlugin(),
63
+ linkDialogPlugin(),
64
+ tablePlugin(),
65
+ thematicBreakPlugin(),
66
+ codeBlockPlugin(),
67
+ codeMirrorPlugin({
68
+ codeBlockLanguages: {
69
+ '': 'Plain text',
70
+ js: 'JavaScript',
71
+ ts: 'TypeScript',
72
+ json: 'JSON',
73
+ python: 'Python',
74
+ },
75
+ }),
76
+ markdownShortcutPlugin(),
77
+ toolbarPlugin({
78
+ toolbarClassName: 'content-text-toolbar',
79
+ toolbarContents,
80
+ }),
81
+ ] })] }));
82
+ }
@@ -0,0 +1,12 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ import type { BootstrapBlock } from './bootstrapRegistry.js';
3
+ type InputBlock = Extract<BootstrapBlock, {
4
+ type: 'PracticeInput' | 'FormControl';
5
+ }>;
6
+ export declare function PracticeInputBlock({ block, shared, controlId, revision }: Readonly<{
7
+ block: InputBlock;
8
+ shared: HTMLAttributes<HTMLElement>;
9
+ controlId: string;
10
+ revision?: string | number;
11
+ }>): import("react").JSX.Element;
12
+ export {};
@@ -0,0 +1,21 @@
1
+ import { createElement as _createElement } from "react";
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useContentRuntime } from './ContentRuntime.js';
4
+ import { FloatingLabel, Form } from 'react-bootstrap';
5
+ export function PracticeInputBlock({ block, shared, controlId, revision }) {
6
+ const { authoring } = useContentRuntime();
7
+ const props = block.props;
8
+ const controlOnly = block.type === 'FormControl' || props.controlOnly;
9
+ const control = _jsx(Form.Control, { ...(controlOnly ? shared : {}), id: controlId, ...(props.type === 'textarea' ? { as: 'textarea', rows: props.rows ?? 3 } : { as: 'input', type: props.type }), defaultValue: props.type === 'file' ? undefined : props.defaultValue, placeholder: props.placeholder, required: props.required, disabled: props.disabled, readOnly: props.readOnly ?? false, plaintext: props.plaintext ?? false, size: props.size ?? undefined, isValid: props.validation === 'valid', isInvalid: props.validation === 'invalid', "aria-label": props.label || props.ariaLabel || props.placeholder || 'Input', "aria-describedby": props.helpText || props.feedback ? `${controlId}-description` : undefined });
10
+ if (controlOnly)
11
+ return control;
12
+ const feedback = _jsxs(_Fragment, { children: [props.helpText && _jsx(Form.Text, { id: `${controlId}-description`, muted: true, children: props.helpText }), props.feedback && _jsx("div", { id: `${controlId}-description`, className: `${props.validation === 'valid' ? 'valid' : 'invalid'}-feedback d-block`, children: props.feedback })] });
13
+ if (props.floating)
14
+ return _createElement(FloatingLabel, { ...shared, "data-content-edit-guide": authoring || undefined, key: revision, controlId: controlId, label: props.label },
15
+ control,
16
+ feedback);
17
+ return _createElement(Form.Group, { ...shared, "data-content-edit-guide": authoring || undefined, key: revision, controlId: controlId },
18
+ props.label && _jsx(Form.Label, { children: props.label }),
19
+ control,
20
+ feedback);
21
+ }
@@ -0,0 +1,5 @@
1
+ import { type ButtonHTMLAttributes } from 'react';
2
+ export declare const BUTTON_TEXT_STATES: readonly [readonly ["--bs-btn-color", "--bs-btn-bg"], readonly ["--bs-btn-hover-color", "--bs-btn-hover-bg"], readonly ["--bs-btn-active-color", "--bs-btn-active-bg"], readonly ["--bs-btn-disabled-color", "--bs-btn-disabled-bg"]];
3
+ export declare const BUTTON_OUTLINE_STATES: readonly [readonly ["--bs-btn-color", "--bs-btn-bg"], readonly ["--bs-btn-hover-color", "--bs-btn-hover-bg"], readonly ["--bs-btn-active-color", "--bs-btn-active-bg"], readonly ["--bs-btn-disabled-color", "--bs-btn-disabled-bg"], readonly ["border-color", "--bs-btn-bg", 3]];
4
+ /** Correct only unreadable theme ink and resting outline borders; keep native surfaces and focus. */
5
+ export declare const ReadableButton: import("react").ForwardRefExoticComponent<ButtonHTMLAttributes<HTMLButtonElement> & import("react").RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import { useDropdownContrast, useDropdownElementRef } from './useDropdownContrast.js';
4
+ export const BUTTON_TEXT_STATES = [
5
+ ['--bs-btn-color', '--bs-btn-bg'],
6
+ ['--bs-btn-hover-color', '--bs-btn-hover-bg'],
7
+ ['--bs-btn-active-color', '--bs-btn-active-bg'],
8
+ ['--bs-btn-disabled-color', '--bs-btn-disabled-bg'],
9
+ ];
10
+ export const BUTTON_OUTLINE_STATES = [
11
+ ...BUTTON_TEXT_STATES,
12
+ ['border-color', '--bs-btn-bg', 3],
13
+ ];
14
+ /** Correct only unreadable theme ink and resting outline borders; keep native surfaces and focus. */
15
+ export const ReadableButton = forwardRef(function ReadableButton(props, forwardedRef) {
16
+ const { element, ref } = useDropdownElementRef(forwardedRef);
17
+ const outlined = props.className?.split(/\s+/).some(name => name.startsWith('btn-outline-'));
18
+ useDropdownContrast(element, true, outlined ? BUTTON_OUTLINE_STATES : BUTTON_TEXT_STATES);
19
+ return _jsx("button", { "data-editor-contrast-owned": "true", ...props, className: `editor-readable-button ${props.className ?? ''}`, ref: ref });
20
+ });
@@ -0,0 +1,6 @@
1
+ import { type HTMLAttributes } from 'react';
2
+ import type { DropdownMenuProps } from 'react-bootstrap';
3
+ /** Keep React Bootstrap's menu metadata off the native element. */
4
+ export declare const ReadableDropdownSurface: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & Pick<DropdownMenuProps, "show" | "align"> & {
5
+ close?: () => void;
6
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import { useDropdownContrast, useDropdownElementRef } from './useDropdownContrast.js';
4
+ const TEXT_STATES = [
5
+ ['--bs-dropdown-link-color', '--bs-dropdown-bg'],
6
+ ['--bs-dropdown-link-hover-color', '--bs-dropdown-link-hover-bg'],
7
+ ['--bs-dropdown-link-active-color', '--bs-dropdown-link-active-bg'],
8
+ ['--bs-dropdown-header-color', '--bs-dropdown-bg'],
9
+ ['--bs-dropdown-link-disabled-color', '--bs-dropdown-bg', 3],
10
+ ];
11
+ /** Keep React Bootstrap's menu metadata off the native element. */
12
+ export const ReadableDropdownSurface = forwardRef(function ReadableDropdownSurface({ className, show, close: _close, align: _align, ...props }, forwardedRef) {
13
+ const { element, ref } = useDropdownElementRef(forwardedRef);
14
+ useDropdownContrast(element, Boolean(show), TEXT_STATES);
15
+ return _jsx("div", { "data-editor-contrast-owned": "true", ...props, className: className, ref: ref });
16
+ });
@@ -0,0 +1,2 @@
1
+ import { type ButtonProps } from 'react-bootstrap';
2
+ export declare const ReadableDropdownToggle: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import { Button } from 'react-bootstrap';
4
+ import { useDropdownContrast, useDropdownElementRef } from './useDropdownContrast.js';
5
+ const TEXT_STATES = [
6
+ ['--bs-btn-color', '--bs-btn-bg'],
7
+ ['--bs-btn-hover-color', '--bs-btn-hover-bg'],
8
+ ['--bs-btn-active-color', '--bs-btn-active-bg'],
9
+ ];
10
+ export const ReadableDropdownToggle = forwardRef(function ReadableDropdownToggle(props, forwardedRef) {
11
+ const { element, ref } = useDropdownElementRef(forwardedRef);
12
+ useDropdownContrast(element, true, TEXT_STATES);
13
+ return _jsx(Button, { "data-editor-contrast-owned": "true", ...props, className: `editor-readable-dropdown-toggle ${props.className ?? ''}`, ref: ref });
14
+ });
@@ -0,0 +1,3 @@
1
+ import { type SelectHTMLAttributes } from 'react';
2
+ /** Keep native theme fields, correcting their ink only when its contrast is insufficient. */
3
+ export declare const ReadableFormSelect: import("react").ForwardRefExoticComponent<SelectHTMLAttributes<HTMLSelectElement> & import("react").RefAttributes<HTMLSelectElement>>;
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import { useDropdownContrast, useDropdownElementRef } from './useDropdownContrast.js';
4
+ const TEXT_STATES = [['color', 'background-color']];
5
+ /** Keep native theme fields, correcting their ink only when its contrast is insufficient. */
6
+ export const ReadableFormSelect = forwardRef(function ReadableFormSelect(props, forwardedRef) {
7
+ const { element, ref } = useDropdownElementRef(forwardedRef);
8
+ useDropdownContrast(element, true, TEXT_STATES);
9
+ return _jsx("select", { "data-editor-contrast-owned": "true", ...props, ref: ref });
10
+ });
@@ -0,0 +1,15 @@
1
+ import type { DragEvent } from 'react';
2
+ export declare function reorderScope(type: string, scope: string): string;
3
+ export declare const SLIDE_DRAG_TYPE = "application/x-deliveryplus-slide";
4
+ export declare const BLOCK_DRAG_TYPE = "application/x-deliveryplus-block";
5
+ export declare function acceptsReorder(event: DragEvent, type: string): boolean;
6
+ export declare function dropAfter(event: DragEvent<HTMLElement>): boolean;
7
+ export declare function startReorder(event: DragEvent<HTMLElement>, type: string, id: string, scope?: string): void;
8
+ /** Native drag plus a keyboard equivalent; movement controls never edit content. */
9
+ export declare function ReorderHandle({ id, label, type, onMove, scope, }: Readonly<{
10
+ scope?: string;
11
+ id: string;
12
+ label: string;
13
+ type: string;
14
+ onMove: (offset: -1 | 1) => void;
15
+ }>): import("react").JSX.Element;
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { EditorActionIcon } from './EditorActionIcon.js';
3
+ export function reorderScope(type, scope) {
4
+ return `${type}-scope-${scope.toLowerCase()}`;
5
+ }
6
+ export const SLIDE_DRAG_TYPE = 'application/x-deliveryplus-slide';
7
+ export const BLOCK_DRAG_TYPE = 'application/x-deliveryplus-block';
8
+ export function acceptsReorder(event, type) {
9
+ return Array.from(event.dataTransfer.types).includes(type);
10
+ }
11
+ export function dropAfter(event) {
12
+ const bounds = event.currentTarget.getBoundingClientRect();
13
+ return event.clientY > bounds.top + bounds.height / 2;
14
+ }
15
+ export function startReorder(event, type, id, scope = 'root') {
16
+ event.dataTransfer.setData(type, id);
17
+ event.dataTransfer.setData(reorderScope(type, scope), id);
18
+ event.dataTransfer.effectAllowed = 'move';
19
+ }
20
+ /** Native drag plus a keyboard equivalent; movement controls never edit content. */
21
+ export function ReorderHandle({ id, label, type, onMove, scope = 'root', }) {
22
+ return (_jsx("button", { type: "button", draggable: true, className: "editor-icon-action lesson-reorder-handle", "aria-label": `Reorder ${label}`, title: "Drag to reorder. Alt+Arrow Up or Down also moves this item.", onDragStart: (event) => {
23
+ startReorder(event, type, id, scope);
24
+ }, onClick: (event) => event.stopPropagation(), onKeyDown: (event) => {
25
+ if (event.altKey && (event.key === 'ArrowUp' || event.key === 'ArrowDown')) {
26
+ event.preventDefault();
27
+ event.stopPropagation();
28
+ onMove(event.key === 'ArrowUp' ? -1 : 1);
29
+ }
30
+ }, children: _jsx(EditorActionIcon, { action: "grip" }) }));
31
+ }
@@ -0,0 +1,10 @@
1
+ import type { ReactNode } from 'react';
2
+ /** A visible insertion edge follows the same before/after rule used on drop. */
3
+ export declare function ReorderTarget({ type, scope, label, className, onMove, children }: Readonly<{
4
+ type: string;
5
+ scope?: string;
6
+ label: string;
7
+ className: string;
8
+ onMove: (source: string, after: boolean) => void;
9
+ children: ReactNode;
10
+ }>): import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useContentReorderTarget } from './useContentReorderTarget.js';
3
+ /** A visible insertion edge follows the same before/after rule used on drop. */
4
+ export function ReorderTarget({ type, scope = 'root', label, className, onMove, children }) {
5
+ const { edge, handlers } = useContentReorderTarget(type, scope, onMove);
6
+ return _jsx("div", { ...handlers, className: `lesson-reorder-target ${className}`, "data-drop-position": edge, "data-drop-label": edge ? `Move ${edge} ${label}` : undefined, children: children });
7
+ }
@@ -0,0 +1,9 @@
1
+ import type { BootstrapPropertyValue } from './bootstrapRegistry.js';
2
+ export declare function SpacingEditor({ block, onChange, }: Readonly<{
3
+ block: {
4
+ props: {
5
+ id: string;
6
+ };
7
+ };
8
+ onChange: (patch: Readonly<Record<string, BootstrapPropertyValue>>) => void;
9
+ }>): import("react").JSX.Element;