efficient-easel 5.0.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chrome/chrome.css +3 -3
- package/dist/chunk-3FZAGTQE.js +5 -0
- package/dist/{chunk-ETDRAF3O.js → chunk-5QSFLWAJ.js} +46 -46
- package/dist/{chunk-CRWFB7MU.js → chunk-7EWFXVDJ.js} +4 -4
- package/dist/chunk-7YMO6R3V.js +1 -0
- package/dist/{chunk-MTRFMGBO.js → chunk-F7BYSWRR.js} +1 -1
- package/dist/{chunk-XW4AV5N4.js → chunk-FUOZKV7A.js} +3 -3
- package/dist/{chunk-KJ2RODGT.js → chunk-G4OCSMYY.js} +1 -1
- package/dist/{chunk-C7ERK4DF.js → chunk-H6NYEMLS.js} +1 -1
- package/dist/{chunk-G5JILVHG.js → chunk-ITAQX3HT.js} +1 -1
- package/dist/{chunk-37DMJPHL.js → chunk-KEHLCWTG.js} +8 -8
- package/dist/chunk-PCMGFPFU.js +5 -0
- package/dist/{chunk-UQ6CD3K2.js → chunk-R5GKLOIP.js} +1 -1
- package/dist/chunk-SF4DL63U.js +1 -0
- package/dist/{chunk-VZGLBEAE.js → chunk-X2GNFJRC.js} +1 -1
- package/dist/{chunk-I7ER3P4U.js → chunk-XHHS6SDM.js} +1 -1
- package/dist/copy/copy.css +7 -7
- package/dist/copy/index.js +5 -5
- package/dist/drag/index.js +1 -1
- package/dist/easel/index.js +1 -1
- package/dist/fields/index.js +1 -1
- package/dist/panel/panel.css +4 -1
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/MediaSidePanel.js +1 -1
- package/dist/screen/components/NodeContextMenu.js +1 -1
- package/dist/screen/components/ScreenChrome.js +1 -1
- package/dist/screen/components/ScreenMount.js +1 -1
- package/dist/screen/components/ScreenStoreProvider.js +1 -1
- package/dist/screen/components/SectionScreenShell.js +14 -14
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/key-scope.js +1 -1
- package/dist/screen/lib/puck/use-section-ops.js +1 -1
- package/dist/screen/lib/screen-parts.js +1 -1
- package/dist/screen/screen.css +4 -4
- package/dist/strings/catalogue.js +1 -1
- package/dist/strings/index.js +1 -1
- package/dist/text-styles/index.js +11 -11
- package/dist/text-styles/text-styles.css +2 -2
- package/package.json +1 -1
- package/dist/chunk-3GX7XBAF.js +0 -5
- package/dist/chunk-KSTX646X.js +0 -5
- package/dist/chunk-RQWJOPRB.js +0 -1
- package/dist/chunk-Y324X4U4.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export{MediaSidePanel as default}from"../../chunk-
|
|
1
|
+
export{MediaSidePanel as default}from"../../chunk-G4OCSMYY.js";import"../../chunk-3FZAGTQE.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-7EWFXVDJ.js";import"../../chunk-OZ72A6MY.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-3ZJSLHHI.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-EA2HTX37.js";import"../../chunk-UB4TLWVJ.js";import"../../chunk-Y2G7CU6A.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-66LWADFP.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-FUOZKV7A.js";import"../../chunk-AELNNAFM.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-UK2FQOUT.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-ZNCEOSXO.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{EASEL_NODE_CLIPBOARD,ancestorChain,nodeClipboardOf,nodeClipboardRules,nodeMenuItems,nodeShortcut,pageMenuItems,pastePlace,runNodeShortcut,textMenuItems,useNodeClipboard,useNodeContextMenu}from"../../chunk-
|
|
1
|
+
export{EASEL_NODE_CLIPBOARD,ancestorChain,nodeClipboardOf,nodeClipboardRules,nodeMenuItems,nodeShortcut,pageMenuItems,pastePlace,runNodeShortcut,textMenuItems,useNodeClipboard,useNodeContextMenu}from"../../chunk-F7BYSWRR.js";import"../../chunk-V7U33NF2.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-MCHMF32I.js";import"../../chunk-BXMXTO36.js";import"../../chunk-EA2HTX37.js";import"../../chunk-OSPUG6S6.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-PAELDYYS.js";import"../../chunk-UK2FQOUT.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-ZNCEOSXO.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ScreenChrome as default}from"../../chunk-
|
|
1
|
+
export{ScreenChrome as default}from"../../chunk-5QSFLWAJ.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-BXQBCW3P.js";import"../../chunk-FGNR22NY.js";import"../../chunk-ZE7I3PLX.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-PAM3NLFL.js";import"../../chunk-7F52SZOI.js";import"../../chunk-MQNBD6AB.js";import"../../chunk-TBF5CVPA.js";import"../../chunk-4ES5JGGX.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-X2GNFJRC.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-6TOYXESC.js";import"../../chunk-SF4DL63U.js";import"../../chunk-XHHS6SDM.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-F7BYSWRR.js";import"../../chunk-HQWQLDCB.js";import"../../chunk-BSPCSC45.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-WZMU646D.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-ERR437B5.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-V7U33NF2.js";import"../../chunk-5545A3PC.js";import"../../chunk-PCMGFPFU.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-BVN33R76.js";import"../../chunk-PFNIVZPN.js";import"../../chunk-KQMML6JM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-G4OCSMYY.js";import"../../chunk-3FZAGTQE.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-MCHMF32I.js";import"../../chunk-7EWFXVDJ.js";import"../../chunk-OZ72A6MY.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-3ZJSLHHI.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-BXMXTO36.js";import"../../chunk-EA2HTX37.js";import"../../chunk-OSPUG6S6.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-4VJATVVR.js";import"../../chunk-BDTITTMW.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-UB4TLWVJ.js";import"../../chunk-Y2G7CU6A.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-66LWADFP.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-KEHLCWTG.js";import"../../chunk-O2NLQBFX.js";import"../../chunk-67GNT6PF.js";import"../../chunk-PAELDYYS.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-FUOZKV7A.js";import"../../chunk-AELNNAFM.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-UK2FQOUT.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-ZNCEOSXO.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{DocumentScreen,ScreenMount as default}from"../../chunk-
|
|
1
|
+
export{DocumentScreen,ScreenMount as default}from"../../chunk-H6NYEMLS.js";import"../../chunk-GXQCZJOP.js";import"../../chunk-ITAQX3HT.js";import"../../chunk-5QSFLWAJ.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-BXQBCW3P.js";import"../../chunk-FGNR22NY.js";import"../../chunk-ZE7I3PLX.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-PAM3NLFL.js";import"../../chunk-7F52SZOI.js";import"../../chunk-MQNBD6AB.js";import"../../chunk-TBF5CVPA.js";import"../../chunk-4ES5JGGX.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-X2GNFJRC.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-6TOYXESC.js";import"../../chunk-SF4DL63U.js";import"../../chunk-XHHS6SDM.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-F7BYSWRR.js";import"../../chunk-HQWQLDCB.js";import"../../chunk-BSPCSC45.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-WZMU646D.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-ERR437B5.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-V7U33NF2.js";import"../../chunk-5545A3PC.js";import"../../chunk-PCMGFPFU.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-BVN33R76.js";import"../../chunk-PFNIVZPN.js";import"../../chunk-KQMML6JM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-G4OCSMYY.js";import"../../chunk-3FZAGTQE.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-MCHMF32I.js";import"../../chunk-7EWFXVDJ.js";import"../../chunk-OZ72A6MY.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-3ZJSLHHI.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-BXMXTO36.js";import"../../chunk-EA2HTX37.js";import"../../chunk-OSPUG6S6.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-4VJATVVR.js";import"../../chunk-BDTITTMW.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-UB4TLWVJ.js";import"../../chunk-Y2G7CU6A.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-66LWADFP.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-KEHLCWTG.js";import"../../chunk-O2NLQBFX.js";import"../../chunk-67GNT6PF.js";import"../../chunk-PAELDYYS.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-FUOZKV7A.js";import"../../chunk-AELNNAFM.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-UK2FQOUT.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-ZNCEOSXO.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ScreenStoreProvider as default}from"../../chunk-
|
|
1
|
+
export{ScreenStoreProvider as default}from"../../chunk-ITAQX3HT.js";import"../../chunk-3FZAGTQE.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-7EWFXVDJ.js";import"../../chunk-OZ72A6MY.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-3ZJSLHHI.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-EA2HTX37.js";import"../../chunk-66LWADFP.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-FUOZKV7A.js";import"../../chunk-AELNNAFM.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-UK2FQOUT.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-ZNCEOSXO.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import{AddBlockRow as e}from"../../chunk-
|
|
2
|
-
return Q($,{children:[o.map(({child:e,zone:o,index:r})=>{const t=se?.props.id===e.props.id,s=N(ie,e.type,n),c=i(e),p=String(e.props.id),l=()=>Qe(o,r,p),{rowProps:m,...a}=
|
|
3
|
-
return Q(
|
|
4
|
-
/* @__PURE__ */U(E,{words:me,icon:/* @__PURE__ */U(Te,{type:e.type,size:13}),name:c,selected:t,onSelect:l,...a,actions:/* @__PURE__ */U(
|
|
1
|
+
import{AddBlockRow as e}from"../../chunk-R5GKLOIP.js";import{slotChildRowName as n}from"../../chunk-TBF5CVPA.js";import{scrollPreviewToSection as o,gotoPreviewSlide as r}from"../../chunk-4ES5JGGX.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import{useEaselUndoKeys as t}from"../../chunk-X2GNFJRC.js";import{SlotChildActionsProvider as s}from"../../chunk-KCBEE2MC.js";import{DEFAULT_PANEL_W as i}from"../../chunk-6TOYXESC.js";import{usePartBridge as c}from"../../chunk-SF4DL63U.js";import{useSectionOps as p}from"../../chunk-XHHS6SDM.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import{useScreenDocument as l}from"../../chunk-WZMU646D.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-ERR437B5.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import{MediaSidePanel as m}from"../../chunk-G4OCSMYY.js";import{SELECTION_MODE as d,useScreenPinned as a,useScreenCanvasFrame as u,useScreenInspectorPanel as h,useScreenPickFollowsSelection as k,sameInspectorMode as f,useStandaloneScreenBridges as j,useScreenBlockLook as S,useScreenBlockRules as y}from"../../chunk-3FZAGTQE.js";import{nestsInTree as N,slotFieldsOf as C}from"../../chunk-PLVEGYK6.js";import{useMediaPanel as A,usePanelPick as x,useCancelPanelPick as O}from"../../chunk-R6WTQWAC.js";import{useHostEscape as v}from"../../chunk-U3JP4VGF.js";import{DEFAULT_SCREEN_WORDS as F}from"../../chunk-MCHMF32I.js";import"../../chunk-7EWFXVDJ.js";import"../../chunk-OZ72A6MY.js";import{LayersTree as L,Subtree as M,TreeRow as E,TreeRowAction as P,TreeSeam as R}from"../../chunk-4JSBIW5H.js";import"../../chunk-3ZJSLHHI.js";import{DEFAULT_TREE_WORDS as T}from"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-EA2HTX37.js";import"../../chunk-BDTITTMW.js";import{DEFAULT_SAVE_WORDS as g,saveIndicator as w}from"../../chunk-H6DDIBQ4.js";import{SaveState as z,panelWidthVars as b}from"../../chunk-UB4TLWVJ.js";import"../../chunk-Y2G7CU6A.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-66LWADFP.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-KEHLCWTG.js";import"../../chunk-O2NLQBFX.js";import{useTreeDrag as B}from"../../chunk-67GNT6PF.js";import"../../chunk-PAELDYYS.js";import"../../chunk-P2VEMZH5.js";import{useEasel as D}from"../../chunk-FUOZKV7A.js";import"../../chunk-AELNNAFM.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-UK2FQOUT.js";import{useWords as H}from"../../chunk-MFIRYGHW.js";import{zoneKey as W,parseZoneKey as Y}from"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-ZNCEOSXO.js";import{useState as G,useRef as J,useEffect as K,useCallback as V,Fragment as X}from"react";import{Tooltip as I}from"efficient-shell/ui";import{TrashIcon as Z}from"efficient-shell/icons/efficient";import{jsxs as Q,jsx as U,Fragment as $}from"react/jsx-runtime";var q=e=>n=>{n.target.closest("button, input")||e()},_={rowClick:q};function ee(){const{saveState:ee,readOnly:ne,readOnlyReason:oe=null}=l(),re=p(),{appState:te,selectedItem:se,config:ie}=D(e=>e),[ce,pe]=G(d),le=H("screen",F),me=H("tree",T),de=H("save",g),{first:ae,last:ue,panelOf:he}=a(),ke=he(ae),fe=u(),je=h(),Se=te.data.content?.[0]??null,ye=Se?.props.id??null,Ne=Se?.type===ae,Ce=Se?.type===ue,Ae=J(null),xe=J(null);t(xe);const Oe=A(),ve=x(),Fe=O();k(se?.props.id),K(()=>{const e=xe.current;if(!ve||!e)return;const n=e=>{"Escape"===e.key&&Fe()};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[ve]),v(null!==ve,()=>Fe()),K(()=>{ye&&Ae.current!==ye&&(Ae.current=ye,Ne?pe(ke??d):se||re.select({index:0}))},[ye,se,re,Ne]);const Le=V(e=>pe(n=>f(n,e)?n:e),[]),Me=j({kind:ce.kind,mode:ce,open:Le,show:e=>pe(e),reveal:()=>{},select:(e,n)=>{pe(e=>f(e,n)?e:n),re.select(e)}}),{selectNode:Ee}=c({mode:ce,setMode:pe,onOpenPart:o}),Pe=S(),{labelAtLevel:Re,Icon:Te}=Pe,{canAddTo:ge}=y(),we=e=>Re(e,"block",ie.components[e]?.label??e),ze=e=>Re(e,"section",we(e)),be=!Ne&&"puck"===ce.kind&&se?.props.id===ye,Be=Se?ge(Se.type)?.spec??null:null,De=Se&&Be?`${Se.props.id}:${Be.slot}`:null,He=Se&&Be&&Array.isArray(Se.props[Be.slot])?Se.props[Be.slot]:[],We=e=>n(e,we,Pe.plainText),Ye=(e,n)=>{Se&&Be&&De&&(pe(d),Be.slider?(r(String(Se.props.id),e),re.select({index:e,zone:De}),o(String(Se.props.id))):(re.select({index:e,zone:De}),o(n)))},Ge=()=>{if(!Se||!Be||!De)return;const e=He.length;re.insertComponent(De,Be.childType,e),pe(d),Be.slider?requestAnimationFrame(()=>{r(String(Se.props.id),e),re.select({index:e,zone:De})}):re.select({index:e,zone:De})},Je=e=>C(ie,e),Ke=e=>{const{parentId:n,slot:o}=Y(e),r=e=>{if(!e)return null;if(String(e.props.id)===n)return e;for(const n of Je(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(Se)?.props[o];return Array.isArray(t)?t.length:0},Ve=(e,n,o)=>{const r=Math.min(Math.max(o,0),Ke(e)),t=n<r?r-1:r;t!==n&&(re.reorderComponent(e,n,t),pe(d),re.select({index:t,zone:e}))},Xe=B({keyOf:e=>e.id,readOnly:Boolean(ne),canDrop:(e,n)=>W(n)===e.zone&&n.index>=0&&n.index<=Ke(e.zone),onDrop:(e,n)=>Ve(e.zone,e.index,n.index),onStep:(e,n)=>Ve(e.zone,e.index,n<0?e.index-1:e.index+2)}),Ie=(e,n)=>/* @__PURE__ */U(R,{...ne?{}:Xe.seam({place:{...Y(e),index:n}})},`seam:${e}:${n}`),Ze=e=>Pe.blockRowName(e,we),Qe=(e,n,r)=>{pe(d),re.select({index:n,zone:e}),o(r)},Ue=(e,n,o)=>{re.insertComponent(e,n,o),pe(d),re.select({index:o,zone:e})},$e=(n,o,r)=>/* @__PURE__ */U(e,{choices:r,onPick:e=>Ue(n,e,o)}),qe=(e,n)=>{const o=Je((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=ge(e.type),s=t?.choices??null,i="footer"===t?.source?Ze:We;/* @__PURE__ */
|
|
2
|
+
return Q($,{children:[o.map(({child:e,zone:o,index:r})=>{const t=se?.props.id===e.props.id,s=N(ie,e.type,n),c=i(e),p=String(e.props.id),l=()=>Qe(o,r,p),{rowProps:m,...a}=Xe.row({item:{id:p,zone:o,index:r},place:{...Y(o),index:r}},{onClick:q(l)});/* @__PURE__ */
|
|
3
|
+
return Q(X,{children:[0===r&&Ie(o,0),
|
|
4
|
+
/* @__PURE__ */U(E,{words:me,icon:/* @__PURE__ */U(Te,{type:e.type,size:13}),name:c,selected:t,onSelect:l,...a,actions:/* @__PURE__ */U(P,{kind:"delete",label:le.deleteNamed({name:c}),onClick:()=>{return e=o,n=r,re.removeComponent(e,n),pe(d),void re.select(null);var e,n},children:/* @__PURE__ */U(Z,{size:13})}),rowProps:m}),s&&/* @__PURE__ */U(M,{children:qe(e,n+1)}),Ie(o,r+1)]},String(e.props.id??`${o}-${r}`))}),t&&s?$e(`${e.props.id}:${t.slot}`,o.length,s):null]})},_e="HeroSingle"===Se?.type,en=Boolean(Se)&&(Boolean(Be)||Ce||Ne||_e);/* @__PURE__ */
|
|
5
5
|
return Q("div",{ref:xe,className:"sf-editor es-editor",style:b(i),children:[
|
|
6
|
-
/* @__PURE__ */U("div",{className:"sf-section-bar",children:/* @__PURE__ */U(
|
|
7
|
-
/* @__PURE__ */Q("div",{className:"sf-body",children:[
|
|
8
|
-
/* @__PURE__ */U("div",{className:"sf-panel-head",children:/* @__PURE__ */U(
|
|
9
|
-
/* @__PURE__ */U(
|
|
10
|
-
/* @__PURE__ */U(E,{words:me,icon:/* @__PURE__ */U(Te,{type:"header",size:13}),name:le.headerSettings,selected:ce.kind===ke?.kind,onSelect:()=>pe(ke??d),rowProps:{onClick:q(()=>pe(ke??d))}}):
|
|
11
|
-
return Q(
|
|
12
|
-
/* @__PURE__ */U(E,{words:me,icon:/* @__PURE__ */U(Te,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */U(
|
|
13
|
-
/* @__PURE__ */Q("button",{type:"button",className:"sf-add-card",onClick:
|
|
14
|
-
/* @__PURE__ */U("span",{className:"sf-plus sf-plus--sm",children:"+"}),
|
|
6
|
+
/* @__PURE__ */U("div",{className:"sf-section-bar",children:/* @__PURE__ */U(z,null!==oe?{tone:"off",label:oe,role:"status"}:{...w(ee,de),role:"status"})}),
|
|
7
|
+
/* @__PURE__ */Q("div",{className:"sf-body",children:[ve&&Oe?/* @__PURE__ */U("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:/* @__PURE__ */U(m,{panel:Oe,pick:ve})}):en&&Se&&/* @__PURE__ */Q("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
|
|
8
|
+
/* @__PURE__ */U("div",{className:"sf-panel-head",children:/* @__PURE__ */U(I,{content:Ne?le.headerSettings:le.sectionSettings({name:ze(Se.type)}),side:"bottom",children:/* @__PURE__ */U("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(be?"is-selected":""),"aria-pressed":be,onClick:()=>{Ne?pe(ke??d):(pe(d),re.select({index:0}))},children:ze(Se.type)})})}),
|
|
9
|
+
/* @__PURE__ */U(L,{className:"sf-tree sf-scroll",rootProps:Xe.rootProps(),words:me,children:/* @__PURE__ */U(M,{children:Ne?
|
|
10
|
+
/* @__PURE__ */U(E,{words:me,icon:/* @__PURE__ */U(Te,{type:"header",size:13}),name:le.headerSettings,selected:ce.kind===ke?.kind,onSelect:()=>pe(ke??d),rowProps:{onClick:q(()=>pe(ke??d))}}):Be?/* @__PURE__ */Q($,{children:[He.map((e,n)=>{const o=se?.props.id===e.props.id,r=We(e),t=String(e.props.id),s=()=>Ye(n,t),{rowProps:i,...c}=Xe.row({item:{id:t,zone:De,index:n},place:{...Y(De),index:n}},{onClick:q(s)});/* @__PURE__ */
|
|
11
|
+
return Q(X,{children:[0===n&&Ie(De,0),
|
|
12
|
+
/* @__PURE__ */U(E,{words:me,icon:/* @__PURE__ */U(Te,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */U(P,{kind:"delete",label:le.deleteNamed({name:r}),onClick:()=>{return e=n,void(De&&(re.removeComponent(De,e),pe(d),re.select(null)));var e},children:/* @__PURE__ */U(Z,{size:13})}),rowProps:i}),Ie(De,n+1)]},String(e.props.id??n))}),
|
|
13
|
+
/* @__PURE__ */Q("button",{type:"button",className:"sf-add-card",onClick:Ge,children:[
|
|
14
|
+
/* @__PURE__ */U("span",{className:"sf-plus sf-plus--sm",children:"+"}),Be.addLabel]}),ye?Me.partRows?.(Se,_):null]}):qe(Se,1)})})]}),
|
|
15
15
|
/* @__PURE__ */U("div",{className:"sf-center",children:/* @__PURE__ */U("div",{className:"sf-preview-host",children:/* @__PURE__ */U(fe,{})})}),
|
|
16
|
-
/* @__PURE__ */U(s,{value:{selectChild:(e,n,o,r)=>"section"===ge(r)?.source?
|
|
16
|
+
/* @__PURE__ */U(s,{value:{selectChild:(e,n,o,r)=>"section"===ge(r)?.source?Ye(n,o):Qe(e,n,o),addChild:(e,n,o,r,t)=>"section"===ge(t)?.source?Ge():Ue(`${e}:${n}`,o,r),childRowName:We,blockRowName:Ze},children:/* @__PURE__ */U(je,{mode:ce,onOpenWebsiteSettings:Me.openSettings??(()=>{}),onSelectNode:Ee,hideNodeActions:!0})})]})]})}export{ee as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{usePartBridge}from"../../chunk-
|
|
1
|
+
export{usePartBridge}from"../../chunk-SF4DL63U.js";import"../../chunk-XHHS6SDM.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-3FZAGTQE.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-7EWFXVDJ.js";import"../../chunk-OZ72A6MY.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-3ZJSLHHI.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-EA2HTX37.js";import"../../chunk-66LWADFP.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-FUOZKV7A.js";import"../../chunk-AELNNAFM.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-UK2FQOUT.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-ZNCEOSXO.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-H6NYEMLS.js";import"../chunk-GXQCZJOP.js";export{ScreenStoreProvider}from"../chunk-ITAQX3HT.js";import"../chunk-5QSFLWAJ.js";import"../chunk-26OOWIJJ.js";import"../chunk-BXQBCW3P.js";import"../chunk-FGNR22NY.js";import"../chunk-ZE7I3PLX.js";import"../chunk-2GVCAIPX.js";import"../chunk-PAM3NLFL.js";import"../chunk-7F52SZOI.js";import"../chunk-MQNBD6AB.js";import"../chunk-TBF5CVPA.js";import"../chunk-4ES5JGGX.js";import"../chunk-IQ5TA7AM.js";import"../chunk-DUVRZ456.js";import"../chunk-6W7WLPZH.js";import"../chunk-X2GNFJRC.js";import"../chunk-KCBEE2MC.js";import"../chunk-6TOYXESC.js";import"../chunk-SF4DL63U.js";import"../chunk-XHHS6SDM.js";import"../chunk-IYT6NN2J.js";import"../chunk-F7BYSWRR.js";import"../chunk-HQWQLDCB.js";import"../chunk-BSPCSC45.js";import"../chunk-I54UCYOU.js";import"../chunk-GOTN2KY4.js";import"../chunk-R5L2E7JX.js";import"../chunk-WZMU646D.js";import"../chunk-S4AWJX4Q.js";import"../chunk-ERR437B5.js";import"../chunk-KG7RJWOK.js";import"../chunk-GMCZXMOV.js";export{NO_DOCUMENT_ADDRESSING}from"../chunk-RLBXE4EU.js";import"../chunk-HNKB2ZYR.js";import"../chunk-CLOS6SSX.js";import"../chunk-VPFNZ7TB.js";import"../chunk-LOMEH6DG.js";import"../chunk-V7U33NF2.js";import"../chunk-5545A3PC.js";import"../chunk-PCMGFPFU.js";import"../chunk-5ZBY24K7.js";import"../chunk-PA3PNTVV.js";import"../chunk-BVN33R76.js";import"../chunk-PFNIVZPN.js";import"../chunk-KQMML6JM.js";import"../chunk-KCOBHPN6.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";import"../chunk-HQ4VVRIC.js";import"../chunk-G4OCSMYY.js";export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenAdd,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../chunk-3FZAGTQE.js";import"../chunk-PLVEGYK6.js";import"../chunk-R6WTQWAC.js";export{DETACHED_EASEL_HOST,EaselHostContext,EaselHostProvider,createEaselHost,useEaselHost,useHostEscape}from"../chunk-U3JP4VGF.js";import"../chunk-6WY6ZXJG.js";import"../chunk-MCHMF32I.js";import"../chunk-7EWFXVDJ.js";import"../chunk-OZ72A6MY.js";import"../chunk-4JSBIW5H.js";import"../chunk-3ZJSLHHI.js";import"../chunk-K56YDHYQ.js";import"../chunk-KFV7N2DJ.js";import"../chunk-BXMXTO36.js";import"../chunk-EA2HTX37.js";import"../chunk-OSPUG6S6.js";import"../chunk-WK3AFPXY.js";import"../chunk-4VJATVVR.js";import"../chunk-BDTITTMW.js";import"../chunk-H6DDIBQ4.js";import"../chunk-UB4TLWVJ.js";import"../chunk-Y2G7CU6A.js";import"../chunk-THWO5YVZ.js";import"../chunk-RE4LP46F.js";import"../chunk-MJM6SFD3.js";import"../chunk-2OAZYSWJ.js";import"../chunk-66LWADFP.js";import"../chunk-QLD57GBB.js";import"../chunk-FFYXVAAL.js";import"../chunk-KEHLCWTG.js";import"../chunk-O2NLQBFX.js";import"../chunk-67GNT6PF.js";import"../chunk-PAELDYYS.js";import"../chunk-P2VEMZH5.js";import"../chunk-FUOZKV7A.js";import"../chunk-AELNNAFM.js";import"../chunk-YRLPFZW3.js";import"../chunk-UK2FQOUT.js";import"../chunk-MFIRYGHW.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";import"../chunk-ZNCEOSXO.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{editorRootFocus,useEaselKeyTarget,useEaselUndoKeys}from"../../chunk-
|
|
1
|
+
export{editorRootFocus,useEaselKeyTarget,useEaselUndoKeys}from"../../chunk-X2GNFJRC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-FUOZKV7A.js";import"../../chunk-AELNNAFM.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-UK2FQOUT.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-ZNCEOSXO.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{useSectionOps}from"../../../chunk-
|
|
1
|
+
export{useSectionOps}from"../../../chunk-XHHS6SDM.js";import"../../../chunk-3FZAGTQE.js";import"../../../chunk-PLVEGYK6.js";import"../../../chunk-R6WTQWAC.js";import"../../../chunk-U3JP4VGF.js";import"../../../chunk-7EWFXVDJ.js";import"../../../chunk-OZ72A6MY.js";import"../../../chunk-4JSBIW5H.js";import"../../../chunk-3ZJSLHHI.js";import"../../../chunk-K56YDHYQ.js";import"../../../chunk-KFV7N2DJ.js";import"../../../chunk-EA2HTX37.js";import"../../../chunk-66LWADFP.js";import"../../../chunk-QLD57GBB.js";import"../../../chunk-FFYXVAAL.js";import"../../../chunk-67GNT6PF.js";import"../../../chunk-P2VEMZH5.js";import"../../../chunk-FUOZKV7A.js";import"../../../chunk-AELNNAFM.js";import"../../../chunk-YRLPFZW3.js";import"../../../chunk-UK2FQOUT.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-KRXQM65X.js";import"../../../chunk-NKB3KVAB.js";import"../../../chunk-ZNCEOSXO.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenAdd,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-
|
|
1
|
+
export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenAdd,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-3FZAGTQE.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-7EWFXVDJ.js";import"../../chunk-OZ72A6MY.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-3ZJSLHHI.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-EA2HTX37.js";import"../../chunk-66LWADFP.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-FUOZKV7A.js";import"../../chunk-AELNNAFM.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-UK2FQOUT.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-ZNCEOSXO.js";
|
package/dist/screen/screen.css
CHANGED
|
@@ -303,7 +303,7 @@
|
|
|
303
303
|
`0.83em 0` on an h2 and would push the whole head open. The `--btn` variant
|
|
304
304
|
below re-states its own margin and wins by source order. */
|
|
305
305
|
.sf-panel-title {
|
|
306
|
-
font-size:
|
|
306
|
+
font-size: 14px;
|
|
307
307
|
font-weight: 600;
|
|
308
308
|
color: var(--sf-text);
|
|
309
309
|
margin: 0;
|
|
@@ -432,7 +432,7 @@
|
|
|
432
432
|
display: flex;
|
|
433
433
|
align-items: center;
|
|
434
434
|
justify-content: center;
|
|
435
|
-
font-size:
|
|
435
|
+
font-size: 14px;
|
|
436
436
|
flex: none;
|
|
437
437
|
background: var(--sf-accent-tint);
|
|
438
438
|
}
|
|
@@ -739,7 +739,7 @@
|
|
|
739
739
|
border-radius: 50%;
|
|
740
740
|
background: var(--sf-accent);
|
|
741
741
|
color: var(--sf-on-accent);
|
|
742
|
-
font-size:
|
|
742
|
+
font-size: 14px;
|
|
743
743
|
line-height: 1;
|
|
744
744
|
flex: none;
|
|
745
745
|
}
|
|
@@ -786,7 +786,7 @@
|
|
|
786
786
|
|
|
787
787
|
.sf-msg {
|
|
788
788
|
padding: 24px;
|
|
789
|
-
font-size:
|
|
789
|
+
font-size: 14px;
|
|
790
790
|
color: var(--sf-icon);
|
|
791
791
|
}
|
|
792
792
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{DEFAULT_EASEL_STRINGS,mergeEaselStrings}from"../chunk-
|
|
1
|
+
export{DEFAULT_EASEL_STRINGS,mergeEaselStrings}from"../chunk-7YMO6R3V.js";import"../chunk-M6F6LS3H.js";import"../chunk-ZAOM6PFH.js";import"../chunk-6WY6ZXJG.js";import"../chunk-MCHMF32I.js";import"../chunk-K56YDHYQ.js";import"../chunk-KFV7N2DJ.js";import"../chunk-WK3AFPXY.js";import"../chunk-H6DDIBQ4.js";import"../chunk-Y2G7CU6A.js";import"../chunk-RE4LP46F.js";import"../chunk-2OAZYSWJ.js";import"../chunk-JZDEIRH4.js";import"../chunk-FFYXVAAL.js";import"../chunk-546BBOPE.js";import"../chunk-O2NLQBFX.js";import"../chunk-AELNNAFM.js";
|
package/dist/strings/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{DEFAULT_EASEL_STRINGS as r,mergeEaselStrings as n}from"../chunk-
|
|
1
|
+
import{DEFAULT_EASEL_STRINGS as r,mergeEaselStrings as n}from"../chunk-7YMO6R3V.js";export{DEFAULT_EASEL_STRINGS,mergeEaselStrings}from"../chunk-7YMO6R3V.js";import"../chunk-M6F6LS3H.js";import"../chunk-ZAOM6PFH.js";import"../chunk-6WY6ZXJG.js";import"../chunk-MCHMF32I.js";import"../chunk-K56YDHYQ.js";import"../chunk-KFV7N2DJ.js";import"../chunk-WK3AFPXY.js";import"../chunk-H6DDIBQ4.js";import"../chunk-Y2G7CU6A.js";import"../chunk-RE4LP46F.js";import"../chunk-2OAZYSWJ.js";import"../chunk-JZDEIRH4.js";import"../chunk-FFYXVAAL.js";import"../chunk-546BBOPE.js";import"../chunk-O2NLQBFX.js";import"../chunk-AELNNAFM.js";import{stringsContext as o}from"../chunk-MFIRYGHW.js";import{useContext as t,useMemo as c}from"react";import{jsx as i}from"react/jsx-runtime";function s({value:s,locale:u,children:m}){const e=o(),p=t(e),h=p?.strings??r,j=u??p?.locale??"en",k=c(()=>({strings:n(h,s),locale:j}),[h,s,j]);/* @__PURE__ */
|
|
2
2
|
return i(e.Provider,{value:k,children:m})}function u(){return t(o())?.strings??r}function m(){return t(o())?.locale??"en"}export{s as EaselStringsProvider,m as useEaselLocale,u as useEaselStrings};
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import{hexReadout as e,ColourWindow as n,typedHex as t}from"../chunk-FPAVNX3Y.js";import{DEFAULT_TEXT_STYLES_WORDS as s}from"../chunk-M6F6LS3H.js";export{DEFAULT_TEXT_STYLES_WORDS}from"../chunk-M6F6LS3H.js";import"../chunk-ZAOM6PFH.js";import{FieldSelect as i,FieldSlider as a}from"../chunk-OZ72A6MY.js";import"../chunk-FFYXVAAL.js";import{
|
|
1
|
+
import{hexReadout as e,ColourWindow as n,typedHex as t}from"../chunk-FPAVNX3Y.js";import{DEFAULT_TEXT_STYLES_WORDS as s}from"../chunk-M6F6LS3H.js";export{DEFAULT_TEXT_STYLES_WORDS}from"../chunk-M6F6LS3H.js";import"../chunk-ZAOM6PFH.js";import{FieldSelect as i,FieldSlider as a}from"../chunk-OZ72A6MY.js";import"../chunk-FFYXVAAL.js";import{withTip as l}from"../chunk-P2VEMZH5.js";import{useWords as r}from"../chunk-MFIRYGHW.js";import{hsvToHex as o,Tooltip as d,ColorSwatch as c,IconButton as u}from"efficient-shell/ui";import{useState as m,useRef as f,useId as h,useEffect as p,Fragment as v}from"react";import{ChevronIcon as g,TrashIcon as k,BoldIcon as y,ItalicIcon as b,CaseLowerIcon as x,CaseUpperIcon as w,CaseNormalIcon as S}from"efficient-shell/icons/efficient";import{jsxs as N,jsx as C,Fragment as M}from"react/jsx-runtime";var z=["font","color","size","weight","emphasis","lineSpacing","letterSpacing","paragraphSpacing","letterCase","largestSize"],$=["font","color","size","weight","lineSpacing","letterSpacing","paragraphSpacing","letterCase"],O=["heading","body"],A=7,j={heading:3,body:5},F={min:5,max:void 0,sliderMin:12,sliderMax:72,step:1,shiftStep:10,unit:"px"},L={size:F,weight:{min:100,max:900,sliderMin:300,sliderMax:900,step:100,shiftStep:100,unit:""},lineSpacing:{min:50,max:250,sliderMin:50,sliderMax:250,step:1,shiftStep:10,unit:"%"},letterSpacing:{min:-10,max:void 0,sliderMin:-5,sliderMax:10,step:.1,shiftStep:1,unit:"px"},paragraphSpacing:{min:0,max:void 0,sliderMin:0,sliderMax:48,step:1,shiftStep:10,unit:"px"},largestSize:F},E=(e,n)=>`${"heading"===e?"Heading":"Body"} ${n}`;function W(e=({kind:e,n:n})=>E(e,n)){return O.flatMap(n=>Array.from({length:j[n]},(t,s)=>({id:`${n}-${s+1}`,kind:n,name:e({kind:n,n:s+1}),values:{}})))}function H(e,n,t=A){return e.filter(e=>e.kind===n).length<t}function B(e,n){const t=new RegExp(`^${n}-([1-9]\\d*)$`).exec(e);return t?Number(t[1]):void 0}function D(e){const n=B(e.id,e.kind);return void 0!==n&&n<=j[e.kind]}function I(e,n,t={}){const{max:s=A,name:i=({kind:e,n:n})=>E(e,n),make:a}=t;if(!H(e,n,s))return null;const l=e.filter(e=>e.kind===n);let r=l.length+1;const o=new Set(e.map(e=>e.name));for(;o.has(i({kind:n,n:r}));)r+=1;const d=new Set(e.map(e=>e.id));let c=Math.max(r,...l.map(e=>(B(e.id,n)??0)+1));for(;d.has(`${n}-${c}`);)c+=1;const u=l.at(-1),m=a?a(n,r):{id:`${n}-${c}`,kind:n,name:i({kind:n,n:r}),values:{...u?.values??{}}},f=u?e.indexOf(u)+1:"heading"===n?0:e.length;return{styles:[...e.slice(0,f),m,...e.slice(f)],added:m}}function R(e,n,t={}){const{name:s=({kind:e,n:n})=>E(e,n)}=t,i=e.find(e=>e.id===n);if(!i||D(i))return null;const a=e.filter(e=>e.kind===i.kind),l=a.indexOf(i),r=/* @__PURE__ */new Map;return a.forEach((e,n)=>{n>l&&e.name===s({kind:e.kind,n:n+1})&&r.set(e,s({kind:e.kind,n:n}))}),{styles:e.filter(e=>e!==i).map(e=>r.has(e)?{...e,name:r.get(e)}:e),removed:i}}function T(e,n){const t=e.find(e=>e.id===n);if(t)return t;for(const t of O){const s=B(n,t);if(void 0===s)continue;let i;for(const n of e){const e=n.kind===t?B(n.id,t):void 0;void 0!==e&&e<s&&(!i||e>i.n)&&(i={n:e,style:n})}return i?.style}}function Y(e,n,t){return e.map(e=>{if(e.id!==n)return e;const s={...e.values};for(const[e,n]of Object.entries(t))void 0===n?delete s[e]:s[e]=n;return{...e,values:s}})}function V(e){return Math.min(20,Math.max(12,Math.round(.5*e+6)))}function q(e,n){const t=n.weights;return[t.thin,t.extraLight,t.light,t.regular,t.medium,t.semibold,t.bold,t.extraBold,t.black][Math.min(8,Math.max(0,Math.round(e/100)-1))]}function P(e,n,t,s={}){const i=n.find(n=>n.value===e.font)?.label??e.font??"",a=void 0===e.size?s.autoSize?t.auto:"":t.px({n:e.size});return t.summary({font:i,size:a,weight:q(e.weight??400,t)})}var X=`conic-gradient(${[0,60,120,180,240,300,0].map(e=>o({h:e,s:1,v:1})).join(", ")})`;function Z({value:t,hex:s,colours:i,label:a,followsWord:l,anyWord:r,onChange:o,readOnly:u=!1}){const[v,g]=m(!1),k=f(null),y=f(null),b=h(),x=void 0!==t&&i.some(e=>e.key===t),w=void 0!==t&&!x;return p(()=>{if(!v)return;const e=k.current?.ownerDocument;if(!e)return;const n=e=>{k.current&&!k.current.contains(e.target)&&g(!1)};return e.addEventListener("click",n,!0),()=>e.removeEventListener("click",n,!0)},[v]),/* @__PURE__ */N("div",{ref:k,className:"es-ts-set","data-ts-setting":"color",children:[
|
|
2
2
|
/* @__PURE__ */N("div",{className:"es-ts-top",children:[
|
|
3
3
|
/* @__PURE__ */C("span",{className:"es-ts-sub",children:a}),
|
|
4
4
|
/* @__PURE__ */C("span",{className:"es-ts-colour-read",children:s?e(s):l})]}),
|
|
5
5
|
/* @__PURE__ */N("div",{className:"es-ts-swatches",role:"group","aria-label":a,children:[i.map(n=>/* @__PURE__ */C(d,{content:`${n.name} · ${e(n.value)}`,children:/* @__PURE__ */C(c,{color:n.value,size:"sm",className:"es-ts-swatch","aria-label":n.name,selected:t===n.key,disabled:u,onClick:()=>o(n.key)})},n.key)),
|
|
6
|
-
/* @__PURE__ */C(d,{content:r,children:/* @__PURE__ */C(c,{ref:y,color:X,size:"sm",className:"es-ts-swatch es-ts-swatch--any","aria-label":r,selected:w,"aria-expanded":v,"aria-controls":v?b:void 0,disabled:u,onClick:()=>g(e=>!e)})})]}),v?/* @__PURE__ */C(n,{id:b,value:s??"",onChange:e=>o(e),label:a,readOnly:u,onClose:()=>{g(!1),y.current?.focus()}}):null]})}function _({styles:e,onChange:n,fonts:t,colours:i=[],settings:a=$,auto:o=[],fallback:d,sample:c,openId:u,defaultOpenId:y=null,onOpenChange:b,onAdd:x,rowActions:w,onRemove:S,max:M=A,readOnly:j=!1}){const F=
|
|
7
|
-
return C("div",{className:"es-ts",ref:Z,children:O.map(s=>{const a=e.filter(e=>e.kind===s),
|
|
8
|
-
return N("section",{className:"es-ts-section","aria-labelledby":
|
|
9
|
-
/* @__PURE__ */C("div",{className:"es-ts-group",id:
|
|
6
|
+
/* @__PURE__ */C(d,{content:r,children:/* @__PURE__ */C(c,{ref:y,color:X,size:"sm",className:"es-ts-swatch es-ts-swatch--any","aria-label":r,selected:w,"aria-expanded":v,"aria-controls":v?b:void 0,disabled:u,onClick:()=>g(e=>!e)})})]}),v?/* @__PURE__ */C(n,{id:b,value:s??"",onChange:e=>o(e),label:a,readOnly:u,onClose:()=>{g(!1),y.current?.focus()}}):null]})}function _({styles:e,onChange:n,fonts:t,colours:i=[],settings:a=$,auto:o=[],fallback:d,sample:c,openId:u,defaultOpenId:y=null,onOpenChange:b,onAdd:x,rowActions:w,onRemove:S,max:M=A,readOnly:j=!1}){const F=r("textStyles",s),L=h(),[E,W]=m(y),B=void 0!==u?u:E,T=e=>{void 0===u&&W(e),b?.(e)},q=new Set(o),X=z.filter(e=>a.includes(e)),Z=f(null),[_,U]=m(null);p(()=>{if(!_||!Z.current)return;const e=[...Z.current.querySelectorAll(".es-ts-item")].find(e=>e.dataset.tsId===_.id),n=e?e.querySelector(".es-ts-row"):Z.current.querySelector(`.es-ts-add[data-ts-kind="${_.kind}"]`);n?.focus(),U(null)},[_]);/* @__PURE__ */
|
|
7
|
+
return C("div",{className:"es-ts",ref:Z,children:O.map(s=>{const a=e.filter(e=>e.kind===s),r=`${L}-${s}`,o=!H(e,s,M),u=!j&&!o;/* @__PURE__ */
|
|
8
|
+
return N("section",{className:"es-ts-section","aria-labelledby":r,children:[
|
|
9
|
+
/* @__PURE__ */C("div",{className:"es-ts-group",id:r,children:F.groups[s]}),a.map(s=>{const a=B===s.id,r={...d?.(s)??{},...s.values},o=t.find(e=>e.value===r.font),u=`${L}-open-${s.id}`,m=w?.(s),f=null!=m&&!1!==m,h=Boolean(S)&&!j&&!D(s),p={fontFamily:o?.family,fontSize:`${V(r.size??16)}px`,fontWeight:r.weight,fontStyle:r.italic?"italic":void 0};/* @__PURE__ */
|
|
10
10
|
return N(v,{children:[
|
|
11
11
|
/* @__PURE__ */N("div",{className:"es-ts-item","data-ts-id":s.id,children:[
|
|
12
12
|
/* @__PURE__ */N("button",{type:"button",className:"es-ts-row","aria-expanded":a,"aria-controls":a?u:void 0,onClick:()=>T(a?null:s.id),children:[
|
|
13
13
|
/* @__PURE__ */C("span",{className:"es-ts-chev","aria-hidden":"true",children:/* @__PURE__ */C(g,{size:12})}),
|
|
14
14
|
/* @__PURE__ */C("span",{className:"es-ts-name",style:p,children:s.name}),
|
|
15
|
-
/* @__PURE__ */C("span",{className:"es-ts-meta",children:P(
|
|
15
|
+
/* @__PURE__ */C("span",{className:"es-ts-meta",children:P(r,t,F,{autoSize:q.has("size")&&void 0===s.values.size})})]}),h||f?/* @__PURE__ */N("div",{className:"es-ts-actions",children:[h?l(F.remove,/* @__PURE__ */C("button",{type:"button",className:"es-ts-del","aria-label":F.removeNamed({name:s.name}),onClick:()=>(t=>{if(j||!S)return;const s=R(e,t.id,{name:F.styleName});if(!s)return;const i=e.filter(e=>e.kind===t.kind),a=i[i.indexOf(t)+1];B===t.id&&T(null),n(s.styles),S(s.removed),U({id:a?.id??null,kind:t.kind})})(s),children:/* @__PURE__ */C(k,{size:14,"aria-hidden":"true"})})):null,f?m:null]}):null]}),a?/* @__PURE__ */C("div",{className:"es-ts-open",id:u,children:/* @__PURE__ */C(K,{style:s,values:r,fonts:t,colours:i,settings:X,autoSet:q,sample:c??F.sample,words:F,readOnly:j,set:t=>n(Y(e,s.id,t))})}):null]},s.id)}),l(!j&&o?F.full({kind:s,max:M}):void 0,/* @__PURE__ */N("button",{type:"button",className:"es-ts-add","data-ts-kind":s,disabled:j,"aria-disabled":!(j||!o)||void 0,"aria-describedby":!j&&o?`${L}-full-${s}`:void 0,onClick:()=>{u&&(t=>{if(j)return;const s=I(e,t,{max:M,name:F.styleName,make:x});s&&n(s.styles)})(s)},children:[
|
|
16
16
|
/* @__PURE__ */C("span",{className:"es-ts-add-word",children:F.add[s]}),
|
|
17
|
-
/* @__PURE__ */C("span",{className:"es-ts-count",children:F.count({n:a.length,max:M})})]})),j||!o?null:/* @__PURE__ */C("span",{id:`${L}-full-${s}`,className:"es-vh",children:F.full({kind:s,max:M})})]},s)})})}var U={none:S,upper:w,lower:x},G={none:"none",upper:"uppercase",lower:"lowercase"};function K({style:e,values:n,fonts:s,colours:i,settings:
|
|
17
|
+
/* @__PURE__ */C("span",{className:"es-ts-count",children:F.count({n:a.length,max:M})})]})),j||!o?null:/* @__PURE__ */C("span",{id:`${L}-full-${s}`,className:"es-vh",children:F.full({kind:s,max:M})})]},s)})})}var U={none:S,upper:w,lower:x},G={none:"none",upper:"uppercase",lower:"lowercase"};function K({style:e,values:n,fonts:s,colours:i,settings:r,autoSet:o,sample:d,words:c,readOnly:m,set:f}){const h=e.values,p=s.find(e=>e.value===n.font),v=function(e,n){return e?n.find(n=>n.key===e)?.value??t(e)??void 0:void 0}(n.color,i),g=e=>"largestSize"===e||o.has(e),k=e=>g(e)?h[e]:n[e],x=k("size"),w=k("lineSpacing"),S=k("letterSpacing"),z=g("letterCase")?h.letterCase:n.letterCase,$={fontFamily:p?.family,fontSize:void 0===x?void 0:`${x}px`,fontWeight:n.weight,fontStyle:n.italic?"italic":void 0,lineHeight:void 0===w?void 0:String(w/100),letterSpacing:void 0===S?void 0:`${S}px`,color:v,textTransform:z?G[z]:void 0},O=e=>{const t=L[e],s=g(e);/* @__PURE__ */
|
|
18
18
|
return C("div",{className:"es-ts-slider","data-ts-setting":e,children:/* @__PURE__ */C(a,{label:c.settings[e],value:h[e],onChange:n=>f({[e]:n}),min:t.min,max:t.max,step:t.step,shiftStep:t.shiftStep,sliderMin:t.sliderMin,sliderMax:t.sliderMax,unit:t.unit||void 0,styleValue:s?void 0:n[e],auto:s?c.auto:void 0,readOnly:m})},e)};/* @__PURE__ */
|
|
19
19
|
return N(M,{children:[
|
|
20
|
-
/* @__PURE__ */C("div",{className:"es-ts-preview",style:$,"aria-label":c.preview,children:d}),
|
|
20
|
+
/* @__PURE__ */C("div",{className:"es-ts-preview",style:$,"aria-label":c.preview,children:d}),r.map(t=>{switch(t){case"font":/* @__PURE__ */
|
|
21
21
|
return C(J,{value:h.font,fonts:s,words:c,readOnly:m,set:f},t);case"color":/* @__PURE__ */
|
|
22
22
|
return C(Q,{value:h.color,hex:v,colours:i,words:c,readOnly:m,set:f},t);case"emphasis":{const e=(n.weight??400)>=600,s=!1!==p?.italic;/* @__PURE__ */
|
|
23
23
|
return N("div",{className:"es-ts-set","data-ts-setting":t,children:[
|
|
24
24
|
/* @__PURE__ */C("span",{className:"es-ts-sub",children:c.settings.emphasis}),
|
|
25
|
-
/* @__PURE__ */N("div",{className:"es-ts-icons",children:[
|
|
25
|
+
/* @__PURE__ */N("div",{className:"es-ts-icons",children:[l(c.bold,/* @__PURE__ */C(u,{className:"es-ts-icon","aria-label":c.bold,"aria-pressed":e,disabled:m,onClick:()=>f({weight:e?400:700}),children:/* @__PURE__ */C(y,{size:16})})),m||s?l(c.italic,/* @__PURE__ */C(u,{className:"es-ts-icon","aria-label":c.italic,"aria-pressed":Boolean(n.italic),disabled:m,onClick:()=>f({italic:!n.italic||void 0}),children:/* @__PURE__ */C(b,{size:16})})):/* @__PURE__ */C(u,{className:"es-ts-icon","aria-label":c.italic,"aria-pressed":Boolean(n.italic),"aria-disabled":!0,disabledReason:c.italicMissing,children:/* @__PURE__ */C(b,{size:16})})]})]},t)}case"letterCase":/* @__PURE__ */
|
|
26
26
|
return C(ee,{value:h.letterCase??n.letterCase,auto:g("letterCase"),words:c,readOnly:m,set:f},t);case"largestSize":return"heading"===e.kind?O(t):null;default:return O(t)}})]})}function J({value:e,fonts:n,words:t,readOnly:s,set:a}){const l=h();/* @__PURE__ */
|
|
27
27
|
return N("div",{className:"es-ts-set","data-ts-setting":"font",children:[
|
|
28
28
|
/* @__PURE__ */C("span",{className:"es-ts-sub",id:l,children:t.settings.font}),
|
|
29
29
|
/* @__PURE__ */C(i,{value:e,options:n.map(e=>({label:e.label,value:e.value})),onChange:e=>a({font:e}),ariaLabelledBy:l,readOnly:s})]})}function Q({value:e,hex:n,colours:t,words:s,readOnly:i,set:a}){/* @__PURE__ */
|
|
30
|
-
return C(Z,{value:e,hex:n,colours:t,label:s.settings.color,followsWord:s.colour.follows,anyWord:s.colour.any,readOnly:i,onChange:e=>a({color:e})})}function ee({value:e,auto:n,words:t,readOnly:s,set:i}){const a=n?["auto","none","upper","lower"]:["none","upper","lower"],
|
|
30
|
+
return C(Z,{value:e,hex:n,colours:t,label:s.settings.color,followsWord:s.colour.follows,anyWord:s.colour.any,readOnly:i,onChange:e=>a({color:e})})}function ee({value:e,auto:n,words:t,readOnly:s,set:i}){const a=n?["auto","none","upper","lower"]:["none","upper","lower"],r=e??(n?"auto":"none"),o=f([]),d=e=>i({letterCase:"auto"===e?void 0:e});/* @__PURE__ */
|
|
31
31
|
return N("div",{className:"es-ts-set","data-ts-setting":"letterCase",children:[
|
|
32
32
|
/* @__PURE__ */C("span",{className:"es-ts-sub",children:t.settings.letterCase}),
|
|
33
|
-
/* @__PURE__ */C("div",{className:"es-ts-icons",role:"radiogroup","aria-label":t.settings.letterCase,onKeyDown:e=>{const n="ArrowRight"===e.key||"ArrowDown"===e.key?1:"ArrowLeft"===e.key||"ArrowUp"===e.key?-1:0;if(!n||s)return;e.preventDefault();const t=(a.indexOf(
|
|
33
|
+
/* @__PURE__ */C("div",{className:"es-ts-icons",role:"radiogroup","aria-label":t.settings.letterCase,onKeyDown:e=>{const n="ArrowRight"===e.key||"ArrowDown"===e.key?1:"ArrowLeft"===e.key||"ArrowUp"===e.key?-1:0;if(!n||s)return;e.preventDefault();const t=(a.indexOf(r)+n+a.length)%a.length;d(a[t]),o.current[t]?.focus()},children:a.map((e,n)=>{const i=e===r;if("auto"===e)return l(t.case.autoTitle,/* @__PURE__ */C(u,{ref:e=>{o.current[n]=e},role:"radio",pressed:i,className:"es-ts-icon es-ts-icon--word","aria-checked":i,"aria-label":t.case.auto,tabIndex:i?0:-1,disabled:s,onClick:()=>d(e),children:t.case.auto},e));const a=U[e];return l(t.case[e],/* @__PURE__ */C(u,{ref:e=>{o.current[n]=e},role:"radio",pressed:i,className:"es-ts-icon","aria-checked":i,"aria-label":t.case[e],tabIndex:i?0:-1,disabled:s,onClick:()=>d(e),children:/* @__PURE__ */C(a,{size:16})},e))})})]})}export{$ as CAMPAIGN_TEXT_STYLE_SETTINGS,Z as ColourSwatchRow,j as TEXT_STYLE_DEFAULT_COUNT,O as TEXT_STYLE_KINDS,A as TEXT_STYLE_MAX,L as TEXT_STYLE_RANGES,z as TEXT_STYLE_SETTINGS,_ as TextStylesList,I as addTextStyle,H as canAddTextStyle,W as defaultTextStyles,P as describeTextStyle,D as isDefaultTextStyle,R as removeTextStyle,T as resolveTextStyle,V as textStyleRowSize,Y as updateTextStyle,q as weightWord};
|
|
@@ -240,7 +240,7 @@
|
|
|
240
240
|
.es-ts-icon--word {
|
|
241
241
|
width: auto;
|
|
242
242
|
padding: 0 var(--es-space-8, 8px);
|
|
243
|
-
font-size:
|
|
243
|
+
font-size: 14px;
|
|
244
244
|
font-weight: 500;
|
|
245
245
|
}
|
|
246
246
|
|
|
@@ -262,7 +262,7 @@
|
|
|
262
262
|
justify-content: space-between;
|
|
263
263
|
gap: var(--es-space-8, 8px);
|
|
264
264
|
padding: var(--es-space-12, 12px) 0 0;
|
|
265
|
-
font-size:
|
|
265
|
+
font-size: 14px;
|
|
266
266
|
font-weight: 500;
|
|
267
267
|
color: var(--es-accent, var(--accent-600, var(--submit-bg)));
|
|
268
268
|
cursor: pointer;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-easel",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "Efficient Easel: the EFFICIENT editors' shared engine and chrome: the saved document as pure functions, the published renderer, and the editor frame, panels, Layers tree, text grammar and type-in-place box. Published as editor-shell up to 0.66.0 and as efficient-editor up to 0.95.0.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Efficient Pty Ltd",
|
package/dist/chunk-3GX7XBAF.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{blockTypesIn as e}from"./chunk-5ZBY24K7.js";import{buildPaletteSections as t,pinnedSection as o,paletteWithoutPinned as n,categoryLabel as i}from"./chunk-PA3PNTVV.js";import{sectionTemplatesOf as s}from"./chunk-BVN33R76.js";import{SidePanelHead as r,PanelModeExit as c}from"./chunk-PFNIVZPN.js";import{useEaselSession as l}from"./chunk-O7Q4DDJT.js";import{blockRuns as a}from"./chunk-HQ4VVRIC.js";import{useScreenBlockLook as p,useScreenBlockRules as m}from"./chunk-KSTX646X.js";import{DEFAULT_SCREEN_WORDS as d}from"./chunk-MCHMF32I.js";import{useEasel as f}from"./chunk-XW4AV5N4.js";import{useWords as u}from"./chunk-MFIRYGHW.js";import{AddPanel as k}from"./chunk-37DMJPHL.js";import{DEFAULT_DRAG_WORDS as h}from"./chunk-O2NLQBFX.js";import{useState as y,useEffect as b,useMemo as j}from"react";import{AddIcon as g}from"efficient-shell/icons/efficient";import{jsx as $,jsxs as B,Fragment as N}from"react/jsx-runtime";var O=e=>`section:${e}`,v=e=>`block:${e}`,I=e=>`template:${e}`;function V({blocks:V,blocksOnly:x,at:F,onAdd:H,itemFor:L,session:A,siteWide:P,onClose:C,onHide:D,readOnly:M}){const T=f(e=>e.config),X=p(),{labelAtLevel:w,categoryLabel:Q,firstSection:R,Icon:S,Thumbnail:W}=X,{blockIsOffered:z}=m(),J=u("screen",d).add,K=u("drag",h).add,Y=l(),[Z,E]=y([]);b(()=>{let t=!1;const o=e=>z(e,Y);return s(Y).list().then(n=>{if(t)return;const i=T.components;E(n.filter(t=>t.node?.type&&i[t.node.type]&&e(t.node).every(o)))}).catch(()=>{}),()=>{t=!0}},[T,Y]);const G=j(()=>t(T,X),[T]),q=e=>({type:O(e.type),label:e.name,cover:/* @__PURE__ */$(W,{type:e.type}),title:e.desc?`${e.name} — ${e.desc}`:J.tile({name:e.name}),keywords:[e.alias??"",e.desc,e.type,e.catLabel].filter(Boolean)}),U=j(()=>{const e=[];if(V&&V.choices.length>0&&a(V.choices).forEach((t,o)=>{e.push({key:`blocks:${o}`,title:0===o?`${J.inside({name:V.parentName})}${t.group?` · ${t.group}`:""}`:t.group??"",tiles:t.items.map(e=>({type:v(e.type),label:e.label,icon:/* @__PURE__ */$(S,{type:e.type,size:18}),title:J.tile({name:e.label})}))})}),x)return e;const t=o(G,R);t&&e.push({key:"start",title:J.startBlank,tiles:[q(t)]}),Z.length>0&&e.push({key:"templates",title:J.templates,tiles:Z.map(e=>{return{type:I(e.id),label:e.name,cover:/* @__PURE__ */$(W,{type:e.node.type}),keywords:[(t=e.node.type,w(t,"section",T.components[t]?.label??t)),e.node.type]};var t})});const s=n(G,R);for(const t of Object.keys(T.categories??{})){const o=s.filter(e=>e.cat===t);0!==o.length&&e.push({key:`category:${t}`,title:i(T,t,Q),tiles:o.map(q)})}return e},[V,x,Z,G,T,J]),_=e=>{const t=e.indexOf(":"),o=e.slice(0,t),n=e.slice(t+1);if("section"===o)return{kind:"section",type:n};if("block"===o)return{kind:"block",type:n};if("template"===o){const e=Z.find(e=>e.id===n);return e?{kind:"template",template:e}:null}return null};/* @__PURE__ */
|
|
2
|
-
return B(N,{children:[
|
|
3
|
-
/* @__PURE__ */$(r,{icon:/* @__PURE__ */$(g,{size:15}),title:J.title,context:x?J.contextBlocks:J.contextAll,actions:/* @__PURE__ */$(c,{label:J.done,description:J.doneDescription,onClick:C}),onHide:D}),
|
|
4
|
-
/* @__PURE__ */B("div",{className:"sf-addside sf-scroll",children:[
|
|
5
|
-
/* @__PURE__ */$(k,{groups:U,session:A,itemFor:e=>L(_(e)??{kind:"section",type:e}),onInsert:e=>{const t=_(e);t&&H(t)},at:F,hint:x?J.hintBlocks:J.hint,searchLabel:x?J.searchBlocks:J.searchSections,readOnly:M,words:K}),P&&!x?P:null]})]})}export{V as AddSidePanel,v as blockKey,O as sectionKey,I as templateKey};
|
package/dist/chunk-KSTX646X.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{slotFieldsOf as n}from"./chunk-PLVEGYK6.js";import{usePickFollowsSelection as e}from"./chunk-R6WTQWAC.js";import{EaselCanvas as t,useSelectedFields as r}from"./chunk-XW4AV5N4.js";import{Inspector as i}from"./chunk-CRWFB7MU.js";import{createContext as o,useContext as u}from"react";import{DesktopIcon as l}from"efficient-shell/icons/efficient";import{jsx as s}from"react/jsx-runtime";var c={kind:"puck"};function f(n,e){const t=n,r=e,i=Object.keys(t);return i.length===Object.keys(r).length&&i.every(n=>Object.is(t[n],r[n]))}function a(n){const e=n;return"string"==typeof e.nodeId&&"string"==typeof e.slot}function d(e,t,r){const i=e.slotsOf?.(r);return i||n(t,r.type).map(n=>({slot:n,label:n,rung:!1}))}function p(n,e){return n.isFirst?n.isFirst(e):e.type===n.first}function m(n,e){return n.isLast?n.isLast(e):e.type===n.last}var k={},h={},v=()=>k,g=()=>"",y=()=>null,b=()=>{},O={isLockedBlock:()=>!1,duplicateBlocked:()=>null,nestDepth:()=>0,newSectionNode:()=>null,canAddTo:()=>null,blockIsOffered:()=>!0},j={labelAtLevel:(n,e,t)=>t,descriptions:{},categoryLabel:()=>{},firstSection:null,blockRowName:(n,e)=>e(n.type),plainText:n=>n,Icon:()=>null,Thumbnail:()=>null,useProducts:()=>null},w={options:[{id:"desktop",label:"Desktop",icon:/* @__PURE__ */s(l,{})}],initial:"desktop",fluid:"desktop",widths:{desktop:2e3}},L={read:()=>"sections",write:()=>{},forSelection:(n,e)=>n?"sections":e},C={first:null,last:null,firstGroup:null,lastGroup:null,isSectionGroup:()=>!1,sectionGroupZone:()=>"",panelOf:()=>null};function S(){/* @__PURE__ */
|
|
2
|
-
return s(t,{height:"fill"})}function N(){const{id:n,fields:e,values:t,readOnly:o,onChange:u}=r();/* @__PURE__ */
|
|
3
|
-
return s("div",{className:"es-sidepanel es-sidepanel--right",children:/* @__PURE__ */s(i,{fields:e,values:t,onChange:u,readOnly:o,idPrefix:n})})}var P=o({});function B({parts:n,children:e}){/* @__PURE__ */
|
|
4
|
-
return s(P.Provider,{value:n,children:e})}function D(){return u(P)}function G(){return(D().useOwnerName??g)()}function x(){return(D().useDocumentLabel??y)()}function A(n,e,t,r){return(D().useBridges??v)(n,e,t,r)}function F(n){return(D().useStandaloneBridges??v)(n)}function I(n,e){(D().useDocumentPass??b)(n,e)}function R(){return D().blockRules??O}function T(){return D().blockLook??j}function W(){return D().devices??w}function V(){return D().leftView??L}function K(){return D().pinned??C}function E(){return D().saveSwitch??!0}function H(n){e(!0===D().pickFollowsSelection,n)}function M(){return D().add??h}function Q(){return D().storageNamespace||void 0}function U(){return D().styleClipboard??null}function X(){return D().nodeKeys??!0}function Y(){return D().notify??null}function Z(){return D().Canvas??S}function q(){return D().CanvasHead??null}function z(){return D().canvasDrag??null}var J=o(null);function $({target:n,children:e}){/* @__PURE__ */
|
|
5
|
-
return s(J.Provider,{value:n,children:e})}function _(){return u(J)}function nn(){return D().Inspector??N}export{c as SELECTION_MODE,$ as ScreenCanvasTargetProvider,B as ScreenPartsProvider,p as isPinnedFirst,m as isPinnedLast,a as isSlotMode,f as sameInspectorMode,d as screenSlotsOf,M as useScreenAdd,T as useScreenBlockLook,R as useScreenBlockRules,A as useScreenBridges,z as useScreenCanvasDrag,Z as useScreenCanvasFrame,q as useScreenCanvasHead,_ as useScreenCanvasTarget,W as useScreenDevices,x as useScreenDocumentLabel,I as useScreenDocumentPass,nn as useScreenInspectorPanel,V as useScreenLeftView,X as useScreenNodeKeys,Y as useScreenNotify,G as useScreenOwnerName,D as useScreenParts,H as useScreenPickFollowsSelection,K as useScreenPinned,E as useScreenSaveSwitch,Q as useScreenStorageNamespace,U as useScreenStyleClipboard,F as useStandaloneScreenBridges};
|
package/dist/chunk-RQWJOPRB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useSectionOps as o}from"./chunk-I7ER3P4U.js";import{decodePartId as e,encodePartId as r}from"./chunk-IYT6NN2J.js";import{usePreviewParts as t}from"./chunk-I54UCYOU.js";import{SELECTION_MODE as n}from"./chunk-KSTX646X.js";import{useEasel as p}from"./chunk-XW4AV5N4.js";import{useCallback as d,useEffect as c}from"react";var s=o=>"part"===o.kind;function m({mode:m,setMode:i,onOpenPart:I}){const{getSelectorForId:a}=p(o=>o),u=o(),{setSelectedPartId:f,setSelectHandler:k}=t(),l=d(o=>{const r=e(o);if(!r)return;const{nodeId:t,propKey:p}=r;p?(i(o=>s(o)&&o.nodeId===t&&o.propKey===p?o:{kind:"part",nodeId:t,propKey:p}),I?.(t)):i(o=>"part"===o.kind?n:o)},[i,I]);c(()=>{k(l)},[k,l]);const h=s(m)?r(m.nodeId,m.propKey):null;c(()=>{f(h)},[h,f]);return{selectNode:d(o=>{i(()=>n);const e=a(o);e&&u.select(e)},[i,a,u]),openPartId:h}}export{m as usePartBridge};
|
package/dist/chunk-Y324X4U4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{DEFAULT_TEXT_STYLES_WORDS as o}from"./chunk-M6F6LS3H.js";import{DEFAULT_PICK_WORDS as r}from"./chunk-ZAOM6PFH.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as t}from"./chunk-6WY6ZXJG.js";import{DEFAULT_SCREEN_WORDS as m}from"./chunk-MCHMF32I.js";import{DEFAULT_CANVAS_WORDS as n}from"./chunk-AELNNAFM.js";import{DEFAULT_TREE_WORDS as c}from"./chunk-K56YDHYQ.js";import{DEFAULT_PANEL_WORDS as s}from"./chunk-KFV7N2DJ.js";import{DEFAULT_NODE_MENU_WORDS as f}from"./chunk-WK3AFPXY.js";import{DEFAULT_SAVE_WORDS as p}from"./chunk-H6DDIBQ4.js";import{DEFAULT_CHROME_WORDS as e,DEFAULT_NOTICE_WORDS as i}from"./chunk-Y2G7CU6A.js";import{DEFAULT_LOCK_WORDS as u}from"./chunk-RE4LP46F.js";import{DEFAULT_RAIL_WORDS as k}from"./chunk-2OAZYSWJ.js";import{DEFAULT_COPY_WORDS as j}from"./chunk-JZDEIRH4.js";import{DEFAULT_FIELDS_WORDS as h}from"./chunk-FFYXVAAL.js";import{DEFAULT_DRAG_WORDS as l}from"./chunk-O2NLQBFX.js";var F={notice:i,lock:u,save:p,chrome:e,rail:k,tree:c,panel:s,fields:h,pick:r,drag:l,menu:f,styleClipboard:t,copy:j,canvas:n,textStyles:o,screen:m},a=o=>"object"==typeof o&&null!==o;function A(o,r){const t={};for(const m of Object.keys(o)){const n=o[m],c=r[m];null==c?t[m]=n:a(n)?t[m]=a(c)?A(n,c):n:t[m]=typeof c==typeof n?c:n}return t}function y(o,r){return r?A(o,r):o}export{F as DEFAULT_EASEL_STRINGS,y as mergeEaselStrings};
|