efficient-easel 3.7.0 → 4.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/dist/chunk-4JSBIW5H.js +9 -0
- package/dist/{chunk-6N64PNWF.js → chunk-4YBMSUPL.js} +1 -1
- package/dist/chunk-7GVPKRW2.js +14 -0
- package/dist/{chunk-CRG625FM.js → chunk-D4BUPPPV.js} +3 -3
- package/dist/{chunk-XW4AV5N4.js → chunk-FUOZKV7A.js} +3 -3
- package/dist/chunk-KFMJ4IM4.js +5 -0
- package/dist/{chunk-RKSKUGWC.js → chunk-LJOYIXO4.js} +43 -43
- package/dist/{chunk-CRPJGCSO.js → chunk-NJOPEWYN.js} +16 -16
- package/dist/{chunk-MUZNA23W.js → chunk-QBJJVMVB.js} +1 -1
- package/dist/chunk-QEWRHH6R.js +5 -0
- package/dist/{chunk-XBNOEQMR.js → chunk-SNMCF2ZD.js} +1 -1
- package/dist/{chunk-SCPCXNTB.js → chunk-TJOUAFJE.js} +1 -1
- package/dist/{chunk-VZGLBEAE.js → chunk-X2GNFJRC.js} +1 -1
- package/dist/{chunk-LZ6EGT4Y.js → chunk-XJPNW26S.js} +1 -1
- package/dist/{chunk-MTRFMGBO.js → chunk-ZHTQCAQ2.js} +1 -1
- package/dist/drag/drag.css +5 -56
- package/dist/drag/index.js +1 -1
- package/dist/easel/index.js +1 -1
- package/dist/fields/index.js +1 -1
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/MediaSidePanel.js +1 -1
- package/dist/screen/components/NodeContextMenu.d.ts +1 -1
- package/dist/screen/components/NodeContextMenu.js +1 -1
- package/dist/screen/components/ScreenChrome.js +1 -1
- package/dist/screen/components/ScreenMount.d.ts +1 -1
- package/dist/screen/components/ScreenMount.js +1 -1
- package/dist/screen/components/ScreenStoreProvider.d.ts +1 -1
- package/dist/screen/components/ScreenStoreProvider.js +1 -1
- package/dist/screen/components/SectionScreenShell.js +15 -15
- package/dist/screen/components/usePartBridge.d.ts +1 -1
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.d.ts +1 -1
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/key-scope.js +1 -1
- package/dist/screen/lib/puck/style-clipboard.d.ts +1 -1
- package/dist/screen/lib/puck/use-section-ops.js +1 -1
- package/dist/screen/lib/screen-parts.d.ts +1 -1
- package/dist/screen/lib/screen-parts.js +1 -1
- package/dist/screen/screen.css +9 -42
- package/dist/tree/index.d.ts +8 -4
- package/dist/tree/index.js +1 -1
- package/dist/tree/tree.css +6 -3
- package/dist/{types-BqGnUVX5.d.ts → types-BLRK6_JO.d.ts} +7 -0
- package/package.json +3 -3
- package/dist/chunk-2GLQRNYT.js +0 -16
- package/dist/chunk-LUSM3QTY.js +0 -5
- package/dist/chunk-UFY6RNMT.js +0 -9
- package/dist/chunk-YIKMVF24.js +0 -5
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import{FieldSelect as e}from"./chunk-OZ72A6MY.js";import{TreeSeam as n}from"./chunk-
|
|
1
|
+
import{FieldSelect as e}from"./chunk-OZ72A6MY.js";import{TreeSeam as n}from"./chunk-4JSBIW5H.js";import{SettingsField as t,SETTINGS_BUCKETS as l,SettingsTabs as a,SettingsGroup as r}from"./chunk-YNOZ5NXW.js";import{DEFAULT_TREE_WORDS as i}from"./chunk-K56YDHYQ.js";import{DEFAULT_PANEL_WORDS as o}from"./chunk-QTLAVDJE.js";import{EaselMenuItems as s}from"./chunk-EA2HTX37.js";import{FieldNumber as c}from"./chunk-66LWADFP.js";import{SettingsSegmented as d}from"./chunk-QLD57GBB.js";import{DEFAULT_FIELDS_WORDS as u}from"./chunk-FFYXVAAL.js";import{useWords as m}from"./chunk-MFIRYGHW.js";import{useTreeDrag as p,gapToMoveIndex as h}from"./chunk-67GNT6PF.js";import{withTip as b}from"./chunk-P2VEMZH5.js";import{Textarea as f,Input as g,SortableList as v,ListRow as y,ContextMenu as x,tabPanelId as k,tabButtonId as w}from"efficient-shell/ui";export{LinkPicker}from"efficient-shell/ui";import{useRef as N,useState as O,useLayoutEffect as C,useId as j}from"react";import{jsx as D,jsxs as I}from"react/jsx-runtime";import{ChevronIcon as S,LockIcon as $,MoveUpIcon as P,MoveDownIcon as L,DuplicateIcon as A,TrashIcon as F}from"efficient-shell/icons/efficient";function M({id:e,value:n,onChange:t,placeholder:l,multiline:a=!1,rows:r=3,readOnly:i=!1,ariaLabel:o,ariaLabelledBy:s}){const c=n??"";return a?/* @__PURE__ */D(f,{id:e,size:"sm",className:"es-fin",value:c,rows:r,placeholder:l,readOnly:i,"aria-label":o,"aria-labelledby":s,onChange:e=>t(e.target.value)}):/* @__PURE__ */D(g,{id:e,size:"sm",className:"es-fin",type:"text",value:c,placeholder:l,readOnly:i,"aria-label":o,"aria-labelledby":s,onChange:e=>t(e.target.value)})}function T(e,n,t){const l=e.slice();return l.splice(Math.max(0,Math.min(n,l.length)),0,t),l}function E(e,n,t){const l=e.slice(),[a]=l.splice(n,1);return l.splice(Math.max(0,Math.min(t,l.length)),0,a),l}function R(e,n){return e.filter((e,t)=>t!==n)}function z(e){return null===e||"object"!=typeof e?e:JSON.parse(JSON.stringify(e))}var H='input, textarea, select, button, [contenteditable]:not([contenteditable="false"]), [tabindex]',B={parentId:"list",slot:"items"};function Y({label:e,icon:t,noun:l,items:a,onChange:r,newItem:o,summary:c,itemName:d,thumb:f,min:g=0,max:k,readOnly:w=!1,open:j,onOpen:M,renderItem:Y,renderRow:J,canRemove:K,lockedReason:V,fixed:W=!1,removeOnRow:X=!0,canDuplicate:G,above:Q,head:Z=!0}){const q=m("fields",u).list,U=m("tree",i),_=l??q.item,ee=!w&&!W&&("number"!=typeof k||a.length<k),ne=a.length<=g,te=e=>!!K&&!K(a[e],e),le=e=>!w&&!W&&X&&!ne&&!te(e),ae=e=>ee&&(!G||G(a[e],e)),re=(e,n)=>d?d(e,n):q.itemName({noun:_,n:n+1}),ie=N([]),oe=N(null),[se,ce]=O(null),de=N(null),[ue,me]=O(null),[pe,he]=O("");C(()=>{const e=oe.current;if(!e)return;oe.current=null;const n=ie.current[e.index]?.querySelectorAll(H)[e.nth]??ie.current[e.index];if(n?.focus(),n&&null!==e.start&&"setSelectionRange"in n)try{n.setSelectionRange(e.start,e.end)}catch{}});const be=(e,n)=>{if(n<0||n>=a.length||n===e)return;const t=ie.current[e],l=t?.ownerDocument.activeElement;if(t&&l&&t.contains(l)){const e=[...t.querySelectorAll(H)].indexOf(l),a=l;oe.current={index:n,nth:e,start:"number"==typeof a.selectionStart?a.selectionStart:null,end:"number"==typeof a.selectionEnd?a.selectionEnd:null}}r(E(a,e,n));const i=function(e,n,t){return null===e?null:e===n?t:n<e&&t>=e?e-1:n>e&&t<=e?e+1:e}(j,e,n);i!==j&&M(i),he(q.moved({n:n+1,total:a.length}))},fe=e=>{ee&&(r(T(a,e,o())),J?(oe.current={index:e,nth:0,start:null,end:null},null!==j&&j>=e&&M(j+1)):M(e))},ge=e=>{le(e)&&(r(R(a,e)),j===e?M(null):null!==j&&j>e&&M(j-1))},ve=p({keyOf:e=>String(e),canDrop:(e,n)=>n.parentId===B.parentId&&n.slot===B.slot,onDrop:(e,n)=>{const t=h({...B,index:e},n);t!==e&&be(e,t)},onStep:(e,n)=>be(e,e+n),canStep:(e,n)=>e+n>=0&&e+n<a.length,readOnly:w}),ye=e=>{const n=[];return e>0&&n.push({label:q.moveUp,icon:/* @__PURE__ */D(P,{size:14}),shortcut:"⌥↑",onClick:()=>be(e,e-1)}),e<a.length-1&&n.push({label:q.moveDown,icon:/* @__PURE__ */D(L,{size:14}),shortcut:"⌥↓",onClick:()=>be(e,e+1)}),ae(e)&&n.push({label:q.duplicate,icon:/* @__PURE__ */D(A,{size:14}),onClick:()=>(e=>{ae(e)&&(r(T(a,e+1,z(a[e]))),null!==j&&j>e&&M(j+1))})(e)}),le(e)&&n.push({label:q.delete,icon:/* @__PURE__ */D(F,{size:14}),danger:!0,onClick:()=>ge(e)}),n},xe=(e,n,t,l)=>{w||0===ye(e).length||me({index:e,x:n,y:t,owner:l})},ke=e=>n=>{const t=a.slice();t[e]=n,r(t)};/* @__PURE__ */
|
|
2
2
|
return I("div",{className:"es-list",children:[Z?/* @__PURE__ */I("div",{className:"es-list-head",children:[
|
|
3
3
|
/* @__PURE__ */I("span",{className:"es-list-label",children:[t?/* @__PURE__ */D("span",{className:"es-field-icon","aria-hidden":"true",children:t}):null,e]}),
|
|
4
|
-
/* @__PURE__ */D("span",{className:"es-list-count",children:a.length})]}):null,
|
|
5
|
-
/* @__PURE__ */D(y,{className:o,flat:!!
|
|
4
|
+
/* @__PURE__ */D("span",{className:"es-list-count",children:a.length})]}):null,Q?/* @__PURE__ */D("div",{className:"es-list-above",children:Q}):null,a.length?/* @__PURE__ */I(v,{"aria-label":e,spacing:"comfortable",className:"es-list-rows",rootProps:ve.rootProps(),children:[a.map((e,t)=>{const l=ve.row({item:t,place:{...B,index:t}}),a=l.draggable&&se!==t,r=!J&&j===t,i=!w&&!W&&X&&te(t),o=["es-list-row",J?"is-inline":"is-item",r?"is-open":"",a?"is-draggable":"",l.dragging?"is-dragging":"",l.drop?`is-drop-${l.drop}`:""].filter(Boolean).join(" ");return[t>0?/* @__PURE__ */D(n,{...ve.seam({place:{...B,index:t}}),onAdd:ee?()=>fe(t):void 0,label:q.addHere({noun:_})},`seam-${t}`):null,
|
|
5
|
+
/* @__PURE__ */D(y,{className:o,flat:!!J,active:r,draggable:l.draggable,dragHint:U.dragHint,dragging:l.dragging,drop:"before"===l.drop||"after"===l.drop?l.drop:void 0,onMove:l.draggable?e=>be(t,"up"===e?t-1:t+1):void 0,rowRef:e=>{ie.current[t]=e},rowProps:{...l.rowProps,draggable:a||void 0,onPointerDown:e=>{const n=e.target.closest?.('input, textarea, select, [contenteditable]:not([contenteditable="false"])'),a=!!n&&n===n.ownerDocument.activeElement;e.currentTarget.draggable=l.draggable&&!a,de.current=n&&!a?n:null,ce(a?t:null)},onDragStart:e=>{const n=de.current;de.current=null,n&&n.ownerDocument.activeElement===n&&n.blur(),l.rowProps.onDragStart?.(e)},onContextMenu:e=>{w||(e.preventDefault(),e.stopPropagation(),xe(t,e.clientX,e.clientY,e.currentTarget))},onKeyDown:e=>{if("ContextMenu"===e.key||e.shiftKey&&"F10"===e.key){e.preventDefault();const n=e.currentTarget.ownerDocument,l=e=>e.preventDefault();n.addEventListener("contextmenu",l,{capture:!0,once:!0}),n.defaultView?.setTimeout(()=>n.removeEventListener("contextmenu",l,{capture:!0}),500);const a=e.currentTarget.getBoundingClientRect();return void xe(t,a.left+24,a.bottom,e.currentTarget)}l.rowProps.onKeyDown?.(e)}},actions:w||W||!X?void 0:i?b(V?V(e,t):q.locked,/* @__PURE__ */D("span",{className:"es-list-lock",role:"img","aria-label":V?V(e,t):q.locked,children:/* @__PURE__ */D($,{size:13})})):b(q.deleteItem({noun:_}),/* @__PURE__ */D("button",{type:"button",className:"es-list-x","aria-label":q.deleteItem({noun:_}),disabled:!le(t),onClick:()=>ge(t),children:"×"})),below:r?/* @__PURE__ */D("div",{className:"es-list-item",children:Y(e,t,ke(t))}):void 0,children:J?/* @__PURE__ */D("div",{className:"es-list-row-main",children:J(e,t,ke(t))}):/* @__PURE__ */I("button",{type:"button",className:"es-list-open","aria-expanded":r,onClick:()=>M(r?null:t),children:[f?/* @__PURE__ */D("span",{className:"es-list-thumb","aria-hidden":"true",children:f(e,t)}):null,
|
|
6
6
|
/* @__PURE__ */D("span",{className:"es-list-row-name",children:re(e,t)}),/* @__PURE__ */D("span",c?{className:"es-list-row-summary",children:c(e,t)}:{className:"es-list-row-summary"}),
|
|
7
|
-
/* @__PURE__ */D(
|
|
8
|
-
/* @__PURE__ */D(n,{...ve.seam({place:{...
|
|
7
|
+
/* @__PURE__ */D(S,{size:14,className:"es-list-chev","aria-hidden":"true"})]})},t)]}),
|
|
8
|
+
/* @__PURE__ */D(n,{...ve.seam({place:{...B,index:a.length}})})]}):null,w||W?null:/* @__PURE__ */D("button",{type:"button",className:"es-list-add",disabled:!ee,onClick:()=>fe(a.length),children:q.add({noun:_})}),
|
|
9
9
|
/* @__PURE__ */D("span",{className:"es-list-said","aria-live":"polite",children:pe}),ue&&ue.index<a.length?
|
|
10
|
-
/* @__PURE__ */D(x,{at:{x:ue.x,y:ue.y},owner:ue.owner,onClose:()=>me(null),children:/* @__PURE__ */D(s,{items:ye(ue.index),onClose:()=>me(null)})}):null]})}var
|
|
11
|
-
return D(r,{id:`${t}-group`,title:
|
|
12
|
-
return D(
|
|
13
|
-
return D(t,{label:
|
|
14
|
-
return D(t,{label:
|
|
15
|
-
return D(t,{label:
|
|
16
|
-
return D(t,{label:
|
|
17
|
-
return D(
|
|
18
|
-
return D(
|
|
19
|
-
return I("div",{className:"es-insp",children:[
|
|
20
|
-
/* @__PURE__ */I("div",{className:"es-insp-rows",id:
|
|
10
|
+
/* @__PURE__ */D(x,{at:{x:ue.x,y:ue.y},owner:ue.owner,onClose:()=>me(null),children:/* @__PURE__ */D(s,{items:ye(ue.index),onClose:()=>me(null)})}):null]})}var J=(e,n)=>"string"==typeof e.label&&e.label?e.label:n;function K({field:e,name:n,id:t,value:l,onChange:a,readOnly:i,context:o,renderers:s}){const[c,d]=O(!0),u=l&&"object"==typeof l?l:{};/* @__PURE__ */
|
|
11
|
+
return D(r,{id:`${t}-group`,title:J(e,n),open:c,onToggle:d,children:Object.entries(e.objectFields).map(([e,l])=>/* @__PURE__ */D(W,{field:l,name:`${n}.${e}`,id:`${t}-${e}`,value:u[e],onChange:n=>a({...u,[e]:n}),readOnly:i,context:o,renderers:s},e))})}function V({field:e,name:n,id:t,value:l,onChange:a,readOnly:r,context:i,renderers:o,openItem:s,onOpenItem:c}){const[d,u]=O(null),m=c?s??null:d,p=c??u,h=Array.isArray(l)?l:[],b=e.getItemSummary;/* @__PURE__ */
|
|
12
|
+
return D(Y,{label:J(e,n),icon:e.icon,noun:"string"==typeof e.noun?e.noun:void 0,items:h,onChange:a,newItem:()=>z({...e.defaultItemProps??{}}),summary:b?(e,n)=>b(e,n):void 0,min:e.min,max:e.max,readOnly:r,open:m,onOpen:p,renderItem:(l,a,s)=>Object.entries(e.arrayFields).map(([e,c])=>/* @__PURE__ */D(W,{field:c,name:`${n}[${a}].${e}`,id:`${t}-${a}-${e}`,value:l?.[e],onChange:n=>s({...l,[e]:n}),readOnly:r,context:i,renderers:o},e))})}function W(n){const{field:l,name:a,id:r,value:i,onChange:o,readOnly:s,context:u,renderers:m}=n;if(!l||l.marker||!1===l.visible)return null;const p=m?.[l.type];if(p)return p({field:l,name:a,id:r,value:i,onChange:o,readOnly:s});switch(l.type){case"custom":{const e={...u,field:l,name:a,id:r,value:i,onChange:o,readOnly:s};return l.render(e)}case"text":case"textarea":/* @__PURE__ */
|
|
13
|
+
return D(t,{label:J(l,a),htmlFor:r,icon:l.icon,hint:l.hint,children:/* @__PURE__ */D(M,{id:r,value:"string"==typeof i?i:null==i?"":String(i),onChange:o,placeholder:l.placeholder,multiline:"textarea"===l.type,readOnly:s})});case"number":/* @__PURE__ */
|
|
14
|
+
return D(t,{label:J(l,a),htmlFor:r,icon:l.icon,hint:l.hint,children:/* @__PURE__ */D(c,{id:r,value:"number"==typeof i?i:void 0,onChange:o,min:l.min,max:l.max,step:l.step,placeholder:l.placeholder,readOnly:s})});case"select":{const n=`${r}-label`;/* @__PURE__ */
|
|
15
|
+
return D(t,{label:J(l,a),labelId:n,htmlFor:r,icon:l.icon,hint:l.hint,children:/* @__PURE__ */D(e,{id:r,value:i,options:l.options,onChange:o,readOnly:s,ariaLabelledBy:n})})}case"radio":/* @__PURE__ */
|
|
16
|
+
return D(t,{label:J(l,a),icon:l.icon,hint:l.hint,children:/* @__PURE__ */D(d,{ariaLabel:J(l,a),value:i,options:l.options.map(e=>({id:e.value,label:e.label,icon:e.icon,disabled:e.disabled||s})),onChange:e=>{s||o(e)}})});case"object":/* @__PURE__ */
|
|
17
|
+
return D(K,{...n,field:l});case"array":/* @__PURE__ */
|
|
18
|
+
return D(V,{...n,field:l});case"slot":return null}}var X=e=>l.includes(e);function G(e){let n=l[0];const t=[],a=/* @__PURE__ */new Set;for(const[l,r]of Object.entries(e))r&&(X(r.bucket)&&(n=r.bucket),r.marker||!1===r.visible||(t.push({name:l,field:r,bucket:n}),"slot"!==r.type&&a.add(n)));return{rows:t,buckets:l.filter(e=>a.has(e))}}function Q(e){return new Map(G(e).rows.map(e=>[e.name,e.bucket]))}function Z({fields:e,values:n,onChange:t,readOnly:l=!1,context:r,tab:i,onTab:s,tabs:c=!0,tabIcons:d,renderers:u,idPrefix:p,ariaLabel:h,children:b}){const f=m("panel",o),g=j(),v=p??`es-insp${g.replace(/:/g,"")}`,y=G(e),[x,N]=O(void 0),C=i??x,S=C&&y.buckets.includes(C)?C:y.buckets[0],[$,P]=O(null),L=$&&$.panel===v&&y.rows.some(e=>e.name===$.name)?$:null,A=c&&y.buckets.length>1,F=A&&S?k(v,S):`${v}-rows`;/* @__PURE__ */
|
|
19
|
+
return I("div",{className:"es-insp",children:[A?/* @__PURE__ */D("div",{className:"es-insp-tabs",children:/* @__PURE__ */D(a,{ariaLabel:h??f.settings,activeId:S,onSelect:e=>{const n=e;void 0===i&&N(n),s?.(n)},items:y.buckets.map(e=>({id:e,label:f.buckets[e],icon:d?.[e]})),idPrefix:v})}):null,
|
|
20
|
+
/* @__PURE__ */I("div",{className:"es-insp-rows",id:F,role:A?"tabpanel":void 0,"aria-labelledby":A&&S?w(v,S):void 0,children:[y.rows.map(({name:e,field:a,bucket:i})=>/* @__PURE__ */D("div",{className:"es-insp-row","data-field":e,"data-bucket":i,hidden:!(!A||i===S)||void 0,children:/* @__PURE__ */D(W,{field:a,name:e,id:`${v}-${e}`,value:n[e],onChange:n=>t(e,n),readOnly:l,context:r,renderers:u,openItem:L&&L.name===e?L.index:null,onOpenItem:n=>P(null===n?null:{panel:v,name:e,index:n})})},e)),b]})]})}export{M as FieldText,Z as Inspector,W as InspectorField,Y as ListField,Q as bucketsOf,z as copyItem,T as insertAt,J as labelOf,E as moveTo,G as planFields,R as removeAt};
|
|
@@ -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-KFMJ4IM4.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};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{blockTypesIn as e}from"./chunk-5ZBY24K7.js";import{buildPaletteSections as t,pinnedSection as o,paletteWithoutPinned as n,categoryLabel as i}from"./chunk-PA3PNTVV.js";import{sectionTemplatesOf as s}from"./chunk-BVN33R76.js";import{SidePanelHead as r,PanelModeExit as c}from"./chunk-5SOSVTVI.js";import{useEaselSession as l}from"./chunk-O7Q4DDJT.js";import{blockRuns as a}from"./chunk-HQ4VVRIC.js";import{useScreenBlockLook as p,useScreenBlockRules as m}from"./chunk-KFMJ4IM4.js";import{DEFAULT_SCREEN_WORDS as d}from"./chunk-MCHMF32I.js";import{useEasel as f}from"./chunk-FUOZKV7A.js";import{useWords as u}from"./chunk-MFIRYGHW.js";import{AddPanel as k}from"./chunk-7GVPKRW2.js";import{DEFAULT_DRAG_WORDS as h}from"./chunk-O2NLQBFX.js";import{useState as y,useEffect as b,useMemo as j}from"react";import{AddIcon as g}from"efficient-shell/icons/efficient";import{jsx as O,jsxs as $,Fragment as V}from"react/jsx-runtime";var B=e=>`section:${e}`,I=e=>`block:${e}`,v=e=>`template:${e}`;function F({blocks:F,blocksOnly:x,at:A,onAdd:H,itemFor:L,session:M,siteWide:N,onClose:C,onHide:K,readOnly:R}){const S=f(e=>e.config),T=p(),{labelAtLevel:w,categoryLabel:D,firstSection:P,Icon:Q,Thumbnail:W}=T,{blockIsOffered:z}=m(),G=u("screen",d).add,J=u("drag",h).add,Y=l(),[Z,E]=y([]);b(()=>{let t=!1;const o=e=>z(e,Y);return s(Y).list().then(n=>{if(t)return;const i=S.components;E(n.filter(t=>t.node?.type&&i[t.node.type]&&e(t.node).every(o)))}).catch(()=>{}),()=>{t=!0}},[S,Y]);const U=j(()=>t(S,T),[S]),X=e=>({type:B(e.type),label:e.name,cover:/* @__PURE__ */O(W,{type:e.type}),title:e.desc?`${e.name} — ${e.desc}`:G.tile({name:e.name}),keywords:[e.alias??"",e.desc,e.type,e.catLabel].filter(Boolean)}),q=j(()=>{const e=[];if(F&&F.choices.length>0&&a(F.choices).forEach((t,o)=>{e.push({key:`blocks:${o}`,title:0===o?`${G.inside({name:F.parentName})}${t.group?` · ${t.group}`:""}`:t.group??"",tiles:t.items.map(e=>({type:I(e.type),label:e.label,icon:/* @__PURE__ */O(Q,{type:e.type,size:18}),title:G.tile({name:e.label})}))})}),x)return e;const t=o(U,P);t&&e.push({key:"start",title:G.startBlank,tiles:[X(t)]}),Z.length>0&&e.push({key:"templates",title:G.templates,tiles:Z.map(e=>{return{type:v(e.id),label:e.name,cover:/* @__PURE__ */O(W,{type:e.node.type}),keywords:[(t=e.node.type,w(t,"section",S.components[t]?.label??t)),e.node.type]};var t})});const s=n(U,P);for(const t of Object.keys(S.categories??{})){const o=s.filter(e=>e.cat===t);0!==o.length&&e.push({key:`category:${t}`,title:i(S,t,D),tiles:o.map(X)})}return e},[F,x,Z,U,S,G]),_=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=Z.find(e=>e.id===n);return e?{kind:"template",template:e}:null}return null};/* @__PURE__ */
|
|
2
|
+
return $(V,{children:[
|
|
3
|
+
/* @__PURE__ */O(r,{icon:/* @__PURE__ */O(g,{size:15}),title:G.title,context:x?G.contextBlocks:G.contextAll,actions:/* @__PURE__ */O(c,{label:G.done,description:G.doneDescription,onClick:C}),onHide:K}),
|
|
4
|
+
/* @__PURE__ */$("div",{className:"sf-addside sf-scroll",children:[
|
|
5
|
+
/* @__PURE__ */O(k,{groups:q,session:M,itemFor:e=>L(_(e)??{kind:"section",type:e}),onInsert:e=>{const t=_(e);t&&H(t)},at:A,hint:x?G.hintBlocks:G.hint,searchLabel:x?G.searchBlocks:G.searchSections,readOnly:R,words:J}),N&&!x?N:null]})]})}export{F as AddSidePanel,I as blockKey,B as sectionKey,v as templateKey};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useScreenBlockRules as e}from"./chunk-
|
|
1
|
+
import{useScreenBlockRules as e}from"./chunk-KFMJ4IM4.js";import{newNodeId as t,ROOT_ZONE as n}from"./chunk-PLVEGYK6.js";import{useEasel as o,useEaselApi as r}from"./chunk-FUOZKV7A.js";import{useMemo as s}from"react";function i(i={}){const{dispatch:p}=o(e=>e),d=r(),c=!0===i.readOnly,a=e().resolveOnInsert,l=!0===(i.resolveOnInsert??a),m=!0===i.foldIntoHistory;return s(()=>{const e=m?e=>p({...e,recordHistory:!1}):p,o=(n,o,r)=>{const s=t(o);return c||e({type:"insert",componentType:o,destinationZone:n,destinationIndex:r,id:s}),s},r=e=>(l&&!c&&d.resolveNode(e,{trigger:"insert"}),e),s=(t,n,o)=>{c||e({type:"replace",destinationZone:t,destinationIndex:n,data:o})},i=(e,t,n)=>r(o(e,t,n));return{insertComponent:i,insertSection:(e,t)=>i(n,e,t),replaceComponent:s,seedChild:(e,t,n,i)=>{const p=o(e,n,t);s(e,t,{type:n,props:{id:p,...i}}),r(p)},insertNode:(e,t,n)=>{const i=o(e,n.type,t);return s(e,t,{type:n.type,props:{...n.props,id:i}}),r(i)},removeComponent:(t,n)=>{c||e({type:"remove",index:n,zone:t})},reorderComponent:(t,n,o)=>{c||e({type:"reorder",sourceIndex:n,destinationIndex:o,destinationZone:t})},duplicateComponent:(t,n)=>{c||e({type:"duplicate",sourceIndex:n,sourceZone:t})},select:e=>p({type:"setUi",ui:{itemSelector:e}}),setDocument:t=>{c||e({type:"setData",data:t})},commitDocument:(t,n)=>{c||(m?d.batch(()=>{e({type:"setData",data:t}),void 0!==n&&("slot"===n?.kind?d.selectSlot({parentId:n.parentId,slot:n.slot}):d.select(n?n.id:null))}):d.run({data:t,select:n}))}}},[p,c,l,d,m])}export{i as useSectionOps};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useScreenOwnerName as e}from"./chunk-
|
|
1
|
+
import{useScreenOwnerName as e}from"./chunk-KFMJ4IM4.js";import{settlePanelPick as n}from"./chunk-R6WTQWAC.js";import{MediaPanelHead as i,mediaPickKind as c}from"./chunk-GTDLBUOC.js";import{jsxs as o,Fragment as r,jsx as t}from"react/jsx-runtime";function l({panel:l,pick:d,onHide:m}){const p=e();/* @__PURE__ */
|
|
2
2
|
return o(r,{children:[
|
|
3
3
|
/* @__PURE__ */t(i,{context:p,pick:d?{kind:c(d.accept),field:d.title||void 0}:null,onCancel:()=>d&&n(d.requestId,null),onHide:m}),
|
|
4
4
|
/* @__PURE__ */t("div",{className:"sf-media-panel",children:/* @__PURE__ */t(l,{pick:d,onPick:e=>d&&n(d.requestId,e)})})]})}export{l as MediaSidePanel};
|
|
@@ -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-FUOZKV7A.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,2 +1,2 @@
|
|
|
1
|
-
import{ScreenPartsProvider as t}from"./chunk-
|
|
1
|
+
import{ScreenPartsProvider as t}from"./chunk-KFMJ4IM4.js";import{useEaselHost as r}from"./chunk-U3JP4VGF.js";import{createEasel as e,EaselProvider as n}from"./chunk-FUOZKV7A.js";import{useState as o,useEffect as s}from"react";import{jsx as i}from"react/jsx-runtime";function a({config:a,data:c,onChange:m,permissions:p,parts:f,children:u}){const[h]=o(()=>e({config:a,data:c,permissions:p}));s(()=>{h.setConfig(a)},[h,a]),s(()=>{if(!m)return;let t=h.getState().appState.data;return h.subscribe(()=>{const r=h.getState().appState.data;r!==t&&(t=r,m(r))})},[h,m]),s(()=>{p&&h.setPermissions(p)},[h,p]);const d=r();/* @__PURE__ */
|
|
2
2
|
return i(n,{easel:h,hotkeys:d.ownsDocument,children:/* @__PURE__ */i(t,{parts:f,children:u})})}export{a as ScreenStoreProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{styleMenuItems as e}from"./chunk-V7U33NF2.js";import{useEaselSession as n}from"./chunk-O7Q4DDJT.js";import{ROOT_ZONE as t}from"./chunk-PLVEGYK6.js";import{useHostEscape as o}from"./chunk-U3JP4VGF.js";import{DEFAULT_SCREEN_WORDS as l}from"./chunk-MCHMF32I.js";import{EaselMenuItems as r,menuLabel as i}from"./chunk-EA2HTX37.js";import{createNodeClipboard as c,nodeMenuItems as s}from"./chunk-OSPUG6S6.js";import{DEFAULT_NODE_MENU_WORDS as a}from"./chunk-WK3AFPXY.js";import{
|
|
1
|
+
import{styleMenuItems as e}from"./chunk-V7U33NF2.js";import{useEaselSession as n}from"./chunk-O7Q4DDJT.js";import{ROOT_ZONE as t}from"./chunk-PLVEGYK6.js";import{useHostEscape as o}from"./chunk-U3JP4VGF.js";import{DEFAULT_SCREEN_WORDS as l}from"./chunk-MCHMF32I.js";import{EaselMenuItems as r,menuLabel as i}from"./chunk-EA2HTX37.js";import{createNodeClipboard as c,nodeMenuItems as s}from"./chunk-OSPUG6S6.js";import{DEFAULT_NODE_MENU_WORDS as a}from"./chunk-WK3AFPXY.js";import{zoneKey as u,ROOT_SLOT as d,ROOT_ID as p}from"./chunk-KRXQM65X.js";import{useCanvasEvent as f}from"./chunk-PAELDYYS.js";import{isTypingTarget as m,framePointToHost as h}from"./chunk-ZNCEOSXO.js";import{useState as y,useCallback as k,useRef as b,useEffect as v}from"react";import{ContextMenu as g}from"efficient-shell/ui";import{UndoIcon as w,RedoIcon as x,AddIcon as C,PasteIcon as z,SettingsIcon as O,LayersIcon as P,CopyIcon as A}from"efficient-shell/icons/efficient";import{jsx as S}from"react/jsx-runtime";function j(e,n){const o=[],l=/* @__PURE__ */new Set;let r={zone:n.zone,index:n.index};for(;r;){const n=e.nodeAt(r.zone,r.index);if(!n||l.has(n.props.id))break;if(l.add(n.props.id),o.push({zone:r.zone,index:r.index,node:n,parentType:null}),r.zone===t)break;const i=r.zone.lastIndexOf(":");if(i<=0)break;r=e.locate(r.zone.slice(0,i))}for(let e=0;e<o.length-1;e+=1)o[e].parentType=o[e+1].node.type;return o}var D=c(),K=/* @__PURE__ */new WeakMap;function M(e){if(e.claimsPage)return D;const n=e.registry;if(!n)return e.cache("easel:node-clipboard",c);let t=K.get(n);return t||(t=c(),K.set(n,t)),t}function T(){return M(n())}function X(e,n,o){if(n===t){const{floor:n,cap:t}=e.sectionBand();return{parentId:p,slot:d,index:Math.min(Math.max(o,n),t)}}const l=n.lastIndexOf(":");return{parentId:n.slice(0,l),slot:n.slice(l+1),index:o}}function E(e,n,t){const o=e.isPinned(n,t),l=!o&&!e.isLocked(n)&&!e.duplicateBlocked(n),r=e.permits?.(n)??{duplicate:!0,delete:!0};return{copy:!o&&r.duplicate,cut:l&&r.duplicate&&r.delete}}function I(e,n,t){const o=e.canPasteAt;if(!o)return u(n.from)===t.zone?X(e,t.zone,t.index+1):null;for(const l of j(e,t)){const t=X(e,l.zone,l.index+1);if(o(n,t))return t}return null}function L(e){if(e.defaultPrevented||e.altKey||e.shiftKey||!e.metaKey&&!e.ctrlKey)return null;if(m(e.target))return null;const n=e.target,t=n&&"ownerDocument"in n?n.ownerDocument??n:null,o=t?.getSelection?.();if(o&&!o.isCollapsed&&o.toString().trim())return null;const l=e.code||(1===e.key.length?`Key${e.key.toUpperCase()}`:"");return"KeyC"===l?"copy":"KeyX"===l?"cut":"KeyV"===l?"paste":null}function Y(e,n,t,o){const l=e.nodeAt(t.zone,t.index);if(!l)return null;const r=l.props.id,i=e.labelOf(l.type,t.zone),c=E(e,l,t.zone);if("copy"===n)return c.copy?(e.nodeOps.copy(r,i),{done:"copied",name:i}):null;if(o.readOnly)return null;if("cut"===n)return c.cut?(e.nodeOps.cut(r,i),{done:"cut",name:i}):null;const s=o.held;if(!s)return null;const a=e.isPinned(l,t.zone)?null:I(e,s,t);return a?(e.nodeOps.paste(a),{done:"pasted",name:s.label}):(e.onPasteRefused(s),{done:"refused",name:s.label})}function R(n,o){const{zone:l,index:r}=o,i=n.nodeAt(l,r);if(!i)return[];const c=i.props.id,a=n.labelOf(i.type,l),u=Boolean(i.props._hidden),d=n.nodeOps,p=n.isPinned(i,l),f=n.isLocked(i),m=!p&&!f&&!n.duplicateBlocked(i),h=n.permits?.(i)??{duplicate:!0,delete:!0},y=E(n,i,l),k=j(n,o),b=d.held,v=b&&!p?I(n,b,o):null,g=!n.readOnly,w=n.style?e({held:g?n.style.held():null,canCopy:n.style.canCopy(i,l),onCopy:()=>n.style?.copy(i,l),onPaste:()=>n.style?.paste(l,r,i),words:n.words?.styleClipboard}):[];return s({title:a,words:n.words?.menu,layer:{group:"pick",items:k.flatMap((e,o)=>{const l={label:n.rowNameOf(e.node,e.zone),checked:0===o,onClick:()=>n.selectAt(e.zone,e.index,e.node.props.id,e.parentType)},r=e.zone===t?null:n.slotRung?.(e.zone)??null;return r?[l,{label:r.label,checked:!1,onClick:r.select}]:[l]})},actions:{addInside:g&&n.canAddTo(i.type)?()=>n.openAddInside(l,r):void 0,duplicate:g&&m&&h.duplicate?()=>d.duplicate(c):void 0,moveUp:g&&d.canStep(c,-1)?()=>d.step(c,-1):void 0,moveDown:g&&d.canStep(c,1)?()=>d.step(c,1):void 0,copy:y.copy?()=>d.copy(c,a):void 0,cut:g&&y.cut?()=>d.cut(c,a):void 0,paste:g&&b&&v?{label:b.label,run:()=>d.paste(v)}:void 0,rename:g&&n.renamePropOf(i,l)?()=>n.beginRename(l,r):void 0,hide:!g||f||p?void 0:{hidden:u,run:()=>d.setProps(c,{_hidden:!u})},delete:g&&m&&h.delete?()=>d.remove(c):void 0},style:w,extras:n.menuRows?.(i,l,r)??void 0,pinnedLine:p?N(n).pinned:void 0})}var N=e=>e.words?.screen??l.menu;function U(e){const n=N(e),o=!e.readOnly,r=[];o&&e.history.hasPast&&r.push({label:n.undo,icon:/* @__PURE__ */S(w,{}),shortcut:"⌘Z",onClick:e.history.back}),o&&e.history.hasFuture&&r.push({label:n.redo,icon:/* @__PURE__ */S(x,{}),shortcut:"⇧⌘Z",onClick:e.history.forward});const i=o?[{label:n.addSection,icon:/* @__PURE__ */S(C,{}),onClick:e.openAddSection}]:[],c=e.nodeOps.held,s=X(e,t,e.sectionBand().cap);if(o&&c&&(e.canPasteAt?e.canPasteAt(c,s):u(c.from)===t)){const n=s,t=e.words?.menu??a;i.push({label:t.pasteNamed({paste:t.paste,label:c.label}),icon:/* @__PURE__ */S(z,{}),shortcut:"⌘V",onClick:()=>e.nodeOps.paste(n)})}const d=[r,i,[{label:e.pageSettingsLabel??l.pageSettings,icon:/* @__PURE__ */S(O,{}),onClick:e.openPageSettings},{label:n.collapseAll,icon:/* @__PURE__ */S(P,{}),onClick:e.collapseAll}]].filter(e=>e.length>0),p={label:"—",onClick:()=>{}};return d.flatMap((e,n)=>n?[p,...e]:e)}function V(e,n){const t=n.selectionStart??0,o=n.selectionEnd??0,l=n.value.slice(t,o),r=e=>{n.focus(),n.setRangeText(e,t,o,"end"),n.dispatchEvent(new Event("input",{bubbles:!0}))},i=e.words?.menu??a,c=N(e),s=[];l&&(s.push({label:i.copy,icon:/* @__PURE__ */S(A,{}),shortcut:"⌘C",onClick:()=>navigator.clipboard?.writeText(l)}),s.push({label:i.cut,icon:/* @__PURE__ */S(A,{}),shortcut:"⌘X",onClick:()=>{navigator.clipboard?.writeText(l),r("")}})),s.push({label:i.paste,icon:/* @__PURE__ */S(z,{}),shortcut:"⌘V",onClick:()=>{navigator.clipboard?.readText().then(e=>{e&&r(e)}).catch(()=>e.onPasteRefused())}});const u=[s,n.value?[{label:c.selectAll,shortcut:"⌘A",onClick:()=>{n.focus(),n.select()}}]:[]].filter(e=>e.length>0),d={label:"—",onClick:()=>{}};return u.flatMap((e,n)=>n?[d,...e]:e)}function B(e){return e.shiftKey}function F(e,n){const[t,l]=y(null),r=k(()=>l(null),[]);o(null!==t,r);const i=b(e);i.current=e;const c=k(e=>{const n=i.current,t=n.keys;if(!t)return;const o=L(e);if(!o)return;const l=t.selected();if(!l)return;const r=Y(n,o,l,{readOnly:t.readOnly,held:t.held()});r&&(e.preventDefault(),t.onDone?.(r))},[]),s=e.keys?.target??null;v(()=>{if(!s)return;const e=e=>c(e);return s.addEventListener("keydown",e),()=>s.removeEventListener("keydown",e)},[s,c]),f(n,"keydown",c);const a=k(n=>{if(B(n))return;const t=n.target;if(t?.closest?.("[data-slot-zone]"))return n.preventDefault(),void l(null);const o=function(e){const n=e?.closest?.("input, textarea");return n&&("INPUT"!==n.tagName||["text","search","url","email","tel","number",""].includes(n.type))?n:null}(t);if(o)return n.preventDefault(),void l({kind:"input",x:n.clientX,y:n.clientY,el:o,owner:t});const r=t?.closest?.("[data-node-id]")?.getAttribute("data-node-id"),i=r?e.locate(r):null;n.preventDefault(),l(i?{kind:"node",x:n.clientX,y:n.clientY,...i,owner:t}:{kind:"empty",x:n.clientX,y:n.clientY,owner:t})},[e]);f(n,"contextmenu",t=>{if(B(t)||!n)return;const o=t.target?.closest?.("[data-puck-component]")??null,r=o?.getAttribute("data-puck-component"),i=r?e.locate(r):null;t.preventDefault();const c=h(n.frame,t.clientX,t.clientY),s=n.frame;l(i?{kind:"node",...c,...i,owner:s}:{kind:"empty",...c,owner:s})}),f(n,"mousedown",r),f(n,"scroll",r,{on:"window"});return{onEditorContextMenu:a,menu:t?/* @__PURE__ */S(G,{host:e,target:t,onClose:r}):null,closeMenu:r}}function G({host:e,target:n,onClose:t}){const o="node"===n.kind?R(e,n):"input"===n.kind?V(e,n.el):U(e);return 0===o.length?null:/* @__PURE__ */S(g,{at:{x:n.x,y:n.y},owner:n.owner??null,onClose:t,"aria-label":i(o),children:/* @__PURE__ */S(r,{items:o,onClose:t})})}export{D as EASEL_NODE_CLIPBOARD,j as ancestorChain,M as nodeClipboardOf,E as nodeClipboardRules,R as nodeMenuItems,L as nodeShortcut,U as pageMenuItems,I as pastePlace,Y as runNodeShortcut,V as textMenuItems,T as useNodeClipboard,F as useNodeContextMenu};
|
package/dist/drag/drag.css
CHANGED
|
@@ -215,62 +215,11 @@
|
|
|
215
215
|
font-size: 12.5px;
|
|
216
216
|
color: var(--es-muted);
|
|
217
217
|
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
margin-bottom:
|
|
223
|
-
padding: 0 12px;
|
|
224
|
-
height: 38px;
|
|
225
|
-
background: var(--es-track-bg);
|
|
226
|
-
border: 1px solid var(--es-input-border);
|
|
227
|
-
border-radius: var(--radius-lg);
|
|
228
|
-
color: var(--es-muted);
|
|
229
|
-
transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
|
|
230
|
-
}
|
|
231
|
-
.es-add-search:focus-within {
|
|
232
|
-
border-color: var(--es-accent);
|
|
233
|
-
background: var(--es-panel);
|
|
234
|
-
box-shadow: 0 0 0 3px var(--es-accent-ring);
|
|
235
|
-
}
|
|
236
|
-
.es-add-search > svg {
|
|
237
|
-
flex: none;
|
|
238
|
-
}
|
|
239
|
-
.es-add-search input {
|
|
240
|
-
flex: 1;
|
|
241
|
-
min-width: 0;
|
|
242
|
-
border: none;
|
|
243
|
-
background: transparent;
|
|
244
|
-
outline: none;
|
|
245
|
-
box-shadow: none;
|
|
246
|
-
padding: 0;
|
|
247
|
-
font: inherit;
|
|
248
|
-
font-size: 13.5px;
|
|
249
|
-
color: var(--es-text);
|
|
250
|
-
}
|
|
251
|
-
.es-add-search input::placeholder {
|
|
252
|
-
color: var(--es-field-placeholder);
|
|
253
|
-
opacity: 1;
|
|
254
|
-
}
|
|
255
|
-
.es-add-search input::-webkit-search-cancel-button {
|
|
256
|
-
display: none;
|
|
257
|
-
}
|
|
258
|
-
.es-add-search-clear {
|
|
259
|
-
flex: none;
|
|
260
|
-
display: flex;
|
|
261
|
-
align-items: center;
|
|
262
|
-
justify-content: center;
|
|
263
|
-
width: 20px;
|
|
264
|
-
height: 20px;
|
|
265
|
-
border: none;
|
|
266
|
-
border-radius: var(--radius-md);
|
|
267
|
-
background: transparent;
|
|
268
|
-
color: var(--es-muted);
|
|
269
|
-
cursor: pointer;
|
|
270
|
-
}
|
|
271
|
-
.es-add-search-clear:hover {
|
|
272
|
-
background: var(--es-divider);
|
|
273
|
-
color: var(--es-text);
|
|
218
|
+
/* The search is the shell's `Input` (leftIcon, rightAdornment): one field.
|
|
219
|
+
`.es-add-search*` WAS HERE — a frame round a bare input, which the dark
|
|
220
|
+
theme painted a darker strip inside. Only the room under it is the panel's. */
|
|
221
|
+
.es-add-find {
|
|
222
|
+
margin-bottom: var(--es-space-16);
|
|
274
223
|
}
|
|
275
224
|
.es-add-group + .es-add-group {
|
|
276
225
|
margin-top: 16px;
|
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-7GVPKRW2.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-P2VEMZH5.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";import"../chunk-PAELDYYS.js";import"../chunk-ZNCEOSXO.js";
|
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-FUOZKV7A.js";import"../chunk-AELNNAFM.js";import"../chunk-YRLPFZW3.js";import"../chunk-UK2FQOUT.js";import"../chunk-MFIRYGHW.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";import"../chunk-ZNCEOSXO.js";
|
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-NJOPEWYN.js";export{FieldSelect,FieldSlider,optionFor}from"../chunk-OZ72A6MY.js";import"../chunk-4JSBIW5H.js";import"../chunk-YNOZ5NXW.js";import"../chunk-K56YDHYQ.js";import"../chunk-QTLAVDJE.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";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{AddBlockRow as default}from"../../chunk-
|
|
1
|
+
export{AddBlockRow as default}from"../../chunk-QBJJVMVB.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-KFMJ4IM4.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-MCHMF32I.js";import"../../chunk-FUOZKV7A.js";import"../../chunk-AELNNAFM.js";import"../../chunk-NJOPEWYN.js";import"../../chunk-OZ72A6MY.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-YNOZ5NXW.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.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-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-ZNCEOSXO.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{blockKey,AddSidePanel as default,sectionKey,templateKey}from"../../chunk-
|
|
1
|
+
export{blockKey,AddSidePanel as default,sectionKey,templateKey}from"../../chunk-QEWRHH6R.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-BVN33R76.js";import"../../chunk-5SOSVTVI.js";import"../../chunk-KQMML6JM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-KFMJ4IM4.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-MCHMF32I.js";import"../../chunk-FUOZKV7A.js";import"../../chunk-AELNNAFM.js";import"../../chunk-NJOPEWYN.js";import"../../chunk-OZ72A6MY.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-YNOZ5NXW.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-UK2FQOUT.js";import"../../chunk-GTDLBUOC.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-7GVPKRW2.js";import"../../chunk-O2NLQBFX.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-PAELDYYS.js";import"../../chunk-ZNCEOSXO.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{MediaSidePanel as default}from"../../chunk-
|
|
1
|
+
export{MediaSidePanel as default}from"../../chunk-TJOUAFJE.js";import"../../chunk-KFMJ4IM4.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-FUOZKV7A.js";import"../../chunk-AELNNAFM.js";import"../../chunk-NJOPEWYN.js";import"../../chunk-OZ72A6MY.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-YNOZ5NXW.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-UK2FQOUT.js";import"../../chunk-GTDLBUOC.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-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-ZNCEOSXO.js";
|
|
@@ -25,7 +25,7 @@ import '../../panelWidths-D9hTLR25.js';
|
|
|
25
25
|
import '../../CanvasDragLayer-DVJGgA-g.js';
|
|
26
26
|
import '../../session-DSQFmIvx.js';
|
|
27
27
|
import '../../words-BDignMl_.js';
|
|
28
|
-
import '../../types-
|
|
28
|
+
import '../../types-BLRK6_JO.js';
|
|
29
29
|
import '../../words-Cl9xMUYY.js';
|
|
30
30
|
import './AddSidePanel.js';
|
|
31
31
|
import '../lib/section-template-types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{EASEL_NODE_CLIPBOARD,ancestorChain,nodeClipboardOf,nodeClipboardRules,nodeMenuItems,nodeShortcut,pageMenuItems,pastePlace,runNodeShortcut,textMenuItems,useNodeClipboard,useNodeContextMenu}from"../../chunk-
|
|
1
|
+
export{EASEL_NODE_CLIPBOARD,ancestorChain,nodeClipboardOf,nodeClipboardRules,nodeMenuItems,nodeShortcut,pageMenuItems,pastePlace,runNodeShortcut,textMenuItems,useNodeClipboard,useNodeContextMenu}from"../../chunk-ZHTQCAQ2.js";import"../../chunk-V7U33NF2.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-MCHMF32I.js";import"../../chunk-BXMXTO36.js";import"../../chunk-EA2HTX37.js";import"../../chunk-OSPUG6S6.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-UK2FQOUT.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-PAELDYYS.js";import"../../chunk-ZNCEOSXO.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ScreenChrome as default}from"../../chunk-
|
|
1
|
+
export{ScreenChrome as default}from"../../chunk-LJOYIXO4.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-7P6IFCR4.js";import"../../chunk-FGNR22NY.js";import"../../chunk-ZE7I3PLX.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-PAM3NLFL.js";import"../../chunk-7F52SZOI.js";import"../../chunk-R2HLPNQF.js";import"../../chunk-TBF5CVPA.js";import"../../chunk-4ES5JGGX.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-X2GNFJRC.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-42TMLDSQ.js";import"../../chunk-4YBMSUPL.js";import"../../chunk-SNMCF2ZD.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-ZHTQCAQ2.js";import"../../chunk-2I7MAA2U.js";import"../../chunk-BSPCSC45.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-WZMU646D.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-ERR437B5.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-V7U33NF2.js";import"../../chunk-5545A3PC.js";import"../../chunk-QEWRHH6R.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-BVN33R76.js";import"../../chunk-5SOSVTVI.js";import"../../chunk-KQMML6JM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-TJOUAFJE.js";import"../../chunk-KFMJ4IM4.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-MCHMF32I.js";import"../../chunk-FUOZKV7A.js";import"../../chunk-AELNNAFM.js";import"../../chunk-NJOPEWYN.js";import"../../chunk-OZ72A6MY.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-YNOZ5NXW.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-BXMXTO36.js";import"../../chunk-EA2HTX37.js";import"../../chunk-OSPUG6S6.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-UK2FQOUT.js";import"../../chunk-4VJATVVR.js";import"../../chunk-BDTITTMW.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-GTDLBUOC.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-7GVPKRW2.js";import"../../chunk-O2NLQBFX.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-PAELDYYS.js";import"../../chunk-ZNCEOSXO.js";
|
|
@@ -32,7 +32,7 @@ import '../../words-BDignMl_.js';
|
|
|
32
32
|
import '../../types-BsyPh6EW.js';
|
|
33
33
|
import '../../style-clipboard/index.js';
|
|
34
34
|
import '../../words-CnnHb9jo.js';
|
|
35
|
-
import '../../types-
|
|
35
|
+
import '../../types-BLRK6_JO.js';
|
|
36
36
|
import '../../words-Cl9xMUYY.js';
|
|
37
37
|
import './AddSidePanel.js';
|
|
38
38
|
import '../lib/puck/block-choice.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{DocumentScreen,ScreenMount as default}from"../../chunk-
|
|
1
|
+
export{DocumentScreen,ScreenMount as default}from"../../chunk-D4BUPPPV.js";import"../../chunk-GXQCZJOP.js";import"../../chunk-XJPNW26S.js";import"../../chunk-LJOYIXO4.js";import"../../chunk-26OOWIJJ.js";import"../../chunk-7P6IFCR4.js";import"../../chunk-FGNR22NY.js";import"../../chunk-ZE7I3PLX.js";import"../../chunk-2GVCAIPX.js";import"../../chunk-PAM3NLFL.js";import"../../chunk-7F52SZOI.js";import"../../chunk-R2HLPNQF.js";import"../../chunk-TBF5CVPA.js";import"../../chunk-4ES5JGGX.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-X2GNFJRC.js";import"../../chunk-KCBEE2MC.js";import"../../chunk-42TMLDSQ.js";import"../../chunk-4YBMSUPL.js";import"../../chunk-SNMCF2ZD.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-ZHTQCAQ2.js";import"../../chunk-2I7MAA2U.js";import"../../chunk-BSPCSC45.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-WZMU646D.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-ERR437B5.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-V7U33NF2.js";import"../../chunk-5545A3PC.js";import"../../chunk-QEWRHH6R.js";import"../../chunk-5ZBY24K7.js";import"../../chunk-PA3PNTVV.js";import"../../chunk-BVN33R76.js";import"../../chunk-5SOSVTVI.js";import"../../chunk-KQMML6JM.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import"../../chunk-TJOUAFJE.js";import"../../chunk-KFMJ4IM4.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-6WY6ZXJG.js";import"../../chunk-MCHMF32I.js";import"../../chunk-FUOZKV7A.js";import"../../chunk-AELNNAFM.js";import"../../chunk-NJOPEWYN.js";import"../../chunk-OZ72A6MY.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-YNOZ5NXW.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-BXMXTO36.js";import"../../chunk-EA2HTX37.js";import"../../chunk-OSPUG6S6.js";import"../../chunk-WK3AFPXY.js";import"../../chunk-UK2FQOUT.js";import"../../chunk-4VJATVVR.js";import"../../chunk-BDTITTMW.js";import"../../chunk-H6DDIBQ4.js";import"../../chunk-GTDLBUOC.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-7GVPKRW2.js";import"../../chunk-O2NLQBFX.js";import"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-PAELDYYS.js";import"../../chunk-ZNCEOSXO.js";
|
|
@@ -19,7 +19,7 @@ import '../../words-BDignMl_.js';
|
|
|
19
19
|
import '../../types-BsyPh6EW.js';
|
|
20
20
|
import '../../style-clipboard/index.js';
|
|
21
21
|
import '../../words-CnnHb9jo.js';
|
|
22
|
-
import '../../types-
|
|
22
|
+
import '../../types-BLRK6_JO.js';
|
|
23
23
|
import '../../words-Cl9xMUYY.js';
|
|
24
24
|
import './AddSidePanel.js';
|
|
25
25
|
import '../lib/section-template-types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ScreenStoreProvider as default}from"../../chunk-
|
|
1
|
+
export{ScreenStoreProvider as default}from"../../chunk-XJPNW26S.js";import"../../chunk-KFMJ4IM4.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-FUOZKV7A.js";import"../../chunk-AELNNAFM.js";import"../../chunk-NJOPEWYN.js";import"../../chunk-OZ72A6MY.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-YNOZ5NXW.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.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-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-ZNCEOSXO.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import{AddBlockRow as e}from"../../chunk-
|
|
2
|
-
return
|
|
3
|
-
return
|
|
4
|
-
/* @__PURE__ */U(
|
|
5
|
-
return
|
|
6
|
-
/* @__PURE__ */U("div",{className:"sf-section-bar",children:/* @__PURE__ */U(
|
|
7
|
-
/* @__PURE__ */
|
|
8
|
-
/* @__PURE__ */U("div",{className:"sf-panel-head",children:/* @__PURE__ */U(I,{content:
|
|
9
|
-
/* @__PURE__ */U(
|
|
10
|
-
/* @__PURE__ */U(
|
|
11
|
-
return
|
|
12
|
-
/* @__PURE__ */U(
|
|
13
|
-
/* @__PURE__ */
|
|
14
|
-
/* @__PURE__ */U("span",{className:"sf-plus sf-plus--sm",children:"+"}),
|
|
1
|
+
import{AddBlockRow as e}from"../../chunk-QBJJVMVB.js";import{slotChildRowName as n}from"../../chunk-TBF5CVPA.js";import{scrollPreviewToSection as o,gotoPreviewSlide as r}from"../../chunk-4ES5JGGX.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import{useEaselUndoKeys as t}from"../../chunk-X2GNFJRC.js";import{SlotChildActionsProvider as s}from"../../chunk-KCBEE2MC.js";import{DEFAULT_PANEL_W as i}from"../../chunk-42TMLDSQ.js";import{usePartBridge as c}from"../../chunk-4YBMSUPL.js";import{useSectionOps as p}from"../../chunk-SNMCF2ZD.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import{useScreenDocument as l}from"../../chunk-WZMU646D.js";import"../../chunk-S4AWJX4Q.js";import"../../chunk-ERR437B5.js";import"../../chunk-KG7RJWOK.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-VPFNZ7TB.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import{MediaSidePanel as m}from"../../chunk-TJOUAFJE.js";import{SELECTION_MODE as d,useScreenPinned as a,useScreenCanvasFrame as u,useScreenInspectorPanel as h,useScreenPickFollowsSelection as k,sameInspectorMode as f,useStandaloneScreenBridges as j,useScreenBlockLook as N,useScreenBlockRules as S}from"../../chunk-KFMJ4IM4.js";import{nestsInTree as y,slotFieldsOf as A}from"../../chunk-PLVEGYK6.js";import{useMediaPanel as C,usePanelPick as x,useCancelPanelPick as M}from"../../chunk-R6WTQWAC.js";import{useHostEscape as O}from"../../chunk-U3JP4VGF.js";import{DEFAULT_SCREEN_WORDS as P}from"../../chunk-MCHMF32I.js";import{useEasel as v}from"../../chunk-FUOZKV7A.js";import"../../chunk-AELNNAFM.js";import"../../chunk-NJOPEWYN.js";import"../../chunk-OZ72A6MY.js";import{LayersTree as B,Subtree as F,TreeRow as L,TreeRowAction as E,TreeSeam as R}from"../../chunk-4JSBIW5H.js";import"../../chunk-YNOZ5NXW.js";import{DEFAULT_TREE_WORDS as T}from"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-EA2HTX37.js";import"../../chunk-UK2FQOUT.js";import"../../chunk-BDTITTMW.js";import{DEFAULT_SAVE_WORDS as g,saveIndicator as w}from"../../chunk-H6DDIBQ4.js";import{SaveState as z,panelWidthVars as b}from"../../chunk-GTDLBUOC.js";import"../../chunk-Y2G7CU6A.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-66LWADFP.js";import"../../chunk-QLD57GBB.js";import"../../chunk-FFYXVAAL.js";import{useWords as D}from"../../chunk-MFIRYGHW.js";import"../../chunk-7GVPKRW2.js";import"../../chunk-O2NLQBFX.js";import{useTreeDrag as J}from"../../chunk-67GNT6PF.js";import"../../chunk-P2VEMZH5.js";import{zoneKey as W,parseZoneKey as Y}from"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-PAELDYYS.js";import"../../chunk-ZNCEOSXO.js";import{useState as V,useRef as G,useEffect as K,useCallback as Z,Fragment as H}from"react";import{Tooltip as I}from"efficient-shell/ui";import{TrashIcon as Q}from"efficient-shell/icons/efficient";import{jsxs as X,jsx as U,Fragment as $}from"react/jsx-runtime";var q=e=>n=>{n.target.closest("button, input")||e()},_={rowClick:q};function ee(){const{saveState:ee,readOnly:ne,readOnlyReason:oe=null}=l(),re=p(),{appState:te,selectedItem:se,config:ie}=v(e=>e),[ce,pe]=V(d),le=D("screen",P),me=D("tree",T),de=D("save",g),{first:ae,last:ue,panelOf:he}=a(),ke=he(ae),fe=u(),je=h(),Ne=te.data.content?.[0]??null,Se=Ne?.props.id??null,ye=Ne?.type===ae,Ae=Ne?.type===ue,Ce=G(null),xe=G(null);t(xe);const Me=C(),Oe=x(),Pe=M();k(se?.props.id),K(()=>{const e=xe.current;if(!Oe||!e)return;const n=e=>{"Escape"===e.key&&Pe()};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[Oe]),O(null!==Oe,()=>Pe()),K(()=>{Se&&Ce.current!==Se&&(Ce.current=Se,ye?pe(ke??d):se||re.select({index:0}))},[Se,se,re,ye]);const ve=Z(e=>pe(n=>f(n,e)?n:e),[]),Be=j({kind:ce.kind,mode:ce,open:ve,show:e=>pe(e),reveal:()=>{},select:(e,n)=>{pe(e=>f(e,n)?e:n),re.select(e)}}),{selectNode:Fe}=c({mode:ce,setMode:pe,onOpenPart:o}),Le=N(),{labelAtLevel:Ee,Icon:Re}=Le,{canAddTo:Te}=S(),ge=e=>Ee(e,"block",ie.components[e]?.label??e),we=e=>Ee(e,"section",ge(e)),ze=!ye&&"puck"===ce.kind&&se?.props.id===Se,be=Ne?Te(Ne.type)?.spec??null:null,De=Ne&&be?`${Ne.props.id}:${be.slot}`:null,Je=Ne&&be&&Array.isArray(Ne.props[be.slot])?Ne.props[be.slot]:[],We=e=>n(e,ge,Le.plainText),Ye=(e,n)=>{Ne&&be&&De&&(pe(d),be.slider?(r(String(Ne.props.id),e),re.select({index:e,zone:De}),o(String(Ne.props.id))):(re.select({index:e,zone:De}),o(n)))},Ve=()=>{if(!Ne||!be||!De)return;const e=Je.length;re.insertComponent(De,be.childType,e),pe(d),be.slider?requestAnimationFrame(()=>{r(String(Ne.props.id),e),re.select({index:e,zone:De})}):re.select({index:e,zone:De})},Ge=e=>A(ie,e),Ke=e=>{const{parentId:n,slot:o}=Y(e),r=e=>{if(!e)return null;if(String(e.props.id)===n)return e;for(const n of Ge(e.type)){const o=Array.isArray(e.props[n])?e.props[n]:[];for(const e of o){const n=r(e);if(n)return n}}return null},t=r(Ne)?.props[o];return Array.isArray(t)?t.length:0},Ze=(e,n,o)=>{const r=Math.min(Math.max(o,0),Ke(e)),t=n<r?r-1:r;t!==n&&(re.reorderComponent(e,n,t),pe(d),re.select({index:t,zone:e}))},He=J({keyOf:e=>e.id,readOnly:Boolean(ne),canDrop:(e,n)=>W(n)===e.zone&&n.index>=0&&n.index<=Ke(e.zone),onDrop:(e,n)=>Ze(e.zone,e.index,n.index),onStep:(e,n)=>Ze(e.zone,e.index,n<0?e.index-1:e.index+2)}),Ie=(e,n)=>/* @__PURE__ */U(R,{...ne?{}:He.seam({place:{...Y(e),index:n}})},`seam:${e}:${n}`),Qe=e=>Le.blockRowName(e,ge),Xe=(e,n,r)=>{pe(d),re.select({index:n,zone:e}),o(r)},Ue=(e,n,o)=>{re.insertComponent(e,n,o),pe(d),re.select({index:o,zone:e})},$e=(n,o,r)=>/* @__PURE__ */U(e,{choices:r,onPick:e=>Ue(n,e,o)}),qe=(e,n)=>{const o=Ge((r=e).type).flatMap(e=>(Array.isArray(r.props[e])?r.props[e]:[]).map((n,o)=>({child:n,zone:`${r.props.id}:${e}`,index:o})));var r;const t=Te(e.type),s=t?.choices??null,i="footer"===t?.source?Qe:We;/* @__PURE__ */
|
|
2
|
+
return X($,{children:[o.map(({child:e,zone:o,index:r})=>{const t=se?.props.id===e.props.id,s=y(ie,e.type,n),c=i(e),p=String(e.props.id),l=()=>Xe(o,r,p),{rowProps:m,...a}=He.row({item:{id:p,zone:o,index:r},place:{...Y(o),index:r}},{onClick:q(l)});/* @__PURE__ */
|
|
3
|
+
return X(H,{children:[0===r&&Ie(o,0),
|
|
4
|
+
/* @__PURE__ */U(L,{words:me,icon:/* @__PURE__ */U(Re,{type:e.type,size:13}),name:c,selected:t,onSelect:l,...a,actions:/* @__PURE__ */U(E,{kind:"delete",label:le.deleteNamed({name:c}),onClick:()=>{return e=o,n=r,re.removeComponent(e,n),pe(d),void re.select(null);var e,n},children:/* @__PURE__ */U(Q,{size:13})}),rowProps:m}),s&&/* @__PURE__ */U(F,{children:qe(e,n+1)}),Ie(o,r+1)]},String(e.props.id??`${o}-${r}`))}),t&&s?$e(`${e.props.id}:${t.slot}`,o.length,s):null]})},_e="HeroSingle"===Ne?.type,en=Boolean(Ne)&&(Boolean(be)||Ae||ye||_e);/* @__PURE__ */
|
|
5
|
+
return X("div",{ref:xe,className:"sf-editor es-editor",style:b(i),children:[
|
|
6
|
+
/* @__PURE__ */U("div",{className:"sf-section-bar",children:/* @__PURE__ */U(z,null!==oe?{tone:"off",label:oe,role:"status"}:{...w(ee,de),role:"status"})}),
|
|
7
|
+
/* @__PURE__ */X("div",{className:"sf-body",children:[Oe&&Me?/* @__PURE__ */U("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:/* @__PURE__ */U(m,{panel:Me,pick:Oe})}):en&&Ne&&/* @__PURE__ */X("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
|
|
8
|
+
/* @__PURE__ */U("div",{className:"sf-panel-head",children:/* @__PURE__ */U(I,{content:ye?le.headerSettings:le.sectionSettings({name:we(Ne.type)}),side:"bottom",children:/* @__PURE__ */U("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(ze?"is-selected":""),"aria-pressed":ze,onClick:()=>{ye?pe(ke??d):(pe(d),re.select({index:0}))},children:we(Ne.type)})})}),
|
|
9
|
+
/* @__PURE__ */U(B,{className:"sf-tree sf-scroll",rootProps:He.rootProps(),words:me,children:/* @__PURE__ */U(F,{children:ye?
|
|
10
|
+
/* @__PURE__ */U(L,{words:me,icon:/* @__PURE__ */U(Re,{type:"header",size:13}),name:le.headerSettings,selected:ce.kind===ke?.kind,onSelect:()=>pe(ke??d),rowProps:{onClick:q(()=>pe(ke??d))}}):be?/* @__PURE__ */X($,{children:[Je.map((e,n)=>{const o=se?.props.id===e.props.id,r=We(e),t=String(e.props.id),s=()=>Ye(n,t),{rowProps:i,...c}=He.row({item:{id:t,zone:De,index:n},place:{...Y(De),index:n}},{onClick:q(s)});/* @__PURE__ */
|
|
11
|
+
return X(H,{children:[0===n&&Ie(De,0),
|
|
12
|
+
/* @__PURE__ */U(L,{words:me,icon:/* @__PURE__ */U(Re,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */U(E,{kind:"delete",label:le.deleteNamed({name:r}),onClick:()=>{return e=n,void(De&&(re.removeComponent(De,e),pe(d),re.select(null)));var e},children:/* @__PURE__ */U(Q,{size:13})}),rowProps:i}),Ie(De,n+1)]},String(e.props.id??n))}),
|
|
13
|
+
/* @__PURE__ */X("button",{type:"button",className:"sf-add-card",onClick:Ve,children:[
|
|
14
|
+
/* @__PURE__ */U("span",{className:"sf-plus sf-plus--sm",children:"+"}),be.addLabel]}),Se?Be.partRows?.(Ne,_):null]}):qe(Ne,1)})})]}),
|
|
15
15
|
/* @__PURE__ */U("div",{className:"sf-center",children:/* @__PURE__ */U("div",{className:"sf-preview-host",children:/* @__PURE__ */U(fe,{})})}),
|
|
16
|
-
/* @__PURE__ */U(s,{value:{selectChild:(e,n,o,r)=>"section"===
|
|
16
|
+
/* @__PURE__ */U(s,{value:{selectChild:(e,n,o,r)=>"section"===Te(r)?.source?Ye(n,o):Xe(e,n,o),addChild:(e,n,o,r,t)=>"section"===Te(t)?.source?Ve():Ue(`${e}:${n}`,o,r),childRowName:We,blockRowName:Qe},children:/* @__PURE__ */U(je,{mode:ce,onOpenWebsiteSettings:Be.openSettings??(()=>{}),onSelectNode:Fe,hideNodeActions:!0})})]})]})}export{ee as default};
|
|
@@ -18,7 +18,7 @@ import '../../words-BDignMl_.js';
|
|
|
18
18
|
import '../../types-BsyPh6EW.js';
|
|
19
19
|
import '../../style-clipboard/index.js';
|
|
20
20
|
import '../../words-CnnHb9jo.js';
|
|
21
|
-
import '../../types-
|
|
21
|
+
import '../../types-BLRK6_JO.js';
|
|
22
22
|
import '../../words-Cl9xMUYY.js';
|
|
23
23
|
import './AddSidePanel.js';
|
|
24
24
|
import '../lib/section-template-types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{usePartBridge}from"../../chunk-
|
|
1
|
+
export{usePartBridge}from"../../chunk-4YBMSUPL.js";import"../../chunk-SNMCF2ZD.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-KFMJ4IM4.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-R6WTQWAC.js";import"../../chunk-U3JP4VGF.js";import"../../chunk-FUOZKV7A.js";import"../../chunk-AELNNAFM.js";import"../../chunk-NJOPEWYN.js";import"../../chunk-OZ72A6MY.js";import"../../chunk-4JSBIW5H.js";import"../../chunk-YNOZ5NXW.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-QTLAVDJE.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-P2VEMZH5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import"../../chunk-ZNCEOSXO.js";
|
package/dist/screen/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ import '../words-BDignMl_.js';
|
|
|
24
24
|
import '../types-BsyPh6EW.js';
|
|
25
25
|
import '../style-clipboard/index.js';
|
|
26
26
|
import '../words-CnnHb9jo.js';
|
|
27
|
-
import '../types-
|
|
27
|
+
import '../types-BLRK6_JO.js';
|
|
28
28
|
import '../words-Cl9xMUYY.js';
|
|
29
29
|
import './components/AddSidePanel.js';
|
|
30
30
|
import './lib/section-template-types.js';
|
package/dist/screen/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-GZO72N3Q.js";export{DocumentScreen,ScreenMount}from"../chunk-
|
|
1
|
+
import"../chunk-GZO72N3Q.js";export{DocumentScreen,ScreenMount}from"../chunk-D4BUPPPV.js";import"../chunk-GXQCZJOP.js";export{ScreenStoreProvider}from"../chunk-XJPNW26S.js";import"../chunk-LJOYIXO4.js";import"../chunk-26OOWIJJ.js";import"../chunk-7P6IFCR4.js";import"../chunk-FGNR22NY.js";import"../chunk-ZE7I3PLX.js";import"../chunk-2GVCAIPX.js";import"../chunk-PAM3NLFL.js";import"../chunk-7F52SZOI.js";import"../chunk-R2HLPNQF.js";import"../chunk-TBF5CVPA.js";import"../chunk-4ES5JGGX.js";import"../chunk-IQ5TA7AM.js";import"../chunk-DUVRZ456.js";import"../chunk-6W7WLPZH.js";import"../chunk-X2GNFJRC.js";import"../chunk-KCBEE2MC.js";import"../chunk-42TMLDSQ.js";import"../chunk-4YBMSUPL.js";import"../chunk-SNMCF2ZD.js";import"../chunk-IYT6NN2J.js";import"../chunk-ZHTQCAQ2.js";import"../chunk-2I7MAA2U.js";import"../chunk-BSPCSC45.js";import"../chunk-I54UCYOU.js";import"../chunk-GOTN2KY4.js";import"../chunk-R5L2E7JX.js";import"../chunk-WZMU646D.js";import"../chunk-S4AWJX4Q.js";import"../chunk-ERR437B5.js";import"../chunk-KG7RJWOK.js";import"../chunk-GMCZXMOV.js";export{NO_DOCUMENT_ADDRESSING}from"../chunk-RLBXE4EU.js";import"../chunk-HNKB2ZYR.js";import"../chunk-CLOS6SSX.js";import"../chunk-VPFNZ7TB.js";import"../chunk-LOMEH6DG.js";import"../chunk-V7U33NF2.js";import"../chunk-5545A3PC.js";import"../chunk-QEWRHH6R.js";import"../chunk-5ZBY24K7.js";import"../chunk-PA3PNTVV.js";import"../chunk-BVN33R76.js";import"../chunk-5SOSVTVI.js";import"../chunk-KQMML6JM.js";import"../chunk-KCOBHPN6.js";export{EaselSessionProvider,useEaselSession}from"../chunk-O7Q4DDJT.js";export{EFFICIENT_BACKEND,activateEaselSession,backendOf,createEaselSession,currentEaselSession,deactivateEaselSession,efficientClientOpen,isEfficientBackend,provideDefaultBackend,resetAmbientEaselSession,sessionRegistry,setSessionBridgedSite,setSessionDocumentSite}from"../chunk-RSCMJIWS.js";import"../chunk-HQ4VVRIC.js";import"../chunk-TJOUAFJE.js";export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenAdd,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../chunk-KFMJ4IM4.js";import"../chunk-PLVEGYK6.js";import"../chunk-R6WTQWAC.js";export{DETACHED_EASEL_HOST,EaselHostContext,EaselHostProvider,createEaselHost,useEaselHost,useHostEscape}from"../chunk-U3JP4VGF.js";import"../chunk-6WY6ZXJG.js";import"../chunk-MCHMF32I.js";import"../chunk-FUOZKV7A.js";import"../chunk-AELNNAFM.js";import"../chunk-NJOPEWYN.js";import"../chunk-OZ72A6MY.js";import"../chunk-4JSBIW5H.js";import"../chunk-YNOZ5NXW.js";import"../chunk-K56YDHYQ.js";import"../chunk-QTLAVDJE.js";import"../chunk-YRLPFZW3.js";import"../chunk-BXMXTO36.js";import"../chunk-EA2HTX37.js";import"../chunk-OSPUG6S6.js";import"../chunk-WK3AFPXY.js";import"../chunk-UK2FQOUT.js";import"../chunk-4VJATVVR.js";import"../chunk-BDTITTMW.js";import"../chunk-H6DDIBQ4.js";import"../chunk-GTDLBUOC.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-7GVPKRW2.js";import"../chunk-O2NLQBFX.js";import"../chunk-67GNT6PF.js";import"../chunk-P2VEMZH5.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";import"../chunk-PAELDYYS.js";import"../chunk-ZNCEOSXO.js";
|