@juo/blocks 1.14.0 → 1.15.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.
Files changed (59) hide show
  1. package/dist/{ExtensionRoot-CRJx0Dtr.js → ExtensionRoot-C3lVJEBl.js} +9 -2
  2. package/dist/block.d.ts.map +1 -1
  3. package/dist/block.devtools.test.d.ts +2 -0
  4. package/dist/block.devtools.test.d.ts.map +1 -0
  5. package/dist/{bridge-D838SWmN.js → bridge-xiKEzCGR.js} +30 -30
  6. package/dist/context.d.ts.map +1 -1
  7. package/dist/context.devtools.test.d.ts +2 -0
  8. package/dist/context.devtools.test.d.ts.map +1 -0
  9. package/dist/core.js +80 -71
  10. package/dist/{css-runtime-DWytAzZ5.js → css-runtime-ClH0MEYr.js} +151 -113
  11. package/dist/devtools/env.d.ts +3 -0
  12. package/dist/devtools/env.d.ts.map +1 -0
  13. package/dist/devtools/hook.d.ts +40 -0
  14. package/dist/devtools/hook.d.ts.map +1 -0
  15. package/dist/devtools/index.d.ts +5 -0
  16. package/dist/devtools/index.d.ts.map +1 -0
  17. package/dist/devtools/instrumentation.d.ts +47 -0
  18. package/dist/devtools/instrumentation.d.ts.map +1 -0
  19. package/dist/devtools/protocol.d.ts +77 -0
  20. package/dist/devtools/protocol.d.ts.map +1 -0
  21. package/dist/devtools.js +11 -0
  22. package/dist/editor/components.d.ts.map +1 -1
  23. package/dist/editor/layout-command-emitter.d.ts +6 -0
  24. package/dist/editor/layout-command-emitter.d.ts.map +1 -1
  25. package/dist/editor/main.d.ts.map +1 -1
  26. package/dist/editor/messages.d.ts +6 -0
  27. package/dist/editor/messages.d.ts.map +1 -1
  28. package/dist/editor.js +74 -67
  29. package/dist/{gridstack-adapter-DreG3XnB.js → gridstack-adapter-CDWbSpbt.js} +15 -16
  30. package/dist/index-JSv6UH_o.js +169 -0
  31. package/dist/layout/index.d.ts +1 -0
  32. package/dist/layout/index.d.ts.map +1 -1
  33. package/dist/layout/insert.d.ts +14 -11
  34. package/dist/layout/insert.d.ts.map +1 -1
  35. package/dist/layout/override.d.ts +10 -0
  36. package/dist/layout/override.d.ts.map +1 -0
  37. package/dist/layout/override.test.d.ts +2 -0
  38. package/dist/layout/override.test.d.ts.map +1 -0
  39. package/dist/layout/project-css.d.ts.map +1 -1
  40. package/dist/layout/reconcile.d.ts +4 -3
  41. package/dist/layout/reconcile.d.ts.map +1 -1
  42. package/dist/{morph-Dj-xvrwt.js → morph-n4LMxOYo.js} +1 -1
  43. package/dist/preact/block.d.ts.map +1 -1
  44. package/dist/preact.js +14 -10
  45. package/dist/{project-gridstack-DYLMKSH1.js → project-gridstack-CM783oKI.js} +1 -1
  46. package/dist/react/block.d.ts.map +1 -1
  47. package/dist/react.js +13 -9
  48. package/dist/registry.devtools.test.d.ts +2 -0
  49. package/dist/registry.devtools.test.d.ts.map +1 -0
  50. package/dist/vue/block.d.ts.map +1 -1
  51. package/dist/vue.js +22 -4
  52. package/dist/web-components/ExtensionRoot.d.ts.map +1 -1
  53. package/dist/web-components/editor/editor-layout-controller.d.ts.map +1 -1
  54. package/dist/web-components/editor/gridstack-adapter.d.ts.map +1 -1
  55. package/dist/web-components/layout-mode-adapter.d.ts +6 -0
  56. package/dist/web-components/layout-mode-adapter.d.ts.map +1 -1
  57. package/dist/web-components-editor.js +11 -6
  58. package/dist/web-components-runtime.js +2 -2
  59. package/package.json +5 -1
@@ -8,20 +8,23 @@ export type InsertPosition = "before" | "after";
8
8
  */
9
9
  export declare const DEFAULT_NEW_BLOCK_HEIGHT = 4;
10
10
  /**
11
- * Insert a rect for `blockId` adjacent to `targetId` in the base breakpoint of
12
- * `doc`, so a block added via the editor's add buttons lands directly
13
- * above/below the block it was added relative to — not at the end of the grid.
11
+ * Insert a rect for `blockId` adjacent to `targetId` in EVERY stored breakpoint
12
+ * of `doc`, so a block added via the editor's add buttons lands directly
13
+ * above/below the block it was added relative to — not at the end of the grid —
14
+ * in each viewport (desktop and an independent `layouts.mobile` alike).
14
15
  *
15
- * The new block inherits the target's column (`c`) and width (`w`) so it appears
16
- * in the same lane the user added it from (full-width when the target is
17
- * full-width). Every block at or below the insertion row is shifted down by the
16
+ * Within each breakpoint the new block inherits that breakpoint's target column
17
+ * (`c`) and width (`w`), so it appears in the same lane the user added it from
18
+ * (full-width when the target is full-width; the single mobile lane on a cols:1
19
+ * breakpoint). Every block at or below the insertion row is shifted down by the
18
20
  * new block's height so reading order is preserved regardless of GridStack's
19
- * compaction.
21
+ * compaction. Because each breakpoint uses its own target rect, the desktop and
22
+ * mobile orders stay independent.
20
23
  *
21
- * Returns a NEW document; the input is never mutated. If the base breakpoint or
22
- * the target's rect is missing (layout not reconciled yet), the document is
23
- * returned unchanged — `reconcileLayout` then falls back to its default
24
- * end-of-grid placement.
24
+ * Returns a NEW document; the input is never mutated. Breakpoints whose layout
25
+ * doesn't contain the target (not reconciled yet, or derived-on-demand) are
26
+ * skipped; if no breakpoint contains it the document is returned unchanged and
27
+ * `reconcileLayout` falls back to its default end-of-grid placement.
25
28
  */
26
29
  export declare function insertRectRelative(doc: LayoutDocument, args: {
27
30
  blockId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"insert.d.ts","sourceRoot":"","sources":["../../src/layout/insert.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAE5D,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEhD;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,cAAc,EACnB,IAAI,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,cAAc,CAAA;CAAE,GACpE,cAAc,CA8BhB"}
1
+ {"version":3,"file":"insert.d.ts","sourceRoot":"","sources":["../../src/layout/insert.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAE5D,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEhD;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,cAAc,EACnB,IAAI,EAAE;IACJ,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,cAAc,CAAC;CAC1B,GACA,cAAc,CAgChB"}
@@ -0,0 +1,10 @@
1
+ import { LayoutDocument } from './types';
2
+ /**
3
+ * Couple a non-base breakpoint back to desktop: drop its stored layout so it
4
+ * follows the base breakpoint again. All-or-nothing.
5
+ *
6
+ * No-op when the breakpoint is the base (never delete the authored layout) or
7
+ * when nothing is stored for it. Never mutates the input document.
8
+ */
9
+ export declare function resetBreakpoint(doc: LayoutDocument, breakpointId: string): LayoutDocument;
10
+ //# sourceMappingURL=override.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"override.d.ts","sourceRoot":"","sources":["../../src/layout/override.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,cAAc,EACnB,YAAY,EAAE,MAAM,GACnB,cAAc,CAQhB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=override.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"override.test.d.ts","sourceRoot":"","sources":["../../src/layout/override.test.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"project-css.d.ts","sourceRoot":"","sources":["../../src/layout/project-css.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAwB,cAAc,EAAuB,MAAM,SAAS,CAAC;AAsMzF,wBAAgB,YAAY,CAC1B,GAAG,EAAE,cAAc,EACnB,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,GAC3C,MAAM,CAqBR"}
1
+ {"version":3,"file":"project-css.d.ts","sourceRoot":"","sources":["../../src/layout/project-css.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAwB,cAAc,EAAuB,MAAM,SAAS,CAAC;AAwOzF,wBAAgB,YAAY,CAC1B,GAAG,EAAE,cAAc,EACnB,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,GAC3C,MAAM,CAqBR"}
@@ -6,8 +6,9 @@ export declare function reconcileLayout(doc: LayoutDocument | null | undefined,
6
6
  * `float:false` gravity (see `compactItems`). Used after mutations that can
7
7
  * leave the settled CSS-grid view out of sync with the GridStack model — most
8
8
  * notably deleting a block (which otherwise leaves a vertical gap) or stretching
9
- * one to full width (which otherwise overlays its row-mates). Narrower
10
- * breakpoints are derived at projection time and need no compaction here.
9
+ * one to full width (which otherwise overlays its row-mates). Runs on every
10
+ * stored breakpoint so an independent `layouts.mobile` compacts too; absent
11
+ * (derived) breakpoints are untouched.
11
12
  */
12
13
  export declare function compactLayoutDocument(doc: LayoutDocument | null | undefined): LayoutDocument | null | undefined;
13
14
  /**
@@ -16,7 +17,7 @@ export declare function compactLayoutDocument(doc: LayoutDocument | null | undef
16
17
  * (e.g. deleting or adding a block) reconcile + compact the layout but do NOT go
17
18
  * through the grid engine's command pipeline, so without this a fill block never
18
19
  * reclaims the columns a deleted row-mate vacates. Kept document-level to mirror
19
- * `compactLayoutDocument` and run right after it.
20
+ * `compactLayoutDocument` and run right after it, across every stored breakpoint.
20
21
  */
21
22
  export declare function expandFillLayoutDocument(doc: LayoutDocument | null | undefined): LayoutDocument | null | undefined;
22
23
  //# sourceMappingURL=reconcile.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reconcile.d.ts","sourceRoot":"","sources":["../../src/layout/reconcile.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,cAAc,EAEpB,MAAM,SAAS,CAAC;AAEjB,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,cAAc,CAa9E;AAED,wBAAgB,eAAe,CAC7B,GAAG,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,EACtC,QAAQ,EAAE,MAAM,EAAE,GACjB,cAAc,CA4BhB;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,GACrC,cAAc,GAAG,IAAI,GAAG,SAAS,CAUnC;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,GACrC,cAAc,GAAG,IAAI,GAAG,SAAS,CAUnC"}
1
+ {"version":3,"file":"reconcile.d.ts","sourceRoot":"","sources":["../../src/layout/reconcile.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,cAAc,EAEpB,MAAM,SAAS,CAAC;AAEjB,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,cAAc,CAa9E;AAmCD,wBAAgB,eAAe,CAC7B,GAAG,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,EACtC,QAAQ,EAAE,MAAM,EAAE,GACjB,cAAc,CA0ChB;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,GACrC,cAAc,GAAG,IAAI,GAAG,SAAS,CAYnC;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,GACrC,cAAc,GAAG,IAAI,GAAG,SAAS,CAYnC"}
@@ -1,5 +1,5 @@
1
1
  import { canvasMode, effect } from "@juo/blocks";
2
- import { K as getEditorBridge, o as createLayoutingModeChangedMessage, W as WRAPPER_SELECTOR } from "./bridge-D838SWmN.js";
2
+ import { g as getEditorBridge, c as createLayoutingModeChangedMessage, W as WRAPPER_SELECTOR } from "./bridge-xiKEzCGR.js";
3
3
  import { LAYOUT_INTERACTION_START, LAYOUT_INTERACTION_END, LAYOUT_POP_CLASS } from "./layout-mode-adapter-BBd4JRQd.js";
4
4
  function setCanvasMode(enabled) {
5
5
  var _a;
@@ -1 +1 @@
1
- {"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../src/preact/block.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAqC,KAAK,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE/E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAyBjD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,GAAG,GAAG,EAC1C,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,GAC1B,CAAC,KAAK,EAAE,aAAa,KAAK,WAAW,CAmCvC;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,GAAG,GAAG,EAC5C,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,EAC3B,EAAE,UAAiB,EAAE,GAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAO,GACnD,CAAC,KAAK,EAAE,aAAa,KAAK,WAAW,CAoEvC"}
1
+ {"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../src/preact/block.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAqC,KAAK,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE/E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA0BjD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,GAAG,GAAG,EAC1C,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,GAC1B,CAAC,KAAK,EAAE,aAAa,KAAK,WAAW,CAuCvC;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,GAAG,GAAG,EAC5C,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,EAC3B,EAAE,UAAiB,EAAE,GAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAO,GACnD,CAAC,KAAK,EAAE,aAAa,KAAK,WAAW,CAoEvC"}
package/dist/preact.js CHANGED
@@ -6,7 +6,8 @@ import { useState, useRef, useEffect, useContext as useContext$1, useMemo } from
6
6
  import { g as getSignalValue, s as setSignalValue, w as wrapContext, c as createSlotChildren } from "./block-VhmfGB3N.js";
7
7
  import { t } from "./block-VhmfGB3N.js";
8
8
  import { createContext, h, render } from "preact";
9
- import { c as createEditorBridge } from "./bridge-D838SWmN.js";
9
+ import { g as getInstrumentation } from "./index-JSv6UH_o.js";
10
+ import { a as createEditorBridge } from "./bridge-xiKEzCGR.js";
10
11
  function toState(signal) {
11
12
  const [value, setValue] = useState(() => getSignalValue(signal));
12
13
  const disposeRef = useRef(null);
@@ -122,15 +123,18 @@ function createPreactRenderer(component) {
122
123
  const wrapper = document.createElement("div");
123
124
  wrapper.setAttribute("data-block-id", block.id);
124
125
  wrapper.setAttribute("data-block-type", block.type);
125
- render(
126
- h(ContextProvider, {
127
- children: h(
128
- component,
129
- { ...block.props, ...renderSlots(block.slots) }
130
- )
131
- }),
132
- wrapper
133
- );
126
+ const renderTree = (props) => {
127
+ render(
128
+ h(ContextProvider, {
129
+ children: h(
130
+ component,
131
+ { ...props, ...renderSlots(block.slots) }
132
+ )
133
+ }),
134
+ wrapper
135
+ );
136
+ };
137
+ renderTree(getInstrumentation().bindLiveProps(block, renderTree));
134
138
  attachEmptyTracking(wrapper);
135
139
  return wrapper;
136
140
  };
@@ -1,4 +1,4 @@
1
- import { a1 as resolveLayout } from "./css-runtime-DWytAzZ5.js";
1
+ import { r as resolveLayout } from "./css-runtime-ClH0MEYr.js";
2
2
  const MIN_BLOCK_ROWS = 2;
3
3
  const MIN_BLOCK_PX = 200;
4
4
  function resolveActiveBreakpoint(doc, containerWidthPx) {
@@ -1 +1 @@
1
- {"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../src/react/block.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAuBjD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,GAAG,GAAG,EACzC,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GAChC,CAAC,KAAK,EAAE,aAAa,KAAK,WAAW,CAmCvC;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,GAAG,GAAG,EAC3C,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EACjC,EAAE,UAAiB,EAAE,GAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAO,GACnD,CAAC,KAAK,EAAE,aAAa,KAAK,WAAW,CAyEvC"}
1
+ {"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../src/react/block.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAwBjD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,GAAG,GAAG,EACzC,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GAChC,CAAC,KAAK,EAAE,aAAa,KAAK,WAAW,CAuCvC;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,GAAG,GAAG,EAC3C,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EACjC,EAAE,UAAiB,EAAE,GAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAO,GACnD,CAAC,KAAK,EAAE,aAAa,KAAK,WAAW,CAyEvC"}
package/dist/react.js CHANGED
@@ -6,7 +6,8 @@ import React, { useSyncExternalStore, createContext, useState, useContext as use
6
6
  import { g as getSignalValue, s as setSignalValue, w as wrapContext, c as createSlotChildren } from "./block-VhmfGB3N.js";
7
7
  import { t } from "./block-VhmfGB3N.js";
8
8
  import { createRoot } from "react-dom/client";
9
- import { c as createEditorBridge } from "./bridge-D838SWmN.js";
9
+ import { g as getInstrumentation } from "./index-JSv6UH_o.js";
10
+ import { a as createEditorBridge } from "./bridge-xiKEzCGR.js";
10
11
  function toState(signal) {
11
12
  const subscribe = (callback) => {
12
13
  const dispose = effect(() => {
@@ -105,14 +106,17 @@ function createReactRenderer(component) {
105
106
  wrapper.setAttribute("data-block-id", block.id);
106
107
  wrapper.setAttribute("data-block-type", block.type);
107
108
  const root = createRoot(wrapper);
108
- root.render(
109
- React.createElement(ContextProvider, {
110
- children: React.createElement(
111
- component,
112
- { ...block.props, ...renderSlots(block.slots) }
113
- )
114
- })
115
- );
109
+ const renderTree = (props) => {
110
+ root.render(
111
+ React.createElement(ContextProvider, {
112
+ children: React.createElement(
113
+ component,
114
+ { ...props, ...renderSlots(block.slots) }
115
+ )
116
+ })
117
+ );
118
+ };
119
+ renderTree(getInstrumentation().bindLiveProps(block, renderTree));
116
120
  attachEmptyTracking(wrapper);
117
121
  return wrapper;
118
122
  };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=registry.devtools.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.devtools.test.d.ts","sourceRoot":"","sources":["../src/registry.devtools.test.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../src/vue/block.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,GAAG,EAGR,SAAS,EAUV,MAAM,KAAK,CAAC;AACb,OAAO,EAEL,aAAa,EAEb,kBAAkB,EACnB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,kBAAkB,EAAE,CAAC;AA2B9B,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,SAAS,EACpB,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,GAAG,CAAA;CAAE,WAuCZ,aAAa,iBA6D7B;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,SAAS,EACpB,EAAE,UAAiB,EAAE,GAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAO,yCAoCrD"}
1
+ {"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../src/vue/block.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,GAAG,EAGR,SAAS,EAUV,MAAM,KAAK,CAAC;AAEb,OAAO,EAEL,aAAa,EAEb,kBAAkB,EACnB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,kBAAkB,EAAE,CAAC;AA2B9B,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,SAAS,EACpB,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,GAAG,CAAA;CAAE,WA0CZ,aAAa,iBA+E7B;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,SAAS,EACpB,EAAE,UAAiB,EAAE,GAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAO,yCAoCrD"}
package/dist/vue.js CHANGED
@@ -1,7 +1,8 @@
1
1
  import { customRef, toValue, watchEffect, defineComponent, ref, getCurrentInstance, onMounted, provide, h, renderSlot, inject, computed, useHost, defineCustomElement, triggerRef, render, shallowRef } from "vue";
2
+ import { g as getInstrumentation } from "./index-JSv6UH_o.js";
2
3
  import { effect, signal, injectContext, provideContext, createCeRenderer, attachEmptyTracking } from "@juo/blocks";
3
4
  import { hasRenderedContent } from "@juo/blocks";
4
- import { b as createRegisterBlockTranslationKeysMessage, c as createEditorBridge } from "./bridge-D838SWmN.js";
5
+ import { v as createRegisterBlockTranslationKeysMessage, a as createEditorBridge } from "./bridge-xiKEzCGR.js";
5
6
  const signalsMap = /* @__PURE__ */ new WeakMap();
6
7
  function toSignal(ref2) {
7
8
  if (!signalsMap.has(ref2)) {
@@ -179,7 +180,8 @@ function createVueRenderer(component, options) {
179
180
  const parentInstance = block.__vueInstance;
180
181
  const existing = cache.get(block.id);
181
182
  if (existing && existing.parentInstance === parentInstance) {
182
- existing.propsRef.value = block.props;
183
+ existing.baseProps = block.props;
184
+ existing.propsRef.value = getInstrumentation().resolveProps(block);
183
185
  existing.slotsRef.value = block.slots;
184
186
  triggerRef(existing.slotsRef);
185
187
  return existing.wrapper;
@@ -187,7 +189,17 @@ function createVueRenderer(component, options) {
187
189
  if (existing) {
188
190
  render(null, existing.wrapper);
189
191
  }
190
- const propsRef = shallowRef(block.props);
192
+ const propsRef = shallowRef({});
193
+ propsRef.value = getInstrumentation().bindLiveProps(
194
+ block,
195
+ (p) => {
196
+ propsRef.value = p;
197
+ },
198
+ () => {
199
+ var _a;
200
+ return ((_a = cache.get(block.id)) == null ? void 0 : _a.baseProps) ?? block.props;
201
+ }
202
+ );
191
203
  const slotsRef = shallowRef(
192
204
  block.slots
193
205
  );
@@ -218,7 +230,13 @@ function createVueRenderer(component, options) {
218
230
  if (!existing) {
219
231
  attachEmptyTracking(wrapper);
220
232
  }
221
- cache.set(block.id, { wrapper, propsRef, slotsRef, parentInstance });
233
+ cache.set(block.id, {
234
+ wrapper,
235
+ propsRef,
236
+ slotsRef,
237
+ parentInstance,
238
+ baseProps: block.props
239
+ });
222
240
  return wrapper;
223
241
  };
224
242
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ExtensionRoot.d.ts","sourceRoot":"","sources":["../../src/web-components/ExtensionRoot.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,gBAAgB,E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AAa,CAAC;KACrC;CACF"}
@@ -1 +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"}
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;IAqBlB,OAAO,CAAC,SAAS;CAGlB"}
@@ -1 +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"}
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,CAmd1D"}
@@ -21,6 +21,12 @@ export declare const LAYOUT_POP_CLASS = "juo-layout-pop";
21
21
  */
22
22
  export type LayoutModeRectsChange = {
23
23
  rects: Record<string, GridRect>;
24
+ /**
25
+ * The breakpoint the grid was rendering when the gesture committed. Threaded
26
+ * to the parent so the edit persists to that breakpoint's layout (the
27
+ * mobile/desktop orders are independent).
28
+ */
29
+ breakpoint: string;
24
30
  };
25
31
  export type LayoutModeMountInputs = {
26
32
  layout: LayoutDocument;
@@ -1 +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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ACpB,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"}
@@ -1,12 +1,12 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { Q as injectContext, m as TranslationContext, a6 as ContextRoot } from "./css-runtime-DWytAzZ5.js";
5
- import { V as ViewLayoutController, E as ExtensionRoot, B as Block } from "./ExtensionRoot-CRJx0Dtr.js";
4
+ import { i as injectContext, T as TranslationContext, C as ContextRoot } from "./css-runtime-ClH0MEYr.js";
5
+ import { V as ViewLayoutController, E as ExtensionRoot, B as Block } from "./ExtensionRoot-C3lVJEBl.js";
6
6
  import { canvasMode, getActiveSurfaceContext, emitLayoutSetRects, effect } from "@juo/blocks";
7
7
  import { getLayoutModeAdapter } from "./layout-mode-adapter-BBd4JRQd.js";
8
- import { c as createEditorBridge, d as createFocusInlineTextMessage, e as createUpdateBlockTranslationMessage } from "./bridge-D838SWmN.js";
9
- import { i as initMorphController } from "./morph-Dj-xvrwt.js";
8
+ import { a as createEditorBridge, m as createFocusInlineTextMessage, J as createUpdateBlockTranslationMessage } from "./bridge-xiKEzCGR.js";
9
+ import { i as initMorphController } from "./morph-n4LMxOYo.js";
10
10
  class EditorLayoutController {
11
11
  constructor() {
12
12
  __publicField(this, "currentAdapter", null);
@@ -78,7 +78,12 @@ class EditorLayoutController {
78
78
  if (ctx == null) {
79
79
  return;
80
80
  }
81
- emitLayoutSetRects({ surface, id: ctx.id, rects: event.rects });
81
+ emitLayoutSetRects({
82
+ surface,
83
+ id: ctx.id,
84
+ rects: event.rects,
85
+ breakpoint: event.breakpoint
86
+ });
82
87
  };
83
88
  }
84
89
  return this.changeHandler;
@@ -293,7 +298,7 @@ initMorphController();
293
298
  void (async () => {
294
299
  try {
295
300
  const [{ createGridStackAdapter }, { registerLayoutModeAdapter }] = await Promise.all([
296
- import("./gridstack-adapter-DreG3XnB.js"),
301
+ import("./gridstack-adapter-CDWbSpbt.js"),
297
302
  import("./layout-mode-adapter-BBd4JRQd.js")
298
303
  ]);
299
304
  registerLayoutModeAdapter(createGridStackAdapter());
@@ -1,8 +1,8 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { Q as injectContext, m as TranslationContext, a6 as ContextRoot } from "./css-runtime-DWytAzZ5.js";
5
- import { E as ExtensionRoot, B as Block } from "./ExtensionRoot-CRJx0Dtr.js";
4
+ import { i as injectContext, T as TranslationContext, C as ContextRoot } from "./css-runtime-ClH0MEYr.js";
5
+ import { E as ExtensionRoot, B as Block } from "./ExtensionRoot-C3lVJEBl.js";
6
6
  import { effect } from "@juo/blocks";
7
7
  class InlineText extends HTMLElement {
8
8
  constructor() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@juo/blocks",
3
3
  "private": false,
4
- "version": "1.14.0",
4
+ "version": "1.15.0",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"
@@ -53,6 +53,10 @@
53
53
  "./observability": {
54
54
  "types": "./dist/observability.d.ts",
55
55
  "default": "./dist/observability.js"
56
+ },
57
+ "./devtools": {
58
+ "types": "./dist/devtools.d.ts",
59
+ "default": "./dist/devtools.js"
56
60
  }
57
61
  },
58
62
  "dependencies": {