@stacksjs/stx 0.2.94 → 0.2.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/a11y.js +598 -2
- package/dist/analytics.js +159 -2
- package/dist/analyzer.js +240 -2
- package/dist/animation.js +688 -2
- package/dist/app-shell.js +220 -2
- package/dist/app.js +79 -2
- package/dist/assets.js +155 -2
- package/dist/ast.js +630 -2
- package/dist/async-components.js +428 -2
- package/dist/auth.js +12 -2
- package/dist/broadcasting.js +102 -2
- package/dist/browser-composables.js +565 -2
- package/dist/build-assets.js +29 -2
- package/dist/build-mode-detector.js +50 -2
- package/dist/build-optimizer.js +433 -2
- package/dist/build-views.js +180 -2
- package/dist/build.js +33 -2
- package/dist/builtins/drawer.js +37 -2
- package/dist/builtins/escape.js +3 -2
- package/dist/builtins/icon.js +83 -2
- package/dist/builtins/index.js +34 -2
- package/dist/builtins/modal.js +38 -2
- package/dist/builtins/safe-image.js +51 -2
- package/dist/builtins/stx-image.js +200 -2
- package/dist/builtins/stx-link.js +41 -2
- package/dist/builtins/stx-loading-indicator.js +35 -2
- package/dist/builtins/suspense.js +24 -2
- package/dist/builtins/toast.js +42 -2
- package/dist/builtins/tooltip.js +106 -2
- package/dist/builtins/transition-group.js +22 -2
- package/dist/bundle-analyzer/collector.js +233 -2
- package/dist/bundle-analyzer/index.js +82 -2
- package/dist/bundle-analyzer/report.js +318 -2
- package/dist/bundle-analyzer/treemap.js +594 -2
- package/dist/caching.js +131 -2
- package/dist/cli.js +11317 -10982
- package/dist/client/directive.js +14 -2
- package/dist/client/index.js +2 -2
- package/dist/client-helpers.js +312 -2
- package/dist/client-script-bundler.js +216 -6
- package/dist/client-script.js +754 -2
- package/dist/client.js +73 -4
- package/dist/component-hmr.js +585 -2
- package/dist/component-library.d.ts +6 -0
- package/dist/component-library.js +683 -0
- package/dist/component-processing.js +613 -2
- package/dist/component-registry.js +90 -2
- package/dist/component-renderer.js +660 -2
- package/dist/components.js +213 -2
- package/dist/composables/index.js +220 -2
- package/dist/composables/use-battery.js +101 -2
- package/dist/composables/use-broadcast-channel.js +80 -2
- package/dist/composables/use-channel.js +124 -2
- package/dist/composables/use-clipboard.js +79 -2
- package/dist/composables/use-color-mode.js +131 -2
- package/dist/composables/use-cookie.js +86 -2
- package/dist/composables/use-device-orientation.js +181 -2
- package/dist/composables/use-event-listener.js +27 -2
- package/dist/composables/use-event-source.js +166 -2
- package/dist/composables/use-eye-dropper.js +142 -2
- package/dist/composables/use-fetch.js +223 -2
- package/dist/composables/use-fullscreen.js +110 -2
- package/dist/composables/use-geolocation.js +101 -2
- package/dist/composables/use-idle.js +182 -2
- package/dist/composables/use-intersection-observer.js +168 -2
- package/dist/composables/use-keyboard.js +224 -2
- package/dist/composables/use-media-query.js +62 -2
- package/dist/composables/use-meta.js +48 -2
- package/dist/composables/use-mouse.js +286 -2
- package/dist/composables/use-mutation-observer.js +129 -2
- package/dist/composables/use-network.js +85 -2
- package/dist/composables/use-notification.js +94 -2
- package/dist/composables/use-permissions.js +132 -2
- package/dist/composables/use-query.js +0 -1
- package/dist/composables/use-resize-observer.js +157 -2
- package/dist/composables/use-router.js +51 -2
- package/dist/composables/use-share.js +104 -2
- package/dist/composables/use-speech.js +294 -2
- package/dist/composables/use-storage.js +130 -2
- package/dist/composables/use-text-selection.js +205 -4
- package/dist/composables/use-timer.js +183 -2
- package/dist/composables/use-utilities.js +176 -2
- package/dist/composables/use-wake-lock.js +122 -2
- package/dist/composables/use-websocket.js +165 -2
- package/dist/composables/use-window.js +163 -2
- package/dist/composables.js +552 -2
- package/dist/composition-api.js +190 -2
- package/dist/computed.js +376 -8
- package/dist/conditionals.js +599 -2
- package/dist/config.js +751 -2
- package/dist/craft-bridge.js +432 -2
- package/dist/craft-compiler.js +810 -2
- package/dist/craft-components.js +945 -2
- package/dist/craft-entry.js +5 -2
- package/dist/craft-ssr.js +559 -2
- package/dist/csp.js +220 -2
- package/dist/csrf.js +38 -2
- package/dist/custom-directives.js +136 -2
- package/dist/defer.js +156 -2
- package/dist/deploy/config-generators.js +214 -2
- package/dist/deploy/index.js +203 -2
- package/dist/deploy/netlify.js +167 -2
- package/dist/dev-server/crosswind.js +379 -2
- package/dist/dev-server/index.js +7 -2
- package/dist/dev-server/keyboard-shortcuts.js +81 -2
- package/dist/dev-server/native-window.js +91 -2
- package/dist/dev-server/port-utils.js +40 -2
- package/dist/dev-server/serve-app.js +682 -7
- package/dist/dev-server/serve-file.js +439 -7
- package/dist/dev-server/serve-markdown.js +281 -2
- package/dist/dev-server/serve-multi.js +424 -17
- package/dist/dev-server/terminal-colors.js +45 -2
- package/dist/dev-server/theme-selector.js +111 -2
- package/dist/dev-server/types.js +43 -2
- package/dist/dev-server.js +4 -2
- package/dist/devtools.js +462 -18
- package/dist/directive-api.js +355 -2
- package/dist/docs.js +567 -2
- package/dist/doctor.js +123 -2
- package/dist/document-shell.js +105 -2
- package/dist/dynamic-components.js +78 -2
- package/dist/edge-runtime.js +539 -2
- package/dist/env.js +9 -2
- package/dist/error-boundaries.js +62 -12
- package/dist/error-handling.js +1 -2
- package/dist/errors/codes.js +97 -2
- package/dist/errors/formatter.js +196 -2
- package/dist/errors/index.js +44 -2
- package/dist/errors/logger.js +250 -2
- package/dist/errors/sanitizer.js +181 -2
- package/dist/errors/types.js +86 -2
- package/dist/events.js +382 -2
- package/dist/expressions.js +650 -2
- package/dist/formatter.js +265 -2
- package/dist/forms-validation.js +510 -4
- package/dist/forms.js +709 -2
- package/dist/head.js +224 -2
- package/dist/heatmap.js +566 -2
- package/dist/hot-reload.js +367 -2
- package/dist/html-masking.js +73 -2
- package/dist/hydration-runtime.js +195 -2
- package/dist/hydration.js +654 -2
- package/dist/i18n.js +633 -2
- package/dist/image-optimization/auto-sibling.js +88 -2
- package/dist/image-optimization/build-plugin.js +241 -2
- package/dist/image-optimization/component.js +244 -2
- package/dist/image-optimization/directive.js +203 -2
- package/dist/image-optimization/index.js +54 -2
- package/dist/image-optimization/processor.js +262 -2
- package/dist/image-optimization/serve.js +102 -2
- package/dist/includes.js +733 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +134 -2
- package/dist/init.js +505 -2
- package/dist/inline-assets.js +82 -2
- package/dist/interactive.js +383 -2
- package/dist/internal-markdown.js +141 -2
- package/dist/island-chunking.js +52 -2
- package/dist/js-ts.js +57 -2
- package/dist/jsx-runtime.js +289 -2
- package/dist/keep-alive.js +421 -2
- package/dist/lazy-loader.js +245 -2
- package/dist/loading-indicator.js +322 -2
- package/dist/loops.js +643 -2
- package/dist/manifest.js +31 -2
- package/dist/markdown.js +68 -2
- package/dist/media/client/blur-up.js +217 -2
- package/dist/media/client/index.js +53 -2
- package/dist/media/client/lazy-load.js +283 -2
- package/dist/media/client/upload-handler.js +354 -2
- package/dist/media/image/component.js +574 -2
- package/dist/media/image/directive.js +160 -2
- package/dist/media/image/editing.js +193 -2
- package/dist/media/image/index.js +80 -2
- package/dist/media/image/placeholder.js +188 -2
- package/dist/media/image/processor/cache.js +51 -2
- package/dist/media/image/processor/index.js +3 -2
- package/dist/media/image/processor/optimizer.js +202 -2
- package/dist/media/image/processor/responsive.js +162 -2
- package/dist/media/image/srcset.js +194 -2
- package/dist/media/index.js +198 -2
- package/dist/media/manager/embed.js +253 -2
- package/dist/media/protected/component.js +235 -2
- package/dist/media/protected/index.js +20 -2
- package/dist/media/protected/signature.js +205 -2
- package/dist/media/shared/cache.js +132 -2
- package/dist/media/shared/hash.js +35 -2
- package/dist/media/shared/index.js +2 -2
- package/dist/media/types.js +0 -1
- package/dist/media/upload/component.js +320 -2
- package/dist/media/upload/index.js +1 -2
- package/dist/media/video/directive.js +142 -2
- package/dist/media/video/index.js +583 -2
- package/dist/media/video/processor/cache.js +52 -2
- package/dist/media/video/processor/index.js +4 -2
- package/dist/media/video/processor/streaming.js +197 -2
- package/dist/media/video/processor/thumbnail.js +134 -2
- package/dist/media/video/processor/transcoder.js +283 -2
- package/dist/method-spoofing.js +17 -2
- package/dist/middleware.js +40 -2
- package/dist/misc-directives.js +222 -2
- package/dist/native-build.js +511 -2
- package/dist/parser/directive-parser.js +239 -2
- package/dist/parser/expression-parser.js +358 -2
- package/dist/parser/index.js +23 -2
- package/dist/parser/tokenizer.js +534 -2
- package/dist/partial-hydration.js +427 -2
- package/dist/performance-utils.js +430 -2
- package/dist/placeholder.js +35 -2
- package/dist/plugin-system.js +214 -2
- package/dist/plugin.js +173 -2
- package/dist/precompiler.js +660 -81
- package/dist/process.js +711 -2
- package/dist/production-build.js +596 -2
- package/dist/production-builder.js +132 -2
- package/dist/production-server.js +188 -2
- package/dist/props.js +224 -2
- package/dist/public-env.js +19 -2
- package/dist/pwa/audit.js +255 -2
- package/dist/pwa/directives.js +332 -2
- package/dist/pwa/icons.js +109 -2
- package/dist/pwa/index.js +47 -2
- package/dist/pwa/inject.js +102 -2
- package/dist/pwa/manifest.js +186 -2
- package/dist/pwa/offline.js +259 -2
- package/dist/pwa/precache.js +116 -2
- package/dist/pwa/service-worker.js +860 -2
- package/dist/pwa/workbox-strategies.js +167 -2
- package/dist/pwa/workbox.js +382 -2
- package/dist/pwa.js +427 -427
- package/dist/reactive-bindings.js +266 -2
- package/dist/reactive.js +569 -2
- package/dist/reactivity.js +559 -2
- package/dist/release.js +1 -2
- package/dist/render.js +165 -2
- package/dist/route-middleware.js +17 -2
- package/dist/router.js +9 -2
- package/dist/routes.js +14 -2
- package/dist/runtime-injection.js +120 -2
- package/dist/runtime.js +94 -2
- package/dist/safe-evaluator.js +444 -2
- package/dist/scaffolding.js +897 -2
- package/dist/screenshot.js +87 -2
- package/dist/script-classifier.js +32 -2
- package/dist/script-validation.js +158 -2
- package/dist/seo.js +457 -2
- package/dist/serve.js +237 -2
- package/dist/server-bindings.js +108 -2
- package/dist/server-components.js +338 -11
- package/dist/signal-processing.js +946 -2
- package/dist/signals-api.js +154 -2
- package/dist/signals.js +5287 -2
- package/dist/site-builder/build.js +224 -2
- package/dist/site-builder/i18n.js +140 -2
- package/dist/site-builder/index.js +15 -2
- package/dist/site-builder/robots.js +26 -2
- package/dist/site-builder/router.js +27 -2
- package/dist/site-builder/seo.js +36 -2
- package/dist/site-builder/sitemap.js +26 -2
- package/dist/site-builder/theme.js +33 -2
- package/dist/site-builder/types.js +0 -1
- package/dist/slots.js +201 -2
- package/dist/source-maps.js +350 -2
- package/dist/spa-shell.js +34 -2
- package/dist/ssg.js +389 -389
- package/dist/ssr.js +355 -2
- package/dist/state-management.js +533 -2
- package/dist/store-imports.js +13 -2
- package/dist/store-loader.js +72 -5
- package/dist/stores-client.js +132 -2
- package/dist/story/addons.js +261 -2
- package/dist/story/analytics.js +235 -2
- package/dist/story/auto-stories.js +158 -2
- package/dist/story/bookmarks.js +277 -2
- package/dist/story/bun-test.js +102 -2
- package/dist/story/cli.js +155 -2
- package/dist/story/collect/analyzer.js +305 -2
- package/dist/story/collect/index.js +27 -2
- package/dist/story/collect/parser.js +129 -2
- package/dist/story/collect/scanner.js +101 -2
- package/dist/story/collect/tree.js +110 -2
- package/dist/story/commands/build.js +172 -2
- package/dist/story/commands/dev.js +78 -2
- package/dist/story/commands/index.js +3 -2
- package/dist/story/commands/preview.js +56 -2
- package/dist/story/compiled-output.js +151 -2
- package/dist/story/composition.js +261 -2
- package/dist/story/config-watcher.js +67 -2
- package/dist/story/config.js +64 -2
- package/dist/story/context.js +27 -2
- package/dist/story/controls/index.js +320 -2
- package/dist/story/crosswind.js +189 -2
- package/dist/story/desktop-preview.js +105 -2
- package/dist/story/docs-generator.js +186 -2
- package/dist/story/errors.js +239 -2
- package/dist/story/figma-export.js +224 -2
- package/dist/story/generator.js +165 -2
- package/dist/story/hmr.js +131 -2
- package/dist/story/hot-swap.js +207 -2
- package/dist/story/index.js +49 -2
- package/dist/story/interactions.js +225 -2
- package/dist/story/keyboard-shortcuts.js +345 -2
- package/dist/story/output.js +153 -2
- package/dist/story/performance.js +252 -2
- package/dist/story/presets.js +289 -2
- package/dist/story/props-validation.js +215 -2
- package/dist/story/renderer.js +209 -2
- package/dist/story/search-index.js +106 -2
- package/dist/story/search.js +140 -2
- package/dist/story/server.js +965 -2
- package/dist/story/setup.js +78 -2
- package/dist/story/snapshots.js +170 -2
- package/dist/story/testing.js +163 -2
- package/dist/story/theme.js +170 -2
- package/dist/story/types.js +0 -2
- package/dist/story/ui/code-panel.js +175 -2
- package/dist/story/ui/controls-panel.js +168 -2
- package/dist/story/ui/index.js +4 -2
- package/dist/story/ui/navigation.js +250 -2
- package/dist/story/ui/preview.js +251 -2
- package/dist/story/visual-testing.js +247 -2
- package/dist/streaming.js +537 -2
- package/dist/strict-lint.js +288 -2
- package/dist/style-scoping.js +50 -2
- package/dist/suspense.js +398 -2
- package/dist/teleport.js +109 -2
- package/dist/template-compiler.js +63 -2
- package/dist/template-hydrator.js +82 -2
- package/dist/template-tag-balance.js +93 -2
- package/dist/testing.js +581 -2
- package/dist/transitions.js +443 -2
- package/dist/type-checker.js +581 -2
- package/dist/types/component-types.d.ts +54 -0
- package/dist/types/component-types.js +0 -1
- package/dist/types/config-types.js +0 -1
- package/dist/types/context-types.js +0 -1
- package/dist/types/csp-types.js +0 -1
- package/dist/types/directive-types.js +3 -2
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.js +1 -2
- package/dist/types/pwa-types.js +0 -1
- package/dist/types.js +1 -2
- package/dist/typescript-templates.js +386 -4
- package/dist/utils.js +942 -2
- package/dist/validator.js +171 -2
- package/dist/variable-extractor.js +1094 -2
- package/dist/view-composers.js +29 -2
- package/dist/virtual-scrolling.js +454 -2
- package/dist/visual-editor.js +688 -28
- package/dist/vue-template.js +475 -2
- package/dist/web-components/css-scoping.js +177 -2
- package/dist/web-components/index.js +13 -2
- package/dist/web-components/reactive-generator.js +121 -56
- package/dist/web-components.js +1447 -2
- package/dist/x-element.js +17 -5
- package/package.json +6 -7
- package/dist/chunk-03c26pjz.js +0 -3
- package/dist/chunk-04mvcmcr.js +0 -106
- package/dist/chunk-05hgyyqc.js +0 -4
- package/dist/chunk-095s3972.js +0 -99
- package/dist/chunk-0b9w2w1y.js +0 -1
- package/dist/chunk-0dz85jrp.js +0 -3
- package/dist/chunk-0g4gece6.js +0 -4
- package/dist/chunk-0jd0pndq.js +0 -3
- package/dist/chunk-0jkwrcwj.js +0 -3
- package/dist/chunk-0m9tdm7t.js +0 -71
- package/dist/chunk-0qakwen3.js +0 -1
- package/dist/chunk-0qnz93q2.js +0 -3
- package/dist/chunk-0tatqxj2.js +0 -57
- package/dist/chunk-0wdar532.js +0 -102
- package/dist/chunk-13yz561y.js +0 -3
- package/dist/chunk-174z0cd0.js +0 -3
- package/dist/chunk-1mmykse5.js +0 -81
- package/dist/chunk-1z2yq9em.js +0 -3
- package/dist/chunk-1z5nhbjt.js +0 -90
- package/dist/chunk-1zgsgk4b.js +0 -1
- package/dist/chunk-25s7bckb.js +0 -171
- package/dist/chunk-268adc7r.js +0 -2230
- package/dist/chunk-26r6zh3t.js +0 -194
- package/dist/chunk-2w3302dh.js +0 -3
- package/dist/chunk-2xen423s.js +0 -3
- package/dist/chunk-39gm08bn.js +0 -39
- package/dist/chunk-3bjtemm6.js +0 -128
- package/dist/chunk-3jm3snz8.js +0 -3
- package/dist/chunk-3ngm57nt.js +0 -12
- package/dist/chunk-3rh7va1z.js +0 -3
- package/dist/chunk-3yg9hbmb.js +0 -4
- package/dist/chunk-44hd3kab.js +0 -1
- package/dist/chunk-46mkpbkk.js +0 -12
- package/dist/chunk-48cw2nde.js +0 -2
- package/dist/chunk-48r3qe0k.js +0 -3
- package/dist/chunk-4aj7ftqb.js +0 -1
- package/dist/chunk-4bt81cg3.js +0 -61
- package/dist/chunk-4j188175.js +0 -3
- package/dist/chunk-4k7d8p8d.js +0 -188
- package/dist/chunk-4qq8ffke.js +0 -28
- package/dist/chunk-50vqeesm.js +0 -142
- package/dist/chunk-52agge4n.js +0 -38
- package/dist/chunk-55yp0q8t.js +0 -201
- package/dist/chunk-57p201gb.js +0 -83
- package/dist/chunk-5ggw1dyv.js +0 -3
- package/dist/chunk-5kt3ay7x.js +0 -10
- package/dist/chunk-5p568px4.js +0 -1166
- package/dist/chunk-5ppkfyn2.js +0 -3
- package/dist/chunk-5q87fgkk.js +0 -3
- package/dist/chunk-5qb761h2.js +0 -3
- package/dist/chunk-5xvbq2gs.js +0 -30
- package/dist/chunk-647849kf.js +0 -34
- package/dist/chunk-6b5k6w2q.js +0 -7
- package/dist/chunk-6cr3eeh4.js +0 -23
- package/dist/chunk-6djgb0hr.js +0 -3
- package/dist/chunk-6dqzky7x.js +0 -35
- package/dist/chunk-6e4c6g46.js +0 -3
- package/dist/chunk-6w03t7h6.js +0 -3
- package/dist/chunk-6wn85hn6.js +0 -4
- package/dist/chunk-6y4gqs1q.js +0 -169
- package/dist/chunk-75rndzbd.js +0 -6
- package/dist/chunk-77tga15w.js +0 -3
- package/dist/chunk-7a51hkpf.js +0 -3
- package/dist/chunk-7b0xdy5h.js +0 -386
- package/dist/chunk-7cgmq685.js +0 -33
- package/dist/chunk-7dy588as.js +0 -6
- package/dist/chunk-7rvh2wwv.js +0 -721
- package/dist/chunk-7sm05m0j.js +0 -351
- package/dist/chunk-7sqdeqsw.js +0 -1
- package/dist/chunk-7xcfy2fn.js +0 -4
- package/dist/chunk-82t27pvd.js +0 -5
- package/dist/chunk-87kx8byz.js +0 -1115
- package/dist/chunk-8fgwhhb8.js +0 -6
- package/dist/chunk-8qbax8xn.js +0 -347
- package/dist/chunk-91s2hres.js +0 -8
- package/dist/chunk-94g3cahw.js +0 -11
- package/dist/chunk-957amb71.js +0 -8
- package/dist/chunk-95w08s8v.js +0 -3
- package/dist/chunk-9agvhp1x.js +0 -93
- package/dist/chunk-9tmbrwwx.js +0 -219
- package/dist/chunk-9yz5d003.js +0 -51
- package/dist/chunk-a3hyn4we.js +0 -79
- package/dist/chunk-a69tvya5.js +0 -53
- package/dist/chunk-adjcg6wa.js +0 -498
- package/dist/chunk-adqh2m9z.js +0 -45
- package/dist/chunk-asarebzq.js +0 -292
- package/dist/chunk-aw3rp9ac.js +0 -24
- package/dist/chunk-b0cyc09a.js +0 -109
- package/dist/chunk-b3kkjcdh.js +0 -3
- package/dist/chunk-b3prs7y0.js +0 -5
- package/dist/chunk-b5zc9y0y.js +0 -90
- package/dist/chunk-baa7h4yz.js +0 -3
- package/dist/chunk-bgec9r1v.js +0 -5224
- package/dist/chunk-bjnjpsgn.js +0 -3
- package/dist/chunk-bk8ew8ze.js +0 -24
- package/dist/chunk-bn08k7yy.js +0 -3
- package/dist/chunk-bpgg59wa.js +0 -3
- package/dist/chunk-bwxda6n1.js +0 -3
- package/dist/chunk-bykjk6vj.js +0 -4
- package/dist/chunk-c53hyw5c.js +0 -477
- package/dist/chunk-c7jg8w13.js +0 -3
- package/dist/chunk-ca6qd1dx.js +0 -3
- package/dist/chunk-cdbwprfv.js +0 -6
- package/dist/chunk-ceg2c2q2.js +0 -11
- package/dist/chunk-cn409b69.js +0 -3
- package/dist/chunk-cn8az1b4.js +0 -1
- package/dist/chunk-cp3kwv17.js +0 -8
- package/dist/chunk-cpcc11vp.js +0 -5
- package/dist/chunk-cr3wbrcr.js +0 -10
- package/dist/chunk-cygfdk1n.js +0 -3
- package/dist/chunk-cyp4m0vh.js +0 -16
- package/dist/chunk-cz25azze.js +0 -4
- package/dist/chunk-d77yxcds.js +0 -3
- package/dist/chunk-dvfs1h3c.js +0 -117
- package/dist/chunk-dyjnn5k8.js +0 -262
- package/dist/chunk-dzw95th7.js +0 -3
- package/dist/chunk-e0zytzdh.js +0 -179
- package/dist/chunk-e53h9qhd.js +0 -84
- package/dist/chunk-eds0f8f1.js +0 -3
- package/dist/chunk-eh8hact1.js +0 -5
- package/dist/chunk-epj957jf.js +0 -4
- package/dist/chunk-eqeyaq6g.js +0 -77
- package/dist/chunk-fbxt2mrx.js +0 -5
- package/dist/chunk-fch9tk1k.js +0 -3
- package/dist/chunk-fe7r1mq1.js +0 -9
- package/dist/chunk-fhawx87n.js +0 -8
- package/dist/chunk-fk51yyrw.js +0 -3
- package/dist/chunk-fms20x0n.js +0 -21
- package/dist/chunk-fs0qezn5.js +0 -341
- package/dist/chunk-fzm3y0r3.js +0 -267
- package/dist/chunk-g2hekckm.js +0 -161
- package/dist/chunk-g4ps1dj8.js +0 -140
- package/dist/chunk-g8b81pzc.js +0 -3
- package/dist/chunk-ganag9dm.js +0 -3
- package/dist/chunk-gc84b1d2.js +0 -58
- package/dist/chunk-gcf5v18y.js +0 -60
- package/dist/chunk-ghrx0hn1.js +0 -4
- package/dist/chunk-gqpkp459.js +0 -3
- package/dist/chunk-h45py5w5.js +0 -2
- package/dist/chunk-h5wa62ek.js +0 -145
- package/dist/chunk-h82kjdr4.js +0 -83
- package/dist/chunk-haecq01c.js +0 -3
- package/dist/chunk-hepg894w.js +0 -3
- package/dist/chunk-hjdc99kb.js +0 -3
- package/dist/chunk-hje9v2zh.js +0 -3
- package/dist/chunk-hjv76kcw.js +0 -1
- package/dist/chunk-hke99a0v.js +0 -3
- package/dist/chunk-hpqr9e3x.js +0 -3
- package/dist/chunk-hq5cem49.js +0 -236
- package/dist/chunk-hrampcrj.js +0 -3
- package/dist/chunk-ht4j68cs.js +0 -3
- package/dist/chunk-hxx3za24.js +0 -62
- package/dist/chunk-j4s5qwd7.js +0 -4
- package/dist/chunk-jbejwejg.js +0 -8
- package/dist/chunk-jc0fc4ht.js +0 -11
- package/dist/chunk-jcs0ymw7.js +0 -3
- package/dist/chunk-jfm69keq.js +0 -231
- package/dist/chunk-jfrn43vh.js +0 -2
- package/dist/chunk-jjamhxpm.js +0 -139
- package/dist/chunk-jjvp4t5w.js +0 -27
- package/dist/chunk-jt44av4j.js +0 -3
- package/dist/chunk-jt98jhpt.js +0 -10
- package/dist/chunk-k8440jxh.js +0 -6
- package/dist/chunk-kdxa9epn.js +0 -21
- package/dist/chunk-kfd2hf6f.js +0 -3
- package/dist/chunk-kgym7ch9.js +0 -8
- package/dist/chunk-kh6rfz2v.js +0 -4
- package/dist/chunk-kkp6rs2n.js +0 -36
- package/dist/chunk-ktkmvaa8.js +0 -1
- package/dist/chunk-m59y310j.js +0 -3
- package/dist/chunk-mgmyr1b9.js +0 -6
- package/dist/chunk-mqwbpamc.js +0 -3
- package/dist/chunk-mrehzhxv.js +0 -5
- package/dist/chunk-mv03qb75.js +0 -3
- package/dist/chunk-mv4fb50w.js +0 -1
- package/dist/chunk-mwbng54r.js +0 -2
- package/dist/chunk-n46a5g1g.js +0 -3
- package/dist/chunk-n944baxp.js +0 -3
- package/dist/chunk-nanw7yhz.js +0 -14
- package/dist/chunk-nap11ntr.js +0 -21
- package/dist/chunk-ncnfa8ae.js +0 -29
- package/dist/chunk-ngxfwzq3.js +0 -3
- package/dist/chunk-nvwb4x04.js +0 -3
- package/dist/chunk-nw34xajc.js +0 -8
- package/dist/chunk-payfb24w.js +0 -207
- package/dist/chunk-pc31m5x5.js +0 -398
- package/dist/chunk-pg1fvqb9.js +0 -167
- package/dist/chunk-q60knhjf.js +0 -3
- package/dist/chunk-q6h6yvzb.js +0 -10
- package/dist/chunk-qd5461tt.js +0 -3
- package/dist/chunk-qdc3aav1.js +0 -3
- package/dist/chunk-qfwzdffx.js +0 -3
- package/dist/chunk-qgxwmagw.js +0 -134
- package/dist/chunk-qhdtssn1.js +0 -19
- package/dist/chunk-qk584whs.js +0 -3
- package/dist/chunk-qm4yppj5.js +0 -57
- package/dist/chunk-qwyd9a1d.js +0 -2
- package/dist/chunk-qxs6et76.js +0 -196
- package/dist/chunk-rb1e4cnb.js +0 -3
- package/dist/chunk-rh80q1nd.js +0 -1
- package/dist/chunk-rkffm9sy.js +0 -128
- package/dist/chunk-rv002yn0.js +0 -14
- package/dist/chunk-s6ja2bdg.js +0 -66
- package/dist/chunk-sjagg9qz.js +0 -66
- package/dist/chunk-sn07azv3.js +0 -3
- package/dist/chunk-svahbw0w.js +0 -12
- package/dist/chunk-svhtdb0s.js +0 -6
- package/dist/chunk-t37dp99j.js +0 -3
- package/dist/chunk-tj6zfxeb.js +0 -64
- package/dist/chunk-tmgz5t2g.js +0 -3
- package/dist/chunk-tr0z0e1g.js +0 -3
- package/dist/chunk-tx6br9r4.js +0 -274
- package/dist/chunk-v97390pe.js +0 -1
- package/dist/chunk-vcr5pzpx.js +0 -233
- package/dist/chunk-vdfwv0fp.js +0 -6
- package/dist/chunk-vp2395eb.js +0 -3
- package/dist/chunk-vpe6napb.js +0 -28
- package/dist/chunk-vv9wfz1c.js +0 -12
- package/dist/chunk-vw6ejgmy.js +0 -21
- package/dist/chunk-vx22he47.js +0 -1
- package/dist/chunk-w01y57f5.js +0 -1539
- package/dist/chunk-w21mwxdd.js +0 -4
- package/dist/chunk-w4n8fqp7.js +0 -216
- package/dist/chunk-w959hm8j.js +0 -358
- package/dist/chunk-wf7zrjsw.js +0 -138
- package/dist/chunk-wk07pwtd.js +0 -321
- package/dist/chunk-wvef3ngh.js +0 -127
- package/dist/chunk-wxvyj65q.js +0 -2
- package/dist/chunk-x1hjv24z.js +0 -11
- package/dist/chunk-x39sfpvm.js +0 -302
- package/dist/chunk-x4fze3q2.js +0 -314
- package/dist/chunk-x64kb787.js +0 -15
- package/dist/chunk-xcb0pbr6.js +0 -4
- package/dist/chunk-xhkjhxsp.js +0 -3
- package/dist/chunk-xhnpsngj.js +0 -5
- package/dist/chunk-xsqbk4yk.js +0 -3
- package/dist/chunk-xygc53vr.js +0 -68
- package/dist/chunk-y0qg6rrv.js +0 -3
- package/dist/chunk-y25pr13j.js +0 -19
- package/dist/chunk-y4c744dk.js +0 -3
- package/dist/chunk-y4md9hp0.js +0 -3
- package/dist/chunk-y5wazw6j.js +0 -7
- package/dist/chunk-y5xz0jc4.js +0 -141
- package/dist/chunk-y86m1wr4.js +0 -4
- package/dist/chunk-yaan98dd.js +0 -3
- package/dist/chunk-yach037f.js +0 -32
- package/dist/chunk-yexjrg9d.js +0 -7
- package/dist/chunk-ygvyc6wv.js +0 -90
- package/dist/chunk-yj560gp8.js +0 -8
- package/dist/chunk-yn38c15w.js +0 -4
- package/dist/chunk-yr1gdceh.js +0 -3
- package/dist/chunk-yw2fzq86.js +0 -3
- package/dist/chunk-ywkrxp2h.js +0 -147
- package/dist/chunk-z37xq5rx.js +0 -3
- package/dist/chunk-z4djtgt0.js +0 -71
- package/dist/chunk-z8cjr9n9.js +0 -7
- package/dist/chunk-znxp3zha.js +0 -71
- package/dist/chunk-zt2yag10.js +0 -429
package/dist/chunk-jfm69keq.js
DELETED
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{mm as O,om as R,pm as f}from"./chunk-6y4gqs1q.js";function _(){let q=new Map;return{islands:q,register(j){q.set(j.id,j)},get(j){return q.get(j)},async hydrate(j){let w=q.get(j);if(!w||w.hydrated)return;if(w.hydrated=!0,typeof window<"u"&&typeof window.dispatchEvent==="function")window.dispatchEvent(new CustomEvent("stx:hydrate",{detail:{id:j,component:w.component}}))},async hydrateAll(){let j=Array.from(q.values()).filter((w)=>!w.hydrated).map((w)=>this.hydrate(w.id));await Promise.all(j)}}}function b(q){return`
|
|
3
|
-
<script data-hydrate="${q}">
|
|
4
|
-
(function() {
|
|
5
|
-
const island = document.querySelector('[data-island="${q}"]');
|
|
6
|
-
if (!island) return;
|
|
7
|
-
|
|
8
|
-
// Immediately hydrate
|
|
9
|
-
island.classList.add('hydrated');
|
|
10
|
-
island.dispatchEvent(new CustomEvent('stx:hydrated', { bubbles: true }));
|
|
11
|
-
})();
|
|
12
|
-
</script>
|
|
13
|
-
`}function k(q,j){let w=j.timeout||2000,z=j.priority||"low";return`
|
|
14
|
-
<script data-hydrate="${q}">
|
|
15
|
-
(function() {
|
|
16
|
-
const island = document.querySelector('[data-island="${q}"]');
|
|
17
|
-
if (!island) return;
|
|
18
|
-
|
|
19
|
-
function hydrate() {
|
|
20
|
-
if (island.classList.contains('hydrated')) return;
|
|
21
|
-
island.classList.add('hydrated');
|
|
22
|
-
island.dispatchEvent(new CustomEvent('stx:hydrated', { bubbles: true }));
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
if ('requestIdleCallback' in window) {
|
|
26
|
-
const idleOptions = { timeout: ${w} };
|
|
27
|
-
${z==="high"?"requestIdleCallback(hydrate, idleOptions);":`
|
|
28
|
-
// Low priority: wait for multiple idle periods
|
|
29
|
-
let idleCount = 0;
|
|
30
|
-
function waitForIdle() {
|
|
31
|
-
requestIdleCallback((deadline) => {
|
|
32
|
-
if (deadline.didTimeout || ++idleCount >= 2) {
|
|
33
|
-
hydrate();
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
waitForIdle();
|
|
37
|
-
}
|
|
38
|
-
}, idleOptions);
|
|
39
|
-
}
|
|
40
|
-
waitForIdle();
|
|
41
|
-
`}
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
// Fallback for browsers without requestIdleCallback
|
|
45
|
-
setTimeout(hydrate, ${w});
|
|
46
|
-
}
|
|
47
|
-
})();
|
|
48
|
-
</script>
|
|
49
|
-
`}function M(q,j){let w=j.rootMargin||"0px",z=j.threshold||0;return`
|
|
50
|
-
<script data-hydrate="${q}">
|
|
51
|
-
(function() {
|
|
52
|
-
const island = document.querySelector('[data-island="${q}"]');
|
|
53
|
-
if (!island) return;
|
|
54
|
-
|
|
55
|
-
function hydrate() {
|
|
56
|
-
if (island.classList.contains('hydrated')) return;
|
|
57
|
-
island.classList.add('hydrated');
|
|
58
|
-
island.dispatchEvent(new CustomEvent('stx:hydrated', { bubbles: true }));
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
if ('IntersectionObserver' in window) {
|
|
62
|
-
const observer = new IntersectionObserver((entries) => {
|
|
63
|
-
entries.forEach((entry) => {
|
|
64
|
-
if (entry.isIntersecting) {
|
|
65
|
-
observer.disconnect();
|
|
66
|
-
hydrate();
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
}, {
|
|
70
|
-
rootMargin: '${w}',
|
|
71
|
-
threshold: ${JSON.stringify(z)}
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
observer.observe(island);
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
// Fallback: hydrate on load
|
|
78
|
-
hydrate();
|
|
79
|
-
}
|
|
80
|
-
})();
|
|
81
|
-
</script>
|
|
82
|
-
`}function N(q,j){let w=j.media||"(min-width: 768px)";return`
|
|
83
|
-
<script data-hydrate="${q}">
|
|
84
|
-
(function() {
|
|
85
|
-
const island = document.querySelector('[data-island="${q}"]');
|
|
86
|
-
if (!island) return;
|
|
87
|
-
|
|
88
|
-
function hydrate() {
|
|
89
|
-
if (island.classList.contains('hydrated')) return;
|
|
90
|
-
island.classList.add('hydrated');
|
|
91
|
-
island.dispatchEvent(new CustomEvent('stx:hydrated', { bubbles: true }));
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
const mediaQuery = window.matchMedia('${w}');
|
|
95
|
-
|
|
96
|
-
function handleMediaChange(e) {
|
|
97
|
-
if (e.matches) {
|
|
98
|
-
mediaQuery.removeEventListener('change', handleMediaChange);
|
|
99
|
-
hydrate();
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
if (mediaQuery.matches) {
|
|
104
|
-
hydrate();
|
|
105
|
-
}
|
|
106
|
-
else {
|
|
107
|
-
mediaQuery.addEventListener('change', handleMediaChange);
|
|
108
|
-
}
|
|
109
|
-
})();
|
|
110
|
-
</script>
|
|
111
|
-
`}function P(q){return`
|
|
112
|
-
<script data-hydrate="${q}">
|
|
113
|
-
(function() {
|
|
114
|
-
const island = document.querySelector('[data-island="${q}"]');
|
|
115
|
-
if (!island) return;
|
|
116
|
-
|
|
117
|
-
function hydrate() {
|
|
118
|
-
if (island.classList.contains('hydrated')) return;
|
|
119
|
-
island.classList.add('hydrated');
|
|
120
|
-
island.dispatchEvent(new CustomEvent('stx:hydrated', { bubbles: true }));
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// Hydrate on first interaction
|
|
124
|
-
const events = ['mouseenter', 'focusin', 'touchstart'];
|
|
125
|
-
const handler = () => {
|
|
126
|
-
events.forEach(e => island.removeEventListener(e, handler));
|
|
127
|
-
hydrate();
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
events.forEach(e => island.addEventListener(e, handler, { once: true, passive: true }));
|
|
131
|
-
})();
|
|
132
|
-
</script>
|
|
133
|
-
`}function A(q,j){let w=j.event||"stx:activate";return`
|
|
134
|
-
<script data-hydrate="${q}">
|
|
135
|
-
(function() {
|
|
136
|
-
const island = document.querySelector('[data-island="${q}"]');
|
|
137
|
-
if (!island) return;
|
|
138
|
-
|
|
139
|
-
function hydrate() {
|
|
140
|
-
if (island.classList.contains('hydrated')) return;
|
|
141
|
-
island.classList.add('hydrated');
|
|
142
|
-
island.dispatchEvent(new CustomEvent('stx:hydrated', { bubbles: true }));
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// Listen for custom event
|
|
146
|
-
window.addEventListener('${w}', function handler(e) {
|
|
147
|
-
if (!e.detail || e.detail.id === '${q}' || e.detail.id === '*') {
|
|
148
|
-
window.removeEventListener('${w}', handler);
|
|
149
|
-
hydrate();
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
})();
|
|
153
|
-
</script>
|
|
154
|
-
`}function D(q,j={},w){let z=q,J=!1,U=/@client:(load|idle|visible|media|only|hover|event)/i.test(q);if(z=T(z,"load",j),z=T(z,"idle",j),z=T(z,"visible",j),z=T(z,"media",j),z=C(z),z=T(z,"hover",j),z=T(z,"event",j),J=U&&z!==q,J)z+=`
|
|
155
|
-
`+O();return z}function T(q,j,w){let z=new RegExp(`@client:${j}(?:\\s*\\(([^)]*)\\))?\\s*([\\s\\S]*?)@endclient`,"gi");return q.replace(z,(J,U,W)=>{let F={strategy:j};if(U)try{let V=U.split(",").map((X)=>X.trim());for(let X of V){let[E,L]=X.split(":").map((Y)=>Y.trim());if(E&&L){let Y=L.replace(/^['"]|['"]$/g,"");F[E]=Y}}}catch{}let G=`island-${Math.random().toString(36).substring(2,9)}`,Z=R(W.trim()),$=f(W.trim(),w),Q=[];if(F.rootMargin)Q.push(`data-root-margin="${F.rootMargin}"`);if(F.threshold!==void 0)Q.push(`data-threshold="${F.threshold}"`);if(F.media)Q.push(`data-media="${F.media}"`);if(F.event)Q.push(`data-event="${F.event}"`);if(Z)Q.push(`data-component="${Z}"`);let B=Object.keys($).length>0?`
|
|
156
|
-
<script type="application/json" data-island-props="${G}">${JSON.stringify($)}</script>`:"",K="";switch(j){case"load":K=b(G);break;case"idle":K=k(G,F);break;case"visible":K=M(G,F);break;case"media":K=N(G,F);break;case"hover":K=P(G);break;case"event":K=A(G,F);break}return`
|
|
157
|
-
<div data-island="${G}"
|
|
158
|
-
data-strategy="${j}"
|
|
159
|
-
${Q.join(`
|
|
160
|
-
`)}
|
|
161
|
-
class="stx-island"
|
|
162
|
-
style="contents;">
|
|
163
|
-
${W.trim()}${B}
|
|
164
|
-
</div>
|
|
165
|
-
${K}
|
|
166
|
-
`})}function C(q){let j=/@client:only\s*([\s\S]*?)@endclient/gi;return q.replace(j,(w,z)=>{let J=`island-only-${Math.random().toString(36).substring(2,9)}`;return`
|
|
167
|
-
<div data-island="${J}"
|
|
168
|
-
data-strategy="only"
|
|
169
|
-
class="stx-island stx-client-only">
|
|
170
|
-
<!-- Client-only content will be rendered here -->
|
|
171
|
-
<template data-client-content>${z.trim()}</template>
|
|
172
|
-
</div>
|
|
173
|
-
<script data-hydrate="${J}">
|
|
174
|
-
(function() {
|
|
175
|
-
const island = document.querySelector('[data-island="${J}"]');
|
|
176
|
-
if (!island) return;
|
|
177
|
-
|
|
178
|
-
const template = island.querySelector('template[data-client-content]');
|
|
179
|
-
if (template) {
|
|
180
|
-
island.innerHTML = template.innerHTML;
|
|
181
|
-
island.classList.add('hydrated');
|
|
182
|
-
}
|
|
183
|
-
})();
|
|
184
|
-
</script>
|
|
185
|
-
`})}function H(){return`
|
|
186
|
-
/* Island base styles */
|
|
187
|
-
.stx-island {
|
|
188
|
-
display: contents;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
/* Pre-hydration state */
|
|
192
|
-
.stx-island:not(.hydrated) {
|
|
193
|
-
/* Optional: add loading indicator */
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
/* Hydrated state */
|
|
197
|
-
.stx-island.hydrated {
|
|
198
|
-
/* Island is now interactive */
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
/* Client-only placeholder */
|
|
202
|
-
.stx-client-only:not(.hydrated) {
|
|
203
|
-
min-height: 50px;
|
|
204
|
-
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
|
205
|
-
background-size: 200% 100%;
|
|
206
|
-
animation: island-shimmer 1.5s infinite;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
@keyframes island-shimmer {
|
|
210
|
-
0% { background-position: 200% 0; }
|
|
211
|
-
100% { background-position: -200% 0; }
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
/* Hydration transition */
|
|
215
|
-
.stx-island {
|
|
216
|
-
transition: opacity 0.2s ease-out;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.stx-island:not(.hydrated) {
|
|
220
|
-
opacity: 0.7;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.stx-island.hydrated {
|
|
224
|
-
opacity: 1;
|
|
225
|
-
}
|
|
226
|
-
`}function h(q){if(typeof window>"u")return;let j=document.querySelector(`[data-island="${q}"]`);if(!j||j.classList.contains("hydrated"))return;j.classList.add("hydrated"),j.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))}function S(q){if(typeof window>"u")return;document.querySelectorAll(`[data-strategy="${q}"]:not(.hydrated)`).forEach((w)=>{w.classList.add("hydrated"),w.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))})}function x(){if(typeof window>"u")return;document.querySelectorAll(".stx-island:not(.hydrated)").forEach((j)=>{j.classList.add("hydrated"),j.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))})}function g(q){if(typeof window>"u")return!1;return document.querySelector(`[data-island="${q}"]`)?.classList.contains("hydrated")??!1}function v(q){return new Promise((j)=>{if(typeof window>"u"){j();return}let w=document.querySelector(`[data-island="${q}"]`);if(!w){j();return}if(w.classList.contains("hydrated")){j();return}w.addEventListener("stx:hydrated",()=>j(),{once:!0})})}function m(q){return q.replace(/@static\s*([\s\S]*?)@endstatic/gi,(j,w)=>{return`<div class="stx-static">${w.trim()}</div>`})}function u(q){let j=q.map((w)=>({id:w.id,component:w.component,strategy:w.options.strategy,props:w.props}));return`
|
|
227
|
-
<script type="application/json" id="stx-island-manifest">
|
|
228
|
-
${JSON.stringify(j)}
|
|
229
|
-
</script>
|
|
230
|
-
`}var c={processPartialHydrationDirectives:D,processStaticDirectives:m,generatePartialHydrationCSS:H,generateIslandManifest:u,createIslandRegistry:_,hydrateIsland:h,hydrateByStrategy:S,hydrateAll:x,isHydrated:g,onHydrated:v};
|
|
231
|
-
export{_ as aj,D as bj,H as cj,h as dj,S as ej,x as fj,g as gj,v as hj,m as ij,u as jj,c as kj};
|
package/dist/chunk-jfrn43vh.js
DELETED
package/dist/chunk-jjamhxpm.js
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
class w{metrics=new Map;maxHistorySize=100;enabled=!0;setEnabled(g){this.enabled=g}recordRender(g,q,j,z){if(!this.enabled)return;let k=this.metrics.get(g);if(!k)k={componentId:g,componentName:q,renderCount:0,totalRenderTime:0,avgRenderTime:0,minRenderTime:1/0,maxRenderTime:0,lastRenderTime:0,history:[]},this.metrics.set(g,k);k.renderCount++,k.totalRenderTime+=j,k.avgRenderTime=k.totalRenderTime/k.renderCount,k.minRenderTime=Math.min(k.minRenderTime,j),k.maxRenderTime=Math.max(k.maxRenderTime,j),k.lastRenderTime=j;let v=this.getMemoryUsage();if(v!==void 0)k.memoryUsage=v;if(k.history.push({timestamp:Date.now(),duration:j,props:z,memory:v}),k.history.length>this.maxHistorySize)k.history=k.history.slice(-this.maxHistorySize)}getMetrics(g){return this.metrics.get(g)}getAllMetrics(){return Array.from(this.metrics.values())}getSlowestComponents(g=10){return this.getAllMetrics().sort((q,j)=>j.avgRenderTime-q.avgRenderTime).slice(0,g)}getMostRenderedComponents(g=10){return this.getAllMetrics().sort((q,j)=>j.renderCount-q.renderCount).slice(0,g)}clear(){this.metrics.clear()}clearComponent(g){this.metrics.delete(g)}getMemoryUsage(){if(typeof performance<"u"&&"memory"in performance)return performance.memory?.usedJSHeapSize;return}exportMetrics(){return JSON.stringify({timestamp:Date.now(),metrics:this.getAllMetrics()},null,2)}createTimer(g,q){return new x(this,g,q)}}class x{profiler;componentId;componentName;startTime;props;constructor(g,q,j){this.profiler=g;this.componentId=q;this.componentName=j;this.startTime=performance.now()}setProps(g){return this.props=g,this}end(){let g=performance.now()-this.startTime;return this.profiler.recordRender(this.componentId,this.componentName,g,this.props),g}}var C=new w;function D(g){return`
|
|
3
|
-
<div class="performance-panel">
|
|
4
|
-
<div class="performance-header">
|
|
5
|
-
<h3>Performance</h3>
|
|
6
|
-
<button onclick="clearPerformanceMetrics()">Clear</button>
|
|
7
|
-
</div>
|
|
8
|
-
<table class="performance-table">
|
|
9
|
-
<thead>
|
|
10
|
-
<tr>
|
|
11
|
-
<th>Component</th>
|
|
12
|
-
<th>Renders</th>
|
|
13
|
-
<th>Avg</th>
|
|
14
|
-
<th>Min</th>
|
|
15
|
-
<th>Max</th>
|
|
16
|
-
<th>Memory</th>
|
|
17
|
-
</tr>
|
|
18
|
-
</thead>
|
|
19
|
-
<tbody>
|
|
20
|
-
${g.map((j)=>`
|
|
21
|
-
<tr>
|
|
22
|
-
<td>${j.componentName}</td>
|
|
23
|
-
<td>${j.renderCount}</td>
|
|
24
|
-
<td>${j.avgRenderTime.toFixed(2)}ms</td>
|
|
25
|
-
<td>${j.minRenderTime.toFixed(2)}ms</td>
|
|
26
|
-
<td>${j.maxRenderTime.toFixed(2)}ms</td>
|
|
27
|
-
<td>${j.memoryUsage?A(j.memoryUsage):"-"}</td>
|
|
28
|
-
</tr>
|
|
29
|
-
`).join("")||'<tr><td colspan="6" class="empty">No data</td></tr>'}
|
|
30
|
-
</tbody>
|
|
31
|
-
</table>
|
|
32
|
-
</div>
|
|
33
|
-
`}function E(){return`
|
|
34
|
-
.performance-panel {
|
|
35
|
-
padding: 12px;
|
|
36
|
-
background: var(--bg-secondary);
|
|
37
|
-
border-radius: 8px;
|
|
38
|
-
}
|
|
39
|
-
.performance-header {
|
|
40
|
-
display: flex;
|
|
41
|
-
justify-content: space-between;
|
|
42
|
-
align-items: center;
|
|
43
|
-
margin-bottom: 12px;
|
|
44
|
-
}
|
|
45
|
-
.performance-header h3 {
|
|
46
|
-
margin: 0;
|
|
47
|
-
font-size: 14px;
|
|
48
|
-
}
|
|
49
|
-
.performance-table {
|
|
50
|
-
width: 100%;
|
|
51
|
-
border-collapse: collapse;
|
|
52
|
-
font-size: 12px;
|
|
53
|
-
}
|
|
54
|
-
.performance-table th,
|
|
55
|
-
.performance-table td {
|
|
56
|
-
padding: 6px 8px;
|
|
57
|
-
text-align: left;
|
|
58
|
-
border-bottom: 1px solid var(--border);
|
|
59
|
-
}
|
|
60
|
-
.performance-table th {
|
|
61
|
-
font-weight: 600;
|
|
62
|
-
color: var(--text-secondary);
|
|
63
|
-
}
|
|
64
|
-
.performance-table .empty {
|
|
65
|
-
text-align: center;
|
|
66
|
-
color: var(--text-secondary);
|
|
67
|
-
padding: 20px;
|
|
68
|
-
}
|
|
69
|
-
`}function G(){return`
|
|
70
|
-
<script>
|
|
71
|
-
window.__stxPerformance = {
|
|
72
|
-
metrics: new Map(),
|
|
73
|
-
|
|
74
|
-
recordRender(componentId, componentName, duration, props) {
|
|
75
|
-
let m = this.metrics.get(componentId);
|
|
76
|
-
if (!m) {
|
|
77
|
-
m = {
|
|
78
|
-
componentId,
|
|
79
|
-
componentName,
|
|
80
|
-
renderCount: 0,
|
|
81
|
-
totalRenderTime: 0,
|
|
82
|
-
avgRenderTime: 0,
|
|
83
|
-
minRenderTime: Infinity,
|
|
84
|
-
maxRenderTime: 0,
|
|
85
|
-
lastRenderTime: 0,
|
|
86
|
-
history: []
|
|
87
|
-
};
|
|
88
|
-
this.metrics.set(componentId, m);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
m.renderCount++;
|
|
92
|
-
m.totalRenderTime += duration;
|
|
93
|
-
m.avgRenderTime = m.totalRenderTime / m.renderCount;
|
|
94
|
-
m.minRenderTime = Math.min(m.minRenderTime, duration);
|
|
95
|
-
m.maxRenderTime = Math.max(m.maxRenderTime, duration);
|
|
96
|
-
m.lastRenderTime = duration;
|
|
97
|
-
|
|
98
|
-
m.history.push({ timestamp: Date.now(), duration, props });
|
|
99
|
-
if (m.history.length > 100) m.history.shift();
|
|
100
|
-
|
|
101
|
-
this.updatePanel();
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
getMetrics() {
|
|
105
|
-
return Array.from(this.metrics.values());
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
clear() {
|
|
109
|
-
this.metrics.clear();
|
|
110
|
-
this.updatePanel();
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
updatePanel() {
|
|
114
|
-
const panel = document.getElementById('performance-panel');
|
|
115
|
-
if (panel) {
|
|
116
|
-
// Update panel content
|
|
117
|
-
window.dispatchEvent(new CustomEvent('stx:performance-update', {
|
|
118
|
-
detail: { metrics: this.getMetrics() }
|
|
119
|
-
}));
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
|
|
123
|
-
// Timer helper
|
|
124
|
-
startTimer(componentId, componentName) {
|
|
125
|
-
const start = performance.now();
|
|
126
|
-
return {
|
|
127
|
-
end: (props) => {
|
|
128
|
-
const duration = performance.now() - start;
|
|
129
|
-
this.recordRender(componentId, componentName, duration, props);
|
|
130
|
-
return duration;
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
window.clearPerformanceMetrics = () => window.__stxPerformance.clear();
|
|
137
|
-
</script>
|
|
138
|
-
`}function A(g){if(g<1024)return`${g}B`;if(g<1048576)return`${(g/1024).toFixed(1)}KB`;return`${(g/1048576).toFixed(1)}MB`}
|
|
139
|
-
export{w as Zb,x as _b,C as $b,D as ac,E as bc,G as cc};
|
package/dist/chunk-jjvp4t5w.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Dy as w}from"./chunk-ht4j68cs.js";import{Uy as v}from"./chunk-cz25azze.js";function F(j){let{type:B,message:D,code:q,filePath:G,line:I,column:U,template:M,offset:J,snippet:K,suggestion:Q,format:R="text"}=j,V=I,Y=U;if(!V&&M&&J!==void 0){let _=T(M,J);V=_.line,Y=_.column}let Z=G?w(G):void 0,b=q?v(q):void 0,W={type:B,code:q,codeName:b,message:D,filePath:Z,line:V,column:Y,snippet:K,suggestion:Q,timestamp:new Date().toISOString()},X;switch(R){case"html":X=O(W);break;case"json":X=JSON.stringify(W,null,2);break;case"console":X=N(W,M,J);break;case"text":default:X=k(W,M,J);break}return{formatted:X,data:W}}function k(j,B,D){let q=[],G=j.code?` [${j.codeName||j.code}]`:"";if(q.push(`[${j.type} Error${G}]`),j.filePath){let I=j.filePath;if(j.line){if(I+=`:${j.line}`,j.column)I+=`:${j.column}`}q.push(`at ${I}`)}if(q.push(`
|
|
3
|
-
${j.message}`),B&&j.line){let I=A(B,j.line,2);if(I)q.push(`
|
|
4
|
-
${I}`)}if(j.snippet)q.push(`
|
|
5
|
-
Snippet: ${j.snippet}`);if(j.suggestion)q.push(`
|
|
6
|
-
Suggestion: ${j.suggestion}`);return q.join(" ")}function O(j){let B=j.code?` [${j.code}]`:"",D=j.filePath?` in ${j.filePath}${j.line?`:${j.line}`:""}`:"",q=`<!-- [${j.type} Error${B}]${D}: ${$(j.message)}`;if(j.suggestion)q+=` | Suggestion: ${$(j.suggestion)}`;return q+=" -->",q}function N(j,B,D){let K=[],Q=j.code?` [${j.codeName||j.code}]`:"";if(K.push(`\x1B[1m${"\x1B[31m"}\u2501\u2501\u2501 ${j.type} Error${Q} \u2501\u2501\u2501${"\x1B[0m"}`),j.filePath){let R=`\x1B[36m${j.filePath}\x1B[0m`;if(j.line){if(R+=`\x1B[90m:${j.line}\x1B[0m`,j.column)R+=`\x1B[90m:${j.column}\x1B[0m`}K.push(`
|
|
7
|
-
\x1B[90mat\x1B[0m ${R}`)}if(K.push(`
|
|
8
|
-
|
|
9
|
-
${j.message}`),B&&j.line){let R=P(B,j.line,2);if(R)K.push(`
|
|
10
|
-
|
|
11
|
-
\x1B[90mContext:\x1B[0m
|
|
12
|
-
${R}`)}if(j.suggestion)K.push(`
|
|
13
|
-
|
|
14
|
-
\x1B[33mSuggestion:\x1B[0m ${j.suggestion}`);return K.push(`
|
|
15
|
-
${"\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"}`),K.join("")}function A(j,B,D){let q=j.split(`
|
|
16
|
-
`),G=Math.max(0,B-D-1),I=Math.min(q.length-1,B+D-1),U=[];for(let M=G;M<=I;M++){let J=(M+1).toString().padStart(4),K=M===B-1?">":" ";U.push(`${K}${J} | ${q[M]}`)}return U.join(`
|
|
17
|
-
`)}function P(j,B,D){let q=j.split(`
|
|
18
|
-
`),G=Math.max(0,B-D-1),I=Math.min(q.length-1,B+D-1),U="\x1B[90m",M="\x1B[31m",J="\x1B[0m",K=[];for(let Q=G;Q<=I;Q++){let R=(Q+1).toString().padStart(4),V=Q===B-1,Y=V?"\x1B[31m>\x1B[0m":" ",Z=V?`\x1B[31m${q[Q]}\x1B[0m`:`\x1B[90m${q[Q]}\x1B[0m`;K.push(`${Y}\x1B[90m${R}\x1B[0m | ${Z}`)}return K.join(`
|
|
19
|
-
`)}function $(j){return j.replace(/--/g,"- -").replace(/>/g,">")}function T(j,B){let q=j.substring(0,B).split(`
|
|
20
|
-
`);return{line:q.length,column:q[q.length-1].length}}function h(j,B,D){return F({type:j,message:B,code:D,format:"html"}).formatted}function y(j,B,D,q,G){return F({type:j,message:B,code:G,filePath:D,line:q,format:"console"}).formatted}function H(j,B,D){let q=D.template.split(`
|
|
21
|
-
`),G=T(D.template,D.offset),I=`[${j} Error at line ${G.line} in ${D.filePath}]: ${B}
|
|
22
|
-
|
|
23
|
-
`,U=Math.max(0,G.line-3),M=Math.min(q.length-1,G.line+2);I+=`Context:
|
|
24
|
-
`;for(let J=U;J<=M;J++){let K=J+1,Q=q[J]||"",R=J===G.line-1?">":" ";I+=`${R} ${K.toString().padStart(3)}: ${Q}
|
|
25
|
-
`}if(G.line-1<q.length){let J=" ".repeat(G.column+5);I+=`${J}^
|
|
26
|
-
`}return I}function C(j,B,D){try{return j()}catch(q){if(D&&q instanceof Error)D(q);return B}}async function S(j,B,D){try{return await j()}catch(q){if(D&&q instanceof Error)D(q);return B}}
|
|
27
|
-
export{F as qy,h as ry,y as sy,H as ty,C as uy,S as vy};
|
package/dist/chunk-jt44av4j.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
var Z=Symbol.for("stx.Fragment"),R=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),V=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),I={className:"class",htmlFor:"for",tabIndex:"tabindex",autoFocus:"autofocus",autoPlay:"autoplay",crossOrigin:"crossorigin",dateTime:"datetime",encType:"enctype",formAction:"formaction",formEncType:"formenctype",formMethod:"formmethod",formNoValidate:"formnovalidate",formTarget:"formtarget",frameBorder:"frameborder",hrefLang:"hreflang",httpEquiv:"http-equiv",inputMode:"inputmode",maxLength:"maxlength",mediaGroup:"mediagroup",minLength:"minlength",noModule:"nomodule",noValidate:"novalidate",playsInline:"playsinline",readOnly:"readonly",rowSpan:"rowspan",colSpan:"colspan",srcDoc:"srcdoc",srcLang:"srclang",srcSet:"srcset",useMap:"usemap"};function D(q){return q.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function J(q){return q.replace(/&/g,"&").replace(/"/g,""")}function f(q){if(q==null||typeof q==="boolean")return[];if(!Array.isArray(q))return[B(q)];return q.flat(1/0).map(B).filter((w)=>w!=="")}function B(q){if(q==null||typeof q==="boolean")return"";if(typeof q==="string")return q;if(typeof q==="number")return String(q);return q}function $(q,w,K){let{children:G,ref:Q,key:U,...X}=w||{};return{type:q,props:Object.keys(X).length>0?X:null,children:f(G),key:K??U??void 0,ref:Q??void 0}}var j=$,E=$;function z(q){return Object.entries(q).filter(([,w])=>w!=null&&w!==!1).map(([w,K])=>{let G=w.replace(/[A-Z]/g,(U)=>`-${U.toLowerCase()}`),Q=typeof K==="number"&&!G.startsWith("--")&&G!=="opacity"&&G!=="z-index"&&G!=="flex-grow"&&G!=="flex-shrink"&&G!=="order"&&G!=="font-weight"&&G!=="line-height"?`${K}px`:String(K);return`${G}: ${Q}`}).join("; ")}function W(q){if(typeof q==="string")return q;if(Array.isArray(q))return q.filter(Boolean).map(W).join(" ");if(typeof q==="object"&&q!==null)return Object.entries(q).filter(([,w])=>w).map(([w])=>w).join(" ");return""}function F(q){if(!q)return"";let w=[];for(let[K,G]of Object.entries(q)){if(K==="key"||K==="ref"||K==="children"||K==="innerHTML"||K==="dangerouslySetInnerHTML")continue;if(K.startsWith("on")&&typeof G==="function")continue;let Q=I[K]||K;if(Q==="class"||Q==="className"){let U=W(G);if(U)w.push(` class="${J(U)}"`);continue}if(Q==="style"){let U=typeof G==="string"?G:z(G);if(U)w.push(` style="${J(U)}"`);continue}if(V.has(Q)){if(G)w.push(` ${Q}`);continue}if(G!=null&&G!==!1)w.push(` ${Q}="${J(String(G))}"`)}return w.join("")}function Y(q){if(q==null||typeof q==="boolean")return"";if(typeof q==="string")return D(q);if(typeof q==="number")return String(q);if(Array.isArray(q))return q.map(Y).join("");if(q.type===Z)return q.children.map(Y).join("");if(typeof q.type==="function"){let U=q.type({...q.props,children:q.children.length===1?q.children[0]:q.children.length>0?q.children:void 0});return Y(U)}let w=q.type,K=F(q.props),G=q.props?.innerHTML??q.props?.dangerouslySetInnerHTML?.__html;if(G!=null)return`<${w}${K}>${G}</${w}>`;if(R.has(w))return`<${w}${K}>`;let Q=q.children.map(Y).join("");return`<${w}${K}>${Q}</${w}>`}function H(q){return new ReadableStream({start(w){w.enqueue(Y(q)),w.close()}})}function _(q,w){if(!w)return;for(let[K,G]of Object.entries(w)){if(K==="key"||K==="ref"||K==="children"||K==="innerHTML"||K==="dangerouslySetInnerHTML")continue;let Q=I[K]||K;if(K.startsWith("on")&&typeof G==="function"){let U=K.slice(2).toLowerCase();q.addEventListener(U,G);continue}if(Q==="class"||Q==="className"){let U=W(G);if(U)q.setAttribute("class",U);continue}if(Q==="style"){let U=typeof G==="string"?G:z(G);if(U)q.setAttribute("style",U);continue}if(V.has(Q)){if(G)q.setAttribute(Q,"");continue}if(G!=null&&G!==!1)q.setAttribute(Q,String(G))}}function b(q,w){if(q==null||typeof q==="boolean")return;if(typeof q==="string"){w.appendChild(document.createTextNode(q));return}if(typeof q==="number"){w.appendChild(document.createTextNode(String(q)));return}if(Array.isArray(q)){for(let Q of q)b(Q,w);return}if(q.type===Z){for(let Q of q.children)b(Q,w);return}if(typeof q.type==="function"){let Q=q.type({...q.props,children:q.children.length===1?q.children[0]:q.children.length>0?q.children:void 0});b(Q,w);return}let K=document.createElement(q.type);_(K,q.props);let G=q.props?.innerHTML??q.props?.dangerouslySetInnerHTML?.__html;if(G!=null)K.innerHTML=G;else for(let Q of q.children)b(Q,K);if(q.ref){if(typeof q.ref==="function")q.ref(K)}w.appendChild(K)}function C(q){if(q.when)return $(Z,{children:q.children});return q.fallback??null}function L(q){let w=q.each;if(!w||w.length===0)return q.fallback??null;let K=Array.isArray(q.children)?q.children[0]:q.children,G=w.map((Q,U)=>K(Q,U));return $(Z,{children:G})}function M(q){return $(Z,{children:q.children})}function P(q,w,...K){let{key:G,ref:Q,...U}=w||{};return{type:q,props:Object.keys(U).length>0?U:{},children:f(K.length===1?K[0]:K),key:G??void 0,ref:Q??void 0}}
|
|
3
|
-
export{Z as Bl,$ as Cl,j as Dl,E as El,Y as Fl,H as Gl,b as Hl,C as Il,L as Jl,M as Kl,P as Ll};
|
package/dist/chunk-jt98jhpt.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
var I=new Map,Q=new Map;function z(j,B){let G=B?.id||s(j),J=l(j),U=I.get(G);if(U&&U.hash===J)return U;let X=v(j),Z=h(j),Y=m(j),_=x(X),{staticParts:q,dynamicParts:$}=g(X),F=p(j),O={id:G,hash:J,tree:X,scripts:Z,styles:Y,staticParts:q,dynamicParts:$,dependencies:F,metadata:_};return I.set(G,O),O}async function H(j,B={},G={}){let J=performance.now();if(G.cache){let Y=`${j.id}:${JSON.stringify(B)}`,_=Q.get(Y);if(_&&Date.now()-_.timestamp<(G.cacheTTL||60000))return{html:_.html,styles:j.styles.join(`
|
|
3
|
-
`),scripts:j.scripts.join(`
|
|
4
|
-
`),metadata:{renderTime:0,cacheHit:!0,totalSize:_.html.length,componentCount:j.metadata.componentCount}}}let U;if(G.streaming)U=await y(j.tree,B);else U=W(j.tree,B);let X;if(G.hydrate){let Y=u(U,j,B);U=Y.html,X=Y.data}if(G.minify)U=i(U);if(G.cache){let Y=`${j.id}:${JSON.stringify(B)}`;Q.set(Y,{html:U,timestamp:Date.now()})}let Z=performance.now()-J;return{html:U,styles:j.styles.join(`
|
|
5
|
-
`),scripts:j.scripts.join(`
|
|
6
|
-
`),hydrationData:X,metadata:{renderTime:Z,cacheHit:!1,totalSize:U.length,componentCount:j.metadata.componentCount}}}function k(j,B){let G=[],J=[],U=[],X=new Map,Z=[];return K(j.tree,(Y,_)=>{if(Y.type==="component"&&Y.componentName){if(L(Y.componentName))G.push(Y.componentName)}if(Y.type==="element"&&Y.tag){let q=d(Y);if(q)Z.push(q);if(Y.props){for(let[$,F]of Object.entries(Y.props))if($.startsWith("on")&&typeof F==="string"){let O=`handler_${X.size}`;X.set(O,F)}}}if(Y.isStatic&&Y.type==="element")J.push(D(Y));else if(!Y.isStatic&&Y.type!=="text")U.push(Y.tag||Y.componentName||"unknown")}),{nativeComponents:G,staticHTML:J,dynamicParts:U,eventHandlers:X,nativeWidgets:Z}}function f(j,B={}){let G=z(j),J=T(G,B),U=new Map,X=[];return K(G.tree,(Z)=>{if(Z.type==="component"&&Z.componentName){if(L(Z.componentName)){X.push(Z.componentName);let Y=`<!--craft:${Z.componentName}:${Z.hydrationKey||"default"}-->`;U.set(Z.hydrationKey||Z.componentName,Y)}}}),{staticHTML:J,dynamicPlaceholders:U,craftComponents:X}}function v(j){let B={type:"fragment",children:[]},G=B,J=[B],U=j,X=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);while(U.length>0){let Z=U.match(/^<(@?[\w-]+)([^>]*)>/);if(Z){let[q,$,F]=Z,O=C(F),V=$.startsWith("@craft-"),N=V?$:$.toLowerCase(),w={type:V?"component":"element",tag:N,props:O,children:[],componentName:V?N.slice(1):void 0,isStatic:!A(F),hydrationKey:c()};if(G.children=G.children||[],G.children.push(w),!X.has(N)&&!F.endsWith("/"))J.push(w),G=w;U=U.slice(q.length);continue}let Y=U.match(/^<\/(@?[\w-]+)>/);if(Y){let[q,$]=Y,O=$.startsWith("@craft-")?$:$.toLowerCase();while(J.length>1){let V=J.pop();if(G=J[J.length-1],V.tag===O)break}U=U.slice(q.length);continue}let _=U.match(/^[^<]+/);if(_){let q=_[0];if(q.trim()){let $={type:"text",text:q,isStatic:!A(q)};G.children=G.children||[],G.children.push($)}U=U.slice(q.length);continue}U=U.slice(1)}return B}function C(j){let B={},G=/([\w-:@]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S+)))?/g,J;while((J=G.exec(j))!==null){let[,U,X,Z,Y]=J,_=X??Z??Y??!0;B[U]=_}return B}function K(j,B,G=[]){if(B(j,G),j.children)j.children.forEach((J,U)=>{K(J,B,[...G,`${U}`])})}function W(j,B){switch(j.type){case"text":return P(j.text||"",B);case"element":case"component":{let G=j.tag||"div",J=E(j.props||{},B),U=(j.children||[]).map((X)=>W(X,B)).join("");if(!j.children||j.children.length===0){if(["input","br","hr","img","meta","link"].includes(G))return`<${G}${J} />`}return`<${G}${J}>${U}</${G}>`}case"fragment":return(j.children||[]).map((G)=>W(G,B)).join("");case"slot":return`<!--slot:${j.slotName||"default"}-->`;default:return""}}function D(j){if(j.type==="text")return j.text||"";let B=j.tag||"div",G=E(j.props||{},{});return`<${B}${G}></${B}>`}function E(j,B){let G=[];for(let[J,U]of Object.entries(j))if(U===!0)G.push(` ${J}`);else if(U!==!1&&U!==null&&U!==void 0){let X=P(String(U),B);G.push(` ${J}="${R(X)}"`)}return G.join("")}async function y(j,B){return W(j,B)}function T(j,B){let G=[];return K(j.tree,(J)=>{if(J.isStatic)G.push(W(J,B))}),G.join("")}function u(j,B,G){let J={templateId:B.id,context:G,dynamicParts:Array.from(B.dynamicParts.entries())},U=`
|
|
7
|
-
<script data-craft-hydration>
|
|
8
|
-
window.__CRAFT_HYDRATION__ = ${JSON.stringify(J)};
|
|
9
|
-
</script>`;return{html:j+U,data:J}}function x(j){let B=!1,G=!1,J=!1,U=!1,X=0,Z=0;function Y(_,q){if(Z=Math.max(Z,q),_.type==="slot")B=!0;if(_.type==="component")X++;if(!_.isStatic)G=!0;if(_.props)for(let $ of Object.keys(_.props)){if($.startsWith("on"))J=!0;if($==="@async"||$==="data-async")U=!0}if(_.children)_.children.forEach(($)=>Y($,q+1))}return Y(j,0),{hasSlots:B,hasDynamicContent:G,hasEventHandlers:J,hasAsyncContent:U,componentCount:X,maxDepth:Z,estimatedSize:JSON.stringify(j).length}}function g(j){let B=new Map,G=new Map;return K(j,(J,U)=>{let X=U.join(".");if(J.isStatic)B.set(X,D(J));else G.set(X,J.tag||J.componentName||"dynamic")}),{staticParts:B,dynamicParts:G}}function h(j){let B=[],G=/<script[^>]*>([\s\S]*?)<\/script>/gi,J;while((J=G.exec(j))!==null)B.push(J[1]);return B}function m(j){let B=[],G=/<style[^>]*>([\s\S]*?)<\/style>/gi,J;while((J=G.exec(j))!==null)B.push(J[1]);return B}function p(j){let B=[],G=/@include\s*\(\s*['"]([^'"]+)['"]/g,J;while((J=G.exec(j))!==null)B.push(J[1]);let U=/@component\s*\(\s*['"]([^'"]+)['"]/g;while((J=U.exec(j))!==null)B.push(J[1]);let X=/<@craft-[\w-]+/g;while((J=X.exec(j))!==null)B.push(J[0].slice(2));return[...new Set(B)]}function A(j){return/\{\{.*?\}\}|\{\!\!.*?\!\!\}/.test(j)}function P(j,B){let G=j.replace(/\{\{\s*(.+?)\s*\}\}/g,(J,U)=>{try{let X=b(U.trim(),B);return R(String(X??""))}catch{return""}});return G=G.replace(/\{!!\s*(.+?)\s*!!\}/g,(J,U)=>{try{let X=b(U.trim(),B);return String(X??"")}catch{return""}}),G}function b(j,B){if(/^[\w.]+$/.test(j)){let G=j.split("."),J=B;for(let U of G)if(J&&typeof J==="object"&&U in J)J=J[U];else return;return J}try{return Function(...Object.keys(B),`return ${j}`)(...Object.values(B))}catch{return}}function R(j){return j.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function i(j){return j.replace(/\s+/g," ").replace(/>\s+</g,"><").replace(/\s+>/g,">").replace(/<\s+/g,"<").trim()}function s(j){let B=0;for(let G=0;G<j.length;G++){let J=j.charCodeAt(G);B=(B<<5)-B+J,B=B&B}return`tpl_${Math.abs(B).toString(36)}`}function l(j){let B=0;for(let G=0;G<j.length;G++){let J=j.charCodeAt(G);B=(B<<5)-B+J,B=B&B}return Math.abs(B).toString(36)}var r=0;function c(){return`h_${++r}`}function L(j){return["craft-button","craft-text-input","craft-textarea","craft-checkbox","craft-radio","craft-select","craft-slider","craft-toggle","craft-date-picker","craft-time-picker","craft-color-picker","craft-file-input","craft-modal","craft-alert","craft-toast","craft-progress","craft-spinner","craft-avatar","craft-badge","craft-card","craft-accordion","craft-tabs","craft-tooltip","craft-popover","craft-dropdown","craft-context-menu","craft-data-table","craft-virtual-list","craft-tree-view","craft-map","craft-chart","craft-video","craft-audio","craft-webview","craft-canvas","craft-image-viewer","craft-pdf-viewer","craft-code-editor","craft-rich-editor"].includes(j)}function d(j){let B=j.tag?.toLowerCase(),G=j.props?.type,J={button:{component:"craft-button",confidence:0.95,reason:"Native button provides better touch feedback"},"input:text":{component:"craft-text-input",confidence:0.9,reason:"Native text input has better keyboard handling"},"input:checkbox":{component:"craft-checkbox",confidence:0.95,reason:"Native checkbox follows platform conventions"},"input:range":{component:"craft-slider",confidence:0.9,reason:"Native slider provides smooth interaction"},"input:date":{component:"craft-date-picker",confidence:0.95,reason:"Native date picker provides platform-specific UI"},"input:time":{component:"craft-time-picker",confidence:0.95,reason:"Native time picker provides platform-specific UI"},"input:color":{component:"craft-color-picker",confidence:0.9,reason:"Native color picker provides platform-specific UI"},textarea:{component:"craft-textarea",confidence:0.85,reason:"Native textarea handles multiline input better"},select:{component:"craft-select",confidence:0.9,reason:"Native select provides platform dropdown UI"},progress:{component:"craft-progress",confidence:0.95,reason:"Native progress bar matches platform style"},video:{component:"craft-video",confidence:0.95,reason:"Native video provides hardware acceleration"},audio:{component:"craft-audio",confidence:0.95,reason:"Native audio provides system integration"},dialog:{component:"craft-modal",confidence:0.9,reason:"Native modal provides proper layering and focus"}},U=G?`${B}:${G}`:B,X=J[U||""]||J[B||""];if(X)return{htmlSelector:U||B||"",nativeComponent:X.component,confidence:X.confidence,reason:X.reason};return null}function S(){I.clear()}function M(){Q.clear()}function o(){S(),M()}function a(){return{templateCacheSize:I.size,renderCacheSize:Q.size,totalEntries:I.size+Q.size}}var n={compileTemplate:z,renderSSR:H,generateCraftOptimizations:k,prerenderForCraft:f,clearTemplateCache:S,clearRenderCache:M,clearAllCaches:o,getSSRCacheStats:a},e=n;
|
|
10
|
-
export{z as No,H as Oo,k as Po,f as Qo,S as Ro,M as So,o as To,a as Uo,e as Vo};
|
package/dist/chunk-k8440jxh.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{rB as D}from"./chunk-3jm3snz8.js";var q=null;async function E(){if(q!==null)return q;try{let j=await import("stx-router");if(typeof j.getRouterScript==="function")q=j.getRouterScript();else q=""}catch{q=""}return q}async function G(j,B){let z=await E();if(!z)return j;let C={interceptAllLinks:!0,container:"main",...B},A=`${`<script>window.__stxRouterConfig=${JSON.stringify(C)};</script>
|
|
3
|
-
`}<script>${z}</script>`;if(/<\/body>/i.test(j))return j.replace(/<\/body>/i,`${A}
|
|
4
|
-
</body>`);return`${j}
|
|
5
|
-
${A}`}
|
|
6
|
-
export{G as dh};
|
package/dist/chunk-kdxa9epn.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{rB as W}from"./chunk-3jm3snz8.js";function Y(k){if(k.includes("window.StacksBrowser")||k.includes("StacksBrowser ="))return k;let H=/<script\b(?![^>]*\bserver\b)[^>]*>([\s\S]*?)<\/script>/gi,q="",F;while((F=H.exec(k))!==null)q+=F[1]+`
|
|
3
|
-
`;let G=/\{\{([\s\S]*?)\}\}/g;while((F=G.exec(k))!==null)q+=F[1]+`
|
|
4
|
-
`;if(!q.trim())return k;let A=["browserQuery","BrowserQueryBuilder","configureBrowser","createBrowserModel"].some((N)=>{return new RegExp(`\\b${N}\\b`).test(q)}),z=new Set(["Promise","Object","Array","Map","Set","Date","Error","JSON","Math","Number","String","RegExp","Symbol","WeakMap","WeakSet","Proxy","Reflect","Intl","URL","URLSearchParams","FormData","Headers","Request","Response","AbortController","EventTarget","Element","Document","Node","Window","Console","Storage","Navigator","Blob","File","FileReader","HTMLElement","SVGElement","Event","CustomEvent","DOMParser","XMLSerializer","WebSocket","Worker","SharedWorker","IntersectionObserver","MutationObserver","ResizeObserver","PerformanceObserver","Notification","Bun","Buffer","Process"]),K=/\b([A-Z][a-zA-Z0-9]*)\s*\.\s*(all|find|first|get|where|orderBy|orderByDesc|limit|select|pluck|create|update|delete)\s*\(/g,T,V=!1;while((T=K.exec(q))!==null)if(!z.has(T[1])){V=!0;break}if(!A&&!V)return k;let L=`<script type="module">
|
|
5
|
-
// STX: Auto-load @stacksjs/browser (auto-initializes API and loads models)
|
|
6
|
-
import '@stacksjs/browser'
|
|
7
|
-
</script>`;if(k.includes("</head>")){let N=k.indexOf("</head>"),Q=k.slice(0,N).indexOf("<script");if(Q!==-1)return k.slice(0,Q)+L+`
|
|
8
|
-
`+k.slice(Q);return k.replace("</head>",`${L}
|
|
9
|
-
</head>`)}if(k.includes("<body"))return k.replace(/<body([^>]*)>/,`<body$1>
|
|
10
|
-
${L}`);return L+`
|
|
11
|
-
`+k}async function Z(k,H){if(k.includes("window.stx.state")||k.includes("STX Signals Runtime"))return k;if(H.buildMode==="compile"){let z=k.indexOf("<script");if(z!==-1)return k.slice(0,z)+`<script src="/__stx/runtime.__STX_HASH__.js"></script>
|
|
12
|
-
`+k.slice(z);if(k.includes("</head>")){let K=k.indexOf("</head>");return k.slice(0,K)+`<script src="/__stx/runtime.__STX_HASH__.js"></script>
|
|
13
|
-
`+k.slice(K)}return`<script src="/__stx/runtime.__STX_HASH__.js"></script>
|
|
14
|
-
`+k}let{getCachedSignalsRuntime:q}=await import("././caching.js"),G=`<script data-stx-scoped>${await q(H.debug)}</script>`,J=k.indexOf("<script");if(J!==-1)return k.slice(0,J)+G+`
|
|
15
|
-
`+k.slice(J);if(k.includes("</head>")){let A=k.indexOf("</head>");return k.slice(0,A)+G+`
|
|
16
|
-
`+k.slice(A)}if(k.includes("<body")){let A=k.indexOf("<body"),z=k.indexOf(">",A);return k.slice(0,z+1)+`
|
|
17
|
-
`+G+k.slice(z+1)}return G+`
|
|
18
|
-
`+k}async function _(k,H){if(!k.includes("</body>"))return k;if(k.includes("__stxRouter)return")||k.includes("__stxRouter=true"))return k;let q=H?.router,F="";if(q){let z={};if(q.container)z.container=q.container;if(q.interceptAllLinks!==void 0)z.interceptAllLinks=q.interceptAllLinks;if(q.progress!==void 0)z.progress=q.progress;if(q.viewTransitions!==void 0)z.viewTransitions=q.viewTransitions;if(q.viewTransitionDuration!==void 0)z.viewTransitionDuration=q.viewTransitionDuration;if(q.viewTransitionEasing!==void 0)z.viewTransitionEasing=q.viewTransitionEasing;if(q.scrollToTop!==void 0)z.scrollToTop=q.scrollToTop;if(q.prefetch!==void 0)z.prefetch=q.prefetch;if(q.cache!==void 0)z.cache=q.cache;if(q.progressColor!==void 0)z.progressColor=q.progressColor;if(q.progressHeight!==void 0)z.progressHeight=q.progressHeight;if(Object.keys(z).length>0)F=`<script>window.__stxRouterConfig=${JSON.stringify(z)};</script>
|
|
19
|
-
`}let{getCachedRouterScript:G}=await import("././caching.js"),J=H?.buildMode==="compile"?'<script src="/__stx/router.__STX_HASH__.js"></script>':`<script>${await G()}</script>`,A=k.lastIndexOf("</body>");return k.slice(0,A)+F+J+`
|
|
20
|
-
</body>`+k.slice(A+7)}
|
|
21
|
-
export{Y as Qt,Z as Rt,_ as St};
|
package/dist/chunk-kfd2hf6f.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Jm as F,Km as v,Lm as S,Mm as b,Nm as B,Om as _,Vm as k,Xm as y,Ym as T}from"./chunk-cygfdk1n.js";import W from"fs";import L from"path";function m(K={}){let{inputDirs:j=["public","src/assets","assets"],outputDir:G="dist/images",baseUrl:J="/images",formats:C=v,widths:X=F,quality:Z=S,placeholder:R="none",concurrency:z=4,cache:U=!0,cacheDir:w=".stx/image-cache",referencedOnly:E=!1,verbose:Q=!1}=K,N={imageReferences:new Set,processedImages:new Map,stats:{totalImages:0,optimizedImages:0,savedBytes:0,variants:0}};return{name:"stx-image-optimization",async setup(H){if(!await B()){console.warn("[stx-images] no image backend available, optimization disabled");return}if(U)await W.promises.mkdir(w,{recursive:!0});if(Q){let V=await b();console.log("[stx-images] Plugin initialized"),console.log(` Backend: ${V?"sharp (native fast path) + ts-images":"ts-images (pure TS)"}`),console.log(` Input dirs: ${j.join(", ")}`),console.log(` Output dir: ${G}`),console.log(` Formats: ${C.join(", ")}`),console.log(` Widths: ${X.join(", ")}`)}},async buildStart(){N.imageReferences.clear(),N.processedImages.clear(),N.stats={totalImages:0,optimizedImages:0,savedBytes:0,variants:0}},async transform(H,M){if(M.endsWith(".html")||M.endsWith(".stx")){let V=f(H);for(let $ of V)N.imageReferences.add($)}if(H.includes("<Image")||H.includes("@image"))return await l(H,{formats:C,widths:X,quality:Z,placeholder:R,outputDir:G,baseUrl:J,processedImages:N.processedImages});return H},async buildEnd(H){if(!await B())return;await W.promises.mkdir(G,{recursive:!0});let V=[];for(let O of j){if(!W.existsSync(O))continue;let Y=await x(O);V.push(...Y)}let $=E?V.filter((O)=>d(O,N.imageReferences)):V;if(N.stats.totalImages=$.length,Q)console.log(`[stx-images] Processing ${$.length} images...`);let I=A($,z);for(let O of I)await Promise.all(O.map(async(Y)=>{try{let q=await _(Y,{formats:C,widths:X,quality:Z,placeholder:R,outputDir:G,baseUrl:J});N.processedImages.set(Y,q),N.stats.optimizedImages++,N.stats.variants+=q.variants.length;let D=W.statSync(Y).size,P=y(q.variants);if(N.stats.savedBytes+=Math.max(0,D-P/q.variants.length),Q)console.log(` \u2713 ${L.basename(Y)} \u2192 ${q.variants.length} variants`)}catch(q){console.error(`[stx-images] Error processing ${Y}:`,q)}}));if(console.log("[stx-images] Optimization complete:"),console.log(` Images: ${N.stats.optimizedImages}/${N.stats.totalImages}`),console.log(` Variants: ${N.stats.variants}`),N.stats.savedBytes>0)console.log(` Saved: ~${T(N.stats.savedBytes)}`)}}}function f(K){let j=[],G=/src=["']([^"']+\.(jpg|jpeg|png|webp|avif|gif))["']/gi,J;while((J=G.exec(K))!==null)j.push(J[1]);let C=/<Image[^>]+src=["']([^"']+)["']/gi;while((J=C.exec(K))!==null)j.push(J[1]);let X=/@image\s*\(\s*['"]([^'"]+)['"]/gi;while((J=X.exec(K))!==null)j.push(J[1]);let Z=/background(?:-image)?:\s*url\(["']?([^"')]+\.(jpg|jpeg|png|webp|avif|gif))["']?\)/gi;while((J=Z.exec(K))!==null)j.push(J[1]);return j}function d(K,j){let G=L.basename(K);for(let J of j)if(J.endsWith(G)||J.includes(G))return!0;return!1}async function l(K,j){return K}async function x(K){let j=[];async function G(J){let C=await W.promises.readdir(J,{withFileTypes:!0});for(let X of C){let Z=L.join(J,X.name);if(X.isDirectory())await G(Z);else if(X.isFile()&&k(Z))j.push(Z)}}return await G(K),j}function A(K,j){let G=[];for(let J=0;J<K.length;J+=j)G.push(K.slice(J,J+j));return G}async function n(K,j,G={}){if(!await B())throw Error("No image backend available \u2014 install sharp or ensure ts-images is bundled");return _(K,{...G,outputDir:j})}async function o(K,j,G={}){let{formats:J=v,widths:C=F,quality:X=S,placeholder:Z="none",concurrency:R=4,verbose:z=!1}=G;if(!await B())throw Error("No image backend available \u2014 install sharp or ensure ts-images is bundled");await W.promises.mkdir(j,{recursive:!0});let w=await x(K),E=[],Q={totalImages:w.length,optimizedImages:0,savedBytes:0,variants:0},N=A(w,R);for(let H of N){let M=await Promise.all(H.map(async(V)=>{try{let $=await _(V,{formats:J,widths:C,quality:X,placeholder:Z,outputDir:j,baseUrl:"/"});if(Q.optimizedImages++,Q.variants+=$.variants.length,z)console.log(` \u2713 ${L.basename(V)}`);return $}catch($){return console.error(`Error processing ${V}:`,$),null}}));E.push(...M.filter((V)=>V!==null))}return{processed:E,stats:Q}}function p(K){let j={};for(let G of K)j[G.src]={variants:G.variants,placeholder:G.placeholder};return j}async function c(K,j){let G=p(K);await Bun.write(j,JSON.stringify(G,null,2))}
|
|
3
|
-
export{m as Bm,n as Cm,o as Dm,p as Em,c as Fm};
|
package/dist/chunk-kgym7ch9.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Buffer as D}from"buffer";var j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function $(k){let y=k<0?(-k<<1)+1:k<<1,J="";do{let z=y&31;if(y>>>=5,y>0)z|=32;J+=j[z]}while(y>0);return J}function w(k){let y=0,J=0,z=0;do{let W=k[z],X=j.indexOf(W);if(X===-1)throw Error(`Invalid Base64 VLQ character: ${W}`);y+=(X&31)<<J,J+=5,z++}while(z<k.length&&j.indexOf(k[z-1])&32);let K=y&1;if(y>>>=1,K)y=-y;return{value:y,rest:k.slice(z)}}class A{file;sourceRoot;sources=[];sourcesContent=new Map;names=[];mappings=[];constructor(k,y){this.file=k,this.sourceRoot=y}addSource(k,y){let J=this.sources.indexOf(k);if(J===-1)J=this.sources.length,this.sources.push(k);if(y!==void 0)this.sourcesContent.set(k,y);return J}addName(k){let y=this.names.indexOf(k);if(y===-1)y=this.names.length,this.names.push(k);return y}addMapping(k){if(k.source&&!k.original)throw Error("Mapping with source must have original position");if(k.source)this.addSource(k.source);if(k.name)this.addName(k.name);this.mappings.push(k)}addMappingRange(k,y,J,z){for(let K=0;K<z;K++)this.addMapping({generated:{line:k.line+K,column:k.column},source:y,original:{line:J.line+K,column:J.column}})}generateMappings(){let k=[...this.mappings].sort((P,U)=>{if(P.generated.line!==U.generated.line)return P.generated.line-U.generated.line;return P.generated.column-U.generated.column}),y=[],J=0,z=0,K=0,W=0,X=0,Y=1;for(let P of k){while(Y<P.generated.line)y.push([]),Y++,J=0;if(!y[Y-1])y[Y-1]=[];let U="";if(U+=$(P.generated.column-J),J=P.generated.column,P.source&&P.original){let T=this.sources.indexOf(P.source);if(U+=$(T-z),z=T,U+=$(P.original.line-1-K),K=P.original.line-1,U+=$(P.original.column-W),W=P.original.column,P.name){let Z=this.names.indexOf(P.name);U+=$(Z-X),X=Z}}y[Y-1].push(U)}return y.map((P)=>P.join(",")).join(";")}toJSON(){let k=this.sources.map((y)=>this.sourcesContent.get(y)??null);return{version:3,file:this.file,sourceRoot:this.sourceRoot,sources:this.sources,sourcesContent:k.some((y)=>y!==null)?k:void 0,names:this.names,mappings:this.generateMappings()}}toString(){return JSON.stringify(this.toJSON())}toDataURL(){let k=this.toString();return`data:application/json;charset=utf-8;base64,${D.from(k).toString("base64")}`}toInlineComment(){return`<!--${["#"," sourceMappingURL="].join("")}${this.toDataURL()} -->`}toJSInlineComment(){return`${["/","/# sourceMappingURL="].join("")}${this.toDataURL()}`}toCSSInlineComment(){return`/*${["#"," sourceMappingURL="].join("")}${this.toDataURL()} */`}}class b{sourceMap;decodedMappings=[];constructor(k){this.sourceMap=typeof k==="string"?JSON.parse(k):k,this.decodeMappings()}decodeMappings(){let k=this.sourceMap.mappings.split(";"),y=1,J=0,z=0,K=0,W=0;for(let X of k){let Y=0;if(X){let P=X.split(",");for(let U of P){if(!U)continue;let T=U,Z=w(T);Y+=Z.value,T=Z.rest;let E=-1,H=-1,_=-1,q=-1;if(T.length>0){let G=w(T);J+=G.value,E=J,T=G.rest;let N=w(T);z+=N.value,H=z,T=N.rest;let R=w(T);if(K+=R.value,_=K,T=R.rest,T.length>0){let B=w(T);W+=B.value,q=W}}this.decodedMappings.push({generatedLine:y,generatedColumn:Y,sourceIndex:E,originalLine:H,originalColumn:_,nameIndex:q})}}y++}}originalPositionFor(k){let y=null,J=1/0;for(let z of this.decodedMappings)if(z.generatedLine===k.line){let K=Math.abs(z.generatedColumn-k.column);if(K<J&&z.generatedColumn<=k.column)y=z,J=K}if(y&&y.sourceIndex>=0)return{source:this.sourceMap.sources[y.sourceIndex]||null,line:y.originalLine+1,column:y.originalColumn,name:y.nameIndex>=0?this.sourceMap.names[y.nameIndex]:null};return{source:null,line:null,column:null,name:null}}generatedPositionFor(k){let y=this.sourceMap.sources.indexOf(k.source);if(y===-1)return{line:null,column:null};let J=k.line-1;for(let z of this.decodedMappings)if(z.sourceIndex===y&&z.originalLine===J){if(k.column===void 0||z.originalColumn===k.column)return{line:z.generatedLine,column:z.generatedColumn}}return{line:null,column:null}}sourceContentFor(k){let y=this.sourceMap.sources.indexOf(k);if(y===-1)return null;return this.sourceMap.sourcesContent?.[y]??null}get sources(){return[...this.sourceMap.sources]}get rawSourceMap(){return this.sourceMap}}class O{generator;currentGeneratedLine=1;currentGeneratedColumn=0;sourceFile;constructor(k,y,J){if(this.generator=new A(k),this.sourceFile=y,J)this.generator.addSource(y,J)}trackReplacement(k,y,J){this.generator.addMapping({generated:{line:this.currentGeneratedLine,column:this.currentGeneratedColumn},source:this.sourceFile,original:{line:k,column:y}});let z=J.split(`
|
|
3
|
-
`);if(z.length>1)this.currentGeneratedLine+=z.length-1,this.currentGeneratedColumn=z[z.length-1].length;else this.currentGeneratedColumn+=J.length}trackInclude(k,y,J){this.generator.addSource(k,y);let z=J.split(`
|
|
4
|
-
`);for(let K=0;K<z.length;K++)this.generator.addMapping({generated:{line:this.currentGeneratedLine+K,column:0},source:k,original:{line:K+1,column:0}});this.currentGeneratedLine+=z.length-1,this.currentGeneratedColumn=z[z.length-1].length}trackGenerated(k){let y=k.split(`
|
|
5
|
-
`);if(y.length>1)this.currentGeneratedLine+=y.length-1,this.currentGeneratedColumn=y[y.length-1].length;else this.currentGeneratedColumn+=k.length}newLine(){this.currentGeneratedLine++,this.currentGeneratedColumn=0}getCurrentPosition(){return{line:this.currentGeneratedLine,column:this.currentGeneratedColumn}}getGenerator(){return this.generator}toJSON(){return this.generator.toJSON()}toInlineComment(){return this.generator.toInlineComment()}}function Q(k){let y=k.match(/<!--#\s*sourceMappingURL=data:application\/json[^,]*,([^-]+)-->/);if(y)try{let z=D.from(y[1],"base64").toString("utf-8");return JSON.parse(z)}catch{return null}let J=k.match(/\/\/#\s*sourceMappingURL=data:application\/json[^,]*,(.+)$/);if(J)try{let z=D.from(J[1],"base64").toString("utf-8");return JSON.parse(z)}catch{return null}return null}function V(k){return k.replace(/<!--#\s*sourceMappingURL=[^-]+-->/g,"").replace(/\/\/#\s*sourceMappingURL=.+$/gm,"").replace(/\/\*#\s*sourceMappingURL=.+\*\//g,"")}function M(k,y){let z=k.slice(0,y).split(`
|
|
6
|
-
`);return{line:z.length,column:z[z.length-1].length}}function h(k,y){let J=k.split(`
|
|
7
|
-
`),z=0;for(let K=0;K<y.line-1&&K<J.length;K++)z+=J[K].length+1;return z+=y.column,z}
|
|
8
|
-
export{w as oe,A as pe,b as qe,O as re,Q as se,V as te,M as ue,h as ve};
|
package/dist/chunk-kh6rfz2v.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
function V(j){return j.type==="Document"}function S(j){return j.type==="Text"}function b(j){return j.type==="Expression"}function $(j){return j.type==="Directive"}function B(j){return j.type==="Component"}function q(j){return j.type==="Element"}function y(j){return j.type==="Attribute"}function C(j){return j.type==="Comment"}function v(j){return j.type==="Script"}function g(j){return j.type==="Style"}function E(j=[],z){return{type:"Document",children:j,loc:z}}function M(j,z){return{type:"Text",value:j,loc:z}}function F(j,z=!0,G){let H=z?`{{ ${j} }}`:`{!! ${j} !!}`;return{type:"Expression",expression:j,escaped:z,raw:H,loc:G}}function D(j,z=null,G=null,H){let I=G===null,J=`@${j}`;if(z)J+=`(${z})`;return{type:"Directive",name:j,params:z,body:G,selfClosing:I,raw:J,loc:H}}function P(j,z=[],G=[],H=!1,I){return{type:"Component",name:j,attributes:z,children:G,selfClosing:H,loc:I}}function T(j,z=[],G=[],H){let J=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]).has(j.toLowerCase());return{type:"Element",tag:j,attributes:z,children:J?[]:G,selfClosing:J||G.length===0,void:J,loc:H}}function w(j,z=null,G){return{type:"Attribute",name:j,value:z,dynamic:z!==null&&typeof z!=="string",loc:G}}function Z(j,z="html",G){return{type:"Comment",value:j,style:z,loc:G}}function k(j,z=[],G){return{type:"Script",content:j,attributes:z,loc:G}}function A(j,z=[],G=!1,H){return{type:"Style",content:j,attributes:z,scoped:G,loc:H}}function O(j,z,G=null){if(j.parent=G??void 0,z.enter){if(z.enter(j,G)===!1)return}let H=z[j.type];if(H&&typeof H==="object"&&"enter"in H){let J=H.enter;if(J(j)===!1)return}let I=x(j);for(let J of I)O(J,z,j);if(H&&typeof H==="object"&&"leave"in H){let J=H.leave;J(j)}if(z.leave)z.leave(j,G)}function x(j){switch(j.type){case"Document":return j.children;case"Directive":return j.body||[];case"Component":return[...j.attributes,...j.children];case"Element":return[...j.attributes,...j.children];case"Script":case"Style":return j.attributes;default:return[]}}function W(j){let z={...j};if("children"in z&&Array.isArray(z.children))z.children=z.children.map((G)=>W(G));if("body"in z&&Array.isArray(z.body))z.body=z.body.map((G)=>W(G));if("attributes"in z&&Array.isArray(z.attributes))z.attributes=z.attributes.map((G)=>W(G));return delete z.parent,z}function u(j,z,G){O(j,{enter(H){let I=_(H);if(I){let J=I.indexOf(z);if(J!==-1){let L=Array.isArray(G)?G:[G];I.splice(J,1,...L)}}}})}function h(j,z){O(j,{enter(G){let H=_(G);if(H){let I=H.indexOf(z);if(I!==-1)H.splice(I,1)}}})}function _(j){if("children"in j&&Array.isArray(j.children))return j.children;if("body"in j&&Array.isArray(j.body))return j.body;return null}function R(j,z){let G=[];return O(j,{enter(H){if(z(H))G.push(H)}}),G}function f(j,z){return R(j,(G)=>G.type===z)}function m(j,z){return R(j,(G)=>$(G)&&G.name===z)}function p(j,z){return R(j,(G)=>B(G)&&G.name===z)}function c(j,z){return R(j,(G)=>q(G)&&G.tag.toLowerCase()===z.toLowerCase())}function s(j){return f(j,"Expression")}function l(j){let z=new Set;return O(j,{Directive:{enter(G){z.add(G.name)}}}),z}function i(j){let z=new Set;return O(j,{Component:{enter(G){z.add(G.name)}}}),z}function K(j){switch(j.type){case"Document":return j.children.map((z)=>K(z)).join("");case"Text":return j.value;case"Expression":return j.raw;case"Directive":if(j.selfClosing)return j.raw;else{let z=j.body?.map((G)=>K(G)).join("")||"";return`${j.raw}${z}@end${j.name}`}case"Component":{let z=j.attributes.map((H)=>K(H)).join(" "),G=z?` ${z}`:"";if(j.selfClosing)return`<${j.name}${G} />`;else{let H=j.children.map((I)=>K(I)).join("");return`<${j.name}${G}>${H}</${j.name}>`}}case"Element":{let z=j.attributes.map((H)=>K(H)).join(" "),G=z?` ${z}`:"";if(j.void)return`<${j.tag}${G}>`;else if(j.selfClosing&&j.children.length===0)return`<${j.tag}${G} />`;else{let H=j.children.map((I)=>K(I)).join("");return`<${j.tag}${G}>${H}</${j.tag}>`}}case"Attribute":if(j.value===null)return j.name;else if(typeof j.value==="string")return`${j.name}="${j.value}"`;else return`${j.name}="${K(j.value)}"`;case"Comment":if(j.style==="stx")return`{{-- ${j.value} --}}`;else return`<!-- ${j.value} -->`;case"Script":{let z=j.attributes.map((H)=>K(H)).join(" ");return`<script${z?` ${z}`:""}>${j.content}</script>`}case"Style":{let z=j.attributes.map((I)=>K(I)).join(" "),G=z?` ${z}`:"",H=j.scoped&&!G.includes("scoped")?" scoped":"";return`<style${G}${H}>${j.content}</style>`}default:return""}}class N{source="";pos=0;line=1;column=0;filePath;parse(j,z){this.source=j,this.pos=0,this.line=1,this.column=0,this.filePath=z;let G=this.parseChildren();return E(G,{start:{line:1,column:0},end:{line:this.line,column:this.column},source:this.filePath})}parseChildren(j){let z=[];while(this.pos<this.source.length){if(j&&j.test(this.source.slice(this.pos)))break;let G=this.parseNext();if(G)z.push(G);else break}return z}parseNext(){if(this.pos>=this.source.length)return null;let j=this.source.slice(this.pos);if(j.startsWith("{{--"))return this.parseStxComment();if(j.startsWith("{{"))return this.parseExpression(!0);if(j.startsWith("{!!"))return this.parseExpression(!1);if(j.match(/^@[a-z]/i))return this.parseDirective();if(j.startsWith("<!--"))return this.parseHtmlComment();if(j.match(/^<script/i))return this.parseScript();if(j.match(/^<style/i))return this.parseStyle();if(j.startsWith("<")&&!j.startsWith("</"))return this.parseTag();return this.parseText()}parseText(){let j=this.getPosition(),z="";while(this.pos<this.source.length){let G=this.source[this.pos],H=this.source.slice(this.pos);if(H.startsWith("{{")||H.startsWith("{!!")||H.match(/^@[a-z]/i)||H.startsWith("<"))break;z+=G,this.advance()}if(z.length===0)return null;return M(z,{start:j,end:this.getPosition(),source:this.filePath})}parseExpression(j){let z=this.getPosition(),G=j?"{{":"{!!",H=j?"}}":"!!}";this.advance(G.length);let I="";while(this.pos<this.source.length){if(this.source.slice(this.pos).startsWith(H))break;I+=this.source[this.pos],this.advance()}return this.advance(H.length),F(I.trim(),j,{start:z,end:this.getPosition(),source:this.filePath})}parseDirective(){let j=this.getPosition();this.advance();let z="";while(this.pos<this.source.length&&/[a-z]/i.test(this.source[this.pos]))z+=this.source[this.pos],this.advance();let G=null;if(this.source[this.pos]==="(")G=this.parseParenthesized();let H=new Set(["if","unless","isset","empty","auth","guest","env","foreach","for","forelse","while","switch","section","push","prepend","once","component","slot","verbatim","php","js","ts"]),I=null;if(H.has(z)){let J=new RegExp(`^@end${z}\\b`);I=this.parseChildren(J);let L=this.source.slice(this.pos).match(J);if(L)this.advance(L[0].length)}return D(z,G,I,{start:j,end:this.getPosition(),source:this.filePath})}parseParenthesized(){let j="",z=0;while(this.pos<this.source.length){let G=this.source[this.pos];if(G==="("){if(z++,z>1)j+=G}else if(G===")"){if(z--,z===0){this.advance();break}j+=G}else if(z>0)j+=G;this.advance()}return j}parseStxComment(){let j=this.getPosition();this.advance(4);let z="";while(this.pos<this.source.length){if(this.source.slice(this.pos).startsWith("--}}"))break;z+=this.source[this.pos],this.advance()}return this.advance(4),Z(z.trim(),"stx",{start:j,end:this.getPosition(),source:this.filePath})}parseHtmlComment(){let j=this.getPosition();this.advance(4);let z="";while(this.pos<this.source.length){if(this.source.slice(this.pos).startsWith("-->"))break;z+=this.source[this.pos],this.advance()}return this.advance(3),Z(z.trim(),"html",{start:j,end:this.getPosition(),source:this.filePath})}parseTag(){let j=this.getPosition();this.advance();let z="";while(this.pos<this.source.length&&/[a-z0-9-]/i.test(this.source[this.pos]))z+=this.source[this.pos],this.advance();let G=this.parseAttributes();this.skipWhitespace();let H=this.source.slice(this.pos).startsWith("/>");if(H)this.advance(2);else this.advance();let I=/^[A-Z]/.test(z),L=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]).has(z.toLowerCase()),U=[];if(!H&&!L){let Q=new RegExp(`^</${z}>`,"i");U=this.parseChildren(Q);let Y=this.source.slice(this.pos).match(Q);if(Y)this.advance(Y[0].length)}let X={start:j,end:this.getPosition(),source:this.filePath};if(I)return P(z,G,U,H,X);else{let Q=T(z,G,U,X);return Q.selfClosing=H||L,Q}}parseAttributes(){let j=[];while(this.pos<this.source.length){if(this.skipWhitespace(),this.source[this.pos]===">"||this.source.slice(this.pos).startsWith("/>"))break;let z=this.parseAttribute();if(z)j.push(z)}return j}parseAttribute(){let j=this.getPosition(),z="";while(this.pos<this.source.length&&/[a-z0-9-:@.]/i.test(this.source[this.pos]))z+=this.source[this.pos],this.advance();if(!z)return null;let G=null;if(this.skipWhitespace(),this.source[this.pos]==="="){this.advance(),this.skipWhitespace();let H=this.source[this.pos];if(H==='"'||H==="'"){this.advance();let I="";while(this.pos<this.source.length&&this.source[this.pos]!==H)I+=this.source[this.pos],this.advance();if(this.advance(),I.includes("{{")||I.includes("{!!"))G=I;else G=I}}return w(z,G,{start:j,end:this.getPosition(),source:this.filePath})}parseScript(){let j=this.getPosition();this.advance(7);let z=this.parseAttributes();this.skipWhitespace(),this.advance();let G="";while(this.pos<this.source.length){if(this.source.slice(this.pos).match(/^<\/script>/i))break;G+=this.source[this.pos],this.advance()}return this.advance(9),k(G,z,{start:j,end:this.getPosition(),source:this.filePath})}parseStyle(){let j=this.getPosition();this.advance(6);let z=this.parseAttributes(),G=z.some((I)=>I.name==="scoped");this.skipWhitespace(),this.advance();let H="";while(this.pos<this.source.length){if(this.source.slice(this.pos).match(/^<\/style>/i))break;H+=this.source[this.pos],this.advance()}return this.advance(8),A(H,z,G,{start:j,end:this.getPosition(),source:this.filePath})}advance(j=1){for(let z=0;z<j&&this.pos<this.source.length;z++){if(this.source[this.pos]===`
|
|
3
|
-
`)this.line++,this.column=0;else this.column++;this.pos++}}skipWhitespace(){while(this.pos<this.source.length&&/\s/.test(this.source[this.pos]))this.advance()}getPosition(){return{line:this.line,column:this.column}}}
|
|
4
|
-
export{V as HA,S as IA,b as JA,$ as KA,B as LA,q as MA,y as NA,C as OA,v as PA,g as QA,E as RA,M as SA,F as TA,D as UA,P as VA,T as WA,w as XA,Z as YA,k as ZA,A as _A,O as $A,x as aB,W as bB,u as cB,h as dB,R as eB,f as fB,m as gB,p as hB,c as iB,s as jB,l as kB,i as lB,K as mB,N as nB};
|
package/dist/chunk-kkp6rs2n.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
var P={indentSize:2,useTabs:!1,maxLineLength:120,normalizeWhitespace:!0,sortAttributes:!1,trimTrailingWhitespace:!0};function O(K,q={}){let Q={...P,...q};if(K.trim()==="")return`
|
|
3
|
-
`;let j=K;if(Q.trimTrailingWhitespace)j=j.replace(/[ \t]+$/gm,"");if(j=I(j,Q),j=L(j,Q),j=N(j,Q),Q.trimTrailingWhitespace)j=j.replace(/[ \t]+$/gm,""),j=j.replace(/(\S)[ \t]+(<\/[^>]+>)/g,"$1$2");if(j=j.replace(/\r\n/g,`
|
|
4
|
-
`).replace(/\r/g,`
|
|
5
|
-
`),!j.endsWith(`
|
|
6
|
-
`))j+=`
|
|
7
|
-
`;return j}function v(K,q={}){let Q={...P,...q};if(K.trim()==="")return`
|
|
8
|
-
`;let j=K;if(j=j.replace(/^( *)```(html|stx)\n([\s\S]*?)^( *)```/gm,(w,W,Y,X,Z)=>{let V=X.split(`
|
|
9
|
-
`),G=V.filter(($)=>$.trim().length>0);if(G.length===0)return w;let H=Math.min(...G.map(($)=>{let F=$.match(/^( *)/);return F?F[1].length:0})),z=V.map(($)=>{if($.trim().length===0)return"";return $.substring(H)}).join(`
|
|
10
|
-
`),R=O(z,Q).trimEnd().split(`
|
|
11
|
-
`).map(($)=>{if($.trim().length===0)return"";return W+$}).join(`
|
|
12
|
-
`);return`${W}\`\`\`${Y}
|
|
13
|
-
${R}
|
|
14
|
-
${W}\`\`\``}),Q.trimTrailingWhitespace)j=j.replace(/[ \t]+$/gm,"");if(j=j.replace(/\r\n/g,`
|
|
15
|
-
`).replace(/\r/g,`
|
|
16
|
-
`),!j.endsWith(`
|
|
17
|
-
`))j+=`
|
|
18
|
-
`;return j}function D(K){let q=K,Q=[],j="__PROTECTED_BLOCK_";return q=q.replace(/(<(?:pre|code|textarea)[^>]*>)([\s\S]*?)(<\/(?:pre|code|textarea)>)/gi,(w)=>{let W=Q.length;return Q.push(w),`${j}${W}__`}),q=q.replace(/(@(?:if|foreach|for|while|unless|section|component|slot|push|prepend|error|auth|guest|can)(?:\((?:[^()'"]|'[^']*'|"[^"]*"|\((?:[^()'"]|'[^']*'|"[^"]*")*\))*\))?)/g,`
|
|
19
|
-
$1
|
|
20
|
-
`),q=q.replace(/(@end\w+)/g,`
|
|
21
|
-
$1
|
|
22
|
-
`),q=q.replace(/(@(?:else|elseif|empty)(?:\((?:[^()'"]|'[^']*'|"[^"]*"|\((?:[^()'"]|'[^']*'|"[^"]*")*\))*\))?)/g,`
|
|
23
|
-
$1
|
|
24
|
-
`),q=q.replace(/(@(?:csrf|method|include|extends|yield|stack|vite|asset)(?:\([^)]*\))?)/g,`
|
|
25
|
-
$1
|
|
26
|
-
`),q=q.replace(/(?<=>)(<(?!\/)[^>]+>)/g,(w,W,Y,X)=>{let Z=X.substring(Y+w.length,Math.min(X.length,Y+w.length+20)),V=w.match(/<(\w+)/)?.[1];if(V&&Z.match(new RegExp(`^</${V}>`)))return w;return`
|
|
27
|
-
${w}`}),q=q.replace(/(>)(<\/)/g,(w,W,Y,X,Z)=>{let V=Z.substring(Math.max(0,X-50),X),H=Z.substring(X+w.length,Math.min(Z.length,X+w.length+20)).match(/^(\w+)>/)?.[1],z=V.match(/<(\w+)[^>]*$/)?.[1];if(z&&H&&z===H)return w;return`${W}
|
|
28
|
-
${Y}`}),q=q.replace(/(<\/[^>]+>)(?=<|$)/g,(w,W,Y,X)=>{let Z=X.substring(Math.max(0,Y-20),Y),V=w.match(/<\/(\w+)>/)?.[1],G=new RegExp(`<${V}[^>]*>$`);if(V&&Z.match(G))return w;return`${w}
|
|
29
|
-
`}),q=q.replace(new RegExp(`${j}(\\d+)__`,"g"),(w,W)=>{return Q[Number.parseInt(W,10)]}),q=q.replace(/\n{2,}/g,`
|
|
30
|
-
`),q=q.split(`
|
|
31
|
-
`).map((w)=>w.trim()).join(`
|
|
32
|
-
`),q=q.replace(/^\n+/,"").replace(/\n+$/,""),q}function I(K,q){let j=D(K).split(`
|
|
33
|
-
`),w=[],W=0,Y=!1,X=q.useTabs?"\t":" ".repeat(q.indentSize);for(let Z=0;Z<j.length;Z++){let V=j[Z],G=V.trim();if(G===""){w.push("");continue}let H=G.match(/<script\b/i),z=G.match(/<\/script>/i);if(Y&&!z){w.push(V);continue}let J=G===">";if(_(G)&&!G.startsWith("<")&&!G.startsWith("@")){w.push(X.repeat(W)+G);continue}let R=G.startsWith("@end"),$=G.startsWith("@else")||G.startsWith("@elseif"),F=G.startsWith("@")&&x(G),y=G.startsWith("<!DOCTYPE")||G.startsWith("<!doctype"),A=G.startsWith("<!--"),U=G.startsWith("</"),B=G.startsWith("<")&&!U&&!A&&!y,k=G.includes("/>")||S(G),E=_(G);if(U||R)W=Math.max(0,W-1);let M=$?Math.max(0,W-1):W;if(J)w.push(V);else w.push(X.repeat(M)+G);if(B&&!k&&!E&&!J||F)W++;if(H)Y=!0;if(z)Y=!1}return w.join(`
|
|
34
|
-
`)}function N(K,q){if(K=K.replace(/@(if|elseif|foreach|for|while)\s*\(\s*([^)]+)\s*\)/g,(Q,j,w)=>{let W=w.trim().replace(/\s+/g," ");return`@${j}(${W})`}),K=K.replace(/@(csrf|method)\s*\(\s*([^)]*)\s*\)/g,(Q,j,w)=>{if(w.trim()==="")return`@${j}`;return`@${j}(${w.trim()})`}),q.normalizeWhitespace)K=K.replace(/\{\{\s*([^}]+)\s*\}\}/g,(Q,j)=>{return`{{ ${j.trim()} }}`}),K=K.replace(/\{!!\s*([^!]+)\s*!!\}/g,(Q,j)=>{return`{!! ${j.trim()} !!}`});return K}function S(K){let q=["br","hr","img","input","meta","link","area","base","col","embed","source","track","wbr"];if(K.includes("/>"))return!0;let Q=K.match(/<(\w+)/);if(Q){let j=Q[1];return q.includes(j.toLowerCase())}return!1}function _(K){return/<(\w+)(?:\s[^>]*)?>[\s\S]*?<\/\1>/.test(K)}function x(K){let q=["if","unless","foreach","for","while","section","push","component","slot","markdown","wrap","error"];for(let Q of q)if(K.startsWith(`@${Q}`))return!K.includes(`@end${Q}`);return!1}function L(K,q){if(!q.sortAttributes)return K;return K.replace(/<(\w+)([^>]*)>/g,(Q,j,w)=>{if(!w.trim())return Q;if(w.includes("<")||w.includes(`
|
|
35
|
-
`)||w.includes("@"))return Q;let W=/(\w+)(?:=("[^"]*"|'[^']*'|[^\s>]+))?/g,Y=[],X;while((X=W.exec(w))!==null)Y.push({name:X[1],value:X[2]});Y.sort((V,G)=>{if(V.name==="id")return-1;if(G.name==="id")return 1;if(V.name==="class")return-1;if(G.name==="class")return 1;return V.name.localeCompare(G.name)});let Z=Y.map((V)=>V.value?`${V.name}=${V.value}`:V.name).join(" ");return`<${j}${Z?` ${Z}`:""}>`})}
|
|
36
|
-
export{O as _m,v as $m};
|
package/dist/chunk-ktkmvaa8.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
// @bun
|
package/dist/chunk-m59y310j.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ss as q}from"./chunk-w01y57f5.js";import{rB as L}from"./chunk-3jm3snz8.js";import M from"fs";import X from"path";var y=new Map,Q=new Map;async function w(j){let z;for(let K=0;K<3;K++)try{let V=(await M.promises.stat(j)).mtime.getTime(),J=Q.get(j);if(J&&J.mtime===V)return J.content;let W=await Bun.file(j).text(),U=(await M.promises.stat(j)).mtime.getTime();if(U!==V)continue;return Q.set(j,{content:W,mtime:U}),W}catch(I){z=I;break}throw Q.delete(j),Error(`File not found: ${j}${z?` (${z.message})`:""}`)}function A(j){Q.delete(j)}function H(j){for(let B of Q.keys())if(B.startsWith(j))Q.delete(B)}var Z=null,T=null,N=null;function v(j){N=j}async function E(j=!1){let B=N??await import("././signals.js");if(j)return B.generateSignalsRuntimeDev();if(Z===null)Z=B.generateSignalsRuntime();return Z}var $=null;async function F(){if($===null){let{getRouterScript:j}=await import("stx-router");$=j()}return $}function R(){Q.clear(),Z=null,T=null,$=null}function k(j){let B={debug:j.debug===!0,middleware:(j.middleware??[]).map((z)=>({name:z.name,timing:z.timing,handler:String(z.handler)})),customDirectives:(j.customDirectives??[]).map((z)=>({name:z.name,hasEndTag:z.hasEndTag===!0,handler:String(z.handler)}))};return new Bun.CryptoHasher("sha1").update(JSON.stringify(B)).digest("hex")}async function S(j,B){try{if(!B.cachePath)return null;let z=X.resolve(B.cachePath),K=X.join(z,`${D(j)}.html`),I=X.join(z,`${D(j)}.meta.json`);if(!await q(K)||!await q(I))return null;let V=await Bun.file(I).text(),J=JSON.parse(V);if(J.cacheVersion!==B.cacheVersion)return null;if(J.optionsSignature!==k(B))return null;if((await M.promises.stat(j)).mtime.getTime()>J.mtime)return null;for(let Y of J.dependencies)if(await q(Y)){if((await M.promises.stat(Y)).mtime.getTime()>J.mtime)return null}else return null;return await Bun.file(K).text()}catch(z){return console.warn(`Cache error for ${j}:`,z),null}}async function _(j,B,z,K){try{if(!K.cachePath)return;let I=X.resolve(K.cachePath);await M.promises.mkdir(I,{recursive:!0});let V=X.join(I,`${D(j)}.html`),J=X.join(I,`${D(j)}.meta.json`),W=await M.promises.stat(j);await Bun.write(V,B);let Y={sourcePath:j,mtime:W.mtime.getTime(),dependencies:Array.from(z),cacheVersion:K.cacheVersion,optionsSignature:k(K),generatedAt:Date.now()};await Bun.write(J,JSON.stringify(Y,null,2)),y.set(j,{output:B,mtime:W.mtime.getTime(),dependencies:z})}catch(I){console.warn(`Failed to cache template ${j}:`,I)}}var b=16;function D(j){return new Bun.CryptoHasher("sha1").update(j).digest("hex").substring(0,b)}
|
|
3
|
-
export{y as kp,w as lp,A as mp,H as np,v as op,E as pp,F as qp,R as rp,S as sp,_ as tp,D as up};
|