efficient-easel 6.5.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -2
- package/dist/{CanvasDragLayer-O1gVT1AL.d.ts → CanvasDragLayer-CLb7j-CZ.d.ts} +18 -2
- package/dist/blocks/index.d.ts +2 -2
- package/dist/{chunk-Q2L6YTII.js → chunk-5AVEAO36.js} +1 -1
- package/dist/{chunk-MCHMF32I.js → chunk-5F3PKNT7.js} +1 -1
- package/dist/{chunk-WZMU646D.js → chunk-64ZRPAWS.js} +2 -2
- package/dist/{chunk-ESQZG7B3.js → chunk-6UNFME6S.js} +1 -1
- package/dist/{chunk-PAM3NLFL.js → chunk-6Z5VENIE.js} +1 -1
- package/dist/{chunk-4UJ6CPLO.js → chunk-A6X355SX.js} +1 -1
- package/dist/chunk-B3PXQMFN.js +5 -0
- package/dist/{chunk-UY7BCB32.js → chunk-DDOJANIE.js} +1 -1
- package/dist/{chunk-HQWQLDCB.js → chunk-E4MAYJX5.js} +1 -1
- package/dist/{chunk-ZR4CFNMW.js → chunk-FKXEPECH.js} +5 -5
- package/dist/{chunk-57NRNFLO.js → chunk-GV3EVHZM.js} +1 -1
- package/dist/{chunk-TCVTMNYE.js → chunk-JVTSUA2U.js} +1 -1
- package/dist/chunk-LC62L4P2.js +1 -0
- package/dist/{chunk-BXQBCW3P.js → chunk-MVQEEWTE.js} +1 -1
- package/dist/{chunk-M5VRWM7M.js → chunk-P6EIA5NH.js} +8 -8
- package/dist/chunk-SOZUYCQZ.js +1 -0
- package/dist/chunk-SSORUDHE.js +18 -0
- package/dist/chunk-UMUNJM5I.js +1 -0
- package/dist/chunk-WHOCJGHH.js +7 -0
- package/dist/chunk-YXVJAUAU.js +62 -0
- package/dist/drag/drag.css +33 -26
- package/dist/drag/index.d.ts +34 -3
- package/dist/drag/index.js +1 -1
- package/dist/easel/index.d.ts +7 -6
- package/dist/easel/index.js +1 -1
- package/dist/node-ops/index.d.ts +2 -2
- package/dist/node-ops/index.js +1 -1
- package/dist/{plan-CHKjPr6l.d.ts → plan-xc48tt77.d.ts} +10 -1
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/MediaSidePanel.d.ts +2 -2
- package/dist/screen/components/MediaSidePanel.js +1 -1
- package/dist/screen/components/NodeContextMenu.d.ts +8 -7
- package/dist/screen/components/NodeContextMenu.js +1 -1
- package/dist/screen/components/PageEditGuardNotices.js +1 -1
- package/dist/screen/components/ScreenChrome.js +1 -1
- package/dist/screen/components/ScreenDocumentContext.d.ts +2 -2
- package/dist/screen/components/ScreenDocumentContext.js +1 -1
- package/dist/screen/components/ScreenMount.d.ts +3 -3
- package/dist/screen/components/ScreenMount.js +1 -1
- package/dist/screen/components/ScreenStoreProvider.d.ts +3 -3
- package/dist/screen/components/ScreenStoreProvider.js +1 -1
- package/dist/screen/components/SectionScreenShell.js +14 -14
- package/dist/screen/components/usePartBridge.d.ts +3 -3
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.d.ts +4 -4
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/admin-bridge.d.ts +2 -2
- package/dist/screen/lib/document-addressing.d.ts +2 -2
- package/dist/screen/lib/document-hooks.d.ts +2 -2
- package/dist/screen/lib/host.d.ts +2 -2
- package/dist/screen/lib/key-scope.js +1 -1
- package/dist/screen/lib/media-panel.d.ts +2 -2
- package/dist/screen/lib/media-picker.d.ts +2 -2
- package/dist/screen/lib/page-lock.d.ts +2 -2
- package/dist/screen/lib/puck/device-fields.js +1 -1
- package/dist/screen/lib/puck/palette-sections.d.ts +2 -2
- package/dist/screen/lib/puck/section-doc.d.ts +2 -2
- package/dist/screen/lib/puck/style-clipboard.d.ts +3 -3
- package/dist/screen/lib/puck/style-clipboard.js +1 -1
- package/dist/screen/lib/puck/use-section-ops.d.ts +2 -2
- package/dist/screen/lib/puck/use-section-ops.js +1 -1
- package/dist/screen/lib/screen-parts.d.ts +27 -8
- package/dist/screen/lib/screen-parts.js +1 -1
- package/dist/screen/lib/section-templates.d.ts +2 -2
- package/dist/screen/lib/session-context.d.ts +2 -2
- package/dist/screen/lib/session.d.ts +2 -2
- package/dist/screen/screen.css +6 -127
- package/dist/screen/words.d.ts +5 -0
- package/dist/screen/words.js +1 -1
- package/dist/strings/catalogue.js +1 -1
- package/dist/strings/index.js +1 -1
- package/dist/{types-tNFRS_AW.d.ts → types-BbkxBdG9.d.ts} +1 -1
- package/dist/{useNodeOps-CLbZyd43.d.ts → useNodeOps-CTQN3wky.d.ts} +3 -1
- package/package.json +3 -3
- package/dist/chunk-5PUEZ22M.js +0 -1
- package/dist/chunk-GIP45GWF.js +0 -65
- package/dist/chunk-HFW6D46X.js +0 -14
- package/dist/chunk-LVUDUQNL.js +0 -1
- package/dist/chunk-NAGDOIW4.js +0 -5
- package/dist/chunk-T5ORM737.js +0 -7
- package/dist/chunk-UK2FQOUT.js +0 -1
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import{dedupeSlotChildren as e}from"./chunk-26OOWIJJ.js";import{styleClipboardOf as n}from"./chunk-MVQEEWTE.js";import{markedTreeNodeId as t,revealSelectedTreeRow as o,sameSelector as r}from"./chunk-FGNR22NY.js";import{cloneNodeWithFreshIds as i}from"./chunk-2GVCAIPX.js";import{rootRowName as l,slotChildRowName as s,slotChildRenameProp as d,sectionRenameProp as c}from"./chunk-TBF5CVPA.js";import{scrollPreviewToSection as a,gotoPreviewSlide as p,scrollPreviewToTop as u}from"./chunk-4ES5JGGX.js";import{useEaselKeyTarget as f,useEaselUndoKeys as h,editorRootFocus as m}from"./chunk-DDOJANIE.js";import{SlotChildActionsProvider as g}from"./chunk-KCBEE2MC.js";import{screenStorageKeys as y,DEFAULT_PANEL_W as k,clampPanelWidth as S}from"./chunk-6TOYXESC.js";import{usePartBridge as v}from"./chunk-UMUNJM5I.js";import{useSectionOps as x}from"./chunk-GV3EVHZM.js";import{useNodeClipboard as w,useNodeContextMenu as b}from"./chunk-LC62L4P2.js";import{PageEditGuardNotices as z}from"./chunk-E4MAYJX5.js";import{useScreenDocument as B}from"./chunk-64ZRPAWS.js";import{requestMediaPick as C}from"./chunk-KG7RJWOK.js";import{heldStyle as O,styleShortcut as N}from"./chunk-V7U33NF2.js";import{AddChildRow as I}from"./chunk-5545A3PC.js";import{AddSidePanel as P}from"./chunk-B3PXQMFN.js";import{SidePanelHead as $,PanelShowStrip as A}from"./chunk-PFNIVZPN.js";import{MediaSidePanel as T}from"./chunk-5AVEAO36.js";import{useScreenSaveSwitch as M,useScreenNodeKeys as j,useScreenPinned as E,useScreenDocumentLabel as R,useScreenCanvasFrame as L,useScreenInspectorPanel as V,useScreenDevices as F,useScreenPickFollowsSelection as H,useScreenLeftView as W,useScreenAdd as D,SELECTION_MODE as U,sameInspectorMode as G,useScreenBridges as J,useScreenBlockRules as X,useScreenBlockLook as Y,useScreenStorageNamespace as K,useScreenNotify as _,useScreenCanvasHead as Q,isSlotMode as Z,useScreenStyleClipboard as q,useScreenDocumentPass as ee,useScreenCanvasDrag as ne,ScreenCanvasTargetProvider as te,isPinnedFirst as oe,isPinnedLast as re,screenSlotsOf as ie}from"./chunk-FKXEPECH.js";import{ROOT_ZONE as le,blockNodeActions as se,TREE_MAX_DEPTH as de,childSlotsOf as ce,slotFieldsOf as ae,slotChildrenIn as pe,nestsInTree as ue,newNodeId as fe}from"./chunk-PLVEGYK6.js";import{useMediaPanel as he,usePanelPick as me,useCancelPanelPick as ge}from"./chunk-R6WTQWAC.js";import{useEaselHost as ye,useHostEscape as ke}from"./chunk-U3JP4VGF.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as Se}from"./chunk-6WY6ZXJG.js";import{DEFAULT_SCREEN_WORDS as ve}from"./chunk-5F3PKNT7.js";import{useEasel as xe,useEaselApi as we}from"./chunk-P6EIA5NH.js";import{TreeRow as be,Subtree as ze,LayersTree as Be,TreeGroupLabel as Ce,TreeRowAction as Oe,TreeSeam as Ne}from"./chunk-4JSBIW5H.js";import{DEFAULT_TREE_WORDS as Ie}from"./chunk-K56YDHYQ.js";import{DEFAULT_NODE_MENU_WORDS as Pe}from"./chunk-WK3AFPXY.js";import{toItemSelector as $e,useNodeOps as Ae,clickPick as Te}from"./chunk-SOZUYCQZ.js";import{LayersIcon as Me,MediaIcon as je}from"./chunk-4VJATVVR.js";import{DEFAULT_SAVE_WORDS as Ee,saveIndicator as Re}from"./chunk-H6DDIBQ4.js";import{EaselTopBar as Le,TopBarRail as Ve,TopBarCluster as Fe,EaselIconButton as He,TopBarDivider as We,DeviceSwitch as De,InspectorIconButton as Ue,PanelResizeHandle as Ge,MAX_PANEL_W as Je,MIN_PANEL_W as Xe,panelWidthVars as Ye,SaveState as Ke,SaveStateToggle as _e}from"./chunk-UB4TLWVJ.js";import{DEFAULT_CHROME_WORDS as Qe}from"./chunk-Y2G7CU6A.js";import{useWords as Ze}from"./chunk-MFIRYGHW.js";import{insertSeams as qe,CanvasDragLayer as en,CanvasInsert as nn}from"./chunk-SSORUDHE.js";import{DEFAULT_DRAG_WORDS as tn}from"./chunk-O2NLQBFX.js";import{createDragSession as on,useTreeDrag as rn,gapToMoveIndex as ln}from"./chunk-67GNT6PF.js";import{useCanvasFrame as sn,LIST_SELECTOR as dn,BLOCK_SELECTOR as cn,useCanvasEvent as an}from"./chunk-AWJUYMX7.js";import{zoneKey as pn,ROOT_ID as un,ROOT_SLOT as fn,parseZoneKey as hn,find as mn,DataError as gn}from"./chunk-KRXQM65X.js";import{useRef as yn,useMemo as kn,useState as Sn,useEffect as vn,useCallback as xn,useLayoutEffect as wn,Fragment as bn}from"react";import{Tooltip as zn,Button as Bn,toast as Cn}from"efficient-shell/ui";import{UndoIcon as On,RedoIcon as Nn,TrashIcon as In,EyeOffIcon as Pn,EyeIcon as $n,DuplicateIcon as An}from"efficient-shell/icons/efficient";import{jsx as Tn,jsxs as Mn,Fragment as jn}from"react/jsx-runtime";function En({saveState:e,notSaving:n,readOnlyReason:t,toggle:o,onToggle:r,onRetry:i,words:l,saveWords:s}){if(null!==t)/* @__PURE__ */return Tn(Ke,{tone:"off",label:t,role:"status"});if(n)/* @__PURE__ */
|
|
2
|
+
return Tn(Ke,{tone:e.pending?"off-unsaved":"off",label:l.notSaving,role:"status"});const{tone:d,label:c}=Re(e,s),a=e.failed&&!e.paused&&/* @__PURE__ */Tn(Bn,{variant:"secondary",size:"sm",onClick:i,children:l.retry});/* @__PURE__ */
|
|
3
|
+
return Mn(jn,o?{children:[
|
|
4
|
+
/* @__PURE__ */Tn(_e,{pressed:e.paused,onToggle:r,title:e.paused?l.autoSaveOff:l.autoSaveOn,children:/* @__PURE__ */Tn(Ke,{tone:d,label:c})}),a]}:{children:[
|
|
5
|
+
/* @__PURE__ */Tn(Ke,{tone:d,label:c,role:"status"}),a]})}function Rn({expand:e}){/* @__PURE__ */
|
|
6
|
+
return Tn("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.9,strokeLinecap:"round",strokeLinejoin:"round",children:/* @__PURE__ */Mn(jn,e?{children:[
|
|
7
|
+
/* @__PURE__ */Tn("path",{d:"M8 9l4-4 4 4"}),
|
|
8
|
+
/* @__PURE__ */Tn("path",{d:"M8 15l4 4 4-4"})]}:{children:[
|
|
9
|
+
/* @__PURE__ */Tn("path",{d:"M8 4l4 4 4-4"}),
|
|
10
|
+
/* @__PURE__ */Tn("path",{d:"M8 20l4-4 4 4"}),
|
|
11
|
+
/* @__PURE__ */Tn("path",{d:"M5 12h14"})]})})}var Ln=`${dn}, ${cn}`;function Vn(e,n,t){const o=t-n;if(o<6)return null;if(o<24)return{top:Math.round((n+t)/2),height:Math.round(o)};return{top:Math.round(Math.min(Math.max(e,n+12),t-12))}}var Fn="__rungs";var Hn="screen:band",Wn={duplicate:!0,delete:!0};function Dn(){const Re=ye(),{target:Ke,docId:_e,capabilities:dn,currentSlug:Dn,siteId:Un,onPublish:Gn,saveState:Jn,saveConflict:Xn,retrySave:Yn,toggleAutoSave:Kn,readOnly:_n,readOnlyReason:Qn=null}=B(),Zn=M(),qn=j(),{mediaEditing:et,hasEditGuard:nt,hasPinnedChrome:tt}=dn,{appState:ot,dispatch:rt,history:it,selectedItem:lt,getSelectorForId:st,config:dt}=xe(e=>e),ct=E(),{first:at,firstGroup:pt,lastGroup:ut,isSectionGroup:ft,sectionGroupZone:ht,panelOf:mt}=ct,gt=mt(at),yt=e=>oe(ct,e),kt=e=>re(ct,e),St="node"===ct.firstRow,vt=ct.band??null,xt=Ze("screen",ve),wt=Ze("tree",Ie),bt=Ze("drag",tn),zt=Ze("save",Ee),Bt=Ze("menu",Pe),Ct=Ze("styleClipboard",Se),Ot=Ze("chrome",Qe),Nt=R()??`/${Dn}`,It=L(),Pt=V(),$t=x({readOnly:_n}),At=x({readOnly:_n,foldIntoHistory:!0}),Tt=yn(null),Mt=we(),jt=kn(()=>({...$t,select:e=>{Tt.current=e,$t.select(e)},commitDocument:(e,n)=>{if(void 0!==n){const t=Mt.config;Tt.current=$e(e,t,n)}$t.commitDocument(e,n)}}),[$t,Mt]),Et=ot.ui,Rt=Et.leftSideBarVisible,Lt=Et.rightSideBarVisible,{options:Vt,widths:Ft,initial:Ht,fluid:Wt,fit:Dt}=F(),[Ut,Gt]=Sn(Ht),Jt=he(),Xt=et&&null!==Jt,Yt=me(),Kt=ge();H(lt?.props.id);const{read:_t,write:Qt,forSelection:Zt}=W(),[qt,eo]=Sn(_t);vn(()=>{Qt(qt)},[qt]);const[no,to]=Sn(0),oo=yn(null),ro=yn(null),io=sn(ro,{readySelector:Ln}),lo=f(ro);h(ro,io);const[so,co]=Sn(!1),ao=yn(!1),po=yn(!1),[uo,fo]=Sn(null),ho=D(),mo=e=>fo(null===e?null:{zone:le,index:e}),[go,yo]=Sn([]),[ko,So]=Sn(U),vo="puck"===ko.kind,xo=so&&!uo&&ho.railTarget?ho.railTarget(ot.data,{node:lt??null,mode:ko}):null,wo=xo?{zone:pn(xo),index:xo.index}:null,bo=uo??wo,zo=bo&&bo.zone===le?bo.index:null,Bo=t(ko,lt?.props.id),[Co,Oo]=Sn(null);vn(()=>{Co&&(o(),Oo(null))},[Co]);const No=yn(st);No.current=st;const Io=xn((e,{scroll:n})=>{eo(n=>Zt(e,n)),n&&Oo(e);const t=[];let o=e;for(let e=0;e<4;e++){const e=No.current(o)?.zone;if(!e||!e.includes(":"))break;const n=e.split(":")[0];t.push(n),t.push(e),o=n}0!==t.length&&ir(e=>{if(t.every(n=>!e.has(n)))return e;const n=new Set(e);return t.forEach(e=>n.delete(e)),n})},[]),Po=yn(null);vn(()=>{const e=Po.current;Po.current=null;const n=null==lt?.props.id?null:String(lt.props.id);So(e&&e.id===n?e.mode:mt(lt?.type)??U);const t=lt?.props.id,o=Tt.current;if(Tt.current=null,!t)return;const i=st(t);Io(String(t),{scroll:!r(o,i??null,le)})},[lt?.props.id,Io]);const $o=xn(e=>{So(n=>G(n,e)?n:e),rt({type:"setUi",ui:{rightSideBarVisible:!0}})},[rt]),Ao=yn(()=>{});Ao.current=(e,n)=>{const t=e?Zr(e.zone??le)[e.index]?.props.id:null,o=null==t?null:String(t),r=null==lt?.props.id?null:String(lt.props.id);So(e=>G(e,n)?e:n),o!==r&&(Po.current={id:o,mode:n},jt.select(e))};const To=xn((e,n)=>Ao.current(e,n),[]),Mo={kind:ko.kind,mode:ko,open:$o,show:e=>So(e),reveal:()=>{Lt||rt({type:"setUi",ui:{rightSideBarVisible:!0}})},select:To},jo=J(Mo,{data:ot.data,selected:lt??null,zoneOf:e=>st(e)?.zone,readOnly:Boolean(_n),select:e=>{So(U),jt.select({index:e})},replace:(e,n)=>jt.replaceComponent(le,e,n),scrollTo:e=>bi(e)},{device:Ut,refreshes:no},{setView:eo,reveal:()=>{Rt||rt({type:"setUi",ui:{leftSideBarVisible:!0}})}}),Eo=jo.pinnedSource??!1,Ro=jo.resolveLeftView?jo.resolveLeftView(qt,Xt):"media"===qt&&Xt?qt:"sections",Lo=X(),{isLockedBlock:Vo,duplicateBlocked:Fo,nestDepth:Ho,newSectionNode:Wo,canAddTo:Do,blockIsOffered:Uo}=Lo,Go=Y(),{labelAtLevel:Jo,Icon:Xo,useProducts:Yo}=Go,Ko=Go.rowName?(e,n,t)=>Go.rowName(e,n,t):void 0,_o=xn(e=>{rt({type:"setUi",ui:{rightSideBarVisible:!0}}),a(e),Io(e,{scroll:!0})},[rt,Io]),{selectNode:Qo,openPartId:Zo}=v({mode:ko,setMode:So,onOpenPart:_o}),[qo,er]=Sn(null);ke(null!==qo,()=>er(null));const nr=y(K()),tr=nr.collapsed,or=nr.panelWidths,[rr,ir]=Sn(()=>{if("undefined"==typeof window)/* @__PURE__ */return new Set;try{const e=window.localStorage.getItem(tr);return new Set(e?JSON.parse(e):[])}catch{/* @__PURE__ */
|
|
12
|
+
return new Set}});vn(()=>{try{window.localStorage.setItem(tr,JSON.stringify([...rr]))}catch{}},[rr]);const[lr,sr]=Sn(()=>{if("undefined"==typeof window)return{...k};try{const e=window.localStorage.getItem(or);if(!e)return{...k};const n=JSON.parse(e);return{left:S(Number(n.left)||k.left),right:S(Number(n.right)||k.right)}}catch{return{...k}}});vn(()=>{const e=setTimeout(()=>{try{window.localStorage.setItem(or,JSON.stringify(lr))}catch{}},300);return()=>clearTimeout(e)},[lr]);const dr=xn((e,n)=>sr(t=>{const o="function"==typeof n?n(t[e]):n;return t[e]===o?t:{...t,[e]:o}}),[]),cr=xn(e=>dr("left",e),[dr]),ar=xn(e=>dr("right",e),[dr]),pr=e=>rr.has(e),ur=e=>ir(n=>{const t=new Set(n);return t.has(e)?t.delete(e):t.add(e),t}),fr=yn(!1),hr=yn(null);vn(()=>{if(fr.current&&!so){const e=hr.current,n=e&&e.isConnected&&!e.closest('[aria-hidden="true"]')?e:null;(n??ro.current?.querySelector(`button[aria-label="${CSS.escape(xt.add.title)}"]`))?.focus(),hr.current=null}fr.current=so},[so]),vn(()=>{if(!so||!lo)return;const e=e=>{"Escape"===e.key&&Ai()};return lo.addEventListener("keydown",e),()=>lo.removeEventListener("keydown",e)},[so,lo]),ke(so,()=>Ai()),vn(()=>{!Rt&&so&&(co(!1),fo(null),ao.current=!1)},[Rt]),vn(()=>{if(!Yt)return po.current&&rt({type:"setUi",ui:{leftSideBarVisible:!1}}),void(po.current=!1);so&&(co(!1),fo(null),po.current=ao.current,ao.current=!1),Rt||(po.current=!0,rt({type:"setUi",ui:{leftSideBarVisible:!0}}))},[Yt]),vn(()=>{!Rt&&Yt&&(po.current=!1,Kt())},[Rt]),vn(()=>{if(!Yt||!lo)return;const e=e=>{"Escape"===e.key&&Kt()};return lo.addEventListener("keydown",e),()=>lo.removeEventListener("keydown",e)},[Yt,lo]),ke(null!==Yt,()=>Kt());const mr=_(),gr=(e,n="success",t)=>{if(mr)return void(t?mr(e,"error"===n?"error":"info",t):mr(e,"error"===n?"error":"info"));const o={sound:!1,action:t?.action,onClose:t?.onClose};"error"===n?Cn.error(e,{...o,duration:t?.duration??3200}):Cn.success(e,{...o,duration:t?.duration??1900})},yr=yn(null),[kr,Sr]=Sn(0),[vr,xr]=Sn(0),wr=Q(),br=yn(null),zr=e=>Math.max(0,e.clientHeight-(br.current?.offsetHeight??0));vn(()=>{const e=yr.current;if(!e)return;const n=()=>{Sr(e.clientWidth),xr(zr(e))};n();const t=new ResizeObserver(n);return t.observe(e),br.current&&t.observe(br.current),()=>t.disconnect()},[]),wn(()=>{yr.current&&(Sr(yr.current.clientWidth),xr(zr(yr.current)))},[lr,Rt,Lt]);const Br=Ut===Wt?kr>0?kr:Ft[Wt]:Ft[Ut],Cr=kr>0?Math.min(kr/Br,"shrink"===Dt?1:2):1,Or=Br*Cr,Nr=kr>0&&Or>kr+1,Ir={width:Or,height:vr||"100%",flex:"none",position:"relative"},Pr={width:Br,height:vr?vr/Cr:"100%",maxHeight:"none",transform:1!==Cr?`scale(${Cr})`:void 0,transformOrigin:"top left"},$r=()=>rt({type:"setUi",ui:{leftSideBarVisible:!Rt}}),Ar=()=>rt({type:"setUi",ui:{rightSideBarVisible:!Lt}}),Tr=e=>{so&&(co(!1),fo(null),ao.current=!1,Rt&&qt===e)||Yt&&(po.current=!1,Kt(),Rt&&qt===e)||(Rt&&qt===e?$r():(eo(e),Rt||rt({type:"setUi",ui:{leftSideBarVisible:!0}})))},Mr=()=>{C(Re,{accept:"image/*",title:Ot.mediaLibrary})},jr=()=>{So(U),jt.select(null),u()},Er=()=>{So(gt??U),Lt||rt({type:"setUi",ui:{rightSideBarVisible:!0}})},Rr=ot.data.content??[],Lr=()=>{const e=Rr.findIndex(yt),n=Rr.findIndex(kt);return{floor:e>=0?e+1:0,cap:n>=0?n:Rr.length}},Vr=dt,Fr=Lo.stripCopy,Hr=e=>i(e,Fr),Wr=w(),Dr=Ae({data:ot.data,config:Vr,readOnly:Boolean(_n),clipboard:Wr,strip:Fr?e=>Fr(e):void 0,afterRemove:"none",stepBounds:(e,n)=>{if(e.parentId!==un||e.slot!==fn)return{min:0,max:n-1};const{floor:t,cap:o}=Lr();return{min:t,max:o-1}},commit:(e,{select:n})=>{void 0!==n&&So(U);const t=void 0===n||"node"===n?.kind?n:null;jt.commitDocument(e,t)}}),Ur=e=>{const n=mn(ot.data,dt,e);if(!n)return!1;const t=pn(n.place),o=n.node,r=t===le?Kr(o):ci(o);return!!Dr.remove(e)&&(gr(xt.deleted({name:r}),"success",{duration:8e3,action:{label:xt.bar.undo,onClick:()=>{Dr.restore(n.node,n.place)}}}),!0)},Gr={...Dr,remove:Ur},Jr=e=>Jo(e,"block",dt.components[e]?.label??e),Xr=xn(e=>dt.components[e]?.defaultProps??{},[dt]),Yr=e=>Jo(e,"section",Jr(e)),Kr=e=>l({type:e.type,props:e.props??{}},Yr(e.type),Ko),{nodeAddresses:_r,zoneItems:Qr}=kn(()=>{const e=/* @__PURE__ */new Map,n=/* @__PURE__ */new Map,t=(o,r,i)=>{n.set(r,o),o.forEach((n,o)=>{const l=String(n.props?.id??"");if(l&&e.set(l,{zone:r,index:o}),i>=de)return;const s=/* @__PURE__ */new Map;for(const{child:e,zone:t}of ce(dt,n))s.set(t,[...s.get(t)??[],e]);for(const[e,n]of s)t(n,e,i+1)})};return t(Rr,le,0),{nodeAddresses:e,zoneItems:n}},[Rr,dt]),Zr=xn(e=>Qr.get(e)??[],[Qr]),qr=e=>{const n=_r.get(e);return n?Zr(n.zone)[n.index]:void 0},ei=e=>ie(Lo,dt,e),ni=e=>{if(!Lo.slotsOf||e===le)return null;const n=e.lastIndexOf(":");if(n<=0)return null;const t=qr(e.slice(0,n));if(!t)return null;const o=ei(t).filter(e=>e.rung),r=o.findIndex(t=>t.slot===e.slice(n+1));return r<0?null:{node:t,slot:o[r],position:r}},ti=(()=>{if(!Z(ko))return null;const e=`${ko.nodeId}:${ko.slot}`;return ni(e)?.slot.panel===ko.kind?e:null})(),oi=yn(null);vn(()=>{const e=oi.current;if(oi.current=null,!ti||!Z(ko))return;const n=ko.nodeId;Io(n,{scroll:e!==ti}),ir(e=>{if(!e.has(n))return e;const t=new Set(e);return t.delete(n),t})},[ko]);const ri=(e,n,t)=>{const o=String(e.props.id);if(!n.panel)return void(e=>{const n=_r.get(e);n&&(n.zone===le?zi(n.index):el(n.zone,n.index,e,qr(n.zone.slice(0,n.zone.lastIndexOf(":")))?.type??""))})(o);const r={kind:n.panel,nodeId:o,slot:n.slot},i=`${o}:${n.slot}`;t&&ti!==i&&(oi.current=i),To(null,r),Lt||rt({type:"setUi",ui:{rightSideBarVisible:!0}}),bi(o)},ii=(e,n,t)=>{const o=`${e}:${n}`;if(ir(n=>{if(!n.has(o)&&!n.has(e))return n;const t=new Set(n);return t.delete(o),t.delete(e),t}),!t)return;ti!==o&&(oi.current=o);To(null,{kind:t,nodeId:e,slot:n})},li=(e,n,t)=>{if(_n||!Lo.moveSlot)return;const o=qr(e),r=o?ei(o).filter(e=>e.rung):[],i=r[n];if(!i)return;const l={parentId:e,slot:Fn,index:n},s=ln(l,{...l,index:Math.min(Math.max(t,0),r.length)});if(s===n)return;const d=Lo.moveSlot(e,n,s);"string"==typeof d&&ii(e,d,i.panel)},si=Yo(),di=kn(()=>{const e=/* @__PURE__ */new Map;for(const n of si??[])e.set(n.slug,n.name);return e},[si]),ci=e=>s(e,Jr,Go.plainText,e=>di.get(e),Go.rowName),ai=(e,n)=>{const t=dt.components[e.type]?.fields,o=n===le||kl(n)?"section":"block",r=n===le&&(yt(e)||kt(e)||ft(e.type)),i="block"===o?d(t):r?null:c(t);return Go.renamePropOf?Go.renamePropOf(e,o,i):i},pi=(e,n,t,o)=>{if(!(!_n&&qo?.zone===e&&qo.index===n))return;const r=(t,o)=>{er(null),o&&((e,n,t)=>{const o=Zr(e)[n];if(!o)return;const r=ai(o,e);r&&jt.replaceComponent(e,n,{...o,props:{...o.props,[r]:t.trim()}})})(e,n,t)};/* @__PURE__ */
|
|
13
|
+
return Tn("input",{className:"es-tree-rename",defaultValue:o,autoFocus:!0,"aria-label":xt.rename,onClick:e=>e.stopPropagation(),onBlur:e=>r(e.currentTarget.value,!0),onKeyDown:e=>{"Enter"===e.key?(e.preventDefault(),r(e.currentTarget.value,!0)):"Escape"===e.key&&(e.preventDefault(),r("",!1))}},t)},ui=n(q(),Ct),fi=ui.scope({target:Ke,siteId:Un,docId:_e}),hi=dt,mi=(e,n)=>n===le?Yr(e):Jr(e),gi=(e,n,t)=>{const o=ui.plan(fi,t,mi(t.type,e),hi);o&&(o.changed&&jt.replaceComponent(e,n,{...t,props:{...o.props,id:t.props.id}}),gr(o.message))},yi=b({nodesIn:Zr,nodeAt:(e,n)=>Zr(e)[n]??null,labelOf:(e,n)=>n===le?Yr(e):Jr(e),renamePropOf:ai,beginRename:(e,n)=>er({zone:e,index:n}),history:{hasPast:it.hasPast,hasFuture:it.hasFuture,back:()=>it.back(),forward:()=>it.forward()},openAddSection:()=>{jt.select(null),Pi(null)},openPageSettings:()=>{jt.select(null),So(U)},pageSettingsLabel:xt.pageSettings,words:{menu:Bt,styleClipboard:Ct,screen:xt.menu},readOnly:Boolean(_n),collapseAll:()=>ir(new Set(Zr(le).map(e=>String(e.props.id)))),onPasteRefused:e=>gr(e?xt.pasteRefused({name:e.label}):xt.menu.clipboardRefused,"error"),canPasteAt:(e,n)=>vl(e,n),menuRows:jo.menuRows,isLocked:e=>Vo(e.type),duplicateBlocked:e=>Fo(ot.data,e),permits:e=>se(dt,e.type),canAddTo:Do,nodeOps:Gr,isPinned:(e,n)=>n===le&&(yt(e)||kt(e)),sectionBand:Lr,openAddInside:(e,n)=>{e===le?zi(n):jt.select({zone:e,index:n}),Pi(null)},locate:e=>_r.get(e)??null,rowNameOf:(e,n)=>n===le?Kr(e):ci(e),selectAt:(e,n,t,o)=>{e===le?zi(n):el(e,n,t,o??"")},slotRung:e=>{const n=ni(e);return n?.slot.panel?{label:n.slot.label,select:()=>ri(n.node,n.slot,!1)}:null},style:{held:()=>O(fi),canCopy:e=>ui.rows(hi,e).some(e=>!1!==e.counted),copy:(e,n)=>ui.copy(fi,e,mi(e.type,n),hi),paste:(e,n,t)=>gi(e,n,t)},keys:qn?{target:lo,selected:()=>{const e=ot.ui.itemSelector;return e?{zone:e.zone??le,index:e.index}:null},held:()=>Wr.get(),readOnly:Boolean(_n),onDone:({done:e,name:n})=>{"copied"===e&&gr(xt.copied({name:n}))}}:void 0},io),ki=yn({copy:(e,n)=>{},paste:(e,n,t)=>{},at:()=>null,readOnly:!1});vn(()=>{ki.current={copy:(e,n)=>ui.copy(fi,e,mi(e.type,n),hi),paste:gi,at:()=>{const e=ot.ui.itemSelector;if(!e)return null;const n=e.zone??le,t=Zr(n)[e.index];return t?{zone:n,index:e.index,node:t}:null},readOnly:Boolean(_n)}});const Si=xn(e=>{const n=N(e);if(!n)return;const t=ki.current,o=t.at();o&&(e.preventDefault(),"copy"===n?t.copy(o.node,o.zone):t.readOnly||t.paste(o.zone,o.index,o.node))},[]);vn(()=>{if(!lo)return;const e=e=>Si(e);return lo.addEventListener("keydown",e),()=>lo.removeEventListener("keydown",e)},[Si,lo]),an(io,"keydown",Si);const vi=Rr.map(e=>e.props.id).join("|");vn(()=>{const e=io?.document??null,n=io?.window??null;let t=0;const o=[],r=()=>{if(!e)return void yo(e=>e.length?[]:e);const n=Rr.findIndex(kt),t=n>=0?n:Rr.length,o=n=>{const t=Rr[n]?.props?.id;return null==t?null:e.querySelector(`[data-puck-component="${CSS.escape(String(t))}"]`)},r=e=>e?[...e.querySelectorAll(cn)].map(e=>e.getBoundingClientRect()).filter(e=>e.width>0||e.height>0):[],i=[];for(let e=Rr.length>0&&!yt(Rr[0])?0:1;e<=t;e++){const n=o(e),t=o(e-1),l=n?.getBoundingClientRect()??null,s=t?.getBoundingClientRect()??null;if(!l&&!s)continue;const d=Vn(l&&s?(s.bottom+l.top)/2:l?0===e?l.top+12:l.top:s.bottom,Math.max(0===e?0:-1/0,...r(t).map(e=>e.bottom)),Math.min(1/0,...r(n).map(e=>e.top)));d&&i.push({...d,index:e})}yo(e=>function(e,n){if(e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(e[t].top!==n[t].top||e[t].index!==n[t].index||e[t].height!==n[t].height)return!1;return!0}(e,i)?e:i)},i=()=>{cancelAnimationFrame(t),t=requestAnimationFrame(r)};if(!e||!n)return void r();n.addEventListener("scroll",i,{passive:!0});const l=new ResizeObserver(i);return l.observe(e.documentElement),r(),o.push(setTimeout(r,150),setTimeout(r,450)),()=>{cancelAnimationFrame(t),o.forEach(clearTimeout),n.removeEventListener("scroll",i),l.disconnect()}},[io,vi,Ut,Cr,Rt,Lt,lt?.props.id]);const xi=io?.document??null,wi=io?.window??null;vn(()=>{const e=oo.current;if(!e||!xi||!wi)return;const n=[],t=()=>{const n=xi.querySelector(`[data-puck-component="${CSS.escape(e.id)}"]`);if(!n)return!1;const t=n.getBoundingClientRect().top-e.offset;return Math.abs(t)>1&&wi.scrollTo({left:wi.scrollX,top:wi.scrollY+t,behavior:"instant"}),!0};return oo.current=null,t()&&n.push(setTimeout(t,150),setTimeout(t,450)),()=>n.forEach(clearTimeout)},[xi,wi]);const bi=e=>{jo.holdCanvasOn?jo.holdCanvasOn(e):a(e)},zi=e=>{So(U),jt.select({index:e}),jo.sectionPressed?.(Rr[e]);const n=Rr[e]?.props?.id;n&&bi(n)},Bi=e=>{const{floor:n,cap:t}=Lr(),o=e=>Math.min(Math.max(n,e),t);if("number"==typeof e)return o(e);const r=lt&&ko.kind!==gt?.kind?Rr.findIndex(e=>e.props.id===lt.props.id):-1;return o(r>=0?r+1:t)},Ci=(e,n)=>{const{floor:t,cap:o}=Lr(),r=Math.min(Math.max(n,t),o),i=e<r?r-1:r;return i===e?{moved:!1,dest:e}:(jt.reorderComponent(le,e,i),jt.select({index:i}),{moved:!0,dest:i})},Oi=(e,n,t,o)=>{So(U),jt.select(o?{index:o.index,zone:o.zone}:{index:e}),a(n),gr(xt.sectionAdded({name:t}))},Ni=(e,n)=>{const t=Bi(n),o=Wo(e,{nodeDefaults:Xr,newNodeId:fe,sectionLabel:Yr,blockIsOffered:Uo}),r=o?jt.insertNode(le,t,o):jt.insertSection(e,t);return Oi(t,r,Yr(e),o?((e,n,t)=>{if(e.type===t)return null;const o={at:null},r=(e,n,i)=>{const l=i.filter(n=>n===e.type).length;for(const{child:s,zone:d,index:c}of ce(dt,e)){if(s.type===t&&(!o.at||n>o.at.depth)){const r=Do(e.type,l,d.slice(d.lastIndexOf(":")+1)),i=r?.choices??(r?.spec?[{type:r.spec.childType,label:r.spec.childType}]:[]);null!==r&&"footer"!==r.source&&`${e.props.id}:${r.slot}`===d&&i.some(e=>e.type===t)&&(o.at={zone:d,index:c,depth:n})}r(s,n+1,[...i,e.type])}};return r({type:e.type,props:{...e.props,id:n}},1,[]),o.at?{zone:o.at.zone,index:o.at.index}:null})(o,r,e):null),t},Ii=(e,n,t)=>{const o=Bi(t),r=jt.insertNode(le,o,n);return Oi(o,r,e),o},Pi=e=>$i(le,e),$i=(e,n)=>{hr.current=document.activeElement??null,Yt&&(ao.current=po.current,po.current=!1,Kt()),fo(null===n?null:{zone:e,index:n}),co(!0),Rt||(ao.current=!0,rt({type:"setUi",ui:{leftSideBarVisible:!0}}))},Ai=()=>{co(!1),fo(null),ao.current&&rt({type:"setUi",ui:{leftSideBarVisible:!1}}),ao.current=!1},Ti=(e,n,t)=>{if("section"===e.kind)jt.insertComponent(n,e.type,t);else{if("template"!==e.kind)return;jt.insertNode(n,t,Hr(e.template.node))}So(U),jt.select({index:t,zone:n})},Mi=(e,n)=>Go.rowName?n?yt(e)?Go.rowName(e,"section",xt.header):kt(e)?Go.rowName(e,"section",xt.footer):ft(e.type)?Go.rowName(e,"section",Jr(e.type)):Kr(e):ci(e):n?Yr(e.type):Jr(e.type),ji=e=>n=>{e()},Ei=()=>jo.editPinnedSource?.(),Ri=(e,n,t)=>{if(_n)return null;const o=Zr(e)[n];return o&&!se(dt,o.type).delete?null:/* @__PURE__ */Tn(Oe,{kind:"delete",label:xt.deleteNamed({name:t}),onClick:()=>((e,n)=>{const t=Zr(e)[n]?.props?.id;null!=t&&Ur(String(t))})(e,n),children:/* @__PURE__ */Tn(In,{size:15})})},Li=e=>Go.rowPreview?.(e)||void 0,Vi=e=>Go.rowMarks?.(e)??void 0,Fi=(e,n,t)=>Go.rowActions?.(e,n,t)??null,Hi=(e,n,t,o)=>{if(_n)return null;const r=Boolean(t.props._hidden);/* @__PURE__ */
|
|
14
|
+
return Tn(Oe,{kind:"eye",label:r?xt.showNamed({name:o}):xt.hideNamed({name:o}),onClick:()=>Di(e,n,t),children:/* @__PURE__ */Tn(r?Pn:$n,{size:14,strokeWidth:1.8,strokeLinecap:void 0,strokeLinejoin:void 0})})},Wi=e=>{const n=Yr(Rr[e]?.type??""),t=n?xt.addSectionBefore({name:n}):xt.addSectionHere;return Dl(le,e,()=>Pi(e),t)},Di=(e,n,t)=>{jt.replaceComponent(e,n,{...t,props:{...t.props,_hidden:!t.props._hidden}})},Ui=e=>ae(dt,e),Gi=e=>ce(dt,e),Ji=e=>Lo.slotsOf?ei(e).map(n=>({slot:n.slot,rung:n.rung?n:null,kids:pe(e,n.slot)})):[{slot:null,rung:null,kids:Gi(e)}],Xi=e=>Lo.slotsOf?Ji(e).flatMap(e=>e.kids):Gi(e),Yi=e=>Boolean(Lo.slotsOf)&&ei(e).some(e=>e.rung),Ki=(e,n,t)=>null===t?void 0===n?Do(e):Do(e,n):Do(e,n,t),_i=(e,n,t)=>{const o=ue(dt,e.type,n)&&(t||Xi(e).length>0||Yi(e));return{collapsible:o,folded:o&&pr(String(e.props.id))}},Qi=(e,n,t)=>Ji(e).flatMap(o=>{const r=o.rung?n+1:n,i=o.kids.flatMap(({child:e})=>_i(e,r,t(e.type)).collapsible?[String(e.props.id),...Qi(e,r+1,t)]:[]);return o.rung?[`${e.props.id}:${o.rung.slot}`,...i]:i}),Zi=e=>Xi(e).length>0||Yi(e)||Boolean(Do(e.type)),qi=e=>Boolean(Do(e)),el=(e,n,t,o)=>{if(So(U),Do(o)?.spec?.slider){const t=e.split(":")[0];p(t,n),jt.select({index:n,zone:e}),a(t)}else jt.select({index:n,zone:e}),bi(t)},nl=(e,n,t,o,r)=>{const i=`${e}:${n}`;jt.insertComponent(i,t,o),Do(r)?.spec?.slider?requestAnimationFrame(()=>{p(e,o),jt.select({index:o,zone:i})}):jt.select({index:o,zone:i})},tl=(e,n,t)=>{jt.insertComponent(e,n,t),So(U),jt.select({index:t,zone:e})},ol=yn(/* @__PURE__ */new Set);vn(()=>{Rr.forEach(e=>{const n=Do(e.type)?.spec;if(!n)return;const t=e.props.id;if(ol.current.has(t))return;ol.current.add(t);if((Array.isArray(e.props[n.slot])?e.props[n.slot]:[]).length>0)return;if(n.skipSeed?.(e.props))return;const o=`${t}:${n.slot}`,r=n.legacy?.(e.props)??[];(r.length?r:n.seeds(Xr)).forEach((e,t)=>At.seedChild(o,t,n.childType,e))})},[Rr,At,Xr]);const rl=yn(/* @__PURE__ */new Set);vn(()=>{Rr.forEach((n,t)=>{const o=n.props.id;if(rl.current.has(o))return;const r=e(n,Ui(n.type));rl.current.add(o),r&&At.replaceComponent(le,t,{...n,props:r})})},[Rr,At]),ee(At,dt);const il=Rr.findIndex(kt),ll=il>=0?Rr[il]:null,sl=St?Rr.findIndex(yt):-1,dl=sl>=0?Rr[sl]:null,cl=Rr.find(e=>e.type===pt)??null,al=Rr.find(e=>e.type===ut)??null,pl=il>=0?il:Rr.length,ul=[];Rr.forEach(e=>{kt(e)||(Zi(e)&&ul.push(String(e.props.id)),ul.push(...Qi(e,1,qi)))}),ll&&(ul.push(String(ll.props.id)),ul.push(...Qi(ll,1,qi)));const fl=ul.length>0&&ul.every(e=>rr.has(e)),hl=e=>{const n=Go.blockRowName(e,Jr);return Go.rowName?Go.rowName(e,"block",n):n},ml=(e,n,t,o)=>{const r=Zr(e)[t];if(!r)return;const i={...hn(e),index:t},l={...hn(n),index:Math.min(Math.max(o,0),Zr(n).length)},s=ln(i,l);if(e!==n||s!==t)try{Dr.move(String(r.props.id),{...l,index:s})}catch(e){if(!(e instanceof gn))throw e}},gl=e=>{const n=/* @__PURE__ */new Set,t=e=>{for(const{child:o,zone:r}of Gi(e))n.add(r),t(o)};for(const t of Ui(e.type))n.add(`${e.props.id}:${t}`);return t(e),n},yl=e=>{let n=e.slice(0,e.indexOf(":"));for(let e=0;e<64;e++){const e=_r.get(n);if(!e)return null;if(e.zone===le)return n;n=e.zone.slice(0,e.zone.indexOf(":"))}return null},kl=e=>{const n=e.slice(0,e.indexOf(":")),t=Rr.find(e=>ft(e.type)&&String(e.props.id)===n);return t&&ht(n)===e?t:null},Sl=(e,n,t)=>{if(e.rung){const t=qr(e.rung.nodeId),o=t?ei(t).filter(e=>e.rung).length:0;return n.parentId===e.rung.nodeId&&n.slot===Fn&&n.index>=0&&n.index<=o}if(n.slot===Fn)return!1;if(e.add)return wl(e.add,n);const o=pn(n);if(ft(e.type))return!1;const r=kl(o),i=kl(e.zone);if(r||i)return!(!r||!i)&&(n.index>=0&&n.index<=Zr(o).length);if(e.zone===le||o===le){if(e.zone!==o)return!1;const{floor:t,cap:r}=Lr();return n.index>=t&&n.index<=r}if(n.index<0||n.index>Zr(o).length)return!1;if(e.zone===o)return!0;const l=ll&&!ct.lastIsOpen?String(ll.props.id):null;return(!l||yl(e.zone)!==l&&yl(o)!==l)&&((e,n,t,o)=>{if(e===n)return!0;const r=o??Zr(e)[t];if(!r)return!1;const i=n.split(":")[0],l=_r.get(i),s=l?Zr(l.zone)[l.index]:void 0;if(!s)return!1;if(!o&&gl(r).has(n))return!1;const d=Do(s.type,Ho(ot?.data,s.type,i),n.slice(n.lastIndexOf(":")+1));return!!d&&(!!(d.choices?d.choices.some(e=>e.type===r.type):d.spec?.childType===r.type)&&!d.spec?.addBlocked?.(Zr(n),r))})(e.zone,o,e.index,t)},vl=(e,n)=>{const t=pn(e.from);if(t===pn(n))return!0;const o=e.node;return Sl({id:String(o.props?.id??""),zone:t,index:-1,type:o.type},n,o)},xl=e=>{const n=e.slice(0,e.indexOf(":")),t=_r.get(n),o=t?Zr(t.zone)[t.index]:void 0;if(!t||!o)return null;const r=Do(o.type,Ho(ot?.data,o.type,n),e.slice(e.lastIndexOf(":")+1));if(!r||`${n}:${r.slot}`!==e)return null;if("footer"===r.source)return null;const i=r.choices??(r.spec?[{type:r.spec.childType,label:Jr(r.spec.childType)}]:[]),l=ni(e);return{parent:o,parentId:n,target:r,choices:i,parentName:l?l.slot.label:Mi(o,t.zone===le)}},wl=(e,n)=>{const t=pn(n);if("block"!==e.kind){if(kl(t))return n.index>=0&&n.index<=Zr(t).length;if(t!==le)return!1;const{floor:e,cap:o}=Lr();return n.index>=e&&n.index<=o}if(t===le)return!1;const o=xl(t);return!(!o||!o.choices.some(n=>n.type===e.type))&&!o.target.spec?.addBlocked?.(Zr(t))},bl=(e,n)=>{e.rung?li(e.rung.nodeId,e.index,n.index):e.add?((e,n)=>{if("block"!==e.kind&&kl(pn(n)))return void Ti(e,pn(n),n.index);if("section"===e.kind)return void Ni(e.type,n.index);if("template"===e.kind)return void Ii(e.template.name,Hr(e.template.node),n.index);const t=pn(n),o=xl(t);o&&(o.target.spec?nl(o.parentId,o.target.slot,e.type,n.index,o.parent.type):tl(t,e.type,n.index))})(e.add,n):e.zone===le?Ci(e.index,n.index):ml(e.zone,pn(n),e.index,n.index)},[zl]=Sn(()=>on()),Bl=rn({keyOf:e=>e.id,readOnly:Boolean(_n),session:zl,canDrop:Sl,onDrop:bl,onStep:(e,n)=>{e.rung?li(e.rung.nodeId,e.index,n<0?e.index-1:e.index+2):e.zone===le?((e,n)=>{const t=Yr(Rr[e]?.type??""),o=Ci(e,n<0?e-1:e+2);if(!o.moved)return void gr(n<0?xt.sectionFirst({name:t}):xt.sectionLast({name:t}));const{floor:r,cap:i}=Lr();gr(xt.sectionMoved({name:t,n:o.dest-r+1,total:i-r}))})(e.index,n):ml(e.zone,e.zone,e.index,n<0?e.index-1:e.index+2)}}),Cl=xn(e=>{const{floor:n,cap:t}=Lr(),o=[];for(const r of e.nodes){const e=pn(r.place),i=Zr(e)[r.place.index];if(!i||String(i.props.id)!==r.id)continue;if(yt(i)||kt(i)||Vo(i.type))continue;if(ft(i.type))continue;const l=Boolean(kl(e)),s=e===le||l;e===le&&t-n<2||o.push({key:r.id,item:{id:r.id,zone:e,index:r.place.index,type:i.type},box:r.box,label:s?Yr(i.type):ci(i),from:r.place})}const r=e.zones.flatMap(e=>{const n=pn(e.list);return n===le&&0===e.children.length?[{...e,addLabel:xt.addSection,addAlways:!0}]:e.children.length>0||Boolean(xl(n)?.choices.length)||Boolean(kl(n))?[e]:[]}),i=r.flatMap(e=>{const n=pn(e.list);return n===le||kl(n)||!xl(n)?.choices.length?[]:qe(e,xt.addBlockHere)});return{sources:o,zones:r,seams:i}},[ot.data]),Ol=null==lt?.props.id?null:String(lt.props.id),Nl=xn(e=>{const n=dt,t=e=>!e.item.rung&&null!==mn(ot.data,n,e.item.id),o=e[e.length-1];if(!t(o))return o;const r=n=>e.find(e=>t(e)&&e.item.id===n),i=r(Ol);return i||(r(Te(ot.data,n,o.item.id,Ol))??o)},[ot.data,dt,Ol]),Il=e=>{So(U),jt.select(e.zone===le?{index:e.index}:{index:e.index,zone:e.zone})},Pl=ne(),$l=()=>({data:ot.data,device:Ut,ops:jt,inspector:Mo}),Al=Pl?.model,Tl=kn(()=>Al?e=>Al(e,Cl(e),$l()):Cl,[Al,Cl,Ut]),Ml=Pl?.measure,jl=Ml?(e,n)=>Ml(e,n,$l()):void 0,El=Pl?.canDrop,Rl=El?(e,n)=>El(e,n,Sl,$l()):Sl,Ll=Pl?.drop,Vl=Ll?(e,n)=>Ll(e,n,bl,$l()):bl,Fl=Pl?.pick,Hl=Fl?e=>Fl(e,Il,$l()):Il,Wl=e=>{const n=pn(e),t=ni(n);t&&ri(t.node,t.slot,!1),$i(n,e.index)},Dl=(e,n,t,o)=>/* @__PURE__ */Tn(Ne,{..._n?{}:Bl.seam({place:{...hn(e),index:n}}),onAdd:_n?void 0:t,label:o},`seam:${e}:${n}`),Ul={rowClick:ji,isCollapsed:pr,toggleCollapse:ur},Gl=e=>{const n=String(e.props.id),t=Rr.findIndex(e=>String(e.props.id)===n),o=ht(n),r=Zr(o),i=pr(n),l=Jr(e.type),s=Go.rowName?Go.rowName(e,"section",l):l,d=e=>Dl(o,e,()=>$i(o,e),xt.addSectionHere);/* @__PURE__ */
|
|
15
|
+
return Mn(jn,{children:[
|
|
16
|
+
/* @__PURE__ */Tn(be,{words:wt,icon:/* @__PURE__ */Tn(Xo,{type:e.type,size:13}),name:s,preview:Li(e),marks:Vi(e),onSelect:()=>zi(t),nameSlot:pi(le,t,n,s),selected:Bo===n,actions:Fi(e,le,t)??void 0,rowProps:{"data-node-id":n,onClick:ji(()=>zi(t))},fold:{open:!i,label:"section",onToggle:()=>ur(n)}}),!i&&/* @__PURE__ */Mn(ze,{children:[r.map((n,t)=>{const r=String(n.props.id),i=Kr(n),l=Zi(n),s=l&&pr(r),c=()=>el(o,t,r,e.type),{rowProps:a,...p}=Bl.row({item:{id:r,zone:o,index:t,type:n.type},place:{...hn(o),index:t}},{"data-node-id":r,onClick:ji(c)});/* @__PURE__ */
|
|
17
|
+
return Mn(bn,{children:[d(t),
|
|
18
|
+
/* @__PURE__ */Tn(be,{words:wt,icon:/* @__PURE__ */Tn(Xo,{type:n.type,size:13}),name:i,preview:Li(n),marks:Vi(n),onSelect:c,nameSlot:pi(o,t,r,i),selected:Bo===r,hidden:Boolean(n.props._hidden),...p,fold:l?{open:!s,label:"section",onToggle:()=>ur(r)}:void 0,actions:/* @__PURE__ */Mn(jn,{children:[Ri(o,t,i),Fi(n,o,t),Hi(o,t,n,i)]}),rowProps:a}),l&&!s&&/* @__PURE__ */Tn(ze,{children:Yl(n,2)})]},r)}),d(r.length)]})]})},Jl=(e,n,t,o,r)=>{const i=String(e.props.id),l=`${i}:${n.slot}`,s=Bl.dragging,d=!pr(l)&&s?.rung?.nodeId!==i,c={...hn(l),index:0},a=s&&!s.rung&&Sl(s,c)?c:void 0,p=()=>ri(e,n,!0),{rowProps:u,...f}=Bl.row({item:{id:`rung:${l}`,zone:`${i}:${Fn}`,index:t,type:e.type,rung:{nodeId:i,slot:n.slot}},place:{parentId:i,slot:Fn,index:t},into:a,canDrag:Boolean(Lo.moveSlot)&&!1!==n.movable&&o>1},{"data-slot-zone":l,onClick:ji(p)}),h=_n?null:Lo.slotActions?.(e,n.slot);/* @__PURE__ */
|
|
19
|
+
return Mn(bn,{children:[n.heading,
|
|
20
|
+
/* @__PURE__ */Tn(be,{words:wt,icon:n.glyph??null,name:n.label,badge:n.badge,onSelect:p,selected:ti===l,...f,dragHint:n.dragHint,fold:{open:d,label:n.label,onToggle:()=>ur(l)},actions:h&&h.length>0?/* @__PURE__ */Tn(jn,{children:h.map((t,o)=>/* @__PURE__ */Tn(Oe,{kind:"delete"===t.kind?"delete":"plain",label:t.label,disabled:t.disabled,onClick:()=>((e,n,t)=>{if(_n||t.disabled)return;const o=String(e.props.id),r=e=>{"string"==typeof e&&ii(o,e,n.panel)},i=t.run();i&&"function"==typeof i.then?i.then(r):r(i)})(e,n,t),children:"delete"===t.kind?/* @__PURE__ */Tn(In,{size:15}):/* @__PURE__ */Tn(An,{size:15})},`${o}:${t.kind}`))}):void 0,rowProps:u}),d&&/* @__PURE__ */Tn(ze,{children:r})]},l)},Xl=(e,n)=>{const t=Ji(e),o=t.filter(e=>e.rung).length;let r=0;/* @__PURE__ */
|
|
21
|
+
return Tn(jn,{children:t.map(t=>{const i=t.kids,l=t.rung?n+1:n,s=Ki(e.type,void 0,t.slot),d=s?`${e.props.id}:${s.slot}`:null,c=null===t.slot?null:`${e.props.id}:${t.slot}`,a=null!==c&&Boolean(xl(c)?.choices.length),p=(e,n)=>a?Dl(e,n,()=>$i(e,n),xt.addBlockHere):Dl(e,n),u=/* @__PURE__ */Mn(jn,{children:[i.map(({child:n,zone:t,index:o})=>{const r=Bo===String(n.props.id),{collapsible:i,folded:s}=_i(n,l,qi(n.type)),d=String(n.props.id),c=hl(n),a=()=>el(t,o,d,e.type),{rowProps:u,...f}=Bl.row({item:{id:d,zone:t,index:o,type:n.type},place:{...hn(t),index:o}},{"data-node-id":d,onClick:ji(a)});/* @__PURE__ */
|
|
22
|
+
return Mn(bn,{children:[0===o&&p(t,0),
|
|
23
|
+
/* @__PURE__ */Tn(be,{words:wt,icon:/* @__PURE__ */Tn(Xo,{type:n.type,size:13}),name:c,preview:Li(n),marks:Vi(n),onSelect:a,nameSlot:pi(t,o,d,c),selected:r,hidden:Boolean(n.props._hidden),...f,fold:i?{open:!s,label:"group",onToggle:()=>ur(d)}:void 0,actions:/* @__PURE__ */Mn(jn,{children:[Ri(t,o,c),Fi(n,t,o),Hi(t,o,n,c)]}),rowProps:u}),i&&!s&&/* @__PURE__ */Tn(ze,{children:Xl(n,l+1)}),p(t,o+1)]},String(n.props.id??`${t}-${o}`))}),null===c?d&&!i.some(e=>e.zone===d)?p(d,0):null:0!==i.length||!t.rung&&d!==c?null:p(c,0)]});return t.rung?Jl(e,t.rung,r++,o,u):/* @__PURE__ */Tn(bn,{children:u},t.slot??"")})})},Yl=(e,n)=>{const t=Ho(ot?.data,e.type,String(e.props.id)),o=Ji(e),r=o.filter(e=>e.rung).length;let i=0;/* @__PURE__ */
|
|
24
|
+
return Tn(jn,{children:o.map(o=>{const l=o.kids,s=o.rung?n+1:n,d=Ki(e.type,t,o.slot),c=d?.spec??null,a=c&&Array.isArray(e.props[c.slot])?e.props[c.slot]:[],p=d&&d.choices?{slot:d.slot,choices:d.choices}:null,u=String(e.props.id),f=c&&!c.fixed?`${u}:${c.slot}`:null,h=p?`${u}:${p.slot}`:null,m=(n,t)=>{const o=n===f&&c&&!c.addBlocked?.(a)?()=>nl(e.props.id,c.slot,c.childType,t,e.type):n===h?()=>$i(n,t):void 0;return Dl(n,t,o,n===f&&c?c.addLabel:xt.addBlockHere)},g=null===o.slot?null:`${u}:${o.slot}`,y=Boolean(c&&!c.fixed&&(null===g||g===f)),k=/* @__PURE__ */Mn(jn,{children:[l.map(({child:n,zone:t,index:o})=>{const r=Bo===String(n.props.id),i=ci(n),l=String(n.props.id),{collapsible:d,folded:c}=_i(n,s,qi(n.type)),a=Ui(n.type),p=1===a.length?`${l}:${a[0]}`:null,u=p?{...hn(p),index:Zr(p).length}:void 0,f=Bl.dragging,h=u&&f&&Sl(f,u)?u:void 0,g=()=>el(t,o,l,e.type),{rowProps:y,...k}=Bl.row({item:{id:l,zone:t,index:o,type:n.type},place:{...hn(t),index:o},into:h,canDrag:!Vo(n.type)},{"data-node-id":l,onClick:ji(g)});/* @__PURE__ */
|
|
25
|
+
return Mn(bn,{children:[0===o&&m(t,0),
|
|
26
|
+
/* @__PURE__ */Tn(be,{words:wt,icon:/* @__PURE__ */Tn(Xo,{type:n.type,size:13}),name:i,preview:Li(n),marks:Vi(n),onSelect:g,nameSlot:pi(t,o,l,i),selected:r,hidden:Boolean(n.props._hidden),...k,fold:d?{open:!c,label:"group",onToggle:()=>ur(l)}:void 0,actions:Vo(n.type)?Fi(n,t,o)??void 0:/* @__PURE__ */Mn(jn,{children:[Ri(t,o,i),Fi(n,t,o),Hi(t,o,n,i)]}),rowProps:y}),d&&!c&&/* @__PURE__ */Tn(ze,{children:Yl(n,s+1)}),m(t,o+1)]},String(n.props.id??`${t}-${o}`))}),y&&c&&
|
|
27
|
+
/* @__PURE__ */Tn(I,{small:!0,label:c.addLabel,blocked:c.addBlocked?.(a)??null,onAdd:()=>nl(e.props.id,c.slot,c.childType,a.length,e.type)}),null===g?h&&!l.some(e=>e.zone===h)?m(h,0):null:0!==l.length||(o.rung?y:g!==h)?null:m(g,0)]});return o.rung?Jl(e,o.rung,i++,r,k):/* @__PURE__ */Tn(bn,{children:k},o.slot??"")})})},Kl=(()=>{if(!lt||!vo)return null;const e=String(lt.type),n=String(lt.props.id),t=Do(e,Ho(ot?.data,e,n));if(!t||"footer"===t.source)return null;const o=Rr.some(e=>String(e.props?.id)===n),r=Array.isArray(lt.props[t.slot])?lt.props[t.slot]:[];if(t.spec?.addBlocked?.(r))return null;const i=t.choices??(t.spec?[{type:t.spec.childType,label:Jr(t.spec.childType)}]:[]);return 0===i.length?null:{parentName:Mi(lt,o),choices:i,onPick:o=>{t.spec?nl(n,t.slot,o,r.length,e):tl(`${n}:${t.slot}`,o,r.length)}}})(),_l=bo&&bo.zone!==le&&!kl(bo.zone)?bo.zone:null,Ql=!0===ho.blocksFirst,Zl=_l?xl(_l):Ql&&bo?null:Kl,ql=Boolean(uo&&_l)||Ql&&Boolean(Zl&&Zl.choices.length>0),es=so||null!==Yt,ns=e=>"panel"in e?{id:e.id,label:e.label,icon:e.icon,active:Rt&&!es&&Ro===e.id,onSelect:()=>Tr(e.id)}:e,ts=[{id:"add",label:xt.add.title,icon:/* @__PURE__ */Tn("span",{className:"sf-rail-plus","aria-hidden":"true",children:"+"}),active:so,onSelect:()=>so?Ai():Pi(null)},...(jo.railLead??[]).map(ns),{id:"sections",label:xt.layers,icon:/* @__PURE__ */Tn(Me,{}),active:Rt&&!es&&"sections"===Ro,onSelect:()=>Tr("sections")},...(jo.railTrail??[]).map(ns)];Xt?ts.push({id:"media",label:xt.railMedia,icon:/* @__PURE__ */Tn(je,{}),active:Rt&&!so&&(null!==Yt||"media"===Ro),onSelect:()=>Tr("media")}):et&&ts.push({id:"media",label:xt.railMedia,icon:/* @__PURE__ */Tn(je,{}),onSelect:Mr});const os=[...jo.railLead??[],...jo.railTrail??[]].find(e=>"panel"in e&&e.id===Ro),rs=Boolean(vt?.foldable)&&!Eo,is=vt?.label??(nt?xt.pageSections:xt.templateSections),ls=rs&&pr(Hn),ss=/* @__PURE__ */Mn(jn,{children:[Rr.map((e,n)=>{if(yt(e)||kt(e)||ft(e.type))return null;const t=Bo===String(e.props.id),o=Boolean(e.props._hidden);Gi(e);const r=String(e.props.id),i=jo.hasOwnRows?.(e)??!1,l=Zi(e)||i,s=l&&pr(r),d=Ui(e.type),c=1===d.length?`${r}:${d[0]}`:null,a=c?{...hn(c),index:Zr(c).length}:void 0,p=Bl.dragging,u=a&&p&&Sl(p,a)?a:void 0,{rowProps:f,...h}=Bl.row({item:{id:r,zone:le,index:n,type:e.type},place:{...hn(le),index:n},into:u},{"data-node-id":r,onClick:ji(()=>zi(n))});/* @__PURE__ */
|
|
28
|
+
return Mn(bn,{children:[n>0&&Wi(n),
|
|
29
|
+
/* @__PURE__ */Tn(be,{words:wt,icon:/* @__PURE__ */Tn(Xo,{type:e.type,size:13}),name:Kr(e),preview:Li(e),marks:Vi(e),onSelect:()=>zi(n),nameSlot:pi(le,n,r,Kr(e)),selected:t,hidden:o,...h,fold:l?{open:!s,label:"section",onToggle:()=>ur(r)}:void 0,actions:/* @__PURE__ */Mn(jn,{children:[Ri(le,n,Kr(e)),Fi(e,le,n),Hi(le,n,e,Kr(e))]}),rowProps:f}),Zi(e)&&!s&&/* @__PURE__ */Mn(ze,{children:[Yl(e,1),jo.partRows?.(e,Ul)]}),i&&!s&&/* @__PURE__ */Tn(ze,{children:jo.ownRows?.(e,n,Ul)})]},String(e.props.id??n))}),!Eo&&pl>0&&Wi(pl),vt?.addAtEnd&&!Eo&&!_n&&/* @__PURE__ */Tn(I,{small:!0,label:xt.addSection,blocked:null,onAdd:()=>Pi(pl)})]}),ds=(e,n,t)=>{const o=String(e.props.id),r=Xi(e).length>0||Yi(e)||Boolean(Do(e.type)),i=r&&pr(o),l="header"===t?xt.header:xt.footer,s=Go.rowName?Go.rowName(e,"section",l):l;/* @__PURE__ */
|
|
30
|
+
return Mn(jn,{children:[
|
|
31
|
+
/* @__PURE__ */Tn(be,{words:wt,icon:/* @__PURE__ */Tn(Xo,{type:t,size:13}),name:s,preview:Li(e),marks:Vi(e),onSelect:()=>zi(n),nameSlot:pi(le,n,o,s),selected:Bo===String(e.props.id),fold:r?{open:!i,label:"section",onToggle:()=>ur(o)}:void 0,actions:Fi(e,le,n)??void 0,rowProps:{"data-node-id":o,onClick:ji(()=>zi(n))}}),r&&!i&&/* @__PURE__ */Tn(ze,{children:Xl(e,1)})]})};return(jo.wrap??(e=>e))(
|
|
32
|
+
/* @__PURE__ */Tn(te,{target:io,children:/* @__PURE__ */Mn("div",{ref:ro,className:"sf-editor es-editor",style:Ye(lr),onContextMenu:yi.onEditorContextMenu,...m(Re),children:[
|
|
33
|
+
/* @__PURE__ */Mn(Le,{children:[
|
|
34
|
+
/* @__PURE__ */Tn(Ve,{items:ts,ariaLabel:xt.bar.views}),
|
|
35
|
+
/* @__PURE__ */Mn(Fe,{children:[
|
|
36
|
+
/* @__PURE__ */Tn(He,{label:xt.bar.undo,disabled:Boolean(_n)||!it.hasPast,onClick:()=>it.back(),children:/* @__PURE__ */Tn(On,{})}),
|
|
37
|
+
/* @__PURE__ */Tn(He,{label:xt.bar.redo,disabled:Boolean(_n)||!it.hasFuture,onClick:()=>it.forward(),children:/* @__PURE__ */Tn(Nn,{})}),
|
|
38
|
+
/* @__PURE__ */Tn(We,{}),
|
|
39
|
+
/* @__PURE__ */Tn(De,{devices:Vt,value:Ut,onChange:Gt})]}),
|
|
40
|
+
/* @__PURE__ */Mn(Fe,{kind:"right",style:{minWidth:300},children:[
|
|
41
|
+
/* @__PURE__ */Tn(En,{saveState:Jn,notSaving:Boolean(_n)||null!=Xn,readOnlyReason:Qn,toggle:Zn,onToggle:Kn,onRetry:Yn,words:xt.bar,saveWords:zt}),jo.barLead?.(),
|
|
42
|
+
/* @__PURE__ */Tn(zn,{content:xt.bar.refreshTip,side:"bottom",children:/* @__PURE__ */Tn(Bn,{variant:"secondary",onClick:()=>{oo.current=(()=>{const e=io?.document;if(!e)return null;const n=Rr.findIndex(kt),t=n>=0?n:Rr.length;let o=null;for(let n=0;n<t;n++){const t=Rr[n]?.props?.id;if(null==t)continue;const r=e.querySelector(`[data-puck-component="${CSS.escape(String(t))}"]`);if(!r)continue;const i=r.getBoundingClientRect().top;i<=4&&(null===o||i>o.offset)&&(o={id:String(t),offset:i})}if(!o){const e=lt?.props?.id??Rr[0]?.props?.id;null!=e&&(o={id:String(e),offset:0})}return o})(),to(e=>e+1)},children:xt.bar.refresh})}),jo.barTrail?.(),jo.barMain?jo.barMain():/* @__PURE__ */Tn(Bn,{variant:"primary",disabled:null!==Qn,onClick:()=>{Gn(ot.data)},children:xt.done})]})]}),
|
|
43
|
+
/* @__PURE__ */Tn(z,{}),
|
|
44
|
+
/* @__PURE__ */Mn("div",{className:"sf-body",children:[Rt?/* @__PURE__ */Mn(jn,{children:[
|
|
45
|
+
/* @__PURE__ */Tn("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left","aria-label":xt.leftPanel,children:so?/* @__PURE__ */Tn(P,{blocks:Zl,blocksOnly:ql,at:uo?{label:(e=>{const n=kl(e.zone);if(n)return xt.add.addingTo({name:Go.rowName?Mi(n,!0):Jr(n.type)});if(e.zone===le){const n=Rr[e.index];return n&&!kt(n)?xt.add.addingBefore({name:Mi(n,!0)}):xt.add.addingAtEnd}const t=xl(e.zone);return t?xt.add.addingTo({name:t.parentName}):xt.add.addingHere})(uo),onClear:()=>fo(null)}:void 0,onAdd:e=>{const n=bo,t=(e,n)=>{uo&&fo({zone:e,index:n})};if(n&&"block"!==e.kind&&kl(n.zone))return Ti(e,n.zone,n.index),void t(n.zone,n.index+1);if("section"===e.kind)return(e=>{if(null===zo)return void Ni(e);const n=Ni(e,zo);uo&&mo(n+1)})(e.type);if("template"===e.kind)return((e,n)=>{if(null===zo)return void Ii(e,n);const t=Ii(e,n,zo);uo&&mo(t+1)})(e.template.name,Hr(e.template.node));if(n&&n.zone!==le){const o=xl(n.zone);if(!o)return;return o.target.spec?nl(o.parentId,o.target.slot,e.type,n.index,o.parent.type):tl(n.zone,e.type,n.index),void t(n.zone,n.index+1)}Kl?.onPick(e.type)},itemFor:e=>({id:`new:${e.kind}:${"template"===e.kind?e.template.id:e.type}`,zone:"",index:-1,type:"template"===e.kind?e.template.node.type:e.type,add:e}),session:zl,siteWide:jo.addPanelRow?.(Ai),onClose:Ai,onHide:$r,readOnly:Boolean(_n)}):Yt&&Jt?
|
|
46
|
+
/* @__PURE__ */Tn(T,{panel:Jt,pick:Yt,onHide:$r}):os?os.panel({onHide:$r,notify:gr}):"media"===Ro&&Jt?/* @__PURE__ */Tn(T,{panel:Jt,pick:null,onHide:$r}):/* @__PURE__ */Mn(jn,{children:[
|
|
47
|
+
/* @__PURE__ */Tn($,{icon:/* @__PURE__ */Tn(Me,{}),title:xt.layers,context:Nt,actions:
|
|
48
|
+
/* @__PURE__ */Tn(Ue,{label:fl?xt.expandAll:xt.collapseAll,title:0===ul.length?xt.nothingToFold:void 0,disabled:0===ul.length,onClick:()=>ir(e=>{const n=new Set(ul);return fl?new Set([...e].filter(e=>!n.has(e))):/* @__PURE__ */new Set([...e,...ul])}),children:/* @__PURE__ */Tn(Rn,{expand:fl})}),onHide:$r}),
|
|
49
|
+
/* @__PURE__ */Mn(Be,{className:"sf-tree sf-scroll",words:wt,children:[
|
|
50
|
+
/* @__PURE__ */Tn(be,{words:wt,icon:/* @__PURE__ */Tn(Xo,{type:"page",size:13}),name:xt.pageSettings,onSelect:jr,selected:!lt&&vo,rowProps:{onClick:ji(jr)}}),cl&&/* @__PURE__ */Mn(jn,{children:[
|
|
51
|
+
/* @__PURE__ */Tn(Ce,{children:xt.header}),Gl(cl)]}),!Eo&&tt&&/* @__PURE__ */Mn(jn,{children:[
|
|
52
|
+
/* @__PURE__ */Tn(Ce,{children:xt.header}),!St&&/* @__PURE__ */Tn(be,{words:wt,icon:/* @__PURE__ */Tn(Xo,{type:"header",size:13}),name:xt.header,onSelect:Er,selected:ko.kind===gt?.kind,rowProps:{onClick:ji(Er)}})]}),!Eo&&dl&&ds(dl,sl,"header"),!Eo&&!rs&&/* @__PURE__ */Tn(Ce,{children:is}),rs?/* @__PURE__ */Mn(jn,{children:[
|
|
53
|
+
/* @__PURE__ */Tn(be,{words:wt,icon:null,name:is,fold:{open:!ls,label:is,onToggle:()=>ur(Hn)}}),!ls&&/* @__PURE__ */Tn(ze,{children:ss})]}):ss,tt&&/* @__PURE__ */Tn(Ce,{children:xt.footer}),ll&&ds(ll,il,"footer"),!Eo&&!ll&&tt&&/* @__PURE__ */Tn(be,{words:wt,icon:/* @__PURE__ */Tn(Xo,{type:"footer",size:13}),name:xt.footer,onSelect:Ei,rowProps:{onClick:ji(Ei),title:xt.editFooter}}),al&&Gl(al),jo.treeFoot?.()]})]})}),
|
|
54
|
+
/* @__PURE__ */Tn(Ge,{side:"left",width:lr.left,min:Xe,max:Je,defaultWidth:k.left,label:xt.resizeLeftPanel,onResize:cr})]}):/* @__PURE__ */Tn(A,{side:"left",onShow:$r}),
|
|
55
|
+
/* @__PURE__ */Mn("div",{ref:yr,className:"sf-center sf-scroll","data-sf-canvas-head":wr?"":void 0,style:{overflowX:Nr?"auto":"hidden",overflowY:"hidden"},children:[wr&&/* @__PURE__ */Tn("div",{ref:br,className:"sf-canvas-head",children:/* @__PURE__ */Tn(wr,{device:Ut})}),
|
|
56
|
+
/* @__PURE__ */Tn("div",{className:"sf-frame-scaler",style:Ir,children:/* @__PURE__ */Tn("div",{className:"sf-frame "+(Ut===Wt?"":`sf-frame--${Ut}`),style:Pr,children:/* @__PURE__ */Mn("div",{className:"sf-preview-host",children:[
|
|
57
|
+
/* @__PURE__ */Tn(It,{},no),
|
|
58
|
+
/* @__PURE__ */Tn(en,{canvas:io,session:zl,model:Tl,measure:jl,canDrop:Rl,onDrop:Vl,choose:Nl,onPick:Hl,onZoneAdd:Wl,onSeamAdd:Wl,zoneAddLabel:xt.canvasAddBlock,words:bt.canvas,readOnly:Boolean(_n),revision:ot.data}),go.length>0&&/* @__PURE__ */Tn("div",{className:"sf-preview-gaps",children:go.map(e=>
|
|
59
|
+
/* @__PURE__ */Tn(nn,{index:e.index,label:xt.addSectionHere,onInsert:()=>Pi(e.index),className:void 0===e.height?"sf-preview-gap":"sf-preview-gap sf-preview-gap--tight",style:void 0===e.height?{top:e.top}:{top:e.top,height:e.height}},e.index))})]})})})]}),Lt?/* @__PURE__ */Mn(jn,{children:[
|
|
60
|
+
/* @__PURE__ */Tn(g,{value:{selectChild:el,addChild:nl,childRowName:ci,blockRowName:hl},children:/* @__PURE__ */Tn(Pt,{mode:ko,onOpenWebsiteSettings:jo.openSettings??(()=>{}),onOpenSiteStyles:jo.openStyles,onSelectNode:Qo,onNotify:gr,onHidePanel:Ar,nodeActions:lt?se(dt,lt.type):Wn})}),
|
|
61
|
+
/* @__PURE__ */Tn(Ge,{side:"right",width:lr.right,min:Xe,max:Je,defaultWidth:k.right,label:xt.resizeSettingsPanel,onResize:ar})]}):
|
|
62
|
+
/* @__PURE__ */Tn(A,{side:"right",onShow:Ar})]}),yi.menu]})}))}export{Dn as ScreenChrome};
|
package/dist/drag/drag.css
CHANGED
|
@@ -84,50 +84,57 @@
|
|
|
84
84
|
pointer-events: none;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
/*
|
|
88
|
-
|
|
87
|
+
/* A ➕ INSERT POINT (./CanvasInsert, owner 2026-10-14): one look wherever the
|
|
88
|
+
canvas offers to add — between sections and between, before and after the
|
|
89
|
+
blocks of a box. The band only positions the chip and lets every other
|
|
90
|
+
click through; the chip is the shell's ghost IconButton on a small round
|
|
91
|
+
ground of the panel's, so it reads over any page. At rest the chip is clear
|
|
92
|
+
and still takes the pointer; hovered or focused, the chip and a 2px accent
|
|
93
|
+
line across the band show. `.es-canvas-seam` is a hook (the layer's seams). */
|
|
94
|
+
.es-canvas-insert {
|
|
89
95
|
position: absolute;
|
|
90
96
|
display: flex;
|
|
91
97
|
align-items: center;
|
|
92
98
|
justify-content: center;
|
|
93
|
-
pointer-events:
|
|
99
|
+
pointer-events: none;
|
|
94
100
|
}
|
|
95
|
-
.es-canvas-
|
|
96
|
-
content: "";
|
|
101
|
+
.es-canvas-insert-line {
|
|
97
102
|
position: absolute;
|
|
98
|
-
left:
|
|
99
|
-
right:
|
|
103
|
+
left: 0;
|
|
104
|
+
right: 0;
|
|
100
105
|
top: 50%;
|
|
101
106
|
height: 2px;
|
|
102
|
-
|
|
107
|
+
transform: translateY(-50%);
|
|
103
108
|
background: var(--es-accent);
|
|
104
|
-
border-radius: var(--radius-sm);
|
|
105
109
|
opacity: 0;
|
|
110
|
+
pointer-events: none;
|
|
106
111
|
transition: opacity 0.12s;
|
|
107
112
|
}
|
|
108
|
-
.es-canvas-
|
|
113
|
+
.es-canvas-insert.is-x .es-canvas-insert-line {
|
|
114
|
+
left: 50%;
|
|
115
|
+
right: auto;
|
|
116
|
+
top: 0;
|
|
117
|
+
bottom: 0;
|
|
118
|
+
width: 2px;
|
|
119
|
+
height: auto;
|
|
120
|
+
transform: translateX(-50%);
|
|
121
|
+
}
|
|
122
|
+
.es-canvas-insert-chip {
|
|
109
123
|
position: relative;
|
|
110
|
-
|
|
111
|
-
border: none;
|
|
124
|
+
display: inline-flex;
|
|
112
125
|
border-radius: 999px;
|
|
113
|
-
background: var(--es-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
cursor: pointer;
|
|
126
|
+
background: var(--es-panel);
|
|
127
|
+
box-shadow: var(--es-panel-shadow);
|
|
128
|
+
pointer-events: auto;
|
|
117
129
|
opacity: 0;
|
|
118
|
-
|
|
119
|
-
transition: opacity 0.12s, transform 0.12s;
|
|
130
|
+
transition: opacity 0.12s;
|
|
120
131
|
}
|
|
121
|
-
.es-canvas-
|
|
122
|
-
.es-canvas-
|
|
123
|
-
.es-canvas-
|
|
124
|
-
.es-canvas-
|
|
132
|
+
.es-canvas-insert:hover .es-canvas-insert-line,
|
|
133
|
+
.es-canvas-insert:focus-within .es-canvas-insert-line,
|
|
134
|
+
.es-canvas-insert:hover .es-canvas-insert-chip,
|
|
135
|
+
.es-canvas-insert:focus-within .es-canvas-insert-chip {
|
|
125
136
|
opacity: 1;
|
|
126
137
|
}
|
|
127
|
-
.es-canvas-seam:hover .es-canvas-seam-add,
|
|
128
|
-
.es-canvas-seam-add:focus-visible {
|
|
129
|
-
transform: scale(1);
|
|
130
|
-
}
|
|
131
138
|
|
|
132
139
|
/* An empty slot: a cell that adds a block there, and takes a drop. At rest it
|
|
133
140
|
draws NOTHING — no fill, no border, no label — so what is under it shows as
|
package/dist/drag/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { HTMLAttributes, CSSProperties, ReactNode } from 'react';
|
|
3
3
|
import { P as Place } from '../types-41704JE4.js';
|
|
4
4
|
import { D as DragSession } from '../session-DSQFmIvx.js';
|
|
5
5
|
export { a as DragHeld, c as createDragSession } from '../session-DSQFmIvx.js';
|
|
6
|
-
export { B as Box, a as CanvasDragLayer, b as CanvasDragLayerProps, C as CanvasDragModel, c as CanvasDropTarget, d as CanvasSeam, e as CanvasSource, f as CanvasZone, E as EMPTY_MEASURE, H as HANDLE_GRACE_MS, M as MeasuredCanvas, g as MeasuredNode, h as canvasTarget, i as contains, j as gapInZone, k as gapLine, m as measureCanvas, p as pickSource, s as seamsBetween,
|
|
6
|
+
export { B as Box, a as CanvasDragLayer, b as CanvasDragLayerProps, C as CanvasDragModel, c as CanvasDropTarget, d as CanvasSeam, e as CanvasSource, f as CanvasZone, E as EMPTY_MEASURE, H as HANDLE_GRACE_MS, M as MeasuredCanvas, g as MeasuredNode, h as canvasTarget, i as contains, j as gapInZone, k as gapLine, l as insertSeams, m as measureCanvas, p as pickSource, s as seamsBetween, n as sourcesAt } from '../CanvasDragLayer-CLb7j-CZ.js';
|
|
7
7
|
import { D as DragWords } from '../words-BDignMl_.js';
|
|
8
8
|
import '../watch-BTYOJpQU.js';
|
|
9
9
|
|
|
@@ -137,6 +137,37 @@ type TreeDrag<I> = {
|
|
|
137
137
|
};
|
|
138
138
|
declare function useTreeDrag<I>(options: TreeDragOptions<I>): TreeDrag<I>;
|
|
139
139
|
|
|
140
|
+
/**
|
|
141
|
+
* A ➕ INSERT POINT ON THE CANVAS (owner 2026-10-14, "two ways to add": click a
|
|
142
|
+
* ➕, pick an item, and it goes exactly there).
|
|
143
|
+
*
|
|
144
|
+
* One look for every place the canvas offers to add — between two sections,
|
|
145
|
+
* above the first, and before, between and after the blocks of a box — so the
|
|
146
|
+
* screen's section gaps and this layer's seams draw the SAME element (GG
|
|
147
|
+
* 2026-10-14, option A): the shell's ghost `IconButton` with the plus, named by
|
|
148
|
+
* the shell's `Tooltip` (harness UI-17, UI-24), the Layers seam "+"'s look. It
|
|
149
|
+
* is a real button in the tab order: with the Layers "+" removed, the canvas
|
|
150
|
+
* ➕ is how a keyboard adds.
|
|
151
|
+
*
|
|
152
|
+
* Only the chip takes the pointer; the band around it positions it and lets
|
|
153
|
+
* every other click through to the canvas. At rest the chip is clear and
|
|
154
|
+
* still hit-tests; hovered or focused, the chip and a 2px accent line across
|
|
155
|
+
* the band show. `axis: 'x'` is a gap between two things side by side: the
|
|
156
|
+
* line runs down instead of across.
|
|
157
|
+
*/
|
|
158
|
+
type CanvasInsertProps = {
|
|
159
|
+
/** What the ➕ adds, in the host's words: "Add section here", "Add block here". */
|
|
160
|
+
label: string;
|
|
161
|
+
onInsert: () => void;
|
|
162
|
+
/** Where the band sits, in the layer's own pixels. */
|
|
163
|
+
style?: CSSProperties;
|
|
164
|
+
axis?: 'x' | 'y';
|
|
165
|
+
className?: string;
|
|
166
|
+
/** For hosts and specs to find one point by its place. */
|
|
167
|
+
index?: number;
|
|
168
|
+
};
|
|
169
|
+
declare function CanvasInsert({ label, onInsert, style, axis, className, index }: CanvasInsertProps): react.JSX.Element;
|
|
170
|
+
|
|
140
171
|
/**
|
|
141
172
|
* One thing the Add list offers.
|
|
142
173
|
*
|
|
@@ -279,4 +310,4 @@ declare function frameScrollBox(doc: Document): HTMLElement | null;
|
|
|
279
310
|
*/
|
|
280
311
|
declare function startAutoScroll(box: HTMLElement, edges?: Element): () => void;
|
|
281
312
|
|
|
282
|
-
export { AUTO_SCROLL_EDGE, AUTO_SCROLL_MAX_SPEED, type AddGroup, AddPanel, type AddPanelProps, type AddTile, DragSession, DragWords, type DropRow, type DropSide, type DropSpot, type TreeDrag, type TreeDragOptions, type TreeDragRowOptions, type TreeDragRowProps, type TreeDragSeamOptions, type TreeDragSeamProps, autoScrollDelta, autoScrollSpeed, dropEffectFor, dropOnRow, frameScrollBox, gapToMoveIndex, isNoOpDrop, scrollBoxOf, scrollParent, startAutoScroll, stepGap, useTreeDrag };
|
|
313
|
+
export { AUTO_SCROLL_EDGE, AUTO_SCROLL_MAX_SPEED, type AddGroup, AddPanel, type AddPanelProps, type AddTile, CanvasInsert, type CanvasInsertProps, DragSession, DragWords, type DropRow, type DropSide, type DropSpot, type TreeDrag, type TreeDragOptions, type TreeDragRowOptions, type TreeDragRowProps, type TreeDragSeamOptions, type TreeDragSeamProps, autoScrollDelta, autoScrollSpeed, dropEffectFor, dropOnRow, frameScrollBox, gapToMoveIndex, isNoOpDrop, scrollBoxOf, scrollParent, startAutoScroll, stepGap, useTreeDrag };
|
package/dist/drag/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{AddPanel,CanvasDragLayer,EMPTY_MEASURE,HANDLE_GRACE_MS,canvasTarget,contains,gapInZone,gapLine,measureCanvas,pickSource,seamsBetween,sourcesAt}from"../chunk-
|
|
1
|
+
export{AddPanel,CanvasDragLayer,CanvasInsert,EMPTY_MEASURE,HANDLE_GRACE_MS,canvasTarget,contains,gapInZone,gapLine,insertSeams,measureCanvas,pickSource,seamsBetween,sourcesAt}from"../chunk-SSORUDHE.js";import"../chunk-O2NLQBFX.js";export{AUTO_SCROLL_EDGE,AUTO_SCROLL_MAX_SPEED,autoScrollDelta,autoScrollSpeed,createDragSession,dropEffectFor,dropOnRow,frameScrollBox,gapToMoveIndex,isNoOpDrop,scrollBoxOf,scrollParent,startAutoScroll,stepGap,useTreeDrag}from"../chunk-67GNT6PF.js";import"../chunk-AWJUYMX7.js";import"../chunk-P2VEMZH5.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";
|
package/dist/easel/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { DataInput } from '../data/index.js';
|
|
2
|
-
import { N as NodeSelection } from '../plan-
|
|
3
|
-
export { I as ItemSelector } from '../plan-
|
|
4
|
-
import { E as EaselConfig, a as EaselView, b as EaselAction, P as Permissions, c as EaselCore, d as EaselUi } from '../types-
|
|
5
|
-
export { A as AppState, e as EaselHistory, H as HistoryEntry, S as SetDataPatch } from '../types-
|
|
6
|
-
import { S as SlotAddress, D as Data, P as Place } from '../types-41704JE4.js';
|
|
2
|
+
import { N as NodeSelection } from '../plan-xc48tt77.js';
|
|
3
|
+
export { I as ItemSelector } from '../plan-xc48tt77.js';
|
|
4
|
+
import { E as EaselConfig, a as EaselView, b as EaselAction, P as Permissions, c as EaselCore, d as EaselUi } from '../types-BbkxBdG9.js';
|
|
5
|
+
export { A as AppState, e as EaselHistory, H as HistoryEntry, S as SetDataPatch } from '../types-BbkxBdG9.js';
|
|
6
|
+
import { S as SlotAddress, D as Data, P as Place, N as Node } from '../types-41704JE4.js';
|
|
7
7
|
import { c as ResolveTrigger, a as ResolveCache, R as ResolvableItem } from '../resolve-D68pb3Bx.js';
|
|
8
8
|
import * as react from 'react';
|
|
9
9
|
import { ReactNode, CSSProperties, ComponentType, ReactElement } from 'react';
|
|
10
10
|
import { TextToolbarProps } from 'efficient-shell/ui';
|
|
11
11
|
import { C as CanvasTypingEnd } from '../canvas-typing-U7TV-iax.js';
|
|
12
12
|
import { InlineRule } from '../markup/index.js';
|
|
13
|
-
import { b as NodeOpsHost, C as ClipboardEntry } from '../useNodeOps-
|
|
13
|
+
import { b as NodeOpsHost, C as ClipboardEntry } from '../useNodeOps-CTQN3wky.js';
|
|
14
14
|
import { I as InspectorFields } from '../types-OUl0mK1k.js';
|
|
15
15
|
import '../buckets-Tj-nkBpg.js';
|
|
16
16
|
|
|
@@ -461,6 +461,7 @@ declare function useEaselNodeOps(options?: Omit<NodeOpsHost, 'data' | 'config' |
|
|
|
461
461
|
copy: (id: string, label: string) => boolean;
|
|
462
462
|
cut: (id: string, label: string) => boolean;
|
|
463
463
|
paste: (at: Place) => boolean;
|
|
464
|
+
restore: (node: Node, at: Place) => boolean;
|
|
464
465
|
parentOf: (selection: NodeSelection) => NodeSelection;
|
|
465
466
|
};
|
|
466
467
|
interface SelectedFields {
|
package/dist/easel/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{CanvasFrame,DEFAULT_UI,EaselCanvas,EaselProvider,EditDocument,bindUndoKeys,createEasel,createUseEasel,recordsByDefault,reduce,uiView,useEasel,useEaselApi,useEaselNodeOps,useSelectedFields,validSelection}from"../chunk-
|
|
1
|
+
export{CanvasFrame,DEFAULT_UI,EaselCanvas,EaselProvider,EditDocument,bindUndoKeys,createEasel,createUseEasel,recordsByDefault,reduce,uiView,useEasel,useEaselApi,useEaselNodeOps,useSelectedFields,validSelection}from"../chunk-P6EIA5NH.js";import"../chunk-TBY3DFKS.js";import"../chunk-YRLPFZW3.js";import"../chunk-SOZUYCQZ.js";import"../chunk-CIHKZMNR.js";import"../chunk-546BBOPE.js";import"../chunk-MFIRYGHW.js";import"../chunk-AWJUYMX7.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";
|
package/dist/node-ops/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as AfterRemove, I as ItemSelector, N as NodeSelection, P as Planned, S as StepBounds, c as canStep, a as clickPick, f as fromItemSelector, n as nextInChain, b as nodeChain, p as parentStep, d as planDuplicate, e as planMove, g as planPaste, h as planRemove, i as
|
|
2
|
-
export { C as ClipboardEntry, N as NodeClipboard, a as NodeOps, b as NodeOpsHost, c as createNodeClipboard, u as useNodeOps } from '../useNodeOps-
|
|
1
|
+
export { A as AfterRemove, I as ItemSelector, N as NodeSelection, P as Planned, S as StepBounds, c as canStep, a as clickPick, f as fromItemSelector, n as nextInChain, b as nodeChain, p as parentStep, d as planDuplicate, e as planMove, g as planPaste, h as planRemove, i as planRestore, j as planSetProps, k as planStep, t as toItemSelector } from '../plan-xc48tt77.js';
|
|
2
|
+
export { C as ClipboardEntry, N as NodeClipboard, a as NodeOps, b as NodeOpsHost, c as createNodeClipboard, u as useNodeOps } from '../useNodeOps-CTQN3wky.js';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
import { E as EaselContextMenuItem } from '../types-BsyPh6EW.js';
|
|
5
5
|
import { N as NodeMenuWords } from '../words-DMG4dYq2.js';
|
package/dist/node-ops/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{createNodeClipboard,nodeMenuItems}from"../chunk-OSPUG6S6.js";import"../chunk-WK3AFPXY.js";export{canStep,clickPick,fromItemSelector,nextInChain,nodeChain,parentStep,planDuplicate,planMove,planPaste,planRemove,planSetProps,planStep,toItemSelector,useNodeOps}from"../chunk-
|
|
1
|
+
export{createNodeClipboard,nodeMenuItems}from"../chunk-OSPUG6S6.js";import"../chunk-WK3AFPXY.js";export{canStep,clickPick,fromItemSelector,nextInChain,nodeChain,parentStep,planDuplicate,planMove,planPaste,planRemove,planRestore,planSetProps,planStep,toItemSelector,useNodeOps}from"../chunk-SOZUYCQZ.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";
|
|
@@ -63,6 +63,15 @@ declare function planStep(data: Data, config: DataConfig, id: string, dir: -1 |
|
|
|
63
63
|
declare function planPaste(data: Data, config: DataConfig, node: Node, at: Place, options?: {
|
|
64
64
|
strip?: (node: Node) => Node;
|
|
65
65
|
}): Planned;
|
|
66
|
+
/**
|
|
67
|
+
* Put back EXACTLY what a delete took: the same node — the same ids all the way
|
|
68
|
+
* down, the same content — at the place it left, and select it (owner
|
|
69
|
+
* 2026-10-14: "delete without asking, undo instead"). Not a copy (`planPaste`
|
|
70
|
+
* gives fresh ids) and not the last history step: other edits made since stay.
|
|
71
|
+
* The place is clamped to the list as it is now, in case it shrank meanwhile.
|
|
72
|
+
* Null when a node with that id is already back (a second Undo).
|
|
73
|
+
*/
|
|
74
|
+
declare function planRestore(data: Data, config: DataConfig, node: Node, at: Place): Planned | null;
|
|
66
75
|
/** Change props on `id` (hide, rename, anything) in one step; selection unchanged. */
|
|
67
76
|
declare function planSetProps(data: Data, config: DataConfig, id: string, patch: Record<string, unknown>): Planned;
|
|
68
77
|
/**
|
|
@@ -113,4 +122,4 @@ declare function toItemSelector(data: Data, config: DataConfig, selection: NodeS
|
|
|
113
122
|
/** Puck's `itemSelector` as a node selection; `null` when it points at nothing. */
|
|
114
123
|
declare function fromItemSelector(data: Data, config: DataConfig, selector: ItemSelector | null | undefined): NodeSelection;
|
|
115
124
|
|
|
116
|
-
export { type AfterRemove as A, type ItemSelector as I, type NodeSelection as N, type Planned as P, type StepBounds as S, clickPick as a, nodeChain as b, canStep as c, planDuplicate as d, planMove as e, fromItemSelector as f, planPaste as g, planRemove as h,
|
|
125
|
+
export { type AfterRemove as A, type ItemSelector as I, type NodeSelection as N, type Planned as P, type StepBounds as S, clickPick as a, nodeChain as b, canStep as c, planDuplicate as d, planMove as e, fromItemSelector as f, planPaste as g, planRemove as h, planRestore as i, planSetProps as j, planStep as k, nextInChain as n, parentStep as p, toItemSelector as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{AddBlockRow as default}from"../../chunk-
|
|
1
|
+
export{AddBlockRow as default}from"../../chunk-6UNFME6S.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-FKXEPECH.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-5F3PKNT7.js";import"../../chunk-P6EIA5NH.js";import"../../chunk-TBY3DFKS.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-SOZUYCQZ.js";import"../../chunk-CIHKZMNR.js";import"../../chunk-66LWADFP.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-546BBOPE.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-AWJUYMX7.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{blockKey,AddSidePanel as default,sectionKey,templateKey}from"../../chunk-
|
|
1
|
+
export{blockKey,AddSidePanel as default,sectionKey,templateKey}from"../../chunk-B3PXQMFN.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-BVN33R76.js";import"../../chunk-PFNIVZPN.js";import"../../chunk-KQMML6JM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-FKXEPECH.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-5F3PKNT7.js";import"../../chunk-P6EIA5NH.js";import"../../chunk-TBY3DFKS.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-SOZUYCQZ.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-CIHKZMNR.js";import"../../chunk-66LWADFP.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-546BBOPE.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-SSORUDHE.js";import"../../chunk-O2NLQBFX.js";import"../../chunk-67GNT6PF.js";import"../../chunk-AWJUYMX7.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -2,11 +2,11 @@ import * as react from 'react';
|
|
|
2
2
|
import { MediaPanelComponent, MediaPickRequest } from '../lib/media-panel.js';
|
|
3
3
|
import '../../host-CiuzZJXj.js';
|
|
4
4
|
import '../../blocks/index.js';
|
|
5
|
-
import '../../types-
|
|
5
|
+
import '../../types-BbkxBdG9.js';
|
|
6
6
|
import '../../data/index.js';
|
|
7
7
|
import '../../types-41704JE4.js';
|
|
8
8
|
import '../../resolve-D68pb3Bx.js';
|
|
9
|
-
import '../../plan-
|
|
9
|
+
import '../../plan-xc48tt77.js';
|
|
10
10
|
import '../lib/document-contract.js';
|
|
11
11
|
import '../lib/session.js';
|
|
12
12
|
import '../lib/backend-error.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{MediaSidePanel as default}from"../../chunk-
|
|
1
|
+
export{MediaSidePanel as default}from"../../chunk-5AVEAO36.js";import"../../chunk-FKXEPECH.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-P6EIA5NH.js";import"../../chunk-TBY3DFKS.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-SOZUYCQZ.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-CIHKZMNR.js";import"../../chunk-66LWADFP.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-546BBOPE.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-AWJUYMX7.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { E as EaselContextMenuItem } from '../../types-BsyPh6EW.js';
|
|
3
3
|
import { P as Place } from '../../types-41704JE4.js';
|
|
4
|
-
import { N as NodeClipboard, C as ClipboardEntry, a as NodeOps } from '../../useNodeOps-
|
|
4
|
+
import { N as NodeClipboard, C as ClipboardEntry, a as NodeOps } from '../../useNodeOps-CTQN3wky.js';
|
|
5
5
|
import { N as NodeMenuWords } from '../../words-DMG4dYq2.js';
|
|
6
6
|
import { StyleSnapshot } from '../../style-clipboard/index.js';
|
|
7
7
|
import { S as StyleClipboardWords } from '../../words-CnnHb9jo.js';
|
|
@@ -10,11 +10,11 @@ import { C as CanvasTarget } from '../../watch-BTYOJpQU.js';
|
|
|
10
10
|
import { AddTarget } from '../lib/puck/add-target-types.js';
|
|
11
11
|
import { ScreenMenuRows } from '../lib/screen-parts.js';
|
|
12
12
|
import { EaselSession } from '../lib/session.js';
|
|
13
|
-
import '../../plan-
|
|
13
|
+
import '../../plan-xc48tt77.js';
|
|
14
14
|
import '../lib/puck/block-choice.js';
|
|
15
15
|
import '../lib/puck/slot-section-spec.js';
|
|
16
16
|
import '../../blocks/index.js';
|
|
17
|
-
import '../../types-
|
|
17
|
+
import '../../types-BbkxBdG9.js';
|
|
18
18
|
import '../../data/index.js';
|
|
19
19
|
import '../../resolve-D68pb3Bx.js';
|
|
20
20
|
import '../../types-Dt1CFR1S.js';
|
|
@@ -22,7 +22,7 @@ import '../../types-CsgMwHHa.js';
|
|
|
22
22
|
import '../../wordFit-7XpmhcaW.js';
|
|
23
23
|
import '../../edit-lock/index.js';
|
|
24
24
|
import '../../panelWidths-D9hTLR25.js';
|
|
25
|
-
import '../../CanvasDragLayer-
|
|
25
|
+
import '../../CanvasDragLayer-CLb7j-CZ.js';
|
|
26
26
|
import '../../session-DSQFmIvx.js';
|
|
27
27
|
import '../../words-BDignMl_.js';
|
|
28
28
|
import '../../types-BLRK6_JO.js';
|
|
@@ -465,6 +465,7 @@ declare function useNodeClipboard(): NodeClipboard;
|
|
|
465
465
|
declare function nodeClipboardRules(host: NodeMenuHost, node: NodeLike, zone: string): {
|
|
466
466
|
copy: boolean;
|
|
467
467
|
cut: boolean;
|
|
468
|
+
delete: boolean;
|
|
468
469
|
};
|
|
469
470
|
/**
|
|
470
471
|
* WHERE A HELD BLOCK PASTES, pointed at the node at `target` — the one
|
|
@@ -496,9 +497,9 @@ declare function pastePlace(host: NodeMenuHost, held: ClipboardEntry, target: {
|
|
|
496
497
|
index: number;
|
|
497
498
|
}): Place | null;
|
|
498
499
|
/** The three block keys. */
|
|
499
|
-
type NodeShortcut = "copy" | "cut" | "paste";
|
|
500
|
+
type NodeShortcut = "copy" | "cut" | "paste" | "delete";
|
|
500
501
|
/**
|
|
501
|
-
* ⌘C / ⌘X / ⌘V (Ctrl on Windows) — Copy, Cut and Paste of the SELECTED block,
|
|
502
|
+
* ⌘C / ⌘X / ⌘V (Ctrl on Windows) — Copy, Cut and Paste of the SELECTED block — and Delete / Backspace, which delete it (2026-10-14),
|
|
502
503
|
* the keyboard door to the menu's three rows, which print these keys beside
|
|
503
504
|
* them (0.105.0, `ScreenParts.nodeKeys`). The campaign designer's own test
|
|
504
505
|
* (admin-portal nodeShortcut), moved here with the keys.
|
|
@@ -518,7 +519,7 @@ declare function nodeShortcut(e: KeyboardEvent): NodeShortcut | null;
|
|
|
518
519
|
/** What a block key did: copied or cut the node `name`, pasted the held one,
|
|
519
520
|
* or refused to paste it. */
|
|
520
521
|
type NodeShortcutDone = {
|
|
521
|
-
done: "copied" | "cut" | "pasted" | "refused";
|
|
522
|
+
done: "copied" | "cut" | "pasted" | "refused" | "deleted";
|
|
522
523
|
name: string;
|
|
523
524
|
};
|
|
524
525
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{EASEL_NODE_CLIPBOARD,ancestorChain,nodeClipboardOf,nodeClipboardRules,nodeMenuItems,nodeShortcut,pageMenuItems,pastePlace,runNodeShortcut,textMenuItems,useNodeClipboard,useNodeContextMenu}from"../../chunk-
|
|
1
|
+
export{EASEL_NODE_CLIPBOARD,ancestorChain,nodeClipboardOf,nodeClipboardRules,nodeMenuItems,nodeShortcut,pageMenuItems,pastePlace,runNodeShortcut,textMenuItems,useNodeClipboard,useNodeContextMenu}from"../../chunk-LC62L4P2.js";import"../../chunk-V7U33NF2.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-5F3PKNT7.js";import"../../chunk-BXMXTO36.js";import"../../chunk-EA2HTX37.js";import"../../chunk-OSPUG6S6.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-SOZUYCQZ.js";import"../../chunk-AWJUYMX7.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{PageEditGuardNotices as default}from"../../chunk-
|
|
1
|
+
export{PageEditGuardNotices as default}from"../../chunk-E4MAYJX5.js";import"../../chunk-64ZRPAWS.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-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-5F3PKNT7.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-MFIRYGHW.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ScreenChrome as default}from"../../chunk-
|
|
1
|
+
export{ScreenChrome as default}from"../../chunk-YXVJAUAU.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-MVQEEWTE.js";import"../../chunk-FGNR22NY.js";import"../../chunk-ZE7I3PLX.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-6Z5VENIE.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-DDOJANIE.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-6TOYXESC.js";import"../../chunk-UMUNJM5I.js";import"../../chunk-GV3EVHZM.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-LC62L4P2.js";import"../../chunk-E4MAYJX5.js";import"../../chunk-BSPCSC45.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-64ZRPAWS.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-ERR437B5.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-V7U33NF2.js";import"../../chunk-5545A3PC.js";import"../../chunk-B3PXQMFN.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-BVN33R76.js";import"../../chunk-PFNIVZPN.js";import"../../chunk-KQMML6JM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-5AVEAO36.js";import"../../chunk-FKXEPECH.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-5F3PKNT7.js";import"../../chunk-P6EIA5NH.js";import"../../chunk-TBY3DFKS.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-SOZUYCQZ.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-CIHKZMNR.js";import"../../chunk-66LWADFP.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-546BBOPE.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-SSORUDHE.js";import"../../chunk-O2NLQBFX.js";import"../../chunk-67GNT6PF.js";import"../../chunk-AWJUYMX7.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -6,11 +6,11 @@ export { SaveStatus } from '../lib/document-switch.js';
|
|
|
6
6
|
import '../lib/admin-bridge.js';
|
|
7
7
|
import '../../edit-lock/index.js';
|
|
8
8
|
import '../../engine-DBxp_v6B.js';
|
|
9
|
-
import '../../types-
|
|
9
|
+
import '../../types-BbkxBdG9.js';
|
|
10
10
|
import '../../data/index.js';
|
|
11
11
|
import '../../types-41704JE4.js';
|
|
12
12
|
import '../../resolve-D68pb3Bx.js';
|
|
13
|
-
import '../../plan-
|
|
13
|
+
import '../../plan-xc48tt77.js';
|
|
14
14
|
import '../lib/session.js';
|
|
15
15
|
import '../lib/backend-error.js';
|
|
16
16
|
import '../lib/host-chrome.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ScreenDocumentContext,ScreenDocumentProvider,useScreenDocument}from"../../chunk-
|
|
1
|
+
export{ScreenDocumentContext,ScreenDocumentProvider,useScreenDocument}from"../../chunk-64ZRPAWS.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-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-5F3PKNT7.js";import"../../chunk-BDTITTMW.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MFIRYGHW.js";
|
|
@@ -3,11 +3,11 @@ import { ReactNode } from 'react';
|
|
|
3
3
|
import { k as AnyScreenTarget, A as AnyDocumentAddressing } from '../../host-CiuzZJXj.js';
|
|
4
4
|
import { ScreenParts } from '../lib/screen-parts.js';
|
|
5
5
|
import '../../blocks/index.js';
|
|
6
|
-
import '../../types-
|
|
6
|
+
import '../../types-BbkxBdG9.js';
|
|
7
7
|
import '../../data/index.js';
|
|
8
8
|
import '../../types-41704JE4.js';
|
|
9
9
|
import '../../resolve-D68pb3Bx.js';
|
|
10
|
-
import '../../plan-
|
|
10
|
+
import '../../plan-xc48tt77.js';
|
|
11
11
|
import '../lib/document-contract.js';
|
|
12
12
|
import '../lib/session.js';
|
|
13
13
|
import '../lib/backend-error.js';
|
|
@@ -26,7 +26,7 @@ import '../../types-Dt1CFR1S.js';
|
|
|
26
26
|
import '../../types-CsgMwHHa.js';
|
|
27
27
|
import '../../wordFit-7XpmhcaW.js';
|
|
28
28
|
import '../../panelWidths-D9hTLR25.js';
|
|
29
|
-
import '../../CanvasDragLayer-
|
|
29
|
+
import '../../CanvasDragLayer-CLb7j-CZ.js';
|
|
30
30
|
import '../../session-DSQFmIvx.js';
|
|
31
31
|
import '../../words-BDignMl_.js';
|
|
32
32
|
import '../../types-BsyPh6EW.js';
|