@ohos-ports/stacksjs-stx 0.2.287-beta.0
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/LICENSE.md +21 -0
- package/README.md +1042 -0
- package/dist/a11y.d.ts +256 -0
- package/dist/a11y.js +671 -0
- package/dist/analytics.d.ts +40 -0
- package/dist/analytics.js +159 -0
- package/dist/analyzer.d.ts +68 -0
- package/dist/analyzer.js +240 -0
- package/dist/animation.d.ts +123 -0
- package/dist/animation.js +688 -0
- package/dist/app-shell.d.ts +76 -0
- package/dist/app-shell.js +209 -0
- package/dist/app.d.ts +65 -0
- package/dist/app.js +79 -0
- package/dist/appearance-bootstrap.d.ts +54 -0
- package/dist/appearance-bootstrap.js +92 -0
- package/dist/asset-roots.d.ts +32 -0
- package/dist/asset-roots.js +7 -0
- package/dist/assets.d.ts +21 -0
- package/dist/assets.js +155 -0
- package/dist/ast.d.ts +265 -0
- package/dist/ast.js +630 -0
- package/dist/async-components.d.ts +123 -0
- package/dist/async-components.js +428 -0
- package/dist/auth.d.ts +13 -0
- package/dist/auth.js +12 -0
- package/dist/broadcasting.d.ts +77 -0
- package/dist/broadcasting.js +103 -0
- package/dist/browser-composables.d.ts +348 -0
- package/dist/browser-composables.js +606 -0
- package/dist/browser-core-imports.d.ts +12 -0
- package/dist/browser-core-imports.js +28 -0
- package/dist/build-assets.d.ts +32 -0
- package/dist/build-assets.js +29 -0
- package/dist/build-externalize-repeated.d.ts +34 -0
- package/dist/build-externalize-repeated.js +101 -0
- package/dist/build-externalize.d.ts +73 -0
- package/dist/build-externalize.js +80 -0
- package/dist/build-id.d.ts +57 -0
- package/dist/build-id.js +25 -0
- package/dist/build-message.d.ts +81 -0
- package/dist/build-message.js +65 -0
- package/dist/build-mode-detector.d.ts +26 -0
- package/dist/build-mode-detector.js +50 -0
- package/dist/build-optimizer.d.ts +101 -0
- package/dist/build-optimizer.js +433 -0
- package/dist/build-views.d.ts +56 -0
- package/dist/build-views.js +180 -0
- package/dist/build.d.ts +31 -0
- package/dist/build.js +34 -0
- package/dist/builtins/attrs.d.ts +49 -0
- package/dist/builtins/attrs.js +39 -0
- package/dist/builtins/drawer.d.ts +24 -0
- package/dist/builtins/drawer.js +37 -0
- package/dist/builtins/escape.d.ts +12 -0
- package/dist/builtins/escape.js +3 -0
- package/dist/builtins/icon.d.ts +45 -0
- package/dist/builtins/icon.js +100 -0
- package/dist/builtins/image-delivery.d.ts +16 -0
- package/dist/builtins/image-delivery.js +115 -0
- package/dist/builtins/image-placeholder.d.ts +78 -0
- package/dist/builtins/image-placeholder.js +137 -0
- package/dist/builtins/index.d.ts +26 -0
- package/dist/builtins/index.js +34 -0
- package/dist/builtins/modal.d.ts +26 -0
- package/dist/builtins/modal.js +38 -0
- package/dist/builtins/safe-image.d.ts +44 -0
- package/dist/builtins/safe-image.js +45 -0
- package/dist/builtins/stx-image.d.ts +29 -0
- package/dist/builtins/stx-image.js +222 -0
- package/dist/builtins/stx-link.d.ts +11 -0
- package/dist/builtins/stx-link.js +35 -0
- package/dist/builtins/stx-loading-indicator.d.ts +13 -0
- package/dist/builtins/stx-loading-indicator.js +35 -0
- package/dist/builtins/suspense.d.ts +30 -0
- package/dist/builtins/suspense.js +24 -0
- package/dist/builtins/toast.d.ts +19 -0
- package/dist/builtins/toast.js +42 -0
- package/dist/builtins/tooltip.d.ts +18 -0
- package/dist/builtins/tooltip.js +106 -0
- package/dist/builtins/transition-group.d.ts +27 -0
- package/dist/builtins/transition-group.js +22 -0
- package/dist/bun-shim.js +496 -0
- package/dist/bundle-analyzer/collector.d.ts +66 -0
- package/dist/bundle-analyzer/collector.js +233 -0
- package/dist/bundle-analyzer/index.d.ts +98 -0
- package/dist/bundle-analyzer/index.js +82 -0
- package/dist/bundle-analyzer/report.d.ts +39 -0
- package/dist/bundle-analyzer/report.js +318 -0
- package/dist/bundle-analyzer/treemap.d.ts +19 -0
- package/dist/bundle-analyzer/treemap.js +594 -0
- package/dist/bundle-analyzer.js +499 -0
- package/dist/caching.d.ts +69 -0
- package/dist/caching.js +135 -0
- package/dist/chunk-0y46fbkx.js +3 -0
- package/dist/chunk-122tyfre.js +2 -0
- package/dist/chunk-19nfvxfw.js +43 -0
- package/dist/chunk-1kah92n2.js +3 -0
- package/dist/chunk-1kms3b9d.js +2 -0
- package/dist/chunk-1q4y74mh.js +1194 -0
- package/dist/chunk-248e84r1.js +4 -0
- package/dist/chunk-24ps8kft.js +2 -0
- package/dist/chunk-2et5hxfv.js +2 -0
- package/dist/chunk-2r1rd8f0.js +2 -0
- package/dist/chunk-2tk1zkrz.js +2 -0
- package/dist/chunk-38ejahd9.js +3 -0
- package/dist/chunk-3zv4wz87.js +2 -0
- package/dist/chunk-4122k1bh.js +2 -0
- package/dist/chunk-45az9zht.js +2 -0
- package/dist/chunk-4qr85f07.js +2 -0
- package/dist/chunk-4ww3znrr.js +15 -0
- package/dist/chunk-54st8g2j.js +397 -0
- package/dist/chunk-58f0mthg.js +3 -0
- package/dist/chunk-5a19dhx5.js +2 -0
- package/dist/chunk-5kk8gsj2.js +3 -0
- package/dist/chunk-5w1e3yxs.js +499 -0
- package/dist/chunk-6gdycmxr.js +2 -0
- package/dist/chunk-6hmnaza7.js +4473 -0
- package/dist/chunk-71t0yan0.js +5 -0
- package/dist/chunk-74cv4ta1.js +3 -0
- package/dist/chunk-74v15e8z.js +2 -0
- package/dist/chunk-7b329e5v.js +3 -0
- package/dist/chunk-7q9mwh4v.js +84 -0
- package/dist/chunk-866y9d8b.js +8169 -0
- package/dist/chunk-8fwerspy.js +2 -0
- package/dist/chunk-8mjdpr94.js +147 -0
- package/dist/chunk-92mj1t26.js +60 -0
- package/dist/chunk-9b22663r.js +2 -0
- package/dist/chunk-9hjdgm4d.js +2 -0
- package/dist/chunk-9n0gvfrg.js +4 -0
- package/dist/chunk-9wr7zcad.js +18 -0
- package/dist/chunk-9y0g8kzt.js +358 -0
- package/dist/chunk-a0nfbmeh.js +3 -0
- package/dist/chunk-acn1b56m.js +1280 -0
- package/dist/chunk-awkq3xfx.js +2 -0
- package/dist/chunk-b6ej2fdf.js +1814 -0
- package/dist/chunk-b8rrnqry.js +2 -0
- package/dist/chunk-bfqfs07m.js +3022 -0
- package/dist/chunk-bs6kapy7.js +2 -0
- package/dist/chunk-btav940g.js +2 -0
- package/dist/chunk-bz820epz.js +3 -0
- package/dist/chunk-ccspd3mc.js +2 -0
- package/dist/chunk-csbgwaa5.js +2 -0
- package/dist/chunk-d8t4sjsp.js +2 -0
- package/dist/chunk-dap191q2.js +2 -0
- package/dist/chunk-de7fye10.js +4 -0
- package/dist/chunk-dgrt76d2.js +2 -0
- package/dist/chunk-dhh5q7qt.js +3 -0
- package/dist/chunk-dsffsqnt.js +2 -0
- package/dist/chunk-dtq7y5ym.js +2 -0
- package/dist/chunk-fed3xsp9.js +3 -0
- package/dist/chunk-ferav3bw.js +19 -0
- package/dist/chunk-fvhm8psm.js +3 -0
- package/dist/chunk-g4vpzv6b.js +2 -0
- package/dist/chunk-g9csmj0s.js +2 -0
- package/dist/chunk-gtcrpmz1.js +2 -0
- package/dist/chunk-h4xh8cms.js +4 -0
- package/dist/chunk-h8yqsz9m.js +2 -0
- package/dist/chunk-hcq5dw7a.js +2 -0
- package/dist/chunk-hm0xha6c.js +12 -0
- package/dist/chunk-hpybjwwf.js +8 -0
- package/dist/chunk-jegt35zh.js +2 -0
- package/dist/chunk-jr3jp3ev.js +8 -0
- package/dist/chunk-k56rjjc0.js +24 -0
- package/dist/chunk-kdh37tp8.js +194 -0
- package/dist/chunk-kxzb4et3.js +29 -0
- package/dist/chunk-mf4n3x1j.js +14 -0
- package/dist/chunk-mkd9kjgb.js +3 -0
- package/dist/chunk-mxfh1nxg.js +2 -0
- package/dist/chunk-n3ggrhb3.js +3 -0
- package/dist/chunk-nkb3scg6.js +8 -0
- package/dist/chunk-nnd4wq8j.js +231 -0
- package/dist/chunk-nsp1cw38.js +11 -0
- package/dist/chunk-nx5qkm8k.js +30 -0
- package/dist/chunk-p3242nck.js +2 -0
- package/dist/chunk-p98kfh94.js +2 -0
- package/dist/chunk-pkaabd8h.js +3 -0
- package/dist/chunk-pzm13sdc.js +3 -0
- package/dist/chunk-q4p5k2p3.js +2 -0
- package/dist/chunk-q9n5swx7.js +3 -0
- package/dist/chunk-qc1f74ek.js +3 -0
- package/dist/chunk-qpyjak7z.js +2 -0
- package/dist/chunk-qr82je1m.js +22 -0
- package/dist/chunk-qy73j6m4.js +288 -0
- package/dist/chunk-qzkhpsam.js +505 -0
- package/dist/chunk-r3ayvdz3.js +2 -0
- package/dist/chunk-r7r66978.js +2 -0
- package/dist/chunk-rbb7dvja.js +30 -0
- package/dist/chunk-refwkt87.js +71 -0
- package/dist/chunk-rj4kajww.js +2 -0
- package/dist/chunk-rp4rjjmf.js +2 -0
- package/dist/chunk-se0p17c2.js +898 -0
- package/dist/chunk-sj9pmene.js +2 -0
- package/dist/chunk-sscwkffs.js +2 -0
- package/dist/chunk-svpqxn2c.js +2 -0
- package/dist/chunk-t6nseeb9.js +351 -0
- package/dist/chunk-t8y1ggdy.js +2 -0
- package/dist/chunk-tndhnk9e.js +2 -0
- package/dist/chunk-v5e1gxwm.js +3 -0
- package/dist/chunk-vqxmxgaj.js +4 -0
- package/dist/chunk-vrrax298.js +2 -0
- package/dist/chunk-w3ycm4na.js +3 -0
- package/dist/chunk-wcm80anz.js +321 -0
- package/dist/chunk-wrzwgkbx.js +22 -0
- package/dist/chunk-x650vjcp.js +302 -0
- package/dist/chunk-xgnc1wy6.js +116 -0
- package/dist/chunk-xpp135ad.js +11 -0
- package/dist/chunk-xttsqmkm.js +216 -0
- package/dist/chunk-y11cxbxd.js +3757 -0
- package/dist/chunk-y7m2dpd3.js +341 -0
- package/dist/chunk-y98jsjqq.js +2 -0
- package/dist/chunk-ya386h70.js +2 -0
- package/dist/chunk-ydrz60kr.js +2 -0
- package/dist/chunk-ypmqf7tm.js +4 -0
- package/dist/chunk-z4jhj5e5.js +28 -0
- package/dist/chunk-zg75gjns.js +2 -0
- package/dist/chunk-zqqx1qaj.js +2 -0
- package/dist/cli-flags.d.ts +34 -0
- package/dist/cli-flags.js +20 -0
- package/dist/cli.js +174 -0
- package/dist/client/directive.d.ts +17 -0
- package/dist/client/directive.js +14 -0
- package/dist/client/index.d.ts +7 -0
- package/dist/client/index.js +2 -0
- package/dist/client-helpers.d.ts +317 -0
- package/dist/client-helpers.js +312 -0
- package/dist/client-script-bundler.d.ts +103 -0
- package/dist/client-script-bundler.js +390 -0
- package/dist/client-script.d.ts +215 -0
- package/dist/client-script.js +865 -0
- package/dist/client.d.ts +21 -0
- package/dist/client.js +73 -0
- package/dist/codemod.d.ts +33 -0
- package/dist/codemod.js +244 -0
- package/dist/color-mode-boot.d.ts +92 -0
- package/dist/color-mode-boot.js +72 -0
- package/dist/component-client-factories.d.ts +33 -0
- package/dist/component-client-factories.js +77 -0
- package/dist/component-hmr.d.ts +107 -0
- package/dist/component-hmr.js +585 -0
- package/dist/component-library.d.ts +38 -0
- package/dist/component-library.js +994 -0
- package/dist/component-processing.d.ts +198 -0
- package/dist/component-processing.js +677 -0
- package/dist/component-registry.d.ts +127 -0
- package/dist/component-registry.js +90 -0
- package/dist/component-renderer.d.ts +52 -0
- package/dist/component-renderer.js +790 -0
- package/dist/components/StxImage.stx +12 -0
- package/dist/components/StxLink.stx +18 -0
- package/dist/components.d.ts +28 -0
- package/dist/components.js +213 -0
- package/dist/composable-loader.d.ts +62 -0
- package/dist/composable-loader.js +190 -0
- package/dist/composables/index.d.ts +417 -0
- package/dist/composables/index.js +222 -0
- package/dist/composables/use-battery.d.ts +46 -0
- package/dist/composables/use-battery.js +101 -0
- package/dist/composables/use-broadcast-channel.d.ts +59 -0
- package/dist/composables/use-broadcast-channel.js +80 -0
- package/dist/composables/use-channel.d.ts +67 -0
- package/dist/composables/use-channel.js +124 -0
- package/dist/composables/use-clipboard.d.ts +30 -0
- package/dist/composables/use-clipboard.js +90 -0
- package/dist/composables/use-color-mode.d.ts +67 -0
- package/dist/composables/use-color-mode.js +152 -0
- package/dist/composables/use-cookie.d.ts +59 -0
- package/dist/composables/use-cookie.js +86 -0
- package/dist/composables/use-device-orientation.d.ts +116 -0
- package/dist/composables/use-device-orientation.js +181 -0
- package/dist/composables/use-event-listener.d.ts +35 -0
- package/dist/composables/use-event-listener.js +27 -0
- package/dist/composables/use-event-source.d.ts +90 -0
- package/dist/composables/use-event-source.js +166 -0
- package/dist/composables/use-eye-dropper.d.ts +117 -0
- package/dist/composables/use-eye-dropper.js +142 -0
- package/dist/composables/use-fetch.d.ts +59 -0
- package/dist/composables/use-fetch.js +273 -0
- package/dist/composables/use-form.d.ts +91 -0
- package/dist/composables/use-form.js +112 -0
- package/dist/composables/use-fullscreen.d.ts +47 -0
- package/dist/composables/use-fullscreen.js +110 -0
- package/dist/composables/use-geolocation.d.ts +62 -0
- package/dist/composables/use-geolocation.js +101 -0
- package/dist/composables/use-idle.d.ts +102 -0
- package/dist/composables/use-idle.js +182 -0
- package/dist/composables/use-intersection-observer.d.ts +83 -0
- package/dist/composables/use-intersection-observer.js +168 -0
- package/dist/composables/use-keyboard.d.ts +100 -0
- package/dist/composables/use-keyboard.js +224 -0
- package/dist/composables/use-media-query.d.ts +56 -0
- package/dist/composables/use-media-query.js +62 -0
- package/dist/composables/use-meta.d.ts +35 -0
- package/dist/composables/use-meta.js +48 -0
- package/dist/composables/use-mouse.d.ts +65 -0
- package/dist/composables/use-mouse.js +286 -0
- package/dist/composables/use-mutation-observer.d.ts +101 -0
- package/dist/composables/use-mutation-observer.js +129 -0
- package/dist/composables/use-network.d.ts +40 -0
- package/dist/composables/use-network.js +85 -0
- package/dist/composables/use-notification.d.ts +98 -0
- package/dist/composables/use-notification.js +94 -0
- package/dist/composables/use-permissions.d.ts +119 -0
- package/dist/composables/use-permissions.js +132 -0
- package/dist/composables/use-query.d.ts +48 -0
- package/dist/composables/use-query.js +0 -0
- package/dist/composables/use-resize-observer.d.ts +60 -0
- package/dist/composables/use-resize-observer.js +157 -0
- package/dist/composables/use-router.d.ts +80 -0
- package/dist/composables/use-router.js +105 -0
- package/dist/composables/use-scroll-lock.d.ts +13 -0
- package/dist/composables/use-scroll-lock.js +55 -0
- package/dist/composables/use-share.d.ts +74 -0
- package/dist/composables/use-share.js +104 -0
- package/dist/composables/use-speech.d.ts +117 -0
- package/dist/composables/use-speech.js +294 -0
- package/dist/composables/use-storage.d.ts +69 -0
- package/dist/composables/use-storage.js +196 -0
- package/dist/composables/use-text-selection.d.ts +121 -0
- package/dist/composables/use-text-selection.js +205 -0
- package/dist/composables/use-timer.d.ts +92 -0
- package/dist/composables/use-timer.js +193 -0
- package/dist/composables/use-utilities.d.ts +103 -0
- package/dist/composables/use-utilities.js +176 -0
- package/dist/composables/use-wake-lock.d.ts +85 -0
- package/dist/composables/use-wake-lock.js +122 -0
- package/dist/composables/use-websocket.d.ts +70 -0
- package/dist/composables/use-websocket.js +165 -0
- package/dist/composables/use-window.d.ts +84 -0
- package/dist/composables/use-window.js +163 -0
- package/dist/composables.d.ts +287 -0
- package/dist/composables.js +562 -0
- package/dist/composition-api.d.ts +197 -0
- package/dist/composition-api.js +199 -0
- package/dist/compression.d.ts +30 -0
- package/dist/compression.js +107 -0
- package/dist/computed.d.ts +138 -0
- package/dist/computed.js +382 -0
- package/dist/conditionals.d.ts +48 -0
- package/dist/conditionals.js +626 -0
- package/dist/config.d.ts +77 -0
- package/dist/config.js +828 -0
- package/dist/cookie-serialize.d.ts +40 -0
- package/dist/cookie-serialize.js +18 -0
- package/dist/craft-bridge.d.ts +525 -0
- package/dist/craft-bridge.js +511 -0
- package/dist/craft-compiler.d.ts +245 -0
- package/dist/craft-compiler.js +810 -0
- package/dist/craft-components.d.ts +739 -0
- package/dist/craft-components.js +1074 -0
- package/dist/craft-entry.d.ts +6 -0
- package/dist/craft-entry.js +9 -0
- package/dist/craft-ssr.d.ts +147 -0
- package/dist/craft-ssr.js +559 -0
- package/dist/craft.js +9 -0
- package/dist/csp.d.ts +295 -0
- package/dist/csp.js +220 -0
- package/dist/csrf.d.ts +38 -0
- package/dist/csrf.js +38 -0
- package/dist/custom-directives.d.ts +5 -0
- package/dist/custom-directives.js +136 -0
- package/dist/database.d.ts +391 -0
- package/dist/database.js +5 -0
- package/dist/defer.d.ts +28 -0
- package/dist/defer.js +156 -0
- package/dist/deploy/config-generators.d.ts +75 -0
- package/dist/deploy/config-generators.js +214 -0
- package/dist/deploy/index.d.ts +88 -0
- package/dist/deploy/index.js +203 -0
- package/dist/deploy/netlify.d.ts +109 -0
- package/dist/deploy/netlify.js +167 -0
- package/dist/desktop.d.ts +16 -0
- package/dist/desktop.js +1 -0
- package/dist/dev-server/index.d.ts +22 -0
- package/dist/dev-server/index.js +7 -0
- package/dist/dev-server/keyboard-shortcuts.d.ts +34 -0
- package/dist/dev-server/keyboard-shortcuts.js +81 -0
- package/dist/dev-server/native-window.d.ts +59 -0
- package/dist/dev-server/native-window.js +91 -0
- package/dist/dev-server/port-utils.d.ts +27 -0
- package/dist/dev-server/port-utils.js +40 -0
- package/dist/dev-server/serve-app.d.ts +15 -0
- package/dist/dev-server/serve-app.js +727 -0
- package/dist/dev-server/serve-file.d.ts +3 -0
- package/dist/dev-server/serve-file.js +443 -0
- package/dist/dev-server/serve-markdown.d.ts +3 -0
- package/dist/dev-server/serve-markdown.js +284 -0
- package/dist/dev-server/serve-multi.d.ts +5 -0
- package/dist/dev-server/serve-multi.js +596 -0
- package/dist/dev-server/terminal-colors.d.ts +56 -0
- package/dist/dev-server/terminal-colors.js +45 -0
- package/dist/dev-server/theme-selector.d.ts +32 -0
- package/dist/dev-server/theme-selector.js +111 -0
- package/dist/dev-server/ts-css.d.ts +108 -0
- package/dist/dev-server/ts-css.js +438 -0
- package/dist/dev-server/types.d.ts +99 -0
- package/dist/dev-server/types.js +43 -0
- package/dist/dev-server.d.ts +6 -0
- package/dist/dev-server.js +4 -0
- package/dist/devtools.d.ts +182 -0
- package/dist/devtools.js +593 -0
- package/dist/directive-api.d.ts +154 -0
- package/dist/directive-api.js +355 -0
- package/dist/docs.d.ts +56 -0
- package/dist/docs.js +567 -0
- package/dist/doctor.d.ts +29 -0
- package/dist/doctor.js +123 -0
- package/dist/document-shell.d.ts +218 -0
- package/dist/document-shell.js +338 -0
- package/dist/dynamic-components.d.ts +23 -0
- package/dist/dynamic-components.js +197 -0
- package/dist/edge-runtime.d.ts +193 -0
- package/dist/edge-runtime.js +525 -0
- package/dist/env.d.ts +3 -0
- package/dist/env.js +9 -0
- package/dist/error-boundaries.d.ts +78 -0
- package/dist/error-boundaries.js +281 -0
- package/dist/error-handling.d.ts +14 -0
- package/dist/error-handling.js +1 -0
- package/dist/errors/codes.d.ts +92 -0
- package/dist/errors/codes.js +97 -0
- package/dist/errors/formatter.d.ts +84 -0
- package/dist/errors/formatter.js +196 -0
- package/dist/errors/index.d.ts +12 -0
- package/dist/errors/index.js +44 -0
- package/dist/errors/logger.d.ts +135 -0
- package/dist/errors/logger.js +250 -0
- package/dist/errors/sanitizer.d.ts +73 -0
- package/dist/errors/sanitizer.js +181 -0
- package/dist/errors/types.d.ts +92 -0
- package/dist/errors/types.js +86 -0
- package/dist/events.d.ts +145 -0
- package/dist/events.js +396 -0
- package/dist/expressions.d.ts +180 -0
- package/dist/expressions.js +719 -0
- package/dist/find-body-tag.d.ts +50 -0
- package/dist/find-body-tag.js +57 -0
- package/dist/formatter.d.ts +19 -0
- package/dist/formatter.js +265 -0
- package/dist/forms-validation.d.ts +189 -0
- package/dist/forms-validation.js +421 -0
- package/dist/forms.d.ts +224 -0
- package/dist/forms.js +729 -0
- package/dist/fragment-container.d.ts +57 -0
- package/dist/fragment-container.js +123 -0
- package/dist/framework-composables.d.ts +73 -0
- package/dist/framework-composables.js +126 -0
- package/dist/head-injection.d.ts +61 -0
- package/dist/head-injection.js +28 -0
- package/dist/head.d.ts +282 -0
- package/dist/head.js +231 -0
- package/dist/heatmap.d.ts +206 -0
- package/dist/heatmap.js +566 -0
- package/dist/hot-reload.d.ts +87 -0
- package/dist/hot-reload.js +373 -0
- package/dist/html-masking.d.ts +125 -0
- package/dist/html-masking.js +196 -0
- package/dist/hydration-runtime.d.ts +44 -0
- package/dist/hydration-runtime.js +195 -0
- package/dist/hydration.d.ts +135 -0
- package/dist/hydration.js +654 -0
- package/dist/i18n.d.ts +342 -0
- package/dist/i18n.js +678 -0
- package/dist/image-optimization/auto-sibling.d.ts +42 -0
- package/dist/image-optimization/auto-sibling.js +88 -0
- package/dist/image-optimization/build-plugin.d.ts +54 -0
- package/dist/image-optimization/build-plugin.js +241 -0
- package/dist/image-optimization/component.d.ts +46 -0
- package/dist/image-optimization/component.js +244 -0
- package/dist/image-optimization/directive.d.ts +30 -0
- package/dist/image-optimization/directive.js +203 -0
- package/dist/image-optimization/index.d.ts +156 -0
- package/dist/image-optimization/index.js +54 -0
- package/dist/image-optimization/processor.d.ts +140 -0
- package/dist/image-optimization/processor.js +262 -0
- package/dist/image-optimization/serve.d.ts +54 -0
- package/dist/image-optimization/serve.js +102 -0
- package/dist/import-rebase.d.ts +16 -0
- package/dist/import-rebase.js +16 -0
- package/dist/imported-signals.d.ts +43 -0
- package/dist/imported-signals.js +35 -0
- package/dist/includes.d.ts +171 -0
- package/dist/includes.js +764 -0
- package/dist/index.d.ts +365 -0
- package/dist/index.js +202 -0
- package/dist/init.d.ts +39 -0
- package/dist/init.js +505 -0
- package/dist/inline-assets.d.ts +28 -0
- package/dist/inline-assets.js +82 -0
- package/dist/interactive.d.ts +14 -0
- package/dist/interactive.js +383 -0
- package/dist/internal-markdown.d.ts +22 -0
- package/dist/internal-markdown.js +141 -0
- package/dist/island-chunking.d.ts +48 -0
- package/dist/island-chunking.js +52 -0
- package/dist/isolated-build.d.ts +12 -0
- package/dist/isolated-build.js +18 -0
- package/dist/js-ts.d.ts +10 -0
- package/dist/js-ts.js +60 -0
- package/dist/jsx-runtime.d.ts +92 -0
- package/dist/jsx-runtime.js +289 -0
- package/dist/keep-alive.d.ts +108 -0
- package/dist/keep-alive.js +421 -0
- package/dist/layout-types.d.ts +45 -0
- package/dist/layout-types.js +56 -0
- package/dist/lazy-loader.d.ts +90 -0
- package/dist/lazy-loader.js +245 -0
- package/dist/lazy-module.d.ts +11 -0
- package/dist/lazy-module.js +18 -0
- package/dist/loading-indicator.d.ts +50 -0
- package/dist/loading-indicator.js +322 -0
- package/dist/loops.d.ts +91 -0
- package/dist/loops.js +690 -0
- package/dist/manifest.d.ts +41 -0
- package/dist/manifest.js +31 -0
- package/dist/markdown-view.d.ts +25 -0
- package/dist/markdown-view.js +39 -0
- package/dist/markdown.d.ts +10 -0
- package/dist/markdown.js +68 -0
- package/dist/media/client/blur-up.d.ts +66 -0
- package/dist/media/client/blur-up.js +217 -0
- package/dist/media/client/index.d.ts +93 -0
- package/dist/media/client/index.js +53 -0
- package/dist/media/client/lazy-load.d.ts +74 -0
- package/dist/media/client/lazy-load.js +283 -0
- package/dist/media/client/upload-handler.d.ts +80 -0
- package/dist/media/client/upload-handler.js +354 -0
- package/dist/media/image/component.d.ts +60 -0
- package/dist/media/image/component.js +574 -0
- package/dist/media/image/directive.d.ts +23 -0
- package/dist/media/image/directive.js +160 -0
- package/dist/media/image/editing.d.ts +212 -0
- package/dist/media/image/editing.js +193 -0
- package/dist/media/image/index.d.ts +142 -0
- package/dist/media/image/index.js +80 -0
- package/dist/media/image/placeholder.d.ts +89 -0
- package/dist/media/image/placeholder.js +188 -0
- package/dist/media/image/processor/cache.d.ts +53 -0
- package/dist/media/image/processor/cache.js +51 -0
- package/dist/media/image/processor/index.d.ts +11 -0
- package/dist/media/image/processor/index.js +3 -0
- package/dist/media/image/processor/optimizer.d.ts +24 -0
- package/dist/media/image/processor/optimizer.js +202 -0
- package/dist/media/image/processor/responsive.d.ts +28 -0
- package/dist/media/image/processor/responsive.js +162 -0
- package/dist/media/image/srcset.d.ts +157 -0
- package/dist/media/image/srcset.js +194 -0
- package/dist/media/index.d.ts +331 -0
- package/dist/media/index.js +198 -0
- package/dist/media/manager/embed.d.ts +25 -0
- package/dist/media/manager/embed.js +253 -0
- package/dist/media/protected/component.d.ts +33 -0
- package/dist/media/protected/component.js +235 -0
- package/dist/media/protected/index.d.ts +47 -0
- package/dist/media/protected/index.js +20 -0
- package/dist/media/protected/signature.d.ts +72 -0
- package/dist/media/protected/signature.js +205 -0
- package/dist/media/shared/cache.d.ts +76 -0
- package/dist/media/shared/cache.js +132 -0
- package/dist/media/shared/hash.d.ts +31 -0
- package/dist/media/shared/hash.js +35 -0
- package/dist/media/shared/index.d.ts +7 -0
- package/dist/media/shared/index.js +2 -0
- package/dist/media/types.d.ts +1477 -0
- package/dist/media/types.js +0 -0
- package/dist/media/upload/component.d.ts +9 -0
- package/dist/media/upload/component.js +320 -0
- package/dist/media/upload/index.d.ts +8 -0
- package/dist/media/upload/index.js +1 -0
- package/dist/media/video/directive.d.ts +23 -0
- package/dist/media/video/directive.js +142 -0
- package/dist/media/video/index.d.ts +76 -0
- package/dist/media/video/index.js +583 -0
- package/dist/media/video/processor/cache.d.ts +55 -0
- package/dist/media/video/processor/cache.js +52 -0
- package/dist/media/video/processor/index.d.ts +12 -0
- package/dist/media/video/processor/index.js +4 -0
- package/dist/media/video/processor/streaming.d.ts +26 -0
- package/dist/media/video/processor/streaming.js +197 -0
- package/dist/media/video/processor/thumbnail.d.ts +35 -0
- package/dist/media/video/processor/thumbnail.js +134 -0
- package/dist/media/video/processor/transcoder.d.ts +19 -0
- package/dist/media/video/processor/transcoder.js +283 -0
- package/dist/menubar.d.ts +65 -0
- package/dist/menubar.js +99 -0
- package/dist/method-spoofing.d.ts +20 -0
- package/dist/method-spoofing.js +17 -0
- package/dist/middleware.d.ts +112 -0
- package/dist/middleware.js +40 -0
- package/dist/misc-directives.d.ts +55 -0
- package/dist/misc-directives.js +328 -0
- package/dist/native-build.d.ts +88 -0
- package/dist/native-build.js +575 -0
- package/dist/owned-routes.d.ts +42 -0
- package/dist/owned-routes.js +26 -0
- package/dist/page-action.d.ts +73 -0
- package/dist/page-action.js +91 -0
- package/dist/page-meta.d.ts +38 -0
- package/dist/page-meta.js +16 -0
- package/dist/page-response.d.ts +120 -0
- package/dist/page-response.js +117 -0
- package/dist/parser/directive-parser.d.ts +119 -0
- package/dist/parser/directive-parser.js +249 -0
- package/dist/parser/expression-parser.d.ts +58 -0
- package/dist/parser/expression-parser.js +358 -0
- package/dist/parser/index.d.ts +13 -0
- package/dist/parser/index.js +23 -0
- package/dist/parser/tokenizer.d.ts +77 -0
- package/dist/parser/tokenizer.js +534 -0
- package/dist/partial-hydration.d.ts +123 -0
- package/dist/partial-hydration.js +427 -0
- package/dist/performance-utils.d.ts +318 -0
- package/dist/performance-utils.js +466 -0
- package/dist/placeholder.d.ts +54 -0
- package/dist/placeholder.js +35 -0
- package/dist/plugin-system.d.ts +301 -0
- package/dist/plugin-system.js +214 -0
- package/dist/plugin.d.ts +3 -0
- package/dist/plugin.js +174 -0
- package/dist/precompiler.d.ts +43 -0
- package/dist/precompiler.js +670 -0
- package/dist/process.d.ts +16 -0
- package/dist/process.js +879 -0
- package/dist/production-build.d.ts +163 -0
- package/dist/production-build.js +596 -0
- package/dist/production-builder.d.ts +42 -0
- package/dist/production-builder.js +146 -0
- package/dist/production-server.d.ts +19 -0
- package/dist/production-server.js +208 -0
- package/dist/prop-sentinels.d.ts +31 -0
- package/dist/prop-sentinels.js +7 -0
- package/dist/props.d.ts +216 -0
- package/dist/props.js +224 -0
- package/dist/public-env.d.ts +29 -0
- package/dist/public-env.js +19 -0
- package/dist/pwa/audit.d.ts +42 -0
- package/dist/pwa/audit.js +255 -0
- package/dist/pwa/directives.d.ts +38 -0
- package/dist/pwa/directives.js +332 -0
- package/dist/pwa/icons.d.ts +42 -0
- package/dist/pwa/icons.js +109 -0
- package/dist/pwa/index.d.ts +104 -0
- package/dist/pwa/index.js +47 -0
- package/dist/pwa/inject.d.ts +32 -0
- package/dist/pwa/inject.js +102 -0
- package/dist/pwa/manifest.d.ts +104 -0
- package/dist/pwa/manifest.js +186 -0
- package/dist/pwa/offline.d.ts +8 -0
- package/dist/pwa/offline.js +259 -0
- package/dist/pwa/precache.d.ts +35 -0
- package/dist/pwa/precache.js +116 -0
- package/dist/pwa/service-worker.d.ts +33 -0
- package/dist/pwa/service-worker.js +860 -0
- package/dist/pwa/workbox-strategies.d.ts +100 -0
- package/dist/pwa/workbox-strategies.js +167 -0
- package/dist/pwa/workbox.d.ts +51 -0
- package/dist/pwa/workbox.js +382 -0
- package/dist/pwa.d.ts +52 -0
- package/dist/pwa.js +236 -0
- package/dist/reactive-bindings.d.ts +47 -0
- package/dist/reactive-bindings.js +268 -0
- package/dist/reactive-tracking.d.ts +81 -0
- package/dist/reactive-tracking.js +49 -0
- package/dist/reactive.d.ts +117 -0
- package/dist/reactive.js +593 -0
- package/dist/reactivity.d.ts +206 -0
- package/dist/reactivity.js +574 -0
- package/dist/release.d.ts +1 -0
- package/dist/release.js +1 -0
- package/dist/render-memo.d.ts +40 -0
- package/dist/render-memo.js +33 -0
- package/dist/render.d.ts +54 -0
- package/dist/render.js +153 -0
- package/dist/resolve-stx-targets.d.ts +49 -0
- package/dist/resolve-stx-targets.js +38 -0
- package/dist/route-middleware.d.ts +2 -0
- package/dist/route-middleware.js +17 -0
- package/dist/route-types.d.ts +134 -0
- package/dist/route-types.js +24 -0
- package/dist/router.d.ts +9 -0
- package/dist/router.js +9 -0
- package/dist/routes.d.ts +6 -0
- package/dist/routes.js +14 -0
- package/dist/runtime-globals.d.ts +236 -0
- package/dist/runtime-globals.js +230 -0
- package/dist/runtime-injection.d.ts +113 -0
- package/dist/runtime-injection.js +156 -0
- package/dist/runtime.d.ts +140 -0
- package/dist/runtime.js +94 -0
- package/dist/safe-evaluator.d.ts +165 -0
- package/dist/safe-evaluator.js +461 -0
- package/dist/scaffolding.d.ts +113 -0
- package/dist/scaffolding.js +897 -0
- package/dist/screenshot.d.ts +22 -0
- package/dist/screenshot.js +100 -0
- package/dist/script-classifier.d.ts +41 -0
- package/dist/script-classifier.js +51 -0
- package/dist/script-emit.d.ts +50 -0
- package/dist/script-emit.js +11 -0
- package/dist/script-json.d.ts +36 -0
- package/dist/script-json.js +6 -0
- package/dist/script-validation.d.ts +26 -0
- package/dist/script-validation.js +179 -0
- package/dist/seo.d.ts +225 -0
- package/dist/seo.js +486 -0
- package/dist/serve.d.ts +44 -0
- package/dist/serve.js +233 -0
- package/dist/server-bindings.d.ts +39 -0
- package/dist/server-bindings.js +171 -0
- package/dist/server-components.d.ts +138 -0
- package/dist/server-components.js +427 -0
- package/dist/sfc-template.d.ts +17 -0
- package/dist/sfc-template.js +32 -0
- package/dist/signal-processing.d.ts +222 -0
- package/dist/signal-processing.js +1081 -0
- package/dist/signals-api.d.ts +459 -0
- package/dist/signals-api.js +172 -0
- package/dist/signals.d.ts +41 -0
- package/dist/signals.js +8233 -0
- package/dist/site-builder/build.d.ts +18 -0
- package/dist/site-builder/build.js +252 -0
- package/dist/site-builder/i18n.d.ts +104 -0
- package/dist/site-builder/i18n.js +150 -0
- package/dist/site-builder/index.d.ts +27 -0
- package/dist/site-builder/index.js +16 -0
- package/dist/site-builder/robots.d.ts +2 -0
- package/dist/site-builder/robots.js +26 -0
- package/dist/site-builder/router.d.ts +10 -0
- package/dist/site-builder/router.js +27 -0
- package/dist/site-builder/seo.d.ts +8 -0
- package/dist/site-builder/seo.js +67 -0
- package/dist/site-builder/sitemap.d.ts +10 -0
- package/dist/site-builder/sitemap.js +26 -0
- package/dist/site-builder/theme.d.ts +12 -0
- package/dist/site-builder/theme.js +38 -0
- package/dist/site-builder/types.d.ts +74 -0
- package/dist/site-builder/types.js +0 -0
- package/dist/site-url.d.ts +46 -0
- package/dist/site-url.js +70 -0
- package/dist/slots.d.ts +129 -0
- package/dist/slots.js +286 -0
- package/dist/source-maps.d.ts +98 -0
- package/dist/source-maps.js +350 -0
- package/dist/source-signature.d.ts +45 -0
- package/dist/source-signature.js +20 -0
- package/dist/spa-nav.d.ts +49 -0
- package/dist/spa-nav.js +12 -0
- package/dist/spa-shell.d.ts +21 -0
- package/dist/spa-shell.js +34 -0
- package/dist/ssg.d.ts +357 -0
- package/dist/ssg.js +94 -0
- package/dist/ssr.d.ts +116 -0
- package/dist/ssr.js +339 -0
- package/dist/state-dir.d.ts +36 -0
- package/dist/state-dir.js +22 -0
- package/dist/state-management.d.ts +299 -0
- package/dist/state-management.js +519 -0
- package/dist/store-imports.d.ts +47 -0
- package/dist/store-imports.js +16 -0
- package/dist/store-loader.d.ts +15 -0
- package/dist/store-loader.js +111 -0
- package/dist/stores-client.d.ts +70 -0
- package/dist/stores-client.js +132 -0
- package/dist/story/addons.d.ts +123 -0
- package/dist/story/addons.js +261 -0
- package/dist/story/analytics.d.ts +163 -0
- package/dist/story/analytics.js +235 -0
- package/dist/story/auto-stories.d.ts +38 -0
- package/dist/story/auto-stories.js +158 -0
- package/dist/story/bookmarks.d.ts +102 -0
- package/dist/story/bookmarks.js +277 -0
- package/dist/story/bun-test.d.ts +45 -0
- package/dist/story/bun-test.js +102 -0
- package/dist/story/cli.d.ts +132 -0
- package/dist/story/cli.js +155 -0
- package/dist/story/collect/analyzer.d.ts +33 -0
- package/dist/story/collect/analyzer.js +305 -0
- package/dist/story/collect/index.d.ts +31 -0
- package/dist/story/collect/index.js +27 -0
- package/dist/story/collect/parser.d.ts +17 -0
- package/dist/story/collect/parser.js +129 -0
- package/dist/story/collect/scanner.d.ts +17 -0
- package/dist/story/collect/scanner.js +101 -0
- package/dist/story/collect/tree.d.ts +24 -0
- package/dist/story/collect/tree.js +110 -0
- package/dist/story/commands/build.d.ts +19 -0
- package/dist/story/commands/build.js +172 -0
- package/dist/story/commands/dev.d.ts +23 -0
- package/dist/story/commands/dev.js +78 -0
- package/dist/story/commands/index.d.ts +9 -0
- package/dist/story/commands/index.js +3 -0
- package/dist/story/commands/preview.d.ts +21 -0
- package/dist/story/commands/preview.js +56 -0
- package/dist/story/compiled-output.d.ts +27 -0
- package/dist/story/compiled-output.js +151 -0
- package/dist/story/composition.d.ts +47 -0
- package/dist/story/composition.js +261 -0
- package/dist/story/config-watcher.d.ts +33 -0
- package/dist/story/config-watcher.js +67 -0
- package/dist/story/config.d.ts +29 -0
- package/dist/story/config.js +64 -0
- package/dist/story/context.d.ts +27 -0
- package/dist/story/context.js +27 -0
- package/dist/story/controls/index.d.ts +54 -0
- package/dist/story/controls/index.js +320 -0
- package/dist/story/desktop-preview.d.ts +34 -0
- package/dist/story/desktop-preview.js +105 -0
- package/dist/story/docs-generator.d.ts +30 -0
- package/dist/story/docs-generator.js +187 -0
- package/dist/story/errors.d.ts +47 -0
- package/dist/story/errors.js +239 -0
- package/dist/story/figma-export.d.ts +169 -0
- package/dist/story/figma-export.js +224 -0
- package/dist/story/generator.d.ts +21 -0
- package/dist/story/generator.js +165 -0
- package/dist/story/hmr.d.ts +62 -0
- package/dist/story/hmr.js +131 -0
- package/dist/story/hot-swap.d.ts +46 -0
- package/dist/story/hot-swap.js +207 -0
- package/dist/story/index.d.ts +99 -0
- package/dist/story/index.js +49 -0
- package/dist/story/interactions.d.ts +53 -0
- package/dist/story/interactions.js +225 -0
- package/dist/story/keyboard-shortcuts.d.ts +39 -0
- package/dist/story/keyboard-shortcuts.js +345 -0
- package/dist/story/output.d.ts +115 -0
- package/dist/story/output.js +153 -0
- package/dist/story/performance.d.ts +129 -0
- package/dist/story/performance.js +252 -0
- package/dist/story/presets.d.ts +123 -0
- package/dist/story/presets.js +289 -0
- package/dist/story/props-validation.d.ts +45 -0
- package/dist/story/props-validation.js +215 -0
- package/dist/story/renderer.d.ts +69 -0
- package/dist/story/renderer.js +209 -0
- package/dist/story/search-index.d.ts +47 -0
- package/dist/story/search-index.js +106 -0
- package/dist/story/search.d.ts +56 -0
- package/dist/story/search.js +140 -0
- package/dist/story/server.d.ts +31 -0
- package/dist/story/server.js +965 -0
- package/dist/story/setup.d.ts +56 -0
- package/dist/story/setup.js +78 -0
- package/dist/story/snapshots.d.ts +65 -0
- package/dist/story/snapshots.js +171 -0
- package/dist/story/testing.d.ts +83 -0
- package/dist/story/testing.js +164 -0
- package/dist/story/theme.d.ts +68 -0
- package/dist/story/theme.js +170 -0
- package/dist/story/ts-css.d.ts +29 -0
- package/dist/story/ts-css.js +189 -0
- package/dist/story/types.d.ts +342 -0
- package/dist/story/types.js +0 -0
- package/dist/story/ui/code-panel.d.ts +43 -0
- package/dist/story/ui/code-panel.js +175 -0
- package/dist/story/ui/controls-panel.d.ts +25 -0
- package/dist/story/ui/controls-panel.js +168 -0
- package/dist/story/ui/index.d.ts +8 -0
- package/dist/story/ui/index.js +4 -0
- package/dist/story/ui/navigation.d.ts +55 -0
- package/dist/story/ui/navigation.js +250 -0
- package/dist/story/ui/preview.d.ts +46 -0
- package/dist/story/ui/preview.js +251 -0
- package/dist/story/visual-testing.d.ts +45 -0
- package/dist/story/visual-testing.js +248 -0
- package/dist/streaming.d.ts +238 -0
- package/dist/streaming.js +537 -0
- package/dist/strict-lint.d.ts +52 -0
- package/dist/strict-lint.js +269 -0
- package/dist/strip-literals.d.ts +40 -0
- package/dist/strip-literals.js +149 -0
- package/dist/stx-virtual-ts.d.ts +358 -0
- package/dist/stx-virtual-ts.js +670 -0
- package/dist/stx.d.ts +924 -0
- package/dist/style-scoping.d.ts +42 -0
- package/dist/style-scoping.js +82 -0
- package/dist/suspense.d.ts +98 -0
- package/dist/suspense.js +398 -0
- package/dist/teleport.d.ts +31 -0
- package/dist/teleport.js +109 -0
- package/dist/template-compiler.d.ts +33 -0
- package/dist/template-compiler.js +68 -0
- package/dist/template-hydrator.d.ts +28 -0
- package/dist/template-hydrator.js +95 -0
- package/dist/template-tag-balance.d.ts +32 -0
- package/dist/template-tag-balance.js +93 -0
- package/dist/testing.d.ts +330 -0
- package/dist/testing.js +588 -0
- package/dist/theme-tokens.d.ts +88 -0
- package/dist/theme-tokens.js +71 -0
- package/dist/transitions.d.ts +99 -0
- package/dist/transitions.js +443 -0
- package/dist/ts-css-config.d.ts +71 -0
- package/dist/ts-css-config.js +44 -0
- package/dist/type-checker.d.ts +85 -0
- package/dist/type-checker.js +581 -0
- package/dist/typecheck.d.ts +70 -0
- package/dist/typecheck.js +365 -0
- package/dist/types/component-types.d.ts +248 -0
- package/dist/types/component-types.js +0 -0
- package/dist/types/config-types.d.ts +938 -0
- package/dist/types/config-types.js +0 -0
- package/dist/types/context-types.d.ts +122 -0
- package/dist/types/context-types.js +0 -0
- package/dist/types/csp-types.d.ts +83 -0
- package/dist/types/csp-types.js +0 -0
- package/dist/types/directive-types.d.ts +315 -0
- package/dist/types/directive-types.js +3 -0
- package/dist/types/index.d.ts +20 -0
- package/dist/types/index.js +1 -0
- package/dist/types/pwa-types.d.ts +338 -0
- package/dist/types/pwa-types.js +0 -0
- package/dist/types.d.ts +27 -0
- package/dist/types.js +1 -0
- package/dist/typescript-templates.d.ts +156 -0
- package/dist/typescript-templates.js +386 -0
- package/dist/unresolved-identifiers.d.ts +52 -0
- package/dist/unresolved-identifiers.js +148 -0
- package/dist/utils.d.ts +112 -0
- package/dist/utils.js +1170 -0
- package/dist/validator.d.ts +80 -0
- package/dist/validator.js +171 -0
- package/dist/variable-extractor.d.ts +142 -0
- package/dist/variable-extractor.js +1306 -0
- package/dist/view-composers.d.ts +171 -0
- package/dist/view-composers.js +29 -0
- package/dist/virtual-scrolling.d.ts +127 -0
- package/dist/virtual-scrolling.js +454 -0
- package/dist/visual-editor.d.ts +185 -0
- package/dist/visual-editor.js +735 -0
- package/dist/visual-testing.d.ts +135 -0
- package/dist/visual-testing.js +126 -0
- package/dist/vue-template.d.ts +39 -0
- package/dist/vue-template.js +476 -0
- package/dist/web-components/css-scoping.d.ts +64 -0
- package/dist/web-components/css-scoping.js +210 -0
- package/dist/web-components/index.d.ts +29 -0
- package/dist/web-components/index.js +13 -0
- package/dist/web-components/reactive-generator.d.ts +72 -0
- package/dist/web-components/reactive-generator.js +484 -0
- package/dist/web-components.d.ts +253 -0
- package/dist/web-components.js +1466 -0
- package/dist/x-element.d.ts +42 -0
- package/dist/x-element.js +301 -0
- package/package.json +107 -0
- package/stx.d.ts +924 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Vi as a,Wi as b}from"./chunk-nsp1cw38.js";import"./chunk-9n0gvfrg.js";import"./chunk-4ww3znrr.js";import"./chunk-y11cxbxd.js";import"./chunk-92mj1t26.js";import"./chunk-8mjdpr94.js";import"./chunk-pkaabd8h.js";import"./chunk-xpp135ad.js";import"./chunk-wrzwgkbx.js";import"./chunk-5kk8gsj2.js";import"./chunk-38ejahd9.js";import"./chunk-ypmqf7tm.js";import"./chunk-de7fye10.js";import"./chunk-v5e1gxwm.js";import"./chunk-b6ej2fdf.js";import"./chunk-x650vjcp.js";import"./chunk-qc1f74ek.js";export{a as getStoreScript,b as clearStoreCache};
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var N=new Map,Q=new Map;function T(A){if(N.set(A.name,A),A.client)Q.set(A.name,A.client)}function V(A){return N.get(A)}function W(){return Array.from(N.values())}function X(A){return Q.delete(A),N.delete(A)}function G(A){return T(A),{name:A.name,hasEndTag:A.hasEndTag??!0,description:A.description,handler:async(C,F,H,L)=>{let J=U(F,A.defaults);if(A.validate){let E=A.validate(J);if(E!==!0){let M=typeof E==="string"?E:`Invalid parameters for @${A.name}`;throw Error(M)}}let K=C;if(A.transform)K=await A.transform(C,J,H,L);if(A.clientScript){let E=A.clientScript(J);K+=`<script>${E}</script>`}if(A.css){let E=A.css(J);K+=`<style>${E}</style>`}return K}}}function Y(A,B){let C=typeof B==="function"?{mounted:B}:B;return Q.set(A,C),C}function U(A,B){let C={...B};for(let F of A){let H=F.indexOf(":"),L=F.indexOf("="),J=H>=0&&(L<0||H<L)?H:L;if(J>=0){let K=F.slice(0,J).trim(),E=F.slice(J+1).trim();if(E==="true")E=!0;else if(E==="false")E=!1;else if(E==="null")E=null;else if(!Number.isNaN(Number(E)))E=Number(E);else if(typeof E==="string"&&E.startsWith("{"))try{E=JSON.parse(E)}catch{}C[K]=E}else{let K=Object.keys(C).filter((E)=>!B||!(E in B)).length;C[K===0?"value":`arg${K}`]=F}}return C}function Z(){return[G({name:"uppercase",description:"Convert content to uppercase",transform:(A)=>A.toUpperCase()}),G({name:"lowercase",description:"Convert content to lowercase",transform:(A)=>A.toLowerCase()}),G({name:"capitalize",description:"Capitalize first letter of content",transform:(A)=>A.charAt(0).toUpperCase()+A.slice(1)}),G({name:"trim",description:"Remove leading and trailing whitespace",transform:(A)=>A.trim()}),G({name:"truncate",description:"Truncate content to specified length",defaults:{length:100,suffix:"..."},transform:(A,{length:B,suffix:C})=>A.length>B?A.slice(0,B)+C:A}),G({name:"highlight",description:"Highlight content with background color",defaults:{color:"yellow"},transform:(A,{color:B})=>`<mark style="background-color: ${B}; padding: 0.1em 0.2em; border-radius: 0.2em;">${A}</mark>`}),G({name:"badge",description:"Create a badge/tag",defaults:{variant:"default",color:""},transform:(A,{variant:B,color:C})=>{let F={default:"background: #e5e7eb; color: #374151;",primary:"background: #3b82f6; color: white;",success:"background: #10b981; color: white;",warning:"background: #f59e0b; color: white;",danger:"background: #ef4444; color: white;",info:"background: #06b6d4; color: white;"};return`<span style="${C?`background: ${C}; color: white;`:F[B]||F.default} padding: 0.25em 0.5em; border-radius: 9999px; font-size: 0.875em; font-weight: 500;">${A}</span>`}}),G({name:"code",description:"Style content as inline code",transform:(A)=>`<code style="background: #f3f4f6; padding: 0.2em 0.4em; border-radius: 0.25em; font-family: ui-monospace, monospace; font-size: 0.875em;">${A}</code>`}),G({name:"tooltip",description:"Add a tooltip to content",defaults:{text:"",position:"top"},hasEndTag:!0,transform:(A,{text:B,position:C})=>`<span class="stx-tooltip" data-tooltip="${B}" data-tooltip-position="${C}" style="position: relative; cursor: help;">${A}</span>`,css:()=>`
|
|
3
|
+
.stx-tooltip::after {
|
|
4
|
+
content: attr(data-tooltip);
|
|
5
|
+
position: absolute;
|
|
6
|
+
bottom: 100%;
|
|
7
|
+
left: 50%;
|
|
8
|
+
transform: translateX(-50%);
|
|
9
|
+
padding: 0.5em 0.75em;
|
|
10
|
+
background: #1f2937;
|
|
11
|
+
color: white;
|
|
12
|
+
font-size: 0.75rem;
|
|
13
|
+
border-radius: 0.25rem;
|
|
14
|
+
white-space: nowrap;
|
|
15
|
+
opacity: 0;
|
|
16
|
+
visibility: hidden;
|
|
17
|
+
transition: opacity 0.2s, visibility 0.2s;
|
|
18
|
+
z-index: 1000;
|
|
19
|
+
margin-bottom: 0.25rem;
|
|
20
|
+
}
|
|
21
|
+
.stx-tooltip:hover::after {
|
|
22
|
+
opacity: 1;
|
|
23
|
+
visibility: visible;
|
|
24
|
+
}
|
|
25
|
+
`}),G({name:"clipboard",description:"Add copy to clipboard functionality",defaults:{label:"Copy"},transform:(A,{label:B})=>{let C=`clipboard-${Date.now()}-${Math.random().toString(36).slice(2)}`;return`
|
|
26
|
+
<span class="stx-clipboard" data-clipboard-id="${C}">
|
|
27
|
+
<span class="stx-clipboard-content">${A}</span>
|
|
28
|
+
<button type="button" class="stx-clipboard-btn" onclick="navigator.clipboard.writeText(document.querySelector('[data-clipboard-id=\\'${C}\\'] .stx-clipboard-content').textContent).then(() => { this.textContent = 'Copied!'; setTimeout(() => this.textContent = '${B}', 2000); })">${B}</button>
|
|
29
|
+
</span>
|
|
30
|
+
`},css:()=>`
|
|
31
|
+
.stx-clipboard {
|
|
32
|
+
display: inline-flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
gap: 0.5em;
|
|
35
|
+
}
|
|
36
|
+
.stx-clipboard-btn {
|
|
37
|
+
padding: 0.25em 0.5em;
|
|
38
|
+
font-size: 0.75em;
|
|
39
|
+
background: #e5e7eb;
|
|
40
|
+
border: none;
|
|
41
|
+
border-radius: 0.25em;
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
}
|
|
44
|
+
.stx-clipboard-btn:hover {
|
|
45
|
+
background: #d1d5db;
|
|
46
|
+
}
|
|
47
|
+
`}),G({name:"time",description:"Display relative time",defaults:{date:""},hasEndTag:!1,transform:(A,{date:B})=>{let C=B?new Date(B).getTime():Date.now();return`<time datetime="${new Date(C).toISOString()}" data-stx-relative-time="${C}"></time>`},clientScript:()=>`
|
|
48
|
+
document.querySelectorAll('[data-stx-relative-time]').forEach(el => {
|
|
49
|
+
const timestamp = parseInt(el.dataset.stxRelativeTime);
|
|
50
|
+
const rtf = new Intl.RelativeTimeFormat('en', { numeric: 'auto' });
|
|
51
|
+
const diff = timestamp - Date.now();
|
|
52
|
+
const seconds = Math.floor(diff / 1000);
|
|
53
|
+
const minutes = Math.floor(seconds / 60);
|
|
54
|
+
const hours = Math.floor(minutes / 60);
|
|
55
|
+
const days = Math.floor(hours / 24);
|
|
56
|
+
|
|
57
|
+
if (Math.abs(days) > 0) el.textContent = rtf.format(days, 'day');
|
|
58
|
+
else if (Math.abs(hours) > 0) el.textContent = rtf.format(hours, 'hour');
|
|
59
|
+
else if (Math.abs(minutes) > 0) el.textContent = rtf.format(minutes, 'minute');
|
|
60
|
+
else el.textContent = rtf.format(seconds, 'second');
|
|
61
|
+
});
|
|
62
|
+
`}),G({name:"currency",description:"Format number as currency",defaults:{amount:0,currency:"USD",locale:"en-US"},hasEndTag:!1,transform:(A,{amount:B,currency:C,locale:F})=>{return new Intl.NumberFormat(F,{style:"currency",currency:C}).format(B)}}),G({name:"number",description:"Format number with locale",defaults:{value:0,decimals:2,locale:"en-US"},hasEndTag:!1,transform:(A,{value:B,decimals:C,locale:F})=>{return new Intl.NumberFormat(F,{minimumFractionDigits:C,maximumFractionDigits:C}).format(B)}}),G({name:"pluralize",description:"Pluralize text based on count",defaults:{count:0,singular:"",plural:""},hasEndTag:!1,transform:(A,{count:B,singular:C,plural:F})=>{let H=B===1?C:F||C+"s";return`${B} ${H}`}})]}function _(){return`
|
|
63
|
+
// STX Directive Runtime
|
|
64
|
+
(function() {
|
|
65
|
+
if (typeof window === 'undefined') return;
|
|
66
|
+
|
|
67
|
+
window.STX = window.STX || {};
|
|
68
|
+
window.STX.directives = window.STX.directives || {};
|
|
69
|
+
|
|
70
|
+
// Register a client-side directive
|
|
71
|
+
window.STX.directive = function(name, definition) {
|
|
72
|
+
if (typeof definition === 'function') {
|
|
73
|
+
definition = { mounted: definition };
|
|
74
|
+
}
|
|
75
|
+
window.STX.directives[name] = definition;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
// Apply directive to element
|
|
79
|
+
window.STX.applyDirective = function(el, name, value, arg, modifiers) {
|
|
80
|
+
const directive = window.STX.directives[name];
|
|
81
|
+
if (!directive) {
|
|
82
|
+
console.warn('[stx] Unknown directive:', name);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const binding = {
|
|
87
|
+
value: value,
|
|
88
|
+
arg: arg,
|
|
89
|
+
modifiers: modifiers || {},
|
|
90
|
+
dir: directive
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
// Store binding on element for updates
|
|
94
|
+
el.__stx_directives__ = el.__stx_directives__ || {};
|
|
95
|
+
el.__stx_directives__[name] = binding;
|
|
96
|
+
|
|
97
|
+
// Call lifecycle hooks
|
|
98
|
+
if (directive.created) directive.created(el, binding);
|
|
99
|
+
if (directive.beforeMount) directive.beforeMount(el, binding);
|
|
100
|
+
|
|
101
|
+
// Defer mounted until DOM is ready
|
|
102
|
+
requestAnimationFrame(function() {
|
|
103
|
+
if (directive.mounted) directive.mounted(el, binding);
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
// Update directive on element
|
|
108
|
+
window.STX.updateDirective = function(el, name, newValue) {
|
|
109
|
+
const binding = el.__stx_directives__ && el.__stx_directives__[name];
|
|
110
|
+
if (!binding) return;
|
|
111
|
+
|
|
112
|
+
const directive = binding.dir;
|
|
113
|
+
const oldValue = binding.value;
|
|
114
|
+
binding.oldValue = oldValue;
|
|
115
|
+
binding.value = newValue;
|
|
116
|
+
|
|
117
|
+
if (directive.beforeUpdate) directive.beforeUpdate(el, binding);
|
|
118
|
+
if (directive.updated) directive.updated(el, binding);
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
// Remove directive from element
|
|
122
|
+
window.STX.removeDirective = function(el, name) {
|
|
123
|
+
const binding = el.__stx_directives__ && el.__stx_directives__[name];
|
|
124
|
+
if (!binding) return;
|
|
125
|
+
|
|
126
|
+
const directive = binding.dir;
|
|
127
|
+
if (directive.beforeUnmount) directive.beforeUnmount(el, binding);
|
|
128
|
+
if (directive.unmounted) directive.unmounted(el, binding);
|
|
129
|
+
|
|
130
|
+
delete el.__stx_directives__[name];
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
// Auto-apply directives on page load
|
|
134
|
+
document.addEventListener('DOMContentLoaded', function() {
|
|
135
|
+
document.querySelectorAll('[data-stx-directive]').forEach(function(el) {
|
|
136
|
+
const directives = el.dataset.stxDirective.split(';');
|
|
137
|
+
directives.forEach(function(d) {
|
|
138
|
+
const [name, value] = d.split(':').map(s => s.trim());
|
|
139
|
+
window.STX.applyDirective(el, name, value);
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
console.log('[stx] Directive runtime initialized');
|
|
145
|
+
})();
|
|
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 Ms,V as Ns,W as Os,X as Ps,G as Qs,Y as Rs,Z as Ss,_ as Ts,$ as Us};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ws as Iq}from"./chunk-pkaabd8h.js";import{gv as N}from"./chunk-qc1f74ek.js";var Sq={1001:{message:"Unclosed directive: {{directive}}",help:"Make sure to close the directive with the appropriate end tag"},1002:{message:"Unclosed expression at position {{position}}",help:"Check for missing closing braces }}"},1003:{message:"Invalid directive syntax: {{directive}}",help:"Review the directive documentation for correct syntax"},1004:{message:"Malformed expression: {{expression}}",help:"Check for syntax errors in your expression"},1005:{message:"Unexpected token: {{token}}",help:"Remove or fix the unexpected token"},1101:{message:"Undefined variable: {{variable}}",help:"Make sure the variable is defined in the template context"},1102:{message:"Type error: {{details}}",help:"Check that you are using the correct types"},1103:{message:"Evaluation error: {{details}}",help:"Review the expression for errors"},1104:{message:"Infinite loop detected in {{location}}",help:"Check your loop conditions"},1105:{message:"Circular reference detected: {{path}}",help:"Remove the circular dependency"},1201:{message:"Unsafe expression blocked: {{expression}}",help:"This expression contains potentially dangerous code"},1202:{message:"Path traversal attempt blocked: {{path}}",help:"Use only relative paths within allowed directories"},1203:{message:"Potential XSS attempt blocked",help:"Sanitize user input before rendering"},1204:{message:"Code injection attempt blocked: {{code}}",help:"Avoid executing dynamic code"},1205:{message:"Prohibited DOM API usage: {{api}}",help:"Use STX.useRefs(), STX.useRef(), STX.el() and other STX helpers instead of direct DOM manipulation"},1301:{message:"File not found: {{path}}",help:"Check that the file exists and the path is correct"},1302:{message:"Error reading file: {{path}}",help:"Check file permissions and encoding"},1303:{message:"Invalid file path: {{path}}",help:"Use a valid file path"},1304:{message:"Permission denied: {{path}}",help:"Check file permissions"},1401:{message:"Invalid configuration: {{details}}",help:"Review your stx.config.ts file"},1402:{message:"Missing required configuration: {{key}}",help:"Add the required configuration option"},1403:{message:"Deprecated configuration: {{key}}",help:"Update to the new configuration format"},1501:{message:"Component not found: {{name}}",help:"Check that the component exists in your components directory"},1502:{message:"Invalid props for component {{name}}: {{details}}",help:"Check the component prop requirements"},1503:{message:"Error rendering component {{name}}: {{details}}",help:"Check the component template for errors"},1601:{message:"Filter not found: {{filter}}",help:"Register the filter or check the filter name"},1602:{message:"Invalid arguments for filter {{filter}}: {{details}}",help:"Check the filter documentation for correct arguments"},1603:{message:"Expression evaluation timed out",help:"Simplify the expression or increase the timeout"}},P={},qq="en";function Pq(q){qq=q}function Lq(){return qq}function bq(q){P={...P,...q}}function Cq(){P={}}function Jq(q,Q={}){let J=P[q]||Sq[q]||{message:`Unknown error (code: ${q})`},Z=J.message,$=J.help;for(let[W,H]of Object.entries(Q)){let Y=`{{${W}}}`;if(Z=Z.replace(new RegExp(Y,"g"),H),$)$=$.replace(new RegExp(Y,"g"),H)}return{message:Z,help:$}}function yq(q,Q={}){let{message:J,help:Z}=Jq(q,Q);return Z?`${J}
|
|
3
|
+
Help: ${Z}`:J}var j={UNCLOSED_DIRECTIVE:1001,UNCLOSED_EXPRESSION:1002,INVALID_DIRECTIVE_SYNTAX:1003,MALFORMED_EXPRESSION:1004,UNEXPECTED_TOKEN:1005,UNDEFINED_VARIABLE:1101,TYPE_ERROR:1102,EVALUATION_ERROR:1103,INFINITE_LOOP:1104,CIRCULAR_REFERENCE:1105,UNSAFE_EXPRESSION:1201,PATH_TRAVERSAL:1202,XSS_ATTEMPT:1203,CODE_INJECTION:1204,DOM_API_VIOLATION:1205,FILE_NOT_FOUND:1301,FILE_READ_ERROR:1302,INVALID_FILE_PATH:1303,PERMISSION_DENIED:1304,INVALID_CONFIG:1401,MISSING_REQUIRED_CONFIG:1402,DEPRECATED_CONFIG:1403,COMPONENT_NOT_FOUND:1501,INVALID_PROPS:1502,COMPONENT_RENDER_ERROR:1503,FILTER_NOT_FOUND:1601,INVALID_FILTER_ARGS:1602,EXPRESSION_TIMEOUT:1603};function g(q){for(let[Q,J]of Object.entries(j))if(J===q)return Q;return}function vq(){return!1}function E(){return!vq()||process.env.STX_DEBUG==="true"}function oJ(){return!1}import xq from"path";var Qq={showRelativePaths:!1,enableAutoRecovery:E(),logRecoveryWarnings:!0},R={...Qq};function gq(q){R={...R,...q}}function L(){return{...R}}function fq(){R={...Qq}}function b(q){if(!R.showRelativePaths||!q)return q;let Q=R.baseDir||process.cwd();try{let J=xq.relative(Q,q);return J.startsWith("..")?q:J}catch{return q}}class A extends Error{code;filePath;line;column;context;numericCode;constructor(q,Q,J,Z,$,W,H){super(q);this.code=Q;this.filePath=J;this.line=Z;this.column=$;this.context=W;if(this.name="StxError",this.numericCode=H||j.EVALUATION_ERROR,this.filePath)this.filePath=b(this.filePath)}}class Zq extends A{constructor(q,Q,J,Z,$,W){super(q,"stx_SYNTAX_ERROR",Q,J,Z,$,W||j.INVALID_DIRECTIVE_SYNTAX);this.name="StxSyntaxError"}}class $q extends A{constructor(q,Q,J,Z,$,W){super(q,"stx_RUNTIME_ERROR",Q,J,Z,$,W||j.EVALUATION_ERROR);this.name="StxRuntimeError"}}class Xq extends A{constructor(q,Q,J,Z,$,W){super(q,"stx_SECURITY_ERROR",Q,J,Z,$,W||j.UNSAFE_EXPRESSION);this.name="StxSecurityError"}}class Wq extends A{constructor(q,Q,J,Z,$,W){super(q,"stx_FILE_ERROR",Q,J,Z,$,W||j.FILE_NOT_FOUND);this.name="StxFileError"}}class Yq extends A{isFatal=!0;constructor(q,Q,J,Z,$,W){super(q,"stx_VALIDATION_ERROR",Q,J,Z,$,W||j.DOM_API_VIOLATION);this.name="StxValidationError"}}function f(q){let{type:Q,message:J,code:Z,filePath:$,line:W,column:H,template:Y,offset:X,snippet:B,suggestion:G,format:V="text"}=q,_=W,M=H;if(!_&&Y&&X!==void 0){let z=Gq(Y,X);_=z.line,M=z.column}let U=$?b($):void 0,w=Z?g(Z):void 0,O={type:Q,code:Z,codeName:w,message:J,filePath:U,line:_,column:M,snippet:B,suggestion:G,timestamp:new Date().toISOString()},F;switch(V){case"html":F=uq(O);break;case"json":F=JSON.stringify(O,null,2);break;case"console":F=dq(O,Y,X);break;case"text":default:F=hq(O,Y,X);break}return{formatted:F,data:O}}function hq(q,Q,J){let Z=[],$=q.code?` [${q.codeName||q.code}]`:"";if(Z.push(`[${q.type} Error${$}]`),q.filePath){let W=q.filePath;if(q.line){if(W+=`:${q.line}`,q.column)W+=`:${q.column}`}Z.push(`at ${W}`)}if(Z.push(`
|
|
4
|
+
${q.message}`),Q&&q.line){let W=pq(Q,q.line,2);if(W)Z.push(`
|
|
5
|
+
${W}`)}if(q.snippet)Z.push(`
|
|
6
|
+
Snippet: ${q.snippet}`);if(q.suggestion)Z.push(`
|
|
7
|
+
Suggestion: ${q.suggestion}`);return Z.join(" ")}function uq(q){let Q=q.code?` [${q.code}]`:"",J=q.filePath?` in ${q.filePath}${q.line?`:${q.line}`:""}`:"",Z=`<!-- [${q.type} Error${Q}]${J}: ${Hq(q.message)}`;if(q.suggestion)Z+=` | Suggestion: ${Hq(q.suggestion)}`;return Z+=" -->",Z}function dq(q,Q,J){let B=[],G=q.code?` [${q.codeName||q.code}]`:"";if(B.push(`\x1B[1m${"\x1B[31m"}\u2501\u2501\u2501 ${q.type} Error${G} \u2501\u2501\u2501${"\x1B[0m"}`),q.filePath){let V=`\x1B[36m${q.filePath}\x1B[0m`;if(q.line){if(V+=`\x1B[90m:${q.line}\x1B[0m`,q.column)V+=`\x1B[90m:${q.column}\x1B[0m`}B.push(`
|
|
8
|
+
\x1B[90mat\x1B[0m ${V}`)}if(B.push(`
|
|
9
|
+
|
|
10
|
+
${q.message}`),Q&&q.line){let V=mq(Q,q.line,2);if(V)B.push(`
|
|
11
|
+
|
|
12
|
+
\x1B[90mContext:\x1B[0m
|
|
13
|
+
${V}`)}if(q.suggestion)B.push(`
|
|
14
|
+
|
|
15
|
+
\x1B[33mSuggestion:\x1B[0m ${q.suggestion}`);return B.push(`
|
|
16
|
+
${"\x1B[31m"}\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501${"\x1B[0m"}`),B.join("")}function pq(q,Q,J){let Z=q.split(`
|
|
17
|
+
`),$=Math.max(0,Q-J-1),W=Math.min(Z.length-1,Q+J-1),H=[];for(let Y=$;Y<=W;Y++){let X=(Y+1).toString().padStart(4),B=Y===Q-1?">":" ";H.push(`${B}${X} | ${Z[Y]}`)}return H.join(`
|
|
18
|
+
`)}function mq(q,Q,J){let Z=q.split(`
|
|
19
|
+
`),$=Math.max(0,Q-J-1),W=Math.min(Z.length-1,Q+J-1),H="\x1B[90m",Y="\x1B[31m",X="\x1B[0m",B=[];for(let G=$;G<=W;G++){let V=(G+1).toString().padStart(4),_=G===Q-1,M=_?"\x1B[31m>\x1B[0m":" ",U=_?`\x1B[31m${Z[G]}\x1B[0m`:`\x1B[90m${Z[G]}\x1B[0m`;B.push(`${M}\x1B[90m${V}\x1B[0m | ${U}`)}return B.join(`
|
|
20
|
+
`)}function Hq(q){return q.replace(/--/g,"- -").replace(/>/g,">")}function Gq(q,Q){let Z=q.substring(0,Q).split(`
|
|
21
|
+
`);return{line:Z.length,column:Z[Z.length-1].length}}function C(q,Q,J){return f({type:q,message:Q,code:J,format:"html"}).formatted}function cq(q,Q,J,Z,$){return f({type:q,message:Q,code:$,filePath:J,line:Z,format:"console"}).formatted}function lq(q,Q,J){let Z=J.template.split(`
|
|
22
|
+
`),$=Gq(J.template,J.offset),W=`[${q} Error at line ${$.line} in ${J.filePath}]: ${Q}
|
|
23
|
+
|
|
24
|
+
`,H=Math.max(0,$.line-3),Y=Math.min(Z.length-1,$.line+2);W+=`Context:
|
|
25
|
+
`;for(let X=H;X<=Y;X++){let B=X+1,G=Z[X]||"",V=X===$.line-1?">":" ";W+=`${V} ${B.toString().padStart(3)}: ${G}
|
|
26
|
+
`}if($.line-1<Z.length){let X=" ".repeat($.column+5);W+=`${X}^
|
|
27
|
+
`}return W}function sq(q,Q,J){try{return q()}catch(Z){if(J&&Z instanceof Error)J(Z);return Q}}async function iq(q,Q,J){try{return await q()}catch(Z){if(J&&Z instanceof Error)J(Z);return Q}}var rq={isEnabled(){return L().enableAutoRecovery},fixCommonSyntaxErrors(q){let Q=L();if(!Q.enableAutoRecovery)return{fixed:q,fixes:[]};let J=q,Z=[],$=(J.match(/\{\{/g)||[]).length,W=(J.match(/\}\}/g)||[]).length;if($>W){let Y=$-W;J+="}}".repeat(Y),Z.push(`Added ${Y} missing closing braces '}}'`)}let H=["if","foreach","for","switch","section"];for(let Y of H){let X=(J.match(new RegExp(`@${Y}\\b`,"g"))||[]).length,B=(J.match(new RegExp(`@end${Y}\\b`,"g"))||[]).length;if(X>B){let G=X-B;for(let V=0;V<G;V++)J+=`
|
|
28
|
+
@end${Y}`;Z.push(`Added ${G} missing @end${Y}`)}}if(Z.length>0&&Q.logRecoveryWarnings)console.warn("[stx] Auto-recovery applied fixes:"),Z.forEach((Y)=>console.warn(` - ${Y}`)),console.warn(" Consider fixing these issues in your template.");return{fixed:J,fixes:Z}},createFallbackContent(q,Q){if(E())return`<!-- ${q} failed: ${Q.message} -->`;return"<!-- stx rendering error -->"}};class h{errors=[];maxErrors;enableFileLogging;logFilePath;logFormat;maxFileSize;maxLogFiles;minLevel;writeQueue=Promise.resolve();constructor(q={}){this.maxErrors=q.maxErrors??1000,this.enableFileLogging=q.enableFileLogging??!1,this.logFilePath=q.logFilePath??".stx/errors.log",this.logFormat=q.logFormat??"json",this.maxFileSize=q.maxFileSize??10485760,this.maxLogFiles=q.maxLogFiles??5,this.minLevel=q.minLevel??"all"}configure(q){if(q.maxErrors!==void 0)this.maxErrors=q.maxErrors;if(q.enableFileLogging!==void 0)this.enableFileLogging=q.enableFileLogging;if(q.logFilePath!==void 0)this.logFilePath=q.logFilePath;if(q.logFormat!==void 0)this.logFormat=q.logFormat;if(q.maxFileSize!==void 0)this.maxFileSize=q.maxFileSize;if(q.maxLogFiles!==void 0)this.maxLogFiles=q.maxLogFiles;if(q.minLevel!==void 0)this.minLevel=q.minLevel}log(q,Q,J="error"){let Z={timestamp:new Date,error:q,context:Q,level:J};if(this.errors.push(Z),this.errors.length>this.maxErrors)this.errors=this.errors.slice(-this.maxErrors);if(this.enableFileLogging&&this.shouldLog(J))this.writeToFile(Z)}shouldLog(q){if(this.minLevel==="all")return!0;if(this.minLevel==="warning")return q==="error"||q==="warning";if(this.minLevel==="error")return q==="error";return!0}formatEntry(q){if(this.logFormat==="json")return JSON.stringify({timestamp:q.timestamp.toISOString(),level:q.level||"error",type:q.error.constructor.name,message:q.error.message,stack:q.error.stack,context:q.context});let Q=[`[${q.timestamp.toISOString()}] [${(q.level||"error").toUpperCase()}] ${q.error.constructor.name}: ${q.error.message}`];if(q.error.stack)Q.push(` Stack: ${q.error.stack.split(`
|
|
29
|
+
`).slice(1).join(`
|
|
30
|
+
`)}`);if(q.context)Q.push(` Context: ${JSON.stringify(q.context)}`);return Q.join(`
|
|
31
|
+
`)}writeToFile(q){this.writeQueue=this.writeQueue.then(async()=>{try{let Q=await import("fs"),Z=(await import("path")).dirname(this.logFilePath);if(!Q.existsSync(Z))Q.mkdirSync(Z,{recursive:!0});await this.rotateIfNeeded(Q);let $=`${this.formatEntry(q)}
|
|
32
|
+
`;Q.appendFileSync(this.logFilePath,$,"utf-8")}catch(Q){if(process.env.STX_DEBUG==="true")console.error("Failed to write to error log:",Q)}})}async rotateIfNeeded(q){try{if(!q.existsSync(this.logFilePath))return;if(q.statSync(this.logFilePath).size<this.maxFileSize)return;for(let J=this.maxLogFiles-1;J>=1;J--){let Z=`${this.logFilePath}.${J}`,$=`${this.logFilePath}.${J+1}`;if(q.existsSync(Z))if(J>=this.maxLogFiles-1)q.unlinkSync(Z);else q.renameSync(Z,$)}if(this.maxLogFiles<=1)q.writeFileSync(this.logFilePath,"");else q.renameSync(this.logFilePath,`${this.logFilePath}.1`)}catch(Q){if(process.env.STX_DEBUG==="true")console.error("Failed to rotate error logs:",Q)}}getRecentErrors(q=10){return this.errors.slice(-q)}getErrorsByType(q){return this.errors.filter((Q)=>Q.error.constructor.name===q)}getErrorsByLevel(q){return this.errors.filter((Q)=>Q.level===q)}clear(){this.errors.length=0}async clearLogFile(){try{let q=await import("fs");if(q.existsSync(this.logFilePath))q.writeFileSync(this.logFilePath,"","utf-8")}catch(q){if(process.env.STX_DEBUG==="true")console.error("Failed to clear error log:",q)}}getStats(){let q={},Q={error:0,warning:0,info:0};for(let J of this.errors){let Z=J.error.constructor.name;q[Z]=(q[Z]||0)+1;let $=J.level||"error";Q[$]=(Q[$]||0)+1}return{total:this.errors.length,byType:q,byLevel:Q}}async exportToFile(q,Q="json"){let J=await import("fs"),$=(await import("path")).dirname(q);if(!J.existsSync($))J.mkdirSync($,{recursive:!0});if(Q==="json"){let W=this.errors.map((H)=>({timestamp:H.timestamp.toISOString(),level:H.level||"error",type:H.error.constructor.name,message:H.error.message,stack:H.error.stack,context:H.context}));J.writeFileSync(q,JSON.stringify(W,null,2),"utf-8")}else{let W=this.errors.map((H)=>this.formatEntry(H));J.writeFileSync(q,W.join(`
|
|
33
|
+
|
|
34
|
+
`),"utf-8")}}async flush(){await this.writeQueue}}var nq=new h,oq={isDevelopment(){return E()},logDetailedError(q,Q){if(!this.isDevelopment())return;if(console.error("=== stx Detailed Error ==="),console.error("Error:",q.message),console.error("Stack:",q.stack),Q)console.error("Context:",Q);console.error("========================")},createErrorReport(q,Q){let J=["=== stx Error Report ===",`Time: ${new Date().toISOString()}`,`Error: ${q.message}`,`Type: ${q.constructor.name}`,`Stack: ${q.stack}`];if(Q)J.push(`Context: ${JSON.stringify(Q,null,2)}`);return J.push("========================"),J.join(`
|
|
35
|
+
`)}};import u from"path";var d={isValidFilePath(q,Q){let J=q.replace(/\\/g,"/");if(J.includes("\x00"))return!1;if(J.includes("../")||J.includes("..\\")||J===".."||J.startsWith("../")||J.endsWith("/..")||J.includes("/..\\")||J.includes("\\../"))return!1;if(/^[a-z][a-z0-9+.-]*:/i.test(J))return!1;if(J.startsWith("/")){if(["/etc/","/root/","/var/","/usr/","/bin/","/sbin/","/proc/","/sys/","/dev/","/boot/","/home/","/private/","/Library/","/System/"].some((W)=>J===W.slice(0,-1)||J.startsWith(W)))return!1}if(/^[a-z]:/i.test(J)){if(["Windows/","Windows\\","System32/","System32\\","Program Files/","Program Files\\"].some((W)=>J.includes(W)))return!1}if(Q){let $=u.resolve(Q,q),W=u.resolve(Q);if(!$.startsWith(W+u.sep)&&$!==W)return!1}return!0},isValidVariableName(q){return/^[a-z_$]\w*$/i.test(q)},isValidDirectiveName(q){return/^[a-z][\w-]*$/i.test(q)},isSafeContent(q){return![/<script[^>]*>[\s\S]*?<\/script>/i,/javascript:/i,/data:text\/html/i,/vbscript:/i,/on\w+\s*=/i].some((J)=>J.test(q))}};function aq(q){let Q={"&":"&","<":"<",">":">",'"':""","'":"'"};return q.replace(/[&<>"']/g,(J)=>Q[J]||J)}function y(q,Q={}){let{allowHtml:J=!1,maxLength:Z=1e4,allowSpecialChars:$=!0,customSanitizer:W}=Q,H=[],Y=q,X=!1;if(W){let G=W(Y);if(G!==Y)Y=G,X=!0}if(Y.includes("\x00"))Y=Y.replace(/\0/g,""),X=!0,H.push("Null bytes removed from parameter");if(Y.length>Z)Y=Y.substring(0,Z),X=!0,H.push(`Parameter truncated to ${Z} characters`);if(!J&&/<[^>]+>/.test(Y))Y=aq(Y),X=!0,H.push("HTML content was escaped");let B=[{pattern:/javascript:/gi,replacement:"",name:"javascript: URI"},{pattern:/vbscript:/gi,replacement:"",name:"vbscript: URI"},{pattern:/data:text\/html/gi,replacement:"",name:"data:text/html URI"}];for(let{pattern:G,replacement:V,name:_}of B)if(G.test(Y))Y=Y.replace(G,V),X=!0,H.push(`Removed ${_} from parameter`);if(!$){let G=Y;if(Y=Y.split("").filter((V)=>{let _=V.charCodeAt(0);return _>=32&&_!==127}).join(""),Y!==G)X=!0,H.push("Control characters removed")}return{value:Y,modified:X,warnings:H}}function tq(q,Q){let J=q.replace(/\0/g,"");J=J.replace(/\\/g,"/"),J=J.replace(/^[a-z][a-z0-9+.-]*:/i,"");while(J.includes("../")||J.includes("./"))J=J.replace(/\.\.\//g,"").replace(/\.\//g,"");if(!d.isValidFilePath(J,Q))return null;return J}function eq(q){let Q=[],J=q.trim(),Z=J!==q,$=[{pattern:/\beval\s*\(/gi,name:"eval()"},{pattern:/\bFunction\s*\(/gi,name:"Function()"},{pattern:/\bsetTimeout\s*\(/gi,name:"setTimeout()"},{pattern:/\bsetInterval\s*\(/gi,name:"setInterval()"},{pattern:/\bimport\s*\(/gi,name:"dynamic import()"},{pattern:/\brequire\s*\(/gi,name:"require()"},{pattern:/\b__proto__\b/gi,name:"__proto__"},{pattern:/\bconstructor\b/gi,name:"constructor"},{pattern:/\bprototype\b/gi,name:"prototype"}];for(let{pattern:W,name:H}of $)if(W.test(J))Q.push(`Potentially dangerous pattern detected: ${H}`);if(J.includes("\x00"))J=J.replace(/\0/g,""),Z=!0,Q.push("Null bytes removed from expression");return{value:J,modified:Z,warnings:Q}}function qJ(q,Q={}){return q.map((J)=>y(J,Q))}function Bq(q){let Q={};for(let[J,Z]of Object.entries(q)){if(!d.isValidVariableName(J))continue;if(typeof Z==="string"){let $=y(Z);Q[J]=$.value}else if(Array.isArray(Z))Q[J]=Z.map(($)=>typeof $==="string"?y($).value:$);else if(typeof Z==="object"&&Z!==null)Q[J]=Bq(Z);else Q[J]=Z}return Q}var JJ={maxSanitizeDepth:10,allowBracketNotation:!1},_q={...JJ};var Fq=[/\b(eval|Function|setTimeout|setInterval|setImmediate)\b/,/\b(process|require|import|exports|module)\b/,/\b(window|document|global|globalThis)\b/,/\b(constructor|prototype|__proto__)\b/,/\b(Reflect|Proxy)\b/,/\bSymbol\b/,/\b(WeakMap|WeakSet|WeakRef|FinalizationRegistry)\b/,/\b(Generator|AsyncGenerator)\b/,/__\w+__/,/\.(bind|call|apply)\s*\(/,/\bnew\s+/,/\bdelete\s+/,/\bthis\b/],QJ=new Set(["eval","Function","setTimeout","setInterval","setImmediate","process","require","import","exports","module","window","document","global","globalThis","constructor","prototype","Reflect","Proxy","Symbol","WeakMap","WeakSet","WeakRef","FinalizationRegistry","Generator","AsyncGenerator","delete","this"]),Uq=new Set(["__proto__","constructor","prototype"]),ZJ=/[\w)\]]\s*\[\s*['"]/;function $J(q){let Q="",J=null,Z=!1;for(let $=0;$<q.length;$++){let W=q[$];if(Z){Z=!1;continue}if(W==="\\"&&J){Z=!0;continue}if(J){if(J==="`"&&W==="$"&&$+1<q.length&&q[$+1]==="{"){let H=1;$+=2;while($<q.length&&H>0){if(q[$]==="{")H++;else if(q[$]==="}")H--;if(H>0)Q+=q[$],$++}continue}if(W===J)J=null;continue}if(W==='"'||W==="'"||W==="`"){J=W;continue}Q+=W}return Q}function XJ(q,Q){let J=/[$A-Z_a-z][$\w]*/g,Z;while((Z=J.exec(q))!==null){let $=Z[0],W=q[Z.index-1];if(QJ.has($))throw Error(`Potentially unsafe expression (matched /\\b${$}\\b/; identifier ${$}): ${Q}`);if(W==="."&&Uq.has($))throw Error(`Potentially unsafe expression (matched /.${$}/; property ${$}): ${Q}`)}}function WJ(q){let Q=/\[\s*(['"])(.*?)\1\s*\]/g,J;while((J=Q.exec(q))!==null){let Z=J[2];if(!Uq.has(Z))continue;let $=q.slice(0,J.index).match(/\S(?=\s*$)/)?.[0],W=q.slice(J.index+J[0].length).match(/^\s*(\S)/)?.[1];if(!(($==="{"||$===",")&&W===":"))throw Error(`Potentially unsafe expression (bracket key ${J[2]}): ${q}`)}}function Mq(q){let Q=q.trim(),J=$J(Q);XJ(J,Q),WJ(Q);for(let Z of Fq)if(Z.test(J))throw Error(`Potentially unsafe expression (matched /${Z.source}/): ${Q}`);if(!_q.allowBracketNotation&&ZJ.test(Q))throw Error(`Bracket notation with strings not allowed: ${Q}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Q}function YJ(q){let Q={};Q.Math=Math,Q.JSON=JSON,Q.Date=Date,Q.String=String,Q.Number=Number,Q.Boolean=Boolean,Q.Array=Array,Q.parseInt=Number.parseInt,Q.parseFloat=Number.parseFloat,Q.isNaN=Number.isNaN,Q.isFinite=Number.isFinite,Q.encodeURIComponent=encodeURIComponent,Q.decodeURIComponent=decodeURIComponent;for(let[J,Z]of Object.entries(q)){if(J.startsWith("__")||Fq.some(($)=>$.test(J)))continue;if(Z&&typeof Z==="object"&&!Array.isArray(Z))Q[J]=p(Z);else Q[J]=Z}return Q}function p(q,Q=0){if(Q>=_q.maxSanitizeDepth)return"[Object too deep]";if(q===null||typeof q!=="object")return q;if(Array.isArray(q))return q.map((Z)=>p(Z,Q+1));if(q instanceof Date||q instanceof RegExp||q instanceof Map||q instanceof Set||q instanceof Error)return q;let J={};for(let[Z,$]of Object.entries(q)){if(Z.startsWith("__")||Z==="constructor"||Z==="prototype")continue;if($&&typeof $==="object")J[Z]=p($,Q+1);else J[Z]=$}return J}function HJ(q,Q){try{let J=YJ(Q),Z=Object.keys(J),$=Object.values(J);return FJ(q,Z)(...$)}catch{return}}function OQ(q){try{return Mq(q),!0}catch{return!1}}function m(q,Q){try{let J=HJ(q,Q);if(J&&typeof J==="object"&&!Array.isArray(J))return J;return{}}catch{return{}}}var wq=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with","yield","let","static","implements","interface","package","private","protected","public","arguments","eval","await"]),GJ=2000,v=new Map;function BJ(q,Q){let J=`${q.join(",")}\x00${Q}`,Z=v.get(J);if(Z)return Z;let $=Function(...q,Q);if(v.size>=GJ)v.clear();return v.set(J,$),$}function jQ(q){return q.replace(/'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*`/g," ").replace(/\??\.\s*[a-zA-Z_$][\w$]*/g," ").replace(/([{,]\s*)[a-zA-Z_$][\w$]*(\s*:)/g,"$1$2").match(/\b[a-zA-Z_$][\w$]*\b/g)||[]}var VJ=/^[A-Za-z_$][\w$]*$/;function _J(q){return VJ.test(q)&&!wq.has(q)}function FJ(q,Q){let J=Mq(q),Z=[];for(let G=0;G<Q.length;G++){if(!_J(Q[G]))continue;Z.push({key:Q[G],index:G})}Z.sort((G,V)=>G.key.localeCompare(V.key));let $=Z.map((G)=>G.key),W=Z.map((G)=>G.index),H=(G)=>BJ([...$,...G],`
|
|
36
|
+
'use strict';
|
|
37
|
+
try {
|
|
38
|
+
return ${J};
|
|
39
|
+
}
|
|
40
|
+
catch (e) {
|
|
41
|
+
if (e instanceof TypeError) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
throw e;
|
|
45
|
+
}
|
|
46
|
+
`),Y=H([]),X=Z.every((G,V)=>G.index===V);if($.length===Q.length&&X)return Vq(Y,$,H);return Vq((...G)=>{let V=Array(W.length);for(let _=0;_<W.length;_++)V[_]=G[W[_]];return Y(...V)},$,H,(G)=>{Y=H(G)})}function Vq(q,Q,J,Z){let W=/^(\w+) is not defined$/,H=q,Y=[],X=new Set(Q);return(...B)=>{for(let G=0;G<=8;G++)try{return H(...B)}catch(V){let _=V instanceof Error?V.message:"",M=W.exec(_);if(!(V instanceof ReferenceError)||!M)return;let U=M[1];if(X.has(U)||wq.has(U))return;if(X.add(U),Y.push(U),Z)Z(Y);else H=J(Y)}return}}function DQ(q){let Q=q.trim(),J=[/\beval\s*\(/i,/\bFunction\s*\(/i,/\bimport\s*\(/i,/\brequire\s*\(/i,/\bprocess\b/i,/\b__proto__\b/i,/\bconstructor\s*[.(]/i,/\bglobalThis\b/i,/\bwindow\b/i,/\bdocument\b/i,/\bfetch\s*\(/i,/\bBun\b/i,/\bDeno\b/i,/\bconsole\b/i,/\bthis\b/i,/\bReflect\b/i,/\bProxy\b/i,/\bprototype\b/i,/\.(bind|call|apply)\s*\(/i];for(let Z of J)if(Z.test(Q))return!1;return!0}import l from"path";var k;async function UJ(){if(k!==void 0)return k;try{k=(await import("@stacksjs/ts-i18n")).loadLocale??null}catch{k=null}return k}var r={defaultLocale:"en",locale:"en",translationsDir:"translations",format:"yaml",fallbackToKey:!0,cache:!0},K={},D={},I={};function RQ(q){if(q)delete K[q];else for(let Q of Object.keys(K))delete K[Q]}function TQ(){let q=Object.entries(K).map(([Q,J])=>({locale:Q,loadedAt:new Date(J.loadedAt),keyCount:jq(J.translations)}));return{size:Object.keys(K).length,locales:Object.keys(K),entries:q}}function jq(q,Q=0){for(let J of Object.values(q))if(Q++,J&&typeof J==="object"&&!Array.isArray(J))Q=jq(J,Q);return Q}function MJ(q,Q=0){if(Q<=0)return!1;return Date.now()-q.loadedAt>Q}function EQ(q){if(K[q])return"loaded";return I[q]||"idle"}function kQ(q){return I[q]==="loading"}function SQ(q){return!!K[q]}async function wJ(q,Q){let{locales:J,parallel:Z=!0,priority:$={},onLocaleLoaded:W,onComplete:H,onError:Y}=q,X=Z?J:[...J].sort((B,G)=>($[G]||0)-($[B]||0));if(Z){let B=X.map(async(G)=>{try{await x(G,Q),W?.(G)}catch(V){Y?.(G,V instanceof Error?V:Error(String(V)))}});await Promise.all(B)}else for(let B of X)try{await x(B,Q),W?.(B)}catch(G){Y?.(B,G instanceof Error?G:Error(String(G)))}H?.()}function PQ(q,Q){queueMicrotask(()=>{wJ(q,Q).catch((J)=>{if(Q.debug)console.error("Background preload error:",J)})})}async function x(q,Q){if({...r,...Q.i18n}.cache&&K[q]){let $=K[q],W=Q.i18n?.cacheMaxAge??0;if(!MJ($,W))return $.translations}if(D[q]?.state==="loading")return D[q].promise;I[q]="loading";let Z=s(q,Q).then(($)=>{return I[q]="loaded",delete D[q],$}).catch(($)=>{throw I[q]="error",D[q]={promise:Z,state:"error",error:$ instanceof Error?$:Error(String($))},$});return D[q]={promise:Z,state:"loading"},Z}function KJ(q){return K[q]?.translations}async function LQ(q,Q){let J=KJ(q);if(J)return J;return x(q,Q)}async function bQ(q,Q){if(K[q])return K[q].translations;if(D[q]){if(Q)return Promise.race([D[q].promise,new Promise((J,Z)=>setTimeout(()=>Z(Error(`Timeout waiting for locale: ${q}`)),Q))]);return D[q].promise}throw Error(`Locale "${q}" is not loading. Call loadTranslationLazy first.`)}function CQ(){return Object.entries(I).filter(([q,Q])=>Q==="loading").map(([q])=>q)}function yQ(q){if(q)delete D[q],delete I[q];else{for(let Q of Object.keys(D))delete D[Q];for(let Q of Object.keys(I))delete I[Q]}}async function s(q,Q){let J={...r,...Q.i18n},Z=l.isAbsolute(J.translationsDir)?J.translationsDir:l.resolve(Q.root||process.cwd(),J.translationsDir);try{let $=await UJ(),W=$?await $(q,{translationsDir:Z,defaultLocale:J.defaultLocale,sources:IJ(J.format)}):await OJ(q,J,Z);if(W===void 0){if(q!==J.defaultLocale)return s(J.defaultLocale,Q);return{}}let H=W;if(J.cache)K[q]={translations:H,loadedAt:Date.now(),locale:q};return H}catch($){if(Q.debug)console.error(`Error loading translation file for locale "${q}":`,$);if(q!==J.defaultLocale)return s(J.defaultLocale,Q);return{}}}async function OJ(q,Q,J){let Z=l.join(J,`${q}${jJ(Q.format)}`);try{let $=await import(Z);return $.default||$}catch($){try{let W=await Bun.file(Z).text();if(Q.format==="yaml"||Q.format==="yml")return DJ(W);if(Q.format==="json")return JSON.parse(W);throw $}catch{return}}}function jJ(q){switch(q){case"yaml":return".yaml";case"yml":return".yml";case"js":return".js";case"ts":return".ts";case"json":default:return".json"}}function DJ(q){let Q={},J=q.split(`
|
|
47
|
+
`),Z=[{obj:Q,indent:-1}];for(let $ of J){let W=$.replace(/#.*$/,"").trimEnd();if(!W.trim())continue;let H=W.search(/\S/);if(H===-1)continue;while(Z.length>1&&Z[Z.length-1].indent>=H)Z.pop();let Y=Z[Z.length-1].obj,X=W.match(/^(\s*)(\S[^:]*):\s*(.*)$/);if(X){let[,,B,G]=X,V=B.trim(),_=G.trim();if(_==="")Y[V]={},Z.push({obj:Y[V],indent:H});else Y[V]=zJ(_)}}return Q}function zJ(q){if(q.startsWith("'")&&q.endsWith("'")||q.startsWith('"')&&q.endsWith('"'))return q.slice(1,-1);let Q=q.toLowerCase();if(Q==="true"||Q==="yes")return!0;if(Q==="false"||Q==="no")return!1;if(Q==="null"||Q==="~")return null;let J=Number(q);if(!Number.isNaN(J)&&q!=="")return J;return q}function IJ(q){switch(q){case"yaml":case"yml":return["yaml"];case"js":case"ts":return["ts"];case"json":default:return["json"]}}async function AJ(q,Q){return x(q,Q)}function NJ(q,Q){for(let J of q){let Z=J.trim(),$=Z.match(/^\{(\d+)\}\s*(.*)$/);if($){let H=Number.parseInt($[1],10);if(Q===H)return $[2];continue}let W=Z.match(/^\[(\d+),(\d+|\*)\]\s*(.*)$/);if(W){let H=Number.parseInt(W[1],10),Y=W[2]==="*"?Number.POSITIVE_INFINITY:Number.parseInt(W[2],10);if(Q>=H&&Q<=Y)return W[3];continue}}if(q.length===2)return Q===1?q[0].trim():q[1].trim();if(Q<q.length)return q[Q].trim();return q[q.length-1].trim()}function RJ(q,Q={}){return Dq(q,Q)}function Dq(q,Q){let J="",Z=0;while(Z<q.length)if(q[Z]==="{"){let $=TJ(q,Z);if($===-1){J+=q[Z],Z++;continue}let W=q.slice(Z+1,$);J+=EJ(W,Q),Z=$+1}else if(q[Z]==="'"&&Z+1<q.length)if(q[Z+1]==="'")J+="'",Z+=2;else if(q[Z+1]==="{"||q[Z+1]==="}")J+=q[Z+1],Z+=2;else J+=q[Z],Z++;else J+=q[Z],Z++;return J}function TJ(q,Q){let J=0;for(let Z=Q;Z<q.length;Z++)if(q[Z]==="{")J++;else if(q[Z]==="}"){if(J--,J===0)return Z}return-1}function EJ(q,Q){let J=kJ(q);if(J.length===0)return`{${q}}`;let Z=J[0].trim(),$=Q[Z];if(J.length===1)return $!==void 0?String($):`{${Z}}`;switch(J[1].trim().toLowerCase()){case"plural":return SJ($,J.slice(2).join(","),Q);case"select":return LJ($,J.slice(2).join(","));case"selectordinal":return bJ($,J.slice(2).join(","));case"number":return yJ($,J[2]?.trim());case"date":return vJ($,J[2]?.trim());case"time":return xJ($,J[2]?.trim());default:return $!==void 0?String($):`{${q}}`}}function kJ(q){let Q=[],J="",Z=0;for(let $=0;$<q.length;$++){let W=q[$];if(W==="{")Z++,J+=W;else if(W==="}")Z--,J+=W;else if(W===","&&Z===0)Q.push(J),J="";else J+=W}if(J)Q.push(J);return Q}function SJ(q,Q,J){let Z=Number(q)||0,$=n(Q),W=`=${Z}`;if($[W])return c($[W],Z,J);let H=PJ(Z);if($[H])return c($[H],Z,J);if($.other)return c($.other,Z,J);return String(Z)}function c(q,Q,J){let Z=q.replace(/#/g,String(Q));return Dq(Z,J)}function PJ(q){let Q=Math.abs(q),J=Math.floor(Q),Z=String(q).includes(".")?String(q).split(".")[1].length:0;if(J===1&&Z===0)return"one";return"other"}function LJ(q,Q){let J=String(q||""),Z=n(Q);if(Z[J])return Z[J];return Z.other||String(q)}function bJ(q,Q){let J=Number(q)||0,Z=n(Q),$=CJ(J);if(Z[$])return Z[$].replace(/#/g,String(J));if(Z.other)return Z.other.replace(/#/g,String(J));return String(J)}function CJ(q){let Q=Math.abs(q),J=Q%10,Z=Q%100;if(J===1&&Z!==11)return"one";if(J===2&&Z!==12)return"two";if(J===3&&Z!==13)return"few";return"other"}function n(q){let Q={},J=/(\w+|=\d+)\s*\{([^{}]*(?:\{[^{}]*\}[^{}]*)*)\}/g,Z=J.exec(q);while(Z!==null)Q[Z[1]]=Z[2],Z=J.exec(q);return Q}function yJ(q,Q){let J=Number(q);if(Number.isNaN(J))return String(q);switch(Q){case"integer":return Math.floor(J).toLocaleString();case"percent":return`${(J*100).toFixed(0)}%`;case"currency":return J.toLocaleString(void 0,{style:"currency",currency:"USD"});default:return J.toLocaleString()}}function vJ(q,Q){let J=q instanceof Date?q:new Date(String(q));if(Number.isNaN(J.getTime()))return String(q);let Z={};switch(Q){case"short":Z.dateStyle="short";break;case"medium":Z.dateStyle="medium";break;case"long":Z.dateStyle="long";break;case"full":Z.dateStyle="full";break;default:Z.dateStyle="medium"}return J.toLocaleDateString(void 0,Z)}function xJ(q,Q){let J=q instanceof Date?q:new Date(String(q));if(Number.isNaN(J.getTime()))return String(q);let Z={};switch(Q){case"short":Z.timeStyle="short";break;case"medium":Z.timeStyle="medium";break;case"long":Z.timeStyle="long";break;case"full":Z.timeStyle="full";break;default:Z.timeStyle="short"}return J.toLocaleTimeString(void 0,Z)}function gJ(q){return/\{[^}]+,\s*(?:plural|select|selectordinal|number|date|time)\s*,/.test(q)}function i(q,Q,J=!0,Z={}){let $=q.split("."),W=Q;for(let Y of $){if(W===void 0||W===null)break;W=W[Y]}if(W===void 0||W===null)return J?q:"";let H=String(W);if(gJ(H))return RJ(H,Z);if(H.includes("|")&&"count"in Z){let Y=Number(Z.count),X=H.split("|");H=NJ(X,Y)}for(let[Y,X]of Object.entries(Z)){let B=Y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");H=H.replace(new RegExp(`:${B}`,"g"),String(X))}return H}var Kq=new Set(["ar","arc","ckb","dv","fa","he","khw","ks","nqo","prs","ps","sd","syr","ug","ur","uz-af","yi"]),fJ=new Set(["adlm","arab","aran","hebr","nkoo","rohg","syrc","thaa","yezi"]);function o(q){if(!q)return"ltr";let Q=q.trim().toLowerCase().replace(/_/g,"-").split("-"),J=Q[0];if(!J)return"ltr";let Z=Q[1]?.length===4?Q[1]:void 0;if(Z)return fJ.has(Z)?"rtl":"ltr";if(Q.length>1&&Kq.has(`${J}-${Q[1]}`))return"rtl";return Kq.has(J)?"rtl":"ltr"}function vQ(q){return o(q)==="rtl"}async function xQ(q,Q,J,Z){let $=q,W=/@translate\(\s*['"]([^'"]+)['"]\s*(?:,\s*(\{[^}]*\})\s*)?\)([\s\S]*?)@endtranslate/g,H={...r,...Z.i18n},Y=await AJ(H.locale,Z);Q.__translations=Y,Q.__locale=H.locale,Q.__i18nConfig=H,$=await Oq($,W,async(G,V,_,M,U)=>{try{let w={};if(_)try{let F=[()=>JSON.parse(_),()=>{let z=`{"data":${_}}`,T=JSON.parse(z);return typeof T.data==="object"?T.data:{}},()=>{return m(_,Q)}];for(let z of F)try{if(w=z(),Object.keys(w).length>0)break}catch{}}catch(F){if(Z.debug)console.error("Error parsing parameters for @translate directive:",F)}return i(V,Y,H.fallbackToKey,w)||M.trim()}catch(w){if(Z.debug)console.error("Error processing @translate directive:",w);return C("Translate",`Error in @translate('${V}'): ${w instanceof Error?w.message:String(w)}`,j.EVALUATION_ERROR)}});let X=/@translate\(\s*['"]([^'"]+)['"]\s*(?:,\s*(\{[^}]+\})\s*)?\)/g;if(Z.debug){console.warn(`Processing translations in template. Sections: ${$.includes("<h2>Translation with Parameters</h2>")?"Parameters section found":"Parameters section missing"}`);let G=[...$.matchAll(X)];console.warn(`Found ${G.length} @translate matches`),G.forEach((V,_)=>console.warn(`Match ${_}: ${V[0]}, Key: ${V[1]}, Params: ${V[2]||"none"}`))}return $=await Oq($,/@translate\(\s*['"]([^'"]+)['"]\s*(?:,\s*(\{[^}]*\})\s*)?\)/g,async(G,V,_,M)=>{try{let U={};if(_)try{let w=[()=>JSON.parse(_),()=>{let O=`{"data":${_}}`,F=JSON.parse(O);return typeof F.data==="object"?F.data:{}},()=>{return m(_,Q)}];for(let O of w)try{if(U=O(),Object.keys(U).length>0)break}catch{}}catch(w){if(Z.debug)console.error("Error parsing parameters for @translate directive:",w)}return i(V,Y,H.fallbackToKey,U)}catch(U){if(Z.debug)console.error("Error processing @translate directive:",U);return C("Translate",`Error in @translate('${V}'): ${U instanceof Error?U.message:String(U)}`,j.EVALUATION_ERROR)}}),$}async function Oq(q,Q,J){let Z=[];return q.replace(Q,(W,...H)=>{let Y=J(W,...H).then((X)=>({match:W,replacement:X}));return Z.push(Y),W}),(await Promise.all(Z)).reduce((W,{match:H,replacement:Y})=>W.replace(H,Y),q)}function gQ(q,Q=!0){return(J,Z={})=>{return i(J,q,Q,Z)}}import zq from"path";function a(q,Q){if(!q||o(q)!=="rtl")return!1;return!Q||Q.trim().toLowerCase()!=="rtl"}function Aq(q){if(!q)return!1;return q.trim().split(/\s+/)[0]?.toLowerCase()==="presentation"||q.trim().split(/\s+/)[0]?.toLowerCase()==="none"}function S(q,Q){let J=new RegExp(`\\b${Q}\\s*=\\s*("([^"]*)"|'([^']*)'|([^\\s>]+))`,"i").exec(q);if(!J)return null;return J[2]??J[3]??J[4]??null}function pQ(q,Q,J,Z){let $=q;$=$.replace(/@a11y\(\s*['"]([^'"]+)['"]\s*(?:,\s*['"]([^'"]+)['"]\s*)?\)/g,(H,Y,X)=>{let G={"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"}[Y]||"Make this element accessible";return`<!-- a11y-hint: ${X||G} -->`});let W=/@screenReader\(([^@]*)\)@endScreenReader/g;return $=$.replace(W,(H,Y)=>{return`<span class="sr-only">${Y.trim()}</span>`}),$=$.replace(/@ariaDescribe\(\s*['"]([^'"]+)['"]\s*,\s*['"]([^'"]+)['"]\s*\)/g,(H,Y,X)=>{return`<span id="${`desc-${Y}`}" class="sr-only">${X}</span>`}),$}function mQ(){return`
|
|
48
|
+
.sr-only {
|
|
49
|
+
position: absolute;
|
|
50
|
+
width: 1px;
|
|
51
|
+
height: 1px;
|
|
52
|
+
padding: 0;
|
|
53
|
+
margin: -1px;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
clip: rect(0, 0, 0, 0);
|
|
56
|
+
white-space: nowrap;
|
|
57
|
+
border-width: 0;
|
|
58
|
+
}
|
|
59
|
+
`.trim()}function hJ(){return typeof globalThis.document<"u"&&typeof globalThis.document.createElement==="function"}function Nq(q){let Q=new Map,J=q.replace(/<(\/?)([A-Z][\w:.-]*)(?=[\s/>])/g,($,W,H)=>{let Y=Q.get(H);if(!Y)Y=`stx-a11y-component-${Q.size}`,Q.set(H,Y);return`<${W}${Y}`}),Z=new Map([...Q.entries()].map(([$,W])=>[W,$]));return{protectedSource:J,restore:($)=>$.replace(/<(\/?)(stx-a11y-component-\d+)(?=[\s/>])/g,(W,H,Y)=>{let X=Z.get(Y);return X?`<${H}${X}`:W})}}function uJ(q,Q){let J=[],Z=/<img\s+([^>]*)>/gi,$;$=Z.exec(q);while($!==null){let F=$[1];if(!/\balt\s*=/i.test(F))J.push({type:"missing-alt",element:$[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/"});$=Z.exec(q)}let W=/<button([^>]*)>\s*<\/button>/gi;$=W.exec(q);while($!==null){let F=$[1];if(!/\baria-label\s*=/i.test(F)&&!/\btitle\s*=/i.test(F))J.push({type:"missing-accessible-name",element:$[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/"});$=W.exec(q)}let H=/<a\s+([^>]*)>\s*<\/a>/gi;$=H.exec(q);while($!==null){let F=$[1];if(!/\baria-label\s*=/i.test(F)&&!/\btitle\s*=/i.test(F))J.push({type:"link-missing-text",element:$[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"});$=H.exec(q)}let Y=/<(input|select|textarea)\s+([^>]*)>/gi;$=Y.exec(q);while($!==null){let F=$[2];if(/\btype\s*=\s*["']hidden["']/i.test(F)){$=Y.exec(q);continue}let z=/\baria-label\s*=/i.test(F)||/\baria-labelledby\s*=/i.test(F),T=F.match(/\bid\s*=\s*["']([^"']+)["']/i);if(!z){let Rq=T&&new RegExp(`<label[^>]*\\bfor\\s*=\\s*["']${T[1]}["']`,"i").test(q),t=$.index,e=q.substring(0,t),rJ=q.substring(t),Tq=(e.match(/<label\b/gi)||[]).length,Eq=(e.match(/<\/label>/gi)||[]).length,kq=Tq>Eq;if(!Rq&&!kq)J.push({type:"input-missing-label",element:$[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/"})}$=Y.exec(q)}let X=/<h([1-6])[^>]*>/gi,B=[];$=X.exec(q);while($!==null)B.push(Number.parseInt($[1],10)),$=X.exec(q);let G=0;for(let F of B){if(G>0&&F>G+1)J.push({type:"heading-skip",element:`<h${F}>`,message:`Heading level skipped from h${G} to h${F}`,impact:"moderate",help:"Maintain proper heading hierarchy without skipping levels",helpUrl:"https://web.dev/learn/accessibility/structure/"});G=F}if(/<html\b/i.test(q)&&!/<html[^>]*\slang\s*=/i.test(q))J.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 V=q.match(/<html\b([^>]*)>/i);if(V&&a(S(V[1],"lang"),S(V[1],"dir")))J.push({type:"missing-dir",element:V[0].substring(0,100),message:'Document language is right-to-left but dir="rtl" is not set',impact:"serious",help:'Add dir="rtl" to the html element so the layout mirrors the text',helpUrl:"https://www.w3.org/International/questions/qa-html-dir"});let _=/<table([^>]*)>([\s\S]*?)<\/table>/gi;$=_.exec(q);while($!==null){let F=$[2];if(!Aq(S($[1],"role"))&&!/<th\b/i.test(F))J.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"});$=_.exec(q)}let M=/<(video|audio)[^>]*\sautoplay\s[^>]*>/gi;$=M.exec(q);while($!==null){if(!/\bmuted\b/i.test($[0]))J.push({type:"autoplay-audio",element:`<${$[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"});$=M.exec(q)}let U=/\btabindex\s*=\s*["']([1-9]\d*)["']/gi;$=U.exec(q);while($!==null)J.push({type:"positive-tabindex",element:`tabindex="${$[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"}),$=U.exec(q);let w=/<iframe\s+([^>]*)>/gi;$=w.exec(q);while($!==null){let F=$[1];if(!/\btitle\s*=/i.test(F)&&!/\baria-label\s*=/i.test(F))J.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"});$=w.exec(q)}let O=/<([a-z]+)\s+([^>]*role\s*=\s*["']button["'][^>]*)>/gi;$=O.exec(q);while($!==null){let F=$[1].toLowerCase(),z=$[2];if(F!=="button"&&!/\btabindex\s*=/i.test(z))J.push({type:"button-not-focusable",element:$[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/"});$=O.exec(q)}return J}async function dJ(q,Q){let{protectedSource:J}=Nq(q);if(!hJ())return uJ(J,Q);let Z=[];try{let $=globalThis.document.createElement("div");$.innerHTML=J,$.querySelectorAll("img").forEach((X)=>{if(!X.hasAttribute("alt"))Z.push({type:"missing-alt",element:`<${X.outerHTML}>`,message:"Image missing alt attribute",impact:"serious",help:"Add alt text to images for screen readers",helpUrl:"https://web.dev/learn/accessibility/images/"})}),$.querySelectorAll('button, a, [role="button"]').forEach((X)=>{if(!(X.hasAttribute("aria-label")||X.hasAttribute("aria-labelledby")||X.textContent&&X.textContent.trim().length>0))Z.push({type:"missing-accessible-name",element:`<${X.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/"})}),$.querySelectorAll("input, select, textarea").forEach((X)=>{let B=X.getAttribute("id"),G=B&&$.querySelector(`label[for="${B}"]`),V=X.hasAttribute("aria-label")||X.hasAttribute("aria-labelledby"),_=X.closest("label")!==null;if(!G&&!V&&!_)Z.push({type:"input-missing-label",element:`<${X.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 W=Array.from($.querySelectorAll("h1, h2, h3, h4, h5, h6")),H=0;for(let X of W){let B=Number.parseInt(X.tagName.charAt(1));if(H>0&&B>H+1)Z.push({type:"heading-skip",element:`<${X.outerHTML}>`,message:`Heading level skipped from h${H} to h${B}`,impact:"moderate",help:"Maintain proper heading hierarchy without skipping levels",helpUrl:"https://web.dev/learn/accessibility/structure/"});H=B}let Y=$.querySelector("html");if(J.includes("<html")&&Y&&!Y.hasAttribute("lang"))Z.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(Y&&a(Y.getAttribute("lang"),Y.getAttribute("dir")))Z.push({type:"missing-dir",element:"<html>",message:'Document language is right-to-left but dir="rtl" is not set',impact:"serious",help:'Add dir="rtl" to the html element so the layout mirrors the text',helpUrl:"https://www.w3.org/International/questions/qa-html-dir"});if($.querySelectorAll("a").forEach((X)=>{let B=X.textContent&&X.textContent.trim().length>0,G=X.hasAttribute("aria-label")||X.hasAttribute("aria-labelledby"),V=X.hasAttribute("title"),_=X.querySelector("img[alt]");if(!B&&!G&&!V&&!_)Z.push({type:"link-missing-text",element:`<${X.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"})}),J.includes("<nav")||J.includes("<header")){if(!$.querySelector('a[href="#main"], a[href="#content"], .skip-link, [class*="skip"]')&&$.querySelectorAll("a").length>5)Z.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($.querySelectorAll("table").forEach((X)=>{if(Aq(X.getAttribute("role")))return;let B=X.querySelector("caption");if(!X.querySelector("th"))Z.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(!B&&!X.hasAttribute("aria-label")&&!X.hasAttribute("aria-labelledby"))Z.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"})}),$.querySelectorAll('[style*="color"]').forEach((X)=>{let B=X.getAttribute("style")||"";if(B.includes("color:")&&!B.includes("background"))Z.push({type:"potential-contrast-issue",element:`<${X.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/"})}),$.querySelectorAll("video[autoplay], audio[autoplay]").forEach((X)=>{if(!X.hasAttribute("muted"))Z.push({type:"autoplay-audio",element:`<${X.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"})}),$.querySelectorAll("[tabindex]").forEach((X)=>{if(Number.parseInt(X.getAttribute("tabindex")||"0")>0)Z.push({type:"positive-tabindex",element:`<${X.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"})}),$.querySelectorAll('[role="button"]').forEach((X)=>{if(!X.hasAttribute("tabindex"))Z.push({type:"button-not-focusable",element:`<${X.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/"})}),J.includes("<body")&&!$.querySelector('main, [role="main"]'))Z.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"});$.querySelectorAll("iframe").forEach((X)=>{if(!X.hasAttribute("title")&&!X.hasAttribute("aria-label"))Z.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($){console.error(`Error checking accessibility in ${Q}:`,$)}return Z}async function pJ(q,Q={}){let J={},{recursive:Z=!0,ignorePaths:$=[]}=Q,W=Array.isArray(q)?q:[q],H=await Iq(W,{recursive:Z,ignorePaths:$}),Y=[];for(let X of H)try{let B=await Bun.file(X).text();if(X.endsWith("good-a11y.stx"))continue;let G=await dJ(B,X);if(Y.push(X),G.length>0)J[X]=G}catch(B){console.error(`Error scanning ${X}:`,B)}return{results:J,scannedFiles:Y}}async function cQ(q,Q={}){return(await pJ(q,Q)).results}var mJ={fixMissingAlt:!0,fixMissingLabels:!0,fixMissingFormLabels:!0,fixTableHeaders:!0,fixMissingLang:!0,fixMissingDir:!0,fixPositiveTabindex:!0,fixButtonFocusable:!0,defaultLang:"en"};function cJ(q,Q={}){let J={...mJ,...Q},Z=[],{protectedSource:$,restore:W}=Nq(q),H=$;if(J.fixMissingAlt)H=H.replace(/<img([^>]*?)(?<!\balt\s*=\s*["'][^"']*["'])(\s*\/?>)/gi,(Y,X,B)=>{if(/\balt\s*=/i.test(X))return Y;let G=Y,V=`<img${X} alt=""${B}`;return Z.push({type:"missing-alt",description:"Added empty alt attribute to image",before:G,after:V}),V});if(J.fixMissingLabels)H=H.replace(/<button([^>]*)>\s*<\/button>/gi,(Y,X)=>{if(/\baria-label\s*=/i.test(X)||/\btitle\s*=/i.test(X))return Y;let B=Y,G=`<button${X} aria-label="Button"></button>`;return Z.push({type:"missing-accessible-name",description:"Added aria-label to empty button",before:B,after:G}),G}),H=H.replace(/<a([^>]*)>\s*(<(?:i|span|svg)[^>]*(?:class="[^"]*icon[^"]*")?[^>]*>.*?<\/(?:i|span|svg)>)?\s*<\/a>/gi,(Y,X,B)=>{if(/\baria-label\s*=/i.test(X)||/\btitle\s*=/i.test(X))return Y;if(!B&&Y.replace(/<a[^>]*>|<\/a>/gi,"").trim())return Y;let G=Y,V=`<a${X} aria-label="Link">${B||""}</a>`;return Z.push({type:"missing-accessible-name",description:"Added aria-label to link without text",before:G,after:V}),V});if(J.fixMissingFormLabels)H=H.replace(/<(input|select|textarea)([^>]*)>/gi,(Y,X,B)=>{if(/\baria-label\s*=/i.test(B)||/\baria-labelledby\s*=/i.test(B))return Y;if(/\btype\s*=\s*["']hidden["']/i.test(B))return Y;let G=B.match(/\bname\s*=\s*["']([^"']+)["']/i),V=B.match(/\bid\s*=\s*["']([^"']+)["']/i),_=G?.[1]||V?.[1]||X,M=Y,U=`<${X}${B} aria-label="${_}">`;return Z.push({type:"input-missing-label",description:`Added aria-label to ${X} element`,before:M,after:U}),U});if(J.fixMissingLang)H=H.replace(/<html([^>]*)>/gi,(Y,X)=>{if(/\blang\s*=/i.test(X))return Y;let B=Y,G=`<html${X} lang="${J.defaultLang}">`;return Z.push({type:"missing-lang",description:`Added lang="${J.defaultLang}" to html element`,before:B,after:G}),G});if(J.fixMissingDir)H=H.replace(/<html([^>]*)>/gi,(Y,X)=>{let B=S(X,"lang");if(!a(B,S(X,"dir")))return Y;let G=/\bdir\s*=/i.test(X)?`<html${X.replace(/\bdir\s*=\s*(["'])[^"']*\1/i,'dir="rtl"')}>`:`<html${X} dir="rtl">`;return Z.push({type:"missing-dir",description:`Added dir="rtl" to html element (lang="${B}" is right-to-left)`,before:Y,after:G}),G});if(J.fixPositiveTabindex)H=H.replace(/\btabindex\s*=\s*["']([1-9]\d*)["']/gi,(Y,X)=>{let B=Y,G='tabindex="0"';return Z.push({type:"positive-tabindex",description:`Changed tabindex="${X}" to tabindex="0"`,before:B,after:'tabindex="0"'}),'tabindex="0"'});if(J.fixButtonFocusable)H=H.replace(/<([a-z]+)(\s[^>]*role\s*=\s*["']button["'][^>]*)>/gi,(Y,X,B)=>{if(/\btabindex\s*=/i.test(B))return Y;if(X.toLowerCase()==="button")return Y;let G=Y,V=`<${X}${B} tabindex="0">`;return Z.push({type:"button-not-focusable",description:'Added tabindex="0" to element with role="button"',before:G,after:V}),V});if(J.fixTableHeaders)H=H.replace(/<th([^>]*)>/gi,(Y,X)=>{if(/\bscope\s*=/i.test(X))return Y;let B=Y,G=`<th${X} scope="col">`;return Z.push({type:"table-missing-scope",description:'Added scope="col" to table header',before:B,after:G}),G});return{original:q,fixed:W(H),fixCount:Z.length,fixes:Z}}async function lJ(q,Q={},J=!1){let Z=await Bun.file(q).text(),$=cJ(Z,Q);if(J&&$.fixCount>0)await Bun.write(q,$.fixed);return $}async function lQ(q,Q={},J={}){let Z={},{recursive:$=!0,ignorePaths:W=[],writeBack:H=!1,extensions:Y=[".stx",".html",".htm"]}=J,X=Y.length===1?`*${Y[0]}`:`*{${Y.join(",")}}`,B=zq.join(q,$?`**/${X}`:X),G=new Bun.Glob(B);for await(let V of G.scan()){if(W.some((M)=>V.includes(zq.normalize(M))))continue;try{let M=await lJ(V,Q,H);if(M.fixCount>0)Z[V]=M}catch(M){console.error(`Error fixing ${V}:`,M)}}return Z}var sJ={name:"a11y",handler:(q,Q,J,Z)=>{if(!Q.length)return q;let $=Q[0].replace(/['"]/g,""),W=Q.length>1?Q[1].replace(/['"]/g,""):"",Y={"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"}[$]||"Make this element accessible";return`<!-- a11y-hint: ${W||Y} -->${q}`},hasEndTag:!1},iJ={name:"screenReader",handler:(q)=>{return`<span class="sr-only">${q}</span>`},hasEndTag:!0};function sQ(){return[sJ,iJ]}
|
|
60
|
+
export{Pq as kr,Lq as lr,bq as mr,Cq as nr,Jq as or,yq as pr,j as qr,g as rr,vq as sr,E as tr,oJ as ur,gq as vr,L as wr,fq as xr,b as yr,A as zr,Zq as Ar,$q as Br,Xq as Cr,Wq as Dr,Yq as Er,f as Fr,C as Gr,cq as Hr,lq as Ir,sq as Jr,iq as Kr,rq as Lr,h as Mr,nq as Nr,oq as Or,d as Pr,y as Qr,tq as Rr,eq as Sr,qJ as Tr,Bq as Ur,Mq as Vr,HJ as Wr,OQ as Xr,m as Yr,jQ as Zr,_J as _r,FJ as $r,DQ as as,r as bs,RQ as cs,TQ as ds,EQ as es,kQ as fs,SQ as gs,wJ as hs,PQ as is,x as js,KJ as ks,LQ as ls,bQ as ms,CQ as ns,yQ as os,AJ as ps,RJ as qs,gJ as rs,i as ss,o as ts,vQ as us,xQ as vs,gQ as ws,Aq as xs,S as ys,pQ as zs,mQ as As,hJ as Bs,uJ as Cs,dJ as Ds,pJ as Es,cQ as Fs,cJ as Gs,lJ as Hs,lQ as Is,sJ as Js,iJ as Ks,sQ as Ls};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{ej as a,fj as b,gj as c,hj as d,ij as e,jj as f,kj as g,lj as h,mj as i,nj as j,oj as k,pj as l,qj as m,rj as n}from"./chunk-kdh37tp8.js";import"./chunk-y11cxbxd.js";import"./chunk-92mj1t26.js";import"./chunk-8mjdpr94.js";import"./chunk-pkaabd8h.js";import"./chunk-xpp135ad.js";import"./chunk-wrzwgkbx.js";import"./chunk-5kk8gsj2.js";import"./chunk-38ejahd9.js";import"./chunk-ypmqf7tm.js";import"./chunk-de7fye10.js";import"./chunk-v5e1gxwm.js";import"./chunk-b6ej2fdf.js";import"./chunk-x650vjcp.js";import"./chunk-qc1f74ek.js";export{i as streamingSuspenseDirective,m as streamToResponse,g as streamTemplateSimple,a as streamTemplate,d as renderStreamingPage,k as registerStreamingDirectives,e as processStreamDirectives,l as processSectionDirectives,j as islandDirective,n as generateHydrationRuntime,f as extractStreamBoundaries,h as createStreamRenderer,b as buildSuspenseResolveScript,c as SUSPENSE_RESOLVER_RUNTIME};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Xi as a,Yi as b,Zi as c}from"./chunk-z4jhj5e5.js";import"./chunk-9n0gvfrg.js";import"./chunk-y11cxbxd.js";import"./chunk-92mj1t26.js";import"./chunk-8mjdpr94.js";import"./chunk-pkaabd8h.js";import"./chunk-xpp135ad.js";import"./chunk-wrzwgkbx.js";import"./chunk-5kk8gsj2.js";import"./chunk-38ejahd9.js";import"./chunk-ypmqf7tm.js";import"./chunk-de7fye10.js";import"./chunk-v5e1gxwm.js";import"./chunk-b6ej2fdf.js";import"./chunk-x650vjcp.js";import"./chunk-qc1f74ek.js";export{a as listComposableModules,b as getComposableScript,c as clearComposableCache};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import z from"fs";function B(x){return[...x].sort().map((b)=>{try{let j=z.statSync(b);return`${b}:${j.size}:${j.mtimeMs}`}catch{return`${b}:missing`}}).join(`
|
|
3
|
+
`)}function C(x,b,j){let q=x.get(b);return q!==void 0&&q.signature===j?q.value:void 0}function D(x,b,j,q){return x.set(b,{signature:j,value:q}),q}
|
|
4
|
+
export{B as _i,C as $i,D as aj};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Gp as k,Hl as A,Il as D,Om as T,Pm as y,Qn as x,_l as B,am as F,bo as M,br as w,to as R}from"./chunk-y11cxbxd.js";import{gv as P}from"./chunk-qc1f74ek.js";function b(K){return K.endsWith(".md")||K.endsWith(".markdown")}function C(K){let z=[];_(/<pre\b[^>]*>[\s\S]*?<\/pre>/gi);let G=[...z];_(/<code\b[^>]*>[\s\S]*?<\/code>/gi,G);function _(J,X){let $;while(($=J.exec(K))!==null){let q=$.index,N=q+$[0].length;if(X?.some((Y)=>q>=Y.start&&N<=Y.end))continue;z.push({start:q,end:N})}}if(z.length===0)return K;z.sort((J,X)=>J.start-X.start);let U="",Q=0;for(let J of z){if(J.start<Q)continue;U+=K.slice(Q,J.start),U+=`@raw${K.slice(J.start,J.end)}@endraw`,Q=J.end}return U+=K.slice(Q),U}async function j(K,z={}){let{data:G,content:_}=A(K),Q=await(z.renderer??((J)=>D(J)))(_);return{html:C(Q),frontmatter:G??{}}}import{dirname as v,resolve as H}from"path";function f(K){let z=K,G=x(K);if(G)z=G.content.trim();let _=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,U=[],Q=[],J=[],X=(N)=>/\b(?:state|derived|effect|batch)\s*(?:<[^<>()]*>)?\s*\(/.test(N),$;while(($=_.exec(K))!==null){let N=$[1],Y=$[2],E=$[0],Z=N.includes("server");if(X(Y))J.push(E);else if(Z)Q.push(Y);else U.push(E)}let q=z;{let N=/<script\b(?![^>]*\b(?:client|type\s*=\s*["']module["']|src\s*=))[^>]*>/gi,Y,E=[];while((Y=N.exec(q))!==null){let Z=Y.index+Y[0].length,L=q.indexOf("</script>",Z);if(L===-1)continue;E.push({start:Y.index,end:L+9}),N.lastIndex=L+9}for(let Z=E.length-1;Z>=0;Z--)q=q.substring(0,E[Z].start)+q.substring(E[Z].end)}for(let N of U)q=q.replace(N,"");return{templateContent:q,serverScripts:Q,clientScripts:U,signalsScripts:J}}function S(K,z){return`<!DOCTYPE html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
+
<title>${(z||"stx").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
${K}
|
|
11
|
+
</body>
|
|
12
|
+
</html>`}async function s(K,z={}){let G=H(K),_=Bun.file(G);if(!await _.exists())throw Error(`Template file not found: ${G}`);let U=await _.text(),Q=null;if(b(G)){let J=await j(U,{renderer:z.markdownRenderer});U=J.html,Q=J.frontmatter}if(Q)z={...z,context:{...Q,...z.context||{}}};if(z.layout){let J=H(z.layout),X=Bun.file(J);if(!await X.exists())throw Error(`Layout template not found: ${J}`);let{layout:$,injectCSS:q,...N}=z,Y=await I(U,G,{...N,injectCSS:!1}),E=await X.text(),Z={...z.context||{},content:Y},L={...N,context:Z,injectCSS:q};return I(E,J,L)}return I(U,G,z)}async function i(K,z={},G={}){return I(K,process.cwd(),{context:z,...G})}async function I(K,z,G={}){let{templateContent:_,serverScripts:U,clientScripts:Q}=f(K),J={...w,...G.options},X={__filename:z,__dirname:v(z),__stx:{},__stx_options:J,__stx_sfc_mode:!0,__stx_inject_css:G.injectCSS===!0,__stxServeContext:void 0,...y(G.context??{}),definePageMeta:()=>{},...G.context||{}};for(let N of U)await R(N,X,z);let $=new Set,q=_;if(q=await k(q,X,z,J,$),T(X,G.context),G.templateOnly){if(q=q.replace(/<script data-stx-scoped>[\s\S]*?<\/script>\s*/gi,""),q=q.replace(/<!-- stx SEO Tags -->[\s\S]*?(?=<)/i,""),Q.length>0)q+=`
|
|
13
|
+
${Q.join(`
|
|
14
|
+
`)}`}else{if(G.processClientScripts!==!1&&Q.length>0){let N=X.__stx_event_bindings||[],Y=B(X),Z=(await Promise.all(Q.map(async(V)=>{let W=V.match(/<script\b[^>]*>([\s\S]*?)<\/script>/);if(!W)return V;return await F(W[1],{eventBindings:N,templateContent:q,serverData:Y,filePath:z})}))).join(`
|
|
15
|
+
`);if(q.match(/(<\/body>)/i))q=q.replace(/(<\/body>)/i,`${Z}
|
|
16
|
+
$1`);else q+=`
|
|
17
|
+
${Z}`}q=await M(q)}if(G.wrapInDocument){if(!q.trim().toLowerCase().startsWith("<!doctype")&&!q.trim().toLowerCase().startsWith("<html"))q=S(q,G.title)}if(G.injectCSS)try{let{injectCss:N}=await import("./chunk-2tk1zkrz.js");q=await N(q)}catch{}return q}
|
|
18
|
+
export{b as qk,C as rk,j as sk,s as tk,i as uk,I as vk};
|