@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/vue.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { customRef, toValue, watchEffect, defineComponent, ref, getCurrentInstance, onMounted, provide, h, renderSlot, inject, computed, useHost, defineCustomElement, triggerRef, render, shallowRef } from "vue";
|
|
2
|
-
import { getHook } from "./devtools.js";
|
|
3
|
-
import { c as applyDevtoolsPropOverride, _ as __recordDevtoolsPropSetter } from "./block-B6s9jL7l.js";
|
|
4
2
|
import { effect, signal, injectContext, provideContext, createCeRenderer, attachEmptyTracking } from "@juo/blocks";
|
|
5
3
|
import { hasRenderedContent } from "@juo/blocks";
|
|
6
|
-
import {
|
|
4
|
+
import { b as createRegisterBlockTranslationKeysMessage, c as createEditorBridge } from "./bridge-D838SWmN.js";
|
|
7
5
|
const signalsMap = /* @__PURE__ */ new WeakMap();
|
|
8
6
|
function toSignal(ref2) {
|
|
9
7
|
if (!signalsMap.has(ref2)) {
|
|
@@ -181,11 +179,7 @@ function createVueRenderer(component, options) {
|
|
|
181
179
|
const parentInstance = block.__vueInstance;
|
|
182
180
|
const existing = cache.get(block.id);
|
|
183
181
|
if (existing && existing.parentInstance === parentInstance) {
|
|
184
|
-
existing.
|
|
185
|
-
existing.propsRef.value = applyDevtoolsPropOverride(
|
|
186
|
-
block.id,
|
|
187
|
-
block.props
|
|
188
|
-
);
|
|
182
|
+
existing.propsRef.value = block.props;
|
|
189
183
|
existing.slotsRef.value = block.slots;
|
|
190
184
|
triggerRef(existing.slotsRef);
|
|
191
185
|
return existing.wrapper;
|
|
@@ -193,19 +187,10 @@ function createVueRenderer(component, options) {
|
|
|
193
187
|
if (existing) {
|
|
194
188
|
render(null, existing.wrapper);
|
|
195
189
|
}
|
|
196
|
-
const propsRef = shallowRef(
|
|
197
|
-
applyDevtoolsPropOverride(block.id, block.props)
|
|
198
|
-
);
|
|
190
|
+
const propsRef = shallowRef(block.props);
|
|
199
191
|
const slotsRef = shallowRef(
|
|
200
192
|
block.slots
|
|
201
193
|
);
|
|
202
|
-
if (getHook()) {
|
|
203
|
-
__recordDevtoolsPropSetter(block.id, () => {
|
|
204
|
-
var _a;
|
|
205
|
-
const base = ((_a = cache.get(block.id)) == null ? void 0 : _a.baseProps) ?? block.props;
|
|
206
|
-
propsRef.value = applyDevtoolsPropOverride(block.id, base);
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
194
|
const parentProvides = parentInstance == null ? void 0 : parentInstance.provides;
|
|
210
195
|
const Root = defineComponent({
|
|
211
196
|
setup() {
|
|
@@ -233,13 +218,7 @@ function createVueRenderer(component, options) {
|
|
|
233
218
|
if (!existing) {
|
|
234
219
|
attachEmptyTracking(wrapper);
|
|
235
220
|
}
|
|
236
|
-
cache.set(block.id, {
|
|
237
|
-
wrapper,
|
|
238
|
-
propsRef,
|
|
239
|
-
slotsRef,
|
|
240
|
-
parentInstance,
|
|
241
|
-
baseProps: block.props
|
|
242
|
-
});
|
|
221
|
+
cache.set(block.id, { wrapper, propsRef, slotsRef, parentInstance });
|
|
243
222
|
return wrapper;
|
|
244
223
|
};
|
|
245
224
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LayoutController } from './layout/layout-controller';
|
|
1
2
|
export default class ExtensionRoot extends HTMLElement {
|
|
2
3
|
private state;
|
|
3
4
|
private themeState;
|
|
@@ -15,8 +16,17 @@ export default class ExtensionRoot extends HTMLElement {
|
|
|
15
16
|
* if it shows up).
|
|
16
17
|
*/
|
|
17
18
|
private unresolvedNames;
|
|
18
|
-
private renderedIds;
|
|
19
19
|
private unregisterListener?;
|
|
20
|
+
private static scopeCounter;
|
|
21
|
+
private scopeId;
|
|
22
|
+
/**
|
|
23
|
+
* Pluggable layout strategy. Runtime default renders the settled CSS-Grid/flex
|
|
24
|
+
* view; the editor subclass swaps in a controller that adds the drag/resize
|
|
25
|
+
* adapter path. ExtensionRoot owns block rendering — the controller owns all
|
|
26
|
+
* layout side-effects on this host.
|
|
27
|
+
*/
|
|
28
|
+
protected layout: LayoutController;
|
|
29
|
+
private getScopeId;
|
|
20
30
|
/**
|
|
21
31
|
* Optional function to wrap each rendered block element.
|
|
22
32
|
* Called with the rendered block HTMLElement, must return an HTMLElement.
|
|
@@ -27,8 +37,45 @@ export default class ExtensionRoot extends HTMLElement {
|
|
|
27
37
|
blockWrapper: ((rendered: HTMLElement) => HTMLElement) | null;
|
|
28
38
|
static get observedAttributes(): string[];
|
|
29
39
|
constructor();
|
|
30
|
-
|
|
31
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Rendered top-level children cached by stable block id.
|
|
42
|
+
*
|
|
43
|
+
* Keying on id (not BlockInstance identity) is what keeps entering layout
|
|
44
|
+
* mode cheap: a PROVIDE_THEME_STATE that re-materialises the same blocks
|
|
45
|
+
* into fresh instance objects reuses the existing wrapper element instead of
|
|
46
|
+
* recreating the whole subtree — which would otherwise tear down and
|
|
47
|
+
* re-request context for every nested `juo-text` and rip GridStack's managed
|
|
48
|
+
* elements out from under it.
|
|
49
|
+
*
|
|
50
|
+
* `render` is the memoised withWrapper closure (owns a stable outer wrapper
|
|
51
|
+
* element). `signature` is a content hash of the last-rendered block; when
|
|
52
|
+
* it is unchanged (e.g. only `canvasMode`/layout changed) we return the
|
|
53
|
+
* cached element without re-rendering at all. Any real content change —
|
|
54
|
+
* props/slots edited in place, a stub upgrading to its real definition at
|
|
55
|
+
* any depth — flips the signature and forces a re-render.
|
|
56
|
+
*/
|
|
57
|
+
private childCache;
|
|
58
|
+
/**
|
|
59
|
+
* The layout engine the cached wrappers were built under. `withWrapper`
|
|
60
|
+
* (block.ts) picks the wrapper *element* (legacy chrome vs. minimal layout
|
|
61
|
+
* wrapper) once, at creation, from `layoutSystemEnabled`. The child cache
|
|
62
|
+
* keys on block id and reuses that memoised closure, so a live engine switch
|
|
63
|
+
* would otherwise keep the stale wrapper tag until a full refresh. Tracking
|
|
64
|
+
* the engine here lets us drop the cache when it flips, forcing fresh
|
|
65
|
+
* closures (and thus the correct wrapper element) on the next render.
|
|
66
|
+
*/
|
|
67
|
+
private childCacheEngine;
|
|
68
|
+
/**
|
|
69
|
+
* Content hash of a block subtree: type, props, slot structure and the
|
|
70
|
+
* stub/real state of every node. Identity is deliberately excluded so a
|
|
71
|
+
* re-materialised-but-identical tree reuses its element; stub flags are
|
|
72
|
+
* included so a late-registered definition still re-renders even when its
|
|
73
|
+
* serialised props are unchanged.
|
|
74
|
+
*/
|
|
75
|
+
private static signatureOf;
|
|
76
|
+
private renderChild;
|
|
77
|
+
/** Drop cached children whose ids are no longer rendered to avoid leaks. */
|
|
78
|
+
private pruneChildCache;
|
|
32
79
|
private getSurface;
|
|
33
80
|
private setStateFromThemeState;
|
|
34
81
|
connectedCallback(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExtensionRoot.d.ts","sourceRoot":"","sources":["../../src/web-components/ExtensionRoot.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExtensionRoot.d.ts","sourceRoot":"","sources":["../../src/web-components/ExtensionRoot.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAKnE,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,WAAW;IACpD,OAAO,CAAC,KAAK,CAA8B;IAC3C,OAAO,CAAC,UAAU,CAA2B;IAC7C,OAAO,CAAC,uBAAuB,CAAC,CAAa;IAC7C,OAAO,CAAC,aAAa,CAAC,CAAa;IACnC,OAAO,CAAC,aAAa,CAA0C;IAE/D;;;;;;;;;OASG;IACH,OAAO,CAAC,eAAe,CAAqB;IAC5C,OAAO,CAAC,kBAAkB,CAAC,CAAa;IACxC,OAAO,CAAC,MAAM,CAAC,YAAY,CAAK;IAChC,OAAO,CAAC,OAAO,CAAuB;IAEtC;;;;;OAKG;IACH,SAAS,CAAC,MAAM,EAAE,gBAAgB,CAA8B;IAEhE,OAAO,CAAC,UAAU;IAOlB;;;;;;OAMG;IACI,YAAY,EAAE,CAAC,CAAC,QAAQ,EAAE,WAAW,KAAK,WAAW,CAAC,GAAG,IAAI,CAAQ;IAE5E,MAAM,KAAK,kBAAkB,aAE5B;;IAMD;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,UAAU,CAOd;IAEJ;;;;;;;;OAQG;IACH,OAAO,CAAC,gBAAgB,CAAwB;IAEhD;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,CAAC,WAAW;IAiB1B,OAAO,CAAC,WAAW;IAsBnB,4EAA4E;IAC5E,OAAO,CAAC,eAAe;IAQvB,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,sBAAsB;IAM9B,iBAAiB;IAuJjB,wBAAwB,CACtB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,QAAQ,EAAE,MAAM,GAAG,IAAI;IAiBzB,oBAAoB;CAoBrB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,aAAa,CAAC;KACrC;CACF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as ExtensionRoot } from '../ExtensionRoot';
|
|
2
|
+
/**
|
|
3
|
+
* Editor build of `juo-extension-root`. Identical to the runtime base except it
|
|
4
|
+
* swaps in the EditorLayoutController, which adds the drag/resize adapter path
|
|
5
|
+
* (and its `canvasMode` dependency). Keeping this in the editor bundle only is
|
|
6
|
+
* what keeps the editor layout-mode modules out of the storefront runtime.
|
|
7
|
+
*/
|
|
8
|
+
export default class EditorExtensionRoot extends ExtensionRoot {
|
|
9
|
+
constructor();
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=ExtensionRoot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExtensionRoot.d.ts","sourceRoot":"","sources":["../../../src/web-components/editor/ExtensionRoot.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAG7C;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,aAAa;;CAK7D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExtensionRoot.test.d.ts","sourceRoot":"","sources":["../../../src/web-components/editor/ExtensionRoot.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineText.d.ts","sourceRoot":"","sources":["../../../src/web-components/editor/InlineText.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,WAAW;IACjD,OAAO,CAAC,YAAY,CAAsD;IAC1E,OAAO,CAAC,kBAAkB,CAAmC;IAC7D,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,SAAS,CAAuB;IACxC,OAAO,CAAC,eAAe,CAA8B;IACrD,OAAO,CAAC,sBAAsB,CAAqC;IACnE,OAAO,CAAC,gBAAgB,CAA+B;IACvD,OAAO,CAAC,SAAS,CAAuB;IACxC,OAAO,CAAC,OAAO,CAAC,CAAa;
|
|
1
|
+
{"version":3,"file":"InlineText.d.ts","sourceRoot":"","sources":["../../../src/web-components/editor/InlineText.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,WAAW;IACjD,OAAO,CAAC,YAAY,CAAsD;IAC1E,OAAO,CAAC,kBAAkB,CAAmC;IAC7D,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,SAAS,CAAuB;IACxC,OAAO,CAAC,eAAe,CAA8B;IACrD,OAAO,CAAC,sBAAsB,CAAqC;IACnE,OAAO,CAAC,gBAAgB,CAA+B;IACvD,OAAO,CAAC,SAAS,CAAuB;IACxC,OAAO,CAAC,OAAO,CAAC,CAAa;IAI7B,OAAO,CAAC,cAAc,CAAS;IAE/B,MAAM,KAAK,kBAAkB,aAE5B;;IAMD,iBAAiB;IA0CjB,OAAO,KAAK,UAAU,GAErB;IAED,OAAO,CAAC,oBAAoB;IA2D5B,OAAO,CAAC,iBAAiB;IAoBzB,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,UAAU;IAKlB,OAAO,CAAC,MAAM,CAAC,aAAa,CAAwC;IAEpE,OAAO,CAAC,YAAY;IA8BpB,OAAO,CAAC,UAAU;IA+BlB,wBAAwB,CACtB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,QAAQ,EAAE,MAAM,GAAG,IAAI;IAOzB,oBAAoB;CASrB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,UAAU,CAAC;KACxB;CACF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { LayoutApplyInputs, LayoutController, LayoutReactiveState } from '../layout/layout-controller';
|
|
2
|
+
/**
|
|
3
|
+
* Editor layout strategy: while layout (drag/resize) mode is active and a
|
|
4
|
+
* LayoutModeAdapter (GridStack) is registered, delegates layout to the adapter;
|
|
5
|
+
* otherwise falls back to the settled CSS-Grid/flex view via ViewLayoutController.
|
|
6
|
+
* Only ever loaded into the editor bundle — never the storefront runtime.
|
|
7
|
+
*/
|
|
8
|
+
export declare class EditorLayoutController implements LayoutController {
|
|
9
|
+
private currentAdapter;
|
|
10
|
+
private readonly view;
|
|
11
|
+
private changeHandler;
|
|
12
|
+
readReactiveState(): LayoutReactiveState;
|
|
13
|
+
apply(host: HTMLElement, inputs: LayoutApplyInputs): void;
|
|
14
|
+
teardown(host: HTMLElement): void;
|
|
15
|
+
/**
|
|
16
|
+
* Idempotently unmount the currently-mounted LayoutModeAdapter. Swallows
|
|
17
|
+
* secondary teardown errors so a broken adapter can't wedge rendering.
|
|
18
|
+
*/
|
|
19
|
+
private unmountAdapter;
|
|
20
|
+
/**
|
|
21
|
+
* Stable commit-time rects handler bound to `host`'s surface. Cached so the
|
|
22
|
+
* adapter always receives the same callback reference (created once per
|
|
23
|
+
* controller/host, mirroring the previous per-element handler).
|
|
24
|
+
*/
|
|
25
|
+
private handlerFor;
|
|
26
|
+
private surfaceOf;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=editor-layout-controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-layout-controller.d.ts","sourceRoot":"","sources":["../../../src/web-components/editor/editor-layout-controller.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,6BAA6B,CAAC;AAQrC;;;;;GAKG;AACH,qBAAa,sBAAuB,YAAW,gBAAgB;IAC7D,OAAO,CAAC,cAAc,CAAkC;IACxD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA8B;IACnD,OAAO,CAAC,aAAa,CAAyD;IAE9E,iBAAiB,IAAI,mBAAmB;IAIxC,KAAK,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,iBAAiB,GAAG,IAAI;IA2DzD,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI;IAKjC;;;OAGG;IACH,OAAO,CAAC,cAAc;IAUtB;;;;OAIG;IACH,OAAO,CAAC,UAAU;IAgBlB,OAAO,CAAC,SAAS;CAGlB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gridstack-adapter.d.ts","sourceRoot":"","sources":["../../../src/web-components/editor/gridstack-adapter.ts"],"names":[],"mappings":"AAkBA,OAAO,EAIL,KAAK,iBAAiB,EAGvB,MAAM,wBAAwB,CAAC;AAuehC,wBAAgB,sBAAsB,IAAI,iBAAiB,CA8c1D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gridstack-adapter.test.d.ts","sourceRoot":"","sources":["../../../src/web-components/editor/gridstack-adapter.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Run `fn` (a mode swap) inside a View Transition when supported and motion is
|
|
3
|
+
* allowed; otherwise apply it instantly. Assigns per-block `view-transition-name`s
|
|
4
|
+
* so each block morphs from its old rect to its new rect, clearing them once the
|
|
5
|
+
* transition finishes. Used for EXIT/settle and the button toggle — entry-from-grab
|
|
6
|
+
* deliberately bypasses this for instant continuity.
|
|
7
|
+
*/
|
|
8
|
+
export declare function withMorphTransition(fn: () => void): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* Enter layout mode from a click on a block's arrange handle ("click to arm").
|
|
11
|
+
* The mode swap is a smooth View Transition morph; the user then drags/resizes
|
|
12
|
+
* the block natively in GridStack. When `block` is given (the exact wrapper the
|
|
13
|
+
* operator grabbed), it is scrolled into view as part of the morph and then
|
|
14
|
+
* plays a one-shot "pop" so it doesn't get lost across the reflow. Passing the
|
|
15
|
+
* element — not an id — avoids targeting the wrong node when blocks share an id.
|
|
16
|
+
* Layout mode persists until an explicit exit (click-away / Escape / button);
|
|
17
|
+
* exit listeners are bound reactively from `canvasMode` in `initMorphController`.
|
|
18
|
+
*/
|
|
19
|
+
export declare function enterLayout(block?: HTMLElement): void;
|
|
20
|
+
/** Smoothly morph back to view mode (click-away / Escape / button toggle off). */
|
|
21
|
+
export declare function exitToView(): void;
|
|
22
|
+
/**
|
|
23
|
+
* Wire the controller's lifecycle. Idempotent — safe to call on every load.
|
|
24
|
+
*
|
|
25
|
+
* - Binds/unbinds the click-away + Escape exit listeners from `canvasMode`, so
|
|
26
|
+
* exit works regardless of how layout mode was entered (click-to-arm or the
|
|
27
|
+
* "Edit layout" button).
|
|
28
|
+
* - Tracks an "interacting" flag from the adapter's drag/resize lifecycle so a
|
|
29
|
+
* pointerdown that ends a gesture can't be mistaken for click-away.
|
|
30
|
+
*/
|
|
31
|
+
export declare function initMorphController(): void;
|
|
32
|
+
//# sourceMappingURL=morph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"morph.d.ts","sourceRoot":"","sources":["../../../src/web-components/editor/morph.ts"],"names":[],"mappings":"AAuKA;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAmCjE;AAyCD;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,IAAI,CAkBrD;AAED,kFAAkF;AAClF,wBAAgB,UAAU,IAAI,IAAI,CAMjC;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAa1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"morph.test.d.ts","sourceRoot":"","sources":["../../../src/web-components/editor/morph.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { BlockInstance } from '../../block';
|
|
2
|
+
import { LayoutDocument } from '../../layout';
|
|
3
|
+
/**
|
|
4
|
+
* Reactive inputs a LayoutController reads inside the ExtensionRoot effect's
|
|
5
|
+
* TRACKED scope. Keeping these behind `readReactiveState()` is what lets the
|
|
6
|
+
* editor controller subscribe the effect to `canvasMode` while the runtime
|
|
7
|
+
* controller subscribes to nothing.
|
|
8
|
+
*/
|
|
9
|
+
export type LayoutReactiveState = {
|
|
10
|
+
/** Whether the editor layout (drag/resize) mode is active. Always false at runtime. */
|
|
11
|
+
mode: boolean;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Everything a LayoutController needs to lay out a host's children. Assembled
|
|
15
|
+
* by ExtensionRoot each render pass; `children` are the already-rendered,
|
|
16
|
+
* cached block elements in render order (parallel to `extensionBlocks`).
|
|
17
|
+
*/
|
|
18
|
+
export type LayoutApplyInputs = {
|
|
19
|
+
extensionBlocks: BlockInstance[];
|
|
20
|
+
children: HTMLElement[];
|
|
21
|
+
layoutDoc: LayoutDocument | null;
|
|
22
|
+
/** Stable per-host scope id for the generated grid stylesheet. */
|
|
23
|
+
scopeId: string;
|
|
24
|
+
reactive: LayoutReactiveState;
|
|
25
|
+
/**
|
|
26
|
+
* Whether the active theme opts into the grid layout engine
|
|
27
|
+
* (`GlobalStyles.layoutEngine === "grid-v1"`). The `grid-layout` attribute is
|
|
28
|
+
* a per-surface CAPABILITY flag; this is the theme-level ON switch. Both must
|
|
29
|
+
* be true for the grid path to run — legacy themes render the flex/stacked
|
|
30
|
+
* view even on grid-capable surfaces.
|
|
31
|
+
*/
|
|
32
|
+
layoutEngineEnabled: boolean;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Pluggable layout strategy for ExtensionRoot. The runtime variant applies a
|
|
36
|
+
* CSS-Grid/flex view; the editor variant additionally delegates to a
|
|
37
|
+
* LayoutModeAdapter (GridStack) while in layout mode. ExtensionRoot owns block
|
|
38
|
+
* rendering; the controller owns all layout/geometry side-effects on the host.
|
|
39
|
+
*/
|
|
40
|
+
export interface LayoutController {
|
|
41
|
+
/**
|
|
42
|
+
* Called in the effect's TRACKED scope so any signal reads register as
|
|
43
|
+
* effect dependencies (e.g. the editor controller reads `canvasMode` here so
|
|
44
|
+
* entering/exiting layout mode re-runs the effect).
|
|
45
|
+
*/
|
|
46
|
+
readReactiveState(): LayoutReactiveState;
|
|
47
|
+
/** Called in untracked scope: apply layout to `host`. */
|
|
48
|
+
apply(host: HTMLElement, inputs: LayoutApplyInputs): void;
|
|
49
|
+
/**
|
|
50
|
+
* Idempotent: undo any persistent layout side-effect (adapter mount, grid
|
|
51
|
+
* containment). Called on empty/error render branches and on disconnect.
|
|
52
|
+
*/
|
|
53
|
+
teardown(host: HTMLElement): void;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=layout-controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-controller.d.ts","sourceRoot":"","sources":["../../../src/web-components/layout/layout-controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,uFAAuF;IACvF,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,eAAe,EAAE,aAAa,EAAE,CAAC;IACjC,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,SAAS,EAAE,cAAc,GAAG,IAAI,CAAC;IACjC,kEAAkE;IAClE,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,mBAAmB,CAAC;IAC9B;;;;;;OAMG;IACH,mBAAmB,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,iBAAiB,IAAI,mBAAmB,CAAC;IACzC,yDAAyD;IACzD,KAAK,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC1D;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC;CACnC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { LayoutApplyInputs, LayoutController, LayoutReactiveState } from './layout-controller';
|
|
2
|
+
/**
|
|
3
|
+
* Runtime layout strategy: renders the settled CSS-Grid view (or a flex column
|
|
4
|
+
* when no grid layout applies). No editor/canvas dependencies — this is the
|
|
5
|
+
* only layout code the storefront runtime bundle pulls in.
|
|
6
|
+
*
|
|
7
|
+
* Stateless: empty-block collapse is handled entirely in the generated CSS (an
|
|
8
|
+
* empty block sets `display:none` and row spacing is a per-item margin, so its
|
|
9
|
+
* row closes with no ghost gap), so there is nothing to observe or recompute at
|
|
10
|
+
* runtime.
|
|
11
|
+
*/
|
|
12
|
+
export declare class ViewLayoutController implements LayoutController {
|
|
13
|
+
readReactiveState(): LayoutReactiveState;
|
|
14
|
+
apply(host: HTMLElement, inputs: LayoutApplyInputs): void;
|
|
15
|
+
teardown(host: HTMLElement): void;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=view-layout-controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view-layout-controller.d.ts","sourceRoot":"","sources":["../../../src/web-components/layout/view-layout-controller.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;;GASG;AACH,qBAAa,oBAAqB,YAAW,gBAAgB;IAC3D,iBAAiB,IAAI,mBAAmB;IAIxC,KAAK,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,iBAAiB,GAAG,IAAI;IAyBzD,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI;CAGlC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view-layout-controller.test.d.ts","sourceRoot":"","sources":["../../../src/web-components/layout/view-layout-controller.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export type GridLayoutItem = {
|
|
2
|
+
blockId: string;
|
|
3
|
+
element: HTMLElement;
|
|
4
|
+
};
|
|
5
|
+
/** Per-item boolean-attribute tags derived from the runtime layout. */
|
|
6
|
+
export type GridLayoutTags = {
|
|
7
|
+
/**
|
|
8
|
+
* Leader block ids (leftmost block of each divider row). Tagged with
|
|
9
|
+
* `data-juo-divider` so the surface stylesheet draws the full-width divider
|
|
10
|
+
* line above them.
|
|
11
|
+
*/
|
|
12
|
+
dividerBlockIds?: ReadonlySet<string>;
|
|
13
|
+
/**
|
|
14
|
+
* Every block on a divider row. Tagged with `data-juo-divider-row` so the
|
|
15
|
+
* surface stylesheet adds the extra divider-row spacing (top margin) — only
|
|
16
|
+
* boundaries that actually show a divider grow; others keep the base row-gap.
|
|
17
|
+
*/
|
|
18
|
+
dividerRowBlockIds?: ReadonlySet<string>;
|
|
19
|
+
/**
|
|
20
|
+
* Blocks currently spanning the full row width. Tagged with
|
|
21
|
+
* `data-juo-grid-full-width` so the block wrapper chrome can show the "fill"
|
|
22
|
+
* toggle as active.
|
|
23
|
+
*/
|
|
24
|
+
fullWidthBlockIds?: ReadonlySet<string>;
|
|
25
|
+
};
|
|
26
|
+
export type GridLayoutInputs = GridLayoutTags & {
|
|
27
|
+
scopeId: string;
|
|
28
|
+
css: string;
|
|
29
|
+
items: GridLayoutItem[];
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Assemble a CSS-Grid layout inside `host`:
|
|
33
|
+
* - host becomes the container-query container (container-type: inline-size)
|
|
34
|
+
* - a <style> child carries the scoped stylesheet
|
|
35
|
+
* - an inner [data-juo-layout] grid element holds the block items
|
|
36
|
+
* - each item element is tagged with data-block-id so projectToCss's
|
|
37
|
+
* `${scope} > [data-block-id]` rules match
|
|
38
|
+
*
|
|
39
|
+
* Replaces the host's children with [styleEl, gridEl]. The host/grid split is
|
|
40
|
+
* required because an element cannot be matched by its own @container query:
|
|
41
|
+
* the host hosts the container-query context; the inner grid (a descendant)
|
|
42
|
+
* is what the @container rules target.
|
|
43
|
+
*/
|
|
44
|
+
export declare function applyGridLayout(host: HTMLElement, inputs: GridLayoutInputs): void;
|
|
45
|
+
/** Revert the container-query containment applied by applyGridLayout. */
|
|
46
|
+
export declare function clearGridLayout(host: HTMLElement): void;
|
|
47
|
+
//# sourceMappingURL=layout-grid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-grid.d.ts","sourceRoot":"","sources":["../../src/web-components/layout-grid.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,WAAW,CAAA;CAAE,CAAC;AAEvE,uEAAuE;AACvE,MAAM,MAAM,cAAc,GAAG;IAC3B;;;;OAIG;IACH,eAAe,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACtC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACzC;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,cAAc,GAAG;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,cAAc,EAAE,CAAC;CACzB,CAAC;AAqBF;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAgBjF;AAED,yEAAyE;AACzE,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CAEvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-grid.test.d.ts","sourceRoot":"","sources":["../../src/web-components/layout-grid.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { GridRect, LayoutDocument } from '../layout';
|
|
2
|
+
/**
|
|
3
|
+
* Bubbling, composed DOM CustomEvents an adapter fires on its host while the
|
|
4
|
+
* user is actively manipulating the layout (drag/resize). The morph controller
|
|
5
|
+
* listens for these to drive the idle-settle timer that morphs back to view
|
|
6
|
+
* mode. They are interaction-lifecycle signals only — NOT commit events
|
|
7
|
+
* (commits flow through `onChange`). Programmatic updates must NOT emit them.
|
|
8
|
+
*/
|
|
9
|
+
export declare const LAYOUT_INTERACTION_START = "juo-layout-interaction-start";
|
|
10
|
+
export declare const LAYOUT_INTERACTION_END = "juo-layout-interaction-end";
|
|
11
|
+
/**
|
|
12
|
+
* Class the morph controller toggles on a `.grid-stack-item` to play a one-shot
|
|
13
|
+
* "pop toward the operator" animation when layout mode is entered from that
|
|
14
|
+
* block. The keyframes live in the adapter's injected stylesheet (same DOM root
|
|
15
|
+
* as the grid), so the class is shared between the two modules here.
|
|
16
|
+
*/
|
|
17
|
+
export declare const LAYOUT_POP_CLASS = "juo-layout-pop";
|
|
18
|
+
/**
|
|
19
|
+
* Final rects emitted by a LayoutModeAdapter at gesture commit (drop /
|
|
20
|
+
* resize-stop). Commit-time ingestion only — no streaming positions.
|
|
21
|
+
*/
|
|
22
|
+
export type LayoutModeRectsChange = {
|
|
23
|
+
rects: Record<string, GridRect>;
|
|
24
|
+
};
|
|
25
|
+
export type LayoutModeMountInputs = {
|
|
26
|
+
layout: LayoutDocument;
|
|
27
|
+
/** Render-ordered block ids that the host currently governs. */
|
|
28
|
+
blockIds: string[];
|
|
29
|
+
/**
|
|
30
|
+
* For each blockId, the HTMLElement ExtensionRoot already created for
|
|
31
|
+
* that block (in render order). Adapters MAY reuse / wrap / replace
|
|
32
|
+
* these. The spike GridStack adapter replaces them with simplified
|
|
33
|
+
* placeholder widgets and ignores these elements.
|
|
34
|
+
*/
|
|
35
|
+
blockElements: Record<string, HTMLElement>;
|
|
36
|
+
/** Stable scope id for the host (same value Phase 3 uses for the CSS-grid scope). */
|
|
37
|
+
scopeId: string;
|
|
38
|
+
/** Called by the adapter on gesture completion. */
|
|
39
|
+
onChange: (event: LayoutModeRectsChange) => void;
|
|
40
|
+
};
|
|
41
|
+
export interface LayoutModeAdapter {
|
|
42
|
+
readonly id: string;
|
|
43
|
+
mount(host: HTMLElement, inputs: LayoutModeMountInputs): void;
|
|
44
|
+
unmount(host: HTMLElement): void;
|
|
45
|
+
/** Optional in-place update when the adapter is already mounted on `host`. */
|
|
46
|
+
update?(host: HTMLElement, inputs: LayoutModeMountInputs): void;
|
|
47
|
+
}
|
|
48
|
+
export declare function registerLayoutModeAdapter(adapter: LayoutModeAdapter): void;
|
|
49
|
+
export declare function getLayoutModeAdapter(): LayoutModeAdapter | null;
|
|
50
|
+
export declare function clearLayoutModeAdapter(): void;
|
|
51
|
+
//# sourceMappingURL=layout-mode-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-mode-adapter.d.ts","sourceRoot":"","sources":["../../src/web-components/layout-mode-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE1D;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,iCAAiC,CAAC;AACvE,eAAO,MAAM,sBAAsB,+BAA+B,CAAC;AAEnE;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,mBAAmB,CAAC;AAEjD;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,cAAc,CAAC;IACvB,gEAAgE;IAChE,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB;;;;;OAKG;IACH,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAC3C,qFAAqF;IACrF,OAAO,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,QAAQ,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;CAClD,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAC9D,OAAO,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC;IACjC,8EAA8E;IAC9E,MAAM,CAAC,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,qBAAqB,GAAG,IAAI,CAAC;CACjE;AAID,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAE1E;AAED,wBAAgB,oBAAoB,IAAI,iBAAiB,GAAG,IAAI,CAE/D;AAED,wBAAgB,sBAAsB,IAAI,IAAI,CAE7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-mode-adapter.test.d.ts","sourceRoot":"","sources":["../../src/web-components/layout-mode-adapter.test.ts"],"names":[],"mappings":""}
|