efficient-easel 13.1.0 → 13.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.
Files changed (52) hide show
  1. package/README.md +5 -2
  2. package/dist/chunk-27CDEFBE.js +1 -0
  3. package/dist/chunk-2MGZTBPF.js +5 -0
  4. package/dist/{chunk-WBQTAVPN.js → chunk-2QX2VB2C.js} +17 -17
  5. package/dist/{chunk-3Z2MVLCD.js → chunk-4ES5JGGX.js} +1 -1
  6. package/dist/{chunk-PVAIOBBE.js → chunk-6LYK3NGW.js} +8 -8
  7. package/dist/chunk-AKZ4QYHO.js +1 -0
  8. package/dist/chunk-BPXEFVSQ.js +1 -0
  9. package/dist/chunk-CHXJDSUC.js +57 -0
  10. package/dist/chunk-E7EIYXXM.js +5 -0
  11. package/dist/{chunk-4EI6UGGH.js → chunk-ET6FNSRA.js} +1 -1
  12. package/dist/{chunk-NBDMTIU2.js → chunk-HV56SLR2.js} +2 -2
  13. package/dist/{chunk-3NFPN36B.js → chunk-L25TTU2F.js} +1 -1
  14. package/dist/chunk-L3GSW4XI.js +1 -0
  15. package/dist/{chunk-RLNKDNDW.js → chunk-L7PSXVI3.js} +4 -4
  16. package/dist/{chunk-UY7OJPYJ.js → chunk-LER7RKTO.js} +1 -1
  17. package/dist/{chunk-CLH24KFA.js → chunk-QHSYHB4W.js} +1 -1
  18. package/dist/{chunk-3WDI2OE5.js → chunk-SMP54RNN.js} +1 -1
  19. package/dist/{chunk-LOMSP2JS.js → chunk-W26HUPPC.js} +1 -1
  20. package/dist/draw/index.d.ts +2 -0
  21. package/dist/draw/index.js +1 -1
  22. package/dist/easel/index.js +1 -1
  23. package/dist/fields/index.d.ts +4 -10
  24. package/dist/fields/index.js +1 -1
  25. package/dist/panel/index.js +1 -1
  26. package/dist/screen/components/AddBlockRow.js +1 -1
  27. package/dist/screen/components/AddSidePanel.js +1 -1
  28. package/dist/screen/components/MediaSidePanel.js +1 -1
  29. package/dist/screen/components/ScreenChrome.js +1 -1
  30. package/dist/screen/components/ScreenMount.js +1 -1
  31. package/dist/screen/components/ScreenStoreProvider.js +1 -1
  32. package/dist/screen/components/SectionScreenShell.js +16 -16
  33. package/dist/screen/components/usePartBridge.js +1 -1
  34. package/dist/screen/index.js +1 -1
  35. package/dist/screen/lib/key-scope.js +1 -1
  36. package/dist/screen/lib/puck/device-fields.js +1 -1
  37. package/dist/screen/lib/puck/panel-fields.js +1 -1
  38. package/dist/screen/lib/puck/preview-dom.js +1 -1
  39. package/dist/screen/lib/puck/style-clipboard.js +1 -1
  40. package/dist/screen/lib/puck/use-section-ops.js +1 -1
  41. package/dist/screen/lib/screen-parts.js +1 -1
  42. package/dist/strings/catalogue.js +1 -1
  43. package/dist/strings/index.js +1 -1
  44. package/dist/text-styles/index.js +20 -20
  45. package/package.json +111 -3
  46. package/dist/chunk-6AIWFUNY.js +0 -1
  47. package/dist/chunk-IKLK6Y34.js +0 -5
  48. package/dist/chunk-P6YFPSUO.js +0 -1
  49. package/dist/chunk-Q7SJFJN3.js +0 -1
  50. package/dist/chunk-QCDABW3O.js +0 -57
  51. package/dist/chunk-UHMRPY3R.js +0 -5
  52. package/dist/chunk-YAFVODLX.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-easel",
3
- "version": "13.1.0",
3
+ "version": "13.2.0",
4
4
  "description": "Efficient Easel: the EFFICIENT editors' shared engine and chrome: the saved document as pure functions, the published renderer, and the editor frame, panels, Layers tree, text grammar and type-in-place box. Published as editor-shell up to 0.66.0 and as efficient-editor up to 0.95.0.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Efficient Pty Ltd",
@@ -22,6 +22,113 @@
22
22
  "main": "./dist/index.js",
23
23
  "module": "./dist/index.js",
24
24
  "types": "./dist/index.d.ts",
25
+ "entryGroups": {
26
+ "render": [
27
+ "./render",
28
+ "./draw",
29
+ "./draw/client",
30
+ "./blocks",
31
+ "./screen/lib/session",
32
+ "./screen/components/PreviewDeviceContext",
33
+ "./screen/components/UiIcon",
34
+ "./screen/lib/content/view-tiers",
35
+ "./screen/lib/puck/content-tree",
36
+ "./screen/lib/puck/hidable",
37
+ "./screen/lib/puck/slot-child-name"
38
+ ],
39
+ "editor": [
40
+ ".",
41
+ "./rail",
42
+ "./icons",
43
+ "./icons/meanings",
44
+ "./menu",
45
+ "./panel",
46
+ "./shell",
47
+ "./chrome",
48
+ "./tree",
49
+ "./data",
50
+ "./node-ops",
51
+ "./drag",
52
+ "./pick",
53
+ "./fields",
54
+ "./text-styles",
55
+ "./text-styles/model",
56
+ "./easel",
57
+ "./autosave",
58
+ "./canvas",
59
+ "./edit-lock",
60
+ "./copy",
61
+ "./gold",
62
+ "./markup",
63
+ "./style-clipboard",
64
+ "./strings",
65
+ "./strings/catalogue",
66
+ "./screen/components/AddBlockRow",
67
+ "./screen/components/AddChildRow",
68
+ "./screen/components/AddSidePanel",
69
+ "./screen/components/MediaSidePanel",
70
+ "./screen/components/NodeContextMenu",
71
+ "./screen/components/PageEditGuardNotices",
72
+ "./screen/components/PanelToggleIcon",
73
+ "./screen/components/PreviewPartsContext",
74
+ "./screen/components/SaveControls",
75
+ "./screen/components/ScreenChrome",
76
+ "./screen/components/ScreenDocumentContext",
77
+ "./screen/components/ScreenMount",
78
+ "./screen/components/ScreenStoreProvider",
79
+ "./screen/components/SectionScreenShell",
80
+ "./screen/components/SidePanelHead",
81
+ "./screen/components/SlotChildActionsContext",
82
+ "./screen/components/panel-widths",
83
+ "./screen/components/usePartBridge",
84
+ "./screen",
85
+ "./screen/lib/admin-bridge",
86
+ "./screen/lib/backend-error",
87
+ "./screen/lib/chrome-theme",
88
+ "./screen/lib/client-only",
89
+ "./screen/lib/document-addressing",
90
+ "./screen/lib/document-contract",
91
+ "./screen/lib/document-hooks",
92
+ "./screen/lib/document-switch",
93
+ "./screen/lib/failure",
94
+ "./screen/lib/host",
95
+ "./screen/lib/host-chrome",
96
+ "./screen/lib/host-inbound",
97
+ "./screen/lib/key-scope",
98
+ "./screen/lib/links/link-filters",
99
+ "./screen/lib/load-error",
100
+ "./screen/lib/media-panel",
101
+ "./screen/lib/media-picker",
102
+ "./screen/lib/page-lock",
103
+ "./screen/lib/puck/add-target-types",
104
+ "./screen/lib/puck/block-choice",
105
+ "./screen/lib/puck/block-types-in",
106
+ "./screen/lib/puck/device-fields",
107
+ "./screen/lib/puck/field-buckets",
108
+ "./screen/lib/puck/field-markers",
109
+ "./screen/lib/puck/palette-sections",
110
+ "./screen/lib/puck/panel-fields",
111
+ "./screen/lib/puck/panel-no-control-mark",
112
+ "./screen/lib/puck/part-id",
113
+ "./screen/lib/puck/preview-click",
114
+ "./screen/lib/puck/preview-dom",
115
+ "./screen/lib/puck/preview-events",
116
+ "./screen/lib/puck/preview-selection-context",
117
+ "./screen/lib/puck/section-doc",
118
+ "./screen/lib/puck/slot-heal",
119
+ "./screen/lib/puck/slot-section-spec",
120
+ "./screen/lib/puck/style-clipboard",
121
+ "./screen/lib/puck/text-control-kinds",
122
+ "./screen/lib/puck/tree-reveal",
123
+ "./screen/lib/puck/use-section-ops",
124
+ "./screen/lib/save-status",
125
+ "./screen/lib/screen-parts",
126
+ "./screen/lib/section-template-types",
127
+ "./screen/lib/section-templates",
128
+ "./screen/lib/session-context",
129
+ "./screen/words"
130
+ ]
131
+ },
25
132
  "exports": {
26
133
  ".": {
27
134
  "types": "./dist/index.d.ts",
@@ -547,7 +654,7 @@
547
654
  "dist"
548
655
  ],
549
656
  "peerDependencies": {
550
- "efficient-shell": "^7.71.0",
657
+ "efficient-shell": "^7.74.0 || ^8.0.0",
551
658
  "react": ">=18",
552
659
  "react-dom": ">=18"
553
660
  },
@@ -557,7 +664,7 @@
557
664
  "@types/node": "^22.0.0",
558
665
  "@types/react": "^18.2.0",
559
666
  "@types/react-dom": "^18.2.0",
560
- "efficient-shell": "^7.71.0",
667
+ "efficient-shell": "^8.0.0",
561
668
  "esbuild": "^0.27.0",
562
669
  "jsdom": "^26.1.0",
563
670
  "react": "^18.2.0",
@@ -574,6 +681,7 @@
574
681
  "test": "efficient-shell-ui-check && node scripts/test.mjs",
575
682
  "check:ui-kit": "efficient-shell-ui-check",
576
683
  "verify:exports": "node scripts/verify-exports-resolve.mjs",
684
+ "verify:render-graph": "node scripts/verify-render-graph.mjs",
577
685
  "clean": "rm -rf dist"
578
686
  },
579
687
  "keywords": [
@@ -1 +0,0 @@
1
- import{useSectionOps as o}from"./chunk-3NFPN36B.js";import{SELECTION_MODE as e}from"./chunk-UHMRPY3R.js";import{usePreviewParts as r}from"./chunk-I54UCYOU.js";import{decodePartId as t,encodePartId as n}from"./chunk-IYT6NN2J.js";import{useEasel as p}from"./chunk-PVAIOBBE.js";import{useCallback as d,useEffect as c}from"react";var s=o=>"part"===o.kind;function m({mode:m,setMode:i,onOpenPart:I}){const{getSelectorForId:a}=p(o=>o),u=o(),{setSelectedPartId:f,setSelectHandler:k}=r(),l=d(o=>{const r=t(o);if(!r)return;const{nodeId:n,propKey:p}=r;p?(i(o=>s(o)&&o.nodeId===n&&o.propKey===p?o:{kind:"part",nodeId:n,propKey:p}),I?.(n)):i(o=>"part"===o.kind?e:o)},[i,I]);c(()=>{k(l)},[k,l]);const P=s(m)?n(m.nodeId,m.propKey):null;c(()=>{f(P)},[P,f]);return{selectNode:d(o=>{i(()=>e);const r=a(o);r&&u.select(r)},[i,a,u]),openPartId:P}}export{m as usePartBridge};
@@ -1,5 +0,0 @@
1
- import{buildPaletteSections as e,pinnedSection as t,categoryLabel as o}from"./chunk-PA3PNTVV.js";import{sectionTemplatesOf as n}from"./chunk-BVN33R76.js";import{blockTypesIn as s}from"./chunk-5ZBY24K7.js";import{SidePanelHead as i,PanelModeExit as r}from"./chunk-62VPYC7F.js";import{blockRuns as l}from"./chunk-HQ4VVRIC.js";import{useScreenBlockLook as c,useScreenBlockRules as a}from"./chunk-UHMRPY3R.js";import{useEaselSession as p}from"./chunk-O7Q4DDJT.js";import{DEFAULT_SCREEN_WORDS as m}from"./chunk-VVPZMWJE.js";import{useEasel as d}from"./chunk-PVAIOBBE.js";import{useWords as f}from"./chunk-MFIRYGHW.js";import{AddPanel as y}from"./chunk-QFVRMARS.js";import{DEFAULT_DRAG_WORDS as h}from"./chunk-AYWN5NRH.js";import{useState as u,useEffect as k,useMemo as b}from"react";import{AddIcon as g}from"efficient-shell/icons/efficient";import{jsx as j,jsxs as v,Fragment as V}from"react/jsx-runtime";var R=e=>`section:${e}`,A=e=>`block:${e}`,B=e=>`template:${e}`;function E({at:E,placeBlocks:O,canTake:P,onPick:$,itemFor:w,session:H,siteWide:I,onClose:N,onHide:x,readOnly:F}){const M=d(e=>e.config),T=c(),{labelAtLevel:W,categoryLabel:Y,firstSection:C,Icon:L,Thumbnail:D}=T,{blockIsOffered:Q,canAddTo:S}=a(),z=f("screen",m).add,J=f("drag",h).add,Z=p(),[G,K]=u([]);k(()=>{let e=!1;const t=e=>Q(e,Z);return n(Z).list().then(o=>{if(e)return;const n=M.components;K(o.filter(e=>e.node?.type&&n[e.node.type]&&s(e.node).every(t)))}).catch(()=>{}),()=>{e=!0}},[M,Z]);const U=b(()=>e(M,T),[M]),q=e=>({type:R(e.type),label:e.name,cover:/* @__PURE__ */j(D,{type:e.type}),title:e.desc?`${e.name} — ${e.desc}`:z.tile({name:e.name}),keywords:[e.alias??"",e.desc,e.type,e.catLabel].filter(Boolean)}),X=e=>{const t=e.indexOf(":"),o=e.slice(0,t),n=e.slice(t+1);if("section"===o)return{kind:"section",type:n};if("block"===o)return{kind:"block",type:n};if("template"===o){const e=G.find(e=>e.id===n);return e?{kind:"template",template:e}:null}return null},_=e=>/* @__PURE__ */j("span",{className:"es-add-glyph-cover",children:/* @__PURE__ */j(L,{type:e,size:26})}),ee=b(()=>{const e=t(U,C),n=/* @__PURE__ */new Map,s=e=>{!n.has(e.type)&&Q(e.type,Z)&&n.set(e.type,e)};for(const t of e?[e]:U){const e=S(t.type)?.choices??[];e.forEach(s),e.forEach(e=>S(e.type,1)?.choices?.forEach(s))}O?.forEach(s);const i=new Set(U.map(e=>e.type)),r=[...n.values()].filter(e=>!i.has(e.type)),c=e=>({type:A(e.type),label:e.label,cover:_(e.type),title:z.tile({name:e.label}),keywords:[e.group??"",e.type].filter(Boolean)}),a=e=>n.has(e.type)?{...q(e),cover:_(e.type)}:q(e),p=[];G.length>0&&p.push({key:"templates",title:z.templates,tiles:G.map(e=>{return{type:B(e.id),label:e.name,cover:/* @__PURE__ */j(D,{type:e.node.type}),keywords:[(t=e.node.type,W(t,"section",M.components[t]?.label??t)),e.node.type]};var t})});const m=r.filter(e=>!e.group);let d=!1;for(const t of Object.keys(M.categories??{})){const n=U.filter(e=>e.cat===t);if(0===n.length)continue;const s=e&&n.some(t=>t.type===e.type)?e:null,i=(s?[s,...n.filter(e=>e.type!==s.type)]:n).map(a);s&&!d&&(i.splice(1,0,...m.map(c)),d=!0),p.push({key:`category:${t}`,title:o(M,t,Y),tiles:i})}const f=p.find(e=>e.key?.startsWith("category:"));if(!d&&f&&m.length>0&&(f.tiles=[...f.tiles,...m.map(c)],d=!0),l(r.filter(e=>e.group||!d)).forEach((e,t)=>{p.push({key:`blocks:${t}`,title:e.group??"",tiles:e.items.map(c)})}),!P)return p;const y=p.map(e=>({...e,tiles:e.tiles.map(e=>{const t=X(e.type),o=t?P(t):null;return o?{...e,disabled:!0,disabledReason:o}:e})})),h=e=>e.tiles.some(e=>!e.disabled);return[...y.filter(h),...y.filter(e=>!h(e))]},[G,U,M,z,P,O,Z]);/* @__PURE__ */
2
- return v(V,{children:[
3
- /* @__PURE__ */j(i,{icon:/* @__PURE__ */j(g,{size:15}),title:z.title,context:z.contextAll,actions:/* @__PURE__ */j(r,{label:z.done,description:z.doneDescription,onClick:N}),onHide:x}),
4
- /* @__PURE__ */v("div",{className:"sf-addside sf-scroll",children:[
5
- /* @__PURE__ */j(y,{groups:ee,session:H,itemFor:e=>w(X(e)??{kind:"section",type:e}),onInsert:$?e=>{const t=X(e);t&&$(t)}:void 0,at:E,hint:z.hint,searchLabel:z.search,readOnly:F,words:J}),I??null]})]})}export{E as AddSidePanel,A as blockKey,R as sectionKey,B as templateKey};
@@ -1 +0,0 @@
1
- import{withoutDeviceGate as t,deviceMetaOf as o}from"./chunk-NBDMTIU2.js";import{DESIGN_GROUP_KEY as n,BUCKET_KEY as e}from"./chunk-MQNBD6AB.js";import{panelFieldsOf as r}from"./chunk-UY7OJPYJ.js";import{STYLE_KIND as s,fieldKind as c,copyStyle as i,heldStyle as p,planPaste as u,pasteMessage as a}from"./chunk-V7U33NF2.js";import{ANCHOR_FIELD_KEYS as f,foldMetaOf as l,MEDIA_FIELD_MARKER as m,TEXT_FIELD_MARKER as h,LINK_FIELD_MARKER as y}from"./chunk-DUVRZ456.js";var j=/* @__PURE__ */new Set([n.Size,n.Design,n.Layout,n.Position]),w=new Set(Object.values(n)),b=new Set(Object.values(e)),S=new Set(f),g=/* @__PURE__ */new Set(["focal","imageFocal"]),k=[m,h,y];function v(t){return`site:${t??""}`}function D(o){if(!o||"object"!=typeof o)return null;const n=o,e=t(o)??o,r=n[s]??e[s];if("string"==typeof r)return r;const i=n.options??e.options;if(Array.isArray(i)){return`choice:${i.map(t=>String(t?.value)).sort().join("|")}`}return c(e)}function O(o){const n=o,e=t(o);return k.some(t=>t in n||e&&t in e)}function U(t,n){const s=r(t,n)??{},c=[];let i=!0,p=!1;for(const[t,n]of Object.entries(s))b.has(t)?(i=t===e.Design,p=!1):w.has(t)?i&&(p=j.has(t)):p&&n&&"object"==typeof n&&!t.startsWith("_")&&(l(n)||S.has(t)||g.has(t)||O(n)||"slot"!==n.type&&c.push({path:[t],kind:D(n),counted:"mobile"!==o(n)?.tier}));return c}function d(t,o,n,e,r){i({scope:n,type:e.type,label:r,rows:t(o,e),props:e.props})}function A(t,o,n,e,r,s){const c=p(n);if(!c)return null;const i=u(c,{type:e.type,rows:t(o,e),props:e.props});return{...i,message:a(i,c.sourceLabel,r,s)}}function B(t,o,n,e){d(U,t,o,n,e)}function N(t,o,n,e,r){return A(U,t,o,n,e,r)}var F={scope:t=>v(t.siteId),rows:(t,o)=>U(t,o),copy:(t,o,n,e)=>B(e,t,o,n),plan:(t,o,n,e)=>N(e,t,o,n)};function I(t,o){if(!t&&!o)return F;const n=t?.rows,e=n?(t,o)=>n(t,o):U;return{scope:t?.scope??F.scope,rows:(t,o)=>e(t,o),copy:t?.copy??((t,o,n,r)=>d(e,r,t,o,n)),plan:t?.plan??((t,n,r,s)=>A(e,s,t,n,r,o))}}export{B as copyNodeStyle,U as nodeStyleRows,N as planNodePaste,D as shopFieldKind,v as siteStyleScope,I as styleClipboardOf};
@@ -1 +0,0 @@
1
- import{isShown as t}from"efficient-shell/ui";function n(t,n){return{...t,showWhen:n}}function e(t){return t&&"object"==typeof t?t.showWhen:void 0}function o(n,o){return t(e(n),o.values??{},o.context??{})}function r(t,n){let e=!1;const r={};for(const[c,f]of Object.entries(t))o(f,n)?r[c]=f:e=!0;return e?r:t}export{o as fieldIsShown,e as showWhenOf,r as shownFields,n as withShowWhen};
@@ -1,57 +0,0 @@
1
- import{styleClipboardOf as e}from"./chunk-P6YFPSUO.js";import{markedTreeNodeId as n,revealSelectedTreeRow as t,sameSelector as o}from"./chunk-FGNR22NY.js";import{cloneNodeWithFreshIds as r}from"./chunk-2GVCAIPX.js";import{dedupeSlotChildren as i}from"./chunk-26OOWIJJ.js";import{ScreenSaveIcon as l,ScreenMainButton as s}from"./chunk-W4U4SHKW.js";import{useBrowserOffline as d}from"./chunk-RKTF5XLP.js";import{scrollPreviewToSection as c,gotoPreviewSlide as a,scrollPreviewToTop as p}from"./chunk-3Z2MVLCD.js";import{useEaselKeyTarget as u,useEaselUndoKeys as f,useEaselSaveKey as h,editorRootFocus as m}from"./chunk-4EI6UGGH.js";import{SlotChildActionsProvider as g}from"./chunk-KCBEE2MC.js";import{screenStorageKeys as y,DEFAULT_PANEL_W as k,clampPanelWidth as S}from"./chunk-TZIIRGVY.js";import{usePartBridge as v}from"./chunk-6AIWFUNY.js";import{useSectionOps as b}from"./chunk-3NFPN36B.js";import{AddChildRow as w}from"./chunk-5545A3PC.js";import{AddSidePanel as x}from"./chunk-IKLK6Y34.js";import{SidePanelHead as z,PanelShowStrip as C}from"./chunk-62VPYC7F.js";import{MediaSidePanel as I}from"./chunk-3WDI2OE5.js";import{useScreenSaveSwitch as B,useScreenNodeKeys as N,useScreenPinned as O,useScreenDocumentLabel as P,useScreenCanvasFrame as $,useScreenInspectorPanel as M,useScreenDevices as j,useScreenPickFollowsSelection as A,useScreenLeftView as T,SELECTION_MODE as L,sameInspectorMode as R,useScreenBridges as E,useScreenBlockRules as V,useScreenBlockLook as F,useScreenStorageNamespace as W,useScreenNotify as H,useScreenCanvasHead as D,isSlotMode as U,useScreenStyleClipboard as Y,useScreenDocumentPass as G,useScreenCanvasDrag as J,ScreenCanvasTargetProvider as K,isPinnedFirst as X,isPinnedLast as q,screenSlotsOf as _}from"./chunk-UHMRPY3R.js";import{useNodeClipboard as Z,useNodeContextMenu as Q}from"./chunk-NW4LJ4G4.js";import{PageEditGuardNotices as ee}from"./chunk-IWFVVCRN.js";import{useScreenDocument as ne}from"./chunk-FBS75I6E.js";import{requestMediaPick as te}from"./chunk-KG7RJWOK.js";import{useMediaPanel as oe,usePanelPick as re,useCancelPanelPick as ie}from"./chunk-R6WTQWAC.js";import{useEaselSession as le}from"./chunk-O7Q4DDJT.js";import{useEaselHost as se,useHostEscape as de}from"./chunk-U3JP4VGF.js";import{DEFAULT_SCREEN_WORDS as ce}from"./chunk-VVPZMWJE.js";import{heldStyle as ae,styleShortcut as pe}from"./chunk-V7U33NF2.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as ue}from"./chunk-6WY6ZXJG.js";import{DEFAULT_NODE_MENU_WORDS as fe}from"./chunk-WK3AFPXY.js";import{rootRowName as he,slotChildRowName as me,slotChildRenameProp as ge,sectionRenameProp as ye}from"./chunk-TBF5CVPA.js";import{ROOT_ZONE as ke,blockNodeActions as Se,TREE_MAX_DEPTH as ve,childSlotsOf as be,slotFieldsOf as we,slotChildrenIn as xe,nestsInTree as ze,newNodeId as Ce}from"./chunk-PLVEGYK6.js";import{useEasel as Ie,useEaselApi as Be,CanvasPassThroughContext as Ne}from"./chunk-PVAIOBBE.js";import{toItemSelector as Oe,useNodeOps as Pe,clickPick as $e}from"./chunk-ECM5F6JJ.js";import{TreeRow as Me,Subtree as je,LayersTree as Ae,TreeGroupLabel as Te,TreeRowAction as Le,TreeSeam as Re}from"./chunk-4JSBIW5H.js";import{DEFAULT_TREE_WORDS as Ee}from"./chunk-K56YDHYQ.js";import{LayersIcon as Ve,MediaIcon as Fe}from"./chunk-4VJATVVR.js";import{EaselTopBar as We,TopBarRail as He,TopBarCluster as De,EaselIconButton as Ue,TopBarDivider as Ye,DeviceSwitch as Ge,InspectorIconButton as Je,PanelResizeHandle as Ke,MAX_PANEL_W as Xe,MIN_PANEL_W as qe,panelWidthVars as _e}from"./chunk-IE55HNMA.js";import{DEFAULT_NOTICE_WORDS as Ze,DEFAULT_CHROME_WORDS as Qe}from"./chunk-Z6PVRXVY.js";import{holderOf as en,nameOrSomeone as nn}from"./chunk-THWO5YVZ.js";import{DEFAULT_LOCK_WORDS as tn}from"./chunk-RE4LP46F.js";import{useWords as on}from"./chunk-MFIRYGHW.js";import{insertSeams as rn,CanvasDragLayer as ln,CanvasInsert as sn}from"./chunk-QFVRMARS.js";import{DEFAULT_DRAG_WORDS as dn}from"./chunk-AYWN5NRH.js";import{createDragSession as cn,useTreeDrag as an,gapToMoveIndex as pn}from"./chunk-67GNT6PF.js";import{useCanvasFrame as un,LIST_SELECTOR as fn,BLOCK_SELECTOR as hn,useCanvasEvent as mn,nodeIdAt as gn,frameRectToHost as yn,BLOCK_ATTRIBUTE as kn,drawnBox as Sn}from"./chunk-ILXP5VX5.js";import{ROOT_ID as vn,ROOT_SLOT as bn,zoneKey as wn,parseZoneKey as xn,find as zn,DataError as Cn}from"./chunk-KRXQM65X.js";import{useRef as In,useMemo as Bn,useState as Nn,useEffect as On,useCallback as Pn,useLayoutEffect as $n,Fragment as Mn}from"react";import{ColoredBadge as jn,toast as An,groupColors as Tn}from"efficient-shell/ui";import{UndoIcon as Ln,RedoIcon as Rn,RefreshIcon as En,AddIcon as Vn,TrashIcon as Fn,EyeOffIcon as Wn,EyeIcon as Hn,DuplicateIcon as Dn}from"efficient-shell/icons/efficient";import{jsx as Un,jsxs as Yn,Fragment as Gn}from"react/jsx-runtime";var Jn=/* @__PURE__ */new WeakSet;function Kn(e,n,t){const o=zn(e,n,t);if(!o)return null;const r=o.path.find(e=>"root"!==e.parentId);return r?r.parentId:t}function Xn({canvas:e,tabs:n,onSelect:t}){const o=In(null),[r,i]=Nn({}),l=n.map(e=>`${e.id}:${e.below?1:0}`).join("|");return $n(()=>{const t=e?.document,r=e?.window,l=e?.frame;if(!t||!r||!l||0===n.length)return void i({});let s=0;const d=()=>{s=0;const e=o.current;if(!e)return;const d=yn(l,{left:0,top:0,width:r.innerWidth,height:r.innerHeight},e),c={};for(const o of n){const n=t.querySelector(`[${kn}="${r.CSS?.escape?r.CSS.escape(o.id):o.id}"]`),i=n?Sn(n):null;if(!i||0===i.height){c[o.id]=null;continue}const s=yn(l,{left:i.left,top:i.top,width:i.width,height:i.height},e),a=s.top+s.height;if(a<d.top||s.top>d.top+d.height){c[o.id]=null;continue}const p=o.below?a+4:Math.max(s.top,d.top)+6;c[o.id]={left:Math.max(s.left,d.left)+6,top:p}}i(c)},c=()=>{s||(s=r.requestAnimationFrame(d))};d(),r.addEventListener("scroll",c,!0),r.addEventListener("resize",c);const a=new r.MutationObserver(c);return a.observe(t.body,{childList:!0,subtree:!0,attributes:!0}),()=>{s&&r.cancelAnimationFrame(s),r.removeEventListener("scroll",c,!0),r.removeEventListener("resize",c),a.disconnect()}},[e,l]),/* @__PURE__ */Un("div",{ref:o,className:"es-band-tabs","aria-hidden":"true",children:n.map(e=>{const n=r[e.id];return n?/* @__PURE__ */Un("span",{className:"es-band-tab","data-band-tab":e.id,style:{left:n.left,top:n.top},onClick:n=>{n.stopPropagation(),t(e.id)},children:/* @__PURE__ */Un(jn,{colorClass:Tn("info","solid"),size:"sm",children:e.label})},e.id):null})})}function qn({expand:e}){/* @__PURE__ */
2
- return Un("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.9,strokeLinecap:"round",strokeLinejoin:"round",children:/* @__PURE__ */Yn(Gn,e?{children:[
3
- /* @__PURE__ */Un("path",{d:"M8 9l4-4 4 4"}),
4
- /* @__PURE__ */Un("path",{d:"M8 15l4 4 4-4"})]}:{children:[
5
- /* @__PURE__ */Un("path",{d:"M8 4l4 4 4-4"}),
6
- /* @__PURE__ */Un("path",{d:"M8 20l4-4 4 4"}),
7
- /* @__PURE__ */Un("path",{d:"M5 12h14"})]})})}var _n=`${fn}, ${hn}`;function Zn(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 Qn="__rungs";var et="screen:band",nt={duplicate:!0,delete:!0};function tt(){const fn=se(),{target:yn,docId:kn,capabilities:Sn,currentSlug:Tn,siteId:tt,onPublish:ot,saveState:rt,saveConflict:it,retrySave:lt,toggleAutoSave:st,flushSave:dt,access:ct,saveUnreachable:at=!1,readOnly:pt,readOnlyReason:ut=null}=ne(),ft=B(),ht=N(),{mediaEditing:mt,hasEditGuard:gt,hasPinnedChrome:yt}=Sn,{appState:kt,dispatch:St,history:vt,selectedItem:bt,getSelectorForId:wt,config:xt}=Ie(e=>e),zt=O(),{first:Ct,firstGroup:It,lastGroup:Bt,isSectionGroup:Nt,sectionGroupZone:Ot,panelOf:Pt}=zt,$t=Pt(Ct),Mt=e=>X(zt,e),jt=e=>q(zt,e),At="node"===zt.firstRow,Tt=zt.band??null,Lt=on("screen",ce),Rt=on("tree",Ee),Et=on("drag",dn),Vt=on("notice",Ze),Ft=on("lock",tn),Wt=on("menu",fe),Ht=on("styleClipboard",ue),Dt=on("chrome",Qe),Ut=P()??`/${Tn}`,Yt=$(),Gt=M(),Jt=b({readOnly:pt}),Kt=b({readOnly:pt,foldIntoHistory:!0}),Xt=In(null),qt=Be(),_t=Bn(()=>({...Jt,select:e=>{Xt.current=e,Jt.select(e)},commitDocument:(e,n)=>{if(void 0!==n){const t=qt.config;Xt.current=Oe(e,t,n)}Jt.commitDocument(e,n)}}),[Jt,qt]),Zt=kt.ui,Qt=Zt.leftSideBarVisible,eo=Zt.rightSideBarVisible,{options:no,widths:to,initial:oo,fluid:ro,fit:io}=j(),[lo,so]=Nn(oo),co=oe(),ao=mt&&null!==co,po=re(),uo=ie();A(bt?.props.id);const{read:fo,write:ho,forSelection:mo}=T(),[go,yo]=Nn(fo);On(()=>{ho(go)},[go]);const[ko,So]=Nn(0),vo=In(null),bo=In(null),wo=un(bo,{readySelector:_n}),xo=u(bo);f(bo,wo);const zo=d(),Co=en(ct),Io={state:rt,offline:zo||rt.failed&&at,readOnlyReason:ut,editing:Co?Vt.editing({name:nn(Co.name,Ft),noun:Lt.noun}):null,conflict:null!=it,notSaving:Lt.bar.notSaving},Bo=()=>{pt||(rt.failed?lt():dt())};h(bo,wo,Bo);const[No,Oo]=Nn(!1),Po=In(!1),$o=In(!1),[Mo,jo]=Nn(null),[Ao,To]=Nn([]),[Lo,Ro]=Nn(L),Eo="puck"===Lo.kind,Vo=n(Lo,bt?.props.id),[Fo,Wo]=Nn(null);On(()=>{Fo&&(t(),Wo(null))},[Fo]);const Ho=In(wt);Ho.current=wt;const Do=Pn((e,{scroll:n})=>{yo(n=>mo(e,n)),n&&Wo(e);const t=[];let o=e;for(let e=0;e<4;e++){const e=Ho.current(o)?.zone;if(!e||!e.includes(":"))break;const n=e.split(":")[0];t.push(n),t.push(e),o=n}0!==t.length&&Sr(e=>{if(t.every(n=>!e.has(n)))return e;const n=new Set(e);return t.forEach(e=>n.delete(e)),n})},[]),Uo=In(null);On(()=>{const e=Uo.current;Uo.current=null;const n=null==bt?.props.id?null:String(bt.props.id);Ro(t=>e&&e.id===n?e.mode:"part"===t.kind&&"nodeId"in t&&t.nodeId===n?t:Pt(bt?.type)??L);const t=bt?.props.id,r=Xt.current;if(Xt.current=null,!t)return;const i=wt(t);Do(String(t),{scroll:!o(r,i??null,ke)})},[bt?.props.id,Do]);const Yo=Pn(e=>{Ro(n=>R(n,e)?n:e),St({type:"setUi",ui:{rightSideBarVisible:!0}})},[St]),Go=In(()=>{});Go.current=(e,n)=>{const t=e?ui(e.zone??ke)[e.index]?.props.id:null,o=null==t?null:String(t),r=null==bt?.props.id?null:String(bt.props.id);Ro(e=>R(e,n)?e:n),o!==r&&(Uo.current={id:o,mode:n},_t.select(e))};const Jo=Pn((e,n)=>Go.current(e,n),[]),Ko={kind:Lo.kind,mode:Lo,open:Yo,show:e=>Ro(e),reveal:()=>{eo||St({type:"setUi",ui:{rightSideBarVisible:!0}})},select:Jo},Xo=E(Ko,{data:kt.data,selected:bt??null,zoneOf:e=>wt(e)?.zone,readOnly:Boolean(pt),select:e=>{Ro(L),_t.select({index:e})},replace:(e,n)=>_t.replaceComponent(ke,e,n),scrollTo:e=>Ri(e)},{device:lo,refreshes:ko},{setView:yo,reveal:()=>{Qt||St({type:"setUi",ui:{leftSideBarVisible:!0}})}}),qo=Xo.pinnedSource??!1,_o=Xo.resolveLeftView?Xo.resolveLeftView(go,ao):"media"===go&&ao?go:"sections",Zo=V(),{isLockedBlock:Qo,duplicateBlocked:er,nestDepth:nr,newSectionNode:tr,canAddTo:or,blockIsOffered:rr}=Zo,ir=F(),{labelAtLevel:lr,Icon:sr,useProducts:dr}=ir,cr=ir.rowName?(e,n,t)=>ir.rowName(e,n,t):void 0,ar=Pn(e=>{St({type:"setUi",ui:{rightSideBarVisible:!0}}),c(e),Do(e,{scroll:!0})},[St,Do]),{selectNode:pr,openPartId:ur}=v({mode:Lo,setMode:Ro,onOpenPart:ar}),[fr,hr]=Nn(null);de(null!==fr,()=>hr(null));const mr=y(W()),gr=mr.collapsed,yr=mr.panelWidths,[kr,Sr]=Nn(()=>{if("undefined"==typeof window)/* @__PURE__ */return new Set;try{const e=window.localStorage.getItem(gr);return new Set(e?JSON.parse(e):[])}catch{/* @__PURE__ */
8
- return new Set}});On(()=>{try{window.localStorage.setItem(gr,JSON.stringify([...kr]))}catch{}},[kr]);const[vr,br]=Nn(()=>{if("undefined"==typeof window)return{...k};try{const e=window.localStorage.getItem(yr);if(!e)return{...k};const n=JSON.parse(e);return{left:S(Number(n.left)||k.left),right:S(Number(n.right)||k.right)}}catch{return{...k}}});On(()=>{const e=setTimeout(()=>{try{window.localStorage.setItem(yr,JSON.stringify(vr))}catch{}},300);return()=>clearTimeout(e)},[vr]);const wr=Pn((e,n)=>br(t=>{const o="function"==typeof n?n(t[e]):n;return t[e]===o?t:{...t,[e]:o}}),[]),xr=Pn(e=>wr("left",e),[wr]),zr=Pn(e=>wr("right",e),[wr]),Cr=e=>kr.has(e),Ir=e=>Sr(n=>{const t=new Set(n);return t.has(e)?t.delete(e):t.add(e),t}),Br=In(!1),Nr=In(null);On(()=>{if(Br.current&&!No){const e=Nr.current,n=e&&e.isConnected&&!e.closest('[aria-hidden="true"]')?e:null;(n??bo.current?.querySelector(`button[aria-label="${CSS.escape(Lt.add.title)}"]`))?.focus(),Nr.current=null}Br.current=No},[No]),On(()=>{if(!No||!xo)return;const e=e=>{"Escape"===e.key&&Yi()};return xo.addEventListener("keydown",e),()=>xo.removeEventListener("keydown",e)},[No,xo]),de(No,()=>Yi()),On(()=>{!Qt&&No&&(Oo(!1),jo(null),Po.current=!1)},[Qt]),On(()=>{if(!po)return $o.current&&St({type:"setUi",ui:{leftSideBarVisible:!1}}),void($o.current=!1);No&&(Oo(!1),jo(null),$o.current=Po.current,Po.current=!1),Qt||($o.current=!0,St({type:"setUi",ui:{leftSideBarVisible:!0}}))},[po]),On(()=>{!Qt&&po&&($o.current=!1,uo())},[Qt]),On(()=>{if(!po||!xo)return;const e=e=>{"Escape"===e.key&&uo()};return xo.addEventListener("keydown",e),()=>xo.removeEventListener("keydown",e)},[po,xo]),de(null!==po,()=>uo());const Or=H(),Pr=(e,n="success",t)=>{if(Or)return void(t?Or(e,"error"===n?"error":"info",t):Or(e,"error"===n?"error":"info"));const o={sound:!1,action:t?.action,onClose:t?.onClose};"error"===n?An.error(e,{...o,duration:t?.duration??3200}):An.success(e,{...o,duration:t?.duration??1900})},$r=In(null),[Mr,jr]=Nn(0),[Ar,Tr]=Nn(0),Lr=D(),Rr=In(null),Er=e=>Math.max(0,e.clientHeight-(Rr.current?.offsetHeight??0));On(()=>{const e=$r.current;if(!e)return;const n=()=>{jr(e.clientWidth),Tr(Er(e))};n();const t=new ResizeObserver(n);return t.observe(e),Rr.current&&t.observe(Rr.current),()=>t.disconnect()},[]),$n(()=>{$r.current&&(jr($r.current.clientWidth),Tr(Er($r.current)))},[vr,Qt,eo]);const Vr=lo===ro?Mr>0?Mr:to[ro]:to[lo],Fr=Mr>0?Math.min(Mr/Vr,"shrink"===io?1:2):1,Wr=Vr*Fr,Hr=Mr>0&&Wr>Mr+1,Dr={width:Wr,height:Ar||"100%",flex:"none",position:"relative"},Ur={width:Vr,height:Ar?Ar/Fr:"100%",maxHeight:"none",transform:1!==Fr?`scale(${Fr})`:void 0,transformOrigin:"top left"},Yr=()=>St({type:"setUi",ui:{leftSideBarVisible:!Qt}}),Gr=()=>St({type:"setUi",ui:{rightSideBarVisible:!eo}}),Jr=e=>{No&&(Oo(!1),jo(null),Po.current=!1,Qt&&go===e)||po&&($o.current=!1,uo(),Qt&&go===e)||(Qt&&go===e?Yr():(yo(e),Qt||St({type:"setUi",ui:{leftSideBarVisible:!0}})))},Kr=()=>{te(fn,{accept:"image/*",title:Dt.mediaLibrary})},Xr=()=>{Ro(L),_t.select(null),p()},qr=()=>{Ro($t??L),eo||St({type:"setUi",ui:{rightSideBarVisible:!0}})},_r=kt.data.content??[],Zr=()=>{const e=_r.findIndex(Mt),n=_r.findIndex(jt);return{floor:e>=0?e+1:0,cap:n>=0?n:_r.length}},Qr=xt,ei=Zo.stripCopy,ni=e=>r(e,ei),ti=Z(),oi=Pe({data:kt.data,config:Qr,readOnly:Boolean(pt),clipboard:ti,strip:ei?e=>ei(e):void 0,afterRemove:"none",stepBounds:(e,n)=>{if(e.parentId!==vn||e.slot!==bn)return{min:0,max:n-1};const{floor:t,cap:o}=Zr();return{min:t,max:o-1}},commit:(e,{select:n})=>{void 0!==n&&Ro(L);const t=void 0===n||"node"===n?.kind?n:null;_t.commitDocument(e,t)}}),ri=e=>{const n=zn(kt.data,xt,e);if(!n)return!1;const t=wn(n.place),o=n.node,r=t===ke?ci(o):xi(o);return!!oi.remove(e)&&(Pr(Lt.deleted({name:r}),"success",{duration:8e3,action:{label:Lt.bar.undo,onClick:()=>{oi.restore(n.node,n.place)}}}),!0)},ii={...oi,remove:ri},li=e=>lr(e,"block",xt.components[e]?.label??e),si=Pn(e=>xt.components[e]?.defaultProps??{},[xt]),di=e=>lr(e,"section",li(e)),ci=e=>he({type:e.type,props:e.props??{}},di(e.type),cr),{nodeAddresses:ai,zoneItems:pi}=Bn(()=>{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>=ve)return;const s=/* @__PURE__ */new Map;for(const{child:e,zone:t}of be(xt,n))s.set(t,[...s.get(t)??[],e]);for(const[e,n]of s)t(n,e,i+1)})};return t(_r,ke,0),{nodeAddresses:e,zoneItems:n}},[_r,xt]),ui=Pn(e=>pi.get(e)??[],[pi]),fi=e=>{const n=ai.get(e);return n?ui(n.zone)[n.index]:void 0},hi=e=>_(Zo,xt,e),mi=e=>{if(!Zo.slotsOf||e===ke)return null;const n=e.lastIndexOf(":");if(n<=0)return null;const t=fi(e.slice(0,n));if(!t)return null;const o=hi(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(!U(Lo))return null;const e=`${Lo.nodeId}:${Lo.slot}`;return mi(e)?.slot.panel===Lo.kind?e:null})(),yi=In(null);On(()=>{const e=yi.current;if(yi.current=null,!gi||!U(Lo))return;const n=Lo.nodeId;Do(n,{scroll:e!==gi}),Sr(e=>{if(!e.has(n))return e;const t=new Set(e);return t.delete(n),t})},[Lo]);const ki=(e,n,t)=>{const o=String(e.props.id);if(!n.panel)return void(e=>{const n=ai.get(e);n&&(n.zone===ke?Ei(n.index):ul(n.zone,n.index,e,fi(n.zone.slice(0,n.zone.lastIndexOf(":")))?.type??""))})(o);const r={kind:n.panel,nodeId:o,slot:n.slot},i=`${o}:${n.slot}`;t&&gi!==i&&(yi.current=i),Jo(null,r),eo||St({type:"setUi",ui:{rightSideBarVisible:!0}}),Ri(o)},Si=(e,n,t)=>{const o=`${e}:${n}`;if(Sr(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&&(yi.current=o);Jo(null,{kind:t,nodeId:e,slot:n})},vi=(e,n,t)=>{if(pt||!Zo.moveSlot)return;const o=fi(e),r=o?hi(o).filter(e=>e.rung):[],i=r[n];if(!i)return;const l={parentId:e,slot:Qn,index:n},s=pn(l,{...l,index:Math.min(Math.max(t,0),r.length)});if(s===n)return;const d=Zo.moveSlot(e,n,s);"string"==typeof d&&Si(e,d,i.panel)},bi=dr(),wi=Bn(()=>{const e=/* @__PURE__ */new Map;for(const n of bi??[])e.set(n.slug,n.name);return e},[bi]),xi=e=>me(e,li,ir.plainText,e=>wi.get(e),ir.rowName),zi=(e,n)=>{const t=xt.components[e.type]?.fields,o=n===ke||jl(n)?"section":"block",r=n===ke&&(Mt(e)||jt(e)||Nt(e.type)),i="block"===o?ge(t):r?null:ye(t);return ir.renamePropOf?ir.renamePropOf(e,o,i):i},Ci=(e,n,t,o)=>{if(!(!pt&&fr?.zone===e&&fr.index===n))return;const r=(t,o)=>{hr(null),o&&((e,n,t)=>{const o=ui(e)[n];if(!o)return;const r=zi(o,e);r&&_t.replaceComponent(e,n,{...o,props:{...o.props,[r]:t.trim()}})})(e,n,t)};/* @__PURE__ */
9
- return Un("input",{className:"es-tree-rename",defaultValue:o,autoFocus:!0,"aria-label":Lt.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)},Ii=e(Y(),Ht),Bi=Ii.scope({target:yn,siteId:tt,docId:kn}),Ni=xt,Oi=(e,n)=>n===ke?di(e):li(e),Pi=(e,n,t)=>{const o=Ii.plan(Bi,t,Oi(t.type,e),Ni);o&&(o.changed&&_t.replaceComponent(e,n,{...t,props:{...o.props,id:t.props.id}}),Pr(o.message))},$i=Q({nodesIn:ui,nodeAt:(e,n)=>ui(e)[n]??null,labelOf:(e,n)=>n===ke?di(e):li(e),renamePropOf:zi,beginRename:(e,n)=>hr({zone:e,index:n}),history:{hasPast:vt.hasPast,hasFuture:vt.hasFuture,back:()=>vt.back(),forward:()=>vt.forward()},openPageSettings:()=>{_t.select(null),Ro(L)},pageSettingsLabel:Lt.pageSettings,words:{menu:Wt,styleClipboard:Ht,screen:Lt.menu},readOnly:Boolean(pt),collapseAll:()=>Sr(new Set(ui(ke).map(e=>String(e.props.id)))),onPasteRefused:e=>Pr(e?Lt.pasteRefused({name:e.label}):Lt.menu.clipboardRefused,"error"),canPasteAt:(e,n)=>Ll(e,n),menuRows:Xo.menuRows,isLocked:e=>Qo(e.type),duplicateBlocked:e=>er(kt.data,e),permits:e=>Se(xt,e.type),nodeOps:ii,isPinned:(e,n)=>n===ke&&(Mt(e)||jt(e)),sectionBand:Zr,locate:e=>ai.get(e)??null,rowNameOf:(e,n)=>n===ke?ci(e):xi(e),selectAt:(e,n,t,o)=>{e===ke?Ei(n):ul(e,n,t,o??"")},slotRung:e=>{const n=mi(e);return n?.slot.panel?{label:n.slot.label,select:()=>ki(n.node,n.slot,!1)}:null},style:{held:()=>ae(Bi),canCopy:e=>Ii.rows(Ni,e).some(e=>!1!==e.counted),copy:(e,n)=>Ii.copy(Bi,e,Oi(e.type,n),Ni),paste:(e,n,t)=>Pi(e,n,t)},keys:ht?{target:xo,selected:()=>{const e=kt.ui.itemSelector;return e?{zone:e.zone??ke,index:e.index}:null},held:()=>ti.get(),readOnly:Boolean(pt),onDone:({done:e,name:n})=>{"copied"===e&&Pr(Lt.copied({name:n}))}}:void 0},wo),Mi=In({copy:(e,n)=>{},paste:(e,n,t)=>{},at:()=>null,readOnly:!1});On(()=>{Mi.current={copy:(e,n)=>Ii.copy(Bi,e,Oi(e.type,n),Ni),paste:Pi,at:()=>{const e=kt.ui.itemSelector;if(!e)return null;const n=e.zone??ke,t=ui(n)[e.index];return t?{zone:n,index:e.index,node:t}:null},readOnly:Boolean(pt)}});const ji=Pn(e=>{const n=pe(e);if(!n)return;const t=Mi.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))},[]);On(()=>{if(!xo)return;const e=e=>ji(e);return xo.addEventListener("keydown",e),()=>xo.removeEventListener("keydown",e)},[ji,xo]),mn(wo,"keydown",ji);const Ai=_r.map(e=>e.props.id).join("|");On(()=>{const e=wo?.document??null,n=wo?.window??null;let t=0;const o=[],r=()=>{if(!e)return void To(e=>e.length?[]:e);const n=_r.findIndex(jt),t=n>=0?n:_r.length,o=n=>{const t=_r[n]?.props?.id;return null==t?null:e.querySelector(`[data-puck-component="${CSS.escape(String(t))}"]`)},r=e=>e?[...e.querySelectorAll(hn)].map(e=>e.getBoundingClientRect()).filter(e=>e.width>0||e.height>0):[],i=[];for(let e=_r.length>0&&!Mt(_r[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=Zn(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})}To(e=>function(e,n){if(e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(e[t].top!==n[t].top||e[t].index!==n[t].index||e[t].height!==n[t].height)return!1;return!0}(e,i)?e:i)},i=()=>{cancelAnimationFrame(t),t=requestAnimationFrame(r)};if(!e||!n)return void r();n.addEventListener("scroll",i,{passive:!0});const l=new ResizeObserver(i);return l.observe(e.documentElement),r(),o.push(setTimeout(r,150),setTimeout(r,450)),()=>{cancelAnimationFrame(t),o.forEach(clearTimeout),n.removeEventListener("scroll",i),l.disconnect()}},[wo,Ai,lo,Fr,Qt,eo,bt?.props.id]);const Ti=wo?.document??null,Li=wo?.window??null;On(()=>{const e=vo.current;if(!e||!Ti||!Li)return;const n=[],t=()=>{const n=Ti.querySelector(`[data-puck-component="${CSS.escape(e.id)}"]`);if(!n)return!1;const t=n.getBoundingClientRect().top-e.offset;return Math.abs(t)>1&&Li.scrollTo({left:Li.scrollX,top:Li.scrollY+t,behavior:"instant"}),!0};return vo.current=null,t()&&n.push(setTimeout(t,150),setTimeout(t,450)),()=>n.forEach(clearTimeout)},[Ti,Li]);const Ri=e=>{Xo.holdCanvasOn?Xo.holdCanvasOn(e):c(e)},Ei=e=>{Ro(L),_t.select({index:e}),Xo.sectionPressed?.(_r[e]);const n=_r[e]?.props?.id;n&&Ri(n)},Vi=e=>{const{floor:n,cap:t}=Zr(),o=e=>Math.min(Math.max(n,e),t);if("number"==typeof e)return o(e);const r=bt&&Lo.kind!==$t?.kind?_r.findIndex(e=>e.props.id===bt.props.id):-1;return o(r>=0?r+1:t)},Fi=(e,n)=>{const{floor:t,cap:o}=Zr(),r=Math.min(Math.max(n,t),o),i=e<r?r-1:r;return i===e?{moved:!1,dest:e}:(_t.reorderComponent(ke,e,i),_t.select({index:i}),{moved:!0,dest:i})},Wi=(e,n,t,o)=>{Ro(L),_t.select(o?{index:o.index,zone:o.zone}:{index:e}),c(n),Pr(Lt.sectionAdded({name:t}))},Hi=(e,n)=>{const t=Vi(n),o=tr(e,{nodeDefaults:si,newNodeId:Ce,sectionLabel:di,blockIsOffered:rr}),r=o?_t.insertNode(ke,t,o):_t.insertSection(e,t);return Wi(t,r,di(e),o?((e,n,t)=>{if(e.type===t)return null;const o={at:null},r=(e,n,i)=>{const l=i.filter(n=>n===e.type).length;for(const{child:s,zone:d,index:c}of be(xt,e)){if(s.type===t&&(!o.at||n>o.at.depth)){const r=or(e.type,l,d.slice(d.lastIndexOf(":")+1)),i=r?.choices??(r?.spec?[{type:r.spec.childType,label:r.spec.childType}]:[]);null!==r&&"footer"!==r.source&&`${e.props.id}:${r.slot}`===d&&i.some(e=>e.type===t)&&(o.at={zone:d,index:c,depth:n})}r(s,n+1,[...i,e.type])}};return r({type:e.type,props:{...e.props,id:n}},1,[]),o.at?{zone:o.at.zone,index:o.at.index}:null})(o,r,e):null),t},Di=e=>Ui(ke,e),Ui=(e,n)=>{Nr.current=document.activeElement??null,po&&(Po.current=$o.current,$o.current=!1,uo()),jo(null===n?null:{zone:e,index:n}),Oo(!0),Qt||(Po.current=!0,St({type:"setUi",ui:{leftSideBarVisible:!0}}))},Yi=()=>{Oo(!1),jo(null),Po.current&&St({type:"setUi",ui:{leftSideBarVisible:!1}}),Po.current=!1},Gi=(e,n)=>ir.rowName?n?Mt(e)?ir.rowName(e,"section",Lt.header):jt(e)?ir.rowName(e,"section",Lt.footer):Nt(e.type)?ir.rowName(e,"section",li(e.type)):ci(e):xi(e):n?di(e.type):li(e.type),Ji=e=>n=>{e()},Ki=()=>Xo.editPinnedSource?.(),Xi=(e,n,t)=>{if(pt)return null;const o=ui(e)[n];return o&&!Se(xt,o.type).delete?null:/* @__PURE__ */Un(Le,{kind:"delete",label:Lt.deleteNamed({name:t}),onClick:()=>((e,n)=>{const t=ui(e)[n]?.props?.id;null!=t&&ri(String(t))})(e,n),children:/* @__PURE__ */Un(Fn,{size:15})})},qi=e=>ir.rowPreview?.(e)||void 0,_i=e=>ir.rowMarks?.(e)??void 0,Zi=(e,n,t)=>ir.rowActions?.(e,n,t)??null,Qi=(e,n,t,o)=>{if(pt)return null;const r=Boolean(t.props._hidden);/* @__PURE__ */
10
- return Un(Le,{kind:"eye",label:r?Lt.showNamed({name:o}):Lt.hideNamed({name:o}),onClick:()=>nl(e,n,t),children:/* @__PURE__ */Un(r?Wn:Hn,{size:14,strokeWidth:1.8,strokeLinecap:void 0,strokeLinejoin:void 0})})},el=e=>fs(ke,e),nl=(e,n,t)=>{_t.replaceComponent(e,n,{...t,props:{...t.props,_hidden:!t.props._hidden}})},tl=e=>we(xt,e),ol=e=>be(xt,e),rl=e=>Zo.slotsOf?hi(e).map(n=>({slot:n.slot,rung:n.rung?n:null,kids:xe(e,n.slot)})):[{slot:null,rung:null,kids:ol(e)}],il=e=>Zo.slotsOf?rl(e).flatMap(e=>e.kids):ol(e),ll=e=>Boolean(Zo.slotsOf)&&hi(e).some(e=>e.rung),sl=(e,n,t)=>null===t?void 0===n?or(e):or(e,n):or(e,n,t),dl=(e,n,t)=>{const o=ze(xt,e.type,n)&&(t||il(e).length>0||ll(e));return{collapsible:o,folded:o&&Cr(String(e.props.id))}},cl=(e,n,t)=>rl(e).flatMap(o=>{const r=o.rung?n+1:n,i=o.kids.flatMap(({child:e})=>dl(e,r,t(e.type)).collapsible?[String(e.props.id),...cl(e,r+1,t)]:[]);return o.rung?[`${e.props.id}:${o.rung.slot}`,...i]:i}),al=e=>il(e).length>0||ll(e)||Boolean(or(e.type)),pl=e=>Boolean(or(e)),ul=(e,n,t,o)=>{if(Ro(L),or(o)?.spec?.slider){const t=e.split(":")[0];a(t,n),_t.select({index:n,zone:e}),c(t)}else _t.select({index:n,zone:e}),Ri(t)},fl=(e,n,t,o,r)=>{const i=`${e}:${n}`;_t.insertComponent(i,t,o),or(r)?.spec?.slider?requestAnimationFrame(()=>{a(e,o),_t.select({index:o,zone:i})}):_t.select({index:o,zone:i})},hl=In(/* @__PURE__ */new Set);On(()=>{_r.forEach(e=>{const n=or(e.type)?.spec;if(!n)return;const t=e.props.id;if(hl.current.has(t))return;hl.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(si)).forEach((e,t)=>Kt.seedChild(o,t,n.childType,e))})},[_r,Kt,si]);const ml=In(/* @__PURE__ */new Set);On(()=>{_r.forEach((e,n)=>{const t=e.props.id;if(ml.current.has(t))return;const o=i(e,tl(e.type));ml.current.add(t),o&&Kt.replaceComponent(ke,n,{...e,props:o})})},[_r,Kt]),G(Kt,xt);const gl=_r.findIndex(jt),yl=gl>=0?_r[gl]:null,kl=At?_r.findIndex(Mt):-1,Sl=kl>=0?_r[kl]:null,vl=zt.groupTab,bl=Bn(()=>vl?e=>Nt(e.type):void 0,[vl]),wl=Boolean(zt.groupBadge),xl=zt.groupBadge?/* @__PURE__ */Un("span",{className:"es-tree-group-badge",children:/* @__PURE__ */Un(jn,{tone:"info",size:"xs",children:zt.groupBadge})}):void 0,zl=_r.find(e=>e.type===It)??null,Cl=_r.find(e=>e.type===Bt)??null,Il=gl>=0?gl:_r.length,Bl=[];_r.forEach(e=>{jt(e)||(al(e)&&Bl.push(String(e.props.id)),Bl.push(...cl(e,1,pl)))}),yl&&(Bl.push(String(yl.props.id)),Bl.push(...cl(yl,1,pl)));const Nl=Bl.length>0&&Bl.every(e=>kr.has(e)),Ol=e=>{const n=ir.blockRowName(e,li);return ir.rowName?ir.rowName(e,"block",n):n},Pl=(e,n,t,o)=>{const r=ui(e)[t];if(!r)return;const i={...xn(e),index:t},l={...xn(n),index:Math.min(Math.max(o,0),ui(n).length)},s=pn(i,l);if(e!==n||s!==t)try{oi.move(String(r.props.id),{...l,index:s})}catch(e){if(!(e instanceof Cn))throw e}},$l=e=>{const n=/* @__PURE__ */new Set,t=e=>{for(const{child:o,zone:r}of ol(e))n.add(r),t(o)};for(const t of tl(e.type))n.add(`${e.props.id}:${t}`);return t(e),n},Ml=e=>{let n=e.slice(0,e.indexOf(":"));for(let e=0;e<64;e++){const e=ai.get(n);if(!e)return null;if(e.zone===ke)return n;n=e.zone.slice(0,e.zone.indexOf(":"))}return null},jl=e=>{const n=e.slice(0,e.indexOf(":")),t=_r.find(e=>Nt(e.type)&&String(e.props.id)===n);return t&&Ot(n)===e?t:null},Al=(e,n)=>{const t=jl(e);return!t||(!zt.groupAccepts||zt.groupAccepts(t.type,n,ui(e).length))},Tl=(e,n,t)=>{if(e.rung){const t=fi(e.rung.nodeId),o=t?hi(t).filter(e=>e.rung).length:0;return n.parentId===e.rung.nodeId&&n.slot===Qn&&n.index>=0&&n.index<=o}if(n.slot===Qn)return!1;if(e.add)return Vl(e.add,n);const o=wn(n);if(Nt(e.type))return!1;const r=jl(o),i=jl(e.zone);if(r||i)return!(!r||!i)&&(!(r!==i&&!Al(o,e.type))&&(n.index>=0&&n.index<=ui(o).length));if(e.zone===ke||o===ke){if(e.zone!==o)return!1;const{floor:t,cap:r}=Zr();return n.index>=t&&n.index<=r}if(n.index<0||n.index>ui(o).length)return!1;if(e.zone===o)return!0;const l=yl&&!zt.lastIsOpen?String(yl.props.id):null;return(!l||Ml(e.zone)!==l&&Ml(o)!==l)&&((e,n,t,o)=>{if(e===n)return!0;const r=o??ui(e)[t];if(!r)return!1;const i=n.split(":")[0],l=ai.get(i),s=l?ui(l.zone)[l.index]:void 0;if(!s)return!1;if(!o&&$l(r).has(n))return!1;const d=or(s.type,nr(kt?.data,s.type,i),n.slice(n.lastIndexOf(":")+1));return!!d&&(!!(d.choices?d.choices.some(e=>e.type===r.type):d.spec?.childType===r.type)&&!d.spec?.addBlocked?.(ui(n),r))})(e.zone,o,e.index,t)},Ll=(e,n)=>{const t=wn(e.from),o=e.node;return t===wn(n)?Al(t,o.type):Tl({id:String(o.props?.id??""),zone:t,index:-1,type:o.type},n,o)},Rl=e=>{const n=e.slice(0,e.indexOf(":")),t=ai.get(n),o=t?ui(t.zone)[t.index]:void 0;if(!t||!o)return null;const r=or(o.type,nr(kt?.data,o.type,n),e.slice(e.lastIndexOf(":")+1));if(!r||`${n}:${r.slot}`!==e)return null;if("footer"===r.source)return null;const i=r.choices??(r.spec?[{type:r.spec.childType,label:li(r.spec.childType)}]:[]),l=mi(e);return{parent:o,parentId:n,target:r,choices:i,parentName:l?l.slot.label:Gi(o,t.zone===ke)}},El=(e,n)=>{if("section"!==e.kind)return e;const t=wn(n);return t===ke||jl(t)?e:Rl(t)?.choices.some(n=>n.type===e.type)?{kind:"block",type:e.type}:e},Vl=(e,n)=>{const t=El(e,n),o=wn(n);if("block"!==t.kind){if(jl(o)){const e="section"===t.kind?t.type:t.template.node.type;return Al(o,e)&&n.index>=0&&n.index<=ui(o).length}if(o!==ke)return!1;const{floor:e,cap:r}=Zr();return n.index>=e&&n.index<=r}if(o===ke)return!1;const r=Rl(o);return!(!r||!r.choices.some(e=>e.type===t.type))&&!r.target.spec?.addBlocked?.(ui(o))},Fl=(e,n)=>{const t=El(e,n);if("block"!==t.kind&&jl(wn(n)))return void((e,n,t)=>{const o="section"===e.kind?e.type:"template"===e.kind?e.template.node.type:null;if(o&&Al(n,o)){if("section"===e.kind)_t.insertComponent(n,e.type,t);else{if("template"!==e.kind)return;_t.insertNode(n,t,ni(e.template.node))}Ro(L),_t.select({index:t,zone:n})}})(t,wn(n),n.index);if("section"===t.kind)return void Hi(t.type,n.index);if("template"===t.kind)return void((e,n,t)=>{const o=Vi(t),r=_t.insertNode(ke,o,n);Wi(o,r,e)})(t.template.name,ni(t.template.node),n.index);const o=wn(n),r=Rl(o);r&&(r.target.spec?fl(r.parentId,r.target.slot,t.type,n.index,r.parent.type):((e,n,t)=>{_t.insertComponent(e,n,t),Ro(L),_t.select({index:t,zone:e})})(o,t.type,n.index))},Wl=(e,n)=>{e.rung?vi(e.rung.nodeId,e.index,n.index):e.add?Fl(e.add,n):e.zone===ke?Fi(e.index,n.index):Pl(e.zone,wn(n),e.index,n.index)},[Hl]=Nn(()=>cn()),Dl=an({keyOf:e=>e.id,readOnly:Boolean(pt),session:Hl,canDrop:Tl,onDrop:Wl,onStep:(e,n)=>{e.rung?vi(e.rung.nodeId,e.index,n<0?e.index-1:e.index+2):e.zone===ke?((e,n)=>{const t=di(_r[e]?.type??""),o=Fi(e,n<0?e-1:e+2);if(!o.moved)return void Pr(n<0?Lt.sectionFirst({name:t}):Lt.sectionLast({name:t}));const{floor:r,cap:i}=Zr();Pr(Lt.sectionMoved({name:t,n:o.dest-r+1,total:i-r}))})(e.index,n):Pl(e.zone,e.zone,e.index,n<0?e.index-1:e.index+2)}}),Ul=Pn(e=>{const{floor:n,cap:t}=Zr(),o=[];for(const r of e.nodes){const e=wn(r.place),i=ui(e)[r.place.index];if(!i||String(i.props.id)!==r.id)continue;if(Mt(i)||jt(i)||Qo(i.type))continue;if(Nt(i.type))continue;const l=Boolean(jl(e)),s=e===ke||l;e===ke&&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?di(i.type):xi(i),from:r.place})}const r=e.zones.flatMap(e=>{const n=wn(e.list);if(n===ke&&0===e.children.length)return[{...e,addLabel:Lt.addSection,addAlways:!0}];const t=Rl(n),o=t?.target.spec?.addLabel;return e.children.length>0||Boolean(t?.choices.length)||Boolean(jl(n))?[o?{...e,addLabel:o}:e]:[]}),i=r.flatMap(e=>{const n=wn(e.list),t=n===ke||jl(n)?null:Rl(n);return t?.choices.length?rn(e,t.target.spec?.addLabel??Lt.addBlockHere):[]});return{sources:o,zones:r,seams:i}},[kt.data]),Yl=null==bt?.props.id?null:String(bt.props.id),Gl=Pn(e=>{const n=xt,t=e=>!e.item.rung&&null!==zn(kt.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(Yl);return i||(r($e(kt.data,n,o.item.id,Yl,bl))??o)},[kt.data,xt,Yl,bl]),[Jl,Kl]=Nn(null);mn(wo,"mouseover",e=>{if(!vl)return;const n=gn(e.target),t=n?Kn(kt.data,xt,n):null;t!==Jl&&Kl(t)}),mn(wo,"mouseout",e=>{vl&&!e.relatedTarget&&Kl(null)});const Xl=e=>Mt(e)||jt(e)||Nt(e.type),ql=[];if(vl){const e=Yl?Kn(kt.data,xt,Yl):null;for(const n of/* @__PURE__ */new Set([e,Jl])){const e=n?_r.find(e=>String(e.props.id)===n):void 0;if(!e||!Xl(e))continue;const t=vl(e);t&&ql.push({id:String(e.props.id),label:t,below:Mt(e)||e.type===It})}}const _l=le(),Zl=In(null);On(()=>{const e=zt.changeNotice;if(!e)return;const n=JSON.stringify(_r.filter(Xl)),t=Zl.current;if(Zl.current={doc:kn,bands:n,index:vt.index},!t||t.doc!==kn||t.bands===n)return;vt.hasPast&&vt.index>=t.index&&!Jn.has(_l)&&(Jn.add(_l),Pr(e,"success",{action:{label:Lt.bar.undo,onClick:()=>vt.back()},duration:8e3}))},[_r]);const Ql=e=>{Ro(L),_t.select(e.zone===ke?{index:e.index}:{index:e.index,zone:e.zone})},es=J(),ns=()=>({data:kt.data,device:lo,ops:_t,inspector:Ko}),ts=es?.model,os=Bn(()=>ts?e=>ts(e,Ul(e),ns()):Ul,[ts,Ul,lo]),rs=es?.measure,is=rs?(e,n)=>rs(e,n,ns()):void 0,ls=es?.canDrop,ss=ls?(e,n)=>ls(e,n,Tl,ns()):Tl,ds=es?.drop,cs=ds?(e,n)=>ds(e,n,Wl,ns()):Wl,as=es?.pick,ps=as?e=>as(e,Ql,ns()):Ql,us=e=>{const n=wn(e),t=mi(n);t&&ki(t.node,t.slot,!1),Ui(n,e.index)},fs=(e,n)=>/* @__PURE__ */Un(Re,{...pt?{}:Dl.seam({place:{...xn(e),index:n}})},`seam:${e}:${n}`),hs={rowClick:Ji,isCollapsed:Cr,toggleCollapse:Ir},ms=e=>{const n=String(e.props.id),t=_r.findIndex(e=>String(e.props.id)===n),o=Ot(n),r=ui(o),i=Cr(n),l=li(e.type),s=ir.rowName?ir.rowName(e,"section",l):l,d=e=>fs(o,e);/* @__PURE__ */
11
- return Yn(Gn,{children:[
12
- /* @__PURE__ */Un(Me,{words:Rt,icon:/* @__PURE__ */Un(sr,{type:e.type,size:13}),name:s,preview:qi(e),marks:_i(e),onSelect:()=>Ei(t),nameSlot:Ci(ke,t,n,s),selected:Vo===n,badge:xl,actions:Zi(e,ke,t)??void 0,rowProps:{"data-node-id":n,onClick:Ji(()=>Ei(t))},fold:{open:!i,label:"section",onToggle:()=>Ir(n)}}),!i&&/* @__PURE__ */Yn(je,{children:[r.map((n,t)=>{const r=String(n.props.id),i=ci(n),l=al(n),s=l&&Cr(r),c=()=>ul(o,t,r,e.type),{rowProps:a,...p}=Dl.row({item:{id:r,zone:o,index:t,type:n.type},place:{...xn(o),index:t}},{"data-node-id":r,onClick:Ji(c)});/* @__PURE__ */
13
- return Yn(Mn,{children:[d(t),
14
- /* @__PURE__ */Un(Me,{words:Rt,icon:/* @__PURE__ */Un(sr,{type:n.type,size:13}),name:i,preview:qi(n),marks:_i(n),onSelect:c,nameSlot:Ci(o,t,r,i),selected:Vo===r,hidden:Boolean(n.props._hidden),...p,fold:l?{open:!s,label:"section",onToggle:()=>Ir(r)}:void 0,actions:/* @__PURE__ */Yn(Gn,{children:[Xi(o,t,i),Zi(n,o,t),Qi(o,t,n,i)]}),rowProps:a}),l&&!s&&/* @__PURE__ */Un(je,{children:ks(n,2)})]},r)}),d(r.length)]})]})},gs=(e,n,t,o,r)=>{const i=String(e.props.id),l=`${i}:${n.slot}`,s=Dl.dragging,d=!Cr(l)&&s?.rung?.nodeId!==i,c={...xn(l),index:0},a=s&&!s.rung&&Tl(s,c)?c:void 0,p=()=>ki(e,n,!0),{rowProps:u,...f}=Dl.row({item:{id:`rung:${l}`,zone:`${i}:${Qn}`,index:t,type:e.type,rung:{nodeId:i,slot:n.slot}},place:{parentId:i,slot:Qn,index:t},into:a,canDrag:Boolean(Zo.moveSlot)&&!1!==n.movable&&o>1},{"data-slot-zone":l,onClick:Ji(p)}),h=pt?null:Zo.slotActions?.(e,n.slot);/* @__PURE__ */
15
- return Yn(Mn,{children:[n.heading,
16
- /* @__PURE__ */Un(Me,{words:Rt,icon:n.glyph??null,name:n.label,badge:n.badge,onSelect:p,selected:gi===l,...f,dragHint:n.dragHint,fold:{open:d,label:n.label,onToggle:()=>Ir(l)},actions:h&&h.length>0?/* @__PURE__ */Un(Gn,{children:h.map((t,o)=>/* @__PURE__ */Un(Le,{kind:"delete"===t.kind?"delete":"plain",label:t.label,disabled:t.disabled,onClick:()=>((e,n,t)=>{if(pt||t.disabled)return;const o=String(e.props.id),r=e=>{"string"==typeof e&&Si(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__ */Un(Fn,{size:15}):/* @__PURE__ */Un(Dn,{size:15})},`${o}:${t.kind}`))}):void 0,rowProps:u}),d&&/* @__PURE__ */Un(je,{children:r})]},l)},ys=(e,n)=>{const t=rl(e),o=t.filter(e=>e.rung).length;let r=0;/* @__PURE__ */
17
- return Un(Gn,{children:t.map(t=>{const i=t.kids,l=t.rung?n+1:n,s=sl(e.type,void 0,t.slot),d=s?`${e.props.id}:${s.slot}`:null,c=null===t.slot?null:`${e.props.id}:${t.slot}`,a=(e,n)=>fs(e,n),p=/* @__PURE__ */Yn(Gn,{children:[i.map(({child:n,zone:t,index:o})=>{const r=Vo===String(n.props.id),{collapsible:i,folded:s}=dl(n,l,pl(n.type)),d=String(n.props.id),c=Ol(n),p=()=>ul(t,o,d,e.type),{rowProps:u,...f}=Dl.row({item:{id:d,zone:t,index:o,type:n.type},place:{...xn(t),index:o}},{"data-node-id":d,onClick:Ji(p)});/* @__PURE__ */
18
- return Yn(Mn,{children:[0===o&&a(t,0),
19
- /* @__PURE__ */Un(Me,{words:Rt,icon:/* @__PURE__ */Un(sr,{type:n.type,size:13}),name:c,preview:qi(n),marks:_i(n),onSelect:p,nameSlot:Ci(t,o,d,c),selected:r,hidden:Boolean(n.props._hidden),...f,fold:i?{open:!s,label:"group",onToggle:()=>Ir(d)}:void 0,actions:/* @__PURE__ */Yn(Gn,{children:[Xi(t,o,c),Zi(n,t,o),Qi(t,o,n,c)]}),rowProps:u}),i&&!s&&/* @__PURE__ */Un(je,{children:ys(n,l+1)}),a(t,o+1)]},String(n.props.id??`${t}-${o}`))}),null===c?d&&!i.some(e=>e.zone===d)?a(d,0):null:0!==i.length||!t.rung&&d!==c?null:a(c,0)]});return t.rung?gs(e,t.rung,r++,o,p):/* @__PURE__ */Un(Mn,{children:p},t.slot??"")})})},ks=(e,n)=>{const t=nr(kt?.data,e.type,String(e.props.id)),o=rl(e),r=o.filter(e=>e.rung).length;let i=0;/* @__PURE__ */
20
- return Un(Gn,{children:o.map(o=>{const l=o.kids,s=o.rung?n+1:n,d=sl(e.type,t,o.slot),c=d?.spec??null,a=c&&Array.isArray(e.props[c.slot])?e.props[c.slot]:[],p=d&&d.choices?{slot:d.slot,choices:d.choices}:null,u=String(e.props.id),f=c&&!c.fixed?`${u}:${c.slot}`:null,h=p?`${u}:${p.slot}`:null,m=(e,n)=>fs(e,n),g=null===o.slot?null:`${u}:${o.slot}`,y=Boolean(c&&!c.fixed&&(null===g||g===f)),k=/* @__PURE__ */Yn(Gn,{children:[l.map(({child:n,zone:t,index:o})=>{const r=Vo===String(n.props.id),i=xi(n),l=String(n.props.id),{collapsible:d,folded:c}=dl(n,s,pl(n.type)),a=tl(n.type),p=1===a.length?`${l}:${a[0]}`:null,u=p?{...xn(p),index:ui(p).length}:void 0,f=Dl.dragging,h=u&&f&&Tl(f,u)?u:void 0,g=()=>ul(t,o,l,e.type),{rowProps:y,...k}=Dl.row({item:{id:l,zone:t,index:o,type:n.type},place:{...xn(t),index:o},into:h,canDrag:!Qo(n.type)},{"data-node-id":l,onClick:Ji(g)});/* @__PURE__ */
21
- return Yn(Mn,{children:[0===o&&m(t,0),
22
- /* @__PURE__ */Un(Me,{words:Rt,icon:/* @__PURE__ */Un(sr,{type:n.type,size:13}),name:i,preview:qi(n),marks:_i(n),onSelect:g,nameSlot:Ci(t,o,l,i),selected:r,hidden:Boolean(n.props._hidden),...k,fold:d?{open:!c,label:"group",onToggle:()=>Ir(l)}:void 0,actions:Qo(n.type)?Zi(n,t,o)??void 0:/* @__PURE__ */Yn(Gn,{children:[Xi(t,o,i),Zi(n,t,o),Qi(t,o,n,i)]}),rowProps:y}),d&&!c&&/* @__PURE__ */Un(je,{children:ks(n,s+1)}),m(t,o+1)]},String(n.props.id??`${t}-${o}`))}),y&&c&&
23
- /* @__PURE__ */Un(w,{small:!0,label:c.addLabel,blocked:c.addBlocked?.(a)??null,onAdd:()=>fl(e.props.id,c.slot,c.childType,a.length,e.type)}),null===g?h&&!l.some(e=>e.zone===h)?m(h,0):null:0!==l.length||(o.rung?y:g!==h)?null:m(g,0)]});return o.rung?gs(e,o.rung,i++,r,k):/* @__PURE__ */Un(Mn,{children:k},o.slot??"")})})},Ss=No||null!==po,vs=e=>"panel"in e?{id:e.id,label:e.label,icon:e.icon,active:Qt&&!Ss&&_o===e.id,onSelect:()=>Jr(e.id)}:e,bs=[...(Xo.railLead??[]).map(vs),{id:"sections",label:Lt.layers,icon:/* @__PURE__ */Un(Ve,{}),active:Qt&&!Ss&&"sections"===_o,onSelect:()=>Jr("sections")},...(Xo.railTrail??[]).map(vs)];ao?bs.push({id:"media",label:Lt.railMedia,icon:/* @__PURE__ */Un(Fe,{}),active:Qt&&!No&&(null!==po||"media"===_o),onSelect:()=>Jr("media")}):mt&&bs.push({id:"media",label:Lt.railMedia,icon:/* @__PURE__ */Un(Fe,{}),onSelect:Kr});const ws=[...Xo.railLead??[],...Xo.railTrail??[]].find(e=>"panel"in e&&e.id===_o),xs=Boolean(Tt?.foldable)&&!qo,zs=Tt?.label??(gt?Lt.pageSections:Lt.templateSections),Cs=xs&&Cr(et),Is=/* @__PURE__ */Yn(Gn,{children:[_r.map((e,n)=>{if(Mt(e)||jt(e)||Nt(e.type))return null;const t=Vo===String(e.props.id),o=Boolean(e.props._hidden);ol(e);const r=String(e.props.id),i=Xo.hasOwnRows?.(e)??!1,l=al(e)||i,s=l&&Cr(r),d=tl(e.type),c=1===d.length?`${r}:${d[0]}`:null,a=c?{...xn(c),index:ui(c).length}:void 0,p=Dl.dragging,u=a&&p&&Tl(p,a)?a:void 0,{rowProps:f,...h}=Dl.row({item:{id:r,zone:ke,index:n,type:e.type},place:{...xn(ke),index:n},into:u},{"data-node-id":r,onClick:Ji(()=>Ei(n))});/* @__PURE__ */
24
- return Yn(Mn,{children:[n>0&&el(n),
25
- /* @__PURE__ */Un(Me,{words:Rt,icon:/* @__PURE__ */Un(sr,{type:e.type,size:13}),name:ci(e),preview:qi(e),marks:_i(e),onSelect:()=>Ei(n),nameSlot:Ci(ke,n,r,ci(e)),selected:t,hidden:o,...h,fold:l?{open:!s,label:"section",onToggle:()=>Ir(r)}:void 0,actions:/* @__PURE__ */Yn(Gn,{children:[Xi(ke,n,ci(e)),Zi(e,ke,n),Qi(ke,n,e,ci(e))]}),rowProps:f}),al(e)&&!s&&/* @__PURE__ */Yn(je,{children:[ks(e,1),Xo.partRows?.(e,hs)]}),i&&!s&&/* @__PURE__ */Un(je,{children:Xo.ownRows?.(e,n,hs)})]},String(e.props.id??n))}),!qo&&Il>0&&el(Il)]}),Bs=(e,n,t)=>{const o=String(e.props.id),r=il(e).length>0||ll(e)||Boolean(or(e.type)),i=r&&Cr(o),l="header"===t?Lt.header:Lt.footer,s=ir.rowName?ir.rowName(e,"section",l):l;/* @__PURE__ */
26
- return Yn(Gn,{children:[
27
- /* @__PURE__ */Un(Me,{words:Rt,icon:/* @__PURE__ */Un(sr,{type:t,size:13}),name:s,preview:qi(e),marks:_i(e),badge:xl,onSelect:()=>Ei(n),nameSlot:Ci(ke,n,o,s),selected:Vo===String(e.props.id),fold:r?{open:!i,label:"section",onToggle:()=>Ir(o)}:void 0,actions:Zi(e,ke,n)??void 0,rowProps:{"data-node-id":o,onClick:Ji(()=>Ei(n))}}),r&&!i&&/* @__PURE__ */Un(je,{children:ys(e,1)})]})};return(Xo.wrap??(e=>e))(
28
- /* @__PURE__ */Un(K,{target:wo,children:/* @__PURE__ */Yn("div",{ref:bo,className:"sf-editor es-editor",style:_e(vr),onContextMenu:$i.onEditorContextMenu,...m(fn),children:[
29
- /* @__PURE__ */Yn(We,{children:[
30
- /* @__PURE__ */Un(He,{items:bs,ariaLabel:Lt.bar.views}),
31
- /* @__PURE__ */Yn(De,{children:[
32
- /* @__PURE__ */Un(Ue,{label:Lt.bar.undo,disabled:Boolean(pt)||!vt.hasPast,onClick:()=>vt.back(),children:/* @__PURE__ */Un(Ln,{})}),
33
- /* @__PURE__ */Un(Ue,{label:Lt.bar.redo,disabled:Boolean(pt)||!vt.hasFuture,onClick:()=>vt.forward(),children:/* @__PURE__ */Un(Rn,{})}),
34
- /* @__PURE__ */Un(Ye,{}),
35
- /* @__PURE__ */Un(Ge,{devices:no,value:lo,onChange:so}),
36
- /* @__PURE__ */Un(Ue,{label:Lt.bar.refresh,tip:Lt.bar.refreshTip,onClick:()=>{vo.current=(()=>{const e=wo?.document;if(!e)return null;const n=_r.findIndex(jt),t=n>=0?n:_r.length;let o=null;for(let n=0;n<t;n++){const t=_r[n]?.props?.id;if(null==t)continue;const r=e.querySelector(`[data-puck-component="${CSS.escape(String(t))}"]`);if(!r)continue;const i=r.getBoundingClientRect().top;i<=4&&(null===o||i>o.offset)&&(o={id:String(t),offset:i})}if(!o){const e=bt?.props?.id??_r[0]?.props?.id;null!=e&&(o={id:String(e),offset:0})}return o})(),So(e=>e+1)},children:/* @__PURE__ */Un(En,{})})]}),
37
- /* @__PURE__ */Yn(De,{kind:"right",style:{minWidth:300},children:[
38
- /* @__PURE__ */Un(l,{input:Io,words:Lt.saveStatus}),Xo.barLead?.(),Xo.barTrail?.(),Xo.mainAction||!Xo.barMain?/* @__PURE__ */Un(s,{input:Io,action:Xo.mainAction??{label:Lt.done,onPress:()=>{ot(kt.data)}},readOnly:Boolean(pt),saveSwitch:ft,onToggleAutoSave:st,onSaveNow:Bo,bar:Lt.bar,words:Lt.saveStatus}):Xo.barMain()]})]}),
39
- /* @__PURE__ */Un(ee,{}),
40
- /* @__PURE__ */Yn("div",{className:"sf-body",children:[Qt?/* @__PURE__ */Yn(Gn,{children:[
41
- /* @__PURE__ */Un("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left","aria-label":Lt.leftPanel,children:No?/* @__PURE__ */Un(x,{at:Mo?{label:(e=>{const n=jl(e.zone);if(n)return Lt.add.addingTo({name:ir.rowName?Gi(n,!0):li(n.type)});if(e.zone===ke){const n=_r[e.index];return n&&!jt(n)?Lt.add.addingBefore({name:Gi(n,!0)}):Lt.add.addingAtEnd}const t=Rl(e.zone);return t?Lt.add.addingTo({name:t.parentName}):Lt.add.addingHere})(Mo),onClear:()=>jo(null)}:void 0,placeBlocks:Mo&&Mo.zone!==ke?Rl(Mo.zone)?.choices:void 0,canTake:Mo?e=>{if(!Mo)return null;const n={...xn(Mo.zone),index:Mo.index};if(Vl(e,n))return null;const t=jl(Mo.zone);if(t)return Lt.add.notInside({name:Gi(t,!0)});if(Mo.zone===ke)return Lt.add.onlySections;const o=Rl(Mo.zone);return o?Lt.add.notInside({name:o.parentName}):Lt.add.onlySections}:void 0,onPick:Mo?e=>{if(!Mo)return;const n={...xn(Mo.zone),index:Mo.index};Vl(e,n)&&(Fl(e,n),Yi())}:void 0,itemFor:e=>({id:`new:${e.kind}:${"template"===e.kind?e.template.id:e.type}`,zone:"",index:-1,type:"template"===e.kind?e.template.node.type:e.type,add:e}),session:Hl,siteWide:Xo.addPanelRow?.(Yi),onClose:Yi,onHide:Yr,readOnly:Boolean(pt)}):po&&co?
42
- /* @__PURE__ */Un(I,{panel:co,pick:po,onHide:Yr}):ws?ws.panel({onHide:Yr,notify:Pr}):"media"===_o&&co?/* @__PURE__ */Un(I,{panel:co,pick:null,onHide:Yr}):/* @__PURE__ */Yn(Gn,{children:[
43
- /* @__PURE__ */Un(z,{icon:/* @__PURE__ */Un(Ve,{}),title:Lt.layers,context:Ut,actions:/* @__PURE__ */Yn(Gn,{children:[!pt&&/* @__PURE__ */Un(Je,{label:Lt.add.title,onClick:()=>Di(null),children:/* @__PURE__ */Un(Vn,{size:15})}),
44
- /* @__PURE__ */Un(Je,{label:Nl?Lt.expandAll:Lt.collapseAll,title:0===Bl.length?Lt.nothingToFold:void 0,disabled:0===Bl.length,onClick:()=>Sr(e=>{const n=new Set(Bl);return Nl?new Set([...e].filter(e=>!n.has(e))):/* @__PURE__ */new Set([...e,...Bl])}),children:/* @__PURE__ */Un(qn,{expand:Nl})})]}),onHide:Yr}),
45
- /* @__PURE__ */Yn(Ae,{className:"sf-tree sf-scroll",words:Rt,children:[
46
- /* @__PURE__ */Un(Me,{words:Rt,icon:/* @__PURE__ */Un(sr,{type:"page",size:13}),name:Lt.pageSettings,onSelect:Xr,selected:!bt&&Eo,rowProps:{onClick:Ji(Xr)}}),zl&&/* @__PURE__ */Yn(Gn,{children:[!wl&&/* @__PURE__ */Un(Te,{children:Lt.header}),ms(zl)]}),!qo&&yt&&!(wl&&zl)&&/* @__PURE__ */Yn(Gn,{children:[!wl&&/* @__PURE__ */Un(Te,{children:Lt.header}),!At&&/* @__PURE__ */Un(Me,{words:Rt,icon:/* @__PURE__ */Un(sr,{type:"header",size:13}),name:Lt.header,badge:xl,onSelect:qr,selected:Lo.kind===$t?.kind,rowProps:{onClick:Ji(qr)}})]}),!qo&&Sl&&!(wl&&zl)&&Bs(Sl,kl,"header"),!qo&&!xs&&/* @__PURE__ */Un(Te,{children:zs}),xs?/* @__PURE__ */Yn(Gn,{children:[
47
- /* @__PURE__ */Un(Me,{words:Rt,icon:null,name:zs,fold:{open:!Cs,label:zs,onToggle:()=>Ir(et)}}),!Cs&&/* @__PURE__ */Un(je,{children:Is})]}):Is,yt&&!wl&&/* @__PURE__ */Un(Te,{children:Lt.footer}),yl&&!(wl&&Cl)&&Bs(yl,gl,"footer"),!qo&&!yl&&yt&&!wl&&/* @__PURE__ */Un(Me,{words:Rt,icon:/* @__PURE__ */Un(sr,{type:"footer",size:13}),name:Lt.footer,onSelect:Ki,rowProps:{onClick:Ji(Ki),title:Lt.editFooter}}),Cl&&ms(Cl),Xo.treeFoot?.()]})]})}),
48
- /* @__PURE__ */Un(Ke,{side:"left",width:vr.left,min:qe,max:Xe,defaultWidth:k.left,label:Lt.resizeLeftPanel,onResize:xr})]}):/* @__PURE__ */Un(C,{side:"left",onShow:Yr}),
49
- /* @__PURE__ */Yn("div",{ref:$r,className:"sf-center sf-scroll","data-sf-canvas-head":Lr?"":void 0,style:{overflowX:Hr?"auto":"hidden",overflowY:"hidden"},children:[Lr&&/* @__PURE__ */Un("div",{ref:Rr,className:"sf-canvas-head",children:/* @__PURE__ */Un(Lr,{device:lo})}),
50
- /* @__PURE__ */Yn("div",{className:"sf-frame-scaler",style:Dr,children:[
51
- /* @__PURE__ */Un("div",{className:"sf-frame "+(lo===ro?"":`sf-frame--${lo}`),style:Ur,children:/* @__PURE__ */Yn("div",{className:"sf-preview-host",children:[
52
- /* @__PURE__ */Un(Ne.Provider,{value:bl,children:/* @__PURE__ */Un(Yt,{},ko)}),
53
- /* @__PURE__ */Un(ln,{canvas:wo,session:Hl,model:os,measure:is,canDrop:ss,onDrop:cs,choose:Gl,onPick:ps,onZoneAdd:us,onSeamAdd:us,zoneAddLabel:Lt.canvasAddBlock,words:Et.canvas,readOnly:Boolean(pt),revision:kt.data}),Ao.length>0&&/* @__PURE__ */Un("div",{className:"sf-preview-gaps",children:Ao.map(e=>
54
- /* @__PURE__ */Un(sn,{index:e.index,label:Lt.addSectionHere,onInsert:()=>Di(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))})]})}),vl?/* @__PURE__ */Un(Xn,{canvas:wo,tabs:ql,onSelect:e=>{const n=_r.findIndex(n=>String(n.props.id)===e);n>=0&&Ei(n)}}):null]})]}),eo?/* @__PURE__ */Yn(Gn,{children:[
55
- /* @__PURE__ */Un(g,{value:{selectChild:ul,addChild:fl,childRowName:xi,blockRowName:Ol},children:/* @__PURE__ */Un(Gt,{mode:Lo,onOpenWebsiteSettings:Xo.openSettings??(()=>{}),onOpenSiteStyles:Xo.openStyles,onSelectNode:pr,onNotify:Pr,onHidePanel:Gr,nodeActions:bt?Se(xt,bt.type):nt})}),
56
- /* @__PURE__ */Un(Ke,{side:"right",width:vr.right,min:qe,max:Xe,defaultWidth:k.right,label:Lt.resizeSettingsPanel,onResize:zr})]}):
57
- /* @__PURE__ */Un(C,{side:"right",onShow:Gr})]}),$i.menu]})}))}export{tt as ScreenChrome};
@@ -1,5 +0,0 @@
1
- import{usePickFollowsSelection as n}from"./chunk-R6WTQWAC.js";import{slotFieldsOf as e}from"./chunk-PLVEGYK6.js";import{EaselCanvas as t,useSelectedFields as r}from"./chunk-PVAIOBBE.js";import{Inspector as i}from"./chunk-WBQTAVPN.js";import{createContext as o,useContext as u}from"react";import{DesktopIcon as l}from"efficient-shell/icons/efficient";import{jsx as s}from"react/jsx-runtime";var c={kind:"puck"};function f(n,e){const t=n,r=e,i=Object.keys(t);return i.length===Object.keys(r).length&&i.every(n=>Object.is(t[n],r[n]))}function a(n){const e=n;return"string"==typeof e.nodeId&&"string"==typeof e.slot}function d(n,t,r){const i=n.slotsOf?.(r);return i||e(t,r.type).map(n=>({slot:n,label:n,rung:!1}))}function p(n,e){return n.isFirst?n.isFirst(e):e.type===n.first}function m(n,e){return n.isLast?n.isLast(e):e.type===n.last}var k={},h=()=>k,v=()=>"",g=()=>null,y=()=>{},b={isLockedBlock:()=>!1,duplicateBlocked:()=>null,nestDepth:()=>0,newSectionNode:()=>null,canAddTo:()=>null,blockIsOffered:()=>!0},O={labelAtLevel:(n,e,t)=>t,descriptions:{},categoryLabel:()=>{},firstSection:null,blockRowName:(n,e)=>e(n.type),plainText:n=>n,Icon:()=>null,Thumbnail:()=>null,useProducts:()=>null},j={options:[{id:"desktop",label:"Desktop",icon:/* @__PURE__ */s(l,{})}],initial:"desktop",fluid:"desktop",widths:{desktop:2e3}},w={read:()=>"sections",write:()=>{},forSelection:(n,e)=>n?"sections":e},L={first:null,last:null,firstGroup:null,lastGroup:null,isSectionGroup:()=>!1,sectionGroupZone:()=>"",panelOf:()=>null};function P(){/* @__PURE__ */
2
- return s(t,{height:"fill"})}function B(){const{id:n,fields:e,values:t,readOnly:o,onChange:u}=r();/* @__PURE__ */
3
- return s("div",{className:"es-sidepanel es-sidepanel--right",children:/* @__PURE__ */s(i,{fields:e,values:t,onChange:u,readOnly:o,idPrefix:n})})}var S=o({});function C({parts:n,children:e}){/* @__PURE__ */
4
- return s(S.Provider,{value:n,children:e})}function N(){return u(S)}function A(){return(N().useOwnerName??v)()}function D(){return(N().useDocumentLabel??g)()}function G(n,e,t,r){return(N().useBridges??h)(n,e,t,r)}function I(n){return(N().useStandaloneBridges??h)(n)}function T(n,e){(N().useDocumentPass??y)(n,e)}function x(){return N().blockRules??b}function V(){return N().blockLook??O}function F(){return N().devices??j}function R(){return N().leftView??w}function W(){return N().pinned??L}function E(){return N().saveSwitch??!0}function K(e){n(!0===N().pickFollowsSelection,e)}function Q(){return N().storageNamespace||void 0}function H(){return N().styleClipboard??null}function Y(){return N().nodeKeys??!0}function Z(){return N().notify??null}function q(){return N().Canvas??P}function z(){return N().CanvasHead??null}function J(){return N().canvasDrag??null}var M=o(null);function U({target:n,children:e}){/* @__PURE__ */
5
- return s(M.Provider,{value:n,children:e})}function X(){return u(M)}function $(){return N().Inspector??B}export{c as SELECTION_MODE,U as ScreenCanvasTargetProvider,C as ScreenPartsProvider,p as isPinnedFirst,m as isPinnedLast,a as isSlotMode,f as sameInspectorMode,d as screenSlotsOf,V as useScreenBlockLook,x as useScreenBlockRules,G as useScreenBridges,J as useScreenCanvasDrag,q as useScreenCanvasFrame,z as useScreenCanvasHead,X as useScreenCanvasTarget,F as useScreenDevices,D as useScreenDocumentLabel,T as useScreenDocumentPass,$ as useScreenInspectorPanel,R as useScreenLeftView,Y as useScreenNodeKeys,Z as useScreenNotify,A as useScreenOwnerName,N as useScreenParts,K as useScreenPickFollowsSelection,W as useScreenPinned,E as useScreenSaveSwitch,Q as useScreenStorageNamespace,H as useScreenStyleClipboard,I as useStandaloneScreenBridges};
@@ -1 +0,0 @@
1
- import{DEFAULT_TEXT_STYLES_WORDS as o}from"./chunk-OGH6CC3E.js";import{DEFAULT_PICK_WORDS as r}from"./chunk-643PVCEG.js";import{DEFAULT_SCREEN_WORDS as t}from"./chunk-VVPZMWJE.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as m}from"./chunk-6WY6ZXJG.js";import{DEFAULT_NODE_MENU_WORDS as n}from"./chunk-WK3AFPXY.js";import{DEFAULT_CANVAS_WORDS as c}from"./chunk-TBY3DFKS.js";import{DEFAULT_TREE_WORDS as s}from"./chunk-K56YDHYQ.js";import{DEFAULT_PANEL_WORDS as f}from"./chunk-KFV7N2DJ.js";import{DEFAULT_SAVE_WORDS as p}from"./chunk-H6DDIBQ4.js";import{DEFAULT_CHROME_WORDS as e,DEFAULT_NOTICE_WORDS as i}from"./chunk-Z6PVRXVY.js";import{DEFAULT_LOCK_WORDS as u}from"./chunk-RE4LP46F.js";import{DEFAULT_RAIL_WORDS as k}from"./chunk-2OAZYSWJ.js";import{DEFAULT_COPY_WORDS as j}from"./chunk-33C6ALT5.js";import{DEFAULT_FIELDS_WORDS as h}from"./chunk-WRFD4EXD.js";import{DEFAULT_DRAG_WORDS as l}from"./chunk-AYWN5NRH.js";var a={notice:i,lock:u,save:p,chrome:e,rail:k,tree:s,panel:f,fields:h,pick:r,drag:l,menu:n,styleClipboard:m,copy:j,canvas:c,textStyles:o,screen:t},Y=o=>"object"==typeof o&&null!==o;function y(o,r){const t={};for(const m of Object.keys(o)){const n=o[m],c=r[m];null==c?t[m]=n:Y(n)?t[m]=Y(c)?y(n,c):n:t[m]=typeof c==typeof n?c:n}return t}function D(o,r){return r?y(o,r):o}export{a as DEFAULT_EASEL_STRINGS,D as mergeEaselStrings};