@stacksjs/stx 0.2.406 → 0.2.407
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/app-service-worker.d.ts +120 -0
- package/dist/chunk-00g9x6w2.js +2 -0
- package/dist/chunk-02g67164.js +2 -0
- package/dist/chunk-04tgatyy.js +2 -0
- package/dist/{chunk-4g4yz97f.js → chunk-0a315nbf.js} +3 -3
- package/dist/{chunk-zwb8wv5p.js → chunk-0akydm2d.js} +1 -1
- package/dist/{chunk-tfy07tmv.js → chunk-0btmm4m2.js} +1 -1
- package/dist/{chunk-g0w8dyat.js → chunk-0c2h69k2.js} +1 -1
- package/dist/{chunk-aa4ss5pb.js → chunk-0pkk226n.js} +1 -1
- package/dist/{chunk-6de3hczw.js → chunk-0we9nw1d.js} +1 -1
- package/dist/chunk-178n9c40.js +2 -0
- package/dist/{chunk-2r399td7.js → chunk-1fs9jvpb.js} +1 -1
- package/dist/chunk-1hc58sh2.js +2 -0
- package/dist/chunk-1q4jrkhw.js +2 -0
- package/dist/chunk-1qembpzh.js +2 -0
- package/dist/chunk-1qq26zt0.js +2 -0
- package/dist/{chunk-7q06md6v.js → chunk-1te8k8gp.js} +1 -1
- package/dist/{chunk-jw6s8rkk.js → chunk-1ws3xcea.js} +2 -2
- package/dist/{chunk-z9a0ft6h.js → chunk-213jwgpx.js} +1 -1
- package/dist/{chunk-1yvx8s3v.js → chunk-26r88x1t.js} +2 -2
- package/dist/{chunk-k4x5we49.js → chunk-27fgag95.js} +2 -2
- package/dist/chunk-2c6t60vw.js +2 -0
- package/dist/{chunk-x7qyx7vn.js → chunk-2fw05hs2.js} +1 -1
- package/dist/{chunk-0seyntda.js → chunk-38wvkv3s.js} +1 -1
- package/dist/chunk-3w6z6tw9.js +2 -0
- package/dist/chunk-3za7m29m.js +2 -0
- package/dist/{chunk-ypw4egcv.js → chunk-4m7ajama.js} +1 -1
- package/dist/{chunk-g81ymdat.js → chunk-4zcbj36p.js} +2 -2
- package/dist/{chunk-yh9apppb.js → chunk-50pszj17.js} +1 -1
- package/dist/{chunk-59pakqdv.js → chunk-563shnkz.js} +2 -2
- package/dist/{chunk-h1yb87ep.js → chunk-5r4s9s38.js} +2 -2
- package/dist/chunk-603x5gb2.js +2 -0
- package/dist/{chunk-afwbqeb2.js → chunk-6jrczd12.js} +2 -2
- package/dist/{chunk-abs56gdt.js → chunk-6kd5jjwc.js} +1 -1
- package/dist/{chunk-ewxbx67c.js → chunk-6kdrncsx.js} +1 -1
- package/dist/{chunk-pkspqh0m.js → chunk-72rwcbp6.js} +1 -1
- package/dist/{chunk-4m4n1sfc.js → chunk-76w34xne.js} +1 -1
- package/dist/chunk-7ypm243n.js +2 -0
- package/dist/{chunk-z80v5h5h.js → chunk-8036mdat.js} +2 -2
- package/dist/{chunk-46zx4pt8.js → chunk-82pd4b5w.js} +1 -1
- package/dist/chunk-8ds7rrdc.js +2 -0
- package/dist/chunk-8w2mqdnv.js +2 -0
- package/dist/chunk-8x05b790.js +2 -0
- package/dist/{chunk-pqhpcxsd.js → chunk-90b2vt2n.js} +1 -1
- package/dist/{chunk-arjhs9bb.js → chunk-920779jx.js} +2 -2
- package/dist/chunk-934eeghd.js +2 -0
- package/dist/{chunk-245ft0zp.js → chunk-9e8t0twa.js} +1 -1
- package/dist/{chunk-wpsx5avz.js → chunk-9fqp72ze.js} +1 -1
- package/dist/chunk-9wze2290.js +2 -0
- package/dist/{chunk-dj658wyq.js → chunk-9xew0kgf.js} +1 -1
- package/dist/{chunk-ca57sg6v.js → chunk-akwd34xt.js} +2 -2
- package/dist/{chunk-rqr735w8.js → chunk-anydpa34.js} +1 -1
- package/dist/{chunk-ffdxdgep.js → chunk-aq1xq0r4.js} +2 -2
- package/dist/{chunk-9dap2hdv.js → chunk-avaywwsc.js} +2 -2
- package/dist/{chunk-36rnwhn2.js → chunk-bbt3tp6f.js} +1 -1
- package/dist/{chunk-n4197kjq.js → chunk-bjar18jd.js} +1 -1
- package/dist/{chunk-twg0y6ga.js → chunk-bjcsc6wx.js} +1 -1
- package/dist/{chunk-akzmq0jr.js → chunk-bn1edb1y.js} +2 -2
- package/dist/{chunk-503wfstj.js → chunk-btd7ds3x.js} +1 -1
- package/dist/{chunk-8mm86z5w.js → chunk-bwsxym3d.js} +1 -1
- package/dist/{chunk-c1f1vtjt.js → chunk-cj3adc77.js} +1 -1
- package/dist/{chunk-sjc7x8y1.js → chunk-cqchpe34.js} +396 -165
- package/dist/chunk-ct1jwd4r.js +2 -0
- package/dist/{chunk-znt6t1dz.js → chunk-ej16bgrr.js} +2 -2
- package/dist/{chunk-2c23jad1.js → chunk-esq1k7fj.js} +2 -2
- package/dist/{chunk-ayhhvep9.js → chunk-f6s7d1jq.js} +2 -2
- package/dist/{chunk-bds4s9d8.js → chunk-fcnrgxck.js} +1 -1
- package/dist/chunk-fphs5g19.js +2 -0
- package/dist/{chunk-stdkw5st.js → chunk-fpwzacpm.js} +1 -1
- package/dist/chunk-gbmeh7jg.js +3 -0
- package/dist/{chunk-81zw5vw5.js → chunk-gc06g35w.js} +1 -1
- package/dist/{chunk-rctgq5xp.js → chunk-gcvj5zdy.js} +3 -3
- package/dist/{chunk-1nnskved.js → chunk-gengvwb7.js} +3 -3
- package/dist/{chunk-63dyh42m.js → chunk-gjrgr367.js} +2 -2
- package/dist/{chunk-69c5rv6n.js → chunk-gna6dc48.js} +169 -169
- package/dist/{chunk-pyyccs6a.js → chunk-gvbf1mhs.js} +1 -1
- package/dist/chunk-h1r17awz.js +2 -0
- package/dist/chunk-ha46rg9g.js +2 -0
- package/dist/chunk-hcvjstmr.js +2 -0
- package/dist/{chunk-a01sf1sc.js → chunk-hdysywd8.js} +1 -1
- package/dist/{chunk-55g4qm7m.js → chunk-hx998w7n.js} +1 -1
- package/dist/chunk-j3r97xs5.js +2 -0
- package/dist/chunk-j5qeaprt.js +2 -0
- package/dist/chunk-jxvmf02k.js +2 -0
- package/dist/{chunk-8t3h7fsk.js → chunk-k80sn8d1.js} +1 -1
- package/dist/chunk-kajym1cx.js +2 -0
- package/dist/{chunk-f02g2h4p.js → chunk-kbwhs5df.js} +2 -2
- package/dist/{chunk-4n6ekt06.js → chunk-kmsyvaex.js} +1 -1
- package/dist/{chunk-4tsjysng.js → chunk-kvmx7dnb.js} +1 -1
- package/dist/{chunk-s1gwy2rp.js → chunk-m072c38p.js} +2 -2
- package/dist/{chunk-jpnja3jy.js → chunk-mgrckqww.js} +1 -1
- package/dist/{chunk-971yqxa2.js → chunk-mq5ewmz6.js} +1 -1
- package/dist/{chunk-sptvg80e.js → chunk-mrahwn5v.js} +1 -1
- package/dist/{chunk-vyq86x5c.js → chunk-n2swas11.js} +1 -1
- package/dist/{chunk-zgzzn9qk.js → chunk-n9cqrw9j.js} +1 -1
- package/dist/{chunk-3sea73fx.js → chunk-naw4jt7j.js} +1 -1
- package/dist/{chunk-1n2ng8nx.js → chunk-ny67c03k.js} +1 -1
- package/dist/chunk-p0m4ty6g.js +2 -0
- package/dist/chunk-p32x2apf.js +2 -0
- package/dist/{chunk-8bg1qmhg.js → chunk-p4zrvt5f.js} +1 -1
- package/dist/{chunk-0tnsyynz.js → chunk-p5wp0ce6.js} +2 -2
- package/dist/{chunk-mywrb5fy.js → chunk-pcxp4r9n.js} +1 -1
- package/dist/{chunk-me7ypzw9.js → chunk-pdfjy3at.js} +2 -2
- package/dist/chunk-pjrn29gg.js +2 -0
- package/dist/chunk-q738pwv6.js +2 -0
- package/dist/{chunk-w6n5c479.js → chunk-qmmp5kb5.js} +1 -1
- package/dist/{chunk-015p3jq5.js → chunk-qn5srnj3.js} +1 -1
- package/dist/{chunk-1vrk5y92.js → chunk-qvnbnsv9.js} +1 -1
- package/dist/{chunk-z8zmp74b.js → chunk-rt3cx932.js} +1025 -58
- package/dist/{chunk-7ba7x6jt.js → chunk-rz9f3zqz.js} +2 -2
- package/dist/{chunk-dxjtszaa.js → chunk-s8jd13nb.js} +1 -1
- package/dist/{chunk-qem2tw9r.js → chunk-s9za1vvd.js} +1 -1
- package/dist/{chunk-r909bddf.js → chunk-spxsw4mp.js} +1 -1
- package/dist/chunk-ssn5k77d.js +2 -0
- package/dist/chunk-sy9pfe3h.js +2 -0
- package/dist/{chunk-0nhpymyy.js → chunk-t1htzg9e.js} +1 -1
- package/dist/{chunk-rkzfwgr8.js → chunk-t1tdjjht.js} +1 -1
- package/dist/{chunk-1x6c4ys1.js → chunk-t5ja7qkn.js} +131 -34
- package/dist/{chunk-rx0cntdm.js → chunk-td08rnk3.js} +2 -2
- package/dist/chunk-tgadbsd4.js +2 -0
- package/dist/{chunk-xakdgn9h.js → chunk-tgrpp58r.js} +1 -1
- package/dist/{chunk-pgeh4g3a.js → chunk-tkyrk66a.js} +1 -1
- package/dist/chunk-tpcmn119.js +2 -0
- package/dist/{chunk-0n054h7w.js → chunk-v3nwkveg.js} +1 -1
- package/dist/{chunk-83tefmh1.js → chunk-vsbmc9kt.js} +1 -1
- package/dist/{chunk-qcpnfw0k.js → chunk-vx86cf4r.js} +1 -1
- package/dist/{chunk-yn8qq8tn.js → chunk-w6hqh4z5.js} +2 -2
- package/dist/{chunk-k3wcezqg.js → chunk-w9n12yzf.js} +3 -3
- package/dist/chunk-wkanrfb3.js +2 -0
- package/dist/chunk-wvegegmb.js +2 -0
- package/dist/{chunk-seqmzr8k.js → chunk-xq1acw1r.js} +1 -1
- package/dist/{chunk-vtjegbgy.js → chunk-xsng1mtq.js} +1 -1
- package/dist/chunk-xv9bhvye.js +12 -0
- package/dist/{chunk-gyccx2pr.js → chunk-z52f4zcy.js} +2 -2
- package/dist/{chunk-vtmhh3dp.js → chunk-z5rwnnk1.js} +2 -2
- package/dist/{chunk-m8bdy2wt.js → chunk-zcz9rs6p.js} +1 -1
- package/dist/{chunk-1phxzej9.js → chunk-zpcnbdhn.js} +2 -2
- package/dist/{chunk-wxkn47vk.js → chunk-zq4ssxj9.js} +1 -1
- package/dist/cli.js +14 -14
- package/dist/composables/index.d.ts +10 -1
- package/dist/composables/index.js +6 -1
- package/dist/composables/use-cached-query.d.ts +18 -0
- package/dist/composables/use-cached-query.js +27 -0
- package/dist/composables/use-offline.d.ts +18 -0
- package/dist/composables/use-offline.js +17 -0
- package/dist/composables/use-outbox.d.ts +19 -27
- package/dist/composables/use-outbox.js +100 -16
- package/dist/composables/use-query.d.ts +2 -0
- package/dist/composables/use-storage.d.ts +7 -3
- package/dist/composables/use-storage.js +22 -13
- package/dist/craft-entry.js +1 -1
- package/dist/craft.js +1 -1
- package/dist/database.js +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.js +5 -0
- package/dist/offline/app-service-worker.d.ts +61 -13
- package/dist/offline/app-service-worker.js +398 -58
- package/dist/offline/kept-store.d.ts +67 -0
- package/dist/offline/kept-store.js +252 -0
- package/dist/offline/query-cache.d.ts +137 -0
- package/dist/offline/query-cache.js +260 -0
- package/dist/pwa.js +2 -2
- package/dist/runtime-globals.js +3 -0
- package/dist/signals.js +123 -24
- package/dist/ssg.js +2 -2
- package/dist/stx-module.d.ts +3 -0
- package/dist/stx.d.ts +48 -1
- package/dist/unresolved-identifiers.js +2 -0
- package/dist/visual-testing.js +1 -1
- package/package.json +5 -5
- package/stx-module.d.ts +3 -0
- package/stx.d.ts +48 -1
- package/dist/chunk-4hqaxar9.js +0 -2
- package/dist/chunk-4md4tj27.js +0 -3
- package/dist/chunk-53x9hrx3.js +0 -2
- package/dist/chunk-5e2d3grq.js +0 -2
- package/dist/chunk-5s44f83p.js +0 -2
- package/dist/chunk-62btdm51.js +0 -2
- package/dist/chunk-68gspceh.js +0 -2
- package/dist/chunk-6cbjhg0y.js +0 -2
- package/dist/chunk-8vg5tpts.js +0 -2
- package/dist/chunk-b26mjv83.js +0 -2
- package/dist/chunk-bmfg13wx.js +0 -2
- package/dist/chunk-ccct2hsa.js +0 -2
- package/dist/chunk-d8yksesg.js +0 -2
- package/dist/chunk-db6fm81v.js +0 -2
- package/dist/chunk-emx4ey5d.js +0 -2
- package/dist/chunk-gxc02n32.js +0 -2
- package/dist/chunk-hch1t137.js +0 -2
- package/dist/chunk-jc5kqj3t.js +0 -2
- package/dist/chunk-jqm6tbtb.js +0 -2
- package/dist/chunk-k6vz8455.js +0 -2
- package/dist/chunk-m7b67r66.js +0 -12
- package/dist/chunk-mtata78t.js +0 -2
- package/dist/chunk-n1yz08j4.js +0 -2
- package/dist/chunk-nsese4as.js +0 -2
- package/dist/chunk-pqskmpz0.js +0 -2
- package/dist/chunk-qa333652.js +0 -2
- package/dist/chunk-qcbn5mrw.js +0 -2
- package/dist/chunk-sgmqfphy.js +0 -2
- package/dist/chunk-wj66sab5.js +0 -2
- package/dist/chunk-wqgyb4zb.js +0 -2
- package/dist/chunk-wszdgqe3.js +0 -2
- package/dist/chunk-wz7ca99x.js +0 -2
- package/dist/chunk-xqz9dqef.js +0 -2
- package/dist/chunk-xvsz1qy3.js +0 -2
- package/dist/chunk-xw23twxw.js +0 -2
- package/dist/chunk-xz870mf2.js +0 -2
- package/dist/chunk-y3cz15x3.js +0 -2
- package/dist/chunk-yf0v44v8.js +0 -2
- package/dist/chunk-zawdn9z8.js +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Bv as H,Fv as q,Hv as b,Zu as Y,kv as y,zv as A}from"./chunk-bn1edb1y.js";import M from"path";class S{source;pos=0;line=1;column=0;tokens=[];constructor(K){this.source=K}tokenize(){this.tokens=[],this.pos=0,this.line=1,this.column=0;while(this.pos<this.source.length){let K=this.nextToken();if(K)this.tokens.push(K)}return this.tokens.push({type:"EOF",value:"",start:this.pos,end:this.pos,line:this.line,column:this.column}),this.tokens}nextToken(){if(this.pos>=this.source.length)return null;let K=this.pos,Q=this.line,Z=this.column,$=this.source[this.pos];if(/\s/.test($))return this.readWhitespace(K,Q,Z);if($==="/"&&this.peek(1)==="/")return this.readLineComment(K,Q,Z);if($==="/"&&this.peek(1)==="*")return this.readBlockComment(K,Q,Z);if($==='"'||$==="'")return this.readString($,K,Q,Z);if($==="`")return this.readTemplateString(K,Q,Z);if(/\d/.test($)||$==="."&&/\d/.test(this.peek(1)||""))return this.readNumber(K,Q,Z);if(/[a-z_$]/i.test($))return this.readIdentifier(K,Q,Z);if($==="{"){if(this.peek(1)==="{"&&this.peek(2)==="{")return this.advance(3),{type:"RAW_START",value:"{{{",start:K,end:this.pos,line:Q,column:Z};if(this.peek(1)==="{")return this.advance(2),{type:"EXPRESSION_START",value:"{{",start:K,end:this.pos,line:Q,column:Z};if(this.peek(1)==="!"&&this.peek(2)==="!")return this.advance(3),{type:"RAW_START",value:"{!!",start:K,end:this.pos,line:Q,column:Z}}if($==="}"){if(this.peek(1)==="}"&&this.peek(2)==="}")return this.advance(3),{type:"RAW_END",value:"}}}",start:K,end:this.pos,line:Q,column:Z};if(this.peek(1)==="}")return this.advance(2),{type:"EXPRESSION_END",value:"}}",start:K,end:this.pos,line:Q,column:Z}}if($==="!"&&this.peek(1)==="!"&&this.peek(2)==="}")return this.advance(3),{type:"RAW_END",value:"!!}",start:K,end:this.pos,line:Q,column:Z};if($==="@"&&/[a-z]/i.test(this.peek(1)||""))return this.readDirective(K,Q,Z);let z=["===","!==","==","!=","<=",">=","&&","||","??","++","--","+=","-=","*=","/=","%=","**","=>","?.","...","<<",">>",">>>","&=","|=","^="];for(let j of z)if(this.source.slice(this.pos,this.pos+j.length)===j)return this.advance(j.length),{type:"OPERATOR",value:j,start:K,end:this.pos,line:Q,column:Z};if(/[+\-*/%<>=!&|^~?:]/.test($))return this.advance(),{type:"OPERATOR",value:$,start:K,end:this.pos,line:Q,column:Z};if(/[()[\]{},;.]/.test($))return this.advance(),{type:"PUNCTUATION",value:$,start:K,end:this.pos,line:Q,column:Z};return this.advance(),{type:"PUNCTUATION",value:$,start:K,end:this.pos,line:Q,column:Z}}readWhitespace(K,Q,Z){while(this.pos<this.source.length&&/\s/.test(this.source[this.pos]))this.advance();return{type:"WHITESPACE",value:this.source.slice(K,this.pos),start:K,end:this.pos,line:Q,column:Z}}readLineComment(K,Q,Z){this.advance(2);while(this.pos<this.source.length&&this.source[this.pos]!==`
|
|
3
3
|
`)this.advance();return{type:"COMMENT",value:this.source.slice(K,this.pos),start:K,end:this.pos,line:Q,column:Z}}readBlockComment(K,Q,Z){this.advance(2);while(this.pos<this.source.length-1){if(this.source[this.pos]==="*"&&this.source[this.pos+1]==="/"){this.advance(2);break}this.advance()}return{type:"COMMENT",value:this.source.slice(K,this.pos),start:K,end:this.pos,line:Q,column:Z}}readString(K,Q,Z,$){this.advance();while(this.pos<this.source.length){let z=this.source[this.pos];if(z==="\\"){this.advance(2);continue}if(z===K){this.advance();break}this.advance()}return{type:"STRING",value:this.source.slice(Q,this.pos),start:Q,end:this.pos,line:Z,column:$}}readTemplateString(K,Q,Z){this.advance();let $=0,z=256;while(this.pos<this.source.length){let j=this.source[this.pos];if(j==="\\"){this.advance(2);continue}if(j==="$"&&this.peek(1)==="{"){if($>=z){this.pos=this.source.length;break}this.advance(2),$++;continue}if(j==="{"&&$>0){$++,this.advance();continue}if(j==="}"&&$>0){$--,this.advance();continue}if(j==="`"&&$===0){this.advance();break}this.advance()}return{type:"TEMPLATE_STRING",value:this.source.slice(K,this.pos),start:K,end:this.pos,line:Q,column:Z}}readNumber(K,Q,Z){if(this.source[this.pos]==="0"){let $=this.peek(1)?.toLowerCase();if($==="x"||$==="o"||$==="b"){this.advance(2);while(this.pos<this.source.length&&/[\da-f_]/i.test(this.source[this.pos]))this.advance();return{type:"NUMBER",value:this.source.slice(K,this.pos),start:K,end:this.pos,line:Q,column:Z}}}while(this.pos<this.source.length&&/[\d_]/.test(this.source[this.pos]))this.advance();if(this.source[this.pos]==="."&&/\d/.test(this.peek(1)||"")){this.advance();while(this.pos<this.source.length&&/[\d_]/.test(this.source[this.pos]))this.advance()}if(/e/i.test(this.source[this.pos]||"")){if(this.advance(),/[+-]/.test(this.source[this.pos]||""))this.advance();while(this.pos<this.source.length&&/[\d_]/.test(this.source[this.pos]))this.advance()}if(this.source[this.pos]==="n")this.advance();return{type:"NUMBER",value:this.source.slice(K,this.pos),start:K,end:this.pos,line:Q,column:Z}}readIdentifier(K,Q,Z){while(this.pos<this.source.length&&/[\w$]/.test(this.source[this.pos]))this.advance();return{type:"IDENTIFIER",value:this.source.slice(K,this.pos),start:K,end:this.pos,line:Q,column:Z}}readDirective(K,Q,Z){this.advance();while(this.pos<this.source.length&&/[a-z]/i.test(this.source[this.pos]))this.advance();return{type:"DIRECTIVE",value:this.source.slice(K,this.pos),start:K,end:this.pos,line:Q,column:Z}}advance(K=1){for(let Q=0;Q<K&&this.pos<this.source.length;Q++){if(this.source[this.pos]===`
|
|
4
4
|
`)this.line++,this.column=0;else this.column++;this.pos++}}peek(K){return this.source[this.pos+K]}saveState(){return{pos:this.pos,line:this.line,column:this.column}}restoreState(K){this.pos=K.pos,this.line=K.line,this.column=K.column}}function D(K,Q,Z,$=0){let z=0,j=$,J=null,W=0,X=!1;while(j<K.length){let B=K[j];if(J&&X){X=!1,j++;continue}if(J&&B==="\\"){X=!0,j++;continue}if(X=!1,(B==='"'||B==="'"||B==="`")&&!J){J=B,j++;continue}if(B===J&&J!=="`"){J=null,j++;continue}if(J==="`"&&B==="$"&&K[j+1]==="{"){W++,j+=2;continue}if(W>0&&B==="}"){W--,j++;continue}if(B==="`"&&J==="`"&&W===0){J=null,j++;continue}if(J){j++;continue}if(B===Q)z++;else if(B===Z){if(z--,z===0)return j}j++}return-1}function g(K,Q){let Z=Q,$={paren:0,bracket:0,brace:0},z=null,j=0;while(Z<K.length){let J=K[Z];if((Z>0?K[Z-1]:"")==="\\"&&z){Z++;continue}if((J==='"'||J==="'")&&!z){z=J,Z++;continue}if(J===z&&z!=="`"){z=null,Z++;continue}if(J==="`"&&!z){z="`",Z++;continue}if(J==="`"&&z==="`"&&j===0){z=null,Z++;continue}if(z==="`"&&J==="$"&&K[Z+1]==="{"){j++,Z+=2;continue}if(j>0){if(J==="{")j++;else if(J==="}")j--;Z++;continue}if(z){Z++;continue}if($.paren===0&&$.bracket===0&&$.brace===0){if(K.slice(Z,Z+2)==="}}"||K.slice(Z,Z+3)==="!!}")break;if(J===","||J===";")break}if(J==="(")$.paren++;else if(J===")"){if($.paren--,$.paren<0)break}else if(J==="[")$.bracket++;else if(J==="]"){if($.bracket--,$.bracket<0)break}else if(J==="{")$.brace++;else if(J==="}"){if($.brace--,$.brace<0)break}Z++}return{expression:K.slice(Q,Z),endPos:Z}}function l(K){let Q=[],Z="",$={paren:0,bracket:0,brace:0},z=null,j=0;for(let J=0;J<K.length;J++){let W=K[J];if((J>0?K[J-1]:"")==="\\"&&z){Z+=W;continue}if((W==='"'||W==="'")&&!z){z=W,Z+=W;continue}if(W===z&&z!=="`"){z=null,Z+=W;continue}if(W==="`"&&!z){z="`",Z+=W;continue}if(W==="`"&&z==="`"&&j===0){z=null,Z+=W;continue}if(z==="`"&&W==="$"&&K[J+1]==="{"){j++,Z+=W+K[J+1],J++;continue}if(j>0&&W==="{"){j++,Z+=W;continue}if(j>0&&W==="}"){j--,Z+=W;continue}if(z){Z+=W;continue}if(W==="(")$.paren++;else if(W===")")$.paren--;else if(W==="[")$.bracket++;else if(W==="]")$.bracket--;else if(W==="{")$.brace++;else if(W==="}")$.brace--;if(W==="|"&&K[J+1]!=="|"&&(J===0||K[J-1]!=="|")&&K[J-1]!=="\\"&&$.paren===0&&$.bracket===0&&$.brace===0){Q.push(Z.trim()),Z="";continue}if(W==="|"&&K[J-1]==="\\"&&!z){Z=Z.slice(0,-1)+W;continue}Z+=W}if(Z.trim())Q.push(Z.trim());return Q}function C(K,Q){let Z=[];Q.lastIndex=0;let $;while(($=Q.exec(K))!==null){let z=$.index,j=z+$[0].length-1,J=D(K,"(",")",j);if(J===-1){Z.push({start:z,end:-1,args:"",call:K.slice(z,Math.min(K.length,z+80))}),Q.lastIndex=j+1;continue}Z.push({start:z,end:J+1,args:K.slice(j+1,J),call:K.slice(z,J+1)}),Q.lastIndex=J+1}return Z}function w(K,Q,Z,$){let z="",j=0;for(let J of C(K,Q)){if(z+=K.slice(j,J.start),J.end===-1){z+=$(J.call),j=J.start;continue}z+=Z(J.args,J.call),j=J.end}return z+K.slice(j)}function k(K){let Q=[],Z=0,$=null,z="";for(let j=0;j<K.length;j++){let J=K[j];if($){if(z+=J,J==="\\"&&j+1<K.length){z+=K[++j];continue}if(J===$)$=null;continue}if(J==="'"||J==='"'||J==="`")$=J;else if(J==="("||J==="["||J==="{")Z++;else if(J===")"||J==="]"||J==="}")Z--;else if(J===","&&Z===0){Q.push(z.trim()),z="";continue}z+=J}if(z.trim())Q.push(z.trim());return Q}function V(K){let Q=K.trim(),Z=Q[0];if(Z!=="'"&&Z!=='"'&&Z!=="`"||Q.length<2||Q.at(-1)!==Z)return null;let $="";for(let z=1;z<Q.length-1;z++){let j=Q[z];if(j==="\\"&&z+1<Q.length-1){let J=Q[++z];$+=J==="n"?`
|
|
5
5
|
`:J==="t"?"\t":J;continue}if(j===Z)return null;if(Z==="`"&&j==="$"&&Q[z+1]==="{")return null;$+=j}return $}var x=new Set(["true","false","null","undefined","typeof","void","new","in","of","instanceof","this","delete","await","async","function","return","NaN","Infinity"]);function N(K,Q){let Z=K.trim();if(!Z)return{ok:!1,message:"the argument is empty",code:Y.INVALID_DIRECTIVE_SYNTAX};let $=A(Z);if($)return{ok:!1,message:`the expression is not allowed (${$})`,code:Y.UNSAFE_EXPRESSION};let z=H(Q),j;try{j=b(Z,Object.keys(z))(...Object.values(z))}catch(W){return{ok:!1,message:`the expression could not be evaluated: ${W instanceof Error?W.message:String(W)}`,code:Y.EVALUATION_ERROR}}if(j!==void 0&&j!==null)return{ok:!0,value:j};let J=[...new Set(q(Z))].filter((W)=>!x.has(W)&&!(W in z)&&!(W in globalThis));if(J.length>0)return{ok:!1,message:`${J.map((X)=>`"${X}"`).join(", ")} ${J.length===1?"is":"are"} not defined here. Values a directive reads must come from <script server> or the render context; a plain <script> runs in the browser. To pass literal text, quote it.`,code:Y.UNDEFINED_VARIABLE};if(j===void 0&&(Z.startsWith("{")||Z.startsWith("[")))return{ok:!1,message:"the expression threw while it was evaluated",code:Y.EVALUATION_ERROR};return{ok:!0,value:j}}function _(K){if(K===null)return"null";if(Array.isArray(K))return"an array";if(typeof K==="object")return"an object";if(typeof K==="string")return`a string ("${K.length>40?`${K.slice(0,40)}...`:K}")`;return`${/^[aeiou]/.test(typeof K)?"an":"a"} ${typeof K}`}function T(K){return typeof K==="object"&&K!==null&&!Array.isArray(K)}function L(K){if(!K)return"";return M.isAbsolute(K)?M.relative(process.cwd(),K)||K:K}function G(K){let Q=K.replace(/\s+/g," ").trim();return Q.length>80?`${Q.slice(0,77)}...`:Q}function I(K,Q,Z,$,z=Y.EVALUATION_ERROR){let j=$?` in ${L($)}`:"";return console.warn(`[stx] ${G(Q)}${j}: ${Z}`),y(K,`${G(Q)}: ${Z}`,z)}function a(K,Q,Z){let $=Z?` in ${L(Z)}`:"";console.warn(`[stx] ${G(K)}${$}: ${Q}`)}var v=["og:","article:","book:","profile:","fb:","music:","video:"],d=/^[a-z][\w-]*(?::[\w:-]+)?$/i;function E(K,Q){if(K.length<1)return{kind:"error",message:"meta directive requires at least the meta name",code:Y.INVALID_DIRECTIVE_SYNTAX};if(K.length>2)return{kind:"error",message:`@meta takes a name and a value, got ${K.length} arguments`,code:Y.INVALID_DIRECTIVE_SYNTAX};let Z=m(K[0],Q);if(typeof Z!=="string")return Z;let $;if(K.length===2){let j=h(K[1],Q);if(typeof j!=="string")return j;$=j}else{let j=Z.includes(":")?Z.slice(Z.indexOf(":")+1):Z,J=Q.openGraph,W=Q[j]??(T(J)?J[j]:void 0);$=W===void 0||W===null||typeof W==="object"?"":String(W)}if(!$)return{kind:"empty"};return{kind:"tag",tag:v.some((j)=>Z.startsWith(j))?{property:Z,content:$}:{name:Z,content:$}}}function m(K,Q){let Z=V(K);if(Z!==null)return Z.trim()?Z:{kind:"error",message:"the meta name is empty",code:Y.INVALID_DIRECTIVE_SYNTAX};if(d.test(K.trim()))return K.trim();let $=N(K,Q);if(!$.ok)return{kind:"error",message:`meta name: ${$.message}`,code:$.code};if(typeof $.value!=="string"||!$.value.trim())return{kind:"error",message:`the meta name must be a non-empty string, got ${_($.value)}`,code:Y.TYPE_ERROR};return $.value}function h(K,Q){let Z=V(K);if(Z!==null)return Z;let $=N(K,Q);if(!$.ok)return{kind:"error",message:$.message,code:$.code};let z=$.value;if(z===void 0||z===null||z===!1)return"";if(Array.isArray(z))return z.filter((j)=>j!==void 0&&j!==null&&j!=="").map(String).join(", ");if(typeof z==="object"&&!(z instanceof Date))return{kind:"error",message:`the content must be text, got ${_(z)}`,code:Y.TYPE_ERROR};return String(z)}var O={},p=[],F={};function jK(){return O}function zK(){return F}function JK(){O={},p.length=0,F={}}function P(K){O=R(O,K)}function R(K,Q){return{title:Q.title??K.title,titleTemplate:Q.titleTemplate??K.titleTemplate,base:Q.base??K.base,meta:[...K.meta||[],...Q.meta||[]],link:[...K.link||[],...Q.link||[]],script:[...K.script||[],...Q.script||[]],style:[...K.style||[],...Q.style||[]],htmlAttrs:{...K.htmlAttrs,...Q.htmlAttrs},bodyAttrs:{...K.bodyAttrs,...Q.bodyAttrs}}}function u(K){P(f(K))}function f(K){let Q=[];if(K.description)Q.push({name:"description",content:K.description});if(K.keywords){let X=Array.isArray(K.keywords)?K.keywords.join(", "):K.keywords;Q.push({name:"keywords",content:X})}if(K.author)Q.push({name:"author",content:K.author});if(K.robots)Q.push({name:"robots",content:K.robots});let Z=K.ogTitle??K.title,$=K.ogDescription??K.description;if(Z)Q.push({property:"og:title",content:Z});if($)Q.push({property:"og:description",content:$});if(K.ogImage){if(Q.push({property:"og:image",content:K.ogImage}),K.ogImageType)Q.push({property:"og:image:type",content:K.ogImageType});if(K.ogImageWidth)Q.push({property:"og:image:width",content:String(K.ogImageWidth)});if(K.ogImageHeight)Q.push({property:"og:image:height",content:String(K.ogImageHeight)});if(K.ogImageAlt)Q.push({property:"og:image:alt",content:K.ogImageAlt})}if(K.ogUrl)Q.push({property:"og:url",content:K.ogUrl});if(K.ogType)Q.push({property:"og:type",content:K.ogType});if(K.ogSiteName)Q.push({property:"og:site_name",content:K.ogSiteName});if(K.ogLocale)Q.push({property:"og:locale",content:K.ogLocale});if(K.profileFirstName)Q.push({property:"profile:first_name",content:K.profileFirstName});if(K.profileLastName)Q.push({property:"profile:last_name",content:K.profileLastName});if(K.profileUsername)Q.push({property:"profile:username",content:K.profileUsername});let z=K.twitterTitle??K.title,j=K.twitterDescription??K.description,J=K.twitterImage??K.ogImage;if(K.twitterCard)Q.push({name:"twitter:card",content:K.twitterCard});if(z)Q.push({name:"twitter:title",content:z});if(j)Q.push({name:"twitter:description",content:j});if(J){Q.push({name:"twitter:image",content:J});let X=K.twitterImageAlt??(K.twitterImage?void 0:K.ogImageAlt);if(X)Q.push({name:"twitter:image:alt",content:X})}if(K.twitterSite)Q.push({name:"twitter:site",content:K.twitterSite});if(K.twitterCreator)Q.push({name:"twitter:creator",content:K.twitterCreator});if(K.articleAuthor)Q.push({property:"article:author",content:K.articleAuthor});if(K.articlePublishedTime)Q.push({property:"article:published_time",content:K.articlePublishedTime});if(K.articleModifiedTime)Q.push({property:"article:modified_time",content:K.articleModifiedTime});if(K.articleSection)Q.push({property:"article:section",content:K.articleSection});if(K.articleTags)for(let X of K.articleTags)Q.push({property:"article:tag",content:X});let W=[];if(K.canonical)W.push({rel:"canonical",href:K.canonical});return{title:K.title,titleTemplate:K.titleTemplate,meta:Q,link:W}}function WK(K){if(F={...F,...K},K.title||K.description)u({title:K.title,description:K.description})}function XK(K){let Q=typeof K==="function"?K():K;P({title:Q})}function YK(K=O){let Q=[];if(K.title){let Z=K.title;if(K.titleTemplate)Z=typeof K.titleTemplate==="function"?K.titleTemplate(Z):K.titleTemplate.replace("%s",Z);Q.push(`<title>${U(Z)}</title>`)}if(K.base){let Z=Object.entries(K.base).map(([$,z])=>`${$}="${U(z)}"`).join(" ");Q.push(`<base ${Z}>`)}for(let Z of K.meta||[]){let $=Object.entries(Z).filter(([z,j])=>j!==void 0).map(([z,j])=>{return`${z==="httpEquiv"?"http-equiv":z}="${U(String(j))}"`}).join(" ");Q.push(`<meta ${$}>`)}for(let Z of K.link||[]){let $=Object.entries(Z).filter(([z,j])=>j!==void 0).map(([z,j])=>`${z}="${U(String(j))}"`).join(" ");Q.push(`<link ${$}>`)}for(let Z of K.script||[]){let{content:$,...z}=Z,j=Object.entries(z).filter(([J,W])=>W!==void 0).map(([J,W])=>{if(typeof W==="boolean")return W?J:"";return`${J}="${U(String(W))}"`}).filter(Boolean).join(" ");if($)Q.push(`<script ${j}>${$}</script>`);else Q.push(`<script ${j}></script>`)}for(let Z of K.style||[]){let $=Z.type?` type="${Z.type}"`:"";Q.push(`<style${$}>${Z.content}</style>`)}return Q.join(`
|
|
6
6
|
`)}function BK(K=O){if(!K.htmlAttrs)return"";return Object.entries(K.htmlAttrs).map(([Q,Z])=>`${Q}="${U(Z)}"`).join(" ")}function OK(K=O){if(!K.bodyAttrs)return"";return Object.entries(K.bodyAttrs).map(([Q,Z])=>`${Q}="${U(Z)}"`).join(" ")}function U(K){return K.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function UK(K=O){if(typeof document>"u")return;if(K.title){let Q=K.title;if(K.titleTemplate)Q=typeof K.titleTemplate==="function"?K.titleTemplate(Q):K.titleTemplate.replace("%s",Q);document.title=Q}for(let Q of K.meta||[]){let Z=Q.name?`meta[name="${Q.name}"]`:Q.property?`meta[property="${Q.property}"]`:null;if(Z){let $=document.querySelector(Z);if(!$){if($=document.createElement("meta"),Q.name)$.setAttribute("name",Q.name);if(Q.property)$.setAttribute("property",Q.property);document.head.appendChild($)}$.setAttribute("content",Q.content)}}for(let Q of K.link||[]){let Z=`link[rel="${Q.rel}"]${Q.href?`[href="${Q.href}"]`:""}`,$=document.querySelector(Z);if(!$)$=document.createElement("link"),document.head.appendChild($);for(let[z,j]of Object.entries(Q))if(j!==void 0)$.setAttribute(z,String(j))}if(K.htmlAttrs)for(let[Q,Z]of Object.entries(K.htmlAttrs))if(Q==="class")for(let $ of String(Z).split(/\s+/).filter(Boolean))document.documentElement.classList.add($);else document.documentElement.setAttribute(Q,Z);if(K.bodyAttrs)for(let[Q,Z]of Object.entries(K.bodyAttrs))document.body.setAttribute(Q,Z)}function FK(K){let Q="";return{content:K.replace(/@head\s*([\s\S]*?)@endhead/g,($,z)=>{return Q+=z.trim()+`
|
|
7
|
-
`,""}),headContent:Q.trim()}}function GK(K,Q){return K.replace(/@title\s*\(\s*(?:(['"`])(.+?)\1|([^)]+))\s*\)/g,(Z,$,z,j)=>{let J=$?z:Q[(j||"").trim()]??j,W=Q.__stx_runtime_head??{};return Q.__stx_runtime_head=R(W,{title:J}),""})}function VK(K,Q,Z=""){if(!K.includes("@meta"))return K;return w(K,/(?<![\w$@])@meta\s*\(/g,($,z)=>{let j=E(k($),Q);if(j.kind==="error")return I("Meta",z,j.message,Z,j.code);if(j.kind==="tag"){let J=Q.__stx_runtime_head??{};Q.__stx_runtime_head=R(J,{meta:[j.tag]})}return""},($)=>I("Meta",$,"the call has no closing parenthesis",Z,Y.INVALID_DIRECTIVE_SYNTAX))}export{S as
|
|
7
|
+
`,""}),headContent:Q.trim()}}function GK(K,Q){return K.replace(/@title\s*\(\s*(?:(['"`])(.+?)\1|([^)]+))\s*\)/g,(Z,$,z,j)=>{let J=$?z:Q[(j||"").trim()]??j,W=Q.__stx_runtime_head??{};return Q.__stx_runtime_head=R(W,{title:J}),""})}function VK(K,Q,Z=""){if(!K.includes("@meta"))return K;return w(K,/(?<![\w$@])@meta\s*\(/g,($,z)=>{let j=E(k($),Q);if(j.kind==="error")return I("Meta",z,j.message,Z,j.code);if(j.kind==="tag"){let J=Q.__stx_runtime_head??{};Q.__stx_runtime_head=R(J,{meta:[j.tag]})}return""},($)=>I("Meta",$,"the call has no closing parenthesis",Z,Y.INVALID_DIRECTIVE_SYNTAX))}export{S as qu,D as ru,g as su,l as tu,C as uu,w as vu,k as wu,N as xu,_ as yu,T as zu,I as Au,a as Bu,E as Cu,jK as Du,zK as Eu,JK as Fu,P as Gu,R as Hu,u as Iu,f as Ju,WK as Ku,XK as Lu,YK as Mu,BK as Nu,OK as Ou,UK as Pu,FK as Qu,GK as Ru,VK as Su};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import v from"fs";import z from"path";import{fileURLToPath as B}from"url";var x;function G(){if(x)return x;let j="unknown";try{j=String(JSON.parse(v.readFileSync(new URL("../package.json",import.meta.url),"utf8")).version)}catch{}if(import.meta.url.endsWith(".ts"))try{let A=z.dirname(B(import.meta.url)),q=0;for(let k of v.readdirSync(A,{recursive:!0,withFileTypes:!0}))if(k.isFile()&&k.name.endsWith(".ts"))q=Math.max(q,v.statSync(z.join(k.parentPath,k.name)).mtimeMs);j+=`+src.${Math.trunc(q)}`}catch{}return x=j,j}
|
|
3
|
-
export{G as
|
|
3
|
+
export{G as Fl};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{ix as O}from"./chunk-2fw05hs2.js";import{mkdir as b,writeFile as T}from"fs/promises";import{join as q}from"path";var E="https://api.iconify.design";async function k(){let G=await fetch(`${E}/collections`);if(!G.ok)throw Error(`Failed to fetch collections: ${G.statusText}`);return await G.json()}async function P(G,z){try{let Z=O.resolve("@iconify/json"),X=`${`${Z.substring(0,Z.lastIndexOf("/node_modules/@iconify/json/"))}/node_modules/@iconify/json`}/json/${G}.json`,Q=Bun.file(X);if(await Q.exists()){let $=await Q.json();if(z&&z.length>0){let B={};for(let S of z)if($.icons[S])B[S]=$.icons[S];return{...$,icons:B}}return $}}catch{}let M=z&&z.length>0?`${E}/${G}.json?icons=${z.join(",")}`:`${E}/${G}.json`,U=await fetch(M);if(!U.ok)throw Error(`Failed to fetch icons for ${G}: ${U.statusText}`);return await U.json()}function j(G,z=24,M=24){return{body:G.body,width:G.width||z,height:G.height||M,viewBox:`0 0 ${G.width||z} ${G.height||M}`}}function F(G,z){let M=V(G);return`import type { IconData } from '@stacksjs/iconify-core'
|
|
3
3
|
|
|
4
4
|
export const ${M}: IconData = ${JSON.stringify(z,null,2)}
|
|
5
5
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{dl as a,el as b,fl as c,gl as d,hl as e}from"./chunk-1ws3xcea.js";import"./chunk-563shnkz.js";import"./chunk-2fw05hs2.js";export{b as injectPwaTags,e as generateThemeColorMeta,c as generateSwRegistrationScript,a as generatePwaTags,d as generateManifestLink};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{$o as d,Aq as p,Bq as q,Cq as r,Dq as s,Eq as t,Fq as u,Gq as v,Hq as w,Iq as x,Jq as y,Wo as a,Yo as b,_o as c,pq as e,qq as f,rq as g,sq as h,tq as i,uq as j,vq as k,wq as l,xq as m,yq as n,zq as o}from"./chunk-cqchpe34.js";import"./chunk-aq1xq0r4.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-0a315nbf.js";import"./chunk-tkyrk66a.js";import"./chunk-213jwgpx.js";import"./chunk-5r4s9s38.js";import"./chunk-1te8k8gp.js";import"./chunk-zpcnbdhn.js";import"./chunk-rz9f3zqz.js";import"./chunk-bn1edb1y.js";import"./chunk-cj3adc77.js";import"./chunk-t1htzg9e.js";import"./chunk-gbmeh7jg.js";import"./chunk-rt3cx932.js";import"./chunk-vx86cf4r.js";import"./chunk-563shnkz.js";import"./chunk-2fw05hs2.js";export{e as validateTemplate,g as validateDirective,o as userComponentFileExists,m as transpileTypeScript,q as slotContentHasExpressions,k as shouldTranspileTypeScript,n as scopeOnRootElement,u as resolveTemplatePath,s as renderComponentWithSlot,j as isJavaScriptScript,p as isHydrateTrigger,d as hasVariables,h as hasDirectives,v as getSourceLineInfo,l as getSharedTranspiler,f as getPositionInfo,y as getComponentCacheStats,t as fileExists,a as extractVariables,c as extractScriptFromTemplate,i as extractDirectiveNames,w as createDetailedErrorMessage,b as convertToCommonJS,r as componentClientSignalNames,x as clearComponentCache};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{$j as h,Vj as b,Wj as c,Xj as d,Yj as e,Zj as f,_j as g,ak as i,bk as j,ck as k,dk as l,ek as m,fk as n,gk as o}from"./chunk-kbwhs5df.js";import{Fl as a}from"./chunk-s8jd13nb.js";import"./chunk-cqchpe34.js";import"./chunk-aq1xq0r4.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-0a315nbf.js";import"./chunk-tkyrk66a.js";import"./chunk-213jwgpx.js";import"./chunk-5r4s9s38.js";import"./chunk-1te8k8gp.js";import"./chunk-zpcnbdhn.js";import"./chunk-rz9f3zqz.js";import"./chunk-bn1edb1y.js";import"./chunk-cj3adc77.js";import"./chunk-t1htzg9e.js";import"./chunk-gbmeh7jg.js";import"./chunk-rt3cx932.js";import"./chunk-vx86cf4r.js";import"./chunk-563shnkz.js";import"./chunk-2fw05hs2.js";export{b as templateCache,j as registerServeModuleBundle,c as readFileCached,e as invalidateFileCacheByDir,d as invalidateFileCache,o as hashFilePath,k as getServeModuleBundle,i as getServeClientAsset,g as getCachedSignalsRuntime,h as getCachedRouterScript,l as clearDevCaches,m as checkCache,n as cacheTemplate,a as cacheEngineFingerprint,f as __setSignalsGeneratorsForTest};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var E=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),N=new Set(["html","head","body","p","li","dt","dd","rt","rp","option","optgroup","thead","tbody","tfoot","tr","td","th","colgroup","caption"]);function X(Q){return Q.replace(/[^\n]/g," ")}function R(Q){let H=Q.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,X).replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,X).replace(/<!--[\s\S]*?-->/g,X).replace(/\{\{\{[\s\S]*?\}\}\}/g,X).replace(/\{\{[\s\S]*?\}\}/g,X).replace(/\{!![\s\S]*?!!\}/g,X),F=new Map,J=new Map,Y=/<(\/?)([A-Za-z][\w-]*)\b(?:[^<>"']|"[^"]*"|'[^']*')*?(\/?)>/g,z;while((z=Y.exec(H))!==null){let j=z[1]==="/",q=z[2],W=z[3]==="/";if(E.has(q.toLowerCase()))continue;if(W)continue;if(j)J.set(q,(J.get(q)??0)+1);else{let Z=F.get(q);if(Z)Z.count++;else{let B=H.slice(0,z.index).split(`
|
|
3
3
|
`).length;F.set(q,{count:1,firstLine:B})}}}let M=[];for(let j of new Set([...F.keys(),...J.keys()])){if(N.has(j.toLowerCase()))continue;let q=F.get(j)?.count??0,W=J.get(j)??0;if(q!==W)M.push({tag:j,opened:q,closed:W,firstOpenLine:F.get(j)?.firstLine??0})}return M}var $=new Set;function U(Q,H){let F;try{F=R(Q)}catch{return}if(F.length===0)return;let J=`${H}:${Q.length}`;if($.has(J))return;$.add(J);let Y=H?H.split(/[/\\]/).pop()||H:"template";for(let{tag:z,opened:M,closed:j,firstOpenLine:q}of F)if(M>j){let W=q?` (first opened at line ${q})`:"";console.warn(`[stx] ${Y}: <${z}> ${M} opened, ${j} closed \u2014 an unclosed <${z}>${W} may swallow the content that follows it.`)}else console.warn(`[stx] ${Y}: <${z}> ${M} opened, ${j} closed \u2014 ${j-M} stray </${z}>.`)}
|
|
4
|
-
export{R as
|
|
4
|
+
export{R as Lv,U as Mv};
|
|
@@ -213,4 +213,4 @@ function w(Z,M){let{itemHeight:K,containerHeight:P,overscan:F=3,keyProperty:$="i
|
|
|
213
213
|
})();
|
|
214
214
|
</script>
|
|
215
215
|
`})}var v={createVirtualList:w,processVirtualListDirectives:C,processInfiniteListDirectives:E,processVirtualGridDirectives:f,generateVirtualListCSS:b,useVirtualList:L};
|
|
216
|
-
export{w as
|
|
216
|
+
export{w as Jh,C as Kh,b as Lh,L as Mh,E as Nh,f as Oh,v as Ph};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Hj as y,Ij as Mz,Jj as u,Kj as Kz,Lj as Vz,Mj as k,Qj as d,Rj as i,Sj as Nz,Tj as Hz}from"./chunk-9e8t0twa.js";import{aw as Jz,cw as Qz,ew as Xz}from"./chunk-gbmeh7jg.js";var I=null;function e(){return I}function Az(z,Z){if(I)I.provides.set(z,Z);else l.set(z,Z)}function Bz(z,Z){let W=I;while(W){if(W.provides.has(z))return W.provides.get(z);W=W.parent}if(l.has(z))return l.get(z);return Z}var l=new Map;function Rz(z,Z){l.set(z,Z)}function zz(z){let Z=I,W=Z?.el,$=Array.isArray(z)?z:z&&typeof z==="object"?Object.keys(z):[];if(W&&$.length>0){let E=W.__stx_component_emits||=Object.create(null);for(let M of $)E[M]=!0}let G=(E,...M)=>{if(typeof document>"u")return;if(W){let V=W.__stx_component_emits||=Object.create(null);V[E]=!0,W.dispatchEvent(new CustomEvent(E,{detail:M.length===1?M[0]:M,bubbles:!0,cancelable:!0}))}};if(Z)Z.emit=G;return G}function Iz(z){if(I)I.exposed=z}function Oz(z){let Z=Promise.resolve();return z?Z.then(z):Z}function qz(z){if(I)I.errorCapturedHooks.push(z)}function jz(z,Z,W){let $=Z?.parent;while($){for(let G of $.errorCapturedHooks)if(G(z,Z,W)===!1)return;$=$.parent}}function Sz(){return I?.slots??{}}function Fz(){return I?.slots??{}}function Cz(){return I?.attrs??{}}function xz(z){let Z=z.__provides?new Map(Object.entries(z.__provides)):new Map;return{...z,__provides:Z,__provide(W,$){Z.set(W,$)},__inject(W,$){if(Z.has(W))return Z.get(W);if(z.__provides){let G=z.__provides instanceof Map?z.__provides:new Map(Object.entries(z.__provides));if(G.has(W))return G.get(W)}return $}}}function wz(){return`
|
|
3
3
|
// STX Composition API Runtime
|
|
4
4
|
(function() {
|
|
5
5
|
const _provides = new Map();
|
|
@@ -64,7 +64,7 @@ import{Aj as B,Bj as F,Cj as H,Dj as O,Ej as I,Fj as M,Jj as P,Kj as T,Lj as x,M
|
|
|
64
64
|
return refs;
|
|
65
65
|
};
|
|
66
66
|
})();
|
|
67
|
-
`}function
|
|
67
|
+
`}function r(z,Z,W,$,G){let E=!0,M=new Set,V=(X)=>$.get?$.get(X):X,K=()=>V(z());return Object.defineProperty(K,"_isSignal",{value:!0}),Object.defineProperty(K,"modifiers",{get:Z}),K.set=(X)=>{if(!E)return;let N=Z(),U=$.set?$.set(X,N):X;if(N.trim&&typeof U==="string")U=U.trim();if(N.number&&typeof U==="string"&&U!==""){let _=Number(U);if(!Number.isNaN(_))U=_}if(Object.is(z(),U))return;z.set(U),W(U)},K.update=(X)=>K.set(X(K())),K.input=(X)=>{if(!Z().lazy)K.set(X)},K.change=(X)=>{if(Z().lazy)K.set(X)},K.subscribe=(X)=>{if(!E)return()=>{};let N=z.subscribe((U,_)=>X(V(U),V(_)));return M.add(N),()=>{N(),M.delete(N)}},Object.defineProperty(K,"value",{get:K,set:K.set}),G(()=>{E=!1,M.forEach((X)=>X()),M.clear()}),K}function mz(z="modelValue",Z={}){let W=typeof z==="string"?z:"modelValue",$=typeof z==="string"?Z:z,G=e()?.props||{},E=zz([`update:${W}`]),M=W==="modelValue"?"modelModifiers":`${W}Modifiers`,V=(N)=>d(G[N])||i(G[N])?G[N]():G[N],K=y($.default),X=u(()=>{let N=V(W);K.set(N===void 0?$.default:N)});return k(X),r(K,()=>V(M)||{},(N)=>E(`update:${W}`,N),$,k)}function Wz(z,Z=!0,W){if(!Z||!z||typeof window>"u")return;let $=window;if(!$.__STX_DATA__){let E=document.querySelector("script[data-stx-server-data]");try{let M=JSON.parse(E?.textContent||"{}");$.__STX_DATA__=M&&typeof M==="object"&&!Array.isArray(M)?M:{}}catch{$.__STX_DATA__={}}}let G=$.__STX_DATA__;if(G&&Object.prototype.hasOwnProperty.call(G,z))try{return{data:W?W(G[z]):G[z]}}catch(E){return{data:null,error:E instanceof Error?E:Error(String(E))}}return}function Yz(z){if(typeof window>"u")return;let Z=window;if(z===void 0)Z.__STX_DATA__={};else{if(!Z.__STX_DATA__)try{let W=JSON.parse(document.querySelector("script[data-stx-server-data]")?.textContent||"{}");Z.__STX_DATA__=W&&typeof W==="object"&&!Array.isArray(W)?W:{}}catch{Z.__STX_DATA__={}}if(Z.__STX_DATA__)delete Z.__STX_DATA__[z]}}function Zz(z){let Z=null;try{Z=typeof indexedDB<"u"?indexedDB:null}catch{Z=null}if(!Z)return null;let W=Z,$=z||"stx-kept",G=null,E=()=>{if(!G)G=new Promise((V,K)=>{let X=W.open($,1);X.onupgradeneeded=()=>{X.result.createObjectStore("kv")},X.onsuccess=()=>V(X.result),X.onerror=()=>K(X.error),X.onblocked=()=>K(Error("blocked"))}),G.catch(()=>{G=null});return G},M=(V,K)=>E().then((X)=>new Promise((N,U)=>{let _=X.transaction("kv",V),Q=K(_.objectStore("kv"));_.oncomplete=()=>N(Q?Q.result:void 0),_.onerror=()=>U(_.error),_.onabort=()=>U(_.error)}));return{get:(V)=>M("readonly",(K)=>K.get(V)),set:(V,K)=>M("readwrite",(X)=>{X.put(K,V)}),remove:(V)=>M("readwrite",(K)=>{K.delete(V)}),removePrefix:(V)=>M("readwrite",(K)=>{K.delete(IDBKeyRange.bound(V,`${V}\uFFFF`))})}}function _z(z,Z){let W=z||{},$=null;if(W.storage!==void 0)$=W.storage;else try{$=typeof localStorage<"u"?localStorage:null}catch{$=null}let G=null,E=W.backend!==void 0;if(E)G=W.backend||null;let M=()=>{if(E)return G;E=!0;try{G=Z?Z():null}catch{G=null}if(G){let Y=G;Y.get("__stx_probe__").catch(()=>{if(G===Y)G=null})}return G},V=W.limit||32768,K=W.defer||((Y)=>{let J=typeof requestIdleCallback==="function"?requestIdleCallback:null;if(J)J(Y,{timeout:200});else setTimeout(Y,16)}),X=new Map,N=new Set,U=new Map,_=!1,Q=Promise.resolve(),T=(Y)=>{try{return JSON.parse(Y)}catch{return Y}},P=(Y,J)=>{if(!$)return!1;try{return $.setItem(Y,J),!0}catch{return!1}},j=(Y)=>{try{if($)$.removeItem(Y)}catch{}},O=()=>{if(_=!1,!U.size)return Q;let Y=Array.from(U.entries());return U.clear(),Q=Q.then(()=>Promise.all(Y.map(([J,H])=>{if(!G){N.delete(J);try{P(J,JSON.stringify(H===void 0?null:H))}catch{}return}let B;try{return B={v:H},G.set(J,B).catch(()=>{let L;try{L=JSON.stringify(H)}catch{return}return G?G.set(J,{j:L}).catch(()=>{P(J,L)}):void 0})}catch{return}}))).then(()=>{}),Q},C=(Y,J)=>{if(U.set(Y,J),N.add(Y),_)return;_=!0,K(()=>{O()})},b=(Y)=>{if(!Y||typeof Y!=="object")return;let J=Y;if("v"in J)return{value:J.v};if(typeof J.j==="string")return{value:T(J.j)};return},q={peek(Y){if(X.has(Y))return{value:X.get(Y)};let J=null;try{J=$?$.getItem(Y):null}catch{J=null}if(J===null||J===void 0)return;let H=T(J);return X.set(Y,H),{value:H}},load(Y){let J=q.peek(Y),H=J?null:M();if(J||!H)return Promise.resolve(J);return H.get(Y).then((B)=>{if(X.has(Y))return{value:X.get(Y)};let L=b(B);if(L)X.set(Y,L.value),N.add(Y);return L},()=>{return})},set(Y,J){if(X.set(Y,J),G&&N.has(Y)){C(Y,J);return}let H;try{H=JSON.stringify(J===void 0?null:J)}catch{return}if(H.length<=V&&P(Y,H))return;if(!M()){if(H.length>V)P(Y,H);return}j(Y),C(Y,J)},forget(Y){for(let H of Array.from(X.keys()))if(H.indexOf(Y)===0)X.delete(H);for(let H of Array.from(U.keys()))if(H.indexOf(Y)===0)U.delete(H);for(let H of Array.from(N))if(H.indexOf(Y)===0)N.delete(H);try{if($)for(let H=$.length-1;H>=0;H--){let B=$.key(H);if(B&&B.indexOf(Y)===0)$.removeItem(B)}}catch{}let J=M();if(!J)return Q;return Q=Q.then(()=>J.removePrefix(Y)).catch(()=>{}),Q},flush(){return O()}};try{if(typeof document<"u"&&document.addEventListener)document.addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden")O()});if(typeof addEventListener==="function")addEventListener("pagehide",()=>{O()})}catch{}return q}function $z(z,Z){if(!z)return!1;if(z===Z.key)return!0;if(!Z.url)return!1;if(z===Z.url)return!0;try{let W=typeof location<"u"&&location.origin&&location.origin!=="null"?location.origin:"http://localhost",$=new URL(z,W),G=new URL(Z.url,W);if($.origin!==G.origin||$.pathname!==G.pathname)return!1;return!$.search||$.search===G.search}catch{return!1}}function Gz(z){let Z=z.prefix||"stx:kept:",W=z.matches||((_,Q)=>_===Q.key||_===Q.url),$=new Set,G=new Map,E,M=(_)=>_===void 0?E:_,V=(_,Q)=>{let T=M(Q);if(T===!1||T===null||T==="")return null;return`${Z}${T===void 0?"":`${T}:`}query:${_}`},K=(_)=>{let Q=_&&_.value;if(!Q||typeof Q!=="object"||!("d"in Q))return;return{data:Q.d,at:Number(Q.at)||0}},X=()=>{let _=globalThis;return _.__stx_outboxes instanceof Map?_.__stx_outboxes:null},N={setScope(_){E=_},scope:()=>E,keyFor:V,seed(_,Q){let T=V(_,Q);return T?K(z.kept.peek(T)):void 0},restore(_,Q){let T=V(_,Q);return T?z.kept.load(T).then(K):Promise.resolve(void 0)},persist(_,Q,T){let P=V(_,T);if(P)z.kept.set(P,{d:Q,at:Date.now()})},overlay(_,Q,T){let P=X();if(!P||!P.size)return Q;let j=Q;return P.forEach((O)=>{try{j=O.overlay(_,j,T)}catch{}}),j},watch(_){return $.add(_),()=>{$.delete(_)}},cachedQuery(_,Q){let T=G.get(_);if(T){if(Q&&T.__options)T.__options(Q);return T}let P=Q||{},j=P.initial===void 0?null:P.initial,O=()=>typeof P.scope==="function"?P.scope():P.scope,C=()=>{return(typeof P.url==="function"?P.url():P.url)||null},b=()=>({key:_,url:C()}),q=O(),Y=j,J=0,H=null,B=N.seed(_,q);if(B)Y=B.data;let L=z.state(N.overlay(b(),Y)),c=z.state(!1),s=z.state(!1),n=z.state(null),g=z.state(B?B.at:0),x=0,m=()=>{L.set(N.overlay(b(),Y))},t=(D)=>{let A=x;N.restore(_,D).then((F)=>{if(!F||A!==x||J)return;Y=F.data,g.set(F.at),m()})};if(!B)t(q);let Ez=()=>{let D=O();if(D===q)return;q=D,x++,H=null,J=0;let A=N.seed(_,q);if(Y=A?A.data:j,g.set(A?A.at:0),m(),!A)t(q)},Tz=(D)=>{let A=C(),F=P.timeoutMs||15000,S=typeof AbortController<"u"?new AbortController:null,R=null,Uz=new Promise((w,f)=>{R=setTimeout(()=>{if(S)S.abort();f(Error("The request took too long."))},F)}),a;if(P.load)a=P.load({force:D,url:A,signal:S?S.signal:void 0});else if(A){let w=P.fetch||((v,h)=>fetch(v,h)),f={method:"GET",headers:{Accept:"application/json"}};if(D)f.cache="no-cache";if(S)f.signal=S.signal;a=w(A,f).then((v)=>{if(!v.ok)return v.json().catch(()=>null).then((h)=>{throw Error(h&&(h.error||h.message)||`Request failed (${v.status})`)});return v.json()})}else return Promise.resolve(L());return Promise.race([a,Uz]).then((w)=>{if(R)clearTimeout(R);return P.transform?P.transform(w):w},(w)=>{if(R)clearTimeout(R);throw w})},o=(D)=>{if(H)return H;let A=x;if(s.set(!0),J===0&&!g())c.set(!0);let F=()=>{if(A!==x)return;H=null,s.set(!1),c.set(!1)},S=Tz(D).then((R)=>{if(A!==x)return L();return Y=R,J=Date.now(),g.set(J),n.set(null),N.persist(_,R,q),m(),F(),L()},(R)=>{if(A===x)n.set(R&&R.message?R.message:"Could not load.");return F(),L()});return H=S,S},p={data:L,loading:c,isFetching:s,error:n,updatedAt:g,get key(){return _},load(D){if(Ez(),!D&&J&&Date.now()-J<(P.staleTime||0))return Promise.resolve(L());return o(!!D)},refresh(){return p.load(!0)},set(D){Y=typeof D==="function"?D(Y):D,N.persist(_,Y,q),m()},invalidate(){J=0},__options(D){P={...P,...D}}};if($.add({target:b,updated:()=>{if(J||g())o(!1)},outbox:(D)=>{if(D)Y=N.overlay(b(),Y,D.id),J=0,o(!0);m()}}),G.set(_,p),P.immediate)p.load();return p}},U=typeof window<"u"?window:typeof addEventListener==="function"?globalThis:null;if(z.listen!==!1&&U&&typeof U.addEventListener==="function")U.addEventListener("stx:updated",(_)=>{let Q=_.detail||{};if(Q.kind!=="api"||typeof Q.url!=="string")return;$.forEach((T)=>{if(W(Q.url,T.target()))T.updated()})}),U.addEventListener("stx:outbox",(_)=>{let Q=_.detail||{},T=Q.sent&&typeof Q.sent.id==="string"?Q.sent:null;$.forEach((P)=>{if(T){let j=Array.isArray(T.affects)?T.affects:[],O=P.target();if(!j.some((C)=>W(C,O)))return}P.outbox(T)})});return N}function Dz(){let z=Lz(Pz());try{let W=new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(z);return W=W.replace(/\}(var |let |const |function )/g,"};$1"),W}catch{return z}}function Lz(z){let Z=[],W=0,$="console.log(";while(W<z.length){let G=z.indexOf($,W);if(G===-1){Z.push(z.slice(W));break}Z.push(z.slice(W,G));let E=1,M=G+$.length;while(M<z.length&&E>0){let V=z[M];if(V==='"'||V==="'"||V==="`"){let K=V;M++;while(M<z.length&&z[M]!==K){if(z[M]==="\\")M++;M++}M++;continue}if(V==="(")E++;else if(V===")")E--;M++}Z.push("0"),W=M}return Z.join("")}function Pz(){return`
|
|
68
68
|
// STX Signals Runtime (Development Build)
|
|
69
69
|
console.log('[stx] signals runtime loading');
|
|
70
70
|
// Pre-initialization shim: capture onMount/onDestroy calls made before the runtime IIFE runs
|
|
@@ -1419,8 +1419,8 @@ finally {
|
|
|
1419
1419
|
// Declarative Data Fetching (Feature #6 - useFetch)
|
|
1420
1420
|
// ==========================================================================
|
|
1421
1421
|
|
|
1422
|
-
var readHydratedData = ${
|
|
1423
|
-
var clearServerData = ${
|
|
1422
|
+
var readHydratedData = ${Wz.toString()};
|
|
1423
|
+
var clearServerData = ${Yz.toString()};
|
|
1424
1424
|
|
|
1425
1425
|
function useFetch(urlOrFn, options = {}) {
|
|
1426
1426
|
const hydrated = readHydratedData(options.key, options.hydrate !== false, options.transform);
|
|
@@ -1813,15 +1813,44 @@ else if (immediate) {
|
|
|
1813
1813
|
var staleTime = options.staleTime || 0;
|
|
1814
1814
|
var cacheTime = options.cacheTime || 300000; // 5 min default
|
|
1815
1815
|
var cacheKey = options.cacheKey || (typeof url === 'function' ? null : url);
|
|
1816
|
-
|
|
1817
|
-
|
|
1816
|
+
// keep: the answer is kept on the device per account (setKeptScope, or
|
|
1817
|
+
// options.scope) and seeds the next visit synchronously, refreshed behind.
|
|
1818
|
+
// true keeps it under the query's key; a string names it.
|
|
1819
|
+
var keepKey = options.keep ? (typeof options.keep === 'string' ? options.keep : cacheKey) : null;
|
|
1820
|
+
var queryTarget = function() {
|
|
1821
|
+
var resolved = null;
|
|
1822
|
+
try { resolved = typeof url === 'function' ? url() : url; } catch (e) {}
|
|
1823
|
+
return { key: cacheKey || keepKey || resolved || '', url: resolved };
|
|
1824
|
+
};
|
|
1825
|
+
// What is shown is the last answer with the outbox's waiting writes on
|
|
1826
|
+
// top, so a change made offline is not undone by a refetch.
|
|
1827
|
+
var base = options.initialData || null;
|
|
1828
|
+
var seeded = keepKey ? __stxQueries.seed(keepKey, options.scope) : undefined;
|
|
1829
|
+
if (seeded) base = seeded.data;
|
|
1830
|
+
var data = state(seeded ? __stxQueries.overlay(queryTarget(), base) : base);
|
|
1831
|
+
var show = function(value) {
|
|
1832
|
+
base = value;
|
|
1833
|
+
data.set(__stxQueries.overlay(queryTarget(), value));
|
|
1834
|
+
};
|
|
1835
|
+
var answered = false;
|
|
1836
|
+
var loading = state(!seeded);
|
|
1818
1837
|
// See useFetch: loading means "nothing to show yet", isFetching means "a
|
|
1819
1838
|
// request is open" \u2014 including a background refresh, which is the case that
|
|
1820
1839
|
// makes the distinction necessary (#1929).
|
|
1821
1840
|
var isFetching = state(true);
|
|
1822
1841
|
var error = state(null);
|
|
1823
|
-
var isStale = state(
|
|
1842
|
+
var isStale = state(!!seeded);
|
|
1824
1843
|
if (options.suspense) registerSuspense(loading, error);
|
|
1844
|
+
// Kept too large for a synchronous read: it arrives a moment later, and
|
|
1845
|
+
// shows unless an answer came first.
|
|
1846
|
+
if (keepKey && !seeded) {
|
|
1847
|
+
__stxQueries.restore(keepKey, options.scope).then(function(found) {
|
|
1848
|
+
if (!found || answered) return;
|
|
1849
|
+
show(found.data);
|
|
1850
|
+
loading.set(false);
|
|
1851
|
+
isStale.set(true);
|
|
1852
|
+
});
|
|
1853
|
+
}
|
|
1825
1854
|
|
|
1826
1855
|
// Per-run AbortController: a newer run aborts the previous in-flight one and
|
|
1827
1856
|
// onDestroy aborts the last, so a resolved request can't write into a
|
|
@@ -1849,7 +1878,8 @@ else if (immediate) {
|
|
|
1849
1878
|
// Check cache
|
|
1850
1879
|
var cached = _queryCache[key];
|
|
1851
1880
|
if (cached && (Date.now() - cached.timestamp < staleTime)) {
|
|
1852
|
-
|
|
1881
|
+
answered = true;
|
|
1882
|
+
show(cached.data);
|
|
1853
1883
|
if (!background) loading.set(false);
|
|
1854
1884
|
isFetching.set(false);
|
|
1855
1885
|
isStale.set(false);
|
|
@@ -1859,7 +1889,7 @@ else if (immediate) {
|
|
|
1859
1889
|
|
|
1860
1890
|
// Stale-while-revalidate
|
|
1861
1891
|
if (cached) {
|
|
1862
|
-
|
|
1892
|
+
show(cached.data);
|
|
1863
1893
|
isStale.set(true);
|
|
1864
1894
|
}
|
|
1865
1895
|
|
|
@@ -1877,7 +1907,9 @@ else if (immediate) {
|
|
|
1877
1907
|
try {
|
|
1878
1908
|
var joinedResult = await shared.promise;
|
|
1879
1909
|
var joinedTransformed = options.transform ? options.transform(joinedResult) : joinedResult;
|
|
1880
|
-
|
|
1910
|
+
answered = true;
|
|
1911
|
+
show(joinedTransformed);
|
|
1912
|
+
if (keepKey) __stxQueries.persist(keepKey, joinedTransformed, options.scope);
|
|
1881
1913
|
if (background) error.set(null);
|
|
1882
1914
|
isStale.set(false);
|
|
1883
1915
|
if (options.onSuccess) options.onSuccess(joinedTransformed);
|
|
@@ -1931,7 +1963,9 @@ else if (immediate) {
|
|
|
1931
1963
|
var result = await netPromise;
|
|
1932
1964
|
if (__signal && __signal.aborted) return;
|
|
1933
1965
|
var transformed = options.transform ? options.transform(result) : result;
|
|
1934
|
-
|
|
1966
|
+
answered = true;
|
|
1967
|
+
show(transformed);
|
|
1968
|
+
if (keepKey) __stxQueries.persist(keepKey, transformed, options.scope);
|
|
1935
1969
|
if (background) error.set(null);
|
|
1936
1970
|
isStale.set(false);
|
|
1937
1971
|
_queryCache[key] = { data: transformed, timestamp: Date.now() };
|
|
@@ -1954,16 +1988,40 @@ finally {
|
|
|
1954
1988
|
}
|
|
1955
1989
|
};
|
|
1956
1990
|
|
|
1991
|
+
// A refetch nobody asked for does not set loading (see backgroundRun below).
|
|
1992
|
+
var backgroundRun = { background: true };
|
|
1993
|
+
|
|
1957
1994
|
if (options.immediate !== false) {
|
|
1958
|
-
|
|
1959
|
-
|
|
1995
|
+
// Seeded from the device: the kept copy is on screen, so the first
|
|
1996
|
+
// fetch refreshes it behind rather than putting a spinner over it.
|
|
1997
|
+
onMount(function() { return seeded ? fetchData(backgroundRun) : fetchData(); });
|
|
1998
|
+
}
|
|
1999
|
+
|
|
2000
|
+
// The worker has a newer answer for this URL, or the outbox changed: a
|
|
2001
|
+
// write waiting on it is shown on top, and one that reached the server
|
|
2002
|
+
// stays shown until the refetch it triggers includes it.
|
|
2003
|
+
var unwatch = __stxQueries.watch({
|
|
2004
|
+
target: queryTarget,
|
|
2005
|
+
updated: function() {
|
|
2006
|
+
delete _queryCache[cacheKey || queryTarget().url];
|
|
2007
|
+
fetchData(backgroundRun);
|
|
2008
|
+
},
|
|
2009
|
+
outbox: function(sent) {
|
|
2010
|
+
if (sent) {
|
|
2011
|
+
base = __stxQueries.overlay(queryTarget(), base, sent.id);
|
|
2012
|
+
delete _queryCache[cacheKey || queryTarget().url];
|
|
2013
|
+
fetchData(backgroundRun);
|
|
2014
|
+
}
|
|
2015
|
+
show(base);
|
|
2016
|
+
}
|
|
2017
|
+
});
|
|
2018
|
+
onDestroy(unwatch);
|
|
1960
2019
|
|
|
1961
2020
|
// A refetch nobody asked for does not set loading. Both of these refresh
|
|
1962
2021
|
// data that is ALREADY on screen, so driving the first-load state from them
|
|
1963
2022
|
// put a spinner over a populated view once a minute, forever \u2014 the reason a
|
|
1964
2023
|
// polling view could not use this composable at all (#1929). Bind
|
|
1965
2024
|
// isFetching for a subtle in-flight indicator.
|
|
1966
|
-
var backgroundRun = { background: true };
|
|
1967
2025
|
|
|
1968
2026
|
// refetchOnFocus \u2014 removed on destroy, like refetchInterval right below.
|
|
1969
2027
|
// It used to add a listener and never remove it, so every instance leaked
|
|
@@ -3059,7 +3117,7 @@ catch (e2) {
|
|
|
3059
3117
|
};
|
|
3060
3118
|
|
|
3061
3119
|
// Known directive names to exclude from generic :attr binding
|
|
3062
|
-
var DIRECTIVE_NAMES = ${
|
|
3120
|
+
var DIRECTIVE_NAMES = ${Qz()};
|
|
3063
3121
|
|
|
3064
3122
|
// A bound value cannot introduce a URL scheme the page did not ask for.
|
|
3065
3123
|
// This is the client half of url-safety.ts: the server refuses a scheme
|
|
@@ -3094,7 +3152,7 @@ catch (e2) {
|
|
|
3094
3152
|
// a dead duplicate attribute and the real viewBox never updates.
|
|
3095
3153
|
var SVG_ATTR_CASE = {attributename:'attributeName', attributetype:'attributeType', basefrequency:'baseFrequency', baseprofile:'baseProfile', calcmode:'calcMode', clippathunits:'clipPathUnits', diffuseconstant:'diffuseConstant', edgemode:'edgeMode', filterunits:'filterUnits', glyphref:'glyphRef', gradienttransform:'gradientTransform', gradientunits:'gradientUnits', kernelmatrix:'kernelMatrix', kernelunitlength:'kernelUnitLength', keypoints:'keyPoints', keysplines:'keySplines', keytimes:'keyTimes', lengthadjust:'lengthAdjust', limitingconeangle:'limitingConeAngle', markerheight:'markerHeight', markerunits:'markerUnits', markerwidth:'markerWidth', maskcontentunits:'maskContentUnits', maskunits:'maskUnits', numoctaves:'numOctaves', pathlength:'pathLength', patterncontentunits:'patternContentUnits', patterntransform:'patternTransform', patternunits:'patternUnits', pointsatx:'pointsAtX', pointsaty:'pointsAtY', pointsatz:'pointsAtZ', preservealpha:'preserveAlpha', preserveaspectratio:'preserveAspectRatio', primitiveunits:'primitiveUnits', refx:'refX', refy:'refY', repeatcount:'repeatCount', repeatdur:'repeatDur', requiredextensions:'requiredExtensions', requiredfeatures:'requiredFeatures', specularconstant:'specularConstant', specularexponent:'specularExponent', spreadmethod:'spreadMethod', startoffset:'startOffset', stddeviation:'stdDeviation', stitchtiles:'stitchTiles', surfacescale:'surfaceScale', systemlanguage:'systemLanguage', tablevalues:'tableValues', targetx:'targetX', targety:'targetY', textlength:'textLength', viewbox:'viewBox', viewtarget:'viewTarget', xchannelselector:'xChannelSelector', ychannelselector:'yChannelSelector', zoomandpan:'zoomAndPan'};
|
|
3096
3154
|
var SVG_NS = 'http://www.w3.org/2000/svg';
|
|
3097
|
-
var EVENT_RE = ${
|
|
3155
|
+
var EVENT_RE = ${Xz()};
|
|
3098
3156
|
var KEY_MAP = {enter:'Enter', tab:'Tab', escape:'Escape', space:' ', up:'ArrowUp', down:'ArrowDown', left:'ArrowLeft', right:'ArrowRight', 'delete':'Delete', backspace:'Backspace'};
|
|
3099
3157
|
|
|
3100
3158
|
// Handle attributes
|
|
@@ -3130,7 +3188,7 @@ catch (e2) {
|
|
|
3130
3188
|
// :attr still works for backward compat but is reserved for structural directives.
|
|
3131
3189
|
// x-text, x-html, x-model, x-show, x-if, x-for, x-cloak, x-ref, x-data are
|
|
3132
3190
|
// handled by their own code paths below \u2014 exclude them here.
|
|
3133
|
-
var X_HANDLED = ${
|
|
3191
|
+
var X_HANDLED = ${Jz()};
|
|
3134
3192
|
if (name.startsWith('@bind:') || name.startsWith('x-bind:')
|
|
3135
3193
|
|| (name.startsWith(':') && !name.startsWith('::') && !DIRECTIVE_NAMES[name.slice(1).split('.')[0]] && !EVENT_RE.test(name.slice(1)))
|
|
3136
3194
|
|| (name.startsWith('x-') && !X_HANDLED[name.split('.')[0]] && !X_HANDLED[name])) {
|
|
@@ -6235,29 +6293,62 @@ catch (e) {} }
|
|
|
6235
6293
|
|
|
6236
6294
|
// A value kept between visits, for a phone app between launches: the tab a
|
|
6237
6295
|
// user opens right after starting the app draws last time's data at once
|
|
6238
|
-
// and the fresh answer replaces it. Kept
|
|
6239
|
-
//
|
|
6240
|
-
//
|
|
6241
|
-
//
|
|
6242
|
-
// forgetKeptState(scope) removes a scope's values, or
|
|
6296
|
+
// and the fresh answer replaces it. Kept under stx:kept:, in a scope such as
|
|
6297
|
+
// the signed-in account, so one person's data is never shown to another. A
|
|
6298
|
+
// scope of false, null or '' keeps nothing (a plain state), for a page or a
|
|
6299
|
+
// visitor that should not leave data behind; no scope at all uses the one
|
|
6300
|
+
// given to setKeptScope. forgetKeptState(scope) removes a scope's values, or
|
|
6301
|
+
// every kept value.
|
|
6302
|
+
//
|
|
6303
|
+
// Stored by the kept store (offline/kept-store.ts): small values in
|
|
6304
|
+
// localStorage, readable on the first draw, large ones in IndexedDB, written
|
|
6305
|
+
// off the critical path and read back asynchronously. Values kept before it
|
|
6306
|
+
// are read where they are.
|
|
6243
6307
|
var STX_KEPT_PREFIX = 'stx:kept:';
|
|
6308
|
+
var __stxKept = (${_z.toString()})(undefined, ${Zz.toString()});
|
|
6309
|
+
var __stxQueries = (${Gz.toString()})({ state: state, kept: __stxKept, prefix: STX_KEPT_PREFIX, matches: ${$z.toString()} });
|
|
6244
6310
|
function stxKeptPrefix(scope) {
|
|
6245
6311
|
return STX_KEPT_PREFIX + (scope === undefined || scope === null || scope === '' ? '' : String(scope) + ':');
|
|
6246
6312
|
}
|
|
6247
6313
|
function keptState(name, initialValue, options) {
|
|
6248
6314
|
var scope = options ? options.scope : undefined;
|
|
6315
|
+
if (scope === undefined) scope = __stxQueries.scope();
|
|
6249
6316
|
if (scope === false || scope === null || scope === '') return state(initialValue);
|
|
6250
|
-
|
|
6317
|
+
var key = stxKeptPrefix(scope) + name;
|
|
6318
|
+
var hit = __stxKept.peek(key);
|
|
6319
|
+
var s = state(hit ? hit.value : initialValue);
|
|
6320
|
+
var restored = {};
|
|
6321
|
+
var touched = false;
|
|
6322
|
+
s.subscribe(function(value) {
|
|
6323
|
+
if (value === restored) return;
|
|
6324
|
+
touched = true;
|
|
6325
|
+
__stxKept.set(key, value);
|
|
6326
|
+
});
|
|
6327
|
+
// Large values are kept where only an asynchronous read reaches: they
|
|
6328
|
+
// arrive a moment later, unless the screen set its own first.
|
|
6329
|
+
if (!hit) {
|
|
6330
|
+
__stxKept.load(key).then(function(found) {
|
|
6331
|
+
if (!found || touched) return;
|
|
6332
|
+
restored = found.value;
|
|
6333
|
+
s.set(found.value);
|
|
6334
|
+
});
|
|
6335
|
+
}
|
|
6336
|
+
return s;
|
|
6251
6337
|
}
|
|
6252
6338
|
function forgetKeptState(scope) {
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6339
|
+
return __stxKept.forget(stxKeptPrefix(scope));
|
|
6340
|
+
}
|
|
6341
|
+
// The account kept state and cached queries belong to when they name none.
|
|
6342
|
+
function setKeptScope(scope) {
|
|
6343
|
+
__stxQueries.setScope(scope);
|
|
6344
|
+
}
|
|
6345
|
+
// Finish writing what is kept (before signing out, or in a test).
|
|
6346
|
+
function flushKeptState() {
|
|
6347
|
+
return __stxKept.flush();
|
|
6348
|
+
}
|
|
6349
|
+
// A query kept per account and refreshed behind: see offline/query-cache.ts.
|
|
6350
|
+
function cachedQuery(key, options) {
|
|
6351
|
+
return __stxQueries.cachedQuery(key, options);
|
|
6261
6352
|
}
|
|
6262
6353
|
|
|
6263
6354
|
// Reactive cookie binding. Mirrors useLocalStorage's shape: returns a string-
|
|
@@ -6340,7 +6431,7 @@ catch (e) {} }
|
|
|
6340
6431
|
return normalizedPrefix + '-' + __stxGeneratedIdCounter;
|
|
6341
6432
|
}
|
|
6342
6433
|
|
|
6343
|
-
var createModelSignal = ${
|
|
6434
|
+
var createModelSignal = ${r.toString()};
|
|
6344
6435
|
function useModel(name, options) {
|
|
6345
6436
|
if (typeof name !== 'string') { options = name || {}; name = 'modelValue'; }
|
|
6346
6437
|
options = options || {};
|
|
@@ -7322,6 +7413,9 @@ catch (e) {} }
|
|
|
7322
7413
|
useSessionStorage,
|
|
7323
7414
|
keptState,
|
|
7324
7415
|
forgetKeptState,
|
|
7416
|
+
setKeptScope,
|
|
7417
|
+
flushKeptState,
|
|
7418
|
+
cachedQuery,
|
|
7325
7419
|
useCookie,
|
|
7326
7420
|
useId,
|
|
7327
7421
|
useReactiveProp,
|
|
@@ -8156,6 +8250,9 @@ else {
|
|
|
8156
8250
|
window.useSessionStorage = useSessionStorage;
|
|
8157
8251
|
window.keptState = keptState;
|
|
8158
8252
|
window.forgetKeptState = forgetKeptState;
|
|
8253
|
+
window.setKeptScope = setKeptScope;
|
|
8254
|
+
window.flushKeptState = flushKeptState;
|
|
8255
|
+
window.cachedQuery = cachedQuery;
|
|
8159
8256
|
window.useEventListener = useEventListener;
|
|
8160
8257
|
window.useWebSocket = useWebSocket;
|
|
8161
8258
|
window.useColorMode = useColorMode;
|
|
@@ -9210,5 +9307,5 @@ catch (e) { console.warn('[stx] destroy callback error:', e); }
|
|
|
9210
9307
|
}
|
|
9211
9308
|
}
|
|
9212
9309
|
})();
|
|
9213
|
-
`}var
|
|
9214
|
-
export{
|
|
9310
|
+
`}var nz={state:y,derived:Mz,effect:u,batch:Kz,onMount:Vz,onDestroy:k,isSignal:d,isDerived:i,untrack:Nz,peek:Hz,generateSignalsRuntime:Dz,generateSignalsRuntimeDev:Pz};
|
|
9311
|
+
export{Az as gj,Bz as hj,Rz as ij,zz as jj,Iz as kj,Oz as lj,qz as mj,jz as nj,Sz as oj,Fz as pj,Cz as qj,xz as rj,wz as sj,mz as tj,Yz as uj,Zz as vj,_z as wj,$z as xj,Gz as yj,Dz as zj,Pz as Aj,nz as Bj};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{g as
|
|
2
|
+
import{Uf as T}from"./chunk-z5rwnnk1.js";import{ix as I}from"./chunk-2fw05hs2.js";import E from"fs";import X from"path";import U from"crypto";var _=new Set(["webp","avif","jpeg","png"]),F=new Set(["cover","contain","fill","inside","outside"]),A=new Set([".jpg",".jpeg",".png",".webp",".avif",".gif"]),S=4096,y=80,D="cover";async function g(k,G){let J=G.routePath??"/_stx/img",B=new URL(k.url);if(B.pathname!==J)return null;let $=q(B,G);if(!$.ok)return new Response($.error,{status:$.status,headers:{"Content-Type":"text/plain"}});let{srcFsPath:j,srcUrl:K,width:H,height:v,format:Z,quality:Y,fit:z}=$,C;try{C=E.statSync(j)}catch{return new Response(`Source image not found: ${K}`,{status:404,headers:{"Content-Type":"text/plain"}})}if(!C.isFile())return new Response("Not a file",{status:404,headers:{"Content-Type":"text/plain"}});let N=G.cacheDir??".stx/cache/img";await E.promises.mkdir(N,{recursive:!0});let V=`${j}:${C.mtimeMs}:${C.size}`,O=`${H}x${v}:${Z}:${Y}:${z}`,b=U.createHash("sha256").update(`${V}|${O}`).digest("hex").slice(0,16),Q=X.join(N,`${b}.${Z}`),W={"Content-Type":T(Z),"Cache-Control":"public, max-age=31536000, immutable",ETag:`"${b}"`,"X-Stx-Image-Cache":"HIT"};if(k.headers.get("if-none-match")===`"${b}"`)return new Response(null,{status:304,headers:W});let L=Bun.file(Q);if(await L.exists())return new Response(L,{headers:W});try{let R=Buffer.from(await Bun.file(j).arrayBuffer()),{resizeAndConvert:M}=await P(),w=await M(R,{width:H,height:v,format:Z,quality:Y,fit:z});return await Bun.write(Q,w),W["X-Stx-Image-Cache"]="MISS",new Response(new Uint8Array(w),{headers:W})}catch(R){let M=R.message;return new Response(`Image processing failed: ${M}`,{status:500,headers:{"Content-Type":"text/plain"}})}}function l(k){return async(G)=>{return await g(G,k)??new Response("Not Found",{status:404,headers:{"Content-Type":"text/plain"}})}}function q(k,G){let J=k.searchParams.get("src");if(!J)return{ok:!1,error:"Missing required param: src",status:400};if(!J.startsWith("/"))return{ok:!1,error:"src must be an absolute URL path (start with /)",status:400};if(J.startsWith("//"))return{ok:!1,error:"src must be a local path",status:400};let B=X.extname(J).toLowerCase();if(!A.has(B))return{ok:!1,error:`Unsupported source extension: ${B}`,status:400};let $=X.resolve(G.publicDir),j=X.resolve($,J.slice(1));if(!j.startsWith(`${$}${X.sep}`)&&j!==$)return{ok:!1,error:"src is outside publicDir",status:400};let K=G.maxWidth??S,H=G.maxHeight??S,v=k.searchParams.get("w"),Z=k.searchParams.get("h"),Y=v?Number.parseInt(v,10):0,z=Z?Number.parseInt(Z,10):0;if(v&&(!Number.isFinite(Y)||Y<=0))return{ok:!1,error:"Invalid w (must be positive integer)",status:400};if(Z&&(!Number.isFinite(z)||z<=0))return{ok:!1,error:"Invalid h (must be positive integer)",status:400};if(!v&&!Z)return{ok:!1,error:"At least one of w or h is required",status:400};let C=Math.min(Y||K,K),N=Math.min(z||H,H),V=k.searchParams.get("f")||"webp";if(!_.has(V))return{ok:!1,error:`Invalid f (must be one of: ${[..._].join(", ")})`,status:400};let O=V,b=k.searchParams.get("q"),Q=b?Number.parseInt(b,10):G.defaultQuality??y;if(!Number.isFinite(Q)||Q<1||Q>100)return{ok:!1,error:"Invalid q (must be 1-100)",status:400};let x=k.searchParams.get("fit")||G.defaultFit||D;if(!F.has(x))return{ok:!1,error:`Invalid fit (must be one of: ${[...F].join(", ")})`,status:400};return{ok:!0,srcFsPath:j,srcUrl:J,width:C,height:N,format:O,quality:Q,fit:x}}async function P(){return await import("./chunk-1fs9jvpb.js")}
|
|
3
|
+
export{g as Ff,l as Gf};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Aj as p,Bj as q,zj as o}from"./chunk-t5ja7qkn.js";import{Hj as a,Ij as b,Jj as c,Kj as d,Lj as e,Mj as f,Nj as g,Oj as h,Pj as i,Qj as j,Rj as k,Sj as l,Tj as m,Uj as n}from"./chunk-9e8t0twa.js";import"./chunk-gbmeh7jg.js";import"./chunk-2fw05hs2.js";export{n as useOptimistic,l as untrack,a as state,g as runMountCallbacks,h as runDestroyCallbacks,i as pendingLifecycleCounts,m as peek,e as onMount,f as onDestroy,j as isSignal,k as isDerived,p as generateSignalsRuntimeDev,o as generateSignalsRuntime,c as effect,b as derived,q as default,d as batch};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import C from"path";var G=".stx",K="STX_DIR",J=null;function O(j){J=j?.trim()||null}function H(){return process.env[K]?.trim()||J||G}function Q(j=process.cwd(),...q){let B=H();return C.isAbsolute(B)?C.join(B,...q):C.join(j,B,...q)}function W(j){if(!j||C.isAbsolute(j))return j;let q=j.replace(/\\/g,"/");if(q!==G&&!q.startsWith(`${G}/`))return j;let B=q.slice(G.length+1);return B?C.join(H(),B):H()}
|
|
3
|
-
export{G as
|
|
3
|
+
export{G as Ft,K as Gt,O as Ht,H as It,Q as Jt,W as Kt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ao as b,Bo as c,Co as d,Do as e,Eo as f,Fo as g,Go as h,Ho as i,Io as j,Jo as k,Ko as l,Lo as m,Mo as n,zo as a}from"./chunk-cqchpe34.js";import"./chunk-aq1xq0r4.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-0a315nbf.js";import"./chunk-tkyrk66a.js";import"./chunk-213jwgpx.js";import"./chunk-5r4s9s38.js";import"./chunk-1te8k8gp.js";import"./chunk-zpcnbdhn.js";import"./chunk-rz9f3zqz.js";import"./chunk-bn1edb1y.js";import"./chunk-cj3adc77.js";import"./chunk-t1htzg9e.js";import"./chunk-gbmeh7jg.js";import"./chunk-rt3cx932.js";import"./chunk-vx86cf4r.js";import"./chunk-563shnkz.js";import"./chunk-2fw05hs2.js";export{n as stripStxRuntimeImports,b as scanScriptTags,m as rewriteStxImportSpecifiers,k as processSignals,i as processScriptSetup,f as preEvalLiteralReactiveIfs,c as parseLoopExpression,d as hasSignalsSyntax,l as findMarkupIndexOutsideScripts,j as extractExports,h as convertSignalLoopsToAttributes,e as convertSignalDirectivesToAttributes,g as convertServerLoopAttributesToDirectives,a as clearScriptScanCache};
|
|
@@ -9,4 +9,4 @@ function G(H,M){let j=H[M],J=M+1;while(J<H.length){if(H[J]==="\\"){J+=2;continue
|
|
|
9
9
|
`:" ",j++}M+=" ",j++,J=z,U="";continue}if(V==="/"&&P(J,U)){let $=Q(H,j);if($!==-1){M+=`/${" ".repeat($-j-2)}/`,j=$,J=z,U="";continue}}if(V==="`"){M+=" ",j++;while(j<H.length&&H[j]!=="`"){if(H[j]==="\\"){M+=" ",j+=2;continue}if(H[j]==="$"&&H[j+1]==="{"){let $=j+2,B=F(H,$);if(M+=" ",M+=X(H.slice($,B)),B<H.length)M+=" ";j=B+1;continue}M+=H[j]===`
|
|
10
10
|
`?`
|
|
11
11
|
`:" ",j++}M+=" ",j++,J=z,U="";continue}if(M+=V,j++,/[\w$]/.test(V))U=/[\w$]/.test(J)?U+V:V,J=V;else if(!/\s/.test(V))J=V,U=""}return M}function Y(H){let M=new Uint16Array(H.length),j=0,J=!0;for(let U=0;U<H.length;U++){let Z=H[U];if(Z===")"||Z==="]"||Z==="}")if(j===0)J=!1;else j--;if(M[U]=j,Z==="("||Z==="["||Z==="{")j++}return{depths:M,balanced:J&&j===0}}
|
|
12
|
-
export{F as
|
|
12
|
+
export{F as Gs,X as Hs,Y as Is};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{l as a,m as b,n as c}from"./chunk-q9n5swx7.js";import"./chunk-
|
|
2
|
+
import{l as a,m as b,n as c}from"./chunk-q9n5swx7.js";import"./chunk-2fw05hs2.js";export{c as updateContextTree,b as updateContextStoryFiles,a as createContext};
|
|
@@ -299,4 +299,4 @@ catch (error) {
|
|
|
299
299
|
}
|
|
300
300
|
})();
|
|
301
301
|
</script>`}var N={name:"pwa.installButton",handler:(j,z,k,E)=>{let q=k.__stx_options||{};return H(j,q)},hasEndTag:!0,description:"Renders a PWA install prompt button that appears when the app can be installed"},Q={name:"pwa.updatePrompt",handler:(j,z,k,E)=>{let q=k.__stx_options||{};return J(j,q)},hasEndTag:!0,description:"Renders a PWA update notification UI when a new version is available"},T={name:"pwa.offlineIndicator",handler:(j,z,k,E)=>{let q=k.__stx_options||{};return L(j,q)},hasEndTag:!0,description:"Renders an offline status indicator that shows when the user loses connection"},V={name:"pwa.pushSubscribe",handler:(j,z,k,E)=>{let q=k.__stx_options||{};return M(j,q)},hasEndTag:!0,description:"Renders a push notification subscription button"},X=[N,Q,T,V];function Z(j){return[...j,...X]}
|
|
302
|
-
export{N as
|
|
302
|
+
export{N as Xw,Q as Yw,T as Zw,V as _w,X as $w,Z as ax};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{Q as
|
|
2
|
+
import{Eg as I}from"./chunk-ny67c03k.js";import{Or as H}from"./chunk-cqchpe34.js";import{ix as G}from"./chunk-2fw05hs2.js";import L from"path";async function Q(k={}){let J=performance.now(),A=k.root||process.cwd(),j=await H(A),B=k.ssr?.routeRules??j.routeRules??{};if(I(B),!j.ssr&&Object.keys(B).length)throw Error("routeRules require ssr: true and the production server; flat SSG output cannot apply request/cache policies");if(!j.ssr&&(k.ssr?.serverApi??j.serverApi))throw Error("serverApi requires ssr: true; flat SSG output cannot execute API endpoints");let q=j.ssr?"ssr":"ssg";console.log(`[stx build] Mode: ${q.toUpperCase()}${j.ssr?" (ssr: true in stx.config.ts)":" (default \u2014 ssr is false)"}`);let D,E;if(q==="ssg"){let{generateStaticSite:z}=await import("./ssg.js");D=await z({pagesDir:L.join(j.root||".",j.pagesDir||j.build?.pagesDir||"pages"),publicDir:j.publicDir||j.build?.publicDir||"public",outputDir:j.build?.outputDir||"dist",generate404:j.build?.generate404??!0,minify:j.build?.minify??!0,cleanOutput:j.build?.cleanOutput??!0,router:j.router,...k.ssg})}else{let{buildForProduction:z}=await import("./chunk-p32x2apf.js");E=await z({root:A,outputDir:".output",debug:k.debug,...k.ssr})}let K=Math.round(performance.now()-J);return{mode:q,ssg:D,ssr:E,duration:K}}
|
|
3
|
+
export{Q as $e};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Mr as P,No as x,Wo as k,aq as w,cm as A,dm as b,ko as M,mn as T,nn as y,wm as B,ym as F,yo as R}from"./chunk-cqchpe34.js";import{ix as v}from"./chunk-2fw05hs2.js";function j(K){return K.endsWith(".md")||K.endsWith(".markdown")}function C(K){let z=[];_(/<pre\b[^>]*>[\s\S]*?<\/pre>/gi);let G=[...z];_(/<code\b[^>]*>[\s\S]*?<\/code>/gi,G);function _(J,Y){let $;while(($=J.exec(K))!==null){let q=$.index,N=q+$[0].length;if(Y?.some((X)=>q>=X.start&&N<=X.end))continue;z.push({start:q,end:N})}}if(z.length===0)return K;z.sort((J,Y)=>J.start-Y.start);let U="",Q=0;for(let J of z){if(J.start<Q)continue;U+=K.slice(Q,J.start),U+=`@raw${K.slice(J.start,J.end)}@endraw`,Q=J.end}return U+=K.slice(Q),U}async function D(K,z={}){let{data:G,content:_}=A(K),Q=await(z.renderer??((J)=>b(J)))(_);return{html:C(Q),frontmatter:G??{}}}import{dirname as f,resolve as H}from"path";function S(K){let z=K,G=M(K);if(G)z=G.content.trim();let _=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,U=[],Q=[],J=[],Y=(N)=>/\b(?:state|derived|effect|batch)\s*(?:<[^<>()]*>)?\s*\(/.test(N),$;while(($=_.exec(K))!==null){let N=$[1],X=$[2],E=$[0],Z=N.includes("server");if(Y(X))J.push(E);else if(Z)Q.push(X);else U.push(E)}let q=z;{let N=/<script\b(?![^>]*\b(?:client|type\s*=\s*["']module["']|src\s*=))[^>]*>/gi,X,E=[];while((X=N.exec(q))!==null){let Z=X.index+X[0].length,L=q.indexOf("</script>",Z);if(L===-1)continue;E.push({start:X.index,end:L+9}),N.lastIndex=L+9}for(let Z=E.length-1;Z>=0;Z--)q=q.substring(0,E[Z].start)+q.substring(E[Z].end)}for(let N of U)q=q.replace(N,"");return{templateContent:q,serverScripts:Q,clientScripts:U,signalsScripts:J}}function g(K,z){return`<!DOCTYPE html>
|
|
3
3
|
<html lang="en">
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="UTF-8">
|
|
@@ -14,5 +14,5 @@ ${Q.join(`
|
|
|
14
14
|
`)}`}else{if(G.processClientScripts!==!1&&Q.length>0){let N=Y.__stx_event_bindings||[],X=B(Y),Z=(await Promise.all(Q.map(async(I)=>{let W=I.match(/<script\b[^>]*>([\s\S]*?)<\/script>/);if(!W)return I;return await F(W[1],{eventBindings:N,templateContent:q,serverData:X,filePath:z})}))).join(`
|
|
15
15
|
`);if(q.match(/(<\/body>)/i))q=q.replace(/(<\/body>)/i,`${Z}
|
|
16
16
|
$1`);else q+=`
|
|
17
|
-
${Z}`}q=await R(q)}if(G.wrapInDocument){if(!q.trim().toLowerCase().startsWith("<!doctype")&&!q.trim().toLowerCase().startsWith("<html"))q=g(q,G.title)}if(G.injectCSS)try{let{injectCss:N}=await import("./chunk-
|
|
18
|
-
export{j as
|
|
17
|
+
${Z}`}q=await R(q)}if(G.wrapInDocument){if(!q.trim().toLowerCase().startsWith("<!doctype")&&!q.trim().toLowerCase().startsWith("<html"))q=g(q,G.title)}if(G.injectCSS)try{let{injectCss:N}=await import("./chunk-n9cqrw9j.js");q=await N(q)}catch{}return q}
|
|
18
|
+
export{j as Ak,C as Bk,D as Ck,o as Dk,r as Ek,V as Fk};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{jl as a,kl as b,ll as c,ml as d,nl as e,ol as f,pl as g,ql as h,rl as i,sl as j,tl as k,ul as l,vl as m,wl as n,xl as o}from"./chunk-gjrgr367.js";import"./chunk-gengvwb7.js";import"./chunk-s8jd13nb.js";import"./chunk-cqchpe34.js";import"./chunk-aq1xq0r4.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-0a315nbf.js";import"./chunk-tkyrk66a.js";import"./chunk-213jwgpx.js";import"./chunk-5r4s9s38.js";import"./chunk-1te8k8gp.js";import"./chunk-zpcnbdhn.js";import"./chunk-rz9f3zqz.js";import"./chunk-bn1edb1y.js";import"./chunk-cj3adc77.js";import"./chunk-t1htzg9e.js";import"./chunk-gbmeh7jg.js";import"./chunk-rt3cx932.js";import"./chunk-vx86cf4r.js";import"./chunk-563shnkz.js";import"./chunk-2fw05hs2.js";export{o as tempBuildName,b as shouldLogBundlerDiagnostics,f as setBundlerFallbackMode,l as rewriteRegistryImports,g as resolveBundlerFallback,j as registryIdForPath,c as recordBundleFailure,m as queueClientBundleBuild,k as normalizeRegistrySpecifiers,h as hasUserImports,d as getBundleFailures,a as clientBundleDependencies,e as clearBundleFailures,n as bundleClientScript,i as MODULE_SPECIFIER_PREFIX};
|