@jxsuite/studio 5.5.0 → 5.6.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/LICENSE +1 -1
- package/dist/chunks/{2020-g8mwpbkq.js → 2020-zvax9fmb.js} +3 -3
- package/dist/chunks/adapter-6zhjbpmd.js +4 -0
- package/dist/chunks/cf-account-picker-zfycs4k2.js +4 -0
- package/dist/chunks/cf-settings-fpa485q3.js +4 -0
- package/dist/chunks/components-b0vh4sq8.js +4 -0
- package/dist/chunks/content-source-z5t0d0h9.js +4 -0
- package/dist/chunks/convert-to-repeater-x19jr6c7.js +4 -0
- package/dist/chunks/editor-7e23n4a8.js +4 -0
- package/dist/chunks/entry-commands-5cm6aba2.js +4 -0
- package/dist/chunks/extension-sections-y90sa0n4.js +4 -0
- package/dist/chunks/file-ops-hv7gf757.js +4 -0
- package/dist/chunks/files-kb0epdxf.js +4 -0
- package/dist/chunks/format-host-eg1wy2bp.js +4 -0
- package/dist/chunks/fs-events-ky3vxfmh.js +4 -0
- package/dist/chunks/git-panel-yyg3bzp2.js +4 -0
- package/dist/chunks/grid-view-5mqv1cbd.css +1 -0
- package/dist/chunks/grid-view-d9mybhn0.js +51 -0
- package/dist/chunks/iframe-host-9wdf0hes.js +4 -0
- package/dist/chunks/index-2tf0m2ne.js +4 -0
- package/dist/chunks/{index-arg188jq.js → index-vnwy9d44.js} +3 -3
- package/dist/chunks/{javascript-zcdmye2k.js → javascript-f0nrbdjb.js} +2 -2
- package/dist/chunks/{jsonMode-6x5e1nbf.js → jsonMode-nfa90dtf.js} +5 -5
- package/dist/chunks/jx-validate-7w11db9v.js +4 -0
- package/dist/chunks/layers-7zasrpse.js +4 -0
- package/dist/chunks/layers-panel-9nzc4fdq.js +4 -0
- package/dist/chunks/lit-html-5qr7nbng.js +4 -0
- package/dist/chunks/media-picker-maevn9d4.js +4 -0
- package/dist/chunks/menu-wq6q0v3y.js +4 -0
- package/dist/chunks/{monaco-binding-4az2kh5p.js → monaco-binding-antn79jf.js} +3 -3
- package/dist/chunks/monaco-buffer-9ry2rn5x.js +4 -0
- package/dist/chunks/{monaco-setup-d7mwkcx3.js → monaco-setup-k8s40vwg.js} +3 -3
- package/dist/chunks/notify-g91gjd6w.js +4 -0
- package/dist/chunks/platform-jdwjp2vt.js +4 -0
- package/dist/chunks/publish-panel-8yym447p.js +4 -0
- package/dist/chunks/quick-search-9bzm9kh3.js +4 -0
- package/dist/chunks/references-znssfqvq.js +4 -0
- package/dist/chunks/right-panel-czbzktm8.js +4 -0
- package/dist/chunks/section-registry-0rtq73qs.js +4 -0
- package/dist/chunks/studio-011em5cf.js +5 -0
- package/dist/chunks/studio-02y9cb4h.js +6 -0
- package/dist/chunks/{studio-7gqyhjns.js → studio-09n3fyy0.js} +4 -4
- package/dist/chunks/{studio-xcng8nx7.js → studio-0c3fpdqj.js} +5 -5
- package/dist/chunks/studio-0mm38y62.js +5 -0
- package/dist/chunks/studio-0nm2skex.js +4 -0
- package/dist/chunks/{studio-73czgk6a.js → studio-153mwkyq.js} +4 -4
- package/dist/chunks/{studio-f8jyp45j.js → studio-1pxvgx1t.js} +4 -4
- package/dist/chunks/studio-27tc8q0h.js +5 -0
- package/dist/chunks/studio-28pz4s1k.js +5 -0
- package/dist/chunks/{studio-x5esgzct.js → studio-36s6qjgq.js} +4 -4
- package/dist/chunks/studio-4yztve2t.js +5 -0
- package/dist/chunks/{studio-x9sagq2d.js → studio-5fc0728f.js} +7 -7
- package/dist/chunks/{studio-7jazdy6y.js → studio-654fxcr0.js} +4 -4
- package/dist/chunks/studio-6exg5z4x.js +4 -0
- package/dist/chunks/studio-6k1eswp9.js +5 -0
- package/dist/chunks/{studio-5wfrgee9.js → studio-6zyt56ek.js} +4 -4
- package/dist/chunks/studio-7djymzt2.js +5 -0
- package/dist/chunks/{studio-b4epb26c.js → studio-7w04zw8h.js} +7 -7
- package/dist/chunks/studio-805fwp9k.js +5 -0
- package/dist/chunks/{studio-k1eaqyzm.js → studio-81twpmzj.js} +4 -4
- package/dist/chunks/studio-891t1tv9.js +5 -0
- package/dist/chunks/{studio-5n1km79v.js → studio-9n2j9nqk.js} +4 -4
- package/dist/chunks/{studio-he2fhrgp.js → studio-9tkaykt5.js} +4 -4
- package/dist/chunks/studio-ant1zbp3.js +5 -0
- package/dist/chunks/studio-b29h7g7s.js +5 -0
- package/dist/chunks/studio-b5rxwkj2.js +5 -0
- package/dist/chunks/studio-d007j0z3.js +7 -0
- package/dist/chunks/studio-dknr8m7b.js +14 -0
- package/dist/chunks/{studio-eq27rrr0.js → studio-dmymvk2j.js} +3 -3
- package/dist/chunks/studio-dtmdjmqb.js +5 -0
- package/dist/chunks/studio-eb5sty2k.js +5 -0
- package/dist/chunks/{studio-hc9q4j24.js → studio-ebt49j3c.js} +5 -5
- package/dist/chunks/studio-eegyf5vg.js +5 -0
- package/dist/chunks/studio-frv7vjhw.js +5 -0
- package/dist/chunks/studio-ft8pfpp0.js +5 -0
- package/dist/chunks/{studio-mhhc9btt.js → studio-gj4j9e7k.js} +4 -4
- package/dist/chunks/{studio-hf4qdjc8.js → studio-gxna6yta.js} +4 -4
- package/dist/chunks/studio-je15p5v8.js +6 -0
- package/dist/chunks/{studio-21enxdr8.js → studio-jsr14n1s.js} +4 -4
- package/dist/chunks/studio-k9pwvmz8.js +5 -0
- package/dist/chunks/{studio-p1eggxcf.js → studio-ks0ecgjx.js} +3 -3
- package/dist/chunks/studio-mb8jhtr4.js +64 -0
- package/dist/chunks/studio-mf41717j.js +5 -0
- package/dist/chunks/{studio-625ezz59.js → studio-mm8x32gg.js} +4 -4
- package/dist/chunks/{studio-pkkw32j0.js → studio-n2e133d6.js} +4 -4
- package/dist/chunks/{studio-c4pnt1c6.js → studio-njmg0e73.js} +5 -5
- package/dist/chunks/studio-nvykrgbj.js +4 -0
- package/dist/chunks/studio-nw4q9sdn.js +5 -0
- package/dist/chunks/studio-p6avneaq.js +5 -0
- package/dist/chunks/studio-pvj970st.js +5 -0
- package/dist/chunks/studio-r7yeeqc4.js +5 -0
- package/dist/chunks/studio-s85vah66.js +6 -0
- package/dist/chunks/studio-sadckcpp.js +7 -0
- package/dist/chunks/studio-sgzss898.js +9 -0
- package/dist/chunks/{studio-7by9a93k.js → studio-t0v47dpc.js} +4 -4
- package/dist/chunks/{studio-jnb285we.js → studio-tj28pxa1.js} +4 -4
- package/dist/chunks/{studio-6j2jn55a.js → studio-tzs6njnb.js} +8 -8
- package/dist/chunks/studio-vz7b43ng.js +5 -0
- package/dist/chunks/studio-w8w9frjy.js +16 -0
- package/dist/chunks/{studio-xc8ebsts.js → studio-wr0pq67n.js} +4 -4
- package/dist/chunks/{studio-8r4y2x0z.js → studio-y164brht.js} +4 -4
- package/dist/chunks/studio-y17505ge.js +928 -0
- package/dist/chunks/studio-ymsjnvp9.js +5 -0
- package/dist/chunks/studio-z1vdxq0e.js +5 -0
- package/dist/chunks/studio-z47mm077.js +10 -0
- package/dist/chunks/studio-zkkdbbvd.js +9 -0
- package/dist/chunks/{studio-awqghqxv.js → studio-zkvyd3ev.js} +4 -4
- package/dist/chunks/{tsMode-rtwt7w1a.js → tsMode-eq26t9gs.js} +5 -5
- package/dist/chunks/workspace-emt8454d.js +4 -0
- package/dist/chunks/ws-client-3gxqp06s.js +4 -0
- package/dist/iframe-entry.js +14 -14
- package/dist/manifest.json +62 -59
- package/dist/studio.css +1 -1
- package/dist/studio.js +115 -117
- package/package.json +5 -5
- package/src/account/action-flow.ts +294 -0
- package/src/account/action-required.ts +68 -0
- package/src/account-status.ts +29 -1
- package/src/browse/library-model.ts +3 -1
- package/src/browse/library-preview.ts +6 -2
- package/src/canvas/asset-refs.ts +3 -1
- package/src/canvas/asset-resolve.ts +79 -1
- package/src/canvas/iframe-entry.ts +38 -1
- package/src/canvas/iframe-host.ts +85 -0
- package/src/canvas/iframe-protocol.ts +13 -0
- package/src/files/asset-versions.ts +294 -0
- package/src/files/files.ts +61 -9
- package/src/files/fs-events.ts +279 -28
- package/src/files/media-meta.ts +2 -1
- package/src/files/media-paths.ts +5 -2
- package/src/files/media-upload.ts +5 -1
- package/src/new-project/add-repo-modal.ts +12 -1
- package/src/new-project/new-project-modal.ts +12 -1
- package/src/panels/git-panel.ts +25 -2
- package/src/platform-errors.ts +61 -1
- package/src/platforms/cloud.ts +389 -50
- package/src/platforms/devserver.ts +17 -1
- package/src/publish/pages-service.ts +17 -7
- package/src/services/ai-models.ts +30 -6
- package/src/services/ai-system-prompt.ts +81 -51
- package/src/settings/preferences-accounts.ts +42 -3
- package/src/settings/preferences-dialog.ts +8 -1
- package/src/studio.ts +18 -1
- package/src/surfaces/dialog.ts +5 -0
- package/src/surfaces/welcome.json +86 -1
- package/src/surfaces/welcome.ts +61 -2
- package/src/types.ts +84 -2
- package/src/ui/ai-managed-connect.ts +41 -4
- package/src/ui/media-picker.ts +2 -1
- package/dist/chunks/adapter-bsbs78x9.js +0 -4
- package/dist/chunks/cf-account-picker-gnm7xeqb.js +0 -4
- package/dist/chunks/cf-settings-9y6jyscp.js +0 -4
- package/dist/chunks/components-s51h3b7c.js +0 -4
- package/dist/chunks/content-source-ty3be0qg.js +0 -4
- package/dist/chunks/convert-to-repeater-c3e7q61z.js +0 -4
- package/dist/chunks/editor-t002b41m.js +0 -4
- package/dist/chunks/entry-commands-sb72e9gy.js +0 -4
- package/dist/chunks/extension-sections-ktn2ntnj.js +0 -4
- package/dist/chunks/file-ops-78zeytkm.js +0 -4
- package/dist/chunks/files-gatzrz8v.js +0 -4
- package/dist/chunks/format-host-r59b1651.js +0 -4
- package/dist/chunks/fs-events-f8h91ndt.js +0 -4
- package/dist/chunks/git-panel-y12zf7nj.js +0 -4
- package/dist/chunks/grid-view-rfd8b2pg.js +0 -51
- package/dist/chunks/grid-view-tafenfm2.css +0 -1
- package/dist/chunks/iframe-host-vsrsj20g.js +0 -4
- package/dist/chunks/index-5aghyrfh.js +0 -4
- package/dist/chunks/jx-validate-653krkrf.js +0 -4
- package/dist/chunks/layers-32p8gtae.js +0 -4
- package/dist/chunks/layers-panel-rs58m105.js +0 -4
- package/dist/chunks/lit-html-54bmkwz3.js +0 -4
- package/dist/chunks/media-picker-5bb04wct.js +0 -4
- package/dist/chunks/menu-cbha7w2e.js +0 -4
- package/dist/chunks/monaco-buffer-9vbbyfr1.js +0 -4
- package/dist/chunks/notify-dc1nz5ar.js +0 -4
- package/dist/chunks/platform-2m49s1zf.js +0 -4
- package/dist/chunks/publish-panel-nx3ycmma.js +0 -4
- package/dist/chunks/quick-search-yzrzh9x3.js +0 -4
- package/dist/chunks/references-vx7mbj9f.js +0 -4
- package/dist/chunks/right-panel-7jzpbxja.js +0 -4
- package/dist/chunks/section-registry-gjryse41.js +0 -4
- package/dist/chunks/studio-3znfhcxg.js +0 -5
- package/dist/chunks/studio-58qam27v.js +0 -4
- package/dist/chunks/studio-6j59fwaw.js +0 -5
- package/dist/chunks/studio-7z69g1gx.js +0 -5
- package/dist/chunks/studio-93j3v6zx.js +0 -5
- package/dist/chunks/studio-9gf6v8zy.js +0 -5
- package/dist/chunks/studio-9rhmettf.js +0 -4
- package/dist/chunks/studio-ac5aq677.js +0 -10
- package/dist/chunks/studio-as65vbns.js +0 -5
- package/dist/chunks/studio-bkv0sga4.js +0 -6
- package/dist/chunks/studio-bttmqef4.js +0 -5
- package/dist/chunks/studio-c3y9d41k.js +0 -5
- package/dist/chunks/studio-ccegp7gz.js +0 -9
- package/dist/chunks/studio-chxabn98.js +0 -6
- package/dist/chunks/studio-cktcdsxz.js +0 -16
- package/dist/chunks/studio-cnspfke5.js +0 -5
- package/dist/chunks/studio-de3p1ktm.js +0 -5
- package/dist/chunks/studio-fsbcn530.js +0 -928
- package/dist/chunks/studio-gftga7a3.js +0 -64
- package/dist/chunks/studio-hf1rpcq0.js +0 -4
- package/dist/chunks/studio-hz02hq70.js +0 -5
- package/dist/chunks/studio-jsv3s3s1.js +0 -5
- package/dist/chunks/studio-ks7cksh0.js +0 -5
- package/dist/chunks/studio-nptx0dbs.js +0 -5
- package/dist/chunks/studio-pg0z7k98.js +0 -5
- package/dist/chunks/studio-pve0b2f2.js +0 -5
- package/dist/chunks/studio-q7zmjv3b.js +0 -6
- package/dist/chunks/studio-rpmvw7kj.js +0 -5
- package/dist/chunks/studio-rwhss52s.js +0 -5
- package/dist/chunks/studio-sbg3g3h0.js +0 -5
- package/dist/chunks/studio-sq1bn60g.js +0 -14
- package/dist/chunks/studio-vwz7rma2.js +0 -5
- package/dist/chunks/studio-wa55e8gf.js +0 -5
- package/dist/chunks/studio-x0mzdha2.js +0 -5
- package/dist/chunks/studio-xrgpakvc.js +0 -9
- package/dist/chunks/studio-xt3djk1w.js +0 -7
- package/dist/chunks/studio-yh3nggx1.js +0 -7
- package/dist/chunks/studio-zmecp6hq.js +0 -5
- package/dist/chunks/workspace-g6dvaete.js +0 -4
- package/dist/chunks/ws-client-shf41j5p.js +0 -4
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{p}from"./studio-6k1eswp9.js";import{lp}from"./studio-28pz4s1k.js";import{ge,Q,v,Wm}from"./studio-0nm2skex.js";import{ne}from"./studio-dknr8m7b.js";import{T,R}from"./studio-z1vdxq0e.js";import{zi,y}from"./studio-w8w9frjy.js";import{D}from"./studio-153mwkyq.js";function k({slug:e,adapter:t}){let o=new Date().toISOString().slice(0,10);return`${JSON.stringify(t==="cloudflare-workers"?{assets:{binding:"ASSETS",directory:"./dist"},compatibility_date:o,compatibility_flags:["nodejs_compat"],main:"./dist/worker.js",name:e}:{compatibility_date:o,compatibility_flags:["nodejs_compat"],name:e,pages_build_output_dir:"./dist"},null,"\t")}
|
|
2
|
+
`}function m(e,{slug:t,adapter:o}){if(!e)return{content:k({adapter:o,slug:t}),patched:!0};let n;try{n=JSON.parse(e)}catch{return{content:e,patched:!1}}if(n.name=t,o==="cloudflare-workers")delete n.pages_build_output_dir,n.main="./dist/worker.js",n.assets={binding:"ASSETS",directory:"./dist"};else delete n.main,delete n.assets,n.pages_build_output_dir="./dist";return{content:`${JSON.stringify(n,null,"\t")}
|
|
3
|
+
`,patched:!0}}function gd(){try{return typeof p().cfApi==="function"}catch{return!1}}async function l(e,t){let o=p().cfApi;if(!o)throw Error("This platform cannot reach the Cloudflare API");try{return await o(e,t)}catch(n){throw lp(n),n}}async function oT(){return l("/accounts")}async function j(e,t){try{return await l(`/accounts/${e}/pages/projects/${t}`)}catch{return null}}async function C(e){return l(`/accounts/${e.accountId}/pages/projects`,{method:"POST",body:{name:e.projectName,production_branch:e.productionBranch,build_config:{build_command:"bunx jx build",destination_dir:"dist"},source:{type:"github",config:{owner:e.owner,repo_name:e.repo,production_branch:e.productionBranch,deployments_enabled:!0}}}})}async function em(e){let t=await l(`/accounts/${e.accountId}/pages/projects/${e.projectName}/deployments`),[o]=t;if(!o)return null;return{id:o.id,url:o.url,environment:o.environment,stage:o.latest_stage?.name??"unknown",status:o.latest_stage?.status??"unknown",createdOn:o.created_on}}async function j1(e,t){let o={...e.build};if(t===null)delete o.deploy;else o.deploy=t;if(await zi({build:o}),t!==null){let n=p(),i=null;try{i=await n.readFile("wrangler.jsonc")}catch{i=null}let w=o.adapter==="cloudflare-workers"?"cloudflare-workers":"cloudflare-pages",{content:x,patched:S}=m(i,{adapter:w,slug:t.projectName});if(S)await n.writeFile("wrangler.jsonc",x)}}async function rT(e,t){let n=await j(t.accountId,t.projectName)??await C(t),i={provider:"cloudflare-pages",accountId:t.accountId,projectName:t.projectName,...n.subdomain?{productionUrl:`https://${n.subdomain}`}:{}};return await j1(e,i),i}var h={$schema:"https://jxsuite.com/schema/v1",$id:"StudioPanelDeployChecklist",$description:"The deploy checklist, drawn above the Activity feed in the Bottom dock's Activity tab: what is MISSING before this project can ship, as one row with the chain of prerequisites under it. `publish/deploy-checklist.ts` owns the chain — which link is forged, which is merely unasked, and which command forges the next one — and hands this document a row, four steps and at most one action. Nothing here reads source control, the project config or the command registry. It draws in the Activity tab's own vocabulary because a deploy is an ordered list of stages that finish, which is exactly what a row of that feed already is; a fifth visual idiom for it would be a second design of a thing the tab has.",tagName:"div",attributes:{part:"checklist"},style:{$description:"What `.activity-list`, `.activity-row`, `.activity-row--running`, `.activity-row--done`, `.activity-icon`, `.activity-body`, `.activity-head`, `.activity-title`, `.activity-source`, `.activity-status`, `.activity-steps`, `.activity-step`, `.activity-step--done` and `.activity-step-icon` said in `styles/panels.css`, keyed on `part`. This is the LAST reader of those rules — `surfaces/panel-activity.json` carried its own copy when the feed converted, and left the stylesheet standing because this file still drew from it — so the whole `.problem-*, .activity-*` block is dead once this lands. Three token names could not travel: `--spectrum-font-size-50`, `--spectrum-font-size-75` and `--spectrum-corner-radius-75` resolve only inside `<sp-theme>`, and a document mounted into the dock body is outside it, so each would silently have taken its hard-coded px fallback. They are the kit's own scale here. One thing changed meaning on purpose: the step's `data-state` is the checklist's own three-valued state rather than the two CSS classes it used to collapse into, so `unknown` — \"nobody has asked\" — is a state the styling can tell apart from `todo` the day it should.",display:"block",minWidth:"0",fontFamily:"var(--jx-font-sans)",color:"var(--fg)",'& [part="list"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-1)",margin:"0",padding:"0",listStyle:"none"},'& [part="row"]':{$description:"The left border is the state, at 3px, which is the one thing that must be legible without reading the row. Its default is the dim foreground so a state nobody has a colour for still draws a border rather than a gap.",display:"flex",alignItems:"flex-start",gap:"var(--jx-space-2)",padding:"6px var(--jx-space-2)",border:"1px solid var(--border)",borderLeft:"3px solid var(--fg-dim)",borderRadius:"var(--radius)",background:"var(--bg-panel)",color:"var(--fg)",fontSize:"var(--jx-text-md)"},'& [part="row"][data-state="running"]':{borderLeftColor:"var(--accent)"},'& [part="row"][data-state="done"]':{borderLeftColor:"var(--success)"},'& [part="state-icon"]':{$description:'Named `state-icon` rather than `icon`: `jx-button` puts `part="icon"` on the glyph slot of every button it draws, and the action button below is inside this same light-DOM tree — a rule on the bare name would reach into the kit\'s own drawing and a devtools query could not tell the two apart.',flex:"none",width:"14px",textAlign:"center",fontWeight:"700",lineHeight:"1.5"},'& [part="row"][data-state="running"] > [part="state-icon"]':{color:"var(--accent)"},'& [part="row"][data-state="done"] > [part="state-icon"]':{color:"var(--success)"},'& [part="row-body"]':{flex:"1",minWidth:"0",display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"2px"},'& [part="head"]':{display:"flex",alignItems:"baseline",gap:"var(--jx-space-2)",alignSelf:"stretch",minWidth:"0"},'& [part="row-title"]':{fontWeight:"700",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},'& [part="source"]':{$description:"Pushed to the far edge, so the tab reads as a column of who raised what.",flex:"none",marginLeft:"auto",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"},'& [part="summary"]':{color:"var(--fg-dim)",overflowWrap:"anywhere"},'& [part="steps"]':{$description:'The chain, declared up front, so "which link is missing" is answered by looking rather than by reading the summary and remembering what came before it.',display:"flex",flexDirection:"column",gap:"1px",margin:"2px 0 0",padding:"0",listStyle:"none",fontSize:"var(--jx-text-sm)"},'& [part="step"]':{display:"flex",gap:"6px",color:"var(--fg-dim)"},'& [part="step"][data-state="done"] > [part="step-icon"]':{color:"var(--success)"},'& [part="step-icon"]':{flex:"none",width:"10px",textAlign:"center"},'& [part="action"]':{marginTop:"var(--jx-space-1)"}},children:[{tagName:"div",attributes:{part:"body-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasProject"},cases:{true:{tagName:"ul",attributes:{part:"list"},children:[{tagName:"li",attributes:{part:"row","data-state":"${state.rowState}"},children:[{tagName:"span",attributes:{part:"state-icon","aria-hidden":"true"},textContent:"${state.rowIcon}"},{tagName:"div",attributes:{part:"row-body"},children:[{tagName:"div",attributes:{part:"head"},children:[{tagName:"span",attributes:{part:"row-title"},textContent:"Deploy checklist"},{tagName:"span",attributes:{part:"source"},textContent:"Publish"}]},{tagName:"div",attributes:{part:"summary"},textContent:"${state.summary}"},{tagName:"ol",attributes:{part:"steps"},children:[{$prototype:"Array",items:{$ref:"#/state/steps"},key:{$ref:"$map/item/id"},map:{tagName:"li",attributes:{part:"step","data-step":"${$map.item.id}","data-state":"${$map.item.state}"},children:[{tagName:"span",attributes:{part:"step-icon","aria-hidden":"true"},textContent:"${$map.item.icon}"},{tagName:"span",attributes:{part:"step-text"},textContent:"${$map.item.text}"}]}}]},{tagName:"span",attributes:{part:"action-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasAction"},cases:{true:{tagName:"jx-button",$description:"The recovery button wears the command's own title, so it reads as a verb rather than as a decoration, and a refused command is dimmed with the reason it names in its tooltip. A command the registry does not have, or whose `when` is false, draws NOTHING rather than a dead label — a surface may choose whether to show a command, never whether it exists (§13).",$props:{size:"sm",disabled:{$ref:"#/state/actionDisabled"}},attributes:{part:"action",title:"${state.actionTitle}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/runAction"},value:[]}]},children:[{tagName:"span",textContent:"${state.actionLabel}"}]}}}]}]}]}}}]};T("panel-deploy-checklist",h);var d=null,c=null,a=null,r=null;function A(e,t){e.hasProject=t.hasProject,e.rowState=t.rowState,e.rowIcon=t.rowIcon,e.summary=t.summary,e.steps=t.steps,e.hasAction=t.hasAction,e.actionLabel=t.actionLabel,e.actionTitle=t.actionTitle,e.actionDisabled=t.actionDisabled}function N(e){if(d!==e)return!1;return r===null?a!==null:r.root.parentNode===e}function f(e,t){if(N(e))return;u(),d=e;let o=v({actionDisabled:!1,actionLabel:"",actionTitle:"",hasAction:!1,hasProject:!1,rowIcon:"",rowState:"running",runAction:t.runAction,steps:[],summary:""});c=ge(),c.run(()=>{Q(()=>{A(o,t.project())})});let n=R("panel-deploy-checklist",o,e);a=n,n.then((i)=>{if(a===n)r=i;else i.dispose()})}function u(){c?.stop(),c=null;let e=a;if(a=null,r)r.dispose(),r=null;else if(e)e.then((t)=>t.dispose());d=null}function I(){return D?.projectConfig??null}function ca(){return I()?.build?.deploy}var s=Wm({asked:!1,observed:null});function rp(e){s.observed=e,s.asked=!0}function _(){let{status:e}=y.git;if(e===null)return{command:"git.init",detail:"Source control has not reported on this project yet.",id:"repo",label:"Track this project with git",state:"unknown"};return e.isRepo?{command:"git.init",detail:`Tracked${e.branch?` — on branch ${e.branch}`:""}.`,id:"repo",label:"Track this project with git",state:"done"}:{command:"git.init",detail:"A deploy ships what the repository holds, so the repository comes first.",id:"repo",label:"Track this project with git",state:"todo"}}function L(){let{status:e}=y.git;if(e===null||!e.isRepo)return{command:"git.createGithubRepository",detail:"A remote is where the provider builds from.",id:"remote",label:"Push to a remote",state:e===null?"unknown":"todo"};if((e.remotes??[]).length===0)return{command:"git.createGithubRepository",detail:"This repository is local only — nothing outside this machine can build it.",id:"remote",label:"Push to a remote",state:"todo"};return e.ahead>0?{command:"git.push",detail:`${e.ahead} commit(s) are not on ${e.remotes[0]} yet, so a build would ship the older tree.`,id:"remote",label:"Push to a remote",state:"todo"}:{command:"git.push",detail:`Up to date with ${e.remotes[0]}.`,id:"remote",label:"Push to a remote",state:"done"}}function O(){let e=ca();if(e)return{command:"publish.setUp",detail:`Cloudflare Pages project ${e.projectName}.`,id:"provider",label:"Connect a deploy provider",state:"done"};return gd()?{command:"publish.setUp",detail:"Connecting one makes every commit build and publish on its own.",id:"provider",label:"Connect a deploy provider",state:"todo"}:{command:"publish.setUp",detail:"This platform cannot reach the Cloudflare API. Commit and push instead — your host "+"runs bunx jx build and serves dist/.",id:"provider",label:"Connect a deploy provider",state:"unknown"}}function E(){if(!ca())return{command:"publish.deploy",detail:"Nothing has been deployed, because no provider is connected.",id:"deployed",label:"Deploy",state:"todo"};if(!s.asked)return{command:"publish.deploy",detail:"Cloudflare has not been asked yet, so this is not a claim that nothing shipped.",id:"deployed",label:"Deploy",state:"unknown"};if(s.observed===null)return{command:"publish.deploy",detail:"Cloudflare reports no deployments for this project.",id:"deployed",label:"Deploy",state:"todo"};let{observed:e}=s;return e.status==="success"?{command:"publish.deploy",detail:`${e.environment} — ${e.url}`,id:"deployed",label:"Deploy",state:"done"}:{command:"publish.deploy",detail:`Last deployment ${e.stage}: ${e.status}.`,id:"deployed",label:"Deploy",state:"todo"}}function g(){return[_(),L(),O(),E()]}function b(){return g().find((e)=>e.state!=="done")??null}function sT(){if(!D)return null;let e=b();if(e)return{command:e.command,label:e.label,title:e.detail};return{command:"publish.openDashboard",label:"Deployed",title:ca()?.productionUrl??"Everything this project needs to ship is in place."}}var W={done:"✓",todo:"·",unknown:"?"};function V(e){return{icon:W[e.state],id:e.id,state:e.state,text:e.state==="done"?e.label:`${e.label} — ${e.detail}`}}function H(e){let t={actionDisabled:!1,actionLabel:"",actionTitle:"",hasAction:!1};if(!e)return t;let o=ne(),n=o?.get(e.command);if(!o||!n||!o.isVisible(e.command))return t;let i=o.disabledReason(e.command);return{actionDisabled:i!==void 0,actionLabel:n.title,actionTitle:i?`${n.title} — requires ${i}`:n.title,hasAction:!0}}function J(){if(!D)return{actionDisabled:!1,actionLabel:"",actionTitle:"",hasAction:!1,hasProject:!1,rowIcon:"",rowState:"running",steps:[],summary:""};let e=g(),t=e.find((o)=>o.state!=="done")??null;return{...H(t),hasProject:!0,rowIcon:t?"⋯":"✓",rowState:t?"running":"done",steps:e.map((o)=>V(o)),summary:t?t.detail:"Everything this project needs to ship is in place."}}function B(){let e=b();if(!e)return;ne()?.run(e.command)}var F={project:J,runAction:B};function aT(e){let t=e.querySelector("[data-deploy-checklist]");if(!t){u();return}f(t,F)}
|
|
4
|
+
export{gd,oT,em,j1,rT,ca,rp,sT,aT};
|
|
5
|
+
|
|
6
|
+
//# debugId=5B52D371D608432F64756E2164756E21
|
|
7
|
+
//# sourceMappingURL=studio-sadckcpp.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{br}from"./studio-dmymvk2j.js";import{hn,sn}from"./studio-dknr8m7b.js";import{ge,Q,v,Zi,S}from"./studio-0nm2skex.js";import{di}from"./studio-b29h7g7s.js";import{rt,zt,T,R,Nn,Ct}from"./studio-z1vdxq0e.js";import{Td}from"./studio-w8w9frjy.js";import{aT}from"./studio-sadckcpp.js";import{Gn}from"./studio-njmg0e73.js";import{yc,Fs,om}from"./studio-81twpmzj.js";var y={$schema:"https://jxsuite.com/schema/v1",$id:"StudioPanelActivity",$description:'The Activity feed: one row per operation this session, newest last, drawn from the projection `panels/activity-panel.ts` hands in. A row is a glyph, a head line (what the operation is, who is running it, how long it has taken), the line it is doing now, the plan it declared, the log it captured and — only when the operation handed a callback over — its Cancel. Every conditional the row has is a boolean field on the projected item, because `$switch` over a value is the only conditional a document has and "is this entry cancellable" is a question the panel has already answered. Nothing here reads the activity store: the panel owns what an operation IS, and the surface owns what it looks like.',tagName:"div",attributes:{part:"panel"},style:{$description:"What `.activity-panel`, `.activity-actions`, `.activity-list`, `.activity-row`, `.activity-icon`, `.activity-body`, `.activity-head`, `.activity-title`, `.activity-source`, `.activity-duration`, `.activity-status`, `.activity-steps`, `.activity-step`, `.activity-step-icon`, `.activity-log-toggle` and `.activity-log` said in `styles/panels.css`, keyed on `part`. Two rules were DELETED rather than moved: `.activity-clear` and `.activity-cancel` drew a small bordered button by hand, and `jx-button` is that button — so the sizes, the border, the hover fill and the disabled state are the kit's now. Three token names changed meaning on the way: `--spectrum-font-size-50`, `--spectrum-font-size-75` and `--spectrum-corner-radius-75` resolve only inside `<sp-theme>`, and this document is mounted into the Bottom dock's body where that element is not an ancestor — every one of them would silently have taken its px fallback. They are the kit's own scale here (`--jx-text-sm`, `--jx-text-md`, `--jx-radius-xs`), which is the step each of them was. The `.activity-*` rules stay in the stylesheet regardless: `publish/deploy-checklist.ts` still draws the checklist above this feed in that same vocabulary, and it is a lit template until it converts.",display:"flex",flexDirection:"column",gap:"8px",padding:"8px",minWidth:"0",fontFamily:"var(--jx-font-sans)",color:"var(--fg)",'& [part="feed"]':{display:"flex",flexDirection:"column",gap:"8px",minWidth:"0"},'& [part="actions"]':{display:"flex",justifyContent:"flex-end"},'& [part="list"]':{display:"flex",flexDirection:"column",gap:"4px",margin:"0",padding:"0",listStyle:"none"},'& [part="row"]':{$description:"The left border is the state, at 3px, which is the one thing that must be legible in a column of twenty rows without reading any of them. Its default is the dim foreground so a state nobody has a colour for still draws a border rather than a gap.",display:"flex",alignItems:"flex-start",gap:"8px",padding:"6px 8px",border:"1px solid var(--border)",borderLeft:"3px solid var(--fg-dim)",borderRadius:"var(--radius)",background:"var(--bg-panel)",color:"var(--fg)",fontSize:"var(--jx-text-md)"},'& [part="row"][data-state="running"]':{borderLeftColor:"var(--accent)"},'& [part="row"][data-state="done"]':{borderLeftColor:"var(--success)"},'& [part="row"][data-state="failed"]':{borderLeftColor:"var(--danger)"},'& [part="row"][data-state="cancelled"]':{borderLeftColor:"var(--fg-dim)"},'& [part="icon"]':{flex:"none",width:"14px",textAlign:"center",fontWeight:"700",lineHeight:"1.5"},'& [part="row"][data-state="running"] [part="icon"]':{color:"var(--accent)"},'& [part="row"][data-state="done"] [part="icon"]':{color:"var(--success)"},'& [part="row"][data-state="failed"] [part="icon"]':{color:"var(--danger)"},'& [part="body"]':{flex:"1",minWidth:"0",display:"flex",flexDirection:"column",gap:"2px"},'& [part="head"]':{display:"flex",alignItems:"baseline",gap:"8px",minWidth:"0"},'& [part="row-title"]':{fontWeight:"700",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},'& [part="source"], & [part="duration"]':{flex:"none",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"},'& [part="duration"]':{$description:"Pushed to the far edge so a column of rows reads as a column of times.",marginLeft:"auto"},'& [part="status"]':{color:"var(--fg-dim)",overflowWrap:"anywhere"},'& [part="steps"]':{$description:'The plan, declared up front, so "which of the three steps is this on" is answered by looking rather than by reading the status line and remembering what came before it.',display:"flex",flexDirection:"column",gap:"1px",margin:"2px 0 0",padding:"0",listStyle:"none",fontSize:"var(--jx-text-sm)"},'& [part="step"]':{display:"flex",gap:"6px",color:"var(--fg-dim)"},'& [part="step"][data-state="running"]':{color:"var(--fg)"},'& [part="step"][data-state="done"] [part="step-icon"]':{color:"var(--success)"},'& [part="step"][data-state="failed"] [part="step-icon"]':{color:"var(--danger)"},'& [part="step-icon"]':{flex:"none",width:"10px",textAlign:"center"},'& [part="log-toggle"]':{$description:"A plain button rather than a kit one, and the one element here that is not the kit's. The control has to carry `aria-expanded` on the node the reader actually focuses, and a `jx-button` forwards a fixed set of ARIA properties to the control inside its shadow root — an attribute written on the host would name the wrapper and not the button. Its wording is the disclosure's whole state (`docs/studio/interface/problems-and-progress.md` calls it the Show log disclosure), so nothing else has to draw one.",alignSelf:"flex-start",padding:"0",border:"none",background:"none",color:"var(--accent)",font:"inherit",fontSize:"var(--jx-text-sm)",cursor:"pointer",":hover":{textDecoration:"underline"},":focus-visible":{outline:"var(--jx-focus-ring)",outlineOffset:"2px"}},'& [part="log"]':{$description:"The captured output the progress modal used to show once and then lose. It scrolls inside the row rather than growing it, so one 400-line `bun install` failure does not become the whole panel. It is selectable against the root's `user-select: none`, the one part of an activity row that is: the output is what a reader pastes into a bug report, and the row offers no copy action.",userSelect:"text",maxHeight:"180px",margin:"2px 0 0",padding:"6px",overflow:"auto",borderRadius:"var(--jx-radius-xs)",background:"var(--bg)",color:"var(--fg-dim)",fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)",whiteSpace:"pre-wrap"},'& [part="cancel"]':{flex:"none"},'& [part="empty"]':{$description:"The teaching empty state, drawn here rather than borrowed from `panels/empty-state.ts`: that helper is a lit template and a document cannot call one. What it says is what is kept — one sentence saying what the region is FOR, then where its content comes from — and this region's fill is an operation somebody else starts, so it offers no button.",display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",padding:"24px",textAlign:"center",fontSize:"13px",color:"var(--fg-dim)"},'& [part="empty-message"], & [part="empty-detail"]':{margin:"0",maxWidth:"34ch",lineHeight:"1.5"},'& [part="empty-detail"]':{fontSize:"var(--jx-text-sm)",opacity:"0.8"}},children:[{tagName:"div",attributes:{part:"feed-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasRows"},cases:{true:{tagName:"div",attributes:{part:"feed"},children:[{tagName:"div",attributes:{part:"actions-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasFinished"},cases:{true:{tagName:"div",attributes:{part:"actions"},children:[{tagName:"jx-button",$props:{size:"sm",quiet:!0},attributes:{part:"clear"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/clearFinished"}}]},children:[{tagName:"span",textContent:"${state.clearLabel}"}]}]}}},{tagName:"ul",attributes:{part:"list"},children:[{$prototype:"Array",items:{$ref:"#/state/rows"},key:{$ref:"$map/item/id"},map:{tagName:"li",attributes:{part:"row","data-state":"${$map.item.state}"},children:[{tagName:"span",attributes:{part:"icon","aria-hidden":"true"},textContent:"${$map.item.icon}"},{tagName:"div",attributes:{part:"body"},children:[{tagName:"div",attributes:{part:"head"},children:[{tagName:"span",attributes:{part:"row-title"},textContent:"${$map.item.title}"},{tagName:"span",attributes:{part:"source-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasSource"},cases:{true:{tagName:"span",attributes:{part:"source"},textContent:"${$map.item.source}"}}},{tagName:"span",attributes:{part:"duration"},textContent:"${$map.item.duration}"}]},{tagName:"div",attributes:{part:"status-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasStatus"},cases:{true:{tagName:"div",attributes:{part:"status"},textContent:"${$map.item.status}"}}},{tagName:"div",attributes:{part:"steps-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasSteps"},cases:{true:{tagName:"ol",attributes:{part:"steps"},children:[{$prototype:"Array",items:{$ref:"$map/item/steps"},key:{$ref:"$map/item/key"},map:{tagName:"li",attributes:{part:"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:"div",attributes:{part:"log-toggle-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/hasLog"},cases:{true:{tagName:"button",attributes:{part:"log-toggle",type:"button","aria-expanded":"${$map.item.expanded ? 'true' : 'false'}"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/toggleLog"},value:[{$ref:"$map/item/id"}]}]},textContent:"${$map.item.logLabel}"}}},{tagName:"div",attributes:{part:"log-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/showLog"},cases:{true:{tagName:"pre",attributes:{part:"log"},textContent:"${$map.item.logText}"}}}]},{tagName:"div",attributes:{part:"cancel-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"$map/item/cancellable"},cases:{true:{tagName:"jx-button",$props:{size:"sm"},attributes:{part:"cancel",title:"Stop this operation"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/cancel"},value:[{$ref:"$map/item/id"}]}]},children:[{tagName:"span",textContent:"Cancel"}]}}}]}}]}]},false:{tagName:"div",attributes:{part:"empty"},children:[{tagName:"p",attributes:{part:"empty-message"},textContent:"Long operations show their progress, their log and their Cancel button here."},{tagName:"p",attributes:{part:"empty-detail"},textContent:"Installs, clones, publishes and imports report here while they run."}]}}}]};T("panel-activity",y);var g=null,h=null,p=null,d=null;function E(t,e){t.rows=e.rows,t.hasRows=e.hasRows,t.hasFinished=e.hasFinished,t.clearLabel=e.clearLabel}function j(t){if(g!==t)return!1;return d===null?p!==null:d.root.parentNode===t}function b(t,e){if(j(t))return;f(),g=t;let a=v({cancel:e.cancel,clearFinished:e.clearFinished,clearLabel:"",hasFinished:!1,hasRows:!1,rows:[],toggleLog:e.toggleLog});h=ge(),h.run(()=>{Q(()=>{E(a,e.project())})});let o=R("panel-activity",a,t);p=o,o.then((i)=>{if(p===o)d=i;else i.dispose()})}function f(){h?.stop(),h=null;let t=p;if(p=null,d)d.dispose(),d=null;else if(t)t.then((e)=>e.dispose());g=null}var s=v([]),I=20,u=new Map,w=0;function H(){return w+=1,`a${w}`}function c(t){return t.state!=="running"}function x(){let t=s.filter((e)=>c(e)).length-I;while(t>0){let e=s.findIndex((a)=>c(a));if(e===-1)return;u.delete(s[e].id),s.splice(e,1),t-=1}}function aa(t){let e={cancellable:t.cancel!==void 0,endedAt:null,expanded:!1,id:H(),log:[],startedAt:Zi(),state:"running",status:t.status??"",steps:(t.steps??[]).map((i)=>({label:i,state:"pending"})),title:t.title,...t.source===void 0?{}:{source:t.source}};if(t.cancel)u.set(e.id,t.cancel);s.push(e);let a=s.at(-1);x();let o=(i,r)=>{if(c(a))return;if(a.state=i,a.endedAt=Zi(),r!==void 0)a.status=r;for(let n of a.steps)n.state=n.state==="done"?"done":i==="done"?"done":"failed";a.cancellable=!1,u.delete(a.id),x()};return{done(i){o("done",i)},entry:a,fail(i,r={}){if(c(a))return;let n=a.log.join(`
|
|
2
|
+
`);o("failed",i),S.error(i,{source:a.source??a.title,...n===""?{}:{detail:n},...r.action===void 0?{}:{action:r.action},...r.path===void 0?{}:{path:r.path}})},id:a.id,log(i){let r=i.replace(/\s+$/,"");if(r!=="")a.log.push(r)},setStatus(i){if(!c(a))a.status=i},step(i){let r=a.steps.findIndex((n)=>n.label===i);if(r===-1)a.steps.push({label:i,state:"pending"}),r=a.steps.length-1;for(let[n,l]of a.steps.entries())l.state=n<r?"done":n===r?"running":l.state;a.status=i}}}function A(t){return s.find((e)=>e.id===t)}function m(){return s.filter((t)=>!c(t))}function F(t){let e=A(t),a=u.get(t);if(!e||!a||c(e))return!1;return a(),u.delete(t),e.state="cancelled",e.endedAt=Zi(),e.cancellable=!1,e.status="Cancelled",!0}function P(){let t=s.filter((a)=>!c(a)),e=s.length-t.length;return s.splice(0,s.length,...t),e}function eT(){return m().map((t)=>`activity: ${t.title} — ${t.status||"running"}`)}var M={cancelled:"⊘",done:"✓",failed:"✕",running:"⋯"},D={done:"✓",failed:"✕",pending:"·",running:"⋯"};function V(t,e=Zi()){let a=Math.max(0,(t.endedAt??e)-t.startedAt);if(a<1000)return`${a}ms`;let o=Math.round(a/1000);return o<60?`${o}s`:`${Math.floor(o/60)}m ${o%60}s`}function z(t,e){return{icon:D[t.state],key:`${e}:${t.label}`,label:t.label,state:t.state}}function _(t){let e=t.log.length;return{cancellable:t.cancellable,duration:V(t),expanded:t.expanded,hasLog:e>0,hasSource:(t.source??"")!=="",hasStatus:t.status!=="",hasSteps:t.steps.length>0,icon:M[t.state],id:t.id,logLabel:t.expanded?"Hide log":`Show log (${e} line(s))`,logText:t.log.join(`
|
|
3
|
+
`),showLog:t.expanded&&e>0,source:t.source??"",state:t.state,status:t.status,steps:t.steps.map((a,o)=>z(a,o)),title:t.title}}function O(){let t=s.filter((e)=>c(e)).length;return{clearLabel:`Clear ${t} finished`,hasFinished:t>0,hasRows:s.length>0,rows:s.map((e)=>_(e))}}var U={cancel:(t)=>{F(t)},clearFinished:()=>{P()},project:O,toggleLog:(t)=>{let e=A(t);if(e)e.expanded=!e.expanded}};function W(){return br`<div data-deploy-checklist></div>
|
|
4
|
+
<div data-activity-surface></div>`}function B(t){let e=t.querySelector("[data-activity-surface]");if(!e){f();return}b(e,U)}function tT(){Gn({id:"activity",title:"Activity",level:"project",dock:"bottom",icon:"clock-counter-clockwise",rail:!1,badge:()=>m().length>0?m().length:null,render:()=>W(),afterRender:(t,e)=>{aT(e),B(e)}})}var q={message:"no media file to look for",status:"failed"};function k(t){let e=di(t);return e===""?null:{path:e}}function nT(t){let e=k(t);return e===null?null:yc(e)}async function kb(t){let e=k(t);return e===null?q:Fs(e)}function iT(t){if(t===null)return"Counting references…";switch(t.status){case"unsupported":return null;case"pending":return"Counting references…";case"failed":return"Usage unknown";default:return om(t.result)}}var L={$schema:"https://jxsuite.com/schema/v1",$id:"StudioProgressModal",$description:"The one surface in Studio that blocks while it works: the operation's name, a spinner, the line under it, and the two ways out. A `jx-dialog`, so the platform owns modality, the backdrop, focus restoration and Escape — which is what retired the `sp-underlay` this surface used to paint beside itself, and with it the fixed box, the panel, the shadow and the `z-index: 1000` that box needed to climb back out from under its own scrim. The two answers are the dialog's own: confirm is `Run in the background`, which stops the BLOCKING and leaves the work running in Activity, and the secondary answer is Cancel, drawn only when the operation handed one over. It is the secondary rather than the cancel answer for a reason that is behavioural, not cosmetic: the platform raises one `cancel` for Escape, for a light dismissal and for the cancel button alike, and a surface that cannot tell them apart would stop a dependency install on a keystroke. Escape therefore means what confirm means — stop blocking, not stop working — and the answer that stops the work is a button and only a button.",tagName:"jx-dialog",$props:{headline:{$ref:"#/state/title"},confirmLabel:"Run in the background",secondaryLabel:{$ref:"#/state/cancelLabel"},cancelLabel:"",size:"sm"},attributes:{part:"progress"},onconfirm:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/background"},value:[]}]},onsecondary:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/cancel"},value:[]}]},oncancel:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/background"},value:[]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},style:{$description:"What is left once `jx-dialog` has drawn the dialog. `.progress-modal` is gone rather than moved — it positioned a fixed box, painted its panel, border, radius and shadow, capped its height and then lifted itself above the scrim it rendered beside — and a modal `<dialog>` in the top layer is every one of those. `.progress-title` went the same way: the operation's name is the dialog's headline, which is also its accessible name, so nothing here draws a title.",'& [part="row"]':{display:"flex",alignItems:"center",gap:"var(--jx-space-4)"},'& [part="status"]':{$description:"`anywhere`, because a status line is usually a path or a package spec with no space in it, and one of those would otherwise be the thing that decides how wide the dialog is. `min-width: 0` is what lets it wrap at all: a flex item's automatic minimum is its content, so without this the row refuses to shrink and the text overflows instead.",minWidth:"0",color:"var(--fg-dim)",fontSize:"var(--jx-text-md)",overflowWrap:"anywhere"}},children:[{tagName:"div",attributes:{part:"row"},children:[{tagName:"jx-spinner",attributes:{part:"busy"},$props:{size:"lg"}},{tagName:"span",attributes:{part:"status","aria-live":"polite"},textContent:"${state.status}"}]}]};T("progress-modal",L);function N(t){let e=document.createElement("div");e.style.pointerEvents="auto",e.setAttribute(rt,zt("modal","progress")),t.layer.append(e);let a=!1,o=v({background:()=>{t.onBackground()},cancel:()=>{t.onCancel()},cancelLabel:t.cancellable?"Cancel":"",closed:()=>{t.onClosed()},status:t.status,title:t.title}),i=null,r=R("progress-modal",o,e).then(async(n)=>{let l=n.root;if(a)return n.dispose(),l;if(i=n,await Nn(l),a)return l;return hn(l),l});return{close(){if(a)return;a=!0;let n=i?.root;if(n instanceof HTMLElement)sn(n);i?.dispose(),i=null,e.remove()},host:e,ready:r,setStatus(n){o.status=n}}}function la(t){let e=!1,a=aa({title:t.title,...t.status===void 0?{}:{status:t.status},...t.source===void 0?{}:{source:t.source},...t.cancel===void 0?{}:{cancel:t.cancel}}),o=()=>{if(e)return;e=!0,r.close()},i=()=>{o(),Td("activity")},r=N({cancellable:t.cancel!==void 0,layer:Ct("modal"),onBackground:i,onCancel:()=>{o(),t.cancel?.()},onClosed:o,status:t.status??"",title:t.title});return{activity:a,done(){a.done(),o()},fail(n){let l=(n??"").trim();if(l===""||l.includes(`
|
|
5
|
+
`))a.log(l),a.fail(`${t.title} failed`);else a.fail(l);o()},log(n){a.log(n)},setStatus(n){if(a.setStatus(n),!e)r.setStatus(n)}}}
|
|
6
|
+
export{aa,eT,tT,la,nT,kb,iT};
|
|
7
|
+
|
|
8
|
+
//# debugId=E1A94BC027074D1C64756E2164756E21
|
|
9
|
+
//# sourceMappingURL=studio-sgzss898.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
class f extends Error{name="MaxOpsExceededError"}function d(n){return typeof n==="object"&&n!==null&&!Array.isArray(n)}function
|
|
2
|
-
export{
|
|
1
|
+
class f extends Error{name="MaxOpsExceededError"}function d(n){return typeof n==="object"&&n!==null&&!Array.isArray(n)}function ls(n,e){if(n===e)return!0;if(Array.isArray(n)&&Array.isArray(e))return n.length===e.length&&n.every((t,r)=>ls(t,e[r]));if(d(n)&&d(e)){let t=Object.keys(n),r=Object.keys(e);return t.length===r.length&&t.every((i)=>(i in e)&&ls(n[i],e[i]))}return!1}function A(n){let e=5381;for(let t=0;t<n.length;t++)e=Math.imul(e,33)+(n.codePointAt(t)??0);return e.toString(36)}function m(n){return typeof n==="string"?`s:${n}`:`n:${A(JSON.stringify(n))}`}function x(n){if(typeof n==="string")return"s";let e=n,{attributes:t,$props:r}=e,i=(d(t)?t.id:void 0)??(d(r)?r.key:void 0)??"";return`w:${String(e.tagName??"")}:${String(i)}`}function y(n,e,t=Number.POSITIVE_INFINITY){let r=n.length,i=e.length;if(r===0||i===0||r*i>t)return[];let c=Array.from({length:r+1},()=>Array.from({length:i+1},()=>0));for(let s=r-1;s>=0;s--)for(let l=i-1;l>=0;l--)c[s][l]=n[s]===e[l]?c[s+1][l+1]+1:Math.max(c[s+1][l],c[s][l+1]);let o=[],a=0,u=0;while(a<r&&u<i)if(n[a]===e[u])o.push([a,u]),a+=1,u+=1;else if(c[a+1][u]>=c[a][u+1])a+=1;else u+=1;return o}function s1(n,e,t={}){let r=t.maxCells??Number.POSITIVE_INFINITY,i=y(n.map((s)=>m(s)),e.map((s)=>m(s)),r),c=[],o=-1,a=-1,u=[];for(let[s,l]of i)u.push([o+1,s,a+1,l]),c.push({aIndex:s,bIndex:l,identical:!0}),o=s,a=l;u.push([o+1,n.length,a+1,e.length]);for(let[s,l,p,k]of u){let w=n.slice(s,l),O=e.slice(p,k);for(let[b,I]of y(w.map((h)=>x(h)),O.map((h)=>x(h)),r))c.push({aIndex:s+b,bIndex:p+I,identical:!1})}return c.toSorted((s,l)=>s.aIndex-l.aIndex)}class g{ops=[];maxOps;constructor(n){this.maxOps=n}result(){return this.ops}push(n){if(this.ops.length>=this.maxOps)throw new f;this.ops.push(n)}diffNode(n,e,t){for(let c of new Set([...Object.keys(e),...Object.keys(t)])){if(c==="children")continue;if(!(c in t))this.push({key:c,op:"set-key",path:n});else if(!ls(e[c],t[c]))this.push({key:c,op:"set-key",path:n,value:t[c]})}let r=e.children,i=t.children;if(Array.isArray(r)&&Array.isArray(i))this.diffChildren(n,r,i);else if(!ls(r,i))this.push({key:"children",op:"set-key",path:n,value:i})}diffChildren(n,e,t){let r=s1(e,t),i=new Set(r.map((o)=>o.aIndex)),c=new Map(r.map((o)=>[o.bIndex,o]));for(let o=e.length-1;o>=0;o--)if(!i.has(o))this.push({index:o,op:"remove-child",parentPath:n});for(let o=0;o<t.length;o++){let a=c.get(o);if(!a){this.push({index:o,node:t[o],op:"insert-child",parentPath:n});continue}if(a.identical)continue;let u=e[a.aIndex],s=t[o];if(d(u)&&d(s))this.diffNode([...n,"children",o],u,s);else if(!ls(u,s))this.push({index:o,node:s,op:"set-child",parentPath:n})}}}function w$(n,e,t={}){let r=new g(t.maxOps??500);try{r.diffNode([],n,e)}catch(i){if(i instanceof f)return null;throw i}return r.result()}
|
|
2
|
+
export{ls,s1,w$};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
5
|
-
//# sourceMappingURL=studio-
|
|
4
|
+
//# debugId=8DB283147470D16B64756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-t0v47dpc.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{_t,
|
|
1
|
+
import{p,We}from"./studio-6k1eswp9.js";import{S}from"./studio-0nm2skex.js";function k(e){return e.trim().replace(/\/+$/,"")}function u(e){return e.trim()}var _t={aiBaseUrl:{default:"",key:"jx.ai.baseUrl",normalize:k,scope:"user"},aiOpenAiKey:{default:"",key:"jx.ai.openaiKey",normalize:u,scope:"user",secret:!0},aiModel:{default:"gpt-4o",key:"jx.ai.model",normalize:u,scope:"user"},keybindings:{default:"",key:"jx.keybindings",normalize:(e)=>e.trim()==="{}"?"":e.trim(),scope:"user"},theme:{default:"",key:"jx-studio-theme",normalize:u,scope:"user"},showIgnoredFiles:{default:"",key:"jx.files.showIgnored",normalize:u,scope:"user"},cfAccountId:{default:"",key:"jx.cf.accountId",normalize:u,scope:"user"},cfToken:{default:"",key:"jx.cf.token",normalize:u,scope:"user",secret:!0}},m=Object.values(_t),l=m.filter((e)=>e.scope==="user"),P=l.map((e)=>e.key);function h(e){let t=e.schedule??queueMicrotask,n=null,i=Promise.resolve(),r=Promise.resolve();function s(){let o=n;if(n=null,!o)return i;return i=i.then(()=>e.send(o)).catch((a)=>{e.onError?.(a,o)}),i}return{enqueue(o){if(n){Object.assign(n,o);return}n={...o},r=new Promise((a)=>{t(()=>{s().then(a)})})},settled(){return r}}}var c=new Map;function v(e,t){try{if(t===null)globalThis.localStorage?.removeItem(e);else globalThis.localStorage?.setItem(e,t)}catch{}}try{for(let e of m){let t=globalThis.localStorage?.getItem(e.key);if(t!==null&&t!==void 0)c.set(e.key,t)}}catch{}function Lr(e){return c.get(e.key)??""}function mL(e){return(c.get(e.key)??"")!==""}var y=new Set;function ev(e){return y.add(e),()=>{y.delete(e)}}function f(e){for(let t of y)t(e)}var g=h({onError(e){S("error","Your settings could not be saved.",{detail:e instanceof Error?e.message:String(e),key:"settings-write",source:"Settings"})},async send(e){if(!We())return;let t=p();if(!t.patchSettings)return;let n={},i=[];for(let[r,s]of Object.entries(e))if(s)n[r]=s;else i.push(r);await t.patchSettings({remove:i,set:n})}});function gL(){return g.settled()}function d(e){let t=[];for(let[n,i]of Object.entries(e)){if((c.get(n)??null)===i)continue;if(i===null)c.delete(n);else c.set(n,i);v(n,i),t.push(n)}return t}function tv(e,t){return e.normalize?e.normalize(t):t}function Ur(e,t){let n=tv(e,t),i=d({[e.key]:n});if(i.length>0)g.enqueue({[e.key]:n}),f(i)}function bL(e){let t={};for(let[i,r]of e)t[i.key]=tv(i,r);let n=d(t);if(n.length>0)g.enqueue(t),f(n)}function ju(e){let t={};for(let i of e)t[i.key]=null;let n=d(t);if(n.length>0)g.enqueue(t),f(n)}async function vL(){if(!We())return;let e=p();if(!e.getSettings)return;let t;try{t=await e.getSettings()}catch{return}let n={},i=!1;for(let s of l){let o=t[s.key];if(o)n[s.key]=o;else if(c.get(s.key))i=!0}let r=d(n);if(r.length>0)f(r);if(i){let s={};for(let o of l){let a=c.get(o.key);if(a&&!t[o.key])s[o.key]=a}g.enqueue(s)}}function x(e){let t={};for(let i of l)t[i.key]=e[i.key]??null;let n=d(t);if(n.length>0)f(n)}function yL(){if(!We())return;p().subscribeSettings?.(x)}
|
|
2
|
+
export{_t,Lr,mL,ev,gL,tv,Ur,bL,ju,vL,yL};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
5
|
-
//# sourceMappingURL=studio-
|
|
4
|
+
//# debugId=F283D250164381AB64756E2164756E21
|
|
5
|
+
//# sourceMappingURL=studio-tj28pxa1.js.map
|