@stacksjs/stx 0.2.93 → 0.2.94
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/a11y.js +1 -1
- package/dist/analytics.js +1 -1
- package/dist/analyzer.js +1 -1
- package/dist/animation.js +1 -1
- package/dist/app-shell.js +1 -1
- package/dist/app.js +1 -1
- package/dist/assets.js +1 -1
- package/dist/ast.js +1 -1
- package/dist/async-components.js +1 -1
- package/dist/auth.js +1 -1
- package/dist/broadcasting.js +1 -1
- package/dist/browser-composables.js +1 -1
- package/dist/build-assets.js +1 -1
- package/dist/build-mode-detector.js +1 -1
- package/dist/build-optimizer.js +1 -1
- package/dist/build-views.js +1 -1
- package/dist/build.js +1 -1
- package/dist/builtins/drawer.js +1 -1
- package/dist/builtins/escape.js +1 -1
- package/dist/builtins/icon.js +1 -1
- package/dist/builtins/index.js +1 -1
- package/dist/builtins/modal.js +1 -1
- package/dist/builtins/safe-image.js +1 -1
- package/dist/builtins/stx-image.js +1 -1
- package/dist/builtins/stx-link.js +1 -1
- package/dist/builtins/stx-loading-indicator.js +1 -1
- package/dist/builtins/suspense.js +1 -1
- package/dist/builtins/toast.js +1 -1
- package/dist/builtins/tooltip.js +1 -1
- package/dist/builtins/transition-group.js +1 -1
- package/dist/bundle-analyzer/collector.js +1 -1
- package/dist/bundle-analyzer/index.js +1 -1
- package/dist/bundle-analyzer/report.js +1 -1
- package/dist/bundle-analyzer/treemap.js +1 -1
- package/dist/caching.js +1 -1
- package/dist/{chunk-7074g241.js → chunk-03c26pjz.js} +1 -1
- package/dist/{chunk-n9dhs1dw.js → chunk-04mvcmcr.js} +1 -1
- package/dist/{chunk-hc2mf5h6.js → chunk-05hgyyqc.js} +1 -1
- package/dist/{chunk-kx6eb6ma.js → chunk-0g4gece6.js} +1 -1
- package/dist/{chunk-1v49fwr5.js → chunk-0jkwrcwj.js} +1 -1
- package/dist/{chunk-47kpewks.js → chunk-0m9tdm7t.js} +1 -1
- package/dist/{chunk-4deg33rw.js → chunk-0tatqxj2.js} +2 -2
- package/dist/{chunk-akf1r75r.js → chunk-0wdar532.js} +1 -1
- package/dist/{chunk-9cf97f9p.js → chunk-13yz561y.js} +2 -2
- package/dist/{chunk-rpx5fa65.js → chunk-174z0cd0.js} +2 -2
- package/dist/{chunk-wkz2vwkr.js → chunk-1mmykse5.js} +1 -1
- package/dist/{chunk-3te20hqw.js → chunk-1z2yq9em.js} +2 -2
- package/dist/{chunk-rw26rpek.js → chunk-25s7bckb.js} +2 -2
- package/dist/{chunk-xgkv66q5.js → chunk-268adc7r.js} +1 -1
- package/dist/{chunk-a87qqft6.js → chunk-26r6zh3t.js} +2 -2
- package/dist/{chunk-t0c9wvpr.js → chunk-2w3302dh.js} +1 -1
- package/dist/{chunk-vjbefncc.js → chunk-2xen423s.js} +1 -1
- package/dist/{chunk-jjdq01dv.js → chunk-3bjtemm6.js} +1 -1
- package/dist/{chunk-xv34zbp4.js → chunk-3jm3snz8.js} +1 -1
- package/dist/{chunk-e98v1bc6.js → chunk-3ngm57nt.js} +2 -2
- package/dist/{chunk-gz5fmp3q.js → chunk-3rh7va1z.js} +1 -1
- package/dist/{chunk-kypas8vy.js → chunk-3yg9hbmb.js} +1 -1
- package/dist/{chunk-qygvvygy.js → chunk-46mkpbkk.js} +2 -2
- package/dist/chunk-48cw2nde.js +2 -0
- package/dist/chunk-48r3qe0k.js +3 -0
- package/dist/{chunk-azkegjd8.js → chunk-4bt81cg3.js} +1 -1
- package/dist/{chunk-07y6m5xx.js → chunk-4j188175.js} +1 -1
- package/dist/{chunk-h7aq56qj.js → chunk-4qq8ffke.js} +1 -1
- package/dist/{chunk-hrnnh4tq.js → chunk-50vqeesm.js} +2 -2
- package/dist/{chunk-7n8g0nfn.js → chunk-52agge4n.js} +1 -1
- package/dist/{chunk-9t14se2t.js → chunk-57p201gb.js} +1 -1
- package/dist/{chunk-jpndqst5.js → chunk-5ggw1dyv.js} +1 -1
- package/dist/{chunk-ah88wzbg.js → chunk-5kt3ay7x.js} +1 -1
- package/dist/{chunk-x24s4heg.js → chunk-5p568px4.js} +1 -1
- package/dist/{chunk-q6zhd9yf.js → chunk-5ppkfyn2.js} +1 -1
- package/dist/{chunk-khdn7jwe.js → chunk-5q87fgkk.js} +2 -2
- package/dist/{chunk-0p1h3p3w.js → chunk-5qb761h2.js} +1 -1
- package/dist/{chunk-rtr974rc.js → chunk-5xvbq2gs.js} +2 -2
- package/dist/{chunk-p3e0cqtt.js → chunk-647849kf.js} +2 -2
- package/dist/{chunk-gkzq8zw4.js → chunk-6cr3eeh4.js} +1 -1
- package/dist/{chunk-mhgk632d.js → chunk-6djgb0hr.js} +1 -1
- package/dist/{chunk-tffh3b1e.js → chunk-6dqzky7x.js} +1 -1
- package/dist/{chunk-drjq2zwg.js → chunk-6w03t7h6.js} +2 -2
- package/dist/{chunk-ek2w6zvy.js → chunk-6wn85hn6.js} +1 -1
- package/dist/{chunk-jz73j3qs.js → chunk-6y4gqs1q.js} +1 -1
- package/dist/{chunk-nd9rmddh.js → chunk-75rndzbd.js} +1 -1
- package/dist/{chunk-7dkz6z2s.js → chunk-77tga15w.js} +2 -2
- package/dist/{chunk-wvf31nzs.js → chunk-7a51hkpf.js} +1 -1
- package/dist/{chunk-a2g2qb2y.js → chunk-7b0xdy5h.js} +1 -1
- package/dist/{chunk-ewa88139.js → chunk-7dy588as.js} +1 -1
- package/dist/{chunk-8ahwt6a4.js → chunk-7rvh2wwv.js} +1 -1
- package/dist/{chunk-jt0ezawy.js → chunk-7sm05m0j.js} +1 -1
- package/dist/{chunk-m167kjhv.js → chunk-7xcfy2fn.js} +1 -1
- package/dist/{chunk-keawsbpn.js → chunk-82t27pvd.js} +1 -1
- package/dist/{chunk-psc3wfcf.js → chunk-87kx8byz.js} +1 -1
- package/dist/{chunk-31dr4bys.js → chunk-8fgwhhb8.js} +2 -2
- package/dist/{chunk-rz2ec6g7.js → chunk-8qbax8xn.js} +1 -1
- package/dist/{chunk-e2q9c5vq.js → chunk-91s2hres.js} +1 -1
- package/dist/{chunk-yb1t2h8h.js → chunk-94g3cahw.js} +2 -2
- package/dist/{chunk-n98x35xd.js → chunk-957amb71.js} +1 -1
- package/dist/{chunk-v8j49spx.js → chunk-95w08s8v.js} +1 -1
- package/dist/{chunk-zy3rp1ab.js → chunk-9agvhp1x.js} +1 -1
- package/dist/{chunk-vgv7jvyz.js → chunk-9tmbrwwx.js} +1 -1
- package/dist/{chunk-3a4qsygv.js → chunk-9yz5d003.js} +2 -2
- package/dist/{chunk-4qcy5tx6.js → chunk-a69tvya5.js} +2 -2
- package/dist/{chunk-p52yzjq6.js → chunk-adjcg6wa.js} +2 -2
- package/dist/{chunk-w3b6m427.js → chunk-adqh2m9z.js} +1 -1
- package/dist/{chunk-h0hjy0kn.js → chunk-asarebzq.js} +1 -1
- package/dist/{chunk-43t7faps.js → chunk-aw3rp9ac.js} +1 -1
- package/dist/{chunk-7gd339hd.js → chunk-b0cyc09a.js} +1 -1
- package/dist/{chunk-09k66d8a.js → chunk-b3kkjcdh.js} +1 -1
- package/dist/{chunk-jnmgm2xw.js → chunk-b3prs7y0.js} +1 -1
- package/dist/{chunk-xw36p73h.js → chunk-b5zc9y0y.js} +2 -2
- package/dist/{chunk-krqn0ddk.js → chunk-baa7h4yz.js} +2 -2
- package/dist/{chunk-15nesxgt.js → chunk-bgec9r1v.js} +2 -2
- package/dist/{chunk-kdfe4t91.js → chunk-bjnjpsgn.js} +2 -2
- package/dist/{chunk-0a61y94n.js → chunk-bk8ew8ze.js} +2 -2
- package/dist/{chunk-pcntd9h4.js → chunk-bn08k7yy.js} +2 -2
- package/dist/{chunk-8va64c9n.js → chunk-bwxda6n1.js} +2 -2
- package/dist/{chunk-pa9zb7ty.js → chunk-bykjk6vj.js} +1 -1
- package/dist/{chunk-p3fpb79v.js → chunk-c53hyw5c.js} +1 -1
- package/dist/{chunk-km25cwz6.js → chunk-ca6qd1dx.js} +1 -1
- package/dist/{chunk-x3r64r0c.js → chunk-cdbwprfv.js} +2 -2
- package/dist/{chunk-tg2f1mzq.js → chunk-ceg2c2q2.js} +2 -2
- package/dist/{chunk-80g54ncj.js → chunk-cn409b69.js} +1 -1
- package/dist/{chunk-8xj7c3mf.js → chunk-cp3kwv17.js} +1 -1
- package/dist/{chunk-nm15ccsg.js → chunk-cpcc11vp.js} +2 -2
- package/dist/{chunk-y6xsqe9a.js → chunk-cr3wbrcr.js} +2 -2
- package/dist/{chunk-4d2y57k7.js → chunk-cygfdk1n.js} +2 -2
- package/dist/{chunk-xys2sxh6.js → chunk-cyp4m0vh.js} +1 -1
- package/dist/{chunk-27zsyhrd.js → chunk-cz25azze.js} +1 -1
- package/dist/{chunk-4x7kae4j.js → chunk-d77yxcds.js} +2 -2
- package/dist/{chunk-x05nxhyv.js → chunk-dyjnn5k8.js} +2 -2
- package/dist/{chunk-9jtj77jx.js → chunk-dzw95th7.js} +2 -2
- package/dist/{chunk-7b6s3g65.js → chunk-e0zytzdh.js} +1 -1
- package/dist/{chunk-b77wjyn7.js → chunk-e53h9qhd.js} +1 -1
- package/dist/{chunk-wazkqv7n.js → chunk-eds0f8f1.js} +2 -2
- package/dist/{chunk-04n64bnt.js → chunk-eh8hact1.js} +1 -1
- package/dist/{chunk-scpkdrdb.js → chunk-epj957jf.js} +1 -1
- package/dist/{chunk-trfswy66.js → chunk-eqeyaq6g.js} +1 -1
- package/dist/{chunk-x5g9w4hh.js → chunk-fbxt2mrx.js} +2 -2
- package/dist/{chunk-5shey2e4.js → chunk-fch9tk1k.js} +1 -1
- package/dist/{chunk-988dw6q3.js → chunk-fe7r1mq1.js} +2 -2
- package/dist/{chunk-8b3z0zd5.js → chunk-fhawx87n.js} +1 -1
- package/dist/{chunk-ynhngsdh.js → chunk-fk51yyrw.js} +1 -1
- package/dist/{chunk-dqn9gyhb.js → chunk-fms20x0n.js} +1 -1
- package/dist/{chunk-bk3j0n82.js → chunk-fs0qezn5.js} +1 -1
- package/dist/{chunk-2j21d3ka.js → chunk-g2hekckm.js} +1 -1
- package/dist/{chunk-55nwdnsd.js → chunk-g8b81pzc.js} +1 -1
- package/dist/{chunk-avx8aydt.js → chunk-ganag9dm.js} +2 -2
- package/dist/{chunk-hbgxbgam.js → chunk-gc84b1d2.js} +2 -2
- package/dist/{chunk-djddhmcc.js → chunk-gcf5v18y.js} +1 -1
- package/dist/{chunk-v7f8jj15.js → chunk-ghrx0hn1.js} +1 -1
- package/dist/{chunk-ckxjqqn9.js → chunk-gqpkp459.js} +2 -2
- package/dist/chunk-h45py5w5.js +2 -0
- package/dist/{chunk-aywxfqev.js → chunk-haecq01c.js} +1 -1
- package/dist/{chunk-hbehnm18.js → chunk-hepg894w.js} +2 -2
- package/dist/{chunk-29y0hk5z.js → chunk-hjdc99kb.js} +2 -2
- package/dist/{chunk-8n9nnqr6.js → chunk-hje9v2zh.js} +1 -1
- package/dist/{chunk-bdk6g1vj.js → chunk-hke99a0v.js} +2 -2
- package/dist/{chunk-qvrbjpdc.js → chunk-hpqr9e3x.js} +2 -2
- package/dist/{chunk-ht43ds42.js → chunk-hq5cem49.js} +1 -1
- package/dist/{chunk-8vtm0m84.js → chunk-hrampcrj.js} +1 -1
- package/dist/{chunk-fjk3x41y.js → chunk-ht4j68cs.js} +2 -2
- package/dist/{chunk-xyg1r5w0.js → chunk-j4s5qwd7.js} +2 -2
- package/dist/{chunk-9eq3ht5f.js → chunk-jbejwejg.js} +1 -1
- package/dist/{chunk-baf1hfwh.js → chunk-jfm69keq.js} +2 -2
- package/dist/chunk-jfrn43vh.js +2 -0
- package/dist/{chunk-zen6ax1y.js → chunk-jjvp4t5w.js} +2 -2
- package/dist/{chunk-vmxjghsm.js → chunk-jt44av4j.js} +1 -1
- package/dist/{chunk-k21df0pg.js → chunk-jt98jhpt.js} +1 -1
- package/dist/{chunk-0p0nyq50.js → chunk-k8440jxh.js} +2 -2
- package/dist/{chunk-y1k17c8b.js → chunk-kdxa9epn.js} +2 -2
- package/dist/{chunk-p1h8065h.js → chunk-kfd2hf6f.js} +2 -2
- package/dist/{chunk-x0770gt9.js → chunk-kh6rfz2v.js} +1 -1
- package/dist/{chunk-bhqgmyqw.js → chunk-kkp6rs2n.js} +1 -1
- package/dist/{chunk-jjb05d21.js → chunk-m59y310j.js} +2 -2
- package/dist/{chunk-ay9qf4zj.js → chunk-mgmyr1b9.js} +1 -1
- package/dist/{chunk-vw7vqd76.js → chunk-mqwbpamc.js} +1 -1
- package/dist/{chunk-bs3gmfxz.js → chunk-mrehzhxv.js} +1 -1
- package/dist/{chunk-1sr54zp8.js → chunk-mv03qb75.js} +1 -1
- package/dist/chunk-mwbng54r.js +2 -0
- package/dist/{chunk-rwrv9wbf.js → chunk-n46a5g1g.js} +1 -1
- package/dist/{chunk-zf2pek72.js → chunk-n944baxp.js} +1 -1
- package/dist/{chunk-6djzdes9.js → chunk-nanw7yhz.js} +1 -1
- package/dist/{chunk-g1vt329s.js → chunk-nap11ntr.js} +2 -2
- package/dist/{chunk-d0zjtdw4.js → chunk-ncnfa8ae.js} +2 -2
- package/dist/{chunk-knm8a8yx.js → chunk-pc31m5x5.js} +1 -1
- package/dist/{chunk-7ed3tean.js → chunk-q60knhjf.js} +1 -1
- package/dist/{chunk-shv88d2d.js → chunk-q6h6yvzb.js} +2 -2
- package/dist/{chunk-9wmq2272.js → chunk-qd5461tt.js} +1 -1
- package/dist/{chunk-0dx4q6yq.js → chunk-qdc3aav1.js} +1 -1
- package/dist/{chunk-d1qh1x2g.js → chunk-qfwzdffx.js} +2 -2
- package/dist/{chunk-p73meypx.js → chunk-qgxwmagw.js} +1 -1
- package/dist/{chunk-rw7937v4.js → chunk-qhdtssn1.js} +2 -2
- package/dist/{chunk-pcm1vd8w.js → chunk-qk584whs.js} +1 -1
- package/dist/{chunk-9zbk5zx5.js → chunk-qm4yppj5.js} +2 -2
- package/dist/chunk-qwyd9a1d.js +2 -0
- package/dist/{chunk-xs03kc1h.js → chunk-qxs6et76.js} +1 -1
- package/dist/{chunk-8qc1bsym.js → chunk-rb1e4cnb.js} +1 -1
- package/dist/{chunk-9ecv8aqj.js → chunk-rv002yn0.js} +1 -1
- package/dist/chunk-sjagg9qz.js +66 -0
- package/dist/{chunk-bndmdahk.js → chunk-sn07azv3.js} +2 -2
- package/dist/{chunk-5f43yz6z.js → chunk-svahbw0w.js} +2 -2
- package/dist/{chunk-pznnww6k.js → chunk-svhtdb0s.js} +1 -1
- package/dist/{chunk-tzwtg722.js → chunk-t37dp99j.js} +1 -1
- package/dist/{chunk-mgj88zeq.js → chunk-tj6zfxeb.js} +2 -2
- package/dist/{chunk-rqxf5hns.js → chunk-tmgz5t2g.js} +1 -1
- package/dist/{chunk-hjm2xab3.js → chunk-tr0z0e1g.js} +1 -1
- package/dist/{chunk-2cdvw21b.js → chunk-tx6br9r4.js} +1 -1
- package/dist/{chunk-hy8820vc.js → chunk-vdfwv0fp.js} +1 -1
- package/dist/{chunk-yrsb6j3z.js → chunk-vp2395eb.js} +2 -2
- package/dist/{chunk-j447q024.js → chunk-vpe6napb.js} +2 -2
- package/dist/{chunk-wg9k6h8w.js → chunk-vv9wfz1c.js} +2 -2
- package/dist/{chunk-yj4x5ehw.js → chunk-vw6ejgmy.js} +1 -1
- package/dist/{chunk-1xz0w746.js → chunk-w01y57f5.js} +2 -2
- package/dist/{chunk-8a5bxece.js → chunk-w21mwxdd.js} +1 -1
- package/dist/{chunk-20swzkx3.js → chunk-w4n8fqp7.js} +1 -1
- package/dist/{chunk-m491r0rj.js → chunk-w959hm8j.js} +1 -1
- package/dist/{chunk-9b6cec0v.js → chunk-wk07pwtd.js} +1 -1
- package/dist/{chunk-amaa1bev.js → chunk-wxvyj65q.js} +1 -1
- package/dist/{chunk-m8448qby.js → chunk-x1hjv24z.js} +1 -1
- package/dist/{chunk-frg705zq.js → chunk-x39sfpvm.js} +1 -1
- package/dist/{chunk-j58vh0w6.js → chunk-x4fze3q2.js} +1 -1
- package/dist/{chunk-35faj94w.js → chunk-x64kb787.js} +1 -1
- package/dist/{chunk-vg5kt6az.js → chunk-xcb0pbr6.js} +1 -1
- package/dist/{chunk-p077sw22.js → chunk-xhkjhxsp.js} +1 -1
- package/dist/{chunk-zcxzdrn7.js → chunk-xhnpsngj.js} +2 -2
- package/dist/{chunk-7j5e8sdj.js → chunk-xsqbk4yk.js} +2 -2
- package/dist/{chunk-r0jcmpv6.js → chunk-xygc53vr.js} +1 -1
- package/dist/{chunk-nhv099jv.js → chunk-y25pr13j.js} +1 -1
- package/dist/{chunk-rvptcndz.js → chunk-y4c744dk.js} +2 -2
- package/dist/{chunk-wfg2gm11.js → chunk-y4md9hp0.js} +1 -1
- package/dist/{chunk-n5kg7fpx.js → chunk-y5wazw6j.js} +1 -1
- package/dist/{chunk-8dhdpa5h.js → chunk-y86m1wr4.js} +2 -2
- package/dist/{chunk-veeerpwa.js → chunk-yaan98dd.js} +1 -1
- package/dist/{chunk-bxc7kjsk.js → chunk-yach037f.js} +1 -1
- package/dist/{chunk-06w68hyg.js → chunk-yexjrg9d.js} +2 -2
- package/dist/{chunk-6eqbxcrd.js → chunk-yj560gp8.js} +1 -1
- package/dist/{chunk-ejh8fyak.js → chunk-yr1gdceh.js} +1 -1
- package/dist/{chunk-r5m9xtm7.js → chunk-yw2fzq86.js} +2 -2
- package/dist/{chunk-h5jxydqq.js → chunk-ywkrxp2h.js} +1 -1
- package/dist/{chunk-j8tn8enq.js → chunk-z37xq5rx.js} +2 -2
- package/dist/{chunk-npfmdb6y.js → chunk-z4djtgt0.js} +1 -1
- package/dist/{chunk-zk3d0jjf.js → chunk-z8cjr9n9.js} +1 -1
- package/dist/{chunk-10debkj5.js → chunk-znxp3zha.js} +1 -1
- package/dist/{chunk-k848dzsa.js → chunk-zt2yag10.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/client/directive.js +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client-helpers.js +1 -1
- package/dist/client-script-bundler.js +1 -1
- package/dist/client-script.js +1 -1
- package/dist/component-hmr.js +1 -1
- package/dist/component-processing.js +1 -1
- package/dist/component-registry.js +1 -1
- package/dist/component-renderer.js +1 -1
- package/dist/components.js +1 -1
- package/dist/composables/index.js +1 -1
- package/dist/composables/use-battery.js +1 -1
- package/dist/composables/use-broadcast-channel.js +1 -1
- package/dist/composables/use-channel.js +1 -1
- package/dist/composables/use-clipboard.js +1 -1
- package/dist/composables/use-color-mode.js +1 -1
- package/dist/composables/use-cookie.js +1 -1
- package/dist/composables/use-device-orientation.js +1 -1
- package/dist/composables/use-event-listener.js +1 -1
- package/dist/composables/use-event-source.js +1 -1
- package/dist/composables/use-eye-dropper.js +1 -1
- package/dist/composables/use-fetch.js +1 -1
- package/dist/composables/use-fullscreen.js +1 -1
- package/dist/composables/use-geolocation.js +1 -1
- package/dist/composables/use-idle.js +1 -1
- package/dist/composables/use-intersection-observer.js +1 -1
- package/dist/composables/use-keyboard.js +1 -1
- package/dist/composables/use-media-query.js +1 -1
- package/dist/composables/use-meta.js +1 -1
- package/dist/composables/use-mouse.js +1 -1
- package/dist/composables/use-mutation-observer.js +1 -1
- package/dist/composables/use-network.js +1 -1
- package/dist/composables/use-notification.js +1 -1
- package/dist/composables/use-permissions.js +1 -1
- package/dist/composables/use-resize-observer.js +1 -1
- package/dist/composables/use-router.js +1 -1
- package/dist/composables/use-share.js +1 -1
- package/dist/composables/use-speech.js +1 -1
- package/dist/composables/use-storage.js +1 -1
- package/dist/composables/use-text-selection.js +1 -1
- package/dist/composables/use-timer.js +1 -1
- package/dist/composables/use-utilities.js +1 -1
- package/dist/composables/use-wake-lock.js +1 -1
- package/dist/composables/use-websocket.js +1 -1
- package/dist/composables/use-window.js +1 -1
- package/dist/composables.js +1 -1
- package/dist/composition-api.js +1 -1
- package/dist/computed.js +1 -1
- package/dist/conditionals.js +1 -1
- package/dist/config.js +1 -1
- package/dist/craft-bridge.js +1 -1
- package/dist/craft-compiler.js +1 -1
- package/dist/craft-components.js +1 -1
- package/dist/craft-entry.js +1 -1
- package/dist/craft-ssr.js +1 -1
- package/dist/csp.js +1 -1
- package/dist/csrf.js +1 -1
- package/dist/custom-directives.js +1 -1
- package/dist/defer.js +1 -1
- package/dist/deploy/config-generators.js +1 -1
- package/dist/deploy/index.js +1 -1
- package/dist/deploy/netlify.js +1 -1
- package/dist/dev-server/crosswind.js +1 -1
- package/dist/dev-server/index.js +1 -1
- package/dist/dev-server/keyboard-shortcuts.js +1 -1
- package/dist/dev-server/native-window.js +1 -1
- package/dist/dev-server/port-utils.js +1 -1
- package/dist/dev-server/serve-app.js +6 -1
- package/dist/dev-server/serve-file.js +6 -1
- package/dist/dev-server/serve-markdown.js +1 -1
- package/dist/dev-server/serve-multi.js +171 -1
- package/dist/dev-server/terminal-colors.js +1 -1
- package/dist/dev-server/theme-selector.js +1 -1
- package/dist/dev-server/types.js +1 -1
- package/dist/dev-server.js +1 -1
- package/dist/devtools.js +1 -1
- package/dist/directive-api.js +1 -1
- package/dist/docs.js +1 -1
- package/dist/doctor.js +1 -1
- package/dist/document-shell.js +1 -1
- package/dist/dynamic-components.js +1 -1
- package/dist/edge-runtime.js +1 -1
- package/dist/env.js +1 -1
- package/dist/error-boundaries.js +1 -1
- package/dist/error-handling.js +1 -1
- package/dist/errors/codes.js +1 -1
- package/dist/errors/formatter.js +1 -1
- package/dist/errors/index.js +1 -1
- package/dist/errors/logger.js +1 -1
- package/dist/errors/sanitizer.js +1 -1
- package/dist/errors/types.js +1 -1
- package/dist/events.js +1 -1
- package/dist/expressions.js +1 -1
- package/dist/formatter.js +1 -1
- package/dist/forms-validation.js +1 -1
- package/dist/forms.js +1 -1
- package/dist/head.js +1 -1
- package/dist/heatmap.js +1 -1
- package/dist/hot-reload.js +1 -1
- package/dist/html-masking.js +1 -1
- package/dist/hydration-runtime.js +1 -1
- package/dist/hydration.js +1 -1
- package/dist/i18n.js +1 -1
- package/dist/image-optimization/auto-sibling.js +1 -1
- package/dist/image-optimization/build-plugin.js +1 -1
- package/dist/image-optimization/component.js +1 -1
- package/dist/image-optimization/directive.js +1 -1
- package/dist/image-optimization/index.js +1 -1
- package/dist/image-optimization/processor.js +1 -1
- package/dist/image-optimization/serve.js +1 -1
- package/dist/includes.js +1 -1
- package/dist/index.js +1 -1
- package/dist/init.js +1 -1
- package/dist/inline-assets.js +1 -1
- package/dist/interactive.js +1 -1
- package/dist/internal-markdown.js +1 -1
- package/dist/island-chunking.js +1 -1
- package/dist/js-ts.js +1 -1
- package/dist/jsx-runtime.js +1 -1
- package/dist/keep-alive.js +1 -1
- package/dist/lazy-loader.js +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/loops.js +1 -1
- package/dist/manifest.js +1 -1
- package/dist/markdown.js +1 -1
- package/dist/media/client/blur-up.js +1 -1
- package/dist/media/client/index.js +1 -1
- package/dist/media/client/lazy-load.js +1 -1
- package/dist/media/client/upload-handler.js +1 -1
- package/dist/media/image/component.js +1 -1
- package/dist/media/image/directive.js +1 -1
- package/dist/media/image/editing.js +1 -1
- package/dist/media/image/index.js +1 -1
- package/dist/media/image/placeholder.js +1 -1
- package/dist/media/image/processor/cache.js +1 -1
- package/dist/media/image/processor/index.js +1 -1
- package/dist/media/image/processor/optimizer.js +1 -1
- package/dist/media/image/processor/responsive.js +1 -1
- package/dist/media/image/srcset.js +1 -1
- package/dist/media/index.js +1 -1
- package/dist/media/manager/embed.js +1 -1
- package/dist/media/protected/component.js +1 -1
- package/dist/media/protected/index.js +1 -1
- package/dist/media/protected/signature.js +1 -1
- package/dist/media/shared/cache.js +1 -1
- package/dist/media/shared/hash.js +1 -1
- package/dist/media/shared/index.js +1 -1
- package/dist/media/upload/component.js +1 -1
- package/dist/media/upload/index.js +1 -1
- package/dist/media/video/directive.js +1 -1
- package/dist/media/video/index.js +1 -1
- package/dist/media/video/processor/cache.js +1 -1
- package/dist/media/video/processor/index.js +1 -1
- package/dist/media/video/processor/streaming.js +1 -1
- package/dist/media/video/processor/thumbnail.js +1 -1
- package/dist/media/video/processor/transcoder.js +1 -1
- package/dist/method-spoofing.js +1 -1
- package/dist/middleware.js +1 -1
- package/dist/misc-directives.js +1 -1
- package/dist/native-build.js +1 -1
- package/dist/parser/directive-parser.js +1 -1
- package/dist/parser/expression-parser.js +1 -1
- package/dist/parser/index.js +1 -1
- package/dist/parser/tokenizer.js +1 -1
- package/dist/partial-hydration.js +1 -1
- package/dist/performance-utils.js +1 -1
- package/dist/placeholder.js +1 -1
- package/dist/plugin-system.js +1 -1
- package/dist/plugin.js +1 -1
- package/dist/precompiler.js +1 -1
- package/dist/process.js +1 -1
- package/dist/production-build.js +1 -1
- package/dist/production-builder.js +1 -1
- package/dist/production-server.js +1 -1
- package/dist/props.js +1 -1
- package/dist/public-env.js +1 -1
- package/dist/pwa/audit.js +1 -1
- package/dist/pwa/directives.js +1 -1
- package/dist/pwa/icons.js +1 -1
- package/dist/pwa/index.js +1 -1
- package/dist/pwa/inject.js +1 -1
- package/dist/pwa/manifest.js +1 -1
- package/dist/pwa/offline.js +1 -1
- package/dist/pwa/precache.js +1 -1
- package/dist/pwa/service-worker.js +1 -1
- package/dist/pwa/workbox-strategies.js +1 -1
- package/dist/pwa/workbox.js +1 -1
- package/dist/reactive-bindings.js +1 -1
- package/dist/reactive.js +1 -1
- package/dist/reactivity.js +1 -1
- package/dist/release.js +1 -1
- package/dist/render.js +1 -1
- package/dist/route-middleware.js +1 -1
- package/dist/router.js +1 -1
- package/dist/routes.js +1 -1
- package/dist/runtime-injection.js +1 -1
- package/dist/runtime.js +1 -1
- package/dist/safe-evaluator.js +1 -1
- package/dist/scaffolding.js +1 -1
- package/dist/screenshot.js +1 -1
- package/dist/script-classifier.js +1 -1
- package/dist/script-validation.js +1 -1
- package/dist/seo.js +1 -1
- package/dist/serve.js +1 -1
- package/dist/server-bindings.js +1 -1
- package/dist/server-components.js +1 -1
- package/dist/signal-processing.js +1 -1
- package/dist/signals-api.js +1 -1
- package/dist/signals.js +1 -1
- package/dist/site-builder/build.js +1 -1
- package/dist/site-builder/i18n.js +1 -1
- package/dist/site-builder/index.js +1 -1
- package/dist/site-builder/robots.js +1 -1
- package/dist/site-builder/router.js +1 -1
- package/dist/site-builder/seo.js +1 -1
- package/dist/site-builder/sitemap.js +1 -1
- package/dist/site-builder/theme.js +1 -1
- package/dist/slots.js +1 -1
- package/dist/source-maps.js +1 -1
- package/dist/spa-shell.js +1 -1
- package/dist/ssr.js +1 -1
- package/dist/state-management.js +1 -1
- package/dist/store-imports.js +1 -1
- package/dist/store-loader.js +1 -1
- package/dist/stores-client.js +1 -1
- package/dist/story/addons.js +1 -1
- package/dist/story/analytics.js +1 -1
- package/dist/story/auto-stories.js +1 -1
- package/dist/story/bookmarks.js +1 -1
- package/dist/story/bun-test.js +1 -1
- package/dist/story/cli.js +1 -1
- package/dist/story/collect/analyzer.js +1 -1
- package/dist/story/collect/index.js +1 -1
- package/dist/story/collect/parser.js +1 -1
- package/dist/story/collect/scanner.js +1 -1
- package/dist/story/collect/tree.js +1 -1
- package/dist/story/commands/build.js +1 -1
- package/dist/story/commands/dev.js +1 -1
- package/dist/story/commands/index.js +1 -1
- package/dist/story/commands/preview.js +1 -1
- package/dist/story/compiled-output.js +1 -1
- package/dist/story/composition.js +1 -1
- package/dist/story/config-watcher.js +1 -1
- package/dist/story/config.js +1 -1
- package/dist/story/context.js +1 -1
- package/dist/story/controls/index.js +1 -1
- package/dist/story/crosswind.js +1 -1
- package/dist/story/desktop-preview.js +1 -1
- package/dist/story/docs-generator.js +1 -1
- package/dist/story/errors.js +1 -1
- package/dist/story/figma-export.js +1 -1
- package/dist/story/generator.js +1 -1
- package/dist/story/hmr.js +1 -1
- package/dist/story/hot-swap.js +1 -1
- package/dist/story/index.js +1 -1
- package/dist/story/interactions.js +1 -1
- package/dist/story/keyboard-shortcuts.js +1 -1
- package/dist/story/output.js +1 -1
- package/dist/story/performance.js +1 -1
- package/dist/story/presets.js +1 -1
- package/dist/story/props-validation.js +1 -1
- package/dist/story/renderer.js +1 -1
- package/dist/story/search-index.js +1 -1
- package/dist/story/search.js +1 -1
- package/dist/story/server.js +1 -1
- package/dist/story/setup.js +1 -1
- package/dist/story/snapshots.js +1 -1
- package/dist/story/testing.js +1 -1
- package/dist/story/theme.js +1 -1
- package/dist/story/ui/code-panel.js +1 -1
- package/dist/story/ui/controls-panel.js +1 -1
- package/dist/story/ui/index.js +1 -1
- package/dist/story/ui/navigation.js +1 -1
- package/dist/story/ui/preview.js +1 -1
- package/dist/story/visual-testing.js +1 -1
- package/dist/streaming.js +1 -1
- package/dist/strict-lint.js +1 -1
- package/dist/style-scoping.js +1 -1
- package/dist/suspense.js +1 -1
- package/dist/teleport.js +1 -1
- package/dist/template-compiler.js +1 -1
- package/dist/template-hydrator.js +1 -1
- package/dist/template-tag-balance.js +1 -1
- package/dist/testing.js +1 -1
- package/dist/transitions.js +1 -1
- package/dist/type-checker.js +1 -1
- package/dist/types/directive-types.js +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types.js +1 -1
- package/dist/typescript-templates.js +1 -1
- package/dist/utils.js +1 -1
- package/dist/validator.js +1 -1
- package/dist/variable-extractor.js +1 -1
- package/dist/view-composers.js +1 -1
- package/dist/virtual-scrolling.js +1 -1
- package/dist/visual-editor.js +1 -1
- package/dist/vue-template.js +1 -1
- package/dist/web-components/css-scoping.js +1 -1
- package/dist/web-components/index.js +1 -1
- package/dist/web-components/reactive-generator.js +1 -1
- package/dist/web-components.js +1 -1
- package/dist/x-element.js +1 -1
- package/package.json +5 -5
- package/dist/chunk-2jxbwnkz.js +0 -2
- package/dist/chunk-ejayeex8.js +0 -2
- package/dist/chunk-qa59zejf.js +0 -246
- package/dist/chunk-xqq1vxb6.js +0 -1
- package/dist/chunk-yywfvfph.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{ry as U}from"./chunk-jjvp4t5w.js";import{Ty as b}from"./chunk-cz25azze.js";import{wz as M}from"./chunk-adqh2m9z.js";import{rB as y}from"./chunk-3jm3snz8.js";import T from"path";var E;async function v(){if(E!==void 0)return E;try{E=(await import("@stacksjs/ts-i18n")).loadLocale??null}catch{E=null}return E}var k={defaultLocale:"en",locale:"en",translationsDir:"translations",format:"yaml",fallbackToKey:!0,cache:!0},R={},N={},w={};function Rq(q){if(q)delete R[q];else for(let J of Object.keys(R))delete R[J]}function Yq(){let q=Object.entries(R).map(([J,H])=>({locale:J,loadedAt:new Date(H.loadedAt),keyCount:h(H.translations)}));return{size:Object.keys(R).length,locales:Object.keys(R),entries:q}}function h(q,J=0){for(let H of Object.values(q))if(J++,H&&typeof H==="object"&&!Array.isArray(H))J=h(H,J);return J}function g(q,J=0){if(J<=0)return!1;return Date.now()-q.loadedAt>J}function zq(q){if(R[q])return"loaded";return w[q]||"idle"}function Dq(q){return w[q]==="loading"}function Nq(q){return!!R[q]}async function d(q,J){let{locales:H,parallel:G=!0,priority:Q={},onLocaleLoaded:W,onComplete:X,onError:Z}=q,Y=G?H:[...H].sort((z,$)=>(Q[$]||0)-(Q[z]||0));if(G){let z=Y.map(async($)=>{try{await V($,J),W?.($)}catch(_){Z?.($,_ instanceof Error?_:Error(String(_)))}});await Promise.all(z)}else for(let z of Y)try{await V(z,J),W?.(z)}catch($){Z?.(z,$ instanceof Error?$:Error(String($)))}X?.()}function Aq(q,J){queueMicrotask(()=>{d(q,J).catch((H)=>{if(J.debug)console.error("Background preload error:",H)})})}async function V(q,J){if({...k,...J.i18n}.cache&&R[q]){let Q=R[q],W=J.i18n?.cacheMaxAge??0;if(!g(Q,W))return Q.translations}if(N[q]?.state==="loading")return N[q].promise;w[q]="loading";let G=O(q,J).then((Q)=>{return w[q]="loaded",delete N[q],Q}).catch((Q)=>{throw w[q]="error",N[q]={promise:G,state:"error",error:Q instanceof Error?Q:Error(String(Q))},Q});return N[q]={promise:G,state:"loading"},G}function u(q){return R[q]?.translations}async function wq(q,J){let H=u(q);if(H)return H;return V(q,J)}async function Fq(q,J){if(R[q])return R[q].translations;if(N[q]){if(J)return Promise.race([N[q].promise,new Promise((H,G)=>setTimeout(()=>G(Error(`Timeout waiting for locale: ${q}`)),J))]);return N[q].promise}throw Error(`Locale "${q}" is not loading. Call loadTranslationLazy first.`)}function Eq(){return Object.entries(w).filter(([q,J])=>J==="loading").map(([q])=>q)}function Pq(q){if(q)delete N[q],delete w[q];else{for(let J of Object.keys(N))delete N[J];for(let J of Object.keys(w))delete w[J]}}async function O(q,J){let H={...k,...J.i18n},G=T.isAbsolute(H.translationsDir)?H.translationsDir:T.resolve(J.root||process.cwd(),H.translationsDir);try{let Q=await v(),W=Q?await Q(q,{translationsDir:G,defaultLocale:H.defaultLocale,sources:n(H.format)}):await m(q,H,G);if(W===void 0){if(q!==H.defaultLocale)return O(H.defaultLocale,J);return{}}let X=W;if(H.cache)R[q]={translations:X,loadedAt:Date.now(),locale:q};return X}catch(Q){if(J.debug)console.error(`Error loading translation file for locale "${q}":`,Q);if(q!==H.defaultLocale)return O(H.defaultLocale,J);return{}}}async function m(q,J,H){let G=T.join(H,`${q}${p(J.format)}`);try{let Q=await import(G);return Q.default||Q}catch(Q){try{let W=await Bun.file(G).text();if(J.format==="yaml"||J.format==="yml")return c(W);if(J.format==="json")return JSON.parse(W);throw Q}catch{return}}}function p(q){switch(q){case"yaml":return".yaml";case"yml":return".yml";case"js":return".js";case"ts":return".ts";case"json":default:return".json"}}function c(q){let J={},H=q.split(`
|
|
3
3
|
`),G=[{obj:J,indent:-1}];for(let Q of H){let W=Q.replace(/#.*$/,"").trimEnd();if(!W.trim())continue;let X=W.search(/\S/);if(X===-1)continue;while(G.length>1&&G[G.length-1].indent>=X)G.pop();let Z=G[G.length-1].obj,Y=W.match(/^(\s*)(\S[^:]*):\s*(.*)$/);if(Y){let[,,z,$]=Y,_=z.trim(),B=$.trim();if(B==="")Z[_]={},G.push({obj:Z[_],indent:X});else Z[_]=i(B)}}return J}function i(q){if(q.startsWith("'")&&q.endsWith("'")||q.startsWith('"')&&q.endsWith('"'))return q.slice(1,-1);let J=q.toLowerCase();if(J==="true"||J==="yes")return!0;if(J==="false"||J==="no")return!1;if(J==="null"||J==="~")return null;let H=Number(q);if(!Number.isNaN(H)&&q!=="")return H;return q}function n(q){switch(q){case"yaml":case"yml":return["yaml"];case"js":case"ts":return["ts"];case"json":default:return["json"]}}async function s(q,J){return V(q,J)}function r(q,J){for(let H of q){let G=H.trim(),Q=G.match(/^\{(\d+)\}\s*(.*)$/);if(Q){let X=Number.parseInt(Q[1],10);if(J===X)return Q[2];continue}let W=G.match(/^\[(\d+),(\d+|\*)\]\s*(.*)$/);if(W){let X=Number.parseInt(W[1],10),Z=W[2]==="*"?Number.POSITIVE_INFINITY:Number.parseInt(W[2],10);if(J>=X&&J<=Z)return W[3];continue}}if(q.length===2)return J===1?q[0].trim():q[1].trim();if(J<q.length)return q[J].trim();return q[q.length-1].trim()}function l(q,J={}){return f(q,J)}function f(q,J){let H="",G=0;while(G<q.length)if(q[G]==="{"){let Q=t(q,G);if(Q===-1){H+=q[G],G++;continue}let W=q.slice(G+1,Q);H+=o(W,J),G=Q+1}else if(q[G]==="'"&&G+1<q.length)if(q[G+1]==="'")H+="'",G+=2;else if(q[G+1]==="{"||q[G+1]==="}")H+=q[G+1],G+=2;else H+=q[G],G++;else H+=q[G],G++;return H}function t(q,J){let H=0;for(let G=J;G<q.length;G++)if(q[G]==="{")H++;else if(q[G]==="}"){if(H--,H===0)return G}return-1}function o(q,J){let H=e(q);if(H.length===0)return`{${q}}`;let G=H[0].trim(),Q=J[G];if(H.length===1)return Q!==void 0?String(Q):`{${G}}`;switch(H[1].trim().toLowerCase()){case"plural":return a(Q,H.slice(2).join(","),J);case"select":return Gq(Q,H.slice(2).join(","));case"selectordinal":return Hq(Q,H.slice(2).join(","));case"number":return Qq(Q,H[2]?.trim());case"date":return Wq(Q,H[2]?.trim());case"time":return Xq(Q,H[2]?.trim());default:return Q!==void 0?String(Q):`{${q}}`}}function e(q){let J=[],H="",G=0;for(let Q=0;Q<q.length;Q++){let W=q[Q];if(W==="{")G++,H+=W;else if(W==="}")G--,H+=W;else if(W===","&&G===0)J.push(H),H="";else H+=W}if(H)J.push(H);return J}function a(q,J,H){let G=Number(q)||0,Q=S(J),W=`=${G}`;if(Q[W])return K(Q[W],G,H);let X=qq(G);if(Q[X])return K(Q[X],G,H);if(Q.other)return K(Q.other,G,H);return String(G)}function K(q,J,H){let G=q.replace(/#/g,String(J));return f(G,H)}function qq(q){let J=Math.abs(q),H=Math.floor(J),G=String(q).includes(".")?String(q).split(".")[1].length:0;if(H===1&&G===0)return"one";return"other"}function Gq(q,J){let H=String(q||""),G=S(J);if(G[H])return G[H];return G.other||String(q)}function Hq(q,J){let H=Number(q)||0,G=S(J),Q=Jq(H);if(G[Q])return G[Q].replace(/#/g,String(H));if(G.other)return G.other.replace(/#/g,String(H));return String(H)}function Jq(q){let J=Math.abs(q),H=J%10,G=J%100;if(H===1&&G!==11)return"one";if(H===2&&G!==12)return"two";if(H===3&&G!==13)return"few";return"other"}function S(q){let J={},H=/(\w+|=\d+)\s*\{([^{}]*(?:\{[^{}]*\}[^{}]*)*)\}/g,G=H.exec(q);while(G!==null)J[G[1]]=G[2],G=H.exec(q);return J}function Qq(q,J){let H=Number(q);if(Number.isNaN(H))return String(q);switch(J){case"integer":return Math.floor(H).toLocaleString();case"percent":return`${(H*100).toFixed(0)}%`;case"currency":return H.toLocaleString(void 0,{style:"currency",currency:"USD"});default:return H.toLocaleString()}}function Wq(q,J){let H=q instanceof Date?q:new Date(String(q));if(Number.isNaN(H.getTime()))return String(q);let G={};switch(J){case"short":G.dateStyle="short";break;case"medium":G.dateStyle="medium";break;case"long":G.dateStyle="long";break;case"full":G.dateStyle="full";break;default:G.dateStyle="medium"}return H.toLocaleDateString(void 0,G)}function Xq(q,J){let H=q instanceof Date?q:new Date(String(q));if(Number.isNaN(H.getTime()))return String(q);let G={};switch(J){case"short":G.timeStyle="short";break;case"medium":G.timeStyle="medium";break;case"long":G.timeStyle="long";break;case"full":G.timeStyle="full";break;default:G.timeStyle="short"}return H.toLocaleTimeString(void 0,G)}function Zq(q){return/\{[^}]+,\s*(?:plural|select|selectordinal|number|date|time)\s*,/.test(q)}function I(q,J,H=!0,G={}){let Q=q.split("."),W=J;for(let Z of Q){if(W===void 0||W===null)break;W=W[Z]}if(W===void 0||W===null)return H?q:"";let X=String(W);if(Zq(X))return l(X,G);if(X.includes("|")&&"count"in G){let Z=Number(G.count),Y=X.split("|");X=r(Y,Z)}for(let[Z,Y]of Object.entries(G)){let z=Z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");X=X.replace(new RegExp(`:${z}`,"g"),String(Y))}return X}async function Vq(q,J,H,G){let Q=q,W=/@translate\(\s*['"]([^'"]+)['"]\s*(?:,\s*(\{[^}]*\})\s*)?\)([\s\S]*?)@endtranslate/g,X={...k,...G.i18n},Z=await s(X.locale,G);J.__translations=Z,J.__locale=X.locale,J.__i18nConfig=X,Q=await C(Q,W,async($,_,B,x,A)=>{try{let D={};if(B)try{let F=[()=>JSON.parse(B),()=>{let j=`{"data":${B}}`,L=JSON.parse(j);return typeof L.data==="object"?L.data:{}},()=>{return M(B,J)}];for(let j of F)try{if(D=j(),Object.keys(D).length>0)break}catch{}}catch(F){if(G.debug)console.error("Error parsing parameters for @translate directive:",F)}return I(_,Z,X.fallbackToKey,D)||x.trim()}catch(D){if(G.debug)console.error("Error processing @translate directive:",D);return U("Translate",`Error in @translate('${_}'): ${D instanceof Error?D.message:String(D)}`,b.EVALUATION_ERROR)}});let Y=/@translate\(\s*['"]([^'"]+)['"]\s*(?:,\s*(\{[^}]+\})\s*)?\)/g;if(G.debug){console.warn(`Processing translations in template. Sections: ${Q.includes("<h2>Translation with Parameters</h2>")?"Parameters section found":"Parameters section missing"}`);let $=[...Q.matchAll(Y)];console.warn(`Found ${$.length} @translate matches`),$.forEach((_,B)=>console.warn(`Match ${B}: ${_[0]}, Key: ${_[1]}, Params: ${_[2]||"none"}`))}return Q=await C(Q,/@translate\(\s*['"]([^'"]+)['"]\s*(?:,\s*(\{[^}]*\})\s*)?\)/g,async($,_,B,x)=>{try{let A={};if(B)try{let D=[()=>JSON.parse(B),()=>{let P=`{"data":${B}}`,F=JSON.parse(P);return typeof F.data==="object"?F.data:{}},()=>{return M(B,J)}];for(let P of D)try{if(A=P(),Object.keys(A).length>0)break}catch{}}catch(D){if(G.debug)console.error("Error parsing parameters for @translate directive:",D)}return I(_,Z,X.fallbackToKey,A)}catch(A){if(G.debug)console.error("Error processing @translate directive:",A);return U("Translate",`Error in @translate('${_}'): ${A instanceof Error?A.message:String(A)}`,b.EVALUATION_ERROR)}}),Q}async function C(q,J,H){let G=[];return q.replace(J,(W,...X)=>{let Z=H(W,...X).then((Y)=>({match:W,replacement:Y}));return G.push(Z),W}),(await Promise.all(G)).reduce((W,{match:X,replacement:Z})=>W.replace(X,Z),q)}function jq(q,J=!0){return(H,G={})=>{return I(H,q,J,G)}}
|
|
4
|
-
export{k as
|
|
4
|
+
export{k as rv,Rq as sv,Yq as tv,zq as uv,Dq as vv,Nq as wv,d as xv,Aq as yv,V as zv,u as Av,wq as Bv,Fq as Cv,Eq as Dv,Pq as Ev,s as Fv,l as Gv,Zq as Hv,I as Iv,Vq as Jv,jq as Kv};
|
|
@@ -5,4 +5,4 @@ function j(g){let f=g.robots??"allow";if(f===!1)return null;if(typeof f==="strin
|
|
|
5
5
|
`:"";if(f==="disallow")return["User-agent: *","Disallow: /","",h].filter(Boolean).join(`
|
|
6
6
|
`);return["User-agent: *","Allow: /","",h].filter(Boolean).join(`
|
|
7
7
|
`)}
|
|
8
|
-
export{j as
|
|
8
|
+
export{j as ch};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{mm as O,om as R,pm as f}from"./chunk-6y4gqs1q.js";function _(){let q=new Map;return{islands:q,register(j){q.set(j.id,j)},get(j){return q.get(j)},async hydrate(j){let w=q.get(j);if(!w||w.hydrated)return;if(w.hydrated=!0,typeof window<"u"&&typeof window.dispatchEvent==="function")window.dispatchEvent(new CustomEvent("stx:hydrate",{detail:{id:j,component:w.component}}))},async hydrateAll(){let j=Array.from(q.values()).filter((w)=>!w.hydrated).map((w)=>this.hydrate(w.id));await Promise.all(j)}}}function b(q){return`
|
|
3
3
|
<script data-hydrate="${q}">
|
|
4
4
|
(function() {
|
|
5
5
|
const island = document.querySelector('[data-island="${q}"]');
|
|
@@ -228,4 +228,4 @@ else {
|
|
|
228
228
|
${JSON.stringify(j)}
|
|
229
229
|
</script>
|
|
230
230
|
`}var c={processPartialHydrationDirectives:D,processStaticDirectives:m,generatePartialHydrationCSS:H,generateIslandManifest:u,createIslandRegistry:_,hydrateIsland:h,hydrateByStrategy:S,hydrateAll:x,isHydrated:g,onHydrated:v};
|
|
231
|
-
export{_ as
|
|
231
|
+
export{_ as aj,D as bj,H as cj,h as dj,S as ej,x as fj,g as gj,v as hj,m as ij,u as jj,c as kj};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Dy as w}from"./chunk-ht4j68cs.js";import{Uy as v}from"./chunk-cz25azze.js";function F(j){let{type:B,message:D,code:q,filePath:G,line:I,column:U,template:M,offset:J,snippet:K,suggestion:Q,format:R="text"}=j,V=I,Y=U;if(!V&&M&&J!==void 0){let _=T(M,J);V=_.line,Y=_.column}let Z=G?w(G):void 0,b=q?v(q):void 0,W={type:B,code:q,codeName:b,message:D,filePath:Z,line:V,column:Y,snippet:K,suggestion:Q,timestamp:new Date().toISOString()},X;switch(R){case"html":X=O(W);break;case"json":X=JSON.stringify(W,null,2);break;case"console":X=N(W,M,J);break;case"text":default:X=k(W,M,J);break}return{formatted:X,data:W}}function k(j,B,D){let q=[],G=j.code?` [${j.codeName||j.code}]`:"";if(q.push(`[${j.type} Error${G}]`),j.filePath){let I=j.filePath;if(j.line){if(I+=`:${j.line}`,j.column)I+=`:${j.column}`}q.push(`at ${I}`)}if(q.push(`
|
|
3
3
|
${j.message}`),B&&j.line){let I=A(B,j.line,2);if(I)q.push(`
|
|
4
4
|
${I}`)}if(j.snippet)q.push(`
|
|
5
5
|
Snippet: ${j.snippet}`);if(j.suggestion)q.push(`
|
|
@@ -24,4 +24,4 @@ ${"\x1B[31m"}\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\
|
|
|
24
24
|
`;for(let J=U;J<=M;J++){let K=J+1,Q=q[J]||"",R=J===G.line-1?">":" ";I+=`${R} ${K.toString().padStart(3)}: ${Q}
|
|
25
25
|
`}if(G.line-1<q.length){let J=" ".repeat(G.column+5);I+=`${J}^
|
|
26
26
|
`}return I}function C(j,B,D){try{return j()}catch(q){if(D&&q instanceof Error)D(q);return B}}async function S(j,B,D){try{return await j()}catch(q){if(D&&q instanceof Error)D(q);return B}}
|
|
27
|
-
export{F as
|
|
27
|
+
export{F as qy,h as ry,y as sy,H as ty,C as uy,S as vy};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var Z=Symbol.for("stx.Fragment"),R=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),V=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),I={className:"class",htmlFor:"for",tabIndex:"tabindex",autoFocus:"autofocus",autoPlay:"autoplay",crossOrigin:"crossorigin",dateTime:"datetime",encType:"enctype",formAction:"formaction",formEncType:"formenctype",formMethod:"formmethod",formNoValidate:"formnovalidate",formTarget:"formtarget",frameBorder:"frameborder",hrefLang:"hreflang",httpEquiv:"http-equiv",inputMode:"inputmode",maxLength:"maxlength",mediaGroup:"mediagroup",minLength:"minlength",noModule:"nomodule",noValidate:"novalidate",playsInline:"playsinline",readOnly:"readonly",rowSpan:"rowspan",colSpan:"colspan",srcDoc:"srcdoc",srcLang:"srclang",srcSet:"srcset",useMap:"usemap"};function D(q){return q.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function J(q){return q.replace(/&/g,"&").replace(/"/g,""")}function f(q){if(q==null||typeof q==="boolean")return[];if(!Array.isArray(q))return[B(q)];return q.flat(1/0).map(B).filter((w)=>w!=="")}function B(q){if(q==null||typeof q==="boolean")return"";if(typeof q==="string")return q;if(typeof q==="number")return String(q);return q}function $(q,w,K){let{children:G,ref:Q,key:U,...X}=w||{};return{type:q,props:Object.keys(X).length>0?X:null,children:f(G),key:K??U??void 0,ref:Q??void 0}}var j=$,E=$;function z(q){return Object.entries(q).filter(([,w])=>w!=null&&w!==!1).map(([w,K])=>{let G=w.replace(/[A-Z]/g,(U)=>`-${U.toLowerCase()}`),Q=typeof K==="number"&&!G.startsWith("--")&&G!=="opacity"&&G!=="z-index"&&G!=="flex-grow"&&G!=="flex-shrink"&&G!=="order"&&G!=="font-weight"&&G!=="line-height"?`${K}px`:String(K);return`${G}: ${Q}`}).join("; ")}function W(q){if(typeof q==="string")return q;if(Array.isArray(q))return q.filter(Boolean).map(W).join(" ");if(typeof q==="object"&&q!==null)return Object.entries(q).filter(([,w])=>w).map(([w])=>w).join(" ");return""}function F(q){if(!q)return"";let w=[];for(let[K,G]of Object.entries(q)){if(K==="key"||K==="ref"||K==="children"||K==="innerHTML"||K==="dangerouslySetInnerHTML")continue;if(K.startsWith("on")&&typeof G==="function")continue;let Q=I[K]||K;if(Q==="class"||Q==="className"){let U=W(G);if(U)w.push(` class="${J(U)}"`);continue}if(Q==="style"){let U=typeof G==="string"?G:z(G);if(U)w.push(` style="${J(U)}"`);continue}if(V.has(Q)){if(G)w.push(` ${Q}`);continue}if(G!=null&&G!==!1)w.push(` ${Q}="${J(String(G))}"`)}return w.join("")}function Y(q){if(q==null||typeof q==="boolean")return"";if(typeof q==="string")return D(q);if(typeof q==="number")return String(q);if(Array.isArray(q))return q.map(Y).join("");if(q.type===Z)return q.children.map(Y).join("");if(typeof q.type==="function"){let U=q.type({...q.props,children:q.children.length===1?q.children[0]:q.children.length>0?q.children:void 0});return Y(U)}let w=q.type,K=F(q.props),G=q.props?.innerHTML??q.props?.dangerouslySetInnerHTML?.__html;if(G!=null)return`<${w}${K}>${G}</${w}>`;if(R.has(w))return`<${w}${K}>`;let Q=q.children.map(Y).join("");return`<${w}${K}>${Q}</${w}>`}function H(q){return new ReadableStream({start(w){w.enqueue(Y(q)),w.close()}})}function _(q,w){if(!w)return;for(let[K,G]of Object.entries(w)){if(K==="key"||K==="ref"||K==="children"||K==="innerHTML"||K==="dangerouslySetInnerHTML")continue;let Q=I[K]||K;if(K.startsWith("on")&&typeof G==="function"){let U=K.slice(2).toLowerCase();q.addEventListener(U,G);continue}if(Q==="class"||Q==="className"){let U=W(G);if(U)q.setAttribute("class",U);continue}if(Q==="style"){let U=typeof G==="string"?G:z(G);if(U)q.setAttribute("style",U);continue}if(V.has(Q)){if(G)q.setAttribute(Q,"");continue}if(G!=null&&G!==!1)q.setAttribute(Q,String(G))}}function b(q,w){if(q==null||typeof q==="boolean")return;if(typeof q==="string"){w.appendChild(document.createTextNode(q));return}if(typeof q==="number"){w.appendChild(document.createTextNode(String(q)));return}if(Array.isArray(q)){for(let Q of q)b(Q,w);return}if(q.type===Z){for(let Q of q.children)b(Q,w);return}if(typeof q.type==="function"){let Q=q.type({...q.props,children:q.children.length===1?q.children[0]:q.children.length>0?q.children:void 0});b(Q,w);return}let K=document.createElement(q.type);_(K,q.props);let G=q.props?.innerHTML??q.props?.dangerouslySetInnerHTML?.__html;if(G!=null)K.innerHTML=G;else for(let Q of q.children)b(Q,K);if(q.ref){if(typeof q.ref==="function")q.ref(K)}w.appendChild(K)}function C(q){if(q.when)return $(Z,{children:q.children});return q.fallback??null}function L(q){let w=q.each;if(!w||w.length===0)return q.fallback??null;let K=Array.isArray(q.children)?q.children[0]:q.children,G=w.map((Q,U)=>K(Q,U));return $(Z,{children:G})}function M(q){return $(Z,{children:q.children})}function P(q,w,...K){let{key:G,ref:Q,...U}=w||{};return{type:q,props:Object.keys(U).length>0?U:{},children:f(K.length===1?K[0]:K),key:G??void 0,ref:Q??void 0}}
|
|
3
|
-
export{Z as
|
|
3
|
+
export{Z as Bl,$ as Cl,j as Dl,E as El,Y as Fl,H as Gl,b as Hl,C as Il,L as Jl,M as Kl,P as Ll};
|
|
@@ -7,4 +7,4 @@ var I=new Map,Q=new Map;function z(j,B){let G=B?.id||s(j),J=l(j),U=I.get(G);if(U
|
|
|
7
7
|
<script data-craft-hydration>
|
|
8
8
|
window.__CRAFT_HYDRATION__ = ${JSON.stringify(J)};
|
|
9
9
|
</script>`;return{html:j+U,data:J}}function x(j){let B=!1,G=!1,J=!1,U=!1,X=0,Z=0;function Y(_,q){if(Z=Math.max(Z,q),_.type==="slot")B=!0;if(_.type==="component")X++;if(!_.isStatic)G=!0;if(_.props)for(let $ of Object.keys(_.props)){if($.startsWith("on"))J=!0;if($==="@async"||$==="data-async")U=!0}if(_.children)_.children.forEach(($)=>Y($,q+1))}return Y(j,0),{hasSlots:B,hasDynamicContent:G,hasEventHandlers:J,hasAsyncContent:U,componentCount:X,maxDepth:Z,estimatedSize:JSON.stringify(j).length}}function g(j){let B=new Map,G=new Map;return K(j,(J,U)=>{let X=U.join(".");if(J.isStatic)B.set(X,D(J));else G.set(X,J.tag||J.componentName||"dynamic")}),{staticParts:B,dynamicParts:G}}function h(j){let B=[],G=/<script[^>]*>([\s\S]*?)<\/script>/gi,J;while((J=G.exec(j))!==null)B.push(J[1]);return B}function m(j){let B=[],G=/<style[^>]*>([\s\S]*?)<\/style>/gi,J;while((J=G.exec(j))!==null)B.push(J[1]);return B}function p(j){let B=[],G=/@include\s*\(\s*['"]([^'"]+)['"]/g,J;while((J=G.exec(j))!==null)B.push(J[1]);let U=/@component\s*\(\s*['"]([^'"]+)['"]/g;while((J=U.exec(j))!==null)B.push(J[1]);let X=/<@craft-[\w-]+/g;while((J=X.exec(j))!==null)B.push(J[0].slice(2));return[...new Set(B)]}function A(j){return/\{\{.*?\}\}|\{\!\!.*?\!\!\}/.test(j)}function P(j,B){let G=j.replace(/\{\{\s*(.+?)\s*\}\}/g,(J,U)=>{try{let X=b(U.trim(),B);return R(String(X??""))}catch{return""}});return G=G.replace(/\{!!\s*(.+?)\s*!!\}/g,(J,U)=>{try{let X=b(U.trim(),B);return String(X??"")}catch{return""}}),G}function b(j,B){if(/^[\w.]+$/.test(j)){let G=j.split("."),J=B;for(let U of G)if(J&&typeof J==="object"&&U in J)J=J[U];else return;return J}try{return Function(...Object.keys(B),`return ${j}`)(...Object.values(B))}catch{return}}function R(j){return j.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function i(j){return j.replace(/\s+/g," ").replace(/>\s+</g,"><").replace(/\s+>/g,">").replace(/<\s+/g,"<").trim()}function s(j){let B=0;for(let G=0;G<j.length;G++){let J=j.charCodeAt(G);B=(B<<5)-B+J,B=B&B}return`tpl_${Math.abs(B).toString(36)}`}function l(j){let B=0;for(let G=0;G<j.length;G++){let J=j.charCodeAt(G);B=(B<<5)-B+J,B=B&B}return Math.abs(B).toString(36)}var r=0;function c(){return`h_${++r}`}function L(j){return["craft-button","craft-text-input","craft-textarea","craft-checkbox","craft-radio","craft-select","craft-slider","craft-toggle","craft-date-picker","craft-time-picker","craft-color-picker","craft-file-input","craft-modal","craft-alert","craft-toast","craft-progress","craft-spinner","craft-avatar","craft-badge","craft-card","craft-accordion","craft-tabs","craft-tooltip","craft-popover","craft-dropdown","craft-context-menu","craft-data-table","craft-virtual-list","craft-tree-view","craft-map","craft-chart","craft-video","craft-audio","craft-webview","craft-canvas","craft-image-viewer","craft-pdf-viewer","craft-code-editor","craft-rich-editor"].includes(j)}function d(j){let B=j.tag?.toLowerCase(),G=j.props?.type,J={button:{component:"craft-button",confidence:0.95,reason:"Native button provides better touch feedback"},"input:text":{component:"craft-text-input",confidence:0.9,reason:"Native text input has better keyboard handling"},"input:checkbox":{component:"craft-checkbox",confidence:0.95,reason:"Native checkbox follows platform conventions"},"input:range":{component:"craft-slider",confidence:0.9,reason:"Native slider provides smooth interaction"},"input:date":{component:"craft-date-picker",confidence:0.95,reason:"Native date picker provides platform-specific UI"},"input:time":{component:"craft-time-picker",confidence:0.95,reason:"Native time picker provides platform-specific UI"},"input:color":{component:"craft-color-picker",confidence:0.9,reason:"Native color picker provides platform-specific UI"},textarea:{component:"craft-textarea",confidence:0.85,reason:"Native textarea handles multiline input better"},select:{component:"craft-select",confidence:0.9,reason:"Native select provides platform dropdown UI"},progress:{component:"craft-progress",confidence:0.95,reason:"Native progress bar matches platform style"},video:{component:"craft-video",confidence:0.95,reason:"Native video provides hardware acceleration"},audio:{component:"craft-audio",confidence:0.95,reason:"Native audio provides system integration"},dialog:{component:"craft-modal",confidence:0.9,reason:"Native modal provides proper layering and focus"}},U=G?`${B}:${G}`:B,X=J[U||""]||J[B||""];if(X)return{htmlSelector:U||B||"",nativeComponent:X.component,confidence:X.confidence,reason:X.reason};return null}function S(){I.clear()}function M(){Q.clear()}function o(){S(),M()}function a(){return{templateCacheSize:I.size,renderCacheSize:Q.size,totalEntries:I.size+Q.size}}var n={compileTemplate:z,renderSSR:H,generateCraftOptimizations:k,prerenderForCraft:f,clearTemplateCache:S,clearRenderCache:M,clearAllCaches:o,getSSRCacheStats:a},e=n;
|
|
10
|
-
export{z as
|
|
10
|
+
export{z as No,H as Oo,k as Po,f as Qo,S as Ro,M as So,o as To,a as Uo,e as Vo};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{rB as D}from"./chunk-3jm3snz8.js";var q=null;async function E(){if(q!==null)return q;try{let j=await import("stx-router");if(typeof j.getRouterScript==="function")q=j.getRouterScript();else q=""}catch{q=""}return q}async function G(j,B){let z=await E();if(!z)return j;let C={interceptAllLinks:!0,container:"main",...B},A=`${`<script>window.__stxRouterConfig=${JSON.stringify(C)};</script>
|
|
3
3
|
`}<script>${z}</script>`;if(/<\/body>/i.test(j))return j.replace(/<\/body>/i,`${A}
|
|
4
4
|
</body>`);return`${j}
|
|
5
5
|
${A}`}
|
|
6
|
-
export{G as
|
|
6
|
+
export{G as dh};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{rB as W}from"./chunk-3jm3snz8.js";function Y(k){if(k.includes("window.StacksBrowser")||k.includes("StacksBrowser ="))return k;let H=/<script\b(?![^>]*\bserver\b)[^>]*>([\s\S]*?)<\/script>/gi,q="",F;while((F=H.exec(k))!==null)q+=F[1]+`
|
|
3
3
|
`;let G=/\{\{([\s\S]*?)\}\}/g;while((F=G.exec(k))!==null)q+=F[1]+`
|
|
4
4
|
`;if(!q.trim())return k;let A=["browserQuery","BrowserQueryBuilder","configureBrowser","createBrowserModel"].some((N)=>{return new RegExp(`\\b${N}\\b`).test(q)}),z=new Set(["Promise","Object","Array","Map","Set","Date","Error","JSON","Math","Number","String","RegExp","Symbol","WeakMap","WeakSet","Proxy","Reflect","Intl","URL","URLSearchParams","FormData","Headers","Request","Response","AbortController","EventTarget","Element","Document","Node","Window","Console","Storage","Navigator","Blob","File","FileReader","HTMLElement","SVGElement","Event","CustomEvent","DOMParser","XMLSerializer","WebSocket","Worker","SharedWorker","IntersectionObserver","MutationObserver","ResizeObserver","PerformanceObserver","Notification","Bun","Buffer","Process"]),K=/\b([A-Z][a-zA-Z0-9]*)\s*\.\s*(all|find|first|get|where|orderBy|orderByDesc|limit|select|pluck|create|update|delete)\s*\(/g,T,V=!1;while((T=K.exec(q))!==null)if(!z.has(T[1])){V=!0;break}if(!A&&!V)return k;let L=`<script type="module">
|
|
5
5
|
// STX: Auto-load @stacksjs/browser (auto-initializes API and loads models)
|
|
@@ -18,4 +18,4 @@ ${L}`);return L+`
|
|
|
18
18
|
`+k}async function _(k,H){if(!k.includes("</body>"))return k;if(k.includes("__stxRouter)return")||k.includes("__stxRouter=true"))return k;let q=H?.router,F="";if(q){let z={};if(q.container)z.container=q.container;if(q.interceptAllLinks!==void 0)z.interceptAllLinks=q.interceptAllLinks;if(q.progress!==void 0)z.progress=q.progress;if(q.viewTransitions!==void 0)z.viewTransitions=q.viewTransitions;if(q.viewTransitionDuration!==void 0)z.viewTransitionDuration=q.viewTransitionDuration;if(q.viewTransitionEasing!==void 0)z.viewTransitionEasing=q.viewTransitionEasing;if(q.scrollToTop!==void 0)z.scrollToTop=q.scrollToTop;if(q.prefetch!==void 0)z.prefetch=q.prefetch;if(q.cache!==void 0)z.cache=q.cache;if(q.progressColor!==void 0)z.progressColor=q.progressColor;if(q.progressHeight!==void 0)z.progressHeight=q.progressHeight;if(Object.keys(z).length>0)F=`<script>window.__stxRouterConfig=${JSON.stringify(z)};</script>
|
|
19
19
|
`}let{getCachedRouterScript:G}=await import("././caching.js"),J=H?.buildMode==="compile"?'<script src="/__stx/router.__STX_HASH__.js"></script>':`<script>${await G()}</script>`,A=k.lastIndexOf("</body>");return k.slice(0,A)+F+J+`
|
|
20
20
|
</body>`+k.slice(A+7)}
|
|
21
|
-
export{Y as
|
|
21
|
+
export{Y as Qt,Z as Rt,_ as St};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{m as
|
|
2
|
+
import{Jm as F,Km as v,Lm as S,Mm as b,Nm as B,Om as _,Vm as k,Xm as y,Ym as T}from"./chunk-cygfdk1n.js";import W from"fs";import L from"path";function m(K={}){let{inputDirs:j=["public","src/assets","assets"],outputDir:G="dist/images",baseUrl:J="/images",formats:C=v,widths:X=F,quality:Z=S,placeholder:R="none",concurrency:z=4,cache:U=!0,cacheDir:w=".stx/image-cache",referencedOnly:E=!1,verbose:Q=!1}=K,N={imageReferences:new Set,processedImages:new Map,stats:{totalImages:0,optimizedImages:0,savedBytes:0,variants:0}};return{name:"stx-image-optimization",async setup(H){if(!await B()){console.warn("[stx-images] no image backend available, optimization disabled");return}if(U)await W.promises.mkdir(w,{recursive:!0});if(Q){let V=await b();console.log("[stx-images] Plugin initialized"),console.log(` Backend: ${V?"sharp (native fast path) + ts-images":"ts-images (pure TS)"}`),console.log(` Input dirs: ${j.join(", ")}`),console.log(` Output dir: ${G}`),console.log(` Formats: ${C.join(", ")}`),console.log(` Widths: ${X.join(", ")}`)}},async buildStart(){N.imageReferences.clear(),N.processedImages.clear(),N.stats={totalImages:0,optimizedImages:0,savedBytes:0,variants:0}},async transform(H,M){if(M.endsWith(".html")||M.endsWith(".stx")){let V=f(H);for(let $ of V)N.imageReferences.add($)}if(H.includes("<Image")||H.includes("@image"))return await l(H,{formats:C,widths:X,quality:Z,placeholder:R,outputDir:G,baseUrl:J,processedImages:N.processedImages});return H},async buildEnd(H){if(!await B())return;await W.promises.mkdir(G,{recursive:!0});let V=[];for(let O of j){if(!W.existsSync(O))continue;let Y=await x(O);V.push(...Y)}let $=E?V.filter((O)=>d(O,N.imageReferences)):V;if(N.stats.totalImages=$.length,Q)console.log(`[stx-images] Processing ${$.length} images...`);let I=A($,z);for(let O of I)await Promise.all(O.map(async(Y)=>{try{let q=await _(Y,{formats:C,widths:X,quality:Z,placeholder:R,outputDir:G,baseUrl:J});N.processedImages.set(Y,q),N.stats.optimizedImages++,N.stats.variants+=q.variants.length;let D=W.statSync(Y).size,P=y(q.variants);if(N.stats.savedBytes+=Math.max(0,D-P/q.variants.length),Q)console.log(` \u2713 ${L.basename(Y)} \u2192 ${q.variants.length} variants`)}catch(q){console.error(`[stx-images] Error processing ${Y}:`,q)}}));if(console.log("[stx-images] Optimization complete:"),console.log(` Images: ${N.stats.optimizedImages}/${N.stats.totalImages}`),console.log(` Variants: ${N.stats.variants}`),N.stats.savedBytes>0)console.log(` Saved: ~${T(N.stats.savedBytes)}`)}}}function f(K){let j=[],G=/src=["']([^"']+\.(jpg|jpeg|png|webp|avif|gif))["']/gi,J;while((J=G.exec(K))!==null)j.push(J[1]);let C=/<Image[^>]+src=["']([^"']+)["']/gi;while((J=C.exec(K))!==null)j.push(J[1]);let X=/@image\s*\(\s*['"]([^'"]+)['"]/gi;while((J=X.exec(K))!==null)j.push(J[1]);let Z=/background(?:-image)?:\s*url\(["']?([^"')]+\.(jpg|jpeg|png|webp|avif|gif))["']?\)/gi;while((J=Z.exec(K))!==null)j.push(J[1]);return j}function d(K,j){let G=L.basename(K);for(let J of j)if(J.endsWith(G)||J.includes(G))return!0;return!1}async function l(K,j){return K}async function x(K){let j=[];async function G(J){let C=await W.promises.readdir(J,{withFileTypes:!0});for(let X of C){let Z=L.join(J,X.name);if(X.isDirectory())await G(Z);else if(X.isFile()&&k(Z))j.push(Z)}}return await G(K),j}function A(K,j){let G=[];for(let J=0;J<K.length;J+=j)G.push(K.slice(J,J+j));return G}async function n(K,j,G={}){if(!await B())throw Error("No image backend available \u2014 install sharp or ensure ts-images is bundled");return _(K,{...G,outputDir:j})}async function o(K,j,G={}){let{formats:J=v,widths:C=F,quality:X=S,placeholder:Z="none",concurrency:R=4,verbose:z=!1}=G;if(!await B())throw Error("No image backend available \u2014 install sharp or ensure ts-images is bundled");await W.promises.mkdir(j,{recursive:!0});let w=await x(K),E=[],Q={totalImages:w.length,optimizedImages:0,savedBytes:0,variants:0},N=A(w,R);for(let H of N){let M=await Promise.all(H.map(async(V)=>{try{let $=await _(V,{formats:J,widths:C,quality:X,placeholder:Z,outputDir:j,baseUrl:"/"});if(Q.optimizedImages++,Q.variants+=$.variants.length,z)console.log(` \u2713 ${L.basename(V)}`);return $}catch($){return console.error(`Error processing ${V}:`,$),null}}));E.push(...M.filter((V)=>V!==null))}return{processed:E,stats:Q}}function p(K){let j={};for(let G of K)j[G.src]={variants:G.variants,placeholder:G.placeholder};return j}async function c(K,j){let G=p(K);await Bun.write(j,JSON.stringify(G,null,2))}
|
|
3
|
+
export{m as Bm,n as Cm,o as Dm,p as Em,c as Fm};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
function V(j){return j.type==="Document"}function S(j){return j.type==="Text"}function b(j){return j.type==="Expression"}function $(j){return j.type==="Directive"}function B(j){return j.type==="Component"}function q(j){return j.type==="Element"}function y(j){return j.type==="Attribute"}function C(j){return j.type==="Comment"}function v(j){return j.type==="Script"}function g(j){return j.type==="Style"}function E(j=[],z){return{type:"Document",children:j,loc:z}}function M(j,z){return{type:"Text",value:j,loc:z}}function F(j,z=!0,G){let H=z?`{{ ${j} }}`:`{!! ${j} !!}`;return{type:"Expression",expression:j,escaped:z,raw:H,loc:G}}function D(j,z=null,G=null,H){let I=G===null,J=`@${j}`;if(z)J+=`(${z})`;return{type:"Directive",name:j,params:z,body:G,selfClosing:I,raw:J,loc:H}}function P(j,z=[],G=[],H=!1,I){return{type:"Component",name:j,attributes:z,children:G,selfClosing:H,loc:I}}function T(j,z=[],G=[],H){let J=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]).has(j.toLowerCase());return{type:"Element",tag:j,attributes:z,children:J?[]:G,selfClosing:J||G.length===0,void:J,loc:H}}function w(j,z=null,G){return{type:"Attribute",name:j,value:z,dynamic:z!==null&&typeof z!=="string",loc:G}}function Z(j,z="html",G){return{type:"Comment",value:j,style:z,loc:G}}function k(j,z=[],G){return{type:"Script",content:j,attributes:z,loc:G}}function A(j,z=[],G=!1,H){return{type:"Style",content:j,attributes:z,scoped:G,loc:H}}function O(j,z,G=null){if(j.parent=G??void 0,z.enter){if(z.enter(j,G)===!1)return}let H=z[j.type];if(H&&typeof H==="object"&&"enter"in H){let J=H.enter;if(J(j)===!1)return}let I=x(j);for(let J of I)O(J,z,j);if(H&&typeof H==="object"&&"leave"in H){let J=H.leave;J(j)}if(z.leave)z.leave(j,G)}function x(j){switch(j.type){case"Document":return j.children;case"Directive":return j.body||[];case"Component":return[...j.attributes,...j.children];case"Element":return[...j.attributes,...j.children];case"Script":case"Style":return j.attributes;default:return[]}}function W(j){let z={...j};if("children"in z&&Array.isArray(z.children))z.children=z.children.map((G)=>W(G));if("body"in z&&Array.isArray(z.body))z.body=z.body.map((G)=>W(G));if("attributes"in z&&Array.isArray(z.attributes))z.attributes=z.attributes.map((G)=>W(G));return delete z.parent,z}function u(j,z,G){O(j,{enter(H){let I=_(H);if(I){let J=I.indexOf(z);if(J!==-1){let L=Array.isArray(G)?G:[G];I.splice(J,1,...L)}}}})}function h(j,z){O(j,{enter(G){let H=_(G);if(H){let I=H.indexOf(z);if(I!==-1)H.splice(I,1)}}})}function _(j){if("children"in j&&Array.isArray(j.children))return j.children;if("body"in j&&Array.isArray(j.body))return j.body;return null}function R(j,z){let G=[];return O(j,{enter(H){if(z(H))G.push(H)}}),G}function f(j,z){return R(j,(G)=>G.type===z)}function m(j,z){return R(j,(G)=>$(G)&&G.name===z)}function p(j,z){return R(j,(G)=>B(G)&&G.name===z)}function c(j,z){return R(j,(G)=>q(G)&&G.tag.toLowerCase()===z.toLowerCase())}function s(j){return f(j,"Expression")}function l(j){let z=new Set;return O(j,{Directive:{enter(G){z.add(G.name)}}}),z}function i(j){let z=new Set;return O(j,{Component:{enter(G){z.add(G.name)}}}),z}function K(j){switch(j.type){case"Document":return j.children.map((z)=>K(z)).join("");case"Text":return j.value;case"Expression":return j.raw;case"Directive":if(j.selfClosing)return j.raw;else{let z=j.body?.map((G)=>K(G)).join("")||"";return`${j.raw}${z}@end${j.name}`}case"Component":{let z=j.attributes.map((H)=>K(H)).join(" "),G=z?` ${z}`:"";if(j.selfClosing)return`<${j.name}${G} />`;else{let H=j.children.map((I)=>K(I)).join("");return`<${j.name}${G}>${H}</${j.name}>`}}case"Element":{let z=j.attributes.map((H)=>K(H)).join(" "),G=z?` ${z}`:"";if(j.void)return`<${j.tag}${G}>`;else if(j.selfClosing&&j.children.length===0)return`<${j.tag}${G} />`;else{let H=j.children.map((I)=>K(I)).join("");return`<${j.tag}${G}>${H}</${j.tag}>`}}case"Attribute":if(j.value===null)return j.name;else if(typeof j.value==="string")return`${j.name}="${j.value}"`;else return`${j.name}="${K(j.value)}"`;case"Comment":if(j.style==="stx")return`{{-- ${j.value} --}}`;else return`<!-- ${j.value} -->`;case"Script":{let z=j.attributes.map((H)=>K(H)).join(" ");return`<script${z?` ${z}`:""}>${j.content}</script>`}case"Style":{let z=j.attributes.map((I)=>K(I)).join(" "),G=z?` ${z}`:"",H=j.scoped&&!G.includes("scoped")?" scoped":"";return`<style${G}${H}>${j.content}</style>`}default:return""}}class N{source="";pos=0;line=1;column=0;filePath;parse(j,z){this.source=j,this.pos=0,this.line=1,this.column=0,this.filePath=z;let G=this.parseChildren();return E(G,{start:{line:1,column:0},end:{line:this.line,column:this.column},source:this.filePath})}parseChildren(j){let z=[];while(this.pos<this.source.length){if(j&&j.test(this.source.slice(this.pos)))break;let G=this.parseNext();if(G)z.push(G);else break}return z}parseNext(){if(this.pos>=this.source.length)return null;let j=this.source.slice(this.pos);if(j.startsWith("{{--"))return this.parseStxComment();if(j.startsWith("{{"))return this.parseExpression(!0);if(j.startsWith("{!!"))return this.parseExpression(!1);if(j.match(/^@[a-z]/i))return this.parseDirective();if(j.startsWith("<!--"))return this.parseHtmlComment();if(j.match(/^<script/i))return this.parseScript();if(j.match(/^<style/i))return this.parseStyle();if(j.startsWith("<")&&!j.startsWith("</"))return this.parseTag();return this.parseText()}parseText(){let j=this.getPosition(),z="";while(this.pos<this.source.length){let G=this.source[this.pos],H=this.source.slice(this.pos);if(H.startsWith("{{")||H.startsWith("{!!")||H.match(/^@[a-z]/i)||H.startsWith("<"))break;z+=G,this.advance()}if(z.length===0)return null;return M(z,{start:j,end:this.getPosition(),source:this.filePath})}parseExpression(j){let z=this.getPosition(),G=j?"{{":"{!!",H=j?"}}":"!!}";this.advance(G.length);let I="";while(this.pos<this.source.length){if(this.source.slice(this.pos).startsWith(H))break;I+=this.source[this.pos],this.advance()}return this.advance(H.length),F(I.trim(),j,{start:z,end:this.getPosition(),source:this.filePath})}parseDirective(){let j=this.getPosition();this.advance();let z="";while(this.pos<this.source.length&&/[a-z]/i.test(this.source[this.pos]))z+=this.source[this.pos],this.advance();let G=null;if(this.source[this.pos]==="(")G=this.parseParenthesized();let H=new Set(["if","unless","isset","empty","auth","guest","env","foreach","for","forelse","while","switch","section","push","prepend","once","component","slot","verbatim","php","js","ts"]),I=null;if(H.has(z)){let J=new RegExp(`^@end${z}\\b`);I=this.parseChildren(J);let L=this.source.slice(this.pos).match(J);if(L)this.advance(L[0].length)}return D(z,G,I,{start:j,end:this.getPosition(),source:this.filePath})}parseParenthesized(){let j="",z=0;while(this.pos<this.source.length){let G=this.source[this.pos];if(G==="("){if(z++,z>1)j+=G}else if(G===")"){if(z--,z===0){this.advance();break}j+=G}else if(z>0)j+=G;this.advance()}return j}parseStxComment(){let j=this.getPosition();this.advance(4);let z="";while(this.pos<this.source.length){if(this.source.slice(this.pos).startsWith("--}}"))break;z+=this.source[this.pos],this.advance()}return this.advance(4),Z(z.trim(),"stx",{start:j,end:this.getPosition(),source:this.filePath})}parseHtmlComment(){let j=this.getPosition();this.advance(4);let z="";while(this.pos<this.source.length){if(this.source.slice(this.pos).startsWith("-->"))break;z+=this.source[this.pos],this.advance()}return this.advance(3),Z(z.trim(),"html",{start:j,end:this.getPosition(),source:this.filePath})}parseTag(){let j=this.getPosition();this.advance();let z="";while(this.pos<this.source.length&&/[a-z0-9-]/i.test(this.source[this.pos]))z+=this.source[this.pos],this.advance();let G=this.parseAttributes();this.skipWhitespace();let H=this.source.slice(this.pos).startsWith("/>");if(H)this.advance(2);else this.advance();let I=/^[A-Z]/.test(z),L=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]).has(z.toLowerCase()),U=[];if(!H&&!L){let Q=new RegExp(`^</${z}>`,"i");U=this.parseChildren(Q);let Y=this.source.slice(this.pos).match(Q);if(Y)this.advance(Y[0].length)}let X={start:j,end:this.getPosition(),source:this.filePath};if(I)return P(z,G,U,H,X);else{let Q=T(z,G,U,X);return Q.selfClosing=H||L,Q}}parseAttributes(){let j=[];while(this.pos<this.source.length){if(this.skipWhitespace(),this.source[this.pos]===">"||this.source.slice(this.pos).startsWith("/>"))break;let z=this.parseAttribute();if(z)j.push(z)}return j}parseAttribute(){let j=this.getPosition(),z="";while(this.pos<this.source.length&&/[a-z0-9-:@.]/i.test(this.source[this.pos]))z+=this.source[this.pos],this.advance();if(!z)return null;let G=null;if(this.skipWhitespace(),this.source[this.pos]==="="){this.advance(),this.skipWhitespace();let H=this.source[this.pos];if(H==='"'||H==="'"){this.advance();let I="";while(this.pos<this.source.length&&this.source[this.pos]!==H)I+=this.source[this.pos],this.advance();if(this.advance(),I.includes("{{")||I.includes("{!!"))G=I;else G=I}}return w(z,G,{start:j,end:this.getPosition(),source:this.filePath})}parseScript(){let j=this.getPosition();this.advance(7);let z=this.parseAttributes();this.skipWhitespace(),this.advance();let G="";while(this.pos<this.source.length){if(this.source.slice(this.pos).match(/^<\/script>/i))break;G+=this.source[this.pos],this.advance()}return this.advance(9),k(G,z,{start:j,end:this.getPosition(),source:this.filePath})}parseStyle(){let j=this.getPosition();this.advance(6);let z=this.parseAttributes(),G=z.some((I)=>I.name==="scoped");this.skipWhitespace(),this.advance();let H="";while(this.pos<this.source.length){if(this.source.slice(this.pos).match(/^<\/style>/i))break;H+=this.source[this.pos],this.advance()}return this.advance(8),A(H,z,G,{start:j,end:this.getPosition(),source:this.filePath})}advance(j=1){for(let z=0;z<j&&this.pos<this.source.length;z++){if(this.source[this.pos]===`
|
|
3
3
|
`)this.line++,this.column=0;else this.column++;this.pos++}}skipWhitespace(){while(this.pos<this.source.length&&/\s/.test(this.source[this.pos]))this.advance()}getPosition(){return{line:this.line,column:this.column}}}
|
|
4
|
-
export{V as
|
|
4
|
+
export{V as HA,S as IA,b as JA,$ as KA,B as LA,q as MA,y as NA,C as OA,v as PA,g as QA,E as RA,M as SA,F as TA,D as UA,P as VA,T as WA,w as XA,Z as YA,k as ZA,A as _A,O as $A,x as aB,W as bB,u as cB,h as dB,R as eB,f as fB,m as gB,p as hB,c as iB,s as jB,l as kB,i as lB,K as mB,N as nB};
|
|
@@ -33,4 +33,4 @@ ${Y}`}),q=q.replace(/(<\/[^>]+>)(?=<|$)/g,(w,W,Y,X)=>{let Z=X.substring(Math.max
|
|
|
33
33
|
`),w=[],W=0,Y=!1,X=q.useTabs?"\t":" ".repeat(q.indentSize);for(let Z=0;Z<j.length;Z++){let V=j[Z],G=V.trim();if(G===""){w.push("");continue}let H=G.match(/<script\b/i),z=G.match(/<\/script>/i);if(Y&&!z){w.push(V);continue}let J=G===">";if(_(G)&&!G.startsWith("<")&&!G.startsWith("@")){w.push(X.repeat(W)+G);continue}let R=G.startsWith("@end"),$=G.startsWith("@else")||G.startsWith("@elseif"),F=G.startsWith("@")&&x(G),y=G.startsWith("<!DOCTYPE")||G.startsWith("<!doctype"),A=G.startsWith("<!--"),U=G.startsWith("</"),B=G.startsWith("<")&&!U&&!A&&!y,k=G.includes("/>")||S(G),E=_(G);if(U||R)W=Math.max(0,W-1);let M=$?Math.max(0,W-1):W;if(J)w.push(V);else w.push(X.repeat(M)+G);if(B&&!k&&!E&&!J||F)W++;if(H)Y=!0;if(z)Y=!1}return w.join(`
|
|
34
34
|
`)}function N(K,q){if(K=K.replace(/@(if|elseif|foreach|for|while)\s*\(\s*([^)]+)\s*\)/g,(Q,j,w)=>{let W=w.trim().replace(/\s+/g," ");return`@${j}(${W})`}),K=K.replace(/@(csrf|method)\s*\(\s*([^)]*)\s*\)/g,(Q,j,w)=>{if(w.trim()==="")return`@${j}`;return`@${j}(${w.trim()})`}),q.normalizeWhitespace)K=K.replace(/\{\{\s*([^}]+)\s*\}\}/g,(Q,j)=>{return`{{ ${j.trim()} }}`}),K=K.replace(/\{!!\s*([^!]+)\s*!!\}/g,(Q,j)=>{return`{!! ${j.trim()} !!}`});return K}function S(K){let q=["br","hr","img","input","meta","link","area","base","col","embed","source","track","wbr"];if(K.includes("/>"))return!0;let Q=K.match(/<(\w+)/);if(Q){let j=Q[1];return q.includes(j.toLowerCase())}return!1}function _(K){return/<(\w+)(?:\s[^>]*)?>[\s\S]*?<\/\1>/.test(K)}function x(K){let q=["if","unless","foreach","for","while","section","push","component","slot","markdown","wrap","error"];for(let Q of q)if(K.startsWith(`@${Q}`))return!K.includes(`@end${Q}`);return!1}function L(K,q){if(!q.sortAttributes)return K;return K.replace(/<(\w+)([^>]*)>/g,(Q,j,w)=>{if(!w.trim())return Q;if(w.includes("<")||w.includes(`
|
|
35
35
|
`)||w.includes("@"))return Q;let W=/(\w+)(?:=("[^"]*"|'[^']*'|[^\s>]+))?/g,Y=[],X;while((X=W.exec(w))!==null)Y.push({name:X[1],value:X[2]});Y.sort((V,G)=>{if(V.name==="id")return-1;if(G.name==="id")return 1;if(V.name==="class")return-1;if(G.name==="class")return 1;return V.name.localeCompare(G.name)});let Z=Y.map((V)=>V.value?`${V.name}=${V.value}`:V.name).join(" ");return`<${j}${Z?` ${Z}`:""}>`})}
|
|
36
|
-
export{O as
|
|
36
|
+
export{O as _m,v as $m};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{y as
|
|
2
|
+
import{Ss as q}from"./chunk-w01y57f5.js";import{rB as L}from"./chunk-3jm3snz8.js";import M from"fs";import X from"path";var y=new Map,Q=new Map;async function w(j){let z;for(let K=0;K<3;K++)try{let V=(await M.promises.stat(j)).mtime.getTime(),J=Q.get(j);if(J&&J.mtime===V)return J.content;let W=await Bun.file(j).text(),U=(await M.promises.stat(j)).mtime.getTime();if(U!==V)continue;return Q.set(j,{content:W,mtime:U}),W}catch(I){z=I;break}throw Q.delete(j),Error(`File not found: ${j}${z?` (${z.message})`:""}`)}function A(j){Q.delete(j)}function H(j){for(let B of Q.keys())if(B.startsWith(j))Q.delete(B)}var Z=null,T=null,N=null;function v(j){N=j}async function E(j=!1){let B=N??await import("././signals.js");if(j)return B.generateSignalsRuntimeDev();if(Z===null)Z=B.generateSignalsRuntime();return Z}var $=null;async function F(){if($===null){let{getRouterScript:j}=await import("stx-router");$=j()}return $}function R(){Q.clear(),Z=null,T=null,$=null}function k(j){let B={debug:j.debug===!0,middleware:(j.middleware??[]).map((z)=>({name:z.name,timing:z.timing,handler:String(z.handler)})),customDirectives:(j.customDirectives??[]).map((z)=>({name:z.name,hasEndTag:z.hasEndTag===!0,handler:String(z.handler)}))};return new Bun.CryptoHasher("sha1").update(JSON.stringify(B)).digest("hex")}async function S(j,B){try{if(!B.cachePath)return null;let z=X.resolve(B.cachePath),K=X.join(z,`${D(j)}.html`),I=X.join(z,`${D(j)}.meta.json`);if(!await q(K)||!await q(I))return null;let V=await Bun.file(I).text(),J=JSON.parse(V);if(J.cacheVersion!==B.cacheVersion)return null;if(J.optionsSignature!==k(B))return null;if((await M.promises.stat(j)).mtime.getTime()>J.mtime)return null;for(let Y of J.dependencies)if(await q(Y)){if((await M.promises.stat(Y)).mtime.getTime()>J.mtime)return null}else return null;return await Bun.file(K).text()}catch(z){return console.warn(`Cache error for ${j}:`,z),null}}async function _(j,B,z,K){try{if(!K.cachePath)return;let I=X.resolve(K.cachePath);await M.promises.mkdir(I,{recursive:!0});let V=X.join(I,`${D(j)}.html`),J=X.join(I,`${D(j)}.meta.json`),W=await M.promises.stat(j);await Bun.write(V,B);let Y={sourcePath:j,mtime:W.mtime.getTime(),dependencies:Array.from(z),cacheVersion:K.cacheVersion,optionsSignature:k(K),generatedAt:Date.now()};await Bun.write(J,JSON.stringify(Y,null,2)),y.set(j,{output:B,mtime:W.mtime.getTime(),dependencies:z})}catch(I){console.warn(`Failed to cache template ${j}:`,I)}}var b=16;function D(j){return new Bun.CryptoHasher("sha1").update(j).digest("hex").substring(0,b)}
|
|
3
|
+
export{y as kp,w as lp,A as mp,H as np,v as op,E as pp,F as qp,R as rp,S as sp,_ as tp,D as up};
|
|
@@ -3,4 +3,4 @@ import{existsSync as _,readFileSync as $}from"fs";var A={strict:!1,allowAny:!0,c
|
|
|
3
3
|
`),H=this.getLineNumber(j);for(let B=0;B<q.length;B++){let D=q[B],G=H+B;this.extractTypedVariables(D,G),this.extractInterfaces(D,q,B,G),this.extractTypeAliases(D,G)}}extractTypedVariables(z,j){let q=z.match(/(?:export\s+)?(?:const|let|var)\s+(\w+)\s*:\s*([^=]+?)\s*=/);if(q){let[,D,G]=q,J=this.parseTypeAnnotation(G.trim());this.variables.set(D,J);return}let H=z.match(/(?:export\s+)?(?:const|let|var)\s+(\w+)\s*=\s*(.+)/);if(H){let[,D,G]=H,J=this.inferType(G.trim());this.variables.set(D,J);return}let B=z.match(/(?:export\s+)?function\s+(\w+)\s*\(([^)]*)\)(?:\s*:\s*(\w+))?/);if(B){let[,D,G,J]=B,K=this.parseParams(G),Q=J?this.parseTypeAnnotation(J):{kind:"primitive",value:"any"};this.variables.set(D,{kind:"function",params:K,returnType:Q})}}extractInterfaces(z,j,q,H){let B=z.match(/(?:export\s+)?interface\s+(\w+)\s*\{/);if(B){let[,D]=B,G={},J=1,K=q+1;while(K<j.length&&J>0){let Q=j[K].trim();if(Q.includes("{"))J++;if(Q.includes("}"))J--;let U=Q.match(/(\w+)\??\s*:\s*([^;]+)/);if(U&&J>0){let[,W,V]=U;G[W]=this.parseTypeAnnotation(V.trim())}K++}this.variables.set(D,{kind:"object",name:D,properties:G})}}extractTypeAliases(z,j){let q=z.match(/(?:export\s+)?type\s+(\w+)\s*=\s*(.+)/);if(q){let[,H,B]=q,D=this.parseTypeAnnotation(B.trim());D.name=H,this.variables.set(H,D)}}parseTypeAnnotation(z){let j=z.trim();if(j.includes("|"))return{kind:"union",types:j.split("|").map((D)=>this.parseTypeAnnotation(D.trim()))};if(j.includes("&"))return{kind:"intersection",types:j.split("&").map((D)=>this.parseTypeAnnotation(D.trim()))};if(j.endsWith("[]"))return{kind:"array",elementType:this.parseTypeAnnotation(j.slice(0,-2))};let q=j.match(/^Array<(.+)>$/);if(q)return{kind:"array",elementType:this.parseTypeAnnotation(q[1])};if(j.startsWith("{")&&j.endsWith("}")){let B={},D=j.slice(1,-1).trim();if(D){let G=this.splitByComma(D);for(let J of G){let K=J.match(/(\w+)\??\s*:\s*(.+)/);if(K){let[,Q,U]=K;B[Q]=this.parseTypeAnnotation(U.trim())}}}return{kind:"object",properties:B}}if(j.startsWith('"')||j.startsWith("'"))return{kind:"literal",value:j.slice(1,-1)};if(/^\d+$/.test(j))return{kind:"literal",value:j};if(j==="true"||j==="false")return{kind:"literal",value:j};if(["string","number","boolean","null","undefined","any","unknown","void","never"].includes(j))return{kind:"primitive",value:j};if(this.variables.has(j))return this.variables.get(j);return{kind:"primitive",value:"any"}}inferType(z){let j=z.trim().replace(/;$/,"");if(j.startsWith('"')&&j.endsWith('"')||j.startsWith("'")&&j.endsWith("'")||j.startsWith("`")&&j.endsWith("`"))return{kind:"primitive",value:"string"};if(/^-?\d+(\.\d+)?$/.test(j))return{kind:"primitive",value:"number"};if(j==="true"||j==="false")return{kind:"primitive",value:"boolean"};if(j==="null")return{kind:"primitive",value:"null"};if(j==="undefined")return{kind:"primitive",value:"undefined"};if(j.startsWith("[")){let q=j.slice(1,-1).trim();if(q){let H=this.splitByComma(q)[0];if(H)return{kind:"array",elementType:this.inferType(H.trim())}}return{kind:"array",elementType:{kind:"primitive",value:"any"}}}if(j.startsWith("{")){let q={},H=this.extractObjectLiteral(j);for(let[B,D]of Object.entries(H))q[B]=this.inferType(D);return{kind:"object",properties:q}}if(j.includes("=>")){let q=j.match(/^\(([^)]*)\)\s*(?::\s*(\w+))?\s*=>/);if(q){let H=this.parseParams(q[1]),B=q[2]?this.parseTypeAnnotation(q[2]):{kind:"primitive",value:"any"};return{kind:"function",params:H,returnType:B}}}if(/^\w+$/.test(j)&&this.variables.has(j))return this.variables.get(j);if(j.includes("."))return this.resolvePropertyAccess(j);if(j.includes("(")){let q=j.split("(")[0],H=this.variables.get(q);if(H?.kind==="function"&&H.returnType)return H.returnType}return{kind:"primitive",value:"any"}}parseParams(z){if(!z.trim())return[];let j=[],q=this.splitByComma(z);for(let H of q){let B=H.trim(),D=B.includes("?"),G=B.match(/(\w+)\??\s*(?::\s*([^=]+))?(?:\s*=)?/);if(G){let[,J,K]=G,Q=K?this.parseTypeAnnotation(K.trim()):{kind:"primitive",value:"any"};j.push({name:J,type:Q,optional:D})}}return j}checkExpressions(z){let j=/\{\{([\s\S]*?)\}\}/g,q;while((q=j.exec(z))!==null){let B=q[1].trim(),D=q.index,G=this.getLineNumber(D,z),J=this.getColumn(D,z);if(!B)continue;if(B.startsWith("!")||B.endsWith("!"))continue;this.checkExpression(B,G,J)}let H=/\{!!([\s\S]*?)!!\}/g;while((q=H.exec(z))!==null){let B=q[1].trim(),D=q.index,G=this.getLineNumber(D,z),J=this.getColumn(D,z);if(!B)continue;this.checkExpression(B,G,J)}}checkExpression(z,j,q){if(z.includes("?")&&z.includes(":")){let D=z.split("?");this.checkExpression(D[0].trim(),j,q);let G=D.slice(1).join("?").split(":");if(G.length>=2)this.checkExpression(G[0].trim(),j,q),this.checkExpression(G.slice(1).join(":").trim(),j,q);return}for(let D of["&&","||","??"])if(z.includes(D)){z.split(D).forEach((J)=>this.checkExpression(J.trim(),j,q));return}for(let D of["===","!==","==","!=",">=","<=",">","<"])if(z.includes(D)){z.split(D).forEach((J)=>this.checkExpression(J.trim(),j,q));return}if(z.startsWith("!")){this.checkExpression(z.slice(1).trim(),j,q);return}if(this.isLiteral(z))return;let H=z.match(/^(\w+(?:\.\w+)*)\s*\(/);if(H){let D=H[1],G=this.resolvePropertyAccess(D);if(G.kind!=="function"&&G.value!=="any")this.addWarning(`'${D}' is not a function`,j,q,z);return}if(z.includes(".")){if(this.resolvePropertyAccess(z).value==="undefined"&&this.options.checkPropertyAccess)this.addWarning(`Property access '${z}' may be undefined`,j,q,z);return}let B=z.match(/^\w+/)?.[0];if(B&&!this.variables.has(B))this.addError(`Variable '${B}' is not defined`,j,q,z)}checkDirectives(z){let j=/@if\s*\(([^)]+)\)/g,q;while((q=j.exec(z))!==null){let G=q[1].trim(),J=q.index,K=this.getLineNumber(J,z),Q=this.getColumn(J,z);this.checkExpression(G,K,Q)}let H=/@foreach\s*\((\w+)\s+(?:as|in)\s+(\w+)(?:\s*,\s*(\w+))?\)/g;while((q=H.exec(z))!==null){let[,G,J,K]=q,Q=q.index,U=this.getLineNumber(Q,z),W=this.getColumn(Q,z);if(!this.variables.has(G))this.addError(`Collection '${G}' is not defined`,U,W,q[0]);else{let V=this.variables.get(G);if(V.kind==="array"&&V.elementType)this.variables.set(J,V.elementType);else this.variables.set(J,{kind:"primitive",value:"any"});if(K)this.variables.set(K,{kind:"primitive",value:"number"})}}let B=/@unless\s*\(([^)]+)\)/g;while((q=B.exec(z))!==null){let G=q[1].trim(),J=q.index,K=this.getLineNumber(J,z),Q=this.getColumn(J,z);this.checkExpression(G,K,Q)}let D=/@switch\s*\(([^)]+)\)/g;while((q=D.exec(z))!==null){let G=q[1].trim(),J=q.index,K=this.getLineNumber(J,z),Q=this.getColumn(J,z);this.checkExpression(G,K,Q)}}resolvePropertyAccess(z){let j=z.split("."),q=this.variables.get(j[0])||{kind:"primitive",value:"any"};for(let H=1;H<j.length;H++){let B=j[H].replace(/\(\)$/,"");if(q.kind==="object"&&q.properties)if(q.properties[B])q=q.properties[B];else if(!this.options.allowAny)return{kind:"primitive",value:"undefined"};else q={kind:"primitive",value:"any"};else if(q.kind==="array"&&q.elementType)if(["length"].includes(B))q={kind:"primitive",value:"number"};else if(["map","filter","find","forEach","some","every","reduce"].includes(B))q={kind:"function",returnType:{kind:"primitive",value:"any"}};else if(["join"].includes(B))q={kind:"function",returnType:{kind:"primitive",value:"string"}};else q={kind:"primitive",value:"any"};else if(q.kind==="primitive"&&q.value==="string")if(["length"].includes(B))q={kind:"primitive",value:"number"};else if(["toUpperCase","toLowerCase","trim","slice","substring"].includes(B))q={kind:"function",returnType:{kind:"primitive",value:"string"}};else if(["split"].includes(B))q={kind:"function",returnType:{kind:"array",elementType:{kind:"primitive",value:"string"}}};else q={kind:"primitive",value:"any"};else q={kind:"primitive",value:"any"}}return q}isLiteral(z){let j=z.trim();if(j.startsWith('"')&&j.endsWith('"')||j.startsWith("'")&&j.endsWith("'")||j.startsWith("`")&&j.endsWith("`"))return!0;if(/^-?\d+(\.\d+)?$/.test(j))return!0;if(j==="true"||j==="false")return!0;if(j==="null"||j==="undefined")return!0;return!1}extractObjectLiteral(z){let j={},q=z.slice(1,-1).trim();if(!q)return j;let H=this.splitByComma(q);for(let B of H){let D=B.indexOf(":");if(D>0){let G=B.slice(0,D).trim(),J=B.slice(D+1).trim();j[G]=J}}return j}splitByComma(z){let j=[],q="",H=0,B=null;for(let D=0;D<z.length;D++){let G=z[D],J=D>0?z[D-1]:"";if((G==='"'||G==="'"||G==="`")&&J!=="\\"){if(B===G)B=null;else if(!B)B=G}if(!B){if(G==="{"||G==="["||G==="(")H++;if(G==="}"||G==="]"||G===")")H--;if(G===","&&H===0){j.push(q.trim()),q="";continue}}q+=G}if(q.trim())j.push(q.trim());return j}getLineNumber(z,j){return((j||"").slice(0,z).match(/\n/g)||[]).length+1}getColumn(z,j){let H=j.slice(0,z).lastIndexOf(`
|
|
4
4
|
`);return z-H}addError(z,j,q,H,B,D){this.errors.push({message:z,file:this.currentFile,line:j,column:q,expression:H,expected:B,received:D,severity:"error"})}addWarning(z,j,q,H,B,D){let G={message:z,file:this.currentFile,line:j,column:q,expression:H,expected:B,received:D,severity:"warning"};if(this.options.strict)this.errors.push(G);else this.warnings.push(G)}getResult(){return{valid:this.errors.length===0,errors:this.errors,warnings:this.warnings,variables:new Map(this.variables)}}addVariable(z,j){this.variables.set(z,j)}reset(){if(this.errors=[],this.warnings=[],this.variables.clear(),this.options.includeBuiltins)Object.entries(X).forEach(([z,j])=>{this.variables.set(z,j)})}}function Z(z){return new Y(z)}function E(z,j){return Z(j).checkFile(z)}function I(z,j){return Z(j).checkTemplate(z)}function L(z){let j=[];for(let q of z.errors){if(j.push(`\x1B[31merror\x1B[0m: ${q.message}`),j.push(` --> ${q.file}:${q.line}:${q.column}`),q.expression)j.push(" |"),j.push(` | ${q.expression}`),j.push(" |");if(q.expected&&q.received)j.push(` expected: ${q.expected}`),j.push(` received: ${q.received}`);j.push("")}for(let q of z.warnings){if(j.push(`\x1B[33mwarning\x1B[0m: ${q.message}`),j.push(` --> ${q.file}:${q.line}:${q.column}`),q.expression)j.push(" |"),j.push(` | ${q.expression}`),j.push(" |");j.push("")}if(z.valid)j.push("\x1B[32m\u2713 No type errors found\x1B[0m");else j.push(`\x1B[31m\u2717 Found ${z.errors.length} error(s) and ${z.warnings.length} warning(s)\x1B[0m`);return j.join(`
|
|
5
5
|
`)}
|
|
6
|
-
export{Y as
|
|
6
|
+
export{Y as Af,Z as Bf,E as Cf,I as Df,L as Ef};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
function D(j){return j}class F{plugins=new Map;sortedPlugins=[];initialized=!1;async register(j,q){if(this.plugins.has(j.name))throw Error(`Plugin "${j.name}" is already registered`);if(j.dependencies){for(let w of j.dependencies)if(!this.plugins.has(w))throw Error(`Plugin "${j.name}" depends on "${w}" which is not registered`)}if(this.plugins.set(j.name,j),j.onRegister)await j.onRegister(q);this.sortPlugins()}async unregister(j){let q=this.plugins.get(j);if(!q)return!1;for(let[w,z]of this.plugins)if(z.dependencies?.includes(j))throw Error(`Cannot unregister "${j}" because "${w}" depends on it`);if(q.onUnregister)await q.onUnregister();return this.plugins.delete(j),this.sortPlugins(),!0}get(j){return this.plugins.get(j)}has(j){return this.plugins.has(j)}getAll(){return[...this.sortedPlugins]}getAllDirectives(){let j=[];for(let q of this.sortedPlugins)if(q.registerDirectives)j.push(...q.registerDirectives());return j}getAllFilters(){let j={};for(let q of this.sortedPlugins)if(q.registerFilters)Object.assign(j,q.registerFilters());return j}async runBeforeProcess(j){return this.runHooks("beforeProcess",j)}async runAfterParse(j){return this.runHooks("afterParse",j)}async runBeforeDirective(j,q){return this.runDirectiveHooks("beforeDirective",j,q)}async runAfterDirective(j,q){return this.runDirectiveHooks("afterDirective",j,q)}async runBeforeRender(j){return this.runHooks("beforeRender",j)}async runAfterRender(j){return this.runHooks("afterRender",j)}async runOnError(j){for(let q of this.sortedPlugins)if(q.onError)try{let w=await q.onError(j);if(w){if(w.template!==void 0)j.template=w.template;if(w.context)j.context={...j.context,...w.context};if(w.metadata)j.metadata={...j.metadata,...w.metadata};if(w.skip)return j}}catch(w){console.error(`Error in plugin "${q.name}" onError hook:`,w)}return null}sortPlugins(){this.sortedPlugins=Array.from(this.plugins.values()).sort((j,q)=>(j.priority??100)-(q.priority??100))}async runHooks(j,q){let w={...q};for(let z of this.sortedPlugins){let B=z[j];if(B)try{let y=await B(w);if(y){if(y.template!==void 0)w.template=y.template;if(y.context)w.context={...w.context,...y.context};if(y.metadata)w.metadata={...w.metadata,...y.metadata};if(y.skip)break}}catch(y){console.error(`Error in plugin "${z.name}" ${j} hook:`,y)}}return w}async runDirectiveHooks(j,q,w){let z={...w};for(let B of this.sortedPlugins){let y=B[j];if(y)try{let A=await y(q,z);if(A){if(A.template!==void 0)z.template=A.template;if(A.context)z.context={...z.context,...A.context};if(A.metadata)z.metadata={...z.metadata,...A.metadata};if(A.skip)break}}catch(A){console.error(`Error in plugin "${B.name}" ${j} hook:`,A)}}return z}}var G=new F;function H(j,q,w={}){return{name:j,...w,registerDirectives:()=>q}}function I(j,q,w={}){return{name:j,...w,registerFilters:()=>q}}var J=D({name:"stx-debug",version:"1.0.0",description:"Logs all plugin lifecycle events for debugging",priority:0,beforeProcess(j){console.log("[stx-debug] beforeProcess:",j.filePath)},afterParse(j){console.log("[stx-debug] afterParse:",j.template.length,"chars")},beforeDirective(j,q){console.log("[stx-debug] beforeDirective:",j)},afterDirective(j,q){console.log("[stx-debug] afterDirective:",j)},beforeRender(j){console.log("[stx-debug] beforeRender")},afterRender(j){console.log("[stx-debug] afterRender:",j.template.length,"chars")},onError(j){console.error("[stx-debug] onError:",j.error.message,"in phase:",j.phase)}}),K=D({name:"stx-timing",version:"1.0.0",description:"Measures template processing time",priority:1,beforeProcess(j){j.metadata.startTime=performance.now()},afterRender(j){let q=j.metadata.startTime;if(q){let w=performance.now()-q;console.log(`[stx-timing] Processing took ${w.toFixed(2)}ms`)}}});function L(j){return D({name:"stx-variables",version:"1.0.0",description:"Adds predefined variables to template context",beforeProcess(q){return{context:{...q.context,...j}}}})}
|
|
3
|
-
export{D as
|
|
3
|
+
export{D as lj,F as mj,G as nj,H as oj,I as pj,J as qj,K as rj,L as sj};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
class J{source;pos=0;line=1;column=0;tokens=[];constructor(b){this.source=b}tokenize(){this.tokens=[],this.pos=0,this.line=1,this.column=0;while(this.pos<this.source.length){let b=this.nextToken();if(b)this.tokens.push(b)}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 b=this.pos,w=this.line,j=this.column,v=this.source[this.pos];if(/\s/.test(v))return this.readWhitespace(b,w,j);if(v==="/"&&this.peek(1)==="/")return this.readLineComment(b,w,j);if(v==="/"&&this.peek(1)==="*")return this.readBlockComment(b,w,j);if(v==='"'||v==="'")return this.readString(v,b,w,j);if(v==="`")return this.readTemplateString(b,w,j);if(/\d/.test(v)||v==="."&&/\d/.test(this.peek(1)||""))return this.readNumber(b,w,j);if(/[a-z_$]/i.test(v))return this.readIdentifier(b,w,j);if(v==="{"){if(this.peek(1)==="{"&&this.peek(2)==="{")return this.advance(3),{type:"RAW_START",value:"{{{",start:b,end:this.pos,line:w,column:j};if(this.peek(1)==="{")return this.advance(2),{type:"EXPRESSION_START",value:"{{",start:b,end:this.pos,line:w,column:j};if(this.peek(1)==="!"&&this.peek(2)==="!")return this.advance(3),{type:"RAW_START",value:"{!!",start:b,end:this.pos,line:w,column:j}}if(v==="}"){if(this.peek(1)==="}"&&this.peek(2)==="}")return this.advance(3),{type:"RAW_END",value:"}}}",start:b,end:this.pos,line:w,column:j};if(this.peek(1)==="}")return this.advance(2),{type:"EXPRESSION_END",value:"}}",start:b,end:this.pos,line:w,column:j}}if(v==="!"&&this.peek(1)==="!"&&this.peek(2)==="}")return this.advance(3),{type:"RAW_END",value:"!!}",start:b,end:this.pos,line:w,column:j};if(v==="@"&&/[a-z]/i.test(this.peek(1)||""))return this.readDirective(b,w,j);let z=["===","!==","==","!=","<=",">=","&&","||","??","++","--","+=","-=","*=","/=","%=","**","=>","?.","...","<<",">>",">>>","&=","|=","^="];for(let B of z)if(this.source.slice(this.pos,this.pos+B.length)===B)return this.advance(B.length),{type:"OPERATOR",value:B,start:b,end:this.pos,line:w,column:j};if(/[+\-*/%<>=!&|^~?:]/.test(v))return this.advance(),{type:"OPERATOR",value:v,start:b,end:this.pos,line:w,column:j};if(/[()[\]{},;.]/.test(v))return this.advance(),{type:"PUNCTUATION",value:v,start:b,end:this.pos,line:w,column:j};return this.advance(),{type:"PUNCTUATION",value:v,start:b,end:this.pos,line:w,column:j}}readWhitespace(b,w,j){while(this.pos<this.source.length&&/\s/.test(this.source[this.pos]))this.advance();return{type:"WHITESPACE",value:this.source.slice(b,this.pos),start:b,end:this.pos,line:w,column:j}}readLineComment(b,w,j){this.advance(2);while(this.pos<this.source.length&&this.source[this.pos]!==`
|
|
3
3
|
`)this.advance();return{type:"COMMENT",value:this.source.slice(b,this.pos),start:b,end:this.pos,line:w,column:j}}readBlockComment(b,w,j){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(b,this.pos),start:b,end:this.pos,line:w,column:j}}readString(b,w,j,v){this.advance();while(this.pos<this.source.length){let z=this.source[this.pos];if(z==="\\"){this.advance(2);continue}if(z===b){this.advance();break}this.advance()}return{type:"STRING",value:this.source.slice(w,this.pos),start:w,end:this.pos,line:j,column:v}}readTemplateString(b,w,j){this.advance();let v=0,z=256;while(this.pos<this.source.length){let B=this.source[this.pos];if(B==="\\"){this.advance(2);continue}if(B==="$"&&this.peek(1)==="{"){if(v>=z){this.pos=this.source.length;break}this.advance(2),v++;continue}if(B==="{"&&v>0){v++,this.advance();continue}if(B==="}"&&v>0){v--,this.advance();continue}if(B==="`"&&v===0){this.advance();break}this.advance()}return{type:"TEMPLATE_STRING",value:this.source.slice(b,this.pos),start:b,end:this.pos,line:w,column:j}}readNumber(b,w,j){if(this.source[this.pos]==="0"){let v=this.peek(1)?.toLowerCase();if(v==="x"||v==="o"||v==="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(b,this.pos),start:b,end:this.pos,line:w,column:j}}}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(b,this.pos),start:b,end:this.pos,line:w,column:j}}readIdentifier(b,w,j){while(this.pos<this.source.length&&/[\w$]/.test(this.source[this.pos]))this.advance();return{type:"IDENTIFIER",value:this.source.slice(b,this.pos),start:b,end:this.pos,line:w,column:j}}readDirective(b,w,j){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(b,this.pos),start:b,end:this.pos,line:w,column:j}}advance(b=1){for(let w=0;w<b&&this.pos<this.source.length;w++){if(this.source[this.pos]===`
|
|
4
4
|
`)this.line++,this.column=0;else this.column++;this.pos++}}peek(b){return this.source[this.pos+b]}saveState(){return{pos:this.pos,line:this.line,column:this.column}}restoreState(b){this.pos=b.pos,this.line=b.line,this.column=b.column}}function K(b,w,j,v=0){let z=0,B=v,y=null,D=0,H=!1;while(B<b.length){let F=b[B];if(y&&H){H=!1,B++;continue}if(y&&F==="\\"){H=!0,B++;continue}if(H=!1,(F==='"'||F==="'"||F==="`")&&!y){y=F,B++;continue}if(F===y&&y!=="`"){y=null,B++;continue}if(y==="`"&&F==="$"&&b[B+1]==="{"){D++,B+=2;continue}if(D>0&&F==="}"){D--,B++;continue}if(F==="`"&&y==="`"&&D===0){y=null,B++;continue}if(y){B++;continue}if(F===w)z++;else if(F===j){if(z--,z===0)return B}B++}return-1}function O(b,w){let j=w,v={paren:0,bracket:0,brace:0},z=null,B=0;while(j<b.length){let y=b[j];if((j>0?b[j-1]:"")==="\\"&&z){j++;continue}if((y==='"'||y==="'")&&!z){z=y,j++;continue}if(y===z&&z!=="`"){z=null,j++;continue}if(y==="`"&&!z){z="`",j++;continue}if(y==="`"&&z==="`"&&B===0){z=null,j++;continue}if(z==="`"&&y==="$"&&b[j+1]==="{"){B++,j+=2;continue}if(B>0){if(y==="{")B++;else if(y==="}")B--;j++;continue}if(z){j++;continue}if(v.paren===0&&v.bracket===0&&v.brace===0){if(b.slice(j,j+2)==="}}"||b.slice(j,j+3)==="!!}")break;if(y===","||y===";")break}if(y==="(")v.paren++;else if(y===")"){if(v.paren--,v.paren<0)break}else if(y==="[")v.bracket++;else if(y==="]"){if(v.bracket--,v.bracket<0)break}else if(y==="{")v.brace++;else if(y==="}"){if(v.brace--,v.brace<0)break}j++}return{expression:b.slice(w,j),endPos:j}}function Q(b){let w=[],j="",v={paren:0,bracket:0,brace:0},z=null,B=0;for(let y=0;y<b.length;y++){let D=b[y];if((y>0?b[y-1]:"")==="\\"&&z){j+=D;continue}if((D==='"'||D==="'")&&!z){z=D,j+=D;continue}if(D===z&&z!=="`"){z=null,j+=D;continue}if(D==="`"&&!z){z="`",j+=D;continue}if(D==="`"&&z==="`"&&B===0){z=null,j+=D;continue}if(z==="`"&&D==="$"&&b[y+1]==="{"){B++,j+=D+b[y+1],y++;continue}if(B>0&&D==="{"){B++,j+=D;continue}if(B>0&&D==="}"){B--,j+=D;continue}if(z){j+=D;continue}if(D==="(")v.paren++;else if(D===")")v.paren--;else if(D==="[")v.bracket++;else if(D==="]")v.bracket--;else if(D==="{")v.brace++;else if(D==="}")v.brace--;if(D==="|"&&b[y+1]!=="|"&&(y===0||b[y-1]!=="|")&&b[y-1]!=="\\"&&v.paren===0&&v.bracket===0&&v.brace===0){w.push(j.trim()),j="";continue}if(D==="|"&&b[y-1]==="\\"&&!z){j=j.slice(0,-1)+D;continue}j+=D}if(j.trim())w.push(j.trim());return w}
|
|
5
|
-
export{J as
|
|
5
|
+
export{J as gy,K as hy,O as iy,Q as jy};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import y from"net";async function z(j){return new Promise((q)=>{let k=y.createServer();k.once("error",()=>q(!1)),k.once("listening",()=>{k.close(()=>q(!0))}),k.listen(j,"0.0.0.0")})}async function B(j){return new Promise((q)=>{let k=y.createServer();k.once("error",()=>q(!1)),k.once("listening",()=>{k.close(()=>q(!0))}),k.listen(j,"::")})}async function C(j){if(!await z(j))return!1;return await B(j)}async function D(j,q=20){j=Number(j);for(let k=0;k<q;k++){let u=j+k;if(await C(u))return u}throw Error(`Could not find an available port between ${j} and ${j+q-1}`)}var H=3000;async function J(j){let q=j.end-j.start+1;return D(j.start,q)}
|
|
3
|
-
export{C as
|
|
3
|
+
export{C as jo,D as ko,H as lo,J as mo};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
function u(b,...x){for(let j of x){if(b.serverDynamic[j]!==void 0)return String(b.serverDynamic[j]);let q=b.static[j];if(typeof q==="string")return q}return}var E={name:"TransitionGroup",aliases:["transition-group"],render(b,x,j){let q=(u(b,"name")||"v").replace(/["'<>]/g,""),z=(u(b,"tag")||"div").replace(/[^a-z0-9-]/gi,"")||"div",A=u(b,"class"),B=u(b,"id"),D=[`data-stx-transition-group="${q}"`,A?`class="${A}"`:"",B?`id="${B}"`:""].filter(Boolean).join(" ");return`<${z} ${D}>${x}</${z}>`}};
|
|
3
|
-
export{E as
|
|
3
|
+
export{E as dz};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import G from"path";var L=new Set([".jpg",".jpeg",".png",".gif"]),O=[{ext:".avif",mime:"image/avif"},{ext:".webp",mime:"image/webp"}];async function M(j,z){let H=z.formats??O;if(!z.publicDir)return j;let C=N(j),J=[],Y=/<img\b[^>]*?>/gi,K=[],Q;while((Q=Y.exec(j))!==null){let q=Q[0],y=q.match(/\bsrc=["']([^"']+)["']/i);if(!y)continue;if(_(Q.index,C))continue;K.push({idx:Q.index,length:q.length,src:y[1],raw:q})}if(K.length===0)return j;let Z=await Promise.all(K.map(async(q)=>{let y=await X(q.src,z.publicDir,H);return{match:q,sources:y}}));for(let{match:q,sources:y}of Z){if(y.length===0)continue;let I=`<picture>${y.map(($)=>`<source type="${$.mime}" srcset="${w($.url)}">`).join("")}${q.raw}</picture>`;J.push({start:q.idx,end:q.idx+q.length,replacement:I})}if(J.length===0)return j;let V="",W=0;for(let q of J)V+=j.slice(W,q.start),V+=q.replacement,W=q.end;return V+=j.slice(W),V}async function X(j,z,H){if(!F(j))return[];let C=G.extname(j).toLowerCase();if(!L.has(C))return[];if(!j.startsWith("/"))return[];let J=G.join(z,j.slice(1)),Y=G.dirname(J),K=G.basename(J,C),Q=G.resolve(Y),Z=G.resolve(z);if(!Q.startsWith(Z))return[];let V=G.posix.dirname(j),W=H.map(async(y)=>{let k=G.join(Y,`${K}${y.ext}`);if(!await Bun.file(k).exists())return null;return{url:G.posix.join(V,`${K}${y.ext}`),mime:y.mime}});return(await Promise.all(W)).filter((y)=>y!==null)}function F(j){if(!j)return!1;if(j.startsWith("http://")||j.startsWith("https://"))return!1;if(j.startsWith("//"))return!1;if(j.startsWith("data:"))return!1;return!0}function N(j){let z=[],H=/<picture\b[^>]*>[\s\S]*?<\/picture>/gi,C;while((C=H.exec(j))!==null)z.push([C.index,C.index+C[0].length]);return z}function _(j,z){for(let[H,C]of z)if(j>=H&&j<C)return!0;return!1}function w(j){return j.replace(/&/g,"&").replace(/"/g,""")}
|
|
3
|
-
export{M as
|
|
3
|
+
export{M as Am};
|
|
@@ -11,4 +11,4 @@ ${z}
|
|
|
11
11
|
</head>`);return q+j;case"body-start":if(j.includes("<body"))return j.replace(/(<body[^>]*>)/,`$1
|
|
12
12
|
${q}`);return q+j;case"body-end":{let F=j.lastIndexOf("</body>");if(F!==-1)return j.slice(0,F)+q+`
|
|
13
13
|
`+j.slice(F);return j+q}default:return j}}function A(j){return j.trim()}
|
|
14
|
-
export{w as
|
|
14
|
+
export{w as nt,K as ot,W as pt,B as qt,A as rt};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{aw as s,dw as a,ew as i}from"./chunk-bykjk6vj.js";import{hy as I}from"./chunk-mrehzhxv.js";import{Vy as c}from"./chunk-q60knhjf.js";import{rz as v}from"./chunk-adqh2m9z.js";import{rB as f}from"./chunk-3jm3snz8.js";import k from"path";import y from"process";function NQ(H){let Q=[],Z=0,z=H.split(`
|
|
3
3
|
`);for(let X of z){let Y=Z,$=null,_=!1;for(let J=0;J<X.length;J++){let G=X[J];if(_){_=!1;continue}if(G==="\\"){_=!0;continue}if($){if(G===$)$=null;continue}if(G==="'"||G==='"'||G==="`"){$=G;continue}if(G==="/"&&J+1<X.length&&X[J+1]==="/")break;if(G==="{")Z++;else if(G==="}")Z--}if(Y===0){let J=X.match(/(?:const|let|var)\s+(\w+)\s*=/);if(J)Q.push(J[1]);else if(/^\s*(?:const|let|var)\s+\w+\s*;?\s*$/.test(X)){let G=X.match(/(?:const|let|var)\s+(\w+)/);if(G)Q.push(G[1])}else{let G=X.match(/(?:const|let|var)\s+(\{[^}]+\}|\[[^\]]+\])\s*=/);if(G){let B=G[1].slice(1,-1).split(",").map((R)=>{let F=R.split(":");return(F.length>1?F[1]:F[0]).trim()}).filter((R)=>/^\w+$/.test(R));Q.push(...B)}}}}return[...new Set(Q)]}function EQ(H){let Q=H;Q=Q.replace(/^\s*import\s+.*?from\s+['"][^'"]+['"]\s*;?\s*$/gm,""),Q=Q.replace(/^\s*import\s+['"][^'"]+['"]\s*;?\s*$/gm,""),Q=Q.replace(/^\s*interface\s+\w+\s*\{[\s\S]*?\n\}\s*$/gm,""),Q=Q.replace(/^\s*type\s+\w+\s*=[\s\S]*?(?=\n(?:const|let|var|function|export|interface|type|$))/gm,""),Q=Q.replace(/^(\s*(?:export\s+)?(?:const|let|var)\s+)(\w+|\{[^}]+\}|\[[^\]]+\])\s*:\s*[^=]+(\s*=)/gm,"$1$2$3");function Z(z){if(!z.includes(":"))return z;let X=[],Y="",$=0,_=0,J=null;for(let G=0;G<z.length;G++){let W=z[G];if(J){if(Y+=W,W===J)J=null;continue}if(W==='"'||W==="'"||W==="`"){J=W,Y+=W;continue}if(W==="<")$++;else if(W===">"&&$>0)$--;else if(W==="(")_++;else if(W===")")_--;if(W===","&&$===0&&_===0){X.push(Y),Y="";continue}Y+=W}if(Y)X.push(Y);return X.map((G)=>{let W=G.trim(),B=W.startsWith("..."),R=B?W.slice(3):W,F=-1,q=0;for(let N=0;N<R.length;N++)if(R[N]==="<")q++;else if(R[N]===">")q--;else if(R[N]===":"&&q===0){F=N;break}if(F===-1)return G;let M=R.substring(0,F).trim().replace(/\?$/,""),V=R.substring(F+1),b=-1,L=0;for(let N=0;N<V.length;N++)if(V[N]==="<")L++;else if(V[N]===">")L--;else if(V[N]==="="&&L===0){b=N;break}let D=B?"...":"";if(b!==-1)return`${D}${M} = ${V.substring(b+1).trim()}`;return`${D}${M}`}).join(", ")}Q=Q.replace(/\b(function\s+\w*\s*)\(([^)]*)\)/g,(z,X,Y)=>{if(!Y.includes(":"))return z;return`${X}(${Z(Y)})`});{let z=/\b(function\s+\w*\s*)\(/g,X,Y=[];while((X=z.exec(Q))!==null){let $=X.index+X[0].length-1,_=1,J=$+1,G=0,W=null;while(J<Q.length&&_>0){let F=Q[J];if(W){if(F===W)W=null;J++;continue}if(F==='"'||F==="'"||F==="`"){W=F,J++;continue}if(F==="<")G++;else if(F===">"&&G>0)G--;else if(G===0){if(F==="(")_++;else if(F===")")_--}if(_>0)J++}if(_!==0)continue;let B=Q.substring($+1,J);if(!B.includes(":"))continue;let R=Z(B);Y.push({start:$+1,end:J,replacement:R})}for(let $=Y.length-1;$>=0;$--){let{start:_,end:J,replacement:G}=Y[$];Q=Q.substring(0,_)+G+Q.substring(J)}}return Q=Q.replace(/\(([^)]*)\)\s*(?::\s*[^=]+)?\s*=>/g,(z,X)=>{if(!X.includes(":"))return z;if(X.includes("{")||X.includes("}"))return z;return`(${X.split(",").map(($)=>{let[_,...J]=$.split("="),G=_.split(":")[0].trim();if(J.length>0)return`${G} = ${J.join("=").trim()}`;return G}).join(", ")}) =>`}),Q=Q.replace(/(\))\s*:\s*([A-Z]\w*|void|string|number|boolean|any|unknown|never|null|undefined)(?:<[^>]+>)?(?:\s*\|\s*(?:[A-Z]\w*|void|string|number|boolean|any|unknown|never|null|undefined))*\s*(\{)/g,"$1$3"),Q=Q.replace(/(\b(?:function|class|interface|type|extends|implements)\s+\w+)\s*<[^<>()]*>/g,"$1"),Q=Q.replace(/(\b(?:defineProps|withDefaults|defineEmits|defineSlots|Array|Promise|Map|Set|Record|Partial|Required|Readonly|Pick|Omit|Exclude|Extract))\s*<[^<>()]*>/g,"$1"),Q=Q.replace(/(\w+)\s*<[A-Z][^<>()]*>\s*(?=\()/g,"$1"),Q=Q.replace(/\s+as\s+(?:const|[A-Za-z]\w*(?:\[\])?(?:\s*\|\s*\w+(?:\[\])?)*)/g,""),Q=Q.replace(/\s+satisfies\s+\w+(?:<[^>]*>)?/g,""),Q=Q.replace(/(\w|\)|\])\s*!(?!=)/g,"$1"),Q=Q.replace(/^\s*(?:export\s+)?(?:const\s+)?enum\s+\w+\s*\{[^}]*\}\s*$/gm,""),Q=Q.replace(/(?<=[\s=,(])<[A-Z]\w*(?:\[\])?>/g,""),Q=Q.replace(/\n\s*\n\s*\n/g,`
|
|
4
4
|
|
|
5
5
|
`),Q}async function xQ(H,Q,Z,z={}){if(!H.trim())return;let X;try{let U=new Bun.Transpiler({loader:"ts",target:"browser",define:c()}),A=H.replace(/^\s*import\s+\w+\s+from\s+['"][^'"]*\.stx['"]\s*;?\s*$/gm,"");A=A.replace(/^\s*import\s+['"][^'"]*\.stx['"]\s*;?\s*$/gm,""),X=U.transformSync(A)}catch{X=EQ(H)}let Y={exports:{}},$=Y.exports,_=y.cwd(),J={},G=[...X.matchAll(/require\s*\(\s*['"]([^'"]+)['"]\s*\)/g)||[]].map((U)=>U[1]).filter((U)=>!U.startsWith("node:")&&!U.startsWith(".")&&!["fs","path","os","child_process","crypto","http","https","url","util","stream","events","buffer","net","querystring","zlib","tls"].includes(U));for(let U of G)try{let A=k.resolve(_,"node_modules",U),O=k.join(A,"package.json"),T=JSON.parse(f("fs").readFileSync(O,"utf8")),w=T.main||"index.js";if(T.exports){let j=typeof T.exports==="string"?T.exports:T.exports["."];if(typeof j==="string")w=j;else if(j?.bun)w=j.bun;else if(j?.import)w=j.import;else if(j?.default)w=j.default}J[U]=await import(k.resolve(A,w))}catch{}let W=(U)=>{if(J[U])return J[U];return f(U)},B=Q.props||{},R=(U)=>{if(!U)return B;let A={};for(let[O,T]of Object.entries(U)){let w=B[O];if(w!==void 0)A[O]=w;else if(typeof T==="function")A[O]=T();else A[O]=T}return A};for(let[U,A]of Object.entries(B))Object.defineProperty(R,U,{value:A,enumerable:!0,configurable:!0,writable:!0});let F=(U)=>{if(!U)return B;let A={...B};for(let[O,T]of Object.entries(U)){let w=T&&typeof T==="object"&&!Array.isArray(T)?T:{type:T};if(A[O]===void 0&&w.default!==void 0)A[O]=typeof w.default==="function"?w.default():w.default}return A},q=()=>Q.slots||{},E=(U,A)=>{let O={...U};for(let[T,w]of Object.entries(A))if(O[T]===void 0)if(typeof w==="function")O[T]=w();else O[T]=w;return O},M=(U)=>{let A=()=>U;return A.set=(O)=>{},A.update=(O)=>{},A},V=(U)=>{let A,O=!1;return()=>{if(!O)try{A=U(),O=!0}catch{A=void 0}return A}},b=(U)=>{},L=(U)=>U(),D=(U)=>{},N=(U)=>{},S=(U)=>{},e=()=>{let U=Q.__stxServeContext,A=Q.__stxServeSearch??U?.search??"",O=U?.path??"";return{params:Q.params??{},query:Object.fromEntries(new URLSearchParams(A)),path:O,name:"",fullPath:O+A,hash:"",matched:[]}},QQ=()=>({push:(U)=>{},replace:(U)=>{},back:()=>{},forward:()=>{},go:(U)=>{}}),XQ=(U)=>{a(U);let A=Q.__stx_runtime_head||{},O=U||{};Q.__stx_runtime_head={...A,...O.title&&{title:O.title},meta:[...A.meta||[],...O.meta||[]],link:[...A.link||[],...O.link||[]],script:[...A.script||[],...O.script||[]],htmlAttrs:{...A.htmlAttrs||{},...O.htmlAttrs||{}},bodyAttrs:{...A.bodyAttrs||{},...O.bodyAttrs||{}}}},YQ=(U)=>{i(U);let A=s();Q.__stx_runtime_head={...Q.__stx_runtime_head||{},...A.title&&{title:A.title},meta:A.meta?[...A.meta]:[]}},ZQ=(U)=>({value:U}),zQ=(U)=>U,GQ=(U)=>({value:typeof U==="function"?U():U}),$Q=(U,A)=>{},HQ=(U)=>{},UQ=(U)=>{},_Q=(U)=>U?U():Promise.resolve(),JQ=(U)=>(A,...O)=>{},WQ=(U)=>{},AQ=(U,A)=>{},BQ=(U,A)=>A,FQ=()=>({value:"light"}),OQ=()=>({value:!1}),C={siteId:void 0,API_ENDPOINT:"",ANALYTICS_SITE_ID:void 0,location:{href:"",pathname:"",search:"",hash:"",origin:"",host:"",hostname:"",protocol:"https:",assign:()=>{},replace:()=>{},reload:()=>{}},localStorage:{getItem:()=>null,setItem:()=>{},removeItem:()=>{},clear:()=>{}},sessionStorage:{getItem:()=>null,setItem:()=>{},removeItem:()=>{},clear:()=>{}},fetch:globalThis.fetch,addEventListener:()=>{},removeEventListener:()=>{},setTimeout:()=>0,clearTimeout:()=>{},setInterval:()=>0,clearInterval:()=>{},requestAnimationFrame:()=>0,cancelAnimationFrame:()=>{},alert:()=>{},confirm:()=>!1,prompt:()=>null,getComputedStyle:()=>({}),matchMedia:()=>({matches:!1,addListener:()=>{},removeListener:()=>{}}),getDateRangeParams:()=>"",stx:{}},RQ=new Proxy(C,{get(U,A){if(A in U)return U[A];return},set(U,A,O){return U[A]=O,!0}}),KQ={getElementById:()=>null,querySelector:()=>null,querySelectorAll:()=>[],createElement:()=>({}),createTextNode:()=>({}),body:{},head:{},documentElement:{},addEventListener:()=>{},removeEventListener:()=>{}},qQ=console;try{let U=MQ(X,Z),A=new Set(Object.keys(B)),O=Object.keys(Q).filter((K)=>!A.has(K)&&K!=="props"),T=O.map((K)=>Q[K]),w=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","finally","for","function","if","import","in","instanceof","let","new","return","super","switch","this","throw","try","typeof","var","void","while","with","yield","enum","await","async","module","exports","require","params","window","document","console","state","derived","effect"]),j=[],x=[];for(let[K,P]of Object.entries(B)){if(!/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(K))continue;if(w.has(K))continue;if(new RegExp(`(?:^|[\\s;{])(?:const|let|var|function)\\s+${K}\\b`).test(U))continue;j.push(K),x.push(P)}let TQ=NQ(U).map((K)=>`module.exports.${K} = typeof ${K} !== 'undefined' ? ${K} : module.exports.${K};`).join(`
|
|
@@ -18,4 +18,4 @@ ${H[J]}`,J++;else break}return _=_.trim().replace(/;$/,""),{type:X,name:Y,value:
|
|
|
18
18
|
${Y}`,X++}while(X<H.length){let Y=H[X].trim();if(Y.startsWith(".")||Y.startsWith("?."))z+=`
|
|
19
19
|
${H[X]}`,X++;else break}return{value:z,nextIndex:X}}function LQ(H,Q,Z){let z=Z,X=Q+1;while(X<H.length){let Y=z.indexOf("{");if(Y!==-1){if(I(z,"{","}",Y)!==-1)break}let $=H[X];z+=`
|
|
20
20
|
${$}`,X++}return{functionCode:z,nextIndex:X}}function o(H,Q){let Z=v(H,Q)??v(`(${H})`,Q);if(Z!==void 0)return Z;if(!/\bprocess\b/.test(H))return;let z={...Q,process:Object.freeze({env:{...y.env}})};try{return Function(...Object.keys(z),`'use strict'; return (${H});`)(...Object.values(z))}catch{try{return Function(...Object.keys(z),`'use strict'; return ${H};`)(...Object.values(z))}catch{return}}}async function DQ(H,Q,Z){let z=H.matchAll(/export\s+(const|let|var)\s+(\w+)\s*=\s*([\s\S]*?)(?=\s*(?:export\s+|$))/g);for(let Y of z){let[,,$,_]=Y;try{let J=_.trim().replace(/;$/,""),G=o(J,Q);if(G!==void 0)Q[$]=G}catch(J){console.warn(`Failed to parse export ${$} in fallback:`,J)}}let X=H.matchAll(/(?:^|\n)\s*(const|let|var)\s+(\w+)\s*=\s*([\s\S]*?)(?=\s*(?:(?:const|let|var|function|export)\s+|$))/g);for(let Y of X){let[,,$,_]=Y;if(!($ in Q))try{let J=_.trim().replace(/;$/,""),G=o(J,Q);if(G!==void 0)Q[$]=G}catch{}}}function hQ(H){let Q=H.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i),Z=Q?Q[1]:"",z=Q?H.replace(/<script\b[^>]*>[\s\S]*?<\/script>/i,""):H;return{scriptContent:Z,templateWithoutScript:z}}function mQ(H){let Q=H.trim();if(!Q)return!1;return/(?:const|let|var|function)\s+\w+/.test(Q)}
|
|
21
|
-
export{EQ as
|
|
21
|
+
export{EQ as dt,xQ as et,MQ as ft,hQ as gt,mQ as ht};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Rq as E}from"./chunk-6djgb0hr.js";import{rB as f}from"./chunk-3jm3snz8.js";import D from"path";import{extractLayoutMetadata as p}from"stx-router/layout-metadata";var P="stx-page-head:",R=/<!--stx-page-head:([A-Za-z0-9+/=]+)-->\n?/,H=null;function M(){if(H!==null)return H;try{let{getRouterScript:z}=f("stx-router");H=`<script>${z()}</script>`}catch{H=""}return H}async function x(z,X){if(X===!1)return null;if(X&&typeof X==="string"){let J=D.resolve(z,X);if(await Bun.file(J).exists())return J;return null}let w=D.join(z,"app.stx");if(await Bun.file(w).exists())return w;return null}async function y(z,X){try{let w=await Bun.file(z).text(),J=w,Y=w.match(/<template\b[^>]*>([\s\S]*?)<\/template>/i);if(Y)J=Y[1].trim();let N=E(w),V=[...N.client.map((Q)=>Q.fullTag),...N.signals.map((Q)=>Q.fullTag)],F=[],Z=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,$;while(($=Z.exec(w))!==null)F.push($[0]);let B=J;for(let Q of N.server)B=B.replace(Q.fullTag,"");for(let Q of N.client)B=B.replace(Q.fullTag,"");B=B.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let j="<!--__STX_PAGE_SLOT__-->";if(B=B.replace(/<slot\s*\/>/gi,j).replace(/<slot\s*>\s*<\/slot>/gi,j),!B.includes(j))return console.warn(`[stx] Shell ${z} has no <slot /> \u2014 pages won't be injected`),null;let{processDirectives:G,extractVariables:I,defaultConfig:W,loadStxConfig:K}=await import("././index.js"),A=await K(),q={__filename:z,__dirname:D.dirname(z)};for(let Q of V){let k=Q.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i);if(k&&!Q.includes("client")&&!Q.includes('type="module"'))await I(k[1],q,z)}let U=await G(B,q,z,{...W,...A,...X},new Set),v=U.indexOf(j);if(v===-1)return console.warn("[stx] Shell slot placeholder lost during processing"),null;return{beforeSlot:U.substring(0,v),afterSlot:U.substring(v+j.length),filePath:z,shellScripts:V,shellStyles:F}}catch(w){return console.error(`[stx] Error processing shell ${z}:`,w),null}}function S(z,X,w){let J,Y="",N=X.match(R);if(N){X=X.replace(N[0],"");try{let B=Buffer.from(N[1],"base64").toString("utf8"),j=B.match(/<title[^>]*>([\s\S]*?)<\/title>/i);if(j)J=j[1].trim();Y=B.replace(/<title[^>]*>[\s\S]*?<\/title>/i,"").trim()}catch{}}let V=w||J||"stx App",F=M(),Z="<script>window.__stxRouterConfig={container:'[data-stx-content]'};</script>";return`<!DOCTYPE html>
|
|
3
3
|
<html lang="en">
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="UTF-8">
|
|
@@ -26,4 +26,4 @@ ${F}
|
|
|
26
26
|
`));if(W.length>0)q.push(W.join(`
|
|
27
27
|
`));return q.push(I),q.join(`
|
|
28
28
|
`)}
|
|
29
|
-
export{x as
|
|
29
|
+
export{x as Jq,y as Kq,S as Lq,b as Mq,C as Nq,g as Oq,p as Pq};
|
|
@@ -395,4 +395,4 @@ else {
|
|
|
395
395
|
}
|
|
396
396
|
};
|
|
397
397
|
</script>`}function l(z){let j=z.customDirectives||[];return j.push(b),j.push(P),j.push(x),j.push(E),j.push(k),j.push(h),j.push(v),{...z,customDirectives:j}}
|
|
398
|
-
export{_ as
|
|
398
|
+
export{_ as pA,$ as qA,F as rA,W as sA,b as tA,E as uA,P as vA,x as wA,T as xA,Z as yA,k as zA,h as AA,v as BA,f as CA,g as DA,d as EA,y as FA,l as GA};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import D from"process";function F(B="STX_PUBLIC_"){let q={},A={};for(let[z,C]of Object.entries(D.env)){if(!z.startsWith(B)||C===void 0)continue;q[`import.meta.env.${z}`]=JSON.stringify(C),A[z]=C}return q["import.meta.env"]=JSON.stringify(A),q}function H(B="STX_PUBLIC_"){let q={};for(let[A,z]of Object.entries(D.env))if(A.startsWith(B)&&z!==void 0)q[A]=z;return q}
|
|
3
|
-
export{F as
|
|
3
|
+
export{F as Vy,H as Wy};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Tw as Q}from"./chunk-qdc3aav1.js";import{rB as r}from"./chunk-3jm3snz8.js";import k from"fs";import J from"path";var b=null,w=!1,W=null,M="",A=!1,o=256,N=new Map,E=null,x=null;function m(q){return Bun.hash(q).toString(16).padStart(16,"0").slice(0,16)}function y(q,z){if(N.has(q))N.delete(q);else if(N.size>=o)N.delete(N.keys().next().value);N.set(q,z)}async function e(q){if(!E)return null;try{let z=Bun.file(J.join(E,`cw-${m(q)}.css`));if(!await z.exists())return null;return await z.text()}catch{return null}}async function t(q,z){if(!E)return;try{if(!k.existsSync(E))k.mkdirSync(E,{recursive:!0});await Bun.write(J.join(E,`cw-${m(q)}.css`),z)}catch{}}async function i(q){try{let z=await import(q);if(z&&z.CSSGenerator)return{CSSGenerator:z.CSSGenerator,config:z.config,build:z.build,defaultConfig:z.defaultConfig}}catch{}return null}function s(){let q=[],z=process.env.HOME||process.env.USERPROFILE||"",G=process.cwd();while(G!==J.dirname(G))q.push(J.join(G,"node_modules","@cwcss","crosswind","dist","index.js")),q.push(J.join(G,"node_modules","@cwcss","crosswind","src","index.ts")),q.push(J.join(G,"pantry","@cwcss","crosswind","dist","index.js")),q.push(J.join(G,"pantry","@cwcss","crosswind","src","index.ts")),q.push(J.join(G,"node_modules","@stacksjs","crosswind","dist","index.js")),q.push(J.join(G,"pantry","@stacksjs","crosswind","dist","index.js")),G=J.dirname(G);if(z){let O=[J.join(z,"Code","Tools","crosswind","packages","crosswind","dist","index.js"),J.join(z,"Code","Tools","crosswind","packages","crosswind","src","index.ts"),J.join(z,"repos","stacks-org","crosswind","packages","crosswind","dist","index.js"),J.join(z,"repos","stacks-org","crosswind","packages","crosswind","src","index.ts"),J.join(z,"Code","Tools","stx","packages","stx","node_modules","@cwcss","crosswind","dist","index.js"),J.join(z,"Code","Tools","stx","packages","stx","node_modules","@stacksjs","crosswind","dist","index.js")];q.push(...O)}return q.push(J.join(process.cwd(),"..","crosswind","packages","crosswind","dist","index.js")),q.push(J.join(process.cwd(),"..","crosswind","packages","crosswind","src","index.ts")),q}async function a(){if(w)return b;w=!0;try{let q=["@cwcss/crosswind","@cwcss/crosswind/dist/index.js","@stacksjs/crosswind","@stacksjs/crosswind/dist/index.js"];for(let G of q){let O=await i(G);if(O){if(b=O,!process.env.STACKS_DEV_QUIET)console.log(`${Q.green}[Crosswind]${Q.reset} CSS engine loaded`);return b}}let z=s();for(let G of z)if(await Bun.file(G).exists()){let O=await i(G);if(O){if(b=O,!process.env.STACKS_DEV_QUIET)console.log(`${Q.green}[Crosswind]${Q.reset} CSS engine loaded from ${J.dirname(J.dirname(G))}`);return b}}throw Error("Crosswind CSSGenerator not found in any location")}catch{return console.warn(`${Q.yellow}[Crosswind] CSS engine not available, Tailwind styles will not be generated${Q.reset}`),console.warn(`${Q.yellow}Run 'bun add @stacksjs/crosswind' to enable CSS generation${Q.reset}`),null}}function Zq(){N.clear()}function $q(){b=null,w=!1,W=null,M="",N.clear(),x=null}async function n(q){try{let{loadConfigWithResult:z}=await import("bunfig"),G=await z({name:"crosswind",cwd:q,defaultConfig:{},checkEnv:!1,verbose:!1});if(!G?.path||!G.config||Object.keys(G.config).length===0)return null;let O=J.relative(q,G.path);if(!process.env.STACKS_DEV_QUIET)console.log(`${Q.green}[Crosswind]${Q.reset} Loaded config from ${O||G.path}`);return G.config}catch(z){if(z instanceof Error&&z.name==="ConfigNotFoundError")return null;return console.warn(`${Q.yellow}[Crosswind]${Q.reset} Failed to load crosswind config:`,z instanceof Error?z.message:z),null}}async function qq(q){if(A)return M;A=!0;try{let z=await a();if(!z||!z.build)return A=!1,"";if(!W)W=await n(q);if(!W)return A=!1,"";let G=z.defaultConfig?.theme||{},O=W.theme||{},V={...z.defaultConfig,...W,theme:{...G,...O,extend:{...G.extend||{},...O.extend||{}}}},X=performance.now(),Y=await z.build(V),j=performance.now()-X;if(M=Y.css,console.log(`${Q.cyan}[Crosswind]${Q.reset} Built ${Y.classes.size} classes in ${j.toFixed(1)}ms`),V.output){let _=J.isAbsolute(V.output)?V.output:J.join(q,V.output),H=J.dirname(_);if(!k.existsSync(H))k.mkdirSync(H,{recursive:!0});await Bun.write(_,Y.css)}return A=!1,Y.css}catch(z){return console.error(`${Q.red}[Crosswind]${Q.reset} Build error:`,z),A=!1,M}}async function Wq(q){W=null,await qq(q)}function Xq(){return M}function zq(q){let z=new Set,G=/class\s*=\s*["']([^"']+)["']/gi,O=G.exec(q);while(O!==null){for(let Y of O[1].split(/\s+/))if(Y.trim())z.add(Y.trim());O=G.exec(q)}let V=/(?:x-class|:class)\s*=\s*"([^"]+)"/gi,X=V.exec(q);while(X!==null){let Y=X[1].match(/'([^']+)'/g);if(Y){for(let j of Y)for(let _ of j.slice(1,-1).split(/\s+/))if(_.trim())z.add(_.trim())}X=V.exec(q)}return z}async function Gq(q,z){try{let G=await a();if(!G)return"";let O=zq(q);if(O.size===0)return"";let V=z?J.resolve(z):process.cwd();if(!E)E=J.join(V,".stx/cache");let X=[...O].sort().join(" "),Y=`${x||"default"}::${X}`,j=N.get(Y);if(j!==void 0)return y(Y,j),j;let _=await e(Y);if(_!==null)return y(Y,_),_;if(!W){let Z=null;try{let{loadStxConfig:T}=await import("././config.js"),U=await T(V);if(U.css)if(typeof U.css==="string"){let $=J.isAbsolute(U.css)?U.css:J.resolve(V,U.css);if(await Bun.file($).exists()){let I=await import($);Z=I.default||I,console.log(`${Q.green}[Crosswind]${Q.reset} Loaded config from stx.config.ts \u2192 ${U.css}`)}}else{if(Z={...U.css,content:U.css.content||[],preflight:U.css.preflight??!0,minify:U.css.minify??!1},U.css.config){let $=J.isAbsolute(U.css.config)?U.css.config:J.resolve(V,U.css.config);if(await Bun.file($).exists()){let I=await import($);Z={...I.default||I,...Z}}}console.log(`${Q.green}[Crosswind]${Q.reset} Using inline CSS config from stx.config.ts`)}}catch{}W=Z||await n(V);try{x=m(JSON.stringify(W??{}))}catch{x="unhashable"}}let H=G.defaultConfig||G.config,L=W||{},c=H.theme||{},u=(L.theme||{}).extend||{},f={...c};if(Object.keys(u).length>0)f.extend=u;let B=[...H.safelist||[],...L.safelist||[]],p={...H,...L,content:[],output:"",preflight:!0,minify:!1,theme:f,safelist:B},K=new G.CSSGenerator(p);for(let Z of B)K.generate(Z);for(let Z of O)K.generate(Z);let F=K.toCSS(!0,!1),g=p.shortcuts||L.shortcuts||{};for(let[Z,T]of Object.entries(g)){if(!O.has(Z)&&!B.includes(Z))continue;let U=T.split(/\s+/).filter(Boolean);for(let $ of U)K.generate($)}F=K.toCSS(!0,!1);let v=F.split(`
|
|
3
3
|
`);for(let[Z,T]of Object.entries(g)){if(!O.has(Z)&&!B.includes(Z))continue;let U=T.split(/\s+/).filter(Boolean),$=[],I=[];for(let P of U){let d=P.startsWith("dark:"),C=`.${(d?P.slice(5):P).replace(/\//g,"\\/").replace(/:/g,"\\:").replace(/\./g,"\\.").replace(/\[/g,"\\[").replace(/\]/g,"\\]").replace(/%/g,"\\%")}`;for(let R=0;R<v.length;R++){let h=v[R].trim();if(h===`${C} {`||h.startsWith(`${C} {`)){let S=R,l="";while(S<v.length){if(l+=v[S],v[S].includes("}"))break;S++}let D=l.match(/\{([^}]+)\}/);if(D)if(d)I.push(D[1].trim());else $.push(D[1].trim());break}}}if($.length)F+=`
|
|
4
4
|
.${Z} { ${$.join(" ")} }`;if(I.length)F+=`
|
|
5
5
|
@media (prefers-color-scheme: dark) { .dark .${Z} { ${I.join(" ")} } }`}return y(Y,F),t(Y,F),F}catch(G){return console.warn("Failed to generate Crosswind CSS:",G),""}}async function _q(q,z){let G=await Gq(q,z);if(!G)return q;let O=`<style data-crosswind="generated">
|
|
@@ -7,4 +7,4 @@ ${G}
|
|
|
7
7
|
</style>`,V=/<style data-crosswind="generated">[\s\S]*?<\/style>/g;if(V.test(q)){let X=!1;return q.replace(V,()=>{if(X)return"";return X=!0,O})}if(q.includes("</head>"))return q.replace("</head>",`${O}
|
|
8
8
|
</head>`);if(q.includes("<body"))return q.replace(/<body([^>]*)>/,`<body$1>
|
|
9
9
|
${O}`);return O+q}
|
|
10
|
-
export{a as
|
|
10
|
+
export{a as Jw,Zq as Kw,$q as Lw,n as Mw,qq as Nw,Wq as Ow,Xq as Pw,zq as Qw,Gq as Rw,_q as Sw};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import{Buffer as R}from"buffer";import S from"crypto";var W=40,V="_token",w=null;function X(j=W){let q=S.randomBytes(Math.ceil(j/2)).toString("hex").slice(0,j);return w=q,q}function Y(){if(!w)X();return w}function v(){w=null}function G(j){w=j}function Z(j=V){let q=Y();return`<input type="hidden" name="${j}" value="${q}">`}function H(j){return j.replace(/@csrf(?:\((['"])([^'"]*)\1\))?/g,(q,J,z)=>{return Z(z||V)})}function K(j,q){let J=q??w;if(!J)return!1;let z=R.from(j),Q=R.from(J);if(z.length!==Q.length)return!1;return S.timingSafeEqual(z,Q)}
|
|
3
|
-
export{X as
|
|
3
|
+
export{X as tx,Y as ux,v as vx,G as wx,Z as xx,H as yx,K as zx};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var h={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"};function f(b,j){return`${h[j]}${b}${h.reset}`}function k(b){return f(b,"green")}function n(b){return f(b,"yellow")}function p(b){return f(b,"red")}function q(b){return f(b,"cyan")}function v(b){return f(b,"gray")}
|
|
3
|
-
export{h as
|
|
3
|
+
export{h as Tw,f as Uw,k as Vw,n as Ww,p as Xw,q as Yw,v as Zw};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{F as
|
|
2
|
+
import{Ar as W,ur as U}from"./chunk-w01y57f5.js";import{et as X}from"./chunk-nap11ntr.js";import{eu as R,fu as O}from"./chunk-tr0z0e1g.js";import{rB as Q}from"./chunk-3jm3snz8.js";async function F(j,N={}){return(await _(j,N)).html}async function V(j,N={}){let{html:J,context:A}=await _(j,N),{extractStreamBoundaries:G}=await import("././streaming.js"),z=G(A),w=j.streamTemplates;if(w&&Object.keys(w).length>0){let{processDirectives:$}=await import("././process.js"),{defaultConfig:D}=await import("././config.js"),Y=A.streamBoundaries||{},I={...D,autoShell:!1},Z=Object.keys(w).map((K)=>({id:K,render:async()=>{let M=typeof Y[K]==="function"?await Y[K]():void 0;return $(w[K],{...A,$boundary:M},j.sourceFile,I,new Set)}})),L=new Set(Z.map((K)=>K.id));z=[...(z||[]).filter((K)=>!L.has(K.id)),...Z]}return{html:J,boundaries:z&&z.length>0?z:void 0}}async function _(j,N){let J={__filename:j.sourceFile,__dirname:j.sourceFile.replace(/[/\\][^/\\]+$/,""),...N};if(!j.hasServerScripts&&!O(j.html))return{html:j.html,context:J};for(let G of j.serverScriptContent)try{await X(G,J,j.sourceFile)}catch(z){console.warn(`[stx] Server script error in ${j.sourceFile}:`,z)}if(!O(j.html))return{html:j.html,context:J};let A=new Map;for(let[G,z]of Object.entries(j.placeholders))if(z.expression)try{let w=W(z.expression,J);if(z.type==="raw")A.set(G,w!==void 0&&w!==null?String(w):"");else A.set(G,w!==void 0&&w!==null?U(String(w)):"")}catch{A.set(G,"")}return{html:R(j.html,A),context:J}}async function y(j,N={}){if(!j.hasServerScripts&&!O(j.fragment))return j.fragment;let J={__filename:j.sourceFile,__dirname:j.sourceFile.replace(/[/\\][^/\\]+$/,""),...N};for(let G of j.serverScriptContent)try{await X(G,J,j.sourceFile)}catch(z){console.warn(`[stx] Server script error in ${j.sourceFile}:`,z)}if(!O(j.fragment))return j.fragment;let A=new Map;for(let[G,z]of Object.entries(j.placeholders))if(z.expression)try{let w=W(z.expression,J);if(z.type==="raw")A.set(G,w!==void 0&&w!==null?String(w):"");else A.set(G,w!==void 0&&w!==null?U(String(w)):"")}catch{A.set(G,"")}return R(j.fragment,A)}
|
|
3
|
+
export{F as Li,V as Mi,y as Ni};
|
|
@@ -131,4 +131,4 @@ else {
|
|
|
131
131
|
}
|
|
132
132
|
</style>
|
|
133
133
|
`}var z={HydrationRuntime:Q,serializeState:V,generateStateScript:X,generateHydrationScript:$,generateHydrationCSS:j,extractState:Y,getHydrationRuntime:Z,hydrate:P};
|
|
134
|
-
export{V as
|
|
134
|
+
export{V as qm,X as rm,w as sm,Y as tm,Q as um,$ as vm,Z as wm,P as xm,j as ym,z as zm};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Ls as T,Rr as E,mr as b,or as k}from"./chunk-w01y57f5.js";import{et as j}from"./chunk-nap11ntr.js";import{St as H}from"./chunk-kdxa9epn.js";import{rB as w}from"./chunk-3jm3snz8.js";import{dirname as R,resolve as I}from"path";function y(L){let K=L,z=L.match(/<template\b(?![^>]*(?:\b(?:id|x-for|x-if|@for|@if|:for|:if)\s*=|\s#[\w-]|\bv-slot|\bslot\s*=))[^>]*>/i);if(z&&z.index!==void 0){let G=z.index+z[0].length,N=1,Q=G;while(N>0&&Q<L.length){let J=L.indexOf("<template",Q),X=L.indexOf("</template>",Q);if(X===-1)break;if(J!==-1&&J<X){let U=L[J+9];if(U===">"||U===" "||U===`
|
|
3
3
|
`||U==="\t")N++;Q=J+9}else{if(N--,N===0){K=L.slice(G,X).trim();break}Q=X+11}}}let A=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,Y=[],W=[],Z=[],$=(G)=>/\b(?:state|derived|effect|batch)\s*(?:<[^<>()]*>)?\s*\(/.test(G),_;while((_=A.exec(L))!==null){let G=_[1],N=_[2],Q=_[0],J=G.includes("server");if($(N))Z.push(Q);else if(J)W.push(N);else Y.push(Q)}let q=K;{let G=/<script\b(?![^>]*\b(?:client|type\s*=\s*["']module["']|src\s*=))[^>]*>/gi,N,Q=[];while((N=G.exec(q))!==null){let J=N.index+N[0].length,X=1,U=J;while(U<q.length&&X>0){let V=q.indexOf("<script",U),B=q.indexOf("</script>",U);if(B===-1)break;if(V!==-1&&V<B)X++,U=V+7;else{if(X--,X===0){Q.push({start:N.index,end:B+9});break}U=B+9}}}for(let J=Q.length-1;J>=0;J--)q=q.substring(0,Q[J].start)+q.substring(Q[J].end)}for(let G of Y)q=q.replace(G,"");return{templateContent:q,serverScripts:W,clientScripts:Y,signalsScripts:Z}}function D(L,K){return`<!DOCTYPE html>
|
|
4
4
|
<html lang="en">
|
|
5
5
|
<head>
|
|
@@ -16,4 +16,4 @@ ${W.join(`
|
|
|
16
16
|
`);if(q.match(/(<\/body>)/i))q=q.replace(/(<\/body>)/i,`${J}
|
|
17
17
|
$1`);else q+=`
|
|
18
18
|
${J}`}q=await H(q)}if(z.wrapInDocument){if(!q.trim().toLowerCase().startsWith("<!doctype")&&!q.trim().toLowerCase().startsWith("<html"))q=D(q,z.title)}if(z.injectCSS)try{let{injectCrosswindCSS:G}=await import("./dev-server/crosswind.js");q=await G(q)}catch{}return q}
|
|
19
|
-
export{x as
|
|
19
|
+
export{x as vi,m as wi};
|