@jxsuite/studio 10.0.0 → 10.2.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-j56903f1.js → 2020-bx702wqa.js} +3 -3
- package/dist/chunks/adapter-pp011m5x.js +4 -0
- package/dist/chunks/add-new-flow-ecqmzz76.js +4 -0
- package/dist/chunks/cf-account-picker-c07znkqt.js +4 -0
- package/dist/chunks/cf-settings-0v2bmqy0.js +4 -0
- package/dist/chunks/components-yn0dn2pq.js +4 -0
- package/dist/chunks/content-source-g0j41yy6.js +4 -0
- package/dist/chunks/{convert-to-repeater-fhdwyg14.js → convert-to-repeater-sbjk7tgn.js} +3 -3
- package/dist/chunks/editor-xz02jeh1.js +4 -0
- package/dist/chunks/entry-commands-kmt02crp.js +4 -0
- package/dist/chunks/extension-sections-0rprf12d.js +4 -0
- package/dist/chunks/file-ops-mexj5qed.js +4 -0
- package/dist/chunks/files-b2tcppdd.js +4 -0
- package/dist/chunks/format-host-btsevv0c.js +4 -0
- package/dist/chunks/fs-events-r0apejva.js +4 -0
- package/dist/chunks/grid-open-n2a8xkht.js +4 -0
- package/dist/chunks/{grid-view-ka55z38f.js → grid-view-tghcwrrt.js} +12 -12
- package/dist/chunks/iframe-host-gx0ypyh3.js +4 -0
- package/dist/chunks/index-bs4k9tr6.js +4 -0
- package/dist/chunks/{index-qb98xhse.js → index-vr006kbt.js} +3 -3
- package/dist/chunks/{javascript-ces13wny.js → javascript-z1g3s9fd.js} +2 -2
- package/dist/chunks/{jsonMode-6md16d4v.js → jsonMode-7szwg8c4.js} +5 -5
- package/dist/chunks/jx-validate-ymf10teh.js +4 -0
- package/dist/chunks/layers-p9nfya38.js +4 -0
- package/dist/chunks/layers-panel-tt1hzhhf.js +4 -0
- package/dist/chunks/lit-html-x18n2sfz.js +4 -0
- package/dist/chunks/media-library-0n45gv8r.js +4 -0
- package/dist/chunks/media-picker-s09at95z.js +4 -0
- package/dist/chunks/{monaco-binding-p8j80s4w.js → monaco-binding-v42w9c1v.js} +3 -3
- package/dist/chunks/monaco-buffer-een2ea0v.js +4 -0
- package/dist/chunks/{monaco-setup-wasktzfg.js → monaco-setup-7bffxd6v.js} +3 -3
- package/dist/chunks/notify-qwb8radt.js +4 -0
- package/dist/chunks/parse-v77xtwv7.js +4 -0
- package/dist/chunks/platform-8jnez0wr.js +4 -0
- package/dist/chunks/publish-panel-aysnj611.js +4 -0
- package/dist/chunks/{publish-quick-vr695j26.js → publish-quick-kpbqs9mz.js} +3 -3
- package/dist/chunks/publish-workspace-nd0a8q99.js +4 -0
- package/dist/chunks/quick-search-vg0jkhk2.js +4 -0
- package/dist/chunks/references-a7v6a0e2.js +4 -0
- package/dist/chunks/right-panel-cvk1vxx5.js +4 -0
- package/dist/chunks/source-control-fsqzc6he.js +4 -0
- package/dist/chunks/studio-05jfwbmf.js +5 -0
- package/dist/chunks/{studio-hy4ye0dx.js → studio-0q5jwddh.js} +7 -7
- package/dist/chunks/{studio-jttyqrmh.js → studio-0w2dr0q8.js} +4 -4
- package/dist/chunks/{studio-xkxetm65.js → studio-1tzpds97.js} +5 -5
- package/dist/chunks/{studio-m48v13s3.js → studio-216b27sv.js} +3 -3
- package/dist/chunks/studio-2ejhqns4.js +5 -0
- package/dist/chunks/studio-2r90cts3.js +16 -0
- package/dist/chunks/{studio-h310mbqm.js → studio-399a25za.js} +4 -4
- package/dist/chunks/studio-399xknkb.js +6 -0
- package/dist/chunks/{studio-wxhy1yh7.js → studio-43y04qck.js} +4 -4
- package/dist/chunks/{studio-06j4en5h.js → studio-4g8yb6jn.js} +2 -2
- package/dist/chunks/{studio-jw0q5j6k.js → studio-4jhw38b2.js} +4 -4
- package/dist/chunks/{studio-3v5cagy9.js → studio-4ncmwqw5.js} +4 -4
- package/dist/chunks/studio-5atwjgkj.js +7 -0
- package/dist/chunks/{studio-gr36vnte.js → studio-5frqk7c0.js} +4 -4
- package/dist/chunks/{studio-9dz76yqc.js → studio-646nn2ys.js} +5 -5
- package/dist/chunks/{studio-tj2s0tks.js → studio-6cwj6xrx.js} +4 -4
- package/dist/chunks/studio-6hzdjfv0.js +5 -0
- package/dist/chunks/{studio-hcsba201.js → studio-71m92v9s.js} +7 -7
- package/dist/chunks/{studio-3c8pp7pb.js → studio-75kcdbsk.js} +4 -4
- package/dist/chunks/{studio-gwrhcrss.js → studio-78pywnp2.js} +5 -5
- package/dist/chunks/{studio-9cxmp61c.js → studio-86r8hp7r.js} +5 -5
- package/dist/chunks/studio-886t6ztg.js +5 -0
- package/dist/chunks/studio-8wnvtr4z.js +5 -0
- package/dist/chunks/studio-8z66jk4z.js +5 -0
- package/dist/chunks/{studio-ajw4k8hp.js → studio-9rbe2xpw.js} +3 -3
- package/dist/chunks/{studio-y26hx9re.js → studio-awxwjawq.js} +4 -4
- package/dist/chunks/studio-b2qpt0xy.js +14 -0
- package/dist/chunks/{studio-dx73md4n.js → studio-bvs9kpst.js} +7 -7
- package/dist/chunks/studio-c71806xz.js +7 -0
- package/dist/chunks/{studio-7dzyz9n8.js → studio-cbwks69x.js} +144 -144
- package/dist/chunks/studio-cg1bfyhf.js +9 -0
- package/dist/chunks/studio-cg710sk9.js +5 -0
- package/dist/chunks/studio-cw0wb9qk.js +7 -0
- package/dist/chunks/studio-cyheys7k.js +5 -0
- package/dist/chunks/studio-ea5m9kg5.js +5 -0
- package/dist/chunks/{studio-ry81j4q1.js → studio-ea74s8c1.js} +4 -4
- package/dist/chunks/{studio-xdpz9rpe.js → studio-efdxjwyp.js} +34 -34
- package/dist/chunks/{studio-agyvzfm4.js → studio-egmw2837.js} +4 -4
- package/dist/chunks/{studio-5tzgq6fx.js → studio-er5f383a.js} +4 -4
- package/dist/chunks/studio-f746039f.js +5 -0
- package/dist/chunks/studio-fmdymd9v.js +5 -0
- package/dist/chunks/studio-gcm12z00.js +6 -0
- package/dist/chunks/{studio-vswcpzk7.js → studio-gj98m8gy.js} +5 -5
- package/dist/chunks/{studio-yg3djpnm.js → studio-hasbgjah.js} +4 -4
- package/dist/chunks/studio-hhp4x8xf.js +6 -0
- package/dist/chunks/{studio-3w35qvay.js → studio-hz5n7x27.js} +4 -4
- package/dist/chunks/{studio-7xag4na8.js → studio-j3d2fjqz.js} +4 -4
- package/dist/chunks/studio-jeraxdgv.js +7 -0
- package/dist/chunks/studio-jvgek9xt.js +5 -0
- package/dist/chunks/studio-jws1a87n.js +5 -0
- package/dist/chunks/studio-k2sz13zg.js +5 -0
- package/dist/chunks/studio-k3m4jkdk.js +5 -0
- package/dist/chunks/{studio-r17asgs0.js → studio-kg1abnz0.js} +4 -4
- package/dist/chunks/{studio-s0fg2wav.js → studio-kg5ya5r2.js} +4 -4
- package/dist/chunks/studio-khwbgrtg.js +5 -0
- package/dist/chunks/studio-mx6wzh25.js +5 -0
- package/dist/chunks/studio-mxs3ar9t.js +5 -0
- package/dist/chunks/studio-nm4szey4.js +5 -0
- package/dist/chunks/studio-nqxqf8p2.js +4 -0
- package/dist/chunks/{studio-h5tpz5ke.js → studio-pjtntksy.js} +4 -4
- package/dist/chunks/studio-qh8berdz.js +5 -0
- package/dist/chunks/studio-qn7z4krm.js +5 -0
- package/dist/chunks/studio-qyed0ah6.js +5 -0
- package/dist/chunks/{studio-x97ay0v4.js → studio-r4bcdwhq.js} +4 -4
- package/dist/chunks/{studio-wxdcd42g.js → studio-r7pf0rkv.js} +6 -6
- package/dist/chunks/studio-rtfnhrdg.js +5 -0
- package/dist/chunks/{studio-fy7jzj9j.js → studio-rzqaz21g.js} +4 -4
- package/dist/chunks/studio-s5tzw84t.js +5 -0
- package/dist/chunks/{studio-1e8dw2w2.js → studio-sevbc3xv.js} +4 -4
- package/dist/chunks/{studio-ewarnzm4.js → studio-sxdb9h3q.js} +6 -6
- package/dist/chunks/studio-t51y8v1d.js +5 -0
- package/dist/chunks/{studio-k3bcy02e.js → studio-t98vq4r6.js} +4 -4
- package/dist/chunks/studio-th7z3fg7.js +5 -0
- package/dist/chunks/studio-tsxpqvh0.js +6 -0
- package/dist/chunks/{studio-396srjbk.js → studio-v1yascv2.js} +4 -4
- package/dist/chunks/{studio-ekgtrndg.js → studio-wc6za3zs.js} +4 -4
- package/dist/chunks/{studio-ndskgqef.js → studio-wxq6v5sv.js} +4 -4
- package/dist/chunks/{studio-4kzbrr5t.js → studio-y60sts62.js} +3 -3
- package/dist/chunks/studio-ybnwymxw.js +5 -0
- package/dist/chunks/studio-zndrqawb.js +5 -0
- package/dist/chunks/studio-zwaxn5s2.js +5 -0
- package/dist/chunks/{tsMode-h6tkz0ea.js → tsMode-f54j66ym.js} +5 -5
- package/dist/chunks/workspace-home-x1787wpv.js +4 -0
- package/dist/chunks/workspace-zpe1np43.js +4 -0
- package/dist/chunks/{ws-client-e951my95.js → ws-client-e8kj684q.js} +3 -3
- package/dist/manifest.json +76 -75
- package/dist/studio.js +83 -81
- package/package.json +4 -4
- package/src/browse/library-model.ts +56 -23
- package/src/commands/context.ts +1 -0
- package/src/editor/shortcuts.ts +3 -0
- package/src/panels/data-grid.ts +0 -4
- package/src/panels/settings-menu.ts +3 -3
- package/src/panels/settings-pane.ts +42 -56
- package/src/platform-errors.ts +17 -1
- package/src/platforms/cloud.ts +14 -0
- package/src/publish/publish-changes.ts +136 -4
- package/src/services/ai-import-tools.ts +6 -3
- package/src/services/ai-models.ts +65 -11
- package/src/services/ai-settings.ts +45 -5
- package/src/services/document-assistant.ts +5 -2
- package/src/services/settings/definitions.ts +19 -0
- package/src/settings/contributed-section.ts +16 -7
- package/src/settings/css-vars-editor.ts +4 -4
- package/src/settings/general-settings.ts +1 -4
- package/src/settings/preferences-accounts.ts +2 -2
- package/src/settings/preferences-dialog.ts +4 -2
- package/src/settings/project-sections.ts +1 -1
- package/src/settings/section-registry.ts +5 -4
- package/src/settings/settings-document.ts +33 -24
- package/src/settings/settings-workspace.ts +205 -0
- package/src/shell.ts +31 -6
- package/src/surfaces/ai-credentials-form.json +59 -5
- package/src/surfaces/ai-credentials-form.ts +15 -2
- package/src/surfaces/commandbar.ts +7 -3
- package/src/surfaces/settings-contributed.json +4 -4
- package/src/surfaces/settings-contributed.ts +2 -2
- package/src/surfaces/settings-pane.json +262 -180
- package/src/surfaces/settings-pane.ts +63 -14
- package/src/types.ts +14 -0
- package/src/ui/ai-credentials-form.ts +128 -11
- package/src/ui/regions.ts +5 -5
- package/src/workspace/tab-workspace.ts +3 -2
- package/src/workspace/workspace-home.ts +18 -4
- package/src/workspace/workspace-ids.ts +40 -7
- package/dist/chunks/adapter-wc5zvg9a.js +0 -4
- package/dist/chunks/add-new-flow-snx1s4b0.js +0 -4
- package/dist/chunks/cf-account-picker-xyqw0jex.js +0 -4
- package/dist/chunks/cf-settings-hp1pjm0n.js +0 -4
- package/dist/chunks/components-nkwphrx3.js +0 -4
- package/dist/chunks/content-source-6a253wmk.js +0 -4
- package/dist/chunks/editor-wqrc68ca.js +0 -4
- package/dist/chunks/entry-commands-nef0wrmp.js +0 -4
- package/dist/chunks/extension-sections-8ez2rrk8.js +0 -4
- package/dist/chunks/file-ops-y3w71k1n.js +0 -4
- package/dist/chunks/files-de90apn9.js +0 -4
- package/dist/chunks/format-host-zfjz4rzm.js +0 -4
- package/dist/chunks/fs-events-77c0mr0x.js +0 -4
- package/dist/chunks/grid-open-4n4fjfpf.js +0 -4
- package/dist/chunks/iframe-host-na2mywz4.js +0 -4
- package/dist/chunks/index-ewmgdb7c.js +0 -4
- package/dist/chunks/jx-validate-b309c020.js +0 -4
- package/dist/chunks/layers-8rn8y6qv.js +0 -4
- package/dist/chunks/layers-panel-eyah7h9z.js +0 -4
- package/dist/chunks/lit-html-wyqw04y2.js +0 -4
- package/dist/chunks/media-library-gs3np47y.js +0 -4
- package/dist/chunks/media-picker-tt7dk4tb.js +0 -4
- package/dist/chunks/monaco-buffer-wsf6cmnq.js +0 -4
- package/dist/chunks/notify-qwst108r.js +0 -4
- package/dist/chunks/parse-n8dfxnqf.js +0 -4
- package/dist/chunks/platform-c16mqvmp.js +0 -4
- package/dist/chunks/publish-panel-d34bhvwj.js +0 -4
- package/dist/chunks/publish-workspace-2yr60mt4.js +0 -4
- package/dist/chunks/quick-search-e6xsdv0d.js +0 -4
- package/dist/chunks/references-gsj6trdv.js +0 -4
- package/dist/chunks/right-panel-33jv1knc.js +0 -4
- package/dist/chunks/source-control-bj9bejjv.js +0 -4
- package/dist/chunks/studio-03mqh8ax.js +0 -5
- package/dist/chunks/studio-0ydxv2mr.js +0 -7
- package/dist/chunks/studio-2hsqbq7b.js +0 -7
- package/dist/chunks/studio-2j86y34y.js +0 -6
- package/dist/chunks/studio-2ks6ka4g.js +0 -5
- package/dist/chunks/studio-34jrz12k.js +0 -5
- package/dist/chunks/studio-35vrtpdq.js +0 -5
- package/dist/chunks/studio-38g0jdz7.js +0 -5
- package/dist/chunks/studio-3zge48z4.js +0 -7
- package/dist/chunks/studio-45gyxpcq.js +0 -5
- package/dist/chunks/studio-5wzdy1jc.js +0 -16
- package/dist/chunks/studio-732mw0g8.js +0 -5
- package/dist/chunks/studio-771k2n12.js +0 -5
- package/dist/chunks/studio-88bmt9rh.js +0 -5
- package/dist/chunks/studio-c1pxszat.js +0 -5
- package/dist/chunks/studio-cpkamjdn.js +0 -14
- package/dist/chunks/studio-d038kqbs.js +0 -5
- package/dist/chunks/studio-d83m0wyq.js +0 -5
- package/dist/chunks/studio-dbxv7w4s.js +0 -5
- package/dist/chunks/studio-de1s2x9v.js +0 -5
- package/dist/chunks/studio-epenqmvk.js +0 -7
- package/dist/chunks/studio-et2q4s8n.js +0 -5
- package/dist/chunks/studio-h7weqf2q.js +0 -5
- package/dist/chunks/studio-hwejq03c.js +0 -5
- package/dist/chunks/studio-k3a8rp3d.js +0 -5
- package/dist/chunks/studio-p1n2xjda.js +0 -5
- package/dist/chunks/studio-pgm83a2f.js +0 -6
- package/dist/chunks/studio-pqqq6v85.js +0 -5
- package/dist/chunks/studio-psh8mwnw.js +0 -4
- package/dist/chunks/studio-rzg8hnkf.js +0 -5
- package/dist/chunks/studio-tyw7tk0x.js +0 -5
- package/dist/chunks/studio-v9ywz2se.js +0 -6
- package/dist/chunks/studio-vzgmyt0v.js +0 -5
- package/dist/chunks/studio-x08a3m0a.js +0 -5
- package/dist/chunks/studio-x3mjr5cc.js +0 -5
- package/dist/chunks/studio-xh683qzy.js +0 -5
- package/dist/chunks/studio-yx8hzqja.js +0 -5
- package/dist/chunks/studio-zg16eeq1.js +0 -5
- package/dist/chunks/studio-zgx7svjd.js +0 -9
- package/dist/chunks/studio-zkq3r91p.js +0 -5
- package/dist/chunks/workspace-home-zkkrxq3r.js +0 -4
- package/dist/chunks/workspace-tdqqjqaa.js +0 -4
- package/src/settings/settings-dialog.ts +0 -192
- package/src/surfaces/settings-dialog.json +0 -51
- package/src/surfaces/settings-dialog.ts +0 -169
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{te}from"./studio-psh8mwnw.js";import{p}from"./studio-03mqh8ax.js";import{g,C}from"./studio-4kzbrr5t.js";import"./studio-ajw4k8hp.js";import{Ot,Nt,dh,ae}from"./studio-cpkamjdn.js";import"./studio-ry81j4q1.js";import{Ue,ft,T,R,Yt,rt,tt}from"./studio-jttyqrmh.js";import{Ht,Na,lr,Aa}from"./studio-3w35qvay.js";import{Pn,Vt,ln,go}from"./studio-vzgmyt0v.js";import"./studio-x08a3m0a.js";import{sS}from"./studio-wxdcd42g.js";import"./studio-de1s2x9v.js";import"./studio-k3bcy02e.js";import"./studio-h310mbqm.js";import"./studio-h7weqf2q.js";import"./studio-771k2n12.js";import{Co,Gl}from"./studio-5wzdy1jc.js";import"./studio-2hsqbq7b.js";import"./studio-hy4ye0dx.js";import"./studio-9cxmp61c.js";import"./studio-x3mjr5cc.js";import{zc,_a,Sa}from"./studio-34jrz12k.js";import{Zu,$b}from"./studio-pqqq6v85.js";import{Ne,Mb}from"./studio-1e8dw2w2.js";import"./studio-ewarnzm4.js";import"./studio-c1pxszat.js";import"./studio-hwejq03c.js";import"./studio-2ks6ka4g.js";import"./studio-ndskgqef.js";import"./studio-epenqmvk.js";import{K_,OE,fw,X_,yi}from"./studio-3zge48z4.js";import"./studio-x97ay0v4.js";import"./studio-jw0q5j6k.js";import"./studio-fy7jzj9j.js";import"./studio-k1wvtp03.js";import{lm}from"./studio-zg16eeq1.js";import"./studio-agyvzfm4.js";import"./studio-zgx7svjd.js";import"./studio-wxhy1yh7.js";import{tE,Ky}from"./studio-vswcpzk7.js";import{nb,nw,Hs,$c,P_,sm,iw,F_,hE,Qa,j_,Mu,H_,cD,pE,am,ib,fE,mE,gE,dD,uD,B_}from"./studio-rzg8hnkf.js";import{Jg}from"./studio-396srjbk.js";import{Yg,Sd,Cd}from"./studio-0ydxv2mr.js";import{ew,cE}from"./studio-d83m0wyq.js";import{Ml}from"./studio-dbxv7w4s.js";import"./studio-k3a8rp3d.js";import{qE,vw}from"./studio-d038kqbs.js";import{as}from"./studio-s0fg2wav.js";import"./studio-pgm83a2f.js";import"./studio-gwrhcrss.js";import"./studio-gr36vnte.js";import{S,xn}from"./studio-45gyxpcq.js";import{n,v}from"./studio-zkq3r91p.js";var z={$schema:"https://jxsuite.com/schema/v1",$id:"StudioAddNew",$description:"Add new: the one dialog that creates a page, a collection, a template, a component, a collection entry or an upload (`specs/studio.md` §9.1.1). One `jx-dialog`, so the platform owns modality, Escape, the backdrop and focus restoration. The kinds run down the left as a radiogroup and the chosen kind's name and options fill the right; the line above the buttons is the derived result, the same `deriveCreation` the write performs, so what it says is what is written. Nothing here composes a path, judges a name or knows a format: `create/add-new-flow.ts` keeps every decision and hands this document rows that are already strings, flags that are already booleans and a refusal that is already a sentence.",tagName:"jx-dialog",$props:{headline:"Add new",confirmLabel:{$ref:"#/state/cta"},confirmDisabled:{$ref:"#/state/blocked"},cancelLabel:"Cancel",size:"lg"},attributes:{part:"add-new","data-kind":"${state.kind}"},onconfirm:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/confirm"},value:[]}]},oncancel:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},ondragover:{$prototype:"Function",body:[{preventDefault:!0}]},ondrop:{$prototype:"Function",body:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/drop"},value:[{$ref:"event#/dataTransfer/files"}]}]},style:{$description:"The board's two columns in the kit's scale. The kinds take a fixed gutter so the right side does not move under the reader as they switch kinds, and the options column scrolls on its own so a long template list never pushes the result line and the buttons off the dialog. No part here is named `field`, `label`, `body`, `error`, `text` or `actions`: the kit is light DOM, and `jx-textfield`, `jx-select` and `jx-dialog` each draw internal nodes under those names inside this same tree.",'& [part="sheet"]':{display:"flex",gap:"var(--jx-space-5)",minHeight:"360px"},'& [part="kinds-column"]':{flex:"0 0 208px",display:"flex",flexDirection:"column",gap:"var(--jx-space-3)",borderRight:"1px solid var(--border)",paddingRight:"var(--jx-space-3)"},'& [part="kinds"]':{display:"flex",flexDirection:"column",alignItems:"stretch",gap:"var(--jx-space-1)"},'& [part="kind"]':{display:"block"},'& [part="kind"] > [part="control"]':{$description:"A kind is a row with its own two lines, so the button's box stretches across the gutter and starts its content at the left edge rather than centring an icon.",width:"100%",height:"auto",justifyContent:"flex-start",alignItems:"flex-start",textAlign:"start",padding:"var(--jx-space-2) var(--jx-space-3)",gap:"var(--jx-space-3)"},'& [part="kind-text"]':{display:"flex",flexDirection:"column",gap:"2px"},'& [part="kind-name"]':{fontSize:"var(--jx-text-md)",color:"var(--fg)"},'& [part="kind-hint"], & [part="choice-note"]':{fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)",whiteSpace:"normal"},'& [part="chord-note"], & [part="note"], & [part="kind-intro"], & [part="drop-summary"]':{margin:"0",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="chord-note"]':{marginTop:"auto"},'& [part="detail"]':{flex:"1",minWidth:"0",display:"flex",flexDirection:"column",gap:"var(--jx-space-4)",maxHeight:"60vh",overflowY:"auto"},'& [part="options"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-3)"},'& [part="name-slot"], & [part="options-slot"], & [part="url-slot"], & [part="own-page-slot"], & [part="copy-slot"], & [part="locale-slot"], & [part="localized-slot"]':{$description:"Branch hosts are structure rather than layout: `display: contents` puts what they carry straight into the column, so one gap rule spaces every row whether it is drawn or not.",display:"contents"},'& [part="group-label"]':{margin:"0",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="url-row"], & [part="pattern-row"]':{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"var(--jx-space-2)"},'& [part="url-label"]':{fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="route"], & [part="pattern"]':{fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)",color:"var(--fg)"},'& [part="start-row"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-2)"},'& [part="start-from"], & [part="wrap-in"], & [part="component-start"]':{display:"flex",flexWrap:"wrap",gap:"var(--jx-space-2)"},'& [part="choice-card"] > [part="control"]':{$description:"A choice is a card with a name and a note, as the board draws it: its own two lines inside one radio, so the reader hears one name and sees both.",minWidth:"132px",height:"auto",flexDirection:"column",alignItems:"flex-start",textAlign:"start",padding:"var(--jx-space-2) var(--jx-space-3)",gap:"2px"},'& [part="choice-name"]':{display:"block",fontSize:"var(--jx-text-md)",color:"var(--fg)"},'& [part="choice-note"]':{display:"block"},'& [part="presets"]':{display:"flex",flexWrap:"wrap",gap:"var(--jx-space-2)"},'& [part="drop"]':{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"var(--jx-space-2)",minHeight:"200px",padding:"var(--jx-space-5)",border:"1px dashed var(--border)",borderRadius:"var(--radius)",textAlign:"center"},'& [part="drop"][data-drop="true"]':{borderColor:"var(--accent)",background:"var(--accent-10)"},'& [part="drop-title"]':{margin:"0",fontSize:"var(--jx-text-md)",color:"var(--fg)"},'& [part="browse"]':{display:"inline-flex",alignItems:"center",gap:"var(--jx-space-2)",padding:"var(--jx-space-1) var(--jx-space-3)",border:"1px solid var(--border)",borderRadius:"var(--radius)",color:"var(--fg)",cursor:"pointer"},'& [part="browse"]:focus-within':{outline:"var(--jx-focus-ring)",outlineOffset:"2px"},'& [part="browse-input"]':{$description:"Visually hidden, never `display: none`: the input is the control, and a hidden-from-layout one cannot take focus from the keyboard. The label around it is what is drawn and what is clicked.",position:"absolute",width:"1px",height:"1px",opacity:"0",overflow:"hidden"},'& [part="saved"]':{margin:"0",paddingTop:"var(--jx-space-3)",borderTop:"1px solid var(--border)",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)",overflowWrap:"anywhere"}},children:[{tagName:"div",attributes:{part:"sheet"},children:[{tagName:"div",attributes:{part:"kinds-column"},children:[{tagName:"jx-action-group",attributes:{part:"kinds"},$props:{selects:"single",label:"What to create",orientation:"vertical",compact:!1},children:[{$prototype:"Array",items:{$ref:"#/state/kinds"},key:{$ref:"$map/item/id"},map:{tagName:"jx-action-button",attributes:{part:"kind","data-kind":"${$map.item.id}"},$props:{label:{$ref:"$map/item/label"},icon:{$ref:"$map/item/icon"},checked:{$ref:"$map/item/checked"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickKind"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",attributes:{part:"kind-text"},children:[{tagName:"span",attributes:{part:"kind-name"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"kind-hint"},textContent:"${$map.item.hint}"}]}]}}]},{tagName:"p",attributes:{part:"chord-note"},textContent:"${state.chordNote}"}]},{tagName:"section",attributes:{part:"detail","aria-label":"${state.kindLabel}"},children:[{tagName:"p",attributes:{part:"kind-intro"},textContent:"${state.kindHint}"},{tagName:"div",attributes:{part:"name-slot",role:"none"},$switch:{$ref:"#/state/named"},cases:{true:{tagName:"jx-field",attributes:{part:"name-row"},$props:{span:!0,label:{$ref:"#/state/nameLabel"},invalid:{$ref:"#/state/invalid"}},children:[{tagName:"jx-textfield",attributes:{part:"name"},$props:{value:{$ref:"#/state/name"},placeholder:{$ref:"#/state/placeholder"},invalid:{$ref:"#/state/invalid"},error:{$ref:"#/state/error"},required:!0,autocomplete:"off"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setName"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/confirm"},value:[]}]}}]}}]}}},{tagName:"div",attributes:{part:"options-slot",role:"none"},$switch:{$ref:"#/state/kind"},cases:{page:{tagName:"div",attributes:{part:"options",role:"none"},children:[{tagName:"div",attributes:{part:"locale-slot",role:"none"},$switch:{$ref:"#/state/localeShown"},cases:{true:{tagName:"jx-field",attributes:{part:"locale-row"},$props:{span:!0,label:"Language"},children:[{tagName:"jx-select",attributes:{part:"locale"},$props:{size:"sm",label:"Language",options:{$ref:"#/state/localeOptions"},value:{$ref:"#/state/locale"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickLocale"},value:[{$ref:"event#/target/value"}]}]}}]}}},{tagName:"div",attributes:{part:"url-row"},children:[{tagName:"span",attributes:{part:"url-label"},textContent:"URL"},{tagName:"code",attributes:{part:"route"},textContent:"${state.route}"},{tagName:"jx-action-button",attributes:{part:"edit-url"},$props:{label:"Edit URL",toggles:!0,selected:{$ref:"#/state/editingUrl"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/toggleUrl"},value:[]}]},children:[{tagName:"span",textContent:"Edit"}]}]},{tagName:"div",attributes:{part:"url-slot",role:"none"},$switch:{$ref:"#/state/editingUrl"},cases:{true:{tagName:"jx-field",attributes:{part:"url-row-field"},$props:{span:!0,label:"URL"},children:[{tagName:"jx-textfield",attributes:{part:"url"},$props:{size:"sm",mono:!0,value:{$ref:"#/state/url"},placeholder:"/pricing"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setUrl"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/confirm"},value:[]}]}}]}}]}}},{tagName:"div",attributes:{part:"start-row"},children:[{tagName:"p",attributes:{part:"group-label"},textContent:"Start from"},{tagName:"jx-action-group",attributes:{part:"start-from"},$props:{selects:"single",label:"Start from",compact:!1},children:[{$prototype:"Array",items:{$ref:"#/state/startChoices"},key:{$ref:"$map/item/value"},map:{tagName:"jx-action-button",attributes:{part:"choice-card","data-value":"${$map.item.value}"},$props:{label:{$ref:"$map/item/label"},checked:{$ref:"$map/item/checked"},disabled:{$ref:"$map/item/disabled"},hint:{$ref:"$map/item/reason"},quiet:!1},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickStart"},value:[{$ref:"$map/item/value"}]}]},children:[{tagName:"span",attributes:{part:"choice-name"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"choice-note"},textContent:"${$map.item.note}"}]}}]}]}]},collection:{tagName:"div",attributes:{part:"options",role:"none"},children:[{tagName:"p",attributes:{part:"group-label"},textContent:"Each ${state.itemNoun} has"},{tagName:"jx-action-group",attributes:{part:"presets"},$props:{selects:"multiple",label:"Fields",compact:!1},children:[{$prototype:"Array",items:{$ref:"#/state/presets"},key:{$ref:"$map/item/id"},map:{tagName:"jx-action-button",attributes:{part:"preset","data-preset":"${$map.item.id}"},$props:{label:{$ref:"$map/item/label"},toggles:!0,selected:{$ref:"$map/item/selected"},quiet:!1,size:"sm",icon:{$ref:"$map/item/icon"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/togglePreset"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",textContent:"${$map.item.label}"}]}}]},{tagName:"p",attributes:{part:"note"},textContent:"You can add or change fields later."},{tagName:"div",attributes:{part:"localized-slot",role:"none"},$switch:{$ref:"#/state/localizable"},cases:{true:{tagName:"jx-checkbox",attributes:{part:"localized"},$props:{checked:{$ref:"#/state/localized"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setLocalized"},value:[{$ref:"event#/target/checked"}]}]},children:[{tagName:"span",textContent:"One folder per language (${state.localeSummary})"}]}}},{tagName:"jx-checkbox",attributes:{part:"own-page"},$props:{checked:{$ref:"#/state/ownPage"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setOwnPage"},value:[{$ref:"event#/target/checked"}]}]},children:[{tagName:"span",textContent:"Give each ${state.itemNoun} its own page"}]},{tagName:"div",attributes:{part:"own-page-slot",role:"none"},$switch:{$ref:"#/state/ownPage"},cases:{true:{tagName:"div",attributes:{part:"pattern-row"},children:[{tagName:"span",attributes:{part:"url-label"},textContent:"at"},{tagName:"code",attributes:{part:"pattern"},textContent:"${state.pattern}"},{tagName:"span",attributes:{part:"url-label"},textContent:"using"},{tagName:"jx-select",attributes:{part:"page-template"},$props:{size:"sm",label:"Template for each page",options:{$ref:"#/state/templateOptions"},value:{$ref:"#/state/pageTemplate"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickPageTemplate"},value:[{$ref:"event#/target/value"}]}]}}]}}}]},template:{tagName:"div",attributes:{part:"options",role:"none"},children:[{tagName:"p",attributes:{part:"group-label"},textContent:"Wrap it in"},{tagName:"jx-action-group",attributes:{part:"wrap-in"},$props:{selects:"single",label:"Wrap it in",compact:!1},children:[{$prototype:"Array",items:{$ref:"#/state/wrapChoices"},key:{$ref:"$map/item/value"},map:{tagName:"jx-action-button",attributes:{part:"choice-card","data-value":"${$map.item.value}"},$props:{label:{$ref:"$map/item/label"},checked:{$ref:"$map/item/checked"},disabled:{$ref:"$map/item/disabled"},hint:{$ref:"$map/item/reason"},quiet:!1},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickWrap"},value:[{$ref:"$map/item/value"}]}]},children:[{tagName:"span",attributes:{part:"choice-name"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"choice-note"},textContent:"${$map.item.note}"}]}}]},{tagName:"p",attributes:{part:"note"},textContent:"Pages placed in this template fill its Content area. You can add more named areas later."}]},component:{tagName:"div",attributes:{part:"options",role:"none"},children:[{tagName:"p",attributes:{part:"group-label"},textContent:"Start from"},{tagName:"jx-action-group",attributes:{part:"component-start"},$props:{selects:"single",label:"Start from",compact:!1},children:[{$prototype:"Array",items:{$ref:"#/state/componentChoices"},key:{$ref:"$map/item/value"},map:{tagName:"jx-action-button",attributes:{part:"choice-card","data-value":"${$map.item.value}"},$props:{label:{$ref:"$map/item/label"},checked:{$ref:"$map/item/checked"},disabled:{$ref:"$map/item/disabled"},hint:{$ref:"$map/item/reason"},quiet:!1},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickComponentStart"},value:[{$ref:"$map/item/value"}]}]},children:[{tagName:"span",attributes:{part:"choice-name"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"choice-note"},textContent:"${$map.item.note}"}]}}]},{tagName:"div",attributes:{part:"copy-slot",role:"none"},$switch:{$ref:"#/state/copying"},cases:{true:{tagName:"jx-field",attributes:{part:"copy-row"},$props:{span:!0,label:"Copy of"},children:[{tagName:"jx-select",attributes:{part:"copy-of"},$props:{size:"sm",label:"Component to copy",options:{$ref:"#/state/copyOptions"},value:{$ref:"#/state/copyOf"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickCopy"},value:[{$ref:"event#/target/value"}]}]}}]}}},{tagName:"p",attributes:{part:"note"},textContent:"It appears under Components in the Site panel, ready to drag onto any page."}]},entry:{tagName:"div",attributes:{part:"options",role:"none"},children:[{tagName:"jx-field",attributes:{part:"collection-row"},$props:{span:!0,label:"Collection"},children:[{tagName:"jx-select",attributes:{part:"collection"},$props:{size:"sm",label:"Collection",options:{$ref:"#/state/collectionOptions"},value:{$ref:"#/state/collection"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickCollection"},value:[{$ref:"event#/target/value"}]}]}}]},{tagName:"div",attributes:{part:"locale-slot",role:"none"},$switch:{$ref:"#/state/localeShown"},cases:{true:{tagName:"jx-field",attributes:{part:"locale-row"},$props:{span:!0,label:"Language"},children:[{tagName:"jx-select",attributes:{part:"locale"},$props:{size:"sm",label:"Language",options:{$ref:"#/state/localeOptions"},value:{$ref:"#/state/locale"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickLocale"},value:[{$ref:"event#/target/value"}]}]}}]}}}]},media:{tagName:"div",attributes:{part:"drop","data-drop":"${state.dropActive}"},ondragover:{$prototype:"Function",body:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/dragOver"},value:[]}]},ondragleave:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/dragOut"},value:[]}]},children:[{tagName:"jx-icon",attributes:{part:"drop-glyph"},$props:{name:"upload-simple"}},{tagName:"p",attributes:{part:"drop-title"},textContent:"Drop images, video or documents"},{tagName:"label",attributes:{part:"browse"},children:[{tagName:"input",attributes:{part:"browse-input",type:"file",multiple:!0,accept:"${state.uploadAccept}"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/choose"},value:[{$ref:"event#/target"}]}]}},{tagName:"span",textContent:"Browse files"}]},{tagName:"p",attributes:{part:"drop-summary"},textContent:"${state.fileSummary}"}]}}}]}]},{tagName:"p",attributes:{part:"saved","aria-live":"polite"},textContent:"${state.saved}"}]};T("add-new",z);function D(e){return{...e,blocked:!e.canConfirm,invalid:e.error!=="",named:e.kind!=="media"}}function E(e){let t=document.createElement("div");t.style.pointerEvents="auto",t.setAttribute(Ue,ft("dialog","add-new")),e.layer.append(t);let r=!1,o=()=>{if(r)return;r=!0,e.actions.closed()},l=()=>r,{actions:a}=e,d=g({...D(e.view),choose:a.choose,closed:o,confirm:a.confirm,dragOut:a.dragOut,dragOver:a.dragOver,drop:a.drop,pickCollection:a.pickCollection,pickComponentStart:a.pickComponentStart,pickCopy:a.pickCopy,pickKind:a.pickKind,pickLocale:a.pickLocale,pickPageTemplate:a.pickPageTemplate,pickStart:a.pickStart,pickWrap:a.pickWrap,setName:(m)=>{d.name=m,a.setName(m)},setLocalized:a.setLocalized,setOwnPage:a.setOwnPage,setUrl:(m)=>{d.url=m,a.setUrl(m)},toggleUrl:a.toggleUrl,togglePreset:a.togglePreset}),f=null,u=()=>{setTimeout(()=>{let m=f?.root;if(r||!(m instanceof HTMLElement))return;let c=m.querySelector('jx-textfield[part="name"]');if(c)dh(c,"all")},0)},b=R("add-new",d,t).then(async(m)=>{f=m;let c=m.root;if(l())return m.dispose(),c;if(await Yt(c),l())return c;if(Ot(c),d.named)u();return c});return{close(){let m=f?.root;if(m instanceof HTMLElement)Nt(m);f?.dispose(),f=null,t.remove(),o()},host:t,ready:b,update(m){Object.assign(d,D(m))}}}var y="Add new";async function W(){return(await tE()).map((t)=>({name:t.name,ref:t.path})).toSorted((t,r)=>t.name.localeCompare(r.name))}function _(){for(let e of K_("page")){if(e.ext===".json")continue;let t=Na(e.ext,"serialize");if(t)return{ext:e.ext,name:t.name}}return null}function B(){let e=lr(),t=e?.extensions[0];return e&&t?{ext:t,name:e.name}:null}function J(){return ln(S?.projectConfig??{}).i18n}async function V(e){let t={},{i18n:r}=ln(S?.projectConfig??{});for(let o of await sS(e)){let l=Pn(go(o,r));if(l!==null)t[l]=o}return t}async function L(){await Ht().catch(()=>{});let e=await Promise.all(vw().map(async(t)=>{let r={dir:t.dir,ext:t.ext,formatName:B_(t),name:t.name,schema:t.schema};if(ib(t))r.localeDirs=await V(t);return r}));return{i18n:J(),article:_(),collections:e,componentTags:Ne.map((t)=>t.tagName),copyableTags:Ne.filter((t)=>I(t)).map((t)=>t.tagName),contentFormat:B(),declaredContent:qE(),defaultLayout:S?.projectConfig?.defaults?.layout??null,hasSelection:ew()!==null,layouts:await W()}}function I(e){let{path:t}=e;return n(t)&&e.source!=="npm"&&t.endsWith(".json")}async function Y(){let e=new Map;for(let t of Ne){let{path:r}=t;if(!I(t)||!n(r))continue;try{let o=JSON.parse(await p().readFile(r));if(v(o))e.set(t.tagName,o)}catch{}}return e}function U(e,t){let r=e.trim();if(r===Hs||r==="none"||r==="")return Hs;if(r===$c)return $c;let o=Qa(r);return t.find((a)=>Qa(a.ref)===o||Qa(a.ref)===`layouts/${o}`||Qa(a.ref)===`layouts/${o}.json`||a.name.toLowerCase()===r.toLowerCase())?.ref??null}function G(e,t){let r={};if(e.collection!==void 0)r.collection=e.collection;if(e.locale!==void 0){if(am(e.locale,t)===null){let o=t.i18n?.locales??[];throw RangeError(`command "file.new" argument "locale": "${e.locale}" is not a language this `+`project declares — declared: ${o.length===0?"none":o.join(", ")}`)}r.locale=e.locale}if(e.template!==void 0){let o=U(e.template,t.layouts);if(o===null){let l=t.layouts.map((a)=>Qa(a.ref));throw RangeError(`command "file.new" argument "template": "${e.template}" names no template — `+`declared: ${[Hs,$c,...l].join(", ")}`)}if(e.kind==="collection")r.pageTemplate=o===$c?Hs:o;else if(e.kind==="template")r.startFrom=o===Hs||o===$c?"":o;else r.startFrom=o}return r}async function Q(e){if(e.format===null)return Co(e.doc,null);return Aa(e.format,e.doc,{frontmatter:e.frontmatter??!0,mode:"roundtrip"})}async function F(e,t,r=!1){for(let o of dD(gE(e)))await Promise.all(o.map(async(l)=>{if(!r&&t.has(l))return;t.set(l,uD(l,t)?new Set:await fw(l))}))}function k(e){if(Jg(e),Cd(),e.some((t)=>t.startsWith("pages/")))$b(),Yg();OE(e).then((t)=>{if(t)Cd(),xn("leftPanel")})}async function P(e,t,r){let o;try{o=await Q(t)}catch(l){throw C.error(`Could not prepare ${e}.`,{detail:te(l),path:e,source:y}),Error(`could not prepare ${e}`,{cause:l})}if(await X_(e,o,{quiet:r,source:y})===null)throw Error(`could not write ${e}`)}async function X(e){let t=e.config,r=S?.projectConfig?.content,o=v(r)?{...r}:{};if(o[t.name]=t.entry,!(await Gl({content:o})).ok)return null;let a=["project.json"],d=[];for(let u of[{body:e.content,path:e.path},...e.extraWrites])try{await P(u.path,u.body,!0),a.push(u.path)}catch{d.push(u.path)}if(d.length===0)C.success(`Created the ${t.name} collection`);else C.warn(`Created the ${t.name} collection, but ${d.join(" and ")} could not be written.`,{source:y});k(a),lm(t.name),rt("content.showCollection",{collection:t.name},y);let f={kind:"collection",path:`content/${t.name}`,wrote:a};if(e.route!==void 0)f.route=e.route;return f}async function M(e,t,r){if(e.kind==="media"){let l=await Sa(r,{dir:_a,only:"media"});if(l.length===0)return null;let a=l.map((d)=>d.path);return k(a),rt("media.browse",{select:l[0].path},y),{kind:"media",path:_a,wrote:a}}if(e.kind==="collection")return X(e);let o={kind:e.kind,path:e.path,wrote:[e.path]};if(e.route!==void 0)o.route=e.route;if(e.tag!==void 0)o.tag=e.tag;if(e.kind==="component"&&t.startFrom===P_){let l=await cE(e.tag);if(l===null)return null;return k([l]),await yi(l),o}try{await P(e.path,e.content,!1)}catch{return null}switch(k([e.path]),e.kind){case"component":{Mb(e.path,e.content.doc),await yi(e.path);break}case"template":{Ky(),await yi(e.path);break}case"entry":{if(t.collection!==void 0)lm(t.collection);await Ml(e.path);break}default:await yi(e.path)}return o}async function Ve(e){let t=e.kind??"page";if(t==="media")throw RangeError('command "file.new": Media is uploaded, not named; run file.new { kind: "media" } with no name to open the upload drop zone.');let r=await L(),o=G({...e,kind:t},r);if(t==="entry"&&o.collection===void 0&&r.collections.length===1)o.collection=r.collections[0].name;let l=fE(t,e.name,o,r),a=new Map;await F(l,a,!0);let d=mE(l,e.name,o,r,(u)=>a.get(u));if(d!=="")throw RangeError(`command "file.new": ${d}`);let f=await M(l,o,[]);if(f===null)throw Error(`file.new could not create ${l.path}; the reason is in Problems.`);return f}async function Ye(e){let t=await L(),r=t.collections.find((u)=>u.name===e);if(!r)return C.error(`"${e}" is not a collection this project declares.`,{source:y}),null;let o=`pages/${as(e)||e}`,l=`${o}/[slug].json`;if((await fw(o)).has("[slug].json"))return C.error(`${l} already exists.`,{detail:"Open it in Design and point its $paths at this collection, or rename it first.",path:l,source:y}),null;let d=cD(r.schema,r.formatName!==null),f=pE(e,d,j_(Mu(t),t),t);try{await P(l,{doc:f,format:null},!1)}catch{return null}return k([l]),l}function j(e){switch(e.kind){case"page":{let t={startFrom:e.pageStart};if(e.editingUrl)t.url=e.url;if(e.locale!=="")t.locale=e.locale;return t}case"template":return{startFrom:e.wrap};case"component":{let t={startFrom:e.componentStart};if(e.componentStart===sm&&e.copyOf!=="")t.copyOf=e.copyOf;return t}case"collection":return{fields:e.fields,localized:e.localized,ownPage:e.ownPage,pageTemplate:e.pageTemplate};case"entry":{let t={};if(e.collection!=="")t.collection=e.collection;if(e.locale!=="")t.locale=e.locale;return t}default:return{files:e.files.length}}}function w(e,t,r,o,l=""){return{checked:e===o?"true":"false",disabled:l!=="",label:t,note:r,reason:l,value:e}}function Z(e,t){let r=t.layouts.map((o)=>w(o.ref,o.name,t.defaultLayout!==null&&Qa(o.ref)===Qa(t.defaultLayout)?"the site's default":"a template",e.pageStart));if(t.article!==null)r.push(w($c,"Article","mostly writing",e.pageStart));return r.push(w(Hs,"Blank","no template",e.pageStart)),r}function q(){let e=ew();if(!e)return"nothing selected";let r=1+(Array.isArray(e.node.children)?e.node.children.length:0);return r===1?"1 element":`${r} elements`}function ee(){let e=ae()?.keymap,t=e?.bindingsFor("file.new")??[];if(!e||t.length===0)return"";let[r,...o]=t.map((l)=>e.format(l));return o.length===0?`${r} opens this anywhere.`:`${r} opens this in the desktop app, ${o.join(" or ")} anywhere.`}function O(e,t,r,o){let l=nw[e.kind],a=nb.filter((s)=>s!=="entry"||t.collections.length>0).map((s)=>({checked:s===e.kind?"true":"false",hint:nw[s].hint,icon:nw[s].icon,id:s,label:nw[s].label})),d=r.config?.name??"",f=Zu(d===""?"items":d),u=t.i18n?.locales??[],b=t.collections.find((s)=>s.name===e.collection),m=u.length>0&&(e.kind==="page"||e.kind==="entry"&&b!==void 0&&ib(b)),c=[...t.layouts.map((s)=>({label:s.name,value:s.ref})),{label:"No template",value:Hs}];return{canConfirm:o===""&&!e.busy,chordNote:ee(),collection:e.collection,collectionOptions:t.collections.map((s)=>({label:Sd(s.name),value:s.name})),componentChoices:[w("blank","Blank","an empty block",e.componentStart),w(P_,"Current selection",q(),e.componentStart,t.hasSelection===!0?"":"Select an element on the canvas first."),w(sm,"Copy of…","an existing one",e.componentStart,(t.copyableTags??[]).length>0?"":"This project has no components of its own to copy yet.")],copyOf:e.copyOf,copyOptions:[...t.componentDocs?.keys()??[]].map((s)=>({label:`<${s}>`,value:s})),copying:e.componentStart===sm,cta:l.cta,dropActive:e.dropActive?"true":"false",editingUrl:e.editingUrl,error:e.touched||e.kind==="media"?e.kind==="media"?"":o:"",fileSummary:e.files.length===0?"":e.files.map((s)=>s.name).join(", "),itemNoun:f,kind:e.kind,kindHint:l.hint,kindLabel:l.label,kinds:a,locale:e.locale,localeOptions:u.map((s)=>({label:Vt(s),value:s})),localeShown:m,localeSummary:u.join(", "),localizable:u.length>0,localized:e.localized,name:e.name,nameLabel:l.nameLabel,ownPage:e.ownPage,pageTemplate:e.pageTemplate,pattern:r.route??`/${d===""?"items":d}/:slug`,placeholder:l.placeholder,presets:iw.filter((s)=>s!=="richText"||t.contentFormat!==null).map((s)=>{let x=e.fields.includes(s);return{icon:x?"check":"plus",id:s,label:F_[s].label,selected:x}}),route:r.route===void 0||r.route===""?"/":r.route,saved:r.saved,startChoices:Z(e,t),templateOptions:c,uploadAccept:zc(),url:e.url,wrapChoices:[...t.layouts.map((s)=>w(s.ref,s.name,"keeps its frame around this one",e.wrap)),w("","Nothing","a fresh frame",e.wrap)]}}function oe(e,t){let r=e.kind??"page";return r==="entry"&&t.collections.length===0?"page":r}var A=null;function Ge(e={}){if(A)return A.done;let t,r=new Promise((l)=>{t=l}),o={done:r,handle:null};return A=o,ne(e,t,o),r}async function ne(e,t,r){let o=await L(),l=new Map,a={busy:!1,collection:e.collection??o.collections[0]?.name??"",locale:am(e.locale,o)??o.i18n?.defaultLocale??"",localized:o.i18n!==null&&o.i18n!==void 0,componentStart:"blank",copyOf:"",dropActive:!1,editingUrl:!1,fields:[...hE],files:[],kind:oe(e,o),name:e.name??"",ownPage:!0,pageStart:H_(o,am(e.locale,o)??o.i18n?.defaultLocale??""),pageTemplate:Mu(o),templateChosen:e.template!==void 0,touched:(e.name??"")!=="",url:"",wrap:Mu(o)===Hs?"":Mu(o)};if(e.template!==void 0){let i=U(e.template,o.layouts);if(i!==null)a.pageStart=i,a.pageTemplate=i===$c?Hs:i,a.wrap=i===Hs||i===$c?"":i}if(o.contentFormat===null)a.fields=a.fields.filter((i)=>i!=="richText");let d=!1,f=null,u=()=>fE(a.kind,a.name,j(a),o),b=(i)=>mE(i,a.name,j(a),o,(h)=>l.get(h)),m=()=>{let i=u();if(r.handle?.update(O(a,o,i,b(i))),gE(i).some((h)=>!l.has(h)))F(i,l).then(()=>{if(!d){let h=u();r.handle?.update(O(a,o,h,b(h)))}})},c=(i)=>{i(),m()},s=async()=>{if(a.busy)return;a.touched=!0;let i=u();if(await F(i,l,!0),b(i)!==""){m();return}a.busy=!0,m();try{f=await M(i,j(a),a.files)}catch(N){C.error("Could not create it.",{detail:te(N),source:y}),f=null}if(a.busy=!1,f===null){m();return}r.handle?.close()},x=u(),K=E({actions:{choose:(i)=>{let h=[...i.files??[]];i.value="",c(()=>{a.files=[...a.files,...h]})},closed:()=>{if(d)return;d=!0,A=null,r.handle?.close(),t(f)},confirm:()=>{s()},dragOut:()=>{c(()=>{a.dropActive=!1})},dragOver:()=>{if(!a.dropActive)c(()=>{a.dropActive=!0})},drop:(i)=>{c(()=>{a.dropActive=!1;let h=i?[...i]:[];if(h.length>0)a.kind="media";a.files=[...a.files,...h]})},pickCollection:(i)=>{c(()=>{a.collection=i})},pickComponentStart:(i)=>{if(c(()=>{a.componentStart=i}),i===sm&&o.componentDocs===void 0)Y().then((h)=>{if(o.componentDocs=h,a.copyOf==="")a.copyOf=h.keys().next().value??"";if(!d)m()})},pickLocale:(i)=>{c(()=>{if(a.locale=i,!a.templateChosen)a.pageStart=H_(o,i)})},setLocalized:(i)=>{c(()=>{a.localized=i})},pickCopy:(i)=>{c(()=>{a.copyOf=i})},pickKind:(i)=>{c(()=>{a.kind=i})},pickPageTemplate:(i)=>{c(()=>{a.pageTemplate=i})},pickStart:(i)=>{c(()=>{a.pageStart=i,a.templateChosen=!0})},pickWrap:(i)=>{c(()=>{a.wrap=i})},setName:(i)=>{c(()=>{a.name=i,a.touched=!0})},setOwnPage:(i)=>{c(()=>{a.ownPage=i})},setUrl:(i)=>{c(()=>{a.url=i,a.touched=!0})},toggleUrl:()=>{c(()=>{if(!a.editingUrl)a.url=u().route??"/";a.editingUrl=!a.editingUrl})},togglePreset:(i)=>{c(()=>{let h=iw.find((N)=>N===i);if(h===void 0)return;a.fields=a.fields.includes(h)?a.fields.filter((N)=>N!==h):[...a.fields,h]})}},layer:tt("dialog"),view:O(a,o,x,b(x))});r.handle=K,m()}export{Ye as addCollectionPage,Ve as createDirect,Ge as openAddNew};
|
|
2
|
-
|
|
3
|
-
//# debugId=C2968BD6421514CF64756E2164756E21
|
|
4
|
-
//# sourceMappingURL=add-new-flow-snx1s4b0.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{te}from"./studio-psh8mwnw.js";import{p,_e}from"./studio-03mqh8ax.js";import{g}from"./studio-4kzbrr5t.js";import"./studio-ajw4k8hp.js";import{Ot,Nt}from"./studio-cpkamjdn.js";import"./studio-ry81j4q1.js";import{Ue,ft,T,R,Yt,tt}from"./studio-jttyqrmh.js";import"./studio-epenqmvk.js";import"./studio-771k2n12.js";import"./studio-yx8hzqja.js";import"./studio-h7weqf2q.js";import{um}from"./studio-et2q4s8n.js";var d={$schema:"https://jxsuite.com/schema/v1",$id:"StudioCfAccountPicker",$description:"The Cloudflare account picker: which of the accounts this grant reaches should publishing and the assistant run against. A `jx-dialog`, so the platform owns modality, Escape, focus restoration and the backdrop — which is what retired the `sp-dialog-wrapper` this surface used to open by hand, along with the focus trap and the `aria-modal` slot `showDialog` wrapped around it. There is no confirming button: each row commits itself, because a picker whose answer is one of N rows has N answers rather than one. The adapter (`surfaces/cf-account-picker.ts`) hands in rows that are already strings and booleans — nothing here knows what `cf_account_required` is, which call refused, or whether the list came back empty because the grant reaches nothing or because Cloudflare could not be reached.",tagName:"jx-dialog",$props:{headline:"Choose a Cloudflare account",confirmLabel:"",cancelLabel:"Cancel",size:"sm"},attributes:{part:"cf-accounts"},oncancel:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},style:{$description:"The picker's own look. Four `.cf-account-picker*` rules in `styles/shell.css` become the parts below and one of them does not come with them: `min-width: 320px` was this surface sizing its own box, and `jx-dialog` is what sizes a dialog now — `sm` is `min(90vw, 24rem)`, which is wider than the 320px it asked for. The row shape came from `.prefs-account`, which the lit template BORROWED from Preferences › Accounts; it is copied here rather than shared, because a class in a stylesheet is a thing two surfaces can drift apart on and `preferences-dialog.ts` still draws its own rows from it. Three token repairs travel with them: `--spectrum-font-size-75` and `--spectrum-font-size-50` resolve only inside `<sp-theme>`, and a document mounted in the dialog layer is outside it, so every one of them would silently have taken its hard-coded fallback.",'& [part="picker"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-4)"},'& [part="intro"], & [part="empty"]':{$description:"The lede and the two absences read as the same secondary line, so they are one rule: the sentence over the list and the sentence drawn instead of it are the same voice.",margin:"0",fontSize:"var(--jx-text-md)",color:"var(--fg-dim)"},'& [part="failure"]':{$description:'A commit the broker refused, said above the list the reader is still looking at. It is not an announcement of the same thing twice: the list survives a refusal, because listing again is not what would fix an account Cloudflare will not accept, so the reason has to sit beside the rows that are still on offer. It is `failure` rather than `error` because every kit field draws a permanent, empty `[part="error"]` of its own, and the kit is light DOM: a rule on that name here would reach any field this dialog ever holds.',margin:"0",fontSize:"var(--jx-text-md)",color:"var(--danger)"},'& [part="fail"]':{$description:"The one state that offers a verb of its own. Retrying is right for a listing that never landed and wrong for a grant that genuinely reaches nothing, so the button lives in this branch rather than under both.",display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"var(--jx-space-3)"},'& [part="list"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-2)"},'& [part="row"]':{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"var(--jx-space-4)",padding:"var(--jx-space-3)",border:"1px solid var(--border)",borderRadius:"var(--radius)"},'& [part="text"]':{$description:"`min-width: 0` lets the column shrink below its content, so the name and id reflow inside the row instead of pushing its own button off the end of it; what lets them reflow is their own `overflow-wrap`. Nothing here ellipsizes. Unlike Preferences › Accounts, the row does not wrap its button onto a line of its own: in an `sm` dialog the arithmetic (a 120px basis, the gap and a 105px button against a 236px row) would wrap every row at rest.",display:"flex",flexDirection:"column",gap:"var(--jx-space-1)",minWidth:"0"},'& [part="name"]':{$description:"`overflow-wrap: anywhere` because Cloudflare names a new account after the email that opened it (`name@example.com's Account`), and an address has no break opportunity in it.",color:"var(--fg)",overflowWrap:"anywhere"},'& [part="detail"]':{$description:"The account id under the name. Two Cloudflare accounts may carry the same name and the id is what is stored, so the row shows both rather than the half a reader would have to guess from. `overflow-wrap: anywhere` because the id is 32 hex digits with no break opportunity: it measured 203px in a 119px column and ran under the row's own button. It reflows rather than ellipsizing, because the id is the half that tells two same-named accounts apart.",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)",overflowWrap:"anywhere"}},children:[{tagName:"div",attributes:{part:"picker"},children:[{tagName:"p",attributes:{part:"intro"},textContent:"Your Cloudflare login reaches more than one account. Publishing and the assistant both run against the one you pick; you can change it in Preferences › Accounts."},{tagName:"div",attributes:{part:"body-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/listState"},cases:{loading:{tagName:"p",attributes:{part:"empty"},textContent:"Reading your Cloudflare accounts…"},empty:{tagName:"p",attributes:{part:"empty"},textContent:"This Cloudflare login reaches no accounts. Create one at dash.cloudflare.com, then try again."},failed:{tagName:"div",attributes:{part:"fail"},children:[{tagName:"p",attributes:{part:"empty"},textContent:"${state.failureMessage}"},{tagName:"jx-button",attributes:{part:"retry"},$props:{size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/retry"},value:[]}]},children:[{tagName:"span",textContent:"Try again"}]}]},listed:{tagName:"div",attributes:{part:"listed",role:"none"},style:{display:"contents"},children:[{tagName:"div",attributes:{part:"failure-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasFailure"},cases:{true:{tagName:"p",attributes:{part:"failure"},textContent:"${state.failure}"}}},{tagName:"div",attributes:{part:"list"},children:[{$prototype:"Array",items:{$ref:"#/state/rows"},key:{$ref:"$map/item/id"},map:{tagName:"div",attributes:{part:"row","data-account":"${$map.item.id}"},children:[{tagName:"div",attributes:{part:"text"},children:[{tagName:"span",attributes:{part:"name"},textContent:"${$map.item.name}"},{tagName:"span",attributes:{part:"detail"},textContent:"${$map.item.id}"}]},{tagName:"jx-button",attributes:{part:"choose"},$props:{size:"sm",variant:"accent",disabled:{$ref:"$map/item/busy"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/choose"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",textContent:"${$map.item.label}"}]}]}}]}]}}}]}]};T("cf-account-picker",d);function h(t){let a=t.choosing!=="";return{...t,failureMessage:`Cloudflare could not be reached: ${t.failure}`,hasFailure:t.failure!=="",listState:t.loading?"loading":t.accounts.length>0?"listed":t.failure!==""?"failed":"empty",rows:t.accounts.map((o)=>({busy:a,id:o.id,label:t.choosing===o.id?"Selecting…":"Use this account",name:o.name}))}}function f(t){let a=document.createElement("div");a.style.pointerEvents="auto",a.setAttribute(Ue,ft("dialog","cf-accounts")),t.layer.append(a);let o=!1,s=()=>{if(o)return;o=!0,t.onClosed()},u=()=>o,n=g({...h({accounts:[],choosing:"",failure:"",loading:!0}),choose:(e)=>{t.onChoose(e)},closed:s,retry:()=>{t.onRetry()}}),l=null,c=R("cf-account-picker",n,a).then(async(e)=>{l=e;let i=e.root;if(u())return e.dispose(),i;if(await Yt(i),u())return i;return Ot(i),i});return{close(){if(o)return;let e=l?.root;if(e instanceof HTMLElement)Nt(e);l?.dispose(),l=null,a.remove(),s()},host:a,ready:c,update(e){Object.assign(n,h({accounts:e.accounts??n.accounts,choosing:e.choosing??n.choosing,failure:e.failure??n.failure,loading:e.loading??n.loading}))}}}function w(){if(!_e())return!1;let t=p();return Boolean(t.cfAccounts&&t.cfSelectAccount)}function H(){if(!w())return Promise.resolve(null);return new Promise((t)=>{let a=[],o="",s=!1,u=(r)=>{if(s)return;s=!0,c.close(),t(r)};async function n(){c.update({failure:"",loading:!0});let r="";try{a=await p().cfAccounts?.()??[]}catch(e){a=[],r=te(e)}if(s)return;c.update({accounts:a,failure:r,loading:!1})}async function l(r){let e=a.find((i)=>i.id===r);if(!e||o!=="")return;o=r,c.update({choosing:r,failure:""});try{await p().cfSelectAccount?.({id:e.id,name:e.name})}catch(i){if(o="",!s)c.update({choosing:"",failure:te(i)});return}um(),u(e)}let c=f({layer:tt("dialog"),onChoose:(r)=>{l(r)},onClosed:()=>{u(null)},onRetry:()=>{n()}});n()})}export{H as openCfAccountPicker};
|
|
2
|
-
|
|
3
|
-
//# debugId=2B9C775139DB832F64756E2164756E21
|
|
4
|
-
//# sourceMappingURL=cf-account-picker-xyqw0jex.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{db,DE,NE,X2,AE}from"./studio-yx8hzqja.js";import"./studio-771k2n12.js";import"./studio-4kzbrr5t.js";import"./studio-03mqh8ax.js";export{AE as clearCfConnection,NE as getCfAccountId,db as getCfToken,X2 as setCfAccountId,DE as setCfToken};
|
|
2
|
-
|
|
3
|
-
//# debugId=0F33B1A35F1FF92864756E2164756E21
|
|
4
|
-
//# sourceMappingURL=cf-settings-hp1pjm0n.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Ne,Zw,xa,Mb,Fc,jc}from"./studio-1e8dw2w2.js";import"./studio-03mqh8ax.js";export{Zw as _componentRegistryLoaded,Fc as buildComponentInstance,Ne as componentRegistry,jc as computeRelativePath,xa as loadComponentRegistry,Mb as noteComponentSaved};
|
|
2
|
-
|
|
3
|
-
//# debugId=A35E7AE29ACD6F0964756E2164756E21
|
|
4
|
-
//# sourceMappingURL=components-nkwphrx3.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{mb,rS,sS,gb,tT,nT,iT}from"./studio-wxdcd42g.js";import"./studio-c1pxszat.js";import"./studio-gwrhcrss.js";import"./studio-hy4ye0dx.js";import"./studio-2hsqbq7b.js";import"./studio-9cxmp61c.js";import"./studio-pqqq6v85.js";import"./studio-1e8dw2w2.js";import"./studio-5wzdy1jc.js";import"./studio-ewarnzm4.js";import"./studio-34jrz12k.js";import"./studio-x3mjr5cc.js";import"./studio-h7weqf2q.js";import"./studio-771k2n12.js";import"./studio-jttyqrmh.js";import"./studio-ajw4k8hp.js";import"./studio-cpkamjdn.js";import"./studio-h310mbqm.js";import"./studio-de1s2x9v.js";import"./studio-k3bcy02e.js";import"./studio-vzgmyt0v.js";import"./studio-x08a3m0a.js";import"./studio-ry81j4q1.js";import"./studio-4kzbrr5t.js";import"./studio-psh8mwnw.js";import"./studio-3w35qvay.js";import"./studio-03mqh8ax.js";export{rS as collectionDirs,mb as collectionInfo,sS as collectionSourceDirs,nT as createCollectionSource,iT as createPagesSource,gb as listCollectionEntryIds,tT as reloadDraftAwareGrids};
|
|
2
|
-
|
|
3
|
-
//# debugId=A52099944B7F1D8F64756E2164756E21
|
|
4
|
-
//# sourceMappingURL=content-source-6a253wmk.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{B2,Wf,z2,W2,V2,np,U2,q2,ga,Y0,vd,G2,Wn,we}from"./studio-7dzyz9n8.js";export{B2 as CancellationTokenSource,Wf as Emitter,z2 as KeyCode,W2 as KeyMod,ga as MarkerSeverity,Y0 as MarkerTag,V2 as Position,np as Range,U2 as Selection,q2 as SelectionDirection,G2 as Token,vd as Uri,Wn as editor,we as languages};
|
|
2
|
-
|
|
3
|
-
//# debugId=009472AB65AE97D564756E2164756E21
|
|
4
|
-
//# sourceMappingURL=editor-wqrc68ca.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{B_,Z2,bE}from"./studio-rzg8hnkf.js";import"./studio-dbxv7w4s.js";import"./studio-zg16eeq1.js";import"./studio-zgx7svjd.js";import"./studio-jw0q5j6k.js";import"./studio-fy7jzj9j.js";import"./studio-d038kqbs.js";import"./studio-wxdcd42g.js";import"./studio-agyvzfm4.js";import"./studio-x97ay0v4.js";import"./studio-c1pxszat.js";import"./studio-gwrhcrss.js";import"./studio-gr36vnte.js";import"./studio-hy4ye0dx.js";import"./studio-2hsqbq7b.js";import"./studio-9cxmp61c.js";import"./studio-pqqq6v85.js";import"./studio-1e8dw2w2.js";import"./studio-5wzdy1jc.js";import"./studio-ewarnzm4.js";import"./studio-34jrz12k.js";import"./studio-x3mjr5cc.js";import"./studio-h7weqf2q.js";import"./studio-771k2n12.js";import"./studio-jttyqrmh.js";import"./studio-ajw4k8hp.js";import"./studio-cpkamjdn.js";import"./studio-h310mbqm.js";import"./studio-de1s2x9v.js";import"./studio-k3bcy02e.js";import"./studio-vzgmyt0v.js";import"./studio-x08a3m0a.js";import"./studio-ry81j4q1.js";import"./studio-4kzbrr5t.js";import"./studio-psh8mwnw.js";import"./studio-3w35qvay.js";import"./studio-03mqh8ax.js";import"./studio-k1wvtp03.js";export{Z2 as createEntry,B_ as entryFormatName,bE as registerContentCommands};
|
|
2
|
-
|
|
3
|
-
//# debugId=B64D22582B2D648864756E2164756E21
|
|
4
|
-
//# sourceMappingURL=entry-commands-nef0wrmp.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import"./studio-03mqh8ax.js";import{Ht,Qc,Xd}from"./studio-3w35qvay.js";import"./studio-psh8mwnw.js";import{g}from"./studio-4kzbrr5t.js";import"./studio-vzgmyt0v.js";import"./studio-x08a3m0a.js";import"./studio-ry81j4q1.js";import"./studio-cpkamjdn.js";import"./studio-fy7jzj9j.js";import"./studio-ajw4k8hp.js";import{T,R,Ys,tt}from"./studio-jttyqrmh.js";import"./studio-x97ay0v4.js";import"./studio-k1wvtp03.js";import"./studio-y26hx9re.js";import{MR,PR,Ol,FR,Wk,Iu}from"./studio-35vrtpdq.js";import{nS,HD,YE,XE}from"./studio-2ks6ka4g.js";import"./studio-de1s2x9v.js";import"./studio-k3bcy02e.js";import"./studio-h310mbqm.js";import"./studio-h7weqf2q.js";import"./studio-771k2n12.js";import"./studio-5wzdy1jc.js";import"./studio-2hsqbq7b.js";import"./studio-hy4ye0dx.js";import"./studio-9cxmp61c.js";import"./studio-wxdcd42g.js";import"./studio-x3mjr5cc.js";import"./studio-34jrz12k.js";import"./studio-pqqq6v85.js";import"./studio-1e8dw2w2.js";import"./studio-ewarnzm4.js";import"./studio-c1pxszat.js";import"./studio-gwrhcrss.js";import{n,_}from"./studio-zkq3r91p.js";var h={$schema:"https://jxsuite.com/schema/v1",$id:"StudioDataActions",$description:"The actions row a data-domain settings section grows: test a connection, push the schema, open the rows as a grid. It is an ISLAND inside `surfaces/settings-contributed.json` — the generic contributed-section renderer stays extension-agnostic and draws an empty host, and `panels/data-grid.ts` mounts this into it — which is the seam that lets the data surface contribute verbs without the settings machinery learning what a connection is.",tagName:"div",attributes:{part:"data-actions"},style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"var(--jx-space-2)",fontFamily:"var(--jx-font-sans)",fontSize:"var(--jx-text-md)",'& [part="result"]':{fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="result"][data-ok="false"]':{color:"var(--danger)"},'& [part="result"][data-ok="true"]':{color:"var(--success, var(--accent))"}},children:[{tagName:"span",attributes:{part:"test-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/testState"},cases:{shown:{tagName:"jx-button",attributes:{part:"test"},$props:{variant:"secondary",size:"sm",disabled:{$ref:"#/state/testDisabled"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/test"},value:[]}]},children:[{tagName:"span",textContent:"${state.testLabel}"}]}}},{tagName:"jx-button",attributes:{part:"push"},$props:{variant:"secondary",size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/push"},value:[]}]},children:[{tagName:"span",textContent:"Push Schema"}]},{tagName:"jx-button",attributes:{part:"grid"},$props:{variant:"secondary",size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openGrid"},value:[]}]},children:[{tagName:"span",textContent:"Open Data Grid"}]},{tagName:"span",attributes:{part:"result-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/resultState"},cases:{shown:{$description:"The last test's verdict, and a live region because it arrives after the press that asked for it.",tagName:"span",attributes:{part:"result",role:"status","data-ok":"${state.resultOk}",title:"${state.resultTitle}"},textContent:"${state.resultText}"}}}]};T("data-actions",h);function S(t,e){t.testState=e.testState,t.testLabel=e.testLabel,t.testDisabled=e.testDisabled,t.resultState=e.resultState,t.resultOk=e.resultOk,t.resultText=e.resultText,t.resultTitle=e.resultTitle}function y(t,e,o){let a=g({openGrid:o.openGrid,push:o.push,resultOk:"false",resultState:"hidden",resultText:"",resultTitle:"",test:o.test,testDisabled:!1,testLabel:"Test Connection",testState:"hidden"});S(a,e);let s=null,l=!1,r=R("data-actions",a,t).then((i)=>{let d=i.root;if(l)return i.dispose(),d;return s=i,d});return{dispose(){l=!0,s?.dispose(),s=null},ready:r,update:(i)=>S(a,i)}}var b={$schema:"https://jxsuite.com/schema/v1",$id:"StudioPushPlan",$description:"What pushing the schema would do, or what it did. The dry run is the whole point of the surface: a push rewrites a live database's shape, so the plan is read before the apply, and the confirm dialog around this document is the one that gates it. The ISLAND of `ui/layers.ts`'s confirm dialog rather than a dialog of its own (studio-ui-guidelines.md §12.5).",tagName:"div",attributes:{part:"plan"},style:{display:"flex",flexDirection:"column",gap:"var(--jx-space-2)",minWidth:"0",fontFamily:"var(--jx-font-sans)",fontSize:"var(--jx-text-md)",color:"var(--fg)",'& [part="steps"]':{margin:"0",padding:"0",listStyle:"none",display:"flex",flexDirection:"column",gap:"2px",maxHeight:"40vh",overflowY:"auto"},'& [part="step"]':{fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)",padding:"2px var(--jx-space-2)",borderLeft:"2px solid var(--border)"},'& [part="step"][data-kind="drop"]':{borderLeftColor:"var(--danger)"},'& [part="step"][data-kind="create"]':{borderLeftColor:"var(--success, var(--accent))"},'& [part="warning"]':{margin:"0",fontSize:"var(--jx-text-sm)",color:"var(--warning, var(--fg-dim))"},'& [part="failure"]':{$description:'`failure` rather than `error`: every kit field draws a permanent, empty `[part="error"]` of its own, and the kit is light DOM, so a rule on that name here would reach any field the plan ever holds.',margin:"0",fontSize:"var(--jx-text-sm)",color:"var(--danger)"}},children:[{tagName:"ul",attributes:{part:"steps"},children:[{$prototype:"Array",items:{$ref:"#/state/steps"},key:{$ref:"$map/item/key"},map:{tagName:"li",attributes:{part:"step","data-kind":"${$map.item.kind}"},textContent:"${$map.item.summary}"}}]},{$prototype:"Array",items:{$ref:"#/state/warnings"},key:{$ref:"$map/item/key"},map:{tagName:"p",attributes:{part:"warning"},textContent:"${$map.item.text}"}},{$prototype:"Array",items:{$ref:"#/state/errors"},key:{$ref:"$map/item/key"},map:{tagName:"p",attributes:{part:"failure",role:"alert"},textContent:"${$map.item.text}"}}]};T("push-plan",b);function x(t,e){let o=g({errors:e.errors,steps:e.steps,warnings:e.warnings}),a=null,s=!1,l=R("push-plan",o,t).then((r)=>{if(s)r.dispose();else a=r;return r.root});return{dispose(){s=!0,a?.dispose(),a=null},ready:l,update(r){o.steps=r.steps,o.warnings=r.warnings,o.errors=r.errors}}}var u=null;function v(){let t=u;u=null,t?.plan?.dispose(),t?.handle.close()}function P(t,e){return t.map((o,a)=>({key:`${e}:${a}`,text:o}))}function k(t){let e=t.phase==="done"?t.result:t.dryRun;return{errors:P(e?.errors??[],"error"),steps:(e?.plan??[]).map((o,a)=>({key:`${o.kind}:${a}`,kind:o.kind,summary:o.summary})),warnings:P(e?.warnings??[],"warning")}}function H(t){if(t.phase==="loading")return"Compiling plan…";if(t.phase==="applying")return"Applying…";if(t.phase==="done")return t.result?.applied?"Schema applied.":"Push failed.";let e=t.dryRun?.plan.length??0,o=t.dryRun?.errors?.length??0;return e===0&&o===0?"Nothing to push — the schema is up to date.":""}function m(){let t=u;if(!t)return;let e=t.phase==="confirm"&&(t.dryRun?.plan.length??0)>0;t.handle.update({cancelLabel:t.phase==="done"?"Close":"Cancel",confirmLabel:e?"Apply":"",message:H(t)}),t.plan?.update(k(t))}async function N(t,e){if(u)return;let o={connection:t,dryRun:null,onDone:e,phase:"loading",plan:null,result:null},a=Ys({cancelLabel:"Cancel",confirmLabel:"",headline:t?`Push Schema — ${t}`:"Push Schema",island:(i)=>{o.plan=x(i,k(o))},layer:tt("dialog"),message:"Compiling plan…",onCancel:v,onClosed:()=>{if(u===o)v()},onConfirm:()=>{j()},region:"data/push"}),s=Object.assign(o,{handle:a});u=s;let l={dryRun:!0};if(t!==void 0)l.connection=t;let r=await YE(l);if(u!==s)return;s.dryRun=r,s.phase="confirm",m()}async function j(){let t=u;if(!t)return;t.phase="applying",m();let e=await YE(t.connection===void 0?{}:{connection:t.connection});if(u!==t)return;t.result=e,t.phase="done",m(),t.onDone()}var c={pushing:!1,testResult:null,testing:null},D=new Map;function w(t,e){let{testResult:o}=c;return{resultOk:o?.ok?"true":"false",resultState:o?"shown":"hidden",resultText:o?`${o.connection}: ${o.ok?"connected":o.error??"failed"}`:"",resultTitle:o?.error??"",testDisabled:!e||c.testing!==null,testLabel:c.testing?"Testing…":"Test Connection",testState:t==="connections"?"shown":"hidden"}}function A(t){if(t!=="connections"&&t!=="data"||!nS())return null;return(e,o)=>O(e,t,o)}async function E(t,e){c.testing=t,c.testResult=null,e();let o=await HD(t);c.testing=null,c.testResult={...o,connection:t},e()}function O(t,e,o){let{rerender:a,selected:s}=o,l=D.get(t);if(l){l.update(w(e,s));return}let r=()=>e==="connections"?o.selected??void 0:void 0;D.set(t,y(t,w(e,s),{openGrid:()=>{Iu(),XE()},push:()=>{N(r(),a)},test:()=>{let i=o.selected;if(i)E(i,a)}}))}var V=100;function G(t){let e=t.studio?.settings;if(!e)return null;let{key:o}=t.project,a=e.layout??"form",s=t.entrySchema??{},l=a==="map"?_(s.additionalProperties)?s.additionalProperties:{}:s,r=e.label??t.project.title??o,i={};if(e.entry!==void 0)i.entry=e.entry;if(e.layout!==void 0)i.layout=e.layout;return{contribution:{entrySchema:l,key:o,settings:i,title:r},group:PR(e.group)?e.group:MR,icon:e.icon,intro:n(e.intro)?e.intro:void 0,key:o,label:r,order:e.order??V}}var f=new Set,p=null;function dt(){return p??Promise.resolve()}function pt(){return p??=M().finally(()=>{p=null}),p}async function M(){let[t]=await Promise.all([Qc(),Ht()]),e=new Set;for(let o of t)for(let a of o.contributions){let s=G(a);if(!s)continue;let{contribution:l}=s;Ol({group:s.group,icon:s.icon,intro:s.intro,key:s.key,label:s.label,order:s.order,render:(r)=>{let i=A(s.key),d={formats:Xd()};if(i!==null)d.actions=i;Wk(r,l,d)}}),e.add(s.key)}for(let o of f)if(!e.has(o))FR(o);f.clear();for(let o of e)f.add(o)}export{dt as extensionSectionsReady,pt as syncExtensionSettingsSections};
|
|
2
|
-
|
|
3
|
-
//# debugId=CC39B5A61A909D9F64756E2164756E21
|
|
4
|
-
//# sourceMappingURL=extension-sections-8ez2rrk8.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{eN,jr,AT,rP,OT,wp,MT,_b,Sb}from"./studio-c1pxszat.js";import"./studio-gwrhcrss.js";import"./studio-hy4ye0dx.js";import"./studio-2hsqbq7b.js";import"./studio-9cxmp61c.js";import"./studio-pqqq6v85.js";import"./studio-1e8dw2w2.js";import"./studio-5wzdy1jc.js";import"./studio-ewarnzm4.js";import"./studio-34jrz12k.js";import"./studio-x3mjr5cc.js";import"./studio-h7weqf2q.js";import"./studio-771k2n12.js";import"./studio-jttyqrmh.js";import"./studio-ajw4k8hp.js";import"./studio-cpkamjdn.js";import"./studio-h310mbqm.js";import"./studio-de1s2x9v.js";import"./studio-k3bcy02e.js";import"./studio-vzgmyt0v.js";import"./studio-x08a3m0a.js";import"./studio-ry81j4q1.js";import"./studio-4kzbrr5t.js";import"./studio-psh8mwnw.js";import"./studio-3w35qvay.js";import"./studio-03mqh8ax.js";export{_b as confirmFileDelete,MT as exportFile,rP as openFile,AT as parseCollabSource,eN as parseFormatSource,jr as parseSourceForPath,Sb as renamePromptMessage,wp as saveFile,OT as setDocumentSavedListener};
|
|
2
|
-
|
|
3
|
-
//# debugId=57CBBBA7BE597CAB64756E2164756E21
|
|
4
|
-
//# sourceMappingURL=file-ops-y3w71k1n.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Bs,pm,OE,ME,T2,PE,FE,jE,Z_,L2,pb,HE,$2,I2,BE,OD,R2,D2,fw,X_,MD,zE,N2,yi,Q_,WE,VE,fm,UE,A2,O2}from"./studio-3zge48z4.js";import"./studio-k3a8rp3d.js";import"./studio-d038kqbs.js";import"./studio-2ks6ka4g.js";import"./studio-wxdcd42g.js";import"./studio-hwejq03c.js";import"./studio-epenqmvk.js";import"./studio-x97ay0v4.js";import"./studio-c1pxszat.js";import"./studio-gwrhcrss.js";import"./studio-ndskgqef.js";import"./studio-gr36vnte.js";import"./studio-hy4ye0dx.js";import"./studio-2hsqbq7b.js";import"./studio-9cxmp61c.js";import"./studio-pqqq6v85.js";import"./studio-1e8dw2w2.js";import"./studio-5wzdy1jc.js";import"./studio-ewarnzm4.js";import"./studio-34jrz12k.js";import"./studio-x3mjr5cc.js";import"./studio-h7weqf2q.js";import"./studio-771k2n12.js";import"./studio-jttyqrmh.js";import"./studio-ajw4k8hp.js";import"./studio-cpkamjdn.js";import"./studio-h310mbqm.js";import"./studio-de1s2x9v.js";import"./studio-k3bcy02e.js";import"./studio-vzgmyt0v.js";import"./studio-x08a3m0a.js";import"./studio-ry81j4q1.js";import"./studio-4kzbrr5t.js";import"./studio-psh8mwnw.js";import"./studio-3w35qvay.js";import"./studio-03mqh8ax.js";export{$2 as FILE_ROW_HEIGHT,BE as canMoveInto,D2 as createFileIn,Z_ as findHomePage,jE as initProjectRepo,I2 as isFileDrag,fw as listTakenNames,Bs as loadDirectory,PE as loadProject,pm as loadProjectDirectories,A2 as mountFilesPanel,MD as notifyMoveOutcome,Q_ as openFileInPane,yi as openFileInTab,L2 as openHomePage,pb as openLastSessionOrHome,FE as openProject,zE as parentDirOf,R2 as pickAndUploadTo,OE as refreshProjectDirectoriesFor,UE as registerFilesPanel,WE as reloadCleanTab,fm as reloadFileInTab,VE as reloadTabsIfChanged,HE as setSessionWorkspaceShow,T2 as setShowIgnoredFiles,N2 as settleRename,ME as showIgnoredFiles,O2 as unmountFilesPanel,OD as uploadFilesToDir,X_ as writeNewFile};
|
|
2
|
-
|
|
3
|
-
//# debugId=5803FD53AF32D68164756E2164756E21
|
|
4
|
-
//# sourceMappingURL=files-de90apn9.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Ht,Lh,Qc,kv,Ux,ec,Xd,Na,Wi,of,fn,ul,Ev,lr,oI,Aa,rI}from"./studio-3w35qvay.js";import"./studio-03mqh8ax.js";export{lr as defaultContentFormat,ul as documentExtensions,Na as formatByExtension,Wi as formatByName,fn as formatForPath,oI as formatParse,Aa as formatSerialize,Ux as getExtensionCatalog,kv as getExtensions,Xd as getFormats,Qc as loadExtensions,Ht as loadFormats,of as noFormatError,ec as refreshExtensionUi,Lh as refreshFormats,Ev as routedPageExtensions,rI as splitFormatDocument};
|
|
2
|
-
|
|
3
|
-
//# debugId=582B0CA9E831BF8864756E2164756E21
|
|
4
|
-
//# sourceMappingURL=format-host-zfjz4rzm.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Ta,Hd,C$}from"./studio-h310mbqm.js";import"./studio-de1s2x9v.js";import"./studio-k3bcy02e.js";import"./studio-vzgmyt0v.js";import"./studio-x08a3m0a.js";import"./studio-ry81j4q1.js";import"./studio-4kzbrr5t.js";import"./studio-psh8mwnw.js";import"./studio-3w35qvay.js";import"./studio-03mqh8ax.js";export{Hd as isRecentLocal,Ta as markLocalMutation,C$ as startFsSync};
|
|
2
|
-
|
|
3
|
-
//# debugId=488DC9A47953DD8E64756E2164756E21
|
|
4
|
-
//# sourceMappingURL=fs-events-77c0mr0x.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{ZE,zD,oS,XE,QE}from"./studio-2ks6ka4g.js";import"./studio-wxdcd42g.js";import"./studio-c1pxszat.js";import"./studio-gwrhcrss.js";import"./studio-hy4ye0dx.js";import"./studio-2hsqbq7b.js";import"./studio-9cxmp61c.js";import"./studio-pqqq6v85.js";import"./studio-1e8dw2w2.js";import"./studio-5wzdy1jc.js";import"./studio-ewarnzm4.js";import"./studio-34jrz12k.js";import"./studio-x3mjr5cc.js";import"./studio-h7weqf2q.js";import"./studio-771k2n12.js";import"./studio-jttyqrmh.js";import"./studio-ajw4k8hp.js";import"./studio-cpkamjdn.js";import"./studio-h310mbqm.js";import"./studio-de1s2x9v.js";import"./studio-k3bcy02e.js";import"./studio-vzgmyt0v.js";import"./studio-x08a3m0a.js";import"./studio-ry81j4q1.js";import"./studio-4kzbrr5t.js";import"./studio-psh8mwnw.js";import"./studio-3w35qvay.js";import"./studio-03mqh8ax.js";export{zD as openCollectionGrid,ZE as openCsvGridTab,XE as openGridSourcePicker,oS as openPagesGrid,QE as registerGridCommands};
|
|
2
|
-
|
|
3
|
-
//# debugId=AD25A9B3B968468764756E2164756E21
|
|
4
|
-
//# sourceMappingURL=grid-open-4n4fjfpf.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{cL,dL,uL,hL,qS,Db,Nb,GS,Ul,pL,fL,mL,Ab,H2,sP,gL,Pc,Gw,Kw,bL,vL,yL,wL,xL,_L,SL,CL,kL,EL,TL,LL,KS,$L,Ob,IL,RL,DL,NL,AL,OL,Jw,ML,ql,PL,ih,FL,Yw,JS}from"./studio-pqqq6v85.js";import"./studio-1e8dw2w2.js";import"./studio-5wzdy1jc.js";import"./studio-ewarnzm4.js";import"./studio-x3mjr5cc.js";import"./studio-771k2n12.js";import"./studio-cpkamjdn.js";import"./studio-k3bcy02e.js";import"./studio-vzgmyt0v.js";import"./studio-x08a3m0a.js";import"./studio-ry81j4q1.js";import"./studio-4kzbrr5t.js";import"./studio-psh8mwnw.js";import"./studio-3w35qvay.js";import"./studio-03mqh8ax.js";export{gL as adoptCanvasPreviewMode,dL as allowAutoRequestsOnNextRender,Nb as beginDragSession,pL as canvasIdleBlockers,mL as canvasPointAt,Kw as clearDropIndicator,Yw as commitActiveEditSession,GS as currentDragSession,$L as dragHostTab,Gw as endDragSession,hL as flushCanvasEdits,JS as getEditBarAnchorRect,ql as getEditSnapshot,Ul as hostDragGeometry,qS as hostForCanvas,SL as isCaretActive,Db as liveDragHostAt,sP as measureInCanvas,IL as mountIframeCanvas,RL as mountStylebookCanvas,ML as panToStylebookTag,fL as pointerAnchor,ih as postApplyFormat,DL as postColorSchemeToLiveHosts,LL as postDialogOpen,Pc as postDragMessage,NL as postLocaleToLiveHosts,FL as postOpenSlash,KS as postPatchToHosts,TL as postPopoverOpen,AL as postRedefineElementToLiveHosts,OL as postSiteStyleToLiveHosts,Jw as postStyleUpdateToStylebookHosts,Ob as releaseCanvasHosts,uL as requestCanvasEval,Ab as revealCanvasPath,H2 as revealCanvasPathIn,cL as sawIframeDragOver,xL as setCanvasContextMenuHandler,kL as setCanvasPointerDownHandler,wL as setCanvasSlashHandler,yL as setFileDropHandler,EL as setIframePatchEscalation,vL as setInsertZoneClickHandler,PL as setKeymapSource,bL as setNativeDragEnterHandler,_L as setStylebookHitHandler,CL as setToolbarRefresh};
|
|
2
|
-
|
|
3
|
-
//# debugId=5D3C12CFFB1455CE64756E2164756E21
|
|
4
|
-
//# sourceMappingURL=iframe-host-na2mywz4.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{HI,BI,zI,WI,VI,wu,UI,Mg,qI,Vf,GI,Uf,u2,X0,ck,h2,p2,f2,m2,xu,g2,b2,v2,dk,uk,y2,w2,x2,_2,hk,S2}from"./studio-m48v13s3.js";import{yd,Q0,Pg,C2,ZI,XI,QI,eR,Fg,mk,gk}from"./studio-dx73md4n.js";import{zs,tP}from"./studio-h5tpz5ke.js";import{Se,oe,Lv,$v}from"./studio-ekgtrndg.js";export{VI as COLLAB_SCHEMA_VERSION,xu as CollabPathError,Fg as EnvelopeError,XI as FRAME_AWARENESS,eR as FRAME_CONTROL,QI as FRAME_DOC_CLOSE,ZI as FRAME_DOC_SYNC,BI as FRONTMATTER_KEY,p2 as LOCAL_ORIGIN,HI as META_KEY,f2 as MIRROR_ORIGIN,hk as PRESENCE_PALETTE,m2 as SEED_ORIGIN,WI as SOURCE_KEY,zI as STRUCTURE_KEY,C2 as UndoManager,yd as YDoc,y2 as acquireSourceCanonical,$v as applyDocOpToDoc,g2 as applyDocOpsToY,dk as canonicalOf,uk as canonicalRevOf,Lv as childArray,Se as cloneValue,S2 as colorForKey,Pg as createAbsolutePositionFromRelativePosition,Q0 as createRelativePositionFromTypeIndex,gk as decodeFrame,zs as deepEqual,tP as diffDocs,mk as encodeFrame,UI as frontmatterMap,oe as getNodeAtPath,_2 as isSourceReconciler,wu as metaMap,x2 as otherSourceEditors,w2 as releaseSourceCanonical,v2 as replaceYStructure,X0 as resolveYPath,h2 as seedStructure,qI as sourceText,Mg as structureMap,Vf as toYChildren,GI as toYNode,ck as updateSourceText,u2 as yDocToJson,b2 as yEventsToDocOps,Uf as yValueToJson};
|
|
2
|
-
|
|
3
|
-
//# debugId=9C7A756F61754BAE64756E2164756E21
|
|
4
|
-
//# sourceMappingURL=index-ewmgdb7c.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{tt,f$,qb,m$,qo,pC,xi,Zs,Gb,g$}from"./studio-jttyqrmh.js";import"./studio-ajw4k8hp.js";import"./studio-cpkamjdn.js";import"./studio-ry81j4q1.js";import"./studio-4kzbrr5t.js";import"./studio-psh8mwnw.js";export{Gb as clearLayerSlot,Zs as getLayerSlot,f$ as initLayers,qb as isModalOpen,m$ as isPopoverOpen,tt as layerHost,g$ as overlayIdleBlockers,qo as showConfirmDialog,xi as showPromptDialog,pC as showSaveDiscardDialog};
|
|
2
|
-
|
|
3
|
-
//# debugId=88BB605569A862BE64756E2164756E21
|
|
4
|
-
//# sourceMappingURL=layers-8rn8y6qv.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{E2,Rk}from"./studio-v9ywz2se.js";import"./studio-9dz76yqc.js";import"./studio-2j86y34y.js";import"./studio-d83m0wyq.js";import"./studio-wxhy1yh7.js";import"./studio-jw0q5j6k.js";import"./studio-fy7jzj9j.js";import"./studio-k3a8rp3d.js";import"./studio-pgm83a2f.js";import"./studio-agyvzfm4.js";import"./studio-x97ay0v4.js";import"./studio-c1pxszat.js";import"./studio-gwrhcrss.js";import"./studio-gr36vnte.js";import"./studio-hy4ye0dx.js";import"./studio-2hsqbq7b.js";import"./studio-9cxmp61c.js";import"./studio-pqqq6v85.js";import"./studio-1e8dw2w2.js";import"./studio-5wzdy1jc.js";import"./studio-ewarnzm4.js";import"./studio-34jrz12k.js";import"./studio-x3mjr5cc.js";import"./studio-h7weqf2q.js";import"./studio-771k2n12.js";import"./studio-jttyqrmh.js";import"./studio-ajw4k8hp.js";import"./studio-cpkamjdn.js";import"./studio-h310mbqm.js";import"./studio-de1s2x9v.js";import"./studio-k3bcy02e.js";import"./studio-vzgmyt0v.js";import"./studio-x08a3m0a.js";import"./studio-ry81j4q1.js";import"./studio-4kzbrr5t.js";import"./studio-psh8mwnw.js";import"./studio-3w35qvay.js";import"./studio-03mqh8ax.js";import"./studio-k1wvtp03.js";export{Rk as registerLayersPanel,E2 as startLayerTitleEdit};
|
|
2
|
-
|
|
3
|
-
//# debugId=9D18EB13B3EDE2D064756E2164756E21
|
|
4
|
-
//# sourceMappingURL=layers-panel-eyah7h9z.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{nP,wb,KD,fS,_w,LT,$T,M2,iP,P2,mS,oP,IT}from"./studio-p1n2xjda.js";import"./studio-pgm83a2f.js";import"./studio-agyvzfm4.js";import"./studio-x97ay0v4.js";import"./studio-c1pxszat.js";import"./studio-gwrhcrss.js";import"./studio-ndskgqef.js";import"./studio-gr36vnte.js";import"./studio-hy4ye0dx.js";import"./studio-2hsqbq7b.js";import"./studio-9cxmp61c.js";import"./studio-pqqq6v85.js";import"./studio-1e8dw2w2.js";import"./studio-5wzdy1jc.js";import"./studio-ewarnzm4.js";import"./studio-34jrz12k.js";import"./studio-x3mjr5cc.js";import"./studio-h7weqf2q.js";import"./studio-771k2n12.js";import"./studio-jttyqrmh.js";import"./studio-ajw4k8hp.js";import"./studio-cpkamjdn.js";import"./studio-h310mbqm.js";import"./studio-de1s2x9v.js";import"./studio-k3bcy02e.js";import"./studio-vzgmyt0v.js";import"./studio-x08a3m0a.js";import"./studio-ry81j4q1.js";import"./studio-4kzbrr5t.js";import"./studio-psh8mwnw.js";import"./studio-3w35qvay.js";import"./studio-03mqh8ax.js";export{nP as MEDIA_HOME_MODE,M2 as applyMediaBrowse,mS as closeMediaPickDialog,KD as deleteMediaFile,_w as detachMediaLibrary,$T as focusMediaHome,fS as mediaLibraryMounted,oP as openMediaPickDialog,LT as renderMediaLibrary,P2 as requestMediaReplace,iP as requestMediaUpload,IT as resetMediaLibrary,wb as selectedEntry};
|
|
2
|
-
|
|
3
|
-
//# debugId=0B26CADF271A4C7664756E2164756E21
|
|
4
|
-
//# sourceMappingURL=media-library-gs3np47y.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{DT,NT,Wu,kw,F2,vS,j2,yS,Hl,bm}from"./studio-agyvzfm4.js";import"./studio-gr36vnte.js";import"./studio-34jrz12k.js";import"./studio-x3mjr5cc.js";import"./studio-jttyqrmh.js";import"./studio-ajw4k8hp.js";import"./studio-cpkamjdn.js";import"./studio-de1s2x9v.js";import"./studio-k3bcy02e.js";import"./studio-vzgmyt0v.js";import"./studio-x08a3m0a.js";import"./studio-ry81j4q1.js";import"./studio-4kzbrr5t.js";import"./studio-psh8mwnw.js";import"./studio-3w35qvay.js";import"./studio-03mqh8ax.js";export{kw as invalidateMediaCache,DT as isMediaScanPath,Hl as mountMediaPicker,NT as onProjectMediaChange,F2 as openFullMediaPicker,yS as pickAndUpload,Wu as projectMediaFiles,vS as showMediaPickerPopover,bm as unmountMediaPicker,j2 as uploadAndAssign};
|
|
2
|
-
|
|
3
|
-
//# debugId=FA358044FC8F149F64756E2164756E21
|
|
4
|
-
//# sourceMappingURL=media-picker-tt7dk4tb.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Kp,gv,bv,K$,Jd,Jp,Yd,Yp}from"./studio-x08a3m0a.js";import"./studio-4kzbrr5t.js";export{Kp as BUFFER_COMMIT,Jd as bufferIsLive,Jp as bufferMovedOn,gv as bufferWrites,K$ as cancelBufferWrites,bv as commitBufferWrites,Yd as commitTabBuffers,Yp as tabBufferUnsaved};
|
|
2
|
-
|
|
3
|
-
//# debugId=587DEA207F66387764756E2164756E21
|
|
4
|
-
//# sourceMappingURL=monaco-buffer-wsf6cmnq.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{rf,sI,Tv,aI,p,_e}from"./studio-03mqh8ax.js";export{rf as canOpenProject,p as getPlatform,_e as hasPlatform,Tv as launcherSignal,aI as platformInFlight,sI as registerPlatform};
|
|
2
|
-
|
|
3
|
-
//# debugId=6149BBFCC07A9BA664756E2164756E21
|
|
4
|
-
//# sourceMappingURL=platform-c16mqvmp.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{wk,J2}from"./studio-xh683qzy.js";import"./studio-yx8hzqja.js";import"./studio-2hsqbq7b.js";import"./studio-5wzdy1jc.js";import"./studio-h7weqf2q.js";import"./studio-771k2n12.js";import"./studio-jttyqrmh.js";import"./studio-ajw4k8hp.js";import"./studio-cpkamjdn.js";import"./studio-vzgmyt0v.js";import"./studio-x08a3m0a.js";import"./studio-ry81j4q1.js";import"./studio-4kzbrr5t.js";import"./studio-psh8mwnw.js";import"./studio-3w35qvay.js";import"./studio-03mqh8ax.js";export{J2 as openPublishPanel,wk as seedPublishConnected};
|
|
2
|
-
|
|
3
|
-
//# debugId=226A4412FFE633F864756E2164756E21
|
|
4
|
-
//# sourceMappingURL=publish-panel-d34bhvwj.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{nR,xk,o_,r_,_k}from"./studio-tj2s0tks.js";import"./studio-38g0jdz7.js";import"./studio-hwejq03c.js";import"./studio-epenqmvk.js";import"./studio-ndskgqef.js";import"./studio-gr36vnte.js";import"./studio-hy4ye0dx.js";import"./studio-2hsqbq7b.js";import"./studio-9cxmp61c.js";import"./studio-pqqq6v85.js";import"./studio-1e8dw2w2.js";import"./studio-5wzdy1jc.js";import"./studio-ewarnzm4.js";import"./studio-34jrz12k.js";import"./studio-x3mjr5cc.js";import"./studio-h7weqf2q.js";import"./studio-771k2n12.js";import"./studio-jttyqrmh.js";import"./studio-ajw4k8hp.js";import"./studio-cpkamjdn.js";import"./studio-de1s2x9v.js";import"./studio-k3bcy02e.js";import"./studio-vzgmyt0v.js";import"./studio-x08a3m0a.js";import"./studio-ry81j4q1.js";import"./studio-4kzbrr5t.js";import"./studio-psh8mwnw.js";import"./studio-3w35qvay.js";import"./studio-03mqh8ax.js";export{r_ as detachPublishWorkspace,xk as focusPublishHome,o_ as publishWorkspaceMounted,_k as renderPublishWorkspace,nR as showPublishTab};
|
|
2
|
-
|
|
3
|
-
//# debugId=D7F8A122C50D058864756E2164756E21
|
|
4
|
-
//# sourceMappingURL=publish-workspace-2yr60mt4.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Sk,zg}from"./studio-3v5cagy9.js";import"./studio-3zge48z4.js";import"./studio-k3a8rp3d.js";import"./studio-d038kqbs.js";import"./studio-2ks6ka4g.js";import"./studio-wxdcd42g.js";import"./studio-hwejq03c.js";import"./studio-epenqmvk.js";import"./studio-x97ay0v4.js";import"./studio-c1pxszat.js";import"./studio-gwrhcrss.js";import"./studio-ndskgqef.js";import"./studio-gr36vnte.js";import"./studio-hy4ye0dx.js";import"./studio-2hsqbq7b.js";import"./studio-9cxmp61c.js";import"./studio-pqqq6v85.js";import"./studio-1e8dw2w2.js";import"./studio-5wzdy1jc.js";import"./studio-ewarnzm4.js";import"./studio-34jrz12k.js";import"./studio-x3mjr5cc.js";import"./studio-h7weqf2q.js";import"./studio-771k2n12.js";import"./studio-jttyqrmh.js";import"./studio-ajw4k8hp.js";import"./studio-cpkamjdn.js";import"./studio-h310mbqm.js";import"./studio-de1s2x9v.js";import"./studio-k3bcy02e.js";import"./studio-vzgmyt0v.js";import"./studio-x08a3m0a.js";import"./studio-ry81j4q1.js";import"./studio-4kzbrr5t.js";import"./studio-psh8mwnw.js";import"./studio-3w35qvay.js";import"./studio-03mqh8ax.js";export{Sk as initQuickSearch,zg as openQuickSearch};
|
|
2
|
-
|
|
3
|
-
//# debugId=B1FD077F611E0D8464756E2164756E21
|
|
4
|
-
//# sourceMappingURL=quick-search-e6xsdv0d.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{hh,Bd,La,k$,Sr,E$,Qb,T$,ev}from"./studio-de1s2x9v.js";import"./studio-psh8mwnw.js";import"./studio-03mqh8ax.js";export{Sr as invalidateUsages,La as loadUsages,E$ as onUsagesInvalidated,Bd as peekUsages,k$ as retryUsages,ev as usageFiles,Qb as usageHeadline,T$ as usageWarning,hh as usagesSupported};
|
|
2
|
-
|
|
3
|
-
//# debugId=C7AD0D04C3D93B3C64756E2164756E21
|
|
4
|
-
//# sourceMappingURL=references-gsj6trdv.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{dR,Ck,Y2,kk,Wg,Dl,Su}from"./studio-yg3djpnm.js";import"./studio-9dz76yqc.js";import"./studio-2j86y34y.js";import"./studio-vswcpzk7.js";import"./studio-wxhy1yh7.js";import"./studio-zg16eeq1.js";import"./studio-zgx7svjd.js";import"./studio-fy7jzj9j.js";import"./studio-3zge48z4.js";import"./studio-k3a8rp3d.js";import"./studio-d038kqbs.js";import"./studio-2ks6ka4g.js";import"./studio-wxdcd42g.js";import"./studio-hwejq03c.js";import"./studio-epenqmvk.js";import"./studio-pgm83a2f.js";import"./studio-agyvzfm4.js";import"./studio-x97ay0v4.js";import"./studio-c1pxszat.js";import"./studio-gwrhcrss.js";import"./studio-ndskgqef.js";import"./studio-gr36vnte.js";import"./studio-hy4ye0dx.js";import"./studio-2hsqbq7b.js";import"./studio-9cxmp61c.js";import"./studio-pqqq6v85.js";import"./studio-1e8dw2w2.js";import"./studio-5wzdy1jc.js";import"./studio-ewarnzm4.js";import"./studio-34jrz12k.js";import"./studio-x3mjr5cc.js";import"./studio-h7weqf2q.js";import"./studio-771k2n12.js";import"./studio-jttyqrmh.js";import"./studio-ajw4k8hp.js";import"./studio-cpkamjdn.js";import"./studio-h310mbqm.js";import"./studio-de1s2x9v.js";import"./studio-k3bcy02e.js";import"./studio-vzgmyt0v.js";import"./studio-x08a3m0a.js";import"./studio-ry81j4q1.js";import"./studio-4kzbrr5t.js";import"./studio-psh8mwnw.js";import"./studio-3w35qvay.js";import"./studio-03mqh8ax.js";import"./studio-k1wvtp03.js";export{Dl as inspectorTab,Ck as mount,Wg as render,kk as restingInspectorTab,Su as setInspectorTab,dR as stripOf,Y2 as unmount};
|
|
2
|
-
|
|
3
|
-
//# debugId=2A0F79E0F48C224764756E2164756E21
|
|
4
|
-
//# sourceMappingURL=right-panel-33jv1knc.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Ws,rT,cS,dS,vb,wa,sT,aT,lT,cT,dT,uT,hT,pT,fT,mT,gT,bT,vT,yT,uS,wT,xT,xw,_T,ST,yb,CT}from"./studio-hwejq03c.js";import"./studio-epenqmvk.js";import"./studio-ndskgqef.js";import"./studio-gr36vnte.js";import"./studio-hy4ye0dx.js";import"./studio-2hsqbq7b.js";import"./studio-9cxmp61c.js";import"./studio-pqqq6v85.js";import"./studio-1e8dw2w2.js";import"./studio-5wzdy1jc.js";import"./studio-ewarnzm4.js";import"./studio-34jrz12k.js";import"./studio-x3mjr5cc.js";import"./studio-h7weqf2q.js";import"./studio-771k2n12.js";import"./studio-jttyqrmh.js";import"./studio-ajw4k8hp.js";import"./studio-cpkamjdn.js";import"./studio-de1s2x9v.js";import"./studio-k3bcy02e.js";import"./studio-vzgmyt0v.js";import"./studio-x08a3m0a.js";import"./studio-ry81j4q1.js";import"./studio-4kzbrr5t.js";import"./studio-psh8mwnw.js";import"./studio-3w35qvay.js";import"./studio-03mqh8ax.js";export{ST as armGitPoll,uS as changeRow,yT as checkoutBranch,yb as cleanupSourceControl,dS as cloneRepository,xT as commitRow,vT as createBranch,bT as discardFile,cS as fetchGitLog,hT as fetchRemote,wT as groupFilesByComponent,gT as includeNewChanges,_T as lastUpdatedLabel,lT as loadDiffForLens,rT as noteFileSaved,uT as openFileComparison,wa as platformHostsGit,sT as platformOpensPullRequests,vb as platformSupportsClone,pT as pullRemote,Ws as refreshGitStatus,CT as registerSourceControlCommands,xw as relativeDate,dT as runCloneRepository,mT as setAllIncluded,fT as setIncluded,cT as setSourceControlDeps,aT as statusTag};
|
|
2
|
-
|
|
3
|
-
//# debugId=55FBA1F2C604823C64756E2164756E21
|
|
4
|
-
//# sourceMappingURL=source-control-bj9bejjv.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{n,Q,_}from"./studio-zkq3r91p.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 Tv(){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,Tv,aI,p,_e};
|
|
3
|
-
|
|
4
|
-
//# debugId=F1FEC373E0FD544664756E2164756E21
|
|
5
|
-
//# sourceMappingURL=studio-03mqh8ax.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{p,_e}from"./studio-03mqh8ax.js";import{Cs}from"./studio-wxdcd42g.js";import{te}from"./studio-psh8mwnw.js";import{ge,ne,g,C}from"./studio-4kzbrr5t.js";import{wi,T,R,rt,xi}from"./studio-jttyqrmh.js";import{Vt,ln,go,nv}from"./studio-vzgmyt0v.js";import{Vs}from"./studio-hy4ye0dx.js";import{Wt}from"./studio-x97ay0v4.js";import{Sr}from"./studio-de1s2x9v.js";import{Rp}from"./studio-x3mjr5cc.js";import{tr}from"./studio-34jrz12k.js";import{yr,Yu,ES,yN,Lb,di,Fw,SN,Wl,IS,Qu,kN,Cp}from"./studio-pqqq6v85.js";import{_b,Sb}from"./studio-c1pxszat.js";import{yi}from"./studio-3zge48z4.js";import{hp,V_,yE,rb,wE,ow,rw,pD,_E,dm,sw,gD,SE,sb,bD,vD,yD,wD,xD,CE,_D}from"./studio-zgx7svjd.js";import{Ml}from"./studio-dbxv7w4s.js";import{eS}from"./studio-k3a8rp3d.js";import{ya}from"./studio-d038kqbs.js";import{JD,Sw,Cw,bp}from"./studio-pgm83a2f.js";import{xp}from"./studio-732mw0g8.js";import{S,xn}from"./studio-45gyxpcq.js";import{n,Q,_,v}from"./studio-zkq3r91p.js";import{le}from"./studio-7xag4na8.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("y3w71k1n"),import("./file-ops-y3w71k1n.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 Yg(){ae+=1,q=null,V=null}function fe(e){return re.add(e),()=>{re.delete(e)}}function Vy(e){return e?"true":"false"}function GR(e){return e.trim().toLowerCase()}function Zg(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=nv(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:Vy(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=Zg(t,i.label),o)a.push(i);continue}if(i.kind==="page")r=null;if(i.kind==="entry-page"&&o||Zg(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(!Zg(a,i,o))return[];return[{detail:o===r?"default layout":"",key:o,label:i,path:o,selected:Vy(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 Uy(e,t){let a=e.shadowRoot??e.attachShadow({mode:"open"}),r=Be(e.ownerDocument);a.adoptedStyleSheets=[...JD(),...e.ownerDocument.adoptedStyleSheets,...r?[r]:[]],a.replaceChildren(t)}function qy(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?Vt(e.locale):"";case"modified":return qe(e.modified);case"name":return e.name;case"path":return e.record?.source??e.path;case"size":return Ge(e.size);case"type":return e.type;case"url":return e.collection===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;yN(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&&!qy(r))Uy(r,a)}finally{e.pendingPaths.delete(t)}}function Te(e,t,a){let r=e.cache.get(a);if(qy(t))return;if(r){Uy(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=Wt({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 Sb(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 _b(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 ${Lb(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=sb(),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("snx1s4b0"),import("./add-new-flow-snx1s4b0.js"));await t(e)}function gt(e,t,a){return{checked:a?"true":"false",key:e,label:t}}function ht(e,t){let a=`${t.locale===""?"":` in ${Vt(t.locale)}`}${t.filter===""?"":` filtered to ${t.filter}`}`,r=t.query.trim();return`No ${e.kind==="pages"?"pages":e.title.toLowerCase()} match${r?` “${r}”`:""}${a}.`}function yt(e,t,a,r){if(a>0)return t;if(y.loading||!e.scanned())return"loading";if(e.failures().length>0)return"incomplete";return r===0?"empty":"nomatch"}function 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?"":rb(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=ow(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":Lb(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??SN(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,sw[h],i===h)),localeOptions:[{label:"All languages",value:"all"},...K.map((h)=>({label:Vt(h),value:h}))],filterOptions:f===null?[]:[{label:`Any ${f.title.toLowerCase()}`,value:"all"},...f.values.map((h)=>({label:h,value:h}))],filterState:f!==null&&f.values.length>1?"shown":"hidden",filterValue:x===""?"all":x,localeState:K.length<2?"hidden":"shown",localeValue:o.locale===""?"all":o.locale,newLabel:`New ${r.item}`,newState:r.fileBacked?"hidden":"shown",pad:`padding-top:calc(var(--jx-space-4) + ${D.padTop}px);padding-bottom:calc(var(--jx-space-4) + ${D.padBottom}px)`,padBottom:`height:${D.padBottom}px`,padTop:`height:${D.padTop}px`,page:ut(r,G?null:Qu(r.key,o.locale),Ee(),G||o.locale!==""?[]:kN(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=rw(()=>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{Yg,Vy,GR,Zg,Sd,KR,JR,qk,Uy,qy,Xa,Du,YR,Gk,$_,I_,Cd,Kk,Jk,Yk,Zk,R_,ZR,XR};
|
|
5
|
-
|
|
6
|
-
//# debugId=9F4B17159D75DFCC64756E2164756E21
|
|
7
|
-
//# sourceMappingURL=studio-0ydxv2mr.js.map
|