@jxsuite/studio 10.2.0 → 10.4.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-bx702wqa.js → 2020-906vx2dq.js} +3 -3
- package/dist/chunks/adapter-hnvad61x.js +4 -0
- package/dist/chunks/add-new-flow-v0pm96mr.js +4 -0
- package/dist/chunks/cf-account-picker-xb8vvt2h.js +4 -0
- package/dist/chunks/cf-settings-mkbcz4z2.js +4 -0
- package/dist/chunks/components-w5zqwva1.js +4 -0
- package/dist/chunks/content-source-g38w0d3f.js +4 -0
- package/dist/chunks/convert-to-repeater-r8sfxjjm.js +4 -0
- package/dist/chunks/editor-wvf5e6j9.js +4 -0
- package/dist/chunks/entry-commands-t13dyw3c.js +4 -0
- package/dist/chunks/extension-sections-vjzw46xb.js +4 -0
- package/dist/chunks/file-ops-1sghzgcr.js +4 -0
- package/dist/chunks/files-zrqtgt41.js +4 -0
- package/dist/chunks/format-host-9gy76erh.js +4 -0
- package/dist/chunks/fs-events-45rhg3me.js +4 -0
- package/dist/chunks/grid-open-t4fq6bbm.js +4 -0
- package/dist/chunks/{grid-view-tghcwrrt.js → grid-view-2f03wcgw.js} +16 -16
- package/dist/chunks/icons-gb967qc8.js +4 -0
- package/dist/chunks/iframe-host-9aq8ze3q.js +4 -0
- package/dist/chunks/image-bake-4afr4y6a.js +4 -0
- package/dist/chunks/image-editor-x7t8jbjn.js +4 -0
- package/dist/chunks/index-f9qr7kzh.js +4 -0
- package/dist/chunks/{index-vr006kbt.js → index-yjrfeks8.js} +3 -3
- package/dist/chunks/{javascript-z1g3s9fd.js → javascript-hy2mws8v.js} +3 -3
- package/dist/chunks/{jsonMode-7szwg8c4.js → jsonMode-vj30te2h.js} +6 -6
- package/dist/chunks/jx-validate-r4ax11e3.js +4 -0
- package/dist/chunks/layers-m49nmwvx.js +4 -0
- package/dist/chunks/layers-panel-zr92pwdp.js +4 -0
- package/dist/chunks/lit-html-k2mb9k0r.js +4 -0
- package/dist/chunks/media-library-j74rt0w4.js +4 -0
- package/dist/chunks/media-open-mypr0k6b.js +4 -0
- package/dist/chunks/media-picker-pemtbsjv.js +4 -0
- package/dist/chunks/{monaco-binding-v42w9c1v.js → monaco-binding-a51py33c.js} +3 -3
- package/dist/chunks/monaco-buffer-pa0g6ax7.js +4 -0
- package/dist/chunks/{monaco-setup-7bffxd6v.js → monaco-setup-0hw9f835.js} +3 -3
- package/dist/chunks/notify-bwehrp7q.js +4 -0
- package/dist/chunks/parse-hee7ne9b.js +4 -0
- package/dist/chunks/platform-kv0k65cy.js +4 -0
- package/dist/chunks/publish-panel-vg1n880b.js +4 -0
- package/dist/chunks/publish-quick-4fwngwrw.js +4 -0
- package/dist/chunks/publish-workspace-jv4w2bx2.js +4 -0
- package/dist/chunks/quick-search-nh29rt8a.js +4 -0
- package/dist/chunks/references-vqyr5s9x.js +4 -0
- package/dist/chunks/right-panel-3ws9f2w0.js +4 -0
- package/dist/chunks/source-control-h3hcs5gy.js +4 -0
- package/dist/chunks/{studio-j3d2fjqz.js → studio-0939t1q1.js} +4 -4
- package/dist/chunks/studio-0gvvqj3h.js +5 -0
- package/dist/chunks/studio-0khd8xtx.js +4 -0
- package/dist/chunks/{studio-9b7177jq.js → studio-0x6f3nk9.js} +4 -4
- package/dist/chunks/studio-1410q5dw.js +5 -0
- package/dist/chunks/studio-1ctnw3xv.js +5 -0
- package/dist/chunks/studio-1ks5d9y4.js +5 -0
- package/dist/chunks/{studio-awxwjawq.js → studio-1y9mab9m.js} +4 -4
- package/dist/chunks/studio-2e4hry72.js +6 -0
- package/dist/chunks/studio-2kpxm0eh.js +7 -0
- package/dist/chunks/studio-2pk7kc7z.js +5 -0
- package/dist/chunks/studio-2x972v58.js +5 -0
- package/dist/chunks/studio-2zz4qbv9.js +5 -0
- package/dist/chunks/{studio-bvs9kpst.js → studio-3na1r48j.js} +8 -8
- package/dist/chunks/studio-3pz4t5a2.js +5 -0
- package/dist/chunks/studio-3qr08sxq.js +4 -0
- package/dist/chunks/{studio-75kcdbsk.js → studio-45mj4jqe.js} +4 -4
- package/dist/chunks/studio-4bgvvzhv.js +5 -0
- package/dist/chunks/studio-4f7thq0p.js +5 -0
- package/dist/chunks/studio-4fnb5648.js +5 -0
- package/dist/chunks/studio-4zd6an2b.js +5 -0
- package/dist/chunks/{studio-9rbe2xpw.js → studio-5tet77de.js} +3 -3
- package/dist/chunks/studio-61rg2cz5.js +5 -0
- package/dist/chunks/{studio-ybnwymxw.js → studio-7rrdbvex.js} +4 -4
- package/dist/chunks/{studio-sxdb9h3q.js → studio-90zkgne5.js} +7 -7
- package/dist/chunks/studio-9c6cbq2c.js +4 -0
- package/dist/chunks/studio-9dq7rwc7.js +5 -0
- package/dist/chunks/studio-9gr7xs9r.js +6 -0
- package/dist/chunks/studio-a88ej93p.js +7 -0
- package/dist/chunks/{studio-er5f383a.js → studio-abh9kfdh.js} +4 -4
- package/dist/chunks/studio-acer0g8w.js +5 -0
- package/dist/chunks/{studio-qh8berdz.js → studio-amaz545p.js} +4 -4
- package/dist/chunks/studio-az3wvyh2.js +5 -0
- package/dist/chunks/studio-bg8pzprg.js +5 -0
- package/dist/chunks/{studio-399a25za.js → studio-bnc50f9h.js} +4 -4
- package/dist/chunks/studio-brh8d2pr.js +5 -0
- package/dist/chunks/{studio-646nn2ys.js → studio-c2fa783p.js} +5 -5
- package/dist/chunks/studio-cfnn70h1.js +5 -0
- package/dist/chunks/{studio-rzqaz21g.js → studio-cqxj4fcy.js} +4 -4
- package/dist/chunks/studio-cw11h078.js +5 -0
- package/dist/chunks/studio-daksw8kh.js +5 -0
- package/dist/chunks/studio-dn56z7sn.js +5 -0
- package/dist/chunks/studio-egnjpyde.js +9 -0
- package/dist/chunks/studio-ejrypvmq.js +5 -0
- package/dist/chunks/studio-eqcddvc2.js +928 -0
- package/dist/chunks/studio-evq47j2z.js +5 -0
- package/dist/chunks/{studio-r7pf0rkv.js → studio-frc16j8v.js} +7 -7
- package/dist/chunks/studio-g0hxtcga.js +5 -0
- package/dist/chunks/{studio-th7z3fg7.js → studio-g9brbewz.js} +4 -4
- package/dist/chunks/studio-gnazwtv3.js +5 -0
- package/dist/chunks/studio-hfqpfmpk.js +5 -0
- package/dist/chunks/studio-hh394phe.js +5 -0
- package/dist/chunks/{studio-pjtntksy.js → studio-j0zf5x2x.js} +4 -4
- package/dist/chunks/studio-j5fcp6gj.js +5 -0
- package/dist/chunks/studio-jd1qb1st.js +7 -0
- package/dist/chunks/studio-jma2q8r9.js +5 -0
- package/dist/chunks/studio-k0xzrse2.js +64 -0
- package/dist/chunks/studio-k1xqrgm5.js +5 -0
- package/dist/chunks/studio-k2evngrj.js +7 -0
- package/dist/chunks/studio-k3we3kqb.js +5 -0
- package/dist/chunks/studio-knsjyx7n.js +5 -0
- package/dist/chunks/studio-mrjtnm62.js +5 -0
- package/dist/chunks/{studio-sevbc3xv.js → studio-n9qba0gx.js} +4 -4
- package/dist/chunks/{studio-ea74s8c1.js → studio-nvcn2ykc.js} +4 -4
- package/dist/chunks/studio-nwf0c32p.js +5 -0
- package/dist/chunks/studio-nzemfbkk.js +14 -0
- package/dist/chunks/{studio-43y04qck.js → studio-pj216fmn.js} +4 -4
- package/dist/chunks/{studio-4g8yb6jn.js → studio-pm17wdc4.js} +4 -4
- package/dist/chunks/studio-pwctzka3.js +16 -0
- package/dist/chunks/{studio-71m92v9s.js → studio-q80fg1d6.js} +7 -7
- package/dist/chunks/studio-q9hx2qp0.js +5 -0
- package/dist/chunks/studio-qrzmfaf6.js +5 -0
- package/dist/chunks/{studio-86r8hp7r.js → studio-r6mx7vm5.js} +5 -5
- package/dist/chunks/studio-rr00ex23.js +7 -0
- package/dist/chunks/{studio-4jhw38b2.js → studio-s24mhq0z.js} +4 -4
- package/dist/chunks/studio-sce30r7b.js +4 -0
- package/dist/chunks/studio-swedpd82.js +5 -0
- package/dist/chunks/studio-tmfcn347.js +6 -0
- package/dist/chunks/studio-tpxcryf2.js +5 -0
- package/dist/chunks/{studio-wc6za3zs.js → studio-v5wktj6f.js} +4 -4
- package/dist/chunks/studio-v7a7yb5w.js +9 -0
- package/dist/chunks/{studio-kg1abnz0.js → studio-vpevkfxw.js} +4 -4
- package/dist/chunks/{studio-881z1xrx.js → studio-wmjmsw0p.js} +4 -4
- package/dist/chunks/studio-wqfaqw4m.js +5 -0
- package/dist/chunks/{studio-hhp4x8xf.js → studio-xpx91fby.js} +5 -5
- package/dist/chunks/studio-xva3hzkv.js +5 -0
- package/dist/chunks/{studio-6hzdjfv0.js → studio-xx3r3sb0.js} +4 -4
- package/dist/chunks/{studio-cg1bfyhf.js → studio-z3fztxrp.js} +8 -8
- package/dist/chunks/studio-z9453ypn.js +6 -0
- package/dist/chunks/{tsMode-f54j66ym.js → tsMode-jg1dtphj.js} +7 -7
- package/dist/chunks/workspace-6ztqcrsh.js +4 -0
- package/dist/chunks/workspace-home-rse9h8a0.js +4 -0
- package/dist/chunks/{ws-client-e8kj684q.js → ws-client-arz2qsy9.js} +3 -3
- package/dist/iframe-entry.js +13 -13
- package/dist/manifest.json +83 -78
- package/dist/studio.js +84 -84
- package/package.json +11 -11
- package/src/browse/library-pane.ts +44 -29
- package/src/browse/library-preview.ts +6 -2
- package/src/canvas/asset-refs.ts +13 -4
- package/src/canvas/asset-resolve.ts +54 -11
- package/src/canvas/canvas-render.ts +25 -0
- package/src/canvas/iframe-entry.ts +5 -1
- package/src/canvas/iframe-host.ts +16 -6
- package/src/canvas/iframe-protocol.ts +9 -1
- package/src/commands/context.ts +5 -0
- package/src/commands/live-context.ts +5 -2
- package/src/editor/shortcuts.ts +3 -0
- package/src/files/asset-versions.ts +108 -2
- package/src/files/file-ops.ts +11 -1
- package/src/files/files.ts +111 -48
- package/src/files/media-paths.ts +12 -4
- package/src/files/media-upload.ts +195 -21
- package/src/files/new-file-name.ts +39 -1
- package/src/media/image-bake.ts +164 -0
- package/src/media/image-editor.ts +846 -0
- package/src/media/image-format.ts +262 -0
- package/src/media/image-recipe.ts +651 -0
- package/src/media/media-commands.ts +65 -1
- package/src/media/media-library-model.ts +1 -1
- package/src/media/media-library.ts +175 -15
- package/src/media/media-open.ts +156 -3
- package/src/media/media-pane.ts +8 -4
- package/src/panels/pane-context.ts +6 -1
- package/src/panels/tab-strip.ts +12 -3
- package/src/studio.ts +13 -2
- package/src/surfaces/image-editor.json +1390 -0
- package/src/surfaces/image-editor.ts +272 -0
- package/src/surfaces/inspector-dock.json +3 -3
- package/src/surfaces/media-library.json +129 -1
- package/src/surfaces/media-library.ts +17 -2
- package/src/types.ts +2 -1
- package/src/workspace/tab-workspace.ts +2 -1
- package/src/workspace/workspace-switch.ts +3 -1
- package/src/workspace/workspace.ts +22 -1
- package/dist/chunks/adapter-pp011m5x.js +0 -4
- package/dist/chunks/add-new-flow-ecqmzz76.js +0 -4
- package/dist/chunks/cf-account-picker-c07znkqt.js +0 -4
- package/dist/chunks/cf-settings-0v2bmqy0.js +0 -4
- package/dist/chunks/components-yn0dn2pq.js +0 -4
- package/dist/chunks/content-source-g0j41yy6.js +0 -4
- package/dist/chunks/convert-to-repeater-sbjk7tgn.js +0 -4
- package/dist/chunks/editor-xz02jeh1.js +0 -4
- package/dist/chunks/entry-commands-kmt02crp.js +0 -4
- package/dist/chunks/extension-sections-0rprf12d.js +0 -4
- package/dist/chunks/file-ops-mexj5qed.js +0 -4
- package/dist/chunks/files-b2tcppdd.js +0 -4
- package/dist/chunks/format-host-btsevv0c.js +0 -4
- package/dist/chunks/fs-events-r0apejva.js +0 -4
- package/dist/chunks/grid-open-n2a8xkht.js +0 -4
- package/dist/chunks/icons-853n6qt3.js +0 -4
- package/dist/chunks/iframe-host-gx0ypyh3.js +0 -4
- package/dist/chunks/index-bs4k9tr6.js +0 -4
- package/dist/chunks/jx-validate-ymf10teh.js +0 -4
- package/dist/chunks/layers-p9nfya38.js +0 -4
- package/dist/chunks/layers-panel-tt1hzhhf.js +0 -4
- package/dist/chunks/lit-html-x18n2sfz.js +0 -4
- package/dist/chunks/media-library-0n45gv8r.js +0 -4
- package/dist/chunks/media-picker-s09at95z.js +0 -4
- package/dist/chunks/monaco-buffer-een2ea0v.js +0 -4
- package/dist/chunks/notify-qwb8radt.js +0 -4
- package/dist/chunks/parse-v77xtwv7.js +0 -4
- package/dist/chunks/platform-8jnez0wr.js +0 -4
- package/dist/chunks/publish-panel-aysnj611.js +0 -4
- package/dist/chunks/publish-quick-kpbqs9mz.js +0 -4
- package/dist/chunks/publish-workspace-nd0a8q99.js +0 -4
- package/dist/chunks/quick-search-vg0jkhk2.js +0 -4
- package/dist/chunks/references-a7v6a0e2.js +0 -4
- package/dist/chunks/right-panel-cvk1vxx5.js +0 -4
- package/dist/chunks/source-control-fsqzc6he.js +0 -4
- package/dist/chunks/studio-05jfwbmf.js +0 -5
- package/dist/chunks/studio-0q5jwddh.js +0 -9
- package/dist/chunks/studio-0w2dr0q8.js +0 -5
- package/dist/chunks/studio-1tzpds97.js +0 -9
- package/dist/chunks/studio-216b27sv.js +0 -4
- package/dist/chunks/studio-2ejhqns4.js +0 -5
- package/dist/chunks/studio-2r90cts3.js +0 -16
- package/dist/chunks/studio-399xknkb.js +0 -6
- package/dist/chunks/studio-4ncmwqw5.js +0 -5
- package/dist/chunks/studio-5atwjgkj.js +0 -7
- package/dist/chunks/studio-5frqk7c0.js +0 -5
- package/dist/chunks/studio-6cwj6xrx.js +0 -5
- package/dist/chunks/studio-78pywnp2.js +0 -6
- package/dist/chunks/studio-886t6ztg.js +0 -5
- package/dist/chunks/studio-8wnvtr4z.js +0 -5
- package/dist/chunks/studio-8z66jk4z.js +0 -5
- package/dist/chunks/studio-b2qpt0xy.js +0 -14
- package/dist/chunks/studio-c71806xz.js +0 -7
- package/dist/chunks/studio-cbwks69x.js +0 -928
- package/dist/chunks/studio-cg710sk9.js +0 -5
- package/dist/chunks/studio-cw0wb9qk.js +0 -7
- package/dist/chunks/studio-cyheys7k.js +0 -5
- package/dist/chunks/studio-ea5m9kg5.js +0 -5
- package/dist/chunks/studio-efdxjwyp.js +0 -64
- package/dist/chunks/studio-egmw2837.js +0 -5
- package/dist/chunks/studio-f746039f.js +0 -5
- package/dist/chunks/studio-fmdymd9v.js +0 -5
- package/dist/chunks/studio-gcm12z00.js +0 -6
- package/dist/chunks/studio-gj98m8gy.js +0 -7
- package/dist/chunks/studio-hasbgjah.js +0 -5
- package/dist/chunks/studio-hz5n7x27.js +0 -5
- package/dist/chunks/studio-jeraxdgv.js +0 -7
- package/dist/chunks/studio-jvgek9xt.js +0 -5
- package/dist/chunks/studio-jws1a87n.js +0 -5
- package/dist/chunks/studio-k2sz13zg.js +0 -5
- package/dist/chunks/studio-k3m4jkdk.js +0 -5
- package/dist/chunks/studio-kg5ya5r2.js +0 -5
- package/dist/chunks/studio-khwbgrtg.js +0 -5
- package/dist/chunks/studio-mx6wzh25.js +0 -5
- package/dist/chunks/studio-mxs3ar9t.js +0 -5
- package/dist/chunks/studio-nm4szey4.js +0 -5
- package/dist/chunks/studio-nqxqf8p2.js +0 -4
- package/dist/chunks/studio-qn7z4krm.js +0 -5
- package/dist/chunks/studio-qyed0ah6.js +0 -5
- package/dist/chunks/studio-r4bcdwhq.js +0 -5
- package/dist/chunks/studio-rtfnhrdg.js +0 -5
- package/dist/chunks/studio-s5tzw84t.js +0 -5
- package/dist/chunks/studio-t51y8v1d.js +0 -5
- package/dist/chunks/studio-t98vq4r6.js +0 -5
- package/dist/chunks/studio-tsxpqvh0.js +0 -6
- package/dist/chunks/studio-v1yascv2.js +0 -5
- package/dist/chunks/studio-wxq6v5sv.js +0 -5
- package/dist/chunks/studio-y60sts62.js +0 -4
- package/dist/chunks/studio-zndrqawb.js +0 -5
- package/dist/chunks/studio-zwaxn5s2.js +0 -5
- package/dist/chunks/workspace-home-x1787wpv.js +0 -4
- package/dist/chunks/workspace-zpe1np43.js +0 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{Ne}from"./studio-
|
|
2
|
-
export{
|
|
1
|
+
import{Ne}from"./studio-n9qba0gx.js";import{bt,ka,Uo,Hr}from"./studio-xva3hzkv.js";import{Wt,Qc,ti,qn,Se,pi,Fe,m,qr,pn,o1,ng,Sh,td}from"./studio-knsjyx7n.js";import{to,Ts,hl,u}from"./studio-pwctzka3.js";import{Vt}from"./studio-4f7thq0p.js";import{oe}from"./studio-v5wktj6f.js";import{te}from"./studio-3qr08sxq.js";var sS=["code","layout","component","diff","breakpoint","locale"],T={breakpoint:"design",code:"source",component:"design"},x={design:"Design",source:"Code"},k="Could not read this file's comparison against HEAD.";var ju={breakpoint:"Same page at",code:"Code",component:"Component definition",diff:"Diff vs HEAD",layout:"Layout",locale:"Same page in"};function R(e){let t=pn(e)?.derived;if(!t)return null;let o=bt(t.sourcePaneId);if(!o)return{diffPath:null,kind:t.kind,media:null,mode:null,path:null,probePath:null,reason:"The pane this one follows has no document open.",select:null,status:"unavailable"};if(t.kind==="lens")return w(e,t,o);return S(e,t,o)}function w(e,t,o){let n={diffPath:null,kind:"lens",media:t.media,mode:t.mode,path:null,probePath:null,select:null};if(t.preset==="diff"){let i=o.documentPath;if(!h(i))return{...n,reason:"Nothing to compare — this file matches HEAD.",status:"unavailable"};if(t.diff?.filePath===i&&(t.diffRev===void 0||t.diffRev===u.git.rev))return{...n,reason:"",status:"ready"};if(c.get(e)?.failed&&c.get(e)?.path===i)return{...n,reason:k,status:"unavailable"};return{...n,diffPath:i,reason:"",status:"loading"}}if(t.preset==="code"&&ka(o)==="source")return{...n,reason:"The pane this one follows is showing Code — one document has one editor.",status:"unavailable"};if(t.preset==="breakpoint"&&!aS(o).includes(t.media))return{...n,reason:`This document does not declare a "${t.media??"base"}" breakpoint.`,status:"unavailable"};return{...n,reason:"",status:"ready"}}function h(e){return u.git.status?.files.find((t)=>t.path===e&&(t.status==="M"||t.status==="A"||t.status==="U"))??null}function S(e,t,o){let n={diffPath:null,kind:"companion",media:null,mode:null};if(t.preset==="layout"){let a=u.layoutSelection,r=a?.layoutFile??hl(o.doc.document.$layout);return r===null?{...n,path:null,probePath:null,reason:"This page has no layout.",select:null,status:"unavailable"}:{...n,path:r,probePath:null,reason:"",select:a?a.layoutPath:null,status:"ready"}}if(t.preset==="locale"){let a=Ts(),r=o.documentPath===null||t.locale===null?null:Qc(o.documentPath,t.locale,a);if(r===null)return{...n,path:null,probePath:null,reason:"This document has no path in that locale.",select:null,status:"unavailable"};let l=d.get(e);if(l?.path!==r||l.exists===null)return{...n,path:null,probePath:r,reason:"",select:null,status:"loading"};if(!l.exists)return{...n,path:null,probePath:null,reason:`No ${Wt(t.locale)} copy of this document yet — `+"the Languages panel can create one.",select:null,status:"unavailable"};return{...n,path:r,probePath:null,reason:"",select:null,status:"ready"}}let i=_(o);if(i===null)return t.resolved===null?{...n,path:null,probePath:null,reason:"Select an element inside a component to see its definition.",select:null,status:"unavailable"}:{...n,path:null,probePath:null,reason:"",select:null,status:"ready"};return{...n,path:i,probePath:null,reason:"",select:null,status:"ready"}}function aS(e){let{sizeBreakpoints:t}=Hr(to(e.doc.document.$media));return[null,...t.map((o)=>o.name)]}function _(e){let[t]=e?.session.selection??[];if(!e||!t)return null;let o=e.doc.document,n=[...t];while(n){let i=oe(o,n),a=i?Ne.find((r)=>r.tagName===i.tagName):null;if(a?.path)return a.path;n=Vt(n)}return null}function F(e,t){if(t.sourcePaneId===e||!pn(t.sourcePaneId))throw RangeError(`pane "${e}" cannot derive from "${t.sourcePaneId}" — a derivation names `+"another pane that is in the grid");b(e,t)}function b(e,t){let o=pn(e);if(o)c.delete(e),d.delete(e),o.derived=t}function GE(e){b(e,null)}function f(e,t){let o=pn(e),n=o?.derived,i=R(e);if(!o||!n||!i)return;if(Uo.derivedResolves+=1,n.status=i.status,n.reason=i.reason,n.kind==="lens"){let r=pn(n.sourcePaneId);if(o.tabOrder.length>0||o.activeTabId!==null){let l=[...o.tabOrder];for(let s of l)if(ng(s),r)Sh(r,s);o.activeTabId=null}if(n.preset==="diff"&&i.status!=="ready")n.diff=null;A(e,i,t);return}if(C(e,i,t),n.resolved!==null&&bt(e)===null)n.resolved=null;if(i.path===null||i.path===n.resolved){v(e,i);return}n.resolved=i.path,Uo.derivedRetargets+=1;let a=t.openFileInPane(e,i.path);if(i.select===null)return;Promise.resolve(a).then(()=>{v(e,i)})}function v(e,t){let o=t.select,n=bt(e);if(!o||!n||t.path!==null&&n.documentPath!==t.path)return;let[i]=n.session.selection;if(i?.length===o.length&&i.every((a,r)=>a===o[r]))return;n.session.selection=[[...o]]}var c=new Map;function A(e,t,o){let n=t.diffPath,i=h(n),{rev:a}=u.git,r=c.get(e);if(n===null||!i||r?.path===n&&r.rev===a)return;c.set(e,{failed:!1,path:n,rev:a}),o.loadDiff(n,i.status).then((l)=>{let s=pn(e)?.derived;if(s?.kind!=="lens"||s.preset!=="diff"||c.get(e)?.path!==n)return;if(l)s.diff=l,s.diffRev=a;else c.set(e,{failed:!0,path:n,rev:a});f(e,o)}).catch((l)=>{console.error("loadDiff error:",l)})}var d=new Map;function C(e,t,o){let n=t.probePath;if(n===null||d.get(e)?.path===n)return;d.set(e,{exists:null,path:n}),o.fileExists(n).then((i)=>{let a=pn(e)?.derived;if(a?.kind!=="companion"||a.preset!=="locale"||d.get(e)?.path!==n)return;d.set(e,{exists:i,path:n}),f(e,o)}).catch((i)=>{console.error("fileExists error:",i)})}var p=new Map;function M(e,t){if(p.has(e))return;p.set(e,requestAnimationFrame(()=>{p.delete(e);try{f(e,t)}catch(o){console.error("applyDerivation error:",o)}}))}function XD(e,t){te(()=>{let o=pn(e),n=o?.derived;if(!n)return;o.activeTabId;let i=bt(n.sourcePaneId);if(n.kind==="lens"&&n.preset==="code")i?.session.ui.canvasMode;if(n.kind==="companion"&&n.preset==="component")i?.session.selection;if(n.kind==="companion"&&n.preset==="layout")u.layoutSelection,i?.doc.document?.$layout;M(e,t)})}function bw(e,t,o,n=null){let i=bt(t);if(!i)return"an open document";let a=T[e];if(a&&!i.capabilities.modes.includes(a))return`a document with a ${x[a]} view — this one declares none`;if(e==="code")return ka(i)==="source"?"a source pane that is not already showing Code":null;if(e==="diff")return h(i.documentPath)===null?"a file with changes against HEAD":null;if(e==="breakpoint")return aS(i).includes(o)?null:"a breakpoint this document declares — see Project Settings › Contexts";if(e==="layout")return hl(i.doc.document.$layout)===null?"a page with a layout — this one declares none":null;if(e==="locale"){let r=Ts();if(r===null||r.locales.length<2)return"a project that declares more than one locale — see Project Settings › Locales";if(i.documentPath===null)return"a document that has been saved";return n!==null&&r.locales.includes(n)?null:"a locale this project declares"}return null}function yb(e){let t=pn(e);return t&&t.activeTabId!==null&&t.derived===null?null:D}var D="an open document in a pane that is not itself derived";function O(e,t,o,n=null){if(e==="locale")return{kind:"companion",locale:n,preset:e,reason:"",resolved:null,sourcePaneId:t,status:"loading"};if(e==="layout"||e==="component")return{kind:"companion",preset:e,reason:"",resolved:null,sourcePaneId:t,status:"loading"};return{diff:null,kind:"lens",media:e==="breakpoint"?o:null,mode:e==="code"?"source":e==="diff"?"git-diff":"design",preset:e,reason:"",sourcePaneId:t,status:"loading",zoom:1}}function P(){return m.panes.find((e)=>KE(e.id)===null)??null}function KE(e){let t=pn(e);return t?.derived?.kind==="companion"&&t.activeTabId?null:y}var y="a derived pane showing a document of its own — Code, Diff and breakpoint views project "+"the document already open beside them";function QD(e){return[{args:Se({locale:Fe('BCP 47 tag for preset "locale". Ignored by every other preset.'),media:Fe('Breakpoint name for preset "breakpoint" — omit or leave empty for the base size. '+"Ignored by every other preset."),preset:pi(sS,"Which projection of this pane's document to show beside it.")},["preset"]),id:"pane.derive",title:"Show Beside This…",category:"View",level:"document",menus:["context/pane"],group:"5_pane",when:(t)=>t.document.open,enablement:()=>yb(qr().id)===null,requires:D,undo:"none",run:(t,o)=>{let n=qn("pane.derive",o,"preset",sS),i=ti("pane.derive",o,"media")??null,a=ti("pane.derive",o,"locale")??null,r=qr(),l=bw(n,r.id,i,a);if(l)throw RangeError(`command "pane.derive" argument "preset": "${n}" requires ${l}`);let s=o1(r.id);F(s.id,O(n,r.id,i,a));let E=[...s.tabOrder];for(let g of E)ng(g),Sh(r,g);f(s.id,e)}},{id:"pane.pin",title:"Keep This Document",category:"View",level:"document",menus:["context/pane","palette"],group:"5_pane",enablement:()=>P()!==null,requires:y,undo:"none",run:()=>{let t=P();if(!t?.activeTabId)return;td(t.activeTabId),GE(t.id)}}]}
|
|
2
|
+
export{sS,ju,aS,GE,XD,bw,yb,KE,QD};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
5
|
-
//# sourceMappingURL=studio-
|
|
4
|
+
//# debugId=02DD2968B046325064756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-pj216fmn.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{n,v}from"./studio-
|
|
2
|
-
export{
|
|
1
|
+
import{n,v}from"./studio-k3we3kqb.js";var t="jx.collab.v1";function LS(o){if(!v(o))return{offer:[],refused:null};let{collab:s,detail:l,protocols:e}=o;if(s===!1){let r=n(l)?l.trim():"";return{offer:[],refused:r||"This server has collaboration disabled."}}if(!Array.isArray(e)||e.length===0)return{offer:[],refused:null};if(e.includes(t))return{offer:[t],refused:null};let i=e.filter((r)=>n(r)).join(", ")||"none";return{offer:[],refused:`This server speaks collab envelope ${i}; this editor speaks ${t}.`}}
|
|
2
|
+
export{LS};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
5
|
-
//# sourceMappingURL=studio-
|
|
4
|
+
//# debugId=FF41315D1E39384164756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-pm17wdc4.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{X}from"./studio-9c6cbq2c.js";import{p}from"./studio-4fnb5648.js";import{BM,w}from"./studio-sce30r7b.js";import{jn,Fx,ln,go,JC,Up,Hx,aI,an,yv,Km,Hi,qn,Se,pi,To,Z,fi,Xm,m,Sr,rc,Ft}from"./studio-knsjyx7n.js";import{af}from"./studio-q9hx2qp0.js";import{rt,Eo,xr}from"./studio-g9brbewz.js";import{C,id,_n}from"./studio-4f7thq0p.js";import{me,te,Gr,Kr,g,le}from"./studio-3qr08sxq.js";import{n,Y,Ze,Gv,Q,_,v}from"./studio-k3we3kqb.js";import{ce}from"./studio-0939t1q1.js";function F(e){return e.replaceAll("~","~0").replaceAll("/","~1")}var Ve=100;function H(e){let t={blankAfter:new Set,escaped:new Map,inline:new Map},o=0,r=()=>{let l=0;while(o<e.length&&(e[o]===" "||e[o]==="\t"||e[o]==="\r"||e[o]===`
|
|
2
|
+
`)){if(e[o]===`
|
|
3
|
+
`)l+=1;o+=1}return l},s=()=>{let l=o,f=new Set;o+=1;while(o<e.length&&e[o]!=='"')if(e[o]==="\\")if(e[o+1]==="u"){let b=Number.parseInt(e.slice(o+2,o+6),16);if(b>=128)f.add(b);o+=6}else o+=2;else o+=1;return o+=1,{escaped:f,raw:e.slice(l,o)}},i=(l,f)=>{let b=r();if(e[o]===f)return o+=1,!0;if(o+=1,b+=r(),b>=2)t.blankAfter.add(l);return!1},a=(l)=>{r();let f=e[o];if(f==="{"){o+=1;let b=r()>0;if(e[o]==="}"){o+=1;return}t.inline.set(l,!b);while(o<e.length){let c=JSON.parse(s().raw);r(),o+=1;let d=`${l}/${F(c)}`;if(a(d),i(d,"}"))return}}else if(f==="["){if(o+=1,r(),e[o]==="]"){o+=1;return}for(let b=0;o<e.length;b+=1){let c=`${l}/${b}`;if(a(c),i(c,"]"))return}}else if(f==='"'){let{escaped:b}=s();if(b.size>0)t.escaped.set(l,b)}else while(o<e.length&&!`,]} \r
|
|
4
|
+
`.includes(e[o]))o+=1};return a(""),t}function Es(e){return{document:JSON.parse(e),layout:H(e)}}var He=/[^\u0020-\u007E]/,Ge=/^[\p{Mn}\p{Me}\p{Cf}]$/u,Ke=/^\p{Emoji_Presentation}$/u;function qe(e){return e>=4352&&(e<=4447||e===9001||e===9002||e>=11904&&e<=12871&&e!==12351||e>=12880&&e<=19903||e>=19968&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510||e>=110592&&e<=110593||e>=127488&&e<=127569||e>=131072&&e<=262141)}function be(e){if(!He.test(e))return e.length;let t=0;for(let o of e){if(Ge.test(o))continue;t+=qe(o.codePointAt(0))||Ke.test(o)?2:1}return t}function he(e){return e===void 0||Q(e)||Gv(e)}function U(e){return Object.entries(e).filter(([,t])=>!he(t))}function M(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function Ye(e){if(e.length<2)return!1;let t=Array.isArray(e[0])?"array":M(e[0])?"object":null;if(t===null)return!1;return e.every((o)=>t==="array"?Array.isArray(o)&&o.length>1:M(o)&&U(o).length>1)}function Xe(e){return e.length>1&&e.every((t)=>Y(t))}function V(e,t){let o=he(e)?"null":JSON.stringify(e);return t===void 0?o:o.replaceAll(/[\u0080-\uFFFF]/g,(r)=>{let s=r.codePointAt(0);return t.has(s)?`\\u${s.toString(16).padStart(4,"0")}`:r})}function Co(e,t,o=Ve){let r=t?.inline??new Map,s=t?.blankAfter??new Set,i=t?.escaped??new Map,a=(c,d)=>r.get(c)??d,l=(c,d,h)=>{if(Array.isArray(c)){if(c.length===0)return"[]";if(Ye(c))return null;let S=[];for(let[x,P]of c.entries()){let T=`${d}/${x}`,y=s.has(T)?null:l(P,T,h);if(y===null)return null;S.push(y)}return`[${S.join(", ")}]`}if(M(c)){let S=U(c);if(S.length===0)return"{}";if(!a(d,h))return null;let x=[];for(let[P,T]of S){let y=`${d}/${F(P)}`,E=s.has(y)?null:l(T,y,!0);if(E===null)return null;x.push(`${JSON.stringify(P)}: ${E}`)}return`{ ${x.join(", ")} }`}return V(c,i.get(d))},f=(c)=>c.map(({path:d,text:h},S)=>S===c.length-1?h:`${h},
|
|
5
|
+
${s.has(d)?`
|
|
6
|
+
`:""}`).join(""),b=(c,d,h,S,x,P)=>{if(!Array.isArray(c)&&!M(c))return V(c,i.get(d));let T=l(c,d,x);if(T!==null&&S+be(T)+P<=o)return T;let y=" ".repeat(h+2),E=`
|
|
7
|
+
${" ".repeat(h)}`;if(Array.isArray(c)){if(Xe(c))return`[
|
|
8
|
+
${Qe(c,y,o,(A)=>s.has(`${d}/${A}`))}${E}]`;let L=c.map((R,A)=>{let O=`${d}/${A}`,J=A===c.length-1,z=b(R,O,h+2,y.length,x,J?0:1);return{path:O,text:`${y}${z}`}});return`[
|
|
9
|
+
${f(L)}${E}]`}let ge=U(c),Be=a(d,x),ze=ge.map(([L,R],A)=>{let O=`${d}/${F(L)}`,J=`${JSON.stringify(L)}: `,z=A===ge.length-1,Fe=y.length+be(J),Ue=b(R,O,h+2,Fe,Be,z?0:1);return{path:O,text:`${y}${J}${Ue}`}});return`{
|
|
10
|
+
${f(ze)}${E}}`};return`${b(e,"",0,0,!1,0)}
|
|
11
|
+
`}function Qe(e,t,o,r){let s=[],i="";for(let[a,l]of e.entries()){let f=`${V(l)}${a===e.length-1?"":","}`;if(i==="")i=`${t}${f}`;else if(i.length+1+f.length<=o)i=`${i} ${f}`;else s.push(i),i=`${t}${f}`;if(r(a)&&a<e.length-1)s.push(i,""),i=""}return s.push(i),s.join(`
|
|
12
|
+
`)}function Hm(e){return Co(e,ve())}var k=null,j=null,N=null,I=null;function ve(){return xe()?.doc.layout??I}var G=null;function xe(){let e=m.tabs.get(an);return e?le(e):null}function et(){if(j)Km(j),j=null;k=null,N=null,I=null,G=null}function Pe(){return G??=(async()=>{try{let e=await p().readFile(an),{document:t,layout:o}=Es(e);I=o,N=Co(t,ve())}catch{N=null}})(),G}async function A$(e){if(await Pe(),e.doc.layout===null&&I!==null)e.doc.layout=I}function tt(e){let t=_n();if(t.projectConfig===e)return;id({...t,projectConfig:e}),rc(m.projectRoot,e)}function ot(){let e=C?.projectConfig;return e?le(e):null}function K(e){return le(e)}function Te(e,t){for(let o of Object.keys(e))delete e[o];Object.assign(e,t)}function ye(e){return k=e,e.scope.run(()=>{te(()=>{let t=e.doc.document;if(k!==e||!C)return;tt(K(t))})}),e}function FC(){let e=_n(),t=xe();if(k&&(k!==(t??j)||le(k.doc.document)!==e.projectConfig))et();if(k)return k;if(t)return ye(t);return j=yv({document:e.projectConfig??{},documentPath:an,id:an}),ye(j)}function we(e){return JSON.stringify(e.extensions??null)}async function nt(){let{loadFormats:e,refreshExtensionUi:t,refreshFormats:o}=await (ce("9gy76erh"),import("./format-host-9gy76erh.js"));o(),e(),t(p())}async function ic(e){let t=ot(),o=FC();await A$(o);let r=K(o.doc.document),s=Hm(r),i=t&&t!==r&&Hm(t)!==s?t:null;if(i&&o.doc.dirty){let h=Error(`${an} has unsaved changes in its editor tab`);return w.error(`Could not save ${an} — the file is open with unsaved changes. Save or `+"revert that tab, then make the settings change again.",{key:`save:${an}`,path:an,source:"Settings"}),{error:h,ok:!1}}let a=i??r,l=e?{...a,...e}:a,f=Hm(l);if(!i&&!o.doc.dirty&&f===N)return{ok:!0};let b=we(r);Z(o,(h)=>{let S=h.doc.document;if(i)Te(S,i);for(let[x,P]of Object.entries(e??{}))S[x]=P});let c=K(o.doc.document),d=Hm(c);try{await p().writeFile(an,d)}catch(h){return w.error(`Could not save ${an} — ${X(h)}`,{key:`save:${an}`,path:an,source:"Settings"}),{error:h,ok:!1}}if(N=d,o.doc.dirty=!1,we(c)!==b)await nt();return{ok:!0}}async function uO(e,t){if(!C){rc(m.projectRoot,e);return}let o=FC();Z(o,(r)=>Te(r.doc.document,e),{skipHistory:!0}),o.doc.dirty=!1,await Pe(),I=H(t),o.doc.layout=I,N=Hm(e)}function to(e){let t=C?.projectConfig?.$media;if(!t)return e||{};if(!e)return{...t};return{...t,...e}}function wr(e){let t=C?.projectConfig?.style;if(!t)return e||{};if(!e)return{...t};let o={...t};for(let[r,s]of Object.entries(e)){let i=o[r];o[r]=_(s)&&_(i)?{...i,...s}:s}return o}function hO(e,t=[]){return{...O$(t),...C?.projectConfig?.imports,...e}}function O$(e){let t=e.flatMap((o)=>(o.classes??[]).filter((r)=>r.path.endsWith(".class.json")).map((r)=>[r.name,r.path]));return Object.fromEntries(t.toReversed())}function xx(e){let t=C?.projectConfig?.$elements;if(!t?.length)return e||[];if(!e?.length)return[...t];let o=new Set,r=[];for(let s of[...t,...e]){let i=n(s)?s:_(s)?s.$ref:void 0;if(i&&!o.has(i))o.add(i),r.push(s)}return r}function _x(e){let t=C?.projectConfig?.$head;if(!t?.length)return e||[];if(!e?.length)return[...t];let o=new Set,r=[];for(let s of[...t,...e]){let i=_(s)?s.attributes:void 0,a=String(i?.href||i?.src||"")||JSON.stringify(s);if(!o.has(a))o.add(a),r.push(s)}return r}function Ts(){let e=C?.projectConfig;return e?ln(e).i18n:null}function Hp(e,t){let o=Ts();if(o===null)return null;let r=jn(e);if(r!==null&&o.locales.includes(r))return r;return go(t??"",o)??o.defaultLocale}var q=new Map;function pO(){q.clear()}function hl(e){if(e===!1)return null;let t=C?.projectConfig?.defaults?.layout;return e||t||null}async function Sx(e){let t=e.replace(/^\.\//,""),o=q.get(t);if(o!==void 0)return structuredClone(o);try{let s=await p().readFile(t),i=JSON.parse(s);return q.set(t,i),structuredClone(i)}catch{return null}}function M$(e,t){let o=t.children??[],r=Array.isArray(o)?o:[],s=new Map,i=[];for(let a of r){let l=n(a)?void 0:a.attributes?.slot;if(!n(a)&&n(l)&&l){if(!s.has(l))s.set(l,[]);s.get(l).push(a)}else i.push(a)}if(ke(e,s,i),t.state)e.state={...e.state,...t.state};if(t.$media)e.$media={...e.$media,...t.$media};if(t.style)e.style={...e.style,...t.style};if(t.attributes)e.attributes={...e.attributes,...t.attributes};return e}function ke(e,t,o){if(!Array.isArray(e.children))return;let r=[];for(let s of e.children)if(_(s)&&s.tagName==="slot"){let i=s.attributes?.name;if(n(i)&&i&&t.has(i))r.push(...t.get(i)),t.delete(i);else if(!i&&o.length>0)r.push(...o);else if(Array.isArray(s.children))r.push(...s.children)}else{if(_(s))ke(s,t,o);r.push(s)}e.children=r}async function no(e){let t=await ic(e);if(!t.ok)throw t.error}var Ie=new Set([fi,Xm]),it=new Set(["auto","light","dark"]);function st(e){return n(e)&&it.has(e)}function at(e){let{ui:t}=e.session;return{activeMedia:t.activeMedia,canvasMode:t.canvasMode,editZoom:t.editZoom,preview:t.preview,previewColorScheme:t.previewColorScheme,previewLocale:t.previewLocale,showLayout:t.showLayout,zoom:t.zoom}}function _e(){let e={},t=[];for(let o of m.panes){if(o.derived)continue;let r=[];for(let i of o.tabOrder){let a=m.tabs.get(i);if(!a?.documentPath)continue;r.push(a.documentPath),e[a.documentPath]=at(a)}if(r.length===0)continue;let s=o.activeTabId?m.tabs.get(o.activeTabId):null;t.push({activeFile:s?.documentPath??null,files:r,id:o.id})}return{focusedPane:m.activePaneId,panes:t,ui:e}}function lt(e){if(!v(e))return{};let t={};if(n(e.canvasMode))t.canvasMode=e.canvasMode;if(Ze(e.preview))t.preview=e.preview;if(Y(e.zoom)&&Number.isFinite(e.zoom))t.zoom=e.zoom;if(Y(e.editZoom)&&Number.isFinite(e.editZoom))t.editZoom=e.editZoom;if(e.activeMedia===null||n(e.activeMedia))t.activeMedia=e.activeMedia;if(st(e.previewColorScheme))t.previewColorScheme=e.previewColorScheme;if(e.previewLocale===null||n(e.previewLocale)&&Fx(e.previewLocale))t.previewLocale=e.previewLocale;if(Ze(e.showLayout))t.showLayout=e.showLayout;return t}function Ee(e){if(!v(e)||!Array.isArray(e.panes))return null;let t=[];for(let r of e.panes){if(!v(r)||!n(r.id)||!Ie.has(r.id))continue;let s=Array.isArray(r.files)?r.files.filter((i)=>n(i)&&i!==""):[];if(s.length===0)continue;t.push({activeFile:n(r.activeFile)&&s.includes(r.activeFile)?r.activeFile:null,files:s,id:r.id})}if(t.length===0)return null;let o={};if(_(e.ui))for(let[r,s]of Object.entries(e.ui))o[r]=lt(s);return{focusedPane:n(e.focusedPane)&&Ie.has(e.focusedPane)?e.focusedPane:fi,panes:t,ui:o}}async function fO(e,t){let o=0;if(e.panes.some((i)=>i.id===Xm))t.ensureSecondPane();for(let i of e.panes)for(let a of i.files){try{await t.openFile(a,i.id)}catch{}if([...m.tabs.values()].some((l)=>l.documentPath===a))o+=1}if(o===0)return 0;for(let i of m.tabs.values()){let a=i.documentPath?e.ui[i.documentPath]:void 0;if(!a)continue;let{ui:l}=i.session;if(a.canvasMode&&i.capabilities.modes.includes(a.canvasMode))l.canvasMode=a.canvasMode;if(a.preview!==void 0)l.preview=a.preview;if(a.zoom!==void 0)l.zoom=a.zoom;if(a.editZoom!==void 0)l.editZoom=a.editZoom;if(a.activeMedia!==void 0)l.activeMedia=a.activeMedia;if(a.previewColorScheme!==void 0)l.previewColorScheme=a.previewColorScheme;if(a.previewLocale!==void 0)l.previewLocale=a.previewLocale;if(a.showLayout!==void 0)l.showLayout=a.showLayout}let r=m.panes.some((i)=>i.id===e.focusedPane)?e.focusedPane:null,s=null;for(let i of e.panes){let a=m.panes.find((f)=>f.id===i.id);if(!a||!i.activeFile)continue;let l=a.tabOrder.find((f)=>m.tabs.get(f)?.documentPath===i.activeFile);if(!l)continue;if(a.id===r)s=l;else Ft(l,{focus:!1})}if(s)Ft(s);else if(r)Sr(r);return o}var Bm=["review","deploys","branches","hosting"],jC={branches:"Branches",deploys:"Deploys",hosting:"Hosting",review:"Review changes"},ct=["live","review"],Ce="review",Ae="live",ut=new Set(Bm),pt=new Set(ct);function mO(e){return typeof e==="string"&&ut.has(e)}function Cx(e){return typeof e==="string"&&pt.has(e)}var ft={default:{description:"Resume whatever was persisted — layout, recents, settings, chat history.",id:"default",reset:"none"},fresh:{description:"A first-run app: no layout, no recents, no settings, no history.",id:"fresh",reset:"app-state"}},je=new Map(Object.entries(ft)),dt="default",mt=/^jx[-._:]/;function gt(e){return mt.test(e)}function bt(){let e=typeof localStorage>"u"?void 0:localStorage;if(!e)return[];let t=[];try{for(let o=0;o<e.length;o++){let r=e.key(o);if(r&>(r))t.push(r)}for(let o of t)e.removeItem(o)}catch{}return t}function ht(e){let t=je.get(e);if(!t)throw RangeError(`unknown startup profile "${e}"; declared: ${[...je.keys()].join(", ")}`);if(t.reset==="app-state")bt();return t}var W=null;function Ne(e){if(W)return W;let t=new URLSearchParams(e??(typeof location>"u"?"":location.search)),o=ht(t.get("profile")??dt),r=t.get("clock");return W={clock:r===null?null:BM(r),profile:o},W}var B=["site","collections","styles","files","search","i18n","layers","data","packages","insert"],St=new Set(["collections","styles"]);function De(e){return e&&!St.has(e)?e:wt}var yt=new Map([["blocks","insert"],["head","site"],["page","site"],["imports","packages"],["git","site"],["state","data"]]),wt="site";function HC(e,t){let o=B.find((r)=>r===e);if(o===void 0)throw Error(`${t}: "${e}" is not a declared Navigator panel id.`);return o}function se(e){if(!n(e))return null;let t=yt.get(e);if(t)return t;return B.find((o)=>o===e)??null}var ne=["page","properties","style","events","assistant"],kx="page",vt=["properties","style","events"],BC="properties";function Ex(e){return typeof e==="string"&&vt.some((t)=>t===e)}function P$(e){return typeof e==="string"&&ne.some((t)=>t===e)}var Tx=["problems","logic","activity"],F$="problems";function j$(e){return typeof e==="string"&&Tx.some((t)=>t===e)}var Lx=["light","dark"],Gc={content:{id:"content",inspector:{open:!1,whileWriting:!0},navigator:{open:!0,panel:"collections"},rail:!1,tabStrip:!0},design:{id:"design",inspector:{open:!0},navigator:{initial:"site",open:!0},rail:!0,tabStrip:!0},media:{id:"media",inspector:{open:!1},navigator:{open:!1},rail:!1,tabStrip:!1},publish:{id:"publish",inspector:{open:!1},navigator:{open:!1},rail:!1,tabStrip:!1},settings:{id:"settings",inspector:{open:!1},navigator:{open:!1},rail:!1,tabStrip:!1},styles:{id:"styles",inspector:{open:!1,tab:"style",whileWriting:!0},navigator:{open:!0,panel:"styles"},rail:!1,tabStrip:!1}},Le="jx-studio-panel-widths",Re="jx-studio-project::",xt="dark";function H$(e){return typeof e==="string"&&Lx.some((t)=>t===e)}function Pt(){let e=Eo(rt.theme);return H$(e)?e:xt}var $x=["left","right","bottom"],D={bottom:{collapsed:!0,size:220},left:{collapsed:!1,size:240},right:{collapsed:!1,size:280}},gO={bottom:D.bottom.size,left:D.left.size,right:D.right.size},Tt={bottom:"--dock-h-bottom",left:"--panel-w-left",right:"--panel-w-right"},kt={bottom:"bottom-collapsed",left:"left-collapsed",right:"right-collapsed"},B$=0.5,zC=0.2,WC=0.8;function It(e){return Y(e)&&e>=zC&&e<=WC?e:B$}function bO(e){u.paneSplit=Math.min(WC,Math.max(zC,e))}function _t(){try{let e=JSON.parse(localStorage.getItem(Le)||"{}");return v(e)?e:{}}catch{return{}}}function Et(e){return{left:e("left"),right:e("right"),bottom:e("bottom")}}function $e(){return{branches:null,commitMessage:"",diffState:null,error:null,lastUpdated:null,loading:!1,logEntries:null,rev:0,status:null}}function Je(){return{build:{for:"",state:"idle",text:""},deploys:{error:"",project:"",rows:[],state:"idle"},destination:Ae,review:{number:0,url:""},tab:Ce}}var Ct="tokens";function Me(){return{customizedOnly:!1,filter:"",selection:null,variable:null,view:Ct}}function At(){let e=_t(),t=Et((o)=>{let r=e[o],s=e[`${o}Collapsed`];return{collapsed:Ze(s)?s:D[o].collapsed,size:Y(r)&&r>0?r:D[o].size}});return{bottomTab:j$(e.bottomTab)?e.bottomTab:F$,docks:t,focusRegion:"pane",paneSplit:It(e.paneSplit),git:$e(),publish:Je(),layoutSelection:null,leftTab:De(se(e.leftTab)),stylebook:Me(),theme:Pt(),workspace:Up}}Ne();var jt=["jx-studio-doc-header-expanded"];function Nt(){try{for(let e of jt)localStorage.removeItem(e)}catch{}}Nt();var u=g(At());function Bd(){try{localStorage.setItem(Le,JSON.stringify({bottom:u.docks.bottom.size,bottomCollapsed:u.docks.bottom.collapsed,bottomTab:u.bottomTab,left:u.docks.left.size,leftCollapsed:u.docks.left.collapsed,leftTab:u.leftTab,paneSplit:u.paneSplit,right:u.docks.right.size,rightCollapsed:u.docks.right.collapsed}))}catch{}}var re,ae={},ue=null;function vO(){return ue}function pe(e){if(!e)return{};try{let t=JSON.parse(localStorage.getItem(`${Re}${e}`)||"{}");return v(t)?t:{}}catch{return{}}}function z$(e){let t=pe(e).workspace;return aI(t)?t:Up}function yO(e){return Ee(pe(e).session)}var fe=null;function Ix(e){fe=e}function wO(){de()}function de(){let e=m.projectRoot;if(!e)return;try{localStorage.setItem(`${Re}${e}`,JSON.stringify({session:e===fe?_e():pe(e).session,workspace:u.workspace}))}catch{}}function Ot(e){if(e===re)return;if(re=e,ae={},ue=null,u.workspace=z$(e),e===null){u.leftTab=De(se(u.leftTab));return}Gr();try{We(u.workspace),Bd()}finally{Kr()}}function W$(e,t){let{inspector:o}=Gc[e];return o.open||o.whileWriting===!0&&t}function We(e,t){let o=Gc[e],r=se(o.navigator.panel??ae[e]??o.navigator.initial??u.leftTab);if(r)u.leftTab=r;if(u.docks.left.collapsed=!o.navigator.open,u.docks.right.collapsed=!W$(e,t?.writingOnCanvas?.()===!0),o.inspector.tab&&t)t.setInspectorTab(o.inspector.tab)}function VC(e,t){if(u.workspace===e)return!1;if(!Gc[u.workspace].navigator.panel)ae[u.workspace]=u.leftTab;return ue=u.workspace,u.workspace=e,We(e,t),Bd(),de(),!0}function zm(e=u.theme){return e==="light"?"vs":"vs-dark"}function Dt(){document.documentElement.dataset.theme=u.theme,af()?.editor.setTheme(zm())}var Lt="rail-hidden",Rt="tabs-hidden";function tv(e=u.workspace){return Gc[e].tabStrip}function $t(){let e=document.documentElement;for(let o of $x)e.style.setProperty(Tt[o],`${u.docks[o].size}px`);let t=document.querySelector("#app");if(!t)return;for(let o of $x)t.classList.toggle(kt[o],u.docks[o].collapsed);t.classList.toggle(Lt,!Gc[u.workspace].rail),t.classList.toggle(Rt,!Gc[u.workspace].tabStrip)}var ee=null,ie=[];function nv(e){if(!ie.includes(e))ie.push(e)}function xO(){if(ee)return;for(let e of ie)e.mount();ee=me(),ee.run(()=>{te(()=>{$t()}),te(()=>{Dt()}),te(()=>{Ot(m.projectRoot)}),te(()=>{let e=m.projectRoot;m.activePaneId;for(let t of m.panes)t.id,t.activeTabId,t.tabOrder.join("\x00");if(e)de()})})}function ko(e,t){if(u.docks[e].collapsed===t){Bd();return}u.docks[e].collapsed=t,Bd()}function Jt(e){ko(e,!u.docks[e].collapsed)}function _O(e,t){u.docks[e].size=t}function Kc(e){u.leftTab=e,ko("left",!1),Bd()}function uh(e){u.bottomTab=e,ko("bottom",!1),Bd()}function V$(e){if(u.theme===e)return;u.theme=e,xr(rt.theme,e)}function SO(e){if(e===u.leftTab&&!u.docks.left.collapsed){ko("left",!0);return}Kc(e)}function U$(e){u.layoutSelection=e}function Rx(){Object.assign(u.git,$e()),Object.assign(u.publish,Je()),Object.assign(u.stylebook,Me()),u.layoutSelection=null,fe=null,re=void 0}function Oe(e,t){if(t.showWorkspace){t.showWorkspace(e);return}VC(e,t)}var oe=(e)=>e.project.open;function Mt(e){return[{args:Se({tab:pi(B,"Which Navigator panel to show.")}),category:"View",id:"view.setActivity",level:"application",menus:["commandbar/overflow","palette"],group:"4_docks",requires:"an open project",when:oe,run:(t,o)=>{let r=qn("view.setActivity",o,"tab",B);if(e.panelAvailable&&!e.panelAvailable(r))throw RangeError(`command "view.setActivity" argument "tab": "${r}" names a panel that is registered but not available right now, so showing it would persist a Navigator tab nothing can draw`);Kc(r)},title:"Show Navigator Panel"},{args:Se({tab:pi(ne,"Which Inspector tab to show.")}),category:"View",id:"view.setRightTab",level:"document",menus:["palette"],group:"4_docks",requires:"an open document",when:(t)=>t.document.open,run:(t,o)=>{e.setInspectorTab(qn("view.setRightTab",o,"tab",ne))},title:"Show Inspector Tab"},{args:Se({open:To("True to show the Navigator dock, false to collapse it.")}),category:"View",id:"view.setNavigator",level:"application",menus:["palette"],group:"4_docks",run:(t,o)=>{ko("left",!Hi("view.setNavigator",o,"open"))},title:"Show Navigator Dock"},{args:Se({open:To("True to show the Inspector dock, false to collapse it.")}),category:"View",id:"view.setRightPanel",level:"application",menus:["palette"],group:"4_docks",run:(t,o)=>{ko("right",!Hi("view.setRightPanel",o,"open"))},title:"Show Inspector Dock"},{args:Se({open:To("True to show the Bottom dock, false to collapse it.")}),category:"View",id:"view.setBottomDock",level:"application",menus:["palette"],group:"4_docks",run:(t,o)=>{ko("bottom",!Hi("view.setBottomDock",o,"open"))},title:"Show Bottom Dock"},{category:"View",id:"view.toggleBottomDock",keybinding:"mod+j",level:"application",menus:["commandbar/overflow","palette"],group:"4_docks",run:()=>{Jt("bottom")},title:"Toggle Bottom Dock"},{args:Se({tab:pi(Tx,"Which Bottom dock tab to show.")}),category:"View",id:"view.setBottomTab",level:"application",menus:["palette"],group:"4_docks",run:(t,o)=>{let r=qn("view.setBottomTab",o,"tab",Tx);if(e.panelAvailable&&!e.panelAvailable(r))throw RangeError(`command "view.setBottomTab" argument "tab": "${r}" names a panel that is registered but not available right now, so showing it would persist a Bottom dock tab nothing can draw`);uh(r)},title:"Show Bottom Dock Tab"},{args:Se({open:To("True to show the Assistant tab, false to step off it.")}),category:"View",id:"view.setAssistant",level:"application",menus:["never"],group:"4_docks",run:(t,o)=>{if(Hi("view.setAssistant",o,"open")){ko("right",!1),e.setInspectorTab("assistant");return}if(e.inspectorTab()==="assistant")e.setInspectorTab(e.restingInspectorTab?.()??kx)},title:"Show Assistant"},{args:Se({workspace:pi(JC,"Which workspace to show.")}),category:"View",id:"view.setWorkspace",level:"application",menus:["never"],group:"4_workspaces",requires:"an open project",when:oe,run:(t,o)=>{Oe(qn("view.setWorkspace",o,"workspace",JC),e)},title:"Switch Workspace"},...Hx.map((t,o)=>({category:"View",id:`workspace.focus.${t.id}`,keybinding:`mod+${o+1}`,level:"application",menus:["palette"],group:"4_workspaces",requires:"an open project",when:oe,run:()=>{Oe(t.id,e)},title:`Go to ${t.title}`})),{args:Se({color:pi(Lx,"The Studio chrome's theme.")}),category:"View",id:"view.setTheme",level:"application",menus:["palette"],group:"6_appearance",run:(t,o)=>{V$(qn("view.setTheme",o,"color",Lx))},title:"Set Theme"}]}function CO(e,t){e.registerAll(Mt(t))}
|
|
13
|
+
export{Es,Co,Hm,A$,FC,ic,uO,to,wr,hO,O$,xx,_x,Ts,Hp,pO,hl,Sx,M$,no,fO,Bm,jC,mO,Cx,HC,kx,BC,Ex,P$,Tx,F$,j$,Lx,Gc,H$,$x,gO,B$,zC,WC,bO,u,Bd,vO,z$,yO,Ix,wO,W$,VC,zm,tv,nv,xO,ko,_O,Kc,uh,V$,SO,U$,Rx,CO};
|
|
14
|
+
|
|
15
|
+
//# debugId=7D77C33BB58CCAD564756E2164756E21
|
|
16
|
+
//# sourceMappingURL=studio-pwctzka3.js.map
|