@jxsuite/studio 5.7.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{2020-cs2sb9t1.js → 2020-nkxms0ay.js} +3 -3
- package/dist/chunks/adapter-m948ab5f.js +4 -0
- package/dist/chunks/{cf-account-picker-882a7ecm.js → cf-account-picker-n8hr38v7.js} +3 -3
- package/dist/chunks/cf-settings-356xdtne.js +4 -0
- package/dist/chunks/components-yk3t844e.js +4 -0
- package/dist/chunks/content-source-bawmyc09.js +4 -0
- package/dist/chunks/{convert-to-repeater-grfep2w8.js → convert-to-repeater-7wns8kf1.js} +3 -3
- package/dist/chunks/editor-6sc8nacq.js +4 -0
- package/dist/chunks/entry-commands-8ay9fh81.js +4 -0
- package/dist/chunks/{extension-sections-dp8endhx.js → extension-sections-na7rj3nr.js} +3 -3
- package/dist/chunks/file-ops-gye0qw56.js +4 -0
- package/dist/chunks/files-dmc2xvcq.js +4 -0
- package/dist/chunks/format-host-t76b53f8.js +4 -0
- package/dist/chunks/fs-events-cg4tpz06.js +4 -0
- package/dist/chunks/git-panel-yef7bshy.js +4 -0
- package/dist/chunks/{grid-view-5amhg604.js → grid-view-7tt4bxw1.js} +6 -6
- package/dist/chunks/iframe-host-tmz30gfp.js +4 -0
- package/dist/chunks/{index-9ydfe04y.js → index-gybvv7a6.js} +3 -3
- package/dist/chunks/index-nag78a9h.js +4 -0
- package/dist/chunks/{javascript-d9pqgc2p.js → javascript-rnvdp3k4.js} +2 -2
- package/dist/chunks/{jsonMode-800yvbem.js → jsonMode-zhwsprqk.js} +5 -5
- package/dist/chunks/jx-validate-3gbp5nkn.js +4 -0
- package/dist/chunks/layers-fvz99859.js +4 -0
- package/dist/chunks/layers-panel-gchmbf9p.js +4 -0
- package/dist/chunks/lit-html-9agdspkt.js +4 -0
- package/dist/chunks/media-picker-rhjvyy00.js +4 -0
- package/dist/chunks/menu-2e4y9j7b.js +4 -0
- package/dist/chunks/{monaco-binding-62dtmgbf.js → monaco-binding-2jnhjjvr.js} +3 -3
- package/dist/chunks/monaco-buffer-rp21359g.js +4 -0
- package/dist/chunks/{monaco-setup-tj13ndtm.js → monaco-setup-vhh7gayr.js} +3 -3
- package/dist/chunks/notify-h3www560.js +4 -0
- package/dist/chunks/platform-hz34wcd7.js +4 -0
- package/dist/chunks/publish-panel-exsmjzyj.js +4 -0
- package/dist/chunks/quick-search-pgaqeh0m.js +4 -0
- package/dist/chunks/references-2cgdxnb8.js +4 -0
- package/dist/chunks/right-panel-jf856w5w.js +4 -0
- package/dist/chunks/section-registry-jnf8r5gy.js +4 -0
- package/dist/chunks/studio-0f55h9ye.js +5 -0
- package/dist/chunks/{studio-hjbg8d5y.js → studio-0sqdhnew.js} +7 -7
- package/dist/chunks/{studio-1wvfxkyy.js → studio-0x3jyb8r.js} +4 -4
- package/dist/chunks/{studio-yr04mv2j.js → studio-19x1c75w.js} +4 -4
- package/dist/chunks/{studio-evwgp1ym.js → studio-2sqcndak.js} +4 -4
- package/dist/chunks/{studio-cvbkkfqb.js → studio-3aey7dd3.js} +4 -4
- package/dist/chunks/{studio-888knnkc.js → studio-3bpdkq2s.js} +4 -4
- package/dist/chunks/{studio-ceb34dxj.js → studio-47y6fbpf.js} +4 -4
- package/dist/chunks/{studio-c6w3tq7t.js → studio-4m3826v2.js} +4 -4
- package/dist/chunks/studio-4nx2dj1g.js +4 -0
- package/dist/chunks/{studio-p7c1agz0.js → studio-4xv5s47r.js} +5 -5
- package/dist/chunks/{studio-sxc0zvpt.js → studio-5g0ag7c0.js} +3 -3
- package/dist/chunks/{studio-semd1s8s.js → studio-5g4t8v6w.js} +4 -4
- package/dist/chunks/studio-5py436sf.js +5 -0
- package/dist/chunks/{studio-aje966s9.js → studio-77kt594t.js} +4 -4
- package/dist/chunks/{studio-56z7evx4.js → studio-8f87n763.js} +6 -6
- package/dist/chunks/studio-8mb00b84.js +5 -0
- package/dist/chunks/studio-8p51gq2h.js +6 -0
- package/dist/chunks/studio-954ds834.js +5 -0
- package/dist/chunks/{studio-xta2vxp6.js → studio-9ft45c83.js} +6 -6
- package/dist/chunks/studio-a2138x5k.js +7 -0
- package/dist/chunks/studio-a9yzstqj.js +5 -0
- package/dist/chunks/{studio-gp02nqnw.js → studio-acdksxx6.js} +4 -4
- package/dist/chunks/{studio-edbtvcd1.js → studio-anyrgzvb.js} +4 -4
- package/dist/chunks/{studio-dkn3x3hz.js → studio-ar8jcf2y.js} +4 -4
- package/dist/chunks/{studio-xry7tk3z.js → studio-bmn4mn9j.js} +5 -5
- package/dist/chunks/{studio-03wwfvyt.js → studio-cpxkgjrj.js} +4 -4
- package/dist/chunks/{studio-spf2skgc.js → studio-e7xxa0sj.js} +4 -4
- package/dist/chunks/{studio-01qza1n3.js → studio-ecaz25vk.js} +4 -4
- package/dist/chunks/{studio-5e9zsamh.js → studio-fzdywr6p.js} +6 -6
- package/dist/chunks/{studio-65fhspdd.js → studio-g5fmf0c1.js} +4 -4
- package/dist/chunks/studio-g7nse7zb.js +5 -0
- package/dist/chunks/studio-geq1ea6k.js +14 -0
- package/dist/chunks/{studio-n78gjfy8.js → studio-ghkb32r8.js} +4 -4
- package/dist/chunks/{studio-222rqyyc.js → studio-ghrhy2y7.js} +4 -4
- package/dist/chunks/{studio-a7xqhc3n.js → studio-grawhey1.js} +4 -4
- package/dist/chunks/{studio-eh0rac07.js → studio-h0xgswew.js} +4 -4
- package/dist/chunks/{studio-wma2c6g8.js → studio-h9c4p2tx.js} +4 -4
- package/dist/chunks/studio-jyzj5cxs.js +5 -0
- package/dist/chunks/{studio-x92tgnee.js → studio-mgx8yhnz.js} +31 -31
- package/dist/chunks/{studio-0scebvb9.js → studio-mpb04y1d.js} +5 -5
- package/dist/chunks/{studio-xy3tv3az.js → studio-n17mty64.js} +4 -4
- package/dist/chunks/{studio-gfn1kpxj.js → studio-nwh2eqsk.js} +5 -5
- package/dist/chunks/{studio-nt06yybj.js → studio-pxg4ap1e.js} +3 -3
- package/dist/chunks/{studio-zpnk016a.js → studio-q1h883bt.js} +5 -5
- package/dist/chunks/{studio-c6zdm25z.js → studio-q4tv82h7.js} +6 -6
- package/dist/chunks/{studio-st75kn99.js → studio-qbj760tx.js} +5 -5
- package/dist/chunks/{studio-y7jehjrp.js → studio-qpqa7vk3.js} +4 -4
- package/dist/chunks/{studio-j6gnhvaa.js → studio-qqz8e5gk.js} +4 -4
- package/dist/chunks/{studio-skzanb0k.js → studio-qvasen3f.js} +4 -4
- package/dist/chunks/studio-rggdb3hm.js +5 -0
- package/dist/chunks/{studio-4xppwncr.js → studio-sghy936h.js} +3 -3
- package/dist/chunks/{studio-9mqfamps.js → studio-skprc6ef.js} +4 -4
- package/dist/chunks/{studio-1x8x26k3.js → studio-tt2nactf.js} +4 -4
- package/dist/chunks/{studio-54g077x3.js → studio-txjjzrsm.js} +5 -5
- package/dist/chunks/{studio-f195h2hq.js → studio-tyasmc39.js} +4 -4
- package/dist/chunks/{studio-0bbxhhce.js → studio-v2bvmbjj.js} +4 -4
- package/dist/chunks/{studio-pwqfmt4p.js → studio-vk9ezads.js} +4 -4
- package/dist/chunks/{studio-fqq890ap.js → studio-vzacdfsc.js} +3 -3
- package/dist/chunks/{studio-zd4kayn2.js → studio-w4c0xmrw.js} +4 -4
- package/dist/chunks/{studio-tw7rre6s.js → studio-wfjqhhbk.js} +4 -4
- package/dist/chunks/{studio-tp642n5g.js → studio-wgh5kxpj.js} +4 -4
- package/dist/chunks/studio-xasj0796.js +5 -0
- package/dist/chunks/{studio-tzegmy4w.js → studio-y78s8r2n.js} +4 -4
- package/dist/chunks/{studio-7pgy3xaf.js → studio-z8w183sh.js} +4 -4
- package/dist/chunks/{studio-01kbbqg3.js → studio-zscd9ty4.js} +124 -124
- package/dist/chunks/{studio-mwxgyn9h.js → studio-zxp13sss.js} +6 -6
- package/dist/chunks/{studio-r3kaka4d.js → studio-zygnmm01.js} +4 -4
- package/dist/chunks/{tsMode-k9s9fcag.js → tsMode-gr0m4dzr.js} +5 -5
- package/dist/chunks/workspace-m15qtcqp.js +4 -0
- package/dist/chunks/{ws-client-0ja08haa.js → ws-client-nf61frr1.js} +3 -3
- package/dist/iframe-entry.js +3 -3
- package/dist/manifest.json +62 -62
- package/dist/studio.js +83 -83
- package/package.json +11 -11
- package/src/new-project/add-repo-modal.ts +459 -59
- package/src/platforms/cloud.ts +95 -18
- package/src/publish/pages-service.ts +7 -0
- package/src/publish/publish-panel.ts +16 -2
- package/src/surfaces/add-repo.json +721 -224
- package/src/surfaces/add-repo.ts +196 -31
- package/src/types.ts +42 -3
- package/src/ui/schema-form.ts +6 -2
- package/src/utils/project-dir.ts +24 -0
- package/dist/chunks/adapter-y5gdq19c.js +0 -4
- package/dist/chunks/cf-settings-20dznc3j.js +0 -4
- package/dist/chunks/components-q037dya7.js +0 -4
- package/dist/chunks/content-source-37x3vsap.js +0 -4
- package/dist/chunks/editor-j5sq149q.js +0 -4
- package/dist/chunks/entry-commands-c5h3nqck.js +0 -4
- package/dist/chunks/file-ops-937cvqk6.js +0 -4
- package/dist/chunks/files-tznwe1p1.js +0 -4
- package/dist/chunks/format-host-e2pjvd25.js +0 -4
- package/dist/chunks/fs-events-fv64ak3s.js +0 -4
- package/dist/chunks/git-panel-gb713ttc.js +0 -4
- package/dist/chunks/iframe-host-t819mcg5.js +0 -4
- package/dist/chunks/index-m0x5ztax.js +0 -4
- package/dist/chunks/jx-validate-zc9zp77s.js +0 -4
- package/dist/chunks/layers-4bsr82wz.js +0 -4
- package/dist/chunks/layers-panel-b6shnaax.js +0 -4
- package/dist/chunks/lit-html-cfn61dn7.js +0 -4
- package/dist/chunks/media-picker-ej0kdh1j.js +0 -4
- package/dist/chunks/menu-rtxf9chb.js +0 -4
- package/dist/chunks/monaco-buffer-nn4dtx27.js +0 -4
- package/dist/chunks/notify-ahs57a2z.js +0 -4
- package/dist/chunks/platform-v9xyfkbx.js +0 -4
- package/dist/chunks/publish-panel-bq36xcmj.js +0 -4
- package/dist/chunks/quick-search-zm00h9dh.js +0 -4
- package/dist/chunks/references-99ws0b0m.js +0 -4
- package/dist/chunks/right-panel-pq2f71q3.js +0 -4
- package/dist/chunks/section-registry-b2yzp9sw.js +0 -4
- package/dist/chunks/studio-0k9mvpgj.js +0 -14
- package/dist/chunks/studio-1a99w39s.js +0 -5
- package/dist/chunks/studio-693nhyky.js +0 -5
- package/dist/chunks/studio-aqmph6k4.js +0 -5
- package/dist/chunks/studio-c9d3pxf7.js +0 -5
- package/dist/chunks/studio-cxt150pj.js +0 -7
- package/dist/chunks/studio-e6re3rk1.js +0 -5
- package/dist/chunks/studio-frb0qbf7.js +0 -6
- package/dist/chunks/studio-gh97gngt.js +0 -5
- package/dist/chunks/studio-nbxqcgvf.js +0 -5
- package/dist/chunks/studio-t1eedsyx.js +0 -4
- package/dist/chunks/studio-vavmwshr.js +0 -5
- package/dist/chunks/studio-xk0z6msk.js +0 -5
- package/dist/chunks/workspace-b69mgm0e.js +0 -4
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{_t,Lr,qr,Hu}from"./studio-semd1s8s.js";function Rf(){return Lr(_t.cfToken)}function $_(t){qr(_t.cfToken,t||"")}function D_(){return Lr(_t.cfAccountId)}function h$(t){qr(_t.cfAccountId,t||"")}function A_(){Hu([_t.cfToken,_t.cfAccountId])}
|
|
2
|
-
export{Rf,$_,D_,h$,A_};
|
|
3
|
-
|
|
4
|
-
//# debugId=35E77CC9D5BD485E64756E2164756E21
|
|
5
|
-
//# sourceMappingURL=studio-1a99w39s.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
function u(t){let n=t.replaceAll("\\","/");return n.length>1&&n.endsWith("/")?n.slice(0,-1):n}function a(t){let n=u(t);return n.startsWith("/")?n:`/${n}`}function p(t,n){return[...t].toSorted((e,s)=>s[n].length-e[n].length)}function f(t,n){return t===n||t.startsWith(`${n}/`)}function SI(t,n){let e=u(n);for(let s of p(t,"dir")){let r=u(s.dir);if(!f(e,r)||e===r)continue;let o=e.slice(r.length+1).split("/").map((l)=>encodeURIComponent(l)).join("/");return`${a(s.urlPrefix)}/${o}`}return null}function g(t,n){let e=n.split("#")[0].split("?")[0];if(!e.startsWith("/"))return null;let s;try{s=decodeURIComponent(e)}catch{return null}if(/%2e|%2f/i.test(s))return null;for(let r of p(t,"urlPrefix")){let i=a(r.urlPrefix);if(!s.startsWith(`${i}/`))continue;let l=s.slice(i.length+1).split("/");if(l.some((c)=>c===""||c==="."||c===".."))return null;return`${u(r.dir)}/${l.join("/")}`}return null}var d=String.raw`"'\s<>()\\`;var Np="public";var EI=["mounts","public"];function Nv(t){let n=t.search(/[#?]/);return n===-1?{path:t,suffix:""}:{path:t.slice(0,n),suffix:t.slice(n)}}function Sk(t){return t===""||t.startsWith("/")||t.startsWith("#")||t.includes("${")||/^[a-z][\w+.-]*:/i.test(t)}function di(t){return t.replaceAll("\\","/").replace(/^\.\//,"").replace(/^\/+/,"").replace(/\/+$/,"")}function TI(t){let n=di(t),e=n.lastIndexOf("/");return e===-1?"":n.slice(0,e)}function Ek(t,n){let s=(t===""||t==="."?[]:di(t).split("/")).filter((r)=>r!==""&&r!==".");for(let r of n.replaceAll("\\","/").split("/")){if(r===""||r===".")continue;if(r===".."){if(s.length===0)return null;s.pop();continue}s.push(r)}return s.join("/")}function h(t,n,e){let{path:s}=Nv(t);if(!s.startsWith("/"))return[];let r;try{r=decodeURIComponent(s)}catch{return[]}if(/%2e|%2f/i.test(r))return[];let i=r.replace(/^\/+/,"");if(i===""||i.split("/").some((l)=>l==="."||l===".."))return[];let o=[];for(let l of e){if(l==="mounts"){let c=g(n,s);if(c!==null&&!c.startsWith("/")&&!/^[A-Za-z]:/.test(c))o.push(di(c));continue}o.push(l==="root"?i:`${Np}/${i}`)}return[...new Set(o)]}function LI(t,n,e,s){let{path:r}=Nv(t);if(r==="")return null;if(Sk(t))return r.startsWith("/")?h(r,e,s)[0]??null:null;if(r.endsWith("/"))return null;let i;try{i=decodeURIComponent(r)}catch{return null}let o=Ek(n,i);if(o===null||o===""||o===di(n))return null;return o}function Ov(t){return t.split("/").map((n)=>encodeURIComponent(n)).join("/")}function II(t){let n=[],e=0;while(e<t.length){while(e<t.length&&(/\s/.test(t[e])||t[e]===","))e+=1;if(e>=t.length)break;let s=e;while(e<t.length&&!/\s/.test(t[e]))e+=1;let r=t.slice(s,e);if(r.endsWith(",")){n.push({descriptor:"",url:r.replace(/,+$/,"")});continue}while(e<t.length&&/\s/.test(t[e]))e+=1;let i=e;while(e<t.length&&t[e]!==",")e+=1;let o=t.slice(i,e).trim();if(e+=1,r=r.replace(/,+$/,""),r!=="")n.push({descriptor:o,url:r})}return n}function RI(t){return t.map(({url:n,descriptor:e})=>e?`${n} ${e}`:n).join(", ")}
|
|
2
|
-
export{SI,Np,EI,Nv,Sk,di,TI,Ek,LI,Ov,II,RI};
|
|
3
|
-
|
|
4
|
-
//# debugId=523D6F44C843B17C64756E2164756E21
|
|
5
|
-
//# sourceMappingURL=studio-693nhyky.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{un,rn,ne}from"./studio-0k9mvpgj.js";import{p}from"./studio-y7jehjrp.js";import{Tr}from"./studio-222rqyyc.js";import{v}from"./studio-fqq890ap.js";import{rt,zt,T,R,An,Ct}from"./studio-spf2skgc.js";import{gd,YE,Zf,P1,ZE,ca,rp}from"./studio-cxt150pj.js";import{Rf,$_}from"./studio-1a99w39s.js";import{D}from"./studio-tp642n5g.js";import{me}from"./studio-0bbxhhce.js";var P={$schema:"https://jxsuite.com/schema/v1",$id:"StudioPublish",$description:"Publish: the one-click Cloudflare Pages flow, as a `jx-dialog` over the kit. Eight bodies, one at a time, because the reader is at exactly one point of a chain — a host that cannot reach Cloudflare at all, a question still in flight, a connection that lapsed, an invitation to connect, a stored token Cloudflare refused, a field to paste a replacement into, the create-and-connect form, and the connected status. `publish/publish-panel.ts` keeps every one of those decisions and the calls that settle them; this document knows only which of the eight it was told to draw. **The token is never painted.** The field below binds no `value` — it is written by the reader and read once, on its way to storage — so a stored secret cannot reach the attribute, the serialised HTML or the accessibility tree, which is `studio.md` §15 rule 1 written as a missing binding rather than as a rule somebody remembers.",tagName:"jx-dialog",$props:{headline:"Publish",confirmLabel:"",cancelLabel:"Close",size:"md"},attributes:{part:"publish"},oncancel:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},onclose:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/closed"},value:[]}]},style:{$description:"What the five `.publish-*` names carried, keyed on `part`, and most of them do not survive the move. `.publish-modal` and its `.new-project-modal` base were a fixed card, a scroll body, a border, a shadow and a `z-index: 1000` — a modal `<dialog>` is every one of those, and the top layer is what the z-index was climbing towards. `.publish-field` was a label stacked over a control, which is `jx-field`'s whole shape. What is left is the column gap between bodies, the two button rows, the hint and the refusal. Nothing here uses `--spectrum-*`: those custom properties resolve only inside `<sp-theme>`, and a document mounted in a layer host is outside it, so each would silently have taken its hard-coded fallback.",'& [part="body"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-3)"},'& [part="note"], & [part="status-line"], & [part="deployment"]':{margin:"0",lineHeight:"1.5"},'& [part="rows"]':{display:"flex",flexDirection:"column",gap:"var(--jx-space-3)"},'& [part="actions"]':{$description:'Wraps rather than overflows (studio-ui-guidelines.md §4.6): two buttons whose labels are whole phrases — "Verify & Connect", "Preferences › Accounts" — are wider than a narrow dialog at the sizes a reader may have set.',display:"flex",flexWrap:"wrap",gap:"var(--jx-space-2)"},'& [part="submit"]':{alignSelf:"flex-start"},'& [part="hint"]':{$description:"Publishing rides every commit, so the connected body's only job is to say what is already happening. Dim, because it is a standing fact rather than something to act on.",margin:"0",color:"var(--fg-dim)",fontSize:"var(--jx-text-sm)"},'& [part="failure"]':{$description:'`failure` and not `error`: `jx-textfield` and `jx-select` each draw a `[part="error"]` of their own inside this same tree, and the kit is light DOM — a scoped rule on that name would restyle the token field\'s refusal line too.',margin:"0",color:"var(--danger)",lineHeight:"1.5"},'& [part="link"], & [part="install-link"]':{color:"var(--accent)",textDecoration:"underline"},"& code":{fontFamily:"var(--font-mono)",fontSize:"var(--jx-text-sm)"}},children:[{tagName:"div",attributes:{part:"body"},children:[{tagName:"div",attributes:{part:"body-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/body"},cases:{unsupported:{tagName:"p",attributes:{part:"note"},children:["This platform cannot reach the Cloudflare API. Publish by committing and pushing — your host builds ",{tagName:"code",textContent:"bunx jx build"}," and serves ",{tagName:"code",textContent:"dist/"},"."]},loading:{tagName:"p",attributes:{part:"note"},textContent:"Checking Cloudflare connection…"},lapsed:{tagName:"div",attributes:{part:"lapsed",role:"none"},style:{display:"contents"},children:[{tagName:"p",attributes:{part:"note"},textContent:"Your Cloudflare connection has expired, so publishing cannot reach your account. Reconnect to restore it — this site's Pages project and its settings are untouched."},{tagName:"jx-button",$props:{variant:"accent",disabled:{$ref:"#/state/busy"}},attributes:{part:"reconnect"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/connect"},value:[]}]},children:[{tagName:"span",textContent:"${state.connectLabel}"}]}]},hosted:{tagName:"div",attributes:{part:"hosted",role:"none"},style:{display:"contents"},children:[{tagName:"p",attributes:{part:"note"},textContent:"Connect your Cloudflare account to publish this site."},{tagName:"jx-button",$props:{disabled:{$ref:"#/state/busy"}},attributes:{part:"connect"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/connect"},value:[]}]},children:[{tagName:"span",textContent:"Connect Cloudflare"}]}]},stored:{tagName:"div",attributes:{part:"stored",role:"none"},style:{display:"contents"},children:[{tagName:"p",attributes:{part:"note"},textContent:"A Cloudflare API token is stored on this machine, and Cloudflare did not accept it. It may have been revoked, or it may be missing the Account Settings Read and Pages Read/Write permissions."},{tagName:"div",attributes:{part:"actions"},children:[{tagName:"jx-button",$props:{disabled:{$ref:"#/state/busy"}},attributes:{part:"replace"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/replace"},value:[]}]},children:[{tagName:"span",textContent:"Replace token"}]},{tagName:"jx-button",$props:{quiet:!0},attributes:{part:"accounts"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openAccounts"},value:[]}]},children:[{tagName:"span",textContent:"Preferences › Accounts"}]}]}]},token:{tagName:"div",attributes:{part:"token-form",role:"none"},style:{display:"contents"},children:[{tagName:"p",attributes:{part:"note"},textContent:"Paste a Cloudflare API token (permissions: Account Settings Read, Pages Read/Write). It is stored on this machine and only sent to the same-origin proxy — Studio never renders it back."},{tagName:"jx-field",$props:{span:!0,label:"API token"},attributes:{part:"token-row","data-field":"token"},children:[{tagName:"jx-textfield",$description:"No `value` binding, and its absence is the contract: a secret may pass through a field the reader typed it into and may never be painted into one they did not. The draft lives in the adapter's closure until Verify reads it, so nothing here — not the attribute, not the accessibility tree, not a DOM dump — has ever held it.",$props:{type:"password",placeholder:"cf_..."},attributes:{part:"token"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setToken"},value:[{$ref:"event#/target/value"}]}]}}]},{tagName:"div",attributes:{part:"actions"},children:[{tagName:"jx-button",$props:{variant:"accent",disabled:{$ref:"#/state/busy"}},attributes:{part:"verify"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/verify"},value:[]}]},children:[{tagName:"span",textContent:"Verify & Connect"}]},{tagName:"jx-button",$props:{quiet:!0},attributes:{part:"accounts"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/openAccounts"},value:[]}]},children:[{tagName:"span",textContent:"Preferences › Accounts"}]}]}]},form:{tagName:"div",attributes:{part:"connect-form",role:"none"},style:{display:"contents"},children:[{tagName:"p",attributes:{part:"note"},children:["Create a Cloudflare Pages project connected to this repository. Every commit then builds and publishes automatically (",{tagName:"code",textContent:"bunx jx build"},")."]},{tagName:"div",attributes:{part:"rows"},children:[{tagName:"jx-field",$props:{span:!0,label:"Account"},attributes:{part:"row","data-field":"account"},children:[{tagName:"jx-select",$props:{options:{$ref:"#/state/accountOptions"},value:{$ref:"#/state/accountId"}},attributes:{part:"account"},onchange:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setAccount"},value:[{$ref:"event#/target/value"}]}]}}]},{tagName:"jx-field",$props:{span:!0,label:"Pages project name"},attributes:{part:"row","data-field":"projectName"},children:[{tagName:"jx-textfield",$props:{value:{$ref:"#/state/projectName"}},attributes:{part:"project-name"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setProjectName"},value:[{$ref:"event#/target/value"}]}]}}]},{tagName:"jx-field",$props:{span:!0,label:"GitHub owner"},attributes:{part:"row","data-field":"owner"},children:[{tagName:"jx-textfield",$props:{value:{$ref:"#/state/owner"}},attributes:{part:"owner"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setOwner"},value:[{$ref:"event#/target/value"}]}]}}]},{tagName:"jx-field",$props:{span:!0,label:"GitHub repository"},attributes:{part:"row","data-field":"repo"},children:[{tagName:"jx-textfield",$props:{value:{$ref:"#/state/repo"}},attributes:{part:"repo"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setRepo"},value:[{$ref:"event#/target/value"}]}]}}]},{tagName:"jx-field",$props:{span:!0,label:"Production branch"},attributes:{part:"row","data-field":"branch"},children:[{tagName:"jx-textfield",$props:{value:{$ref:"#/state/branch"}},attributes:{part:"branch"},oninput:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/setBranch"},value:[{$ref:"event#/target/value"}]}]}}]}]},{tagName:"jx-button",$props:{variant:"accent",disabled:{$ref:"#/state/busy"}},attributes:{part:"submit"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/submit"},value:[]}]},children:[{tagName:"span",textContent:"${state.submitLabel}"}]}]},status:{tagName:"div",attributes:{part:"status",role:"none"},style:{display:"contents"},children:[{tagName:"p",attributes:{part:"status-line"},children:["Connected to Pages project ",{tagName:"strong",attributes:{part:"project-name"},textContent:"${state.deployProject}"},{tagName:"span",attributes:{part:"site-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasProductionUrl"},cases:{true:{tagName:"span",children:[" — ",{tagName:"a",attributes:{part:"link",href:"${state.productionUrl}",target:"_blank",rel:"noreferrer"},textContent:"${state.productionUrl}"}]}}}]},{tagName:"div",attributes:{part:"deployment-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasDeployment"},cases:{true:{tagName:"p",attributes:{part:"deployment"},children:["Latest deployment: ",{tagName:"strong",attributes:{part:"deployment-state"},textContent:"${state.deploymentState}"}," (${state.deploymentEnvironment}) — ",{tagName:"a",attributes:{part:"link",href:"${state.deploymentUrl}",target:"_blank",rel:"noreferrer"},textContent:"preview"}]},false:{tagName:"p",attributes:{part:"deployment"},textContent:"No deployments yet — the first commit after connecting triggers one."}}},{tagName:"p",attributes:{part:"hint"},textContent:"Publishing happens automatically on every commit."},{tagName:"div",attributes:{part:"actions"},children:[{tagName:"jx-button",$props:{disabled:{$ref:"#/state/busy"}},attributes:{part:"refresh"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/refresh"},value:[]}]},children:[{tagName:"span",textContent:"Refresh"}]},{tagName:"jx-button",$props:{variant:"negative",disabled:{$ref:"#/state/busy"}},attributes:{part:"disconnect"},onclick:{$prototype:"Function",body:[{operator:"call",target:{$ref:"#/state/disconnect"},value:[]}]},children:[{tagName:"span",textContent:"Disconnect"}]}]}]}}},{tagName:"div",attributes:{part:"failure-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/hasFailure"},cases:{true:{tagName:"p",attributes:{part:"failure"},children:["${state.failure}",{tagName:"span",attributes:{part:"pages-app-slot",role:"none"},style:{display:"contents"},$switch:{$ref:"#/state/needsPagesApp"},cases:{true:{tagName:"span",children:[" — if the Cloudflare Pages GitHub App is not installed on the repository, ",{tagName:"a",attributes:{part:"install-link",href:"${state.pagesAppUrl}",target:"_blank",rel:"noreferrer"},textContent:"install it"}," and retry."]}}}]}}}]}]};T("publish",P);var S="https://github.com/apps/cloudflare-pages/installations/new";function F(e){if(!e.supported)return"unsupported";if(e.loading)return"loading";if(e.connected&&e.lapsed)return"lapsed";if(!e.connected){if(e.hosted)return"hosted";return e.tokenStored&&!e.replacing?"stored":"token"}return e.deploy?"status":"form"}function w(e){let{error:t}=e;return{accountId:e.form.accountId,accountOptions:e.accounts,body:F(e),branch:e.form.branch,busy:e.busy,connectLabel:e.busy?"Reconnecting…":"Reconnect Cloudflare",deploymentEnvironment:e.deployment?.environment??"",deploymentState:e.deployment?`${e.deployment.stage}: ${e.deployment.status}`:"",deploymentUrl:e.deployment?.url??"",deployProject:e.deploy?.projectName??"",failure:t,hasDeployment:e.deployment!==null,hasFailure:t!=="",hasProductionUrl:(e.deploy?.productionUrl??"")!=="",needsPagesApp:/github/i.test(t)&&/app|install|source|repo/i.test(t),owner:e.form.owner,pagesAppUrl:S,productionUrl:e.deploy?.productionUrl??"",projectName:e.form.projectName,repo:e.form.repo,submitLabel:e.busy?"Connecting…":"Create & Connect"}}function C(e){let t=document.createElement("div");t.style.pointerEvents="auto",e.layer.append(t);let l="",g=!1,N=()=>{if(g)return;g=!0,e.onClosed()},d=v({...w(e.view),closed:N,connect:()=>{e.onConnect()},disconnect:()=>{e.onDisconnect()},openAccounts:()=>{e.onOpenAccounts()},refresh:()=>{e.onRefresh()},replace:()=>{l="",e.onReplaceToken()},setAccount:(o)=>{d.accountId=o,e.onField("accountId",o)},setBranch:(o)=>{d.branch=o,e.onField("branch",o)},setOwner:(o)=>{d.owner=o,e.onField("owner",o)},setProjectName:(o)=>{d.projectName=o,e.onField("projectName",o)},setRepo:(o)=>{d.repo=o,e.onField("repo",o)},setToken:(o)=>{l=o},submit:()=>{e.onSubmit()},verify:()=>{let o=l;l="",e.onSaveToken(o)}}),b=null,k=R("publish",d,t).then(async(o)=>{b=o;let u=o.root;if(g)return o.dispose(),u;if(await An(u),g)return u;return(u.querySelector('dialog[part="dialog"]')??u).setAttribute(rt,zt("modal","publish")),un(u),u});return{close(){let o=b?.root;if(o instanceof HTMLElement)rn(o);b?.dispose(),b=null,l="",t.remove(),N()},host:t,ready:k,update(o){Object.assign(d,w(o))}}}var m=null,s="loading",f=[],i=null,a="",c=!1,h=!1,n={accountId:"",branch:"main",owner:"",projectName:"",repo:""};function x(){return D?.projectConfig??null}function I(e){return e.toLowerCase().replaceAll(/[^a-z0-9]+/g,"-").replaceAll(/^-+|-+$/g,"").slice(0,58)||"site"}function H(){let e=p().projectRoot,t=/^([\w.-]+)\/([\w.-]+)(?:@.+)?$/.exec(e);return t?{owner:t[1],repo:t[2]}:{owner:"",repo:""}}function L(){let e=ca();return e?{productionUrl:e.productionUrl??"",projectName:e.projectName}:null}function j(){let e=gd(),t=s==="loading"?null:s;return{accounts:f.map((l)=>({label:l.name,value:l.id})),busy:c,connected:t?.connected===!0,deploy:L(),deployment:i?{environment:i.environment,stage:i.stage,status:i.status,url:i.url}:null,error:a,form:{...n},hosted:e&&typeof p().cfConnect==="function",lapsed:t?.connected===!0&&t.needsReconnect===!0,loading:s==="loading",replacing:h,supported:e,tokenStored:Rf()!==""}}function r(){if(m){m.update(j());return}m=C({layer:Ct("modal"),onClosed:V,onConnect:()=>{O()},onDisconnect:()=>{M()},onField:(e,t)=>{n={...n,[e]:t}},onOpenAccounts:E,onRefresh:()=>{y()},onReplaceToken:()=>{h=!0,a="",r()},onSaveToken:(e)=>{U(e)},onSubmit:()=>{_()},view:j()})}async function y(){s="loading",r();try{if(s=await p().cfConnection?.()??null,s?.connected&&!s.needsReconnect){f=await YE(),n={...n,accountId:s.accountId??f[0]?.id??""};let e=ca();if(e)i=await Zf(e),rp(i)}}catch(e){s=null,a=e instanceof Error?e.message:String(e)}r()}async function U(e){let t=e.trim();if(!t){a="Paste a token, or use Preferences › Accounts to forget the stored one.",r();return}$_(t),h=!1,a="",await y()}function E(){ne()?.run("app.preferences",{section:"accounts"})}async function O(){c=!0,a="",r();try{let e=await p().cfConnect?.()??null;if(e?.status==="timeout")a="The Cloudflare window didn't finish. Sign in there, then reconnect — nothing was changed.";else if(e?.status==="connected"&&!e.connection.accountId){let{openCfAccountPicker:t}=await (me("882a7ecm"),import("./cf-account-picker-882a7ecm.js"));await t()}}catch(e){a=e instanceof Error?e.message:String(e)}c=!1,Tr(),await y()}async function _(){let e=x();if(!e)return;if(!n.projectName||!n.owner||!n.repo||!n.accountId){a="Account, project name, and the GitHub owner/repo are all required.",r();return}c=!0,a="",r();try{let t=await ZE(e,{accountId:n.accountId,owner:n.owner,productionBranch:n.branch||"main",projectName:n.projectName,repo:n.repo});i=await Zf(t).catch(()=>null)}catch(t){a=t instanceof Error?t.message:String(t)}c=!1,r()}async function M(){let e=x();if(!e)return;c=!0,r();try{await P1(e,null),i=null}catch(t){a=t instanceof Error?t.message:String(t)}c=!1,r()}function V(){let e=m;m=null,e?.close()}function __(e){s={accountId:e.accountId??"demo-account",connected:!0},f=[],i=e.deployment,rp(e.deployment),a="",c=!1,h=!1,r()}function u$(){let e=x(),{owner:t,repo:l}=H();s="loading",f=[],i=null,a="",c=!1,h=!1,n={accountId:"",branch:"main",owner:t,projectName:ca()?.projectName??I(e?.name??""),repo:l},r(),y()}
|
|
2
|
-
export{__,u$};
|
|
3
|
-
|
|
4
|
-
//# debugId=86CB7ADEC271EE1764756E2164756E21
|
|
5
|
-
//# sourceMappingURL=studio-c9d3pxf7.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{p}from"./studio-y7jehjrp.js";import{lp}from"./studio-222rqyyc.js";import{ge,Q,v,Hm}from"./studio-fqq890ap.js";import{ne}from"./studio-0k9mvpgj.js";import{T,R}from"./studio-spf2skgc.js";import{Bi,y}from"./studio-zpnk016a.js";import{D}from"./studio-tp642n5g.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 YE(){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 Zf(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 P1(e,t){let o={...e.build};if(t===null)delete o.deploy;else o.deploy=t;if(await Bi({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 ZE(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 P1(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=Hm({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 XE(){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 QE(e){let t=e.querySelector("[data-deploy-checklist]");if(!t){u();return}f(t,F)}
|
|
4
|
-
export{gd,YE,Zf,P1,ZE,ca,rp,XE,QE};
|
|
5
|
-
|
|
6
|
-
//# debugId=32A006FBA9B78D4764756E2164756E21
|
|
7
|
-
//# sourceMappingURL=studio-cxt150pj.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{qu}from"./studio-cvbkkfqb.js";import{gb}from"./studio-65fhspdd.js";import{D}from"./studio-tp642n5g.js";function c(){return Object.keys(D?.projectConfig?.content??{})}function Tw(e){let n=gb(e);if(!n)return null;if(/\.[a-z\d]+$/i.test(n.dir))return null;return{def:n.def,dir:n.dir,ext:n.ext,name:n.name,schema:n.def.schema??null}}function cb(){return c().map((e)=>Tw(e)).filter((e)=>e!==null)}function sa(e){let n=qu(e??null,D?.projectConfig);return n?Tw(n.name):null}function u(e){if(e===null||typeof e!=="object")return e;return JSON.parse(JSON.stringify(e))}function l(e){if(typeof e.$ref==="string")return"";switch(e.type){case"boolean":return!1;case"integer":case"number":return 0;case"array":return[];case"object":return y1(e);default:return""}}function y1(e){let n=e?.properties;if(!n)return{};let i=new Set(Array.isArray(e?.required)?e.required:[]),t={};for(let[r,o]of Object.entries(n))if(o.default!==void 0)t[r]=u(o.default);else if(i.has(r))t[r]=l(o);return t}function CE(e,n){return(Array.isArray(e?.required)?e.required:[]).filter((t)=>n[t]===void 0)}
|
|
2
|
-
export{Tw,cb,sa,y1,CE};
|
|
3
|
-
|
|
4
|
-
//# debugId=33EF567F57BD535C64756E2164756E21
|
|
5
|
-
//# sourceMappingURL=studio-e6re3rk1.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{p}from"./studio-y7jehjrp.js";import{K,D}from"./studio-tp642n5g.js";import{th}from"./studio-1x8x26k3.js";import{nt,Pv}from"./studio-nbxqcgvf.js";async function xb(e,s){let o=p();if(!o.codeService)return null;return o.codeService(e,s)}var gc=new Map;async function _b(e,s){let o=e.$prototype?D?.projectConfig?.imports?.[e.$prototype]:null,t=e.$src||o;if(!t||!e.$prototype)return null;let r=`${t}::${e.$prototype}`;if(gc.has(r))return gc.get(r);try{let n=p();if(!n.fetchPluginSchema)return gc.set(r,null),null;let i=!o&&s.documentPath?`${location.origin}/${s.documentPath}`:void 0,a=await n.fetchPluginSchema(t,e.$prototype,i);return gc.set(r,a),a}catch{return gc.set(r,null),null}}function M1(e,s){let o=e.getModel();if(!o)return;let t=th();if(!t)return;let r=s.map((n)=>{let i=n.labels?.[0];if(!i)return null;let{line:a,column:l,length:c}=i.span;return{code:n.url?{target:t.Uri.parse(n.url),value:n.code}:n.code,endColumn:l+(c||1),endLineNumber:a,message:n.message+(n.help?`
|
|
2
|
-
${n.help}`:""),severity:n.severity==="error"?t.MarkerSeverity.Error:t.MarkerSeverity.Warning,source:"oxlint",startColumn:l,startLineNumber:a}}).filter(Boolean);t.editor.setModelMarkers(o,"oxlint",r)}function UE(e,s){let o=(t)=>{if(!nt(t))return null;let r=t.parameters;if(!Array.isArray(r)||r.length===0)return null;return Pv(r)};if(e.type==="def"){let t=e.defName?o(s?.state?.[e.defName]):null;if(t)return t}else if(e.type==="event"){if(!s||!e.path)return["state","event"];let t=K(s,e.path),r=t&&e.eventKey?o(t[e.eventKey]):null;if(r)return r}return["state","event"]}
|
|
3
|
-
export{xb,gc,_b,M1,UE};
|
|
4
|
-
|
|
5
|
-
//# debugId=602B7A9B1AEF7FB564756E2164756E21
|
|
6
|
-
//# sourceMappingURL=studio-frb0qbf7.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{h1,p1,f1}from"./studio-54g077x3.js";import{p,We}from"./studio-y7jehjrp.js";import{Rf,D_,A_}from"./studio-1a99w39s.js";import{tT,kb,da,lT,Tr,Ba,Tb}from"./studio-222rqyyc.js";import{me}from"./studio-0bbxhhce.js";var t="checking",i=null;function Bg(){return We()&&Boolean(p().cfConnect)}async function If(){if(!Bg())return;i??=(async()=>{try{t=await p().cfConnection?.()??null}catch{t=null}i=null,qh()})(),await i}function NS(){if(Bg()&&t==="checking"&&!i)If()}function OS(){t="checking",i=null}async function d(){let n=await p().cfConnect?.();if(n?.status==="connected"&&!n.connection.accountId){let{openCfAccountPicker:e}=await (me("882a7ecm"),import("./cf-account-picker-882a7ecm.js"));await e()}Tr(),await If()}function s(){let n={id:"disconnect",label:"Disconnect",run:async()=>{await p().cfDisconnect?.(),Tr(),await If()},variant:"negative"},e=(r)=>({id:r==="Connect"?"connect":"reconnect",label:r,run:d,variant:"accent"}),o={id:"cloudflare",label:"Cloudflare",revoke:()=>{}};if(t==="checking")return{...o,actions:[],connected:!1,detail:"Checking your connection…"};if(!t?.connected)return{...o,actions:[e("Connect")],connected:!1,detail:"Not connected. Connecting publishes this site and runs the assistant on Workers AI."};let c=()=>{n.run()};if(t.needsReconnect)return{...o,actions:[e("Reconnect"),n],connected:!0,detail:"Connection expired. Reconnect to keep publishing and the assistant working.",revoke:c};if(t.needsAccount||!t.accountId)return{...o,actions:[{id:"choose-account",label:"Choose account",run:async()=>{let{openCfAccountPicker:r}=await (me("882a7ecm"),import("./cf-account-picker-882a7ecm.js"));if(await r())Tr(),await If()},variant:"accent"},n],connected:!0,detail:"Connected, but no account is chosen yet — publishing and the assistant need one.",revoke:c};return{...o,actions:[n],connected:!0,detail:`Connected — ${t.accountName??t.accountId}.`,revoke:c}}function l(){let n=Rf(),e=D_();return{connected:Boolean(n),detail:n?`Connected${e?` — account ${e}`:""}.`:"Not connected. Publishing will ask when it needs it.",id:"cloudflare",label:"Cloudflare",revoke:A_}}function u(n){let e={id:n.id,label:n.label,run:async()=>{await Tb(n)}};if(n.primary)e.variant="accent";return e}function f(n){return{actions:(n.actions??[]).map((e)=>u(e)),connected:n.connected??!1,detail:n.detail,id:`platform:${n.id}`,label:n.label,revoke:()=>{}}}function R_(){let n=h1(),e=Ba(),o=da();return[{id:"github",label:"GitHub",detail:n?p1()==="desktop"?"Signed in — the token is in this app's config folder, readable only by you.":"Signed in — a device-flow token is stored in this browser.":"Not signed in. Cloning and pushing will ask when they need it.",connected:Boolean(n),revoke:f1},{id:"ai",label:"AI provider",detail:kb()?`Key stored. Model ${e}${o?` via ${o}`:""}.`:"No key stored. The Assistant section is where one is entered.",connected:kb(),revoke:lT},Bg()?s():l(),...tT().map((c)=>f(c))]}function MS(n){let e=R_().find((o)=>o.id===n);if(!e)return!1;return e.revoke(),qh(),!0}var a=new Set;function PS(n){return a.add(n),()=>{a.delete(n)}}function qh(){for(let n of a)n()}
|
|
2
|
-
export{Bg,If,NS,OS,R_,MS,PS,qh};
|
|
3
|
-
|
|
4
|
-
//# debugId=6D43ADF227123C3264756E2164756E21
|
|
5
|
-
//# sourceMappingURL=studio-gh97gngt.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
function nt(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function Ot(e){return nt(e)&&typeof e.$ref==="string"}function Za(e){return nt(e)&&e.$prototype==="Function"}function ba(e){return nt(e)&&nt(e.$expression)}function Mv(e){return ba(e)&&Array.isArray(e.parameters)&&e.parameters.length>0}function Tk(e){return Za(e)&&Array.isArray(e.body)}function Lk(e){return nt(e)&&typeof e.$prototype==="string"&&e.$prototype!=="Function"}function Ik(e){return nt(e)&&e.timing==="server"&&typeof e.$src==="string"&&typeof e.$export==="string"&&!e.$prototype}function Vx(e){return nt(e)&&e.$prototype==="Array"}function Ks(e){return typeof e==="string"&&e.includes("${")}function Rk(e){return/\breturn\b[^\S\n]*(?![;}\s]|$)/.test(e)}function ih(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function va(e,n){let t=e?.[n];return ih(t)?t:void 0}function oh(e,n){let t=e[n];if(ih(t))return t;let r={};return e[n]=r,r}function rh(e){return Ot(e)||Za(e)||ba(e)}function Op(e,n){let t=e[n];return rh(t)?t:void 0}function Pv(e){if(!e)return[];return e.map((n)=>typeof n==="string"?n:n.name)}function Hd(e){if(!nt(e)||!nt(e.$expression))return!1;let n=e.$expression;if(n.operator==="?:")return typeof n.value==="string"&&typeof n.initial==="string";if(n.operator==="switch")return nt(n.cases)&&Object.values(n.cases).every((t)=>typeof t==="string")&&typeof n.default==="string";return!1}function $k(e){if(typeof e==="string")return[e];if(!Hd(e))return[];let n=e.$expression;if(n.operator==="?:")return[...new Set([n.value,n.initial])];return[...new Set([...Object.values(n.cases),n.default])]}function qe(e){return typeof e==="string"?e:$k(e).join("|")}function Mp(e){return e.startsWith("#")}
|
|
2
|
-
export{nt,Ot,Za,ba,Mv,Tk,Lk,Ik,Vx,Ks,Rk,ih,va,oh,rh,Op,Pv,Hd,$k,qe,Mp};
|
|
3
|
-
|
|
4
|
-
//# debugId=DBCFD34E007C461F64756E2164756E21
|
|
5
|
-
//# sourceMappingURL=studio-nbxqcgvf.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var e=new Map,r=new Set;function o(){for(let t of r)t()}function ja(){o()}function db(t){return r.add(t),()=>{r.delete(t)}}function cs(t){e.set(t.key,t),o()}function x1(t){if(e.delete(t))o()}function Vf(){return[...e.values()].toSorted((t,s)=>t.order-s.order)}function Lw(){return Vf().map((t)=>t.key)}function Iw(t){return e.get(t)}var i=null,n="overview";function ub(){if(i!==null&&e.has(i))return n=i,i=null,n;if(e.has(n))return n;return Lw()[0]??n}function hb(t){if(e.has(t))n=t,i=null;else i=t;o()}export{ja,db,cs,x1,Vf,Lw,Iw,ub,hb};
|
|
2
|
-
|
|
3
|
-
//# debugId=2A602E1D78BE302464756E2164756E21
|
|
4
|
-
//# sourceMappingURL=studio-t1eedsyx.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{p}from"./studio-y7jehjrp.js";import{di}from"./studio-693nhyky.js";import{Ir}from"./studio-888knnkc.js";import{Gi,up,pL,fL}from"./studio-c6w3tq7t.js";var r=new Map,d=new Map,a=new Map;function l(e,t){let n=pL(e),i=a.get(e);return{bytes:typeof t?.size==="number"?t.size:null,ext:Gi(n),height:i?.height??null,kind:up({name:n}),modified:t?.modified??null,name:n,path:e,width:i?.width??null}}function sb(e){return r.get(di(e))??null}function bE(e){for(let t of e){if(t.type!=="file")continue;let n=di(t.path);if(!r.has(n))r.set(n,l(n,t))}}async function vE(e){let t=di(e),n=r.get(t);if(n)return n;let i=d.get(t);if(i)return i;let o=(async()=>{let u;try{u=(await Ir(()=>p().listDirectory(fL(t)))).find((f)=>di(f.path)===t)}catch{u=void 0}return l(t,u)})();d.set(t,o);let s=await o;return d.delete(t),r.set(t,s),s}function ab(e,t,n){if(!(t>0&&n>0))return!1;let i=di(e),o=a.get(i);if(o&&o.width===t&&o.height===n)return!1;a.set(i,{height:n,width:t});let s=r.get(i);if(s)r.set(i,{...s,height:n,width:t});return!0}function yE(){r.clear(),a.clear()}function m1(e){if(e<1024)return`${e} B`;if(e<1048576)return`${Math.round(e/1024)} KB`;return`${(e/1048576).toFixed(1)} MB`}function wE(e){if(!e)return"";let t=[];if(e.width!==null&&e.height!==null)t.push(`${e.width} × ${e.height}`);if(e.bytes!==null)t.push(m1(e.bytes));return t.join(" · ")}
|
|
2
|
-
export{sb,bE,vE,ab,yE,m1,wE};
|
|
3
|
-
|
|
4
|
-
//# debugId=4F04E6D76DE7569064756E2164756E21
|
|
5
|
-
//# sourceMappingURL=studio-xk0z6msk.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Qn,vp,ZC,m,u,Rr,Hn,Gu,$r,yp,Ox,Mx,Pl,wp,xp,_p,Ku,Ua,Cp,Sc,No,Fl,Px,kv,XC,Fx,QC,ek,ci,Cm,Sv,tk}from"./studio-cvbkkfqb.js";import"./studio-7pgy3xaf.js";import"./studio-1x8x26k3.js";import"./studio-y7jehjrp.js";import"./studio-fqq890ap.js";export{ZC as MAX_PANES,Qn as PRIMARY_PANE,vp as SECONDARY_PANE,ci as activateTab,Rr as activePane,u as activeTab,QC as closeAllTabs,wp as closePane,Fx as closeTab,_p as detachTab,$r as focusPane,Ku as insertIntoPane,yp as isPaneFocused,Cp as isTabActive,XC as moveTab,Cm as moveTabToPane,No as openTab,Mx as paneBeside,Hn as paneById,xp as paneIsEmpty,Gu as paneOfTab,Px as promoteDirtyPreviewTabs,Fl as promoteTab,Pl as receivingPane,tk as registerTabCommands,Sv as renameTab,ek as replaceAllTabs,kv as setTabPinned,Ua as setWorkspaceProject,Ox as splitRight,Sc as tabIsLive,m as workspace};
|
|
2
|
-
|
|
3
|
-
//# debugId=1D3E7F0FC61927CE64756E2164756E21
|
|
4
|
-
//# sourceMappingURL=workspace-b69mgm0e.js.map
|