efficient-easel 27.1.0 → 27.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/AddSidePanel-DoCx-ZrM.d.ts +1994 -0
- package/dist/{ScreenDocumentContext-DPW_6gOC.d.ts → ScreenDocumentContext-JQr4hTeP.d.ts} +7 -5
- package/dist/{chunk-P3HXHLES.js → chunk-2Y4CAWZQ.js} +3 -3
- package/dist/{chunk-RTMDZJNE.js → chunk-3RGHXL5V.js} +1 -1
- package/dist/chunk-64NREOML.js +1 -0
- package/dist/chunk-DCBUJ36Q.js +5 -0
- package/dist/{chunk-SEC6NV6Y.js → chunk-DQSRGKSM.js} +4 -4
- package/dist/{chunk-L36E2WCO.js → chunk-HGTDDSFJ.js} +15 -15
- package/dist/{chunk-LAJYMOY3.js → chunk-I4Z75MCX.js} +1 -1
- package/dist/{chunk-QPNNWQ24.js → chunk-JI7GUM3C.js} +1 -1
- package/dist/chunk-LK56FUFT.js +1 -0
- package/dist/chunk-M5UCPD66.js +1 -0
- package/dist/{chunk-XESNAMI3.js → chunk-MMHYTIUY.js} +3 -3
- package/dist/chunk-OSF2H3LO.js +1 -0
- package/dist/{chunk-3FANFZ4D.js → chunk-PTTQWCD7.js} +1 -1
- package/dist/{chunk-WL57KM5C.js → chunk-SR2535CN.js} +17 -17
- package/dist/{chunk-SEH3Q3EL.js → chunk-XGTO4LHI.js} +1 -1
- package/dist/chunk-YCYGY54I.js +8 -0
- package/dist/chunk-ZSP4ZAQ2.js +64 -0
- package/dist/drag/index.js +1 -1
- package/dist/easel/index.js +1 -1
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.d.ts +2 -4
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/NodeContextMenu.d.ts +2 -4
- package/dist/screen/components/NodeContextMenu.js +1 -1
- package/dist/screen/components/SaveControls.d.ts +2 -4
- package/dist/screen/components/ScreenChrome.js +1 -1
- package/dist/screen/components/ScreenDocumentContext.d.ts +1 -1
- package/dist/screen/components/ScreenMount.d.ts +2 -4
- package/dist/screen/components/ScreenMount.js +1 -1
- package/dist/screen/components/ScreenStoreProvider.d.ts +2 -4
- package/dist/screen/components/ScreenStoreProvider.js +1 -1
- package/dist/screen/components/SectionScreenShell.js +17 -17
- package/dist/screen/components/usePartBridge.d.ts +2 -4
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.d.ts +2 -4
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/document/add-target-types.d.ts +37 -55
- package/dist/screen/lib/document/block-set-host.js +1 -1
- package/dist/screen/lib/document/block-size-fields.d.ts +1 -1
- package/dist/screen/lib/document/block-size-fields.js +1 -1
- package/dist/screen/lib/document/box-fields.d.ts +1 -1
- package/dist/screen/lib/document/box-fields.js +1 -1
- package/dist/screen/lib/document/button-fields.d.ts +1 -1
- package/dist/screen/lib/document/button-fields.js +1 -1
- package/dist/screen/lib/document/image-fields.d.ts +1 -1
- package/dist/screen/lib/document/image-fields.js +4 -4
- package/dist/screen/lib/document/new-child.d.ts +58 -0
- package/dist/screen/lib/document/new-child.js +1 -0
- package/dist/screen/lib/document/palette-sections.d.ts +2 -4
- package/dist/screen/lib/document/shadow-fields.d.ts +1 -1
- package/dist/screen/lib/document/shadow-fields.js +2 -2
- package/dist/screen/lib/document/slot-section-spec.d.ts +37 -96
- package/dist/screen/lib/document/style-clipboard.d.ts +2 -4
- package/dist/screen/lib/document/style-clipboard.js +1 -1
- package/dist/screen/lib/document/style-fields.d.ts +1 -1
- package/dist/screen/lib/document/style-fields.js +1 -1
- package/dist/screen/lib/document/use-section-ops.js +1 -1
- package/dist/screen/lib/document-addressing.d.ts +1 -1
- package/dist/screen/lib/host.d.ts +1 -1
- package/dist/screen/lib/key-scope.js +1 -1
- package/dist/screen/lib/media-panel.d.ts +1 -1
- package/dist/screen/lib/media-picker.d.ts +1 -1
- package/dist/screen/lib/screen-parts.d.ts +20 -1827
- package/dist/screen/lib/screen-parts.js +1 -1
- package/package.json +7 -1
- package/dist/chunk-DTEYSPJE.js +0 -64
- package/dist/chunk-GJ427TZL.js +0 -8
- package/dist/chunk-J5VPNHOW.js +0 -1
- package/dist/chunk-TUIBPB77.js +0 -5
- package/dist/chunk-WW24O7HT.js +0 -1
- package/dist/chunk-XT75WETI.js +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import{sidesStartEach as e,SidesInput as n,SidesEachToggle as t}from"./chunk-XWTQTANN.js";import{SettingsDefaultReset as l}from"./chunk-2T22IY3J.js";import{deviceField as o}from"./chunk-ZNLODQD4.js";import{noControlField as a,NoControlMark as i}from"./chunk-22I55W37.js";import{describedAs as r}from"./chunk-LX23TCTP.js";import{withStyleKind as s}from"./chunk-3OOYGEJY.js";import{foldMetaOf as u,FOLD_FIELD_MARKER as c}from"./chunk-ANPOR6EY.js";import{useSelectedHost as d,useEasel as p}from"./chunk-
|
|
2
|
-
return
|
|
3
|
-
return
|
|
4
|
-
return
|
|
5
|
-
return
|
|
6
|
-
return
|
|
7
|
-
return
|
|
8
|
-
/* @__PURE__ */
|
|
9
|
-
/* @__PURE__ */
|
|
10
|
-
return
|
|
11
|
-
return
|
|
12
|
-
return
|
|
13
|
-
return
|
|
14
|
-
return
|
|
15
|
-
return
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
return
|
|
1
|
+
import{sidesStartEach as e,SidesInput as n,SidesEachToggle as t}from"./chunk-XWTQTANN.js";import{SettingsDefaultReset as l}from"./chunk-2T22IY3J.js";import{deviceField as o}from"./chunk-ZNLODQD4.js";import{noControlField as a,NoControlMark as i}from"./chunk-22I55W37.js";import{describedAs as r}from"./chunk-LX23TCTP.js";import{withStyleKind as s}from"./chunk-3OOYGEJY.js";import{foldMetaOf as u,FOLD_FIELD_MARKER as c}from"./chunk-ANPOR6EY.js";import{useSelectedHost as d,useEasel as p}from"./chunk-HGTDDSFJ.js";import{DEFAULT_PANEL_WORDS as f}from"./chunk-56ID6FKZ.js";import{SettingsSwitch as b}from"./chunk-OECWLNKJ.js";import{phoneKey as m,tabletKey as h,viewFollows as v,isAuto as g}from"./chunk-DIOTWSCO.js";import{FieldSelect as y}from"./chunk-C63IB4VW.js";import{SettingsSegmented as w}from"./chunk-DX3VILZ3.js";import{SettingsField as k}from"./chunk-MIX7EGRG.js";import{useWords as x}from"./chunk-MFIRYGHW.js";import{useState as C}from"react";import{AlignmentIcon as j,BoxJustifyIcon as F,WrapIcon as O,ArrowRightIcon as L,GapIcon as S,WidthIcon as K,PlacementIcon as V,NudgeIcon as E,DesktopIcon as P,BoxXEndIcon as R,BoxXCenterIcon as A,BoxXStartIcon as I,PaddingAllIcon as M,BoxYBetweenIcon as T,BoxYStretchIcon as B,BoxYEndIcon as W,BoxYCenterIcon as N,BoxYStartIcon as $,BoxXBetweenIcon as G,BoxXStretchIcon as D,BoxItemAlignmentIcon as J}from"efficient-shell/icons/efficient";import{textAlignOptions as Y,AlignmentGrid as H,PositionInput as X,Slider as _}from"efficient-shell/ui";import{jsx as z,Fragment as Z,jsxs as Q}from"react/jsx-runtime";var U=e=>e;function q(e,n,t="desktop"){return e("tablet"===t?"{value} on tablet":"{value} on desktop").replace("{value}",n)}var ee=()=>{};function ne(){return null}function te(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");/* @__PURE__ */
|
|
2
|
+
return z(ne,{},e)}function le(e){return e.type===ne}function oe(e){return le(e)?void 0:e}function ae(e){for(const[n,t]of Object.entries(e))t&&"object"==typeof t&&!u(t)&&s(t,`section:${n}`);return e}function ie(e,n){return{type:"custom",[c]:{label:e,level:n},marker:!0,fold:e,render:()=>/* @__PURE__ */z(Z,{})}}function re(e){return ie(e,2)}function se(e){return ie(e,1)}var ue=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"Space between",value:"between"},{label:"End",value:"end"}],ce=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"End",value:"end"},{label:"Stretch",value:"stretch"}],de="Wrap",pe=[{label:"Wrap",value:"wrap"},{label:"No wrap",value:"nowrap"}],fe="Direction",be=[{label:"Stacked",value:"column"},{label:"One row",value:"row"}],me={min:-32,max:64,step:2,builtIn:0},he={min:30,max:100,step:5,fallback:60},ve=["top-left","top-center","top-right","left","center","right","bottom-left","bottom-center","bottom-right"],ge="bottom-left",ye={"top-left":"Top left","top-center":"Top center","top-right":"Top right",left:"Left",center:"Center",right:"Right","bottom-left":"Bottom left","bottom-center":"Bottom center","bottom-right":"Bottom right"},we=ve.map(e=>({value:e,label:ye[e]}));function ke(e,n=ge){return ve.includes(e)?e:n}var xe=40,Ce=e=>"number"==typeof e?e:null;function je(e,n,t){const l={};for(const o of["x","y"])t[o]!==n[o]&&(l[e[o]]=t[o]??void 0);return l}var Fe=["top","right","bottom","left"],Oe={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},Le=e=>"number"==typeof e?e:null;function Se(e,n,t){const l={};for(const o of Fe)t[o]!==n[o]&&(l[e[o]]=t[o]??void 0);return l}function Ke(e){if("number"==typeof e)return{top:e,right:e,bottom:e,left:e};const n=e&&"object"==typeof e?e:{};return Object.fromEntries(Fe.map(e=>[e,Le(n[e])]))}function Ve(e){const n={};for(const t of Fe)"number"==typeof e[t]&&(n[t]=e[t]);return Object.keys(n).length?n:void 0}function Ee(e,n={}){const t=n=>{const t=n[e];return t&&"object"==typeof t?t:{}},l=e=>Object.hasOwn(n,e)?n[e]:e;return{read:(e,n)=>t(e)[l(n)],write:(n,o,a)=>{const i={...t(n)};return void 0===a?delete i[l(o)]:i[l(o)]=a,{[e]:Object.keys(i).length?i:void 0}}}}function Pe(e,n,t){const l=Re(e),o=d();if(t)return[t.value,t.onChange];const a=o?.values??{};return[e.read(a,n),e=>l([[n,e]])]}function Re(e){const n=d();return t=>{n&&n.onChangeMany(n=>{let l={};for(const[o,a]of t)l={...l,...e.write({...n,...l},o,a)};return l})}}var Ae={read:(e,n)=>e[n],write:(e,n,t)=>({[n]:t})},Ie={fieldKey:m,ownField:!0,read:(e,n)=>e[m(n)],write:(e,n,t)=>({[m(n)]:t})},Me={fieldKey:h,ownField:!0,read:(e,n)=>e[h(n)],write:(e,n,t)=>({[h(n)]:t})},Te={...Ie,tablet:Me};function Be(e){return{...Ee(e),fieldKey:n=>`_${e}_${n}`}}function We({row:e,desktopKey:n,access:t,wider:l,props:o}){const a=d(),i=a?.values??{},r=l?.read(i,n),s=v(i[n],r),u=g(r)?"desktop":"tablet",[c,p]=Pe(t,n);return t.ownField?e.render({...o,follows:s,followsView:u,twinAccess:t,widerAccess:l}):e.render({...o,value:c,storedValue:c,follows:s,followsView:u,twinAccess:t,widerAccess:l,onChange:p})}function Ne(e,n,t=Ie,l={}){const a=l.phoneRow??n,i=(n,t)=>({...a,render:l=>/* @__PURE__ */z(We,{row:a,desktopKey:e,access:n,wider:t,props:l})}),r=t.tablet;return{[e]:o("desktop",n),...r?{[r.fieldKey(e)]:o("tablet",i(r))}:{},[t.fieldKey(e)]:o("mobile",i(t,r))}}var $e=["left","center","right"];function Ge(e,{options:n,value:t,onChange:l,ariaLabel:o,disabled:a=!1}){/* @__PURE__ */
|
|
3
|
+
return z(w,{options:n.map(n=>n.picture?{id:n.value,label:n.picture,title:e(n.title??n.label)}:{id:n.value,label:e(n.label),title:void 0===n.title?void 0:e(n.title)}),value:t,onChange:l,ariaLabel:e(o),disabled:a})}function De(e,{label:n,value:t,onChange:l,points:o}){const a=o.find(e=>e.disabled),i=o.map(n=>({...n,label:e(n.label),...n.title?{title:e(n.title)}:null}));/* @__PURE__ */
|
|
4
|
+
return z(k,{label:e(n),icon:/* @__PURE__ */z(V,{}),hint:a?.title?e(a.title):void 0,children:/* @__PURE__ */z(H,{label:e(n),value:t,points:i,onChange:l})})}function Je({say:e,label:n,value:t,onChange:l,pointsFor:o}){const{appState:a,selectedItem:i}=p(e=>e),r=i?.props?.id?String(i.props.id):void 0;return De(e,{label:n,value:t,onChange:l,points:o(a?.data,r)})}function Ye({say:e,o:n}){const t=d(),o=x("panel",f),a=t?.values??{},i={x:Ce(a[n.keys.x]),y:Ce(a[n.keys.y])},r=e(n.label??"Position"),s=Boolean(i.x||i.y),u=e=>{const l=je(n.keys,i,e);Object.keys(l).length&&t?.onChangeMany(l)},c=/* @__PURE__ */z(X,{label:r,value:i,onChange:u,words:{x:e("Left and right"),y:e("Up and down"),unit:"px"},placeholder:{x:"0",y:"0"},min:n.min,max:n.max,step:n.step??1}),p=/* @__PURE__ */z(l,{words:o,label:r,changed:s,detail:"0 px, 0 px",onReset:()=>u({x:null,y:null})});return null===n.label?/* @__PURE__ */Q("div",{className:"sf-position-line",children:[c,p]}):/* @__PURE__ */z(k,{label:r,icon:/* @__PURE__ */z(E,{}),changed:s,action:p,children:c})}var He={x:{start:/* @__PURE__ */z(I,{}),center:/* @__PURE__ */z(A,{}),end:/* @__PURE__ */z(R,{}),stretch:/* @__PURE__ */z(D,{}),between:/* @__PURE__ */z(G,{})},y:{start:/* @__PURE__ */z($,{}),center:/* @__PURE__ */z(N,{}),end:/* @__PURE__ */z(W,{}),stretch:/* @__PURE__ */z(B,{}),between:/* @__PURE__ */z(T,{})}},Xe=e=>"row"===e?"row":"column";function _e({say:e,kind:n,label:t,options:l,value:o,onChange:a,o:i}){const r=d(),s="justify"===n==("row"===(i.runs??Xe)(r?.values?.[i.directionKey??"direction"]))?"x":"y";return Ge(e,{options:l.map(e=>({label:e.label,value:e.value,picture:He[s][e.value]})),value:o,onChange:a,ariaLabel:t})}function ze(e,n){const t=(e.useFallback??ee)(n);return Object.fromEntries(Fe.map(n=>[n,t?.[n]??e.fallback[n]]))}function Ze({say:e,tier:n,o:t,props:l}){const o=ze(t,l),a=d(),i=a?.values??{},r="mobile"===n?t.phoneKeys:"tablet"===n?t.tabletKeys:t.keys,s=Object.fromEntries(Fe.map(e=>[e,Le(i[r[e]])])),u="desktop"===n?null:Object.fromEntries(Fe.map(e=>[e,v(Le(i[t.keys[e]]),"mobile"===n?Le(i[t.tabletKeys[e]]):null)]));/* @__PURE__ */
|
|
5
|
+
return z(Ue,{say:e,o:t,fallback:o,value:s,follows:u,followsView:"mobile"===n&&Fe.some(e=>null!==Le(i[t.tabletKeys[e]]))?"tablet":"desktop",readOnly:l.readOnly,onChange:e=>{const n=Se(r,s,e);Object.keys(n).length&&a?.onChangeMany(n)}})}function Qe({say:e,o:n,props:t}){const l=ze(n,t);/* @__PURE__ */
|
|
6
|
+
return z(Ue,{say:e,o:n,fallback:l,value:Ke(t.value),follows:"follows"in t?Ke(t.follows):null,followsView:t.followsView,readOnly:t.readOnly,onChange:e=>t.onChange(Ve(e))})}function Ue({say:o,o:a,fallback:i,value:r,follows:s,followsView:u,readOnly:c,onChange:d}){const p=Object.fromEntries(Fe.map(e=>[e,String(s?.[e]??i[e])])),[b,m]=C(()=>e(r,p)),h=x("panel",f),v=Fe.map(e=>p[e]),g=`${1===new Set(v).size?v[0]:v.join(" / ")}px`;/* @__PURE__ */
|
|
7
|
+
return z(k,{label:o(a.label),icon:a.icon??/* @__PURE__ */z(M,{}),action:/* @__PURE__ */Q(Z,{children:[
|
|
8
|
+
/* @__PURE__ */z(t,{each:b,label:o("Each side"),onChange:m,disabled:c}),
|
|
9
|
+
/* @__PURE__ */z(l,{words:h,label:o(a.label),changed:Fe.some(e=>"number"==typeof r[e]),detail:s?q(o,g,u):g,disabled:c,onReset:()=>d({top:null,right:null,bottom:null,left:null})})]}),children:/* @__PURE__ */z(n,{label:o(a.label),each:b,value:r,placeholder:p,min:a.min,max:a.max,step:a.step,readOnly:c,onChange:d,words:{sides:{top:o("Padding top"),right:o("Padding right"),bottom:o("Padding bottom"),left:o("Padding left")},vertical:o("Top and bottom"),horizontal:o("Left and right"),unit:"px"}})})}var qe=e=>""===e||"px"===e?e:` ${e}`;function en({label:e,value:n,onChange:t,min:o,max:a,step:i=1,unit:r="",hint:s,emptyLabel:u,inputMax:c,readOnly:d=!1,clears:p,detail:f,resetWords:b}){const m="number"==typeof n,h=p?/* @__PURE__ */z(l,{label:e,changed:m,detail:f??u??(void 0===s?void 0:`${s}${qe(r)}`),disabled:d,onReset:()=>t(void 0),...b?{words:b}:{}}):void 0;return{track:/* @__PURE__ */z("div",{className:"sf-slider",children:/* @__PURE__ */z(_,{min:o,max:a,step:i,value:n,suffix:r||void 0,showInput:!0,label:e,disabled:d,...p&&void 0!==s?{placeholderValue:s}:{},...u?{emptyLabel:u}:{},...void 0!==c?{inputMax:c}:{},size:"sm",boxSize:"md",className:"sf-slider-track",onChange:e=>{null===e?p&&m&&t(void 0):e!==n&&t(e)}})}),reset:h}}function nn({caption:e,label:n,value:t,hint:l,emptyLabel:o,...a}){const i=void 0!==l||void 0!==o,r="number"==typeof t,{track:s,reset:u}=en({...a,label:n,value:r?t:i?null:a.min,hint:l,emptyLabel:o,clears:i});/* @__PURE__ */
|
|
10
|
+
return z(k,{label:e??n,action:u,children:s})}function tn({draw:e,props:n,useMax:t,useHint:l}){return e(n,{max:(t??ee)(n),hint:(l??ee)(n)})}function ln(e=U){function n(n,t,l,o,a,i,s="",u){const c="function"==typeof u?{action:u}:u??{},{action:d,clear:p}=c,f=(r,u)=>{const f="storedValue"in r?r.storedValue:r.value,b="follows"in r,m=b&&!1!==p?.phoneFollows,h=b||void 0!==p,v="number"==typeof r.value,g=void 0===p?i:u.hint??("function"==typeof p.hint?p.hint(r):p.hint)??i,y=m&&"number"==typeof r.follows?r.follows:g,w=qe(s),x=!p?.emptyLabel||m&&"number"==typeof r.follows?void 0:p.emptyLabel,C=x??`${y}${w}`,j="function"==typeof c.hint?c.hint(r):c.hint,{track:F,reset:O}=en({label:e(n),value:v?r.value:h?null:i,onChange:e=>r.onChange(e),min:l,max:u.max??o,step:a,unit:s,hint:h?y:void 0,emptyLabel:x,inputMax:c.inputMax,readOnly:!0===r.readOnly,clears:h,detail:m?q(e,C,r.followsView):C});/* @__PURE__ */
|
|
11
|
+
return z(k,{label:e(n),icon:oe(t),hint:void 0===j?void 0:e(j),action:h?O:d?d(f,r.onChange):void 0,children:F})},b=c.useMax,m=p?.useHint;return{type:"custom",...r({},{type:"number",label:n}),render:b||m?e=>/* @__PURE__ */z(tn,{draw:f,props:e,useMax:b,useHint:m}):e=>f(e,{})}}function t(n){return Ge(e,n)}function s(n,o,a,i,s={}){const u=a.map(e=>"string"==typeof e?{label:e,value:e}:e);return{type:"custom",...r({},{type:"radio",label:n,options:u.map(e=>({value:e.value,label:e.label}))}),render:a=>{const{value:r,onChange:c,field:d}=a,p=u.some(e=>e.value===r),f=!0===a.readOnly;if("follows"in a&&!u.some(e=>""===e.value)){const d=s.phoneRest?s.phoneRest(a.follows):a.follows,b=u.find(e=>e.value===d)??u.find(e=>e.value===i);/* @__PURE__ */
|
|
12
|
+
return z(k,{label:e(n),icon:oe(o),action:/* @__PURE__ */z(l,{label:e(n),changed:p,detail:q(e,e(b?.label??""),a.followsView),disabled:f,onReset:()=>c(void 0)}),children:t({options:u,value:p?r:b?.value??i,onChange:c,ariaLabel:n,disabled:f})})}const b="follows"in a&&s.followsLabel?s.followsLabel(a.follows):void 0;/* @__PURE__ */
|
|
13
|
+
return z(k,{label:e(n),icon:oe(o),action:"follows"in a&&s.followsLabel?/* @__PURE__ */z(l,{label:e(n),changed:null!=r&&""!==r,detail:void 0===b?void 0:q(e,e(b),a.followsView),disabled:f,onReset:()=>c(void 0)}):void 0,children:t({options:u,value:p?r:r||d?.currentValue||i,onChange:c,ariaLabel:n,disabled:f})})}}}function u(e,n){return n.phone?e.unshift({label:"Match desktop",value:"",picture:/* @__PURE__ */z(P,{})}):n.inherit&&e.unshift({label:n.inherit,value:""}),e}function c(e,n){return n.inherit||n.phone?{...e,render:n=>e.render({...n,onChange:e=>n.onChange(""===e?void 0:e)})}:e}function d(e,n,t,l){if(l.access){const o=l.inherit?"":l.fallback??"left",a=t({...l,phone:!1}),i=e=>{const n="string"==typeof e&&""!==e&&a.some(n=>n.value===e)?e:o;return a.find(e=>e.value===n)?.label};return Ne(e,n(l,o),l.access,{phoneRow:n({...l,phone:!0},"",i)})}return{[e]:o("desktop",n(l)),[m(e)]:o("mobile",n({...l,phone:!0},""))}}function p(e){return u(Y(e.allow??$e).map(e=>({label:e.label,value:e.value,picture:e.icon})),e)}function f(e,n=e.fallback??"left",t){return c(s(e.label??"Text alignment",/* @__PURE__ */z(j,{}),p(e),n,t?{followsLabel:t}:{}),e)}function v(e){const n={left:He.x.start,center:He.x.center,right:He.x.end};return u(Y((e.allow??$e).filter(e=>e in n)).map(e=>({label:e.label,value:e.value,picture:n[e.value]})),e)}function g(e,n=e.fallback??"left",t){return c(s(e.label??"Block alignment",/* @__PURE__ */z(F,{}),v(e),n,t?{followsLabel:t}:{}),e)}function w(n,t,l,o,a,i){return{type:"custom",options:o,fallback:a,...r({},{type:"radio",label:t,options:o.map(e=>({value:e.value,label:e.label}))}),render:({value:r,onChange:s,field:u})=>{const c=u.options??o,d=u.fallback??a,p=c.some(e=>e.value===r)?r:d;/* @__PURE__ */
|
|
14
|
+
return z(k,{label:e(t),icon:oe(l),children:/* @__PURE__ */z(_e,{say:e,kind:n,label:t,options:c,value:p,onChange:s,o:i})})}}}function x(e={}){return w("justify","Justify",/* @__PURE__ */z(F,{}),ue,ue[0].value,e)}function C(e={}){return w("align","Item alignment",/* @__PURE__ */z(J,{}),ce,"stretch",e)}function V(){const n=de;return{type:"custom",options:pe,fallback:pe[1].value,...r({},{type:"radio",label:n,options:pe.map(e=>({value:e.value,label:e.label}))}),render:({value:t,onChange:l,id:o,name:a})=>{const i=`${o??a??n}-label`;/* @__PURE__ */
|
|
15
|
+
return z(k,{label:e(n),labelId:i,icon:/* @__PURE__ */z(O,{}),action:/* @__PURE__ */z(b,{checked:(r=t,!0===r||"wrap"===r),onChange:e=>l(e?pe[0].value:pe[1].value),ariaLabelledBy:i})});var r}}}function E({offered:e,fallback:n,resolve:t}){const l=t??(t=>e.some(e=>e.value===t)?t:n),o=s(fe,
|
|
16
|
+
/* @__PURE__ */z(L,{}),e.map(e=>({label:e.label,value:e.value})),l(void 0));return{type:"custom",render:e=>o.render({...e,value:l(e.value),onChange:n=>e.onChange(n)})}}function R({min:e,max:t,step:l,builtIn:o,resolve:a,action:i,mark:r}){const s=n("Gap",/* @__PURE__ */z(S,{}),e,t,l,o,"px",i),u=a??(e=>"number"==typeof e?e:o);return{...r,type:"custom",render:e=>s.render({...e,value:u(e.value,e.field),storedValue:e.value,onChange:n=>e.onChange(n)})}}function A(n,{fallback:t=ge,pointsFor:l}={}){return{type:"custom",render:({value:o,onChange:a})=>{const i=ke(o,t);return l?/* @__PURE__ */z(Je,{say:e,label:n,value:i,onChange:a,pointsFor:l}):De(e,{label:n,value:i,onChange:a,points:we})}}}function I(n){return{[n.keys.x]:{type:"custom",render:()=>/* @__PURE__ */z(Ye,{say:e,o:n})},[n.keys.y]:{...a({type:"custom",render:()=>/* @__PURE__ */z(i,{})},"always"),reachedBy:n.keys.x}}}function M(n={}){const t={...Oe,...n.keys},l={keys:t,tabletKeys:Object.fromEntries(Fe.map(e=>[e,h(t[e])])),phoneKeys:Object.fromEntries(Fe.map(e=>[e,m(t[e])])),fallback:{top:0,right:0,bottom:0,left:0,...n.fallback},useFallback:n.useFallback,label:n.label??"Padding",icon:n.icon,min:n.min??0,max:n.max??200,step:n.step??4},r=!1!==n.phone,s=!1===n.group?{}:{_gSpacing:re("Padding")};if(n.object){const t={type:"custom",render:n=>/* @__PURE__ */z(Qe,{say:e,o:l,props:n})};return ae({...s,...r?Ne(n.object.key,t,n.object.phone):{[n.object.key]:t}})}const u=r&&!0===n.tablet,c=n=>{const t={type:"custom",render:t=>/* @__PURE__ */z(Ze,{say:e,tier:n,o:l,props:t})};return r?o(n,t):t},d=()=>a({type:"custom",render:()=>/* @__PURE__ */z(i,{})},"always"),p=Fe.filter(e=>"top"!==e);return ae({...s,[l.keys.top]:c("desktop"),...u?{[l.tabletKeys.top]:c("tablet")}:{},...r?{[l.phoneKeys.top]:c("mobile")}:{},...Object.fromEntries(p.map(e=>[l.keys[e],{...d(),reachedBy:l.keys.top}])),...u?Object.fromEntries(p.map(e=>[l.tabletKeys[e],o("tablet",d())])):{},...r?Object.fromEntries(p.map(e=>[l.phoneKeys[e],o("mobile",d())])):{}})}return{slider:n,select:function(n,t,o,a,i){const{note:s,phoneRest:u}="string"==typeof i?{note:i,phoneRest:void 0}:i??{};return{type:"custom",options:o,fallback:a,...s?{note:s}:{},...r({},{type:"select",label:n}),render:i=>{const{value:r,onChange:c,field:d}=i,p=d.options??o,f=d.fallback??a,b=p.some(e=>e.value===r),m="follows"in i,h=m?u?u(i.follows):i.follows:void 0,v=m?p.find(e=>e.value===h)??p.find(e=>e.value===f):void 0,g=b?r:v?.value??f,w=!0===i.readOnly;/* @__PURE__ */
|
|
17
|
+
return z(k,{label:e(n),icon:oe(t),action:m?/* @__PURE__ */z(l,{label:e(n),changed:null!=r&&""!==r,detail:v?q(e,e(v.label),i.followsView):void 0,disabled:w,onReset:()=>c(void 0)}):void 0,children:/* @__PURE__ */z(y,{value:g,ariaLabel:e(n),readOnly:w,onChange:c,options:[...s?[{label:e(s),value:"\0note",disabled:!0}]:[],...p.map(n=>({label:e(n.label),value:n.value}))]})})}}},Segmented:t,segmented:s,boxJustifyField:x,boxAlignField:C,boxWrapField:V,directionField:E,gapField:R,placementField:A,PlacementGridView:function(n){return De(e,n)},positionFields:I,sidesPaddingFields:M,alignmentField:function(e={},n=e.fallback??"left"){return f(e,n)},alignmentFields:function(e="align",n={}){return d(e,f,p,n)},AlignmentStrip:function({opts:e={},value:n,onChange:l,ariaLabel:o,disabled:a=!1}){return t({options:p(e),value:n,onChange:l,ariaLabel:o,disabled:a})},blockAlignmentField:function(e={},n=e.fallback??"left"){return g(e,n)},blockAlignmentFields:function(e="align",n={}){return d(e,g,v,n)},BlockAlignmentStrip:function({opts:e={},value:n,onChange:l,ariaLabel:o,disabled:a=!1}){return t({options:v(e),value:n,onChange:l,ariaLabel:o,disabled:a})},boxFieldSet:function(e={}){const t=e.width??he,l=e.nudge?.limit??40,o=e.direction??{offered:be,fallback:"column"},a=o.resolve??(e=>o.offered.some(n=>n.value===e)?e:o.fallback),i={runs:e=>"row"===a(e)?"row":"column"};return{_gLayout:re("Layout"),placement:A("Placement",e.placement),width:n("Width",/* @__PURE__ */z(K,{}),t.min,t.max,t.step,t.fallback,"%"),direction:E(o),gap:R(e.gap??me),justify:x(i),align:C(i),wrap:V(),_gNudge:re("Nudge"),...I({keys:e.nudge?.keys??{x:"nudgeX",y:"nudgeY"},min:-l,max:l,label:null}),...M(e.padding)}}}}var{slider:on,select:an,Segmented:rn,segmented:sn,boxJustifyField:un,boxAlignField:cn,boxWrapField:dn,directionField:pn,gapField:fn,placementField:bn,PlacementGridView:mn,positionFields:hn,sidesPaddingFields:vn,alignmentField:gn,alignmentFields:yn,AlignmentStrip:wn,blockAlignmentField:kn,blockAlignmentFields:xn,BlockAlignmentStrip:Cn,boxFieldSet:jn}=ln();export{ye as ANCHOR_LABELS,wn as AlignmentStrip,ce as BOX_ALIGN_POINTS,be as BOX_DIRECTIONS,fe as BOX_DIRECTION_LABEL,me as BOX_GAP,ue as BOX_JUSTIFY_POINTS,xe as BOX_NUDGE_LIMIT,ve as BOX_PLACEMENTS,ge as BOX_PLACEMENT_DEFAULT,he as BOX_WIDTH,de as BOX_WRAP_LABEL,pe as BOX_WRAP_POINTS,Cn as BlockAlignmentStrip,Ae as FLAT_ACCESS,we as OPEN_PLACEMENT_POINTS,Ie as PHONE_KEY_ACCESS,mn as PlacementGridView,Oe as SIDE_PAD_KEYS,rn as Segmented,nn as SliderControl,Te as VIEW_KEY_ACCESS,gn as alignmentField,yn as alignmentFields,kn as blockAlignmentField,xn as blockAlignmentFields,cn as boxAlignField,ln as boxFieldBuilders,jn as boxFieldSet,un as boxJustifyField,dn as boxWrapField,pn as directionField,fn as gapField,re as group,oe as iconOf,le as isNoGlyph,te as noGlyph,ke as normaliseBoxPlacement,Ee as objectAccess,q as onDesktopWords,Be as phoneObjectAccess,Ne as phoneTwinFields,bn as placementField,hn as positionFields,je as positionPatch,se as section,sn as segmented,an as select,ae as sharedStyleKinds,Ke as sidesFromObject,vn as sidesPaddingFields,Se as sidesPaddingPatch,Ve as sidesToObject,on as slider,Re as useAccessPatch,Pe as useAccessValue};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{blockRuns as e,offeredChoices as s}from"./chunk-RUQOIQWI.js";import{useScreenBlockLook as t}from"./chunk-
|
|
1
|
+
import{blockRuns as e,offeredChoices as s}from"./chunk-RUQOIQWI.js";import{useScreenBlockLook as t}from"./chunk-DCBUJ36Q.js";import{DEFAULT_SCREEN_WORDS as l}from"./chunk-G2VZ4DET.js";import{useWords as r}from"./chunk-MFIRYGHW.js";import{ItemCount as n,DropdownMenu as c}from"efficient-shell/ui";import{jsxs as a,jsx as o,Fragment as i}from"react/jsx-runtime";function m({choices:m,onPick:p}){const{Icon:u}=t(),f=r("screen",l),h=e(s(m)).flatMap(e=>[...e.group?[{type:"label",key:`group:${e.group}`,label:/* @__PURE__ */a("span",{className:"flex w-full items-center gap-2",children:[
|
|
2
2
|
/* @__PURE__ */o("span",{children:e.group}),
|
|
3
3
|
/* @__PURE__ */o(n,{count:e.items.length,label:f.blockCount({count:e.items.length}),className:"ml-auto"})]})}]:[],...e.items.map(e=>({key:e.type,label:e.label,icon:/* @__PURE__ */o("span",{className:"sf-chip",children:/* @__PURE__ */o(u,{type:e.type,size:13})}),onSelect:()=>p(e.type)}))]);/* @__PURE__ */
|
|
4
4
|
return o(c,{align:"start",triggerClassName:"sf-add-card",items:h,trigger:/* @__PURE__ */a(i,{children:[
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{buildPaletteSections as e,pinnedSection as t,categoryLabel as n}from"./chunk-GDO4QJ4G.js";import{blockTypesIn as o}from"./chunk-IZGFJWH4.js";import{sectionTemplatesOf as r}from"./chunk-N7E6264U.js";import{sharedSectionsOf as l}from"./chunk-N3MJOHAG.js";import{SidePanelHead as i,PanelModeExit as s}from"./chunk-MTWQYLJE.js";import{blockRuns as c}from"./chunk-RUQOIQWI.js";import{useScreenBlockLook as a,useScreenBlockRules as p,useScreenPinned as d}from"./chunk-DCBUJ36Q.js";import{useEaselSession as m}from"./chunk-YM4UEGBV.js";import{DEFAULT_SCREEN_WORDS as f}from"./chunk-G2VZ4DET.js";import{useEasel as y}from"./chunk-HGTDDSFJ.js";import{easelMenuEntries as u}from"./chunk-FIVU2COQ.js";import{useWords as h}from"./chunk-MFIRYGHW.js";import{AddPanel as k}from"./chunk-DQSRGKSM.js";import{DEFAULT_DRAG_WORDS as g}from"./chunk-TQ5Y6S2X.js";import{useState as b,useEffect as v,useMemo as j,useRef as w}from"react";import{SharedIcon as C,AddIcon as D}from"efficient-shell/icons/efficient";import{ContextMenu as E,toast as G,Dialog as O,Button as T}from"efficient-shell/ui";import{jsx as $,jsxs as F,Fragment as I}from"react/jsx-runtime";function M({name:e,pages:t,onDelete:n,onCancel:o}){const r=h("screen",f).shared,[l,i]=b(!1),s=w(null);/* @__PURE__ */
|
|
2
|
+
return $(O,{open:!0,role:"alertdialog",size:"sm",title:r.deleteTitle({name:e}),onClose:o,initialFocus:s,footer:/* @__PURE__ */F(I,{children:[
|
|
3
|
+
/* @__PURE__ */$(T,{ref:s,variant:"secondary",onClick:o,children:r.cancel}),
|
|
4
|
+
/* @__PURE__ */$(T,{variant:"danger",loading:l,onClick:()=>{(async()=>{i(!0);try{await n()}finally{i(!1)}})()},children:r.deleteShared})]}),children:r.deleteMessage({count:t})})}var Q=e=>`section:${e}`,S=e=>`block:${e}`,x=e=>`template:${e}`,H=e=>`shared:${e}`,J=e=>`preset:${e}`;function W({at:w,placeBlocks:O,placeNames:T,canTake:W,onPick:B,itemFor:L,session:N,siteWide:U,onClose:z,onHide:A,readOnly:R}){const Y=y(e=>e.config),V=a(),{labelAtLevel:P,categoryLabel:Z,firstSection:_,Icon:K,Thumbnail:X}=V,{blockIsOffered:q,canAddTo:ee}=p(),te=h("screen",f).add,ne=h("drag",g).add,oe=m(),[re,le]=b([]);v(()=>{let e=!1;const t=e=>q(e,oe);return r(oe).list().then(n=>{if(e)return;const r=Y.components;le(n.filter(e=>e.node?.type&&r[e.node.type]&&o(e.node).every(t)))}).catch(()=>{}),()=>{e=!0}},[Y,oe]);const ie=d().shared,se=h("screen",f).shared,[ce,ae]=b([]),[pe,de]=b(0);v(()=>{if(!ie)return;let e=!1;const t=e=>q(e,oe);return l(oe).list().then(n=>{if(e)return;const r=Y.components;ae(n.filter(e=>e.node?.type&&r[e.node.type]&&o(e.node).every(t)))}).catch(()=>{}),()=>{e=!0}},[Y,oe,pe]);const[me,fe]=b(null),[ye,ue]=b(null),he=j(()=>e(Y,V),[Y]),ke=e=>P(e,"section",Y.components[e]?.label??e),ge=e=>({type:e.preset?J(e.preset.key):Q(e.type),label:e.name,cover:/* @__PURE__ */$(X,{type:e.type}),title:e.desc?`${e.name} — ${e.desc}`:te.tile({name:e.name}),keywords:[e.alias??"",e.desc,e.type,e.catLabel].filter(Boolean)}),be=e=>{const t=e.indexOf(":"),n=e.slice(0,t),o=e.slice(t+1);if("section"===n)return{kind:"section",type:o};if("block"===n)return{kind:"block",type:o};if("template"===n){const e=re.find(e=>e.id===o);return e?{kind:"template",template:e}:null}if("shared"===n){const e=ce.find(e=>e.id===o);return e?{kind:"shared",section:e}:null}if("preset"===n){const e=he.find(e=>e.preset?.key===o)?.preset;return e?{kind:"preset",preset:e}:null}return null},ve=e=>/* @__PURE__ */$("span",{className:"es-add-glyph-cover",children:/* @__PURE__ */$(K,{type:e,size:26})}),je=j(()=>{const e=t(he,_),o=/* @__PURE__ */new Map,r=e=>{e.retired||o.has(e.type)||!q(e.type,oe)||o.set(e.type,e)};for(const t of e?[e]:he.filter(e=>!e.preset)){const e=ee(t.type)?.choices??[];e.forEach(r),e.forEach(e=>ee(e.type,1)?.choices?.forEach(r))}O?.forEach(r);const l=new Set(he.filter(e=>!e.preset).map(e=>e.type)),i=[...o.values()].filter(e=>!l.has(e.type)),s=(e,t,n)=>{const o=T?.get(t);return o&&o!==n?{...e,label:o,title:te.tile({name:o}),keywords:[n,...e.keywords??[]]}:e},a=e=>s({type:S(e.type),label:e.label,cover:ve(e.type),title:te.tile({name:e.label}),keywords:[e.group??"",e.type].filter(Boolean)},e.type,e.label),p=e=>!e.preset&&o.has(e.type)?s({...ge(e),cover:ve(e.type)},e.type,e.name):ge(e),d=[];ce.length>0&&d.push({key:"shared",title:se.group,tiles:ce.map(e=>({type:H(e.id),label:e.title,cover:/* @__PURE__ */$(X,{type:e.node.type}),mark:/* @__PURE__ */$(C,{size:12}),title:se.onPages({count:e.used_on.length}),keywords:[ke(e.node.type),e.node.type]}))}),re.length>0&&d.push({key:"templates",title:te.templates,tiles:re.map(e=>({type:x(e.id),label:e.name,cover:/* @__PURE__ */$(X,{type:e.node.type}),keywords:[ke(e.node.type),e.node.type]}))});const m=i.filter(e=>!e.group);let f=!1;for(const t of Object.keys(Y.categories??{})){const o=he.filter(e=>e.cat===t);if(0===o.length)continue;const r=e&&o.some(t=>t.type===e.type)?e:null,l=(r?[r,...o.filter(e=>e.type!==r.type)]:o).map(p);r&&!f&&(l.splice(1,0,...m.map(a)),f=!0),d.push({key:`category:${t}`,title:n(Y,t,Z),tiles:l})}const y=d.find(e=>e.key?.startsWith("category:"));if(!f&&y&&m.length>0&&(y.tiles=[...y.tiles,...m.map(a)],f=!0),c(i.filter(e=>e.group||!f)).forEach((e,t)=>{d.push({key:`blocks:${t}`,title:e.group??"",tiles:e.items.map(a)})}),!W)return d;const u=d.map(e=>({...e,tiles:e.tiles.map(e=>{const t=be(e.type),n=t?W(t):null;return n?{...e,disabled:!0,disabledReason:n}:e})})),h=e=>e.tiles.some(e=>!e.disabled);return[...u.filter(h),...u.filter(e=>!h(e))]},[re,ce,se,he,Y,te,W,O,T,oe]);/* @__PURE__ */
|
|
5
|
+
return F(I,{children:[
|
|
6
|
+
/* @__PURE__ */$(i,{icon:/* @__PURE__ */$(D,{size:15}),title:te.title,context:te.contextAll,actions:/* @__PURE__ */$(s,{label:te.done,description:te.doneDescription,onClick:z}),onHide:A}),
|
|
7
|
+
/* @__PURE__ */F("div",{className:"sf-addside sf-scroll",children:[
|
|
8
|
+
/* @__PURE__ */$(k,{groups:je,session:N,itemFor:e=>L(be(e)??{kind:"section",type:e}),onInsert:B?e=>{const t=be(e);t&&B(t)}:void 0,onTileMenu:(e,t)=>{const n=be(e);return"shared"===n?.kind&&!R&&(fe({section:n.section,...t}),!0)},at:w,hint:te.hint,searchLabel:te.search,readOnly:R,words:ne}),U??null]}),me?/* @__PURE__ */$(E,{at:{x:me.x,y:me.y},owner:me.owner,onClose:()=>fe(null),"aria-label":me.section.title,items:u([{label:se.deleteShared,danger:!0,onClick:()=>{ue(me.section),fe(null)}}])}):null,ye?/* @__PURE__ */$(M,{name:ye.title,pages:ye.used_on.length,onDelete:()=>(async e=>{try{await l(oe).remove(e.id)}catch{return void G.error(se.deleteFailed)}ue(null),ie?.removed?.(e),ae(t=>t.filter(t=>t.id!==e.id)),de(e=>e+1)})(ye),onCancel:()=>ue(null)}):null]})}export{W as AddSidePanel,S as blockKey,J as presetKey,Q as sectionKey,H as sharedKey,x as templateKey};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import{markedTreeNodeId as e,revealSelectedTreeRow as n,sameSelector as t}from"./chunk-UMBNBCL4.js";import{cloneNodeWithFreshIds as o}from"./chunk-OXZDSOZV.js";import{dedupeSlotChildren as r}from"./chunk-7OCEPOEJ.js";import{styleClipboardOf as i}from"./chunk-VNUXFD4X.js";import{configNodeDefaults as l,newChildOf as s,newChildName as d}from"./chunk-64NREOML.js";import{scrollPreviewToSection as a,gotoPreviewSlide as c}from"./chunk-LUOY3A3Q.js";import{useEaselKeyTarget as p,useEaselUndoKeys as u,useEaselSaveKey as h,editorRootFocus as f}from"./chunk-3RGHXL5V.js";import{SlotChildActionsProvider as m}from"./chunk-KCBEE2MC.js";import{screenStorageKeys as g,DEFAULT_PANEL_W as y,clampPanelWidth as v}from"./chunk-TQUEVJOO.js";import{usePartBridge as b}from"./chunk-OSF2H3LO.js";import{useSectionOps as k}from"./chunk-PTTQWCD7.js";import{PageEditGuardNotices as S}from"./chunk-XV5D4V2T.js";import{ScreenSaveIcon as w,ScreenMainButton as x}from"./chunk-2EEYFRQM.js";import{useBrowserOffline as z}from"./chunk-RKTF5XLP.js";import{useScreenDocument as C}from"./chunk-OB4KI2AN.js";import{requestMediaPick as O}from"./chunk-5HYVOOH3.js";import{AddChildRow as N}from"./chunk-5545A3PC.js";import{AddSidePanel as B}from"./chunk-YCYGY54I.js";import{keepsSharedSections as I,sharedSectionsOf as P}from"./chunk-N3MJOHAG.js";import{PanelHideButton as M,SidePanelHead as $,PanelShowStrip as T}from"./chunk-MTWQYLJE.js";import{offeredChoices as j}from"./chunk-RUQOIQWI.js";import{useScreenSaveSwitch as E,useScreenNodeKeys as L,useScreenPinned as A,useScreenDocumentLabel as R,useScreenCanvasFrame as F,useScreenInspectorPanel as D,useScreenDevices as V,useScreenPickFollowsSelection as H,useScreenLeftView as W,SELECTION_MODE as Y,isSelectionMode as U,sameInspectorMode as G,useScreenBridges as J,useScreenBlockRules as X,useScreenBlockLook as Q,useScreenStorageNamespace as K,useScreenNotify as _,useScreenCanvasHead as q,isSlotMode as Z,useScreenStyleClipboard as ee,useScreenDocumentPass as ne,useScreenCanvasDrag as te,ScreenCanvasTargetProvider as oe,isPinnedFirst as re,isPinnedLast as ie,screenSlotsOf as le,shownChildSlotsOf as se}from"./chunk-DCBUJ36Q.js";import{MediaPopup as de}from"./chunk-T2RINM7R.js";import{useMediaPanel as ae,usePanelPick as ce,useMediaBrowsing as pe,useOpenMediaBrowse as ue,useMediaPlace as he}from"./chunk-NCXYC7WI.js";import{useNodeClipboard as fe,useNodeContextMenu as me}from"./chunk-M5UCPD66.js";import{useEaselSession as ge}from"./chunk-YM4UEGBV.js";import{useEaselHost as ye,useHostEscape as ve}from"./chunk-LX23TCTP.js";import{LayersIcon as be,MediaIcon as ke}from"./chunk-XFYFKITX.js";import{heldStyle as Se,styleShortcut as we}from"./chunk-3OOYGEJY.js";import{DEFAULT_SCREEN_WORDS as xe}from"./chunk-G2VZ4DET.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as ze}from"./chunk-6WY6ZXJG.js";import{rootRowName as Ce,slotChildRowName as Oe,slotChildRenameProp as Ne,sectionRenameProp as Be}from"./chunk-5NHQ452C.js";import{ROOT_ZONE as Ie,blockNodeActions as Pe,TREE_MAX_DEPTH as Me,childSlotsOf as $e,slotFieldsOf as Te,newNodeId as je,slotChildrenIn as Ee,nestsInTree as Le}from"./chunk-TCAAOYQY.js";import{useEasel as Ae,useEaselApi as Re,useSettledAction as Fe,subscribeLateWrites as De,CanvasPartsContext as Ve,partHasOwnBox as He,CanvasPassThroughContext as We,CanvasSharedContext as Ye}from"./chunk-HGTDDSFJ.js";import{TreeRow as Ue,Subtree as Ge,LayersTree as Je,TreeGroupLabel as Xe,TreeRowAction as Qe,TreeSeam as Ke}from"./chunk-WHS6Y55E.js";import{DEFAULT_TREE_WORDS as _e}from"./chunk-K56YDHYQ.js";import{DEFAULT_NODE_MENU_WORDS as qe}from"./chunk-WK3AFPXY.js";import{toItemSelector as Ze,useNodeOps as en,clickPick as nn}from"./chunk-TF6NAIV7.js";import{EaselTopBar as tn,EaselIconButton as on,TopBarCluster as rn,DeviceSwitch as ln,InspectorIconButton as sn,PanelResizeHandle as dn,MAX_PANEL_W as an,MIN_PANEL_W_BY_SIDE as cn,panelWidthVars as pn}from"./chunk-VTY7OQB5.js";import{DEFAULT_NOTICE_WORDS as un,DEFAULT_CHROME_WORDS as hn}from"./chunk-AJSDWWJW.js";import{holderOf as fn,nameOrSomeone as mn}from"./chunk-G7J6SGMF.js";import{DEFAULT_LOCK_WORDS as gn}from"./chunk-RE4LP46F.js";import{useWords as yn}from"./chunk-MFIRYGHW.js";import{insertSeams as vn,CanvasDragLayer as bn,CanvasInsert as kn}from"./chunk-DQSRGKSM.js";import{DEFAULT_DRAG_WORDS as Sn}from"./chunk-TQ5Y6S2X.js";import{createDragSession as wn,useTreeDrag as xn,gapToMoveIndex as zn}from"./chunk-QEEW4X64.js";import{useCanvasFrame as Cn,LIST_SELECTOR as On,BLOCK_SELECTOR as Nn,useCanvasTyping as Bn,useCanvasEvent as In,onMotionEnd as Pn}from"./chunk-6GJEOER4.js";import{nodeIdAt as Mn,frameRectToHost as $n,BLOCK_ATTRIBUTE as Tn,drawnBox as jn}from"./chunk-FR7EEKFF.js";import{queryMainCopy as En}from"./chunk-7UFKEX72.js";import{ROOT_ID as Ln,ROOT_SLOT as An,zoneKey as Rn,parseZoneKey as Fn,find as Dn,DataError as Vn}from"./chunk-YDTEYXQW.js";import{useRef as Hn,useMemo as Wn,useState as Yn,useEffect as Un,useCallback as Gn,useLayoutEffect as Jn,useContext as Xn,Fragment as Qn,useId as Kn}from"react";import{ColoredBadge as _n,Button as qn,Tabs as Zn,toast as et,readMediaFileDrag as nt,Tooltip as tt,groupColors as ot,Dialog as rt,FormField as it,Input as lt,MEDIA_FILE_DRAG_TYPE as st}from"efficient-shell/ui";import{UndoIcon as dt,RedoIcon as at,RefreshIcon as ct,AddIcon as pt,TrashIcon as ut,EyeOffIcon as ht,EyeIcon as ft,SharedIcon as mt,DuplicateIcon as gt}from"efficient-shell/icons/efficient";import{jsx as yt,jsxs as vt,Fragment as bt}from"react/jsx-runtime";var kt="media-file";function St({name:e,onMake:n,onCancel:t}){const o=yn("screen",xe).shared,[r,i]=Yn(e),[l,s]=Yn(!1),d=Kn(),a=Hn(null),c=async()=>{const e=r.trim();if(e&&!l){s(!0);try{await n(e)}finally{s(!1)}}};/* @__PURE__ */
|
|
2
|
+
return yt(rt,{open:!0,size:"sm",title:o.makeShared,description:o.makeSharedHint,onClose:t,initialFocus:a,footer:/* @__PURE__ */vt(bt,{children:[
|
|
3
|
+
/* @__PURE__ */yt(qn,{variant:"secondary",onClick:t,children:o.cancel}),
|
|
4
|
+
/* @__PURE__ */yt(qn,{variant:"primary",loading:l,disabled:!r.trim(),onClick:()=>{c()},children:o.makeShared})]}),children:/* @__PURE__ */yt("form",{onSubmit:e=>{e.preventDefault(),c()},children:/* @__PURE__ */yt(it,{label:o.name,htmlFor:d,children:/* @__PURE__ */yt(lt,{id:d,ref:a,value:r,onChange:e=>i(e.target.value)})})})})}var wt=/* @__PURE__ */new WeakSet;function xt(e,n,t){const o=Dn(e,n,t);if(!o)return null;const r=o.path.find(e=>"root"!==e.parentId);return r?r.parentId:t}function zt(e,n,t){const o=o=>o>=t.left&&o+e.width<=t.left+t.width&&n.every(n=>n.right<=o||n.left>=o+e.width||n.bottom<=e.top||n.top>=e.top+e.height);if(n.every(n=>n.right<=e.left||n.left>=e.left+e.width||n.bottom<=e.top||n.top>=e.top+e.height))return e.left;const r=n.map(e=>e.right+4).filter(n=>n>e.left&&o(n));if(r.length)return Math.min(...r);const i=n.map(n=>n.left-4-e.width).filter(n=>n<e.left&&o(n));return i.length?Math.max(...i):e.left}function Ct({canvas:e,tabs:n,onSelect:t,onPointer:o}){const r=Hn(null),[i,l]=Yn({}),s=Hn({id:null,places:{},measure:null});s.current.places=i;const d=!(null===s.current.id||n.some(e=>e.id===s.current.id)&&i[s.current.id]);Un(()=>{d&&(s.current.id=null,o(null))},[d,o]),Un(()=>()=>{null!==s.current.id&&o(null)},[o]);const a=n.map(e=>`${e.id}:${e.below?1:0}:${e.label}:${e.reach??""}`).join("|");return Jn(()=>{const t=e?.document,o=e?.window,i=e?.frame;if(!t||!o||!i||0===n.length)return void l(e=>0===Object.keys(e).length?e:{});let d=0;const a=()=>{d=0;const e=r.current;if(!e)return;const a=$n(i,{left:0,top:0,width:o.innerWidth,height:o.innerHeight},e),p={};let u=!1;const h=e.getBoundingClientRect(),f=[...e.parentElement?.querySelectorAll(".es-canvas-handle.is-shown:not(.is-dragging), .es-canvas-tag, .es-canvas-hint")??[]].map(e=>{const n=e.getBoundingClientRect();return{left:n.left-h.left,top:n.top-h.top,right:n.right-h.left,bottom:n.bottom-h.top}});for(const r of n){const n=o.CSS?.escape?o.CSS.escape(r.id):JSON.stringify(r.id).slice(1,-1),l=En(t,`[${Tn}="${n}"]`),d=l?jn(l):null;if(!d||0===d.height){p[r.id]=null;continue}const c=$n(i,{left:d.left,top:d.top,width:d.width,height:d.height},e),h=c.top+c.height;if(h<a.top||c.top>a.top+a.height){p[r.id]=null;continue}const m=r.below?h+4:Math.max(c.top,a.top)+6,g=e.querySelector(`[data-band-tab="${n}"]`);g||(u=!0);const y=Math.max(c.left,a.left)+6,v=g?.offsetHeight??0,b=g?.offsetWidth??0,k=s.current.id===r.id?s.current.places[r.id]:null,S=k?k.left:zt({left:y,top:m,width:b,height:v},f,a);b>0&&v>0&&f.push({left:S,top:m,right:S+b,bottom:m+v}),p[r.id]={left:S,top:m}}l(e=>function(e,n){const t=Object.keys(e);return t.length===Object.keys(n).length&&t.every(t=>{const o=e[t],r=n[t];return o===r||!!o&&!!r&&o.left===r.left&&o.top===r.top})}(e,p)?e:p),u&&c()},c=()=>{d||(d=o.requestAnimationFrame(a))};s.current.measure=c,a(),o.addEventListener("scroll",c,!0),o.addEventListener("resize",c);const p=Pn(o,c),u=new o.MutationObserver(c);u.observe(t.body,{childList:!0,subtree:!0,attributes:!0});const h=r.current?.parentElement,f=h?.ownerDocument.defaultView?.MutationObserver,m=f?new f(c):null;return h&&m?.observe(h,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class","style"]}),()=>{d&&o.cancelAnimationFrame(d),o.removeEventListener("scroll",c,!0),o.removeEventListener("resize",c),p(),u.disconnect(),m?.disconnect(),s.current.measure=null}},[e,a]),/* @__PURE__ */yt("div",{ref:r,className:"es-band-tabs","aria-hidden":"true",children:n.map(e=>{const n=i[e.id];return n?/* @__PURE__ */yt("span",{className:"es-band-tab","data-band-tab":e.id,style:{left:n.left,top:n.top},onMouseEnter:()=>{s.current.id=e.id,o(e.id)},onMouseLeave:()=>{s.current.id=null,o(null),s.current.measure?.()},onClick:n=>{n.stopPropagation(),t(e.id)},children:e.reach?
|
|
5
|
+
/* @__PURE__ */yt(tt,{content:e.reach,children:/* @__PURE__ */vt(_n,{colorClass:ot("success","solid"),size:"sm",children:[
|
|
6
|
+
/* @__PURE__ */yt("span",{className:"es-band-tab-mark",children:/* @__PURE__ */yt(mt,{size:12})}),e.label]})}):/* @__PURE__ */yt(_n,{colorClass:ot("info","solid"),size:"sm",children:e.label})},e.id):null})})}function Ot({expand:e}){/* @__PURE__ */
|
|
7
|
+
return yt("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.9,strokeLinecap:"round",strokeLinejoin:"round",children:/* @__PURE__ */vt(bt,e?{children:[
|
|
8
|
+
/* @__PURE__ */yt("path",{d:"M8 9l4-4 4 4"}),
|
|
9
|
+
/* @__PURE__ */yt("path",{d:"M8 15l4 4 4-4"})]}:{children:[
|
|
10
|
+
/* @__PURE__ */yt("path",{d:"M8 4l4 4 4-4"}),
|
|
11
|
+
/* @__PURE__ */yt("path",{d:"M8 20l4-4 4 4"}),
|
|
12
|
+
/* @__PURE__ */yt("path",{d:"M5 12h14"})]})})}var Nt=`${On}, ${Nn}`;function Bt(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 It="__rungs",Pt=e=>"template"===e.kind?e.template.id:"shared"===e.kind?e.section.id:"preset"===e.kind?e.preset.key:e.type;var Mt="screen:band",$t={duplicate:!0,delete:!0},Tt=()=>null;function jt(){const On=ye(),$n=On.panels?.Toolbar,Tn=(On.panels?.useRight??Tt)(),{target:jn,docId:Kn,capabilities:tt,currentSlug:ot,siteId:rt,onPublish:it,saveState:lt,saveConflict:mt,retrySave:zt,toggleAutoSave:jt,flushSave:Et,access:Lt,saveUnreachable:At=!1,readOnly:Rt,readOnlyReason:Ft=null}=C(),Dt=E(),Vt=L(),{mediaEditing:Ht,hasEditGuard:Wt,hasPinnedChrome:Yt}=tt,{appState:Ut,dispatch:Gt,history:Jt,selectedItem:Xt,getSelectorForId:Qt,config:Kt}=Ae(e=>e),_t=A(),{first:qt,firstGroup:Zt,lastGroup:eo,isSectionGroup:no,sectionGroupZone:to,panelOf:oo}=_t,ro=oo(qt),io=e=>re(_t,e),lo=e=>ie(_t,e),so="node"===_t.firstRow,ao=_t.band??null,co=yn("screen",xe),po=yn("tree",_e),uo=yn("drag",Sn),ho=yn("notice",un),fo=yn("lock",gn),mo=yn("menu",qe),go=yn("styleClipboard",ze),yo=yn("chrome",hn),vo=R()??`/${ot}`,bo=F(),ko=D(),So=k({readOnly:Rt}),wo=k({readOnly:Rt,foldIntoHistory:!0}),xo=Hn(null),zo=Re(),Co=Wn(()=>({...So,select:e=>{xo.current=e,So.select(e)},commitDocument:(e,n)=>{if(void 0!==n){const t=zo.config;xo.current=Ze(e,t,n)}So.commitDocument(e,n)}}),[So,zo]),Oo=Ut.ui,No=Oo.leftSideBarVisible,Bo=Oo.rightSideBarVisible,{options:Io,widths:Po,initial:Mo,fluid:$o,fit:To}=V(),[jo,Eo]=Yn(Mo),Lo=ae(),Ao=Ht&&null!==Lo;ce(),pe();const Ro=ue();H(Xt?.props.id);const{read:Fo,write:Do,forSelection:Vo}=W(),[Ho,Wo]=Yn(Fo);Un(()=>{Do(Ho)},[Ho]);const[Yo,Uo]=Yn(0),Go=Hn(null),Jo=Hn(null),Xo=Cn(Jo,{readySelector:Nt}),Qo=Bn(Xo),Ko=p(Jo);u(Jo,Xo);const _o=z(),qo=fn(Lt),Zo={state:lt,offline:_o||lt.failed&&At,readOnlyReason:Ft,editing:qo?ho.editing({name:mn(qo.name,fo),noun:co.noun}):null,conflict:null!=mt,notSaving:co.bar.notSaving},er=Fe({onPress:()=>{Rt||(lt.failed?zt():Et())}}).onPress;h(Jo,Xo,er);const[nr,tr]=Yn(!1),or=Hn(!1),[rr,ir]=Yn(null),[lr,sr]=Yn([]),[dr,ar]=Yn(Y);U(dr);const cr=e(dr,Xt?.props.id),[pr,ur]=Yn(null);Un(()=>{pr&&(n(),ur(null))},[pr]);const hr=Hn(Qt);hr.current=Qt;const fr=Gn((e,{scroll:n})=>{Wo(n=>Vo(e,n)),n&&ur(e);const t=[];let o=e;for(let e=0;e<4;e++){const e=hr.current(o)?.zone;if(!e||!e.includes(":"))break;const n=e.split(":")[0];t.push(n),t.push(e),o=n}0!==t.length&&Yr(e=>{if(t.every(n=>!e.has(n)))return e;const n=new Set(e);return t.forEach(e=>n.delete(e)),n})},[]),mr=Hn(null);Un(()=>{const e=mr.current;mr.current=null;const n=null==Xt?.props.id?null:String(Xt.props.id);ar(t=>e&&e.id===n?e.mode:"part"===t.kind&&"nodeId"in t&&t.nodeId===n?t:oo(Xt?.type)??Y);const o=Xt?.props.id,r=xo.current;if(xo.current=null,!o)return;const i=Qt(o);fr(String(o),{scroll:!t(r,i??null,Ie)})},[Xt?.props.id,fr]);const gr=Gn(e=>{ar(n=>G(n,e)?n:e),Gt({type:"setUi",ui:{rightSideBarVisible:!0}})},[Gt]),yr=Hn(()=>{});yr.current=(e,n)=>{const t=e?Hi(e.zone??Ie)[e.index]?.props.id:null,o=null==t?null:String(t),r=null==Xt?.props.id?null:String(Xt.props.id);ar(e=>G(e,n)?e:n),o!==r&&(mr.current={id:o,mode:n},Co.select(e))};const vr=Gn((e,n)=>yr.current(e,n),[]),br={kind:dr.kind,mode:dr,open:gr,show:e=>ar(e),reveal:()=>{Bo||Gt({type:"setUi",ui:{rightSideBarVisible:!0}})},select:vr},kr=J(br,{data:Ut.data,selected:Xt??null,zoneOf:e=>Qt(e)?.zone,readOnly:Boolean(Rt),select:e=>{ar(Y),Co.select({index:e})},replace:(e,n)=>Co.replaceComponent(Ie,e,n),scrollTo:e=>a(e)},{device:jo,refreshes:Yo},{setView:Wo,reveal:()=>{No||Gt({type:"setUi",ui:{leftSideBarVisible:!0}})}}),Sr=kr.resolveLeftView?kr.resolveLeftView(Ho):"sections",wr=X(),{isLockedBlock:xr,duplicateBlocked:zr,nestDepth:Cr,newSectionNode:Or,canAddTo:Nr,blockIsOffered:Br}=wr,Ir=e=>({id:String(e.props.id??""),data:Ut?.data}),Pr=Q(),{labelAtLevel:Mr,Icon:$r,useProducts:Tr}=Pr,jr=Pr.rowName?(e,n,t)=>Pr.rowName(e,n,t):void 0,Er=Gn(e=>{Gt({type:"setUi",ui:{rightSideBarVisible:!0}}),a(e),fr(e,{scroll:!0})},[Gt,fr]),{selectNode:Lr,openPartId:Ar}=b({mode:dr,setMode:ar,onOpenPart:Er}),[Rr,Fr]=Yn(null);ve(null!==Rr,()=>Fr(null));const Dr=g(K()),Vr=Dr.collapsed,Hr=Dr.panelWidths,[Wr,Yr]=Yn(()=>{if("undefined"==typeof window)/* @__PURE__ */return new Set;try{const e=window.localStorage.getItem(Vr);return new Set(e?JSON.parse(e):[])}catch{/* @__PURE__ */
|
|
13
|
+
return new Set}});Un(()=>{try{window.localStorage.setItem(Vr,JSON.stringify([...Wr]))}catch{}},[Wr]);const[Ur,Gr]=Yn(()=>{if("undefined"==typeof window)return{...y};try{const e=window.localStorage.getItem(Hr);if(!e)return{...y};const n=JSON.parse(e);return{left:v(Number(n.left)||y.left,"left"),right:v(Number(n.right)||y.right,"right")}}catch{return{...y}}});Un(()=>{const e=setTimeout(()=>{try{window.localStorage.setItem(Hr,JSON.stringify(Ur))}catch{}},300);return()=>clearTimeout(e)},[Ur]);const Jr=Gn((e,n)=>Gr(t=>{const o="function"==typeof n?n(t[e]):n;return t[e]===o?t:{...t,[e]:o}}),[]),Xr=Gn(e=>Jr("left",e),[Jr]),Qr=Gn(e=>Jr("right",e),[Jr]),Kr=e=>Wr.has(e),_r=e=>Yr(n=>{const t=new Set(n);return t.has(e)?t.delete(e):t.add(e),t}),qr=Hn(!1),Zr=Hn(null);Un(()=>{if(qr.current&&!nr){const e=Zr.current,n=e&&e.isConnected&&!e.closest('[aria-hidden="true"]')?e:null;(n??Jo.current?.querySelector(`button[aria-label="${CSS.escape(co.add.title)}"]`))?.focus(),Zr.current=null}qr.current=nr},[nr]),Un(()=>{if(!nr||!Ko)return;const e=e=>{"Escape"===e.key&&Sl()};return Ko.addEventListener("keydown",e),()=>Ko.removeEventListener("keydown",e)},[nr,Ko]),ve(nr,()=>Sl()),Un(()=>{!No&&nr&&(tr(!1),ir(null),or.current=!1)},[No]);const ei=_(),ni=(e,n="success",t)=>{if(ei)return void(t?ei(e,"error"===n?"error":"info",t):ei(e,"error"===n?"error":"info"));const o={sound:!1,action:t?.action,onClose:t?.onClose};"error"===n?et.error(e,{...o,duration:t?.duration??3200}):et.success(e,{...o,duration:t?.duration??1900})},ti=Fe(kr.mainAction??{label:co.done,onPress:()=>{it(zo.getState().appState.data)}}),oi=Hn(ni);oi.current=ni,Un(()=>De(zo,()=>oi.current(co.writeLate,"error")),[zo,co]);const ri=Hn(null),[ii,li]=Yn(0),[si,di]=Yn(0),ai=q(),ci=Hn(null),pi=e=>Math.max(0,e.clientHeight-(ci.current?.offsetHeight??0));Un(()=>{const e=ri.current;if(!e)return;const n=()=>{li(e.clientWidth),di(pi(e))};n();const t=new ResizeObserver(n);return t.observe(e),ci.current&&t.observe(ci.current),()=>t.disconnect()},[]),Jn(()=>{ri.current&&(li(ri.current.clientWidth),di(pi(ri.current)))},[Ur,No,Bo]);const ui=jo===$o?ii>0?ii:Po[$o]:Po[jo],hi=ii>0?Math.min(ii/ui,"shrink"===To?1:2):1,fi=ui*hi,mi=ii>0&&fi>ii+1,gi={width:fi,height:si||"100%",flex:"none",position:"relative"},yi={width:ui,height:si?si/hi:"100%",maxHeight:"none",transform:1!==hi?`scale(${hi})`:void 0,transformOrigin:"top left"},vi=()=>Gt({type:"setUi",ui:{leftSideBarVisible:!No}}),bi=()=>Gt({type:"setUi",ui:{rightSideBarVisible:!Bo}}),ki=e=>{nr&&(tr(!1),ir(null),or.current=!1,No&&Ho===e)||(Wo(e),No||Gt({type:"setUi",ui:{leftSideBarVisible:!0}}))},Si=()=>{ar(ro??Y),Bo||Gt({type:"setUi",ui:{rightSideBarVisible:!0}})},wi=Ut.data.content??[],xi=()=>{const e=wi.findIndex(io),n=wi.findIndex(lo);return{floor:e>=0?e+1:0,cap:n>=0?n:wi.length}},zi=Kt,Ci=wr.stripCopy,Oi=e=>o(e,Ci),Ni=fe(),Bi=en({data:Ut.data,config:zi,readOnly:Boolean(Rt),clipboard:Ni,strip:Ci?e=>Ci(e):void 0,afterRemove:"none",stepBounds:(e,n)=>{if(e.parentId!==Ln||e.slot!==An)return{min:0,max:n-1};const{floor:t,cap:o}=xi();return{min:t,max:o-1}},commit:(e,{select:n})=>{void 0!==n&&ar(Y);const t=void 0===n||"node"===n?.kind?n:null;Co.commitDocument(e,t)}}),Ii=ge(),[Pi,Mi]=Yn(null),$i=e=>{const n=wi.find(n=>String(n.props.id)===e),t=_t.shared;n&&t&&Bi.swap(e,t.detach(n))},Ti=e=>{const n=Dn(Ut.data,Kt,e);if(!n)return!1;const t=Rn(n.place),o=n.node,r=t===Ie?Fi(o):el(o),i=t===Ie?_t.shared?.usedOn(o):null;return!!Bi.remove(e)&&(ni(i?co.shared.removed({count:Math.max(0,i.length-1)}):co.deleted({name:r}),"success",{duration:8e3,action:{label:co.bar.undo,onClick:()=>{Bi.restore(n.node,n.place)}}}),!0)},ji={...Bi,remove:Ti},Ei=e=>Mr(e,"block",Kt.components[e]?.label??e),Li=Wn(()=>l(Kt),[Kt]),Ai=e=>Mr(e,"section",Ei(e)),Ri={nodeDefaults:Li,newNodeId:je,sectionLabel:Ai,blockIsOffered:Br},Fi=e=>Ce({type:e.type,props:e.props??{}},Ai(e.type),jr),{nodeAddresses:Di,zoneItems:Vi}=Wn(()=>{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>=Me)return;const s=/* @__PURE__ */new Map;for(const{child:e,zone:t}of $e(Kt,n))s.set(t,[...s.get(t)??[],e]);for(const[e,n]of s)t(n,e,i+1)})};return t(wi,Ie,0),{nodeAddresses:e,zoneItems:n}},[wi,Kt]),Hi=Gn(e=>Vi.get(e)??[],[Vi]),Wi=e=>{const n=Di.get(e);return n?Hi(n.zone)[n.index]:void 0},Yi=e=>le(wr,Kt,e),Ui=e=>{if(!wr.slotsOf||e===Ie)return null;const n=e.lastIndexOf(":");if(n<=0)return null;const t=Wi(e.slice(0,n));if(!t)return null;const o=Yi(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}},Gi=(()=>{if(!Z(dr))return null;const e=`${dr.nodeId}:${dr.slot}`;return Ui(e)?.slot.panel===dr.kind?e:null})(),Ji=Hn(null);Un(()=>{const e=Ji.current;if(Ji.current=null,!Gi||!Z(dr))return;const n=dr.nodeId;fr(n,{scroll:e!==Gi}),Yr(e=>{if(!e.has(n))return e;const t=new Set(e);return t.delete(n),t})},[dr]);const Xi=e=>{const n=Di.get(e);n&&(n.zone===Ie?fl(n.index):Vl(n.zone,n.index,e,Wi(n.zone.slice(0,n.zone.lastIndexOf(":")))?.type??""))},Qi=(e,n,t)=>{const o=String(e.props.id);if(!n.panel)return void Xi(o);const r={kind:n.panel,nodeId:o,slot:n.slot},i=`${o}:${n.slot}`;t&&Gi!==i&&(Ji.current=i),vr(null,r),Bo||Gt({type:"setUi",ui:{rightSideBarVisible:!0}}),a(o)},Ki=(e,n,t)=>{const o=`${e}:${n}`;if(Yr(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;Gi!==o&&(Ji.current=o);vr(null,{kind:t,nodeId:e,slot:n})},_i=(e,n,t)=>{if(Rt||!wr.moveSlot)return;const o=Wi(e),r=o?Yi(o).filter(e=>e.rung):[],i=r[n];if(!i)return;const l={parentId:e,slot:It,index:n},s=zn(l,{...l,index:Math.min(Math.max(t,0),r.length)});if(s===n)return;const d=wr.moveSlot(e,n,s);"string"==typeof d&&Ki(e,d,i.panel)},qi=Tr(),Zi=Wn(()=>{const e=/* @__PURE__ */new Map;for(const n of qi??[])e.set(n.slug,n.name);return e},[qi]),el=e=>Oe(e,Ei,Pr.plainText,e=>Zi.get(e),Pr.rowName),nl=(e,n)=>{const t=Kt.components[e.type]?.fields,o=n===Ie||hs(n)?"section":"block",r=n===Ie&&(io(e)||lo(e)||no(e.type)),i="block"===o?Ne(t):r?null:Be(t);return Pr.renamePropOf?Pr.renamePropOf(e,o,i):i},tl=(e,n,t,o)=>{if(!(!Rt&&Rr?.zone===e&&Rr.index===n))return;const r=(t,o)=>{Fr(null),o&&((e,n,t)=>{const o=Hi(e)[n];if(!o)return;const r=nl(o,e);r&&Co.replaceComponent(e,n,{...o,props:{...o.props,[r]:t.trim()}})})(e,n,t)};/* @__PURE__ */
|
|
14
|
+
return yt("input",{className:"es-tree-rename",defaultValue:o,autoFocus:!0,"aria-label":co.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)},ol=i(ee(),go),rl=ol.scope({target:jn,siteId:rt,docId:Kn}),il=Kt,ll=(e,n)=>n===Ie?Ai(e):Ei(e),sl=(e,n,t)=>{const o=ol.plan(rl,t,ll(t.type,e),il);o&&(o.changed&&Co.replaceComponent(e,n,{...t,props:{...o.props,id:t.props.id}}),ni(o.message))},dl=me({nodesIn:Hi,nodeAt:(e,n)=>Hi(e)[n]??null,labelOf:(e,n)=>n===Ie?Ai(e):Ei(e),renamePropOf:nl,beginRename:(e,n)=>Fr({zone:e,index:n}),history:{hasPast:Jt.hasPast,hasFuture:Jt.hasFuture,back:()=>Jt.back(),forward:()=>Jt.forward()},openPageStyles:kr.openPageStyles,pageStylesLabel:co.pageStyles,words:{menu:mo,styleClipboard:go,screen:co.menu},readOnly:Boolean(Rt),collapseAll:()=>Yr(new Set(Hi(Ie).map(e=>String(e.props.id)))),onPasteRefused:e=>ni(e?co.pasteRefused({name:e.label}):co.menu.clipboardRefused,"error"),canPasteAt:(e,n)=>gs(e,n),copyItem:kr.onCopyItem,menuRows:(e,n,t)=>{const o=kr.menuRows?.(e,n,t)??null,r=((e,n)=>{const t=_t.shared;if(!t||n!==Ie)return null;const o=t.usedOn(e);if(o){const n={pick:[{label:co.shared.onPages({count:o.length}),onClick:()=>{},children:o.map(e=>({label:e.title,onClick:()=>t.openPage(e)}))}]};return Rt||xr(e.type,e)?n:{...n,change:[{label:co.shared.detach,onClick:()=>$i(e.props.id)}],remove:[{label:co.shared.removeFromPage,danger:!0,onClick:()=>{Ti(e.props.id)}}]}}return Rt||io(e)||lo(e)||no(e.type)?null:I(Ii)?{change:[{label:co.shared.makeShared,onClick:()=>Mi({id:e.props.id,name:Fi(e)})}]}:null})(e,n);if(!r)return o;return Object.fromEntries(["pick","make","change","remove"].map(e=>[e,[...o?.[e]??[],...r[e]??[]]]).filter(([,e])=>e.length>0))},isLocked:e=>xr(e.type,e),duplicateBlocked:e=>zr(Ut.data,e),permits:e=>{const n=Pe(Kt,e.type);return _t.shared?.usedOn(e)?{...n,delete:!1}:n},nodeOps:ji,isPinned:(e,n)=>n===Ie&&(io(e)||lo(e)),sectionBand:xi,locate:e=>Di.get(e)??null,rowNameOf:(e,n)=>n===Ie?Fi(e):el(e),selectAt:(e,n,t,o)=>{e===Ie?fl(n):Vl(e,n,t,o??"")},slotRung:e=>{const n=Ui(e);return n?.slot.panel?{label:n.slot.label,select:()=>Qi(n.node,n.slot,!1)}:null},style:{held:()=>Se(rl),canCopy:e=>ol.rows(il,e).some(e=>!1!==e.counted),copy:(e,n)=>ol.copy(rl,e,ll(e.type,n),il),paste:(e,n,t)=>sl(e,n,t)},keys:Vt?{target:Ko,selected:()=>{const e=Ut.ui.itemSelector;return e?{zone:e.zone??Ie,index:e.index}:null},held:()=>Ni.get(),readOnly:Boolean(Rt),onDone:({done:e,name:n})=>{"copied"===e&&ni(co.copied({name:n}))}}:void 0},Xo),al=Hn({copy:(e,n)=>{},paste:(e,n,t)=>{},at:()=>null,readOnly:!1});Un(()=>{al.current={copy:(e,n)=>ol.copy(rl,e,ll(e.type,n),il),paste:sl,at:()=>{const e=Ut.ui.itemSelector;if(!e)return null;const n=e.zone??Ie,t=Hi(n)[e.index];return t?{zone:n,index:e.index,node:t}:null},readOnly:Boolean(Rt)}});const cl=Gn(e=>{const n=we(e);if(!n)return;const t=al.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))},[]);Un(()=>{if(!Ko)return;const e=e=>cl(e);return Ko.addEventListener("keydown",e),()=>Ko.removeEventListener("keydown",e)},[cl,Ko]),In(Xo,"keydown",cl);const pl=wi.map(e=>e.props.id).join("|");Un(()=>{const e=Xo?.document??null,n=Xo?.window??null;let t=0;const o=[],r=()=>{if(!e)return void sr(e=>e.length?[]:e);const n=wi.findIndex(lo),t=n>=0?n:wi.length,o=n=>{const t=wi[n]?.props?.id;return null==t?null:En(e,`[data-easel-block="${CSS.escape(String(t))}"]`)},r=e=>e?[...e.querySelectorAll(Nn)].map(e=>e.getBoundingClientRect()).filter(e=>e.width>0||e.height>0):[],i=[];for(let e=wi.length>0&&!io(wi[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=Bt(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})}sr(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=Pn(n,i),s=new ResizeObserver(i);return s.observe(e.documentElement),r(),o.push(setTimeout(r,150),setTimeout(r,450)),()=>{cancelAnimationFrame(t),o.forEach(clearTimeout),n.removeEventListener("scroll",i),l(),s.disconnect()}},[Xo,pl,jo,hi,No,Bo,Xt?.props.id]);const ul=Xo?.document??null,hl=Xo?.window??null;Un(()=>{const e=Go.current;if(!e||!ul||!hl)return;const n=[],t=()=>{const n=En(ul,`[data-easel-block="${CSS.escape(e.id)}"]`);if(!n)return!1;const t=n.getBoundingClientRect().top-e.offset;return Math.abs(t)>1&&hl.scrollTo({left:hl.scrollX,top:hl.scrollY+t,behavior:"instant"}),!0};return Go.current=null,t()&&n.push(setTimeout(t,150),setTimeout(t,450)),()=>n.forEach(clearTimeout)},[ul,hl]);const fl=e=>{ar(Y),Co.select({index:e}),kr.sectionPressed?.(wi[e]);const n=wi[e]?.props?.id;n&&a(n)},ml=e=>{const{floor:n,cap:t}=xi(),o=e=>Math.min(Math.max(n,e),t);if("number"==typeof e)return o(e);const r=Xt&&dr.kind!==ro?.kind?wi.findIndex(e=>e.props.id===Xt.props.id):-1;return o(r>=0?r+1:t)},gl=(e,n)=>{const{floor:t,cap:o}=xi(),r=Math.min(Math.max(n,t),o),i=e<r?r-1:r;return i===e?{moved:!1,dest:e}:(Co.reorderComponent(Ie,e,i),Co.select({index:i}),{moved:!0,dest:i})},yl=(e,n,t,o)=>{ar(Y),Co.select(o?{index:o.index,zone:o.zone}:{index:e}),a(n),ni(co.sectionAdded({name:t}))},vl=(e,n)=>{const t=ml(n),o=Or(e,Ri),r=o?Co.insertNode(Ie,t,o):Co.insertSection(e,t);return yl(t,r,Ai(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:a}of $e(Kt,e)){if(s.type===t&&(!o.at||n>o.at.depth)){const r=Nr(e.type,l,d.slice(d.lastIndexOf(":")+1),Ir(e)),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:a,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},bl=e=>kl(Ie,e),kl=(e,n)=>{Zr.current=document.activeElement??null,ir(null===n?null:{zone:e,index:n}),tr(!0),No||(or.current=!0,Gt({type:"setUi",ui:{leftSideBarVisible:!0}}))},Sl=()=>{tr(!1),ir(null),or.current&&Gt({type:"setUi",ui:{leftSideBarVisible:!1}}),or.current=!1},wl=(e,n)=>Pr.rowName?n?io(e)?Pr.rowName(e,"section",co.header):lo(e)?Pr.rowName(e,"section",co.footer):no(e.type)?Pr.rowName(e,"section",Ei(e.type)):Fi(e):el(e):n?Ai(e.type):Ei(e.type),xl=e=>n=>{e()},zl=(e,n,t)=>{if(Rt)return null;const o=Hi(e)[n];return o&&!Pe(Kt,o.type).delete||o&&xr(o.type,o)?null:/* @__PURE__ */yt(Qe,{kind:"delete",label:e===Ie&&o&&_t.shared?.usedOn(o)?co.shared.removeFromPage:co.deleteNamed({name:t}),onClick:()=>((e,n)=>{const t=Hi(e)[n]?.props?.id;null!=t&&Ti(String(t))})(e,n),children:/* @__PURE__ */yt(ut,{size:15})})},Cl=e=>Pr.rowPreview?.(e)||void 0,Ol=e=>Pr.rowMarks?.(e)??void 0,Nl=(e,n,t)=>Pr.rowActions?.(e,n,t)??null,Bl=(e,n,t,o)=>{if(Rt)return null;if(xr(t.type,t))return null;const r=Boolean(t.props._hidden);/* @__PURE__ */
|
|
15
|
+
return yt(Qe,{kind:"eye",label:r?co.showNamed({name:o}):co.hideNamed({name:o}),onClick:()=>Pl(e,n,t),children:/* @__PURE__ */yt(r?ht:ft,{size:14,strokeWidth:1.8,strokeLinecap:void 0,strokeLinejoin:void 0})})},Il=e=>ad(Ie,e),Pl=(e,n,t)=>{Co.replaceComponent(e,n,{...t,props:{...t.props,_hidden:!t.props._hidden}})},Ml=e=>Te(Kt,e),$l=e=>$e(Kt,e),Tl=e=>wr.slotsOf?Yi(e).map(n=>({slot:n.slot,rung:n.rung?n:null,kids:Ee(e,n.slot)})):[{slot:null,rung:null,kids:se(Kt,e)}],jl=e=>wr.slotsOf?Tl(e).flatMap(e=>e.kids):se(Kt,e),El=e=>Boolean(wr.slotsOf)&&Yi(e).some(e=>e.rung),Ll=(e,n,t)=>Nr(e.type,n,t??void 0,Ir(e)),Al=(e,n,t)=>{const o=Le(Kt,e.type,n)&&(t||jl(e).length>0||El(e));return{collapsible:o,folded:o&&Kr(String(e.props.id))}},Rl=(e,n,t)=>Tl(e).flatMap(o=>{const r=o.rung?n+1:n,i=o.kids.flatMap(({child:e})=>Al(e,r,t(e.type)).collapsible?[String(e.props.id),...Rl(e,r+1,t)]:[]);return o.rung?[`${e.props.id}:${o.rung.slot}`,...i]:i}),Fl=e=>jl(e).length>0||El(e)||Boolean(Nr(e.type)),Dl=e=>Boolean(Nr(e)),Vl=(e,n,t,o)=>{if(ar(Y),Nr(o)?.spec?.slider){const t=e.split(":")[0];c(t,n),Co.select({index:n,zone:e}),a(t)}else Co.select({index:n,zone:e}),a(t)},Hl=(e,n,t,o,r)=>{const i=`${e}:${n}`,l=ys(i)?.target.spec??null,d=s(l,t,Ri);d?Co.insertNode(i,o,d):Co.insertComponent(i,t,o),l?.slider?requestAnimationFrame(()=>{c(e,o),Co.select({index:o,zone:i})}):Co.select({index:o,zone:i})},Wl=Hn(/* @__PURE__ */new Set);Un(()=>{wi.forEach(e=>{const n=Nr(e.type)?.spec;if(!n)return;const t=e.props.id;if(Wl.current.has(t))return;Wl.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(Li)).forEach((e,t)=>wo.seedChild(o,t,n.childType,e))})},[wi,wo,Li]);const Yl=Hn(/* @__PURE__ */new Set);Un(()=>{wi.forEach((e,n)=>{const t=e.props.id;if(Yl.current.has(t))return;const o=r(e,Ml(e.type));Yl.current.add(t),o&&wo.replaceComponent(Ie,n,{...e,props:o})})},[wi,wo]),ne(wo,Kt);const Ul=wi.findIndex(lo),Gl=Ul>=0?wi[Ul]:null,Jl=so?wi.findIndex(io):-1,Xl=Jl>=0?wi[Jl]:null,Ql=_t.groupTab,Kl=Wn(()=>Ql?e=>no(e.type):void 0,[Ql]),_l=Boolean(_t.groupBadge),ql=_t.sharedReach,Zl=e=>ql?.(e)??void 0,es=Wn(()=>ql?new Set(wi.filter(e=>Zl(e)).map(e=>String(e.props.id))):null,[wi,ql]),ns=Wn(()=>es?e=>es.has(e):void 0,[es]),ts=_t.first?ql?.({type:_t.first,props:{id:""}})??void 0:void 0,os=_t.groupBadge?/* @__PURE__ */yt("span",{className:"es-tree-group-badge",children:/* @__PURE__ */yt(_n,{tone:"info",size:"xs",children:_t.groupBadge})}):void 0,rs=wi.find(e=>e.type===Zt)??null,is=wi.find(e=>e.type===eo)??null,ls=Ul>=0?Ul:wi.length,ss=[];wi.forEach(e=>{lo(e)||(Fl(e)&&ss.push(String(e.props.id)),ss.push(...Rl(e,1,Dl)))}),Gl&&(ss.push(String(Gl.props.id)),ss.push(...Rl(Gl,1,Dl)));const ds=ss.length>0&&ss.every(e=>Wr.has(e)),as=e=>{const n=Pr.blockRowName(e,Ei);return Pr.rowName?Pr.rowName(e,"block",n):n},cs=(e,n,t,o)=>{const r=Hi(e)[t];if(!r)return;const i={...Fn(e),index:t},l={...Fn(n),index:Math.min(Math.max(o,0),Hi(n).length)},s=zn(i,l);if(e!==n||s!==t)try{Bi.move(String(r.props.id),{...l,index:s})}catch(e){if(!(e instanceof Vn))throw e}},ps=e=>{const n=/* @__PURE__ */new Set,t=e=>{for(const{child:o,zone:r}of $l(e))n.add(r),t(o)};for(const t of Ml(e.type))n.add(`${e.props.id}:${t}`);return t(e),n},us=e=>{let n=e.slice(0,e.indexOf(":"));for(let e=0;e<64;e++){const e=Di.get(n);if(!e)return null;if(e.zone===Ie)return n;n=e.zone.slice(0,e.zone.indexOf(":"))}return null},hs=e=>{const n=e.slice(0,e.indexOf(":")),t=wi.find(e=>no(e.type)&&String(e.props.id)===n);return t&&to(n)===e?t:null},fs=(e,n)=>{const t=hs(e);return!t||(!_t.groupAccepts||_t.groupAccepts(t.type,n,Hi(e).length))},ms=(e,n,t)=>{if(e.rung){const t=Wi(e.rung.nodeId),o=t?Yi(t).filter(e=>e.rung).length:0;return n.parentId===e.rung.nodeId&&n.slot===It&&n.index>=0&&n.index<=o}if(n.slot===It)return!1;if(e.add)return bs(e.add,n);const o=Rn(n);if(no(e.type))return!1;const r=hs(o),i=hs(e.zone);if(r||i)return!(!r||!i)&&(!(r!==i&&!fs(o,e.type))&&(n.index>=0&&n.index<=Hi(o).length));if(e.zone===Ie||o===Ie){if(e.zone!==o)return!1;const{floor:t,cap:r}=xi();return n.index>=t&&n.index<=r}if(n.index<0||n.index>Hi(o).length)return!1;if(e.zone===o)return!0;const l=Gl&&!_t.lastIsOpen?String(Gl.props.id):null;return(!l||us(e.zone)!==l&&us(o)!==l)&&((e,n,t,o)=>{if(e===n)return!0;const r=o??Hi(e)[t];if(!r)return!1;const i=n.split(":")[0],l=Di.get(i),s=l?Hi(l.zone)[l.index]:void 0;if(!s)return!1;if(!o&&ps(r).has(n))return!1;const d=Nr(s.type,Cr(Ut?.data,s.type,i),n.slice(n.lastIndexOf(":")+1),Ir(s));return!!d&&(!!(d.choices?d.choices.some(e=>e.type===r.type):d.spec?.childType===r.type)&&!d.spec?.addBlocked?.(Hi(n),r))})(e.zone,o,e.index,t)},gs=(e,n)=>{const t=Rn(e.from),o=e.node;return t===Rn(n)?fs(t,o.type):ms({id:String(o.props?.id??""),zone:t,index:-1,type:o.type},n,o)},ys=e=>{const n=e.slice(0,e.indexOf(":")),t=Di.get(n),o=t?Hi(t.zone)[t.index]:void 0;if(!t||!o)return null;const r=Nr(o.type,Cr(Ut?.data,o.type,n),e.slice(e.lastIndexOf(":")+1),Ir(o));if(!r||`${n}:${r.slot}`!==e)return null;if("footer"===r.source)return null;const i=j(r.choices??(r.spec?[{type:r.spec.childType,label:Ei(r.spec.childType)}]:[])),l=Ui(e);return{parent:o,parentId:n,target:r,choices:i,parentName:l?l.slot.label:wl(o,t.zone===Ie)}},vs=(e,n)=>{if("section"!==e.kind)return e;const t=Rn(n);return t===Ie||hs(t)?e:ys(t)?.choices.some(n=>n.type===e.type)?{kind:"block",type:e.type}:e},bs=(e,n)=>{const t=vs(e,n),o=Rn(n);if("shared"===t.kind){if(o!==Ie||!_t.shared?.nodeOf(t.section))return!1;const{floor:e,cap:r}=xi();return n.index>=e&&n.index<=r}if("block"!==t.kind){if(hs(o)){if("preset"===t.kind)return!1;const e="section"===t.kind?t.type:t.template.node.type;return fs(o,e)&&n.index>=0&&n.index<=Hi(o).length}if(o!==Ie)return!1;const{floor:e,cap:r}=xi();return n.index>=e&&n.index<=r}if(o===Ie)return!1;const r=ys(o);return!(!r||!r.choices.some(e=>e.type===t.type))&&!r.target.spec?.addBlocked?.(Hi(o))},ks=(e,n)=>{const t=vs(e,n);if("block"!==t.kind&&hs(Rn(n)))return void((e,n,t)=>{const o="section"===e.kind?e.type:"template"===e.kind?e.template.node.type:null;if(o&&fs(n,o)){if("section"===e.kind)Co.insertComponent(n,e.type,t);else{if("template"!==e.kind)return;Co.insertNode(n,t,Oi(e.template.node))}ar(Y),Co.select({index:t,zone:n})}})(t,Rn(n),n.index);if("section"===t.kind)return void vl(t.type,n.index);if("template"===t.kind)return void((e,n,t)=>{const o=ml(t),r=Co.insertNode(Ie,o,n);yl(o,r,e)})(t.template.name,Oi(t.template.node),n.index);if("preset"===t.kind)return void((e,n,t)=>{const o=n(Ri);if(!o)return;const r=ml(t),i=Co.insertNode(Ie,r,o);yl(r,i,e)})(t.preset.label,t.preset.insert,n.index);if("shared"===t.kind){const e=_t.shared?.nodeOf(t.section);if(!e)return;const o=ml(n.index);return void(Bi.restore(e,{parentId:Ln,slot:An,index:o})&&yl(o,e.props.id,t.section.title))}const o=Rn(n),r=ys(o);r&&(r.target.spec?Hl(r.parentId,r.target.slot,t.type,n.index,r.parent.type):((e,n,t)=>{Co.insertComponent(e,n,t),ar(Y),Co.select({index:t,zone:e})})(o,t.type,n.index))},Ss=(e,n)=>{e.media?function(e){const n=rd();if(!n||!nd)return;ld(n).then(n=>{n&&function(e,n){if(!nd)return;const t=nd.create(e,Ri),o=Rn(n);if(o===Ie){const e=ml(n.index),o=Co.insertNode(Ie,e,t);return void yl(e,o,Ai(t.type))}Co.insertNode(o,n.index,t),ar(Y),Co.select({index:n.index,zone:o})}(n,e)})}(n):e.rung?_i(e.rung.nodeId,e.index,n.index):e.add?ks(e.add,n):e.zone===Ie?gl(e.index,n.index):cs(e.zone,Rn(n),e.index,n.index)},[ws]=Yn(()=>wn()),xs=xn({keyOf:e=>e.id,readOnly:Boolean(Rt),session:ws,canDrop:ms,onDrop:Ss,onStep:(e,n)=>{e.rung?_i(e.rung.nodeId,e.index,n<0?e.index-1:e.index+2):e.zone===Ie?((e,n)=>{const t=Ai(wi[e]?.type??""),o=gl(e,n<0?e-1:e+2);if(!o.moved)return void ni(n<0?co.sectionFirst({name:t}):co.sectionLast({name:t}));const{floor:r,cap:i}=xi();ni(co.sectionMoved({name:t,n:o.dest-r+1,total:i-r}))})(e.index,n):cs(e.zone,e.zone,e.index,n<0?e.index-1:e.index+2)}}),zs=Gn(e=>{const{floor:n,cap:t}=xi(),o=[];for(const r of e.nodes){const e=Rn(r.place),i=Hi(e)[r.place.index];if(!i||String(i.props.id)!==r.id)continue;if(io(i)||lo(i)||xr(i.type,i))continue;if(no(i.type))continue;const l=Boolean(hs(e)),s=e===Ie||l;e===Ie&&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?Ai(i.type):el(i),from:r.place})}const r=e.zones.flatMap(e=>{const n=Rn(e.list);if(n===Ie&&0===e.children.length)return[{...e,addLabel:co.addSection,addAlways:!0}];const t=ys(n),o=t?.target.spec?.addLabel;return e.children.length>0||Boolean(t?.choices.length)||Boolean(hs(n))?[o?{...e,addLabel:o}:e]:[]}),i=r.flatMap(e=>{const n=Rn(e.list),t=n===Ie||hs(n)?null:ys(n);return t?.choices.length?vn(e,t.target.spec?.addLabel??co.addBlockHere):[]});return{sources:o,zones:r,seams:i}},[Ut.data]),Cs=null==Xt?.props.id?null:String(Xt.props.id),Os=Xn(Ve),Ns=Os?.selected()&&Xo?.document&&Cs?Os.selectedPart?.(Xo.document)??null:null,Bs=Ns&&Cs&&He(Ut.data,Kt,Cs,Ns)?Ns:null,Is=Bs?.label?{element:Bs.element,label:Bs.label}:null,Ps=null!==Bs,Ms=Gn(e=>{const n=Kt,t=e=>!e.item.rung&&null!==Dn(Ut.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(Cs);return i?Ps?null:i:r(nn(Ut.data,n,o.item.id,Cs,Kl))??o},[Ut.data,Kt,Cs,Kl,Ps]),[$s,Ts]=Yn(null),[js,Es]=Yn(null),Ls=Boolean(Ql||ql);In(Xo,"mouseover",e=>{if(!Ls)return;const n=Mn(e.target),t=n?xt(Ut.data,Kt,n):null;t!==$s&&Ts(t)}),In(Xo,"mouseout",e=>{Ls&&!e.relatedTarget&&Ts(null)});const As=e=>io(e)||lo(e)||no(e.type),Rs=e=>{const n=no(e.type)?Ei(e.type):io(e)?co.header:lo(e)?co.footer:null;return null===n?Fi(e):Pr.rowName?Pr.rowName(e,"section",n):n},Fs=[];if(Ls){const e=Cs?xt(Ut.data,Kt,Cs):null;for(const n of/* @__PURE__ */new Set([e,$s,js])){const e=n?wi.find(e=>String(e.props.id)===n):void 0;if(!e)continue;const t=io(e)||e.type===Zt,o=Zl(e);if(o){Fs.push({id:String(e.props.id),label:Rs(e),below:t,reach:o});continue}if(!Ql||!As(e))continue;const r=Ql(e);r&&Fs.push({id:String(e.props.id),label:r,below:t})}}const Ds=ge(),Vs=Hn(null);Un(()=>{const e=_t.changeNotice;if(!e)return;const n=JSON.stringify(wi.filter(As)),t=Vs.current;if(Vs.current={doc:Kn,bands:n,index:Jt.index},!t||t.doc!==Kn||t.bands===n)return;Jt.hasPast&&Jt.index>=t.index&&!wt.has(Ds)&&(wt.add(Ds),ni(e,"success",{action:{label:co.bar.undo,onClick:()=>Jt.back()},duration:8e3}))},[wi]);const Hs=e=>{ar(Y),Co.select(e.zone===Ie?{index:e.index}:{index:e.index,zone:e.zone})},Ws=te(),Ys=()=>({data:Ut.data,device:jo,ops:Co,inspector:br}),Us=Ws?.model,Gs=Wn(()=>Us?e=>Us(e,zs(e),Ys()):zs,[Us,zs,jo]),Js=Ws?.measure,Xs=Js?(e,n)=>Js(e,n,Ys()):void 0,Qs=Ws?.canDrop,Ks=Qs?(e,n)=>Qs(e,n,ms,Ys()):ms,_s=Ws?.drop,qs=_s?(e,n)=>_s(e,n,Ss,Ys()):Ss,Zs=Ws?.pick,ed=Zs?e=>Zs(e,Hs,Ys()):Hs,nd=Ws?.media??null,td=Hn(null),od=Wn(()=>nd?{id:kt,zone:"",index:-1,type:nd.adds.type,add:{kind:nd.adds.kind,type:nd.adds.type},media:!0}:null,[nd]);Un(()=>{if(!od||Rt||"undefined"==typeof document)return;const e=e=>{(e=>Array.from(e.dataTransfer?.types??[]).includes(st))(e)&&(td.current=null,ws.start({key:kt,item:od}))},n=e=>{ws.get()?.item.media&&(td.current=nt(e.dataTransfer))},t=()=>{ws.get()?.item.media&&ws.end()};return document.addEventListener("dragstart",e),document.addEventListener("drop",n,!0),document.addEventListener("dragend",t,!0),()=>{document.removeEventListener("dragstart",e),document.removeEventListener("drop",n,!0),document.removeEventListener("dragend",t,!0)}},[od,Rt,ws]);const rd=()=>{const e=td.current;return td.current=null,e},id=he(),ld=async e=>{if(!id)return e;const n=await id(e);return n?{...e,id:n.id,url:n.url}:null};const sd=(e,n)=>{if(!nd)return;const t=Dn(zo.getState().appState.data,zi,n);if(!t)return;const o=t.node;Co.replaceComponent(Rn(t.place),t.place.index,{...o,props:{...nd.replace(o,e),id:o.props.id}})},dd=e=>{const n=Rn(e),t=Ui(n);t&&Qi(t.node,t.slot,!1),kl(n,e.index)},ad=(e,n)=>/* @__PURE__ */yt(Ke,{...Rt?{}:xs.seam({place:{...Fn(e),index:n}})},`seam:${e}:${n}`),cd={rowClick:xl,isCollapsed:Kr,toggleCollapse:_r},pd=e=>{const n=String(e.props.id),t=wi.findIndex(e=>String(e.props.id)===n),o=to(n),r=Hi(o),i=Kr(n),l=Ei(e.type),s=Pr.rowName?Pr.rowName(e,"section",l):l,d=e=>ad(o,e);/* @__PURE__ */
|
|
16
|
+
return vt(bt,{children:[
|
|
17
|
+
/* @__PURE__ */yt(Ue,{words:po,icon:/* @__PURE__ */yt($r,{type:e.type,size:13}),name:s,preview:Cl(e),marks:Ol(e),onSelect:()=>fl(t),nameSlot:tl(Ie,t,n,s),selected:cr===n,badge:Zl(e)?void 0:os,shared:Zl(e),actions:Nl(e,Ie,t)??void 0,rowProps:{"data-node-id":n,onClick:xl(()=>fl(t))},fold:{open:!i,label:"section",onToggle:()=>_r(n)}}),!i&&/* @__PURE__ */vt(Ge,{children:[r.map((n,t)=>{const r=String(n.props.id),i=Fi(n),l=Fl(n),s=l&&Kr(r),a=()=>Vl(o,t,r,e.type),{rowProps:c,...p}=xs.row({item:{id:r,zone:o,index:t,type:n.type},place:{...Fn(o),index:t}},{"data-node-id":r,onClick:xl(a)});/* @__PURE__ */
|
|
18
|
+
return vt(Qn,{children:[d(t),
|
|
19
|
+
/* @__PURE__ */yt(Ue,{words:po,icon:/* @__PURE__ */yt($r,{type:n.type,size:13}),name:i,preview:Cl(n),marks:Ol(n),onSelect:a,nameSlot:tl(o,t,r,i),selected:cr===r,hidden:Boolean(n.props._hidden),...p,fold:l?{open:!s,label:"section",onToggle:()=>_r(r)}:void 0,actions:/* @__PURE__ */vt(bt,{children:[zl(o,t,i),Nl(n,o,t),Bl(o,t,n,i)]}),rowProps:c}),l&&!s&&/* @__PURE__ */yt(Ge,{children:fd(n,2)})]},r)}),d(r.length)]})]})},ud=(e,n,t,o,r)=>{const i=String(e.props.id),l=`${i}:${n.slot}`,s=xs.dragging,d=!Kr(l)&&s?.rung?.nodeId!==i,a={...Fn(l),index:0},c=s&&!s.rung&&ms(s,a)?a:void 0,p=()=>Qi(e,n,!0),{rowProps:u,...h}=xs.row({item:{id:`rung:${l}`,zone:`${i}:${It}`,index:t,type:e.type,rung:{nodeId:i,slot:n.slot}},place:{parentId:i,slot:It,index:t},into:c,canDrag:Boolean(wr.moveSlot)&&!1!==n.movable&&o>1},{"data-slot-zone":l,onClick:xl(p)}),f=Rt?null:wr.slotActions?.(e,n.slot);/* @__PURE__ */
|
|
20
|
+
return vt(Qn,{children:[n.heading,
|
|
21
|
+
/* @__PURE__ */yt(Ue,{words:po,icon:n.glyph??null,name:n.label,badge:n.badge,onSelect:p,selected:Gi===l,...h,dragHint:n.dragHint,fold:{open:d,label:n.label,onToggle:()=>_r(l)},actions:f&&f.length>0?/* @__PURE__ */yt(bt,{children:f.map((t,o)=>/* @__PURE__ */yt(Qe,{kind:"delete"===t.kind?"delete":"plain",label:t.label,disabled:t.disabled,onClick:()=>((e,n,t)=>{if(Rt||t.disabled)return;const o=String(e.props.id),r=e=>{"string"==typeof e&&Ki(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__ */yt(ut,{size:15}):/* @__PURE__ */yt(gt,{size:15})},`${o}:${t.kind}`))}):void 0,rowProps:u}),d&&/* @__PURE__ */yt(Ge,{children:r})]},l)},hd=(e,n)=>{const t=Tl(e),o=t.filter(e=>e.rung).length;let r=0;/* @__PURE__ */
|
|
22
|
+
return yt(bt,{children:t.map(t=>{const i=t.kids,l=t.rung?n+1:n,s=Ll(e,void 0,t.slot),d=s?`${e.props.id}:${s.slot}`:null,a=null===t.slot?null:`${e.props.id}:${t.slot}`,c=(e,n)=>ad(e,n),p=/* @__PURE__ */vt(bt,{children:[i.map(({child:n,zone:t,index:o})=>{const r=cr===String(n.props.id),{collapsible:i,folded:s}=Al(n,l,Dl(n.type)),d=String(n.props.id),a=as(n),p=()=>Vl(t,o,d,e.type),{rowProps:u,...h}=xs.row({item:{id:d,zone:t,index:o,type:n.type},place:{...Fn(t),index:o}},{"data-node-id":d,onClick:xl(p)});/* @__PURE__ */
|
|
23
|
+
return vt(Qn,{children:[0===o&&c(t,0),
|
|
24
|
+
/* @__PURE__ */yt(Ue,{words:po,icon:/* @__PURE__ */yt($r,{type:n.type,size:13}),name:a,preview:Cl(n),marks:Ol(n),onSelect:p,nameSlot:tl(t,o,d,a),selected:r,hidden:Boolean(n.props._hidden),...h,fold:i?{open:!s,label:"group",onToggle:()=>_r(d)}:void 0,actions:/* @__PURE__ */vt(bt,{children:[zl(t,o,a),Nl(n,t,o),Bl(t,o,n,a)]}),rowProps:u}),i&&!s&&/* @__PURE__ */yt(Ge,{children:hd(n,l+1)}),c(t,o+1)]},String(n.props.id??`${t}-${o}`))}),null===a?d&&!i.some(e=>e.zone===d)?c(d,0):null:0!==i.length||!t.rung&&d!==a?null:c(a,0)]});return t.rung?ud(e,t.rung,r++,o,p):/* @__PURE__ */yt(Qn,{children:p},t.slot??"")})})},fd=(e,n)=>{const t=Cr(Ut?.data,e.type,String(e.props.id)),o=Tl(e),r=o.filter(e=>e.rung).length;let i=0;/* @__PURE__ */
|
|
25
|
+
return yt(bt,{children:o.map(o=>{const l=o.kids,s=o.rung?n+1:n,d=Ll(e,t,o.slot),a=d?.spec??null,c=a&&Array.isArray(e.props[a.slot])?e.props[a.slot]:[],p=d&&d.choices?{slot:d.slot,choices:d.choices}:null,u=String(e.props.id),h=a&&!a.fixed?`${u}:${a.slot}`:null,f=p?`${u}:${p.slot}`:null,m=(e,n)=>ad(e,n),g=null===o.slot?null:`${u}:${o.slot}`,y=Boolean(a&&!a.fixed&&(null===g||g===h)),v=/* @__PURE__ */vt(bt,{children:[l.map(({child:n,zone:t,index:o})=>{const r=cr===String(n.props.id),i=el(n),l=String(n.props.id),{collapsible:d,folded:a}=Al(n,s,Dl(n.type)),c=Ml(n.type),p=1===c.length?`${l}:${c[0]}`:null,u=p?{...Fn(p),index:Hi(p).length}:void 0,h=xs.dragging,f=u&&h&&ms(h,u)?u:void 0,g=()=>Vl(t,o,l,e.type),{rowProps:y,...v}=xs.row({item:{id:l,zone:t,index:o,type:n.type},place:{...Fn(t),index:o},into:f,canDrag:!xr(n.type,n)},{"data-node-id":l,onClick:xl(g)});/* @__PURE__ */
|
|
26
|
+
return vt(Qn,{children:[0===o&&m(t,0),
|
|
27
|
+
/* @__PURE__ */yt(Ue,{words:po,icon:/* @__PURE__ */yt($r,{type:n.type,size:13}),name:i,preview:Cl(n),marks:Ol(n),onSelect:g,nameSlot:tl(t,o,l,i),selected:r,hidden:Boolean(n.props._hidden),...v,fold:d?{open:!a,label:"group",onToggle:()=>_r(l)}:void 0,actions:xr(n.type,n)?Nl(n,t,o)??void 0:/* @__PURE__ */vt(bt,{children:[zl(t,o,i),Nl(n,t,o),Bl(t,o,n,i)]}),rowProps:y}),d&&!a&&/* @__PURE__ */yt(Ge,{children:fd(n,s+1)}),m(t,o+1)]},String(n.props.id??`${t}-${o}`))}),y&&a&&
|
|
28
|
+
/* @__PURE__ */yt(N,{small:!0,label:a.addLabel,blocked:a.addBlocked?.(c)??null,onAdd:()=>Hl(e.props.id,a.slot,a.childType,c.length,e.type)}),null===g?f&&!l.some(e=>e.zone===f)?m(f,0):null:0!==l.length||(o.rung?y:g!==f)?null:m(g,0)]});return o.rung?ud(e,o.rung,i++,r,v):/* @__PURE__ */yt(Qn,{children:v},o.slot??"")})})},md=nr,gd=e=>"panel"in e?{id:e.id,label:e.label,icon:e.icon,active:No&&!md&&Sr===e.id,onSelect:()=>ki(e.id)}:e,yd=[...(kr.railLead??[]).map(gd),{id:"sections",label:co.layers,icon:/* @__PURE__ */yt(be,{}),active:No&&!md&&"sections"===Sr,onSelect:()=>ki("sections")},...(kr.railTrail??[]).map(gd)],vd=Ao?{onPress:Ro}:Ht?{onPress:()=>{O(On,{accept:"image/*",title:yo.mediaLibrary})}}:null,bd={value:yd.find(e=>!0===e.active)?.id??"",press:e=>{const n=yd.find(n=>n.id===e);n&&!n.disabled&&!0!==n.active&&n.onSelect?.()},items:yd.map(e=>({id:e.id,icon:e.icon,label:/* @__PURE__ */yt("span",{className:"sr-only",children:e.label}),tooltip:e.label,disabled:e.disabled}))},kd=[...kr.railLead??[],...kr.railTrail??[]].find(e=>"panel"in e&&e.id===Sr),Sd=Boolean(ao?.foldable),wd=ao?.label??(Wt?co.pageSections:co.templateSections),xd=Sd&&Kr(Mt),zd=/* @__PURE__ */vt(bt,{children:[wi.map((e,n)=>{if(io(e)||lo(e)||no(e.type))return null;const t=cr===String(e.props.id),o=Boolean(e.props._hidden);$l(e);const r=String(e.props.id),i=kr.hasOwnRows?.(e)??!1,l=Fl(e)||i,s=l&&Kr(r),d=Ml(e.type),a=1===d.length?`${r}:${d[0]}`:null,c=a?{...Fn(a),index:Hi(a).length}:void 0,p=xs.dragging,u=c&&p&&ms(p,c)?c:void 0,{rowProps:h,...f}=xs.row({item:{id:r,zone:Ie,index:n,type:e.type},place:{...Fn(Ie),index:n},into:u,canDrag:!xr(e.type,e)},{"data-node-id":r,onClick:xl(()=>fl(n))});/* @__PURE__ */
|
|
29
|
+
return vt(Qn,{children:[n>0&&Il(n),
|
|
30
|
+
/* @__PURE__ */yt(Ue,{words:po,icon:/* @__PURE__ */yt($r,{type:e.type,size:13}),name:Fi(e),preview:Cl(e),marks:Ol(e),shared:Zl(e),onSelect:()=>fl(n),nameSlot:tl(Ie,n,r,Fi(e)),selected:t,hidden:o,...f,fold:l?{open:!s,label:"section",onToggle:()=>_r(r)}:void 0,actions:/* @__PURE__ */vt(bt,{children:[zl(Ie,n,Fi(e)),Nl(e,Ie,n),Bl(Ie,n,e,Fi(e))]}),rowProps:h}),Fl(e)&&!s&&/* @__PURE__ */vt(Ge,{children:[fd(e,1),kr.partRows?.(e,cd)]}),i&&!s&&/* @__PURE__ */yt(Ge,{children:kr.ownRows?.(e,n,cd)})]},String(e.props.id??n))}),ls>0&&Il(ls)]}),Cd=(e,n,t)=>{const o=String(e.props.id),r=jl(e).length>0||El(e)||Boolean(Nr(e.type)),i=r&&Kr(o),l="header"===t?co.header:co.footer,s=Pr.rowName?Pr.rowName(e,"section",l):l;/* @__PURE__ */
|
|
31
|
+
return vt(bt,{children:[
|
|
32
|
+
/* @__PURE__ */yt(Ue,{words:po,icon:/* @__PURE__ */yt($r,{type:t,size:13}),name:s,preview:Cl(e),marks:Ol(e),badge:Zl(e)?void 0:os,shared:Zl(e),onSelect:()=>fl(n),nameSlot:tl(Ie,n,o,s),selected:cr===String(e.props.id),fold:r?{open:!i,label:"section",onToggle:()=>_r(o)}:void 0,actions:Nl(e,Ie,n)??void 0,rowProps:{"data-node-id":o,onClick:xl(()=>fl(n))}}),r&&!i&&/* @__PURE__ */yt(Ge,{children:hd(e,1)})]})};return(kr.wrap??(e=>e))(
|
|
33
|
+
/* @__PURE__ */yt(oe,{target:Xo,children:/* @__PURE__ */vt("div",{ref:Jo,className:"sf-editor es-editor",style:pn(Ur),onContextMenu:dl.onEditorContextMenu,...f(On),children:[
|
|
34
|
+
/* @__PURE__ */vt(tn,{children:[
|
|
35
|
+
/* @__PURE__ */vt("div",{className:"es-cluster es-cluster--left",children:[vd?/* @__PURE__ */yt(qn,{variant:"secondary",className:"es-barbtn",leftIcon:/* @__PURE__ */yt(ke,{}),onClick:vd.onPress,children:co.railMedia}):null,
|
|
36
|
+
/* @__PURE__ */yt(on,{label:co.bar.undo,disabled:Boolean(Rt)||!Jt.hasPast,onClick:()=>Jt.back(),children:/* @__PURE__ */yt(dt,{})}),
|
|
37
|
+
/* @__PURE__ */yt(on,{label:co.bar.redo,disabled:Boolean(Rt)||!Jt.hasFuture,onClick:()=>Jt.forward(),children:/* @__PURE__ */yt(at,{})})]}),
|
|
38
|
+
/* @__PURE__ */vt(rn,{children:[
|
|
39
|
+
/* @__PURE__ */yt(ln,{devices:Io,value:jo,onChange:Eo}),
|
|
40
|
+
/* @__PURE__ */yt(on,{label:co.bar.refresh,tip:co.bar.refreshTip,onClick:()=>{Go.current=(()=>{const e=Xo?.document;if(!e)return null;const n=wi.findIndex(lo),t=n>=0?n:wi.length;let o=null;for(let n=0;n<t;n++){const t=wi[n]?.props?.id;if(null==t)continue;const r=En(e,`[data-easel-block="${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=Xt?.props?.id??wi[0]?.props?.id;null!=e&&(o={id:String(e),offset:0})}return o})(),Uo(e=>e+1)},children:/* @__PURE__ */yt(ct,{})}),kr.barView?.()]}),
|
|
41
|
+
/* @__PURE__ */vt(rn,{kind:"right",style:{minWidth:300},children:[
|
|
42
|
+
/* @__PURE__ */yt(w,{input:Zo,words:co.saveStatus}),$n?/* @__PURE__ */yt($n,{}):null,kr.barLead?.(),kr.barTrail?.(),kr.mainAction||!kr.barMain?/* @__PURE__ */yt(x,{input:Zo,action:ti,readOnly:Boolean(Rt),saveSwitch:Dt,onToggleAutoSave:jt,onSaveNow:er,bar:co.bar,words:co.saveStatus}):kr.barMain()]})]}),
|
|
43
|
+
/* @__PURE__ */yt(S,{}),
|
|
44
|
+
/* @__PURE__ */vt("div",{className:"sf-body",children:[No?/* @__PURE__ */vt(bt,{children:[
|
|
45
|
+
/* @__PURE__ */vt("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left","aria-label":co.leftPanel,children:[
|
|
46
|
+
/* @__PURE__ */vt("div",{className:"es-paneltabs es-paneltabs--with-hide",children:[
|
|
47
|
+
/* @__PURE__ */yt(M,{side:"left",onHide:vi}),
|
|
48
|
+
/* @__PURE__ */yt("span",{className:"es-paneltabs-divider","aria-hidden":"true"}),
|
|
49
|
+
/* @__PURE__ */yt(Zn,{variant:"underline",block:!0,"aria-label":co.bar.views,value:bd.value,onChange:bd.press,items:bd.items})]}),nr?/* @__PURE__ */yt(B,{at:rr?{label:(e=>{const n=hs(e.zone);if(n)return co.add.addingTo({name:Pr.rowName?wl(n,!0):Ei(n.type)});if(e.zone===Ie){const n=wi[e.index];return n&&!lo(n)?co.add.addingBefore({name:wl(n,!0)}):co.add.addingAtEnd}const t=ys(e.zone);return t?co.add.addingTo({name:t.parentName}):co.add.addingHere})(rr),onClear:()=>ir(null)}:void 0,placeBlocks:rr&&rr.zone!==Ie?ys(rr.zone)?.choices:void 0,placeNames:rr&&rr.zone!==Ie?(e=>{const n=ys(e),t=n?.target.spec,o=t?d(t,t.childType):null;return t&&o?/* @__PURE__ */new Map([[t.childType,o]]):void 0})(rr.zone):void 0,canTake:rr?e=>{if(!rr)return null;const n={...Fn(rr.zone),index:rr.index};if(bs(e,n))return null;if("shared"===e.kind&&rr.zone===Ie&&!_t.shared?.nodeOf(e.section))return co.shared.alreadyHere;const t=hs(rr.zone);if(t)return co.add.notInside({name:wl(t,!0)});if(rr.zone===Ie)return co.add.onlySections;const o=ys(rr.zone);return o?co.add.notInside({name:o.parentName}):co.add.onlySections}:void 0,onPick:rr?e=>{if(!rr)return;const n={...Fn(rr.zone),index:rr.index};bs(e,n)&&(ks(e,n),Sl())}:void 0,itemFor:e=>({id:`new:${e.kind}:${Pt(e)}`,zone:"",index:-1,type:"template"===e.kind?e.template.node.type:"shared"===e.kind?e.section.node.type:Pt(e),add:e}),session:ws,siteWide:kr.addPanelRow?.(Sl),onClose:Sl,readOnly:Boolean(Rt)}):kd?kd.panel({onHide:vi,notify:ni}):/* @__PURE__ */vt(bt,{children:[
|
|
50
|
+
/* @__PURE__ */yt($,{icon:/* @__PURE__ */yt(be,{}),title:co.layers,context:vo,actions:/* @__PURE__ */vt(bt,{children:[!Rt&&/* @__PURE__ */yt(sn,{label:co.add.title,onClick:()=>bl(null),children:/* @__PURE__ */yt(pt,{size:15})}),
|
|
51
|
+
/* @__PURE__ */yt(sn,{label:ds?co.expandAll:co.collapseAll,title:0===ss.length?co.nothingToFold:void 0,disabled:0===ss.length,onClick:()=>Yr(e=>{const n=new Set(ss);return ds?new Set([...e].filter(e=>!n.has(e))):/* @__PURE__ */new Set([...e,...ss])}),children:/* @__PURE__ */yt(Ot,{expand:ds})})]})}),
|
|
52
|
+
/* @__PURE__ */vt(Je,{className:"sf-tree sf-scroll",words:po,children:[rs&&/* @__PURE__ */vt(bt,{children:[!_l&&/* @__PURE__ */yt(Xe,{children:co.header}),pd(rs)]}),Yt&&!(_l&&rs)&&/* @__PURE__ */vt(bt,{children:[!_l&&/* @__PURE__ */yt(Xe,{children:co.header}),!so&&/* @__PURE__ */yt(Ue,{words:po,icon:/* @__PURE__ */yt($r,{type:"header",size:13}),name:co.header,badge:ts?void 0:os,shared:ts,onSelect:Si,selected:dr.kind===ro?.kind,rowProps:{onClick:xl(Si)}})]}),Xl&&!(_l&&rs)&&Cd(Xl,Jl,"header"),!Sd&&/* @__PURE__ */yt(Xe,{children:wd}),Sd?/* @__PURE__ */vt(bt,{children:[
|
|
53
|
+
/* @__PURE__ */yt(Ue,{words:po,icon:null,name:wd,fold:{open:!xd,label:wd,onToggle:()=>_r(Mt)}}),!xd&&/* @__PURE__ */yt(Ge,{children:zd})]}):zd,Yt&&!_l&&/* @__PURE__ */yt(Xe,{children:co.footer}),Gl&&!(_l&&is)&&Cd(Gl,Ul,"footer"),is&&pd(is),kr.treeFoot?.()]})]})]}),
|
|
54
|
+
/* @__PURE__ */yt(dn,{side:"left",width:Ur.left,min:cn.left,max:an,defaultWidth:y.left,label:co.resizeLeftPanel,onResize:Xr})]}):/* @__PURE__ */yt(T,{side:"left",onShow:vi}),
|
|
55
|
+
/* @__PURE__ */vt("div",{ref:ri,className:"sf-center sf-scroll","data-sf-canvas-head":ai?"":void 0,style:{overflowX:mi?"auto":"hidden",overflowY:"hidden"},children:[ai&&/* @__PURE__ */yt("div",{ref:ci,className:"sf-canvas-head",children:/* @__PURE__ */yt(ai,{device:jo})}),
|
|
56
|
+
/* @__PURE__ */vt("div",{className:"sf-frame-scaler",style:gi,children:[
|
|
57
|
+
/* @__PURE__ */yt("div",{className:"sf-frame "+(jo===$o?"":`sf-frame--${jo}`),style:yi,children:/* @__PURE__ */vt("div",{className:"sf-preview-host",children:[
|
|
58
|
+
/* @__PURE__ */yt(We.Provider,{value:Kl,children:/* @__PURE__ */yt(Ye.Provider,{value:ns,children:/* @__PURE__ */yt(bo,{},Yo)})}),
|
|
59
|
+
/* @__PURE__ */yt(bn,{canvas:Xo,session:ws,model:Gs,measure:Xs,canDrop:Ks,onDrop:qs,choose:Ms,tag:Is,onPick:ed,dropOn:nd?{accepts:(e,n)=>{if(!e.media||!nd||n.item.rung)return!1;const t=Dn(Ut.data,zi,n.item.id);return null!==t&&nd.takes(t.node)},onDrop:(e,n)=>(e=>{const n=rd();n&&nd&&ld(n).then(n=>{n&&sd(n,e.item.id)})})(n),label:()=>co.canvasReplaceImage}:void 0,onZoneAdd:dd,onSeamAdd:dd,zoneAddLabel:co.canvasAddBlock,words:uo.canvas,readOnly:Boolean(Rt),revision:Ut.data}),lr.length>0&&!Qo&&/* @__PURE__ */yt("div",{className:"sf-preview-gaps",children:lr.map(e=>
|
|
60
|
+
/* @__PURE__ */yt(kn,{index:e.index,label:co.addSectionHere,onInsert:()=>bl(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))})]})}),Ls?/* @__PURE__ */yt(Ct,{canvas:Xo,tabs:Fs,onSelect:Xi,onPointer:Es}):null]})]}),Bo?/* @__PURE__ */vt(bt,{children:[Tn?
|
|
61
|
+
/* @__PURE__ */yt("div",{className:"es-sidepanel es-sidepanel--right","data-es-host-panel":"",children:Tn}):/* @__PURE__ */yt(bt,{children:/* @__PURE__ */yt(m,{value:{selectChild:Vl,addChild:Hl,childRowName:el,blockRowName:as},children:/* @__PURE__ */yt(ko,{mode:dr,onOpenWebsiteSettings:kr.openSettings??(()=>{}),onOpenSiteStyles:kr.openStyles,onOpenPageStyles:kr.openPageStyles,onSelectNode:Lr,onNotify:ni,onHidePanel:bi,nodeActions:Xt?Pe(Kt,Xt.type):$t})})}),
|
|
62
|
+
/* @__PURE__ */yt(dn,{side:"right",width:Ur.right,min:cn.right,max:an,defaultWidth:y.right,label:co.resizeSettingsPanel,onResize:Qr})]}):
|
|
63
|
+
/* @__PURE__ */yt(T,{side:"right",onShow:bi})]}),dl.menu,
|
|
64
|
+
/* @__PURE__ */yt(de,{}),Pi?/* @__PURE__ */yt(St,{name:Pi.name,onMake:e=>(async(e,n)=>{const t=wi.find(n=>String(n.props.id)===e),o=_t.shared;if(!t||!o)return;let r;try{r=await P(Ii).create(n,t)}catch{return void ni(co.shared.makeFailed,"error")}o.adopt(t,r),Mi(null)})(Pi.id,e),onCancel:()=>Mi(null)}):null]})}))}export{jt as ScreenChrome};
|
package/dist/drag/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{AddPanel,CanvasDragLayer,CanvasInsert,EMPTY_MEASURE,HANDLE_GRACE_MS,canvasTarget,contains,gapInZone,gapLine,insertSeams,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-DQSRGKSM.js";import"../chunk-TQ5Y6S2X.js";export{AUTO_SCROLL_EDGE,AUTO_SCROLL_MAX_SPEED,autoScrollDelta,autoScrollSpeed,createDragSession,dropEffectFor,dropOnRow,frameScrollBox,gapToMoveIndex,isNoOpDrop,scrollBoxOf,scrollParent,startAutoScroll,stepGap,useTreeDrag}from"../chunk-QEEW4X64.js";import"../chunk-P2VEMZH5.js";import"../chunk-6GJEOER4.js";import"../chunk-FR7EEKFF.js";import"../chunk-7UFKEX72.js";import"../chunk-YDTEYXQW.js";import"../chunk-KXM6YRG2.js";
|
package/dist/easel/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{CHROME_ATTR,CanvasChromeContext,CanvasFrame,CanvasPartsContext,CanvasPassThroughContext,CanvasSharedContext,DEFAULT_UI,EaselCanvas,EaselProvider,EditDocument,RootHostScope,bindUndoKeys,createEasel,createUseEasel,partHasOwnBox,recordsByDefault,reduce,subscribeLateWrites,uiView,useEasel,useEaselApi,useEaselNodeOps,useRootFields,useSelectedFields,useSelectedHost,useSettledAction,useSettledPress,validSelection,writesSettled}from"../chunk-
|
|
1
|
+
export{CHROME_ATTR,CanvasChromeContext,CanvasFrame,CanvasPartsContext,CanvasPassThroughContext,CanvasSharedContext,DEFAULT_UI,EaselCanvas,EaselProvider,EditDocument,RootHostScope,bindUndoKeys,createEasel,createUseEasel,partHasOwnBox,recordsByDefault,reduce,subscribeLateWrites,uiView,useEasel,useEaselApi,useEaselNodeOps,useRootFields,useSelectedFields,useSelectedHost,useSettledAction,useSettledPress,validSelection,writesSettled}from"../chunk-HGTDDSFJ.js";export{repeatCopyAt}from"../chunk-LK56FUFT.js";import"../chunk-TBY3DFKS.js";import"../chunk-LDHUPZBK.js";import"../chunk-TF6NAIV7.js";import"../chunk-MNQDOSAX.js";import"../chunk-PMRN5Z3T.js";import"../chunk-MFIRYGHW.js";import"../chunk-6GJEOER4.js";import"../chunk-FR7EEKFF.js";import"../chunk-7UFKEX72.js";import"../chunk-YDTEYXQW.js";import"../chunk-KXM6YRG2.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{AddBlockRow as default}from"../../chunk-
|
|
1
|
+
export{AddBlockRow as default}from"../../chunk-XGTO4LHI.js";import"../../chunk-RUQOIQWI.js";import"../../chunk-DCBUJ36Q.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-LX23TCTP.js";import"../../chunk-G2VZ4DET.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-HGTDDSFJ.js";import"../../chunk-LK56FUFT.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-SDSBXW3V.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-TDEBPOWV.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-D4TH4QQR.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-LDHUPZBK.js";import"../../chunk-TF6NAIV7.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-MNQDOSAX.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-ANBPE45L.js";import"../../chunk-C63IB4VW.js";import"../../chunk-DX3VILZ3.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-UMTUKSE6.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-QEEW4X64.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-6GJEOER4.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-YDTEYXQW.js";import"../../chunk-KXM6YRG2.js";
|
|
@@ -3,7 +3,7 @@ import '../../CanvasDragLayer-DXeQGrwJ.js';
|
|
|
3
3
|
import '../lib/section-template-types.js';
|
|
4
4
|
import '../lib/shared-section-types.js';
|
|
5
5
|
import '../lib/document/block-choice.js';
|
|
6
|
-
export {
|
|
6
|
+
export { aD as AddKey, aE as AddSidePanelProps, aF as blockKey, aG as default, aH as presetKey, aI as sectionKey, aJ as sharedKey, aK as templateKey } from '../../AddSidePanel-DoCx-ZrM.js';
|
|
7
7
|
import '../../watch-Unf6SfUf.js';
|
|
8
8
|
import '../../types-Dq180WRV.js';
|
|
9
9
|
import '../../words-SD4neL0n.js';
|
|
@@ -25,7 +25,7 @@ import '../../words-CnnHb9jo.js';
|
|
|
25
25
|
import '../../types-CoUTWUwB.js';
|
|
26
26
|
import 'efficient-shell/ui';
|
|
27
27
|
import '../../words-Cl9xMUYY.js';
|
|
28
|
-
import '../../ScreenDocumentContext-
|
|
28
|
+
import '../../ScreenDocumentContext-JQr4hTeP.js';
|
|
29
29
|
import '../lib/document-contract.js';
|
|
30
30
|
import '../lib/document-switch.js';
|
|
31
31
|
import '../../engine-CvXpFE86.js';
|
|
@@ -35,5 +35,3 @@ import '../lib/backend-error.js';
|
|
|
35
35
|
import '../lib/host-chrome.js';
|
|
36
36
|
import '../lib/links/link-filters.js';
|
|
37
37
|
import '../lib/document-hooks.js';
|
|
38
|
-
import '../lib/document/add-target-types.js';
|
|
39
|
-
import '../lib/document/slot-section-spec.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{blockKey,AddSidePanel as default,presetKey,sectionKey,sharedKey,templateKey}from"../../chunk-
|
|
1
|
+
export{blockKey,AddSidePanel as default,presetKey,sectionKey,sharedKey,templateKey}from"../../chunk-YCYGY54I.js";import"../../chunk-GDO4QJ4G.js";import"../../chunk-IZGFJWH4.js";import"../../chunk-N7E6264U.js";import"../../chunk-N3MJOHAG.js";import"../../chunk-MTWQYLJE.js";import"../../chunk-UMDQ6CLQ.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-RUQOIQWI.js";import"../../chunk-DCBUJ36Q.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-YM4UEGBV.js";import"../../chunk-SNF5764Q.js";import"../../chunk-LX23TCTP.js";import"../../chunk-G2VZ4DET.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-HGTDDSFJ.js";import"../../chunk-LK56FUFT.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-SDSBXW3V.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-TDEBPOWV.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-D4TH4QQR.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-LDHUPZBK.js";import"../../chunk-TF6NAIV7.js";import"../../chunk-ZKY45F5G.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-VTY7OQB5.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-G7J6SGMF.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MNQDOSAX.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-ANBPE45L.js";import"../../chunk-C63IB4VW.js";import"../../chunk-DX3VILZ3.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-UMTUKSE6.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-DQSRGKSM.js";import"../../chunk-TQ5Y6S2X.js";import"../../chunk-QEEW4X64.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-6GJEOER4.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-YDTEYXQW.js";import"../../chunk-KXM6YRG2.js";
|
|
@@ -8,7 +8,7 @@ import { S as StyleClipboardWords } from '../../words-CnnHb9jo.js';
|
|
|
8
8
|
import { ScreenMenuWords } from '../words.js';
|
|
9
9
|
import { C as CanvasTarget } from '../../watch-Unf6SfUf.js';
|
|
10
10
|
import { R as RepeatCopy } from '../../copy-place-CQIemdtU.js';
|
|
11
|
-
import { ScreenMenuRows, CopyItemRequest } from '
|
|
11
|
+
import { x as ScreenMenuRows, a as CopyItemRequest } from '../../AddSidePanel-DoCx-ZrM.js';
|
|
12
12
|
import { EaselSession } from '../lib/session.js';
|
|
13
13
|
import '../../plan-D0DgSLnY.js';
|
|
14
14
|
import '../../CanvasDragLayer-DXeQGrwJ.js';
|
|
@@ -29,15 +29,13 @@ import '../../panelWidths-DgQXiPXU.js';
|
|
|
29
29
|
import '../../types-CoUTWUwB.js';
|
|
30
30
|
import 'efficient-shell/ui';
|
|
31
31
|
import '../../words-Cl9xMUYY.js';
|
|
32
|
-
import '../../ScreenDocumentContext-
|
|
32
|
+
import '../../ScreenDocumentContext-JQr4hTeP.js';
|
|
33
33
|
import '../lib/document-contract.js';
|
|
34
34
|
import '../lib/document-switch.js';
|
|
35
35
|
import '../../engine-CvXpFE86.js';
|
|
36
36
|
import '../lib/admin-bridge.js';
|
|
37
37
|
import '../lib/host-chrome.js';
|
|
38
38
|
import '../lib/links/link-filters.js';
|
|
39
|
-
import '../lib/document/add-target-types.js';
|
|
40
|
-
import '../lib/document/slot-section-spec.js';
|
|
41
39
|
import '../lib/backend-error.js';
|
|
42
40
|
import '../lib/document-hooks.js';
|
|
43
41
|
|
|
@@ -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-M5UCPD66.js";import"../../chunk-YM4UEGBV.js";import"../../chunk-SNF5764Q.js";import"../../chunk-LX23TCTP.js";import"../../chunk-3OOYGEJY.js";import"../../chunk-G2VZ4DET.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-LK56FUFT.js";import"../../chunk-P5VYGWYO.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-TF6NAIV7.js";import"../../chunk-ZKY45F5G.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-6GJEOER4.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-YDTEYXQW.js";import"../../chunk-KXM6YRG2.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { SaveStatusInput } from '../lib/save-status.js';
|
|
3
|
-
import { ScreenMainAction } from '
|
|
3
|
+
import { t as ScreenMainAction } from '../../AddSidePanel-DoCx-ZrM.js';
|
|
4
4
|
import { ScreenBarWords, ScreenSaveStatusWords } from '../words.js';
|
|
5
5
|
import '../../engine-CvXpFE86.js';
|
|
6
6
|
import '../../types-SrGNzYeO.js';
|
|
@@ -28,7 +28,7 @@ import '../../words-CnnHb9jo.js';
|
|
|
28
28
|
import '../../types-CoUTWUwB.js';
|
|
29
29
|
import 'efficient-shell/ui';
|
|
30
30
|
import '../../words-Cl9xMUYY.js';
|
|
31
|
-
import '../../ScreenDocumentContext-
|
|
31
|
+
import '../../ScreenDocumentContext-JQr4hTeP.js';
|
|
32
32
|
import '../lib/document-contract.js';
|
|
33
33
|
import '../lib/document-switch.js';
|
|
34
34
|
import '../lib/admin-bridge.js';
|
|
@@ -37,8 +37,6 @@ import '../lib/backend-error.js';
|
|
|
37
37
|
import '../lib/host-chrome.js';
|
|
38
38
|
import '../lib/links/link-filters.js';
|
|
39
39
|
import '../lib/document-hooks.js';
|
|
40
|
-
import '../lib/document/add-target-types.js';
|
|
41
|
-
import '../lib/document/slot-section-spec.js';
|
|
42
40
|
|
|
43
41
|
/**
|
|
44
42
|
* THE B3 SAVE CONTROLS (8.0.0, card [DESIGN] A Clearer Save In Both Editors,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ScreenChrome as default}from"../../chunk-
|
|
1
|
+
export{ScreenChrome as default}from"../../chunk-ZSP4ZAQ2.js";import"../../chunk-UMBNBCL4.js";import"../../chunk-OXZDSOZV.js";import"../../chunk-7OCEPOEJ.js";import"../../chunk-VNUXFD4X.js";import"../../chunk-5XL2RXFU.js";import"../../chunk-3QB2ZQXK.js";import"../../chunk-ZNLODQD4.js";import"../../chunk-22I55W37.js";import"../../chunk-64NREOML.js";import"../../chunk-LUOY3A3Q.js";import"../../chunk-3RGHXL5V.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-TQUEVJOO.js";import"../../chunk-OSF2H3LO.js";import"../../chunk-PTTQWCD7.js";import"../../chunk-XV5D4V2T.js";import"../../chunk-2EEYFRQM.js";import"../../chunk-RKTF5XLP.js";import"../../chunk-OB4KI2AN.js";import"../../chunk-JUJEVGLY.js";import"../../chunk-ERR437B5.js";import"../../chunk-5HYVOOH3.js";import"../../chunk-A5USZ6Z6.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-6V6LC7QV.js";import"../../chunk-7YXWWMBM.js";import"../../chunk-NQW6XCAY.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-5545A3PC.js";import"../../chunk-YCYGY54I.js";import"../../chunk-GDO4QJ4G.js";import"../../chunk-IZGFJWH4.js";import"../../chunk-N7E6264U.js";import"../../chunk-N3MJOHAG.js";import"../../chunk-MTWQYLJE.js";import"../../chunk-UMDQ6CLQ.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-RUQOIQWI.js";import"../../chunk-DCBUJ36Q.js";import"../../chunk-T2RINM7R.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-M5UCPD66.js";import"../../chunk-YM4UEGBV.js";import"../../chunk-SNF5764Q.js";import"../../chunk-LX23TCTP.js";import"../../chunk-XFYFKITX.js";import"../../chunk-3OOYGEJY.js";import"../../chunk-G2VZ4DET.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-5NHQ452C.js";import"../../chunk-AJ2SUSET.js";import"../../chunk-6UAEFOJ4.js";import"../../chunk-ANPOR6EY.js";import"../../chunk-R4AUZVA3.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-HGTDDSFJ.js";import"../../chunk-LK56FUFT.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-SDSBXW3V.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-TDEBPOWV.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-D4TH4QQR.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-LDHUPZBK.js";import"../../chunk-P5VYGWYO.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-TF6NAIV7.js";import"../../chunk-ZKY45F5G.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-NDRZP6YR.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-VTY7OQB5.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-G7J6SGMF.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MNQDOSAX.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-ANBPE45L.js";import"../../chunk-C63IB4VW.js";import"../../chunk-DX3VILZ3.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-UMTUKSE6.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-DQSRGKSM.js";import"../../chunk-TQ5Y6S2X.js";import"../../chunk-QEEW4X64.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-6GJEOER4.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-YDTEYXQW.js";import"../../chunk-KXM6YRG2.js";import"../../chunk-BSPCSC45.js";import"../../chunk-467WWV4I.js";import"../../chunk-TIAWIOGD.js";import"../../chunk-MGVI67QV.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import '../../blocks/index.js';
|
|
3
|
-
export { q as AnyScreenTarget, r as DocumentTarget, s as ScreenDocumentContext, t as ScreenDocumentProvider, v as ScreenDocumentValue, w as ScreenTarget, x as useScreenDocument } from '../../ScreenDocumentContext-
|
|
3
|
+
export { q as AnyScreenTarget, r as DocumentTarget, s as ScreenDocumentContext, t as ScreenDocumentProvider, v as ScreenDocumentValue, w as ScreenTarget, x as useScreenDocument } from '../../ScreenDocumentContext-JQr4hTeP.js';
|
|
4
4
|
import '../lib/document-contract.js';
|
|
5
5
|
export { SaveStatus } from '../lib/document-switch.js';
|
|
6
6
|
import '../lib/admin-bridge.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { q as AnyScreenTarget, A as AnyDocumentAddressing } from '../../ScreenDocumentContext-
|
|
4
|
-
import { ScreenParts } from '
|
|
3
|
+
import { q as AnyScreenTarget, A as AnyDocumentAddressing } from '../../ScreenDocumentContext-JQr4hTeP.js';
|
|
4
|
+
import { G as ScreenParts } from '../../AddSidePanel-DoCx-ZrM.js';
|
|
5
5
|
import '../../blocks/index.js';
|
|
6
6
|
import '../../types-BljCVdzR.js';
|
|
7
7
|
import '../../data/index.js';
|
|
@@ -36,8 +36,6 @@ import '../../style-clipboard/index.js';
|
|
|
36
36
|
import '../../words-CnnHb9jo.js';
|
|
37
37
|
import '../../types-CoUTWUwB.js';
|
|
38
38
|
import '../../words-Cl9xMUYY.js';
|
|
39
|
-
import '../lib/document/add-target-types.js';
|
|
40
|
-
import '../lib/document/slot-section-spec.js';
|
|
41
39
|
|
|
42
40
|
/**
|
|
43
41
|
* The document's provider, round whatever a layer stands under it. The layer's
|