@jxsuite/studio 10.3.0 → 10.5.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-7sx2vexa.js +4 -0
- package/dist/chunks/adapter-12dxr3z7.js +4 -0
- package/dist/chunks/{add-new-flow-3tkn72ey.js → add-new-flow-any4pw2q.js} +3 -3
- package/dist/chunks/{cf-account-picker-xb8vvt2h.js → cf-account-picker-ajh60k54.js} +3 -3
- package/dist/chunks/cf-settings-hbj16kh3.js +4 -0
- package/dist/chunks/{color-area-h8dbasp1.js → color-area-gbcftzh3.js} +2 -2
- package/dist/chunks/{color-field-qv5r2b16.js → color-field-85136598.js} +3 -3
- package/dist/chunks/{color-slider-nz2mrzky.js → color-slider-w1s3ndd8.js} +2 -2
- package/dist/chunks/color-thzpppyc.js +4 -0
- package/dist/chunks/{combobox-6hs00996.js → combobox-dk98wc5x.js} +3 -3
- package/dist/chunks/components-a98hzqw9.js +4 -0
- package/dist/chunks/content-source-jq3fjs3w.js +4 -0
- package/dist/chunks/{convert-to-repeater-gwzh9gar.js → convert-to-repeater-g66r6qp1.js} +3 -3
- package/dist/chunks/editor-rth1rzj8.js +4 -0
- package/dist/chunks/entry-commands-02j0s19w.js +4 -0
- package/dist/chunks/{extension-sections-338ee35t.js → extension-sections-rqrs7dr0.js} +3 -3
- package/dist/chunks/file-ops-6a49er4c.js +4 -0
- package/dist/chunks/files-b2p9y0yz.js +4 -0
- package/dist/chunks/format-host-7xe57k1s.js +4 -0
- package/dist/chunks/fs-events-0xsy168g.js +4 -0
- package/dist/chunks/grid-open-h3q4fjy5.js +4 -0
- package/dist/chunks/{grid-view-w9nfy203.js → grid-view-0v4hjspb.js} +17 -17
- package/dist/chunks/{icons-gb967qc8.js → icons-j9eksgew.js} +2 -2
- package/dist/chunks/{iframe-entry-btck0e9s.js → iframe-entry-4zqtn3ry.js} +4 -4
- package/dist/chunks/{iframe-entry-b5qgggyp.js → iframe-entry-54kwwhmg.js} +4 -4
- package/dist/chunks/{iframe-entry-42hpmwz5.js → iframe-entry-m24fza30.js} +4 -4
- package/dist/chunks/iframe-host-8jcmaktg.js +4 -0
- package/dist/chunks/{image-bake-4afr4y6a.js → image-bake-m8gzaan9.js} +3 -3
- package/dist/chunks/{image-editor-x7t8jbjn.js → image-editor-0afyws7c.js} +3 -3
- package/dist/chunks/{index-yjrfeks8.js → index-2q88g57p.js} +3 -3
- package/dist/chunks/index-7nj2375a.js +4 -0
- package/dist/chunks/{javascript-hy2mws8v.js → javascript-5sxtr1g7.js} +3 -3
- package/dist/chunks/jsonMode-m6sf47hq.js +13 -0
- package/dist/chunks/jx-validate-808zgbgy.js +4 -0
- package/dist/chunks/layers-0ffdtqjn.js +4 -0
- package/dist/chunks/layers-panel-rw62wtvf.js +4 -0
- package/dist/chunks/{listbox-7gka1h86.js → listbox-k5p41049.js} +2 -2
- package/dist/chunks/lit-html-9bz9rcfv.js +4 -0
- package/dist/chunks/media-library-2a5hdbek.js +4 -0
- package/dist/chunks/media-open-069kzhj4.js +4 -0
- package/dist/chunks/media-picker-4p4pd28y.js +4 -0
- package/dist/chunks/menu-26nez152.js +4 -0
- package/dist/chunks/{monaco-binding-a51py33c.js → monaco-binding-1s2b8snq.js} +3 -3
- package/dist/chunks/monaco-buffer-m9fd2dka.js +4 -0
- package/dist/chunks/monaco-setup-e0crh3v6.js +4 -0
- package/dist/chunks/notify-re3js157.js +4 -0
- package/dist/chunks/platform-rywy3tkg.js +4 -0
- package/dist/chunks/popover-fhdnt4be.js +4 -0
- package/dist/chunks/publish-panel-czkpg8m4.js +4 -0
- package/dist/chunks/{publish-quick-w3nxd7q4.js → publish-quick-b9wbhqj6.js} +3 -3
- package/dist/chunks/publish-workspace-yy6d23b7.js +4 -0
- package/dist/chunks/quick-search-tp7pjnmv.js +4 -0
- package/dist/chunks/references-wd2yj8s1.js +4 -0
- package/dist/chunks/right-panel-x971k0zc.js +4 -0
- package/dist/chunks/source-control-k4p00hpe.js +4 -0
- package/dist/chunks/{split-m5rwn31z.js → split-qh21j2b0.js} +2 -2
- package/dist/chunks/{studio-v5wktj6f.js → studio-151kgn69.js} +4 -4
- package/dist/chunks/studio-15mfah02.js +10 -0
- package/dist/chunks/studio-1a7zshnv.js +5 -0
- package/dist/chunks/studio-1d8m5s38.js +16 -0
- package/dist/chunks/studio-35pmfjtx.js +5 -0
- package/dist/chunks/{studio-3na1r48j.js → studio-3yr1zdp9.js} +8 -8
- package/dist/chunks/studio-43pynnhz.js +5 -0
- package/dist/chunks/studio-44xqe0b7.js +4 -0
- package/dist/chunks/{studio-hh394phe.js → studio-48yzqzqr.js} +4 -4
- package/dist/chunks/{studio-nskxe9q1.js → studio-4jy967rj.js} +5 -5
- package/dist/chunks/{studio-waekn290.js → studio-4ncxzw5m.js} +4 -4
- package/dist/chunks/{studio-pm17wdc4.js → studio-4s5bka8t.js} +4 -4
- package/dist/chunks/{studio-5tet77de.js → studio-4z0cdh16.js} +3 -3
- package/dist/chunks/studio-5rq3e4q5.js +5 -0
- package/dist/chunks/{studio-2ggfzrrd.js → studio-69g6a0jn.js} +4 -4
- package/dist/chunks/studio-6hcfm9q3.js +5 -0
- package/dist/chunks/studio-6mf31e16.js +5 -0
- package/dist/chunks/studio-6sxnqqw8.js +5 -0
- package/dist/chunks/{studio-0939t1q1.js → studio-7qqb7hb8.js} +4 -4
- package/dist/chunks/{studio-5n193zqd.js → studio-7qr8k0v2.js} +4 -4
- package/dist/chunks/{studio-0x6f3nk9.js → studio-8ncm9zwx.js} +4 -4
- package/dist/chunks/studio-8w5pa88p.js +7 -0
- package/dist/chunks/{studio-3qr08sxq.js → studio-9f5vcb4w.js} +3 -3
- package/dist/chunks/studio-aaw7wxv8.js +5 -0
- package/dist/chunks/studio-afx9brsc.js +5 -0
- package/dist/chunks/studio-ajfq4fmr.js +5 -0
- package/dist/chunks/{studio-nn4f9m9c.js → studio-ber1dgte.js} +4 -4
- package/dist/chunks/{studio-sce30r7b.js → studio-bk0anq3b.js} +3 -3
- package/dist/chunks/{studio-0gvvqj3h.js → studio-bmwgj8ez.js} +4 -4
- package/dist/chunks/{studio-321ym1tt.js → studio-bpzwhn88.js} +4 -4
- package/dist/chunks/{studio-g9brbewz.js → studio-c72v1kwc.js} +4 -4
- package/dist/chunks/{studio-tpxcryf2.js → studio-cv6gnjqd.js} +4 -4
- package/dist/chunks/{studio-90zkgne5.js → studio-czpmzs9r.js} +7 -7
- package/dist/chunks/{studio-3c10v2q1.js → studio-d5f7sskn.js} +4 -4
- package/dist/chunks/studio-dmgh2rrj.js +5 -0
- package/dist/chunks/{studio-b68k0z00.js → studio-dst8y8vh.js} +4 -4
- package/dist/chunks/studio-ehj3csbm.js +6 -0
- package/dist/chunks/{studio-thz5t120.js → studio-ek4fb4eb.js} +4 -4
- package/dist/chunks/studio-ep1384t9.js +5 -0
- package/dist/chunks/{studio-abh9kfdh.js → studio-eq5vqn1q.js} +4 -4
- package/dist/chunks/studio-erjccagy.js +5 -0
- package/dist/chunks/studio-ex1644g2.js +5 -0
- package/dist/chunks/studio-f3awr5nc.js +12 -0
- package/dist/chunks/studio-f69wcajk.js +9 -0
- package/dist/chunks/{studio-p2a03pgm.js → studio-g65t6svn.js} +4 -4
- package/dist/chunks/{studio-3q7mhbgx.js → studio-gw83z798.js} +5 -5
- package/dist/chunks/{studio-nwynxqtb.js → studio-hy936516.js} +4 -4
- package/dist/chunks/studio-j3bq30yz.js +5 -0
- package/dist/chunks/studio-j52ks8q7.js +5 -0
- package/dist/chunks/{studio-g0hxtcga.js → studio-jqvke4ac.js} +4 -4
- package/dist/chunks/{studio-bct64zmj.js → studio-k05g7efh.js} +4 -4
- package/dist/chunks/studio-kefs4sz4.js +5 -0
- package/dist/chunks/{studio-s7t4vp1d.js → studio-ketrgtph.js} +5 -5
- package/dist/chunks/studio-m3jrjfhy.js +14 -0
- package/dist/chunks/{studio-45mj4jqe.js → studio-m8hesdrw.js} +4 -4
- package/dist/chunks/{studio-k0xzrse2.js → studio-n271vdsg.js} +36 -36
- package/dist/chunks/studio-n4pnf0sw.js +5 -0
- package/dist/chunks/{studio-wfct4h6n.js → studio-ncwx602y.js} +4 -4
- package/dist/chunks/{studio-423tfdte.js → studio-nngc45ct.js} +4 -4
- package/dist/chunks/{studio-eqcddvc2.js → studio-nv5eq0f7.js} +173 -173
- package/dist/chunks/{studio-ea6r1zyr.js → studio-nzp0sqjg.js} +4 -4
- package/dist/chunks/{studio-k2evngrj.js → studio-pgze9p34.js} +5 -5
- package/dist/chunks/studio-ph17an19.js +5 -0
- package/dist/chunks/studio-pte5w7rf.js +9 -0
- package/dist/chunks/studio-pv1ts08p.js +6 -0
- package/dist/chunks/studio-q509sqt8.js +5 -0
- package/dist/chunks/{studio-stahswgb.js → studio-qarg1xf9.js} +6 -6
- package/dist/chunks/studio-r5g7fx7q.js +9 -0
- package/dist/chunks/studio-s49y6m5b.js +5 -0
- package/dist/chunks/studio-s4k1v7dt.js +7 -0
- package/dist/chunks/studio-t46rt6gx.js +5 -0
- package/dist/chunks/{studio-y1b86ast.js → studio-td3h1644.js} +4 -4
- package/dist/chunks/{studio-a65kbs2e.js → studio-thgexj3w.js} +7 -7
- package/dist/chunks/{studio-vpevkfxw.js → studio-veh91hjv.js} +4 -4
- package/dist/chunks/studio-vswmz40d.js +6 -0
- package/dist/chunks/{studio-daksw8kh.js → studio-w3aafbpk.js} +4 -4
- package/dist/chunks/studio-w4mfaaam.js +5 -0
- package/dist/chunks/{studio-4zd6an2b.js → studio-wn2cmf9q.js} +4 -4
- package/dist/chunks/studio-x5ffyssw.js +5 -0
- package/dist/chunks/{studio-swedpd82.js → studio-x5py815g.js} +4 -4
- package/dist/chunks/{studio-4fnb5648.js → studio-xh6rf05g.js} +4 -4
- package/dist/chunks/studio-z6s56dzz.js +5 -0
- package/dist/chunks/{studio-nvcn2ykc.js → studio-zav9hgb3.js} +4 -4
- package/dist/chunks/{studio-wse1rs8t.js → studio-ze1sm147.js} +6 -6
- package/dist/chunks/{studio-hfxttkyr.js → studio-zkkt13qd.js} +4 -4
- package/dist/chunks/studio-zn7ysyzb.js +5 -0
- package/dist/chunks/{studio-nf8esxxc.js → studio-ztzf8mce.js} +4 -4
- package/dist/chunks/{studio-1410q5dw.js → studio-zzgp5yka.js} +4 -4
- package/dist/chunks/{tooltip-dj1pvgz7.js → tooltip-gtx40bjg.js} +3 -3
- package/dist/chunks/{tree-j0ebwr5s.js → tree-a19s1c05.js} +2 -2
- package/dist/chunks/tsMode-3f116hth.js +14 -0
- package/dist/chunks/workspace-home-61n1jz3q.js +4 -0
- package/dist/chunks/workspace-sheek6zw.js +4 -0
- package/dist/chunks/{ws-client-arz2qsy9.js → ws-client-cb49m87s.js} +3 -3
- package/dist/iframe-entry.js +14 -14
- package/dist/manifest.json +82 -82
- package/dist/studio.js +97 -96
- package/dist/workers/ts.worker.js +3 -3
- package/package.json +11 -11
- package/src/browse/library-layouts.ts +9 -12
- package/src/browse/library-pane.ts +22 -16
- package/src/browse/library-source.ts +3 -4
- package/src/canvas/canvas-live-render.ts +2 -5
- package/src/canvas/canvas-page-context.ts +5 -0
- package/src/content/entry-commands.ts +32 -27
- package/src/content/entry-editor.ts +46 -44
- package/src/content/entry-inspector.ts +15 -12
- package/src/content/entry-model.ts +3 -3
- package/src/content/entry-summaries.ts +5 -5
- package/src/content/hold-state.ts +172 -0
- package/src/content/page-summaries.ts +10 -14
- package/src/editor/inline-edit.ts +6 -1
- package/src/editor/repeater-scope.ts +333 -74
- package/src/grid/sources/content-source.ts +42 -66
- package/src/panels/block-action-bar.ts +3 -4
- package/src/panels/events-panel.ts +6 -2
- package/src/panels/formula-workspace.ts +9 -0
- package/src/panels/properties-panel.ts +127 -35
- package/src/panels/statement-editor.ts +4 -0
- package/src/panels/tab-strip.ts +29 -26
- package/src/services/ai-project-tools.ts +3 -3
- package/src/services/ai-tools.ts +5 -5
- package/src/services/ai-write-report.ts +22 -4
- package/src/services/context-manager.ts +110 -2
- package/src/services/document-assistant.ts +2 -2
- package/src/services/harness/chat-reducer.ts +9 -4
- package/src/services/render-critic.ts +234 -12
- package/src/services/tool-executor.ts +16 -8
- package/src/surfaces/collections-panel.json +1 -1
- package/src/surfaces/collections-panel.ts +1 -1
- package/src/surfaces/entry-editor.json +10 -10
- package/src/surfaces/entry-editor.ts +22 -19
- package/src/surfaces/entry-inspector.json +11 -11
- package/src/surfaces/entry-inspector.ts +17 -10
- package/src/surfaces/inspector-dock.json +3 -3
- package/src/surfaces/tab-strip.json +5 -5
- package/src/surfaces/tab-strip.ts +2 -2
- package/src/types.ts +2 -0
- package/src/ui/expression-editor.ts +10 -5
- package/src/ui/schema-form.ts +18 -1
- package/src/utils/edit-display.ts +27 -1
- package/dist/chunks/2020-906vx2dq.js +0 -4
- package/dist/chunks/adapter-hnvad61x.js +0 -4
- package/dist/chunks/cf-settings-mkbcz4z2.js +0 -4
- package/dist/chunks/color-04361ttk.js +0 -4
- package/dist/chunks/components-w5zqwva1.js +0 -4
- package/dist/chunks/content-source-1vzxq1ba.js +0 -4
- package/dist/chunks/editor-wvf5e6j9.js +0 -4
- package/dist/chunks/entry-commands-mx2whrjx.js +0 -4
- package/dist/chunks/file-ops-9bxvk59j.js +0 -4
- package/dist/chunks/files-t07yqqej.js +0 -4
- package/dist/chunks/format-host-5ja5gxyk.js +0 -4
- package/dist/chunks/fs-events-3424ezp3.js +0 -4
- package/dist/chunks/grid-open-1mpq9mzb.js +0 -4
- package/dist/chunks/iframe-host-wsg0bn73.js +0 -4
- package/dist/chunks/index-f9qr7kzh.js +0 -4
- package/dist/chunks/jsonMode-vj30te2h.js +0 -13
- package/dist/chunks/jx-validate-ttr5ewf0.js +0 -4
- package/dist/chunks/layers-m49nmwvx.js +0 -4
- package/dist/chunks/layers-panel-hvy2e549.js +0 -4
- package/dist/chunks/lit-html-k2mb9k0r.js +0 -4
- package/dist/chunks/media-library-ae67q4at.js +0 -4
- package/dist/chunks/media-open-yp9jm834.js +0 -4
- package/dist/chunks/media-picker-s41ngdfr.js +0 -4
- package/dist/chunks/menu-d2jxpgma.js +0 -4
- package/dist/chunks/monaco-buffer-pa0g6ax7.js +0 -4
- package/dist/chunks/monaco-setup-g9kterhx.js +0 -4
- package/dist/chunks/notify-bwehrp7q.js +0 -4
- package/dist/chunks/platform-kv0k65cy.js +0 -4
- package/dist/chunks/popover-9tf4cjrk.js +0 -4
- package/dist/chunks/publish-panel-gzfxcm0t.js +0 -4
- package/dist/chunks/publish-workspace-dppd82tc.js +0 -4
- package/dist/chunks/quick-search-tdxaam55.js +0 -4
- package/dist/chunks/references-vqyr5s9x.js +0 -4
- package/dist/chunks/right-panel-0yrw4cgz.js +0 -4
- package/dist/chunks/source-control-6fk72me2.js +0 -4
- package/dist/chunks/studio-0khd8xtx.js +0 -4
- package/dist/chunks/studio-0w3541dg.js +0 -7
- package/dist/chunks/studio-15hwqgd8.js +0 -5
- package/dist/chunks/studio-1ks5d9y4.js +0 -5
- package/dist/chunks/studio-3xk9zdgb.js +0 -5
- package/dist/chunks/studio-4f7thq0p.js +0 -5
- package/dist/chunks/studio-53wy9ek3.js +0 -5
- package/dist/chunks/studio-7rrdbvex.js +0 -5
- package/dist/chunks/studio-8kx6m0rg.js +0 -5
- package/dist/chunks/studio-9dq7rwc7.js +0 -5
- package/dist/chunks/studio-9qx1ywbv.js +0 -9
- package/dist/chunks/studio-aam8zt8z.js +0 -5
- package/dist/chunks/studio-b4e0ftkt.js +0 -5
- package/dist/chunks/studio-bz0b5brj.js +0 -6
- package/dist/chunks/studio-cfnn70h1.js +0 -5
- package/dist/chunks/studio-e7vjyp04.js +0 -10
- package/dist/chunks/studio-egnjpyde.js +0 -9
- package/dist/chunks/studio-ejrypvmq.js +0 -5
- package/dist/chunks/studio-f8tyeyzt.js +0 -5
- package/dist/chunks/studio-fj6c905s.js +0 -5
- package/dist/chunks/studio-fkrr7kgg.js +0 -9
- package/dist/chunks/studio-fspe7m9t.js +0 -5
- package/dist/chunks/studio-ggx3j7nd.js +0 -5
- package/dist/chunks/studio-j0zf5x2x.js +0 -5
- package/dist/chunks/studio-jeb7hth3.js +0 -5
- package/dist/chunks/studio-k1xqrgm5.js +0 -5
- package/dist/chunks/studio-k3we3kqb.js +0 -5
- package/dist/chunks/studio-n9qba0gx.js +0 -5
- package/dist/chunks/studio-nzemfbkk.js +0 -14
- package/dist/chunks/studio-q80fg1d6.js +0 -12
- package/dist/chunks/studio-r050sez0.js +0 -6
- package/dist/chunks/studio-s9fng7m8.js +0 -7
- package/dist/chunks/studio-wgc54sxf.js +0 -5
- package/dist/chunks/studio-wqfaqw4m.js +0 -5
- package/dist/chunks/studio-x0gsfr1d.js +0 -16
- package/dist/chunks/studio-xpx91fby.js +0 -6
- package/dist/chunks/studio-yrcrncev.js +0 -5
- package/dist/chunks/studio-yzpskb0j.js +0 -5
- package/dist/chunks/studio-zfdbmhp3.js +0 -5
- package/dist/chunks/tsMode-jg1dtphj.js +0 -14
- package/dist/chunks/workspace-9btkc8tk.js +0 -4
- package/dist/chunks/workspace-home-qcc4z5ag.js +0 -4
- package/src/content/draft-state.ts +0 -108
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{X}from"./studio-9c6cbq2c.js";import{ae}from"./studio-wqfaqw4m.js";import{p,ye}from"./studio-4fnb5648.js";import{nt}from"./studio-tpxcryf2.js";import{Hm,no,Bm,jC,mO,Cx,u}from"./studio-x0gsfr1d.js";import{Zl,IL,Ri,jd,DL,NL}from"./studio-stahswgb.js";import{as,Hc,TL}from"./studio-a65kbs2e.js";import{ks,KS,Pb,Us,iL,oL,rL,sL,aL,lL,cL,dL,uL,hL,pL,fL,Yw,mL,gL}from"./studio-8kx6m0rg.js";import{Vb}from"./studio-53wy9ek3.js";import{pb,hw,hm,jD,pm,X_,HD,fb,zD,pw}from"./studio-nf8esxxc.js";import{C}from"./studio-4f7thq0p.js";import{Ln,E,R}from"./studio-9dq7rwc7.js";import{me,te,g}from"./studio-3qr08sxq.js";import{n,v}from"./studio-k3we3kqb.js";var Y={$schema:"https://jxsuite.com/schema/v1",$id:"StudioSettingsDeploy",$description:"Publish › Hosting's build adapter (studio.md §22.8), which was Project Settings › Deploy: one row over `build.adapter`, and the sentence a failed write leaves behind. It draws no heading of its own: Hosting's \"How it is built\" section heads it, and a second title inside that card would name the same thing twice. The adapter (`surfaces/settings-deploy.ts`) hands in the chosen adapter, the enumeration it is chosen from and whatever the last write had to say; the document draws them and hands the change straight back. Nothing here reads `project.json`: a section that re-read the config while drawing would be a second opinion about a file one module already owns.",tagName:"section",attributes:{part:"deploy"},style:{$description:"What is NOT in this block is most of the conversion. Four borrowed rules had nothing to transcribe: `.settings-field-label` and `.settings-field-desc` drew a row's label and the sentence under it, and `jx-field` draws both — with the label actually NAMING the control, which the bare `<label class=…>` beside the picker never did; `.settings-field` added a 20px bottom margin to separate one row from the next, and this section has one row, so the margin separated it from the end of the section; and `.settings-section` was never defined by any stylesheet at all, which is why it sits in `check-styles.ts`'s allow-list rather than in a rule.",display:"block",fontFamily:"var(--jx-font-sans)",color:"var(--fg)",'& [part="section-error"]':{$description:'A write that failed, said under the section title rather than pinned to the picker: settings save on change, so a silent rejection would read as "my edit just vanished", and what failed was the whole file rather than the value. Its size read `--spectrum-font-size-75` with a 12px fallback, which resolved only inside `<sp-theme>` — a document is mounted in the settings pane, where that name is not in scope and the fallback is all it would ever have taken — so the size is the kit\'s scale and the colour is the studio layer\'s. It is `section-error` rather than `error` because the adapter picker is a `jx-select`, which draws a permanent `[part="error"]` of its own in this same light-DOM tree: a rule on that name would give the picker\'s own refusal sentence this 16px margin too.',margin:"0 0 16px",fontSize:"var(--jx-text-md)",color:"var(--danger)"},'& [part="adapter"]':{$description:"How wide the picker may grow. A control offering five short words does not want the width of a 900px pane, and 320px is the one thing `.settings-build-adapter` said that the kit does not — the same measure the two pickers in Locales take.",maxWidth:"320px"}},children:[{tagName:"div",attributes:{part:"section-error-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasError"},cases:{true:{tagName:"p",attributes:{part:"section-error",role:"alert"},textContent:"${state.error}"}}},{tagName:"jx-field",attributes:{part:"row","data-field":"adapter"},$props:{span:!0,label:"Build adapter",description:"What the site is built for. Static writes plain files; the others emit a server entry for that runtime."},children:[{tagName:"jx-select",attributes:{part:"adapter"},$props:{size:"sm",options:{$ref:"#/state/adapters"},value:{$ref:"#/state/adapter"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setAdapter"},value:[{$ref:"event#/target/value"}]}]}}]}]};E("settings-deploy",Y);function Q(t,e){if(e.adapter!==void 0)t.adapter=e.adapter;if(e.adapters!==void 0)t.adapters=e.adapters;if(e.error!==void 0)t.error=e.error,t.hasError=e.error!==""}function Z(t,e,a){let r=g({adapter:"",adapters:[],error:"",hasError:!1,setAdapter:a.setAdapter});Q(r,e),t.replaceChildren();let i=null,l=!1;return R("settings-deploy",r,t).then((o)=>{if(l){o.dispose();return}i=o}),{connected:()=>!l&&(i===null?t.childNodes.length===0:i.root.parentNode===t),dispose(){l=!0,i?.dispose(),i=null},update:(o)=>Q(r,o)}}var tt={$schema:"https://jxsuite.com/schema/v1",$id:"StudioSettingsRawJson",$description:"Project Settings › Raw JSON: `project.json` as it is written, and the way through to editing it as text. The adapter (`surfaces/settings-rawjson.ts`) hands in the serialisation the save chokepoint itself produced, so what is drawn is what a save writes rather than a second pretty-printer that would disagree with the file by an indent. The button opens the SAME tab in the Code editor — one document, three editors (`studio.md` §9.3) — so switching to the text and back keeps one undo stack instead of forking two.",tagName:"section",attributes:{part:"rawjson"},style:{$description:"Two of the rules this section borrowed are gone rather than moved. `.settings-field-desc` styled the sentence under the title, and it is kept here because there is no `jx-field` in this section to draw it — a `<pre>` is not a control and wrapping one in a row would give the file a label it does not need. `.settings-edit-as-code` set `align-self: flex-start` on the button, which did nothing: its parent carried `.settings-section`, a class no stylesheet defines, so there was no flex container for the declaration to be about — and `jx-button` is `inline-flex`, so it already sits at the left of a block.",display:"block",fontFamily:"var(--jx-font-sans)",color:"var(--fg)",'& [part="title"]':{margin:"0 0 16px",fontSize:"16px",fontWeight:"600",color:"var(--fg)"},'& [part="intro"]':{$description:"The sentence under the title. Its size read `--spectrum-font-size-75` with a 12px fallback, a name that resolves only inside `<sp-theme>`; a document is mounted in the settings pane, so the fallback is all it could ever have taken and the size is the kit's scale now.",margin:"0 0 6px",fontSize:"var(--jx-text-md)",color:"var(--fg-dim)"},'& [part="file"]':{$description:"The file's name, said in the prose as the file it is. It borrowed a bare `<code>` element and whatever the page happened to give one; a document's styling is its own, so the face is stated here.",fontFamily:"var(--font-mono)"},'& [part="json"]':{$description:'`project.json` as it is saved. It scrolls in its own box: a 250-line file must not push the "Edit as code" action off the bottom of the section. Its background read `var(--bg-dim, var(--bg))` and `--bg-dim` is declared nowhere in the token layer, so the fallback is what has always painted it — written as what it resolves to rather than as a name that never resolved.',margin:"0 0 12px",padding:"12px",maxHeight:"420px",overflow:"auto",border:"1px solid var(--border)",borderRadius:"var(--radius)",background:"var(--bg)",fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-md)",color:"var(--fg)",whiteSpace:"pre"}},children:[{tagName:"h3",attributes:{part:"title"},textContent:"Raw JSON"},{tagName:"p",attributes:{part:"intro"},children:["The whole of ",{tagName:"code",attributes:{part:"file"},textContent:"project.json"},", as it is saved. Editing it as code opens the same document in the Code editor — one undo stack, one dirty flag."]},{tagName:"pre",attributes:{part:"json"},textContent:"${state.json}"},{tagName:"jx-button",attributes:{part:"edit"},$props:{size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editAsCode"}}]},children:[{tagName:"span",textContent:"Edit as code"}]}]};E("settings-rawjson",tt);function et(t,e){if(e.json!==void 0)t.json=e.json}function at(t,e,a){let r=g({editAsCode:a.editAsCode,json:""});et(r,e),t.replaceChildren();let i=null,l=!1;return R("settings-rawjson",r,t).then((o)=>{if(l){o.dispose();return}i=o}),{connected:()=>!l&&(i===null?t.childNodes.length===0:i.root.parentNode===t),dispose(){l=!0,i?.dispose(),i=null},update:(o)=>et(r,o)}}var I=new WeakMap;function W(){return C?.projectConfig??{}}var kt=[{label:"Static",value:"static"},{label:"Bun",value:"bun"},{label:"Node",value:"node"},{label:"Cloudflare Workers",value:"cloudflare-workers"},{label:"Cloudflare Pages",value:"cloudflare-pages"}],N=new WeakMap;function rt(t){return{adapter:W().build?.adapter||"static",adapters:kt.map((e)=>({label:e.label,value:e.value})),error:I.get(t)??""}}async function St(t,e){try{await no(e),I.delete(t)}catch(a){I.set(t,`Could not save project.json — ${X(a)}`)}D(t)}var it=new WeakMap;function Ct(t){let e=it.get(t);if(!e)e={setAdapter:(a)=>{N.get(t)?.update({adapter:a}),St(t,{build:{...W().build,adapter:a}})}},it.set(t,e);return e}function D(t){let e=N.get(t);if(e?.connected()){e.update(rt(t));return}e?.dispose(),N.set(t,Z(t,rt(t),Ct(t)))}function B(t){N.get(t)?.dispose(),N.delete(t)}var st=new WeakMap;function ot(){return{json:Hm(W())}}function MD(t,e){let a=st.get(t);if(a?.connected()){a.update(ot());return}a?.dispose(),st.set(t,at(t,ot(),{editAsCode:e.editAsCode}))}var lt={$schema:"https://jxsuite.com/schema/v1",$id:"StudioPublishWorkspace",$description:"The Publish workspace's home (studio.md §22.8): four sub-tabs over one body. Review changes is the change list grouped the way the site is organised (Pages, each content collection, Components, Layouts, Styles, Media, Other), each file's checkbox including it in the next publish (staging it), its Before and after opening the comparison (§21), then the checks, the destination, the summary and the one primary button. Deploys is the live site, any deploy running now with its steps, the history the host returns and the branch previews. Branches is the branch list with switch and create. Hosting is where the project is saved, where the site is hosted, the build adapter (an island: the Deploy section that moved here from Project Settings) and the address, with the deploy checklist under them. `publish/publish-workspace.ts` keeps every decision and hands this document strings and booleans; nothing here knows what a status letter means, which destination a host allows or what a deployment's stage is called.",tagName:"div",attributes:{part:"publish","data-jx-region":"${state.region}","data-tab":"${state.tab}","aria-labelledby":"${state.titleId}",role:"region"},style:{$description:"Fills the pane's stage by its own geometry, as the Media home does: the stage is `position: relative`, so the workspace takes the whole of it and scrolls its own body. The status colours are the theme's semantic tokens, so a check, a badge and a deployment's state follow light and dark without a hex anywhere.",position:"absolute",inset:"0",display:"flex",flexDirection:"column",boxSizing:"border-box",fontFamily:"var(--jx-font-sans)",fontSize:"var(--jx-text-md)",color:"var(--fg)",background:"var(--bg)",'& [part="head"]':{display:"flex",alignItems:"baseline",flexWrap:"wrap",gap:"var(--jx-space-3)",padding:"var(--jx-space-4) var(--jx-space-5) 0"},'& [part="heading"]':{margin:"0",fontSize:"var(--jx-text-lg)",fontWeight:"600"},'& [part="headline"]':{color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"},'& [part="tabs"]':{padding:"0 var(--jx-space-5)",flexShrink:"0"},'& [part="body"]':{flex:"1",minHeight:"0",overflowY:"auto",padding:"var(--jx-space-4) var(--jx-space-5) var(--jx-space-6)",containerType:"inline-size",containerName:"publish-body"},'& [part="review"]':{$description:"Two columns as the board draws them, the changes on the left and the publish card on the right; below 760px of pane the card drops under the list rather than squeezing it.",display:"grid",gridTemplateColumns:"minmax(0, 1fr) minmax(260px, 340px)",gap:"var(--jx-space-5)",alignItems:"start"},"@container publish-body (max-width: 760px)":{'& [part="review"]':{gridTemplateColumns:"minmax(0, 1fr)"}},'& [part="changes-column"], & [part="publish-column"], & [part="deploys"], & [part="branches"], & [part="hosting"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-5)",minWidth:"0"},'& [part="deploys"], & [part="branches"], & [part="hosting"]':{maxWidth:"760px"},"& section":{display:"flex",flexDirection:"column",gap:"var(--jx-space-3)",minWidth:"0"},'& [part="section-head"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-3)"},'& [part="section-heading"]':{margin:"0",fontSize:"var(--jx-text-sm)",fontWeight:"600",color:"var(--fg-dim)",textTransform:"uppercase",letterSpacing:"0.04em"},'& [part="publish-column"] > section':{padding:"var(--jx-space-4)",border:"1px solid var(--border)",borderRadius:"var(--jx-radius-md)",background:"var(--bg-panel)"},'& [part="sync-bar"]':{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"var(--jx-space-3)",paddingBottom:"var(--jx-space-3)",borderBottom:"1px solid var(--border)"},'& [part="sync-text"]':{display:"flex",flex:"1 1 auto",flexDirection:"column",minWidth:"0"},'& [part="sync-label"]':{fontWeight:"600"},'& [part="sync-time"], & [part="included"], & [part="file-dir"], & [part="history-meta"], & [part="choice-note"], & [part="live-summary"], & [part="hosting-summary"], & [part="branch-sync"], & [part="branch-summary"], & [part="deployment-when"]':{color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"},'& [part="changes-bar"]':{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"var(--jx-space-3)"},'& [part="groups"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-3)"},'& [part="group-name"]':{fontSize:"var(--jx-text-xs)",color:"var(--fg-dim)",fontFamily:"var(--font-mono)"},'& [part="file-row"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-2)",padding:"2px var(--jx-space-2)",borderRadius:"var(--jx-radius-sm)"},'& [part="file-row"]:hover, & [part="file-row"]:focus-within':{background:"var(--hover-bg)"},'& [part="file-text"]':{display:"flex",flex:"1",alignItems:"baseline",gap:"var(--jx-space-2)",minWidth:"0",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},'& [part="file-dir"]':{overflow:"hidden",textOverflow:"ellipsis"},'& [part="badge"]':{$description:"One letter and a colour, which is why the checkbox and the row's buttons carry the status in words as well.",flex:"none",width:"16px",color:"var(--signal)",fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-xs)",fontWeight:"700",textAlign:"center"},'& [part="badge"][data-status="A"], & [part="badge"][data-status="U"]':{color:"var(--success)"},'& [part="badge"][data-status="D"]':{color:"var(--danger)"},'& [part="badge"][data-status="R"]':{color:"var(--tag)"},'& [part="empty-message"], & [part="status"], & [part="live-none"]':{margin:"0",color:"var(--fg-dim)",lineHeight:"1.5"},'& [part="empty"]':{display:"flex",flexDirection:"column",alignItems:"center",gap:"var(--jx-space-3)",padding:"var(--jx-space-6)",textAlign:"center"},'& [part="empty"] > [part="empty-message"]':{maxWidth:"48ch"},'& [part="empty-actions"], & [part="command-row"], & [part="publish-actions"]':{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"var(--jx-space-2)"},'& [part="history-list"], & [part="check-list"], & [part="deployment-list"], & [part="branch-list"], & [part="checklist-steps"], & [part="activity-steps"]':{margin:"0",padding:"0",listStyle:"none",display:"flex",flexDirection:"column",gap:"var(--jx-space-1)"},'& [part="history-entry"]':{display:"flex",flexWrap:"wrap",gap:"var(--jx-space-2)",alignItems:"baseline"},'& [part="history-hash"]':{fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-xs)",color:"var(--fg-dim)"},'& [part="history-message"]':{flex:"1",minWidth:"0"},'& [part="checklist-step"], & [part="activity-step"]':{display:"flex",alignItems:"baseline",gap:"var(--jx-space-2)"},'& [part="check"]':{$description:"Centred, not baseline-aligned: the row can hold a small kit button, and a small kit control is layout-contained, so it has no baseline to align on.",display:"flex",alignItems:"center",gap:"var(--jx-space-2)"},'& [part="check-text"]':{flex:"1",minWidth:"0",lineHeight:"1.4"},'& [part="check-icon"], & [part="step-icon"]':{$description:"A kit icon for a check or a checklist link, sized by the kit's own property so it stays square; the activity feed's steps still draw a one-character glyph, which `minWidth` keeps on the same column.",flex:"none",minWidth:"1em",textAlign:"center","--jx-icon-size":"1em",color:"var(--fg-dim)"},'& [part="checklist-step"] > [part="step-icon"]':{$description:"A baseline-aligned row places a kit icon's bottom edge on the text baseline, which draws it high; the negative end margin lowers it onto the line's middle.",marginBlockEnd:"-0.15em"},'& [data-state="done"] > [part="check-icon"], & [data-state="done"] > [part="step-icon"]':{color:"var(--success)"},'& [data-state="failed"] > [part="check-icon"], & [data-state="failed"] > [part="step-icon"]':{color:"var(--danger)"},'& [data-state="todo"] > [part="check-icon"]':{color:"var(--warning)"},'& [part="destinations"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-2)"},'& [part="destination-card"] > [part="control"]':{$description:"A destination is a card with a name and a sentence saying what it does, inside one radio, as Add new's choice cards are: the reader hears one name and sees both lines.",width:"100%",height:"auto",flexDirection:"column",alignItems:"flex-start",textAlign:"start",padding:"var(--jx-space-2) var(--jx-space-3)",gap:"2px",whiteSpace:"normal"},'& [part="choice-name"]':{display:"block",fontWeight:"600"},'& [part="choice-note"]':{display:"block"},'& [part="refusal"], & [part="blocker"]':{margin:"0",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="review-line"], & [part="live-site"]':{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"var(--jx-space-2)",margin:"0"},'& [part="live-url"]':{fontWeight:"600",wordBreak:"break-all"},'& [part="live-summary"], & [part="hosting-summary"], & [part="host-name"], & [part="branch-note"]':{margin:"0",lineHeight:"1.5"},'& [part="host-name"]':{fontWeight:"600"},'& [part="activity"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-2)",padding:"var(--jx-space-3)",border:"1px solid var(--border)",borderRadius:"var(--jx-radius-md)"},'& [part="activity-head"]':{display:"flex",justifyContent:"space-between",gap:"var(--jx-space-3)"},'& [part="activity-title"]':{fontWeight:"600"},'& [part="activity-status"]':{color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"},'& [part="deployment"]':{display:"grid",gridTemplateColumns:"minmax(64px, auto) minmax(0, 1fr) auto auto",alignItems:"center",gap:"var(--jx-space-3)",padding:"var(--jx-space-1) 0",borderBottom:"1px solid var(--border)"},'& [part="deployment-label"]':{minWidth:"0",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},'& [part="deployment-status"]':{fontSize:"var(--jx-text-sm)"},'& [part="deployment-status"][data-status="success"]':{color:"var(--success)"},'& [part="deployment-status"][data-status="failure"]':{color:"var(--danger)"},'& [part="branch"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-2)",padding:"var(--jx-space-1) var(--jx-space-2)",borderRadius:"var(--jx-radius-sm)","--jx-icon-size":"16px"},'& [part="branch"]:hover':{background:"var(--hover-bg)"},'& [part="branch-icon"]':{color:"var(--fg-dim)"},'& [part="branch-name"]':{flex:"1",minWidth:"0",overflow:"hidden",textOverflow:"ellipsis",fontFamily:"var(--font-mono)"},'& [part="current"]':{display:"inline-flex",gap:"var(--jx-space-2)",alignItems:"baseline"},'& [part="current-tag"]':{padding:"0 6px",borderRadius:"var(--jx-radius-sm)",background:"var(--hover-bg)",fontSize:"var(--jx-text-xs)"},'& [part="hosting"] > section':{padding:"var(--jx-space-4)",border:"1px solid var(--border)",borderRadius:"var(--jx-radius-md)"},'& [part="busy"]':{margin:"0",padding:"var(--jx-space-2) var(--jx-space-5)",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"},'& [part="failure"]':{$description:"`failure`, not `error`: a kit text field keeps a permanent live region named `error`, and a rule on that name would reach the summary field's (surface-part-names.test.ts).",margin:"0",padding:"var(--jx-space-2) var(--jx-space-5)",color:"var(--danger)",borderTop:"1px solid var(--border)",fontSize:"var(--jx-text-sm)"}},children:[{tagName:"header",attributes:{part:"head"},children:[{tagName:"h2",attributes:{part:"heading",id:"${state.titleId}"},textContent:"Publish"},{tagName:"span",attributes:{part:"headline"},textContent:"${state.headline}"}]},{tagName:"jx-tabs",attributes:{part:"tabs",selected:"${state.tab}"},$props:{label:"Publish views"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/selectTab"},value:[{$ref:"event#/detail"}]}]},children:[{$prototype:"Array",items:{$ref:"#/state/tabs"},key:{$ref:"$map/item/value"},map:{tagName:"jx-tab",attributes:{part:"tab",value:"${$map.item.value}",label:"${$map.item.label}",panel:"${state.panelId}","data-tab":"${$map.item.value}"}}}]},{tagName:"div",attributes:{part:"body",id:"${state.panelId}",role:"tabpanel","data-tab":"${state.tab}","aria-label":"${state.tabTitle}"},children:[{tagName:"div",attributes:{part:"tab-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/tab"},cases:{review:{tagName:"div",attributes:{part:"review-slot-mood",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/mood"},cases:{"no-project":{tagName:"div",attributes:{part:"empty"},children:[{tagName:"p",attributes:{part:"empty-message"},textContent:"Open a project to publish it. Publishing reviews your saved changes and sends them to your site."},{tagName:"div",attributes:{part:"clone-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/canClone"},cases:{true:{tagName:"jx-button",attributes:{part:"clone"},$props:{size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/clone"},value:[]}]},children:[{tagName:"jx-icon",$props:{name:"download-simple"}},{tagName:"span",textContent:"Clone Git Repository"}]}}}]},loading:{tagName:"p",attributes:{part:"status"},textContent:"Loading…"},"no-repo":{tagName:"div",attributes:{part:"empty"},children:[{tagName:"p",attributes:{part:"empty-message"},textContent:"This project is not tracked by git yet. Publishing starts with a repository, which keeps every version you publish."},{tagName:"div",attributes:{part:"empty-actions"},children:[{tagName:"jx-button",attributes:{part:"init"},$props:{size:"sm",variant:"accent",disabled:{$ref:"#/state/busy"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/initRepository"},value:[]}]},children:[{tagName:"jx-icon",$props:{name:"plus"}},{tagName:"span",textContent:"Initialize Repository"}]}]}]},repo:{tagName:"div",attributes:{part:"review"},children:[{tagName:"div",attributes:{part:"changes-column"},children:[{tagName:"div",attributes:{part:"sync-bar"},children:[{tagName:"jx-action-button",attributes:{part:"refresh"},$props:{icon:"arrows-clockwise",size:"sm",quiet:!0,label:"Refresh",hint:"Refresh source control",disabled:{$ref:"#/state/busy"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/refresh"},value:[]}]}},{tagName:"div",attributes:{part:"sync-text"},children:[{tagName:"span",attributes:{part:"sync-label"},textContent:"${state.syncLabel}"},{tagName:"span",attributes:{part:"updated-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasLastUpdated"},cases:{true:{tagName:"span",attributes:{part:"sync-time"},textContent:"${state.lastUpdated}"}}}]},{tagName:"div",attributes:{part:"remote-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/remoteState"},cases:{remote:{tagName:"jx-action-group",attributes:{part:"sync-actions"},$props:{label:"Sync with the remote",compact:!1},children:[{tagName:"jx-action-button",attributes:{part:"fetch"},$props:{icon:"download-simple",size:"sm",quiet:!0,label:"Fetch",hint:"Fetch from the remote",disabled:{$ref:"#/state/busy"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/fetch"},value:[]}]}},{tagName:"jx-action-button",attributes:{part:"pull"},$props:{icon:"arrow-down",size:"sm",quiet:!0,label:{$ref:"#/state/pullLabel"},hint:{$ref:"#/state/pullLabel"},disabled:{$ref:"#/state/busy"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pull"},value:[]}]}},{tagName:"jx-action-button",attributes:{part:"push"},$props:{icon:"arrow-up",size:"sm",quiet:!0,label:{$ref:"#/state/pushLabel"},hint:{$ref:"#/state/pushLabel"},disabled:{$ref:"#/state/busy"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/push"},value:[]}]}}]},local:{tagName:"jx-button",attributes:{part:"create-repository"},$props:{size:"sm",disabled:{$ref:"#/state/busy"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/createRepository"},value:[]}]},children:[{tagName:"jx-icon",$props:{name:"share-network"}},{tagName:"span",textContent:"Create GitHub repository"}]}}}]},{tagName:"section",attributes:{part:"changes"},children:[{tagName:"h3",attributes:{part:"section-heading"},textContent:"Changes"},{tagName:"div",attributes:{part:"changes-bar"},children:[{tagName:"span",attributes:{part:"included"},textContent:"${state.includedLabel}"},{tagName:"div",attributes:{part:"include-all-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/filesState"},cases:{listed:{tagName:"jx-checkbox",attributes:{part:"include-all"},$props:{checked:{$ref:"#/state/allIncluded"},indeterminate:{$ref:"#/state/someIncluded"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/includeAll"},value:[{$ref:"event#/target/checked"}]}]},children:[{tagName:"span",textContent:"Include all"}]}}}]},{tagName:"div",attributes:{part:"groups-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/filesState"},cases:{listed:{tagName:"div",attributes:{part:"groups"},children:[{$prototype:"Array",items:{$ref:"#/state/groups"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"group"},children:[{tagName:"div",attributes:{part:"group-name"},textContent:"${$map.item.name}"},{$prototype:"Array",items:{$ref:"$map/item/files"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"file-row","data-path":"${$map.item.path}","data-included":"${$map.item.included}"},children:[{tagName:"jx-checkbox",attributes:{part:"include","data-path":"${$map.item.path}"},$props:{checked:{$ref:"$map/item/included"},label:{$ref:"$map/item/includeLabel"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/include"},value:[{$ref:"$map/item/path"},{$ref:"event#/target/checked"}]}]}},{tagName:"span",attributes:{part:"file-text"},children:[{tagName:"span",attributes:{part:"file-name"},textContent:"${$map.item.name}"},{tagName:"span",attributes:{part:"dir-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasDir"},cases:{true:{tagName:"span",attributes:{part:"file-dir"},textContent:"${$map.item.dir}"}}}]},{tagName:"span",attributes:{part:"badge","data-status":"${$map.item.status}",title:"${$map.item.statusWord}"},textContent:"${$map.item.status}"},{tagName:"jx-action-button",attributes:{part:"compare","data-path":"${$map.item.path}"},$props:{icon:"columns",size:"sm",quiet:!0,label:{$ref:"$map/item/compareLabel"},hint:"Before and after"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/compare"},value:[{$ref:"$map/item/path"}]}]}},{tagName:"jx-action-button",attributes:{part:"discard","data-path":"${$map.item.path}"},$props:{icon:"arrow-u-up-left",size:"sm",quiet:!0,label:{$ref:"$map/item/discardLabel"},hint:{$ref:"$map/item/discardHint"},disabled:{$ref:"$map/item/cannotDiscard"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/discard"},value:[{$ref:"$map/item/path"}]}]}}]}}]}}]},empty:{tagName:"p",attributes:{part:"empty-message"},textContent:"Nothing to publish. Files you edit and save show up here, ready to review."}}}]},{tagName:"section",attributes:{part:"history"},children:[{tagName:"h3",attributes:{part:"section-heading"},textContent:"Recent commits"},{tagName:"div",attributes:{part:"history-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/commitsState"},cases:{listed:{tagName:"ul",attributes:{part:"history-list"},children:[{$prototype:"Array",items:{$ref:"#/state/commits"},key:{$ref:"$map/item/key"},map:{tagName:"li",attributes:{part:"history-entry"},children:[{tagName:"span",attributes:{part:"history-hash"},textContent:"${$map.item.hash}"},{tagName:"span",attributes:{part:"history-message"},textContent:"${$map.item.message}"},{tagName:"span",attributes:{part:"history-meta"},textContent:"${$map.item.meta}"}]}}]},empty:{tagName:"p",attributes:{part:"empty-message"},textContent:"No commits yet. Each change set you publish becomes a version you can come back to."}}}]}]},{tagName:"div",attributes:{part:"publish-column"},children:[{tagName:"section",attributes:{part:"checks"},children:[{tagName:"h3",attributes:{part:"section-heading"},textContent:"Checks"},{tagName:"ul",attributes:{part:"check-list"},children:[{$prototype:"Array",items:{$ref:"#/state/checks"},key:{$ref:"$map/item/key"},map:{tagName:"li",attributes:{part:"check","data-check":"${$map.item.key}","data-state":"${$map.item.state}"},children:[{tagName:"jx-icon",attributes:{part:"check-icon"},$props:{name:{$ref:"$map/item/icon"},label:{$ref:"$map/item/iconLabel"}}},{tagName:"span",attributes:{part:"check-text"},textContent:"${$map.item.text}"},{tagName:"span",attributes:{part:"check-action-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasAction"},cases:{true:{tagName:"jx-button",attributes:{part:"check-action",title:"${$map.item.actionTitle}","data-check":"${$map.item.key}"},$props:{size:"sm",disabled:{$ref:"$map/item/actionDisabled"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/runCheck"},value:[{$ref:"$map/item/key"}]}]},children:[{tagName:"span",textContent:"${$map.item.actionLabel}"}]}}}]}}]}]},{tagName:"section",attributes:{part:"destination","data-jx-region":"${state.commitRegion}","aria-labelledby":"${state.destinationId}"},children:[{tagName:"h3",attributes:{part:"section-heading",id:"${state.destinationId}"},textContent:"Where should these changes go?"},{tagName:"jx-action-group",attributes:{part:"destinations"},$props:{selects:"single",label:"Destination",compact:!1,orientation:"vertical"},children:[{$prototype:"Array",items:{$ref:"#/state/destinations"},key:{$ref:"$map/item/value"},map:{tagName:"jx-action-button",attributes:{part:"destination-card","data-destination":"${$map.item.value}"},$props:{label:{$ref:"$map/item/label"},checked:{$ref:"$map/item/checked"},disabled:{$ref:"$map/item/disabled"},hint:{$ref:"$map/item/reason"},quiet:!1},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickDestination"},value:[{$ref:"$map/item/value"}]}]},children:[{tagName:"span",attributes:{part:"choice-name"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"choice-note"},textContent:"${$map.item.note}"}]}}]},{tagName:"div",attributes:{part:"refusal-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasRefusal"},cases:{true:{tagName:"p",attributes:{part:"refusal"},textContent:"${state.refusal}"}}},{tagName:"jx-field",attributes:{part:"summary-field"},$props:{label:"Summary",span:!0,description:"Saved with the change as its commit message."},children:[{tagName:"jx-textfield",attributes:{part:"summary"},$props:{multiline:!0,size:"sm",placeholder:"Describe what changed, e.g. Add a pricing page",value:{$ref:"#/state/summary"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editSummary"},value:[{$ref:"event#/target/value"}]}]}}]},{tagName:"div",attributes:{part:"publish-actions"},children:[{tagName:"jx-button",attributes:{part:"publish-button","data-destination":"${state.destination}"},$props:{variant:"accent",size:"md",disabled:{$ref:"#/state/primaryDisabled"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/publish"},value:[]}]},children:[{tagName:"span",textContent:"${state.primaryLabel}"}]},{tagName:"div",attributes:{part:"blocker-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasBlocker"},cases:{true:{tagName:"p",attributes:{part:"blocker"},textContent:"${state.blocker}"}}}]},{tagName:"div",attributes:{part:"review-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/reviewState"},cases:{opened:{tagName:"p",attributes:{part:"review-line"},children:[{tagName:"span",attributes:{part:"review-text"},textContent:"${state.reviewLine}"},{tagName:"jx-button",attributes:{part:"open-review"},$props:{size:"sm",quiet:!0},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openUrl"},value:[{$ref:"#/state/reviewUrl"}]}]},children:[{tagName:"span",textContent:"Open pull request"}]}]}}}]}]}]}}},deploys:{tagName:"div",attributes:{part:"deploys"},children:[{tagName:"section",attributes:{part:"live"},children:[{tagName:"h3",attributes:{part:"section-heading"},textContent:"Live"},{tagName:"div",attributes:{part:"live-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasLiveUrl"},cases:{true:{tagName:"div",attributes:{part:"live-site"},children:[{tagName:"span",attributes:{part:"live-url"},textContent:"${state.liveUrl}"},{tagName:"jx-button",attributes:{part:"visit"},$props:{size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openUrl"},value:[{$ref:"#/state/liveUrl"}]}]},children:[{tagName:"jx-icon",$props:{name:"globe"}},{tagName:"span",textContent:"Visit site"}]}]},false:{tagName:"p",attributes:{part:"live-none"},textContent:"${state.liveNone}"}}},{tagName:"p",attributes:{part:"live-summary"},textContent:"${state.liveSummary}"},{tagName:"div",attributes:{part:"command-row"},children:[{$prototype:"Array",items:{$ref:"#/state/deployCommands"},key:{$ref:"$map/item/id"},map:{tagName:"jx-button",attributes:{part:"command","data-command":"${$map.item.id}",title:"${$map.item.title}"},$props:{size:"sm",disabled:{$ref:"$map/item/disabled"},quiet:!1},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/run"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",textContent:"${$map.item.label}"}]}}]}]},{tagName:"div",attributes:{part:"running-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/runningState"},cases:{running:{tagName:"section",attributes:{part:"running"},children:[{tagName:"h3",attributes:{part:"section-heading"},textContent:"Publishing now"},{$prototype:"Array",items:{$ref:"#/state/running"},key:{$ref:"$map/item/id"},map:{tagName:"div",attributes:{part:"activity"},children:[{tagName:"div",attributes:{part:"activity-head"},children:[{tagName:"span",attributes:{part:"activity-title"},textContent:"${$map.item.title}"},{tagName:"span",attributes:{part:"activity-status"},textContent:"${$map.item.status}"}]},{tagName:"ol",attributes:{part:"activity-steps"},children:[{$prototype:"Array",items:{$ref:"$map/item/steps"},key:{$ref:"$map/item/key"},map:{tagName:"li",attributes:{part:"activity-step","data-state":"${$map.item.state}"},children:[{tagName:"span",attributes:{part:"step-icon","aria-hidden":"true"},textContent:"${$map.item.icon}"},{tagName:"span",attributes:{part:"step-label"},textContent:"${$map.item.label}"}]}}]}]}}]}}},{tagName:"section",attributes:{part:"deploy-history"},children:[{tagName:"div",attributes:{part:"section-head"},children:[{tagName:"h3",attributes:{part:"section-heading"},textContent:"History"},{tagName:"jx-action-button",attributes:{part:"reload-deploys"},$props:{icon:"arrows-clockwise",size:"sm",quiet:!0,label:"Refresh deployments",hint:"Ask the host again",disabled:{$ref:"#/state/deploysBusy"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/reloadDeployments"},value:[]}]}}]},{tagName:"div",attributes:{part:"deploys-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/deploysState"},cases:{listed:{tagName:"div",attributes:{part:"history-rows",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/historyState"},cases:{listed:{tagName:"ol",attributes:{part:"deployment-list"},children:[{$prototype:"Array",items:{$ref:"#/state/history"},key:{$ref:"$map/item/key"},map:{tagName:"li",attributes:{part:"deployment","data-environment":"${$map.item.environment}"},children:[{tagName:"span",attributes:{part:"deployment-when"},textContent:"${$map.item.when}"},{tagName:"span",attributes:{part:"deployment-label"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"deployment-status","data-status":"${$map.item.statusKey}",title:"${$map.item.statusDetail}"},textContent:"${$map.item.status}"},{tagName:"jx-action-button",attributes:{part:"open-deployment"},$props:{icon:"arrow-square-out",size:"sm",quiet:!0,label:{$ref:"$map/item/openLabel"},hint:{$ref:"$map/item/url"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openUrl"},value:[{$ref:"$map/item/url"}]}]}}]}}]},empty:{tagName:"p",attributes:{part:"empty-message"},textContent:"The host reports no deployments of this project yet."}}},loading:{tagName:"p",attributes:{part:"status"},textContent:"Asking the host for its deployments…"},note:{tagName:"p",attributes:{part:"empty-message"},textContent:"${state.deploysNote}"}}}]},{tagName:"section",attributes:{part:"previews"},children:[{tagName:"h3",attributes:{part:"section-heading"},textContent:"Branch previews"},{tagName:"div",attributes:{part:"previews-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/previewsState"},cases:{listed:{tagName:"ol",attributes:{part:"deployment-list"},children:[{$prototype:"Array",items:{$ref:"#/state/previews"},key:{$ref:"$map/item/key"},map:{tagName:"li",attributes:{part:"deployment","data-environment":"${$map.item.environment}"},children:[{tagName:"span",attributes:{part:"deployment-when"},textContent:"${$map.item.when}"},{tagName:"span",attributes:{part:"deployment-label"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"deployment-status","data-status":"${$map.item.statusKey}",title:"${$map.item.statusDetail}"},textContent:"${$map.item.status}"},{tagName:"jx-action-button",attributes:{part:"open-deployment"},$props:{icon:"arrow-square-out",size:"sm",quiet:!0,label:{$ref:"$map/item/openLabel"},hint:{$ref:"$map/item/url"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openUrl"},value:[{$ref:"$map/item/url"}]}]}}]}}]},empty:{tagName:"p",attributes:{part:"empty-message"},textContent:"No previews. A branch pushed to the remote is deployed as a preview of its own, with its own address."}}}]}]},branches:{tagName:"div",attributes:{part:"branches"},children:[{tagName:"section",attributes:{part:"branch-list-section"},children:[{tagName:"div",attributes:{part:"section-head"},children:[{tagName:"h3",attributes:{part:"section-heading"},textContent:"Branches"},{tagName:"jx-button",attributes:{part:"new-branch"},$props:{size:"sm",disabled:{$ref:"#/state/newBranchDisabled"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/newBranch"},value:[]}]},children:[{tagName:"jx-icon",$props:{name:"plus"}},{tagName:"span",textContent:"New branch"}]}]},{tagName:"p",attributes:{part:"branch-summary"},textContent:"${state.branchSummary}"},{tagName:"div",attributes:{part:"branch-note-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasBranchNote"},cases:{true:{tagName:"p",attributes:{part:"branch-note"},textContent:"${state.branchNote}"}}},{tagName:"div",attributes:{part:"branches-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/branchesState"},cases:{listed:{tagName:"ul",attributes:{part:"branch-list"},children:[{$prototype:"Array",items:{$ref:"#/state/branches"},key:{$ref:"$map/item/key"},map:{tagName:"li",attributes:{part:"branch","data-branch":"${$map.item.name}","data-current":"${$map.item.current}"},children:[{tagName:"jx-icon",attributes:{part:"branch-icon"},$props:{name:"git-branch"}},{tagName:"span",attributes:{part:"branch-name"},textContent:"${$map.item.name}"},{tagName:"span",attributes:{part:"branch-state",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/current"},cases:{true:{tagName:"span",attributes:{part:"current"},children:[{tagName:"span",attributes:{part:"current-tag"},textContent:"Current"},{tagName:"span",attributes:{part:"branch-sync"},textContent:"${$map.item.note}"}]},false:{tagName:"jx-button",attributes:{part:"switch","data-branch":"${$map.item.name}"},$props:{size:"sm",label:{$ref:"$map/item/switchName"},disabled:{$ref:"#/state/busy"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/checkout"},value:[{$ref:"$map/item/name"}]}]},children:[{tagName:"span",textContent:"${$map.item.switchLabel}"}]}}}]}}]},empty:{tagName:"p",attributes:{part:"empty-message"},textContent:"${state.branchesEmpty}"}}}]}]},hosting:{tagName:"div",attributes:{part:"hosting"},children:[{tagName:"section",attributes:{part:"source"},children:[{tagName:"h3",attributes:{part:"section-heading"},textContent:"Where your project is saved"},{tagName:"p",attributes:{part:"hosting-summary"},textContent:"${state.sourceSummary}"},{tagName:"div",attributes:{part:"command-row"},children:[{$prototype:"Array",items:{$ref:"#/state/sourceCommands"},key:{$ref:"$map/item/id"},map:{tagName:"jx-button",attributes:{part:"command","data-command":"${$map.item.id}",title:"${$map.item.title}"},$props:{size:"sm",disabled:{$ref:"$map/item/disabled"},quiet:!1},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/run"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",textContent:"${$map.item.label}"}]}}]}]},{tagName:"section",attributes:{part:"host"},children:[{tagName:"h3",attributes:{part:"section-heading"},textContent:"Where your site is hosted"},{tagName:"p",attributes:{part:"host-name"},textContent:"${state.hostTitle}"},{tagName:"p",attributes:{part:"hosting-summary"},textContent:"${state.hostSummary}"},{tagName:"div",attributes:{part:"command-row"},children:[{$prototype:"Array",items:{$ref:"#/state/hostCommands"},key:{$ref:"$map/item/id"},map:{tagName:"jx-button",attributes:{part:"command","data-command":"${$map.item.id}",title:"${$map.item.title}"},$props:{size:"sm",disabled:{$ref:"$map/item/disabled"},quiet:!1},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/run"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",textContent:"${$map.item.label}"}]}}]}]},{tagName:"section",attributes:{part:"build"},children:[{tagName:"h3",attributes:{part:"section-heading"},textContent:"How it is built"},{tagName:"p",attributes:{part:"hosting-summary"},textContent:"The build adapter decides what the build produces: static files, or a server for sign-in and data routes."},{tagName:"div",$description:"The mount box for the Deploy section (`settings/project-sections.ts` `renderDeploySection`, `surfaces/settings-deploy.json`), which moved here from Project Settings (studio.md §17.1). The flow is handed this node by `onNodeCreated` and mounts the section into it; nothing in this document styles what lands here.",attributes:{part:"adapter-island",role:"none"}}]},{tagName:"section",attributes:{part:"address"},children:[{tagName:"h3",attributes:{part:"section-heading"},textContent:"Your address"},{tagName:"div",attributes:{part:"domain-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/domainState"},cases:{set:{tagName:"div",attributes:{part:"live-site"},children:[{tagName:"span",attributes:{part:"live-url"},textContent:"${state.domain}"},{tagName:"jx-button",attributes:{part:"visit"},$props:{size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openUrl"},value:[{$ref:"#/state/domain"}]}]},children:[{tagName:"jx-icon",$props:{name:"globe"}},{tagName:"span",textContent:"Visit site"}]}]}}},{tagName:"p",attributes:{part:"hosting-summary"},textContent:"${state.domainNote}"}]},{tagName:"section",attributes:{part:"checklist"},children:[{tagName:"h3",attributes:{part:"section-heading"},textContent:"Deploy checklist"},{tagName:"p",attributes:{part:"hosting-summary"},textContent:"${state.checklistSummary}"},{tagName:"ol",attributes:{part:"checklist-steps"},children:[{$prototype:"Array",items:{$ref:"#/state/checklistSteps"},key:{$ref:"$map/item/id"},map:{tagName:"li",attributes:{part:"checklist-step","data-step":"${$map.item.id}","data-state":"${$map.item.state}"},children:[{tagName:"jx-icon",attributes:{part:"step-icon"},$props:{name:{$ref:"$map/item/icon"},label:{$ref:"$map/item/iconLabel"}}},{tagName:"span",attributes:{part:"step-label"},textContent:"${$map.item.text}"}]}}]}]}]}}}]},{tagName:"div",attributes:{part:"busy-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/busy"},cases:{true:{tagName:"p",attributes:{part:"busy",role:"status"},textContent:"Working…"}}},{tagName:"div",attributes:{part:"failure-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasError"},cases:{true:{tagName:"p",attributes:{part:"failure",role:"alert"},textContent:"${state.error}"}}}]};E("publish-workspace",lt);function Pt(){return{allIncluded:!1,blocker:"",branchNote:"",branchSummary:"",branches:[],branchesEmpty:"",branchesState:"empty",busy:!1,canClone:!1,checklistSteps:[],checklistSummary:"",checks:[],commitRegion:"",commits:[],commitsState:"empty",deployCommands:[],deploysBusy:!1,deploysNote:"",deploysState:"note",destination:"live",destinationId:"",destinations:[],domain:"",domainNote:"",domainState:"none",error:"",filesState:"empty",groups:[],hasBlocker:!1,hasBranchNote:!1,hasError:!1,hasLastUpdated:!1,hasLiveUrl:!1,hasRefusal:!1,headline:"",history:[],historyState:"empty",hostCommands:[],hostSummary:"",hostTitle:"",includedLabel:"",lastUpdated:"",liveNone:"",liveSummary:"",liveUrl:"",mood:"loading",newBranchDisabled:!1,panelId:"",previews:[],previewsState:"empty",primaryDisabled:!0,primaryLabel:"",pullLabel:"Pull",pushLabel:"Push",refusal:"",region:"",remoteState:"local",reviewLine:"",reviewState:"none",reviewUrl:"",running:[],runningState:"none",someIncluded:!1,sourceCommands:[],sourceSummary:"",summary:"",syncLabel:"",tab:"review",tabTitle:"",tabs:[],titleId:""}}function Rt(t){let e=t?.$map,a=v(e)?e.item:void 0,r=v(a)?a.path:void 0;return n(r)?r:""}function Dt(t){let e=n(t)?void 0:t.attributes?.part;return n(e)?e:""}function pt(t,e,a){t.replaceChildren();let{adapterHost:r,compareHost:i,...l}=a,o=g({...Pt(),...l});Object.assign(o,e);let c=null,m=!1,f=R("publish-workspace",o,t,{onNodeCreated:(d,y,j,w)=>{if(m||!(d instanceof HTMLElement))return;let h=Dt(j);if(h==="adapter-island")r(d);else if(h==="compare")i(d,Rt(w))}}).then((d)=>{if(m)d.dispose();else c=d;return d.root});return{attached:()=>{if(m)return!1;let d=c?.root;return d===void 0?!0:d instanceof HTMLElement&&t.contains(d)},dispose(){m=!0,c?.dispose(),c=null},ready:f,update:(d)=>{Object.assign(o,d)}}}async function V(){let t=Ri();if(!t||!Zl()||u.publish.deploys.state==="loading")return;let e=u.publish.deploys,a=t.projectName,r=()=>u.publish.deploys!==e||Ri()?.projectName!==a;e.state="loading",e.project=a;try{let i=await IL(t);if(r()){dt(e);return}e.rows=i,e.error="",e.state="loaded",jd(i[0]??null)}catch(i){if(r()){dt(e);return}e.rows=[],e.error=X(i),e.state="failed"}}function dt(t){if(u.publish.deploys===t)t.state="idle"}function bt(){let t=DL(),{deploys:e}=u.publish;return e.state==="loaded"&&t!==null&&!e.rows.some((a)=>a.id===t.id)}function Lt(){return u.publish.deploys.state==="idle"||bt()}function PD(t){if(u.publish.tab=t,t==="review"&&u.git.logEntries===null&&u.git.status?.isRepo)KS();if(t==="deploys"&&(u.publish.deploys.state!=="loaded"||bt()))V()}var Tt=new Map([["done",{icon:"check",label:"Passed"}],["failed",{icon:"x",label:"Failed"}],["running",{icon:"spinner",label:"Running"}],["todo",{icon:"warning-circle",label:"To do"}],["unknown",{icon:"question",label:"Not checked yet"}]]);function ct(t){return Tt.get(t)??{icon:"question",label:"Not checked yet"}}function At(t){return`${t} ${t===1?"change":"changes"}`}function gt(){return u.git.status?.files??[]}function O(){let t=u.git.status?.remotes;return Array.isArray(t)&&t.length>0?t[0]??"":""}function z(){if(!C)return"no-project";let{error:t,loading:e,status:a}=u.git;if(!a&&!e&&!t)return"loading";return a&&!a.isRepo?"no-repo":"repo"}function F(){return u.git.branches?.current||u.git.status?.branch||""}function mt(){let{status:t}=u.git,e=t?.ahead?`${t.ahead} ahead`:"",a=t?.behind?`${t.behind} behind`:"";return e||a?[e,a].filter(Boolean).join(", "):"Up to date"}function Ht(t){if(t==="no-repo")return"Not tracked by git yet";if(t!=="repo")return"";let e=gt().length;return`${F()?`On ${F()}`:"On a branch with no name yet"} · ${e>0?`${At(e)} to publish`:"nothing to publish"}`}function It(t){return{files:t.files.map((e)=>({...e,compareLabel:`Before and after: ${e.label}`,discardHint:e.cannotDiscard?"A new file has no saved version to go back to":"Discard changes",discardLabel:`Discard changes to ${e.path}`,includeLabel:`Include ${e.path}`})),key:t.key,name:t.name}}function L(t){let e=ae();if(!e)return[];return t.flatMap((a)=>{let r=e.get(a);if(!r||!e.isVisible(a))return[];let i=e.disabledReason(a);return[{disabled:i!==void 0,id:a,label:r.title,title:i?`${r.title}: requires ${i}`:r.title}]})}function Wt(t){let e={actionDisabled:!1,actionLabel:"",actionTitle:"",hasAction:!1,icon:ct(t.state).icon,iconLabel:ct(t.state).label,key:t.key,state:t.state,text:t.text};if(t.key==="build"){if(t.state==="running"||!X_())return e;let r=t.state==="unknown"?"Check build":"Check again";return{...e,actionLabel:r,actionTitle:r,hasAction:!0}}let[a]=t.command?L([t.command]):[];return a?{...e,actionDisabled:a.disabled,actionLabel:a.label,actionTitle:a.title,hasAction:!0}:e}function Bt(t){let[e]=t.filter((a)=>a.environment==="production"&&ft(a)).toSorted((a,r)=>Date.parse(r.createdOn)-Date.parse(a.createdOn));return e?.id??""}function ft(t){return t.status==="success"&&t.stage==="deploy"}function zt(t,e){if(t.status==="failure")return"Failed";if(t.status==="canceled")return"Canceled";if(!ft(t))return"Building…";if(t.environment!=="production")return"Ready";return t.id===e?"Live":"Replaced"}function ut(t,e){let r=t.environment==="production"?`Production${t.branch?` · ${t.branch}`:""}`:t.branch||"Preview";return{environment:t.environment,key:t.id,label:r,openLabel:`Open ${r}`,status:zt(t,e),statusDetail:`${t.stage}: ${t.status}`,statusKey:t.status,url:t.url,when:Yw(t.createdOn)}}function Et(){if(!Zl())return{deploysNote:"This host cannot reach the Cloudflare API, so deployments are not listed here. Your host runs bunx jx build and serves dist/.",deploysState:"note"};if(!Ri())return{deploysNote:"Connect a host under Hosting, and every deployment it makes is listed here.",deploysState:"note"};if(u.publish.deploys.state==="failed")return{deploysNote:`The host did not answer: ${u.publish.deploys.error}`,deploysState:"note"};return{deploysNote:"",deploysState:u.publish.deploys.state==="loaded"?"listed":"loading"}}function Ft(){return u.publish.deploys.project===Ri()?.projectName?u.publish.deploys.rows:[]}function yt(){return Ri()?.productionUrl||C?.projectConfig?.url||""}function Mt(t){let e=Ri();if(e?.productionUrl)return"Cloudflare Pages serves it. A custom domain is added on the Cloudflare dashboard.";if(e)return"Cloudflare has not reported an address yet. A custom domain is added on the Cloudflare dashboard.";return t?"The Production URL in Project Settings › Overview. No host is connected yet; once one is, point this domain at it on the host's dashboard.":"Your site gets an address when a host is connected, or set its Production URL in Project Settings › Overview."}function Ut(t){if(!Ri())return yt()?"No host is connected, so Studio cannot say what is deployed there. Connect one under Hosting.":"";let e=t.find((o)=>o.environment==="production"),a=DL(),r=a&&(a.environment==="production"||!e)?a:void 0,[i]=[e,r].filter((o)=>o!==void 0).toSorted((o,c)=>Date.parse(c.createdOn)-Date.parse(o.createdOn));if(!i)return"No deployment has been observed yet.";let l=i.branch?` from ${i.branch}`:"";return`Last deployed ${Yw(i.createdOn)}${l} · ${i.stage}: ${i.status}`}function Vt(){let{status:t}=u.git;if(!C)return"";if(!t)return"Source control has not reported on this project yet.";if(!t.isRepo)return"Not tracked by git yet. A repository keeps every version you publish.";let e=F()||"an unnamed branch",a=O();if(Us())return`Saved on GitHub${a?` (${a})`:""}, on ${e}. Every commit lands there as it is made.`;return a?`Saved in git and pushed to ${a}, on ${e}.`:`Saved in git on this machine only, on ${e}. A host builds from a remote, so create the GitHub repository next.`}function Ot(){let{status:t}=u.git;if(!t)return["git.signInToGithub"];if(!t.isRepo)return["git.init","git.signInToGithub"];if(O()==="")return["git.createGithubRepository","git.signInToGithub"];return Us()?["git.signInToGithub"]:["git.push","git.signInToGithub"]}function Jt(){let t=Ri();if(t)return{hostSummary:`Every publish is pushed to the remote and built by Cloudflare Pages${t.productionUrl?` at ${t.productionUrl}`:""}.`,hostTitle:`Cloudflare Pages: ${t.projectName}`};if(ye()&&p().cfConnect)return{hostSummary:"Runs on Cloudflare with nothing to configure: connect it, and every publish builds and deploys.",hostTitle:"Jx Cloud, on Cloudflare"};if(Zl())return{hostSummary:"Connect a Cloudflare API token, and every publish builds and deploys on your own account.",hostTitle:"Your Cloudflare account"};return{hostSummary:"This host cannot reach Cloudflare. Choose a build adapter below; your host runs bunx jx build and serves dist/.",hostTitle:"Another host"}}function ht(t){let e=t.replaceAll(/[^\w-]/g,"-"),a=z(),{git:r}=u,i=gt(),l=i.filter((s)=>s.staged).length,{destination:o,tab:c}=u.publish,m=hm(o),f=a==="repo"?pm(m):"",d=o==="review"?pb():"",y=zD(),j=r.logEntries??[],w=Ri(),h=yt(),x=Ft(),J=x.filter((s)=>s.environment==="preview"),q=Bt(x),G=as.filter((s)=>s.source==="Publish"&&!Hc(s)),_=r.branches?.branches??[],A=r.branches?.current??"",P=Us(),H=O(),K=NL(),b=i.length;return{...Et(),...Jt(),allIncluded:b>0&&l===b,blocker:f,branchNote:P?"Each branch opens in its own session, so switching reloads Studio on that branch.":"",branchSummary:A?`On ${A}`:"",branches:_.map((s)=>({current:s===A,key:s,name:s,note:H?mt():"Local only",switchLabel:P?"Switch and reload":"Switch",switchName:P?`Switch to ${s} and reload`:`Switch to ${s}`})),branchesEmpty:a==="no-repo"?"This project is not tracked by git yet.":"No branches yet. The first commit makes one.",branchesState:_.length>0?"listed":"empty",busy:r.loading,canClone:Pb(),checklistSteps:K.steps,checklistSummary:K.summary,checks:a==="repo"?fb().map((s)=>Wt(s)):[],commitRegion:`${t}/commit`,commits:j.map((s)=>fL(s)),commitsState:j.length>0?"listed":"empty",deployCommands:L(w?["publish.deploy","publish.openDashboard"]:["publish.setUp"]),deploysBusy:u.publish.deploys.state==="loading",destination:m,destinationId:`${e}-destination`,destinations:hw(o),domain:h,domainNote:Mt(h),domainState:h?"set":"none",error:r.error??"",filesState:b>0?"listed":"empty",groups:pL(i).map((s)=>It(s)),hasBlocker:f!=="",hasBranchNote:P,hasError:Boolean(r.error),hasLastUpdated:Boolean(r.lastUpdated),hasLiveUrl:h!=="",hasRefusal:d!=="",headline:Ht(a),history:x.map((s)=>ut(s,q)),historyState:x.length>0?"listed":"empty",hostCommands:L(w?["publish.setUp","publish.openDashboard"]:["publish.setUp"]),includedLabel:b>0?`${l} of ${b} included`:"",lastUpdated:mL(r.lastUpdated),liveNone:w?"The host has not reported an address for this site yet.":"No host is connected. Connect one under Hosting, and every publish ships to it.",liveSummary:Ut(x),liveUrl:h,mood:a,newBranchDisabled:r.loading||a!=="repo",panelId:`${e}-body`,previews:J.map((s)=>ut(s,q)),previewsState:J.length>0?"listed":"empty",primaryDisabled:a!=="repo"||f!=="",primaryLabel:jD(m),pullLabel:r.status?.behind?`Pull (${r.status.behind} behind)`:"Pull",pushLabel:r.status?.ahead?`Push (${r.status.ahead} ahead)`:"Push",refusal:d,region:t,remoteState:H?"remote":"local",reviewLine:y?`Pull request #${y.number} is open for review.`:"",reviewState:y?"opened":"none",reviewUrl:y?.url??"",running:G.map((s)=>TL(s)),runningState:G.length>0?"running":"none",someIncluded:l>0&&l<b,sourceCommands:L(Ot()),sourceSummary:Vt(),summary:r.commitMessage,syncLabel:H?mt():"Local only (no remote)",tab:c,tabTitle:jC[c],tabs:Bm.map((s)=>({label:s==="review"&&b>0?`${jC[s]} (${b})`:jC[s],value:s})),titleId:`${e}-title`}}var k=new Map,M=new WeakMap;function $t(){return C?.projectConfig?.build?.adapter||"static"}function qt(t){let e=$t(),a=k.get(t);if(!a?.isConnected||M.get(a)===e)return;M.set(a,e),D(a)}function Gt(t){if(t==="build"){HD();return}let e=fb().find((a)=>a.key===t);if(e?.command)nt(e.command,void 0,"Publish")}function _t(t){return{adapterHost:(e)=>{let a=k.get(t);if(a&&a!==e)B(a);k.set(t,e),M.set(e,$t()),D(e)},checkout:(e)=>{hL(e)},clone:()=>{iL()},compare:(e)=>{U=e,oL(e)},compareHost:(e,a)=>{let r=T.get(t);if(!r)r=new Map,T.set(t,r);r.set(a,e)},createRepository:()=>{nt("git.createGithubRepository",void 0,"Publish")},discard:(e)=>{dL(e)},editSummary:(e)=>{u.git.commitMessage=e},fetch:()=>{rL()},include:(e,a)=>{aL(e,a)},includeAll:(e)=>{lL(e)},initRepository:()=>{nt("git.init",void 0,"Publish")},newBranch:()=>{uL()},openUrl:(e)=>{if(e)Vb(e)},pickDestination:(e)=>{if(Cx(e))u.publish.destination=e},publish:()=>{pw(hm(u.publish.destination))},pull:()=>{sL()},push:()=>{nt("git.push",void 0,"Publish")},refresh:()=>{ks()},reloadDeployments:()=>{V()},run:(e)=>{nt(e,void 0,"Publish")},runCheck:Gt,selectTab:(e)=>{if(mO(e))PD(e)}}}var S=new Map,T=new Map,U=null,vt=new Set;async function wt(t,e){await e.handle.ready;let a=U===null?void 0:T.get(t)?.get(U);if(a?.isConnected)(a.querySelector('[part="control"]')??a).focus()}function PE(t){let e=S.get(t);if(e?.wrap.isConnected&&e.handle.attached()){wt(t,e);return}vt.add(t)}function Y_(t,e){let a=S.get(t);return a!==void 0&&a.tabId===e.id&&a.wrap.isConnected&&a.handle.attached()}function Z_(t){let e=S.get(t);if(!e)return;e.scope.stop();let a=k.get(t);if(a)B(a);e.handle.dispose(),S.delete(t),k.delete(t),T.delete(t)}function FE(t,e){let{paneId:a,wrap:r}=t;if(Y_(a,e))return;if(Z_(a),ye()&&z()==="loading")ks();PD(u.publish.tab);let i=Ln(a,"publish"),l=pt(r,ht(i),_t(a)),o=me();o.run(()=>{te(()=>{let m=ht(i);if(m.mood==="repo")gL();if(l.update(m),qt(a),m.tab==="deploys"&&Lt())V()}),te(()=>{if(u.publish.tab==="review"&&z()==="repo")cL()})});let c={handle:l,scope:o,tabId:e.id,wrap:r};if(S.set(a,c),vt.delete(a))wt(a,c)}
|
|
2
|
-
export{
|
|
1
|
+
import{X}from"./studio-9c6cbq2c.js";import{ae}from"./studio-q509sqt8.js";import{p,ve}from"./studio-xh6rf05g.js";import{nt}from"./studio-cv6gnjqd.js";import{Wm,nr,zm,YC,EA,Ix,u}from"./studio-1d8m5s38.js";import{Xl,H$,Ii,jd,V$,W$}from"./studio-qarg1xf9.js";import{ls,Hc,M$}from"./studio-thgexj3w.js";import{Es,tC,Hb,Gs,p$,f$,m$,g$,b$,y$,v$,w$,x$,_$,S$,C$,ix,k$,E$}from"./studio-ajfq4fmr.js";import{Kb}from"./studio-aaw7wxv8.js";import{gb,yw,pm,GN,fm,r0,JN,bb,ZN,vw}from"./studio-ztzf8mce.js";import{x}from"./studio-zn7ysyzb.js";import{$n,E,I}from"./studio-1a7zshnv.js";import{me,te,b}from"./studio-9f5vcb4w.js";import{n,m}from"./studio-erjccagy.js";var Y={$schema:"https://jxsuite.com/schema/v1",$id:"StudioSettingsDeploy",$description:"Publish › Hosting's build adapter (studio.md §22.8), which was Project Settings › Deploy: one row over `build.adapter`, and the sentence a failed write leaves behind. It draws no heading of its own: Hosting's \"How it is built\" section heads it, and a second title inside that card would name the same thing twice. The adapter (`surfaces/settings-deploy.ts`) hands in the chosen adapter, the enumeration it is chosen from and whatever the last write had to say; the document draws them and hands the change straight back. Nothing here reads `project.json`: a section that re-read the config while drawing would be a second opinion about a file one module already owns.",tagName:"section",attributes:{part:"deploy"},style:{$description:"What is NOT in this block is most of the conversion. Four borrowed rules had nothing to transcribe: `.settings-field-label` and `.settings-field-desc` drew a row's label and the sentence under it, and `jx-field` draws both — with the label actually NAMING the control, which the bare `<label class=…>` beside the picker never did; `.settings-field` added a 20px bottom margin to separate one row from the next, and this section has one row, so the margin separated it from the end of the section; and `.settings-section` was never defined by any stylesheet at all, which is why it sits in `check-styles.ts`'s allow-list rather than in a rule.",display:"block",fontFamily:"var(--jx-font-sans)",color:"var(--fg)",'& [part="section-error"]':{$description:'A write that failed, said under the section title rather than pinned to the picker: settings save on change, so a silent rejection would read as "my edit just vanished", and what failed was the whole file rather than the value. Its size read `--spectrum-font-size-75` with a 12px fallback, which resolved only inside `<sp-theme>` — a document is mounted in the settings pane, where that name is not in scope and the fallback is all it would ever have taken — so the size is the kit\'s scale and the colour is the studio layer\'s. It is `section-error` rather than `error` because the adapter picker is a `jx-select`, which draws a permanent `[part="error"]` of its own in this same light-DOM tree: a rule on that name would give the picker\'s own refusal sentence this 16px margin too.',margin:"0 0 16px",fontSize:"var(--jx-text-md)",color:"var(--danger)"},'& [part="adapter"]':{$description:"How wide the picker may grow. A control offering five short words does not want the width of a 900px pane, and 320px is the one thing `.settings-build-adapter` said that the kit does not — the same measure the two pickers in Locales take.",maxWidth:"320px"}},children:[{tagName:"div",attributes:{part:"section-error-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasError"},cases:{true:{tagName:"p",attributes:{part:"section-error",role:"alert"},textContent:"${state.error}"}}},{tagName:"jx-field",attributes:{part:"row","data-field":"adapter"},$props:{span:!0,label:"Build adapter",description:"What the site is built for. Static writes plain files; the others emit a server entry for that runtime."},children:[{tagName:"jx-select",attributes:{part:"adapter"},$props:{size:"sm",options:{$ref:"#/state/adapters"},value:{$ref:"#/state/adapter"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setAdapter"},value:[{$ref:"event#/target/value"}]}]}}]}]};E("settings-deploy",Y);function Q(t,e){if(e.adapter!==void 0)t.adapter=e.adapter;if(e.adapters!==void 0)t.adapters=e.adapters;if(e.error!==void 0)t.error=e.error,t.hasError=e.error!==""}function Z(t,e,a){let r=b({adapter:"",adapters:[],error:"",hasError:!1,setAdapter:a.setAdapter});Q(r,e),t.replaceChildren();let i=null,l=!1;return I("settings-deploy",r,t).then((o)=>{if(l){o.dispose();return}i=o}),{connected:()=>!l&&(i===null?t.childNodes.length===0:i.root.parentNode===t),dispose(){l=!0,i?.dispose(),i=null},update:(o)=>Q(r,o)}}var tt={$schema:"https://jxsuite.com/schema/v1",$id:"StudioSettingsRawJson",$description:"Project Settings › Raw JSON: `project.json` as it is written, and the way through to editing it as text. The adapter (`surfaces/settings-rawjson.ts`) hands in the serialisation the save chokepoint itself produced, so what is drawn is what a save writes rather than a second pretty-printer that would disagree with the file by an indent. The button opens the SAME tab in the Code editor — one document, three editors (`studio.md` §9.3) — so switching to the text and back keeps one undo stack instead of forking two.",tagName:"section",attributes:{part:"rawjson"},style:{$description:"Two of the rules this section borrowed are gone rather than moved. `.settings-field-desc` styled the sentence under the title, and it is kept here because there is no `jx-field` in this section to draw it — a `<pre>` is not a control and wrapping one in a row would give the file a label it does not need. `.settings-edit-as-code` set `align-self: flex-start` on the button, which did nothing: its parent carried `.settings-section`, a class no stylesheet defines, so there was no flex container for the declaration to be about — and `jx-button` is `inline-flex`, so it already sits at the left of a block.",display:"block",fontFamily:"var(--jx-font-sans)",color:"var(--fg)",'& [part="title"]':{margin:"0 0 16px",fontSize:"16px",fontWeight:"600",color:"var(--fg)"},'& [part="intro"]':{$description:"The sentence under the title. Its size read `--spectrum-font-size-75` with a 12px fallback, a name that resolves only inside `<sp-theme>`; a document is mounted in the settings pane, so the fallback is all it could ever have taken and the size is the kit's scale now.",margin:"0 0 6px",fontSize:"var(--jx-text-md)",color:"var(--fg-dim)"},'& [part="file"]':{$description:"The file's name, said in the prose as the file it is. It borrowed a bare `<code>` element and whatever the page happened to give one; a document's styling is its own, so the face is stated here.",fontFamily:"var(--font-mono)"},'& [part="json"]':{$description:'`project.json` as it is saved. It scrolls in its own box: a 250-line file must not push the "Edit as code" action off the bottom of the section. Its background read `var(--bg-dim, var(--bg))` and `--bg-dim` is declared nowhere in the token layer, so the fallback is what has always painted it — written as what it resolves to rather than as a name that never resolved.',margin:"0 0 12px",padding:"12px",maxHeight:"420px",overflow:"auto",border:"1px solid var(--border)",borderRadius:"var(--radius)",background:"var(--bg)",fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-md)",color:"var(--fg)",whiteSpace:"pre"}},children:[{tagName:"h3",attributes:{part:"title"},textContent:"Raw JSON"},{tagName:"p",attributes:{part:"intro"},children:["The whole of ",{tagName:"code",attributes:{part:"file"},textContent:"project.json"},", as it is saved. Editing it as code opens the same document in the Code editor — one undo stack, one dirty flag."]},{tagName:"pre",attributes:{part:"json"},textContent:"${state.json}"},{tagName:"jx-button",attributes:{part:"edit"},$props:{size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editAsCode"}}]},children:[{tagName:"span",textContent:"Edit as code"}]}]};E("settings-rawjson",tt);function et(t,e){if(e.json!==void 0)t.json=e.json}function at(t,e,a){let r=b({editAsCode:a.editAsCode,json:""});et(r,e),t.replaceChildren();let i=null,l=!1;return I("settings-rawjson",r,t).then((o)=>{if(l){o.dispose();return}i=o}),{connected:()=>!l&&(i===null?t.childNodes.length===0:i.root.parentNode===t),dispose(){l=!0,i?.dispose(),i=null},update:(o)=>et(r,o)}}var H=new WeakMap;function W(){return x?.projectConfig??{}}var kt=[{label:"Static",value:"static"},{label:"Bun",value:"bun"},{label:"Node",value:"node"},{label:"Cloudflare Workers",value:"cloudflare-workers"},{label:"Cloudflare Pages",value:"cloudflare-pages"}],k=new WeakMap;function rt(t){return{adapter:W().build?.adapter||"static",adapters:kt.map((e)=>({label:e.label,value:e.value})),error:H.get(t)??""}}async function St(t,e){try{await nr(e),H.delete(t)}catch(a){H.set(t,`Could not save project.json — ${X(a)}`)}R(t)}var it=new WeakMap;function Ct(t){let e=it.get(t);if(!e)e={setAdapter:(a)=>{k.get(t)?.update({adapter:a}),St(t,{build:{...W().build,adapter:a}})}},it.set(t,e);return e}function R(t){let e=k.get(t);if(e?.connected()){e.update(rt(t));return}e?.dispose(),k.set(t,Z(t,rt(t),Ct(t)))}function B(t){k.get(t)?.dispose(),k.delete(t)}var st=new WeakMap;function ot(){return{json:Wm(W())}}function UN(t,e){let a=st.get(t);if(a?.connected()){a.update(ot());return}a?.dispose(),st.set(t,at(t,ot(),{editAsCode:e.editAsCode}))}var lt={$schema:"https://jxsuite.com/schema/v1",$id:"StudioPublishWorkspace",$description:"The Publish workspace's home (studio.md §22.8): four sub-tabs over one body. Review changes is the change list grouped the way the site is organised (Pages, each content collection, Components, Layouts, Styles, Media, Other), each file's checkbox including it in the next publish (staging it), its Before and after opening the comparison (§21), then the checks, the destination, the summary and the one primary button. Deploys is the live site, any deploy running now with its steps, the history the host returns and the branch previews. Branches is the branch list with switch and create. Hosting is where the project is saved, where the site is hosted, the build adapter (an island: the Deploy section that moved here from Project Settings) and the address, with the deploy checklist under them. `publish/publish-workspace.ts` keeps every decision and hands this document strings and booleans; nothing here knows what a status letter means, which destination a host allows or what a deployment's stage is called.",tagName:"div",attributes:{part:"publish","data-jx-region":"${state.region}","data-tab":"${state.tab}","aria-labelledby":"${state.titleId}",role:"region"},style:{$description:"Fills the pane's stage by its own geometry, as the Media home does: the stage is `position: relative`, so the workspace takes the whole of it and scrolls its own body. The status colours are the theme's semantic tokens, so a check, a badge and a deployment's state follow light and dark without a hex anywhere.",position:"absolute",inset:"0",display:"flex",flexDirection:"column",boxSizing:"border-box",fontFamily:"var(--jx-font-sans)",fontSize:"var(--jx-text-md)",color:"var(--fg)",background:"var(--bg)",'& [part="head"]':{display:"flex",alignItems:"baseline",flexWrap:"wrap",gap:"var(--jx-space-3)",padding:"var(--jx-space-4) var(--jx-space-5) 0"},'& [part="heading"]':{margin:"0",fontSize:"var(--jx-text-lg)",fontWeight:"600"},'& [part="headline"]':{color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"},'& [part="tabs"]':{padding:"0 var(--jx-space-5)",flexShrink:"0"},'& [part="body"]':{flex:"1",minHeight:"0",overflowY:"auto",padding:"var(--jx-space-4) var(--jx-space-5) var(--jx-space-6)",containerType:"inline-size",containerName:"publish-body"},'& [part="review"]':{$description:"Two columns as the board draws them, the changes on the left and the publish card on the right; below 760px of pane the card drops under the list rather than squeezing it.",display:"grid",gridTemplateColumns:"minmax(0, 1fr) minmax(260px, 340px)",gap:"var(--jx-space-5)",alignItems:"start"},"@container publish-body (max-width: 760px)":{'& [part="review"]':{gridTemplateColumns:"minmax(0, 1fr)"}},'& [part="changes-column"], & [part="publish-column"], & [part="deploys"], & [part="branches"], & [part="hosting"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-5)",minWidth:"0"},'& [part="deploys"], & [part="branches"], & [part="hosting"]':{maxWidth:"760px"},"& section":{display:"flex",flexDirection:"column",gap:"var(--jx-space-3)",minWidth:"0"},'& [part="section-head"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-3)"},'& [part="section-heading"]':{margin:"0",fontSize:"var(--jx-text-sm)",fontWeight:"600",color:"var(--fg-dim)",textTransform:"uppercase",letterSpacing:"0.04em"},'& [part="publish-column"] > section':{padding:"var(--jx-space-4)",border:"1px solid var(--border)",borderRadius:"var(--jx-radius-md)",background:"var(--bg-panel)"},'& [part="sync-bar"]':{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"var(--jx-space-3)",paddingBottom:"var(--jx-space-3)",borderBottom:"1px solid var(--border)"},'& [part="sync-text"]':{display:"flex",flex:"1 1 auto",flexDirection:"column",minWidth:"0"},'& [part="sync-label"]':{fontWeight:"600"},'& [part="sync-time"], & [part="included"], & [part="file-dir"], & [part="history-meta"], & [part="choice-note"], & [part="live-summary"], & [part="hosting-summary"], & [part="branch-sync"], & [part="branch-summary"], & [part="deployment-when"]':{color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"},'& [part="changes-bar"]':{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"var(--jx-space-3)"},'& [part="groups"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-3)"},'& [part="group-name"]':{fontSize:"var(--jx-text-xs)",color:"var(--fg-dim)",fontFamily:"var(--font-mono)"},'& [part="file-row"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-2)",padding:"2px var(--jx-space-2)",borderRadius:"var(--jx-radius-sm)"},'& [part="file-row"]:hover, & [part="file-row"]:focus-within':{background:"var(--hover-bg)"},'& [part="file-text"]':{display:"flex",flex:"1",alignItems:"baseline",gap:"var(--jx-space-2)",minWidth:"0",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},'& [part="file-dir"]':{overflow:"hidden",textOverflow:"ellipsis"},'& [part="badge"]':{$description:"One letter and a colour, which is why the checkbox and the row's buttons carry the status in words as well.",flex:"none",width:"16px",color:"var(--signal)",fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-xs)",fontWeight:"700",textAlign:"center"},'& [part="badge"][data-status="A"], & [part="badge"][data-status="U"]':{color:"var(--success)"},'& [part="badge"][data-status="D"]':{color:"var(--danger)"},'& [part="badge"][data-status="R"]':{color:"var(--tag)"},'& [part="empty-message"], & [part="status"], & [part="live-none"]':{margin:"0",color:"var(--fg-dim)",lineHeight:"1.5"},'& [part="empty"]':{display:"flex",flexDirection:"column",alignItems:"center",gap:"var(--jx-space-3)",padding:"var(--jx-space-6)",textAlign:"center"},'& [part="empty"] > [part="empty-message"]':{maxWidth:"48ch"},'& [part="empty-actions"], & [part="command-row"], & [part="publish-actions"]':{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"var(--jx-space-2)"},'& [part="history-list"], & [part="check-list"], & [part="deployment-list"], & [part="branch-list"], & [part="checklist-steps"], & [part="activity-steps"]':{margin:"0",padding:"0",listStyle:"none",display:"flex",flexDirection:"column",gap:"var(--jx-space-1)"},'& [part="history-entry"]':{display:"flex",flexWrap:"wrap",gap:"var(--jx-space-2)",alignItems:"baseline"},'& [part="history-hash"]':{fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-xs)",color:"var(--fg-dim)"},'& [part="history-message"]':{flex:"1",minWidth:"0"},'& [part="checklist-step"], & [part="activity-step"]':{display:"flex",alignItems:"baseline",gap:"var(--jx-space-2)"},'& [part="check"]':{$description:"Centred, not baseline-aligned: the row can hold a small kit button, and a small kit control is layout-contained, so it has no baseline to align on.",display:"flex",alignItems:"center",gap:"var(--jx-space-2)"},'& [part="check-text"]':{flex:"1",minWidth:"0",lineHeight:"1.4"},'& [part="check-icon"], & [part="step-icon"]':{$description:"A kit icon for a check or a checklist link, sized by the kit's own property so it stays square; the activity feed's steps still draw a one-character glyph, which `minWidth` keeps on the same column.",flex:"none",minWidth:"1em",textAlign:"center","--jx-icon-size":"1em",color:"var(--fg-dim)"},'& [part="checklist-step"] > [part="step-icon"]':{$description:"A baseline-aligned row places a kit icon's bottom edge on the text baseline, which draws it high; the negative end margin lowers it onto the line's middle.",marginBlockEnd:"-0.15em"},'& [data-state="done"] > [part="check-icon"], & [data-state="done"] > [part="step-icon"]':{color:"var(--success)"},'& [data-state="failed"] > [part="check-icon"], & [data-state="failed"] > [part="step-icon"]':{color:"var(--danger)"},'& [data-state="todo"] > [part="check-icon"]':{color:"var(--warning)"},'& [part="destinations"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-2)"},'& [part="destination-card"] > [part="control"]':{$description:"A destination is a card with a name and a sentence saying what it does, inside one radio, as Add new's choice cards are: the reader hears one name and sees both lines.",width:"100%",height:"auto",flexDirection:"column",alignItems:"flex-start",textAlign:"start",padding:"var(--jx-space-2) var(--jx-space-3)",gap:"2px",whiteSpace:"normal"},'& [part="choice-name"]':{display:"block",fontWeight:"600"},'& [part="choice-note"]':{display:"block"},'& [part="refusal"], & [part="blocker"]':{margin:"0",fontSize:"var(--jx-text-sm)",color:"var(--fg-dim)"},'& [part="review-line"], & [part="live-site"]':{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"var(--jx-space-2)",margin:"0"},'& [part="live-url"]':{fontWeight:"600",wordBreak:"break-all"},'& [part="live-summary"], & [part="hosting-summary"], & [part="host-name"], & [part="branch-note"]':{margin:"0",lineHeight:"1.5"},'& [part="host-name"]':{fontWeight:"600"},'& [part="activity"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-2)",padding:"var(--jx-space-3)",border:"1px solid var(--border)",borderRadius:"var(--jx-radius-md)"},'& [part="activity-head"]':{display:"flex",justifyContent:"space-between",gap:"var(--jx-space-3)"},'& [part="activity-title"]':{fontWeight:"600"},'& [part="activity-status"]':{color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"},'& [part="deployment"]':{display:"grid",gridTemplateColumns:"minmax(64px, auto) minmax(0, 1fr) auto auto",alignItems:"center",gap:"var(--jx-space-3)",padding:"var(--jx-space-1) 0",borderBottom:"1px solid var(--border)"},'& [part="deployment-label"]':{minWidth:"0",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},'& [part="deployment-status"]':{fontSize:"var(--jx-text-sm)"},'& [part="deployment-status"][data-status="success"]':{color:"var(--success)"},'& [part="deployment-status"][data-status="failure"]':{color:"var(--danger)"},'& [part="branch"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-2)",padding:"var(--jx-space-1) var(--jx-space-2)",borderRadius:"var(--jx-radius-sm)","--jx-icon-size":"16px"},'& [part="branch"]:hover':{background:"var(--hover-bg)"},'& [part="branch-icon"]':{color:"var(--fg-dim)"},'& [part="branch-name"]':{flex:"1",minWidth:"0",overflow:"hidden",textOverflow:"ellipsis",fontFamily:"var(--font-mono)"},'& [part="current"]':{display:"inline-flex",gap:"var(--jx-space-2)",alignItems:"baseline"},'& [part="current-tag"]':{padding:"0 6px",borderRadius:"var(--jx-radius-sm)",background:"var(--hover-bg)",fontSize:"var(--jx-text-xs)"},'& [part="hosting"] > section':{padding:"var(--jx-space-4)",border:"1px solid var(--border)",borderRadius:"var(--jx-radius-md)"},'& [part="busy"]':{margin:"0",padding:"var(--jx-space-2) var(--jx-space-5)",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"},'& [part="failure"]':{$description:"`failure`, not `error`: a kit text field keeps a permanent live region named `error`, and a rule on that name would reach the summary field's (surface-part-names.test.ts).",margin:"0",padding:"var(--jx-space-2) var(--jx-space-5)",color:"var(--danger)",borderTop:"1px solid var(--border)",fontSize:"var(--jx-text-sm)"}},children:[{tagName:"header",attributes:{part:"head"},children:[{tagName:"h2",attributes:{part:"heading",id:"${state.titleId}"},textContent:"Publish"},{tagName:"span",attributes:{part:"headline"},textContent:"${state.headline}"}]},{tagName:"jx-tabs",attributes:{part:"tabs",selected:"${state.tab}"},$props:{label:"Publish views"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/selectTab"},value:[{$ref:"event#/detail"}]}]},children:[{$prototype:"Array",items:{$ref:"#/state/tabs"},key:{$ref:"$map/item/value"},map:{tagName:"jx-tab",attributes:{part:"tab",value:"${$map.item.value}",label:"${$map.item.label}",panel:"${state.panelId}","data-tab":"${$map.item.value}"}}}]},{tagName:"div",attributes:{part:"body",id:"${state.panelId}",role:"tabpanel","data-tab":"${state.tab}","aria-label":"${state.tabTitle}"},children:[{tagName:"div",attributes:{part:"tab-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/tab"},cases:{review:{tagName:"div",attributes:{part:"review-slot-mood",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/mood"},cases:{"no-project":{tagName:"div",attributes:{part:"empty"},children:[{tagName:"p",attributes:{part:"empty-message"},textContent:"Open a project to publish it. Publishing reviews your saved changes and sends them to your site."},{tagName:"div",attributes:{part:"clone-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/canClone"},cases:{true:{tagName:"jx-button",attributes:{part:"clone"},$props:{size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/clone"},value:[]}]},children:[{tagName:"jx-icon",$props:{name:"download-simple"}},{tagName:"span",textContent:"Clone Git Repository"}]}}}]},loading:{tagName:"p",attributes:{part:"status"},textContent:"Loading…"},"no-repo":{tagName:"div",attributes:{part:"empty"},children:[{tagName:"p",attributes:{part:"empty-message"},textContent:"This project is not tracked by git yet. Publishing starts with a repository, which keeps every version you publish."},{tagName:"div",attributes:{part:"empty-actions"},children:[{tagName:"jx-button",attributes:{part:"init"},$props:{size:"sm",variant:"accent",disabled:{$ref:"#/state/busy"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/initRepository"},value:[]}]},children:[{tagName:"jx-icon",$props:{name:"plus"}},{tagName:"span",textContent:"Initialize Repository"}]}]}]},repo:{tagName:"div",attributes:{part:"review"},children:[{tagName:"div",attributes:{part:"changes-column"},children:[{tagName:"div",attributes:{part:"sync-bar"},children:[{tagName:"jx-action-button",attributes:{part:"refresh"},$props:{icon:"arrows-clockwise",size:"sm",quiet:!0,label:"Refresh",hint:"Refresh source control",disabled:{$ref:"#/state/busy"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/refresh"},value:[]}]}},{tagName:"div",attributes:{part:"sync-text"},children:[{tagName:"span",attributes:{part:"sync-label"},textContent:"${state.syncLabel}"},{tagName:"span",attributes:{part:"updated-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasLastUpdated"},cases:{true:{tagName:"span",attributes:{part:"sync-time"},textContent:"${state.lastUpdated}"}}}]},{tagName:"div",attributes:{part:"remote-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/remoteState"},cases:{remote:{tagName:"jx-action-group",attributes:{part:"sync-actions"},$props:{label:"Sync with the remote",compact:!1},children:[{tagName:"jx-action-button",attributes:{part:"fetch"},$props:{icon:"download-simple",size:"sm",quiet:!0,label:"Fetch",hint:"Fetch from the remote",disabled:{$ref:"#/state/busy"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/fetch"},value:[]}]}},{tagName:"jx-action-button",attributes:{part:"pull"},$props:{icon:"arrow-down",size:"sm",quiet:!0,label:{$ref:"#/state/pullLabel"},hint:{$ref:"#/state/pullLabel"},disabled:{$ref:"#/state/busy"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pull"},value:[]}]}},{tagName:"jx-action-button",attributes:{part:"push"},$props:{icon:"arrow-up",size:"sm",quiet:!0,label:{$ref:"#/state/pushLabel"},hint:{$ref:"#/state/pushLabel"},disabled:{$ref:"#/state/busy"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/push"},value:[]}]}}]},local:{tagName:"jx-button",attributes:{part:"create-repository"},$props:{size:"sm",disabled:{$ref:"#/state/busy"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/createRepository"},value:[]}]},children:[{tagName:"jx-icon",$props:{name:"share-network"}},{tagName:"span",textContent:"Create GitHub repository"}]}}}]},{tagName:"section",attributes:{part:"changes"},children:[{tagName:"h3",attributes:{part:"section-heading"},textContent:"Changes"},{tagName:"div",attributes:{part:"changes-bar"},children:[{tagName:"span",attributes:{part:"included"},textContent:"${state.includedLabel}"},{tagName:"div",attributes:{part:"include-all-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/filesState"},cases:{listed:{tagName:"jx-checkbox",attributes:{part:"include-all"},$props:{checked:{$ref:"#/state/allIncluded"},indeterminate:{$ref:"#/state/someIncluded"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/includeAll"},value:[{$ref:"event#/target/checked"}]}]},children:[{tagName:"span",textContent:"Include all"}]}}}]},{tagName:"div",attributes:{part:"groups-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/filesState"},cases:{listed:{tagName:"div",attributes:{part:"groups"},children:[{$prototype:"Array",items:{$ref:"#/state/groups"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"group"},children:[{tagName:"div",attributes:{part:"group-name"},textContent:"${$map.item.name}"},{$prototype:"Array",items:{$ref:"$map/item/files"},key:{$ref:"$map/item/key"},map:{tagName:"div",attributes:{part:"file-row","data-path":"${$map.item.path}","data-included":"${$map.item.included}"},children:[{tagName:"jx-checkbox",attributes:{part:"include","data-path":"${$map.item.path}"},$props:{checked:{$ref:"$map/item/included"},label:{$ref:"$map/item/includeLabel"},size:"sm"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/include"},value:[{$ref:"$map/item/path"},{$ref:"event#/target/checked"}]}]}},{tagName:"span",attributes:{part:"file-text"},children:[{tagName:"span",attributes:{part:"file-name"},textContent:"${$map.item.name}"},{tagName:"span",attributes:{part:"dir-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasDir"},cases:{true:{tagName:"span",attributes:{part:"file-dir"},textContent:"${$map.item.dir}"}}}]},{tagName:"span",attributes:{part:"badge","data-status":"${$map.item.status}",title:"${$map.item.statusWord}"},textContent:"${$map.item.status}"},{tagName:"jx-action-button",attributes:{part:"compare","data-path":"${$map.item.path}"},$props:{icon:"columns",size:"sm",quiet:!0,label:{$ref:"$map/item/compareLabel"},hint:"Before and after"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/compare"},value:[{$ref:"$map/item/path"}]}]}},{tagName:"jx-action-button",attributes:{part:"discard","data-path":"${$map.item.path}"},$props:{icon:"arrow-u-up-left",size:"sm",quiet:!0,label:{$ref:"$map/item/discardLabel"},hint:{$ref:"$map/item/discardHint"},disabled:{$ref:"$map/item/cannotDiscard"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/discard"},value:[{$ref:"$map/item/path"}]}]}}]}}]}}]},empty:{tagName:"p",attributes:{part:"empty-message"},textContent:"Nothing to publish. Files you edit and save show up here, ready to review."}}}]},{tagName:"section",attributes:{part:"history"},children:[{tagName:"h3",attributes:{part:"section-heading"},textContent:"Recent commits"},{tagName:"div",attributes:{part:"history-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/commitsState"},cases:{listed:{tagName:"ul",attributes:{part:"history-list"},children:[{$prototype:"Array",items:{$ref:"#/state/commits"},key:{$ref:"$map/item/key"},map:{tagName:"li",attributes:{part:"history-entry"},children:[{tagName:"span",attributes:{part:"history-hash"},textContent:"${$map.item.hash}"},{tagName:"span",attributes:{part:"history-message"},textContent:"${$map.item.message}"},{tagName:"span",attributes:{part:"history-meta"},textContent:"${$map.item.meta}"}]}}]},empty:{tagName:"p",attributes:{part:"empty-message"},textContent:"No commits yet. Each change set you publish becomes a version you can come back to."}}}]}]},{tagName:"div",attributes:{part:"publish-column"},children:[{tagName:"section",attributes:{part:"checks"},children:[{tagName:"h3",attributes:{part:"section-heading"},textContent:"Checks"},{tagName:"ul",attributes:{part:"check-list"},children:[{$prototype:"Array",items:{$ref:"#/state/checks"},key:{$ref:"$map/item/key"},map:{tagName:"li",attributes:{part:"check","data-check":"${$map.item.key}","data-state":"${$map.item.state}"},children:[{tagName:"jx-icon",attributes:{part:"check-icon"},$props:{name:{$ref:"$map/item/icon"},label:{$ref:"$map/item/iconLabel"}}},{tagName:"span",attributes:{part:"check-text"},textContent:"${$map.item.text}"},{tagName:"span",attributes:{part:"check-action-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasAction"},cases:{true:{tagName:"jx-button",attributes:{part:"check-action",title:"${$map.item.actionTitle}","data-check":"${$map.item.key}"},$props:{size:"sm",disabled:{$ref:"$map/item/actionDisabled"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/runCheck"},value:[{$ref:"$map/item/key"}]}]},children:[{tagName:"span",textContent:"${$map.item.actionLabel}"}]}}}]}}]}]},{tagName:"section",attributes:{part:"destination","data-jx-region":"${state.commitRegion}","aria-labelledby":"${state.destinationId}"},children:[{tagName:"h3",attributes:{part:"section-heading",id:"${state.destinationId}"},textContent:"Where should these changes go?"},{tagName:"jx-action-group",attributes:{part:"destinations"},$props:{selects:"single",label:"Destination",compact:!1,orientation:"vertical"},children:[{$prototype:"Array",items:{$ref:"#/state/destinations"},key:{$ref:"$map/item/value"},map:{tagName:"jx-action-button",attributes:{part:"destination-card","data-destination":"${$map.item.value}"},$props:{label:{$ref:"$map/item/label"},checked:{$ref:"$map/item/checked"},disabled:{$ref:"$map/item/disabled"},hint:{$ref:"$map/item/reason"},quiet:!1},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/pickDestination"},value:[{$ref:"$map/item/value"}]}]},children:[{tagName:"span",attributes:{part:"choice-name"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"choice-note"},textContent:"${$map.item.note}"}]}}]},{tagName:"div",attributes:{part:"refusal-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasRefusal"},cases:{true:{tagName:"p",attributes:{part:"refusal"},textContent:"${state.refusal}"}}},{tagName:"jx-field",attributes:{part:"summary-field"},$props:{label:"Summary",span:!0,description:"Saved with the change as its commit message."},children:[{tagName:"jx-textfield",attributes:{part:"summary"},$props:{multiline:!0,size:"sm",placeholder:"Describe what changed, e.g. Add a pricing page",value:{$ref:"#/state/summary"}},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/editSummary"},value:[{$ref:"event#/target/value"}]}]}}]},{tagName:"div",attributes:{part:"publish-actions"},children:[{tagName:"jx-button",attributes:{part:"publish-button","data-destination":"${state.destination}"},$props:{variant:"accent",size:"md",disabled:{$ref:"#/state/primaryDisabled"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/publish"},value:[]}]},children:[{tagName:"span",textContent:"${state.primaryLabel}"}]},{tagName:"div",attributes:{part:"blocker-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasBlocker"},cases:{true:{tagName:"p",attributes:{part:"blocker"},textContent:"${state.blocker}"}}}]},{tagName:"div",attributes:{part:"review-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/reviewState"},cases:{opened:{tagName:"p",attributes:{part:"review-line"},children:[{tagName:"span",attributes:{part:"review-text"},textContent:"${state.reviewLine}"},{tagName:"jx-button",attributes:{part:"open-review"},$props:{size:"sm",quiet:!0},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openUrl"},value:[{$ref:"#/state/reviewUrl"}]}]},children:[{tagName:"span",textContent:"Open pull request"}]}]}}}]}]}]}}},deploys:{tagName:"div",attributes:{part:"deploys"},children:[{tagName:"section",attributes:{part:"live"},children:[{tagName:"h3",attributes:{part:"section-heading"},textContent:"Live"},{tagName:"div",attributes:{part:"live-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasLiveUrl"},cases:{true:{tagName:"div",attributes:{part:"live-site"},children:[{tagName:"span",attributes:{part:"live-url"},textContent:"${state.liveUrl}"},{tagName:"jx-button",attributes:{part:"visit"},$props:{size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openUrl"},value:[{$ref:"#/state/liveUrl"}]}]},children:[{tagName:"jx-icon",$props:{name:"globe"}},{tagName:"span",textContent:"Visit site"}]}]},false:{tagName:"p",attributes:{part:"live-none"},textContent:"${state.liveNone}"}}},{tagName:"p",attributes:{part:"live-summary"},textContent:"${state.liveSummary}"},{tagName:"div",attributes:{part:"command-row"},children:[{$prototype:"Array",items:{$ref:"#/state/deployCommands"},key:{$ref:"$map/item/id"},map:{tagName:"jx-button",attributes:{part:"command","data-command":"${$map.item.id}",title:"${$map.item.title}"},$props:{size:"sm",disabled:{$ref:"$map/item/disabled"},quiet:!1},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/run"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",textContent:"${$map.item.label}"}]}}]}]},{tagName:"div",attributes:{part:"running-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/runningState"},cases:{running:{tagName:"section",attributes:{part:"running"},children:[{tagName:"h3",attributes:{part:"section-heading"},textContent:"Publishing now"},{$prototype:"Array",items:{$ref:"#/state/running"},key:{$ref:"$map/item/id"},map:{tagName:"div",attributes:{part:"activity"},children:[{tagName:"div",attributes:{part:"activity-head"},children:[{tagName:"span",attributes:{part:"activity-title"},textContent:"${$map.item.title}"},{tagName:"span",attributes:{part:"activity-status"},textContent:"${$map.item.status}"}]},{tagName:"ol",attributes:{part:"activity-steps"},children:[{$prototype:"Array",items:{$ref:"$map/item/steps"},key:{$ref:"$map/item/key"},map:{tagName:"li",attributes:{part:"activity-step","data-state":"${$map.item.state}"},children:[{tagName:"span",attributes:{part:"step-icon","aria-hidden":"true"},textContent:"${$map.item.icon}"},{tagName:"span",attributes:{part:"step-label"},textContent:"${$map.item.label}"}]}}]}]}}]}}},{tagName:"section",attributes:{part:"deploy-history"},children:[{tagName:"div",attributes:{part:"section-head"},children:[{tagName:"h3",attributes:{part:"section-heading"},textContent:"History"},{tagName:"jx-action-button",attributes:{part:"reload-deploys"},$props:{icon:"arrows-clockwise",size:"sm",quiet:!0,label:"Refresh deployments",hint:"Ask the host again",disabled:{$ref:"#/state/deploysBusy"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/reloadDeployments"},value:[]}]}}]},{tagName:"div",attributes:{part:"deploys-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/deploysState"},cases:{listed:{tagName:"div",attributes:{part:"history-rows",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/historyState"},cases:{listed:{tagName:"ol",attributes:{part:"deployment-list"},children:[{$prototype:"Array",items:{$ref:"#/state/history"},key:{$ref:"$map/item/key"},map:{tagName:"li",attributes:{part:"deployment","data-environment":"${$map.item.environment}"},children:[{tagName:"span",attributes:{part:"deployment-when"},textContent:"${$map.item.when}"},{tagName:"span",attributes:{part:"deployment-label"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"deployment-status","data-status":"${$map.item.statusKey}",title:"${$map.item.statusDetail}"},textContent:"${$map.item.status}"},{tagName:"jx-action-button",attributes:{part:"open-deployment"},$props:{icon:"arrow-square-out",size:"sm",quiet:!0,label:{$ref:"$map/item/openLabel"},hint:{$ref:"$map/item/url"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openUrl"},value:[{$ref:"$map/item/url"}]}]}}]}}]},empty:{tagName:"p",attributes:{part:"empty-message"},textContent:"The host reports no deployments of this project yet."}}},loading:{tagName:"p",attributes:{part:"status"},textContent:"Asking the host for its deployments…"},note:{tagName:"p",attributes:{part:"empty-message"},textContent:"${state.deploysNote}"}}}]},{tagName:"section",attributes:{part:"previews"},children:[{tagName:"h3",attributes:{part:"section-heading"},textContent:"Branch previews"},{tagName:"div",attributes:{part:"previews-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/previewsState"},cases:{listed:{tagName:"ol",attributes:{part:"deployment-list"},children:[{$prototype:"Array",items:{$ref:"#/state/previews"},key:{$ref:"$map/item/key"},map:{tagName:"li",attributes:{part:"deployment","data-environment":"${$map.item.environment}"},children:[{tagName:"span",attributes:{part:"deployment-when"},textContent:"${$map.item.when}"},{tagName:"span",attributes:{part:"deployment-label"},textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"deployment-status","data-status":"${$map.item.statusKey}",title:"${$map.item.statusDetail}"},textContent:"${$map.item.status}"},{tagName:"jx-action-button",attributes:{part:"open-deployment"},$props:{icon:"arrow-square-out",size:"sm",quiet:!0,label:{$ref:"$map/item/openLabel"},hint:{$ref:"$map/item/url"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openUrl"},value:[{$ref:"$map/item/url"}]}]}}]}}]},empty:{tagName:"p",attributes:{part:"empty-message"},textContent:"No previews. A branch pushed to the remote is deployed as a preview of its own, with its own address."}}}]}]},branches:{tagName:"div",attributes:{part:"branches"},children:[{tagName:"section",attributes:{part:"branch-list-section"},children:[{tagName:"div",attributes:{part:"section-head"},children:[{tagName:"h3",attributes:{part:"section-heading"},textContent:"Branches"},{tagName:"jx-button",attributes:{part:"new-branch"},$props:{size:"sm",disabled:{$ref:"#/state/newBranchDisabled"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/newBranch"},value:[]}]},children:[{tagName:"jx-icon",$props:{name:"plus"}},{tagName:"span",textContent:"New branch"}]}]},{tagName:"p",attributes:{part:"branch-summary"},textContent:"${state.branchSummary}"},{tagName:"div",attributes:{part:"branch-note-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasBranchNote"},cases:{true:{tagName:"p",attributes:{part:"branch-note"},textContent:"${state.branchNote}"}}},{tagName:"div",attributes:{part:"branches-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/branchesState"},cases:{listed:{tagName:"ul",attributes:{part:"branch-list"},children:[{$prototype:"Array",items:{$ref:"#/state/branches"},key:{$ref:"$map/item/key"},map:{tagName:"li",attributes:{part:"branch","data-branch":"${$map.item.name}","data-current":"${$map.item.current}"},children:[{tagName:"jx-icon",attributes:{part:"branch-icon"},$props:{name:"git-branch"}},{tagName:"span",attributes:{part:"branch-name"},textContent:"${$map.item.name}"},{tagName:"span",attributes:{part:"branch-state",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/current"},cases:{true:{tagName:"span",attributes:{part:"current"},children:[{tagName:"span",attributes:{part:"current-tag"},textContent:"Current"},{tagName:"span",attributes:{part:"branch-sync"},textContent:"${$map.item.note}"}]},false:{tagName:"jx-button",attributes:{part:"switch","data-branch":"${$map.item.name}"},$props:{size:"sm",label:{$ref:"$map/item/switchName"},disabled:{$ref:"#/state/busy"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/checkout"},value:[{$ref:"$map/item/name"}]}]},children:[{tagName:"span",textContent:"${$map.item.switchLabel}"}]}}}]}}]},empty:{tagName:"p",attributes:{part:"empty-message"},textContent:"${state.branchesEmpty}"}}}]}]},hosting:{tagName:"div",attributes:{part:"hosting"},children:[{tagName:"section",attributes:{part:"source"},children:[{tagName:"h3",attributes:{part:"section-heading"},textContent:"Where your project is saved"},{tagName:"p",attributes:{part:"hosting-summary"},textContent:"${state.sourceSummary}"},{tagName:"div",attributes:{part:"command-row"},children:[{$prototype:"Array",items:{$ref:"#/state/sourceCommands"},key:{$ref:"$map/item/id"},map:{tagName:"jx-button",attributes:{part:"command","data-command":"${$map.item.id}",title:"${$map.item.title}"},$props:{size:"sm",disabled:{$ref:"$map/item/disabled"},quiet:!1},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/run"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",textContent:"${$map.item.label}"}]}}]}]},{tagName:"section",attributes:{part:"host"},children:[{tagName:"h3",attributes:{part:"section-heading"},textContent:"Where your site is hosted"},{tagName:"p",attributes:{part:"host-name"},textContent:"${state.hostTitle}"},{tagName:"p",attributes:{part:"hosting-summary"},textContent:"${state.hostSummary}"},{tagName:"div",attributes:{part:"command-row"},children:[{$prototype:"Array",items:{$ref:"#/state/hostCommands"},key:{$ref:"$map/item/id"},map:{tagName:"jx-button",attributes:{part:"command","data-command":"${$map.item.id}",title:"${$map.item.title}"},$props:{size:"sm",disabled:{$ref:"$map/item/disabled"},quiet:!1},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/run"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",textContent:"${$map.item.label}"}]}}]}]},{tagName:"section",attributes:{part:"build"},children:[{tagName:"h3",attributes:{part:"section-heading"},textContent:"How it is built"},{tagName:"p",attributes:{part:"hosting-summary"},textContent:"The build adapter decides what the build produces: static files, or a server for sign-in and data routes."},{tagName:"div",$description:"The mount box for the Deploy section (`settings/project-sections.ts` `renderDeploySection`, `surfaces/settings-deploy.json`), which moved here from Project Settings (studio.md §17.1). The flow is handed this node by `onNodeCreated` and mounts the section into it; nothing in this document styles what lands here.",attributes:{part:"adapter-island",role:"none"}}]},{tagName:"section",attributes:{part:"address"},children:[{tagName:"h3",attributes:{part:"section-heading"},textContent:"Your address"},{tagName:"div",attributes:{part:"domain-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/domainState"},cases:{set:{tagName:"div",attributes:{part:"live-site"},children:[{tagName:"span",attributes:{part:"live-url"},textContent:"${state.domain}"},{tagName:"jx-button",attributes:{part:"visit"},$props:{size:"sm"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openUrl"},value:[{$ref:"#/state/domain"}]}]},children:[{tagName:"jx-icon",$props:{name:"globe"}},{tagName:"span",textContent:"Visit site"}]}]}}},{tagName:"p",attributes:{part:"hosting-summary"},textContent:"${state.domainNote}"}]},{tagName:"section",attributes:{part:"checklist"},children:[{tagName:"h3",attributes:{part:"section-heading"},textContent:"Deploy checklist"},{tagName:"p",attributes:{part:"hosting-summary"},textContent:"${state.checklistSummary}"},{tagName:"ol",attributes:{part:"checklist-steps"},children:[{$prototype:"Array",items:{$ref:"#/state/checklistSteps"},key:{$ref:"$map/item/id"},map:{tagName:"li",attributes:{part:"checklist-step","data-step":"${$map.item.id}","data-state":"${$map.item.state}"},children:[{tagName:"jx-icon",attributes:{part:"step-icon"},$props:{name:{$ref:"$map/item/icon"},label:{$ref:"$map/item/iconLabel"}}},{tagName:"span",attributes:{part:"step-label"},textContent:"${$map.item.text}"}]}}]}]}]}}}]},{tagName:"div",attributes:{part:"busy-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/busy"},cases:{true:{tagName:"p",attributes:{part:"busy",role:"status"},textContent:"Working…"}}},{tagName:"div",attributes:{part:"failure-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasError"},cases:{true:{tagName:"p",attributes:{part:"failure",role:"alert"},textContent:"${state.error}"}}}]};E("publish-workspace",lt);function Pt(){return{allIncluded:!1,blocker:"",branchNote:"",branchSummary:"",branches:[],branchesEmpty:"",branchesState:"empty",busy:!1,canClone:!1,checklistSteps:[],checklistSummary:"",checks:[],commitRegion:"",commits:[],commitsState:"empty",deployCommands:[],deploysBusy:!1,deploysNote:"",deploysState:"note",destination:"live",destinationId:"",destinations:[],domain:"",domainNote:"",domainState:"none",error:"",filesState:"empty",groups:[],hasBlocker:!1,hasBranchNote:!1,hasError:!1,hasLastUpdated:!1,hasLiveUrl:!1,hasRefusal:!1,headline:"",history:[],historyState:"empty",hostCommands:[],hostSummary:"",hostTitle:"",includedLabel:"",lastUpdated:"",liveNone:"",liveSummary:"",liveUrl:"",mood:"loading",newBranchDisabled:!1,panelId:"",previews:[],previewsState:"empty",primaryDisabled:!0,primaryLabel:"",pullLabel:"Pull",pushLabel:"Push",refusal:"",region:"",remoteState:"local",reviewLine:"",reviewState:"none",reviewUrl:"",running:[],runningState:"none",someIncluded:!1,sourceCommands:[],sourceSummary:"",summary:"",syncLabel:"",tab:"review",tabTitle:"",tabs:[],titleId:""}}function Rt(t){let e=t?.$map,a=m(e)?e.item:void 0,r=m(a)?a.path:void 0;return n(r)?r:""}function Dt(t){let e=n(t)?void 0:t.attributes?.part;return n(e)?e:""}function pt(t,e,a){t.replaceChildren();let{adapterHost:r,compareHost:i,...l}=a,o=b({...Pt(),...l});Object.assign(o,e);let c=null,h=!1,y=I("publish-workspace",o,t,{onNodeCreated:(d,v,j,w)=>{if(h||!(d instanceof HTMLElement))return;let g=Dt(j);if(g==="adapter-island")r(d);else if(g==="compare")i(d,Rt(w))}}).then((d)=>{if(h)d.dispose();else c=d;return d.root});return{attached:()=>{if(h)return!1;let d=c?.root;return d===void 0?!0:d instanceof HTMLElement&&t.contains(d)},dispose(){h=!0,c?.dispose(),c=null},ready:y,update:(d)=>{Object.assign(o,d)}}}async function V(){let t=Ii();if(!t||!Xl()||u.publish.deploys.state==="loading")return;let e=u.publish.deploys,a=t.projectName,r=()=>u.publish.deploys!==e||Ii()?.projectName!==a;e.state="loading",e.project=a;try{let i=await H$(t);if(r()){dt(e);return}e.rows=i,e.error="",e.state="loaded",jd(i[0]??null)}catch(i){if(r()){dt(e);return}e.rows=[],e.error=X(i),e.state="failed"}}function dt(t){if(u.publish.deploys===t)t.state="idle"}function bt(){let t=V$(),{deploys:e}=u.publish;return e.state==="loaded"&&t!==null&&!e.rows.some((a)=>a.id===t.id)}function Lt(){return u.publish.deploys.state==="idle"||bt()}function qN(t){if(u.publish.tab=t,t==="review"&&u.git.logEntries===null&&u.git.status?.isRepo)tC();if(t==="deploys"&&(u.publish.deploys.state!=="loaded"||bt()))V()}var Tt=new Map([["done",{icon:"check",label:"Passed"}],["failed",{icon:"x",label:"Failed"}],["running",{icon:"spinner",label:"Running"}],["todo",{icon:"warning-circle",label:"To do"}],["unknown",{icon:"question",label:"Not checked yet"}]]);function ct(t){return Tt.get(t)??{icon:"question",label:"Not checked yet"}}function At(t){return`${t} ${t===1?"change":"changes"}`}function gt(){return u.git.status?.files??[]}function O(){let t=u.git.status?.remotes;return Array.isArray(t)&&t.length>0?t[0]??"":""}function z(){if(!x)return"no-project";let{error:t,loading:e,status:a}=u.git;if(!a&&!e&&!t)return"loading";return a&&!a.isRepo?"no-repo":"repo"}function F(){return u.git.branches?.current||u.git.status?.branch||""}function mt(){let{status:t}=u.git,e=t?.ahead?`${t.ahead} ahead`:"",a=t?.behind?`${t.behind} behind`:"";return e||a?[e,a].filter(Boolean).join(", "):"Up to date"}function Ht(t){if(t==="no-repo")return"Not tracked by git yet";if(t!=="repo")return"";let e=gt().length;return`${F()?`On ${F()}`:"On a branch with no name yet"} · ${e>0?`${At(e)} to publish`:"nothing to publish"}`}function It(t){return{files:t.files.map((e)=>({...e,compareLabel:`Before and after: ${e.label}`,discardHint:e.cannotDiscard?"A new file has no saved version to go back to":"Discard changes",discardLabel:`Discard changes to ${e.path}`,includeLabel:`Include ${e.path}`})),key:t.key,name:t.name}}function D(t){let e=ae();if(!e)return[];return t.flatMap((a)=>{let r=e.get(a);if(!r||!e.isVisible(a))return[];let i=e.disabledReason(a);return[{disabled:i!==void 0,id:a,label:r.title,title:i?`${r.title}: requires ${i}`:r.title}]})}function Wt(t){let e={actionDisabled:!1,actionLabel:"",actionTitle:"",hasAction:!1,icon:ct(t.state).icon,iconLabel:ct(t.state).label,key:t.key,state:t.state,text:t.text};if(t.key==="build"){if(t.state==="running"||!r0())return e;let r=t.state==="unknown"?"Check build":"Check again";return{...e,actionLabel:r,actionTitle:r,hasAction:!0}}let[a]=t.command?D([t.command]):[];return a?{...e,actionDisabled:a.disabled,actionLabel:a.label,actionTitle:a.title,hasAction:!0}:e}function Bt(t){let[e]=t.filter((a)=>a.environment==="production"&&ft(a)).toSorted((a,r)=>Date.parse(r.createdOn)-Date.parse(a.createdOn));return e?.id??""}function ft(t){return t.status==="success"&&t.stage==="deploy"}function zt(t,e){if(t.status==="failure")return"Failed";if(t.status==="canceled")return"Canceled";if(!ft(t))return"Building…";if(t.environment!=="production")return"Ready";return t.id===e?"Live":"Replaced"}function ut(t,e){let r=t.environment==="production"?`Production${t.branch?` · ${t.branch}`:""}`:t.branch||"Preview";return{environment:t.environment,key:t.id,label:r,openLabel:`Open ${r}`,status:zt(t,e),statusDetail:`${t.stage}: ${t.status}`,statusKey:t.status,url:t.url,when:ix(t.createdOn)}}function Et(){if(!Xl())return{deploysNote:"This host cannot reach the Cloudflare API, so deployments are not listed here. Your host runs bunx jx build and serves dist/.",deploysState:"note"};if(!Ii())return{deploysNote:"Connect a host under Hosting, and every deployment it makes is listed here.",deploysState:"note"};if(u.publish.deploys.state==="failed")return{deploysNote:`The host did not answer: ${u.publish.deploys.error}`,deploysState:"note"};return{deploysNote:"",deploysState:u.publish.deploys.state==="loaded"?"listed":"loading"}}function Ft(){return u.publish.deploys.project===Ii()?.projectName?u.publish.deploys.rows:[]}function yt(){return Ii()?.productionUrl||x?.projectConfig?.url||""}function Mt(t){let e=Ii();if(e?.productionUrl)return"Cloudflare Pages serves it. A custom domain is added on the Cloudflare dashboard.";if(e)return"Cloudflare has not reported an address yet. A custom domain is added on the Cloudflare dashboard.";return t?"The Production URL in Project Settings › Overview. No host is connected yet; once one is, point this domain at it on the host's dashboard.":"Your site gets an address when a host is connected, or set its Production URL in Project Settings › Overview."}function Ut(t){if(!Ii())return yt()?"No host is connected, so Studio cannot say what is deployed there. Connect one under Hosting.":"";let e=t.find((o)=>o.environment==="production"),a=V$(),r=a&&(a.environment==="production"||!e)?a:void 0,[i]=[e,r].filter((o)=>o!==void 0).toSorted((o,c)=>Date.parse(c.createdOn)-Date.parse(o.createdOn));if(!i)return"No deployment has been observed yet.";let l=i.branch?` from ${i.branch}`:"";return`Last deployed ${ix(i.createdOn)}${l} · ${i.stage}: ${i.status}`}function Vt(){let{status:t}=u.git;if(!x)return"";if(!t)return"Source control has not reported on this project yet.";if(!t.isRepo)return"Not tracked by git yet. A repository keeps every version you publish.";let e=F()||"an unnamed branch",a=O();if(Gs())return`Saved on GitHub${a?` (${a})`:""}, on ${e}. Every commit lands there as it is made.`;return a?`Saved in git and pushed to ${a}, on ${e}.`:`Saved in git on this machine only, on ${e}. A host builds from a remote, so create the GitHub repository next.`}function Ot(){let{status:t}=u.git;if(!t)return["git.signInToGithub"];if(!t.isRepo)return["git.init","git.signInToGithub"];if(O()==="")return["git.createGithubRepository","git.signInToGithub"];return Gs()?["git.signInToGithub"]:["git.push","git.signInToGithub"]}function Jt(){let t=Ii();if(t)return{hostSummary:`Every publish is pushed to the remote and built by Cloudflare Pages${t.productionUrl?` at ${t.productionUrl}`:""}.`,hostTitle:`Cloudflare Pages: ${t.projectName}`};if(ve()&&p().cfConnect)return{hostSummary:"Runs on Cloudflare with nothing to configure: connect it, and every publish builds and deploys.",hostTitle:"Jx Cloud, on Cloudflare"};if(Xl())return{hostSummary:"Connect a Cloudflare API token, and every publish builds and deploys on your own account.",hostTitle:"Your Cloudflare account"};return{hostSummary:"This host cannot reach Cloudflare. Choose a build adapter below; your host runs bunx jx build and serves dist/.",hostTitle:"Another host"}}function ht(t){let e=t.replaceAll(/[^\w-]/g,"-"),a=z(),{git:r}=u,i=gt(),l=i.filter((s)=>s.staged).length,{destination:o,tab:c}=u.publish,h=pm(o),y=a==="repo"?fm(h):"",d=o==="review"?gb():"",v=ZN(),j=r.logEntries??[],w=Ii(),g=yt(),N=Ft(),J=N.filter((s)=>s.environment==="preview"),q=Bt(N),G=ls.filter((s)=>s.source==="Publish"&&!Hc(s)),_=r.branches?.branches??[],T=r.branches?.current??"",P=Gs(),A=O(),K=W$(),f=i.length;return{...Et(),...Jt(),allIncluded:f>0&&l===f,blocker:y,branchNote:P?"Each branch opens in its own session, so switching reloads Studio on that branch.":"",branchSummary:T?`On ${T}`:"",branches:_.map((s)=>({current:s===T,key:s,name:s,note:A?mt():"Local only",switchLabel:P?"Switch and reload":"Switch",switchName:P?`Switch to ${s} and reload`:`Switch to ${s}`})),branchesEmpty:a==="no-repo"?"This project is not tracked by git yet.":"No branches yet. The first commit makes one.",branchesState:_.length>0?"listed":"empty",busy:r.loading,canClone:Hb(),checklistSteps:K.steps,checklistSummary:K.summary,checks:a==="repo"?bb().map((s)=>Wt(s)):[],commitRegion:`${t}/commit`,commits:j.map((s)=>C$(s)),commitsState:j.length>0?"listed":"empty",deployCommands:D(w?["publish.deploy","publish.openDashboard"]:["publish.setUp"]),deploysBusy:u.publish.deploys.state==="loading",destination:h,destinationId:`${e}-destination`,destinations:yw(o),domain:g,domainNote:Mt(g),domainState:g?"set":"none",error:r.error??"",filesState:f>0?"listed":"empty",groups:S$(i).map((s)=>It(s)),hasBlocker:y!=="",hasBranchNote:P,hasError:Boolean(r.error),hasLastUpdated:Boolean(r.lastUpdated),hasLiveUrl:g!=="",hasRefusal:d!=="",headline:Ht(a),history:N.map((s)=>ut(s,q)),historyState:N.length>0?"listed":"empty",hostCommands:D(w?["publish.setUp","publish.openDashboard"]:["publish.setUp"]),includedLabel:f>0?`${l} of ${f} included`:"",lastUpdated:k$(r.lastUpdated),liveNone:w?"The host has not reported an address for this site yet.":"No host is connected. Connect one under Hosting, and every publish ships to it.",liveSummary:Ut(N),liveUrl:g,mood:a,newBranchDisabled:r.loading||a!=="repo",panelId:`${e}-body`,previews:J.map((s)=>ut(s,q)),previewsState:J.length>0?"listed":"empty",primaryDisabled:a!=="repo"||y!=="",primaryLabel:GN(h),pullLabel:r.status?.behind?`Pull (${r.status.behind} behind)`:"Pull",pushLabel:r.status?.ahead?`Push (${r.status.ahead} ahead)`:"Push",refusal:d,region:t,remoteState:A?"remote":"local",reviewLine:v?`Pull request #${v.number} is open for review.`:"",reviewState:v?"opened":"none",reviewUrl:v?.url??"",running:G.map((s)=>M$(s)),runningState:G.length>0?"running":"none",someIncluded:l>0&&l<f,sourceCommands:D(Ot()),sourceSummary:Vt(),summary:r.commitMessage,syncLabel:A?mt():"Local only (no remote)",tab:c,tabTitle:YC[c],tabs:zm.map((s)=>({label:s==="review"&&f>0?`${YC[s]} (${f})`:YC[s],value:s})),titleId:`${e}-title`}}var S=new Map,M=new WeakMap;function $t(){return x?.projectConfig?.build?.adapter||"static"}function qt(t){let e=$t(),a=S.get(t);if(!a?.isConnected||M.get(a)===e)return;M.set(a,e),R(a)}function Gt(t){if(t==="build"){JN();return}let e=bb().find((a)=>a.key===t);if(e?.command)nt(e.command,void 0,"Publish")}function _t(t){return{adapterHost:(e)=>{let a=S.get(t);if(a&&a!==e)B(a);S.set(t,e),M.set(e,$t()),R(e)},checkout:(e)=>{_$(e)},clone:()=>{p$()},compare:(e)=>{U=e,f$(e)},compareHost:(e,a)=>{let r=L.get(t);if(!r)r=new Map,L.set(t,r);r.set(a,e)},createRepository:()=>{nt("git.createGithubRepository",void 0,"Publish")},discard:(e)=>{w$(e)},editSummary:(e)=>{u.git.commitMessage=e},fetch:()=>{m$()},include:(e,a)=>{b$(e,a)},includeAll:(e)=>{y$(e)},initRepository:()=>{nt("git.init",void 0,"Publish")},newBranch:()=>{x$()},openUrl:(e)=>{if(e)Kb(e)},pickDestination:(e)=>{if(Ix(e))u.publish.destination=e},publish:()=>{vw(pm(u.publish.destination))},pull:()=>{g$()},push:()=>{nt("git.push",void 0,"Publish")},refresh:()=>{Es()},reloadDeployments:()=>{V()},run:(e)=>{nt(e,void 0,"Publish")},runCheck:Gt,selectTab:(e)=>{if(EA(e))qN(e)}}}var C=new Map,L=new Map,U=null,vt=new Set;async function wt(t,e){await e.handle.ready;let a=U===null?void 0:L.get(t)?.get(U);if(a?.isConnected)(a.querySelector('[part="control"]')??a).focus()}function GE(t){let e=C.get(t);if(e?.wrap.isConnected&&e.handle.attached()){wt(t,e);return}vt.add(t)}function n0(t,e){let a=C.get(t);return a!==void 0&&a.tabId===e.id&&a.wrap.isConnected&&a.handle.attached()}function i0(t){let e=C.get(t);if(!e)return;e.scope.stop();let a=S.get(t);if(a)B(a);e.handle.dispose(),C.delete(t),S.delete(t),L.delete(t)}function JE(t,e){let{paneId:a,wrap:r}=t;if(n0(a,e))return;if(i0(a),ve()&&z()==="loading")Es();qN(u.publish.tab);let i=$n(a,"publish"),l=pt(r,ht(i),_t(a)),o=me();o.run(()=>{te(()=>{let h=ht(i);if(h.mood==="repo")E$();if(l.update(h),qt(a),h.tab==="deploys"&&Lt())V()}),te(()=>{if(u.publish.tab==="review"&&z()==="repo")v$()})});let c={handle:l,scope:o,tabId:e.id,wrap:r};if(C.set(a,c),vt.delete(a))wt(a,c)}
|
|
2
|
+
export{UN,qN,GE,n0,i0,JE};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
5
|
-
//# sourceMappingURL=studio-
|
|
4
|
+
//# debugId=4AFA7C031B349ADA64756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-d5f7sskn.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{ae}from"./studio-wqfaqw4m.js";import{X}from"./studio-9c6cbq2c.js";import{Up,bh}from"./studio-yrcrncev.js";import{vO}from"./studio-x0gsfr1d.js";import{nt}from"./studio-tpxcryf2.js";import{Ln,E,R}from"./studio-9dq7rwc7.js";import{g}from"./studio-3qr08sxq.js";import{n}from"./studio-k3we3kqb.js";var L=[{id:"general",intro:"",label:"General",note:""},{id:"integrations",intro:"Turn on what your site needs. Each one adds its own options where you use it.",label:"Integrations",note:""},{id:"advanced",intro:"Changes here affect every page. Most sites never need them.",label:"Advanced",note:"For developers"}],_N="integrations";function SN(e){return L.some((t)=>t.id===e)}var U="overview",f=new Map,T=new Set;function k(){for(let e of T)e()}function Ad(){k()}function _S(e){return T.add(e),()=>{T.delete(e)}}function ql(e){f.set(e.key,e),k()}function CN(e){if(f.delete(e))k()}function q(){return[...f.values()].toSorted((e,t)=>e.order-t.order)}function Lw(){let e=q();return L.flatMap((t)=>{let a=e.filter((r)=>(r.group??"integrations")===t.id);return a.length===0?[]:[{id:t.id,intro:t.intro,label:t.label,note:t.note,sections:a}]})}function vT(){return Lw().flatMap((e)=>e.sections.map((t)=>t.key))}function w(e){return f.get(e)}var b=null,h=U;function I(){if(b!==null&&f.has(b))return h=b,b=null,h;if(f.has(h))return h;return vT()[0]??h}function SS(e){if(f.has(e))h=e,b=null;else b=e;k()}var C={$schema:"https://jxsuite.com/schema/v1",$id:"StudioSettingsPane",$description:"Project Settings' home (§17.1, §22.9): the Settings workspace's surface, filling a pane's stage. A head names the workspace and carries the Back control, which says where it goes; under it, the settings editor's two columns, the grouped section list and the section body. It draws no section: `panels/settings-pane.ts` keeps the registry, decides which section is current, and renders whichever one that is into the one empty `[part=\"section-host\"]` island this document leaves for it (studio-ui-guidelines.md §9.4), because a section renderer may be a lit template or a mounted document and neither can share a container with this one. The list is three vertical `tablist`s, one per group (General, Integrations, Advanced), each named by its group heading: a tablist may own only tabs, so a heading between two runs of rows has to END one list rather than sit inside it. Each group is one tab stop and the arrow keys move within it. Under the groups, a Moved footnote names what left Project Settings for a workspace, each with a button that goes there.",tagName:"div",attributes:{part:"settings","data-jx-region":"${state.region}",role:"region","aria-labelledby":"settings-pane-heading"},style:{$description:"Fills the pane's stage by its own geometry, as the Publish and Media homes do: the stage is `position: relative`, so the home takes the whole of it, and each column scrolls itself. No part below is named `body`, `field`, `label`, `error`, `text` or `actions`: sections mount kit controls and documents of their own inside this one, the kit is light DOM, and a rule keyed on one of their part names here would reach into them.",position:"absolute",inset:"0",display:"flex",flexDirection:"column",boxSizing:"border-box",minHeight:"0",background:"var(--bg)",color:"var(--fg)",fontFamily:"var(--jx-font-sans)",textAlign:"initial",'& [part="head"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-3)",padding:"var(--jx-space-3) var(--jx-space-5)",borderBottom:"1px solid var(--border)"},'& [part="heading"]':{flex:"1",margin:"0",fontSize:"var(--jx-text-lg)",fontWeight:"600"},'& [part="columns"]':{display:"flex",flex:"1",minHeight:"0"},'& [part="nav"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-4)",width:"220px",minWidth:"220px",flexShrink:"0",padding:"var(--jx-space-3) var(--jx-space-3) var(--jx-space-3) var(--jx-space-2)",borderRight:"1px solid var(--border)",overflowY:"auto",fontSize:"13px"},'& [part="group"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-1)"},'& [part="group-title"]':{display:"flex",alignItems:"baseline",gap:"var(--jx-space-2)",margin:"0",padding:"0 var(--jx-space-3)",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)",fontWeight:"600",letterSpacing:"0.04em",textTransform:"uppercase"},'& [part="group-note"]':{$description:`The Advanced group's "For developers": a qualifier on the heading, not a second heading, so it reads at the heading's size without its weight.`,fontWeight:"400",letterSpacing:"0",textTransform:"none"},'& [part="group-note"]:empty':{display:"none"},'& [part="group-tabs"]':{$description:"The rule a vertical strip draws on its trailing edge is the column's own here: the nav draws one border for all three groups, so each strip drawing its own would stack three short rules beside it.",borderInlineEnd:"0"},'& [part="nav-item"]':{$description:"Full-bleed rows, which a tab is not by default: `jx-tab` centres its label and caps itself at 220px because a horizontal strip is a row of chips. In the nav column the row IS the target, so the label goes to the leading edge and the cap comes off.",maxWidth:"none",justifyContent:"flex-start",padding:"var(--jx-space-2) var(--jx-space-3)"},'& [part="moved"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-1)",marginTop:"auto",padding:"var(--jx-space-3)",borderTop:"1px solid var(--border)",color:"var(--fg-dim)",fontSize:"var(--jx-text-md)"},'& [part="moved-title"]':{margin:"0",fontWeight:"600",color:"var(--fg)"},'& [part="moved-row"]':{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"var(--jx-space-1)"},'& [part="content"]':{flex:"1",minWidth:"0",overflowY:"auto",padding:"var(--jx-space-4) var(--jx-space-5) var(--jx-space-6)"},'& [part="group-intro"]':{margin:"0 0 var(--jx-space-3)",color:"var(--fg-dim)",fontSize:"13px",maxWidth:"1200px"},'& [part="group-intro"]:empty':{display:"none"},'& [part="section-host"]':{$description:"Wide enough for a map-layout section's list and editor side by side, and no wider: on a large monitor a form stretched to the stage's full width is a line too long to read.",display:"block",minWidth:"0",maxWidth:"1200px"},'& [part="empty"]':{$description:"What the body says when the active section is registered by nobody: every section unregistering at once, which is a project closing while Settings is on screen. A blank column beside a list reads as a broken surface, so it says which it is.",display:"flex",alignItems:"center",justifyContent:"center",minHeight:"120px",margin:"0",color:"var(--fg-dim)",fontSize:"13px"},'& [part="failure"]':{$description:"A section whose renderer threw or rejected. It is said where the section would have been, in the reader's line of sight, because a section that silently draws nothing is indistinguishable from one with nothing to say.",margin:"0",padding:"var(--jx-space-3)",border:"1px solid var(--danger)",borderRadius:"var(--radius)",color:"var(--fg)",fontSize:"13px"}},children:[{tagName:"div",attributes:{part:"head"},children:[{tagName:"jx-action-button",attributes:{part:"back"},$props:{size:"sm",quiet:!0,icon:"arrow-left"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/back"},value:[]}]},children:[{tagName:"span",textContent:"${state.backLabel}"}],$description:"Back to the workspace Settings was opened from, named, as the pane context bar's Back is in a workspace with no tab strip (§22.1): the top bar draws no tab for Settings, so nothing else on screen says where the author came from."},{tagName:"h2",attributes:{part:"heading",id:"settings-pane-heading"},textContent:"${state.heading}"}]},{tagName:"div",attributes:{part:"columns",role:"none"},children:[{tagName:"div",attributes:{part:"nav",role:"none"},children:[{$prototype:"Array",items:{$ref:"#/state/groups"},key:{$ref:"$map/item/id"},map:{tagName:"div",attributes:{part:"group",role:"none","data-group":"${$map.item.id}"},children:[{tagName:"h3",attributes:{part:"group-title",id:"${$map.item.titleId}"},children:[{tagName:"span",textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"group-note"},textContent:"${$map.item.note}"}]},{tagName:"jx-tabs",attributes:{part:"group-tabs",selected:"${state.active}",orientation:"vertical"},$props:{label:{$ref:"$map/item/tabsLabel"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/selectSection"},value:[{$ref:"event#/detail"}]}]},children:[{$prototype:"Array",items:{$ref:"$map/item/sections"},key:{$ref:"$map/item/key"},map:{tagName:"jx-tab",attributes:{part:"nav-item",id:"${$map.item.tabId}","data-section":"${$map.item.key}",value:"${$map.item.key}",label:"${$map.item.label}",panel:"settings-pane-panel"}}}]}]}},{tagName:"div",attributes:{part:"moved",role:"group","aria-labelledby":"settings-pane-moved"},children:[{tagName:"p",attributes:{part:"moved-title",id:"settings-pane-moved"},textContent:"Moved"},{$prototype:"Array",items:{$ref:"#/state/moved"},key:{$ref:"$map/item/workspace"},map:{tagName:"div",attributes:{part:"moved-row","data-moved":"${$map.item.workspace}"},children:[{tagName:"span",textContent:"${$map.item.what} →"},{tagName:"jx-button",attributes:{part:"moved-link"},$props:{size:"sm",quiet:!0,label:{$ref:"$map/item/linkLabel"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openMoved"},value:[{$ref:"$map/item/workspace"}]}]},children:[{tagName:"span",textContent:"${$map.item.place}"}]}]}}]}]},{tagName:"jx-tab-panel",attributes:{part:"content",id:"settings-pane-panel"},$props:{active:!0,labelledby:{$ref:"#/state/activeTabId"}},children:[{$description:`The current group's intro ("Changes here affect every page. Most sites never need them."), above whichever of its sections is showing. General has none, and an empty sentence draws nothing.`,tagName:"p",attributes:{part:"group-intro"},textContent:"${state.intro}"},{$description:"The island, and it stays empty: a settings section renders itself, into a host this document never writes into and never reads back (studio-ui-guidelines.md §9.4).",tagName:"div",attributes:{part:"section-host"}},{tagName:"div",attributes:{part:"empty-slot",role:"none"},$switch:{$ref:"#/state/hasSection"},cases:{false:{tagName:"p",attributes:{part:"empty"},textContent:"${state.empty}"}}},{tagName:"div",attributes:{part:"failure-slot",role:"none"},$switch:{$ref:"#/state/failureState"},cases:{failed:{tagName:"p",attributes:{part:"failure",role:"alert"},textContent:"${state.failure}"}}}]}]}]};E("settings-pane",C);function J(e){let t=n(e)?void 0:e.attributes?.part;return n(t)?t:""}function A(e){return e===""?"ok":"failed"}function H(e,t,a){let r=g({...t,...a,failureState:A(t.failure)});e.textContent="",delete e._$litPart$;let o=null,s=!1,p=null,S=R("settings-pane",r,e,{onNodeCreated:(i,d,m)=>{if(!s&&i instanceof HTMLElement&&J(m)==="section-host")p=i}}).then((i)=>{if(s){i.dispose();return}o=i});return{attached:()=>{if(s)return!1;let i=o?.root;return i===void 0?!0:i instanceof HTMLElement&&e.contains(i)},body:()=>p,dispose(){s=!0,o?.dispose(),o=null,p=null},async focusActive(){let i=o?.root,d=i instanceof HTMLElement?[...i.querySelectorAll('[part="nav-item"]')].find((y)=>y.dataset.section===r.active):void 0;if(!d)return;let m=d.closest("jx-tabs");if(m&&d.getAttribute("aria-selected")!=="true")await new Promise((y)=>{m.addEventListener("jx-ready",()=>{y()},{once:!0})});if(!s)d.focus()},ready:S,update(i){r.region=i.region,r.heading=i.heading,r.backLabel=i.backLabel,r.groups=i.groups,r.moved=i.moved,r.activeTabId=i.activeTabId,r.empty=i.empty,r.intro=i.intro,r.hasSection=i.hasSection,r.failure=i.failure,r.failureState=A(i.failure),r.active=i.active}}}var K=bh("settings").title,Y="No settings sections.",G=[{place:"Styles › Variables",view:"variables",what:"Colors and fonts",workspace:"styles"},{place:"Publish › Hosting",publishTab:"hosting",what:"Hosting and domain",workspace:"publish"},{inspector:"page",place:"Page tab",what:"Head and SEO defaults",workspace:"design"}];function W(e){return`settings-nav-${e}`}function Q(e){return G.find((t)=>t.workspace===e)??null}function P(e,t){let a=I(),r=Lw();return{active:a,backLabel:e.backLabel(),activeTabId:W(a),empty:Y,failure:t,groups:r.map((o)=>({id:o.id,label:o.label,note:o.note,sections:o.sections.map((s)=>({key:s.key,label:s.label,tabId:W(s.key)})),tabsLabel:o.note===""?o.label:`${o.label}, ${o.note.toLowerCase()}`,titleId:`settings-group-${o.id}`})),hasSection:w(a)!==void 0,heading:K,intro:w(a)?.intro||(r.find((o)=>o.sections.some((s)=>s.key===a))?.intro??""),moved:G.map((o)=>{let{title:s}=bh(o.workspace),p=o.place??s;return{linkLabel:`${o.what}: ${p}. Go to ${s}`,place:p,what:o.what,workspace:o.workspace}}),region:e.region}}function O(e,t){let a=!1,r=null,o=null,s=null,p="",S=0,i=H(e,P(t,p),{back:()=>{t.back()},openMoved:(l)=>{let c=Q(l);if(c!==null)t.openMoved(c.workspace,c.inspector,c.view,c.publishTab)},selectSection:(l)=>{SS(l)}});function d(l,c,u){if(a||u!==S)return;p=`Could not show ${w(l)?.label??l}: ${c}`,i.update(P(t,p))}function m(l){if(a)return;let c=I(),u=i.body();if(u!==r)r=u,s=null;if(!u||!l&&s===c){i.update(P(t,p));return}let M=s!==c;s=c,p="",i.update(P(t,p));let j=w(c);if(!j){o=null,u.replaceChildren();return}if(M||!o||o.parentElement!==u)o=document.createElement("div"),u.replaceChildren(o);S+=1;let N=S;try{let x=j.render(o);if(x instanceof Promise)x.catch((z)=>{d(c,X(z),N)})}catch(x){d(c,X(x),N)}}let y=_S(()=>{m(!0)}),F=i.ready.then(()=>{m(!0)});return{attached:()=>i.attached(),dispose(){if(a)return;a=!0,y(),i.dispose()},focusActive:()=>i.focusActive(),ready:F}}var Z="settings";function yT(e){return Ln(e,Z)}var v=new Map,D=new Set;function _(){let e=vO();return e===null||e==="settings"?Up:e}async function ee(){await nt("view.setWorkspace",{workspace:_()},"Settings")}async function te(e,t,a,r){if(a!==void 0){await nt("styles.open",{view:a},"Settings");return}if(r!==void 0){await nt("publish.open",{tab:r},"Settings");return}if(await nt("view.setWorkspace",{workspace:e},"Settings"),t===void 0)return;if(await nt("view.setRightPanel",{open:!0},"Settings"),ae()?.isEnabled("view.setRightTab")===!0)await nt("view.setRightTab",{tab:t},"Settings")}function wT(e,t){let a=v.get(e);return a!==void 0&&a.tabId===t.id&&a.wrap.isConnected&&a.pane.attached()}function xT(e){let t=v.get(e);if(!t)return;v.delete(e),t.pane.dispose()}async function V(e,t){if(await t.pane.ready,v.get(e)===t)await t.pane.focusActive()}async function kN(e){let t=v.get(e);if(t?.wrap.isConnected===!0&&t.pane.attached()){await V(e,t);return}D.add(e)}var ne={back:()=>{ee()},backLabel:()=>`Back to ${bh(_()).title}`,openMoved:(e,t,a,r)=>{te(e,t,a,r)}};function EN(e,t){let{paneId:a,wrap:r}=e;if(wT(a,t))return;xT(a);let s={pane:O(r,{...ne,region:yT(a)}),tabId:t.id,wrap:r};if(v.set(a,s),D.delete(a))V(a,s)}
|
|
2
|
-
export{
|
|
1
|
+
import{ae}from"./studio-q509sqt8.js";import{X}from"./studio-9c6cbq2c.js";import{Up,gh}from"./studio-s49y6m5b.js";import{LA}from"./studio-1d8m5s38.js";import{nt}from"./studio-cv6gnjqd.js";import{$n,E,I}from"./studio-1a7zshnv.js";import{b}from"./studio-9f5vcb4w.js";import{n}from"./studio-erjccagy.js";var C=[{id:"general",intro:"",label:"General",note:""},{id:"integrations",intro:"Turn on what your site needs. Each one adds its own options where you use it.",label:"Integrations",note:""},{id:"advanced",intro:"Changes here affect every page. Most sites never need them.",label:"Advanced",note:"For developers"}],DD="integrations";function OD(e){return C.some((t)=>t.id===e)}var U="overview",m=new Map,T=new Set;function k(){for(let e of T)e()}function Od(){k()}function $0(e){return T.add(e),()=>{T.delete(e)}}function Gl(e){m.set(e.key,e),k()}function AD(e){if(m.delete(e))k()}function q(){return[...m.values()].toSorted((e,t)=>e.order-t.order)}function Ow(){let e=q();return C.flatMap((t)=>{let a=e.filter((r)=>(r.group??"integrations")===t.id);return a.length===0?[]:[{id:t.id,intro:t.intro,label:t.label,note:t.note,sections:a}]})}function $T(){return Ow().flatMap((e)=>e.sections.map((t)=>t.key))}function w(e){return m.get(e)}var h=null,f=U;function M(){if(h!==null&&m.has(h))return f=h,h=null,f;if(m.has(f))return f;return $T()[0]??f}function L0(e){if(m.has(e))f=e,h=null;else h=e;k()}var A={$schema:"https://jxsuite.com/schema/v1",$id:"StudioSettingsPane",$description:"Project Settings' home (§17.1, §22.9): the Settings workspace's surface, filling a pane's stage. A head names the workspace and carries the Back control, which says where it goes; under it, the settings editor's two columns, the grouped section list and the section body. It draws no section: `panels/settings-pane.ts` keeps the registry, decides which section is current, and renders whichever one that is into the one empty `[part=\"section-host\"]` island this document leaves for it (studio-ui-guidelines.md §9.4), because a section renderer may be a lit template or a mounted document and neither can share a container with this one. The list is three vertical `tablist`s, one per group (General, Integrations, Advanced), each named by its group heading: a tablist may own only tabs, so a heading between two runs of rows has to END one list rather than sit inside it. Each group is one tab stop and the arrow keys move within it. Under the groups, a Moved footnote names what left Project Settings for a workspace, each with a button that goes there.",tagName:"div",attributes:{part:"settings","data-jx-region":"${state.region}",role:"region","aria-labelledby":"settings-pane-heading"},style:{$description:"Fills the pane's stage by its own geometry, as the Publish and Media homes do: the stage is `position: relative`, so the home takes the whole of it, and each column scrolls itself. No part below is named `body`, `field`, `label`, `error`, `text` or `actions`: sections mount kit controls and documents of their own inside this one, the kit is light DOM, and a rule keyed on one of their part names here would reach into them.",position:"absolute",inset:"0",display:"flex",flexDirection:"column",boxSizing:"border-box",minHeight:"0",background:"var(--bg)",color:"var(--fg)",fontFamily:"var(--jx-font-sans)",textAlign:"initial",'& [part="head"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-3)",padding:"var(--jx-space-3) var(--jx-space-5)",borderBottom:"1px solid var(--border)"},'& [part="heading"]':{flex:"1",margin:"0",fontSize:"var(--jx-text-lg)",fontWeight:"600"},'& [part="columns"]':{display:"flex",flex:"1",minHeight:"0"},'& [part="nav"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-4)",width:"220px",minWidth:"220px",flexShrink:"0",padding:"var(--jx-space-3) var(--jx-space-3) var(--jx-space-3) var(--jx-space-2)",borderRight:"1px solid var(--border)",overflowY:"auto",fontSize:"13px"},'& [part="group"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-1)"},'& [part="group-title"]':{display:"flex",alignItems:"baseline",gap:"var(--jx-space-2)",margin:"0",padding:"0 var(--jx-space-3)",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)",fontWeight:"600",letterSpacing:"0.04em",textTransform:"uppercase"},'& [part="group-note"]':{$description:`The Advanced group's "For developers": a qualifier on the heading, not a second heading, so it reads at the heading's size without its weight.`,fontWeight:"400",letterSpacing:"0",textTransform:"none"},'& [part="group-note"]:empty':{display:"none"},'& [part="group-tabs"]':{$description:"The rule a vertical strip draws on its trailing edge is the column's own here: the nav draws one border for all three groups, so each strip drawing its own would stack three short rules beside it.",borderInlineEnd:"0"},'& [part="nav-item"]':{$description:"Full-bleed rows, which a tab is not by default: `jx-tab` centres its label and caps itself at 220px because a horizontal strip is a row of chips. In the nav column the row IS the target, so the label goes to the leading edge and the cap comes off.",maxWidth:"none",justifyContent:"flex-start",padding:"var(--jx-space-2) var(--jx-space-3)"},'& [part="moved"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-1)",marginTop:"auto",padding:"var(--jx-space-3)",borderTop:"1px solid var(--border)",color:"var(--fg-dim)",fontSize:"var(--jx-text-md)"},'& [part="moved-title"]':{margin:"0",fontWeight:"600",color:"var(--fg)"},'& [part="moved-row"]':{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"var(--jx-space-1)"},'& [part="content"]':{flex:"1",minWidth:"0",overflowY:"auto",padding:"var(--jx-space-4) var(--jx-space-5) var(--jx-space-6)"},'& [part="group-intro"]':{margin:"0 0 var(--jx-space-3)",color:"var(--fg-dim)",fontSize:"13px",maxWidth:"1200px"},'& [part="group-intro"]:empty':{display:"none"},'& [part="section-host"]':{$description:"Wide enough for a map-layout section's list and editor side by side, and no wider: on a large monitor a form stretched to the stage's full width is a line too long to read.",display:"block",minWidth:"0",maxWidth:"1200px"},'& [part="empty"]':{$description:"What the body says when the active section is registered by nobody: every section unregistering at once, which is a project closing while Settings is on screen. A blank column beside a list reads as a broken surface, so it says which it is.",display:"flex",alignItems:"center",justifyContent:"center",minHeight:"120px",margin:"0",color:"var(--fg-dim)",fontSize:"13px"},'& [part="failure"]':{$description:"A section whose renderer threw or rejected. It is said where the section would have been, in the reader's line of sight, because a section that silently draws nothing is indistinguishable from one with nothing to say.",margin:"0",padding:"var(--jx-space-3)",border:"1px solid var(--danger)",borderRadius:"var(--radius)",color:"var(--fg)",fontSize:"13px"}},children:[{tagName:"div",attributes:{part:"head"},children:[{tagName:"jx-action-button",attributes:{part:"back"},$props:{size:"sm",quiet:!0,icon:"arrow-left"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/back"},value:[]}]},children:[{tagName:"span",textContent:"${state.backLabel}"}],$description:"Back to the workspace Settings was opened from, named, as the pane context bar's Back is in a workspace with no tab strip (§22.1): the top bar draws no tab for Settings, so nothing else on screen says where the author came from."},{tagName:"h2",attributes:{part:"heading",id:"settings-pane-heading"},textContent:"${state.heading}"}]},{tagName:"div",attributes:{part:"columns",role:"none"},children:[{tagName:"div",attributes:{part:"nav",role:"none"},children:[{$prototype:"Array",items:{$ref:"#/state/groups"},key:{$ref:"$map/item/id"},map:{tagName:"div",attributes:{part:"group",role:"none","data-group":"${$map.item.id}"},children:[{tagName:"h3",attributes:{part:"group-title",id:"${$map.item.titleId}"},children:[{tagName:"span",textContent:"${$map.item.label}"},{tagName:"span",attributes:{part:"group-note"},textContent:"${$map.item.note}"}]},{tagName:"jx-tabs",attributes:{part:"group-tabs",selected:"${state.active}",orientation:"vertical"},$props:{label:{$ref:"$map/item/tabsLabel"}},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/selectSection"},value:[{$ref:"event#/detail"}]}]},children:[{$prototype:"Array",items:{$ref:"$map/item/sections"},key:{$ref:"$map/item/key"},map:{tagName:"jx-tab",attributes:{part:"nav-item",id:"${$map.item.tabId}","data-section":"${$map.item.key}",value:"${$map.item.key}",label:"${$map.item.label}",panel:"settings-pane-panel"}}}]}]}},{tagName:"div",attributes:{part:"moved",role:"group","aria-labelledby":"settings-pane-moved"},children:[{tagName:"p",attributes:{part:"moved-title",id:"settings-pane-moved"},textContent:"Moved"},{$prototype:"Array",items:{$ref:"#/state/moved"},key:{$ref:"$map/item/workspace"},map:{tagName:"div",attributes:{part:"moved-row","data-moved":"${$map.item.workspace}"},children:[{tagName:"span",textContent:"${$map.item.what} →"},{tagName:"jx-button",attributes:{part:"moved-link"},$props:{size:"sm",quiet:!0,label:{$ref:"$map/item/linkLabel"}},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openMoved"},value:[{$ref:"$map/item/workspace"}]}]},children:[{tagName:"span",textContent:"${$map.item.place}"}]}]}}]}]},{tagName:"jx-tab-panel",attributes:{part:"content",id:"settings-pane-panel"},$props:{active:!0,labelledby:{$ref:"#/state/activeTabId"}},children:[{$description:`The current group's intro ("Changes here affect every page. Most sites never need them."), above whichever of its sections is showing. General has none, and an empty sentence draws nothing.`,tagName:"p",attributes:{part:"group-intro"},textContent:"${state.intro}"},{$description:"The island, and it stays empty: a settings section renders itself, into a host this document never writes into and never reads back (studio-ui-guidelines.md §9.4).",tagName:"div",attributes:{part:"section-host"}},{tagName:"div",attributes:{part:"empty-slot",role:"none"},$switch:{$ref:"#/state/hasSection"},cases:{false:{tagName:"p",attributes:{part:"empty"},textContent:"${state.empty}"}}},{tagName:"div",attributes:{part:"failure-slot",role:"none"},$switch:{$ref:"#/state/failureState"},cases:{failed:{tagName:"p",attributes:{part:"failure",role:"alert"},textContent:"${state.failure}"}}}]}]}]};E("settings-pane",A);function J(e){let t=n(e)?void 0:e.attributes?.part;return n(t)?t:""}function H(e){return e===""?"ok":"failed"}function W(e,t,a){let r=b({...t,...a,failureState:H(t.failure)});e.textContent="",delete e._$litPart$;let o=null,s=!1,p=null,S=I("settings-pane",r,e,{onNodeCreated:(i,d,g)=>{if(!s&&i instanceof HTMLElement&&J(g)==="section-host")p=i}}).then((i)=>{if(s){i.dispose();return}o=i});return{attached:()=>{if(s)return!1;let i=o?.root;return i===void 0?!0:i instanceof HTMLElement&&e.contains(i)},body:()=>p,dispose(){s=!0,o?.dispose(),o=null,p=null},async focusActive(){let i=o?.root,d=i instanceof HTMLElement?[...i.querySelectorAll('[part="nav-item"]')].find((y)=>y.dataset.section===r.active):void 0;if(!d)return;let g=d.closest("jx-tabs");if(g&&d.getAttribute("aria-selected")!=="true")await new Promise((y)=>{g.addEventListener("jx-ready",()=>{y()},{once:!0})});if(!s)d.focus()},ready:S,update(i){r.region=i.region,r.heading=i.heading,r.backLabel=i.backLabel,r.groups=i.groups,r.moved=i.moved,r.activeTabId=i.activeTabId,r.empty=i.empty,r.intro=i.intro,r.hasSection=i.hasSection,r.failure=i.failure,r.failureState=H(i.failure),r.active=i.active}}}var K=gh("settings").title,Y="No settings sections.",O=[{place:"Styles › Variables",view:"variables",what:"Colors and fonts",workspace:"styles"},{place:"Publish › Hosting",publishTab:"hosting",what:"Hosting and domain",workspace:"publish"},{inspector:"page",place:"Page tab",what:"Head and SEO defaults",workspace:"design"}];function G(e){return`settings-nav-${e}`}function Q(e){return O.find((t)=>t.workspace===e)??null}function P(e,t){let a=M(),r=Ow();return{active:a,backLabel:e.backLabel(),activeTabId:G(a),empty:Y,failure:t,groups:r.map((o)=>({id:o.id,label:o.label,note:o.note,sections:o.sections.map((s)=>({key:s.key,label:s.label,tabId:G(s.key)})),tabsLabel:o.note===""?o.label:`${o.label}, ${o.note.toLowerCase()}`,titleId:`settings-group-${o.id}`})),hasSection:w(a)!==void 0,heading:K,intro:w(a)?.intro||(r.find((o)=>o.sections.some((s)=>s.key===a))?.intro??""),moved:O.map((o)=>{let{title:s}=gh(o.workspace),p=o.place??s;return{linkLabel:`${o.what}: ${p}. Go to ${s}`,place:p,what:o.what,workspace:o.workspace}}),region:e.region}}function D(e,t){let a=!1,r=null,o=null,s=null,p="",S=0,i=W(e,P(t,p),{back:()=>{t.back()},openMoved:(l)=>{let c=Q(l);if(c!==null)t.openMoved(c.workspace,c.inspector,c.view,c.publishTab)},selectSection:(l)=>{L0(l)}});function d(l,c,u){if(a||u!==S)return;p=`Could not show ${w(l)?.label??l}: ${c}`,i.update(P(t,p))}function g(l){if(a)return;let c=M(),u=i.body();if(u!==r)r=u,s=null;if(!u||!l&&s===c){i.update(P(t,p));return}let j=s!==c;s=c,p="",i.update(P(t,p));let N=w(c);if(!N){o=null,u.replaceChildren();return}if(j||!o||o.parentElement!==u)o=document.createElement("div"),u.replaceChildren(o);S+=1;let L=S;try{let x=N.render(o);if(x instanceof Promise)x.catch((z)=>{d(c,X(z),L)})}catch(x){d(c,X(x),L)}}let y=$0(()=>{g(!0)}),F=i.ready.then(()=>{g(!0)});return{attached:()=>i.attached(),dispose(){if(a)return;a=!0,y(),i.dispose()},focusActive:()=>i.focusActive(),ready:F}}var Z="settings";function LT(e){return $n(e,Z)}var v=new Map,R=new Set;function _(){let e=LA();return e===null||e==="settings"?Up:e}async function ee(){await nt("view.setWorkspace",{workspace:_()},"Settings")}async function te(e,t,a,r){if(a!==void 0){await nt("styles.open",{view:a},"Settings");return}if(r!==void 0){await nt("publish.open",{tab:r},"Settings");return}if(await nt("view.setWorkspace",{workspace:e},"Settings"),t===void 0)return;if(await nt("view.setRightPanel",{open:!0},"Settings"),ae()?.isEnabled("view.setRightTab")===!0)await nt("view.setRightTab",{tab:t},"Settings")}function RT(e,t){let a=v.get(e);return a!==void 0&&a.tabId===t.id&&a.wrap.isConnected&&a.pane.attached()}function IT(e){let t=v.get(e);if(!t)return;v.delete(e),t.pane.dispose()}async function V(e,t){if(await t.pane.ready,v.get(e)===t)await t.pane.focusActive()}async function PD(e){let t=v.get(e);if(t?.wrap.isConnected===!0&&t.pane.attached()){await V(e,t);return}R.add(e)}var ne={back:()=>{ee()},backLabel:()=>`Back to ${gh(_()).title}`,openMoved:(e,t,a,r)=>{te(e,t,a,r)}};function MD(e,t){let{paneId:a,wrap:r}=e;if(RT(a,t))return;IT(a);let s={pane:D(r,{...ne,region:LT(a)}),tabId:t.id,wrap:r};if(v.set(a,s),R.delete(a))V(a,s)}
|
|
2
|
+
export{DD,OD,Od,$0,Gl,AD,Ow,$T,L0,LT,RT,IT,PD,MD};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
5
|
-
//# sourceMappingURL=studio-
|
|
4
|
+
//# debugId=A9BE80CDCF1124F664756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-dst8y8vh.js.map
|