@stacksjs/stx 0.2.95 → 0.2.97
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 -2
- package/dist/dev-server/serve-file.js +439 -2
- package/dist/dev-server/serve-markdown.js +281 -2
- package/dist/dev-server/serve-multi.js +579 -2
- 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 +5 -6
- package/dist/chunk-04n64bnt.js +0 -5
- package/dist/chunk-06w68hyg.js +0 -7
- package/dist/chunk-07y6m5xx.js +0 -3
- package/dist/chunk-095s3972.js +0 -99
- package/dist/chunk-09k66d8a.js +0 -3
- package/dist/chunk-0a61y94n.js +0 -24
- package/dist/chunk-0b9w2w1y.js +0 -1
- package/dist/chunk-0dx4q6yq.js +0 -3
- package/dist/chunk-0dz85jrp.js +0 -3
- package/dist/chunk-0jd0pndq.js +0 -3
- package/dist/chunk-0p0nyq50.js +0 -6
- package/dist/chunk-0p1h3p3w.js +0 -3
- package/dist/chunk-0qakwen3.js +0 -1
- package/dist/chunk-0qnz93q2.js +0 -3
- package/dist/chunk-10debkj5.js +0 -71
- package/dist/chunk-15nesxgt.js +0 -5224
- package/dist/chunk-1sr54zp8.js +0 -3
- package/dist/chunk-1v49fwr5.js +0 -3
- package/dist/chunk-1xz0w746.js +0 -1539
- package/dist/chunk-1z5nhbjt.js +0 -90
- package/dist/chunk-1zgsgk4b.js +0 -1
- package/dist/chunk-20swzkx3.js +0 -216
- package/dist/chunk-27zsyhrd.js +0 -4
- package/dist/chunk-29y0hk5z.js +0 -3
- package/dist/chunk-2cdvw21b.js +0 -274
- package/dist/chunk-2j21d3ka.js +0 -161
- package/dist/chunk-2jxbwnkz.js +0 -2
- package/dist/chunk-31dr4bys.js +0 -6
- package/dist/chunk-35faj94w.js +0 -15
- package/dist/chunk-39gm08bn.js +0 -39
- package/dist/chunk-3a4qsygv.js +0 -51
- package/dist/chunk-3te20hqw.js +0 -3
- package/dist/chunk-43t7faps.js +0 -24
- package/dist/chunk-44hd3kab.js +0 -1
- package/dist/chunk-47kpewks.js +0 -71
- package/dist/chunk-4aj7ftqb.js +0 -1
- package/dist/chunk-4d2y57k7.js +0 -3
- package/dist/chunk-4deg33rw.js +0 -57
- package/dist/chunk-4k7d8p8d.js +0 -188
- package/dist/chunk-4qcy5tx6.js +0 -53
- package/dist/chunk-4x7kae4j.js +0 -3
- package/dist/chunk-55nwdnsd.js +0 -3
- package/dist/chunk-55yp0q8t.js +0 -201
- package/dist/chunk-5f43yz6z.js +0 -12
- package/dist/chunk-5shey2e4.js +0 -3
- package/dist/chunk-6b5k6w2q.js +0 -7
- package/dist/chunk-6djzdes9.js +0 -14
- package/dist/chunk-6e4c6g46.js +0 -3
- package/dist/chunk-6eqbxcrd.js +0 -8
- package/dist/chunk-7074g241.js +0 -3
- package/dist/chunk-7b6s3g65.js +0 -179
- package/dist/chunk-7cgmq685.js +0 -33
- package/dist/chunk-7dkz6z2s.js +0 -3
- package/dist/chunk-7ed3tean.js +0 -3
- package/dist/chunk-7gd339hd.js +0 -109
- package/dist/chunk-7j5e8sdj.js +0 -3
- package/dist/chunk-7n8g0nfn.js +0 -38
- package/dist/chunk-7sqdeqsw.js +0 -1
- package/dist/chunk-80g54ncj.js +0 -3
- package/dist/chunk-8a5bxece.js +0 -4
- package/dist/chunk-8ahwt6a4.js +0 -721
- package/dist/chunk-8b3z0zd5.js +0 -8
- package/dist/chunk-8dhdpa5h.js +0 -4
- package/dist/chunk-8n9nnqr6.js +0 -3
- package/dist/chunk-8qc1bsym.js +0 -3
- package/dist/chunk-8va64c9n.js +0 -3
- package/dist/chunk-8vtm0m84.js +0 -3
- package/dist/chunk-8xj7c3mf.js +0 -8
- package/dist/chunk-988dw6q3.js +0 -9
- package/dist/chunk-9b6cec0v.js +0 -321
- package/dist/chunk-9cf97f9p.js +0 -3
- package/dist/chunk-9ecv8aqj.js +0 -14
- package/dist/chunk-9eq3ht5f.js +0 -8
- package/dist/chunk-9jtj77jx.js +0 -3
- package/dist/chunk-9t14se2t.js +0 -83
- package/dist/chunk-9wmq2272.js +0 -3
- package/dist/chunk-9zbk5zx5.js +0 -57
- package/dist/chunk-a2g2qb2y.js +0 -386
- package/dist/chunk-a3hyn4we.js +0 -79
- package/dist/chunk-a87qqft6.js +0 -194
- package/dist/chunk-ah88wzbg.js +0 -10
- package/dist/chunk-akf1r75r.js +0 -102
- package/dist/chunk-amaa1bev.js +0 -2
- package/dist/chunk-avx8aydt.js +0 -3
- package/dist/chunk-ay9qf4zj.js +0 -6
- package/dist/chunk-aywxfqev.js +0 -3
- package/dist/chunk-azkegjd8.js +0 -61
- package/dist/chunk-b77wjyn7.js +0 -84
- package/dist/chunk-baf1hfwh.js +0 -231
- package/dist/chunk-bdk6g1vj.js +0 -3
- package/dist/chunk-bhqgmyqw.js +0 -36
- package/dist/chunk-bk3j0n82.js +0 -341
- package/dist/chunk-bndmdahk.js +0 -3
- package/dist/chunk-bpgg59wa.js +0 -3
- package/dist/chunk-bs3gmfxz.js +0 -5
- package/dist/chunk-bxc7kjsk.js +0 -32
- package/dist/chunk-c7jg8w13.js +0 -3
- package/dist/chunk-ckxjqqn9.js +0 -3
- package/dist/chunk-cn8az1b4.js +0 -1
- package/dist/chunk-d0zjtdw4.js +0 -29
- package/dist/chunk-d1qh1x2g.js +0 -3
- package/dist/chunk-djddhmcc.js +0 -60
- package/dist/chunk-dqn9gyhb.js +0 -21
- package/dist/chunk-drjq2zwg.js +0 -3
- package/dist/chunk-dvfs1h3c.js +0 -117
- package/dist/chunk-e2q9c5vq.js +0 -8
- package/dist/chunk-e98v1bc6.js +0 -12
- package/dist/chunk-ejayeex8.js +0 -2
- package/dist/chunk-ejh8fyak.js +0 -3
- package/dist/chunk-ek2w6zvy.js +0 -4
- package/dist/chunk-ewa88139.js +0 -6
- package/dist/chunk-fjk3x41y.js +0 -3
- package/dist/chunk-frg705zq.js +0 -302
- package/dist/chunk-fzm3y0r3.js +0 -267
- package/dist/chunk-g1vt329s.js +0 -21
- package/dist/chunk-g4ps1dj8.js +0 -140
- package/dist/chunk-gkzq8zw4.js +0 -23
- package/dist/chunk-gz5fmp3q.js +0 -3
- package/dist/chunk-h0hjy0kn.js +0 -292
- package/dist/chunk-h5jxydqq.js +0 -147
- package/dist/chunk-h5wa62ek.js +0 -145
- package/dist/chunk-h7aq56qj.js +0 -28
- package/dist/chunk-h82kjdr4.js +0 -83
- package/dist/chunk-hbehnm18.js +0 -3
- package/dist/chunk-hbgxbgam.js +0 -58
- package/dist/chunk-hc2mf5h6.js +0 -4
- package/dist/chunk-hjm2xab3.js +0 -3
- package/dist/chunk-hjv76kcw.js +0 -1
- package/dist/chunk-hrnnh4tq.js +0 -142
- package/dist/chunk-ht43ds42.js +0 -236
- package/dist/chunk-hxx3za24.js +0 -62
- package/dist/chunk-hy8820vc.js +0 -6
- package/dist/chunk-j447q024.js +0 -28
- package/dist/chunk-j58vh0w6.js +0 -314
- package/dist/chunk-j8tn8enq.js +0 -3
- package/dist/chunk-jc0fc4ht.js +0 -11
- package/dist/chunk-jcs0ymw7.js +0 -3
- package/dist/chunk-jjamhxpm.js +0 -139
- package/dist/chunk-jjb05d21.js +0 -3
- package/dist/chunk-jjdq01dv.js +0 -128
- package/dist/chunk-jnmgm2xw.js +0 -5
- package/dist/chunk-jpndqst5.js +0 -3
- package/dist/chunk-jt0ezawy.js +0 -351
- package/dist/chunk-jz73j3qs.js +0 -169
- package/dist/chunk-k21df0pg.js +0 -10
- package/dist/chunk-k848dzsa.js +0 -429
- package/dist/chunk-kdfe4t91.js +0 -3
- package/dist/chunk-keawsbpn.js +0 -5
- package/dist/chunk-kgym7ch9.js +0 -8
- package/dist/chunk-khdn7jwe.js +0 -3
- package/dist/chunk-km25cwz6.js +0 -3
- package/dist/chunk-knm8a8yx.js +0 -398
- package/dist/chunk-krqn0ddk.js +0 -3
- package/dist/chunk-ktkmvaa8.js +0 -1
- package/dist/chunk-kx6eb6ma.js +0 -4
- package/dist/chunk-kypas8vy.js +0 -4
- package/dist/chunk-m167kjhv.js +0 -4
- package/dist/chunk-m491r0rj.js +0 -358
- package/dist/chunk-m8448qby.js +0 -11
- package/dist/chunk-mgj88zeq.js +0 -64
- package/dist/chunk-mhgk632d.js +0 -3
- package/dist/chunk-mv4fb50w.js +0 -1
- package/dist/chunk-n5kg7fpx.js +0 -7
- package/dist/chunk-n98x35xd.js +0 -8
- package/dist/chunk-n9dhs1dw.js +0 -106
- package/dist/chunk-nd9rmddh.js +0 -6
- package/dist/chunk-ngxfwzq3.js +0 -3
- package/dist/chunk-nhv099jv.js +0 -19
- package/dist/chunk-nm15ccsg.js +0 -5
- package/dist/chunk-npfmdb6y.js +0 -71
- package/dist/chunk-nvwb4x04.js +0 -3
- package/dist/chunk-nw34xajc.js +0 -8
- package/dist/chunk-p077sw22.js +0 -3
- package/dist/chunk-p1h8065h.js +0 -3
- package/dist/chunk-p3e0cqtt.js +0 -34
- package/dist/chunk-p3fpb79v.js +0 -477
- package/dist/chunk-p52yzjq6.js +0 -498
- package/dist/chunk-p73meypx.js +0 -134
- package/dist/chunk-pa9zb7ty.js +0 -4
- package/dist/chunk-payfb24w.js +0 -207
- package/dist/chunk-pcm1vd8w.js +0 -3
- package/dist/chunk-pcntd9h4.js +0 -3
- package/dist/chunk-pg1fvqb9.js +0 -167
- package/dist/chunk-psc3wfcf.js +0 -1115
- package/dist/chunk-pznnww6k.js +0 -6
- package/dist/chunk-q6zhd9yf.js +0 -3
- package/dist/chunk-qa59zejf.js +0 -246
- package/dist/chunk-qvrbjpdc.js +0 -3
- package/dist/chunk-qygvvygy.js +0 -12
- package/dist/chunk-r0jcmpv6.js +0 -68
- package/dist/chunk-r5m9xtm7.js +0 -3
- package/dist/chunk-rh80q1nd.js +0 -1
- package/dist/chunk-rkffm9sy.js +0 -128
- package/dist/chunk-rpx5fa65.js +0 -3
- package/dist/chunk-rqxf5hns.js +0 -3
- package/dist/chunk-rtr974rc.js +0 -30
- package/dist/chunk-rvptcndz.js +0 -3
- package/dist/chunk-rw26rpek.js +0 -171
- package/dist/chunk-rw7937v4.js +0 -19
- package/dist/chunk-rwrv9wbf.js +0 -3
- package/dist/chunk-rz2ec6g7.js +0 -347
- package/dist/chunk-s6ja2bdg.js +0 -66
- package/dist/chunk-scpkdrdb.js +0 -4
- package/dist/chunk-shv88d2d.js +0 -10
- package/dist/chunk-t0c9wvpr.js +0 -3
- package/dist/chunk-tffh3b1e.js +0 -35
- package/dist/chunk-tg2f1mzq.js +0 -11
- package/dist/chunk-trfswy66.js +0 -77
- package/dist/chunk-tzwtg722.js +0 -3
- package/dist/chunk-v7f8jj15.js +0 -4
- package/dist/chunk-v8j49spx.js +0 -3
- package/dist/chunk-v97390pe.js +0 -1
- package/dist/chunk-vcr5pzpx.js +0 -233
- package/dist/chunk-veeerpwa.js +0 -3
- package/dist/chunk-vg5kt6az.js +0 -4
- package/dist/chunk-vgv7jvyz.js +0 -219
- package/dist/chunk-vjbefncc.js +0 -3
- package/dist/chunk-vmxjghsm.js +0 -3
- package/dist/chunk-vw7vqd76.js +0 -3
- package/dist/chunk-vx22he47.js +0 -1
- package/dist/chunk-w3b6m427.js +0 -45
- package/dist/chunk-wazkqv7n.js +0 -3
- package/dist/chunk-wf7zrjsw.js +0 -138
- package/dist/chunk-wfg2gm11.js +0 -3
- package/dist/chunk-wg9k6h8w.js +0 -12
- package/dist/chunk-wkz2vwkr.js +0 -81
- package/dist/chunk-wvef3ngh.js +0 -127
- package/dist/chunk-wvf31nzs.js +0 -3
- package/dist/chunk-x05nxhyv.js +0 -262
- package/dist/chunk-x0770gt9.js +0 -4
- package/dist/chunk-x24s4heg.js +0 -1166
- package/dist/chunk-x3r64r0c.js +0 -6
- package/dist/chunk-x5g9w4hh.js +0 -5
- package/dist/chunk-xgkv66q5.js +0 -2230
- package/dist/chunk-xqq1vxb6.js +0 -1
- package/dist/chunk-xs03kc1h.js +0 -196
- package/dist/chunk-xv34zbp4.js +0 -3
- package/dist/chunk-xw36p73h.js +0 -90
- package/dist/chunk-xyg1r5w0.js +0 -4
- package/dist/chunk-xys2sxh6.js +0 -16
- package/dist/chunk-y0qg6rrv.js +0 -3
- package/dist/chunk-y1k17c8b.js +0 -21
- package/dist/chunk-y5xz0jc4.js +0 -141
- package/dist/chunk-y6xsqe9a.js +0 -10
- package/dist/chunk-yb1t2h8h.js +0 -11
- package/dist/chunk-ygvyc6wv.js +0 -90
- package/dist/chunk-yj4x5ehw.js +0 -21
- package/dist/chunk-yn38c15w.js +0 -4
- package/dist/chunk-ynhngsdh.js +0 -3
- package/dist/chunk-yrsb6j3z.js +0 -3
- package/dist/chunk-yywfvfph.js +0 -2
- package/dist/chunk-zcxzdrn7.js +0 -5
- package/dist/chunk-zen6ax1y.js +0 -27
- package/dist/chunk-zf2pek72.js +0 -3
- package/dist/chunk-zk3d0jjf.js +0 -7
- package/dist/chunk-zy3rp1ab.js +0 -93
package/dist/chunk-p52yzjq6.js
DELETED
|
@@ -1,498 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Dp as K}from"./chunk-55nwdnsd.js";var W={default:{js:"#f7df1e",css:"#264de4",html:"#e34c26",image:"#4caf50",font:"#9c27b0",other:"#607d8b",vendor:"#ff5722"},pastel:{js:"#fff3b0",css:"#b0d4ff",html:"#ffb0b0",image:"#b0ffb0",font:"#e0b0ff",other:"#d0d0d0",vendor:"#ffcfb0"},monochrome:{js:"#333333",css:"#555555",html:"#777777",image:"#999999",font:"#bbbbbb",other:"#dddddd",vendor:"#444444"}};function w(q,v={}){let{title:x="Bundle Analysis",gzip:A=!0,colorScheme:I="default"}=v,F=W[I],J=X(q),G=JSON.stringify(J);return`<!DOCTYPE html>
|
|
3
|
-
<html lang="en">
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="UTF-8">
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
-
<title>${Q(x)}</title>
|
|
8
|
-
<style>
|
|
9
|
-
* {
|
|
10
|
-
box-sizing: border-box;
|
|
11
|
-
margin: 0;
|
|
12
|
-
padding: 0;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
body {
|
|
16
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
|
|
17
|
-
background: #1a1a2e;
|
|
18
|
-
color: #eee;
|
|
19
|
-
min-height: 100vh;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.header {
|
|
23
|
-
background: #16213e;
|
|
24
|
-
padding: 1rem 2rem;
|
|
25
|
-
display: flex;
|
|
26
|
-
justify-content: space-between;
|
|
27
|
-
align-items: center;
|
|
28
|
-
border-bottom: 1px solid #0f3460;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.header h1 {
|
|
32
|
-
font-size: 1.5rem;
|
|
33
|
-
font-weight: 500;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.stats {
|
|
37
|
-
display: flex;
|
|
38
|
-
gap: 2rem;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.stat {
|
|
42
|
-
text-align: center;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.stat-value {
|
|
46
|
-
font-size: 1.25rem;
|
|
47
|
-
font-weight: bold;
|
|
48
|
-
color: #e94560;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.stat-label {
|
|
52
|
-
font-size: 0.75rem;
|
|
53
|
-
color: #888;
|
|
54
|
-
text-transform: uppercase;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.controls {
|
|
58
|
-
background: #16213e;
|
|
59
|
-
padding: 0.75rem 2rem;
|
|
60
|
-
display: flex;
|
|
61
|
-
gap: 1rem;
|
|
62
|
-
align-items: center;
|
|
63
|
-
border-bottom: 1px solid #0f3460;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.controls label {
|
|
67
|
-
display: flex;
|
|
68
|
-
align-items: center;
|
|
69
|
-
gap: 0.5rem;
|
|
70
|
-
cursor: pointer;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.controls input[type="checkbox"] {
|
|
74
|
-
width: 1rem;
|
|
75
|
-
height: 1rem;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.search-box {
|
|
79
|
-
flex: 1;
|
|
80
|
-
max-width: 300px;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.search-box input {
|
|
84
|
-
width: 100%;
|
|
85
|
-
padding: 0.5rem 1rem;
|
|
86
|
-
border: 1px solid #0f3460;
|
|
87
|
-
border-radius: 4px;
|
|
88
|
-
background: #1a1a2e;
|
|
89
|
-
color: #eee;
|
|
90
|
-
font-size: 0.875rem;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.search-box input:focus {
|
|
94
|
-
outline: none;
|
|
95
|
-
border-color: #e94560;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.breadcrumb {
|
|
99
|
-
background: #16213e;
|
|
100
|
-
padding: 0.5rem 2rem;
|
|
101
|
-
display: flex;
|
|
102
|
-
gap: 0.5rem;
|
|
103
|
-
align-items: center;
|
|
104
|
-
font-size: 0.875rem;
|
|
105
|
-
border-bottom: 1px solid #0f3460;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.breadcrumb-item {
|
|
109
|
-
color: #888;
|
|
110
|
-
cursor: pointer;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.breadcrumb-item:hover {
|
|
114
|
-
color: #e94560;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.breadcrumb-item.active {
|
|
118
|
-
color: #eee;
|
|
119
|
-
cursor: default;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.breadcrumb-sep {
|
|
123
|
-
color: #444;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
#treemap {
|
|
127
|
-
width: 100%;
|
|
128
|
-
height: calc(100vh - 180px);
|
|
129
|
-
min-height: 400px;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.tooltip {
|
|
133
|
-
position: fixed;
|
|
134
|
-
background: #16213e;
|
|
135
|
-
border: 1px solid #0f3460;
|
|
136
|
-
border-radius: 4px;
|
|
137
|
-
padding: 0.75rem 1rem;
|
|
138
|
-
pointer-events: none;
|
|
139
|
-
z-index: 1000;
|
|
140
|
-
max-width: 400px;
|
|
141
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.tooltip-title {
|
|
145
|
-
font-weight: bold;
|
|
146
|
-
margin-bottom: 0.5rem;
|
|
147
|
-
word-break: break-all;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.tooltip-row {
|
|
151
|
-
display: flex;
|
|
152
|
-
justify-content: space-between;
|
|
153
|
-
gap: 2rem;
|
|
154
|
-
font-size: 0.875rem;
|
|
155
|
-
color: #888;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.tooltip-row span:last-child {
|
|
159
|
-
color: #eee;
|
|
160
|
-
font-weight: 500;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.legend {
|
|
164
|
-
position: fixed;
|
|
165
|
-
bottom: 1rem;
|
|
166
|
-
right: 1rem;
|
|
167
|
-
background: #16213e;
|
|
168
|
-
border: 1px solid #0f3460;
|
|
169
|
-
border-radius: 4px;
|
|
170
|
-
padding: 0.75rem 1rem;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.legend-title {
|
|
174
|
-
font-size: 0.75rem;
|
|
175
|
-
color: #888;
|
|
176
|
-
margin-bottom: 0.5rem;
|
|
177
|
-
text-transform: uppercase;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.legend-item {
|
|
181
|
-
display: flex;
|
|
182
|
-
align-items: center;
|
|
183
|
-
gap: 0.5rem;
|
|
184
|
-
font-size: 0.75rem;
|
|
185
|
-
margin-bottom: 0.25rem;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.legend-color {
|
|
189
|
-
width: 12px;
|
|
190
|
-
height: 12px;
|
|
191
|
-
border-radius: 2px;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.node {
|
|
195
|
-
cursor: pointer;
|
|
196
|
-
transition: opacity 0.2s;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.node:hover {
|
|
200
|
-
opacity: 0.8;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.node-label {
|
|
204
|
-
font-size: 11px;
|
|
205
|
-
fill: #000;
|
|
206
|
-
pointer-events: none;
|
|
207
|
-
text-anchor: middle;
|
|
208
|
-
}
|
|
209
|
-
</style>
|
|
210
|
-
</head>
|
|
211
|
-
<body>
|
|
212
|
-
<div class="header">
|
|
213
|
-
<h1>${Q(x)}</h1>
|
|
214
|
-
<div class="stats">
|
|
215
|
-
<div class="stat">
|
|
216
|
-
<div class="stat-value" id="total-size">${K(q.totalSize)}</div>
|
|
217
|
-
<div class="stat-label">Total Size</div>
|
|
218
|
-
</div>
|
|
219
|
-
<div class="stat">
|
|
220
|
-
<div class="stat-value" id="gzip-size">${K(q.totalGzipSize)}</div>
|
|
221
|
-
<div class="stat-label">Gzip Size</div>
|
|
222
|
-
</div>
|
|
223
|
-
<div class="stat">
|
|
224
|
-
<div class="stat-value">${q.moduleCount}</div>
|
|
225
|
-
<div class="stat-label">Modules</div>
|
|
226
|
-
</div>
|
|
227
|
-
<div class="stat">
|
|
228
|
-
<div class="stat-value">${q.chunks.length}</div>
|
|
229
|
-
<div class="stat-label">Chunks</div>
|
|
230
|
-
</div>
|
|
231
|
-
</div>
|
|
232
|
-
</div>
|
|
233
|
-
|
|
234
|
-
<div class="controls">
|
|
235
|
-
<div class="search-box">
|
|
236
|
-
<input type="text" id="search" placeholder="Search modules...">
|
|
237
|
-
</div>
|
|
238
|
-
<label>
|
|
239
|
-
<input type="checkbox" id="show-gzip" ${A?"checked":""}>
|
|
240
|
-
Show Gzip Size
|
|
241
|
-
</label>
|
|
242
|
-
</div>
|
|
243
|
-
|
|
244
|
-
<div class="breadcrumb" id="breadcrumb">
|
|
245
|
-
<span class="breadcrumb-item active">root</span>
|
|
246
|
-
</div>
|
|
247
|
-
|
|
248
|
-
<div id="treemap"></div>
|
|
249
|
-
|
|
250
|
-
<div class="tooltip" id="tooltip" style="display: none;"></div>
|
|
251
|
-
|
|
252
|
-
<div class="legend">
|
|
253
|
-
<div class="legend-title">File Types</div>
|
|
254
|
-
<div class="legend-item">
|
|
255
|
-
<div class="legend-color" style="background: ${F.js}"></div>
|
|
256
|
-
<span>JavaScript</span>
|
|
257
|
-
</div>
|
|
258
|
-
<div class="legend-item">
|
|
259
|
-
<div class="legend-color" style="background: ${F.css}"></div>
|
|
260
|
-
<span>CSS</span>
|
|
261
|
-
</div>
|
|
262
|
-
<div class="legend-item">
|
|
263
|
-
<div class="legend-color" style="background: ${F.html}"></div>
|
|
264
|
-
<span>HTML</span>
|
|
265
|
-
</div>
|
|
266
|
-
<div class="legend-item">
|
|
267
|
-
<div class="legend-color" style="background: ${F.image}"></div>
|
|
268
|
-
<span>Images</span>
|
|
269
|
-
</div>
|
|
270
|
-
<div class="legend-item">
|
|
271
|
-
<div class="legend-color" style="background: ${F.font}"></div>
|
|
272
|
-
<span>Fonts</span>
|
|
273
|
-
</div>
|
|
274
|
-
<div class="legend-item">
|
|
275
|
-
<div class="legend-color" style="background: ${F.other}"></div>
|
|
276
|
-
<span>Other</span>
|
|
277
|
-
</div>
|
|
278
|
-
</div>
|
|
279
|
-
|
|
280
|
-
<script src="https://d3js.org/d3.v7.min.js"></script>
|
|
281
|
-
<script>
|
|
282
|
-
const data = ${G};
|
|
283
|
-
const colors = ${JSON.stringify(F)};
|
|
284
|
-
|
|
285
|
-
let showGzip = ${A};
|
|
286
|
-
let currentRoot = data;
|
|
287
|
-
let searchTerm = '';
|
|
288
|
-
|
|
289
|
-
const container = document.getElementById('treemap');
|
|
290
|
-
const tooltip = document.getElementById('tooltip');
|
|
291
|
-
const breadcrumb = document.getElementById('breadcrumb');
|
|
292
|
-
const searchInput = document.getElementById('search');
|
|
293
|
-
const showGzipCheckbox = document.getElementById('show-gzip');
|
|
294
|
-
|
|
295
|
-
function formatSize(bytes) {
|
|
296
|
-
if (bytes < 1024) return bytes + ' B';
|
|
297
|
-
if (bytes < 1024 * 1024) return (bytes / 1024).toFixed(2) + ' KB';
|
|
298
|
-
return (bytes / (1024 * 1024)).toFixed(2) + ' MB';
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
function getColor(d) {
|
|
302
|
-
if (d.data.type) {
|
|
303
|
-
return colors[d.data.type] || colors.other;
|
|
304
|
-
}
|
|
305
|
-
if (d.data.name.includes('node_modules') || d.data.name.includes('vendor')) {
|
|
306
|
-
return colors.vendor;
|
|
307
|
-
}
|
|
308
|
-
return colors.other;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
function getSizeValue(d) {
|
|
312
|
-
return showGzip ? d.data.gzipSize : d.data.size;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
function render() {
|
|
316
|
-
container.innerHTML = '';
|
|
317
|
-
|
|
318
|
-
const width = container.clientWidth;
|
|
319
|
-
const height = container.clientHeight;
|
|
320
|
-
|
|
321
|
-
const hierarchy = d3.hierarchy(currentRoot)
|
|
322
|
-
.sum(d => {
|
|
323
|
-
if (searchTerm && d.name && !d.name.toLowerCase().includes(searchTerm.toLowerCase())) {
|
|
324
|
-
return 0;
|
|
325
|
-
}
|
|
326
|
-
return d.children ? 0 : getSizeValue({ data: d });
|
|
327
|
-
})
|
|
328
|
-
.sort((a, b) => getSizeValue(b) - getSizeValue(a));
|
|
329
|
-
|
|
330
|
-
const treemap = d3.treemap()
|
|
331
|
-
.size([width, height])
|
|
332
|
-
.paddingOuter(3)
|
|
333
|
-
.paddingTop(19)
|
|
334
|
-
.paddingInner(1)
|
|
335
|
-
.round(true);
|
|
336
|
-
|
|
337
|
-
const root = treemap(hierarchy);
|
|
338
|
-
|
|
339
|
-
const svg = d3.select(container)
|
|
340
|
-
.append('svg')
|
|
341
|
-
.attr('width', width)
|
|
342
|
-
.attr('height', height);
|
|
343
|
-
|
|
344
|
-
const node = svg.selectAll('g')
|
|
345
|
-
.data(root.descendants().filter(d => d.depth > 0))
|
|
346
|
-
.join('g')
|
|
347
|
-
.attr('transform', d => \`translate(\${d.x0},\${d.y0})\`);
|
|
348
|
-
|
|
349
|
-
node.append('rect')
|
|
350
|
-
.attr('class', 'node')
|
|
351
|
-
.attr('width', d => Math.max(0, d.x1 - d.x0))
|
|
352
|
-
.attr('height', d => Math.max(0, d.y1 - d.y0))
|
|
353
|
-
.attr('fill', d => getColor(d))
|
|
354
|
-
.attr('stroke', '#1a1a2e')
|
|
355
|
-
.attr('stroke-width', 1)
|
|
356
|
-
.on('click', (event, d) => {
|
|
357
|
-
if (d.children) {
|
|
358
|
-
zoomIn(d.data);
|
|
359
|
-
}
|
|
360
|
-
})
|
|
361
|
-
.on('mouseover', (event, d) => showTooltip(event, d))
|
|
362
|
-
.on('mousemove', (event) => moveTooltip(event))
|
|
363
|
-
.on('mouseout', hideTooltip);
|
|
364
|
-
|
|
365
|
-
node.append('text')
|
|
366
|
-
.attr('class', 'node-label')
|
|
367
|
-
.attr('x', d => (d.x1 - d.x0) / 2)
|
|
368
|
-
.attr('y', d => (d.y1 - d.y0) / 2 + 4)
|
|
369
|
-
.text(d => {
|
|
370
|
-
const width = d.x1 - d.x0;
|
|
371
|
-
const height = d.y1 - d.y0;
|
|
372
|
-
if (width < 40 || height < 20) return '';
|
|
373
|
-
const name = d.data.name;
|
|
374
|
-
const maxLen = Math.floor(width / 7);
|
|
375
|
-
return name.length > maxLen ? name.slice(0, maxLen - 2) + '..' : name;
|
|
376
|
-
});
|
|
377
|
-
|
|
378
|
-
// Group headers
|
|
379
|
-
node.filter(d => d.children)
|
|
380
|
-
.append('text')
|
|
381
|
-
.attr('x', 4)
|
|
382
|
-
.attr('y', 14)
|
|
383
|
-
.attr('fill', '#000')
|
|
384
|
-
.attr('font-size', '12px')
|
|
385
|
-
.attr('font-weight', 'bold')
|
|
386
|
-
.text(d => {
|
|
387
|
-
const width = d.x1 - d.x0;
|
|
388
|
-
const name = d.data.name;
|
|
389
|
-
const maxLen = Math.floor(width / 7);
|
|
390
|
-
return name.length > maxLen ? name.slice(0, maxLen - 2) + '..' : name;
|
|
391
|
-
});
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
function showTooltip(event, d) {
|
|
395
|
-
const size = d.data.size || d.value;
|
|
396
|
-
const gzipSize = d.data.gzipSize || Math.round(size * 0.3);
|
|
397
|
-
const path = d.data.path || d.data.name;
|
|
398
|
-
|
|
399
|
-
tooltip.innerHTML = \`
|
|
400
|
-
<div class="tooltip-title">\${path}</div>
|
|
401
|
-
<div class="tooltip-row">
|
|
402
|
-
<span>Size</span>
|
|
403
|
-
<span>\${formatSize(size)}</span>
|
|
404
|
-
</div>
|
|
405
|
-
<div class="tooltip-row">
|
|
406
|
-
<span>Gzip</span>
|
|
407
|
-
<span>\${formatSize(gzipSize)}</span>
|
|
408
|
-
</div>
|
|
409
|
-
\${d.data.type ? \`<div class="tooltip-row"><span>Type</span><span>\${d.data.type}</span></div>\` : ''}
|
|
410
|
-
\${d.children ? \`<div class="tooltip-row"><span>Children</span><span>\${d.children.length}</span></div>\` : ''}
|
|
411
|
-
\`;
|
|
412
|
-
tooltip.style.display = 'block';
|
|
413
|
-
moveTooltip(event);
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
function moveTooltip(event) {
|
|
417
|
-
const x = event.clientX + 10;
|
|
418
|
-
const y = event.clientY + 10;
|
|
419
|
-
tooltip.style.left = x + 'px';
|
|
420
|
-
tooltip.style.top = y + 'px';
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
function hideTooltip() {
|
|
424
|
-
tooltip.style.display = 'none';
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
function zoomIn(node) {
|
|
428
|
-
currentRoot = node;
|
|
429
|
-
updateBreadcrumb();
|
|
430
|
-
render();
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
function zoomOut(index) {
|
|
434
|
-
let node = data;
|
|
435
|
-
const parts = getBreadcrumbParts();
|
|
436
|
-
for (let i = 1; i <= index; i++) {
|
|
437
|
-
const child = node.children?.find(c => c.name === parts[i]);
|
|
438
|
-
if (child) node = child;
|
|
439
|
-
}
|
|
440
|
-
currentRoot = node;
|
|
441
|
-
updateBreadcrumb();
|
|
442
|
-
render();
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
function getBreadcrumbParts() {
|
|
446
|
-
const parts = ['root'];
|
|
447
|
-
let node = currentRoot;
|
|
448
|
-
const path = [];
|
|
449
|
-
|
|
450
|
-
function findPath(current, target, currentPath) {
|
|
451
|
-
if (current === target) {
|
|
452
|
-
path.push(...currentPath);
|
|
453
|
-
return true;
|
|
454
|
-
}
|
|
455
|
-
if (current.children) {
|
|
456
|
-
for (const child of current.children) {
|
|
457
|
-
if (findPath(child, target, [...currentPath, child.name])) {
|
|
458
|
-
return true;
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
return false;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
if (currentRoot !== data) {
|
|
466
|
-
findPath(data, currentRoot, []);
|
|
467
|
-
parts.push(...path);
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
return parts;
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
function updateBreadcrumb() {
|
|
474
|
-
const parts = getBreadcrumbParts();
|
|
475
|
-
breadcrumb.innerHTML = parts.map((part, i) => {
|
|
476
|
-
const isLast = i === parts.length - 1;
|
|
477
|
-
const sep = i > 0 ? '<span class="breadcrumb-sep">/</span>' : '';
|
|
478
|
-
return \`\${sep}<span class="breadcrumb-item \${isLast ? 'active' : ''}" onclick="zoomOut(\${i})">\${part}</span>\`;
|
|
479
|
-
}).join('');
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
searchInput.addEventListener('input', (e) => {
|
|
483
|
-
searchTerm = e.target.value;
|
|
484
|
-
render();
|
|
485
|
-
});
|
|
486
|
-
|
|
487
|
-
showGzipCheckbox.addEventListener('change', (e) => {
|
|
488
|
-
showGzip = e.target.checked;
|
|
489
|
-
render();
|
|
490
|
-
});
|
|
491
|
-
|
|
492
|
-
window.addEventListener('resize', render);
|
|
493
|
-
|
|
494
|
-
render();
|
|
495
|
-
</script>
|
|
496
|
-
</body>
|
|
497
|
-
</html>`}function X(q){let v={name:"root",size:q.totalSize,gzipSize:q.totalGzipSize,children:[]};for(let x of q.chunks){let A={name:x.name,size:x.size,gzipSize:x.gzipSize,children:[]};for(let I of x.modules)Y(A,I);v.children.push(A)}return v}function Y(q,v){let x=v.path.split("/"),A=q;for(let F=0;F<x.length-1;F++){let J=x[F],G=A.children?.find((V)=>V.name===J);if(!G){if(G={name:J,size:0,gzipSize:0,children:[]},!A.children)A.children=[];A.children.push(G)}A=G}let I=x[x.length-1];if(!A.children)A.children=[];A.children.push({name:I,path:v.path,size:v.size,gzipSize:v.gzipSize,type:v.type}),Z(q,v.size,v.gzipSize)}function Z(q,v,x){}function Q(q){return q.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function U(q){let v=process.platform,x=v==="darwin"?"open":v==="win32"?"start":"xdg-open";Bun.spawn([x,q],{stdio:["ignore","ignore","ignore"]})}
|
|
498
|
-
export{w as Ap,U as Bp};
|
package/dist/chunk-p73meypx.js
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
function V(B){let q={refs:B.refs||{},reactive:B.reactive||{},props:B.props||{},routeParams:B.routeParams||{},stores:B.stores||{},meta:B.meta||{},timestamp:Date.now()};return q.checksum=W(q),JSON.stringify(q).replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026").replace(/'/g,"\\u0027")}function W(B){let q=JSON.stringify({refs:Object.keys(B.refs||{}),reactive:Object.keys(B.reactive||{}),props:Object.keys(B.props||{})}),D=0;for(let F=0;F<q.length;F++){let G=q.charCodeAt(F);D=(D<<5)-D+G,D=D&D}return Math.abs(D).toString(36)}function X(B){return`<script id="__STX_STATE__" type="application/json">${V(B)}</script>`}function w(B){if(B.length===0)return"";return`data-stx-events='${JSON.stringify(B)}'`}function Y(){if(typeof window>"u")return null;let B=document.getElementById("__STX_STATE__");if(!B)return null;try{let q=JSON.parse(B.textContent||"{}");if(q.checksum){if(W(q)!==q.checksum)console.warn("[Hydration] State checksum mismatch - state may be corrupted")}return q}catch(q){return console.error("[Hydration] Failed to parse state:",q),null}}class Q{state=null;options;root=null;isHydrated=!1;pendingComponents=new Map;hydratedComponents=new Set;constructor(B={}){this.options={root:B.root||"#app",strict:B.strict??!1,onHydrating:B.onHydrating||(()=>{}),onHydrated:B.onHydrated||(()=>{}),onError:B.onError||console.error,performance:B.performance??!1,timeout:B.timeout??1e4}}async hydrate(){if(typeof window>"u")return;if(this.isHydrated)return;let B=this.options.performance?performance.now():0;try{this.root=typeof this.options.root==="string"?document.querySelector(this.options.root)||document.body:this.options.root,this.state=Y(),this.options.onHydrating(),this.root.classList.add("stx-hydrating");let q=new Promise((D,F)=>{setTimeout(()=>F(Error("Hydration timeout")),this.options.timeout)});if(await Promise.race([this.runHydration(),q]),this.isHydrated=!0,this.root.classList.remove("stx-hydrating"),this.root.classList.add("stx-hydrated"),this.options.performance){let D=performance.now()-B;console.log(`[Hydration] Completed in ${D.toFixed(2)}ms`)}this.options.onHydrated(),window.dispatchEvent(new CustomEvent("stx:hydrated"))}catch(q){this.root?.classList.remove("stx-hydrating"),this.root?.classList.add("stx-hydration-error"),this.options.onError(q),window.dispatchEvent(new CustomEvent("stx:hydration-error",{detail:{error:q}}))}}async runHydration(){if(!this.root)return;this.restoreGlobalState(),await this.hydrateComponents(),this.bindEventHandlers(),this.initializeReactiveBindings(),this.setupRouterIntegration()}restoreGlobalState(){if(!this.state)return;let B=window.stx;if(!B)return;if(this.state.routeParams&&B.setRouteParams)B.setRouteParams(this.state.routeParams);if(this.state.stores&&B.registerStore)Object.entries(this.state.stores).forEach(([q,D])=>{B.registerStore(q,D)});window.dispatchEvent(new CustomEvent("stx:state-restored",{detail:this.state}))}async hydrateComponents(){if(!this.root)return;let B=this.root.querySelectorAll("[data-stx-component]");for(let q of Array.from(B)){let D=q.getAttribute("data-stx-component"),F=q.getAttribute("data-stx-name")||D,G=q.getAttribute("data-stx-hydrate")||"eager",J=q.getAttribute("data-stx-props");if(!D)continue;let L={id:D,name:F||D,strategy:G,props:J?JSON.parse(J):{},events:[]};switch(this.pendingComponents.set(D,L),L.strategy){case"eager":await this.hydrateComponent(q,L);break;case"lazy":case"visible":this.setupVisibleHydration(q,L);break;case"idle":this.setupIdleHydration(q,L);break;case"interaction":this.setupInteractionHydration(q,L);break}}}async hydrateComponent(B,q){if(this.hydratedComponents.has(q.id))return;try{let D=this.state?.refs[q.id]||this.state?.reactive[q.id]||{};this.restoreComponentState(B,D),this.bindComponentEvents(B),this.initializeComponentReactivity(B,q),this.hydratedComponents.add(q.id),B.classList.add("stx-hydrated"),B.setAttribute("data-hydrated","true"),B.dispatchEvent(new CustomEvent("stx:component-hydrated",{detail:{id:q.id,name:q.name},bubbles:!0}))}catch(D){if(console.error(`[Hydration] Failed to hydrate component ${q.id}:`,D),B.classList.add("stx-hydration-error"),this.options.strict)throw D}}restoreComponentState(B,q){if(!q||typeof q!=="object")return;B.querySelectorAll("[data-stx-bind]").forEach((F)=>{let G=F.getAttribute("data-stx-bind");if(!G||!q[G])return;let J=q[G];if(F instanceof HTMLInputElement)if(F.type==="checkbox"||F.type==="radio")F.checked=Boolean(J);else F.value=String(J);else if(F instanceof HTMLSelectElement)F.value=String(J);else if(F instanceof HTMLTextAreaElement)F.value=String(J);else F.textContent=String(J)})}setupVisibleHydration(B,q){if(!("IntersectionObserver"in window)){this.hydrateComponent(B,q);return}let D=new IntersectionObserver((F)=>{F.forEach((G)=>{if(G.isIntersecting)D.disconnect(),this.hydrateComponent(B,q)})},{rootMargin:"100px",threshold:0});D.observe(B)}setupIdleHydration(B,q){let D=()=>this.hydrateComponent(B,q);if("requestIdleCallback"in window)window.requestIdleCallback(D,{timeout:2000});else setTimeout(D,200)}setupInteractionHydration(B,q){let D=["mouseenter","touchstart","focusin"],F=()=>{D.forEach((G)=>B.removeEventListener(G,F)),this.hydrateComponent(B,q)};D.forEach((G)=>{B.addEventListener(G,F,{once:!0,passive:!0})})}bindEventHandlers(){if(!this.root)return;this.root.querySelectorAll("[data-stx-events]").forEach((q)=>this.bindElementEvents(q)),this.bindDirectiveEvents()}bindElementEvents(B){let q=B.getAttribute("data-stx-events");if(!q)return;try{JSON.parse(q).forEach((F)=>{this.bindSingleEvent(B,F)})}catch(D){console.error("[Hydration] Failed to parse events:",D)}}bindDirectiveEvents(){if(!this.root)return;["click","submit","input","change","focus","blur","keydown","keyup","keypress","mouseenter","mouseleave","touchstart","touchend","scroll","resize"].forEach((q)=>{let D=`data-stx-on-${q}`;this.root.querySelectorAll(`[${D}]`).forEach((G)=>{let J=G.getAttribute(D);if(!J)return;this.bindSingleEvent(G,{type:q,handler:J,modifiers:this.parseModifiers(G,q)})})})}parseModifiers(B,q){let D=[],F=B.getAttribute(`data-stx-${q}-modifiers`);if(F)D.push(...F.split(",").map((G)=>G.trim()));return D}bindSingleEvent(B,q){let D=this.resolveHandler(q.handler);if(!D){console.warn(`[Hydration] Handler not found: ${q.handler}`);return}let F=(J)=>{if(q.modifiers?.includes("prevent")||q.preventDefault)J.preventDefault();if(q.modifiers?.includes("stop")||q.stopPropagation)J.stopPropagation();try{D.call(B,J)}catch(L){console.error("[Hydration] Event handler error:",L)}},G={};if(q.modifiers?.includes("once"))G.once=!0;if(q.modifiers?.includes("passive"))G.passive=!0;if(q.modifiers?.includes("capture"))G.capture=!0;B.addEventListener(q.type,F,G)}resolveHandler(B){let q=window.stx;if(q&&q[B])return q[B];if(window[B])return window[B];try{if(B.match(/^\w+\+\+$/)||B.match(/^\w+--$/)){let G=B.replace(/[+-]+$/,"");return()=>{if(q&&q[G]){if(typeof q[G].value<"u")if(B.includes("++"))q[G].value++;else q[G].value--}}}let D=B.match(/^(\w+)\s*=\s*(.+)$/);if(D){let[,G,J]=D;return()=>{if(q&&q[G]){let L=Function(`return ${J}`)();if(typeof q[G].value<"u")q[G].value=L}}}let F=B.match(/^(\w+)\((.*)\)$/);if(F){let[,G,J]=F;return(L)=>{let U=q?.[G]||window[G];if(U){let _=J?Function("$event",`return [${J}]`)(L):[];U(..._)}}}return(G)=>{Function("$event","stx",B)(G,q)}}catch{return null}}bindComponentEvents(B){B.querySelectorAll("[data-stx-events]").forEach((D)=>{this.bindElementEvents(D)})}initializeComponentReactivity(B,q){if(!window.stx)return;B.querySelectorAll("[data-stx-reactive]").forEach((G)=>{let J=G.getAttribute("data-stx-reactive");if(!J)return;this.setupReactiveBinding(G,J)})}initializeReactiveBindings(){if(!this.root)return;this.getTextNodesWithExpressions(this.root).forEach(({node:D,expressions:F})=>{F.forEach((G)=>{this.setupTextNodeBinding(D,G)})}),this.root.querySelectorAll("[data-stx-bind-attrs]").forEach((D)=>{let F=D.getAttribute("data-stx-bind-attrs");if(!F)return;try{let G=JSON.parse(F);Object.entries(G).forEach(([J,L])=>{this.setupAttributeBinding(D,J,L)})}catch{}})}getTextNodesWithExpressions(B){let q=[],D=document.createTreeWalker(B,NodeFilter.SHOW_TEXT),F;while(F=D.nextNode()){let J=(F.textContent||"").match(/\{\{\s*([^}]+)\s*\}\}/g);if(J)q.push({node:F,expressions:J.map((L)=>L.replace(/\{\{\s*|\s*\}\}/g,""))})}return q}setupTextNodeBinding(B,q){let D=window.stx;if(!D)return;let F=B.textContent||"",G=()=>{try{let L=Function("stx",`with(stx) { return ${q} }`)(D);B.textContent=F.replace(new RegExp(`\\{\\{\\s*${q.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*\\}\\}`),String(L))}catch{}};G();let J=q.match(/^(\w+)(\.value)?$/);if(J&&D[J[1]]?.subscribe)D[J[1]].subscribe(G)}setupAttributeBinding(B,q,D){let F=window.stx;if(!F)return;let G=()=>{try{let L=Function("stx",`with(stx) { return ${D} }`)(F);if(typeof L==="boolean")if(L)B.setAttribute(q,"");else B.removeAttribute(q);else B.setAttribute(q,String(L))}catch{}};G();let J=D.match(/^(\w+)(\.value)?$/);if(J&&F[J[1]]?.subscribe)F[J[1]].subscribe(G)}setupReactiveBinding(B,q){let D=window.stx;if(!D)return;let F=()=>{try{let J=Function("stx",`with(stx) { return ${q} }`)(D);B.textContent=String(J)}catch{}};F();let G=q.match(/^(\w+)(\.value)?$/);if(G&&D[G[1]]?.subscribe)D[G[1]].subscribe(F)}setupRouterIntegration(){window.addEventListener("stx:navigate",(B)=>{let{url:q}=B.detail||{};if(q){if(window.stx?.setRouteParams){let F=new URL(q,window.location.origin)}}}),window.addEventListener("stx:load",()=>{this.hydrateComponents(),this.bindEventHandlers()})}get hydrated(){return this.isHydrated}getState(){return this.state}async hydrateById(B){let q=this.pendingComponents.get(B),D=document.querySelector(`[data-stx-component="${B}"]`);if(q&&D)await this.hydrateComponent(D,q)}}function $(B){return`
|
|
3
|
-
${B?X(B):""}
|
|
4
|
-
<script data-stx-hydration-runtime>
|
|
5
|
-
(function() {
|
|
6
|
-
'use strict';
|
|
7
|
-
|
|
8
|
-
// Wait for DOM and stx runtime
|
|
9
|
-
function init() {
|
|
10
|
-
if (!window.stx) {
|
|
11
|
-
setTimeout(init, 10);
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
// Extract state
|
|
16
|
-
const stateEl = document.getElementById('__STX_STATE__');
|
|
17
|
-
const state = stateEl ? JSON.parse(stateEl.textContent || '{}') : {};
|
|
18
|
-
|
|
19
|
-
// Restore stores
|
|
20
|
-
if (state.stores) {
|
|
21
|
-
Object.entries(state.stores).forEach(([name, storeState]) => {
|
|
22
|
-
window.stx.registerStore(name, storeState);
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// Restore route params
|
|
27
|
-
if (state.routeParams) {
|
|
28
|
-
window.stx.setRouteParams(state.routeParams);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// Hydrate components
|
|
32
|
-
const components = document.querySelectorAll('[data-stx-component]');
|
|
33
|
-
components.forEach(el => {
|
|
34
|
-
const id = el.getAttribute('data-stx-component');
|
|
35
|
-
const strategy = el.getAttribute('data-stx-hydrate') || 'eager';
|
|
36
|
-
|
|
37
|
-
const hydrate = () => {
|
|
38
|
-
// Bind events
|
|
39
|
-
el.querySelectorAll('[data-stx-on-click]').forEach(eventEl => {
|
|
40
|
-
const handler = eventEl.getAttribute('data-stx-on-click');
|
|
41
|
-
if (handler) {
|
|
42
|
-
eventEl.addEventListener('click', (e) => {
|
|
43
|
-
try {
|
|
44
|
-
new Function('$event', 'stx', handler)(e, window.stx);
|
|
45
|
-
}
|
|
46
|
-
catch (err) {
|
|
47
|
-
console.error('[Hydration] Event error:', err);
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
// Mark hydrated
|
|
54
|
-
el.classList.add('stx-hydrated');
|
|
55
|
-
el.setAttribute('data-hydrated', 'true');
|
|
56
|
-
el.dispatchEvent(new CustomEvent('stx:hydrated', { bubbles: true }));
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
// Execute based on strategy
|
|
60
|
-
if (strategy === 'eager') {
|
|
61
|
-
hydrate();
|
|
62
|
-
}
|
|
63
|
-
else if (strategy === 'idle') {
|
|
64
|
-
if ('requestIdleCallback' in window) {
|
|
65
|
-
requestIdleCallback(hydrate, { timeout: 2000 });
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
setTimeout(hydrate, 100);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
else if (strategy === 'visible') {
|
|
72
|
-
const observer = new IntersectionObserver(entries => {
|
|
73
|
-
if (entries[0].isIntersecting) {
|
|
74
|
-
observer.disconnect();
|
|
75
|
-
hydrate();
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
observer.observe(el);
|
|
79
|
-
}
|
|
80
|
-
else if (strategy === 'interaction') {
|
|
81
|
-
['mouseenter', 'focusin', 'touchstart'].forEach(event => {
|
|
82
|
-
el.addEventListener(event, hydrate, { once: true });
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
// Dispatch global hydrated event
|
|
88
|
-
window.dispatchEvent(new CustomEvent('stx:hydrated'));
|
|
89
|
-
document.body.classList.add('stx-hydrated');
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
if (document.readyState === 'loading') {
|
|
93
|
-
document.addEventListener('DOMContentLoaded', init);
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
init();
|
|
97
|
-
}
|
|
98
|
-
})();
|
|
99
|
-
</script>
|
|
100
|
-
`}var O=null;function Z(B){if(!O)O=new Q(B);return O}async function P(B){await Z(B).hydrate()}function j(){return`
|
|
101
|
-
<style data-stx-hydration-styles>
|
|
102
|
-
/* Pre-hydration state */
|
|
103
|
-
[data-stx-component]:not(.stx-hydrated) {
|
|
104
|
-
/* Prevent layout shift with min dimensions */
|
|
105
|
-
min-height: 1px;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/* Loading state */
|
|
109
|
-
.stx-hydrating {
|
|
110
|
-
cursor: wait;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/* Hydrated state */
|
|
114
|
-
.stx-hydrated {
|
|
115
|
-
/* Ready for interaction */
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/* Error state */
|
|
119
|
-
.stx-hydration-error {
|
|
120
|
-
outline: 2px dashed red;
|
|
121
|
-
outline-offset: -2px;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/* Progressive enhancement */
|
|
125
|
-
@supports not (IntersectionObserver) {
|
|
126
|
-
/* Fallback for old browsers */
|
|
127
|
-
[data-stx-hydrate="visible"],
|
|
128
|
-
[data-stx-hydrate="lazy"] {
|
|
129
|
-
/* Hydrate immediately */
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
</style>
|
|
133
|
-
`}var z={HydrationRuntime:Q,serializeState:V,generateStateScript:X,generateHydrationScript:$,generateHydrationCSS:j,extractState:Y,getHydrationRuntime:Z,hydrate:P};
|
|
134
|
-
export{V as tm,X as um,w as vm,Y as wm,Q as xm,$ as ym,Z as zm,P as Am,j as Bm,z as Cm};
|
package/dist/chunk-pa9zb7ty.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
var K={},W=[],O={};function _(){return K}function $(){return O}function C(){K={},W.length=0,O={}}function Q(j){K=X(K,j)}function X(j,z){return{title:z.title??j.title,titleTemplate:z.titleTemplate??j.titleTemplate,base:z.base??j.base,meta:[...j.meta||[],...z.meta||[]],link:[...j.link||[],...z.link||[]],script:[...j.script||[],...z.script||[]],style:[...j.style||[],...z.style||[]],htmlAttrs:{...j.htmlAttrs,...z.htmlAttrs},bodyAttrs:{...j.bodyAttrs,...z.bodyAttrs}}}function Y(j){let z=[];if(j.description)z.push({name:"description",content:j.description});if(j.keywords){let L=Array.isArray(j.keywords)?j.keywords.join(", "):j.keywords;z.push({name:"keywords",content:L})}if(j.author)z.push({name:"author",content:j.author});if(j.robots)z.push({name:"robots",content:j.robots});let A=j.ogTitle??j.title,B=j.ogDescription??j.description;if(A)z.push({property:"og:title",content:A});if(B)z.push({property:"og:description",content:B});if(j.ogImage)z.push({property:"og:image",content:j.ogImage});if(j.ogUrl)z.push({property:"og:url",content:j.ogUrl});if(j.ogType)z.push({property:"og:type",content:j.ogType});if(j.ogSiteName)z.push({property:"og:site_name",content:j.ogSiteName});if(j.ogLocale)z.push({property:"og:locale",content:j.ogLocale});let E=j.twitterTitle??j.title,F=j.twitterDescription??j.description,G=j.twitterImage??j.ogImage;if(j.twitterCard)z.push({name:"twitter:card",content:j.twitterCard});if(E)z.push({name:"twitter:title",content:E});if(F)z.push({name:"twitter:description",content:F});if(G)z.push({name:"twitter:image",content:G});if(j.twitterSite)z.push({name:"twitter:site",content:j.twitterSite});if(j.twitterCreator)z.push({name:"twitter:creator",content:j.twitterCreator});if(j.articleAuthor)z.push({property:"article:author",content:j.articleAuthor});if(j.articlePublishedTime)z.push({property:"article:published_time",content:j.articlePublishedTime});if(j.articleModifiedTime)z.push({property:"article:modified_time",content:j.articleModifiedTime});if(j.articleSection)z.push({property:"article:section",content:j.articleSection});if(j.articleTags)for(let L of j.articleTags)z.push({property:"article:tag",content:L});let J=[];if(j.canonical)J.push({rel:"canonical",href:j.canonical});Q({title:j.title,titleTemplate:j.titleTemplate,meta:z,link:J})}function I(j){if(O={...O,...j},j.title||j.description)Y({title:j.title,description:j.description})}function h(j){let z=typeof j==="function"?j():j;Q({title:z})}function x(j=K){let z=[];if(j.title){let A=j.title;if(j.titleTemplate)A=typeof j.titleTemplate==="function"?j.titleTemplate(A):j.titleTemplate.replace("%s",A);z.push(`<title>${N(A)}</title>`)}if(j.base){let A=Object.entries(j.base).map(([B,E])=>`${B}="${N(E)}"`).join(" ");z.push(`<base ${A}>`)}for(let A of j.meta||[]){let B=Object.entries(A).filter(([E,F])=>F!==void 0).map(([E,F])=>{return`${E==="httpEquiv"?"http-equiv":E}="${N(String(F))}"`}).join(" ");z.push(`<meta ${B}>`)}for(let A of j.link||[]){let B=Object.entries(A).filter(([E,F])=>F!==void 0).map(([E,F])=>`${E}="${N(String(F))}"`).join(" ");z.push(`<link ${B}>`)}for(let A of j.script||[]){let{content:B,...E}=A,F=Object.entries(E).filter(([G,J])=>J!==void 0).map(([G,J])=>{if(typeof J==="boolean")return J?G:"";return`${G}="${N(String(J))}"`}).filter(Boolean).join(" ");if(B)z.push(`<script ${F}>${B}</script>`);else z.push(`<script ${F}></script>`)}for(let A of j.style||[]){let B=A.type?` type="${A.type}"`:"";z.push(`<style${B}>${A.content}</style>`)}return z.join(`
|
|
3
|
-
`)}function D(j=K){if(!j.htmlAttrs)return"";return Object.entries(j.htmlAttrs).map(([z,A])=>`${z}="${N(A)}"`).join(" ")}function S(j=K){if(!j.bodyAttrs)return"";return Object.entries(j.bodyAttrs).map(([z,A])=>`${z}="${N(A)}"`).join(" ")}function N(j){return j.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function M(j=K){if(typeof document>"u")return;if(j.title){let z=j.title;if(j.titleTemplate)z=typeof j.titleTemplate==="function"?j.titleTemplate(z):j.titleTemplate.replace("%s",z);document.title=z}for(let z of j.meta||[]){let A=z.name?`meta[name="${z.name}"]`:z.property?`meta[property="${z.property}"]`:null;if(A){let B=document.querySelector(A);if(!B){if(B=document.createElement("meta"),z.name)B.setAttribute("name",z.name);if(z.property)B.setAttribute("property",z.property);document.head.appendChild(B)}B.setAttribute("content",z.content)}}for(let z of j.link||[]){let A=`link[rel="${z.rel}"]${z.href?`[href="${z.href}"]`:""}`,B=document.querySelector(A);if(!B)B=document.createElement("link"),document.head.appendChild(B);for(let[E,F]of Object.entries(z))if(F!==void 0)B.setAttribute(E,String(F))}if(j.htmlAttrs)for(let[z,A]of Object.entries(j.htmlAttrs))document.documentElement.setAttribute(z,A);if(j.bodyAttrs)for(let[z,A]of Object.entries(j.bodyAttrs))document.body.setAttribute(z,A)}function P(j){let z="";return{content:j.replace(/@head\s*([\s\S]*?)@endhead/g,(B,E)=>{return z+=E.trim()+`
|
|
4
|
-
`,""}),headContent:z.trim()}}function V(j,z){return j.replace(/@title\s*\(\s*(?:(['"`])(.+?)\1|([^)]+))\s*\)/g,(A,B,E,F)=>{let G=B?E:z[(F||"").trim()]??F;return Q({title:G}),""})}function w(j,z){return j.replace(/@meta\s*\(\s*(['"`])(.+?)\1\s*,\s*(?:(['"`])(.+?)\3|([^)]+))\s*\)/g,(A,B,E,F,G,J)=>{let L=F?G:J,R=F?L:z[(L||"").trim()]??L,U=E.includes(":")?{property:E,content:R}:{name:E,content:R};return Q({meta:[U]}),""})}export{_ as $v,$ as aw,C as bw,Q as cw,Y as dw,I as ew,h as fw,x as gw,D as hw,S as iw,M as jw,P as kw,V as lw,w as mw};
|