@stacksjs/stx 0.2.413 → 0.2.415
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/appearance-bootstrap.js +1 -1
- package/dist/binding-manifest.d.ts +1 -1
- package/dist/builtins/image-delivery.js +19 -11
- package/dist/bundle-analyzer.js +20 -20
- package/dist/chunk-020xyn9q.js +3 -0
- package/dist/chunk-04jhmfbz.js +2 -0
- package/dist/chunk-0pnj3zt2.js +2 -0
- package/dist/{chunk-bwjxk1dw.js → chunk-0zaess6f.js} +29 -29
- package/dist/chunk-1098mas0.js +2 -0
- package/dist/chunk-169n1vpx.js +12 -0
- package/dist/chunk-18vmfkcc.js +2 -0
- package/dist/chunk-1b6t12hd.js +2 -0
- package/dist/chunk-1xdzcy9d.js +14 -0
- package/dist/chunk-1zs30k3y.js +2 -0
- package/dist/chunk-2ce7f416.js +2 -0
- package/dist/chunk-340a824p.js +2 -0
- package/dist/chunk-393341w7.js +2 -0
- package/dist/chunk-39g1134q.js +2 -0
- package/dist/chunk-3efw27as.js +2785 -0
- package/dist/chunk-3kthfs03.js +3 -0
- package/dist/chunk-3qn1wcdg.js +2 -0
- package/dist/chunk-3s2vnqcf.js +2 -0
- package/dist/chunk-42wbs8vq.js +17 -0
- package/dist/chunk-4bjravgk.js +2 -0
- package/dist/chunk-5gsxpaqk.js +2 -0
- package/dist/{chunk-bwsxym3d.js → chunk-5qns2sdz.js} +17 -17
- package/dist/chunk-6cfa3g0r.js +2 -0
- package/dist/{chunk-bjar18jd.js → chunk-6h38kkjf.js} +46 -52
- package/dist/chunk-6hc5vz20.js +3 -0
- package/dist/chunk-6q6g76vg.js +499 -0
- package/dist/chunk-74j18qk0.js +930 -0
- package/dist/chunk-752hw7cd.js +4 -0
- package/dist/{chunk-kgd8kchy.js → chunk-765e1s44.js} +11 -76
- package/dist/chunk-7gkv67ky.js +4 -0
- package/dist/chunk-7z2ra0yf.js +2 -0
- package/dist/chunk-8eqrwj1k.js +20 -0
- package/dist/chunk-8nhshfz6.js +5 -0
- package/dist/chunk-92ps1xpk.js +2 -0
- package/dist/chunk-96k8s808.js +3 -0
- package/dist/chunk-9amp82bx.js +7 -0
- package/dist/chunk-9g27ybyr.js +3 -0
- package/dist/chunk-9p9qkbtg.js +3 -0
- package/dist/{chunk-xq1acw1r.js → chunk-9pt8fd2n.js} +13 -13
- package/dist/{chunk-24zher49.js → chunk-9vrja6vp.js} +4 -4
- package/dist/chunk-9xrbve19.js +2 -0
- package/dist/chunk-a688m6js.js +3 -0
- package/dist/chunk-ak1cgcah.js +5 -0
- package/dist/{chunk-4m7ajama.js → chunk-amd6ey3t.js} +14 -14
- package/dist/chunk-amtr3rmf.js +11 -0
- package/dist/chunk-atws6p5s.js +2 -0
- package/dist/chunk-b84h16er.js +61 -0
- package/dist/chunk-b98be3yp.js +32 -0
- package/dist/{chunk-hx998w7n.js → chunk-bay9s6rs.js} +13 -13
- package/dist/chunk-ce1sejr3.js +3 -0
- package/dist/chunk-cg8hg6cs.js +3 -0
- package/dist/{chunk-4f9zyfdw.js → chunk-czxt605c.js} +4 -5
- package/dist/chunk-dd8cja4h.js +2 -0
- package/dist/chunk-dgdm3hy3.js +2 -0
- package/dist/chunk-e9hs7kk6.js +12 -0
- package/dist/chunk-eed4fwps.js +3 -0
- package/dist/chunk-ej9j6k1q.js +3 -0
- package/dist/chunk-et0rr8c7.js +3 -0
- package/dist/chunk-f1sxycmv.js +2 -0
- package/dist/chunk-f46qsp4m.js +4 -0
- package/dist/chunk-fbcv4fes.js +2 -0
- package/dist/{chunk-bjcsc6wx.js → chunk-fh1qrp68.js} +21 -21
- package/dist/chunk-fjs0a8h7.js +2 -0
- package/dist/chunk-fpfzm238.js +2 -0
- package/dist/chunk-fr2txj8q.js +829 -0
- package/dist/{chunk-xssw417m.js → chunk-ft4p6d28.js} +14 -14
- package/dist/chunk-fyzajkrx.js +2 -0
- package/dist/chunk-fzapbw9p.js +3 -0
- package/dist/chunk-g03s93qr.js +3 -0
- package/dist/chunk-g186znp9.js +33 -0
- package/dist/chunk-gawrg4gb.js +216 -0
- package/dist/chunk-gc1drn2p.js +2 -0
- package/dist/chunk-gea5hf0v.js +2 -0
- package/dist/chunk-gqv3ta5d.js +2 -0
- package/dist/chunk-h6kp2m9r.js +2 -0
- package/dist/chunk-h6zsqb9r.js +3 -0
- package/dist/{chunk-2snqdnk9.js → chunk-h85hrwkq.js} +13 -13
- package/dist/chunk-hbxz85wy.js +2 -0
- package/dist/chunk-hepd9qgx.js +6 -0
- package/dist/chunk-hhnw2sn3.js +2 -0
- package/dist/chunk-hjg3ndgh.js +2 -0
- package/dist/chunk-hk1mj4tz.js +2 -0
- package/dist/{chunk-smcj3442.js → chunk-hkrmcbwy.js} +79 -79
- package/dist/chunk-hn9pkyv8.js +2 -0
- package/dist/chunk-hpgr4qgp.js +2 -0
- package/dist/chunk-hrbbbtbn.js +2 -0
- package/dist/chunk-j03revz2.js +8 -0
- package/dist/chunk-j9qcrwbg.js +2 -0
- package/dist/chunk-jk4njz0w.js +2 -0
- package/dist/chunk-jmabeqfq.js +2 -0
- package/dist/chunk-jnkrn913.js +4 -0
- package/dist/chunk-jp10q90g.js +2 -0
- package/dist/chunk-jt0n43mk.js +2 -0
- package/dist/chunk-kjbv8a3m.js +2 -0
- package/dist/chunk-m1vdghnx.js +2 -0
- package/dist/chunk-m4sk62wb.js +5 -0
- package/dist/chunk-md8rqn48.js +30 -0
- package/dist/chunk-mp6hy8g4.js +2 -0
- package/dist/chunk-nc8my58s.js +2 -0
- package/dist/chunk-ngc2wke4.js +3 -0
- package/dist/chunk-nn2vstke.js +2 -0
- package/dist/chunk-nppdrf0x.js +2 -0
- package/dist/chunk-p2v2a68k.js +2 -0
- package/dist/chunk-pazfr1a1.js +2 -0
- package/dist/{chunk-qn5srnj3.js → chunk-pbh4smw3.js} +16 -16
- package/dist/chunk-pdb5fw3r.js +2 -0
- package/dist/chunk-pdt69hpb.js +2 -0
- package/dist/chunk-pgzvyrv6.js +29 -0
- package/dist/chunk-px7fvbj6.js +3 -0
- package/dist/chunk-q6vrb2pe.js +2 -0
- package/dist/chunk-q7qchkvk.js +2 -0
- package/dist/chunk-q9bdh4s5.js +8 -0
- package/dist/chunk-qghxz7jm.js +194 -0
- package/dist/chunk-r3f9jcf7.js +5 -0
- package/dist/chunk-re8b5r9x.js +3 -0
- package/dist/chunk-s5xezjps.js +3 -0
- package/dist/chunk-sd321bn3.js +2 -0
- package/dist/chunk-shr559s7.js +3 -0
- package/dist/chunk-t4hzprsm.js +3 -0
- package/dist/chunk-t5pvq5mx.js +2 -0
- package/dist/{chunk-pv3d7sfn.js → chunk-t61vdbje.js} +89 -89
- package/dist/chunk-tafqyf2g.js +2033 -0
- package/dist/chunk-tfexmdkt.js +3 -0
- package/dist/chunk-thyt8ed8.js +6 -0
- package/dist/chunk-v91p6ekp.js +24 -0
- package/dist/chunk-vgvtnwxa.js +4 -0
- package/dist/chunk-w72qx0eb.js +2 -0
- package/dist/chunk-wfy1zq53.js +30 -0
- package/dist/chunk-wzx0164n.js +18 -0
- package/dist/chunk-x0q32ees.js +3 -0
- package/dist/chunk-xfp7k0v8.js +64 -0
- package/dist/chunk-xtvf6n6f.js +4 -0
- package/dist/chunk-xwzvfqcb.js +2 -0
- package/dist/chunk-y1cmjvk3.js +43 -0
- package/dist/chunk-y5310237.js +311 -0
- package/dist/chunk-ya0qecph.js +27 -0
- package/dist/chunk-yazk54jr.js +8 -0
- package/dist/chunk-ydjfar14.js +2 -0
- package/dist/chunk-ym95v4nc.js +3 -0
- package/dist/chunk-z0g9jvv0.js +40 -0
- package/dist/chunk-z23kaxq6.js +2 -0
- package/dist/chunk-z8xn5ta3.js +2 -0
- package/dist/{chunk-8sdhs0zk.js → chunk-zhxdpzga.js} +4 -4
- package/dist/cli.js +110 -110
- package/dist/craft-entry.js +7 -7
- package/dist/craft.js +7 -7
- package/dist/database.js +2 -2
- package/dist/image-optimization/component.js +4 -4
- package/dist/media/image/component.js +5 -5
- package/dist/media/protected/component.js +2 -2
- package/dist/media/video/index.js +4 -4
- package/dist/native/bridge/protocol.d.ts +325 -0
- package/dist/native/bridge/protocol.js +219 -0
- package/dist/native/cli.d.ts +24 -0
- package/dist/native/cli.js +52 -0
- package/dist/native/compiler/bundle.d.ts +41 -0
- package/dist/native/compiler/bundle.js +90 -0
- package/dist/native/compiler/client-script.d.ts +8 -0
- package/dist/native/compiler/client-script.js +31 -0
- package/dist/native/compiler/codegen.d.ts +10 -0
- package/dist/native/compiler/codegen.js +145 -0
- package/dist/native/compiler/headwind-to-style.d.ts +395 -0
- package/dist/native/compiler/headwind-to-style.js +1163 -0
- package/dist/native/compiler/html-to-ir.d.ts +41 -0
- package/dist/native/compiler/html-to-ir.js +411 -0
- package/dist/native/compiler/icons.d.ts +220 -0
- package/dist/native/compiler/icons.js +208 -0
- package/dist/native/compiler/ir.d.ts +234 -0
- package/dist/native/compiler/ir.js +15 -0
- package/dist/native/compiler/parser.d.ts +88 -0
- package/dist/native/compiler/parser.js +753 -0
- package/dist/native/compiler/render-screen.d.ts +26 -0
- package/dist/native/compiler/render-screen.js +31 -0
- package/dist/native/components/primitives.d.ts +291 -0
- package/dist/native/components/primitives.js +22 -0
- package/dist/native/hot-reload/client.d.ts +62 -0
- package/dist/native/hot-reload/client.js +324 -0
- package/dist/native/index.d.ts +90 -0
- package/dist/native/index.js +34 -0
- package/dist/native/primitives/ActivityIndicator.stx +5 -0
- package/dist/native/primitives/Button.stx +5 -0
- package/dist/native/primitives/DatePicker.stx +5 -0
- package/dist/native/primitives/FlatList.stx +5 -0
- package/dist/native/primitives/Image.stx +5 -0
- package/dist/native/primitives/ImageBackground.stx +5 -0
- package/dist/native/primitives/KeyboardAvoidingView.stx +5 -0
- package/dist/native/primitives/Modal.stx +5 -0
- package/dist/native/primitives/Picker.stx +5 -0
- package/dist/native/primitives/Pressable.stx +5 -0
- package/dist/native/primitives/RefreshControl.stx +5 -0
- package/dist/native/primitives/SafeAreaView.stx +5 -0
- package/dist/native/primitives/ScrollView.stx +5 -0
- package/dist/native/primitives/SectionList.stx +5 -0
- package/dist/native/primitives/Slider.stx +5 -0
- package/dist/native/primitives/StatusBar.stx +5 -0
- package/dist/native/primitives/Switch.stx +5 -0
- package/dist/native/primitives/Text.stx +5 -0
- package/dist/native/primitives/TextInput.stx +5 -0
- package/dist/native/primitives/TouchableHighlight.stx +5 -0
- package/dist/native/primitives/TouchableOpacity.stx +5 -0
- package/dist/native/primitives/View.stx +5 -0
- package/dist/native/runtime/craft.d.ts +75 -0
- package/dist/native/runtime/craft.js +0 -0
- package/dist/native/runtime/entry.d.ts +1 -0
- package/dist/native/runtime/entry.js +3 -0
- package/dist/native/runtime/index.d.ts +45 -0
- package/dist/native/runtime/index.js +165 -0
- package/dist/native/runtime/native-host.d.ts +33 -0
- package/dist/native/runtime/native-host.js +184 -0
- package/dist/native/runtime/screen.d.ts +43 -0
- package/dist/native/runtime/screen.js +808 -0
- package/dist/pwa/service-worker.js +1 -1
- package/dist/pwa/workbox.js +1 -1
- package/dist/pwa.js +8 -8
- package/dist/site-url.d.ts +1 -1
- package/dist/ssg.js +53 -53
- package/dist/visual-testing.js +42 -42
- package/dist/web-components/reactive-generator.js +2 -2
- package/package.json +9 -5
- package/dist/chunk-0btmm4m2.js +0 -147
- package/dist/chunk-0c2h69k2.js +0 -4
- package/dist/chunk-0d0qeqvv.js +0 -2
- package/dist/chunk-0psndabd.js +0 -2
- package/dist/chunk-0qv8yf53.js +0 -2
- package/dist/chunk-0vkxyvsd.js +0 -2
- package/dist/chunk-0we9nw1d.js +0 -3
- package/dist/chunk-0xqdmemy.js +0 -3
- package/dist/chunk-0y46fbkx.js +0 -3
- package/dist/chunk-158wqccn.js +0 -4422
- package/dist/chunk-1cyxbb8y.js +0 -16
- package/dist/chunk-1enwnh2a.js +0 -2
- package/dist/chunk-213pzm0d.js +0 -3
- package/dist/chunk-21hzqyja.js +0 -12
- package/dist/chunk-266t58b8.js +0 -5
- package/dist/chunk-27fgag95.js +0 -4
- package/dist/chunk-2a9n102n.js +0 -2
- package/dist/chunk-2eqzrczk.js +0 -2
- package/dist/chunk-2ke37m54.js +0 -14
- package/dist/chunk-35ds08e7.js +0 -3
- package/dist/chunk-3mtwkjcg.js +0 -2
- package/dist/chunk-4xr8zwkp.js +0 -2
- package/dist/chunk-58v77x2c.js +0 -2
- package/dist/chunk-5mhq8605.js +0 -2
- package/dist/chunk-5se8xt9e.js +0 -64
- package/dist/chunk-5zh0h080.js +0 -2
- package/dist/chunk-62435225.js +0 -2
- package/dist/chunk-6kdrncsx.js +0 -30
- package/dist/chunk-6n2rr3x7.js +0 -2
- package/dist/chunk-6xk87qf2.js +0 -30
- package/dist/chunk-72rwcbp6.js +0 -3
- package/dist/chunk-76w34xne.js +0 -3
- package/dist/chunk-7ekd7zj9.js +0 -2
- package/dist/chunk-7pr3wdd5.js +0 -3
- package/dist/chunk-7rxvafwc.js +0 -24
- package/dist/chunk-7tnwfa7w.js +0 -8
- package/dist/chunk-8c5je0wf.js +0 -2
- package/dist/chunk-8dz6nyvx.js +0 -2
- package/dist/chunk-98zj3fv2.js +0 -7
- package/dist/chunk-9e8t0twa.js +0 -3
- package/dist/chunk-9fqp72ze.js +0 -5
- package/dist/chunk-anydpa34.js +0 -3
- package/dist/chunk-ay6zjq8v.js +0 -3
- package/dist/chunk-az4v4ard.js +0 -3
- package/dist/chunk-ba5erggg.js +0 -2
- package/dist/chunk-bnagrdz6.js +0 -2
- package/dist/chunk-by8wghtf.js +0 -2
- package/dist/chunk-cd7h4q51.js +0 -2
- package/dist/chunk-cjmv8hgp.js +0 -33
- package/dist/chunk-cthf912y.js +0 -2
- package/dist/chunk-cxbpmwq5.js +0 -4
- package/dist/chunk-d3sy16qn.js +0 -2
- package/dist/chunk-dh6s7mrj.js +0 -1199
- package/dist/chunk-dm2nzg7a.js +0 -2
- package/dist/chunk-e2sgcnxc.js +0 -2
- package/dist/chunk-e3b7jj74.js +0 -2
- package/dist/chunk-ec4wq2sv.js +0 -6
- package/dist/chunk-ekzg97dn.js +0 -29
- package/dist/chunk-epjt342x.js +0 -2
- package/dist/chunk-eqe26g14.js +0 -18
- package/dist/chunk-ev0v1yma.js +0 -2
- package/dist/chunk-f53psr2y.js +0 -5
- package/dist/chunk-f8p69dsg.js +0 -3
- package/dist/chunk-f95drhdb.js +0 -194
- package/dist/chunk-ff5a6hvb.js +0 -17
- package/dist/chunk-fs5fy4h8.js +0 -2
- package/dist/chunk-fzsygce3.js +0 -2
- package/dist/chunk-g465x63k.js +0 -2
- package/dist/chunk-g708ekh1.js +0 -2
- package/dist/chunk-gcr9e83g.js +0 -11
- package/dist/chunk-gdmyrsr8.js +0 -4
- package/dist/chunk-gkms2ngq.js +0 -2
- package/dist/chunk-gnfywmgs.js +0 -7
- package/dist/chunk-hpf8kq7e.js +0 -2
- package/dist/chunk-j4x3faf8.js +0 -2
- package/dist/chunk-jkavtw9f.js +0 -2
- package/dist/chunk-kg1rdena.js +0 -3
- package/dist/chunk-km91wx0v.js +0 -2
- package/dist/chunk-kmsyvaex.js +0 -8
- package/dist/chunk-mrahwn5v.js +0 -8
- package/dist/chunk-nk3czvnk.js +0 -2
- package/dist/chunk-nmw4eewb.js +0 -2
- package/dist/chunk-nq5zxrk0.js +0 -4
- package/dist/chunk-ny67c03k.js +0 -3
- package/dist/chunk-p4wdxp2c.js +0 -2
- package/dist/chunk-pcxp4r9n.js +0 -3
- package/dist/chunk-pdyeaxc1.js +0 -2
- package/dist/chunk-pf06ded4.js +0 -2
- package/dist/chunk-pfs0gpzm.js +0 -2
- package/dist/chunk-pshdwq44.js +0 -2
- package/dist/chunk-pwgv84pn.js +0 -32
- package/dist/chunk-pwsnafp3.js +0 -4367
- package/dist/chunk-q9n5swx7.js +0 -3
- package/dist/chunk-qr346wnp.js +0 -2
- package/dist/chunk-r02hke04.js +0 -2
- package/dist/chunk-ranshpyc.js +0 -3
- package/dist/chunk-rn194bhp.js +0 -20
- package/dist/chunk-rn1hgyc8.js +0 -930
- package/dist/chunk-s7z5dp70.js +0 -43
- package/dist/chunk-s8jd13nb.js +0 -3
- package/dist/chunk-sn7exv0n.js +0 -2
- package/dist/chunk-t1tdjjht.js +0 -216
- package/dist/chunk-t6qx04s8.js +0 -499
- package/dist/chunk-t6y6gyps.js +0 -2
- package/dist/chunk-tjfs7cc3.js +0 -2
- package/dist/chunk-tkyrk66a.js +0 -3
- package/dist/chunk-tntv9hvq.js +0 -2
- package/dist/chunk-v3nwkveg.js +0 -12
- package/dist/chunk-vd4cb5xr.js +0 -2
- package/dist/chunk-vkhdce50.js +0 -2
- package/dist/chunk-w183av08.js +0 -2
- package/dist/chunk-w2m02njv.js +0 -2
- package/dist/chunk-wpjrcrs5.js +0 -2
- package/dist/chunk-wqmppf6b.js +0 -3
- package/dist/chunk-wtb9fxdy.js +0 -2
- package/dist/chunk-xmzygmcz.js +0 -3
- package/dist/chunk-xsng1mtq.js +0 -3
- package/dist/chunk-xxzefj4j.js +0 -2
- package/dist/chunk-yq8x8bxq.js +0 -47
- package/dist/chunk-ytma76qe.js +0 -3
- package/dist/chunk-yw1m115e.js +0 -2
- package/dist/chunk-z64a924m.js +0 -2
- package/dist/chunk-zcz9rs6p.js +0 -3
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var{WebView:p}=globalThis.Bun;import{existsSync as y,mkdirSync as b,readdirSync as v,statSync as S}from"fs";import l from"path";var h=16384;function M(e){if(/^https?:\/\//.test(e)||e.startsWith("file://"))return e;return`file://${l.resolve(e)}`}function g(e,n,t,o){return new Promise((s)=>{let i=!1,r,m,c=()=>{if(!i){if(i=!0,clearTimeout(m),r)clearTimeout(r);e.onNavigated=void 0,s()}};m=setTimeout(c,o),e.onNavigated=()=>{if(!i)r=setTimeout(c,t)};try{let u=e.navigate(n);if(u&&typeof u.catch==="function")u.catch(c)}catch{c()}})}async function w(e,n,t){let o=`!!document.querySelector(${JSON.stringify(n)})`,s=Date.now()+t;while(Date.now()<s){try{if(await e.evaluate(o))return}catch{}await new Promise((i)=>setTimeout(i,100))}}async function T(e){try{let n=await e.evaluate("Math.ceil(Math.max(document.documentElement.scrollHeight, document.documentElement.offsetHeight, document.body ? document.body.scrollHeight : 0, document.body ? document.body.offsetHeight : 0))");return typeof n==="number"&&Number.isFinite(n)&&n>0?Math.min(n,h):0}catch{return 0}}async function Ko(e,n,t={}){let o=Math.min(t.width??1440,h),s=Math.min(t.height??2200,h),i=t.waitMs??800,r=t.timeoutMs??15000,m=t.format??"png",c=M(e),u=(f)=>new p({width:o,height:f,headless:!0,...t.backend?{backend:t.backend}:{}}),a=u(s);try{if(await g(a,c,i,r),t.waitSelector)await w(a,t.waitSelector,r);if(t.fullPage){let d=await T(a);if(d>s){if(a.close(),a=u(d),await g(a,c,i,r),t.waitSelector)await w(a,t.waitSelector,r)}}let f=await a.screenshot({encoding:"buffer",format:m});b(l.dirname(l.resolve(n)),{recursive:!0}),await Bun.write(n,f)}finally{a.close()}if(!y(n))throw Error(`Screenshot was not produced for ${e}`);return{input:e,output:n,bytes:S(n).size}}async function Kc(e,n,t={}){b(n,{recursive:!0});let o;if(!/^https?:\/\//.test(e)&&y(e)&&S(e).isDirectory())o=v(e).filter((r)=>r.endsWith(".html")).map((r)=>l.join(e,r));else o=[e];let s=t.format??"png",i=[];for(let r of o){let m=/^https?:\/\//.test(r)?new URL(r).pathname.replace(/\W+/g,"-").replace(/^-|-$/g,"")||"index":l.basename(r).replace(/\.html?$/,"");i.push(await Ko(r,l.join(n,`${m}.${s}`),t))}return i}
|
|
3
|
+
export{Ko,Kc};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{yr,Ks,kn,br,vr,Dt,lt,Gs,Cn,$n,wr,xr,Hc,Vc,Ae}from"./chunk-md8rqn48.js";export{Ae as DeployError,Ks as calculateSha1,kn as collectDeployFiles,$n as createDefaultNetlifyConfig,br as createFileManifest,yr as createNetlifyClient,Hc as deploy,Cn as detectProjectConfig,vr as filterRequiredFiles,Dt as formatSize,Gs as generateNetlifyToml,lt as getTotalSize,xr as hasNetlifyConfig,Vc as initNetlify,wr as writeNetlifyConfig};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{y,i,T}from"./chunk-3efw27as.js";import{P,kt}from"./chunk-b98be3yp.js";import{qr}from"./chunk-hepd9qgx.js";import{he}from"./chunk-et0rr8c7.js";import{s,we}from"./chunk-169n1vpx.js";import{o}from"./chunk-fzapbw9p.js";import f from"path";import b from"fs";function de(e){if(!e||typeof e!=="object")return!1;let t=e;return typeof t.message==="string"&&(t.name==="BuildMessage"||t.name==="ResolveMessage"||("position"in t))}function pe(e){if(e&&typeof e==="object"&&Array.isArray(e.errors))return e.errors;return[e]}function U(e,t){let r=[];for(let l of pe(e)){if(de(l)){let u=l.position||void 0;r.push({file:t||u?.file,line:u?.line,column:u?.column,message:l.message??"",lineText:u?.lineText});continue}r.push({file:t,message:l instanceof Error?l.message:String(l)})}return r}function Me(e,t){return U(e,t).map((r)=>{let l=r.file?`${r.file}${r.line?`:${r.line}${r.column?`:${r.column}`:""}`:""}`:"",u=r.lineText?`
|
|
3
|
+
${r.lineText.trim()}`:"";return l?`${l}: ${r.message}${u}`:`${r.message}${u}`}).join(`
|
|
4
|
+
`)}var me=9;function z(e,t,r){return/^(?:(?:stx|ui)\.config\.[cm]?[jt]s|runtime-config-(?:server|loader)\.[cm]?[jt]s)$/.test(f.basename(e))||qr(e,t,r)}var re=1,se=new Map,J=600,fe=100,V=new Map;async function ge(e){let t=V.get(e)??0;if(t>0&&t<fe){V.set(e,t+1);return}V.set(e,1);try{let r=(await b.promises.readdir(e)).filter((p)=>p.endsWith(".js"));if(r.length<=J)return;let u=(await Promise.all(r.map(async(p)=>{try{return{name:p,at:(await b.promises.stat(f.join(e,p))).mtimeMs}}catch{return null}}))).filter((p)=>p!==null);u.sort((p,d)=>d.at-p.at);for(let p of u.slice(J)){let d=p.name.slice(0,-3);await b.promises.rm(f.join(e,`${d}.js`),{force:!0}),await b.promises.rm(f.join(e,`${d}.deps.json`),{force:!0})}F("pruned bundle cache to",J,"entries")}catch{}}function ce(e){return se.get(e)??[]}function G(e,t){if(e)se.set(e,t)}function Fa(e=process.env){return e.STX_DEBUG==="true"||e.STX_DEBUG==="1"}function F(...e){if(Fa())console.log("[stx:bundler]",...e)}var q=[];function Di(e,t,r){q.push({filePath:e||"<inline>",message:t,details:r})}function ft(){return q.slice()}function gt(){q.length=0}var X;function $u(e){X=e}function Oi(){if(X)return X;try{let e=T.strict;return typeof e==="object"&&e!==null?e.bundlerFallback??"warn":"warn"}catch{return"warn"}}var ee=[/^stx$/,/^@stacksjs\/stx$/,/^@stores$/,/^stx\/stores$/,/^@composables$/];function mt(e){let t=/^[ \t]*import[ \t]+(?!type(?:[ \t]|{))[\s\S]*?\s+from\s+['"]([^'"]+)['"][ \t]*;?/gm,r;while((r=t.exec(e))!==null){let u=r[1];if(!ee.some((d)=>d.test(u)))return F("detected user import:",u),!0}let l=/^[ \t]*import[ \t]+['"]([^'"]+)['"]/gm;while((r=l.exec(e))!==null){let u=r[1];if(/\.css(?:\?.*)?$/.test(u))continue;if(!ee.some((d)=>d.test(u)))return F("detected side-effect import:",u),!0}return!1}var nn="stx-module:",xe=/\.(?:[cm]?[jt]sx?|json)$/i;function za(e,t){return f.relative(e,t).split(f.sep).join("/")}function Ha(e,t){if(t.size===0)return e;return e.replace(/^([ \t]*import\s+(?:[^;"']*?\s+from\s+)?)(["'])([^"']+)\2/gm,(r,l,u,p)=>{let d=t.get(p);return d&&!p.startsWith(nn)?`${l}${u}${d}${u}`:r})}function Va(e,t){let r=0,l=(p)=>{let d=`__stxMod${r++}`,x=JSON.stringify(p);return t.push(`var ${d} = globalThis.__stxModules && globalThis.__stxModules[${x}];`,`if (${d} === undefined) throw new Error("[stx] module " + ${JSON.stringify(x)} + " is not registered on this page (#1957)");`),d},u=(p,d)=>{for(let x of p.split(",")){let v=x.trim();if(!v)continue;let c=v.match(/^("(?:[^"\\]|\\.)*"|[\w$]+)(?:\s+as\s+([\w$]+))?$/);if(!c)continue;let n=c[1].startsWith('"')?JSON.parse(c[1]):c[1],a=c[2]??n;t.push(`var ${a} = ${d}[${JSON.stringify(n)}];`)}};return e=e.replace(/^[ \t]*import\s+([^;"']*?)\s+from\s+["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(p,d,x)=>{let v=x.slice(nn.length),c=l(v),n=d.trim(),a=n.match(/^([\w$]+)\s*(?:,\s*|$)/);if(a&&!n.startsWith("{")&&!n.startsWith("*"))t.push(`var ${a[1]} = ${c}.default;`),n=n.slice(a[0].length).trim();let m=n.match(/^\*\s*as\s+([\w$]+)$/);if(m)t.push(`var ${m[1]} = ${c};`);else if(n.startsWith("{"))u(n.replace(/^\{|\}$/g,""),c);return""}),e=e.replace(/^[ \t]*import\s+["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(p,d)=>(l(d.slice(nn.length)),"")),e}function te(e){let t=[e,`${e}.ts`,`${e}.tsx`,`${e}.js`,`${e}.mjs`,`${e}.jsx`,f.join(e,"index.ts"),f.join(e,"index.tsx"),f.join(e,"index.js"),f.join(e,"index.mjs")];for(let r of t)try{if(b.existsSync(r)&&b.statSync(r,{throwIfNoEntry:!1})?.isFile())return r}catch{}return}function $e(e,t,r,l,u,p=new Map,d){let x=(c,n,a)=>{if(z(n,e,d))return null;if(!u||c!==r||!xe.test(n))return null;try{if(!b.statSync(n,{throwIfNoEntry:!1})?.isFile())return null}catch{return null}l.add(n);let m=`${nn}${za(process.cwd(),n)}`;return p.set(a,m),{path:m,external:!0}},v=(c,n)=>{let a=c===r?t:f.dirname(c),m=f.resolve(a,n);return te(m)??m};return{name:"stx-client-bundle",setup(c){if(c.onResolve({filter:/^(stx|@stacksjs\/stx)$/},(n)=>({path:n.path,external:!0})),c.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},(n)=>({path:n.path,external:!0})),c.onResolve({filter:/^\//},(n)=>{let a=te(n.path);if(a){let m=x(n.importer,a,n.path);if(m)return m;if(a!==r)l.add(a);return{path:a}}return{path:n.path,external:!0}}),c.onResolve({filter:/^\.\.?\//},(n)=>{let a=v(n.importer,n.path),m=x(n.importer,a,n.path);if(m)return m;return l.add(a),{path:a}}),c.onResolve({filter:/^[@~]\//},(n)=>{let a=f.resolve(e,n.path.slice(2)),m=[a,`${a}.ts`,`${a}.tsx`,`${a}.js`,`${a}.mjs`,`${a}.jsx`,f.join(a,"index.ts"),f.join(a,"index.tsx"),f.join(a,"index.js"),f.join(a,"index.mjs")];for(let w of m)if(b.existsSync(w)&&b.statSync(w,{throwIfNoEntry:!1})?.isFile()){let I=x(n.importer,w,n.path);if(I)return I;return F(`resolved ${n.path[0]}/ import:`,n.path,"\u2192",w),l.add(w),{path:w}}return console.warn(`[stx:bundler] could not resolve ${n.path[0]}/ import:`,n.path),{path:a}}),u)c.onResolve({filter:/^(?!node:|bun:)(?:@[\w.-]+\/)?[\w.-]/},(n)=>{if(n.importer!==r)return;let a=`${nn}npm:${n.path}`;return p.set(n.path,a),{path:a,external:!0}});c.onLoad({filter:/\.(?:[cm]?[jt]sx?|json)$/},(n)=>{if(z(n.path,e,d))throw Error(`Server-only API source cannot be imported by a client script: ${n.path}`);let a=f.extname(n.path).toLowerCase(),m=a===".json"?"json":a===".tsx"?"tsx":a===".jsx"?"jsx":a===".ts"||a===".mts"||a===".cts"?"ts":"js";if(n.path!==r)l.add(n.path);return{contents:b.readFileSync(n.path,"utf8"),loader:m}})}}}var W=new Map,L=P(64),ne=Symbol.for("stx.client-bundle-build-queue");function Ua(e){let t=globalThis,l=(t[ne]??Promise.resolve()).then(e,e);return t[ne]=l.then(()=>{return},()=>{return}),l}async function ht(e,t,r={}){let l=r.projectRoot||process.cwd(),u=(await i(l)).serverApi,p=r.minify??!1,d=r.externalizeUserModules??!0,x=r.cacheDir||o(l,"bundle-cache"),v=new Bun.CryptoHasher("md5");v.update(`${me}\x00${he()}\x00${JSON.stringify(u??!1)}\x00${d?"registry":"inline"}\x00${e}\x00${t}`);let c=v.digest("hex").slice(0,12),n=f.join(x,`${c}.js`),a=L.get(n);if(a){if(kt(a.files)&&a.files.every((E)=>!z(E.path,l,u))){F("memo hit:",c);let E=a.files.map((S)=>S.path);return G(t,E),r.collectInputs?.push(...E),a.code}L.delete(n),F("memo invalidated by dep change:",c)}let m=f.join(x,`${c}.deps.json`),w=Bun.file(n);if(await w.exists()){let E=Bun.file(m),S=!1,B=null;if(await E.exists())try{let D=JSON.parse(await E.text());if(D.metadataVersion!==re||!Array.isArray(D.files))S=!1;else B=D.files,S=!0;if(B&&(!kt(B)||B.some((N)=>z(N.path,l,u))))S=!1}catch{S=!1}if(S){if(F("cache hit:",c),B)G(t,B.map((N)=>N.path)),r.collectInputs?.push(...B.map((N)=>N.path));let D=await w.text();if(B)L.set(n,{code:D,files:B});return D}F("cache invalidated by dep change:",c)}let I=W.get(c);if(I){let E=await I;if(r.collectInputs)r.collectInputs.push(...(L.get(n)?.files??[]).map((S)=>S.path));return E}let _=Ua(()=>ye(e,t,{projectRoot:l,minify:p,cacheDir:x,hash:c,cachePath:n,depsPath:m,collectInputs:r.collectInputs,externalizeUserModules:d,serverApi:u}));W.set(c,_);try{return await _}finally{W.delete(c)}}var be=0;function Wa(e){return`${e}-${process.pid}-${++be}`}async function ye(e,t,r){let{projectRoot:l,minify:u,cacheDir:p,hash:d,cachePath:x,depsPath:v,externalizeUserModules:c}=r,n=o(l,"bundle-tmp"),a=Wa(d),m=f.join(n,`${a}.ts`),w=f.join(n,"out",a);b.mkdirSync(n,{recursive:!0}),b.mkdirSync(w,{recursive:!0});let I=f.dirname(t),_=new Set,E=/^[ \t]*(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,S=/^[ \t]*(export\s+)?(?:async\s+)?function\s+(\w+)/gm,B=s(e),{depths:D,balanced:N}=we(B),H=(j)=>!N||D[j]===0,M;while((M=E.exec(B))!==null){if(M[1])continue;if(!H(M.index))continue;if(M[2])M[2].split(",").forEach((j)=>{let h=Be(j);if(h)_.add(h)});else if(M[3])_.add(M[3])}while((M=S.exec(B))!==null){if(M[1])continue;if(!H(M.index))continue;_.add(M[2])}let ie=_.size>0?`
|
|
5
|
+
export { ${[..._].join(", ")} }`:"";await Bun.write(m,e+ie),F("bundling:",d,"from:",f.basename(t));let Z=new Set,Y=new Map;try{let j=await Bun.build({entrypoints:[m],outdir:w,target:"browser",format:"esm",minify:u,plugins:[$e(l,I,m,Z,c,Y,r.serverApi)],define:{"process.env.NODE_ENV":u?'"production"':'"development"',...y()},root:l});if(!j.success){let R=j.logs.filter((k)=>k.level==="error").map((k)=>k.message).join(", ")||`Unable to bundle ${f.basename(t)}`,C=U(j.logs,t||void 0);if(console.warn("[stx:bundler] build failed:",R),Di(t||"",R,C),Oi()==="error")throw Error(R);return e}let h="";for(let g of j.outputs){h=await g.text();break}let A=[];for(let g of h.matchAll(/^\s*export\s*\{([^}]*)\}\s*;?\s*$/gm))for(let R of g[1].split(",")){let C=R.trim().match(/^([A-Za-z_$][\w$]*)\s+as\s+([A-Za-z_$][\w$]*)$/);if(C){A.push([C[2],C[1]]);continue}let k=R.trim();if(/^[A-Za-z_$][\w$]*$/.test(k))A.push([k,k])}let Q=[];h=Va(Ha(h,Y),Q);let oe=h.match(/^\s*import\s+[^;]+;?\s*$/gm)||[];h=h.replace(/^\s*import\s+[^;]+;?\s*$/gm,"").replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim();let K=`__stxBundle_${d}`,ae=A.map(([g,R])=>`${JSON.stringify(g)}: ${R}`).join(", "),le=A.map(([g])=>`var ${g} = undefined;`).join(`
|
|
6
|
+
`),ue=A.map(([g])=>`${g} = ${K}[${JSON.stringify(g)}];`).join(`
|
|
7
|
+
`);if(h=`${oe.join(`
|
|
8
|
+
`)}
|
|
9
|
+
${le}
|
|
10
|
+
var ${K} = (function() {
|
|
11
|
+
${Q.join(`
|
|
12
|
+
`)}
|
|
13
|
+
${h}
|
|
14
|
+
return { ${ae} };
|
|
15
|
+
})();
|
|
16
|
+
${ue}`.trim(),F("bundled:",d,"output:",h.length,"bytes"),_.size>0&&A.length===0)return console.warn(`[stx:bundler] dropped every binding for ${f.basename(t)} (${d}); serving the unbundled source and not caching this result`),e;b.mkdirSync(p,{recursive:!0}),await Bun.write(x,h);let O=Array.from(Z).map((g)=>{try{return{path:g,mtimeMs:b.statSync(g).mtimeMs}}catch{return null}}).filter((g)=>g!==null);return await Bun.write(v,JSON.stringify({metadataVersion:re,files:O})),G(t,O.map((g)=>g.path)),r.collectInputs?.push(...O.map((g)=>g.path)),L.set(x,{code:h,files:O}),await ge(p),h}catch(j){let h=U(j,t||void 0),A=Me(j,t||void 0);if(console.warn(`[stx:bundler] error: ${A}`),Di(t||"",A,h),Oi()==="error")throw j;return e}finally{try{b.rmSync(m,{force:!0}),b.rmSync(w,{recursive:!0,force:!0})}catch{}}}function Be(e){let t=e.trim();if(!t)return null;let r=t.indexOf("=");if(r!==-1)t=t.slice(0,r).trim();let l=t.indexOf(":");if(l!==-1)t=t.slice(l+1).trim();if(t.startsWith("..."))t=t.slice(3).trim();return/^[A-Za-z_$][\w$]*$/.test(t)?t:null}
|
|
17
|
+
export{Me,ce,Fa,Di,ft,gt,$u,Oi,mt,nn,za,Ha,Va,Ua,ht,Wa};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Rn,Kt,su}from"./chunk-765e1s44.js";import{U,An,Gt,Nr,Lr,Pn,iu,ou,au,Jt,Yt,jr,In,cu}from"./chunk-6hc5vz20.js";import"./chunk-ce1sejr3.js";export{Nr as batch,su as default,An as derived,Gt as effect,Rn as generateSignalsRuntime,Kt as generateSignalsRuntimeDev,Yt as isDerived,Jt as isSignal,Pn as onDestroy,Lr as onMount,In as peek,au as pendingLifecycleCounts,ou as runDestroyCallbacks,iu as runMountCallbacks,U as state,jr as untrack,cu as useOptimistic};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var
|
|
2
|
+
var f=0;function v(){return`stx-defer-${++f}`}function m(i){let n=i.match(/on:\s*['"]?(\w+)(?:\((\d+)\))?['"]?/);if(n)return{trigger:n[1],value:n[2]};return{trigger:"immediate"}}function p(i,n,o){let{trigger:l,value:t}=m(n),e=o,s,a,r,d=o.match(/@placeholder\s*([\s\S]*?)(?=@loading|@error|$)/);if(d)s=d[1].trim(),e=e.replace(/@placeholder[\s\S]*?(?=@loading|@error|$)/,"");let c=o.match(/@loading\s*([\s\S]*?)(?=@error|$)/);if(c)a=c[1].trim(),e=e.replace(/@loading[\s\S]*?(?=@error|$)/,"");let g=o.match(/@error(?:\s*\(\s*(\w+)\s*\))?\s*([\s\S]*)$/);if(g)r=g[2].trim(),e=e.replace(/@error(?:\s*\(\s*\w+\s*\))?[\s\S]*$/,"");return e=e.trim(),{trigger:l,triggerValue:t,content:e,placeholder:s,loading:a,error:r}}function E(i,n){let{trigger:o,triggerValue:l}=n,t;switch(o){case"visible":t=`
|
|
3
3
|
const observer = new IntersectionObserver((entries) => {
|
|
4
4
|
if (entries[0].isIntersecting) {
|
|
5
5
|
observer.disconnect();
|
|
@@ -7,21 +7,21 @@ var P=0;function W(){return`stx-defer-${++P}`}function X(E){let z=E.match(/on:\s
|
|
|
7
7
|
}
|
|
8
8
|
}, { threshold: 0.1 });
|
|
9
9
|
observer.observe(container);
|
|
10
|
-
`;break;case"idle":
|
|
10
|
+
`;break;case"idle":t=`
|
|
11
11
|
if ('requestIdleCallback' in window) {
|
|
12
12
|
requestIdleCallback(() => loadContent(), { timeout: 3000 });
|
|
13
13
|
}
|
|
14
14
|
else {
|
|
15
15
|
setTimeout(loadContent, 200);
|
|
16
16
|
}
|
|
17
|
-
`;break;case"interaction":
|
|
17
|
+
`;break;case"interaction":t=`
|
|
18
18
|
const events = ['click', 'focus', 'touchstart'];
|
|
19
19
|
const handler = () => {
|
|
20
20
|
events.forEach(e => container.removeEventListener(e, handler));
|
|
21
21
|
loadContent();
|
|
22
22
|
};
|
|
23
23
|
events.forEach(e => container.addEventListener(e, handler, { once: true, passive: true }));
|
|
24
|
-
`;break;case"hover":
|
|
24
|
+
`;break;case"hover":t=`
|
|
25
25
|
const handler = () => {
|
|
26
26
|
container.removeEventListener('mouseenter', handler);
|
|
27
27
|
container.removeEventListener('focusin', handler);
|
|
@@ -29,14 +29,14 @@ else {
|
|
|
29
29
|
};
|
|
30
30
|
container.addEventListener('mouseenter', handler, { once: true });
|
|
31
31
|
container.addEventListener('focusin', handler, { once: true });
|
|
32
|
-
`;break;case"timer":
|
|
33
|
-
setTimeout(loadContent, ${
|
|
34
|
-
`;break;case"immediate":default:
|
|
32
|
+
`;break;case"timer":t=`
|
|
33
|
+
setTimeout(loadContent, ${l||"1000"});
|
|
34
|
+
`;break;case"immediate":default:t=`
|
|
35
35
|
Promise.resolve().then(loadContent);
|
|
36
36
|
`;break}return`
|
|
37
37
|
<script>
|
|
38
38
|
(function() {
|
|
39
|
-
const container = document.getElementById('${
|
|
39
|
+
const container = document.getElementById('${i}');
|
|
40
40
|
if (!container) return;
|
|
41
41
|
|
|
42
42
|
const contentEl = container.querySelector('[data-defer-content]');
|
|
@@ -69,16 +69,16 @@ else {
|
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
${
|
|
72
|
+
${t}
|
|
73
73
|
})();
|
|
74
74
|
</script>
|
|
75
|
-
`}function
|
|
76
|
-
<div id="${
|
|
77
|
-
${
|
|
78
|
-
${
|
|
79
|
-
${
|
|
80
|
-
${
|
|
75
|
+
`}function wl(i,n,o){f=0;let l=/@defer\s*\(([^)]*)\)\s*([\s\S]*?)@enddefer/g;return i.replace(l,(t,e,s)=>{let a=v(),r=p(t,e,s),d=r.placeholder?`<div data-defer-placeholder>${r.placeholder}</div>`:"",c=r.loading?`<div data-defer-loading style="display: none;">${r.loading}</div>`:'<div data-defer-loading style="display: none;"></div>',g=r.error?`<div data-defer-error style="display: none;">${r.error}</div>`:"",u=`<div data-defer-content style="display: none;">${r.content}</div>`,h=E(a,r);return`
|
|
76
|
+
<div id="${a}" class="stx-defer" data-defer-trigger="${r.trigger}">
|
|
77
|
+
${d}
|
|
78
|
+
${c}
|
|
79
|
+
${u}
|
|
80
|
+
${g}
|
|
81
81
|
</div>
|
|
82
|
-
${
|
|
82
|
+
${h}
|
|
83
83
|
`})}
|
|
84
|
-
export{
|
|
84
|
+
export{wl};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
function
|
|
2
|
+
function v(){return`<script data-stx-hydration-runtime>
|
|
3
3
|
(function() {
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
@@ -159,16 +159,10 @@ else {
|
|
|
159
159
|
stxIslands.initIslands();
|
|
160
160
|
}
|
|
161
161
|
})();
|
|
162
|
-
</script>`}function
|
|
163
|
-
|
|
164
|
-
if (!window.__stxIslands) return;
|
|
165
|
-
${Array.from(q.entries()).map(([w,z])=>` window.__stxIslands.register('${w}', function() { return import('${z}'); });`).join(`
|
|
166
|
-
`)}
|
|
167
|
-
})();
|
|
168
|
-
</script>`}function E(q){let j=q.match(/<([A-Z][a-zA-Z0-9]+)[\s/>]/);if(j)return j[1];let w=q.match(/<([a-z][a-z0-9]*-[a-z0-9-]+)[\s/>]/);if(w)return w[1];return null}function V(q,j){let w={},z=/:([a-zA-Z_][\w-]*)\s*=\s*"([^"]+)"/g,G;while((G=z.exec(q))!==null){let K=G[1],Q=G[2];if(Q in j)w[K]=j[Q];else w[K]=Q}return w}function f(){let q=new Map;return{islands:q,register(j){q.set(j.id,j)},get(j){return q.get(j)},async hydrate(j){let w=q.get(j);if(!w||w.hydrated)return;if(w.hydrated=!0,typeof window<"u"&&typeof window.dispatchEvent==="function")window.dispatchEvent(new CustomEvent("stx:hydrate",{detail:{id:j,component:w.component}}))},async hydrateAll(){let j=Array.from(q.values()).filter((w)=>!w.hydrated).map((w)=>this.hydrate(w.id));await Promise.all(j)}}}function k(q){return`
|
|
169
|
-
<script data-hydrate="${q}">
|
|
162
|
+
</script>`}function b(e){let t=e.match(/<([A-Z][a-zA-Z0-9]+)[\s/>]/);if(t)return t[1];let n=e.match(/<([a-z][a-z0-9]*-[a-z0-9-]+)[\s/>]/);if(n)return n[1];return null}function w(e,t){let n={},r=/:([a-zA-Z_][\w-]*)\s*=\s*"([^"]+)"/g,i;while((i=r.exec(e))!==null){let d=i[1],o=i[2];if(o in t)n[d]=t[o];else n[d]=o}return n}function fa(){let e=new Map;return{islands:e,register(t){e.set(t.id,t)},get(t){return e.get(t)},async hydrate(t){let n=e.get(t);if(!n||n.hydrated)return;if(n.hydrated=!0,typeof window<"u"&&typeof window.dispatchEvent==="function")window.dispatchEvent(new CustomEvent("stx:hydrate",{detail:{id:t,component:n.component}}))},async hydrateAll(){let t=Array.from(e.values()).filter((n)=>!n.hydrated).map((n)=>this.hydrate(n.id));await Promise.all(t)}}}function I(e){return`
|
|
163
|
+
<script data-hydrate="${e}">
|
|
170
164
|
(function() {
|
|
171
|
-
const island = document.querySelector('[data-island="${
|
|
165
|
+
const island = document.querySelector('[data-island="${e}"]');
|
|
172
166
|
if (!island) return;
|
|
173
167
|
|
|
174
168
|
// Immediately hydrate
|
|
@@ -176,10 +170,10 @@ ${Array.from(q.entries()).map(([w,z])=>` window.__stxIslands.register('${w}', f
|
|
|
176
170
|
island.dispatchEvent(new CustomEvent('stx:hydrated', { bubbles: true }));
|
|
177
171
|
})();
|
|
178
172
|
</script>
|
|
179
|
-
`}function
|
|
180
|
-
<script data-hydrate="${
|
|
173
|
+
`}function L(e,t){let n=t.timeout||2000,r=t.priority||"low";return`
|
|
174
|
+
<script data-hydrate="${e}">
|
|
181
175
|
(function() {
|
|
182
|
-
const island = document.querySelector('[data-island="${
|
|
176
|
+
const island = document.querySelector('[data-island="${e}"]');
|
|
183
177
|
if (!island) return;
|
|
184
178
|
|
|
185
179
|
function hydrate() {
|
|
@@ -189,8 +183,8 @@ ${Array.from(q.entries()).map(([w,z])=>` window.__stxIslands.register('${w}', f
|
|
|
189
183
|
}
|
|
190
184
|
|
|
191
185
|
if ('requestIdleCallback' in window) {
|
|
192
|
-
const idleOptions = { timeout: ${
|
|
193
|
-
${
|
|
186
|
+
const idleOptions = { timeout: ${n} };
|
|
187
|
+
${r==="high"?"requestIdleCallback(hydrate, idleOptions);":`
|
|
194
188
|
// Low priority: wait for multiple idle periods
|
|
195
189
|
let idleCount = 0;
|
|
196
190
|
function waitForIdle() {
|
|
@@ -208,14 +202,14 @@ else {
|
|
|
208
202
|
}
|
|
209
203
|
else {
|
|
210
204
|
// Fallback for browsers without requestIdleCallback
|
|
211
|
-
setTimeout(hydrate, ${
|
|
205
|
+
setTimeout(hydrate, ${n});
|
|
212
206
|
}
|
|
213
207
|
})();
|
|
214
208
|
</script>
|
|
215
|
-
`}function
|
|
216
|
-
<script data-hydrate="${
|
|
209
|
+
`}function C(e,t){let n=t.rootMargin||"0px",r=t.threshold||0;return`
|
|
210
|
+
<script data-hydrate="${e}">
|
|
217
211
|
(function() {
|
|
218
|
-
const island = document.querySelector('[data-island="${
|
|
212
|
+
const island = document.querySelector('[data-island="${e}"]');
|
|
219
213
|
if (!island) return;
|
|
220
214
|
|
|
221
215
|
function hydrate() {
|
|
@@ -233,8 +227,8 @@ else {
|
|
|
233
227
|
}
|
|
234
228
|
});
|
|
235
229
|
}, {
|
|
236
|
-
rootMargin: '${
|
|
237
|
-
threshold: ${JSON.stringify(
|
|
230
|
+
rootMargin: '${n}',
|
|
231
|
+
threshold: ${JSON.stringify(r)}
|
|
238
232
|
});
|
|
239
233
|
|
|
240
234
|
observer.observe(island);
|
|
@@ -245,10 +239,10 @@ else {
|
|
|
245
239
|
}
|
|
246
240
|
})();
|
|
247
241
|
</script>
|
|
248
|
-
`}function
|
|
249
|
-
<script data-hydrate="${
|
|
242
|
+
`}function S(e,t){let n=t.media||"(min-width: 768px)";return`
|
|
243
|
+
<script data-hydrate="${e}">
|
|
250
244
|
(function() {
|
|
251
|
-
const island = document.querySelector('[data-island="${
|
|
245
|
+
const island = document.querySelector('[data-island="${e}"]');
|
|
252
246
|
if (!island) return;
|
|
253
247
|
|
|
254
248
|
function hydrate() {
|
|
@@ -257,7 +251,7 @@ else {
|
|
|
257
251
|
island.dispatchEvent(new CustomEvent('stx:hydrated', { bubbles: true }));
|
|
258
252
|
}
|
|
259
253
|
|
|
260
|
-
const mediaQuery = window.matchMedia('${
|
|
254
|
+
const mediaQuery = window.matchMedia('${n}');
|
|
261
255
|
|
|
262
256
|
function handleMediaChange(e) {
|
|
263
257
|
if (e.matches) {
|
|
@@ -274,10 +268,10 @@ else {
|
|
|
274
268
|
}
|
|
275
269
|
})();
|
|
276
270
|
</script>
|
|
277
|
-
`}function
|
|
278
|
-
<script data-hydrate="${
|
|
271
|
+
`}function k(e){return`
|
|
272
|
+
<script data-hydrate="${e}">
|
|
279
273
|
(function() {
|
|
280
|
-
const island = document.querySelector('[data-island="${
|
|
274
|
+
const island = document.querySelector('[data-island="${e}"]');
|
|
281
275
|
if (!island) return;
|
|
282
276
|
|
|
283
277
|
function hydrate() {
|
|
@@ -296,10 +290,10 @@ else {
|
|
|
296
290
|
events.forEach(e => island.addEventListener(e, handler, { once: true, passive: true }));
|
|
297
291
|
})();
|
|
298
292
|
</script>
|
|
299
|
-
`}function
|
|
300
|
-
<script data-hydrate="${
|
|
293
|
+
`}function H(e,t){let n=t.event||"stx:activate";return`
|
|
294
|
+
<script data-hydrate="${e}">
|
|
301
295
|
(function() {
|
|
302
|
-
const island = document.querySelector('[data-island="${
|
|
296
|
+
const island = document.querySelector('[data-island="${e}"]');
|
|
303
297
|
if (!island) return;
|
|
304
298
|
|
|
305
299
|
function hydrate() {
|
|
@@ -309,36 +303,36 @@ else {
|
|
|
309
303
|
}
|
|
310
304
|
|
|
311
305
|
// Listen for custom event
|
|
312
|
-
window.addEventListener('${
|
|
313
|
-
if (!e.detail || e.detail.id === '${
|
|
314
|
-
window.removeEventListener('${
|
|
306
|
+
window.addEventListener('${n}', function handler(e) {
|
|
307
|
+
if (!e.detail || e.detail.id === '${e}' || e.detail.id === '*') {
|
|
308
|
+
window.removeEventListener('${n}', handler);
|
|
315
309
|
hydrate();
|
|
316
310
|
}
|
|
317
311
|
});
|
|
318
312
|
})();
|
|
319
313
|
</script>
|
|
320
|
-
`}function
|
|
321
|
-
`+
|
|
322
|
-
<script type="application/json" data-island-props="${
|
|
323
|
-
<div data-island="${
|
|
324
|
-
data-strategy="${
|
|
325
|
-
${
|
|
314
|
+
`}function ga(e,t={},n){let r=e,i=!1,d=/@client:(load|idle|visible|media|only|hover|event)/i.test(e);if(r=u(r,"load",t),r=u(r,"idle",t),r=u(r,"visible",t),r=u(r,"media",t),r=M(r),r=u(r,"hover",t),r=u(r,"event",t),i=d&&r!==e,i)r+=`
|
|
315
|
+
`+v();return r}function u(e,t,n){let r=new RegExp(`@client:${t}(?:\\s*\\(([^)]*)\\))?\\s*([\\s\\S]*?)@endclient`,"gi");return e.replace(r,(i,d,o)=>{let a={strategy:t};if(d)try{let E=d.split(",").map((h)=>h.trim());for(let h of E){let[m,g]=h.split(":").map((p)=>p.trim());if(m&&g){let p=g.replace(/^['"]|['"]$/g,"");a[m]=p}}}catch{}let s=`island-${Math.random().toString(36).substring(2,9)}`,y=b(o.trim()),f=w(o.trim(),n),c=[];if(a.rootMargin)c.push(`data-root-margin="${a.rootMargin}"`);if(a.threshold!==void 0)c.push(`data-threshold="${a.threshold}"`);if(a.media)c.push(`data-media="${a.media}"`);if(a.event)c.push(`data-event="${a.event}"`);if(y)c.push(`data-component="${y}"`);let x=Object.keys(f).length>0?`
|
|
316
|
+
<script type="application/json" data-island-props="${s}">${JSON.stringify(f)}</script>`:"",l="";switch(t){case"load":l=I(s);break;case"idle":l=L(s,a);break;case"visible":l=C(s,a);break;case"media":l=S(s,a);break;case"hover":l=k(s);break;case"event":l=H(s,a);break}return`
|
|
317
|
+
<div data-island="${s}"
|
|
318
|
+
data-strategy="${t}"
|
|
319
|
+
${c.join(`
|
|
326
320
|
`)}
|
|
327
321
|
class="stx-island"
|
|
328
322
|
style="contents;">
|
|
329
|
-
${
|
|
323
|
+
${o.trim()}${x}
|
|
330
324
|
</div>
|
|
331
|
-
${
|
|
332
|
-
`})}function
|
|
333
|
-
<div data-island="${
|
|
325
|
+
${l}
|
|
326
|
+
`})}function M(e){let t=/@client:only\s*([\s\S]*?)@endclient/gi;return e.replace(t,(n,r)=>{let i=`island-only-${Math.random().toString(36).substring(2,9)}`;return`
|
|
327
|
+
<div data-island="${i}"
|
|
334
328
|
data-strategy="only"
|
|
335
329
|
class="stx-island stx-client-only">
|
|
336
330
|
<!-- Client-only content will be rendered here -->
|
|
337
|
-
<template data-client-content>${
|
|
331
|
+
<template data-client-content>${r.trim()}</template>
|
|
338
332
|
</div>
|
|
339
|
-
<script data-hydrate="${
|
|
333
|
+
<script data-hydrate="${i}">
|
|
340
334
|
(function() {
|
|
341
|
-
const island = document.querySelector('[data-island="${
|
|
335
|
+
const island = document.querySelector('[data-island="${i}"]');
|
|
342
336
|
if (!island) return;
|
|
343
337
|
|
|
344
338
|
const template = island.querySelector('template[data-client-content]');
|
|
@@ -348,7 +342,7 @@ else {
|
|
|
348
342
|
}
|
|
349
343
|
})();
|
|
350
344
|
</script>
|
|
351
|
-
`})}function
|
|
345
|
+
`})}function ma(){return`
|
|
352
346
|
/* Island base styles */
|
|
353
347
|
.stx-island {
|
|
354
348
|
display: contents;
|
|
@@ -389,9 +383,9 @@ else {
|
|
|
389
383
|
.stx-island.hydrated {
|
|
390
384
|
opacity: 1;
|
|
391
385
|
}
|
|
392
|
-
`}function
|
|
386
|
+
`}function ha(e){if(typeof window>"u")return;let t=document.querySelector(`[data-island="${e}"]`);if(!t||t.classList.contains("hydrated"))return;t.classList.add("hydrated"),t.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))}function ya(e){if(typeof window>"u")return;document.querySelectorAll(`[data-strategy="${e}"]:not(.hydrated)`).forEach((n)=>{n.classList.add("hydrated"),n.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))})}function ba(){if(typeof window>"u")return;document.querySelectorAll(".stx-island:not(.hydrated)").forEach((t)=>{t.classList.add("hydrated"),t.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))})}function va(e){if(typeof window>"u")return!1;return document.querySelector(`[data-island="${e}"]`)?.classList.contains("hydrated")??!1}function wa(e){return new Promise((t)=>{if(typeof window>"u"){t();return}let n=document.querySelector(`[data-island="${e}"]`);if(!n){t();return}if(n.classList.contains("hydrated")){t();return}n.addEventListener("stx:hydrated",()=>t(),{once:!0})})}function xa(e){return e.replace(/@static\s*([\s\S]*?)@endstatic/gi,(t,n)=>`<div class="stx-static">${n.trim()}</div>`)}function Sa(e){let t=e.map((n)=>({id:n.id,component:n.component,strategy:n.options.strategy,props:n.props}));return`
|
|
393
387
|
<script type="application/json" id="stx-island-manifest">
|
|
394
|
-
${JSON.stringify(
|
|
388
|
+
${JSON.stringify(t)}
|
|
395
389
|
</script>
|
|
396
|
-
`}var
|
|
397
|
-
export{
|
|
390
|
+
`}var ml={processPartialHydrationDirectives:ga,processStaticDirectives:xa,generatePartialHydrationCSS:ma,generateIslandManifest:Sa,createIslandRegistry:fa,hydrateIsland:ha,hydrateByStrategy:ya,hydrateAll:ba,isHydrated:va,onHydrated:wa};
|
|
391
|
+
export{fa,ga,ma,ha,ya,ba,va,wa,xa,Sa,ml};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var l=null,k=[],a=0,p=new Set;function v(){return l}function b(e){let i=l;return k.push(e),l=e,i}function T(e){k.pop(),l=e}function y(){return a>0}function g(e){p.add(e)}function m(e){a++;try{e()}finally{if(a--,a===0){let i=[...p];p.clear();for(let n of i)n()}}}function D(e){let i=l;l=null;try{return e()}finally{l=i}}var h=[],f=[];function U(e){let i=e,n=new Set,r=new Set,o=()=>{let t=v();if(t)r.add(t);return i};return o.set=(t)=>{if(!Object.is(t,i)){let c=i;if(i=t,n.forEach((s)=>{try{s(i,c)}catch(u){console.error("[stx] subscriber error:",u)}}),y())r.forEach((s)=>g(s));else r.forEach((s)=>s())}},o.update=(t)=>{o.set(t(i))},o.subscribe=(t)=>(n.add(t),()=>n.delete(t)),Object.defineProperty(o,"_isSignal",{value:!0,writable:!1}),Object.defineProperty(o,"value",{get:()=>o(),set:(t)=>o.set(t),configurable:!0}),o}function An(e){let i,n=!0,r=new Set,o=()=>{if(!n)if(n=!0,y())r.forEach((c)=>g(c));else r.forEach((c)=>c())},t=()=>{let c=v();if(c)r.add(c);if(n){let s=b(o);try{i=e()}finally{T(s)}n=!1}return i};return Object.defineProperty(t,"_isDerived",{value:!0,writable:!1}),Object.defineProperty(t,"value",{get:()=>t(),configurable:!0}),t}function Gt(e,i={}){let n,r=!1,o=()=>{if(r)return;if(n){let c=n;n=void 0;try{c()}catch(s){console.error("[stx] effect cleanup error:",s)}}let t=b(o);try{let c=e();n=typeof c==="function"?c:void 0}catch(c){r=!0,console.error("[stx] effect error (the effect is disposed):",c)}finally{T(t)}};if(i.immediate!==!1)o();return()=>{if(r=!0,n){let t=n;n=void 0,t()}}}function Nr(e){m(e)}function Lr(e){h.push(e)}function Pn(e){f.push(e)}function iu(){C(h,"onMount",f)}function ou(){C(f,"onDestroy")}function C(e,i,n){let r=e.splice(0,e.length);for(let o of r)try{let t=o();if(n&&typeof t==="function")n.push(t)}catch(t){console.error(`[stx] ${i} callback threw:`,t)}}function au(){return{mount:h.length,destroy:f.length}}function Jt(e){return typeof e==="function"&&e._isSignal===!0}function Yt(e){return typeof e==="function"&&e._isDerived===!0}function jr(e){if(Jt(e)||Yt(e))return e();return e}function In(e){return D(e)}function cu(e,i){let n=typeof e==="function"?e:()=>e,r=U([]),o=An(()=>r().reduce((s,u)=>i(s,u.action),n())),t=!1;return Gt(()=>{if(n(),!t){t=!0;return}if(In(()=>r().length))r.set([])}),[o,(s,u)=>{let x={action:s};r.set([...r(),x]);let d=()=>{let S=r().filter((A)=>A!==x);if(S.length!==r().length)r.set(S)};if(u&&typeof u.then==="function")Promise.resolve(u).then(d,d);return d}]}
|
|
3
|
+
export{U,An,Gt,Nr,Lr,Pn,iu,ou,au,Jt,Yt,jr,In,cu};
|