efficient-easel 20.2.1 → 21.1.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 (266) hide show
  1. package/README.md +30 -9
  2. package/dist/{CanvasDragLayer-ARfaivCu.d.ts → CanvasDragLayer-CFUcBbgc.d.ts} +2 -2
  3. package/dist/{ScreenDocumentContext-CFJeqqKk.d.ts → ScreenDocumentContext-1RgtGKWR.d.ts} +4 -0
  4. package/dist/blocks/index.d.ts +5 -3
  5. package/dist/{buckets-Tj-nkBpg.d.ts → buckets-Sw94ll9I.d.ts} +1 -1
  6. package/dist/canvas/index.d.ts +8 -6
  7. package/dist/canvas/index.js +1 -1
  8. package/dist/chunk-2C7W64S5.js +8 -0
  9. package/dist/chunk-2L6KWUBC.js +1 -0
  10. package/dist/chunk-467WWV4I.js +1 -0
  11. package/dist/chunk-4FD7TAOE.js +1 -0
  12. package/dist/chunk-67HCYOW4.js +1 -0
  13. package/dist/chunk-A2VVB4RH.js +0 -0
  14. package/dist/{chunk-2GVCAIPX.js → chunk-BDSLF5BR.js} +1 -1
  15. package/dist/{chunk-U66YKDAR.js → chunk-BIK3AO2V.js} +1 -1
  16. package/dist/chunk-BTDI7JAA.js +2 -0
  17. package/dist/chunk-DDH2DYQP.js +1 -0
  18. package/dist/{chunk-I7BROL77.js → chunk-DNQ7AF6K.js} +1 -1
  19. package/dist/{chunk-HK6I3NVO.js → chunk-E52W3M5I.js} +1 -1
  20. package/dist/chunk-EB6NI2VK.js +1 -0
  21. package/dist/chunk-FM6JO4WF.js +2 -0
  22. package/dist/{chunk-JQXD3TDE.js → chunk-GWYNMSIP.js} +1 -1
  23. package/dist/{chunk-7YVEYQDE.js → chunk-I67UW5UG.js} +3 -3
  24. package/dist/chunk-JACEEVVF.js +1 -0
  25. package/dist/{chunk-QAJAEWCZ.js → chunk-KFWNGPW3.js} +5 -5
  26. package/dist/{chunk-FGYJ5DJY.js → chunk-KWLHKKZO.js} +1 -1
  27. package/dist/chunk-MLQKNED6.js +1 -0
  28. package/dist/chunk-MZ5GSSZ3.js +7 -0
  29. package/dist/{chunk-43AEUUNQ.js → chunk-N3MJOHAG.js} +1 -1
  30. package/dist/{chunk-BVN33R76.js → chunk-N7E6264U.js} +1 -1
  31. package/dist/chunk-OHZHYROJ.js +5 -0
  32. package/dist/chunk-PFFH7ASD.js +21 -0
  33. package/dist/chunk-PRHBWA5V.js +0 -0
  34. package/dist/chunk-S3DUFDQ6.js +6 -0
  35. package/dist/chunk-SNF5764Q.js +1 -0
  36. package/dist/chunk-SSRYU3YG.js +1 -0
  37. package/dist/chunk-SWBADIQT.js +1 -0
  38. package/dist/{chunk-GOTN2KY4.js → chunk-TIAWIOGD.js} +1 -1
  39. package/dist/chunk-TQ5Y6S2X.js +1 -0
  40. package/dist/chunk-TUXLORVR.js +15 -0
  41. package/dist/{chunk-FGNR22NY.js → chunk-U5DNBT63.js} +1 -1
  42. package/dist/chunk-U7TFWHST.js +5 -0
  43. package/dist/chunk-WHS6Y55E.js +10 -0
  44. package/dist/chunk-WJJ7H42G.js +18 -0
  45. package/dist/{chunk-ZOBSIXRD.js → chunk-Y2T3JX7K.js} +1 -1
  46. package/dist/chunk-YIUE4US7.js +0 -0
  47. package/dist/{chunk-O7Q4DDJT.js → chunk-YM4UEGBV.js} +1 -1
  48. package/dist/chunk-YVFYWAYU.js +65 -0
  49. package/dist/{chunk-UJ46J7QW.js → chunk-ZOSEBPAI.js} +1 -1
  50. package/dist/copy/index.d.ts +2 -2
  51. package/dist/copy/index.js +13 -13
  52. package/dist/drag/drag.css +3 -9
  53. package/dist/drag/index.d.ts +3 -3
  54. package/dist/drag/index.js +1 -1
  55. package/dist/draw/client.d.ts +1 -1
  56. package/dist/draw/client.js +1 -1
  57. package/dist/draw/index.d.ts +9 -9
  58. package/dist/draw/index.js +1 -1
  59. package/dist/easel/easel.css +3 -1
  60. package/dist/easel/index.d.ts +2 -2
  61. package/dist/easel/index.js +1 -1
  62. package/dist/fields/fields.css +2 -2
  63. package/dist/fields/index.d.ts +5 -5
  64. package/dist/fields/index.js +1 -1
  65. package/dist/panel/index.d.ts +39 -140
  66. package/dist/panel/index.js +15 -15
  67. package/dist/panel/panel.css +53 -347
  68. package/dist/render/index.d.ts +2 -2
  69. package/dist/render/index.js +5 -5
  70. package/dist/{repeat-Czi-6zPX.d.ts → repeat-BNgSq2Nw.d.ts} +1 -1
  71. package/dist/screen/components/AddBlockRow.d.ts +1 -1
  72. package/dist/screen/components/AddBlockRow.js +1 -1
  73. package/dist/screen/components/AddSidePanel.d.ts +2 -2
  74. package/dist/screen/components/AddSidePanel.js +1 -1
  75. package/dist/screen/components/NodeContextMenu.d.ts +15 -15
  76. package/dist/screen/components/NodeContextMenu.js +1 -1
  77. package/dist/screen/components/PageEditGuardNotices.js +1 -1
  78. package/dist/screen/components/PreviewPartsContext.d.ts +2 -2
  79. package/dist/screen/components/PreviewPartsContext.js +1 -1
  80. package/dist/screen/components/SaveControls.d.ts +9 -9
  81. package/dist/screen/components/ScreenChrome.js +1 -1
  82. package/dist/screen/components/ScreenDocumentContext.d.ts +2 -2
  83. package/dist/screen/components/ScreenDocumentContext.js +1 -1
  84. package/dist/screen/components/ScreenMount.d.ts +9 -9
  85. package/dist/screen/components/ScreenMount.js +1 -1
  86. package/dist/screen/components/ScreenStoreProvider.d.ts +9 -9
  87. package/dist/screen/components/ScreenStoreProvider.js +1 -1
  88. package/dist/screen/components/SectionScreenShell.js +17 -17
  89. package/dist/screen/components/SlotChildActionsContext.d.ts +1 -1
  90. package/dist/screen/components/usePartBridge.d.ts +9 -9
  91. package/dist/screen/components/usePartBridge.js +1 -1
  92. package/dist/screen/index.d.ts +10 -10
  93. package/dist/screen/index.js +1 -1
  94. package/dist/screen/lib/admin-bridge.d.ts +1 -1
  95. package/dist/screen/lib/admin-bridge.js +1 -1
  96. package/dist/screen/lib/content/view-tiers.d.ts +15 -3
  97. package/dist/screen/lib/content/view-tiers.js +1 -1
  98. package/dist/screen/lib/document/add-target-types.d.ts +55 -0
  99. package/dist/screen/lib/document/add-target-types.js +1 -0
  100. package/dist/screen/lib/document/block-choice.d.ts +64 -0
  101. package/dist/screen/lib/document/block-choice.js +1 -0
  102. package/dist/screen/lib/document/block-types-in.d.ts +39 -0
  103. package/dist/screen/lib/document/block-types-in.js +1 -0
  104. package/dist/screen/lib/document/content-tree.d.ts +222 -0
  105. package/dist/screen/lib/document/content-tree.js +1 -0
  106. package/dist/screen/lib/document/device-fields.d.ts +128 -0
  107. package/dist/screen/lib/document/device-fields.js +1 -0
  108. package/dist/screen/lib/document/field-buckets.d.ts +36 -0
  109. package/dist/screen/lib/document/field-buckets.js +1 -0
  110. package/dist/screen/lib/document/field-markers.d.ts +205 -0
  111. package/dist/screen/lib/document/field-markers.js +1 -0
  112. package/dist/screen/lib/document/hidable.d.ts +44 -0
  113. package/dist/screen/lib/document/hidable.js +1 -0
  114. package/dist/screen/lib/document/palette-sections.d.ts +103 -0
  115. package/dist/screen/lib/document/palette-sections.js +1 -0
  116. package/dist/screen/lib/document/panel-fields.d.ts +47 -0
  117. package/dist/screen/lib/document/panel-fields.js +1 -0
  118. package/dist/screen/lib/document/panel-no-control-mark.d.ts +74 -0
  119. package/dist/screen/lib/document/panel-no-control-mark.js +1 -0
  120. package/dist/screen/lib/document/part-id.d.ts +23 -0
  121. package/dist/screen/lib/document/part-id.js +1 -0
  122. package/dist/screen/lib/document/preview-click.d.ts +49 -0
  123. package/dist/screen/lib/document/preview-click.js +1 -0
  124. package/dist/screen/lib/document/preview-dom.d.ts +8 -0
  125. package/dist/screen/lib/document/preview-dom.js +1 -0
  126. package/dist/screen/lib/document/preview-events.d.ts +25 -0
  127. package/dist/screen/lib/document/preview-events.js +1 -0
  128. package/dist/screen/lib/document/preview-selection-context.d.ts +72 -0
  129. package/dist/screen/lib/document/preview-selection-context.js +1 -0
  130. package/dist/screen/lib/document/section-doc.d.ts +24 -0
  131. package/dist/screen/lib/document/section-doc.js +1 -0
  132. package/dist/screen/lib/document/slot-child-name.d.ts +225 -0
  133. package/dist/screen/lib/document/slot-child-name.js +1 -0
  134. package/dist/screen/lib/document/slot-heal.d.ts +5 -0
  135. package/dist/screen/lib/document/slot-heal.js +1 -0
  136. package/dist/screen/lib/document/slot-section-spec.d.ts +96 -0
  137. package/dist/screen/lib/document/slot-section-spec.js +1 -0
  138. package/dist/screen/lib/document/style-clipboard.d.ts +144 -0
  139. package/dist/screen/lib/document/style-clipboard.js +1 -0
  140. package/dist/screen/lib/document/text-control-kinds.d.ts +71 -0
  141. package/dist/screen/lib/document/text-control-kinds.js +1 -0
  142. package/dist/screen/lib/document/tree-reveal.d.ts +62 -0
  143. package/dist/screen/lib/document/tree-reveal.js +1 -0
  144. package/dist/screen/lib/document/use-section-ops.d.ts +110 -0
  145. package/dist/screen/lib/document/use-section-ops.js +1 -0
  146. package/dist/screen/lib/document-addressing.d.ts +2 -2
  147. package/dist/screen/lib/document-switch.d.ts +1 -1
  148. package/dist/screen/lib/host.d.ts +2 -2
  149. package/dist/screen/lib/key-scope.d.ts +1 -1
  150. package/dist/screen/lib/key-scope.js +1 -1
  151. package/dist/screen/lib/media-panel.d.ts +2 -2
  152. package/dist/screen/lib/media-picker.d.ts +2 -2
  153. package/dist/screen/lib/page-lock.d.ts +1 -1
  154. package/dist/screen/lib/puck/add-target-types.d.ts +3 -55
  155. package/dist/screen/lib/puck/add-target-types.js +1 -0
  156. package/dist/screen/lib/puck/block-choice.d.ts +1 -64
  157. package/dist/screen/lib/puck/block-choice.js +1 -1
  158. package/dist/screen/lib/puck/block-types-in.d.ts +1 -39
  159. package/dist/screen/lib/puck/block-types-in.js +1 -1
  160. package/dist/screen/lib/puck/content-tree.d.ts +1 -222
  161. package/dist/screen/lib/puck/content-tree.js +1 -1
  162. package/dist/screen/lib/puck/device-fields.d.ts +3 -127
  163. package/dist/screen/lib/puck/device-fields.js +1 -1
  164. package/dist/screen/lib/puck/field-buckets.d.ts +2 -36
  165. package/dist/screen/lib/puck/field-buckets.js +1 -1
  166. package/dist/screen/lib/puck/field-markers.d.ts +2 -205
  167. package/dist/screen/lib/puck/field-markers.js +1 -1
  168. package/dist/screen/lib/puck/hidable.d.ts +1 -44
  169. package/dist/screen/lib/puck/hidable.js +1 -1
  170. package/dist/screen/lib/puck/palette-sections.d.ts +2 -97
  171. package/dist/screen/lib/puck/palette-sections.js +1 -1
  172. package/dist/screen/lib/puck/panel-fields.d.ts +1 -47
  173. package/dist/screen/lib/puck/panel-fields.js +1 -1
  174. package/dist/screen/lib/puck/panel-no-control-mark.d.ts +2 -74
  175. package/dist/screen/lib/puck/panel-no-control-mark.js +1 -1
  176. package/dist/screen/lib/puck/part-id.d.ts +1 -23
  177. package/dist/screen/lib/puck/part-id.js +1 -1
  178. package/dist/screen/lib/puck/preview-click.d.ts +1 -49
  179. package/dist/screen/lib/puck/preview-click.js +1 -1
  180. package/dist/screen/lib/puck/preview-dom.d.ts +1 -8
  181. package/dist/screen/lib/puck/preview-dom.js +1 -1
  182. package/dist/screen/lib/puck/preview-events.d.ts +1 -25
  183. package/dist/screen/lib/puck/preview-events.js +1 -1
  184. package/dist/screen/lib/puck/preview-selection-context.d.ts +2 -72
  185. package/dist/screen/lib/puck/preview-selection-context.js +1 -1
  186. package/dist/screen/lib/puck/section-doc.d.ts +3 -18
  187. package/dist/screen/lib/puck/section-doc.js +1 -1
  188. package/dist/screen/lib/puck/slot-child-name.d.ts +1 -225
  189. package/dist/screen/lib/puck/slot-child-name.js +1 -1
  190. package/dist/screen/lib/puck/slot-heal.d.ts +2 -5
  191. package/dist/screen/lib/puck/slot-heal.js +1 -1
  192. package/dist/screen/lib/puck/slot-section-spec.d.ts +1 -96
  193. package/dist/screen/lib/puck/slot-section-spec.js +1 -0
  194. package/dist/screen/lib/puck/style-clipboard.d.ts +14 -116
  195. package/dist/screen/lib/puck/style-clipboard.js +1 -1
  196. package/dist/screen/lib/puck/text-control-kinds.d.ts +1 -71
  197. package/dist/screen/lib/puck/text-control-kinds.js +1 -1
  198. package/dist/screen/lib/puck/tree-reveal.d.ts +1 -62
  199. package/dist/screen/lib/puck/tree-reveal.js +1 -1
  200. package/dist/screen/lib/puck/use-section-ops.d.ts +4 -105
  201. package/dist/screen/lib/puck/use-section-ops.js +1 -1
  202. package/dist/screen/lib/screen-parts.d.ts +27 -20
  203. package/dist/screen/lib/screen-parts.js +1 -1
  204. package/dist/screen/lib/section-template-types.d.ts +1 -1
  205. package/dist/screen/lib/section-templates.d.ts +1 -1
  206. package/dist/screen/lib/section-templates.js +1 -1
  207. package/dist/screen/lib/session-context.d.ts +1 -1
  208. package/dist/screen/lib/session-context.js +1 -1
  209. package/dist/screen/lib/session.d.ts +3 -3
  210. package/dist/screen/lib/session.js +1 -1
  211. package/dist/screen/lib/shared-section-types.d.ts +1 -1
  212. package/dist/screen/lib/shared-sections.d.ts +1 -1
  213. package/dist/screen/lib/shared-sections.js +1 -1
  214. package/dist/screen/screen.css +5 -9
  215. package/dist/screen/words.d.ts +4 -0
  216. package/dist/screen/words.js +1 -1
  217. package/dist/strings/index.d.ts +4 -4
  218. package/dist/strings/index.js +2 -2
  219. package/dist/text-styles/index.js +33 -33
  220. package/dist/tree/index.d.ts +5 -5
  221. package/dist/tree/index.js +1 -1
  222. package/dist/{types-CDX6vd6A.d.ts → types-B8NwXKlE.d.ts} +1 -1
  223. package/dist/{types-Bqq6ya0y.d.ts → types-DBy3L69b.d.ts} +11 -4
  224. package/dist/{watch-BTYOJpQU.d.ts → watch-D8xZow3y.d.ts} +2 -2
  225. package/dist/{words-vhnV8sM7.d.ts → words-CFkb8XtN.d.ts} +5 -0
  226. package/dist/{words-BeX5eGq7.d.ts → words-CmEnDoOe.d.ts} +1 -1
  227. package/dist/{words-CvwYvkJm.d.ts → words-SD4neL0n.d.ts} +6 -0
  228. package/package.json +156 -12
  229. package/dist/chunk-23DYNW6S.js +0 -1
  230. package/dist/chunk-23VM4PMV.js +0 -7
  231. package/dist/chunk-276MBG5P.js +0 -2
  232. package/dist/chunk-6FWAE2RN.js +0 -1
  233. package/dist/chunk-7LYKFL3Q.js +0 -21
  234. package/dist/chunk-A6Z4SD3I.js +0 -10
  235. package/dist/chunk-BHRC3ASL.js +0 -1
  236. package/dist/chunk-EFHV56BO.js +0 -15
  237. package/dist/chunk-I54UCYOU.js +0 -1
  238. package/dist/chunk-JBOSEHIX.js +0 -1
  239. package/dist/chunk-KAML3KQH.js +0 -1
  240. package/dist/chunk-L2Y3PF2R.js +0 -4
  241. package/dist/chunk-LQV5FZTQ.js +0 -18
  242. package/dist/chunk-MEHLY5Q4.js +0 -1
  243. package/dist/chunk-PAOZMXEI.js +0 -5
  244. package/dist/chunk-QIDRJH3S.js +0 -1
  245. package/dist/chunk-R5KEFI55.js +0 -8
  246. package/dist/chunk-RC25EGHD.js +0 -5
  247. package/dist/chunk-RSCMJIWS.js +0 -1
  248. package/dist/chunk-TNGOL65V.js +0 -1
  249. package/dist/chunk-VANKQVOW.js +0 -8
  250. package/dist/chunk-WEIE2FBC.js +0 -1
  251. package/dist/chunk-WRFD4EXD.js +0 -1
  252. package/dist/chunk-XJ2WXGFJ.js +0 -65
  253. /package/dist/{chunk-MQNBD6AB.js → chunk-3QB2ZQXK.js} +0 -0
  254. /package/dist/{chunk-LER7RKTO.js → chunk-5XL2RXFU.js} +0 -0
  255. /package/dist/{chunk-6W7WLPZH.js → chunk-6UAEFOJ4.js} +0 -0
  256. /package/dist/{chunk-26OOWIJJ.js → chunk-7OCEPOEJ.js} +0 -0
  257. /package/dist/{chunk-IQ5TA7AM.js → chunk-AJ2SUSET.js} +0 -0
  258. /package/dist/{chunk-DUVRZ456.js → chunk-ANPOR6EY.js} +0 -0
  259. /package/dist/{chunk-5ZBY24K7.js → chunk-CPL43ZLJ.js} +0 -0
  260. /package/dist/{chunk-PIND6KE7.js → chunk-I6SK6ZDT.js} +0 -0
  261. /package/dist/{chunk-7F52SZOI.js → chunk-INRERJU4.js} +0 -0
  262. /package/dist/{chunk-R5L2E7JX.js → chunk-MGVI67QV.js} +0 -0
  263. /package/dist/{chunk-IYT6NN2J.js → chunk-R4AUZVA3.js} +0 -0
  264. /package/dist/{chunk-M2Z775ZC.js → chunk-RUQOIQWI.js} +0 -0
  265. /package/dist/{chunk-PLVEGYK6.js → chunk-TCAAOYQY.js} +0 -0
  266. /package/dist/{chunk-PA3PNTVV.js → chunk-VKPOH6MK.js} +0 -0
@@ -1 +1 @@
1
- import"../chunk-GZO72N3Q.js";export{DocumentScreen,ScreenMount}from"../chunk-7YVEYQDE.js";import"../chunk-GXQCZJOP.js";import"../chunk-XJ2WXGFJ.js";import"../chunk-2GVCAIPX.js";import"../chunk-26OOWIJJ.js";import"../chunk-JBOSEHIX.js";import"../chunk-FGNR22NY.js";import"../chunk-LER7RKTO.js";import"../chunk-FGYJ5DJY.js";import"../chunk-7F52SZOI.js";import"../chunk-MQNBD6AB.js";import"../chunk-TNGOL65V.js";import"../chunk-I7BROL77.js";import"../chunk-KCBEE2MC.js";import"../chunk-C56MPJBH.js";import"../chunk-MEHLY5Q4.js";import"../chunk-WEIE2FBC.js";import"../chunk-PY7OOQEZ.js";import"../chunk-RKTF5XLP.js";export{ScreenStoreProvider}from"../chunk-JQXD3TDE.js";import"../chunk-5545A3PC.js";import"../chunk-R5KEFI55.js";import"../chunk-PA3PNTVV.js";import"../chunk-5ZBY24K7.js";import"../chunk-BVN33R76.js";import"../chunk-43AEUUNQ.js";import"../chunk-SINAM2IT.js";import"../chunk-UMDQ6CLQ.js";import"../chunk-M2Z775ZC.js";export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../chunk-PAOZMXEI.js";import"../chunk-2G6MAXPY.js";import"../chunk-6FWAE2RN.js";import"../chunk-UJ46J7QW.js";import"../chunk-276MBG5P.js";import"../chunk-77IWWW6X.js";import"../chunk-ERR437B5.js";import"../chunk-UNVKPVZW.js";import"../chunk-GMCZXMOV.js";export{NO_DOCUMENT_ADDRESSING}from"../chunk-RLBXE4EU.js";import"../chunk-HNKB2ZYR.js";import"../chunk-CLOS6SSX.js";import"../chunk-U66YKDAR.js";import"../chunk-LOMEH6DG.js";import"../chunk-KCOBHPN6.js";import"../chunk-FHCKFOCD.js";export{EaselSessionProvider,useEaselSession}from"../chunk-O7Q4DDJT.js";export{EFFICIENT_BACKEND,activateEaselSession,backendOf,createEaselSession,currentEaselSession,deactivateEaselSession,efficientClientOpen,isEfficientBackend,provideDefaultBackend,resetAmbientEaselSession,sessionRegistry,setSessionBridgedSite,setSessionDocumentSite}from"../chunk-RSCMJIWS.js";export{DETACHED_EASEL_HOST,EaselHostContext,EaselHostProvider,createEaselHost,useEaselHost,useHostEscape}from"../chunk-MQA7OFRA.js";import"../chunk-XFYFKITX.js";import"../chunk-23DYNW6S.js";import"../chunk-V7U33NF2.js";import"../chunk-6WY6ZXJG.js";import"../chunk-EFHV56BO.js";import"../chunk-TBY3DFKS.js";import"../chunk-7LYKFL3Q.js";import"../chunk-BPXEFVSQ.js";import"../chunk-A6Z4SD3I.js";import"../chunk-K56YDHYQ.js";import"../chunk-ZEH6QLBH.js";import"../chunk-IWCKVZHS.js";import"../chunk-ZKY45F5G.js";import"../chunk-FIVU2COQ.js";import"../chunk-RC25EGHD.js";import"../chunk-KFV7N2DJ.js";import"../chunk-P5VYGWYO.js";import"../chunk-WK3AFPXY.js";import"../chunk-BSHIQIZC.js";import"../chunk-NDRZP6YR.js";import"../chunk-H6DDIBQ4.js";import"../chunk-23VM4PMV.js";import"../chunk-KRL3IUV3.js";import"../chunk-ZOBSIXRD.js";import"../chunk-QAJAEWCZ.js";import"../chunk-WRFD4EXD.js";import"../chunk-VANKQVOW.js";import"../chunk-ZG6PVMC3.js";import"../chunk-MJM6SFD3.js";import"../chunk-AJSDWWJW.js";import"../chunk-2OAZYSWJ.js";import"../chunk-THWO5YVZ.js";import"../chunk-RE4LP46F.js";import"../chunk-MFIRYGHW.js";import"../chunk-LQV5FZTQ.js";import"../chunk-KAML3KQH.js";import"../chunk-3S5N4HLJ.js";import"../chunk-P2VEMZH5.js";import"../chunk-K7BTCBWD.js";import"../chunk-L55YIXDC.js";import"../chunk-QIDRJH3S.js";import"../chunk-BSPCSC45.js";import"../chunk-I54UCYOU.js";import"../chunk-GOTN2KY4.js";import"../chunk-R5L2E7JX.js";import"../chunk-BHRC3ASL.js";import"../chunk-6W7WLPZH.js";import"../chunk-IQ5TA7AM.js";import"../chunk-DUVRZ456.js";import"../chunk-IYT6NN2J.js";import"../chunk-PLVEGYK6.js";import"../chunk-LF3FUSCQ.js";
1
+ import"../chunk-GZO72N3Q.js";export{DocumentScreen,ScreenMount}from"../chunk-I67UW5UG.js";import"../chunk-GXQCZJOP.js";import"../chunk-YVFYWAYU.js";import"../chunk-BDSLF5BR.js";import"../chunk-7OCEPOEJ.js";import"../chunk-SWBADIQT.js";import"../chunk-U5DNBT63.js";import"../chunk-5XL2RXFU.js";import"../chunk-KWLHKKZO.js";import"../chunk-INRERJU4.js";import"../chunk-3QB2ZQXK.js";import"../chunk-DDH2DYQP.js";import"../chunk-DNQ7AF6K.js";import"../chunk-KCBEE2MC.js";import"../chunk-C56MPJBH.js";import"../chunk-67HCYOW4.js";import"../chunk-MLQKNED6.js";import"../chunk-PY7OOQEZ.js";import"../chunk-RKTF5XLP.js";export{ScreenStoreProvider}from"../chunk-GWYNMSIP.js";import"../chunk-5545A3PC.js";import"../chunk-2C7W64S5.js";import"../chunk-VKPOH6MK.js";import"../chunk-CPL43ZLJ.js";import"../chunk-N7E6264U.js";import"../chunk-N3MJOHAG.js";import"../chunk-SINAM2IT.js";import"../chunk-UMDQ6CLQ.js";import"../chunk-RUQOIQWI.js";export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSelectionMode,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../chunk-OHZHYROJ.js";import"../chunk-PRHBWA5V.js";import"../chunk-2G6MAXPY.js";import"../chunk-2L6KWUBC.js";import"../chunk-ZOSEBPAI.js";import"../chunk-BTDI7JAA.js";import"../chunk-77IWWW6X.js";import"../chunk-ERR437B5.js";import"../chunk-UNVKPVZW.js";import"../chunk-GMCZXMOV.js";export{NO_DOCUMENT_ADDRESSING}from"../chunk-RLBXE4EU.js";import"../chunk-HNKB2ZYR.js";import"../chunk-CLOS6SSX.js";import"../chunk-BIK3AO2V.js";import"../chunk-LOMEH6DG.js";import"../chunk-KCOBHPN6.js";import"../chunk-FHCKFOCD.js";export{EaselSessionProvider,useEaselSession}from"../chunk-YM4UEGBV.js";export{EFFICIENT_BACKEND,activateEaselSession,backendOf,createEaselSession,currentEaselSession,deactivateEaselSession,efficientClientOpen,isEfficientBackend,provideDefaultBackend,resetAmbientEaselSession,sessionRegistry,setSessionBridgedSite,setSessionDocumentSite}from"../chunk-SNF5764Q.js";export{DETACHED_EASEL_HOST,EaselHostContext,EaselHostProvider,createEaselHost,useEaselHost,useHostEscape}from"../chunk-MQA7OFRA.js";import"../chunk-XFYFKITX.js";import"../chunk-EB6NI2VK.js";import"../chunk-V7U33NF2.js";import"../chunk-6WY6ZXJG.js";import"../chunk-SSRYU3YG.js";import"../chunk-AJ2SUSET.js";import"../chunk-ANPOR6EY.js";import"../chunk-6UAEFOJ4.js";import"../chunk-R4AUZVA3.js";import"../chunk-TCAAOYQY.js";import"../chunk-TUXLORVR.js";import"../chunk-TBY3DFKS.js";import"../chunk-PFFH7ASD.js";import"../chunk-BPXEFVSQ.js";import"../chunk-ZEH6QLBH.js";import"../chunk-FM6JO4WF.js";import"../chunk-KFV7N2DJ.js";import"../chunk-WHS6Y55E.js";import"../chunk-K56YDHYQ.js";import"../chunk-IWCKVZHS.js";import"../chunk-ZKY45F5G.js";import"../chunk-FIVU2COQ.js";import"../chunk-P5VYGWYO.js";import"../chunk-WK3AFPXY.js";import"../chunk-BSHIQIZC.js";import"../chunk-NDRZP6YR.js";import"../chunk-H6DDIBQ4.js";import"../chunk-ZG6PVMC3.js";import"../chunk-MJM6SFD3.js";import"../chunk-AJSDWWJW.js";import"../chunk-2OAZYSWJ.js";import"../chunk-THWO5YVZ.js";import"../chunk-RE4LP46F.js";import"../chunk-MZ5GSSZ3.js";import"../chunk-KRL3IUV3.js";import"../chunk-Y2T3JX7K.js";import"../chunk-KFWNGPW3.js";import"../chunk-S3DUFDQ6.js";import"../chunk-JACEEVVF.js";import"../chunk-MFIRYGHW.js";import"../chunk-WJJ7H42G.js";import"../chunk-TQ5Y6S2X.js";import"../chunk-3S5N4HLJ.js";import"../chunk-P2VEMZH5.js";import"../chunk-4FD7TAOE.js";import"../chunk-LF3FUSCQ.js";import"../chunk-K7BTCBWD.js";import"../chunk-L55YIXDC.js";import"../chunk-BSPCSC45.js";import"../chunk-467WWV4I.js";import"../chunk-TIAWIOGD.js";import"../chunk-MGVI67QV.js";
@@ -14,7 +14,7 @@ import 'efficient-shell/ui';
14
14
  import './document-contract.js';
15
15
  import './document-hooks.js';
16
16
  import './section-template-types.js';
17
- import './puck/content-tree.js';
17
+ import './document/content-tree.js';
18
18
  import './shared-section-types.js';
19
19
 
20
20
  /** The `storefront-editor:auth` payload the admin portal bridges in. */
@@ -1 +1 @@
1
- export{NO_BRIDGED_CAPABILITIES,applyAuthGrant,useAdminBridge}from"../../chunk-U66YKDAR.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-MQA7OFRA.js";
1
+ export{NO_BRIDGED_CAPABILITIES,applyAuthGrant,useAdminBridge}from"../../chunk-BIK3AO2V.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-YM4UEGBV.js";import"../../chunk-SNF5764Q.js";import"../../chunk-MQA7OFRA.js";
@@ -25,7 +25,7 @@ declare function viewTierForWidth(width: number): ViewTier;
25
25
  * Derived, so the pair can never be spelled two ways. */
26
26
  declare function tabletKey(desktopKey: string): string;
27
27
  /** The key a PHONE value is stored under: `paddingTop` → `paddingTopPhone`.
28
- * The same key web-builder's `lib/puck/phone-override` stores today, so every
28
+ * The same key web-builder's `lib/document/phone-override` stores today, so every
29
29
  * stored phone value keeps its meaning; that copy goes once web-builder reads
30
30
  * this one. */
31
31
  declare function phoneKey(desktopKey: string): string;
@@ -85,6 +85,16 @@ interface AutoRule {
85
85
  * Example: padding 80 → 60 → 40; 120 → 88 → 60; gap 32 → 24 → 16.
86
86
  */
87
87
  declare const AUTO_RULES: Record<ViewValueKind, AutoRule>;
88
+ /**
89
+ * The rules a page drew by before the auto rules (web-builder's rule version
90
+ * "v1"): an empty view takes its parent's value UNCHANGED, for every kind.
91
+ * Tablet = Desktop, Phone = Tablet. With no Tablet values stored, that is
92
+ * exactly what every page draws today (an empty phone value follows the
93
+ * desktop one). The switch to {@link AUTO_RULES} is web-builder's, made once
94
+ * for every site (Lewis 2026-10-23); both tables are here so the rules are
95
+ * spelled once.
96
+ */
97
+ declare const FOLLOW_RULES: Record<ViewValueKind, AutoRule>;
88
98
  /** What each view draws. */
89
99
  interface ViewValues<T> {
90
100
  desktop: T;
@@ -96,10 +106,12 @@ interface ViewValues<T> {
96
106
  * through `AUTO_RULES[kind]`. Phone's parent is Tablet (stored or auto);
97
107
  * Tablet's parent is Desktop. A desktop value nobody set stays unset in every
98
108
  * auto view, so the host's default applies there as it does on Desktop.
109
+ * `rules` is the rule set the page draws by: {@link AUTO_RULES} (the default)
110
+ * or {@link FOLLOW_RULES}.
99
111
  *
100
112
  * DISPLAY ONLY: never store what this returns for an auto view — that turns
101
113
  * auto into a copy that stops following its parent.
102
114
  */
103
- declare function resolveViewValue<T>(kind: ViewValueKind, desktop: T, tablet?: T | null, phone?: T | null): ViewValues<T>;
115
+ declare function resolveViewValue<T>(kind: ViewValueKind, desktop: T, tablet?: T | null, phone?: T | null, rules?: Record<ViewValueKind, AutoRule>): ViewValues<T>;
104
116
 
105
- export { AUTO_RULES, type AutoRule, VIEW_DESKTOP_MIN, VIEW_TABLET_MIN, VIEW_TIERS, VIEW_TIER_LABEL, type ViewTier, type ViewValueKind, type ViewValues, isAuto, phoneKey, resolveViewValue, tabletKey, viewTierForWidth };
117
+ export { AUTO_RULES, type AutoRule, FOLLOW_RULES, VIEW_DESKTOP_MIN, VIEW_TABLET_MIN, VIEW_TIERS, VIEW_TIER_LABEL, type ViewTier, type ViewValueKind, type ViewValues, isAuto, phoneKey, resolveViewValue, tabletKey, viewTierForWidth };
@@ -1 +1 @@
1
- export{AUTO_RULES,VIEW_DESKTOP_MIN,VIEW_TABLET_MIN,VIEW_TIERS,VIEW_TIER_LABEL,isAuto,phoneKey,resolveViewValue,tabletKey,viewTierForWidth}from"../../../chunk-HK6I3NVO.js";
1
+ export{AUTO_RULES,FOLLOW_RULES,VIEW_DESKTOP_MIN,VIEW_TABLET_MIN,VIEW_TIERS,VIEW_TIER_LABEL,isAuto,phoneKey,resolveViewValue,tabletKey,viewTierForWidth}from"../../../chunk-E52W3M5I.js";
@@ -0,0 +1,55 @@
1
+ import { BlockChoice } from './block-choice.js';
2
+ import { SlotSectionSpec } from './slot-section-spec.js';
3
+
4
+ /** Which registry answered — the discriminator three of the four decisions read. */
5
+ type AddTargetSource = "section" | "footer" | "container";
6
+ /**
7
+ * What a parent can take, and everything the four decisions below need to act on
8
+ * it.
9
+ *
10
+ * ⚠️ THE LOOKUP DECIDES FOUR THINGS, NOT ONE. Wiring only the choice list ships
11
+ * a menu with wrong row names, wrong handlers, and unreachable on an empty
12
+ * container — which is why this returns a record rather than a list:
13
+ *
14
+ * 1 the CHOICE LIST — {@link AddTarget.choices}, what the Add menu offers, or
15
+ * `null` where the parent adds ONE child type from a button instead.
16
+ * 2 the ROW NAME — `rowNamerFor` (components/SlotChildRows) reads
17
+ * {@link AddTarget.source} to pick the FOOTER's block-label rule over
18
+ * lib/document/slot-child-name.ts. It must ask "is this a FOOTER block", NOT
19
+ * "does this parent use a menu": a Box adds from a menu too and
20
+ * keeps the slot-child rule, or its Headings, Texts and Buttons all fall
21
+ * through to a rule that reads a heading, a bound menu and first-words.
22
+ * 3 WHICH HANDLERS — SectionScreenShell's adapter reads `source` to choose
23
+ * which pair of host handlers a row presses. Keyed the other way round it
24
+ * answered null for a Box, whose rows then pressed and did nothing.
25
+ * 4 REACHABILITY — `Boolean(canAddTo(type))` feeds `nestState`, and a row
26
+ * folds open only if it has children OR an add affordance. An EMPTY
27
+ * container with no caret cannot be opened to reach its own menu — and
28
+ * empty is exactly the state a merchant is in when adding the first block.
29
+ */
30
+ interface AddTarget {
31
+ /** Which of the three registries answered. */
32
+ source: AddTargetSource;
33
+ /**
34
+ * The slot this parent keeps its children on.
35
+ *
36
+ * RETURNED rather than defaulted, so a caller can never reach it by falling
37
+ * through another mechanism's constant — the rule container-blocks states for
38
+ * its own lookup, kept here because this is now the one that is asked. A Flex
39
+ * listed on the Footer's `blocks` would draw its rows off `undefined`.
40
+ */
41
+ slot: string;
42
+ /** The registry's own choice list, or `null` for a single-type "Add …" button. */
43
+ choices: BlockChoice[] | null;
44
+ /**
45
+ * The section's own spec — its `addLabel`, `childType`, `seeds`, `addBlocked`,
46
+ * `notice` and `slider`. Non-null exactly when `source === "section"`.
47
+ *
48
+ * Carried so a caller that needs a section's own arithmetic (the Hero slide's
49
+ * anchor cap, the seed-on-load effect) reaches it through this one seam rather
50
+ * than importing the registry beside it and gaining a second opinion.
51
+ */
52
+ spec: SlotSectionSpec | null;
53
+ }
54
+
55
+ export type { AddTarget, AddTargetSource };
@@ -0,0 +1 @@
1
+ import"../../../chunk-YIUE4US7.js";
@@ -0,0 +1,64 @@
1
+ /**
2
+ * One row of an "Add block" menu.
3
+ *
4
+ * `group` is OPTIONAL and is the menu's own heading, not a property of the
5
+ * block: the same `ImageBlock` is grouped in a Box's menu and ungrouped in a
6
+ * Slide box's, because grouping is a fact about the LIST a merchant is reading,
7
+ * not about the component. A list whose choices carry no group renders flat, so
8
+ * every menu that shipped before this stays exactly as it was.
9
+ *
10
+ * It is set at BUILD time by whichever module assembles the list, from the
11
+ * source each choice came from — never hand-written per row. See
12
+ * `lib/document/container-blocks.ts`, which is the only assembler that sets one.
13
+ */
14
+ type BlockChoice = {
15
+ type: string;
16
+ label: string;
17
+ group?: string;
18
+ /**
19
+ * RETIRED: Add does not offer it, and a node of it already in a slot still
20
+ * belongs there (card [MERGE] One Text Block And Click Through Parts). The
21
+ * website's Heading and Eyebrow blocks: the Text block took their job, so
22
+ * nobody starts a new one, and every stored one still draws, edits, moves
23
+ * and pastes. Read through {@link offeredChoices} wherever a list is shown
24
+ * to ADD from; the whole list is still the slot's answer to "does this slot
25
+ * take it?", so a move or a paste reads it unfiltered.
26
+ */
27
+ retired?: boolean;
28
+ };
29
+ /** The choices Add offers: every one that is not {@link BlockChoice.retired}, in order. */
30
+ declare function offeredChoices<C extends BlockChoice>(choices: readonly C[]): C[];
31
+ /**
32
+ * One run of consecutive choices sharing a `group` — what a menu draws under one
33
+ * heading.
34
+ *
35
+ * ⚠️ ONE FUNCTION, BOTH SURFACES, and that is the whole reason it is a function.
36
+ * A Box's menu is drawn twice — the dropdown in `components/AddBlockRow`
37
+ * (reached from the Layers tree and from the box's own settings panel) and the
38
+ * chip row at the top of the Add panel (`components/AddSectionPanel`). They draw
39
+ * ONE list, so "where does a heading start" must be ONE answer; two `map`s each
40
+ * comparing with the previous item is how the two surfaces begin dividing the
41
+ * same list differently. That is the exact defect `lib/document/add-target.ts`'s
42
+ * docblock is an essay about, one tier down.
43
+ *
44
+ * ⚠️ AND THE MENU'S CLASS NAME IS DELIBERATELY NOT WRITTEN IN THIS FILE.
45
+ * `test-footer-block-lists` §8 counts the files mentioning it to prove the menu
46
+ * has exactly ONE home, and it reads prose the same way it reads code — naming
47
+ * the class in a comment here makes this module look like a second menu. The
48
+ * markup lives in `components/AddBlockRow`; this is only the arithmetic.
49
+ *
50
+ * It preserves ORDER and never sorts: the list arrives in the order its assembler
51
+ * chose (`lib/document/container-blocks.ts` says why that order is what it is), and a
52
+ * renderer is not the place to have a second opinion about it.
53
+ *
54
+ * A list whose choices carry NO group comes back as a single run with
55
+ * `group: undefined` — so a caller written for runs draws an ungrouped list
56
+ * exactly the way it drew it before groups existed, with no branch of its own.
57
+ */
58
+ type BlockChoiceRun = {
59
+ group?: string;
60
+ items: BlockChoice[];
61
+ };
62
+ declare function blockRuns(choices: BlockChoice[]): BlockChoiceRun[];
63
+
64
+ export { type BlockChoice, type BlockChoiceRun, blockRuns, offeredChoices };
@@ -0,0 +1 @@
1
+ export{blockRuns,offeredChoices}from"../../../chunk-RUQOIQWI.js";
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Every block type a saved layout uses — the top-level sections and whatever
3
+ * sits in their slots, to any depth.
4
+ *
5
+ * WHAT IT IS FOR. A host chooses which blocks its editor offers
6
+ * (`WebsiteEditor`'s `blocks`), and that choice hides them in the palette, the
7
+ * slot menus and the drop targets. It is not a boundary: a saved page is a JSON
8
+ * document, and whoever can call the host's save endpoint can send one holding
9
+ * any type. So the host's SERVER reads the layout it was handed with this, and
10
+ * refuses a type it does not allow.
11
+ *
12
+ * READ BY SHAPE, WITH NO REGISTRY. A node is `{ type: string, props: {…} }`,
13
+ * and a slot is an array of nodes kept on a prop of its parent — directly, or
14
+ * inside an object or a list item. This walks every value under `props` and
15
+ * takes each array item of that shape as a node. It asks no block registry which
16
+ * props are slots, because the caller is a server that must not have to load
17
+ * one: this module imports nothing.
18
+ *
19
+ * That makes it wider than the editor's own walk in one direction only: a prop
20
+ * that merely LOOKS like a node (an object with a string `type` and an object
21
+ * `props`, inside an array) is counted. It does not ask for the `id` the engine
22
+ * gives every node, because the renderer draws a node without one and a request
23
+ * written by hand can leave it out. Wider is the safe side for an allow-list —
24
+ * it can refuse a page it might have accepted, never accept one it should have
25
+ * refused.
26
+ *
27
+ * `zones` — the engine's older place for slot children, which this editor has
28
+ * never written — is walked too, so a document from elsewhere hides nothing
29
+ * there.
30
+ */
31
+ /**
32
+ * The block types in `layout`, each once, sorted. `layout` is the page document
33
+ * a `WebsiteBackend` stores (`PageLayout`: `content`, `root`, `zones`); a single
34
+ * node — a section template's — is read the same way. Anything else answers
35
+ * an empty list: it holds no block.
36
+ */
37
+ declare function blockTypesIn(layout: unknown): string[];
38
+
39
+ export { blockTypesIn };
@@ -0,0 +1 @@
1
+ export{blockTypesIn}from"../../../chunk-CPL43ZLJ.js";
@@ -0,0 +1,222 @@
1
+ type TreeItem = {
2
+ type: string;
3
+ props: {
4
+ id: string;
5
+ [key: string]: unknown;
6
+ };
7
+ };
8
+ type SlotConfigView = {
9
+ components?: Record<string, unknown>;
10
+ };
11
+ /**
12
+ * Which of a component type's props are SLOTS — the prop names that hold child
13
+ * Blocks, read off the config's field map.
14
+ *
15
+ * Puck 0.20 stores slot children INLINE on the parent's props
16
+ * (`props.<slotName> = [{type,props}, …]`), NOT in `data.zones` — so a walker
17
+ * that wants a section's children has to know which prop names to look under.
18
+ * That set is per-component and lives in exactly one place, `config.components`:
19
+ * `Grid`/`Flex` call theirs `content`, but `Hero` calls it `slides`,
20
+ * `Collections` `cards`, `GalleryB` `items`, `ProductGrid` `products` and
21
+ * `Footer`/`FooterGroup` `blocks`.
22
+ *
23
+ * This is the ONE reader of that set. Hard-coding `"content"` instead is how the
24
+ * heading/SEO audit came to be blind to every heading nested in a Hero slide
25
+ * (card 66067): the walker recursed on a prop name only two of the eight slots
26
+ * happen to use, so a page with two H1s reported as fine. A type the config does
27
+ * not know has no slots — and cannot render either, so there is nothing to walk.
28
+ */
29
+ declare function slotFieldsOf(config: SlotConfigView, type: string): string[];
30
+ /**
31
+ * What a component type's config ALLOWS of the two actions that make another
32
+ * node or take one away (0.103.0): its `permissions.duplicate` and
33
+ * `permissions.delete`, each true unless the config says false — the reading
34
+ * Puck gave a config that carried none. The campaign designer's Product keeps
35
+ * its Price line this way (`{ delete: false, duplicate: false }`).
36
+ *
37
+ * The screen's tree rows, its menu and the inspector head it hands this to
38
+ * (`ScreenInspectorPanelProps.nodeActions`) all ask HERE, so the three cannot
39
+ * come to disagree about one block. Only the config's own, never the
40
+ * easel-wide permissions the edit lock sets: a document somebody else holds is
41
+ * refused at the writes, as it always was, and draws the rows it drew.
42
+ *
43
+ * A type the config does not know allows both, as one with no `permissions`.
44
+ */
45
+ declare function blockNodeActions(config: SlotConfigView, type: string): {
46
+ duplicate: boolean;
47
+ delete: boolean;
48
+ };
49
+ /**
50
+ * A slot child, addressed the way the Layers tree selects it: the node, the
51
+ * compound zone key "<parentId>:<slotName>" Puck's ops take, and its index in
52
+ * that slot.
53
+ */
54
+ type SlotChild = {
55
+ child: TreeItem;
56
+ zone: string;
57
+ index: number;
58
+ };
59
+ /**
60
+ * Every slot child of `item`, across EVERY slot field its type declares — so a
61
+ * type with two slots reports both, and nesting is general: the result's `child`
62
+ * is itself an item this function accepts.
63
+ *
64
+ * Puck 0.20 stores slot children INLINE on the parent's props, so this reads the
65
+ * arrays rather than `data.zones` (which stays empty for slots).
66
+ */
67
+ declare function childSlotsOf(config: SlotConfigView, item: TreeItem): SlotChild[];
68
+ /**
69
+ * The children of ONE slot of `item`, addressed as {@link childSlotsOf}
70
+ * addresses them (0.105.0): what the Layers tree draws under a slot it draws
71
+ * as a row of its own (`ScreenBlockRules.slotsOf`). A slot the node holds
72
+ * nothing in, or no array in, has none.
73
+ */
74
+ declare function slotChildrenIn(item: TreeItem, slot: string): SlotChild[];
75
+ /**
76
+ * WHERE a node sits in the document — the node itself, the zone key its own
77
+ * array is addressed by, and its index in that array. Exactly the three
78
+ * arguments a Puck `replace` / `remove` / `reorder` op takes.
79
+ */
80
+ type NodeLocation = {
81
+ item: TreeItem;
82
+ zone: string;
83
+ index: number;
84
+ };
85
+ /**
86
+ * Find a node by id and say WHERE IT IS, anywhere in the document — the root
87
+ * list or any slot at any depth.
88
+ *
89
+ * ── WHY A PANEL NEEDS THIS ──────────────────────────────────────────────────
90
+ * `useEasel((s) => s)` hands a field the SELECTED node and, in `ui.itemSelector`, the
91
+ * zone and index of that node. A control that has to rewrite the node's PARENT
92
+ * — "Apply to all cards" writes the whole Collections node once, so one press is
93
+ * one undo step — gets only half of what it needs: the selector's zone is the
94
+ * compound `"<parentId>:cards"`, which names the parent but says nothing about
95
+ * where the PARENT itself lives. Without that, the write has nowhere to go.
96
+ *
97
+ * ⚠️ IT IS NOT `enclosingSectionProps`, AND THE DIFFERENCE IS NOT COSMETIC.
98
+ * That one answers "which TOP-LEVEL section is this inside", returns props, and
99
+ * deliberately returns `null` for the immediate parent when the parent is not a
100
+ * root section. This one answers "where is THIS node", returns an address, and
101
+ * is happy to name a node nested inside a Box inside a Box. Its own docblock
102
+ * asks for a third question to be a third function rather than a third shape
103
+ * returned by the same walker; this is that function.
104
+ *
105
+ * ⚠️ AND IT IS NOT `childSlotsOf` WITH A FILTER. That lists one node's children;
106
+ * this searches a whole document. It is BUILT on `childSlotsOf` so the set of
107
+ * slot prop names stays read in exactly one place — hard-coding `"content"`
108
+ * instead is how the heading audit went blind to every heading nested in a Hero
109
+ * slide (card 66067), and the reason is written out on `slotFieldsOf`.
110
+ *
111
+ * ⚠️ THE CHROME ALREADY ANSWERS THIS, AND THAT IS NOT A DUPLICATE OF THIS.
112
+ * `ScreenChrome` memoises a Map of EVERY node's address (plus each
113
+ * zone's whole sibling list) and hands the lookup to the context menu as
114
+ * `locate`. That map is built once per document for a surface that needs all of
115
+ * it; this finds ONE node and is reachable from a Puck field, which the map is
116
+ * not — it lives in a component's closure and rides no context. What must not
117
+ * be two things is the set of SLOT PROP NAMES, and it is not: both walk through
118
+ * `childSlotsOf`, so an address here and an address there cannot disagree.
119
+ * Puck's own `getSelectorForId` is a third reader of the same fact, and the one
120
+ * a live store already offers — it is a hook-bound function, so a guard cannot
121
+ * call it, which is the whole reason this one is written pure.
122
+ *
123
+ * PURE, and takes the config as an argument, so a guard can assert against it
124
+ * without a Puck store, a React tree or a hook.
125
+ *
126
+ * `null` when no node carries the id — the honest answer for a stale selection,
127
+ * and every caller treats it as "there is nothing to write".
128
+ */
129
+ declare function locateNode(config: SlotConfigView, content: ReadonlyArray<TreeItem>, id: string): NodeLocation | null;
130
+ /**
131
+ * How many levels of slot children the Layers tree draws below a top-level row.
132
+ *
133
+ * The tree is a ~288px panel that already scrolls and each level costs 10px of
134
+ * indent (`.sf-subtree`'s `padding-left`, storefront-editor.css — it was 25px
135
+ * until card 66199 took the drag grip out of the flow and moved the caret to the
136
+ * row's right end), so the depth is capped rather than unbounded: `Grid.content`
137
+ * is an open slot that accepts a Grid, so a document CAN nest without limit and a
138
+ * tree that followed it would run out of width.
139
+ *
140
+ * ⚠️ 3 SINCE CARD 66273, and the level it buys is the one a merchant was stuck
141
+ * on. A hero group's blocks are the THIRD level — Hero → slide → group → blocks
142
+ * — and at 2 a group row was a LEAF: no `.sf-subtree` was rendered under it, so
143
+ * the "Add block" row that lives inside that subtree had nowhere to go, and a
144
+ * merchant who made a group in the tree could not put anything into it. The
145
+ * number was 2 because the Footer's chain (Footer → blocks → Group → blocks) was
146
+ * the only one that existed when the cap was named; the hero's is one level
147
+ * deeper.
148
+ *
149
+ * The Footer is unaffected, measured rather than hoped: `FooterGroup.blocks`
150
+ * allows FooterText / FooterEmailSignup / FooterMenu / FooterDivider and none of
151
+ * those owns a slot, so no footer row grows a third level. What DOES gain one is
152
+ * a container nested inside a container (a Box in a Box) —
153
+ * blocks a merchant can already build and could not see.
154
+ */
155
+ declare const TREE_MAX_DEPTH = 6;
156
+ /**
157
+ * Does the Layers tree draw a subtree under a node of `type` sitting at `depth`?
158
+ * True only when the type owns at least one slot AND the level is inside the cap.
159
+ * `depth` is 1 for a section's own children (the first `.sf-subtree`).
160
+ *
161
+ * The ONE place the cap is decided — both tree renderers and the "collapse all"
162
+ * gather read it here, so a row that folds and a row that draws children can
163
+ * never disagree about which rows those are.
164
+ */
165
+ declare function nestsInTree(config: SlotConfigView, type: string, depth: number): boolean;
166
+ declare const newNodeId: (type: string) => string;
167
+ declare const HEADER_TYPE = "Header";
168
+ declare const FOOTER_TYPE = "Footer";
169
+ declare const ROOT_ZONE = "root:default-zone";
170
+ /**
171
+ * Indices of the DUPLICATE pinned chrome sections in a top-level content array —
172
+ * every Header/Footer node PAST the first of its type, in ascending order. Empty
173
+ * when the array already holds at most one of each (the healthy case), so a caller
174
+ * can skip the rewrite. Keeping the FIRST of each type matches exactly what the
175
+ * Sections tree shows (footerIndex/findIndex), so healing never surprises the
176
+ * author by dropping the copy they were looking at. Accepts a loose node shape so
177
+ * both the editor's `TreeItem[]` and the published render's untyped content pass.
178
+ */
179
+ declare function pinnedDuplicateIndices(content: ReadonlyArray<{
180
+ type?: string;
181
+ }>): number[];
182
+ /**
183
+ * Ids of the DUPLICATE pinned chrome sections — the id-anchored counterpart of
184
+ * pinnedDuplicateIndices, derived FROM it so the two can never disagree about
185
+ * which copy is the keeper (the first of each type).
186
+ *
187
+ * A LIVE store must be edited by identity, never by position: an index computed
188
+ * from a render snapshot addresses whatever has since shifted into that slot,
189
+ * which is how the old editor heal deleted real sections. Ids survive that skew
190
+ * — the worst a stale read can do is name a node that is no longer there. A
191
+ * duplicate carrying no id is skipped (it cannot be named in a remove); the
192
+ * published render's index-based dedupe still drops it.
193
+ */
194
+ declare function pinnedDuplicateIds(content: ReadonlyArray<{
195
+ type?: string;
196
+ props?: {
197
+ id?: unknown;
198
+ };
199
+ }>): string[];
200
+ /**
201
+ * Which pinned chrome types a document is MISSING, and a load-time seed must
202
+ * therefore create. A type counts as missing only when it is absent from BOTH:
203
+ *
204
+ * - `live` — the editor's Puck store, read at the moment of the write; and
205
+ * - `persisted` — the document exactly as it was LOADED from the backend.
206
+ *
207
+ * Requiring both is what makes seeding idempotent, and neither check can be
208
+ * dropped. Trusting `live` alone was the duplicate-Header bug: a remount re-armed
209
+ * the seed's per-mount guard while a snapshot that lagged the store reported "no
210
+ * Header", so a second one was appended next to the first. Trusting `persisted`
211
+ * alone would re-seed a node this session has already inserted but not yet saved.
212
+ *
213
+ * Returned in no particular order — the CALLER owns the insert order, because
214
+ * only it knows that the Footer is pinned last and the Header first.
215
+ */
216
+ declare function missingPinnedTypes(live: ReadonlyArray<{
217
+ type?: string;
218
+ }>, persisted: ReadonlyArray<{
219
+ type?: string;
220
+ }>): string[];
221
+
222
+ export { FOOTER_TYPE, HEADER_TYPE, type NodeLocation, ROOT_ZONE, type SlotChild, type SlotConfigView, TREE_MAX_DEPTH, type TreeItem, blockNodeActions, childSlotsOf, locateNode, missingPinnedTypes, nestsInTree, newNodeId, pinnedDuplicateIds, pinnedDuplicateIndices, slotChildrenIn, slotFieldsOf };
@@ -0,0 +1 @@
1
+ export{FOOTER_TYPE,HEADER_TYPE,ROOT_ZONE,TREE_MAX_DEPTH,blockNodeActions,childSlotsOf,locateNode,missingPinnedTypes,nestsInTree,newNodeId,pinnedDuplicateIds,pinnedDuplicateIndices,slotChildrenIn,slotFieldsOf}from"../../../chunk-TCAAOYQY.js";
@@ -0,0 +1,128 @@
1
+ import { ReactElement } from 'react';
2
+ import { PreviewDevice } from '../../components/PreviewDeviceContext.js';
3
+ import '../content/view-tiers.js';
4
+
5
+ /**
6
+ * lib/document/device-fields.tsx — show the setting for the device the merchant is
7
+ * currently looking at, and only that one.
8
+ *
9
+ * THE PROBLEM. A section that can be sized differently on a phone stores TWO
10
+ * props and the panel drew BOTH, side by side, told apart only by a "(desktop)"
11
+ * / "(mobile)" suffix on the label. The canvas already knows which device is on
12
+ * screen; the panel ignored it, so the merchant read labels to find the control
13
+ * that matched what they were looking at.
14
+ *
15
+ * THE MECHANISM, and why this one. A Puck `resolveFields` cannot do it: in this
16
+ * Puck version the fields slice re-resolves only when the selected node's DATA
17
+ * changes (`useRegisterFieldsSlice` subscribes to `state.indexes.nodes[id]`), and
18
+ * switching device changes no data — the panel would keep whatever field set the
19
+ * last edit produced. So the decision is made where it can re-render freely: in
20
+ * the FIELD ITSELF, off the React context the editor chrome already publishes
21
+ * (`components/PreviewDeviceContext`, which the per-view Footer controls read
22
+ * for the same reason). One context, no prop threaded anywhere, and every house
23
+ * control is already a `type: "custom"` render, so wrapping one costs nothing.
24
+ *
25
+ * ⚠️ HIDDEN IS NOT DELETED. {@link deviceField} returns the SAME field object
26
+ * with the same markers (`__media`, `__text`, …) and the same key; only its
27
+ * paint is gated. Both props keep existing, keep their keys, keep their values
28
+ * and keep their `defaultProps`. Switch to Phone, type a size, switch back — the
29
+ * desktop size is exactly where it was, because nothing ever wrote to it.
30
+ * `scripts/test-device-fields.tsx` pins that round trip.
31
+ *
32
+ * TABLET (owner ruling, card 66066). There are no tablet-specific stored values
33
+ * today, and inventing them would mean a new stored prop on every section — a
34
+ * different card. So tablet shows the DESKTOP values and the panel SAYS SO
35
+ * ({@link DEVICE_NOTE}); it never presents desktop values as if they were
36
+ * tablet's. {@link shownTier} is the single place that ruling is written down.
37
+ *
38
+ * WHY THE HIDDEN FIELD LEAVES NO GAP. Puck wraps every top-level field in its
39
+ * own padded `_PuckFields-field_` box before it calls `render`, so a field that
40
+ * renders nothing would still cost ~37px of empty panel. The gate instead paints
41
+ * a zero-size marker and this package's `screen.css` collapses the
42
+ * wrapper that contains one — the same "reach the wrapper Puck owns" trick the
43
+ * fold reflow in `controls.tsx` already relies on, expressed as one CSS rule
44
+ * instead of a second DOM pass (so it cannot race the fold's).
45
+ */
46
+
47
+ /** The two tiers a stored value can belong to. Tablet is not one — see
48
+ * {@link shownTier}. */
49
+ type DeviceTier = "desktop" | "mobile";
50
+ /**
51
+ * Which tier's stored values the panel shows for a given preview device.
52
+ *
53
+ * The owner ruling in one expression: phone shows the phone values, everything
54
+ * else — desktop AND tablet — shows the desktop values.
55
+ */
56
+ declare function shownTier(device: PreviewDevice): DeviceTier;
57
+ /**
58
+ * The quiet line the panel puts above a section's settings, so a merchant can
59
+ * always tell WHICH device's value they are editing without reading the canvas.
60
+ *
61
+ * Desktop says nothing: it is the resting state, and a banner that is always
62
+ * there is a banner nobody reads. Tablet says the ruling out loud rather than
63
+ * letting the desktop values pass for tablet's own.
64
+ */
65
+ declare const DEVICE_NOTE: Readonly<Record<PreviewDevice, string | null>>;
66
+ /** The attribute the stylesheet looks for to collapse a gated-off field's Puck
67
+ * wrapper. Declared here, matched once in this package's `screen.css`, which
68
+ * every host that mounts the screen loads (it sat in the website's sheet until
69
+ * 0.103.0, so a second host's hidden rows kept their space). */
70
+ declare const DEVICE_HIDDEN_ATTR = "data-sf-device-hidden";
71
+ /** A house control's render, seen from outside: the builders in `controls.tsx`
72
+ * each type their own props, so the gate takes the widest shape that can be
73
+ * passed straight back through. */
74
+ type FieldRender = (props: Record<string, unknown>) => ReactElement;
75
+ /** Any house control — every one of them is a `type: "custom"` field whose
76
+ * `render` is a plain function of its props. */
77
+ type AnyCustomField = {
78
+ type: "custom";
79
+ render: FieldRender;
80
+ };
81
+ /** Marker carried by every gated field, in the same style as
82
+ * {@link import("./controls").FOLD_FIELD_MARKER}: the tier and the field it
83
+ * wraps live ON the field object, never only inside the render closure. Without
84
+ * it a gated control is opaque to every static walk — and the fold guard in
85
+ * `scripts/test-section-groups.ts` genuinely needs to see the header underneath
86
+ * to check its label against what it draws. Puck ignores extra keys. */
87
+ declare const DEVICE_FIELD_MARKER: "__device";
88
+ /** The payload on {@link DEVICE_FIELD_MARKER}. */
89
+ type DeviceFieldMeta = {
90
+ tier: DeviceTier;
91
+ inner: unknown;
92
+ };
93
+ /** Read a field's device payload, or null when it is not gated. The ONE place
94
+ * that knows the marker's shape. */
95
+ declare function deviceMetaOf(field: unknown): DeviceFieldMeta | null;
96
+ /** The field a gate wraps, or the field itself when it wraps nothing — what a
97
+ * static walk wants to look at. */
98
+ declare function withoutDeviceGate(field: unknown): unknown;
99
+ /**
100
+ * Paint `field` only while the canvas is showing `tier`.
101
+ *
102
+ * Everything else about the field is preserved by identity-spread — its `type`,
103
+ * its manifest markers, its data keys — so the media and neutralization walks,
104
+ * the field-key census and every stored prop see exactly what they saw before.
105
+ */
106
+ declare function deviceField<F extends {
107
+ type: "custom";
108
+ render: (p: never) => ReactElement;
109
+ }>(tier: DeviceTier, field: F): F;
110
+ /**
111
+ * The panel's device indicator — one quiet line, and only when there is
112
+ * something to say (see {@link DEVICE_NOTE}).
113
+ *
114
+ * Declared as a FIELD rather than painted by the chrome so it sits inside the
115
+ * settings panel it describes, above the first group, and so a section that has
116
+ * no device-varying control never shows it. It edits nothing: like `group()` /
117
+ * `section()` it is a header, with no prop behind it.
118
+ *
119
+ * …WHICH IS WHY IT SAYS SO ON THE FIELD (card 66201). A note is not a control, so
120
+ * a heading with nothing but this under it is a heading over nothing — and it is
121
+ * the whole reason the Hero's Content tab was empty: `_dDevice` is the section's
122
+ * first field, so it opened the implicit leading Content run and gave the panel a
123
+ * Content tab with only a banner in it, while the hero's actual copy is edited in
124
+ * the Text sub-panel.
125
+ */
126
+ declare function deviceNote(): AnyCustomField;
127
+
128
+ export { DEVICE_FIELD_MARKER, DEVICE_HIDDEN_ATTR, DEVICE_NOTE, type DeviceFieldMeta, type DeviceTier, deviceField, deviceMetaOf, deviceNote, shownTier, withoutDeviceGate };
@@ -0,0 +1 @@
1
+ export{DEVICE_FIELD_MARKER,DEVICE_HIDDEN_ATTR,DEVICE_NOTE,deviceField,deviceMetaOf,deviceNote,shownTier,withoutDeviceGate}from"../../../chunk-KWLHKKZO.js";import"../../../chunk-INRERJU4.js";import"../../../chunk-EB6NI2VK.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-BSPCSC45.js";