efficient-easel 20.1.0 → 20.2.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 +2 -1
- package/dist/{chunk-PEDR7G3K.js → chunk-6FWAE2RN.js} +1 -1
- package/dist/{chunk-WBFLSCTI.js → chunk-7YVEYQDE.js} +3 -3
- package/dist/{chunk-ROPYFLNZ.js → chunk-EFHV56BO.js} +13 -13
- package/dist/{chunk-HBBXDGDD.js → chunk-I7BROL77.js} +1 -1
- package/dist/{chunk-H4JCMK36.js → chunk-JQXD3TDE.js} +1 -1
- package/dist/{chunk-5THLKXTH.js → chunk-L2Y3PF2R.js} +1 -1
- package/dist/{chunk-LDEEFLE3.js → chunk-LQV5FZTQ.js} +4 -4
- package/dist/chunk-MEHLY5Q4.js +1 -0
- package/dist/chunk-PAOZMXEI.js +5 -0
- package/dist/chunk-R5KEFI55.js +8 -0
- package/dist/{chunk-2E2SXDYQ.js → chunk-TNGOL65V.js} +1 -1
- package/dist/chunk-WEIE2FBC.js +1 -0
- package/dist/chunk-XJ2WXGFJ.js +65 -0
- package/dist/copy/index.js +13 -13
- package/dist/drag/index.js +1 -1
- package/dist/easel/index.js +1 -1
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/MediaPopup.d.ts +5 -6
- 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 +15 -15
- 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/preview-dom.js +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 +5 -0
- package/dist/screen/lib/screen-parts.js +1 -1
- package/dist/screen/screen.css +37 -0
- package/dist/strings/index.js +1 -1
- package/dist/text-styles/index.js +21 -21
- package/package.json +1 -1
- package/dist/chunk-47CD7ULN.js +0 -1
- package/dist/chunk-47PYYMFM.js +0 -8
- package/dist/chunk-LEZFSSQN.js +0 -5
- package/dist/chunk-PI6RFJR4.js +0 -1
- package/dist/chunk-RVZJ52EP.js +0 -63
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import{AddBlockRow as e}from"../../chunk-
|
|
2
|
-
return
|
|
3
|
-
return
|
|
4
|
-
/* @__PURE__ */J(
|
|
5
|
-
return
|
|
6
|
-
/* @__PURE__ */J("div",{className:"sf-section-bar",children:/* @__PURE__ */J(
|
|
7
|
-
/* @__PURE__ */
|
|
8
|
-
/* @__PURE__ */J("div",{className:"sf-panel-head",children:/* @__PURE__ */J(w,{content:je?se.headerSettings:se.sectionSettings({name:
|
|
9
|
-
/* @__PURE__ */J(
|
|
10
|
-
/* @__PURE__ */J(
|
|
11
|
-
return
|
|
12
|
-
/* @__PURE__ */J(
|
|
13
|
-
/* @__PURE__ */
|
|
14
|
-
/* @__PURE__ */J("span",{className:"sf-plus sf-plus--sm",children:"+"}),
|
|
1
|
+
import{AddBlockRow as e}from"../../chunk-L2Y3PF2R.js";import{scrollPreviewToSection as n,gotoPreviewSlide as o}from"../../chunk-TNGOL65V.js";import{useEaselUndoKeys as r}from"../../chunk-I7BROL77.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-MEHLY5Q4.js";import{useSectionOps as c}from"../../chunk-WEIE2FBC.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-PAOZMXEI.js";import{MediaPopup as f}from"../../chunk-2G6MAXPY.js";import{useScreenDocument as S}from"../../chunk-276MBG5P.js";import"../../chunk-77IWWW6X.js";import"../../chunk-ERR437B5.js";import"../../chunk-UNVKPVZW.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-U66YKDAR.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-FHCKFOCD.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-MQA7OFRA.js";import{DEFAULT_SCREEN_WORDS as C}from"../../chunk-23DYNW6S.js";import{useEasel as y}from"../../chunk-EFHV56BO.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-7LYKFL3Q.js";import"../../chunk-BPXEFVSQ.js";import{LayersTree as N,Subtree as x,TreeRow as A,TreeRowAction as R,TreeSeam as D}from"../../chunk-A6Z4SD3I.js";import{DEFAULT_TREE_WORDS as M}from"../../chunk-K56YDHYQ.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-IWCKVZHS.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-BSHIQIZC.js";import"../../chunk-NDRZP6YR.js";import{DEFAULT_SAVE_WORDS as O,saveIndicator as B}from"../../chunk-H6DDIBQ4.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-ZOBSIXRD.js";import"../../chunk-QAJAEWCZ.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-VANKQVOW.js";import{SaveState as P,panelWidthVars as H}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{useWords as L}from"../../chunk-MFIRYGHW.js";import"../../chunk-LQV5FZTQ.js";import"../../chunk-KAML3KQH.js";import{useTreeDrag as I}from"../../chunk-3S5N4HLJ.js";import"../../chunk-P2VEMZH5.js";import{zoneKey as g,parseZoneKey as W}from"../../chunk-K7BTCBWD.js";import"../../chunk-L55YIXDC.js";import"../../chunk-QIDRJH3S.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import{slotChildRowName as v}from"../../chunk-BHRC3ASL.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-IYT6NN2J.js";import{slotFieldsOf as z,nestsInTree as E}from"../../chunk-PLVEGYK6.js";import"../../chunk-LF3FUSCQ.js";import{useState as F,useRef as V,useEffect as Z,useCallback as b,Fragment as Y}from"react";import{Tooltip as w}from"efficient-shell/ui";import{TrashIcon as K}from"efficient-shell/icons/efficient";import{jsxs as Q,jsx as J,Fragment as T}from"react/jsx-runtime";var $=e=>n=>{n.target.closest("button, input")||e()},X={rowClick:$};function G(){const{saveState:G,readOnly:U,readOnlyReason:q=null}=S(),_=c(),{appState:ee,selectedItem:ne,config:oe}=y(e=>e),[re,te]=F(p),se=L("screen",C),ie=L("tree",M),ce=L("save",O),{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=V(null),Ce=V(null);r(Ce),a(ne?.props.id),Z(()=>{ke&&Se.current!==ke&&(Se.current=ke,je?te(de??p):ne||_.select({index:0}))},[ke,ne,_,je]);const ye=b(e=>te(n=>u(n,e)?n:e),[]),Ne=h({kind:re.kind,mode:re,open:ye,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}),Ae=k(),{labelAtLevel:Re,Icon:De}=Ae,{canAddTo:Me}=j(),Oe=e=>Re(e,"block",oe.components[e]?.label??e),Be=e=>Re(e,"section",Oe(e)),Pe=!je&&"puck"===re.kind&&ne?.props.id===ke,He=he?Me(he.type)?.spec??null:null,Le=he&&He?`${he.props.id}:${He.slot}`:null,Ie=he&&He&&Array.isArray(he.props[He.slot])?he.props[He.slot]:[],ge=e=>v(e,Oe,Ae.plainText),We=(e,r)=>{he&&He&&Le&&(te(p),He.slider?(o(String(he.props.id),e),_.select({index:e,zone:Le}),n(String(he.props.id))):(_.select({index:e,zone:Le}),n(r)))},ve=()=>{if(!he||!He||!Le)return;const e=Ie.length;_.insertComponent(Le,He.childType,e),te(p),He.slider?requestAnimationFrame(()=>{o(String(he.props.id),e),_.select({index:e,zone:Le})}):_.select({index:e,zone:Le})},ze=e=>z(oe,e),Ee=e=>{const{parentId:n,slot:o}=W(e),r=e=>{if(!e)return null;if(String(e.props.id)===n)return e;for(const n of ze(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},Fe=(e,n,o)=>{const r=Math.min(Math.max(o,0),Ee(e)),t=n<r?r-1:r;t!==n&&(_.reorderComponent(e,n,t),te(p),_.select({index:t,zone:e}))},Ve=I({keyOf:e=>e.id,readOnly:Boolean(U),canDrop:(e,n)=>g(n)===e.zone&&n.index>=0&&n.index<=Ee(e.zone),onDrop:(e,n)=>Fe(e.zone,e.index,n.index),onStep:(e,n)=>Fe(e.zone,e.index,n<0?e.index-1:e.index+2)}),Ze=(e,n)=>/* @__PURE__ */J(D,{...U?{}:Ve.seam({place:{...W(e),index:n}})},`seam:${e}:${n}`),be=e=>Ae.blockRowName(e,Oe),Ye=(e,o,r)=>{te(p),_.select({index:o,zone:e}),n(r)},we=(e,n,o)=>{_.insertComponent(e,n,o),te(p),_.select({index:o,zone:e})},Ke=(n,o,r)=>/* @__PURE__ */J(e,{choices:r,onPick:e=>we(n,e,o)}),Qe=(e,n)=>{const o=ze((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=Me(e.type),s=t?.choices??null,i="footer"===t?.source?be:ge;/* @__PURE__ */
|
|
2
|
+
return Q(T,{children:[o.map(({child:e,zone:o,index:r})=>{const t=ne?.props.id===e.props.id,s=E(oe,e.type,n),c=i(e),l=String(e.props.id),m=()=>Ye(o,r,l),{rowProps:d,...a}=Ve.row({item:{id:l,zone:o,index:r},place:{...W(o),index:r}},{onClick:$(m)});/* @__PURE__ */
|
|
3
|
+
return Q(Y,{children:[0===r&&Ze(o,0),
|
|
4
|
+
/* @__PURE__ */J(A,{words:ie,icon:/* @__PURE__ */J(De,{type:e.type,size:13}),name:c,selected:t,onSelect:m,...a,actions:/* @__PURE__ */J(R,{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(K,{size:13})}),rowProps:d}),s&&/* @__PURE__ */J(x,{children:Qe(e,n+1)}),Ze(o,r+1)]},String(e.props.id??`${o}-${r}`))}),t&&s?Ke(`${e.props.id}:${t.slot}`,o.length,s):null]})},Je="HeroSingle"===he?.type,Te=Boolean(he)&&(Boolean(Me(he.type))||ze(he.type).length>0),$e=Boolean(he)&&(Boolean(He)||fe||je||Je||Te);/* @__PURE__ */
|
|
5
|
+
return Q("div",{ref:Ce,className:"sf-editor es-editor",style:H(s),children:[
|
|
6
|
+
/* @__PURE__ */J("div",{className:"sf-section-bar",children:/* @__PURE__ */J(P,null!==q?{tone:"off",label:q,role:"status"}:{...B(G,ce),role:"status"})}),
|
|
7
|
+
/* @__PURE__ */Q("div",{className:"sf-body",children:[$e&&he&&/* @__PURE__ */Q("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
|
|
8
|
+
/* @__PURE__ */J("div",{className:"sf-panel-head",children:/* @__PURE__ */J(w,{content:je?se.headerSettings:se.sectionSettings({name:Be(he.type)}),side:"bottom",children:/* @__PURE__ */J("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(Pe?"is-selected":""),"aria-pressed":Pe,onClick:()=>{je?te(de??p):(te(p),_.select({index:0}))},children:Be(he.type)})})}),
|
|
9
|
+
/* @__PURE__ */J(N,{className:"sf-tree sf-scroll",rootProps:Ve.rootProps(),words:ie,children:/* @__PURE__ */J(x,{children:je?
|
|
10
|
+
/* @__PURE__ */J(A,{words:ie,icon:/* @__PURE__ */J(De,{type:"header",size:13}),name:se.headerSettings,selected:re.kind===de?.kind,onSelect:()=>te(de??p),rowProps:{onClick:$(()=>te(de??p))}}):He?/* @__PURE__ */Q(T,{children:[Ie.map((e,n)=>{const o=ne?.props.id===e.props.id,r=ge(e),t=String(e.props.id),s=()=>We(n,t),{rowProps:i,...c}=Ve.row({item:{id:t,zone:Le,index:n},place:{...W(Le),index:n}},{onClick:$(s)});/* @__PURE__ */
|
|
11
|
+
return Q(Y,{children:[0===n&&Ze(Le,0),
|
|
12
|
+
/* @__PURE__ */J(A,{words:ie,icon:/* @__PURE__ */J(De,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */J(R,{kind:"delete",label:se.deleteNamed({name:r}),onClick:()=>{return e=n,void(Le&&(_.removeComponent(Le,e),te(p),_.select(null)));var e},children:/* @__PURE__ */J(K,{size:13})}),rowProps:i}),Ze(Le,n+1)]},String(e.props.id??n))}),
|
|
13
|
+
/* @__PURE__ */Q("button",{type:"button",className:"sf-add-card",onClick:ve,children:[
|
|
14
|
+
/* @__PURE__ */J("span",{className:"sf-plus sf-plus--sm",children:"+"}),He.addLabel]}),ke?Ne.partRows?.(he,X):null]}):Qe(he,1)})})]}),
|
|
15
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"===
|
|
16
|
+
/* @__PURE__ */J(t,{value:{selectChild:(e,n,o,r)=>"section"===Me(r)?.source?We(n,o):Ye(e,n,o),addChild:(e,n,o,r,t)=>"section"===Me(t)?.source?ve():we(`${e}:${n}`,o,r),childRowName:ge,blockRowName:be},children:/* @__PURE__ */J(ue,{mode:re,onOpenWebsiteSettings:Ne.openSettings??(()=>{}),onSelectNode:xe,hideNodeActions:!0})})]}),
|
|
17
17
|
/* @__PURE__ */J(f,{})]})}export{G as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{usePartBridge}from"../../chunk-
|
|
1
|
+
export{usePartBridge}from"../../chunk-MEHLY5Q4.js";import"../../chunk-WEIE2FBC.js";import"../../chunk-PAOZMXEI.js";import"../../chunk-FHCKFOCD.js";import"../../chunk-MQA7OFRA.js";import"../../chunk-EFHV56BO.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-7LYKFL3Q.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-A6Z4SD3I.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-IWCKVZHS.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-BSHIQIZC.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-ZOBSIXRD.js";import"../../chunk-QAJAEWCZ.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-VANKQVOW.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-3S5N4HLJ.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-K7BTCBWD.js";import"../../chunk-L55YIXDC.js";import"../../chunk-QIDRJH3S.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-LF3FUSCQ.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-7YVEYQDE.js";import"../chunk-GXQCZJOP.js";import"../chunk-XJ2WXGFJ.js";import"../chunk-2GVCAIPX.js";import"../chunk-26OOWIJJ.js";import"../chunk-JBOSEHIX.js";import"../chunk-FGNR22NY.js";import"../chunk-LER7RKTO.js";import"../chunk-FGYJ5DJY.js";import"../chunk-7F52SZOI.js";import"../chunk-MQNBD6AB.js";import"../chunk-TNGOL65V.js";import"../chunk-I7BROL77.js";import"../chunk-KCBEE2MC.js";import"../chunk-C56MPJBH.js";import"../chunk-MEHLY5Q4.js";import"../chunk-WEIE2FBC.js";import"../chunk-PY7OOQEZ.js";import"../chunk-RKTF5XLP.js";export{ScreenStoreProvider}from"../chunk-JQXD3TDE.js";import"../chunk-5545A3PC.js";import"../chunk-R5KEFI55.js";import"../chunk-PA3PNTVV.js";import"../chunk-5ZBY24K7.js";import"../chunk-BVN33R76.js";import"../chunk-43AEUUNQ.js";import"../chunk-SINAM2IT.js";import"../chunk-UMDQ6CLQ.js";import"../chunk-M2Z775ZC.js";export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../chunk-PAOZMXEI.js";import"../chunk-2G6MAXPY.js";import"../chunk-6FWAE2RN.js";import"../chunk-UJ46J7QW.js";import"../chunk-276MBG5P.js";import"../chunk-77IWWW6X.js";import"../chunk-ERR437B5.js";import"../chunk-UNVKPVZW.js";import"../chunk-GMCZXMOV.js";export{NO_DOCUMENT_ADDRESSING}from"../chunk-RLBXE4EU.js";import"../chunk-HNKB2ZYR.js";import"../chunk-CLOS6SSX.js";import"../chunk-U66YKDAR.js";import"../chunk-LOMEH6DG.js";import"../chunk-KCOBHPN6.js";import"../chunk-FHCKFOCD.js";export{EaselSessionProvider,useEaselSession}from"../chunk-O7Q4DDJT.js";export{EFFICIENT_BACKEND,activateEaselSession,backendOf,createEaselSession,currentEaselSession,deactivateEaselSession,efficientClientOpen,isEfficientBackend,provideDefaultBackend,resetAmbientEaselSession,sessionRegistry,setSessionBridgedSite,setSessionDocumentSite}from"../chunk-RSCMJIWS.js";export{DETACHED_EASEL_HOST,EaselHostContext,EaselHostProvider,createEaselHost,useEaselHost,useHostEscape}from"../chunk-MQA7OFRA.js";import"../chunk-XFYFKITX.js";import"../chunk-23DYNW6S.js";import"../chunk-V7U33NF2.js";import"../chunk-6WY6ZXJG.js";import"../chunk-EFHV56BO.js";import"../chunk-TBY3DFKS.js";import"../chunk-7LYKFL3Q.js";import"../chunk-BPXEFVSQ.js";import"../chunk-A6Z4SD3I.js";import"../chunk-K56YDHYQ.js";import"../chunk-ZEH6QLBH.js";import"../chunk-IWCKVZHS.js";import"../chunk-ZKY45F5G.js";import"../chunk-FIVU2COQ.js";import"../chunk-RC25EGHD.js";import"../chunk-KFV7N2DJ.js";import"../chunk-P5VYGWYO.js";import"../chunk-WK3AFPXY.js";import"../chunk-BSHIQIZC.js";import"../chunk-NDRZP6YR.js";import"../chunk-H6DDIBQ4.js";import"../chunk-23VM4PMV.js";import"../chunk-KRL3IUV3.js";import"../chunk-ZOBSIXRD.js";import"../chunk-QAJAEWCZ.js";import"../chunk-WRFD4EXD.js";import"../chunk-VANKQVOW.js";import"../chunk-ZG6PVMC3.js";import"../chunk-MJM6SFD3.js";import"../chunk-AJSDWWJW.js";import"../chunk-2OAZYSWJ.js";import"../chunk-THWO5YVZ.js";import"../chunk-RE4LP46F.js";import"../chunk-MFIRYGHW.js";import"../chunk-LQV5FZTQ.js";import"../chunk-KAML3KQH.js";import"../chunk-3S5N4HLJ.js";import"../chunk-P2VEMZH5.js";import"../chunk-K7BTCBWD.js";import"../chunk-L55YIXDC.js";import"../chunk-QIDRJH3S.js";import"../chunk-BSPCSC45.js";import"../chunk-I54UCYOU.js";import"../chunk-GOTN2KY4.js";import"../chunk-R5L2E7JX.js";import"../chunk-BHRC3ASL.js";import"../chunk-6W7WLPZH.js";import"../chunk-IQ5TA7AM.js";import"../chunk-DUVRZ456.js";import"../chunk-IYT6NN2J.js";import"../chunk-PLVEGYK6.js";import"../chunk-LF3FUSCQ.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{editorRootFocus,isSaveShortcut,useEaselKeyTarget,useEaselSaveKey,useEaselUndoKeys}from"../../chunk-
|
|
1
|
+
export{editorRootFocus,isSaveShortcut,useEaselKeyTarget,useEaselSaveKey,useEaselUndoKeys}from"../../chunk-I7BROL77.js";import"../../chunk-MQA7OFRA.js";import"../../chunk-EFHV56BO.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-IWCKVZHS.js";import"../../chunk-BSHIQIZC.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-K7BTCBWD.js";import"../../chunk-L55YIXDC.js";import"../../chunk-QIDRJH3S.js";import"../../chunk-LF3FUSCQ.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{gotoPreviewSlide,pinPreviewToBottom,pinPreviewToSection,previewFrame,scrollPreviewToSection,scrollPreviewToTop}from"../../../chunk-
|
|
1
|
+
export{gotoPreviewSlide,pinPreviewToBottom,pinPreviewToSection,previewFrame,scrollPreviewToSection,scrollPreviewToTop}from"../../../chunk-TNGOL65V.js";import"../../../chunk-R5L2E7JX.js";import"../../../chunk-IQ5TA7AM.js";import"../../../chunk-LF3FUSCQ.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-BPXEFVSQ.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-BSPCSC45.js";import"../../../chunk-DUVRZ456.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{useSectionOps}from"../../../chunk-
|
|
1
|
+
export{useSectionOps}from"../../../chunk-WEIE2FBC.js";import"../../../chunk-PAOZMXEI.js";import"../../../chunk-FHCKFOCD.js";import"../../../chunk-MQA7OFRA.js";import"../../../chunk-EFHV56BO.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-7LYKFL3Q.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-A6Z4SD3I.js";import"../../../chunk-K56YDHYQ.js";import"../../../chunk-ZEH6QLBH.js";import"../../../chunk-IWCKVZHS.js";import"../../../chunk-FIVU2COQ.js";import"../../../chunk-RC25EGHD.js";import"../../../chunk-KFV7N2DJ.js";import"../../../chunk-BSHIQIZC.js";import"../../../chunk-23VM4PMV.js";import"../../../chunk-KRL3IUV3.js";import"../../../chunk-ZOBSIXRD.js";import"../../../chunk-QAJAEWCZ.js";import"../../../chunk-WRFD4EXD.js";import"../../../chunk-VANKQVOW.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-3S5N4HLJ.js";import"../../../chunk-P2VEMZH5.js";import"../../../chunk-K7BTCBWD.js";import"../../../chunk-L55YIXDC.js";import"../../../chunk-QIDRJH3S.js";import"../../../chunk-PLVEGYK6.js";import"../../../chunk-LF3FUSCQ.js";
|
|
@@ -460,6 +460,11 @@ interface ScreenBridges {
|
|
|
460
460
|
* the document is read (the website's Preview, the email designer's "Send
|
|
461
461
|
* a test email"). */
|
|
462
462
|
barTrail?: () => ReactNode;
|
|
463
|
+
/** …and `barView` stands in the CENTRE cluster, right after Refresh: a way
|
|
464
|
+
* to look at the document drawn as an icon beside the preview's own
|
|
465
|
+
* controls (the website's Preview, owner 2026-10-25). A layer that has one
|
|
466
|
+
* hands it here instead of `barTrail`. */
|
|
467
|
+
barView?: () => ReactNode;
|
|
463
468
|
/**
|
|
464
469
|
* …and `barMain` IS the main button, in its place at the end of the cluster
|
|
465
470
|
* (0.103.0): the layer's own way to finish with the document — the campaign
|
|
@@ -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-PAOZMXEI.js";import"../../chunk-FHCKFOCD.js";import"../../chunk-MQA7OFRA.js";import"../../chunk-EFHV56BO.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-7LYKFL3Q.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-A6Z4SD3I.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-IWCKVZHS.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-BSHIQIZC.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-ZOBSIXRD.js";import"../../chunk-QAJAEWCZ.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-VANKQVOW.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-3S5N4HLJ.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-K7BTCBWD.js";import"../../chunk-L55YIXDC.js";import"../../chunk-QIDRJH3S.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-LF3FUSCQ.js";
|
package/dist/screen/screen.css
CHANGED
|
@@ -859,3 +859,40 @@
|
|
|
859
859
|
flex: none;
|
|
860
860
|
background: var(--es-panel);
|
|
861
861
|
}
|
|
862
|
+
|
|
863
|
+
/* Hide panel first, a divider, then the tabs (owner 2026-10-25). The tabs keep
|
|
864
|
+
the row's remaining width, shared equally as before; the divider is the
|
|
865
|
+
panel head's own (`.sf-head-divider`'s colour and height). */
|
|
866
|
+
.es-paneltabs--with-hide {
|
|
867
|
+
display: flex;
|
|
868
|
+
align-items: center;
|
|
869
|
+
gap: 4px;
|
|
870
|
+
padding-left: 8px;
|
|
871
|
+
}
|
|
872
|
+
.es-paneltabs--with-hide > :last-child {
|
|
873
|
+
flex: 1;
|
|
874
|
+
min-width: 0;
|
|
875
|
+
}
|
|
876
|
+
.es-paneltabs-divider {
|
|
877
|
+
width: 1px;
|
|
878
|
+
height: 18px;
|
|
879
|
+
background: var(--es-divider);
|
|
880
|
+
flex: none;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
/* A labelled button in the top bar (the Media library; a host's own, such as
|
|
884
|
+
the admin portal's JARVIS): its icon at the bar's glyph size, the same as
|
|
885
|
+
`.es-iconbtn`'s, so every icon on the bar is one size. */
|
|
886
|
+
.es-barbtn svg {
|
|
887
|
+
width: 16px;
|
|
888
|
+
height: 16px;
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
/* The bar's left end has the room its right end has (owner 2026-10-25: "no
|
|
892
|
+
padding on the left of the Media Library"): the bar pads only its right. */
|
|
893
|
+
.es-cluster--left {
|
|
894
|
+
display: flex;
|
|
895
|
+
align-items: center;
|
|
896
|
+
gap: 4px;
|
|
897
|
+
padding-left: 12px;
|
|
898
|
+
}
|
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{DEFAULT_CANVAS_WORDS as c}from"../chunk-TBY3DFKS.js";import{DEFAULT_TREE_WORDS as e}from"../chunk-K56YDHYQ.js";import{
|
|
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_PANEL_WORDS as m}from"../chunk-KFV7N2DJ.js";import{DEFAULT_NODE_MENU_WORDS as i}from"../chunk-WK3AFPXY.js";import{DEFAULT_SAVE_WORDS as s}from"../chunk-H6DDIBQ4.js";import{DEFAULT_COPY_WORDS as u}from"../chunk-KRL3IUV3.js";import{DEFAULT_FIELDS_WORDS as f}from"../chunk-WRFD4EXD.js";import{DEFAULT_CHROME_WORDS as p,DEFAULT_NOTICE_WORDS as l}from"../chunk-AJSDWWJW.js";import{DEFAULT_RAIL_WORDS as h}from"../chunk-2OAZYSWJ.js";import{DEFAULT_LOCK_WORDS as j}from"../chunk-RE4LP46F.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:l,lock:j,save:s,chrome:p,rail:h,tree:e,panel:m,fields:f,pick:t,drag:a,menu:i,styleClipboard:o,copy:u,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
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-ZEH6QLBH.js";import{TEXT_STYLE_KINDS as
|
|
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-ZEH6QLBH.js";import{FieldSelect as l}from"../chunk-QAJAEWCZ.js";import"../chunk-WRFD4EXD.js";import{useWords as i}from"../chunk-MFIRYGHW.js";import{withTip as r}from"../chunk-P2VEMZH5.js";import{TEXT_STYLE_KINDS as o,canAddTextStyle as d,TEXT_STYLE_MAX as c,isDefaultTextStyle as u,CAMPAIGN_TEXT_STYLE_SETTINGS as m,TEXT_STYLE_SETTINGS as h,textStyleRowSize as f,describeTextStyle as p,updateTextStyle as v,textStyleCaseCss as y,TEXT_STYLE_CASES as S,addTextStyle as g,removeTextStyle as b,TEXT_STYLE_RANGES as k}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{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 L,ChevronIcon as A,BoldIcon as j,ItalicIcon as M,CaseLowerIcon as $,CaseCapitalizedIcon as D,CaseUpperIcon as W,CaseNormalIcon as Y}from"efficient-shell/icons/efficient";import{jsxs as I,jsx as X,Fragment as H}from"react/jsx-runtime";var B=`conic-gradient(${[0,60,120,180,240,300,0].map(e=>N({h:e,s:1,v:1})).join(", ")})`;function F({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__ */I("div",{ref:m,className:"es-ts-set","data-ts-setting":"color",children:[
|
|
2
2
|
/* @__PURE__ */I("div",{className:"es-ts-top",children:[
|
|
3
3
|
/* @__PURE__ */X("span",{className:"es-ts-sub",children:l}),
|
|
4
4
|
/* @__PURE__ */X("span",{className:"es-ts-colour-read",children:a?e(a):i})]}),
|
|
5
5
|
/* @__PURE__ */I("div",{className:"es-ts-swatches",role:"group","aria-label":l,children:[n.map(s=>/* @__PURE__ */X(C,{content:`${s.name} · ${e(s.value)}`,children:/* @__PURE__ */X(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__ */X(C,{content:r,children:/* @__PURE__ */X(x,{ref:h,color:B,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__ */X(s,{id:f,value:a??"",onChange:e=>o(e),label:l,readOnly:d,onClose:()=>{u(!1),h.current?.focus()}}):null]})}function P({styles:e,onChange:s,fonts:t,colours:n=[],settings:
|
|
7
|
-
return X("div",{className:"es-ts",ref:Y,children:
|
|
8
|
-
return I(R,{label:A.groups[a],children:[
|
|
9
|
-
return X(G,{style:a,fonts:t,colours:n,settings:
|
|
6
|
+
/* @__PURE__ */X(C,{content:r,children:/* @__PURE__ */X(x,{ref:h,color:B,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__ */X(s,{id:f,value:a??"",onChange:e=>o(e),label:l,readOnly:d,onClose:()=>{u(!1),h.current?.focus()}}):null]})}function P({styles:e,onChange:s,fonts:t,colours:n=[],settings:l=m,auto:h=[],fallback:f,sample:p,openId:v,defaultOpenId:y=null,onOpenChange:S,onAdd:k,rowActions:N,onRemove:C,max:x=c,device:T="desktop",readOnly:_=!1}){const A=i("textStyles",a),j=z(),[M,$]=w(y),D=void 0!==v?v:M,W=e=>{void 0===v&&$(e),S?.(e)},Y=E(null),[B,F]=w(null);O(()=>{if(!B||!Y.current)return;const e=[...Y.current.querySelectorAll(".es-ts-item")].find(e=>e.dataset.tsId===B.id),s=e?e.querySelector(".es-ts-row"):Y.current.querySelector(`.es-ts-add[data-ts-kind="${B.kind}"]`);s?.focus(),F(null)},[B]);/* @__PURE__ */
|
|
7
|
+
return X("div",{className:"es-ts",ref:Y,children:o.map(a=>{const i=e.filter(e=>e.kind===a),o=!d(e,a,x),c=!_&&!o;/* @__PURE__ */
|
|
8
|
+
return I(R,{label:A.groups[a],children:[i.map(a=>{const i=N?.(a),o=null!=i&&!1!==i,d=Boolean(C)&&!_&&!u(a);/* @__PURE__ */
|
|
9
|
+
return X(G,{style:a,fonts:t,colours:n,settings:l,auto:h,fallback:f,sample:p,device:T,readOnly:_,open:D===a.id,onOpenChange:e=>W(e?a.id:null),onChange:t=>s(e.map(e=>e.id===t.id?t:e)),actions:d||o?/* @__PURE__ */I(H,{children:[d?r(A.remove,/* @__PURE__ */X("button",{type:"button",className:"es-ts-del","aria-label":A.removeNamed({name:a.name}),onClick:()=>(t=>{if(_||!C)return;const a=b(e,t.id,{name:A.styleName});if(!a)return;const n=e.filter(e=>e.kind===t.kind),l=n[n.indexOf(t)+1];D===t.id&&W(null),s(a.styles),C(a.removed),F({id:l?.id??null,kind:t.kind})})(a),children:/* @__PURE__ */X(L,{size:14,"aria-hidden":"true"})})):null,o?i:null]}):null},a.id)}),r(!_&&o?A.full({kind:a,max:x}):void 0,/* @__PURE__ */I("button",{type:"button",className:"es-ts-add","data-ts-kind":a,disabled:_,"aria-disabled":!(_||!o)||void 0,"aria-describedby":!_&&o?`${j}-full-${a}`:void 0,onClick:()=>{c&&(t=>{if(_)return;const a=g(e,t,{max:x,name:A.styleName,make:k});a&&s(a.styles)})(a)},children:[
|
|
10
10
|
/* @__PURE__ */X("span",{className:"es-ts-add-word",children:A.add[a]}),
|
|
11
|
-
/* @__PURE__ */X("span",{className:"es-ts-count",children:A.count({n:
|
|
11
|
+
/* @__PURE__ */X("span",{className:"es-ts-count",children:A.count({n:i.length,max:x})})]})),_||!o?null:/* @__PURE__ */X("span",{id:`${j}-full-${a}`,className:"es-vh",children:A.full({kind:a,max:x})})]},a)})})}function R({label:e,children:s}){const t=z();/* @__PURE__ */
|
|
12
12
|
return I("section",{className:"es-ts-section","aria-labelledby":t,children:[
|
|
13
|
-
/* @__PURE__ */X("div",{className:"es-ts-group",id:t,children:e}),s]})}function G({style:e,fonts:s,colours:t=[],settings:n=
|
|
13
|
+
/* @__PURE__ */X("div",{className:"es-ts-group",id:t,children:e}),s]})}function G({style:e,fonts:s,colours:t=[],settings:n=m,auto:l=[],fallback:r,sample:o,open:d,onOpenChange:c,onChange:u,actions:y,device:S="desktop",readOnly:g=!1}){const b=i("textStyles",a),k=`${z()}-open-${e.id}`,N=new Set(l),C=h.filter(e=>n.includes(e)),x={...r?.(e)??{},...e.values},T="phone"===S,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:`${f(w.size??16)}px`,fontWeight:x.weight,fontStyle:x.italic?"italic":void 0};/* @__PURE__ */
|
|
14
14
|
return I(_,{children:[
|
|
15
15
|
/* @__PURE__ */I("div",{className:"es-ts-item","data-ts-id":e.id,children:[
|
|
16
|
-
/* @__PURE__ */I("button",{type:"button",className:"es-ts-row","aria-expanded":
|
|
16
|
+
/* @__PURE__ */I("button",{type:"button",className:"es-ts-row","aria-expanded":d,"aria-controls":d?k:void 0,onClick:()=>c(!d),children:[
|
|
17
17
|
/* @__PURE__ */X("span",{className:"es-ts-chev","aria-hidden":"true",children:/* @__PURE__ */X(A,{size:12})}),
|
|
18
18
|
/* @__PURE__ */X("span",{className:"es-ts-name",style:O,children:e.name}),
|
|
19
|
-
/* @__PURE__ */X("span",{className:"es-ts-meta",children:
|
|
20
|
-
return X("div",{className:"es-ts-slider","data-ts-setting":e,children:/* @__PURE__ */X(n,{label:
|
|
19
|
+
/* @__PURE__ */X("span",{className:"es-ts-meta",children:p(w,s,b,{autoSize:N.has("size")&&w===x&&void 0===e.values.size})})]}),y?/* @__PURE__ */X("div",{className:"es-ts-actions",children:y}):null]}),d?/* @__PURE__ */X("div",{className:"es-ts-open",id:k,children:/* @__PURE__ */X(Z,{style:e,values:x,fonts:s,colours:t,settings:C,autoSet:N,sample:o??b.sample,words:b,phone:T,readOnly:g,set:s=>u(v([e],e.id,s)[0])})}):null]})}var U={none:Y,upper:W,capitalize:D,lower:$};function Z({style:e,values:s,fonts:a,colours:l,settings:i,autoSet:o,sample:d,words:c,phone:u,readOnly:m,set:h}){const f=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),S=e=>"largestSize"===e||o.has(e),g=e=>S(e)?f[e]:s[e],b=g("size"),N=u&&void 0!==f.sizePhone?f.sizePhone:b,C=g("lineSpacing"),x=g("letterSpacing"),w=S("letterCase")?f.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:y(w)},z=e=>{const t=k[e],a=S(e);/* @__PURE__ */
|
|
20
|
+
return X("div",{className:"es-ts-slider","data-ts-setting":e,children:/* @__PURE__ */X(n,{label:c.settings[e],value:f[e],onChange:s=>h({[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?c.auto:void 0,readOnly:m})},e)};/* @__PURE__ */
|
|
21
21
|
return I(H,{children:[
|
|
22
|
-
/* @__PURE__ */X("div",{className:"es-ts-preview",style:E,"aria-label":
|
|
23
|
-
return X(q,{value:
|
|
24
|
-
return X(K,{value:
|
|
22
|
+
/* @__PURE__ */X("div",{className:"es-ts-preview",style:E,"aria-label":c.preview,children:d}),i.map(t=>{switch(t){case"font":/* @__PURE__ */
|
|
23
|
+
return X(q,{value:f.font,fonts:a,words:c,readOnly:m,set:h},t);case"color":/* @__PURE__ */
|
|
24
|
+
return X(K,{value:f.color,hex:v,colours:l,words:c,readOnly:m,set:h},t);case"emphasis":{const e=(s.weight??400)>=600,a=!1!==p?.italic;/* @__PURE__ */
|
|
25
25
|
return I("div",{className:"es-ts-set","data-ts-setting":t,children:[
|
|
26
|
-
/* @__PURE__ */X("span",{className:"es-ts-sub",children:
|
|
27
|
-
/* @__PURE__ */I("div",{className:"es-ts-icons",children:[
|
|
28
|
-
return X(V,{value:
|
|
29
|
-
return X("div",{className:"es-ts-slider","data-ts-setting":"size","data-ts-device":"phone",children:/* @__PURE__ */X(n,{label:
|
|
26
|
+
/* @__PURE__ */X("span",{className:"es-ts-sub",children:c.settings.emphasis}),
|
|
27
|
+
/* @__PURE__ */I("div",{className:"es-ts-icons",children:[r(c.bold,/* @__PURE__ */X(T,{className:"es-ts-icon","aria-label":c.bold,"aria-pressed":e,disabled:m,onClick:()=>h({weight:e?400:700}),children:/* @__PURE__ */X(j,{size:16})})),m||a?r(c.italic,/* @__PURE__ */X(T,{className:"es-ts-icon","aria-label":c.italic,"aria-pressed":Boolean(s.italic),disabled:m,onClick:()=>h({italic:!s.italic||void 0}),children:/* @__PURE__ */X(M,{size:16})})):/* @__PURE__ */X(T,{className:"es-ts-icon","aria-label":c.italic,"aria-pressed":Boolean(s.italic),"aria-disabled":!0,disabledReason:c.italicMissing,children:/* @__PURE__ */X(M,{size:16})})]})]},t)}case"letterCase":/* @__PURE__ */
|
|
28
|
+
return X(V,{value:f.letterCase??s.letterCase,auto:S("letterCase"),words:c,readOnly:m,set:h},t);case"largestSize":return"heading"===e.kind?z(t):null;case"size":return u?(()=>{const e=k.size;/* @__PURE__ */
|
|
29
|
+
return X("div",{className:"es-ts-slider","data-ts-setting":"size","data-ts-device":"phone",children:/* @__PURE__ */X(n,{label:c.settings.size,value:f.sizePhone,onChange:e=>h({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:m})},"size")})():z(t);default:return z(t)}})]})}function q({value:e,fonts:s,words:t,readOnly:a,set:n}){const i=z();/* @__PURE__ */
|
|
30
30
|
return I("div",{className:"es-ts-set","data-ts-setting":"font",children:[
|
|
31
|
-
/* @__PURE__ */X("span",{className:"es-ts-sub",id:
|
|
32
|
-
/* @__PURE__ */X(
|
|
33
|
-
return X(F,{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",...
|
|
31
|
+
/* @__PURE__ */X("span",{className:"es-ts-sub",id:i,children:t.settings.font}),
|
|
32
|
+
/* @__PURE__ */X(l,{value:e,options:s.map(e=>({label:e.label,value:e.value})),onChange:e=>n({font:e}),ariaLabelledBy:i,readOnly:a})]})}function K({value:e,hex:s,colours:t,words:a,readOnly:n,set:l}){/* @__PURE__ */
|
|
33
|
+
return X(F,{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",...S]:S,i=e??(s?"auto":"none"),o=E([]),d=e=>n({letterCase:"auto"===e?void 0:e});/* @__PURE__ */
|
|
34
34
|
return I("div",{className:"es-ts-set","data-ts-setting":"letterCase",children:[
|
|
35
35
|
/* @__PURE__ */X("span",{className:"es-ts-sub",children:t.settings.letterCase}),
|
|
36
|
-
/* @__PURE__ */X("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;
|
|
36
|
+
/* @__PURE__ */X("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;d(l[t]),o.current[t]?.focus()},children:l.map((e,s)=>{const n=e===i;if("auto"===e)return r(t.case.autoTitle,/* @__PURE__ */X(T,{ref:e=>{o.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:()=>d(e),children:t.case.auto},e));const l=U[e];return r(t.case[e],/* @__PURE__ */X(T,{ref:e=>{o.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:()=>d(e),children:/* @__PURE__ */X(l,{size:16})},e))})})]})}export{F as ColourSwatchRow,G as TextStyleItem,R as TextStylesGroup,P as TextStylesList};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-easel",
|
|
3
|
-
"version": "20.1
|
|
3
|
+
"version": "20.2.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-47CD7ULN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useSectionOps as o}from"./chunk-PI6RFJR4.js";import{SELECTION_MODE as e}from"./chunk-LEZFSSQN.js";import{decodePartId as r,encodePartId as t}from"./chunk-IYT6NN2J.js";import{useEasel as n}from"./chunk-ROPYFLNZ.js";import{usePreviewParts as p}from"./chunk-I54UCYOU.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}=n(o=>o),u=o(),{setSelectedPartId:f,setSelectHandler:k}=p(),l=d(o=>{const t=r(o);if(!t)return;const{nodeId:n,propKey:p}=t;p?(i(o=>s(o)&&o.nodeId===n&&o.propKey===p?o:{kind:"part",nodeId:n,propKey:p}),I?.(n)):i(o=>"part"===o.kind?e:o)},[i,I]);c(()=>{k(l)},[k,l]);const h=s(m)?t(m.nodeId,m.propKey):null;c(()=>{f(h)},[h,f]);return{selectNode:d(o=>{i(()=>e);const r=a(o);r&&u.select(r)},[i,a,u]),openPartId:h}}export{m as usePartBridge};
|
package/dist/chunk-47PYYMFM.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-LEZFSSQN.js";import{useEaselSession as m}from"./chunk-O7Q4DDJT.js";import{DEFAULT_SCREEN_WORDS as f}from"./chunk-23DYNW6S.js";import{useEasel as u}from"./chunk-ROPYFLNZ.js";import{easelMenuEntries as y}from"./chunk-FIVU2COQ.js";import{useWords as h}from"./chunk-MFIRYGHW.js";import{AddPanel as k}from"./chunk-LDEEFLE3.js";import{DEFAULT_DRAG_WORDS as g}from"./chunk-KAML3KQH.js";import{useState as b,useEffect as v,useMemo as j,useRef as w}from"react";import{SharedIcon as C,AddIcon as E}from"efficient-shell/icons/efficient";import{ContextMenu as F,toast as L,Dialog as N,Button as O}from"efficient-shell/ui";import{jsx as S,jsxs as T,Fragment as $}from"react/jsx-runtime";function x({name:e,pages:t,onDelete:n,onCancel:o}){const l=h("screen",f).shared,[r,i]=b(!1),s=w(null);/* @__PURE__ */
|
|
2
|
-
return S(N,{open:!0,role:"alertdialog",size:"sm",title:l.deleteTitle({name:e}),onClose:o,initialFocus:s,footer:/* @__PURE__ */T($,{children:[
|
|
3
|
-
/* @__PURE__ */S(O,{ref:s,variant:"secondary",onClick:o,children:l.cancel}),
|
|
4
|
-
/* @__PURE__ */S(O,{variant:"danger",loading:r,onClick:()=>{(async()=>{i(!0);try{await n()}finally{i(!1)}})()},children:l.deleteShared})]}),children:l.deleteMessage({count:t})})}var A=e=>`section:${e}`,D=e=>`block:${e}`,I=e=>`template:${e}`,M=e=>`shared:${e}`;function B({at:w,placeBlocks:N,canTake:O,onPick:B,itemFor:P,session:Q,siteWide:Z,onClose:z,onHide:H,readOnly:R}){const V=u(e=>e.config),W=a(),{labelAtLevel:Y,categoryLabel:K,firstSection:U,Icon:_,Thumbnail:G}=W,{blockIsOffered:J,canAddTo:q}=d(),X=h("screen",f).add,ee=h("drag",g).add,te=m(),[ne,oe]=b([]);v(()=>{let e=!1;const t=e=>J(e,te);return l(te).list().then(n=>{if(e)return;const l=V.components;oe(n.filter(e=>e.node?.type&&l[e.node.type]&&o(e.node).every(t)))}).catch(()=>{}),()=>{e=!0}},[V,te]);const le=p().shared,re=h("screen",f).shared,[ie,se]=b([]),[ce,ae]=b(0);v(()=>{if(!le)return;let e=!1;const t=e=>J(e,te);return r(te).list().then(n=>{if(e)return;const l=V.components;se(n.filter(e=>e.node?.type&&l[e.node.type]&&o(e.node).every(t)))}).catch(()=>{}),()=>{e=!0}},[V,te,ce]);const[de,pe]=b(null),[me,fe]=b(null),ue=j(()=>e(V,W),[V]),ye=e=>Y(e,"section",V.components[e]?.label??e),he=e=>({type:A(e.type),label:e.name,cover:/* @__PURE__ */S(G,{type:e.type}),title:e.desc?`${e.name} — ${e.desc}`:X.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__ */S("span",{className:"es-add-glyph-cover",children:/* @__PURE__ */S(_,{type:e,size:26})}),be=j(()=>{const e=t(ue,U),o=/* @__PURE__ */new Map,l=e=>{e.retired||o.has(e.type)||!J(e.type,te)||o.set(e.type,e)};for(const t of e?[e]:ue){const e=q(t.type)?.choices??[];e.forEach(l),e.forEach(e=>q(e.type,1)?.choices?.forEach(l))}N?.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:X.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:M(e.id),label:e.title,cover:/* @__PURE__ */S(G,{type:e.node.type}),mark:/* @__PURE__ */S(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:X.templates,tiles:ne.map(e=>({type:I(e.id),label:e.name,cover:/* @__PURE__ */S(G,{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(V.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(V,t,K),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)})}),!O)return d;const u=d.map(e=>({...e,tiles:e.tiles.map(e=>{const t=ke(e.type),n=t?O(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,V,X,O,N,te]);/* @__PURE__ */
|
|
5
|
-
return T($,{children:[
|
|
6
|
-
/* @__PURE__ */S(i,{icon:/* @__PURE__ */S(E,{size:15}),title:X.title,context:X.contextAll,actions:/* @__PURE__ */S(s,{label:X.done,description:X.doneDescription,onClick:z}),onHide:H}),
|
|
7
|
-
/* @__PURE__ */T("div",{className:"sf-addside sf-scroll",children:[
|
|
8
|
-
/* @__PURE__ */S(k,{groups:be,session:Q,itemFor:e=>P(ke(e)??{kind:"section",type:e}),onInsert:B?e=>{const t=ke(e);t&&B(t)}:void 0,onTileMenu:(e,t)=>{const n=ke(e);return"shared"===n?.kind&&!R&&(pe({section:n.section,...t}),!0)},at:w,hint:X.hint,searchLabel:X.search,readOnly:R,words:ee}),Z??null]}),de?/* @__PURE__ */S(F,{at:{x:de.x,y:de.y},owner:de.owner,onClose:()=>pe(null),"aria-label":de.section.title,items:y([{label:re.deleteShared,danger:!0,onClick:()=>{fe(de.section),pe(null)}}])}):null,me?/* @__PURE__ */S(x,{name:me.title,pages:me.used_on.length,onDelete:()=>(async e=>{try{await r(te).remove(e.id)}catch{return void L.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{B as AddSidePanel,D as blockKey,A as sectionKey,M as sharedKey,I as templateKey};
|
package/dist/chunk-LEZFSSQN.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{usePickFollowsSelection as n}from"./chunk-FHCKFOCD.js";import{slotFieldsOf as e}from"./chunk-PLVEGYK6.js";import{EaselCanvas as t,useSelectedFields as r}from"./chunk-ROPYFLNZ.js";import{Inspector as i}from"./chunk-7LYKFL3Q.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,t,r){const i=n.slotsOf?.(r);return i||e(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=()=>k,v=()=>"",g=()=>null,y=()=>{},b={isLockedBlock:()=>!1,duplicateBlocked:()=>null,nestDepth:()=>0,newSectionNode:()=>null,canAddTo:()=>null,blockIsOffered:()=>!0},L={labelAtLevel:(n,e,t)=>t,descriptions:{},categoryLabel:()=>{},firstSection:null,blockRowName:(n,e)=>e(n.type),plainText:n=>n,Icon:()=>null,Thumbnail:()=>null,useProducts:()=>null},O={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 C(){/* @__PURE__ */
|
|
2
|
-
return s(t,{height:"fill"})}function F(){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 S({parts:n,children:e}){/* @__PURE__ */
|
|
4
|
-
return s(P.Provider,{value:n,children:e})}function D(){return u(P)}function N(){return(D().useOwnerName??v)()}function G(){return(D().useDocumentLabel??g)()}function x(n,e,t,r){return(D().useBridges??h)(n,e,t,r)}function B(n){return(D().useStandaloneBridges??h)(n)}function I(n,e){(D().useDocumentPass??y)(n,e)}function K(){return D().blockRules??b}function R(){return D().blockLook??L}function T(){return D().devices??O}function Y(){return D().leftView??j}function A(){return D().pinned??w}function H(){return D().saveSwitch??!0}function V(e){n(!0===D().pickFollowsSelection,e)}function Z(){return D().storageNamespace||void 0}function E(){return D().styleClipboard??null}function Q(){return D().nodeKeys??!0}function q(){return D().notify??null}function z(){return D().Canvas??C}function J(){return D().CanvasHead??null}function M(){return D().canvasDrag??null}var U=o(null);function W({target:n,children:e}){/* @__PURE__ */
|
|
5
|
-
return s(U.Provider,{value:n,children:e})}function X(){return u(U)}function $(){return D().Inspector??F}export{c as SELECTION_MODE,W as ScreenCanvasTargetProvider,S as ScreenPartsProvider,p as isPinnedFirst,m as isPinnedLast,a as isSlotMode,f as sameInspectorMode,d as screenSlotsOf,R as useScreenBlockLook,K as useScreenBlockRules,x as useScreenBridges,M as useScreenCanvasDrag,z as useScreenCanvasFrame,J as useScreenCanvasHead,X as useScreenCanvasTarget,T as useScreenDevices,G as useScreenDocumentLabel,I as useScreenDocumentPass,$ as useScreenInspectorPanel,Y as useScreenLeftView,Q as useScreenNodeKeys,q as useScreenNotify,N as useScreenOwnerName,D as useScreenParts,V as useScreenPickFollowsSelection,A as useScreenPinned,H as useScreenSaveSwitch,Z as useScreenStorageNamespace,E as useScreenStyleClipboard,B as useStandaloneScreenBridges};
|
package/dist/chunk-PI6RFJR4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useScreenBlockRules as e}from"./chunk-LEZFSSQN.js";import{newNodeId as t,ROOT_ZONE as n}from"./chunk-PLVEGYK6.js";import{useEasel as o,useEaselApi as r}from"./chunk-ROPYFLNZ.js";import{useMemo as s}from"react";function i(i={}){const{dispatch:p}=o(e=>e),d=r(),c=!0===i.readOnly,a=e().resolveOnInsert,l=!0===(i.resolveOnInsert??a),m=!0===i.foldIntoHistory;return s(()=>{const e=m?e=>p({...e,recordHistory:!1}):p,o=(n,o,r)=>{const s=t(o);return c||e({type:"insert",componentType:o,destinationZone:n,destinationIndex:r,id:s}),s},r=e=>(l&&!c&&d.resolveNode(e,{trigger:"insert"}),e),s=(t,n,o)=>{c||e({type:"replace",destinationZone:t,destinationIndex:n,data:o})},i=(e,t,n)=>r(o(e,t,n));return{insertComponent:i,insertSection:(e,t)=>i(n,e,t),replaceComponent:s,seedChild:(e,t,n,i)=>{const p=o(e,n,t);s(e,t,{type:n,props:{id:p,...i}}),r(p)},insertNode:(e,t,n)=>{const i=o(e,n.type,t);return s(e,t,{type:n.type,props:{...n.props,id:i}}),r(i)},removeComponent:(t,n)=>{c||e({type:"remove",index:n,zone:t})},reorderComponent:(t,n,o)=>{c||e({type:"reorder",sourceIndex:n,destinationIndex:o,destinationZone:t})},duplicateComponent:(t,n)=>{c||e({type:"duplicate",sourceIndex:n,sourceZone:t})},select:e=>p({type:"setUi",ui:{itemSelector:e}}),setDocument:t=>{c||e({type:"setData",data:t})},commitDocument:(t,n)=>{c||(m?d.batch(()=>{e({type:"setData",data:t}),void 0!==n&&("slot"===n?.kind?d.selectSlot({parentId:n.parentId,slot:n.slot}):d.select(n?n.id:null))}):d.run({data:t,select:n}))}}},[p,c,l,d,m])}export{i as useSectionOps};
|