efficient-easel 4.0.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/dist/buckets-Tj-nkBpg.d.ts +28 -0
- package/dist/chrome/chrome.css +30 -2
- package/dist/chrome/index.js +1 -1
- package/dist/{chunk-7GVPKRW2.js → chunk-37DMJPHL.js} +8 -8
- package/dist/chunk-3GX7XBAF.js +5 -0
- package/dist/chunk-3ZJSLHHI.js +8 -0
- package/dist/{chunk-42TMLDSQ.js → chunk-6TOYXESC.js} +1 -1
- package/dist/chunk-BXQBCW3P.js +1 -0
- package/dist/{chunk-D4BUPPPV.js → chunk-C7ERK4DF.js} +3 -3
- package/dist/chunk-CRWFB7MU.js +21 -0
- package/dist/chunk-ETDRAF3O.js +65 -0
- package/dist/{chunk-XJPNW26S.js → chunk-G5JILVHG.js} +1 -1
- package/dist/{chunk-2I7MAA2U.js → chunk-HQWQLDCB.js} +1 -1
- package/dist/{chunk-SNMCF2ZD.js → chunk-I7ER3P4U.js} +1 -1
- package/dist/chunk-KFV7N2DJ.js +1 -0
- package/dist/{chunk-TJOUAFJE.js → chunk-KJ2RODGT.js} +1 -1
- package/dist/chunk-KSTX646X.js +5 -0
- package/dist/chunk-MQNBD6AB.js +1 -0
- package/dist/{chunk-ZHTQCAQ2.js → chunk-MTRFMGBO.js} +1 -1
- package/dist/{chunk-5SOSVTVI.js → chunk-PFNIVZPN.js} +1 -1
- package/dist/{chunk-4YBMSUPL.js → chunk-RQWJOPRB.js} +1 -1
- package/dist/{chunk-GTDLBUOC.js → chunk-UB4TLWVJ.js} +6 -6
- package/dist/{chunk-QBJJVMVB.js → chunk-UQ6CD3K2.js} +1 -1
- package/dist/{chunk-X2GNFJRC.js → chunk-VZGLBEAE.js} +1 -1
- package/dist/{chunk-FUOZKV7A.js → chunk-XW4AV5N4.js} +3 -3
- package/dist/{chunk-WSNVBUPL.js → chunk-Y324X4U4.js} +1 -1
- package/dist/drag/index.js +1 -1
- package/dist/easel/index.d.ts +2 -2
- package/dist/easel/index.js +1 -1
- package/dist/fields/fields.css +4 -0
- package/dist/fields/index.d.ts +103 -51
- package/dist/fields/index.js +1 -1
- package/dist/panel/index.d.ts +8 -2
- package/dist/panel/index.js +19 -12
- package/dist/panel/panel.css +19 -0
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/MediaSidePanel.js +1 -1
- package/dist/screen/components/NodeContextMenu.js +1 -1
- package/dist/screen/components/PageEditGuardNotices.js +1 -1
- package/dist/screen/components/ScreenChrome.js +1 -1
- package/dist/screen/components/ScreenMount.js +1 -1
- package/dist/screen/components/ScreenStoreProvider.js +1 -1
- package/dist/screen/components/SectionScreenShell.js +15 -15
- package/dist/screen/components/SidePanelHead.js +1 -1
- package/dist/screen/components/panel-widths.js +1 -1
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/key-scope.js +1 -1
- package/dist/screen/lib/puck/field-buckets.d.ts +20 -6
- package/dist/screen/lib/puck/field-buckets.js +1 -1
- package/dist/screen/lib/puck/style-clipboard.d.ts +14 -5
- package/dist/screen/lib/puck/style-clipboard.js +1 -1
- package/dist/screen/lib/puck/use-section-ops.js +1 -1
- package/dist/screen/lib/screen-parts.js +1 -1
- package/dist/strings/catalogue.d.ts +2 -2
- package/dist/strings/catalogue.js +1 -1
- package/dist/strings/index.d.ts +2 -2
- package/dist/strings/index.js +1 -1
- package/dist/{types-CWxUxPGO.d.ts → types-OUl0mK1k.d.ts} +5 -2
- package/dist/{words-BGrHZAJJ.d.ts → words-zH1H0WFw.d.ts} +8 -3
- package/package.json +2 -2
- package/dist/buckets-CuLM47h9.d.ts +0 -13
- package/dist/chunk-7P6IFCR4.js +0 -1
- package/dist/chunk-KFMJ4IM4.js +0 -5
- package/dist/chunk-LJOYIXO4.js +0 -65
- package/dist/chunk-NJOPEWYN.js +0 -20
- package/dist/chunk-QEWRHH6R.js +0 -5
- package/dist/chunk-QTLAVDJE.js +0 -1
- package/dist/chunk-R2HLPNQF.js +0 -1
- package/dist/chunk-YNOZ5NXW.js +0 -14
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{PanelToggleIcon as e}from"./chunk-KQMML6JM.js";import{InspectorHead as n}from"./chunk-
|
|
1
|
+
import{PanelToggleIcon as e}from"./chunk-KQMML6JM.js";import{InspectorHead as n}from"./chunk-UB4TLWVJ.js";import{DEFAULT_CHROME_WORDS as i}from"./chunk-Y2G7CU6A.js";import{useWords as o}from"./chunk-MFIRYGHW.js";import{Tooltip as s,IconButton as t,Button as c}from"efficient-shell/ui";import{jsx as r,jsxs as l,Fragment as d}from"react/jsx-runtime";function a({icon:e,title:i,context:o,actions:s,side:t="left",onHide:c}){/* @__PURE__ */
|
|
2
2
|
return r(n,{icon:e,name:i,kind:o,actions:s||c?/* @__PURE__ */l(d,{children:[s,c?/* @__PURE__ */r(m,{side:t,onHide:c,divider:Boolean(s)}):null]}):void 0})}function m({side:n,onHide:c,divider:a=!1}){const m=o("chrome",i);/* @__PURE__ */
|
|
3
3
|
return l(d,{children:[a?/* @__PURE__ */r("span",{className:"sf-head-divider","aria-hidden":"true"}):null,
|
|
4
4
|
/* @__PURE__ */r(s,{content:m.hidePanel,side:"bottom",children:/* @__PURE__ */r(t,{className:"es-insp-iconbtn","aria-label":m.hidePanelLabel({side:n}),onClick:c,children:/* @__PURE__ */r(e,{side:n})})})]})}function h({side:n,onShow:c}){const l=o("chrome",i);/* @__PURE__ */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useSectionOps as o}from"./chunk-
|
|
1
|
+
import{useSectionOps as o}from"./chunk-I7ER3P4U.js";import{decodePartId as e,encodePartId as r}from"./chunk-IYT6NN2J.js";import{usePreviewParts as t}from"./chunk-I54UCYOU.js";import{SELECTION_MODE as n}from"./chunk-KSTX646X.js";import{useEasel as p}from"./chunk-XW4AV5N4.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}=t(),l=d(o=>{const r=e(o);if(!r)return;const{nodeId:t,propKey:p}=r;p?(i(o=>s(o)&&o.nodeId===t&&o.propKey===p?o:{kind:"part",nodeId:t,propKey:p}),I?.(t)):i(o=>"part"===o.kind?n:o)},[i,I]);c(()=>{k(l)},[k,l]);const h=s(m)?r(m.nodeId,m.propKey):null;c(()=>{f(h)},[h,f]);return{selectNode:d(o=>{i(()=>n);const e=a(o);e&&u.select(e)},[i,a,u]),openPartId:h}}export{m as usePartBridge};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{DEFAULT_NOTICE_WORDS as e,DEFAULT_CHROME_WORDS as n}from"./chunk-Y2G7CU6A.js";import{holderOf as i,describeAge as a,nameOrSomeone as s}from"./chunk-THWO5YVZ.js";import{DEFAULT_LOCK_WORDS as t}from"./chunk-RE4LP46F.js";import{EaselRail as l}from"./chunk-MJM6SFD3.js";import{DEFAULT_RAIL_WORDS as r}from"./chunk-2OAZYSWJ.js";import{useWords as o}from"./chunk-MFIRYGHW.js";import{jsx as c,jsxs as d,Fragment as u}from"react/jsx-runtime";import{Tooltip as h,IconButton as m,Segmented as v,Switch as f,ResizeHandle as
|
|
1
|
+
import{DEFAULT_NOTICE_WORDS as e,DEFAULT_CHROME_WORDS as n}from"./chunk-Y2G7CU6A.js";import{holderOf as i,describeAge as a,nameOrSomeone as s}from"./chunk-THWO5YVZ.js";import{DEFAULT_LOCK_WORDS as t}from"./chunk-RE4LP46F.js";import{EaselRail as l}from"./chunk-MJM6SFD3.js";import{DEFAULT_RAIL_WORDS as r}from"./chunk-2OAZYSWJ.js";import{useWords as o}from"./chunk-MFIRYGHW.js";import{jsx as c,jsxs as d,Fragment as u}from"react/jsx-runtime";import{Tooltip as h,IconButton as m,Segmented as v,Switch as f,ResizeHandle as p,Button as k,Banner as b}from"efficient-shell/ui";import{PanelLeftIcon as g,PanelRightIcon as y,MediaIcon as N,ImageIcon as w}from"efficient-shell/icons/efficient";function C({children:e}){/* @__PURE__ */
|
|
2
2
|
return c("div",{className:"es-topbar",children:e})}function O({kind:e,style:n,children:i}){/* @__PURE__ */
|
|
3
3
|
return c("div",{className:e?`es-cluster es-cluster--${e}`:"es-cluster",style:n,children:i})}function x(){/* @__PURE__ */
|
|
4
4
|
return c("div",{className:"es-divider-v","aria-hidden":"true"})}function z({items:e,ariaLabel:n,onWords:i}){const a=o("rail",r);/* @__PURE__ */
|
|
@@ -7,15 +7,15 @@ return c(h,{content:e,side:"bottom",children:/* @__PURE__ */c(m,{ref:s,"aria-lab
|
|
|
7
7
|
return c(v,{className:"es-devseg",size:"sm",label:s??t.device,value:i,onChange:e=>{e!==i&&a(e)},options:e.map(e=>({value:e.id,icon:/* @__PURE__ */c(h,{content:e.label,side:"bottom",children:/* @__PURE__ */c("span",{className:"es-devseg-glyph","aria-hidden":"true",children:e.icon})}),label:/* @__PURE__ */c("span",{className:"es-vh",children:e.label})}))})}var L={idle:"is-quiet",saved:"is-quiet is-saved",saving:"is-saving",error:"is-error",off:"is-off","off-unsaved":"is-off is-unsaved"};function $({tone:e,label:n,counting:i,waitMs:a,ringRef:s,role:t}){/* @__PURE__ */
|
|
8
8
|
return d("span",{className:`es-savestate ${L[e]}`,role:t,"aria-live":"polite",children:[/* @__PURE__ */c("span",i?{ref:s,className:"es-savestate-ring is-counting",style:void 0!==a?{"--es-savewait":`${a}ms`}:void 0,"aria-hidden":"true"}:{className:"es-savestate-dot","aria-hidden":"true"}),n]})}function W({pressed:e,title:n,onToggle:i,children:a}){/* @__PURE__ */
|
|
9
9
|
return c("span",{className:"es-savestate-toggle",children:/* @__PURE__ */c(h,{content:n,side:"bottom",children:/* @__PURE__ */c(f,{size:"sm",checked:!e,"aria-label":n,label:a,onChange:()=>i()})})})}function j({side:e,width:i,min:a,max:s,defaultWidth:t,label:l,onResize:r}){const d=o("chrome",n);/* @__PURE__ */
|
|
10
|
-
return c(
|
|
10
|
+
return c(p,{side:e,width:i,min:a,max:s,defaultWidth:t,label:l,hint:d.resize,onResize:e=>r(e),className:`es-resizer es-resizer--${e}`})}function M({icon:e,name:n,kind:i,actions:a}){/* @__PURE__ */
|
|
11
11
|
return d("div",{className:"es-insp-head",children:[
|
|
12
12
|
/* @__PURE__ */c("span",{className:"es-insp-chip","aria-hidden":"true",children:e}),
|
|
13
13
|
/* @__PURE__ */d("div",{className:"es-insp-titles",children:[
|
|
14
|
-
/* @__PURE__ */c("h2",{className:"es-insp-name",children:n}),
|
|
14
|
+
/* @__PURE__ */c(h,{content:n,describe:!1,side:"bottom",className:"es-insp-name-tip",children:/* @__PURE__ */c("h2",{className:"es-insp-name",children:n})}),
|
|
15
15
|
/* @__PURE__ */c("div",{className:"es-insp-kind",children:i})]}),a?/* @__PURE__ */c("div",{className:"es-insp-actions",children:a}):null]})}function S({label:e,title:n,hasPopup:i,onClick:a,disabled:s,danger:t,expanded:l,buttonRef:r,children:o}){/* @__PURE__ */
|
|
16
|
-
return c(h,{content:n??e,side:"bottom",children:/* @__PURE__ */c(m,{ref:r,variant:t?"ghost-danger":"ghost",className:"es-insp-iconbtn","aria-label":e,"aria-haspopup":i,"aria-expanded":l,disabled:s,onClick:a,children:o})})}function P({name:e,onSelect:i,label:a,inline:s}){const t=o("chrome",n),l=a??t.upLevel,r=/* @__PURE__ */c(h,{content:l,side:"bottom",children:/* @__PURE__ */c(
|
|
16
|
+
return c(h,{content:n??e,side:"bottom",children:/* @__PURE__ */c(m,{ref:r,variant:t?"ghost-danger":"ghost",className:"es-insp-iconbtn","aria-label":e,"aria-haspopup":i,"aria-expanded":l,disabled:s,onClick:a,children:o})})}function P({name:e,onSelect:i,label:a,inline:s}){const t=o("chrome",n),l=a??t.upLevel,r=/* @__PURE__ */c(h,{content:l,side:"bottom",children:/* @__PURE__ */c(k,{variant:"link",size:"sm",className:"es-insp-up-btn","aria-label":t.upLevelTo({label:l,name:e}),leftIcon:/* @__PURE__ */c("span",{className:"es-insp-up-arrow","aria-hidden":"true",children:"←"}),onClick:i,children:/* @__PURE__ */c("span",{className:"es-insp-up-name",children:e})})});return s?r:/* @__PURE__ */c("div",{className:"es-insp-up",children:r})}function Y({context:e,pick:i,onCancel:a,onHide:s,side:t="left"}){const l=o("chrome",n),r=s?/* @__PURE__ */c(S,{label:l.hidePanelLabel({side:t}),title:l.hidePanel,onClick:s,children:/* @__PURE__ */c("left"===t?g:y,{size:16})}):null;if(!i)/* @__PURE__ */
|
|
17
17
|
return c(M,{icon:/* @__PURE__ */c(N,{}),name:l.mediaLibrary,kind:e,actions:r??void 0});const m=l.mediaKinds[i.kind];/* @__PURE__ */
|
|
18
18
|
return c(M,{icon:/* @__PURE__ */c(w,{size:15}),name:l.mediaChoose({kind:m}),kind:i.field?l.mediaFor({field:i.field}):e,actions:/* @__PURE__ */d(u,{children:[
|
|
19
|
-
/* @__PURE__ */c(h,{content:l.mediaKeep({kind:m}),side:"bottom",children:/* @__PURE__ */c(
|
|
20
|
-
/* @__PURE__ */c("span",{className:"es-insp-divider","aria-hidden":"true"}),r]}):null]})})}function T(e){return/svg/i.test(e)?"svg":e.startsWith("video")?"video":"image"}var F={notice:e,lock:t};function H(e,n,t,l=F){const r=l.notice,o=i(e),c={kind:"reload",label:r.reload};if(n){const e=a(n.secondsAgo,l.lock);return{tone:"warning",urgent:!0,lead:n.savedByYou?r.savedByYou({noun:t,when:e}):r.savedByOther({name:s(n.savedBy,l.lock),noun:t,when:e}),body:r.conflictBody,actions:o?[c,{kind:"take-over",label:r.takeOver,title:r.takeOverWhileDeciding}]:[c]}}if(!o)return null;const d=s(o.name,l.lock),u=a(o.secondsSinceSeen,l.lock);switch(e.kind){case"takenover":return{tone:"warning",urgent:!0,lead:r.tookOver({name:d,noun:t,when:a(o.secondsSinceHeld,l.lock)}),body:r.tookOverBody,actions:[{kind:"take-back",label:r.takeBack},c]};case"readonly":return{tone:"neutral",urgent:!1,lead:r.viewingOnly,body:r.viewingOnlyBody({name:d,noun:t,seen:u}),actions:[{kind:"take-over",label:r.takeOver}]};default:return{tone:"warning",urgent:!1,lead:r.editing({name:d,noun:t}),body:r.editingBody({seen:u}),actions:[{kind:"view-read-only",label:r.viewReadOnly},{kind:"take-over",label:r.takeOver,title:r.takeOverTold}]}}}function A({access:n,conflict:i,noun:a,onTakeOver:s,onViewReadOnly:l,onReload:r}){const d=H(n,i,a,{notice:o("notice",e),lock:o("lock",t)});if(!d)return null;const u={reload:r,"take-over":s,"take-back":s,"view-read-only":l},m=d.actions.map(e=>e.title?/* @__PURE__ */c(h,{content:e.title,side:"bottom",children:/* @__PURE__ */c(
|
|
19
|
+
/* @__PURE__ */c(h,{content:l.mediaKeep({kind:m}),side:"bottom",children:/* @__PURE__ */c(k,{variant:"secondary",size:"sm",className:"es-insp-textbtn",onClick:a,children:l.mediaCancel})}),r?/* @__PURE__ */d(u,{children:[
|
|
20
|
+
/* @__PURE__ */c("span",{className:"es-insp-divider","aria-hidden":"true"}),r]}):null]})})}function T(e){return/svg/i.test(e)?"svg":e.startsWith("video")?"video":"image"}var F={notice:e,lock:t};function H(e,n,t,l=F){const r=l.notice,o=i(e),c={kind:"reload",label:r.reload};if(n){const e=a(n.secondsAgo,l.lock);return{tone:"warning",urgent:!0,lead:n.savedByYou?r.savedByYou({noun:t,when:e}):r.savedByOther({name:s(n.savedBy,l.lock),noun:t,when:e}),body:r.conflictBody,actions:o?[c,{kind:"take-over",label:r.takeOver,title:r.takeOverWhileDeciding}]:[c]}}if(!o)return null;const d=s(o.name,l.lock),u=a(o.secondsSinceSeen,l.lock);switch(e.kind){case"takenover":return{tone:"warning",urgent:!0,lead:r.tookOver({name:d,noun:t,when:a(o.secondsSinceHeld,l.lock)}),body:r.tookOverBody,actions:[{kind:"take-back",label:r.takeBack},c]};case"readonly":return{tone:"neutral",urgent:!1,lead:r.viewingOnly,body:r.viewingOnlyBody({name:d,noun:t,seen:u}),actions:[{kind:"take-over",label:r.takeOver}]};default:return{tone:"warning",urgent:!1,lead:r.editing({name:d,noun:t}),body:r.editingBody({seen:u}),actions:[{kind:"view-read-only",label:r.viewReadOnly},{kind:"take-over",label:r.takeOver,title:r.takeOverTold}]}}}function A({access:n,conflict:i,noun:a,onTakeOver:s,onViewReadOnly:l,onReload:r}){const d=H(n,i,a,{notice:o("notice",e),lock:o("lock",t)});if(!d)return null;const u={reload:r,"take-over":s,"take-back":s,"view-read-only":l},m=d.actions.map(e=>e.title?/* @__PURE__ */c(h,{content:e.title,side:"bottom",children:/* @__PURE__ */c(k,{variant:"secondary",size:"sm",onClick:u[e.kind],children:e.label})},e.kind):/* @__PURE__ */c(k,{variant:"secondary",size:"sm",onClick:u[e.kind],children:e.label},e.kind));/* @__PURE__ */
|
|
21
21
|
return c("div",{className:`es-notice is-${d.tone}`,role:d.urgent?"alert":"status",children:/* @__PURE__ */c(b,{tone:"warning"===d.tone?"warning":"info",title:d.lead,action:/* @__PURE__ */c("span",{className:"es-notice-actions",children:m}),children:d.body})})}var q={left:288,right:320},D=220,G=560;function I(e){return Math.min(560,Math.max(220,Math.round(e)))}function J(e){return{"--es-left-w":`${e.left}px`,"--es-right-w":`${e.right}px`}}function K(e,n){e.style.setProperty("--es-left-w",`${n.left}px`),e.style.setProperty("--es-right-w",`${n.right}px`)}export{q as DEFAULT_PANEL_W,B as DeviceSwitch,R as EaselIconButton,C as EaselTopBar,A as EditNotice,M as InspectorHead,S as InspectorIconButton,P as InspectorUpLevel,G as MAX_PANEL_W,D as MIN_PANEL_W,Y as MediaPanelHead,j as PanelResizeHandle,$ as SaveState,W as SaveStateToggle,O as TopBarCluster,x as TopBarDivider,z as TopBarRail,I as clampPanelWidth,H as editNotice,T as mediaPickKind,J as panelWidthVars,K as setPanelWidthVars};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{blockRuns as e}from"./chunk-HQ4VVRIC.js";import{useScreenBlockLook as r}from"./chunk-
|
|
1
|
+
import{blockRuns as e}from"./chunk-HQ4VVRIC.js";import{useScreenBlockLook as r}from"./chunk-KSTX646X.js";import{DEFAULT_SCREEN_WORDS as s}from"./chunk-MCHMF32I.js";import{useWords as t}from"./chunk-MFIRYGHW.js";import{DropdownMenu as n}from"efficient-shell/ui";import{jsxs as c,Fragment as i,jsx as o}from"react/jsx-runtime";function l({choices:l,onPick:p}){const{Icon:a}=r(),m=t("screen",s),u=e(l).flatMap(e=>[...e.group?[{type:"label",key:`group:${e.group}`,label:/* @__PURE__ */c(i,{children:[e.group," ",
|
|
2
2
|
/* @__PURE__ */o("span",{className:"sf-menugroup-count",children:e.items.length})]})}]:[],...e.items.map(e=>({key:e.type,label:e.label,icon:/* @__PURE__ */o("span",{className:"sf-chip",children:/* @__PURE__ */o(a,{type:e.type,size:13})}),onSelect:()=>p(e.type)}))]);/* @__PURE__ */
|
|
3
3
|
return o(n,{align:"start",triggerClassName:"sf-add-card",items:u,trigger:/* @__PURE__ */c(i,{children:[
|
|
4
4
|
/* @__PURE__ */o("span",{className:"sf-plus sf-plus--sm",children:"+"}),m.addBlockMenu]})})}export{l as AddBlockRow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useEaselHost as n}from"./chunk-U3JP4VGF.js";import{useEaselApi as o,bindUndoKeys as t}from"./chunk-
|
|
1
|
+
import{useEaselHost as n}from"./chunk-U3JP4VGF.js";import{useEaselApi as o,bindUndoKeys as t}from"./chunk-XW4AV5N4.js";import{useState as e,useEffect as u}from"react";function r(o){const t=n(),[r,c]=e(null);return u(()=>c(o.current),[o]),t.ownsDocument?"undefined"==typeof document?null:document:r}function c(e,c){const m=n(),i=o(),f=r(e);u(()=>{if(!m.ownsDocument&&f)return t(f,i,{leaveTyping:!0})},[m,i,f]);const s=c?.document??null;u(()=>{if(!m.ownsDocument&&s)return t(s,i,{leaveTyping:!0})},[m,i,s])}function m(n){return n.ownsDocument?{}:{tabIndex:-1}}export{m as editorRootFocus,r as useEaselKeyTarget,c as useEaselUndoKeys};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{DEFAULT_CANVAS_WORDS as e}from"./chunk-AELNNAFM.js";import{useResolvedFields as t}from"./chunk-YRLPFZW3.js";import{toItemSelector as n,fromItemSelector as o,useNodeOps as r,parentStep as a,clickPick as i}from"./chunk-UK2FQOUT.js";import{useWords as s}from"./chunk-MFIRYGHW.js";import{find as d,ROOT_ID as l,getList as c,remove as u,parseZoneKey as p,move as f,duplicate as h,replaceNode as m,createNode as v,insert as g,normalizeData as y,createResolveCache as k,resolveNodeData as w,ROOT_SLOT as S}from"./chunk-KRXQM65X.js";import{topLevelSlotKeys as b,fieldsFrom as I,defaultsFrom as C}from"./chunk-NKB3KVAB.js";import{setCanvasNonce as E,isTypingTarget as O}from"./chunk-ZNCEOSXO.js";import{createContext as x,useEffect as A,useContext as D,useRef as z,useSyncExternalStore as M,useState as Z,useMemo as N,useCallback as j,useLayoutEffect as P}from"react";import{jsx as $,jsxs as L}from"react/jsx-runtime";import{createPortal as R}from"react-dom";function B(e){return!["setData","setUi","set"].includes(e.type)}var K=(e,t,n,o)=>{const r=c(e,t,p(n));return r?.[o]??null},F=(e,t,n,o,r)=>{const a=K(e,t,n,o);if(!a)throw new Error(`${r}: nothing at ${n}[${o}]`);return a};function V(e,t){const{selection:o}=e;return{...e.ui,itemSelector:n(e.data,t,o),selectedSlot:o&&"slot"===o.kind?{parentId:o.parentId,slot:o.slot}:null}}function H(e,t,n){return n?"node"===n.kind?d(e,t,n.id)?n:null:n.parentId===l?c(e,t,n)?n:null:d(e,t,n.parentId)&&c(e,t,n)?n:null:null}function T(e,t,n,r=!1){const{itemSelector:a,selectedSlot:i,...s}=n;let d=e.selection;var l;return"itemSelector"in n&&(d=o(e.data,t,a??null)),"selectedSlot"in n&&(i?d=(l=i)?{kind:"slot",parentId:l.parentId,slot:l.slot}:null:"slot"===d?.kind&&(d=null)),{...e,selection:d,ui:r?s:{...e.ui,...s}}}function U(e,t,n){const o=q(e,t,n);if(o===e)return e;const r=H(o.data,n,o.selection);return r===o.selection?o:{...o,selection:r}}function q(e,t,n){const{data:o}=e;switch(t.type){case"setData":{const n="function"==typeof t.data?t.data(o):t.data;return{...e,data:{...o,...n}}}case"setUi":return T(e,n,"function"==typeof t.ui?t.ui(V(e,n)):t.ui);case"set":{const r={data:o,ui:V(e,n)},a="function"==typeof t.state?t.state(r):t.state;let i=a.data?{...e,data:a.data}:e;return a.ui&&(i=T(i,n,a.ui,!0)),i}case"insert":{const r={...p(t.destinationZone),index:t.destinationIndex},a=v(n,t.componentType,{},t.id?{id:t.id}:{});return{...e,data:g(o,n,r,a)}}case"replace":{const r=F(o,n,t.destinationZone,t.destinationIndex,"replace");if(r.props.id!==t.data.props.id)throw new Error("Can't change the id during a replace action. Use remove and insert for a new node.");return{...e,data:m(o,n,r.props.id,t.data)}}case"replaceRoot":{const n={...o.root,props:{...o.root.props,...t.root.props},readOnly:t.root.readOnly};return{...e,data:{...o,root:n}}}case"duplicate":{const r=F(o,n,t.sourceZone,t.sourceIndex,"duplicate"),a=h(o,n,r.props.id),i=K(a,n,t.sourceZone,t.sourceIndex+1);return{...e,data:a,selection:i?{kind:"node",id:i.props.id}:e.selection}}case"reorder":return q(e,{...t,type:"move",sourceZone:t.destinationZone},n);case"move":{if(t.sourceZone===t.destinationZone&&t.sourceIndex===t.destinationIndex)return e;const r=K(o,n,t.sourceZone,t.sourceIndex);if(!r)return e;const a={...p(t.destinationZone),index:t.destinationIndex};return{...e,data:f(o,n,r.props.id,a)}}case"remove":{const r=F(o,n,t.zone,t.index,"remove");return{...e,data:u(o,n,r.props.id)}}default:return e}}var Y={drag:!0,duplicate:!0,delete:!0,edit:!0,insert:!0},W={leftSideBarVisible:!0,rightSideBarVisible:!0,arrayState:{},componentList:{},isDragging:!1,previewMode:"edit",viewports:{current:{width:360,height:"auto"},options:[],controlsVisible:!0},field:{focus:null}},X=0,Q=()=>`history-${X+=1}`;function G(e){let t=e.config;const r=e.now??(()=>Date.now()),a=e.historyCoalesceMs??250;let i=e.permissions??{};const s=y(e.data,t);let l={data:s,selection:null,ui:{...W}};if(e.ui){const{itemSelector:n,selectedSlot:r,...a}=e.ui;l={data:s,selection:r?{kind:"slot",...r}:o(s,t,n??null),ui:{...W,...a}}}let u=[{core:l,at:-1/0,sealed:!0,id:Q()}],p=0;const f=e=>{const t=u[p],n=r();!e&&p===u.length-1&&p>0&&!t.sealed&&n-t.at<a?u=[...u.slice(0,p),{...t,core:l,at:n}]:(u=[...u.slice(0,p+1),{core:l,at:n,sealed:e,id:Q()}],p=u.length-1)},h=/* @__PURE__ */new Set;let v=null,g=null,S=0,b=null,I=!1;const C=()=>{for(const e of[...h])e()},E=()=>{u=[...u.slice(0,p),{...u[p],core:l},...u.slice(p+1)]},O=(t,n)=>{S>0?I=I||n:(n?f(!1):l!==t&&E(),l.data!==t.data&&e.onChange?.(l.data),l!==t&&C())},x=e=>{const n=l;if(l=U(l,e,t),l===n)return;const o=e.recordHistory??B(e);O(n,o&&l.data!==n.data)},A=t=>{0===S&&(b=l,I=!1),S+=1;try{t()}catch(e){throw S-=1,0===S&&b&&(l=b,b=null),e}if(S-=1,S>0||!b)return;const n=b;b=null,I&&l.data!==n.data?f(!0):l!==n&&E(),l.data!==n.data&&e.onChange?.(l.data),l!==n&&C()},D=e=>{const n=l,o=H(l.data,t,e);var r,a;(r=o,a=l.selection,r===a||r&&a&&r.kind===a.kind&&("node"===r.kind&&"node"===a.kind?r.id===a.id:"slot"===r.kind&&"slot"===a.kind&&r.parentId===a.parentId&&r.slot===a.slot))||(l={...l,selection:o},O(n,!1))},z=t=>{const n=l;p=t,l=u[p].core,l.data!==n.data&&e.onChange?.(l.data),l!==n&&C()},M=()=>(e={})=>{const n=e.root?t.root?.permissions:t.components[e.item?.type??e.type??""]?.permissions;return{...Y,...i,...n}};let Z=M();const N=k(),j={resolveCache:N,async resolveAll({trigger:e="load",metadata:n}={}){const o=l.data,r={type:"root",props:{...o.root.props??{}}},a=[...o.content,...Object.values(o.zones??{}).flat()],[i,...s]=await Promise.all([w(r,t,{cache:N,trigger:e,metadata:n}),...a.map(o=>w(o,t,{cache:N,trigger:e,metadata:n}))]);A(()=>{const e=l;let n=l.data;s.forEach((e,r)=>{if(!e.didChange)return;const i=a[r].props.id,s=d(n,t,i)?.node;s&&s===d(o,t,i)?.node&&(n=m(n,t,i,e.node))}),i.didChange&&n.root===o.root&&(n={...n,root:{...n.root,props:i.node.props,readOnly:i.node.readOnly??n.root.readOnly}}),n!==l.data&&(l={...l,data:n,selection:H(n,t,l.selection)},O(e,!1))})},async resolveNode(e,{trigger:n="replace",metadata:o}={}){const r=d(l.data,t,e)?.node;if(!r)return!1;const a=await w(r,t,{cache:N,trigger:n,metadata:o});if(!a.didChange)return!1;let i=!1;return A(()=>{const n=l;if(d(l.data,t,e)?.node!==r)return;const o=m(l.data,t,e,a.node);o!==l.data&&(l={...l,data:o,selection:H(o,t,l.selection)},O(n,!1),i=!0)}),i},get config(){return t},getState(){if(v&&g===l)return v;const e=l,o={data:e.data,ui:V(e,t)},r="node"===e.selection?.kind?d(e.data,t,e.selection.id)?.node??null:null;return v={appState:o,selection:e.selection,selectedItem:r,config:t,dispatch:x,history:{back:()=>j.undo(),forward:()=>j.redo(),hasPast:p>0,hasFuture:p<u.length-1,histories:u.map(e=>({id:e.id,state:{data:e.core.data,ui:V(e.core,t)}})),index:p,setHistoryIndex:e=>{e>=0&&e<u.length&&e!==p&&z(e)}},getPermissions:Z,getItemById:n=>d(e.data,t,n)?.node,getItemBySelector:n=>function(e,t,n){const[o,r]=(n.zone??"root:default-zone").split(/:(.*)/s);return c(e,t,{parentId:o,slot:r})?.[n.index]}(e.data,t,n),getSelectorForId:o=>{const r=n(e.data,t,{kind:"node",id:o});return r?{index:r.index,zone:r.zone??"root:default-zone"}:void 0}},g=e,v},subscribe:e=>(h.add(e),()=>{h.delete(e)}),dispatch:x,batch:A,select:e=>D(e?{kind:"node",id:e}:null),selectSlot:e=>D(e?{kind:"slot",parentId:e.parentId,slot:e.slot}:null),run(e){A(()=>{const n=l,o=void 0===e.select?l.selection:e.select;l={...l,data:e.data,selection:H(e.data,t,o)},O(n,e.data!==n.data)})},load(e,n={}){const o=l,r=y(e,t);l={...l,data:r,selection:H(r,t,n.selection??l.selection)},n.keepHistory||(u=[{core:l,at:-1/0,sealed:!0,id:Q()}],p=0),l!==o&&C()},undo(){p>0&&z(p-1)},redo(){p<u.length-1&&z(p+1)},setPermissions(e){(function(e,t){if(e===t)return!0;const n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>e[n]===t[n])})(e,i)||(i=e,Z=M(),v=null,C())},setConfig(e){e!==t&&(t=e,Z=M(),v=null,C())}};return j}function J(e,t,n={}){const o=e=>{if(e.altKey)return;if(!(e.metaKey!==e.ctrlKey))return;const o="KeyZ"===e.code,r="KeyY"===e.code&&!e.shiftKey;(o||r)&&(n.leaveTyping&&O(e.target)||!1!==t.getState?.().getPermissions().edit&&(e.preventDefault(),r||e.shiftKey?t.redo():t.undo()))};return e.addEventListener("keydown",o),()=>e.removeEventListener("keydown",o)}var _=x(null),ee=x(!0);function te({easel:e,hotkeys:t=!0,resolveOnMount:n=!0,children:o}){return A(()=>{n&&e.resolveAll()},[e,n]),A(()=>{if(t&&"undefined"!=typeof document)return J(document,e)},[e,t]),/* @__PURE__ */$(_.Provider,{value:e,children:/* @__PURE__ */$(ee.Provider,{value:t,children:o})})}function ne(){const e=D(_);if(!e)throw new Error("useEasel: no <EaselProvider> above this component");return e}function oe(e){const t=ne(),n=z({view:null,selector:null,value:void 0,has:!1}),o=()=>{const o=t.getState(),r=n.current;if(r.has&&r.view===o&&r.selector===e)return r.value;const a=e(o);return r.has&&Object.is(r.value,a)?(n.current={view:o,selector:e,value:r.value,has:!0},r.value):(n.current={view:o,selector:e,value:a,has:!0},a)};return M(t.subscribe,o,o)}function re(){return function(e){return oe(e)}}var ae="data-puck-component",ie="data-puck-dropzone",se={},de="data-es-mirror",le="undefined"==typeof window?A:P;function ce(e,t,n){for(const e of Array.from(t.head.querySelectorAll(`[${de}]`)))e.remove();for(const o of Array.from(e.head.querySelectorAll('style, link[rel="stylesheet"]'))){const e=o.cloneNode(!0);e.setAttribute(de,""),n&&e.setAttribute("nonce",n),t.head.appendChild(e)}}function ue({children:t,id:n="preview-frame",title:o,className:r,style:a,mirrorStyles:i=!0,onDocument:d,height:l="auto",nonce:c}){const u=s("canvas",e),p=z(null),[f,h]=Z(null);return le(()=>{const e=p.current,t=f?.ownerDocument.defaultView;if("auto"!==l||!e||!f||!t)return;const n=()=>{e.style.height=`${Math.ceil(f.getBoundingClientRect().height)}px`};n();const o=t.ResizeObserver,r=o?new o(n):null;return r?.observe(f),()=>r?.disconnect()},[f,l]),le(()=>{let e=p.current?.contentDocument;if(!e)return;"CSS1Compat"!==e.compatMode&&(e.open(),e.write("<!DOCTYPE html><html><head></head><body></body></html>"),e.close(),e=p.current?.contentDocument??e),e.body||e.documentElement.appendChild(e.createElement("body")),e.body.style.margin="0";const t=e.createElement("div");t.setAttribute("data-puck-entry",""),t.id="frame-root","fill"===l&&t.classList.add("es-frame-fill"),e.body.appendChild(t),E(e,c),h(t),d?.(e);let n=null;const o=p.current?.ownerDocument;if(i&&o){ce(o,e,c);const t=o.defaultView;t&&"MutationObserver"in t&&(n=new t.MutationObserver(()=>ce(o,e,c)),n.observe(o.head,{childList:!0,subtree:!0,characterData:!0}))}return()=>{n?.disconnect(),t.remove(),h(null),d?.(null)}},[]),/* @__PURE__ */$("iframe",{ref:p,id:n,title:o??u.frame,className:["es-canvas-frame","fill"===l?"is-fill":"",r??""].filter(Boolean).join(" "),style:a,children:f?R(t,f):null})}var pe=x(null),fe=x(se),he=[];function me({parentId:e,slot:t,className:n,style:o,minEmptyHeight:r=128}){const a=ne(),i=oe(n=>c(n.appState.data,a.config,{parentId:e,slot:t})??he),s=oe(t=>"node"===t.selection?.kind&&t.selection.id===e&&e!==l),d=oe(n=>"slot"===n.selection?.kind&&n.selection.parentId===e&&n.selection.slot===t),u=D(pe),p=["es-zone"];return i.length&&p.push("has-children"),e===l&&p.push("is-root"),(s||d)&&p.push("is-area-selected"),null!==u&&u===e&&e!==l&&p.push("is-hovering-area"),n&&p.push(n),/* @__PURE__ */$("div",{className:p.join(" "),[ie]:`${e}:${t}`,style:{...o,"--min-empty-height":`${r}px`},children:i.map(e=>/* @__PURE__ */$(ye,{node:e},e.props.id))})}function ve(e,t,n,o){const r="root"===t?e.root:e.components[t],a={...o};for(const e of b(I(r)))a[e]=function(t={}){/* @__PURE__ */
|
|
1
|
+
import{DEFAULT_CANVAS_WORDS as e}from"./chunk-AELNNAFM.js";import{useResolvedFields as t}from"./chunk-YRLPFZW3.js";import{toItemSelector as n,fromItemSelector as o,useNodeOps as r,parentStep as a,clickPick as i}from"./chunk-UK2FQOUT.js";import{useWords as s}from"./chunk-MFIRYGHW.js";import{setCanvasNonce as d,isTypingTarget as l}from"./chunk-ZNCEOSXO.js";import{find as c,ROOT_ID as u,getList as p,remove as f,parseZoneKey as h,move as m,duplicate as v,replaceNode as g,createNode as y,insert as k,normalizeData as w,createResolveCache as S,resolveNodeData as b,ROOT_SLOT as I}from"./chunk-KRXQM65X.js";import{topLevelSlotKeys as C,fieldsFrom as E,defaultsFrom as O}from"./chunk-NKB3KVAB.js";import{createContext as x,useEffect as A,useContext as D,useRef as z,useSyncExternalStore as M,useState as Z,useMemo as N,useCallback as j,useLayoutEffect as P}from"react";import{jsx as $,jsxs as L}from"react/jsx-runtime";import{createPortal as R}from"react-dom";function B(e){return!["setData","setUi","set"].includes(e.type)}var K=(e,t,n,o)=>{const r=p(e,t,h(n));return r?.[o]??null},F=(e,t,n,o,r)=>{const a=K(e,t,n,o);if(!a)throw new Error(`${r}: nothing at ${n}[${o}]`);return a};function V(e,t){const{selection:o}=e;return{...e.ui,itemSelector:n(e.data,t,o),selectedSlot:o&&"slot"===o.kind?{parentId:o.parentId,slot:o.slot}:null}}function H(e,t,n){return n?"node"===n.kind?c(e,t,n.id)?n:null:n.parentId===u?p(e,t,n)?n:null:c(e,t,n.parentId)&&p(e,t,n)?n:null:null}function T(e,t,n,r=!1){const{itemSelector:a,selectedSlot:i,...s}=n;let d=e.selection;var l;return"itemSelector"in n&&(d=o(e.data,t,a??null)),"selectedSlot"in n&&(i?d=(l=i)?{kind:"slot",parentId:l.parentId,slot:l.slot}:null:"slot"===d?.kind&&(d=null)),{...e,selection:d,ui:r?s:{...e.ui,...s}}}function U(e,t,n){const o=q(e,t,n);if(o===e)return e;const r=H(o.data,n,o.selection);return r===o.selection?o:{...o,selection:r}}function q(e,t,n){const{data:o}=e;switch(t.type){case"setData":{const n="function"==typeof t.data?t.data(o):t.data;return{...e,data:{...o,...n}}}case"setUi":return T(e,n,"function"==typeof t.ui?t.ui(V(e,n)):t.ui);case"set":{const r={data:o,ui:V(e,n)},a="function"==typeof t.state?t.state(r):t.state;let i=a.data?{...e,data:a.data}:e;return a.ui&&(i=T(i,n,a.ui,!0)),i}case"insert":{const r={...h(t.destinationZone),index:t.destinationIndex},a=y(n,t.componentType,{},t.id?{id:t.id}:{});return{...e,data:k(o,n,r,a)}}case"replace":{const r=F(o,n,t.destinationZone,t.destinationIndex,"replace");if(r.props.id!==t.data.props.id)throw new Error("Can't change the id during a replace action. Use remove and insert for a new node.");return{...e,data:g(o,n,r.props.id,t.data)}}case"replaceRoot":{const n={...o.root,props:{...o.root.props,...t.root.props},readOnly:t.root.readOnly};return{...e,data:{...o,root:n}}}case"duplicate":{const r=F(o,n,t.sourceZone,t.sourceIndex,"duplicate"),a=v(o,n,r.props.id),i=K(a,n,t.sourceZone,t.sourceIndex+1);return{...e,data:a,selection:i?{kind:"node",id:i.props.id}:e.selection}}case"reorder":return q(e,{...t,type:"move",sourceZone:t.destinationZone},n);case"move":{if(t.sourceZone===t.destinationZone&&t.sourceIndex===t.destinationIndex)return e;const r=K(o,n,t.sourceZone,t.sourceIndex);if(!r)return e;const a={...h(t.destinationZone),index:t.destinationIndex};return{...e,data:m(o,n,r.props.id,a)}}case"remove":{const r=F(o,n,t.zone,t.index,"remove");return{...e,data:f(o,n,r.props.id)}}default:return e}}var Y={drag:!0,duplicate:!0,delete:!0,edit:!0,insert:!0},W={leftSideBarVisible:!0,rightSideBarVisible:!0,arrayState:{},componentList:{},isDragging:!1,previewMode:"edit",viewports:{current:{width:360,height:"auto"},options:[],controlsVisible:!0},field:{focus:null}},X=0,Q=()=>`history-${X+=1}`;function G(e){let t=e.config;const r=e.now??(()=>Date.now()),a=e.historyCoalesceMs??250;let i=e.permissions??{};const s=w(e.data,t);let d={data:s,selection:null,ui:{...W}};if(e.ui){const{itemSelector:n,selectedSlot:r,...a}=e.ui;d={data:s,selection:r?{kind:"slot",...r}:o(s,t,n??null),ui:{...W,...a}}}let l=[{core:d,at:-1/0,sealed:!0,id:Q()}],u=0;const f=e=>{const t=l[u],n=r();!e&&u===l.length-1&&u>0&&!t.sealed&&n-t.at<a?l=[...l.slice(0,u),{...t,core:d,at:n}]:(l=[...l.slice(0,u+1),{core:d,at:n,sealed:e,id:Q()}],u=l.length-1)},h=/* @__PURE__ */new Set;let m=null,v=null,y=0,k=null,I=!1;const C=()=>{for(const e of[...h])e()},E=()=>{l=[...l.slice(0,u),{...l[u],core:d},...l.slice(u+1)]},O=(t,n)=>{y>0?I=I||n:(n?f(!1):d!==t&&E(),d.data!==t.data&&e.onChange?.(d.data),d!==t&&C())},x=e=>{const n=d;if(d=U(d,e,t),d===n)return;const o=e.recordHistory??B(e);O(n,o&&d.data!==n.data)},A=t=>{0===y&&(k=d,I=!1),y+=1;try{t()}catch(e){throw y-=1,0===y&&k&&(d=k,k=null),e}if(y-=1,y>0||!k)return;const n=k;k=null,I&&d.data!==n.data?f(!0):d!==n&&E(),d.data!==n.data&&e.onChange?.(d.data),d!==n&&C()},D=e=>{const n=d,o=H(d.data,t,e);var r,a;(r=o,a=d.selection,r===a||r&&a&&r.kind===a.kind&&("node"===r.kind&&"node"===a.kind?r.id===a.id:"slot"===r.kind&&"slot"===a.kind&&r.parentId===a.parentId&&r.slot===a.slot))||(d={...d,selection:o},O(n,!1))},z=t=>{const n=d;u=t,d=l[u].core,d.data!==n.data&&e.onChange?.(d.data),d!==n&&C()},M=()=>(e={})=>{const n=e.root?t.root?.permissions:t.components[e.item?.type??e.type??""]?.permissions;return{...Y,...i,...n}};let Z=M();const N=S(),j={resolveCache:N,async resolveAll({trigger:e="load",metadata:n}={}){const o=d.data,r={type:"root",props:{...o.root.props??{}}},a=[...o.content,...Object.values(o.zones??{}).flat()],[i,...s]=await Promise.all([b(r,t,{cache:N,trigger:e,metadata:n}),...a.map(o=>b(o,t,{cache:N,trigger:e,metadata:n}))]);A(()=>{const e=d;let n=d.data;s.forEach((e,r)=>{if(!e.didChange)return;const i=a[r].props.id,s=c(n,t,i)?.node;s&&s===c(o,t,i)?.node&&(n=g(n,t,i,e.node))}),i.didChange&&n.root===o.root&&(n={...n,root:{...n.root,props:i.node.props,readOnly:i.node.readOnly??n.root.readOnly}}),n!==d.data&&(d={...d,data:n,selection:H(n,t,d.selection)},O(e,!1))})},async resolveNode(e,{trigger:n="replace",metadata:o}={}){const r=c(d.data,t,e)?.node;if(!r)return!1;const a=await b(r,t,{cache:N,trigger:n,metadata:o});if(!a.didChange)return!1;let i=!1;return A(()=>{const n=d;if(c(d.data,t,e)?.node!==r)return;const o=g(d.data,t,e,a.node);o!==d.data&&(d={...d,data:o,selection:H(o,t,d.selection)},O(n,!1),i=!0)}),i},get config(){return t},getState(){if(m&&v===d)return m;const e=d,o={data:e.data,ui:V(e,t)},r="node"===e.selection?.kind?c(e.data,t,e.selection.id)?.node??null:null;return m={appState:o,selection:e.selection,selectedItem:r,config:t,dispatch:x,history:{back:()=>j.undo(),forward:()=>j.redo(),hasPast:u>0,hasFuture:u<l.length-1,histories:l.map(e=>({id:e.id,state:{data:e.core.data,ui:V(e.core,t)}})),index:u,setHistoryIndex:e=>{e>=0&&e<l.length&&e!==u&&z(e)}},getPermissions:Z,getItemById:n=>c(e.data,t,n)?.node,getItemBySelector:n=>function(e,t,n){const[o,r]=(n.zone??"root:default-zone").split(/:(.*)/s);return p(e,t,{parentId:o,slot:r})?.[n.index]}(e.data,t,n),getSelectorForId:o=>{const r=n(e.data,t,{kind:"node",id:o});return r?{index:r.index,zone:r.zone??"root:default-zone"}:void 0}},v=e,m},subscribe:e=>(h.add(e),()=>{h.delete(e)}),dispatch:x,batch:A,select:e=>D(e?{kind:"node",id:e}:null),selectSlot:e=>D(e?{kind:"slot",parentId:e.parentId,slot:e.slot}:null),run(e){A(()=>{const n=d,o=void 0===e.select?d.selection:e.select;d={...d,data:e.data,selection:H(e.data,t,o)},O(n,e.data!==n.data)})},load(e,n={}){const o=d,r=w(e,t);d={...d,data:r,selection:H(r,t,n.selection??d.selection)},n.keepHistory||(l=[{core:d,at:-1/0,sealed:!0,id:Q()}],u=0),d!==o&&C()},undo(){u>0&&z(u-1)},redo(){u<l.length-1&&z(u+1)},setPermissions(e){(function(e,t){if(e===t)return!0;const n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>e[n]===t[n])})(e,i)||(i=e,Z=M(),m=null,C())},setConfig(e){e!==t&&(t=e,Z=M(),m=null,C())}};return j}function J(e,t,n={}){const o=e=>{if(e.altKey)return;if(!(e.metaKey!==e.ctrlKey))return;const o="KeyZ"===e.code,r="KeyY"===e.code&&!e.shiftKey;(o||r)&&(n.leaveTyping&&l(e.target)||!1!==t.getState?.().getPermissions().edit&&(e.preventDefault(),r||e.shiftKey?t.redo():t.undo()))};return e.addEventListener("keydown",o),()=>e.removeEventListener("keydown",o)}var _=x(null),ee=x(!0);function te({easel:e,hotkeys:t=!0,resolveOnMount:n=!0,children:o}){return A(()=>{n&&e.resolveAll()},[e,n]),A(()=>{if(t&&"undefined"!=typeof document)return J(document,e)},[e,t]),/* @__PURE__ */$(_.Provider,{value:e,children:/* @__PURE__ */$(ee.Provider,{value:t,children:o})})}function ne(){const e=D(_);if(!e)throw new Error("useEasel: no <EaselProvider> above this component");return e}function oe(e){const t=ne(),n=z({view:null,selector:null,value:void 0,has:!1}),o=()=>{const o=t.getState(),r=n.current;if(r.has&&r.view===o&&r.selector===e)return r.value;const a=e(o);return r.has&&Object.is(r.value,a)?(n.current={view:o,selector:e,value:r.value,has:!0},r.value):(n.current={view:o,selector:e,value:a,has:!0},a)};return M(t.subscribe,o,o)}function re(){return function(e){return oe(e)}}var ae="data-puck-component",ie="data-puck-dropzone",se={},de="data-es-mirror",le="undefined"==typeof window?A:P;function ce(e,t,n){for(const e of Array.from(t.head.querySelectorAll(`[${de}]`)))e.remove();for(const o of Array.from(e.head.querySelectorAll('style, link[rel="stylesheet"]'))){const e=o.cloneNode(!0);e.setAttribute(de,""),n&&e.setAttribute("nonce",n),t.head.appendChild(e)}}function ue({children:t,id:n="preview-frame",title:o,className:r,style:a,mirrorStyles:i=!0,onDocument:l,height:c="auto",nonce:u}){const p=s("canvas",e),f=z(null),[h,m]=Z(null);return le(()=>{const e=f.current,t=h?.ownerDocument.defaultView;if("auto"!==c||!e||!h||!t)return;const n=()=>{e.style.height=`${Math.ceil(h.getBoundingClientRect().height)}px`};n();const o=t.ResizeObserver,r=o?new o(n):null;return r?.observe(h),()=>r?.disconnect()},[h,c]),le(()=>{let e=f.current?.contentDocument;if(!e)return;"CSS1Compat"!==e.compatMode&&(e.open(),e.write("<!DOCTYPE html><html><head></head><body></body></html>"),e.close(),e=f.current?.contentDocument??e),e.body||e.documentElement.appendChild(e.createElement("body")),e.body.style.margin="0";const t=e.createElement("div");t.setAttribute("data-puck-entry",""),t.id="frame-root","fill"===c&&t.classList.add("es-frame-fill"),e.body.appendChild(t),d(e,u),m(t),l?.(e);let n=null;const o=f.current?.ownerDocument;if(i&&o){ce(o,e,u);const t=o.defaultView;t&&"MutationObserver"in t&&(n=new t.MutationObserver(()=>ce(o,e,u)),n.observe(o.head,{childList:!0,subtree:!0,characterData:!0}))}return()=>{n?.disconnect(),t.remove(),m(null),l?.(null)}},[]),/* @__PURE__ */$("iframe",{ref:f,id:n,title:o??p.frame,className:["es-canvas-frame","fill"===c?"is-fill":"",r??""].filter(Boolean).join(" "),style:a,children:h?R(t,h):null})}var pe=x(null),fe=x(se),he=[];function me({parentId:e,slot:t,className:n,style:o,minEmptyHeight:r=128}){const a=ne(),i=oe(n=>p(n.appState.data,a.config,{parentId:e,slot:t})??he),s=oe(t=>"node"===t.selection?.kind&&t.selection.id===e&&e!==u),d=oe(n=>"slot"===n.selection?.kind&&n.selection.parentId===e&&n.selection.slot===t),l=D(pe),c=["es-zone"];return i.length&&c.push("has-children"),e===u&&c.push("is-root"),(s||d)&&c.push("is-area-selected"),null!==l&&l===e&&e!==u&&c.push("is-hovering-area"),n&&c.push(n),/* @__PURE__ */$("div",{className:c.join(" "),[ie]:`${e}:${t}`,style:{...o,"--min-empty-height":`${r}px`},children:i.map(e=>/* @__PURE__ */$(ye,{node:e},e.props.id))})}function ve(e,t,n,o){const r="root"===t?e.root:e.components[t],a={...o};for(const e of C(E(r)))a[e]=function(t={}){/* @__PURE__ */
|
|
2
2
|
return $(me,{parentId:n,slot:e,...t})};return a}function ge(e){return function({zone:t,...n}){/* @__PURE__ */
|
|
3
|
-
return $(me,{parentId:e,slot:t,...n})}}function ye({node:e}){const t=ne().config,n=t.components[e.type],o=e.props.id,r=function(e){const t=z(null);return N(()=>n=>{const o=t.current;o&&o!==n&&(o.removeAttribute(ae),o.removeAttribute("data-puck-dnd")),t.current=n,n&&(n.setAttribute(ae,e),n.setAttribute("data-puck-dnd",e),n.style.position="relative")},[e])}(o),a=D(fe);if(!n?.render)return null;const i=n.render,s=ve(t,e.type,o,{...
|
|
3
|
+
return $(me,{parentId:e,slot:t,...n})}}function ye({node:e}){const t=ne().config,n=t.components[e.type],o=e.props.id,r=function(e){const t=z(null);return N(()=>n=>{const o=t.current;o&&o!==n&&(o.removeAttribute(ae),o.removeAttribute("data-puck-dnd")),t.current=n,n&&(n.setAttribute(ae,e),n.setAttribute("data-puck-dnd",e),n.style.position="relative")},[e])}(o),a=D(fe);if(!n?.render)return null;const i=n.render,s=ve(t,e.type,o,{...O(n),...e.props}),d={renderDropZone:ge(o),isEditing:!0,dragRef:n.inline?r:null,metadata:{...a,...n.metadata}};return n.inline?/* @__PURE__ */$(i,{...s,puck:d,editMode:!0}):/* @__PURE__ */$("div",{[ae]:o,"data-puck-dnd":o,style:{position:"relative"},children:/* @__PURE__ */$(i,{...s,puck:d,editMode:!0})})}function ke({metadata:e}){const t=oe(e=>e.config),n=oe(e=>e.appState.data.root).props??{},o=t.root?.render,r=/* @__PURE__ */$(me,{parentId:u,slot:I}),a=o?/* @__PURE__ */$(o,{id:"puck-root",...ve(t,"root",u,n),puck:{renderDropZone:ge(u),isEditing:!0,dragRef:null,metadata:e??{}},editMode:!0,children:r}):r;/* @__PURE__ */
|
|
4
4
|
return $(fe.Provider,{value:e??se,children:a})}function we({id:e,kind:t,overlay:n}){const o=z(null),[r,a]=Z(null);le(()=>{const t=o.current?.ownerDocument,n=t?.defaultView;if(!t||!n||!e)return void a(null);let r=0;const i=()=>{r=0;const i=function(e,t){if(!e||!t)return null;const n=e.getBoundingClientRect(),o=t.getBoundingClientRect();return{top:n.top-o.top,left:n.left-o.left,width:n.width,height:n.height}}(t.querySelector(`[${ae}="${n.CSS?.escape?n.CSS.escape(e):e}"]`),o.current?.parentElement??null);a(e=>{return(t=e)===(n=i)||t&&n&&t.top===n.top&&t.left===n.left&&t.width===n.width&&t.height===n.height?e:i;var t,n})},s=()=>{r||(r=(n.requestAnimationFrame??(e=>n.setTimeout(e,16)))(i))};i();const d="MutationObserver"in n?new n.MutationObserver(s):null;d?.observe(t.body,{childList:!0,subtree:!0,attributes:!0,characterData:!0});const l="ResizeObserver"in n?new n.ResizeObserver(s):null;return l?.observe(t.documentElement),n.addEventListener("resize",s),()=>{d?.disconnect(),l?.disconnect(),n.removeEventListener("resize",s),r&&(n.cancelAnimationFrame??n.clearTimeout)(r)}},[e]);const i=/* @__PURE__ */$("div",{ref:o,"aria-hidden":"true",className:`es-canvas-outline is-${t}`,style:r?{position:"absolute",top:r.top,left:r.left,width:r.width,height:r.height}:{display:"none"}});return n&&e?/* @__PURE__ */$(n,{componentId:e,kind:t,children:i}):i}function Se({frame:e=!0,className:t,style:n,metadata:o,mirrorStyles:r,onDocument:s,height:d,title:l,nonce:c,hotkeys:u,frameWrapper:p,overlay:f,children:h}){const m=ne(),v=D(ee),g=u??v,[y,k]=Z(void 0),w=oe(e=>"node"===e.selection?.kind?e.selection.id:null),[S,b]=Z(null),I=e=>{const t=e.closest?.(`[${ae}]`)?.getAttribute(ae);if(!t)return;const n=m.getState(),o="node"===n.selection?.kind?n.selection.id:null;return i(n.appState.data,m.config,t,o)??t},C=/* @__PURE__ */L("div",{className:"es-canvas-content",style:{position:"relative"},onClick:e=>{const t=e.target;t.closest?.("a[href]")&&e.preventDefault();const n=I(t);void 0===n?t.hasAttribute?.(ie)||m.select(null):m.select(n)},onMouseOver:e=>{const t=I(e.target)??null;t!==S&&b(t)},onMouseLeave:()=>b(null),children:[
|
|
5
5
|
/* @__PURE__ */$(pe.Provider,{value:S,children:/* @__PURE__ */$(ke,{metadata:o})}),
|
|
6
6
|
/* @__PURE__ */L("div",{className:"es-canvas-outlines",style:{position:"absolute",top:0,left:0,pointerEvents:"none"},children:[
|
|
7
7
|
/* @__PURE__ */$(we,{id:S&&S!==w?S:null,kind:"hover",overlay:f}),
|
|
8
8
|
/* @__PURE__ */$(we,{id:w,kind:"selected",overlay:f})]}),h]}),E=p?/* @__PURE__ */$(p,{document:y,children:C}):C;A(()=>{if(y&&g)return J(y,m)},[y,g,m]),A(()=>{if(!y)return;const e=e=>{if("Escape"!==e.key||e.defaultPrevented)return;const t=e.target;if(t?.isContentEditable||t?.closest?.("input, textarea, select"))return;const n=m.getState();if("node"!==n.selection?.kind)return;const o=a(n.appState.data,m.config,n.selection);"node"===o?.kind&&m.select(o.id)};return y.addEventListener("keydown",e),()=>y.removeEventListener("keydown",e)},[y,m]);/* @__PURE__ */
|
|
9
|
-
return $("div",{className:"es-canvas"+(t?` ${t}`:""),style:n,"data-puck-preview":"",children:e?/* @__PURE__ */$(ue,{mirrorStyles:r,onDocument:e=>{k(e??void 0),s?.(e)},height:d,title:l,nonce:c,children:E}):/* @__PURE__ */$("div",{id:"preview-frame","data-puck-entry":"",children:E})})}function be(e={}){const t=ne(),n=oe(e=>e.appState.data);return r({...e,data:n,config:t.config,commit:(e,{select:n})=>t.run({data:e,select:n})})}function Ie(){const e=ne(),n=oe(e=>e.config),o=e.resolveCache,r=oe(e=>e.selectedItem),a=oe(e=>e.appState.data.root),i=r?r.props.id:"root",s=a.props??{},
|
|
9
|
+
return $("div",{className:"es-canvas"+(t?` ${t}`:""),style:n,"data-puck-preview":"",children:e?/* @__PURE__ */$(ue,{mirrorStyles:r,onDocument:e=>{k(e??void 0),s?.(e)},height:d,title:l,nonce:c,children:E}):/* @__PURE__ */$("div",{id:"preview-frame","data-puck-entry":"",children:E})})}function be(e={}){const t=ne(),n=oe(e=>e.appState.data);return r({...e,data:n,config:t.config,commit:(e,{select:n})=>t.run({data:e,select:n})})}function Ie(){const e=ne(),n=oe(e=>e.config),o=e.resolveCache,r=oe(e=>e.selectedItem),a=oe(e=>e.appState.data.root),i=r?r.props.id:"root",s=a.props??{},d=N(()=>r||{type:"root",props:s},[r,s]),l=r?n.components[r.type]:n.root,u=e.getState(),p=r?c(u.appState.data,n,i):null,f=p&&"root"!==p.place.parentId?p.place.parentId:null,h=f?u.getItemById(f)??null:null,{fields:m}=t({id:i,node:d,block:l,parent:h,appState:u.appState}),v=oe(e=>!1===e.getPermissions(r?{item:r}:{root:!0}).edit),g=j((t,r)=>{(async()=>{const a=e.getState();if("root"!==i){const s=a.getItemById(i),d=a.getSelectorForId(i);if(!s||!d)return;const l={...s,props:{...s.props,[t]:r}},{node:c}=await b(l,n,{cache:o,trigger:"replace"}),u=e.getState().getSelectorForId(i);if(!u)return;return void e.dispatch({type:"replace",destinationZone:u.zone??"root:default-zone",destinationIndex:u.index,data:c})}const s=a.appState.data.root.props??{},{node:d}=await b({type:"root",props:{...s,[t]:r}},n,{cache:o,trigger:"replace"});e.dispatch({type:"replaceRoot",root:{props:d.props,readOnly:d.readOnly},recordHistory:!0})})()},[e,n,o,i]);return{id:i,node:d,fields:m,values:d.props,readOnly:v,onChange:g}}export{ue as CanvasFrame,W as DEFAULT_UI,Se as EaselCanvas,te as EaselProvider,ke as EditDocument,J as bindUndoKeys,G as createEasel,re as createUseEasel,B as recordsByDefault,U as reduce,V as uiView,oe as useEasel,ne as useEaselApi,be as useEaselNodeOps,Ie as useSelectedFields,H as validSelection};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DEFAULT_TEXT_STYLES_WORDS as o}from"./chunk-M6F6LS3H.js";import{DEFAULT_PICK_WORDS as r}from"./chunk-ZAOM6PFH.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as t}from"./chunk-6WY6ZXJG.js";import{DEFAULT_SCREEN_WORDS as m}from"./chunk-MCHMF32I.js";import{DEFAULT_CANVAS_WORDS as n}from"./chunk-AELNNAFM.js";import{DEFAULT_TREE_WORDS as c}from"./chunk-K56YDHYQ.js";import{DEFAULT_PANEL_WORDS as s}from"./chunk-
|
|
1
|
+
import{DEFAULT_TEXT_STYLES_WORDS as o}from"./chunk-M6F6LS3H.js";import{DEFAULT_PICK_WORDS as r}from"./chunk-ZAOM6PFH.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as t}from"./chunk-6WY6ZXJG.js";import{DEFAULT_SCREEN_WORDS as m}from"./chunk-MCHMF32I.js";import{DEFAULT_CANVAS_WORDS as n}from"./chunk-AELNNAFM.js";import{DEFAULT_TREE_WORDS as c}from"./chunk-K56YDHYQ.js";import{DEFAULT_PANEL_WORDS as s}from"./chunk-KFV7N2DJ.js";import{DEFAULT_NODE_MENU_WORDS as f}from"./chunk-WK3AFPXY.js";import{DEFAULT_SAVE_WORDS as p}from"./chunk-H6DDIBQ4.js";import{DEFAULT_CHROME_WORDS as e,DEFAULT_NOTICE_WORDS as i}from"./chunk-Y2G7CU6A.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-JZDEIRH4.js";import{DEFAULT_FIELDS_WORDS as h}from"./chunk-FFYXVAAL.js";import{DEFAULT_DRAG_WORDS as l}from"./chunk-O2NLQBFX.js";var F={notice:i,lock:u,save:p,chrome:e,rail:k,tree:c,panel:s,fields:h,pick:r,drag:l,menu:f,styleClipboard:t,copy:j,canvas:n,textStyles:o,screen:m},a=o=>"object"==typeof o&&null!==o;function A(o,r){const t={};for(const m of Object.keys(o)){const n=o[m],c=r[m];null==c?t[m]=n:a(n)?t[m]=a(c)?A(n,c):n:t[m]=typeof c==typeof n?c:n}return t}function y(o,r){return r?A(o,r):o}export{F as DEFAULT_EASEL_STRINGS,y as mergeEaselStrings};
|
package/dist/drag/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{AddPanel,CanvasDragLayer,EMPTY_MEASURE,HANDLE_GRACE_MS,canvasTarget,contains,gapInZone,gapLine,measureCanvas,pickSource,seamsBetween,sourcesAt}from"../chunk-
|
|
1
|
+
export{AddPanel,CanvasDragLayer,EMPTY_MEASURE,HANDLE_GRACE_MS,canvasTarget,contains,gapInZone,gapLine,measureCanvas,pickSource,seamsBetween,sourcesAt}from"../chunk-37DMJPHL.js";import"../chunk-O2NLQBFX.js";export{AUTO_SCROLL_EDGE,AUTO_SCROLL_MAX_SPEED,autoScrollDelta,autoScrollSpeed,createDragSession,dropEffectFor,dropOnRow,frameScrollBox,gapToMoveIndex,isNoOpDrop,scrollBoxOf,scrollParent,startAutoScroll,stepGap,useTreeDrag}from"../chunk-67GNT6PF.js";import"../chunk-PAELDYYS.js";import"../chunk-ZNCEOSXO.js";import"../chunk-P2VEMZH5.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";
|
package/dist/easel/index.d.ts
CHANGED
|
@@ -8,8 +8,8 @@ import { c as ResolveTrigger, a as ResolveCache, R as ResolvableItem } from '../
|
|
|
8
8
|
import * as react from 'react';
|
|
9
9
|
import { ReactNode, CSSProperties, ComponentType, ReactElement } from 'react';
|
|
10
10
|
import { b as NodeOpsHost, C as ClipboardEntry } from '../useNodeOps-CLbZyd43.js';
|
|
11
|
-
import { I as InspectorFields } from '../types-
|
|
12
|
-
import '../buckets-
|
|
11
|
+
import { I as InspectorFields } from '../types-OUl0mK1k.js';
|
|
12
|
+
import '../buckets-Tj-nkBpg.js';
|
|
13
13
|
|
|
14
14
|
interface EaselOptions<C extends EaselConfig = EaselConfig> {
|
|
15
15
|
config: C;
|
package/dist/easel/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{CanvasFrame,DEFAULT_UI,EaselCanvas,EaselProvider,EditDocument,bindUndoKeys,createEasel,createUseEasel,recordsByDefault,reduce,uiView,useEasel,useEaselApi,useEaselNodeOps,useSelectedFields,validSelection}from"../chunk-
|
|
1
|
+
export{CanvasFrame,DEFAULT_UI,EaselCanvas,EaselProvider,EditDocument,bindUndoKeys,createEasel,createUseEasel,recordsByDefault,reduce,uiView,useEasel,useEaselApi,useEaselNodeOps,useSelectedFields,validSelection}from"../chunk-XW4AV5N4.js";import"../chunk-AELNNAFM.js";import"../chunk-YRLPFZW3.js";import"../chunk-UK2FQOUT.js";import"../chunk-MFIRYGHW.js";import"../chunk-ZNCEOSXO.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";
|
package/dist/fields/fields.css
CHANGED
|
@@ -79,6 +79,10 @@ span:has(> .es-fnum) { display: flex; min-width: 0; }
|
|
|
79
79
|
.es-insp-row { min-width: 0; }
|
|
80
80
|
.es-insp-row:empty,
|
|
81
81
|
.es-insp-row[hidden] { display: none; }
|
|
82
|
+
/* A folding band (Inspector, 4.0.0): a plain wrapper round easel's
|
|
83
|
+
`SettingsGroup`, out of the layout on another tab but still mounted. */
|
|
84
|
+
.es-insp-band { min-width: 0; }
|
|
85
|
+
.es-insp-band[hidden] { display: none; }
|
|
82
86
|
|
|
83
87
|
/* ── a list (ListField): ONE look in both editors (owner, 2026-10-06) ────────
|
|
84
88
|
The website ticker's rows: one row per item, a × at its end, "+ Add <noun>"
|
package/dist/fields/index.d.ts
CHANGED
|
@@ -1,13 +1,79 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { S as SettingsBucket } from '../buckets-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import { S as SettingsBucket } from '../buckets-Tj-nkBpg.js';
|
|
4
|
+
export { D as DesignGroup } from '../buckets-Tj-nkBpg.js';
|
|
5
|
+
import { a as InspectorFieldDef, I as InspectorFields, F as FieldRenderer, b as FieldTextProps, c as FieldNumberProps, d as FieldSliderProps, e as FieldSelectManyProps, f as FieldSelectOneProps, g as FieldOption } from '../types-OUl0mK1k.js';
|
|
6
|
+
export { A as ArrayFieldDef, C as CustomFieldDef, h as CustomFieldRenderProps, i as FieldSelectProps, N as NumberFieldDef, O as ObjectFieldDef, R as RadioFieldDef, S as SelectFieldDef, j as SlotFieldDef, T as TextFieldDef, k as TextareaFieldDef } from '../types-OUl0mK1k.js';
|
|
6
7
|
import { R as ResolvableItem } from '../resolve-D68pb3Bx.js';
|
|
7
8
|
export { F as FieldsWords } from '../words-vhnV8sM7.js';
|
|
8
9
|
export { LinkFilter, LinkFilterField, LinkKindChoice, LinkOption, LinkOptionGroup, LinkPicker, LinkPickerProps, LinkRules, LinkTarget } from 'efficient-shell/ui';
|
|
9
10
|
import '../types-41704JE4.js';
|
|
10
11
|
|
|
12
|
+
/** The folding band a row sits in: the fold marker's name and its title. */
|
|
13
|
+
interface PlannedFold {
|
|
14
|
+
key: string;
|
|
15
|
+
title: string;
|
|
16
|
+
}
|
|
17
|
+
/** One drawn row: a field, its name, the tab it opens, and its band if any. */
|
|
18
|
+
interface PlannedRow {
|
|
19
|
+
name: string;
|
|
20
|
+
field: InspectorFieldDef;
|
|
21
|
+
bucket: SettingsBucket;
|
|
22
|
+
/** The band the row sits in (a `fold` marker above it); none before the first. */
|
|
23
|
+
fold?: PlannedFold;
|
|
24
|
+
}
|
|
25
|
+
interface FieldPlan {
|
|
26
|
+
/**
|
|
27
|
+
* Every field that is not a marker and not hidden, in the order declared.
|
|
28
|
+
*
|
|
29
|
+
* ⚠️ A `slot` field is among them and draws NOTHING: it is here so its name
|
|
30
|
+
* has a bucket (`bucketsOf`), and `Inspector` leaves it mounted but empty.
|
|
31
|
+
* A host that draws rows of its own, or counts them ("3 settings"), filters
|
|
32
|
+
* `row.field.type !== 'slot'` first. `buckets` already leaves slots out.
|
|
33
|
+
*/
|
|
34
|
+
rows: PlannedRow[];
|
|
35
|
+
/** The tabs to offer: the buckets that hold a row, in the owner's order. */
|
|
36
|
+
buckets: SettingsBucket[];
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* WHICH TAB EACH FIELD OPENS — read off the fields themselves (blueprint 4.1:
|
|
40
|
+
* "the tab is declared by the field, never found by hashed class names").
|
|
41
|
+
*
|
|
42
|
+
* In declaration order, a field's own `bucket` starts that bucket, and every
|
|
43
|
+
* field after it without one stays in it; the panel starts in Design, the first
|
|
44
|
+
* bucket (`SETTINGS_BUCKETS`: Design, Animation since 4.0.0), so the rows that
|
|
45
|
+
* were the Content tab — declared first — sit at the top of Design. That one
|
|
46
|
+
* rule covers both editors: the email designer puts a mark in front of each
|
|
47
|
+
* tab's run (its `FIELD_BUCKETS` map), the website puts a heading there (its
|
|
48
|
+
* `group(...)` headers), and a mark is just a field with `marker: true` that
|
|
49
|
+
* draws nothing. A bucket name that is not in the list — the 3.x names
|
|
50
|
+
* `Content`, `Style` and `Layout` included — changes nothing.
|
|
51
|
+
*
|
|
52
|
+
* The Design GROUPS (`DESIGN_GROUPS`: Content, Size, Design, Layout, Position,
|
|
53
|
+
* Anchor) are not tabs and are not read here: they are the host's headings
|
|
54
|
+
* inside Design, in that order.
|
|
55
|
+
*
|
|
56
|
+
* A slot counts for no tab — it draws nothing in the panel — and a field with
|
|
57
|
+
* `visible: false` neither draws nor counts, so a tab whose fields are all
|
|
58
|
+
* hidden is not offered (the owner's rule: an empty tab is hidden, never drawn).
|
|
59
|
+
*
|
|
60
|
+
* BANDS (Lewis, 2026-10-13: one kind of group heading per panel, and it folds).
|
|
61
|
+
* A marker with `fold` starts a band titled with it; the rows after it are in
|
|
62
|
+
* that band until the next fold marker or the next tab marker (a band never
|
|
63
|
+
* crosses a tab). A marker with `fold: false` ends the band above and starts
|
|
64
|
+
* none, so the rows after it stand alone. A marker with neither `fold` nor
|
|
65
|
+
* `bucket` ends nothing: it is a key the host keeps and nothing more. One level only — a band in a band
|
|
66
|
+
* cannot be said. A band whose rows are all hidden draws nothing
|
|
67
|
+
* (`Inspector`).
|
|
68
|
+
*/
|
|
69
|
+
declare function planFields(fields: InspectorFields): FieldPlan;
|
|
70
|
+
/**
|
|
71
|
+
* Every field's bucket, by name — what "copy style" asks (a look is never
|
|
72
|
+
* Animation). The walk both editors did on their own (the website's
|
|
73
|
+
* `style-clipboard.ts`, the email designer's `FIELD_BUCKETS`) is this one.
|
|
74
|
+
*/
|
|
75
|
+
declare function bucketsOf(fields: InspectorFields): Map<string, SettingsBucket>;
|
|
76
|
+
|
|
11
77
|
interface InspectorProps {
|
|
12
78
|
/** The selected node's fields, already resolved by the host. */
|
|
13
79
|
fields: InspectorFields;
|
|
@@ -23,7 +89,8 @@ interface InspectorProps {
|
|
|
23
89
|
onTab?: (tab: SettingsBucket) => void;
|
|
24
90
|
/** False: no tab strip, every row in one list (the email designer's phone view). */
|
|
25
91
|
tabs?: boolean;
|
|
26
|
-
/** A glyph per tab (both editors draw one).
|
|
92
|
+
/** A glyph per tab (both editors draw one). A tab with a glyph is
|
|
93
|
+
* icon-only: its word is its accessible name and its Tooltip. */
|
|
27
94
|
tabIcons?: Partial<Record<SettingsBucket, ReactNode>>;
|
|
28
95
|
/** A field type's drawing, swapped in by the host. */
|
|
29
96
|
renderers?: Partial<Record<InspectorFieldDef['type'], FieldRenderer>>;
|
|
@@ -31,8 +98,20 @@ interface InspectorProps {
|
|
|
31
98
|
idPrefix?: string;
|
|
32
99
|
/** The tab strip's name. Default "Settings" (`EaselStrings.panel.settings`). */
|
|
33
100
|
ariaLabel?: string;
|
|
101
|
+
/** Drawn inside the rows panel BEFORE the rows, on every tab (4.0.0). The
|
|
102
|
+
* website editor puts its text box here, so it sits at the top of Design. */
|
|
103
|
+
lead?: ReactNode;
|
|
34
104
|
/** Drawn after the rows, on every tab (an app's own trailing rows). */
|
|
35
105
|
children?: ReactNode;
|
|
106
|
+
/** Put `lead` in a folding band of its own, with this key and title, the
|
|
107
|
+
* first band of the panel (4.0.0). Absent: `lead` stands without a band. */
|
|
108
|
+
leadFold?: PlannedFold;
|
|
109
|
+
/** The bands that are CLOSED, by key (a fold marker's name, or
|
|
110
|
+
* `leadFold.key`). Absent: the Inspector keeps its own; every band starts
|
|
111
|
+
* open. */
|
|
112
|
+
closedFolds?: ReadonlySet<string>;
|
|
113
|
+
/** A band opened (`true`) or closed (`false`). */
|
|
114
|
+
onFold?: (key: string, open: boolean) => void;
|
|
36
115
|
}
|
|
37
116
|
/**
|
|
38
117
|
* THE SETTINGS PANEL'S BODY (blueprint step 4.1) — what `<Puck.Fields>` was in
|
|
@@ -40,7 +119,14 @@ interface InspectorProps {
|
|
|
40
119
|
*
|
|
41
120
|
* - THE TABS ARE THE FIELDS' OWN. Which tab a field opens is said on the field
|
|
42
121
|
* (`bucket`, ./plan); the strip offers only the tabs that hold a row, in the
|
|
43
|
-
* owner's order, and none at all when there is only one.
|
|
122
|
+
* owner's order (Design, Animation), and none at all when there is only one.
|
|
123
|
+
* - THE STRIP IS THE SHELL'S `Tabs` (4.0.0, harness UI-24). Owner, final
|
|
124
|
+
* 2026-10-10: two icon-only tabs of EQUAL width, the chosen one a blue icon
|
|
125
|
+
* over a blue underline — the shell's `underline` look with `block`. A tab
|
|
126
|
+
* with a glyph keeps its word visually hidden in its label (the shell's
|
|
127
|
+
* documented icon-only pattern, `sr-only`), so the word is still its name,
|
|
128
|
+
* and says the word in the tab's own Tooltip. A tab with no glyph shows its
|
|
129
|
+
* word. Easel's `SettingsTabs` is no longer drawn here.
|
|
44
130
|
* - A ROW ON ANOTHER TAB IS HIDDEN, NOT UNMOUNTED. The email designer's Logo
|
|
45
131
|
* re-bakes its colours from a field on a tab you are not looking at; taking
|
|
46
132
|
* the row out of the tree would stop that.
|
|
@@ -49,10 +135,18 @@ interface InspectorProps {
|
|
|
49
135
|
* that draws nothing takes no space (`:empty`).
|
|
50
136
|
* - THE SPACING IS THE PANEL'S (panel.css `--es-rhythm-*`): a row adds none of
|
|
51
137
|
* its own, so the rhythm is defined once for both editors.
|
|
52
|
-
* - A TAB'S KEY IS NOT ITS WORD. `bucket: '
|
|
53
|
-
* says is `EaselStrings.panel.buckets.
|
|
138
|
+
* - A TAB'S KEY IS NOT ITS WORD. `bucket: 'Design'` names the tab; what the tab
|
|
139
|
+
* says is `EaselStrings.panel.buckets.Design`, from the strings provider.
|
|
140
|
+
* - `lead` OPENS THE ROWS, `children` CLOSE THEM. Both sit inside the rows
|
|
141
|
+
* panel and show on every tab.
|
|
142
|
+
* - ONE KIND OF GROUP, AND IT FOLDS (Lewis, 2026-10-13). A run of rows under a
|
|
143
|
+
* `fold` marker (./plan) is drawn inside ONE easel `SettingsGroup`, the grey
|
|
144
|
+
* band with − / + on its right, open until it is closed. `leadFold` puts
|
|
145
|
+
* `lead` in a band of its own. A closed band's rows stay MOUNTED (the body
|
|
146
|
+
* is `hidden`), as a row on another tab does. Which bands are closed is the
|
|
147
|
+
* host's when it passes `closedFolds` + `onFold`, else the Inspector's own.
|
|
54
148
|
*/
|
|
55
|
-
declare function Inspector({ fields, values, onChange, readOnly, context, tab, onTab, tabs, tabIcons, renderers, idPrefix, ariaLabel, children, }: InspectorProps): react.JSX.Element;
|
|
149
|
+
declare function Inspector({ fields, values, onChange, readOnly, context, tab, onTab, tabs, tabIcons, renderers, idPrefix, ariaLabel, lead, children, leadFold, closedFolds, onFold, }: InspectorProps): react.JSX.Element;
|
|
56
150
|
|
|
57
151
|
interface InspectorFieldProps {
|
|
58
152
|
field: InspectorFieldDef;
|
|
@@ -92,48 +186,6 @@ declare const labelOf: (field: InspectorFieldDef, name: string) => string;
|
|
|
92
186
|
*/
|
|
93
187
|
declare function InspectorField(props: InspectorFieldProps): ReactNode;
|
|
94
188
|
|
|
95
|
-
/** One drawn row: a field, its name, and the tab it opens. */
|
|
96
|
-
interface PlannedRow {
|
|
97
|
-
name: string;
|
|
98
|
-
field: InspectorFieldDef;
|
|
99
|
-
bucket: SettingsBucket;
|
|
100
|
-
}
|
|
101
|
-
interface FieldPlan {
|
|
102
|
-
/**
|
|
103
|
-
* Every field that is not a marker and not hidden, in the order declared.
|
|
104
|
-
*
|
|
105
|
-
* ⚠️ A `slot` field is among them and draws NOTHING: it is here so its name
|
|
106
|
-
* has a bucket (`bucketsOf`), and `Inspector` leaves it mounted but empty.
|
|
107
|
-
* A host that draws rows of its own, or counts them ("3 settings"), filters
|
|
108
|
-
* `row.field.type !== 'slot'` first. `buckets` already leaves slots out.
|
|
109
|
-
*/
|
|
110
|
-
rows: PlannedRow[];
|
|
111
|
-
/** The tabs to offer: the buckets that hold a row, in the owner's order. */
|
|
112
|
-
buckets: SettingsBucket[];
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* WHICH TAB EACH FIELD OPENS — read off the fields themselves (blueprint 4.1:
|
|
116
|
-
* "the tab is declared by the field, never found by hashed class names").
|
|
117
|
-
*
|
|
118
|
-
* In declaration order, a field's own `bucket` starts that bucket, and every
|
|
119
|
-
* field after it without one stays in it; the panel starts in Content. That one
|
|
120
|
-
* rule covers both editors as they are written today: the email designer puts a
|
|
121
|
-
* mark in front of each tab's run (its `FIELD_BUCKETS` map), the website puts a
|
|
122
|
-
* heading there (its `group(...)` headers), and a mark is just a field with
|
|
123
|
-
* `marker: true` that draws nothing.
|
|
124
|
-
*
|
|
125
|
-
* A slot counts for no tab — it draws nothing in the panel — and a field with
|
|
126
|
-
* `visible: false` neither draws nor counts, so a tab whose fields are all
|
|
127
|
-
* hidden is not offered (the owner's rule: an empty tab is hidden, never drawn).
|
|
128
|
-
*/
|
|
129
|
-
declare function planFields(fields: InspectorFields): FieldPlan;
|
|
130
|
-
/**
|
|
131
|
-
* Every field's bucket, by name — what "copy style" asks (a look is what is not
|
|
132
|
-
* Content). The walk both editors did on their own (the website's
|
|
133
|
-
* `style-clipboard.ts`, the email designer's `FIELD_BUCKETS`) is this one.
|
|
134
|
-
*/
|
|
135
|
-
declare function bucketsOf(fields: InspectorFields): Map<string, SettingsBucket>;
|
|
136
|
-
|
|
137
189
|
/** What a block may declare about its fields. */
|
|
138
190
|
interface FieldsBlock {
|
|
139
191
|
fields?: object;
|
|
@@ -393,4 +445,4 @@ declare function optionFor<V>(options: readonly FieldOption<V>[], value: V | und
|
|
|
393
445
|
declare function FieldSelect<V>(props: FieldSelectManyProps<V>): ReactNode;
|
|
394
446
|
declare function FieldSelect<V>(props: FieldSelectOneProps<V>): ReactNode;
|
|
395
447
|
|
|
396
|
-
export { FieldNumber, FieldNumberProps, FieldOption, type FieldPlan, FieldRenderer, FieldSelect, FieldSelectManyProps, FieldSelectOneProps, FieldSlider, FieldSliderProps, FieldText, FieldTextProps, type FieldsBlock, Inspector, InspectorField, InspectorFieldDef, type InspectorFieldProps, InspectorFields, type InspectorProps, ListField, type ListFieldProps, type PlannedRow, type ResolvedFieldsInput, SettingsBucket, bucketsOf, copyItem, insertAt, labelOf, moveTo, optionFor, planFields, removeAt, useResolvedFields };
|
|
448
|
+
export { FieldNumber, FieldNumberProps, FieldOption, type FieldPlan, FieldRenderer, FieldSelect, FieldSelectManyProps, FieldSelectOneProps, FieldSlider, FieldSliderProps, FieldText, FieldTextProps, type FieldsBlock, Inspector, InspectorField, InspectorFieldDef, type InspectorFieldProps, InspectorFields, type InspectorProps, ListField, type ListFieldProps, type PlannedFold, type PlannedRow, type ResolvedFieldsInput, SettingsBucket, bucketsOf, copyItem, insertAt, labelOf, moveTo, optionFor, planFields, removeAt, useResolvedFields };
|
package/dist/fields/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{FieldText,Inspector,InspectorField,LinkPicker,ListField,bucketsOf,copyItem,insertAt,labelOf,moveTo,planFields,removeAt}from"../chunk-
|
|
1
|
+
export{FieldText,Inspector,InspectorField,LinkPicker,ListField,bucketsOf,copyItem,insertAt,labelOf,moveTo,planFields,removeAt}from"../chunk-CRWFB7MU.js";export{FieldSelect,FieldSlider,optionFor}from"../chunk-OZ72A6MY.js";import"../chunk-4JSBIW5H.js";import"../chunk-3ZJSLHHI.js";import"../chunk-K56YDHYQ.js";import"../chunk-KFV7N2DJ.js";export{useResolvedFields}from"../chunk-YRLPFZW3.js";import"../chunk-EA2HTX37.js";export{FieldNumber}from"../chunk-66LWADFP.js";import"../chunk-QLD57GBB.js";import"../chunk-FFYXVAAL.js";import"../chunk-MFIRYGHW.js";import"../chunk-67GNT6PF.js";import"../chunk-P2VEMZH5.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";
|
package/dist/panel/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { W as WordFit } from '../wordFit-7XpmhcaW.js';
|
|
4
|
-
import { P as PanelWords } from '../words-
|
|
4
|
+
import { P as PanelWords } from '../words-zH1H0WFw.js';
|
|
5
5
|
export { CornerOption as SettingsCornerPoint, CornersInput as SettingsCorners, CornersInputProps as SettingsCornersProps, AlignmentGrid as SettingsPlacement, AlignmentPoint as SettingsPlacementPoint, AlignmentGridProps as SettingsPlacementProps } from 'efficient-shell/ui';
|
|
6
|
-
export { a as SETTINGS_BUCKETS, S as SettingsBucket } from '../buckets-
|
|
6
|
+
export { a as DESIGN_GROUPS, D as DesignGroup, b as SETTINGS_BUCKETS, S as SettingsBucket } from '../buckets-Tj-nkBpg.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* The settings-panel primitives — the shared grammar BOTH editors' inspector
|
|
@@ -586,6 +586,12 @@ type SettingsActionNote = {
|
|
|
586
586
|
};
|
|
587
587
|
type SettingsActionProps = SettingsActionBaseProps & SettingsActionNote;
|
|
588
588
|
|
|
589
|
+
/**
|
|
590
|
+
* @deprecated The selection panel draws the shell `Tabs` since 4.0.0. Still
|
|
591
|
+
* used by WebsiteSettingsPanel (web-builder), HeaderSettingsPanel
|
|
592
|
+
* (storefront-blocks) and the Site styles harness (storefront); a follow-up
|
|
593
|
+
* card moves those and deletes this file.
|
|
594
|
+
*/
|
|
589
595
|
declare function SettingsTabs({ items, activeId, onSelect, ariaLabel, idPrefix, className, }: SettingsTabsProps): react.JSX.Element;
|
|
590
596
|
|
|
591
597
|
/**
|
package/dist/panel/index.js
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
export{SETTINGS_BUCKETS,SettingsField,SettingsGroup
|
|
2
|
-
|
|
3
|
-
return s(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/* @__PURE__ */
|
|
7
|
-
/* @__PURE__ */s("span",{className:"es-
|
|
8
|
-
|
|
9
|
-
return t
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/* @__PURE__ */
|
|
1
|
+
export{DESIGN_GROUPS,SETTINGS_BUCKETS,SettingsField,SettingsGroup}from"../chunk-3ZJSLHHI.js";import{DEFAULT_PANEL_WORDS as e}from"../chunk-KFV7N2DJ.js";export{SettingsSegmented,SettingsSwitch}from"../chunk-QLD57GBB.js";import{withTip as n}from"../chunk-P2VEMZH5.js";import{Tabs as t,CountBadge as i,Tooltip as l}from"efficient-shell/ui";export{CornersInput as SettingsCorners,AlignmentGrid as SettingsPlacement}from"efficient-shell/ui";import{jsx as s,jsxs as a,Fragment as r}from"react/jsx-runtime";import{RevertIcon as c}from"efficient-shell/icons/efficient";function d(e){const n=e[0];if(!n?.htmlId||!n.htmlId.endsWith(`-tab-${n.id}`))return;const t=n.htmlId.slice(0,-`-tab-${n.id}`.length);return e.every(e=>e.htmlId===`${t}-tab-${e.id}`)?t:void 0}function o({items:n,activeId:l,onSelect:c,ariaLabel:o=e.settings,idPrefix:u,className:m}){
|
|
2
|
+
/* @__PURE__ */
|
|
3
|
+
return s("div",{className:"es-tabs-fit",children:/* @__PURE__ */s(t,{variant:"pill","aria-label":o,idPrefix:u??d(n),className:m?`es-tabs ${m}`:"es-tabs",value:l,onChange:c,items:n.map(e=>{const n="number"==typeof e.badge&&e.badge>0?/* @__PURE__ */s(i,{count:e.badge,tone:"accent"}):null;return e.icon?{id:e.id,tooltip:e.label,label:/* @__PURE__ */a(r,{children:[
|
|
4
|
+
/* @__PURE__ */a("span",{className:"es-tab-tip",children:[
|
|
5
|
+
/* @__PURE__ */s("span",{className:"es-tab-icon","aria-hidden":"true",children:e.icon}),
|
|
6
|
+
/* @__PURE__ */s("span",{className:"es-tab-word has-icon",children:e.label})]}),n]})}:{id:e.id,label:/* @__PURE__ */a(r,{children:[
|
|
7
|
+
/* @__PURE__ */s("span",{className:"es-tab-word",children:e.label}),n]})}})})})}function u({title:e,level:n=3,id:t,className:i}){/* @__PURE__ */
|
|
8
|
+
return s(`h${n}`,{id:t,className:i?`es-group-head ${i}`:"es-group-head",children:e})}function m({title:e,level:n=4,id:t,className:i}){/* @__PURE__ */
|
|
9
|
+
return s(`h${n}`,{id:t,className:i?`es-group-sub ${i}`:"es-group-sub",children:e})}function b({label:t,changed:i,onReset:l,detail:a,disabled:r,defaultAction:d,words:o,className:u}){const m={...e,...o},b=["es-default-reset"];if(i&&b.push("is-changed"),u&&b.push(u),!i&&d)return b.push("is-pressable"),n(d.title,/* @__PURE__ */s("button",{type:"button",className:b.join(" "),"aria-label":d.title,disabled:r,onClick:d.onPress,children:d.icon}));if(!i)/* @__PURE__ */
|
|
10
|
+
return s("span",{className:b.join(" "),"aria-hidden":"true"});const N=m.resetName({label:t});return n(a?m.resetTitle({label:t,detail:a}):N,/* @__PURE__ */s("button",{type:"button",className:b.join(" "),"aria-label":N,"aria-description":a||void 0,disabled:r,onClick:e=>{l(),function(e){const n=e.currentTarget,t=n.closest(".es-field");let i=t?.querySelector(h(".es-field-ctl"))??t?.querySelector(h(".es-field-head"))??null,l=t?null:n.parentElement;for(let e=0;!i&&l&&e<f;e+=1,l=l.parentElement)i=[...l.querySelectorAll(p)].find(e=>e!==n)??null;i?.focus()}(e)},children:/* @__PURE__ */s(c,{size:15})}))}var p=['input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled]):not(.es-default-reset)",'[tabindex]:not([tabindex="-1"])'].join(", "),h=e=>p.split(", ").map(n=>`${e} ${n}`).join(", "),f=4;function N({name:e,preview:n,offPage:t,status:i,onOpen:c,id:d,className:o}){const u=null!=n;/* @__PURE__ */
|
|
11
|
+
return a("button",{type:"button",id:d,className:o?`es-drill ${o}`:"es-drill",onClick:c,children:[
|
|
12
|
+
/* @__PURE__ */a(l,{content:u?/* @__PURE__ */a(r,{children:[e,
|
|
13
|
+
/* @__PURE__ */s("br",{}),n]}):e,describe:!1,className:"es-drill-text",children:[
|
|
14
|
+
/* @__PURE__ */s("span",{className:"es-drill-name",children:e}),u?/* @__PURE__ */s("span",{className:t?"es-drill-preview is-offpage":"es-drill-preview",children:n}):null]}),i?/* @__PURE__ */s("span",{className:"es-drill-status",children:i}):null,
|
|
15
|
+
/* @__PURE__ */s("span",{className:"es-drill-chev","aria-hidden":"true"})]})}function g({label:e,onPress:n,disabled:t,note:i,done:l,doneLabel:r,icon:c,id:d,className:o}){const u=void 0===r?e:r,m=l?u:e,b=null!=i,p=b&&d?`${d}-note`:void 0;/* @__PURE__ */
|
|
16
|
+
return a("div",{className:o?`es-action-wrap ${o}`:"es-action-wrap",children:[
|
|
17
|
+
/* @__PURE__ */a("button",{type:"button",id:d,className:l?"es-action is-done":"es-action",disabled:t,"aria-describedby":p,onClick:n,children:[c?/* @__PURE__ */s("span",{className:"es-action-icon","aria-hidden":"true",children:c}):null,
|
|
18
|
+
/* @__PURE__ */s("span",{className:"es-action-label",children:m})]}),b?/* @__PURE__ */s("p",{id:p,className:"es-action-note",children:i}):null,
|
|
19
|
+
/* @__PURE__ */s("span",{className:"es-action-live",role:"status","aria-live":"polite",children:l?u:null})]})}export{g as SettingsAction,b as SettingsDefaultReset,N as SettingsDrill,u as SettingsGroupHead,m as SettingsGroupSub,o as SettingsTabs};
|
package/dist/panel/panel.css
CHANGED
|
@@ -787,6 +787,18 @@ button.es-group-head:hover { background: var(--es-chip-bg); }
|
|
|
787
787
|
min-width: 0;
|
|
788
788
|
}
|
|
789
789
|
|
|
790
|
+
/* A LIST OF DRILL ROWS IN THE CONTROL SLOT STACKS (Lewis, 2026-10-14). The slot
|
|
791
|
+
is a row because a slider and its number box share it; a drill row is a
|
|
792
|
+
full-width row wherever it sits. A named list (the Hero's `Slides`, with its
|
|
793
|
+
count on the label line) hands its rows here, and as a row they shrank to
|
|
794
|
+
their words: "Slide" and "1" broke onto two lines and the third row ran past
|
|
795
|
+
the panel edge. No gap: the rows spend theirs as padding (`.es-drill`). */
|
|
796
|
+
.es-field-ctl:has(> .es-drill) {
|
|
797
|
+
flex-direction: column;
|
|
798
|
+
align-items: stretch;
|
|
799
|
+
gap: 0;
|
|
800
|
+
}
|
|
801
|
+
|
|
790
802
|
/* The hint sits FLUSH LEFT, on the same edge as the row's icon and control —
|
|
791
803
|
not indented under the label's words (owner ruling, 2026-10-06; it was
|
|
792
804
|
24px, glyph + gap, until then). `tests/panel-hint-flush-left` holds it. */
|
|
@@ -978,6 +990,8 @@ button.es-group-head:hover { background: var(--es-chip-bg); }
|
|
|
978
990
|
/* The two lines, stacked, and allowed to shrink so the preview can ellipsise
|
|
979
991
|
instead of shoving the chevron off the row. */
|
|
980
992
|
.es-drill-text {
|
|
993
|
+
/* the shell Tooltip's wrapper: its bubble is placed against this box */
|
|
994
|
+
position: relative;
|
|
981
995
|
display: flex;
|
|
982
996
|
flex-direction: column;
|
|
983
997
|
gap: 2px;
|
|
@@ -989,6 +1003,11 @@ button.es-group-head:hover { background: var(--es-chip-bg); }
|
|
|
989
1003
|
font-size: 12px;
|
|
990
1004
|
font-weight: 600;
|
|
991
1005
|
color: var(--es-text-strong);
|
|
1006
|
+
/* One line, like the preview under it: a name that wraps turns a list of
|
|
1007
|
+
rows into a column of broken words. Cut, the row's Tooltip has it whole. */
|
|
1008
|
+
white-space: nowrap;
|
|
1009
|
+
overflow: hidden;
|
|
1010
|
+
text-overflow: ellipsis;
|
|
992
1011
|
}
|
|
993
1012
|
|
|
994
1013
|
/* The preview is one line, clipped. It never wraps: a part's copy can be a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{AddBlockRow as default}from"../../chunk-
|
|
1
|
+
export{AddBlockRow as default}from"../../chunk-UQ6CD3K2.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-KSTX646X.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-MCHMF32I.js";import"../../chunk-XW4AV5N4.js";import"../../chunk-AELNNAFM.js";import"../../chunk-CRWFB7MU.js";import"../../chunk-OZ72A6MY.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-3ZJSLHHI.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-UK2FQOUT.js";import"../../chunk-66LWADFP.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{blockKey,AddSidePanel as default,sectionKey,templateKey}from"../../chunk-
|
|
1
|
+
export{blockKey,AddSidePanel as default,sectionKey,templateKey}from"../../chunk-3GX7XBAF.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-BVN33R76.js";import"../../chunk-PFNIVZPN.js";import"../../chunk-KQMML6JM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-KSTX646X.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-MCHMF32I.js";import"../../chunk-XW4AV5N4.js";import"../../chunk-AELNNAFM.js";import"../../chunk-CRWFB7MU.js";import"../../chunk-OZ72A6MY.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-3ZJSLHHI.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-UK2FQOUT.js";import"../../chunk-UB4TLWVJ.js";import"../../chunk-Y2G7CU6A.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-66LWADFP.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-37DMJPHL.js";import"../../chunk-O2NLQBFX.js";import"../../chunk-67GNT6PF.js";import"../../chunk-PAELDYYS.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{MediaSidePanel as default}from"../../chunk-
|
|
1
|
+
export{MediaSidePanel as default}from"../../chunk-KJ2RODGT.js";import"../../chunk-KSTX646X.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-XW4AV5N4.js";import"../../chunk-AELNNAFM.js";import"../../chunk-CRWFB7MU.js";import"../../chunk-OZ72A6MY.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-3ZJSLHHI.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-UK2FQOUT.js";import"../../chunk-UB4TLWVJ.js";import"../../chunk-Y2G7CU6A.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-66LWADFP.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FFYXVAAL.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|