@stacksjs/stx 0.2.413 → 0.2.414
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/appearance-bootstrap.js +1 -1
- package/dist/binding-manifest.d.ts +1 -1
- package/dist/bundle-analyzer.js +20 -20
- package/dist/chunk-020xyn9q.js +3 -0
- package/dist/chunk-04jhmfbz.js +2 -0
- package/dist/chunk-10957mcb.js +2 -0
- package/dist/chunk-1098mas0.js +2 -0
- package/dist/chunk-169n1vpx.js +12 -0
- package/dist/chunk-1b6t12hd.js +2 -0
- package/dist/chunk-1chw8xsw.js +2 -0
- package/dist/chunk-1xdzcy9d.js +14 -0
- package/dist/chunk-2ce7f416.js +2 -0
- package/dist/chunk-2gr351s0.js +7 -0
- package/dist/chunk-2mkcjw08.js +2 -0
- package/dist/chunk-2v8wztd5.js +2 -0
- package/dist/chunk-340a824p.js +2 -0
- package/dist/chunk-39g1134q.js +2 -0
- package/dist/chunk-3c74vag1.js +2 -0
- package/dist/chunk-3kthfs03.js +3 -0
- package/dist/chunk-3qn1wcdg.js +2 -0
- package/dist/chunk-3s2vnqcf.js +2 -0
- package/dist/chunk-48bwk47q.js +2 -0
- package/dist/chunk-4bjravgk.js +2 -0
- package/dist/chunk-4jjme6a5.js +2 -0
- package/dist/chunk-5g3y8kym.js +2 -0
- package/dist/chunk-5gsxpaqk.js +2 -0
- package/dist/{chunk-bwsxym3d.js → chunk-5qns2sdz.js} +17 -17
- package/dist/chunk-69mc2np8.js +2785 -0
- package/dist/chunk-6cfa3g0r.js +2 -0
- package/dist/{chunk-bjar18jd.js → chunk-6h38kkjf.js} +46 -52
- package/dist/chunk-6hc5vz20.js +3 -0
- package/dist/chunk-6q6g76vg.js +499 -0
- package/dist/{chunk-bwjxk1dw.js → chunk-6sgswrqw.js} +29 -29
- package/dist/chunk-6y8hnymb.js +2 -0
- package/dist/chunk-74j18qk0.js +930 -0
- package/dist/chunk-752hw7cd.js +4 -0
- package/dist/{chunk-kgd8kchy.js → chunk-765e1s44.js} +11 -76
- package/dist/chunk-7gkv67ky.js +4 -0
- package/dist/chunk-7z2ra0yf.js +2 -0
- package/dist/chunk-866n724v.js +2 -0
- package/dist/chunk-8nhshfz6.js +5 -0
- package/dist/chunk-92ps1xpk.js +2 -0
- package/dist/chunk-9g27ybyr.js +3 -0
- package/dist/{chunk-xq1acw1r.js → chunk-9pt8fd2n.js} +13 -13
- package/dist/{chunk-24zher49.js → chunk-9vrja6vp.js} +4 -4
- package/dist/chunk-9xrbve19.js +2 -0
- package/dist/chunk-a688m6js.js +3 -0
- package/dist/chunk-afhxw2t8.js +2 -0
- package/dist/chunk-ak1cgcah.js +5 -0
- package/dist/{chunk-4m7ajama.js → chunk-amd6ey3t.js} +14 -14
- package/dist/chunk-apg16xcn.js +2 -0
- package/dist/chunk-b52s5z0c.js +2 -0
- package/dist/chunk-b84h16er.js +61 -0
- package/dist/{chunk-hx998w7n.js → chunk-bay9s6rs.js} +13 -13
- package/dist/chunk-bmt7w2pk.js +2 -0
- package/dist/chunk-btmhj5t7.js +2 -0
- package/dist/chunk-ce1sejr3.js +3 -0
- package/dist/chunk-cg8hg6cs.js +3 -0
- package/dist/{chunk-4f9zyfdw.js → chunk-czxt605c.js} +4 -5
- package/dist/chunk-d44b9ktb.js +4 -0
- package/dist/chunk-daz5aqcf.js +24 -0
- package/dist/chunk-dgdm3hy3.js +2 -0
- package/dist/chunk-dvgv8nry.js +11 -0
- package/dist/chunk-dx7n22ed.js +2 -0
- package/dist/chunk-e57rhf65.js +3 -0
- package/dist/chunk-eed4fwps.js +3 -0
- package/dist/chunk-ej9j6k1q.js +3 -0
- package/dist/chunk-et0rr8c7.js +3 -0
- package/dist/chunk-f46qsp4m.js +4 -0
- package/dist/chunk-f6az0xj5.js +2 -0
- package/dist/{chunk-bjcsc6wx.js → chunk-fh1qrp68.js} +21 -21
- package/dist/chunk-fjs0a8h7.js +2 -0
- package/dist/chunk-fr2txj8q.js +829 -0
- package/dist/{chunk-xssw417m.js → chunk-ft4p6d28.js} +14 -14
- package/dist/chunk-fyzajkrx.js +2 -0
- package/dist/chunk-fzapbw9p.js +3 -0
- package/dist/chunk-g578mcb0.js +194 -0
- package/dist/chunk-gawrg4gb.js +216 -0
- package/dist/chunk-gw07qmjk.js +2 -0
- package/dist/chunk-h0atqq82.js +32 -0
- package/dist/chunk-h6zsqb9r.js +3 -0
- package/dist/{chunk-2snqdnk9.js → chunk-h85hrwkq.js} +13 -13
- package/dist/chunk-hbxz85wy.js +2 -0
- package/dist/chunk-hjg3ndgh.js +2 -0
- package/dist/chunk-hkxsewzk.js +2 -0
- package/dist/chunk-hrbbbtbn.js +2 -0
- package/dist/chunk-j03revz2.js +8 -0
- package/dist/chunk-j9qcrwbg.js +2 -0
- package/dist/chunk-jk4njz0w.js +2 -0
- package/dist/chunk-jmabeqfq.js +2 -0
- package/dist/chunk-jt0n43mk.js +2 -0
- package/dist/chunk-kjbv8a3m.js +2 -0
- package/dist/chunk-m1vdghnx.js +2 -0
- package/dist/chunk-m4sk62wb.js +5 -0
- package/dist/chunk-md8rqn48.js +30 -0
- package/dist/chunk-mepdnezf.js +17 -0
- package/dist/chunk-mhq0pjws.js +2 -0
- package/dist/chunk-mp6hy8g4.js +2 -0
- package/dist/chunk-ngc2wke4.js +3 -0
- package/dist/chunk-nn2vstke.js +2 -0
- package/dist/chunk-p2v2a68k.js +2 -0
- package/dist/{chunk-qn5srnj3.js → chunk-pbh4smw3.js} +16 -16
- package/dist/chunk-pdt69hpb.js +2 -0
- package/dist/chunk-pgzvyrv6.js +29 -0
- package/dist/chunk-pj1wg7jg.js +2 -0
- package/dist/chunk-pqxzp1bb.js +3 -0
- package/dist/chunk-px7fvbj6.js +3 -0
- package/dist/chunk-q4c06e8x.js +20 -0
- package/dist/chunk-q6vrb2pe.js +2 -0
- package/dist/chunk-q7qchkvk.js +2 -0
- package/dist/chunk-q9bdh4s5.js +8 -0
- package/dist/chunk-qet5gc6s.js +2033 -0
- package/dist/chunk-qz519eyp.js +2 -0
- package/dist/chunk-r3f9jcf7.js +5 -0
- package/dist/chunk-rs4v4fha.js +4 -0
- package/dist/chunk-s2x4wcrz.js +2 -0
- package/dist/chunk-s5xezjps.js +3 -0
- package/dist/chunk-scezfp0w.js +30 -0
- package/dist/chunk-sd321bn3.js +2 -0
- package/dist/{chunk-smcj3442.js → chunk-sd47dzs0.js} +79 -79
- package/dist/chunk-se7mwqd1.js +2 -0
- package/dist/chunk-shr559s7.js +3 -0
- package/dist/chunk-syaw6b75.js +2 -0
- package/dist/chunk-t4hzprsm.js +3 -0
- package/dist/{chunk-pv3d7sfn.js → chunk-t61vdbje.js} +89 -89
- package/dist/chunk-tfexmdkt.js +3 -0
- package/dist/chunk-thyt8ed8.js +6 -0
- package/dist/chunk-v091jft4.js +12 -0
- package/dist/chunk-v4vaqxrf.js +33 -0
- package/dist/chunk-vgvtnwxa.js +4 -0
- package/dist/chunk-x0q32ees.js +3 -0
- package/dist/chunk-x5bpeb4a.js +2 -0
- package/dist/chunk-x72tv2cg.js +3 -0
- package/dist/chunk-xfp7k0v8.js +64 -0
- package/dist/chunk-xtdw3692.js +6 -0
- package/dist/chunk-y1cmjvk3.js +43 -0
- package/dist/chunk-y5310237.js +311 -0
- package/dist/chunk-ya0qecph.js +27 -0
- package/dist/chunk-yazk54jr.js +8 -0
- package/dist/chunk-ydjfar14.js +2 -0
- package/dist/chunk-ym95v4nc.js +3 -0
- package/dist/chunk-ynvdvbat.js +18 -0
- package/dist/chunk-yvx1ap9b.js +3 -0
- package/dist/chunk-z0g9jvv0.js +40 -0
- package/dist/chunk-z6d0jmjb.js +2 -0
- package/dist/{chunk-8sdhs0zk.js → chunk-zhxdpzga.js} +4 -4
- package/dist/cli.js +110 -110
- package/dist/craft-entry.js +7 -7
- package/dist/craft.js +7 -7
- package/dist/database.js +2 -2
- package/dist/image-optimization/component.js +4 -4
- package/dist/media/image/component.js +5 -5
- package/dist/media/protected/component.js +2 -2
- package/dist/media/video/index.js +4 -4
- package/dist/native/bridge/protocol.d.ts +325 -0
- package/dist/native/bridge/protocol.js +219 -0
- package/dist/native/cli.d.ts +24 -0
- package/dist/native/cli.js +52 -0
- package/dist/native/compiler/bundle.d.ts +41 -0
- package/dist/native/compiler/bundle.js +90 -0
- package/dist/native/compiler/client-script.d.ts +8 -0
- package/dist/native/compiler/client-script.js +31 -0
- package/dist/native/compiler/codegen.d.ts +10 -0
- package/dist/native/compiler/codegen.js +145 -0
- package/dist/native/compiler/headwind-to-style.d.ts +395 -0
- package/dist/native/compiler/headwind-to-style.js +1163 -0
- package/dist/native/compiler/html-to-ir.d.ts +41 -0
- package/dist/native/compiler/html-to-ir.js +411 -0
- package/dist/native/compiler/icons.d.ts +220 -0
- package/dist/native/compiler/icons.js +208 -0
- package/dist/native/compiler/ir.d.ts +234 -0
- package/dist/native/compiler/ir.js +15 -0
- package/dist/native/compiler/parser.d.ts +88 -0
- package/dist/native/compiler/parser.js +753 -0
- package/dist/native/compiler/render-screen.d.ts +26 -0
- package/dist/native/compiler/render-screen.js +31 -0
- package/dist/native/components/primitives.d.ts +291 -0
- package/dist/native/components/primitives.js +22 -0
- package/dist/native/hot-reload/client.d.ts +62 -0
- package/dist/native/hot-reload/client.js +324 -0
- package/dist/native/index.d.ts +90 -0
- package/dist/native/index.js +34 -0
- package/dist/native/primitives/ActivityIndicator.stx +5 -0
- package/dist/native/primitives/Button.stx +5 -0
- package/dist/native/primitives/DatePicker.stx +5 -0
- package/dist/native/primitives/FlatList.stx +5 -0
- package/dist/native/primitives/Image.stx +5 -0
- package/dist/native/primitives/ImageBackground.stx +5 -0
- package/dist/native/primitives/KeyboardAvoidingView.stx +5 -0
- package/dist/native/primitives/Modal.stx +5 -0
- package/dist/native/primitives/Picker.stx +5 -0
- package/dist/native/primitives/Pressable.stx +5 -0
- package/dist/native/primitives/RefreshControl.stx +5 -0
- package/dist/native/primitives/SafeAreaView.stx +5 -0
- package/dist/native/primitives/ScrollView.stx +5 -0
- package/dist/native/primitives/SectionList.stx +5 -0
- package/dist/native/primitives/Slider.stx +5 -0
- package/dist/native/primitives/StatusBar.stx +5 -0
- package/dist/native/primitives/Switch.stx +5 -0
- package/dist/native/primitives/Text.stx +5 -0
- package/dist/native/primitives/TextInput.stx +5 -0
- package/dist/native/primitives/TouchableHighlight.stx +5 -0
- package/dist/native/primitives/TouchableOpacity.stx +5 -0
- package/dist/native/primitives/View.stx +5 -0
- package/dist/native/runtime/craft.d.ts +75 -0
- package/dist/native/runtime/craft.js +0 -0
- package/dist/native/runtime/entry.d.ts +1 -0
- package/dist/native/runtime/entry.js +3 -0
- package/dist/native/runtime/index.d.ts +45 -0
- package/dist/native/runtime/index.js +165 -0
- package/dist/native/runtime/native-host.d.ts +33 -0
- package/dist/native/runtime/native-host.js +184 -0
- package/dist/native/runtime/screen.d.ts +43 -0
- package/dist/native/runtime/screen.js +808 -0
- package/dist/pwa/service-worker.js +1 -1
- package/dist/pwa/workbox.js +1 -1
- package/dist/pwa.js +8 -8
- package/dist/site-url.d.ts +1 -1
- package/dist/ssg.js +53 -53
- package/dist/visual-testing.js +42 -42
- package/dist/web-components/reactive-generator.js +2 -2
- package/package.json +9 -5
- package/dist/chunk-0btmm4m2.js +0 -147
- package/dist/chunk-0c2h69k2.js +0 -4
- package/dist/chunk-0d0qeqvv.js +0 -2
- package/dist/chunk-0psndabd.js +0 -2
- package/dist/chunk-0qv8yf53.js +0 -2
- package/dist/chunk-0vkxyvsd.js +0 -2
- package/dist/chunk-0we9nw1d.js +0 -3
- package/dist/chunk-0xqdmemy.js +0 -3
- package/dist/chunk-0y46fbkx.js +0 -3
- package/dist/chunk-158wqccn.js +0 -4422
- package/dist/chunk-1cyxbb8y.js +0 -16
- package/dist/chunk-1enwnh2a.js +0 -2
- package/dist/chunk-213pzm0d.js +0 -3
- package/dist/chunk-21hzqyja.js +0 -12
- package/dist/chunk-266t58b8.js +0 -5
- package/dist/chunk-27fgag95.js +0 -4
- package/dist/chunk-2a9n102n.js +0 -2
- package/dist/chunk-2eqzrczk.js +0 -2
- package/dist/chunk-2ke37m54.js +0 -14
- package/dist/chunk-35ds08e7.js +0 -3
- package/dist/chunk-3mtwkjcg.js +0 -2
- package/dist/chunk-4xr8zwkp.js +0 -2
- package/dist/chunk-58v77x2c.js +0 -2
- package/dist/chunk-5mhq8605.js +0 -2
- package/dist/chunk-5se8xt9e.js +0 -64
- package/dist/chunk-5zh0h080.js +0 -2
- package/dist/chunk-62435225.js +0 -2
- package/dist/chunk-6kdrncsx.js +0 -30
- package/dist/chunk-6n2rr3x7.js +0 -2
- package/dist/chunk-6xk87qf2.js +0 -30
- package/dist/chunk-72rwcbp6.js +0 -3
- package/dist/chunk-76w34xne.js +0 -3
- package/dist/chunk-7ekd7zj9.js +0 -2
- package/dist/chunk-7pr3wdd5.js +0 -3
- package/dist/chunk-7rxvafwc.js +0 -24
- package/dist/chunk-7tnwfa7w.js +0 -8
- package/dist/chunk-8c5je0wf.js +0 -2
- package/dist/chunk-8dz6nyvx.js +0 -2
- package/dist/chunk-98zj3fv2.js +0 -7
- package/dist/chunk-9e8t0twa.js +0 -3
- package/dist/chunk-9fqp72ze.js +0 -5
- package/dist/chunk-anydpa34.js +0 -3
- package/dist/chunk-ay6zjq8v.js +0 -3
- package/dist/chunk-az4v4ard.js +0 -3
- package/dist/chunk-ba5erggg.js +0 -2
- package/dist/chunk-bnagrdz6.js +0 -2
- package/dist/chunk-by8wghtf.js +0 -2
- package/dist/chunk-cd7h4q51.js +0 -2
- package/dist/chunk-cjmv8hgp.js +0 -33
- package/dist/chunk-cthf912y.js +0 -2
- package/dist/chunk-cxbpmwq5.js +0 -4
- package/dist/chunk-d3sy16qn.js +0 -2
- package/dist/chunk-dh6s7mrj.js +0 -1199
- package/dist/chunk-dm2nzg7a.js +0 -2
- package/dist/chunk-e2sgcnxc.js +0 -2
- package/dist/chunk-e3b7jj74.js +0 -2
- package/dist/chunk-ec4wq2sv.js +0 -6
- package/dist/chunk-ekzg97dn.js +0 -29
- package/dist/chunk-epjt342x.js +0 -2
- package/dist/chunk-eqe26g14.js +0 -18
- package/dist/chunk-ev0v1yma.js +0 -2
- package/dist/chunk-f53psr2y.js +0 -5
- package/dist/chunk-f8p69dsg.js +0 -3
- package/dist/chunk-f95drhdb.js +0 -194
- package/dist/chunk-ff5a6hvb.js +0 -17
- package/dist/chunk-fs5fy4h8.js +0 -2
- package/dist/chunk-fzsygce3.js +0 -2
- package/dist/chunk-g465x63k.js +0 -2
- package/dist/chunk-g708ekh1.js +0 -2
- package/dist/chunk-gcr9e83g.js +0 -11
- package/dist/chunk-gdmyrsr8.js +0 -4
- package/dist/chunk-gkms2ngq.js +0 -2
- package/dist/chunk-gnfywmgs.js +0 -7
- package/dist/chunk-hpf8kq7e.js +0 -2
- package/dist/chunk-j4x3faf8.js +0 -2
- package/dist/chunk-jkavtw9f.js +0 -2
- package/dist/chunk-kg1rdena.js +0 -3
- package/dist/chunk-km91wx0v.js +0 -2
- package/dist/chunk-kmsyvaex.js +0 -8
- package/dist/chunk-mrahwn5v.js +0 -8
- package/dist/chunk-nk3czvnk.js +0 -2
- package/dist/chunk-nmw4eewb.js +0 -2
- package/dist/chunk-nq5zxrk0.js +0 -4
- package/dist/chunk-ny67c03k.js +0 -3
- package/dist/chunk-p4wdxp2c.js +0 -2
- package/dist/chunk-pcxp4r9n.js +0 -3
- package/dist/chunk-pdyeaxc1.js +0 -2
- package/dist/chunk-pf06ded4.js +0 -2
- package/dist/chunk-pfs0gpzm.js +0 -2
- package/dist/chunk-pshdwq44.js +0 -2
- package/dist/chunk-pwgv84pn.js +0 -32
- package/dist/chunk-pwsnafp3.js +0 -4367
- package/dist/chunk-q9n5swx7.js +0 -3
- package/dist/chunk-qr346wnp.js +0 -2
- package/dist/chunk-r02hke04.js +0 -2
- package/dist/chunk-ranshpyc.js +0 -3
- package/dist/chunk-rn194bhp.js +0 -20
- package/dist/chunk-rn1hgyc8.js +0 -930
- package/dist/chunk-s7z5dp70.js +0 -43
- package/dist/chunk-s8jd13nb.js +0 -3
- package/dist/chunk-sn7exv0n.js +0 -2
- package/dist/chunk-t1tdjjht.js +0 -216
- package/dist/chunk-t6qx04s8.js +0 -499
- package/dist/chunk-t6y6gyps.js +0 -2
- package/dist/chunk-tjfs7cc3.js +0 -2
- package/dist/chunk-tkyrk66a.js +0 -3
- package/dist/chunk-tntv9hvq.js +0 -2
- package/dist/chunk-v3nwkveg.js +0 -12
- package/dist/chunk-vd4cb5xr.js +0 -2
- package/dist/chunk-vkhdce50.js +0 -2
- package/dist/chunk-w183av08.js +0 -2
- package/dist/chunk-w2m02njv.js +0 -2
- package/dist/chunk-wpjrcrs5.js +0 -2
- package/dist/chunk-wqmppf6b.js +0 -3
- package/dist/chunk-wtb9fxdy.js +0 -2
- package/dist/chunk-xmzygmcz.js +0 -3
- package/dist/chunk-xsng1mtq.js +0 -3
- package/dist/chunk-xxzefj4j.js +0 -2
- package/dist/chunk-yq8x8bxq.js +0 -47
- package/dist/chunk-ytma76qe.js +0 -3
- package/dist/chunk-yw1m115e.js +0 -2
- package/dist/chunk-z64a924m.js +0 -2
- package/dist/chunk-zcz9rs6p.js +0 -3
|
@@ -7,7 +7,7 @@ function assertString(value, label) {
|
|
|
7
7
|
function normalizeOptions(value) {
|
|
8
8
|
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
9
9
|
throw Error("@appearanceBootstrap expects an options object");
|
|
10
|
-
const input = value,
|
|
10
|
+
const input = value, { appearance, colorMode } = input;
|
|
11
11
|
assertString(input.storageKey, "storageKey");
|
|
12
12
|
if (appearance !== void 0 && (!appearance || typeof appearance !== "object" || Array.isArray(appearance)))
|
|
13
13
|
throw Error("@appearanceBootstrap appearance must be an object when given");
|
|
@@ -9,7 +9,7 @@ export declare function bindingsOf(attributes: Iterable<[string, string]>): Bind
|
|
|
9
9
|
* Works on the rendered output rather than the template on purpose: by then
|
|
10
10
|
* every server directive has run, components are expanded and slots are filled,
|
|
11
11
|
* so what is left is exactly the set of bindings that will reach a client. It
|
|
12
|
-
* is also the same input shape stx
|
|
12
|
+
* is also the same input shape stx's native translator takes, which keeps one
|
|
13
13
|
* definition of "a binding" across both.
|
|
14
14
|
*/
|
|
15
15
|
export declare function extractBindingManifest(html: string): { html: string, manifest: BindingManifest };
|
package/dist/bundle-analyzer.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import
|
|
3
|
-
`)}function
|
|
4
|
-
`)}function
|
|
2
|
+
import b from"fs";import z from"path";import{gzipSync as O}from"zlib";import{createHash as G}from"crypto";var I={".js":"js",".mjs":"js",".cjs":"js",".ts":"js",".jsx":"js",".tsx":"js",".css":"css",".scss":"css",".sass":"css",".less":"css",".html":"html",".htm":"html",".png":"image",".jpg":"image",".jpeg":"image",".gif":"image",".svg":"image",".webp":"image",".avif":"image",".ico":"image",".woff":"font",".woff2":"font",".ttf":"font",".eot":"font",".otf":"font"},E=[/node_modules/,/vendor/,/bower_components/,/\.min\./],F=[/index\.(js|ts|html)$/,/main\.(js|ts)$/,/app\.(js|ts)$/,/entry\.(js|ts)$/];async function S(t,o={}){let{includeSourceMaps:e=!1,parseImports:n=!0,detectDuplicates:a=!0,topModulesCount:r=20}=o;if(!b.existsSync(t))throw Error(`Build directory not found: ${t}`);if(!b.statSync(t).isDirectory())throw Error(`Not a directory: ${t}`);let s=await P(t,e),d=[],u=[];for(let h of s)try{let m=await L(h,t,n);d.push(m)}catch(m){u.push(`Failed to process ${h}: ${m}`)}let c=V(d,t),p=d.reduce((h,m)=>h+m.size,0),y=d.reduce((h,m)=>h+m.gzipSize,0),w=_(d),f=a?H(d):[],g=[...d].sort((h,m)=>m.size-h.size).slice(0,r);return{timestamp:Date.now(),buildDir:z.resolve(t),chunks:c,totalSize:p,totalGzipSize:y,moduleCount:d.length,duplicates:f,byType:w,largestModules:g,warnings:u}}async function P(t,o){let e=[];async function n(a){let r=await b.promises.readdir(a,{withFileTypes:!0});for(let i of r){let s=z.join(a,i.name);if(i.isDirectory()){if(!i.name.startsWith(".")&&i.name!=="node_modules")await n(s)}else if(i.isFile()){if(!o&&i.name.endsWith(".map"))continue;e.push(s)}}}return await n(t),e}async function L(t,o,e){let n=await b.promises.readFile(t),a=z.relative(o,t),r=z.extname(t).toLowerCase(),i=n.length,s=N(n),d=D(n,r),u=G("md5").update(n).digest("hex").slice(0,8),c=I[r]||"other",p=[];if(e&&c==="js")p.push(...A(n.toString("utf-8")));return{id:a,path:a,size:i,gzipSize:s,parsedSize:d,extension:r,type:c,imports:p,importedBy:[],hash:u}}function N(t){try{let o=O(t,{level:9}).length;return Math.min(o,t.length)}catch{return t.length}}function D(t,o){if(o.includes(".min.")||t.length<1000)return t.length;let n=I[o];if(n==="js")return Math.round(t.length*0.6);if(n==="css")return Math.round(t.length*0.7);return t.length}function A(t){let o=[],e=/import\s+(?:[\w*{}\s,]+\s+from\s+)?['"]([^'"]+)['"]/g,n;while((n=e.exec(t))!==null)o.push(n[1]);let a=/import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;while((n=a.exec(t))!==null)o.push(n[1]);let r=/require\s*\(\s*['"]([^'"]+)['"]\s*\)/g;while((n=r.exec(t))!==null)o.push(n[1]);return[...new Set(o)]}function V(t,o){let e=new Map;for(let a of t){let r=a.path.split(z.sep),i;if(r.length===1)i=z.basename(a.path,a.extension);else i=r[0];let s=e.get(i)||[];s.push(a),e.set(i,s)}let n=[];for(let[a,r]of e){let i=r.reduce((c,p)=>c+p.size,0),s=r.reduce((c,p)=>c+p.gzipSize,0),d=r.some((c)=>F.some((p)=>p.test(c.path))),u=r.some((c)=>E.some((p)=>p.test(c.path)));n.push({name:a,files:r.map((c)=>c.path),modules:r,size:i,gzipSize:s,isEntry:d,isVendor:u})}return n.sort((a,r)=>r.size-a.size)}function _(t){let o={js:{count:0,size:0,gzipSize:0},css:{count:0,size:0,gzipSize:0},html:{count:0,size:0,gzipSize:0},image:{count:0,size:0,gzipSize:0},font:{count:0,size:0,gzipSize:0},other:{count:0,size:0,gzipSize:0}};for(let e of t)o[e.type].count++,o[e.type].size+=e.size,o[e.type].gzipSize+=e.gzipSize;return o}function H(t){let o=new Map;for(let n of t){let a=o.get(n.hash)||[];a.push(n),o.set(n.hash,a)}let e=[];for(let[,n]of o)if(n.length>1){let a=n[0];e.push({path:a.path,count:n.length,wastedBytes:a.size*(n.length-1),locations:n.map((r)=>r.path)})}return e.sort((n,a)=>a.wastedBytes-n.wastedBytes)}function l(t){if(t<1024)return`${t} B`;if(t<1048576)return`${(t/1024).toFixed(2)} KB`;return`${(t/1048576).toFixed(2)} MB`}function M(t){let o=t.match(/^([\d.]+)\s*(B|KB|MB|GB)?$/i);if(!o)return 0;let e=Number.parseFloat(o[1]);switch((o[2]||"B").toUpperCase()){case"KB":return e*1024;case"MB":return e*1024*1024;case"GB":return e*1024*1024*1024;default:return e}}function v(t,o){if(o===0)return"0%";return`${(t/o*100).toFixed(1)}%`}function T(t,o){switch(o.format){case"json":return J(t,o);case"markdown":return K(t,o);case"text":default:return W(t,o)}}function J(t,o){let e=x(t,o);return JSON.stringify({timestamp:t.timestamp,buildDir:t.buildDir,summary:{totalSize:t.totalSize,totalSizeFormatted:l(t.totalSize),totalGzipSize:t.totalGzipSize,totalGzipSizeFormatted:l(t.totalGzipSize),moduleCount:t.moduleCount,chunkCount:t.chunks.length,duplicateCount:t.duplicates.length},byType:Object.fromEntries(Object.entries(t.byType).map(([n,a])=>[n,{...a,sizeFormatted:l(a.size),gzipSizeFormatted:l(a.gzipSize)}])),chunks:t.chunks.map((n)=>({name:n.name,size:n.size,sizeFormatted:l(n.size),gzipSize:n.gzipSize,gzipSizeFormatted:l(n.gzipSize),moduleCount:n.modules.length,isEntry:n.isEntry,isVendor:n.isVendor})),largestModules:t.largestModules.slice(0,o.topModules||10).map((n)=>({path:n.path,size:n.size,sizeFormatted:l(n.size),gzipSize:n.gzipSize,gzipSizeFormatted:l(n.gzipSize),type:n.type})),duplicates:t.duplicates,analysis:e,warnings:t.warnings},null,2)}function W(t,o){let e=[],n=o.showGzip!==!1;if(e.push(""),e.push("Bundle Analysis Report"),e.push("\u2550".repeat(50)),e.push(""),e.push("Summary"),e.push("\u2500".repeat(50)),n)e.push(`Total Size: ${l(t.totalSize)} (${l(t.totalGzipSize)} gzip)`);else e.push(`Total Size: ${l(t.totalSize)}`);if(e.push(`Modules: ${t.moduleCount}`),e.push(`Chunks: ${t.chunks.length}`),t.duplicates.length>0)e.push(`Duplicates: ${t.duplicates.length}`);if(e.push(""),o.threshold&&t.totalSize>o.threshold)e.push(`\u26A0\uFE0F Bundle exceeds threshold of ${l(o.threshold)}!`),e.push("");e.push("Size by Type"),e.push("\u2500".repeat(50));let a=["js","css","html","image","font","other"];for(let i of a){let s=t.byType[i];if(s.count>0){let d=v(s.size,t.totalSize),u=n?` (${l(s.gzipSize)} gzip)`:"";e.push(` ${i.padEnd(8)} ${l(s.size).padStart(12)}${u} ${d.padStart(6)} (${s.count} files)`)}}e.push(""),e.push("Chunks"),e.push("\u2500".repeat(50));for(let i of t.chunks.slice(0,10)){let s=[];if(i.isEntry)s.push("entry");if(i.isVendor)s.push("vendor");let d=s.length>0?` [${s.join(", ")}]`:"",u=n?` (${l(i.gzipSize)} gzip)`:"";e.push(` ${i.name.padEnd(20)} ${l(i.size).padStart(12)}${u}${d}`)}if(t.chunks.length>10)e.push(` ... and ${t.chunks.length-10} more chunks`);e.push("");let r=o.topModules||10;e.push(`Largest Modules (Top ${r})`),e.push("\u2500".repeat(50));for(let i=0;i<Math.min(r,t.largestModules.length);i++){let s=t.largestModules[i],d=n?` (${l(s.gzipSize)} gzip)`:"";e.push(` ${(i+1).toString().padStart(2)}. ${s.path}`),e.push(` ${l(s.size)}${d}`)}if(e.push(""),t.duplicates.length>0){e.push("Duplicate Modules"),e.push("\u2500".repeat(50));for(let i of t.duplicates.slice(0,5))e.push(` ${i.path}`),e.push(` ${i.count} copies, wasting ${l(i.wastedBytes)}`);if(t.duplicates.length>5)e.push(` ... and ${t.duplicates.length-5} more duplicates`);e.push("")}if(o.recommendations!==!1){let i=x(t,o);if(i.recommendations.length>0){e.push("Recommendations"),e.push("\u2500".repeat(50));for(let s of i.recommendations.slice(0,5)){let d=s.impact==="high"?"\u26A1":s.impact==="medium"?"\uD83D\uDCCA":"\uD83D\uDCA1";e.push(` ${d} ${s.title}`),e.push(` ${s.description}`)}e.push("")}}if(t.warnings.length>0){e.push("Warnings"),e.push("\u2500".repeat(50));for(let i of t.warnings)e.push(` \u26A0\uFE0F ${i}`);e.push("")}return e.join(`
|
|
3
|
+
`)}function K(t,o){let e=[],n=o.showGzip!==!1;if(e.push("# Bundle Analysis Report"),e.push(""),e.push(`Generated: ${new Date(t.timestamp).toISOString()}`),e.push(""),e.push("## Summary"),e.push(""),e.push("| Metric | Value |"),e.push("|--------|-------|"),e.push(`| Total Size | ${l(t.totalSize)} |`),n)e.push(`| Gzip Size | ${l(t.totalGzipSize)} |`);e.push(`| Modules | ${t.moduleCount} |`),e.push(`| Chunks | ${t.chunks.length} |`),e.push(`| Duplicates | ${t.duplicates.length} |`),e.push(""),e.push("## Size by Type"),e.push(""),e.push("| Type | Size | Gzip | % | Files |"),e.push("|------|------|------|---|-------|");let a=["js","css","html","image","font","other"];for(let i of a){let s=t.byType[i];if(s.count>0)e.push(`| ${i} | ${l(s.size)} | ${l(s.gzipSize)} | ${v(s.size,t.totalSize)} | ${s.count} |`)}e.push(""),e.push("## Chunks"),e.push(""),e.push("| Name | Size | Gzip | Modules | Type |"),e.push("|------|------|------|---------|------|");for(let i of t.chunks.slice(0,15)){let s=i.isEntry?"Entry":i.isVendor?"Vendor":"-";e.push(`| ${i.name} | ${l(i.size)} | ${l(i.gzipSize)} | ${i.modules.length} | ${s} |`)}e.push("");let r=o.topModules||10;e.push(`## Largest Modules (Top ${r})`),e.push(""),e.push("| # | Path | Size | Gzip |"),e.push("|---|------|------|------|");for(let i=0;i<Math.min(r,t.largestModules.length);i++){let s=t.largestModules[i];e.push(`| ${i+1} | \`${s.path}\` | ${l(s.size)} | ${l(s.gzipSize)} |`)}if(e.push(""),t.duplicates.length>0){e.push("## Duplicates"),e.push(""),e.push("| Path | Copies | Wasted |"),e.push("|------|--------|--------|");for(let i of t.duplicates.slice(0,10))e.push(`| \`${i.path}\` | ${i.count} | ${l(i.wastedBytes)} |`);e.push("")}if(o.recommendations!==!1){let i=x(t,o);if(i.recommendations.length>0){e.push("## Recommendations"),e.push("");for(let s of i.recommendations)e.push(`### ${s.title}`),e.push(""),e.push(s.description),e.push(""),e.push(`- **Impact:** ${s.impact}`),e.push(`- **Effort:** ${s.effort}`),e.push("")}}return e.join(`
|
|
4
|
+
`)}function x(t,o){let e=[],n=[];if(o.threshold&&t.totalSize>o.threshold)e.push({severity:"error",message:`Bundle size (${l(t.totalSize)}) exceeds threshold (${l(o.threshold)})`});if(t.totalSize>1048576)e.push({severity:"warning",message:`Bundle is over 1MB (${l(t.totalSize)})`,details:"Large bundles can significantly impact load time"});if(t.duplicates.length>0){let s=t.duplicates.reduce((d,u)=>d+u.wastedBytes,0);e.push({severity:"warning",message:`${t.duplicates.length} duplicate modules found, wasting ${l(s)}`}),n.push({title:"Remove Duplicate Modules",description:"Consider using import aliases or ensuring consistent package versions to eliminate duplicates.",impact:"medium",effort:"low"})}if(t.byType.js.size/t.totalSize>0.8&&t.totalSize>512000)n.push({title:"Code Splitting",description:"Over 80% of your bundle is JavaScript. Consider splitting code by route or feature.",impact:"high",effort:"medium"});let r=t.largestModules.filter((s)=>s.size>102400);if(r.length>0){e.push({severity:"info",message:`${r.length} modules are over 100KB`});for(let s of r){if(s.path.includes("lodash")&&!s.path.includes("lodash-es"))n.push({title:"Use lodash-es instead of lodash",description:"lodash-es supports tree-shaking and can significantly reduce bundle size.",impact:"high",effort:"low"});if(s.path.includes("moment"))n.push({title:"Replace moment.js",description:"Consider using date-fns or dayjs for smaller date handling libraries.",impact:"high",effort:"medium"})}}if(t.byType.image.size>512000)n.push({title:"Optimize Images",description:`Images account for ${l(t.byType.image.size)}. Consider using WebP/AVIF formats and responsive images.`,impact:"high",effort:"low"});let i=100;if(t.totalSize>1048576)i-=20;else if(t.totalSize>512000)i-=10;if(i-=Math.min(20,t.duplicates.length*2),i-=Math.min(15,r.length*3),o.threshold&&t.totalSize>o.threshold)i-=25;return{score:Math.max(0,i),issues:e,recommendations:n}}var U={lodash:{alternative:"lodash-es or individual imports",savings:"~70%"},moment:{alternative:"date-fns or dayjs",savings:"~90%"},"chart.js":{alternative:"chart.js with tree-shaking",savings:"~50%"},"highlight.js":{alternative:"Selective language imports",savings:"~80%"},fontawesome:{alternative:"Individual icon imports",savings:"~90%"},"material-ui":{alternative:"Named imports from @mui/*",savings:"~60%"}};function Y(t){for(let[o,e]of Object.entries(U))if(t.includes(o))return{title:`Optimize ${o}`,description:`Consider using ${e.alternative}. Potential savings: ${e.savings}`,impact:"high",effort:"low"};return null}var q={default:{js:"#f7df1e",css:"#264de4",html:"#e34c26",image:"#4caf50",font:"#9c27b0",other:"#607d8b",vendor:"#ff5722"},pastel:{js:"#fff3b0",css:"#b0d4ff",html:"#ffb0b0",image:"#b0ffb0",font:"#e0b0ff",other:"#d0d0d0",vendor:"#ffcfb0"},monochrome:{js:"#333333",css:"#555555",html:"#777777",image:"#999999",font:"#bbbbbb",other:"#dddddd",vendor:"#444444"}};function B(t,o={}){let{title:e="Bundle Analysis",gzip:n=!0,colorScheme:a="default"}=o,r=q[a],i=X(t),s=JSON.stringify(i);return`<!DOCTYPE html>
|
|
5
5
|
<html lang="en">
|
|
6
6
|
<head>
|
|
7
7
|
<meta charset="UTF-8">
|
|
8
8
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
9
|
-
<title>${
|
|
9
|
+
<title>${R(e)}</title>
|
|
10
10
|
<style>
|
|
11
11
|
* {
|
|
12
12
|
box-sizing: border-box;
|
|
@@ -212,22 +212,22 @@ import v from"fs";import H from"path";import{gzipSync as z}from"zlib";import{cre
|
|
|
212
212
|
</head>
|
|
213
213
|
<body>
|
|
214
214
|
<div class="header">
|
|
215
|
-
<h1>${
|
|
215
|
+
<h1>${R(e)}</h1>
|
|
216
216
|
<div class="stats">
|
|
217
217
|
<div class="stat">
|
|
218
|
-
<div class="stat-value" id="total-size">${
|
|
218
|
+
<div class="stat-value" id="total-size">${l(t.totalSize)}</div>
|
|
219
219
|
<div class="stat-label">Total Size</div>
|
|
220
220
|
</div>
|
|
221
221
|
<div class="stat">
|
|
222
|
-
<div class="stat-value" id="gzip-size">${
|
|
222
|
+
<div class="stat-value" id="gzip-size">${l(t.totalGzipSize)}</div>
|
|
223
223
|
<div class="stat-label">Gzip Size</div>
|
|
224
224
|
</div>
|
|
225
225
|
<div class="stat">
|
|
226
|
-
<div class="stat-value">${
|
|
226
|
+
<div class="stat-value">${t.moduleCount}</div>
|
|
227
227
|
<div class="stat-label">Modules</div>
|
|
228
228
|
</div>
|
|
229
229
|
<div class="stat">
|
|
230
|
-
<div class="stat-value">${
|
|
230
|
+
<div class="stat-value">${t.chunks.length}</div>
|
|
231
231
|
<div class="stat-label">Chunks</div>
|
|
232
232
|
</div>
|
|
233
233
|
</div>
|
|
@@ -238,7 +238,7 @@ import v from"fs";import H from"path";import{gzipSync as z}from"zlib";import{cre
|
|
|
238
238
|
<input type="text" id="search" placeholder="Search modules...">
|
|
239
239
|
</div>
|
|
240
240
|
<label>
|
|
241
|
-
<input type="checkbox" id="show-gzip" ${
|
|
241
|
+
<input type="checkbox" id="show-gzip" ${n?"checked":""}>
|
|
242
242
|
Show Gzip Size
|
|
243
243
|
</label>
|
|
244
244
|
</div>
|
|
@@ -254,37 +254,37 @@ import v from"fs";import H from"path";import{gzipSync as z}from"zlib";import{cre
|
|
|
254
254
|
<div class="legend">
|
|
255
255
|
<div class="legend-title">File Types</div>
|
|
256
256
|
<div class="legend-item">
|
|
257
|
-
<div class="legend-color" style="background: ${
|
|
257
|
+
<div class="legend-color" style="background: ${r.js}"></div>
|
|
258
258
|
<span>JavaScript</span>
|
|
259
259
|
</div>
|
|
260
260
|
<div class="legend-item">
|
|
261
|
-
<div class="legend-color" style="background: ${
|
|
261
|
+
<div class="legend-color" style="background: ${r.css}"></div>
|
|
262
262
|
<span>CSS</span>
|
|
263
263
|
</div>
|
|
264
264
|
<div class="legend-item">
|
|
265
|
-
<div class="legend-color" style="background: ${
|
|
265
|
+
<div class="legend-color" style="background: ${r.html}"></div>
|
|
266
266
|
<span>HTML</span>
|
|
267
267
|
</div>
|
|
268
268
|
<div class="legend-item">
|
|
269
|
-
<div class="legend-color" style="background: ${
|
|
269
|
+
<div class="legend-color" style="background: ${r.image}"></div>
|
|
270
270
|
<span>Images</span>
|
|
271
271
|
</div>
|
|
272
272
|
<div class="legend-item">
|
|
273
|
-
<div class="legend-color" style="background: ${
|
|
273
|
+
<div class="legend-color" style="background: ${r.font}"></div>
|
|
274
274
|
<span>Fonts</span>
|
|
275
275
|
</div>
|
|
276
276
|
<div class="legend-item">
|
|
277
|
-
<div class="legend-color" style="background: ${
|
|
277
|
+
<div class="legend-color" style="background: ${r.other}"></div>
|
|
278
278
|
<span>Other</span>
|
|
279
279
|
</div>
|
|
280
280
|
</div>
|
|
281
281
|
|
|
282
282
|
<script src="https://d3js.org/d3.v7.min.js"></script>
|
|
283
283
|
<script>
|
|
284
|
-
const data = ${
|
|
285
|
-
const colors = ${JSON.stringify(
|
|
284
|
+
const data = ${s};
|
|
285
|
+
const colors = ${JSON.stringify(r)};
|
|
286
286
|
|
|
287
|
-
let showGzip = ${
|
|
287
|
+
let showGzip = ${n};
|
|
288
288
|
let currentRoot = data;
|
|
289
289
|
let searchTerm = '';
|
|
290
290
|
|
|
@@ -496,4 +496,4 @@ import v from"fs";import H from"path";import{gzipSync as z}from"zlib";import{cre
|
|
|
496
496
|
render();
|
|
497
497
|
</script>
|
|
498
498
|
</body>
|
|
499
|
-
</html>`}function
|
|
499
|
+
</html>`}function X(t){let o={name:"root",size:t.totalSize,gzipSize:t.totalGzipSize,children:[]};for(let e of t.chunks){let n={name:e.name,size:e.size,gzipSize:e.gzipSize,children:[]};for(let a of e.modules)Q(n,a);o.children.push(n)}return o}function Q(t,o){let e=o.path.split("/"),n=t;for(let r=0;r<e.length-1;r++){let i=e[r],s=n.children?.find((d)=>d.name===i);if(!s){if(s={name:i,size:0,gzipSize:0,children:[]},!n.children)n.children=[];n.children.push(s)}n=s}let a=e[e.length-1];if(!n.children)n.children=[];n.children.push({name:a,path:o.path,size:o.size,gzipSize:o.gzipSize,type:o.type}),Z(t,o.size,o.gzipSize)}function Z(t,o,e){}function R(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function k(t){let o=process.platform,e=o==="darwin"?"open":o==="win32"?"start":"xdg-open";Bun.spawn([e,t],{stdio:["ignore","ignore","ignore"]})}import j from"fs";import C from"path";async function fe(t={}){let{directory:o="dist",output:e,format:n="html",open:a=!0,gzip:r=!0,threshold:i,recommendations:s=!0,topModules:d=20,parseImports:u=!0}=t,p=await S(o,{parseImports:u,detectDuplicates:!0,topModulesCount:d}),y=i?typeof i==="string"?M(i):i:void 0,w=y?p.totalSize>y:!1,f,g;if(n==="html"){let h={title:`Bundle Analysis - ${C.basename(C.resolve(o))}`,gzip:r};if(f=B(p,h),g=e||C.join(o,"bundle-report.html"),await j.promises.writeFile(g,f),a)k(g)}else if(f=T(p,{format:n,threshold:y,recommendations:s,topModules:d,showGzip:r}),e)g=e,await j.promises.writeFile(g,f);return{stats:p,report:f,outputPath:g,exceedsThreshold:w}}async function ze(t){let o=await S(t,{parseImports:!1,detectDuplicates:!1,topModulesCount:0});return{totalSize:o.totalSize,totalSizeFormatted:l(o.totalSize),gzipSize:o.totalGzipSize,gzipSizeFormatted:l(o.totalGzipSize),moduleCount:o.moduleCount,chunkCount:o.chunks.length}}export{fe as analyze,x as analyzeBundle,S as collectBundleStats,l as formatBytes,T as generateReport,B as generateTreemap,ze as getBundleSummary,Y as getModuleRecommendation,k as openInBrowser,M as parseSize,v as percentage};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{L,j,B,Lt,Z,oe,Tn,Yo,Ie,ut,jt,Bt,Ft,F,zt,Ht,_n}from"./chunk-eed4fwps.js";export{j as DEFAULT_FORMATS,B as DEFAULT_QUALITY,L as DEFAULT_WIDTHS,_n as ImageProcessingError,Ht as formatSize,ut as generateSizes,Ie as generateSrcSet,jt as getFallbackVariant,Tn as getImageMetadata,F as getMimeType,zt as getTotalSize,Bt as groupVariantsByFormat,Z as isImageBackendAvailable,Ft as isImageFile,Lt as isSharpAvailable,oe as processImage,Yo as resizeAndConvert};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Wo,Qs,Wc,qo,Xo,qc,Xc}from"./chunk-q4c06e8x.js";import"./chunk-v4vaqxrf.js";import"./chunk-mepdnezf.js";import"./chunk-xtdw3692.js";import{He,pc}from"./chunk-69mc2np8.js";import"./chunk-752hw7cd.js";import"./chunk-shr559s7.js";import"./chunk-ak1cgcah.js";import"./chunk-2gr351s0.js";import"./chunk-h0atqq82.js";import"./chunk-ngc2wke4.js";import"./chunk-xfp7k0v8.js";import"./chunk-m4sk62wb.js";import"./chunk-z0g9jvv0.js";import"./chunk-8nhshfz6.js";import"./chunk-7gkv67ky.js";import"./chunk-ce1sejr3.js";import"./chunk-czxt605c.js";export{Wo as buildVirtualSource,He as extractScriptBlocks,pc as extractTemplateExpressions,qo as findRuntimeTypeDeclarations,Xo as findStxModuleDeclarations,Xc as formatTypecheckDiagnostics,Wc as sourcePathFor,qc as typecheckStxFiles,Qs as virtualPathFor};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
function a(t,e){let n=t[e],i=e+1;while(i<t.length){if(t[i]==="\\"){i+=2;continue}if(t[i]===n)return i+1;i++}return t.length}function w(t,e){let n=e+1;while(n<t.length){if(t[n]==="\\"){n+=2;continue}if(t[n]==="`")return n+1;if(t[n]==="$"&&t[n+1]==="{"){if(n=po(t,n+2),n<t.length)n++;continue}n++}return t.length}function po(t,e){let n=1,i=e;while(i<t.length){let l=t[i];if(l==="\\"){i+=2;continue}if(l==='"'||l==="'"){i=a(t,i);continue}if(l==="`"){i=w(t,i);continue}if(l==="/"&&t[i+1]==="/"){while(i<t.length&&t[i]!==`
|
|
3
|
+
`)i++;continue}if(l==="/"&&t[i+1]==="*"){i+=2;while(i<t.length&&t.slice(i,i+2)!=="*/")i++;i+=2;continue}if(l==="{"){n++,i++;continue}if(l==="}"){if(n--,n===0)return i;i++;continue}i++}return t.length}var o=new Set(["return","typeof","instanceof","in","of","new","delete","void","throw","case","do","else","yield","await"]);function b(t,e){if(e)return o.has(e);return!(t===")"||t==="]"||t===h)}var h="\x00";function m(t,e){let n=e+1,i=!1;while(n<t.length){let l=t[n];if(l===`
|
|
4
|
+
`)return-1;if(l==="\\"){n+=2;continue}if(l==="[")i=!0;else if(l==="]")i=!1;else if(l==="/"&&!i){n++;while(n<t.length&&/[a-z]/i.test(t[n]))n++;return n}n++}return-1}function s(t){let e="",n=0,i="",l="";while(n<t.length){let u=t.slice(n,n+2);if(u==="//"){while(n<t.length&&t[n]!==`
|
|
5
|
+
`)e+=" ",n++;continue}if(u==="/*"){while(n<t.length&&t.slice(n,n+2)!=="*/")e+=t[n]===`
|
|
6
|
+
`?`
|
|
7
|
+
`:" ",n++;e+=" ",n+=2;continue}let r=t[n];if(r==='"'||r==="'"){let f=r;e+=" ",n++;while(n<t.length&&t[n]!==f){if(t[n]==="\\"){e+=" ",n+=2;continue}e+=t[n]===`
|
|
8
|
+
`?`
|
|
9
|
+
`:" ",n++}e+=" ",n++,i=h,l="";continue}if(r==="/"&&b(i,l)){let f=m(t,n);if(f!==-1){e+=`/${" ".repeat(f-n-2)}/`,n=f,i=h,l="";continue}}if(r==="`"){e+=" ",n++;while(n<t.length&&t[n]!=="`"){if(t[n]==="\\"){e+=" ",n+=2;continue}if(t[n]==="$"&&t[n+1]==="{"){let f=n+2,g=po(t,f);if(e+=" ",e+=s(t.slice(f,g)),g<t.length)e+=" ";n=g+1;continue}e+=t[n]===`
|
|
10
|
+
`?`
|
|
11
|
+
`:" ",n++}e+=" ",n++,i=h,l="";continue}if(e+=r,n++,/[\w$]/.test(r))l=/[\w$]/.test(i)?l+r:r,i=r;else if(!/\s/.test(r))i=r,l=""}return e}function we(t){let e=new Uint16Array(t.length),n=0,i=!0;for(let l=0;l<t.length;l++){let u=t[l];if(u===")"||u==="]"||u==="}")if(n===0)i=!1;else n--;if(e[l]=n,u==="("||u==="["||u==="{")n++}return{depths:e,balanced:i&&n===0}}
|
|
12
|
+
export{po,s,we};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{zu,vo,Hu,wo,Cc,$c,Tt,ln,Vu,Ec,Tc,f}from"./chunk-h0atqq82.js";export{Tt as buildCss,Ec as extractClassNames,$c as fingerprintConfig,Tc as generateCss,Vu as getCachedCSS,zu as getCssServeAsset,f as injectCss,vo as loadCssEngine,wo as loadCssEngineConfig,ln as rebuildCss,Hu as resetCssCache,Cc as resolveUserCssConfig};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var l=null,k=[],h=new WeakMap;function v(e){let r=e,t=new Set,n={get value(){if(l){let o=h.get(n);if(!o)o=new Set,h.set(n,o);o.add(l)}return r},set value(o){if(!Object.is(r,o)){r=o,t.forEach((s)=>s(o));let u=h.get(n);if(u)u.forEach((s)=>s())}},subscribe(o){return t.add(o),()=>t.delete(o)},peek(){return r}};return n}function b(e){return e!==null&&typeof e==="object"&&"value"in e&&"subscribe"in e&&"peek"in e}function y(e){return b(e)?e.value:e}function g(e){let r={};for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))r[t]=v(e[t]);return r}function S(e){return v(e)}function R(e){let r=typeof e==="function",t=r?e:e.get,n=r?void 0:e.set,o=r?Object.is:e.equals||Object.is,u,s=!0,a=new Set,f=new Set,p=()=>{if(s=!0,f.size>0){let i=c.value;f.forEach((T)=>T(i))}};function d(){a.clear();let i=l;l=p,k.push(p);try{return t()}finally{k.pop(),l=i}}let c={get value(){if(l){let i=h.get(c);if(!i)i=new Set,h.set(c,i);i.add(l)}if(s){let i=d();if(!o(u,i))u=i;s=!1}return u},set value(i){if(n)n(i);else console.warn("Computed property is readonly")},subscribe(i){return f.add(i),()=>f.delete(i)},peek(){if(s)u=t(),s=!1;return u},invalidate(){s=!0},get dirty(){return s},get deps(){return a}};return c}function C(e,r,t={}){let{immediate:n=!1,deep:o=!1,flush:u="pre",once:s=!1}=t,a,f=!0,p=!1,d=()=>{if(b(e))return o?w(e.value):e.value;return e()},c=()=>{if(!f||p)return;let m=d();if(a!==void 0&&Object.is(a,m)&&!o)return;let x=()=>{if(r(m,a),a=o?w(m):m,s)T()};if(u==="sync")x();else if(u==="post")queueMicrotask(x);else Promise.resolve().then(x)},i=null;if(b(e))i=e.subscribe(()=>c());else i=R(e).subscribe(()=>c());if(n)a=void 0,c();else a=d();let T=()=>{if(f=!1,i)i(),i=null};return T.pause=()=>{p=!0},T.resume=()=>{p=!1},T}function V(e,r,t={}){let{immediate:n=!1,once:o=!1}=t,u=e.map((c)=>b(c)?c.value:void 0),s=!0,a=!1,f=()=>{if(!s||a)return;let c=e.map((i)=>b(i)?i.value:void 0);if(r(c,u),u=[...c],o)d()},p=e.map((c)=>{if(b(c))return c.subscribe(()=>f());return()=>{}});if(n)f();let d=()=>{s=!1,p.forEach((c)=>c())};return d.pause=()=>{a=!0},d.resume=()=>{a=!1},d}function W(e,r={}){let{flush:t="pre"}=r,n,o=!0,u=!1,s=()=>{if(!o||u)return;if(n)n();let f=l;l=s,k.push(s);try{n=e()}finally{k.pop(),l=f}};if(t==="sync")s();else if(t==="post")queueMicrotask(s);else Promise.resolve().then(s);let a=()=>{if(o=!1,n)n()};return a.pause=()=>{u=!0},a.resume=()=>{u=!1},a}function _(e,r={},t){let n=/@computed\s*\(\s*(\w+)\s*,\s*(.+?)\s*\)/gi;return e.replace(n,(o,u,s)=>{try{let f=Function(...Object.keys(r),`return ${s}`)(...Object.values(r));return r[u]=f,`<!-- computed: ${u} = ${f} -->`}catch(a){return`<!-- computed error: ${u} - ${a} -->`}})}function K(e,r={},t){let n=/@watch\s*\(\s*(\w+)\s*\)\s*([\s\S]*?)@endwatch/gi;return e.replace(n,(o,u,s)=>`
|
|
3
|
+
<script data-watch="${`watch-${Math.random().toString(36).substring(2,9)}`}">
|
|
4
|
+
(function() {
|
|
5
|
+
// Watch implementation for ${u}
|
|
6
|
+
const handler = ${s.trim()};
|
|
7
|
+
if (window.__stxState && window.__stxState['${u}']) {
|
|
8
|
+
window.__stxState['${u}'].subscribe(function(newValue) {
|
|
9
|
+
handler(newValue);
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
})();
|
|
13
|
+
</script>
|
|
14
|
+
`)}function w(e){if(e===null||typeof e!=="object")return e;if(Array.isArray(e))return e.map((t)=>w(t));if(e instanceof Date)return new Date(e.getTime());if(e instanceof Map){let t=new Map;return e.forEach((n,o)=>t.set(w(o),w(n))),t}if(e instanceof Set){let t=new Set;return e.forEach((n)=>t.add(w(n))),t}let r={};for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))r[t]=w(e[t]);return r}function E(e,r=100){let t=v(e()),n=null,o=()=>{if(n)clearTimeout(n);n=setTimeout(()=>{t.value=e()},r)};return R(e).subscribe(()=>o()),{get value(){return t.value},set value(s){console.warn("Debounced computed is readonly")},subscribe:t.subscribe,peek:t.peek,invalidate(){o()},get dirty(){return!1},get deps(){return new Set}}}function j(e,r=100){let t=v(e()),n=0,o=()=>{let s=Date.now();if(s-n>=r)n=s,t.value=e()};return R(e).subscribe(()=>o()),{get value(){return t.value},set value(s){console.warn("Throttled computed is readonly")},subscribe:t.subscribe,peek:t.peek,invalidate(){o()},get dirty(){return!1},get deps(){return new Set}}}var O={ref:v,computed:R,watch:C,watchMultiple:V,watchEffect:W,isRef:b,unref:y,toRefs:g,shallowRef:S,debouncedComputed:E,throttledComputed:j,processComputedDirectives:_,processWatchDirectives:K};export{R as computed,E as debouncedComputed,O as default,b as isRef,_ as processComputedDirectives,K as processWatchDirectives,v as ref,S as shallowRef,R as stxComputed,E as stxDebouncedComputed,b as stxIsRef,v as stxRef,S as stxShallowRef,j as stxThrottledComputed,g as stxToRefs,y as stxUnref,C as stxWatch,W as stxWatchEffect,V as stxWatchMultiple,j as throttledComputed,g as toRefs,y as unref,C as watch,W as watchEffect,V as watchMultiple};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Rt,S}from"./chunk-ngc2wke4.js";import m from"fs";import e from"path";async function an(r,o,i){if(r.__stx_runtime_config)return;let n=Rt();if(n||i){r.__stx_runtime_config=n??S(i);return}let t=e.dirname(e.resolve(o));while(!0){if(["stx.config.ts","stx.config.js",".config/stx.config.ts",".config/stx.config.js"].some((f)=>m.existsSync(e.join(t,f)))){let{loadStxConfig:f}=await import("./chunk-syaw6b75.js"),c=await f(t);if(c.runtimeConfig)r.__stx_runtime_config=S(c.runtimeConfig);return}let s=e.dirname(t);if(s===t)return;t=s}}async function xs(r,o){function i(n){if(n===null)return"null";if(Array.isArray(n))return`Array<${n.length?[...new Set(n.map(i))].join(" | "):"unknown"}>`;if(typeof n==="object")return`{ ${Object.entries(n).map(([t,s])=>`readonly ${JSON.stringify(t)}: ${i(s)}`).join("; ")} }`;return typeof n}await Bun.write(e.join(r,".stx/runtime-config.d.ts"),`import '@stacksjs/stx/runtime-config'
|
|
3
|
+
declare module '@stacksjs/stx/runtime-config' { interface PublicRuntimeConfig ${i(o.public??{})} }
|
|
4
|
+
`),await Bun.write(e.join(r,".stx/runtime-config-server.d.ts"),`import '@stacksjs/stx/runtime-config-server'
|
|
5
|
+
declare module '@stacksjs/stx/runtime-config-server' { interface PrivateRuntimeConfig ${i(o.private??{})} }
|
|
6
|
+
`)}
|
|
7
|
+
export{an,xs};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{wi,xi,Si,ku}from"./chunk-sd47dzs0.js";import"./chunk-ynvdvbat.js";import"./chunk-69mc2np8.js";import"./chunk-752hw7cd.js";import"./chunk-shr559s7.js";import"./chunk-ak1cgcah.js";import"./chunk-2gr351s0.js";import"./chunk-h0atqq82.js";import"./chunk-ngc2wke4.js";import"./chunk-xfp7k0v8.js";import"./chunk-m4sk62wb.js";import"./chunk-z0g9jvv0.js";import"./chunk-8nhshfz6.js";import"./chunk-7gkv67ky.js";import"./chunk-ce1sejr3.js";import"./chunk-czxt605c.js";export{wi as buildNative,ku as default,Si as getAvailableFormats,xi as getAvailableTargets};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
function li(e){return e}class a{plugins=new Map;sortedPlugins=[];initialized=!1;async register(e,t){if(this.plugins.has(e.name))throw Error(`Plugin "${e.name}" is already registered`);if(e.dependencies){for(let r of e.dependencies)if(!this.plugins.has(r))throw Error(`Plugin "${e.name}" depends on "${r}" which is not registered`)}if(this.plugins.set(e.name,e),e.onRegister)await e.onRegister(t);this.sortPlugins()}async unregister(e){let t=this.plugins.get(e);if(!t)return!1;for(let[r,i]of this.plugins)if(i.dependencies?.includes(e))throw Error(`Cannot unregister "${e}" because "${r}" depends on it`);if(t.onUnregister)await t.onUnregister();return this.plugins.delete(e),this.sortPlugins(),!0}get(e){return this.plugins.get(e)}has(e){return this.plugins.has(e)}getAll(){return[...this.sortedPlugins]}getAllDirectives(){let e=[];for(let t of this.sortedPlugins)if(t.registerDirectives)e.push(...t.registerDirectives());return e}getAllFilters(){let e={};for(let t of this.sortedPlugins)if(t.registerFilters)Object.assign(e,t.registerFilters());return e}async runBeforeProcess(e){return this.runHooks("beforeProcess",e)}async runAfterParse(e){return this.runHooks("afterParse",e)}async runBeforeDirective(e,t){return this.runDirectiveHooks("beforeDirective",e,t)}async runAfterDirective(e,t){return this.runDirectiveHooks("afterDirective",e,t)}async runBeforeRender(e){return this.runHooks("beforeRender",e)}async runAfterRender(e){return this.runHooks("afterRender",e)}async runOnError(e){for(let t of this.sortedPlugins)if(t.onError)try{let r=await t.onError(e);if(r){if(r.template!==void 0)e.template=r.template;if(r.context)e.context={...e.context,...r.context};if(r.metadata)e.metadata={...e.metadata,...r.metadata};if(r.skip)return e}}catch(r){console.error(`Error in plugin "${t.name}" onError hook:`,r)}return null}sortPlugins(){this.sortedPlugins=Array.from(this.plugins.values()).sort((e,t)=>(e.priority??100)-(t.priority??100))}async runHooks(e,t){let r={...t};for(let i of this.sortedPlugins){let s=i[e];if(s)try{let n=await s(r);if(n){if(n.template!==void 0)r.template=n.template;if(n.context)r.context={...r.context,...n.context};if(n.metadata)r.metadata={...r.metadata,...n.metadata};if(n.skip)break}}catch(n){console.error(`Error in plugin "${i.name}" ${e} hook:`,n)}}return r}async runDirectiveHooks(e,t,r){let i={...r};for(let s of this.sortedPlugins){let n=s[e];if(n)try{let o=await n(t,i);if(o){if(o.template!==void 0)i.template=o.template;if(o.context)i.context={...i.context,...o.context};if(o.metadata)i.metadata={...i.metadata,...o.metadata};if(o.skip)break}}catch(o){console.error(`Error in plugin "${s.name}" ${e} hook:`,o)}}return i}}var ul=new a;var u=li({name:"stx-debug",version:"1.0.0",description:"Logs all plugin lifecycle events for debugging",priority:0,beforeProcess(e){console.log("[stx-debug] beforeProcess:",e.filePath)},afterParse(e){console.log("[stx-debug] afterParse:",e.template.length,"chars")},beforeDirective(e,t){console.log("[stx-debug] beforeDirective:",e)},afterDirective(e,t){console.log("[stx-debug] afterDirective:",e)},beforeRender(e){console.log("[stx-debug] beforeRender")},afterRender(e){console.log("[stx-debug] afterRender:",e.template.length,"chars")},onError(e){console.error("[stx-debug] onError:",e.error.message,"in phase:",e.phase)}}),l=li({name:"stx-timing",version:"1.0.0",description:"Measures template processing time",priority:1,beforeProcess(e){e.metadata.startTime=performance.now()},afterRender(e){let t=e.metadata.startTime;if(t){let r=performance.now()-t;console.log(`[stx-timing] Processing took ${r.toFixed(2)}ms`)}}});export{li,ul};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Lo,Js,jo,Bo,Ys,Fo,zo,Ho,Vo,Zs,Uo,Uc}from"./chunk-y1cmjvk3.js";import{ei,Jo}from"./chunk-ej9j6k1q.js";import{L,j,B,Lt,Z,oe,Tn,Ie,ut,jt,Bt,Ft,F,zt,Ht,_n}from"./chunk-eed4fwps.js";import{Ta}from"./chunk-t4hzprsm.js";export{j as DEFAULT_FORMATS,B as DEFAULT_QUALITY,L as DEFAULT_WIDTHS,_n as ImageProcessingError,Bo as clearImageCache,Ys as createImageDirective,Jo as createImageHandler,zo as createImagePlugin,Uc as defaultImageConfig,Ht as formatSize,Zs as generateImageManifest,ut as generateSizes,Ie as generateSrcSet,jt as getFallbackVariant,Tn as getImageMetadata,F as getMimeType,zt as getTotalSize,Bt as groupVariantsByFormat,ei as handleImageRequest,Fo as imageDirective,Z as isImageBackendAvailable,Ft as isImageFile,Lt as isSharpAvailable,Vo as optimizeDirectory,Ho as optimizeImage,Js as parseImageComponent,oe as processImage,jo as processImageComponents,Lo as renderImageComponent,Ta as rewriteImagesWithSiblings,Uo as writeImageManifest};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Nu,ve,Gi,Lu,cs,ls,us}from"./chunk-69mc2np8.js";import"./chunk-752hw7cd.js";import"./chunk-shr559s7.js";import"./chunk-ak1cgcah.js";import"./chunk-2gr351s0.js";import"./chunk-h0atqq82.js";import"./chunk-ngc2wke4.js";import"./chunk-xfp7k0v8.js";import"./chunk-m4sk62wb.js";import"./chunk-z0g9jvv0.js";import"./chunk-8nhshfz6.js";import"./chunk-7gkv67ky.js";import"./chunk-ce1sejr3.js";import"./chunk-czxt605c.js";export{Lu as clearOnceStore,Gi as onceStore,ve as partialsCache,cs as processIncludes,ls as processStackPushDirectives,us as processStackReplacements,Nu as resetUnscopedSignalWarnings};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var{WebView:p}=globalThis.Bun;import{existsSync as y,mkdirSync as b,readdirSync as v,statSync as S}from"fs";import l from"path";var h=16384;function M(e){if(/^https?:\/\//.test(e)||e.startsWith("file://"))return e;return`file://${l.resolve(e)}`}function g(e,n,t,o){return new Promise((s)=>{let i=!1,r,m,c=()=>{if(!i){if(i=!0,clearTimeout(m),r)clearTimeout(r);e.onNavigated=void 0,s()}};m=setTimeout(c,o),e.onNavigated=()=>{if(!i)r=setTimeout(c,t)};try{let u=e.navigate(n);if(u&&typeof u.catch==="function")u.catch(c)}catch{c()}})}async function w(e,n,t){let o=`!!document.querySelector(${JSON.stringify(n)})`,s=Date.now()+t;while(Date.now()<s){try{if(await e.evaluate(o))return}catch{}await new Promise((i)=>setTimeout(i,100))}}async function T(e){try{let n=await e.evaluate("Math.ceil(Math.max(document.documentElement.scrollHeight, document.documentElement.offsetHeight, document.body ? document.body.scrollHeight : 0, document.body ? document.body.offsetHeight : 0))");return typeof n==="number"&&Number.isFinite(n)&&n>0?Math.min(n,h):0}catch{return 0}}async function Ko(e,n,t={}){let o=Math.min(t.width??1440,h),s=Math.min(t.height??2200,h),i=t.waitMs??800,r=t.timeoutMs??15000,m=t.format??"png",c=M(e),u=(f)=>new p({width:o,height:f,headless:!0,...t.backend?{backend:t.backend}:{}}),a=u(s);try{if(await g(a,c,i,r),t.waitSelector)await w(a,t.waitSelector,r);if(t.fullPage){let d=await T(a);if(d>s){if(a.close(),a=u(d),await g(a,c,i,r),t.waitSelector)await w(a,t.waitSelector,r)}}let f=await a.screenshot({encoding:"buffer",format:m});b(l.dirname(l.resolve(n)),{recursive:!0}),await Bun.write(n,f)}finally{a.close()}if(!y(n))throw Error(`Screenshot was not produced for ${e}`);return{input:e,output:n,bytes:S(n).size}}async function Kc(e,n,t={}){b(n,{recursive:!0});let o;if(!/^https?:\/\//.test(e)&&y(e)&&S(e).isDirectory())o=v(e).filter((r)=>r.endsWith(".html")).map((r)=>l.join(e,r));else o=[e];let s=t.format??"png",i=[];for(let r of o){let m=/^https?:\/\//.test(r)?new URL(r).pathname.replace(/\W+/g,"-").replace(/^-|-$/g,"")||"index":l.basename(r).replace(/\.html?$/,"");i.push(await Ko(r,l.join(n,`${m}.${s}`),t))}return i}
|
|
3
|
+
export{Ko,Kc};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{yr,Ks,kn,br,vr,Dt,lt,Gs,Cn,$n,wr,xr,Hc,Vc,Ae}from"./chunk-md8rqn48.js";export{Ae as DeployError,Ks as calculateSha1,kn as collectDeployFiles,$n as createDefaultNetlifyConfig,br as createFileManifest,yr as createNetlifyClient,Hc as deploy,Cn as detectProjectConfig,vr as filterRequiredFiles,Dt as formatSize,Gs as generateNetlifyToml,lt as getTotalSize,xr as hasNetlifyConfig,Vc as initNetlify,wr as writeNetlifyConfig};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Mo,No}from"./chunk-qet5gc6s.js";import"./chunk-md8rqn48.js";import"./chunk-y1cmjvk3.js";import"./chunk-q4c06e8x.js";import"./chunk-3kthfs03.js";import"./chunk-daz5aqcf.js";import"./chunk-rs4v4fha.js";import"./chunk-x0q32ees.js";import"./chunk-ej9j6k1q.js";import"./chunk-e57rhf65.js";import"./chunk-x72tv2cg.js";import{ti}from"./chunk-scezfp0w.js";import"./chunk-340a824p.js";import"./chunk-eed4fwps.js";import"./chunk-yvx1ap9b.js";import"./chunk-mp6hy8g4.js";import"./chunk-pgzvyrv6.js";import"./chunk-gawrg4gb.js";import"./chunk-6h38kkjf.js";import"./chunk-vgvtnwxa.js";import"./chunk-t4hzprsm.js";import"./chunk-v4vaqxrf.js";import"./chunk-5qns2sdz.js";import"./chunk-9pt8fd2n.js";import"./chunk-bay9s6rs.js";import"./chunk-fh1qrp68.js";import"./chunk-pbh4smw3.js";import"./chunk-amd6ey3t.js";import"./chunk-dvgv8nry.js";import"./chunk-g578mcb0.js";import"./chunk-765e1s44.js";import{Zt,Qt}from"./chunk-pqxzp1bb.js";import"./chunk-ynvdvbat.js";import"./chunk-r3f9jcf7.js";import"./chunk-mepdnezf.js";import"./chunk-xtdw3692.js";import{ye,X,d,r,Kn,A,i,ue}from"./chunk-69mc2np8.js";import"./chunk-752hw7cd.js";import"./chunk-shr559s7.js";import"./chunk-ak1cgcah.js";import"./chunk-2gr351s0.js";import"./chunk-h0atqq82.js";import"./chunk-ngc2wke4.js";import"./chunk-xfp7k0v8.js";import"./chunk-m4sk62wb.js";import"./chunk-z0g9jvv0.js";import"./chunk-8nhshfz6.js";import"./chunk-7gkv67ky.js";import"./chunk-ce1sejr3.js";import"./chunk-czxt605c.js";export{Kn as buildWebComponents,Qt as cacheTemplate,Zt as checkCache,ti as classifyAllScripts,Mo as createMiddleware,No as createRoute,A as defaultConfig,d as extractVariables,X as injectRouterScript,i as loadStxConfig,ye as processClientScript,r as processDirectives,ue as readMarkdownFile};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{rn,Qa,ts}from"./chunk-69mc2np8.js";import"./chunk-752hw7cd.js";import"./chunk-shr559s7.js";import"./chunk-ak1cgcah.js";import"./chunk-2gr351s0.js";import"./chunk-h0atqq82.js";import"./chunk-ngc2wke4.js";import"./chunk-xfp7k0v8.js";import"./chunk-m4sk62wb.js";import{ke}from"./chunk-z0g9jvv0.js";import"./chunk-8nhshfz6.js";import"./chunk-7gkv67ky.js";import"./chunk-ce1sejr3.js";import"./chunk-czxt605c.js";export{ke as freeIdentifiers,ts as processComponents,Qa as processESImports,rn as rendersAsElement};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{yt,Vr,Ur,Wr,Eu,qr}from"./chunk-xtdw3692.js";import"./chunk-ak1cgcah.js";import"./chunk-ngc2wke4.js";import"./chunk-czxt605c.js";export{Ur as buildServerApi,Eu as createServerApi,yt as discoverServerApi,Vr as generateApiTypes,qr as isServerApiSource,Wr as productionApiDispatcher};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Rn,Kt,su}from"./chunk-765e1s44.js";import{U,An,Gt,Nr,Lr,Pn,iu,ou,au,Jt,Yt,jr,In,cu}from"./chunk-6hc5vz20.js";import"./chunk-ce1sejr3.js";export{Nr as batch,su as default,An as derived,Gt as effect,Rn as generateSignalsRuntime,Kt as generateSignalsRuntimeDev,Yt as isDerived,Jt as isSignal,Pn as onDestroy,Lr as onMount,In as peek,au as pendingLifecycleCounts,ou as runDestroyCallbacks,iu as runMountCallbacks,U as state,jr as untrack,cu as useOptimistic};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var
|
|
2
|
+
var f=0;function v(){return`stx-defer-${++f}`}function m(i){let n=i.match(/on:\s*['"]?(\w+)(?:\((\d+)\))?['"]?/);if(n)return{trigger:n[1],value:n[2]};return{trigger:"immediate"}}function p(i,n,o){let{trigger:l,value:t}=m(n),e=o,s,a,r,d=o.match(/@placeholder\s*([\s\S]*?)(?=@loading|@error|$)/);if(d)s=d[1].trim(),e=e.replace(/@placeholder[\s\S]*?(?=@loading|@error|$)/,"");let c=o.match(/@loading\s*([\s\S]*?)(?=@error|$)/);if(c)a=c[1].trim(),e=e.replace(/@loading[\s\S]*?(?=@error|$)/,"");let g=o.match(/@error(?:\s*\(\s*(\w+)\s*\))?\s*([\s\S]*)$/);if(g)r=g[2].trim(),e=e.replace(/@error(?:\s*\(\s*\w+\s*\))?[\s\S]*$/,"");return e=e.trim(),{trigger:l,triggerValue:t,content:e,placeholder:s,loading:a,error:r}}function E(i,n){let{trigger:o,triggerValue:l}=n,t;switch(o){case"visible":t=`
|
|
3
3
|
const observer = new IntersectionObserver((entries) => {
|
|
4
4
|
if (entries[0].isIntersecting) {
|
|
5
5
|
observer.disconnect();
|
|
@@ -7,21 +7,21 @@ var P=0;function W(){return`stx-defer-${++P}`}function X(E){let z=E.match(/on:\s
|
|
|
7
7
|
}
|
|
8
8
|
}, { threshold: 0.1 });
|
|
9
9
|
observer.observe(container);
|
|
10
|
-
`;break;case"idle":
|
|
10
|
+
`;break;case"idle":t=`
|
|
11
11
|
if ('requestIdleCallback' in window) {
|
|
12
12
|
requestIdleCallback(() => loadContent(), { timeout: 3000 });
|
|
13
13
|
}
|
|
14
14
|
else {
|
|
15
15
|
setTimeout(loadContent, 200);
|
|
16
16
|
}
|
|
17
|
-
`;break;case"interaction":
|
|
17
|
+
`;break;case"interaction":t=`
|
|
18
18
|
const events = ['click', 'focus', 'touchstart'];
|
|
19
19
|
const handler = () => {
|
|
20
20
|
events.forEach(e => container.removeEventListener(e, handler));
|
|
21
21
|
loadContent();
|
|
22
22
|
};
|
|
23
23
|
events.forEach(e => container.addEventListener(e, handler, { once: true, passive: true }));
|
|
24
|
-
`;break;case"hover":
|
|
24
|
+
`;break;case"hover":t=`
|
|
25
25
|
const handler = () => {
|
|
26
26
|
container.removeEventListener('mouseenter', handler);
|
|
27
27
|
container.removeEventListener('focusin', handler);
|
|
@@ -29,14 +29,14 @@ else {
|
|
|
29
29
|
};
|
|
30
30
|
container.addEventListener('mouseenter', handler, { once: true });
|
|
31
31
|
container.addEventListener('focusin', handler, { once: true });
|
|
32
|
-
`;break;case"timer":
|
|
33
|
-
setTimeout(loadContent, ${
|
|
34
|
-
`;break;case"immediate":default:
|
|
32
|
+
`;break;case"timer":t=`
|
|
33
|
+
setTimeout(loadContent, ${l||"1000"});
|
|
34
|
+
`;break;case"immediate":default:t=`
|
|
35
35
|
Promise.resolve().then(loadContent);
|
|
36
36
|
`;break}return`
|
|
37
37
|
<script>
|
|
38
38
|
(function() {
|
|
39
|
-
const container = document.getElementById('${
|
|
39
|
+
const container = document.getElementById('${i}');
|
|
40
40
|
if (!container) return;
|
|
41
41
|
|
|
42
42
|
const contentEl = container.querySelector('[data-defer-content]');
|
|
@@ -69,16 +69,16 @@ else {
|
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
${
|
|
72
|
+
${t}
|
|
73
73
|
})();
|
|
74
74
|
</script>
|
|
75
|
-
`}function
|
|
76
|
-
<div id="${
|
|
77
|
-
${
|
|
78
|
-
${
|
|
79
|
-
${
|
|
80
|
-
${
|
|
75
|
+
`}function wl(i,n,o){f=0;let l=/@defer\s*\(([^)]*)\)\s*([\s\S]*?)@enddefer/g;return i.replace(l,(t,e,s)=>{let a=v(),r=p(t,e,s),d=r.placeholder?`<div data-defer-placeholder>${r.placeholder}</div>`:"",c=r.loading?`<div data-defer-loading style="display: none;">${r.loading}</div>`:'<div data-defer-loading style="display: none;"></div>',g=r.error?`<div data-defer-error style="display: none;">${r.error}</div>`:"",u=`<div data-defer-content style="display: none;">${r.content}</div>`,h=E(a,r);return`
|
|
76
|
+
<div id="${a}" class="stx-defer" data-defer-trigger="${r.trigger}">
|
|
77
|
+
${d}
|
|
78
|
+
${c}
|
|
79
|
+
${u}
|
|
80
|
+
${g}
|
|
81
81
|
</div>
|
|
82
|
-
${
|
|
82
|
+
${h}
|
|
83
83
|
`})}
|
|
84
|
-
export{
|
|
84
|
+
export{wl};
|