@juo/blocks 1.13.0-alpha.2 → 1.14.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/dist/ExtensionRoot-CRJx0Dtr.js +378 -0
- package/dist/block.d.ts +0 -50
- package/dist/block.d.ts.map +1 -1
- package/dist/{bridge-r7Yk8fjY.js → bridge-D838SWmN.js} +147 -42
- package/dist/context.d.ts.map +1 -1
- package/dist/core.js +1120 -2157
- package/dist/css-runtime-DWytAzZ5.js +1532 -0
- package/dist/editor/bridge.d.ts +8 -7
- package/dist/editor/bridge.d.ts.map +1 -1
- package/dist/editor/canvas-mode-signal.d.ts +22 -0
- package/dist/editor/canvas-mode-signal.d.ts.map +1 -0
- package/dist/editor/canvas-mode.d.ts +15 -0
- package/dist/editor/canvas-mode.d.ts.map +1 -0
- package/dist/editor/canvas-mode.test.d.ts +2 -0
- package/dist/editor/canvas-mode.test.d.ts.map +1 -0
- package/dist/editor/components.d.ts +113 -0
- package/dist/editor/components.d.ts.map +1 -1
- package/dist/editor/components.test.d.ts.map +1 -1
- package/dist/editor/handler.d.ts.map +1 -1
- package/dist/editor/handler.test.d.ts +2 -0
- package/dist/editor/handler.test.d.ts.map +1 -0
- package/dist/editor/layout-command-emitter.d.ts +31 -0
- package/dist/editor/layout-command-emitter.d.ts.map +1 -0
- package/dist/editor/layout-command-emitter.test.d.ts +2 -0
- package/dist/editor/layout-command-emitter.test.d.ts.map +1 -0
- package/dist/editor/layout-system-signal.d.ts +21 -0
- package/dist/editor/layout-system-signal.d.ts.map +1 -0
- package/dist/editor/main.d.ts +2 -2
- package/dist/editor/main.d.ts.map +1 -1
- package/dist/editor/messages.d.ts +90 -14
- package/dist/editor/messages.d.ts.map +1 -1
- package/dist/editor/surface-context.d.ts +7 -0
- package/dist/editor/surface-context.d.ts.map +1 -0
- package/dist/editor/surface-context.test.d.ts +2 -0
- package/dist/editor/surface-context.test.d.ts.map +1 -0
- package/dist/editor/wrapper-shared.d.ts +31 -0
- package/dist/editor/wrapper-shared.d.ts.map +1 -0
- package/dist/editor.js +887 -88
- package/dist/flows/WorkflowService.d.ts +2 -0
- package/dist/flows/WorkflowService.d.ts.map +1 -1
- package/dist/gridstack-adapter-DreG3XnB.js +5490 -0
- package/dist/layout/css-runtime.d.ts +41 -0
- package/dist/layout/css-runtime.d.ts.map +1 -0
- package/dist/layout/css-runtime.test.d.ts +2 -0
- package/dist/layout/css-runtime.test.d.ts.map +1 -0
- package/dist/layout/derive.d.ts +4 -0
- package/dist/layout/derive.d.ts.map +1 -0
- package/dist/layout/derive.test.d.ts +2 -0
- package/dist/layout/derive.test.d.ts.map +1 -0
- package/dist/layout/dividers.d.ts +34 -0
- package/dist/layout/dividers.d.ts.map +1 -0
- package/dist/layout/dividers.test.d.ts +2 -0
- package/dist/layout/dividers.test.d.ts.map +1 -0
- package/dist/layout/engine.d.ts +3 -0
- package/dist/layout/engine.d.ts.map +1 -0
- package/dist/layout/engine.test.d.ts +2 -0
- package/dist/layout/engine.test.d.ts.map +1 -0
- package/dist/layout/grid-utils.d.ts +57 -0
- package/dist/layout/grid-utils.d.ts.map +1 -0
- package/dist/layout/grid-utils.test.d.ts +2 -0
- package/dist/layout/grid-utils.test.d.ts.map +1 -0
- package/dist/layout/index.d.ts +12 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout/index.test.d.ts +2 -0
- package/dist/layout/index.test.d.ts.map +1 -0
- package/dist/layout/insert.d.ts +31 -0
- package/dist/layout/insert.d.ts.map +1 -0
- package/dist/layout/insert.test.d.ts +2 -0
- package/dist/layout/insert.test.d.ts.map +1 -0
- package/dist/layout/project-css.d.ts +6 -0
- package/dist/layout/project-css.d.ts.map +1 -0
- package/dist/layout/project-css.test.d.ts +2 -0
- package/dist/layout/project-css.test.d.ts.map +1 -0
- package/dist/layout/project-gridstack.d.ts +50 -0
- package/dist/layout/project-gridstack.d.ts.map +1 -0
- package/dist/layout/project-gridstack.test.d.ts +2 -0
- package/dist/layout/project-gridstack.test.d.ts.map +1 -0
- package/dist/layout/reconcile.d.ts +22 -0
- package/dist/layout/reconcile.d.ts.map +1 -0
- package/dist/layout/reconcile.test.d.ts +2 -0
- package/dist/layout/reconcile.test.d.ts.map +1 -0
- package/dist/layout/types.d.ts +118 -0
- package/dist/layout/types.d.ts.map +1 -0
- package/dist/layout-mode-adapter-BBd4JRQd.js +21 -0
- package/dist/main.d.ts +8 -4
- package/dist/main.d.ts.map +1 -1
- package/dist/morph-Dj-xvrwt.js +182 -0
- package/dist/preact.js +1 -1
- package/dist/project-gridstack-DYLMKSH1.js +52 -0
- package/dist/react.js +1 -1
- package/dist/services/customer/customerService.d.ts +2 -3
- package/dist/services/customer/customerService.d.ts.map +1 -1
- package/dist/services/customer/index.d.ts +0 -1
- package/dist/services/customer/index.d.ts.map +1 -1
- package/dist/services/customer/types.d.ts +1 -4
- package/dist/services/customer/types.d.ts.map +1 -1
- package/dist/services/index.d.ts +0 -3
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/login/index.d.ts +1 -3
- package/dist/services/login/index.d.ts.map +1 -1
- package/dist/services/login/loginService.d.ts +2 -6
- package/dist/services/login/loginService.d.ts.map +1 -1
- package/dist/services/orders/adapter.d.ts +0 -2
- package/dist/services/orders/adapter.d.ts.map +1 -1
- package/dist/services/orders/index.d.ts +1 -1
- package/dist/services/orders/index.d.ts.map +1 -1
- package/dist/services/product/adapter.d.ts +2 -27
- package/dist/services/product/adapter.d.ts.map +1 -1
- package/dist/services/product/index.d.ts +1 -1
- package/dist/services/product/index.d.ts.map +1 -1
- package/dist/services/product/productService.d.ts.map +1 -1
- package/dist/services/product/types.d.ts +0 -68
- package/dist/services/product/types.d.ts.map +1 -1
- package/dist/services/subscription/adapter.d.ts +2 -77
- package/dist/services/subscription/adapter.d.ts.map +1 -1
- package/dist/services/subscription/index.d.ts +1 -1
- package/dist/services/subscription/index.d.ts.map +1 -1
- package/dist/services/subscription/subscriptionService.d.ts +6 -1
- package/dist/services/subscription/subscriptionService.d.ts.map +1 -1
- package/dist/services/subscription/types.d.ts +9 -220
- package/dist/services/subscription/types.d.ts.map +1 -1
- package/dist/theme-state.d.ts +17 -2
- package/dist/theme-state.d.ts.map +1 -1
- package/dist/theme-state.layout.test.d.ts +2 -0
- package/dist/theme-state.layout.test.d.ts.map +1 -0
- package/dist/theme-state.test.d.ts +2 -0
- package/dist/theme-state.test.d.ts.map +1 -0
- package/dist/utils/index.d.ts +0 -6
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/vue/block.d.ts.map +1 -1
- package/dist/vue.js +4 -25
- package/dist/web-components/ExtensionRoot.d.ts +50 -3
- package/dist/web-components/ExtensionRoot.d.ts.map +1 -1
- package/dist/web-components/editor/ExtensionRoot.d.ts +11 -0
- package/dist/web-components/editor/ExtensionRoot.d.ts.map +1 -0
- package/dist/web-components/editor/ExtensionRoot.test.d.ts +2 -0
- package/dist/web-components/editor/ExtensionRoot.test.d.ts.map +1 -0
- package/dist/web-components/editor/InlineText.d.ts +1 -0
- package/dist/web-components/editor/InlineText.d.ts.map +1 -1
- package/dist/web-components/editor/editor-layout-controller.d.ts +28 -0
- package/dist/web-components/editor/editor-layout-controller.d.ts.map +1 -0
- package/dist/web-components/editor/gridstack-adapter.d.ts +3 -0
- package/dist/web-components/editor/gridstack-adapter.d.ts.map +1 -0
- package/dist/web-components/editor/gridstack-adapter.test.d.ts +2 -0
- package/dist/web-components/editor/gridstack-adapter.test.d.ts.map +1 -0
- package/dist/web-components/editor/morph.d.ts +32 -0
- package/dist/web-components/editor/morph.d.ts.map +1 -0
- package/dist/web-components/editor/morph.test.d.ts +2 -0
- package/dist/web-components/editor/morph.test.d.ts.map +1 -0
- package/dist/web-components/layout/layout-controller.d.ts +55 -0
- package/dist/web-components/layout/layout-controller.d.ts.map +1 -0
- package/dist/web-components/layout/view-layout-controller.d.ts +17 -0
- package/dist/web-components/layout/view-layout-controller.d.ts.map +1 -0
- package/dist/web-components/layout/view-layout-controller.test.d.ts +2 -0
- package/dist/web-components/layout/view-layout-controller.test.d.ts.map +1 -0
- package/dist/web-components/layout-grid.d.ts +47 -0
- package/dist/web-components/layout-grid.d.ts.map +1 -0
- package/dist/web-components/layout-grid.test.d.ts +2 -0
- package/dist/web-components/layout-grid.test.d.ts.map +1 -0
- package/dist/web-components/layout-mode-adapter.d.ts +51 -0
- package/dist/web-components/layout-mode-adapter.d.ts.map +1 -0
- package/dist/web-components/layout-mode-adapter.test.d.ts +2 -0
- package/dist/web-components/layout-mode-adapter.test.d.ts.map +1 -0
- package/dist/web-components-editor.js +125 -18
- package/dist/web-components-runtime.js +4 -4
- package/package.json +3 -2
- package/dist/ExtensionRoot-peABLAZZ.js +0 -231
- package/dist/block-B6s9jL7l.js +0 -966
- package/dist/block.devtools.test.d.ts +0 -2
- package/dist/block.devtools.test.d.ts.map +0 -1
- package/dist/context.devtools.test.d.ts +0 -2
- package/dist/context.devtools.test.d.ts.map +0 -1
- package/dist/devtools/env.d.ts +0 -3
- package/dist/devtools/env.d.ts.map +0 -1
- package/dist/devtools/hook.d.ts +0 -35
- package/dist/devtools/hook.d.ts.map +0 -1
- package/dist/devtools/index.d.ts +0 -4
- package/dist/devtools/index.d.ts.map +0 -1
- package/dist/devtools/protocol.d.ts +0 -91
- package/dist/devtools/protocol.d.ts.map +0 -1
- package/dist/devtools.js +0 -44
- package/dist/editor/overlays.d.ts +0 -14
- package/dist/editor/overlays.d.ts.map +0 -1
- package/dist/editor/overlays.test.d.ts +0 -2
- package/dist/editor/overlays.test.d.ts.map +0 -1
- package/dist/juo-workflow-DY4rd256.js +0 -868
- package/dist/overlay-wrapper.d.ts +0 -69
- package/dist/overlay-wrapper.d.ts.map +0 -1
- package/dist/overlay-wrapper.test.d.ts +0 -2
- package/dist/overlay-wrapper.test.d.ts.map +0 -1
- package/dist/overlays/OverlayService.d.ts +0 -34
- package/dist/overlays/OverlayService.d.ts.map +0 -1
- package/dist/overlays/OverlayService.test.d.ts +0 -2
- package/dist/overlays/OverlayService.test.d.ts.map +0 -1
- package/dist/registry.devtools.test.d.ts +0 -2
- package/dist/registry.devtools.test.d.ts.map +0 -1
- package/dist/services/customer/adapter.d.ts +0 -8
- package/dist/services/customer/adapter.d.ts.map +0 -1
- package/dist/services/login/adapter.d.ts +0 -32
- package/dist/services/login/adapter.d.ts.map +0 -1
- package/dist/services/order/adapter.d.ts +0 -9
- package/dist/services/order/adapter.d.ts.map +0 -1
- package/dist/services/order/index.d.ts +0 -5
- package/dist/services/order/index.d.ts.map +0 -1
- package/dist/services/order/orderService.d.ts +0 -7
- package/dist/services/order/orderService.d.ts.map +0 -1
- package/dist/services/order/types.d.ts +0 -21
- package/dist/services/order/types.d.ts.map +0 -1
- package/dist/services/product/adapter.test.d.ts +0 -2
- package/dist/services/product/adapter.test.d.ts.map +0 -1
- package/dist/services/schedules/adapter.d.ts +0 -71
- package/dist/services/schedules/adapter.d.ts.map +0 -1
- package/dist/services/schedules/adapter.test.d.ts +0 -2
- package/dist/services/schedules/adapter.test.d.ts.map +0 -1
- package/dist/services/schedules/index.d.ts +0 -5
- package/dist/services/schedules/index.d.ts.map +0 -1
- package/dist/services/schedules/schedulesService.d.ts +0 -11
- package/dist/services/schedules/schedulesService.d.ts.map +0 -1
- package/dist/services/schedules/schedulesService.test.d.ts +0 -2
- package/dist/services/schedules/schedulesService.test.d.ts.map +0 -1
- package/dist/services/schedules/types.d.ts +0 -226
- package/dist/services/schedules/types.d.ts.map +0 -1
- package/dist/services/settings/index.d.ts +0 -3
- package/dist/services/settings/index.d.ts.map +0 -1
- package/dist/services/settings/settingsService.d.ts +0 -7
- package/dist/services/settings/settingsService.d.ts.map +0 -1
- package/dist/services/settings/settingsService.test.d.ts +0 -2
- package/dist/services/settings/settingsService.test.d.ts.map +0 -1
- package/dist/services/settings/types.d.ts +0 -35
- package/dist/services/settings/types.d.ts.map +0 -1
- package/dist/services/shop/index.d.ts +0 -3
- package/dist/services/shop/index.d.ts.map +0 -1
- package/dist/services/shop/shopService.d.ts +0 -12
- package/dist/services/shop/shopService.d.ts.map +0 -1
- package/dist/services/shop/shopService.test.d.ts +0 -2
- package/dist/services/shop/shopService.test.d.ts.map +0 -1
- package/dist/services/shop/types.d.ts +0 -7
- package/dist/services/shop/types.d.ts.map +0 -1
- package/dist/services/subscription/adapter.test.d.ts +0 -2
- package/dist/services/subscription/adapter.test.d.ts.map +0 -1
- package/dist/services/subscription/types.test.d.ts +0 -2
- package/dist/services/subscription/types.test.d.ts.map +0 -1
- package/dist/theme-state.params.test.d.ts +0 -2
- package/dist/theme-state.params.test.d.ts.map +0 -1
- package/dist/theme-state.translations.test.d.ts +0 -2
- package/dist/theme-state.translations.test.d.ts.map +0 -1
package/dist/editor/bridge.d.ts
CHANGED
|
@@ -52,13 +52,6 @@ export interface EditorBridge {
|
|
|
52
52
|
onMessage: (handler: (message: EditorMessage) => void) => {
|
|
53
53
|
unsubscribe: () => void;
|
|
54
54
|
};
|
|
55
|
-
/**
|
|
56
|
-
* Current selected block id (the last SELECT_BLOCK, from either the parent or
|
|
57
|
-
* a local optimistic click). `onMessage` is fire-and-forget — it does not
|
|
58
|
-
* replay — so components that mount AFTER a selection was made read it here to
|
|
59
|
-
* sync their initial state instead of waiting for a message they already missed.
|
|
60
|
-
*/
|
|
61
|
-
getSelectedBlockId: () => string | null;
|
|
62
55
|
onBlockPresetChange<TPresets = unknown>(blockId: string, callback: (preset: PresetData<ExtractPresetState<TPresets>, ExtractPresetContext<TPresets>> | null) => void): {
|
|
63
56
|
unsubscribe: () => void;
|
|
64
57
|
};
|
|
@@ -68,6 +61,14 @@ export interface EditorBridge {
|
|
|
68
61
|
upsertThemeState: (surface: ThemeSurface, id: string, blocks: Block[]) => void;
|
|
69
62
|
requestTranslationOverrides: (locale: string) => Promise<TranslationOverride[]>;
|
|
70
63
|
requestGlobalStyles: () => Promise<GlobalStyles>;
|
|
64
|
+
/**
|
|
65
|
+
* Preserve the iframe scroll position across a re-render that transiently
|
|
66
|
+
* collapses content height (e.g. toggling layout mode). Capture is synchronous,
|
|
67
|
+
* so call this BEFORE triggering the re-render; the position is restored once
|
|
68
|
+
* layout settles, with scroll-report echoes suppressed so the parent isn't
|
|
69
|
+
* dragged to the transient clamped (top) position.
|
|
70
|
+
*/
|
|
71
|
+
preserveScrollAcrossReflow: () => void;
|
|
71
72
|
/**
|
|
72
73
|
* Tears down the bridge: removes event listeners, rejects pending requests,
|
|
73
74
|
* clears message handlers, and resets the singleton so a new bridge can be created.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../../src/editor/bridge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EAGd,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../../src/editor/bridge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EAGd,MAAM,YAAY,CAAC;AAapB,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AAGtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,MAAM,WAAW,UAAU,CACzB,MAAM,GAAG,OAAO,EAChB,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAElC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,QAAQ,CAAC;CACnB;AAED,MAAM,MAAM,kBAAkB,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,QAAQ,CAAC,SAAS;IAC1E,KAAK,EAAE,MAAM,CAAC,CAAC;CAChB,GACG,CAAC,GACD,KAAK,CAAC;AAEV,MAAM,MAAM,oBAAoB,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,QAAQ,CAAC,SAAS;IAC5E,OAAO,EAAE,MAAM,CAAC,CAAC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signals-core';
|
|
2
|
+
/**
|
|
3
|
+
* Iframe-side flag: is the editor canvas currently in layouting mode?
|
|
4
|
+
*
|
|
5
|
+
* `ExtensionRoot` reads this reactively; when on AND the host opts into
|
|
6
|
+
* grid-layout AND a LayoutDocument exists AND a LayoutModeAdapter is
|
|
7
|
+
* registered, rendering is delegated to the adapter instead of the CSS Grid
|
|
8
|
+
* path.
|
|
9
|
+
*
|
|
10
|
+
* Owned by core (`@juo/blocks`) so it is a SINGLE shared instance across the
|
|
11
|
+
* separately-loaded production bundles. The arrange handle / `enterLayout`
|
|
12
|
+
* live in `editor.js` and write this; `ExtensionRoot` lives in
|
|
13
|
+
* `web-components-editor.js` and subscribes to it. Because `@juo/blocks` is
|
|
14
|
+
* `external` in the build, both bundles resolve this import to the one copy in
|
|
15
|
+
* `core.js` — the same mechanism `themeState` and the re-exported signals
|
|
16
|
+
* runtime already rely on to cross the bundle boundary. It lives in its own
|
|
17
|
+
* dependency-free module (no editor `bridge` import) so owning it in core does
|
|
18
|
+
* not pull editor-only code into `core.js`; the bridge-dependent behavior
|
|
19
|
+
* (`setCanvasMode`/`resetCanvasMode`) stays in `./canvas-mode`.
|
|
20
|
+
*/
|
|
21
|
+
export declare const canvasMode: Signal<boolean>;
|
|
22
|
+
//# sourceMappingURL=canvas-mode-signal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canvas-mode-signal.d.ts","sourceRoot":"","sources":["../../src/editor/canvas-mode-signal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAU,MAAM,sBAAsB,CAAC;AAE3D;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,OAAO,CAA0B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { canvasMode } from '../main.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Editor-side behavior for the canvas layouting flag.
|
|
4
|
+
*
|
|
5
|
+
* The `canvasMode` signal itself is owned by core (`./canvas-mode-signal`,
|
|
6
|
+
* re-exported from `@juo/blocks`) so it is a single shared instance across the
|
|
7
|
+
* separately-loaded `editor.js` / `web-components-editor.js` bundles. This
|
|
8
|
+
* module only holds the mutators, which depend on the editor `bridge` and must
|
|
9
|
+
* therefore stay out of `core.js`. It re-exports `canvasMode` so existing
|
|
10
|
+
* importers of `./canvas-mode` keep working.
|
|
11
|
+
*/
|
|
12
|
+
export { canvasMode };
|
|
13
|
+
export declare function setCanvasMode(enabled: boolean): void;
|
|
14
|
+
export declare function resetCanvasMode(): void;
|
|
15
|
+
//# sourceMappingURL=canvas-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canvas-mode.d.ts","sourceRoot":"","sources":["../../src/editor/canvas-mode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC;;;;;;;;;GASG;AACH,OAAO,EAAE,UAAU,EAAE,CAAC;AAEtB,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAOpD;AAED,wBAAgB,eAAe,IAAI,IAAI,CAEtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canvas-mode.test.d.ts","sourceRoot":"","sources":["../../src/editor/canvas-mode.test.ts"],"names":[],"mappings":""}
|
|
@@ -51,4 +51,117 @@ declare global {
|
|
|
51
51
|
"juo-editor-block-wrapper": BlockWrapper;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
+
export declare class LayoutBlockWrapper extends HTMLElement {
|
|
55
|
+
private block;
|
|
56
|
+
private editorBridge;
|
|
57
|
+
private skeletonTitle;
|
|
58
|
+
private skeletonLines;
|
|
59
|
+
private skeletonResizeObserver;
|
|
60
|
+
private toolbar;
|
|
61
|
+
private toolbarRafId;
|
|
62
|
+
private toolbarScrollListening;
|
|
63
|
+
private hoverOutlineTarget;
|
|
64
|
+
private selectionOutlineTarget;
|
|
65
|
+
static get observedAttributes(): string[];
|
|
66
|
+
attributeChangedCallback(name: string): void;
|
|
67
|
+
private skeletonRafId;
|
|
68
|
+
private scheduleSkeletonRecompute;
|
|
69
|
+
constructor();
|
|
70
|
+
private setupTemplate;
|
|
71
|
+
/**
|
|
72
|
+
* Build the center hover toolbar. Buttons (left→right): layout toggle (grip,
|
|
73
|
+
* leading), add-below, delete, fill-horizontal.
|
|
74
|
+
* pointerdown/click are stopped at the container so selecting a tool never
|
|
75
|
+
* bubbles to the bridge's global-click selection.
|
|
76
|
+
*/
|
|
77
|
+
private buildToolbar;
|
|
78
|
+
private createToolButton;
|
|
79
|
+
/**
|
|
80
|
+
* Pointerdown on the layout toggle grip.
|
|
81
|
+
*
|
|
82
|
+
* - View mode: "arm" layout mode — the canvas morphs into GridStack, after
|
|
83
|
+
* which the merchant drags/resizes natively. Passing THIS element (not its
|
|
84
|
+
* id) lets the morph controller scroll + pop the exact block grabbed.
|
|
85
|
+
* stopPropagation keeps the bridge's global-click selection — and the morph
|
|
86
|
+
* controller's click-away exit — from also firing.
|
|
87
|
+
* - Layout mode: the grip IS GridStack's drag handle, so we do nothing here and
|
|
88
|
+
* let the event fall through. GridStack starts the drag off `mousedown` (a
|
|
89
|
+
* separate event from this `pointerdown`), so it is unaffected by the
|
|
90
|
+
* toolbar's pointerdown stop; toggling back to view would abort the drag
|
|
91
|
+
* before it begins.
|
|
92
|
+
*/
|
|
93
|
+
private handleMorphGrab;
|
|
94
|
+
/** Open the add-block menu anchored to the toolbar button, inserting AFTER. */
|
|
95
|
+
private handleAddBelow;
|
|
96
|
+
/**
|
|
97
|
+
* Traverse up the DOM (crossing shadow-root boundaries) to resolve the
|
|
98
|
+
* containing block wrapper's id, then send REMOVE_BLOCK. Mirrors the legacy
|
|
99
|
+
* wrapper's removal, but recognizes either wrapper tag (grid nesting uses the
|
|
100
|
+
* layout wrapper).
|
|
101
|
+
*/
|
|
102
|
+
private handleRemoveBlock;
|
|
103
|
+
/** Resolve the parent element, crossing shadow-root boundaries. */
|
|
104
|
+
private getParentElement;
|
|
105
|
+
/**
|
|
106
|
+
* Toggle the block's sticky fill flag. Emitted as a layout command; the parent
|
|
107
|
+
* engine flips the flag, expands the block into its free row-band space, pushes
|
|
108
|
+
* the change to history + re-syncs the iframe.
|
|
109
|
+
*/
|
|
110
|
+
private handleFillWidth;
|
|
111
|
+
connectedCallback(): void;
|
|
112
|
+
disconnectedCallback(): void;
|
|
113
|
+
private handleHoverEnter;
|
|
114
|
+
private handleHoverLeave;
|
|
115
|
+
/**
|
|
116
|
+
* Center the toolbar on the block's VISIBLE portion so it stays reachable when
|
|
117
|
+
* the block is taller than / partially scrolled out of the viewport. When the
|
|
118
|
+
* block is fully on screen this equals its geometric center.
|
|
119
|
+
*/
|
|
120
|
+
private positionToolbar;
|
|
121
|
+
private startToolbarTracking;
|
|
122
|
+
private stopToolbarTracking;
|
|
123
|
+
private scheduleToolbarReposition;
|
|
124
|
+
private paintTarget;
|
|
125
|
+
private updateActiveState;
|
|
126
|
+
/**
|
|
127
|
+
* Height-tiers for the placeholder bar count. Deliberately sparse: the bars
|
|
128
|
+
* are a hint at "a block lives here", not a faithful line count, so we show
|
|
129
|
+
* few and cap hard to avoid a noisy wall of identical bars on tall blocks.
|
|
130
|
+
* Cells too short for >= 2 bars render header-only (no lonely single bar).
|
|
131
|
+
*/
|
|
132
|
+
private static readonly SKELETON_LINE_H;
|
|
133
|
+
private static readonly SKELETON_GAP;
|
|
134
|
+
private static readonly SKELETON_MAX_BARS;
|
|
135
|
+
/**
|
|
136
|
+
* Per-block width sequence. Widths are read from this palette starting at a
|
|
137
|
+
* block-type-seeded offset so neighbouring blocks of different types get a
|
|
138
|
+
* different width rhythm (deterministic — the same block type always renders
|
|
139
|
+
* the same sequence). Chosen to look like varied text lines, none too short.
|
|
140
|
+
*/
|
|
141
|
+
private static readonly SKELETON_BAR_WIDTHS;
|
|
142
|
+
/**
|
|
143
|
+
* Match the placeholder bars to the (dynamic) cell height. Bars are a fixed
|
|
144
|
+
* height with a uniform gap and stay top-aligned under the header, so every
|
|
145
|
+
* skeleton reads identically. The count scales gently with height but is
|
|
146
|
+
* halved and capped so tall cells don't fill with noise; very short cells
|
|
147
|
+
* (< 2 bars) drop the bars entirely and show just the header. Count depends
|
|
148
|
+
* only on the cell height (not on the bars), so there is no measure→mutate
|
|
149
|
+
* feedback loop.
|
|
150
|
+
*/
|
|
151
|
+
private recomputeSkeletonLines;
|
|
152
|
+
/**
|
|
153
|
+
* Stable offset into {@link LayoutBlockWrapper.SKELETON_BAR_WIDTHS} derived
|
|
154
|
+
* from the block type, so each block type has its own width rhythm and
|
|
155
|
+
* adjacent (differently-typed) blocks don't line up.
|
|
156
|
+
*/
|
|
157
|
+
private skeletonWidthOffset;
|
|
158
|
+
/** Assign each bar its width from the block-type-seeded sequence. */
|
|
159
|
+
private applyBarWidths;
|
|
160
|
+
setBlock(block: BlockInstance): void;
|
|
161
|
+
}
|
|
162
|
+
declare global {
|
|
163
|
+
interface HTMLElementTagNameMap {
|
|
164
|
+
"juo-editor-layout-block-wrapper": LayoutBlockWrapper;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
54
167
|
//# sourceMappingURL=components.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../src/editor/components.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../src/editor/components.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AA+jB9C,qBAAa,YAAa,SAAQ,WAAW;IAC3C,OAAO,CAAC,KAAK,CAA8B;IAC3C,OAAO,CAAC,YAAY,CAAwB;IAC5C,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,UA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"version":3,"file":"components.test.d.ts","sourceRoot":"","sources":["../../src/editor/components.test.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"components.test.d.ts","sourceRoot":"","sources":["../../src/editor/components.test.ts"],"names":[],"mappings":"AAGA,OAAO,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../src/editor/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../src/editor/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAKL,KAAK,UAAU,EAEhB,MAAM,aAAa,CAAC;AAGrB,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,UAAU,CAAC;IACvB,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CACrD;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,oBAAoB;6BAsE/B,aAAa;EAgU9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.test.d.ts","sourceRoot":"","sources":["../../src/editor/handler.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { GridRect, LayoutCommand } from '../layout';
|
|
2
|
+
import { ThemeSurface } from '../theme-state';
|
|
3
|
+
/**
|
|
4
|
+
* Payload the editor canvas adapter emits to the parent when a gesture
|
|
5
|
+
* commits. Translates to a LAYOUT_COMMAND { kind: "setRects" } message
|
|
6
|
+
* over the editor bridge.
|
|
7
|
+
*/
|
|
8
|
+
export type LayoutSetRectsEvent = {
|
|
9
|
+
surface: ThemeSurface;
|
|
10
|
+
id: string;
|
|
11
|
+
rects: Record<string, GridRect>;
|
|
12
|
+
};
|
|
13
|
+
export type LayoutCommandEmitter = (event: LayoutSetRectsEvent) => void;
|
|
14
|
+
export declare function setLayoutCommandEmitter(emitter: LayoutCommandEmitter | null): void;
|
|
15
|
+
export declare function emitLayoutSetRects(event: LayoutSetRectsEvent): void;
|
|
16
|
+
/**
|
|
17
|
+
* Payload for emitting an arbitrary {@link LayoutCommand} (e.g. `fillWidth`
|
|
18
|
+
* from the block toolbar). Translates to a LAYOUT_COMMAND message carrying the
|
|
19
|
+
* command verbatim, so the parent engine resolves grid context (cols) and
|
|
20
|
+
* history. Kept as a separate dispatcher from the setRects emitter above so the
|
|
21
|
+
* gesture-commit fast path stays untouched.
|
|
22
|
+
*/
|
|
23
|
+
export type LayoutCommandEvent = {
|
|
24
|
+
surface: ThemeSurface;
|
|
25
|
+
id: string;
|
|
26
|
+
command: LayoutCommand;
|
|
27
|
+
};
|
|
28
|
+
export type LayoutCommandDispatcher = (event: LayoutCommandEvent) => void;
|
|
29
|
+
export declare function setLayoutCommandDispatcher(dispatcher: LayoutCommandDispatcher | null): void;
|
|
30
|
+
export declare function emitLayoutCommand(event: LayoutCommandEvent): void;
|
|
31
|
+
//# sourceMappingURL=layout-command-emitter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-command-emitter.d.ts","sourceRoot":"","sources":["../../src/editor/layout-command-emitter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,YAAY,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;AAcxE,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,oBAAoB,GAAG,IAAI,GACnC,IAAI,CAEN;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI,CAEnE;AAED;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,YAAY,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,aAAa,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;AAI1E,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,uBAAuB,GAAG,IAAI,GACzC,IAAI,CAEN;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI,CAEjE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-command-emitter.test.d.ts","sourceRoot":"","sources":["../../src/editor/layout-command-emitter.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Signal } from '@preact/signals-core';
|
|
2
|
+
/**
|
|
3
|
+
* Iframe/editor-side flag: is the active theme using the grid-based layout
|
|
4
|
+
* engine (`GlobalStyles.layoutEngine === "grid-v1"`)?
|
|
5
|
+
*
|
|
6
|
+
* Drives wrapper selection at block-creation time: `withWrapper`
|
|
7
|
+
* (`blocks/core/src/block.ts`) and the editor's `handleBlockWrapperRender`
|
|
8
|
+
* (`blocks/editor/lib/Editor.ce.vue`) create the minimal
|
|
9
|
+
* `juo-editor-layout-block-wrapper` when this is `true`, and the classic
|
|
10
|
+
* `juo-editor-block-wrapper` otherwise.
|
|
11
|
+
*
|
|
12
|
+
* Owned by core (`@juo/blocks`) so it is a SINGLE shared instance across the
|
|
13
|
+
* separately-loaded production bundles — the same cross-bundle mechanism used
|
|
14
|
+
* by `canvasMode` (see `./canvas-mode-signal`). It lives in its own
|
|
15
|
+
* dependency-free module so owning it in core doesn't pull editor-only code
|
|
16
|
+
* into `core.js`. It is mirrored from the theme's `GlobalStyles.layoutEngine`
|
|
17
|
+
* by an effect in `theme-state.ts`.
|
|
18
|
+
*/
|
|
19
|
+
export declare const layoutSystemEnabled: Signal<boolean>;
|
|
20
|
+
export declare function setLayoutSystemEnabled(enabled: boolean): void;
|
|
21
|
+
//# sourceMappingURL=layout-system-signal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-system-signal.d.ts","sourceRoot":"","sources":["../../src/editor/layout-system-signal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAU,MAAM,sBAAsB,CAAC;AAE3D;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,OAAO,CAA0B,CAAC;AAE3E,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAM7D"}
|
package/dist/editor/main.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { ThemeState, RouterService
|
|
1
|
+
import { ThemeState, RouterService } from '../main.ts';
|
|
2
2
|
export * from './messages';
|
|
3
|
+
export * from './canvas-mode';
|
|
3
4
|
export * from './bridge';
|
|
4
5
|
export * from './handler';
|
|
5
6
|
export * from './components';
|
|
@@ -17,6 +18,5 @@ export declare function buildEditorCanvasStyleContent(backgroundColor: string):
|
|
|
17
18
|
export declare function setupEditorMode(deps: {
|
|
18
19
|
routerService: RouterService;
|
|
19
20
|
themeState: ThemeState;
|
|
20
|
-
overlayService: OverlayService;
|
|
21
21
|
}): Promise<() => void>;
|
|
22
22
|
//# sourceMappingURL=main.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/editor/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/editor/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,aAAa,EAQnB,MAAM,aAAa,CAAC;AASrB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAmD7B,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAC7C,kFAAkF;AAClF,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAEhD,wBAAgB,6BAA6B,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAM7E;AAED;;;;;;GAMG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE;IAAE,aAAa,EAAE,aAAa,CAAC;IAAC,UAAU,EAAE,UAAU,CAAA;CAAE,GAC7D,OAAO,CAAC,MAAM,IAAI,CAAC,CAgFrB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Block, BlockPresets } from '../block';
|
|
2
2
|
import { GlobalStyles, ThemeSurface, TranslationOverride } from '../theme-state';
|
|
3
|
-
|
|
3
|
+
import { GridStackProjection, LayoutCommand, LayoutDocument } from '../layout';
|
|
4
|
+
export type MessageType = "PROVIDE_THEME_STATE" | "SELECT_BLOCK" | "UPDATE_BLOCK_PROPS" | "ADD_BLOCK" | "REMOVE_BLOCK" | "MOVE_BLOCK" | "IFRAME_READY" | "REGISTER_BLOCKS" | "REGISTER_ROUTES" | "SET_BLOCK_PRESET" | "SET_LOCALE" | "REQUEST_THEME_STATE" | "UPSERT_THEME_STATE" | "REQUEST_TRANSLATION_OVERRIDES" | "PROVIDE_TRANSLATION_OVERRIDES" | "UPDATE_BLOCK_TRANSLATION" | "REGISTER_BLOCK_TRANSLATION_KEYS" | "FOCUS_INLINE_TEXT" | "SET_GLOBAL_STYLES" | "REQUEST_GLOBAL_STYLES" | "PROVIDE_GLOBAL_STYLES" | "PROVIDE_INITIAL_GLOBAL_STYLES" | "SCROLL_SYNC" | "REPORT_CONTENT_HEIGHT" | "REQUEST_CONTENT_HEIGHT" | "OPEN_ADD_BLOCK_MENU" | "ADD_BLOCK_MENU_CLOSED" | "REQUEST_CLOSE_ADD_BLOCK_MENU" | "PROVIDE_LAYOUT" | "PROVIDE_LAYOUT_DOCUMENT" | "SET_LAYOUTING_MODE" | "LAYOUTING_MODE_CHANGED" | "LAYOUT_COMMAND" | "REPORT_BLOCK_CONTENT_SIZE";
|
|
4
5
|
export interface BaseMessage {
|
|
5
6
|
type: MessageType;
|
|
6
7
|
timestamp: number;
|
|
@@ -12,6 +13,7 @@ export interface ProvideThemeStateMessage extends BaseMessage {
|
|
|
12
13
|
surface: ThemeSurface;
|
|
13
14
|
id: string;
|
|
14
15
|
blocks: Block[] | null;
|
|
16
|
+
layout?: LayoutDocument | null;
|
|
15
17
|
};
|
|
16
18
|
}
|
|
17
19
|
export interface RequestThemeStateMessage extends BaseMessage {
|
|
@@ -170,16 +172,6 @@ export interface RegisterRoutesMessage extends BaseMessage {
|
|
|
170
172
|
}>;
|
|
171
173
|
};
|
|
172
174
|
}
|
|
173
|
-
export interface RegisterOverlaysMessage extends BaseMessage {
|
|
174
|
-
type: "REGISTER_OVERLAYS";
|
|
175
|
-
payload: {
|
|
176
|
-
overlays: Record<string, {
|
|
177
|
-
block: string;
|
|
178
|
-
title: string;
|
|
179
|
-
contentBlock: string;
|
|
180
|
-
}>;
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
175
|
export interface SetGlobalStylesMessage extends BaseMessage {
|
|
184
176
|
type: "SET_GLOBAL_STYLES";
|
|
185
177
|
payload: {
|
|
@@ -205,8 +197,74 @@ export interface ProvideInitialGlobalStylesMessage extends BaseMessage {
|
|
|
205
197
|
styles: GlobalStyles;
|
|
206
198
|
};
|
|
207
199
|
}
|
|
208
|
-
|
|
209
|
-
export
|
|
200
|
+
/** editor → iframe: push the projected GridStack layout (Y) for a breakpoint after any X change. */
|
|
201
|
+
export interface ProvideLayoutMessage extends BaseMessage {
|
|
202
|
+
type: "PROVIDE_LAYOUT";
|
|
203
|
+
payload: {
|
|
204
|
+
surface: ThemeSurface;
|
|
205
|
+
id: string;
|
|
206
|
+
breakpoint: string;
|
|
207
|
+
projection: GridStackProjection;
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* editor → iframe: ship the authoritative LayoutDocument (X) so the iframe's
|
|
212
|
+
* ThemeSurfaceState.layout signal stays in lockstep with the parent. Sent
|
|
213
|
+
* alongside PROVIDE_LAYOUT (Y) on every layout sync.
|
|
214
|
+
*/
|
|
215
|
+
export interface ProvideLayoutDocumentMessage extends BaseMessage {
|
|
216
|
+
type: "PROVIDE_LAYOUT_DOCUMENT";
|
|
217
|
+
payload: {
|
|
218
|
+
surface: ThemeSurface;
|
|
219
|
+
id: string;
|
|
220
|
+
layout: LayoutDocument | null;
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* editor → iframe: toggle the iframe's canvas-mode flag so ExtensionRoot
|
|
225
|
+
* delegates to a registered LayoutModeAdapter (e.g. GridStack) instead of
|
|
226
|
+
* rendering CSS Grid.
|
|
227
|
+
*/
|
|
228
|
+
export interface SetLayoutingModeMessage extends BaseMessage {
|
|
229
|
+
type: "SET_LAYOUTING_MODE";
|
|
230
|
+
payload: {
|
|
231
|
+
enabled: boolean;
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* iframe → editor: the iframe morphed layouting mode on/off from an in-canvas
|
|
236
|
+
* gesture (grab-to-morph) or idle-settle, so the parent's `layoutingMode` and
|
|
237
|
+
* the "Edit layout" button label stay in sync. The parent calls
|
|
238
|
+
* `setLayoutingMode(enabled)`, which is idempotent and whose down-echo
|
|
239
|
+
* `SET_LAYOUTING_MODE` is absorbed by `setCanvasMode`'s early-return — no loop.
|
|
240
|
+
*/
|
|
241
|
+
export interface LayoutingModeChangedMessage extends BaseMessage {
|
|
242
|
+
type: "LAYOUTING_MODE_CHANGED";
|
|
243
|
+
payload: {
|
|
244
|
+
enabled: boolean;
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
/** iframe → editor: commit a gesture as a LayoutCommand (e.g. setRects diff on drop, resize). */
|
|
248
|
+
export interface LayoutCommandMessage extends BaseMessage {
|
|
249
|
+
type: "LAYOUT_COMMAND";
|
|
250
|
+
payload: {
|
|
251
|
+
surface: ThemeSurface;
|
|
252
|
+
id: string;
|
|
253
|
+
command: LayoutCommand;
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
/** iframe → editor: per-block measured content height for content-aware `h` (Phase 4 consumes this). */
|
|
257
|
+
export interface ReportBlockContentSizeMessage extends BaseMessage {
|
|
258
|
+
type: "REPORT_BLOCK_CONTENT_SIZE";
|
|
259
|
+
payload: {
|
|
260
|
+
surface: ThemeSurface;
|
|
261
|
+
id: string;
|
|
262
|
+
blockId: string;
|
|
263
|
+
height: number;
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
export type EditorMessage = ProvideThemeStateMessage | ProvideTranslationOverridesMessage | SelectBlockMessage | UpdateBlockPropsMessage | AddBlockMessage | RemoveBlockMessage | MoveBlockMessage | SetBlockPresetMessage | SetLocaleMessage | SetGlobalStylesMessage | ProvideGlobalStylesMessage | ScrollSyncMessage | RequestContentHeightMessage | AddBlockMenuClosedMessage | ProvideLayoutMessage | ProvideLayoutDocumentMessage | SetLayoutingModeMessage;
|
|
267
|
+
export type IframeMessage = SelectBlockMessage | IframeReadyMessage | RegisterBlocksMessage | RegisterRoutesMessage | RemoveBlockMessage | UpdateBlockPropsMessage | RequestThemeStateMessage | UpsertThemeStateMessage | RequestTranslationOverridesMessage | UpdateBlockTranslationMessage | RegisterBlockTranslationKeysMessage | FocusInlineTextMessage | RequestGlobalStylesMessage | ProvideInitialGlobalStylesMessage | ReportContentHeightMessage | ScrollSyncMessage | OpenAddBlockMenuMessage | RequestCloseAddBlockMenuMessage | LayoutCommandMessage | LayoutingModeChangedMessage | ReportBlockContentSizeMessage;
|
|
210
268
|
export type AnyMessage = EditorMessage | IframeMessage;
|
|
211
269
|
export declare function isEditorMessage(message: AnyMessage): message is EditorMessage;
|
|
212
270
|
export declare function isIframeMessage(message: AnyMessage): message is IframeMessage;
|
|
@@ -227,7 +285,6 @@ export declare function createSetLocaleMessage(payload: SetLocaleMessage["payloa
|
|
|
227
285
|
export declare function createRegisterBlockTranslationKeysMessage(payload: RegisterBlockTranslationKeysMessage["payload"]): RegisterBlockTranslationKeysMessage;
|
|
228
286
|
export declare function createFocusInlineTextMessage(payload: FocusInlineTextMessage["payload"], blockId: string): FocusInlineTextMessage;
|
|
229
287
|
export declare function createRegisterRoutesMessage(payload: RegisterRoutesMessage["payload"]): RegisterRoutesMessage;
|
|
230
|
-
export declare function createRegisterOverlaysMessage(payload: RegisterOverlaysMessage["payload"]): RegisterOverlaysMessage;
|
|
231
288
|
export declare function createSetGlobalStylesMessage(payload: SetGlobalStylesMessage["payload"]): SetGlobalStylesMessage;
|
|
232
289
|
export declare function createRequestGlobalStylesMessage(payload: RequestGlobalStylesMessage["payload"]): RequestGlobalStylesMessage;
|
|
233
290
|
export interface ScrollSyncMessage extends BaseMessage {
|
|
@@ -276,10 +333,29 @@ export interface AddBlockMenuClosedMessage extends BaseMessage {
|
|
|
276
333
|
position: "before" | "after";
|
|
277
334
|
};
|
|
278
335
|
}
|
|
336
|
+
/**
|
|
337
|
+
* Sent from the iframe to the editor (parent) to dismiss the floating canvas
|
|
338
|
+
* AddMenu. The menu lives in the parent window, so its normal click-outside
|
|
339
|
+
* detection never sees pointer events that happen inside the iframe — most
|
|
340
|
+
* notably a click on the SAME block the menu was opened from (which does not
|
|
341
|
+
* change selection). The iframe forwards those canvas clicks so the parent can
|
|
342
|
+
* close the menu.
|
|
343
|
+
*/
|
|
344
|
+
export interface RequestCloseAddBlockMenuMessage extends BaseMessage {
|
|
345
|
+
type: "REQUEST_CLOSE_ADD_BLOCK_MENU";
|
|
346
|
+
payload: Record<string, never>;
|
|
347
|
+
}
|
|
279
348
|
export declare function createProvideGlobalStylesMessage(payload: ProvideGlobalStylesMessage["payload"]): ProvideGlobalStylesMessage;
|
|
280
349
|
export declare function createProvideInitialGlobalStylesMessage(payload: ProvideInitialGlobalStylesMessage["payload"]): ProvideInitialGlobalStylesMessage;
|
|
281
350
|
export declare function createScrollSyncMessage(payload: ScrollSyncMessage["payload"]): ScrollSyncMessage;
|
|
282
351
|
export declare function createReportContentHeightMessage(payload: ReportContentHeightMessage["payload"]): ReportContentHeightMessage;
|
|
283
352
|
export declare function createOpenAddBlockMenuMessage(payload: OpenAddBlockMenuMessage["payload"]): OpenAddBlockMenuMessage;
|
|
284
353
|
export declare function createAddBlockMenuClosedMessage(payload: AddBlockMenuClosedMessage["payload"]): AddBlockMenuClosedMessage;
|
|
354
|
+
export declare function createRequestCloseAddBlockMenuMessage(): RequestCloseAddBlockMenuMessage;
|
|
355
|
+
export declare function createProvideLayoutMessage(payload: ProvideLayoutMessage["payload"]): ProvideLayoutMessage;
|
|
356
|
+
export declare function createLayoutCommandMessage(payload: LayoutCommandMessage["payload"]): LayoutCommandMessage;
|
|
357
|
+
export declare function createProvideLayoutDocumentMessage(payload: ProvideLayoutDocumentMessage["payload"]): ProvideLayoutDocumentMessage;
|
|
358
|
+
export declare function createSetLayoutingModeMessage(payload: SetLayoutingModeMessage["payload"]): SetLayoutingModeMessage;
|
|
359
|
+
export declare function createLayoutingModeChangedMessage(payload: LayoutingModeChangedMessage["payload"]): LayoutingModeChangedMessage;
|
|
360
|
+
export declare function createReportBlockContentSizeMessage(payload: ReportBlockContentSizeMessage["payload"]): ReportBlockContentSizeMessage;
|
|
285
361
|
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/editor/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA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S,CAAC,GAC5C,yBAAyB,CAM3B;AAED,wBAAgB,qCAAqC,IAAI,+BAA+B,CAMvF;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,oBAAoB,CAAC,SAAS,CAAC,GACvC,oBAAoB,CAMtB;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,oBAAoB,CAAC,SAAS,CAAC,GACvC,oBAAoB,CAMtB;AAED,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,4BAA4B,CAAC,SAAS,CAAC,GAC/C,4BAA4B,CAM9B;AAED,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,uBAAuB,CAAC,SAAS,CAAC,GAC1C,uBAAuB,CAMzB;AAED,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,2BAA2B,CAAC,SAAS,CAAC,GAC9C,2BAA2B,CAM7B;AAED,wBAAgB,mCAAmC,CACjD,OAAO,EAAE,6BAA6B,CAAC,SAAS,CAAC,GAChD,6BAA6B,CAM/B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ThemeSurface } from '../theme-state';
|
|
2
|
+
export declare function setActiveSurfaceContext(surface: ThemeSurface, id: string | null): void;
|
|
3
|
+
export declare function getActiveSurfaceContext(surface: ThemeSurface): {
|
|
4
|
+
id: string;
|
|
5
|
+
} | null;
|
|
6
|
+
export declare function clearAllSurfaceContexts(): void;
|
|
7
|
+
//# sourceMappingURL=surface-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surface-context.d.ts","sourceRoot":"","sources":["../../src/editor/surface-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAqBnD,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,YAAY,EACrB,EAAE,EAAE,MAAM,GAAG,IAAI,GAChB,IAAI,CAMN;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,YAAY,GACpB;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAEvB;AAED,wBAAgB,uBAAuB,IAAI,IAAI,CAI9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surface-context.test.d.ts","sourceRoot":"","sources":["../../src/editor/surface-context.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BlockInstance } from '../block';
|
|
2
|
+
/**
|
|
3
|
+
* Shared plumbing for the two editor block-wrapper custom elements:
|
|
4
|
+
* - `juo-editor-block-wrapper` (legacy chrome wrapper — unchanged from master)
|
|
5
|
+
* - `juo-editor-layout-block-wrapper` (minimal layout-engine wrapper)
|
|
6
|
+
*
|
|
7
|
+
* Both tags represent "a selectable editor block". Infra that maps a clicked
|
|
8
|
+
* node or a morph target back to its wrapper (see `editor/bridge.ts`,
|
|
9
|
+
* `web-components/editor/morph.ts`) must treat both tags uniformly, so the tag
|
|
10
|
+
* set and its helpers live here rather than being hardcoded per call site.
|
|
11
|
+
*/
|
|
12
|
+
export declare const BLOCK_WRAPPER_TAG = "juo-editor-block-wrapper";
|
|
13
|
+
export declare const LAYOUT_BLOCK_WRAPPER_TAG = "juo-editor-layout-block-wrapper";
|
|
14
|
+
/** CSS selector matching any placed block wrapper (either tag). */
|
|
15
|
+
export declare const WRAPPER_SELECTOR = "juo-editor-block-wrapper[data-block-id], juo-editor-layout-block-wrapper[data-block-id]";
|
|
16
|
+
/** True when `tagName` is one of the block-wrapper custom elements. */
|
|
17
|
+
export declare function isBlockWrapperTag(tagName: string): boolean;
|
|
18
|
+
/** Human-facing label for a block (definition displayName, falling back to name). */
|
|
19
|
+
export declare function getBlockLabel(block: BlockInstance): string;
|
|
20
|
+
/**
|
|
21
|
+
* Resolve the slotted block's first painted descendant — the card-like surface
|
|
22
|
+
* we paint the hover/selection outline on. We can't use ::slotted() (CE blocks'
|
|
23
|
+
* own :host rules win the cascade) and painting outline on the wrapper's own box
|
|
24
|
+
* (no radius) looks wrong, so we apply outline as an inline style on the visible
|
|
25
|
+
* element. Skips <style> nodes (Vue's defineCustomElement injects styles next to
|
|
26
|
+
* the rendered tree) and display:contents wrappers (Vue's <ContextProvider> sits
|
|
27
|
+
* between the slotted div and the actual card). Crosses one shadow-root boundary
|
|
28
|
+
* for createVueCeRenderer blocks whose slotted element is itself a CE host.
|
|
29
|
+
*/
|
|
30
|
+
export declare function resolveOutlineTarget(slotted: HTMLElement): HTMLElement | null;
|
|
31
|
+
//# sourceMappingURL=wrapper-shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrapper-shared.d.ts","sourceRoot":"","sources":["../../src/editor/wrapper-shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,6BAA6B,CAAC;AAC5D,eAAO,MAAM,wBAAwB,oCAAoC,CAAC;AAO1E,mEAAmE;AACnE,eAAO,MAAM,gBAAgB,4FAAoF,CAAC;AAElH,uEAAuE;AACvE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED,qFAAqF;AACrF,wBAAgB,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAE1D;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW,GAAG,IAAI,CAmB7E"}
|