efficient-easel 19.2.0 → 19.3.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/dist/{chunk-3Z2MVLCD.js → chunk-4ES5JGGX.js} +1 -1
- package/dist/chunk-7OKL7HDV.js +1 -0
- package/dist/{chunk-BQMZ2YAF.js → chunk-A6CY3TQ5.js} +1 -1
- package/dist/chunk-CNKVVHDA.js +63 -0
- package/dist/chunk-FIVU2COQ.js +2 -0
- package/dist/{chunk-RTCNJRF6.js → chunk-FMZGR7EG.js} +1 -1
- package/dist/chunk-H5YLVKGA.js +1 -0
- package/dist/{chunk-UZXGXMNO.js → chunk-KOVJODTY.js} +11 -11
- package/dist/{chunk-45NZSAND.js → chunk-KWE5U6CE.js} +1 -1
- package/dist/{chunk-6U6AISPX.js → chunk-ME4V6PML.js} +4 -4
- package/dist/chunk-OGBYHQE6.js +5 -0
- package/dist/chunk-P5VYGWYO.js +1 -0
- package/dist/{chunk-G3GWAP5R.js → chunk-QAJAEWCZ.js} +1 -1
- package/dist/chunk-U6LF5YVK.js +8 -0
- package/dist/chunk-VULUDKA3.js +21 -0
- package/dist/chunk-YOXKBOZX.js +1 -0
- package/dist/{chunk-WXFZD7WC.js → chunk-ZKY45F5G.js} +1 -1
- package/dist/chunk-ZO3UUK45.js +18 -0
- package/dist/{chunk-2XMHLXMA.js → chunk-ZOBSIXRD.js} +1 -1
- package/dist/copy/index.js +14 -14
- package/dist/drag/index.js +1 -1
- package/dist/easel/index.js +1 -1
- package/dist/fields/index.js +1 -1
- package/dist/menu/index.d.ts +3 -3
- package/dist/menu/index.js +1 -1
- package/dist/node-ops/index.d.ts +11 -7
- package/dist/node-ops/index.js +1 -1
- package/dist/panel/index.js +6 -6
- package/dist/panel/panel.css +21 -12
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/NodeContextMenu.d.ts +1 -1
- package/dist/screen/components/NodeContextMenu.js +1 -1
- package/dist/screen/components/SaveControls.d.ts +1 -1
- package/dist/screen/components/ScreenChrome.js +1 -1
- package/dist/screen/components/ScreenMount.d.ts +1 -1
- package/dist/screen/components/ScreenMount.js +1 -1
- package/dist/screen/components/ScreenStoreProvider.d.ts +1 -1
- package/dist/screen/components/ScreenStoreProvider.js +1 -1
- package/dist/screen/components/SectionScreenShell.js +17 -17
- package/dist/screen/components/usePartBridge.d.ts +1 -1
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.d.ts +1 -1
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/key-scope.js +1 -1
- package/dist/screen/lib/puck/preview-dom.js +1 -1
- package/dist/screen/lib/puck/style-clipboard.d.ts +1 -1
- package/dist/screen/lib/puck/style-clipboard.js +1 -1
- package/dist/screen/lib/puck/use-section-ops.js +1 -1
- package/dist/screen/lib/screen-parts.d.ts +1 -1
- package/dist/screen/lib/screen-parts.js +1 -1
- package/dist/strings/index.js +2 -2
- package/dist/style-clipboard/index.d.ts +1 -1
- package/dist/text-styles/index.js +22 -22
- package/dist/{types-BsyPh6EW.d.ts → types-BbOBWXMP.d.ts} +3 -0
- package/package.json +1 -1
- package/dist/chunk-BALFHI3G.js +0 -2
- package/dist/chunk-EFQCH7CO.js +0 -1
- package/dist/chunk-I2BCNLLV.js +0 -5
- package/dist/chunk-LFHMDGLE.js +0 -8
- package/dist/chunk-LOXB5OVK.js +0 -63
- package/dist/chunk-OD4WIIER.js +0 -1
- package/dist/chunk-OSPUG6S6.js +0 -1
- package/dist/chunk-UAS2LEW2.js +0 -1
- package/dist/chunk-Z2V3TTAR.js +0 -18
- package/dist/chunk-ZFFWO2AF.js +0 -21
|
@@ -1 +1 @@
|
|
|
1
|
-
export{DocumentScreen,ScreenMount as default}from"../../chunk-
|
|
1
|
+
export{DocumentScreen,ScreenMount as default}from"../../chunk-ME4V6PML.js";import"../../chunk-GXQCZJOP.js";import"../../chunk-CNKVVHDA.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-JBOSEHIX.js";import"../../chunk-FGNR22NY.js";import"../../chunk-LER7RKTO.js";import"../../chunk-FGYJ5DJY.js";import"../../chunk-7F52SZOI.js";import"../../chunk-MQNBD6AB.js";import"../../chunk-4ES5JGGX.js";import"../../chunk-A6CY3TQ5.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-C56MPJBH.js";import"../../chunk-H5YLVKGA.js";import"../../chunk-7OKL7HDV.js";import"../../chunk-PY7OOQEZ.js";import"../../chunk-RKTF5XLP.js";import"../../chunk-KWE5U6CE.js";import"../../chunk-5545A3PC.js";import"../../chunk-U6LF5YVK.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-BVN33R76.js";import"../../chunk-43AEUUNQ.js";import"../../chunk-SINAM2IT.js";import"../../chunk-UMDQ6CLQ.js";import"../../chunk-M2Z775ZC.js";import"../../chunk-OGBYHQE6.js";import"../../chunk-MS2U6MV5.js";import"../../chunk-YOXKBOZX.js";import"../../chunk-5DPIGWUL.js";import"../../chunk-M62P4IQK.js";import"../../chunk-EZG3TGQ7.js";import"../../chunk-ERR437B5.js";import"../../chunk-RYNBSKE7.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-LNHT2KPX.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-4VJATVVR.js";import"../../chunk-23DYNW6S.js";import"../../chunk-V7U33NF2.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-BHRC3ASL.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-KOVJODTY.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-VULUDKA3.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-A6Z4SD3I.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-ZKY45F5G.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-P5VYGWYO.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-X3TYRF5V.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.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-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-ZOBSIXRD.js";import"../../chunk-QAJAEWCZ.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-ZO3UUK45.js";import"../../chunk-KAML3KQH.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-BSPCSC45.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";
|
|
@@ -16,7 +16,7 @@ import '../../panelWidths-DgQXiPXU.js';
|
|
|
16
16
|
import '../../CanvasDragLayer-ARfaivCu.js';
|
|
17
17
|
import '../../session-DSQFmIvx.js';
|
|
18
18
|
import '../../words-CvwYvkJm.js';
|
|
19
|
-
import '../../types-
|
|
19
|
+
import '../../types-BbOBWXMP.js';
|
|
20
20
|
import '../../style-clipboard/index.js';
|
|
21
21
|
import '../../words-CnnHb9jo.js';
|
|
22
22
|
import '../../types-Bqq6ya0y.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ScreenStoreProvider as default}from"../../chunk-
|
|
1
|
+
export{ScreenStoreProvider as default}from"../../chunk-KWE5U6CE.js";import"../../chunk-OGBYHQE6.js";import"../../chunk-LNHT2KPX.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-KOVJODTY.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-VULUDKA3.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-A6Z4SD3I.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-X3TYRF5V.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-ZOBSIXRD.js";import"../../chunk-QAJAEWCZ.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import{AddBlockRow as e}from"../../chunk-
|
|
2
|
-
return I
|
|
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-FMZGR7EG.js";import{scrollPreviewToSection as n,gotoPreviewSlide as o}from"../../chunk-4ES5JGGX.js";import{useEaselUndoKeys as r}from"../../chunk-A6CY3TQ5.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-H5YLVKGA.js";import{useSectionOps as c}from"../../chunk-7OKL7HDV.js";import"../../chunk-M2Z775ZC.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}from"../../chunk-OGBYHQE6.js";import{MediaPopup as f}from"../../chunk-MS2U6MV5.js";import{useScreenDocument as S}from"../../chunk-M62P4IQK.js";import"../../chunk-EZG3TGQ7.js";import"../../chunk-ERR437B5.js";import"../../chunk-RYNBSKE7.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-LNHT2KPX.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-U3JP4VGF.js";import{DEFAULT_SCREEN_WORDS as y}from"../../chunk-23DYNW6S.js";import{slotChildRowName as N}from"../../chunk-BHRC3ASL.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-IYT6NN2J.js";import{slotFieldsOf as C,nestsInTree as x}from"../../chunk-PLVEGYK6.js";import{useEasel as M}from"../../chunk-KOVJODTY.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-VULUDKA3.js";import"../../chunk-BPXEFVSQ.js";import{LayersTree as P,Subtree as R,TreeRow as A,TreeRowAction as D,TreeSeam as O}from"../../chunk-A6Z4SD3I.js";import{DEFAULT_TREE_WORDS as K}from"../../chunk-K56YDHYQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-X3TYRF5V.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-NDRZP6YR.js";import{DEFAULT_SAVE_WORDS as V,saveIndicator as g}from"../../chunk-H6DDIBQ4.js";import{SaveState as B,panelWidthVars as v}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-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-ZOBSIXRD.js";import"../../chunk-QAJAEWCZ.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import{useWords as z}from"../../chunk-MFIRYGHW.js";import"../../chunk-ZO3UUK45.js";import"../../chunk-KAML3KQH.js";import{useTreeDrag as H}from"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import{zoneKey as Y,parseZoneKey as Z}from"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import{useState as b,useRef as E,useEffect as w,useCallback as L,Fragment as T}from"react";import{Tooltip as F}from"efficient-shell/ui";import{TrashIcon as G}from"efficient-shell/icons/efficient";import{jsxs as W,jsx as J,Fragment as I}from"react/jsx-runtime";var X=e=>n=>{n.target.closest("button, input")||e()},Q={rowClick:X};function U(){const{saveState:U,readOnly:$,readOnlyReason:q=null}=S(),_=c(),{appState:ee,selectedItem:ne,config:oe}=M(e=>e),[re,te]=b(p),se=z("screen",y),ie=z("tree",K),ce=z("save",V),{first:pe,last:le,panelOf:me}=l(),de=me(pe),ae=m(),ue=d(),he=ee.data.content?.[0]??null,ke=he?.props.id??null,je=he?.type===pe,fe=he?.type===le,Se=E(null),ye=E(null);r(ye),a(ne?.props.id),w(()=>{ke&&Se.current!==ke&&(Se.current=ke,je?te(de??p):ne||_.select({index:0}))},[ke,ne,_,je]);const Ne=L(e=>te(n=>u(n,e)?n:e),[]),Ce=h({kind:re.kind,mode:re,open:Ne,show:e=>te(e),reveal:()=>{},select:(e,n)=>{te(e=>u(e,n)?e:n),_.select(e)}}),{selectNode:xe}=i({mode:re,setMode:te,onOpenPart:n}),Me=k(),{labelAtLevel:Pe,Icon:Re}=Me,{canAddTo:Ae}=j(),De=e=>Pe(e,"block",oe.components[e]?.label??e),Oe=e=>Pe(e,"section",De(e)),Ke=!je&&"puck"===re.kind&&ne?.props.id===ke,Ve=he?Ae(he.type)?.spec??null:null,ge=he&&Ve?`${he.props.id}:${Ve.slot}`:null,Be=he&&Ve&&Array.isArray(he.props[Ve.slot])?he.props[Ve.slot]:[],ve=e=>N(e,De,Me.plainText),ze=(e,r)=>{he&&Ve&&ge&&(te(p),Ve.slider?(o(String(he.props.id),e),_.select({index:e,zone:ge}),n(String(he.props.id))):(_.select({index:e,zone:ge}),n(r)))},He=()=>{if(!he||!Ve||!ge)return;const e=Be.length;_.insertComponent(ge,Ve.childType,e),te(p),Ve.slider?requestAnimationFrame(()=>{o(String(he.props.id),e),_.select({index:e,zone:ge})}):_.select({index:e,zone:ge})},Ye=e=>C(oe,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 Ye(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(he)?.props[o];return Array.isArray(t)?t.length:0},be=(e,n,o)=>{const r=Math.min(Math.max(o,0),Ze(e)),t=n<r?r-1:r;t!==n&&(_.reorderComponent(e,n,t),te(p),_.select({index:t,zone:e}))},Ee=H({keyOf:e=>e.id,readOnly:Boolean($),canDrop:(e,n)=>Y(n)===e.zone&&n.index>=0&&n.index<=Ze(e.zone),onDrop:(e,n)=>be(e.zone,e.index,n.index),onStep:(e,n)=>be(e.zone,e.index,n<0?e.index-1:e.index+2)}),we=(e,n)=>/* @__PURE__ */J(O,{...$?{}:Ee.seam({place:{...Z(e),index:n}})},`seam:${e}:${n}`),Le=e=>Me.blockRowName(e,De),Te=(e,o,r)=>{te(p),_.select({index:o,zone:e}),n(r)},Fe=(e,n,o)=>{_.insertComponent(e,n,o),te(p),_.select({index:o,zone:e})},Ge=(n,o,r)=>/* @__PURE__ */J(e,{choices:r,onPick:e=>Fe(n,e,o)}),We=(e,n)=>{const o=Ye((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=Ae(e.type),s=t?.choices??null,i="footer"===t?.source?Le:ve;/* @__PURE__ */
|
|
2
|
+
return W(I,{children:[o.map(({child:e,zone:o,index:r})=>{const t=ne?.props.id===e.props.id,s=x(oe,e.type,n),c=i(e),l=String(e.props.id),m=()=>Te(o,r,l),{rowProps:d,...a}=Ee.row({item:{id:l,zone:o,index:r},place:{...Z(o),index:r}},{onClick:X(m)});/* @__PURE__ */
|
|
3
|
+
return W(T,{children:[0===r&&we(o,0),
|
|
4
|
+
/* @__PURE__ */J(A,{words:ie,icon:/* @__PURE__ */J(Re,{type:e.type,size:13}),name:c,selected:t,onSelect:m,...a,actions:/* @__PURE__ */J(D,{kind:"delete",label:se.deleteNamed({name:c}),onClick:()=>{return e=o,n=r,_.removeComponent(e,n),te(p),void _.select(null);var e,n},children:/* @__PURE__ */J(G,{size:13})}),rowProps:d}),s&&/* @__PURE__ */J(R,{children:We(e,n+1)}),we(o,r+1)]},String(e.props.id??`${o}-${r}`))}),t&&s?Ge(`${e.props.id}:${t.slot}`,o.length,s):null]})},Je="HeroSingle"===he?.type,Ie=Boolean(he)&&(Boolean(Ae(he.type))||Ye(he.type).length>0),Xe=Boolean(he)&&(Boolean(Ve)||fe||je||Je||Ie);/* @__PURE__ */
|
|
5
|
+
return W("div",{ref:ye,className:"sf-editor es-editor",style:v(s),children:[
|
|
6
|
+
/* @__PURE__ */J("div",{className:"sf-section-bar",children:/* @__PURE__ */J(B,null!==q?{tone:"off",label:q,role:"status"}:{...g(U,ce),role:"status"})}),
|
|
7
|
+
/* @__PURE__ */W("div",{className:"sf-body",children:[Xe&&he&&/* @__PURE__ */W("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
|
|
8
|
+
/* @__PURE__ */J("div",{className:"sf-panel-head",children:/* @__PURE__ */J(F,{content:je?se.headerSettings:se.sectionSettings({name:Oe(he.type)}),side:"bottom",children:/* @__PURE__ */J("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(Ke?"is-selected":""),"aria-pressed":Ke,onClick:()=>{je?te(de??p):(te(p),_.select({index:0}))},children:Oe(he.type)})})}),
|
|
9
|
+
/* @__PURE__ */J(P,{className:"sf-tree sf-scroll",rootProps:Ee.rootProps(),words:ie,children:/* @__PURE__ */J(R,{children:je?
|
|
10
|
+
/* @__PURE__ */J(A,{words:ie,icon:/* @__PURE__ */J(Re,{type:"header",size:13}),name:se.headerSettings,selected:re.kind===de?.kind,onSelect:()=>te(de??p),rowProps:{onClick:X(()=>te(de??p))}}):Ve?/* @__PURE__ */W(I,{children:[Be.map((e,n)=>{const o=ne?.props.id===e.props.id,r=ve(e),t=String(e.props.id),s=()=>ze(n,t),{rowProps:i,...c}=Ee.row({item:{id:t,zone:ge,index:n},place:{...Z(ge),index:n}},{onClick:X(s)});/* @__PURE__ */
|
|
11
|
+
return W(T,{children:[0===n&&we(ge,0),
|
|
12
|
+
/* @__PURE__ */J(A,{words:ie,icon:/* @__PURE__ */J(Re,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */J(D,{kind:"delete",label:se.deleteNamed({name:r}),onClick:()=>{return e=n,void(ge&&(_.removeComponent(ge,e),te(p),_.select(null)));var e},children:/* @__PURE__ */J(G,{size:13})}),rowProps:i}),we(ge,n+1)]},String(e.props.id??n))}),
|
|
13
|
+
/* @__PURE__ */W("button",{type:"button",className:"sf-add-card",onClick:He,children:[
|
|
14
|
+
/* @__PURE__ */J("span",{className:"sf-plus sf-plus--sm",children:"+"}),Ve.addLabel]}),ke?Ce.partRows?.(he,Q):null]}):We(he,1)})})]}),
|
|
15
|
+
/* @__PURE__ */J("div",{className:"sf-center",children:/* @__PURE__ */J("div",{className:"sf-preview-host",children:/* @__PURE__ */J(ae,{})})}),
|
|
16
|
+
/* @__PURE__ */J(t,{value:{selectChild:(e,n,o,r)=>"section"===Ae(r)?.source?ze(n,o):Te(e,n,o),addChild:(e,n,o,r,t)=>"section"===Ae(t)?.source?He():Fe(`${e}:${n}`,o,r),childRowName:ve,blockRowName:Le},children:/* @__PURE__ */J(ue,{mode:re,onOpenWebsiteSettings:Ce.openSettings??(()=>{}),onSelectNode:xe,hideNodeActions:!0})})]}),
|
|
17
|
+
/* @__PURE__ */J(f,{})]})}export{U as default};
|
|
@@ -15,7 +15,7 @@ import '../../panelWidths-DgQXiPXU.js';
|
|
|
15
15
|
import '../../CanvasDragLayer-ARfaivCu.js';
|
|
16
16
|
import '../../session-DSQFmIvx.js';
|
|
17
17
|
import '../../words-CvwYvkJm.js';
|
|
18
|
-
import '../../types-
|
|
18
|
+
import '../../types-BbOBWXMP.js';
|
|
19
19
|
import '../../style-clipboard/index.js';
|
|
20
20
|
import '../../words-CnnHb9jo.js';
|
|
21
21
|
import '../../types-Bqq6ya0y.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{usePartBridge}from"../../chunk-
|
|
1
|
+
export{usePartBridge}from"../../chunk-H5YLVKGA.js";import"../../chunk-7OKL7HDV.js";import"../../chunk-OGBYHQE6.js";import"../../chunk-LNHT2KPX.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-KOVJODTY.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-VULUDKA3.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-A6Z4SD3I.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-X3TYRF5V.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-ZOBSIXRD.js";import"../../chunk-QAJAEWCZ.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";
|
package/dist/screen/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ import '../panelWidths-DgQXiPXU.js';
|
|
|
21
21
|
import '../CanvasDragLayer-ARfaivCu.js';
|
|
22
22
|
import '../session-DSQFmIvx.js';
|
|
23
23
|
import '../words-CvwYvkJm.js';
|
|
24
|
-
import '../types-
|
|
24
|
+
import '../types-BbOBWXMP.js';
|
|
25
25
|
import '../style-clipboard/index.js';
|
|
26
26
|
import '../words-CnnHb9jo.js';
|
|
27
27
|
import '../types-Bqq6ya0y.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-ME4V6PML.js";import"../chunk-GXQCZJOP.js";import"../chunk-CNKVVHDA.js";import"../chunk-2GVCAIPX.js";import"../chunk-26OOWIJJ.js";import"../chunk-JBOSEHIX.js";import"../chunk-FGNR22NY.js";import"../chunk-LER7RKTO.js";import"../chunk-FGYJ5DJY.js";import"../chunk-7F52SZOI.js";import"../chunk-MQNBD6AB.js";import"../chunk-4ES5JGGX.js";import"../chunk-A6CY3TQ5.js";import"../chunk-KCBEE2MC.js";import"../chunk-C56MPJBH.js";import"../chunk-H5YLVKGA.js";import"../chunk-7OKL7HDV.js";import"../chunk-PY7OOQEZ.js";import"../chunk-RKTF5XLP.js";export{ScreenStoreProvider}from"../chunk-KWE5U6CE.js";import"../chunk-5545A3PC.js";import"../chunk-U6LF5YVK.js";import"../chunk-PA3PNTVV.js";import"../chunk-5ZBY24K7.js";import"../chunk-BVN33R76.js";import"../chunk-43AEUUNQ.js";import"../chunk-SINAM2IT.js";import"../chunk-UMDQ6CLQ.js";import"../chunk-M2Z775ZC.js";export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../chunk-OGBYHQE6.js";import"../chunk-MS2U6MV5.js";import"../chunk-YOXKBOZX.js";import"../chunk-5DPIGWUL.js";import"../chunk-M62P4IQK.js";import"../chunk-EZG3TGQ7.js";import"../chunk-ERR437B5.js";import"../chunk-RYNBSKE7.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-KCOBHPN6.js";import"../chunk-LNHT2KPX.js";export{EaselSessionProvider,useEaselSession}from"../chunk-O7Q4DDJT.js";export{EFFICIENT_BACKEND,activateEaselSession,backendOf,createEaselSession,currentEaselSession,deactivateEaselSession,efficientClientOpen,isEfficientBackend,provideDefaultBackend,resetAmbientEaselSession,sessionRegistry,setSessionBridgedSite,setSessionDocumentSite}from"../chunk-RSCMJIWS.js";export{DETACHED_EASEL_HOST,EaselHostContext,EaselHostProvider,createEaselHost,useEaselHost,useHostEscape}from"../chunk-U3JP4VGF.js";import"../chunk-4VJATVVR.js";import"../chunk-23DYNW6S.js";import"../chunk-V7U33NF2.js";import"../chunk-6WY6ZXJG.js";import"../chunk-BHRC3ASL.js";import"../chunk-6W7WLPZH.js";import"../chunk-IQ5TA7AM.js";import"../chunk-DUVRZ456.js";import"../chunk-IYT6NN2J.js";import"../chunk-PLVEGYK6.js";import"../chunk-KOVJODTY.js";import"../chunk-TBY3DFKS.js";import"../chunk-VULUDKA3.js";import"../chunk-BPXEFVSQ.js";import"../chunk-A6Z4SD3I.js";import"../chunk-K56YDHYQ.js";import"../chunk-XWFH2NHZ.js";import"../chunk-YRLPFZW3.js";import"../chunk-ZKY45F5G.js";import"../chunk-FIVU2COQ.js";import"../chunk-P5VYGWYO.js";import"../chunk-WK3AFPXY.js";import"../chunk-X3TYRF5V.js";import"../chunk-RC25EGHD.js";import"../chunk-KFV7N2DJ.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-23VM4PMV.js";import"../chunk-KRL3IUV3.js";import"../chunk-ZOBSIXRD.js";import"../chunk-QAJAEWCZ.js";import"../chunk-WRFD4EXD.js";import"../chunk-36LVP5WD.js";import"../chunk-MFIRYGHW.js";import"../chunk-ZO3UUK45.js";import"../chunk-KAML3KQH.js";import"../chunk-67GNT6PF.js";import"../chunk-P2VEMZH5.js";import"../chunk-X4T6JT3M.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";import"../chunk-BSPCSC45.js";import"../chunk-I54UCYOU.js";import"../chunk-GOTN2KY4.js";import"../chunk-R5L2E7JX.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{editorRootFocus,isSaveShortcut,useEaselKeyTarget,useEaselSaveKey,useEaselUndoKeys}from"../../chunk-
|
|
1
|
+
export{editorRootFocus,isSaveShortcut,useEaselKeyTarget,useEaselSaveKey,useEaselUndoKeys}from"../../chunk-A6CY3TQ5.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-KOVJODTY.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-X3TYRF5V.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{gotoPreviewSlide,pinPreviewToBottom,pinPreviewToSection,previewFrame,scrollPreviewToSection,scrollPreviewToTop}from"../../../chunk-
|
|
1
|
+
export{gotoPreviewSlide,pinPreviewToBottom,pinPreviewToSection,previewFrame,scrollPreviewToSection,scrollPreviewToTop}from"../../../chunk-4ES5JGGX.js";import"../../../chunk-IQ5TA7AM.js";import"../../../chunk-R5L2E7JX.js";
|
|
@@ -2,7 +2,7 @@ import { StyleRow } from '../../../style-clipboard/index.js';
|
|
|
2
2
|
import { S as StyleClipboardWords } from '../../../words-CnnHb9jo.js';
|
|
3
3
|
import { ScreenStyleDocument, ScreenNode, ScreenStylePastePlan, ScreenStyleClipboard } from '../screen-parts.js';
|
|
4
4
|
import { panelFieldsOf } from './panel-fields.js';
|
|
5
|
-
import '../../../types-
|
|
5
|
+
import '../../../types-BbOBWXMP.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
import '../../../blocks/index.js';
|
|
8
8
|
import '../../../types-Cq53lL8d.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{copyNodeStyle,nodeStyleRows,planNodePaste,shopFieldKind,siteStyleScope,styleClipboardOf}from"../../../chunk-JBOSEHIX.js";import"../../../chunk-LER7RKTO.js";import"../../../chunk-FGYJ5DJY.js";import"../../../chunk-7F52SZOI.js";import"../../../chunk-MQNBD6AB.js";import"../../../chunk-23DYNW6S.js";import"../../../chunk-V7U33NF2.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-
|
|
1
|
+
export{copyNodeStyle,nodeStyleRows,planNodePaste,shopFieldKind,siteStyleScope,styleClipboardOf}from"../../../chunk-JBOSEHIX.js";import"../../../chunk-LER7RKTO.js";import"../../../chunk-FGYJ5DJY.js";import"../../../chunk-7F52SZOI.js";import"../../../chunk-MQNBD6AB.js";import"../../../chunk-23DYNW6S.js";import"../../../chunk-V7U33NF2.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-DUVRZ456.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-BSPCSC45.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{useSectionOps}from"../../../chunk-
|
|
1
|
+
export{useSectionOps}from"../../../chunk-7OKL7HDV.js";import"../../../chunk-OGBYHQE6.js";import"../../../chunk-LNHT2KPX.js";import"../../../chunk-U3JP4VGF.js";import"../../../chunk-PLVEGYK6.js";import"../../../chunk-KOVJODTY.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-VULUDKA3.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-A6Z4SD3I.js";import"../../../chunk-K56YDHYQ.js";import"../../../chunk-XWFH2NHZ.js";import"../../../chunk-YRLPFZW3.js";import"../../../chunk-FIVU2COQ.js";import"../../../chunk-X3TYRF5V.js";import"../../../chunk-RC25EGHD.js";import"../../../chunk-KFV7N2DJ.js";import"../../../chunk-23VM4PMV.js";import"../../../chunk-KRL3IUV3.js";import"../../../chunk-ZOBSIXRD.js";import"../../../chunk-QAJAEWCZ.js";import"../../../chunk-WRFD4EXD.js";import"../../../chunk-36LVP5WD.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-67GNT6PF.js";import"../../../chunk-P2VEMZH5.js";import"../../../chunk-X4T6JT3M.js";import"../../../chunk-KRXQM65X.js";import"../../../chunk-NKB3KVAB.js";
|
|
@@ -5,7 +5,7 @@ import { C as CanvasTarget } from '../../watch-BTYOJpQU.js';
|
|
|
5
5
|
import { D as DeviceOption } from '../../types-B3iSHX-w.js';
|
|
6
6
|
import { P as Place } from '../../types-41704JE4.js';
|
|
7
7
|
import { M as MeasuredCanvas, C as CanvasDragModel } from '../../CanvasDragLayer-ARfaivCu.js';
|
|
8
|
-
import { E as EaselContextMenuItem } from '../../types-
|
|
8
|
+
import { E as EaselContextMenuItem } from '../../types-BbOBWXMP.js';
|
|
9
9
|
import { E as EaselRailItem } from '../../types-Cy7rdmXt.js';
|
|
10
10
|
import { StyleRow } from '../../style-clipboard/index.js';
|
|
11
11
|
import { T as TreeRowMark } from '../../types-Bqq6ya0y.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-
|
|
1
|
+
export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-OGBYHQE6.js";import"../../chunk-LNHT2KPX.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-KOVJODTY.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-VULUDKA3.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-A6Z4SD3I.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-XWFH2NHZ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-X3TYRF5V.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-ZOBSIXRD.js";import"../../chunk-QAJAEWCZ.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-36LVP5WD.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-X4T6JT3M.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
package/dist/strings/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{DEFAULT_SCREEN_WORDS as r}from"../chunk-23DYNW6S.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as o}from"../chunk-6WY6ZXJG.js";import{DEFAULT_TEXT_STYLES_WORDS as n}from"../chunk-OGH6CC3E.js";import{DEFAULT_PICK_WORDS as t}from"../chunk-OFBZOI6W.js";import{
|
|
2
|
-
return Y(t.Provider,{value:i,children:n})}function H(){return W(
|
|
1
|
+
import{DEFAULT_SCREEN_WORDS as r}from"../chunk-23DYNW6S.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as o}from"../chunk-6WY6ZXJG.js";import{DEFAULT_TEXT_STYLES_WORDS as n}from"../chunk-OGH6CC3E.js";import{DEFAULT_PICK_WORDS as t}from"../chunk-OFBZOI6W.js";import{DEFAULT_CANVAS_WORDS as c}from"../chunk-TBY3DFKS.js";import{DEFAULT_TREE_WORDS as e}from"../chunk-K56YDHYQ.js";import{DEFAULT_NODE_MENU_WORDS as m}from"../chunk-WK3AFPXY.js";import{DEFAULT_PANEL_WORDS as i}from"../chunk-KFV7N2DJ.js";import{DEFAULT_SAVE_WORDS as s}from"../chunk-H6DDIBQ4.js";import{DEFAULT_CHROME_WORDS as u,DEFAULT_NOTICE_WORDS as f}from"../chunk-AJSDWWJW.js";import{DEFAULT_RAIL_WORDS as p}from"../chunk-2OAZYSWJ.js";import{DEFAULT_LOCK_WORDS as l}from"../chunk-RE4LP46F.js";import{DEFAULT_COPY_WORDS as h}from"../chunk-KRL3IUV3.js";import{DEFAULT_FIELDS_WORDS as j}from"../chunk-WRFD4EXD.js";import{stringsContext as k}from"../chunk-MFIRYGHW.js";import{DEFAULT_DRAG_WORDS as a}from"../chunk-KAML3KQH.js";import{useContext as W,useMemo as D}from"react";import{jsx as Y}from"react/jsx-runtime";var y={notice:f,lock:l,save:s,chrome:u,rail:p,tree:e,panel:i,fields:j,pick:t,drag:a,menu:m,styleClipboard:o,copy:h,canvas:c,textStyles:n,screen:r},F=r=>"object"==typeof r&&null!==r;function K(r,o){const n={};for(const t of Object.keys(r)){const c=r[t],e=o[t];null==e?n[t]=c:F(c)?n[t]=F(e)?K(c,e):c:n[t]=typeof e==typeof c?e:c}return n}function d(r,o){return o?K(r,o):r}function v({value:r,locale:o,children:n}){const t=k(),c=W(t),e=c?.strings??y,m=o??c?.locale??"en",i=D(()=>({strings:d(e,r),locale:m}),[e,r,m]);/* @__PURE__ */
|
|
2
|
+
return Y(t.Provider,{value:i,children:n})}function H(){return W(k())?.strings??y}function J(){return W(k())?.locale??"en"}export{y as DEFAULT_EASEL_STRINGS,v as EaselStringsProvider,d as mergeEaselStrings,J as useEaselLocale,H as useEaselStrings};
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import{hexReadout as e,ColourWindow as s,typedHex as t}from"../chunk-U6LJ5UKD.js";import{DEFAULT_TEXT_STYLES_WORDS as a}from"../chunk-OGH6CC3E.js";export{DEFAULT_TEXT_STYLES_WORDS}from"../chunk-OGH6CC3E.js";import"../chunk-OFBZOI6W.js";import{FieldSlider as n}from"../chunk-XWFH2NHZ.js";import{
|
|
1
|
+
import{hexReadout as e,ColourWindow as s,typedHex as t}from"../chunk-U6LJ5UKD.js";import{DEFAULT_TEXT_STYLES_WORDS as a}from"../chunk-OGH6CC3E.js";export{DEFAULT_TEXT_STYLES_WORDS}from"../chunk-OGH6CC3E.js";import"../chunk-OFBZOI6W.js";import{FieldSlider as n}from"../chunk-XWFH2NHZ.js";import{TEXT_STYLE_KINDS as l,canAddTextStyle as i,TEXT_STYLE_MAX as r,isDefaultTextStyle as o,CAMPAIGN_TEXT_STYLE_SETTINGS as d,TEXT_STYLE_SETTINGS as c,textStyleRowSize as u,describeTextStyle as m,updateTextStyle as h,textStyleCaseCss as f,TEXT_STYLE_CASES as p,addTextStyle as v,removeTextStyle as y,TEXT_STYLE_RANGES as S}from"../chunk-YHZSBL2N.js";export{CAMPAIGN_TEXT_STYLE_SETTINGS,TEXT_STYLE_CASES,TEXT_STYLE_CASE_CSS,TEXT_STYLE_DEFAULT_COUNT,TEXT_STYLE_KINDS,TEXT_STYLE_MAX,TEXT_STYLE_RANGES,TEXT_STYLE_SETTINGS,addTextStyle,canAddTextStyle,defaultTextStyles,describeTextStyle,isDefaultTextStyle,isTextStyleCase,removeTextStyle,resolveTextStyle,textStyleCaseCss,textStyleCaseOfCss,textStyleRowSize,updateTextStyle,weightWord}from"../chunk-YHZSBL2N.js";import{FieldSelect as g}from"../chunk-QAJAEWCZ.js";import"../chunk-WRFD4EXD.js";import{useWords as b}from"../chunk-MFIRYGHW.js";import{withTip as k}from"../chunk-P2VEMZH5.js";import{hsvToHex as N,Tooltip as C,ColorSwatch as x,IconButton as T}from"efficient-shell/ui";import{useState as w,useRef as E,useId as z,useEffect as O,Fragment as _}from"react";import{TrashIcon as A,ChevronIcon as L,BoldIcon as j,ItalicIcon as M,CaseLowerIcon as W,CaseCapitalizedIcon as $,CaseUpperIcon as D,CaseNormalIcon as X}from"efficient-shell/icons/efficient";import{jsxs as Y,jsx as I,Fragment as F}from"react/jsx-runtime";var H=`conic-gradient(${[0,60,120,180,240,300,0].map(e=>N({h:e,s:1,v:1})).join(", ")})`;function P({value:t,hex:a,colours:n,label:l,followsWord:i,anyWord:r,onChange:o,readOnly:d=!1}){const[c,u]=w(!1),m=E(null),h=E(null),f=z(),p=void 0!==t&&n.some(e=>e.key===t),v=void 0!==t&&!p;return O(()=>{if(!c)return;const e=m.current?.ownerDocument;if(!e)return;const s=e=>{m.current&&!m.current.contains(e.target)&&u(!1)};return e.addEventListener("click",s,!0),()=>e.removeEventListener("click",s,!0)},[c]),/* @__PURE__ */Y("div",{ref:m,className:"es-ts-set","data-ts-setting":"color",children:[
|
|
2
2
|
/* @__PURE__ */Y("div",{className:"es-ts-top",children:[
|
|
3
3
|
/* @__PURE__ */I("span",{className:"es-ts-sub",children:l}),
|
|
4
4
|
/* @__PURE__ */I("span",{className:"es-ts-colour-read",children:a?e(a):i})]}),
|
|
5
5
|
/* @__PURE__ */Y("div",{className:"es-ts-swatches",role:"group","aria-label":l,children:[n.map(s=>/* @__PURE__ */I(C,{content:`${s.name} · ${e(s.value)}`,children:/* @__PURE__ */I(x,{color:s.value,size:"sm",className:"es-ts-swatch","aria-label":s.name,selected:t===s.key,disabled:d,onClick:()=>o(s.key)})},s.key)),
|
|
6
|
-
/* @__PURE__ */I(C,{content:r,children:/* @__PURE__ */I(x,{ref:h,color:
|
|
7
|
-
return I("div",{className:"es-ts",ref:X,children:
|
|
8
|
-
return Y(
|
|
9
|
-
return I(
|
|
10
|
-
/* @__PURE__ */I("span",{className:"es-ts-add-word",children:
|
|
11
|
-
/* @__PURE__ */I("span",{className:"es-ts-count",children:
|
|
6
|
+
/* @__PURE__ */I(C,{content:r,children:/* @__PURE__ */I(x,{ref:h,color:H,size:"sm",className:"es-ts-swatch es-ts-swatch--any","aria-label":r,selected:v,"aria-expanded":c,"aria-controls":c?f:void 0,disabled:d,onClick:()=>u(e=>!e)})})]}),c?/* @__PURE__ */I(s,{id:f,value:a??"",onChange:e=>o(e),label:l,readOnly:d,onClose:()=>{u(!1),h.current?.focus()}}):null]})}function R({styles:e,onChange:s,fonts:t,colours:n=[],settings:c=d,auto:u=[],fallback:m,sample:h,openId:f,defaultOpenId:p=null,onOpenChange:S,onAdd:g,rowActions:N,onRemove:C,max:x=r,device:T="desktop",readOnly:_=!1}){const L=b("textStyles",a),j=z(),[M,W]=w(p),$=void 0!==f?f:M,D=e=>{void 0===f&&W(e),S?.(e)},X=E(null),[H,P]=w(null);O(()=>{if(!H||!X.current)return;const e=[...X.current.querySelectorAll(".es-ts-item")].find(e=>e.dataset.tsId===H.id),s=e?e.querySelector(".es-ts-row"):X.current.querySelector(`.es-ts-add[data-ts-kind="${H.kind}"]`);s?.focus(),P(null)},[H]);/* @__PURE__ */
|
|
7
|
+
return I("div",{className:"es-ts",ref:X,children:l.map(a=>{const l=e.filter(e=>e.kind===a),r=!i(e,a,x),d=!_&&!r;/* @__PURE__ */
|
|
8
|
+
return Y(B,{label:L.groups[a],children:[l.map(a=>{const l=N?.(a),i=null!=l&&!1!==l,r=Boolean(C)&&!_&&!o(a);/* @__PURE__ */
|
|
9
|
+
return I(G,{style:a,fonts:t,colours:n,settings:c,auto:u,fallback:m,sample:h,device:T,readOnly:_,open:$===a.id,onOpenChange:e=>D(e?a.id:null),onChange:t=>s(e.map(e=>e.id===t.id?t:e)),actions:r||i?/* @__PURE__ */Y(F,{children:[r?k(L.remove,/* @__PURE__ */I("button",{type:"button",className:"es-ts-del","aria-label":L.removeNamed({name:a.name}),onClick:()=>(t=>{if(_||!C)return;const a=y(e,t.id,{name:L.styleName});if(!a)return;const n=e.filter(e=>e.kind===t.kind),l=n[n.indexOf(t)+1];$===t.id&&D(null),s(a.styles),C(a.removed),P({id:l?.id??null,kind:t.kind})})(a),children:/* @__PURE__ */I(A,{size:14,"aria-hidden":"true"})})):null,i?l:null]}):null},a.id)}),k(!_&&r?L.full({kind:a,max:x}):void 0,/* @__PURE__ */Y("button",{type:"button",className:"es-ts-add","data-ts-kind":a,disabled:_,"aria-disabled":!(_||!r)||void 0,"aria-describedby":!_&&r?`${j}-full-${a}`:void 0,onClick:()=>{d&&(t=>{if(_)return;const a=v(e,t,{max:x,name:L.styleName,make:g});a&&s(a.styles)})(a)},children:[
|
|
10
|
+
/* @__PURE__ */I("span",{className:"es-ts-add-word",children:L.add[a]}),
|
|
11
|
+
/* @__PURE__ */I("span",{className:"es-ts-count",children:L.count({n:l.length,max:x})})]})),_||!r?null:/* @__PURE__ */I("span",{id:`${j}-full-${a}`,className:"es-vh",children:L.full({kind:a,max:x})})]},a)})})}function B({label:e,children:s}){const t=z();/* @__PURE__ */
|
|
12
12
|
return Y("section",{className:"es-ts-section","aria-labelledby":t,children:[
|
|
13
|
-
/* @__PURE__ */I("div",{className:"es-ts-group",id:t,children:e}),s]})}function
|
|
13
|
+
/* @__PURE__ */I("div",{className:"es-ts-group",id:t,children:e}),s]})}function G({style:e,fonts:s,colours:t=[],settings:n=d,auto:l=[],fallback:i,sample:r,open:o,onOpenChange:f,onChange:p,actions:v,device:y="desktop",readOnly:S=!1}){const g=b("textStyles",a),k=`${z()}-open-${e.id}`,N=new Set(l),C=c.filter(e=>n.includes(e)),x={...i?.(e)??{},...e.values},T="phone"===y,w=T&&void 0!==e.values.sizePhone?{...x,size:e.values.sizePhone}:x,E=s.find(e=>e.value===x.font),O={fontFamily:E?.family,fontSize:`${u(w.size??16)}px`,fontWeight:x.weight,fontStyle:x.italic?"italic":void 0};/* @__PURE__ */
|
|
14
14
|
return Y(_,{children:[
|
|
15
15
|
/* @__PURE__ */Y("div",{className:"es-ts-item","data-ts-id":e.id,children:[
|
|
16
|
-
/* @__PURE__ */Y("button",{type:"button",className:"es-ts-row","aria-expanded":
|
|
17
|
-
/* @__PURE__ */I("span",{className:"es-ts-chev","aria-hidden":"true",children:/* @__PURE__ */I(
|
|
16
|
+
/* @__PURE__ */Y("button",{type:"button",className:"es-ts-row","aria-expanded":o,"aria-controls":o?k:void 0,onClick:()=>f(!o),children:[
|
|
17
|
+
/* @__PURE__ */I("span",{className:"es-ts-chev","aria-hidden":"true",children:/* @__PURE__ */I(L,{size:12})}),
|
|
18
18
|
/* @__PURE__ */I("span",{className:"es-ts-name",style:O,children:e.name}),
|
|
19
|
-
/* @__PURE__ */I("span",{className:"es-ts-meta",children:
|
|
20
|
-
return I("div",{className:"es-ts-slider","data-ts-setting":e,children:/* @__PURE__ */I(n,{label:
|
|
19
|
+
/* @__PURE__ */I("span",{className:"es-ts-meta",children:m(w,s,g,{autoSize:N.has("size")&&w===x&&void 0===e.values.size})})]}),v?/* @__PURE__ */I("div",{className:"es-ts-actions",children:v}):null]}),o?/* @__PURE__ */I("div",{className:"es-ts-open",id:k,children:/* @__PURE__ */I(Z,{style:e,values:x,fonts:s,colours:t,settings:C,autoSet:N,sample:r??g.sample,words:g,phone:T,readOnly:S,set:s=>p(h([e],e.id,s)[0])})}):null]})}var U={none:X,upper:D,capitalize:$,lower:W};function Z({style:e,values:s,fonts:a,colours:l,settings:i,autoSet:r,sample:o,words:d,phone:c,readOnly:u,set:m}){const h=e.values,p=a.find(e=>e.value===s.font),v=function(e,s){return e?s.find(s=>s.key===e)?.value??t(e)??void 0:void 0}(s.color,l),y=e=>"largestSize"===e||r.has(e),g=e=>y(e)?h[e]:s[e],b=g("size"),N=c&&void 0!==h.sizePhone?h.sizePhone:b,C=g("lineSpacing"),x=g("letterSpacing"),w=y("letterCase")?h.letterCase:s.letterCase,E={fontFamily:p?.family,fontSize:void 0===N?void 0:`${N}px`,fontWeight:s.weight,fontStyle:s.italic?"italic":void 0,lineHeight:void 0===C?void 0:String(C/100),letterSpacing:void 0===x?void 0:`${x}px`,color:v,textTransform:f(w)},z=e=>{const t=S[e],a=y(e);/* @__PURE__ */
|
|
20
|
+
return I("div",{className:"es-ts-slider","data-ts-setting":e,children:/* @__PURE__ */I(n,{label:d.settings[e],value:h[e],onChange:s=>m({[e]:s}),min:t.min,max:t.max,step:t.step,shiftStep:t.shiftStep,sliderMin:t.sliderMin,sliderMax:t.sliderMax,unit:t.unit||void 0,styleValue:a?void 0:s[e],auto:a?d.auto:void 0,readOnly:u})},e)};/* @__PURE__ */
|
|
21
21
|
return Y(F,{children:[
|
|
22
|
-
/* @__PURE__ */I("div",{className:"es-ts-preview",style:
|
|
23
|
-
return I(q,{value:
|
|
24
|
-
return I(K,{value:
|
|
22
|
+
/* @__PURE__ */I("div",{className:"es-ts-preview",style:E,"aria-label":d.preview,children:o}),i.map(t=>{switch(t){case"font":/* @__PURE__ */
|
|
23
|
+
return I(q,{value:h.font,fonts:a,words:d,readOnly:u,set:m},t);case"color":/* @__PURE__ */
|
|
24
|
+
return I(K,{value:h.color,hex:v,colours:l,words:d,readOnly:u,set:m},t);case"emphasis":{const e=(s.weight??400)>=600,a=!1!==p?.italic;/* @__PURE__ */
|
|
25
25
|
return Y("div",{className:"es-ts-set","data-ts-setting":t,children:[
|
|
26
|
-
/* @__PURE__ */I("span",{className:"es-ts-sub",children:
|
|
27
|
-
/* @__PURE__ */Y("div",{className:"es-ts-icons",children:[
|
|
28
|
-
return I(V,{value:
|
|
29
|
-
return I("div",{className:"es-ts-slider","data-ts-setting":"size","data-ts-device":"phone",children:/* @__PURE__ */I(n,{label:
|
|
26
|
+
/* @__PURE__ */I("span",{className:"es-ts-sub",children:d.settings.emphasis}),
|
|
27
|
+
/* @__PURE__ */Y("div",{className:"es-ts-icons",children:[k(d.bold,/* @__PURE__ */I(T,{className:"es-ts-icon","aria-label":d.bold,"aria-pressed":e,disabled:u,onClick:()=>m({weight:e?400:700}),children:/* @__PURE__ */I(j,{size:16})})),u||a?k(d.italic,/* @__PURE__ */I(T,{className:"es-ts-icon","aria-label":d.italic,"aria-pressed":Boolean(s.italic),disabled:u,onClick:()=>m({italic:!s.italic||void 0}),children:/* @__PURE__ */I(M,{size:16})})):/* @__PURE__ */I(T,{className:"es-ts-icon","aria-label":d.italic,"aria-pressed":Boolean(s.italic),"aria-disabled":!0,disabledReason:d.italicMissing,children:/* @__PURE__ */I(M,{size:16})})]})]},t)}case"letterCase":/* @__PURE__ */
|
|
28
|
+
return I(V,{value:h.letterCase??s.letterCase,auto:y("letterCase"),words:d,readOnly:u,set:m},t);case"largestSize":return"heading"===e.kind?z(t):null;case"size":return c?(()=>{const e=S.size;/* @__PURE__ */
|
|
29
|
+
return I("div",{className:"es-ts-slider","data-ts-setting":"size","data-ts-device":"phone",children:/* @__PURE__ */I(n,{label:d.settings.size,value:h.sizePhone,onChange:e=>m({sizePhone:e}),min:e.min,max:e.max,step:e.step,shiftStep:e.shiftStep,sliderMin:e.sliderMin,sliderMax:e.sliderMax,unit:e.unit||void 0,styleValue:b,readOnly:u})},"size")})():z(t);default:return z(t)}})]})}function q({value:e,fonts:s,words:t,readOnly:a,set:n}){const l=z();/* @__PURE__ */
|
|
30
30
|
return Y("div",{className:"es-ts-set","data-ts-setting":"font",children:[
|
|
31
31
|
/* @__PURE__ */I("span",{className:"es-ts-sub",id:l,children:t.settings.font}),
|
|
32
|
-
/* @__PURE__ */I(
|
|
33
|
-
return I(
|
|
32
|
+
/* @__PURE__ */I(g,{value:e,options:s.map(e=>({label:e.label,value:e.value})),onChange:e=>n({font:e}),ariaLabelledBy:l,readOnly:a})]})}function K({value:e,hex:s,colours:t,words:a,readOnly:n,set:l}){/* @__PURE__ */
|
|
33
|
+
return I(P,{value:e,hex:s,colours:t,label:a.settings.color,followsWord:a.colour.follows,anyWord:a.colour.any,readOnly:n,onChange:e=>l({color:e})})}function V({value:e,auto:s,words:t,readOnly:a,set:n}){const l=s?["auto",...p]:p,i=e??(s?"auto":"none"),r=E([]),o=e=>n({letterCase:"auto"===e?void 0:e});/* @__PURE__ */
|
|
34
34
|
return Y("div",{className:"es-ts-set","data-ts-setting":"letterCase",children:[
|
|
35
35
|
/* @__PURE__ */I("span",{className:"es-ts-sub",children:t.settings.letterCase}),
|
|
36
|
-
/* @__PURE__ */I("div",{className:"es-ts-icons",role:"radiogroup","aria-label":t.settings.letterCase,onKeyDown:e=>{const s="ArrowRight"===e.key||"ArrowDown"===e.key?1:"ArrowLeft"===e.key||"ArrowUp"===e.key?-1:0;if(!s||a)return;e.preventDefault();const t=(
|
|
36
|
+
/* @__PURE__ */I("div",{className:"es-ts-icons",role:"radiogroup","aria-label":t.settings.letterCase,onKeyDown:e=>{const s="ArrowRight"===e.key||"ArrowDown"===e.key?1:"ArrowLeft"===e.key||"ArrowUp"===e.key?-1:0;if(!s||a)return;e.preventDefault();const t=(l.indexOf(i)+s+l.length)%l.length;o(l[t]),r.current[t]?.focus()},children:l.map((e,s)=>{const n=e===i;if("auto"===e)return k(t.case.autoTitle,/* @__PURE__ */I(T,{ref:e=>{r.current[s]=e},role:"radio",pressed:n,className:"es-ts-icon es-ts-icon--word","aria-checked":n,"aria-label":t.case.auto,tabIndex:n?0:-1,disabled:a,onClick:()=>o(e),children:t.case.auto},e));const l=U[e];return k(t.case[e],/* @__PURE__ */I(T,{ref:e=>{r.current[s]=e},role:"radio",pressed:n,className:"es-ts-icon","aria-checked":n,"aria-label":t.case[e],tabIndex:n?0:-1,disabled:a,onClick:()=>o(e),children:/* @__PURE__ */I(l,{size:16})},e))})})]})}export{P as ColourSwatchRow,G as TextStyleItem,B as TextStylesGroup,R as TextStylesList};
|
|
@@ -20,6 +20,9 @@ interface EaselContextMenuItem {
|
|
|
20
20
|
/** Draw a tick beside this item — for a submenu whose entries are STATES
|
|
21
21
|
* rather than actions, so it can say which one you are already on. */
|
|
22
22
|
checked?: boolean;
|
|
23
|
+
/** Drawn greyed: offered, but not possible here (Move up on the first
|
|
24
|
+
* node). The shell's entry takes no choice while it is set. */
|
|
25
|
+
disabled?: boolean;
|
|
23
26
|
/**
|
|
24
27
|
* A glyph for the row, drawn before the label.
|
|
25
28
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-easel",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.3.0",
|
|
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-BALFHI3G.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as e,jsxs as n,Fragment as l}from"react/jsx-runtime";function r(e){return e.map((e,n)=>{const l=String(n);if("—"===e.label)return{type:"divider",key:l};if(e.header)return{type:"label",key:l,label:e.label};if(e.children?.length){const n=e.children.some(e=>void 0!==e.checked);return{type:"submenu",key:l,label:e.label,icon:i(e),items:e.children.map((e,l)=>n?{type:"radio",key:String(l),label:c(e),icon:i(e),checked:Boolean(e.checked),onSelect:e.onClick}:{type:"item",key:String(l),label:c(e),icon:i(e),danger:e.danger,onSelect:e.onClick})}}return{type:"item",key:l,label:c(e),icon:i(e),danger:e.danger,onSelect:e.onClick}})}function t(e){return e.find(e=>e.header)?.label}function i(n){return null==n.icon?void 0:/* @__PURE__ */e("span",{className:"es-menu-icon","aria-hidden":"true",children:n.icon})}function c(r){return null==r.icon&&null==r.shortcut?r.label:/* @__PURE__ */n(l,{children:[
|
|
2
|
-
/* @__PURE__ */e("span",{className:"es-menu-label",children:r.label}),null==r.shortcut?null:/* @__PURE__ */e("span",{className:"es-menu-shortcut","aria-hidden":"true",children:r.shortcut})]})}export{r as easelMenuEntries,t as menuLabel};
|
package/dist/chunk-EFQCH7CO.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useEaselSession as e}from"./chunk-O7Q4DDJT.js";import{useHostEscape as n}from"./chunk-U3JP4VGF.js";import{DEFAULT_SCREEN_WORDS as t}from"./chunk-23DYNW6S.js";import{styleMenuItems as o}from"./chunk-V7U33NF2.js";import{easelMenuEntries as l,menuLabel as r}from"./chunk-BALFHI3G.js";import{createNodeClipboard as i,nodeMenuItems as c}from"./chunk-OSPUG6S6.js";import{DEFAULT_NODE_MENU_WORDS as s}from"./chunk-WK3AFPXY.js";import{isTypingTarget as a,useCanvasEvent as u,framePointToHost as d}from"./chunk-X4T6JT3M.js";import{zoneKey as p,ROOT_SLOT as f,ROOT_ID as m}from"./chunk-KRXQM65X.js";import{ROOT_ZONE as h}from"./chunk-PLVEGYK6.js";import{useState as y,useCallback as k,useRef as b,useEffect as v}from"react";import{ContextMenu as g}from"efficient-shell/ui";import{UndoIcon as w,RedoIcon as x,PasteIcon as C,SettingsIcon as z,LayersIcon as O,CopyIcon as P}from"efficient-shell/icons/efficient";import{jsx as A}from"react/jsx-runtime";function D(e,n){const t=[],o=/* @__PURE__ */new Set;let l={zone:n.zone,index:n.index};for(;l;){const n=e.nodeAt(l.zone,l.index);if(!n||o.has(n.props.id))break;if(o.add(n.props.id),t.push({zone:l.zone,index:l.index,node:n,parentType:null}),l.zone===h)break;const r=l.zone.lastIndexOf(":");if(r<=0)break;l=e.locate(l.zone.slice(0,r))}for(let e=0;e<t.length-1;e+=1)t[e].parentType=t[e+1].node.type;return t}var K=i(),S=/* @__PURE__ */new WeakMap;function j(e){if(e.claimsPage)return K;const n=e.registry;if(!n)return e.cache("easel:node-clipboard",i);let t=S.get(n);return t||(t=i(),S.set(n,t)),t}function M(){return j(e())}function T(e,n,t){if(n===h){const{floor:n,cap:o}=e.sectionBand();return{parentId:m,slot:f,index:Math.min(Math.max(t,n),o)}}const o=n.lastIndexOf(":");return{parentId:n.slice(0,o),slot:n.slice(o+1),index:t}}function X(e,n,t){const o=e.isPinned(n,t),l=!o&&!e.isLocked(n)&&!e.duplicateBlocked(n),r=e.permits?.(n)??{duplicate:!0,delete:!0};return{copy:!o&&r.duplicate,cut:l&&r.duplicate&&r.delete,delete:l&&r.delete}}function L(e,n,t){const o=e.canPasteAt;if(!o)return p(n.from)===t.zone?T(e,t.zone,t.index+1):null;for(const l of D(e,t)){const t=T(e,l.zone,l.index+1);if(o(n,t))return t}return null}function E(e){if(e.defaultPrevented||e.altKey||e.shiftKey)return null;if(a(e.target))return null;const n=e.target,t=n&&"ownerDocument"in n?n.ownerDocument??n:null,o=t?.getSelection?.();if(o&&!o.isCollapsed&&o.toString().trim())return null;if(!e.metaKey&&!e.ctrlKey)return"Delete"===e.key?"delete":null;const l=e.code||(1===e.key.length?`Key${e.key.toUpperCase()}`:"");return"KeyC"===l?"copy":"KeyX"===l?"cut":"KeyV"===l?"paste":null}function I(e,n,t,o){const l=e.nodeAt(t.zone,t.index);if(!l)return null;const r=l.props.id,i=e.labelOf(l.type,t.zone),c=X(e,l,t.zone);if("copy"===n)return c.copy?(e.nodeOps.copy(r,i),{done:"copied",name:i}):null;if(o.readOnly)return null;if("cut"===n)return c.cut?(e.nodeOps.cut(r,i),{done:"cut",name:i}):null;if("delete"===n)return c.delete?(e.nodeOps.remove(r),{done:"deleted",name:i}):null;const s=o.held;if(!s)return null;const a=e.isPinned(l,t.zone)?null:L(e,s,t);return a?(e.nodeOps.paste(a),{done:"pasted",name:s.label}):(e.onPasteRefused(s),{done:"refused",name:s.label})}function R(e,n){const{zone:t,index:l}=n,r=e.nodeAt(t,l);if(!r)return[];const i=r.props.id,s=e.labelOf(r.type,t),a=Boolean(r.props._hidden),u=e.nodeOps,d=e.isPinned(r,t),p=e.isLocked(r),f=!d&&!p&&!e.duplicateBlocked(r),m=e.permits?.(r)??{duplicate:!0,delete:!0},y=X(e,r,t),k=D(e,n),b=u.held,v=b&&!d?L(e,b,n):null,g=!e.readOnly,w=e.style?o({held:g?e.style.held():null,canCopy:e.style.canCopy(r,t),onCopy:()=>e.style?.copy(r,t),onPaste:()=>e.style?.paste(t,l,r),words:e.words?.styleClipboard}):[];return c({title:s,words:e.words?.menu,layer:{group:"pick",items:k.flatMap((n,t)=>{const o={label:e.rowNameOf(n.node,n.zone),checked:0===t,onClick:()=>e.selectAt(n.zone,n.index,n.node.props.id,n.parentType)},l=n.zone===h?null:e.slotRung?.(n.zone)??null;return l?[o,{label:l.label,checked:!1,onClick:l.select}]:[o]})},actions:{duplicate:g&&f&&m.duplicate?()=>u.duplicate(i):void 0,moveUp:g&&u.canStep(i,-1)?()=>u.step(i,-1):void 0,moveDown:g&&u.canStep(i,1)?()=>u.step(i,1):void 0,copy:y.copy?()=>u.copy(i,s):void 0,cut:g&&y.cut?()=>u.cut(i,s):void 0,paste:g&&b&&v?{label:b.label,run:()=>u.paste(v)}:void 0,rename:g&&e.renamePropOf(r,t)?()=>e.beginRename(t,l):void 0,hide:!g||p||d?void 0:{hidden:a,run:()=>u.setProps(i,{_hidden:!a})},delete:g&&f&&m.delete?()=>u.remove(i):void 0},style:w,extras:e.menuRows?.(r,t,l)??void 0,pinnedLine:d?Y(e).pinned:void 0})}var Y=e=>e.words?.screen??t.menu;function B(e){const n=Y(e),o=!e.readOnly,l=[];o&&e.history.hasPast&&l.push({label:n.undo,icon:/* @__PURE__ */A(w,{}),shortcut:"⌘Z",onClick:e.history.back}),o&&e.history.hasFuture&&l.push({label:n.redo,icon:/* @__PURE__ */A(x,{}),shortcut:"⇧⌘Z",onClick:e.history.forward});const r=[],i=e.nodeOps.held,c=T(e,h,e.sectionBand().cap);if(o&&i&&(e.canPasteAt?e.canPasteAt(i,c):p(i.from)===h)){const n=c,t=e.words?.menu??s;r.push({label:t.pasteNamed({paste:t.paste,label:i.label}),icon:/* @__PURE__ */A(C,{}),shortcut:"⌘V",onClick:()=>e.nodeOps.paste(n)})}const a=[l,r,[{label:e.pageSettingsLabel??t.pageSettings,icon:/* @__PURE__ */A(z,{}),onClick:e.openPageSettings},{label:n.collapseAll,icon:/* @__PURE__ */A(O,{}),onClick:e.collapseAll}]].filter(e=>e.length>0),u={label:"—",onClick:()=>{}};return a.flatMap((e,n)=>n?[u,...e]:e)}function N(e,n){const t=n.selectionStart??0,o=n.selectionEnd??0,l=n.value.slice(t,o),r=e=>{n.focus(),n.setRangeText(e,t,o,"end"),n.dispatchEvent(new Event("input",{bubbles:!0}))},i=e.words?.menu??s,c=Y(e),a=[];l&&(a.push({label:i.copy,icon:/* @__PURE__ */A(P,{}),shortcut:"⌘C",onClick:()=>navigator.clipboard?.writeText(l)}),a.push({label:i.cut,icon:/* @__PURE__ */A(P,{}),shortcut:"⌘X",onClick:()=>{navigator.clipboard?.writeText(l),r("")}})),a.push({label:i.paste,icon:/* @__PURE__ */A(C,{}),shortcut:"⌘V",onClick:()=>{navigator.clipboard?.readText().then(e=>{e&&r(e)}).catch(()=>e.onPasteRefused())}});const u=[a,n.value?[{label:c.selectAll,shortcut:"⌘A",onClick:()=>{n.focus(),n.select()}}]:[]].filter(e=>e.length>0),d={label:"—",onClick:()=>{}};return u.flatMap((e,n)=>n?[d,...e]:e)}function U(e){return e.shiftKey}function V(e,t){const[o,l]=y(null),r=k(()=>l(null),[]);n(null!==o,r);const i=b(e);i.current=e;const c=k(e=>{const n=i.current,t=n.keys;if(!t)return;const o=E(e);if(!o)return;const l=t.selected();if(!l)return;const r=I(n,o,l,{readOnly:t.readOnly,held:t.held()});r&&(e.preventDefault(),t.onDone?.(r))},[]),s=e.keys?.target??null;v(()=>{if(!s)return;const e=e=>c(e);return s.addEventListener("keydown",e),()=>s.removeEventListener("keydown",e)},[s,c]),u(t,"keydown",c);const a=k(n=>{if(U(n))return;const t=n.target;if(t?.closest?.("[data-slot-zone]"))return n.preventDefault(),void l(null);const o=function(e){const n=e?.closest?.("input, textarea");return n&&("INPUT"!==n.tagName||["text","search","url","email","tel","number",""].includes(n.type))?n:null}(t);if(o)return n.preventDefault(),void l({kind:"input",x:n.clientX,y:n.clientY,el:o,owner:t});const r=t?.closest?.("[data-node-id]")?.getAttribute("data-node-id"),i=r?e.locate(r):null;n.preventDefault(),l(i?{kind:"node",x:n.clientX,y:n.clientY,...i,owner:t}:{kind:"empty",x:n.clientX,y:n.clientY,owner:t})},[e]);u(t,"contextmenu",n=>{if(U(n)||!t)return;const o=n.target?.closest?.("[data-puck-component]")??null,r=o?.getAttribute("data-puck-component"),i=r?e.locate(r):null;n.preventDefault();const c=d(t.frame,n.clientX,n.clientY),s=t.frame;l(i?{kind:"node",...c,...i,owner:s}:{kind:"empty",...c,owner:s})}),u(t,"mousedown",r),u(t,"scroll",r,{on:"window"});return{onEditorContextMenu:a,menu:o?/* @__PURE__ */A(F,{host:e,target:o,onClose:r}):null,closeMenu:r}}function F({host:e,target:n,onClose:t}){const o="node"===n.kind?R(e,n):"input"===n.kind?N(e,n.el):B(e);return 0===o.length?null:/* @__PURE__ */A(g,{at:{x:n.x,y:n.y},owner:n.owner??null,onClose:t,"aria-label":r(o),items:l(o)})}export{K as EASEL_NODE_CLIPBOARD,D as ancestorChain,j as nodeClipboardOf,X as nodeClipboardRules,R as nodeMenuItems,E as nodeShortcut,B as pageMenuItems,L as pastePlace,I as runNodeShortcut,N as textMenuItems,M as useNodeClipboard,V as useNodeContextMenu};
|
package/dist/chunk-I2BCNLLV.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{usePickFollowsSelection as n}from"./chunk-LNHT2KPX.js";import{EaselCanvas as e,useSelectedFields as t}from"./chunk-UZXGXMNO.js";import{Inspector as r}from"./chunk-ZFFWO2AF.js";import{slotFieldsOf as i}from"./chunk-PLVEGYK6.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(n,e,t){const r=n.slotsOf?.(t);return r||i(e,t.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=()=>k,v=()=>"",g=()=>null,y=()=>{},b={isLockedBlock:()=>!1,duplicateBlocked:()=>null,nestDepth:()=>0,newSectionNode:()=>null,canAddTo:()=>null,blockIsOffered:()=>!0},O={labelAtLevel:(n,e,t)=>t,descriptions:{},categoryLabel:()=>{},firstSection:null,blockRowName:(n,e)=>e(n.type),plainText:n=>n,Icon:()=>null,Thumbnail:()=>null,useProducts:()=>null},L={options:[{id:"desktop",label:"Desktop",icon:/* @__PURE__ */s(l,{})}],initial:"desktop",fluid:"desktop",widths:{desktop:2e3}},j={read:()=>"sections",write:()=>{},forSelection:(n,e)=>n?"sections":e},w={first:null,last:null,firstGroup:null,lastGroup:null,isSectionGroup:()=>!1,sectionGroupZone:()=>"",panelOf:()=>null};function N(){/* @__PURE__ */
|
|
2
|
-
return s(e,{height:"fill"})}function P(){const{id:n,fields:e,values:i,readOnly:o,onChange:u}=t();/* @__PURE__ */
|
|
3
|
-
return s("div",{className:"es-sidepanel es-sidepanel--right",children:/* @__PURE__ */s(r,{fields:e,values:i,onChange:u,readOnly:o,idPrefix:n})})}var S=o({});function F({parts:n,children:e}){/* @__PURE__ */
|
|
4
|
-
return s(S.Provider,{value:n,children:e})}function G(){return u(S)}function C(){return(G().useOwnerName??v)()}function D(){return(G().useDocumentLabel??g)()}function x(n,e,t,r){return(G().useBridges??h)(n,e,t,r)}function B(n){return(G().useStandaloneBridges??h)(n)}function I(n,e){(G().useDocumentPass??y)(n,e)}function T(){return G().blockRules??b}function A(){return G().blockLook??O}function K(){return G().devices??L}function X(){return G().leftView??j}function Z(){return G().pinned??w}function H(){return G().saveSwitch??!0}function R(e){n(!0===G().pickFollowsSelection,e)}function V(){return G().storageNamespace||void 0}function E(){return G().styleClipboard??null}function M(){return G().nodeKeys??!0}function U(){return G().notify??null}function W(){return G().Canvas??N}function Y(){return G().CanvasHead??null}function q(){return G().canvasDrag??null}var z=o(null);function J({target:n,children:e}){/* @__PURE__ */
|
|
5
|
-
return s(z.Provider,{value:n,children:e})}function Q(){return u(z)}function $(){return G().Inspector??P}export{c as SELECTION_MODE,J as ScreenCanvasTargetProvider,F as ScreenPartsProvider,p as isPinnedFirst,m as isPinnedLast,a as isSlotMode,f as sameInspectorMode,d as screenSlotsOf,A as useScreenBlockLook,T as useScreenBlockRules,x as useScreenBridges,q as useScreenCanvasDrag,W as useScreenCanvasFrame,Y as useScreenCanvasHead,Q as useScreenCanvasTarget,K as useScreenDevices,D as useScreenDocumentLabel,I as useScreenDocumentPass,$ as useScreenInspectorPanel,X as useScreenLeftView,M as useScreenNodeKeys,U as useScreenNotify,C as useScreenOwnerName,G as useScreenParts,R as useScreenPickFollowsSelection,Z as useScreenPinned,H as useScreenSaveSwitch,V as useScreenStorageNamespace,E as useScreenStyleClipboard,B as useStandaloneScreenBridges};
|
package/dist/chunk-LFHMDGLE.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{buildPaletteSections as e,pinnedSection as t,categoryLabel as n}from"./chunk-PA3PNTVV.js";import{blockTypesIn as o}from"./chunk-5ZBY24K7.js";import{sectionTemplatesOf as l}from"./chunk-BVN33R76.js";import{sharedSectionsOf as r}from"./chunk-43AEUUNQ.js";import{SidePanelHead as i,PanelModeExit as s}from"./chunk-SINAM2IT.js";import{blockRuns as c}from"./chunk-M2Z775ZC.js";import{useScreenBlockLook as a,useScreenBlockRules as d,useScreenPinned as p}from"./chunk-I2BCNLLV.js";import{useEaselSession as m}from"./chunk-O7Q4DDJT.js";import{DEFAULT_SCREEN_WORDS as f}from"./chunk-23DYNW6S.js";import{AddPanel as u}from"./chunk-Z2V3TTAR.js";import{DEFAULT_DRAG_WORDS as y}from"./chunk-KAML3KQH.js";import{useEasel as h}from"./chunk-UZXGXMNO.js";import{easelMenuEntries as k}from"./chunk-BALFHI3G.js";import{useWords as g}from"./chunk-MFIRYGHW.js";import{useState as b,useEffect as v,useMemo as j,useRef as w}from"react";import{SharedIcon as C,AddIcon as T}from"efficient-shell/icons/efficient";import{ContextMenu as A,toast as N,Dialog as I,Button as L}from"efficient-shell/ui";import{jsx as M,jsxs as $,Fragment as x}from"react/jsx-runtime";function B({name:e,pages:t,onDelete:n,onCancel:o}){const l=g("screen",f).shared,[r,i]=b(!1),s=w(null);/* @__PURE__ */
|
|
2
|
-
return M(I,{open:!0,role:"alertdialog",size:"sm",title:l.deleteTitle({name:e}),onClose:o,initialFocus:s,footer:/* @__PURE__ */$(x,{children:[
|
|
3
|
-
/* @__PURE__ */M(L,{ref:s,variant:"secondary",onClick:o,children:l.cancel}),
|
|
4
|
-
/* @__PURE__ */M(L,{variant:"danger",loading:r,onClick:()=>{(async()=>{i(!0);try{await n()}finally{i(!1)}})()},children:l.deleteShared})]}),children:l.deleteMessage({count:t})})}var O=e=>`section:${e}`,D=e=>`block:${e}`,E=e=>`template:${e}`,F=e=>`shared:${e}`;function S({at:w,placeBlocks:I,canTake:L,onPick:S,itemFor:H,session:V,siteWide:Z,onClose:z,onHide:P,readOnly:R}){const W=h(e=>e.config),G=a(),{labelAtLevel:K,categoryLabel:Q,firstSection:U,Icon:Y,Thumbnail:X}=G,{blockIsOffered:_,canAddTo:J}=d(),q=g("screen",f).add,ee=g("drag",y).add,te=m(),[ne,oe]=b([]);v(()=>{let e=!1;const t=e=>_(e,te);return l(te).list().then(n=>{if(e)return;const l=W.components;oe(n.filter(e=>e.node?.type&&l[e.node.type]&&o(e.node).every(t)))}).catch(()=>{}),()=>{e=!0}},[W,te]);const le=p().shared,re=g("screen",f).shared,[ie,se]=b([]),[ce,ae]=b(0);v(()=>{if(!le)return;let e=!1;const t=e=>_(e,te);return r(te).list().then(n=>{if(e)return;const l=W.components;se(n.filter(e=>e.node?.type&&l[e.node.type]&&o(e.node).every(t)))}).catch(()=>{}),()=>{e=!0}},[W,te,ce]);const[de,pe]=b(null),[me,fe]=b(null),ue=j(()=>e(W,G),[W]),ye=e=>K(e,"section",W.components[e]?.label??e),he=e=>({type:O(e.type),label:e.name,cover:/* @__PURE__ */M(X,{type:e.type}),title:e.desc?`${e.name} — ${e.desc}`:q.tile({name:e.name}),keywords:[e.alias??"",e.desc,e.type,e.catLabel].filter(Boolean)}),ke=e=>{const t=e.indexOf(":"),n=e.slice(0,t),o=e.slice(t+1);if("section"===n)return{kind:"section",type:o};if("block"===n)return{kind:"block",type:o};if("template"===n){const e=ne.find(e=>e.id===o);return e?{kind:"template",template:e}:null}if("shared"===n){const e=ie.find(e=>e.id===o);return e?{kind:"shared",section:e}:null}return null},ge=e=>/* @__PURE__ */M("span",{className:"es-add-glyph-cover",children:/* @__PURE__ */M(Y,{type:e,size:26})}),be=j(()=>{const e=t(ue,U),o=/* @__PURE__ */new Map,l=e=>{e.retired||o.has(e.type)||!_(e.type,te)||o.set(e.type,e)};for(const t of e?[e]:ue){const e=J(t.type)?.choices??[];e.forEach(l),e.forEach(e=>J(e.type,1)?.choices?.forEach(l))}I?.forEach(l);const r=new Set(ue.map(e=>e.type)),i=[...o.values()].filter(e=>!r.has(e.type)),s=e=>({type:D(e.type),label:e.label,cover:ge(e.type),title:q.tile({name:e.label}),keywords:[e.group??"",e.type].filter(Boolean)}),a=e=>o.has(e.type)?{...he(e),cover:ge(e.type)}:he(e),d=[];ie.length>0&&d.push({key:"shared",title:re.group,tiles:ie.map(e=>({type:F(e.id),label:e.title,cover:/* @__PURE__ */M(X,{type:e.node.type}),mark:/* @__PURE__ */M(C,{size:12}),title:re.onPages({count:e.used_on.length}),keywords:[ye(e.node.type),e.node.type]}))}),ne.length>0&&d.push({key:"templates",title:q.templates,tiles:ne.map(e=>({type:E(e.id),label:e.name,cover:/* @__PURE__ */M(X,{type:e.node.type}),keywords:[ye(e.node.type),e.node.type]}))});const p=i.filter(e=>!e.group);let m=!1;for(const t of Object.keys(W.categories??{})){const o=ue.filter(e=>e.cat===t);if(0===o.length)continue;const l=e&&o.some(t=>t.type===e.type)?e:null,r=(l?[l,...o.filter(e=>e.type!==l.type)]:o).map(a);l&&!m&&(r.splice(1,0,...p.map(s)),m=!0),d.push({key:`category:${t}`,title:n(W,t,Q),tiles:r})}const f=d.find(e=>e.key?.startsWith("category:"));if(!m&&f&&p.length>0&&(f.tiles=[...f.tiles,...p.map(s)],m=!0),c(i.filter(e=>e.group||!m)).forEach((e,t)=>{d.push({key:`blocks:${t}`,title:e.group??"",tiles:e.items.map(s)})}),!L)return d;const u=d.map(e=>({...e,tiles:e.tiles.map(e=>{const t=ke(e.type),n=t?L(t):null;return n?{...e,disabled:!0,disabledReason:n}:e})})),y=e=>e.tiles.some(e=>!e.disabled);return[...u.filter(y),...u.filter(e=>!y(e))]},[ne,ie,re,ue,W,q,L,I,te]);/* @__PURE__ */
|
|
5
|
-
return $(x,{children:[
|
|
6
|
-
/* @__PURE__ */M(i,{icon:/* @__PURE__ */M(T,{size:15}),title:q.title,context:q.contextAll,actions:/* @__PURE__ */M(s,{label:q.done,description:q.doneDescription,onClick:z}),onHide:P}),
|
|
7
|
-
/* @__PURE__ */$("div",{className:"sf-addside sf-scroll",children:[
|
|
8
|
-
/* @__PURE__ */M(u,{groups:be,session:V,itemFor:e=>H(ke(e)??{kind:"section",type:e}),onInsert:S?e=>{const t=ke(e);t&&S(t)}:void 0,onTileMenu:(e,t)=>{const n=ke(e);return"shared"===n?.kind&&!R&&(pe({section:n.section,...t}),!0)},at:w,hint:q.hint,searchLabel:q.search,readOnly:R,words:ee}),Z??null]}),de?/* @__PURE__ */M(A,{at:{x:de.x,y:de.y},owner:de.owner,onClose:()=>pe(null),"aria-label":de.section.title,items:k([{label:re.deleteShared,danger:!0,onClick:()=>{fe(de.section),pe(null)}}])}):null,me?/* @__PURE__ */M(B,{name:me.title,pages:me.used_on.length,onDelete:()=>(async e=>{try{await r(te).remove(e.id)}catch{return void N.error(re.deleteFailed)}fe(null),le?.removed?.(e),se(t=>t.filter(t=>t.id!==e.id)),ae(e=>e+1)})(me),onCancel:()=>fe(null)}):null]})}export{S as AddSidePanel,D as blockKey,O as sectionKey,F as sharedKey,E as templateKey};
|