efficient-easel 26.5.0 → 26.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/{chunk-XC4PINYS.js → chunk-2QXMDK67.js} +8 -8
- package/dist/{chunk-XVQNVPIK.js → chunk-3JIBSQZI.js} +40 -40
- package/dist/{chunk-LKP5V3GT.js → chunk-A2B6FLZP.js} +1 -1
- package/dist/chunk-BAI7MIH4.js +1 -0
- package/dist/{chunk-OKJ6KH24.js → chunk-CVS3RPO6.js} +1 -1
- package/dist/{chunk-UJU42JM4.js → chunk-EEIDFHOG.js} +11 -11
- package/dist/{chunk-YAFMYW4J.js → chunk-EVYIDHCK.js} +18 -15
- package/dist/chunk-EZXQJN6V.js +4 -0
- package/dist/{chunk-R76RCEEC.js → chunk-GQXH7DQV.js} +1 -1
- package/dist/{chunk-2C2IUWBH.js → chunk-M42IJ4HT.js} +4 -4
- package/dist/chunk-ODHJRBJV.js +5 -0
- package/dist/{chunk-Y5M64LEB.js → chunk-QYSNJDMW.js} +1 -1
- package/dist/chunk-TGFPW4YU.js +1 -0
- package/dist/{chunk-UQAN4BIP.js → chunk-YBDSG4BV.js} +1 -1
- package/dist/draw/index.d.ts +1 -1
- package/dist/draw/index.js +1 -1
- package/dist/easel/index.js +1 -1
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/ScreenChrome.js +1 -1
- package/dist/screen/components/ScreenMount.js +1 -1
- package/dist/screen/components/ScreenStoreProvider.js +1 -1
- package/dist/screen/components/SectionScreenShell.js +15 -15
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/content/style-keys.d.ts +13 -1
- package/dist/screen/lib/content/style-keys.js +1 -1
- package/dist/screen/lib/document/block-set-host.js +1 -1
- package/dist/screen/lib/document/block-size-fields.js +1 -1
- package/dist/screen/lib/document/box-fields.js +1 -1
- package/dist/screen/lib/document/button-fields.d.ts +4 -0
- package/dist/screen/lib/document/button-fields.js +1 -1
- package/dist/screen/lib/document/image-fields.js +4 -4
- package/dist/screen/lib/document/style-fields.d.ts +5 -0
- package/dist/screen/lib/document/style-fields.js +1 -1
- package/dist/screen/lib/document/use-section-ops.js +1 -1
- package/dist/screen/lib/key-scope.js +1 -1
- package/dist/screen/lib/screen-parts.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-4O4FSRJL.js +0 -1
- package/dist/chunk-BTQ3FJKT.js +0 -1
- package/dist/chunk-FWPKYUGM.js +0 -5
- package/dist/chunk-SS2NY7PP.js +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ScreenStoreProvider as default}from"../../chunk-
|
|
1
|
+
export{ScreenStoreProvider as default}from"../../chunk-GQXH7DQV.js";import"../../chunk-ODHJRBJV.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-LX23TCTP.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-EVYIDHCK.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-C7IFWSUA.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-FM6JO4WF.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-K53PQAMP.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-HZSZT3BE.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-DX3VILZ3.js";import"../../chunk-JACEEVVF.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-3XECMGXX.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import{AddBlockRow as e}from"../../chunk-
|
|
2
|
-
return H(
|
|
3
|
-
return H(
|
|
4
|
-
/* @__PURE__ */L(
|
|
5
|
-
return H("div",{ref:
|
|
6
|
-
/* @__PURE__ */L("div",{className:"sf-section-bar",children:/* @__PURE__ */L(
|
|
7
|
-
/* @__PURE__ */H("div",{className:"sf-body",children:[
|
|
8
|
-
/* @__PURE__ */L("div",{className:"sf-panel-head",children:/* @__PURE__ */L(
|
|
9
|
-
/* @__PURE__ */L(
|
|
10
|
-
/* @__PURE__ */L(
|
|
11
|
-
return H(
|
|
12
|
-
/* @__PURE__ */L(
|
|
1
|
+
import{AddBlockRow as e}from"../../chunk-QYSNJDMW.js";import{scrollPreviewToSection as n,gotoPreviewSlide as o}from"../../chunk-LUOY3A3Q.js";import{useEaselUndoKeys as r}from"../../chunk-CVS3RPO6.js";import{SlotChildActionsProvider as t}from"../../chunk-KCBEE2MC.js";import{DEFAULT_PANEL_W as s}from"../../chunk-6EDVZBUO.js";import{usePartBridge as i}from"../../chunk-A2B6FLZP.js";import{useSectionOps as c}from"../../chunk-YBDSG4BV.js";import{useScreenDocument as p}from"../../chunk-BYONFJVQ.js";import"../../chunk-QZJKWKGH.js";import"../../chunk-ERR437B5.js";import"../../chunk-JIP5JNRB.js";import"../../chunk-GR3XRILS.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-6ATIYLUL.js";import"../../chunk-KO47WAWR.js";import"../../chunk-NQW6XCAY.js";import"../../chunk-LOMEH6DG.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-RUQOIQWI.js";import{SELECTION_MODE as l,useScreenPinned as m,useScreenCanvasFrame as d,useScreenInspectorPanel as u,useScreenPickFollowsSelection as a,sameInspectorMode as h,useStandaloneScreenBridges as k,useScreenBlockLook as j,useScreenBlockRules as f,isSelectionMode as S,shownChildSlotsOf as N}from"../../chunk-ODHJRBJV.js";import{MediaPopup as y}from"../../chunk-T2RINM7R.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-YM4UEGBV.js";import"../../chunk-SNF5764Q.js";import"../../chunk-LX23TCTP.js";import{DEFAULT_SCREEN_WORDS as A}from"../../chunk-Q3VAJMXS.js";import{slotChildRowName as C}from"../../chunk-5NHQ452C.js";import"../../chunk-AJ2SUSET.js";import"../../chunk-6UAEFOJ4.js";import"../../chunk-ANPOR6EY.js";import"../../chunk-R4AUZVA3.js";import{slotFieldsOf as E,nestsInTree as R}from"../../chunk-TCAAOYQY.js";import{useEasel as x}from"../../chunk-EVYIDHCK.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-C7IFWSUA.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-ZEH6QLBH.js";import{LayersTree as P,Subtree as B,TreeRow as F,TreeRowAction as Q,TreeSeam as Y}from"../../chunk-WHS6Y55E.js";import"../../chunk-FM6JO4WF.js";import{DEFAULT_TREE_WORDS as O}from"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-K53PQAMP.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-NDRZP6YR.js";import{DEFAULT_SAVE_WORDS as g,saveIndicator as D}from"../../chunk-H6DDIBQ4.js";import{SaveState as I,panelWidthVars as V}from"../../chunk-VBEVZZTV.js";import"../../chunk-MJM6SFD3.js";import"../../chunk-AJSDWWJW.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-YYD257TD.js";import"../../chunk-RE4LP46F.js";import"../../chunk-HZSZT3BE.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-DX3VILZ3.js";import"../../chunk-JACEEVVF.js";import{useWords as W}from"../../chunk-MFIRYGHW.js";import"../../chunk-SQTVXE5D.js";import"../../chunk-TQ5Y6S2X.js";import{useTreeDrag as v}from"../../chunk-3XECMGXX.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import{zoneKey as M,parseZoneKey as T}from"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";import"../../chunk-467WWV4I.js";import"../../chunk-TIAWIOGD.js";import"../../chunk-MGVI67QV.js";import{useState as b,useRef as z,useEffect as J,useCallback as w,Fragment as Z}from"react";import{Tooltip as K}from"efficient-shell/ui";import{TrashIcon as X}from"efficient-shell/icons/efficient";import{jsxs as H,jsx as L,Fragment as G}from"react/jsx-runtime";var U=e=>n=>{n.target.closest("button, input")||e()},$={rowClick:U};function q(){const{saveState:q,readOnly:_,readOnlyReason:ee=null}=p(),ne=c(),{appState:oe,selectedItem:re,config:te}=x(e=>e),[se,ie]=b(l),ce=W("screen",A),pe=W("tree",O),le=W("save",g),{first:me,last:de,panelOf:ue}=m(),ae=ue(me),he=d(),ke=u(),je=oe.data.content?.[0]??null,fe=je?.props.id??null,Se=je?.type===me,Ne=je?.type===de,ye=z(null),Ae=z(null);r(Ae),a(re?.props.id),J(()=>{fe&&ye.current!==fe&&(ye.current=fe,Se?ie(ae??l):re||ne.select({index:0}))},[fe,re,ne,Se]);const Ce=w(e=>ie(n=>h(n,e)?n:e),[]),Ee=k({kind:se.kind,mode:se,open:Ce,show:e=>ie(e),reveal:()=>{},select:(e,n)=>{ie(e=>h(e,n)?e:n),ne.select(e)}}),{selectNode:Re}=i({mode:se,setMode:ie,onOpenPart:n}),xe=j(),{labelAtLevel:Pe,Icon:Be}=xe,{canAddTo:Fe}=f(),Qe=e=>Pe(e,"block",te.components[e]?.label??e),Ye=e=>Pe(e,"section",Qe(e)),Oe=!Se&&S(se)&&re?.props.id===fe,ge=je?Fe(je.type)?.spec??null:null,De=je&&ge?`${je.props.id}:${ge.slot}`:null,Ie=je&&ge&&Array.isArray(je.props[ge.slot])?je.props[ge.slot]:[],Ve=e=>C(e,Qe,xe.plainText),We=(e,r)=>{je&&ge&&De&&(ie(l),ge.slider?(o(String(je.props.id),e),ne.select({index:e,zone:De}),n(String(je.props.id))):(ne.select({index:e,zone:De}),n(r)))},ve=()=>{if(!je||!ge||!De)return;const e=Ie.length;ne.insertComponent(De,ge.childType,e),ie(l),ge.slider?requestAnimationFrame(()=>{o(String(je.props.id),e),ne.select({index:e,zone:De})}):ne.select({index:e,zone:De})},Me=e=>E(te,e),Te=e=>{const{parentId:n,slot:o}=T(e),r=e=>{if(!e)return null;if(String(e.props.id)===n)return e;for(const n of Me(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(je)?.props[o];return Array.isArray(t)?t.length:0},be=(e,n,o)=>{const r=Math.min(Math.max(o,0),Te(e)),t=n<r?r-1:r;t!==n&&(ne.reorderComponent(e,n,t),ie(l),ne.select({index:t,zone:e}))},ze=v({keyOf:e=>e.id,readOnly:Boolean(_),canDrop:(e,n)=>M(n)===e.zone&&n.index>=0&&n.index<=Te(e.zone),onDrop:(e,n)=>be(e.zone,e.index,n.index),onStep:(e,n)=>be(e.zone,e.index,n<0?e.index-1:e.index+2)}),Je=(e,n)=>/* @__PURE__ */L(Y,{..._?{}:ze.seam({place:{...T(e),index:n}})},`seam:${e}:${n}`),we=e=>xe.blockRowName(e,Qe),Ze=(e,o,r)=>{ie(l),ne.select({index:o,zone:e}),n(r)},Ke=(e,n,o)=>{ne.insertComponent(e,n,o),ie(l),ne.select({index:o,zone:e})},Xe=(n,o,r)=>/* @__PURE__ */L(e,{choices:r,onPick:e=>Ke(n,e,o)}),He=(e,n)=>{const o=N(te,e);const r=Fe(e.type,void 0,void 0,{id:String(e.props.id??""),data:oe.data}),t=r?.choices??null,s="footer"===r?.source?we:Ve;/* @__PURE__ */
|
|
2
|
+
return H(G,{children:[o.map(({child:e,zone:o,index:r})=>{const t=re?.props.id===e.props.id,i=R(te,e.type,n),c=s(e),p=String(e.props.id),m=()=>Ze(o,r,p),{rowProps:d,...u}=ze.row({item:{id:p,zone:o,index:r},place:{...T(o),index:r}},{onClick:U(m)});/* @__PURE__ */
|
|
3
|
+
return H(Z,{children:[0===r&&Je(o,0),
|
|
4
|
+
/* @__PURE__ */L(F,{words:pe,icon:/* @__PURE__ */L(Be,{type:e.type,size:13}),name:c,selected:t,onSelect:m,...u,actions:/* @__PURE__ */L(Q,{kind:"delete",label:ce.deleteNamed({name:c}),onClick:()=>{return e=o,n=r,ne.removeComponent(e,n),ie(l),void ne.select(null);var e,n},children:/* @__PURE__ */L(X,{size:13})}),rowProps:d}),i&&/* @__PURE__ */L(B,{children:He(e,n+1)}),Je(o,r+1)]},String(e.props.id??`${o}-${r}`))}),r&&t?Xe(`${e.props.id}:${r.slot}`,o.length,t):null]})},Le="HeroSingle"===je?.type,Ge=Boolean(je)&&(Boolean(Fe(je.type))||Me(je.type).length>0),Ue=Boolean(je)&&(Boolean(ge)||Ne||Se||Le||Ge);/* @__PURE__ */
|
|
5
|
+
return H("div",{ref:Ae,className:"sf-editor es-editor",style:V(s),children:[
|
|
6
|
+
/* @__PURE__ */L("div",{className:"sf-section-bar",children:/* @__PURE__ */L(I,null!==ee?{tone:"off",label:ee,role:"status"}:{...D(q,le),role:"status"})}),
|
|
7
|
+
/* @__PURE__ */H("div",{className:"sf-body",children:[Ue&&je&&/* @__PURE__ */H("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
|
|
8
|
+
/* @__PURE__ */L("div",{className:"sf-panel-head",children:/* @__PURE__ */L(K,{content:Se?ce.headerSettings:ce.sectionSettings({name:Ye(je.type)}),side:"bottom",children:/* @__PURE__ */L("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(Oe?"is-selected":""),"aria-pressed":Oe,onClick:()=>{Se?ie(ae??l):(ie(l),ne.select({index:0}))},children:Ye(je.type)})})}),
|
|
9
|
+
/* @__PURE__ */L(P,{className:"sf-tree sf-scroll",rootProps:ze.rootProps(),words:pe,children:/* @__PURE__ */L(B,{children:Se?
|
|
10
|
+
/* @__PURE__ */L(F,{words:pe,icon:/* @__PURE__ */L(Be,{type:"header",size:13}),name:ce.headerSettings,selected:se.kind===ae?.kind,onSelect:()=>ie(ae??l),rowProps:{onClick:U(()=>ie(ae??l))}}):ge?/* @__PURE__ */H(G,{children:[Ie.map((e,n)=>{const o=re?.props.id===e.props.id,r=Ve(e),t=String(e.props.id),s=()=>We(n,t),{rowProps:i,...c}=ze.row({item:{id:t,zone:De,index:n},place:{...T(De),index:n}},{onClick:U(s)});/* @__PURE__ */
|
|
11
|
+
return H(Z,{children:[0===n&&Je(De,0),
|
|
12
|
+
/* @__PURE__ */L(F,{words:pe,icon:/* @__PURE__ */L(Be,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */L(Q,{kind:"delete",label:ce.deleteNamed({name:r}),onClick:()=>{return e=n,void(De&&(ne.removeComponent(De,e),ie(l),ne.select(null)));var e},children:/* @__PURE__ */L(X,{size:13})}),rowProps:i}),Je(De,n+1)]},String(e.props.id??n))}),
|
|
13
13
|
/* @__PURE__ */H("button",{type:"button",className:"sf-add-card",onClick:ve,children:[
|
|
14
|
-
/* @__PURE__ */L("span",{className:"sf-plus sf-plus--sm",children:"+"}),
|
|
14
|
+
/* @__PURE__ */L("span",{className:"sf-plus sf-plus--sm",children:"+"}),ge.addLabel]}),fe?Ee.partRows?.(je,$):null]}):He(je,1)})})]}),
|
|
15
15
|
/* @__PURE__ */L("div",{className:"sf-center",children:/* @__PURE__ */L("div",{className:"sf-preview-host",children:/* @__PURE__ */L(he,{})})}),
|
|
16
|
-
/* @__PURE__ */L(t,{value:{selectChild:(e,n,o,r)=>"section"===
|
|
17
|
-
/* @__PURE__ */L(
|
|
16
|
+
/* @__PURE__ */L(t,{value:{selectChild:(e,n,o,r)=>"section"===Fe(r)?.source?We(n,o):Ze(e,n,o),addChild:(e,n,o,r,t)=>"section"===Fe(t)?.source?ve():Ke(`${e}:${n}`,o,r),childRowName:Ve,blockRowName:we},children:/* @__PURE__ */L(ke,{mode:se,onOpenWebsiteSettings:Ee.openSettings??(()=>{}),onSelectNode:Re,hideNodeActions:!0})})]}),
|
|
17
|
+
/* @__PURE__ */L(y,{})]})}export{q as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{usePartBridge}from"../../chunk-
|
|
1
|
+
export{usePartBridge}from"../../chunk-A2B6FLZP.js";import"../../chunk-YBDSG4BV.js";import"../../chunk-ODHJRBJV.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-LX23TCTP.js";import"../../chunk-R4AUZVA3.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-EVYIDHCK.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-C7IFWSUA.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-FM6JO4WF.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-K53PQAMP.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-HZSZT3BE.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-DX3VILZ3.js";import"../../chunk-JACEEVVF.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-3XECMGXX.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";import"../../chunk-467WWV4I.js";import"../../chunk-TIAWIOGD.js";import"../../chunk-MGVI67QV.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-M42IJ4HT.js";import"../chunk-GXQCZJOP.js";export{ScreenStoreProvider}from"../chunk-GQXH7DQV.js";import"../chunk-3JIBSQZI.js";import"../chunk-OXZDSOZV.js";import"../chunk-7OCEPOEJ.js";import"../chunk-JYVQ62TL.js";import"../chunk-UMBNBCL4.js";import"../chunk-5XL2RXFU.js";import"../chunk-3QB2ZQXK.js";import"../chunk-7GGNFLHT.js";import"../chunk-22I55W37.js";import"../chunk-LUOY3A3Q.js";import"../chunk-CVS3RPO6.js";import"../chunk-KCBEE2MC.js";import"../chunk-6EDVZBUO.js";import"../chunk-A2B6FLZP.js";import"../chunk-YBDSG4BV.js";import"../chunk-TOEJCZUO.js";import"../chunk-PVBDKBJB.js";import"../chunk-RKTF5XLP.js";import"../chunk-BYONFJVQ.js";import"../chunk-QZJKWKGH.js";import"../chunk-ERR437B5.js";import"../chunk-JIP5JNRB.js";import"../chunk-GR3XRILS.js";export{NO_DOCUMENT_ADDRESSING}from"../chunk-RLBXE4EU.js";import"../chunk-6ATIYLUL.js";import"../chunk-KO47WAWR.js";import"../chunk-NQW6XCAY.js";import"../chunk-LOMEH6DG.js";import"../chunk-5545A3PC.js";import"../chunk-2QXMDK67.js";import"../chunk-GDO4QJ4G.js";import"../chunk-IZGFJWH4.js";import"../chunk-N7E6264U.js";import"../chunk-N3MJOHAG.js";import"../chunk-SBVIW3KJ.js";import"../chunk-UMDQ6CLQ.js";import"../chunk-KCOBHPN6.js";import"../chunk-RUQOIQWI.js";export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSelectionMode,isSlotMode,sameInspectorMode,screenSlotsOf,shownChildSlotsOf,shownSlotFieldsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../chunk-ODHJRBJV.js";import"../chunk-T2RINM7R.js";import"../chunk-NCXYC7WI.js";import"../chunk-STQDOTHF.js";export{EaselSessionProvider,useEaselSession}from"../chunk-YM4UEGBV.js";export{EFFICIENT_BACKEND,activateEaselSession,backendOf,createEaselSession,currentEaselSession,deactivateEaselSession,efficientClientOpen,isEfficientBackend,provideDefaultBackend,resetAmbientEaselSession,sessionRegistry,setSessionBridgedSite,setSessionDocumentSite}from"../chunk-SNF5764Q.js";export{DETACHED_EASEL_HOST,EaselHostContext,EaselHostProvider,FIELD_DESCRIPTION_MARKER,createEaselHost,describedAs,useEaselHost,useHostEscape}from"../chunk-LX23TCTP.js";import"../chunk-XFYFKITX.js";import"../chunk-Q3VAJMXS.js";import"../chunk-CWELHADJ.js";import"../chunk-6WY6ZXJG.js";import"../chunk-5NHQ452C.js";import"../chunk-AJ2SUSET.js";import"../chunk-6UAEFOJ4.js";import"../chunk-ANPOR6EY.js";import"../chunk-R4AUZVA3.js";import"../chunk-TCAAOYQY.js";import"../chunk-EVYIDHCK.js";import"../chunk-JQQFB7EZ.js";import"../chunk-TBY3DFKS.js";import"../chunk-C7IFWSUA.js";import"../chunk-BPXEFVSQ.js";import"../chunk-YCSZAP7T.js";import"../chunk-ZEH6QLBH.js";import"../chunk-WHS6Y55E.js";import"../chunk-FM6JO4WF.js";import"../chunk-K56YDHYQ.js";import"../chunk-56ID6FKZ.js";import"../chunk-K53PQAMP.js";import"../chunk-ZKY45F5G.js";import"../chunk-FIVU2COQ.js";import"../chunk-P5VYGWYO.js";import"../chunk-WK3AFPXY.js";import"../chunk-QTHQPJWA.js";import"../chunk-NDRZP6YR.js";import"../chunk-H6DDIBQ4.js";import"../chunk-VBEVZZTV.js";import"../chunk-MJM6SFD3.js";import"../chunk-AJSDWWJW.js";import"../chunk-2OAZYSWJ.js";import"../chunk-YYD257TD.js";import"../chunk-RE4LP46F.js";import"../chunk-HZSZT3BE.js";import"../chunk-PMRN5Z3T.js";import"../chunk-Y2T3JX7K.js";import"../chunk-KFWNGPW3.js";import"../chunk-MIX7EGRG.js";import"../chunk-DX3VILZ3.js";import"../chunk-JACEEVVF.js";import"../chunk-MFIRYGHW.js";import"../chunk-SQTVXE5D.js";import"../chunk-TQ5Y6S2X.js";import"../chunk-3XECMGXX.js";import"../chunk-P2VEMZH5.js";import"../chunk-TOKMFZPB.js";import"../chunk-FR7EEKFF.js";import"../chunk-7UFKEX72.js";import"../chunk-EUFDQ4KL.js";import"../chunk-KXM6YRG2.js";import"../chunk-BSPCSC45.js";import"../chunk-467WWV4I.js";import"../chunk-TIAWIOGD.js";import"../chunk-MGVI67QV.js";
|
|
@@ -31,5 +31,17 @@ declare const BUTTON_PAD_KEYS: {
|
|
|
31
31
|
declare const CORNER_SIDES: readonly ["tl", "tr", "br", "bl"];
|
|
32
32
|
/** One corner. */
|
|
33
33
|
type CornerSide = (typeof CORNER_SIDES)[number];
|
|
34
|
+
/**
|
|
35
|
+
* A stored corner set, or `null` when none is stored.
|
|
36
|
+
*
|
|
37
|
+
* `null` means all four: every node that predates a corner row stores nothing
|
|
38
|
+
* and draws all four. An empty array is the merchant switching every corner
|
|
39
|
+
* off, which is square. A set comes back in `border-radius` order (TL, TR, BR,
|
|
40
|
+
* BL), known corners only, once each, whatever order it was stored in.
|
|
41
|
+
*/
|
|
42
|
+
declare function normalizeCornerSides(value: unknown): CornerSide[] | null;
|
|
43
|
+
/** `true` when a stored set switches at least one corner off: the only case
|
|
44
|
+
* that draws differently from all four. */
|
|
45
|
+
declare function hasCornerSubset(value: unknown): boolean;
|
|
34
46
|
|
|
35
|
-
export { BUTTON_PAD_KEYS, BUTTON_STYLE_KEYS, CORNER_SIDES, type CornerSide };
|
|
47
|
+
export { BUTTON_PAD_KEYS, BUTTON_STYLE_KEYS, CORNER_SIDES, type CornerSide, hasCornerSubset, normalizeCornerSides };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{BUTTON_PAD_KEYS,BUTTON_STYLE_KEYS,CORNER_SIDES}from"../../../chunk-
|
|
1
|
+
export{BUTTON_PAD_KEYS,BUTTON_STYLE_KEYS,CORNER_SIDES,hasCornerSubset,normalizeCornerSides}from"../../../chunk-BAI7MIH4.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{buttonFieldSet as e}from"../../../chunk-
|
|
1
|
+
import{buttonFieldSet as e}from"../../../chunk-TGFPW4YU.js";import"../../../chunk-EZXQJN6V.js";import{boxFieldSet as o}from"../../../chunk-EEIDFHOG.js";import"../../../chunk-CLAADE4J.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-Q3VAJMXS.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-BAI7MIH4.js";import{phoneKey as t}from"../../../chunk-E52W3M5I.js";import{foldMetaOf as n}from"../../../chunk-ANPOR6EY.js";import"../../../chunk-EVYIDHCK.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-FM6JO4WF.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";function s(e){return Object.keys(e).filter(o=>{return t=e[o],!(null!==n(t));var t})}function r(e,o){const t=o.off??{},s=o.keys??{};for(const[e,o]of Object.entries(t))if(!o.trim())throw new Error(`blockSetFor: off row "${e}" needs a reason.`);for(const o of[...Object.keys(t),...Object.keys(s)]){if(!Object.hasOwn(e,o))throw new Error(`blockSetFor: the set has no row "${o}".`);if(Object.hasOwn(t,o)&&Object.hasOwn(s,o))throw new Error(`blockSetFor: row "${o}" is both off and renamed.`)}const r={};let i=[];for(const[o,c]of Object.entries(e)){const a=n(c);if(a){i=i.filter(([,e])=>n(e).level<a.level),i.push([o,c]);continue}if(Object.hasOwn(t,o))continue;for(const[e,o]of i)r[e]=o;i=[];const u=Object.hasOwn(s,o)?s[o]:o;if(Object.hasOwn(r,u)||u!==o&&Object.hasOwn(e,u))throw new Error(`blockSetFor: renamed key "${u}" is already a row.`);r[u]=c}return r}function i(e){const o=e.build();r(o,e.email),r(o,e.website);const t=s(o),n=e=>new Set(Object.keys(e.off??{})),i=n(e.email),c=n(e.website),a=[];for(const o of t)i.has(o)&&!c.has(o)&&a.push({row:o,only:"website",reason:e.email.off[o]}),c.has(o)&&!i.has(o)&&a.push({row:o,only:"email",reason:e.website.off[o]});return a}var c=["button","image","box","divider","logo","text","section","social"],a={useFill:()=>"",useText:()=>"",useBorder:()=>({width:0,color:""}),useCorners:()=>0},u={button:{build:()=>e({follows:a,padding:{fallback:{}}}),email:{editor:"email"},website:{editor:"website"}},box:{build:()=>o(),email:{editor:"email",keys:{gap:"itemGap"},off:Object.fromEntries(["sectionPaddingTop","sectionPaddingRight","sectionPaddingBottom","sectionPaddingLeft"].map(e=>[t(e),"email: a Banner Box draws in the desktop view only (admin inBannerFields)"]))},website:{editor:"website"}}},h={button:"the set is in easel; admin (A-B) and web-builder (W-B) still build their own rows (plan group 1)",image:"no easel set yet (plan group 2)",box:"the set is in easel and the email Banner Box imports it; the website Flex builds its own rows (plan group 3)",divider:"no easel set yet (plan group 4)",logo:"no easel set yet (plan group 5)",text:"no easel set yet (plan group 6)",section:"no easel set yet (plan group 7)",social:"no easel set yet (plan group 7)"};export{c as BLOCK_KINDS,h as BLOCK_SETS_STILL_TWO_COPIES,u as BLOCK_SET_PAIRS,i as blockSetDifferences,r as blockSetFor,s as blockSetRowKeys};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{noGlyph as t,boxFieldBuilders as i,PHONE_KEY_ACCESS as n,group as o,phoneTwinFields as r}from"../../../chunk-
|
|
1
|
+
import{noGlyph as t,boxFieldBuilders as i,PHONE_KEY_ACCESS as n,group as o,phoneTwinFields as r}from"../../../chunk-EEIDFHOG.js";import"../../../chunk-CLAADE4J.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-Q3VAJMXS.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import{BLOCK_WIDTH_LIMIT as h,BLOCK_FIXED_WIDTH as m,BLOCK_WIDTH_FIT_POINTS as e,BLOCK_WIDTH_FIT_DEFAULT as s,TEXT_FIT_MIN_FONT as c,TEXT_FIT_POINTS as p}from"../../../chunk-X3EMJ2EX.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-EVYIDHCK.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-FM6JO4WF.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";import{WidthIcon as u,TextLinesIcon as k}from"efficient-shell/icons/efficient";import{jsx as j}from"react/jsx-runtime";var F=t("a value or limit row under the Width and text-fit choices; drawn bare in the approved design (owner 2026-10-29, c25 row 4); no shell glyph names a min, max or fixed width");function d(t={}){const d=i(t.say),a=t.phone??n,E=(t,i)=>r(t,i,a),x=(t,i,n,o,r)=>E(t,d.slider(i,F,n.min,n.max,n.step,o,"px",{clear:r?{hint:o,emptyLabel:r}:{hint:o}}));return{size:{_gBlockSize:o("Size"),...E("widthFit",d.segmented("Width",/* @__PURE__ */j(u,{}),[...e],s)),...x("width","Fixed width",m,m.fallback),...x("minWidth","Min width",h,h.min,"None"),...x("maxWidth","Content width",h,h.min,"None")},text:t.textFit?{_gText:o("Text"),...E("textFit",d.segmented("When the text does not fit",/* @__PURE__ */j(k,{}),[...p],t.textFit)),...x("minFont","Min font size",c,c.fallback)}:{}}}export{d as blockSizeFieldSet};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ANCHOR_LABELS,AlignmentStrip,BOX_ALIGN_POINTS,BOX_DIRECTIONS,BOX_DIRECTION_LABEL,BOX_GAP,BOX_JUSTIFY_POINTS,BOX_NUDGE_LIMIT,BOX_PLACEMENTS,BOX_PLACEMENT_DEFAULT,BOX_WIDTH,BOX_WRAP_LABEL,BOX_WRAP_POINTS,BlockAlignmentStrip,FLAT_ACCESS,OPEN_PLACEMENT_POINTS,PHONE_KEY_ACCESS,PlacementGridView,SIDE_PAD_KEYS,Segmented,SliderControl,alignmentField,alignmentFields,blockAlignmentField,blockAlignmentFields,boxAlignField,boxFieldBuilders,boxFieldSet,boxJustifyField,boxWrapField,directionField,gapField,group,iconOf,isNoGlyph,noGlyph,normaliseBoxPlacement,objectAccess,onDesktopWords,phoneObjectAccess,phoneTwinFields,placementField,positionFields,positionPatch,section,segmented,select,sharedStyleKinds,sidesFromObject,sidesPaddingFields,sidesPaddingPatch,sidesToObject,slider,useAccessPatch,useAccessValue}from"../../../chunk-
|
|
1
|
+
export{ANCHOR_LABELS,AlignmentStrip,BOX_ALIGN_POINTS,BOX_DIRECTIONS,BOX_DIRECTION_LABEL,BOX_GAP,BOX_JUSTIFY_POINTS,BOX_NUDGE_LIMIT,BOX_PLACEMENTS,BOX_PLACEMENT_DEFAULT,BOX_WIDTH,BOX_WRAP_LABEL,BOX_WRAP_POINTS,BlockAlignmentStrip,FLAT_ACCESS,OPEN_PLACEMENT_POINTS,PHONE_KEY_ACCESS,PlacementGridView,SIDE_PAD_KEYS,Segmented,SliderControl,alignmentField,alignmentFields,blockAlignmentField,blockAlignmentFields,boxAlignField,boxFieldBuilders,boxFieldSet,boxJustifyField,boxWrapField,directionField,gapField,group,iconOf,isNoGlyph,noGlyph,normaliseBoxPlacement,objectAccess,onDesktopWords,phoneObjectAccess,phoneTwinFields,placementField,positionFields,positionPatch,section,segmented,select,sharedStyleKinds,sidesFromObject,sidesPaddingFields,sidesPaddingPatch,sidesToObject,slider,useAccessPatch,useAccessValue}from"../../../chunk-EEIDFHOG.js";import"../../../chunk-CLAADE4J.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";export{FIELD_DESCRIPTION_MARKER,describedAs}from"../../../chunk-LX23TCTP.js";import"../../../chunk-Q3VAJMXS.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-EVYIDHCK.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-FM6JO4WF.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ValueAccess, SidesPaddingOptions, PhoneValueAccess, BoxFieldSay, BoxField } from './box-fields.js';
|
|
2
2
|
import { ColorPreset } from 'efficient-shell/ui';
|
|
3
|
+
import { CornerSide } from '../content/style-keys.js';
|
|
3
4
|
export { BUTTON_PAD_KEYS, BUTTON_STYLE_KEYS } from '../content/style-keys.js';
|
|
4
5
|
import 'react';
|
|
5
6
|
import 'efficient-shell/format';
|
|
@@ -41,6 +42,9 @@ interface ButtonFieldSetOptions {
|
|
|
41
42
|
color: string;
|
|
42
43
|
};
|
|
43
44
|
useCorners: () => number;
|
|
45
|
+
/** Which corners an unset corner set draws (`null`: all four). Left out:
|
|
46
|
+
* all four. A hook: give it always or never for one field set. */
|
|
47
|
+
useCornerSides?: () => readonly CornerSide[] | null;
|
|
44
48
|
/** What an unset Fill opacity draws. 100 when left out. */
|
|
45
49
|
useFillOpacity?: () => number;
|
|
46
50
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{buttonFieldSet}from"../../../chunk-
|
|
1
|
+
export{buttonFieldSet}from"../../../chunk-TGFPW4YU.js";import"../../../chunk-EZXQJN6V.js";import"../../../chunk-EEIDFHOG.js";import"../../../chunk-CLAADE4J.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-Q3VAJMXS.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";export{BUTTON_PAD_KEYS,BUTTON_STYLE_KEYS}from"../../../chunk-BAI7MIH4.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-EVYIDHCK.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-FM6JO4WF.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{SettingsDefaultReset as e}from"../../../chunk-2T22IY3J.js";import{ScreenDocumentContext as n}from"../../../chunk-BYONFJVQ.js";import"../../../chunk-QZJKWKGH.js";import"../../../chunk-ERR437B5.js";import{requestMediaPick as o}from"../../../chunk-JIP5JNRB.js";import"../../../chunk-GR3XRILS.js";import"../../../chunk-RLBXE4EU.js";import"../../../chunk-6ATIYLUL.js";import"../../../chunk-KO47WAWR.js";import"../../../chunk-NQW6XCAY.js";import"../../../chunk-LOMEH6DG.js";import"../../../chunk-KCOBHPN6.js";import"../../../chunk-NCXYC7WI.js";import"../../../chunk-YM4UEGBV.js";import"../../../chunk-SNF5764Q.js";import{useEaselHost as t}from"../../../chunk-LX23TCTP.js";import{DEFAULT_IMAGE_ROW_WORDS as r}from"../../../chunk-Q3VAJMXS.js";import{phoneKey as i}from"../../../chunk-E52W3M5I.js";import{MEDIA_FIELD_MARKER as c}from"../../../chunk-ANPOR6EY.js";import{useSelectedHost as s}from"../../../chunk-
|
|
2
|
-
return g(j,{size:"md",type:"url",inputMode:"url",autoComplete:"off",spellCheck:!1,value:c,placeholder:"https://…","aria-label":t,onChange:o=>{const t=o.target.value;i(n=>({text:t,from:!n||e!==n.text&&e!==n.from?e:n.from})),n(t)},onBlur:e=>{const t=e.target.value,r=o?o(t):t;r!==t&&n(r),i(null)},onKeyDown:e=>{"Enter"===e.key&&e.currentTarget.blur()}})}function R({label:c,icon:j,hint:R,value:E,onChange:B,name:
|
|
3
|
-
return g(m,{label:c,icon:j,hint:R,children:/* @__PURE__ */g("div",{className:"es-image-row-note",children:
|
|
1
|
+
import{SettingsDefaultReset as e}from"../../../chunk-2T22IY3J.js";import{ScreenDocumentContext as n}from"../../../chunk-BYONFJVQ.js";import"../../../chunk-QZJKWKGH.js";import"../../../chunk-ERR437B5.js";import{requestMediaPick as o}from"../../../chunk-JIP5JNRB.js";import"../../../chunk-GR3XRILS.js";import"../../../chunk-RLBXE4EU.js";import"../../../chunk-6ATIYLUL.js";import"../../../chunk-KO47WAWR.js";import"../../../chunk-NQW6XCAY.js";import"../../../chunk-LOMEH6DG.js";import"../../../chunk-KCOBHPN6.js";import"../../../chunk-NCXYC7WI.js";import"../../../chunk-YM4UEGBV.js";import"../../../chunk-SNF5764Q.js";import{useEaselHost as t}from"../../../chunk-LX23TCTP.js";import{DEFAULT_IMAGE_ROW_WORDS as r}from"../../../chunk-Q3VAJMXS.js";import{phoneKey as i}from"../../../chunk-E52W3M5I.js";import{MEDIA_FIELD_MARKER as c}from"../../../chunk-ANPOR6EY.js";import{useSelectedHost as s}from"../../../chunk-EVYIDHCK.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import{DEFAULT_PANEL_WORDS as a}from"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-NDRZP6YR.js";import"../../../chunk-H6DDIBQ4.js";import"../../../chunk-YYD257TD.js";import"../../../chunk-RE4LP46F.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import{SettingsField as m}from"../../../chunk-MIX7EGRG.js";import{useWords as l}from"../../../chunk-MFIRYGHW.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import{usePreviewDevice as u}from"../../../chunk-BSPCSC45.js";import{useContext as p,useState as h}from"react";import{FOCAL_DEFAULT as f}from"efficient-shell/format";import{MediaUploadField as k,Button as d,Input as j}from"efficient-shell/ui";import{jsx as g,jsxs as v}from"react/jsx-runtime";function C(e){return"string"==typeof e?e:e&&"object"==typeof e&&"string"==typeof e.src?e.src:""}function y({src:e,onChange:n,tidy:o,name:t}){const[r,i]=h(null),c=!r||e!==r.text&&e!==r.from?e:r.text;/* @__PURE__ */
|
|
2
|
+
return g(j,{size:"md",type:"url",inputMode:"url",autoComplete:"off",spellCheck:!1,value:c,placeholder:"https://…","aria-label":t,onChange:o=>{const t=o.target.value;i(n=>({text:t,from:!n||e!==n.text&&e!==n.from?e:n.from})),n(t)},onBlur:e=>{const t=e.target.value,r=o?o(t):t;r!==t&&n(r),i(null)},onKeyDown:e=>{"Enter"===e.key&&e.currentTarget.blur()}})}function R({label:c,icon:j,hint:R,value:E,onChange:B,name:K,readOnly:b,canPick:P=!0,kind:F="image",accept:M,acceptHint:Y,pickOptions:D,maxSizeBytes:L,height:N,placeholder:Q,removeLabel:I,paste:O,focusKey:S,focusWhen:T,frameKey:H,note:w}){const W=l("imageRow",r),X=l("panel",a),x=t(),G=s(),J=p(n),Z="video"===F,A=function(e,n){const o=s(),t="mobile"===u();if(!e||!o)return null;const r=o.values??{};if(n&&!n(r))return null;const c="string"==typeof r[e]&&r[e]?String(r[e]):f,a=i(e),m="string"==typeof r[a]&&r[a]?String(r[a]):void 0;return{phone:t,desktop:c,own:m,focus:t?m??c:c,set:n=>o.onChange(t?a:e,n),clear:()=>o.onChange(a,void 0)}}(Z?void 0:S,T),[U,V]=h(!1),z=!0===b||!0===G?.readOnly,q=P&&!z;if(J&&!J.capabilities.mediaEditing)/* @__PURE__ */
|
|
3
|
+
return g(m,{label:c,icon:j,hint:R,children:/* @__PURE__ */g("div",{className:"es-image-row-note",children:Z?W.templateVideo:W.template})});const $=H&&K?{video:K,frame:H}:null,_=$?e=>e?B(e):G?.onChangeMany({[$.video]:"",[$.frame]:""}):B,ee=$?e=>G?.onChangeMany({[$.video]:e,[$.frame]:""}):B,ne=C(E),oe=A?.phone&&ne?/* @__PURE__ */g(e,{words:X,label:W.focus,changed:Boolean(A.own),detail:W.onDesktop(A.desktop),onReset:A.clear,disabled:z}):void 0,te=O&&!z&&(O.open||U);/* @__PURE__ */
|
|
4
4
|
return g(m,{label:c,icon:j,hint:R,action:oe,children:/* @__PURE__ */v("div",{className:"es-image-row",children:[
|
|
5
|
-
/* @__PURE__ */g(k,{value:ne,onChange:_,onPick:e=>{if(q)return $&&!
|
|
5
|
+
/* @__PURE__ */g(k,{value:ne,onChange:_,onPick:e=>{if(q)return $&&!G?Promise.resolve(null):o(x,{accept:M??(Z?"video/*":"image/*"),title:c,...e?{file:e}:{},...D?{options:D}:{}}).then(e=>e&&$?(G?.onChangeMany({[$.video]:e.url,[$.frame]:e.posterUrl??""}),null):e?.url??null)},accept:M??(Z?"video/*":"image/*"),acceptHint:Y,kind:F,maxSizeBytes:L,height:N,placeholder:Q,removeLabel:I,allowReplace:q,allowRemove:!z,disabled:z||!q&&!ne,focusLabel:W.focus,...A&&!z?{focus:A.focus,onFocusChange:A.set}:A?{focus:A.focus}:{}}),w?.(ne),O&&!z?te?/* @__PURE__ */g(y,{src:ne,onChange:ee,tidy:O.tidy,name:W.pasteName}):/* @__PURE__ */g(d,{variant:"link",size:"sm",onClick:()=>V(!0),children:W.pasteLink}):null]})})}function E(e,n,o={}){return{type:"custom",[c]:!0,render:t=>/* @__PURE__ */g(R,{...o,label:e,icon:n,value:t.value,onChange:e=>t.onChange(e),name:t.name,readOnly:t.readOnly})}}export{R as ImageRow,E as imageField,C as imageValueSrc};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { ColorPreset } from 'efficient-shell/ui';
|
|
3
|
+
import { CornerSide } from '../content/style-keys.js';
|
|
3
4
|
export { CORNER_SIDES } from '../content/style-keys.js';
|
|
4
5
|
import { ValueAccess, BoxField, BoxFieldSay } from './box-fields.js';
|
|
5
6
|
import 'efficient-shell/format';
|
|
@@ -98,6 +99,10 @@ interface CornersFieldOptions extends Stored {
|
|
|
98
99
|
sidesKey: string;
|
|
99
100
|
/** The radius an unset row draws, px. A hook. */
|
|
100
101
|
useFollows: () => number;
|
|
102
|
+
/** The corners an unset corner set draws (the campaign's, for an email
|
|
103
|
+
* Button block); `null` is all four. A hook: give it always or never for
|
|
104
|
+
* one field set. Left out: all four. */
|
|
105
|
+
useFollowsSides?: () => readonly CornerSide[] | null;
|
|
101
106
|
step?: number;
|
|
102
107
|
}
|
|
103
108
|
/** The three style rows, in the host's words. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{BORDER_WIDTH_MAX,CORNER_RADIUS_MAX,borderField,colourField,cornersField,keptByRow,styleFieldBuilders}from"../../../chunk-
|
|
1
|
+
export{BORDER_WIDTH_MAX,CORNER_RADIUS_MAX,borderField,colourField,cornersField,keptByRow,styleFieldBuilders}from"../../../chunk-EZXQJN6V.js";import"../../../chunk-EEIDFHOG.js";import"../../../chunk-CLAADE4J.js";import"../../../chunk-2T22IY3J.js";import"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-Q3VAJMXS.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";export{CORNER_SIDES}from"../../../chunk-BAI7MIH4.js";import"../../../chunk-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-EVYIDHCK.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-FM6JO4WF.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-OECWLNKJ.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{useSectionOps}from"../../../chunk-
|
|
1
|
+
export{useSectionOps}from"../../../chunk-YBDSG4BV.js";import"../../../chunk-ODHJRBJV.js";import"../../../chunk-NCXYC7WI.js";import"../../../chunk-LX23TCTP.js";import"../../../chunk-TCAAOYQY.js";import"../../../chunk-EVYIDHCK.js";import"../../../chunk-JQQFB7EZ.js";import"../../../chunk-TBY3DFKS.js";import"../../../chunk-C7IFWSUA.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-ZEH6QLBH.js";import"../../../chunk-WHS6Y55E.js";import"../../../chunk-FM6JO4WF.js";import"../../../chunk-K56YDHYQ.js";import"../../../chunk-56ID6FKZ.js";import"../../../chunk-K53PQAMP.js";import"../../../chunk-FIVU2COQ.js";import"../../../chunk-QTHQPJWA.js";import"../../../chunk-HZSZT3BE.js";import"../../../chunk-PMRN5Z3T.js";import"../../../chunk-Y2T3JX7K.js";import"../../../chunk-KFWNGPW3.js";import"../../../chunk-MIX7EGRG.js";import"../../../chunk-DX3VILZ3.js";import"../../../chunk-JACEEVVF.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-3XECMGXX.js";import"../../../chunk-P2VEMZH5.js";import"../../../chunk-TOKMFZPB.js";import"../../../chunk-FR7EEKFF.js";import"../../../chunk-7UFKEX72.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{editorRootFocus,isSaveShortcut,useEaselKeyTarget,useEaselSaveKey,useEaselUndoKeys}from"../../chunk-
|
|
1
|
+
export{editorRootFocus,isSaveShortcut,useEaselKeyTarget,useEaselSaveKey,useEaselUndoKeys}from"../../chunk-CVS3RPO6.js";import"../../chunk-LX23TCTP.js";import"../../chunk-EVYIDHCK.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-K53PQAMP.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-HZSZT3BE.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{SELECTION_MODE,ScreenCanvasTargetProvider,ScreenPartsProvider,isPinnedFirst,isPinnedLast,isSelectionMode,isSlotMode,sameInspectorMode,screenSlotsOf,shownChildSlotsOf,shownSlotFieldsOf,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,isSelectionMode,isSlotMode,sameInspectorMode,screenSlotsOf,shownChildSlotsOf,shownSlotFieldsOf,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasDrag,useScreenCanvasFrame,useScreenCanvasHead,useScreenCanvasTarget,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenNodeKeys,useScreenNotify,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useScreenStorageNamespace,useScreenStyleClipboard,useStandaloneScreenBridges}from"../../chunk-ODHJRBJV.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-LX23TCTP.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-EVYIDHCK.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-C7IFWSUA.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-ZEH6QLBH.js";import"../../chunk-WHS6Y55E.js";import"../../chunk-FM6JO4WF.js";import"../../chunk-K56YDHYQ.js";import"../../chunk-56ID6FKZ.js";import"../../chunk-K53PQAMP.js";import"../../chunk-FIVU2COQ.js";import"../../chunk-QTHQPJWA.js";import"../../chunk-HZSZT3BE.js";import"../../chunk-PMRN5Z3T.js";import"../../chunk-Y2T3JX7K.js";import"../../chunk-KFWNGPW3.js";import"../../chunk-MIX7EGRG.js";import"../../chunk-DX3VILZ3.js";import"../../chunk-JACEEVVF.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-3XECMGXX.js";import"../../chunk-P2VEMZH5.js";import"../../chunk-TOKMFZPB.js";import"../../chunk-FR7EEKFF.js";import"../../chunk-7UFKEX72.js";import"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-easel",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.6.1",
|
|
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",
|
package/dist/chunk-4O4FSRJL.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{styleFieldBuilders as e,keptByRow as s}from"./chunk-SS2NY7PP.js";import{boxFieldBuilders as o,PHONE_KEY_ACCESS as l,phoneTwinFields as r,section as i}from"./chunk-UJU42JM4.js";import{deviceField as t}from"./chunk-7GGNFLHT.js";import{BUTTON_STYLE_KEYS as c,BUTTON_PAD_KEYS as n}from"./chunk-BTQ3FJKT.js";import{TextColorIcon as u,GroundIcon as d}from"efficient-shell/icons/efficient";import{jsx as f}from"react/jsx-runtime";function a(a){const p=o(a.say),y=e(a.say),F=c,m=a.style,k=a.phone??l;return{_dSize:i("Size"),...p.sidesPaddingFields({keys:n,group:!1,...a.padding}),_dDesign:i("Design"),[F.fill]:y.colourField({key:F.fill,access:m,label:"Fill color",icon:/* @__PURE__ */f(d,{}),useFollows:a.follows.useFill,usePresets:a.usePresets,resetTo:a.resetTo,opacity:{key:F.fillOpacity,useUnset:a.follows.useFillOpacity}}),[F.fillOpacity]:s(F.fill),[F.border]:y.borderField({key:F.border,access:m,useFollows:a.follows.useBorder}),[F.text]:y.colourField({key:F.text,access:m,label:"Text color",icon:/* @__PURE__ */f(u,{}),useFollows:a.follows.useText,usePresets:a.usePresets,resetTo:a.resetTo}),[F.corners]:y.cornersField({key:F.corners,access:m,sidesKey:F.cornerSides,useFollows:a.follows.useCorners}),[F.cornerSides]:s(F.corners),_dLayout:i("Layout"),...r("align",p.blockAlignmentField({phone:!0},""),k),align:t("desktop",p.blockAlignmentField())}}export{a as buttonFieldSet};
|
package/dist/chunk-BTQ3FJKT.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t={fill:"buttonColor",fillOpacity:"buttonFillOpacity",border:"buttonBorder",text:"buttonTextColor",corners:"buttonCorners",cornerSides:"buttonCornerSides"},o={top:"buttonPaddingTop",right:"buttonPaddingRight",bottom:"buttonPaddingBottom",left:"buttonPaddingLeft"},r=["tl","tr","br","bl"];export{o as BUTTON_PAD_KEYS,t as BUTTON_STYLE_KEYS,r as CORNER_SIDES};
|
package/dist/chunk-FWPKYUGM.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{usePickFollowsSelection as n}from"./chunk-NCXYC7WI.js";import{slotFieldsOf as e,slotChildrenIn as t}from"./chunk-TCAAOYQY.js";import{EaselCanvas as r,useSelectedFields as o}from"./chunk-YAFMYW4J.js";import{Inspector as i}from"./chunk-C7IFWSUA.js";import{fieldIsShown as u}from"./chunk-BPXEFVSQ.js";import{createContext as l,useContext as s}from"react";import{DesktopIcon as c}from"efficient-shell/icons/efficient";import{jsx as f}from"react/jsx-runtime";var a={kind:"selection"};function d(n){return"selection"===n.kind}function p(n,e){if(d(n)&&d(e))return!0;const t=n,r=e,o=Object.keys(t);return o.length===Object.keys(r).length&&o.every(n=>Object.is(t[n],r[n]))}function m(n){const e=n;return"string"==typeof e.nodeId&&"string"==typeof e.slot}function k(n,t){const r=n.components?.[t.type]?.fields??{};return e(n,t.type).filter(n=>u(r[n],{values:t.props}))}function h(n,e){return k(n,e).flatMap(n=>t(e,n))}function v(n,e,t){const r=n.slotsOf?.(t);return r||k(e,t).map(n=>({slot:n,label:n,rung:!1}))}function y(n,e){return n.isFirst?n.isFirst(e):e.type===n.first}function g(n,e){return n.isLast?n.isLast(e):e.type===n.last}var b={},O=()=>b,j=()=>"",C=()=>null,S=()=>{},w={isLockedBlock:()=>!1,duplicateBlocked:()=>null,nestDepth:()=>0,newSectionNode:()=>null,canAddTo:()=>null,blockIsOffered:()=>!0},L={labelAtLevel:(n,e,t)=>t,descriptions:{},categoryLabel:()=>{},firstSection:null,blockRowName:(n,e)=>e(n.type),plainText:n=>n,Icon:()=>null,Thumbnail:()=>null,useProducts:()=>null},A={options:[{id:"desktop",label:"Desktop",icon:/* @__PURE__ */f(c,{})}],initial:"desktop",fluid:"desktop",widths:{desktop:2e3}},F={read:()=>"sections",write:()=>{},forSelection:(n,e)=>n?"sections":e},I={first:null,last:null,firstGroup:null,lastGroup:null,isSectionGroup:()=>!1,sectionGroupZone:()=>"",panelOf:()=>null};function N(){/* @__PURE__ */
|
|
2
|
-
return f(r,{height:"fill"})}function P(){const{id:n,fields:e,values:t,readOnly:r,onChange:u}=o();/* @__PURE__ */
|
|
3
|
-
return f("div",{className:"es-sidepanel es-sidepanel--right",children:/* @__PURE__ */f(i,{fields:e,values:t,onChange:u,readOnly:r,idPrefix:n})})}var B=l({});function D({parts:n,children:e}){/* @__PURE__ */
|
|
4
|
-
return f(B.Provider,{value:n,children:e})}function Y(){return s(B)}function x(){return(Y().useOwnerName??j)()}function G(){return(Y().useDocumentLabel??C)()}function T(n,e,t,r){return(Y().useBridges??O)(n,e,t,r)}function W(n){return(Y().useStandaloneBridges??O)(n)}function M(n,e){(Y().useDocumentPass??S)(n,e)}function Q(){return Y().blockRules??w}function R(){return Y().blockLook??L}function V(){return Y().devices??A}function X(){return Y().leftView??F}function E(){return Y().pinned??I}function H(){return Y().saveSwitch??!0}function J(e){n(!0===Y().pickFollowsSelection,e)}function K(){return Y().storageNamespace||void 0}function U(){return Y().styleClipboard??null}function Z(){return Y().nodeKeys??!0}function q(){return Y().notify??null}function z(){return Y().Canvas??N}function $(){return Y().CanvasHead??null}function _(){return Y().canvasDrag??null}var nn=l(null);function en({target:n,children:e}){/* @__PURE__ */
|
|
5
|
-
return f(nn.Provider,{value:n,children:e})}function tn(){return s(nn)}function rn(){return Y().Inspector??P}export{a as SELECTION_MODE,en as ScreenCanvasTargetProvider,D as ScreenPartsProvider,y as isPinnedFirst,g as isPinnedLast,d as isSelectionMode,m as isSlotMode,p as sameInspectorMode,v as screenSlotsOf,h as shownChildSlotsOf,k as shownSlotFieldsOf,R as useScreenBlockLook,Q as useScreenBlockRules,T as useScreenBridges,_ as useScreenCanvasDrag,z as useScreenCanvasFrame,$ as useScreenCanvasHead,tn as useScreenCanvasTarget,V as useScreenDevices,G as useScreenDocumentLabel,M as useScreenDocumentPass,rn as useScreenInspectorPanel,X as useScreenLeftView,Z as useScreenNodeKeys,q as useScreenNotify,x as useScreenOwnerName,Y as useScreenParts,J as useScreenPickFollowsSelection,E as useScreenPinned,H as useScreenSaveSwitch,K as useScreenStorageNamespace,U as useScreenStyleClipboard,W as useStandaloneScreenBridges};
|
package/dist/chunk-SS2NY7PP.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{useAccessPatch as e,FLAT_ACCESS as o,onDesktopWords as r,useAccessValue as t}from"./chunk-UJU42JM4.js";import{CornersInput as s,BorderInput as l,SettingsColour as n}from"./chunk-CLAADE4J.js";import{SettingsDefaultReset as i}from"./chunk-2T22IY3J.js";import{noControlField as a,NoControlMark as c}from"./chunk-22I55W37.js";import{CORNER_SIDES as d}from"./chunk-BTQ3FJKT.js";import{DEFAULT_PANEL_WORDS as u,DEFAULT_COLOUR_ROW_WORDS as p}from"./chunk-56ID6FKZ.js";import{SettingsField as y}from"./chunk-MIX7EGRG.js";import{useWords as f}from"./chunk-MFIRYGHW.js";import{CornerIcon as h,BorderAllIcon as m}from"efficient-shell/icons/efficient";import{jsx as b}from"react/jsx-runtime";var w=e=>e;function g(e,o){const r=o.twinAccess;return r?{key:e.key,access:r,ownField:r.ownField}:e}function v(e,r){const s=!e.access||e.ownField?{value:r.value,onChange:r.onChange}:void 0;return t(e.access??o,e.key,s)}function k(e,r){return t(e.access??o,r??"")}function F(e){return{...a({type:"custom",render:()=>/* @__PURE__ */b(c,{})},"always"),reachedBy:e}}function j({o:t,say:s,props:l}){const i=f("colourRow",p),a=f("panel",u),c=t.useFollows(),d=t.usePresets?.(),y=t.opacity?.useUnset?.()??100,h=g(t,l),[m,w]=v(h,l),[F,j]=k(h,t.opacity?.key),B=e(h.access??o),C="string"==typeof m?m:"",A="number"==typeof F,O="follows"in l,T=(O&&"string"==typeof l.follows&&""!==l.follows?l.follows:void 0)??c,x=t.access||O?void 0:"";/* @__PURE__ */
|
|
2
|
-
return b(n,{label:s(t.label),icon:t.icon,value:C,onChange:e=>w(""===e?x:e),inherited:T,presets:d,changed:""!==C||A,onReset:()=>{A&&t.opacity?B([[t.key,x],[t.opacity.key,void 0]]):w(x)},resetTo:O?r(s,T.toUpperCase()):t.resetTo?t.resetTo(c.toUpperCase()):c.toUpperCase(),...t.opacity?{opacity:A?F:y,onOpacityChange:e=>j(e)}:{},readOnly:l.readOnly,words:i,resetWords:a})}var B=20;function C({o:e,say:o,props:t}){const s=e.useFollows(),[n,a]=v(g(e,t),t),c=n&&"object"==typeof n?n:{},d="follows"in t,u=d&&t.follows&&"object"==typeof t.follows?t.follows:{},p="number"==typeof u.width?u.width:s.width,f="string"==typeof u.color&&""!==u.color?u.color:s.color,h=Object.keys(c).length>0,w={width:o("Border width"),sides:{top:o("Border top"),right:o("Border right"),bottom:o("Border bottom"),left:o("Border left")},style:o("Border style"),styles:{solid:o("Solid"),dashed:o("Dashed"),dotted:o("Dotted")},color:o("Border color"),unit:"px"};/* @__PURE__ */
|
|
3
|
-
return b(y,{label:o("Border"),icon:/* @__PURE__ */b(m,{}),action:d?/* @__PURE__ */b(i,{label:o("Border"),changed:h,detail:r(o,`${p}px`),disabled:t.readOnly,onReset:()=>a(void 0)}):void 0,children:/* @__PURE__ */b(l,{label:o("Border"),value:c,each:!1,onChange:o=>a(function(e){const o=Object.fromEntries(Object.entries(e).filter(([,e])=>null!=e&&""!==e));return Object.keys(o).length?o:void 0}(e.styles?{width:o.width,color:o.color,style:o.style}:{width:o.width,color:o.color})),placeholder:{sides:{top:p,right:p,bottom:p,left:p},style:u.style??"solid",color:f},presets:[f],words:w,styles:e.styles??!1,max:20,readOnly:t.readOnly})})}var A=40;function O({o:r,say:t,props:l}){const n=f("panel",u),a=r.useFollows(),[c,p]=v(r,l),[m,w]=k(r,r.sidesKey),g=e(r.access??o),F=r.access?void 0:null,j="number"==typeof c&&Number.isFinite(c)?c:null,B=Array.isArray(m)?d.filter(e=>m.includes(e)):[...d],C=[{value:"tl",label:t("Top left")},{value:"tr",label:t("Top right")},{value:"bl",label:t("Bottom left")},{value:"br",label:t("Bottom right")}];/* @__PURE__ */
|
|
4
|
-
return b(y,{label:t("Corners"),icon:/* @__PURE__ */b(h,{}),changed:null!==j||Array.isArray(m),action:/* @__PURE__ */b(i,{label:t("Corners"),changed:null!==j||Array.isArray(m),detail:`${a}px`,onReset:()=>Array.isArray(m)?g([[r.key,F],[r.sidesKey,F]]):p(F),words:n}),children:/* @__PURE__ */b(s,{label:t("Corners"),value:B,corners:C,onChange:e=>{const o=d.filter(o=>e.includes(o));w(o.length===d.length?F:o)},radius:j,onRadiusChange:e=>p(e??F),radiusMin:0,radiusMax:40,radiusStep:r.step??1,radiusPlaceholder:String(a),disabled:l.readOnly})})}function T(e=w){return{colourField:o=>({type:"custom",render:r=>/* @__PURE__ */b(j,{o:o,say:e,props:r})}),borderField:o=>({type:"custom",render:r=>/* @__PURE__ */b(C,{o:o,say:e,props:r})}),cornersField:o=>({type:"custom",render:r=>/* @__PURE__ */b(O,{o:o,say:e,props:r})})}}var{colourField:x,borderField:R,cornersField:U}=T();export{B as BORDER_WIDTH_MAX,A as CORNER_RADIUS_MAX,R as borderField,x as colourField,U as cornersField,F as keptByRow,T as styleFieldBuilders};
|