@jxsuite/studio 8.1.0 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{2020-dg097k3e.js → 2020-89fz3pfy.js} +3 -3
- package/dist/chunks/adapter-ay13gema.js +4 -0
- package/dist/chunks/add-new-flow-nmkqpjym.js +4 -0
- package/dist/chunks/cf-account-picker-2e06qxey.js +4 -0
- package/dist/chunks/cf-settings-5y04810c.js +4 -0
- package/dist/chunks/color-04361ttk.js +4 -0
- package/dist/chunks/{color-area-vh9cew51.js → color-area-h8dbasp1.js} +2 -2
- package/dist/chunks/{color-field-e78f16bs.js → color-field-qv5r2b16.js} +3 -3
- package/dist/chunks/{color-slider-fg4yhvk6.js → color-slider-nz2mrzky.js} +2 -2
- package/dist/chunks/components-3vf75n83.js +4 -0
- package/dist/chunks/content-source-4f2raf4a.js +4 -0
- package/dist/chunks/{convert-to-repeater-grnmea6c.js → convert-to-repeater-j9hfcj4f.js} +3 -3
- package/dist/chunks/editor-645krvtz.js +4 -0
- package/dist/chunks/entry-commands-3qmv8wkr.js +4 -0
- package/dist/chunks/{extension-sections-rp7fkega.js → extension-sections-thfke054.js} +3 -3
- package/dist/chunks/file-ops-kkhp9ma7.js +4 -0
- package/dist/chunks/files-yswdhxrf.js +4 -0
- package/dist/chunks/format-host-4g8ex6bz.js +4 -0
- package/dist/chunks/fs-events-z9gpvc6t.js +4 -0
- package/dist/chunks/grid-open-fm4j183c.js +4 -0
- package/dist/chunks/{grid-view-x26rfpz1.js → grid-view-7d2nx83y.js} +10 -10
- package/dist/chunks/{iframe-entry-pkgmcgp0.js → iframe-entry-2x9bn5ng.js} +4 -4
- package/dist/chunks/{iframe-entry-02wzcyvy.js → iframe-entry-btck0e9s.js} +4 -4
- package/dist/chunks/iframe-host-q7fedsmr.js +4 -0
- package/dist/chunks/{index-203h71wy.js → index-jxmt7vh8.js} +3 -3
- package/dist/chunks/index-pt4wh98x.js +4 -0
- package/dist/chunks/{javascript-ww5pv5ae.js → javascript-vmqp56ke.js} +2 -2
- package/dist/chunks/{jsonMode-vwbdwwq3.js → jsonMode-n3wmpant.js} +6 -6
- package/dist/chunks/jx-validate-19y62knt.js +4 -0
- package/dist/chunks/layers-panel-1qvc83y9.js +4 -0
- package/dist/chunks/layers-qf0bc7ze.js +4 -0
- package/dist/chunks/lit-html-wyqw04y2.js +4 -0
- package/dist/chunks/media-library-f9d5qcjb.js +4 -0
- package/dist/chunks/media-picker-rsb1fmk2.js +4 -0
- package/dist/chunks/{monaco-binding-63tqze27.js → monaco-binding-wfhmz89d.js} +3 -3
- package/dist/chunks/monaco-buffer-ak0raadw.js +4 -0
- package/dist/chunks/{monaco-setup-zyyynnj8.js → monaco-setup-fty7a8vg.js} +3 -3
- package/dist/chunks/notify-4qj70q0x.js +4 -0
- package/dist/chunks/parse-n8dfxnqf.js +4 -0
- package/dist/chunks/platform-ehg6t9vd.js +4 -0
- package/dist/chunks/publish-panel-yhmda3cd.js +4 -0
- package/dist/chunks/{publish-quick-ajzdhhs6.js → publish-quick-12hh8926.js} +3 -3
- package/dist/chunks/publish-workspace-hx8qdv9p.js +4 -0
- package/dist/chunks/quick-search-r955m3q1.js +4 -0
- package/dist/chunks/references-8gxv0x7t.js +4 -0
- package/dist/chunks/right-panel-jarwqjpy.js +4 -0
- package/dist/chunks/source-control-84qt25m9.js +4 -0
- package/dist/chunks/studio-0nefxhar.js +7 -0
- package/dist/chunks/studio-0rg30pvs.js +5 -0
- package/dist/chunks/{studio-3q6n9qvq.js → studio-14hh60j8.js} +4 -4
- package/dist/chunks/studio-1cfyd1ys.js +5 -0
- package/dist/chunks/studio-2bq7hheq.js +5 -0
- package/dist/chunks/{studio-mmqr9awv.js → studio-32d8wyxq.js} +33 -33
- package/dist/chunks/studio-3hpcawh8.js +4 -0
- package/dist/chunks/{studio-zm7dnr9g.js → studio-4j35hgsw.js} +4 -4
- package/dist/chunks/{studio-bqgs90r8.js → studio-4qg61g9j.js} +4 -4
- package/dist/chunks/studio-4rgem12q.js +5 -0
- package/dist/chunks/studio-6k9djnxw.js +5 -0
- package/dist/chunks/studio-6rbaedw2.js +9 -0
- package/dist/chunks/studio-732mw0g8.js +5 -0
- package/dist/chunks/studio-79r8msnr.js +7 -0
- package/dist/chunks/studio-7q6jdd4h.js +5 -0
- package/dist/chunks/{studio-jqrg9xxg.js → studio-881z1xrx.js} +4 -4
- package/dist/chunks/{studio-9wyqyfqy.js → studio-8hf8qcm1.js} +4 -4
- package/dist/chunks/{studio-6vrxzkba.js → studio-8pne0rx4.js} +4 -4
- package/dist/chunks/{studio-wcakp5bt.js → studio-9179bsm7.js} +7 -7
- package/dist/chunks/{studio-xddgbwhe.js → studio-9ff0vqff.js} +3 -3
- package/dist/chunks/{studio-25a5by3h.js → studio-9gzvypw4.js} +4 -4
- package/dist/chunks/studio-9ndgd55w.js +5 -0
- package/dist/chunks/studio-9ra9e7m4.js +5 -0
- package/dist/chunks/studio-a6e5fzve.js +5 -0
- package/dist/chunks/studio-a9k86nq6.js +5 -0
- package/dist/chunks/studio-ae7a69jc.js +6 -0
- package/dist/chunks/studio-aghsg0ds.js +7 -0
- package/dist/chunks/{studio-2b8443ms.js → studio-ajw4k8hp.js} +3 -3
- package/dist/chunks/{studio-957jg8g3.js → studio-apapy17g.js} +4 -4
- package/dist/chunks/{studio-hnx1h1pr.js → studio-by8x0jvc.js} +4 -4
- package/dist/chunks/{studio-hxq1ebp0.js → studio-c88gq88j.js} +6 -6
- package/dist/chunks/{studio-a6x058ew.js → studio-cg54vtet.js} +4 -4
- package/dist/chunks/studio-dvhxxxbd.js +5 -0
- package/dist/chunks/{studio-1meqbxns.js → studio-e4rq6x0q.js} +4 -4
- package/dist/chunks/{studio-v2ek69cb.js → studio-ekzbgnjp.js} +4 -4
- package/dist/chunks/{studio-2dtc90zs.js → studio-fg4fj9ec.js} +6 -6
- package/dist/chunks/studio-fj6jzgxw.js +5 -0
- package/dist/chunks/{studio-txkx6586.js → studio-g45r5vm8.js} +7 -7
- package/dist/chunks/{studio-v0gsjav0.js → studio-gczve8zf.js} +4 -4
- package/dist/chunks/studio-ge08zwpv.js +5 -0
- package/dist/chunks/{studio-1gdfsr49.js → studio-gk9yk8dj.js} +7 -7
- package/dist/chunks/{studio-cpdzrdgp.js → studio-gskkgfe3.js} +4 -4
- package/dist/chunks/{studio-94ppxeqy.js → studio-h4jbgne2.js} +8 -8
- package/dist/chunks/{studio-kdseew9m.js → studio-hcy9zeac.js} +4 -4
- package/dist/chunks/studio-ht81xjkr.js +5 -0
- package/dist/chunks/{studio-73wz63nn.js → studio-jr30g4ae.js} +4 -4
- package/dist/chunks/{studio-fqs1a22a.js → studio-k5n4es74.js} +4 -4
- package/dist/chunks/{studio-j5jqvyn3.js → studio-k6hbx2fc.js} +4 -4
- package/dist/chunks/{studio-332hesdk.js → studio-kqh7fxn6.js} +4 -4
- package/dist/chunks/{studio-8nyw10dp.js → studio-kyw47pet.js} +4 -4
- package/dist/chunks/studio-mkw17ngg.js +5 -0
- package/dist/chunks/{studio-02phtmqn.js → studio-myb4mf0h.js} +4 -4
- package/dist/chunks/{studio-d140sy8e.js → studio-n4qq1n57.js} +4 -4
- package/dist/chunks/{studio-bf0rgyf7.js → studio-nfmpmkqb.js} +4 -4
- package/dist/chunks/studio-nfwacw31.js +5 -0
- package/dist/chunks/{studio-z42kysg7.js → studio-nm86874b.js} +136 -136
- package/dist/chunks/studio-nqexty8x.js +16 -0
- package/dist/chunks/studio-nr0kcqc6.js +5 -0
- package/dist/chunks/{studio-dmn7gpba.js → studio-nvfa137z.js} +5 -5
- package/dist/chunks/studio-psh8mwnw.js +4 -0
- package/dist/chunks/{studio-4dsdnan2.js → studio-qd0cycm4.js} +5 -5
- package/dist/chunks/{studio-zht0x0v3.js → studio-qevf5z9d.js} +4 -4
- package/dist/chunks/studio-qs5fmhtj.js +14 -0
- package/dist/chunks/studio-ry4789ng.js +7 -0
- package/dist/chunks/studio-s4fq9jht.js +5 -0
- package/dist/chunks/studio-sc35ttdk.js +5 -0
- package/dist/chunks/studio-sm2f0sc6.js +6 -0
- package/dist/chunks/{studio-rdnezzkd.js → studio-spza69tb.js} +5 -5
- package/dist/chunks/studio-t6dqnnft.js +5 -0
- package/dist/chunks/{studio-hw60n5dh.js → studio-tfmhnwyr.js} +3 -3
- package/dist/chunks/studio-tn7v8gey.js +6 -0
- package/dist/chunks/{studio-nsv7g1qn.js → studio-trcfer2b.js} +4 -4
- package/dist/chunks/studio-tyw7tk0x.js +5 -0
- package/dist/chunks/{studio-533py3yy.js → studio-tyzgte21.js} +4 -4
- package/dist/chunks/studio-vtey9w98.js +5 -0
- package/dist/chunks/studio-ws2r1d7e.js +5 -0
- package/dist/chunks/studio-x2trkhk5.js +5 -0
- package/dist/chunks/{studio-c5dj3dzk.js → studio-xzgp0cp7.js} +4 -4
- package/dist/chunks/studio-y47090vq.js +5 -0
- package/dist/chunks/{studio-nm9qev4p.js → studio-yjh9gddd.js} +5 -5
- package/dist/chunks/studio-ywf9y1e2.js +5 -0
- package/dist/chunks/{studio-x3ge4rts.js → studio-z1p91z5a.js} +4 -4
- package/dist/chunks/studio-ztppbam0.js +5 -0
- package/dist/chunks/{toast-host-1yg5ar8d.js → toast-host-g3r2s0kn.js} +2 -2
- package/dist/chunks/toast-w11qpkyz.js +4 -0
- package/dist/chunks/{tsMode-vra2hh7y.js → tsMode-byje4a01.js} +5 -5
- package/dist/chunks/workspace-7q4arnt3.js +4 -0
- package/dist/chunks/workspace-home-ge027kr6.js +4 -0
- package/dist/chunks/{ws-client-72x5n99j.js → ws-client-h09h6sqg.js} +3 -3
- package/dist/iframe-entry.js +13 -13
- package/dist/manifest.json +77 -77
- package/dist/studio.js +89 -89
- package/package.json +11 -12
- package/src/collab/collab-session.ts +6 -2
- package/src/commands/context.ts +4 -0
- package/src/commands/defaults.ts +2 -0
- package/src/commands/live-context.ts +2 -0
- package/src/files/files.ts +6 -3
- package/src/new-project/new-project-modal.ts +1 -4
- package/src/panels/ai-panel.ts +27 -34
- package/src/platform.ts +20 -0
- package/src/platforms/devserver.ts +2 -120
- package/src/services/ai-ask.ts +29 -171
- package/src/services/ai-command-tools.ts +40 -50
- package/src/services/ai-import-tools.ts +4 -5
- package/src/services/ai-project-tools.ts +13 -3
- package/src/services/ai-tools.ts +26 -564
- package/src/services/ai-writes.ts +84 -2
- package/src/services/document-assistant.ts +29 -58
- package/src/services/harness/assistant-tools.ts +68 -0
- package/src/services/harness/interaction-store.ts +118 -0
- package/src/services/harness/studio-documents.ts +105 -0
- package/src/services/harness/turn-hooks.ts +1 -6
- package/src/services/project-adoption.ts +8 -16
- package/src/services/tool-executor.ts +25 -22
- package/src/state.ts +3 -13
- package/src/surfaces/files-panel.json +12 -0
- package/src/surfaces/files-panel.ts +5 -2
- package/src/surfaces/welcome.ts +4 -1
- package/src/tabs/selection.ts +14 -109
- package/src/tabs/tab.ts +10 -1
- package/src/tabs/transact.ts +316 -124
- package/src/types.ts +13 -8
- package/dist/chunks/adapter-tck81zft.js +0 -4
- package/dist/chunks/add-new-flow-a1w0bnm6.js +0 -4
- package/dist/chunks/cf-account-picker-ce3kp3x1.js +0 -4
- package/dist/chunks/cf-settings-7ye6x7g2.js +0 -4
- package/dist/chunks/color-4gj49xq6.js +0 -4
- package/dist/chunks/components-qce0v93f.js +0 -4
- package/dist/chunks/content-source-jjx8kgzr.js +0 -4
- package/dist/chunks/editor-bkja5dbv.js +0 -4
- package/dist/chunks/entry-commands-1wh0btvg.js +0 -4
- package/dist/chunks/file-ops-6pe4z7an.js +0 -4
- package/dist/chunks/files-ybpp3j38.js +0 -4
- package/dist/chunks/format-host-3mtbhxk1.js +0 -4
- package/dist/chunks/fs-events-xfanfxds.js +0 -4
- package/dist/chunks/grid-open-dg5qmnaj.js +0 -4
- package/dist/chunks/iframe-host-j2bk2xkc.js +0 -4
- package/dist/chunks/index-fkrm7pdk.js +0 -4
- package/dist/chunks/jx-validate-w7v32f6a.js +0 -4
- package/dist/chunks/layers-g7j732cm.js +0 -4
- package/dist/chunks/layers-panel-gjrsxcck.js +0 -4
- package/dist/chunks/lit-html-jdfz9rhc.js +0 -4
- package/dist/chunks/media-library-9j0v4wmk.js +0 -4
- package/dist/chunks/media-picker-cpyyt2m0.js +0 -4
- package/dist/chunks/monaco-buffer-9wcme176.js +0 -4
- package/dist/chunks/notify-rahnnnv4.js +0 -4
- package/dist/chunks/parse-v77xtwv7.js +0 -4
- package/dist/chunks/platform-b2aqv7v5.js +0 -4
- package/dist/chunks/publish-panel-4yk2461b.js +0 -4
- package/dist/chunks/publish-workspace-mxestzcf.js +0 -4
- package/dist/chunks/quick-search-9g6z65b0.js +0 -4
- package/dist/chunks/references-c26enpxs.js +0 -4
- package/dist/chunks/right-panel-9d0e0yg7.js +0 -4
- package/dist/chunks/source-control-xyn3a8ds.js +0 -4
- package/dist/chunks/studio-0khd0xdw.js +0 -5
- package/dist/chunks/studio-1fvzq9vs.js +0 -5
- package/dist/chunks/studio-1yhz0s8p.js +0 -5
- package/dist/chunks/studio-2c2mjyzj.js +0 -6
- package/dist/chunks/studio-3pndhat0.js +0 -9
- package/dist/chunks/studio-4fjqdzrb.js +0 -6
- package/dist/chunks/studio-5abge3wy.js +0 -5
- package/dist/chunks/studio-74nzv280.js +0 -5
- package/dist/chunks/studio-7cg75gtj.js +0 -14
- package/dist/chunks/studio-89cwmnae.js +0 -5
- package/dist/chunks/studio-8m1t83kn.js +0 -7
- package/dist/chunks/studio-a3evp7f6.js +0 -6
- package/dist/chunks/studio-ana67wax.js +0 -5
- package/dist/chunks/studio-b4xhpcwy.js +0 -4
- package/dist/chunks/studio-c4rcaftm.js +0 -5
- package/dist/chunks/studio-cgjt1zce.js +0 -5
- package/dist/chunks/studio-cq87hree.js +0 -5
- package/dist/chunks/studio-e1g64q43.js +0 -5
- package/dist/chunks/studio-e8pzjjhf.js +0 -5
- package/dist/chunks/studio-f8kz3krj.js +0 -7
- package/dist/chunks/studio-fw3jp9m7.js +0 -5
- package/dist/chunks/studio-g6ysm05p.js +0 -7
- package/dist/chunks/studio-gmhd0j3f.js +0 -5
- package/dist/chunks/studio-gqpty626.js +0 -5
- package/dist/chunks/studio-grp684wx.js +0 -5
- package/dist/chunks/studio-h98520qr.js +0 -5
- package/dist/chunks/studio-hvxt8z79.js +0 -5
- package/dist/chunks/studio-j4e627w1.js +0 -5
- package/dist/chunks/studio-kt2j51sa.js +0 -5
- package/dist/chunks/studio-m4w6sygj.js +0 -16
- package/dist/chunks/studio-nqxqf8p2.js +0 -4
- package/dist/chunks/studio-p89w12s2.js +0 -7
- package/dist/chunks/studio-pbagym4j.js +0 -5
- package/dist/chunks/studio-pr23qhrw.js +0 -5
- package/dist/chunks/studio-r4ya3sb2.js +0 -5
- package/dist/chunks/studio-rm9m3z60.js +0 -5
- package/dist/chunks/studio-tpmnbgmt.js +0 -5
- package/dist/chunks/studio-ttxhq5yt.js +0 -5
- package/dist/chunks/studio-y1x65h5r.js +0 -5
- package/dist/chunks/studio-zf188hnd.js +0 -5
- package/dist/chunks/toast-1gv0h53h.js +0 -4
- package/dist/chunks/workspace-3nt93k48.js +0 -4
- package/dist/chunks/workspace-home-zbgyqqws.js +0 -4
- package/src/services/directory-picker.ts +0 -187
- package/src/services/gated-registry.ts +0 -77
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Q}from"./studio-nqxqf8p2.js";import{p}from"./studio-pr23qhrw.js";import{g,C}from"./studio-hw60n5dh.js";import"./studio-2b8443ms.js";import{Mt,Nt,uh,ae}from"./studio-7cg75gtj.js";import"./studio-6vrxzkba.js";import{qe,ft,T,R,Jt,rt,tt}from"./studio-02phtmqn.js";import{Bt,Aa,cr,Oa}from"./studio-tpmnbgmt.js";import{Pn,Vt,ln,go}from"./studio-y1x65h5r.js";import"./studio-grp684wx.js";import{gS}from"./studio-2dtc90zs.js";import"./studio-cq87hree.js";import"./studio-hnx1h1pr.js";import"./studio-9wyqyfqy.js";import"./studio-0khd0xdw.js";import"./studio-3q6n9qvq.js";import{ko,Gl}from"./studio-m4w6sygj.js";import"./studio-p89w12s2.js";import"./studio-wcakp5bt.js";import"./studio-nm9qev4p.js";import"./studio-gmhd0j3f.js";import{Wc,_a,Sa}from"./studio-hvxt8z79.js";import{Xu,Cb}from"./studio-5abge3wy.js";import{Ne,Rb}from"./studio-v2ek69cb.js";import"./studio-txkx6586.js";import"./studio-1yhz0s8p.js";import"./studio-fw3jp9m7.js";import"./studio-74nzv280.js";import"./studio-bqgs90r8.js";import"./studio-f8kz3krj.js";import{U_,NE,cw,J_,yi}from"./studio-g6ysm05p.js";import"./studio-xddgbwhe.js";import"./studio-j5jqvyn3.js";import"./studio-bf0rgyf7.js";import"./studio-k1wvtp03.js";import{rm}from"./studio-h98520qr.js";import"./studio-a6x058ew.js";import"./studio-3pndhat0.js";import"./studio-c5dj3dzk.js";import{Qk,Wy}from"./studio-dmn7gpba.js";import{Zg,Zy,Hs,Ic,O_,im,Xy,M_,dE,el,P_,Pu,F_,sD,uE,om,Xg,hE,pE,fE,aD,lD,j_}from"./studio-rm9m3z60.js";import{Vg}from"./studio-25a5by3h.js";import{Ug,kd,Ed}from"./studio-8m1t83kn.js";import{Jy,aE}from"./studio-ttxhq5yt.js";import{Ml}from"./studio-89cwmnae.js";import"./studio-j4e627w1.js";import{VE,pw}from"./studio-d140sy8e.js";import{as}from"./studio-nsv7g1qn.js";import"./studio-a3evp7f6.js";import"./studio-332hesdk.js";import"./studio-rdnezzkd.js";import{S,xn}from"./studio-ana67wax.js";import{n,v}from"./studio-kt2j51sa.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(qe,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)uh(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 Jt(c),l())return c;if(Mt(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 Qk()).map((t)=>({name:t.name,ref:t.path})).toSorted((t,r)=>t.name.localeCompare(r.name))}function _(){for(let e of U_("page")){if(e.ext===".json")continue;let t=Aa(e.ext,"serialize");if(t)return{ext:e.ext,name:t.name}}return null}function B(){let e=cr(),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 gS(e)){let l=Pn(go(o,r));if(l!==null)t[l]=o}return t}async function L(){await Bt().catch(()=>{});let e=await Promise.all(pw().map(async(t)=>{let r={dir:t.dir,ext:t.ext,formatName:j_(t),name:t.name,schema:t.schema};if(Xg(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:VE(),defaultLayout:S?.projectConfig?.defaults?.layout??null,hasSelection:Jy()!==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===Ic)return Ic;let o=el(r);return t.find((a)=>el(a.ref)===o||el(a.ref)===`layouts/${o}`||el(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(om(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)=>el(a.ref));throw RangeError(`command "file.new" argument "template": "${e.template}" names no template — `+`declared: ${[Hs,Ic,...l].join(", ")}`)}if(e.kind==="collection")r.pageTemplate=o===Ic?Hs:o;else if(e.kind==="template")r.startFrom=o===Hs||o===Ic?"":o;else r.startFrom=o}return r}async function X(e){if(e.format===null)return ko(e.doc,null);return Oa(e.format,e.doc,{frontmatter:e.frontmatter??!0,mode:"roundtrip"})}async function F(e,t,r=!1){for(let o of aD(fE(e)))await Promise.all(o.map(async(l)=>{if(!r&&t.has(l))return;t.set(l,lD(l,t)?new Set:await cw(l))}))}function k(e){if(Vg(e),Ed(),e.some((t)=>t.startsWith("pages/")))Cb(),Ug();NE(e).then((t)=>{if(t)Ed(),xn("leftPanel")})}async function P(e,t,r){let o;try{o=await X(t)}catch(l){throw C.error(`Could not prepare ${e}.`,{detail:Q(l),path:e,source:y}),Error(`could not prepare ${e}`,{cause:l})}if(await J_(e,o,{quiet:r,source:y})===null)throw Error(`could not write ${e}`)}async function Z(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),rm(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 Z(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===O_){let l=await aE(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":{Rb(e.path,e.content.doc),await yi(e.path);break}case"template":{Wy(),await yi(e.path);break}case"entry":{if(t.collection!==void 0)rm(t.collection);await Ml(e.path);break}default:await yi(e.path)}return o}async function Je(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=hE(t,e.name,o,r),a=new Map;await F(l,a,!0);let d=pE(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 Ve(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 cw(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=sD(r.schema,r.formatName!==null),f=uE(e,d,P_(Pu(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===im&&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 q(e,t){let r=t.layouts.map((o)=>w(o.ref,o.name,t.defaultLayout!==null&&el(o.ref)===el(t.defaultLayout)?"the site's default":"a template",e.pageStart));if(t.article!==null)r.push(w(Ic,"Article","mostly writing",e.pageStart));return r.push(w(Hs,"Blank","no template",e.pageStart)),r}function ee(){let e=Jy();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 te(){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=Zy[e.kind],a=Zg.filter((s)=>s!=="entry"||t.collections.length>0).map((s)=>({checked:s===e.kind?"true":"false",hint:Zy[s].hint,icon:Zy[s].icon,id:s,label:Zy[s].label})),d=r.config?.name??"",f=Xu(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&&Xg(b)),c=[...t.layouts.map((s)=>({label:s.name,value:s.ref})),{label:"No template",value:Hs}];return{canConfirm:o===""&&!e.busy,chordNote:te(),collection:e.collection,collectionOptions:t.collections.map((s)=>({label:kd(s.name),value:s.name})),componentChoices:[w("blank","Blank","an empty block",e.componentStart),w(O_,"Current selection",ee(),e.componentStart,t.hasSelection===!0?"":"Select an element on the canvas first."),w(im,"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===im,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:Xy.filter((s)=>s!=="richText"||t.contentFormat!==null).map((s)=>{let x=e.fields.includes(s);return{icon:x?"check":"plus",id:s,label:M_[s].label,selected:x}}),route:r.route===void 0||r.route===""?"/":r.route,saved:r.saved,startChoices:q(e,t),templateOptions:c,uploadAccept:Wc(),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 Ye(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:om(e.locale,o)??o.i18n?.defaultLocale??"",localized:o.i18n!==null&&o.i18n!==void 0,componentStart:"blank",copyOf:"",dropActive:!1,editingUrl:!1,fields:[...dE],files:[],kind:oe(e,o),name:e.name??"",ownPage:!0,pageStart:F_(o,om(e.locale,o)??o.i18n?.defaultLocale??""),pageTemplate:Pu(o),templateChosen:e.template!==void 0,touched:(e.name??"")!=="",url:"",wrap:Pu(o)===Hs?"":Pu(o)};if(e.template!==void 0){let i=U(e.template,o.layouts);if(i!==null)a.pageStart=i,a.pageTemplate=i===Ic?Hs:i,a.wrap=i===Hs||i===Ic?"":i}if(o.contentFormat===null)a.fields=a.fields.filter((i)=>i!=="richText");let d=!1,f=null,u=()=>hE(a.kind,a.name,j(a),o),b=(i)=>pE(i,a.name,j(a),o,(h)=>l.get(h)),m=()=>{let i=u();if(r.handle?.update(O(a,o,i,b(i))),fE(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:Q(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===im&&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=F_(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=Xy.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{Ve as addCollectionPage,Je as createDirect,Ye as openAddNew};
|
|
2
|
-
|
|
3
|
-
//# debugId=7D2F071887C1A6C364756E2164756E21
|
|
4
|
-
//# sourceMappingURL=add-new-flow-a1w0bnm6.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Q}from"./studio-nqxqf8p2.js";import{p,_e}from"./studio-pr23qhrw.js";import{g}from"./studio-hw60n5dh.js";import"./studio-2b8443ms.js";import{Mt,Nt}from"./studio-7cg75gtj.js";import"./studio-6vrxzkba.js";import{qe,ft,T,R,Jt,tt}from"./studio-02phtmqn.js";import"./studio-f8kz3krj.js";import"./studio-3q6n9qvq.js";import"./studio-cgjt1zce.js";import"./studio-0khd0xdw.js";import{lm}from"./studio-e8pzjjhf.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(qe,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 Jt(i),u())return i;return Mt(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=Q(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:Q(i)});return}lm(),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=AF36C95E061C8B9B64756E2164756E21
|
|
4
|
-
//# sourceMappingURL=cf-account-picker-ce3kp3x1.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{rb,IE,RE,V2,DE}from"./studio-cgjt1zce.js";import"./studio-3q6n9qvq.js";import"./studio-hw60n5dh.js";import"./studio-pr23qhrw.js";export{DE as clearCfConnection,RE as getCfAccountId,rb as getCfToken,V2 as setCfAccountId,IE as setCfToken};
|
|
2
|
-
|
|
3
|
-
//# debugId=0AD23CADB9EEA8CE64756E2164756E21
|
|
4
|
-
//# sourceMappingURL=cf-settings-7ye6x7g2.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{o,m,h,K,d,g,T,P,N,B,O,_,V,M,ee}from"./iframe-entry-02wzcyvy.js";export{m as ARROW_SIGN,o as clamp,V as contrastRatio,g as formatHex,O as formatOklch,P as hsvToRgb,ee as inkOn,B as oklchToSrgb,d as parseColor,K as parseHex,M as preferredInk,_ as relativeLuminance,T as rgbToHsv,h as snapToStep,N as srgbToOklch};
|
|
2
|
-
|
|
3
|
-
//# debugId=497279D409AA080F64756E2164756E21
|
|
4
|
-
//# sourceMappingURL=color-4gj49xq6.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Ne,Gw,xa,Rb,jc,Hc}from"./studio-v2ek69cb.js";import"./studio-pr23qhrw.js";export{Gw as _componentRegistryLoaded,jc as buildComponentInstance,Ne as componentRegistry,Hc as computeRelativePath,xa as loadComponentRegistry,Rb as noteComponentSaved};
|
|
2
|
-
|
|
3
|
-
//# debugId=2EE90791A39E284264756E2164756E21
|
|
4
|
-
//# sourceMappingURL=components-qce0v93f.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{fb,mS,gS,mb,OT,MT,PT}from"./studio-2dtc90zs.js";import"./studio-1yhz0s8p.js";import"./studio-rdnezzkd.js";import"./studio-wcakp5bt.js";import"./studio-p89w12s2.js";import"./studio-nm9qev4p.js";import"./studio-5abge3wy.js";import"./studio-v2ek69cb.js";import"./studio-m4w6sygj.js";import"./studio-txkx6586.js";import"./studio-hvxt8z79.js";import"./studio-gmhd0j3f.js";import"./studio-0khd0xdw.js";import"./studio-3q6n9qvq.js";import"./studio-02phtmqn.js";import"./studio-2b8443ms.js";import"./studio-7cg75gtj.js";import"./studio-9wyqyfqy.js";import"./studio-cq87hree.js";import"./studio-hnx1h1pr.js";import"./studio-y1x65h5r.js";import"./studio-grp684wx.js";import"./studio-6vrxzkba.js";import"./studio-hw60n5dh.js";import"./studio-nqxqf8p2.js";import"./studio-tpmnbgmt.js";import"./studio-pr23qhrw.js";export{mS as collectionDirs,fb as collectionInfo,gS as collectionSourceDirs,MT as createCollectionSource,PT as createPagesSource,mb as listCollectionEntryIds,OT as reloadDraftAwareGrids};
|
|
2
|
-
|
|
3
|
-
//# debugId=8E49BA00AA6140B264756E2164756E21
|
|
4
|
-
//# sourceMappingURL=content-source-jjx8kgzr.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{N2,Hf,A2,O2,M2,ip,P2,F2,ga,G0,wd,j2,zn,we}from"./studio-z42kysg7.js";export{N2 as CancellationTokenSource,Hf as Emitter,A2 as KeyCode,O2 as KeyMod,ga as MarkerSeverity,G0 as MarkerTag,M2 as Position,ip as Range,P2 as Selection,F2 as SelectionDirection,j2 as Token,wd as Uri,zn as editor,we as languages};
|
|
2
|
-
|
|
3
|
-
//# debugId=9E2006F64FB7522F64756E2164756E21
|
|
4
|
-
//# sourceMappingURL=editor-bkja5dbv.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{j_,W2,mE}from"./studio-rm9m3z60.js";import"./studio-89cwmnae.js";import"./studio-h98520qr.js";import"./studio-3pndhat0.js";import"./studio-j5jqvyn3.js";import"./studio-bf0rgyf7.js";import"./studio-d140sy8e.js";import"./studio-xddgbwhe.js";import"./studio-a6x058ew.js";import"./studio-332hesdk.js";import"./studio-2dtc90zs.js";import"./studio-1yhz0s8p.js";import"./studio-rdnezzkd.js";import"./studio-wcakp5bt.js";import"./studio-p89w12s2.js";import"./studio-nm9qev4p.js";import"./studio-5abge3wy.js";import"./studio-v2ek69cb.js";import"./studio-m4w6sygj.js";import"./studio-txkx6586.js";import"./studio-hvxt8z79.js";import"./studio-gmhd0j3f.js";import"./studio-0khd0xdw.js";import"./studio-3q6n9qvq.js";import"./studio-02phtmqn.js";import"./studio-2b8443ms.js";import"./studio-7cg75gtj.js";import"./studio-9wyqyfqy.js";import"./studio-cq87hree.js";import"./studio-hnx1h1pr.js";import"./studio-y1x65h5r.js";import"./studio-grp684wx.js";import"./studio-6vrxzkba.js";import"./studio-hw60n5dh.js";import"./studio-nqxqf8p2.js";import"./studio-tpmnbgmt.js";import"./studio-pr23qhrw.js";import"./studio-k1wvtp03.js";export{W2 as createEntry,j_ as entryFormatName,mE as registerContentCommands};
|
|
2
|
-
|
|
3
|
-
//# debugId=7BFDD64A200EA3DA64756E2164756E21
|
|
4
|
-
//# sourceMappingURL=entry-commands-1wh0btvg.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{QD,Hr,FT,X2,jT,Sp,HT,bb,vb}from"./studio-1yhz0s8p.js";import"./studio-rdnezzkd.js";import"./studio-wcakp5bt.js";import"./studio-p89w12s2.js";import"./studio-nm9qev4p.js";import"./studio-5abge3wy.js";import"./studio-v2ek69cb.js";import"./studio-m4w6sygj.js";import"./studio-txkx6586.js";import"./studio-hvxt8z79.js";import"./studio-gmhd0j3f.js";import"./studio-0khd0xdw.js";import"./studio-3q6n9qvq.js";import"./studio-02phtmqn.js";import"./studio-2b8443ms.js";import"./studio-7cg75gtj.js";import"./studio-9wyqyfqy.js";import"./studio-cq87hree.js";import"./studio-hnx1h1pr.js";import"./studio-y1x65h5r.js";import"./studio-grp684wx.js";import"./studio-6vrxzkba.js";import"./studio-hw60n5dh.js";import"./studio-nqxqf8p2.js";import"./studio-tpmnbgmt.js";import"./studio-pr23qhrw.js";export{bb as confirmFileDelete,HT as exportFile,X2 as openFile,FT as parseCollabSource,QD as parseFormatSource,Hr as parseSourceForPath,vb as renamePromptMessage,Sp as saveFile,jT as setDocumentSavedListener};
|
|
2
|
-
|
|
3
|
-
//# debugId=23CF84855EE8533164756E2164756E21
|
|
4
|
-
//# sourceMappingURL=file-ops-6pe4z7an.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Bs,dm,NE,AE,y2,OE,ME,PE,K_,w2,lb,FE,x2,_2,jE,DD,S2,C2,cw,J_,ND,HE,k2,yi,Y_,BE,zE,um,WE,E2,T2}from"./studio-g6ysm05p.js";import"./studio-j4e627w1.js";import"./studio-d140sy8e.js";import"./studio-74nzv280.js";import"./studio-xddgbwhe.js";import"./studio-fw3jp9m7.js";import"./studio-f8kz3krj.js";import"./studio-bqgs90r8.js";import"./studio-332hesdk.js";import"./studio-2dtc90zs.js";import"./studio-1yhz0s8p.js";import"./studio-rdnezzkd.js";import"./studio-wcakp5bt.js";import"./studio-p89w12s2.js";import"./studio-nm9qev4p.js";import"./studio-5abge3wy.js";import"./studio-v2ek69cb.js";import"./studio-m4w6sygj.js";import"./studio-txkx6586.js";import"./studio-hvxt8z79.js";import"./studio-gmhd0j3f.js";import"./studio-0khd0xdw.js";import"./studio-3q6n9qvq.js";import"./studio-02phtmqn.js";import"./studio-2b8443ms.js";import"./studio-7cg75gtj.js";import"./studio-9wyqyfqy.js";import"./studio-cq87hree.js";import"./studio-hnx1h1pr.js";import"./studio-y1x65h5r.js";import"./studio-grp684wx.js";import"./studio-6vrxzkba.js";import"./studio-hw60n5dh.js";import"./studio-nqxqf8p2.js";import"./studio-tpmnbgmt.js";import"./studio-pr23qhrw.js";export{x2 as FILE_ROW_HEIGHT,jE as canMoveInto,C2 as createFileIn,K_ as findHomePage,PE as initProjectRepo,_2 as isFileDrag,cw as listTakenNames,Bs as loadDirectory,OE as loadProject,dm as loadProjectDirectories,E2 as mountFilesPanel,ND as notifyMoveOutcome,Y_ as openFileInPane,yi as openFileInTab,w2 as openHomePage,lb as openLastSessionOrHome,ME as openProject,HE as parentDirOf,S2 as pickAndUploadTo,NE as refreshProjectDirectoriesFor,WE as registerFilesPanel,BE as reloadCleanTab,um as reloadFileInTab,zE as reloadTabsIfChanged,FE as setSessionWorkspaceShow,y2 as setShowIgnoredFiles,k2 as settleRename,AE as showIgnoredFiles,T2 as unmountFilesPanel,DD as uploadFilesToDir,J_ as writeNewFile};
|
|
2
|
-
|
|
3
|
-
//# debugId=16B285348339788364756E2164756E21
|
|
4
|
-
//# sourceMappingURL=files-ybpp3j38.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Bt,$h,td,_v,Vx,tc,eu,Aa,zi,of,fn,ul,Sv,cr,tI,Oa,nI}from"./studio-tpmnbgmt.js";import"./studio-pr23qhrw.js";export{cr as defaultContentFormat,ul as documentExtensions,Aa as formatByExtension,zi as formatByName,fn as formatForPath,tI as formatParse,Oa as formatSerialize,Vx as getExtensionCatalog,_v as getExtensions,eu as getFormats,td as loadExtensions,Bt as loadFormats,of as noFormatError,tc as refreshExtensionUi,$h as refreshFormats,Sv as routedPageExtensions,nI as splitFormatDocument};
|
|
2
|
-
|
|
3
|
-
//# debugId=9FF6AF8D6DC3B62B64756E2164756E21
|
|
4
|
-
//# sourceMappingURL=format-host-3mtbhxk1.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{La,zd,_$}from"./studio-9wyqyfqy.js";import"./studio-cq87hree.js";import"./studio-hnx1h1pr.js";import"./studio-y1x65h5r.js";import"./studio-grp684wx.js";import"./studio-6vrxzkba.js";import"./studio-hw60n5dh.js";import"./studio-nqxqf8p2.js";import"./studio-tpmnbgmt.js";import"./studio-pr23qhrw.js";export{zd as isRecentLocal,La as markLocalMutation,_$ as startFsSync};
|
|
2
|
-
|
|
3
|
-
//# debugId=7B7D65048418B37364756E2164756E21
|
|
4
|
-
//# sourceMappingURL=fs-events-xfanfxds.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{JE,jD,tS,YE,ZE}from"./studio-74nzv280.js";import"./studio-2dtc90zs.js";import"./studio-1yhz0s8p.js";import"./studio-rdnezzkd.js";import"./studio-wcakp5bt.js";import"./studio-p89w12s2.js";import"./studio-nm9qev4p.js";import"./studio-5abge3wy.js";import"./studio-v2ek69cb.js";import"./studio-m4w6sygj.js";import"./studio-txkx6586.js";import"./studio-hvxt8z79.js";import"./studio-gmhd0j3f.js";import"./studio-0khd0xdw.js";import"./studio-3q6n9qvq.js";import"./studio-02phtmqn.js";import"./studio-2b8443ms.js";import"./studio-7cg75gtj.js";import"./studio-9wyqyfqy.js";import"./studio-cq87hree.js";import"./studio-hnx1h1pr.js";import"./studio-y1x65h5r.js";import"./studio-grp684wx.js";import"./studio-6vrxzkba.js";import"./studio-hw60n5dh.js";import"./studio-nqxqf8p2.js";import"./studio-tpmnbgmt.js";import"./studio-pr23qhrw.js";export{jD as openCollectionGrid,JE as openCsvGridTab,YE as openGridSourcePicker,tS as openPagesGrid,ZE as registerGridCommands};
|
|
2
|
-
|
|
3
|
-
//# debugId=90AEBA9600304F6964756E2164756E21
|
|
4
|
-
//# sourceMappingURL=grid-open-dg5qmnaj.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{aL,lL,cL,dL,WS,Tb,Lb,VS,Ul,uL,hL,pL,$b,D2,Q2,fL,Fc,Ww,Vw,mL,gL,bL,vL,yL,wL,xL,_L,SL,CL,kL,EL,US,TL,Ib,LL,$L,IL,RL,DL,NL,Uw,AL,ql,OL,oh,ML,qw,qS}from"./studio-5abge3wy.js";import"./studio-v2ek69cb.js";import"./studio-m4w6sygj.js";import"./studio-txkx6586.js";import"./studio-gmhd0j3f.js";import"./studio-3q6n9qvq.js";import"./studio-7cg75gtj.js";import"./studio-hnx1h1pr.js";import"./studio-y1x65h5r.js";import"./studio-grp684wx.js";import"./studio-6vrxzkba.js";import"./studio-hw60n5dh.js";import"./studio-nqxqf8p2.js";import"./studio-tpmnbgmt.js";import"./studio-pr23qhrw.js";export{fL as adoptCanvasPreviewMode,lL as allowAutoRequestsOnNextRender,Lb as beginDragSession,uL as canvasIdleBlockers,pL as canvasPointAt,Vw as clearDropIndicator,qw as commitActiveEditSession,VS as currentDragSession,TL as dragHostTab,Ww as endDragSession,dL as flushCanvasEdits,qS as getEditBarAnchorRect,ql as getEditSnapshot,Ul as hostDragGeometry,WS as hostForCanvas,xL as isCaretActive,Tb as liveDragHostAt,Q2 as measureInCanvas,LL as mountIframeCanvas,$L as mountStylebookCanvas,AL as panToStylebookTag,hL as pointerAnchor,oh as postApplyFormat,IL as postColorSchemeToLiveHosts,EL as postDialogOpen,Fc as postDragMessage,RL as postLocaleToLiveHosts,ML as postOpenSlash,US as postPatchToHosts,kL as postPopoverOpen,DL as postRedefineElementToLiveHosts,NL as postSiteStyleToLiveHosts,Uw as postStyleUpdateToStylebookHosts,Ib as releaseCanvasHosts,cL as requestCanvasEval,$b as revealCanvasPath,D2 as revealCanvasPathIn,aL as sawIframeDragOver,yL as setCanvasContextMenuHandler,SL as setCanvasPointerDownHandler,vL as setCanvasSlashHandler,bL as setFileDropHandler,CL as setIframePatchEscalation,gL as setInsertZoneClickHandler,OL as setKeymapSource,mL as setNativeDragEnterHandler,wL as setStylebookHitHandler,_L as setToolbarRefresh};
|
|
2
|
-
|
|
3
|
-
//# debugId=7EC045127475B46164756E2164756E21
|
|
4
|
-
//# sourceMappingURL=iframe-host-j2bk2xkc.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{PI,FI,jI,HI,BI,xu,zI,Rg,WI,Bf,VI,zf,i2,J0,ak,o2,r2,s2,a2,_u,l2,c2,d2,lk,ck,u2,h2,p2,f2,dk,m2}from"./studio-b4xhpcwy.js";import{xd,Y0,Dg,g2,KI,JI,YI,ZI,Ng,pk,fk}from"./studio-94ppxeqy.js";import{zs,G2}from"./studio-zht0x0v3.js";import{$e,oe,mv,gv}from"./studio-gqpty626.js";export{BI as COLLAB_SCHEMA_VERSION,_u as CollabPathError,Ng as EnvelopeError,JI as FRAME_AWARENESS,ZI as FRAME_CONTROL,YI as FRAME_DOC_CLOSE,KI as FRAME_DOC_SYNC,FI as FRONTMATTER_KEY,r2 as LOCAL_ORIGIN,PI as META_KEY,s2 as MIRROR_ORIGIN,dk as PRESENCE_PALETTE,a2 as SEED_ORIGIN,HI as SOURCE_KEY,jI as STRUCTURE_KEY,g2 as UndoManager,xd as YDoc,u2 as acquireSourceCanonical,gv as applyDocOpToDoc,l2 as applyDocOpsToY,lk as canonicalOf,ck as canonicalRevOf,mv as childArray,$e as cloneValue,m2 as colorForKey,Dg as createAbsolutePositionFromRelativePosition,Y0 as createRelativePositionFromTypeIndex,fk as decodeFrame,zs as deepEqual,G2 as diffDocs,pk as encodeFrame,zI as frontmatterMap,oe as getNodeAtPath,f2 as isSourceReconciler,xu as metaMap,p2 as otherSourceEditors,h2 as releaseSourceCanonical,d2 as replaceYStructure,J0 as resolveYPath,o2 as seedStructure,WI as sourceText,Rg as structureMap,Bf as toYChildren,VI as toYNode,ak as updateSourceText,i2 as yDocToJson,c2 as yEventsToDocOps,zf as yValueToJson};
|
|
2
|
-
|
|
3
|
-
//# debugId=91278144FEFEB63664756E2164756E21
|
|
4
|
-
//# sourceMappingURL=index-fkrm7pdk.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{tt,h$,Bb,p$,Ko,uC,xi,Zs,zb,f$}from"./studio-02phtmqn.js";import"./studio-2b8443ms.js";import"./studio-7cg75gtj.js";import"./studio-6vrxzkba.js";import"./studio-hw60n5dh.js";import"./studio-nqxqf8p2.js";export{zb as clearLayerSlot,Zs as getLayerSlot,h$ as initLayers,Bb as isModalOpen,p$ as isPopoverOpen,tt as layerHost,f$ as overlayIdleBlockers,Ko as showConfirmDialog,xi as showPromptDialog,uC as showSaveDiscardDialog};
|
|
2
|
-
|
|
3
|
-
//# debugId=5208BE648686967464756E2164756E21
|
|
4
|
-
//# sourceMappingURL=layers-g7j732cm.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{v2,$k}from"./studio-4fjqdzrb.js";import"./studio-4dsdnan2.js";import"./studio-2c2mjyzj.js";import"./studio-ttxhq5yt.js";import"./studio-c5dj3dzk.js";import"./studio-j5jqvyn3.js";import"./studio-bf0rgyf7.js";import"./studio-j4e627w1.js";import"./studio-xddgbwhe.js";import"./studio-a3evp7f6.js";import"./studio-a6x058ew.js";import"./studio-332hesdk.js";import"./studio-1yhz0s8p.js";import"./studio-rdnezzkd.js";import"./studio-wcakp5bt.js";import"./studio-p89w12s2.js";import"./studio-nm9qev4p.js";import"./studio-5abge3wy.js";import"./studio-v2ek69cb.js";import"./studio-m4w6sygj.js";import"./studio-txkx6586.js";import"./studio-hvxt8z79.js";import"./studio-gmhd0j3f.js";import"./studio-0khd0xdw.js";import"./studio-3q6n9qvq.js";import"./studio-02phtmqn.js";import"./studio-2b8443ms.js";import"./studio-7cg75gtj.js";import"./studio-9wyqyfqy.js";import"./studio-cq87hree.js";import"./studio-hnx1h1pr.js";import"./studio-y1x65h5r.js";import"./studio-grp684wx.js";import"./studio-6vrxzkba.js";import"./studio-hw60n5dh.js";import"./studio-nqxqf8p2.js";import"./studio-tpmnbgmt.js";import"./studio-pr23qhrw.js";import"./studio-k1wvtp03.js";export{$k as registerLayersPanel,v2 as startLayerTitleEdit};
|
|
2
|
-
|
|
3
|
-
//# debugId=0F685B21AC6F784A64756E2164756E21
|
|
4
|
-
//# sourceMappingURL=layers-panel-gjrsxcck.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{K2,bw,L2,cS,vw,_T,ST,$2,J2,Y2,dS,Z2,CT}from"./studio-c4rcaftm.js";import"./studio-a3evp7f6.js";import"./studio-a6x058ew.js";import"./studio-bqgs90r8.js";import"./studio-332hesdk.js";import"./studio-1yhz0s8p.js";import"./studio-rdnezzkd.js";import"./studio-wcakp5bt.js";import"./studio-p89w12s2.js";import"./studio-nm9qev4p.js";import"./studio-5abge3wy.js";import"./studio-v2ek69cb.js";import"./studio-m4w6sygj.js";import"./studio-txkx6586.js";import"./studio-hvxt8z79.js";import"./studio-gmhd0j3f.js";import"./studio-0khd0xdw.js";import"./studio-3q6n9qvq.js";import"./studio-02phtmqn.js";import"./studio-2b8443ms.js";import"./studio-7cg75gtj.js";import"./studio-9wyqyfqy.js";import"./studio-cq87hree.js";import"./studio-hnx1h1pr.js";import"./studio-y1x65h5r.js";import"./studio-grp684wx.js";import"./studio-6vrxzkba.js";import"./studio-hw60n5dh.js";import"./studio-nqxqf8p2.js";import"./studio-tpmnbgmt.js";import"./studio-pr23qhrw.js";export{K2 as MEDIA_HOME_MODE,$2 as applyMediaBrowse,dS as closeMediaPickDialog,L2 as deleteMediaFile,vw as detachMediaLibrary,ST as focusMediaHome,cS as mediaLibraryMounted,Z2 as openMediaPickDialog,_T as renderMediaLibrary,Y2 as requestMediaReplace,J2 as requestMediaUpload,CT as resetMediaLibrary,bw as selectedEntry};
|
|
2
|
-
|
|
3
|
-
//# debugId=9EE56F7AC1F8CAA064756E2164756E21
|
|
4
|
-
//# sourceMappingURL=media-library-9j0v4wmk.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{ET,TT,Vu,xw,I2,pS,R2,fS,jl,fm}from"./studio-a6x058ew.js";import"./studio-332hesdk.js";import"./studio-hvxt8z79.js";import"./studio-gmhd0j3f.js";import"./studio-02phtmqn.js";import"./studio-2b8443ms.js";import"./studio-7cg75gtj.js";import"./studio-cq87hree.js";import"./studio-hnx1h1pr.js";import"./studio-y1x65h5r.js";import"./studio-grp684wx.js";import"./studio-6vrxzkba.js";import"./studio-hw60n5dh.js";import"./studio-nqxqf8p2.js";import"./studio-tpmnbgmt.js";import"./studio-pr23qhrw.js";export{xw as invalidateMediaCache,ET as isMediaScanPath,jl as mountMediaPicker,TT as onProjectMediaChange,I2 as openFullMediaPicker,fS as pickAndUpload,Vu as projectMediaFiles,pS as showMediaPickerPopover,fm as unmountMediaPicker,R2 as uploadAndAssign};
|
|
2
|
-
|
|
3
|
-
//# debugId=D3740D9CC5A8A19E64756E2164756E21
|
|
4
|
-
//# sourceMappingURL=media-picker-cpyyt2m0.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Kp,uv,hv,V$,Zd,Jp,Xd,Yp}from"./studio-grp684wx.js";import"./studio-hw60n5dh.js";export{Kp as BUFFER_COMMIT,Zd as bufferIsLive,Jp as bufferMovedOn,uv as bufferWrites,V$ as cancelBufferWrites,hv as commitBufferWrites,Xd as commitTabBuffers,Yp as tabBufferUnsaved};
|
|
2
|
-
|
|
3
|
-
//# debugId=57C8D07E90C43F1564756E2164756E21
|
|
4
|
-
//# sourceMappingURL=monaco-buffer-9wcme176.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{vk,B2}from"./studio-r4ya3sb2.js";import"./studio-cgjt1zce.js";import"./studio-p89w12s2.js";import"./studio-m4w6sygj.js";import"./studio-0khd0xdw.js";import"./studio-3q6n9qvq.js";import"./studio-02phtmqn.js";import"./studio-2b8443ms.js";import"./studio-7cg75gtj.js";import"./studio-y1x65h5r.js";import"./studio-grp684wx.js";import"./studio-6vrxzkba.js";import"./studio-hw60n5dh.js";import"./studio-nqxqf8p2.js";import"./studio-tpmnbgmt.js";import"./studio-pr23qhrw.js";export{B2 as openPublishPanel,vk as seedPublishConnected};
|
|
2
|
-
|
|
3
|
-
//# debugId=2A863E85C53929A064756E2164756E21
|
|
4
|
-
//# sourceMappingURL=publish-panel-4yk2461b.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{QI,yk,t_,n_,wk}from"./studio-v0gsjav0.js";import"./studio-pbagym4j.js";import"./studio-fw3jp9m7.js";import"./studio-f8kz3krj.js";import"./studio-bqgs90r8.js";import"./studio-332hesdk.js";import"./studio-wcakp5bt.js";import"./studio-p89w12s2.js";import"./studio-nm9qev4p.js";import"./studio-5abge3wy.js";import"./studio-v2ek69cb.js";import"./studio-m4w6sygj.js";import"./studio-txkx6586.js";import"./studio-hvxt8z79.js";import"./studio-gmhd0j3f.js";import"./studio-0khd0xdw.js";import"./studio-3q6n9qvq.js";import"./studio-02phtmqn.js";import"./studio-2b8443ms.js";import"./studio-7cg75gtj.js";import"./studio-cq87hree.js";import"./studio-hnx1h1pr.js";import"./studio-y1x65h5r.js";import"./studio-grp684wx.js";import"./studio-6vrxzkba.js";import"./studio-hw60n5dh.js";import"./studio-nqxqf8p2.js";import"./studio-tpmnbgmt.js";import"./studio-pr23qhrw.js";export{n_ as detachPublishWorkspace,yk as focusPublishHome,t_ as publishWorkspaceMounted,wk as renderPublishWorkspace,QI as showPublishTab};
|
|
2
|
-
|
|
3
|
-
//# debugId=DFF294BB1AC48FB964756E2164756E21
|
|
4
|
-
//# sourceMappingURL=publish-workspace-mxestzcf.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{xk,Pg}from"./studio-x3ge4rts.js";import"./studio-g6ysm05p.js";import"./studio-j4e627w1.js";import"./studio-d140sy8e.js";import"./studio-74nzv280.js";import"./studio-xddgbwhe.js";import"./studio-fw3jp9m7.js";import"./studio-f8kz3krj.js";import"./studio-bqgs90r8.js";import"./studio-332hesdk.js";import"./studio-2dtc90zs.js";import"./studio-1yhz0s8p.js";import"./studio-rdnezzkd.js";import"./studio-wcakp5bt.js";import"./studio-p89w12s2.js";import"./studio-nm9qev4p.js";import"./studio-5abge3wy.js";import"./studio-v2ek69cb.js";import"./studio-m4w6sygj.js";import"./studio-txkx6586.js";import"./studio-hvxt8z79.js";import"./studio-gmhd0j3f.js";import"./studio-0khd0xdw.js";import"./studio-3q6n9qvq.js";import"./studio-02phtmqn.js";import"./studio-2b8443ms.js";import"./studio-7cg75gtj.js";import"./studio-9wyqyfqy.js";import"./studio-cq87hree.js";import"./studio-hnx1h1pr.js";import"./studio-y1x65h5r.js";import"./studio-grp684wx.js";import"./studio-6vrxzkba.js";import"./studio-hw60n5dh.js";import"./studio-nqxqf8p2.js";import"./studio-tpmnbgmt.js";import"./studio-pr23qhrw.js";export{xk as initQuickSearch,Pg as openQuickSearch};
|
|
2
|
-
|
|
3
|
-
//# debugId=F121B011ACF26C2264756E2164756E21
|
|
4
|
-
//# sourceMappingURL=quick-search-9g6z65b0.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{ph,Wd,$a,S$,Cr,C$,Kb,k$,Jb}from"./studio-cq87hree.js";import"./studio-nqxqf8p2.js";import"./studio-pr23qhrw.js";export{Cr as invalidateUsages,$a as loadUsages,C$ as onUsagesInvalidated,Wd as peekUsages,S$ as retryUsages,Jb as usageFiles,Kb as usageHeadline,k$ as usageWarning,ph as usagesSupported};
|
|
2
|
-
|
|
3
|
-
//# debugId=8A2938DECAAAE3BF64756E2164756E21
|
|
4
|
-
//# sourceMappingURL=references-c26enpxs.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{aR,_k,z2,Sk,Fg,Dl,Cu}from"./studio-kdseew9m.js";import"./studio-4dsdnan2.js";import"./studio-2c2mjyzj.js";import"./studio-dmn7gpba.js";import"./studio-c5dj3dzk.js";import"./studio-h98520qr.js";import"./studio-3pndhat0.js";import"./studio-bf0rgyf7.js";import"./studio-g6ysm05p.js";import"./studio-j4e627w1.js";import"./studio-d140sy8e.js";import"./studio-74nzv280.js";import"./studio-xddgbwhe.js";import"./studio-fw3jp9m7.js";import"./studio-f8kz3krj.js";import"./studio-a3evp7f6.js";import"./studio-a6x058ew.js";import"./studio-bqgs90r8.js";import"./studio-332hesdk.js";import"./studio-2dtc90zs.js";import"./studio-1yhz0s8p.js";import"./studio-rdnezzkd.js";import"./studio-wcakp5bt.js";import"./studio-p89w12s2.js";import"./studio-nm9qev4p.js";import"./studio-5abge3wy.js";import"./studio-v2ek69cb.js";import"./studio-m4w6sygj.js";import"./studio-txkx6586.js";import"./studio-hvxt8z79.js";import"./studio-gmhd0j3f.js";import"./studio-0khd0xdw.js";import"./studio-3q6n9qvq.js";import"./studio-02phtmqn.js";import"./studio-2b8443ms.js";import"./studio-7cg75gtj.js";import"./studio-9wyqyfqy.js";import"./studio-cq87hree.js";import"./studio-hnx1h1pr.js";import"./studio-y1x65h5r.js";import"./studio-grp684wx.js";import"./studio-6vrxzkba.js";import"./studio-hw60n5dh.js";import"./studio-nqxqf8p2.js";import"./studio-tpmnbgmt.js";import"./studio-pr23qhrw.js";import"./studio-k1wvtp03.js";export{Dl as inspectorTab,_k as mount,Fg as render,Sk as restingInspectorTab,Cu as setInspectorTab,aR as stripOf,z2 as unmount};
|
|
2
|
-
|
|
3
|
-
//# debugId=0EEC804C471B7FFB64756E2164756E21
|
|
4
|
-
//# sourceMappingURL=right-panel-9d0e0yg7.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Ws,QE,oS,rS,ub,wa,eT,tT,nT,iT,oT,rT,sT,aT,lT,cT,dT,uT,hT,pT,sS,fT,mT,gw,gT,bT,hb,vT}from"./studio-fw3jp9m7.js";import"./studio-f8kz3krj.js";import"./studio-bqgs90r8.js";import"./studio-332hesdk.js";import"./studio-wcakp5bt.js";import"./studio-p89w12s2.js";import"./studio-nm9qev4p.js";import"./studio-5abge3wy.js";import"./studio-v2ek69cb.js";import"./studio-m4w6sygj.js";import"./studio-txkx6586.js";import"./studio-hvxt8z79.js";import"./studio-gmhd0j3f.js";import"./studio-0khd0xdw.js";import"./studio-3q6n9qvq.js";import"./studio-02phtmqn.js";import"./studio-2b8443ms.js";import"./studio-7cg75gtj.js";import"./studio-cq87hree.js";import"./studio-hnx1h1pr.js";import"./studio-y1x65h5r.js";import"./studio-grp684wx.js";import"./studio-6vrxzkba.js";import"./studio-hw60n5dh.js";import"./studio-nqxqf8p2.js";import"./studio-tpmnbgmt.js";import"./studio-pr23qhrw.js";export{bT as armGitPoll,sS as changeRow,pT as checkoutBranch,hb as cleanupSourceControl,rS as cloneRepository,mT as commitRow,hT as createBranch,uT as discardFile,oS as fetchGitLog,sT as fetchRemote,fT as groupFilesByComponent,dT as includeNewChanges,gT as lastUpdatedLabel,nT as loadDiffForLens,QE as noteFileSaved,rT as openFileComparison,wa as platformHostsGit,eT as platformOpensPullRequests,ub as platformSupportsClone,aT as pullRemote,Ws as refreshGitStatus,vT as registerSourceControlCommands,gw as relativeDate,oT as runCloneRepository,cT as setAllIncluded,lT as setIncluded,iT as setSourceControlDeps,tT as statusTag};
|
|
2
|
-
|
|
3
|
-
//# debugId=3A7E4644607E78D164756E2164756E21
|
|
4
|
-
//# sourceMappingURL=source-control-xyn3a8ds.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{p,_e}from"./studio-pr23qhrw.js";import{pt,Go,EA,Ap,dx,_r,LA,Op}from"./studio-3q6n9qvq.js";import{C}from"./studio-hw60n5dh.js";import{Ys,tt}from"./studio-02phtmqn.js";import{n,Z,Xe,te,v}from"./studio-kt2j51sa.js";var l=null;async function jd(){if(!_e()||!te(p().getAccountStatus)){l=null;return}try{l=await p().getAccountStatus?.()??null}catch{l=null}}function iC(){return l}function oC(){return l!==null&&l.installations.length===0&&Boolean(l.appInstallUrl)}function hA(){if(l===null)return null;let e=l.installations.flatMap((r)=>r.manageUrl?[{account:r.account??`Installation ${r.id}`,url:r.manageUrl}]:[]);if(e.length===0&&!l.appInstallUrl)return null;let t={manage:e};if(l.appInstallUrl)t.installUrl=l.appInstallUrl;return t}function pA(){return l?.entries??[]}function t$(){return(l?.notices??[]).filter((e)=>e.display!=="toast")}var L=new Set;function N(){let e=(l?.notices??[]).filter((t)=>t.display==="toast"&&!L.has(t.id));for(let t of e)L.add(t.id);return e}var G="https://jxsuite.com/problems/";function k(e){return typeof e==="string"}function X(e){return typeof e==="object"&&e!==null}function jb(e){if(!k(e)||!e.startsWith("https://jxsuite.com/problems/"))return null;let t=e.slice(29);return t===""?null:t}function rr(e){if(k(e))return e.trim()===""?null:e;if(!X(e))return null;for(let t of[e.detail,e.error,e.title])if(k(t)&&t.trim()!=="")return t;return null}function Ca(e,t){return rr(e)??(t===void 0?"Request failed":`Request failed (${t})`)}var d=(e,t,r,i)=>{let s={status:t,title:r,type:`${G}${e}`};if(i!==void 0)s.extensions=i;return s},me={invalidRequest:d("invalid-request",400,"The request was malformed or incomplete"),notFound:d("not-found",404,"The requested resource does not exist"),methodNotAllowed:d("method-not-allowed",405,"That method is not allowed on this route"),conflict:d("conflict",409,"The request conflicts with the current state",["conflicts"]),payloadTooLarge:d("payload-too-large",413,"The request body is too large"),unauthorized:d("unauthorized",401,"Credentials are missing or not accepted"),forbidden:d("forbidden",403,"The request was refused"),needsInstallationAccess:d("needs-installation-access",403,"The GitHub App is not installed for that account",["installUrl"]),pathOutsideProject:d("path-outside-project",403,"The path resolves outside the active project"),actionRequired:d("action-required",403,"An action is required first",["actions","heading","retry"]),noActiveProject:d("no-active-project",409,"No project is active on this backend"),capabilityUnavailable:d("capability-unavailable",501,"This backend does not provide that capability"),upstreamFailure:d("upstream-failure",502,"An upstream service failed",["upstream"]),internalError:d("internal-error",500,"The backend failed to complete the request")};var rC=".jx-loc-id",o=(e,t,r,i)=>{let s={method:e,path:t,optional:i!==void 0,summary:r};if(i!==void 0)s.degradation=i;return s},he={activate:o("POST","/__studio/activate","Bind the backend to a project root"),project:o("GET","/__studio/project","Root project metadata {name, root}"),projectInfo:o("GET","/__studio/project-info","Probe a directory: {isSiteProject, projectConfig?, directories?}"),resolveSite:o("GET","/__studio/resolve-site","Resolve the owning site of a file path {sitePath, projectConfig?, fileRelPath?}"),sites:o("GET","/__studio/sites","Enumerate site projects [{config, path}] (backs listProjects)","The welcome screen's Projects catalogue stays hidden."),findProject:o("GET","/__studio/find-project","Locate a project directory by name outside the root","openProject falls back to config-matching only."),locateDirectory:o("GET","/__studio/locate-directory","Resolve the absolute path of a showDirectoryPicker() folder by the id in its .jx-loc-id","Browse… reports that the folder could not be placed; the Location is typed by hand."),createProject:o("POST","/__studio/create-project","Scaffold a project at a caller-chosen destination → {root, config}"),starters:o("GET","/__studio/starters","Starter templates (StarterInfo[])","The New Project picker offers only blank/templates."),importSite:o("POST","/__studio/import-site","Clone a live website into a project; streams NDJSON progress","The New Project Import tab is unavailable."),files:o("GET","/__studio/files","List a directory (DirEntry[]) in stable path order; an entry may carry an opaque content `version` the backend vouches for; with ?glob=<pattern>, search matching files project-wide"),fileRead:o("GET","/__studio/file","Read a file's text content"),filesRead:o("POST","/__studio/files/read","Read many files' text content {paths} → ReadFilesResult {files: [path, {content} | "+"{error: {status, code?, message}}][], omitted}. At most READ_FILES_MAX_PATHS (200) paths and a backend byte budget per call: the excess is listed in `omitted` (never a 400) and the first path is always answered. Per-path errors: 404 missing/deleted, 415 binary, 413 too large, 502 upstream. Allowed for read-only sessions; keeps fileRead's server-side effects","Adapters fall back to one fileRead per path."),fileWrite:o("PUT","/__studio/file","Write a file's text content"),fileDelete:o("DELETE","/__studio/file","Delete a file"),fileUpload:o("POST","/__studio/file/upload","Upload binary content to a path → UploadResult {path, size?}. `path` is the answer, not an "+"echo: a store that de-duplicates, suffixes, or normalizes names reports what it really wrote"),fileBytes:o("GET","/__studio/file/bytes","A project file's raw bytes, undecoded — the read side of `fileUpload`, for a caller that must "+"not go through UTF-8","Studio can only read a project file as text, so any surface that must decode one stays hidden."),documentRaw:o("GET","/__studio/raw/","A project file as its own bytes, at its own URL — the mount a canvas renders against when "+"the editor origin does not serve the site's URL space. The project-relative path is appended to this prefix","The canvas cannot address project files by URL, so a host whose origin does not serve the site URL space renders no component $refs and no images."),fileRename:o("POST","/__studio/file/rename","Rename/move (+ refactor report). `from`/`to` are server-root-relative; every path in the "+"report is relative to the active project (specs/server.md §4.1)"),references:o("GET","/__studio/references","Where a file or a component tag is used (?path=&tag=, at least one) → ReferencesResult "+"{files, filesReferencing, refsTotal} — the read side of the rename refactor's own walker, "+"cached until the backend's watcher sees the tree move (backs findReferences). `?path=` is server-root-relative and every path in the answer is relative to the active project; a "+"target outside that project is a 400, never a zero-result 200 (specs/server.md §4.1)",'Usage counts are hidden: no "Used on N pages" in the inspector, no Selection: Find Usages, and delete/rename confirmations state no reference count.'),locate:o("POST","/__studio/locate","Find a file by name → {path | null}"),collab:o("GET","/__studio/collab","Realtime co-editing: a WebSocket upgrade speaking the @jxsuite/collab wire envelope (one socket per project, documents multiplexed by path; y-protocols sync + project-level "+"awareness in lib0 binary frames — see @jxsuite/collab/envelope for the frame layout and "+"the docEpoch/doc-reset lifecycle). A plain GET (no Upgrade) answers {collab, protocols, version} as the capability probe, and `protocols` is the subprotocol negotiation: the client offers one of them as Sec-WebSocket-Protocol and the server echoes it, or the "+"client offers none when the server advertises none, because RFC 6455 §4.1 fails a "+"connection whose offer went unechoed.","Realtime co-editing is unavailable; Studio edits solo with file-level saves"),components:o("GET","/__studio/components","Discover components (ComponentMeta[])"),cem:o("GET","/__studio/cem","Custom-elements manifest of an npm dependency","Dependency components lose prop/slot metadata."),formats:o("GET","/__studio/formats","The project's format registry entries plus a sibling `extensions` array — per enabled "+"extension its manifest identity and project-section contributions (ExtensionsInfo[]; backs listFormats and listExtensions).","Only .json documents open (backs listFormats); descriptor-contributed settings sections do not appear."),extensionCatalog:o("GET","/__studio/catalog","Extensions this backend can OFFER (ExtensionCatalogEntry[]) — the shipped first-party "+"catalogue plus any package in the project's own dependencies exporting a jx-extension.json, each marked with whether the host resolves it without a project install and whether the project has it installed. A capability rather than a constant: a Worker ships a fixed set "+"of extension packages (specs/extensions.md §5.5). Backs listExtensionCatalog.","The Extensions section offers no catalogue; adding an extension stays a typed package name."),projectSchemas:o("GET","/__studio/project-schemas","The project's generated entry documents (project.schema.json / document.schema.json), "+"PRE-BUNDLED into self-contained schemas — {project, document} (backs fetchProjectSchemas). "+"Regenerated on demand when missing or older than project.json.","The JSON editor falls back to the bundled core schemas (extension sections get no editor validation/completion)."),format:o("POST","/__studio/format","Dispatch a format capability {format, action: parse|serialize, source?|doc?}","Non-JSON documents cannot be parsed/serialized (backs formatAction)."),pluginSchema:o("GET","/__studio/plugin-schema","Extract a $studio schema from a class source","Plugin property panels fall back to generic JSON editing."),codeFormat:o("POST","/__studio/code/format","Format posted source {code, path?} → {code, errors}","Code editors skip format-on-open/save (codeService returns null)."),codeMinify:o("POST","/__studio/code/minify","Minify posted source {code} → {code}","Compiled-output minification is skipped."),codeLint:o("POST","/__studio/code/lint","Lint posted source {code, path?} → {diagnostics}","Code editors show no lint markers."),buildSite:o("POST","/__studio/build","Build or render the site → {routes, files, errors, mode?, url}","Build Site reports that this target cannot build."),previewSite:o("POST","/__studio/preview","Preview the working tree at a route → {routes, files, errors, mode, url, reused}","Open in Browser falls back to buildSite."),previewOverlay:o("POST","/__studio/preview/overlay","Publish (POST) or retract (DELETE) a document's unsaved bytes → 204","A live preview shows the last saved state instead of the editor's."),packages:o("GET","/__studio/packages","List dependencies (PackageInfo[])"),packagesAdd:o("POST","/__studio/packages/add","Add a dependency"),packagesRemove:o("POST","/__studio/packages/remove","Remove a dependency"),packagesInstall:o("POST","/__studio/packages/install","Run the package manager install","Install/reinstall affordances are hidden; manifest-only edits still work."),packagesNeedsInstall:o("GET","/__studio/packages/needs-install","Whether node_modules is stale","The install-on-open prompt never shows."),packagesVersions:o("GET","/__studio/packages/versions","Newest published version of each dependency (PackageVersionInfo[])","The Latest column stays empty and the update affordances are hidden."),packagesSetVersions:o("POST","/__studio/packages/set-versions","Rewrite dependency ranges and install","Bulk version updates are hidden."),gitStatus:o("GET","/__studio/git/status","Working-tree status (GitStatusResult)"),gitBranches:o("GET","/__studio/git/branches","Branch list (GitBranchesResult)"),gitLog:o("GET","/__studio/git/log","Recent commits (GitLogEntry[])"),gitStage:o("POST","/__studio/git/stage","Stage files"),gitUnstage:o("POST","/__studio/git/unstage","Unstage files"),gitCommit:o("POST","/__studio/git/commit","Commit staged (else all dirty) files"),gitPush:o("POST","/__studio/git/push","Push (cloud: sync check — commits land on push)"),gitPull:o("POST","/__studio/git/pull","Pull/fast-forward; 409 {conflicts} on overlap"),gitFetch:o("POST","/__studio/git/fetch","Refresh remote tracking state"),gitCheckout:o("POST","/__studio/git/checkout","Switch branches"),gitCreateBranch:o("POST","/__studio/git/create-branch","Create a branch"),gitDiff:o("GET","/__studio/git/diff","Unified diff of dirty files (or one path)"),gitShow:o("GET","/__studio/git/show","File content at a ref"),gitDiscard:o("POST","/__studio/git/discard","Discard working changes"),gitInit:o("POST","/__studio/git/init","Initialize a repository"),gitAddRemote:o("POST","/__studio/git/add-remote","Add a remote"),gitClone:o("POST","/__studio/git/clone","Clone a repository","The welcome screen hides Clone Git Repository."),gitPr:o("POST","/__studio/git/pr","Open a pull request → PullRequestInfo","Studio falls back to a direct GitHub API call with the user's token."),dataConnections:o("GET","/__studio/data/connections","Connector connections with configured/missingSecrets/isDefault state, reachable table names, and registry-descriptor provider metadata (DataConnectionsResponse; backs dataConnections)","The connections settings section shows no status, and data-domain actions stay hidden."),dataConnectionTest:o("POST","/__studio/data/connections/test","Probe a connection {connection} → DataConnectionTestResult (backs dataConnectionTest)","The Test Connection action is hidden."),dataPush:o("POST","/__studio/data/push","Additive schema push {connection?, dryRun?} → DataPushResult (plan of DataPushStep[], "+"applied, warnings/errors; backs dataPush)","The Push Schema action is hidden; schemas deploy via `jx db push` instead."),dataRows:o("GET","/__studio/data/rows","Page a table (DataRowsQuery params) → DataRowsResult {rows, total, columns} (backs dataRows)","The data grid is unavailable."),dataInsertRow:o("POST","/__studio/data/rows","Insert a row {table, connection?, values} → {row} (backs dataInsertRow)","The data grid hides its add-row footer."),dataUpdateRow:o("PUT","/__studio/data/rows","Update a row keyed on its primary key {table, connection?, pk, set} → {row} (backs "+"dataUpdateRow)","Data grid cells are read-only."),dataDeleteRow:o("DELETE","/__studio/data/rows","Delete a row (?table=&pk=&connection=) → {ok} (backs dataDeleteRow)","The data grid hides row deletion."),secretsList:o("GET","/__studio/secrets","Configured secret env-var NAMES, never values (SecretsListResponse; backs listSecrets)","Secret fields cannot show set/unset state."),secretsSet:o("PUT","/__studio/secrets","Write/remove secrets in the backend store (.dev.vars locally) {set?, remove?} → names "+"(backs setSecrets)","The secret form control renders disabled; secrets are edited in .dev.vars by hand."),aiChat:o("POST","/__studio/ai/chat","StreamEvent SSE chat proxy {messages, tools, systemPrompt, model}"),aiModels:o("GET","/__studio/ai/models","Model catalogue (AiModelsResponse)"),cfProxy:o("POST","/__studio/cf/proxy","Allowlisted Cloudflare API passthrough {path, method?, body?} (backs cfApi)","The Publish panel explains the git-push publishing path instead.")};var n$=200,i$=100,o$=12;var Y=new Set(["reload","repeat","none"]);function Np(e){if(!Array.isArray(e))return[];return e.flatMap((r)=>{if(!v(r))return[];let{href:i,id:s,label:f,primary:m}=r;if(!n(s)||!s||!n(f)||!f)return[];let c={id:s,label:f};if(n(i)&&i)c.href=i;if(m===!0)c.primary=!0;return[c]})}function F(e){return n(e)&&Y.has(e)}function r$(e){return F(e)?e:void 0}function Q(e){return e.replaceAll("_","-")}function _(e){if(!v(e))return{};let{actions:t,code:r,heading:i,installUrl:s,retry:f,type:m}=e,c={},a=jb(m)??(n(r)?Q(r):null);if(a!==null)c.code=a;if(n(s))c.installUrl=s;if(t!==void 0)c.actions=Np(t);if(n(i)&&i)c.heading=i;if(F(f))c.retry=f;return c}function fA(e){let t=_(e);return t.code==="needs-installation-access"&&t.installUrl?t.installUrl:null}function mA(e){return _(e).code==="action-required"}function Hd(){return Go(pt.aiOpenAiKey)}function gA(e){_r(pt.aiOpenAiKey,e||"")}function sx(){return EA(pt.aiOpenAiKey)}function sl(){return Go(pt.aiBaseUrl)}function ax(){return Go(pt.aiModel)}function bA(e){_r(pt.aiModel,e||"")}function vA(e){LA([[pt.aiOpenAiKey,e.apiKey],[pt.aiBaseUrl,e.baseUrl],[pt.aiModel,e.model]])}function yA(e){return!Cm(pt.aiOpenAiKey,e.apiKey,Hd())||!Cm(pt.aiBaseUrl,e.baseUrl,sl())||!Cm(pt.aiModel,e.model,ax())}function Cm(e,t,r){return dx(e,t)===dx(e,r)}function wA(){Op([pt.aiOpenAiKey,pt.aiBaseUrl,pt.aiModel])}function sC(){return{apiKey:Hd(),baseUrl:sl()}}function V(e){return`${e.apiKey}\x00${e.baseUrl}`}var g=null,P="",j=!1,A=!1,D="",I,M="",R=null,U=null,q=new Set,ee=600000,S=0,J=!1;function ds(){g=null,P="",j=!1,A=!1,D="",I=void 0,M="",R=null,U=null,S=0}var oe=new Set([pt.aiOpenAiKey.key,pt.aiBaseUrl.key,pt.cfToken.key,pt.cfAccountId.key]);Ap((e)=>{if(e.some((t)=>oe.has(t)))ds()});function s$(e){return g&&P===V(e)?g:null}function K(e){return g?.find((t)=>t.id===e)}function a$(e){return K(e)?.toolSupport}function xA(e){return K(e)?.contextWindow}function lx(e){if(e)q.add(e);U??=lh({force:!0}).catch(()=>{}).then(()=>{S=Date.now();for(let t of q)t()})}function ne(){if(!A||S===0||Date.now()-S<ee)return!1;return U=null,S=0,lx(),!0}function re(){if(typeof window>"u"||J)return;J=!0,window.addEventListener("focus",()=>{ne()})}re();function Hb(){return sx()||aC()}function aC(){return j}function _A(){return A}function km(){return I}function SA(){return M}function lC(){return R}function ie(){return D}function Kl(){return ax()||ie()||pt.aiModel.default}function se(e,t){let r;try{r=new URL(e,"http://jx.invalid")}catch{return e}return r.pathname=r.pathname.replace(/[^/]*$/,t),/^https?:/i.test(e)?r.href:`${r.pathname}${r.search}`}async function lh(e={}){let t=e.credentials??sC(),r=V(t);if(g&&P===r&&!e.force)return g;let i=p(),s=await Promise.resolve(i.aiChatUrl()),f=se(s,"models"),m={};if(t.apiKey)m["X-Api-Key"]=t.apiKey;if(t.baseUrl)m["X-Api-Base-URL"]=t.baseUrl;let c=await fetch(f,{headers:m});if(!c.ok)throw Error(`HTTP ${c.status}`);let a=await c.json();if(j=a.configured===!0,A=a.managed===!0,D=a.defaultModel??"",I=a.code,M=a.upstreamError!==void 0?a.upstreamMessage??"":"",R=null,a.code==="action_required"){let u={actions:Np(a.actions)};if(n(a.detail)&&a.detail)u.detail=a.detail;R=u}return g=(a.models||[]).map((u)=>{let h={id:u.id,name:u.name||u.id};if(Z(u.contextWindow))h.contextWindow=u.contextWindow;if(Xe(u.toolSupport))h.toolSupport=u.toolSupport;return h}),P=r,g}var T=new Set,B=null;function CA(e){if(T.size===0){B=e;return}for(let t of T)t(e)}function H(e){T.add(e);let t=B;if(B=null,t)e(t);return()=>{T.delete(e)}}function cC(){return _e()&&te(p().performAction)}function l$(e){let t=e.find((i)=>i.primary)??e[0];if(!t)return null;let r=e.find((i)=>i!==t);return r?{lead:t,other:r}:{lead:t}}var w=null,W=!1;function dC(e){let t=l$(e.actions);if(!cC()||!t)return Promise.resolve(!1);return w??=ae(e,t).finally(()=>{w=null}),w}async function Em(e){let t=_(e);if(t.code!=="action-required"||!t.actions?.length)return!1;return dC({actions:t.actions,detail:e instanceof Error?e.message:void 0,heading:t.heading,retry:t.retry})}async function z(){ds(),await jd(),c$()}function ae(e,t){let r=e.detail??"This needs one more step first.";return new Promise((i)=>{let s="offer",f=(y)=>{if(s==="done")return;s="done",E.close(),i(y)},m=(y)=>{s="offer",E.update({cancelLabel:"Not now",confirmLabel:t.lead.label,message:y,secondaryLabel:t.other?.label??""})},c=async(y)=>{let b;try{b=await y}catch(x){if(s==="waiting")m(x instanceof Error?x.message:String(x));return}if(b?.status==="done"){await z(),f(!0);return}if(s!=="waiting"||!b||b.status==="redirect")return;jd(),m(r)},a=(y)=>{if(s!=="offer")return;s="waiting";let b;try{b=p().performAction(y)}catch(x){m(x instanceof Error?x.message:String(x));return}E.update({cancelLabel:"Cancel",confirmLabel:"Waiting…",message:"Finish in the window that opened. This closes by itself once it is done.",secondaryLabel:""}),c(b)},{lead:u,other:h}=t,O={cancelLabel:"Not now",confirmLabel:u.label,headline:e.heading??"One more step",layer:tt("dialog"),message:r,onCancel:()=>{W=!0,f(!1)},onClosed:()=>{f(!1)},onConfirm:()=>{a(u)},region:"account/action"};if(h)O.onSecondary=()=>{a(h)},O.secondaryLabel=h.label;let E=Ys(O)})}function ce(e){if(e==="reload")location.reload();else if(e==="repeat")C.info("Done. Run that again now.",{key:"account.action.retry",source:"Account"})}function kA(){return H((e)=>{if(W||w)return;dC(e).then((t)=>{if(t)ce(e.retry)})})}async function cx(e){if(!cC())return!1;let t=p().performAction(e),r;try{r=await t}catch(i){return C.error(i instanceof Error?i.message:String(i),{key:"account.action",source:"Account",tier:"toast"}),!1}if(r?.status==="done")return await z(),!0;if(r?.status!=="redirect")await jd();return!1}function c$(){for(let e of N()){let t={key:`account.notice.${e.id}`,source:"Account"};if(e.level==="warning")C.warn(e.message,t);else C.info(e.message,t)}}
|
|
2
|
-
export{jd,iC,oC,hA,pA,t$,jb,rr,Ca,rC,n$,i$,o$,Np,r$,fA,mA,Hd,gA,sx,sl,ax,bA,vA,yA,Cm,wA,sC,ds,s$,a$,xA,lx,Hb,aC,_A,km,SA,lC,Kl,lh,CA,cC,l$,dC,Em,kA,cx,c$};
|
|
3
|
-
|
|
4
|
-
//# debugId=615B960ED55D2C8664756E2164756E21
|
|
5
|
-
//# sourceMappingURL=studio-0khd0xdw.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{vx,Yl,al,m,_i,Ht}from"./studio-y1x65h5r.js";import{cS,vw,_T}from"./studio-c4rcaftm.js";import{Kk,Jk,KR}from"./studio-8m1t83kn.js";import{t_,n_,wk}from"./studio-v0gsjav0.js";var n={children:[],tagName:"div"},b2=new Set(Object.values(vx));function Q0(e){return b2.has(e)}function mk(e){let o=Yl(e),r=m.tabs.get(o);if(r)return Ht(o),r;return _i({capabilities:{modes:[vx[e]]},document:structuredClone(n),documentPath:null,id:o})}function gk(e,o){_i({background:!0,capabilities:{modes:[vx[e]]},document:structuredClone(n),documentPath:null,id:Yl(e),paneId:o})}function e_(e,o){let r=al(o.id);if(r==="media")return cS(e,o);if(r==="content")return Kk(e,o);return t_(e,o)}function Ag(e){vw(e),Jk(e),n_(e)}function bk(e,o){let{paneId:r}=e;if(e_(r,o))return;Ag(r);let t=al(o.id);if(t==="media"){_T(e,o);return}if(t==="content"){KR(e,o);return}wk(e,o)}
|
|
2
|
-
export{b2,Q0,mk,gk,e_,Ag,bk};
|
|
3
|
-
|
|
4
|
-
//# debugId=BB92605E545D299764756E2164756E21
|
|
5
|
-
//# sourceMappingURL=studio-1fvzq9vs.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{p,_e}from"./studio-pr23qhrw.js";import{Q}from"./studio-nqxqf8p2.js";import{$a,k$}from"./studio-cq87hree.js";import{ge,ea,ne,g,he,C,dl,tf}from"./studio-hw60n5dh.js";import{sO,Y,ov,qd,kr,Ix,Rx,Ra,cv,O$,m,u,_i}from"./studio-y1x65h5r.js";import{Bt,eu,zi,of,fn,cr,tI,Oa,nI}from"./studio-tpmnbgmt.js";import{Pd}from"./studio-hvxt8z79.js";import{x$,VA,UA,hh,Gb}from"./studio-7cg75gtj.js";import{Ko}from"./studio-02phtmqn.js";import{fN,dL}from"./studio-5abge3wy.js";import{zd}from"./studio-9wyqyfqy.js";import{ks,ko}from"./studio-m4w6sygj.js";import{tl,Ku}from"./studio-wcakp5bt.js";import{eN}from"./studio-rdnezzkd.js";import{oe}from"./studio-gqpty626.js";import{n,Z,Xe,_,v}from"./studio-kt2j51sa.js";function ie(e,o=[]){if(e?.tagName==="slot"){let s=e.attributes?.name;o.push(n(s)?s.trim():"")}if(Array.isArray(e?.children))for(let s of e.children)ie(n(s)?void 0:s,o);return o}function vS(e){let o=ie(e),s=o.filter((r)=>r==="").length;if(s>1)return`Component has ${s} unnamed <slot> elements — only one default slot is allowed. Give extra slots a name attribute.`;let l=new Set;for(let r of o){if(r&&l.has(r))return`Duplicate slot name "${r}" — slot names must be unique within a component.`;l.add(r)}return null}var se={invokerTags:Gb,popoverTags:hh},D="Popover",ke={display:"document.repairPopoverDisplay","open-display":"document.repairPopoverDisplay",invoker:"document.repairPopoverInvoker",mode:"document.repairPopoverMode"};function ae(e,o,s,l){let r=`${o}.${s}.${l.join("/")}`,d=e.get(r)??0;return e.set(r,d+1),d===0?r:`${r}#${d}`}function W(e,o){dl((d)=>d.source===D);let s=new Map,l=VA(e,se);for(let d of l){let c=d.fix===void 0?void 0:ke[d.fix],b={detail:d.detail,key:ae(s,"popover",d.rule,d.path),source:D,tier:"problem"};if(c!==void 0)b.action=c,b.actionArgs={path:d.path};if(o!==void 0)b.path=o;C(d.severity,d.message,b)}let r=fN(e,se);for(let d of r){let c={detail:d.detail,key:ae(s,"dialog",d.rule,d.path),source:D,tier:"problem"};if(o!==void 0)c.path=o;C(d.severity,d.message,c)}return l.length+r.length}function z(e,o){let s=o?.path;if(!Array.isArray(s))throw RangeError(`command "${e}" needs a "path" argument naming the popover`);return s}function J(e){let o=u.value;if(!o)throw RangeError(`command "${e}" needs an open document`);return o}function Se(){return[{category:"Document",group:"2_document",id:"document.checkPopovers",level:"document",menus:["palette"],requires:"an open document",run:()=>{let e=J("document.checkPopovers"),o=W(e.doc.document,e.documentPath??void 0);C.success(o===0?"No popover problems found in this document.":`${o} popover problem(s) filed.`,{key:"popover.run",source:D})},title:"Check Popovers",when:(e)=>e.document.open,aiTool:{description:"Check the open document for popover defects an author can fix — a base-rule `display` "+"that defeats the browser's own hiding of a closed popover, `popovertarget` on an "+"element that cannot invoke, a target naming no popover, a cut exit animation — and "+"file each as a Problem. The findings come back as data.",name:"check_popovers",report:()=>{let e=tf(D),o=e.length;return{data:e,summary:o===0?"No popover problems found in this document.":`Filed ${o} popover problem${o===1?"":"s"} in Problems.`}}}},{args:{additionalProperties:!1,properties:{path:{items:{type:["string","number"]},type:"array"}},required:["path"],type:"object"},category:"Document",group:"2_document",id:"document.repairPopoverDisplay",level:"document",menus:[],requires:"a popover whose base rule sets display",run:(e,o)=>{let l=J("document.repairPopoverDisplay"),r=z("document.repairPopoverDisplay",o),d=oe(l.doc.document,r),c=UA(d?.style);if(!c)throw RangeError(`command "${"document.repairPopoverDisplay"}": nothing to move — this popover sets no display`);Y(l,(b)=>{for(let w of c.base)qd(b,r,w,"");for(let w of c.breakpoints)Rx(b,r,[w],"display","");if(c.openDisplay!==null)Ix(b,r,":popover-open","display",c.openDisplay)}),C.success("Moved `display` into `:popover-open`.",{key:"popover.repaired.display",source:D})},title:"Move display into :popover-open",when:(e)=>e.document.open},{args:{additionalProperties:!1,properties:{path:{items:{type:["string","number"]},type:"array"}},required:["path"],type:"object"},category:"Document",group:"2_document",id:"document.repairPopoverInvoker",level:"document",menus:[],requires:"an element carrying popovertarget that cannot invoke",run:(e,o)=>{let l=J("document.repairPopoverInvoker"),r=z("document.repairPopoverInvoker",o);Y(l,(d)=>{kr(d,r,"popovertarget"),kr(d,r,"popovertargetaction")}),C.success("Removed the attributes, which did nothing on this element.",{key:"popover.repaired.invoker",source:D})},title:"Remove the inert popover attributes",when:(e)=>e.document.open},{args:{additionalProperties:!1,properties:{path:{items:{type:["string","number"]},type:"array"}},required:["path"],type:"object"},category:"Document",group:"2_document",id:"document.repairPopoverMode",level:"document",menus:[],requires:"a popover whose mode is not one of the three keywords",run:(e,o)=>{let l=J("document.repairPopoverMode"),r=z("document.repairPopoverMode",o);Y(l,(d)=>{kr(d,r,"popover",x$)}),C.success(`Set \`popover\` to "${x$}".`,{key:"popover.repaired.mode",source:D})},title:"Set popover to auto",when:(e)=>e.document.open}]}function JD(e){e.registerAll(Se())}function kw(e,o){if(e===o)return!0;if(Array.isArray(e)&&Array.isArray(o))return e.length===o.length&&e.every((s,l)=>s===o[l]);if(_(e)&&_(o)&&!Array.isArray(e)&&!Array.isArray(o))return e.$ref===o.$ref;return!1}var N="grid://",gb={children:[],tagName:"div"};function ls(e){switch(e.kind){case"pages":return`${N}pages`;case"collection":return`${N}collection/${encodeURIComponent(e.name)}`;default:return`${N}data/${encodeURIComponent(e.connection)}/${encodeURIComponent(e.table)}`}}function xe(e){return e.startsWith(N)}function Bl(e){if(!xe(e))return null;let o=e.slice(N.length).split("/");if(o[0]==="pages"&&o.length===1)return{kind:"pages"};if(o[0]==="collection"&&o.length===2&&o[1])return{kind:"collection",name:decodeURIComponent(o[1])};if(o[0]==="data"&&o.length===3&&o[1]&&o[2])return{connection:decodeURIComponent(o[1]),kind:"data",table:decodeURIComponent(o[2])};return null}function mm(e){let o=Bl(e);if(!o)return null;switch(o.kind){case"pages":return"Pages · grid";case"collection":return`${o.name} · grid`;default:return`${o.table} @ ${o.connection} · grid`}}var le=0;function ce(e){let o=e.coalesceMs??800,s=e.now??(()=>Date.now()),r=g({deletes:new Set,errors:new Map,inserts:new Map,pending:new Map,redoStack:[],stale:new Set,undoStack:[]}),d=null,c=(t,i,a)=>{let f=r.errors.get(t);if(f)f.set(i,a);else r.errors.set(t,new Map([[i,a]]))},b=(t,i)=>{let a=r.errors.get(t);if(a?.delete(i),a?.size===0)r.errors.delete(t)},w=(t)=>{if(r.redoStack.length=0,d){d.push(t);return}let i=r.undoStack.at(-1);if(t.kind==="cell"&&i?.kind==="cell"&&i.rowKey===t.rowKey&&i.field===t.field&&t.at-i.at<=o){i.after=t.after,i.at=t.at;return}r.undoStack.push(t)},k=(t,i,a)=>{let f=r.inserts.get(t);if(f){if(a===null)delete f[i];else f[i]=a;return}if(kw(a,e.resolveBaseline(t,i))){let y=r.pending.get(t);if(y?.delete(i),y?.size===0)r.pending.delete(t);return}let h=r.pending.get(t);if(h)h.set(i,{value:a});else r.pending.set(t,new Map([[i,{value:a}]]))},P=(t,i)=>{let a=r.inserts.get(t);if(a)return a[i]??null;let f=r.pending.get(t)?.get(i);return f?f.value:e.resolveBaseline(t,i)},O=(t,i)=>{let a=r.errors.get(t);return a?.get(i)??a?.get("*")??null},M=(t,i)=>{switch(t.kind){case"cell":{k(t.rowKey,t.field,i==="undo"?t.before:t.after);break}case"insert":{if(i==="undo")r.inserts.delete(t.tempKey);else r.inserts.set(t.tempKey,{...t.cells});break}case"drop-insert":{if(i==="undo")r.inserts.set(t.tempKey,{...t.cells});else r.inserts.delete(t.tempKey);break}case"delete":{if(i==="undo")r.deletes.delete(t.rowKey);else r.deletes.add(t.rowKey);break}default:{let a=i==="undo"?t.ops.toReversed():t.ops;for(let f of a)M(f,i);break}}},F=()=>{if(d)throw Error("edit-buffer: groups may not nest");d=[]},x=()=>{let t=d;if(d=null,!t)return;if(t.length===1)r.undoStack.push(t[0]);else if(t.length>1)r.undoStack.push({kind:"group",ops:t})},E=(t)=>{let i=(a)=>{switch(a.kind){case"cell":return t(a.rowKey)?null:a;case"insert":case"drop-insert":return t(a.tempKey)?null:a;case"delete":return t(a.rowKey)?null:a;default:{let f=a.ops.map((h)=>i(h)).filter((h)=>h!==null);return f.length>0?{kind:"group",ops:f}:null}}};r.undoStack=r.undoStack.map(i).filter((a)=>a!==null),r.redoStack=r.redoStack.map(i).filter((a)=>a!==null)};return{applyCommitResult(t){let i=new Set;for(let a of t.cells)if(a.ok){let f=r.pending.get(a.rowKey);if(f?.delete(a.field),f?.size===0)r.pending.delete(a.rowKey);b(a.rowKey,a.field)}else if(c(a.rowKey,a.field,a.error??"Save failed"),a.stale)r.stale.add(a.rowKey);for(let a of t.inserts)if(a.ok)r.inserts.delete(a.tempKey),r.errors.delete(a.tempKey),i.add(a.tempKey);else c(a.tempKey,"*",a.error??"Insert failed");for(let a of t.deletes)if(a.ok)r.deletes.delete(a.rowKey),r.pending.delete(a.rowKey),r.errors.delete(a.rowKey),i.add(a.rowKey);else if(c(a.rowKey,"*",a.error??"Delete failed"),a.stale)r.stale.add(a.rowKey);for(let a of i)r.stale.delete(a);if(i.size>0)E((a)=>i.has(a))},buildBatch(){let t=[];for(let[i,a]of r.pending){if(r.deletes.has(i))continue;for(let[f,h]of a)t.push({baseline:e.resolveBaseline(i,f),field:f,rowKey:i,value:h.value})}return{cells:t,deletes:[...r.deletes].map((i)=>({rowKey:i})),inserts:[...r.inserts].map(([i,a])=>({cells:{...a},tempKey:i}))}},canRedo:()=>r.redoStack.length>0,canUndo:()=>r.undoStack.length>0,cellError:O,cellState(t,i){if(O(t,i)!==null)return"error";if(r.stale.has(t))return"stale";if(r.inserts.has(t)||r.pending.get(t)?.has(i))return"dirty";return"clean"},deleteRow(t){if(r.deletes.has(t))return;let i=r.inserts.get(t);if(i){let a={...i};r.inserts.delete(t),r.errors.delete(t),r.stale.delete(t),w({cells:a,kind:"drop-insert",tempKey:t});return}r.deletes.add(t),w({kind:"delete",rowKey:t})},dirtyCount(){let t=r.inserts.size+r.deletes.size;for(let[i,a]of r.pending)if(!r.deletes.has(i))t+=a.size;return t},discardRow(t){r.pending.delete(t),r.deletes.delete(t),r.inserts.delete(t),r.errors.delete(t),r.stale.delete(t),E((i)=>i===t)},effectiveValue:P,beginGroup:F,endGroup:x,group(t){F();try{t()}finally{x()}},insertRow(t={}){le+=1;let i=`__new-${le}`;return r.inserts.set(i,{...t}),w({cells:{...t},kind:"insert",tempKey:i}),i},isDirty:()=>r.pending.size>0||r.inserts.size>0||r.deletes.size>0,isInsertKey:(t)=>r.inserts.has(t),markStale(t){for(let i of t)r.stale.add(i)},redo(){let t=r.redoStack.pop();if(!t)return!1;return M(t,"redo"),r.undoStack.push(t),!0},reset(){r.pending.clear(),r.inserts.clear(),r.deletes.clear(),r.errors.clear(),r.stale.clear(),r.undoStack.length=0,r.redoStack.length=0},rowState(t){if(r.deletes.has(t))return"pending-delete";if(r.inserts.has(t))return"pending-insert";if(r.stale.has(t))return"stale";if(r.pending.has(t)||r.errors.has(t))return"dirty";return"clean"},setCell(t,i,a){let f=P(t,i);if(kw(f,a))return;k(t,i,a),w({after:a,at:s(),before:f,field:i,kind:"cell",rowKey:t})},state:r,undo(){let t=r.undoStack.pop();if(!t)return!1;return M(t,"undo"),r.redoStack.push(t),!0}}}var de={array:220,boolean:70,date:130,enum:140,image:180,number:110,readonly:200,reference:200,string:180,text:340};function ue(e){return Math.min(340,Math.max(90,Math.round(e*7.5)))}function Pe(e){if(e.$ref)return"reference";if(e.enum!==void 0&&Array.isArray(e.enum))return"enum";let o=e.type==="array"?void 0:e.format;if(Ra(o))return"image";if(o==="date"||o==="date-time")return"date";switch(e.type){case"number":case"integer":return"number";case"boolean":return"boolean";case"array":return"array";case"object":return"readonly";default:return(e.maxLength??0)>200||e.format==="markdown"?"text":"string"}}function fe(e){let o=e.replaceAll(/([a-z0-9])([A-Z])/g,"$1 $2").replaceAll(/[_-]+/g," ").trim();return o.charAt(0).toUpperCase()+o.slice(1)}function Ew(e,o={}){let s=Object.entries(e?.properties??{}),l=new Set(e?.required),r=new Set(o.readonlyFields),d=s.map(([c,b])=>{let w=r.has(c)?"readonly":Pe(b),k=Array.isArray(b.enum)?Math.max(...b.enum.map((P)=>String(P).length),4):0;return{editable:w!=="readonly",field:c,kind:w,pk:c===o.idField,required:l.has(c),schema:b,title:fe(c),widthHint:w==="enum"?ue(k+3):de[w]}});return d.sort((c,b)=>{let w=(P)=>P.pk?0:P.required?1:2,k=w(c)-w(b);return k===0?0:k}),d}function Tw(e,o=50){let s=e.slice(0,o),l=[];for(let r of s)for(let d of Object.keys(r))if(!l.includes(d))l.push(d);return l.map((r)=>{let d=s.flatMap((w)=>{let k=w[r];return k===null||k===void 0||k===""?[]:[k]}),c=Ge(d),b=Math.max(...d.map((w)=>nr(w).length),r.length,4);return{editable:!0,field:r,kind:c,title:fe(r),widthHint:c==="string"||c==="text"?ue(b):de[c]}})}function Ge(e){if(e.length===0)return"string";if(e.some((s)=>Array.isArray(s)))return"array";let o=e.map(String);if(e.every((s)=>Xe(s))||o.every((s)=>/^(true|false)$/i.test(s)))return"boolean";if(e.every((s)=>Z(s))||o.every((s)=>s.trim()!==""&&!Number.isNaN(Number(s.replaceAll(/[$€£¥,\s]/g,"")))))return"number";if(o.every((s)=>/^\d{4}-\d{2}-\d{2}([T ].*)?$/.test(s)))return"date";if(o.some((s)=>s.length>200))return"text";return"string"}function xp(e,o){if(e===null||e===void 0)return null;switch(o.kind){case"number":{if(Z(e))return Number.isNaN(e)?null:e;let s=String(e).trim().replaceAll(/[$€£¥,\s]/g,"");if(s==="")return null;let l=Number(s);return Number.isNaN(l)?null:l}case"boolean":{if(Xe(e))return e;return String(e).trim().toLowerCase()==="true"}case"array":{if(Array.isArray(e))return e.map(String);let s=String(e).trim();return s===""?[]:s.split(",").map((l)=>l.trim()).filter(Boolean)}case"reference":{if(v(e)&&"$ref"in e){let l=e.$ref;return n(l)&&l!==""?l:null}let s=String(e).trim();return s===""?null:s}default:{let s=String(e);return s===""?null:s}}}function nr(e){if(e===null||e===void 0)return"";if(Array.isArray(e))return e.join(", ");if(_(e))return e.$ref;return String(e)}var bS="__key",H=new WeakMap;function ir(e){return e?H.get(he(e))??null:null}function _p(e,o){let l=g({columns:[],error:null,grouping:null,loading:!1,query:{},rows:[],saving:!1,total:0}),r=new Map,d=(t)=>{r=new Map(t.map((i)=>[i.key,i]))},c=ce({resolveBaseline:(t,i)=>r.get(t)?.cells[i]??null}),b=async()=>{let t=await o.rows(l.query);d(t.rows),l.rows=t.rows,l.total=t.total},w=(t)=>{let i=l.columns.filter((h)=>h.required&&h.editable);if(i.length===0)return null;let a=t.cells.filter((h)=>h.value===null&&i.some((y)=>y.field===h.field)).map((h)=>({error:"Required",field:h.field,ok:!1,rowKey:h.rowKey})),f=t.inserts.filter((h)=>i.some((y)=>h.cells[y.field]===null||h.cells[y.field]===void 0)).map((h)=>({error:`Missing required: ${i.filter((G)=>h.cells[G.field]===null||h.cells[G.field]===void 0).map((G)=>G.field).join(", ")}`,ok:!1,tempKey:h.tempKey}));if(a.length===0&&f.length===0)return null;return{cells:a,deletes:[],inserts:f}},k=(t)=>t===null||t===""||Array.isArray(t)&&t.length===0,P=(t,i,a)=>{if(a==="number")return(Z(t)?t:0)-(Z(i)?i:0);if(a==="boolean")return(t===!0?1:0)-(i===!0?1:0);return nr(t).localeCompare(nr(i))},O=()=>{let t=l.rows.map((f)=>f.key),{dir:i,orderBy:a}=l.query;if(a&&!o.capabilities.remoteSort){let f=l.columns.find((y)=>y.field===a)?.kind,h=i==="desc"?-1:1;t=t.toSorted((y,G)=>{let R=c.effectiveValue(y,a),U=c.effectiveValue(G,a);if(k(R)!==k(U))return k(R)?1:-1;return h*P(R,U,f)})}return l.grouping?[...M(t).values()].flat():t},M=(t)=>{let i=new Map;for(let a of t){let f=nr(c.effectiveValue(a,l.grouping)),h=i.get(f);if(h)h.push(a);else i.set(f,[a])}return i},F=null,x=()=>F?.refreshData(),E={addRow(t={}){let i=c.insertRow(t);return x(),i},bindView(t){F=t},buffer:c,deleteRows(t){if(t.length===0)return;c.group(()=>{for(let i of t)c.deleteRow(i)}),x()},discardRow(t){c.discardRow(t),x()},replaceAll(t,i){if(t==="")return 0;let a=l.columns.filter((y)=>y.editable&&(y.kind==="string"||y.kind==="text")),f=[...l.rows.map((y)=>y.key),...c.state.inserts.keys()],h=0;if(c.group(()=>{for(let y of f){if(c.rowState(y)==="pending-delete")continue;for(let G of a){let R=c.effectiveValue(y,G.field);if(n(R)&&R.includes(t))c.setCell(y,G.field,R.replaceAll(t,i)),h+=1}}}),h>0)x();return h},effectiveRows(){let t=(f)=>Array.isArray(f)?[...f]:_(f)?{$ref:f.$ref}:f,i=(f)=>{let h=[[bS,f]];for(let y of l.columns)h.push([y.field,t(c.effectiveValue(f,y.field))]);return Object.fromEntries(h)},a=O().map((f)=>i(f));for(let[f]of c.state.inserts)a.push(i(f));return a},groups(){if(!l.grouping)return[];return[...M(O())].map(([t,i])=>({count:i.length,value:t}))},async load(){l.loading=!0,l.error=null;try{l.columns=await o.columns(),await b()}catch(t){l.error=Q(t)}finally{l.loading=!1}x()},async refresh(){if(c.isDirty()){if(!await Ko("Refresh Grid",`Discard ${c.dirtyCount()} pending change(s) and reload?`,{confirmLabel:"Discard & Reload",destructive:!0}))return}c.reset(),await o.refresh?.(),await this.load()},async save(){if(l.saving)return;let t=c.buildBatch(),i=t.cells.length+t.inserts.length+t.deletes.length;if(i===0){C.info("No grid changes to save.",{key:"grid.save"});return}let a=w(t);if(a){c.applyCommitResult(a),C.warn("Required cells are empty — fix the marked rows, then save again.",{key:"grid.save",source:"Data",tier:"problem"});return}if(t.deletes.length>0){if(!await Ko("Delete Rows",`Save will permanently delete ${t.deletes.length} row(s). Continue?`,{confirmLabel:"Delete & Save",destructive:!0}))return}let h=new Set(t.cells.map((y)=>y.rowKey)).size+t.inserts.length+t.deletes.length>5?tl({title:"Saving grid"}):null;l.saving=!0;try{let y=await o.commit(t),G=(S,j)=>`${S}\x00${j}`,R=new Map(t.cells.map((S)=>[G(S.rowKey,S.field),S]));for(let S of y.cells){let j=R.get(G(S.rowKey,S.field));if(S.ok&&j){let re=r.get(S.rowKey);if(re)re.cells[S.field]=j.value}}if(c.applyCommitResult(y),y.inserts.some((S)=>S.ok)||y.deletes.some((S)=>S.ok))await b();let L=y.cells.filter((S)=>S.ok).length+y.inserts.filter((S)=>S.ok).length+y.deletes.filter((S)=>S.ok).length,ee=i-L,te=y.cells.filter((S)=>S.stale).length+y.deletes.filter((S)=>S.stale).length;if(ee===0)C.success(`Saved ${L} change(s).`,{key:"grid.save"});else C.error(`Saved ${L} · ${ee} failed${te?` (${te} stale)`:""} — kept pending.`,{action:"file.save",key:"grid.save",source:"Data"})}catch(y){C.error("Could not save the grid.",{action:"file.save",detail:Q(y),key:"grid.save",source:"Data"})}finally{l.saving=!1,h?.done(),x()}},serializeForSource(){if(!o.serializeForSource)return null;return o.serializeForSource(c.buildBatch())},async setQuery(t){l.query=t,l.loading=!0;try{await b()}catch(i){l.error=Q(i)}finally{l.loading=!1}x()},setGrouping(t){l.grouping=t,x()},async setSort(t){let i={...l.query};if(t)i.orderBy=t.field,i.dir=t.dir;else delete i.orderBy,delete i.dir;if(!o.capabilities.remoteSort){l.query=i,x();return}await this.setQuery(i)},source:o,state:l,tab:e};return e.scope.run(()=>{ne(()=>{e.doc.dirty=c.isDirty()}),ov(e,{canRedo:()=>c.canRedo(),canUndo:()=>c.canUndo(),redo:()=>{c.redo(),x()},undo:()=>{c.undo(),x()}});let t=p();if(t.subscribeFileEvents&&o.backingPaths){let i=t.subscribeFileEvents((a)=>{let f=o.backingPaths(),h=new Set;for(let y of a){if(y.isDir)continue;let G=y.path.replaceAll("\\","/"),R=f.get(G);if(R!==void 0&&!zd(G))h.add(R)}if(h.size===0)return;if(c.isDirty()){let y=h.has("*")?l.rows.map((G)=>G.key):[...h];c.markStale(y),C.warn("Grid rows changed on disk — marked stale; refresh to reload.",{key:"grid.stale",source:"Data"}),x()}else E.refresh()});ea(i)}ea(()=>{ov(e,null),H.delete(he(e)),o.dispose?.()})}),H.set(he(e),E),E}async function qu(e){let s=ir(e)?.serializeForSource();if(s)return s;await Bt();let l=zi(e.doc.sourceFormat);if(l?.capabilities.serialize){let r=e.doc.content.frontmatter,d=e.doc.document,c={...r,...d,children:d.children??[]};return Oa(l.name,c,{mode:"roundtrip",...e.doc.source!==null&&{source:e.doc.source}})}if(e.doc.mode==="content"){let r=cr();if(r){let d=e.doc.content.frontmatter,c=Object.keys(d).length>0,b={...d,...e.doc.document};return Oa(r.name,b,{frontmatter:c,mode:"roundtrip"})}}return ko(sO(e.doc.document,e.doc.bareRepeaters??null),e.doc.layout??null)}var Re=200,Ee=500,Te=2097152,A=new Map,V=!1,I=null,T=null,B=null,X=null;function Oe(){let e=[];for(let o of m.tabs.values())if(o.doc.dirty&&o.documentPath)e.push(o);return e}async function me(){if(!_e())return;let e=p();if(!e.setPreviewOverlay||!e.clearPreviewOverlay)return;let o=new Set;for(let s of Oe()){let l=s.documentPath.replace(/^\.\//,""),r;try{r=await qu(s)}catch{continue}if(r.length>Te)continue;if(o.add(l),A.get(l)===r)continue;A.set(l,r),await e.setPreviewOverlay(l,r)}for(let s of A.keys())if(!o.has(s))A.delete(s),await e.clearPreviewOverlay(s)}function pe(){if(!V)return;let e=Date.now();if(B??=e,T)clearTimeout(T);let o=e-B,s=Math.max(0,Math.min(Re,Ee-o));T=setTimeout(()=>{T=null,B=null,X=me().finally(()=>{X=null})},s)}function YD(){pe()}function ZD(){if(V)return;V=!0,I=ge(),I.run(()=>{ne(()=>{for(let e of m.tabs.values())e.doc.dirty,e.doc.document;pe()})})}function XD(){if(V=!1,T)clearTimeout(T),T=null;B=null,I?.stop(),I=null,A.clear()}async function yS(){if(!V)return;if(T)clearTimeout(T),T=null,B=null;await X,await me()}var ye=/^[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}$/,Me=new Set(["vnd","prs","x"]);function $e(e){if(!n(e))return null;let[o,...s]=e.split(";"),l=(o??"").indexOf("/");if(l===-1)return null;let r=(o??"").slice(0,l).trim().toLowerCase(),d=(o??"").slice(l+1).trim().toLowerCase();if(!ye.test(r)||!ye.test(d))return null;let c=d.lastIndexOf("+"),b=c===-1?null:d.slice(c+1),w=c===-1?d:d.slice(0,c);if(b==="")return null;let k=w.indexOf("."),P=k===-1?null:w.slice(0,k),O=P!==null&&Me.has(P)?P:null,M=O===null?w:w.slice(O.length+1);if(M==="")return null;let F={};for(let x of s){let E=x.indexOf("=");if(E===-1)return null;let t=x.slice(0,E).trim().toLowerCase(),i=x.slice(E+1).trim();if(t==="")return null;if(i.startsWith('"')&&i.endsWith('"')&&i.length>=2)i=i.slice(1,-1);F[t]=i}return{parameters:F,subtype:M,suffix:b,tree:O,type:r}}function Lw(e){let o=$e(e);if(o===null)return null;let s=o.tree===null?"":`${o.tree}.`,l=o.suffix===null?"":`+${o.suffix}`;return`${o.type}/${s}${o.subtype}${l}`}var we="text/markdown; variant=GFM",be="application/yaml",Tt={".markdown":`${we}; charset=utf-8`,".md":`${we}; charset=utf-8`,".yaml":`${be}; charset=utf-8`,".yml":`${be}; charset=utf-8`};async function QD(e,o){let s=await tI(e.name,o);return nI(e,s)}async function Hr(e,o){await Bt();let s=fn(e);if(!s||!s.capabilities.parse)throw of(e);return{...await QD(s,o),format:s}}var FT=async(e,o)=>{if(e.documentPath&&fn(e.documentPath)){let l=await Hr(e.documentPath,o);return e.doc.source=o,{document:l.document,frontmatter:l.frontmatter}}let s=ks(o);return e.doc.layout=s.layout,{document:s.document}};function Fe(e){return"showOpenFilePicker"in e}function De(e){return"showSaveFilePicker"in e}function q(e,o){if(e.documentPath!==null)o.path=e.documentPath;return o}async function X2(){try{await Bt();let e=eu(),o=[{accept:{"application/json":[".json"]},description:"Jx Component"},...e.filter((r)=>r.capabilities.parse).map((r)=>({accept:{[Lw(r.mediaType)??"text/plain"]:r.extensions},description:r.name}))],s=[".json",...e.flatMap((r)=>r.extensions)].join(","),l=async(r,d,c=null)=>{let b=c?await eN(r):null,w=fn(r);if(w){let{document:k,frontmatter:P}=await QD(w,d);_i({document:k,documentPath:b,fileHandle:c,frontmatter:P,id:r,source:d,sourceFormat:w.name})}else if(r.endsWith(".json")){let{document:k,layout:P}=ks(d);_i({document:k,documentPath:b,fileHandle:c,id:r,layout:P})}else throw of(r)};if(Fe(window)){let[r]=await window.showOpenFilePicker({types:o}),d=await r.getFile();await l(r.name,await d.text(),r)}else{let r=document.createElement("input");r.type="file",r.accept=s,r.addEventListener("change",async()=>{let d=r.files?.[0];if(!d)return;await l(d.name,await d.text())}),r.click()}}catch(e){if(!(e instanceof Error&&e.name==="AbortError"))C.error("Could not open the file.",{detail:Q(e),source:"Open File"})}}var ve=()=>{};function jT(e){ve=e}function K(e){let o=e.doc.document;ve(e.documentPath,o,e);let s=n(o.tagName)&&o.tagName.includes("-")?vS(o):null;if(s)C.warn(s,q(e,{key:`slots:${e.documentPath??e.id}`,source:"Components",tier:"problem"}));W(o,e.documentPath??void 0)}function Ne(e){return!Pd(e.documentPath??"")}async function Sp(e=u.value){if(!e)return!1;if(await dL(e.id),cv(e))return C.warn(`You have read access to this session — changes to ${e.documentPath??"this document"} stay in your browser and cannot be saved.`,q(e,{action:"file.save",key:`save.readOnly:${e.documentPath??e.id}`,source:"Collaboration"})),!1;if(!Ne(e))return C.warn(`${e.documentPath??"This file"} is a media file, so there is no document for Save to write.`,q(e,{key:`save.notADocument:${e.documentPath??e.id}`,source:"Save"})),!1;let o=ir(e);if(o)return await o.save(),!e.doc.dirty;try{if(await O$(e))return K(e),!0;let s=await qu(e);if(e.documentPath){if(await p().writeFile(e.documentPath,s),e.doc.dirty=!1,e.doc.sourceFormat!==null)e.doc.source=s;return yS(),K(e),!0}if(e.fileHandle&&"createWritable"in e.fileHandle){let l=await e.fileHandle.createWritable();if(await l.write(s),await l.close(),e.doc.dirty=!1,e.doc.sourceFormat!==null)e.doc.source=s;return K(e),!0}C.warn("This document has no save target — use Export.",{key:"save.noTarget"})}catch(s){if(!(s instanceof Error&&s.name==="AbortError"))C.error(`Could not save ${e.documentPath??e.id}.`,q(e,{action:"file.save",detail:Q(s),key:`save:${e.documentPath??e.id}`,source:"Save"}))}return!1}function Ae(e){return zi(e.doc.sourceFormat)??(e.doc.mode==="content"?cr():void 0)}async function HT(){let e=u.value;if(!e)return;try{await Bt();let o=Ae(e),s=await qu(e),l=o?Lw(o.mediaType)??"text/plain":"application/json",r=o?o.extensions[0]:".json",d=o?o.name:"Jx Component",c=o?`content${r}`:"component.json";if(De(window)){let b=e.documentPath?e.documentPath.split("/").pop():c,w=await window.showSaveFilePicker({suggestedName:b,types:[{accept:{[l]:[r]},description:d}]}),k=await w.createWritable();await k.write(s),await k.close(),e.doc.dirty=!1,K(e),C.success(`Exported as ${w.name}.`)}else{let b=new Blob([s],{type:l}),w=URL.createObjectURL(b),k=document.createElement("a");k.href=w,k.download=c,k.click(),URL.revokeObjectURL(w),e.doc.dirty=!1,K(e),C.success(`Downloaded ${c}.`)}}catch(o){if(!(o instanceof Error&&o.name==="AbortError"))C.error("Could not export the document.",{detail:Q(o),source:"Export"})}}async function Ce(e,o){let s=Pd(e)?await Ku(e):await $a({path:e});return k$(s,o)??""}async function bb(e){let o=await Ce(e.path,"delete"),s=`Delete ${e.name}? This cannot be undone.`;return Boolean(await Ko("Delete File",o===""?s:`${s} ${o}`,{confirmLabel:"Delete",destructive:!0}))}async function vb(e,o="rename"){let s=await Ce(e,o);return s===""?void 0:s}
|
|
2
|
-
export{kw,gb,ls,Bl,mm,Ew,Tw,xp,nr,bS,ir,_p,vS,JD,qu,YD,ZD,XD,yS,Lw,QD,Hr,FT,X2,jT,Sp,HT,bb,vb};
|
|
3
|
-
|
|
4
|
-
//# debugId=41C934FE2B14C01C64756E2164756E21
|
|
5
|
-
//# sourceMappingURL=studio-1yhz0s8p.js.map
|