@instructure/platform-block-content-editor 3.5.0 → 4.0.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 +80 -17
- package/dist/components/blocks/Banner/bannerPropsSchema.d.ts.map +1 -1
- package/dist/contexts/NutritionFactsContext.d.ts +19 -0
- package/dist/contexts/NutritionFactsContext.d.ts.map +1 -0
- package/dist/editor/BlockContentEditor.d.ts +23 -8
- package/dist/editor/BlockContentEditor.d.ts.map +1 -1
- package/dist/editor/ai/AIGenerationContext.d.ts +46 -0
- package/dist/editor/ai/AIGenerationContext.d.ts.map +1 -0
- package/dist/editor/ai/BlockAIMenu.d.ts.map +1 -1
- package/dist/editor/ai/BlockAIMenuContent.d.ts.map +1 -1
- package/dist/editor/ai/BlockGenerationOverlay.d.ts +16 -0
- package/dist/editor/ai/BlockGenerationOverlay.d.ts.map +1 -0
- package/dist/editor/ai/NutritionFactsDisclosure.d.ts +23 -0
- package/dist/editor/ai/NutritionFactsDisclosure.d.ts.map +1 -0
- package/dist/editor/ai/PreviewBlockModal.d.ts +2 -7
- package/dist/editor/ai/PreviewBlockModal.d.ts.map +1 -1
- package/dist/editor/ai/aiMenuStyles.d.ts +1 -0
- package/dist/editor/ai/aiMenuStyles.d.ts.map +1 -1
- package/dist/editor/ai/aiTranslations.d.ts +19 -0
- package/dist/editor/ai/aiTranslations.d.ts.map +1 -1
- package/dist/editor/ai/aiTypes.d.ts +2 -0
- package/dist/editor/ai/aiTypes.d.ts.map +1 -1
- package/dist/editor/ai/generationOverlayStyles.d.ts +18 -0
- package/dist/editor/ai/generationOverlayStyles.d.ts.map +1 -0
- package/dist/editor/ai/index.d.ts +2 -1
- package/dist/editor/ai/index.d.ts.map +1 -1
- package/dist/editor/ai/previewBlockStyles.d.ts +17 -0
- package/dist/editor/ai/previewBlockStyles.d.ts.map +1 -0
- package/dist/editor/ai/previewDiff.d.ts +73 -0
- package/dist/editor/ai/previewDiff.d.ts.map +1 -0
- package/dist/editor/ai/previewDiff.test.d.ts +2 -0
- package/dist/editor/ai/previewDiff.test.d.ts.map +1 -0
- package/dist/editor/canvas/DesignerArea.d.ts +8 -6
- package/dist/editor/canvas/DesignerArea.d.ts.map +1 -1
- package/dist/editor/canvas/DesignerCanvas.d.ts +2 -6
- package/dist/editor/canvas/DesignerCanvas.d.ts.map +1 -1
- package/dist/editor/canvas/GridDndContext.d.ts +0 -1
- package/dist/editor/canvas/GridDndContext.d.ts.map +1 -1
- package/dist/editor/canvas/GridDndProvider.d.ts +8 -3
- package/dist/editor/canvas/GridDndProvider.d.ts.map +1 -1
- package/dist/editor/canvas/GridItemChild.d.ts +2 -6
- package/dist/editor/canvas/GridItemChild.d.ts.map +1 -1
- package/dist/editor/canvas/GridItemContainer.d.ts.map +1 -1
- package/dist/editor/canvas/GridViewer.d.ts +5 -16
- package/dist/editor/canvas/GridViewer.d.ts.map +1 -1
- package/dist/editor/canvas/TwoColumnDesigner.d.ts +1 -6
- package/dist/editor/canvas/TwoColumnDesigner.d.ts.map +1 -1
- package/dist/editor/canvas/canvasStyles.d.ts +3 -0
- package/dist/editor/canvas/canvasStyles.d.ts.map +1 -1
- package/dist/editor/canvas/index.d.ts +1 -0
- package/dist/editor/canvas/index.d.ts.map +1 -1
- package/dist/editor/history/types.d.ts +6 -0
- package/dist/editor/history/types.d.ts.map +1 -1
- package/dist/editor/history/undoRedoManager.d.ts.map +1 -1
- package/dist/editor/history/useUndoRedo.d.ts +3 -4
- package/dist/editor/history/useUndoRedo.d.ts.map +1 -1
- package/dist/editor/index.d.ts +9 -4
- package/dist/editor/index.d.ts.map +1 -1
- package/dist/editor/sidebar/form/ComponentEditorForm.d.ts +3 -2
- package/dist/editor/sidebar/form/ComponentEditorForm.d.ts.map +1 -1
- package/dist/editor/sidebar/form/fieldRendererUtils.d.ts +2 -1
- package/dist/editor/sidebar/form/fieldRendererUtils.d.ts.map +1 -1
- package/dist/editor/sidebar/form/renderers/AltTextFieldRenderer.d.ts.map +1 -1
- package/dist/editor/sidebar/form/renderers/AnswerArrayFieldRenderer.d.ts +1 -1
- package/dist/editor/sidebar/form/renderers/AnswerArrayFieldRenderer.d.ts.map +1 -1
- package/dist/editor/sidebar/panel/DesignerSideBar.d.ts.map +1 -1
- package/dist/editor/sidebar/panel/ToolBody.d.ts +2 -1
- package/dist/editor/sidebar/panel/ToolBody.d.ts.map +1 -1
- package/dist/editor/sidebar/panel/ToolContentContainer.d.ts +3 -1
- package/dist/editor/sidebar/panel/ToolContentContainer.d.ts.map +1 -1
- package/dist/editor/sidebar/panel/ToolHeaderActionsContext.d.ts.map +1 -1
- package/dist/editor/sidebar/panel/panelStyles.d.ts +1 -0
- package/dist/editor/sidebar/panel/panelStyles.d.ts.map +1 -1
- package/dist/editor/sidebar/panel/types.d.ts +7 -1
- package/dist/editor/sidebar/panel/types.d.ts.map +1 -1
- package/dist/editor/sidebar/sidebarTranslations.d.ts +0 -8
- package/dist/editor/sidebar/sidebarTranslations.d.ts.map +1 -1
- package/dist/editor/sidebar/tray/BlockTray.d.ts +3 -4
- package/dist/editor/sidebar/tray/BlockTray.d.ts.map +1 -1
- package/dist/editor/sidebar/tray/SharedTrayComponents.d.ts +1 -1
- package/dist/editor/sidebar/tray/blockDefinitions.d.ts.map +1 -1
- package/dist/editor/sidebar/tray/index.d.ts +0 -2
- package/dist/editor/sidebar/tray/index.d.ts.map +1 -1
- package/dist/editor/sidebar/useDesignerSelectionFocus.d.ts +10 -1
- package/dist/editor/sidebar/useDesignerSelectionFocus.d.ts.map +1 -1
- package/dist/editor/state/blockDataStore.d.ts +13 -0
- package/dist/editor/state/blockDataStore.d.ts.map +1 -0
- package/dist/editor/state/blockDataStore.test.d.ts +2 -0
- package/dist/editor/state/blockDataStore.test.d.ts.map +1 -0
- package/dist/editor/state/selectionContext.d.ts +5 -0
- package/dist/editor/state/selectionContext.d.ts.map +1 -0
- package/dist/editor/state/selectionStore.d.ts +11 -0
- package/dist/editor/state/selectionStore.d.ts.map +1 -0
- package/dist/editor/state/useBlockData.d.ts +13 -0
- package/dist/editor/state/useBlockData.d.ts.map +1 -0
- package/dist/editor/state/useBlockEditorState.d.ts +10 -5
- package/dist/editor/state/useBlockEditorState.d.ts.map +1 -1
- package/dist/editor/state/useUndoRedoState.d.ts +9 -0
- package/dist/editor/state/useUndoRedoState.d.ts.map +1 -0
- package/dist/editor/state/useUndoRedoState.test.d.ts +2 -0
- package/dist/editor/state/useUndoRedoState.test.d.ts.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8389 -7401
- package/dist/registry/blockCatalogue.d.ts +1 -6
- package/dist/registry/blockCatalogue.d.ts.map +1 -1
- package/dist/registry/templateTypes.d.ts +2 -2
- package/dist/schema/schemaRegistry.d.ts +0 -17
- package/dist/schema/schemaRegistry.d.ts.map +1 -1
- package/dist/viewer/viewerStyles.d.ts +0 -3
- package/dist/viewer/viewerStyles.d.ts.map +1 -1
- package/locales/en.json +13 -6
- package/package.json +5 -1
- package/dist/components/blocks/LayoutContainer/LayoutContainer.d.ts +0 -3
- package/dist/components/blocks/LayoutContainer/LayoutContainer.d.ts.map +0 -1
- package/dist/components/blocks/LayoutContainer/createLayoutContainerBlock.d.ts +0 -22
- package/dist/components/blocks/LayoutContainer/createLayoutContainerBlock.d.ts.map +0 -1
- package/dist/components/blocks/LayoutContainer/getLayoutContainerViewProps.d.ts +0 -32
- package/dist/components/blocks/LayoutContainer/getLayoutContainerViewProps.d.ts.map +0 -1
- package/dist/components/blocks/LayoutContainer/index.d.ts +0 -5
- package/dist/components/blocks/LayoutContainer/index.d.ts.map +0 -1
- package/dist/components/blocks/LayoutContainer/layoutContainerPropsSchema.d.ts +0 -118
- package/dist/components/blocks/LayoutContainer/layoutContainerPropsSchema.d.ts.map +0 -1
- package/dist/editor/sidebar/tray/LayoutTray.d.ts +0 -4
- package/dist/editor/sidebar/tray/LayoutTray.d.ts.map +0 -1
- package/dist/editor/sidebar/tray/TemplatesPanel.d.ts +0 -4
- package/dist/editor/sidebar/tray/TemplatesPanel.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/editor/sidebar/panel/types.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAA;AAE5E;;;;;;;GAOG;AACH,MAAM,WAAW,IAAI,CAAC,EAAE,SAAS,MAAM;IACrC,EAAE,EAAE,EAAE,CAAA;IACN,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAA;IACb;+FAC2F;IAC3F,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,SAAS,CAAA;IACf,yEAAyE;IACzE,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,qEAAqE;IACrE,OAAO,CAAC,EAAE,WAAW,CAAA;IACrB
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/editor/sidebar/panel/types.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAA;AAE5E;;;;;;;GAOG;AACH,MAAM,WAAW,IAAI,CAAC,EAAE,SAAS,MAAM;IACrC,EAAE,EAAE,EAAE,CAAA;IACN,uDAAuD;IACvD,KAAK,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AAC,EAAE,EAAE,GAAG,IAAI,CAAA;IAC1B,sBAAsB,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,GAAG,IAAI,KAAK,IAAI,CAAA;IACpD,qFAAqF;IACrF,IAAI,CAAC,EAAE,gBAAgB,CAAA;IACvB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAA;IAC/C;qFACiF;IACjF,+BAA+B,CAAC,EAAE,OAAO,CAAA;IACzC;oCACgC;IAChC,uBAAuB,CAAC,EAAE,MAAM,CAAA;IAChC;;mEAE+D;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,+FAA+F;IAC/F,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,MAAM,WAAW,SAAS;IACxB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAA;CACpD;AAED,2FAA2F;AAC3F,MAAM,WAAW,6BAA6B;IAC5C,gBAAgB,EAAE,CAAC,OAAO,EAAE,SAAS,KAAK,IAAI,CAAA;IAC9C,aAAa,EAAE,SAAS,CAAA;IACxB,6FAA6F;IAC7F,cAAc,EAAE,CAAC,OAAO,EAAE,SAAS,KAAK,IAAI,CAAA;IAC5C,WAAW,EAAE,SAAS,CAAA;CACvB"}
|
|
@@ -31,14 +31,8 @@ export interface DesignerSidebarTranslations {
|
|
|
31
31
|
basicBlocksTool: string;
|
|
32
32
|
/** Icon-rail title for the interactive blocks tray. */
|
|
33
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
34
|
/** Intro copy above the basic-blocks list. */
|
|
39
35
|
basicBlocksIntro: string;
|
|
40
|
-
/** Intro copy above the layout-blocks list. */
|
|
41
|
-
layoutBlocksIntro: string;
|
|
42
36
|
/** Intro copy above the interactive-blocks list. */
|
|
43
37
|
interactiveBlocksIntro: string;
|
|
44
38
|
/** Block-row add-button screen-reader label; `%{name}` is the block's label. */
|
|
@@ -47,8 +41,6 @@ export interface DesignerSidebarTranslations {
|
|
|
47
41
|
generateBlockWithAi: string;
|
|
48
42
|
/** Skip link that jumps focus to the selected block on the canvas. */
|
|
49
43
|
skipToSelectedComponent: string;
|
|
50
|
-
/** Placeholder copy in the (not yet built) templates tray panel. */
|
|
51
|
-
templatesComingSoon: string;
|
|
52
44
|
}
|
|
53
45
|
/** English bundled with this package — also the source for `locales/en.json`. */
|
|
54
46
|
export declare const DesignerSidebarEnglish: DesignerSidebarTranslations;
|
|
@@ -1 +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,
|
|
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,8CAA8C;IAC9C,gBAAgB,EAAE,MAAM,CAAA;IACxB,oDAAoD;IACpD,sBAAsB,EAAE,MAAM,CAAA;IAC9B,gFAAgF;IAChF,QAAQ,EAAE,MAAM,CAAA;IAChB,sHAAsH;IACtH,mBAAmB,EAAE,MAAM,CAAA;IAC3B,sEAAsE;IACtE,uBAAuB,EAAE,MAAM,CAAA;CAChC;AAED,iFAAiF;AACjF,eAAO,MAAM,sBAAsB,EAAE,2BAiBpC,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BlockCategory } from '../../../registry/blockCatalogue';
|
|
2
2
|
import { BlockRegistry } from '../../../registry/blockRegistry';
|
|
3
3
|
/**
|
|
4
|
-
* Props shared by every insertion tray. The
|
|
5
|
-
* `
|
|
4
|
+
* Props shared by every insertion tray. The two named trays (`ComponentsTray`,
|
|
5
|
+
* `InteractiveTray`) differ only by category + intro copy, so they wrap this.
|
|
6
6
|
*/
|
|
7
7
|
export interface BlockTrayProps {
|
|
8
8
|
/** The host registry the tray lists blocks from and the form resolves against. */
|
|
@@ -17,7 +17,6 @@ export interface BlockTrayProps {
|
|
|
17
17
|
/** The selected block's type — when set with an id and a non-`main` view, shows the form. */
|
|
18
18
|
selectedComponentType?: string;
|
|
19
19
|
selectedComponentId?: string | null;
|
|
20
|
-
selectedComponentData?: Record<string, unknown> | null;
|
|
21
20
|
onComponentChange?: (props: Record<string, unknown>, nodeId?: string) => void;
|
|
22
21
|
}
|
|
23
22
|
interface BlockTrayInternalProps extends BlockTrayProps {
|
|
@@ -30,6 +29,6 @@ interface BlockTrayInternalProps extends BlockTrayProps {
|
|
|
30
29
|
* stays mounted across its own sub-navigations (item edit, manage layer), which is why the
|
|
31
30
|
* swap keys on `selectedComponentId` and hinges on the nav view rather than remounting.
|
|
32
31
|
*/
|
|
33
|
-
export declare function BlockTray({ registry, onAddComponent, onAiGenerate, selectedComponentType, selectedComponentId,
|
|
32
|
+
export declare function BlockTray({ registry, onAddComponent, onAiGenerate, selectedComponentType, selectedComponentId, onComponentChange, category, intro, }: BlockTrayInternalProps): import("react/jsx-runtime").JSX.Element;
|
|
34
33
|
export {};
|
|
35
34
|
//# sourceMappingURL=BlockTray.d.ts.map
|
|
@@ -1 +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;AAOpE;;;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;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAA;IAC9E,6FAA6F;IAC7F,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,
|
|
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;AAOpE;;;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;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAA;IAC9E,6FAA6F;IAC7F,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,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,YAAY,EACZ,qBAAqB,EACrB,mBAAmB,EACnB,iBAAiB,EACjB,QAAQ,EACR,KAAK,GACN,EAAE,sBAAsB,2CAwCxB"}
|
|
@@ -2,7 +2,7 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
/**
|
|
3
3
|
* Shared pieces of the insertion tray: the container chrome, the draggable/clickable block
|
|
4
4
|
* row, and the drag preview. The per-category catalogue that fills these rows lives in
|
|
5
|
-
* `blockDefinitions.ts`; the
|
|
5
|
+
* `blockDefinitions.ts`; the block trays compose it.
|
|
6
6
|
*/
|
|
7
7
|
/** Grouping used to tint a block's tray icon badge. */
|
|
8
8
|
export type BlockColorCategory = 'text' | 'media' | 'layout' | 'interactive' | 'yellow';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockDefinitions.d.ts","sourceRoot":"","sources":["../../../../src/editor/sidebar/tray/blockDefinitions.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"blockDefinitions.d.ts","sourceRoot":"","sources":["../../../../src/editor/sidebar/tray/blockDefinitions.tsx"],"names":[],"mappings":"AAiCA,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,kCAAkC,CAAA;AACtF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAGpE,OAAO,KAAK,EAAsB,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAgFrF,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"}
|
|
@@ -2,8 +2,6 @@ export { BLOCK_CATEGORY_COLOR_TOKENS, BlockList, BlockRow, type BlockColorCatego
|
|
|
2
2
|
export { getTrayBlockDefinitions, getTrayBlockDefinitionsByCategory, } from './blockDefinitions';
|
|
3
3
|
export { BlockTray, type BlockTrayProps } from './BlockTray';
|
|
4
4
|
export { ComponentsTray } from './ComponentsTray';
|
|
5
|
-
export { LayoutTray } from './LayoutTray';
|
|
6
5
|
export { InteractiveTray } from './InteractiveTray';
|
|
7
6
|
export { TrayDragLayer } from './TrayDragLayer';
|
|
8
|
-
export { TemplatesPanel } from './TemplatesPanel';
|
|
9
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +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,
|
|
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,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA"}
|
|
@@ -11,7 +11,7 @@ import { FocusEvent, RefObject } from 'react';
|
|
|
11
11
|
* - Focus enters a canvas item → clear `data-selected`, let `:focus-within` show the border.
|
|
12
12
|
* - Focus leaves the canvas into the panel (or an open popover) → re-assert `data-selected`
|
|
13
13
|
* on the last-focused item, so the selection stays visible while editing.
|
|
14
|
-
* - Focus leaves
|
|
14
|
+
* - Focus leaves the canvas, the panel, and the host's `EDITOR_CHROME_PROPS` toolbar → deselect (clears `data-selected` and calls `onDeselect`,
|
|
15
15
|
* which the caller wires to the engine's selection), UNLESS an editor-owned overlay is open. The
|
|
16
16
|
* package's own portaled popovers are matched by a DOM marker; a host rich-text editor's overlays
|
|
17
17
|
* (a dialog, tray, or menu canvas-rce portals to `document.body`, unmarked, and gives focus to)
|
|
@@ -60,6 +60,15 @@ interface Options {
|
|
|
60
60
|
*/
|
|
61
61
|
isEditorOverlayOpen?: () => boolean;
|
|
62
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* Spread on the host's own editor toolbar (Save, Undo/Redo, a preview toggle): focus landing there
|
|
65
|
+
* holds the selection instead of reading as leaving the editor. Checked when focus moves, one
|
|
66
|
+
* frame before the host's click handler runs — so no host state can substitute for it. Focus
|
|
67
|
+
* leaving the toolbar for somewhere outside the editor deselects, as leaving the panel does.
|
|
68
|
+
*/
|
|
69
|
+
export declare const EDITOR_CHROME_PROPS: {
|
|
70
|
+
readonly 'data-bce-editor-chrome': "true";
|
|
71
|
+
};
|
|
63
72
|
export declare function useDesignerSelectionFocus({ canvasRef, onDeselect, isEditorOverlayOpen, }: Options): DesignerSelectionFocusHandlers;
|
|
64
73
|
export {};
|
|
65
74
|
//# sourceMappingURL=useDesignerSelectionFocus.d.ts.map
|
|
@@ -1 +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;AAIvF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;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;IACtB;;;;;;;;OAQG;IACH,mBAAmB,CAAC,EAAE,MAAM,OAAO,CAAA;CACpC;
|
|
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;AAIvF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;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;IACtB;;;;;;;;OAQG;IACH,mBAAmB,CAAC,EAAE,MAAM,OAAO,CAAA;CACpC;AAMD;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;CAAgD,CAAA;AAehF,wBAAgB,yBAAyB,CAAC,EACxC,SAAS,EACT,UAAU,EACV,mBAAmB,GACpB,EAAE,OAAO,GAAG,8BAA8B,CA+K1C"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TemplateData } from '../../registry';
|
|
2
|
+
type Listener = () => void;
|
|
3
|
+
export interface BlockDataStore {
|
|
4
|
+
getBlock: (id: string) => Record<string, unknown> | undefined;
|
|
5
|
+
getAll: () => TemplateData;
|
|
6
|
+
subscribe: (id: string, listener: Listener) => () => void;
|
|
7
|
+
subscribeAll: (listener: Listener) => () => void;
|
|
8
|
+
setBlock: (id: string, props: Record<string, unknown>) => void;
|
|
9
|
+
replaceAll: (next: TemplateData) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function createBlockDataStore(initial: TemplateData): BlockDataStore;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=blockDataStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blockDataStore.d.ts","sourceRoot":"","sources":["../../../src/editor/state/blockDataStore.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAElD,KAAK,QAAQ,GAAG,MAAM,IAAI,CAAA;AAE1B,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;IAC7D,MAAM,EAAE,MAAM,YAAY,CAAA;IAC1B,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,KAAK,MAAM,IAAI,CAAA;IACzD,YAAY,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,MAAM,IAAI,CAAA;IAChD,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAA;IAC9D,UAAU,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAA;CACzC;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,YAAY,GAAG,cAAc,CAsD1E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blockDataStore.test.d.ts","sourceRoot":"","sources":["../../../src/editor/state/blockDataStore.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Selection, SelectionStore } from './selectionStore';
|
|
2
|
+
export declare const SelectionContext: import('react').Context<SelectionStore | null>;
|
|
3
|
+
export declare function useSelection(): Selection;
|
|
4
|
+
export declare function useIsSelected(id: string | undefined): boolean;
|
|
5
|
+
//# sourceMappingURL=selectionContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectionContext.d.ts","sourceRoot":"","sources":["../../../src/editor/state/selectionContext.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjE,eAAO,MAAM,gBAAgB,gDAA6C,CAAA;AAU1E,wBAAgB,YAAY,IAAI,SAAS,CAGxC;AAED,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAI7D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface Selection {
|
|
2
|
+
id: string | null;
|
|
3
|
+
seq: number;
|
|
4
|
+
}
|
|
5
|
+
export interface SelectionStore {
|
|
6
|
+
get: () => Selection;
|
|
7
|
+
set: (id: string | null) => void;
|
|
8
|
+
subscribe: (listener: () => void) => () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function createSelectionStore(): SelectionStore;
|
|
11
|
+
//# sourceMappingURL=selectionStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectionStore.d.ts","sourceRoot":"","sources":["../../../src/editor/state/selectionStore.ts"],"names":[],"mappings":"AAkBA,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;IACjB,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,SAAS,CAAA;IACpB,GAAG,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IAChC,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAA;CAChD;AAGD,wBAAgB,oBAAoB,IAAI,cAAc,CAgBrD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TemplateData } from '../../registry';
|
|
2
|
+
import { BlockDataStore } from './blockDataStore';
|
|
3
|
+
export declare const BlockDataStoreContext: import('react').Context<BlockDataStore | null>;
|
|
4
|
+
export declare function useBlockDataStore(): BlockDataStore;
|
|
5
|
+
export declare function useBlockData(id: string | undefined): Record<string, unknown> | undefined;
|
|
6
|
+
export interface BlockDataStoreOwner {
|
|
7
|
+
store: BlockDataStore;
|
|
8
|
+
}
|
|
9
|
+
/** Re-renders on every edit. Prefer `engine.getTemplateData()` when reading at event time. */
|
|
10
|
+
export declare function useTemplateData(owner: BlockDataStoreOwner): TemplateData;
|
|
11
|
+
/** The selector must return a primitive or a stable reference; a new object each call loops forever. */
|
|
12
|
+
export declare function useTemplateDataSelector<T>(owner: BlockDataStoreOwner, selector: (data: TemplateData) => T): T;
|
|
13
|
+
//# sourceMappingURL=useBlockData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBlockData.d.ts","sourceRoot":"","sources":["../../../src/editor/state/useBlockData.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEtD,eAAO,MAAM,qBAAqB,gDAA6C,CAAA;AAE/E,wBAAgB,iBAAiB,IAAI,cAAc,CAQlD;AAED,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAOxF;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,cAAc,CAAA;CACtB;AAED,8FAA8F;AAC9F,wBAAgB,eAAe,CAAC,KAAK,EAAE,mBAAmB,GAAG,YAAY,CAGxE;AAED,wGAAwG;AACxG,wBAAgB,uBAAuB,CAAC,CAAC,EACvC,KAAK,EAAE,mBAAmB,EAC1B,QAAQ,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,CAAC,GAClC,CAAC,CAGH"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { BlockRegistry, LayoutNode, TemplateData } from '../../registry';
|
|
2
2
|
import { TrayDropTarget, TreePath } from '../document/utils';
|
|
3
|
-
import { ActivitySnapshot } from '../history/types';
|
|
3
|
+
import { ActivitySnapshot, UndoRedoHistory } from '../history/types';
|
|
4
4
|
import { TemplatePatch } from './applyTemplatePatch';
|
|
5
|
+
import { BlockDataStore } from './blockDataStore';
|
|
6
|
+
import { SelectionStore } from './selectionStore';
|
|
5
7
|
export interface AddComponentResult {
|
|
6
8
|
componentId: string;
|
|
7
9
|
componentType: string;
|
|
@@ -28,9 +30,12 @@ export interface UseBlockEditorStateOptions {
|
|
|
28
30
|
registry: BlockRegistry;
|
|
29
31
|
}
|
|
30
32
|
export interface UseBlockEditorStateReturn {
|
|
31
|
-
|
|
33
|
+
store: BlockDataStore;
|
|
34
|
+
getTemplateData: () => TemplateData;
|
|
32
35
|
templateLayout: LayoutNode[];
|
|
33
|
-
|
|
36
|
+
/** Hand to `GridDndProvider` / `DesignerArea`, like `store`. */
|
|
37
|
+
selection: SelectionStore;
|
|
38
|
+
getSelectedComponentId: () => string | null;
|
|
34
39
|
setSelectedComponentId: (id: string | null) => void;
|
|
35
40
|
addComponent: (componentType: string, dropTarget?: TrayDropTarget, propsOverride?: Record<string, unknown>) => AddComponentResult | null;
|
|
36
41
|
changeComponent: (updatedProp: Record<string, unknown>, nodeId?: string) => void;
|
|
@@ -48,9 +53,9 @@ export interface UseBlockEditorStateReturn {
|
|
|
48
53
|
undoRedo: {
|
|
49
54
|
onUndo: () => void;
|
|
50
55
|
onRedo: () => void;
|
|
51
|
-
canUndo: boolean;
|
|
52
|
-
canRedo: boolean;
|
|
53
56
|
};
|
|
57
|
+
/** Read the flags with `useUndoRedoState(engine)`, so only the undo/redo controls re-render. */
|
|
58
|
+
history: UndoRedoHistory;
|
|
54
59
|
clearHistory: (newPresent?: ActivitySnapshot) => void;
|
|
55
60
|
}
|
|
56
61
|
export declare function useBlockEditorState({ initialData, initialLayout, onDirty, historyLimit, registry, }: UseBlockEditorStateOptions): UseBlockEditorStateReturn;
|
|
@@ -1 +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;
|
|
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,E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AC3B,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;KACnB,CAAA;IACD,gGAAgG;IAChG,OAAO,EAAE,eAAe,CAAA;IAExB,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,CA2WxD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UndoRedoHistory } from '../history/types';
|
|
2
|
+
export interface UndoRedoHistoryOwner {
|
|
3
|
+
history: UndoRedoHistory;
|
|
4
|
+
}
|
|
5
|
+
export declare function useUndoRedoState(owner: UndoRedoHistoryOwner): {
|
|
6
|
+
canUndo: boolean;
|
|
7
|
+
canRedo: boolean;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=useUndoRedoState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUndoRedoState.d.ts","sourceRoot":"","sources":["../../../src/editor/state/useUndoRedoState.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAEvD,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,eAAe,CAAA;CACzB;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,oBAAoB,GAAG;IAC7D,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;CACjB,CAKA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUndoRedoState.test.d.ts","sourceRoot":"","sources":["../../../src/editor/state/useUndoRedoState.test.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export * from './components/blocks/TabsBlock';
|
|
|
9
9
|
export * from './components/blocks/FlashCards';
|
|
10
10
|
export * from './components/blocks/MixAndMatch';
|
|
11
11
|
export * from './components/blocks/KnowledgeCheck';
|
|
12
|
-
export * from './components/blocks/LayoutContainer';
|
|
13
12
|
export * from './components/blocks/TwoColumn';
|
|
14
13
|
export * from './components/blocks/WidgetBlock';
|
|
15
14
|
export { HeaderStyleSchema, type HeaderStyle } from './components/blocks/commonSchemas';
|
|
@@ -21,6 +20,7 @@ export { BlockEditorApiContext, BlockEditorApiProvider, useCreateFile, useDelete
|
|
|
21
20
|
export { BrandColorContext, useBrandColor } from './contexts/BrandColorContext';
|
|
22
21
|
export { DesignerModeContext, useDesignerMode } from './contexts/DesignerModeContext';
|
|
23
22
|
export { AIActionContext, useAIAction, type AIAction, type AIToolUse, type AIToolResult, type AIToolResultJsonContent, type AIToolResultTextContent, } from './contexts/AIActionContext';
|
|
23
|
+
export { NutritionFactsContext, useNutritionFacts, type BlockAINutritionFacts, } from './contexts/NutritionFactsContext';
|
|
24
24
|
export { RichTextRendererContext, useRichTextRenderer, type RichTextRenderer, } from './contexts/RichTextRendererContext';
|
|
25
25
|
export { RichTextEditorContext, useRichTextEditor, type RichTextEditorComponent, type RichTextEditorProps, } from './contexts/RichTextEditorContext';
|
|
26
26
|
export * from './schema';
|
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
|
|
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,+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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