@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,9 +0,0 @@
|
|
|
1
|
-
import{p,_e}from"./studio-pr23qhrw.js";import{Q}from"./studio-nqxqf8p2.js";import{ge,ea,ne,g}from"./studio-hw60n5dh.js";import{ln,gx,Yl,Hi,Y,Gd,Vn,m,Ht}from"./studio-y1x65h5r.js";import{Sv}from"./studio-tpmnbgmt.js";import{Io}from"./studio-6vrxzkba.js";import{us}from"./studio-hnx1h1pr.js";import{Js,nn,Dp}from"./studio-gmhd0j3f.js";import{or}from"./studio-hvxt8z79.js";import{Ad,Cs,wp,Hl,Dc}from"./studio-2dtc90zs.js";import{ae}from"./studio-7cg75gtj.js";import{wi,T,R}from"./studio-02phtmqn.js";import{wr,Zu,ES,_b,ci,Vl}from"./studio-5abge3wy.js";import{ir,YD}from"./studio-1yhz0s8p.js";import{Fl,gp}from"./studio-bf0rgyf7.js";import{ya,Rc,OD,MD}from"./studio-d140sy8e.js";import{vp}from"./studio-e1g64q43.js";import{S}from"./studio-ana67wax.js";import{$e}from"./studio-gqpty626.js";import{n,Z,Xe,_,v}from"./studio-kt2j51sa.js";import{le}from"./studio-fqs1a22a.js";var he=["title","name","label","heading"];function pp(e,t={}){let r=(i)=>{for(let o of he){let s=i.find((a)=>a.toLowerCase()===o);if(s!==void 0)return s}return null};return r(Object.keys(e?.properties??{}))??r(Object.keys(t).filter((i)=>n(t[i])))}function j(e){if(e instanceof Date)return eb(e);if(n(e))return e;if(Z(e)||Xe(e))return String(e);if(Array.isArray(e))return e.filter((t)=>n(t)||Z(t)).map(String).join(", ");return""}function be(e,t){return Object.fromEntries(Object.keys(e?.properties??{}).filter((r)=>(r in t)).map((r)=>[r,j(t[r])]))}var xe=["date","published","publishedAt","pubDate","publishDate"];function z_(e,t){for(let[r,i]of Object.entries(e?.properties??{}))if(i.format==="date"||i.format==="date-time")return r;return xe.find((r)=>(r in t))??null}function bE(e){let t=e?.properties??{};return z_(e,Object.fromEntries(Object.keys(t).map((r)=>[r,""])))}function eb(e){if(e instanceof Date)return Number.isNaN(e.getTime())?"":e.toISOString().slice(0,10);if(!n(e))return"";let t=/^(\d{4}-\d{2}-\d{2})/.exec(e.trim());if(t)return t[1];let r=new Date(e);if(e.trim()===""||Number.isNaN(r.getTime()))return"";if(!e.includes(":")){let i=String(r.getMonth()+1).padStart(2,"0"),o=String(r.getDate()).padStart(2,"0");return`${r.getFullYear()}-${i}-${o}`}return r.toISOString().slice(0,10)}function P(e){let t=e.split("/").pop()??e,r=t.lastIndexOf(".");return r>0?t.slice(0,r):t}function B(e,t){if(t.startsWith("/"))return`public${t}`;let r=e.includes("/")?e.slice(0,e.lastIndexOf("/")):"",i=[...r===""?[]:r.split("/"),...t.split("/")],o=[];for(let s of i){if(s===""||s===".")continue;if(s==="..")o.pop();else o.push(s)}return o.join("/")}var W=/^[a-z][\d+.a-z-]*:/i;function Ee(e,t){let r=t.trim();if(r==="")return"";return W.test(r)?r:or(B(e,r))}function q(e){if(n(e))return e.split(",")[0]?.trim()??"";if(Array.isArray(e)){let[t]=e;return t===void 0?"":q(t)}if(v(e)){let{src:t}=e;return n(t)?t:""}return""}function U(e){if(e.format==="image")return!0;let t=e.properties?.src;if(e.type==="object"&&t?.type==="string")return!0;return e.type==="array"&&e.items!==void 0&&U(e.items)}function vE(e,t,r){for(let[i,o]of Object.entries(r?.properties??{}))if(U(o)){let s=Ee(e,q(t[i]));if(s!=="")return s}for(let i of Object.values(t)){if(!n(i)||W.test(i))continue;let o=i.lastIndexOf(".");if(o>0&&Dp(i.slice(o)))return or(B(e,i))}return""}function X(e,t,r){let i=ya(t)?.schema??null,o=pp(i,r),s=o===null?void 0:r[o],a=Hl(r),l=z_(i,r);return{date:l===null?"":eb(r[l]),fields:be(i,r),path:e,status:Dc(i,r)?a?"Draft":"Published":"",thumb:vE(e,r,i),title:n(s)&&s.trim()!==""?s:P(e)}}async function we(e){try{let t=await p().readFile(e);if(e.endsWith(".json")){let o=JSON.parse(t);return _(o)&&!Array.isArray(o)?o:{}}let{parseSourceForPath:r}=await (le("6pe4z7an"),import("./file-ops-6pe4z7an.js"));return(await r(e,t)).frontmatter}catch{return{}}}var E=new Map,x=new Map,N=0,F=new Set,K=200;async function Se(e,t){let r=t.slice(0,K),i=await Promise.all(r.map(async(s)=>X(s,e,await we(s)))),o=t.slice(K).map((s)=>({date:"",path:s,status:"",thumb:"",title:P(s)}));return[...i,...o]}function Qy(e,t){let r=t.join(`
|
|
2
|
-
`),i=E.get(e);if(i?.key===r)return i.entries;if(!_e())return t.map((s)=>({date:"",path:s,status:"",thumb:"",title:P(s)}));let o=`${e}
|
|
3
|
-
${r}`;if(!x.has(o)){let s=N,a=Se(e,t).then((l)=>{if(x.get(o)===a)x.delete(o);if(s===N){E.set(e,{entries:l,key:r});for(let c of F)c()}return l});x.set(o,a)}return null}function Fe(e,t,r){let i=E.get(t),o=i?.entries.findIndex((a)=>a.path===e)??-1;if(!i||o===-1)return!1;let s=i.entries.with(o,X(e,t,r));E.set(t,{entries:s,key:i.key});for(let a of F)a();return!0}function cD(e,t){let r=Vl(e);if(e===null||r===null||r===ci)return!1;return Fe(e,r,t)}function yE(){N+=1,E.clear(),x.clear()}function ew(e){return F.add(e),()=>{F.delete(e)}}var Le=/^\d{4}-\d{2}-\d{2}/,y="entry",b=g(new Map);function O(e){let t=b.get(e.id);if(t===void 0)return null;if("key"in t)return t.key;return ir(e)?.state.rows[t.row]?.key??null}function ve(e){return b.has(e.id)}function k(e,t){b.set(e.id,{key:t})}function Ce(e){b.delete(e.id)}function h(e){return ve(e)&&ir(e)!==null}function ee(e){let t=ir(e),r=O(e);if(!t||r===null)return{};let i={};for(let o of t.state.columns){let s=t.buffer.effectiveValue(r,o.field);if(s===null||s==="")continue;if(o.kind==="date"&&n(s)&&!Le.test(s)){i[o.field]=eb(s)||s;continue}i[o.field]=_(s)&&!Array.isArray(s)?s.$ref:s}return i}function Te(e){if(e===void 0||e===null)return null;if(Array.isArray(e))return e.map((t)=>n(t)?t:JSON.stringify(t));if(n(e)||Z(e)||Xe(e))return e;return JSON.stringify(e)}function A(e,t){let r=ir(e),i=O(e);if(!r||i===null)return;let o=new Set(r.state.columns.map((s)=>s.field));r.buffer.group(()=>{for(let[s,a]of Object.entries(t))if(o.has(s))r.buffer.setCell(i,s,Te(a))})}function w(e){let t=ir(e),r=O(e),i=t?.state.rows??[],o=r===null?-1:i.findIndex((s)=>s.key===r);return{index:o,next:o===-1?null:i[o+1]?.key??null,previous:o<=0?null:i[o-1]?.key??null,total:i.length}}async function dD(e,t){let{openFileInTab:r}=await (le("ybpp3j38"),import("./files-ybpp3j38.js"));await r(e);let i=m.tabs.get(e)??null;if(!i||!ir(i))return i;if(!b.has(i.id))i.scope.run(()=>{ea(()=>Ce(i))});if(b.set(i.id,{row:t}),!i.capabilities.modes.includes(y))i.capabilities.modes.unshift(y);return i.session.ui.canvasMode=y,i.session.ui.preview=!1,Ht(i.id),i}function te(e){return e.doc.sourceFormat==null&&e.doc.mode!=="content"}function Pl(e){if(h(e))return ee(e);return te(e)?e.doc.document:e.doc.content.frontmatter}function Re(e,t,r){let i=e.doc.document,o=Object.hasOwn(i,t)?$e(i[t]):void 0,s=r===void 0||r===null||r==="";if(s)delete i[t];else i[t]=r;let a=s?void 0:$e(r);Hi({forward:{key:t,op:"set-key",path:[],value:a},inverse:{key:t,op:"set-key",path:[],value:o}}),e.doc.dirty=!0,YD()}function I(e,t,r){if(h(e))A(e,{[t]:r});else if(te(e))Re(e,t,r);else Gd(e,t,r)}function W_(e,t){if(h(e)){A(e,t);return}Y(e,(r)=>{for(let[i,o]of Object.entries(t))I(r,i,o)})}var re={$schema:"https://jxsuite.com/schema/v1",$id:"StudioEntryEditor",$description:"The Entry editor (site-architecture.md §7.4) — one content entry's fields, in a pane, as a Jx document over the kit. The adapter (`surfaces/entry-editor.ts`) hands in a projection; `content/entry-editor.ts` decides everything in it — which collection the file belongs to, which record its fields live in, which required keys are absent and what a draft flag commits into. The FORM is an island: a schema is `ui/schema-form.ts`'s subject, so this document renders an empty `fields` node and the flow places the element that engine hands back (studio-ui-guidelines.md §9.3, §9.4). That is the whole of the difference between this and the card the lit version drew, and it is why the engine converting in batch 7 is what unblocked this one.",tagName:"div",attributes:{part:"entry","data-jx-region":"${state.region}"},style:{$description:"What `.entry-editor`, `.entry-editor-header`, `.entry-editor-collection`, `.entry-draft-switch`, `.entry-editor-fields`, `.entry-editor-note` and `.entry-editor-empty` said in `styles/overlays.css`, keyed on `part` and re-pointed at the studio token layer. This editor was the only emitter of all seven, so those rules are dead in the stylesheet from here; a central sweep removes them rather than this change, which owns no stylesheet. Every `--spectrum-font-size-*` reference is gone rather than renamed: those names resolve only inside `<sp-theme>`, and a pane editor is mounted outside it, so each would silently have taken its hard-coded fallback.",height:"100%",padding:"var(--jx-space-5)",overflowY:"auto",background:"var(--bg-panel)",'& [part="header"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-4)",marginBottom:"var(--jx-space-5)"},'& [part="name"]':{margin:"0",fontSize:"var(--jx-text-lg)",fontWeight:"600",color:"var(--fg)"},'& [part="collection"]':{padding:"1px var(--jx-space-3)",borderRadius:"var(--radius)",background:"var(--bg)",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"},'& [part="draft"]':{$description:"Pushed to the far end of the header rather than placed there: the heading and the collection chip are both content-width, so `margin-left: auto` is what keeps the switch on the right edge whatever the entry is called.",marginLeft:"auto"},'& [part="fields"]':{$description:"The schema form's host is `display: contents`, so its rows are the flex items of THIS box — which is why the column lives here and not inside the engine.",display:"flex",flexDirection:"column"},'& [part="note"]':{margin:"0 0 var(--jx-space-4)",color:"var(--fg-dim)",fontSize:"var(--jx-text-md)",lineHeight:"1.5"},'& [part="empty"]':{display:"flex",maxWidth:"46ch",flexDirection:"column",alignItems:"flex-start",gap:"var(--jx-space-3)",color:"var(--fg-dim)",fontSize:"var(--jx-text-md)",lineHeight:"1.5"},'& [part="record-nav"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-2)",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"}},children:[{tagName:"div",attributes:{part:"stage-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/stage"},cases:{entry:{tagName:"div",attributes:{part:"body",role:"none"},style:{display:"contents"},children:[{tagName:"div",attributes:{part:"header"},children:[{tagName:"h3",attributes:{part:"name"},textContent:"${state.name}"},{tagName:"span",attributes:{part:"collection"},textContent:"${state.collection}"},{tagName:"div",attributes:{part:"record-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/recordNav"},cases:{shown:{$description:"A record of a file-backed collection (a CSV row): which row of the file this is, the rows either side of it, and the grid that shows them all. A file entry has no neighbours to step to, so it draws none of this.",tagName:"div",attributes:{part:"record-nav",role:"group","aria-label":"Records"},children:[{tagName:"jx-action-button",attributes:{part:"previous"},$props:{size:"sm",quiet:!0,label:"Previous record",hint:"Previous record",disabled:{$ref:"#/state/previousDisabled"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/showPrevious"},value:[]}]},children:[{tagName:"span",textContent:"‹ Previous"}]},{tagName:"span",attributes:{part:"place"},textContent:"${state.place}"},{tagName:"jx-action-button",attributes:{part:"next"},$props:{size:"sm",quiet:!0,label:"Next record",hint:"Next record",disabled:{$ref:"#/state/nextDisabled"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/showNext"},value:[]}]},children:[{tagName:"span",textContent:"Next ›"}]},{tagName:"jx-action-button",attributes:{part:"grid"},$props:{size:"sm",quiet:!0,label:"Edit in grid",hint:"Every record of the file, as a table"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openGrid"},value:[]}]},children:[{tagName:"span",textContent:"Edit in grid"}]}]}}},{tagName:"div",attributes:{part:"draft-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/draftAxis"},cases:{shown:{$description:"No `label`: the slotted word is on screen and carries the name, so an aria-label would be read twice. The tooltip is `hint`, which is what DRAFT_MEANING has always been.",tagName:"jx-switch",attributes:{part:"draft"},$props:{checked:{$ref:"#/state/draft"},hint:"${state.draftHint}",size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setDraft"},value:[{$ref:"event#/target/checked"}]}]},children:[{tagName:"span",textContent:"Draft"}]}}}]},{tagName:"div",attributes:{part:"note-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/noteState"},cases:{shown:{tagName:"p",attributes:{part:"note"},textContent:"${state.note}"}}},{$description:"An island: `ui/schema-form.ts` draws this entry's fields into this node, and nothing in this document knows what a schema is.",tagName:"div",attributes:{part:"fields","data-jx-region":"${state.fieldsRegion}"}}]},empty:{$description:"The mode is reachable from the palette and from `__jxAutomation` on any tab, so this state is real: it names the reason and the fix rather than drawing an empty form.",tagName:"div",attributes:{part:"empty"},children:[{tagName:"p",attributes:{part:"empty-line"},textContent:"${state.emptyLine}"},{tagName:"p",attributes:{part:"note"},children:[{tagName:"span",textContent:"A collection is a "},{tagName:"code",textContent:"content"},{tagName:"span",textContent:" entry in "},{tagName:"code",textContent:"project.json"},{tagName:"span",textContent:" whose "},{tagName:"code",textContent:"source"},{tagName:"span",textContent:" directory contains this file and which declares a "},{tagName:"code",textContent:"schema"},{tagName:"span",textContent:"."}]},{tagName:"jx-action-button",attributes:{part:"content-types"},$props:{label:"Content types",size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openContentTypes"},value:[]}]},children:[{tagName:"span",textContent:"Content types…"}]}]}}}]};T("entry-editor",re);function ie(e,t){e.region=t.region,e.fieldsRegion=t.fieldsRegion,e.stage=t.stage,e.name=t.name,e.collection=t.collection,e.draftAxis=t.draftAxis,e.draft=t.draft,e.draftHint=t.draftHint,e.noteState=t.noteState,e.note=t.note,e.emptyLine=t.emptyLine,e.recordNav=t.recordNav,e.place=t.place,e.previousDisabled=t.previousDisabled,e.nextDisabled=t.nextDisabled}function Ne(e){let t=n(e)?void 0:e.attributes?.part;return n(t)?t:""}function oe(e,t,r,i){e.replaceChildren();let o=g({collection:"",draft:!1,draftAxis:"hidden",draftHint:"",emptyLine:"",fieldsRegion:"",name:"",nextDisabled:!0,note:"",noteState:"hidden",openContentTypes:r.openContentTypes,openGrid:r.openGrid,place:"",previousDisabled:!0,recordNav:"hidden",region:"",setDraft:r.setDraft,showNext:r.showNext,showPrevious:r.showPrevious,stage:"empty"});ie(o,t);let s=null,a=!1,l=R("entry-editor",o,e,{onNodeCreated:(c,d,f)=>{if(c instanceof HTMLElement&&Ne(f)==="fields")i.fieldsSlot(c)}}).then((c)=>{let d=c.root;if(a)return c.dispose(),d;return s=c,d});return{attached:()=>{if(a)return!1;let c=s?.root;return c===void 0?!0:c instanceof HTMLElement&&e.contains(c)},dispose(){a=!0,s?.dispose(),s=null},ready:l,update:(c)=>ie(o,c)}}var H=g(new Map);function se(e,t){H.set(e,t)}function uD(e){return e?H.get(e):void 0}function hD(e){H.delete(e)}function M(e){return e.replaceAll("\\","/").replace(/^(?:\.\/)+/,"").replace(/\/+$/,"")}function je(e){if(e.endsWith("/"))return!1;let t=e.slice(e.lastIndexOf("/")+1);return/\.[a-z\d]+$/i.test(t)}function ce(e,t){let r=[];for(let s of e)r.push(M(s));let i=[],o=t?.content??{};for(let s of Object.values(o)){if(!n(s.source)||s.source===""||je(s.source))continue;let a=M(s.source),l=a.indexOf(Io);if(l!==-1)a=M(a.slice(0,l));if(a===""||a===".")continue;if(![...r,...i].some((d)=>a===d||a.startsWith(`${d}/`)))i.push(a)}return i.length===0?e:[...e,...i]}function Pe(e,t){let r=Vl(e);if(r===null)return null;if(r===ci)return t===void 0||Zu(e,t)?r:null;let i=Vn(e);if(!i||i.name!==r||!i.def.format||i.ext===null)return r;return e.toLowerCase().endsWith(i.ext.toLowerCase())?r:null}var Oe=new Set(["node_modules",".git",".jx",".cache"]);async function de(e,t,r,i,o,s=!1,a){let l;try{l=await us(()=>t.listDirectory(e))}catch(d){if(!s)i.push({dir:e,error:Q(d)});return}let c=[];for(let d of l){if(d.type==="directory"){if(!Oe.has(d.name))c.push(d.path);continue}let f=nn(d.name);r.push({collection:Pe(d.path,a),ext:f,locale:gx(d.path,o)??void 0,media:Js.has(f),modified:d.modified,name:d.name,path:d.path,size:d.size,type:f||"file"})}await Promise.all(c.map((d)=>de(d,t,r,i,o,!1,a)))}async function sm(e,t,r=new Set,i){let o=[],s=[],{i18n:a}=ln(S?.projectConfig??{});return await Promise.all(e.map((l)=>de(l,t,o,s,a,r.has(l),i))),o.sort((l,c)=>l.path.localeCompare(c.path)),{failures:s,files:o}}function wE(e,t){let r=e.filter((s)=>s.collection===t.collection),i=t.query.trim().toLowerCase();if(i)r=r.filter((s)=>s.name.toLowerCase().includes(i)||s.path.toLowerCase().includes(i));let o=t.locale?.trim();if(o)r=r.filter((s)=>s.locale===o);return r}var am=["table","cards","calendar","board"],tw={board:"Board",calendar:"Calendar",cards:"Cards",table:"Table"};var pD=new Set(["cards"]),ke=/^(\d{4}-\d{2}-\d{2})/;function xE(e){let t=ke.exec(e.name);if(t)return t[1];if(e.modified){let r=vp(new Date(e.modified));if(r)return r}return null}function tb(){return ln(S?.projectConfig??{}).i18n?.locales??[]}function fD(e){let t=new Set;for(let r of e)if(r.locale)t.add(r.locale);return tb().filter((r)=>t.has(r))}function mD(e,t=xE){let r=new Map,i=[];for(let s of e){let a=t(s);if(a===null){i.push(s);continue}let l=r.get(a);if(l)l.push(s);else r.set(a,[s])}return{days:[...r.entries()].map(([s,a])=>({date:s,files:a})).toSorted((s,a)=>a.date.localeCompare(s.date)),undated:i}}function Ae(e){let t=e.lastIndexOf("/");return t===-1?".":e.slice(0,t)}function gD(e){let t=new Map;for(let r of e){let i=Ae(r.path),o=t.get(i);if(o)o.push(r);else t.set(i,[r])}return[...t.entries()].map(([r,i])=>({files:i,group:r})).toSorted((r,i)=>r.group.localeCompare(i.group))}function Ie(e,t,r,i){let o=pp(e,t),s=o===null?"":t[o]??"",a=Object.values(t).find((l)=>l.trim()!=="");return(s||a||i||`Row ${r+1}`).trim()}function He(e){let{headers:t,rows:r}=Ad(e);return r.flatMap((i,o)=>i.some((s)=>s.trim()!=="")?[{fields:Object.fromEntries(t.map((s,a)=>[s,i[a]??""])),row:o}]:[])}function Me(e){let t;try{t=JSON.parse(e)}catch{return null}let r=(i)=>_(i)&&!Array.isArray(i)?Object.fromEntries(Object.entries(i).map(([o,s])=>[o,j(s)])):{};if(!Array.isArray(t))return[{fields:r(t),row:0,single:!0}];return t.map((i,o)=>({fields:r(i),row:o}))}function ue(e,t,r){let i=e.toLowerCase(),o=i.endsWith(".csv")?He(t):i.endsWith(".json")?Me(t):null;if(o===null)return null;let s=(e.split("/").pop()??e).replace(/\.[^.]+$/,"");return o.map(({fields:a,row:l,single:c},d)=>({fields:a,index:d,row:l,title:Ie(r,a,d,c?s:"")}))}function fe(e,t){return`${e}#${t+1}`}var G="The Content workspace lists files; it does not edit them in the list. Rename, duplicate or delete from the file's context menu, or open the file to edit it.";function Ge(e){return`field:${e}`}function bD(e){return e.startsWith("field:")?e.slice(6):null}var Ve=6,me=new Set(["image","markdown","html","richtext"]);function V(e){return _b(ES(e))}function vD(e,t){return Object.entries(e?.properties??{}).filter(([r,i])=>{if(t.has(r)||r===Cs)return!1;if(i.type==="object"||n(i.format)&&me.has(i.format))return!1;let o=i.items?.format;return i.type!=="array"||i.items?.type==="string"&&!(n(o)&&me.has(o))}).slice(0,Ve).map(([r,i])=>{let o={name:r,title:V(r)};if(i.type==="array")o.list=!0;if(i.type==="number"||i.type==="integer"||i.format==="date"||i.format==="date-time")o.measure=!0;return o})}function Je(e){let t=[{editable:!1,field:"title",kind:"string",title:"Title",widthHint:240},{editable:!1,field:"url",kind:"string",pk:!0,title:"URL",widthHint:200},{editable:!1,field:"template",kind:"string",title:"Template",widthHint:140}];if(e?.status)t.push({editable:!1,field:"status",kind:"string",title:"Status",widthHint:100});if(e?.locale)t.push({editable:!1,field:"locale",kind:"string",title:"Language",widthHint:110});return t.push({editable:!1,field:"modified",kind:"date",title:"Edited",widthHint:120}),t}function _E(e=ci,t){let r=[...t?.locale?[{editable:!1,field:"locale",kind:"string",title:"Locale",widthHint:90}]:[],{editable:!1,field:"modified",kind:"date",title:"Modified",widthHint:160},{editable:!1,field:"path",kind:"readonly",title:"Path",widthHint:320}];if(e===ci)return Je(t);let i=[{editable:!1,field:"title",kind:"string",title:"Title",widthHint:260}];if(t?.status)i.push({editable:!1,field:"status",kind:"string",title:"Status",widthHint:100});if(t?.date)i.push({editable:!1,field:"date",kind:"date",title:"Date",widthHint:120});for(let o of t?.fields??[])i.push({editable:!1,field:Ge(o.name),kind:"string",title:o.title,widthHint:140});return[...i,...r]}function ze(e){return{cells:{locale:e.locale??null,modified:e.modified??null,status:null,template:null,title:e.name,url:e.collection===ci?wr(e.path).urlPattern:null},key:e.path}}async function Ke(e,t){return(await Promise.all(e.map(async(i)=>{let o=i.collection===null?null:Vn(i.path);if(!o?.fileBacked)return[i];let s;try{s=await t(i.path)}catch{return[i]}let a=ue(i.path,s,o.def.schema);if(a===null)return[i];return a.map((l)=>Ye(i,l))}))).flat()}function Ye(e,t){return{...e,name:t.title,path:fe(e.path,t.index),record:{fields:t.fields,row:t.row,source:e.path}}}async function Be(e){let t=p(),r=await Ke(e.files,(i)=>t.readFile(i));return{...e,files:r}}function yD(e){let t=null,r=null,i=null,o=e??(()=>ce(S?.projectDirs??[],S?.projectConfig??null));async function s(){if(t)return t;let a=o(),l=new Set(e?a:S?.projectDirs??[]),c=new Set(a.filter((d)=>!l.has(d)));return r??=Sv().then((d)=>sm(a,p(),c,d)).then(Be).then((d)=>(t=d,i=a.join(`
|
|
4
|
-
`),r=null,d)),r}return{capabilities:{delete:!1,insert:!1,remotePaging:!1,remoteSort:!1},columns:()=>Promise.resolve(_E()),commit(a){return Promise.resolve({cells:a.cells.map((l)=>({error:G,field:l.field,ok:!1,rowKey:l.rowKey})),deletes:a.deletes.map((l)=>({error:G,ok:!1,rowKey:l.rowKey})),inserts:a.inserts.map((l)=>({error:G,ok:!1,tempKey:l.tempKey}))})},failures:()=>t?.failures??[],files:()=>t?.files??[],id:Yl("content"),label:"Content",async refresh(){t=null,r=null,await s()},async rows(){let a=await s();return{rows:a.files.map((l)=>ze(l)),total:a.files.length}},scanned:()=>t!==null,stale:()=>t!==null&&i!==o().join(`
|
|
5
|
-
`)}}var We=[y],C=new Map;function J(e){return C.get(e)??null}function SE(e,t){let r=J(e);return r!==null&&r.tabId===t.id&&r.wrap.isConnected&&r.surface.attached()}function nw(e){let t=C.get(e);if(!t)return;t.scope.stop(),t.surface.dispose(),C.delete(e)}function nb(e,t){Y(e,(r)=>I(r,Cs,t))}function wD(e){let t=L(e),r=Pl(e);if(!t||!Dc(t.schema,r))return null;let i=Hl(r);return{draft:i,text:i?"Draft":"Published",title:i?wp:"Not marked a draft."}}function CE(e){return Object.fromEntries(Object.entries(e?.properties??{}).map(([t,r])=>[t,{label:n(r.title)&&r.title!==""?r.title:V(t)}]))}function kE(e){return{fieldKeyPrefix:`entry:${e.id}`,resolvePointer:(t,r)=>gp(t,{projectConfig:S?.projectConfig??{},scope:r})}}function EE(e,t){return Object.fromEntries(MD(e.schema,t).map((r)=>[r,"Required — this entry does not have one."]))}function L(e){return h(e)?OD(e.documentPath):Rc(e.documentPath)}function TE(e,t,r){let i=pp(t,r),o=e.properties??{},s=i===null?void 0:o[i];if(i===null||s===void 0)return e;return{...e,properties:{[i]:s,...o}}}function qe(e){return`${e.documentPath??"This document"} is not an entry of any content collection, so there is no schema to draw a form from.`}function pe(e,t,r){let i=wi(e,"entry"),o=wi(e,"entry/fields");if(!r)return{collection:"",draft:!1,draftAxis:"hidden",draftHint:wp,emptyLine:qe(t),fieldsRegion:o,name:"",nextDisabled:!0,note:"",noteState:"hidden",place:"",previousDisabled:!0,recordNav:"hidden",region:i,stage:"empty"};let s=Pl(t),a=Hl(s),l=h(t),c=w(t);return{collection:r.name,draft:a,draftAxis:Dc(r.schema,s)?"shown":"hidden",draftHint:wp,emptyLine:"",fieldsRegion:o,name:l?Ue(r,s,c.index):t.documentPath?.split("/").pop()??"Untitled",nextDisabled:c.next===null,note:wp,noteState:a?"shown":"hidden",place:c.index===-1?"":`${c.index+1} of ${c.total}`,previousDisabled:c.previous===null,recordNav:l?"shown":"hidden",region:i,stage:"entry"}}function Ue(e,t,r){let i=pp(e.schema,t),o=i===null?void 0:t[i];if(n(o)&&o.trim()!=="")return o.trim();return r===-1?"Record":`Row ${r+1}`}function xD(e,t){let{paneId:r,wrap:i}=e;if(SE(r,t))return;nw(r);let o=null,s=null,a=()=>{if(o!==null&&J(r)===o)c()},l=(u)=>{if(!s||!u)return;let D=Pl(t),z=Fl(`entry:${r}`,TE(u.schema,u.schema,D),D,{context:kE(t),errors:EE(u,D),onChange:(ye)=>W_(t,ye),rerender:a,ui:CE(u.schema)});if(z.parentNode!==s)s.replaceChildren(z)},c=()=>{let u=L(t);if(!u)s=null;o?.surface.update(pe(r,t,u)),l(u)},d=ge(),f=oe(i,pe(r,t,L(t)),{openContentTypes:()=>{ae()?.run("settings.open",{section:"content"})},openGrid:()=>{let{index:u}=w(t);if(u!==-1&&t.documentPath)se(t.documentPath,u);t.session.ui.canvasMode="grid"},setDraft:(u)=>nb(t,u),showNext:()=>{let{next:u}=w(t);if(u!==null)k(t,u)},showPrevious:()=>{let{previous:u}=w(t);if(u!==null)k(t,u)}},{fieldsSlot:(u)=>{s=u,l(L(t))}});o={paneId:r,scope:d,surface:f,tabId:t.id,wrap:i},C.set(r,o),d.run(()=>{ne(()=>{if(J(r)!==o)return;t.doc.document,t.doc.content.frontmatter,S?.projectConfig?.content,c()})})}async function _D(e){let{openFileInTab:t}=await (le("ybpp3j38"),import("./files-ybpp3j38.js"));await t(e);for(let[r,i]of m.tabs.entries()){if(i.documentPath!==e)continue;for(let o of We)if(!i.capabilities.modes.includes(o))i.capabilities.modes.unshift(o);return i.session.ui.canvasMode=y,i.session.ui.preview=!1,Ht(r),i}return null}
|
|
6
|
-
export{pp,z_,bE,eb,vE,Qy,cD,yE,ew,dD,Pl,W_,uD,hD,sm,wE,am,tw,pD,xE,tb,fD,mD,gD,bD,vD,_E,yD,SE,nw,nb,wD,CE,kE,EE,TE,xD,_D};
|
|
7
|
-
|
|
8
|
-
//# debugId=4A66485A413BA1AD64756E2164756E21
|
|
9
|
-
//# sourceMappingURL=studio-3pndhat0.js.map
|