@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
|
@@ -299,4 +299,4 @@ catch (error) {
|
|
|
299
299
|
}
|
|
300
300
|
})();
|
|
301
301
|
</script>`}var N={name:"pwa.installButton",handler:(j,z,k,E)=>{let q=k.__stx_options||{};return H(j,q)},hasEndTag:!0,description:"Renders a PWA install prompt button that appears when the app can be installed"},Q={name:"pwa.updatePrompt",handler:(j,z,k,E)=>{let q=k.__stx_options||{};return J(j,q)},hasEndTag:!0,description:"Renders a PWA update notification UI when a new version is available"},T={name:"pwa.offlineIndicator",handler:(j,z,k,E)=>{let q=k.__stx_options||{};return L(j,q)},hasEndTag:!0,description:"Renders an offline status indicator that shows when the user loses connection"},V={name:"pwa.pushSubscribe",handler:(j,z,k,E)=>{let q=k.__stx_options||{};return M(j,q)},hasEndTag:!0,description:"Renders a push notification subscription button"},X=[N,Q,T,V];function Z(j){return[...j,...X]}
|
|
302
|
-
export{N as
|
|
302
|
+
export{N as Wt,Q as Xt,T as Yt,V as Zt,X as _t,Z as $t};
|
|
@@ -12,4 +12,4 @@ import $ from"path";function u(G,X,H,J){let q=G;q=q.replace(/@a11y\(\s*['"]([^'"
|
|
|
12
12
|
border-width: 0;
|
|
13
13
|
}
|
|
14
14
|
`.trim()}function A(){return typeof globalThis.document<"u"&&typeof globalThis.document.createElement==="function"}function M(G,X){let H=[],J=/<img\s+([^>]*)>/gi,q;q=J.exec(G);while(q!==null){let U=q[1];if(!/\balt\s*=/i.test(U))H.push({type:"missing-alt",element:q[0].substring(0,100),message:"Image missing alt attribute",impact:"serious",help:"Add alt text to images for screen readers",helpUrl:"https://web.dev/learn/accessibility/images/"});q=J.exec(G)}let K=/<button([^>]*)>\s*<\/button>/gi;q=K.exec(G);while(q!==null){let U=q[1];if(!/\baria-label\s*=/i.test(U)&&!/\btitle\s*=/i.test(U))H.push({type:"missing-accessible-name",element:q[0].substring(0,100),message:"Empty button missing accessible name",impact:"critical",help:"Add text content, aria-label, or title",helpUrl:"https://web.dev/learn/accessibility/aria-html/"});q=K.exec(G)}let N=/<a\s+([^>]*)>\s*<\/a>/gi;q=N.exec(G);while(q!==null){let U=q[1];if(!/\baria-label\s*=/i.test(U)&&!/\btitle\s*=/i.test(U))H.push({type:"link-missing-text",element:q[0].substring(0,100),message:"Link has no accessible text",impact:"serious",help:"Add text content, aria-label, or title to links",helpUrl:"https://web.dev/learn/accessibility/more-html/#links"});q=N.exec(G)}let j=/<(input|select|textarea)\s+([^>]*)>/gi;q=j.exec(G);while(q!==null){let U=q[2];if(/\btype\s*=\s*["']hidden["']/i.test(U)){q=j.exec(G);continue}let O=/\baria-label\s*=/i.test(U)||/\baria-labelledby\s*=/i.test(U),D=U.match(/\bid\s*=\s*["']([^"']+)["']/i);if(!O){let F=D&&new RegExp(`<label[^>]*\\bfor\\s*=\\s*["']${D[1]}["']`,"i").test(G),E=q.index,w=G.substring(0,E),b=G.substring(E),T=(w.match(/<label\b/gi)||[]).length,I=(w.match(/<\/label>/gi)||[]).length,B=T>I;if(!F&&!B)H.push({type:"input-missing-label",element:q[0].substring(0,100),message:"Form input missing associated label",impact:"serious",help:"Associate a label with the input or use aria-label",helpUrl:"https://web.dev/learn/accessibility/forms/"})}q=j.exec(G)}let z=/<h([1-6])[^>]*>/gi,Q=[];q=z.exec(G);while(q!==null)Q.push(Number.parseInt(q[1],10)),q=z.exec(G);let V=0;for(let U of Q){if(V>0&&U>V+1)H.push({type:"heading-skip",element:`<h${U}>`,message:`Heading level skipped from h${V} to h${U}`,impact:"moderate",help:"Maintain proper heading hierarchy without skipping levels",helpUrl:"https://web.dev/learn/accessibility/structure/"});V=U}if(/<html\b/i.test(G)&&!/<html[^>]*\slang\s*=/i.test(G))H.push({type:"missing-lang",element:"<html>",message:"Document language not specified",impact:"serious",help:"Add lang attribute to the html element",helpUrl:"https://web.dev/learn/accessibility/more-html/#language"});let Y=/<table[^>]*>([\s\S]*?)<\/table>/gi;q=Y.exec(G);while(q!==null){let U=q[1];if(!/<th\b/i.test(U))H.push({type:"table-missing-headers",element:"<table>",message:"Table missing header cells (th)",impact:"serious",help:"Use th elements for table headers",helpUrl:"https://web.dev/learn/accessibility/more-html/#tables"});q=Y.exec(G)}let _=/<(video|audio)[^>]*\sautoplay\s[^>]*>/gi;q=_.exec(G);while(q!==null){if(!/\bmuted\b/i.test(q[0]))H.push({type:"autoplay-audio",element:`<${q[1]}>`,message:"Auto-playing media may disrupt users",impact:"moderate",help:"Add muted attribute or provide controls to stop playback",helpUrl:"https://web.dev/learn/accessibility/more-html/#multimedia"});q=_.exec(G)}let Z=/\btabindex\s*=\s*["']([1-9]\d*)["']/gi;q=Z.exec(G);while(q!==null)H.push({type:"positive-tabindex",element:`tabindex="${q[1]}"`,message:"Positive tabindex disrupts natural tab order",impact:"moderate",help:'Use tabindex="0" or "-1" instead of positive values',helpUrl:"https://web.dev/learn/accessibility/focus/#tab-index"}),q=Z.exec(G);let S=/<iframe\s+([^>]*)>/gi;q=S.exec(G);while(q!==null){let U=q[1];if(!/\btitle\s*=/i.test(U)&&!/\baria-label\s*=/i.test(U))H.push({type:"iframe-missing-title",element:"<iframe>",message:"Iframe missing title attribute",impact:"serious",help:"Add a title attribute to describe the iframe content",helpUrl:"https://web.dev/learn/accessibility/more-html/#frames"});q=S.exec(G)}let W=/<([a-z]+)\s+([^>]*role\s*=\s*["']button["'][^>]*)>/gi;q=W.exec(G);while(q!==null){let U=q[1].toLowerCase(),O=q[2];if(U!=="button"&&!/\btabindex\s*=/i.test(O))H.push({type:"button-not-focusable",element:q[0].substring(0,100),message:'Element with role="button" is not keyboard focusable',impact:"serious",help:'Add tabindex="0" to make custom buttons focusable',helpUrl:"https://web.dev/learn/accessibility/focus/"});q=W.exec(G)}return H}async function C(G,X){if(!A())return M(G,X);let H=[];try{let J=globalThis.document.createElement("div");J.innerHTML=G,J.querySelectorAll("img").forEach((j)=>{if(!j.hasAttribute("alt"))H.push({type:"missing-alt",element:`<${j.outerHTML}>`,message:"Image missing alt attribute",impact:"serious",help:"Add alt text to images for screen readers",helpUrl:"https://web.dev/learn/accessibility/images/"})}),J.querySelectorAll('button, a, [role="button"]').forEach((j)=>{if(!(j.hasAttribute("aria-label")||j.hasAttribute("aria-labelledby")||j.textContent&&j.textContent.trim().length>0))H.push({type:"missing-accessible-name",element:`<${j.outerHTML}>`,message:"Interactive element missing accessible name",impact:"critical",help:"Add text content, aria-label, or aria-labelledby",helpUrl:"https://web.dev/learn/accessibility/aria-html/"})}),J.querySelectorAll("input, select, textarea").forEach((j)=>{let z=j.getAttribute("id"),Q=z&&J.querySelector(`label[for="${z}"]`),V=j.hasAttribute("aria-label")||j.hasAttribute("aria-labelledby"),Y=j.closest("label")!==null;if(!Q&&!V&&!Y)H.push({type:"input-missing-label",element:`<${j.outerHTML}>`,message:"Form input missing associated label",impact:"serious",help:"Associate a label with the input or use aria-label",helpUrl:"https://web.dev/learn/accessibility/forms/"})});let q=Array.from(J.querySelectorAll("h1, h2, h3, h4, h5, h6")),K=0;for(let j of q){let z=Number.parseInt(j.tagName.charAt(1));if(K>0&&z>K+1)H.push({type:"heading-skip",element:`<${j.outerHTML}>`,message:`Heading level skipped from h${K} to h${z}`,impact:"moderate",help:"Maintain proper heading hierarchy without skipping levels",helpUrl:"https://web.dev/learn/accessibility/structure/"});K=z}let N=J.querySelector("html");if(G.includes("<html")&&N&&!N.hasAttribute("lang"))H.push({type:"missing-lang",element:"<html>",message:"Document language not specified",impact:"serious",help:"Add lang attribute to the html element",helpUrl:"https://web.dev/learn/accessibility/more-html/#language"});if(J.querySelectorAll("a").forEach((j)=>{let z=j.textContent&&j.textContent.trim().length>0,Q=j.hasAttribute("aria-label")||j.hasAttribute("aria-labelledby"),V=j.hasAttribute("title"),Y=j.querySelector("img[alt]");if(!z&&!Q&&!V&&!Y)H.push({type:"link-missing-text",element:`<${j.outerHTML}>`,message:"Link has no accessible text",impact:"serious",help:"Add text content, aria-label, or title to links",helpUrl:"https://web.dev/learn/accessibility/more-html/#links"})}),G.includes("<nav")||G.includes("<header")){if(!J.querySelector('a[href="#main"], a[href="#content"], .skip-link, [class*="skip"]')&&J.querySelectorAll("a").length>5)H.push({type:"missing-skip-link",element:"<nav>",message:"Consider adding a skip navigation link",impact:"minor",help:"Add a skip link to allow keyboard users to bypass navigation",helpUrl:"https://web.dev/learn/accessibility/focus/#skip-links"})}if(J.querySelectorAll("table").forEach((j)=>{let z=j.querySelector("caption");if(!j.querySelector("th"))H.push({type:"table-missing-headers",element:"<table>",message:"Table missing header cells (th)",impact:"serious",help:"Use th elements for table headers",helpUrl:"https://web.dev/learn/accessibility/more-html/#tables"});if(!z&&!j.hasAttribute("aria-label")&&!j.hasAttribute("aria-labelledby"))H.push({type:"table-missing-caption",element:"<table>",message:"Table missing caption or accessible name",impact:"minor",help:"Add a caption element or aria-label to describe the table",helpUrl:"https://web.dev/learn/accessibility/more-html/#tables"})}),J.querySelectorAll('[style*="color"]').forEach((j)=>{let z=j.getAttribute("style")||"";if(z.includes("color:")&&!z.includes("background"))H.push({type:"potential-contrast-issue",element:`<${j.tagName.toLowerCase()}>`,message:"Element has inline color style - verify contrast ratio",impact:"minor",help:"Ensure text has sufficient contrast ratio (4.5:1 for normal text)",helpUrl:"https://web.dev/learn/accessibility/color-contrast/"})}),J.querySelectorAll("video[autoplay], audio[autoplay]").forEach((j)=>{if(!j.hasAttribute("muted"))H.push({type:"autoplay-audio",element:`<${j.tagName.toLowerCase()}>`,message:"Auto-playing media may disrupt users",impact:"moderate",help:"Add muted attribute or provide controls to stop playback",helpUrl:"https://web.dev/learn/accessibility/more-html/#multimedia"})}),J.querySelectorAll("[tabindex]").forEach((j)=>{if(Number.parseInt(j.getAttribute("tabindex")||"0")>0)H.push({type:"positive-tabindex",element:`<${j.tagName.toLowerCase()}>`,message:"Positive tabindex disrupts natural tab order",impact:"moderate",help:'Use tabindex="0" or "-1" instead of positive values',helpUrl:"https://web.dev/learn/accessibility/focus/#tab-index"})}),J.querySelectorAll('[role="button"]').forEach((j)=>{if(!j.hasAttribute("tabindex"))H.push({type:"button-not-focusable",element:`<${j.outerHTML}>`,message:'Element with role="button" is not keyboard focusable',impact:"serious",help:'Add tabindex="0" to make custom buttons focusable',helpUrl:"https://web.dev/learn/accessibility/focus/"})}),G.includes("<body")&&!J.querySelector('main, [role="main"]'))H.push({type:"missing-main-landmark",element:"<body>",message:"Document missing main landmark region",impact:"moderate",help:"Add a main element to identify the primary content",helpUrl:"https://web.dev/learn/accessibility/structure/#landmarks"});J.querySelectorAll("iframe").forEach((j)=>{if(!j.hasAttribute("title")&&!j.hasAttribute("aria-label"))H.push({type:"iframe-missing-title",element:"<iframe>",message:"Iframe missing title attribute",impact:"serious",help:"Add a title attribute to describe the iframe content",helpUrl:"https://web.dev/learn/accessibility/more-html/#frames"})})}catch(J){console.error(`Error checking accessibility in ${X}:`,J)}return H}async function x(G,X={}){let H={},{recursive:J=!0,ignorePaths:q=[]}=X,K=$.join(G,J?"**/*.stx":"*.stx"),N=new Bun.Glob(K),j=[];for await(let z of N.scan())if(!q.some((V)=>z.includes($.normalize(V))))j.push(z);for(let z of j)try{let Q=await Bun.file(z).text();if(z.endsWith("good-a11y.stx"))continue;let V=await C(Q,z);if(V.length>0)H[z]=V}catch(Q){console.error(`Error scanning ${z}:`,Q)}return H}var P={fixMissingAlt:!0,fixMissingLabels:!0,fixMissingFormLabels:!0,fixTableHeaders:!0,fixMissingLang:!0,fixPositiveTabindex:!0,fixButtonFocusable:!0,defaultLang:"en"};function L(G,X={}){let H={...P,...X},J=[],q=G;if(H.fixMissingAlt)q=q.replace(/<img([^>]*?)(?<!\balt\s*=\s*["'][^"']*["'])(\s*\/?>)/gi,(K,N,j)=>{if(/\balt\s*=/i.test(N))return K;let z=K,Q=`<img${N} alt=""${j}`;return J.push({type:"missing-alt",description:"Added empty alt attribute to image",before:z,after:Q}),Q});if(H.fixMissingLabels)q=q.replace(/<button([^>]*)>\s*<\/button>/gi,(K,N)=>{if(/\baria-label\s*=/i.test(N)||/\btitle\s*=/i.test(N))return K;let j=K,z=`<button${N} aria-label="Button"></button>`;return J.push({type:"missing-accessible-name",description:"Added aria-label to empty button",before:j,after:z}),z}),q=q.replace(/<a([^>]*)>\s*(<(?:i|span|svg)[^>]*(?:class="[^"]*icon[^"]*")?[^>]*>.*?<\/(?:i|span|svg)>)?\s*<\/a>/gi,(K,N,j)=>{if(/\baria-label\s*=/i.test(N)||/\btitle\s*=/i.test(N))return K;if(!j&&K.replace(/<a[^>]*>|<\/a>/gi,"").trim())return K;let z=K,Q=`<a${N} aria-label="Link">${j||""}</a>`;return J.push({type:"missing-accessible-name",description:"Added aria-label to link without text",before:z,after:Q}),Q});if(H.fixMissingFormLabels)q=q.replace(/<(input|select|textarea)([^>]*)>/gi,(K,N,j)=>{if(/\baria-label\s*=/i.test(j)||/\baria-labelledby\s*=/i.test(j))return K;if(/\btype\s*=\s*["']hidden["']/i.test(j))return K;let z=j.match(/\bname\s*=\s*["']([^"']+)["']/i),Q=j.match(/\bid\s*=\s*["']([^"']+)["']/i),V=z?.[1]||Q?.[1]||N,Y=K,_=`<${N}${j} aria-label="${V}">`;return J.push({type:"input-missing-label",description:`Added aria-label to ${N} element`,before:Y,after:_}),_});if(H.fixMissingLang)q=q.replace(/<html([^>]*)>/gi,(K,N)=>{if(/\blang\s*=/i.test(N))return K;let j=K,z=`<html${N} lang="${H.defaultLang}">`;return J.push({type:"missing-lang",description:`Added lang="${H.defaultLang}" to html element`,before:j,after:z}),z});if(H.fixPositiveTabindex)q=q.replace(/\btabindex\s*=\s*["']([1-9]\d*)["']/gi,(K,N)=>{let j=K,z='tabindex="0"';return J.push({type:"positive-tabindex",description:`Changed tabindex="${N}" to tabindex="0"`,before:j,after:'tabindex="0"'}),'tabindex="0"'});if(H.fixButtonFocusable)q=q.replace(/<([a-z]+)(\s[^>]*role\s*=\s*["']button["'][^>]*)>/gi,(K,N,j)=>{if(/\btabindex\s*=/i.test(j))return K;if(N.toLowerCase()==="button")return K;let z=K,Q=`<${N}${j} tabindex="0">`;return J.push({type:"button-not-focusable",description:'Added tabindex="0" to element with role="button"',before:z,after:Q}),Q});if(H.fixTableHeaders)q=q.replace(/<th([^>]*)>/gi,(K,N)=>{if(/\bscope\s*=/i.test(N))return K;let j=K,z=`<th${N} scope="col">`;return J.push({type:"table-missing-scope",description:'Added scope="col" to table header',before:j,after:z}),z});return{original:G,fixed:q,fixCount:J.length,fixes:J}}async function k(G,X={},H=!1){let J=await Bun.file(G).text(),q=L(J,X);if(H&&q.fixCount>0)await Bun.write(G,q.fixed);return q}async function p(G,X={},H={}){let J={},{recursive:q=!0,ignorePaths:K=[],writeBack:N=!1,extensions:j=[".stx",".html",".htm"]}=H,z=j.length===1?`*${j[0]}`:`*{${j.join(",")}}`,Q=$.join(G,q?`**/${z}`:z),V=new Bun.Glob(Q);for await(let Y of V.scan()){if(K.some((Z)=>Y.includes($.normalize(Z))))continue;try{let Z=await k(Y,X,N);if(Z.fixCount>0)J[Y]=Z}catch(Z){console.error(`Error fixing ${Y}:`,Z)}}return J}var y={name:"a11y",handler:(G,X,H,J)=>{if(!X.length)return G;let q=X[0].replace(/['"]/g,""),K=X.length>1?X[1].replace(/['"]/g,""):"",j={"aria-label":"Ensure interactive elements have accessible labels","alt-text":"Provide alternative text for images",focus:"Ensure the element can receive keyboard focus",landmark:"Use appropriate landmark roles","heading-order":"Maintain proper heading hierarchy","color-contrast":"Ensure sufficient color contrast","keyboard-nav":"Make sure element is keyboard navigable","screen-reader":"Optimize for screen reader users"}[q]||"Make this element accessible";return`<!-- a11y-hint: ${K||j} -->${G}`},hasEndTag:!1},R={name:"screenReader",handler:(G)=>{return`<span class="sr-only">${G}</span>`},hasEndTag:!0};function g(){return[y,R]}
|
|
15
|
-
export{u as
|
|
15
|
+
export{u as bA,v as cA,A as dA,C as eA,x as fA,L as gA,k as hA,p as iA,y as jA,R as kA,g as lA};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import J from"fs";import F from"path";function V(z){try{return J.statSync(z).mtimeMs}catch{return null}}function Q(z,B){let j=Math.max(0,Math.round((B-z)/1000));if(j<60)return`${j}s ago`;if(j<3600)return`${Math.round(j/60)}m ago`;return`${Math.round(j/3600)}h ago`}function X(z,B){try{return globalThis.Bun?.resolveSync(z,B)??null}catch{return null}}function Y(z,B="stx"){let j=F.resolve(z);for(let A=0;A<10;A++){let q=F.join(j,"pantry","@stacksjs",B);if(J.existsSync(q))return q;let K=F.dirname(j);if(K===j)break;j=K}return null}async function $(z={}){let B=z.cwd?F.resolve(z.cwd):process.cwd(),j=z.resolve??X,A=Date.now(),q=[],K=j("@stacksjs/stx",B);q.push(K?{name:"@stacksjs/stx resolves to",status:"ok",detail:K}:{name:"@stacksjs/stx resolves to",status:"info",detail:"not resolvable from here (running inside the stx repo, or not installed)"});let T=j("bun-plugin-stx",B);if(T)q.push({name:"bun-plugin-stx resolves to",status:"ok",detail:T});let C=Y(B,"stx");if(!C)q.push({name:"pantry",status:"info",detail:"no pantry/@stacksjs/stx found \u2014 standard install (nothing to rebuild)"});else{let H=F.join(C,"src/signals.ts"),I=[F.join(C,"dist/index.js"),F.join(C,"dist/signals.js")].find((G)=>J.existsSync(G))||null,L=V(H),N=I?V(I):null;if(L==null)q.push({name:"pantry dist freshness",status:"info",detail:`found pantry at ${C} but no src/signals.ts to compare`});else if(N==null)q.push({name:"pantry dist freshness",status:"error",detail:"pantry has src but no built dist \u2014 the dev server will resolve nothing (or a stale copy elsewhere)",fix:`cd ${C} && bun build.ts`});else if(N<L){let G=Math.round((L-N)/1000);q.push({name:"pantry dist freshness",status:"error",detail:`dist (${Q(N,A)}) is OLDER than src/signals.ts (${Q(L,A)}) by ${G}s \u2014 your edit isn't built`,fix:`cd ${C} && bun build.ts`})}else q.push({name:"pantry dist freshness",status:"ok",detail:`dist rebuilt after src (src ${Q(L,A)}, dist ${Q(N,A)})`});let U=F.join(B,"node_modules/@stacksjs/stx"),O=null;try{O=J.lstatSync(U)}catch{O=null}if(!O)q.push({name:"node_modules \u2192 pantry",status:"info",detail:"node_modules/@stacksjs/stx not present (not installed here)"});else if(O.isSymbolicLink()){let G=null;try{G=J.realpathSync(U)}catch{}let W=(()=>{try{return J.realpathSync(C)}catch{return C}})();q.push(G===W?{name:"node_modules \u2192 pantry",status:"ok",detail:"symlinked to pantry"}:{name:"node_modules \u2192 pantry",status:"warn",detail:`symlinked to ${G||"(dangling)"}, not pantry`})}else q.push({name:"node_modules \u2192 pantry",status:"warn",detail:"is a real directory, NOT symlinked to pantry \u2014 edits to pantry src/dist won't be resolved",fix:"rm -rf node_modules/@stacksjs/stx && ln -s ../../pantry/@stacksjs/stx node_modules/@stacksjs/stx"})}if(q.push({name:"dev runtime cache",status:"info",detail:"cleared automatically on source edits by the dev watcher (clearDevCaches, #1745 item C)"}),z.generateRuntime)try{let I=z.generateRuntime().length;q.push(I>1000?{name:"signals runtime",status:"ok",detail:`generated ${I.toLocaleString()} chars`}:{name:"signals runtime",status:"warn",detail:`generated only ${I} chars \u2014 suspiciously short`})}catch(H){q.push({name:"signals runtime",status:"error",detail:`failed to generate: ${H.message}`})}return{checks:q,ok:!q.some((H)=>H.status==="error")}}function b(z){let B={ok:"\u2713",warn:"\u26A0",error:"\u2717",info:"\xB7"},j=["stx runtime resolution:"];for(let A of z.checks)if(j.push(` ${B[A.status]} ${A.name}: ${A.detail}`),A.fix)j.push(` \u2192 ${A.fix}`);return j.push(""),j.push(z.ok?"\u2713 All framework-runtime layers are aligned.":"\u2717 A runtime layer is stale \u2014 see the fixes above."),j.join(`
|
|
3
3
|
`)}
|
|
4
|
-
export{Y as
|
|
4
|
+
export{Y as mn,$ as nn,b as on};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
function W(C){let{token:J,baseUrl:K="https://api.netlify.com/api/v1"}=C;async function E(A,j,F={}){let L=`${K}${j}`,O={Authorization:`Bearer ${J}`,"User-Agent":"stx-deploy/1.0"},M;if(F.rawBody)O["Content-Type"]=F.contentType||"application/octet-stream",M=F.rawBody;else if(F.body)O["Content-Type"]="application/json",M=JSON.stringify(F.body);let D=await fetch(L,{method:A,headers:O,body:M});if(!D.ok){let Q=Error(`Netlify API error: ${D.status} ${D.statusText}`);Q.status=D.status;try{let R=await D.json();Q.message=R.message||Q.message,Q.code=R.code,Q.details=R}catch{}throw Q}let H=await D.text();if(!H)return{};return JSON.parse(H)}return{async getSite(A){return E("GET",`/sites/${A}`)},async listSites(){return E("GET","/sites")},async createSite(A){let j={};if(A)j.name=A;return E("POST","/sites",{body:j})},async createDeploy(A,j){let F={files:j.files,draft:j.draft??!0,async:j.async??!0};if(j.title)F.title=j.title;if(j.branch)F.branch=j.branch;if(j.functions)F.functions=j.functions;return E("POST",`/sites/${A}/deploys`,{body:F})},async uploadFile(A,j,F){let L=j.startsWith("/")?j.slice(1):j;await E("PUT",`/deploys/${A}/files/${L}`,{rawBody:F,contentType:"application/octet-stream"})},async uploadFiles(A,j){let L=[...j],O=async()=>{while(L.length>0){let D=L.shift();if(D)await this.uploadFile(A,D.path,D.content)}},M=Array.from({length:Math.min(5,j.length)},()=>O());await Promise.all(M)},async getDeploy(A){return E("GET",`/deploys/${A}`)},async waitForDeploy(A,j={}){let{timeout:F=300000,pollInterval:L=2000,onProgress:O}=j,M=Date.now();while(!0){let D=await this.getDeploy(A);if(O)O(D);if(D.state==="ready")return D;if(D.state==="error"){let H=Error(`Deploy failed: ${D.error_message||"Unknown error"}`);throw H.status=500,H.details=D,H}if(Date.now()-M>F){let H=Error(`Deploy timed out after ${F}ms`);throw H.status=408,H.details=D,H}await new Promise((H)=>setTimeout(H,L))}},async lockDeploy(A){return E("POST",`/deploys/${A}/lock`)},async unlockDeploy(A){return E("POST",`/deploys/${A}/unlock`)}}}async function V(C){let J=await crypto.subtle.digest("SHA-1",C);return Array.from(new Uint8Array(J)).map((E)=>E.toString(16).padStart(2,"0")).join("")}async function X(C,J={}){let{ignore:K=["node_modules",".git",".env*","*.map"]}=J,E=[],A=new Bun.Glob("**/*");for await(let j of A.scan({cwd:C,onlyFiles:!0,dot:!1})){if(K.some((H)=>{if(H.includes("*"))return new RegExp(`^${H.replace(/\*/g,".*")}$`).test(j);return j.includes(H)}))continue;let L=`${C}/${j}`,M=await Bun.file(L).arrayBuffer(),D=await V(M);E.push({path:j,content:new Uint8Array(M),sha1:D})}return E}function Y(C){let J={};for(let K of C)J[`/${K.path}`]=K.sha1;return J}function Z(C,J){let K=new Set(J.map((E)=>E.startsWith("/")?E.slice(1):E));return C.filter((E)=>K.has(E.path))}function _(C){if(C<1024)return`${C} B`;if(C<1048576)return`${(C/1024).toFixed(1)} KB`;if(C<1073741824)return`${(C/1048576).toFixed(1)} MB`;return`${(C/1073741824).toFixed(1)} GB`}function $(C){return C.reduce((J,K)=>J+K.content.byteLength,0)}
|
|
3
|
-
export{W as
|
|
3
|
+
export{W as Sn,V as Tn,X as Un,Y as Vn,Z as Wn,_ as Xn,$ as Yn};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{il as k,jl as q}from"./chunk-0wdar532.js";import{tl as j}from"./chunk-9agvhp1x.js";import{zl as A}from"./chunk-znxp3zha.js";function H(){return{script:[j(),k(),A()].join(`
|
|
3
3
|
|
|
4
4
|
`),css:q()}}function y(){let{script:D,css:E}=H(),F=D.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/.*$/gm,"").replace(/\s+/g," ").replace(/\s*([{};,:])\s*/g,"$1").trim(),G=E.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\s+/g," ").replace(/\s*([{};,:])\s*/g,"$1").trim();return{script:F,css:G}}
|
|
5
|
-
export{H as
|
|
5
|
+
export{H as $k,y as al};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{h as
|
|
2
|
+
import{Ls as y}from"./chunk-w01y57f5.js";import{et as x}from"./chunk-nap11ntr.js";import{yy as I}from"./chunk-94g3cahw.js";import g from"crypto";import w from"path";class h{store=new Map;async get(B){let U=this.store.get(B);if(!U||U.expires<=Date.now()){if(U)this.store.delete(B);return null}return{...U.data}}async set(B,U,A){this.store.set(B,{data:{...U},expires:Date.now()+A*1000})}async delete(B){this.store.delete(B)}}async function l(B,U,A){let Q={},z={},b=await A.get(B);if(b)Object.assign(Q,b);let E={id:B,data:Q,get(G){return Q[G]},set(G,O){Q[G]=O,W()},delete(G){delete Q[G],W()},clear(){Object.keys(Q).forEach((G)=>delete Q[G]),W()},has(G){return G in Q},flash(G,O){if(O!==void 0){z[G]=O;return}let R=z[G];return delete z[G],R},regenerate(){let G=B;B=u(),E.id=B,A.delete(G),W()},destroy(){A.delete(B),Object.keys(Q).forEach((G)=>delete Q[G])}};function W(){A.set(B,{...Q,__flash:z},U)}return W(),E}function u(){return g.randomBytes(32).toString("hex")}function p(B){if(!B)return{};return B.split(";").reduce((U,A)=>{let[Q,...z]=A.trim().split("=");if(Q)U[Q]=decodeURIComponent(z.join("="));return U},{})}function v(B,U,A={}){let Q=`${encodeURIComponent(B)}=${encodeURIComponent(U)}`;if(A.maxAge!==void 0)Q+=`; Max-Age=${A.maxAge}`;if(A.expires)Q+=`; Expires=${A.expires.toUTCString()}`;if(A.path)Q+=`; Path=${A.path}`;if(A.domain)Q+=`; Domain=${A.domain}`;if(A.secure)Q+="; Secure";if(A.httpOnly)Q+="; HttpOnly";if(A.sameSite)Q+=`; SameSite=${A.sameSite}`;return Q}function d(){return g.randomBytes(32).toString("hex")}function r(B,U){if(!B||!U)return!1;try{return g.timingSafeEqual(Buffer.from(B),Buffer.from(U))}catch{return!1}}async function i(B,U={},A={}){let Q=A.viewsDir||"./views",z=A.layoutsDir||"./layouts",b=!B.includes("<")&&!B.includes("@"),E,W;if(b){if(W=w.resolve(Q,B),!W.endsWith(".stx"))W+=".stx";if(!await Bun.file(W).exists())return new Response(`Template not found: ${B}`,{status:500});E=await Bun.file(W).text()}else E=B,W="inline-template.stx";let G={...U,props:U,__filename:W,__dirname:w.dirname(W)};if(A.ctx)G.csrf_token=A.ctx.csrfToken,G.csrf_field=`<input type="hidden" name="_token" value="${A.ctx.csrfToken}">`,G.old=A.ctx.old,G.errors=A.ctx.errors,G.session=A.ctx.session,G.user=A.ctx.user(),G.isAuthenticated=A.ctx.isAuthenticated();let O=E.match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(O){let H=O[1];E=E.replace(/<script\s+server\b[^>]*>[\s\S]*?<\/script>/gi,""),await x(H,G,W)}let R={layoutsDir:z,...A.stxOptions},P=await y(E,G,W,R,new Set),C=new Headers({"Content-Type":"text/html; charset=utf-8"});if(A.ctx)A.ctx.responseHeaders.forEach((H,T)=>{C.set(T,H)});return new Response(P,{headers:C})}function e(B={}){let{viewsDir:U="./views",layoutsDir:A="./layouts",defaultLayout:Q,sessionSecret:z=g.randomBytes(32).toString("hex"),sessionCookieName:b="stx_session",sessionTtl:E=86400,stxOptions:W={},csrfCookieName:G="csrf_token",csrfEnabled:O=!0}=B,R=B.sessionStore??new h,q=[],P=[];function C(j,J){for(let K of q){if(K.method!==j&&K.method!=="*")continue;let Y=[],V=K.pattern.replace(/\/:(\w+)/g,(Z,X)=>{return Y.push(X),"/([^/]+)"}).replace(/\//g,"\\/"),L=new RegExp(`^${V}$`),_=J.match(L);if(_){let Z={};return Y.forEach((X,N)=>{Z[X]=_[N+1]}),{route:K,params:Z}}}return null}async function H(j,J){let K=new URL(j.url),Y=p(j.headers.get("Cookie")),V=new Headers,L=[],_=Y[b];if(!_)_=u(),L.push(v(b,_,{httpOnly:!0,secure:K.protocol==="https:",sameSite:"Lax",path:"/",maxAge:E}));let Z=await l(_,E,R),X=Z.get("_csrf");if(!X)X=d(),Z.set("_csrf",X);let N={};K.searchParams.forEach(($,F)=>{N[F]=$});let f=Z.flash("_errors")||{},k=Z.flash("_old_input")||{},m={request:j,url:K,params:J,query:N,session:Z,csrfToken:X,cookies:Y,responseHeaders:V,errors:f,async formData(){let $=await j.formData(),F={};return $.forEach((D,c)=>{F[c]=D}),F},async json(){return await j.json()},setCookie($,F,D={}){L.push(v($,F,D))},flash($,F){Z.flash($,F)},getFlash($){return Z.flash($)},old($){return k[$]||""},isAuthenticated(){return Z.has("user")},user(){return Z.get("user")}};if(L.length>0)L.forEach(($)=>{V.append("Set-Cookie",$)});return m}let T=async(j,J)=>{if(["GET","HEAD","OPTIONS"].includes(j.request.method))return J();if(!O)return J();let Y=(await j.request.clone().formData().catch(()=>new FormData)).get("_token"),V=j.request.headers.get("X-CSRF-Token"),L=Y||V,_=j.session.get("_csrf");if(!L||!_||!r(L,_))return new Response("CSRF token mismatch",{status:419});return J()};async function S(j){let J=new URL(j.url),K=j.method,Y=C(K,J.pathname);if(!Y)return new Response("Not Found",{status:404});let V=await H(j,Y.params),L=[...P,T,...Y.route.middleware],_=0,Z=async()=>{if(_<L.length){let X=L[_++];return X(V,Z)}return Y.route.handler(V)};try{let X=await Z();return V.responseHeaders.forEach((N,f)=>{X.headers.set(f,N)}),X}catch(X){return I.log(X instanceof Error?X:Error(String(X)),{handler:"request"},"error"),new Response("Internal Server Error",{status:500})}}function M(j,J,K,Y=[]){q.push({method:j,pattern:J,handler:K,middleware:Y})}return{fetch:S,get(j,J,K=[]){return M("GET",j,J,K),this},post(j,J,K=[]){return M("POST",j,J,K),this},put(j,J,K=[]){return M("PUT",j,J,K),this},delete(j,J,K=[]){return M("DELETE",j,J,K),this},patch(j,J,K=[]){return M("PATCH",j,J,K),this},use(j){return P.push(j),this},async render(j,J={},K){return i(j,J,{viewsDir:U,layoutsDir:A,stxOptions:W,ctx:K})},redirect(j,J=302){return new Response(null,{status:J,headers:{Location:j}})},back(j,J,K){if(J)j.session.flash("_errors",J);if(K)j.session.flash("_old_input",K);let Y=j.request.headers.get("Referer")||"/";return new Response(null,{status:302,headers:{Location:Y}})},listen(j=3000){return Bun.serve({port:j,fetch:S})}}}
|
|
3
|
+
export{h as ng,i as og,e as pg};
|
|
@@ -65,4 +65,4 @@ var B=null,F=[],J=0;function K(){return`stx-${++J}`}function M(q=null){return{sc
|
|
|
65
65
|
};
|
|
66
66
|
})();
|
|
67
67
|
`}
|
|
68
|
-
export{K as
|
|
68
|
+
export{K as Uq,M as Vq,N as Wq,O as Xq,Q as Yq,R as Zq,U as _q,W as $q,X as ar,Y as br,Z as cr,_ as dr,$ as er,j as fr,A as gr,G as hr,T as ir,b as jr};
|
|
@@ -16,4 +16,4 @@ ${D.join(`
|
|
|
16
16
|
</html>`}function H(q){return/<!DOCTYPE\b/i.test(q)||/<html[\s>]/i.test(q)}function w(q,K={}){let F=q.lastIndexOf("</head>");if(F===-1)return q;let{meta:Z=[],link:_=[],script:$=[],headRaw:U=""}=K,N=q.slice(0,F),G=[];for(let z of Z){let J=z.name?`name="${z.name}"`:z.property?`property="${z.property}"`:z.charset!=null?"charset=":z["http-equiv"]?`http-equiv="${z["http-equiv"]}"`:"";if(J&&N.includes(J))continue;G.push(` <meta ${Object.entries(z).map(([O,E])=>`${O}="${E}"`).join(" ")}>`)}for(let z of _){if(z.href&&N.includes(`href="${z.href}"`))continue;G.push(` <link ${Object.entries(z).map(([J,O])=>`${J}="${O}"`).join(" ")}>`)}for(let z of $)if(z.src){if(N.includes(`src="${z.src}"`))continue;G.push(` <script ${Object.entries(z).filter(([J])=>J!=="content").map(([J,O])=>`${J}="${O}"`).join(" ")}></script>`)}else if(z.content){if(N.includes(z.content))continue;G.push(` <script>${z.content}</script>`)}if(U&&!N.includes(U))G.push(` ${U}`);if(G.length===0)return q;return`${q.slice(0,F)}${G.join(`
|
|
17
17
|
`)}
|
|
18
18
|
${q.slice(F)}`}function x(q,K={},F={}){if(H(q))return q;return A(q,K,F)}
|
|
19
|
-
export{S as
|
|
19
|
+
export{S as Dw,b as Ew,A as Fw,H as Gw,w as Hw,x as Iw};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{E as
|
|
2
|
+
import{bq as B,cq as C}from"./chunk-bgec9r1v.js";import{createHash as F}from"crypto";import{getRouterScript as I}from"stx-router";function E(j){return F("sha256").update(j).digest("hex").slice(0,8)}function M(j=!1){let q=j?C():B(),A=E(q);return{content:q,filename:`runtime.${A}.js`,hash:A}}function N(){let j=I(),q=E(j);return{content:j,filename:`router.${q}.js`,hash:q}}function O(j){return{runtimeTag:j.runtime?`<script src="/__stx/${j.runtime.filename}"></script>`:"",routerTag:j.router?`<script src="/__stx/${j.router.filename}"></script>`:"",cssTag:j.css?`<link rel="stylesheet" href="/__stx/${j.css.filename}">`:""}}
|
|
3
|
+
export{E as Zp,M as _p,N as $p,O as aq};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var X={enabled:!0,widths:[320,640,768,1024,1280,1536,1920],formats:["webp","jpeg"],quality:80,devOptimize:!1,cacheDir:".stx/image-cache",placeholder:"none",inputDirs:["public","src/assets","assets"],outputDir:"dist/images",baseUrl:"/images"};
|
|
3
|
-
export{X as
|
|
3
|
+
export{X as Yl};
|
|
@@ -4,4 +4,4 @@ var M=(j,q,v,x)=>`(function(){function read(){try{var k=${JSON.stringify(q)};var
|
|
|
4
4
|
${w}`)}if(!j.includes("__stxThemeGuard")&&/<head\b[^>]*>/i.test(j)){let w=`<script data-stx-theme-guard="1">${M(x,J,z,B)};window.__stxThemeGuard=1;</script>`;j=j.replace(/<head\b([^>]*)>/i,`<head$1>
|
|
5
5
|
${w}`)}if(!j.includes("__stxThemeToggle")&&/<\/body>/i.test(j)){let w=`<script data-stx-theme-toggle="1">${Q(J,z,B)};window.__stxThemeToggle=1;</script>`;j=j.replace(/<\/body>/i,`${w}
|
|
6
6
|
</body>`)}return j}
|
|
7
|
-
export{V as
|
|
7
|
+
export{V as Wg};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Ci as S}from"./chunk-bjnjpsgn.js";import{Di as g}from"./chunk-2w3302dh.js";import{Yk as A,Zk as D}from"./chunk-cn409b69.js";import{$p as P,_p as C}from"./chunk-y4c744dk.js";import{Oq as f}from"./chunk-ncnfa8ae.js";import{Sr as R}from"./chunk-w01y57f5.js";import{Iw as b}from"./chunk-y25pr13j.js";import{Sw as y}from"./chunk-q6h6yvzb.js";import V from"fs";import H from"path";var d=new Set([".DS_Store","Thumbs.db","desktop.ini",".gitkeep",".gitignore"]);function n(J,K){let X=0,z=0;if(!V.existsSync(J))return{copied:X,bytes:z};function Q(E,O){let U=V.readdirSync(E,{withFileTypes:!0});for(let W of U){if(d.has(W.name))continue;let G=H.join(E,W.name),Y=H.join(O,W.name);if(W.isDirectory())V.mkdirSync(Y,{recursive:!0}),Q(G,Y);else if(W.isFile()){if(V.existsSync(Y))continue;V.copyFileSync(G,Y),X++,z+=V.statSync(Y).size}}}return Q(J,K),{copied:X,bytes:z}}async function zq(J={}){let K=Date.now(),X=H.resolve(J.root||process.cwd()),z=H.resolve(X,J.outputDir||".output");console.log("[stx build] Starting production build...");let Q={};try{Q=await R()}catch{}let E=J.componentsDir??Q.componentsDir??"components",O=J.partialsDir??Q.partialsDir??"partials",U=J.layoutsDir??Q.layoutsDir??"layouts",W=J.publicDir??Q.publicDir??"public",G=Q.app?.head||{},Y=Q.router?.container||"main";if(V.existsSync(z))V.rmSync(z,{recursive:!0});let h=[H.join(z,"public","__stx"),H.join(z,"public","assets"),H.join(z,"server","pages"),H.join(z,"server","fragments")];for(let F of h)V.mkdirSync(F,{recursive:!0});console.log("[stx build] Discovering routes...");let I=g(X),m=["components","layouts","partials"],k=I.filter((F)=>{return!m.some((q)=>F.pattern.startsWith(`/${q}/`)||F.pattern===`/${q}`)});console.log(`[stx build] Found ${k.length} page routes (${I.length-k.length} non-page files excluded)`),console.log("[stx build] Generating shared assets...");let $=C(J.debug),Z=P();await Bun.write(H.join(z,"public","__stx",$.filename),$.content),await Bun.write(H.join(z,"public","__stx",Z.filename),Z.content),console.log(`[stx build] Runtime: ${$.filename} (${($.content.length/1024).toFixed(1)}KB)`),console.log(`[stx build] Router: ${Z.filename} (${(Z.content.length/1024).toFixed(1)}KB)`),console.log("[stx build] Compiling templates...");let v=[],N=[];for(let F of k)try{let q=await S(F.filePath,F.pattern,{componentsDir:E,partialsDir:O,layoutsDir:U,debug:J.debug});if(v.push(q),q.html=q.html.replace(/runtime\.__STX_HASH__\.js/g,$.filename).replace(/router\.__STX_HASH__\.js/g,Z.filename),q.html=b(q.html,G,{bodyScripts:[`<script src="/__stx/${Z.filename}"></script>`]}),!/<body[^>]*\bdata-stx=/.test(q.html)){let B=q.html.match(/<(?!body\b)[a-zA-Z][a-zA-Z0-9-]*\b[^>]*?\s(data-stx="[^"]+")[^>]*>/);if(B&&B[1]){let x=B[1];q.html=q.html.replace(" "+x,""),q.html=q.html.replace(/<body([^>]*)>/,`<body$1 ${x}>`)}}q.html=q.html.replace(/<style data-crosswind="generated">[\s\S]*?<\/style>\s*/g,""),q.html=await y(q.html),q.fragment=f(q.html,Y);let w=F.pattern==="/"?"index":F.pattern.slice(1).replace(/\//g,"-").replace(/[[\]]/g,"_"),M=H.join("server","pages",`${w}.compiled.json`),j=H.join("server","fragments",`${w}.html`);await Bun.write(H.join(z,M),JSON.stringify(q,null,2)),await Bun.write(H.join(z,j),q.fragment),N.push({pattern:F.pattern,compiledPath:M,fragmentPath:j,isDynamic:q.hasServerScripts,hasParams:F.pattern.includes(":")||F.pattern.includes("[")}),console.log(`[stx build] \u2713 ${F.pattern}`)}catch(q){console.error(`[stx build] \u2717 ${F.pattern}:`,q instanceof Error?q.message:q)}let _=H.resolve(X,W);if(V.existsSync(_)){let{copied:F,bytes:q}=n(_,H.join(z,"public"));if(F>0)console.log(`[stx build] Copied ${F} public asset${F===1?"":"s"} (${(q/1024).toFixed(1)}KB) from ${W}/`)}let L={runtime:$.filename,router:Z.filename},l=A(N,L,z);D(l,z);let T=Date.now()-K;return console.log(`
|
|
3
3
|
[stx build] Done in ${T}ms \u2014 ${v.length} pages compiled`),{pageCount:v.length,assets:L,outputDir:z,duration:T}}
|
|
4
|
-
export{zq as
|
|
4
|
+
export{zq as Bi};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{tb as G}from"./chunk-
|
|
2
|
+
import{tb as G}from"./chunk-91s2hres.js";import{zb as F}from"./chunk-dvfs1h3c.js";import{Jb as E}from"./chunk-3yg9hbmb.js";import{rB as J}from"./chunk-3jm3snz8.js";var k={story:{description:"Component showcase and testing",options:{port:{alias:"p",type:"number",description:"Server port (default: 6006)"},open:{alias:"o",type:"boolean",description:"Open browser automatically"},host:{type:"string",description:"Host to bind to"}},action:async(j)=>{await E(j)}},"story:dev":{description:"Start story development server",options:{port:{alias:"p",type:"number",description:"Server port (default: 6006)"},open:{alias:"o",type:"boolean",description:"Open browser automatically"},host:{type:"string",description:"Host to bind to"}},action:async(j)=>{await E(j)}},"story:build":{description:"Build static story site",options:{outDir:{alias:"o",type:"string",description:"Output directory"}},action:async(j)=>{await F(j)}},"story:preview":{description:"Preview built story site",options:{port:{alias:"p",type:"number",description:"Server port (default: 4173)"},open:{alias:"o",type:"boolean",description:"Open browser automatically"}},action:async(j)=>{await G(j)}},"story:test":{description:"Run visual regression tests",options:{update:{alias:"u",type:"boolean",description:"Update snapshots"},filter:{alias:"f",type:"string",description:"Filter components by name"}},action:async(j)=>{let{createContext:B}=await import("./story/context.js"),{runVisualTests:q,updateSnapshots:A,formatTestResults:z}=await import("./story/testing.js"),H=await B({mode:"build"});if(j.update){let D=await A(H,{filter:j.filter?[j.filter]:void 0});console.log(`Updated ${D} snapshots`)}else{let D=await q(H,{filter:j.filter?[j.filter]:void 0});if(console.log(z(D)),D.failed>0)process.exit(1)}}}};function O(j){j.command("story",k.story.description).option("-p, --port <port>",k.story.options.port.description).option("-o, --open",k.story.options.open.description).option("--host <host>",k.story.options.host.description).action(k.story.action),j.command("story dev",k["story:dev"].description).option("-p, --port <port>",k["story:dev"].options.port.description).option("-o, --open",k["story:dev"].options.open.description).option("--host <host>",k["story:dev"].options.host.description).action(k["story:dev"].action),j.command("story build",k["story:build"].description).option("-o, --outDir <dir>",k["story:build"].options.outDir.description).action(k["story:build"].action),j.command("story preview",k["story:preview"].description).option("-p, --port <port>",k["story:preview"].options.port.description).option("-o, --open",k["story:preview"].options.open.description).action(k["story:preview"].action),j.command("story test",k["story:test"].description).option("-u, --update",k["story:test"].options.update.description).option("-f, --filter <name>",k["story:test"].options.filter.description).action(k["story:test"].action)}async function Q(j=process.argv.slice(2)){let B=j[0]||"dev",q={};for(let A=1;A<j.length;A++){let z=j[A];if(z==="-p"||z==="--port")q.port=Number.parseInt(j[++A],10);else if(z==="-o"||z==="--open")q.open=!0;else if(z==="--host")q.host=j[++A];else if(z==="-u"||z==="--update")q.update=!0;else if(z==="-f"||z==="--filter")q.filter=j[++A];else if(z==="--outDir")q.outDir=j[++A]}switch(B){case"dev":case"":await E(q);break;case"build":await F(q);break;case"preview":await G(q);break;case"test":await k["story:test"].action(q);break;default:console.log("Unknown command:",B),console.log("Available commands: dev, build, preview, test"),process.exit(1)}}
|
|
3
3
|
export{k as qb,O as rb,Q as sb};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{rB as X}from"./chunk-3jm3snz8.js";function Z(k,q={}){let{includeVariants:z=!0,includeProps:A=!0,frameWidth:B=400,frameHeight:E=300,componentSpacing:K=40}=q,J={},L={},U=[],V=0;for(let Q of k){let R=j(),Y=_(Q,R,V,0,B,E,A);U.push(Y),J[R]={key:R,name:Q.name,description:Q.description||""},V+=B+K}return{name:"STX Components",lastModified:new Date().toISOString(),version:"1.0.0",document:{id:"0:0",name:"Document",type:"DOCUMENT",children:[{id:"0:1",name:"Components",type:"CANVAS",children:U}]},components:J,styles:L}}function _(k,q,z,A,B,E,K){let J=[];if(J.push({id:`${q}:title`,name:"Title",type:"TEXT",characters:k.name,style:{fontFamily:"Inter",fontWeight:600,fontSize:16},fills:[{type:"SOLID",color:{r:0,g:0,b:0,a:1}}]}),k.description)J.push({id:`${q}:desc`,name:"Description",type:"TEXT",characters:k.description,style:{fontFamily:"Inter",fontWeight:400,fontSize:12},fills:[{type:"SOLID",color:{r:0.4,g:0.4,b:0.4,a:1}}]});if(K&&k.props.length>0){let L=$(k.props,`${q}:props`);J.push(L)}return J.push({id:`${q}:preview`,name:"Preview",type:"RECTANGLE",absoluteBoundingBox:{x:0,y:0,width:B-32,height:150},fills:[{type:"SOLID",color:{r:0.95,g:0.95,b:0.95,a:1}}],strokes:[{type:"SOLID",color:{r:0.9,g:0.9,b:0.9,a:1}}],strokeWeight:1,cornerRadius:8}),{id:q,name:k.name,type:"COMPONENT",children:J,absoluteBoundingBox:{x:z,y:A,width:B,height:E},fills:[{type:"SOLID",color:{r:1,g:1,b:1,a:1}}],strokes:[{type:"SOLID",color:{r:0.9,g:0.9,b:0.9,a:1}}],strokeWeight:1,cornerRadius:12,paddingLeft:16,paddingRight:16,paddingTop:16,paddingBottom:16,itemSpacing:12,layoutMode:"VERTICAL",primaryAxisAlignItems:"MIN",counterAxisAlignItems:"MIN"}}function $(k,q){let z=[];z.push({id:`${q}:header`,name:"Props Header",type:"TEXT",characters:"Props",style:{fontFamily:"Inter",fontWeight:600,fontSize:12},fills:[{type:"SOLID",color:{r:0.4,g:0.4,b:0.4,a:1}}]});for(let A=0;A<k.length;A++){let B=k[A];z.push({id:`${q}:prop:${A}`,name:B.name,type:"TEXT",characters:`${B.name}: ${B.type}${B.required?" (required)":""}`,style:{fontFamily:"SF Mono",fontWeight:400,fontSize:11},fills:[{type:"SOLID",color:{r:0.2,g:0.2,b:0.2,a:1}}]})}return{id:q,name:"Props",type:"FRAME",children:z,fills:[{type:"SOLID",color:{r:0.98,g:0.98,b:0.98,a:1}}],cornerRadius:6,paddingLeft:12,paddingRight:12,paddingTop:8,paddingBottom:8,itemSpacing:4,layoutMode:"VERTICAL",primaryAxisAlignItems:"MIN",counterAxisAlignItems:"MIN"}}function j(){return`${Date.now()}:${Math.random().toString(36).slice(2,8)}`}async function D(k,q,z={}){let A=Z(k,z),B=JSON.stringify(A,null,2),E=await import("fs"),K=await import("path");await E.promises.mkdir(K.dirname(q),{recursive:!0}),await E.promises.writeFile(q,B)}function G(k){if(k.startsWith("#")){let z=k.slice(1),A=Number.parseInt(z.slice(0,2),16)/255,B=Number.parseInt(z.slice(2,4),16)/255,E=Number.parseInt(z.slice(4,6),16)/255,K=z.length===8?Number.parseInt(z.slice(6,8),16)/255:1;return{r:A,g:B,b:E,a:K}}let q=k.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(q)return{r:Number.parseInt(q[1])/255,g:Number.parseInt(q[2])/255,b:Number.parseInt(q[3])/255,a:q[4]?Number.parseFloat(q[4]):1};return{r:0,g:0,b:0,a:1}}function H(k){let q=Math.round(k.r*255),z=Math.round(k.g*255),A=Math.round(k.b*255);if(k.a===1)return`#${q.toString(16).padStart(2,"0")}${z.toString(16).padStart(2,"0")}${A.toString(16).padStart(2,"0")}`;return`rgba(${q}, ${z}, ${A}, ${k.a})`}function N(k){return{name:k,id:`stx-story-${k.toLowerCase().replace(/\s+/g,"-")}`,api:"1.0.0",main:"code.js",ui:"ui.html",editorType:["figma"],capabilities:["inspect"],permissions:["currentuser"]}}function T(k){let q=k.map((z)=>z.name).join(", ");return`
|
|
3
3
|
// Figma Plugin Code to import STX components
|
|
4
4
|
// Run this in Figma's plugin console
|
|
5
5
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Wg as b}from"./chunk-y5wazw6j.js";import{Xg as f,Zg as u,_g as v,ah as d,bh as p}from"./chunk-b3prs7y0.js";import{ch as y}from"./chunk-jbejwejg.js";import{dh as S}from"./chunk-k8440jxh.js";import{eh as F}from"./chunk-yj560gp8.js";import{fh as P}from"./chunk-7dy588as.js";import{Sw as D}from"./chunk-q6h6yvzb.js";var{Glob:m}=globalThis.Bun;import{cpSync as h,existsSync as T,mkdirSync as j,readFileSync as g,readdirSync as s,rmSync as r,statSync as n,unlinkSync as a,writeFileSync as A}from"fs";import{dirname as i,join as H,relative as o}from"path";import w from"process";import e from"bun-plugin-stx";async function Aq(q){let N=Date.now(),V=q.pagesDir??"pages",K=q.outDir??"dist",Q=q.publicDir??"public";if(!q.noClean)r(K,{recursive:!0,force:!0});j(K,{recursive:!0});let B=new m(`${V}/**/*.stx`),Z=await Array.fromAsync(B.scan("."));if(Z.length===0)throw Error(`No .stx files found in ${V}/`);let _=await Bun.build({entrypoints:Z,outdir:K,plugins:[e()],naming:{entry:"[name].[ext]"}});if(!_.success)throw console.error(_.logs),Error("Build failed");qq(K);let $=z(K).filter((G)=>G.endsWith(".html")),X=f(q,w.cwd()),M=new Set($.map(I));for(let G of $){let E=H(K,G),x=g(E,"utf8"),J=I(G),O=X?X.locales:[q.seo?.locale?.split(/[_-]/)[0]??"en"];for(let W of O){let Y=x;if(Y=Kq(Y),X)Y=u(Y,X,W);if(Y=await D(Y,w.cwd()),Y=F(Y,q,q.pages?.[J],J),X)Y=Nq(Y,q,X,W,J),Y=Qq(Y,W,X.defaultLocale,M);if(Y=b(Y,q),Y=Vq(Y),X)Y=Y.replace(/<\/body>/i,`${p(X,W)}
|
|
3
3
|
</body>`);if(q.spa!==!1)Y=await S(Y,q.router);let C=X?l(J,W,X.defaultLocale):G,L=H(K,C);if(j(t(L),{recursive:!0}),A(L,Y),X&&W!==X.defaultLocale&&C!==G);}}if(T(Q))h(Q,K,{recursive:!0});let R=H(K,"404.html");if(!T(R)&&T(H(K,"index.html"))){let G=g(H(K,"index.html"),"utf8").replace(/<title>[^<]*<\/title>/i,`<title>404 \u2014 ${Xq(q.name)}</title>`);A(R,G)}if(q.sitemap!==!1){let G=[],E=$.filter((J)=>J!=="404.html").map(I),x=X?X.locales:[null];for(let J of E){let O=q.pages?.[J];for(let W of x){let Y=W&&X?v(J,W,X.defaultLocale):J;G.push({path:Y,page:O})}}A(H(K,"sitemap.xml"),P(q,G))}let U=y(q);if(U!==null)A(H(K,"robots.txt"),U);let c=$.map(I);return{outDir:K,pages:c,durationMs:Date.now()-N}}function t(q){return i(q)}function l(q,N,V){let K=v(q,N,V);if(K==="/")return"index.html";let Q=K.replace(/^\//,"").replace(/\/$/,"");if(!Q.includes("/")){if(N!==V&&Q===N)return`${N}/index.html`;return`${Q}.html`}return`${Q}.html`.replace(/\.html\.html$/,".html")}function I(q){if(q==="index.html")return"/";return`/${q.replace(/\.html$/,"").replace(/\/index$/,"")}`}function z(q,N=q){let V=[];if(!T(q))return V;for(let K of s(q,{withFileTypes:!0})){let Q=H(q,K.name);if(K.isDirectory())V.push(...z(Q,N));else V.push(o(N,Q))}return V}function qq(q){for(let N of z(q)){if(!/^chunk-.*\.js(?:\.map)?$/.test(N))continue;let V=H(q,N);try{if(n(V).size===0)a(V)}catch{}}}function Kq(q){return q.replace(/<script[^>]*src=["']\.\/chunk-[^"']*\.js["'][^>]*><\/script>\s*/g,"")}function Nq(q,N,V,K,Q){if(!V)return q;if(/<html\b[^>]*\blang=/i.test(q))q=q.replace(/<html\b([^>]*)\blang="[^"]*"/i,`<html$1lang="${K}"`);else q=q.replace(/<html\b([^>]*)>/i,`<html$1 lang="${K}">`);let B=`${N.url.replace(/\/$/,"")}${v(Q,K,V.defaultLocale)}`;if(/<link rel="canonical"/.test(q))q=q.replace(/<link rel="canonical"[^>]*>/,`<link rel="canonical" href="${k(B)}">`);let Z=K.includes("_")||K.includes("-")?K:K.toLowerCase();if(/<meta property="og:locale"/.test(q))q=q.replace(/<meta property="og:locale"[^>]*>/,`<meta property="og:locale" content="${k(Z)}">`);if(/<meta property="og:url"/.test(q))q=q.replace(/<meta property="og:url"[^>]*>/,`<meta property="og:url" content="${k(B)}">`);let _=d(N.url,Q,V);if(!q.includes("hreflang="))q=q.replace(/<link rel="canonical"[^>]*>/,($)=>`${_}
|
|
4
4
|
${$}`);return q}function k(q){return q.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function Qq(q,N,V,K){if(N===V)return q;return q.replace(/<a\b([^>]*?)\bhref="(\/[^"]*)"([^>]*)>/gi,(Q,B,Z,_)=>{if(Z.startsWith("//"))return Q;if(Z===`/${N}`||Z===`/${N}/`||Z.startsWith(`/${N}/`))return Q;let $=Z.match(/^(\/[^?#]*)(.*)$/);if(!$)return Q;let[,X,M]=$,R=X==="/"?"/":X.replace(/\/$/,"");if(!K.has(R))return Q;let U=R==="/"?`/${N}/`:`/${N}${R}`;return`<a${B}href="${U}${M}"${_}>`})}function Vq(q){if(/<main\b/i.test(q)||/\bdata-stx-content\b/i.test(q))return q;let N=q.match(/<body\b[^>]*>/i),V=q.search(/<\/body\s*>/i);if(!N||V<0)return q;let K=N.index+N[0].length,Q=q.slice(K,V),B=0,Z=[...Q.matchAll(/<\/nav>/gi)];if(Z.length>0){let U=Z[Z.length-1];B=U.index+U[0].length}let _=Q.length,$=Q.search(/<footer\b/i);if($!==-1)_=Math.min(_,$);let X=Q.search(/<script\b[^>]*data-stx-(?:theme-toggle|reparent-progress)\b/i);if(X!==-1)_=Math.min(_,X);if(_<=B)return q;let M=Q.slice(B,_);if(!M.trim())return q;let R=`${Q.slice(0,B)}
|
|
5
5
|
<main>${M}</main>
|
|
6
6
|
${Q.slice(_)}`;return`${q.slice(0,K)}${R}${q.slice(V)}`}function Xq(q){return q.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function Iq(q){return q}
|
|
7
|
-
export{Aq as
|
|
7
|
+
export{Aq as Ug,Iq as Vg};
|
|
@@ -5,4 +5,4 @@ ${C.join(`
|
|
|
5
5
|
<!-- /SEO -->`,M=/<!--\s*stx SEO Tags\s*-->[\s\S]*?<meta\s+name="twitter:description"[^>]*>\s*/i;if(M.test(q))q=q.replace(M,"");if(q=q.replace(/<!--\s*SEO\s*-->[\s\S]*?<!--\s*\/SEO\s*-->\s*/g,""),q=q.replace(/<title>[\s\S]*?<\/title>\s*/i,""),q=q.replace(/<meta\s+name="title"\s+content="stx Project"[^>]*>\s*/g,"").replace(/<meta\s+name="description"\s+content="A website built with stx[^"]*"[^>]*>\s*/g,"").replace(/<meta\s+property="og:title"\s+content="stx Project"[^>]*>\s*/g,"").replace(/<meta\s+property="og:description"\s+content="A website built with stx[^"]*"[^>]*>\s*/g,"").replace(/<meta\s+property="og:type"\s+content="website"[^>]*>\s*/g,"").replace(/<meta\s+name="twitter:card"\s+content="summary_large_image"[^>]*>\s*/g,"").replace(/<meta\s+name="twitter:title"\s+content="stx Project"[^>]*>\s*/g,"").replace(/<meta\s+name="twitter:description"\s+content="A website built with stx[^"]*"[^>]*>\s*/g,""),/<head[^>]*>/i.test(q))return q.replace(/<head([^>]*)>/i,`<head$1>
|
|
6
6
|
${L}`);return`${L}
|
|
7
7
|
${q}`}function w(q){return q.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function W(q){return q.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}
|
|
8
|
-
export{X as
|
|
8
|
+
export{X as eh};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var O=new Set(["disabled","checked","readonly","required","autofocus","autoplay","controls","default","defer","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","reversed","selected"]);function L(k){if(typeof k==="string")return k;if(Array.isArray(k))return k.filter(Boolean).map((F)=>L(F)).join(" ");if(k&&typeof k==="object")return Object.entries(k).filter(([,F])=>F).map(([F])=>F).join(" ");return k?String(k):""}function B(k,F){if(!/:[\w-]+=/.test(k))return k;let Q=k,P=/<(script|style)\b[^>]*>[\s\S]*?<\/\1>/gi,E=[],q;while((q=P.exec(k))!==null)E.push([q.index,q.index+q[0].length]);function V(D){return E.some(([G,U])=>D>=G&&D<U)}let _=/<([a-zA-Z][a-zA-Z0-9-]*)((?:\s+(?:[^>"']|"[^"]*"|'[^']*'))*)\s*\/?>/g,Z=[];while((q=_.exec(Q))!==null){if(V(q.index))continue;let D=q[0],G=q[2];if(!G||!G.includes(":"))continue;let U=/\s:([a-zA-Z_][\w-]*)\s*=\s*"([^"]*)"/g,z,j=G,X=!1;while((z=U.exec(G))!==null){let I=z[1],H=z[2];if(H.includes("()")&&!H.includes(".get(")||H.includes("$store")||H.includes("$ref"))continue;try{let Y=Object.keys(F),K=Object.values(F),$=H.match(/^([a-zA-Z_$][\w$]*)/);if($&&!Y.includes($[1])&&!["true","false","null","undefined","Math","JSON","String","Number","Array","Object","Date","parseInt","parseFloat"].includes($[1]))continue;let J=Function(...Y,`return (${H})`)(...K);if(I==="class"){let W=L(J);if(W){let b=j.match(/\sclass="([^"]*)"/);if(b)j=j.replace(b[0],` class="${b[1]} ${W}"`);else j=j.replace(z[0],` class="${W}"`)}else j=j.replace(z[0],"");X=!0;continue}if(O.has(I)){if(J)j=j.replace(z[0],` ${I}`);else j=j.replace(z[0],"");X=!0;continue}if(J===null||J===void 0||J===!1)j=j.replace(z[0],"");else{let W=String(J).replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">");j=j.replace(z[0],` ${I}="${W}"`)}X=!0}catch{continue}}if(X){let I=D.endsWith("/>")?" /":"",Y=`<${q[1]}${j}${I}>`;Z.push({start:q.index,end:q.index+D.length,replacement:Y})}}for(let D=Z.length-1;D>=0;D--){let{start:G,end:U,replacement:z}=Z[D];Q=Q.slice(0,G)+z+Q.slice(U)}return Q}
|
|
3
|
-
export{B as
|
|
3
|
+
export{B as Jt};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{O as
|
|
2
|
+
import{hy as y}from"./chunk-mrehzhxv.js";function O(j,H){let F=R(j,H);return F.ok?{expression:F.expression,endPos:F.endPos}:null}function R(j,H){let F=H;while(F<j.length&&/\s/.test(j[F]))F++;if(j[F]!=="(")return{ok:!1,reason:"missing-open-paren",pos:F};let L=y(j,"(",")",F);if(L===-1)return{ok:!1,reason:"unclosed-paren",pos:F};return{ok:!0,expression:j.slice(F+1,L),endPos:L+1}}function z(j,H,F,L){let Q=1,A=L,V=new RegExp(`@${H}\\s*\\(`,"g"),J=new RegExp(`@${F}(?![a-z])`,"g");while(A<j.length&&Q>0){V.lastIndex=A,J.lastIndex=A;let W=V.exec(j),q=J.exec(j),G=W?W.index:1/0,U=q?q.index:1/0;if(G<U)Q++,A=G+W[0].length;else if(U<1/0){if(Q--,Q===0)return U;A=U+q[0].length}else break}return-1}function I(j,H){let F=j.slice(H).match(/^@if\s*/);if(!F)return null;let L=H+F[0].length,Q=O(j,L);if(!Q)return null;let A=Q.endPos,V=z(j,"if","endif",A);if(V===-1)return null;let J=j.slice(A,V),W=[],q=0,G="if",U=Q.expression,K=0,Z=0;while(q<J.length){let X=J.indexOf("@",q);if(X===-1)break;q=X;let Y=J.substring(X);if(/^@if\s*\(/.test(Y)){Z++,q++;continue}if(/^@endif(?![a-z])/.test(Y)){Z--,q+=6;continue}if(Z===0){let _=Y.match(/^@elseif\s*/);if(_){W.push({type:G,condition:U,content:J.substring(K,q),start:A+K,end:A+q});let B=q+_[0].length,$=O(J,B);if(!$){q++;continue}G="elseif",U=$.expression,q=$.endPos,K=q;continue}else if(/^@else(?![a-z])/.test(Y)){W.push({type:G,condition:U,content:J.substring(K,q),start:A+K,end:A+q}),G="else",U=void 0,q+=5,K=q;continue}}q++}return W.push({type:G,condition:U,content:J.slice(K),start:A+K,end:A+J.length}),{fullMatch:j.slice(H,V+6),branches:W,start:H,end:V+6}}function v(j){let H=[],F=/@if\s*\(/g,L=F.exec(j);while(L!==null){if(H.some((V)=>L.index>V.start&&L.index<V.end)){L=F.exec(j);continue}let A=I(j,L.index);if(A)H.push(A),F.lastIndex=A.end;L=F.exec(j)}return H}function w(j,H,F){let L=[],Q=new RegExp(`@${H}\\s*\\(`,"g"),A=Q.exec(j);while(A!==null){if(L.some((Y)=>A.index>Y.start&&A.index<Y.end)){A=Q.exec(j);continue}let J=A.index,W=J+A[0].length-1,q=y(j,"(",")",W);if(q===-1){A=Q.exec(j);continue}let G=j.slice(W+1,q),U=q+1,K=z(j,H,F,U);if(K===-1){A=Q.exec(j);continue}let Z=j.slice(U,K),X=K+`@${F}`.length;L.push({fullMatch:j.slice(J,X),name:H,params:G,content:Z,start:J,end:X}),Q.lastIndex=X,A=Q.exec(j)}return L}function D(j,H){let F=j.slice(H).match(/^@switch\s*/);if(!F)return null;let L=H+F[0].length,Q=O(j,L);if(!Q)return null;let A=Q.endPos,V=z(j,"switch","endswitch",A);if(V===-1)return null;let J=j.slice(A,V),W=[],q=0,G=null,U=0;while(q<J.length){let K=J.slice(q),Z=K.match(/^@switch\s*\(/),X=K.match(/^@endswitch(?![a-z])/);if(Z){if(U++,G)G.content+=Z[0];q+=Z[0].length;continue}if(X){if(U--,G)G.content+=X[0];q+=X[0].length;continue}if(U>0){if(G)G.content+=J[q];q++;continue}let Y=K.match(/^@case\s*/),_=K.match(/^@default(?![a-z])/),B=K.match(/^@break(?![a-z])/);if(Y&&K.startsWith("@case")){if(G)W.push(G);let $=q+Y[0].length,k=O(J,$);if(!k){q++;continue}G={type:"case",value:k.expression,content:""},q=k.endPos}else if(_&&K.startsWith("@default")){if(G)W.push(G);G={type:"default",content:""},q+=_[0].length}else if(B&&K.startsWith("@break"))q+=B[0].length;else{if(G)G.content+=J[q];q++}}if(G)W.push(G);return{fullMatch:j.slice(H,V+10),expression:Q.expression,cases:W,start:H,end:V+10}}
|
|
3
|
+
export{O as $x,R as ay,z as by,I as cy,v as dy,w as ey,D as fy};
|
|
@@ -144,4 +144,4 @@ var N=new Map,Q=new Map;function T(A){if(N.set(A.name,A),A.client)Q.set(A.name,A
|
|
|
144
144
|
console.log('[stx] Directive runtime initialized');
|
|
145
145
|
})();
|
|
146
146
|
`}function $(A){let B=/v-(\w+)(?::(\w+))?(?:\.([\w.]+))?="([^"]*)"/g;return A.replace(B,(C,F,H,L,J)=>{let E=(L?L.split("."):[]).reduce((M,S)=>{return M[S]=!0,M},{});return`data-stx-directive="${F}:${J}" data-stx-directive-arg="${H||""}" data-stx-directive-modifiers='${JSON.stringify(E)}'`})}
|
|
147
|
-
export{T as
|
|
147
|
+
export{T as uw,V as vw,W as ww,X as xw,G as yw,Y as zw,Z as Aw,_ as Bw,$ as Cw};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{d as
|
|
2
|
+
import{Sk as I,Xk as w}from"./chunk-5ggw1dyv.js";import{rB as v}from"./chunk-3jm3snz8.js";import{resolve as E,basename as T,extname as W,join as $}from"path";import{mkdir as j}from"fs/promises";async function B(){try{return await import("ts-videos")}catch{return null}}async function d(A,q,C,Y){let G=await B();if(!G)return console.warn("[stx-media] ts-videos not installed, cannot generate poster"),null;try{let y=E(A);if(!await w(y))return null;await j(C,{recursive:!0});let N=await I(y),O=T(A,W(A)),M=q.format||"webp",_=q.timestamp||0,S=`${O}-poster-${N}.${M}`,L=$(C,S),J=await G.extractThumbnails(y,{timestamps:[_],width:q.width||1280,height:q.height,format:M,quality:q.quality||85,outputDir:C,outputPattern:S.replace(`.${M}`,"")});if(J&&J.length>0){let K=J[0];return{path:L,url:`${Y}/${S}`,width:K.width||q.width||1280,height:K.height||720,timestamp:_,size:K.size||0}}return null}catch(y){return console.warn(`[stx-media] Failed to generate poster: ${y}`),null}}async function c(A,q,C,Y){let G=await B();if(!G)return[];try{let y=E(A);if(!await w(y))return[];await j(C,{recursive:!0});let N=await I(y),O=T(A,W(A)),M=q.format||"webp",L=(await new G.Input(y).getInfo()).duration||60,J=q.count||10,K=q.interval||L/J,Q=[];for(let z=0;z<J&&z*K<L;z++)Q.push(z*K);let R=await G.extractThumbnails(y,{timestamps:Q,width:q.width||320,format:M,quality:q.quality||80,outputDir:C,outputPattern:`${O}-thumb-${N}`});if(R&&R.length>0)return R.map((z,X)=>({path:z.path||$(C,`${O}-thumb-${N}-${X}.${M}`),url:`${Y}/${O}-thumb-${N}-${X}.${M}`,width:z.width||q.width||320,height:z.height||180,timestamp:Q[X],size:z.size||0}));return[]}catch(y){return console.warn(`[stx-media] Failed to generate thumbnails: ${y}`),[]}}async function l(A,q,C,Y){let G=await B();if(!G)return console.warn("[stx-media] ts-videos not installed, cannot generate sprite sheet"),null;try{let y=E(A);if(!await w(y))return null;await j(C,{recursive:!0});let N=await I(y),O=T(A,W(A)),S=(await new G.Input(y).getInfo()).duration||60,L=q.columns||10,J=q.interval||5,K=q.thumbnailWidth||160,Q=q.thumbnailHeight||90,R=q.format||"jpeg",z=Math.ceil(S/J),X=Math.ceil(z/L),U=`${O}-sprite-${N}.${R}`,H=$(C,U),g=[];for(let Z=0;Z<z;Z++)g.push(Z*J);let k=await G.extractThumbnails(y,{timestamps:g,width:K,height:Q,format:R,quality:q.quality||70,outputDir:$(C,".temp")});if(!k||k.length===0)return null;try{let Z=await import("ts-images"),V=L*K,x=X*Q,f=await Z.createSprite({images:k.map((F)=>F.path),columns:L,padding:0,outputPath:H,format:R,quality:q.quality||70});return{url:`${Y}/${U}`,path:H,columns:L,rows:X,thumbnailWidth:K,thumbnailHeight:Q,interval:J,totalFrames:z}}catch{return console.warn("[stx-media] ts-images not installed, sprite sheet generation skipped"),null}}catch(y){return console.warn(`[stx-media] Failed to generate sprite sheet: ${y}`),null}}
|
|
3
|
+
export{d as Aj,c as Bj,l as Cj};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{rB as B}from"./chunk-3jm3snz8.js";async function K(){try{return typeof(await import("@stacksjs/desktop")).createWindowWithHTML==="function"}catch{return!1}}async function N(q,b,u,f={}){try{let z=await import("@stacksjs/desktop"),A=b.story?.variants.find((C)=>C.id===u);if(!A)return null;let D=f.title||`${b.fileName} - ${A.title}`,E=F(q,b,A),J=await z.createWindowWithHTML(E,{title:D,width:f.width||800,height:f.height||600});return{close:()=>{},reload:()=>{},update:(C)=>{}}}catch(z){return console.warn("Desktop preview not available:",z),null}}function F(q,b,u){let{theme:f}=q.config;return`<!DOCTYPE html>
|
|
3
3
|
<html lang="en">
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="UTF-8">
|
|
@@ -4,4 +4,4 @@ function K(b){if(b===String)return"string";if(b===Number)return"number";if(b===B
|
|
|
4
4
|
${D}`)}return{props:F,validation:C}}function Y(b,j){let q={...b};for(let[B,z]of Object.entries(j))if(q[B]===void 0)q[B]=typeof z==="function"?z():z;return q}function Z(b){return b}function _(b){return{type:b,required:!0}}function $(b,j){return{type:j,default:b}}function G(b,j={}){return{...j,validator:b}}function M(b,j={}){return{...j,validator:(q)=>b.includes(q)}}function S(b,j={}){return{...j,type:Array,validator:(q)=>{if(!Array.isArray(q))return!1;return!0}}}function U(b,j={}){return{...j,type:Object}}function h(b,j,q){if(!j)return b;let B={};for(let[z,A]of Object.entries(j)){let F=typeof A==="function"||Array.isArray(A)?{type:A}:A||{},C=b[z];if(C===void 0&&F.default!==void 0)C=typeof F.default==="function"?F.default():F.default;{let D=L(z,C,F,q);if(D)console.warn(D.message)}B[z]=C}for(let[z,A]of Object.entries(b))if(!(z in B))B[z]=A;return B}function E(){let b=globalThis.__STX_CURRENT_ELEMENT__;return(j,q)=>{if(b){let B=new CustomEvent(String(j),{detail:q,bubbles:!0,cancelable:!0});b.dispatchEvent(B)}else console.warn(`Cannot emit event "${String(j)}" - no element context`)}}function W(b){let j=globalThis.__STX_CURRENT_ELEMENT__;if(j)j.__stx_exposed__=b,j.setAttribute("data-stx-exposed",Object.keys(b).join(","))}function V(b,j){let q=[`interface ${b}Props {`];for(let[B,z]of Object.entries(j)){let A=typeof z==="function"||Array.isArray(z)?{type:z}:z||{},F=A.type?K(A.type):"unknown",C=A.required?"":"?",D=A.description?` /** ${A.description} */
|
|
5
5
|
`:"";q.push(`${D} ${B}${C}: ${F}`)}return q.push("}"),q.join(`
|
|
6
6
|
`)}
|
|
7
|
-
export{R as
|
|
7
|
+
export{R as Oi,X as Pi,Y as Qi,Z as Ri,_ as Si,$ as Ti,G as Ui,M as Vi,S as Wi,U as Xi,h as Yi,E as Zi,W as _i,V as $i};
|
package/dist/cli.js
CHANGED
|
@@ -20409,7 +20409,7 @@ else {
|
|
|
20409
20409
|
`)}function vN($,Z){let Y=" ".repeat(Z),X=[];for(let[K,W]of Object.entries($.props))if(W.type==="literal"){let U=typeof W.value==="string"?`"${W.value}"`:String(W.value);X.push(`${K}: ${U}`)}let J=X.length>0?`{ ${X.join(", ")} }`:"{}",Q=$.children.map((K)=>K.type==="text"?`"${K.props.text?.type==="literal"?K.props.text.value:""}"`:vN(K,Z+1)),G=Q.length>0?`,
|
|
20410
20410
|
${Y} [${Q.join(`,
|
|
20411
20411
|
${Y} `)}]`:"";return`Craft.create("${$.zigType}", ${J}${G})`}function Cf($,Z,Y){if(Z.target==="universal"){let X=[];X.push("// Universal entry point"),X.push("");for(let[J,Q]of Y)X.push(`// --- ${J.toUpperCase()} ---`),X.push(`#if ${J.toUpperCase()}`),X.push(Q),X.push("#endif"),X.push("");return X.join(`
|
|
20412
|
-
`)}return Y.get(Z.target)||IW($,Z)}function bf($,Z,Y){let X=[];function J(Q){X.push({name:Q.zigType,hash:gN(JSON.stringify(Q.props)),props:Object.keys(Q.props),events:Array.from(Q.events.keys()),slots:[],isNative:Q.zigType.startsWith("craft.")});for(let G of Q.children)J(G)}return J(Z),{version:"1.0.0",components:X,entry:$.id,assets:[],styles:$.styles}}function Pf($,Z){return JSON.stringify({version:3,file:"output.zig",sources:["input.stx"],mappings:""})}function fN(){return`id_${++yf}`}function gN($){let Z=0;for(let Y=0;Y<$.length;Y++){let X=$.charCodeAt(Y);Z=(Z<<5)-Z+X,Z=Z&Z}return Math.abs(Z).toString(36)}function xf($){return $.charAt(0).toUpperCase()+$.slice(1)}function vf($){let Z=[],Y=/<script[^>]*>([\s\S]*?)<\/script>/gi,X;while((X=Y.exec($))!==null)Z.push(X[1]);return Z}function ff($){let Z=[],Y=/<style[^>]*>([\s\S]*?)<\/style>/gi,X;while((X=Y.exec($))!==null)Z.push(X[1]);return Z}function DW($){let Z=$.type==="component"?1:0;if($.children)for(let Y of $.children)Z+=DW(Y);return Z}function kW($){let Z=$.zigType.startsWith("craft.")?1:0;for(let Y of $.children)Z+=kW(Y);return Z}function hN($){return{start:async()=>{console.log("[craft-compiler] Hot reload server started")},stop:async()=>{console.log("[craft-compiler] Hot reload server stopped")},notifyChange:(Z)=>{console.log(`[craft-compiler] File changed: ${Z}`)}}}var SW,yf=0,gf,hf;var uN=D(()=>{SW=new Map([["craft-button",{name:"Button",zigType:"craft.Button",props:[{name:"variant",type:"string",required:!1,default:"primary"},{name:"disabled",type:"boolean",required:!1,default:!1},{name:"onclick",type:"callback",required:!1}],children:"single"}],["craft-text-input",{name:"TextInput",zigType:"craft.TextInput",props:[{name:"value",type:"string",required:!1,default:""},{name:"placeholder",type:"string",required:!1},{name:"disabled",type:"boolean",required:!1,default:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-textarea",{name:"TextArea",zigType:"craft.TextArea",props:[{name:"value",type:"string",required:!1,default:""},{name:"placeholder",type:"string",required:!1},{name:"rows",type:"number",required:!1,default:3},{name:"disabled",type:"boolean",required:!1,default:!1}],children:"none"}],["craft-checkbox",{name:"Checkbox",zigType:"craft.Checkbox",props:[{name:"checked",type:"boolean",required:!1,default:!1},{name:"label",type:"string",required:!1},{name:"disabled",type:"boolean",required:!1,default:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-select",{name:"Select",zigType:"craft.Select",props:[{name:"value",type:"string",required:!1},{name:"options",type:"array",required:!0},{name:"disabled",type:"boolean",required:!1,default:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-slider",{name:"Slider",zigType:"craft.Slider",props:[{name:"value",type:"number",required:!1,default:0},{name:"min",type:"number",required:!1,default:0},{name:"max",type:"number",required:!1,default:100},{name:"step",type:"number",required:!1,default:1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-toggle",{name:"Toggle",zigType:"craft.Toggle",props:[{name:"checked",type:"boolean",required:!1,default:!1},{name:"disabled",type:"boolean",required:!1,default:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-modal",{name:"Modal",zigType:"craft.Modal",props:[{name:"open",type:"boolean",required:!1,default:!1},{name:"title",type:"string",required:!1},{name:"closable",type:"boolean",required:!1,default:!0},{name:"onclose",type:"callback",required:!1}],children:"multiple"}],["craft-alert",{name:"Alert",zigType:"craft.Alert",props:[{name:"variant",type:"string",required:!1,default:"info"},{name:"title",type:"string",required:!1},{name:"dismissible",type:"boolean",required:!1,default:!1}],children:"single"}],["craft-progress",{name:"ProgressBar",zigType:"craft.ProgressBar",props:[{name:"value",type:"number",required:!1,default:0},{name:"max",type:"number",required:!1,default:100},{name:"indeterminate",type:"boolean",required:!1,default:!1}],children:"none"}],["craft-spinner",{name:"Spinner",zigType:"craft.Spinner",props:[{name:"size",type:"number",required:!1,default:24}],children:"none"}],["craft-avatar",{name:"Avatar",zigType:"craft.Avatar",props:[{name:"src",type:"string",required:!1},{name:"alt",type:"string",required:!1},{name:"size",type:"number",required:!1,default:40}],children:"none"}],["craft-badge",{name:"Badge",zigType:"craft.Badge",props:[{name:"variant",type:"string",required:!1,default:"default"}],children:"single"}],["craft-card",{name:"Card",zigType:"craft.Card",props:[{name:"padding",type:"number",required:!1,default:16}],children:"multiple"}],["craft-sidebar",{name:"Sidebar",zigType:"craft.NativeSidebar",props:[{name:"id",type:"string",required:!1},{name:"variant",type:"string",required:!1,default:"desktop"},{name:"material",type:"string",required:!1,default:"sidebar"},{name:"backgroundEffect",type:"string",required:!1,default:"shimmer"},{name:"allowsVibrancy",type:"boolean",required:!1,default:!0},{name:"materialOpacity",type:"number",required:!1,default:0.68},{name:"minWidth",type:"number",required:!1,default:240},{name:"maxWidth",type:"number",required:!1,default:340},{name:"canCollapse",type:"boolean",required:!1,default:!0},{name:"selectedItem",type:"string",required:!1},{name:"sections",type:"array",required:!1}],children:"multiple",platform:["macos"],fallback:"aside"}],["craft-sidebar-section",{name:"SidebarSection",zigType:"craft.NativeSidebarSection",props:[{name:"id",type:"string",required:!0},{name:"title",type:"string",required:!1},{name:"header",type:"string",required:!1}],children:"multiple",platform:["macos"],fallback:"section"}],["craft-sidebar-item",{name:"SidebarItem",zigType:"craft.NativeSidebarItem",props:[{name:"id",type:"string",required:!0},{name:"label",type:"string",required:!0},{name:"icon",type:"string",required:!1},{name:"badge",type:"string",required:!1},{name:"tintColor",type:"color",required:!1}],children:"none",platform:["macos"],fallback:"button"}],["craft-accordion",{name:"Accordion",zigType:"craft.Accordion",props:[{name:"title",type:"string",required:!0},{name:"open",type:"boolean",required:!1,default:!1}],children:"multiple"}],["craft-tabs",{name:"TabView",zigType:"craft.TabView",props:[{name:"activeTab",type:"number",required:!1,default:0},{name:"ontabchange",type:"callback",required:!1}],children:"multiple"}],["craft-tooltip",{name:"Tooltip",zigType:"craft.Tooltip",props:[{name:"content",type:"string",required:!0},{name:"position",type:"string",required:!1,default:"top"}],children:"single"}],["craft-date-picker",{name:"DatePicker",zigType:"craft.DatePicker",props:[{name:"value",type:"string",required:!1},{name:"min",type:"string",required:!1},{name:"max",type:"string",required:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-time-picker",{name:"TimePicker",zigType:"craft.TimePicker",props:[{name:"value",type:"string",required:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-color-picker",{name:"ColorPicker",zigType:"craft.ColorPicker",props:[{name:"value",type:"color",required:!1,default:"#000000"},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-data-table",{name:"DataTable",zigType:"craft.DataTable",props:[{name:"data",type:"array",required:!0},{name:"columns",type:"array",required:!0},{name:"sortable",type:"boolean",required:!1,default:!1},{name:"paginated",type:"boolean",required:!1,default:!1}],children:"none"}],["craft-virtual-list",{name:"VirtualList",zigType:"craft.VirtualList",props:[{name:"items",type:"array",required:!0},{name:"itemHeight",type:"number",required:!1,default:48},{name:"renderItem",type:"callback",required:!0}],children:"none"}],["craft-tree-view",{name:"TreeView",zigType:"craft.TreeView",props:[{name:"data",type:"object",required:!0},{name:"expandable",type:"boolean",required:!1,default:!0}],children:"none"}]]);gf={compileToNative:CN,createHotReloadServer:hN,NATIVE_COMPONENTS:SW},hf=gf});import{spawn as lN}from"child_process";import y0 from"fs";import df from"os";import Y0 from"path";import v from"process";import{CLI as uf}from"@stacksjs/clapp";var N6="0.2.93";X$();YW();zG();AG();g4();LG();nK();var __dirname="/home/runner/work/stx/stx/packages/stx/bin",O0=new uf("stx");function mN($){let Z=typeof $==="string"?Number.parseInt($,10):$;if(Number.isNaN(Z))return{isValid:!1,error:"Port must be a valid number",suggestion:"Try using a number between 1024 and 65535"};if(Z<1024||Z>65535)return{isValid:!1,error:"Port must be between 1024 and 65535",suggestion:"Try using a port between 1024 and 65535"};return{isValid:!0}}function cN($){try{if(!y0.existsSync($)){let Y=Y0.dirname($),X=Y0.basename($);if(y0.existsSync(Y)){let Q=y0.readdirSync(Y).filter((K)=>K.toLowerCase().includes(X.toLowerCase().substring(0,3))||K.endsWith(".stx")||K.endsWith(".md")),G=Q.length>0?`File not found. Similar files in ${Y}: ${Q.slice(0,3).join(", ")}`:`File not found. Directory ${Y} exists but doesn't contain the specified file.`;return{isValid:!1,error:`File does not exist: ${$}`,suggestion:G}}return{isValid:!1,error:`File does not exist: ${$}`,suggestion:"Check the file path and try again"}}if(y0.statSync($).isDirectory())return{isValid:!1,error:`Expected file but got directory: ${$}`,suggestion:"Specify a .stx or .md file path"};return{isValid:!0}}catch(Z){return{isValid:!1,error:`Cannot access file: ${$}`,suggestion:"Check file permissions and path"}}}function CW($){let Z=typeof $==="string"?Number.parseInt($,10):$;if(Number.isNaN(Z))return{isValid:!1,error:"Timeout must be a valid number",suggestion:"Specify timeout in milliseconds (e.g., 5000 for 5 seconds)"};if(Z<100)return{isValid:!1,error:"Timeout too short (minimum 100ms)",suggestion:"Use a timeout of at least 100ms"};if(Z>300000)return{isValid:!1,error:"Timeout too long (maximum 5 minutes)",suggestion:"Use a timeout of less than 300000ms (5 minutes)"};return{isValid:!0}}var v5=($)=>$.includes("*")||$.includes("?")||$.includes("{")||$.includes("["),mf=($)=>$.endsWith(".stx")||$.endsWith(".md");function x5($,Z=1){if(console.error(`\u274C ${$.error}`),$.suggestion)console.error(`\uD83D\uDCA1 suggestion: ${$.suggestion}`);v.exit(Z)}async function cf($,Z){try{let Y=["test"],X=[];if($&&$.length>0)for(let W of $)if(v5(W))try{let U=await Array.fromAsync(new Bun.Glob(W).scan({onlyFiles:!0,absolute:!0}));if(U.length===0)console.warn(`Warning: No files found matching pattern: ${W}`);else if(X.push(...U),Z.verbose)console.log(`Found ${U.length} file(s) matching pattern: ${W}`)}catch(U){return console.error(`Error expanding glob pattern ${W}:`,U),!1}else X.push(W);if(X.length===0)return console.error("Error: No test files found matching the provided patterns."),!1;if(Y.push(...X),Z.filter)Y.push("--pattern",Z.filter);if(Z.timeout)Y.push("--timeout",Z.timeout.toString());if(Z.reporter&&Z.reporter!=="default")if(Z.reporter==="junit"){let W=Y0.join(df.tmpdir(),`stx-test-report-${Date.now()}.xml`);Y.push("--reporter",Z.reporter),Y.push("--reporter-outfile",W)}else console.warn(`Warning: Reporter '${Z.reporter}' is not supported. Using default reporter.`);if(Z.coverage)Y.push("--coverage");if(Z.watch)Y.push("--watch");Y.push("--preload",Y0.join(__dirname,"../../../test-utils/happy-dom.ts"));let J={...v.env,STX_TEST_MODE:"true",STX_TEST_UI:Z.ui?"true":"false",STX_TEST_VERBOSE:Z.verbose?"true":"false"},Q="bun";if(Z.verbose)console.log(`Running: ${Q} ${Y.join(" ")}`);let G=performance.now(),K=lN(Q,Y,{stdio:"inherit",shell:!1,env:J});return new Promise((W)=>{K.on("close",(U)=>{let z=((performance.now()-G)/1000).toFixed(2);if(U===0)W(!0);else W(!1)}),v.on("SIGINT",()=>{console.log(`
|
|
20412
|
+
`)}return Y.get(Z.target)||IW($,Z)}function bf($,Z,Y){let X=[];function J(Q){X.push({name:Q.zigType,hash:gN(JSON.stringify(Q.props)),props:Object.keys(Q.props),events:Array.from(Q.events.keys()),slots:[],isNative:Q.zigType.startsWith("craft.")});for(let G of Q.children)J(G)}return J(Z),{version:"1.0.0",components:X,entry:$.id,assets:[],styles:$.styles}}function Pf($,Z){return JSON.stringify({version:3,file:"output.zig",sources:["input.stx"],mappings:""})}function fN(){return`id_${++yf}`}function gN($){let Z=0;for(let Y=0;Y<$.length;Y++){let X=$.charCodeAt(Y);Z=(Z<<5)-Z+X,Z=Z&Z}return Math.abs(Z).toString(36)}function xf($){return $.charAt(0).toUpperCase()+$.slice(1)}function vf($){let Z=[],Y=/<script[^>]*>([\s\S]*?)<\/script>/gi,X;while((X=Y.exec($))!==null)Z.push(X[1]);return Z}function ff($){let Z=[],Y=/<style[^>]*>([\s\S]*?)<\/style>/gi,X;while((X=Y.exec($))!==null)Z.push(X[1]);return Z}function DW($){let Z=$.type==="component"?1:0;if($.children)for(let Y of $.children)Z+=DW(Y);return Z}function kW($){let Z=$.zigType.startsWith("craft.")?1:0;for(let Y of $.children)Z+=kW(Y);return Z}function hN($){return{start:async()=>{console.log("[craft-compiler] Hot reload server started")},stop:async()=>{console.log("[craft-compiler] Hot reload server stopped")},notifyChange:(Z)=>{console.log(`[craft-compiler] File changed: ${Z}`)}}}var SW,yf=0,gf,hf;var uN=D(()=>{SW=new Map([["craft-button",{name:"Button",zigType:"craft.Button",props:[{name:"variant",type:"string",required:!1,default:"primary"},{name:"disabled",type:"boolean",required:!1,default:!1},{name:"onclick",type:"callback",required:!1}],children:"single"}],["craft-text-input",{name:"TextInput",zigType:"craft.TextInput",props:[{name:"value",type:"string",required:!1,default:""},{name:"placeholder",type:"string",required:!1},{name:"disabled",type:"boolean",required:!1,default:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-textarea",{name:"TextArea",zigType:"craft.TextArea",props:[{name:"value",type:"string",required:!1,default:""},{name:"placeholder",type:"string",required:!1},{name:"rows",type:"number",required:!1,default:3},{name:"disabled",type:"boolean",required:!1,default:!1}],children:"none"}],["craft-checkbox",{name:"Checkbox",zigType:"craft.Checkbox",props:[{name:"checked",type:"boolean",required:!1,default:!1},{name:"label",type:"string",required:!1},{name:"disabled",type:"boolean",required:!1,default:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-select",{name:"Select",zigType:"craft.Select",props:[{name:"value",type:"string",required:!1},{name:"options",type:"array",required:!0},{name:"disabled",type:"boolean",required:!1,default:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-slider",{name:"Slider",zigType:"craft.Slider",props:[{name:"value",type:"number",required:!1,default:0},{name:"min",type:"number",required:!1,default:0},{name:"max",type:"number",required:!1,default:100},{name:"step",type:"number",required:!1,default:1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-toggle",{name:"Toggle",zigType:"craft.Toggle",props:[{name:"checked",type:"boolean",required:!1,default:!1},{name:"disabled",type:"boolean",required:!1,default:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-modal",{name:"Modal",zigType:"craft.Modal",props:[{name:"open",type:"boolean",required:!1,default:!1},{name:"title",type:"string",required:!1},{name:"closable",type:"boolean",required:!1,default:!0},{name:"onclose",type:"callback",required:!1}],children:"multiple"}],["craft-alert",{name:"Alert",zigType:"craft.Alert",props:[{name:"variant",type:"string",required:!1,default:"info"},{name:"title",type:"string",required:!1},{name:"dismissible",type:"boolean",required:!1,default:!1}],children:"single"}],["craft-progress",{name:"ProgressBar",zigType:"craft.ProgressBar",props:[{name:"value",type:"number",required:!1,default:0},{name:"max",type:"number",required:!1,default:100},{name:"indeterminate",type:"boolean",required:!1,default:!1}],children:"none"}],["craft-spinner",{name:"Spinner",zigType:"craft.Spinner",props:[{name:"size",type:"number",required:!1,default:24}],children:"none"}],["craft-avatar",{name:"Avatar",zigType:"craft.Avatar",props:[{name:"src",type:"string",required:!1},{name:"alt",type:"string",required:!1},{name:"size",type:"number",required:!1,default:40}],children:"none"}],["craft-badge",{name:"Badge",zigType:"craft.Badge",props:[{name:"variant",type:"string",required:!1,default:"default"}],children:"single"}],["craft-card",{name:"Card",zigType:"craft.Card",props:[{name:"padding",type:"number",required:!1,default:16}],children:"multiple"}],["craft-sidebar",{name:"Sidebar",zigType:"craft.NativeSidebar",props:[{name:"id",type:"string",required:!1},{name:"variant",type:"string",required:!1,default:"desktop"},{name:"material",type:"string",required:!1,default:"sidebar"},{name:"backgroundEffect",type:"string",required:!1,default:"shimmer"},{name:"allowsVibrancy",type:"boolean",required:!1,default:!0},{name:"materialOpacity",type:"number",required:!1,default:0.68},{name:"minWidth",type:"number",required:!1,default:240},{name:"maxWidth",type:"number",required:!1,default:340},{name:"canCollapse",type:"boolean",required:!1,default:!0},{name:"selectedItem",type:"string",required:!1},{name:"sections",type:"array",required:!1}],children:"multiple",platform:["macos"],fallback:"aside"}],["craft-sidebar-section",{name:"SidebarSection",zigType:"craft.NativeSidebarSection",props:[{name:"id",type:"string",required:!0},{name:"title",type:"string",required:!1},{name:"header",type:"string",required:!1}],children:"multiple",platform:["macos"],fallback:"section"}],["craft-sidebar-item",{name:"SidebarItem",zigType:"craft.NativeSidebarItem",props:[{name:"id",type:"string",required:!0},{name:"label",type:"string",required:!0},{name:"icon",type:"string",required:!1},{name:"badge",type:"string",required:!1},{name:"tintColor",type:"color",required:!1}],children:"none",platform:["macos"],fallback:"button"}],["craft-accordion",{name:"Accordion",zigType:"craft.Accordion",props:[{name:"title",type:"string",required:!0},{name:"open",type:"boolean",required:!1,default:!1}],children:"multiple"}],["craft-tabs",{name:"TabView",zigType:"craft.TabView",props:[{name:"activeTab",type:"number",required:!1,default:0},{name:"ontabchange",type:"callback",required:!1}],children:"multiple"}],["craft-tooltip",{name:"Tooltip",zigType:"craft.Tooltip",props:[{name:"content",type:"string",required:!0},{name:"position",type:"string",required:!1,default:"top"}],children:"single"}],["craft-date-picker",{name:"DatePicker",zigType:"craft.DatePicker",props:[{name:"value",type:"string",required:!1},{name:"min",type:"string",required:!1},{name:"max",type:"string",required:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-time-picker",{name:"TimePicker",zigType:"craft.TimePicker",props:[{name:"value",type:"string",required:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-color-picker",{name:"ColorPicker",zigType:"craft.ColorPicker",props:[{name:"value",type:"color",required:!1,default:"#000000"},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-data-table",{name:"DataTable",zigType:"craft.DataTable",props:[{name:"data",type:"array",required:!0},{name:"columns",type:"array",required:!0},{name:"sortable",type:"boolean",required:!1,default:!1},{name:"paginated",type:"boolean",required:!1,default:!1}],children:"none"}],["craft-virtual-list",{name:"VirtualList",zigType:"craft.VirtualList",props:[{name:"items",type:"array",required:!0},{name:"itemHeight",type:"number",required:!1,default:48},{name:"renderItem",type:"callback",required:!0}],children:"none"}],["craft-tree-view",{name:"TreeView",zigType:"craft.TreeView",props:[{name:"data",type:"object",required:!0},{name:"expandable",type:"boolean",required:!1,default:!0}],children:"none"}]]);gf={compileToNative:CN,createHotReloadServer:hN,NATIVE_COMPONENTS:SW},hf=gf});import{spawn as lN}from"child_process";import y0 from"fs";import df from"os";import Y0 from"path";import v from"process";import{CLI as uf}from"@stacksjs/clapp";var N6="0.2.94";X$();YW();zG();AG();g4();LG();nK();var __dirname="/home/runner/work/stx/stx/packages/stx/bin",O0=new uf("stx");function mN($){let Z=typeof $==="string"?Number.parseInt($,10):$;if(Number.isNaN(Z))return{isValid:!1,error:"Port must be a valid number",suggestion:"Try using a number between 1024 and 65535"};if(Z<1024||Z>65535)return{isValid:!1,error:"Port must be between 1024 and 65535",suggestion:"Try using a port between 1024 and 65535"};return{isValid:!0}}function cN($){try{if(!y0.existsSync($)){let Y=Y0.dirname($),X=Y0.basename($);if(y0.existsSync(Y)){let Q=y0.readdirSync(Y).filter((K)=>K.toLowerCase().includes(X.toLowerCase().substring(0,3))||K.endsWith(".stx")||K.endsWith(".md")),G=Q.length>0?`File not found. Similar files in ${Y}: ${Q.slice(0,3).join(", ")}`:`File not found. Directory ${Y} exists but doesn't contain the specified file.`;return{isValid:!1,error:`File does not exist: ${$}`,suggestion:G}}return{isValid:!1,error:`File does not exist: ${$}`,suggestion:"Check the file path and try again"}}if(y0.statSync($).isDirectory())return{isValid:!1,error:`Expected file but got directory: ${$}`,suggestion:"Specify a .stx or .md file path"};return{isValid:!0}}catch(Z){return{isValid:!1,error:`Cannot access file: ${$}`,suggestion:"Check file permissions and path"}}}function CW($){let Z=typeof $==="string"?Number.parseInt($,10):$;if(Number.isNaN(Z))return{isValid:!1,error:"Timeout must be a valid number",suggestion:"Specify timeout in milliseconds (e.g., 5000 for 5 seconds)"};if(Z<100)return{isValid:!1,error:"Timeout too short (minimum 100ms)",suggestion:"Use a timeout of at least 100ms"};if(Z>300000)return{isValid:!1,error:"Timeout too long (maximum 5 minutes)",suggestion:"Use a timeout of less than 300000ms (5 minutes)"};return{isValid:!0}}var v5=($)=>$.includes("*")||$.includes("?")||$.includes("{")||$.includes("["),mf=($)=>$.endsWith(".stx")||$.endsWith(".md");function x5($,Z=1){if(console.error(`\u274C ${$.error}`),$.suggestion)console.error(`\uD83D\uDCA1 suggestion: ${$.suggestion}`);v.exit(Z)}async function cf($,Z){try{let Y=["test"],X=[];if($&&$.length>0)for(let W of $)if(v5(W))try{let U=await Array.fromAsync(new Bun.Glob(W).scan({onlyFiles:!0,absolute:!0}));if(U.length===0)console.warn(`Warning: No files found matching pattern: ${W}`);else if(X.push(...U),Z.verbose)console.log(`Found ${U.length} file(s) matching pattern: ${W}`)}catch(U){return console.error(`Error expanding glob pattern ${W}:`,U),!1}else X.push(W);if(X.length===0)return console.error("Error: No test files found matching the provided patterns."),!1;if(Y.push(...X),Z.filter)Y.push("--pattern",Z.filter);if(Z.timeout)Y.push("--timeout",Z.timeout.toString());if(Z.reporter&&Z.reporter!=="default")if(Z.reporter==="junit"){let W=Y0.join(df.tmpdir(),`stx-test-report-${Date.now()}.xml`);Y.push("--reporter",Z.reporter),Y.push("--reporter-outfile",W)}else console.warn(`Warning: Reporter '${Z.reporter}' is not supported. Using default reporter.`);if(Z.coverage)Y.push("--coverage");if(Z.watch)Y.push("--watch");Y.push("--preload",Y0.join(__dirname,"../../../test-utils/happy-dom.ts"));let J={...v.env,STX_TEST_MODE:"true",STX_TEST_UI:Z.ui?"true":"false",STX_TEST_VERBOSE:Z.verbose?"true":"false"},Q="bun";if(Z.verbose)console.log(`Running: ${Q} ${Y.join(" ")}`);let G=performance.now(),K=lN(Q,Y,{stdio:"inherit",shell:!1,env:J});return new Promise((W)=>{K.on("close",(U)=>{let z=((performance.now()-G)/1000).toFixed(2);if(U===0)W(!0);else W(!1)}),v.on("SIGINT",()=>{console.log(`
|
|
20413
20413
|
Test run interrupted`),K.kill("SIGINT"),v.exit(1)})})}catch(Y){return console.error("Error running tests:",Y instanceof Error?Y.message:String(Y)),!1}}var lf=v.argv.length>=3&&(mf(v.argv[2])&&y0.existsSync(v.argv[2])||v5(v.argv[2]));if(lf){let $=v.argv[2],Z={port:3000,watch:!0,cache:!0,markdown:{syntaxHighlighting:{enabled:!0,serverSide:!0,defaultTheme:"github-dark",highlightUnknownLanguages:!0}}};for(let Y=3;Y<v.argv.length;Y++){let X=v.argv[Y];if(X==="--port"&&Y+1<v.argv.length){let J=mN(v.argv[++Y]);if(!J.isValid)x5(J);Z.port=Number.parseInt(v.argv[Y],10)}else if(X==="--no-watch")Z.watch=!1;else if(X==="--highlight-theme"&&Y+1<v.argv.length){if(!Z.markdown)Z.markdown={};if(!Z.markdown.syntaxHighlighting)Z.markdown.syntaxHighlighting={};Z.markdown.syntaxHighlighting.defaultTheme=v.argv[++Y]}else if(X==="--no-highlight"){if(!Z.markdown)Z.markdown={};if(!Z.markdown.syntaxHighlighting)Z.markdown.syntaxHighlighting={};Z.markdown.syntaxHighlighting.enabled=!1}else if(X==="--no-highlight-unknown"){if(!Z.markdown)Z.markdown={};if(!Z.markdown.syntaxHighlighting)Z.markdown.syntaxHighlighting={};Z.markdown.syntaxHighlighting.highlightUnknownLanguages=!1}else if(X==="--no-cache")Z.cache=!1;else if(X==="--native")Z.native=!0}if(v5($))try{let Y=await Array.fromAsync(new Bun.Glob($).scan({onlyFiles:!0,absolute:!0})),X=$.endsWith(".stx")?Y.filter((K)=>K.endsWith(".stx")):$.endsWith(".md")?Y.filter((K)=>K.endsWith(".md")):Y.filter((K)=>K.endsWith(".stx")||K.endsWith(".md")),J=$.split("*")[0].replace(/\/$/,"")||".",Q=Y0.resolve(J);try{let K=new Bun.Glob("**/*.stx"),U=(await Array.fromAsync(K.scan({cwd:Q,onlyFiles:!0,absolute:!0}))).filter((_)=>/\[.+\]/.test(Y0.basename(_)));for(let _ of U)if(!X.includes(_))X.push(_)}catch{}if(X.length===0)console.error(`Error: No STX or Markdown files found matching pattern: ${$}`),v.exit(1);if(!await c8(X,Z))v.exit(1)}catch(Y){console.error("Failed to process files:",Y),v.exit(1)}else m8($,Z).catch((Y)=>{console.error("Failed to start dev server:",Y),v.exit(1)})}else{let $=function(X,J){let Q=[];for(let G=0;G<=J.length;G++)Q[G]=[G];for(let G=0;G<=X.length;G++)Q[0][G]=G;for(let G=1;G<=J.length;G++)for(let K=1;K<=X.length;K++)if(J.charAt(G-1)===X.charAt(K-1))Q[G][K]=Q[G-1][K-1];else Q[G][K]=Math.min(Q[G-1][K-1]+1,Q[G][K-1]+1,Q[G-1][K]+1);return Q[J.length][X.length]};O0.command("docs","Generate documentation for components, templates, and directives").option("--output <dir>","Output directory for documentation",{default:"docs"}).option("--format <format>","Documentation format (markdown, html, json)",{default:"markdown"}).option("--components-dir <dir>","Components directory",{default:"components"}).option("--templates-dir <dir>","Templates directory",{default:"."}).option("--no-components","Disable components documentation").option("--no-templates","Disable templates documentation").option("--no-directives","Disable directives documentation").option("--extra-content <content>","Extra content to include in documentation").example("stx docs --output docs --format html").action(async(X)=>{try{if(await _G(X))console.log("Documentation generated successfully."),v.exit(0);else console.error("Documentation generation failed."),v.exit(1)}catch(J){console.error("Error generating documentation:",J),v.exit(1)}}),O0.command("iconify <command>","Generate Iconify icon packages").option("--output <dir>","Output directory for generated packages",{default:"packages"}).option("--icons <icons>","Comma-separated list of specific icons to generate").example("stx iconify list").example("stx iconify generate mdi").example("stx iconify generate lucide --icons home,settings,user").action(async(X,J)=>{try{let{fetchCollections:Q,generatePackage:G}=await import("@stacksjs/iconify-generator");if(X==="list"){console.log(`
|
|
20414
20414
|
\uD83D\uDCDA Fetching available icon collections...
|
|
20415
20415
|
`);let K=await Q(),W=Object.entries(K).sort((U,_)=>_[1].total-U[1].total);console.log(`Available collections:
|
package/dist/client/directive.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Yy as a,Zy as b}from"../chunk-hrampcrj.js";import"../chunk-3jm3snz8.js";export{a as stxRouterHandler,b as stxRouterDirective};
|
package/dist/client/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Xy as a,Yy as b,Zy as c}from"../chunk-hrampcrj.js";import"../chunk-3jm3snz8.js";export{b as stxRouterHandler,c as stxRouterDirective,a as getRouterScript};
|
package/dist/client-helpers.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{vp as a}from"./chunk-x4fze3q2.js";import"./chunk-3jm3snz8.js";export{a as stxClientHelpers};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Vy as x}from"./chunk-q60knhjf.js";import"./chunk-3jm3snz8.js";import H from"path";import Y from"fs";var T=[/^stx$/,/^@stacksjs\/stx$/,/^@stacksjs\/browser$/,/^@stores$/,/^stx\/stores$/,/^@composables$/];function f(W){let q=/^\s*import\s+(?!type\s)/gm;if(!W.match(q))return!1;let $=/^\s*import\s+(?!type\s).*?\s+from\s+['"]([^'"]+)['"]/gm,k;while((k=$.exec(W))!==null){let z=k[1];if(!T.some((G)=>G.test(z)))return console.log("[stx:bundler] detected user import:",z),!0}let Q=/^\s*import\s+['"]([^'"]+)['"]/gm;while((k=Q.exec(W))!==null){let z=k[1];if(/\.css(?:\?.*)?$/.test(z))continue;if(!T.some((G)=>G.test(z)))return console.log("[stx:bundler] detected side-effect import:",z),!0}return!1}function R(W,q,_,$){let k=(Q,z)=>{let w=Q===_?q:H.dirname(Q),G=H.resolve(w,z),Z=[G,`${G}.ts`,`${G}.tsx`,`${G}.js`,`${G}.mjs`,`${G}.jsx`,H.join(G,"index.ts"),H.join(G,"index.tsx"),H.join(G,"index.js"),H.join(G,"index.mjs")];for(let L of Z)try{if(Y.existsSync(L)&&Y.statSync(L,{throwIfNoEntry:!1})?.isFile())return L}catch{}return G};return{name:"stx-client-bundle",setup(Q){Q.onResolve({filter:/^(stx|@stacksjs\/stx|@stacksjs\/browser)$/},(z)=>({path:z.path,external:!0})),Q.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},(z)=>({path:z.path,external:!0})),Q.onResolve({filter:/^\.\.?\//},(z)=>{let w=k(z.importer,z.path);return $.add(w),{path:w}}),Q.onResolve({filter:/^[@~]\//},(z)=>{let w=H.resolve(W,z.path.slice(2)),G=[w,`${w}.ts`,`${w}.tsx`,`${w}.js`,`${w}.mjs`,`${w}.jsx`,H.join(w,"index.ts"),H.join(w,"index.tsx"),H.join(w,"index.js"),H.join(w,"index.mjs")];for(let Z of G)if(Y.existsSync(Z)&&Y.statSync(Z,{throwIfNoEntry:!1})?.isFile())return console.log(`[stx:bundler] resolved ${z.path[0]}/ import:`,z.path,"\u2192",Z),$.add(Z),{path:Z};return console.warn(`[stx:bundler] could not resolve ${z.path[0]}/ import:`,z.path),{path:w}})}}}async function v(W,q,_={}){let $=_.projectRoot||process.cwd(),k=_.minify??!1,Q=_.cacheDir||H.join($,".stx","bundle-cache"),z=new Bun.CryptoHasher("md5");z.update(W+q);let w=z.digest("hex").slice(0,12),G=H.join(Q,`${w}.js`),Z=H.join(Q,`${w}.deps.json`),L=Bun.file(G);if(await L.exists()){let U=Bun.file(Z),J=!0;if(await U.exists())try{let I=JSON.parse(await U.text());for(let O of I.files)try{if(Y.statSync(O.path).mtimeMs!==O.mtimeMs){J=!1;break}}catch{J=!1;break}}catch{J=!1}if(J)return console.log("[stx:bundler] cache hit:",w),await L.text();console.log("[stx:bundler] cache invalidated by dep change:",w)}let V=H.join($,".stx","bundle-tmp"),A=H.join(V,`${w}.ts`),M=H.join(V,"out",w);Y.mkdirSync(V,{recursive:!0}),Y.mkdirSync(M,{recursive:!0});let y=H.dirname(q),S=[],N=/^(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,F=/^(export\s+)?(?:async\s+)?function\s+(\w+)/gm,C;while((C=N.exec(W))!==null){if(C[1])continue;if(C[2])C[2].split(",").forEach((U)=>{let J=U.split(":")[0].trim();if(J)S.push(J)});else if(C[3])S.push(C[3])}while((C=F.exec(W))!==null){if(C[1])continue;S.push(C[2])}let D=S.length>0?`
|
|
3
3
|
export { ${S.join(", ")} }`:"";await Bun.write(A,W+D),console.log("[stx:bundler] bundling:",w,"from:",H.basename(q));let j=new Set;try{let U=await Bun.build({entrypoints:[A],outdir:M,target:"browser",format:"esm",minify:k,plugins:[R($,y,A,j)],define:{"process.env.NODE_ENV":k?'"production"':'"development"',...x()},root:$});if(!U.success){let K=U.logs.filter((B)=>B.level==="error").map((B)=>B.message).join(", ");return console.warn("[stx:bundler] build failed:",K),W}let J="";for(let K of U.outputs){J=await K.text();break}let I=[];for(let K of J.matchAll(/^\s*export\s*\{([^}]*)\}\s*;?\s*$/gm))for(let B of K[1].split(",")){let X=B.trim().match(/^([A-Za-z_$][\w$]*)\s+as\s+([A-Za-z_$][\w$]*)$/);if(X&&X[1]!==X[2])I.push([X[2],X[1]])}if(J=J.replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim(),I.length>0){let K=I.map(([B,X])=>`${JSON.stringify(B)}: ${X}`).join(", ");J+=`
|
|
4
4
|
var __stxScopeRenames = { ${K} };`}console.log("[stx:bundler] bundled:",w,"output:",J.length,"bytes"),Y.mkdirSync(Q,{recursive:!0}),await Bun.write(G,J);let O=Array.from(j).map((K)=>{try{return{path:K,mtimeMs:Y.statSync(K).mtimeMs}}catch{return null}}).filter((K)=>K!==null);return await Bun.write(Z,JSON.stringify({files:O})),J}catch(U){let J=U instanceof Error?U.message:String(U),I=U?.errors,O=Array.isArray(I)&&I.length>0?`
|
|
5
5
|
${I.map((K)=>`- ${K?.message??K}`).join(`
|
package/dist/client-script.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{kr as a,lr as b,mr as c,nr as d,or as e}from"./chunk-w01y57f5.js";import"./chunk-x1hjv24z.js";import"./chunk-0g4gece6.js";import"./chunk-nap11ntr.js";import"./chunk-03c26pjz.js";import"./chunk-13yz561y.js";import"./chunk-nanw7yhz.js";import"./chunk-ghrx0hn1.js";import"./chunk-82t27pvd.js";import"./chunk-fhawx87n.js";import"./chunk-gc84b1d2.js";import"./chunk-yr1gdceh.js";import"./chunk-baa7h4yz.js";import"./chunk-kdxa9epn.js";import"./chunk-g2hekckm.js";import"./chunk-x39sfpvm.js";import"./chunk-tr0z0e1g.js";import"./chunk-4j188175.js";import"./chunk-eds0f8f1.js";import"./chunk-dyjnn5k8.js";import"./chunk-8fgwhhb8.js";import"./chunk-tj6zfxeb.js";import"./chunk-7xcfy2fn.js";import"./chunk-9yz5d003.js";import"./chunk-fms20x0n.js";import"./chunk-fe7r1mq1.js";import"./chunk-rb1e4cnb.js";import"./chunk-j4s5qwd7.js";import"./chunk-b0cyc09a.js";import"./chunk-0tatqxj2.js";import"./chunk-bykjk6vj.js";import"./chunk-7b0xdy5h.js";import"./chunk-ywkrxp2h.js";import"./chunk-y25pr13j.js";import"./chunk-q6h6yvzb.js";import"./chunk-qdc3aav1.js";import"./chunk-6wn85hn6.js";import"./chunk-qd5461tt.js";import"./chunk-77tga15w.js";import"./chunk-rv002yn0.js";import"./chunk-hke99a0v.js";import"./chunk-mwbng54r.js";import"./chunk-wxvyj65q.js";import"./chunk-yw2fzq86.js";import"./chunk-mrehzhxv.js";import"./chunk-1zgsgk4b.js";import"./chunk-48cw2nde.js";import"./chunk-jjvp4t5w.js";import"./chunk-94g3cahw.js";import"./chunk-ht4j68cs.js";import"./chunk-fch9tk1k.js";import"./chunk-cz25azze.js";import"./chunk-q60knhjf.js";import"./chunk-hrampcrj.js";import"./chunk-t37dp99j.js";import"./chunk-5kt3ay7x.js";import"./chunk-95w08s8v.js";import"./chunk-ceg2c2q2.js";import"./chunk-04mvcmcr.js";import"./chunk-n46a5g1g.js";import"./chunk-vv9wfz1c.js";import"./chunk-dzw95th7.js";import"./chunk-46mkpbkk.js";import"./chunk-3rh7va1z.js";import"./chunk-2xen423s.js";import"./chunk-cp3kwv17.js";import"./chunk-hpqr9e3x.js";import"./chunk-adqh2m9z.js";import"./chunk-8qbax8xn.js";import"./chunk-x64kb787.js";import"./chunk-gcf5v18y.js";import"./chunk-pc31m5x5.js";import"./chunk-3jm3snz8.js";export{b as renderVendorStyleTags,e as processClientScript,d as generateServerDataBridge,c as extractBridgeData,a as extractAndStripCssImports};
|
package/dist/component-hmr.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{ap as a,bp as b,cp as c,dp as d,ep as e,fp as f}from"./chunk-tx6br9r4.js";import"./chunk-3jm3snz8.js";export{c as wrapComponentForHMR,e as resetHMRHandler,d as getHMRHandler,b as generateHMRClientScript,f as default,a as ComponentHMRHandler};
|