@jxsuite/studio 8.0.1 → 9.0.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-89fz3pfy.js} +3 -3
- package/dist/chunks/adapter-ay13gema.js +4 -0
- package/dist/chunks/add-new-flow-nmkqpjym.js +4 -0
- package/dist/chunks/cf-account-picker-2e06qxey.js +4 -0
- package/dist/chunks/cf-settings-5y04810c.js +4 -0
- package/dist/chunks/color-04361ttk.js +4 -0
- package/dist/chunks/{color-area-6rbra5dy.js → color-area-h8dbasp1.js} +2 -2
- package/dist/chunks/{color-field-gy56c94g.js → color-field-qv5r2b16.js} +3 -3
- package/dist/chunks/{color-slider-sqqdyf6c.js → color-slider-nz2mrzky.js} +2 -2
- package/dist/chunks/{combobox-72h32ejk.js → combobox-6hs00996.js} +2 -2
- package/dist/chunks/components-3vf75n83.js +4 -0
- package/dist/chunks/content-source-4f2raf4a.js +4 -0
- package/dist/chunks/{convert-to-repeater-he70fc2b.js → convert-to-repeater-j9hfcj4f.js} +3 -3
- package/dist/chunks/editor-645krvtz.js +4 -0
- package/dist/chunks/entry-commands-3qmv8wkr.js +4 -0
- package/dist/chunks/{extension-sections-0egb88dm.js → extension-sections-thfke054.js} +3 -3
- package/dist/chunks/file-ops-kkhp9ma7.js +4 -0
- package/dist/chunks/files-yswdhxrf.js +4 -0
- package/dist/chunks/format-host-4g8ex6bz.js +4 -0
- package/dist/chunks/fs-events-z9gpvc6t.js +4 -0
- package/dist/chunks/grid-open-fm4j183c.js +4 -0
- package/dist/chunks/{grid-view-qg1b5eqx.js → grid-view-7d2nx83y.js} +16 -15
- package/dist/chunks/{icons-63bjtbs7.js → icons-853n6qt3.js} +2 -2
- package/dist/chunks/{iframe-entry-pkgmcgp0.js → iframe-entry-2x9bn5ng.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-entry-2zggzajv.js → iframe-entry-btck0e9s.js} +4 -4
- package/dist/chunks/iframe-host-q7fedsmr.js +4 -0
- package/dist/chunks/{index-32eqzv1k.js → index-jxmt7vh8.js} +3 -3
- package/dist/chunks/index-pt4wh98x.js +4 -0
- package/dist/chunks/{javascript-pjp734q4.js → javascript-vmqp56ke.js} +2 -2
- package/dist/chunks/{jsonMode-njkvsa02.js → jsonMode-n3wmpant.js} +5 -5
- package/dist/chunks/jx-validate-19y62knt.js +4 -0
- package/dist/chunks/layers-panel-1qvc83y9.js +4 -0
- package/dist/chunks/layers-qf0bc7ze.js +4 -0
- package/dist/chunks/{listbox-c421cf8c.js → listbox-7gka1h86.js} +2 -2
- package/dist/chunks/lit-html-wyqw04y2.js +4 -0
- package/dist/chunks/media-library-f9d5qcjb.js +4 -0
- package/dist/chunks/media-picker-rsb1fmk2.js +4 -0
- package/dist/chunks/{menu-bdpzbfvs.js → menu-d2jxpgma.js} +2 -2
- package/dist/chunks/{monaco-binding-vq1hgnn0.js → monaco-binding-wfhmz89d.js} +3 -3
- package/dist/chunks/monaco-buffer-ak0raadw.js +4 -0
- package/dist/chunks/{monaco-setup-xrd2cbkp.js → monaco-setup-fty7a8vg.js} +3 -3
- package/dist/chunks/notify-4qj70q0x.js +4 -0
- package/dist/chunks/parse-n8dfxnqf.js +4 -0
- package/dist/chunks/platform-ehg6t9vd.js +4 -0
- package/dist/chunks/{popover-b89sfej7.js → popover-9tf4cjrk.js} +2 -2
- package/dist/chunks/publish-panel-yhmda3cd.js +4 -0
- package/dist/chunks/{publish-quick-qx2455cj.js → publish-quick-12hh8926.js} +3 -3
- package/dist/chunks/publish-workspace-hx8qdv9p.js +4 -0
- package/dist/chunks/quick-search-r955m3q1.js +4 -0
- package/dist/chunks/references-8gxv0x7t.js +4 -0
- package/dist/chunks/right-panel-jarwqjpy.js +4 -0
- package/dist/chunks/source-control-84qt25m9.js +4 -0
- package/dist/chunks/{split-c9zfdgxf.js → split-m5rwn31z.js} +2 -2
- package/dist/chunks/studio-0nefxhar.js +7 -0
- package/dist/chunks/studio-0rg30pvs.js +5 -0
- package/dist/chunks/{studio-s32578pn.js → studio-14hh60j8.js} +4 -4
- package/dist/chunks/studio-1cfyd1ys.js +5 -0
- package/dist/chunks/studio-2bq7hheq.js +5 -0
- package/dist/chunks/{studio-zz9qe3rw.js → studio-32d8wyxq.js} +37 -37
- package/dist/chunks/studio-3hpcawh8.js +4 -0
- package/dist/chunks/{studio-svb7yyve.js → studio-4j35hgsw.js} +4 -4
- package/dist/chunks/{studio-x1x167jh.js → studio-4qg61g9j.js} +4 -4
- package/dist/chunks/studio-4rgem12q.js +5 -0
- package/dist/chunks/studio-6k9djnxw.js +5 -0
- package/dist/chunks/studio-6rbaedw2.js +9 -0
- package/dist/chunks/studio-732mw0g8.js +5 -0
- package/dist/chunks/studio-79r8msnr.js +7 -0
- package/dist/chunks/studio-7q6jdd4h.js +5 -0
- package/dist/chunks/{studio-r5qy30vx.js → studio-8hf8qcm1.js} +4 -4
- package/dist/chunks/{studio-8tr6cfrc.js → studio-8pne0rx4.js} +4 -4
- package/dist/chunks/{studio-y0n7yxea.js → studio-9179bsm7.js} +7 -7
- package/dist/chunks/{studio-pbxa5fpc.js → studio-9ff0vqff.js} +3 -3
- package/dist/chunks/studio-9gzvypw4.js +5 -0
- package/dist/chunks/studio-9ndgd55w.js +5 -0
- package/dist/chunks/studio-9ra9e7m4.js +5 -0
- package/dist/chunks/studio-a6e5fzve.js +5 -0
- package/dist/chunks/studio-a9k86nq6.js +5 -0
- package/dist/chunks/studio-ae7a69jc.js +6 -0
- package/dist/chunks/studio-aghsg0ds.js +7 -0
- package/dist/chunks/{studio-k3xxbagr.js → studio-ajw4k8hp.js} +3 -3
- package/dist/chunks/{studio-qmn1xc24.js → studio-apapy17g.js} +4 -4
- package/dist/chunks/{studio-8m0y2qe7.js → studio-by8x0jvc.js} +4 -4
- package/dist/chunks/{studio-wbcjbhy1.js → studio-c88gq88j.js} +5 -5
- package/dist/chunks/{studio-n0c5h6mf.js → studio-cg54vtet.js} +4 -4
- package/dist/chunks/studio-dvhxxxbd.js +5 -0
- package/dist/chunks/{studio-3q40e3rj.js → studio-e4rq6x0q.js} +4 -4
- package/dist/chunks/{studio-fbhxxc5f.js → studio-ekzbgnjp.js} +4 -4
- package/dist/chunks/studio-fg4fj9ec.js +10 -0
- package/dist/chunks/studio-fj6jzgxw.js +5 -0
- package/dist/chunks/{studio-nh6d342n.js → studio-g45r5vm8.js} +7 -7
- package/dist/chunks/{studio-a2bvaptz.js → studio-gczve8zf.js} +4 -4
- package/dist/chunks/studio-ge08zwpv.js +5 -0
- package/dist/chunks/studio-gk9yk8dj.js +12 -0
- package/dist/chunks/{studio-bbe4c90a.js → studio-gskkgfe3.js} +4 -4
- package/dist/chunks/{studio-83mk4bgg.js → studio-h4jbgne2.js} +8 -8
- package/dist/chunks/{studio-b7y5mr30.js → studio-hcy9zeac.js} +4 -4
- package/dist/chunks/studio-ht81xjkr.js +5 -0
- package/dist/chunks/{studio-jaaz8ce9.js → studio-jr30g4ae.js} +4 -4
- package/dist/chunks/{studio-qgh13jtz.js → studio-k5n4es74.js} +4 -4
- package/dist/chunks/{studio-ccv2svc6.js → studio-k6hbx2fc.js} +4 -4
- package/dist/chunks/{studio-9tmebf0s.js → studio-kqh7fxn6.js} +4 -4
- package/dist/chunks/{studio-q0mvbaq6.js → studio-kyw47pet.js} +4 -4
- package/dist/chunks/studio-mkw17ngg.js +5 -0
- package/dist/chunks/{studio-x9hsze61.js → studio-myb4mf0h.js} +4 -4
- package/dist/chunks/studio-n4qq1n57.js +5 -0
- package/dist/chunks/studio-nfmpmkqb.js +5 -0
- package/dist/chunks/studio-nfwacw31.js +5 -0
- package/dist/chunks/{studio-rthyg42z.js → studio-nm86874b.js} +172 -172
- package/dist/chunks/studio-nqexty8x.js +16 -0
- package/dist/chunks/studio-nr0kcqc6.js +5 -0
- package/dist/chunks/{studio-jsgf2q5k.js → studio-nvfa137z.js} +5 -5
- package/dist/chunks/studio-psh8mwnw.js +4 -0
- package/dist/chunks/studio-qd0cycm4.js +9 -0
- package/dist/chunks/{studio-tfkznv39.js → studio-qevf5z9d.js} +4 -4
- package/dist/chunks/studio-qs5fmhtj.js +14 -0
- package/dist/chunks/studio-ry4789ng.js +7 -0
- package/dist/chunks/studio-s4fq9jht.js +5 -0
- package/dist/chunks/studio-sc35ttdk.js +5 -0
- package/dist/chunks/studio-sm2f0sc6.js +6 -0
- package/dist/chunks/{studio-3qeh9t0h.js → studio-spza69tb.js} +5 -5
- package/dist/chunks/studio-t6dqnnft.js +5 -0
- package/dist/chunks/{studio-43sd2mam.js → studio-tfmhnwyr.js} +3 -3
- package/dist/chunks/studio-tn7v8gey.js +6 -0
- package/dist/chunks/{studio-tft6r105.js → studio-trcfer2b.js} +4 -4
- package/dist/chunks/studio-tyw7tk0x.js +5 -0
- package/dist/chunks/{studio-jcnsdaep.js → studio-tyzgte21.js} +4 -4
- package/dist/chunks/studio-vtey9w98.js +5 -0
- package/dist/chunks/studio-ws2r1d7e.js +5 -0
- package/dist/chunks/studio-x2trkhk5.js +5 -0
- package/dist/chunks/{studio-mn0476ag.js → studio-xzgp0cp7.js} +4 -4
- package/dist/chunks/studio-y47090vq.js +5 -0
- package/dist/chunks/{studio-5g0rprdt.js → studio-yjh9gddd.js} +5 -5
- package/dist/chunks/studio-ywf9y1e2.js +5 -0
- package/dist/chunks/{studio-k7evxqh4.js → studio-z1p91z5a.js} +4 -4
- package/dist/chunks/studio-ztppbam0.js +5 -0
- package/dist/chunks/{toast-host-1yg5ar8d.js → toast-host-g3r2s0kn.js} +2 -2
- package/dist/chunks/toast-w11qpkyz.js +4 -0
- 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-byje4a01.js} +5 -5
- package/dist/chunks/workspace-7q4arnt3.js +4 -0
- package/dist/chunks/workspace-home-ge027kr6.js +4 -0
- package/dist/chunks/{ws-client-bv552sfx.js → ws-client-h09h6sqg.js} +3 -3
- package/dist/iframe-entry.js +14 -14
- package/dist/manifest.json +76 -76
- package/dist/studio.js +88 -88
- package/package.json +15 -16
- 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/collab/collab-session.ts +6 -2
- package/src/commands/context.ts +4 -0
- package/src/commands/defaults.ts +2 -0
- package/src/commands/live-context.ts +2 -0
- package/src/editor/shortcuts.ts +3 -0
- package/src/files/files.ts +6 -3
- package/src/new-project/new-project-modal.ts +1 -4
- package/src/panels/ai-panel.ts +27 -34
- 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/platform.ts +20 -0
- package/src/platforms/devserver.ts +2 -120
- package/src/services/ai-ask.ts +29 -171
- package/src/services/ai-command-tools.ts +40 -50
- package/src/services/ai-import-tools.ts +4 -5
- package/src/services/ai-project-tools.ts +13 -3
- package/src/services/ai-tools.ts +26 -564
- package/src/services/ai-writes.ts +84 -2
- package/src/services/document-assistant.ts +29 -58
- package/src/services/harness/assistant-tools.ts +68 -0
- package/src/services/harness/interaction-store.ts +118 -0
- package/src/services/harness/studio-documents.ts +105 -0
- package/src/services/harness/turn-hooks.ts +1 -6
- package/src/services/project-adoption.ts +8 -16
- package/src/services/references.ts +0 -0
- package/src/services/tool-executor.ts +25 -22
- package/src/state.ts +3 -13
- package/src/style/stylebook-specimens.ts +11 -15
- package/src/surfaces/files-panel.json +12 -0
- package/src/surfaces/files-panel.ts +5 -2
- package/src/surfaces/pane-context.json +286 -265
- package/src/surfaces/pane-context.ts +17 -8
- package/src/surfaces/welcome.ts +4 -1
- package/src/tabs/selection.ts +14 -109
- package/src/tabs/tab.ts +15 -7
- package/src/tabs/transact.ts +316 -124
- package/src/types.ts +13 -8
- package/src/utils/geometry.ts +49 -2
- package/dist/chunks/adapter-5tphg7xe.js +0 -4
- package/dist/chunks/add-new-flow-psym14sn.js +0 -4
- package/dist/chunks/cf-account-picker-haqazq5r.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/parse-v77xtwv7.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-03ct6yfv.js +0 -9
- package/dist/chunks/studio-07rcfje3.js +0 -5
- package/dist/chunks/studio-3e54qh39.js +0 -7
- package/dist/chunks/studio-3exxhz5g.js +0 -5
- package/dist/chunks/studio-3qqjeep5.js +0 -6
- package/dist/chunks/studio-4hp8pkyt.js +0 -5
- package/dist/chunks/studio-58xg6j2q.js +0 -9
- package/dist/chunks/studio-6m380wp7.js +0 -5
- package/dist/chunks/studio-80jyh1xh.js +0 -4
- package/dist/chunks/studio-8vcvfs7r.js +0 -6
- package/dist/chunks/studio-bavb31r0.js +0 -5
- package/dist/chunks/studio-c05wdnt3.js +0 -5
- package/dist/chunks/studio-d5grtb9e.js +0 -16
- package/dist/chunks/studio-df0baea9.js +0 -5
- package/dist/chunks/studio-dgk4dqtx.js +0 -7
- package/dist/chunks/studio-e1g64q43.js +0 -5
- package/dist/chunks/studio-ed1hp6zf.js +0 -6
- package/dist/chunks/studio-ed3xx40h.js +0 -7
- package/dist/chunks/studio-f14e1zdj.js +0 -5
- package/dist/chunks/studio-fyh0jc96.js +0 -5
- package/dist/chunks/studio-gcxk20n7.js +0 -5
- package/dist/chunks/studio-kt3pjkwd.js +0 -5
- package/dist/chunks/studio-m8g16bgz.js +0 -5
- package/dist/chunks/studio-mx1smyq0.js +0 -5
- package/dist/chunks/studio-nqxqf8p2.js +0 -4
- package/dist/chunks/studio-p4nrkvqr.js +0 -5
- package/dist/chunks/studio-pgmvdv7z.js +0 -7
- package/dist/chunks/studio-ph84avkf.js +0 -5
- package/dist/chunks/studio-q0tccd43.js +0 -5
- package/dist/chunks/studio-q7rtx6zq.js +0 -14
- package/dist/chunks/studio-qwdqwkj0.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-syreb644.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-w4rz9hdk.js +0 -5
- package/dist/chunks/studio-wc649wss.js +0 -5
- package/dist/chunks/studio-wys23mxz.js +0 -5
- package/dist/chunks/studio-y3ahhdpx.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/toast-1gv0h53h.js +0 -4
- package/dist/chunks/workspace-dz7nxfhv.js +0 -4
- package/dist/chunks/workspace-home-xsd7hkjw.js +0 -4
- package/src/services/directory-picker.ts +0 -187
- package/src/services/gated-registry.ts +0 -77
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{p,_e}from"./studio-9ndgd55w.js";import{Ne,Zw,xa,Fc}from"./studio-ekzbgnjp.js";import{g}from"./studio-tfmhnwyr.js";import{ln,Ia,Y,Cr,Up,u}from"./studio-ztppbam0.js";import{kv}from"./studio-a6e5fzve.js";import{Wc,Sa,tr}from"./studio-vtey9w98.js";import{Wr}from"./studio-g45r5vm8.js";import{ZT,nl,Ib}from"./studio-0rg30pvs.js";import{mt}from"./studio-ajw4k8hp.js";import{T,R,rt}from"./studio-myb4mf0h.js";import{Xn}from"./studio-yjh9gddd.js";import{mb}from"./studio-fg4fj9ec.js";import{Wu}from"./studio-cg54vtet.js";import{Wy,GR,Yg,Sd,KR,JR,qk,Vy,Uy}from"./studio-aghsg0ds.js";import{cm}from"./studio-6rbaedw2.js";import{Sw,Cw,bp}from"./studio-ae7a69jc.js";import{S,xn}from"./studio-9ra9e7m4.js";import{n,Z,v}from"./studio-ywf9y1e2.js";import{le}from"./studio-k5n4es74.js";var X=new Map([["img","src"],["source","src"],["video","poster"]]);function ee(e,t,a=Ne){if(!e||t!=="image")return{mode:"insert"};let r=X.get(e.tagName);if(r)return{attr:r,mode:"replace-attr",path:e.path};if(e.tagName.includes("-")){let s=(a.find((l)=>l.tagName===e.tagName)?.props??[]).filter((l)=>Ia(l.format));if(s.length===1)return{mode:"replace-prop",path:e.path,prop:s[0].name}}return{mode:"insert"}}function E(e){switch(e.kind){case"image":return{attributes:{src:e.ref},tagName:"img"};case"video":return{attributes:{controls:"",src:e.ref},tagName:"video"};case"audio":return{attributes:{controls:"",src:e.ref},tagName:"audio"};default:return{attributes:{href:e.ref},tagName:"a",textContent:e.name}}}function te(e,t){let a=[...e.targetPath],r=a.at(-1);if(t===0||!Z(r))return a;return a[a.length-1]=r+t,a}async function VR(e,t,a,r){if(!e||t.length===0)return;let o=await Sa(t),[s]=o;if(!s)return;let l=ee(a,s.kind);if(l.mode==="replace-attr"){Y(e,(m)=>Cr(m,l.path,l.attr,s.ref));return}if(l.mode==="replace-prop"){Y(e,(m)=>Up(m,l.path,l.prop,s.ref));return}for(let[m,i]of o.entries()){let f={fragment:E(i),type:"block"};if(r)Ib(e,{type:r.instruction},f,te(r,m));else Ib(e,{type:"make-child"},f,[])}}var O={$schema:"https://jxsuite.com/schema/v1",$id:"StudioSitePanel",$description:"The Site panel (specs/studio.md §5.7): the project as an author thinks of it, pages by address and then the parts pages are made of. Four sections under a header holding one filter and a + that opens Add new (`file.new`, §9.1.1). `panels/site-panel.ts` keeps every decision: which files are pages, the route order and nesting (`panels/site-model.ts`, over `@jxsuite/site/routes`), how many entries a collection has and how many pages use a template, which media the project holds (the Media section is a short strip of the first few, and the rest are one click away in Media), what a click opens and what a drag inserts. This document draws rows whose every field is already a string, and a section state that is one of loading, empty, nomatch or listed, so a section a filter empties keeps its heading and says why. Component previews are an island the flow fills, and the drag sources are registered by the adapter through `onNodeCreated`.",tagName:"div",attributes:{part:"site"},style:{$description:"The Site panel's own look, keyed on `part`. Rows are native buttons, because a row opens one thing and a button is the element that says so to every reader; the selected row is the one whose `data-selected` is true, which the flow sets from the focused pane's document. A collection heading is not a button: it opens nothing in Design, and its pages are the buttons under it, indented one step. Component cards and media thumbnails are drag sources as well as buttons; the adapter registers the drags through `onNodeCreated`, so nothing here names a drag.",display:"flex",flexDirection:"column",height:"100%",minHeight:"0",fontFamily:"var(--jx-font-sans)",fontSize:"var(--jx-text-md)",color:"var(--fg)",'& [part="header"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-2)",padding:"var(--jx-space-2)",borderBottom:"1px solid var(--border)",flexShrink:"0"},'& [part="filter"]':{flex:"1",minWidth:"0"},'& [part="sections"]':{flex:"1",minHeight:"0",overflowY:"auto",padding:"var(--jx-space-1) 0 var(--jx-space-4)"},'& [part="section"]':{padding:"var(--jx-space-2) 0"},'& [part="section-head"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-2)",padding:"0 var(--jx-space-3) var(--jx-space-1)"},'& [part="section-title"]':{margin:"0",fontSize:"var(--jx-text-sm)",fontWeight:"700",letterSpacing:"0.06em",textTransform:"uppercase",color:"var(--fg-dim)"},'& [part="section-count"]':{fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="open-media"]':{marginLeft:"auto"},'& [part="no-project"]':{margin:"0",padding:"var(--jx-space-6) var(--jx-space-4)",textAlign:"center",lineHeight:"1.5",color:"var(--fg-dim)"},'& [part="note"]':{margin:"0",padding:"var(--jx-space-1) var(--jx-space-3)",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="rows"]':{display:"flex",flexDirection:"column"},'& [part="page-row"], & [part="template-row"], & [part="collection-row"]':{display:"flex",alignItems:"baseline",gap:"var(--jx-space-2)",width:"100%",boxSizing:"border-box",minHeight:"26px",padding:"var(--jx-space-1) var(--jx-space-3)",border:"none",background:"transparent",color:"inherit",font:"inherit",textAlign:"start"},'& [part="page-row"], & [part="template-row"]':{cursor:"pointer",":hover":{background:"var(--hover-bg)"},":focus-visible":{outline:"var(--jx-focus-ring)",outlineOffset:"-2px"}},'& [part="page-row"][data-nested="true"]':{paddingLeft:"calc(var(--jx-space-3) + var(--jx-space-4))"},'& [data-selected="true"]':{background:"var(--accent-15)",color:"var(--fg)"},'& [part="collection-row"]':{color:"var(--fg-dim)"},'& [part="row-label"]':{flex:"1",minWidth:"0",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},'& [part="row-detail"]':{flexShrink:"0",maxWidth:"55%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="cards"]':{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(96px, 1fr))",gap:"var(--jx-space-2)",padding:"0 var(--jx-space-3)"},'& [part="component-card"]':{display:"flex",flexDirection:"column",width:"100%",padding:"0",overflow:"hidden",border:"1px solid var(--border)",borderRadius:"var(--jx-radius-md)",background:"var(--bg-panel)",color:"inherit",font:"inherit",cursor:"grab",":hover":{borderColor:"var(--fg-dim)"},":focus-visible":{outline:"var(--jx-focus-ring)",outlineOffset:"1px"}},'& [part="card-preview"]':{$description:"A live render on the light document surface the Insert panel's element cards use (`--canvas-*` does not follow the theme, because what is drawn here is a page's part, and a site's dark text on the dark chrome read as an empty black box). It is drawn at half size, so a component laid out for a page shows its face rather than a clipped corner of one oversized glyph. The render is in the island's own shadow root (`mountPreview` in `browse/library-preview.ts`), so no rule here can reach its elements: the half size is the island's `zoom`, which lays the render out twice as wide and draws it at half, and the 128px height is the 64px box at that zoom. The broken-image rule went into the root with it.",position:"relative",height:"128px",zoom:"0.5",overflow:"hidden",pointerEvents:"none",background:"white",color:"var(--canvas-fg-2)",fontSize:"var(--jx-text-md)"},'& [part="card-label"]':{padding:"var(--jx-space-1) var(--jx-space-2)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"var(--jx-text-sm)",textAlign:"start"},'& [part="thumbs"]':{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(56px, 1fr))",gap:"var(--jx-space-1)",padding:"0 var(--jx-space-3)"},'& [part="media-strip"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-2)"},'& [part="media-more"]':{alignSelf:"flex-start",marginInline:"var(--jx-space-3)"},'& [part="media-thumb"]':{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",aspectRatio:"1",padding:"0",overflow:"hidden",border:"1px solid var(--border)",borderRadius:"var(--jx-radius-sm)",background:"var(--bg-panel)",color:"var(--fg-dim)",font:"inherit",cursor:"grab",":focus-visible":{outline:"var(--jx-focus-ring)",outlineOffset:"1px"}},'& [part="thumb-image"]':{width:"100%",height:"100%",objectFit:"cover"},'& [part="thumb-name"]':{padding:"var(--jx-space-1)",overflow:"hidden",fontSize:"var(--jx-text-xs)",wordBreak:"break-all"}},children:[{tagName:"div",attributes:{part:"header"},children:[{tagName:"jx-textfield",attributes:{part:"filter"},$props:{size:"sm",type:"search",clearable:!0,label:"Filter the site",placeholder:"Filter the site…",value:{$ref:"#/state/filter"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setFilter"},value:[{$ref:"event#/target/value"}]}]}},{tagName:"jx-action-button",attributes:{part:"add"},$props:{size:"sm",icon:"plus",label:"Add new",hint:"Add new",haspopup:"dialog"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/add"},value:[]}]}}]},{tagName:"div",attributes:{part:"body-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/body"},cases:{none:{tagName:"p",attributes:{part:"no-project"},textContent:"Open a project to see its pages, templates, components and media."},project:{tagName:"div",attributes:{part:"sections"},children:[{tagName:"section",attributes:{part:"section","data-section":"pages","aria-labelledby":"site-section-pages"},children:[{tagName:"div",attributes:{part:"section-head"},children:[{tagName:"h3",attributes:{part:"section-title",id:"site-section-pages"},textContent:"Pages"},{tagName:"span",attributes:{part:"section-count"},textContent:"${state.pagesCount}"}]},{tagName:"div",attributes:{part:"section-body",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/pagesState"},cases:{loading:{tagName:"p",attributes:{part:"note"},textContent:"Reading the project…"},empty:{tagName:"p",attributes:{part:"note"},textContent:"No pages yet. Add one with +."},nomatch:{tagName:"p",attributes:{part:"note"},textContent:"Nothing here matches the filter."},listed:{tagName:"div",attributes:{part:"rows",role:"list"},children:[{$prototype:"Array",items:{$ref:"#/state/pages"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"page-item",role:"listitem","data-kind":"${$map.item.kind}"},$switch:{$ref:"$map/item/kind"},cases:{collection:{tagName:"div",attributes:{part:"collection-row"},children:[{tagName:"span",attributes:{part:"row-label"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"row-detail"},textContent:"${$map.item.detail}"}]},page:{tagName:"button",attributes:{part:"page-row",type:"button","data-path":"${$map.item.path}","data-selected":"${$map.item.selected}","aria-current":"${$map.item.selected === 'true' ? 'true' : null}",title:"${$map.item.path}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/open"},value:[{$ref:"$map/item/path"}]}]},children:[{tagName:"span",attributes:{part:"row-label"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"row-detail"},textContent:"${$map.item.detail}"}]},"entry-page":{tagName:"button",attributes:{part:"page-row",type:"button","data-path":"${$map.item.path}","data-selected":"${$map.item.selected}","aria-current":"${$map.item.selected === 'true' ? 'true' : null}",title:"${$map.item.path}","data-nested":"true"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/open"},value:[{$ref:"$map/item/path"}]}]},children:[{tagName:"span",attributes:{part:"row-label"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"row-detail"},textContent:"${$map.item.detail}"}]}}}}]}}}]},{tagName:"section",attributes:{part:"section","data-section":"templates","aria-labelledby":"site-section-templates"},children:[{tagName:"div",attributes:{part:"section-head"},children:[{tagName:"h3",attributes:{part:"section-title",id:"site-section-templates"},textContent:"Templates"},{tagName:"span",attributes:{part:"section-count"},textContent:"${state.templatesCount}"}]},{tagName:"div",attributes:{part:"section-body",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/templatesState"},cases:{loading:{tagName:"p",attributes:{part:"note"},textContent:"Reading the project…"},empty:{tagName:"p",attributes:{part:"note"},textContent:"No templates in layouts/ yet."},nomatch:{tagName:"p",attributes:{part:"note"},textContent:"Nothing here matches the filter."},listed:{tagName:"div",attributes:{part:"rows",role:"list"},children:[{$prototype:"Array",items:{$ref:"#/state/templates"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"template-item",role:"listitem"},children:[{tagName:"button",attributes:{part:"template-row",type:"button","data-path":"${$map.item.path}","data-selected":"${$map.item.selected}","aria-current":"${$map.item.selected === 'true' ? 'true' : null}",title:"${$map.item.path}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/open"},value:[{$ref:"$map/item/path"}]}]},children:[{tagName:"span",attributes:{part:"row-label"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"row-detail"},textContent:"${$map.item.detail}"}]}]}}]}}}]},{tagName:"section",attributes:{part:"section","data-section":"components","aria-labelledby":"site-section-components"},children:[{tagName:"div",attributes:{part:"section-head"},children:[{tagName:"h3",attributes:{part:"section-title",id:"site-section-components"},textContent:"Components"},{tagName:"span",attributes:{part:"section-count"},textContent:"${state.componentsCount}"}]},{tagName:"div",attributes:{part:"section-body",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/componentsState"},cases:{loading:{tagName:"p",attributes:{part:"note"},textContent:"Reading the project…"},empty:{tagName:"p",attributes:{part:"note"},textContent:"No components yet."},nomatch:{tagName:"p",attributes:{part:"note"},textContent:"Nothing here matches the filter."},listed:{tagName:"div",attributes:{part:"cards",role:"list"},children:[{$prototype:"Array",items:{$ref:"#/state/components"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"card-item",role:"listitem"},children:[{tagName:"button",attributes:{part:"component-card",type:"button","data-tag":"${$map.item.tagName}","data-selected":"${$map.item.selected}","aria-current":"${$map.item.selected === 'true' ? 'true' : null}",title:"${$map.item.hint}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openComponent"},value:[{$ref:"$map/item/tagName"}]}]},children:[{$description:'The preview ISLAND: empty here, filled by the flow with the component rendered live from the Library\'s preview cache as the card scrolls into view (specs/studio-ui-guidelines.md §9.4). It is `inert`, not merely `aria-hidden`: a component\'s own links and buttons stay focusable under `aria-hidden`, and Chrome then counts their text into the card\'s name ("Contact Us Today Eer cta", "◀ ▶ Eer reviews"). Inert takes the render out of the accessibility tree, the tab order and the pointer at once, so the card is named by its label alone.',tagName:"div",attributes:{part:"card-preview",inert:""}},{tagName:"span",attributes:{part:"card-label"},textContent:"${$map.item.label}"}]}]}}]}}}]},{tagName:"section",attributes:{part:"section","data-section":"media","aria-labelledby":"site-section-media"},children:[{tagName:"div",attributes:{part:"section-head"},children:[{tagName:"h3",attributes:{part:"section-title",id:"site-section-media"},textContent:"Media"},{tagName:"span",attributes:{part:"section-count"},textContent:"${state.mediaCount}"},{tagName:"jx-button",attributes:{part:"open-media"},$props:{size:"sm",variant:"secondary",quiet:!0},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openMedia"},value:[]}]},children:[{tagName:"span",textContent:"Open Media"}]}]},{tagName:"div",attributes:{part:"section-body",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/mediaState"},cases:{loading:{tagName:"p",attributes:{part:"note"},textContent:"Reading the project…"},empty:{tagName:"p",attributes:{part:"note"},textContent:"No media in public/ yet."},nomatch:{tagName:"p",attributes:{part:"note"},textContent:"Nothing here matches the filter."},listed:{tagName:"div",attributes:{part:"media-strip"},children:[{tagName:"div",attributes:{part:"thumbs",role:"list"},children:[{$prototype:"Array",items:{$ref:"#/state/media"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"thumb-item",role:"listitem"},children:[{tagName:"button",attributes:{part:"media-thumb",type:"button","data-path":"${$map.item.path}","data-selected":"${$map.item.selected}","aria-current":"${$map.item.selected === 'true' ? 'true' : null}",title:"Open ${$map.item.name} in Media, or drag it onto the canvas","aria-label":"${$map.item.name}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/open"},value:[{$ref:"$map/item/path"}]}]},children:[{tagName:"span",attributes:{part:"thumb-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/thumb"},cases:{image:{tagName:"img",attributes:{part:"thumb-image",src:"${$map.item.src}",alt:"",loading:"lazy",draggable:"false"}},file:{tagName:"span",attributes:{part:"thumb-name"},textContent:"${$map.item.name}"}}}]}]}}]},{tagName:"jx-button",attributes:{part:"media-more",hidden:"${state.mediaMore === '' ? '' : null}"},$props:{size:"sm",variant:"secondary",quiet:!0},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openMedia"},value:[]}]},children:[{tagName:"span",textContent:"${state.mediaMore}"}]}]}}}]}]}}}]};T("site-panel",O);function A(){return{body:"none",components:[],componentsCount:"",componentsState:"loading",filter:"",media:[],mediaCount:"",mediaMore:"",mediaState:"loading",pages:[],pagesCount:"",pagesState:"loading",templates:[],templatesCount:"",templatesState:"loading"}}function z(e,t){e.body=t.body,e.filter=t.filter,e.pages=t.pages,e.pagesState=t.pagesState,e.pagesCount=t.pagesCount,e.templates=t.templates,e.templatesState=t.templatesState,e.templatesCount=t.templatesCount,e.components=t.components,e.componentsState=t.componentsState,e.componentsCount=t.componentsCount,e.media=t.media,e.mediaState=t.mediaState,e.mediaCount=t.mediaCount,e.mediaMore=t.mediaMore}function ne(e){let t=n(e)?void 0:e.attributes?.part;return n(t)?t:""}function re(e){let t=e?.$map,a=v(t)?t.item:void 0;return v(a)?a:null}function I(e,t){let a=re(e)?.[t];return n(a)?a:""}function J(e,t,a,r){let o=g({...A(),...a});z(o,t);let s=null,l=!1,m=R("site-panel",o,e,{onNodeCreated:(i,f,P,h)=>{if(l||!(i instanceof HTMLElement))return;switch(ne(P)){case"card-preview":{let d=I(h,"tagName");if(d!=="")r.preview(i,d);break}case"component-card":{let d=I(h,"tagName");if(d!=="")r.componentSource(i,d);break}case"media-thumb":{let d=I(h,"path");if(d!=="")r.mediaSource(i,d);break}default:break}}}).then((i)=>{if(l)return i.dispose(),i;return s=i,i});return{connected:()=>!l&&(s===null||s.root.parentNode===e),dispose(){l=!0,s?.dispose(),s=null},ready:m,update:(i)=>{z(o,i)}}}var N=null,F=!1,x=null,b=0;function ie(){return Object.keys(S?.projectConfig?.content??{})}async function oe(e){return(await ZT(e)).contentType}async function se(e){let[t,a]=await Promise.all([cm(["pages","layouts"],p()),kv()]),r=t.files.filter((i)=>i.path.startsWith("pages/")),o=await Promise.all(r.map(async(i)=>({contentType:i.path.includes("[")?await oe(i.path):null,path:i.path})));if(e!==b)return;let s=N?.collections,l=new Map(ie().map((i)=>[i,s?.get(i)??null]));F=!1,N={collections:l,layouts:t.files.flatMap((i)=>i.path.startsWith("layouts/")?[i.path]:[]),pageExtensions:a,pages:o},C();let m=new Set(o.flatMap((i)=>i.contentType&&l.has(i.contentType)?[i.contentType]:[]));if(await Promise.all([...m].map(async(i)=>{let f=await mb(i).catch(()=>null);if(e===b&&f)l.set(i,f.length)})),e===b)C()}function pe(){if((!N||F)&&!x&&_e()&&S){let e=b;x=se(e).finally(()=>{if(e===b)x=null})}return N}function Kg(e){if(b+=1,F=!0,x=null,e===void 0||e.some((t)=>me(t)))D=!0;if(c)C()}var ce=["pages/","layouts/","content/","public/"];function me(e){if(e.startsWith("components/"))return!0;return e.endsWith(".json")&&e!=="project.json"&&!ce.some((t)=>e.startsWith(t))}var D=!1,M=!1;function de(){if(M||Zw&&!D||!_e())return;M=!0,D=!1,xa().finally(()=>{M=!1,C()})}function _(e,t){return Ne.flatMap((a)=>{let r=Sd(a.tagName),o=`<${a.tagName}>`,s=L(a);if(!Yg(e,a.tagName,s??"",a.package??""))return[];return[{hint:s?`Open ${o}, or drag it onto the canvas`:`${o} from ${a.package??"a package"}: open Packages, or drag it onto the canvas`,key:a.tagName,label:r,path:s??"",selected:Wy(s!==null&&s===t),tagName:a.tagName}]})}function L(e){return e?.path!==void 0&&e.source!=="npm"?e.path:null}var V=8;function ue(e,t){return e>t?`Show all ${e} in Media`:""}function W(e,t,a){return e.flatMap((r)=>Yg(t,r.name,r.file)?[{key:r.file,name:r.name,path:r.file,selected:Wy(r.file===a),src:r.isImage?tr(r.file):"",thumb:r.isImage?"image":"file"}]:[])}function ge(){let e=S?.projectConfig?.defaults?.layout;return n(e)?e.replace(/^\.\//,""):null}var w="";function j(e,t,a){if(e)return"loading";if(t===0)return"empty";return a===0?"nomatch":"listed"}function k(e,t,a){if(a||e===0)return"";return t===e?String(e):`${t} of ${e}`}function B(){if(!S)return{...A(),filter:w};let e=GR(w),t=u.value?.documentPath??null,a=pe();de();let r=Wu(),o=a?KR(a.pages,a.collections,t,{extensions:a.pageExtensions,i18n:ln(S.projectConfig??{}).i18n}):[],s=JR(o,e),l=ge(),m=a?qk(a.layouts,t,"",l):[],i=a?qk(a.layouts,t,e,l):[],f=!Zw,P=_("",t),h=_(e,t),d=r?W(r,"",t):[],y=r?W(r,e,t):[],H=(K)=>K.filter((Q)=>Q.kind!=="collection").length;return{body:"project",components:h,componentsCount:k(P.length,h.length,f),componentsState:j(f,P.length,h.length),filter:w,media:y.slice(0,V),mediaCount:k(d.length,y.length,r===null),mediaMore:ue(y.length,Math.min(y.length,V)),mediaState:j(r===null,d.length,y.length),pages:s,pagesCount:k(H(o),H(s),a===null),pagesState:j(a===null,o.length,s.length),templates:i,templatesCount:k(m.length,i.length,a===null),templatesState:j(a===null,m.length,i.length)}}function U(e){(le("yswdhxrf"),import("./files-yswdhxrf.js")).then(({openFileInTab:t})=>t(e))}var fe={add:()=>{rt("file.new",{},"Site panel")},open:U,openComponent:(e)=>{let t=Ne.find((r)=>r.tagName===e);if(!t)return;let a=L(t);if(a){U(a);return}rt("view.setActivity",{tab:"packages"},"Site panel")},openMedia:()=>{rt("view.setWorkspace",{workspace:"media"},"Site panel")},setFilter:(e)=>{w=e,C()}},c=null;async function he(e,t,a){let r=await Cw(a,e.cache);if(r&&c===e&&t.isConnected&&!Uy(t))Vy(t,r)}function q(e,t,a){let r=Wr({element:t,getInitialData:()=>a()??{},onGenerateDragPreview:({nativeSetDragImage:o})=>{nl({nativeSetDragImage:o})}});e.sources.set(t,r)}function be(e){for(let[t,a]of e.sources)if(!t.isConnected)a(),e.sources.delete(t);e.observer.releaseDetached()}function G(e){e.handle?.dispose();for(let t of e.sources.values())t();e.sources.clear(),e.observer.destroy(),e.cache.clear()}function ye(e){let t=Ne.find((a)=>a.tagName===e);return t?{fragment:Fc(t),type:"block"}:null}function ve(e){let t=Wu()?.find((r)=>r.file===e);if(!t)return null;return{fragment:E({kind:Wc({name:t.name}),name:t.name,path:t.file,ref:t.ref}),type:"block"}}function xe(e){if(c&&(c.host!==e||c.handle?.connected()===!1))G(c),c=null;if(c){c.handle?.update(B()),be(c);return}let t=new Map,a={cache:Sw(),handle:null,host:e,observer:bp((r)=>{let o=r instanceof HTMLElement?t.get(r):void 0;if(o!==void 0&&r instanceof HTMLElement)t.delete(r),he(a,r,o)}),pending:t,sources:new Map};c=a,a.handle=J(e,B(),fe,{componentSource:(r,o)=>{q(a,r,()=>ye(o))},mediaSource:(r,o)=>{q(a,r,()=>ve(o))},preview:(r,o)=>{let s=L(Ne.find((l)=>l.tagName===o));if(s)t.set(r,s),a.observer.observe(r)}})}function C(){xn("leftPanel")}function we(e){return e.querySelector(".panel-content")??e}function UR(){Xn({id:"site",title:"Site",level:"project",dock:"navigator",icon:"browser",render:()=>mt,afterRender:(e,t)=>{xe(we(t))}})}function qR(){if(c)G(c);c=null,w="",b+=1,N=null,F=!1,x=null,D=!0,M=!1}
|
|
2
|
+
export{VR,Kg,UR,qR};
|
|
3
|
+
|
|
4
|
+
//# debugId=3E042505FCCFCC0E64756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-9gzvypw4.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{n,Q,_}from"./studio-ywf9y1e2.js";function rf(r){if(!r)return!1;if(Q(r.openProject))return!0;return r.openProjectPicker==="repo-list"&&Q(r.listRepos)&&Q(r.importProject)}function sI(r){globalThis.__jxPlatform=r}function Ev(){return globalThis.__jxLauncher}var a=new Map;function aI(){let r=[];for(let[o,i]of a)for(let t=0;t<i;t++)r.push(o);return r}function s(r){a.set(r,(a.get(r)??0)+1)}function c(r){let o=(a.get(r)??1)-1;if(o>0)a.set(r,o);else a.delete(r)}function g(r){return(_(r)||Q(r))&&"then"in r&&Q(r.then)}function d(r,o,i){return(...t)=>{let e=o.apply(i,t);if(!g(e))return e;s(r);let u=()=>{c(r)};return e.then(u,u),e}}function P(r){let o=new Map;return new Proxy(r,{get(i,t){let e=i[t];if(!Q(e)||!n(t))return e;let u=o.get(t);if(u&&u.raw===e)return u.wrapper;let f=d(t,e,i);return o.set(t,{raw:e,wrapper:f}),f}})}var l=null;function p(){let r=globalThis.__jxPlatform;if(!r)throw Error("No platform registered. Call registerPlatform() before starting Studio.");if(l?.raw!==r)l={raw:r,wrapped:P(r)};return l.wrapped}function _e(){return globalThis.__jxPlatform!=null}
|
|
2
|
+
export{rf,sI,Ev,aI,p,_e};
|
|
3
|
+
|
|
4
|
+
//# debugId=C90750D49B93762C64756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-9ndgd55w.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{n,Z,Ze,Q,_,v,Me,Go,Gn,cf,it}from"./studio-ywf9y1e2.js";var bv=400;var Zp=350,NC=300,qO=30000;function rr(e){return Array.isArray(e?.children)?e.children:[]}function vv(e,t,i=""){if(!_(e))return e;if(Array.isArray(e)){for(let[l,s]of e.entries())vv(s,t,`${i}/${l}`);return e}let r=e,{children:o}=r;if(Go(o)){let l=o;t?.(i,l),r.children=[l]}if(Array.isArray(r.children))for(let[l,s]of r.children.entries())vv(s,t,`${i}/children/${l}`);if(r.$prototype==="Array"&&_(r.map))vv(r.map,t,`${i}/map`);if(_(r.cases))for(let[l,s]of Object.entries(r.cases))vv(s,t,`${i}/cases/${J$(l)}`);return e}function J$(e){return String(e).replaceAll("~","~0").replaceAll("/","~1")}function Vt(e){return e.length>=2?e.slice(0,-2):null}function zi(e){return e.at(-1)}function Y$(e){return e.join("/")}function Er(e,t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;return e.every((i,r)=>i===t[r])}function xh(e,t=[],i=0){let r=[];return u(e,t,i,r,!1),r}function u(e,t,i,r,o){if(n(e)||Z(e)||Ze(e)){if(!o)r.push({depth:i,node:e,nodeType:"text",path:t});return}if(e.$prototype==="Array"){if(!o)r.push({depth:i,node:e,nodeType:"map",path:t});let s=e.map;if(_(s))u(s,[...t,"map"],i+1,r,!1);return}if(!o)r.push({depth:i,node:e,nodeType:"element",path:t});if(e.$props&&it(e.tagName).includes("-")&&!Array.isArray(e.children))return;let{children:l}=e;if(Array.isArray(l))for(let s=0;s<l.length;s++){let a=[...t,"children",s];u(l[s],a,i+1,r,!1)}else if(Go(l))u(l,[...t,"children"],i+1,r,!1);if(e.$switch&&_(e.cases))for(let[s,a]of Object.entries(e.cases)){let p=[...t,"cases",s];if(_(a)&&a.$ref)r.push({depth:i+1,node:a,nodeType:"case-ref",path:p});else if(_(a))r.push({depth:i+1,node:a,nodeType:"case",path:p}),u(a,p,i+2,r,!0)}}function Tr(e){if(!e)return"?";if(e.$prototype==="Array"){let{items:r}=e;return`Repeater → ${(Me(r)?r.$ref:void 0)||"items"}`}if(e.$title)return e.$title;if(e.$id)return e.$id;if(e.tagName==="slot"){let r=e.attributes?.name;return n(r)&&r.trim()?`slot: ${r.trim()}`:"slot"}let t=it(e.tagName)||"div",i=e.$switch?" ⇆":"";if(n(e.textContent)&&e.textContent.length>0)return`${t} — ${e.textContent.slice(0,24)}${i}`;return t+i}var S=null;function Xc(e){S=e}function wn(){return S}function _h(e){return _(e)}function Xp(e){if(Array.isArray(e))return e.map((i)=>Xp(i));if(!Gn(e))return e;let t={};for(let[i,r]of Object.entries(e)){if(i.startsWith("on")&&cf(r))continue;if(i==="children")t.children=Array.isArray(r)?r.map((o)=>Xp(o)):Xp(r);else if(i==="cases"&&_h(r)){let o={};for(let[l,s]of Object.entries(r))o[l]=Xp(s);t.cases=o}else if(i==="state"&&_h(r)){let o={};for(let[l,s]of Object.entries(r)){if(v(s)&&s.timing==="server")continue;o[l]=s}t.state=o}else t[i]=r}return t}var AC=null,Sh=null,Z$=null,X$=null,Q$=null;function c(e){let t=document.querySelector(`#${e}`);return t instanceof HTMLElement?t:null}function GO(){AC=c("activity-bar"),Sh=c("left-panel"),Z$=c("right-panel"),X$=c("toolbar"),Q$=c("statusbar")}function Qp(e,t){if(!e)throw TypeError(`#${t} is not in the shell yet; initShellRefs() has not found it`);return e}var qm=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),eI=[":hover",":focus",":active",":focus-within",":focus-visible",":disabled",":first-child",":last-child","::before","::after","::placeholder"];function Bx(e){return e.startsWith(":")||e.startsWith(".")||e.startsWith("&")||e.startsWith("[")}var f=new Map;function zx(e,t,i){let r=t??bv;return(...o)=>{clearTimeout(f.get(e)),f.set(e,setTimeout(()=>{f.delete(e),i(...o)},r))}}function KO(e){clearTimeout(f.get(e)),f.delete(e)}var x=new Map;function y(e){return(_(e)||Q(e))&&"then"in e&&Q(e.then)}var d=0;function JO(){return d}function m(e,t){d+=1;let i=()=>{d-=1},r=null;try{let o=t();if(y(o))r=o}catch(o){console.error(`Renderer "${e}" failed:`,o)}if(!r){i();return}r.then(i,(o)=>{console.error(`Renderer "${e}" failed:`,o),i()})}function Gm(e,t){x.set(e,t)}function sr(){for(let[e,t]of x.entries())m(e,t)}function xn(...e){for(let t of e){let i=x.get(t);if(!i)continue;m(t,i)}}function cl(e,t){if(e){if(t.selection!==void 0)e.session.selection=t.selection;if(t.hover!==void 0)e.session.hover=t.hover;if(t.clipboard!==void 0)e.session.clipboard=t.clipboard;if(t.ui)Object.assign(e.session.ui,t.ui);if(t.canvas)Object.assign(e.session.canvas,t.canvas)}}function Ra(e,t,i){if(e)e.session.ui[t]=i}function YO(e,t){if(e)Object.assign(e.session.canvas,t)}
|
|
2
|
+
export{bv,Zp,NC,qO,rr,vv,J$,Vt,zi,Y$,Er,xh,Tr,S,Xc,wn,_h,Xp,AC,Sh,Z$,X$,Q$,GO,Qp,qm,eI,Bx,zx,KO,JO,Gm,sr,xn,cl,Ra,YO};
|
|
3
|
+
|
|
4
|
+
//# debugId=7B0FC86F995C963964756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-9ra9e7m4.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{p}from"./studio-9ndgd55w.js";import{n}from"./studio-ywf9y1e2.js";import{le}from"./studio-k5n4es74.js";var a=null,P=null,F=null,g=!1;function S(t){return F=t,g=!0,a?E():Promise.resolve()}async function E(){if(!g)return;g=!1;try{let{applyProjectSchemas:t}=await (le("fty7a8vg"),import("./monaco-setup-fty7a8vg.js"));t(F)}catch{}}function Km(){if(a)return Promise.resolve(a);return P??=(async()=>{let[t]=await Promise.all([(le("645krvtz"),import("./editor-645krvtz.js")),(le("fty7a8vg"),import("./monaco-setup-fty7a8vg.js"))]);return a=t,await E(),a})(),P}function nf(){return a}function Sv(t,o,e){if(!t?.isConnected||o)return!1;return e()}var i=[],d=null;function Ht(){if(!d)d=(async()=>{try{i=await p().listFormats?.()??[]}catch{i=[]}return i})();return d}function Lh(){d=null,i=[],f=null,c=[],x=null,l=[]}var c=[],f=null;function Qc(){if(!f)f=(async()=>{try{c=await p().listExtensions?.()??[]}catch{c=[]}return c})();return f}function Cv(){return c}var l=[],x=null;function w(){if(!x)x=(async()=>{try{l=await p().listExtensionCatalog?.()??[]}catch{l=[]}return l})();return x}function Ux(){return l}async function j(t){let o=null;try{o=await t.fetchProjectSchemas?.()??null}catch{}S(o),await (le("19y62knt"),import("./jx-validate-19y62knt.js")).then(({applyProjectSchemas:e})=>e(o)).catch(()=>!1)}function ec(t){j(t),w(),(le("thfke054"),import("./extension-sections-thfke054.js")).then(({syncExtensionSettingsSections:o})=>o()).catch(()=>{})}function Xd(){return i}function Na(t,o){let e=t.startsWith(".")?t.toLowerCase():`.${t.toLowerCase()}`;return i.find((r)=>r.extensions.includes(e)&&(!o||r.capabilities[o]))}function Wi(t){if(!t)return;return i.find((o)=>o.name===t)}function of(t){return Error(`No format class imported for "${t}" — add one to project.json imports `+`(e.g. "Markdown": "@jxsuite/parser/Markdown.class.json") and make sure the project's dependencies are installed`)}function fn(t){if(!t)return;let o=t.lastIndexOf(".");if(o===-1)return;return Na(t.slice(o))}function ul(t){let o=new Set;for(let e of i){if(t&&!e.documentKinds.includes(t))continue;for(let r of e.extensions)o.add(r)}return o.delete(".json"),[...o]}async function kv(){return await Ht(),[".json",...ul("page")]}function lr(){return i.find((t)=>t.capabilities.serialize&&t.documentKinds.includes("content"))}async function M(t){let o=p();if(!o.formatAction)throw Error("Platform does not support format actions");return o.formatAction(t)}async function oI(t,o,e){return await M({action:"parse",format:t,options:e,source:o})}async function Aa(t,o,e){return await M({action:"serialize",doc:o,format:t,options:e})}function rI(t,o){let e=t?.studio?.documentMode,r=e?.componentWhen;if(r?.frontmatterKey){let s=o[r.frontmatterKey],u=r.matches?new RegExp(r.matches):/./;if(n(s)&&u.test(s))return{document:o,frontmatter:{},mode:"component"}}if(e?.default==="component")return{document:o,frontmatter:{},mode:"component"};let m=o.children??[];if(Array.isArray(m)&&m.length===0)m.push({children:[],tagName:"p"});let b=new Set(["state","imports"]),h={children:m},y={};for(let[s,u]of Object.entries(o)){if(s==="children")continue;if(b.has(s))h[s]=u;else y[s]=u}return{document:h,frontmatter:y,mode:"content"}}
|
|
2
|
+
export{Km,nf,Sv,Ht,Lh,Qc,Cv,Ux,ec,Xd,Na,Wi,of,fn,ul,kv,lr,oI,Aa,rI};
|
|
3
|
+
|
|
4
|
+
//# debugId=CE50514E35D767C264756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-a6e5fzve.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{p,_e}from"./studio-9ndgd55w.js";import{ae}from"./studio-qs5fmhtj.js";import{C}from"./studio-tfmhnwyr.js";import{te}from"./studio-psh8mwnw.js";import{pO,Vn,Ce,ui}from"./studio-ztppbam0.js";import{km,h}from"./studio-nqexty8x.js";import{zl,Sb,Ri,Nd,SS}from"./studio-0nefxhar.js";import{Vs}from"./studio-9179bsm7.js";import{Ws,wa,sT}from"./studio-ws2r1d7e.js";import{as}from"./studio-trcfer2b.js";import{S}from"./studio-9ra9e7m4.js";import{le}from"./studio-k5n4es74.js";var g={attempts:6,delayMs:5000};function P(e,t){return`https://dash.cloudflare.com/${e}/pages/view/${t}`}async function k(e){if(e>0)await new Promise((t)=>{setTimeout(t,e)})}async function d(e={}){let t=Ri(),r=new AbortController,i=Vs({cancel:()=>{r.abort()},source:"Publish",status:"Starting…",steps:["Push to the remote","Ask Cloudflare for the deployment"],title:"Deploy"});i.step("Push to the remote");try{await p().gitPush({setUpstream:!0}),i.log("Pushed the current branch.")}catch(a){return i.log(te(a)),i.fail("Could not push to the remote.",{action:"git.push"}),!1}if(!t)return i.done("Pushed. No provider is connected, so nothing was asked to build it."),!0;i.step("Ask Cloudflare for the deployment");let n=e.attempts??g.attempts,s=e.delayMs??g.delayMs;for(let a=0;a<n;a+=1){if(r.signal.aborted)return!1;let o;try{o=await Sb(t)}catch(l){return i.log(te(l)),i.fail("Cloudflare did not answer.",{action:"publish.deploy"}),!1}if(o)return Nd(o),i.log(`${o.stage}: ${o.status} — ${o.url}`),i.done(`${o.stage}: ${o.status}`),!0;await k(s)}if(r.signal.aborted)return!1;return Nd(null),i.done("Pushed. Cloudflare has not reported a deployment yet."),!0}function x(){return[{category:"Publish",id:"publish.setUp",level:"project",menus:["commandbar/overflow","palette"],group:"8_publish",requires:"an open project on a platform that can reach the Cloudflare API",when:(e)=>e.project.open,enablement:(e)=>e.capability.publish,run:async()=>{let{openPublishPanel:e}=await (le("yhmda3cd"),import("./publish-panel-yhmda3cd.js"));e()},title:"Set Up Publishing"},{category:"Publish",id:"publish.deploy",level:"project",menus:["commandbar/overflow","palette"],group:"8_publish",requires:"a repository with a remote and a connected deploy provider, on a platform that can reach the Cloudflare API",when:(e)=>e.project.open,enablement:(e)=>e.project.isRepo&&Ri()!==void 0&&e.capability.publish,run:async()=>{await d()},title:"Deploy"},{category:"Publish",id:"publish.openDashboard",level:"project",menus:["commandbar/overflow","palette"],group:"8_publish",requires:"a connected deploy provider, on a platform that can reach the Cloudflare API",when:(e)=>e.project.open,enablement:(e)=>Ri()!==void 0&&e.capability.publish,run:()=>{let e=Ri();if(e)window.open(P(e.accountId,e.projectName),"_blank","noopener")},title:"Open Deployment Dashboard"},{category:"Publish",id:"publish.quick",level:"project",menus:["commandbar/overflow","palette"],group:"8_publish",requires:"a project tracked by git",when:(e)=>e.project.open,enablement:(e)=>e.project.isRepo,run:async()=>{let{openQuickPublish:e}=await (le("12hh8926"),import("./publish-quick-12hh8926.js"));e()},title:"Quick Publish"},{args:Ce({tab:ui(km,"Which view of the Publish workspace to show: review (the changes and where they go), deploys (the live site and its deployments), branches, or hosting (where the project is saved and hosted). Defaults to the view the workspace was left on.")},[]),category:"Publish",id:"publish.open",level:"project",menus:["never"],group:"8_publish",requires:"an open project",enablement:(e)=>e.project.open,run:async(e,t)=>{let r=t.tab===void 0?null:Vn("publish.open",t,"tab",km),i=ae();if(!i)throw Error(`command "publish.open" needs the window's command registry`);if(await i.run("view.setWorkspace",{workspace:"publish"}),r!==null){let{showPublishTab:n}=await (le("hx8qdv9p"),import("./publish-workspace-hx8qdv9p.js"));n(r)}},title:"Show Publish"}]}function iR(e){e.registerAll(x())}function u(){let e=h.git.status?.remotes;return Array.isArray(e)&&e.length>0?e[0]??"":""}function c(){return h.git.branches?.current||h.git.status?.branch||""}function b(){return Ri()!==void 0&&zl()&&u()!==""}function D(){let e=Ri();return e?.productionUrl??e?.projectName??""}function y(e){return`studio/${as(e).replaceAll(/-+/g,"-").replaceAll(/^-|-$/g,"").slice(0,48).replace(/-$/,"")||"changes"}`}function f(){return h.git.branches?.defaultBranch??""}function jg(){if(!sT())return"This host cannot open a pull request yet. Publish live, or create a branch under Branches and push it.";if(wa()){let e=f(),t=c();if(!e||!t||t===e)return`Every commit to ${e||"the default branch"} on this host is live. Create a branch under Branches and send it for review from there.`;return""}if(u()==="")return"A pull request needs a remote. Create the GitHub repository under Hosting first.";return""}function j(){let e=c()||"the current branch";if(b())return`Commits to ${e} and deploys to ${D()}.`;if(wa())return`Commits to ${e} on GitHub.`;let t=u();return t?`Commits to ${e} and pushes it to ${t}.`:`Commits to ${e}. This repository has no remote, so nothing leaves this machine.`}function A(){let e=c()||"the current branch";if(wa())return`Commits to ${e} and opens a pull request from it into ${f()||"the default branch"}.`;let t=h.git.commitMessage.trim();return`Saves to ${t?y(t):"a new studio/ branch"}, pushes it and opens a pull request into ${e}.`}function Ey(e){let t=jg();return[{checked:e==="live"?"true":"false",disabled:!1,label:"Publish live",note:j(),reason:"",value:"live"},{checked:e==="review"?"true":"false",disabled:t!=="",label:"Send for review",note:A(),reason:t,value:"review"}]}function qf(e){return e==="review"&&jg()!==""?"live":e}function oR(e){if(e==="review")return"Send for review";if(b())return"Publish live";return wa()||u()!==""?"Commit and push":"Commit"}function w(e){let t=h.git.status?.files??[];return e?t:t.filter((r)=>Boolean(r.staged))}function Gf(e,t=!1){let{status:r}=h.git;if(!S||!r?.isRepo)return"Track this project with git first.";if(h.git.loading)return"Source control is busy.";if(r.files.length===0)return"There is nothing to publish.";if(w(t).length===0)return"Include at least one change.";if(!h.git.commitMessage.trim())return"Write a summary of the change first.";return e==="review"?jg():""}function v(){return(h.git.status?.files??[]).map((e)=>`${e.status}:${e.path}`).join("|")}function s_(){return _e()&&p().buildSite!==void 0}async function rR(){if(!s_()||h.publish.build.state==="running")return;let e=p().buildSite;if(!e)return;h.publish.build.state="running",h.publish.build.text="Building the site…",h.publish.build.for=v();try{let t=await e();if(t.errors.length>0)h.publish.build.state="failed",h.publish.build.text=`Built with ${t.errors.length} error(s): ${t.errors[0]}`;else h.publish.build.state="passed",h.publish.build.text=t.mode==="live"?`${t.routes} page(s) render. This host previews the working tree; it does not build.`:`Site builds: ${t.routes} page(s).`}catch(t){h.publish.build.state="failed",h.publish.build.text=`The site could not be built: ${te(t)}`}}function Hg(){let e=[],t=SS();if(e.push(t?{command:t.command,key:"deploy",state:t.state==="unknown"?"unknown":"todo",text:`${t.label}: ${t.detail}`}:{command:"",key:"deploy",state:"done",text:"Everything this project needs to ship is in place."}),s_()){let r=h.publish.build.for===v()||h.publish.build.state==="running";e.push(r&&h.publish.build.state!=="idle"?{command:"",key:"build",state:h.publish.build.state==="passed"?"done":h.publish.build.state==="failed"?"failed":"running",text:h.publish.build.text}:{command:"",key:"build",state:"unknown",text:"The site has not been built with these changes."})}return e}function sR(e){let t=e.filter((r)=>r.state!=="done");if(t.length===0)return"Checks passed: ready to publish.";return t.map((r)=>r.text).join(" · ")}function aR(){return h.publish.review.number>0?{number:h.publish.review.number,url:h.publish.review.url}:null}function R(e){if(!h.git.commitMessage)h.git.commitMessage=e}async function Ty(e,t={}){let r=t.includeAll??!1,i=Gf(e,r);if(i)return h.git.error=i,!1;let n=h.git.commitMessage.trim(),s=p();h.git.commitMessage="",h.git.loading=!0,h.git.error=null,await pO();let a=!1,o=!0;try{if(r){let l=w(!0).filter((m)=>!m.staged).map((m)=>m.path);if(l.length>0)await s.gitStage(l)}if(e==="review")await B(s,n,()=>{a=!0});else if(await s.gitCommit(n),a=!0,b())h.git.loading=!1,o=await d();else if(!wa()&&u()!=="")await s.gitPush();return await Ws(),o}catch(l){if(h.git.error=te(l),h.git.loading=!1,!a)R(n);return!1}}async function q(e,t,r){if(wa()){await e.gitCommit(t),r();let s=f();return s?{base:s,title:t}:{title:t}}let i=c(),n=y(t);return await e.gitCreateBranch(n),await e.gitCommit(t),r(),await e.gitPush({setUpstream:!0}),i?{base:i,head:n,title:t}:{head:n,title:t}}async function B(e,t,r){let i=e.createPullRequest;if(!i)throw Error(jg());let n=await i(await q(e,t,r));h.publish.review.number=n.number,h.publish.review.url=n.url,C.success(`Pull request #${n.number} opened for review.`,{detail:n.url,key:"publish.review",source:"Publish"})}
|
|
2
|
+
export{iR,jg,Ey,qf,oR,Gf,s_,rR,Hg,sR,aR,Ty};
|
|
3
|
+
|
|
4
|
+
//# debugId=CFBF8664A829941A64756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-a9k86nq6.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{gx,Mp,Pp,Fp,bx,Im,jd,Kb,jp,w$,lh,Dm,VA,ka}from"./studio-qs5fmhtj.js";import{p}from"./studio-9ndgd55w.js";import{ph}from"./studio-by8x0jvc.js";import{dv}from"./studio-ztppbam0.js";import{Ht,fn}from"./studio-a6e5fzve.js";import{Ne}from"./studio-ekzbgnjp.js";import{rh,Hb,Md,Bb,zb,sh}from"./studio-t6dqnnft.js";import{qw}from"./studio-0rg30pvs.js";import{jr}from"./studio-x2trkhk5.js";import{S}from"./studio-9ra9e7m4.js";import{n,Q,_,v,td}from"./studio-ywf9y1e2.js";function C(e,t){return new URL(`/node_modules/${e}`,t).href}function x(e){if(e===void 0)return!1;if(n(e))return!e.includes("${");if(Array.isArray(e))return e.every((t)=>x(t));if(v(e))return!("$ref"in e)&&!("$prototype"in e)&&!("$expression"in e)&&Object.values(e).every((t)=>x(t));return!0}function gS(e){let t=new Map;for(let[s,r]of Object.entries(e.state??{})){if(td(s)||!v(r)||!Array.isArray(r.examples))continue;let[o]=r.examples;if(x(o))t.set(s,o)}return t}var k={body:"body",root:":root"};function R(e,t,s,r,o=k){let l=[],a=(i,c)=>{let d={mediaQueries:t,scope:c,transposeValue:s};if(r)d.resolveValue=(m,g)=>r(m,g,c);for(let m of Im(i,d))l.push(m.text)},y={},h={},b=[],w=[];for(let[i,c]of Object.entries(e)){if(_(c)&&!Array.isArray(c)){if(i.startsWith("@"))b.push([i,c]);else if(!i.startsWith("--"))w.push([i,c]);continue}if(bx(i)||i.startsWith("@"))continue;if(i.startsWith("--")||i==="colorScheme"||i==="color-scheme")y[i]=c;else h[i]=c}a(y,o.root),a(h,o.body);for(let[i,c]of w)if(i.startsWith("&"))a({[i]:c},o.root);else a(c,i);for(let[i,c]of b){if(gx(i)||Mp(i)){a({[i]:c},null);continue}let d={},m={},g=[];for(let[u,f]of Object.entries(c)){if(_(f)&&!Array.isArray(f)){if(!u.startsWith("@"))g.push([u,f]);continue}if(u.startsWith("--"))d[u]=f;else m[u]=f}a({[i]:d},o.root),a({[i]:m},o.body);for(let[u,f]of g)a({[i]:f},u)}if(Object.values(t).some((i)=>Fp(i)!==null)&&!("colorScheme"in e))l.push(`${o.root} { color-scheme: light dark }`,`${o.root}:where([${Pp}="light"]) { color-scheme: light }`,`${o.root}:where([${Pp}="dark"]) { color-scheme: dark }`);return l.join(`
|
|
2
|
+
`)}var T={body:":host",root:":host"},P=new WeakMap,J=new WeakMap;function A(e){let t=e.replaceAll(/:root\b/g,":host").replaceAll(/(^|[\s,>+~(])(?:html|body)(?![\w-])/g,"$1:host").replaceAll(/:host(?:\s*>?\s*:host)+/g,":host");return t===e?null:t}function j(e){for(let t=0;t<e.cssRules.length;t+=1){let s=e.cssRules[t],r=s instanceof CSSStyleRule?A(s.selectorText):null;if(s instanceof CSSStyleRule&&r!==null){let l=`${r}${s.cssText.slice(s.cssText.indexOf("{"))}`;try{e.insertRule(l,t),e.deleteRule(t+1)}catch{}}let o=e.cssRules[t];if(o instanceof CSSGroupingRule)j(o)}}function D(e){let t=[];for(let s of e??[]){if(!_(s)||String(s.tagName).toLowerCase()!=="link")continue;let{href:r,rel:o}=s.attributes??{};if(n(r)&&r!==""&&n(o)&&o.split(/\s+/).includes("stylesheet"))t.push(r)}return t}async function M(e){let t=zb(e,"project.json");try{let s=await fetch(t);if(!s.ok)return null;let r=new URL(t,location.href).href,o=new CSSStyleSheet({baseURL:r});return o.replaceSync(await s.text()),j(o),o}catch{return null}}async function L(e){let s=(await Promise.all(D(e.$head).map((o)=>M(o)))).filter((o)=>o!==null),{style:r}=e;if(_(r)){let o=new CSSStyleSheet;o.replaceSync(R(r,e.$media??{},(l)=>l,void 0,T)),s.push(o)}return s}function E(){let e=S?.projectConfig;if(!e||!Q(globalThis.CSSStyleSheet))return Promise.resolve([]);let t=P.get(e);if(!t)t=L(e).then((s)=>(J.set(e,s),s)),P.set(e,t);return t}function KD(){let e=S?.projectConfig;return(e&&J.get(e))??[]}var H=150;function Sw(e=H){let t=new Map;function s(){for(let[r,o]of t){if(t.size<=e)break;t.delete(r),o.remove()}}return{clear(){for(let r of t.values())r.remove();t.clear()},get(r){let o=t.get(r);if(o!==void 0)t.delete(r),t.set(r,o);return o},has:(r)=>t.has(r),keys:()=>[...t.keys()],set(r,o){t.delete(r),t.set(r,o),s()},size:()=>t.size}}function O(e){let t=Md(S?.projectRoot);return URL.canParse(t)?new URL(e,t).href:location.href}async function N(e){try{let t=await p().readFile(e);jd(!0);let s=Bb(e,sh());await Ht();let r;if(fn(e))r=(await jr(e,t)).document;else r=JSON.parse(t);return await F(r,e,s)}catch{return null}}async function F(e,t,s){jd(!0),Kb(Hb());let r=await lh(e,{},O(t)),o=s&&{...s,versions:ph()};w$((l)=>dv(l,o));try{let l=ka(e,r);return l instanceof HTMLElement?l:null}finally{w$(null)}}async function W(e,t){let s=await RT(t);if(!s)return null;let r=gS(s);return await bS(s,t,r)?qw(e,r):null}async function RT(e){try{let t=JSON.parse(await p().readFile(e));return _(t)&&!Array.isArray(t)?t:null}catch{return null}}async function bS(e,t,s){let r=null;try{jd(!0),Kb(Hb());let o=await lh(e,{},O(t));for(let[y,h]of s)o[y]=h;let l=!1;Dm(()=>{l=!0});let{stop:a}=jp(()=>ka({...e,tagName:"div"},o));return r=a,!l}catch{return!1}finally{Dm(null),r?.()}}function V(e){return e.source!=="npm"&&(e.path?.endsWith(".json")??!1)}async function Cw(e,t){let s=t.get(e);if(s)return s;let r;try{VA((l)=>C(l,`${rh()}/`)),await E();let o=Ne.find((l)=>l.path===e);if(o&&V(o))r=await W(o,e);else r=o?await qw(o):await N(e)}catch{return}if(!r)return;return t.set(e,r),r}function bp(e){if(!Q(globalThis.IntersectionObserver))return{destroy(){},observe:(r)=>e(r),releaseDetached:()=>0};let t=new Set,s=new IntersectionObserver((r)=>{for(let o of r)if(o.isIntersecting)t.delete(o.target),s.unobserve(o.target),e(o.target)},{rootMargin:"200px"});return{destroy(){s.disconnect(),t.clear()},observe(r){if(t.has(r))return;t.add(r),s.observe(r)},releaseDetached(){let r=0;for(let o of t)if(!o.isConnected)t.delete(o),s.unobserve(o),r+=1;return r}}}
|
|
3
|
+
export{gS,KD,Sw,RT,bS,Cw,bp};
|
|
4
|
+
|
|
5
|
+
//# debugId=244C94931BEF298E64756E2164756E21
|
|
6
|
+
//# sourceMappingURL=studio-ae7a69jc.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{p,_e}from"./studio-9ndgd55w.js";import{Cs}from"./studio-fg4fj9ec.js";import{te}from"./studio-psh8mwnw.js";import{ge,ne,g,C}from"./studio-tfmhnwyr.js";import{wi,T,R,rt,xi}from"./studio-myb4mf0h.js";import{Wt,ln,go,tv}from"./studio-ztppbam0.js";import{Vs}from"./studio-9179bsm7.js";import{Xt}from"./studio-9ff0vqff.js";import{Sr}from"./studio-7q6jdd4h.js";import{Rp}from"./studio-t6dqnnft.js";import{tr}from"./studio-vtey9w98.js";import{yr,Yu,ES,vN,Tb,di,Fw,_N,Wl,IS,Qu,CN,Cp}from"./studio-0rg30pvs.js";import{wb,xb}from"./studio-x2trkhk5.js";import{yi}from"./studio-ry4789ng.js";import{hp,V_,yE,ob,wE,iw,ow,pD,_E,dm,rw,gD,SE,rb,bD,vD,yD,wD,xD,CE,_D}from"./studio-6rbaedw2.js";import{Ml}from"./studio-ge08zwpv.js";import{eS}from"./studio-s4fq9jht.js";import{ya}from"./studio-n4qq1n57.js";import{KD,Sw,Cw,bp}from"./studio-ae7a69jc.js";import{xp}from"./studio-732mw0g8.js";import{S,xn}from"./studio-9ra9e7m4.js";import{n,Q,_,v}from"./studio-ywf9y1e2.js";import{le}from"./studio-k5n4es74.js";function ee(e){return{contentType:null,draft:!1,layout:void 0,path:e}}function ue(e,t,a){let{contentType:r,layout:o}=IS(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("kkhp9ma7"),import("./file-ops-kkhp9ma7.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 Jg(){ae+=1,q=null,V=null}function fe(e){return re.add(e),()=>{re.delete(e)}}function Wy(e){return e?"true":"false"}function GR(e){return e.trim().toLowerCase()}function Yg(e,...t){return e===""||t.some((a)=>a.toLowerCase().includes(e))}function Sd(e){let t=e.replaceAll(/[-_]+/g," ").trim();return t===""?e:t.charAt(0).toUpperCase()+t.slice(1)}function ie(e){let t=Sd(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=tv(t,a);return Y(U(yr(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 Sd(i);let l=r.findLast((c)=>!o(c));return Sd(l??oe(t).replaceAll(/[[\].]/g,""))}function KR(e,t,a,r={}){let o=r.i18n??null,i=e.flatMap((u)=>Yu(u.path,r.extensions)?[{fact:u,route:yr(u.path)}]:[]).toSorted((u,m)=>ES(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:Wy(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:Sd(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 JR(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=Yg(t,i.label),o)a.push(i);continue}if(i.kind==="page")r=null;if(i.kind==="entry-page"&&o||Yg(t,i.label,i.detail,i.path)){if(r&&!o)a.push(r),o=!0;a.push(i)}}return a}function qk(e,t,a,r=null){return e.filter((o)=>o.endsWith(".json")).toSorted((o,i)=>o.localeCompare(i)).flatMap((o)=>{let i=Sd(oe(o));if(!Yg(a,i,o))return[];return[{detail:o===r?"default layout":"",key:o,label:i,path:o,selected:Wy(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(!Q(a))return null;let r=new a;return r.replaceSync(ze),he.set(e,r),r}function Vy(e,t){let a=e.shadowRoot??e.attachShadow({mode:"open"}),r=Be(e.ownerDocument);a.adoptedStyleSheets=[...KD(),...e.ownerDocument.adoptedStyleSheets,...r?[r]:[]],a.replaceChildren(t)}function Uy(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?xp(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?Wt(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===di?yr(e.path).urlPattern:"";default:{let r=wD(t);return r===null?"":a?.fields?.[r]??""}}}function xe(e,t,a,r){let o=Rp(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?tr(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}=vD(e,(c)=>t(c)?.date||SE(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):yD(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;vN(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:di,loading:!1,revision:0,views:{}});function Xa(e=Du()){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:di,kind:"pages",title:"Pages"}}function Du(){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??=_D(),M}function w(){y.revision+=1}function YR(e){y.collection=e,Xa(e),w(),xn("leftPanel")}function Gk(e,t=Du()){Xa(t).layout=e,w()}function $_(e,t=Du()){Xa(t).query=e,w()}function et(e,t=Du()){Xa(t).filter=e,w()}function I_(e,t=Du()){Xa(t).locale=e,w()}function Cd(){M=null,A=!1;for(let e of E.values())e.cache.clear();w()}function Kk(){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:te(r),key:ke,source:L,tier:"problem"})}finally{clearTimeout(a),y.loading=!1,w(),xn("leftPanel")}}async function Jk(){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 Yk(e,t){let a=W(e);return a!==null&&a.tabId===t.id&&a.wrap.isConnected&&a.surface.attached()}function Zk(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 eS({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 Cw(t,e.cache);if(!a||W(e.paneId)!==e)return;let r=e.slots.get(t);if(r?.isConnected&&!Uy(r))Vy(r,a)}finally{e.pendingPaths.delete(t)}}function Te(e,t,a){let r=e.cache.get(a);if(Uy(t))return;if(r){Vy(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=gD.has(Xa().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)pD(e.record.source,e.record.row);else if(e.collection===null||e.collection===di)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 xb(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),Sr(),Cd(),await I(),C.success(`Renamed to ${r}`)}catch(c){C.error(`Could not rename ${e.name}.`,{detail:te(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),Cd(),await I(),C.success(`Duplicated as ${o}`)}catch(l){C.error(`Could not duplicate ${e.name}.`,{detail:te(l),path:e.path,source:L})}}async function pt(e){if(!await wb(e))return;try{await p().deleteFile(e.path),Sr(),Cd(),await I(),C.success(`Deleted ${e.name}`)}catch(a){C.error(`Could not delete ${e.name}.`,{detail:te(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 ${Tb(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=rb(),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=Qu(e,Xa(e).locale);if(t)yi(t.path)}async function ft(e){let{addCollectionPage:t}=await (le("nmkqpjym"),import("./add-new-flow-nmkqpjym.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 ${Wt(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 R_(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=V_(o,c),s=d===null?"":ob(c[d]??""),u=wE(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=iw(e.key,R_(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=R_(di),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":Tb(m),title:u!==null&&r.has(u)?Y(`${ie(u)} page`,d,i):U(yr(d),d,i)}]}));return N(c)}function vt(e){return e.map((t)=>({file:t,route:yr(t.path)})).toSorted((t,a)=>ES(t.route,a.route)||t.file.path.localeCompare(a.file.path)).map(({file:t})=>t)}function Me(e){return ya(e)?.schema??_N(e)}function xt(e){let t=new Set,a=hp(e),r=yE(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=Xa(r.key),{layout:i}=o,l=_E(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=xD(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=_E(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=bD(l),pe=CE(r.key,{date:yE(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:dm.map((h)=>gt(h,rw[h],i===h)),localeOptions:[{label:"All languages",value:"all"},...K.map((h)=>({label:Wt(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:Qu(r.key,o.locale),Ee(),G||o.locale!==""?[]:CN(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 ZR(e,t){let{paneId:a,wrap:r}=e;if(Yk(a,t))return;Zk(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?Fw(s.key):null;if(u){yi(u);return}rt("collection.editInGrid",{name:s.key},L)},openFile:(s)=>{je(Re(s)??{collection:Du(),path:s})},openNew:()=>{let s=j(),{locale:u}=Xa(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:()=>{$_(""),I_("")},retry:()=>{Jk()},scrolled:()=>w(),scroller:(s)=>{if(o)o.scroller=s},search:(s)=>$_(s),setLayout:(s)=>Gk(s),setFilter:(s)=>et(s==="all"?"":s),setLocale:(s)=>I_(s==="all"?"":s)}),d=ge();o={cache:Sw(),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=Cp(()=>w()),u=ow(()=>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=Xa(Du());if(s.layout,s.query,s.locale,l(),!A&&!y.loading)I()})})}function XR(){y.collection=di,y.views={},y.loading=!1,M=null,A=!1,w()}
|
|
4
|
+
export{Jg,Wy,GR,Yg,Sd,KR,JR,qk,Vy,Uy,Xa,Du,YR,Gk,$_,I_,Cd,Kk,Jk,Yk,Zk,R_,ZR,XR};
|
|
5
|
+
|
|
6
|
+
//# debugId=9C85ABD3BFA326BA64756E2164756E21
|
|
7
|
+
//# sourceMappingURL=studio-aghsg0ds.js.map
|
|
@@ -2,7 +2,7 @@ var C=globalThis,O=(t)=>t,b=C.trustedTypes,j=b?b.createPolicy("lit-html",{create
|
|
|
2
2
|
\f\r](?:([^\\s"'>=/]+)([
|
|
3
3
|
\f\r]*=[
|
|
4
4
|
\f\r]*(?:[^
|
|
5
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),R=/'/g,V=/"/g,z=/^(?:script|style|textarea|title)$/i,E=(t)=>(e,...s)=>({_$litType$:t,strings:e,values:s}),
|
|
5
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),R=/'/g,V=/"/g,z=/^(?:script|style|textarea|title)$/i,E=(t)=>(e,...s)=>({_$litType$:t,strings:e,values:s}),Vr=E(1),J=E(2),K=E(3),Uc=Symbol.for("lit-noChange"),mt=Symbol.for("lit-nothing"),W=new WeakMap,u=g.createTreeWalker(g,129);function Z(t,e){if(!w(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return j!==void 0?j.createHTML(e):e}var k=(t,e)=>{let s=t.length-1,i=[],n,l=e===2?"<svg>":e===3?"<math>":"",r=y;for(let o=0;o<s;o++){let a=t[o],T,h,A=-1,_=0;for(;_<a.length&&(r.lastIndex=_,h=r.exec(a),h!==null);)_=r.lastIndex,r===y?h[1]==="!--"?r=D:h[1]!==void 0?r=L:h[2]!==void 0?(z.test(h[2])&&(n=RegExp("</"+h[2],"g")),r=p):h[3]!==void 0&&(r=p):r===p?h[0]===">"?(r=n??y,A=-1):h[1]===void 0?A=-2:(A=r.lastIndex-h[2].length,T=h[1],r=h[3]===void 0?p:h[3]==='"'?V:R):r===V||r===R?r=p:r===D||r===L?r=y:(r=p,n=void 0);let d=r===p&&t[o+1].startsWith("/>")?" ":"";l+=r===y?a+q:A>=0?(i.push(T),a.slice(0,A)+"$lit$"+a.slice(A)+c+d):a+c+(A===-2?o:d)}return[Z(t,l+(t[s]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]};class N{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,l=0,r=t.length-1,o=this.parts,[a,T]=k(t,e);if(this.el=N.createElement(a,s),u.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=u.nextNode())!==null&&o.length<r;){if(i.nodeType===1){if(i.hasAttributes())for(let h of i.getAttributeNames())if(h.endsWith("$lit$")){let A=T[l++],_=i.getAttribute(h).split(c),d=/([.?@])?(.*)/.exec(A);o.push({type:1,index:n,name:d[2],strings:_,ctor:d[1]==="."?I:d[1]==="?"?S:d[1]==="@"?P:v}),i.removeAttribute(h)}else h.startsWith(c)&&(o.push({type:6,index:n}),i.removeAttribute(h));if(z.test(i.tagName)){let h=i.textContent.split(c),A=h.length-1;if(A>0){i.textContent=b?b.emptyScript:"";for(let _=0;_<A;_++)i.append(h[_],x()),u.nextNode(),o.push({type:2,index:++n});i.append(h[A],x())}}}else if(i.nodeType===8)if(i.data===M)o.push({type:2,index:n});else{let h=-1;for(;(h=i.data.indexOf(c,h+1))!==-1;)o.push({type:7,index:n}),h+=c.length-1}n++}}static createElement(t,e){let s=g.createElement("template");return s.innerHTML=t,s}}function f(t,e,s=t,i){if(e===Uc)return e;let n=i!==void 0?s._$Co?.[i]:s._$Cl,l=H(e)?void 0:e._$litDirective$;return n?.constructor!==l&&(n?._$AO?.(!1),l===void 0?n=void 0:(n=new l(t),n._$AT(t,s,i)),i!==void 0?(s._$Co??=[])[i]=n:s._$Cl=n),n!==void 0&&(e=f(t,n._$AS(t,e.values),n,i)),e}class B{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??g).importNode(e,!0);u.currentNode=i;let n=u.nextNode(),l=0,r=0,o=s[0];for(;o!==void 0;){if(l===o.index){let a;o.type===2?a=new m(n,n.nextSibling,this,t):o.type===1?a=new o.ctor(n,o.name,o.strings,this,t):o.type===6&&(a=new U(n,this,t)),this._$AV.push(a),o=s[++r]}l!==o?.index&&(n=u.nextNode(),l++)}return u.currentNode=g,i}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class m{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=mt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=f(this,t,e),H(t)?t===mt||t==null||t===""?(this._$AH!==mt&&this._$AR(),this._$AH=mt):t!==this._$AH&&t!==Uc&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):F(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==mt&&H(this._$AH)?this._$AA.nextSibling.data=t:this.T(g.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=N.createElement(Z(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{let n=new B(i,this),l=n.u(this.options);n.p(e),this.T(l),this._$AH=n}}_$AC(t){let e=W.get(t.strings);return e===void 0&&W.set(t.strings,e=new N(t)),e}k(t){w(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,i=0;for(let n of t)i===e.length?e.push(s=new m(this.O(x()),this.O(x()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let s=O(t).nextSibling;O(t).remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}}class v{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=mt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=mt}_$AI(t,e=this,s,i){let n=this.strings,l=!1;if(n===void 0)t=f(this,t,e,0),l=!H(t)||t!==this._$AH&&t!==Uc,l&&(this._$AH=t);else{let r=t,o,a;for(t=n[0],o=0;o<n.length-1;o++)a=f(this,r[s+o],e,o),a===Uc&&(a=this._$AH[o]),l||=!H(a)||a!==this._$AH[o],a===mt?t=mt:t!==mt&&(t+=(a??"")+n[o+1]),this._$AH[o]=a}l&&!i&&this.j(t)}j(t){t===mt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class I extends v{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===mt?void 0:t}}class S extends v{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==mt)}}class P extends v{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=f(this,t,e,0)??mt)===Uc)return;let s=this._$AH,i=t===mt&&s!==mt||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==mt&&(s===mt||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class U{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){f(this,t)}}var b$={M:"$lit$",P:c,A:M,C:1,L:k,R:B,D:F,V:f,I:m,H:v,N:S,U:P,B:I,F:U},G=C.litHtmlPolyfillSupport;G?.(N,m),(C.litHtmlVersions??=[]).push("3.3.3");var io=(t,e,s)=>{let i=s?.renderBefore??e,n=i._$litPart$;if(n===void 0){let l=s?.renderBefore??null;i._$litPart$=n=new m(e.insertBefore(x(),l),l,void 0,s??{})}return n._$AI(t),n};export{Vr,Uc,mt,b$,io};
|
|
6
6
|
|
|
7
|
-
//# debugId=
|
|
8
|
-
//# sourceMappingURL=studio-
|
|
7
|
+
//# debugId=D04EC0442324C2E464756E2164756E21
|
|
8
|
+
//# sourceMappingURL=studio-ajw4k8hp.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{n,v}from"./studio-
|
|
2
|
-
export{
|
|
1
|
+
import{n,v}from"./studio-ywf9y1e2.js";var t="jx.collab.v1";function G_(o){if(!v(o))return{offer:[],refused:null};let{collab:s,detail:l,protocols:e}=o;if(s===!1){let r=n(l)?l.trim():"";return{offer:[],refused:r||"This server has collaboration disabled."}}if(!Array.isArray(e)||e.length===0)return{offer:[],refused:null};if(e.includes(t))return{offer:[t],refused:null};let i=e.filter((r)=>n(r)).join(", ")||"none";return{offer:[],refused:`This server speaks collab envelope ${i}; this editor speaks ${t}.`}}
|
|
2
|
+
export{G_};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
5
|
-
//# sourceMappingURL=studio-
|
|
4
|
+
//# debugId=C27986DCFFD950FF64756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-apapy17g.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{Si}from"./studio-
|
|
2
|
-
export{
|
|
1
|
+
import{Si}from"./studio-8pne0rx4.js";import{Da}from"./studio-tfmhnwyr.js";import{n}from"./studio-ywf9y1e2.js";var h=new Set([".apng",".avif",".bmp",".gif",".ico",".jpeg",".jpg",".png",".svg",".webp",".eot",".otf",".ttf",".woff",".woff2",".m4v",".mov",".mp4",".ogv",".webm",".aac",".flac",".m4a",".mp3",".oga",".ogg",".opus",".wav"]);function u(e){let r=e.lastIndexOf("/"),t=e.lastIndexOf(".");return t>r+1&&h.has(e.slice(t).toLowerCase())}var s=new Map,c=0,m=0,d=new Map,g=new Map,l=null,v=Object.freeze({}),L$=Da(0);function p(){l=null,L$.value+=1}function y(){return c}function x(e,r){let t=d.get(e);if(t!==void 0&&t>r)return!0;for(let[i,o]of g)if(o>r&&e.startsWith(i))return!0;return!1}function w(e,r){if(r<m)return;let t=!1;for(let i of e){if(i.type!=="file")continue;let o=Si(i.path);if(o===""||x(o,r))continue;let f=n(i.version)&&i.version!==""?i.version:null,a=s.get(o);if(f===null){if(a===void 0)continue;s.delete(o)}else if(a===f)continue;else s.set(o,f);if(u(o))t=!0}if(t)p()}async function us(e){let r=y(),t=await e();return w(t,r),t}function zd(e,r=[]){c+=1;let t=!1;for(let i of e){let o=Si(i);if(o==="")continue;if(d.set(o,c),s.delete(o)&&u(o))t=!0}for(let i of r){let o=Si(i);if(o==="")continue;let f=`${o}/`;g.set(f,c);for(let a of s.keys())if(a.startsWith(f)){if(s.delete(a),u(a))t=!0}}if(t)p()}function QA(e){return s.get(Si(e))}function ph(){if(l)return l;let e={},r=!1;for(let[t,i]of s)if(u(t))e[t]=i,r=!0;return l=r?Object.freeze(e):v,l}function $$(){let e=ph()!==v;if(s.clear(),d.clear(),g.clear(),c+=1,m=c,e)p()}function Am(){$$()}
|
|
2
|
+
export{L$,us,zd,QA,ph,$$,Am};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
5
|
-
//# sourceMappingURL=studio-
|
|
4
|
+
//# debugId=4E9941C6BED4F96E64756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-by8x0jvc.js.map
|