efficient-easel 25.0.0 → 26.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/README.md +3 -4
- package/dist/chunk-2T22IY3J.js +2 -0
- package/dist/chunk-4FFDGEWA.js +1 -0
- package/dist/{chunk-KFV7N2DJ.js → chunk-56ID6FKZ.js} +1 -1
- package/dist/chunk-5OKOCRXT.js +11 -0
- package/dist/{chunk-4Y3TK65H.js → chunk-5QUIXGQU.js} +1 -1
- package/dist/{chunk-ZYOQXBJF.js → chunk-6BOOYHHK.js} +4 -4
- package/dist/{chunk-OXOUGEAT.js → chunk-7GGNFLHT.js} +1 -1
- package/dist/{chunk-VIUES5R6.js → chunk-7PGO4K5M.js} +7 -7
- package/dist/chunk-BA5X67LQ.js +1 -0
- package/dist/{chunk-53ME3GAI.js → chunk-BBD3FLU3.js} +14 -14
- package/dist/chunk-BYONFJVQ.js +2 -0
- package/dist/chunk-CLAADE4J.js +14 -0
- package/dist/chunk-IMAN6IP5.js +4 -0
- package/dist/chunk-JQQFB7EZ.js +1 -0
- package/dist/chunk-LSGKADNV.js +5 -0
- package/dist/chunk-O4DQ6O6W.js +1 -0
- package/dist/{chunk-S6YOIRXQ.js → chunk-Q3VAJMXS.js} +1 -1
- package/dist/{chunk-YFHKE54W.js → chunk-QAVA4V2C.js} +1 -1
- package/dist/{chunk-U3LTJSBU.js → chunk-R76XMEKT.js} +11 -11
- package/dist/{chunk-MBEUSPIN.js → chunk-SQTVXE5D.js} +4 -4
- package/dist/{chunk-GEPSJJWW.js → chunk-STQDOTHF.js} +1 -1
- package/dist/{chunk-62UGN7VM.js → chunk-TOEJCZUO.js} +1 -1
- package/dist/chunk-TTCUC2Q3.js +1 -0
- package/dist/{chunk-FYV6GZXP.js → chunk-UCZQWQNS.js} +1 -1
- package/dist/{chunk-KTV7ORWF.js → chunk-VXAGXHKI.js} +38 -38
- package/dist/{chunk-M4THI4OO.js → chunk-WOA775T4.js} +1 -1
- package/dist/drag/index.js +1 -1
- package/dist/easel/index.js +1 -1
- package/dist/fields/index.js +1 -1
- package/dist/panel/index.d.ts +63 -2
- package/dist/panel/index.js +1 -1
- package/dist/panel/panel.css +46 -0
- package/dist/pick/index.d.ts +16 -195
- package/dist/pick/index.js +1 -1
- package/dist/pick/pick.css +6 -196
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/NodeContextMenu.js +1 -1
- package/dist/screen/components/PageEditGuardNotices.js +1 -1
- package/dist/screen/components/ScreenChrome.js +1 -1
- package/dist/screen/components/ScreenDocumentContext.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 +17 -17
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/document/block-set-host.js +1 -1
- package/dist/screen/lib/document/box-fields.d.ts +129 -3
- package/dist/screen/lib/document/box-fields.js +1 -1
- package/dist/screen/lib/document/button-fields.d.ts +97 -0
- package/dist/screen/lib/document/button-fields.js +1 -0
- package/dist/screen/lib/document/device-fields.js +1 -1
- package/dist/screen/lib/document/image-fields.d.ts +118 -0
- package/dist/screen/lib/document/image-fields.js +5 -0
- package/dist/screen/lib/document/style-clipboard.js +1 -1
- package/dist/screen/lib/document/style-fields.d.ts +109 -0
- package/dist/screen/lib/document/style-fields.js +1 -0
- 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/dist/screen/words.d.ts +22 -1
- package/dist/screen/words.js +1 -1
- package/dist/strings/index.d.ts +12 -9
- package/dist/strings/index.js +2 -2
- package/dist/text-styles/index.d.ts +3 -3
- package/dist/text-styles/index.js +37 -37
- package/dist/{words-fbR9IwxH.d.ts → words-BrN08Fup.d.ts} +16 -1
- package/package.json +19 -1
- package/dist/chunk-4OMAA45Q.js +0 -5
- package/dist/chunk-ERB6FAZT.js +0 -2
- package/dist/chunk-H6BER2EU.js +0 -1
- package/dist/chunk-LUG22U5L.js +0 -1
- package/dist/chunk-OFBZOI6W.js +0 -1
- package/dist/chunk-SC6E3UUS.js +0 -13
- package/dist/chunk-SSDKT4AY.js +0 -9
- package/dist/chunk-U6LJ5UKD.js +0 -6
- package/dist/chunk-ZLOMH2PD.js +0 -1
- package/dist/words-DWvCJXwR.d.ts +0 -51
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import{AddBlockRow as e}from"../../chunk-
|
|
2
|
-
return
|
|
3
|
-
return
|
|
4
|
-
/* @__PURE__ */
|
|
5
|
-
return
|
|
6
|
-
/* @__PURE__ */
|
|
7
|
-
/* @__PURE__ */
|
|
8
|
-
/* @__PURE__ */
|
|
9
|
-
/* @__PURE__ */
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
-
return
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
-
/* @__PURE__ */
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */
|
|
1
|
+
import{AddBlockRow as e}from"../../chunk-5QUIXGQU.js";import{scrollPreviewToSection as n,gotoPreviewSlide as o}from"../../chunk-LUOY3A3Q.js";import{useEaselUndoKeys as r}from"../../chunk-UCZQWQNS.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-O4DQ6O6W.js";import{useSectionOps as c}from"../../chunk-WOA775T4.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-LSGKADNV.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"../../chunk-AJ2SUSET.js";import{slotChildRowName as C}from"../../chunk-5NHQ452C.js";import"../../chunk-6UAEFOJ4.js";import"../../chunk-ANPOR6EY.js";import"../../chunk-R4AUZVA3.js";import{slotFieldsOf as E,nestsInTree as Q}from"../../chunk-TCAAOYQY.js";import{useEasel as x}from"../../chunk-BBD3FLU3.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-R76XMEKT.js";import"../../chunk-BPXEFVSQ.js";import"../../chunk-YCSZAP7T.js";import"../../chunk-ZEH6QLBH.js";import{LayersTree as R,Subtree as O,TreeRow as F,TreeRowAction as P,TreeSeam as B}from"../../chunk-WHS6Y55E.js";import"../../chunk-FM6JO4WF.js";import{DEFAULT_TREE_WORDS as T}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 W,saveIndicator as g}from"../../chunk-H6DDIBQ4.js";import{SaveState as Y,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 D}from"../../chunk-MFIRYGHW.js";import"../../chunk-SQTVXE5D.js";import"../../chunk-TQ5Y6S2X.js";import{useTreeDrag as I}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 b}from"../../chunk-EUFDQ4KL.js";import"../../chunk-KXM6YRG2.js";import"../../chunk-467WWV4I.js";import"../../chunk-TIAWIOGD.js";import"../../chunk-MGVI67QV.js";import{useState as z,useRef as V,useEffect as X,useCallback as w,Fragment as K}from"react";import{Tooltip as Z}from"efficient-shell/ui";import{TrashIcon as J}from"efficient-shell/icons/efficient";import{jsxs as U,jsx as L,Fragment as G}from"react/jsx-runtime";var H=e=>n=>{n.target.closest("button, input")||e()},$={rowClick:H};function q(){const{saveState:q,readOnly:_,readOnlyReason:ee=null}=p(),ne=c(),{appState:oe,selectedItem:re,config:te}=x(e=>e),[se,ie]=z(l),ce=D("screen",A),pe=D("tree",T),le=D("save",W),{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=V(null),Ae=V(null);r(Ae),a(re?.props.id),X(()=>{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:Qe}=i({mode:se,setMode:ie,onOpenPart:n}),xe=j(),{labelAtLevel:Re,Icon:Oe}=xe,{canAddTo:Fe}=f(),Pe=e=>Re(e,"block",te.components[e]?.label??e),Be=e=>Re(e,"section",Pe(e)),Te=!Se&&S(se)&&re?.props.id===fe,We=je?Fe(je.type)?.spec??null:null,ge=je&&We?`${je.props.id}:${We.slot}`:null,Ye=je&&We&&Array.isArray(je.props[We.slot])?je.props[We.slot]:[],ve=e=>C(e,Pe,xe.plainText),De=(e,r)=>{je&&We&&ge&&(ie(l),We.slider?(o(String(je.props.id),e),ne.select({index:e,zone:ge}),n(String(je.props.id))):(ne.select({index:e,zone:ge}),n(r)))},Ie=()=>{if(!je||!We||!ge)return;const e=Ye.length;ne.insertComponent(ge,We.childType,e),ie(l),We.slider?requestAnimationFrame(()=>{o(String(je.props.id),e),ne.select({index:e,zone:ge})}):ne.select({index:e,zone:ge})},Me=e=>E(te,e),be=e=>{const{parentId:n,slot:o}=b(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},ze=(e,n,o)=>{const r=Math.min(Math.max(o,0),be(e)),t=n<r?r-1:r;t!==n&&(ne.reorderComponent(e,n,t),ie(l),ne.select({index:t,zone:e}))},Ve=I({keyOf:e=>e.id,readOnly:Boolean(_),canDrop:(e,n)=>M(n)===e.zone&&n.index>=0&&n.index<=be(e.zone),onDrop:(e,n)=>ze(e.zone,e.index,n.index),onStep:(e,n)=>ze(e.zone,e.index,n<0?e.index-1:e.index+2)}),Xe=(e,n)=>/* @__PURE__ */L(B,{..._?{}:Ve.seam({place:{...b(e),index:n}})},`seam:${e}:${n}`),we=e=>xe.blockRowName(e,Pe),Ke=(e,o,r)=>{ie(l),ne.select({index:o,zone:e}),n(r)},Ze=(e,n,o)=>{ne.insertComponent(e,n,o),ie(l),ne.select({index:o,zone:e})},Je=(n,o,r)=>/* @__PURE__ */L(e,{choices:r,onPick:e=>Ze(n,e,o)}),Ue=(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 U(G,{children:[o.map(({child:e,zone:o,index:r})=>{const t=re?.props.id===e.props.id,i=Q(te,e.type,n),c=s(e),p=String(e.props.id),m=()=>Ke(o,r,p),{rowProps:d,...u}=Ve.row({item:{id:p,zone:o,index:r},place:{...b(o),index:r}},{onClick:H(m)});/* @__PURE__ */
|
|
3
|
+
return U(K,{children:[0===r&&Xe(o,0),
|
|
4
|
+
/* @__PURE__ */L(F,{words:pe,icon:/* @__PURE__ */L(Oe,{type:e.type,size:13}),name:c,selected:t,onSelect:m,...u,actions:/* @__PURE__ */L(P,{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(J,{size:13})}),rowProps:d}),i&&/* @__PURE__ */L(O,{children:Ue(e,n+1)}),Xe(o,r+1)]},String(e.props.id??`${o}-${r}`))}),r&&t?Je(`${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),He=Boolean(je)&&(Boolean(We)||Ne||Se||Le||Ge);/* @__PURE__ */
|
|
5
|
+
return U("div",{ref:Ae,className:"sf-editor es-editor",style:v(s),children:[
|
|
6
|
+
/* @__PURE__ */L("div",{className:"sf-section-bar",children:/* @__PURE__ */L(Y,null!==ee?{tone:"off",label:ee,role:"status"}:{...g(q,le),role:"status"})}),
|
|
7
|
+
/* @__PURE__ */U("div",{className:"sf-body",children:[He&&je&&/* @__PURE__ */U("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
|
|
8
|
+
/* @__PURE__ */L("div",{className:"sf-panel-head",children:/* @__PURE__ */L(Z,{content:Se?ce.headerSettings:ce.sectionSettings({name:Be(je.type)}),side:"bottom",children:/* @__PURE__ */L("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(Te?"is-selected":""),"aria-pressed":Te,onClick:()=>{Se?ie(ae??l):(ie(l),ne.select({index:0}))},children:Be(je.type)})})}),
|
|
9
|
+
/* @__PURE__ */L(R,{className:"sf-tree sf-scroll",rootProps:Ve.rootProps(),words:pe,children:/* @__PURE__ */L(O,{children:Se?
|
|
10
|
+
/* @__PURE__ */L(F,{words:pe,icon:/* @__PURE__ */L(Oe,{type:"header",size:13}),name:ce.headerSettings,selected:se.kind===ae?.kind,onSelect:()=>ie(ae??l),rowProps:{onClick:H(()=>ie(ae??l))}}):We?/* @__PURE__ */U(G,{children:[Ye.map((e,n)=>{const o=re?.props.id===e.props.id,r=ve(e),t=String(e.props.id),s=()=>De(n,t),{rowProps:i,...c}=Ve.row({item:{id:t,zone:ge,index:n},place:{...b(ge),index:n}},{onClick:H(s)});/* @__PURE__ */
|
|
11
|
+
return U(K,{children:[0===n&&Xe(ge,0),
|
|
12
|
+
/* @__PURE__ */L(F,{words:pe,icon:/* @__PURE__ */L(Oe,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */L(P,{kind:"delete",label:ce.deleteNamed({name:r}),onClick:()=>{return e=n,void(ge&&(ne.removeComponent(ge,e),ie(l),ne.select(null)));var e},children:/* @__PURE__ */L(J,{size:13})}),rowProps:i}),Xe(ge,n+1)]},String(e.props.id??n))}),
|
|
13
|
+
/* @__PURE__ */U("button",{type:"button",className:"sf-add-card",onClick:Ie,children:[
|
|
14
|
+
/* @__PURE__ */L("span",{className:"sf-plus sf-plus--sm",children:"+"}),We.addLabel]}),fe?Ee.partRows?.(je,$):null]}):Ue(je,1)})})]}),
|
|
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"===Fe(r)?.source?De(n,o):Ke(e,n,o),addChild:(e,n,o,r,t)=>"section"===Fe(t)?.source?Ie():Ze(`${e}:${n}`,o,r),childRowName:ve,blockRowName:we},children:/* @__PURE__ */L(ke,{mode:se,onOpenWebsiteSettings:Ee.openSettings??(()=>{}),onSelectNode:Qe,hideNodeActions:!0})})]}),
|
|
17
|
+
/* @__PURE__ */L(y,{})]})}export{q as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{usePartBridge}from"../../chunk-
|
|
1
|
+
export{usePartBridge}from"../../chunk-O4DQ6O6W.js";import"../../chunk-WOA775T4.js";import"../../chunk-LSGKADNV.js";import"../../chunk-NCXYC7WI.js";import"../../chunk-LX23TCTP.js";import"../../chunk-R4AUZVA3.js";import"../../chunk-TCAAOYQY.js";import"../../chunk-BBD3FLU3.js";import"../../chunk-JQQFB7EZ.js";import"../../chunk-TBY3DFKS.js";import"../../chunk-R76XMEKT.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-6BOOYHHK.js";import"../chunk-GXQCZJOP.js";export{ScreenStoreProvider}from"../chunk-QAVA4V2C.js";import"../chunk-VXAGXHKI.js";import"../chunk-BA5X67LQ.js";import"../chunk-UMBNBCL4.js";import"../chunk-OXZDSOZV.js";import"../chunk-7OCEPOEJ.js";import"../chunk-3QB2ZQXK.js";import"../chunk-5XL2RXFU.js";import"../chunk-7GGNFLHT.js";import"../chunk-22I55W37.js";import"../chunk-LUOY3A3Q.js";import"../chunk-UCZQWQNS.js";import"../chunk-KCBEE2MC.js";import"../chunk-6EDVZBUO.js";import"../chunk-O4DQ6O6W.js";import"../chunk-WOA775T4.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-7PGO4K5M.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-LSGKADNV.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-AJ2SUSET.js";import"../chunk-5NHQ452C.js";import"../chunk-6UAEFOJ4.js";import"../chunk-ANPOR6EY.js";import"../chunk-R4AUZVA3.js";import"../chunk-TCAAOYQY.js";import"../chunk-BBD3FLU3.js";import"../chunk-JQQFB7EZ.js";import"../chunk-TBY3DFKS.js";import"../chunk-R76XMEKT.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";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{boxFieldSet as o}from"../../../chunk-
|
|
1
|
+
import{buttonFieldSet as e}from"../../../chunk-TTCUC2Q3.js";import"../../../chunk-IMAN6IP5.js";import{boxFieldSet as o}from"../../../chunk-5OKOCRXT.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{phoneKey as t}from"../../../chunk-E52W3M5I.js";import{foldMetaOf as n}from"../../../chunk-ANPOR6EY.js";import"../../../chunk-BBD3FLU3.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};
|
|
@@ -57,6 +57,15 @@ type BoxFieldRenderProps<V> = {
|
|
|
57
57
|
* by value: a node that stores nothing holds `undefined`.
|
|
58
58
|
*/
|
|
59
59
|
storedValue?: unknown;
|
|
60
|
+
/** The editor is read-only (a sent campaign opens so): the row draws its
|
|
61
|
+
* controls disabled. */
|
|
62
|
+
readOnly?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* The value this row's EMPTY state follows, when it is a phone twin
|
|
65
|
+
* ({@link phoneTwinFields}): the desktop value. Tested by KEY: a desktop
|
|
66
|
+
* that stores nothing passes `undefined`.
|
|
67
|
+
*/
|
|
68
|
+
follows?: unknown;
|
|
60
69
|
id?: string;
|
|
61
70
|
name?: string;
|
|
62
71
|
};
|
|
@@ -180,6 +189,114 @@ declare const SIDE_PAD_KEYS: Record<PadSide, string>;
|
|
|
180
189
|
/** The props one edit of the row writes: only the sides that changed, each to
|
|
181
190
|
* its number or to `undefined` (cleared: the side follows again). */
|
|
182
191
|
declare function sidesPaddingPatch(keys: Record<PadSide, string>, before: SidesValue, next: SidesValue): Record<string, number | undefined>;
|
|
192
|
+
/** A padding stored as ONE object (the email designer's `padding`), as the
|
|
193
|
+
* row's four sides. A bare number is every side (an old Group's shape); a
|
|
194
|
+
* side that is not a number is empty — it follows. */
|
|
195
|
+
declare function sidesFromObject(stored: unknown): SidesValue;
|
|
196
|
+
/** What the row writes to a padding object: only the sides that hold a
|
|
197
|
+
* number (0 is a number), and `undefined` — nothing stored, the padding
|
|
198
|
+
* follows — when none does. */
|
|
199
|
+
declare function sidesToObject(sides: SidesValue): Partial<Record<PadSide, number>> | undefined;
|
|
200
|
+
/**
|
|
201
|
+
* Where a host keeps a row's value. The two editors store the same setting in
|
|
202
|
+
* different shapes: the website beside the other props (`buttonColor`), the
|
|
203
|
+
* email designer inside one object (`button.background`, {@link objectAccess}).
|
|
204
|
+
* The row is the same; only this differs, and no stored key moves (plan
|
|
205
|
+
* [PLAN] Fill Editor Gaps Both Ways: 0 data moves).
|
|
206
|
+
*/
|
|
207
|
+
interface ValueAccess {
|
|
208
|
+
/** The value stored for `key` on a node. */
|
|
209
|
+
read: (values: Record<string, unknown>, key: string) => unknown;
|
|
210
|
+
/** The props one write of the value makes (`undefined`: a clear). */
|
|
211
|
+
write: (values: Record<string, unknown>, key: string, next: unknown) => Record<string, unknown>;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Values kept in ONE object prop (`button: { background, color }`). `names`
|
|
215
|
+
* maps a row's key to its name inside the object; a key it does not name
|
|
216
|
+
* keeps its own. A write keeps the object's other keys; a clear removes only
|
|
217
|
+
* its own, and an object left empty is removed too.
|
|
218
|
+
*/
|
|
219
|
+
declare function objectAccess(objectKey: string, names?: Readonly<Record<string, string>>): ValueAccess;
|
|
220
|
+
/**
|
|
221
|
+
* The value `key` holds through `access` on the selected node, and the write
|
|
222
|
+
* that changes it there. `own` is the row's own field (`value` / `onChange`):
|
|
223
|
+
* given, the row reads and writes its own field, as any row does. Without an
|
|
224
|
+
* editor above (a guard, a harness) a value kept elsewhere reads as absent and
|
|
225
|
+
* a write does nothing: the field key itself stores nothing.
|
|
226
|
+
*/
|
|
227
|
+
declare function useAccessValue(access: ValueAccess, key: string, own?: {
|
|
228
|
+
value: unknown;
|
|
229
|
+
onChange: (next: unknown) => void;
|
|
230
|
+
}): [unknown, (next: unknown) => void];
|
|
231
|
+
/**
|
|
232
|
+
* ONE write of several values through `access` on the selected node: one
|
|
233
|
+
* merged patch, one `onChangeMany`. A click that changes two values (a Reset
|
|
234
|
+
* that clears a colour and its opacity) must use this, never two writes: a
|
|
235
|
+
* write awaits the node's resolver before it lands, so a second write built
|
|
236
|
+
* on the node from before the first puts back what the first changed.
|
|
237
|
+
* Without an editor above it writes nothing.
|
|
238
|
+
*/
|
|
239
|
+
declare function useAccessPatch(access: ValueAccess): (changes: readonly (readonly [string, unknown])[]) => void;
|
|
240
|
+
/** Values kept beside the other props, under their own key (the website). */
|
|
241
|
+
declare const FLAT_ACCESS: ValueAccess;
|
|
242
|
+
/**
|
|
243
|
+
* Where a host keeps a row's PHONE value (twins plan E2). The website keeps
|
|
244
|
+
* it beside the desktop key (`gapPhone`, {@link PHONE_KEY_ACCESS}); the email
|
|
245
|
+
* designer keeps every phone value in one object (`mobile.gap`,
|
|
246
|
+
* {@link phoneObjectAccess}). The row is the same; only this differs, and no
|
|
247
|
+
* stored key moves.
|
|
248
|
+
*/
|
|
249
|
+
interface PhoneValueAccess extends ValueAccess {
|
|
250
|
+
/** The key the phone row is declared under in the host's fields. */
|
|
251
|
+
fieldKey: (key: string) => string;
|
|
252
|
+
/** The phone value is stored under `fieldKey` itself, so the row reads and
|
|
253
|
+
* writes through its own field (`value` / `onChange`), as any row does. */
|
|
254
|
+
ownField?: boolean;
|
|
255
|
+
}
|
|
256
|
+
/** The website's phone values: `phoneKey(key)`, beside the desktop key. */
|
|
257
|
+
declare const PHONE_KEY_ACCESS: PhoneValueAccess;
|
|
258
|
+
/**
|
|
259
|
+
* Phone values kept in ONE object prop (the email designer's `mobile`). A
|
|
260
|
+
* write keeps the object's other keys; a clear removes only its own, and an
|
|
261
|
+
* object left empty is removed too. The phone row is declared under
|
|
262
|
+
* `_<objectKey>_<key>`, a key nothing stores.
|
|
263
|
+
*/
|
|
264
|
+
declare function phoneObjectAccess(objectKey: string): PhoneValueAccess;
|
|
265
|
+
/**
|
|
266
|
+
* A row WITH its phone value (twins plan E2: "phone values in phone view, on
|
|
267
|
+
* the same row", Lewis 2026-10-27): the row under `key` (Desktop view only)
|
|
268
|
+
* and its twin (Phone view only) under `access.fieldKey(key)`. The twin is the
|
|
269
|
+
* same row given `follows`, the desktop value: empty, it rests on that and
|
|
270
|
+
* says so. A clear writes nothing — never a copy of the desktop value.
|
|
271
|
+
*/
|
|
272
|
+
declare function phoneTwinFields<V>(key: string, row: BoxField<V>, access?: PhoneValueAccess): Record<string, BoxField<V>>;
|
|
273
|
+
/** A slider's label-line mark, as a function of the STORED value. */
|
|
274
|
+
type SliderAction = (value: unknown, onChange: (v: unknown) => void) => ReactNode;
|
|
275
|
+
/**
|
|
276
|
+
* A slider whose value may be EMPTY, and what empty means (twins plan E2,
|
|
277
|
+
* 2026-10-30: the email designer's number rows). An empty value follows a
|
|
278
|
+
* number from above — the style's, the campaign's — so the box shows that
|
|
279
|
+
* number in grey, the track rests on it, and the label line names the state
|
|
280
|
+
* (`SettingsDefaultReset`: Default while it follows, Reset once it does not).
|
|
281
|
+
* Emptying the box and Reset both write `undefined`, never the hint.
|
|
282
|
+
*/
|
|
283
|
+
interface SliderClear {
|
|
284
|
+
/** The number an empty value follows. A function is given the render's
|
|
285
|
+
* props, for a hint that is live: it rides the field object (the way
|
|
286
|
+
* `currentValue` does), so it stays a pure read. */
|
|
287
|
+
hint: number | ((props: BoxFieldRenderProps<unknown>) => number);
|
|
288
|
+
/** The word the empty box shows instead of the number, when what it
|
|
289
|
+
* follows is not one ("Auto": a picture's own height). */
|
|
290
|
+
emptyLabel?: string;
|
|
291
|
+
}
|
|
292
|
+
/** What {@link boxFieldBuilders}' `slider` is told past its numbers. */
|
|
293
|
+
interface SliderOptions {
|
|
294
|
+
/** The label line's mark ({@link SliderAction}). A clear draws its own. */
|
|
295
|
+
action?: SliderAction;
|
|
296
|
+
clear?: SliderClear;
|
|
297
|
+
/** The typed box's ceiling, when a typed number may go past the track. */
|
|
298
|
+
inputMax?: number;
|
|
299
|
+
}
|
|
183
300
|
/** What {@link directionField} is told: the directions this container offers,
|
|
184
301
|
* in the order the strip draws them, and the one an absent value means. */
|
|
185
302
|
interface DirectionFieldOptions<V extends string = string> {
|
|
@@ -237,6 +354,15 @@ type PositionOptions = {
|
|
|
237
354
|
type SidesPaddingOptions = {
|
|
238
355
|
/** The four stored keys (default {@link SIDE_PAD_KEYS}). The phone twins are `phoneKey(key)`. */
|
|
239
356
|
keys?: Partial<Record<PadSide, string>>;
|
|
357
|
+
/**
|
|
358
|
+
* The padding is stored as ONE object under `key` (`{ top, right, bottom,
|
|
359
|
+
* left }`, the email designer's shape) instead of four keys. Its phone
|
|
360
|
+
* value is kept where `phone` says (default {@link PHONE_KEY_ACCESS}).
|
|
361
|
+
*/
|
|
362
|
+
object?: {
|
|
363
|
+
key: string;
|
|
364
|
+
phone?: PhoneValueAccess;
|
|
365
|
+
};
|
|
240
366
|
/** Give the row a phone twin (shown in phone view only). Default true. */
|
|
241
367
|
phone?: boolean;
|
|
242
368
|
/** What an EMPTY side draws, per side, shown in grey (default 0). */
|
|
@@ -344,7 +470,7 @@ declare function placementGridView(say: BoxFieldSay, { label, value, onChange, p
|
|
|
344
470
|
* builders exported below are this with no `say`, in English.
|
|
345
471
|
*/
|
|
346
472
|
declare function boxFieldBuilders(say?: BoxFieldSay): {
|
|
347
|
-
slider: (label: string, icon: ReactElement, min: number, max: number, step: number, fallback: number, suffix?: string,
|
|
473
|
+
slider: (label: string, icon: ReactElement, min: number, max: number, step: number, fallback: number, suffix?: string, actionOrOptions?: SliderAction | SliderOptions) => BoxField<number>;
|
|
348
474
|
select: (label: string, icon: ReactElement, options: readonly SelectOption[], fallback: string, note?: string) => SelectField;
|
|
349
475
|
Segmented: <V = string>(props: Parameters<typeof segmentedStrip<V>>[1]) => react.JSX.Element;
|
|
350
476
|
segmented: {
|
|
@@ -399,7 +525,7 @@ declare function boxFieldBuilders(say?: BoxFieldSay): {
|
|
|
399
525
|
};
|
|
400
526
|
};
|
|
401
527
|
/** The builders in English (no host's `say`). */
|
|
402
|
-
declare const slider: (label: string, icon: ReactElement, min: number, max: number, step: number, fallback: number, suffix?: string,
|
|
528
|
+
declare const slider: (label: string, icon: ReactElement, min: number, max: number, step: number, fallback: number, suffix?: string, actionOrOptions?: SliderAction | SliderOptions) => BoxField<number>;
|
|
403
529
|
declare const select: (label: string, icon: ReactElement, options: readonly SelectOption[], fallback: string, note?: string) => SelectField;
|
|
404
530
|
declare const Segmented: <V = string>(props: Parameters<typeof segmentedStrip<V>>[1]) => react.JSX.Element;
|
|
405
531
|
declare const segmented: {
|
|
@@ -453,4 +579,4 @@ declare const boxFieldSet: (opts?: BoxFieldSetOptions) => {
|
|
|
453
579
|
_gNudge: BoxField<undefined>;
|
|
454
580
|
};
|
|
455
581
|
|
|
456
|
-
export { ANCHOR_LABELS, type AlignmentOptions, 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, type BlockAlignmentOptions, BlockAlignmentStrip, type BoxAlign, type BoxField, type BoxFieldRenderProps, type BoxFieldSay, type BoxFieldSetOptions, type BoxFlexRowOptions, type BoxJustify, type BoxPlacement, type BoxWrap, type DirectionFieldOptions, type GapFieldOptions, OPEN_PLACEMENT_POINTS, type PlacementFieldOptions, PlacementGridView, type PlacementPoint, type PositionOptions, SIDE_PAD_KEYS, Segmented, type SelectField, type SelectOption, type SidesPaddingOptions, alignmentField, alignmentFields, blockAlignmentField, blockAlignmentFields, boxAlignField, boxFieldBuilders, boxFieldSet, boxJustifyField, boxWrapField, directionField, gapField, group, iconOf, isNoGlyph, noGlyph, normaliseBoxPlacement, placementField, positionFields, positionPatch, section, segmented, select, sharedStyleKinds, sidesPaddingFields, sidesPaddingPatch, slider };
|
|
582
|
+
export { ANCHOR_LABELS, type AlignmentOptions, 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, type BlockAlignmentOptions, BlockAlignmentStrip, type BoxAlign, type BoxField, type BoxFieldRenderProps, type BoxFieldSay, type BoxFieldSetOptions, type BoxFlexRowOptions, type BoxJustify, type BoxPlacement, type BoxWrap, type DirectionFieldOptions, FLAT_ACCESS, type GapFieldOptions, OPEN_PLACEMENT_POINTS, PHONE_KEY_ACCESS, type PhoneValueAccess, type PlacementFieldOptions, PlacementGridView, type PlacementPoint, type PositionOptions, SIDE_PAD_KEYS, Segmented, type SelectField, type SelectOption, type SidesPaddingOptions, type SliderAction, type SliderClear, type SliderOptions, type ValueAccess, alignmentField, alignmentFields, blockAlignmentField, blockAlignmentFields, boxAlignField, boxFieldBuilders, boxFieldSet, boxJustifyField, boxWrapField, directionField, gapField, group, iconOf, isNoGlyph, noGlyph, normaliseBoxPlacement, objectAccess, phoneObjectAccess, phoneTwinFields, placementField, positionFields, positionPatch, section, segmented, select, sharedStyleKinds, sidesFromObject, sidesPaddingFields, sidesPaddingPatch, sidesToObject, slider, useAccessPatch, useAccessValue };
|
|
@@ -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,OPEN_PLACEMENT_POINTS,PlacementGridView,SIDE_PAD_KEYS,Segmented,alignmentField,alignmentFields,blockAlignmentField,blockAlignmentFields,boxAlignField,boxFieldBuilders,boxFieldSet,boxJustifyField,boxWrapField,directionField,gapField,group,iconOf,isNoGlyph,noGlyph,normaliseBoxPlacement,placementField,positionFields,positionPatch,section,segmented,select,sharedStyleKinds,sidesPaddingFields,sidesPaddingPatch,slider}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,alignmentField,alignmentFields,blockAlignmentField,blockAlignmentFields,boxAlignField,boxFieldBuilders,boxFieldSet,boxJustifyField,boxWrapField,directionField,gapField,group,iconOf,isNoGlyph,noGlyph,normaliseBoxPlacement,objectAccess,phoneObjectAccess,phoneTwinFields,placementField,positionFields,positionPatch,section,segmented,select,sharedStyleKinds,sidesFromObject,sidesPaddingFields,sidesPaddingPatch,sidesToObject,slider,useAccessPatch,useAccessValue}from"../../../chunk-5OKOCRXT.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-BBD3FLU3.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";
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { ValueAccess, SidesPaddingOptions, PhoneValueAccess, BoxFieldSay, BoxField } from './box-fields.js';
|
|
2
|
+
import { ColorPreset } from 'efficient-shell/ui';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'efficient-shell/format';
|
|
5
|
+
import '../../../ScreenDocumentContext-DPW_6gOC.js';
|
|
6
|
+
import '../../../blocks/index.js';
|
|
7
|
+
import '../../../types-BljCVdzR.js';
|
|
8
|
+
import '../../../data/index.js';
|
|
9
|
+
import '../../../types-Dq180WRV.js';
|
|
10
|
+
import '../../../resolve-Bz4mszpL.js';
|
|
11
|
+
import '../../../plan-D0DgSLnY.js';
|
|
12
|
+
import '../document-contract.js';
|
|
13
|
+
import '../document-switch.js';
|
|
14
|
+
import '../../../engine-CvXpFE86.js';
|
|
15
|
+
import '../../../edit-lock/index.js';
|
|
16
|
+
import '../admin-bridge.js';
|
|
17
|
+
import '../session.js';
|
|
18
|
+
import '../backend-error.js';
|
|
19
|
+
import '../host-chrome.js';
|
|
20
|
+
import '../links/link-filters.js';
|
|
21
|
+
import '../document-hooks.js';
|
|
22
|
+
import '../section-template-types.js';
|
|
23
|
+
import './content-tree.js';
|
|
24
|
+
import '../shared-section-types.js';
|
|
25
|
+
|
|
26
|
+
/** The keys the Button's style rows store, as the website stores them. */
|
|
27
|
+
declare const BUTTON_STYLE_KEYS: {
|
|
28
|
+
readonly fill: "buttonColor";
|
|
29
|
+
readonly fillOpacity: "buttonFillOpacity";
|
|
30
|
+
readonly border: "buttonBorder";
|
|
31
|
+
readonly text: "buttonTextColor";
|
|
32
|
+
readonly corners: "buttonCorners";
|
|
33
|
+
readonly cornerSides: "buttonCornerSides";
|
|
34
|
+
};
|
|
35
|
+
/** The Button's own padding keys, as the website stores them. */
|
|
36
|
+
declare const BUTTON_PAD_KEYS: {
|
|
37
|
+
readonly top: "buttonPaddingTop";
|
|
38
|
+
readonly right: "buttonPaddingRight";
|
|
39
|
+
readonly bottom: "buttonPaddingBottom";
|
|
40
|
+
readonly left: "buttonPaddingLeft";
|
|
41
|
+
};
|
|
42
|
+
/** What a host tells {@link buttonFieldSet}. Values only: every host gets
|
|
43
|
+
* every row. */
|
|
44
|
+
interface ButtonFieldSetOptions {
|
|
45
|
+
/** What each empty style row follows, as hooks: the site's button colours
|
|
46
|
+
* on the website, the campaign's accent and button styles in an email. */
|
|
47
|
+
follows: {
|
|
48
|
+
useFill: () => string;
|
|
49
|
+
useText: () => string;
|
|
50
|
+
useBorder: () => {
|
|
51
|
+
width: number;
|
|
52
|
+
color: string;
|
|
53
|
+
};
|
|
54
|
+
useCorners: () => number;
|
|
55
|
+
/** What an unset Fill opacity draws. 100 when left out. */
|
|
56
|
+
useFillOpacity?: () => number;
|
|
57
|
+
};
|
|
58
|
+
/** The colours each colour window offers first. */
|
|
59
|
+
usePresets?: () => readonly ColorPreset[];
|
|
60
|
+
/** What a colour row's Reset says it goes back to (`#2E2E2E from Styles`). */
|
|
61
|
+
resetTo?: (hex: string) => string;
|
|
62
|
+
/** Where the style values are kept. Left out: each under its own key. */
|
|
63
|
+
style?: ValueAccess;
|
|
64
|
+
/** The Padding row. `fallback` is the HOST's: what an empty side draws
|
|
65
|
+
* (the website's Btn classes, the campaign's Button padding). The set keeps
|
|
66
|
+
* no number of its own. `object` is the email designer's storage. */
|
|
67
|
+
padding: SidesPaddingOptions & {
|
|
68
|
+
fallback: NonNullable<SidesPaddingOptions['fallback']>;
|
|
69
|
+
};
|
|
70
|
+
/** Where the alignment's phone value is kept (default `alignPhone`). */
|
|
71
|
+
phone?: PhoneValueAccess;
|
|
72
|
+
/** The host's words. */
|
|
73
|
+
say?: BoxFieldSay;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* The Button's rows, in the order the panel shows them. The order is
|
|
77
|
+
* load-bearing: the inspector is a FLAT SIBLING LIST, so a heading precedes
|
|
78
|
+
* its rows and never wraps them.
|
|
79
|
+
*/
|
|
80
|
+
declare function buttonFieldSet(opts: ButtonFieldSetOptions): {
|
|
81
|
+
align: BoxField<string>;
|
|
82
|
+
_dDesign: BoxField<undefined>;
|
|
83
|
+
buttonColor: BoxField<unknown>;
|
|
84
|
+
buttonFillOpacity: BoxField<unknown> & {
|
|
85
|
+
reachedBy: string;
|
|
86
|
+
};
|
|
87
|
+
buttonBorder: BoxField<unknown>;
|
|
88
|
+
buttonTextColor: BoxField<unknown>;
|
|
89
|
+
buttonCorners: BoxField<unknown>;
|
|
90
|
+
buttonCornerSides: BoxField<unknown> & {
|
|
91
|
+
reachedBy: string;
|
|
92
|
+
};
|
|
93
|
+
_dLayout: BoxField<undefined>;
|
|
94
|
+
_dSize: BoxField<undefined>;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export { BUTTON_PAD_KEYS, BUTTON_STYLE_KEYS, type ButtonFieldSetOptions, buttonFieldSet };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{BUTTON_PAD_KEYS,BUTTON_STYLE_KEYS,buttonFieldSet}from"../../../chunk-TTCUC2Q3.js";import"../../../chunk-IMAN6IP5.js";import"../../../chunk-5OKOCRXT.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-E52W3M5I.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-BBD3FLU3.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{DEVICE_HIDDEN_ATTR,DEVICE_NOTE,deviceField,deviceNote,shownTier,withoutDeviceGate}from"../../../chunk-
|
|
1
|
+
export{DEVICE_HIDDEN_ATTR,DEVICE_NOTE,deviceField,deviceNote,shownTier,withoutDeviceGate}from"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-Q3VAJMXS.js";export{DEVICE_FIELD_MARKER,deviceMetaOf}from"../../../chunk-YCSZAP7T.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-BSPCSC45.js";
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { ReactNode, ReactElement } from 'react';
|
|
2
|
+
import { BoxField } from './box-fields.js';
|
|
3
|
+
import { MEDIA_FIELD_MARKER } from './field-markers.js';
|
|
4
|
+
import 'efficient-shell/format';
|
|
5
|
+
import 'efficient-shell/ui';
|
|
6
|
+
import '../../../ScreenDocumentContext-DPW_6gOC.js';
|
|
7
|
+
import '../../../blocks/index.js';
|
|
8
|
+
import '../../../types-BljCVdzR.js';
|
|
9
|
+
import '../../../data/index.js';
|
|
10
|
+
import '../../../types-Dq180WRV.js';
|
|
11
|
+
import '../../../resolve-Bz4mszpL.js';
|
|
12
|
+
import '../../../plan-D0DgSLnY.js';
|
|
13
|
+
import '../document-contract.js';
|
|
14
|
+
import '../document-switch.js';
|
|
15
|
+
import '../../../engine-CvXpFE86.js';
|
|
16
|
+
import '../../../edit-lock/index.js';
|
|
17
|
+
import '../admin-bridge.js';
|
|
18
|
+
import '../session.js';
|
|
19
|
+
import '../backend-error.js';
|
|
20
|
+
import '../host-chrome.js';
|
|
21
|
+
import '../links/link-filters.js';
|
|
22
|
+
import '../document-hooks.js';
|
|
23
|
+
import '../section-template-types.js';
|
|
24
|
+
import './content-tree.js';
|
|
25
|
+
import '../shared-section-types.js';
|
|
26
|
+
import './text-control-kinds.js';
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* THE ONE IMAGE ROW of both editors (twins plan E3, 2026-10-30: the final is
|
|
30
|
+
* easel's row, the look unchanged).
|
|
31
|
+
*
|
|
32
|
+
* Both editors drew efficient-shell's `MediaUploadField` in a row of their
|
|
33
|
+
* own: the website's `MediaUploadField` component (web-builder), the email
|
|
34
|
+
* designer's `emailImageField` (admin portal). Both already asked the library
|
|
35
|
+
* through easel's {@link requestMediaPick}, so the row is easel's: the shell's
|
|
36
|
+
* box, the host's library, and the options only one editor needed until now.
|
|
37
|
+
*
|
|
38
|
+
* - `pickOptions`: the field's own terms for the host's panel (the email
|
|
39
|
+
* Banner's `{ bakeableOnly: true }`).
|
|
40
|
+
* - `paste`: the email's "or paste an image URL" box, for a tenant with no
|
|
41
|
+
* library and for an already-hosted URL. The host's `tidy` runs when the
|
|
42
|
+
* author leaves the box, never per keystroke.
|
|
43
|
+
* - `focusKey`: the website's focus point ON the picture. The dot writes the
|
|
44
|
+
* key of the view it is dragged in — the desktop key, or in the phone view
|
|
45
|
+
* its phone twin (`phoneKey`), which ↺ clears back to the desktop point.
|
|
46
|
+
* - `frameKey`: a picked video's own still. The video and its still go in ONE
|
|
47
|
+
* change: two writes race, and the second is built on the node from before
|
|
48
|
+
* the first, which is then lost.
|
|
49
|
+
* - The template note: a document that cannot hold media
|
|
50
|
+
* (`capabilities.mediaEditing` false, a website template) draws a note in
|
|
51
|
+
* place of the box, so no media can be chosen against a template.
|
|
52
|
+
*
|
|
53
|
+
* What is stored does not change: a URL string. The value read may also be a
|
|
54
|
+
* picture that names its file (`{ src, assetId }`): the box shows its `src`.
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
/** A stored picture: a URL, or a picture that names its file. */
|
|
58
|
+
type ImageValue = string | {
|
|
59
|
+
src?: string | null;
|
|
60
|
+
} | null | undefined;
|
|
61
|
+
/** The URL a stored picture shows. */
|
|
62
|
+
declare function imageValueSrc(value: unknown): string;
|
|
63
|
+
type ImageRowOptions = {
|
|
64
|
+
/** Default image. A video row draws the play glyph and asks for `video/*`. */
|
|
65
|
+
kind?: 'image' | 'video';
|
|
66
|
+
/** The box's own `accept`, where a row takes fewer formats than its kind
|
|
67
|
+
* (a baked picture takes no SVG). */
|
|
68
|
+
accept?: string;
|
|
69
|
+
/** The small kind hint under the box's call to action ("JPG · PNG · WEBP"). */
|
|
70
|
+
acceptHint?: ReactNode;
|
|
71
|
+
/** The field's own terms for the host's panel, handed on untouched. */
|
|
72
|
+
pickOptions?: Record<string, unknown>;
|
|
73
|
+
/** The host's upload cap: a bigger dropped file is refused at the box. */
|
|
74
|
+
maxSizeBytes?: number;
|
|
75
|
+
/** The filled box's height. Default the shell's. */
|
|
76
|
+
height?: number;
|
|
77
|
+
placeholder?: ReactNode;
|
|
78
|
+
/** The bin's name ("Remove hero image"). */
|
|
79
|
+
removeLabel?: string;
|
|
80
|
+
/** The "or paste an image URL" box. `open`: drawn at once (no library). */
|
|
81
|
+
paste?: {
|
|
82
|
+
tidy?: (typed: string) => string;
|
|
83
|
+
open?: boolean;
|
|
84
|
+
};
|
|
85
|
+
/** The sibling key that holds this picture's focus point (images only). */
|
|
86
|
+
focusKey?: string;
|
|
87
|
+
/** Whether a point can move anything now, read off the node's values. */
|
|
88
|
+
focusWhen?: (values: Record<string, unknown>) => boolean;
|
|
89
|
+
/** The sibling key that keeps a picked video's still (`posterUrl`). */
|
|
90
|
+
frameKey?: string;
|
|
91
|
+
/** Drawn under the box: a host's own notes (a picture a bake cannot use). */
|
|
92
|
+
note?: (src: string) => ReactNode;
|
|
93
|
+
/** False when the host has no library to choose in: no Change, and an empty
|
|
94
|
+
* box is off. Default true. What only the host knows while it draws (the
|
|
95
|
+
* email's "this tenant has a site") is passed by a host that draws
|
|
96
|
+
* `ImageRow` in its own field render, with `canPick`, `paste.open` and
|
|
97
|
+
* `note` read there. */
|
|
98
|
+
canPick?: boolean;
|
|
99
|
+
};
|
|
100
|
+
type ImageRowProps = ImageRowOptions & {
|
|
101
|
+
label: string;
|
|
102
|
+
icon?: ReactNode;
|
|
103
|
+
hint?: ReactNode;
|
|
104
|
+
value: ImageValue;
|
|
105
|
+
onChange: (url: string) => void;
|
|
106
|
+
/** This row's own key: with `frameKey`, the video and its still are written
|
|
107
|
+
* in one change under it. */
|
|
108
|
+
name?: string;
|
|
109
|
+
readOnly?: boolean;
|
|
110
|
+
};
|
|
111
|
+
/** THE image row: the shell's box in a settings row, with the options above. */
|
|
112
|
+
declare function ImageRow({ label, icon, hint, value, onChange, name, readOnly: readOnlyProp, canPick, kind, accept, acceptHint, pickOptions, maxSizeBytes, height, placeholder, removeLabel, paste, focusKey, focusWhen, frameKey, note, }: ImageRowProps): ReactElement;
|
|
113
|
+
/** The image row as a field: `label` and `icon` on the row, the options above. */
|
|
114
|
+
declare function imageField(label: string, icon: ReactNode, opts?: ImageRowOptions): BoxField<unknown> & {
|
|
115
|
+
[MEDIA_FIELD_MARKER]: true;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export { ImageRow, type ImageRowOptions, type ImageRowProps, type ImageValue, imageField, imageValueSrc };
|
|
@@ -0,0 +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-BBD3FLU3.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 y(e){return"string"==typeof e?e:e&&"object"==typeof e&&"string"==typeof e.src?e.src:""}function C({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:B,onChange:E,name:b,readOnly:F,canPick:K=!0,kind:P="image",accept:M,acceptHint:L,pickOptions:Y,maxSizeBytes:D,height:N,placeholder:Q,removeLabel:O,paste:S,focusKey:T,focusWhen:I,frameKey:w,note:H}){const W=l("imageRow",r),X=l("panel",a),x=t(),G=s(),J=p(n),Z="video"===P,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:T,I),[U,z]=h(!1),V=!0===F||!0===G?.readOnly,q=K&&!V;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 $=w&&b?{video:b,frame:w}:null,_=$?e=>e?E(e):G?.onChangeMany({[$.video]:"",[$.frame]:""}):E,ee=$?e=>G?.onChangeMany({[$.video]:e,[$.frame]:""}):E,ne=y(B),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:V}):void 0,te=S&&!V&&(S.open||U);/* @__PURE__ */
|
|
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 $&&!G?Promise.resolve(null):o(x,{accept:M??(Z?"video/*":"image/*"),title:c,...e?{file:e}:{},...Y?{options:Y}:{}}).then(e=>e&&$?(G?.onChangeMany({[$.video]:e.url,[$.frame]:e.posterUrl??""}),null):e?.url??null)},accept:M??(Z?"video/*":"image/*"),acceptHint:L,kind:P,maxSizeBytes:D,height:N,placeholder:Q,removeLabel:O,allowReplace:q,allowRemove:!V,disabled:V||!q&&!ne,focusLabel:W.focus,...A&&!V?{focus:A.focus,onFocusChange:A.set}:A?{focus:A.focus}:{}}),H?.(ne),S&&!V?te?/* @__PURE__ */g(C,{src:ne,onChange:ee,tidy:S.tidy,name:W.pasteName}):/* @__PURE__ */g(d,{variant:"link",size:"sm",onClick:()=>z(!0),children:W.pasteLink}):null]})})}function B(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,B as imageField,y as imageValueSrc};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{copyNodeStyle,nodeStyleRows,planNodePaste,shopFieldKind,siteStyleScope,styleClipboardOf}from"../../../chunk-
|
|
1
|
+
export{copyNodeStyle,nodeStyleRows,planNodePaste,shopFieldKind,siteStyleScope,styleClipboardOf}from"../../../chunk-BA5X67LQ.js";import"../../../chunk-3QB2ZQXK.js";import"../../../chunk-5XL2RXFU.js";import"../../../chunk-7GGNFLHT.js";import"../../../chunk-22I55W37.js";import"../../../chunk-Q3VAJMXS.js";import"../../../chunk-CWELHADJ.js";import"../../../chunk-6WY6ZXJG.js";import"../../../chunk-ANPOR6EY.js";import"../../../chunk-BPXEFVSQ.js";import"../../../chunk-YCSZAP7T.js";import"../../../chunk-MFIRYGHW.js";import"../../../chunk-EUFDQ4KL.js";import"../../../chunk-KXM6YRG2.js";import"../../../chunk-BSPCSC45.js";
|