efficient-easel 21.0.0 → 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.
- package/README.md +15 -3
- package/dist/{CanvasDragLayer-Cd1o0HQf.d.ts → CanvasDragLayer-CFUcBbgc.d.ts} +1 -1
- package/dist/{ScreenDocumentContext-CFJeqqKk.d.ts → ScreenDocumentContext-1RgtGKWR.d.ts} +4 -0
- package/dist/blocks/index.d.ts +5 -3
- package/dist/{buckets-Tj-nkBpg.d.ts → buckets-Sw94ll9I.d.ts} +1 -1
- package/dist/canvas/index.d.ts +8 -6
- package/dist/canvas/index.js +1 -1
- package/dist/chunk-2C7W64S5.js +8 -0
- package/dist/chunk-2L6KWUBC.js +1 -0
- package/dist/chunk-467WWV4I.js +1 -0
- package/dist/chunk-4FD7TAOE.js +1 -0
- package/dist/chunk-67HCYOW4.js +1 -0
- package/dist/chunk-A2VVB4RH.js +0 -0
- package/dist/{chunk-2GVCAIPX.js → chunk-BDSLF5BR.js} +1 -1
- package/dist/{chunk-U66YKDAR.js → chunk-BIK3AO2V.js} +1 -1
- package/dist/chunk-BTDI7JAA.js +2 -0
- package/dist/chunk-DDH2DYQP.js +1 -0
- package/dist/{chunk-HGCGIRVA.js → chunk-DNQ7AF6K.js} +1 -1
- package/dist/{chunk-66JNVRQM.js → chunk-GWYNMSIP.js} +1 -1
- package/dist/{chunk-V2ULLALL.js → chunk-I67UW5UG.js} +3 -3
- package/dist/{chunk-MSGZ56QL.js → chunk-KWLHKKZO.js} +1 -1
- package/dist/{chunk-FOHHXSOL.js → chunk-MLQKNED6.js} +1 -1
- package/dist/{chunk-43AEUUNQ.js → chunk-N3MJOHAG.js} +1 -1
- package/dist/{chunk-BVN33R76.js → chunk-N7E6264U.js} +1 -1
- package/dist/chunk-OHZHYROJ.js +5 -0
- package/dist/{chunk-YHFKWV7H.js → chunk-PFFH7ASD.js} +13 -13
- package/dist/chunk-PRHBWA5V.js +0 -0
- package/dist/chunk-SNF5764Q.js +1 -0
- package/dist/chunk-SSRYU3YG.js +1 -0
- package/dist/{chunk-R4QJ6DC5.js → chunk-SWBADIQT.js} +1 -1
- package/dist/{chunk-GOTN2KY4.js → chunk-TIAWIOGD.js} +1 -1
- package/dist/chunk-TUXLORVR.js +15 -0
- package/dist/{chunk-FGNR22NY.js → chunk-U5DNBT63.js} +1 -1
- package/dist/{chunk-EZTP6E2M.js → chunk-U7TFWHST.js} +1 -1
- package/dist/{chunk-2M4T27BI.js → chunk-WJJ7H42G.js} +7 -7
- package/dist/chunk-YIUE4US7.js +0 -0
- package/dist/{chunk-O7Q4DDJT.js → chunk-YM4UEGBV.js} +1 -1
- package/dist/chunk-YVFYWAYU.js +65 -0
- package/dist/{chunk-N2RISV46.js → chunk-ZOSEBPAI.js} +1 -1
- package/dist/copy/index.d.ts +2 -2
- package/dist/copy/index.js +11 -11
- package/dist/drag/index.d.ts +2 -2
- package/dist/drag/index.js +1 -1
- package/dist/draw/client.d.ts +1 -1
- package/dist/draw/client.js +1 -1
- package/dist/draw/index.d.ts +8 -8
- package/dist/draw/index.js +1 -1
- package/dist/easel/easel.css +3 -1
- package/dist/easel/index.d.ts +2 -2
- package/dist/easel/index.js +1 -1
- package/dist/fields/index.d.ts +4 -4
- package/dist/fields/index.js +1 -1
- package/dist/panel/index.d.ts +2 -2
- package/dist/render/index.d.ts +2 -2
- package/dist/render/index.js +5 -5
- package/dist/{repeat-Czi-6zPX.d.ts → repeat-BNgSq2Nw.d.ts} +1 -1
- package/dist/screen/components/AddBlockRow.d.ts +1 -1
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.d.ts +2 -2
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/NodeContextMenu.d.ts +13 -13
- package/dist/screen/components/NodeContextMenu.js +1 -1
- package/dist/screen/components/PageEditGuardNotices.js +1 -1
- package/dist/screen/components/PreviewPartsContext.d.ts +2 -2
- package/dist/screen/components/PreviewPartsContext.js +1 -1
- package/dist/screen/components/SaveControls.d.ts +7 -7
- package/dist/screen/components/ScreenChrome.js +1 -1
- package/dist/screen/components/ScreenDocumentContext.d.ts +2 -2
- package/dist/screen/components/ScreenDocumentContext.js +1 -1
- package/dist/screen/components/ScreenMount.d.ts +7 -7
- package/dist/screen/components/ScreenMount.js +1 -1
- package/dist/screen/components/ScreenStoreProvider.d.ts +7 -7
- package/dist/screen/components/ScreenStoreProvider.js +1 -1
- package/dist/screen/components/SectionScreenShell.js +17 -17
- package/dist/screen/components/SlotChildActionsContext.d.ts +1 -1
- package/dist/screen/components/usePartBridge.d.ts +7 -7
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.d.ts +8 -8
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/admin-bridge.d.ts +1 -1
- package/dist/screen/lib/admin-bridge.js +1 -1
- package/dist/screen/lib/content/view-tiers.d.ts +1 -1
- package/dist/screen/lib/document/add-target-types.d.ts +55 -0
- package/dist/screen/lib/document/add-target-types.js +1 -0
- package/dist/screen/lib/document/block-choice.d.ts +64 -0
- package/dist/screen/lib/document/block-choice.js +1 -0
- package/dist/screen/lib/document/block-types-in.d.ts +39 -0
- package/dist/screen/lib/document/block-types-in.js +1 -0
- package/dist/screen/lib/document/content-tree.d.ts +222 -0
- package/dist/screen/lib/document/content-tree.js +1 -0
- package/dist/screen/lib/document/device-fields.d.ts +128 -0
- package/dist/screen/lib/document/device-fields.js +1 -0
- package/dist/screen/lib/document/field-buckets.d.ts +36 -0
- package/dist/screen/lib/document/field-buckets.js +1 -0
- package/dist/screen/lib/document/field-markers.d.ts +205 -0
- package/dist/screen/lib/document/field-markers.js +1 -0
- package/dist/screen/lib/document/hidable.d.ts +44 -0
- package/dist/screen/lib/document/hidable.js +1 -0
- package/dist/screen/lib/document/palette-sections.d.ts +103 -0
- package/dist/screen/lib/document/palette-sections.js +1 -0
- package/dist/screen/lib/document/panel-fields.d.ts +47 -0
- package/dist/screen/lib/document/panel-fields.js +1 -0
- package/dist/screen/lib/document/panel-no-control-mark.d.ts +74 -0
- package/dist/screen/lib/document/panel-no-control-mark.js +1 -0
- package/dist/screen/lib/document/part-id.d.ts +23 -0
- package/dist/screen/lib/document/part-id.js +1 -0
- package/dist/screen/lib/document/preview-click.d.ts +49 -0
- package/dist/screen/lib/document/preview-click.js +1 -0
- package/dist/screen/lib/document/preview-dom.d.ts +8 -0
- package/dist/screen/lib/document/preview-dom.js +1 -0
- package/dist/screen/lib/document/preview-events.d.ts +25 -0
- package/dist/screen/lib/document/preview-events.js +1 -0
- package/dist/screen/lib/document/preview-selection-context.d.ts +72 -0
- package/dist/screen/lib/document/preview-selection-context.js +1 -0
- package/dist/screen/lib/document/section-doc.d.ts +24 -0
- package/dist/screen/lib/document/section-doc.js +1 -0
- package/dist/screen/lib/document/slot-child-name.d.ts +225 -0
- package/dist/screen/lib/document/slot-child-name.js +1 -0
- package/dist/screen/lib/document/slot-heal.d.ts +5 -0
- package/dist/screen/lib/document/slot-heal.js +1 -0
- package/dist/screen/lib/document/slot-section-spec.d.ts +96 -0
- package/dist/screen/lib/document/slot-section-spec.js +1 -0
- package/dist/screen/lib/document/style-clipboard.d.ts +144 -0
- package/dist/screen/lib/document/style-clipboard.js +1 -0
- package/dist/screen/lib/document/text-control-kinds.d.ts +71 -0
- package/dist/screen/lib/document/text-control-kinds.js +1 -0
- package/dist/screen/lib/document/tree-reveal.d.ts +62 -0
- package/dist/screen/lib/document/tree-reveal.js +1 -0
- package/dist/screen/lib/document/use-section-ops.d.ts +110 -0
- package/dist/screen/lib/document/use-section-ops.js +1 -0
- package/dist/screen/lib/document-addressing.d.ts +2 -2
- package/dist/screen/lib/document-switch.d.ts +1 -1
- package/dist/screen/lib/host.d.ts +2 -2
- package/dist/screen/lib/key-scope.d.ts +1 -1
- package/dist/screen/lib/key-scope.js +1 -1
- package/dist/screen/lib/media-panel.d.ts +2 -2
- package/dist/screen/lib/media-picker.d.ts +2 -2
- package/dist/screen/lib/page-lock.d.ts +1 -1
- package/dist/screen/lib/puck/add-target-types.d.ts +3 -55
- package/dist/screen/lib/puck/add-target-types.js +1 -0
- package/dist/screen/lib/puck/block-choice.d.ts +1 -64
- package/dist/screen/lib/puck/block-choice.js +1 -1
- package/dist/screen/lib/puck/block-types-in.d.ts +1 -39
- package/dist/screen/lib/puck/block-types-in.js +1 -1
- package/dist/screen/lib/puck/content-tree.d.ts +1 -222
- package/dist/screen/lib/puck/content-tree.js +1 -1
- package/dist/screen/lib/puck/device-fields.d.ts +3 -127
- package/dist/screen/lib/puck/device-fields.js +1 -1
- package/dist/screen/lib/puck/field-buckets.d.ts +2 -36
- package/dist/screen/lib/puck/field-buckets.js +1 -1
- package/dist/screen/lib/puck/field-markers.d.ts +2 -205
- package/dist/screen/lib/puck/field-markers.js +1 -1
- package/dist/screen/lib/puck/hidable.d.ts +1 -44
- package/dist/screen/lib/puck/hidable.js +1 -1
- package/dist/screen/lib/puck/palette-sections.d.ts +2 -97
- package/dist/screen/lib/puck/palette-sections.js +1 -1
- package/dist/screen/lib/puck/panel-fields.d.ts +1 -47
- package/dist/screen/lib/puck/panel-fields.js +1 -1
- package/dist/screen/lib/puck/panel-no-control-mark.d.ts +2 -74
- package/dist/screen/lib/puck/panel-no-control-mark.js +1 -1
- package/dist/screen/lib/puck/part-id.d.ts +1 -23
- package/dist/screen/lib/puck/part-id.js +1 -1
- package/dist/screen/lib/puck/preview-click.d.ts +1 -49
- package/dist/screen/lib/puck/preview-click.js +1 -1
- package/dist/screen/lib/puck/preview-dom.d.ts +1 -8
- package/dist/screen/lib/puck/preview-dom.js +1 -1
- package/dist/screen/lib/puck/preview-events.d.ts +1 -25
- package/dist/screen/lib/puck/preview-events.js +1 -1
- package/dist/screen/lib/puck/preview-selection-context.d.ts +2 -72
- package/dist/screen/lib/puck/preview-selection-context.js +1 -1
- package/dist/screen/lib/puck/section-doc.d.ts +3 -18
- package/dist/screen/lib/puck/section-doc.js +1 -1
- package/dist/screen/lib/puck/slot-child-name.d.ts +1 -225
- package/dist/screen/lib/puck/slot-child-name.js +1 -1
- package/dist/screen/lib/puck/slot-heal.d.ts +2 -5
- package/dist/screen/lib/puck/slot-heal.js +1 -1
- package/dist/screen/lib/puck/slot-section-spec.d.ts +1 -96
- package/dist/screen/lib/puck/slot-section-spec.js +1 -0
- package/dist/screen/lib/puck/style-clipboard.d.ts +12 -114
- package/dist/screen/lib/puck/style-clipboard.js +1 -1
- package/dist/screen/lib/puck/text-control-kinds.d.ts +1 -71
- package/dist/screen/lib/puck/text-control-kinds.js +1 -1
- package/dist/screen/lib/puck/tree-reveal.d.ts +1 -62
- package/dist/screen/lib/puck/tree-reveal.js +1 -1
- package/dist/screen/lib/puck/use-section-ops.d.ts +4 -105
- package/dist/screen/lib/puck/use-section-ops.js +1 -1
- package/dist/screen/lib/screen-parts.d.ts +25 -18
- package/dist/screen/lib/screen-parts.js +1 -1
- package/dist/screen/lib/section-template-types.d.ts +1 -1
- package/dist/screen/lib/section-templates.d.ts +1 -1
- package/dist/screen/lib/section-templates.js +1 -1
- package/dist/screen/lib/session-context.d.ts +1 -1
- package/dist/screen/lib/session-context.js +1 -1
- package/dist/screen/lib/session.d.ts +3 -3
- package/dist/screen/lib/session.js +1 -1
- package/dist/screen/lib/shared-section-types.d.ts +1 -1
- package/dist/screen/lib/shared-sections.d.ts +1 -1
- package/dist/screen/lib/shared-sections.js +1 -1
- package/dist/screen/screen.css +2 -2
- package/dist/strings/index.d.ts +2 -2
- package/dist/strings/index.js +1 -1
- package/dist/text-styles/index.js +21 -21
- package/dist/tree/index.d.ts +1 -1
- package/dist/{types-CDX6vd6A.d.ts → types-B8NwXKlE.d.ts} +1 -1
- package/dist/{watch-BTYOJpQU.d.ts → watch-D8xZow3y.d.ts} +2 -2
- package/dist/{words-BeX5eGq7.d.ts → words-CmEnDoOe.d.ts} +1 -1
- package/package.json +154 -10
- package/dist/chunk-2E2SXDYQ.js +0 -1
- package/dist/chunk-4IJVV7DA.js +0 -1
- package/dist/chunk-7L3NKHEC.js +0 -15
- package/dist/chunk-APVUYICP.js +0 -65
- package/dist/chunk-BHRC3ASL.js +0 -1
- package/dist/chunk-I54UCYOU.js +0 -1
- package/dist/chunk-LXTM2OLQ.js +0 -2
- package/dist/chunk-NA3GMA43.js +0 -5
- package/dist/chunk-OBWDHKLI.js +0 -8
- package/dist/chunk-Q2A7RHG2.js +0 -1
- package/dist/chunk-QIDRJH3S.js +0 -1
- package/dist/chunk-RSCMJIWS.js +0 -1
- /package/dist/{chunk-MQNBD6AB.js → chunk-3QB2ZQXK.js} +0 -0
- /package/dist/{chunk-LER7RKTO.js → chunk-5XL2RXFU.js} +0 -0
- /package/dist/{chunk-6W7WLPZH.js → chunk-6UAEFOJ4.js} +0 -0
- /package/dist/{chunk-26OOWIJJ.js → chunk-7OCEPOEJ.js} +0 -0
- /package/dist/{chunk-IQ5TA7AM.js → chunk-AJ2SUSET.js} +0 -0
- /package/dist/{chunk-DUVRZ456.js → chunk-ANPOR6EY.js} +0 -0
- /package/dist/{chunk-5ZBY24K7.js → chunk-CPL43ZLJ.js} +0 -0
- /package/dist/{chunk-PIND6KE7.js → chunk-I6SK6ZDT.js} +0 -0
- /package/dist/{chunk-7F52SZOI.js → chunk-INRERJU4.js} +0 -0
- /package/dist/{chunk-R5L2E7JX.js → chunk-MGVI67QV.js} +0 -0
- /package/dist/{chunk-IYT6NN2J.js → chunk-R4AUZVA3.js} +0 -0
- /package/dist/{chunk-M2Z775ZC.js → chunk-RUQOIQWI.js} +0 -0
- /package/dist/{chunk-PLVEGYK6.js → chunk-TCAAOYQY.js} +0 -0
- /package/dist/{chunk-PA3PNTVV.js → chunk-VKPOH6MK.js} +0 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import{AddBlockRow as e}from"../../chunk-
|
|
2
|
-
return
|
|
3
|
-
return
|
|
4
|
-
/* @__PURE__ */
|
|
5
|
-
return
|
|
6
|
-
/* @__PURE__ */
|
|
7
|
-
/* @__PURE__ */
|
|
8
|
-
/* @__PURE__ */
|
|
9
|
-
/* @__PURE__ */
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
-
return
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
-
/* @__PURE__ */
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */
|
|
1
|
+
import{AddBlockRow as e}from"../../chunk-U7TFWHST.js";import{scrollPreviewToSection as n,gotoPreviewSlide as o}from"../../chunk-DDH2DYQP.js";import{useEaselUndoKeys as r}from"../../chunk-DNQ7AF6K.js";import{SlotChildActionsProvider as t}from"../../chunk-KCBEE2MC.js";import{DEFAULT_PANEL_W as s}from"../../chunk-C56MPJBH.js";import{usePartBridge as i}from"../../chunk-67HCYOW4.js";import{useSectionOps as c}from"../../chunk-MLQKNED6.js";import"../../chunk-RUQOIQWI.js";import{SELECTION_MODE as p,useScreenPinned as l,useScreenCanvasFrame as m,useScreenInspectorPanel as d,useScreenPickFollowsSelection as a,sameInspectorMode as u,useStandaloneScreenBridges as h,useScreenBlockLook as k,useScreenBlockRules as j,isSelectionMode as f}from"../../chunk-OHZHYROJ.js";import"../../chunk-PRHBWA5V.js";import{MediaPopup as S}from"../../chunk-2G6MAXPY.js";import{useScreenDocument as y}from"../../chunk-BTDI7JAA.js";import"../../chunk-77IWWW6X.js";import"../../chunk-ERR437B5.js";import"../../chunk-UNVKPVZW.js";import"../../chunk-GMCZXMOV.js";import"../../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";import"../../chunk-YM4UEGBV.js";import"../../chunk-SNF5764Q.js";import"../../chunk-MQA7OFRA.js";import{DEFAULT_SCREEN_WORDS as A}from"../../chunk-EB6NI2VK.js";import{slotChildRowName as C}from"../../chunk-SSRYU3YG.js";import"../../chunk-AJ2SUSET.js";import"../../chunk-ANPOR6EY.js";import"../../chunk-6UAEFOJ4.js";import"../../chunk-R4AUZVA3.js";import{slotFieldsOf as N,nestsInTree as O}from"../../chunk-TCAAOYQY.js";import{useEasel as x}from"../../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{LayersTree as F,Subtree as D,TreeRow as H,TreeRowAction as W,TreeSeam as B}from"../../chunk-WHS6Y55E.js";import{DEFAULT_TREE_WORDS as P}from"../../chunk-K56YDHYQ.js";import"../../chunk-IWCKVZHS.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-BSHIQIZC.js";import"../../chunk-NDRZP6YR.js";import{DEFAULT_SAVE_WORDS as R,saveIndicator as V}from"../../chunk-H6DDIBQ4.js";import{SaveState as Y,panelWidthVars as g}from"../../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{useWords as I}from"../../chunk-MFIRYGHW.js";import"../../chunk-WJJ7H42G.js";import"../../chunk-TQ5Y6S2X.js";import{useTreeDrag as M}from"../../chunk-3S5N4HLJ.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-4FD7TAOE.js";import"../../chunk-LF3FUSCQ.js";import{zoneKey as v,parseZoneKey as z}from"../../chunk-K7BTCBWD.js";import"../../chunk-L55YIXDC.js";import"../../chunk-467WWV4I.js";import"../../chunk-TIAWIOGD.js";import"../../chunk-MGVI67QV.js";import{useState as E,useRef as b,useEffect as w,useCallback as Q,Fragment as K}from"react";import{Tooltip as J}from"efficient-shell/ui";import{TrashIcon as T}from"efficient-shell/icons/efficient";import{jsxs as Z,jsx as U,Fragment as L}from"react/jsx-runtime";var G=e=>n=>{n.target.closest("button, input")||e()},$={rowClick:G};function X(){const{saveState:X,readOnly:q,readOnlyReason:_=null}=y(),ee=c(),{appState:ne,selectedItem:oe,config:re}=x(e=>e),[te,se]=E(p),ie=I("screen",A),ce=I("tree",P),pe=I("save",R),{first:le,last:me,panelOf:de}=l(),ae=de(le),ue=m(),he=d(),ke=ne.data.content?.[0]??null,je=ke?.props.id??null,fe=ke?.type===le,Se=ke?.type===me,ye=b(null),Ae=b(null);r(Ae),a(oe?.props.id),w(()=>{je&&ye.current!==je&&(ye.current=je,fe?se(ae??p):oe||ee.select({index:0}))},[je,oe,ee,fe]);const Ce=Q(e=>se(n=>u(n,e)?n:e),[]),Ne=h({kind:te.kind,mode:te,open:Ce,show:e=>se(e),reveal:()=>{},select:(e,n)=>{se(e=>u(e,n)?e:n),ee.select(e)}}),{selectNode:Oe}=i({mode:te,setMode:se,onOpenPart:n}),xe=k(),{labelAtLevel:Fe,Icon:De}=xe,{canAddTo:He}=j(),We=e=>Fe(e,"block",re.components[e]?.label??e),Be=e=>Fe(e,"section",We(e)),Pe=!fe&&f(te)&&oe?.props.id===je,Re=ke?He(ke.type)?.spec??null:null,Ve=ke&&Re?`${ke.props.id}:${Re.slot}`:null,Ye=ke&&Re&&Array.isArray(ke.props[Re.slot])?ke.props[Re.slot]:[],ge=e=>C(e,We,xe.plainText),Ie=(e,r)=>{ke&&Re&&Ve&&(se(p),Re.slider?(o(String(ke.props.id),e),ee.select({index:e,zone:Ve}),n(String(ke.props.id))):(ee.select({index:e,zone:Ve}),n(r)))},Me=()=>{if(!ke||!Re||!Ve)return;const e=Ye.length;ee.insertComponent(Ve,Re.childType,e),se(p),Re.slider?requestAnimationFrame(()=>{o(String(ke.props.id),e),ee.select({index:e,zone:Ve})}):ee.select({index:e,zone:Ve})},ve=e=>N(re,e),ze=e=>{const{parentId:n,slot:o}=z(e),r=e=>{if(!e)return null;if(String(e.props.id)===n)return e;for(const n of ve(e.type)){const o=Array.isArray(e.props[n])?e.props[n]:[];for(const e of o){const n=r(e);if(n)return n}}return null},t=r(ke)?.props[o];return Array.isArray(t)?t.length:0},Ee=(e,n,o)=>{const r=Math.min(Math.max(o,0),ze(e)),t=n<r?r-1:r;t!==n&&(ee.reorderComponent(e,n,t),se(p),ee.select({index:t,zone:e}))},be=M({keyOf:e=>e.id,readOnly:Boolean(q),canDrop:(e,n)=>v(n)===e.zone&&n.index>=0&&n.index<=ze(e.zone),onDrop:(e,n)=>Ee(e.zone,e.index,n.index),onStep:(e,n)=>Ee(e.zone,e.index,n<0?e.index-1:e.index+2)}),we=(e,n)=>/* @__PURE__ */U(B,{...q?{}:be.seam({place:{...z(e),index:n}})},`seam:${e}:${n}`),Qe=e=>xe.blockRowName(e,We),Ke=(e,o,r)=>{se(p),ee.select({index:o,zone:e}),n(r)},Je=(e,n,o)=>{ee.insertComponent(e,n,o),se(p),ee.select({index:o,zone:e})},Te=(n,o,r)=>/* @__PURE__ */U(e,{choices:r,onPick:e=>Je(n,e,o)}),Ze=(e,n)=>{const o=ve((r=e).type).flatMap(e=>(Array.isArray(r.props[e])?r.props[e]:[]).map((n,o)=>({child:n,zone:`${r.props.id}:${e}`,index:o})));var r;const t=He(e.type),s=t?.choices??null,i="footer"===t?.source?Qe:ge;/* @__PURE__ */
|
|
2
|
+
return Z(L,{children:[o.map(({child:e,zone:o,index:r})=>{const t=oe?.props.id===e.props.id,s=O(re,e.type,n),c=i(e),l=String(e.props.id),m=()=>Ke(o,r,l),{rowProps:d,...a}=be.row({item:{id:l,zone:o,index:r},place:{...z(o),index:r}},{onClick:G(m)});/* @__PURE__ */
|
|
3
|
+
return Z(K,{children:[0===r&&we(o,0),
|
|
4
|
+
/* @__PURE__ */U(H,{words:ce,icon:/* @__PURE__ */U(De,{type:e.type,size:13}),name:c,selected:t,onSelect:m,...a,actions:/* @__PURE__ */U(W,{kind:"delete",label:ie.deleteNamed({name:c}),onClick:()=>{return e=o,n=r,ee.removeComponent(e,n),se(p),void ee.select(null);var e,n},children:/* @__PURE__ */U(T,{size:13})}),rowProps:d}),s&&/* @__PURE__ */U(D,{children:Ze(e,n+1)}),we(o,r+1)]},String(e.props.id??`${o}-${r}`))}),t&&s?Te(`${e.props.id}:${t.slot}`,o.length,s):null]})},Ue="HeroSingle"===ke?.type,Le=Boolean(ke)&&(Boolean(He(ke.type))||ve(ke.type).length>0),Ge=Boolean(ke)&&(Boolean(Re)||Se||fe||Ue||Le);/* @__PURE__ */
|
|
5
|
+
return Z("div",{ref:Ae,className:"sf-editor es-editor",style:g(s),children:[
|
|
6
|
+
/* @__PURE__ */U("div",{className:"sf-section-bar",children:/* @__PURE__ */U(Y,null!==_?{tone:"off",label:_,role:"status"}:{...V(X,pe),role:"status"})}),
|
|
7
|
+
/* @__PURE__ */Z("div",{className:"sf-body",children:[Ge&&ke&&/* @__PURE__ */Z("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
|
|
8
|
+
/* @__PURE__ */U("div",{className:"sf-panel-head",children:/* @__PURE__ */U(J,{content:fe?ie.headerSettings:ie.sectionSettings({name:Be(ke.type)}),side:"bottom",children:/* @__PURE__ */U("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(Pe?"is-selected":""),"aria-pressed":Pe,onClick:()=>{fe?se(ae??p):(se(p),ee.select({index:0}))},children:Be(ke.type)})})}),
|
|
9
|
+
/* @__PURE__ */U(F,{className:"sf-tree sf-scroll",rootProps:be.rootProps(),words:ce,children:/* @__PURE__ */U(D,{children:fe?
|
|
10
|
+
/* @__PURE__ */U(H,{words:ce,icon:/* @__PURE__ */U(De,{type:"header",size:13}),name:ie.headerSettings,selected:te.kind===ae?.kind,onSelect:()=>se(ae??p),rowProps:{onClick:G(()=>se(ae??p))}}):Re?/* @__PURE__ */Z(L,{children:[Ye.map((e,n)=>{const o=oe?.props.id===e.props.id,r=ge(e),t=String(e.props.id),s=()=>Ie(n,t),{rowProps:i,...c}=be.row({item:{id:t,zone:Ve,index:n},place:{...z(Ve),index:n}},{onClick:G(s)});/* @__PURE__ */
|
|
11
|
+
return Z(K,{children:[0===n&&we(Ve,0),
|
|
12
|
+
/* @__PURE__ */U(H,{words:ce,icon:/* @__PURE__ */U(De,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */U(W,{kind:"delete",label:ie.deleteNamed({name:r}),onClick:()=>{return e=n,void(Ve&&(ee.removeComponent(Ve,e),se(p),ee.select(null)));var e},children:/* @__PURE__ */U(T,{size:13})}),rowProps:i}),we(Ve,n+1)]},String(e.props.id??n))}),
|
|
13
|
+
/* @__PURE__ */Z("button",{type:"button",className:"sf-add-card",onClick:Me,children:[
|
|
14
|
+
/* @__PURE__ */U("span",{className:"sf-plus sf-plus--sm",children:"+"}),Re.addLabel]}),je?Ne.partRows?.(ke,$):null]}):Ze(ke,1)})})]}),
|
|
15
|
+
/* @__PURE__ */U("div",{className:"sf-center",children:/* @__PURE__ */U("div",{className:"sf-preview-host",children:/* @__PURE__ */U(ue,{})})}),
|
|
16
|
+
/* @__PURE__ */U(t,{value:{selectChild:(e,n,o,r)=>"section"===He(r)?.source?Ie(n,o):Ke(e,n,o),addChild:(e,n,o,r,t)=>"section"===He(t)?.source?Me():Je(`${e}:${n}`,o,r),childRowName:ge,blockRowName:Qe},children:/* @__PURE__ */U(he,{mode:te,onOpenWebsiteSettings:Ne.openSettings??(()=>{}),onSelectNode:Oe,hideNodeActions:!0})})]}),
|
|
17
|
+
/* @__PURE__ */U(S,{})]})}export{X as default};
|
|
@@ -6,13 +6,13 @@ import '../../data/index.js';
|
|
|
6
6
|
import '../../types-41704JE4.js';
|
|
7
7
|
import '../../resolve-D68pb3Bx.js';
|
|
8
8
|
import '../../plan-CZS902DV.js';
|
|
9
|
-
import '../../watch-
|
|
9
|
+
import '../../watch-D8xZow3y.js';
|
|
10
10
|
import '../../types-B3iSHX-w.js';
|
|
11
11
|
import '../../types-Cy7rdmXt.js';
|
|
12
12
|
import '../../wordFit-7XpmhcaW.js';
|
|
13
13
|
import '../../edit-lock/index.js';
|
|
14
14
|
import '../../panelWidths-DgQXiPXU.js';
|
|
15
|
-
import '../../CanvasDragLayer-
|
|
15
|
+
import '../../CanvasDragLayer-CFUcBbgc.js';
|
|
16
16
|
import '../../session-DSQFmIvx.js';
|
|
17
17
|
import '../../words-SD4neL0n.js';
|
|
18
18
|
import '../../types-BbOBWXMP.js';
|
|
@@ -23,10 +23,10 @@ import 'efficient-shell/ui';
|
|
|
23
23
|
import '../../words-Cl9xMUYY.js';
|
|
24
24
|
import './AddSidePanel.js';
|
|
25
25
|
import '../lib/section-template-types.js';
|
|
26
|
-
import '../lib/
|
|
26
|
+
import '../lib/document/content-tree.js';
|
|
27
27
|
import '../lib/shared-section-types.js';
|
|
28
|
-
import '../lib/
|
|
29
|
-
import '../../ScreenDocumentContext-
|
|
28
|
+
import '../lib/document/block-choice.js';
|
|
29
|
+
import '../../ScreenDocumentContext-1RgtGKWR.js';
|
|
30
30
|
import '../lib/document-contract.js';
|
|
31
31
|
import '../lib/document-switch.js';
|
|
32
32
|
import '../../engine-CvXpFE86.js';
|
|
@@ -36,8 +36,8 @@ import '../lib/backend-error.js';
|
|
|
36
36
|
import '../lib/host-chrome.js';
|
|
37
37
|
import '../lib/links/link-filters.js';
|
|
38
38
|
import '../lib/document-hooks.js';
|
|
39
|
-
import '../lib/
|
|
40
|
-
import '../lib/
|
|
39
|
+
import '../lib/document/add-target-types.js';
|
|
40
|
+
import '../lib/document/slot-section-spec.js';
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* The editor-chrome half of the click→part bridge, in ONE place because both
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{usePartBridge}from"../../chunk-
|
|
1
|
+
export{usePartBridge}from"../../chunk-67HCYOW4.js";import"../../chunk-MLQKNED6.js";import"../../chunk-OHZHYROJ.js";import"../../chunk-PRHBWA5V.js";import"../../chunk-FHCKFOCD.js";import"../../chunk-MQA7OFRA.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-FIVU2COQ.js";import"../../chunk-BSHIQIZC.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-3S5N4HLJ.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-4FD7TAOE.js";import"../../chunk-LF3FUSCQ.js";import"../../chunk-K7BTCBWD.js";import"../../chunk-L55YIXDC.js";import"../../chunk-467WWV4I.js";import"../../chunk-TIAWIOGD.js";import"../../chunk-MGVI67QV.js";
|
package/dist/screen/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { DocumentScreen, default as ScreenMount } from './components/ScreenMount.js';
|
|
2
2
|
export { default as ScreenStoreProvider } from './components/ScreenStoreProvider.js';
|
|
3
|
-
export { NodeDefaults, SELECTION_MODE, ScreenBlockLook, ScreenBlockRules, ScreenBridges, ScreenCanvas, ScreenCanvasDrag, ScreenCanvasDragContext, ScreenCanvasHeadProps, ScreenCanvasTargetProvider, ScreenDevices, ScreenDocumentOps, ScreenDragItem, ScreenInspector, ScreenInspectorMode, ScreenInspectorPanelProps, ScreenLeftPanel, ScreenLeftView, ScreenLeftViewFrame, ScreenLeftViewRules, ScreenMainAction, ScreenMediaDrop, ScreenMediaFile, ScreenMenuItem, ScreenMenuRows, ScreenNewNode, ScreenNode, ScreenNodeActions, ScreenNodeLevel, ScreenNodeMaker, ScreenPartMode, ScreenParts, ScreenPartsProvider, ScreenPinnedBand, ScreenPinnedNodes, ScreenRailItem, ScreenSelector, ScreenSharedSections, ScreenSlot, ScreenSlotAction, ScreenSlotMode, ScreenStyleClipboard, ScreenStyleDocument, ScreenStylePastePlan, ScreenToastExtra, ScreenTree, ScreenTreeFolds, ScreenTreeRows, 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 './lib/screen-parts.js';
|
|
3
|
+
export { NodeDefaults, SELECTION_MODE, ScreenBlockLook, ScreenBlockRules, ScreenBridges, ScreenCanvas, ScreenCanvasDrag, ScreenCanvasDragContext, ScreenCanvasHeadProps, ScreenCanvasTargetProvider, ScreenDevices, ScreenDocumentOps, ScreenDragItem, ScreenInspector, ScreenInspectorMode, ScreenInspectorPanelProps, ScreenLeftPanel, ScreenLeftView, ScreenLeftViewFrame, ScreenLeftViewRules, ScreenMainAction, ScreenMediaDrop, ScreenMediaFile, ScreenMenuItem, ScreenMenuRows, ScreenNewNode, ScreenNode, ScreenNodeActions, ScreenNodeLevel, ScreenNodeMaker, ScreenPartMode, ScreenParts, ScreenPartsProvider, ScreenPinnedBand, ScreenPinnedNodes, ScreenRailItem, ScreenSelector, ScreenSharedSections, ScreenSlot, ScreenSlotAction, ScreenSlotMode, ScreenStyleClipboard, ScreenStyleDocument, ScreenStylePastePlan, ScreenToastExtra, ScreenTree, ScreenTreeFolds, ScreenTreeRows, 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 './lib/screen-parts.js';
|
|
4
4
|
export { DefaultBackend, EFFICIENT_BACKEND, EaselSession, SessionBackend, SessionBlocks, activateEaselSession, backendOf, createEaselSession, currentEaselSession, deactivateEaselSession, efficientClientOpen, isEfficientBackend, provideDefaultBackend, resetAmbientEaselSession, sessionRegistry, setSessionBridgedSite, setSessionDocumentSite } from './lib/session.js';
|
|
5
5
|
export { EaselSessionProvider, useEaselSession } from './lib/session-context.js';
|
|
6
|
-
export { A as AnyDocumentAddressing, D as DETACHED_EASEL_HOST, a as DocumentAddressing, E as EaselBlockType, b as EaselFieldDescription, c as EaselHost, d as EaselHostAddress, e as EaselHostContext, f as EaselHostPanels, g as EaselHostProvider, h as EaselMessageType, i as EaselSelection, j as EaselToHostMessage, H as HostPickedMedia, k as HostToEaselMessage, I as InboundHostMessage, N as NO_DOCUMENT_ADDRESSING, P as PageEditOp, l as PickedMediaSource, S as SectionScreenTarget, m as SendToHost, n as createEaselHost, u as useEaselHost, o as useHostEscape } from '../ScreenDocumentContext-
|
|
6
|
+
export { A as AnyDocumentAddressing, D as DETACHED_EASEL_HOST, a as DocumentAddressing, E as EaselBlockType, b as EaselFieldDescription, c as EaselHost, d as EaselHostAddress, e as EaselHostContext, f as EaselHostPanels, g as EaselHostProvider, h as EaselMessageType, i as EaselSelection, j as EaselToHostMessage, H as HostPickedMedia, k as HostToEaselMessage, I as InboundHostMessage, N as NO_DOCUMENT_ADDRESSING, P as PageEditOp, l as PickedMediaSource, S as SectionScreenTarget, m as SendToHost, n as createEaselHost, u as useEaselHost, o as useHostEscape } from '../ScreenDocumentContext-1RgtGKWR.js';
|
|
7
7
|
export { EaselCapabilities, EaselDocument, EaselDocumentAdapter, EaselPageRow, SiteRecord, SiteRecordPatch, WebsiteEditLock } from './lib/document-contract.js';
|
|
8
8
|
import 'react';
|
|
9
9
|
import '../blocks/index.js';
|
|
@@ -12,13 +12,13 @@ import '../data/index.js';
|
|
|
12
12
|
import '../types-41704JE4.js';
|
|
13
13
|
import '../resolve-D68pb3Bx.js';
|
|
14
14
|
import '../plan-CZS902DV.js';
|
|
15
|
-
import '../watch-
|
|
15
|
+
import '../watch-D8xZow3y.js';
|
|
16
16
|
import '../types-B3iSHX-w.js';
|
|
17
17
|
import '../types-Cy7rdmXt.js';
|
|
18
18
|
import '../wordFit-7XpmhcaW.js';
|
|
19
19
|
import '../edit-lock/index.js';
|
|
20
20
|
import '../panelWidths-DgQXiPXU.js';
|
|
21
|
-
import '../CanvasDragLayer-
|
|
21
|
+
import '../CanvasDragLayer-CFUcBbgc.js';
|
|
22
22
|
import '../session-DSQFmIvx.js';
|
|
23
23
|
import '../words-SD4neL0n.js';
|
|
24
24
|
import '../types-BbOBWXMP.js';
|
|
@@ -29,13 +29,13 @@ import 'efficient-shell/ui';
|
|
|
29
29
|
import '../words-Cl9xMUYY.js';
|
|
30
30
|
import './components/AddSidePanel.js';
|
|
31
31
|
import './lib/section-template-types.js';
|
|
32
|
-
import './lib/
|
|
32
|
+
import './lib/document/content-tree.js';
|
|
33
33
|
import './lib/shared-section-types.js';
|
|
34
|
-
import './lib/
|
|
34
|
+
import './lib/document/block-choice.js';
|
|
35
35
|
import './lib/host-chrome.js';
|
|
36
36
|
import './lib/links/link-filters.js';
|
|
37
|
-
import './lib/
|
|
38
|
-
import './lib/
|
|
37
|
+
import './lib/document/add-target-types.js';
|
|
38
|
+
import './lib/document/slot-section-spec.js';
|
|
39
39
|
import './lib/backend-error.js';
|
|
40
40
|
import './lib/document-hooks.js';
|
|
41
41
|
import './lib/document-switch.js';
|
package/dist/screen/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-GZO72N3Q.js";export{DocumentScreen,ScreenMount}from"../chunk-
|
|
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 './
|
|
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-
|
|
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/
|
|
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;
|
|
@@ -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";
|