efficient-easel 0.101.1 → 0.103.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 (234) hide show
  1. package/README.md +51 -0
  2. package/dist/LinkPicker-W2Rtxetz.d.ts +111 -0
  3. package/dist/autosave/index.d.ts +6 -3
  4. package/dist/autosave/index.js +1 -1
  5. package/dist/chrome/index.d.ts +3 -2
  6. package/dist/chrome/index.js +1 -25
  7. package/dist/chunk-26OOWIJJ.js +1 -0
  8. package/dist/chunk-2LK54I4E.js +1 -0
  9. package/dist/chunk-3M3A3DN2.js +4 -0
  10. package/dist/chunk-3QVB4AG2.js +3 -0
  11. package/dist/chunk-3WSPDAK2.js +1 -0
  12. package/dist/chunk-4ES5JGGX.js +1 -0
  13. package/dist/chunk-4MXFKJUY.js +1 -0
  14. package/dist/chunk-57DJOKXT.js +1 -0
  15. package/dist/chunk-5MZ3RNQQ.js +13 -0
  16. package/dist/chunk-5ZBY24K7.js +1 -0
  17. package/dist/chunk-66ICOE3I.js +8 -0
  18. package/dist/chunk-6DJHRLCU.js +25 -0
  19. package/dist/chunk-6FY3PZS3.js +1 -0
  20. package/dist/chunk-6TZTKAB5.js +1 -0
  21. package/dist/chunk-6UJ3Y6FC.js +1 -0
  22. package/dist/chunk-6W7WLPZH.js +1 -0
  23. package/dist/chunk-7F52SZOI.js +2 -0
  24. package/dist/chunk-7MU3RJ6S.js +1 -0
  25. package/dist/chunk-A7ZJII7O.js +1 -0
  26. package/dist/chunk-AJBJ74ME.js +1 -0
  27. package/dist/chunk-AKFJK65Z.js +1 -0
  28. package/dist/chunk-AKZWUV5Z.js +1 -0
  29. package/dist/chunk-BDTITTMW.js +1 -0
  30. package/dist/chunk-BSPCSC45.js +1 -0
  31. package/dist/chunk-BXZ6WLHC.js +22 -0
  32. package/dist/chunk-DUVRZ456.js +1 -0
  33. package/dist/chunk-F6CCTEIX.js +1 -0
  34. package/dist/chunk-FGNR22NY.js +1 -0
  35. package/dist/chunk-FUDHI5I4.js +1 -0
  36. package/dist/chunk-GENAF3P6.js +1 -0
  37. package/dist/chunk-GOTN2KY4.js +2 -0
  38. package/dist/chunk-GXN65JMA.js +1 -0
  39. package/dist/chunk-GXQCZJOP.js +1 -0
  40. package/dist/chunk-GZO72N3Q.js +0 -0
  41. package/dist/chunk-HDKTR5TZ.js +62 -0
  42. package/dist/chunk-HMX55DYT.js +1 -0
  43. package/dist/chunk-HQ4VVRIC.js +1 -0
  44. package/dist/chunk-HWW4XJOH.js +1 -0
  45. package/dist/chunk-I54UCYOU.js +1 -0
  46. package/dist/chunk-IQ5TA7AM.js +1 -0
  47. package/dist/chunk-IWAPPEL4.js +6 -0
  48. package/dist/chunk-IYT6NN2J.js +1 -0
  49. package/dist/chunk-KCBEE2MC.js +2 -0
  50. package/dist/chunk-KDYIMJTZ.js +1 -0
  51. package/dist/chunk-KQMML6JM.js +4 -0
  52. package/dist/chunk-LG436UTD.js +1 -0
  53. package/dist/chunk-MSBF7IW3.js +2 -0
  54. package/dist/chunk-NBJ2YY6Y.js +4 -0
  55. package/dist/chunk-OM67AJQC.js +1 -0
  56. package/dist/chunk-OORDMLL4.js +5 -0
  57. package/dist/chunk-OYX47SL7.js +1 -0
  58. package/dist/chunk-P67FP7PG.js +9 -0
  59. package/dist/chunk-PWZOS45R.js +2 -0
  60. package/dist/chunk-Q2HPBMG5.js +1 -0
  61. package/dist/chunk-Q3SQBNJB.js +1 -0
  62. package/dist/chunk-R2HLPNQF.js +1 -0
  63. package/dist/chunk-R5L2E7JX.js +1 -0
  64. package/dist/chunk-R5ZVNJLJ.js +2 -0
  65. package/dist/chunk-RLBXE4EU.js +1 -0
  66. package/dist/chunk-RW4XBUUW.js +1 -0
  67. package/dist/chunk-SERF2FAU.js +1 -0
  68. package/dist/chunk-TTJ54QGG.js +18 -0
  69. package/dist/chunk-VV5ADNBR.js +1 -0
  70. package/dist/chunk-YJXEHK6I.js +2 -0
  71. package/dist/chunk-Z3KBLIEH.js +10 -0
  72. package/dist/chunk-ZE7I3PLX.js +1 -0
  73. package/dist/chunk-ZWK3CBRU.js +1 -0
  74. package/dist/chunk-ZZ7VLIHQ.js +1 -0
  75. package/dist/drag/index.d.ts +3 -41
  76. package/dist/drag/index.js +1 -18
  77. package/dist/easel/index.js +1 -9
  78. package/dist/{words-BMzV04b1.d.ts → engine-DBxp_v6B.d.ts} +1 -58
  79. package/dist/fields/index.d.ts +2 -109
  80. package/dist/fields/index.js +1 -22
  81. package/dist/gold/index.d.ts +4 -2
  82. package/dist/host-DJ8Gzsx7.d.ts +552 -0
  83. package/dist/menu/index.js +1 -1
  84. package/dist/node-ops/index.js +1 -1
  85. package/dist/panelWidths-D9hTLR25.d.ts +66 -0
  86. package/dist/screen/components/AddBlockRow.d.ts +14 -0
  87. package/dist/screen/components/AddBlockRow.js +1 -0
  88. package/dist/screen/components/AddChildRow.d.ts +39 -0
  89. package/dist/screen/components/AddChildRow.js +1 -0
  90. package/dist/screen/components/AddSidePanel.d.ts +54 -0
  91. package/dist/screen/components/AddSidePanel.js +1 -0
  92. package/dist/screen/components/MediaSidePanel.d.ts +47 -0
  93. package/dist/screen/components/MediaSidePanel.js +1 -0
  94. package/dist/screen/components/NodeContextMenu.d.ts +364 -0
  95. package/dist/screen/components/NodeContextMenu.js +1 -0
  96. package/dist/screen/components/PageEditGuardNotices.d.ts +5 -0
  97. package/dist/screen/components/PageEditGuardNotices.js +1 -0
  98. package/dist/screen/components/PanelToggleIcon.d.ts +14 -0
  99. package/dist/screen/components/PanelToggleIcon.js +1 -0
  100. package/dist/screen/components/PreviewDeviceContext.d.ts +28 -0
  101. package/dist/screen/components/PreviewDeviceContext.js +1 -0
  102. package/dist/screen/components/PreviewPartsContext.d.ts +33 -0
  103. package/dist/screen/components/PreviewPartsContext.js +1 -0
  104. package/dist/screen/components/ScreenChrome.d.ts +5 -0
  105. package/dist/screen/components/ScreenChrome.js +1 -0
  106. package/dist/screen/components/ScreenDocumentContext.d.ts +20 -0
  107. package/dist/screen/components/ScreenDocumentContext.js +1 -0
  108. package/dist/screen/components/ScreenMount.d.ts +76 -0
  109. package/dist/screen/components/ScreenMount.js +1 -0
  110. package/dist/screen/components/ScreenStoreProvider.d.ts +63 -0
  111. package/dist/screen/components/ScreenStoreProvider.js +1 -0
  112. package/dist/screen/components/SectionScreenShell.d.ts +5 -0
  113. package/dist/screen/components/SectionScreenShell.js +16 -0
  114. package/dist/screen/components/SidePanelHead.d.ts +81 -0
  115. package/dist/screen/components/SidePanelHead.js +1 -0
  116. package/dist/screen/components/SlotChildActionsContext.d.ts +41 -0
  117. package/dist/screen/components/SlotChildActionsContext.js +1 -0
  118. package/dist/screen/components/UiIcon.d.ts +52 -0
  119. package/dist/screen/components/UiIcon.js +1 -0
  120. package/dist/screen/components/panel-widths.d.ts +37 -0
  121. package/dist/screen/components/panel-widths.js +1 -0
  122. package/dist/screen/components/usePartBridge.d.ts +66 -0
  123. package/dist/screen/components/usePartBridge.js +1 -0
  124. package/dist/screen/index.d.ts +31 -0
  125. package/dist/screen/index.js +1 -0
  126. package/dist/screen/lib/admin-bridge.d.ts +105 -0
  127. package/dist/screen/lib/admin-bridge.js +1 -0
  128. package/dist/screen/lib/backend-error.d.ts +106 -0
  129. package/dist/screen/lib/backend-error.js +1 -0
  130. package/dist/screen/lib/chrome-theme.d.ts +21 -0
  131. package/dist/screen/lib/chrome-theme.js +1 -0
  132. package/dist/screen/lib/client-only.d.ts +24 -0
  133. package/dist/screen/lib/client-only.js +1 -0
  134. package/dist/screen/lib/content/view-tiers.d.ts +25 -0
  135. package/dist/screen/lib/content/view-tiers.js +1 -0
  136. package/dist/screen/lib/document-addressing.d.ts +20 -0
  137. package/dist/screen/lib/document-addressing.js +1 -0
  138. package/dist/screen/lib/document-contract.d.ts +237 -0
  139. package/dist/screen/lib/document-contract.js +1 -0
  140. package/dist/screen/lib/document-hooks.d.ts +71 -0
  141. package/dist/screen/lib/document-hooks.js +0 -0
  142. package/dist/screen/lib/document-switch.d.ts +74 -0
  143. package/dist/screen/lib/document-switch.js +1 -0
  144. package/dist/screen/lib/failure.d.ts +54 -0
  145. package/dist/screen/lib/failure.js +1 -0
  146. package/dist/screen/lib/host-chrome.d.ts +181 -0
  147. package/dist/screen/lib/host-chrome.js +1 -0
  148. package/dist/screen/lib/host-inbound.d.ts +20 -0
  149. package/dist/screen/lib/host-inbound.js +1 -0
  150. package/dist/screen/lib/host.d.ts +20 -0
  151. package/dist/screen/lib/host.js +1 -0
  152. package/dist/screen/lib/key-scope.d.ts +23 -0
  153. package/dist/screen/lib/key-scope.js +1 -0
  154. package/dist/screen/lib/links/link-filters.d.ts +41 -0
  155. package/dist/screen/lib/links/link-filters.js +0 -0
  156. package/dist/screen/lib/load-error.d.ts +29 -0
  157. package/dist/screen/lib/load-error.js +1 -0
  158. package/dist/screen/lib/media-panel.d.ts +94 -0
  159. package/dist/screen/lib/media-panel.js +1 -0
  160. package/dist/screen/lib/media-picker.d.ts +68 -0
  161. package/dist/screen/lib/media-picker.js +1 -0
  162. package/dist/screen/lib/page-lock.d.ts +5 -0
  163. package/dist/screen/lib/page-lock.js +1 -0
  164. package/dist/screen/lib/puck/add-target-types.d.ts +55 -0
  165. package/dist/screen/lib/puck/add-target-types.js +0 -0
  166. package/dist/screen/lib/puck/block-choice.d.ts +52 -0
  167. package/dist/screen/lib/puck/block-choice.js +1 -0
  168. package/dist/screen/lib/puck/block-types-in.d.ts +39 -0
  169. package/dist/screen/lib/puck/block-types-in.js +1 -0
  170. package/dist/screen/lib/puck/content-tree.d.ts +196 -0
  171. package/dist/screen/lib/puck/content-tree.js +1 -0
  172. package/dist/screen/lib/puck/device-fields.d.ts +128 -0
  173. package/dist/screen/lib/puck/device-fields.js +1 -0
  174. package/dist/screen/lib/puck/field-buckets.d.ts +22 -0
  175. package/dist/screen/lib/puck/field-buckets.js +1 -0
  176. package/dist/screen/lib/puck/field-markers.d.ts +205 -0
  177. package/dist/screen/lib/puck/field-markers.js +1 -0
  178. package/dist/screen/lib/puck/hidable.d.ts +44 -0
  179. package/dist/screen/lib/puck/hidable.js +1 -0
  180. package/dist/screen/lib/puck/palette-sections.d.ts +96 -0
  181. package/dist/screen/lib/puck/palette-sections.js +1 -0
  182. package/dist/screen/lib/puck/panel-fields.d.ts +47 -0
  183. package/dist/screen/lib/puck/panel-fields.js +1 -0
  184. package/dist/screen/lib/puck/panel-no-control-mark.d.ts +74 -0
  185. package/dist/screen/lib/puck/panel-no-control-mark.js +1 -0
  186. package/dist/screen/lib/puck/part-id.d.ts +23 -0
  187. package/dist/screen/lib/puck/part-id.js +1 -0
  188. package/dist/screen/lib/puck/preview-click.d.ts +49 -0
  189. package/dist/screen/lib/puck/preview-click.js +1 -0
  190. package/dist/screen/lib/puck/preview-dom.d.ts +8 -0
  191. package/dist/screen/lib/puck/preview-dom.js +1 -0
  192. package/dist/screen/lib/puck/preview-events.d.ts +25 -0
  193. package/dist/screen/lib/puck/preview-events.js +1 -0
  194. package/dist/screen/lib/puck/preview-selection-context.d.ts +72 -0
  195. package/dist/screen/lib/puck/preview-selection-context.js +1 -0
  196. package/dist/screen/lib/puck/section-doc.d.ts +20 -0
  197. package/dist/screen/lib/puck/section-doc.js +1 -0
  198. package/dist/screen/lib/puck/slot-child-name.d.ts +186 -0
  199. package/dist/screen/lib/puck/slot-child-name.js +1 -0
  200. package/dist/screen/lib/puck/slot-heal.d.ts +5 -0
  201. package/dist/screen/lib/puck/slot-heal.js +1 -0
  202. package/dist/screen/lib/puck/slot-section-spec.d.ts +96 -0
  203. package/dist/screen/lib/puck/slot-section-spec.js +0 -0
  204. package/dist/screen/lib/puck/style-clipboard.d.ts +78 -0
  205. package/dist/screen/lib/puck/style-clipboard.js +1 -0
  206. package/dist/screen/lib/puck/text-control-kinds.d.ts +71 -0
  207. package/dist/screen/lib/puck/text-control-kinds.js +1 -0
  208. package/dist/screen/lib/puck/tree-reveal.d.ts +62 -0
  209. package/dist/screen/lib/puck/tree-reveal.js +1 -0
  210. package/dist/screen/lib/puck/use-section-ops.d.ts +86 -0
  211. package/dist/screen/lib/puck/use-section-ops.js +1 -0
  212. package/dist/screen/lib/screen-parts.d.ts +748 -0
  213. package/dist/screen/lib/screen-parts.js +1 -0
  214. package/dist/screen/lib/section-template-types.d.ts +49 -0
  215. package/dist/screen/lib/section-template-types.js +0 -0
  216. package/dist/screen/lib/section-templates.d.ts +23 -0
  217. package/dist/screen/lib/section-templates.js +1 -0
  218. package/dist/screen/lib/session-context.d.ts +30 -0
  219. package/dist/screen/lib/session-context.js +1 -0
  220. package/dist/screen/lib/session.d.ts +255 -0
  221. package/dist/screen/lib/session.js +1 -0
  222. package/dist/screen/screen.css +1102 -0
  223. package/dist/screen/words.d.ts +42 -0
  224. package/dist/screen/words.js +1 -0
  225. package/dist/session-DSQFmIvx.d.ts +43 -0
  226. package/dist/strings/catalogue.d.ts +13 -4
  227. package/dist/strings/catalogue.js +1 -1
  228. package/dist/strings/index.d.ts +5 -2
  229. package/dist/strings/index.js +1 -1
  230. package/dist/style-clipboard/index.js +1 -1
  231. package/dist/{types-DGcCsxs8.d.ts → types-CqY85foL.d.ts} +3 -65
  232. package/dist/words-D_Lnw1Gr.d.ts +59 -0
  233. package/package.json +348 -2
  234. package/dist/chunk-IG3U5NWJ.js +0 -1
@@ -0,0 +1,86 @@
1
+ import { Data } from '../../../blocks/index.js';
2
+ import { TreeItem } from './content-tree.js';
3
+ import 'react';
4
+ import '../../../types-E3HrTPg2.js';
5
+ import '../../../data/index.js';
6
+ import '../../../types-41704JE4.js';
7
+ import '../../../resolve-D68pb3Bx.js';
8
+ import '../../../plan-DChbUXdS.js';
9
+
10
+ type NodeSelector = {
11
+ index: number;
12
+ zone?: string;
13
+ } | null;
14
+ type ComponentData = TreeItem;
15
+ type SectionOps = {
16
+ /** Insert a component into a zone at an index; returns the generated id. */
17
+ insertComponent: (zone: string, type: string, index: number) => string;
18
+ /** Insert into ROOT_ZONE (top-level section); returns the generated id. */
19
+ insertSection: (type: string, index: number) => string;
20
+ /** Atomically replace the node at (zone, index) — heal, reseed, hide toggle. */
21
+ replaceComponent: (zone: string, index: number, data: ComponentData) => void;
22
+ /** Seed a freshly-inserted slot child's props (insert THEN replace at a stable id). */
23
+ seedChild: (zone: string, index: number, childType: string, props: Record<string, unknown>) => void;
24
+ /**
25
+ * Insert a FULL node — type + props, including inline slot children — at
26
+ * (zone, index); returns its id. The same insert-then-replace pattern as
27
+ * seedChild, one level up: how a saved section template lands in a page.
28
+ * Callers pass a node whose ids are already fresh (cloneNodeWithFreshIds).
29
+ */
30
+ insertNode: (zone: string, index: number, node: TreeItem) => string;
31
+ /** Remove the node at (zone, index). A normal dispatch, so Undo restores it. */
32
+ removeComponent: (zone: string, index: number) => void;
33
+ /**
34
+ * Move the node at (zone, sourceIndex) to destinationIndex WITHIN THE SAME
35
+ * zone. `destinationIndex` is the node's final resting index in the array
36
+ * (Puck's `reorder` reducer splices it out then back in), so a caller moving a
37
+ * node DOWN must account for the one-slot shift itself.
38
+ */
39
+ reorderComponent: (zone: string, sourceIndex: number, destinationIndex: number) => void;
40
+ /** Duplicate the node at (zone, index). */
41
+ duplicateComponent: (zone: string, index: number) => void;
42
+ /** Set (or clear) the Puck selection by index-based address. */
43
+ select: (selector: NodeSelector) => void;
44
+ /** Replace the whole working document (used by Reset). */
45
+ setDocument: (data: Data) => void;
46
+ /**
47
+ * Write the next document as ONE undo step — the commit behind the block
48
+ * operations (`efficient-easel/node-ops`, blueprint step 2.4b: the menu's
49
+ * Delete, Duplicate, Move, Copy / Cut / Paste and Hide, and the rows'
50
+ * hover-delete). Each of those is planned whole and lands here once, instead
51
+ * of the two or three dispatches it used to be.
52
+ *
53
+ * Recorded in Puck's history on purpose (`setData` is not, by default), and
54
+ * handed a FUNCTION: the object form logs "`setData` is expensive" on every
55
+ * call, and both rebuild Puck's index the same way. Behind the read-only gate
56
+ * like every other mutation here.
57
+ */
58
+ commitDocument: (data: Data) => void;
59
+ };
60
+ type SectionOpsOptions = {
61
+ /**
62
+ * SOMEBODY ELSE holds the open document: every MUTATION below becomes a no-op.
63
+ *
64
+ * This is the one place the editor's read-only state is enforced on the
65
+ * document, and it is here rather than on each button because this hook is
66
+ * already the single source of truth for every mutation — the tree rows, the
67
+ * canvas "+" seams, the inspector head buttons and the lifecycle effects all
68
+ * come through it. A gate on the buttons would be a gate on the ones somebody
69
+ * remembered.
70
+ *
71
+ * `select` and `setUi` are NOT mutations and stay live: a read-only viewer must
72
+ * still be able to click a section and read its settings.
73
+ *
74
+ * Deliberately keyed on "somebody else has it" and NOT on the wider save gate.
75
+ * The save gate is also false while the lock claim is still `checking`, and the
76
+ * pinned Header/Footer seed runs in the chrome's mount commit, inside that
77
+ * window, through these very ops. Its WRITE is what is held there — by
78
+ * `onChange`, released by the claim if it is granted — so the seed must be
79
+ * allowed to lay the node down (card 1096). Blocking it here would silently
80
+ * un-fix that card.
81
+ */
82
+ readOnly?: boolean;
83
+ };
84
+ declare function useSectionOps(options?: SectionOpsOptions): SectionOps;
85
+
86
+ export { type NodeSelector, type SectionOps, type SectionOpsOptions, useSectionOps };
@@ -0,0 +1 @@
1
+ export{useSectionOps}from"../../../chunk-VV5ADNBR.js";import"../../../chunk-FUDHI5I4.js";import"../../../chunk-P67FP7PG.js";import"../../../chunk-AELNNAFM.js";import"../../../chunk-YRLPFZW3.js";import"../../../chunk-D2BCHTQR.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-ZNCEOSXO.js";import"../../../chunk-KRXQM65X.js";import"../../../chunk-NKB3KVAB.js";