@jxsuite/studio 8.0.0 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{2020-5wtzce5g.js → 2020-dg097k3e.js} +3 -3
- package/dist/chunks/adapter-tck81zft.js +4 -0
- package/dist/chunks/{add-new-flow-psym14sn.js → add-new-flow-a1w0bnm6.js} +3 -3
- package/dist/chunks/{cf-account-picker-haqazq5r.js → cf-account-picker-ce3kp3x1.js} +3 -3
- package/dist/chunks/cf-settings-7ye6x7g2.js +4 -0
- package/dist/chunks/color-4gj49xq6.js +4 -0
- package/dist/chunks/{color-area-6rbra5dy.js → color-area-vh9cew51.js} +2 -2
- package/dist/chunks/{color-field-gy56c94g.js → color-field-e78f16bs.js} +3 -3
- package/dist/chunks/{color-slider-sqqdyf6c.js → color-slider-fg4yhvk6.js} +2 -2
- package/dist/chunks/{combobox-72h32ejk.js → combobox-6hs00996.js} +2 -2
- package/dist/chunks/components-qce0v93f.js +4 -0
- package/dist/chunks/content-source-jjx8kgzr.js +4 -0
- package/dist/chunks/{convert-to-repeater-he70fc2b.js → convert-to-repeater-grnmea6c.js} +3 -3
- package/dist/chunks/editor-bkja5dbv.js +4 -0
- package/dist/chunks/entry-commands-1wh0btvg.js +4 -0
- package/dist/chunks/{extension-sections-0egb88dm.js → extension-sections-rp7fkega.js} +3 -3
- package/dist/chunks/file-ops-6pe4z7an.js +4 -0
- package/dist/chunks/files-ybpp3j38.js +4 -0
- package/dist/chunks/format-host-3mtbhxk1.js +4 -0
- package/dist/chunks/fs-events-xfanfxds.js +4 -0
- package/dist/chunks/grid-open-dg5qmnaj.js +4 -0
- package/dist/chunks/{grid-view-qg1b5eqx.js → grid-view-x26rfpz1.js} +16 -15
- package/dist/chunks/{icons-63bjtbs7.js → icons-853n6qt3.js} +2 -2
- package/dist/chunks/{iframe-entry-2zggzajv.js → iframe-entry-02wzcyvy.js} +4 -4
- package/dist/chunks/{iframe-entry-99nr5zfb.js → iframe-entry-42hpmwz5.js} +4 -4
- package/dist/chunks/{iframe-entry-76j8vwwx.js → iframe-entry-b5qgggyp.js} +2 -2
- package/dist/chunks/iframe-host-j2bk2xkc.js +4 -0
- package/dist/chunks/{index-32eqzv1k.js → index-203h71wy.js} +3 -3
- package/dist/chunks/index-fkrm7pdk.js +4 -0
- package/dist/chunks/{javascript-pjp734q4.js → javascript-ww5pv5ae.js} +2 -2
- package/dist/chunks/{jsonMode-njkvsa02.js → jsonMode-vwbdwwq3.js} +6 -6
- package/dist/chunks/jx-validate-w7v32f6a.js +4 -0
- package/dist/chunks/layers-g7j732cm.js +4 -0
- package/dist/chunks/layers-panel-gjrsxcck.js +4 -0
- package/dist/chunks/{listbox-c421cf8c.js → listbox-7gka1h86.js} +2 -2
- package/dist/chunks/lit-html-jdfz9rhc.js +4 -0
- package/dist/chunks/media-library-9j0v4wmk.js +4 -0
- package/dist/chunks/media-picker-cpyyt2m0.js +4 -0
- package/dist/chunks/{menu-bdpzbfvs.js → menu-d2jxpgma.js} +2 -2
- package/dist/chunks/{monaco-binding-vq1hgnn0.js → monaco-binding-63tqze27.js} +3 -3
- package/dist/chunks/monaco-buffer-9wcme176.js +4 -0
- package/dist/chunks/{monaco-setup-xrd2cbkp.js → monaco-setup-zyyynnj8.js} +3 -3
- package/dist/chunks/notify-rahnnnv4.js +4 -0
- package/dist/chunks/platform-b2aqv7v5.js +4 -0
- package/dist/chunks/{popover-b89sfej7.js → popover-9tf4cjrk.js} +2 -2
- package/dist/chunks/publish-panel-4yk2461b.js +4 -0
- package/dist/chunks/{publish-quick-qx2455cj.js → publish-quick-ajzdhhs6.js} +3 -3
- package/dist/chunks/publish-workspace-mxestzcf.js +4 -0
- package/dist/chunks/quick-search-9g6z65b0.js +4 -0
- package/dist/chunks/references-c26enpxs.js +4 -0
- package/dist/chunks/right-panel-9d0e0yg7.js +4 -0
- package/dist/chunks/source-control-xyn3a8ds.js +4 -0
- package/dist/chunks/{split-c9zfdgxf.js → split-m5rwn31z.js} +2 -2
- package/dist/chunks/{studio-x9hsze61.js → studio-02phtmqn.js} +4 -4
- package/dist/chunks/{studio-4hp8pkyt.js → studio-0khd0xdw.js} +4 -4
- package/dist/chunks/studio-1fvzq9vs.js +5 -0
- package/dist/chunks/studio-1gdfsr49.js +12 -0
- package/dist/chunks/{studio-3q40e3rj.js → studio-1meqbxns.js} +4 -4
- package/dist/chunks/{studio-q0tccd43.js → studio-1yhz0s8p.js} +4 -4
- package/dist/chunks/studio-25a5by3h.js +5 -0
- package/dist/chunks/{studio-k3xxbagr.js → studio-2b8443ms.js} +3 -3
- package/dist/chunks/{studio-3qqjeep5.js → studio-2c2mjyzj.js} +5 -5
- package/dist/chunks/studio-2dtc90zs.js +10 -0
- package/dist/chunks/{studio-9tmebf0s.js → studio-332hesdk.js} +4 -4
- package/dist/chunks/{studio-03ct6yfv.js → studio-3pndhat0.js} +8 -8
- package/dist/chunks/{studio-s32578pn.js → studio-3q6n9qvq.js} +4 -4
- package/dist/chunks/studio-4dsdnan2.js +9 -0
- package/dist/chunks/{studio-ed1hp6zf.js → studio-4fjqdzrb.js} +5 -5
- package/dist/chunks/{studio-jcnsdaep.js → studio-533py3yy.js} +4 -4
- package/dist/chunks/studio-5abge3wy.js +5 -0
- package/dist/chunks/{studio-8tr6cfrc.js → studio-6vrxzkba.js} +4 -4
- package/dist/chunks/{studio-jaaz8ce9.js → studio-73wz63nn.js} +4 -4
- package/dist/chunks/{studio-bavb31r0.js → studio-74nzv280.js} +4 -4
- package/dist/chunks/{studio-q7rtx6zq.js → studio-7cg75gtj.js} +7 -7
- package/dist/chunks/studio-89cwmnae.js +5 -0
- package/dist/chunks/studio-8m1t83kn.js +7 -0
- package/dist/chunks/{studio-q0mvbaq6.js → studio-8nyw10dp.js} +4 -4
- package/dist/chunks/{studio-83mk4bgg.js → studio-94ppxeqy.js} +8 -8
- package/dist/chunks/{studio-qmn1xc24.js → studio-957jg8g3.js} +4 -4
- package/dist/chunks/{studio-r5qy30vx.js → studio-9wyqyfqy.js} +4 -4
- package/dist/chunks/studio-a3evp7f6.js +6 -0
- package/dist/chunks/{studio-n0c5h6mf.js → studio-a6x058ew.js} +4 -4
- package/dist/chunks/studio-ana67wax.js +5 -0
- package/dist/chunks/studio-b4xhpcwy.js +4 -0
- package/dist/chunks/studio-bf0rgyf7.js +5 -0
- package/dist/chunks/{studio-x1x167jh.js → studio-bqgs90r8.js} +4 -4
- package/dist/chunks/{studio-qwdqwkj0.js → studio-c4rcaftm.js} +4 -4
- package/dist/chunks/{studio-mn0476ag.js → studio-c5dj3dzk.js} +4 -4
- package/dist/chunks/studio-cgjt1zce.js +5 -0
- package/dist/chunks/{studio-bbe4c90a.js → studio-cpdzrdgp.js} +4 -4
- package/dist/chunks/studio-cq87hree.js +5 -0
- package/dist/chunks/studio-d140sy8e.js +5 -0
- package/dist/chunks/{studio-jsgf2q5k.js → studio-dmn7gpba.js} +5 -5
- package/dist/chunks/studio-e8pzjjhf.js +5 -0
- package/dist/chunks/{studio-dgk4dqtx.js → studio-f8kz3krj.js} +5 -5
- package/dist/chunks/{studio-qgh13jtz.js → studio-fqs1a22a.js} +4 -4
- package/dist/chunks/{studio-syreb644.js → studio-fw3jp9m7.js} +4 -4
- package/dist/chunks/{studio-ed3xx40h.js → studio-g6ysm05p.js} +6 -6
- package/dist/chunks/studio-gmhd0j3f.js +5 -0
- package/dist/chunks/{studio-p4nrkvqr.js → studio-gqpty626.js} +4 -4
- package/dist/chunks/{studio-kt3pjkwd.js → studio-grp684wx.js} +4 -4
- package/dist/chunks/{studio-df0baea9.js → studio-h98520qr.js} +4 -4
- package/dist/chunks/{studio-8m0y2qe7.js → studio-hnx1h1pr.js} +4 -4
- package/dist/chunks/studio-hvxt8z79.js +5 -0
- package/dist/chunks/{studio-43sd2mam.js → studio-hw60n5dh.js} +3 -3
- package/dist/chunks/{studio-wbcjbhy1.js → studio-hxq1ebp0.js} +6 -6
- package/dist/chunks/{studio-wys23mxz.js → studio-j4e627w1.js} +4 -4
- package/dist/chunks/{studio-ccv2svc6.js → studio-j5jqvyn3.js} +4 -4
- package/dist/chunks/{studio-881z1xrx.js → studio-jqrg9xxg.js} +4 -4
- package/dist/chunks/{studio-b7y5mr30.js → studio-kdseew9m.js} +4 -4
- package/dist/chunks/studio-kt2j51sa.js +5 -0
- package/dist/chunks/{studio-d5grtb9e.js → studio-m4w6sygj.js} +9 -9
- package/dist/chunks/{studio-zz9qe3rw.js → studio-mmqr9awv.js} +37 -37
- package/dist/chunks/{studio-5g0rprdt.js → studio-nm9qev4p.js} +5 -5
- package/dist/chunks/{studio-tft6r105.js → studio-nsv7g1qn.js} +4 -4
- package/dist/chunks/{studio-3e54qh39.js → studio-p89w12s2.js} +5 -5
- package/dist/chunks/{studio-y3ahhdpx.js → studio-pbagym4j.js} +4 -4
- package/dist/chunks/{studio-w4rz9hdk.js → studio-pr23qhrw.js} +4 -4
- package/dist/chunks/{studio-6m380wp7.js → studio-r4ya3sb2.js} +4 -4
- package/dist/chunks/studio-rdnezzkd.js +6 -0
- package/dist/chunks/{studio-f14e1zdj.js → studio-rm9m3z60.js} +4 -4
- package/dist/chunks/studio-tpmnbgmt.js +5 -0
- package/dist/chunks/studio-ttxhq5yt.js +5 -0
- package/dist/chunks/{studio-nh6d342n.js → studio-txkx6586.js} +6 -6
- package/dist/chunks/{studio-a2bvaptz.js → studio-v0gsjav0.js} +4 -4
- package/dist/chunks/{studio-fbhxxc5f.js → studio-v2ek69cb.js} +4 -4
- package/dist/chunks/{studio-y0n7yxea.js → studio-wcakp5bt.js} +7 -7
- package/dist/chunks/{studio-k7evxqh4.js → studio-x3ge4rts.js} +4 -4
- package/dist/chunks/{studio-pbxa5fpc.js → studio-xddgbwhe.js} +3 -3
- package/dist/chunks/{studio-c05wdnt3.js → studio-y1x65h5r.js} +4 -4
- package/dist/chunks/{studio-rthyg42z.js → studio-z42kysg7.js} +169 -169
- package/dist/chunks/studio-zf188hnd.js +5 -0
- package/dist/chunks/{studio-tfkznv39.js → studio-zht0x0v3.js} +4 -4
- package/dist/chunks/{studio-svb7yyve.js → studio-zm7dnr9g.js} +4 -4
- package/dist/chunks/{tooltip-yypz28gq.js → tooltip-dj1pvgz7.js} +2 -2
- package/dist/chunks/{tree-9xa4hm7n.js → tree-j0ebwr5s.js} +2 -2
- package/dist/chunks/{tsMode-epyfz1hv.js → tsMode-vra2hh7y.js} +5 -5
- package/dist/chunks/workspace-3nt93k48.js +4 -0
- package/dist/chunks/workspace-home-zbgyqqws.js +4 -0
- package/dist/chunks/{ws-client-bv552sfx.js → ws-client-72x5n99j.js} +3 -3
- package/dist/iframe-entry.js +14 -14
- package/dist/manifest.json +75 -75
- package/dist/studio.js +80 -80
- package/package.json +11 -11
- package/src/browse/component-examples.ts +15 -224
- package/src/browse/library-preview.ts +6 -13
- package/src/browse/preview-root.ts +7 -4
- package/src/canvas/canvas-utils.ts +18 -4
- package/src/canvas/iframe-editable-root.ts +13 -4
- package/src/canvas/iframe-entry.ts +3 -1
- package/src/canvas/iframe-interaction.ts +11 -2
- package/src/canvas/iframe-render.ts +25 -3
- package/src/canvas/preview-placeholder.ts +120 -0
- package/src/editor/shortcuts.ts +3 -0
- package/src/panels/component-preview.ts +5 -0
- package/src/panels/pane-context.ts +43 -18
- package/src/panels/site-model.ts +7 -19
- package/src/panels/site-panel.ts +2 -25
- package/src/panels/stylebook-doc.ts +2 -53
- package/src/services/references.ts +0 -0
- package/src/style/stylebook-specimens.ts +11 -15
- package/src/surfaces/pane-context.json +286 -265
- package/src/surfaces/pane-context.ts +17 -8
- package/src/tabs/tab.ts +5 -6
- package/src/utils/geometry.ts +49 -2
- package/dist/chunks/adapter-5tphg7xe.js +0 -4
- package/dist/chunks/cf-settings-h2wrh6hq.js +0 -4
- package/dist/chunks/color-m7r1vk54.js +0 -4
- package/dist/chunks/components-r22xca09.js +0 -4
- package/dist/chunks/content-source-mmppmcyg.js +0 -4
- package/dist/chunks/editor-ccd9jwsa.js +0 -4
- package/dist/chunks/entry-commands-6qxz9e8p.js +0 -4
- package/dist/chunks/file-ops-qnab36ek.js +0 -4
- package/dist/chunks/files-rcn56qvm.js +0 -4
- package/dist/chunks/format-host-yxz0kjjs.js +0 -4
- package/dist/chunks/fs-events-d1qxq4z4.js +0 -4
- package/dist/chunks/grid-open-4z1g062t.js +0 -4
- package/dist/chunks/iframe-host-ssv7kyj0.js +0 -4
- package/dist/chunks/index-f0jn7nnp.js +0 -4
- package/dist/chunks/jx-validate-ttasrbh7.js +0 -4
- package/dist/chunks/layers-bgyr11tr.js +0 -4
- package/dist/chunks/layers-panel-7ez66zeq.js +0 -4
- package/dist/chunks/lit-html-v9gh687x.js +0 -4
- package/dist/chunks/media-library-sq468wts.js +0 -4
- package/dist/chunks/media-picker-shfe59pt.js +0 -4
- package/dist/chunks/monaco-buffer-3afgwvbp.js +0 -4
- package/dist/chunks/notify-kzrjr3fv.js +0 -4
- package/dist/chunks/platform-7v4rtd7m.js +0 -4
- package/dist/chunks/publish-panel-2z9gw8ee.js +0 -4
- package/dist/chunks/publish-workspace-wrc1dgwx.js +0 -4
- package/dist/chunks/quick-search-n0t0eqxb.js +0 -4
- package/dist/chunks/references-9547rg5s.js +0 -4
- package/dist/chunks/right-panel-wsgnr9pn.js +0 -4
- package/dist/chunks/source-control-kwktr9y6.js +0 -4
- package/dist/chunks/studio-07rcfje3.js +0 -5
- package/dist/chunks/studio-3exxhz5g.js +0 -5
- package/dist/chunks/studio-3qeh9t0h.js +0 -6
- package/dist/chunks/studio-58xg6j2q.js +0 -9
- package/dist/chunks/studio-80jyh1xh.js +0 -4
- package/dist/chunks/studio-8vcvfs7r.js +0 -6
- package/dist/chunks/studio-fyh0jc96.js +0 -5
- package/dist/chunks/studio-gcxk20n7.js +0 -5
- package/dist/chunks/studio-m8g16bgz.js +0 -5
- package/dist/chunks/studio-mx1smyq0.js +0 -5
- package/dist/chunks/studio-pgmvdv7z.js +0 -7
- package/dist/chunks/studio-ph84avkf.js +0 -5
- package/dist/chunks/studio-rj9eamf8.js +0 -5
- package/dist/chunks/studio-rptgsk96.js +0 -5
- package/dist/chunks/studio-s19tp1xr.js +0 -5
- package/dist/chunks/studio-tf9jryb1.js +0 -10
- package/dist/chunks/studio-txf2kysx.js +0 -5
- package/dist/chunks/studio-v8867ddv.js +0 -12
- package/dist/chunks/studio-vxq7fcvv.js +0 -5
- package/dist/chunks/studio-wc649wss.js +0 -5
- package/dist/chunks/studio-z97c48fk.js +0 -5
- package/dist/chunks/studio-zat62m0c.js +0 -5
- package/dist/chunks/studio-zcd2e7yz.js +0 -5
- package/dist/chunks/workspace-dz7nxfhv.js +0 -4
- package/dist/chunks/workspace-home-xsd7hkjw.js +0 -4
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{Vn,m,Ht}from"./studio-y1x65h5r.js";import{_D}from"./studio-3pndhat0.js";import{Qu}from"./studio-5abge3wy.js";import{le}from"./studio-fqs1a22a.js";var e="edit",a=new Set(["edit","design"]);function r(t){for(let i of m.tabs.values())if(i.documentPath===t)return i;return null}async function Ml(t){if(!Qu(t)){let o=Vn(t);if(o&&!o.fileBacked)return _D(t);let{openFileInTab:s}=await (le("ybpp3j38"),import("./files-ybpp3j38.js"));return await s(t),r(t)}let{openFileInTab:i}=await (le("ybpp3j38"),import("./files-ybpp3j38.js"));await i(t);let n=r(t);if(!n)return null;if(!a.has(n.session.ui.canvasMode)&&n.capabilities.modes.includes(e))n.session.ui.canvasMode=e,n.session.ui.preview=!1;return Ht(n.id),n}
|
|
2
|
+
export{Ml};
|
|
3
|
+
|
|
4
|
+
//# debugId=739959A3952822AD64756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-89cwmnae.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{p,_e}from"./studio-pr23qhrw.js";import{Cs}from"./studio-2dtc90zs.js";import{Q}from"./studio-nqxqf8p2.js";import{ge,ne,g,C}from"./studio-hw60n5dh.js";import{wi,T,R,rt,xi}from"./studio-02phtmqn.js";import{Vt,ln,go,Zb}from"./studio-y1x65h5r.js";import{Vs}from"./studio-wcakp5bt.js";import{Xt}from"./studio-xddgbwhe.js";import{Cr}from"./studio-cq87hree.js";import{Dp}from"./studio-gmhd0j3f.js";import{or}from"./studio-hvxt8z79.js";import{wr,Zu,SS,mN,Sb,ci,Aw,yN,Wl,TS,eh,xN,kp}from"./studio-5abge3wy.js";import{bb,vb}from"./studio-1yhz0s8p.js";import{yi}from"./studio-g6ysm05p.js";import{pp,z_,bE,eb,vE,Qy,ew,dD,wE,am,tw,pD,xE,tb,fD,mD,gD,bD,vD,_E,yD}from"./studio-3pndhat0.js";import{Ml}from"./studio-89cwmnae.js";import{Z_}from"./studio-j4e627w1.js";import{ya}from"./studio-d140sy8e.js";import{VD,yw,ww,bp}from"./studio-a3evp7f6.js";import{vp}from"./studio-e1g64q43.js";import{S,xn}from"./studio-ana67wax.js";import{n,te,_,v}from"./studio-kt2j51sa.js";import{le}from"./studio-fqs1a22a.js";function ee(e){return{contentType:null,draft:!1,layout:void 0,path:e}}function ue(e,t,a){let{contentType:r,layout:o}=TS(t,a),i=a?.[Cs]===!0||t?.[Cs]===!0;return{contentType:r,draft:i,layout:o,path:e}}async function De(e){try{let t=await p().readFile(e);if(e.endsWith(".json")){let o=JSON.parse(t);return _(o)&&!Array.isArray(o)?ue(e,o,null):ee(e)}let{parseSourceForPath:a}=await (le("6pe4z7an"),import("./file-ops-6pe4z7an.js")),r=await a(e,t);return ue(e,r.document,r.frontmatter)}catch{return ee(e)}}var Ie=300,q=null,V=null,ae=0,re=new Set;function me(e){let t=e.join(`
|
|
2
|
+
`);if(q?.key===t)return q.pages;if(!_e())return new Map(e.map((a)=>[a,ee(a)]));if(V?.key!==t){let a=ae,r=Promise.all(e.slice(0,Ie).map((o)=>De(o))).then((o)=>{if(a!==ae||V?.read!==r)return;V=null,q={key:t,pages:new Map(o.map((i)=>[i.path,i]))};for(let i of re)i()});V={key:t,read:r}}return null}function Ug(){ae+=1,q=null,V=null}function fe(e){return re.add(e),()=>{re.delete(e)}}function jy(e){return e?"true":"false"}function VR(e){return e.trim().toLowerCase()}function qg(e,...t){return e===""||t.some((a)=>a.toLowerCase().includes(e))}function kd(e){let t=e.replaceAll(/[-_]+/g," ").trim();return t===""?e:t.charAt(0).toUpperCase()+t.slice(1)}function ie(e){let t=kd(e);if(/ies$/i.test(t))return`${t.slice(0,-3)}y`;if(/[^s]s$/i.test(t))return t.slice(0,-1);return t}function oe(e){let t=e.slice(e.lastIndexOf("/")+1),a=t.lastIndexOf(".");return a>0?t.slice(0,a):t}function Y(e,t,a){let r=go(t,a);return r===null?e:`${e} (${r})`}function U(e,t,a=null){if(go(t,a)!==null){let c=Zb(t,a);return Y(U(wr(c),c),t,a)}if(e.urlPattern==="/")return"Home";let r=e.urlPattern.split("/").filter((c)=>c!==""),o=(c)=>c==="*"||c.startsWith(":"),i=r.at(-1)??oe(t);if(!o(i))return kd(i);let l=r.findLast((c)=>!o(c));return kd(l??oe(t).replaceAll(/[[\].]/g,""))}function UR(e,t,a,r={}){let o=r.i18n??null,i=e.flatMap((u)=>Zu(u.path,r.extensions)?[{fact:u,route:wr(u.path)}]:[]).toSorted((u,m)=>SS(u.route,m.route)||u.fact.path.localeCompare(m.fact.path)),l=[],c=(u,m,f,x)=>({detail:m.urlPattern,key:u.path,kind:f,label:x,path:u.path,selected:jy(u.path===a)}),d=new Map;for(let u of i){let m=u.fact.contentType;if(m!==null&&t.has(m))d.set(m,[...d.get(m)??[],u])}let s=new Set;for(let{fact:u,route:m}of i){let f=u.contentType,x=f===null?void 0:d.get(f);if(f===null||x===void 0){l.push(c(u,m,"page",U(m,u.path,o)));continue}if(s.has(f))continue;s.add(f),l.push({detail:Ve(t.get(f)??null),key:`collection:${f}`,kind:"collection",label:kd(f),path:"",selected:"false"});let H=`${ie(f)} page`;for(let O of x){let P=Y(H,O.fact.path,o);l.push(c(O.fact,O.route,"entry-page",P))}}return l}function Ve(e){if(e===null)return"";return`${e} ${e===1?"entry":"entries"}`}function qR(e,t){if(t==="")return[...e];let a=[],r=null,o=!1;for(let i of e){if(i.kind==="collection"){if(r=i,o=qg(t,i.label),o)a.push(i);continue}if(i.kind==="page")r=null;if(i.kind==="entry-page"&&o||qg(t,i.label,i.detail,i.path)){if(r&&!o)a.push(r),o=!0;a.push(i)}}return a}function Vk(e,t,a,r=null){return e.filter((o)=>o.endsWith(".json")).toSorted((o,i)=>o.localeCompare(i)).flatMap((o)=>{let i=kd(oe(o));if(!qg(a,i,o))return[];return[{detail:o===r?"default layout":"",key:o,label:i,path:o,selected:jy(o===t)}]})}var ze='img:not([src]), img[src=""] { visibility: hidden; }',he=new WeakMap;function Be(e){let t=he.get(e);if(t)return t;let a=e.defaultView?.CSSStyleSheet;if(!te(a))return null;let r=new a;return r.replaceSync(ze),he.set(e,r),r}function Hy(e,t){let a=e.shadowRoot??e.attachShadow({mode:"open"}),r=Be(e.ownerDocument);a.adoptedStyleSheets=[...VD(),...e.ownerDocument.adoptedStyleSheets,...r?[r]:[]],a.replaceChildren(t)}function By(e){return e.shadowRoot?.firstElementChild??null}function z(e,t){if(e===void 0||e.trim()==="")return[];if(!t)return[e];return e.split(",").map((a)=>a.trim()).filter((a)=>a!=="")}var We=12;function be(e,t,a){let r=e.find((o)=>t.has(o.name));if(r)return{...r,order:t.get(r.name)};for(let o of e){if(o.measure)continue;let i=a.flatMap((c)=>z(c?.fields?.[o.name],o.list)),l=new Set(i).size;if(l>=2&&l<i.length&&l<=We)return{...o,order:[]}}return null}function N(e){return(t)=>e.get(t.path)}var we=N(new Map),de={board:{itemWidth:0,rowHeight:0,windowed:!1},calendar:{itemWidth:0,rowHeight:0,windowed:!1},cards:{itemWidth:200,rowHeight:194,windowed:!0},table:{itemWidth:0,rowHeight:32,windowed:!0}},He=60,se=25;function ve(e,t){let a=de[e];if(a.itemWidth<=0||t<=0)return 1;return Math.max(1,Math.floor(t/a.itemWidth))}function Ge(e){if(e===void 0||!Number.isFinite(e))return"";if(e<1024)return`${e} B`;let t=["KB","MB","GB"],a=e/1024,r=0;while(a>=1024&&r<t.length-1)a/=1024,r+=1;return`${a<10?a.toFixed(1):Math.round(a)} ${t[r]}`}function qe(e){return e?vp(new Date(e)):""}function Ye(e,t,a){switch(t){case"date":return a?.date??"";case"status":return a?.status??"";case"template":return a?.template??"";case"title":return a?.title??e.name;case"locale":return e.locale?Vt(e.locale):"";case"modified":return qe(e.modified);case"name":return e.name;case"path":return e.record?.source??e.path;case"size":return Ge(e.size);case"type":return e.type;case"url":return e.collection===ci?wr(e.path).urlPattern:"";default:{let r=bD(t);return r===null?"":a?.fields?.[r]??""}}}function xe(e,t,a,r){let o=Dp(e.ext),i=r?.thumb??"";return{art:o||i!==""?"image":a&&e.collection!==null&&!e.record?"doc":"glyph",cells:t.map((l)=>({field:l.field,text:Ye(e,l.field,r)})),meta:e.type,name:r?.title??e.name,path:e.path,src:o?or(e.path):i}}function ce(e,t){return{art:"glyph",cells:[],meta:e.type,name:t?.title??e.name,path:e.path,src:""}}function $e(e,t=we){let{days:a,undated:r}=mD(e,(c)=>t(c)?.date||xE(c)),o=a.slice(0,He),i=a.length-o.length,l=o.map((c)=>({count:"",files:c.files.map((d)=>ce(d,t(d))),id:c.date,note:"",noteState:"hidden",title:c.date,undated:"false"}));if(r.length>0)l.push({count:"",files:r.slice(0,se).map((c)=>ce(c,t(c))),id:"__undated",note:`${r.length} file${r.length===1?"":"s"} with no dated name and no modification time.`,noteState:"shown",title:"No date",undated:"true"});return{groups:l,truncated:i>0?`${i} older ${i===1?"day is":"days are"} not shown — filter, or switch to Table.`:""}}var ye=["Draft","Published"];function Ue(e,t){let a=new Map;for(let o of e){let i=t(o)?.status||"No status",l=a.get(i);if(l)l.push(o);else a.set(i,[o])}let r=(o)=>{let i=ye.indexOf(o);return i===-1?ye.length:i};return[...a.entries()].map(([o,i])=>({files:i,group:o})).toSorted((o,i)=>r(o.group)-r(i.group)||o.group.localeCompare(i.group))}function Je(e,t,a){let r=`No ${a.title.toLowerCase()}`,o=new Map;for(let l of e){let c=z(t(l)?.fields?.[a.name],a.list);for(let d of c.length===0?[r]:new Set(c)){let s=o.get(d);if(s)s.push(l);else o.set(d,[l])}}let i=(l)=>{if(l===r)return Number.MAX_SAFE_INTEGER;let c=a.order.indexOf(l);return c===-1?a.order.length:c};return[...o.entries()].map(([l,c])=>({files:c,group:l})).toSorted((l,c)=>i(l.group)-i(c.group)||l.group.localeCompare(c.group))}function Se(e,t=we,a=null){return(e.some((i)=>(t(i)?.status??"")!=="")?Ue(e,t):a?Je(e,t,a):gD(e)).map((i)=>{let l=i.files.length-se;return{count:String(i.files.length),files:i.files.slice(0,se).map((c)=>ce(c,t(c))),id:i.group,note:l>0?`${l} more — switch to Table to see them.`:"",noteState:l>0?"shown":"hidden",title:i.group,undated:"false"}})}var Le={$schema:"https://jxsuite.com/schema/v1",$id:"StudioLibraryPane",$description:"The Content home (studio.md §22.5): one collection, browsed, as a Jx document over the kit. The adapter (`browse/library-pane.ts`) keeps every decision — which collection is shown, which of its files the filter kept, which of them the window renders, where the collection is published, and what a row's context menu offers — and hands this document one projection: a discriminant naming which of eight things to draw, the view switch already marked, a header line that is one of four states, and rows that are already strings. Nothing here asks what a file is, how big the viewport is, or whether the scan finished. The eight cases of `view` are the four honest empty states the Manage view collapsed into “No files found” — a scan still running, a scan that could not finish, a collection with nothing in it, and a filter that matched nothing — followed by the four views, so “what is on screen” has exactly one source. A card's live preview is an ISLAND: the document renders `doc-preview` and nothing inside it, and the adapter fills it through `onNodeCreated` when the card comes into view.",tagName:"div",attributes:{part:"library","data-jx-region":"${state.region}"},style:{$description:"What the fifty-two `.library*` rules in `styles/overlays.css` said, keyed on `part` and re-pointed at the studio token layer. Every one of them was this surface's alone, so the block goes with the conversion rather than being copied. Three sets of names could not come with the declarations. Ten `var(--spectrum-font-size-50 | -75, …)` reads are the kit's `--jx-text-sm` and `--jx-text-md`, which are the same 11px and 12px: a `--spectrum-*` name is declared by `<sp-theme>` and by nothing else in this package, and `styles/spectrum.css` is deleted whole with the last Spectrum component, so a document that reads one is a document whose colours change when a component it does not use is removed. `--spectrum-gray-100` and `--spectrum-gray-200` are the studio's own `--bg-input` and `--hover-bg`; `--spectrum-blue-600` — the card's hover border and the drop outline — is `--accent`, which is what a Spectrum blue was standing in for; and `--spectrum-orange-100`, the incomplete-scan banner's ground, is mixed from `--warning` so the banner follows the chrome theme instead of being a dark-only hex. Nine names that were handles rather than styling stop being names at all: `.library-grid-cards`, `.library-grid-media`, `.library-day-undated`, `.library-drop-active`, `.library-upload-input` and the four `data-field` widths are `data-` attributes on a part here, because a part is the handle now.",display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"hidden",fontFamily:"var(--jx-font-sans)",fontSize:"var(--jx-text-md)",color:"var(--fg)",'& [part="banner-slot"], & [part="locale-slot"], & [part="filter-slot"], & [part="fields-slot"], & [part="new-slot"], & [part="page-slot"], & [part="view-slot"], & [part="art-slot"], & [part="note-slot"], & [part="truncated-slot"]':{$description:"A `$switch` renders its own container, and none of these six is a box: each stands exactly where its case does, so the case's own rule is the only one that lays anything out.",display:"contents"},'& [part="head"]':{$description:"The collection's title over its toolbar: the Content-Collection and Content-Pages boards' heading row. It does not scroll with the list.",display:"flex",flexDirection:"column",gap:"var(--jx-space-3)",padding:"var(--jx-space-4) var(--jx-space-5) var(--jx-space-3)",background:"var(--bg-panel)",borderBottom:"1px solid var(--border)",flexShrink:"0"},'& [part="heading"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-1)"},'& [part="title"]':{margin:"0",fontSize:"var(--jx-text-lg)",fontWeight:"600",color:"var(--fg)"},'& [part="subtitle"]':{margin:"0",fontSize:"var(--jx-text-md)",color:"var(--fg-dim)"},'& [part="subtitle"]:empty':{$description:"Only Pages carries a line under its title; a collection's own line is the header bar below the toolbar.",display:"none"},'& [part="toolbar"]':{$description:"It wraps rather than scrolls: the view switch, the search, the language facet, Fields and New are all equally reachable, and a toolbar that hid half of them behind an overflow would put the collection's own state somewhere the reader has to go looking for it.",display:"flex",alignItems:"center",gap:"var(--jx-space-3)",padding:"0",flexShrink:"0",flexWrap:"wrap"},'& [part="search"]':{width:"220px"},'& [part="locale"]':{$description:"Narrow on purpose: it holds one language name, and the toolbar wraps before it grows.",width:"160px"},'& [part="filter"]':{$description:"Narrow like the language facet: it holds one value of one field.",width:"160px"},'& [part="spacer"]':{flex:"1"},'& [part="layouts"]':{flexShrink:"0"},'& [part="banner"]':{$description:"The banner an INCOMPLETE listing carries. The Problem in the dock is the durable record; this is the same fact on the surface it is about, because a reader looking at a short list needs to know it is short for a reason without going anywhere to find out.",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"var(--jx-space-4)",padding:"var(--jx-space-3) var(--jx-space-5)",background:"color-mix(in srgb, var(--warning) 18%, var(--bg-panel))",borderBottom:"1px solid var(--border)",color:"var(--fg)",fontSize:"var(--jx-text-md)"},'& [part="body"]':{flex:"1",minHeight:"0",overflow:"auto",position:"relative"},'& [part="empty"]':{padding:"48px var(--jx-space-6)",textAlign:"center",color:"var(--fg-dim)",display:"flex",flexDirection:"column",alignItems:"center",gap:"var(--jx-space-3)"},'& [part="empty"] p':{margin:"0"},'& [part="empty-detail"]':{fontSize:"var(--jx-text-md)",color:"var(--fg-dim)"},'& [part="truncated"]':{$description:"What a capped layout did not draw, stated. A grouped list cannot window — a window over one either breaks the groups or needs variable-height measurement — so Calendar and Board cap instead, and a layout that truncated in silence would be the same class of lie as “No files found”.",margin:"var(--jx-space-3) 0 0",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="grid"]':{$description:"Cards and Media, the two windowed grids. The item sizes here are the ones `library-layouts.ts`'s LAYOUT_METRICS counts rows in; change one and change both.",display:"grid",gap:"var(--jx-space-4)",padding:"var(--jx-space-4) var(--jx-space-5)",alignItems:"start"},'& [part="grid"][data-layout="cards"]':{gridTemplateColumns:"repeat(auto-fill, minmax(188px, 1fr))"},'& [part="card"], & [part="tile"]':{cursor:"pointer",overflow:"hidden",border:"1px solid var(--border)",borderRadius:"var(--radius)",background:"var(--bg-panel)"},'& [part="card"]:hover, & [part="tile"]:hover':{borderColor:"var(--accent)"},'& [part="card-art"], & [part="tile-art"]':{aspectRatio:"4 / 3",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",background:"var(--bg-input)",pointerEvents:"none"},'& [part="file-glyph"]':{"--jx-icon-size":"32px",color:"var(--fg-dim)"},'& [part="doc-preview"]':{$description:"The island. The document renders this box and nothing inside it; the adapter mounts a real runtime render of the file into a shadow root of the island's own when the card comes into view (`mountPreview` in `browse/library-preview.ts`, which keeps the document's ids out of Studio's), and the zoom is what makes a page-sized document readable as a thumbnail without rendering it at thumbnail size: the render is laid out in a box two and a half times as wide and drawn at 0.4. It is `inert`, so a page's own links and buttons are neither focusable nor named inside the card.",width:"100%",height:"100%",zoom:"0.4",overflow:"hidden"},'& [part="thumb"]':{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"},'& [part="card-label"], & [part="tile-label"]':{padding:"6px var(--jx-space-3) 0",fontSize:"var(--jx-text-md)",color:"var(--fg)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},'& [part="card-meta"]':{padding:"0 var(--jx-space-3) 6px",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="table"]':{$description:"A windowed list rather than a table component: the rows have to be sliceable, and every table widget wants the whole set.",display:"flex",flexDirection:"column",minWidth:"min-content",padding:"0 var(--jx-space-5) var(--jx-space-5)"},'& [part="table-head"], & [part="table-row"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-3)",height:"32px",borderBottom:"1px solid var(--border)"},'& [part="table-head"]':{position:"sticky",top:"0",zIndex:"1",background:"var(--bg-panel)",fontWeight:"600",fontSize:"var(--jx-text-md)"},'& [part="table-row"]':{cursor:"pointer"},'& [part="table-row"]:hover':{background:"var(--hover-bg)"},'& [part="cell"]':{$description:"Every column keeps a floor: with a collection's six field columns beside the file facts, a cell that may shrink to nothing is a column of ellipses. When the floors outgrow the pane, the table scrolls sideways instead. Each cell's text is kept out of its intrinsic width (`contain: inline-size`), so the table's `min-content` is the sum of those floors rather than of every full title.",flex:"1",minWidth:"80px",contain:"inline-size",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"var(--jx-text-md)"},'& [part="cell"][data-field="name"], & [part="cell"][data-field="title"]':{$description:"What a row is called keeps a readable width however many field columns stand beside it.",flex:"3",minWidth:"220px",fontWeight:"500"},'& [part="cell"][data-field="path"]':{flex:"2",color:"var(--fg-dim)",fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)"},'& [part="cell"][data-field="size"], & [part="cell"][data-field="modified"]':{flex:"0 0 96px"},'& [part="cell"][data-field="locale"]':{$description:"Fixed, like size and modified: a language name is short and never earns width from Name. Without this it inherits the `flex: 1` above and the Name column loses a quarter of itself in every multilingual project.",flex:"0 0 90px",color:"var(--fg-dim)"},'& [part="calendar"]':{padding:"var(--jx-space-4) var(--jx-space-5)"},'& [part="day"]':{marginBottom:"var(--jx-space-5)"},'& [part="day-date"]':{margin:"0 0 var(--jx-space-2)",fontSize:"var(--jx-text-md)",fontWeight:"600",color:"var(--fg)"},'& [part="day"][data-undated="true"] [part="day-date"]':{$description:"A file with no dated name and no modification time is set apart rather than parked on today. A calendar that invents dates is worse than one that says which files it could not place.",color:"var(--fg-dim)"},'& [part="note"]':{margin:"0 0 var(--jx-space-2)",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="board"]':{display:"flex",gap:"var(--jx-space-4)",padding:"var(--jx-space-4) var(--jx-space-5)",alignItems:"flex-start",overflowX:"auto"},'& [part="column"]':{flex:"0 0 220px",border:"1px solid var(--border)",borderRadius:"var(--radius)",padding:"var(--jx-space-3)",background:"var(--bg-panel)"},'& [part="column-title"]':{margin:"0 0 6px",fontSize:"var(--jx-text-md)",fontWeight:"600",display:"flex",justifyContent:"space-between"},'& [part="count"]':{color:"var(--fg-dim)",fontWeight:"400"},'& [part="list"]':{listStyle:"none",margin:"0",padding:"0"},'& [part="list-item"]':{padding:"3px var(--jx-space-2)",borderRadius:"var(--radius)",cursor:"pointer",fontSize:"var(--jx-text-md)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},'& [part="list-item"]:hover':{background:"var(--hover-bg)"},'& [part="page-line"]':{$description:"One line saying where the collection's entries are published, the Content-Collection board's bar under the toolbar. Its action is quiet: it opens another workspace, and it must not compete with New.",display:"flex",alignItems:"center",flexWrap:"wrap",gap:"var(--jx-space-2)",padding:"var(--jx-space-2) var(--jx-space-5)",background:"var(--bg-panel)",borderBottom:"1px solid var(--border)",fontSize:"var(--jx-text-md)",color:"var(--fg-dim)",flexShrink:"0"},'& [part="page-pattern"]':{fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)",color:"var(--fg)"},'& [part="design-page"], & [part="add-page"]':{marginLeft:"auto"},'& [part="card"]:focus-visible, & [part="table-row"]:focus-visible, & [part="list-item"]:focus-visible':{$description:"Rows and cards open on Enter or Space as well as a click, so the keyboard reaches an entry; the ring says which one it is on.",outline:"var(--jx-focus-ring)",outlineOffset:"-2px"}},children:[{tagName:"div",attributes:{part:"head"},children:[{tagName:"div",attributes:{part:"heading"},children:[{tagName:"h2",attributes:{part:"title"},textContent:"${state.title}"},{tagName:"p",attributes:{part:"subtitle"},textContent:"${state.subtitle}"}]},{tagName:"div",attributes:{part:"toolbar"},children:[{tagName:"jx-action-group",attributes:{part:"layouts"},$props:{selects:"single",compact:!0,label:"View"},children:[{$prototype:"Array",items:{$ref:"#/state/layouts"},key:{$ref:"$map/item/key"},map:{tagName:"jx-action-button",attributes:{part:"layout","data-layout":"${$map.item.key}"},$props:{size:"sm",hint:"${$map.item.label}",checked:{$ref:"$map/item/checked"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setLayout"},value:[{$ref:"$map/item/key"}]}]},children:[{tagName:"span",textContent:"${$map.item.label}"}]}}]},{tagName:"jx-textfield",attributes:{part:"search"},$props:{label:"${state.searchLabel}",placeholder:"${state.searchLabel}…",size:"sm",value:{$ref:"#/state/query"},type:"search"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/search"},value:[{$ref:"event#/target/value"}]}]}},{tagName:"div",attributes:{part:"locale-slot",role:"none"},$switch:{$ref:"#/state/localeState"},cases:{shown:{tagName:"jx-select",attributes:{part:"locale"},$props:{label:"Language",size:"sm",options:{$ref:"#/state/localeOptions"},value:{$ref:"#/state/localeValue"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setLocale"},value:[{$ref:"event#/target/value"}]}],description:"The facet's options come from ALL scanned files, never from the filtered ones: a picker whose choices collapse to the choice just made cannot be used to make another."}}}},{tagName:"div",attributes:{part:"filter-slot",role:"none"},$switch:{$ref:"#/state/filterState"},cases:{shown:{$description:"The Filter: one value of what groups the entries, their status or the field the Board groups by, so it offers exactly the Board's columns.",tagName:"jx-select",attributes:{part:"filter"},$props:{label:"Filter",size:"sm",options:{$ref:"#/state/filterOptions"},value:{$ref:"#/state/filterValue"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setFilter"},value:[{$ref:"event#/target/value"}]}]}}}},{tagName:"span",attributes:{part:"spacer"}},{tagName:"div",attributes:{part:"grid-slot",role:"none"},$switch:{$ref:"#/state/fieldsState"},cases:{shown:{tagName:"jx-action-button",attributes:{part:"edit-grid"},$props:{size:"sm",icon:"rows",hint:"Edit every entry of this collection in a grid"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openGrid"},value:[]}],description:"The collection's grid (`collection.editInGrid { name }`): the one visible door to it, since the palette cannot prompt for a free-text name."},children:[{tagName:"span",textContent:"Edit in grid"}]}}},{tagName:"div",attributes:{part:"fields-slot",role:"none"},$switch:{$ref:"#/state/fieldsState"},cases:{shown:{tagName:"jx-action-button",attributes:{part:"fields"},$props:{size:"sm",icon:"sliders-horizontal",hint:"Edit this collection's fields in Project Settings",haspopup:"dialog"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openFields"},value:[]}],description:'Project Settings › Content types, on this collection (`settings.open { section: "content", entry }`).'},children:[{tagName:"span",textContent:"Fields"}]}}},{tagName:"div",attributes:{part:"new-slot",role:"none"},$switch:{$ref:"#/state/newState"},cases:{shown:{tagName:"jx-button",attributes:{part:"new"},$props:{size:"sm",variant:"accent"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openNew"},value:[]}],description:"Creation is somebody else's flow: `file.new` opens Add new on this collection's kind, a page for Pages and an entry for a collection."},children:[{tagName:"span",textContent:"${state.newLabel}"}]}}}]}]},{$description:"The header line: where this collection's entries are published, derived from the page whose `$paths.contentType` names it. Pages draw nothing here.",tagName:"div",attributes:{part:"page-slot",role:"none"},$switch:{$ref:"#/state/page/state"},cases:{loading:{tagName:"div",attributes:{part:"page-line"},children:[{tagName:"span",attributes:{part:"page-text"},textContent:"${state.page.text}"}]},page:{tagName:"div",attributes:{part:"page-line","data-state":"page"},children:[{tagName:"span",attributes:{part:"page-text"},textContent:"${state.page.text}"},{tagName:"code",attributes:{part:"page-pattern"},textContent:"${state.page.pattern}"},{tagName:"span",attributes:{part:"page-template"},textContent:"${state.page.template}"},{tagName:"jx-action-button",attributes:{part:"design-page"},$props:{size:"sm",quiet:!0},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/designPage"},value:[]}],description:"Opening the page is activating it, which enters Design (studio.md §22.1)."},children:[{tagName:"span",textContent:"${state.page.designLabel}"}]}]},none:{tagName:"div",attributes:{part:"page-line","data-state":"none"},children:[{tagName:"span",attributes:{part:"page-text"},textContent:"${state.page.text}"},{tagName:"jx-action-button",attributes:{part:"add-page"},$props:{size:"sm",quiet:!0},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/addPage"},value:[]}],description:"Writes the collection's page exactly as Add new's own-page option does."},children:[{tagName:"span",textContent:"Add one"}]}]}}},{tagName:"div",attributes:{part:"banner-slot",role:"none"},$switch:{$ref:"#/state/bannerState"},cases:{shown:{tagName:"div",attributes:{part:"banner",role:"status"},children:[{tagName:"span",textContent:"${state.bannerText}"},{tagName:"jx-button",attributes:{part:"retry"},$props:{size:"sm",variant:"secondary"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/retry"}}]},children:[{tagName:"span",textContent:"Retry"}]}]}}},{tagName:"div",attributes:{part:"body"},onscroll:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/scrolled"}}],description:"The rendered item count is proportional to the VIEWPORT, not to the project: a scroll recomputes the window from the box the adapter measures here, and never re-reads the scan."},children:[{tagName:"div",attributes:{part:"view-slot",role:"none"},$switch:{$ref:"#/state/view"},cases:{loading:{tagName:"div",attributes:{part:"empty"},children:[{tagName:"p",textContent:"Scanning the project…"}]},incomplete:{tagName:"div",attributes:{part:"empty"},children:[{tagName:"p",textContent:"Nothing to show, and the scan did not finish."},{tagName:"p",attributes:{part:"empty-detail"},textContent:"${state.emptyDetail}"},{tagName:"jx-button",attributes:{part:"retry"},$props:{size:"sm",variant:"primary"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/retry"}}]},children:[{tagName:"span",textContent:"Retry"}]}]},empty:{tagName:"div",attributes:{part:"empty"},children:[{tagName:"p",textContent:"${state.emptyMessage}"},{tagName:"p",attributes:{part:"empty-detail"},textContent:"${state.emptyDetail}"}]},nomatch:{tagName:"div",attributes:{part:"empty"},children:[{tagName:"p",children:[{tagName:"span",textContent:"${state.emptyMessage}"},{tagName:"span",attributes:{part:"empty-detail"},textContent:" ${state.emptyDetail}"}]},{tagName:"jx-button",attributes:{part:"reset"},$props:{size:"sm",variant:"secondary"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/reset"}}],description:"Both facets in one clause and one button, so a reader who filtered twice is told about both rather than sent to clear one and find the list still empty."},children:[{tagName:"span",textContent:"Clear filters"}]}]},cards:{tagName:"div",attributes:{part:"grid","data-layout":"cards",style:"${state.pad}"},children:[{$prototype:"Array",items:{$ref:"#/state/rows"},key:{$ref:"$map/item/path"},map:{tagName:"div",attributes:{part:"card","data-path":"${$map.item.path}",tabindex:"0",role:"button"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openFile"},value:[{$ref:"$map/item/path"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/openFile"},value:[{$ref:"$map/item/path"}]}]," ":[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/openFile"},value:[{$ref:"$map/item/path"}]}]}}]},oncontextmenu:{$prototype:"Function",body:[{preventDefault:!0},{stopPropagation:!0},{operator:"call",target:{$ref:"#/state/contextMenu"},value:[{$ref:"$map/item/path"},{$ref:"event#/clientX"},{$ref:"event#/clientY"}]}]},children:[{tagName:"div",attributes:{part:"card-art"},children:[{tagName:"div",attributes:{part:"art-slot",role:"none"},$switch:{$ref:"$map/item/art"},cases:{image:{tagName:"img",attributes:{part:"thumb",loading:"lazy",src:"${$map.item.src}",alt:""}},doc:{tagName:"div",attributes:{part:"doc-preview","data-path":"${$map.item.path}",inert:""}},glyph:{tagName:"jx-icon",attributes:{part:"file-glyph"},$props:{name:"file-text"}}}}]},{tagName:"div",attributes:{part:"card-label",title:"${$map.item.path}"},textContent:"${$map.item.name}"},{tagName:"div",attributes:{part:"card-meta"},textContent:"${$map.item.meta}"}]}}]},table:{tagName:"div",attributes:{part:"table",role:"table","aria-label":"${state.title}"},children:[{tagName:"div",attributes:{part:"table-head",role:"row"},children:[{$prototype:"Array",items:{$ref:"#/state/columns"},key:{$ref:"$map/item/field"},map:{tagName:"div",attributes:{part:"cell",role:"columnheader","data-field":"${$map.item.field}"},textContent:"${$map.item.title}"}}]},{tagName:"div",attributes:{part:"pad",style:"${state.padTop}"}},{$prototype:"Array",items:{$ref:"#/state/rows"},key:{$ref:"$map/item/path"},map:{tagName:"div",attributes:{part:"table-row",role:"row","data-path":"${$map.item.path}",tabindex:"0"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openFile"},value:[{$ref:"$map/item/path"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/openFile"},value:[{$ref:"$map/item/path"}]}]," ":[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/openFile"},value:[{$ref:"$map/item/path"}]}]}}]},oncontextmenu:{$prototype:"Function",body:[{preventDefault:!0},{stopPropagation:!0},{operator:"call",target:{$ref:"#/state/contextMenu"},value:[{$ref:"$map/item/path"},{$ref:"event#/clientX"},{$ref:"event#/clientY"}]}]},children:[{$prototype:"Array",items:{$ref:"$map/item/cells"},key:{$ref:"$map/item/field"},map:{tagName:"div",attributes:{part:"cell",role:"cell","data-field":"${$map.item.field}"},textContent:"${$map.item.text}"}}]}},{tagName:"div",attributes:{part:"pad",style:"${state.padBottom}"}}]},calendar:{tagName:"div",attributes:{part:"calendar"},children:[{$prototype:"Array",items:{$ref:"#/state/groups"},key:{$ref:"$map/item/id"},map:{tagName:"section",attributes:{part:"day","data-undated":"${$map.item.undated}"},children:[{tagName:"h3",attributes:{part:"day-date"},textContent:"${$map.item.title}"},{tagName:"div",attributes:{part:"note-slot",role:"none"},$switch:{$ref:"$map/item/noteState"},cases:{shown:{tagName:"p",attributes:{part:"note"},textContent:"${$map.item.note}"}}},{tagName:"ul",attributes:{part:"list"},children:[{$prototype:"Array",items:{$ref:"$map/item/files"},key:{$ref:"$map/item/path"},map:{tagName:"li",attributes:{part:"list-item","data-path":"${$map.item.path}",title:"${$map.item.path}",tabindex:"0"},textContent:"${$map.item.name}",onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openFile"},value:[{$ref:"$map/item/path"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/openFile"},value:[{$ref:"$map/item/path"}]}]," ":[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/openFile"},value:[{$ref:"$map/item/path"}]}]}}]},oncontextmenu:{$prototype:"Function",body:[{preventDefault:!0},{stopPropagation:!0},{operator:"call",target:{$ref:"#/state/contextMenu"},value:[{$ref:"$map/item/path"},{$ref:"event#/clientX"},{$ref:"event#/clientY"}]}]}}}]}]}},{tagName:"div",attributes:{part:"truncated-slot",role:"none"},$switch:{$ref:"#/state/truncatedState"},cases:{shown:{tagName:"p",attributes:{part:"truncated"},textContent:"${state.truncated}"}}}]},board:{tagName:"div",attributes:{part:"board"},children:[{$prototype:"Array",items:{$ref:"#/state/groups"},key:{$ref:"$map/item/id"},map:{tagName:"section",attributes:{part:"column"},children:[{tagName:"h3",attributes:{part:"column-title"},children:[{tagName:"span",textContent:"${$map.item.title}"},{tagName:"span",attributes:{part:"count"},textContent:"${$map.item.count}"}]},{tagName:"ul",attributes:{part:"list"},children:[{$prototype:"Array",items:{$ref:"$map/item/files"},key:{$ref:"$map/item/path"},map:{tagName:"li",attributes:{part:"list-item","data-path":"${$map.item.path}",title:"${$map.item.path}",tabindex:"0"},textContent:"${$map.item.name}",onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openFile"},value:[{$ref:"$map/item/path"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/openFile"},value:[{$ref:"$map/item/path"}]}]," ":[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/openFile"},value:[{$ref:"$map/item/path"}]}]}}]},oncontextmenu:{$prototype:"Function",body:[{preventDefault:!0},{stopPropagation:!0},{operator:"call",target:{$ref:"#/state/contextMenu"},value:[{$ref:"$map/item/path"},{$ref:"event#/clientX"},{$ref:"event#/clientY"}]}]}}}]},{tagName:"div",attributes:{part:"note-slot",role:"none"},$switch:{$ref:"$map/item/noteState"},cases:{shown:{tagName:"p",attributes:{part:"truncated"},textContent:"${$map.item.note}"}}}]}}]}}}]}]};T("library-pane",Le);function Fe(e,t){e.region=t.region,e.view=t.view,e.title=t.title,e.subtitle=t.subtitle,e.searchLabel=t.searchLabel,e.newLabel=t.newLabel,e.newState=t.newState,e.fieldsState=t.fieldsState,e.page=t.page,e.layouts=t.layouts,e.filterState=t.filterState,e.filterOptions=t.filterOptions,e.filterValue=t.filterValue,e.localeState=t.localeState,e.localeOptions=t.localeOptions,e.localeValue=t.localeValue,e.query=t.query,e.bannerState=t.bannerState,e.bannerText=t.bannerText,e.emptyMessage=t.emptyMessage,e.emptyDetail=t.emptyDetail,e.pad=t.pad,e.padTop=t.padTop,e.padBottom=t.padBottom,e.rows=t.rows,e.columns=t.columns,e.groups=t.groups,e.truncated=t.truncated,e.truncatedState=t.truncatedState}function Xe(e){let t=n(e)?void 0:e.attributes?.part;return n(t)?t:""}function Qe(e){let t=e?.$map,a=v(t)?t.item:void 0,r=v(a)?a.path:void 0;return n(r)?r:""}function Ce(e,t,a){e.replaceChildren();let r=new AbortController;mN(e,r.signal);let o=g({addPage:a.addPage,bannerState:"hidden",bannerText:"",columns:[],contextMenu:a.contextMenu,designPage:a.designPage,emptyDetail:"",emptyMessage:"",fieldsState:"hidden",groups:[],layouts:[],filterOptions:[],filterState:"hidden",filterValue:"",localeOptions:[],localeState:"hidden",localeValue:"",newLabel:"",newState:"hidden",openFields:a.openFields,openGrid:a.openGrid,openFile:a.openFile,openNew:a.openNew,pad:"",padBottom:"",padTop:"",previewSlot:a.previewSlot,query:"",region:"",reset:a.reset,retry:a.retry,page:{designLabel:"",pattern:"",state:"hidden",template:"",text:""},rows:[],scrolled:a.scrolled,scroller:a.scroller,search:a.search,searchLabel:"",setLayout:a.setLayout,setFilter:a.setFilter,setLocale:a.setLocale,subtitle:"",title:"",truncated:"",truncatedState:"hidden",view:"loading"});Fe(o,t);let i=null,l=!1,c=R("library-pane",o,e,{onNodeCreated:(d,s,u,m)=>{let f=Xe(u);if(f===""||!(d instanceof HTMLElement))return;if(f==="body"){a.scroller(d);return}if(f==="doc-preview"){let x=Qe(m);if(x)a.previewSlot(d,x)}}}).then((d)=>{let s=d.root;if(l)return d.dispose(),s;return i=d,s});return{attached:()=>{if(l)return!1;let d=i?.root;return d===void 0?!0:d instanceof HTMLElement&&e.contains(d)},dispose(){l=!0,r.abort(),i?.dispose(),i=null},ready:c,update:(d)=>Fe(o,d)}}var Ze="table",y=g({collection:ci,loading:!1,revision:0,views:{}});function Qa(e=Nu()){let t=y.views[e];if(t)return t;let a={filter:"",layout:Ze,locale:"",query:""};return y.views[e]=a,y.views[e]??a}function j(){return Wl(y.collection)??{fileBacked:!1,item:"page",key:ci,kind:"pages",title:"Pages"}}function Nu(){return j().key}var M=null,A=!1;function k(){if(M?.stale()===!0){M=null,A=!1;for(let e of E.values())e.cache.clear()}return M??=yD(),M}function w(){y.revision+=1}function GR(e){y.collection=e,Qa(e),w(),xn("leftPanel")}function Uk(e,t=Nu()){Qa(t).layout=e,w()}function T_(e,t=Nu()){Qa(t).query=e,w()}function et(e,t=Nu()){Qa(t).filter=e,w()}function L_(e,t=Nu()){Qa(t).locale=e,w()}function Ed(){M=null,A=!1;for(let e of E.values())e.cache.clear();w()}function qk(){let e=k();if(!A&&!y.loading)I();if(!e.scanned())return null;let t=new Map;for(let a of e.files())if(a.collection!==null)t.set(a.collection,(t.get(a.collection)??0)+1);return t}var tt=600,ke="content.scan",L="Content";async function I(){let e=k();A=!0,y.loading=!0,w();let t={handle:null},a=setTimeout(()=>{t.handle=Vs({source:L,status:"Reading the project's directories…",title:"Scan project files"})},tt);try{await e.rows();let r=e.failures();if(r.length>0){let o=r.map((l)=>`${l.dir} — ${l.error}`).join(`
|
|
3
|
+
`),i=`Could not read ${r.length} project ${r.length===1?"directory":"directories"} — this list is incomplete.`;C.error(i,{action:"content.refresh",detail:o,key:ke,path:r[0].dir,source:L,tier:"problem"}),t.handle?.setStatus(i)}t.handle?.done(`${e.files().length} file(s)`)}catch(r){if(t.handle)t.handle.fail("Could not scan the project's files.");else C.error("Could not scan the project's files.",{action:"content.refresh",detail:Q(r),key:ke,source:L,tier:"problem"})}finally{clearTimeout(a),y.loading=!1,w(),xn("leftPanel")}}async function Gk(){M=null,A=!1;for(let e of E.values())e.cache.clear();await I()}var E=new Map;function W(e){return E.get(e)??null}function Kk(e,t){let a=W(e);return a!==null&&a.tabId===t.id&&a.wrap.isConnected&&a.surface.attached()}function Jk(e){let t=E.get(e);if(!t)return;if(t.settleTimer!==null)clearTimeout(t.settleTimer),t.settleTimer=null;t.unlisten(),t.observer.destroy(),t.cache.clear(),t.slots.clear(),t.pendingPaths.clear(),t.scope.stop(),t.surface.dispose(),E.delete(e)}function at(e,t,a){let r=de[t],o=e?.scroller??null;if(!r.windowed||!o)return{end:a,padBottom:0,padTop:0,start:0,totalRows:a};return Z_({columns:ve(t,o.clientWidth),count:a,rowHeight:r.rowHeight,scrollTop:o.scrollTop,viewportHeight:o.clientHeight})}async function nt(e,t){e.pendingPaths.add(t);try{let a=await ww(t,e.cache);if(!a||W(e.paneId)!==e)return;let r=e.slots.get(t);if(r?.isConnected&&!By(r))Hy(r,a)}finally{e.pendingPaths.delete(t)}}function Te(e,t,a){let r=e.cache.get(a);if(By(t))return;if(r){Hy(t,r);return}if(e.pendingPaths.has(a))return;e.pending.set(t,a),e.observer.observe(t)}function ot(e,t,a){e.slots.set(a,t),Te(e,t,a)}function it(e){if(e.settleTimer!==null)return;e.settleTimer=setTimeout(()=>{if(e.settleTimer=null,W(e.paneId)!==e)return;e.observer.releaseDetached();let t=pD.has(Qa().layout);for(let[a,r]of e.slots){if(!r.isConnected){e.slots.delete(a);continue}if(t)Te(e,r,a)}},0)}function je(e){if(e.record)dD(e.record.source,e.record.row);else if(e.collection===null||e.collection===ci)yi(e.path);else Ml(e.path)}var B=null;function lt(){B?.close(),B=null}function Re(e){return k().files().find((t)=>t.path===e)??null}function st(e,t,a){let r=Re(e);if(!r||r.record)return;lt();let o=(i,l,c,d={})=>({destructive:!1,disabled:!1,dividerAbove:!1,id:i,run:c,title:l,...d});B=Xt({label:"File actions",onClosed:(i)=>{if(B===i)B=null},origin:{x:t,y:a},region:"content",rows:[o("open","Open",()=>{je(r)}),o("rename","Rename…",()=>{ct(r)},{dividerAbove:!0}),o("duplicate","Duplicate",()=>{dt(r)}),o("delete","Delete",()=>{pt(r)},{destructive:!0,dividerAbove:!0})]})}async function ct(e){let t=await vb(e.path),a={confirmLabel:"Rename",select:"stem",validate:(c)=>c.trim()?"":"Enter a file name.",value:e.name};if(t!==void 0)a.message=t;let r=await xi("Rename",a);if(!r||r===e.name)return;let o=e.path.replaceAll("\\","/"),i=o.includes("/")?o.slice(0,o.lastIndexOf("/")):".",l=i==="."?r:`${i}/${r}`;try{await p().renameFile(e.path,l),Cr(),Ed(),await I(),C.success(`Renamed to ${r}`)}catch(c){C.error(`Could not rename ${e.name}.`,{detail:Q(c),path:e.path,source:L})}}async function dt(e){let t=e.path.replaceAll("\\","/"),a=t.includes("/")?t.slice(0,t.lastIndexOf("/")):".",o=`${e.name.replace(/(\.[^.]+)$/,"")}-copy${e.ext||""}`,i=a==="."?o:`${a}/${o}`;try{let l=p(),c=await l.readFile(e.path);await l.writeFile(i,c),Ed(),await I(),C.success(`Duplicated as ${o}`)}catch(l){C.error(`Could not duplicate ${e.name}.`,{detail:Q(l),path:e.path,source:L})}}async function pt(e){if(!await bb(e))return;try{await p().deleteFile(e.path),Cr(),Ed(),await I(),C.success(`Deleted ${e.name}`)}catch(a){C.error(`Could not delete ${e.name}.`,{detail:Q(a),path:e.path,source:L})}}function Pe(e,t){if(e.layout===!1)return"with no template";let a=e.layout??t;return a?`using ${Sb(a)}`:"with no template"}function ut(e,t,a,r=[]){let o={designLabel:"",pattern:"",state:"hidden",template:"",text:""};if(e.kind==="pages")return o;if(t===void 0)return{...o,state:"loading",text:"Finding where these entries are published…"};if(t===null)return{...o,state:"none",text:"Entries have no page of their own"};let i=tb(),l=(d)=>{let s=d===null?-1:i.indexOf(d);return s===-1?i.length:s},c=r.filter((d)=>d.locale!==null).toSorted((d,s)=>l(d.locale)-l(s.locale));if(c.length>1){let d=new Set(c.map((s)=>Pe(s,a)));return{designLabel:`Design the ${e.item} page`,pattern:c.map((s)=>`${s.pattern} (${s.locale})`).join(", "),state:"page",template:d.size===1?[...d][0]:"using a template per language",text:`Each ${e.item} has a page in each language at`}}return{designLabel:`Design the ${e.item} page`,pattern:t.pattern,state:"page",template:Pe(t,a),text:`Each ${e.item} has a page at`}}function mt(e){let t=eh(e,Qa(e).locale);if(t)yi(t.path)}async function ft(e){let{addCollectionPage:t}=await (le("a1w0bnm6"),import("./add-new-flow-a1w0bnm6.js"));await t(e)}function gt(e,t,a){return{checked:a?"true":"false",key:e,label:t}}function ht(e,t){let a=`${t.locale===""?"":` in ${Vt(t.locale)}`}${t.filter===""?"":` filtered to ${t.filter}`}`,r=t.query.trim();return`No ${e.kind==="pages"?"pages":e.title.toLowerCase()} match${r?` “${r}”`:""}${a}.`}function yt(e,t,a,r){if(a>0)return t;if(y.loading||!e.scanned())return"loading";if(e.failures().length>0)return"incomplete";return r===0?"empty":"nomatch"}function $_(e){return k().files().filter((t)=>t.collection===e).map((t)=>t.path)}function bt(e,t){if(e.kind==="pages")return k().scanned()?wt(t==="table"):N(new Map);if(e.fileBacked){let o=Me(e.key),i=k().files().filter((l)=>l.collection===e.key&&l.record);return N(new Map(i.map((l)=>{let{fields:c}=l.record,d=z_(o,c),s=d===null?"":eb(c[d]??""),u=vE(l.record.source,c,o);return[l.path,{date:s,fields:c,status:"",thumb:u,title:l.name}]})))}if(!k().scanned())return N(new Map);let a=Qy(e.key,$_(e.key)),r=new Map((a??[]).map((o)=>[o.path,{date:o.date,fields:o.fields,status:o.status,thumb:o.thumb,title:o.title}]));return N(r)}function wt(e){let t=$_(ci),a=e?me(t):null,r=new Set(Object.keys(S?.projectConfig?.content??{})),o=Ee(),{i18n:i}=ln(S?.projectConfig??{}),l=[...a?.values()??[]].some((d)=>d.draft),c=new Map(t.map((d)=>{let s=a?.get(d),u=s?.contentType??null,m=s===void 0?void 0:s.layout??o??!1;return[d,{date:"",status:s===void 0||!l?"":s.draft?"Draft":"Published",template:m===void 0?"":m===!1?"None":Sb(m),title:u!==null&&r.has(u)?Y(`${ie(u)} page`,d,i):U(wr(d),d,i)}]}));return N(c)}function vt(e){return e.map((t)=>({file:t,route:wr(t.path)})).toSorted((t,a)=>SS(t.route,a.route)||t.file.path.localeCompare(a.file.path)).map(({file:t})=>t)}function Me(e){return ya(e)?.schema??yN(e)}function xt(e){let t=new Set,a=pp(e),r=bE(e);for(let o of[a,r])if(o!==null)t.add(o);return t}function $t(e){let t=new Map;for(let[a,r]of Object.entries(e?.properties??{}))if(Array.isArray(r.enum))t.set(a,r.enum.filter((o)=>n(o)));return t}function St(e,t){let a=[...new Set(e.flatMap((i)=>i?.status?[i.status]:[]))];if(a.length>0)return{matches:(i,l)=>(i?.status??"")===l,title:"Status",values:a.toSorted((i,l)=>i==="Draft"?-1:l==="Draft"?1:i.localeCompare(l))};if(!t)return null;let r=new Set(e.flatMap((i)=>z(i?.fields?.[t.name],t.list))),o=t.order.length>0?[...t.order,...[...r].filter((i)=>!t.order.includes(i)).toSorted()]:[...r].toSorted((i,l)=>i.localeCompare(l));return{matches:(i,l)=>z(i?.fields?.[t.name],t.list).includes(l),title:t.title,values:o}}function Ne(e,t){let a=k(),r=j(),o=Qa(r.key),{layout:i}=o,l=wE(a.files(),{collection:r.key,query:""}),c=bt(r,i),d=l.map((h)=>c(h)),s=r.kind==="collection"?Me(r.key):null,u=vD(s,xt(s)),m=be(u,$t(s),d),f=r.kind==="collection"?St(d,m):null,x=f!==null&&f.values.includes(o.filter)?o.filter:"",H=wE(a.files(),{collection:r.key,locale:o.locale,query:o.query}),O=f===null||x===""?H:H.filter((h)=>f.matches(c(h),x)),P=r.kind==="pages"?vt(O):O,J=l.length,b=yt(a,i,P.length,J),D=at(e,i,P.length),Ae=P.slice(D.start,D.end),F=a.failures(),K=fD(l),pe=_E(r.key,{date:bE(s)!==null||d.some((h)=>(h?.date??"")!==""),fields:u,locale:K.length>1,status:d.some((h)=>(h?.status??"")!=="")}),Oe=b==="cards",X=b==="calendar"?$e(P,c):{groups:[],truncated:""},G=r.kind==="pages",Z=G?"pages":r.title.toLowerCase();return{bannerState:F.length>0?"shown":"hidden",bannerText:F.length===0?"":`This list is incomplete — ${F.length} ${F.length===1?"directory":"directories"} could not be read (${F[0].dir}${F.length>1?", …":""}).`,columns:b==="table"?pe.map((h)=>({field:h.field,title:h.title})):[],emptyDetail:b==="incomplete"?`${F.length} ${F.length===1?"directory":"directories"} could not be read, so this is not the same as an empty collection.`:b==="nomatch"?`${J} ${J===1?r.item:Z} in all.`:b==="empty"?`New ${r.item} adds the first one.`:"",emptyMessage:b==="nomatch"?ht(r,o):b==="empty"?`No ${Z} yet.`:"",fieldsState:r.kind==="collection"?"shown":"hidden",groups:b==="board"?Se(P,c,m):X.groups,layouts:am.map((h)=>gt(h,tw[h],i===h)),localeOptions:[{label:"All languages",value:"all"},...K.map((h)=>({label:Vt(h),value:h}))],filterOptions:f===null?[]:[{label:`Any ${f.title.toLowerCase()}`,value:"all"},...f.values.map((h)=>({label:h,value:h}))],filterState:f!==null&&f.values.length>1?"shown":"hidden",filterValue:x===""?"all":x,localeState:K.length<2?"hidden":"shown",localeValue:o.locale===""?"all":o.locale,newLabel:`New ${r.item}`,newState:r.fileBacked?"hidden":"shown",pad:`padding-top:calc(var(--jx-space-4) + ${D.padTop}px);padding-bottom:calc(var(--jx-space-4) + ${D.padBottom}px)`,padBottom:`height:${D.padBottom}px`,padTop:`height:${D.padTop}px`,page:ut(r,G?null:eh(r.key,o.locale),Ee(),G||o.locale!==""?[]:xN(r.key)??[]),query:o.query,region:wi(t,"content"),rows:b==="cards"||b==="table"?Ae.map((h)=>xe(h,b==="table"?pe:[],Oe,c(h))):[],searchLabel:`Search ${Z}`,subtitle:G?"Every URL on your site.":"",title:r.title,truncated:X.truncated,truncatedState:X.truncated===""?"hidden":"shown",view:b}}function Ee(){return S?.projectConfig?.defaults?.layout??null}function KR(e,t){let{paneId:a,wrap:r}=e;if(Kk(a,t))return;Jk(a);let o=null,i=bp((s)=>{let u=o;if(!u)return;let m=u.pending.get(s);if(m!==void 0)u.pending.delete(s),nt(u,m)}),l=()=>{if(o!==null&&W(a)===o)o.surface.update(Ne(o,a)),it(o)},c=Ce(r,Ne(null,a),{addPage:()=>{ft(j().key)},contextMenu:(s,u,m)=>st(s,u,m),designPage:()=>{mt(j().key)},openFields:()=>{rt("settings.open",{entry:j().key,section:"content"},L)},openGrid:()=>{let s=j(),u=s.fileBacked?Aw(s.key):null;if(u){yi(u);return}rt("collection.editInGrid",{name:s.key},L)},openFile:(s)=>{je(Re(s)??{collection:Nu(),path:s})},openNew:()=>{let s=j(),{locale:u}=Qa(s.key),m=s.kind==="pages"?{kind:"page"}:{collection:s.key,kind:"entry"};if(u!=="")m.locale=u;rt("file.new",m,L)},previewSlot:(s,u)=>{if(o)ot(o,s,u)},reset:()=>{T_(""),L_("")},retry:()=>{Gk()},scrolled:()=>w(),scroller:(s)=>{if(o)o.scroller=s},search:(s)=>T_(s),setLayout:(s)=>Uk(s),setFilter:(s)=>et(s==="all"?"":s),setLocale:(s)=>L_(s==="all"?"":s)}),d=ge();o={cache:yw(),observer:i,paneId:a,pending:new WeakMap,pendingPaths:new Set,scope:d,scroller:null,settleTimer:null,slots:new Map,surface:c,tabId:t.id,unlisten:(()=>{let s=kp(()=>w()),u=ew(()=>w()),m=fe(()=>w());return()=>{s(),u(),m()}})(),wrap:r},E.set(a,o),d.run(()=>{ne(()=>{if(W(a)!==o)return;y.revision,y.collection,y.loading;let s=Qa(Nu());if(s.layout,s.query,s.locale,l(),!A&&!y.loading)I()})})}function JR(){y.collection=ci,y.views={},y.loading=!1,M=null,A=!1,w()}
|
|
4
|
+
export{Ug,jy,VR,qg,kd,UR,qR,Vk,Hy,By,Qa,Nu,GR,Uk,T_,L_,Ed,qk,Gk,Kk,Jk,$_,KR,JR};
|
|
5
|
+
|
|
6
|
+
//# debugId=7EF028EF113B9D5D64756E2164756E21
|
|
7
|
+
//# sourceMappingURL=studio-8m1t83kn.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
function m(s,n={}){let t=n.baseMs??1000,o=n.maxMs??30000,i=n.random??Math.random,e=Math.min(o,t*2**Math.max(0,s));return e/2+i()*e/2}function
|
|
2
|
-
export{
|
|
1
|
+
function m(s,n={}){let t=n.baseMs??1000,o=n.maxMs??30000,i=n.random??Math.random,e=Math.min(o,t*2**Math.max(0,s));return e/2+i()*e/2}function xy(s,n={}){let t=n.win??(typeof window>"u"?void 0:window),o=n.doc??(typeof document>"u"?void 0:document),i=0,e=null,r=!1,a=()=>{if(e=null,!r)s()},c=()=>{if(r||e===null)return;clearTimeout(e),i=0,a()},u=(d)=>{if(d.persisted)c()},l=()=>{if(o?.visibilityState==="visible")c()};return t?.addEventListener("online",c),t?.addEventListener("pageshow",u),o?.addEventListener("visibilitychange",l),{dispose(){if(r)return;if(r=!0,e!==null)clearTimeout(e),e=null;t?.removeEventListener("online",c),t?.removeEventListener("pageshow",u),o?.removeEventListener("visibilitychange",l)},opened(){i=0},scheduleRetry(){if(r||e!==null)return;let d=m(i,n);i+=1,e=setTimeout(a,d)},wake:c}}
|
|
2
|
+
export{xy};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
5
|
-
//# sourceMappingURL=studio-
|
|
4
|
+
//# debugId=EB760674662B804464756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-8nyw10dp.js.map
|