@stacksjs/stx 0.2.95 → 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 -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-fzm3y0r3.js
DELETED
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
var A=[{key:"k",modifiers:["meta"],description:"Open search",category:"Navigation",action:"openSearch"},{key:"ArrowUp",description:"Previous story",category:"Navigation",action:"prevStory"},{key:"ArrowDown",description:"Next story",category:"Navigation",action:"nextStory"},{key:"ArrowLeft",description:"Previous variant",category:"Navigation",action:"prevVariant"},{key:"ArrowRight",description:"Next variant",category:"Navigation",action:"nextVariant"},{key:"Enter",description:"Select story",category:"Navigation",action:"selectStory"},{key:"Escape",description:"Close panel/modal",category:"Navigation",action:"closePanel"},{key:"d",description:"Toggle dark mode",category:"View",action:"toggleDarkMode"},{key:"f",description:"Toggle fullscreen",category:"View",action:"toggleFullscreen"},{key:"s",description:"Toggle sidebar",category:"View",action:"toggleSidebar"},{key:"a",description:"Toggle addons panel",category:"View",action:"toggleAddons"},{key:"z",description:"Zoom in",category:"View",action:"zoomIn"},{key:"x",description:"Zoom out",category:"View",action:"zoomOut"},{key:"0",description:"Reset zoom",category:"View",action:"resetZoom"},{key:"r",description:"Reload story",category:"Actions",action:"reloadStory"},{key:"c",description:"Copy story code",category:"Actions",action:"copyCode"},{key:"p",description:"Open props panel",category:"Actions",action:"openProps"},{key:"b",description:"Toggle bookmark",category:"Actions",action:"toggleBookmark"},{key:"t",description:"Run tests",category:"Actions",action:"runTests"},{key:"?",description:"Show shortcuts",category:"Help",action:"showShortcuts"}];function B(w){let q=[];if(w.modifiers)for(let v of w.modifiers)switch(v){case"meta":q.push("\u2318");break;case"ctrl":q.push("Ctrl");break;case"alt":q.push("Alt");break;case"shift":q.push("\u21E7");break}let j=w.key;switch(j){case"ArrowUp":j="\u2191";break;case"ArrowDown":j="\u2193";break;case"ArrowLeft":j="\u2190";break;case"ArrowRight":j="\u2192";break;case"Enter":j="\u21B5";break;case"Escape":j="Esc";break;default:j=j.toUpperCase()}return q.push(j),q.join(" + ")}function C(w=A){let q=new Map;for(let v of w){let x=q.get(v.category)||[];x.push(v),q.set(v.category,x)}return`
|
|
3
|
-
<div class="shortcuts-modal" id="shortcuts-modal" style="display: none;">
|
|
4
|
-
<div class="shortcuts-backdrop" onclick="closeShortcutsModal()"></div>
|
|
5
|
-
<div class="shortcuts-content">
|
|
6
|
-
<div class="shortcuts-header">
|
|
7
|
-
<h3>Keyboard Shortcuts</h3>
|
|
8
|
-
<button class="shortcuts-close" onclick="closeShortcutsModal()">\xD7</button>
|
|
9
|
-
</div>
|
|
10
|
-
<div class="shortcuts-body">
|
|
11
|
-
${Array.from(q.entries()).map(([v,x])=>`
|
|
12
|
-
<div class="shortcuts-category">
|
|
13
|
-
<h4>${v}</h4>
|
|
14
|
-
<div class="shortcuts-list">
|
|
15
|
-
${x.map((z)=>`
|
|
16
|
-
<div class="shortcut-item">
|
|
17
|
-
<span class="shortcut-desc">${z.description}</span>
|
|
18
|
-
<kbd class="shortcut-key">${B(z)}</kbd>
|
|
19
|
-
</div>
|
|
20
|
-
`).join("")}
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
`).join("")}
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
`}function D(){return`
|
|
28
|
-
.shortcuts-modal {
|
|
29
|
-
position: fixed;
|
|
30
|
-
inset: 0;
|
|
31
|
-
z-index: 1000;
|
|
32
|
-
display: flex;
|
|
33
|
-
align-items: center;
|
|
34
|
-
justify-content: center;
|
|
35
|
-
}
|
|
36
|
-
.shortcuts-backdrop {
|
|
37
|
-
position: absolute;
|
|
38
|
-
inset: 0;
|
|
39
|
-
background: rgba(0, 0, 0, 0.5);
|
|
40
|
-
}
|
|
41
|
-
.shortcuts-content {
|
|
42
|
-
position: relative;
|
|
43
|
-
background: var(--bg);
|
|
44
|
-
border-radius: 12px;
|
|
45
|
-
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
|
|
46
|
-
max-width: 600px;
|
|
47
|
-
max-height: 80vh;
|
|
48
|
-
overflow: hidden;
|
|
49
|
-
display: flex;
|
|
50
|
-
flex-direction: column;
|
|
51
|
-
}
|
|
52
|
-
.shortcuts-header {
|
|
53
|
-
display: flex;
|
|
54
|
-
justify-content: space-between;
|
|
55
|
-
align-items: center;
|
|
56
|
-
padding: 16px 20px;
|
|
57
|
-
border-bottom: 1px solid var(--border);
|
|
58
|
-
}
|
|
59
|
-
.shortcuts-header h3 {
|
|
60
|
-
margin: 0;
|
|
61
|
-
font-size: 16px;
|
|
62
|
-
}
|
|
63
|
-
.shortcuts-close {
|
|
64
|
-
background: none;
|
|
65
|
-
border: none;
|
|
66
|
-
font-size: 24px;
|
|
67
|
-
cursor: pointer;
|
|
68
|
-
color: var(--text-secondary);
|
|
69
|
-
padding: 0;
|
|
70
|
-
line-height: 1;
|
|
71
|
-
}
|
|
72
|
-
.shortcuts-body {
|
|
73
|
-
padding: 20px;
|
|
74
|
-
overflow-y: auto;
|
|
75
|
-
display: grid;
|
|
76
|
-
grid-template-columns: repeat(2, 1fr);
|
|
77
|
-
gap: 24px;
|
|
78
|
-
}
|
|
79
|
-
.shortcuts-category h4 {
|
|
80
|
-
margin: 0 0 12px;
|
|
81
|
-
font-size: 12px;
|
|
82
|
-
text-transform: uppercase;
|
|
83
|
-
color: var(--text-secondary);
|
|
84
|
-
letter-spacing: 0.5px;
|
|
85
|
-
}
|
|
86
|
-
.shortcuts-list {
|
|
87
|
-
display: flex;
|
|
88
|
-
flex-direction: column;
|
|
89
|
-
gap: 8px;
|
|
90
|
-
}
|
|
91
|
-
.shortcut-item {
|
|
92
|
-
display: flex;
|
|
93
|
-
justify-content: space-between;
|
|
94
|
-
align-items: center;
|
|
95
|
-
gap: 12px;
|
|
96
|
-
}
|
|
97
|
-
.shortcut-desc {
|
|
98
|
-
font-size: 13px;
|
|
99
|
-
color: var(--text);
|
|
100
|
-
}
|
|
101
|
-
.shortcut-key {
|
|
102
|
-
font-family: monospace;
|
|
103
|
-
font-size: 11px;
|
|
104
|
-
padding: 4px 8px;
|
|
105
|
-
background: var(--bg-secondary);
|
|
106
|
-
border: 1px solid var(--border);
|
|
107
|
-
border-radius: 4px;
|
|
108
|
-
color: var(--text-secondary);
|
|
109
|
-
white-space: nowrap;
|
|
110
|
-
}
|
|
111
|
-
`}function E(){return`
|
|
112
|
-
<script>
|
|
113
|
-
window.__stxShortcuts = {
|
|
114
|
-
shortcuts: ${JSON.stringify(A)},
|
|
115
|
-
|
|
116
|
-
init() {
|
|
117
|
-
document.addEventListener('keydown', this.handleKeydown.bind(this));
|
|
118
|
-
},
|
|
119
|
-
|
|
120
|
-
handleKeydown(event) {
|
|
121
|
-
// Don't handle if typing in input
|
|
122
|
-
if (event.target.tagName === 'INPUT' || event.target.tagName === 'TEXTAREA') {
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
const shortcut = this.findShortcut(event);
|
|
127
|
-
if (shortcut) {
|
|
128
|
-
event.preventDefault();
|
|
129
|
-
this.executeAction(shortcut.action);
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
|
|
133
|
-
findShortcut(event) {
|
|
134
|
-
return this.shortcuts.find(s => {
|
|
135
|
-
if (s.key.toLowerCase() !== event.key.toLowerCase()) return false;
|
|
136
|
-
|
|
137
|
-
const mods = s.modifiers || [];
|
|
138
|
-
if (mods.includes('meta') !== event.metaKey) return false;
|
|
139
|
-
if (mods.includes('ctrl') !== event.ctrlKey) return false;
|
|
140
|
-
if (mods.includes('alt') !== event.altKey) return false;
|
|
141
|
-
if (mods.includes('shift') !== event.shiftKey) return false;
|
|
142
|
-
|
|
143
|
-
return true;
|
|
144
|
-
});
|
|
145
|
-
},
|
|
146
|
-
|
|
147
|
-
executeAction(action) {
|
|
148
|
-
switch (action) {
|
|
149
|
-
case 'openSearch':
|
|
150
|
-
document.getElementById('search-input')?.focus();
|
|
151
|
-
break;
|
|
152
|
-
case 'prevStory':
|
|
153
|
-
this.navigateStory(-1);
|
|
154
|
-
break;
|
|
155
|
-
case 'nextStory':
|
|
156
|
-
this.navigateStory(1);
|
|
157
|
-
break;
|
|
158
|
-
case 'prevVariant':
|
|
159
|
-
this.navigateVariant(-1);
|
|
160
|
-
break;
|
|
161
|
-
case 'nextVariant':
|
|
162
|
-
this.navigateVariant(1);
|
|
163
|
-
break;
|
|
164
|
-
case 'selectStory':
|
|
165
|
-
document.querySelector('.story-item.focused')?.click();
|
|
166
|
-
break;
|
|
167
|
-
case 'closePanel':
|
|
168
|
-
this.closeActivePanel();
|
|
169
|
-
break;
|
|
170
|
-
case 'toggleDarkMode':
|
|
171
|
-
document.documentElement.classList.toggle('dark');
|
|
172
|
-
break;
|
|
173
|
-
case 'toggleFullscreen':
|
|
174
|
-
this.toggleFullscreen();
|
|
175
|
-
break;
|
|
176
|
-
case 'toggleSidebar':
|
|
177
|
-
document.querySelector('.sidebar')?.classList.toggle('hidden');
|
|
178
|
-
break;
|
|
179
|
-
case 'toggleAddons':
|
|
180
|
-
document.querySelector('.addons-panel')?.classList.toggle('hidden');
|
|
181
|
-
break;
|
|
182
|
-
case 'zoomIn':
|
|
183
|
-
window.__stxStory?.zoomIn?.();
|
|
184
|
-
break;
|
|
185
|
-
case 'zoomOut':
|
|
186
|
-
window.__stxStory?.zoomOut?.();
|
|
187
|
-
break;
|
|
188
|
-
case 'resetZoom':
|
|
189
|
-
window.__stxStory?.resetZoom?.();
|
|
190
|
-
break;
|
|
191
|
-
case 'reloadStory':
|
|
192
|
-
window.__stxStory?.reloadCurrentStory?.();
|
|
193
|
-
break;
|
|
194
|
-
case 'copyCode':
|
|
195
|
-
window.__stxStory?.copyCode?.();
|
|
196
|
-
break;
|
|
197
|
-
case 'openProps':
|
|
198
|
-
document.querySelector('[data-panel="props"]')?.click();
|
|
199
|
-
break;
|
|
200
|
-
case 'toggleBookmark':
|
|
201
|
-
window.__stxBookmarks?.toggleCurrent?.();
|
|
202
|
-
break;
|
|
203
|
-
case 'runTests':
|
|
204
|
-
window.__stxStory?.runTests?.();
|
|
205
|
-
break;
|
|
206
|
-
case 'showShortcuts':
|
|
207
|
-
this.showModal();
|
|
208
|
-
break;
|
|
209
|
-
}
|
|
210
|
-
},
|
|
211
|
-
|
|
212
|
-
navigateStory(direction) {
|
|
213
|
-
const items = Array.from(document.querySelectorAll('.story-item'));
|
|
214
|
-
const current = document.querySelector('.story-item.active');
|
|
215
|
-
const currentIndex = current ? items.indexOf(current) : -1;
|
|
216
|
-
const nextIndex = Math.max(0, Math.min(items.length - 1, currentIndex + direction));
|
|
217
|
-
items[nextIndex]?.click();
|
|
218
|
-
},
|
|
219
|
-
|
|
220
|
-
navigateVariant(direction) {
|
|
221
|
-
const buttons = Array.from(document.querySelectorAll('.variant-btn'));
|
|
222
|
-
const current = document.querySelector('.variant-btn.active');
|
|
223
|
-
const currentIndex = current ? buttons.indexOf(current) : -1;
|
|
224
|
-
const nextIndex = Math.max(0, Math.min(buttons.length - 1, currentIndex + direction));
|
|
225
|
-
buttons[nextIndex]?.click();
|
|
226
|
-
},
|
|
227
|
-
|
|
228
|
-
closeActivePanel() {
|
|
229
|
-
const modal = document.querySelector('.shortcuts-modal[style*="flex"]');
|
|
230
|
-
if (modal) {
|
|
231
|
-
closeShortcutsModal();
|
|
232
|
-
return;
|
|
233
|
-
}
|
|
234
|
-
// Close other panels
|
|
235
|
-
document.querySelector('.panel.open')?.classList.remove('open');
|
|
236
|
-
},
|
|
237
|
-
|
|
238
|
-
toggleFullscreen() {
|
|
239
|
-
if (document.fullscreenElement) {
|
|
240
|
-
document.exitFullscreen();
|
|
241
|
-
}
|
|
242
|
-
else {
|
|
243
|
-
document.documentElement.requestFullscreen();
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
|
|
247
|
-
showModal() {
|
|
248
|
-
const modal = document.getElementById('shortcuts-modal');
|
|
249
|
-
if (modal) modal.style.display = 'flex';
|
|
250
|
-
}
|
|
251
|
-
};
|
|
252
|
-
|
|
253
|
-
function closeShortcutsModal() {
|
|
254
|
-
const modal = document.getElementById('shortcuts-modal');
|
|
255
|
-
if (modal) modal.style.display = 'none';
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
// Initialize on load
|
|
259
|
-
if (document.readyState === 'loading') {
|
|
260
|
-
document.addEventListener('DOMContentLoaded', () => window.__stxShortcuts.init());
|
|
261
|
-
}
|
|
262
|
-
else {
|
|
263
|
-
window.__stxShortcuts.init();
|
|
264
|
-
}
|
|
265
|
-
</script>
|
|
266
|
-
`}
|
|
267
|
-
export{A as Ub,B as Vb,C as Wb,D as Xb,E as Yb};
|
package/dist/chunk-g1vt329s.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{$v as s,cw as a,dw as i}from"./chunk-pa9zb7ty.js";import{fy as I}from"./chunk-bs3gmfxz.js";import{Ty as c}from"./chunk-7ed3tean.js";import{pz as v}from"./chunk-w3b6m427.js";import{pB as f}from"./chunk-xv34zbp4.js";import k from"path";import y from"process";function NQ(H){let Q=[],Z=0,z=H.split(`
|
|
3
|
-
`);for(let X of z){let Y=Z,$=null,_=!1;for(let J=0;J<X.length;J++){let G=X[J];if(_){_=!1;continue}if(G==="\\"){_=!0;continue}if($){if(G===$)$=null;continue}if(G==="'"||G==='"'||G==="`"){$=G;continue}if(G==="/"&&J+1<X.length&&X[J+1]==="/")break;if(G==="{")Z++;else if(G==="}")Z--}if(Y===0){let J=X.match(/(?:const|let|var)\s+(\w+)\s*=/);if(J)Q.push(J[1]);else if(/^\s*(?:const|let|var)\s+\w+\s*;?\s*$/.test(X)){let G=X.match(/(?:const|let|var)\s+(\w+)/);if(G)Q.push(G[1])}else{let G=X.match(/(?:const|let|var)\s+(\{[^}]+\}|\[[^\]]+\])\s*=/);if(G){let B=G[1].slice(1,-1).split(",").map((R)=>{let F=R.split(":");return(F.length>1?F[1]:F[0]).trim()}).filter((R)=>/^\w+$/.test(R));Q.push(...B)}}}}return[...new Set(Q)]}function EQ(H){let Q=H;Q=Q.replace(/^\s*import\s+.*?from\s+['"][^'"]+['"]\s*;?\s*$/gm,""),Q=Q.replace(/^\s*import\s+['"][^'"]+['"]\s*;?\s*$/gm,""),Q=Q.replace(/^\s*interface\s+\w+\s*\{[\s\S]*?\n\}\s*$/gm,""),Q=Q.replace(/^\s*type\s+\w+\s*=[\s\S]*?(?=\n(?:const|let|var|function|export|interface|type|$))/gm,""),Q=Q.replace(/^(\s*(?:export\s+)?(?:const|let|var)\s+)(\w+|\{[^}]+\}|\[[^\]]+\])\s*:\s*[^=]+(\s*=)/gm,"$1$2$3");function Z(z){if(!z.includes(":"))return z;let X=[],Y="",$=0,_=0,J=null;for(let G=0;G<z.length;G++){let W=z[G];if(J){if(Y+=W,W===J)J=null;continue}if(W==='"'||W==="'"||W==="`"){J=W,Y+=W;continue}if(W==="<")$++;else if(W===">"&&$>0)$--;else if(W==="(")_++;else if(W===")")_--;if(W===","&&$===0&&_===0){X.push(Y),Y="";continue}Y+=W}if(Y)X.push(Y);return X.map((G)=>{let W=G.trim(),B=W.startsWith("..."),R=B?W.slice(3):W,F=-1,q=0;for(let N=0;N<R.length;N++)if(R[N]==="<")q++;else if(R[N]===">")q--;else if(R[N]===":"&&q===0){F=N;break}if(F===-1)return G;let M=R.substring(0,F).trim().replace(/\?$/,""),V=R.substring(F+1),b=-1,L=0;for(let N=0;N<V.length;N++)if(V[N]==="<")L++;else if(V[N]===">")L--;else if(V[N]==="="&&L===0){b=N;break}let D=B?"...":"";if(b!==-1)return`${D}${M} = ${V.substring(b+1).trim()}`;return`${D}${M}`}).join(", ")}Q=Q.replace(/\b(function\s+\w*\s*)\(([^)]*)\)/g,(z,X,Y)=>{if(!Y.includes(":"))return z;return`${X}(${Z(Y)})`});{let z=/\b(function\s+\w*\s*)\(/g,X,Y=[];while((X=z.exec(Q))!==null){let $=X.index+X[0].length-1,_=1,J=$+1,G=0,W=null;while(J<Q.length&&_>0){let F=Q[J];if(W){if(F===W)W=null;J++;continue}if(F==='"'||F==="'"||F==="`"){W=F,J++;continue}if(F==="<")G++;else if(F===">"&&G>0)G--;else if(G===0){if(F==="(")_++;else if(F===")")_--}if(_>0)J++}if(_!==0)continue;let B=Q.substring($+1,J);if(!B.includes(":"))continue;let R=Z(B);Y.push({start:$+1,end:J,replacement:R})}for(let $=Y.length-1;$>=0;$--){let{start:_,end:J,replacement:G}=Y[$];Q=Q.substring(0,_)+G+Q.substring(J)}}return Q=Q.replace(/\(([^)]*)\)\s*(?::\s*[^=]+)?\s*=>/g,(z,X)=>{if(!X.includes(":"))return z;if(X.includes("{")||X.includes("}"))return z;return`(${X.split(",").map(($)=>{let[_,...J]=$.split("="),G=_.split(":")[0].trim();if(J.length>0)return`${G} = ${J.join("=").trim()}`;return G}).join(", ")}) =>`}),Q=Q.replace(/(\))\s*:\s*([A-Z]\w*|void|string|number|boolean|any|unknown|never|null|undefined)(?:<[^>]+>)?(?:\s*\|\s*(?:[A-Z]\w*|void|string|number|boolean|any|unknown|never|null|undefined))*\s*(\{)/g,"$1$3"),Q=Q.replace(/(\b(?:function|class|interface|type|extends|implements)\s+\w+)\s*<[^<>()]*>/g,"$1"),Q=Q.replace(/(\b(?:defineProps|withDefaults|defineEmits|defineSlots|Array|Promise|Map|Set|Record|Partial|Required|Readonly|Pick|Omit|Exclude|Extract))\s*<[^<>()]*>/g,"$1"),Q=Q.replace(/(\w+)\s*<[A-Z][^<>()]*>\s*(?=\()/g,"$1"),Q=Q.replace(/\s+as\s+(?:const|[A-Za-z]\w*(?:\[\])?(?:\s*\|\s*\w+(?:\[\])?)*)/g,""),Q=Q.replace(/\s+satisfies\s+\w+(?:<[^>]*>)?/g,""),Q=Q.replace(/(\w|\)|\])\s*!(?!=)/g,"$1"),Q=Q.replace(/^\s*(?:export\s+)?(?:const\s+)?enum\s+\w+\s*\{[^}]*\}\s*$/gm,""),Q=Q.replace(/(?<=[\s=,(])<[A-Z]\w*(?:\[\])?>/g,""),Q=Q.replace(/\n\s*\n\s*\n/g,`
|
|
4
|
-
|
|
5
|
-
`),Q}async function xQ(H,Q,Z,z={}){if(!H.trim())return;let X;try{let U=new Bun.Transpiler({loader:"ts",target:"browser",define:c()}),A=H.replace(/^\s*import\s+\w+\s+from\s+['"][^'"]*\.stx['"]\s*;?\s*$/gm,"");A=A.replace(/^\s*import\s+['"][^'"]*\.stx['"]\s*;?\s*$/gm,""),X=U.transformSync(A)}catch{X=EQ(H)}let Y={exports:{}},$=Y.exports,_=y.cwd(),J={},G=[...X.matchAll(/require\s*\(\s*['"]([^'"]+)['"]\s*\)/g)||[]].map((U)=>U[1]).filter((U)=>!U.startsWith("node:")&&!U.startsWith(".")&&!["fs","path","os","child_process","crypto","http","https","url","util","stream","events","buffer","net","querystring","zlib","tls"].includes(U));for(let U of G)try{let A=k.resolve(_,"node_modules",U),O=k.join(A,"package.json"),T=JSON.parse(f("fs").readFileSync(O,"utf8")),w=T.main||"index.js";if(T.exports){let j=typeof T.exports==="string"?T.exports:T.exports["."];if(typeof j==="string")w=j;else if(j?.bun)w=j.bun;else if(j?.import)w=j.import;else if(j?.default)w=j.default}J[U]=await import(k.resolve(A,w))}catch{}let W=(U)=>{if(J[U])return J[U];return f(U)},B=Q.props||{},R=(U)=>{if(!U)return B;let A={};for(let[O,T]of Object.entries(U)){let w=B[O];if(w!==void 0)A[O]=w;else if(typeof T==="function")A[O]=T();else A[O]=T}return A};for(let[U,A]of Object.entries(B))Object.defineProperty(R,U,{value:A,enumerable:!0,configurable:!0,writable:!0});let F=(U)=>{if(!U)return B;let A={...B};for(let[O,T]of Object.entries(U)){let w=T&&typeof T==="object"&&!Array.isArray(T)?T:{type:T};if(A[O]===void 0&&w.default!==void 0)A[O]=typeof w.default==="function"?w.default():w.default}return A},q=()=>Q.slots||{},E=(U,A)=>{let O={...U};for(let[T,w]of Object.entries(A))if(O[T]===void 0)if(typeof w==="function")O[T]=w();else O[T]=w;return O},M=(U)=>{let A=()=>U;return A.set=(O)=>{},A.update=(O)=>{},A},V=(U)=>{let A,O=!1;return()=>{if(!O)try{A=U(),O=!0}catch{A=void 0}return A}},b=(U)=>{},L=(U)=>U(),D=(U)=>{},N=(U)=>{},S=(U)=>{},e=()=>{let U=Q.__stxServeContext,A=Q.__stxServeSearch??U?.search??"",O=U?.path??"";return{params:Q.params??{},query:Object.fromEntries(new URLSearchParams(A)),path:O,name:"",fullPath:O+A,hash:"",matched:[]}},QQ=()=>({push:(U)=>{},replace:(U)=>{},back:()=>{},forward:()=>{},go:(U)=>{}}),XQ=(U)=>{a(U);let A=Q.__stx_runtime_head||{},O=U||{};Q.__stx_runtime_head={...A,...O.title&&{title:O.title},meta:[...A.meta||[],...O.meta||[]],link:[...A.link||[],...O.link||[]],script:[...A.script||[],...O.script||[]],htmlAttrs:{...A.htmlAttrs||{},...O.htmlAttrs||{}},bodyAttrs:{...A.bodyAttrs||{},...O.bodyAttrs||{}}}},YQ=(U)=>{i(U);let A=s();Q.__stx_runtime_head={...Q.__stx_runtime_head||{},...A.title&&{title:A.title},meta:A.meta?[...A.meta]:[]}},ZQ=(U)=>({value:U}),zQ=(U)=>U,GQ=(U)=>({value:typeof U==="function"?U():U}),$Q=(U,A)=>{},HQ=(U)=>{},UQ=(U)=>{},_Q=(U)=>U?U():Promise.resolve(),JQ=(U)=>(A,...O)=>{},WQ=(U)=>{},AQ=(U,A)=>{},BQ=(U,A)=>A,FQ=()=>({value:"light"}),OQ=()=>({value:!1}),C={siteId:void 0,API_ENDPOINT:"",ANALYTICS_SITE_ID:void 0,location:{href:"",pathname:"",search:"",hash:"",origin:"",host:"",hostname:"",protocol:"https:",assign:()=>{},replace:()=>{},reload:()=>{}},localStorage:{getItem:()=>null,setItem:()=>{},removeItem:()=>{},clear:()=>{}},sessionStorage:{getItem:()=>null,setItem:()=>{},removeItem:()=>{},clear:()=>{}},fetch:globalThis.fetch,addEventListener:()=>{},removeEventListener:()=>{},setTimeout:()=>0,clearTimeout:()=>{},setInterval:()=>0,clearInterval:()=>{},requestAnimationFrame:()=>0,cancelAnimationFrame:()=>{},alert:()=>{},confirm:()=>!1,prompt:()=>null,getComputedStyle:()=>({}),matchMedia:()=>({matches:!1,addListener:()=>{},removeListener:()=>{}}),getDateRangeParams:()=>"",stx:{}},RQ=new Proxy(C,{get(U,A){if(A in U)return U[A];return},set(U,A,O){return U[A]=O,!0}}),KQ={getElementById:()=>null,querySelector:()=>null,querySelectorAll:()=>[],createElement:()=>({}),createTextNode:()=>({}),body:{},head:{},documentElement:{},addEventListener:()=>{},removeEventListener:()=>{}},qQ=console;try{let U=MQ(X,Z),A=new Set(Object.keys(B)),O=Object.keys(Q).filter((K)=>!A.has(K)&&K!=="props"),T=O.map((K)=>Q[K]),w=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","finally","for","function","if","import","in","instanceof","let","new","return","super","switch","this","throw","try","typeof","var","void","while","with","yield","enum","await","async","module","exports","require","params","window","document","console","state","derived","effect"]),j=[],x=[];for(let[K,P]of Object.entries(B)){if(!/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(K))continue;if(w.has(K))continue;if(new RegExp(`(?:^|[\\s;{])(?:const|let|var|function)\\s+${K}\\b`).test(U))continue;j.push(K),x.push(P)}let TQ=NQ(U).map((K)=>`module.exports.${K} = typeof ${K} !== 'undefined' ? ${K} : module.exports.${K};`).join(`
|
|
6
|
-
`),wQ=Q.params??{},h=[],m=[];for(let K=0;K<O.length;K++){if(O[K]==="params")continue;h.push(O[K]),m.push(T[K])}let d=await Function("module","exports","require","props","$props","defineProps","withDefaults","state","derived","effect","batch","onMount","onDestroy","definePageMeta","useRoute","useRouter","useHead","useSeoMeta","ref","reactive","computed","watch","onMounted","onUnmounted","nextTick","defineEmits","defineExpose","defineSlots","provide","inject","useColorMode","useDark","window","document","console","confirm","alert","fetch","params",...j,...h,`return (async () => {
|
|
7
|
-
${U}
|
|
8
|
-
${TQ}
|
|
9
|
-
return module.exports
|
|
10
|
-
})()`)(Y,$,W,B,R,F,E,M,V,b,L,D,N,S,e,QQ,XQ,YQ,ZQ,zQ,GQ,$Q,HQ,UQ,_Q,JQ,WQ,q,AQ,BQ,FQ,OQ,RQ,KQ,qQ,C.confirm,C.alert,C.fetch,wQ,...x,...m);if(z.preserveExisting){for(let[K,P]of Object.entries(d))if(!(K in Q)||Q[K]===void 0)Q[K]=P}else Object.assign(Q,d);for(let[K,P]of Object.entries(B))if(!(K in Q))Q[K]=P}catch(U){if(y.env.STX_DEBUG){let A=U instanceof Error?U.message:String(U);console.warn(`[stx] server <script> did not execute in ${Z??"<unknown>"} \u2014 falling back to static extraction. Cause: ${A}`)}try{await DQ(X,Q,Z)}catch(A){if(y.env.STX_DEBUG){let O=A instanceof Error?A.message:String(A);console.warn(`[stx] fallback extraction also failed in ${Z??"<unknown>"}: ${O}`)}}}}function MQ(H,Q){let Z=Q?k.dirname(Q):y.cwd(),z=H.split(`
|
|
11
|
-
`),X=[],Y=0;while(Y<z.length){let $=z[Y].trim();if($.startsWith("interface ")||$.startsWith("export interface ")||$.startsWith("type ")||$.startsWith("export type ")){if($.includes("{")&&!$.includes("}")){let _=0;for(;Y<z.length;Y++){for(let J of z[Y])if(J==="{")_++;else if(J==="}")_--;if(_<=0)break}}Y++;continue}if($.startsWith("definePageMeta(")){let _=0,J=!1;for(let G=Y;G<z.length&&!J;G++){let W=null,B=!1,R=z[G];for(let F=0;F<R.length;F++){let q=R[F];if(B){B=!1;continue}if(q==="\\"){B=!0;continue}if(W){if(q===W)W=null;continue}if(q==='"'||q==="'"||q==="`"){W=q;continue}if(q==="(")_++;else if(q===")"){if(_--,_===0){Y=G+1,J=!0;break}}}}if(!J)Y=z.length;continue}if($.startsWith("import ")){let _=$.match(/^import\s+(\w+)\s+from\s+['"](.+)['"]/),J=$.match(/^import\s+\{([^}]+)\}\s+from\s+['"](.+)['"]/),G=$.match(/^import\s+['"](.+)['"]/),W=(B)=>{if(B.startsWith("."))return k.resolve(Z,B);return B};if(_){let[,B,R]=_,F=W(R);X.push(`const ${B} = await import('${F}')`),X.push(`module.exports.${B} = ${B};`)}else if(J){let[,B,R]=J,F=B.trim(),q=W(R);X.push(`const { ${F} } = await import('${q}')`);for(let E of F.split(",")){let M=E.trim().split(/\s+as\s+/).pop()?.trim();if(M)X.push(`module.exports.${M} = ${M};`)}}else if(G){let B=W(G[1]);X.push(`await import('${B}')`)}else X.push($);Y++;continue}if(($.startsWith("const ")||$.startsWith("let ")||$.startsWith("var ")||$.startsWith("export const ")||$.startsWith("export let ")||$.startsWith("export var "))&&!$.includes("="))X.push(z[Y]),Y++;else if($.startsWith("export const ")||$.startsWith("export let ")||$.startsWith("export var ")){let _=u(z,Y),{type:J,name:G,value:W}=_;X.push(`${J} ${G} = ${W};`),X.push(`module.exports.${G} = ${G};`),Y=_.nextIndex}else if($.startsWith("export function ")||$.startsWith("export async function ")){let _=g(z,Y);X.push(_.functionCode),X.push(`module.exports.${_.name} = ${_.name};`),Y=_.nextIndex}else if($.startsWith("const ")||$.startsWith("let ")||$.startsWith("var ")){let _=u(z,Y),{type:J,name:G,value:W}=_;X.push(`${J} ${G} = ${W};`),X.push(`module.exports.${G} = ${G};`),Y=_.nextIndex}else if($.startsWith("function ")||$.startsWith("async function ")){let _=g(z,Y);X.push(_.functionCode),X.push(`module.exports.${_.name} = ${_.name};`),Y=_.nextIndex}else if($.startsWith("export default function ")||$.startsWith("export default async function ")){let _=z[Y].replace(/^(\s*)export\s+default\s+/,"$1"),J=[...z];J[Y]=_;let G=g(J,Y);if(X.push(G.functionCode),G.name)X.push(`module.exports.default = ${G.name};`);Y=G.nextIndex}else if($.startsWith("export default ")){let _=$.replace(/^export\s+default\s+/,"").replace(/;$/,"");X.push(`module.exports.default = ${_};`),Y++}else if($.startsWith("class ")||$.startsWith("export class ")){let _=$.match(/(?:export\s+)?class\s+(\w+)/);if(_){let J=_[1],G=z[Y].replace(/^export\s+/,""),W=0,B=Y;for(;B<z.length;B++){let R=z[B];for(let F of R)if(F==="{")W++;else if(F==="}")W--;if(B>Y)G+=`
|
|
12
|
-
`+R;if(W<=0&&B>=Y)break}X.push(G),X.push(`module.exports.${J} = ${J};`),Y=B+1}else X.push($),Y++}else if($.includes("module.exports"))X.push($),Y++;else if($.trim()&&!$.startsWith("//"))X.push($),Y++;else Y++}return VQ(X.join(`
|
|
13
|
-
`),Z)}function VQ(H,Q){let Z=H.length,z="",X=0,Y=null,$=!1,_=!1,J=0;while(X<Z){let G=H[X],W=H[X+1];if($){if(z+=G,G===`
|
|
14
|
-
`)$=!1;X++;continue}if(_){if(z+=G,G==="*"&&W==="/"){z+=W,X+=2,_=!1;continue}X++;continue}if(!Y&&G==="/"&&W==="/"){$=!0,z+=G,X++;continue}if(!Y&&G==="/"&&W==="*"){_=!0,z+=G,X++;continue}if(Y){if(z+=G,G==="\\"){z+=W,X+=2;continue}if(G===Y&&Y!=="`"){Y=null,X++;continue}if(Y==="`"){if(G==="$"&&W==="{"){J++,z+=W,X+=2;continue}if(G==="`"){Y=null,X++;continue}}X++;continue}if(J>0){if(G==="{")J++;else if(G==="}")J--}if(G==='"'||G==="'"||G==="`"){Y=G,z+=G,X++;continue}if(G==="a"&&H.startsWith("await",X)){let B=bQ(H,X);if(B){let{quote:R,path:F,end:q}=B;if(F.startsWith(".")){let E=k.resolve(Q,F);z+=`await import(${R}${E}${R})`,X=q;continue}}}z+=G,X++}return z}function bQ(H,Q){let Z=Q+5;if(Z>=H.length)return null;if(!/\s/.test(H[Z]))return null;while(Z<H.length&&/\s/.test(H[Z]))Z++;if(!H.startsWith("import",Z))return null;Z+=6;while(Z<H.length&&/\s/.test(H[Z]))Z++;if(H[Z]!=="(")return null;Z++;while(Z<H.length&&/\s/.test(H[Z]))Z++;let z=H[Z];if(z!=="'"&&z!=='"')return null;Z++;let X=Z;while(Z<H.length&&H[Z]!==z)if(H[Z]==="\\")Z+=2;else Z++;if(Z>=H.length)return null;let Y=H.slice(X,Z);Z++;while(Z<H.length&&/\s/.test(H[Z]))Z++;if(H[Z]!==")")return null;return{quote:z,path:Y,end:Z+1}}function r(H,Q){let Z=H[Q];if(Z!=="{"&&Z!=="[")return null;let X=I(H,Z,Z==="{"?"}":"]",Q);if(X===-1)return null;return{pattern:H.slice(Q,X+1),endPos:X+1}}function n(H){let Q=[],Z=H.slice(1,-1).trim();if(!Z)return Q;let z=0,X=0,Y="";while(z<Z.length){let $=Z[z];if($==="{"||$==="["){if(X++,X===1){let _=r(Z,z);if(_){let J=n(_.pattern);Q.push(...J),z=_.endPos,Y="";continue}}}else if($==="}"||$==="]")X--;if(X>0){z++;continue}if($===","){if(Y.trim())Q.push(Y.trim());Y="",z++;continue}if($===":"){Y="",z++;continue}if($==="="){if(Y.trim())Q.push(Y.trim());Y="",z++;while(z<Z.length&&Z[z]!==","&&X===0){if(Z[z]==="{"||Z[z]==="[")X++;else if(Z[z]==="}"||Z[z]==="]")X--;z++}continue}if(/[\w$]/.test($))Y+=$;z++}if(Y.trim())Q.push(Y.trim());return Q}function u(H,Q){let Z=H[Q].trim(),z=Z.match(/^(?:export\s+)?(const|let|var)\s+(\w+)\s*=\s*(.*)$/);if(!z){let G=Z.match(/^(?:export\s+)?(const|let|var)\s+/);if(G){let W=Z.slice(G[0].length),B=Q;if((W.startsWith("{")||W.startsWith("["))&&!W.includes(W.startsWith("{")?"}":"]")){let F=W.startsWith("{")?"}":"]",q=W;for(let E=Q+1;E<H.length;E++)if(q+=" "+H[E].trim(),B=E,H[E].includes(F))break;W=q}let R=r(W,0);if(R){let F=G[1],q=R.pattern,E=W.slice(R.endPos).trim();if(E.startsWith("=")){let M=E.slice(1).trim(),V=M,b=Math.max(B,Q);if(p(M)){let S=l(H,b,M);V=S.value,b=S.nextIndex}else b=b+1;V=V.trim().replace(/;$/,"");let L=n(q),D=`__stx_src_${Q}`,N=L.map((S)=>`module.exports.${S} = ${S};`).join(`
|
|
15
|
-
`);return{type:F,name:D,value:`${V}; ${F} ${q} = ${D};
|
|
16
|
-
${N}`,nextIndex:b}}}}throw Error(`Failed to parse variable declaration: ${Z}`)}let[,X,Y,$]=z,_=$,J=Q;if(p($)){let G=l(H,Q,$);_=G.value,J=G.nextIndex}else J=Q+1;while(J<H.length){let G=H[J].trim();if(G.startsWith(".")||G.startsWith("?."))_+=`
|
|
17
|
-
${H[J]}`,J++;else break}return _=_.trim().replace(/;$/,""),{type:X,name:Y,value:_,nextIndex:J}}function g(H,Q){let Z=H[Q].trim(),z=Z.match(/^(?:export\s+)?(?:async\s+)?function\s+(\w+)/);if(!z)throw Error(`Failed to parse function declaration: ${Z}`);let[,X]=z,Y=Z.replace(/^export\s+/,""),$=Q;if(jQ(Z)){let _=LQ(H,Q,Y);Y=_.functionCode,$=_.nextIndex}else $=Q+1;return{name:X,functionCode:Y,nextIndex:$}}function p(H){let Q=H.trim();if(Q.startsWith("{"))return I(Q,"{","}",0)===-1;if(Q.startsWith("["))return I(Q,"[","]",0)===-1;return!t(Q)}function t(H){let Q={paren:0,bracket:0,brace:0},Z=null,z=0;for(let X=0;X<H.length;X++){let Y=H[X];if((X>0?H[X-1]:"")==="\\"&&Z)continue;if((Y==='"'||Y==="'")&&!Z){Z=Y;continue}if(Y===Z&&Z!=="`"){Z=null;continue}if(Y==="`"&&!Z){Z="`";continue}if(Y==="`"&&Z==="`"&&z===0){Z=null;continue}if(Z==="`"&&Y==="$"&&H[X+1]==="{"){z++,X++;continue}if(z>0&&Y==="{"){z++;continue}if(z>0&&Y==="}"){z--;continue}if(Z)continue;if(Y==="(")Q.paren++;else if(Y===")")Q.paren--;else if(Y==="[")Q.bracket++;else if(Y==="]")Q.bracket--;else if(Y==="{")Q.brace++;else if(Y==="}")Q.brace--}return Q.paren===0&&Q.bracket===0&&Q.brace===0&&Z===null}function jQ(H){let Q=H.indexOf("{");if(Q===-1)return!0;return I(H,"{","}",Q)===-1}function l(H,Q,Z){let z=Z,X=Q+1;while(X<H.length&&!t(z)){let Y=H[X];z+=`
|
|
18
|
-
${Y}`,X++}while(X<H.length){let Y=H[X].trim();if(Y.startsWith(".")||Y.startsWith("?."))z+=`
|
|
19
|
-
${H[X]}`,X++;else break}return{value:z,nextIndex:X}}function LQ(H,Q,Z){let z=Z,X=Q+1;while(X<H.length){let Y=z.indexOf("{");if(Y!==-1){if(I(z,"{","}",Y)!==-1)break}let $=H[X];z+=`
|
|
20
|
-
${$}`,X++}return{functionCode:z,nextIndex:X}}function o(H,Q){let Z=v(H,Q)??v(`(${H})`,Q);if(Z!==void 0)return Z;if(!/\bprocess\b/.test(H))return;let z={...Q,process:Object.freeze({env:{...y.env}})};try{return Function(...Object.keys(z),`'use strict'; return (${H});`)(...Object.values(z))}catch{try{return Function(...Object.keys(z),`'use strict'; return ${H};`)(...Object.values(z))}catch{return}}}async function DQ(H,Q,Z){let z=H.matchAll(/export\s+(const|let|var)\s+(\w+)\s*=\s*([\s\S]*?)(?=\s*(?:export\s+|$))/g);for(let Y of z){let[,,$,_]=Y;try{let J=_.trim().replace(/;$/,""),G=o(J,Q);if(G!==void 0)Q[$]=G}catch(J){console.warn(`Failed to parse export ${$} in fallback:`,J)}}let X=H.matchAll(/(?:^|\n)\s*(const|let|var)\s+(\w+)\s*=\s*([\s\S]*?)(?=\s*(?:(?:const|let|var|function|export)\s+|$))/g);for(let Y of X){let[,,$,_]=Y;if(!($ in Q))try{let J=_.trim().replace(/;$/,""),G=o(J,Q);if(G!==void 0)Q[$]=G}catch{}}}function hQ(H){let Q=H.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i),Z=Q?Q[1]:"",z=Q?H.replace(/<script\b[^>]*>[\s\S]*?<\/script>/i,""):H;return{scriptContent:Z,templateWithoutScript:z}}function mQ(H){let Q=H.trim();if(!Q)return!1;return/(?:const|let|var|function)\s+\w+/.test(Q)}
|
|
21
|
-
export{EQ as ct,xQ as dt,MQ as et,hQ as ft,mQ as gt};
|
package/dist/chunk-g4ps1dj8.js
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Qa as x}from"./chunk-7cgmq685.js";import{db as w}from"./chunk-vcr5pzpx.js";function K(j){let b={};if(j)for(let q of j.props)b[q.name]=q.default;return{collapsed:!1,values:b,filter:""}}function N(j,b){if(!j)return`
|
|
3
|
-
<div class="stx-controls-panel">
|
|
4
|
-
<div class="stx-controls-empty">
|
|
5
|
-
Select a story to edit props
|
|
6
|
-
</div>
|
|
7
|
-
</div>
|
|
8
|
-
`;let z=(b.filter?j.props.filter((k)=>k.name.toLowerCase().includes(b.filter.toLowerCase())):j.props).map((k)=>{let A=x(k),B=b.values[k.name],D=`window.__stxStory.setProp('${k.name}', this.value)`;return w(A,B,D)}).join("");return`
|
|
9
|
-
<div class="stx-controls-panel ${b.collapsed?"collapsed":""}">
|
|
10
|
-
<div class="stx-controls-header" onclick="window.__stxStory.toggleControlsPanel()">
|
|
11
|
-
<span class="stx-controls-title">Controls</span>
|
|
12
|
-
<span class="stx-controls-toggle">${b.collapsed?"\u25C0":"\u25B6"}</span>
|
|
13
|
-
</div>
|
|
14
|
-
<div class="stx-controls-body">
|
|
15
|
-
<div class="stx-controls-search">
|
|
16
|
-
<input
|
|
17
|
-
type="text"
|
|
18
|
-
placeholder="Filter props..."
|
|
19
|
-
value="${F(b.filter)}"
|
|
20
|
-
oninput="window.__stxStory.filterProps(this.value)"
|
|
21
|
-
/>
|
|
22
|
-
</div>
|
|
23
|
-
<div class="stx-controls-list">
|
|
24
|
-
${z}
|
|
25
|
-
</div>
|
|
26
|
-
<div class="stx-controls-actions">
|
|
27
|
-
<button onclick="window.__stxStory.resetProps()">Reset</button>
|
|
28
|
-
<button onclick="window.__stxStory.copyProps()">Copy JSON</button>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
`}function O(){return`
|
|
33
|
-
<div class="stx-controls-panel">
|
|
34
|
-
<div class="stx-controls-header">
|
|
35
|
-
<span class="stx-controls-title">Controls</span>
|
|
36
|
-
</div>
|
|
37
|
-
<div class="stx-controls-body">
|
|
38
|
-
<div class="stx-controls-disabled">
|
|
39
|
-
Auto props are disabled for this story.
|
|
40
|
-
<br><br>
|
|
41
|
-
Use <code><template #controls></code> to define custom controls.
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
`}function P(){return`
|
|
46
|
-
.stx-controls-panel {
|
|
47
|
-
width: 280px;
|
|
48
|
-
border-left: 1px solid var(--border);
|
|
49
|
-
background: var(--bg);
|
|
50
|
-
display: flex;
|
|
51
|
-
flex-direction: column;
|
|
52
|
-
transition: width 0.2s;
|
|
53
|
-
}
|
|
54
|
-
.stx-controls-panel.collapsed {
|
|
55
|
-
width: 40px;
|
|
56
|
-
}
|
|
57
|
-
.stx-controls-panel.collapsed .stx-controls-body {
|
|
58
|
-
display: none;
|
|
59
|
-
}
|
|
60
|
-
.stx-controls-header {
|
|
61
|
-
display: flex;
|
|
62
|
-
justify-content: space-between;
|
|
63
|
-
align-items: center;
|
|
64
|
-
padding: 12px;
|
|
65
|
-
border-bottom: 1px solid var(--border);
|
|
66
|
-
cursor: pointer;
|
|
67
|
-
user-select: none;
|
|
68
|
-
}
|
|
69
|
-
.stx-controls-header:hover {
|
|
70
|
-
background: var(--bg-secondary);
|
|
71
|
-
}
|
|
72
|
-
.stx-controls-title {
|
|
73
|
-
font-weight: 600;
|
|
74
|
-
font-size: 13px;
|
|
75
|
-
}
|
|
76
|
-
.stx-controls-toggle {
|
|
77
|
-
font-size: 10px;
|
|
78
|
-
color: var(--text-secondary);
|
|
79
|
-
}
|
|
80
|
-
.stx-controls-body {
|
|
81
|
-
flex: 1;
|
|
82
|
-
overflow-y: auto;
|
|
83
|
-
padding: 12px;
|
|
84
|
-
}
|
|
85
|
-
.stx-controls-search {
|
|
86
|
-
margin-bottom: 12px;
|
|
87
|
-
}
|
|
88
|
-
.stx-controls-search input {
|
|
89
|
-
width: 100%;
|
|
90
|
-
padding: 8px;
|
|
91
|
-
border: 1px solid var(--border);
|
|
92
|
-
border-radius: 4px;
|
|
93
|
-
background: var(--bg);
|
|
94
|
-
color: var(--text);
|
|
95
|
-
font-size: 13px;
|
|
96
|
-
}
|
|
97
|
-
.stx-controls-search input:focus {
|
|
98
|
-
outline: none;
|
|
99
|
-
border-color: var(--primary);
|
|
100
|
-
}
|
|
101
|
-
.stx-controls-list {
|
|
102
|
-
display: flex;
|
|
103
|
-
flex-direction: column;
|
|
104
|
-
gap: 12px;
|
|
105
|
-
}
|
|
106
|
-
.stx-controls-actions {
|
|
107
|
-
display: flex;
|
|
108
|
-
gap: 8px;
|
|
109
|
-
margin-top: 16px;
|
|
110
|
-
padding-top: 16px;
|
|
111
|
-
border-top: 1px solid var(--border);
|
|
112
|
-
}
|
|
113
|
-
.stx-controls-actions button {
|
|
114
|
-
flex: 1;
|
|
115
|
-
padding: 8px;
|
|
116
|
-
border: 1px solid var(--border);
|
|
117
|
-
border-radius: 4px;
|
|
118
|
-
background: var(--bg);
|
|
119
|
-
color: var(--text);
|
|
120
|
-
font-size: 12px;
|
|
121
|
-
cursor: pointer;
|
|
122
|
-
}
|
|
123
|
-
.stx-controls-actions button:hover {
|
|
124
|
-
background: var(--bg-secondary);
|
|
125
|
-
}
|
|
126
|
-
.stx-controls-empty,
|
|
127
|
-
.stx-controls-disabled {
|
|
128
|
-
padding: 24px;
|
|
129
|
-
text-align: center;
|
|
130
|
-
color: var(--text-secondary);
|
|
131
|
-
font-size: 13px;
|
|
132
|
-
}
|
|
133
|
-
.stx-controls-disabled code {
|
|
134
|
-
background: var(--bg-secondary);
|
|
135
|
-
padding: 2px 6px;
|
|
136
|
-
border-radius: 4px;
|
|
137
|
-
font-size: 12px;
|
|
138
|
-
}
|
|
139
|
-
`}function F(j){return j.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}
|
|
140
|
-
export{K as j,N as k,O as l,P as m};
|
package/dist/chunk-gkzq8zw4.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
function E(b){return b.replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function H(b){let u={};for(let q of Object.keys(b))if(!q.startsWith("__"))u[q]=b[q];return u}function K(b){let{template:u,context:q={},title:v="stx App"}=b,B=H(q),C=E(JSON.stringify(B));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>${v}</title>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<div id="stx-app"></div>
|
|
11
|
-
<template id="stx-template">${u}</template>
|
|
12
|
-
<script>window.__STX_DATA__ = ${C};</script>
|
|
13
|
-
<script type="module">
|
|
14
|
-
// stx client-side bootstrap
|
|
15
|
-
const template = document.getElementById('stx-template');
|
|
16
|
-
const app = document.getElementById('stx-app');
|
|
17
|
-
if (template && app) {
|
|
18
|
-
app.innerHTML = template.innerHTML;
|
|
19
|
-
}
|
|
20
|
-
</script>
|
|
21
|
-
</body>
|
|
22
|
-
</html>`}
|
|
23
|
-
export{K as pg};
|
package/dist/chunk-gz5fmp3q.js
DELETED