@instructure/platform-block-content-editor 1.0.0 → 1.1.0
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/README.md +187 -0
- package/dist/contexts/AIActionContext.d.ts +38 -0
- package/dist/contexts/AIActionContext.d.ts.map +1 -0
- package/dist/contexts/BlockEditorApiContext.d.ts +78 -0
- package/dist/contexts/BlockEditorApiContext.d.ts.map +1 -1
- package/dist/contexts/RichTextEditorContext.d.ts +28 -0
- package/dist/contexts/RichTextEditorContext.d.ts.map +1 -0
- package/dist/editor/BlockContentEditor.d.ts +40 -0
- package/dist/editor/BlockContentEditor.d.ts.map +1 -0
- package/dist/editor/ai/BlockAIMenu.d.ts +17 -0
- package/dist/editor/ai/BlockAIMenu.d.ts.map +1 -0
- package/dist/editor/ai/BlockAIMenuContent.d.ts +17 -0
- package/dist/editor/ai/BlockAIMenuContent.d.ts.map +1 -0
- package/dist/editor/ai/PreviewBlockModal.d.ts +29 -0
- package/dist/editor/ai/PreviewBlockModal.d.ts.map +1 -0
- package/dist/editor/ai/aiMenuStyles.d.ts +23 -0
- package/dist/editor/ai/aiMenuStyles.d.ts.map +1 -0
- package/dist/editor/ai/aiTranslations.d.ts +79 -0
- package/dist/editor/ai/aiTranslations.d.ts.map +1 -0
- package/dist/editor/ai/aiTypes.d.ts +13 -0
- package/dist/editor/ai/aiTypes.d.ts.map +1 -0
- package/dist/editor/ai/constants.d.ts +8 -0
- package/dist/editor/ai/constants.d.ts.map +1 -0
- package/dist/editor/ai/index.d.ts +7 -0
- package/dist/editor/ai/index.d.ts.map +1 -0
- package/dist/editor/ai/useBlockAIPopover.d.ts +30 -0
- package/dist/editor/ai/useBlockAIPopover.d.ts.map +1 -0
- package/dist/editor/ai/useGenerateAltText.d.ts +11 -0
- package/dist/editor/ai/useGenerateAltText.d.ts.map +1 -0
- package/dist/editor/canvas/DesignerArea.d.ts +38 -0
- package/dist/editor/canvas/DesignerArea.d.ts.map +1 -0
- package/dist/editor/canvas/DesignerCanvas.d.ts +35 -0
- package/dist/editor/canvas/DesignerCanvas.d.ts.map +1 -0
- package/dist/editor/canvas/DropGridOverlay.d.ts +24 -0
- package/dist/editor/canvas/DropGridOverlay.d.ts.map +1 -0
- package/dist/editor/canvas/GridDndContext.d.ts +11 -0
- package/dist/editor/canvas/GridDndContext.d.ts.map +1 -0
- package/dist/editor/canvas/GridDndProvider.d.ts +17 -0
- package/dist/editor/canvas/GridDndProvider.d.ts.map +1 -0
- package/dist/editor/canvas/GridItemChild.d.ts +44 -0
- package/dist/editor/canvas/GridItemChild.d.ts.map +1 -0
- package/dist/editor/canvas/GridItemContainer.d.ts +49 -0
- package/dist/editor/canvas/GridItemContainer.d.ts.map +1 -0
- package/dist/editor/canvas/GridViewer.d.ts +114 -0
- package/dist/editor/canvas/GridViewer.d.ts.map +1 -0
- package/dist/editor/canvas/TwoColumnDesigner.d.ts +34 -0
- package/dist/editor/canvas/TwoColumnDesigner.d.ts.map +1 -0
- package/dist/editor/canvas/canvasStyles.d.ts +36 -0
- package/dist/editor/canvas/canvasStyles.d.ts.map +1 -0
- package/dist/editor/canvas/canvasTranslations.d.ts +64 -0
- package/dist/editor/canvas/canvasTranslations.d.ts.map +1 -0
- package/dist/editor/canvas/index.d.ts +5 -0
- package/dist/editor/canvas/index.d.ts.map +1 -0
- package/dist/editor/document/constants.d.ts +23 -0
- package/dist/editor/document/constants.d.ts.map +1 -0
- package/dist/editor/document/designerItemAction.d.ts +16 -0
- package/dist/editor/document/designerItemAction.d.ts.map +1 -0
- package/dist/editor/document/utils.d.ts +172 -0
- package/dist/editor/document/utils.d.ts.map +1 -0
- package/dist/editor/document/utils.test.d.ts +2 -0
- package/dist/editor/document/utils.test.d.ts.map +1 -0
- package/dist/editor/history/types.d.ts +25 -0
- package/dist/editor/history/types.d.ts.map +1 -0
- package/dist/editor/history/undoRedoManager.d.ts +3 -0
- package/dist/editor/history/undoRedoManager.d.ts.map +1 -0
- package/dist/editor/history/undoRedoManager.test.d.ts +2 -0
- package/dist/editor/history/undoRedoManager.test.d.ts.map +1 -0
- package/dist/editor/history/useUndoRedo.d.ts +11 -0
- package/dist/editor/history/useUndoRedo.d.ts.map +1 -0
- package/dist/editor/history/useUndoRedo.test.d.ts +2 -0
- package/dist/editor/history/useUndoRedo.test.d.ts.map +1 -0
- package/dist/editor/index.d.ts +16 -0
- package/dist/editor/index.d.ts.map +1 -0
- package/dist/editor/preview/PreviewArea.d.ts +31 -0
- package/dist/editor/preview/PreviewArea.d.ts.map +1 -0
- package/dist/editor/preview/constants.d.ts +9 -0
- package/dist/editor/preview/constants.d.ts.map +1 -0
- package/dist/editor/preview/index.d.ts +4 -0
- package/dist/editor/preview/index.d.ts.map +1 -0
- package/dist/editor/preview/previewStyles.d.ts +20 -0
- package/dist/editor/preview/previewStyles.d.ts.map +1 -0
- package/dist/editor/preview/previewTranslations.d.ts +18 -0
- package/dist/editor/preview/previewTranslations.d.ts.map +1 -0
- package/dist/editor/sidebar/DesignerNav.d.ts +28 -0
- package/dist/editor/sidebar/DesignerNav.d.ts.map +1 -0
- package/dist/editor/sidebar/form/ComponentEditorForm.d.ts +12 -0
- package/dist/editor/sidebar/form/ComponentEditorForm.d.ts.map +1 -0
- package/dist/editor/sidebar/form/FormFieldWrapper.d.ts +13 -0
- package/dist/editor/sidebar/form/FormFieldWrapper.d.ts.map +1 -0
- package/dist/editor/sidebar/form/fieldRendererUtils.d.ts +24 -0
- package/dist/editor/sidebar/form/fieldRendererUtils.d.ts.map +1 -0
- package/dist/editor/sidebar/form/fieldRenderers.d.ts +6 -0
- package/dist/editor/sidebar/form/fieldRenderers.d.ts.map +1 -0
- package/dist/editor/sidebar/form/formTranslations.d.ts +92 -0
- package/dist/editor/sidebar/form/formTranslations.d.ts.map +1 -0
- package/dist/editor/sidebar/form/formUtils.d.ts +7 -0
- package/dist/editor/sidebar/form/formUtils.d.ts.map +1 -0
- package/dist/editor/sidebar/form/index.d.ts +7 -0
- package/dist/editor/sidebar/form/index.d.ts.map +1 -0
- package/dist/editor/sidebar/form/knowledgeCheckEditor.d.ts +10 -0
- package/dist/editor/sidebar/form/knowledgeCheckEditor.d.ts.map +1 -0
- package/dist/editor/sidebar/form/renderers/AltTextFieldRenderer.d.ts +4 -0
- package/dist/editor/sidebar/form/renderers/AltTextFieldRenderer.d.ts.map +1 -0
- package/dist/editor/sidebar/form/renderers/AnswerArrayFieldRenderer.d.ts +4 -0
- package/dist/editor/sidebar/form/renderers/AnswerArrayFieldRenderer.d.ts.map +1 -0
- package/dist/editor/sidebar/form/renderers/ObjectArrayFieldRenderer.d.ts +4 -0
- package/dist/editor/sidebar/form/renderers/ObjectArrayFieldRenderer.d.ts.map +1 -0
- package/dist/editor/sidebar/form/uploaders/FileUploader.d.ts +24 -0
- package/dist/editor/sidebar/form/uploaders/FileUploader.d.ts.map +1 -0
- package/dist/editor/sidebar/form/uploaders/ImageUploader.d.ts +8 -0
- package/dist/editor/sidebar/form/uploaders/ImageUploader.d.ts.map +1 -0
- package/dist/editor/sidebar/form/uploaders/VideoUploader.d.ts +8 -0
- package/dist/editor/sidebar/form/uploaders/VideoUploader.d.ts.map +1 -0
- package/dist/editor/sidebar/panel/DesignerSideBar.d.ts +18 -0
- package/dist/editor/sidebar/panel/DesignerSideBar.d.ts.map +1 -0
- package/dist/editor/sidebar/panel/MobileToolOverlay.d.ts +13 -0
- package/dist/editor/sidebar/panel/MobileToolOverlay.d.ts.map +1 -0
- package/dist/editor/sidebar/panel/MobileToolbar.d.ts +10 -0
- package/dist/editor/sidebar/panel/MobileToolbar.d.ts.map +1 -0
- package/dist/editor/sidebar/panel/ToolBody.d.ts +11 -0
- package/dist/editor/sidebar/panel/ToolBody.d.ts.map +1 -0
- package/dist/editor/sidebar/panel/ToolContentContainer.d.ts +27 -0
- package/dist/editor/sidebar/panel/ToolContentContainer.d.ts.map +1 -0
- package/dist/editor/sidebar/panel/ToolHeader.d.ts +24 -0
- package/dist/editor/sidebar/panel/ToolHeader.d.ts.map +1 -0
- package/dist/editor/sidebar/panel/ToolHeaderActionsContext.d.ts +8 -0
- package/dist/editor/sidebar/panel/ToolHeaderActionsContext.d.ts.map +1 -0
- package/dist/editor/sidebar/panel/ToolIconButtons.d.ts +19 -0
- package/dist/editor/sidebar/panel/ToolIconButtons.d.ts.map +1 -0
- package/dist/editor/sidebar/panel/ToolWrapper.d.ts +16 -0
- package/dist/editor/sidebar/panel/ToolWrapper.d.ts.map +1 -0
- package/dist/editor/sidebar/panel/constants.d.ts +23 -0
- package/dist/editor/sidebar/panel/constants.d.ts.map +1 -0
- package/dist/editor/sidebar/panel/index.d.ts +5 -0
- package/dist/editor/sidebar/panel/index.d.ts.map +1 -0
- package/dist/editor/sidebar/panel/panelStyles.d.ts +29 -0
- package/dist/editor/sidebar/panel/panelStyles.d.ts.map +1 -0
- package/dist/editor/sidebar/panel/types.d.ts +80 -0
- package/dist/editor/sidebar/panel/types.d.ts.map +1 -0
- package/dist/editor/sidebar/panel/useFocusReturn.d.ts +8 -0
- package/dist/editor/sidebar/panel/useFocusReturn.d.ts.map +1 -0
- package/dist/editor/sidebar/sidebarTranslations.d.ts +53 -0
- package/dist/editor/sidebar/sidebarTranslations.d.ts.map +1 -0
- package/dist/editor/sidebar/tray/BlockTray.d.ts +30 -0
- package/dist/editor/sidebar/tray/BlockTray.d.ts.map +1 -0
- package/dist/editor/sidebar/tray/ComponentsTray.d.ts +4 -0
- package/dist/editor/sidebar/tray/ComponentsTray.d.ts.map +1 -0
- package/dist/editor/sidebar/tray/InteractiveTray.d.ts +4 -0
- package/dist/editor/sidebar/tray/InteractiveTray.d.ts.map +1 -0
- package/dist/editor/sidebar/tray/LayoutTray.d.ts +4 -0
- package/dist/editor/sidebar/tray/LayoutTray.d.ts.map +1 -0
- package/dist/editor/sidebar/tray/SharedTrayComponents.d.ts +64 -0
- package/dist/editor/sidebar/tray/SharedTrayComponents.d.ts.map +1 -0
- package/dist/editor/sidebar/tray/TemplatesPanel.d.ts +4 -0
- package/dist/editor/sidebar/tray/TemplatesPanel.d.ts.map +1 -0
- package/dist/editor/sidebar/tray/TrayDragLayer.d.ts +14 -0
- package/dist/editor/sidebar/tray/TrayDragLayer.d.ts.map +1 -0
- package/dist/editor/sidebar/tray/blockDefinitions.d.ts +11 -0
- package/dist/editor/sidebar/tray/blockDefinitions.d.ts.map +1 -0
- package/dist/editor/sidebar/tray/index.d.ts +9 -0
- package/dist/editor/sidebar/tray/index.d.ts.map +1 -0
- package/dist/editor/sidebar/tray/trayStyles.d.ts +20 -0
- package/dist/editor/sidebar/tray/trayStyles.d.ts.map +1 -0
- package/dist/editor/sidebar/useDesignerSelectionFocus.d.ts +51 -0
- package/dist/editor/sidebar/useDesignerSelectionFocus.d.ts.map +1 -0
- package/dist/editor/state/applyTemplatePatch.d.ts +46 -0
- package/dist/editor/state/applyTemplatePatch.d.ts.map +1 -0
- package/dist/editor/state/applyTemplatePatch.test.d.ts +2 -0
- package/dist/editor/state/applyTemplatePatch.test.d.ts.map +1 -0
- package/dist/editor/state/useBlockEditorState.d.ts +57 -0
- package/dist/editor/state/useBlockEditorState.d.ts.map +1 -0
- package/dist/editor/state/useBlockEditorState.test.d.ts +2 -0
- package/dist/editor/state/useBlockEditorState.test.d.ts.map +1 -0
- package/dist/editor/validation/templateDataValidator.d.ts +48 -0
- package/dist/editor/validation/templateDataValidator.d.ts.map +1 -0
- package/dist/editor/validation/templateDataValidator.test.d.ts +2 -0
- package/dist/editor/validation/templateDataValidator.test.d.ts.map +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14282 -1869
- package/dist/registry/blockRegistry.d.ts +8 -0
- package/dist/registry/blockRegistry.d.ts.map +1 -1
- package/dist/registry/defineBlock.d.ts +5 -0
- package/dist/registry/defineBlock.d.ts.map +1 -1
- package/dist/schema/index.d.ts +1 -1
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/zodExtensions.d.ts +2 -0
- package/dist/schema/zodExtensions.d.ts.map +1 -1
- package/dist/utils/useMediaQuery.d.ts +7 -0
- package/dist/utils/useMediaQuery.d.ts.map +1 -0
- package/locales/en.json +126 -1
- package/package.json +34 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Strings the package owns for the designer **sidebar** — the tool panel chrome (icon
|
|
3
|
+
* rail, header, resize/full-width controls) and the insertion trays that list blocks.
|
|
4
|
+
* Consumed via `useBlockTranslations(DesignerSidebarEnglish)`, the same mechanism blocks
|
|
5
|
+
* and the canvas chrome use; there is deliberately no second translation context. The
|
|
6
|
+
* host overrides by placing a `BlockTranslationsProvider` above the designer; anything it
|
|
7
|
+
* omits falls back to the English below.
|
|
8
|
+
*
|
|
9
|
+
* `%{name}` markers are interpolated by `translate('<key>', { … })`.
|
|
10
|
+
*/
|
|
11
|
+
export interface DesignerSidebarTranslations {
|
|
12
|
+
/** Suspense fallback while a tool's content loads. */
|
|
13
|
+
loading: string;
|
|
14
|
+
/** Rail button tooltip/label to collapse the expanded panel. */
|
|
15
|
+
collapse: string;
|
|
16
|
+
/** Rail button tooltip/label to expand the collapsed panel. */
|
|
17
|
+
expand: string;
|
|
18
|
+
/** Header tooltip to restore a full-width panel to its normal width. */
|
|
19
|
+
minimize: string;
|
|
20
|
+
/** Header full-width toggle screen-reader label (collapsed → full width). */
|
|
21
|
+
expandPanel: string;
|
|
22
|
+
/** Header full-width toggle screen-reader label (full width → normal). */
|
|
23
|
+
minimizePanel: string;
|
|
24
|
+
/** Header back-button screen-reader label. */
|
|
25
|
+
back: string;
|
|
26
|
+
/** Header close-button screen-reader label; `%{panelName}` is the active tool title. */
|
|
27
|
+
closePanel: string;
|
|
28
|
+
/** Resize drag-handle screen-reader label. */
|
|
29
|
+
resizeToolPanel: string;
|
|
30
|
+
/** Icon-rail title for the basic/activity-content blocks tray. */
|
|
31
|
+
basicBlocksTool: string;
|
|
32
|
+
/** Icon-rail title for the interactive blocks tray. */
|
|
33
|
+
interactiveBlocksTool: string;
|
|
34
|
+
/** Icon-rail title for the layout blocks tray. */
|
|
35
|
+
layoutBlocksTool: string;
|
|
36
|
+
/** Icon-rail title for the templates panel. */
|
|
37
|
+
templatesTool: string;
|
|
38
|
+
/** Intro copy above the basic-blocks list. */
|
|
39
|
+
basicBlocksIntro: string;
|
|
40
|
+
/** Intro copy above the layout-blocks list. */
|
|
41
|
+
layoutBlocksIntro: string;
|
|
42
|
+
/** Intro copy above the interactive-blocks list. */
|
|
43
|
+
interactiveBlocksIntro: string;
|
|
44
|
+
/** Block-row add-button screen-reader label; `%{name}` is the block's label. */
|
|
45
|
+
addBlock: string;
|
|
46
|
+
/** Skip link that jumps focus to the selected block on the canvas. */
|
|
47
|
+
skipToSelectedComponent: string;
|
|
48
|
+
/** Placeholder copy in the (not yet built) templates tray panel. */
|
|
49
|
+
templatesComingSoon: string;
|
|
50
|
+
}
|
|
51
|
+
/** English bundled with this package — also the source for `locales/en.json`. */
|
|
52
|
+
export declare const DesignerSidebarEnglish: DesignerSidebarTranslations;
|
|
53
|
+
//# sourceMappingURL=sidebarTranslations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebarTranslations.d.ts","sourceRoot":"","sources":["../../../src/editor/sidebar/sidebarTranslations.ts"],"names":[],"mappings":"AAkBA;;;;;;;;;GASG;AACH,MAAM,WAAW,2BAA2B;IAC1C,sDAAsD;IACtD,OAAO,EAAE,MAAM,CAAA;IACf,gEAAgE;IAChE,QAAQ,EAAE,MAAM,CAAA;IAChB,+DAA+D;IAC/D,MAAM,EAAE,MAAM,CAAA;IACd,wEAAwE;IACxE,QAAQ,EAAE,MAAM,CAAA;IAChB,6EAA6E;IAC7E,WAAW,EAAE,MAAM,CAAA;IACnB,0EAA0E;IAC1E,aAAa,EAAE,MAAM,CAAA;IACrB,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAA;IACZ,wFAAwF;IACxF,UAAU,EAAE,MAAM,CAAA;IAClB,8CAA8C;IAC9C,eAAe,EAAE,MAAM,CAAA;IACvB,kEAAkE;IAClE,eAAe,EAAE,MAAM,CAAA;IACvB,uDAAuD;IACvD,qBAAqB,EAAE,MAAM,CAAA;IAC7B,kDAAkD;IAClD,gBAAgB,EAAE,MAAM,CAAA;IACxB,+CAA+C;IAC/C,aAAa,EAAE,MAAM,CAAA;IACrB,8CAA8C;IAC9C,gBAAgB,EAAE,MAAM,CAAA;IACxB,+CAA+C;IAC/C,iBAAiB,EAAE,MAAM,CAAA;IACzB,oDAAoD;IACpD,sBAAsB,EAAE,MAAM,CAAA;IAC9B,gFAAgF;IAChF,QAAQ,EAAE,MAAM,CAAA;IAChB,sEAAsE;IACtE,uBAAuB,EAAE,MAAM,CAAA;IAC/B,oEAAoE;IACpE,mBAAmB,EAAE,MAAM,CAAA;CAC5B;AAED,iFAAiF;AACjF,eAAO,MAAM,sBAAsB,EAAE,2BAoBpC,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { BlockCategory } from '../../../registry/blockCatalogue';
|
|
2
|
+
import { BlockRegistry } from '../../../registry/blockRegistry';
|
|
3
|
+
/**
|
|
4
|
+
* Props shared by every insertion tray. The three named trays (`ComponentsTray`,
|
|
5
|
+
* `LayoutTray`, `InteractiveTray`) differ only by category + intro copy, so they wrap this.
|
|
6
|
+
*/
|
|
7
|
+
export interface BlockTrayProps {
|
|
8
|
+
/** The host registry the tray lists blocks from and the form resolves against. */
|
|
9
|
+
registry: BlockRegistry;
|
|
10
|
+
/** Insert a block by wire name (click-to-add; drag-and-drop goes through the DnD context). */
|
|
11
|
+
onAddComponent: (componentName: string) => void;
|
|
12
|
+
/** The selected block's type — when set with an id and a non-`main` view, shows the form. */
|
|
13
|
+
selectedComponentType?: string;
|
|
14
|
+
selectedComponentId?: string | null;
|
|
15
|
+
selectedComponentData?: Record<string, unknown> | null;
|
|
16
|
+
onComponentChange?: (props: Record<string, unknown>, nodeId?: string) => void;
|
|
17
|
+
}
|
|
18
|
+
interface BlockTrayInternalProps extends BlockTrayProps {
|
|
19
|
+
category: BlockCategory;
|
|
20
|
+
intro: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A tray: the list of insertable blocks for a category, or — once a block of a matching type
|
|
24
|
+
* is selected and navigation has left the `main` view — the settings form for it. The form
|
|
25
|
+
* stays mounted across its own sub-navigations (item edit, manage layer), which is why the
|
|
26
|
+
* swap keys on `selectedComponentId` and hinges on the nav view rather than remounting.
|
|
27
|
+
*/
|
|
28
|
+
export declare function BlockTray({ registry, onAddComponent, selectedComponentType, selectedComponentId, selectedComponentData, onComponentChange, category, intro, }: BlockTrayInternalProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=BlockTray.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlockTray.d.ts","sourceRoot":"","sources":["../../../../src/editor/sidebar/tray/BlockTray.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAMpE;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,kFAAkF;IAClF,QAAQ,EAAE,aAAa,CAAA;IACvB,8FAA8F;IAC9F,cAAc,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/C,6FAA6F;IAC7F,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,qBAAqB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IACtD,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9E;AAED,UAAU,sBAAuB,SAAQ,cAAc;IACrD,QAAQ,EAAE,aAAa,CAAA;IACvB,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EACxB,QAAQ,EACR,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,QAAQ,EACR,KAAK,GACN,EAAE,sBAAsB,2CAkCxB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { BlockTrayProps } from './BlockTray';
|
|
2
|
+
/** The basic / activity-content blocks tray (Banner, Text, Quote, Code, Image, Video). */
|
|
3
|
+
export declare function ComponentsTray(props: BlockTrayProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=ComponentsTray.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComponentsTray.d.ts","sourceRoot":"","sources":["../../../../src/editor/sidebar/tray/ComponentsTray.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5D,0FAA0F;AAC1F,wBAAgB,cAAc,CAAC,KAAK,EAAE,cAAc,2CAGnD"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { BlockTrayProps } from './BlockTray';
|
|
2
|
+
/** The interactive blocks tray (Accordion, Tabs, Knowledge check, Flashcards, Mix and match). */
|
|
3
|
+
export declare function InteractiveTray(props: BlockTrayProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=InteractiveTray.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InteractiveTray.d.ts","sourceRoot":"","sources":["../../../../src/editor/sidebar/tray/InteractiveTray.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5D,iGAAiG;AACjG,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,2CASpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LayoutTray.d.ts","sourceRoot":"","sources":["../../../../src/editor/sidebar/tray/LayoutTray.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5D,2DAA2D;AAC3D,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,2CAG/C"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Shared pieces of the insertion tray: the container chrome, the draggable/clickable block
|
|
4
|
+
* row, and the drag preview. The per-category catalogue that fills these rows lives in
|
|
5
|
+
* `blockDefinitions.ts`; the four trays compose it.
|
|
6
|
+
*/
|
|
7
|
+
/** Grouping used to tint a block's tray icon badge. */
|
|
8
|
+
export type BlockColorCategory = 'text' | 'media' | 'layout' | 'interactive' | 'yellow';
|
|
9
|
+
/** Icon-badge tint per color category, as an InstUI `colors.primitives` token name. */
|
|
10
|
+
export declare const BLOCK_CATEGORY_COLOR_TOKENS: Record<BlockColorCategory, string>;
|
|
11
|
+
/** One insertable block, as the trays and drag layer see it. */
|
|
12
|
+
export interface TrayBlockDefinition {
|
|
13
|
+
/** The registry wire name inserted when this block is dropped. */
|
|
14
|
+
component: string;
|
|
15
|
+
/** Already-translated label shown in the tray and drag preview. */
|
|
16
|
+
displayName: string;
|
|
17
|
+
/** The block's tray icon (an `@instructure/ui-icons` element). */
|
|
18
|
+
icon: ReactNode;
|
|
19
|
+
colorCategory: BlockColorCategory;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/** Unique drag id suffix when several rows share one component type. */
|
|
22
|
+
dragId?: string;
|
|
23
|
+
/** Props merged on top of the block's defaults when it is added. */
|
|
24
|
+
propsOverride?: Record<string, unknown>;
|
|
25
|
+
description?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface BlockRowProps {
|
|
28
|
+
block: TrayBlockDefinition;
|
|
29
|
+
onAdd: () => void;
|
|
30
|
+
/** When set, wraps the row in a tooltip (e.g. explaining a disabled row). */
|
|
31
|
+
tooltip?: string;
|
|
32
|
+
}
|
|
33
|
+
/** Scroll container the tray panels sit in. Mounts the tray stylesheet once. */
|
|
34
|
+
export declare function TrayContainer({ children }: {
|
|
35
|
+
children: ReactNode;
|
|
36
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
/** Vertical list wrapping the block rows. */
|
|
38
|
+
export declare function BlockList({ children }: {
|
|
39
|
+
children: ReactNode;
|
|
40
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
/**
|
|
42
|
+
* One block in a tray: a drag anchor (pointer/keyboard drag source) plus an accessible
|
|
43
|
+
* "Add" button. The drag handle is hidden from assistive tech (`aria-hidden`, `tabIndex=-1`)
|
|
44
|
+
* — dragging is pointer/keyboard-DnD only — so the row exposes exactly one button, the add
|
|
45
|
+
* action. The dnd-kit id is `tray-<dragId ?? component>` and the drag `data` carries the wire
|
|
46
|
+
* name + optional `propsOverride`, which is what `TrayDragLayer` and the grid consume.
|
|
47
|
+
*/
|
|
48
|
+
export declare function BlockRow({ block, onAdd, tooltip }: BlockRowProps): import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
/**
|
|
50
|
+
* The lightweight card shown under the cursor while a block is dragged out of the tray.
|
|
51
|
+
* Non-interactive — it mirrors `BlockRow`'s look via the same classes.
|
|
52
|
+
*/
|
|
53
|
+
export declare function TrayDragPreview({ block }: {
|
|
54
|
+
block: TrayBlockDefinition;
|
|
55
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
/**
|
|
57
|
+
* A skip link that jumps focus to the block currently selected on the canvas (its DOM id is
|
|
58
|
+
* the component id). Visually hidden until focused. Rendered at the top of each tray so a
|
|
59
|
+
* keyboard user can return to their selection without tabbing through the whole list.
|
|
60
|
+
*/
|
|
61
|
+
export declare function SkipToSelectedComponentLink({ selectedComponentId, }: {
|
|
62
|
+
selectedComponentId: string | null | undefined;
|
|
63
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
64
|
+
//# sourceMappingURL=SharedTrayComponents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SharedTrayComponents.d.ts","sourceRoot":"","sources":["../../../../src/editor/sidebar/tray/SharedTrayComponents.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAA;AAKrD;;;;GAIG;AAEH,uDAAuD;AACvD,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,aAAa,GAAG,QAAQ,CAAA;AAEvF,uFAAuF;AACvF,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAM1E,CAAA;AAED,gEAAgE;AAChE,MAAM,WAAW,mBAAmB;IAClC,kEAAkE;IAClE,SAAS,EAAE,MAAM,CAAA;IACjB,mEAAmE;IACnE,WAAW,EAAE,MAAM,CAAA;IACnB,kEAAkE;IAClE,IAAI,EAAE,SAAS,CAAA;IACf,aAAa,EAAE,kBAAkB,CAAA;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,wEAAwE;IACxE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,oEAAoE;IACpE,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACvC,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,mBAAmB,CAAA;IAC1B,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAgBD,gFAAgF;AAChF,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAOlE;AAED,6CAA6C;AAC7C,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAE9D;AAWD;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,aAAa,2CAyDhE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,mBAAmB,CAAA;CAAE,2CAmBxE;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,EAC1C,mBAAmB,GACpB,EAAE;IACD,mBAAmB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;CAC/C,kDAoBA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TemplatesPanel.d.ts","sourceRoot":"","sources":["../../../../src/editor/sidebar/tray/TemplatesPanel.tsx"],"names":[],"mappings":"AAuBA,sFAAsF;AACtF,wBAAgB,cAAc,4CAQ7B;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BlockRegistry } from '../../../registry/blockRegistry';
|
|
2
|
+
/**
|
|
3
|
+
* Renders a floating preview of a block being dragged out of the tray, tracking the
|
|
4
|
+
* cursor (pointer drags) or the dnd-kit delta (keyboard drags). Pointer coordinates come
|
|
5
|
+
* from a window listener because dnd-kit's public context doesn't expose them.
|
|
6
|
+
*
|
|
7
|
+
* The catalogue is derived from the host registry, so the drag layer needs it to resolve a
|
|
8
|
+
* `tray-*` drag id back to the block being previewed. With no tray sources on screen, no
|
|
9
|
+
* `tray-*` drag ever starts and this renders nothing.
|
|
10
|
+
*/
|
|
11
|
+
export declare function TrayDragLayer({ componentRegistry }: {
|
|
12
|
+
componentRegistry: BlockRegistry;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
14
|
+
//# sourceMappingURL=TrayDragLayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrayDragLayer.d.ts","sourceRoot":"","sources":["../../../../src/editor/sidebar/tray/TrayDragLayer.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AA2BpE;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,EAAE,iBAAiB,EAAE,EAAE;IAAE,iBAAiB,EAAE,aAAa,CAAA;CAAE,kDAmGxF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BlockCategory } from '../../../registry/blockCatalogue';
|
|
2
|
+
import { BlockRegistry } from '../../../registry/blockRegistry';
|
|
3
|
+
import { TrayBlockDefinition } from './SharedTrayComponents';
|
|
4
|
+
/** The catalogue rows for one tray category, in display order, limited to registered blocks. */
|
|
5
|
+
export declare function getTrayBlockDefinitionsByCategory(registry: BlockRegistry, category: BlockCategory): TrayBlockDefinition[];
|
|
6
|
+
/**
|
|
7
|
+
* Every insertable block across the non-widget categories — used by `TrayDragLayer` to
|
|
8
|
+
* resolve a `tray-*` drag id back to a preview, independent of which tray is open.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getTrayBlockDefinitions(registry: BlockRegistry): TrayBlockDefinition[];
|
|
11
|
+
//# sourceMappingURL=blockDefinitions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blockDefinitions.d.ts","sourceRoot":"","sources":["../../../../src/editor/sidebar/tray/blockDefinitions.tsx"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAEpE,OAAO,KAAK,EAAsB,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AA2ErF,gGAAgG;AAChG,wBAAgB,iCAAiC,CAC/C,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,aAAa,GACtB,mBAAmB,EAAE,CAIvB;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,aAAa,GAAG,mBAAmB,EAAE,CAGtF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { BLOCK_CATEGORY_COLOR_TOKENS, BlockList, BlockRow, type BlockColorCategory, type BlockRowProps, type TrayBlockDefinition, SkipToSelectedComponentLink, TrayContainer, TrayDragPreview, } from './SharedTrayComponents';
|
|
2
|
+
export { getTrayBlockDefinitions, getTrayBlockDefinitionsByCategory, } from './blockDefinitions';
|
|
3
|
+
export { BlockTray, type BlockTrayProps } from './BlockTray';
|
|
4
|
+
export { ComponentsTray } from './ComponentsTray';
|
|
5
|
+
export { LayoutTray } from './LayoutTray';
|
|
6
|
+
export { InteractiveTray } from './InteractiveTray';
|
|
7
|
+
export { TrayDragLayer } from './TrayDragLayer';
|
|
8
|
+
export { TemplatesPanel } from './TemplatesPanel';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/editor/sidebar/tray/index.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,2BAA2B,EAC3B,SAAS,EACT,QAAQ,EACR,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,2BAA2B,EAC3B,aAAa,EACb,eAAe,GAChB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EACL,uBAAuB,EACvB,iCAAiC,GAClC,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The insertion-tray CSS: the block-row card (drag anchor + add button, hover shadow) and
|
|
3
|
+
* the visually-hidden skip link. These need `:hover`/`:focus` and native-button resets that
|
|
4
|
+
* InstUI props can't express, so — like the canvas and panel chrome — they ship once as a
|
|
5
|
+
* global stylesheet keyed by stable class names. The colored icon badge's background varies
|
|
6
|
+
* per block, so it is applied inline.
|
|
7
|
+
*/
|
|
8
|
+
export declare const TRAY_CLASS: {
|
|
9
|
+
readonly row: "bce-tray-row";
|
|
10
|
+
readonly rowDisabled: "bce-tray-row--disabled";
|
|
11
|
+
readonly dragAnchor: "bce-tray-drag-anchor";
|
|
12
|
+
readonly addButton: "bce-tray-add-button";
|
|
13
|
+
readonly badge: "bce-tray-badge";
|
|
14
|
+
readonly label: "bce-tray-label";
|
|
15
|
+
readonly description: "bce-tray-description";
|
|
16
|
+
readonly skipLink: "bce-tray-skip-link";
|
|
17
|
+
};
|
|
18
|
+
/** Mounts the insertion-tray stylesheet once, under the sidebar. */
|
|
19
|
+
export declare function TrayChromeStyles(): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=trayStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trayStyles.d.ts","sourceRoot":"","sources":["../../../../src/editor/sidebar/tray/trayStyles.tsx"],"names":[],"mappings":"AAoBA;;;;;;GAMG;AAEH,eAAO,MAAM,UAAU;;;;;;;;;CASb,CAAA;AAoBV,oEAAoE;AACpE,wBAAgB,gBAAgB,4CA+G/B"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { FocusEvent, RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Coordinates the selection highlight between the canvas and the tool panel so exactly one
|
|
4
|
+
* block reads as selected at a time.
|
|
5
|
+
*
|
|
6
|
+
* The canvas border rule has two independent branches — `:focus-within` (the block holding
|
|
7
|
+
* DOM focus) and `[data-selected]` (the block the engine marked selected). When focus moves
|
|
8
|
+
* to a *different* canvas item than the selected one, both branches match and two borders
|
|
9
|
+
* show. This hook keeps them reconciled by driving `data-selected` imperatively:
|
|
10
|
+
*
|
|
11
|
+
* - Focus enters a canvas item → clear `data-selected`, let `:focus-within` show the border.
|
|
12
|
+
* - Focus leaves the canvas into the panel (or an open popover) → re-assert `data-selected`
|
|
13
|
+
* on the last-focused item, so the selection stays visible while editing.
|
|
14
|
+
* - Focus leaves both canvas and panel → deselect (clears `data-selected` and calls
|
|
15
|
+
* `onDeselect`, which the caller wires to the engine's selection).
|
|
16
|
+
* - Escape inside the canvas → deselect and blur.
|
|
17
|
+
*
|
|
18
|
+
* Spread `canvasProps` on the canvas wrapper (the element `canvasRef` points at) and
|
|
19
|
+
* `panelProps` on the wrapper around the sidebar. Built to be reused by the final
|
|
20
|
+
* orchestrator, which owns both elements.
|
|
21
|
+
*/
|
|
22
|
+
export interface DesignerSelectionFocusHandlers {
|
|
23
|
+
canvasProps: {
|
|
24
|
+
onFocusCapture: (e: FocusEvent) => void;
|
|
25
|
+
onBlurCapture: (e: FocusEvent) => void;
|
|
26
|
+
};
|
|
27
|
+
panelProps: {
|
|
28
|
+
onBlurCapture: (e: FocusEvent) => void;
|
|
29
|
+
'data-tool-panel': 'true';
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Arm a one-shot: ignore the next focus-leave that would otherwise deselect. Call it right
|
|
33
|
+
* before a programmatic selection whose own re-render drops DOM focus to `<body>` — e.g. a
|
|
34
|
+
* tray "Add" click, where the clicked button unmounts as the list swaps to the settings form,
|
|
35
|
+
* so the resulting focusout must not be read as "left the editor" and undo the new selection.
|
|
36
|
+
* Self-expires a couple of frames later regardless of whether a focusout ever consumed it —
|
|
37
|
+
* removing the focused element from the DOM outright (rather than blurring it first) fires no
|
|
38
|
+
* bubbling focusout in some browsers at all, which would otherwise leave the guard armed
|
|
39
|
+
* forever and swallow a later, unrelated deselect.
|
|
40
|
+
*/
|
|
41
|
+
suppressNextDeselect: () => void;
|
|
42
|
+
}
|
|
43
|
+
interface Options {
|
|
44
|
+
/** The canvas content element (holds the `[data-designer-item]` blocks). */
|
|
45
|
+
canvasRef: RefObject<HTMLElement | null>;
|
|
46
|
+
/** Called when focus leaves the editor entirely (or Escape) — clear the engine selection. */
|
|
47
|
+
onDeselect: () => void;
|
|
48
|
+
}
|
|
49
|
+
export declare function useDesignerSelectionFocus({ canvasRef, onDeselect, }: Options): DesignerSelectionFocusHandlers;
|
|
50
|
+
export {};
|
|
51
|
+
//# sourceMappingURL=useDesignerSelectionFocus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDesignerSelectionFocus.d.ts","sourceRoot":"","sources":["../../../src/editor/sidebar/useDesignerSelectionFocus.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAkC,MAAM,OAAO,CAAA;AAGvF;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,MAAM,WAAW,8BAA8B;IAC7C,WAAW,EAAE;QACX,cAAc,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAA;QACvC,aAAa,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAA;KACvC,CAAA;IACD,UAAU,EAAE;QACV,aAAa,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAA;QACtC,iBAAiB,EAAE,MAAM,CAAA;KAC1B,CAAA;IACD;;;;;;;;;OASG;IACH,oBAAoB,EAAE,MAAM,IAAI,CAAA;CACjC;AAED,UAAU,OAAO;IACf,4EAA4E;IAC5E,SAAS,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IACxC,6FAA6F;IAC7F,UAAU,EAAE,MAAM,IAAI,CAAA;CACvB;AAKD,wBAAgB,yBAAyB,CAAC,EACxC,SAAS,EACT,UAAU,GACX,EAAE,OAAO,GAAG,8BAA8B,CAiJ1C"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { BlockRegistry, LayoutNode, TemplateData } from '../../registry';
|
|
2
|
+
/**
|
|
3
|
+
* A partial document edit, as a host's whole-template agent emits it. Applied against the current
|
|
4
|
+
* document by {@link applyTemplatePatch}.
|
|
5
|
+
*/
|
|
6
|
+
export interface TemplatePatch {
|
|
7
|
+
/** Layout nodes to insert (unknown id) or update in place (existing id). */
|
|
8
|
+
layout?: LayoutNode[];
|
|
9
|
+
/**
|
|
10
|
+
* Content patch by node id — either the array form the agent emits (each entry carries its `id`,
|
|
11
|
+
* optionally its `component` type, and the `props`) or a flat `TemplateData` record.
|
|
12
|
+
*/
|
|
13
|
+
data?: TemplateData | Array<{
|
|
14
|
+
id: string;
|
|
15
|
+
component?: string;
|
|
16
|
+
props: object;
|
|
17
|
+
}>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Merge a partial agent {@link TemplatePatch} into the current document and return the next
|
|
21
|
+
* `{ layout, data }`. Pure — the caller pushes the result into the engine (see
|
|
22
|
+
* `useBlockEditorState().applyTemplatePatch`, which does so as a single history step).
|
|
23
|
+
*
|
|
24
|
+
* Semantics mirror the engine's own `addComponent`, so the package stays the single source of truth
|
|
25
|
+
* for tree/grid/validation rules:
|
|
26
|
+
* - **Layout** — a node whose id already exists is updated in place (its `props` merged, `children`
|
|
27
|
+
* replaced if the patch carries them); a node with a new, registry-resolvable id is appended with a
|
|
28
|
+
* default grid position (next free row), stacking rather than overlapping. A new node whose
|
|
29
|
+
* component type isn't in the registry (a hallucinated/typo'd agent wire name) is dropped with a
|
|
30
|
+
* warning — it would otherwise persist as a node the UI can neither render nor delete.
|
|
31
|
+
* - **Data** — an entry for an existing id merges into its props; a new id is validated against its
|
|
32
|
+
* block's schema and added. A new entry whose component type can't be resolved (no `component` on
|
|
33
|
+
* the entry and no matching layout node) or that fails validation is dropped with a warning, so one
|
|
34
|
+
* bad entry never aborts the rest of the patch.
|
|
35
|
+
* - When (and only when) the layout changed, it is normalized with `reconcileGridLayout` (resolve row
|
|
36
|
+
* conflicts, sort to visual order). A data-only patch leaves the layout array untouched (same
|
|
37
|
+
* reference) — it never reorders content.
|
|
38
|
+
*/
|
|
39
|
+
export declare function applyTemplatePatch(current: {
|
|
40
|
+
layout: LayoutNode[];
|
|
41
|
+
data: TemplateData;
|
|
42
|
+
}, patch: TemplatePatch, registry: BlockRegistry): {
|
|
43
|
+
layout: LayoutNode[];
|
|
44
|
+
data: TemplateData;
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=applyTemplatePatch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applyTemplatePatch.d.ts","sourceRoot":"","sources":["../../../src/editor/state/applyTemplatePatch.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,UAAU,EAEf,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAA;AASvB;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,4EAA4E;IAC5E,MAAM,CAAC,EAAE,UAAU,EAAE,CAAA;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,YAAY,GAAG,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAC/E;AASD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE;IAAE,MAAM,EAAE,UAAU,EAAE,CAAC;IAAC,IAAI,EAAE,YAAY,CAAA;CAAE,EACrD,KAAK,EAAE,aAAa,EACpB,QAAQ,EAAE,aAAa,GACtB;IAAE,MAAM,EAAE,UAAU,EAAE,CAAC;IAAC,IAAI,EAAE,YAAY,CAAA;CAAE,CAwH9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applyTemplatePatch.test.d.ts","sourceRoot":"","sources":["../../../src/editor/state/applyTemplatePatch.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { BlockRegistry, LayoutNode, TemplateData } from '../../registry';
|
|
2
|
+
import { TrayDropTarget, TreePath } from '../document/utils';
|
|
3
|
+
import { ActivitySnapshot } from '../history/types';
|
|
4
|
+
import { TemplatePatch } from './applyTemplatePatch';
|
|
5
|
+
export interface AddComponentResult {
|
|
6
|
+
componentId: string;
|
|
7
|
+
componentType: string;
|
|
8
|
+
path: TreePath;
|
|
9
|
+
}
|
|
10
|
+
export interface DeleteComponentResult {
|
|
11
|
+
deletedIds: string[];
|
|
12
|
+
deletedAssetIds: string[];
|
|
13
|
+
}
|
|
14
|
+
export interface DuplicateComponentResult {
|
|
15
|
+
componentId: string;
|
|
16
|
+
componentType: string;
|
|
17
|
+
path: TreePath;
|
|
18
|
+
}
|
|
19
|
+
export interface UseBlockEditorStateOptions {
|
|
20
|
+
initialData: TemplateData;
|
|
21
|
+
initialLayout: LayoutNode[];
|
|
22
|
+
onDirty: () => void;
|
|
23
|
+
historyLimit?: number;
|
|
24
|
+
/**
|
|
25
|
+
* The host-composed registry. A component can only be added if its wire name resolves here;
|
|
26
|
+
* new entries are validated against their block's schema.
|
|
27
|
+
*/
|
|
28
|
+
registry: BlockRegistry;
|
|
29
|
+
}
|
|
30
|
+
export interface UseBlockEditorStateReturn {
|
|
31
|
+
templateData: TemplateData;
|
|
32
|
+
templateLayout: LayoutNode[];
|
|
33
|
+
selectedComponentId: string | null;
|
|
34
|
+
setSelectedComponentId: (id: string | null) => void;
|
|
35
|
+
addComponent: (componentType: string, dropTarget?: TrayDropTarget, propsOverride?: Record<string, unknown>) => AddComponentResult | null;
|
|
36
|
+
changeComponent: (updatedProp: Record<string, unknown>, nodeId?: string) => void;
|
|
37
|
+
deleteComponent: (nodeId?: string) => DeleteComponentResult | null;
|
|
38
|
+
duplicateComponent: (nodeId: string) => DuplicateComponentResult | null;
|
|
39
|
+
changeLayout: (layout: LayoutNode[]) => void;
|
|
40
|
+
replaceData: (data: TemplateData) => void;
|
|
41
|
+
replaceLayout: (layout: LayoutNode[]) => void;
|
|
42
|
+
/**
|
|
43
|
+
* Merge a partial agent patch (insert-or-update layout + validate-or-merge data) into the current
|
|
44
|
+
* document as a **single** history step. The supported way to apply a host whole-template agent's
|
|
45
|
+
* output — the merge/grid/validation rules stay owned by the package (see `applyTemplatePatch`).
|
|
46
|
+
*/
|
|
47
|
+
applyTemplatePatch: (patch: TemplatePatch) => void;
|
|
48
|
+
undoRedo: {
|
|
49
|
+
onUndo: () => void;
|
|
50
|
+
onRedo: () => void;
|
|
51
|
+
canUndo: boolean;
|
|
52
|
+
canRedo: boolean;
|
|
53
|
+
};
|
|
54
|
+
clearHistory: (newPresent?: ActivitySnapshot) => void;
|
|
55
|
+
}
|
|
56
|
+
export declare function useBlockEditorState({ initialData, initialLayout, onDirty, historyLimit, registry, }: UseBlockEditorStateOptions): UseBlockEditorStateReturn;
|
|
57
|
+
//# sourceMappingURL=useBlockEditorState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBlockEditorState.d.ts","sourceRoot":"","sources":["../../../src/editor/state/useBlockEditorState.ts"],"names":[],"mappings":"AAqBA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,UAAU,EAEf,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAWL,KAAK,cAAc,EACnB,KAAK,QAAQ,EAEd,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAGxD,OAAO,EAA4C,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEnG,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,IAAI,EAAE,QAAQ,CAAA;CACf;AAED,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,eAAe,EAAE,MAAM,EAAE,CAAA;CAC1B;AAED,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,IAAI,EAAE,QAAQ,CAAA;CACf;AAED,MAAM,WAAW,0BAA0B;IACzC,WAAW,EAAE,YAAY,CAAA;IACzB,aAAa,EAAE,UAAU,EAAE,CAAA;IAC3B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;OAGG;IACH,QAAQ,EAAE,aAAa,CAAA;CACxB;AAED,MAAM,WAAW,yBAAyB;IACxC,YAAY,EAAE,YAAY,CAAA;IAC1B,cAAc,EAAE,UAAU,EAAE,CAAA;IAE5B,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,sBAAsB,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IAEnD,YAAY,EAAE,CACZ,aAAa,EAAE,MAAM,EACrB,UAAU,CAAC,EAAE,cAAc,EAC3B,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KACpC,kBAAkB,GAAG,IAAI,CAAA;IAC9B,eAAe,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAChF,eAAe,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,qBAAqB,GAAG,IAAI,CAAA;IAClE,kBAAkB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,wBAAwB,GAAG,IAAI,CAAA;IACvE,YAAY,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,IAAI,CAAA;IAE5C,WAAW,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAA;IACzC,aAAa,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,IAAI,CAAA;IAC7C;;;;OAIG;IACH,kBAAkB,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IAElD,QAAQ,EAAE;QACR,MAAM,EAAE,MAAM,IAAI,CAAA;QAClB,MAAM,EAAE,MAAM,IAAI,CAAA;QAClB,OAAO,EAAE,OAAO,CAAA;QAChB,OAAO,EAAE,OAAO,CAAA;KACjB,CAAA;IAED,YAAY,EAAE,CAAC,UAAU,CAAC,EAAE,gBAAgB,KAAK,IAAI,CAAA;CACtD;AAED,wBAAgB,mBAAmB,CAAC,EAClC,WAAW,EACX,aAAa,EACb,OAAO,EACP,YAAY,EACZ,QAAQ,GACT,EAAE,0BAA0B,GAAG,yBAAyB,CAuUxD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBlockEditorState.test.d.ts","sourceRoot":"","sources":["../../../src/editor/state/useBlockEditorState.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { BlockRegistry, LayoutNode, TemplateData } from '../../registry';
|
|
2
|
+
export interface TemplateDataValidationSuccess<T> {
|
|
3
|
+
success: true;
|
|
4
|
+
data: T;
|
|
5
|
+
}
|
|
6
|
+
export interface TemplateDataValidationError {
|
|
7
|
+
success: false;
|
|
8
|
+
errors: Array<{
|
|
9
|
+
componentId: string;
|
|
10
|
+
componentType?: string;
|
|
11
|
+
field?: string;
|
|
12
|
+
message: string;
|
|
13
|
+
}>;
|
|
14
|
+
}
|
|
15
|
+
export type TemplateDataValidationResult<T> = TemplateDataValidationSuccess<T> | TemplateDataValidationError;
|
|
16
|
+
/**
|
|
17
|
+
* Validate a single template data entry against its block's schema.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const result = validateTemplateDataEntry('header-1', 'Header', { title: 'Welcome' }, registry)
|
|
22
|
+
* if (result.success) {
|
|
23
|
+
* // result.data — validated props
|
|
24
|
+
* } else {
|
|
25
|
+
* // result.errors
|
|
26
|
+
* }
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare function validateTemplateDataEntry(componentId: string, componentType: string, props: unknown, registry: BlockRegistry): TemplateDataValidationResult<Record<string, unknown>>;
|
|
30
|
+
/**
|
|
31
|
+
* Validate template data by cross-referencing the layout for each entry's block type, then
|
|
32
|
+
* validating props against that block's schema. Returns validated data or aggregated errors.
|
|
33
|
+
*/
|
|
34
|
+
export declare function validateTemplateData(templateData: TemplateData, templateLayout: LayoutNode[], registry: BlockRegistry): TemplateDataValidationResult<TemplateData>;
|
|
35
|
+
/**
|
|
36
|
+
* Parse template data without throwing, recovering as much valid data as possible and
|
|
37
|
+
* returning warnings for invalid entries (e.g. to show a non-blocking notice).
|
|
38
|
+
*/
|
|
39
|
+
export declare function safeParseTemplateData(templateData: TemplateData, templateLayout: LayoutNode[], registry: BlockRegistry): {
|
|
40
|
+
data: TemplateData;
|
|
41
|
+
warnings: TemplateDataValidationError['errors'];
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Create a validated template data entry for a component, validating props against its block's
|
|
45
|
+
* schema before creating the entry.
|
|
46
|
+
*/
|
|
47
|
+
export declare function createValidatedTemplateDataEntry(componentId: string, componentType: string, props: unknown, registry: BlockRegistry): TemplateDataValidationResult<TemplateData>;
|
|
48
|
+
//# sourceMappingURL=templateDataValidator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templateDataValidator.d.ts","sourceRoot":"","sources":["../../../src/editor/validation/templateDataValidator.ts"],"names":[],"mappings":"AAyBA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,UAAU,EAEf,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAA;AAEvB,MAAM,WAAW,6BAA6B,CAAC,CAAC;IAC9C,OAAO,EAAE,IAAI,CAAA;IACb,IAAI,EAAE,CAAC,CAAA;CACR;AAED,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,KAAK,CAAA;IACd,MAAM,EAAE,KAAK,CAAC;QACZ,WAAW,EAAE,MAAM,CAAA;QACnB,aAAa,CAAC,EAAE,MAAM,CAAA;QACtB,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,OAAO,EAAE,MAAM,CAAA;KAChB,CAAC,CAAA;CACH;AAED,MAAM,MAAM,4BAA4B,CAAC,CAAC,IACtC,6BAA6B,CAAC,CAAC,CAAC,GAChC,2BAA2B,CAAA;AAE/B;;;;;;;;;;;;GAYG;AACH,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,aAAa,GACtB,4BAA4B,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA+CvD;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,UAAU,EAAE,EAC5B,QAAQ,EAAE,aAAa,GACtB,4BAA4B,CAAC,YAAY,CAAC,CAsC5C;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,UAAU,EAAE,EAC5B,QAAQ,EAAE,aAAa,GACtB;IACD,IAAI,EAAE,YAAY,CAAA;IAClB,QAAQ,EAAE,2BAA2B,CAAC,QAAQ,CAAC,CAAA;CAChD,CA2CA;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,CAC9C,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,aAAa,GACtB,4BAA4B,CAAC,YAAY,CAAC,CAW5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templateDataValidator.test.d.ts","sourceRoot":"","sources":["../../../src/editor/validation/templateDataValidator.test.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
CHANGED
|
@@ -15,10 +15,13 @@ export * from './components/blocks/WidgetBlock';
|
|
|
15
15
|
export { HeaderStyleSchema, type HeaderStyle } from './components/blocks/commonSchemas';
|
|
16
16
|
export * from './registry';
|
|
17
17
|
export * from './viewer';
|
|
18
|
+
export * from './editor';
|
|
18
19
|
export { BlockTranslationsProvider, useBlockTranslations, type AllStringValues, type BlockTranslations, type BlockTranslationValues, } from './contexts/BlockTranslationsContext';
|
|
19
|
-
export { BlockEditorApiContext, BlockEditorApiProvider, useImageUrl, useVideoUrl, useWidget, type BlockEditorApi, type ResolvedImage, type ResolvedVideo, type ResolvedWidget, type UseImageUrl, type UseVideoUrl, type UseWidget, type WidgetComponentProps, } from './contexts/BlockEditorApiContext';
|
|
20
|
+
export { BlockEditorApiContext, BlockEditorApiProvider, useCreateFile, useDeleteFile, useFetchAsset, useImageUrl, useUploadedFile, useVideoUrl, useWidget, type BlockEditorApi, type CreateFileArgs, type CreateFileHandle, type DeleteFileArgs, type DeleteFileHandle, type FetchAssetArgs, type FetchAssetHandle, type ResolvedImage, type ResolvedUploadedFile, type ResolvedVideo, type ResolvedWidget, type UseCreateFile, type UseDeleteFile, type UseFetchAsset, type UseImageUrl, type UseUploadedFile, type UseVideoUrl, type UseWidget, type WidgetComponentProps, } from './contexts/BlockEditorApiContext';
|
|
20
21
|
export { BrandColorContext, useBrandColor } from './contexts/BrandColorContext';
|
|
21
22
|
export { DesignerModeContext, useDesignerMode } from './contexts/DesignerModeContext';
|
|
23
|
+
export { AIActionContext, useAIAction, type AIAction, type AIToolUse, type AIToolResult, type AIToolResultJsonContent, type AIToolResultTextContent, } from './contexts/AIActionContext';
|
|
22
24
|
export { RichTextRendererContext, useRichTextRenderer, type RichTextRenderer, } from './contexts/RichTextRendererContext';
|
|
25
|
+
export { RichTextEditorContext, useRichTextEditor, type RichTextEditorComponent, type RichTextEditorProps, } from './contexts/RichTextEditorContext';
|
|
23
26
|
export * from './schema';
|
|
24
27
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAmBA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,2BAA2B,CAAA;AACzC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,oCAAoC,CAAA;AAClD,cAAc,qCAAqC,CAAA;AACnD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,iCAAiC,CAAA;AAI/C,OAAO,EAAE,iBAAiB,EAAE,KAAK,WAAW,EAAE,MAAM,mCAAmC,CAAA;AAGvF,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AAGxB,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,GAC5B,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,WAAW,EACX,WAAW,EACX,SAAS,EACT,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,oBAAoB,GAC1B,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAC/E,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AACrF,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,KAAK,gBAAgB,GACtB,MAAM,oCAAoC,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAmBA,cAAc,+BAA+B,CAAA;AAC7C,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,2BAA2B,CAAA;AACzC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,oCAAoC,CAAA;AAClD,cAAc,qCAAqC,CAAA;AACnD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,iCAAiC,CAAA;AAI/C,OAAO,EAAE,iBAAiB,EAAE,KAAK,WAAW,EAAE,MAAM,mCAAmC,CAAA;AAGvF,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AAMxB,cAAc,UAAU,CAAA;AAGxB,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,GAC5B,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,aAAa,EACb,aAAa,EACb,aAAa,EACb,WAAW,EACX,eAAe,EACf,WAAW,EACX,SAAS,EACT,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,oBAAoB,GAC1B,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAC/E,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AACrF,OAAO,EACL,eAAe,EACf,WAAW,EACX,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,GAC7B,MAAM,4BAA4B,CAAA;AACnC,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,KAAK,gBAAgB,GACtB,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,GACzB,MAAM,kCAAkC,CAAA;AAGzC,cAAc,UAAU,CAAA"}
|