efficient-easel 6.0.0 → 6.2.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-2DHJC5YS.js +5 -0
- package/dist/{chunk-3CS5BQMF.js → chunk-3I6DVDUR.js} +1 -1
- package/dist/{chunk-RAFTHQVR.js → chunk-4XIIBGDO.js} +1 -1
- package/dist/{chunk-ATVN7L2J.js → chunk-7EKLESDL.js} +34 -34
- package/dist/{chunk-RSDDVLT7.js → chunk-EYRQ4XGN.js} +1 -1
- package/dist/{chunk-AL65NE2M.js → chunk-G3D2HWEO.js} +1 -1
- package/dist/chunk-MHU7S7JL.js +1 -0
- package/dist/{chunk-7YFUG75W.js → chunk-QBW3RJG5.js} +1 -1
- package/dist/{chunk-SQM6APQW.js → chunk-RKXIB5BN.js} +1 -1
- package/dist/chunk-YFK74XOM.js +5 -0
- package/dist/{chunk-74A4LGYT.js → chunk-ZTG2K3NL.js} +3 -3
- package/dist/copy/index.d.ts +118 -16
- package/dist/copy/index.js +11 -11
- package/dist/easel/index.d.ts +11 -0
- package/dist/easel/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/MediaSidePanel.js +1 -1
- package/dist/screen/components/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 +16 -16
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/key-scope.js +1 -1
- package/dist/screen/lib/puck/use-section-ops.js +1 -1
- package/dist/screen/lib/screen-parts.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-CVBKSCAY.js +0 -5
- package/dist/chunk-LNKCGJYU.js +0 -1
- package/dist/chunk-SYDZ5YWX.js +0 -5
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import{AddBlockRow as e}from"../../chunk-
|
|
2
|
-
return
|
|
3
|
-
return
|
|
4
|
-
/* @__PURE__ */
|
|
5
|
-
return
|
|
6
|
-
/* @__PURE__ */
|
|
7
|
-
/* @__PURE__ */
|
|
8
|
-
/* @__PURE__ */
|
|
9
|
-
/* @__PURE__ */
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
-
return
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
-
/* @__PURE__ */
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
1
|
+
import{AddBlockRow as e}from"../../chunk-G3D2HWEO.js";import{slotChildRowName as n}from"../../chunk-TBF5CVPA.js";import{scrollPreviewToSection as o,gotoPreviewSlide as r}from"../../chunk-4ES5JGGX.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import{useEaselUndoKeys as t}from"../../chunk-RKXIB5BN.js";import{SlotChildActionsProvider as s}from"../../chunk-KCBEE2MC.js";import{DEFAULT_PANEL_W as i}from"../../chunk-6TOYXESC.js";import{usePartBridge as c}from"../../chunk-MHU7S7JL.js";import{useSectionOps as p}from"../../chunk-EYRQ4XGN.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import{useScreenDocument as l}from"../../chunk-WZMU646D.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-ERR437B5.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import{MediaSidePanel as m}from"../../chunk-3I6DVDUR.js";import{SELECTION_MODE as d,useScreenPinned as a,useScreenCanvasFrame as u,useScreenInspectorPanel as h,useScreenPickFollowsSelection as k,sameInspectorMode as f,useStandaloneScreenBridges as j,useScreenBlockLook as S,useScreenBlockRules as y}from"../../chunk-YFK74XOM.js";import{nestsInTree as N,slotFieldsOf as C}from"../../chunk-PLVEGYK6.js";import{useMediaPanel as A,usePanelPick as x,useCancelPanelPick as O}from"../../chunk-R6WTQWAC.js";import{useHostEscape as M}from"../../chunk-U3JP4VGF.js";import{DEFAULT_SCREEN_WORDS as v}from"../../chunk-MCHMF32I.js";import{useEasel as B}from"../../chunk-4XIIBGDO.js";import"../../chunk-AELNNAFM.js";import"../../chunk-CRWFB7MU.js";import"../../chunk-OZ72A6MY.js";import{LayersTree as R,Subtree as E,TreeRow as L,TreeRowAction as P,TreeSeam as g}from"../../chunk-4JSBIW5H.js";import"../../chunk-3ZJSLHHI.js";import{DEFAULT_TREE_WORDS as w}from"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-UK2FQOUT.js";import"../../chunk-BDTITTMW.js";import{DEFAULT_SAVE_WORDS as z,saveIndicator as D}from"../../chunk-H6DDIBQ4.js";import{SaveState as F,panelWidthVars as b}from"../../chunk-UB4TLWVJ.js";import"../../chunk-Y2G7CU6A.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-66LWADFP.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FFYXVAAL.js";import{useWords as T}from"../../chunk-MFIRYGHW.js";import"../../chunk-MOCX5MQ7.js";import"../../chunk-O2NLQBFX.js";import{useTreeDrag as W}from"../../chunk-67GNT6PF.js";import"../../chunk-PAELDYYS.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-P2VEMZH5.js";import{zoneKey as Y,parseZoneKey as H}from"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import{useState as I,useRef as X,useEffect as G,useCallback as J,Fragment as K}from"react";import{Tooltip as V}from"efficient-shell/ui";import{TrashIcon as Q}from"efficient-shell/icons/efficient";import{jsxs as U,jsx as Z,Fragment as $}from"react/jsx-runtime";var q=e=>n=>{n.target.closest("button, input")||e()},_={rowClick:q};function ee(){const{saveState:ee,readOnly:ne,readOnlyReason:oe=null}=l(),re=p(),{appState:te,selectedItem:se,config:ie}=B(e=>e),[ce,pe]=I(d),le=T("screen",v),me=T("tree",w),de=T("save",z),{first:ae,last:ue,panelOf:he}=a(),ke=he(ae),fe=u(),je=h(),Se=te.data.content?.[0]??null,ye=Se?.props.id??null,Ne=Se?.type===ae,Ce=Se?.type===ue,Ae=X(null),xe=X(null);t(xe);const Oe=A(),Me=x(),ve=O();k(se?.props.id),G(()=>{const e=xe.current;if(!Me||!e)return;const n=e=>{"Escape"===e.key&&ve()};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[Me]),M(null!==Me,()=>ve()),G(()=>{ye&&Ae.current!==ye&&(Ae.current=ye,Ne?pe(ke??d):se||re.select({index:0}))},[ye,se,re,Ne]);const Be=J(e=>pe(n=>f(n,e)?n:e),[]),Re=j({kind:ce.kind,mode:ce,open:Be,show:e=>pe(e),reveal:()=>{},select:(e,n)=>{pe(e=>f(e,n)?e:n),re.select(e)}}),{selectNode:Ee}=c({mode:ce,setMode:pe,onOpenPart:o}),Le=S(),{labelAtLevel:Pe,Icon:ge}=Le,{canAddTo:we}=y(),ze=e=>Pe(e,"block",ie.components[e]?.label??e),De=e=>Pe(e,"section",ze(e)),Fe=!Ne&&"puck"===ce.kind&&se?.props.id===ye,be=Se?we(Se.type)?.spec??null:null,Te=Se&&be?`${Se.props.id}:${be.slot}`:null,We=Se&&be&&Array.isArray(Se.props[be.slot])?Se.props[be.slot]:[],Ye=e=>n(e,ze,Le.plainText),He=(e,n)=>{Se&&be&&Te&&(pe(d),be.slider?(r(String(Se.props.id),e),re.select({index:e,zone:Te}),o(String(Se.props.id))):(re.select({index:e,zone:Te}),o(n)))},Ie=()=>{if(!Se||!be||!Te)return;const e=We.length;re.insertComponent(Te,be.childType,e),pe(d),be.slider?requestAnimationFrame(()=>{r(String(Se.props.id),e),re.select({index:e,zone:Te})}):re.select({index:e,zone:Te})},Xe=e=>C(ie,e),Ge=e=>{const{parentId:n,slot:o}=H(e),r=e=>{if(!e)return null;if(String(e.props.id)===n)return e;for(const n of Xe(e.type)){const o=Array.isArray(e.props[n])?e.props[n]:[];for(const e of o){const n=r(e);if(n)return n}}return null},t=r(Se)?.props[o];return Array.isArray(t)?t.length:0},Je=(e,n,o)=>{const r=Math.min(Math.max(o,0),Ge(e)),t=n<r?r-1:r;t!==n&&(re.reorderComponent(e,n,t),pe(d),re.select({index:t,zone:e}))},Ke=W({keyOf:e=>e.id,readOnly:Boolean(ne),canDrop:(e,n)=>Y(n)===e.zone&&n.index>=0&&n.index<=Ge(e.zone),onDrop:(e,n)=>Je(e.zone,e.index,n.index),onStep:(e,n)=>Je(e.zone,e.index,n<0?e.index-1:e.index+2)}),Ve=(e,n)=>/* @__PURE__ */Z(g,{...ne?{}:Ke.seam({place:{...H(e),index:n}})},`seam:${e}:${n}`),Qe=e=>Le.blockRowName(e,ze),Ue=(e,n,r)=>{pe(d),re.select({index:n,zone:e}),o(r)},Ze=(e,n,o)=>{re.insertComponent(e,n,o),pe(d),re.select({index:o,zone:e})},$e=(n,o,r)=>/* @__PURE__ */Z(e,{choices:r,onPick:e=>Ze(n,e,o)}),qe=(e,n)=>{const o=Xe((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=we(e.type),s=t?.choices??null,i="footer"===t?.source?Qe:Ye;/* @__PURE__ */
|
|
2
|
+
return U($,{children:[o.map(({child:e,zone:o,index:r})=>{const t=se?.props.id===e.props.id,s=N(ie,e.type,n),c=i(e),p=String(e.props.id),l=()=>Ue(o,r,p),{rowProps:m,...a}=Ke.row({item:{id:p,zone:o,index:r},place:{...H(o),index:r}},{onClick:q(l)});/* @__PURE__ */
|
|
3
|
+
return U(K,{children:[0===r&&Ve(o,0),
|
|
4
|
+
/* @__PURE__ */Z(L,{words:me,icon:/* @__PURE__ */Z(ge,{type:e.type,size:13}),name:c,selected:t,onSelect:l,...a,actions:/* @__PURE__ */Z(P,{kind:"delete",label:le.deleteNamed({name:c}),onClick:()=>{return e=o,n=r,re.removeComponent(e,n),pe(d),void re.select(null);var e,n},children:/* @__PURE__ */Z(Q,{size:13})}),rowProps:m}),s&&/* @__PURE__ */Z(E,{children:qe(e,n+1)}),Ve(o,r+1)]},String(e.props.id??`${o}-${r}`))}),t&&s?$e(`${e.props.id}:${t.slot}`,o.length,s):null]})},_e="HeroSingle"===Se?.type,en=Boolean(Se)&&(Boolean(be)||Ce||Ne||_e);/* @__PURE__ */
|
|
5
|
+
return U("div",{ref:xe,className:"sf-editor es-editor",style:b(i),children:[
|
|
6
|
+
/* @__PURE__ */Z("div",{className:"sf-section-bar",children:/* @__PURE__ */Z(F,null!==oe?{tone:"off",label:oe,role:"status"}:{...D(ee,de),role:"status"})}),
|
|
7
|
+
/* @__PURE__ */U("div",{className:"sf-body",children:[Me&&Oe?/* @__PURE__ */Z("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:/* @__PURE__ */Z(m,{panel:Oe,pick:Me})}):en&&Se&&/* @__PURE__ */U("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
|
|
8
|
+
/* @__PURE__ */Z("div",{className:"sf-panel-head",children:/* @__PURE__ */Z(V,{content:Ne?le.headerSettings:le.sectionSettings({name:De(Se.type)}),side:"bottom",children:/* @__PURE__ */Z("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(Fe?"is-selected":""),"aria-pressed":Fe,onClick:()=>{Ne?pe(ke??d):(pe(d),re.select({index:0}))},children:De(Se.type)})})}),
|
|
9
|
+
/* @__PURE__ */Z(R,{className:"sf-tree sf-scroll",rootProps:Ke.rootProps(),words:me,children:/* @__PURE__ */Z(E,{children:Ne?
|
|
10
|
+
/* @__PURE__ */Z(L,{words:me,icon:/* @__PURE__ */Z(ge,{type:"header",size:13}),name:le.headerSettings,selected:ce.kind===ke?.kind,onSelect:()=>pe(ke??d),rowProps:{onClick:q(()=>pe(ke??d))}}):be?/* @__PURE__ */U($,{children:[We.map((e,n)=>{const o=se?.props.id===e.props.id,r=Ye(e),t=String(e.props.id),s=()=>He(n,t),{rowProps:i,...c}=Ke.row({item:{id:t,zone:Te,index:n},place:{...H(Te),index:n}},{onClick:q(s)});/* @__PURE__ */
|
|
11
|
+
return U(K,{children:[0===n&&Ve(Te,0),
|
|
12
|
+
/* @__PURE__ */Z(L,{words:me,icon:/* @__PURE__ */Z(ge,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */Z(P,{kind:"delete",label:le.deleteNamed({name:r}),onClick:()=>{return e=n,void(Te&&(re.removeComponent(Te,e),pe(d),re.select(null)));var e},children:/* @__PURE__ */Z(Q,{size:13})}),rowProps:i}),Ve(Te,n+1)]},String(e.props.id??n))}),
|
|
13
|
+
/* @__PURE__ */U("button",{type:"button",className:"sf-add-card",onClick:Ie,children:[
|
|
14
|
+
/* @__PURE__ */Z("span",{className:"sf-plus sf-plus--sm",children:"+"}),be.addLabel]}),ye?Re.partRows?.(Se,_):null]}):qe(Se,1)})})]}),
|
|
15
|
+
/* @__PURE__ */Z("div",{className:"sf-center",children:/* @__PURE__ */Z("div",{className:"sf-preview-host",children:/* @__PURE__ */Z(fe,{})})}),
|
|
16
|
+
/* @__PURE__ */Z(s,{value:{selectChild:(e,n,o,r)=>"section"===we(r)?.source?He(n,o):Ue(e,n,o),addChild:(e,n,o,r,t)=>"section"===we(t)?.source?Ie():Ze(`${e}:${n}`,o,r),childRowName:Ye,blockRowName:Qe},children:/* @__PURE__ */Z(je,{mode:ce,onOpenWebsiteSettings:Re.openSettings??(()=>{}),onSelectNode:Ee,hideNodeActions:!0})})]})]})}export{ee as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{usePartBridge}from"../../chunk-
|
|
1
|
+
export{usePartBridge}from"../../chunk-MHU7S7JL.js";import"../../chunk-EYRQ4XGN.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-YFK74XOM.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-4XIIBGDO.js";import"../../chunk-AELNNAFM.js";import"../../chunk-CRWFB7MU.js";import"../../chunk-OZ72A6MY.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-3ZJSLHHI.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-UK2FQOUT.js";import"../../chunk-66LWADFP.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.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-ZTG2K3NL.js";import"../chunk-GXQCZJOP.js";export{ScreenStoreProvider}from"../chunk-QBW3RJG5.js";import"../chunk-7EKLESDL.js";import"../chunk-26OOWIJJ.js";import"../chunk-BXQBCW3P.js";import"../chunk-FGNR22NY.js";import"../chunk-ZE7I3PLX.js";import"../chunk-2GVCAIPX.js";import"../chunk-PAM3NLFL.js";import"../chunk-7F52SZOI.js";import"../chunk-MQNBD6AB.js";import"../chunk-TBF5CVPA.js";import"../chunk-4ES5JGGX.js";import"../chunk-IQ5TA7AM.js";import"../chunk-DUVRZ456.js";import"../chunk-6W7WLPZH.js";import"../chunk-RKXIB5BN.js";import"../chunk-KCBEE2MC.js";import"../chunk-6TOYXESC.js";import"../chunk-MHU7S7JL.js";import"../chunk-EYRQ4XGN.js";import"../chunk-IYT6NN2J.js";import"../chunk-MTRFMGBO.js";import"../chunk-HQWQLDCB.js";import"../chunk-BSPCSC45.js";import"../chunk-I54UCYOU.js";import"../chunk-GOTN2KY4.js";import"../chunk-R5L2E7JX.js";import"../chunk-WZMU646D.js";import"../chunk-S4AWJX4Q.js";import"../chunk-ERR437B5.js";import"../chunk-KG7RJWOK.js";import"../chunk-GMCZXMOV.js";export{NO_DOCUMENT_ADDRESSING}from"../chunk-RLBXE4EU.js";import"../chunk-HNKB2ZYR.js";import"../chunk-CLOS6SSX.js";import"../chunk-VPFNZ7TB.js";import"../chunk-LOMEH6DG.js";import"../chunk-V7U33NF2.js";import"../chunk-5545A3PC.js";import"../chunk-2DHJC5YS.js";import"../chunk-5ZBY24K7.js";import"../chunk-PA3PNTVV.js";import"../chunk-BVN33R76.js";import"../chunk-PFNIVZPN.js";import"../chunk-KQMML6JM.js";import"../chunk-KCOBHPN6.js";export{EaselSessionProvider,useEaselSession}from"../chunk-O7Q4DDJT.js";export{EFFICIENT_BACKEND,activateEaselSession,backendOf,createEaselSession,currentEaselSession,deactivateEaselSession,efficientClientOpen,isEfficientBackend,provideDefaultBackend,resetAmbientEaselSession,sessionRegistry,setSessionBridgedSite,setSessionDocumentSite}from"../chunk-RSCMJIWS.js";import"../chunk-HQ4VVRIC.js";import"../chunk-3I6DVDUR.js";export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenAdd,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../chunk-YFK74XOM.js";import"../chunk-PLVEGYK6.js";import"../chunk-R6WTQWAC.js";export{DETACHED_EASEL_HOST,EaselHostContext,EaselHostProvider,createEaselHost,useEaselHost,useHostEscape}from"../chunk-U3JP4VGF.js";import"../chunk-6WY6ZXJG.js";import"../chunk-MCHMF32I.js";import"../chunk-4XIIBGDO.js";import"../chunk-AELNNAFM.js";import"../chunk-CRWFB7MU.js";import"../chunk-OZ72A6MY.js";import"../chunk-4JSBIW5H.js";import"../chunk-3ZJSLHHI.js";import"../chunk-K56YDHYQ.js";import"../chunk-KFV7N2DJ.js";import"../chunk-YRLPFZW3.js";import"../chunk-BXMXTO36.js";import"../chunk-EA2HTX37.js";import"../chunk-OSPUG6S6.js";import"../chunk-WK3AFPXY.js";import"../chunk-UK2FQOUT.js";import"../chunk-4VJATVVR.js";import"../chunk-BDTITTMW.js";import"../chunk-H6DDIBQ4.js";import"../chunk-UB4TLWVJ.js";import"../chunk-Y2G7CU6A.js";import"../chunk-THWO5YVZ.js";import"../chunk-RE4LP46F.js";import"../chunk-MJM6SFD3.js";import"../chunk-2OAZYSWJ.js";import"../chunk-66LWADFP.js";import"../chunk-QLD57GBB.js";import"../chunk-FFYXVAAL.js";import"../chunk-MFIRYGHW.js";import"../chunk-MOCX5MQ7.js";import"../chunk-O2NLQBFX.js";import"../chunk-67GNT6PF.js";import"../chunk-PAELDYYS.js";import"../chunk-ZNCEOSXO.js";import"../chunk-P2VEMZH5.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{editorRootFocus,useEaselKeyTarget,useEaselUndoKeys}from"../../chunk-
|
|
1
|
+
export{editorRootFocus,useEaselKeyTarget,useEaselUndoKeys}from"../../chunk-RKXIB5BN.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-4XIIBGDO.js";import"../../chunk-AELNNAFM.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-UK2FQOUT.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{useSectionOps}from"../../../chunk-
|
|
1
|
+
export{useSectionOps}from"../../../chunk-EYRQ4XGN.js";import"../../../chunk-YFK74XOM.js";import"../../../chunk-PLVEGYK6.js";import"../../../chunk-R6WTQWAC.js";import"../../../chunk-U3JP4VGF.js";import"../../../chunk-4XIIBGDO.js";import"../../../chunk-AELNNAFM.js";import"../../../chunk-CRWFB7MU.js";import"../../../chunk-OZ72A6MY.js";import"../../../chunk-4JSBIW5H.js";import"../../../chunk-3ZJSLHHI.js";import"../../../chunk-K56YDHYQ.js";import"../../../chunk-KFV7N2DJ.js";import"../../../chunk-YRLPFZW3.js";import"../../../chunk-EA2HTX37.js";import"../../../chunk-UK2FQOUT.js";import"../../../chunk-66LWADFP.js";import"../../../chunk-QLD57GBB.js";import"../../../chunk-FFYXVAAL.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-67GNT6PF.js";import"../../../chunk-ZNCEOSXO.js";import"../../../chunk-P2VEMZH5.js";import"../../../chunk-KRXQM65X.js";import"../../../chunk-NKB3KVAB.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenAdd,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-
|
|
1
|
+
export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenAdd,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-YFK74XOM.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-4XIIBGDO.js";import"../../chunk-AELNNAFM.js";import"../../chunk-CRWFB7MU.js";import"../../chunk-OZ72A6MY.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-3ZJSLHHI.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-UK2FQOUT.js";import"../../chunk-66LWADFP.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-easel",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.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-CVBKSCAY.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{slotFieldsOf as n}from"./chunk-PLVEGYK6.js";import{usePickFollowsSelection as e}from"./chunk-R6WTQWAC.js";import{EaselCanvas as t,useSelectedFields as r}from"./chunk-RAFTHQVR.js";import{Inspector as i}from"./chunk-CRWFB7MU.js";import{createContext as o,useContext as u}from"react";import{DesktopIcon as l}from"efficient-shell/icons/efficient";import{jsx as s}from"react/jsx-runtime";var c={kind:"puck"};function f(n,e){const t=n,r=e,i=Object.keys(t);return i.length===Object.keys(r).length&&i.every(n=>Object.is(t[n],r[n]))}function a(n){const e=n;return"string"==typeof e.nodeId&&"string"==typeof e.slot}function d(e,t,r){const i=e.slotsOf?.(r);return i||n(t,r.type).map(n=>({slot:n,label:n,rung:!1}))}function p(n,e){return n.isFirst?n.isFirst(e):e.type===n.first}function m(n,e){return n.isLast?n.isLast(e):e.type===n.last}var k={},h={},v=()=>k,g=()=>"",y=()=>null,b=()=>{},O={isLockedBlock:()=>!1,duplicateBlocked:()=>null,nestDepth:()=>0,newSectionNode:()=>null,canAddTo:()=>null,blockIsOffered:()=>!0},j={labelAtLevel:(n,e,t)=>t,descriptions:{},categoryLabel:()=>{},firstSection:null,blockRowName:(n,e)=>e(n.type),plainText:n=>n,Icon:()=>null,Thumbnail:()=>null,useProducts:()=>null},w={options:[{id:"desktop",label:"Desktop",icon:/* @__PURE__ */s(l,{})}],initial:"desktop",fluid:"desktop",widths:{desktop:2e3}},L={read:()=>"sections",write:()=>{},forSelection:(n,e)=>n?"sections":e},C={first:null,last:null,firstGroup:null,lastGroup:null,isSectionGroup:()=>!1,sectionGroupZone:()=>"",panelOf:()=>null};function S(){/* @__PURE__ */
|
|
2
|
-
return s(t,{height:"fill"})}function P(){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 R=o({});function B({parts:n,children:e}){/* @__PURE__ */
|
|
4
|
-
return s(R.Provider,{value:n,children:e})}function D(){return u(R)}function F(){return(D().useOwnerName??g)()}function G(){return(D().useDocumentLabel??y)()}function N(n,e,t,r){return(D().useBridges??v)(n,e,t,r)}function T(n){return(D().useStandaloneBridges??v)(n)}function x(n,e){(D().useDocumentPass??b)(n,e)}function A(){return D().blockRules??O}function I(){return D().blockLook??j}function V(){return D().devices??w}function W(){return D().leftView??L}function H(){return D().pinned??C}function K(){return D().saveSwitch??!0}function Q(n){e(!0===D().pickFollowsSelection,n)}function E(){return D().add??h}function M(){return D().storageNamespace||void 0}function U(){return D().styleClipboard??null}function Y(){return D().nodeKeys??!0}function Z(){return D().notify??null}function q(){return D().Canvas??S}function z(){return D().CanvasHead??null}function J(){return D().canvasDrag??null}var X=o(null);function $({target:n,children:e}){/* @__PURE__ */
|
|
5
|
-
return s(X.Provider,{value:n,children:e})}function _(){return u(X)}function nn(){return D().Inspector??P}export{c as SELECTION_MODE,$ as ScreenCanvasTargetProvider,B as ScreenPartsProvider,p as isPinnedFirst,m as isPinnedLast,a as isSlotMode,f as sameInspectorMode,d as screenSlotsOf,E as useScreenAdd,I as useScreenBlockLook,A as useScreenBlockRules,N as useScreenBridges,J as useScreenCanvasDrag,q as useScreenCanvasFrame,z as useScreenCanvasHead,_ as useScreenCanvasTarget,V as useScreenDevices,G as useScreenDocumentLabel,x as useScreenDocumentPass,nn as useScreenInspectorPanel,W as useScreenLeftView,Y as useScreenNodeKeys,Z as useScreenNotify,F as useScreenOwnerName,D as useScreenParts,Q as useScreenPickFollowsSelection,H as useScreenPinned,K as useScreenSaveSwitch,M as useScreenStorageNamespace,U as useScreenStyleClipboard,T as useStandaloneScreenBridges};
|
package/dist/chunk-LNKCGJYU.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useSectionOps as o}from"./chunk-RSDDVLT7.js";import{decodePartId as e,encodePartId as r}from"./chunk-IYT6NN2J.js";import{usePreviewParts as t}from"./chunk-I54UCYOU.js";import{SELECTION_MODE as n}from"./chunk-CVBKSCAY.js";import{useEasel as p}from"./chunk-RAFTHQVR.js";import{useCallback as d,useEffect as c}from"react";var s=o=>"part"===o.kind;function m({mode:m,setMode:i,onOpenPart:a}){const{getSelectorForId:u}=p(o=>o),I=o(),{setSelectedPartId:f,setSelectHandler:k}=t(),l=d(o=>{const r=e(o);if(!r)return;const{nodeId:t,propKey:p}=r;p?(i(o=>s(o)&&o.nodeId===t&&o.propKey===p?o:{kind:"part",nodeId:t,propKey:p}),a?.(t)):i(o=>"part"===o.kind?n:o)},[i,a]);c(()=>{k(l)},[k,l]);const h=s(m)?r(m.nodeId,m.propKey):null;c(()=>{f(h)},[h,f]);return{selectNode:d(o=>{i(()=>n);const e=u(o);e&&I.select(e)},[i,u,I]),openPartId:h}}export{m as usePartBridge};
|
package/dist/chunk-SYDZ5YWX.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{blockTypesIn as e}from"./chunk-5ZBY24K7.js";import{buildPaletteSections as t,pinnedSection as o,paletteWithoutPinned as n,categoryLabel as i}from"./chunk-PA3PNTVV.js";import{sectionTemplatesOf as s}from"./chunk-BVN33R76.js";import{SidePanelHead as r,PanelModeExit as c}from"./chunk-PFNIVZPN.js";import{useEaselSession as l}from"./chunk-O7Q4DDJT.js";import{blockRuns as a}from"./chunk-HQ4VVRIC.js";import{useScreenBlockLook as p,useScreenBlockRules as m}from"./chunk-CVBKSCAY.js";import{DEFAULT_SCREEN_WORDS as d}from"./chunk-MCHMF32I.js";import{useEasel as f}from"./chunk-RAFTHQVR.js";import{useWords as u}from"./chunk-MFIRYGHW.js";import{AddPanel as k}from"./chunk-MOCX5MQ7.js";import{DEFAULT_DRAG_WORDS as h}from"./chunk-O2NLQBFX.js";import{useState as y,useEffect as b,useMemo as j}from"react";import{AddIcon as g}from"efficient-shell/icons/efficient";import{jsx as $,jsxs as B,Fragment as O}from"react/jsx-runtime";var V=e=>`section:${e}`,v=e=>`block:${e}`,C=e=>`template:${e}`;function F({blocks:F,blocksOnly:I,at:N,onAdd:x,itemFor:A,session:H,siteWide:L,onClose:M,onHide:Q,readOnly:R}){const P=f(e=>e.config),T=p(),{labelAtLevel:w,categoryLabel:D,firstSection:S,Icon:Y,Thumbnail:z}=T,{blockIsOffered:K}=m(),W=u("screen",d).add,X=u("drag",h).add,Z=l(),[E,G]=y([]);b(()=>{let t=!1;const o=e=>K(e,Z);return s(Z).list().then(n=>{if(t)return;const i=P.components;G(n.filter(t=>t.node?.type&&i[t.node.type]&&e(t.node).every(o)))}).catch(()=>{}),()=>{t=!0}},[P,Z]);const J=j(()=>t(P,T),[P]),q=e=>({type:V(e.type),label:e.name,cover:/* @__PURE__ */$(z,{type:e.type}),title:e.desc?`${e.name} — ${e.desc}`:W.tile({name:e.name}),keywords:[e.alias??"",e.desc,e.type,e.catLabel].filter(Boolean)}),U=j(()=>{const e=[];if(F&&F.choices.length>0&&a(F.choices).forEach((t,o)=>{e.push({key:`blocks:${o}`,title:0===o?`${W.inside({name:F.parentName})}${t.group?` · ${t.group}`:""}`:t.group??"",tiles:t.items.map(e=>({type:v(e.type),label:e.label,icon:/* @__PURE__ */$(Y,{type:e.type,size:18}),title:W.tile({name:e.label})}))})}),I)return e;const t=o(J,S);t&&e.push({key:"start",title:W.startBlank,tiles:[q(t)]}),E.length>0&&e.push({key:"templates",title:W.templates,tiles:E.map(e=>{return{type:C(e.id),label:e.name,cover:/* @__PURE__ */$(z,{type:e.node.type}),keywords:[(t=e.node.type,w(t,"section",P.components[t]?.label??t)),e.node.type]};var t})});const s=n(J,S);for(const t of Object.keys(P.categories??{})){const o=s.filter(e=>e.cat===t);0!==o.length&&e.push({key:`category:${t}`,title:i(P,t,D),tiles:o.map(q)})}return e},[F,I,E,J,P,W]),_=e=>{const t=e.indexOf(":"),o=e.slice(0,t),n=e.slice(t+1);if("section"===o)return{kind:"section",type:n};if("block"===o)return{kind:"block",type:n};if("template"===o){const e=E.find(e=>e.id===n);return e?{kind:"template",template:e}:null}return null};/* @__PURE__ */
|
|
2
|
-
return B(O,{children:[
|
|
3
|
-
/* @__PURE__ */$(r,{icon:/* @__PURE__ */$(g,{size:15}),title:W.title,context:I?W.contextBlocks:W.contextAll,actions:/* @__PURE__ */$(c,{label:W.done,description:W.doneDescription,onClick:M}),onHide:Q}),
|
|
4
|
-
/* @__PURE__ */B("div",{className:"sf-addside sf-scroll",children:[
|
|
5
|
-
/* @__PURE__ */$(k,{groups:U,session:H,itemFor:e=>A(_(e)??{kind:"section",type:e}),onInsert:e=>{const t=_(e);t&&x(t)},at:N,hint:I?W.hintBlocks:W.hint,searchLabel:I?W.searchBlocks:W.searchSections,readOnly:R,words:X}),L&&!I?L:null]})]})}export{F as AddSidePanel,v as blockKey,V as sectionKey,C as templateKey};
|