efficient-easel 0.102.0 → 0.104.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 +45 -4
- package/dist/chunk-4EUWOGZF.js +1 -0
- package/dist/chunk-5D2XAZKH.js +62 -0
- package/dist/chunk-7755VWRT.js +4 -0
- package/dist/chunk-7GVLSNFW.js +1 -0
- package/dist/chunk-A2LFBOUF.js +1 -0
- package/dist/chunk-BBRY7KI4.js +10 -0
- package/dist/chunk-BVN33R76.js +1 -0
- package/dist/chunk-D6324C3E.js +5 -0
- package/dist/chunk-ERR437B5.js +1 -0
- package/dist/chunk-HMWJB3HF.js +1 -0
- package/dist/{chunk-KDYIMJTZ.js → chunk-KCOBHPN6.js} +1 -1
- package/dist/chunk-KVNRNDUC.js +1 -0
- package/dist/chunk-LEGAPYPC.js +1 -0
- package/dist/chunk-LRTIMWZG.js +2 -0
- package/dist/chunk-LXEOVUAV.js +1 -0
- package/dist/{chunk-D7M6IRPJ.js → chunk-NEQIEYYO.js} +1 -1
- package/dist/{chunk-6TZTKAB5.js → chunk-O7Q4DDJT.js} +1 -1
- package/dist/chunk-PYNQRX56.js +4 -0
- package/dist/chunk-Q2HPBMG5.js +1 -0
- package/dist/chunk-QCBWT2XE.js +1 -0
- package/dist/{chunk-7MU3RJ6S.js → chunk-QDEZQ5A6.js} +1 -1
- package/dist/chunk-QOPY2LQM.js +1 -0
- package/dist/{chunk-AKFJK65Z.js → chunk-R2MUSGPS.js} +1 -1
- package/dist/chunk-RSCMJIWS.js +1 -0
- package/dist/{chunk-E7GGVILG.js → chunk-TTENU2HX.js} +1 -1
- package/dist/chunk-UB7JVPK4.js +1 -0
- package/dist/{chunk-VLSTGOVD.js → chunk-YODRYAZX.js} +2 -2
- package/dist/chunk-Z6BAZFSW.js +2 -0
- package/dist/chunk-ZOJEFIP4.js +1 -0
- package/dist/{host-B-byaQxg.d.ts → host-DJ8Gzsx7.d.ts} +93 -21
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/MediaSidePanel.d.ts +3 -2
- package/dist/screen/components/MediaSidePanel.js +1 -1
- package/dist/screen/components/NodeContextMenu.d.ts +47 -2
- 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.d.ts +2 -1
- package/dist/screen/components/ScreenDocumentContext.js +1 -1
- package/dist/screen/components/ScreenMount.d.ts +9 -5
- package/dist/screen/components/ScreenMount.js +1 -1
- package/dist/screen/components/ScreenStoreProvider.d.ts +3 -0
- package/dist/screen/components/ScreenStoreProvider.js +1 -1
- package/dist/screen/components/SectionScreenShell.js +16 -16
- package/dist/screen/components/usePartBridge.d.ts +3 -0
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.d.ts +6 -3
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/admin-bridge.d.ts +2 -0
- package/dist/screen/lib/admin-bridge.js +1 -1
- package/dist/screen/lib/backend-error.d.ts +20 -5
- package/dist/screen/lib/backend-error.js +1 -1
- package/dist/screen/lib/document-addressing.d.ts +2 -1
- package/dist/screen/lib/document-contract.d.ts +7 -0
- package/dist/screen/lib/failure.d.ts +6 -2
- package/dist/screen/lib/failure.js +1 -1
- package/dist/screen/lib/host-inbound.js +1 -1
- package/dist/screen/lib/host.d.ts +3 -2
- package/dist/screen/lib/load-error.d.ts +9 -3
- package/dist/screen/lib/load-error.js +1 -1
- package/dist/screen/lib/media-panel.d.ts +81 -17
- package/dist/screen/lib/media-panel.js +1 -1
- package/dist/screen/lib/media-picker.d.ts +14 -2
- package/dist/screen/lib/media-picker.js +1 -1
- package/dist/screen/lib/page-lock.d.ts +45 -1
- package/dist/screen/lib/page-lock.js +1 -1
- package/dist/screen/lib/puck/content-tree.d.ts +20 -1
- package/dist/screen/lib/puck/content-tree.js +1 -1
- package/dist/screen/lib/puck/device-fields.d.ts +4 -2
- package/dist/screen/lib/puck/section-doc.js +1 -1
- package/dist/screen/lib/puck/slot-child-name.d.ts +18 -3
- package/dist/screen/lib/puck/slot-child-name.js +1 -1
- package/dist/screen/lib/puck/style-clipboard.js +1 -1
- package/dist/screen/lib/puck/use-section-ops.d.ts +6 -0
- package/dist/screen/lib/puck/use-section-ops.js +1 -1
- package/dist/screen/lib/screen-parts.d.ts +171 -4
- package/dist/screen/lib/screen-parts.js +1 -1
- package/dist/screen/lib/section-templates.d.ts +25 -1
- package/dist/screen/lib/section-templates.js +1 -1
- package/dist/screen/lib/session-context.d.ts +5 -1
- package/dist/screen/lib/session-context.js +1 -1
- package/dist/screen/lib/session.d.ts +58 -5
- package/dist/screen/lib/session.js +1 -1
- package/dist/screen/screen.css +14 -0
- package/dist/screen/words.d.ts +65 -0
- package/dist/screen/words.js +1 -0
- package/dist/strings/catalogue.d.ts +9 -2
- package/dist/strings/catalogue.js +1 -1
- package/dist/strings/index.d.ts +1 -0
- package/dist/strings/index.js +1 -1
- package/dist/tree/index.d.ts +4 -142
- package/dist/types-DJDBtdB2.d.ts +143 -0
- package/package.json +6 -1
- package/dist/chunk-3U4GP5VA.js +0 -10
- package/dist/chunk-5464H65G.js +0 -4
- package/dist/chunk-6FY3PZS3.js +0 -1
- package/dist/chunk-7RNTMJER.js +0 -5
- package/dist/chunk-A7ZJII7O.js +0 -1
- package/dist/chunk-AJBJ74ME.js +0 -1
- package/dist/chunk-AKZWUV5Z.js +0 -1
- package/dist/chunk-F2FPZIZV.js +0 -62
- package/dist/chunk-F6CCTEIX.js +0 -1
- package/dist/chunk-FT35FX7D.js +0 -2
- package/dist/chunk-FUDHI5I4.js +0 -1
- package/dist/chunk-HMX55DYT.js +0 -1
- package/dist/chunk-HWW4XJOH.js +0 -1
- package/dist/chunk-J4RAY75C.js +0 -1
- package/dist/chunk-PP44LCJM.js +0 -1
- package/dist/chunk-Q3SQBNJB.js +0 -1
- package/dist/chunk-TEZ6V6PA.js +0 -4
- package/dist/chunk-UH7TGWHR.js +0 -1
- package/dist/chunk-UVWVYMMZ.js +0 -1
- package/dist/chunk-VV5ADNBR.js +0 -1
- package/dist/chunk-ZZ7VLIHQ.js +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import{AddBlockRow as e}from"../../chunk-
|
|
2
|
-
return
|
|
3
|
-
return w
|
|
4
|
-
/* @__PURE__ */
|
|
5
|
-
return
|
|
6
|
-
/* @__PURE__ */
|
|
7
|
-
/* @__PURE__ */
|
|
8
|
-
/* @__PURE__ */
|
|
9
|
-
/* @__PURE__ */
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
-
return w
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
-
/* @__PURE__ */
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
1
|
+
import{AddBlockRow as e}from"../../chunk-NEQIEYYO.js";import{slotChildRowName as n}from"../../chunk-QOPY2LQM.js";import{scrollPreviewToSection as o,gotoPreviewSlide as r}from"../../chunk-4ES5JGGX.js";import"../../chunk-IQ5TA7AM.js";import"../../chunk-DUVRZ456.js";import"../../chunk-6W7WLPZH.js";import{useEaselUndoKeys as t}from"../../chunk-OM67AJQC.js";import{SlotChildActionsProvider as s}from"../../chunk-KCBEE2MC.js";import{DEFAULT_PANEL_W as i}from"../../chunk-SERF2FAU.js";import{usePartBridge as c}from"../../chunk-TTENU2HX.js";import{useSectionOps as p}from"../../chunk-A2LFBOUF.js";import"../../chunk-IYT6NN2J.js";import{nestsInTree as l,slotFieldsOf as d}from"../../chunk-7GVLSNFW.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import{useScreenDocument as m}from"../../chunk-LRTIMWZG.js";import"../../chunk-QDEZQ5A6.js";import"../../chunk-ERR437B5.js";import"../../chunk-UB7JVPK4.js";import"../../chunk-ZOJEFIP4.js";import"../../chunk-RLBXE4EU.js";import"../../chunk-OYX47SL7.js";import"../../chunk-4EUWOGZF.js";import"../../chunk-KVNRNDUC.js";import"../../chunk-3WSPDAK2.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-HQ4VVRIC.js";import{MediaSidePanel as a}from"../../chunk-PYNQRX56.js";import{SELECTION_MODE as u,useScreenPinned as h,useScreenCanvasFrame as k,useScreenInspectorPanel as j,useScreenPickFollowsSelection as f,sameInspectorMode as N,useStandaloneScreenBridges as y,useScreenBlockLook as S,useScreenBlockRules as C}from"../../chunk-7755VWRT.js";import{useMediaPanel as A,usePanelPick as P,useCancelPanelPick as E}from"../../chunk-Z6BAZFSW.js";import"../../chunk-R5ZVNJLJ.js";import"../../chunk-LEGAPYPC.js";import{useEasel as x}from"../../chunk-P67FP7PG.js";import"../../chunk-AELNNAFM.js";import"../../chunk-BXZ6WLHC.js";import"../../chunk-EOJNJCMJ.js";import{LayersTree as O,Subtree as R,TreeRow as L,TreeRowAction as T,TreeSeam as g}from"../../chunk-ZFDCDJNZ.js";import"../../chunk-ZNS7727Y.js";import"../../chunk-3EDSDPIP.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-KTVH2ZRL.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-BDTITTMW.js";import{saveIndicator as v}from"../../chunk-H6DDIBQ4.js";import{SaveState as J,panelWidthVars as D}from"../../chunk-6DJHRLCU.js";import"../../chunk-ZJEBF4NB.js";import"../../chunk-JUQ6YJCG.js";import"../../chunk-RE4LP46F.js";import"../../chunk-WZ7TGAAT.js";import"../../chunk-2OAZYSWJ.js";import"../../chunk-EWVJSRRY.js";import"../../chunk-P6O363EE.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-BZ5ASXOL.js";import"../../chunk-TTJ54QGG.js";import"../../chunk-O2NLQBFX.js";import{useTreeDrag as z}from"../../chunk-67GNT6PF.js";import"../../chunk-PAELDYYS.js";import"../../chunk-ZNCEOSXO.js";import{TrashIcon as B}from"../../chunk-L5KW4HG5.js";import{zoneKey as F,parseZoneKey as Z}from"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";import{useState as W,useRef as b,useEffect as Q,useCallback as Y,Fragment as w}from"react";import{jsxs as G,jsx as I,Fragment as M}from"react/jsx-runtime";var $=e=>n=>{n.target.closest(".es-tree-select, button")||e()},H={rowClick:$};function K(){const{saveState:K,readOnly:U,readOnlyReason:V=null}=m(),X=p(),{appState:q,selectedItem:_,config:ee}=x(e=>e),[ne,oe]=W(u),[re,te]=W(null),{first:se,last:ie,panelOf:ce}=h(),pe=ce(se),le=k(),de=j(),me=q.data.content?.[0]??null,ae=me?.props.id??null,ue=me?.type===se,he=me?.type===ie,ke=b(null),je=b(null);t(je);const fe=A(),Ne=P(),ye=E();f(_?.props.id),Q(()=>{const e=je.current;if(!Ne||!e)return;const n=e=>{"Escape"===e.key&&ye()};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[Ne]),Q(()=>{ae&&ke.current!==ae&&(ke.current=ae,ue?oe(pe??u):_||X.select({index:0}))},[ae,_,X,ue]);const Se=Y(e=>oe(n=>N(n,e)?n:e),[]),Ce=y({kind:ne.kind,mode:ne,open:Se,show:e=>oe(e),reveal:()=>{}}),{selectNode:Ae}=c({mode:ne,setMode:oe,onOpenPart:o}),Pe=S(),{labelAtLevel:Ee,Icon:xe}=Pe,{canAddTo:Oe}=C(),Re=e=>ee.components[e]?.label??e,Le=e=>Ee(e,"section",Re(e)),Te=!ue&&"puck"===ne.kind&&_?.props.id===ae,ge=me?Oe(me.type)?.spec??null:null,ve=me&&ge?`${me.props.id}:${ge.slot}`:null,Je=me&&ge&&Array.isArray(me.props[ge.slot])?me.props[ge.slot]:[],De=e=>n(e,Re,Pe.plainText),ze=(e,n)=>{me&&ge&&ve&&(oe(u),ge.slider?(r(String(me.props.id),e),X.select({index:e,zone:ve}),o(String(me.props.id))):(X.select({index:e,zone:ve}),o(n)))},Be=()=>{if(!me||!ge||!ve)return;const e=Je.length;X.insertComponent(ve,ge.childType,e),oe(u),ge.slider?requestAnimationFrame(()=>{r(String(me.props.id),e),X.select({index:e,zone:ve})}):X.select({index:e,zone:ve})},Fe=e=>d(ee,e),Ze=e=>{const{parentId:n,slot:o}=Z(e),r=e=>{if(!e)return null;if(String(e.props.id)===n)return e;for(const n of Fe(e.type)){const o=Array.isArray(e.props[n])?e.props[n]:[];for(const e of o){const n=r(e);if(n)return n}}return null},t=r(me)?.props[o];return Array.isArray(t)?t.length:0},We=(e,n,o)=>{const r=Math.min(Math.max(o,0),Ze(e)),t=n<r?r-1:r;t!==n&&(X.reorderComponent(e,n,t),oe(u),X.select({index:t,zone:e}))},be=z({keyOf:e=>e.id,readOnly:Boolean(U),canDrop:(e,n)=>F(n)===e.zone&&n.index>=0&&n.index<=Ze(e.zone),onDrop:(e,n)=>We(e.zone,e.index,n.index),onStep:(e,n)=>We(e.zone,e.index,n<0?e.index-1:e.index+2)}),Qe=(e,n)=>/* @__PURE__ */I(g,{...U?{}:be.seam({place:{...Z(e),index:n}})},`seam:${e}:${n}`),Ye=e=>Pe.blockRowName(e,Re),we=(e,n,r)=>{oe(u),X.select({index:n,zone:e}),o(r)},Ge=(e,n,o)=>{X.insertComponent(e,n,o),oe(u),X.select({index:o,zone:e}),te(null)},Ie=(n,o,r)=>/* @__PURE__ */I(e,{choices:r,open:re===n,onToggle:()=>te(re===n?null:n),onPick:e=>Ge(n,e,o)}),Me=(e,n)=>{const o=Fe((r=e).type).flatMap(e=>(Array.isArray(r.props[e])?r.props[e]:[]).map((n,o)=>({child:n,zone:`${r.props.id}:${e}`,index:o})));var r;const t=Oe(e.type),s=t?.choices??null,i="footer"===t?.source?Ye:De;/* @__PURE__ */
|
|
2
|
+
return G(M,{children:[o.map(({child:e,zone:o,index:r})=>{const t=_?.props.id===e.props.id,s=l(ee,e.type,n),c=i(e),p=String(e.props.id),d=()=>we(o,r,p),{rowProps:m,...a}=be.row({item:{id:p,zone:o,index:r},place:{...Z(o),index:r}},{onClick:$(d)});/* @__PURE__ */
|
|
3
|
+
return G(w,{children:[0===r&&Qe(o,0),
|
|
4
|
+
/* @__PURE__ */I(L,{icon:/* @__PURE__ */I(xe,{type:e.type,size:13}),name:c,selected:t,onSelect:d,...a,actions:/* @__PURE__ */I(T,{kind:"delete",label:`Delete ${c}`,onClick:()=>{return e=o,n=r,X.removeComponent(e,n),oe(u),void X.select(null);var e,n},children:/* @__PURE__ */I(B,{size:13})}),rowProps:m}),s&&/* @__PURE__ */I(R,{children:Me(e,n+1)}),Qe(o,r+1)]},String(e.props.id??`${o}-${r}`))}),t&&s?Ie(`${e.props.id}:${t.slot}`,o.length,s):null]})},$e="HeroSingle"===me?.type,He=Boolean(me)&&(Boolean(ge)||he||ue||$e);/* @__PURE__ */
|
|
5
|
+
return G("div",{ref:je,className:"sf-editor es-editor",style:D(i),children:[
|
|
6
|
+
/* @__PURE__ */I("div",{className:"sf-section-bar",children:/* @__PURE__ */I(J,null!==V?{tone:"off",label:V,role:"status"}:{...v(K),role:"status"})}),
|
|
7
|
+
/* @__PURE__ */G("div",{className:"sf-body",children:[Ne&&fe?/* @__PURE__ */I("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:/* @__PURE__ */I(a,{panel:fe,pick:Ne})}):He&&me&&/* @__PURE__ */G("aside",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:[
|
|
8
|
+
/* @__PURE__ */I("div",{className:"sf-panel-head",children:/* @__PURE__ */I("button",{type:"button",className:"sf-panel-title sf-panel-title--btn "+(Te?"is-selected":""),"aria-pressed":Te,title:ue?"Header settings":`${Le(me.type)} settings`,onClick:()=>{ue?oe(pe??u):(oe(u),X.select({index:0}))},children:Le(me.type)})}),
|
|
9
|
+
/* @__PURE__ */I(O,{className:"sf-tree sf-scroll",rootProps:be.rootProps(),children:/* @__PURE__ */I(R,{children:ue?
|
|
10
|
+
/* @__PURE__ */I(L,{icon:/* @__PURE__ */I(xe,{type:"header",size:13}),name:"Header settings",selected:ne.kind===pe?.kind,onSelect:()=>oe(pe??u),rowProps:{onClick:$(()=>oe(pe??u))}}):ge?/* @__PURE__ */G(M,{children:[Je.map((e,n)=>{const o=_?.props.id===e.props.id,r=De(e),t=String(e.props.id),s=()=>ze(n,t),{rowProps:i,...c}=be.row({item:{id:t,zone:ve,index:n},place:{...Z(ve),index:n}},{onClick:$(s)});/* @__PURE__ */
|
|
11
|
+
return G(w,{children:[0===n&&Qe(ve,0),
|
|
12
|
+
/* @__PURE__ */I(L,{icon:/* @__PURE__ */I(xe,{type:e.type,size:13}),name:r,selected:o,onSelect:s,...c,actions:/* @__PURE__ */I(T,{kind:"delete",label:`Delete ${r}`,onClick:()=>{return e=n,void(ve&&(X.removeComponent(ve,e),oe(u),X.select(null)));var e},children:/* @__PURE__ */I(B,{size:13})}),rowProps:i}),Qe(ve,n+1)]},String(e.props.id??n))}),
|
|
13
|
+
/* @__PURE__ */G("button",{type:"button",className:"sf-add-card",onClick:Be,children:[
|
|
14
|
+
/* @__PURE__ */I("span",{className:"sf-plus sf-plus--sm",children:"+"}),ge.addLabel]}),ae?Ce.partRows?.(me,H):null]}):Me(me,1)})})]}),
|
|
15
|
+
/* @__PURE__ */I("div",{className:"sf-center",children:/* @__PURE__ */I("div",{className:"sf-preview-host",children:/* @__PURE__ */I(le,{})})}),
|
|
16
|
+
/* @__PURE__ */I(s,{value:{selectChild:(e,n,o,r)=>"section"===Oe(r)?.source?ze(n,o):we(e,n,o),addChild:(e,n,o,r,t)=>"section"===Oe(t)?.source?Be():Ge(`${e}:${n}`,o,r),childRowName:De,blockRowName:Ye},children:/* @__PURE__ */I(de,{mode:ne,onOpenWebsiteSettings:Ce.openSettings??(()=>{}),onSelectNode:Ae,hideNodeActions:!0})})]})]})}export{K as default};
|
|
@@ -11,10 +11,13 @@ import '../../types-DWS-s9z-.js';
|
|
|
11
11
|
import '../../wordFit-D4S36PvB.js';
|
|
12
12
|
import '../../edit-lock/index.js';
|
|
13
13
|
import '../../panelWidths-D9hTLR25.js';
|
|
14
|
+
import '../../types-DJDBtdB2.js';
|
|
15
|
+
import '../../words-DgHcY5qB.js';
|
|
14
16
|
import '../lib/host-chrome.js';
|
|
15
17
|
import '../lib/links/link-filters.js';
|
|
16
18
|
import '../../LinkPicker-W2Rtxetz.js';
|
|
17
19
|
import '../lib/session.js';
|
|
20
|
+
import '../lib/backend-error.js';
|
|
18
21
|
import '../lib/document-contract.js';
|
|
19
22
|
import '../lib/document-hooks.js';
|
|
20
23
|
import '../lib/section-template-types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{usePartBridge}from"../../chunk-
|
|
1
|
+
export{usePartBridge}from"../../chunk-TTENU2HX.js";import"../../chunk-A2LFBOUF.js";import"../../chunk-IYT6NN2J.js";import"../../chunk-7GVLSNFW.js";import"../../chunk-I54UCYOU.js";import"../../chunk-GOTN2KY4.js";import"../../chunk-R5L2E7JX.js";import"../../chunk-7755VWRT.js";import"../../chunk-Z6BAZFSW.js";import"../../chunk-R5ZVNJLJ.js";import"../../chunk-P67FP7PG.js";import"../../chunk-AELNNAFM.js";import"../../chunk-BXZ6WLHC.js";import"../../chunk-EOJNJCMJ.js";import"../../chunk-ZFDCDJNZ.js";import"../../chunk-ZNS7727Y.js";import"../../chunk-3EDSDPIP.js";import"../../chunk-QTLAVDJE.js";import"../../chunk-YRLPFZW3.js";import"../../chunk-KTVH2ZRL.js";import"../../chunk-D2BCHTQR.js";import"../../chunk-EWVJSRRY.js";import"../../chunk-P6O363EE.js";import"../../chunk-FPOKPNO4.js";import"../../chunk-MFIRYGHW.js";import"../../chunk-BZ5ASXOL.js";import"../../chunk-67GNT6PF.js";import"../../chunk-ZNCEOSXO.js";import"../../chunk-L5KW4HG5.js";import"../../chunk-KRXQM65X.js";import"../../chunk-NKB3KVAB.js";
|
package/dist/screen/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { DocumentScreen, default as ScreenMount } from './components/ScreenMount.js';
|
|
2
2
|
export { default as ScreenStoreProvider } from './components/ScreenStoreProvider.js';
|
|
3
|
-
export { NodeDefaults, SELECTION_MODE, ScreenBlockLook, ScreenBlockRules, ScreenBridges, ScreenCanvas, ScreenDevices, ScreenDocumentOps, ScreenInspector, ScreenInspectorMode, ScreenInspectorPanelProps, ScreenLeftPanel, ScreenLeftView, ScreenLeftViewFrame, ScreenLeftViewRules, ScreenNewNode, ScreenNode, ScreenNodeLevel, ScreenNodeMaker, ScreenPartMode, ScreenParts, ScreenPartsProvider, ScreenPinnedNodes, ScreenRailItem, ScreenTree, ScreenTreeFolds, ScreenTreeRows, sameInspectorMode, useScreenBlockLook, useScreenBlockRules, useScreenBridges, useScreenCanvasFrame, useScreenDevices, useScreenDocumentPass, useScreenInspectorPanel, useScreenLeftView, useScreenOwnerName, useScreenParts, useScreenPinned, useStandaloneScreenBridges } from './lib/screen-parts.js';
|
|
4
|
-
export { EFFICIENT_BACKEND, EaselSession, SessionBackend, SessionBlocks, activateEaselSession, backendOf, createEaselSession, currentEaselSession, deactivateEaselSession, efficientClientOpen, isEfficientBackend, provideDefaultBackend, resetAmbientEaselSession, sessionRegistry, setSessionBridgedSite, setSessionDocumentSite } from './lib/session.js';
|
|
3
|
+
export { NodeDefaults, SELECTION_MODE, ScreenBlockLook, ScreenBlockRules, ScreenBridges, ScreenCanvas, ScreenDevices, ScreenDocumentOps, ScreenInspector, ScreenInspectorMode, ScreenInspectorPanelProps, ScreenLeftPanel, ScreenLeftView, ScreenLeftViewFrame, ScreenLeftViewRules, ScreenNewNode, ScreenNode, ScreenNodeActions, ScreenNodeLevel, ScreenNodeMaker, ScreenPartMode, ScreenParts, ScreenPartsProvider, ScreenPinnedBand, ScreenPinnedNodes, ScreenRailItem, ScreenTree, ScreenTreeFolds, ScreenTreeRows, isPinnedFirst, isPinnedLast, sameInspectorMode, useScreenBlockLook, useScreenBlockRules, useScreenBridges, useScreenCanvasFrame, useScreenDevices, useScreenDocumentLabel, useScreenDocumentPass, useScreenInspectorPanel, useScreenLeftView, useScreenOwnerName, useScreenParts, useScreenPickFollowsSelection, useScreenPinned, useScreenSaveSwitch, useStandaloneScreenBridges } from './lib/screen-parts.js';
|
|
4
|
+
export { DefaultBackend, EFFICIENT_BACKEND, EaselSession, SessionBackend, SessionBlocks, activateEaselSession, backendOf, createEaselSession, currentEaselSession, deactivateEaselSession, efficientClientOpen, isEfficientBackend, provideDefaultBackend, resetAmbientEaselSession, sessionRegistry, setSessionBridgedSite, setSessionDocumentSite } from './lib/session.js';
|
|
5
5
|
export { EaselSessionProvider, useEaselSession } from './lib/session-context.js';
|
|
6
|
-
export { D as DETACHED_EASEL_HOST, a as DocumentAddressing, E as EaselHost, b as EaselHostAddress, c as EaselHostContext, d as EaselHostProvider, e as EaselMessageType, f as EaselToHostMessage, H as HostPickedMedia, g as HostToEaselMessage, I as InboundHostMessage, N as NO_DOCUMENT_ADDRESSING, S as SectionScreenTarget, h as SendToHost, i as createEaselHost, u as useEaselHost } from '../host-
|
|
6
|
+
export { A as AnyDocumentAddressing, D as DETACHED_EASEL_HOST, a as DocumentAddressing, E as EaselHost, b as EaselHostAddress, c as EaselHostContext, d as EaselHostProvider, e as EaselMessageType, f as EaselToHostMessage, H as HostPickedMedia, g as HostToEaselMessage, I as InboundHostMessage, N as NO_DOCUMENT_ADDRESSING, S as SectionScreenTarget, h as SendToHost, i as createEaselHost, u as useEaselHost } from '../host-DJ8Gzsx7.js';
|
|
7
7
|
export { EaselCapabilities, EaselDocument, EaselDocumentAdapter, EaselPageRow, SiteRecord, SiteRecordPatch, WebsiteEditLock } from './lib/document-contract.js';
|
|
8
8
|
import 'react';
|
|
9
9
|
import '../blocks/index.js';
|
|
@@ -17,12 +17,15 @@ import '../types-DWS-s9z-.js';
|
|
|
17
17
|
import '../wordFit-D4S36PvB.js';
|
|
18
18
|
import '../edit-lock/index.js';
|
|
19
19
|
import '../panelWidths-D9hTLR25.js';
|
|
20
|
+
import '../types-DJDBtdB2.js';
|
|
21
|
+
import '../words-DgHcY5qB.js';
|
|
20
22
|
import './lib/host-chrome.js';
|
|
21
23
|
import './lib/links/link-filters.js';
|
|
22
24
|
import '../LinkPicker-W2Rtxetz.js';
|
|
23
25
|
import './lib/puck/add-target-types.js';
|
|
24
26
|
import './lib/puck/block-choice.js';
|
|
25
27
|
import './lib/puck/slot-section-spec.js';
|
|
28
|
+
import './lib/backend-error.js';
|
|
26
29
|
import './lib/document-hooks.js';
|
|
27
30
|
import './lib/section-template-types.js';
|
|
28
31
|
import './lib/puck/content-tree.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-BBRY7KI4.js";import"../chunk-GXQCZJOP.js";export{ScreenStoreProvider}from"../chunk-YODRYAZX.js";import"../chunk-5D2XAZKH.js";import"../chunk-26OOWIJJ.js";import"../chunk-Q2HPBMG5.js";import"../chunk-FGNR22NY.js";import"../chunk-ZE7I3PLX.js";import"../chunk-R2MUSGPS.js";import"../chunk-PWZOS45R.js";import"../chunk-7F52SZOI.js";import"../chunk-R2HLPNQF.js";import"../chunk-QOPY2LQM.js";import"../chunk-4ES5JGGX.js";import"../chunk-IQ5TA7AM.js";import"../chunk-DUVRZ456.js";import"../chunk-6W7WLPZH.js";import"../chunk-OM67AJQC.js";import"../chunk-KCBEE2MC.js";import"../chunk-5MZ3RNQQ.js";import"../chunk-SERF2FAU.js";import"../chunk-TTENU2HX.js";import"../chunk-A2LFBOUF.js";import"../chunk-IYT6NN2J.js";import"../chunk-HMWJB3HF.js";import"../chunk-7GVLSNFW.js";import"../chunk-LXEOVUAV.js";import"../chunk-BSPCSC45.js";import"../chunk-I54UCYOU.js";import"../chunk-GOTN2KY4.js";import"../chunk-R5L2E7JX.js";import"../chunk-LRTIMWZG.js";import"../chunk-QDEZQ5A6.js";import"../chunk-ERR437B5.js";import"../chunk-UB7JVPK4.js";import"../chunk-ZOJEFIP4.js";export{NO_DOCUMENT_ADDRESSING}from"../chunk-RLBXE4EU.js";import"../chunk-OYX47SL7.js";import"../chunk-4EUWOGZF.js";import"../chunk-KVNRNDUC.js";import"../chunk-3WSPDAK2.js";import"../chunk-57DJOKXT.js";import"../chunk-3QVB4AG2.js";import"../chunk-D6324C3E.js";import"../chunk-5ZBY24K7.js";import"../chunk-GENAF3P6.js";import"../chunk-BVN33R76.js";import"../chunk-IWAPPEL4.js";import"../chunk-KQMML6JM.js";import"../chunk-KCOBHPN6.js";export{EaselSessionProvider,useEaselSession}from"../chunk-O7Q4DDJT.js";export{EFFICIENT_BACKEND,activateEaselSession,backendOf,createEaselSession,currentEaselSession,deactivateEaselSession,efficientClientOpen,isEfficientBackend,provideDefaultBackend,resetAmbientEaselSession,sessionRegistry,setSessionBridgedSite,setSessionDocumentSite}from"../chunk-RSCMJIWS.js";import"../chunk-HQ4VVRIC.js";import"../chunk-PYNQRX56.js";export{SELECTION_MODE,ScreenPartsProvider,isPinnedFirst,isPinnedLast,sameInspectorMode,useScreenBlockLook,useScreenBlockRules,useScreenBridges,useScreenCanvasFrame,useScreenDevices,useScreenDocumentLabel,useScreenDocumentPass,useScreenInspectorPanel,useScreenLeftView,useScreenOwnerName,useScreenParts,useScreenPickFollowsSelection,useScreenPinned,useScreenSaveSwitch,useStandaloneScreenBridges}from"../chunk-7755VWRT.js";import"../chunk-Z6BAZFSW.js";export{DETACHED_EASEL_HOST,EaselHostContext,EaselHostProvider,createEaselHost,useEaselHost}from"../chunk-R5ZVNJLJ.js";import"../chunk-6WY6ZXJG.js";import"../chunk-LEGAPYPC.js";import"../chunk-P67FP7PG.js";import"../chunk-AELNNAFM.js";import"../chunk-BXZ6WLHC.js";import"../chunk-EOJNJCMJ.js";import"../chunk-ZFDCDJNZ.js";import"../chunk-ZNS7727Y.js";import"../chunk-3EDSDPIP.js";import"../chunk-QTLAVDJE.js";import"../chunk-YRLPFZW3.js";import"../chunk-RW4XBUUW.js";import"../chunk-KTVH2ZRL.js";import"../chunk-2LK54I4E.js";import"../chunk-WK3AFPXY.js";import"../chunk-D2BCHTQR.js";import"../chunk-OWBO4WKA.js";import"../chunk-BDTITTMW.js";import"../chunk-H6DDIBQ4.js";import"../chunk-6DJHRLCU.js";import"../chunk-ZJEBF4NB.js";import"../chunk-JUQ6YJCG.js";import"../chunk-RE4LP46F.js";import"../chunk-WZ7TGAAT.js";import"../chunk-2OAZYSWJ.js";import"../chunk-EWVJSRRY.js";import"../chunk-P6O363EE.js";import"../chunk-FPOKPNO4.js";import"../chunk-MFIRYGHW.js";import"../chunk-BZ5ASXOL.js";import"../chunk-TTJ54QGG.js";import"../chunk-O2NLQBFX.js";import"../chunk-67GNT6PF.js";import"../chunk-PAELDYYS.js";import"../chunk-ZNCEOSXO.js";import"../chunk-L5KW4HG5.js";import"../chunk-KRXQM65X.js";import"../chunk-NKB3KVAB.js";
|
|
@@ -6,6 +6,8 @@ import '../../data/index.js';
|
|
|
6
6
|
import '../../types-41704JE4.js';
|
|
7
7
|
import '../../resolve-D68pb3Bx.js';
|
|
8
8
|
import '../../plan-DChbUXdS.js';
|
|
9
|
+
import './backend-error.js';
|
|
10
|
+
import '../../edit-lock/index.js';
|
|
9
11
|
import './host-chrome.js';
|
|
10
12
|
import './links/link-filters.js';
|
|
11
13
|
import '../../LinkPicker-W2Rtxetz.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{NO_BRIDGED_CAPABILITIES,applyAuthGrant,useAdminBridge}from"../../chunk-
|
|
1
|
+
export{NO_BRIDGED_CAPABILITIES,applyAuthGrant,useAdminBridge}from"../../chunk-KVNRNDUC.js";import"../../chunk-3WSPDAK2.js";import"../../chunk-O7Q4DDJT.js";import"../../chunk-RSCMJIWS.js";import"../../chunk-R5ZVNJLJ.js";
|
|
@@ -79,6 +79,8 @@ interface HostFailure {
|
|
|
79
79
|
data: unknown;
|
|
80
80
|
message: string;
|
|
81
81
|
}
|
|
82
|
+
/** How a host's client errors read: the page's (`provideHostFailures`), or
|
|
83
|
+
* one session's own (`createEaselSession({ hostFailures })`, 0.103.0). */
|
|
82
84
|
interface HostFailures {
|
|
83
85
|
/** A host client error as a {@link HostFailure}; null for anything else. */
|
|
84
86
|
read(err: unknown): HostFailure | null;
|
|
@@ -90,17 +92,30 @@ interface HostFailures {
|
|
|
90
92
|
slug: string;
|
|
91
93
|
}): string | null;
|
|
92
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* WHOSE READING a failure gets (0.103.0): the editor's session it happened in,
|
|
97
|
+
* when that session brought its own (`EaselSession.hostFailures`), else the
|
|
98
|
+
* page's. Every reader below takes one, optionally: two hosts mounted in one
|
|
99
|
+
* page (the website editor and the campaign designer in the admin) each read
|
|
100
|
+
* their own client's errors, and neither has to replace the other's page-wide
|
|
101
|
+
* registration to do it. Left out, or a session that brought none, it is the
|
|
102
|
+
* page's, as it always was.
|
|
103
|
+
*/
|
|
104
|
+
type FailureScope = {
|
|
105
|
+
readonly hostFailures?: HostFailures | null;
|
|
106
|
+
} | null | undefined;
|
|
93
107
|
/** Tell the editor how to read the host client's own errors. Called once, by
|
|
94
|
-
* the host's backend module as it loads (EFFICIENT's: `lib/efficient-backend`).
|
|
108
|
+
* the host's backend module as it loads (EFFICIENT's: `lib/efficient-backend`).
|
|
109
|
+
* It is the page's: a session's own (`hostFailures`) is read in its place. */
|
|
95
110
|
declare function provideHostFailures(failures: HostFailures): void;
|
|
96
111
|
/** `err` as the host's client failure it is, or null when it is not one (or no
|
|
97
112
|
* host has said how to read its errors). */
|
|
98
|
-
declare function readHostFailure(err: unknown): HostFailure | null;
|
|
113
|
+
declare function readHostFailure(err: unknown, scope?: FailureScope): HostFailure | null;
|
|
99
114
|
/** The host's sentence for a document it refused to open, or null. */
|
|
100
115
|
declare function hostLoadRefusalOf(err: unknown, document: {
|
|
101
116
|
slug: string;
|
|
102
|
-
}): string | null;
|
|
117
|
+
}, scope?: FailureScope): string | null;
|
|
103
118
|
/** The host's own "server cannot be reached" sentence, or a plain one. */
|
|
104
|
-
declare function hostUnreachableMessage(): string;
|
|
119
|
+
declare function hostUnreachableMessage(scope?: FailureScope): string;
|
|
105
120
|
|
|
106
|
-
export { type HostFailure, STATUS_UNREACHABLE, WebsiteBackendError, type WebsiteBackendErrorKind, hostLoadRefusalOf, hostUnreachableMessage, isBackendError, provideHostFailures, readHostFailure };
|
|
121
|
+
export { type FailureScope, type HostFailure, type HostFailures, STATUS_UNREACHABLE, WebsiteBackendError, type WebsiteBackendErrorKind, hostLoadRefusalOf, hostUnreachableMessage, isBackendError, provideHostFailures, readHostFailure };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{STATUS_UNREACHABLE,WebsiteBackendError,hostLoadRefusalOf,hostUnreachableMessage,isBackendError,provideHostFailures,readHostFailure}from"../../chunk-
|
|
1
|
+
export{STATUS_UNREACHABLE,WebsiteBackendError,hostLoadRefusalOf,hostUnreachableMessage,isBackendError,provideHostFailures,readHostFailure}from"../../chunk-KCOBHPN6.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as DocumentAddressing, N as NO_DOCUMENT_ADDRESSING } from '../../host-
|
|
1
|
+
export { A as AnyDocumentAddressing, a as DocumentAddressing, N as NO_DOCUMENT_ADDRESSING } from '../../host-DJ8Gzsx7.js';
|
|
2
2
|
import './document-contract.js';
|
|
3
3
|
import './session.js';
|
|
4
4
|
import 'react';
|
|
@@ -12,6 +12,7 @@ import './document-switch.js';
|
|
|
12
12
|
import '../../engine-DBxp_v6B.js';
|
|
13
13
|
import '../../edit-lock/index.js';
|
|
14
14
|
import './admin-bridge.js';
|
|
15
|
+
import './backend-error.js';
|
|
15
16
|
import './host-chrome.js';
|
|
16
17
|
import './links/link-filters.js';
|
|
17
18
|
import '../../LinkPicker-W2Rtxetz.js';
|
|
@@ -167,6 +167,13 @@ type EaselDocument = {
|
|
|
167
167
|
* second editor's autosave is refused instead of erasing this one's work.
|
|
168
168
|
* `null` for a record type with no version check (a template page). */
|
|
169
169
|
version?: string | null;
|
|
170
|
+
/** Why this document may NEVER be written, in words for the operator — "Read-only
|
|
171
|
+
* — this campaign is sent": a record that is the account of something that
|
|
172
|
+
* already happened (0.103.0). Carried, the editor holds the document
|
|
173
|
+
* read-only for good: its saves are refused, its edit lock is never claimed,
|
|
174
|
+
* and the save pill's place says this. Absent (every website document), it
|
|
175
|
+
* is writable as it always was. */
|
|
176
|
+
readOnlyReason?: string;
|
|
170
177
|
};
|
|
171
178
|
interface EaselDocumentAdapter {
|
|
172
179
|
capabilities: EaselCapabilities;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EditLockFailure } from '../../edit-lock/index.js';
|
|
2
|
+
import { FailureScope } from './backend-error.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* What a failed editor call WAS, as `{ status, data }` — the shape the shared
|
|
@@ -40,7 +41,10 @@ import { EditLockFailure } from '../../edit-lock/index.js';
|
|
|
40
41
|
* (lib/efficient-backend), so a raw body and a translated kind read alike.
|
|
41
42
|
*/
|
|
42
43
|
declare const PAGE_CONFLICT_CODE = "page_changed_elsewhere";
|
|
43
|
-
|
|
44
|
+
/** `scope`: whose reading of a host's client error it is — the editor's
|
|
45
|
+
* session when it brought its own (lib/backend-error `FailureScope`), else
|
|
46
|
+
* the page's. */
|
|
47
|
+
declare function readEaselFailure(err: unknown, scope?: FailureScope): EditLockFailure | null;
|
|
44
48
|
/**
|
|
45
49
|
* A call was refused because the SESSION is no longer authorised — the one
|
|
46
50
|
* failure the editor answers by asking its host for a fresh sign-in.
|
|
@@ -49,6 +53,6 @@ declare function readEaselFailure(err: unknown): EditLockFailure | null;
|
|
|
49
53
|
* `unauthorized` too, and a 403 has never been a reason to re-authenticate. A
|
|
50
54
|
* backend that speaks only in kinds says `unauthorized`.
|
|
51
55
|
*/
|
|
52
|
-
declare function isExpiredSession(err: unknown): boolean;
|
|
56
|
+
declare function isExpiredSession(err: unknown, scope?: FailureScope): boolean;
|
|
53
57
|
|
|
54
58
|
export { PAGE_CONFLICT_CODE, isExpiredSession, readEaselFailure };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{PAGE_CONFLICT_CODE,isExpiredSession,readEaselFailure}from"../../chunk-
|
|
1
|
+
export{PAGE_CONFLICT_CODE,isExpiredSession,readEaselFailure}from"../../chunk-4EUWOGZF.js";import"../../chunk-KCOBHPN6.js";import"../../chunk-JUQ6YJCG.js";import"../../chunk-RE4LP46F.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{routeSharedHostMessage}from"../../chunk-
|
|
1
|
+
export{routeSharedHostMessage}from"../../chunk-QDEZQ5A6.js";import"../../chunk-UB7JVPK4.js";import"../../chunk-Z6BAZFSW.js";import"../../chunk-R5ZVNJLJ.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
-
export { D as DETACHED_EASEL_HOST, E as EaselHost, b as EaselHostAddress, c as EaselHostContext, d as EaselHostProvider, e as EaselMessageType, f as EaselToHostMessage, H as HostPickedMedia, g as HostToEaselMessage, I as InboundHostMessage, S as SectionScreenTarget, h as SendToHost, i as createEaselHost, u as useEaselHost } from '../../host-
|
|
2
|
+
export { D as DETACHED_EASEL_HOST, E as EaselHost, b as EaselHostAddress, c as EaselHostContext, d as EaselHostProvider, e as EaselMessageType, f as EaselToHostMessage, H as HostPickedMedia, g as HostToEaselMessage, I as InboundHostMessage, S as SectionScreenTarget, h as SendToHost, i as createEaselHost, u as useEaselHost } from '../../host-DJ8Gzsx7.js';
|
|
3
3
|
import '../../blocks/index.js';
|
|
4
4
|
import '../../types-E3HrTPg2.js';
|
|
5
5
|
import '../../data/index.js';
|
|
@@ -8,6 +8,8 @@ import '../../resolve-D68pb3Bx.js';
|
|
|
8
8
|
import '../../plan-DChbUXdS.js';
|
|
9
9
|
import './document-contract.js';
|
|
10
10
|
import './session.js';
|
|
11
|
+
import './backend-error.js';
|
|
12
|
+
import '../../edit-lock/index.js';
|
|
11
13
|
import './host-chrome.js';
|
|
12
14
|
import './links/link-filters.js';
|
|
13
15
|
import '../../LinkPicker-W2Rtxetz.js';
|
|
@@ -16,5 +18,4 @@ import './section-template-types.js';
|
|
|
16
18
|
import './puck/content-tree.js';
|
|
17
19
|
import './document-switch.js';
|
|
18
20
|
import '../../engine-DBxp_v6B.js';
|
|
19
|
-
import '../../edit-lock/index.js';
|
|
20
21
|
import './admin-bridge.js';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { FailureScope } from './backend-error.js';
|
|
2
|
+
import '../../edit-lock/index.js';
|
|
3
|
+
|
|
1
4
|
/** Say what stopped the editor loading a document, in words an operator can
|
|
2
5
|
* hand to a developer.
|
|
3
6
|
*
|
|
@@ -13,8 +16,11 @@
|
|
|
13
16
|
* mismatch — and the one thing anybody could report was the one thing that
|
|
14
17
|
* narrowed nothing down. It lives in its own module, apart from the React
|
|
15
18
|
* provider that shows it, so the wording is pinned by a test rather than
|
|
16
|
-
* re-derived by whoever next reads the catch block.
|
|
17
|
-
|
|
19
|
+
* re-derived by whoever next reads the catch block.
|
|
20
|
+
*
|
|
21
|
+
* `scope` is whose reading of a host's client error it is (lib/backend-error
|
|
22
|
+
* `FailureScope`): the editor's session, when it brought its own. */
|
|
23
|
+
declare function describeLoadFailure(e: unknown, scope?: FailureScope): string;
|
|
18
24
|
/**
|
|
19
25
|
* The host's own sentence for a load it REFUSED, or null when this failure is
|
|
20
26
|
* not one of those. EFFICIENT has one: a slug that more than one website owns,
|
|
@@ -24,6 +30,6 @@ declare function describeLoadFailure(e: unknown): string;
|
|
|
24
30
|
*/
|
|
25
31
|
declare function hostLoadRefusal(e: unknown, document: {
|
|
26
32
|
slug: string;
|
|
27
|
-
}): string | null;
|
|
33
|
+
}, scope?: FailureScope): string | null;
|
|
28
34
|
|
|
29
35
|
export { describeLoadFailure, hostLoadRefusal };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{describeLoadFailure,hostLoadRefusal}from"../../chunk-
|
|
1
|
+
export{describeLoadFailure,hostLoadRefusal}from"../../chunk-ERR437B5.js";import"../../chunk-KCOBHPN6.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ComponentType, ReactNode } from 'react';
|
|
3
|
-
import { H as HostPickedMedia } from '../../host-
|
|
3
|
+
import { H as HostPickedMedia, E as EaselHost } from '../../host-DJ8Gzsx7.js';
|
|
4
4
|
import '../../blocks/index.js';
|
|
5
5
|
import '../../types-E3HrTPg2.js';
|
|
6
6
|
import '../../data/index.js';
|
|
@@ -9,6 +9,8 @@ import '../../resolve-D68pb3Bx.js';
|
|
|
9
9
|
import '../../plan-DChbUXdS.js';
|
|
10
10
|
import './document-contract.js';
|
|
11
11
|
import './session.js';
|
|
12
|
+
import './backend-error.js';
|
|
13
|
+
import '../../edit-lock/index.js';
|
|
12
14
|
import './host-chrome.js';
|
|
13
15
|
import './links/link-filters.js';
|
|
14
16
|
import '../../LinkPicker-W2Rtxetz.js';
|
|
@@ -17,7 +19,6 @@ import './section-template-types.js';
|
|
|
17
19
|
import './puck/content-tree.js';
|
|
18
20
|
import './document-switch.js';
|
|
19
21
|
import '../../engine-DBxp_v6B.js';
|
|
20
|
-
import '../../edit-lock/index.js';
|
|
21
22
|
import './admin-bridge.js';
|
|
22
23
|
|
|
23
24
|
/**
|
|
@@ -40,13 +41,23 @@ import './admin-bridge.js';
|
|
|
40
41
|
* • BROWSING — the rail opens the "media" left view. The host's panel shows
|
|
41
42
|
* the library to look through, upload to, tidy. `pick` is null.
|
|
42
43
|
* • PICKING — a field calls `requestMediaPick` (lib/media-picker). With
|
|
43
|
-
* a panel here, that becomes
|
|
44
|
-
* panel over the left panel in pick mode, the host's panel
|
|
45
|
-
* and the field gets the media. Leaving pick mode any other
|
|
46
|
-
* panel's Cancel, a rail button, closing the panel) settles it
|
|
44
|
+
* a panel here, that becomes a request to THIS provider's pick store: the
|
|
45
|
+
* chrome lays the panel over the left panel in pick mode, the host's panel
|
|
46
|
+
* calls `onPick`, and the field gets the media. Leaving pick mode any other
|
|
47
|
+
* way (the panel's Cancel, a rail button, closing the panel) settles it
|
|
48
|
+
* `null`.
|
|
47
49
|
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
+
* ONE PENDING PICK PER PROVIDER (0.103.0). Until then the pending pick was
|
|
51
|
+
* module state, one for the page — right while one editor is mounted, and
|
|
52
|
+
* wrong the moment two are (the admin's website editor and campaign designer):
|
|
53
|
+
* a field in one laid the other's panel over its own left panel too, and a
|
|
54
|
+
* Cancel in either settled the other's field. Each provider now keeps its own
|
|
55
|
+
* {@link MediaPickStore}; the chrome under it reads that one, and a field's
|
|
56
|
+
* request finds it by the HOST the field asks through (`requestMediaPick(host,
|
|
57
|
+
* …)` — one host per mounted editor, lib/host), so no prop or context has to
|
|
58
|
+
* reach the field's click handler. A request whose host no provider sits under
|
|
59
|
+
* goes to the provider mounted last, which is exactly what the module state
|
|
60
|
+
* answered, so one mounted editor behaves as it always did.
|
|
50
61
|
*/
|
|
51
62
|
/** What a field asked the panel for. `file` is a file dropped straight on the
|
|
52
63
|
* field: the host uploads it and picks it without waiting for a click. */
|
|
@@ -57,6 +68,14 @@ interface MediaPickRequest {
|
|
|
57
68
|
/** The field's label, e.g. "Background image". */
|
|
58
69
|
title: string;
|
|
59
70
|
file?: File | null;
|
|
71
|
+
/**
|
|
72
|
+
* The field's own terms for its host's panel (0.103.0), handed to it
|
|
73
|
+
* untouched — the campaign designer's logo field asks for `{ bakeableOnly:
|
|
74
|
+
* true }`. The screen reads none of it. Absent when the field gave none;
|
|
75
|
+
* the window's `open-media-picker` message never carries it (its shape is
|
|
76
|
+
* the website's protocol).
|
|
77
|
+
*/
|
|
78
|
+
options?: Record<string, unknown>;
|
|
60
79
|
}
|
|
61
80
|
/** The props the host's panel component is drawn with. */
|
|
62
81
|
interface MediaPanelProps {
|
|
@@ -67,28 +86,73 @@ interface MediaPanelProps {
|
|
|
67
86
|
}
|
|
68
87
|
/** The host's media library, as a component the editor draws in its panel. */
|
|
69
88
|
type MediaPanelComponent = ComponentType<MediaPanelProps>;
|
|
89
|
+
/**
|
|
90
|
+
* One editor's pending pick (0.103.0): what its panel is choosing for, and who
|
|
91
|
+
* waits on the answer. A {@link MediaPanelProvider} makes one for itself.
|
|
92
|
+
*/
|
|
93
|
+
interface MediaPickStore {
|
|
94
|
+
/** The field the panel is choosing for, or null while nothing is. */
|
|
95
|
+
current(): MediaPickRequest | null;
|
|
96
|
+
/**
|
|
97
|
+
* Open pick mode for one field; resolves with the media chosen, or null. A
|
|
98
|
+
* second field asking before the first is answered takes the panel over,
|
|
99
|
+
* and the first resolves null — one panel answers one field.
|
|
100
|
+
*/
|
|
101
|
+
request(request: MediaPickRequest): Promise<HostPickedMedia | null>;
|
|
102
|
+
/** Answer the field the panel is choosing for (`media` null: no choice). A
|
|
103
|
+
* stale id — an answer for a request already superseded — does nothing. */
|
|
104
|
+
settle(requestId: string, media: HostPickedMedia | null): void;
|
|
105
|
+
/** Leave pick mode without a choice, whatever is being chosen. */
|
|
106
|
+
cancel(): void;
|
|
107
|
+
subscribe(listener: () => void): () => void;
|
|
108
|
+
}
|
|
109
|
+
declare function createMediaPickStore(): MediaPickStore;
|
|
70
110
|
/** Supply the host's panel to the editor below. `panel` null keeps the old
|
|
71
|
-
* window: fields ask the host with `open-media-picker`.
|
|
111
|
+
* window: fields ask the host with `open-media-picker`. Sit it under the
|
|
112
|
+
* editor's `EaselHostProvider`, as the website's frame does: that host is
|
|
113
|
+
* how a field's request finds this provider among several. */
|
|
72
114
|
declare function MediaPanelProvider({ panel, children }: {
|
|
73
115
|
panel: MediaPanelComponent | null;
|
|
74
116
|
children: ReactNode;
|
|
75
117
|
}): react.JSX.Element;
|
|
76
118
|
/** The host's panel for the editor this renders in, or null. */
|
|
77
119
|
declare function useMediaPanel(): MediaPanelComponent | null;
|
|
78
|
-
/**
|
|
120
|
+
/**
|
|
121
|
+
* The pick store a field's request through `host` goes to, or null when that
|
|
122
|
+
* editor has no panel and the host is asked with the window's message: the
|
|
123
|
+
* provider under that host (the last one, if two share it), else the page's
|
|
124
|
+
* provider, as the one module-wide store answered before 0.103.0.
|
|
125
|
+
*/
|
|
126
|
+
declare function mediaPickStoreFor(host: EaselHost): MediaPickStore | null;
|
|
127
|
+
/** Whether a field's request goes to the panel rather than to the host — of
|
|
128
|
+
* the page's provider, the one mounted last. */
|
|
79
129
|
declare function hasMediaPanel(): boolean;
|
|
80
130
|
/**
|
|
81
|
-
* Open the panel in pick mode for one
|
|
82
|
-
*
|
|
83
|
-
*
|
|
131
|
+
* Open the page's panel (the provider mounted last) in pick mode for one
|
|
132
|
+
* field; resolves with the media chosen, or null. A field asks through
|
|
133
|
+
* `requestMediaPick`, which finds the panel of ITS editor instead.
|
|
84
134
|
*/
|
|
85
135
|
declare function requestPanelPick(request: MediaPickRequest): Promise<HostPickedMedia | null>;
|
|
86
|
-
/** Answer the field
|
|
136
|
+
/** Answer the field a panel is choosing for (`media` null: no choice), in
|
|
137
|
+
* whichever editor asked: a request id names one field of one editor. A
|
|
87
138
|
* stale id — an answer for a request already superseded — does nothing. */
|
|
88
139
|
declare function settlePanelPick(requestId: string, media: HostPickedMedia | null): void;
|
|
89
|
-
/** Leave pick mode without a choice, whatever is being chosen.
|
|
140
|
+
/** Leave the page's pick mode without a choice, whatever is being chosen.
|
|
141
|
+
* Under a provider, `useCancelPanelPick` leaves that editor's. */
|
|
90
142
|
declare function cancelPanelPick(): void;
|
|
91
|
-
/** The field the panel is choosing for, or null while nothing is
|
|
143
|
+
/** The field the panel is choosing for, or null while nothing is — in the
|
|
144
|
+
* editor this renders in. */
|
|
92
145
|
declare function usePanelPick(): MediaPickRequest | null;
|
|
146
|
+
/** Leave THIS editor's pick mode without a choice (0.103.0): a stable
|
|
147
|
+
* function, for the chrome's Escape, rail and panel-closed paths. */
|
|
148
|
+
declare function useCancelPanelPick(): () => void;
|
|
149
|
+
/**
|
|
150
|
+
* A change of selection leaves pick mode (0.103.0, `ScreenParts
|
|
151
|
+
* .pickFollowsSelection`): with `follows`, the field still waiting when
|
|
152
|
+
* `selection` moves is settled with null, as a Cancel would — the field that
|
|
153
|
+
* asked belongs to the block that is no longer selected. Without it, nothing:
|
|
154
|
+
* a pick outlives a selection, as it always has.
|
|
155
|
+
*/
|
|
156
|
+
declare function usePickFollowsSelection(follows: boolean, selection: unknown): void;
|
|
93
157
|
|
|
94
|
-
export { type MediaPanelComponent, type MediaPanelProps, MediaPanelProvider, type MediaPickRequest, cancelPanelPick, hasMediaPanel, requestPanelPick, settlePanelPick, useMediaPanel, usePanelPick };
|
|
158
|
+
export { type MediaPanelComponent, type MediaPanelProps, MediaPanelProvider, type MediaPickRequest, type MediaPickStore, cancelPanelPick, createMediaPickStore, hasMediaPanel, mediaPickStoreFor, requestPanelPick, settlePanelPick, useCancelPanelPick, useMediaPanel, usePanelPick, usePickFollowsSelection };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{MediaPanelProvider,cancelPanelPick,hasMediaPanel,requestPanelPick,settlePanelPick,useMediaPanel,usePanelPick}from"../../chunk-
|
|
1
|
+
export{MediaPanelProvider,cancelPanelPick,createMediaPickStore,hasMediaPanel,mediaPickStoreFor,requestPanelPick,settlePanelPick,useCancelPanelPick,useMediaPanel,usePanelPick,usePickFollowsSelection}from"../../chunk-Z6BAZFSW.js";import"../../chunk-R5ZVNJLJ.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as EaselHost } from '../../host-
|
|
1
|
+
import { E as EaselHost } from '../../host-DJ8Gzsx7.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '../../blocks/index.js';
|
|
4
4
|
import '../../types-E3HrTPg2.js';
|
|
@@ -8,6 +8,8 @@ import '../../resolve-D68pb3Bx.js';
|
|
|
8
8
|
import '../../plan-DChbUXdS.js';
|
|
9
9
|
import './document-contract.js';
|
|
10
10
|
import './session.js';
|
|
11
|
+
import './backend-error.js';
|
|
12
|
+
import '../../edit-lock/index.js';
|
|
11
13
|
import './host-chrome.js';
|
|
12
14
|
import './links/link-filters.js';
|
|
13
15
|
import '../../LinkPicker-W2Rtxetz.js';
|
|
@@ -16,7 +18,6 @@ import './section-template-types.js';
|
|
|
16
18
|
import './puck/content-tree.js';
|
|
17
19
|
import './document-switch.js';
|
|
18
20
|
import '../../engine-DBxp_v6B.js';
|
|
19
|
-
import '../../edit-lock/index.js';
|
|
20
21
|
import './admin-bridge.js';
|
|
21
22
|
|
|
22
23
|
/**
|
|
@@ -28,6 +29,10 @@ import './admin-bridge.js';
|
|
|
28
29
|
* • A host that supplies a MEDIA PANEL (lib/media-panel — the admin
|
|
29
30
|
* portal, from efficient-web 0.2.0) answers in the editor's own left panel:
|
|
30
31
|
* the request opens that panel in pick mode, and nothing leaves the editor.
|
|
32
|
+
* The panel is the one of the editor the field asks through: `host` is
|
|
33
|
+
* that editor's (one per mounted editor), and the provider under it keeps
|
|
34
|
+
* its own pending pick (0.103.0), so two editors mounted in one page never
|
|
35
|
+
* answer each other's fields.
|
|
31
36
|
* • Any other host is asked to open its picker window, over the
|
|
32
37
|
* request/response protocol below. The picker UI lives in the host, so
|
|
33
38
|
* this module owns the EDITOR half:
|
|
@@ -54,11 +59,18 @@ interface PickedMedia {
|
|
|
54
59
|
* Choose media for a slot; resolves with the chosen media, or null if the user
|
|
55
60
|
* cancelled (or there's no host to ask). `file` is a file dropped straight on
|
|
56
61
|
* the slot — the host uploads it and picks it immediately.
|
|
62
|
+
*
|
|
63
|
+
* `options` (0.103.0) are the field's own terms for its host's PANEL, handed to
|
|
64
|
+
* it untouched on the request (`MediaPickRequest.options`) — the campaign
|
|
65
|
+
* designer's logo field asks for `{ bakeableOnly: true }`. The window's
|
|
66
|
+
* `open-media-picker` message carries none: its shape is the website's
|
|
67
|
+
* protocol, mirrored by the storefront.
|
|
57
68
|
*/
|
|
58
69
|
declare function requestMediaPick(host: EaselHost, opts: {
|
|
59
70
|
accept: string;
|
|
60
71
|
title: string;
|
|
61
72
|
file?: File | null;
|
|
73
|
+
options?: Record<string, unknown>;
|
|
62
74
|
}): Promise<PickedMedia | null>;
|
|
63
75
|
/** Settle a pending pick (called by the central message listener on the admin's
|
|
64
76
|
* reply). Unknown ids — a stale reply, or a pick meant for another editor
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{requestMediaPick,resolveMediaPick}from"../../chunk-
|
|
1
|
+
export{requestMediaPick,resolveMediaPick}from"../../chunk-UB7JVPK4.js";import"../../chunk-Z6BAZFSW.js";import"../../chunk-R5ZVNJLJ.js";
|