@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
package/dist/chunk-gnfywmgs.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{$u as Y,Bv as A,Dv as H,Hv as q,Jv as b,mv as y}from"./chunk-yq8x8bxq.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
|
-
`)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
|
-
`)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
|
-
`: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
|
-
`)}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 su,D as tu,g as uu,l as vu,C as wu,w as xu,k as yu,N as zu,_ as Au,T as Bu,I as Cu,a as Du,E as Eu,jK as Fu,zK as Gu,JK as Hu,P as Iu,R as Ju,u as Ku,f as Lu,WK as Mu,XK as Nu,YK as Ou,BK as Pu,OK as Qu,UK as Ru,FK as Su,GK as Tu,VK as Uu};
|
package/dist/chunk-hpf8kq7e.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{mi as a,ni as b,oi as c}from"./chunk-cjmv8hgp.js";import"./chunk-0c2h69k2.js";import"./chunk-ff5a6hvb.js";import"./chunk-ec4wq2sv.js";import"./chunk-s8jd13nb.js";import"./chunk-pwsnafp3.js";import"./chunk-1cyxbb8y.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-pwgv84pn.js";import"./chunk-tkyrk66a.js";import"./chunk-ranshpyc.js";import"./chunk-98zj3fv2.js";import"./chunk-35ds08e7.js";import"./chunk-5se8xt9e.js";import"./chunk-gnfywmgs.js";import"./chunk-yq8x8bxq.js";import"./chunk-266t58b8.js";import"./chunk-nq5zxrk0.js";import"./chunk-az4v4ard.js";import"./chunk-4f9zyfdw.js";import"./chunk-xssw417m.js";import"./chunk-kg1rdena.js";import"./chunk-ay6zjq8v.js";export{a as listComposableModules,b as getComposableScript,c as clearComposableCache};
|
package/dist/chunk-j4x3faf8.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
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-pwsnafp3.js";import"./chunk-1cyxbb8y.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-pwgv84pn.js";import"./chunk-tkyrk66a.js";import"./chunk-ranshpyc.js";import"./chunk-98zj3fv2.js";import"./chunk-35ds08e7.js";import"./chunk-5se8xt9e.js";import"./chunk-gnfywmgs.js";import"./chunk-yq8x8bxq.js";import"./chunk-266t58b8.js";import"./chunk-nq5zxrk0.js";import"./chunk-az4v4ard.js";import"./chunk-4f9zyfdw.js";import"./chunk-xssw417m.js";import"./chunk-kg1rdena.js";import"./chunk-ay6zjq8v.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};
|
package/dist/chunk-jkavtw9f.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{wk as a,xk as b,yk as c,zk as d}from"./chunk-smcj3442.js";import"./chunk-eqe26g14.js";import"./chunk-pwsnafp3.js";import"./chunk-1cyxbb8y.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-pwgv84pn.js";import"./chunk-tkyrk66a.js";import"./chunk-ranshpyc.js";import"./chunk-98zj3fv2.js";import"./chunk-35ds08e7.js";import"./chunk-5se8xt9e.js";import"./chunk-gnfywmgs.js";import"./chunk-yq8x8bxq.js";import"./chunk-266t58b8.js";import"./chunk-nq5zxrk0.js";import"./chunk-az4v4ard.js";import"./chunk-4f9zyfdw.js";import"./chunk-xssw417m.js";import"./chunk-kg1rdena.js";import"./chunk-ay6zjq8v.js";export{b as getAvailableTargets,c as getAvailableFormats,d as default,a as buildNative};
|
package/dist/chunk-kg1rdena.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{jx as s}from"./chunk-ay6zjq8v.js";function t(){let{NODE_ENV:e}=process.env;return e==="production"}function r(){let{STX_DEBUG:e}=process.env;return!t()||e==="true"}function o(){let{NODE_ENV:e}=process.env;return e==="test"}var n=()=>{};
|
|
3
|
-
export{t as dx,r as ex,o as fx,n as gx};
|
package/dist/chunk-km91wx0v.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{$o as l,Qo as a,Ro as b,So as c,To as d,Uo as e,Vo as f,Wo as g,Xo as h,Yo as i,Zo as j,_o as k}from"./chunk-pwsnafp3.js";import"./chunk-1cyxbb8y.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-pwgv84pn.js";import"./chunk-tkyrk66a.js";import"./chunk-ranshpyc.js";import"./chunk-98zj3fv2.js";import"./chunk-35ds08e7.js";import"./chunk-5se8xt9e.js";import"./chunk-gnfywmgs.js";import"./chunk-yq8x8bxq.js";import"./chunk-266t58b8.js";import"./chunk-nq5zxrk0.js";import"./chunk-az4v4ard.js";import"./chunk-4f9zyfdw.js";import"./chunk-xssw417m.js";import"./chunk-kg1rdena.js";import"./chunk-ay6zjq8v.js";export{c as withoutStxReferrer,b as stripTypeScript,j as splitDeclaration,e as isSyntaxFailure,d as isModuleResolutionFailure,f as isMissingBindingFailure,h as isCompleteImport,l as hasVariables,g as extractVariables,k as extractScriptFromTemplate,i as convertToCommonJS,a as STX_ENGINE_BINDING_NAMES};
|
package/dist/chunk-kmsyvaex.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import Q from"fs";import U from"path";function W(H){let v=[],j=H.pwa;if(v.push({id:"pwa-enabled",name:"PWA Enabled",category:"required",passed:j?.enabled===!0,message:j?.enabled?"PWA is enabled":"PWA is not enabled in config"}),!j?.enabled)return v;v.push({id:"manifest-name",name:"App Name",category:"required",passed:Boolean(j.manifest?.name),message:j.manifest?.name?`App name: "${j.manifest.name}"`:"Missing required manifest name"}),v.push({id:"manifest-short-name",name:"Short Name",category:"recommended",passed:Boolean(j.manifest?.shortName),message:j.manifest?.shortName?`Short name: "${j.manifest.shortName}"`:"Short name not set (will use full name)"}),v.push({id:"manifest-description",name:"App Description",category:"recommended",passed:Boolean(j.manifest?.description),message:j.manifest?.description?"Description is set":"App description not provided"}),v.push({id:"manifest-theme-color",name:"Theme Color",category:"required",passed:Boolean(j.manifest?.themeColor),message:j.manifest?.themeColor?`Theme color: ${j.manifest.themeColor}`:"Theme color not set"}),v.push({id:"manifest-background-color",name:"Background Color",category:"required",passed:Boolean(j.manifest?.backgroundColor),message:j.manifest?.backgroundColor?`Background color: ${j.manifest.backgroundColor}`:"Background color not set"}),v.push({id:"manifest-display",name:"Display Mode",category:"required",passed:["standalone","fullscreen","minimal-ui"].includes(j.manifest?.display||""),message:j.manifest?.display?`Display mode: ${j.manifest.display}`:"Display mode should be standalone, fullscreen, or minimal-ui"}),v.push({id:"manifest-start-url",name:"Start URL",category:"required",passed:Boolean(j.manifest?.startUrl),message:j.manifest?.startUrl?`Start URL: ${j.manifest.startUrl}`:"Start URL not set"}),v.push({id:"icons-source",name:"Icon Source",category:"required",passed:Boolean(j.icons?.src),message:j.icons?.src?`Icon source: ${j.icons.src}`:"No icon source configured"});let J=j.icons?.sizes||[];v.push({id:"icons-192",name:"192x192 Icon",category:"required",passed:J.includes(192),message:J.includes(192)?"192x192 icon will be generated":"Missing 192x192 icon (required for Android)"}),v.push({id:"icons-512",name:"512x512 Icon",category:"required",passed:J.includes(512),message:J.includes(512)?"512x512 icon will be generated":"Missing 512x512 icon (required for splash screen)"}),v.push({id:"icons-maskable",name:"Maskable Icon",category:"recommended",passed:j.icons?.purpose?.includes("maskable")||!1,message:j.icons?.purpose?.includes("maskable")?"Maskable icon purpose is set":"Consider adding maskable icon purpose for adaptive icons"}),v.push({id:"sw-configured",name:"Service Worker",category:"required",passed:Boolean(j.serviceWorker),message:j.serviceWorker?"Service worker is configured":"Service worker configuration missing"}),v.push({id:"sw-cache-version",name:"Cache Version",category:"recommended",passed:Boolean(j.serviceWorker?.cacheVersion),message:j.serviceWorker?.cacheVersion?`Cache version: ${j.serviceWorker.cacheVersion}`:"Set cache version for proper cache busting"}),v.push({id:"offline-enabled",name:"Offline Support",category:"required",passed:j.offline?.enabled===!0,message:j.offline?.enabled?"Offline support is enabled":"Offline support is disabled"});let L=j.routes||[];return v.push({id:"caching-strategies",name:"Caching Strategies",category:"recommended",passed:L.length>0,message:L.length>0?`${L.length} route caching strategies configured`:"No custom caching strategies defined"}),v.push({id:"push-config",name:"Push Notifications",category:"optional",passed:!j.push?.enabled||Boolean(j.push?.vapidPublicKey),message:j.push?.enabled?j.push?.vapidPublicKey?"Push notifications configured with VAPID key":"Push enabled but missing VAPID key":"Push notifications not enabled"}),v.push({id:"share-target",name:"Share Target",category:"optional",passed:!0,message:j.shareTarget?.enabled?`Share target enabled at ${j.shareTarget.action}`:"Share target not enabled"}),v.push({id:"auto-inject",name:"Auto-injection",category:"recommended",passed:j.autoInject!==!1,message:j.autoInject!==!1?"PWA tags will be auto-injected":"Auto-injection disabled - manual tag insertion required"}),v}function X(H){let v=[],j=U.join(H,"manifest.json"),J=Q.existsSync(j);if(v.push({id:"build-manifest",name:"Manifest File",category:"required",passed:J,message:J?"manifest.json exists":"manifest.json not found in build output"}),J)try{let M=JSON.parse(Q.readFileSync(j,"utf-8"));v.push({id:"build-manifest-valid",name:"Valid Manifest JSON",category:"required",passed:!0,message:"Manifest is valid JSON"}),v.push({id:"build-manifest-icons",name:"Manifest Icons",category:"required",passed:Array.isArray(M.icons)&&M.icons.length>0,message:M.icons?.length?`${M.icons.length} icons defined in manifest`:"No icons defined in manifest"})}catch{v.push({id:"build-manifest-valid",name:"Valid Manifest JSON",category:"required",passed:!1,message:"Manifest is not valid JSON"})}let L=U.join(H,"sw.js"),N=Q.existsSync(L);v.push({id:"build-sw",name:"Service Worker File",category:"required",passed:N,message:N?"Service worker (sw.js) exists":"Service worker not found in build output"});let K=U.join(H,"offline.html"),T=Q.existsSync(K);v.push({id:"build-offline",name:"Offline Page",category:"recommended",passed:T,message:T?"Offline page exists":"No offline.html found"});let I=U.join(H,"pwa-icons");if(Q.existsSync(I)){let M=Q.readdirSync(I).filter((V)=>V.endsWith(".png")||V.endsWith(".webp"));v.push({id:"build-icons",name:"Generated Icons",category:"required",passed:M.length>0,message:M.length>0?`${M.length} icon files generated`:"No icon files found"})}else v.push({id:"build-icons",name:"Generated Icons",category:"required",passed:!1,message:"Icons directory not found"});return v}function Y(H){let v=H.filter((I)=>I.category==="required"),j=H.filter((I)=>I.category==="recommended"),J=v.filter((I)=>I.passed).length,L=j.filter((I)=>I.passed).length,N=v.length>0?J/v.length*70:70,K=j.length>0?L/j.length*30:30;return{score:Math.round(N+K),passed:H.filter((I)=>I.passed).length,failed:H.filter((I)=>!I.passed&&I.category==="required").length,warnings:H.filter((I)=>!I.passed&&I.category!=="required").length,checks:H}}function A(H,v){let j=W(H),J=v&&Q.existsSync(v)?X(v):[];return Y([...j,...J])}function B(H){let v=[];v.push(`
|
|
3
|
-
=== PWA Audit Report ===
|
|
4
|
-
`);let j=H.score>=90?"32":H.score>=70?"33":"31";v.push(`Score: \x1B[${j}m${H.score}/100\x1B[0m`),v.push(`Passed: ${H.passed} | Failed: ${H.failed} | Warnings: ${H.warnings}
|
|
5
|
-
`);let J=["required","recommended","optional"];for(let L of J){let N=H.checks.filter((K)=>K.category===L);if(N.length===0)continue;v.push(`
|
|
6
|
-
${L.toUpperCase()}:`);for(let K of N){let T=K.passed?"\x1B[32m\u2713\x1B[0m":"\x1B[31m\u2717\x1B[0m";if(v.push(` ${T} ${K.name}: ${K.message}`),K.details)v.push(` ${K.details}`)}}return v.push(""),v.join(`
|
|
7
|
-
`)}
|
|
8
|
-
export{W as Rk,X as Sk,Y as Tk,A as Uk,B as Vk};
|
package/dist/chunk-mrahwn5v.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
var P=new Map([["craft-button",{name:"Button",zigType:"craft.Button",props:[{name:"variant",type:"string",required:!1,default:"primary"},{name:"disabled",type:"boolean",required:!1,default:!1},{name:"onclick",type:"callback",required:!1}],children:"single"}],["craft-text-input",{name:"TextInput",zigType:"craft.TextInput",props:[{name:"value",type:"string",required:!1,default:""},{name:"placeholder",type:"string",required:!1},{name:"disabled",type:"boolean",required:!1,default:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-textarea",{name:"TextArea",zigType:"craft.TextArea",props:[{name:"value",type:"string",required:!1,default:""},{name:"placeholder",type:"string",required:!1},{name:"rows",type:"number",required:!1,default:3},{name:"disabled",type:"boolean",required:!1,default:!1}],children:"none"}],["craft-checkbox",{name:"Checkbox",zigType:"craft.Checkbox",props:[{name:"checked",type:"boolean",required:!1,default:!1},{name:"label",type:"string",required:!1},{name:"disabled",type:"boolean",required:!1,default:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-select",{name:"Select",zigType:"craft.Select",props:[{name:"value",type:"string",required:!1},{name:"options",type:"array",required:!0},{name:"disabled",type:"boolean",required:!1,default:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-slider",{name:"Slider",zigType:"craft.Slider",props:[{name:"value",type:"number",required:!1,default:0},{name:"min",type:"number",required:!1,default:0},{name:"max",type:"number",required:!1,default:100},{name:"step",type:"number",required:!1,default:1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-toggle",{name:"Toggle",zigType:"craft.Toggle",props:[{name:"checked",type:"boolean",required:!1,default:!1},{name:"disabled",type:"boolean",required:!1,default:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-modal",{name:"Modal",zigType:"craft.Modal",props:[{name:"open",type:"boolean",required:!1,default:!1},{name:"title",type:"string",required:!1},{name:"closable",type:"boolean",required:!1,default:!0},{name:"onclose",type:"callback",required:!1}],children:"multiple"}],["craft-alert",{name:"Alert",zigType:"craft.Alert",props:[{name:"variant",type:"string",required:!1,default:"info"},{name:"title",type:"string",required:!1},{name:"dismissible",type:"boolean",required:!1,default:!1}],children:"single"}],["craft-progress",{name:"ProgressBar",zigType:"craft.ProgressBar",props:[{name:"value",type:"number",required:!1,default:0},{name:"max",type:"number",required:!1,default:100},{name:"indeterminate",type:"boolean",required:!1,default:!1}],children:"none"}],["craft-spinner",{name:"Spinner",zigType:"craft.Spinner",props:[{name:"size",type:"number",required:!1,default:24}],children:"none"}],["craft-avatar",{name:"Avatar",zigType:"craft.Avatar",props:[{name:"src",type:"string",required:!1},{name:"alt",type:"string",required:!1},{name:"size",type:"number",required:!1,default:40}],children:"none"}],["craft-badge",{name:"Badge",zigType:"craft.Badge",props:[{name:"variant",type:"string",required:!1,default:"default"}],children:"single"}],["craft-card",{name:"Card",zigType:"craft.Card",props:[{name:"padding",type:"number",required:!1,default:16}],children:"multiple"}],["craft-sidebar",{name:"Sidebar",zigType:"craft.NativeSidebar",props:[{name:"id",type:"string",required:!1},{name:"variant",type:"string",required:!1,default:"desktop"},{name:"material",type:"string",required:!1,default:"sidebar"},{name:"backgroundEffect",type:"string",required:!1,default:"shimmer"},{name:"allowsVibrancy",type:"boolean",required:!1,default:!0},{name:"materialOpacity",type:"number",required:!1,default:0.68},{name:"minWidth",type:"number",required:!1,default:240},{name:"maxWidth",type:"number",required:!1,default:340},{name:"canCollapse",type:"boolean",required:!1,default:!0},{name:"selectedItem",type:"string",required:!1},{name:"sections",type:"array",required:!1}],children:"multiple",platform:["macos"],fallback:"aside"}],["craft-sidebar-section",{name:"SidebarSection",zigType:"craft.NativeSidebarSection",props:[{name:"id",type:"string",required:!0},{name:"title",type:"string",required:!1},{name:"header",type:"string",required:!1}],children:"multiple",platform:["macos"],fallback:"section"}],["craft-sidebar-item",{name:"SidebarItem",zigType:"craft.NativeSidebarItem",props:[{name:"id",type:"string",required:!0},{name:"label",type:"string",required:!0},{name:"icon",type:"string",required:!1},{name:"badge",type:"string",required:!1},{name:"tintColor",type:"color",required:!1}],children:"none",platform:["macos"],fallback:"button"}],["craft-accordion",{name:"Accordion",zigType:"craft.Accordion",props:[{name:"title",type:"string",required:!0},{name:"open",type:"boolean",required:!1,default:!1}],children:"multiple"}],["craft-tabs",{name:"TabView",zigType:"craft.TabView",props:[{name:"activeTab",type:"number",required:!1,default:0},{name:"ontabchange",type:"callback",required:!1}],children:"multiple"}],["craft-tooltip",{name:"Tooltip",zigType:"craft.Tooltip",props:[{name:"content",type:"string",required:!0},{name:"position",type:"string",required:!1,default:"top"}],children:"single"}],["craft-date-picker",{name:"DatePicker",zigType:"craft.DatePicker",props:[{name:"value",type:"string",required:!1},{name:"min",type:"string",required:!1},{name:"max",type:"string",required:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-time-picker",{name:"TimePicker",zigType:"craft.TimePicker",props:[{name:"value",type:"string",required:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-color-picker",{name:"ColorPicker",zigType:"craft.ColorPicker",props:[{name:"value",type:"color",required:!1,default:"#000000"},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-data-table",{name:"DataTable",zigType:"craft.DataTable",props:[{name:"data",type:"array",required:!0},{name:"columns",type:"array",required:!0},{name:"sortable",type:"boolean",required:!1,default:!1},{name:"paginated",type:"boolean",required:!1,default:!1}],children:"none"}],["craft-virtual-list",{name:"VirtualList",zigType:"craft.VirtualList",props:[{name:"items",type:"array",required:!0},{name:"itemHeight",type:"number",required:!1,default:48},{name:"renderItem",type:"callback",required:!0}],children:"none"}],["craft-tree-view",{name:"TreeView",zigType:"craft.TreeView",props:[{name:"data",type:"object",required:!0},{name:"expandable",type:"boolean",required:!1,default:!0}],children:"none"}]]);async function k(j,q={}){let F=performance.now(),G={target:q.target||"universal",format:q.format||"zig",optimize:q.optimize??!0,treeShake:q.treeShake??!0,hotReload:q.hotReload??!1,debug:q.debug??!1,sourceMaps:q.sourceMaps??!1,bundle:q.bundle??!0,minify:q.minify??!1,components:q.components||P},Q=typeof j==="string"?I(j):j,U=z(Q.tree,G),W=f(U),K=G.treeShake?m(U,W):U,X=new Map;if(G.target==="universal"){let $=["macos","windows","linux","ios","android"];for(let _ of $){let R=J(K,{...G,target:_});X.set(_,R)}}else{let $=J(K,G);X.set(G.target,$)}let Y=s(K,G,X),x=r(Q,K,G),M={compilationTime:performance.now()-F,totalComponents:B(Q.tree),nativeComponents:b(K),webComponents:B(Q.tree)-b(K),bundleSize:Y.length,treeShakenSize:G.treeShake?g(U,K):Y.length,warnings:[],errors:[]},L;if(G.sourceMaps)L=p(Q,K);return{code:Y,platformCode:X,dependencies:W,manifest:x,sourceMaps:L,stats:M}}function I(j){let q={type:"fragment",children:[]},F=j.match(/<body[^>]*>([\s\S]*?)<\/body>/i),G=F?F[1]:j;return A(G,q),{id:E(),hash:D(j),tree:q,scripts:i(j),styles:a(j),staticParts:new Map,dynamicParts:new Map,dependencies:[],metadata:{hasSlots:!1,hasDynamicContent:j.includes("{{"),hasEventHandlers:j.includes("onclick")||j.includes("onchange"),hasAsyncContent:!1,componentCount:0,maxDepth:0,estimatedSize:j.length}}}function A(j,q){let F=/<(@?[\w-]+)([^>]*)(?:\/>|>([\s\S]*?)<\/\1>)/g,G;while((G=F.exec(j))!==null){let[,Q,U,W]=G,K=Q.startsWith("@craft-"),X={type:K?"component":"element",tag:K?Q.slice(1):Q,props:S(U),children:[],componentName:K?Q.slice(1):void 0};if(W){let Y=W.replace(/<[^>]+>/g,"").trim();if(Y)X.children=X.children??[],X.children.push({type:"text",text:Y});A(W,X)}q.children=q.children??[],q.children.push(X)}}function S(j){let q={},F=/([\w-:@]+)(?:=["']([^"']*)["'])?/g,G;while((G=F.exec(j))!==null){let[,Q,U]=G;q[Q]=U??!0}return q}function z(j,q){return Z(j,q)}function Z(j,q){let F=j.componentName?q.components?.get(j.componentName):void 0,G="craft.View";if(F)G=F.zigType;else if(j.type==="text")G="craft.Text";else if(j.tag)G=T(j.tag);let Q={};if(j.props)for(let[X,Y]of Object.entries(j.props))Q[X]=N(Y);let U=[];if(j.children)for(let X of j.children)U.push(Z(X,q));let W=new Map;if(j.props){for(let[X,Y]of Object.entries(j.props))if(X.startsWith("on")&&typeof Y==="string")W.set(X.slice(2).toLowerCase(),Y)}let K=C(j);return{type:y(j,F),zigType:G,props:Q,children:U,events:W,styles:K,id:j.hydrationKey,key:j.props?.key}}function T(j){return{div:"craft.View",span:"craft.Text",p:"craft.Text",h1:"craft.Text",h2:"craft.Text",h3:"craft.Text",h4:"craft.Text",h5:"craft.Text",h6:"craft.Text",button:"craft.Button",input:"craft.TextInput",textarea:"craft.TextArea",select:"craft.Select",img:"craft.Image",a:"craft.Link",ul:"craft.List",ol:"craft.List",li:"craft.ListItem",form:"craft.Form",label:"craft.Label",nav:"craft.View",header:"craft.View",footer:"craft.View",main:"craft.View",section:"craft.View",article:"craft.View",aside:"craft.View"}[j.toLowerCase()]||"craft.View"}function N(j){if(typeof j==="string"){if(j.startsWith("{{")&&j.endsWith("}}"))return{type:"binding",path:j.slice(2,-2).trim()};if(j.includes("(")&&j.includes(")"))return{type:"callback",handler:j};return{type:"literal",value:j}}if(typeof j==="number"||typeof j==="boolean")return{type:"literal",value:j};return{type:"literal",value:String(j)}}function y(j,q){if(q){let G=q.name.toLowerCase();if(G.includes("button"))return"button";if(G.includes("input")||G.includes("text"))return"input";if(G.includes("image")||G.includes("avatar"))return"image";if(G.includes("list")||G.includes("table"))return"list";if(G.includes("scroll"))return"scroll";return"custom"}if(j.type==="text")return"text";let F=j.tag?.toLowerCase();if(F==="button")return"button";if(F==="input"||F==="textarea")return"input";if(F==="img")return"image";if(F==="ul"||F==="ol")return"list";return"view"}function C(j){let q=j.props?.style,F={},G={};if(q){let Q=q.split(";").filter(Boolean);for(let U of Q){let[W,K]=U.split(":").map((X)=>X.trim());if(!W||!K)continue;switch(W){case"display":F.display=K;break;case"flex-direction":F.flexDirection=K;break;case"justify-content":F.justifyContent=h(K);break;case"align-items":F.alignItems=v(K);break;case"gap":F.gap=Number.parseInt(K,10);break;case"padding":F.padding=Number.parseInt(K,10);break;case"margin":F.margin=Number.parseInt(K,10);break;case"width":F.width=K==="auto"?"auto":Number.parseInt(K,10);break;case"height":F.height=K==="auto"?"auto":Number.parseInt(K,10);break;case"background-color":case"background":G.backgroundColor=K;break;case"border-color":G.borderColor=K;break;case"border-width":G.borderWidth=Number.parseInt(K,10);break;case"border-radius":G.borderRadius=Number.parseInt(K,10);break;case"opacity":G.opacity=Number.parseFloat(K);break}}}return{layout:F,appearance:G}}function h(j){return{"flex-start":"start","flex-end":"end",center:"center","space-between":"between","space-around":"around"}[j]||"start"}function v(j){return{"flex-start":"start","flex-end":"end",center:"center",stretch:"stretch"}[j]||"start"}function f(j){let q=[],F=new Set;function G(Q,U){let W=Q.id||E();if(F.has(W))return;F.add(W);let K={id:W,type:"component",path:Q.zigType,dependencies:U?[U]:[],size:w(Q),isStatic:u(Q)};q.push(K);for(let X of Q.children)G(X,W)}return G(j),q}function w(j){let q=100;return q+=Object.keys(j.props).length*20,q+=j.events.size*50,q}function u(j){for(let q of Object.values(j.props))if(q.type!=="literal")return!1;return j.events.size===0}function m(j,q){return j}function g(j,q){let F=0;function G(Q){F+=w(Q);for(let U of Q.children)G(U)}return G(q),F}function J(j,q){switch(q.format){case"zig":return H(j,q);case"typescript":return c(j,q);case"json":return JSON.stringify(j,null,q.minify?0:2);default:return H(j,q)}}function H(j,q){let F=[];return F.push("// Auto-generated by stx compiler"),F.push("// Target: "+q.target),F.push(""),F.push('const std = @import("std");'),F.push('const craft = @import("craft");'),F.push(""),F.push("pub fn render(allocator: std.mem.Allocator) !craft.Element {"),F.push(" return try build(allocator);"),F.push("}"),F.push(""),O(j,F,0),F.join(`
|
|
3
|
-
`)}function O(j,q,F){let G=" ".repeat(F);if(F===0)q.push("fn build(allocator: std.mem.Allocator) !craft.Element {");let Q=`node_${F}`;q.push(`${G} var ${Q} = try ${j.zigType}.init(allocator);`);for(let[U,W]of Object.entries(j.props))if(W.type==="literal"){let K=typeof W.value==="string"?`"${W.value}"`:String(W.value);q.push(`${G} ${Q}.set${l(U)}(${K});`)}for(let U=0;U<j.children.length;U++){let W=j.children[U];if(W.type==="text"){let K=W.props.text?.type==="literal"?String(W.props.text.value):"";q.push(`${G} try ${Q}.addChild(try craft.Text.init(allocator, "${K}"));`)}else O(W,q,F+1),q.push(`${G} try ${Q}.addChild(node_${F+1});`)}if(F===0)q.push(` return ${Q}.element();`),q.push("}")}function c(j,q){let F=[];return F.push("// Auto-generated by stx compiler"),F.push("// Target: "+q.target),F.push(""),F.push('import { Craft } from "@stacksjs/craft";'),F.push(""),F.push("export function render(): Craft.Element {"),F.push(" return "+V(j,1)+";"),F.push("}"),F.join(`
|
|
4
|
-
`)}function V(j,q){let F=" ".repeat(q),G=[];for(let[K,X]of Object.entries(j.props))if(X.type==="literal"){let Y=typeof X.value==="string"?`"${X.value}"`:String(X.value);G.push(`${K}: ${Y}`)}let Q=G.length>0?`{ ${G.join(", ")} }`:"{}",U=j.children.map((K)=>K.type==="text"?`"${K.props.text?.type==="literal"?K.props.text.value:""}"`:V(K,q+1)),W=U.length>0?`,
|
|
5
|
-
${F} [${U.join(`,
|
|
6
|
-
${F} `)}]`:"";return`Craft.create("${j.zigType}", ${Q}${W})`}function s(j,q,F){if(q.target==="universal"){let G=[];G.push("// Universal entry point"),G.push("");for(let[Q,U]of F)G.push(`// --- ${Q.toUpperCase()} ---`),G.push(`#if ${Q.toUpperCase()}`),G.push(U),G.push("#endif"),G.push("");return G.join(`
|
|
7
|
-
`)}return F.get(q.target)||J(j,q)}function r(j,q,F){let G=[];function Q(U){G.push({name:U.zigType,hash:D(JSON.stringify(U.props)),props:Object.keys(U.props),events:Array.from(U.events.keys()),slots:[],isNative:U.zigType.startsWith("craft.")});for(let W of U.children)Q(W)}return Q(q),{version:"1.0.0",components:G,entry:j.id,assets:[],styles:j.styles}}function p(j,q){return JSON.stringify({version:3,file:"output.zig",sources:["input.stx"],mappings:""})}var d=0;function E(){return`id_${++d}`}function D(j){let q=0;for(let F=0;F<j.length;F++){let G=j.charCodeAt(F);q=(q<<5)-q+G,q=q&q}return Math.abs(q).toString(36)}function l(j){return j.charAt(0).toUpperCase()+j.slice(1)}function i(j){let q=[],F=/<script[^>]*>([\s\S]*?)<\/script>/gi,G;while((G=F.exec(j))!==null)q.push(G[1]);return q}function a(j){let q=[],F=/<style[^>]*>([\s\S]*?)<\/style>/gi,G;while((G=F.exec(j))!==null)q.push(G[1]);return q}function B(j){let q=j.type==="component"?1:0;if(j.children)for(let F of j.children)q+=B(F);return q}function b(j){let q=j.zigType.startsWith("craft.")?1:0;for(let F of j.children)q+=b(F);return q}function o(j){return{start:async()=>{console.log("[craft-compiler] Hot reload server started")},stop:async()=>{console.log("[craft-compiler] Hot reload server stopped")},notifyChange:(q)=>{console.log(`[craft-compiler] File changed: ${q}`)}}}var t={compileToNative:k,createHotReloadServer:o,NATIVE_COMPONENTS:P},e=t;
|
|
8
|
-
export{P as hk,k as ik,o as jk,e as kk};
|
package/dist/chunk-nk3czvnk.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Hf as a,If as b,Jf as c,Kf as d,Lf as e,Mf as f,Nf as g,Of as h,Pf as i,Qf as j,Rf as k,Sf as l,Tf as m,Uf as n,Vf as o,Wf as p,Xf as q}from"./chunk-ytma76qe.js";import"./chunk-ay6zjq8v.js";export{h as resizeAndConvert,f as processImage,d as isSharpAvailable,m as isImageFile,e as isImageBackendAvailable,l as groupVariantsByFormat,o as getTotalSize,n as getMimeType,g as getImageMetadata,k as getFallbackVariant,i as generateSrcSet,j as generateSizes,p as formatSize,q as ImageProcessingError,a as DEFAULT_WIDTHS,c as DEFAULT_QUALITY,b as DEFAULT_FORMATS};
|
package/dist/chunk-nmw4eewb.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Sg as a,Tg as b,Ug as c,Vg as d,Wg as e,Xg as f}from"./chunk-0xqdmemy.js";import"./chunk-pwsnafp3.js";import"./chunk-1cyxbb8y.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-pwgv84pn.js";import"./chunk-tkyrk66a.js";import"./chunk-ranshpyc.js";import"./chunk-98zj3fv2.js";import"./chunk-35ds08e7.js";import"./chunk-5se8xt9e.js";import"./chunk-gnfywmgs.js";import"./chunk-yq8x8bxq.js";import"./chunk-266t58b8.js";import"./chunk-nq5zxrk0.js";import"./chunk-az4v4ard.js";import"./chunk-4f9zyfdw.js";import"./chunk-xssw417m.js";import"./chunk-kg1rdena.js";import"./chunk-ay6zjq8v.js";export{c as renderSlot,d as processSlots,a as parseSlots,b as parseSlotElement,e as extractSlotContent,f as applySlots};
|
package/dist/chunk-nq5zxrk0.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
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
|
-
`).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 Nv,U as Ov};
|
package/dist/chunk-ny67c03k.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
function E(z){if(!z.startsWith("/")||/[?#\\]/.test(z))throw Error(`Invalid route rule pattern: ${z}`);let w=z==="/"?[]:z.slice(1).split("/");if(w.some((q,j)=>!q||q.includes("*")&&q!=="*"&&q!=="**"||q==="**"&&j!==w.length-1||q.startsWith(":")&&!/^:[\w]+$/.test(q)))throw Error(`Unsupported route rule pattern: ${z}`);return w}function F(z){for(let[w,q]of Object.entries(z)){if(E(w),!q||typeof q!=="object"||Object.keys(q).some((j)=>j!=="rendering"&&j!=="cache"))throw Error(`Unsupported route rule for ${w}`);if(q.rendering!==void 0&&q.rendering!=="prerender"&&q.rendering!=="dynamic")throw Error(`Unsupported rendering mode for ${w}`);if(q.cache!==void 0&&q.cache!==!1){let j=q.cache;if(!j||j.public!==!0||Object.keys(j).some((x)=>!["public","maxAge","swr"].includes(x))||!Number.isFinite(j.maxAge)||j.maxAge<=0||j.swr!==void 0&&(!Number.isFinite(j.swr)||j.swr<0))throw Error(`Route cache for ${w} requires public: true, maxAge > 0 and swr >= 0`);if(q.rendering==="prerender")throw Error(`Prerendered route ${w} cannot revalidate; use dynamic rendering with cache`)}}}function G(z={}){F(z);let w=(j)=>j==="**"?0:j==="*"?1:j.startsWith(":")?2:3,q=Object.entries(z).map(([j,x])=>({pattern:j,parts:E(j),rule:x}));return q.sort((j,x)=>{for(let A=0;A<Math.max(j.parts.length,x.parts.length);A++){let B=(x.parts[A]===void 0?4:w(x.parts[A]))-(j.parts[A]===void 0?4:w(j.parts[A]));if(B)return B}return j.pattern.localeCompare(x.pattern)}),(j)=>{let x=j==="/"?[]:j.replace(/\/$/,"").slice(1).split("/");return q.find(({parts:A})=>A.every((B,D)=>B==="**"||x[D]!==void 0&&(B==="*"||B.startsWith(":")||B===x[D]))&&(A.at(-1)==="**"||A.length===x.length))?.rule??{}}}
|
|
3
|
-
export{F as Eg,G as Fg};
|
package/dist/chunk-p4wdxp2c.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Bh as a,Ch as b,Dh as c,Eh as d,Fh as e,Gh as f,Hh as g,Ih as h}from"./chunk-76w34xne.js";import"./chunk-ay6zjq8v.js";export{g as timingPlugin,c as pluginManager,a as definePlugin,f as debugPlugin,h as createVariablesPlugin,e as createFilterPlugin,d as createDirectivePlugin,b as PluginManager};
|
package/dist/chunk-pcxp4r9n.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{createHash as Y}from"crypto";import{readFile as M,stat as w}from"fs/promises";async function G(q){try{let z=await M(q);return Y("sha256").update(z).digest("hex").slice(0,16)}catch{return""}}function u(q){return Y("sha256").update(q).digest("hex").slice(0,16)}function $(q){return Y("sha256").update(q).digest("hex").slice(0,16)}function X(q,z){let B=JSON.stringify(z,Object.keys(z).sort());return`${$(q)}-${$(B)}`}async function Z(q){try{return(await w(q)).mtimeMs}catch{return 0}}async function b(q){try{return await w(q),!0}catch{return!1}}import{mkdir as S,readFile as V,writeFile as E,readdir as A,rm as _,stat as j}from"fs/promises";import{join as U,dirname as x}from"path";var R=new Map,W={enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:500};async function F(q){try{await S(q,{recursive:!0})}catch{}}function K(q,z,B){return U(q,B,`${z}.json`)}async function v(q,z,B){if((Date.now()-q.createdAt)/86400000>B)return!1;if(await Z(z)!==q.srcMtime)return!1;return!0}async function g(q,z,B,J=W){if(!J.enabled)return null;let I=X(q,z),L=R.get(I);if(L){if(await v(L,q,J.maxAge))return L.lastAccessedAt=Date.now(),L.data;R.delete(I)}let Q=K(J.directory,I,B);if(await b(Q))try{let N=await V(Q,"utf-8"),O=JSON.parse(N);if(await v(O,q,J.maxAge))return O.lastAccessedAt=Date.now(),R.set(I,O),O.data}catch{}return null}async function l(q,z,B,J,I=W){if(!I.enabled)return;let L=X(q,z),Q=await G(q),N=await Z(q),O={key:L,src:q,srcHash:Q,srcMtime:N,optionsHash:X("",z),data:B,createdAt:Date.now(),lastAccessedAt:Date.now()};R.set(L,O);let T=K(I.directory,L,J);try{await F(x(T)),await E(T,JSON.stringify(O,null,2))}catch(H){console.warn(`[stx-media] Failed to write cache: ${H}`)}}async function m(q,z=W){if(q==="all")R.clear();else R.clear();let B=q==="all"?["image","video"]:[q];for(let J of B){let I=U(z.directory,J);try{await _(I,{recursive:!0,force:!0})}catch{}}}async function y(q=W){let z={memoryEntries:R.size,diskEntries:{image:0,video:0},totalSizeMB:0};for(let B of["image","video"]){let J=U(q.directory,B);try{let I=await A(J);z.diskEntries[B]=I.length;for(let L of I){let Q=U(J,L),N=await j(Q);z.totalSizeMB+=N.size/1048576}}catch{}}return z}async function f(q=W){let z=0,B=q.maxAge*24*60*60*1000;for(let J of["image","video"]){let I=U(q.directory,J);try{let L=await A(I);for(let Q of L){let N=U(I,Q);try{let O=await V(N,"utf-8"),T=JSON.parse(O);if(Date.now()-T.createdAt>B)await _(N),R.delete(T.key),z++}catch{await _(N).catch(()=>{}),z++}}}catch{}}return z}
|
|
3
|
-
export{G as qh,u as rh,$ as sh,X as th,Z as uh,b as vh,g as wh,l as xh,m as yh,y as zh,f as Ah};
|
package/dist/chunk-pdyeaxc1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{bg as a}from"./chunk-cxbpmwq5.js";import"./chunk-6xk87qf2.js";import"./chunk-ny67c03k.js";import"./chunk-kgd8kchy.js";import"./chunk-9e8t0twa.js";import"./chunk-anydpa34.js";import"./chunk-ec4wq2sv.js";import"./chunk-pwsnafp3.js";import"./chunk-1cyxbb8y.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-pwgv84pn.js";import"./chunk-tkyrk66a.js";import"./chunk-ranshpyc.js";import"./chunk-98zj3fv2.js";import"./chunk-35ds08e7.js";import"./chunk-5se8xt9e.js";import"./chunk-gnfywmgs.js";import"./chunk-yq8x8bxq.js";import"./chunk-266t58b8.js";import"./chunk-nq5zxrk0.js";import"./chunk-az4v4ard.js";import"./chunk-4f9zyfdw.js";import"./chunk-xssw417m.js";import"./chunk-kg1rdena.js";import"./chunk-ay6zjq8v.js";export{a as buildForProduction};
|
package/dist/chunk-pf06ded4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{_e as a}from"./chunk-7rxvafwc.js";import"./chunk-pwsnafp3.js";import"./chunk-1cyxbb8y.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-pwgv84pn.js";import"./chunk-tkyrk66a.js";import"./chunk-ranshpyc.js";import"./chunk-98zj3fv2.js";import"./chunk-35ds08e7.js";import"./chunk-5se8xt9e.js";import"./chunk-gnfywmgs.js";import"./chunk-yq8x8bxq.js";import"./chunk-266t58b8.js";import"./chunk-nq5zxrk0.js";import"./chunk-az4v4ard.js";import"./chunk-4f9zyfdw.js";import"./chunk-xssw417m.js";import"./chunk-kg1rdena.js";import"./chunk-ay6zjq8v.js";export{a as startInteractive};
|
package/dist/chunk-pfs0gpzm.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{lm as c,om as d,pm as e,qm as f,rm as g,sm as h,tm as i,um as j,vm as k,wm as l,xm as m,ym as n}from"./chunk-pwsnafp3.js";import"./chunk-1cyxbb8y.js";import"./chunk-zcz9rs6p.js";import{Gs as a,Hs as b}from"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-pwgv84pn.js";import"./chunk-tkyrk66a.js";import"./chunk-ranshpyc.js";import"./chunk-98zj3fv2.js";import"./chunk-35ds08e7.js";import"./chunk-5se8xt9e.js";import"./chunk-gnfywmgs.js";import"./chunk-yq8x8bxq.js";import"./chunk-266t58b8.js";import"./chunk-nq5zxrk0.js";import"./chunk-az4v4ard.js";import"./chunk-4f9zyfdw.js";import"./chunk-xssw417m.js";import"./chunk-kg1rdena.js";import"./chunk-ay6zjq8v.js";export{h as transformAutoImports,b as stripCommentsAndLiterals,e as renderVendorStyleTags,i as referencesName,n as processClientScript,g as injectBrowserCoreAutoImports,m as generateServerDataBridge,k as generateBrowserAutoImportDestructuring,j as generateAutoImportDestructuring,a as findInterpolationEnd,l as extractBridgeData,d as extractAndStripCssImports,f as STX_AUTO_IMPORTS,c as BROWSER_CORE_IMPORTS};
|
package/dist/chunk-pshdwq44.js
DELETED
package/dist/chunk-pwgv84pn.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Jt as SJ}from"./chunk-tkyrk66a.js";import{kx as EJ}from"./chunk-ay6zjq8v.js";import G from"path";import{hasLocalConfig as bJ}from"bunfig";var FJ={fg:{light:"neutral-900",dark:"neutral-100",description:"Primary text"},"fg-strong":{light:"neutral-700",dark:"neutral-300",description:"Labels, secondary headings"},"fg-muted":{light:"neutral-600",dark:"neutral-400",description:"Supporting text"},"fg-soft":{light:"neutral-500",dark:"neutral-400",description:"De-emphasised text"},"fg-subtle":{light:"neutral-400",dark:"neutral-500",description:"Recessive, non-essential text"},surface:{light:"neutral-50",dark:"neutral-800",description:"Page and panel background"},"surface-raised":{light:"neutral-100",dark:"neutral-700",description:"Cards, popovers"},"surface-sunken":{light:"neutral-200",dark:"neutral-700",description:"Wells, track backgrounds"},panel:{light:"white",dark:"neutral-800",description:"Card, menu, dialog surface"},field:{light:"white",dark:"neutral-700",description:"Form control surface"},page:{light:"neutral-50",dark:"neutral-900",description:"Page background, behind panels"},content:{light:"white",dark:"neutral-900",description:"Content area under a chrome header - a table or list body"},"surface-hover":{light:"neutral-100",dark:"neutral-700",description:"Row or item highlight on a page or panel"},"surface-raised-hover":{light:"neutral-200",dark:"neutral-600",description:"Raised surface, hovered"},"surface-sunken-hover":{light:"neutral-300",dark:"neutral-600",description:"Sunken surface, hovered"},"field-hover":{light:"neutral-50",dark:"neutral-600",description:"Form control surface, hovered"},link:{light:"blue-500",dark:"blue-400",description:"Hyperlink"},"link-hover":{light:"blue-600",dark:"blue-300",description:"Hyperlink, hovered"},inverse:{light:"neutral-900",dark:"neutral-700",description:"Tooltip bubble, inverted surface"},"inverse-ink":{light:"white",dark:"white",description:"Text on an inverted surface"},line:{light:"neutral-200",dark:"neutral-700",description:"Default border, divider"},"line-strong":{light:"neutral-300",dark:"neutral-600",description:"Input border, focus ring track"},"line-hover":{light:"neutral-400",dark:"neutral-500",description:"Border of a hovered control"},accent:{light:"blue-600",dark:"blue-400",description:"Primary action, selected state"},info:{light:"cyan-600",dark:"cyan-400",description:"Informational emphasis"},danger:{light:"red-600",dark:"red-400",description:"Errors, destructive actions"},success:{light:"green-600",dark:"green-400",description:"Confirmation"},warning:{light:"yellow-600",dark:"yellow-400",description:"Caution"},"accent-solid":{light:"blue-500",dark:"blue-600",description:"Primary button fill"},"info-solid":{light:"cyan-500",dark:"cyan-600",description:"Informational fill"},"danger-solid":{light:"red-500",dark:"red-600",description:"Destructive button fill"},"success-solid":{light:"green-500",dark:"green-600",description:"Confirmation fill"},"warning-solid":{light:"yellow-500",dark:"yellow-600",description:"Caution fill"},"accent-solid-hover":{light:"blue-600",dark:"blue-700",description:"Primary button fill, hovered"},"info-solid-hover":{light:"cyan-600",dark:"cyan-700",description:"Informational fill, hovered"},"danger-solid-hover":{light:"red-600",dark:"red-700",description:"Destructive fill, hovered"},"success-solid-hover":{light:"green-600",dark:"green-700",description:"Confirmation fill, hovered"},"warning-solid-hover":{light:"yellow-600",dark:"yellow-700",description:"Caution fill, hovered"},"accent-ink":{light:"white",dark:"white",description:"Text on a primary fill"},"info-ink":{light:"neutral-900",dark:"neutral-900",description:"Text on an informational fill"},"danger-ink":{light:"white",dark:"white",description:"Text on a destructive fill"},"success-ink":{light:"neutral-900",dark:"neutral-900",description:"Text on a confirmation fill"},"warning-ink":{light:"neutral-900",dark:"neutral-900",description:"Text on a caution fill"},"accent-soft":{light:"blue-100",dark:"blue-900",description:"Tinted primary fill"},"accent-soft-ink":{light:"blue-800",dark:"blue-200",description:"Text on a tinted primary fill"},"info-soft":{light:"cyan-100",dark:"cyan-900",description:"Tinted informational fill"},"info-soft-ink":{light:"cyan-800",dark:"cyan-200",description:"Text on a tinted informational fill"},"danger-soft":{light:"red-100",dark:"red-900",description:"Tinted destructive fill"},"danger-soft-ink":{light:"red-800",dark:"red-200",description:"Text on a tinted destructive fill"},"success-soft":{light:"green-100",dark:"green-900",description:"Tinted confirmation fill"},"success-soft-ink":{light:"green-800",dark:"green-200",description:"Text on a tinted confirmation fill"},"warning-soft":{light:"yellow-100",dark:"yellow-900",description:"Tinted caution fill"},"warning-soft-ink":{light:"yellow-800",dark:"yellow-200",description:"Text on a tinted caution fill"},secondary:{light:"purple-600",dark:"purple-400",description:"Secondary emphasis"},"secondary-solid":{light:"purple-500",dark:"purple-600",description:"Secondary fill"},"secondary-solid-hover":{light:"purple-600",dark:"purple-700",description:"Secondary fill, hovered"},"secondary-ink":{light:"white",dark:"white",description:"Text on a secondary fill"},"secondary-soft":{light:"purple-100",dark:"purple-900",description:"Tinted secondary fill"},"secondary-soft-ink":{light:"purple-800",dark:"purple-200",description:"Text on a tinted secondary fill"},"danger-fg":{light:"red-900",dark:"red-300",description:"Text in a field with an error"},"danger-fg-subtle":{light:"red-300",dark:"red-500",description:"Recessive text in a field with an error"},"danger-line":{light:"red-300",dark:"red-600",description:"Border of a field with an error"},"danger-focus":{light:"red-500",dark:"red-400",description:"Focus ring of a field with an error"}};function y(J){return`--stx-${J}`}function f(J,Q){let Z=Q.lastIndexOf("-");if(Z===-1)return typeof J[Q]==="string"?J[Q]:void 0;let $=J[Q.slice(0,Z)];if(!$||typeof $!=="object")return;let U=$[Q.slice(Z+1)];return typeof U==="string"?U:void 0}function jJ(J){let Q={};for(let[Z,$]of Object.entries(FJ)){let U=f(J,$.light);if(U===void 0)continue;Q[Z]=`var(${y(Z)}, ${U})`}return Q}function WJ(J){let Q=[],Z=[];for(let[$,U]of Object.entries(FJ)){let F=f(J,U.light),j=f(J,U.dark);if(F===void 0)continue;if(Q.push(` ${y($)}: ${F};`),j!==void 0)Z.push(` ${y($)}: ${j};`)}if(Q.length===0)return"";return["/* stx role tokens \u2014 override any of these to re-theme by meaning. */",":root {",...Q,"}",".dark {",...Z,"}",""].join(`
|
|
3
|
-
`)}var XJ={control:{value:"0.375rem",description:"Buttons, inputs, selects \u2014 rounded-md"},panel:{value:"0.5rem",description:"Cards, dialogs, menus \u2014 rounded-lg"},pill:{value:"9999px",description:"Chips and badges, which are pill-shaped by intent"}};function VJ(J){return`--stx-radius-${J}`}function qJ(){let J={};for(let[Q,Z]of Object.entries(XJ))J[Q]=`var(${VJ(Q)}, ${Z.value})`;return J}function zJ(){return["/* stx shape tokens \u2014 a radius by what the thing is. */",":root {",...Object.entries(XJ).map(([J,Q])=>` ${VJ(J)}: ${Q.value};`),"}",""].join(`
|
|
4
|
-
`)}function GJ(J){return typeof J==="object"&&J!==null&&!Array.isArray(J)}function C(J,Q){let Z={...J};for(let[$,U]of Object.entries(Q))Z[$]=GJ(U)&&GJ(Z[$])?C(Z[$],U):U;return Z}function YJ(J={},Q={}){let Z=J.theme||{},$=Q.theme||{},{extend:U,...F}=$,{extend:j,...V}=Z,W=V.colors||{};V.colors={...W,...jJ(W)};let X=V.borderRadius||{};V.borderRadius={...X,...qJ()};let q=C(V,F),z=C(j||{},U||{});if(Object.keys(z).length>0)q.extend=z;let w=[...J.safelist||[],...Q.safelist||[]],O={...J.shortcuts||{},...Q.shortcuts||{}},K=[...J.preflights||[],...Q.preflights||[]];return{config:{...J,...Q,theme:q,safelist:w,shortcuts:O,...K.length>0?{preflights:K}:{},content:[],output:""},safelist:w,shortcuts:O,includePreflight:Q.preflight!==!1,minify:Q.minify===!0,tokenCSS:WJ(W)+zJ()}}var v=/<script\b[^>]*>/iy,p=/<\/script\s*>/ig,R=/<style\b[^>]*>/iy,m=/<\/style\s*>/ig;function wJ(J,Q,Z,$){Z.lastIndex=Q;let U=Z.exec(J);if(!U||U.index!==Q)return-1;$.lastIndex=Z.lastIndex;let F=$.exec(J);if(!F)return-1;return F.index+F[0].length}function h(J,Q){return wJ(J,Q,v,p)}function LJ(J,Q){return wJ(J,Q,R,m)}function pJ(J,Q){if(!J.startsWith("<!--",Q))return-1;let Z=J.indexOf("-->",Q+4);if(Z===-1)return-1;return Z+3}function BJ(J,Q){if(J.startsWith("<!--",Q)){let U=pJ(J,Q);return U===-1?J.length:U}if(v.lastIndex=Q,v.exec(J)?.index===Q){p.lastIndex=v.lastIndex;let U=p.exec(J);return U?U.index+U[0].length:J.length}if(R.lastIndex=Q,R.exec(J)?.index===Q){m.lastIndex=R.lastIndex;let U=m.exec(J);return U?U.index+U[0].length:J.length}return-1}function mJ(J,Q){let Z=[],$=0,U=J.length,F=!1,j=null;while($<U){let V=J[$];if(F){if(j){if(V===j)j=null}else if(V==='"'||V==="'")j=V;else if(V===">")F=!1;$++;continue}if(V!=="<"){let z=J.indexOf("<",$+1);if(z===-1)break;$=z;continue}let W=Q(J,$);if(W>$){Z.push({start:$,end:W,token:J.slice($,W)}),$=W;continue}let X=BJ(J,$);if(X>$){$=X;continue}let q=J.charCodeAt($+1);if(q>=65&&q<=90||q>=97&&q<=122)F=!0;$++}return Z}function NQ(J){let Q=0,Z=0,$=0,U=!1,F=null;while($<J.length){if(U){let z=J[$];if(F){if(z===F)F=null}else if(z==='"'||z==="'")F=z;else if(z===">")U=!1;$++;continue}let j=J.indexOf("<",$),V=j===-1?J.length:j;while($<V){let z=J[$++];if(z==="{")Q++;else if(z==="}")Z++;if(Q>=2&&Z>=2)return!0}if(j===-1)break;let W=BJ(J,j);if(W>j){$=W;continue}let X=J.charCodeAt(j+1),q=X===47?J.charCodeAt(j+2):X;if(q>=65&&q<=90||q>=97&&q<=122)U=!0;$=j+1}return!1}function HJ(J,Q){while(J.size>=Q){let Z=J.keys().next();if(Z.done)return;J.delete(Z.value)}}var hJ=65536,iJ=12,g=new Map;function i(J,Q,Z,$){let U=$!==void 0&&J.length>=hJ,F=U?`${$}\x00${J}`:"";if(U){let q=g.get(F);if(q)return{output:q.output,tokens:q.tokens.slice()}}let j=mJ(J,Q);if(j.length===0)return{output:J,tokens:[]};let V=j.map((q)=>q.token),W="",X=0;for(let q=0;q<j.length;q++){let z=j[q];W+=J.slice(X,z.start),W+=Z(z.token,q),X=z.end}if(W+=J.slice(X),U)return HJ(g,iJ),g.set(F,{output:W,tokens:V}),{output:W,tokens:V.slice()};return{output:W,tokens:V}}var nJ=65536,cJ=4,u=new Map;function d(J,Q,Z){return{output:Q,scripts:Z,restore:($)=>$===Q?J:rJ($,Z)}}function MQ(J){let Q=J.length>=nJ;if(Q){let U=u.get(J);if(U)return d(J,U.output,U.scripts.slice())}let{output:Z,tokens:$}=i(J,h,(U,F)=>`\x00STX_SCRIPT_${F}\x00`);if(Q)return HJ(u,cJ),u.set(J,{output:Z,scripts:$}),d(J,Z,$.slice());return d(J,Z,$)}function rJ(J,Q){if(Q.length===0)return J;return J.replace(/\x00STX_SCRIPT_(\d+)\x00/g,(Z,$)=>Q[+$]??"")}function OJ(J,Q=""){let Z=`${J}${Q}`,$=0;for(let U=0;U<Z.length;U++){let F=Z.charCodeAt(U);$=($<<5)-$+F,$=$&$}return`stx-${Math.abs($).toString(36)}`}function KJ(J,Q,Z={}){let{prefix:$="",preserveHost:U=!0,scopeKeyframes:F=!0,scopeCustomProperties:j=!1}=Z;if(!J.trim())return"";let V=n(J),W=[],X=new Map;if(F)for(let q of V){let z=q.selector.match(/@keyframes\s+([a-z_-][a-z0-9_-]*)/i);if(z){let w=z[1],O=`${Q}_${w}`;X.set(w,O)}}for(let q of V){let z=IJ(q,Q,$,U,X,j);W.push(z)}return W.join(`
|
|
5
|
-
|
|
6
|
-
`)}function n(J){let Q=[],Z=J.replace(/\/\*[\s\S]*?\*\//g,""),$=0,U="",F=!1,j="";for(let V=0;V<Z.length;V++){let W=Z[V];if(W==="@"&&$===0)F=!0;if(W==="{")$++;else if(W==="}"){if($--,$===0){if(F){j+=W;let X=j.match(/@([a-z-]+)\s*([^{]*)\{([\s\S]*)\}/i);if(X){let[,q,z,w]=X;if(q==="keyframes")Q.push({selector:`@keyframes ${z.trim()}`,declarations:w.trim()});else if(q==="media"||q==="supports"||q==="container"){let O=n(w);Q.push({selector:`@${q} ${z.trim()}`,declarations:O.map((K)=>`${K.selector} { ${K.declarations} }`).join(`
|
|
7
|
-
`)})}else Q.push({selector:`@${q} ${z.trim()}`,declarations:w.trim()})}j="",F=!1}else if(U.trim()){U+=W;let X=U.match(/([^{]+)\{([^}]*)\}/);if(X)Q.push({selector:X[1].trim(),declarations:X[2].trim()});U=""}continue}}if(F)j+=W;else U+=W}return Q}function IJ(J,Q,Z,$,U,F){let{selector:j,declarations:V}=J;if(j.startsWith("@")){if(j.startsWith("@keyframes")){let q=j.replace("@keyframes ","").trim();return`@keyframes ${U.get(q)||q} { ${V} }`}if(j.startsWith("@media")||j.startsWith("@supports")||j.startsWith("@container")){let z=n(`x { ${V} }`.replace(/x \{ /,"").replace(/ \}$/,"")).map((w)=>IJ(w,Q,Z,$,U,F)).join(`
|
|
8
|
-
`);return`${j} {
|
|
9
|
-
${z}
|
|
10
|
-
}`}return`${j} { ${V} }`}let W=lJ(j,Q,Z,$),X=V;for(let[q,z]of U)X=X.replace(new RegExp(`\\b${q}\\b`,"g"),z);if(F)X=X.replace(/--([a-z-]+)/gi,`--${Q}-$1`);return`${W} { ${X} }`}function lJ(J,Q,Z,$){let U=J.split(",").map((j)=>j.trim()),F=[];for(let j of U){if(j.startsWith(":host")){if($)F.push(j);else{let X=j.replace(/:host(\([^)]*\))?/,`.${Q}$1`);F.push(X)}continue}if(j.includes("::slotted")){F.push(j);continue}if(j===":root"){F.push(`:root .${Q}`);continue}let V=Z?`${Z} .${Q}`:`.${Q}`;F.push(`${V} ${j}`);let W=oJ(j,Q);if(W)F.push(Z?`${Z} ${W}`:W)}return F.join(", ")}function oJ(J,Q){let Z=0,$=J.length;for(let W=0;W<J.length;W++){let X=J[W];if(X==="["||X==="(")Z++;else if(X==="]"||X===")")Z--;else if(Z===0&&(X===" "||X===">"||X==="+"||X==="~")){$=W;break}}let U=J.slice(0,$),F=J.slice($);if(!U)return"";let j=U.length,V=0;for(let W=0;W<U.length;W++){let X=U[W];if(X==="["||X==="(")V++;else if(X==="]"||X===")")V--;else if(Z===0&&V===0&&X===":"){j=W;break}}return`${U.slice(0,j)}.${Q}${U.slice(j)}${F}`}var MJ=String.raw`(?<![\w-])scoped(?![\w-])`,c=/<style\s+([^>]*)>/gi,DJ=/<style\s+([^>]*)>([\s\S]*?)<\/style>/gi,PJ=new RegExp(MJ,"i"),aJ=new RegExp(MJ,"gi"),r=/<style\b[^>]*\bdata-stx-scoped(?:=(?:"[^"]*"|'[^']*'|[^\s>]+))?[^>]*>[\s\S]*?<\/style>\s*/gi;function sJ(J){c.lastIndex=0;let Q=c.exec(J);while(Q!==null){if(PJ.test(Q[1]))return!0;Q=c.exec(J)}return!1}function l(J){let Q=new Set,Z=[];r.lastIndex=0;let $=r.exec(J);while($!==null){let U=$[0].trim();if(Q.has(U))Z.push({start:$.index,end:$.index+$[0].length});else Q.add(U);$=r.exec(J)}return Z}function o(J){let Q=l(J);if(Q.length===0)return J;let Z=Array(Q.length+1),$=0;for(let U=0;U<Q.length;U++){let F=Q[U];Z[U]=J.slice($,F.start),$=F.end}return Z[Q.length]=J.slice($),Z.join("")}function RQ(J,Q){if(!sJ(J))return{html:J,hasScoped:!1};let Z=OJ(Q),$=`data-v-${Z}`,U=J,F=!1;if(DJ.lastIndex=0,U=U.replace(DJ,(j,V,W)=>{if(!PJ.test(V))return j;F=!0;let X=tJ(W,$),q=V.replace(aJ,"").trim(),z=q?` ${q}`:"";return`<style data-stx-scoped="${Z}"${z}>${X}</style>`}),!F)return{html:J,hasScoped:!1};return U=JQ(U,$),{html:U,hasScoped:!0}}function tJ(J,Q){return KJ(J,"__SCOPE_PLACEHOLDER__",{preserveHost:!1}).replace(/\.(__SCOPE_PLACEHOLDER__) /g,`[${Q}] `).replace(/\.(__SCOPE_PLACEHOLDER__)/g,`[${Q}]`)}var eJ=(J)=>`\x00stx-scope-mask-${J}\x00`,NJ=/\u0000stx-scope-mask-(\d+)\u0000/g;function JQ(J,Q){let Z=i(J,(U,F)=>{let j=h(U,F);return j>F?j:LJ(U,F)},(U,F)=>eJ(F)),$=QQ(Z.output,Q);return NJ.lastIndex=0,$.replace(NJ,(U,F)=>Z.tokens[Number(F)])}function QQ(J,Q){let Z=new Set(["script","style","template","html","head","body","meta","link","title","base","!doctype","!DOCTYPE"]);return J.replace(/<([a-zA-Z][a-zA-Z0-9-]*)(\s[^>]*)?\/?>/g,($,U,F)=>{if(Z.has(U.toLowerCase()))return $;if($.includes(Q))return $;if(U.toLowerCase()==="style"||U.toLowerCase()==="script")return $;if(F)return $.replace(`<${U}${F}`,`<${U} ${Q}${F}`);if($.endsWith("/>"))return`<${U} ${Q} />`;return`<${U} ${Q}>`})}var Y={reset:"\x1B[0m",bright:"\x1B[1m",dim:"\x1B[2m",underscore:"\x1B[4m",blink:"\x1B[5m",reverse:"\x1B[7m",hidden:"\x1B[8m",black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",gray:"\x1B[90m",bgBlack:"\x1B[40m",bgRed:"\x1B[41m",bgGreen:"\x1B[42m",bgYellow:"\x1B[43m",bgBlue:"\x1B[44m",bgMagenta:"\x1B[45m",bgCyan:"\x1B[46m",bgWhite:"\x1B[47m",bgGray:"\x1B[100m"};import vJ from"fs";class s{cache=new Map;maxSize;options;sizes;bytes=0;constructor(J=100,Q){this.maxSize=J,this.options=Q??null,this.sizes=Q?new Map:null}get byteSize(){return this.bytes}setMaxBytes(J){if(!this.options)return;this.options={...this.options,maxBytes:J};while(this.bytes>J&&this.cache.size>0){let Q=this.cache.keys().next().value;if(Q===void 0)break;this.delete(Q)}}get(J){if(!this.cache.has(J))return;let Q=this.cache.get(J);return this.cache.delete(J),this.cache.set(J,Q),Q}set(J,Q){if(this.cache.has(J))this.delete(J);let Z=this.options?this.options.sizeOf(Q):0;if(this.options&&Z>this.options.maxBytes)return;while(this.cache.size>0&&(this.cache.size>=this.maxSize||this.options!==null&&this.bytes+Z>this.options.maxBytes)){let $=this.cache.keys().next().value;if($===void 0)break;this.delete($)}if(this.cache.set(J,Q),this.sizes)this.sizes.set(J,Z),this.bytes+=Z}has(J){return this.cache.has(J)}delete(J){if(this.sizes){let Q=this.sizes.get(J);if(Q!==void 0)this.bytes-=Q,this.sizes.delete(J)}return this.cache.delete(J)}clear(){this.cache.clear(),this.sizes?.clear(),this.bytes=0}get size(){return this.cache.size}keys(){return this.cache.keys()}values(){return this.cache.values()}}var N=new Map,$Q=500;function kQ(J,Q){if(Q?.includes("g"))return new RegExp(J,Q);let Z=`${J}:${Q||""}`;if(!N.has(Z)){if(N.size>=$Q){let $=N.keys().next().value;if($)N.delete($)}N.set(Z,new RegExp(J,Q))}return N.get(Z)}class AJ{pool=[];maxPoolSize=10;fnCache=new Map;fnCacheMaxSize=200;getEvaluator(J){let Q=Array.from(new Set(J)),Z=Q.sort().join(","),$=this.pool.find((V)=>V.context.join(",")===Z);if($)return $.func;let U=this.fnCache,F=this.fnCacheMaxSize,j=(...V)=>{return(W)=>{try{let X=`${Z}:${W}`,q=U.get(X);if(!q){if(U.size>=F){let z=U.keys().next().value;if(z)U.delete(z)}q=Function(...Q,`
|
|
11
|
-
'use strict';
|
|
12
|
-
try {
|
|
13
|
-
return ${W};
|
|
14
|
-
}
|
|
15
|
-
catch (e) {
|
|
16
|
-
if (e instanceof ReferenceError || e instanceof TypeError) {
|
|
17
|
-
return undefined;
|
|
18
|
-
}
|
|
19
|
-
throw e;
|
|
20
|
-
}
|
|
21
|
-
`),U.set(X,q)}return q(...V)}catch{return}}};if(this.pool.length<this.maxPoolSize)this.pool.push({func:j,context:Q.slice()});return j}clear(){this.pool.length=0,this.fnCache.clear()}}var xQ=new AJ;class _J{metrics=new Map;budgets=new Map;violations=[];maxViolations=100;violationHandlers=[];enabled=!0;setEnabled(J){this.enabled=J}isEnabled(){return this.enabled}setBudget(J,Q){this.budgets.set(J,{warnThreshold:0.8,action:"warn",...Q})}setBudgets(J){for(let[Q,Z]of Object.entries(J))this.setBudget(Q,Z)}removeBudget(J){this.budgets.delete(J)}getBudgets(){let J={};for(let[Q,Z]of this.budgets.entries())J[Q]=Z;return J}onViolation(J){this.violationHandlers.push(J)}offViolation(J){let Q=this.violationHandlers.indexOf(J);if(Q!==-1)this.violationHandlers.splice(Q,1)}time(J,Q){if(!this.enabled)return Q();let Z=performance.now(),$=Q(),U=performance.now()-Z;return this.recordTime(J,U),this.checkBudget(J,U),$}async timeAsync(J,Q){if(!this.enabled)return Q();let Z=performance.now(),$=await Q(),U=performance.now()-Z;return this.recordTime(J,U),this.checkBudget(J,U),$}checkBudget(J,Q){let Z=this.budgets.get(J);if(!Z)return;let $=Q/Z.maxTime*100,U=Z.warnThreshold!==void 0?Q>=Z.maxTime*Z.warnThreshold&&Q<Z.maxTime:!1,F=Q>=Z.maxTime;if(!U&&!F)return;let j={label:J,actualTime:Q,budgetTime:Z.maxTime,exceedancePercent:$,timestamp:new Date,isWarning:U};this.violations.push(j);while(this.violations.length>this.maxViolations)this.violations.shift();for(let W of this.violationHandlers)try{W(j)}catch{}let V=U?`[Performance Warning] "${J}" took ${Q.toFixed(2)}ms (${$.toFixed(1)}% of ${Z.maxTime}ms budget)`:`[Performance Budget Exceeded] "${J}" took ${Q.toFixed(2)}ms (exceeded ${Z.maxTime}ms budget by ${($-100).toFixed(1)}%)`;switch(Z.action){case"log":console.log(V);break;case"warn":console.warn(V);break;case"error":console.error(V);break;case"throw":if(F)throw Error(V);else console.warn(V);break}}recordTime(J,Q){let Z=this.metrics.get(J);if(Z)Z.count++,Z.totalTime+=Q,Z.maxTime=Math.max(Z.maxTime,Q),Z.minTime=Math.min(Z.minTime,Q);else this.metrics.set(J,{count:1,totalTime:Q,maxTime:Q,minTime:Q})}getStats(J){if(J){let Z=this.metrics.get(J);if(!Z)return{};let $=this.budgets.get(J);return{count:Z.count,avgTime:Z.totalTime/Z.count,totalTime:Z.totalTime,maxTime:Z.maxTime,minTime:Z.minTime,budget:$?.maxTime,budgetUtilization:$?Z.totalTime/Z.count/$.maxTime*100:void 0}}let Q={};for(let[Z,$]of this.metrics.entries()){let U=this.budgets.get(Z);Q[Z]={count:$.count,avgTime:$.totalTime/$.count,totalTime:$.totalTime,maxTime:$.maxTime,minTime:$.minTime,budget:U?.maxTime,budgetUtilization:U?$.totalTime/$.count/U.maxTime*100:void 0}}return Q}getViolations(J){if(J)return this.violations.filter((Q)=>Q.label===J);return[...this.violations]}getViolationStats(){let J={},Q=0,Z=0;for(let $ of this.violations)if(J[$.label]=(J[$.label]||0)+1,$.isWarning)Q++;else Z++;return{total:this.violations.length,byLabel:J,warnings:Q,errors:Z}}clear(){this.metrics.clear()}clearViolations(){this.violations.length=0}clearBudgets(){this.budgets.clear()}reset(){this.clear(),this.clearViolations(),this.clearBudgets(),this.violationHandlers.length=0}}var a=null;function ZQ(){if(!a)a=new _J;return a}var EQ=new Proxy({},{get(J,Q){return ZQ()[Q]}});var RJ=[];function TJ(J){let Q=new s(J);return RJ.push(Q),Q}function CQ(){for(let J of RJ)J.clear()}function t(J,...Q){return`${Q.map((Z)=>String(Z??"")).join("\x00")}\x00${J.length}\x00${Bun.hash(J)}`}function gQ(J){let Q=[];for(let Z of new Set(J))try{Q.push({path:Z,mtimeMs:vJ.statSync(Z).mtimeMs})}catch{}return Q}function uQ(J){for(let Q of J)try{if(vJ.statSync(Q.path).mtimeMs!==Q.mtimeMs)return!1}catch{return!1}return!0}var B=null,JJ=!1,D=null,_="",M=!1,yJ=256,I=new Map,H=new Map,T=null,fJ=null,b=new Map;function k(J){return Bun.hash(J).toString(16).padStart(16,"0").slice(0,16)}function e(J,Q){if(I.has(J))I.delete(J);else if(I.size>=yJ)I.delete(I.keys().next().value);I.set(J,Q)}function UQ(J){let Q=k(J);if(H.has(Q))H.delete(Q);else if(H.size>=yJ)H.delete(H.keys().next().value);return H.set(Q,J),Q}function lQ(J){let Q=H.get(J);if(Q===void 0)return;return H.delete(J),H.set(J,Q),Q}async function FQ(J,Q=T){if(!Q)return null;try{let Z=Bun.file(G.join(Q,`cw-${k(J)}.css`));if(!await Z.exists())return null;return await Z.text()}catch{return null}}async function jQ(J,Q,Z=T){if(!Z)return;try{if(!fs.existsSync(Z))fs.mkdirSync(Z,{recursive:!0});await Bun.write(G.join(Z,`cw-${k(J)}.css`),Q)}catch{}}async function kJ(J){try{let Q=await import(J);if(Q&&Q.CSSGenerator)return{CSSGenerator:Q.CSSGenerator,config:Q.config,build:Q.build,defaultConfig:Q.defaultConfig,extractClasses:Q.extractClasses}}catch{}return null}var WQ=[["@stacksjs","ts-css","dist","engine","index.js"],["@stacksjs","ts-css","src","engine","index.ts"]],XQ=["@stacksjs/ts-css/engine","@stacksjs/ts-css/dist/engine/index.js"];function VQ(){let J=[],Q=process.cwd();while(Q!==G.dirname(Q)){for(let Z of["node_modules","pantry"])for(let $ of WQ)J.push(G.join(Q,Z,...$));Q=G.dirname(Q)}return J}function qQ(){let J=[],Q=process.env.HOME||process.env.USERPROFILE||"",Z=[Q&&G.join(Q,"Code","Tools","ts-css"),Q&&G.join(Q,"Code","Tools","crosswind"),Q&&G.join(Q,"repos","stacks-org","ts-css"),Q&&G.join(Q,"repos","stacks-org","crosswind"),G.join(process.cwd(),"..","ts-css"),G.join(process.cwd(),"..","crosswind")].filter(Boolean);for(let $ of Z)J.push(G.join($,"packages","toolkit","dist","engine","index.js")),J.push(G.join($,"packages","toolkit","src","engine","index.ts"));if(Q)J.push(G.join(Q,"Code","Tools","stx","node_modules","@stacksjs","ts-css","dist","engine","index.js"));return J}async function CJ(){if(JJ)return B;JJ=!0;try{let J=async(U)=>{for(let F of U){if(!await Bun.file(F).exists())continue;let j=await kJ(F);if(j){if(!process.env.STACKS_DEV_QUIET)console.log(`${Y.green}[ts-css]${Y.reset} CSS engine loaded from ${G.dirname(G.dirname(F))}`);return j}}return null};if(process.env.CROSSWIND_SRC){let U=G.resolve(process.env.CROSSWIND_SRC),F=await J([U]);if(!F)throw Error(`CROSSWIND_SRC did not resolve to a Css module: ${U}`);return B=F,B}let Q=await J(VQ());if(Q)return B=Q,B;let Z=XQ;for(let U of Z){let F=await kJ(U);if(F){if(B=F,!process.env.STACKS_DEV_QUIET)console.log(`${Y.green}[ts-css]${Y.reset} CSS engine loaded`);return B}}let $=await J(qQ());if($)return B=$,B;throw Error("Css CSSGenerator not found in any location")}catch{return console.warn(`${Y.yellow}[ts-css] CSS engine not available, Tailwind styles will not be generated${Y.reset}`),console.warn(`${Y.yellow}Run 'bun add @stacksjs/ts-css' to enable CSS generation${Y.reset}`),null}}function oQ(){QJ.clear(),B=null,JJ=!1,D=null,_="",I.clear(),H.clear(),fJ=null,b.clear()}var xJ=!1;async function gJ(J){try{let Q=bJ({name:"css",cwd:J})?"css":bJ({name:"crosswind",cwd:J})?"crosswind":null;if(!Q)return null;if(Q==="crosswind"&&!process.env.STACKS_DEV_QUIET&&!xJ)xJ=!0,console.warn(`${Y.yellow}[ts-css]${Y.reset} Reading the CSS config from a \`crosswind\` file. Rename it to \`css\` (e.g. config/css.ts) \u2014 the old name is deprecated.`);let{loadConfigWithResult:Z}=await import("bunfig"),$=await Z({name:Q,cwd:J,defaultConfig:{},checkEnv:!1,verbose:!1});if(!$?.path||!$.config||Object.keys($.config).length===0)return null;let U=G.relative(J,$.path);if(!process.env.STACKS_DEV_QUIET)console.log(`${Y.green}[ts-css]${Y.reset} Loaded config from ${U||$.path}`);return $.config}catch(Q){if(Q instanceof Error&&Q.name==="ConfigNotFoundError")return null;return console.warn(`${Y.yellow}[ts-css]${Y.reset} Failed to load css config:`,Q instanceof Error?Q.message:Q),null}}async function zQ(J){let Q=null;try{let{loadStxConfig:Z}=await import("./chunk-tntv9hvq.js"),$=await Z(J);if($.css)if(typeof $.css==="string"){let U=G.isAbsolute($.css)?$.css:G.resolve(J,$.css);if(await Bun.file(U).exists()){let F=await import(U);Q=F.default||F,console.log(`${Y.green}[ts-css]${Y.reset} Loaded config from stx.config.ts \u2192 ${$.css}`)}}else{if(Q={...$.css,content:$.css.content||[],preflight:$.css.preflight??!0,minify:$.css.minify??!1},$.css.config){let U=G.isAbsolute($.css.config)?$.css.config:G.resolve(J,$.css.config);if(await Bun.file(U).exists()){let F=await import(U);Q={...F.default||F,...Q}}}console.log(`${Y.green}[ts-css]${Y.reset} Using inline CSS config from stx.config.ts`)}}catch{}return Q||await gJ(J)}function GQ(J){try{let Q=new WeakSet;return k(JSON.stringify(J??{},(Z,$)=>{if(typeof $==="function")return`[fn]${String($)}`;if(typeof $==="object"&&$!==null){if(Q.has($))return"[circular]";Q.add($)}return $})??"")}catch{return"unhashable"}}async function YQ(J){if(M)return _;M=!0;try{let Q=await CJ();if(!Q||!Q.build)return M=!1,"";if(!D)D=await gJ(J);if(!D)return M=!1,"";let Z=Q.defaultConfig?.theme||{},$=D.theme||{},U={...Q.defaultConfig,...D,theme:{...Z,...$,extend:{...Z.extend||{},...$.extend||{}}}},F=performance.now(),j=await Q.build(U),V=performance.now()-F;if(_=j.css,console.log(`${Y.cyan}[ts-css]${Y.reset} Built ${j.classes.size} classes in ${V.toFixed(1)}ms`),U.output){let W=G.isAbsolute(U.output)?U.output:G.join(J,U.output),X=G.dirname(W);if(!fs.existsSync(X))fs.mkdirSync(X,{recursive:!0});await Bun.write(W,j.css)}return M=!1,j.css}catch(Q){return console.error(`${Y.red}[ts-css]${Y.reset} Build error:`,Q),M=!1,_}}async function aQ(J){D=null,await YQ(J)}function sQ(){return _}function wQ(J){let Q=new Set,Z=/class\s*=\s*["']([^"']+)["']/gi,$=Z.exec(J);while($!==null){for(let j of $[1].split(/\s+/))if(j.trim())Q.add(j.trim());$=Z.exec(J)}let U=/(?:x-class|:class)\s*=\s*"([^"]+)"/gi,F=U.exec(J);while(F!==null){let j=F[1].match(/'([^']+)'/g);if(j){for(let V of j)for(let W of V.slice(1,-1).split(/\s+/))if(W.trim())Q.add(W.trim())}F=U.exec(J)}return Q}var QJ=TJ(64);async function LQ(J,Q){let Z=()=>b.get(Q?G.resolve(Q):process.cwd())?.fingerprint??null,$=QJ.get(t(J,Q,Z()));if($!==void 0)return $;let U=await BQ(J,Q);if(U)QJ.set(t(J,Q,Z()),U);return U}async function BQ(J,Q){try{let Z=await CJ();if(!Z)return"";let $=typeof Z.extractClasses==="function"?Z.extractClasses(J):wQ(J);if($.size===0)return"";let U=Q?G.resolve(Q):process.cwd(),F=SJ(U,"cache");if(!T)T=F;let j=b.get(U);if(!j){let L=await zQ(U);j={config:L,fingerprint:GQ(L)},b.set(U,j),fJ=j.fingerprint}let V=[...$].sort().join(" "),W=`${j.fingerprint||"default"}::${V}`,X=I.get(W);if(X!==void 0)return e(W,X),X;let q=await FQ(W,F);if(q!==null)return e(W,q),q;let z=Z.defaultConfig||Z.config,w=j.config||{},O=YJ(z,w),{safelist:K,includePreflight:$J,minify:ZJ,tokenCSS:uJ}=O,x=O.config,E=new Z.CSSGenerator(x),S=x.shortcuts||w.shortcuts||{},UJ=Object.keys(S).filter((L)=>$.has(L)||K.includes(L));for(let L of K)if(!S[L])E.generate(L);for(let L of $)if(!S[L])E.generate(L);let P="";if(UJ.length>0){let L=new Z.CSSGenerator(x);for(let dJ of UJ)L.generate(dJ);if(P=L.toCSS(!1,ZJ),P&&!P.endsWith(`
|
|
22
|
-
`))P+=`
|
|
23
|
-
`}let A=P+E.toCSS($J,ZJ);return A=uJ+A,e(W,A),jQ(W,A,F),A}catch(Z){return console.warn("Failed to generate Css CSS:",Z),""}}async function tQ(J,Q,Z=!1,$=!1){let U=await LQ(J,Q);if(!U)return $?o(J):J;let F=Z?`<link data-css="generated" rel="stylesheet" href="/_stx/css.${UQ(U)}.css">`:`<style data-css="generated">
|
|
24
|
-
${U}
|
|
25
|
-
</style>`;if($)return HQ(J,F);let j=/(?:<style\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>[\s\S]*?<\/style>|<link\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>)/g;if(j.test(J)){let V=!1;return J.replace(j,()=>{if(V)return"";return V=!0,F})}if(J.includes("</head>"))return J.replace("</head>",`${F}
|
|
26
|
-
</head>`);if(J.includes("<body"))return J.replace(/<body([^>]*)>/,`<body$1>
|
|
27
|
-
${F}`);return F+J}function HQ(J,Q){let Z=l(J).map((W)=>({...W,replacement:""})),$=/(?:<style\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>[\s\S]*?<\/style>|<link\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>)/g,U=$.exec(J);if(U!==null){let W=!0;while(U!==null)Z.push({start:U.index,end:U.index+U[0].length,replacement:W?Q:""}),W=!1,U=$.exec(J)}else{let W=J.indexOf("</head>");if(W!==-1)Z.push({start:W,end:W,replacement:`${Q}
|
|
28
|
-
`});else{let X=J.match(/<body([^>]*)>/);if(X?.index!==void 0)Z.push({start:X.index,end:X.index+X[0].length,replacement:`${X[0]}
|
|
29
|
-
${Q}`});else Z.push({start:0,end:0,replacement:Q})}}Z.sort((W,X)=>W.start-X.start||W.end-X.end);for(let W=1;W<Z.length;W++)if(Z[W].start<Z[W-1].end)return OQ(o(J),Q);let F=Array(Z.length*2+1),j=0,V=0;for(let W of Z)F[V++]=J.slice(j,W.start),F[V++]=W.replacement,j=W.end;return F[V]=J.slice(j),F.join("")}function OQ(J,Q){let Z=/(?:<style\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>[\s\S]*?<\/style>|<link\b[^>]*\bdata-css=(?:"generated"|'generated')[^>]*>)/g;if(Z.test(J)){let $=!1;return J.replace(Z,()=>{if($)return"";return $=!0,Q})}if(J.includes("</head>"))return J.replace("</head>",`${Q}
|
|
30
|
-
</head>`);if(J.includes("<body"))return J.replace(/<body([^>]*)>/,`<body$1>
|
|
31
|
-
${Q}`);return Q+J}
|
|
32
|
-
export{s as Ys,kQ as Zs,EQ as _s,TJ as $s,CQ as at,t as bt,gQ as ct,uQ as dt,h as et,LJ as ft,pJ as gt,mJ as ht,NQ as it,HJ as jt,i as kt,MQ as lt,rJ as mt,C as nt,YJ as ot,l as pt,o as qt,RQ as rt,Y as st,lQ as tt,CJ as ut,oQ as vt,gJ as wt,zQ as xt,GQ as yt,YQ as zt,aQ as At,sQ as Bt,wQ as Ct,LQ as Dt,tQ as Et};
|