efficient-easel 11.3.0 → 11.8.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 +20 -41
- package/dist/{canvas-typing-DvoqQINU.d.ts → canvas-typing-CC0wA-ys.d.ts} +16 -105
- package/dist/chrome/chrome.css +5 -5
- package/dist/{chunk-66LWADFP.js → chunk-2XMHLXMA.js} +1 -1
- package/dist/chunk-33C6ALT5.js +1 -0
- package/dist/{chunk-XJCMEEBH.js → chunk-36LVP5WD.js} +7 -7
- package/dist/{chunk-SJPKSE5G.js → chunk-5IUS6PM6.js} +12 -12
- package/dist/{chunk-FPAVNX3Y.js → chunk-5XUMLKQF.js} +3 -3
- package/dist/{chunk-PPL7GB7D.js → chunk-62VPYC7F.js} +1 -1
- package/dist/chunk-643PVCEG.js +1 -0
- package/dist/{chunk-TWFM6GNK.js → chunk-6IT5H37Y.js} +1 -1
- package/dist/{chunk-AFSSKGTD.js → chunk-6TJ2CIMY.js} +1 -1
- package/dist/{chunk-4ACVXF5V.js → chunk-7BRKNQF7.js} +1 -1
- package/dist/chunk-A6PY6C3C.js +1 -0
- package/dist/{chunk-XWK7WZQS.js → chunk-ATF2T5CI.js} +1 -1
- package/dist/chunk-AYWN5NRH.js +1 -0
- package/dist/chunk-DE35IQ4T.js +57 -0
- package/dist/{chunk-PPHUWGLZ.js → chunk-EC2I7SIY.js} +1 -1
- package/dist/{chunk-DGAXQTDW.js → chunk-FHLYUIJJ.js} +1 -1
- package/dist/{chunk-65Z5FSAW.js → chunk-G3GWAP5R.js} +5 -5
- package/dist/{chunk-2FZJWH24.js → chunk-H4UMY7QF.js} +1 -1
- package/dist/chunk-H6IXH4A3.js +1 -0
- package/dist/{chunk-EXKKLTXH.js → chunk-HRUMNRYI.js} +1 -1
- package/dist/chunk-JHYKRGRA.js +5 -0
- package/dist/chunk-JRRYFSCY.js +5 -0
- package/dist/chunk-KEWQZYUF.js +7 -0
- package/dist/{chunk-IFS5P7CO.js → chunk-LZS7JZK5.js} +1 -1
- package/dist/{chunk-FGJSCWUN.js → chunk-NY7HHUGB.js} +2 -2
- package/dist/chunk-PS5BWS4I.js +2 -0
- package/dist/{chunk-47RGVCPH.js → chunk-QFVRMARS.js} +12 -12
- package/dist/chunk-TBF5CVPA.js +1 -0
- package/dist/{chunk-26GHWMNN.js → chunk-UBAYMWCX.js} +19 -19
- package/dist/chunk-UMDQ6CLQ.js +2 -0
- package/dist/{chunk-ZXGQT75B.js → chunk-URC5Y5G2.js} +1 -1
- package/dist/chunk-VVPZMWJE.js +1 -0
- package/dist/chunk-WRFD4EXD.js +1 -0
- package/dist/chunk-YHZSBL2N.js +1 -0
- package/dist/copy/copy.css +8 -108
- package/dist/copy/index.d.ts +39 -9
- package/dist/copy/index.js +18 -19
- package/dist/drag/drag.css +8 -8
- package/dist/drag/index.js +1 -1
- package/dist/easel/index.d.ts +3 -3
- package/dist/easel/index.js +1 -1
- package/dist/fields/fields.css +8 -8
- package/dist/fields/index.js +1 -1
- package/dist/gold/index.d.ts +3 -3
- package/dist/gold/index.js +1 -1
- package/dist/icons/index.d.ts +1 -0
- package/dist/markup/index.d.ts +1 -629
- package/dist/markup/index.js +1 -1
- package/dist/menu/menu.css +1 -1
- package/dist/panel/index.js +1 -1
- package/dist/panel/panel.css +12 -12
- package/dist/pick/index.js +1 -1
- package/dist/pick/pick.css +7 -7
- package/dist/screen/components/AddBlockRow.js +1 -1
- package/dist/screen/components/AddSidePanel.js +1 -1
- package/dist/screen/components/MediaSidePanel.js +1 -1
- package/dist/screen/components/NodeContextMenu.js +1 -1
- package/dist/screen/components/PageEditGuardNotices.js +1 -1
- package/dist/screen/components/PanelToggleIcon.d.ts +6 -5
- package/dist/screen/components/PanelToggleIcon.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 +16 -16
- package/dist/screen/components/SidePanelHead.js +1 -1
- package/dist/screen/components/usePartBridge.js +1 -1
- package/dist/screen/index.js +1 -1
- package/dist/screen/lib/key-scope.js +1 -1
- package/dist/screen/lib/puck/device-fields.js +1 -1
- 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.js +1 -1
- package/dist/screen/lib/screen-parts.js +1 -1
- package/dist/screen/screen.css +16 -16
- package/dist/screen/words.js +1 -1
- package/dist/shell/shell.css +10 -8
- package/dist/strings/catalogue.d.ts +2 -2
- package/dist/strings/catalogue.js +1 -1
- package/dist/strings/index.d.ts +2 -2
- package/dist/strings/index.js +1 -1
- package/dist/text-styles/index.d.ts +4 -231
- package/dist/text-styles/index.js +35 -35
- package/dist/text-styles/model.d.ts +259 -0
- package/dist/text-styles/model.js +1 -0
- package/dist/text-styles/text-styles.css +6 -6
- package/dist/{words-dsex49Jh.d.ts → words-CiuKuiy0.d.ts} +12 -6
- package/package.json +6 -1
- package/dist/chunk-546BBOPE.js +0 -1
- package/dist/chunk-AZOCY74V.js +0 -57
- package/dist/chunk-BHRC3ASL.js +0 -1
- package/dist/chunk-BPFPM3L4.js +0 -7
- package/dist/chunk-DD7A6RRL.js +0 -5
- package/dist/chunk-EQFBUNEB.js +0 -1
- package/dist/chunk-FAAZZXIS.js +0 -1
- package/dist/chunk-FFYXVAAL.js +0 -1
- package/dist/chunk-GCCBEY2W.js +0 -2
- package/dist/chunk-GG4FGBFR.js +0 -1
- package/dist/chunk-KQMML6JM.js +0 -4
- package/dist/chunk-Q6AM43CA.js +0 -1
- package/dist/chunk-U7KFFC7N.js +0 -5
- package/dist/chunk-VWXUMVCD.js +0 -1
- package/dist/chunk-ZAOM6PFH.js +0 -1
package/dist/chunk-EQFBUNEB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useSectionOps as o}from"./chunk-XWK7WZQS.js";import{decodePartId as e,encodePartId as r}from"./chunk-IYT6NN2J.js";import{usePreviewParts as t}from"./chunk-I54UCYOU.js";import{SELECTION_MODE as n}from"./chunk-U7KFFC7N.js";import{useEasel as p}from"./chunk-SJPKSE5G.js";import{useCallback as d,useEffect as c}from"react";var s=o=>"part"===o.kind;function m({mode:m,setMode:i,onOpenPart:a}){const{getSelectorForId:u}=p(o=>o),I=o(),{setSelectedPartId:f,setSelectHandler:k}=t(),l=d(o=>{const r=e(o);if(!r)return;const{nodeId:t,propKey:p}=r;p?(i(o=>s(o)&&o.nodeId===t&&o.propKey===p?o:{kind:"part",nodeId:t,propKey:p}),a?.(t)):i(o=>"part"===o.kind?n:o)},[i,a]);c(()=>{k(l)},[k,l]);const K=s(m)?r(m.nodeId,m.propKey):null;c(()=>{f(K)},[K,f]);return{selectNode:d(o=>{i(()=>n);const e=u(o);e&&I.select(e)},[i,u,I]),openPartId:K}}export{m as usePartBridge};
|
package/dist/chunk-FAAZZXIS.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{DEFAULT_TEXT_STYLES_WORDS as o}from"./chunk-OGH6CC3E.js";import{DEFAULT_PICK_WORDS as r}from"./chunk-ZAOM6PFH.js";import{DEFAULT_STYLE_CLIPBOARD_WORDS as t}from"./chunk-6WY6ZXJG.js";import{DEFAULT_SCREEN_WORDS as m}from"./chunk-VWXUMVCD.js";import{DEFAULT_CANVAS_WORDS as n}from"./chunk-TBY3DFKS.js";import{DEFAULT_TREE_WORDS as c}from"./chunk-K56YDHYQ.js";import{DEFAULT_PANEL_WORDS as s}from"./chunk-KFV7N2DJ.js";import{DEFAULT_NODE_MENU_WORDS as f}from"./chunk-WK3AFPXY.js";import{DEFAULT_SAVE_WORDS as p}from"./chunk-H6DDIBQ4.js";import{DEFAULT_CHROME_WORDS as e,DEFAULT_NOTICE_WORDS as i}from"./chunk-Z6PVRXVY.js";import{DEFAULT_LOCK_WORDS as u}from"./chunk-RE4LP46F.js";import{DEFAULT_RAIL_WORDS as k}from"./chunk-2OAZYSWJ.js";import{DEFAULT_COPY_WORDS as j}from"./chunk-Q6AM43CA.js";import{DEFAULT_FIELDS_WORDS as h}from"./chunk-FFYXVAAL.js";import{DEFAULT_DRAG_WORDS as l}from"./chunk-GG4FGBFR.js";var F={notice:i,lock:u,save:p,chrome:e,rail:k,tree:c,panel:s,fields:h,pick:r,drag:l,menu:f,styleClipboard:t,copy:j,canvas:n,textStyles:o,screen:m},a=o=>"object"==typeof o&&null!==o;function Y(o,r){const t={};for(const m of Object.keys(o)){const n=o[m],c=r[m];null==c?t[m]=n:a(n)?t[m]=a(c)?Y(n,c):n:t[m]=typeof c==typeof n?c:n}return t}function y(o,r){return r?Y(o,r):o}export{F as DEFAULT_EASEL_STRINGS,y as mergeEaselStrings};
|
package/dist/chunk-FFYXVAAL.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e={less:"Less",more:"More",choose:"Choose…",search:"Search…",noMatches:"No matches",list:{item:"item",itemName:({noun:e,n:o})=>{return`${t=e,t?t[0].toUpperCase()+t.slice(1):t} ${o}`;var t},position:({n:e,total:o})=>`${e} of ${o}`,duplicate:"Duplicate",duplicateItem:({noun:e})=>`Duplicate ${e}`,deleteItem:({noun:e})=>`Delete ${e}`,add:({noun:e})=>`+ Add ${e}`,addHere:({noun:e})=>`Add ${e} here`,moveUp:"Move up",moveDown:"Move down",delete:"Delete",locked:"This one cannot be removed",moved:({n:e,total:o})=>`Moved to ${e} of ${o}`}};export{e as DEFAULT_FIELDS_WORDS};
|
package/dist/chunk-GCCBEY2W.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{editLockOf as e}from"./chunk-GMCZXMOV.js";import{isExpiredSession as r,readEaselFailure as n}from"./chunk-CLOS6SSX.js";import{routeSharedHostMessage as t}from"./chunk-S4AWJX4Q.js";import{describeLoadFailure as o,hostLoadRefusal as u}from"./chunk-ERR437B5.js";import{useAdminBridge as a}from"./chunk-VPFNZ7TB.js";import{NO_DOCUMENT_ADDRESSING as s}from"./chunk-RLBXE4EU.js";import{saveStatusOf as i,resetForDocumentSwitch as l}from"./chunk-HNKB2ZYR.js";import{STATUS_UNREACHABLE as c}from"./chunk-KCOBHPN6.js";import{useEaselSession as d}from"./chunk-O7Q4DDJT.js";import{backendOf as f,setSessionDocumentSite as m}from"./chunk-RSCMJIWS.js";import{useEaselHost as k}from"./chunk-U3JP4VGF.js";import{DEFAULT_SCREEN_WORDS as g}from"./chunk-VWXUMVCD.js";import{useAutosave as v}from"./chunk-NDRZP6YR.js";import{canWriteDocument as p,newEaselClientId as h,reloadIfVersionMoved as y,openUnansweredClaim as w,FAIL_OPEN_RETRY_MS as S,CLAIM_FAIL_OPEN_MS as b,holderOf as P}from"./chunk-THWO5YVZ.js";import{useWords as I}from"./chunk-MFIRYGHW.js";import{createContext as j,useContext as R,useState as B,useMemo as C,useCallback as O,useEffect as H,useRef as E}from"react";import{jsx as T}from"react/jsx-runtime";var D={content:[],root:{},zones:{}};var M=j(null);function V(){const e=R(M);if(!e)throw new Error("useStorefrontDocument must be used within StorefrontDocumentProvider");return e}function A({target:j,addressing:R=s,onHostMessage:V,children:A}){const N=R,{homeSlug:F,entryMayBounce:L,entryBounce:W,onSwitch:U,tellsHost:X,adapterFor:Y,migrateRenamedProps:Z,describeMissing:J,onLoadFailed:x}=N,[G,K]=B(j),Q=k(),z=d(),_=C(()=>f(z),[z]),q=C(()=>e(z),[z]),$="template"===G.kind,ee="template"===G.kind?G.id:null,re="template"===G.kind?G.pageSlug??F??"":"document"===G.kind?G.slug??"":G.slug,ne="page"===G.kind?G.siteId??null:null,te=z.blocks,oe=C(()=>Y(G,_,te),[Y,_,te,G.kind,"template"===G.kind?G.id:"document"===G.kind?G.record:G.siteId]),ue=oe.capabilities,ae=O(e=>z.documentHooks?.stored?.(e)??e,[z]),se="page"===G.kind?G.originSlug??null:null;H(()=>{m(z,ne)},[z,ne]);const ie=E(G);H(()=>{ie.current=G},[G]);const{token:le,tokenRef:ce,capabilities:de}=a({onMessage:e=>{if(V?.(e)||t(e))return;const r=e;if("storefront-editor:navigate"===r?.type){const r=e;r?.target&&Cr(r.target)}}}),fe=!z.usesBridgedToken||null!==le,me=oe.lock,ke=Boolean(_.lock),[ge,ve]=B(null),[pe,he]=B(null),[ye,we]=B(null),[Se,be]=B(null),Pe=I("screen",g),Ie=Se?function(e,r){if(null!==e.sentence)return e.sentence;if(!e.missing)return r.loadFailed({cause:e.cause});switch(e.target.kind){case"template":return r.missingTemplatePage;case"document":return r.missingDocument;default:return r.missingPage({slug:e.slug})}}(Se,Pe):null,[je,Re]=B(null),Be=E(null),Ce=E(null),[Oe,He]=B(!1),Ee=E(null),[Te,De]=B(null),Me=E(null),[Ve,Ae]=B(null),[Ne,Fe]=B(!1),Le=E(null);H(()=>{Le.current=Ve},[Ve]);const[We,Ue]=B(ue.hasEditLock?{kind:"checking"}:{kind:"editing"}),Xe=E(We);H(()=>{Xe.current=We},[We]);const Ye=E(()=>Promise.resolve(!1)),Ze=O(e=>{Ce.current=e,He(!0)},[]),Je=v({save:async({id:e,data:r})=>{if(p(Xe.current)){if(!await Ye.current(e,r)){if(!p(Xe.current))return void Ze({id:e,data:r});throw new Error("page save did not land")}}else Ze({id:e,data:r})},onFailure:(e,r)=>{0===r&&Q.send("storefront-editor:save-failed")}}),{state:xe,push:Ge,flush:Ke,pause:Qe,resume:ze,stop:_e,reset:qe,retryNow:$e,hasPending:er}=Je,rr=E(xe);H(()=>{rr.current=xe},[xe]);const nr=i(xe),tr=O(()=>{const e=Ce.current;e&&(Ce.current=null,He(!1),Ge(e))},[Ge]),or=E("");or.current||(or.current=h());const[ur,ar]=B(0),sr=E(!1),[ir,lr]=B(L(j)),cr=E(!1);H(()=>{if(cr.current)return;cr.current=!0;const e=Q.address.search(),r=W(j,e);r?Q.address.load(r):L(j)&&lr(!1)},[j,Q]);const dr=Q.send;H(()=>{if(!fe)return;let e=!1;const r=ie.current,n=oe.resolve(re),t=z.documentHooks?.opening?.({slug:re,isTemplate:$,capabilities:ue});return n.then(async n=>{if(e)return;if(!n)return"page"===r.kind&&null!==F&&re!==F?void Q.address.load({kind:"page",slug:F,siteId:ne??void 0}):(be({target:r,slug:re,missing:!0,sentence:J?.(r)??null}),void x?.(r,null));const o=n.readOnlyReason?n.readOnlyReason:null;Be.current=o,Re(o),ve(n.id),he(n.kind??null),Me.current=n.version??null;const u=n.layout,a=u&&Object.keys(u).length?u:D,s=Z(a),i=t?await t(s):s;e||we(i)}).catch(n=>{e||(console.error("[storefront-editor] document load failed",n),be({target:r,slug:re,missing:!1,sentence:u(n,{slug:re},z),cause:o(n,z)}),x?.(r,n))}),()=>{e=!0}},[fe,le,$,oe,re]);const fr=O(e=>new Promise(r=>{const n=Date.now(),t=setInterval(()=>{const o=ce.current;o&&o!==e?(clearInterval(t),r(o)):Date.now()-n>6e3&&(clearInterval(t),r(null))},200)}),[]),mr=O(async e=>{const n=ce.current;if(!n&&z.usesBridgedToken)return{ok:!1,error:new Error("no editor token")};try{return{ok:!0,value:await e(n??"")}}catch(t){if(r(t,z)){dr("storefront-editor:auth-expired");const r=n?await fr(n):null;if(r)try{return{ok:!0,value:await e(r)}}catch(e){return{ok:!1,error:e}}}return{ok:!1,error:t}}},[dr,fr,z]),kr=O(async e=>{const r=ce.current?await mr(e):{ok:!1};return r.ok||dr("storefront-editor:save-failed"),r.ok},[dr,mr]),gr=O(async(e,r,t=!1)=>{if(null!==Be.current)return!1;if(!p(Xe.current))return!1;if(Le.current)return!1;const o=await mr(()=>oe.saveLayout(e,r,Me.current,or.current));if(o.ok)return Me.current=o.value.version??Me.current,Fe(!1),!0;const u=q.readLockTaken(o.error);if(u){const e={kind:"takenover",holder:u};return Xe.current=e,Ue(e),!1}const a=q.readSaveConflict(o.error);if(a){if(a.savedByYou&&!t&&oe.rereadVersion){const n=await mr(()=>oe.rereadVersion(e));if(n.ok&&n.value)return Me.current=n.value,Ye.current(e,r,!0)}_e(),Le.current=a,Ae(a)}return Fe(n(o.error,z)?.status===c),!1},[oe,mr,_e,z]);H(()=>{Ye.current=gr},[gr]);const vr=O(e=>{if(null!==Be.current)return;if(dr("storefront-editor:dirty"),!ge)return;const r=ae(e);Ee.current=r,p(Xe.current)?Ge({id:ge,data:r}):Ze({id:ge,data:r})},[ge,dr,Ze,Ge,ae]),pr=O(async()=>{p(Xe.current)&&tr();return await Ke()&&null==Ce.current},[tr,Ke]),hr=E(pr);H(()=>{hr.current=pr},[pr]);const yr=E(mr);H(()=>{yr.current=mr},[mr]);const wr=O(()=>{Q.address.reload()},[Q]),Sr=E(()=>Promise.resolve(!1));H(()=>{Sr.current=()=>{const e=oe.rereadVersion;return ge&&e?y({ours:Me.current,stored:async()=>{const r=await yr.current(()=>e(ge));return r.ok?r.value:null},hasPending:()=>null!=Ce.current||er(),reload:wr}):Promise.resolve(!1)}},[oe,ge,er,wr]);const br=null!==je;H(()=>{if(!me||!ge||!fe||br)return;let e=!1,r=null,n=null;const t=or.current,o={claim:async e=>{const r=await yr.current(()=>me.claim(ge,t,e));if(r.ok)return{heartbeat_seconds:r.value.heartbeatSeconds};throw r.error},cancelled:()=>e,currentAccess:()=>Xe.current,heldWrite:()=>({pending:null!=Ce.current||er(),autoSaveEnabled:!rr.current.paused,saveConflict:null!=Le.current}),setAccess:e=>{Xe.current=e,Ue(e)},releaseHeldWrite:()=>{hr.current()},startHeartbeat:e=>{r&&clearInterval(r),r=setInterval(()=>{u(!1)},e)},stopHeartbeat:()=>{r&&(clearInterval(r),r=null)},reloadIfMoved:()=>{Sr.current()}},u=q.makeClaimBeat(o),a=sr.current;return sr.current=!1,a||(Ue({kind:"checking"}),n=setTimeout(()=>{n=null,w(o)&&o.startHeartbeat(S)},b)),u(a).finally(()=>{n&&clearTimeout(n),n=null}),()=>{e=!0,n&&clearTimeout(n),r&&clearInterval(r),me.release(ge,t).catch(()=>{})}},[ge,me,fe,le,ur,br]);const Pr=O(()=>{me&&ge&&(sr.current=!0,ar(e=>e+1))},[ge,me]),Ir=O(()=>{Ue(e=>{const r="blocked"===e.kind||"takenover"===e.kind?e.holder:null;return r?{kind:"readonly",holder:r}:e})},[]),jr=O(()=>{rr.current.paused?(p(Xe.current)&&tr(),ze()):Qe()},[tr,Qe,ze]),Rr=O(()=>{$e()},[$e]),Br=O(e=>{Ee.current=null,l("template"!==e.kind&&ke,{resetAutosave:()=>{qe(),Ce.current=null,He(!1)},setVersion:e=>{Me.current=e},setSaveConflict:Ae,setAccess:Ue}),U(e),K(e),Be.current=null,Re(null),ve(null),he(null),we(null),be(null),Q.address.show(e),"document"!==e.kind&&X(e)&&Q.send("storefront-editor:navigated",{target:e})},[qe,Q,ke,U,X]),Cr=O(e=>{if(function(e,r,n){if(e.kind!==r.kind)return!1;if("template"===e.kind){const t=r;return e.id===t.id&&(e.pageSlug??n)===(t.pageSlug??n)}if("document"===e.kind){const n=r;return e.record===n.record&&(e.slug??"")===(n.slug??"")}const t=r;return e.slug===t.slug&&e.siteId===t.siteId}(e,ie.current,F))return;const r=null!=Ce.current;if(!r&&!er())return void Br(e);const n=rr.current;r||n.paused||n.failed||n.stopped?De(e):Ke().then(r=>{r?Br(e):De(e)})},[Br,er,Ke,F]),Or=O(()=>De(null),[]),Hr=O(()=>{De(e=>(e&&Br(e),null))},[Br]),Er=O(async()=>{const e=Te;if(!e)return;await pr()&&(De(null),Br(e))},[Te,pr,Br]),Tr=O(async e=>{if(null!==Be.current)return;if(!ge)return;if(!p(Xe.current)||Le.current)return;const r=ae(e);if(!await gr(ge,r))return void(Le.current||dr("storefront-editor:save-failed"));const n=oe.publish;if(!ue.canPublish||!n)return void dr("storefront-editor:saved");const t=await mr(()=>n(ge,Me.current??void 0));t.ok?(Me.current=t.value.version??Me.current,dr("storefront-editor:published")):dr("storefront-editor:save-failed")},[ge,oe,ue.canPublish,dr,gr,mr,ae]);/* @__PURE__ */
|
|
2
|
-
return T(M.Provider,{value:{target:G,adapter:oe,capabilities:ue,templateId:ee,currentSlug:re,currentKind:pe,siteId:ne,ready:fe,token:le,tokenRef:ce,notifyParent:dr,bridgeCapabilities:de,runAuthed:kr,docId:ge,data:ye,getLiveData:()=>Ee.current??ye,footerOriginSlug:se,error:Ie,redirecting:ir,saveStatus:nr,saveState:xe,autoSaveEnabled:!xe.paused,autoSaveStoppedByConflict:xe.stopped,hasUnsavedEdits:xe.pending||Oe,toggleAutoSave:jr,retrySave:Rr,onChange:vr,flushSave:pr,onPublish:Tr,access:We,readOnly:null!==P(We)||null!==je||null!==Ve,readOnlyReason:je,takeOverEditing:Pr,viewReadOnly:Ir,saveConflict:Ve,saveUnreachable:Ne,reloadFromServer:wr,navigate:Cr,pendingNav:Te,cancelPendingNav:Or,discardAndNavigate:Hr,saveAndNavigate:Er},children:A})}export{M as ScreenDocumentContext,A as ScreenDocumentProvider,V as useScreenDocument};
|
package/dist/chunk-GG4FGBFR.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e={add:{stop:"Stop adding here",hint:"Drag onto the page.",search:"Search blocks",searchPlaceholder:({label:e})=>`${e}…`,clearSearch:"Clear search",nothing:({query:e})=>`Nothing matches “${e}”`,tryAnother:"Try another word.",tile:({label:e})=>`Add ${e}`},canvas:{addSection:"Add section",addBlock:"Add block",addButton:({label:e})=>`+ ${e}`,handle:({label:e})=>`Drag to move this ${e.toLowerCase()}`}};export{e as DEFAULT_DRAG_WORDS};
|
package/dist/chunk-KQMML6JM.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{jsxs as t,jsx as e}from"react/jsx-runtime";function r({side:r}){/* @__PURE__ */
|
|
2
|
-
return t("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,children:[
|
|
3
|
-
/* @__PURE__ */e("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),
|
|
4
|
-
/* @__PURE__ */e("path",{d:"left"===r?"M9 4v16":"M15 4v16"})]})}export{r as PanelToggleIcon};
|
package/dist/chunk-Q6AM43CA.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{MARKUP_TOOLS as e,MARK_PLACEHOLDERS as t}from"./chunk-546BBOPE.js";var i={formatting:"Formatting",alignment:"Alignment",align:{left:"Left",center:"Center",right:"Right",justify:"Justify"},marks:{...Object.fromEntries(e.map(e=>[e.style,{name:e.name??e.title,title:e.title}])),underline:{name:"Underline",title:"Underline · [words]{underline}"},sup:{name:"Superscript",title:"Superscript · [words]{sup}"},sub:{name:"Subscript",title:"Subscript · [words]{sub}"}},placeholders:t,showMarks:"Show marks",clearStyle:"Clear changes",clearStyleEmpty:"Select words first",colors:{title:"Color",theme:"Theme colors",remove:"Remove",any:"Any color",square:"Saturation and brightness",hue:"Hue",hex:"Hex color"},panel:{style:"Style",editStyles:"Edit styles",updateStyle:"Update style",font:"Font",italic:"Italic",list:"List",lists:{none:"No list",bullet:"Bulleted",number:"Numbered"},capitalization:"Capitalization",cases:{none:"As typed",upper:"Uppercase",capitalize:"Capitalized",lower:"Lowercase"}},cells:{fontSize:"Font size",lineHeight:"Line spacing",letterSpacing:"Letter spacing",paragraphSpacing:"Paragraph spacing",tip:({name:e,step:t,unit:i})=>`${e} · step ${t} ${i} · Shift ×10`}};export{i as DEFAULT_COPY_WORDS};
|
package/dist/chunk-U7KFFC7N.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{slotFieldsOf as n}from"./chunk-PLVEGYK6.js";import{usePickFollowsSelection as e}from"./chunk-R6WTQWAC.js";import{EaselCanvas as t,useSelectedFields as r}from"./chunk-SJPKSE5G.js";import{Inspector as i}from"./chunk-26GHWMNN.js";import{createContext as o,useContext as u}from"react";import{DesktopIcon as l}from"efficient-shell/icons/efficient";import{jsx as s}from"react/jsx-runtime";var c={kind:"puck"};function f(n,e){const t=n,r=e,i=Object.keys(t);return i.length===Object.keys(r).length&&i.every(n=>Object.is(t[n],r[n]))}function a(n){const e=n;return"string"==typeof e.nodeId&&"string"==typeof e.slot}function d(e,t,r){const i=e.slotsOf?.(r);return i||n(t,r.type).map(n=>({slot:n,label:n,rung:!1}))}function p(n,e){return n.isFirst?n.isFirst(e):e.type===n.first}function m(n,e){return n.isLast?n.isLast(e):e.type===n.last}var k={},h=()=>k,v=()=>"",g=()=>null,y=()=>{},b={isLockedBlock:()=>!1,duplicateBlocked:()=>null,nestDepth:()=>0,newSectionNode:()=>null,canAddTo:()=>null,blockIsOffered:()=>!0},O={labelAtLevel:(n,e,t)=>t,descriptions:{},categoryLabel:()=>{},firstSection:null,blockRowName:(n,e)=>e(n.type),plainText:n=>n,Icon:()=>null,Thumbnail:()=>null,useProducts:()=>null},S={options:[{id:"desktop",label:"Desktop",icon:/* @__PURE__ */s(l,{})}],initial:"desktop",fluid:"desktop",widths:{desktop:2e3}},j={read:()=>"sections",write:()=>{},forSelection:(n,e)=>n?"sections":e},w={first:null,last:null,firstGroup:null,lastGroup:null,isSectionGroup:()=>!1,sectionGroupZone:()=>"",panelOf:()=>null};function L(){/* @__PURE__ */
|
|
2
|
-
return s(t,{height:"fill"})}function G(){const{id:n,fields:e,values:t,readOnly:o,onChange:u}=r();/* @__PURE__ */
|
|
3
|
-
return s("div",{className:"es-sidepanel es-sidepanel--right",children:/* @__PURE__ */s(i,{fields:e,values:t,onChange:u,readOnly:o,idPrefix:n})})}var N=o({});function P({parts:n,children:e}){/* @__PURE__ */
|
|
4
|
-
return s(N.Provider,{value:n,children:e})}function C(){return u(N)}function D(){return(C().useOwnerName??v)()}function x(){return(C().useDocumentLabel??g)()}function B(n,e,t,r){return(C().useBridges??h)(n,e,t,r)}function I(n){return(C().useStandaloneBridges??h)(n)}function T(n,e){(C().useDocumentPass??y)(n,e)}function A(){return C().blockRules??b}function F(){return C().blockLook??O}function K(){return C().devices??S}function R(){return C().leftView??j}function W(){return C().pinned??w}function E(){return C().saveSwitch??!0}function H(n){e(!0===C().pickFollowsSelection,n)}function V(){return C().storageNamespace||void 0}function J(){return C().styleClipboard??null}function M(){return C().nodeKeys??!0}function Q(){return C().notify??null}function Y(){return C().Canvas??L}function Z(){return C().CanvasHead??null}function q(){return C().canvasDrag??null}var z=o(null);function U({target:n,children:e}){/* @__PURE__ */
|
|
5
|
-
return s(z.Provider,{value:n,children:e})}function X(){return u(z)}function $(){return C().Inspector??G}export{c as SELECTION_MODE,U as ScreenCanvasTargetProvider,P as ScreenPartsProvider,p as isPinnedFirst,m as isPinnedLast,a as isSlotMode,f as sameInspectorMode,d as screenSlotsOf,F as useScreenBlockLook,A as useScreenBlockRules,B as useScreenBridges,q as useScreenCanvasDrag,Y as useScreenCanvasFrame,Z as useScreenCanvasHead,X as useScreenCanvasTarget,K as useScreenDevices,x as useScreenDocumentLabel,T as useScreenDocumentPass,$ as useScreenInspectorPanel,R as useScreenLeftView,M as useScreenNodeKeys,Q as useScreenNotify,D as useScreenOwnerName,C as useScreenParts,H as useScreenPickFollowsSelection,W as useScreenPinned,E as useScreenSaveSwitch,V as useScreenStorageNamespace,J as useScreenStyleClipboard,I as useStandaloneScreenBridges};
|
package/dist/chunk-VWXUMVCD.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e={title:"Add",contextAll:"Sections and blocks",done:"Done",doneDescription:"Close Add and go back",templates:"Your templates",tile:({name:e})=>`Add ${e}`,hint:"Drag onto the page.",search:"Search",onlySections:"Only sections go here",notInside:({name:e})=>`Cannot go inside ${e}`,addingTo:({name:e})=>`Adding to ${e}`,addingBefore:({name:e})=>`Adding before ${e}`,addingAtEnd:"Adding at the end of the page",addingHere:"Adding here"};var a={savedAgo:function({seconds:e}){const a=Math.max(0,Math.floor(e));if(a<1)return"Saved just now";if(a<60)return`Saved ${a} second${1===a?"":"s"} ago`;const o=Math.floor(a/60);if(o<60)return`Saved ${o} minute${1===o?"":"s"} ago`;const n=Math.floor(o/60);return`Saved ${n} hour${1===n?"":"s"} ago`},saved:"All changes saved",saving:"Saving",pending:"Changes not saved yet — saving in a moment",failedIn:({seconds:e})=>`Not saved — trying again in ${e} s`,failedSoon:"Not saved — trying again soon",offline:"You’re offline — we’ll save when you’re back",pausedHeld:"Auto-save is off — changes not saved",paused:"Auto-save is off",locked:({editing:e})=>`Not saving — ${e}`,blockedOffline:"You’re offline. Try again when you’re back online.",blockedFailed:"Your last changes are not saved yet. Try again when they are.",blockedConflict:"Your last save was refused. See the notice below."},o={loading:"Loading…",waitingForAuthorization:"Waiting for editor authorization…",missingTemplatePage:"Couldn’t open a page in this template.",missingPage:({slug:e})=>`No page with slug "${e}".`,missingDocument:"Couldn’t open this document.",loadFailed:({cause:e})=>`Could not load the document — ${e}`,noun:"page",pageSettings:"Page settings",header:"Header",footer:"Footer",pageSections:"Page",templateSections:"Template",addSection:"Add section",addSectionHere:"Add section here",done:"Done",copied:({name:e})=>`Copied ${e}`,pasteRefused:({name:e})=>`${e} can’t be pasted here.`,add:e,canvasAddBlock:"Add block",railMedia:"Media library",leftPanel:"Left panel",resizeLeftPanel:"Resize left panel",leave:{title:"Unsaved changes",body:"Your most recent edits haven’t finished saving yet. Save them before switching, or leave and discard them.",cancel:"Cancel",discard:"Discard & leave",save:"Save & leave",saving:"Saving…"},bar:{undo:"Undo",redo:"Redo",refresh:"Reload the preview",refreshTip:"Reload the preview (keeps your place)",notSaving:"Not saving — see the notice below",retry:"Retry now",autoSaveOff:"Auto-save is off — click to turn it back on (saves your held edits)",autoSaveOn:"Auto-save is on — click to pause it",views:"Left panel views",saveOptions:"Save options",autoSave:"Auto-save",saveNow:"Save now"},saveStatus:a,menu:{undo:"Undo",redo:"Redo",collapseAll:"Collapse all layers",selectAll:"Select all",pinned:"Pinned — can’t be moved or deleted",clipboardRefused:"Your browser won’t let us read the clipboard — press ⌘V"},layers:"Layers",expandAll:"Expand all sections",collapseAll:"Collapse all sections",nothingToFold:"Nothing to fold on this page",editFooter:"Edit the site footer",rename:"Rename",deleteNamed:({name:e})=>`Delete ${e}`,hideNamed:({name:e})=>`Hide ${e}`,showNamed:({name:e})=>`Show ${e}`,addBlockHere:"Add block here",sectionFirst:({name:e})=>`“${e}” is already first`,sectionLast:({name:e})=>`“${e}” is already last`,sectionMoved:({name:e,n:a,total:o})=>`Moved “${e}” to position ${a} of ${o}`,sectionAdded:({name:e})=>`Added “${e}” section`,deleted:({name:e})=>`Deleted “${e}”`,resizeSettingsPanel:"Resize settings panel",sectionSettings:({name:e})=>`${e} settings`,headerSettings:"Header settings",addBlockMenu:"Add block",deviceNote:{tablet:"Tablet uses the desktop settings.",mobile:"Showing the phone settings for this section."}};export{e as DEFAULT_SCREEN_ADD_WORDS,a as DEFAULT_SCREEN_SAVE_STATUS_WORDS,o as DEFAULT_SCREEN_WORDS};
|
package/dist/chunk-ZAOM6PFH.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e={colour:{notSet:"Not set",swatch:({label:e,shown:a})=>`${e}: ${a}`,dialog:({label:e})=>`${e} colour`,theme:"Theme colours",themeSwatchTitle:({name:e,hex:a})=>`${e} · ${a}`,themeSwatch:({name:e,hex:a})=>`${e} ${a}`,square:"Saturation and brightness",squareValue:({saturation:e,brightness:a})=>`Saturation ${e}, brightness ${a}`,hue:"Hue",hex:({label:e})=>`${e} hex code`},image:{choosing:"Choosing…",failed:"The library could not be opened. Try again.",chooseImage:"Choose an image",chooseVideo:"Choose a video",empty:({label:e,kind:a,placeholder:o})=>`${e}: ${o??"choose "+("video"===a?"a video":"an image")}`,hint:"From the library, or upload one",named:({label:e,name:a})=>`${e}: ${a}`,replace:"Replace",replaceNamed:({label:e})=>`Replace ${e.toLowerCase()}`,remove:"Remove",removeNamed:({label:e})=>`Remove ${e.toLowerCase()}`}};export{e as DEFAULT_PICK_WORDS};
|