@jxsuite/studio 8.0.1 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{2020-5wtzce5g.js → 2020-dg097k3e.js} +3 -3
- package/dist/chunks/adapter-tck81zft.js +4 -0
- package/dist/chunks/{add-new-flow-psym14sn.js → add-new-flow-a1w0bnm6.js} +3 -3
- package/dist/chunks/{cf-account-picker-haqazq5r.js → cf-account-picker-ce3kp3x1.js} +3 -3
- package/dist/chunks/cf-settings-7ye6x7g2.js +4 -0
- package/dist/chunks/color-4gj49xq6.js +4 -0
- package/dist/chunks/{color-area-6rbra5dy.js → color-area-vh9cew51.js} +2 -2
- package/dist/chunks/{color-field-gy56c94g.js → color-field-e78f16bs.js} +3 -3
- package/dist/chunks/{color-slider-sqqdyf6c.js → color-slider-fg4yhvk6.js} +2 -2
- package/dist/chunks/{combobox-72h32ejk.js → combobox-6hs00996.js} +2 -2
- package/dist/chunks/components-qce0v93f.js +4 -0
- package/dist/chunks/content-source-jjx8kgzr.js +4 -0
- package/dist/chunks/{convert-to-repeater-he70fc2b.js → convert-to-repeater-grnmea6c.js} +3 -3
- package/dist/chunks/editor-bkja5dbv.js +4 -0
- package/dist/chunks/entry-commands-1wh0btvg.js +4 -0
- package/dist/chunks/{extension-sections-0egb88dm.js → extension-sections-rp7fkega.js} +3 -3
- package/dist/chunks/file-ops-6pe4z7an.js +4 -0
- package/dist/chunks/files-ybpp3j38.js +4 -0
- package/dist/chunks/format-host-3mtbhxk1.js +4 -0
- package/dist/chunks/fs-events-xfanfxds.js +4 -0
- package/dist/chunks/grid-open-dg5qmnaj.js +4 -0
- package/dist/chunks/{grid-view-qg1b5eqx.js → grid-view-x26rfpz1.js} +16 -15
- package/dist/chunks/{icons-63bjtbs7.js → icons-853n6qt3.js} +2 -2
- package/dist/chunks/{iframe-entry-2zggzajv.js → iframe-entry-02wzcyvy.js} +4 -4
- package/dist/chunks/{iframe-entry-99nr5zfb.js → iframe-entry-42hpmwz5.js} +4 -4
- package/dist/chunks/{iframe-entry-76j8vwwx.js → iframe-entry-b5qgggyp.js} +2 -2
- package/dist/chunks/iframe-host-j2bk2xkc.js +4 -0
- package/dist/chunks/{index-32eqzv1k.js → index-203h71wy.js} +3 -3
- package/dist/chunks/index-fkrm7pdk.js +4 -0
- package/dist/chunks/{javascript-pjp734q4.js → javascript-ww5pv5ae.js} +2 -2
- package/dist/chunks/{jsonMode-njkvsa02.js → jsonMode-vwbdwwq3.js} +6 -6
- package/dist/chunks/jx-validate-w7v32f6a.js +4 -0
- package/dist/chunks/layers-g7j732cm.js +4 -0
- package/dist/chunks/layers-panel-gjrsxcck.js +4 -0
- package/dist/chunks/{listbox-c421cf8c.js → listbox-7gka1h86.js} +2 -2
- package/dist/chunks/lit-html-jdfz9rhc.js +4 -0
- package/dist/chunks/media-library-9j0v4wmk.js +4 -0
- package/dist/chunks/media-picker-cpyyt2m0.js +4 -0
- package/dist/chunks/{menu-bdpzbfvs.js → menu-d2jxpgma.js} +2 -2
- package/dist/chunks/{monaco-binding-vq1hgnn0.js → monaco-binding-63tqze27.js} +3 -3
- package/dist/chunks/monaco-buffer-9wcme176.js +4 -0
- package/dist/chunks/{monaco-setup-xrd2cbkp.js → monaco-setup-zyyynnj8.js} +3 -3
- package/dist/chunks/notify-rahnnnv4.js +4 -0
- package/dist/chunks/platform-b2aqv7v5.js +4 -0
- package/dist/chunks/{popover-b89sfej7.js → popover-9tf4cjrk.js} +2 -2
- package/dist/chunks/publish-panel-4yk2461b.js +4 -0
- package/dist/chunks/{publish-quick-qx2455cj.js → publish-quick-ajzdhhs6.js} +3 -3
- package/dist/chunks/publish-workspace-mxestzcf.js +4 -0
- package/dist/chunks/quick-search-9g6z65b0.js +4 -0
- package/dist/chunks/references-c26enpxs.js +4 -0
- package/dist/chunks/right-panel-9d0e0yg7.js +4 -0
- package/dist/chunks/source-control-xyn3a8ds.js +4 -0
- package/dist/chunks/{split-c9zfdgxf.js → split-m5rwn31z.js} +2 -2
- package/dist/chunks/{studio-x9hsze61.js → studio-02phtmqn.js} +4 -4
- package/dist/chunks/{studio-4hp8pkyt.js → studio-0khd0xdw.js} +4 -4
- package/dist/chunks/studio-1fvzq9vs.js +5 -0
- package/dist/chunks/studio-1gdfsr49.js +12 -0
- package/dist/chunks/{studio-3q40e3rj.js → studio-1meqbxns.js} +4 -4
- package/dist/chunks/{studio-q0tccd43.js → studio-1yhz0s8p.js} +4 -4
- package/dist/chunks/studio-25a5by3h.js +5 -0
- package/dist/chunks/{studio-k3xxbagr.js → studio-2b8443ms.js} +3 -3
- package/dist/chunks/{studio-3qqjeep5.js → studio-2c2mjyzj.js} +5 -5
- package/dist/chunks/studio-2dtc90zs.js +10 -0
- package/dist/chunks/{studio-9tmebf0s.js → studio-332hesdk.js} +4 -4
- package/dist/chunks/{studio-03ct6yfv.js → studio-3pndhat0.js} +8 -8
- package/dist/chunks/{studio-s32578pn.js → studio-3q6n9qvq.js} +4 -4
- package/dist/chunks/studio-4dsdnan2.js +9 -0
- package/dist/chunks/{studio-ed1hp6zf.js → studio-4fjqdzrb.js} +5 -5
- package/dist/chunks/{studio-jcnsdaep.js → studio-533py3yy.js} +4 -4
- package/dist/chunks/studio-5abge3wy.js +5 -0
- package/dist/chunks/{studio-8tr6cfrc.js → studio-6vrxzkba.js} +4 -4
- package/dist/chunks/{studio-jaaz8ce9.js → studio-73wz63nn.js} +4 -4
- package/dist/chunks/{studio-bavb31r0.js → studio-74nzv280.js} +4 -4
- package/dist/chunks/{studio-q7rtx6zq.js → studio-7cg75gtj.js} +7 -7
- package/dist/chunks/studio-89cwmnae.js +5 -0
- package/dist/chunks/studio-8m1t83kn.js +7 -0
- package/dist/chunks/{studio-q0mvbaq6.js → studio-8nyw10dp.js} +4 -4
- package/dist/chunks/{studio-83mk4bgg.js → studio-94ppxeqy.js} +8 -8
- package/dist/chunks/{studio-qmn1xc24.js → studio-957jg8g3.js} +4 -4
- package/dist/chunks/{studio-r5qy30vx.js → studio-9wyqyfqy.js} +4 -4
- package/dist/chunks/studio-a3evp7f6.js +6 -0
- package/dist/chunks/{studio-n0c5h6mf.js → studio-a6x058ew.js} +4 -4
- package/dist/chunks/studio-ana67wax.js +5 -0
- package/dist/chunks/studio-b4xhpcwy.js +4 -0
- package/dist/chunks/studio-bf0rgyf7.js +5 -0
- package/dist/chunks/{studio-x1x167jh.js → studio-bqgs90r8.js} +4 -4
- package/dist/chunks/{studio-qwdqwkj0.js → studio-c4rcaftm.js} +4 -4
- package/dist/chunks/{studio-mn0476ag.js → studio-c5dj3dzk.js} +4 -4
- package/dist/chunks/studio-cgjt1zce.js +5 -0
- package/dist/chunks/{studio-bbe4c90a.js → studio-cpdzrdgp.js} +4 -4
- package/dist/chunks/studio-cq87hree.js +5 -0
- package/dist/chunks/studio-d140sy8e.js +5 -0
- package/dist/chunks/{studio-jsgf2q5k.js → studio-dmn7gpba.js} +5 -5
- package/dist/chunks/studio-e8pzjjhf.js +5 -0
- package/dist/chunks/{studio-dgk4dqtx.js → studio-f8kz3krj.js} +5 -5
- package/dist/chunks/{studio-qgh13jtz.js → studio-fqs1a22a.js} +4 -4
- package/dist/chunks/{studio-syreb644.js → studio-fw3jp9m7.js} +4 -4
- package/dist/chunks/{studio-ed3xx40h.js → studio-g6ysm05p.js} +6 -6
- package/dist/chunks/studio-gmhd0j3f.js +5 -0
- package/dist/chunks/{studio-p4nrkvqr.js → studio-gqpty626.js} +4 -4
- package/dist/chunks/{studio-kt3pjkwd.js → studio-grp684wx.js} +4 -4
- package/dist/chunks/{studio-df0baea9.js → studio-h98520qr.js} +4 -4
- package/dist/chunks/{studio-8m0y2qe7.js → studio-hnx1h1pr.js} +4 -4
- package/dist/chunks/studio-hvxt8z79.js +5 -0
- package/dist/chunks/{studio-43sd2mam.js → studio-hw60n5dh.js} +3 -3
- package/dist/chunks/{studio-wbcjbhy1.js → studio-hxq1ebp0.js} +6 -6
- package/dist/chunks/{studio-wys23mxz.js → studio-j4e627w1.js} +4 -4
- package/dist/chunks/{studio-ccv2svc6.js → studio-j5jqvyn3.js} +4 -4
- package/dist/chunks/{studio-881z1xrx.js → studio-jqrg9xxg.js} +4 -4
- package/dist/chunks/{studio-b7y5mr30.js → studio-kdseew9m.js} +4 -4
- package/dist/chunks/studio-kt2j51sa.js +5 -0
- package/dist/chunks/{studio-d5grtb9e.js → studio-m4w6sygj.js} +9 -9
- package/dist/chunks/{studio-zz9qe3rw.js → studio-mmqr9awv.js} +37 -37
- package/dist/chunks/{studio-5g0rprdt.js → studio-nm9qev4p.js} +5 -5
- package/dist/chunks/{studio-tft6r105.js → studio-nsv7g1qn.js} +4 -4
- package/dist/chunks/{studio-3e54qh39.js → studio-p89w12s2.js} +5 -5
- package/dist/chunks/{studio-y3ahhdpx.js → studio-pbagym4j.js} +4 -4
- package/dist/chunks/{studio-w4rz9hdk.js → studio-pr23qhrw.js} +4 -4
- package/dist/chunks/{studio-6m380wp7.js → studio-r4ya3sb2.js} +4 -4
- package/dist/chunks/studio-rdnezzkd.js +6 -0
- package/dist/chunks/{studio-f14e1zdj.js → studio-rm9m3z60.js} +4 -4
- package/dist/chunks/studio-tpmnbgmt.js +5 -0
- package/dist/chunks/studio-ttxhq5yt.js +5 -0
- package/dist/chunks/{studio-nh6d342n.js → studio-txkx6586.js} +6 -6
- package/dist/chunks/{studio-a2bvaptz.js → studio-v0gsjav0.js} +4 -4
- package/dist/chunks/{studio-fbhxxc5f.js → studio-v2ek69cb.js} +4 -4
- package/dist/chunks/{studio-y0n7yxea.js → studio-wcakp5bt.js} +7 -7
- package/dist/chunks/{studio-k7evxqh4.js → studio-x3ge4rts.js} +4 -4
- package/dist/chunks/{studio-pbxa5fpc.js → studio-xddgbwhe.js} +3 -3
- package/dist/chunks/{studio-c05wdnt3.js → studio-y1x65h5r.js} +4 -4
- package/dist/chunks/{studio-rthyg42z.js → studio-z42kysg7.js} +169 -169
- package/dist/chunks/studio-zf188hnd.js +5 -0
- package/dist/chunks/{studio-tfkznv39.js → studio-zht0x0v3.js} +4 -4
- package/dist/chunks/{studio-svb7yyve.js → studio-zm7dnr9g.js} +4 -4
- package/dist/chunks/{tooltip-yypz28gq.js → tooltip-dj1pvgz7.js} +2 -2
- package/dist/chunks/{tree-9xa4hm7n.js → tree-j0ebwr5s.js} +2 -2
- package/dist/chunks/{tsMode-epyfz1hv.js → tsMode-vra2hh7y.js} +5 -5
- package/dist/chunks/workspace-3nt93k48.js +4 -0
- package/dist/chunks/workspace-home-zbgyqqws.js +4 -0
- package/dist/chunks/{ws-client-bv552sfx.js → ws-client-72x5n99j.js} +3 -3
- package/dist/iframe-entry.js +14 -14
- package/dist/manifest.json +75 -75
- package/dist/studio.js +80 -80
- package/package.json +11 -11
- package/src/browse/component-examples.ts +15 -224
- package/src/browse/library-preview.ts +6 -13
- package/src/browse/preview-root.ts +7 -4
- package/src/canvas/canvas-utils.ts +18 -4
- package/src/canvas/iframe-editable-root.ts +13 -4
- package/src/canvas/iframe-entry.ts +3 -1
- package/src/canvas/iframe-interaction.ts +11 -2
- package/src/canvas/iframe-render.ts +25 -3
- package/src/canvas/preview-placeholder.ts +120 -0
- package/src/editor/shortcuts.ts +3 -0
- package/src/panels/component-preview.ts +5 -0
- package/src/panels/pane-context.ts +43 -18
- package/src/panels/site-model.ts +7 -19
- package/src/panels/site-panel.ts +2 -25
- package/src/panels/stylebook-doc.ts +2 -53
- package/src/services/references.ts +0 -0
- package/src/style/stylebook-specimens.ts +11 -15
- package/src/surfaces/pane-context.json +286 -265
- package/src/surfaces/pane-context.ts +17 -8
- package/src/tabs/tab.ts +5 -6
- package/src/utils/geometry.ts +49 -2
- package/dist/chunks/adapter-5tphg7xe.js +0 -4
- package/dist/chunks/cf-settings-h2wrh6hq.js +0 -4
- package/dist/chunks/color-m7r1vk54.js +0 -4
- package/dist/chunks/components-r22xca09.js +0 -4
- package/dist/chunks/content-source-mmppmcyg.js +0 -4
- package/dist/chunks/editor-ccd9jwsa.js +0 -4
- package/dist/chunks/entry-commands-6qxz9e8p.js +0 -4
- package/dist/chunks/file-ops-qnab36ek.js +0 -4
- package/dist/chunks/files-rcn56qvm.js +0 -4
- package/dist/chunks/format-host-yxz0kjjs.js +0 -4
- package/dist/chunks/fs-events-d1qxq4z4.js +0 -4
- package/dist/chunks/grid-open-4z1g062t.js +0 -4
- package/dist/chunks/iframe-host-ssv7kyj0.js +0 -4
- package/dist/chunks/index-f0jn7nnp.js +0 -4
- package/dist/chunks/jx-validate-ttasrbh7.js +0 -4
- package/dist/chunks/layers-bgyr11tr.js +0 -4
- package/dist/chunks/layers-panel-7ez66zeq.js +0 -4
- package/dist/chunks/lit-html-v9gh687x.js +0 -4
- package/dist/chunks/media-library-sq468wts.js +0 -4
- package/dist/chunks/media-picker-shfe59pt.js +0 -4
- package/dist/chunks/monaco-buffer-3afgwvbp.js +0 -4
- package/dist/chunks/notify-kzrjr3fv.js +0 -4
- package/dist/chunks/platform-7v4rtd7m.js +0 -4
- package/dist/chunks/publish-panel-2z9gw8ee.js +0 -4
- package/dist/chunks/publish-workspace-wrc1dgwx.js +0 -4
- package/dist/chunks/quick-search-n0t0eqxb.js +0 -4
- package/dist/chunks/references-9547rg5s.js +0 -4
- package/dist/chunks/right-panel-wsgnr9pn.js +0 -4
- package/dist/chunks/source-control-kwktr9y6.js +0 -4
- package/dist/chunks/studio-07rcfje3.js +0 -5
- package/dist/chunks/studio-3exxhz5g.js +0 -5
- package/dist/chunks/studio-3qeh9t0h.js +0 -6
- package/dist/chunks/studio-58xg6j2q.js +0 -9
- package/dist/chunks/studio-80jyh1xh.js +0 -4
- package/dist/chunks/studio-8vcvfs7r.js +0 -6
- package/dist/chunks/studio-fyh0jc96.js +0 -5
- package/dist/chunks/studio-gcxk20n7.js +0 -5
- package/dist/chunks/studio-m8g16bgz.js +0 -5
- package/dist/chunks/studio-mx1smyq0.js +0 -5
- package/dist/chunks/studio-pgmvdv7z.js +0 -7
- package/dist/chunks/studio-ph84avkf.js +0 -5
- package/dist/chunks/studio-rj9eamf8.js +0 -5
- package/dist/chunks/studio-rptgsk96.js +0 -5
- package/dist/chunks/studio-s19tp1xr.js +0 -5
- package/dist/chunks/studio-tf9jryb1.js +0 -10
- package/dist/chunks/studio-txf2kysx.js +0 -5
- package/dist/chunks/studio-v8867ddv.js +0 -12
- package/dist/chunks/studio-vxq7fcvv.js +0 -5
- package/dist/chunks/studio-wc649wss.js +0 -5
- package/dist/chunks/studio-z97c48fk.js +0 -5
- package/dist/chunks/studio-zat62m0c.js +0 -5
- package/dist/chunks/studio-zcd2e7yz.js +0 -5
- package/dist/chunks/workspace-dz7nxfhv.js +0 -4
- package/dist/chunks/workspace-home-xsd7hkjw.js +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{Vt,ll,iv,ln,Y,qd,Kd,Ln,Un,Ra,yh,hv,ui,m,u,fn,Lr,Hm,DC,ec,Bm,zm,td,FC,Bx,V$,Zd,Bt,pv}from"./studio-c05wdnt3.js";import{ge,ne,g,C,ul}from"./studio-43sd2mam.js";import{Qd,Jp}from"./studio-kt3pjkwd.js";import{p}from"./studio-w4rz9hdk.js";import{eA,ol,Qw,h,Ob}from"./studio-d5grtb9e.js";import{ae}from"./studio-q7rtx6zq.js";import{zu,jl}from"./studio-07rcfje3.js";import{Mp,T,R,Tn,rt,Ko,gC}from"./studio-x9hsze61.js";import{Xt}from"./studio-pbxa5fpc.js";import{Fl,q_,ib,kD,IE,RE,DE,NE}from"./studio-03ct6yfv.js";import{ze,lx,Js,on,Kc}from"./studio-ph84avkf.js";import{ks,wp,Bl,Oc}from"./studio-tf9jryb1.js";import{vt,Sb,Vl,jc,th,kp,RS,Di}from"./studio-rj9eamf8.js";import{rl,Vr,Gs,Ks,Ur}from"./studio-nh6d342n.js";import{zl,fm,Sp}from"./studio-q0tccd43.js";import{Pu,fE}from"./studio-mn0476ag.js";import{yi}from"./studio-ed3xx40h.js";import{_E}from"./studio-df0baea9.js";import{wa,Ac}from"./studio-mx1smyq0.js";import{Yp,x,xn,dl}from"./studio-gcxk20n7.js";import{n,Xe,v}from"./studio-vxq7fcvv.js";import{le}from"./studio-qgh13jtz.js";var St=new Set(["entry"]);function Kg(e){let t=ll(e.id);if(t)return t;let a=e.session.ui.canvasMode;if(a==="git-diff")return"publish";if(a==="media")return"media";if(St.has(a))return"content";let r=zl(e.id);if(r)return r.kind==="data"?"design":"content";if(e.documentPath===ln)return"styles";return Un(e.documentPath)?"content":"design"}var Tt=new Set(["edit","design","stylebook"]);function nE(e){return e.documentPath!==null&&zl(e.id)===null&&Tt.has(e.session.ui.canvasMode)}function Dc(e,t=h.workspace){let a=m.tabs.get(e);return a!==void 0&&Kg(a)===t}function te(e,t=h.workspace){return e.tabOrder.filter((a)=>Dc(a,t))}function rD(e){let t=m.mruOrder.find((a)=>Dc(a,e));if(t)return t;for(let a of m.panes){let r=a.tabOrder.find((i)=>Dc(i,e));if(r)return r}return null}function iE(e,t){if(e.activeTabId&&Dc(e.activeTabId,t))return e.activeTabId;return m.mruOrder.find((a)=>e.tabOrder.includes(a)&&Dc(a,t))??e.tabOrder.find((a)=>Dc(a,t))??null}var je={$schema:"https://jxsuite.com/schema/v1",$id:"StudioTabStrip",$description:"One pane's tab strip, as a Jx document over the kit: a real `tablist` of `jx-tab`s, or — for a pane that owns no document — the derivation chip naming what it is a projection of, and in both cases one trailing button. `panels/tab-strip.ts` keeps every decision: which pane a host is drawing, what each tab is called (the shortest unique suffix, and a page's ROUTE), what its tooltip says, whether closing it needs a prompt, what the overflow chevron lists and what the context menu offers. This document owns the markup, the ARIA, the keyboard and the style, and it holds THREE things the old chip drew by hand and the kit now draws: the tab's own selected state (`aria-selected`, not an `.active` class), its close button, and its dirty dot. The three that are Studio's alone go in `jx-tab`'s slots — the drill-in marker in `icon`, the draft pill in `status`, the pin toggle in `actions` (ui.md §5.4) — which is the gap that kept this strip out of the tab pattern until now. **Drag is `@atlaskit/pragmatic-drag-and-drop`, not native HTML5 DnD**: a chip carries no `draggable` attribute and no `ondrag*` handler, because `panels/tab-strip.ts` registers every chip and every strip as a pragmatic source/target through `onNodeCreated` and resolves a completed drag in `panels/tab-drop.ts`. What is left here is three SCOPE comparisons, exactly as `files-panel.json` marks a row under drag: `data-dragging` on the chip being carried, `data-drop` on the chip a drop would land beside, `data-drop-tail` on the strip when the drop is its empty tail.",tagName:"div",attributes:{part:"strip-row","data-focused":"${state.focused ? '' : null}",hidden:"${state.mode === 'empty' ? '' : null}"},onmousedown:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/focusPane"},value:[]}]},style:{$description:"`styles/shell.css`'s `.tab-strip*` rules and `styles/canvas.css`'s pane-state rules, keyed on `part` and carried in. What did NOT come with them is the point: the chip's own hover, its selected underline, its close button and its dirty dot are `jx-tab`'s, and the strip's flex row and hairline are `jx-tabs`'s. What is left here is the pane strip's own shape — the scroll container the chevron exists for, the 11px type of a chrome row, the states the PANE model adds (pinned, preview, dragging, an unfocused pane's dimmed underline), and the three slotted marks.",display:"flex",alignItems:"stretch",minWidth:"0",background:"var(--bg-panel)",borderBottom:"1px solid var(--border)",fontFamily:"var(--jx-font-sans)","&[hidden]":{display:"none"},'& [part="tabs"]':{$description:"`.tab-strip`. The kit's strip draws its own hairline; the ROW draws this one, so the strip's is taken off rather than doubled. The scrollbar is hidden by design — the wheel handler is a mouse affordance and the chevron is the pointer-independent route to the same tabs — so `overflow-x: auto` here is a scrolling box with no visible bar.",flex:"1 1 auto",minWidth:"0",gap:"0",padding:"0 var(--jx-space-2)",border:"0",overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none",fontSize:"var(--jx-text-sm)","&::-webkit-scrollbar":{display:"none"}},'& [part="tabs"][data-drop-tail]::after':{$description:"The strip's own tail target: a drop onto the empty space after the last chip, or onto a pane whose strip carries no chips at all — an empty pane made a target during a drag by `panels/tab-strip.ts`'s `project`. A fixed-width bar rather than a background tint, so it reads the same as a chip's own `data-drop` edge instead of a second visual language for the same gesture.",content:'""',flex:"0 0 2px",alignSelf:"stretch",background:"var(--accent)"},'& [part="tab"]':{$description:"`.tab-strip-tab`. The kit's tab caps itself at 220px and reserves a control's height; a chrome row is tighter than that and its labels are the shortest unique suffix, so both are re-declared. `flex-shrink: 0` is what makes the strip scroll rather than squeeze fifteen documents into one width.",gap:"var(--jx-space-1)",padding:"4px var(--jx-space-2)",minHeight:"0",maxWidth:"none",flexShrink:"0",marginBlockEnd:"0",color:"var(--fg-dim)",cursor:"pointer",":hover":{color:"var(--fg)",background:"var(--hover-bg)"},'&[aria-selected="true"]':{color:"var(--fg)",borderBlockEndColor:"var(--accent)"},"&[data-dragging]":{opacity:"0.4"},"&[data-drop]":{$description:"The chip a drop would land BESIDE. An inset shadow rather than a border, so the indicator draws no layout shift mid-drag — the same reason `files-panel.json`'s row indicators are backgrounds rather than borders.",boxShadow:"inset 2px 0 0 var(--accent)"}},'& [part="tab"] [part="label"]':{maxWidth:"140px"},'& [part="tab"][data-preview] [part="label"]':{fontStyle:"italic"},'&:not([data-focused]) [part="tab"][aria-selected="true"]':{$description:"The unfocused pane's strip still says which of ITS documents is current, in a colour that does not compete with the pane holding the keyboard.",borderBlockEndColor:"var(--border)"},'& [part="tab"] [part="close"]':{$description:"`.tab-strip-close`'s reveal, applied to the kit's own close button: a row of fifteen ✕ glyphs is noise, so the affordance appears on the tab under the pointer and on the current one. The button keeps its own 24px target either way (SC 2.5.8) — this moves no pixel of layout.",opacity:"0"},'& [part="tab"]:hover [part="close"], & [part="tab"][aria-selected="true"] [part="close"]':{opacity:"1"},'& [part="origin"]':{$description:"`.tab-strip-origin` — the drill-in marker, in `jx-tab`'s icon slot. Hidden from assistive technology by the document that writes it: a reader hears where a document was opened from in the tooltip, and an arrow announced beside a file name says nothing.",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)",lineHeight:"1"},'& [part="pill"]':{$description:'`.entry-pill` — the draft pill (site-architecture.md §7.6), in `jx-tab`\'s status slot. It is ON THE CHIP and not only inside the entry editor because the mistake it prevents, publishing something you believed was private, is made while glancing at a row of tabs. "Published" is deliberately as visible as "Draft": a state you can only see one half of is a state you cannot check. The two Spectrum colours it used to name are `--jx-signal` against `--jx-bg`, which flips with the theme where a fixed yellow and a fixed black did not.',padding:"0 5px",borderRadius:"var(--radius)",background:"var(--bg)",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)",lineHeight:"15px",whiteSpace:"nowrap"},'& [part="pill"][data-draft]':{background:"var(--jx-signal)",color:"var(--jx-bg)"},'& [part="pin"]':{$description:"`.tab-strip-pin`, in `jx-tab`'s actions slot, on the current chip and on a pinned one (the rule below). A click on it never also selects the tab, and that is the KIT's doing now rather than a `stopPropagation` this document has to remember: `jx-tab` stops a click inside its actions slot exactly as it stops one on its own close button.",display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",padding:"0",border:"none",background:"none",color:"var(--fg-dim)",font:"inherit",fontSize:"var(--jx-text-md)",lineHeight:"1",borderRadius:"var(--radius)",cursor:"pointer",":hover":{background:"var(--hover-bg)",color:"var(--fg)"},":focus-visible":{outline:"var(--jx-focus-ring)",outlineOffset:"-1px"}},'& [part="tab"]:not([aria-selected="true"]):not([data-pinned]) [part="pin"]':{$description:"An inactive, unpinned chip draws no pin and keeps no box for one. It was `opacity: 0` here and revealed on hover, so the invisible button still took 16px of the chip and every click on it: the centre of a short chip (the Media home's, beside its viewer tab) was the pin, so the click toggled a pin nobody could see and the tab did not activate. A box that takes clicks is a control, and a control is either shown or absent. The current chip shows its pin, a pinned chip shows its mark, and any chip pins from its context menu (`document.togglePinned`).",display:"none"},'& [part="tab"][data-pinned] [part="pin"]':{color:"var(--accent)"},'& [part="derivation"]':{$description:"A LENS pane's strip: one chip naming the projection and the document it projects, where an ordinary pane draws tab chips. It is not a tab and must not look like one — no close ✕ of its own, because a lens owns no document to close. Its vertical box is a tab chip's, `4px` top and bottom plus the 2px underline `[part=\"tab\"]` reserves, so the lens's one-chip row sits on the same baseline grid as the tab row in the pane beside it; `tab-strip.test.ts` compares the two declarations rather than the two boxes, because happy-dom lays nothing out and a 19px strip against a 28px one is the class of defect only a picture catches. Horizontally it is 10px rather than a chip's 8px: this row is one chip wide with nothing to sit beside, and a chip's tighter inset exists so several of them read as a series.",display:"flex",flex:"1 1 auto",alignItems:"baseline",gap:"6px",minWidth:"0",padding:"4px 10px",borderBottom:"2px solid transparent",whiteSpace:"nowrap",overflow:"hidden"},'& [part="preset"]':{color:"var(--fg)",fontSize:"var(--jx-text-md)"},'& [part="subject"]':{color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)",textOverflow:"ellipsis",overflow:"hidden"},'& [part="overflow"]':{$description:"`.tab-strip-overflow`. It sits OUTSIDE the scrolling strip, so it stays reachable at any scroll offset — which is the whole point of it. One button draws both trailing affordances, because they are the same control in the same place: the chevron that lists the tabs currently out of view, and, on a derived pane, the ✕ that is a lens's only exit.",flex:"0 0 auto",display:"flex",alignItems:"center",justifyContent:"center",width:"22px",padding:"0",border:"none",borderLeft:"1px solid var(--border)",background:"none",color:"var(--fg-dim)",font:"inherit",fontSize:"var(--jx-text-lg)",lineHeight:"1",cursor:"pointer",":hover":{background:"var(--hover-bg)",color:"var(--fg)"},":focus-visible":{outline:"var(--jx-focus-ring)",outlineOffset:"-2px"}},'& [part="overflow"][hidden]':{display:"none"}},children:[{$description:"One row draws one pane, and a pane is either a set of open documents or a projection of somebody else's. A third answer — a pane with neither — draws nothing at all, which is the case with no branch here: the row itself is `hidden`.",tagName:"div",attributes:{part:"body"},style:{$description:"The switch container generates no box: the branch inside it IS the row's flex item, so a lens chip and a tab strip sit at the same depth and take the same `flex` the row gives them.",display:"contents"},$switch:{$ref:"#/state/mode"},cases:{tabs:{tagName:"jx-tabs",attributes:{part:"tabs",label:"${state.stripLabel}",selected:"${state.active}","data-drop-tail":"${state.dropTail ? '' : null}"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/activate"},value:[{$ref:"event#/detail"}]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closeTab"},value:[{$ref:"event#/detail"}]}]},onwheel:{$ref:"#/state/wheel"},children:[{$prototype:"Array",items:{$ref:"#/state/tabs"},key:{$ref:"$map/item/key"},map:{tagName:"jx-tab",attributes:{part:"tab","data-tab":"${$map.item.key}",value:"${$map.item.key}",label:"${$map.item.label}",title:"${$map.item.title}",closable:"",dirty:"${$map.item.dirty ? '' : null}","data-pinned":"${$map.item.pinned ? '' : null}","data-preview":"${$map.item.preview ? '' : null}","data-dragging":"${state.dragKey === $map.item.key ? '' : null}","data-drop":"${state.dropIndex === $map.item.index ? '' : null}"},ondblclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/promote"},value:[{$ref:"$map/item/key"}]}]},onauxclick:{$prototype:"Function",body:[{if:{operator:"===",target:{$ref:"event#/button"},value:1},then:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/closeTab"},value:[{$ref:"$map/item/key"}]}]}]},oncontextmenu:{$prototype:"Function",body:[{preventDefault:!0},{stopPropagation:!0},{operator:"call",target:{$ref:"#/state/context"},value:[{$ref:"$map/item/key"},{$ref:"event#/clientX"},{$ref:"event#/clientY"}]}]},children:[{$description:"The drill-in marker: this document was opened FROM another one. `jx-tab`'s icon slot draws it before the label, which is where it has always been.",tagName:"span",attributes:{slot:"icon",part:"origin","aria-hidden":"true",hidden:"${$map.item.origin ? null : ''}"},textContent:"↳"},{$description:"The draft pill. It is a `<span>` in the status slot rather than a mounted document of its own, which is what kept it a lit fragment inside `content/entry-editor.ts` until the strip converted: a document mounted per chip would be an async mount inside a synchronous rebuild. `entryDraftPill` states the two facts; this draws them.",tagName:"span",attributes:{slot:"status",part:"pill",title:"${$map.item.pillTitle}","data-draft":"${$map.item.draft ? '' : null}",hidden:"${$map.item.pill ? null : ''}"},textContent:"${$map.item.pill}"},{$description:"The pin, in the actions slot. `title` is the whole accessible name (studio-ui-guidelines.md §10): the glyph is hidden, so a matching `aria-label` would announce it twice. `tabindex` follows the tab's own selectedness, exactly as the close button's does — the strip is ONE stop in the tab order, and a control inside every chip that took the platform's default would make fifteen.",tagName:"button",attributes:{slot:"actions",part:"pin",type:"button",title:"${$map.item.pinTitle}",tabindex:"${$map.item.tabindex}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/togglePin"},value:[{$ref:"$map/item/key"}]}]},children:[{tagName:"span",attributes:{part:"pin-glyph","aria-hidden":"true"},textContent:"${$map.item.pinGlyph}"}]}]}}]},derivation:{$description:`THE CHIP FINISHES ITS OWN SENTENCE, and both halves are the flow's: two of the presets are labelled with an unfinished phrase — "Same page at", "Same page in" — because the interesting half is the value, and a chip whose source pane shows nothing says "no document" rather than trailing off.`,tagName:"div",attributes:{part:"derivation",title:"${state.chipTitle}"},children:[{tagName:"span",attributes:{part:"preset"},textContent:"${state.preset}"},{tagName:"span",attributes:{part:"subject"},textContent:"${state.subject}"}]}}},{tagName:"button",attributes:{part:"overflow",type:"button",title:"${state.trailingTitle}",hidden:"${state.trailing ? null : ''}"},onclick:{$prototype:"Function",body:[{stopPropagation:!0},{operator:"call",target:{$ref:"#/state/openTrailing"},value:[{$ref:"event#/currentTarget"}]}]},children:[{tagName:"span",attributes:{part:"overflow-glyph","aria-hidden":"true"},textContent:"${state.trailingGlyph}"}]}]};T("tab-strip",je);function Et(e){let t=n(e)?void 0:e.attributes?.part;return n(t)?t:""}function Pt(e){let t=e?.$map,a=v(t)?t.item:void 0,r=v(a)?a.key:void 0;return n(r)?r:""}function Me(e,t,a){let r=g({...t,...a,dragKey:"",dropIndex:-1,dropTail:!1});e.replaceChildren();let i=null,o=!1,s=null;return R("tab-strip",r,e,{onNodeCreated:(l,c,d,f)=>{if(o||!(l instanceof HTMLElement))return;let b=Et(d);if(b==="tabs"){s=l,a.stripHost(l);return}if(b==="tab"){let w=Pt(f);if(w)a.chipHost(l,w)}}}).then((l)=>{if(o){l.dispose();return}i=l}),{dispose(){o=!0,i?.dispose(),i=null,s=null,e.replaceChildren()},drag(l){r.dragKey=l.dragKey,r.dropIndex=l.dropIndex,r.dropTail=l.dropTail},strip:()=>s,update(l){r.focused=l.focused,r.stripLabel=l.stripLabel,r.active=l.active,r.tabs=l.tabs,r.preset=l.preset,r.subject=l.subject,r.chipTitle=l.chipTitle,r.trailing=l.trailing,r.trailingTitle=l.trailingTitle,r.trailingGlyph=l.trailingGlyph,r.mode=l.mode}}}function Ce(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),a.push.apply(a,r)}return a}function Fe(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Ce(Object(a),!0).forEach(function(r){rl(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Ce(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}var Nt={top:function e(t,a){return Math.abs(a.y-t.top)},right:function e(t,a){return Math.abs(t.right-a.x)},bottom:function e(t,a){return Math.abs(t.bottom-a.y)},left:function e(t,a){return Math.abs(a.x-t.left)}};function me(e,t){var a,r,{element:i,input:o,allowedEdges:s}=t,l={x:o.clientX,y:o.clientY},c=i.getBoundingClientRect(),d=s.map(function(b){return{edge:b,value:Nt[b](c,l)}}),f=(a=(r=d.sort(function(b,w){return b.value-w.value})[0])===null||r===void 0?void 0:r.edge)!==null&&a!==void 0?a:null;return Fe(Fe({},e),{},rl({},re,f))}function fe(e){var t;return(t=e[re])!==null&&t!==void 0?t:null}var re=Symbol("closestEdge");function Ae(e){var{startIndex:t,closestEdgeOfTarget:a,indexOfTarget:r,axis:i}=e;if(t===-1||r===-1)return t;if(t===r)return t;if(a==null)return r;var o=i==="vertical"&&a==="bottom"||i==="horizontal"&&a==="right",s=t<r;if(s)return o?r:r-1;return o?r+1:r}function Ou(e){return v(e)&&(e.type==="tab"||e.type==="file-tree"&&e.entryType==="file")}function he(e,t,a){if(fn(t)?.derived)fE(t);if(!pv(e,t,a))return;td(e),Bt(e)}async function Ht(e,t,a){let r=[...m.tabs.values()].find((o)=>o.documentPath===e);if(r){he(r.id,t,a);return}await yi(e,{focus:!0,paneId:t});let i=[...m.tabs.values()].find((o)=>o.documentPath===e);if(i)he(i.id,t,a)}function Oe(e,t){if(e.tabId===void 0)return e.index;return t==="left"?e.index:e.index+1}async function It(e,t){let a=fe(t);if(e.type==="tab"){if(e.paneId===t.paneId){let r=fn(t.paneId);if(!r)return;let i=r.tabOrder.indexOf(e.tabId);if(i===-1)return;let o=t.tabId===void 0?r.tabOrder.length-1:Ae({axis:"horizontal",closestEdgeOfTarget:a,indexOfTarget:t.index,startIndex:i});if(o!==i)V$(e.tabId,o);return}he(e.tabId,t.paneId,Oe(t,a));return}await Ht(e.path,t.paneId,Oe(t,a))}async function jt(e,t){if(e.type==="tab"){if(DC(e.tabId))td(e.tabId);return}let a=ec(t.paneId);if(await yi(e.path,{paneId:a.id}),![...m.tabs.values()].some((i)=>i.documentPath===e.path)&&zm(a))Bm(a.id)}async function Le(e,t){if(!t||!Ou(e.data))return;let a=e.data;if(t.data.type==="tab-slot"){await It(a,t.data);return}if(t.data.type==="pane-edge")await jt(a,t.data)}var we=null,ie=null,z=new Map,_=new Map,k=new Map,A=new Map,M=new Map,J=null,H=null,P=null,U=new Map,oe=new Map,ve=null;function Mt(e){return`pane.${e}/tabs`}function Ct(e){return Mp(Mt(e.id))??we}function sD(e){Ft(),we=e,ve=Ks({onDragStart({source:t}){if(!Ou(t.data))return;H=t.data.type==="tab"?{kind:"tab",tabId:t.data.tabId}:{kind:"file",path:t.data.path},be(),ye()},onDrag({location:t}){if(!H)return;let[a]=t.current.dropTargets,r=a?.data;P=r?.type==="tab-slot"?{index:r.tabId===void 0?-1:r.index,paneId:r.paneId,tail:r.tabId===void 0}:null,ye()},onDrop({location:t,source:a}){if(!Ou(a.data))return;let[r]=t.current.dropTargets;H=null,P=null,ye(),be(),Le(a,r)}}),ie=ge(),ie.run(()=>{ne(()=>{m.activePaneId;for(let t of m.panes)t.id,t.tabOrder,t.activeTabId;h.workspace;for(let t of m.tabs.values())t.session.ui.canvasMode,t.doc.dirty,t.documentPath,t.pinned,t.preview,t.session.openedFrom,t.doc.content.frontmatter[ks];FC(),be()})})}function Ft(){Lt(),Se(),Re(),ie?.stop(),ie=null,ve?.(),ve=null;for(let e of k.keys())$e(e);for(let e of k.values())e.dispose();k.clear(),A.clear(),we=null,H=null,P=null,z.clear(),M.clear(),_.clear()}function $e(e){let t=U.get(e);if(t){for(let a of t.values())a();U.delete(e)}oe.get(e)?.(),oe.delete(e)}function be(){let e=Ob(),t=new Map;for(let r of m.panes){let i=Ct(r);if(i&&(!t.has(i)||Hm(r.id)))t.set(i,r)}let a=new Set;for(let[r,i]of t){if(e||i.derived)At(i,r);_.set(i.id,r),a.add(i.id)}for(let[r,i]of _){if(a.has(r))continue;if(_.delete(r),z.delete(r),M.delete(r),!t.has(i))$e(i),k.get(i)?.dispose(),k.delete(i),A.delete(i)}}function At(e,t){let a=De(e);A.set(t,{mode:a.mode,paneId:e.id});let r=k.get(t);if(r)r.update(a);else k.set(t,Me(t,a,Rt(t)));if(Gt(t,a),k.get(t)?.strip()&&e.activeTabId!==z.get(e.id))z.set(e.id,e.activeTabId),de.add(t);Ot(t)}var V=new Map,de=new Set;function Ot(e){if(V.has(e))return;V.set(e,requestAnimationFrame(()=>{V.delete(e);let t=F(e);if(t&&Ob())Dt(t,e);de.delete(e)}))}function Lt(){for(let e of V.values())cancelAnimationFrame(e);V.clear(),de.clear()}function Dt(e,t){let a=k.get(t)?.strip();if(a&&de.has(t))[...a.children].find((r)=>r instanceof HTMLElement&&r.dataset.tab===e.activeTabId)?.scrollIntoView({block:"nearest",inline:"nearest"});qt(e,t)}function F(e){let t=A.get(e)?.paneId;return m.panes.find((a)=>a.id===t)??null}function Rt(e){return{activate:(t)=>{Bt(t)},chipHost:(t,a)=>{zt(e,t,a)},closeTab:(t)=>{Jg(t)},context:(t,a,r)=>{let i=m.tabs.get(t);if(i)na(i,a,r)},focusPane:()=>{Lr(F(e)?.id??ui)},openTrailing:(t)=>{Kt(e,t)},promote:(t)=>{td(t)},stripHost:(t)=>{Ut(e,t)},togglePin:(t)=>{let a=m.tabs.get(t);if(a)Bx(t,!a.pinned)},wheel:(t,a)=>{Yt(a)}}}function _t(e,t){let a=ae(),r=vt(e.id)??vt(t.sourcePaneId),i=t.kind==="lens"&&t.preset==="breakpoint"?`${Pu.breakpoint} ${t.media?Di(t.media):"Base"}`:t.kind==="companion"&&t.preset==="locale"?`${Pu.locale} ${t.locale?Vt(t.locale):"—"}`:Pu[t.preset],o=r?$d(r):"no document";return{active:"",chipTitle:`${i} · ${r?.documentPath??"no document"}`,focused:Hm(e.id),mode:"derivation",preset:i,stripLabel:se(e),subject:o,tabs:[],trailing:!0,trailingGlyph:"✕",trailingTitle:a?.get("pane.unsplit")?.title??"Close Side Pane"}}function se(e){return e.id===ui?"Open documents":"Open documents in the side pane"}function Jt(e){return{active:"",chipTitle:"",focused:Hm(e.id),mode:"empty",preset:"",stripLabel:se(e),subject:"",tabs:[],trailing:!1,trailingGlyph:"",trailingTitle:""}}function De(e){let{derived:t}=e,a=te(e);if(t&&a.length===0)return _t(e,t);if(a.length===0){if(H)return{active:"",chipTitle:"",focused:Hm(e.id),mode:"tabs",preset:"",stripLabel:se(e),subject:"",tabs:[],trailing:!1,trailingGlyph:"⌄",trailingTitle:"Show hidden tabs"};return z.set(e.id,null),M.set(e.id,!1),Jt(e)}let r=_e(e);return{active:e.activeTabId??"",chipTitle:"",focused:Hm(e.id),mode:"tabs",preset:"",stripLabel:se(e),subject:"",tabs:a.flatMap((i)=>Wt(e,i,e.tabOrder.indexOf(i),r)),trailing:M.get(e.id)===!0,trailingGlyph:"⌄",trailingTitle:"Show hidden tabs"}}function Wt(e,t,a,r){let i=m.tabs.get(t);if(!i)return[];let o=kD(i);return[{dirty:i.doc.dirty,draft:o?.draft??!1,index:a,key:t,label:r.get(t)??"Untitled",origin:Boolean(i.session.openedFrom),pill:o?.text??"",pillTitle:o?.title??"",pinGlyph:i.pinned?"◉":"◎",pinTitle:i.pinned?"Unpin":"Pin",pinned:i.pinned,preview:i.preview,tabindex:t===e.activeTabId?"0":"-1",title:ia(i)}]}function zt(e,t,a){let r=U.get(e);if(!r)r=new Map,U.set(e,r);r.get(a)?.();let i=Vr(Ur({element:t,canDrag({input:o}){let s=lx(o.clientX,o.clientY);return!(s instanceof Element&&s.closest('[part="pin"], [part="close"]'))},getInitialData(){return{paneId:F(e)?.id,tabId:a,type:"tab"}}}),Gs({canDrop({source:o}){return Ou(o.data)},element:t,getData({element:o,input:s}){let l=F(e);if(!l)return{type:"tab-slot-refused"};return me({index:l.tabOrder.indexOf(a),paneId:l.id,tabId:a,type:"tab-slot"},{allowedEdges:["left","right"],element:o,input:s})}}));r.set(a,i)}function Ut(e,t){oe.get(e)?.();let a=Gs({canDrop({source:r}){return Ou(r.data)},element:t,getData(){let r=F(e);return r?{index:r.tabOrder.length,paneId:r.id,type:"tab-slot"}:{type:"tab-slot-refused"}}});oe.set(e,a)}function Gt(e,t){if(t.mode!=="tabs"){$e(e);return}let a=new Set(t.tabs.map((i)=>i.key)),r=U.get(e);if(!r)return;for(let[i,o]of r)if(!a.has(i))o(),r.delete(i)}function ye(){let e=H?.kind==="tab"?H.tabId:"";for(let[t,a]of A){let r=k.get(t);if(!r)continue;let i=P!==null&&P.paneId===a.paneId;r.drag({dragKey:e,dropIndex:i&&P?P.index:-1,dropTail:i&&P?P.tail:!1})}}function qt(e,t){let a=k.get(t),r=a?.strip();if(!a||!r)return;let i=r.scrollWidth>r.clientWidth;if(i!==(M.get(e.id)===!0))M.set(e.id,i),a.update(De(e))}function Kt(e,t){let a=F(e);if(!a)return;if(A.get(e)?.mode==="derivation"){rt("pane.unsplit",void 0,"Tabs");return}Qt(a,_e(a),t)}function Yt(e){if(e.ctrlKey)return;let t=e.currentTarget;if(!(t instanceof HTMLElement)||t.scrollWidth<=t.clientWidth)return;let a=Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY;if(!a)return;e.preventDefault(),t.scrollLeft+=a}function Zt(e=m.activePaneId){let t=m.panes.find((d)=>d.id===e),a=_.get(e),r=a?k.get(a)?.strip()??null:null;if(!t||!r)return[];let i=r.scrollLeft,o=i+r.clientWidth,s=[],l=te(t),c=[...r.querySelectorAll('[part="tab"]')];for(let[d,f]of c.entries()){let b=l[d];if(b&&(f.offsetLeft<i||f.offsetLeft+f.offsetWidth>o))s.push(b)}return s}function Se(){J?.close(),J=null}function Qt(e,t,a){Se();let r=Zt(e.id),i=r.length>0?r:te(e),o=ze(a??document.body);J=Xt({label:"Hidden tabs",onClosed:(s)=>{if(J===s)J=null},opener:a,place:(s)=>({x:Math.max(4,o.right-s.width),y:o.bottom}),placement:"block-end span-inline-start",region:"tab-overflow",rows:i.map((s)=>({checked:s===e.activeTabId?"true":"false",destructive:!1,disabled:!1,dividerAbove:!1,id:s,run:()=>{Bt(s)},title:t.get(s)??"Untitled"}))})}var W=null;function Re(){W?.close(),W=null}function ea(e){let t={};if(Ac(e.documentPath))t.draft=!Bl(Fl(e));return t}function ta(e){let t=Object.entries(e),a=t.length===1?t[0]?.[1]:void 0;if(!Xe(a))return;return a?"false":"true"}function aa(e){let t=ae();if(!t)return[];let a=ea(e),r=[],i;for(let o of t.forPlacement("context/tab")){let s=o.args;if(!(s?.required??[]).every((w)=>(w in a)))continue;let l={};for(let w of Object.keys(s?.properties??{}))if(w in a)l[w]=a[w];let c=r.length>0&&o.group!==i;({group:i}=o);let d=t.disabledReason(o.id),f=ta(l),b={destructive:o.destructive===!0,dividerAbove:c,id:o.id,title:o.title};if(f!==void 0)b.checked=f;r.push(d===void 0?{...b,disabled:!1,run:()=>{Tn(t,o.id,l,"Tabs")}}:{...b,disabled:!0,requires:d})}return r}function na(e,t,a){Re(),Se(),Bt(e.id);let r=aa(e);if(r.length===0)return;W=Xt({label:"Tab actions",onClosed:(i)=>{if(W===i)W=null},origin:{x:t,y:a},region:"tab",rows:r})}function em(e){let t=e.replace(/^\.\//,"");if(!t.startsWith("pages/"))return null;let r=t.slice(6).replace(/\.[^./]+$/,"").split("/").filter((i)=>i!=="");if(r.at(-1)==="index")r.pop();return`/${r.join("/")}`}function ra(e){let t=e.map((a)=>{let r=a.documentPath;if(!r)return{depth:0,fixed:!0,id:a.id,label:a.fallback,parts:[]};let i=em(r);if(i!==null)return{depth:0,fixed:!0,id:a.id,label:i,parts:[]};let o=r.split("/").filter((s)=>s!==""&&s!==".");return{depth:1,fixed:!1,id:a.id,label:o.slice(-1).join("/")||r,parts:o}});for(;;){let a=new Map;for(let i of t){let o=a.get(i.label);if(o)o.push(i);else a.set(i.label,[i])}let r=!1;for(let i of a.values()){if(i.length<2)continue;for(let o of i){if(o.fixed||o.depth>=o.parts.length)continue;o.depth+=1,o.label=o.parts.slice(-o.depth).join("/"),r=!0}}if(!r)break}return new Map(t.map((a)=>[a.id,a.label]))}function _e(e){return ra(e.tabOrder.flatMap((t)=>{let a=m.tabs.get(t);return a?[{documentPath:a.documentPath,fallback:fm(a.id)??iv(a.id)??"Untitled",id:t}]:[]}))}function ia(e){let t=e.documentPath||fm(e.id)||iv(e.id)||"Untitled",a=e.session.openedFrom,r=a?.documentPath?`${t}
|
|
1
|
+
import{Vt,al,ev,an,Y,Ud,Gd,Tn,Vn,Ra,yh,cv,ui,m,u,pn,Er,jm,EC,Xl,Hm,Bm,Xc,DC,Fx,j$,Yd,Ht,dv}from"./studio-y1x65h5r.js";import{ge,ne,g,C,dl}from"./studio-hw60n5dh.js";import{Xd,Yp}from"./studio-grp684wx.js";import{p}from"./studio-pr23qhrw.js";import{JN,ol,Yw,h,Db}from"./studio-m4w6sygj.js";import{ae}from"./studio-7cg75gtj.js";import{Bu,Fl}from"./studio-bf0rgyf7.js";import{Mp,T,R,En,rt,Ko,uC}from"./studio-02phtmqn.js";import{Xt}from"./studio-xddgbwhe.js";import{Pl,W_,nb,wD,CE,kE,EE,TE}from"./studio-3pndhat0.js";import{He,rx,Ks,nn,Uc}from"./studio-gmhd0j3f.js";import{Cs,wp,Hl,Dc}from"./studio-2dtc90zs.js";import{vt,_b,Wl,Mc,eh,kp,LS,ji}from"./studio-5abge3wy.js";import{rl,Wr,qs,Gs,Vr}from"./studio-txkx6586.js";import{Bl,mm,Sp}from"./studio-1yhz0s8p.js";import{Mu,lE}from"./studio-c5dj3dzk.js";import{yi}from"./studio-g6ysm05p.js";import{gE}from"./studio-h98520qr.js";import{ya,Rc}from"./studio-d140sy8e.js";import{Zp,S,xn,cl}from"./studio-ana67wax.js";import{n,Xe,v}from"./studio-kt2j51sa.js";import{le}from"./studio-fqs1a22a.js";var St=new Set(["entry"]);function Gg(e){let t=al(e.id);if(t)return t;let a=e.session.ui.canvasMode;if(a==="git-diff")return"publish";if(a==="media")return"media";if(St.has(a))return"content";let r=Bl(e.id);if(r)return r.kind==="data"?"design":"content";if(e.documentPath===an)return"styles";return Vn(e.documentPath)?"content":"design"}var Tt=new Set(["edit","design","stylebook"]);function Yk(e){return e.documentPath!==null&&Bl(e.id)===null&&Tt.has(e.session.ui.canvasMode)}function $c(e,t=h.workspace){let a=m.tabs.get(e);return a!==void 0&&Gg(a)===t}function te(e,t=h.workspace){return e.tabOrder.filter((a)=>$c(a,t))}function eD(e){let t=m.mruOrder.find((a)=>$c(a,e));if(t)return t;for(let a of m.panes){let r=a.tabOrder.find((i)=>$c(i,e));if(r)return r}return null}function Zk(e,t){if(e.activeTabId&&$c(e.activeTabId,t))return e.activeTabId;return m.mruOrder.find((a)=>e.tabOrder.includes(a)&&$c(a,t))??e.tabOrder.find((a)=>$c(a,t))??null}var Me={$schema:"https://jxsuite.com/schema/v1",$id:"StudioTabStrip",$description:"One pane's tab strip, as a Jx document over the kit: a real `tablist` of `jx-tab`s, or — for a pane that owns no document — the derivation chip naming what it is a projection of, and in both cases one trailing button. `panels/tab-strip.ts` keeps every decision: which pane a host is drawing, what each tab is called (the shortest unique suffix, and a page's ROUTE), what its tooltip says, whether closing it needs a prompt, what the overflow chevron lists and what the context menu offers. This document owns the markup, the ARIA, the keyboard and the style, and it holds THREE things the old chip drew by hand and the kit now draws: the tab's own selected state (`aria-selected`, not an `.active` class), its close button, and its dirty dot. The three that are Studio's alone go in `jx-tab`'s slots — the drill-in marker in `icon`, the draft pill in `status`, the pin toggle in `actions` (ui.md §5.4) — which is the gap that kept this strip out of the tab pattern until now. **Drag is `@atlaskit/pragmatic-drag-and-drop`, not native HTML5 DnD**: a chip carries no `draggable` attribute and no `ondrag*` handler, because `panels/tab-strip.ts` registers every chip and every strip as a pragmatic source/target through `onNodeCreated` and resolves a completed drag in `panels/tab-drop.ts`. What is left here is three SCOPE comparisons, exactly as `files-panel.json` marks a row under drag: `data-dragging` on the chip being carried, `data-drop` on the chip a drop would land beside, `data-drop-tail` on the strip when the drop is its empty tail.",tagName:"div",attributes:{part:"strip-row","data-focused":"${state.focused ? '' : null}",hidden:"${state.mode === 'empty' ? '' : null}"},onmousedown:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/focusPane"},value:[]}]},style:{$description:"`styles/shell.css`'s `.tab-strip*` rules and `styles/canvas.css`'s pane-state rules, keyed on `part` and carried in. What did NOT come with them is the point: the chip's own hover, its selected underline, its close button and its dirty dot are `jx-tab`'s, and the strip's flex row and hairline are `jx-tabs`'s. What is left here is the pane strip's own shape — the scroll container the chevron exists for, the 11px type of a chrome row, the states the PANE model adds (pinned, preview, dragging, an unfocused pane's dimmed underline), and the three slotted marks.",display:"flex",alignItems:"stretch",minWidth:"0",background:"var(--bg-panel)",borderBottom:"1px solid var(--border)",fontFamily:"var(--jx-font-sans)","&[hidden]":{display:"none"},'& [part="tabs"]':{$description:"`.tab-strip`. The kit's strip draws its own hairline; the ROW draws this one, so the strip's is taken off rather than doubled. The scrollbar is hidden by design — the wheel handler is a mouse affordance and the chevron is the pointer-independent route to the same tabs — so `overflow-x: auto` here is a scrolling box with no visible bar.",flex:"1 1 auto",minWidth:"0",gap:"0",padding:"0 var(--jx-space-2)",border:"0",overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none",fontSize:"var(--jx-text-sm)","&::-webkit-scrollbar":{display:"none"}},'& [part="tabs"][data-drop-tail]::after':{$description:"The strip's own tail target: a drop onto the empty space after the last chip, or onto a pane whose strip carries no chips at all — an empty pane made a target during a drag by `panels/tab-strip.ts`'s `project`. A fixed-width bar rather than a background tint, so it reads the same as a chip's own `data-drop` edge instead of a second visual language for the same gesture.",content:'""',flex:"0 0 2px",alignSelf:"stretch",background:"var(--accent)"},'& [part="tab"]':{$description:"`.tab-strip-tab`. The kit's tab caps itself at 220px and reserves a control's height; a chrome row is tighter than that and its labels are the shortest unique suffix, so both are re-declared. `flex-shrink: 0` is what makes the strip scroll rather than squeeze fifteen documents into one width.",gap:"var(--jx-space-1)",padding:"4px var(--jx-space-2)",minHeight:"0",maxWidth:"none",flexShrink:"0",marginBlockEnd:"0",color:"var(--fg-dim)",cursor:"pointer",":hover":{color:"var(--fg)",background:"var(--hover-bg)"},'&[aria-selected="true"]':{color:"var(--fg)",borderBlockEndColor:"var(--accent)"},"&[data-dragging]":{opacity:"0.4"},"&[data-drop]":{$description:"The chip a drop would land BESIDE. An inset shadow rather than a border, so the indicator draws no layout shift mid-drag — the same reason `files-panel.json`'s row indicators are backgrounds rather than borders.",boxShadow:"inset 2px 0 0 var(--accent)"}},'& [part="tab"] [part="label"]':{maxWidth:"140px"},'& [part="tab"][data-preview] [part="label"]':{fontStyle:"italic"},'&:not([data-focused]) [part="tab"][aria-selected="true"]':{$description:"The unfocused pane's strip still says which of ITS documents is current, in a colour that does not compete with the pane holding the keyboard.",borderBlockEndColor:"var(--border)"},'& [part="tab"] [part="close"]':{$description:"`.tab-strip-close`'s reveal, applied to the kit's own close button: a row of fifteen ✕ glyphs is noise, so the affordance appears on the tab under the pointer and on the current one. The button keeps its own 24px target either way (SC 2.5.8) — this moves no pixel of layout.",opacity:"0"},'& [part="tab"]:hover [part="close"], & [part="tab"][aria-selected="true"] [part="close"]':{opacity:"1"},'& [part="origin"]':{$description:"`.tab-strip-origin` — the drill-in marker, in `jx-tab`'s icon slot. Hidden from assistive technology by the document that writes it: a reader hears where a document was opened from in the tooltip, and an arrow announced beside a file name says nothing.",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)",lineHeight:"1"},'& [part="pill"]':{$description:'`.entry-pill` — the draft pill (site-architecture.md §7.6), in `jx-tab`\'s status slot. It is ON THE CHIP and not only inside the entry editor because the mistake it prevents, publishing something you believed was private, is made while glancing at a row of tabs. "Published" is deliberately as visible as "Draft": a state you can only see one half of is a state you cannot check. The two Spectrum colours it used to name are `--jx-signal` against `--jx-bg`, which flips with the theme where a fixed yellow and a fixed black did not.',padding:"0 5px",borderRadius:"var(--radius)",background:"var(--bg)",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)",lineHeight:"15px",whiteSpace:"nowrap"},'& [part="pill"][data-draft]':{background:"var(--jx-signal)",color:"var(--jx-bg)"},'& [part="pin"]':{$description:"`.tab-strip-pin`, in `jx-tab`'s actions slot, on the current chip and on a pinned one (the rule below). A click on it never also selects the tab, and that is the KIT's doing now rather than a `stopPropagation` this document has to remember: `jx-tab` stops a click inside its actions slot exactly as it stops one on its own close button.",display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",padding:"0",border:"none",background:"none",color:"var(--fg-dim)",font:"inherit",fontSize:"var(--jx-text-md)",lineHeight:"1",borderRadius:"var(--radius)",cursor:"pointer",":hover":{background:"var(--hover-bg)",color:"var(--fg)"},":focus-visible":{outline:"var(--jx-focus-ring)",outlineOffset:"-1px"}},'& [part="tab"]:not([aria-selected="true"]):not([data-pinned]) [part="pin"]':{$description:"An inactive, unpinned chip draws no pin and keeps no box for one. It was `opacity: 0` here and revealed on hover, so the invisible button still took 16px of the chip and every click on it: the centre of a short chip (the Media home's, beside its viewer tab) was the pin, so the click toggled a pin nobody could see and the tab did not activate. A box that takes clicks is a control, and a control is either shown or absent. The current chip shows its pin, a pinned chip shows its mark, and any chip pins from its context menu (`document.togglePinned`).",display:"none"},'& [part="tab"][data-pinned] [part="pin"]':{color:"var(--accent)"},'& [part="derivation"]':{$description:"A LENS pane's strip: one chip naming the projection and the document it projects, where an ordinary pane draws tab chips. It is not a tab and must not look like one — no close ✕ of its own, because a lens owns no document to close. Its vertical box is a tab chip's, `4px` top and bottom plus the 2px underline `[part=\"tab\"]` reserves, so the lens's one-chip row sits on the same baseline grid as the tab row in the pane beside it; `tab-strip.test.ts` compares the two declarations rather than the two boxes, because happy-dom lays nothing out and a 19px strip against a 28px one is the class of defect only a picture catches. Horizontally it is 10px rather than a chip's 8px: this row is one chip wide with nothing to sit beside, and a chip's tighter inset exists so several of them read as a series.",display:"flex",flex:"1 1 auto",alignItems:"baseline",gap:"6px",minWidth:"0",padding:"4px 10px",borderBottom:"2px solid transparent",whiteSpace:"nowrap",overflow:"hidden"},'& [part="preset"]':{color:"var(--fg)",fontSize:"var(--jx-text-md)"},'& [part="subject"]':{color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)",textOverflow:"ellipsis",overflow:"hidden"},'& [part="overflow"]':{$description:"`.tab-strip-overflow`. It sits OUTSIDE the scrolling strip, so it stays reachable at any scroll offset — which is the whole point of it. One button draws both trailing affordances, because they are the same control in the same place: the chevron that lists the tabs currently out of view, and, on a derived pane, the ✕ that is a lens's only exit.",flex:"0 0 auto",display:"flex",alignItems:"center",justifyContent:"center",width:"22px",padding:"0",border:"none",borderLeft:"1px solid var(--border)",background:"none",color:"var(--fg-dim)",font:"inherit",fontSize:"var(--jx-text-lg)",lineHeight:"1",cursor:"pointer",":hover":{background:"var(--hover-bg)",color:"var(--fg)"},":focus-visible":{outline:"var(--jx-focus-ring)",outlineOffset:"-2px"}},'& [part="overflow"][hidden]':{display:"none"}},children:[{$description:"One row draws one pane, and a pane is either a set of open documents or a projection of somebody else's. A third answer — a pane with neither — draws nothing at all, which is the case with no branch here: the row itself is `hidden`.",tagName:"div",attributes:{part:"body"},style:{$description:"The switch container generates no box: the branch inside it IS the row's flex item, so a lens chip and a tab strip sit at the same depth and take the same `flex` the row gives them.",display:"contents"},$switch:{$ref:"#/state/mode"},cases:{tabs:{tagName:"jx-tabs",attributes:{part:"tabs",label:"${state.stripLabel}",selected:"${state.active}","data-drop-tail":"${state.dropTail ? '' : null}"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/activate"},value:[{$ref:"event#/detail"}]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closeTab"},value:[{$ref:"event#/detail"}]}]},onwheel:{$ref:"#/state/wheel"},children:[{$prototype:"Array",items:{$ref:"#/state/tabs"},key:{$ref:"$map/item/key"},map:{tagName:"jx-tab",attributes:{part:"tab","data-tab":"${$map.item.key}",value:"${$map.item.key}",label:"${$map.item.label}",title:"${$map.item.title}",closable:"",dirty:"${$map.item.dirty ? '' : null}","data-pinned":"${$map.item.pinned ? '' : null}","data-preview":"${$map.item.preview ? '' : null}","data-dragging":"${state.dragKey === $map.item.key ? '' : null}","data-drop":"${state.dropIndex === $map.item.index ? '' : null}"},ondblclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/promote"},value:[{$ref:"$map/item/key"}]}]},onauxclick:{$prototype:"Function",body:[{if:{operator:"===",target:{$ref:"event#/button"},value:1},then:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/closeTab"},value:[{$ref:"$map/item/key"}]}]}]},oncontextmenu:{$prototype:"Function",body:[{preventDefault:!0},{stopPropagation:!0},{operator:"call",target:{$ref:"#/state/context"},value:[{$ref:"$map/item/key"},{$ref:"event#/clientX"},{$ref:"event#/clientY"}]}]},children:[{$description:"The drill-in marker: this document was opened FROM another one. `jx-tab`'s icon slot draws it before the label, which is where it has always been.",tagName:"span",attributes:{slot:"icon",part:"origin","aria-hidden":"true",hidden:"${$map.item.origin ? null : ''}"},textContent:"↳"},{$description:"The draft pill. It is a `<span>` in the status slot rather than a mounted document of its own, which is what kept it a lit fragment inside `content/entry-editor.ts` until the strip converted: a document mounted per chip would be an async mount inside a synchronous rebuild. `entryDraftPill` states the two facts; this draws them.",tagName:"span",attributes:{slot:"status",part:"pill",title:"${$map.item.pillTitle}","data-draft":"${$map.item.draft ? '' : null}",hidden:"${$map.item.pill ? null : ''}"},textContent:"${$map.item.pill}"},{$description:"The pin, in the actions slot. `title` is the whole accessible name (studio-ui-guidelines.md §10): the glyph is hidden, so a matching `aria-label` would announce it twice. `tabindex` follows the tab's own selectedness, exactly as the close button's does — the strip is ONE stop in the tab order, and a control inside every chip that took the platform's default would make fifteen.",tagName:"button",attributes:{slot:"actions",part:"pin",type:"button",title:"${$map.item.pinTitle}",tabindex:"${$map.item.tabindex}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/togglePin"},value:[{$ref:"$map/item/key"}]}]},children:[{tagName:"span",attributes:{part:"pin-glyph","aria-hidden":"true"},textContent:"${$map.item.pinGlyph}"}]}]}}]},derivation:{$description:`THE CHIP FINISHES ITS OWN SENTENCE, and both halves are the flow's: two of the presets are labelled with an unfinished phrase — "Same page at", "Same page in" — because the interesting half is the value, and a chip whose source pane shows nothing says "no document" rather than trailing off.`,tagName:"div",attributes:{part:"derivation",title:"${state.chipTitle}"},children:[{tagName:"span",attributes:{part:"preset"},textContent:"${state.preset}"},{tagName:"span",attributes:{part:"subject"},textContent:"${state.subject}"}]}}},{tagName:"button",attributes:{part:"overflow",type:"button",title:"${state.trailingTitle}",hidden:"${state.trailing ? null : ''}"},onclick:{$prototype:"Function",body:[{stopPropagation:!0},{operator:"call",target:{$ref:"#/state/openTrailing"},value:[{$ref:"event#/currentTarget"}]}]},children:[{tagName:"span",attributes:{part:"overflow-glyph","aria-hidden":"true"},textContent:"${state.trailingGlyph}"}]}]};T("tab-strip",Me);function Et(e){let t=n(e)?void 0:e.attributes?.part;return n(t)?t:""}function Pt(e){let t=e?.$map,a=v(t)?t.item:void 0,r=v(a)?a.key:void 0;return n(r)?r:""}function Ce(e,t,a){let r=g({...t,...a,dragKey:"",dropIndex:-1,dropTail:!1});e.replaceChildren();let i=null,o=!1,s=null;return R("tab-strip",r,e,{onNodeCreated:(l,c,d,f)=>{if(o||!(l instanceof HTMLElement))return;let b=Et(d);if(b==="tabs"){s=l,a.stripHost(l);return}if(b==="tab"){let x=Pt(f);if(x)a.chipHost(l,x)}}}).then((l)=>{if(o){l.dispose();return}i=l}),{dispose(){o=!0,i?.dispose(),i=null,s=null,e.replaceChildren()},drag(l){r.dragKey=l.dragKey,r.dropIndex=l.dropIndex,r.dropTail=l.dropTail},strip:()=>s,update(l){r.focused=l.focused,r.stripLabel=l.stripLabel,r.active=l.active,r.tabs=l.tabs,r.preset=l.preset,r.subject=l.subject,r.chipTitle=l.chipTitle,r.trailing=l.trailing,r.trailingTitle=l.trailingTitle,r.trailingGlyph=l.trailingGlyph,r.mode=l.mode}}}function Fe(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),a.push.apply(a,r)}return a}function Ae(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Fe(Object(a),!0).forEach(function(r){rl(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Fe(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}var Nt={top:function e(t,a){return Math.abs(a.y-t.top)},right:function e(t,a){return Math.abs(t.right-a.x)},bottom:function e(t,a){return Math.abs(t.bottom-a.y)},left:function e(t,a){return Math.abs(a.x-t.left)}};function me(e,t){var a,r,{element:i,input:o,allowedEdges:s}=t,l={x:o.clientX,y:o.clientY},c=i.getBoundingClientRect(),d=s.map(function(b){return{edge:b,value:Nt[b](c,l)}}),f=(a=(r=d.sort(function(b,x){return b.value-x.value})[0])===null||r===void 0?void 0:r.edge)!==null&&a!==void 0?a:null;return Ae(Ae({},e),{},rl({},re,f))}function fe(e){var t;return(t=e[re])!==null&&t!==void 0?t:null}var re=Symbol("closestEdge");function Oe(e){var{startIndex:t,closestEdgeOfTarget:a,indexOfTarget:r,axis:i}=e;if(t===-1||r===-1)return t;if(t===r)return t;if(a==null)return r;var o=i==="vertical"&&a==="bottom"||i==="horizontal"&&a==="right",s=t<r;if(s)return o?r:r-1;return o?r+1:r}function Au(e){return v(e)&&(e.type==="tab"||e.type==="file-tree"&&e.entryType==="file")}function he(e,t,a){if(pn(t)?.derived)lE(t);if(!dv(e,t,a))return;Xc(e),Ht(e)}async function It(e,t,a){let r=[...m.tabs.values()].find((o)=>o.documentPath===e);if(r){he(r.id,t,a);return}await yi(e,{focus:!0,paneId:t});let i=[...m.tabs.values()].find((o)=>o.documentPath===e);if(i)he(i.id,t,a)}function Le(e,t){if(e.tabId===void 0)return e.index;return t==="left"?e.index:e.index+1}async function jt(e,t){let a=fe(t);if(e.type==="tab"){if(e.paneId===t.paneId){let r=pn(t.paneId);if(!r)return;let i=r.tabOrder.indexOf(e.tabId);if(i===-1)return;let o=t.tabId===void 0?r.tabOrder.length-1:Oe({axis:"horizontal",closestEdgeOfTarget:a,indexOfTarget:t.index,startIndex:i});if(o!==i)j$(e.tabId,o);return}he(e.tabId,t.paneId,Le(t,a));return}await It(e.path,t.paneId,Le(t,a))}async function Mt(e,t){if(e.type==="tab"){if(EC(e.tabId))Xc(e.tabId);return}let a=Xl(t.paneId);if(await yi(e.path,{paneId:a.id}),![...m.tabs.values()].some((i)=>i.documentPath===e.path)&&Bm(a))Hm(a.id)}async function De(e,t){if(!t||!Au(e.data))return;let a=e.data;if(t.data.type==="tab-slot"){await jt(a,t.data);return}if(t.data.type==="pane-edge")await Mt(a,t.data)}var we=null,ie=null,z=new Map,_=new Map,k=new Map,A=new Map,M=new Map,J=null,H=null,P=null,U=new Map,oe=new Map,ve=null;function Ct(e){return`pane.${e}/tabs`}function Ft(e){return Mp(Ct(e.id))??we}function tD(e){At(),we=e,ve=Gs({onDragStart({source:t}){if(!Au(t.data))return;H=t.data.type==="tab"?{kind:"tab",tabId:t.data.tabId}:{kind:"file",path:t.data.path},be(),ye()},onDrag({location:t}){if(!H)return;let[a]=t.current.dropTargets,r=a?.data;P=r?.type==="tab-slot"?{index:r.tabId===void 0?-1:r.index,paneId:r.paneId,tail:r.tabId===void 0}:null,ye()},onDrop({location:t,source:a}){if(!Au(a.data))return;let[r]=t.current.dropTargets;H=null,P=null,ye(),be(),De(a,r)}}),ie=ge(),ie.run(()=>{ne(()=>{m.activePaneId;for(let t of m.panes)t.id,t.tabOrder,t.activeTabId;h.workspace;for(let t of m.tabs.values())t.session.ui.canvasMode,t.doc.dirty,t.documentPath,t.pinned,t.preview,t.session.openedFrom,t.doc.content.frontmatter[Cs];DC(),be()})})}function At(){Dt(),Se(),_e(),ie?.stop(),ie=null,ve?.(),ve=null;for(let e of k.keys())$e(e);for(let e of k.values())e.dispose();k.clear(),A.clear(),we=null,H=null,P=null,z.clear(),M.clear(),_.clear()}function $e(e){let t=U.get(e);if(t){for(let a of t.values())a();U.delete(e)}oe.get(e)?.(),oe.delete(e)}function be(){let e=Db(),t=new Map;for(let r of m.panes){let i=Ft(r);if(i&&(!t.has(i)||jm(r.id)))t.set(i,r)}let a=new Set;for(let[r,i]of t){if(e||i.derived)Ot(i,r);_.set(i.id,r),a.add(i.id)}for(let[r,i]of _){if(a.has(r))continue;if(_.delete(r),z.delete(r),M.delete(r),!t.has(i))$e(i),k.get(i)?.dispose(),k.delete(i),A.delete(i)}}function Ot(e,t){let a=Re(e);A.set(t,{mode:a.mode,paneId:e.id});let r=k.get(t);if(r)r.update(a);else k.set(t,Ce(t,a,_t(t)));if(Gt(t,a),k.get(t)?.strip()&&e.activeTabId!==z.get(e.id))z.set(e.id,e.activeTabId),de.add(t);Lt(t)}var V=new Map,de=new Set;function Lt(e){if(V.has(e))return;V.set(e,requestAnimationFrame(()=>{V.delete(e);let t=F(e);if(t&&Db())Rt(t,e);de.delete(e)}))}function Dt(){for(let e of V.values())cancelAnimationFrame(e);V.clear(),de.clear()}function Rt(e,t){let a=k.get(t)?.strip();if(a&&de.has(t))[...a.children].find((r)=>r instanceof HTMLElement&&r.dataset.tab===e.activeTabId)?.scrollIntoView({block:"nearest",inline:"nearest"});qt(e,t)}function F(e){let t=A.get(e)?.paneId;return m.panes.find((a)=>a.id===t)??null}function _t(e){return{activate:(t)=>{Ht(t)},chipHost:(t,a)=>{Ut(e,t,a)},closeTab:(t)=>{Kg(t)},context:(t,a,r)=>{let i=m.tabs.get(t);if(i)na(i,a,r)},focusPane:()=>{Er(F(e)?.id??ui)},openTrailing:(t)=>{Kt(e,t)},promote:(t)=>{Xc(t)},stripHost:(t)=>{Bt(e,t)},togglePin:(t)=>{let a=m.tabs.get(t);if(a)Fx(t,!a.pinned)},wheel:(t,a)=>{Yt(a)}}}function Jt(e,t){let a=ae(),r=vt(e.id)??vt(t.sourcePaneId),i=t.kind==="lens"&&t.preset==="breakpoint"?`${Mu.breakpoint} ${t.media?ji(t.media):"Base"}`:t.kind==="companion"&&t.preset==="locale"?`${Mu.locale} ${t.locale?Vt(t.locale):"—"}`:Mu[t.preset],o=r?Td(r):"no document";return{active:"",chipTitle:`${i} · ${r?.documentPath??"no document"}`,focused:jm(e.id),mode:"derivation",preset:i,stripLabel:se(e),subject:o,tabs:[],trailing:!0,trailingGlyph:"✕",trailingTitle:a?.get("pane.unsplit")?.title??"Close Side Pane"}}function se(e){return e.id===ui?"Open documents":"Open documents in the side pane"}function Wt(e){return{active:"",chipTitle:"",focused:jm(e.id),mode:"empty",preset:"",stripLabel:se(e),subject:"",tabs:[],trailing:!1,trailingGlyph:"",trailingTitle:""}}function Re(e){let{derived:t}=e,a=te(e);if(t&&a.length===0)return Jt(e,t);if(a.length===0){if(H)return{active:"",chipTitle:"",focused:jm(e.id),mode:"tabs",preset:"",stripLabel:se(e),subject:"",tabs:[],trailing:!1,trailingGlyph:"⌄",trailingTitle:"Show hidden tabs"};return z.set(e.id,null),M.set(e.id,!1),Wt(e)}let r=Je(e);return{active:e.activeTabId??"",chipTitle:"",focused:jm(e.id),mode:"tabs",preset:"",stripLabel:se(e),subject:"",tabs:a.flatMap((i)=>zt(e,i,e.tabOrder.indexOf(i),r)),trailing:M.get(e.id)===!0,trailingGlyph:"⌄",trailingTitle:"Show hidden tabs"}}function zt(e,t,a,r){let i=m.tabs.get(t);if(!i)return[];let o=wD(i);return[{dirty:i.doc.dirty,draft:o?.draft??!1,index:a,key:t,label:r.get(t)??"Untitled",origin:Boolean(i.session.openedFrom),pill:o?.text??"",pillTitle:o?.title??"",pinGlyph:i.pinned?"◉":"◎",pinTitle:i.pinned?"Unpin":"Pin",pinned:i.pinned,preview:i.preview,tabindex:t===e.activeTabId?"0":"-1",title:ia(i)}]}function Ut(e,t,a){let r=U.get(e);if(!r)r=new Map,U.set(e,r);r.get(a)?.();let i=Wr(Vr({element:t,canDrag({input:o}){let s=rx(o.clientX,o.clientY);return!(s instanceof Element&&s.closest('[part="pin"], [part="close"]'))},getInitialData(){return{paneId:F(e)?.id,tabId:a,type:"tab"}}}),qs({canDrop({source:o}){return Au(o.data)},element:t,getData({element:o,input:s}){let l=F(e);if(!l)return{type:"tab-slot-refused"};return me({index:l.tabOrder.indexOf(a),paneId:l.id,tabId:a,type:"tab-slot"},{allowedEdges:["left","right"],element:o,input:s})}}));r.set(a,i)}function Bt(e,t){oe.get(e)?.();let a=qs({canDrop({source:r}){return Au(r.data)},element:t,getData(){let r=F(e);return r?{index:r.tabOrder.length,paneId:r.id,type:"tab-slot"}:{type:"tab-slot-refused"}}});oe.set(e,a)}function Gt(e,t){if(t.mode!=="tabs"){$e(e);return}let a=new Set(t.tabs.map((i)=>i.key)),r=U.get(e);if(!r)return;for(let[i,o]of r)if(!a.has(i))o(),r.delete(i)}function ye(){let e=H?.kind==="tab"?H.tabId:"";for(let[t,a]of A){let r=k.get(t);if(!r)continue;let i=P!==null&&P.paneId===a.paneId;r.drag({dragKey:e,dropIndex:i&&P?P.index:-1,dropTail:i&&P?P.tail:!1})}}function qt(e,t){let a=k.get(t),r=a?.strip();if(!a||!r)return;let i=r.scrollWidth>r.clientWidth;if(i!==(M.get(e.id)===!0))M.set(e.id,i),a.update(Re(e))}function Kt(e,t){let a=F(e);if(!a)return;if(A.get(e)?.mode==="derivation"){rt("pane.unsplit",void 0,"Tabs");return}Qt(a,Je(a),t)}function Yt(e){if(e.ctrlKey)return;let t=e.currentTarget;if(!(t instanceof HTMLElement)||t.scrollWidth<=t.clientWidth)return;let a=Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY;if(!a)return;e.preventDefault(),t.scrollLeft+=a}function Zt(e=m.activePaneId){let t=m.panes.find((d)=>d.id===e),a=_.get(e),r=a?k.get(a)?.strip()??null:null;if(!t||!r)return[];let i=r.scrollLeft,o=i+r.clientWidth,s=[],l=te(t),c=[...r.querySelectorAll('[part="tab"]')];for(let[d,f]of c.entries()){let b=l[d];if(b&&(f.offsetLeft<i||f.offsetLeft+f.offsetWidth>o))s.push(b)}return s}function Se(){J?.close(),J=null}function Qt(e,t,a){Se();let r=Zt(e.id),i=r.length>0?r:te(e),o=He(a??document.body);J=Xt({label:"Hidden tabs",onClosed:(s)=>{if(J===s)J=null},opener:a,place:(s)=>({x:Math.max(4,o.right-s.width),y:o.bottom}),placement:"block-end span-inline-start",region:"tab-overflow",rows:i.map((s)=>({checked:s===e.activeTabId?"true":"false",destructive:!1,disabled:!1,dividerAbove:!1,id:s,run:()=>{Ht(s)},title:t.get(s)??"Untitled"}))})}var W=null;function _e(){W?.close(),W=null}function ea(e){let t={};if(Rc(e.documentPath))t.draft=!Hl(Pl(e));return t}function ta(e){let t=Object.entries(e),a=t.length===1?t[0]?.[1]:void 0;if(!Xe(a))return;return a?"false":"true"}function aa(e){let t=ae();if(!t)return[];let a=ea(e),r=[],i;for(let o of t.forPlacement("context/tab")){let s=o.args;if(!(s?.required??[]).every((x)=>(x in a)))continue;let l={};for(let x of Object.keys(s?.properties??{}))if(x in a)l[x]=a[x];let c=r.length>0&&o.group!==i;({group:i}=o);let d=t.disabledReason(o.id),f=ta(l),b={destructive:o.destructive===!0,dividerAbove:c,id:o.id,title:o.title};if(f!==void 0)b.checked=f;r.push(d===void 0?{...b,disabled:!1,run:()=>{En(t,o.id,l,"Tabs")}}:{...b,disabled:!0,requires:d})}return r}function na(e,t,a){_e(),Se(),Ht(e.id);let r=aa(e);if(r.length===0)return;W=Xt({label:"Tab actions",onClosed:(i)=>{if(W===i)W=null},origin:{x:t,y:a},region:"tab",rows:r})}function tm(e){let t=e.replace(/^\.\//,"");if(!t.startsWith("pages/"))return null;let r=t.slice(6).replace(/\.[^./]+$/,"").split("/").filter((i)=>i!=="");if(r.at(-1)==="index")r.pop();return`/${r.join("/")}`}function ra(e){let t=e.map((a)=>{let r=a.documentPath;if(!r)return{depth:0,fixed:!0,id:a.id,label:a.fallback,parts:[]};let i=tm(r);if(i!==null)return{depth:0,fixed:!0,id:a.id,label:i,parts:[]};let o=r.split("/").filter((s)=>s!==""&&s!==".");return{depth:1,fixed:!1,id:a.id,label:o.slice(-1).join("/")||r,parts:o}});for(;;){let a=new Map;for(let i of t){let o=a.get(i.label);if(o)o.push(i);else a.set(i.label,[i])}let r=!1;for(let i of a.values()){if(i.length<2)continue;for(let o of i){if(o.fixed||o.depth>=o.parts.length)continue;o.depth+=1,o.label=o.parts.slice(-o.depth).join("/"),r=!0}}if(!r)break}return new Map(t.map((a)=>[a.id,a.label]))}function Je(e){return ra(e.tabOrder.flatMap((t)=>{let a=m.tabs.get(t);return a?[{documentPath:a.documentPath,fallback:mm(a.id)??ev(a.id)??"Untitled",id:t}]:[]}))}function ia(e){let t=e.documentPath||mm(e.id)||ev(e.id)||"Untitled",a=e.session.openedFrom,r=a?.documentPath?`${t}
|
|
2
2
|
Opened from ${a.documentPath}`:t;return e.preview?`${r}
|
|
3
|
-
Preview — double-click to keep open`:r}function $d(e){let t=e.documentPath;if(!t)return fm(e.id)??"Untitled";return em(t)??t.split("/").at(-1)??t}function Je(e){let t=Jp(e);if(!e.doc.dirty&&!t)return!1;let a=Ln(e);if(!a.active)return!0;if(hv(e))return!0;if(t)return!0;return a.peers.filter((i)=>i.state.focusedPath===e.documentPath).length===0}function xe(e){if(hv(e))return`You have read access to this session, so "${$d(e)}" has changes that were never published and have nowhere to be saved. Closing discards them.`;if(Jp(e))return`"${$d(e)}" has text in its editor that the document could not be given — the `+"source does not parse, or a collaborator holds the source lock. Saving would write the file without it, so it is not offered. Closing discards that text.";return null}async function oa(e){let t=xe(e);if(t)return Ko("Changes Cannot Be Saved",t,{cancelLabel:"Keep Editing",confirmLabel:"Close Without Saving",destructive:!0});let a=await gC("Unsaved Changes",`"${$d(e)}" has unsaved changes.`,{discardLabel:"Close Without Saving"});if(a==="cancel")return!1;return a==="discard"||await Sp(e)}async function Jg(e){let t=m.tabs.get(e);if(!t)return;if(await Qd(t),!m.tabs.has(e))return;if(Je(t)&&!await oa(t))return;Zd(e)}async function oE(e){let t=[...m.tabs.values()];for(let c of t)await Qd(c);let a=[...m.tabs.values()].filter((c)=>Je(c));if(a.length===0)return!0;let r=a.length===1?`"${$d(a[0])}" has unsaved changes`:`${a.length} documents have unsaved changes`,i=a.filter((c)=>xe(c)!==null),o=a.filter((c)=>xe(c)===null),s=i.length===1?`"${$d(i[0])}"`:`${i.length} of them`;if(o.length===0)return Ko("Changes Cannot Be Saved",`${e} closes every open document, and ${r}. ${s} cannot be saved at all, so saving would leave work behind. Closing discards it.`,{cancelLabel:"Keep Editing",confirmLabel:"Close Without Saving",destructive:!0});let l=await gC("Unsaved Changes",i.length===0?`${e} closes every open document, and ${r}.`:`${e} closes every open document, and ${r}. ${s} cannot be saved at `+`all — saving writes the other ${o.length} and discards ${i.length===1?"that one":"those"}.`,{discardLabel:"Close Without Saving",saveLabel:i.length===0?"Save All":`Save ${o.length} of ${a.length}`});if(l==="cancel")return!1;if(l==="discard")return!0;for(let c of o)if(!await Sp(c))return!1;return!0}function Ve(e,t){if(!n(t)||t.trim()==="")return[...e];return[{attributes:{content:t,name:"description"},tagName:"meta"},...e]}function We(e,t,a){let r=e.doc.content.frontmatter,i=yh(e.documentPath,t),o=i?.schema,s=o?.properties,l=new Set(o?.required||[]),c=[];if(s){for(let[d,f]of Object.entries(s)){if(a.has(d))continue;c.push({entry:f,field:d,value:r[d]})}for(let[d,f]of Object.entries(r)){if(s[d]||d.startsWith("$")||a.has(d))continue;c.push({entry:{type:Xe(f)?"boolean":"string"},field:d,value:f})}}else for(let[d,f]of Object.entries(r)){if(d.startsWith("$")||a.has(d))continue;c.push({entry:{type:Xe(f)?"boolean":"string"},field:d,value:f})}return{collection:i,fields:c,hasSchema:Boolean(s),requiredFields:l}}function B(e){return n(e)?e:""}function sa(e){return{checked:!1,hasNote:!1,hasThumb:!1,isSet:!1,kind:"text",label:e,note:"",options:[],placeholder:"",thumb:"",value:""}}function Ue(e,t,a,r,i){let o=e.replaceAll(/([A-Z])/g," $1").replace(/^./,(d)=>d.toUpperCase()),s=sa(o+(r.has(e)?" *":""));s.isSet=a!==void 0&&a!==""&&a!==!1;let l=(d)=>String(d)||void 0,c=zu(t);if(c!==null){let d=B(a),f=_E(c,i.rerender);if(s.kind="select",s.value=d,f===null)return s.options=[{label:"Loading…",value:d}],{parse:l,row:s};if("error"in f)return s.kind="text",s.hasNote=!0,s.note=`Could not list ${c} entries — ${f.error}`,{parse:l,row:s};let b=d!==""&&!f.ids.includes(d);if(s.options=[{label:"—",value:""},...b?[{label:`${d} — not found`,value:d}]:[],...f.ids.map((w)=>({label:w,value:w}))],f.ids.length===0)s.hasNote=!0,s.note=`No ${c} entries yet.`;return{parse:l,row:s}}if(t.type==="boolean")return s.kind="boolean",s.checked=Boolean(a),{parse:(d)=>d===!0?!0:void 0,row:s};if(t.type==="array")return s.value=Array.isArray(a)?a.join(", "):B(a),s.placeholder="comma, separated",{parse:(d)=>{let f=String(d);return f?f.split(",").map((b)=>b.trim()).filter(Boolean):void 0},row:s};if(Array.isArray(t.enum))return s.kind="select",s.value=B(a),s.options=[{label:"—",value:""},...t.enum.map((d)=>({label:d,value:d}))],{parse:l,row:s};if(Ra(t.format)){let d=B(a);return s.kind="media",s.value=d,s.hasThumb=d!==""&&Js.has(on(d)),s.thumb=s.hasThumb?Kc(d):"",{parse:l,row:s}}if(t.type==="number")return s.kind="number",s.value=a===void 0?"":String(a),{parse:(d)=>{let f=String(d).trim(),b=Number(f);return f===""||Number.isNaN(b)?void 0:b},row:s};return s.value=B(a),s.placeholder=t.format==="date"?"YYYY-MM-DD":"",{parse:l,row:s}}var Be="https://fonts.googleapis.com/css2?",Ge=["https://fonts.googleapis.com","https://fonts.gstatic.com"];function Uy(e){return e?.tagName==="link"&&e.attributes?.rel==="stylesheet"&&n(e.attributes.href)&&e.attributes.href.startsWith(Be)}function Te(e){return e?.tagName==="link"&&e.attributes?.rel==="preconnect"&&n(e.attributes.href)&&Ge.includes(e.attributes.href)}function tD(e){let t=e.match(/family=([^&:]+)/);if(!t)return"";return decodeURIComponent(t[1].replaceAll("+"," "))}function nD(e){return`${Be}family=${encodeURIComponent(e).replaceAll("%20","+")}&display=swap`}function iD(e){for(let t of Ge)if(!e.some((r)=>r?.tagName==="link"&&r.attributes?.rel==="preconnect"&&r.attributes.href===t)){let r={href:t,rel:"preconnect"};if(t==="https://fonts.gstatic.com")r.crossorigin="";e.push({attributes:r,tagName:"link"})}}function oD(e){if(!e.some((a)=>Uy(a)))return e.filter((a)=>!Te(a));return e}var qe={$schema:"https://jxsuite.com/schema/v1",$id:"StudioPanelPage",$description:"The Inspector's Page tab (specs/studio.md §6), the former Navigator Page panel: everything the open document says about itself before anybody reads its body — its frontmatter, the layout it is poured into, its title, description, viewport and icon, its OpenGraph card, and the raw `$head` tags no structured control owns. ONE row vocabulary across the first four sections, told apart by `kind`, because a Title, a Layout picker and a schema-driven frontmatter field differ in what they COMMIT rather than in what they look like — and what they commit is `panels/head-panel.ts`'s decision, reached by the row's `key`. Nothing here knows what a `$head` entry is, which of them are managed, what a content collection is or that a page has a layout: the flow hands over sections whose every field is already a string and this draws them. The Custom Tags section is the one different shape — a read-only list plus the form that adds to it — because those rows are markup a reader is being SHOWN rather than a value they are editing.",tagName:"div",attributes:{part:"page"},style:{$description:"The eleven `.imports-*` and four `.head-*` rules in `styles/panels.css` plus the row vocabulary the panel used to borrow from `styles/inspector.css` (`.style-row`, `.style-row-label`, `.set-dot`) and `styles/overlays.css` (`.media-picker`, `.media-picker-thumb`). The borrowed ones are TRANSCRIBED rather than shared, because a document emits no class, so a class cannot style it, and the lit panels that still draw a `.style-row` go on owning those rules until they convert. Four token repairs travel with them. `--spectrum-font-size-50` resolved only inside `<sp-theme>` and a document is mounted outside it, so every rule that read it would silently have taken its 11px fallback and stopped following the theme; each is `--jx-text-sm` here, and the two bare `10px` literals are `--jx-text-xs`. `.imports-count` read `--text-hint`, a name NO stylesheet in this package defines — an unresolvable custom property makes the whole declaration invalid at computed-value time, so the count has been inheriting its colour rather than taking the one written for it, and it says `--fg-dim`, which is what it was drawing anyway. And `.head-section-body .style-row > sp-textfield` reached INSIDE another component to widen it, which a part cannot do and no longer has to: `[part=\"widget\"]` is the field itself. Two things changed on purpose. THE CLEAR DOT IS A BUTTON — it was a `<span>` with a click handler and no role, so a row's only route to clearing its value could not be reached from the keyboard at all. AND THE ADD FORM IS STATE, not three `ref()` handles read at submit time: a document binding writes only when the scope moves, so the flow states what each field holds and clearing one after a successful add is a real change the runtime carries back.",display:"block",overflowY:"auto",padding:"var(--jx-space-2)",fontFamily:"var(--jx-font-sans)",color:"var(--fg)",'& [part="section"]':{marginBottom:"var(--jx-space-4)"},'& [part="section-header"]':{$description:'The uppercase band every section opens with. It is the only thing that ever styled a section title, which is why `[part="title"]` carries no declaration of its own: the weight, the size, the colour and the letter-spacing are all inherited from here.',display:"flex",alignItems:"center",gap:"6px",padding:"6px 8px 2px",fontSize:"var(--jx-text-sm)",fontWeight:"600",color:"var(--fg-dim)",textTransform:"uppercase",letterSpacing:"0.5px"},'& [part="count"]':{fontWeight:"400",color:"var(--fg-dim)"},'& [part="seo-button"]':{$description:"The door to Search appearance, pushed to the right edge of the band so the section still reads as a heading and the button as its affordance. The band's own uppercasing and tracking stop here: this is a sentence, not a heading.",marginLeft:"auto",textTransform:"none",letterSpacing:"normal"},'& [part="body"]':{padding:"0 var(--jx-space-2)"},'& [part="row"]':{$description:"studio-ui-guidelines.md §4.1's standard form row, stacked: the label sits above a control that takes the whole width. `min-width: 0` is what keeps it honest in a 240px dock (studio-ui-guidelines.md §4.6) — a field refuses to shrink below its own min-content without it.",display:"flex",flexDirection:"column",alignItems:"stretch",gap:"2px",padding:"2px 0",minWidth:"0"},'& [part="row-label"]':{display:"flex",alignItems:"center",gap:"4px",fontSize:"var(--jx-text-xs)",color:"var(--fg-dim)"},'& [part="chip"]':{$description:"studio-ui-guidelines.md §4.2's set dot: a 6px accent dot, drawn only where the value is set on this document, that clears it when pressed. A real `button` — it is pressable, and it is the row's only keyboard route to clearing — stripped of the chrome a button brings so the row still reads as a label with a dot beside it.",width:"6px",height:"6px",padding:"0",border:"none",borderRadius:"50%",background:"var(--accent)",cursor:"pointer",flexShrink:"0"},'& [part="chip"]:hover':{background:"var(--danger)"},'& [part="chip"]:focus-visible':{outline:"var(--jx-focus-ring)",outlineOffset:"2px"},'& [part="row-name"]':{$description:"The visible label, `aria-hidden` in the markup: every control in the row carries the same words as its own accessible name, so a label node in the tree as well would have each field announced twice. That is the trade the kit's naming makes — a control names itself — and it is also why this row needs no minted ids.",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},'& [part="widget"]':{width:"100%",minWidth:"0"},'& [part="readout"]':{$description:"A derived value set as text in the field's place, monospaced because a URL is read character by character.",display:"block",padding:"2px 0",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontFamily:"var(--font-mono, monospace)",fontSize:"var(--jx-text-sm)"},'& [part="row-action"]':{alignSelf:"flex-start"},'& [part="note"]':{$description:"What the row could not find out — the entries of a referenced collection that is empty, or the reason listing it failed. A sentence under the control, in the row's own label size, so it reads as part of the field rather than as an error banner.",margin:"0",fontSize:"var(--jx-text-xs)",color:"var(--fg-dim)"},'& [part="media"]':{display:"flex",alignItems:"center",gap:"4px",minWidth:"0"},'& [part="media"] [part="widget"]':{flex:"1",minWidth:"0"},'& [part="thumb"]':{width:"24px",height:"24px",objectFit:"cover",borderRadius:"var(--radius)",border:"1px solid var(--border)",flexShrink:"0"},'& [part="list"]':{padding:"0 var(--jx-space-2)"},'& [part="tag-row"]':{display:"flex",alignItems:"center",gap:"4px",padding:"3px var(--jx-space-2)",borderRadius:"var(--radius)",fontSize:"var(--jx-text-sm)"},'& [part="tag-row"]:hover':{background:"var(--hover-bg)"},'& [part="tag-name"]':{fontWeight:"500",whiteSpace:"nowrap"},'& [part="tag-value"]':{$description:"What the tag says. It takes the row's slack and ellipses rather than wrapping, because a row is a line and a wrapped value would push the remove button off the one the eye is on. The `title` beside it is what makes the full text readable when it does.",flex:"1",minWidth:"0",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontFamily:"var(--font-mono, monospace)",fontSize:"var(--jx-text-xs)",color:"var(--fg-dim)"},'& [part="empty"]':{$description:"The compact teaching state, drawn here rather than by `panels/empty-state.ts`: that helper is a lit template, and a surface is a document or a lit template and never a mix. It keeps the compact variant's shape — left-aligned, above the add form that IS its action, so it offers no button of its own (empty-state rule 2's stated exception).",margin:"0",padding:"var(--jx-space-3) var(--jx-space-4)",maxWidth:"34ch",lineHeight:"1.5",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="add"]':{display:"flex",alignItems:"center",gap:"4px",padding:"var(--jx-space-2)"},'& [part="add"] [part="field"]':{flex:"1",minWidth:"0"},'& [part="tag-picker"]':{minWidth:"70px"}},children:[{$prototype:"Array",items:{$ref:"#/state/sections"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"section","data-section":"${$map.item.key}"},children:[{tagName:"div",attributes:{part:"section-header"},children:[{tagName:"span",attributes:{part:"title"},textContent:"${$map.item.title}"},{tagName:"div",attributes:{part:"seo-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasSeo"},cases:{true:{tagName:"jx-action-button",attributes:{part:"seo-button"},$props:{size:"sm",quiet:!0,label:"Search appearance",hint:"Preview how this page appears in search and when shared"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openSeo"},value:[]}]},children:[{tagName:"span",textContent:"Search appearance…"}]}}}]},{tagName:"div",attributes:{part:"body"},children:[{$prototype:"Array",items:{$ref:"$map/item/rows"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"row","data-prop":"${$map.item.prop}"},children:[{tagName:"div",attributes:{part:"row-label"},children:[{tagName:"div",attributes:{part:"chip-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/isSet"},cases:{true:{tagName:"button",attributes:{part:"chip",type:"button",title:"${$map.item.clearLabel}","aria-label":"${$map.item.clearLabel}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/clear"},value:[{$ref:"$map/item/key"}]}]}}}},{tagName:"span",attributes:{part:"row-name","aria-hidden":"true"},textContent:"${$map.item.label}"}]},{tagName:"div",attributes:{part:"widget-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/kind"},cases:{text:{tagName:"jx-textfield",attributes:{part:"widget"},$props:{size:"sm",label:"${$map.item.label}",placeholder:{$ref:"$map/item/placeholder"},value:{$ref:"$map/item/value"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commitText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},textarea:{tagName:"jx-textfield",attributes:{part:"widget"},$props:{size:"sm",multiline:!0,rows:3,label:"${$map.item.label}",placeholder:{$ref:"$map/item/placeholder"},value:{$ref:"$map/item/value"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commitText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},number:{tagName:"jx-number-field",attributes:{part:"widget"},$props:{size:"sm",label:"${$map.item.label}",value:{$ref:"$map/item/value"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setNumber"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},boolean:{tagName:"jx-checkbox",attributes:{part:"widget"},$props:{size:"sm",label:"${$map.item.label}",checked:{$ref:"$map/item/checked"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setBoolean"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/checked"}]}]}},readout:{$description:"A value the document derives rather than stores, such as a page's URL, which is its file's place under `pages/`. Shown, never edited here: an editable URL would be a rename, and a rename is the file tree's.",tagName:"output",attributes:{part:"readout","aria-label":"${$map.item.label}"},textContent:"${$map.item.value}"},select:{tagName:"jx-select",attributes:{part:"widget"},$props:{size:"sm",label:"${$map.item.label}",options:{$ref:"$map/item/options"},value:{$ref:"$map/item/value"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setChoice"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},media:{tagName:"div",attributes:{part:"media"},children:[{tagName:"div",attributes:{part:"thumb-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasThumb"},cases:{true:{tagName:"img",attributes:{part:"thumb",src:"${$map.item.thumb}",alt:""}}}},{tagName:"jx-textfield",attributes:{part:"widget"},$props:{size:"sm",label:"${$map.item.label}",placeholder:"/image.jpg",value:{$ref:"$map/item/value"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commitText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},{tagName:"jx-action-button",attributes:{part:"upload"},$props:{size:"sm",quiet:!0,icon:"upload-simple",label:"Upload media",hint:"Upload media"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/upload"},value:[{$ref:"$map/item/key"}]}]}},{tagName:"jx-action-button",attributes:{part:"browse"},$props:{size:"sm",quiet:!0,icon:"image",label:"Browse media",hint:"Browse media"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/browse"},value:[{$ref:"$map/item/key"},{$ref:"event#/currentTarget"}]}]}}]}}},{tagName:"div",attributes:{part:"action-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasAction"},cases:{true:{$description:"The row's one door elsewhere, named for what it opens: the Layout row's Edit template opens the layout in Design.",tagName:"jx-button",attributes:{part:"row-action"},$props:{size:"sm",variant:"secondary"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/runRowAction"},value:[{$ref:"$map/item/key"}]}]},children:[{tagName:"span",textContent:"${$map.item.action}"}]}}},{tagName:"div",attributes:{part:"note-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasNote"},cases:{true:{tagName:"p",attributes:{part:"note"},textContent:"${$map.item.note}"}}}]}}]}]}},{tagName:"div",attributes:{part:"section","data-section":"custom"},children:[{tagName:"div",attributes:{part:"section-header"},children:[{tagName:"span",attributes:{part:"title"},textContent:"Custom Tags"},{tagName:"span",attributes:{part:"count"},textContent:"${state.customCount}"}]},{tagName:"div",attributes:{part:"custom-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/customState"},cases:{empty:{tagName:"p",attributes:{part:"empty"},textContent:"Custom tags add your own meta, link and script elements to this page — analytics, verification, a webfont. Add one below."},listed:{tagName:"div",attributes:{part:"list"},children:[{$prototype:"Array",items:{$ref:"#/state/customEntries"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"tag-row","data-tag":"${$map.item.key}"},children:[{tagName:"span",attributes:{part:"tag-name",title:"${$map.item.value}"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"tag-value"},textContent:"${$map.item.value}"},{tagName:"jx-action-button",attributes:{part:"remove"},$props:{icon:"x",size:"sm",quiet:!0,label:"${$map.item.removeLabel}",hint:"Remove"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/removeEntry"},value:[{$ref:"$map/item/key"}]}]}}]}}]}}},{tagName:"div",attributes:{part:"add","data-add":"tag"},children:[{tagName:"jx-select",attributes:{part:"tag-picker","data-field":"tag"},$props:{size:"sm",label:"Tag",options:{$ref:"#/state/tagOptions"},value:{$ref:"#/state/addTag"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editTag"},value:[{$ref:"event#/target/value"}]}]}},{tagName:"jx-textfield",attributes:{part:"field","data-field":"attr"},$props:{size:"sm",label:"Attribute",placeholder:"Attribute (e.g. name)",value:{$ref:"#/state/addAttr"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editAttr"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/addEntry"},value:[]}]}}]}},{tagName:"jx-textfield",attributes:{part:"field","data-field":"value"},$props:{size:"sm",label:"Value",placeholder:"Value",value:{$ref:"#/state/addValue"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editValue"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/addEntry"},value:[]}]}}]}},{tagName:"jx-action-button",attributes:{part:"add-button","data-add":"tag"},$props:{icon:"plus",size:"sm",quiet:!0,label:"Add tag",hint:"Add tag"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/addEntry"},value:[]}]}}]}]}]};T("panel-page",qe);function Ke(e,t){e.sections=t.sections,e.customCount=t.customCount,e.customState=t.customState,e.customEntries=t.customEntries,e.addTag=t.addTag,e.addAttr=t.addAttr,e.addValue=t.addValue,e.tagOptions=t.tagOptions}function da(){return{addAttr:"",addTag:"",addValue:"",customCount:"0",customEntries:[],customState:"empty",sections:[],tagOptions:[]}}var G=new WeakMap;function Ye(e,t,a){let r=G.get(e);if(r&&(r.handle===null||r.handle.root.isConnected)){Ke(r.scope,t);return}r?.handle?.dispose(),e.textContent="";let i=g({...da(),...a});Ke(i,t);let o={handle:null,scope:i};G.set(e,o),R("panel-page",i,e).then((s)=>{if(G.get(e)!==o){s.dispose();return}o.handle=s})}function ce(e){let t=G.get(e);if(!t)return;G.delete(e),t.handle?.dispose(),e.textContent=""}var Ze={$schema:"https://jxsuite.com/schema/v1",$id:"StudioEmptyState",$description:"The one empty-state pattern (studio-ui-guidelines.md §11), as the document every region draws it from. Nine surfaces had already copied it into their own JSON — the Source Control panel's (since folded into `publish-workspace.json`), `logic-panel.json`, `panel-outline.json` and the rest each carry a `[part=\"empty\"]` block written from the same rules — because `panels/empty-state.ts` is a lit template a document cannot call. This is the copy those were waiting for: the region that has NO document of its own hands its box to this one instead of rendering the helper, so a shell with three surfaces still lit and eight converted has one empty state rather than two. The copy rules stay where they are stated, in `panels/empty-state.ts`'s header: one sentence saying what the region is FOR, the action that fills it, and one shared verb across equivalent surfaces. Nothing here decides any of them — the adapter is handed a message, an optional second sentence and a list of buttons, and this draws exactly that.",tagName:"div",attributes:{part:"empty","data-compact":"${state.compact ? '' : null}"},style:{$description:"What `.empty-state`, `.empty-state--teach`, `.empty-state-message`, `.empty-state-detail`, `.empty-state-actions`, `.empty-state-action` and the `--compact` pair said across `styles/overlays.css` and `styles/panels.css`, keyed on `part`. Neither stylesheet loses its rules: `ui/expression-editor.ts` still renders the lit helper for its own compact state, so this is a copy until that surface converts. Two values did not travel. `.empty-state`'s `font-size: 13px` was a number nothing else in the shell uses and is the kit's `--jx-text-md`; `.empty-state-detail`'s `var(--spectrum-font-size-50, 11px)` resolves only inside `<sp-theme>`, and a document mounted into a Navigator body or a canvas stage is outside it, so it would silently have taken its hard-coded fallback on every paint — it is `--jx-text-sm`, which is the step it was.",display:"flex",flexDirection:"column",alignItems:"center",gap:"var(--jx-space-3)",padding:"var(--jx-space-6)",textAlign:"center",color:"var(--fg-dim)",fontSize:"var(--jx-text-md)",'& [part="empty-message"]':{margin:"0",maxWidth:"34ch",lineHeight:"1.5"},'& [part="empty-detail"]':{$description:"The second sentence: where the region's content comes from. Dimmer than the first, because the first is the one a reader has to take in.",margin:"0",maxWidth:"34ch",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)",opacity:"0.8"},'& [part="empty-actions"]':{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:"var(--jx-space-3)"},'& [part="empty-action"]':{flex:"none"},"&[data-compact]":{$description:"An inline section inside an otherwise populated panel — tighter and left-aligned, because it sits directly above its own add form rather than filling a region on its own.",alignItems:"flex-start",gap:"var(--jx-space-2)",padding:"var(--jx-space-3) var(--jx-space-4)",textAlign:"left",fontSize:"var(--jx-text-sm)"},'&[data-compact] [part="empty-actions"]':{justifyContent:"flex-start"}},children:[{tagName:"p",attributes:{part:"empty-message"},textContent:"${state.message}"},{tagName:"div",attributes:{part:"empty-detail-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasDetail"},cases:{true:{tagName:"p",attributes:{part:"empty-detail"},textContent:"${state.detail}"}}},{tagName:"div",attributes:{part:"empty-actions-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasActions"},cases:{true:{tagName:"div",attributes:{part:"empty-actions"},children:[{$prototype:"Array",items:{$ref:"#/state/actions"},key:{$ref:"$map/item/id"},map:{tagName:"jx-button",attributes:{part:"empty-action"},$props:{size:"sm",variant:"secondary",disabled:{$ref:"$map/item/disabled"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/runAction"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",textContent:"${$map.item.label}"}]}}]}}}]};T("empty-state",Ze);function pa(e){let t=document.createElement("div");t.style.display="contents";let a=[],r=g({...Qe(e),runAction:(s)=>{a[Number(s)]?.()}});a=et(e);let i=null,o=!1;return R("empty-state",r,t).then((s)=>{if(o){s.dispose();return}i=s}),{dispose(){o=!0,i?.dispose(),i=null,t.replaceChildren()},host:t,update(s){a=et(s),Object.assign(r,Qe(s))}}}function Qe(e){let t=e.actions??[];return{actions:t.map((a,r)=>({disabled:Boolean(a.disabled),id:String(r),label:a.label})),compact:Boolean(e.compact),detail:e.detail??"",hasActions:t.length>0,hasDetail:(e.detail??"")!=="",message:e.message}}function et(e){return(e.actions??[]).map((t)=>t.run)}var tt=new WeakMap;function Mu(e,t){let a=tt.get(e);if(a)return a.update(t),a.host;let r=pa(t);return tt.set(e,r),r.host}var at={$schema:"https://jxsuite.com/schema/v1",$id:"StudioEntryInspector",$description:"The Inspector's Entry tab (specs/studio.md §6, §22.5): one collection entry's own settings while it is written on the canvas, the Content-Entry board's sidebar. Its status (draft or published), its fields as the collection's schema types them, the URL its collection page publishes it at, and the file it is stored in. `content/entry-inspector.ts` keeps every decision; the field form is an island it fills, `ui/schema-form.ts`'s, the same form the form-only entry editor draws.",tagName:"div",attributes:{part:"entry","data-jx-region":"${state.region}"},style:{$description:"A column of sections, each a small uppercase heading over its rows, like the Page tab beside it.",display:"flex",flexDirection:"column",gap:"var(--jx-space-4)",padding:"var(--jx-space-3)",fontFamily:"var(--jx-font-sans)",fontSize:"var(--jx-text-md)",color:"var(--fg)",'& [part="section"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-2)"},'& [part="section-title"]':{margin:"0",fontSize:"var(--jx-text-sm)",fontWeight:"700",letterSpacing:"0.06em",textTransform:"uppercase",color:"var(--fg-dim)"},'& [part="head"]':{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:"var(--jx-space-2)"},'& [part="kind"]':{fontWeight:"600"},'& [part="status"]':{fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="status"][data-draft="true"]':{color:"var(--warning)"},'& [part="note"]':{margin:"0",fontSize:"var(--jx-text-sm)",lineHeight:"1.5",color:"var(--fg-dim)"},'& [part="url"]':{fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)",wordBreak:"break-all"},'& [part="path"]':{fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)",color:"var(--fg)",wordBreak:"break-all"},'& [part="fields-head"]':{display:"flex",alignItems:"center",justifyContent:"space-between"}},children:[{tagName:"section",attributes:{part:"section","aria-labelledby":"entry-inspector-entry"},children:[{tagName:"div",attributes:{part:"head"},children:[{tagName:"h3",attributes:{part:"section-title",id:"entry-inspector-entry"},textContent:"Entry"},{tagName:"span",attributes:{part:"status","data-draft":"${state.draft ? 'true' : 'false'}"},textContent:"${state.status}"}]},{tagName:"span",attributes:{part:"kind"},textContent:"${state.kind}"},{tagName:"div",attributes:{part:"draft-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/draftAxis"},cases:{shown:{$description:"The entry's draft state, the one field every collection with a draft workflow shares (site-architecture.md §7.6). A setter: the switch names the state it reaches.",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:"section",attributes:{part:"section","aria-labelledby":"entry-inspector-fields"},children:[{tagName:"div",attributes:{part:"fields-head"},children:[{tagName:"h3",attributes:{part:"section-title",id:"entry-inspector-fields"},textContent:"Fields"},{tagName:"jx-action-button",attributes:{part:"edit-fields"},$props:{size:"sm",quiet:!0,hint:"Edit this collection's fields in Project Settings",haspopup:"dialog"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openFields"},value:[]}]},children:[{tagName:"span",textContent:"Edit"}]}]},{tagName:"div",attributes:{part:"fields-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/fieldsState"},cases:{form:{tagName:"div",attributes:{part:"fields"}},none:{tagName:"p",attributes:{part:"note"},textContent:"This collection declares no fields. Edit adds some in Project Settings."}}}]},{tagName:"section",attributes:{part:"section","aria-labelledby":"entry-inspector-page"},children:[{tagName:"div",attributes:{part:"fields-head"},children:[{tagName:"h3",attributes:{part:"section-title",id:"entry-inspector-page"},textContent:"Page"},{$description:"The door to Search appearance, the same `document.openSeo` the Page tab's button runs: an entry's search title, description and social image are its frontmatter too (studio.md §4.2).",tagName:"jx-action-button",attributes:{part:"seo-button"},$props:{size:"sm",quiet:!0,label:"Search appearance",hint:"Preview how this entry appears in search and when shared",haspopup:"dialog"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openSeo"},value:[]}]},children:[{tagName:"span",textContent:"Search appearance…"}]}]},{tagName:"div",attributes:{part:"url-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/urlState"},cases:{shown:{tagName:"code",attributes:{part:"url"},textContent:"${state.url}"},none:{tagName:"p",attributes:{part:"note"},textContent:"Entries of this collection have no page of their own."},unlisted:{$description:"The collection has a page, but the page lists the ids it publishes (`$paths.values`) and this entry is not one of them: naming a URL the build never writes would be a link to nothing.",tagName:"p",attributes:{part:"note"},textContent:"Not published: this collection's page lists the entries it publishes, and this is not one of them."},loading:{tagName:"p",attributes:{part:"note"},textContent:"Finding the page this entry is published at…"}}},{tagName:"p",attributes:{part:"note"},children:[{tagName:"span",textContent:"Stored as "},{tagName:"code",attributes:{part:"path"},textContent:"${state.path}"},{tagName:"span",textContent:"${state.storage}"}]}]}]};T("entry-inspector",at);function ma(e,t){e.region=t.region,e.kind=t.kind,e.status=t.status,e.draftAxis=t.draftAxis,e.draft=t.draft,e.draftHint=t.draftHint,e.fieldsState=t.fieldsState,e.urlState=t.urlState,e.url=t.url,e.path=t.path,e.storage=t.storage}function fa(e){let t=n(e)?void 0:e.attributes?.part;return n(t)?t:""}function nt(e,t,a,r){e.replaceChildren();let i=g({...t,...a}),o=null,s=!1,l=R("entry-inspector",i,e,{onNodeCreated:(c,d,f)=>{if(!s&&c instanceof HTMLElement&&fa(f)==="fields")r.fieldsSlot(c)}}).then((c)=>{if(s)c.dispose();else o=c;return c});return{attached:()=>{if(s)return!1;let c=o?.root;return c===void 0?!0:e.contains(c)},dispose(){s=!0,o?.dispose(),o=null},ready:l,update:(c)=>ma(i,c)}}var ha="inspector/entry";function ot(e){let t=Un(e?.documentPath);return t!==null&&!t.fileBacked}function st(e){let t=e.documentPath??"",r=Un(t)?.name??"",i=wa(r),o=Fl(e),s=Oc(i?.schema,o),l=Bl(o),c=r===""?null:th(r,jc(t)),d=c?RS(c,t,o):null,f=t.endsWith(".json");return{draft:l,draftAxis:s?"shown":"hidden",draftHint:wp,fieldsState:i?.schema?"form":"none",kind:Sb(Vl(r)?.item??"entry"),path:t,region:ha,status:s?l?"Draft":"Published":"",storage:f?". Its fields are the file itself.":". Fields are its frontmatter, and the body is its Markdown.",url:d??"",urlState:c===void 0?"loading":d?"shown":c?"unlisted":"none"}}var y=null;function lt(e,t){let a=wa(Un(t.documentPath)?.name??"");if(!e.formHost||!a?.schema)return;let r=Fl(t),i=jl("entry-inspector",NE(a.schema,a.schema,r),r,{context:RE(t),errors:DE(a,r),onChange:(o)=>q_(t,o),rerender:e.redraw,ui:IE(a.schema)});if(i.parentNode!==e.formHost)e.formHost.replaceChildren(i)}function it(e,t){let a=st(t);if(a.fieldsState==="none")e.formHost=null;e.handle.update(a),lt(e,t)}function q(e){if(!y||e!==void 0&&y.host!==e)return;y.unlisten(),y.scope.stop(),y.handle.dispose(),y=null}function dt(e,t){if(y&&y.host===e&&y.tabId===t.id&&y.handle.attached()){it(y,t);return}q();let a=ge(),r=()=>{if(y===i)it(i,t)},i={formHost:null,handle:nt(e,st(t),{openFields:()=>{let o=Un(t.documentPath)?.name;rt("settings.open",o?{entry:o,section:"content"}:{section:"content"},"Entry")},openSeo:()=>{rt("document.openSeo",void 0,"Entry")},setDraft:(o)=>ib(t,o)},{fieldsSlot:(o)=>{if(y===i)i.formHost=o,lt(i,t)}}),host:e,redraw:r,scope:a,tabId:t.id,unlisten:kp(r)};y=i,a.run(()=>{ne(()=>{t.doc.document,t.doc.content.frontmatter,x?.projectConfig?.content,r()})})}var O=null;async function rE(){try{O=(await p().listDirectory("layouts")).filter((a)=>a.type==="file"&&a.name.endsWith(".json")).map((a)=>({name:a.name.replace(/\.json$/,"").replaceAll(/[-_]+/g," ").replaceAll(/\b\w/g,(r)=>r.toUpperCase()),path:`./layouts/${a.name}`}))}catch{O=[]}return O}async function ga(){await rE(),xn("rightPanel","seoModal")}function qy(){O=null,Ha()}function ba(){if(O===null)ga();return O}var Gy=[{attr:"name",key:"description",label:"Description"},{attr:"name",key:"viewport",label:"Viewport"}],Ky=[{attr:"property",key:"og:title",label:"Title"},{attr:"property",key:"og:description",label:"Description",multiline:!0},{attr:"property",key:"og:image",label:"Image",media:!0},{attr:"property",key:"og:type",label:"Type"}],ct=new Set([...Gy,...Ky].map((e)=>e.key)),pt=new Set(["title"]);function ya(e){return He(e)?new Set([...pt,"description"]):pt}function sE(e){let t=Jy(e.$head??[],"name","description");if(t)return String(t.attributes?.content??"");return n(e.description)?e.description:""}function N_(e,t){if(!Jy(e.$head??[],"name","description")&&n(e.description)){if(t)e.description=t;else delete e.description;return}Yy(e,"name","description",t)}function Jy(e,t,a){return e.find((r)=>r?.tagName==="meta"&&r.attributes?.[t]===a)}function aE(e,t){return e.find((a)=>a?.tagName==="link"&&a.attributes?.rel===t)}function va(e){if(!e?.tagName)return!1;if(e.tagName==="meta"){let t=String(e.attributes?.name??""),a=String(e.attributes?.property??"");return Boolean(t&&ct.has(t))||Boolean(a&&ct.has(a))}if(e.tagName==="link"&&e.attributes?.rel==="icon")return!0;return!1}function Yy(e,t,a,r){if(!e.$head)e.$head=[];let i=e.$head.findIndex((o)=>o?.tagName==="meta"&&o.attributes?.[t]===a);if(r){let o={attributes:{[t]:a,content:r},tagName:"meta"};if(i!==-1)e.$head[i]=o;else e.$head.push(o)}else if(i!==-1)e.$head.splice(i,1)}function A_(e,t,a){if(!e.$head)e.$head=[];let r=e.$head.findIndex((i)=>i?.tagName==="link"&&i.attributes?.rel===t);if(a){let i={attributes:{href:a,rel:t},tagName:"link"};if(r!==-1)e.$head[r]=i;else e.$head.push(i)}else if(r!==-1)e.$head.splice(r,1)}function xa(e){if(!e?.tagName)return"unknown";let t=e.attributes??{};if(t.name)return`<meta name="${String(t.name)}">`;if(t.property)return`<meta property="${String(t.property)}">`;if(t.rel&&t.href)return`<link rel="${String(t.rel)}">`;if(t.src)return`<script src="${String(t.src)}">`;if(t.charset)return`<meta charset="${String(t.charset)}">`;return`<${e.tagName}>`}function $a(e){let t=e?.attributes??{};return String(t.content??t.href??t.src??e?.textContent??"")}var bt="Jx Site",yt={donor:null,source:"none",value:""};function ke(e,t,a){let r=null;for(let i of e)if(i?.tagName==="meta"&&i.attributes?.[t]===a)r=String(i.attributes.content??"");return r}function K(e,t,a){let r=ke(e.page,t,a);if(r!==null)return{donor:null,source:"page",value:r};let i=ke(e.layout,t,a);if(i!==null)return{donor:e.layoutName??"the layout",source:"layout",value:i};let o=ke(e.site,t,a);if(o!==null)return{donor:"Site head",source:"site",value:o};return yt}function Sa(e,t){let a=e.trim();if(a)return{donor:null,source:"page",value:a};let r=t?.trim();if(r)return{donor:"Site name",source:"site",value:r};return{donor:"the build",source:"build",value:bt}}function Ta(e,t){let a=e??"",r=a.split("/").filter((s)=>s!=="");if(!t||e===null)return{crumb:a||"/",host:"",href:null};let i;try{i=new URL(a,t)}catch{return{crumb:a||"/",host:"",href:null}}let{host:o}=i;return{crumb:[o,...r].join(" › "),host:o,href:i.href}}var xt=new Map([["description",160],["og:description",200],["og:title",60],["title",60]]),ka=new Intl.Segmenter("en-US",{granularity:"grapheme"});function lE(e){let t=0;for(let a of ka.segment(e))t+=1;return t}var ut="Search appearance";function aD(e,t){ul((a)=>a.source===ut);for(let a of e.warnings){let r={action:"document.openSeo",key:`seo.${a.id}`,source:ut,tier:"problem"};if(t!==void 0)r.path=t;C.warn(a.message,r)}return e.warnings.length}function Yg(e,t){return e.fields.find((a)=>a.key===t)??{...yt,key:t,label:t,limit:xt.get(t)??null}}function Ea(e){return[...e.site,...e.layout,...e.page].some((t)=>t?.tagName==="title")}function Pa(e,t){let a=[],r=(o)=>e.fields.find((s)=>s.key===o);if(r("title")?.source==="build")a.push({field:"title",id:"title-missing",message:`Neither this page nor the project names a title, so the build ships “${bt}”.`});if(r("description")?.value.trim()==="")a.push({field:"description",id:"description-missing",message:"No description reaches this page from the site, its layout or the page itself — a "+"result row shows whatever text the engine picks instead."});if(r("og:title")?.value.trim()==="")a.push({field:"og:title",id:"og-title-missing",message:"No og:title — a shared link carries no headline of its own."});if(r("og:description")?.value.trim()==="")a.push({field:"og:description",id:"og-description-missing",message:"No og:description — a shared link carries no summary of its own."});if(r("og:image")?.value.trim()==="")a.push({field:"og:image",id:"og-image-missing",message:"No og:image — a shared link renders as a text-only card."});for(let o of e.fields){let s=lE(o.value);if(o.limit!==null&&s>o.limit){let l=o.key.endsWith("description")?"summaries":"headlines";a.push({field:o.key,id:`${o.key}-long`,message:`${o.label} is ${s} characters; ${l} are cut near ${o.limit}.`})}}if(e.url.href===null)a.push({field:"url",id:"site-url-missing",message:"Project Settings names no site URL, so the build emits no canonical link and no og:url."});if(Ea(t))a.push({field:"title",id:"head-title-ignored",message:"A <title> element in $head is discarded — the build writes the title from the "+"document's own title property."});return a}function Na(e,t){let a=(s,l,c)=>({...c,key:s,label:l,limit:xt.get(s)??null}),r=[a("title","Title",Sa(t.pageTitle,t.siteName)),a("description","Description",K(e,"name","description")),a("og:title","Social title",K(e,"property","og:title")),a("og:description","Social description",K(e,"property","og:description")),a("og:image","Social image",K(e,"property","og:image")),a("og:type","Social type",K(e,"property","og:type"))],i=Ta(t.route,t.siteUrl),o={fields:r,url:i};return{...o,warnings:Pa(o,e)}}var Pe=null,Ne=[],X=null;function Ha(){Pe=null,Ne=[],X=null}async function Ia(e){if(X===e)return;X=e;let t=await Qw(e);if(X!==e)return;X=null,Pe=e,Ne=t?.$head??[],xn("seoModal")}function wt(e){return e.replace(/^\.\//,"").replace(/^layouts\//,"").replace(/\.json$/,"").replaceAll(/[-_/]+/g," ").replaceAll(/\b\w/g,(t)=>t.toUpperCase())||e}function ja(e,t){let a=He(e)?ol(t):null;if(a===null)return{entries:[],name:null};let r=wt(a);if(a===Pe)return{entries:Ne,name:r};return Ia(a),{entries:[],name:r}}function cE(e,t){let a=x?.projectConfig,r=ja(e,t.$layout),i=e?.documentPath,o={pageTitle:n(t.title)?t.title:"",route:i?em(i):null};if(a?.name!==void 0)o.siteName=a.name;if(a?.url!==void 0)o.siteUrl=a.url;return Na({layout:r.entries,layoutName:r.name,page:Ve(t.$head??[],t.description),site:a?.$head??[]},o)}function He(e){let t=e?.documentPath;return Boolean(t&&x?.isSiteProject&&(t.startsWith("pages/")||t.startsWith("./pages/")))}function O_(e,t){let a={...e};if(t.title!==void 0)a.title=t.title;if(n(t.description))a.description=t.description;if(n(t.$layout)||t.$layout===!1)a.$layout=t.$layout;if(t.$head!==void 0)a.$head=t.$head;return a}function dE(e,t,a){if(!e)return;let r=e.doc.content.frontmatter,i=O_({},r).$head,o={};if(n(r.title))o.title=r.title;if(n(r.description))o.description=r.description;if(i)o.$head=[...i];if(n(r.$layout)||r.$layout===!1)o.$layout=r.$layout;a(o);let s=o.$head&&o.$head.length>0?o.$head:void 0,l=o.$layout!==r.$layout,c=o.title!==r.title,d=n(r.description)&&o.description!==r.description,f=JSON.stringify(s)!==JSON.stringify(i);if(l||c||d||f)Y(e,(b)=>{if(l)Kd(b,"$layout",n(o.$layout)||o.$layout===!1?o.$layout:void 0);if(c)Kd(b,"title",o.title);if(d)Kd(b,"description",n(o.description)?o.description:void 0);if(f)Kd(b,"$head",s)});t()}var E=null,N=null,ue="meta",Q="",ee="",S=new Map,Ie=new Map;function Ma(e){let t=e?.documentPath?em(e.documentPath):null;if(t===null)return null;return{...j("__url","url","URL"),kind:"readout",value:t}}var Ee=new Map,D=new Map,Ca=[{label:"meta",value:"meta"},{label:"link",value:"link"},{label:"script",value:"script"}];function j(e,t,a){return{action:"",checked:!1,clearLabel:`Clear ${t}`,hasAction:!1,hasNote:!1,hasThumb:!1,isSet:!1,key:e,kind:"text",label:a,note:"",options:[],placeholder:"",prop:t,thumb:"",value:""}}function $t(e,t){e.hasThumb=t!==""&&Js.has(on(t)),e.thumb=e.hasThumb?Kc(t):""}function Fa(e,t){let a=n(e.title)?e.title:"";return S.set("title",{images:!1,clear:()=>t((r)=>{delete r.title}),commit:(r)=>t((i)=>{let o=String(r).trim();if(o)i.title=o;else delete i.title})}),{...j("title","title","Title"),clearLabel:"Clear title",isSet:Boolean(a),placeholder:"Page title…",value:a}}function mt(e,t,a){let r=String(Jy(t,e.attr,e.key)?.attributes?.content??""),i=`meta:${e.attr}:${e.key}`;S.set(i,{images:e.media===!0,clear:()=>a((s)=>Yy(s,e.attr,e.key,"")),commit:(s)=>a((l)=>Yy(l,e.attr,e.key,e.media?String(s):String(s).trim()))});let o=j(i,e.key,e.label);if(o.isSet=Boolean(r),o.value=r,e.media)return o.kind="media",$t(o,r),o;return o.kind=e.multiline?"textarea":"text",o.placeholder=e.key==="viewport"?"width=device-width, initial-scale=1":`${e.label}…`,o}function Aa(e,t){let a=sE(e),r="meta:name:description";S.set("meta:name:description",{images:!1,clear:()=>t((o)=>N_(o,"")),commit:(o)=>t((s)=>N_(s,String(o).trim()))});let i=j("meta:name:description","description","Description");return i.isSet=Boolean(a),i.value=a,i.kind="text",i.placeholder="Description…",i}function Oa(e,t){let a=String(aE(e,"icon")?.attributes?.href??"");S.set("link:icon",{images:!0,clear:()=>t((i)=>A_(i,"icon","")),commit:(i)=>t((o)=>A_(o,"icon",String(i)))});let r=j("link:icon","icon","Icon");return r.isSet=Boolean(a),r.kind="media",r.value=a,$t(r,a),r}function La(e,t,a){if(!He(e))return null;let r=ba();if(r===null)return null;let i=t.$layout,o=x?.projectConfig?.defaults?.layout,s=o?wt(o):"";S.set("__layout",{images:!1,clear:()=>a((d)=>{delete d.$layout}),commit:(d)=>{let f=String(d);a((b)=>{if(f==="__default__")delete b.$layout;else if(f==="__none__")b.$layout=!1;else b.$layout=f}),eA()}});let l=j("__layout","layout","Layout");l.kind="select",l.isSet=i!==void 0,l.options=[{label:s?`Default (${s})`:"Default",value:"__default__"},{label:"None",value:"__none__"},...r.map((d)=>({label:d.name,value:d.path}))],l.value=i===!1?"__none__":i||"__default__";let c=ol(i);if(c)l.action="Edit template",l.hasAction=!0,Ie.set("__layout",()=>{(le("rcn56qvm"),import("./files-rcn56qvm.js")).then(({openFileInTab:d})=>d(c.replace(/^\.\//,"")))});return{hasSeo:!1,key:"layout",rows:[l],title:"Layout"}}function Da(e){if(!e||e.doc.mode!=="content")return null;let{collection:t,fields:a,hasSchema:r,requiredFields:i}=We(e,x?.projectConfig,ya(e));if(a.length===0&&!r)return null;return{hasSeo:!1,key:"frontmatter",rows:a.map((s)=>{let l=`fm:${s.field}`,{parse:c,row:d}=Ue(s.field,s.entry,s.value,i,{rerender:L});return S.set(l,{images:d.kind==="media"&&s.entry.format==="image",clear:()=>Y(e,(f)=>Kd(f,s.field)),commit:(f)=>Y(e,(b)=>Kd(b,s.field,c(f)))}),Object.assign(j(l,s.field,d.label),d,{clearLabel:`Clear ${s.field}`})}),title:t?`Frontmatter (${t.name})`:"Frontmatter"}}function _a(e){Ee.clear();let t=[];for(let a of e){if(va(a)||Uy(a)||Te(a))continue;let r=`tag:${t.length}`;Ee.set(r,a);let i=xa(a);t.push({key:r,label:i,removeLabel:`Remove ${i}`,value:$a(a)})}return t}function Ja(e){S.clear(),Ie.clear();let t=u.value,a=e.document,r=a.$head??[],i=[],o=Da(t);if(o)i.push(o);let s=La(t,a,e.applyMutation);if(s)i.push(s);let l=Ma(t);i.push({hasSeo:!0,key:"page",rows:[Fa(a,e.applyMutation),...l?[l]:[],...Gy.map((d)=>d.key==="description"?Aa(a,e.applyMutation):mt(d,r,e.applyMutation)),Oa(r,e.applyMutation)],title:"Page"},{hasSeo:!1,key:"opengraph",rows:Ky.map((d)=>mt(d,r,e.applyMutation)),title:"OpenGraph"});let c=_a(r);return{addAttr:Q,addTag:ue,addValue:ee,customCount:String(c.length),customEntries:c,customState:c.length===0?"empty":"listed",sections:i,tagOptions:Ca}}function L(){if(!E||!N)return;Ye(E,Ja(N),za)}function ft(){for(let{timer:e}of D.values())clearTimeout(e);D.clear()}function Z(e){let t=D.get(e);if(t)clearTimeout(t.timer),D.delete(e)}function pe(e,t){Z(e),S.get(e)?.commit(t)}function Va(){let e=N,t=Q.trim(),a=ee.trim();if(!e||!t||!a)return;let r=ue||"meta";Q="",ee="",L();let i={attributes:{},tagName:r};if(r==="meta")i.attributes={content:a,name:t};else if(r==="link")i.attributes={href:a,rel:t};else if(r==="script")i.attributes={[t]:a};e.applyMutation((o)=>{if(!o.$head)o.$head=[];o.$head.push(i)}),e.rerender()}function Wa(e){let t=N,a=Ee.get(e);if(!t||!a)return;t.applyMutation((r)=>{if(!r.$head)return;let i=r.$head.indexOf(a);if(i!==-1)r.$head.splice(i,1)}),t.rerender()}var ht=null;function gt(){return ht??=(le("shfe59pt"),import("./media-picker-shfe59pt.js")),ht}var za={addEntry:Va,browse:(e,t)=>{Z(e),gt().then((a)=>{if(t instanceof HTMLElement)a.showMediaPickerPopover(t,(r)=>{S.get(e)?.commit(r)},{images:S.get(e)?.images??!0})})},clear:(e)=>{Z(e),S.get(e)?.clear()},commitText:(e,t)=>pe(e,t),editAttr:(e)=>{Q=e,L()},editText:(e,t)=>{Z(e);let a=()=>{D.delete(e),S.get(e)?.commit(t)};D.set(e,{commit:a,timer:setTimeout(a,Yp)})},editTag:(e)=>{ue=e,L()},editValue:(e)=>{ee=e,L()},openSeo:()=>{ae()?.run("document.openSeo")},removeEntry:Wa,runRowAction:(e)=>{Ie.get(e)?.()},setBoolean:(e,t)=>pe(e,t),setChoice:(e,t)=>pe(e,t),setNumber:(e,t)=>pe(e,t),upload:(e)=>{Z(e),gt().then((t)=>{t.pickAndUpload((a)=>{S.get(e)?.commit(a)})})}};function Ua(e,t){if(e!==E)ue="meta",Q="",ee="",ft();if(t.document!==N?.document)ft();E=e,N=t,L()}function uE(e){if(!e)return"Document";if(e.startsWith("pages/"))return"Page";if(e.startsWith("layouts/"))return"Template";if(e.startsWith("components/"))return"Component";let t=Un(e);return t&&!t.fileBacked?"Entry":"Document"}var Ba="A component has no page settings: its title, search and social details come from the page that uses it.";function Ga(e){return{actions:[{label:"Edit tag and props",run:()=>{dl(e,{selection:[[]],ui:{rightTab:"properties"}})}}],detail:"Its tag name and the props it takes are set on its root element.",message:Ba}}var lD="Open a page to edit its title, description and social preview.",I=null;function hE(e){if(I&&I!==e){if(q(I),ce(I),E===I)E=null,N=null}I=e,Zy()}function Zy(){let e=I;if(!e)return;let t=u.value;if(!t||ot(t)){if(ce(e),E===e)E=null,N=null;if(t)dt(e,t);else q(e);return}if(q(e),uE(t.documentPath)==="Component"){if(ce(e),E===e)E=null,N=null;let r=Mu(e,Ga(t));if(e.firstChild!==r||e.childNodes.length!==1)e.replaceChildren(r);return}let a=t.doc.mode==="content";Ua(e,{applyMutation:a?(r)=>dE(u.value,Zy,r):(r)=>{qd(u.value,r)},document:a?O_(t.doc.document,t.doc.content.frontmatter):t.doc.document,rerender:Zy})}
|
|
4
|
-
export{
|
|
3
|
+
Preview — double-click to keep open`:r}function Td(e){let t=e.documentPath;if(!t)return mm(e.id)??"Untitled";return tm(t)??t.split("/").at(-1)??t}function Ve(e){let t=Yp(e);if(!e.doc.dirty&&!t)return!1;let a=Tn(e);if(!a.active)return!0;if(cv(e))return!0;if(t)return!0;return a.peers.filter((i)=>i.state.focusedPath===e.documentPath).length===0}function xe(e){if(cv(e))return`You have read access to this session, so "${Td(e)}" has changes that were never published and have nowhere to be saved. Closing discards them.`;if(Yp(e))return`"${Td(e)}" has text in its editor that the document could not be given — the `+"source does not parse, or a collaborator holds the source lock. Saving would write the file without it, so it is not offered. Closing discards that text.";return null}async function oa(e){let t=xe(e);if(t)return Ko("Changes Cannot Be Saved",t,{cancelLabel:"Keep Editing",confirmLabel:"Close Without Saving",destructive:!0});let a=await uC("Unsaved Changes",`"${Td(e)}" has unsaved changes.`,{discardLabel:"Close Without Saving"});if(a==="cancel")return!1;return a==="discard"||await Sp(e)}async function Kg(e){let t=m.tabs.get(e);if(!t)return;if(await Xd(t),!m.tabs.has(e))return;if(Ve(t)&&!await oa(t))return;Yd(e)}async function Xk(e){let t=[...m.tabs.values()];for(let c of t)await Xd(c);let a=[...m.tabs.values()].filter((c)=>Ve(c));if(a.length===0)return!0;let r=a.length===1?`"${Td(a[0])}" has unsaved changes`:`${a.length} documents have unsaved changes`,i=a.filter((c)=>xe(c)!==null),o=a.filter((c)=>xe(c)===null),s=i.length===1?`"${Td(i[0])}"`:`${i.length} of them`;if(o.length===0)return Ko("Changes Cannot Be Saved",`${e} closes every open document, and ${r}. ${s} cannot be saved at all, so saving would leave work behind. Closing discards it.`,{cancelLabel:"Keep Editing",confirmLabel:"Close Without Saving",destructive:!0});let l=await uC("Unsaved Changes",i.length===0?`${e} closes every open document, and ${r}.`:`${e} closes every open document, and ${r}. ${s} cannot be saved at `+`all — saving writes the other ${o.length} and discards ${i.length===1?"that one":"those"}.`,{discardLabel:"Close Without Saving",saveLabel:i.length===0?"Save All":`Save ${o.length} of ${a.length}`});if(l==="cancel")return!1;if(l==="discard")return!0;for(let c of o)if(!await Sp(c))return!1;return!0}function We(e,t){if(!n(t)||t.trim()==="")return[...e];return[{attributes:{content:t,name:"description"},tagName:"meta"},...e]}function ze(e,t,a){let r=e.doc.content.frontmatter,i=yh(e.documentPath,t),o=i?.schema,s=o?.properties,l=new Set(o?.required||[]),c=[];if(s){for(let[d,f]of Object.entries(s)){if(a.has(d))continue;c.push({entry:f,field:d,value:r[d]})}for(let[d,f]of Object.entries(r)){if(s[d]||d.startsWith("$")||a.has(d))continue;c.push({entry:{type:Xe(f)?"boolean":"string"},field:d,value:f})}}else for(let[d,f]of Object.entries(r)){if(d.startsWith("$")||a.has(d))continue;c.push({entry:{type:Xe(f)?"boolean":"string"},field:d,value:f})}return{collection:i,fields:c,hasSchema:Boolean(s),requiredFields:l}}function B(e){return n(e)?e:""}function sa(e){return{checked:!1,hasNote:!1,hasThumb:!1,isSet:!1,kind:"text",label:e,note:"",options:[],placeholder:"",thumb:"",value:""}}function Ue(e,t,a,r,i){let o=e.replaceAll(/([A-Z])/g," $1").replace(/^./,(d)=>d.toUpperCase()),s=sa(o+(r.has(e)?" *":""));s.isSet=a!==void 0&&a!==""&&a!==!1;let l=(d)=>String(d)||void 0,c=Bu(t);if(c!==null){let d=B(a),f=gE(c,i.rerender);if(s.kind="select",s.value=d,f===null)return s.options=[{label:"Loading…",value:d}],{parse:l,row:s};if("error"in f)return s.kind="text",s.hasNote=!0,s.note=`Could not list ${c} entries — ${f.error}`,{parse:l,row:s};let b=d!==""&&!f.ids.includes(d);if(s.options=[{label:"—",value:""},...b?[{label:`${d} — not found`,value:d}]:[],...f.ids.map((x)=>({label:x,value:x}))],f.ids.length===0)s.hasNote=!0,s.note=`No ${c} entries yet.`;return{parse:l,row:s}}if(t.type==="boolean")return s.kind="boolean",s.checked=Boolean(a),{parse:(d)=>d===!0?!0:void 0,row:s};if(t.type==="array")return s.value=Array.isArray(a)?a.join(", "):B(a),s.placeholder="comma, separated",{parse:(d)=>{let f=String(d);return f?f.split(",").map((b)=>b.trim()).filter(Boolean):void 0},row:s};if(Array.isArray(t.enum))return s.kind="select",s.value=B(a),s.options=[{label:"—",value:""},...t.enum.map((d)=>({label:d,value:d}))],{parse:l,row:s};if(Ra(t.format)){let d=B(a);return s.kind="media",s.value=d,s.hasThumb=d!==""&&Ks.has(nn(d)),s.thumb=s.hasThumb?Uc(d):"",{parse:l,row:s}}if(t.type==="number")return s.kind="number",s.value=a===void 0?"":String(a),{parse:(d)=>{let f=String(d).trim(),b=Number(f);return f===""||Number.isNaN(b)?void 0:b},row:s};return s.value=B(a),s.placeholder=t.format==="date"?"YYYY-MM-DD":"",{parse:l,row:s}}var Be="https://fonts.googleapis.com/css2?",Ge=["https://fonts.googleapis.com","https://fonts.gstatic.com"];function zy(e){return e?.tagName==="link"&&e.attributes?.rel==="stylesheet"&&n(e.attributes.href)&&e.attributes.href.startsWith(Be)}function Te(e){return e?.tagName==="link"&&e.attributes?.rel==="preconnect"&&n(e.attributes.href)&&Ge.includes(e.attributes.href)}function YR(e){let t=e.match(/family=([^&:]+)/);if(!t)return"";return decodeURIComponent(t[1].replaceAll("+"," "))}function ZR(e){return`${Be}family=${encodeURIComponent(e).replaceAll("%20","+")}&display=swap`}function XR(e){for(let t of Ge)if(!e.some((r)=>r?.tagName==="link"&&r.attributes?.rel==="preconnect"&&r.attributes.href===t)){let r={href:t,rel:"preconnect"};if(t==="https://fonts.gstatic.com")r.crossorigin="";e.push({attributes:r,tagName:"link"})}}function QR(e){if(!e.some((a)=>zy(a)))return e.filter((a)=>!Te(a));return e}var qe={$schema:"https://jxsuite.com/schema/v1",$id:"StudioPanelPage",$description:"The Inspector's Page tab (specs/studio.md §6), the former Navigator Page panel: everything the open document says about itself before anybody reads its body — its frontmatter, the layout it is poured into, its title, description, viewport and icon, its OpenGraph card, and the raw `$head` tags no structured control owns. ONE row vocabulary across the first four sections, told apart by `kind`, because a Title, a Layout picker and a schema-driven frontmatter field differ in what they COMMIT rather than in what they look like — and what they commit is `panels/head-panel.ts`'s decision, reached by the row's `key`. Nothing here knows what a `$head` entry is, which of them are managed, what a content collection is or that a page has a layout: the flow hands over sections whose every field is already a string and this draws them. The Custom Tags section is the one different shape — a read-only list plus the form that adds to it — because those rows are markup a reader is being SHOWN rather than a value they are editing.",tagName:"div",attributes:{part:"page"},style:{$description:"The eleven `.imports-*` and four `.head-*` rules in `styles/panels.css` plus the row vocabulary the panel used to borrow from `styles/inspector.css` (`.style-row`, `.style-row-label`, `.set-dot`) and `styles/overlays.css` (`.media-picker`, `.media-picker-thumb`). The borrowed ones are TRANSCRIBED rather than shared, because a document emits no class, so a class cannot style it, and the lit panels that still draw a `.style-row` go on owning those rules until they convert. Four token repairs travel with them. `--spectrum-font-size-50` resolved only inside `<sp-theme>` and a document is mounted outside it, so every rule that read it would silently have taken its 11px fallback and stopped following the theme; each is `--jx-text-sm` here, and the two bare `10px` literals are `--jx-text-xs`. `.imports-count` read `--text-hint`, a name NO stylesheet in this package defines — an unresolvable custom property makes the whole declaration invalid at computed-value time, so the count has been inheriting its colour rather than taking the one written for it, and it says `--fg-dim`, which is what it was drawing anyway. And `.head-section-body .style-row > sp-textfield` reached INSIDE another component to widen it, which a part cannot do and no longer has to: `[part=\"widget\"]` is the field itself. Two things changed on purpose. THE CLEAR DOT IS A BUTTON — it was a `<span>` with a click handler and no role, so a row's only route to clearing its value could not be reached from the keyboard at all. AND THE ADD FORM IS STATE, not three `ref()` handles read at submit time: a document binding writes only when the scope moves, so the flow states what each field holds and clearing one after a successful add is a real change the runtime carries back.",display:"block",overflowY:"auto",padding:"var(--jx-space-2)",fontFamily:"var(--jx-font-sans)",color:"var(--fg)",'& [part="section"]':{marginBottom:"var(--jx-space-4)"},'& [part="section-header"]':{$description:'The uppercase band every section opens with. It is the only thing that ever styled a section title, which is why `[part="title"]` carries no declaration of its own: the weight, the size, the colour and the letter-spacing are all inherited from here.',display:"flex",alignItems:"center",gap:"6px",padding:"6px 8px 2px",fontSize:"var(--jx-text-sm)",fontWeight:"600",color:"var(--fg-dim)",textTransform:"uppercase",letterSpacing:"0.5px"},'& [part="count"]':{fontWeight:"400",color:"var(--fg-dim)"},'& [part="seo-button"]':{$description:"The door to Search appearance, pushed to the right edge of the band so the section still reads as a heading and the button as its affordance. The band's own uppercasing and tracking stop here: this is a sentence, not a heading.",marginLeft:"auto",textTransform:"none",letterSpacing:"normal"},'& [part="body"]':{padding:"0 var(--jx-space-2)"},'& [part="row"]':{$description:"studio-ui-guidelines.md §4.1's standard form row, stacked: the label sits above a control that takes the whole width. `min-width: 0` is what keeps it honest in a 240px dock (studio-ui-guidelines.md §4.6) — a field refuses to shrink below its own min-content without it.",display:"flex",flexDirection:"column",alignItems:"stretch",gap:"2px",padding:"2px 0",minWidth:"0"},'& [part="row-label"]':{display:"flex",alignItems:"center",gap:"4px",fontSize:"var(--jx-text-xs)",color:"var(--fg-dim)"},'& [part="chip"]':{$description:"studio-ui-guidelines.md §4.2's set dot: a 6px accent dot, drawn only where the value is set on this document, that clears it when pressed. A real `button` — it is pressable, and it is the row's only keyboard route to clearing — stripped of the chrome a button brings so the row still reads as a label with a dot beside it.",width:"6px",height:"6px",padding:"0",border:"none",borderRadius:"50%",background:"var(--accent)",cursor:"pointer",flexShrink:"0"},'& [part="chip"]:hover':{background:"var(--danger)"},'& [part="chip"]:focus-visible':{outline:"var(--jx-focus-ring)",outlineOffset:"2px"},'& [part="row-name"]':{$description:"The visible label, `aria-hidden` in the markup: every control in the row carries the same words as its own accessible name, so a label node in the tree as well would have each field announced twice. That is the trade the kit's naming makes — a control names itself — and it is also why this row needs no minted ids.",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},'& [part="widget"]':{width:"100%",minWidth:"0"},'& [part="readout"]':{$description:"A derived value set as text in the field's place, monospaced because a URL is read character by character.",display:"block",padding:"2px 0",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontFamily:"var(--font-mono, monospace)",fontSize:"var(--jx-text-sm)"},'& [part="row-action"]':{alignSelf:"flex-start"},'& [part="note"]':{$description:"What the row could not find out — the entries of a referenced collection that is empty, or the reason listing it failed. A sentence under the control, in the row's own label size, so it reads as part of the field rather than as an error banner.",margin:"0",fontSize:"var(--jx-text-xs)",color:"var(--fg-dim)"},'& [part="media"]':{display:"flex",alignItems:"center",gap:"4px",minWidth:"0"},'& [part="media"] [part="widget"]':{flex:"1",minWidth:"0"},'& [part="thumb"]':{width:"24px",height:"24px",objectFit:"cover",borderRadius:"var(--radius)",border:"1px solid var(--border)",flexShrink:"0"},'& [part="list"]':{padding:"0 var(--jx-space-2)"},'& [part="tag-row"]':{display:"flex",alignItems:"center",gap:"4px",padding:"3px var(--jx-space-2)",borderRadius:"var(--radius)",fontSize:"var(--jx-text-sm)"},'& [part="tag-row"]:hover':{background:"var(--hover-bg)"},'& [part="tag-name"]':{fontWeight:"500",whiteSpace:"nowrap"},'& [part="tag-value"]':{$description:"What the tag says. It takes the row's slack and ellipses rather than wrapping, because a row is a line and a wrapped value would push the remove button off the one the eye is on. The `title` beside it is what makes the full text readable when it does.",flex:"1",minWidth:"0",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontFamily:"var(--font-mono, monospace)",fontSize:"var(--jx-text-xs)",color:"var(--fg-dim)"},'& [part="empty"]':{$description:"The compact teaching state, drawn here rather than by `panels/empty-state.ts`: that helper is a lit template, and a surface is a document or a lit template and never a mix. It keeps the compact variant's shape — left-aligned, above the add form that IS its action, so it offers no button of its own (empty-state rule 2's stated exception).",margin:"0",padding:"var(--jx-space-3) var(--jx-space-4)",maxWidth:"34ch",lineHeight:"1.5",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="add"]':{display:"flex",alignItems:"center",gap:"4px",padding:"var(--jx-space-2)"},'& [part="add"] [part="field"]':{flex:"1",minWidth:"0"},'& [part="tag-picker"]':{minWidth:"70px"}},children:[{$prototype:"Array",items:{$ref:"#/state/sections"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"section","data-section":"${$map.item.key}"},children:[{tagName:"div",attributes:{part:"section-header"},children:[{tagName:"span",attributes:{part:"title"},textContent:"${$map.item.title}"},{tagName:"div",attributes:{part:"seo-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasSeo"},cases:{true:{tagName:"jx-action-button",attributes:{part:"seo-button"},$props:{size:"sm",quiet:!0,label:"Search appearance",hint:"Preview how this page appears in search and when shared"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openSeo"},value:[]}]},children:[{tagName:"span",textContent:"Search appearance…"}]}}}]},{tagName:"div",attributes:{part:"body"},children:[{$prototype:"Array",items:{$ref:"$map/item/rows"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"row","data-prop":"${$map.item.prop}"},children:[{tagName:"div",attributes:{part:"row-label"},children:[{tagName:"div",attributes:{part:"chip-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/isSet"},cases:{true:{tagName:"button",attributes:{part:"chip",type:"button",title:"${$map.item.clearLabel}","aria-label":"${$map.item.clearLabel}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/clear"},value:[{$ref:"$map/item/key"}]}]}}}},{tagName:"span",attributes:{part:"row-name","aria-hidden":"true"},textContent:"${$map.item.label}"}]},{tagName:"div",attributes:{part:"widget-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/kind"},cases:{text:{tagName:"jx-textfield",attributes:{part:"widget"},$props:{size:"sm",label:"${$map.item.label}",placeholder:{$ref:"$map/item/placeholder"},value:{$ref:"$map/item/value"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commitText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},textarea:{tagName:"jx-textfield",attributes:{part:"widget"},$props:{size:"sm",multiline:!0,rows:3,label:"${$map.item.label}",placeholder:{$ref:"$map/item/placeholder"},value:{$ref:"$map/item/value"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commitText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},number:{tagName:"jx-number-field",attributes:{part:"widget"},$props:{size:"sm",label:"${$map.item.label}",value:{$ref:"$map/item/value"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setNumber"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},boolean:{tagName:"jx-checkbox",attributes:{part:"widget"},$props:{size:"sm",label:"${$map.item.label}",checked:{$ref:"$map/item/checked"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setBoolean"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/checked"}]}]}},readout:{$description:"A value the document derives rather than stores, such as a page's URL, which is its file's place under `pages/`. Shown, never edited here: an editable URL would be a rename, and a rename is the file tree's.",tagName:"output",attributes:{part:"readout","aria-label":"${$map.item.label}"},textContent:"${$map.item.value}"},select:{tagName:"jx-select",attributes:{part:"widget"},$props:{size:"sm",label:"${$map.item.label}",options:{$ref:"$map/item/options"},value:{$ref:"$map/item/value"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setChoice"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},media:{tagName:"div",attributes:{part:"media"},children:[{tagName:"div",attributes:{part:"thumb-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasThumb"},cases:{true:{tagName:"img",attributes:{part:"thumb",src:"${$map.item.thumb}",alt:""}}}},{tagName:"jx-textfield",attributes:{part:"widget"},$props:{size:"sm",label:"${$map.item.label}",placeholder:"/image.jpg",value:{$ref:"$map/item/value"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/commitText"},value:[{$ref:"$map/item/key"},{$ref:"event#/target/value"}]}]}},{tagName:"jx-action-button",attributes:{part:"upload"},$props:{size:"sm",quiet:!0,icon:"upload-simple",label:"Upload media",hint:"Upload media"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/upload"},value:[{$ref:"$map/item/key"}]}]}},{tagName:"jx-action-button",attributes:{part:"browse"},$props:{size:"sm",quiet:!0,icon:"image",label:"Browse media",hint:"Browse media"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/browse"},value:[{$ref:"$map/item/key"},{$ref:"event#/currentTarget"}]}]}}]}}},{tagName:"div",attributes:{part:"action-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasAction"},cases:{true:{$description:"The row's one door elsewhere, named for what it opens: the Layout row's Edit template opens the layout in Design.",tagName:"jx-button",attributes:{part:"row-action"},$props:{size:"sm",variant:"secondary"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/runRowAction"},value:[{$ref:"$map/item/key"}]}]},children:[{tagName:"span",textContent:"${$map.item.action}"}]}}},{tagName:"div",attributes:{part:"note-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasNote"},cases:{true:{tagName:"p",attributes:{part:"note"},textContent:"${$map.item.note}"}}}]}}]}]}},{tagName:"div",attributes:{part:"section","data-section":"custom"},children:[{tagName:"div",attributes:{part:"section-header"},children:[{tagName:"span",attributes:{part:"title"},textContent:"Custom Tags"},{tagName:"span",attributes:{part:"count"},textContent:"${state.customCount}"}]},{tagName:"div",attributes:{part:"custom-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/customState"},cases:{empty:{tagName:"p",attributes:{part:"empty"},textContent:"Custom tags add your own meta, link and script elements to this page — analytics, verification, a webfont. Add one below."},listed:{tagName:"div",attributes:{part:"list"},children:[{$prototype:"Array",items:{$ref:"#/state/customEntries"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"tag-row","data-tag":"${$map.item.key}"},children:[{tagName:"span",attributes:{part:"tag-name",title:"${$map.item.value}"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"tag-value"},textContent:"${$map.item.value}"},{tagName:"jx-action-button",attributes:{part:"remove"},$props:{icon:"x",size:"sm",quiet:!0,label:"${$map.item.removeLabel}",hint:"Remove"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/removeEntry"},value:[{$ref:"$map/item/key"}]}]}}]}}]}}},{tagName:"div",attributes:{part:"add","data-add":"tag"},children:[{tagName:"jx-select",attributes:{part:"tag-picker","data-field":"tag"},$props:{size:"sm",label:"Tag",options:{$ref:"#/state/tagOptions"},value:{$ref:"#/state/addTag"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editTag"},value:[{$ref:"event#/target/value"}]}]}},{tagName:"jx-textfield",attributes:{part:"field","data-field":"attr"},$props:{size:"sm",label:"Attribute",placeholder:"Attribute (e.g. name)",value:{$ref:"#/state/addAttr"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editAttr"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/addEntry"},value:[]}]}}]}},{tagName:"jx-textfield",attributes:{part:"field","data-field":"value"},$props:{size:"sm",label:"Value",placeholder:"Value",value:{$ref:"#/state/addValue"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editValue"},value:[{$ref:"event#/target/value"}]}]},onkeydown:{$prototype:"Function",body:[{$switch:{$ref:"event#/key"},cases:{Enter:[{preventDefault:!0},{operator:"call",target:{$ref:"#/state/addEntry"},value:[]}]}}]}},{tagName:"jx-action-button",attributes:{part:"add-button","data-add":"tag"},$props:{icon:"plus",size:"sm",quiet:!0,label:"Add tag",hint:"Add tag"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/addEntry"},value:[]}]}}]}]}]};T("panel-page",qe);function Ke(e,t){e.sections=t.sections,e.customCount=t.customCount,e.customState=t.customState,e.customEntries=t.customEntries,e.addTag=t.addTag,e.addAttr=t.addAttr,e.addValue=t.addValue,e.tagOptions=t.tagOptions}function da(){return{addAttr:"",addTag:"",addValue:"",customCount:"0",customEntries:[],customState:"empty",sections:[],tagOptions:[]}}var G=new WeakMap;function Ye(e,t,a){let r=G.get(e);if(r&&(r.handle===null||r.handle.root.isConnected)){Ke(r.scope,t);return}r?.handle?.dispose(),e.textContent="";let i=g({...da(),...a});Ke(i,t);let o={handle:null,scope:i};G.set(e,o),R("panel-page",i,e).then((s)=>{if(G.get(e)!==o){s.dispose();return}o.handle=s})}function ce(e){let t=G.get(e);if(!t)return;G.delete(e),t.handle?.dispose(),e.textContent=""}var Ze={$schema:"https://jxsuite.com/schema/v1",$id:"StudioEmptyState",$description:"The one empty-state pattern (studio-ui-guidelines.md §11), as the document every region draws it from. Nine surfaces had already copied it into their own JSON — the Source Control panel's (since folded into `publish-workspace.json`), `logic-panel.json`, `panel-outline.json` and the rest each carry a `[part=\"empty\"]` block written from the same rules — because `panels/empty-state.ts` is a lit template a document cannot call. This is the copy those were waiting for: the region that has NO document of its own hands its box to this one instead of rendering the helper, so a shell with three surfaces still lit and eight converted has one empty state rather than two. The copy rules stay where they are stated, in `panels/empty-state.ts`'s header: one sentence saying what the region is FOR, the action that fills it, and one shared verb across equivalent surfaces. Nothing here decides any of them — the adapter is handed a message, an optional second sentence and a list of buttons, and this draws exactly that.",tagName:"div",attributes:{part:"empty","data-compact":"${state.compact ? '' : null}"},style:{$description:"What `.empty-state`, `.empty-state--teach`, `.empty-state-message`, `.empty-state-detail`, `.empty-state-actions`, `.empty-state-action` and the `--compact` pair said across `styles/overlays.css` and `styles/panels.css`, keyed on `part`. Neither stylesheet loses its rules: `ui/expression-editor.ts` still renders the lit helper for its own compact state, so this is a copy until that surface converts. Two values did not travel. `.empty-state`'s `font-size: 13px` was a number nothing else in the shell uses and is the kit's `--jx-text-md`; `.empty-state-detail`'s `var(--spectrum-font-size-50, 11px)` resolves only inside `<sp-theme>`, and a document mounted into a Navigator body or a canvas stage is outside it, so it would silently have taken its hard-coded fallback on every paint — it is `--jx-text-sm`, which is the step it was.",display:"flex",flexDirection:"column",alignItems:"center",gap:"var(--jx-space-3)",padding:"var(--jx-space-6)",textAlign:"center",color:"var(--fg-dim)",fontSize:"var(--jx-text-md)",'& [part="empty-message"]':{margin:"0",maxWidth:"34ch",lineHeight:"1.5"},'& [part="empty-detail"]':{$description:"The second sentence: where the region's content comes from. Dimmer than the first, because the first is the one a reader has to take in.",margin:"0",maxWidth:"34ch",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)",opacity:"0.8"},'& [part="empty-actions"]':{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:"var(--jx-space-3)"},'& [part="empty-action"]':{flex:"none"},"&[data-compact]":{$description:"An inline section inside an otherwise populated panel — tighter and left-aligned, because it sits directly above its own add form rather than filling a region on its own.",alignItems:"flex-start",gap:"var(--jx-space-2)",padding:"var(--jx-space-3) var(--jx-space-4)",textAlign:"left",fontSize:"var(--jx-text-sm)"},'&[data-compact] [part="empty-actions"]':{justifyContent:"flex-start"}},children:[{tagName:"p",attributes:{part:"empty-message"},textContent:"${state.message}"},{tagName:"div",attributes:{part:"empty-detail-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasDetail"},cases:{true:{tagName:"p",attributes:{part:"empty-detail"},textContent:"${state.detail}"}}},{tagName:"div",attributes:{part:"empty-actions-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasActions"},cases:{true:{tagName:"div",attributes:{part:"empty-actions"},children:[{$prototype:"Array",items:{$ref:"#/state/actions"},key:{$ref:"$map/item/id"},map:{tagName:"jx-button",attributes:{part:"empty-action"},$props:{size:"sm",variant:"secondary",disabled:{$ref:"$map/item/disabled"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/runAction"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",textContent:"${$map.item.label}"}]}}]}}}]};T("empty-state",Ze);function pa(e){let t=document.createElement("div");t.style.display="contents";let a=[],r=g({...Qe(e),runAction:(s)=>{a[Number(s)]?.()}});a=et(e);let i=null,o=!1;return R("empty-state",r,t).then((s)=>{if(o){s.dispose();return}i=s}),{dispose(){o=!0,i?.dispose(),i=null,t.replaceChildren()},host:t,update(s){a=et(s),Object.assign(r,Qe(s))}}}function Qe(e){let t=e.actions??[];return{actions:t.map((a,r)=>({disabled:Boolean(a.disabled),id:String(r),label:a.label})),compact:Boolean(e.compact),detail:e.detail??"",hasActions:t.length>0,hasDetail:(e.detail??"")!=="",message:e.message}}function et(e){return(e.actions??[]).map((t)=>t.run)}var tt=new WeakMap;function Ou(e,t){let a=tt.get(e);if(a)return a.update(t),a.host;let r=pa(t);return tt.set(e,r),r.host}var at={$schema:"https://jxsuite.com/schema/v1",$id:"StudioEntryInspector",$description:"The Inspector's Entry tab (specs/studio.md §6, §22.5): one collection entry's own settings while it is written on the canvas, the Content-Entry board's sidebar. Its status (draft or published), its fields as the collection's schema types them, the URL its collection page publishes it at, and the file it is stored in. `content/entry-inspector.ts` keeps every decision; the field form is an island it fills, `ui/schema-form.ts`'s, the same form the form-only entry editor draws.",tagName:"div",attributes:{part:"entry","data-jx-region":"${state.region}"},style:{$description:"A column of sections, each a small uppercase heading over its rows, like the Page tab beside it.",display:"flex",flexDirection:"column",gap:"var(--jx-space-4)",padding:"var(--jx-space-3)",fontFamily:"var(--jx-font-sans)",fontSize:"var(--jx-text-md)",color:"var(--fg)",'& [part="section"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-2)"},'& [part="section-title"]':{margin:"0",fontSize:"var(--jx-text-sm)",fontWeight:"700",letterSpacing:"0.06em",textTransform:"uppercase",color:"var(--fg-dim)"},'& [part="head"]':{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:"var(--jx-space-2)"},'& [part="kind"]':{fontWeight:"600"},'& [part="status"]':{fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="status"][data-draft="true"]':{color:"var(--warning)"},'& [part="note"]':{margin:"0",fontSize:"var(--jx-text-sm)",lineHeight:"1.5",color:"var(--fg-dim)"},'& [part="url"]':{fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)",wordBreak:"break-all"},'& [part="path"]':{fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)",color:"var(--fg)",wordBreak:"break-all"},'& [part="fields-head"]':{display:"flex",alignItems:"center",justifyContent:"space-between"}},children:[{tagName:"section",attributes:{part:"section","aria-labelledby":"entry-inspector-entry"},children:[{tagName:"div",attributes:{part:"head"},children:[{tagName:"h3",attributes:{part:"section-title",id:"entry-inspector-entry"},textContent:"Entry"},{tagName:"span",attributes:{part:"status","data-draft":"${state.draft ? 'true' : 'false'}"},textContent:"${state.status}"}]},{tagName:"span",attributes:{part:"kind"},textContent:"${state.kind}"},{tagName:"div",attributes:{part:"draft-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/draftAxis"},cases:{shown:{$description:"The entry's draft state, the one field every collection with a draft workflow shares (site-architecture.md §7.6). A setter: the switch names the state it reaches.",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:"section",attributes:{part:"section","aria-labelledby":"entry-inspector-fields"},children:[{tagName:"div",attributes:{part:"fields-head"},children:[{tagName:"h3",attributes:{part:"section-title",id:"entry-inspector-fields"},textContent:"Fields"},{tagName:"jx-action-button",attributes:{part:"edit-fields"},$props:{size:"sm",quiet:!0,hint:"Edit this collection's fields in Project Settings",haspopup:"dialog"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openFields"},value:[]}]},children:[{tagName:"span",textContent:"Edit"}]}]},{tagName:"div",attributes:{part:"fields-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/fieldsState"},cases:{form:{tagName:"div",attributes:{part:"fields"}},none:{tagName:"p",attributes:{part:"note"},textContent:"This collection declares no fields. Edit adds some in Project Settings."}}}]},{tagName:"section",attributes:{part:"section","aria-labelledby":"entry-inspector-page"},children:[{tagName:"div",attributes:{part:"fields-head"},children:[{tagName:"h3",attributes:{part:"section-title",id:"entry-inspector-page"},textContent:"Page"},{$description:"The door to Search appearance, the same `document.openSeo` the Page tab's button runs: an entry's search title, description and social image are its frontmatter too (studio.md §4.2).",tagName:"jx-action-button",attributes:{part:"seo-button"},$props:{size:"sm",quiet:!0,label:"Search appearance",hint:"Preview how this entry appears in search and when shared",haspopup:"dialog"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openSeo"},value:[]}]},children:[{tagName:"span",textContent:"Search appearance…"}]}]},{tagName:"div",attributes:{part:"url-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/urlState"},cases:{shown:{tagName:"code",attributes:{part:"url"},textContent:"${state.url}"},none:{tagName:"p",attributes:{part:"note"},textContent:"Entries of this collection have no page of their own."},unlisted:{$description:"The collection has a page, but the page lists the ids it publishes (`$paths.values`) and this entry is not one of them: naming a URL the build never writes would be a link to nothing.",tagName:"p",attributes:{part:"note"},textContent:"Not published: this collection's page lists the entries it publishes, and this is not one of them."},loading:{tagName:"p",attributes:{part:"note"},textContent:"Finding the page this entry is published at…"}}},{tagName:"p",attributes:{part:"note"},children:[{tagName:"span",textContent:"Stored as "},{tagName:"code",attributes:{part:"path"},textContent:"${state.path}"},{tagName:"span",textContent:"${state.storage}"}]}]}]};T("entry-inspector",at);function ma(e,t){e.region=t.region,e.kind=t.kind,e.status=t.status,e.draftAxis=t.draftAxis,e.draft=t.draft,e.draftHint=t.draftHint,e.fieldsState=t.fieldsState,e.urlState=t.urlState,e.url=t.url,e.path=t.path,e.storage=t.storage}function fa(e){let t=n(e)?void 0:e.attributes?.part;return n(t)?t:""}function nt(e,t,a,r){e.replaceChildren();let i=g({...t,...a}),o=null,s=!1,l=R("entry-inspector",i,e,{onNodeCreated:(c,d,f)=>{if(!s&&c instanceof HTMLElement&&fa(f)==="fields")r.fieldsSlot(c)}}).then((c)=>{if(s)c.dispose();else o=c;return c});return{attached:()=>{if(s)return!1;let c=o?.root;return c===void 0?!0:e.contains(c)},dispose(){s=!0,o?.dispose(),o=null},ready:l,update:(c)=>ma(i,c)}}var ha="inspector/entry";function ot(e){let t=Vn(e?.documentPath);return t!==null&&!t.fileBacked}function st(e){let t=e.documentPath??"",r=Vn(t)?.name??"",i=ya(r),o=Pl(e),s=Dc(i?.schema,o),l=Hl(o),c=r===""?null:eh(r,Mc(t)),d=c?LS(c,t,o):null,f=t.endsWith(".json");return{draft:l,draftAxis:s?"shown":"hidden",draftHint:wp,fieldsState:i?.schema?"form":"none",kind:_b(Wl(r)?.item??"entry"),path:t,region:ha,status:s?l?"Draft":"Published":"",storage:f?". Its fields are the file itself.":". Fields are its frontmatter, and the body is its Markdown.",url:d??"",urlState:c===void 0?"loading":d?"shown":c?"unlisted":"none"}}var y=null;function lt(e,t){let a=ya(Vn(t.documentPath)?.name??"");if(!e.formHost||!a?.schema)return;let r=Pl(t),i=Fl("entry-inspector",TE(a.schema,a.schema,r),r,{context:kE(t),errors:EE(a,r),onChange:(o)=>W_(t,o),rerender:e.redraw,ui:CE(a.schema)});if(i.parentNode!==e.formHost)e.formHost.replaceChildren(i)}function it(e,t){let a=st(t);if(a.fieldsState==="none")e.formHost=null;e.handle.update(a),lt(e,t)}function q(e){if(!y||e!==void 0&&y.host!==e)return;y.unlisten(),y.scope.stop(),y.handle.dispose(),y=null}function dt(e,t){if(y&&y.host===e&&y.tabId===t.id&&y.handle.attached()){it(y,t);return}q();let a=ge(),r=()=>{if(y===i)it(i,t)},i={formHost:null,handle:nt(e,st(t),{openFields:()=>{let o=Vn(t.documentPath)?.name;rt("settings.open",o?{entry:o,section:"content"}:{section:"content"},"Entry")},openSeo:()=>{rt("document.openSeo",void 0,"Entry")},setDraft:(o)=>nb(t,o)},{fieldsSlot:(o)=>{if(y===i)i.formHost=o,lt(i,t)}}),host:e,redraw:r,scope:a,tabId:t.id,unlisten:kp(r)};y=i,a.run(()=>{ne(()=>{t.doc.document,t.doc.content.frontmatter,S?.projectConfig?.content,r()})})}var O=null;async function Qk(){try{O=(await p().listDirectory("layouts")).filter((a)=>a.type==="file"&&a.name.endsWith(".json")).map((a)=>({name:a.name.replace(/\.json$/,"").replaceAll(/[-_]+/g," ").replaceAll(/\b\w/g,(r)=>r.toUpperCase()),path:`./layouts/${a.name}`}))}catch{O=[]}return O}async function ga(){await Qk(),xn("rightPanel","seoModal")}function Wy(){O=null,Ha()}function ba(){if(O===null)ga();return O}var Vy=[{attr:"name",key:"description",label:"Description"},{attr:"name",key:"viewport",label:"Viewport"}],Uy=[{attr:"property",key:"og:title",label:"Title"},{attr:"property",key:"og:description",label:"Description",multiline:!0},{attr:"property",key:"og:image",label:"Image",media:!0},{attr:"property",key:"og:type",label:"Type"}],ct=new Set([...Vy,...Uy].map((e)=>e.key)),pt=new Set(["title"]);function va(e){return Ie(e)?new Set([...pt,"description"]):pt}function eE(e){let t=qy(e.$head??[],"name","description");if(t)return String(t.attributes?.content??"");return n(e.description)?e.description:""}function I_(e,t){if(!qy(e.$head??[],"name","description")&&n(e.description)){if(t)e.description=t;else delete e.description;return}Gy(e,"name","description",t)}function qy(e,t,a){return e.find((r)=>r?.tagName==="meta"&&r.attributes?.[t]===a)}function tE(e,t){return e.find((a)=>a?.tagName==="link"&&a.attributes?.rel===t)}function xa(e){if(!e?.tagName)return!1;if(e.tagName==="meta"){let t=String(e.attributes?.name??""),a=String(e.attributes?.property??"");return Boolean(t&&ct.has(t))||Boolean(a&&ct.has(a))}if(e.tagName==="link"&&e.attributes?.rel==="icon")return!0;return!1}function Gy(e,t,a,r){if(!e.$head)e.$head=[];let i=e.$head.findIndex((o)=>o?.tagName==="meta"&&o.attributes?.[t]===a);if(r){let o={attributes:{[t]:a,content:r},tagName:"meta"};if(i!==-1)e.$head[i]=o;else e.$head.push(o)}else if(i!==-1)e.$head.splice(i,1)}function R_(e,t,a){if(!e.$head)e.$head=[];let r=e.$head.findIndex((i)=>i?.tagName==="link"&&i.attributes?.rel===t);if(a){let i={attributes:{href:a,rel:t},tagName:"link"};if(r!==-1)e.$head[r]=i;else e.$head.push(i)}else if(r!==-1)e.$head.splice(r,1)}function wa(e){if(!e?.tagName)return"unknown";let t=e.attributes??{};if(t.name)return`<meta name="${String(t.name)}">`;if(t.property)return`<meta property="${String(t.property)}">`;if(t.rel&&t.href)return`<link rel="${String(t.rel)}">`;if(t.src)return`<script src="${String(t.src)}">`;if(t.charset)return`<meta charset="${String(t.charset)}">`;return`<${e.tagName}>`}function $a(e){let t=e?.attributes??{};return String(t.content??t.href??t.src??e?.textContent??"")}var bt="Jx Site",yt={donor:null,source:"none",value:""};function ke(e,t,a){let r=null;for(let i of e)if(i?.tagName==="meta"&&i.attributes?.[t]===a)r=String(i.attributes.content??"");return r}function K(e,t,a){let r=ke(e.page,t,a);if(r!==null)return{donor:null,source:"page",value:r};let i=ke(e.layout,t,a);if(i!==null)return{donor:e.layoutName??"the layout",source:"layout",value:i};let o=ke(e.site,t,a);if(o!==null)return{donor:"Site head",source:"site",value:o};return yt}function Sa(e,t){let a=e.trim();if(a)return{donor:null,source:"page",value:a};let r=t?.trim();if(r)return{donor:"Site name",source:"site",value:r};return{donor:"the build",source:"build",value:bt}}function Ta(e,t){let a=e??"",r=a.split("/").filter((s)=>s!=="");if(!t||e===null)return{crumb:a||"/",host:"",href:null};let i;try{i=new URL(a,t)}catch{return{crumb:a||"/",host:"",href:null}}let{host:o}=i;return{crumb:[o,...r].join(" › "),host:o,href:i.href}}var xt=new Map([["description",160],["og:description",200],["og:title",60],["title",60]]),ka=new Intl.Segmenter("en-US",{granularity:"grapheme"});function nE(e){let t=0;for(let a of ka.segment(e))t+=1;return t}var ut="Search appearance";function nD(e,t){dl((a)=>a.source===ut);for(let a of e.warnings){let r={action:"document.openSeo",key:`seo.${a.id}`,source:ut,tier:"problem"};if(t!==void 0)r.path=t;C.warn(a.message,r)}return e.warnings.length}function Jg(e,t){return e.fields.find((a)=>a.key===t)??{...yt,key:t,label:t,limit:xt.get(t)??null}}function Ea(e){return[...e.site,...e.layout,...e.page].some((t)=>t?.tagName==="title")}function Pa(e,t){let a=[],r=(o)=>e.fields.find((s)=>s.key===o);if(r("title")?.source==="build")a.push({field:"title",id:"title-missing",message:`Neither this page nor the project names a title, so the build ships “${bt}”.`});if(r("description")?.value.trim()==="")a.push({field:"description",id:"description-missing",message:"No description reaches this page from the site, its layout or the page itself — a "+"result row shows whatever text the engine picks instead."});if(r("og:title")?.value.trim()==="")a.push({field:"og:title",id:"og-title-missing",message:"No og:title — a shared link carries no headline of its own."});if(r("og:description")?.value.trim()==="")a.push({field:"og:description",id:"og-description-missing",message:"No og:description — a shared link carries no summary of its own."});if(r("og:image")?.value.trim()==="")a.push({field:"og:image",id:"og-image-missing",message:"No og:image — a shared link renders as a text-only card."});for(let o of e.fields){let s=nE(o.value);if(o.limit!==null&&s>o.limit){let l=o.key.endsWith("description")?"summaries":"headlines";a.push({field:o.key,id:`${o.key}-long`,message:`${o.label} is ${s} characters; ${l} are cut near ${o.limit}.`})}}if(e.url.href===null)a.push({field:"url",id:"site-url-missing",message:"Project Settings names no site URL, so the build emits no canonical link and no og:url."});if(Ea(t))a.push({field:"title",id:"head-title-ignored",message:"A <title> element in $head is discarded — the build writes the title from the "+"document's own title property."});return a}function Na(e,t){let a=(s,l,c)=>({...c,key:s,label:l,limit:xt.get(s)??null}),r=[a("title","Title",Sa(t.pageTitle,t.siteName)),a("description","Description",K(e,"name","description")),a("og:title","Social title",K(e,"property","og:title")),a("og:description","Social description",K(e,"property","og:description")),a("og:image","Social image",K(e,"property","og:image")),a("og:type","Social type",K(e,"property","og:type"))],i=Ta(t.route,t.siteUrl),o={fields:r,url:i};return{...o,warnings:Pa(o,e)}}var Pe=null,Ne=[],X=null;function Ha(){Pe=null,Ne=[],X=null}async function Ia(e){if(X===e)return;X=e;let t=await Yw(e);if(X!==e)return;X=null,Pe=e,Ne=t?.$head??[],xn("seoModal")}function wt(e){return e.replace(/^\.\//,"").replace(/^layouts\//,"").replace(/\.json$/,"").replaceAll(/[-_/]+/g," ").replaceAll(/\b\w/g,(t)=>t.toUpperCase())||e}function ja(e,t){let a=Ie(e)?ol(t):null;if(a===null)return{entries:[],name:null};let r=wt(a);if(a===Pe)return{entries:Ne,name:r};return Ia(a),{entries:[],name:r}}function iE(e,t){let a=S?.projectConfig,r=ja(e,t.$layout),i=e?.documentPath,o={pageTitle:n(t.title)?t.title:"",route:i?tm(i):null};if(a?.name!==void 0)o.siteName=a.name;if(a?.url!==void 0)o.siteUrl=a.url;return Na({layout:r.entries,layoutName:r.name,page:We(t.$head??[],t.description),site:a?.$head??[]},o)}function Ie(e){let t=e?.documentPath;return Boolean(t&&S?.isSiteProject&&(t.startsWith("pages/")||t.startsWith("./pages/")))}function D_(e,t){let a={...e};if(t.title!==void 0)a.title=t.title;if(n(t.description))a.description=t.description;if(n(t.$layout)||t.$layout===!1)a.$layout=t.$layout;if(t.$head!==void 0)a.$head=t.$head;return a}function oE(e,t,a){if(!e)return;let r=e.doc.content.frontmatter,i=D_({},r).$head,o={};if(n(r.title))o.title=r.title;if(n(r.description))o.description=r.description;if(i)o.$head=[...i];if(n(r.$layout)||r.$layout===!1)o.$layout=r.$layout;a(o);let s=o.$head&&o.$head.length>0?o.$head:void 0,l=o.$layout!==r.$layout,c=o.title!==r.title,d=n(r.description)&&o.description!==r.description,f=JSON.stringify(s)!==JSON.stringify(i);if(l||c||d||f)Y(e,(b)=>{if(l)Gd(b,"$layout",n(o.$layout)||o.$layout===!1?o.$layout:void 0);if(c)Gd(b,"title",o.title);if(d)Gd(b,"description",n(o.description)?o.description:void 0);if(f)Gd(b,"$head",s)});t()}var E=null,N=null,ue="meta",Q="",ee="",w=new Map,je=new Map;function Ma(e){let t=e?.documentPath?tm(e.documentPath):null;if(t===null)return null;return{...j("__url","url","URL"),kind:"readout",value:t}}var Ee=new Map,D=new Map,Ca=[{label:"meta",value:"meta"},{label:"link",value:"link"},{label:"script",value:"script"}];function j(e,t,a){return{action:"",checked:!1,clearLabel:`Clear ${t}`,hasAction:!1,hasNote:!1,hasThumb:!1,isSet:!1,key:e,kind:"text",label:a,note:"",options:[],placeholder:"",prop:t,thumb:"",value:""}}function $t(e,t){e.hasThumb=t!==""&&Ks.has(nn(t)),e.thumb=e.hasThumb?Uc(t):""}function Fa(e,t){let a=n(e.title)?e.title:"";return w.set("title",{images:!1,clear:()=>t((r)=>{delete r.title}),commit:(r)=>t((i)=>{let o=String(r).trim();if(o)i.title=o;else delete i.title})}),{...j("title","title","Title"),clearLabel:"Clear title",isSet:Boolean(a),placeholder:"Page title…",value:a}}function mt(e,t,a){let r=String(qy(t,e.attr,e.key)?.attributes?.content??""),i=`meta:${e.attr}:${e.key}`;w.set(i,{images:e.media===!0,clear:()=>a((s)=>Gy(s,e.attr,e.key,"")),commit:(s)=>a((l)=>Gy(l,e.attr,e.key,e.media?String(s):String(s).trim()))});let o=j(i,e.key,e.label);if(o.isSet=Boolean(r),o.value=r,e.media)return o.kind="media",$t(o,r),o;return o.kind=e.multiline?"textarea":"text",o.placeholder=e.key==="viewport"?"width=device-width, initial-scale=1":`${e.label}…`,o}function Aa(e,t){let a=eE(e),r="meta:name:description";w.set("meta:name:description",{images:!1,clear:()=>t((o)=>I_(o,"")),commit:(o)=>t((s)=>I_(s,String(o).trim()))});let i=j("meta:name:description","description","Description");return i.isSet=Boolean(a),i.value=a,i.kind="text",i.placeholder="Description…",i}function Oa(e,t){let a=String(tE(e,"icon")?.attributes?.href??"");w.set("link:icon",{images:!0,clear:()=>t((i)=>R_(i,"icon","")),commit:(i)=>t((o)=>R_(o,"icon",String(i)))});let r=j("link:icon","icon","Icon");return r.isSet=Boolean(a),r.kind="media",r.value=a,$t(r,a),r}function La(e,t,a){if(!Ie(e))return null;let r=ba();if(r===null)return null;let i=t.$layout,o=S?.projectConfig?.defaults?.layout,s=o?wt(o):"";w.set("__layout",{images:!1,clear:()=>a((d)=>{delete d.$layout}),commit:(d)=>{let f=String(d);a((b)=>{if(f==="__default__")delete b.$layout;else if(f==="__none__")b.$layout=!1;else b.$layout=f}),JN()}});let l=j("__layout","layout","Layout");l.kind="select",l.isSet=i!==void 0,l.options=[{label:s?`Default (${s})`:"Default",value:"__default__"},{label:"None",value:"__none__"},...r.map((d)=>({label:d.name,value:d.path}))],l.value=i===!1?"__none__":i||"__default__";let c=ol(i);if(c)l.action="Edit template",l.hasAction=!0,je.set("__layout",()=>{(le("ybpp3j38"),import("./files-ybpp3j38.js")).then(({openFileInTab:d})=>d(c.replace(/^\.\//,"")))});return{hasSeo:!1,key:"layout",rows:[l],title:"Layout"}}function Da(e){if(!e||e.doc.mode!=="content")return null;let{collection:t,fields:a,hasSchema:r,requiredFields:i}=ze(e,S?.projectConfig,va(e));if(a.length===0&&!r)return null;return{hasSeo:!1,key:"frontmatter",rows:a.map((s)=>{let l=`fm:${s.field}`,{parse:c,row:d}=Ue(s.field,s.entry,s.value,i,{rerender:L});return w.set(l,{images:d.kind==="media"&&s.entry.format==="image",clear:()=>Y(e,(f)=>Gd(f,s.field)),commit:(f)=>Y(e,(b)=>Gd(b,s.field,c(f)))}),Object.assign(j(l,s.field,d.label),d,{clearLabel:`Clear ${s.field}`})}),title:t?`Frontmatter (${t.name})`:"Frontmatter"}}function _a(e){Ee.clear();let t=[];for(let a of e){if(xa(a)||zy(a)||Te(a))continue;let r=`tag:${t.length}`;Ee.set(r,a);let i=wa(a);t.push({key:r,label:i,removeLabel:`Remove ${i}`,value:$a(a)})}return t}function Ja(e){w.clear(),je.clear();let t=u.value,a=e.document,r=a.$head??[],i=[],o=Da(t);if(o)i.push(o);let s=La(t,a,e.applyMutation);if(s)i.push(s);let l=Ma(t);i.push({hasSeo:!0,key:"page",rows:[Fa(a,e.applyMutation),...l?[l]:[],...Vy.map((d)=>d.key==="description"?Aa(a,e.applyMutation):mt(d,r,e.applyMutation)),Oa(r,e.applyMutation)],title:"Page"},{hasSeo:!1,key:"opengraph",rows:Uy.map((d)=>mt(d,r,e.applyMutation)),title:"OpenGraph"});let c=_a(r);return{addAttr:Q,addTag:ue,addValue:ee,customCount:String(c.length),customEntries:c,customState:c.length===0?"empty":"listed",sections:i,tagOptions:Ca}}function L(){if(!E||!N)return;Ye(E,Ja(N),za)}function ft(){for(let{timer:e}of D.values())clearTimeout(e);D.clear()}function Z(e){let t=D.get(e);if(t)clearTimeout(t.timer),D.delete(e)}function pe(e,t){Z(e),w.get(e)?.commit(t)}function Va(){let e=N,t=Q.trim(),a=ee.trim();if(!e||!t||!a)return;let r=ue||"meta";Q="",ee="",L();let i={attributes:{},tagName:r};if(r==="meta")i.attributes={content:a,name:t};else if(r==="link")i.attributes={href:a,rel:t};else if(r==="script")i.attributes={[t]:a};e.applyMutation((o)=>{if(!o.$head)o.$head=[];o.$head.push(i)}),e.rerender()}function Wa(e){let t=N,a=Ee.get(e);if(!t||!a)return;t.applyMutation((r)=>{if(!r.$head)return;let i=r.$head.indexOf(a);if(i!==-1)r.$head.splice(i,1)}),t.rerender()}var ht=null;function gt(){return ht??=(le("cpyyt2m0"),import("./media-picker-cpyyt2m0.js")),ht}var za={addEntry:Va,browse:(e,t)=>{Z(e),gt().then((a)=>{if(t instanceof HTMLElement)a.showMediaPickerPopover(t,(r)=>{w.get(e)?.commit(r)},{images:w.get(e)?.images??!0})})},clear:(e)=>{Z(e),w.get(e)?.clear()},commitText:(e,t)=>pe(e,t),editAttr:(e)=>{Q=e,L()},editText:(e,t)=>{Z(e);let a=()=>{D.delete(e),w.get(e)?.commit(t)};D.set(e,{commit:a,timer:setTimeout(a,Zp)})},editTag:(e)=>{ue=e,L()},editValue:(e)=>{ee=e,L()},openSeo:()=>{ae()?.run("document.openSeo")},removeEntry:Wa,runRowAction:(e)=>{je.get(e)?.()},setBoolean:(e,t)=>pe(e,t),setChoice:(e,t)=>pe(e,t),setNumber:(e,t)=>pe(e,t),upload:(e)=>{Z(e),gt().then((t)=>{t.pickAndUpload((a)=>{w.get(e)?.commit(a)})})}};function Ua(e,t){if(e!==E)ue="meta",Q="",ee="",ft();if(t.document!==N?.document)ft();E=e,N=t,L()}function rE(e){if(!e)return"Document";if(e.startsWith("pages/"))return"Page";if(e.startsWith("layouts/"))return"Template";if(e.startsWith("components/"))return"Component";let t=Vn(e);return t&&!t.fileBacked?"Entry":"Document"}var Ba="A component has no page settings: its title, search and social details come from the page that uses it.";function Ga(e){return{actions:[{label:"Edit tag and props",run:()=>{cl(e,{selection:[[]],ui:{rightTab:"properties"}})}}],detail:"Its tag name and the props it takes are set on its root element.",message:Ba}}var iD="Open a page to edit its title, description and social preview.",I=null;function sE(e){if(I&&I!==e){if(q(I),ce(I),E===I)E=null,N=null}I=e,Ky()}function Ky(){let e=I;if(!e)return;let t=u.value;if(!t||ot(t)){if(ce(e),E===e)E=null,N=null;if(t)dt(e,t);else q(e);return}if(q(e),rE(t.documentPath)==="Component"){if(ce(e),E===e)E=null,N=null;let r=Ou(e,Ga(t));if(e.firstChild!==r||e.childNodes.length!==1)e.replaceChildren(r);return}let a=t.doc.mode==="content";Ua(e,{applyMutation:a?(r)=>oE(u.value,Ky,r):(r)=>{Ud(u.value,r)},document:a?D_(t.doc.document,t.doc.content.frontmatter):t.doc.document,rerender:Ky})}
|
|
4
|
+
export{zy,YR,ZR,XR,QR,Gg,Yk,$c,eD,Zk,Au,tD,tm,Td,Kg,Xk,Ou,Qk,Wy,Vy,Uy,eE,I_,qy,tE,Gy,R_,nE,nD,Jg,iE,D_,oE,rE,iD,sE,Ky};
|
|
5
5
|
|
|
6
|
-
//# debugId=
|
|
7
|
-
//# sourceMappingURL=studio-
|
|
6
|
+
//# debugId=7878100259392A2B64756E2164756E21
|
|
7
|
+
//# sourceMappingURL=studio-dmn7gpba.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{yT,wT,xT}from"./studio-f8kz3krj.js";import{p,_e}from"./studio-pr23qhrw.js";import{rb,RE,DE}from"./studio-cgjt1zce.js";import{pA,sx,sl,wA,ds,Kl,cx}from"./studio-0khd0xdw.js";import{le}from"./studio-fqs1a22a.js";var t="checking",i=null;function sw(){return _e()&&Boolean(p().cfConnect)}async function ob(){if(!sw())return;i??=(async()=>{try{t=await p().cfConnection?.()??null}catch{t=null}i=null,lm()})(),await i}function CD(){if(sw()&&t==="checking"&&!i)ob()}function kD(){t="checking",i=null}async function d(){let n=await p().cfConnect?.();if(n?.status==="connected"&&!n.connection.accountId){let{openCfAccountPicker:e}=await (le("ce3kp3x1"),import("./cf-account-picker-ce3kp3x1.js"));await e()}ds(),await ob()}function s(){let n={id:"disconnect",label:"Disconnect",run:async()=>{await p().cfDisconnect?.(),ds(),await ob()},variant:"negative"},e=(r)=>({id:r==="Connect"?"connect":"reconnect",label:r,run:d,variant:"accent"}),o={id:"cloudflare",label:"Cloudflare",revoke:()=>{}};if(t==="checking")return{...o,actions:[],connected:!1,detail:"Checking your connection…"};if(!t?.connected)return{...o,actions:[e("Connect")],connected:!1,detail:"Not connected. Connecting publishes this site and runs the assistant on Workers AI."};let c=()=>{n.run()};if(t.needsReconnect)return{...o,actions:[e("Reconnect"),n],connected:!0,detail:"Connection expired. Reconnect to keep publishing and the assistant working.",revoke:c};if(t.needsAccount||!t.accountId)return{...o,actions:[{id:"choose-account",label:"Choose account",run:async()=>{let{openCfAccountPicker:r}=await (le("ce3kp3x1"),import("./cf-account-picker-ce3kp3x1.js"));if(await r())ds(),await ob()},variant:"accent"},n],connected:!0,detail:"Connected, but no account is chosen yet — publishing and the assistant need one.",revoke:c};return{...o,actions:[n],connected:!0,detail:`Connected — ${t.accountName??t.accountId}.`,revoke:c}}function l(){let n=rb(),e=RE();return{connected:Boolean(n),detail:n?`Connected${e?` — account ${e}`:""}.`:"Not connected. Publishing will ask when it needs it.",id:"cloudflare",label:"Cloudflare",revoke:DE}}function u(n){let e={id:n.id,label:n.label,run:async()=>{await cx(n)}};if(n.primary)e.variant="accent";return e}function f(n){return{actions:(n.actions??[]).map((e)=>u(e)),connected:n.connected??!1,detail:n.detail,id:`platform:${n.id}`,label:n.label,revoke:()=>{}}}function $E(){let n=yT(),e=Kl(),o=sl();return[{id:"github",label:"GitHub",detail:n?wT()==="desktop"?"Signed in — the token is in this app's config folder, readable only by you.":"Signed in — a device-flow token is stored in this browser.":"Not signed in. Cloning and pushing will ask when they need it.",connected:Boolean(n),revoke:xT},{id:"ai",label:"AI provider",detail:sx()?`Key stored. Model ${e}${o?` via ${o}`:""}.`:"No key stored. The Assistant section is where one is entered.",connected:sx(),revoke:wA},sw()?s():l(),...pA().map((c)=>f(c))]}function ED(n){let e=$E().find((o)=>o.id===n);if(!e)return!1;return e.revoke(),lm(),!0}var a=new Set;function TD(n){return a.add(n),()=>{a.delete(n)}}function lm(){for(let n of a)n()}
|
|
2
|
+
export{sw,ob,CD,kD,$E,ED,TD,lm};
|
|
3
|
+
|
|
4
|
+
//# debugId=337104E6C78D189C64756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-e8pzjjhf.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{Q}from"./studio-nqxqf8p2.js";import{g,C}from"./studio-
|
|
1
|
+
import{Q}from"./studio-nqxqf8p2.js";import{g,C}from"./studio-hw60n5dh.js";import{Mt,Nt}from"./studio-7cg75gtj.js";import{qe,ft,T,R,Jt,tt}from"./studio-02phtmqn.js";var _={$schema:"https://jxsuite.com/schema/v1",$id:"StudioGithubAuth",$description:"The RFC 8628 device flow's waiting room: the code GitHub minted, the page to type it into, and a Cancel. A `jx-dialog`, so the platform owns modality, Escape, focus restoration and the backdrop — and it is the reason the dialog has no confirm button at all: the answer arrives from GitHub over a poll rather than from anything the reader can press here, so a primary button would be a control with nothing to do. Nothing in this document talks to GitHub: `github/github-auth.ts` keeps the client id, the poll loop, its failure budget and every report the three outcomes raise.",tagName:"jx-dialog",$props:{headline:"Sign in to GitHub",confirmLabel:"",cancelLabel:"Cancel",size:"sm"},attributes:{part:"github-auth"},oncancel:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/cancel"},value:[]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},style:{$description:"Four `.github-auth-*` rules in `styles/overlays.css` become the parts below, and two things in them do not travel. `.github-auth-dialog`'s `padding: 16px 0` was the card's own body padding drawn by hand, and `jx-dialog` already pads its body; `.github-auth-dialog p { font-size: 13px }` was a body size this surface picked for itself, and what the paragraphs now inherit is the dialog's own `--jx-text-md`. The `8px 0` margins go with them — the column is a flex column with a gap, so a margin between two rows would be a second opinion about the same space. The code keeps its 24px, which is above the token scale on purpose: it is a string the reader has to copy onto another screen, and reading it out loud is the whole job of this dialog.",'& [part="device"]':{display:"flex",flexDirection:"column",alignItems:"center",gap:"var(--jx-space-3)",textAlign:"center"},'& [part="lede"], & [part="waiting"]':{margin:"0"},'& [part="code"]':{$description:"`<code>`, not a styled `<div>`: this is a literal string to be transcribed, and the element that says so is also the one a reader's own stylesheet and a screen reader's character-by-character mode already know about. It is this dialog's message, and the one string in it the reader must carry to another screen, so it opts back in to selection against the root's `user-select: none`. `all` rather than `text`: one click selects the whole code, so a copy never leaves a character behind.",userSelect:"all",fontFamily:"var(--font-mono)",fontSize:"24px",fontWeight:"700",letterSpacing:"2px",padding:"var(--jx-space-3) var(--jx-space-4)",background:"var(--hover-bg)",borderRadius:"var(--radius)"},'& [part="link"]':{$description:"The blue this carried as a `var(--accent, …)` fallback is gone: `--accent` is declared on `:root` in `styles/tokens.css`, so the fallback could only ever have painted when the token was missing — which is a theme fault to fix rather than a colour to hard-code.",color:"var(--accent)",textDecoration:"underline"},'& [part="waiting"]':{color:"var(--fg-dim)",fontStyle:"italic"}},children:[{tagName:"div",attributes:{part:"device"},children:[{tagName:"p",attributes:{part:"lede"},textContent:"Enter this code on GitHub to authorize Jx Studio:"},{tagName:"code",attributes:{part:"code"},textContent:"${state.userCode}"},{tagName:"a",attributes:{part:"link",href:"${state.verificationUri}",target:"_blank",rel:"noreferrer"},textContent:"Open ${state.verificationUri}"},{tagName:"p",attributes:{part:"waiting"},textContent:"Waiting for authorization…"}]}]};T("github-auth",_);function A(e){let t=document.createElement("div");t.style.pointerEvents="auto",t.setAttribute(qe,ft("dialog","github-auth")),e.layer.append(t);let s=!1,l=()=>{if(s)return;s=!0,e.onClosed()},u=()=>s,b=g({cancel:()=>{e.onCancel()},closed:l,userCode:e.userCode,verificationUri:e.verificationUri}),n=null,r=R("github-auth",b,t).then(async(i)=>{n=i;let o=i.root;if(u())return i.dispose(),o;if(await Jt(o),u())return o;return Mt(o),o});return{close(){let i=n?.root;if(i instanceof HTMLElement)Nt(i);n?.dispose(),n=null,t.remove(),l()},host:t,ready:r}}var S="jx_github_token",v="Ov23liYVlMFpgjOEPXJH";function P(e){return typeof e==="object"&&e!==null&&"githubAuth"in e&&e.githubAuth!=null}function p(){let e=globalThis,t="__jxPlatform"in e?e.__jxPlatform:void 0;return P(t)?t.githubAuth:null}var f=null,H=!1;function E(e){f=e}function yT(){return f!==null||H||localStorage.getItem("jx_github_token")!==null}function wT(){return p()?"desktop":"browser"}function y(){return f??localStorage.getItem("jx_github_token")}function xT(){f=null,H=!1,localStorage.removeItem("jx_github_token"),p()?.signOut().catch(()=>{})}var O="github.auth",j="Source Control",N="git.signInToGithub",Y=3,z="The request never reached GitHub. GitHub's device-flow endpoints send no CORS headers, so a "+"browser cannot call them directly — the desktop app can. A machine that is offline fails "+"identically, and the browser does not say which happened.";function I(e){C.error("Could not reach GitHub to sign in.",{action:N,detail:`${z}
|
|
2
2
|
|
|
3
|
-
${Q(e)}`,key:O,source:j})}function w(e,t){C.warn(e,{action:N,detail:t,key:O,source:j})}async function F(){let e;try{e=await fetch("https://github.com/login/device/code",{body:JSON.stringify({client_id:v,scope:"repo"}),headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"})}catch(t){return I(t),null}if(!e.ok)return w("GitHub refused to start the sign-in.",`GitHub answered ${e.status}${e.statusText?` ${e.statusText}`:""}.`),null;return await e.json()}async function
|
|
4
|
-
export{
|
|
3
|
+
${Q(e)}`,key:O,source:j})}function w(e,t){C.warn(e,{action:N,detail:t,key:O,source:j})}async function F(){let e;try{e=await fetch("https://github.com/login/device/code",{body:JSON.stringify({client_id:v,scope:"repo"}),headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"})}catch(t){return I(t),null}if(!e.ok)return w("GitHub refused to start the sign-in.",`GitHub answered ${e.status}${e.statusText?` ${e.statusText}`:""}.`),null;return await e.json()}async function aS(){let e=y();if(e)return e;let t=p();if(t)try{let{token:r}=await t.signIn();return E(r),r}catch(r){return w("GitHub sign-in was not completed.",Q(r)),null}let s=await F();if(!s)return null;let{device_code:l,user_code:u,verification_uri:b,interval:n=5}=s;return new Promise((r)=>{let i=!1,o=null,m=0,k=!1,L=(c)=>{if(k)return;if(k=!0,i=!0,o)clearTimeout(o),o=null;r(c)},x=!1,G=()=>{if(x)return;x=!0,D.close()},d=(c)=>{L(c),G()},h=async()=>{if(i)return;try{let a=await(await fetch("https://github.com/login/oauth/access_token",{body:JSON.stringify({client_id:v,device_code:l,grant_type:"urn:ietf:params:oauth:grant-type:device_code"}),headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"})).json();if(m=0,a.access_token){localStorage.setItem(S,a.access_token),d(a.access_token);return}if(a.error==="authorization_pending"){o=setTimeout(h,n*1000);return}if(a.error==="slow_down"){o=setTimeout(h,(n+5)*1000);return}w("GitHub sign-in was not completed.",a.error==="access_denied"?"The authorization was declined on GitHub.":a.error==="expired_token"?"The device code expired before it was entered.":`GitHub answered "${a.error??"an unrecognised response"}".`),d(null)}catch(c){if(m+=1,m>=Y){I(c),d(null);return}o=setTimeout(h,n*1000)}},D=A({layer:tt("dialog"),onCancel:()=>{G()},onClosed:()=>{d(null)},userCode:u,verificationUri:b});o=setTimeout(h,n*1000)})}
|
|
4
|
+
export{yT,wT,xT,aS};
|
|
5
5
|
|
|
6
|
-
//# debugId=
|
|
7
|
-
//# sourceMappingURL=studio-
|
|
6
|
+
//# debugId=8814088C0F0C6FAD64756E2164756E21
|
|
7
|
+
//# sourceMappingURL=studio-f8kz3krj.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var s=Object.create;var{getPrototypeOf:t,defineProperty:n,getOwnPropertyNames:u}=Object;var q=Object.prototype.hasOwnProperty;function v(a){return this[a]}var w,x,op=(a,b,c)=>{var i=a!=null&&typeof a==="object";if(i){var f=b?w??=new WeakMap:x??=new WeakMap,d=f.get(a);if(d)return d}c=a!=null?s(t(a)):{};let g=b||!a||!a.__esModule||!q.call(a,"default")?n(c,"default",{value:a,enumerable:!0}):c;if(a&&typeof a==="object"||typeof a==="function"){for(let e of u(a))if(!q.call(g,e))n(g,e,{get:v.bind(a,e),enumerable:!0})}if(i)f.set(a,g);return g};var pe=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var y=(a)=>a;function z(a,b){this[a]=y.bind(null,b)}var
|
|
2
|
-
export{op,pe,
|
|
1
|
+
var s=Object.create;var{getPrototypeOf:t,defineProperty:n,getOwnPropertyNames:u}=Object;var q=Object.prototype.hasOwnProperty;function v(a){return this[a]}var w,x,op=(a,b,c)=>{var i=a!=null&&typeof a==="object";if(i){var f=b?w??=new WeakMap:x??=new WeakMap,d=f.get(a);if(d)return d}c=a!=null?s(t(a)):{};let g=b||!a||!a.__esModule||!q.call(a,"default")?n(c,"default",{value:a,enumerable:!0}):c;if(a&&typeof a==="object"||typeof a==="function"){for(let e of u(a))if(!q.call(g,e))n(g,e,{get:v.bind(a,e),enumerable:!0})}if(i)f.set(a,g);return g};var pe=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var y=(a)=>a;function z(a,b){this[a]=y.bind(null,b)}var Qi=(a,b)=>{for(var c in b)n(a,c,{get:b[c],enumerable:!0,configurable:!0,set:z.bind(b,c)})};var r,o,m,le=(a,b)=>{for(var[c,i,f]of r||[])for(var d=[a],g=globalThis,e=g.document,p,k,l,h,j;k=d.pop();)if(!o[k]&&(l=i[k])){o[k]=1;for(h=1;h<l.length;h++)d.push(f[l[h]]);if(!b&&k!==a&&(p=e&&e.head)){if(m===void 0)m=(h=e.querySelector("meta[property=csp-nonce]"))&&(h.nonce||h.getAttribute("nonce"))||"";if(j=e.createElement("link"),j.rel="modulepreload",j.crossOrigin="",m)j.nonce=m;j.href=new g.URL(l[0],c),p.appendChild(j)}}},H2=(a,b,c,i)=>{for(var f={},d=0;d<b.length;d++)f[b[d]]=c[d];(r||=[]).push([a,f,b]),o||={},le(b[i],1)};
|
|
2
|
+
export{op,pe,Qi,le,H2};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
5
|
-
//# sourceMappingURL=studio-
|
|
4
|
+
//# debugId=AA4F0B9FACCFC42564756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-fqs1a22a.js.map
|