efficient-easel 20.0.0 → 20.1.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/{ScreenDocumentContext-RxVWWWHq.d.ts → ScreenDocumentContext-CFJeqqKk.d.ts} +27 -2
- package/dist/chunk-276MBG5P.js +2 -0
- package/dist/{chunk-MS2U6MV5.js → chunk-2G6MAXPY.js} +1 -1
- package/dist/{chunk-A42LPWNM.js → chunk-47CD7ULN.js} +1 -1
- package/dist/{chunk-EW6XAMDZ.js → chunk-47PYYMFM.js} +6 -6
- package/dist/{chunk-2A7HLAI5.js → chunk-5THLKXTH.js} +1 -1
- package/dist/{chunk-EZG3TGQ7.js → chunk-77IWWW6X.js} +1 -1
- package/dist/{chunk-SK3P56FS.js → chunk-7LYKFL3Q.js} +13 -13
- package/dist/{chunk-LNHT2KPX.js → chunk-FHCKFOCD.js} +2 -2
- package/dist/{chunk-BW5COX42.js → chunk-H4JCMK36.js} +1 -1
- package/dist/{chunk-KC24D76S.js → chunk-HBBXDGDD.js} +1 -1
- package/dist/{chunk-CBICQ4J3.js → chunk-LEZFSSQN.js} +5 -5
- package/dist/chunk-MQA7OFRA.js +2 -0
- package/dist/{chunk-QALW2ECZ.js → chunk-PEDR7G3K.js} +1 -1
- package/dist/{chunk-NHY5L3SE.js → chunk-PI6RFJR4.js} +1 -1
- package/dist/chunk-RVZJ52EP.js +63 -0
- package/dist/{chunk-VPFNZ7TB.js → chunk-U66YKDAR.js} +1 -1
- package/dist/{chunk-5DPIGWUL.js → chunk-UJ46J7QW.js} +1 -1
- package/dist/{chunk-RYNBSKE7.js → chunk-UNVKPVZW.js} +1 -1
- package/dist/{chunk-RR4VIAHP.js → chunk-WBFLSCTI.js} +3 -3
- package/dist/copy/index.js +12 -12
- 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/MediaPopup.js +1 -1
- package/dist/screen/components/NodeContextMenu.d.ts +1 -1
- package/dist/screen/components/NodeContextMenu.js +1 -1
- package/dist/screen/components/PageEditGuardNotices.js +1 -1
- package/dist/screen/components/SaveControls.d.ts +1 -1
- package/dist/screen/components/ScreenChrome.js +1 -1
- package/dist/screen/components/ScreenDocumentContext.d.ts +1 -1
- package/dist/screen/components/ScreenDocumentContext.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 +16 -16
- 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/admin-bridge.js +1 -1
- package/dist/screen/lib/document-addressing.d.ts +1 -1
- package/dist/screen/lib/host-inbound.js +1 -1
- package/dist/screen/lib/host.d.ts +1 -1
- package/dist/screen/lib/host.js +1 -1
- package/dist/screen/lib/key-scope.js +1 -1
- package/dist/screen/lib/media-panel.d.ts +1 -1
- package/dist/screen/lib/media-panel.js +1 -1
- package/dist/screen/lib/media-picker.d.ts +1 -1
- package/dist/screen/lib/media-picker.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/strings/index.js +1 -1
- package/dist/text-styles/index.js +21 -21
- package/package.json +1 -1
- package/dist/chunk-BC5KJNHN.js +0 -63
- package/dist/chunk-M62P4IQK.js +0 -2
- package/dist/chunk-U3JP4VGF.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ScreenStoreProvider as default}from"../../chunk-
|
|
1
|
+
export{ScreenStoreProvider as default}from"../../chunk-H4JCMK36.js";import"../../chunk-LEZFSSQN.js";import"../../chunk-FHCKFOCD.js";import"../../chunk-MQA7OFRA.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-ROPYFLNZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-7LYKFL3Q.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-A6Z4SD3I.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-IWCKVZHS.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-BSHIQIZC.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-ZOBSIXRD.js";import"../../chunk-QAJAEWCZ.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-VANKQVOW.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-3S5N4HLJ.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-QIDRJH3S.js";import"../../chunk-LF3FUSCQ.js";import"../../chunk-K7BTCBWD.js";import"../../chunk-L55YIXDC.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import{AddBlockRow as e}from"../../chunk-
|
|
2
|
-
return
|
|
3
|
-
return
|
|
4
|
-
/* @__PURE__ */J(
|
|
5
|
-
return
|
|
6
|
-
/* @__PURE__ */J("div",{className:"sf-section-bar",children:/* @__PURE__ */J(g,null!==q?{tone:"off",label:q,role:"status"}:{...
|
|
7
|
-
/* @__PURE__ */
|
|
8
|
-
/* @__PURE__ */J("div",{className:"sf-panel-head",children:/* @__PURE__ */J(
|
|
9
|
-
/* @__PURE__ */J(
|
|
10
|
-
/* @__PURE__ */J(
|
|
11
|
-
return
|
|
12
|
-
/* @__PURE__ */J(
|
|
13
|
-
/* @__PURE__ */
|
|
14
|
-
/* @__PURE__ */J("span",{className:"sf-plus sf-plus--sm",children:"+"}),
|
|
1
|
+
import{AddBlockRow as e}from"../../chunk-5THLKXTH.js";import{scrollPreviewToSection as n,gotoPreviewSlide as o}from"../../chunk-2E2SXDYQ.js";import{useEaselUndoKeys as r}from"../../chunk-HBBXDGDD.js";import{SlotChildActionsProvider as t}from"../../chunk-KCBEE2MC.js";import{DEFAULT_PANEL_W as s}from"../../chunk-C56MPJBH.js";import{usePartBridge as i}from"../../chunk-47CD7ULN.js";import{useSectionOps as c}from"../../chunk-PI6RFJR4.js";import"../../chunk-M2Z775ZC.js";import{SELECTION_MODE as p,useScreenPinned as l,useScreenCanvasFrame as m,useScreenInspectorPanel as d,useScreenPickFollowsSelection as a,sameInspectorMode as u,useStandaloneScreenBridges as h,useScreenBlockLook as k,useScreenBlockRules as j}from"../../chunk-LEZFSSQN.js";import{MediaPopup as f}from"../../chunk-2G6MAXPY.js";import{useScreenDocument as S}from"../../chunk-276MBG5P.js";import"../../chunk-77IWWW6X.js";import"../../chunk-ERR437B5.js";import"../../chunk-UNVKPVZW.js";import"../../chunk-GMCZXMOV.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-HNKB2ZYR.js";import"../../chunk-CLOS6SSX.js";import"../../chunk-U66YKDAR.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-FHCKFOCD.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-MQA7OFRA.js";import{DEFAULT_SCREEN_WORDS as C}from"../../chunk-23DYNW6S.js";import{slotChildRowName as y}from"../../chunk-BHRC3ASL.js";import"../../chunk-6W7WLPZH.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-IYT6NN2J.js";import{slotFieldsOf as N,nestsInTree as D}from"../../chunk-PLVEGYK6.js";import{useEasel as x}from"../../chunk-ROPYFLNZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-7LYKFL3Q.js";import"../../chunk-BPXEFVSQ.js";import{LayersTree as R,Subtree as A,TreeRow as H,TreeRowAction as L,TreeSeam as P}from"../../chunk-A6Z4SD3I.js";import{DEFAULT_TREE_WORDS as B}from"../../chunk-K56YDHYQ.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-IWCKVZHS.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-BSHIQIZC.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-NDRZP6YR.js";import{DEFAULT_SAVE_WORDS as M,saveIndicator as O}from"../../chunk-H6DDIBQ4.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-ZOBSIXRD.js";import"../../chunk-QAJAEWCZ.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-VANKQVOW.js";import{SaveState as g,panelWidthVars as v}from"../../chunk-ZG6PVMC3.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-THWO5YVZ.js";import"../../chunk-RE4LP46F.js";import{useWords as z}from"../../chunk-MFIRYGHW.js";import"../../chunk-LDEEFLE3.js";import"../../chunk-KAML3KQH.js";import{useTreeDrag as E}from"../../chunk-3S5N4HLJ.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-QIDRJH3S.js";import"../../chunk-LF3FUSCQ.js";import{zoneKey as F,parseZoneKey as I}from"../../chunk-K7BTCBWD.js";import"../../chunk-L55YIXDC.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import{useState as W,useRef as Z,useEffect as b,useCallback as K,Fragment as Y}from"react";import{Tooltip as w}from"efficient-shell/ui";import{TrashIcon as Q}from"efficient-shell/icons/efficient";import{jsxs as V,jsx as J,Fragment as X}from"react/jsx-runtime";var T=e=>n=>{n.target.closest("button, input")||e()},$={rowClick:T};function G(){const{saveState:G,readOnly:U,readOnlyReason:q=null}=S(),_=c(),{appState:ee,selectedItem:ne,config:oe}=x(e=>e),[re,te]=W(p),se=z("screen",C),ie=z("tree",B),ce=z("save",M),{first:pe,last:le,panelOf:me}=l(),de=me(pe),ae=m(),ue=d(),he=ee.data.content?.[0]??null,ke=he?.props.id??null,je=he?.type===pe,fe=he?.type===le,Se=Z(null),Ce=Z(null);r(Ce),a(ne?.props.id),b(()=>{ke&&Se.current!==ke&&(Se.current=ke,je?te(de??p):ne||_.select({index:0}))},[ke,ne,_,je]);const ye=K(e=>te(n=>u(n,e)?n:e),[]),Ne=h({kind:re.kind,mode:re,open:ye,show:e=>te(e),reveal:()=>{},select:(e,n)=>{te(e=>u(e,n)?e:n),_.select(e)}}),{selectNode:De}=i({mode:re,setMode:te,onOpenPart:n}),xe=k(),{labelAtLevel:Re,Icon:Ae}=xe,{canAddTo:He}=j(),Le=e=>Re(e,"block",oe.components[e]?.label??e),Pe=e=>Re(e,"section",Le(e)),Be=!je&&"puck"===re.kind&&ne?.props.id===ke,Me=he?He(he.type)?.spec??null:null,Oe=he&&Me?`${he.props.id}:${Me.slot}`:null,ge=he&&Me&&Array.isArray(he.props[Me.slot])?he.props[Me.slot]:[],ve=e=>y(e,Le,xe.plainText),ze=(e,r)=>{he&&Me&&Oe&&(te(p),Me.slider?(o(String(he.props.id),e),_.select({index:e,zone:Oe}),n(String(he.props.id))):(_.select({index:e,zone:Oe}),n(r)))},Ee=()=>{if(!he||!Me||!Oe)return;const e=ge.length;_.insertComponent(Oe,Me.childType,e),te(p),Me.slider?requestAnimationFrame(()=>{o(String(he.props.id),e),_.select({index:e,zone:Oe})}):_.select({index:e,zone:Oe})},Fe=e=>N(oe,e),Ie=e=>{const{parentId:n,slot:o}=I(e),r=e=>{if(!e)return null;if(String(e.props.id)===n)return e;for(const n of Fe(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(he)?.props[o];return Array.isArray(t)?t.length:0},We=(e,n,o)=>{const r=Math.min(Math.max(o,0),Ie(e)),t=n<r?r-1:r;t!==n&&(_.reorderComponent(e,n,t),te(p),_.select({index:t,zone:e}))},Ze=E({keyOf:e=>e.id,readOnly:Boolean(U),canDrop:(e,n)=>F(n)===e.zone&&n.index>=0&&n.index<=Ie(e.zone),onDrop:(e,n)=>We(e.zone,e.index,n.index),onStep:(e,n)=>We(e.zone,e.index,n<0?e.index-1:e.index+2)}),be=(e,n)=>/* @__PURE__ */J(P,{...U?{}:Ze.seam({place:{...I(e),index:n}})},`seam:${e}:${n}`),Ke=e=>xe.blockRowName(e,Le),Ye=(e,o,r)=>{te(p),_.select({index:o,zone:e}),n(r)},we=(e,n,o)=>{_.insertComponent(e,n,o),te(p),_.select({index:o,zone:e})},Qe=(n,o,r)=>/* @__PURE__ */J(e,{choices:r,onPick:e=>we(n,e,o)}),Ve=(e,n)=>{const o=Fe((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=He(e.type),s=t?.choices??null,i="footer"===t?.source?Ke:ve;/* @__PURE__ */
|
|
2
|
+
return V(X,{children:[o.map(({child:e,zone:o,index:r})=>{const t=ne?.props.id===e.props.id,s=D(oe,e.type,n),c=i(e),l=String(e.props.id),m=()=>Ye(o,r,l),{rowProps:d,...a}=Ze.row({item:{id:l,zone:o,index:r},place:{...I(o),index:r}},{onClick:T(m)});/* @__PURE__ */
|
|
3
|
+
return V(Y,{children:[0===r&&be(o,0),
|
|
4
|
+
/* @__PURE__ */J(H,{words:ie,icon:/* @__PURE__ */J(Ae,{type:e.type,size:13}),name:c,selected:t,onSelect:m,...a,actions:/* @__PURE__ */J(L,{kind:"delete",label:se.deleteNamed({name:c}),onClick:()=>{return e=o,n=r,_.removeComponent(e,n),te(p),void _.select(null);var e,n},children:/* @__PURE__ */J(Q,{size:13})}),rowProps:d}),s&&/* @__PURE__ */J(A,{children:Ve(e,n+1)}),be(o,r+1)]},String(e.props.id??`${o}-${r}`))}),t&&s?Qe(`${e.props.id}:${t.slot}`,o.length,s):null]})},Je="HeroSingle"===he?.type,Xe=Boolean(he)&&(Boolean(He(he.type))||Fe(he.type).length>0),Te=Boolean(he)&&(Boolean(Me)||fe||je||Je||Xe);/* @__PURE__ */
|
|
5
|
+
return V("div",{ref:Ce,className:"sf-editor es-editor",style:v(s),children:[
|
|
6
|
+
/* @__PURE__ */J("div",{className:"sf-section-bar",children:/* @__PURE__ */J(g,null!==q?{tone:"off",label:q,role:"status"}:{...O(G,ce),role:"status"})}),
|
|
7
|
+
/* @__PURE__ */V("div",{className:"sf-body",children:[Te&&he&&/* @__PURE__ */V("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
|
|
8
|
+
/* @__PURE__ */J("div",{className:"sf-panel-head",children:/* @__PURE__ */J(w,{content:je?se.headerSettings:se.sectionSettings({name:Pe(he.type)}),side:"bottom",children:/* @__PURE__ */J("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(Be?"is-selected":""),"aria-pressed":Be,onClick:()=>{je?te(de??p):(te(p),_.select({index:0}))},children:Pe(he.type)})})}),
|
|
9
|
+
/* @__PURE__ */J(R,{className:"sf-tree sf-scroll",rootProps:Ze.rootProps(),words:ie,children:/* @__PURE__ */J(A,{children:je?
|
|
10
|
+
/* @__PURE__ */J(H,{words:ie,icon:/* @__PURE__ */J(Ae,{type:"header",size:13}),name:se.headerSettings,selected:re.kind===de?.kind,onSelect:()=>te(de??p),rowProps:{onClick:T(()=>te(de??p))}}):Me?/* @__PURE__ */V(X,{children:[ge.map((e,n)=>{const o=ne?.props.id===e.props.id,r=ve(e),t=String(e.props.id),s=()=>ze(n,t),{rowProps:i,...c}=Ze.row({item:{id:t,zone:Oe,index:n},place:{...I(Oe),index:n}},{onClick:T(s)});/* @__PURE__ */
|
|
11
|
+
return V(Y,{children:[0===n&&be(Oe,0),
|
|
12
|
+
/* @__PURE__ */J(H,{words:ie,icon:/* @__PURE__ */J(Ae,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */J(L,{kind:"delete",label:se.deleteNamed({name:r}),onClick:()=>{return e=n,void(Oe&&(_.removeComponent(Oe,e),te(p),_.select(null)));var e},children:/* @__PURE__ */J(Q,{size:13})}),rowProps:i}),be(Oe,n+1)]},String(e.props.id??n))}),
|
|
13
|
+
/* @__PURE__ */V("button",{type:"button",className:"sf-add-card",onClick:Ee,children:[
|
|
14
|
+
/* @__PURE__ */J("span",{className:"sf-plus sf-plus--sm",children:"+"}),Me.addLabel]}),ke?Ne.partRows?.(he,$):null]}):Ve(he,1)})})]}),
|
|
15
15
|
/* @__PURE__ */J("div",{className:"sf-center",children:/* @__PURE__ */J("div",{className:"sf-preview-host",children:/* @__PURE__ */J(ae,{})})}),
|
|
16
|
-
/* @__PURE__ */J(t,{value:{selectChild:(e,n,o,r)=>"section"===
|
|
17
|
-
/* @__PURE__ */J(f,{})]})}export{
|
|
16
|
+
/* @__PURE__ */J(t,{value:{selectChild:(e,n,o,r)=>"section"===He(r)?.source?ze(n,o):Ye(e,n,o),addChild:(e,n,o,r,t)=>"section"===He(t)?.source?Ee():we(`${e}:${n}`,o,r),childRowName:ve,blockRowName:Ke},children:/* @__PURE__ */J(ue,{mode:re,onOpenWebsiteSettings:Ne.openSettings??(()=>{}),onSelectNode:De,hideNodeActions:!0})})]}),
|
|
17
|
+
/* @__PURE__ */J(f,{})]})}export{G as default};
|
|
@@ -26,7 +26,7 @@ import '../lib/section-template-types.js';
|
|
|
26
26
|
import '../lib/puck/content-tree.js';
|
|
27
27
|
import '../lib/shared-section-types.js';
|
|
28
28
|
import '../lib/puck/block-choice.js';
|
|
29
|
-
import '../../ScreenDocumentContext-
|
|
29
|
+
import '../../ScreenDocumentContext-CFJeqqKk.js';
|
|
30
30
|
import '../lib/document-contract.js';
|
|
31
31
|
import '../lib/document-switch.js';
|
|
32
32
|
import '../../engine-CvXpFE86.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{usePartBridge}from"../../chunk-
|
|
1
|
+
export{usePartBridge}from"../../chunk-47CD7ULN.js";import"../../chunk-PI6RFJR4.js";import"../../chunk-LEZFSSQN.js";import"../../chunk-FHCKFOCD.js";import"../../chunk-MQA7OFRA.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-ROPYFLNZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-7LYKFL3Q.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-A6Z4SD3I.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-IWCKVZHS.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-BSHIQIZC.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-ZOBSIXRD.js";import"../../chunk-QAJAEWCZ.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-VANKQVOW.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-3S5N4HLJ.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-QIDRJH3S.js";import"../../chunk-LF3FUSCQ.js";import"../../chunk-K7BTCBWD.js";import"../../chunk-L55YIXDC.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";
|
package/dist/screen/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { default as ScreenStoreProvider } from './components/ScreenStoreProvider
|
|
|
3
3
|
export { NodeDefaults, SELECTION_MODE, ScreenBlockLook, ScreenBlockRules, ScreenBridges, ScreenCanvas, ScreenCanvasDrag, ScreenCanvasDragContext, ScreenCanvasHeadProps, ScreenCanvasTargetProvider, ScreenDevices, ScreenDocumentOps, ScreenDragItem, ScreenInspector, ScreenInspectorMode, ScreenInspectorPanelProps, ScreenLeftPanel, ScreenLeftView, ScreenLeftViewFrame, ScreenLeftViewRules, ScreenMainAction, ScreenMediaDrop, ScreenMediaFile, ScreenMenuItem, ScreenMenuRows, ScreenNewNode, ScreenNode, ScreenNodeActions, ScreenNodeLevel, ScreenNodeMaker, ScreenPartMode, ScreenParts, ScreenPartsProvider, ScreenPinnedBand, ScreenPinnedNodes, ScreenRailItem, ScreenSelector, ScreenSharedSections, ScreenSlot, ScreenSlotAction, ScreenSlotMode, ScreenStyleClipboard, ScreenStyleDocument, ScreenStylePastePlan, ScreenToastExtra, ScreenTree, ScreenTreeFolds, ScreenTreeRows, isPinnedFirst, isPinnedLast, isSlotMode, sameInspectorMode, screenSlotsOf, useScreenBlockLook, useScreenBlockRules, useScreenBridges, useScreenCanvasDrag, useScreenCanvasFrame, useScreenCanvasHead, useScreenCanvasTarget, useScreenDevices, useScreenDocumentLabel, useScreenDocumentPass, useScreenInspectorPanel, useScreenLeftView, useScreenNodeKeys, useScreenNotify, useScreenOwnerName, useScreenParts, useScreenPickFollowsSelection, useScreenPinned, useScreenSaveSwitch, useScreenStorageNamespace, useScreenStyleClipboard, useStandaloneScreenBridges } from './lib/screen-parts.js';
|
|
4
4
|
export { DefaultBackend, EFFICIENT_BACKEND, EaselSession, SessionBackend, SessionBlocks, activateEaselSession, backendOf, createEaselSession, currentEaselSession, deactivateEaselSession, efficientClientOpen, isEfficientBackend, provideDefaultBackend, resetAmbientEaselSession, sessionRegistry, setSessionBridgedSite, setSessionDocumentSite } from './lib/session.js';
|
|
5
5
|
export { EaselSessionProvider, useEaselSession } from './lib/session-context.js';
|
|
6
|
-
export { A as AnyDocumentAddressing, D as DETACHED_EASEL_HOST, a as DocumentAddressing, E as EaselBlockType, b as EaselFieldDescription, c as EaselHost, d as EaselHostAddress, e as EaselHostContext, f as
|
|
6
|
+
export { A as AnyDocumentAddressing, D as DETACHED_EASEL_HOST, a as DocumentAddressing, E as EaselBlockType, b as EaselFieldDescription, c as EaselHost, d as EaselHostAddress, e as EaselHostContext, f as EaselHostPanels, g as EaselHostProvider, h as EaselMessageType, i as EaselSelection, j as EaselToHostMessage, H as HostPickedMedia, k as HostToEaselMessage, I as InboundHostMessage, N as NO_DOCUMENT_ADDRESSING, P as PageEditOp, l as PickedMediaSource, S as SectionScreenTarget, m as SendToHost, n as createEaselHost, u as useEaselHost, o as useHostEscape } from '../ScreenDocumentContext-CFJeqqKk.js';
|
|
7
7
|
export { EaselCapabilities, EaselDocument, EaselDocumentAdapter, EaselPageRow, SiteRecord, SiteRecordPatch, WebsiteEditLock } from './lib/document-contract.js';
|
|
8
8
|
import 'react';
|
|
9
9
|
import '../blocks/index.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-WBFLSCTI.js";import"../chunk-GXQCZJOP.js";import"../chunk-RVZJ52EP.js";import"../chunk-2GVCAIPX.js";import"../chunk-26OOWIJJ.js";import"../chunk-JBOSEHIX.js";import"../chunk-FGNR22NY.js";import"../chunk-LER7RKTO.js";import"../chunk-FGYJ5DJY.js";import"../chunk-7F52SZOI.js";import"../chunk-MQNBD6AB.js";import"../chunk-2E2SXDYQ.js";import"../chunk-HBBXDGDD.js";import"../chunk-KCBEE2MC.js";import"../chunk-C56MPJBH.js";import"../chunk-47CD7ULN.js";import"../chunk-PI6RFJR4.js";import"../chunk-PY7OOQEZ.js";import"../chunk-RKTF5XLP.js";export{ScreenStoreProvider}from"../chunk-H4JCMK36.js";import"../chunk-5545A3PC.js";import"../chunk-47PYYMFM.js";import"../chunk-PA3PNTVV.js";import"../chunk-5ZBY24K7.js";import"../chunk-BVN33R76.js";import"../chunk-43AEUUNQ.js";import"../chunk-SINAM2IT.js";import"../chunk-UMDQ6CLQ.js";import"../chunk-M2Z775ZC.js";export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../chunk-LEZFSSQN.js";import"../chunk-2G6MAXPY.js";import"../chunk-PEDR7G3K.js";import"../chunk-UJ46J7QW.js";import"../chunk-276MBG5P.js";import"../chunk-77IWWW6X.js";import"../chunk-ERR437B5.js";import"../chunk-UNVKPVZW.js";import"../chunk-GMCZXMOV.js";export{NO_DOCUMENT_ADDRESSING}from"../chunk-RLBXE4EU.js";import"../chunk-HNKB2ZYR.js";import"../chunk-CLOS6SSX.js";import"../chunk-U66YKDAR.js";import"../chunk-LOMEH6DG.js";import"../chunk-KCOBHPN6.js";import"../chunk-FHCKFOCD.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";export{DETACHED_EASEL_HOST,EaselHostContext,EaselHostProvider,createEaselHost,useEaselHost,useHostEscape}from"../chunk-MQA7OFRA.js";import"../chunk-XFYFKITX.js";import"../chunk-23DYNW6S.js";import"../chunk-V7U33NF2.js";import"../chunk-6WY6ZXJG.js";import"../chunk-BHRC3ASL.js";import"../chunk-6W7WLPZH.js";import"../chunk-IQ5TA7AM.js";import"../chunk-DUVRZ456.js";import"../chunk-IYT6NN2J.js";import"../chunk-PLVEGYK6.js";import"../chunk-ROPYFLNZ.js";import"../chunk-TBY3DFKS.js";import"../chunk-7LYKFL3Q.js";import"../chunk-BPXEFVSQ.js";import"../chunk-A6Z4SD3I.js";import"../chunk-K56YDHYQ.js";import"../chunk-ZEH6QLBH.js";import"../chunk-IWCKVZHS.js";import"../chunk-ZKY45F5G.js";import"../chunk-FIVU2COQ.js";import"../chunk-P5VYGWYO.js";import"../chunk-WK3AFPXY.js";import"../chunk-BSHIQIZC.js";import"../chunk-RC25EGHD.js";import"../chunk-KFV7N2DJ.js";import"../chunk-NDRZP6YR.js";import"../chunk-H6DDIBQ4.js";import"../chunk-23VM4PMV.js";import"../chunk-KRL3IUV3.js";import"../chunk-ZOBSIXRD.js";import"../chunk-QAJAEWCZ.js";import"../chunk-WRFD4EXD.js";import"../chunk-VANKQVOW.js";import"../chunk-ZG6PVMC3.js";import"../chunk-MJM6SFD3.js";import"../chunk-AJSDWWJW.js";import"../chunk-2OAZYSWJ.js";import"../chunk-THWO5YVZ.js";import"../chunk-RE4LP46F.js";import"../chunk-MFIRYGHW.js";import"../chunk-LDEEFLE3.js";import"../chunk-KAML3KQH.js";import"../chunk-3S5N4HLJ.js";import"../chunk-P2VEMZH5.js";import"../chunk-QIDRJH3S.js";import"../chunk-LF3FUSCQ.js";import"../chunk-K7BTCBWD.js";import"../chunk-L55YIXDC.js";import"../chunk-BSPCSC45.js";import"../chunk-I54UCYOU.js";import"../chunk-GOTN2KY4.js";import"../chunk-R5L2E7JX.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{NO_BRIDGED_CAPABILITIES,applyAuthGrant,useAdminBridge}from"../../chunk-
|
|
1
|
+
export{NO_BRIDGED_CAPABILITIES,applyAuthGrant,useAdminBridge}from"../../chunk-U66YKDAR.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-MQA7OFRA.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AnyDocumentAddressing, a as DocumentAddressing, N as NO_DOCUMENT_ADDRESSING } from '../../ScreenDocumentContext-
|
|
1
|
+
export { A as AnyDocumentAddressing, a as DocumentAddressing, N as NO_DOCUMENT_ADDRESSING } from '../../ScreenDocumentContext-CFJeqqKk.js';
|
|
2
2
|
import './document-contract.js';
|
|
3
3
|
import './session.js';
|
|
4
4
|
import 'react';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{routeSharedHostMessage}from"../../chunk-
|
|
1
|
+
export{routeSharedHostMessage}from"../../chunk-77IWWW6X.js";import"../../chunk-UNVKPVZW.js";import"../../chunk-FHCKFOCD.js";import"../../chunk-MQA7OFRA.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
-
export { D as DETACHED_EASEL_HOST, E as EaselBlockType, b as EaselFieldDescription, c as EaselHost, d as EaselHostAddress, e as EaselHostContext, f as
|
|
2
|
+
export { D as DETACHED_EASEL_HOST, E as EaselBlockType, b as EaselFieldDescription, c as EaselHost, d as EaselHostAddress, e as EaselHostContext, f as EaselHostPanels, g as EaselHostProvider, h as EaselMessageType, i as EaselSelection, j as EaselToHostMessage, H as HostPickedMedia, k as HostToEaselMessage, I as InboundHostMessage, P as PageEditOp, l as PickedMediaSource, S as SectionScreenTarget, m as SendToHost, n as createEaselHost, u as useEaselHost, o as useHostEscape } from '../../ScreenDocumentContext-CFJeqqKk.js';
|
|
3
3
|
import '../../blocks/index.js';
|
|
4
4
|
import '../../types-Cq53lL8d.js';
|
|
5
5
|
import '../../data/index.js';
|
package/dist/screen/lib/host.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{DETACHED_EASEL_HOST,EaselHostContext,EaselHostProvider,createEaselHost,useEaselHost,useHostEscape}from"../../chunk-
|
|
1
|
+
export{DETACHED_EASEL_HOST,EaselHostContext,EaselHostProvider,createEaselHost,useEaselHost,useHostEscape}from"../../chunk-MQA7OFRA.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{editorRootFocus,isSaveShortcut,useEaselKeyTarget,useEaselSaveKey,useEaselUndoKeys}from"../../chunk-
|
|
1
|
+
export{editorRootFocus,isSaveShortcut,useEaselKeyTarget,useEaselSaveKey,useEaselUndoKeys}from"../../chunk-HBBXDGDD.js";import"../../chunk-MQA7OFRA.js";import"../../chunk-ROPYFLNZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-IWCKVZHS.js";import"../../chunk-BSHIQIZC.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-QIDRJH3S.js";import"../../chunk-LF3FUSCQ.js";import"../../chunk-K7BTCBWD.js";import"../../chunk-L55YIXDC.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ComponentType, ReactNode } from 'react';
|
|
3
|
-
import { H as HostPickedMedia, c as EaselHost } from '../../ScreenDocumentContext-
|
|
3
|
+
import { H as HostPickedMedia, c as EaselHost } from '../../ScreenDocumentContext-CFJeqqKk.js';
|
|
4
4
|
import '../../blocks/index.js';
|
|
5
5
|
import '../../types-Cq53lL8d.js';
|
|
6
6
|
import '../../data/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{MediaPanelProvider,cancelPanelPick,createMediaPickStore,hasMediaPanel,mediaPickStoreFor,requestPanelPick,settlePanelPick,useCloseMediaPopup,useMediaBrowsing,useMediaPanel,useMediaPlace,useOpenMediaBrowse,usePanelPick,usePickFollowsSelection}from"../../chunk-
|
|
1
|
+
export{MediaPanelProvider,cancelPanelPick,createMediaPickStore,hasMediaPanel,mediaPickStoreFor,requestPanelPick,settlePanelPick,useCloseMediaPopup,useMediaBrowsing,useMediaPanel,useMediaPlace,useOpenMediaBrowse,usePanelPick,usePickFollowsSelection}from"../../chunk-FHCKFOCD.js";import"../../chunk-MQA7OFRA.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as HostPickedMedia, c as EaselHost } from '../../ScreenDocumentContext-
|
|
1
|
+
import { H as HostPickedMedia, c as EaselHost } from '../../ScreenDocumentContext-CFJeqqKk.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '../../blocks/index.js';
|
|
4
4
|
import '../../types-Cq53lL8d.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{requestMediaPick,resolveMediaPick}from"../../chunk-
|
|
1
|
+
export{requestMediaPick,resolveMediaPick}from"../../chunk-UNVKPVZW.js";import"../../chunk-FHCKFOCD.js";import"../../chunk-MQA7OFRA.js";
|
|
@@ -27,7 +27,7 @@ import '../section-template-types.js';
|
|
|
27
27
|
import './content-tree.js';
|
|
28
28
|
import '../shared-section-types.js';
|
|
29
29
|
import './block-choice.js';
|
|
30
|
-
import '../../../ScreenDocumentContext-
|
|
30
|
+
import '../../../ScreenDocumentContext-CFJeqqKk.js';
|
|
31
31
|
import '../document-contract.js';
|
|
32
32
|
import '../document-switch.js';
|
|
33
33
|
import '../../../engine-CvXpFE86.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{useSectionOps}from"../../../chunk-
|
|
1
|
+
export{useSectionOps}from"../../../chunk-PI6RFJR4.js";import"../../../chunk-LEZFSSQN.js";import"../../../chunk-FHCKFOCD.js";import"../../../chunk-MQA7OFRA.js";import"../../../chunk-PLVEGYK6.js";import"../../../chunk-ROPYFLNZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-7LYKFL3Q.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-A6Z4SD3I.js";import"../../../chunk-K56YDHYQ.js";import"../../../chunk-ZEH6QLBH.js";import"../../../chunk-IWCKVZHS.js";import"../../../chunk-FIVU2COQ.js";import"../../../chunk-BSHIQIZC.js";import"../../../chunk-RC25EGHD.js";import"../../../chunk-KFV7N2DJ.js";import"../../../chunk-23VM4PMV.js";import"../../../chunk-KRL3IUV3.js";import"../../../chunk-ZOBSIXRD.js";import"../../../chunk-QAJAEWCZ.js";import"../../../chunk-WRFD4EXD.js";import"../../../chunk-VANKQVOW.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-3S5N4HLJ.js";import"../../../chunk-P2VEMZH5.js";import"../../../chunk-QIDRJH3S.js";import"../../../chunk-LF3FUSCQ.js";import"../../../chunk-K7BTCBWD.js";import"../../../chunk-L55YIXDC.js";
|
|
@@ -10,7 +10,7 @@ import { E as EaselRailItem } from '../../types-Cy7rdmXt.js';
|
|
|
10
10
|
import { StyleRow } from '../../style-clipboard/index.js';
|
|
11
11
|
import { T as TreeRowMark } from '../../types-Bqq6ya0y.js';
|
|
12
12
|
import { AddKey } from '../components/AddSidePanel.js';
|
|
13
|
-
import {
|
|
13
|
+
import { p as AnyScreenTarget } from '../../ScreenDocumentContext-CFJeqqKk.js';
|
|
14
14
|
import { HostProduct } from './host-chrome.js';
|
|
15
15
|
import { EaselSession } from './session.js';
|
|
16
16
|
import { SharedSectionUse, SharedSection } from './shared-section-types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-
|
|
1
|
+
export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSlotMode,sameInspectorMode,screenSlotsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-LEZFSSQN.js";import"../../chunk-FHCKFOCD.js";import"../../chunk-MQA7OFRA.js";import"../../chunk-PLVEGYK6.js";import"../../chunk-ROPYFLNZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-7LYKFL3Q.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-A6Z4SD3I.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-IWCKVZHS.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-BSHIQIZC.js";import"../../chunk-RC25EGHD.js";import"../../chunk-KFV7N2DJ.js";import"../../chunk-23VM4PMV.js";import"../../chunk-KRL3IUV3.js";import"../../chunk-ZOBSIXRD.js";import"../../chunk-QAJAEWCZ.js";import"../../chunk-WRFD4EXD.js";import"../../chunk-VANKQVOW.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-3S5N4HLJ.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-QIDRJH3S.js";import"../../chunk-LF3FUSCQ.js";import"../../chunk-K7BTCBWD.js";import"../../chunk-L55YIXDC.js";
|
package/dist/strings/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{DEFAULT_SCREEN_WORDS as r}from"../chunk-23DYNW6S.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as o}from"../chunk-6WY6ZXJG.js";import{DEFAULT_TEXT_STYLES_WORDS as n}from"../chunk-OGH6CC3E.js";import{
|
|
1
|
+
import{DEFAULT_SCREEN_WORDS as r}from"../chunk-23DYNW6S.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as o}from"../chunk-6WY6ZXJG.js";import{DEFAULT_TEXT_STYLES_WORDS as n}from"../chunk-OGH6CC3E.js";import{DEFAULT_PICK_WORDS as t}from"../chunk-OFBZOI6W.js";import{DEFAULT_CANVAS_WORDS as c}from"../chunk-TBY3DFKS.js";import{DEFAULT_TREE_WORDS as e}from"../chunk-K56YDHYQ.js";import{DEFAULT_NODE_MENU_WORDS as m}from"../chunk-WK3AFPXY.js";import{DEFAULT_PANEL_WORDS as i}from"../chunk-KFV7N2DJ.js";import{DEFAULT_SAVE_WORDS as s}from"../chunk-H6DDIBQ4.js";import{DEFAULT_COPY_WORDS as u}from"../chunk-KRL3IUV3.js";import{DEFAULT_FIELDS_WORDS as f}from"../chunk-WRFD4EXD.js";import{DEFAULT_CHROME_WORDS as p,DEFAULT_NOTICE_WORDS as l}from"../chunk-AJSDWWJW.js";import{DEFAULT_RAIL_WORDS as h}from"../chunk-2OAZYSWJ.js";import{DEFAULT_LOCK_WORDS as j}from"../chunk-RE4LP46F.js";import{stringsContext as k}from"../chunk-MFIRYGHW.js";import{DEFAULT_DRAG_WORDS as a}from"../chunk-KAML3KQH.js";import{useContext as W,useMemo as D}from"react";import{jsx as Y}from"react/jsx-runtime";var y={notice:l,lock:j,save:s,chrome:p,rail:h,tree:e,panel:i,fields:f,pick:t,drag:a,menu:m,styleClipboard:o,copy:u,canvas:c,textStyles:n,screen:r},F=r=>"object"==typeof r&&null!==r;function K(r,o){const n={};for(const t of Object.keys(r)){const c=r[t],e=o[t];null==e?n[t]=c:F(c)?n[t]=F(e)?K(c,e):c:n[t]=typeof e==typeof c?e:c}return n}function d(r,o){return o?K(r,o):r}function v({value:r,locale:o,children:n}){const t=k(),c=W(t),e=c?.strings??y,m=o??c?.locale??"en",i=D(()=>({strings:d(e,r),locale:m}),[e,r,m]);/* @__PURE__ */
|
|
2
2
|
return Y(t.Provider,{value:i,children:n})}function H(){return W(k())?.strings??y}function J(){return W(k())?.locale??"en"}export{y as DEFAULT_EASEL_STRINGS,v as EaselStringsProvider,d as mergeEaselStrings,J as useEaselLocale,H as useEaselStrings};
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{hexReadout as e,ColourWindow as s,typedHex as t}from"../chunk-U6LJ5UKD.js";import{DEFAULT_TEXT_STYLES_WORDS as a}from"../chunk-OGH6CC3E.js";export{DEFAULT_TEXT_STYLES_WORDS}from"../chunk-OGH6CC3E.js";import"../chunk-OFBZOI6W.js";import{FieldSlider as n}from"../chunk-ZEH6QLBH.js";import{TEXT_STYLE_KINDS as l,canAddTextStyle as i,TEXT_STYLE_MAX as r,isDefaultTextStyle as o,CAMPAIGN_TEXT_STYLE_SETTINGS as d,TEXT_STYLE_SETTINGS as c,textStyleRowSize as u,describeTextStyle as m,updateTextStyle as h,textStyleCaseCss as f,TEXT_STYLE_CASES as p,addTextStyle as v,removeTextStyle as y,TEXT_STYLE_RANGES as S}from"../chunk-YHZSBL2N.js";export{CAMPAIGN_TEXT_STYLE_SETTINGS,TEXT_STYLE_CASES,TEXT_STYLE_CASE_CSS,TEXT_STYLE_DEFAULT_COUNT,TEXT_STYLE_KINDS,TEXT_STYLE_MAX,TEXT_STYLE_RANGES,TEXT_STYLE_SETTINGS,addTextStyle,canAddTextStyle,defaultTextStyles,describeTextStyle,isDefaultTextStyle,isTextStyleCase,removeTextStyle,resolveTextStyle,textStyleCaseCss,textStyleCaseOfCss,textStyleRowSize,updateTextStyle,weightWord}from"../chunk-YHZSBL2N.js";import{FieldSelect as g}from"../chunk-QAJAEWCZ.js";import"../chunk-WRFD4EXD.js";import{useWords as b}from"../chunk-MFIRYGHW.js";import{withTip as k}from"../chunk-P2VEMZH5.js";import{hsvToHex as N,Tooltip as C,ColorSwatch as x,IconButton as T}from"efficient-shell/ui";import{useState as w,useRef as E,useId as z,useEffect as O,Fragment as _}from"react";import{TrashIcon as L,ChevronIcon as A,BoldIcon as j,ItalicIcon as M,CaseLowerIcon as $,CaseCapitalizedIcon as D,CaseUpperIcon as W,CaseNormalIcon as Y}from"efficient-shell/icons/efficient";import{jsxs as I,jsx as X,Fragment as H}from"react/jsx-runtime";var B=`conic-gradient(${[0,60,120,180,240,300,0].map(e=>N({h:e,s:1,v:1})).join(", ")})`;function F({value:t,hex:a,colours:n,label:l,followsWord:i,anyWord:r,onChange:o,readOnly:d=!1}){const[c,u]=w(!1),m=E(null),h=E(null),f=z(),p=void 0!==t&&n.some(e=>e.key===t),v=void 0!==t&&!p;return O(()=>{if(!c)return;const e=m.current?.ownerDocument;if(!e)return;const s=e=>{m.current&&!m.current.contains(e.target)&&u(!1)};return e.addEventListener("click",s,!0),()=>e.removeEventListener("click",s,!0)},[c]),/* @__PURE__ */I("div",{ref:m,className:"es-ts-set","data-ts-setting":"color",children:[
|
|
2
2
|
/* @__PURE__ */I("div",{className:"es-ts-top",children:[
|
|
3
3
|
/* @__PURE__ */X("span",{className:"es-ts-sub",children:l}),
|
|
4
|
-
/* @__PURE__ */X("span",{className:"es-ts-colour-read",children:
|
|
5
|
-
/* @__PURE__ */I("div",{className:"es-ts-swatches",role:"group","aria-label":l,children:[n.map(s=>/* @__PURE__ */X(C,{content:`${s.name} · ${
|
|
6
|
-
/* @__PURE__ */X(C,{content:r,children:/* @__PURE__ */X(x,{ref:h,color:B,size:"sm",className:"es-ts-swatch es-ts-swatch--any","aria-label":r,selected:v,"aria-expanded":c,"aria-controls":c?f:void 0,disabled:d,onClick:()=>u(e=>!e)})})]}),c?/* @__PURE__ */X(
|
|
7
|
-
return X("div",{className:"es-ts",ref:Y,children:l.map(
|
|
8
|
-
return I(R,{label:A.groups[
|
|
9
|
-
return X(G,{style:
|
|
10
|
-
/* @__PURE__ */X("span",{className:"es-ts-add-word",children:A.add[
|
|
11
|
-
/* @__PURE__ */X("span",{className:"es-ts-count",children:A.count({n:l.length,max:x})})]})),_||!r?null:/* @__PURE__ */X("span",{id:`${j}-full-${
|
|
4
|
+
/* @__PURE__ */X("span",{className:"es-ts-colour-read",children:a?e(a):i})]}),
|
|
5
|
+
/* @__PURE__ */I("div",{className:"es-ts-swatches",role:"group","aria-label":l,children:[n.map(s=>/* @__PURE__ */X(C,{content:`${s.name} · ${e(s.value)}`,children:/* @__PURE__ */X(x,{color:s.value,size:"sm",className:"es-ts-swatch","aria-label":s.name,selected:t===s.key,disabled:d,onClick:()=>o(s.key)})},s.key)),
|
|
6
|
+
/* @__PURE__ */X(C,{content:r,children:/* @__PURE__ */X(x,{ref:h,color:B,size:"sm",className:"es-ts-swatch es-ts-swatch--any","aria-label":r,selected:v,"aria-expanded":c,"aria-controls":c?f:void 0,disabled:d,onClick:()=>u(e=>!e)})})]}),c?/* @__PURE__ */X(s,{id:f,value:a??"",onChange:e=>o(e),label:l,readOnly:d,onClose:()=>{u(!1),h.current?.focus()}}):null]})}function P({styles:e,onChange:s,fonts:t,colours:n=[],settings:c=d,auto:u=[],fallback:m,sample:h,openId:f,defaultOpenId:p=null,onOpenChange:S,onAdd:g,rowActions:N,onRemove:C,max:x=r,device:T="desktop",readOnly:_=!1}){const A=b("textStyles",a),j=z(),[M,$]=w(p),D=void 0!==f?f:M,W=e=>{void 0===f&&$(e),S?.(e)},Y=E(null),[B,F]=w(null);O(()=>{if(!B||!Y.current)return;const e=[...Y.current.querySelectorAll(".es-ts-item")].find(e=>e.dataset.tsId===B.id),s=e?e.querySelector(".es-ts-row"):Y.current.querySelector(`.es-ts-add[data-ts-kind="${B.kind}"]`);s?.focus(),F(null)},[B]);/* @__PURE__ */
|
|
7
|
+
return X("div",{className:"es-ts",ref:Y,children:l.map(a=>{const l=e.filter(e=>e.kind===a),r=!i(e,a,x),d=!_&&!r;/* @__PURE__ */
|
|
8
|
+
return I(R,{label:A.groups[a],children:[l.map(a=>{const l=N?.(a),i=null!=l&&!1!==l,r=Boolean(C)&&!_&&!o(a);/* @__PURE__ */
|
|
9
|
+
return X(G,{style:a,fonts:t,colours:n,settings:c,auto:u,fallback:m,sample:h,device:T,readOnly:_,open:D===a.id,onOpenChange:e=>W(e?a.id:null),onChange:t=>s(e.map(e=>e.id===t.id?t:e)),actions:r||i?/* @__PURE__ */I(H,{children:[r?k(A.remove,/* @__PURE__ */X("button",{type:"button",className:"es-ts-del","aria-label":A.removeNamed({name:a.name}),onClick:()=>(t=>{if(_||!C)return;const a=y(e,t.id,{name:A.styleName});if(!a)return;const n=e.filter(e=>e.kind===t.kind),l=n[n.indexOf(t)+1];D===t.id&&W(null),s(a.styles),C(a.removed),F({id:l?.id??null,kind:t.kind})})(a),children:/* @__PURE__ */X(L,{size:14,"aria-hidden":"true"})})):null,i?l:null]}):null},a.id)}),k(!_&&r?A.full({kind:a,max:x}):void 0,/* @__PURE__ */I("button",{type:"button",className:"es-ts-add","data-ts-kind":a,disabled:_,"aria-disabled":!(_||!r)||void 0,"aria-describedby":!_&&r?`${j}-full-${a}`:void 0,onClick:()=>{d&&(t=>{if(_)return;const a=v(e,t,{max:x,name:A.styleName,make:g});a&&s(a.styles)})(a)},children:[
|
|
10
|
+
/* @__PURE__ */X("span",{className:"es-ts-add-word",children:A.add[a]}),
|
|
11
|
+
/* @__PURE__ */X("span",{className:"es-ts-count",children:A.count({n:l.length,max:x})})]})),_||!r?null:/* @__PURE__ */X("span",{id:`${j}-full-${a}`,className:"es-vh",children:A.full({kind:a,max:x})})]},a)})})}function R({label:e,children:s}){const t=z();/* @__PURE__ */
|
|
12
12
|
return I("section",{className:"es-ts-section","aria-labelledby":t,children:[
|
|
13
|
-
/* @__PURE__ */X("div",{className:"es-ts-group",id:t,children:e}),s]})}function G({style:
|
|
13
|
+
/* @__PURE__ */X("div",{className:"es-ts-group",id:t,children:e}),s]})}function G({style:e,fonts:s,colours:t=[],settings:n=d,auto:l=[],fallback:i,sample:r,open:o,onOpenChange:f,onChange:p,actions:v,device:y="desktop",readOnly:S=!1}){const g=b("textStyles",a),k=`${z()}-open-${e.id}`,N=new Set(l),C=c.filter(e=>n.includes(e)),x={...i?.(e)??{},...e.values},T="phone"===y,w=T&&void 0!==e.values.sizePhone?{...x,size:e.values.sizePhone}:x,E=s.find(e=>e.value===x.font),O={fontFamily:E?.family,fontSize:`${u(w.size??16)}px`,fontWeight:x.weight,fontStyle:x.italic?"italic":void 0};/* @__PURE__ */
|
|
14
14
|
return I(_,{children:[
|
|
15
|
-
/* @__PURE__ */I("div",{className:"es-ts-item","data-ts-id":
|
|
15
|
+
/* @__PURE__ */I("div",{className:"es-ts-item","data-ts-id":e.id,children:[
|
|
16
16
|
/* @__PURE__ */I("button",{type:"button",className:"es-ts-row","aria-expanded":o,"aria-controls":o?k:void 0,onClick:()=>f(!o),children:[
|
|
17
17
|
/* @__PURE__ */X("span",{className:"es-ts-chev","aria-hidden":"true",children:/* @__PURE__ */X(A,{size:12})}),
|
|
18
|
-
/* @__PURE__ */X("span",{className:"es-ts-name",style:O,children:
|
|
19
|
-
/* @__PURE__ */X("span",{className:"es-ts-meta",children:m(w,
|
|
20
|
-
return X("div",{className:"es-ts-slider","data-ts-setting":e,children:/* @__PURE__ */X(
|
|
18
|
+
/* @__PURE__ */X("span",{className:"es-ts-name",style:O,children:e.name}),
|
|
19
|
+
/* @__PURE__ */X("span",{className:"es-ts-meta",children:m(w,s,g,{autoSize:N.has("size")&&w===x&&void 0===e.values.size})})]}),v?/* @__PURE__ */X("div",{className:"es-ts-actions",children:v}):null]}),o?/* @__PURE__ */X("div",{className:"es-ts-open",id:k,children:/* @__PURE__ */X(Z,{style:e,values:x,fonts:s,colours:t,settings:C,autoSet:N,sample:r??g.sample,words:g,phone:T,readOnly:S,set:s=>p(h([e],e.id,s)[0])})}):null]})}var U={none:Y,upper:W,capitalize:D,lower:$};function Z({style:e,values:s,fonts:a,colours:l,settings:i,autoSet:r,sample:o,words:d,phone:c,readOnly:u,set:m}){const h=e.values,p=a.find(e=>e.value===s.font),v=function(e,s){return e?s.find(s=>s.key===e)?.value??t(e)??void 0:void 0}(s.color,l),y=e=>"largestSize"===e||r.has(e),g=e=>y(e)?h[e]:s[e],b=g("size"),N=c&&void 0!==h.sizePhone?h.sizePhone:b,C=g("lineSpacing"),x=g("letterSpacing"),w=y("letterCase")?h.letterCase:s.letterCase,E={fontFamily:p?.family,fontSize:void 0===N?void 0:`${N}px`,fontWeight:s.weight,fontStyle:s.italic?"italic":void 0,lineHeight:void 0===C?void 0:String(C/100),letterSpacing:void 0===x?void 0:`${x}px`,color:v,textTransform:f(w)},z=e=>{const t=S[e],a=y(e);/* @__PURE__ */
|
|
20
|
+
return X("div",{className:"es-ts-slider","data-ts-setting":e,children:/* @__PURE__ */X(n,{label:d.settings[e],value:h[e],onChange:s=>m({[e]:s}),min:t.min,max:t.max,step:t.step,shiftStep:t.shiftStep,sliderMin:t.sliderMin,sliderMax:t.sliderMax,unit:t.unit||void 0,styleValue:a?void 0:s[e],auto:a?d.auto:void 0,readOnly:u})},e)};/* @__PURE__ */
|
|
21
21
|
return I(H,{children:[
|
|
22
|
-
/* @__PURE__ */X("div",{className:"es-ts-preview",style:E,"aria-label":d.preview,children:o}),i.map(
|
|
23
|
-
return X(q,{value:h.font,fonts:a,words:d,readOnly:u,set:m},
|
|
24
|
-
return X(K,{value:h.color,hex:v,colours:l,words:d,readOnly:u,set:m},
|
|
25
|
-
return I("div",{className:"es-ts-set","data-ts-setting":
|
|
22
|
+
/* @__PURE__ */X("div",{className:"es-ts-preview",style:E,"aria-label":d.preview,children:o}),i.map(t=>{switch(t){case"font":/* @__PURE__ */
|
|
23
|
+
return X(q,{value:h.font,fonts:a,words:d,readOnly:u,set:m},t);case"color":/* @__PURE__ */
|
|
24
|
+
return X(K,{value:h.color,hex:v,colours:l,words:d,readOnly:u,set:m},t);case"emphasis":{const e=(s.weight??400)>=600,a=!1!==p?.italic;/* @__PURE__ */
|
|
25
|
+
return I("div",{className:"es-ts-set","data-ts-setting":t,children:[
|
|
26
26
|
/* @__PURE__ */X("span",{className:"es-ts-sub",children:d.settings.emphasis}),
|
|
27
|
-
/* @__PURE__ */I("div",{className:"es-ts-icons",children:[k(d.bold,/* @__PURE__ */X(T,{className:"es-ts-icon","aria-label":d.bold,"aria-pressed":e,disabled:u,onClick:()=>m({weight:e?400:700}),children:/* @__PURE__ */X(j,{size:16})})),u||
|
|
28
|
-
return X(V,{value:h.letterCase??
|
|
29
|
-
return X("div",{className:"es-ts-slider","data-ts-setting":"size","data-ts-device":"phone",children:/* @__PURE__ */X(
|
|
27
|
+
/* @__PURE__ */I("div",{className:"es-ts-icons",children:[k(d.bold,/* @__PURE__ */X(T,{className:"es-ts-icon","aria-label":d.bold,"aria-pressed":e,disabled:u,onClick:()=>m({weight:e?400:700}),children:/* @__PURE__ */X(j,{size:16})})),u||a?k(d.italic,/* @__PURE__ */X(T,{className:"es-ts-icon","aria-label":d.italic,"aria-pressed":Boolean(s.italic),disabled:u,onClick:()=>m({italic:!s.italic||void 0}),children:/* @__PURE__ */X(M,{size:16})})):/* @__PURE__ */X(T,{className:"es-ts-icon","aria-label":d.italic,"aria-pressed":Boolean(s.italic),"aria-disabled":!0,disabledReason:d.italicMissing,children:/* @__PURE__ */X(M,{size:16})})]})]},t)}case"letterCase":/* @__PURE__ */
|
|
28
|
+
return X(V,{value:h.letterCase??s.letterCase,auto:y("letterCase"),words:d,readOnly:u,set:m},t);case"largestSize":return"heading"===e.kind?z(t):null;case"size":return c?(()=>{const e=S.size;/* @__PURE__ */
|
|
29
|
+
return X("div",{className:"es-ts-slider","data-ts-setting":"size","data-ts-device":"phone",children:/* @__PURE__ */X(n,{label:d.settings.size,value:h.sizePhone,onChange:e=>m({sizePhone:e}),min:e.min,max:e.max,step:e.step,shiftStep:e.shiftStep,sliderMin:e.sliderMin,sliderMax:e.sliderMax,unit:e.unit||void 0,styleValue:b,readOnly:u})},"size")})():z(t);default:return z(t)}})]})}function q({value:e,fonts:s,words:t,readOnly:a,set:n}){const l=z();/* @__PURE__ */
|
|
30
30
|
return I("div",{className:"es-ts-set","data-ts-setting":"font",children:[
|
|
31
31
|
/* @__PURE__ */X("span",{className:"es-ts-sub",id:l,children:t.settings.font}),
|
|
32
32
|
/* @__PURE__ */X(g,{value:e,options:s.map(e=>({label:e.label,value:e.value})),onChange:e=>n({font:e}),ariaLabelledBy:l,readOnly:a})]})}function K({value:e,hex:s,colours:t,words:a,readOnly:n,set:l}){/* @__PURE__ */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-easel",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.1.0",
|
|
4
4
|
"description": "Efficient Easel: the EFFICIENT editors' shared engine and chrome: the saved document as pure functions, the published renderer, and the editor frame, panels, Layers tree, text grammar and type-in-place box. Published as editor-shell up to 0.66.0 and as efficient-editor up to 0.95.0.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Efficient Pty Ltd",
|