@stacksjs/stx 0.2.94 → 0.2.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/a11y.js +598 -2
- package/dist/analytics.js +159 -2
- package/dist/analyzer.js +240 -2
- package/dist/animation.js +688 -2
- package/dist/app-shell.js +220 -2
- package/dist/app.js +79 -2
- package/dist/assets.js +155 -2
- package/dist/ast.js +630 -2
- package/dist/async-components.js +428 -2
- package/dist/auth.js +12 -2
- package/dist/broadcasting.js +102 -2
- package/dist/browser-composables.js +565 -2
- package/dist/build-assets.js +29 -2
- package/dist/build-mode-detector.js +50 -2
- package/dist/build-optimizer.js +433 -2
- package/dist/build-views.js +180 -2
- package/dist/build.js +33 -2
- package/dist/builtins/drawer.js +37 -2
- package/dist/builtins/escape.js +3 -2
- package/dist/builtins/icon.js +83 -2
- package/dist/builtins/index.js +34 -2
- package/dist/builtins/modal.js +38 -2
- package/dist/builtins/safe-image.js +51 -2
- package/dist/builtins/stx-image.js +200 -2
- package/dist/builtins/stx-link.js +41 -2
- package/dist/builtins/stx-loading-indicator.js +35 -2
- package/dist/builtins/suspense.js +24 -2
- package/dist/builtins/toast.js +42 -2
- package/dist/builtins/tooltip.js +106 -2
- package/dist/builtins/transition-group.js +22 -2
- package/dist/bundle-analyzer/collector.js +233 -2
- package/dist/bundle-analyzer/index.js +82 -2
- package/dist/bundle-analyzer/report.js +318 -2
- package/dist/bundle-analyzer/treemap.js +594 -2
- package/dist/caching.js +131 -2
- package/dist/cli.js +11317 -10982
- package/dist/client/directive.js +14 -2
- package/dist/client/index.js +2 -2
- package/dist/client-helpers.js +312 -2
- package/dist/client-script-bundler.js +216 -6
- package/dist/client-script.js +754 -2
- package/dist/client.js +73 -4
- package/dist/component-hmr.js +585 -2
- package/dist/component-library.d.ts +6 -0
- package/dist/component-library.js +683 -0
- package/dist/component-processing.js +613 -2
- package/dist/component-registry.js +90 -2
- package/dist/component-renderer.js +660 -2
- package/dist/components.js +213 -2
- package/dist/composables/index.js +220 -2
- package/dist/composables/use-battery.js +101 -2
- package/dist/composables/use-broadcast-channel.js +80 -2
- package/dist/composables/use-channel.js +124 -2
- package/dist/composables/use-clipboard.js +79 -2
- package/dist/composables/use-color-mode.js +131 -2
- package/dist/composables/use-cookie.js +86 -2
- package/dist/composables/use-device-orientation.js +181 -2
- package/dist/composables/use-event-listener.js +27 -2
- package/dist/composables/use-event-source.js +166 -2
- package/dist/composables/use-eye-dropper.js +142 -2
- package/dist/composables/use-fetch.js +223 -2
- package/dist/composables/use-fullscreen.js +110 -2
- package/dist/composables/use-geolocation.js +101 -2
- package/dist/composables/use-idle.js +182 -2
- package/dist/composables/use-intersection-observer.js +168 -2
- package/dist/composables/use-keyboard.js +224 -2
- package/dist/composables/use-media-query.js +62 -2
- package/dist/composables/use-meta.js +48 -2
- package/dist/composables/use-mouse.js +286 -2
- package/dist/composables/use-mutation-observer.js +129 -2
- package/dist/composables/use-network.js +85 -2
- package/dist/composables/use-notification.js +94 -2
- package/dist/composables/use-permissions.js +132 -2
- package/dist/composables/use-query.js +0 -1
- package/dist/composables/use-resize-observer.js +157 -2
- package/dist/composables/use-router.js +51 -2
- package/dist/composables/use-share.js +104 -2
- package/dist/composables/use-speech.js +294 -2
- package/dist/composables/use-storage.js +130 -2
- package/dist/composables/use-text-selection.js +205 -4
- package/dist/composables/use-timer.js +183 -2
- package/dist/composables/use-utilities.js +176 -2
- package/dist/composables/use-wake-lock.js +122 -2
- package/dist/composables/use-websocket.js +165 -2
- package/dist/composables/use-window.js +163 -2
- package/dist/composables.js +552 -2
- package/dist/composition-api.js +190 -2
- package/dist/computed.js +376 -8
- package/dist/conditionals.js +599 -2
- package/dist/config.js +751 -2
- package/dist/craft-bridge.js +432 -2
- package/dist/craft-compiler.js +810 -2
- package/dist/craft-components.js +945 -2
- package/dist/craft-entry.js +5 -2
- package/dist/craft-ssr.js +559 -2
- package/dist/csp.js +220 -2
- package/dist/csrf.js +38 -2
- package/dist/custom-directives.js +136 -2
- package/dist/defer.js +156 -2
- package/dist/deploy/config-generators.js +214 -2
- package/dist/deploy/index.js +203 -2
- package/dist/deploy/netlify.js +167 -2
- package/dist/dev-server/crosswind.js +379 -2
- package/dist/dev-server/index.js +7 -2
- package/dist/dev-server/keyboard-shortcuts.js +81 -2
- package/dist/dev-server/native-window.js +91 -2
- package/dist/dev-server/port-utils.js +40 -2
- package/dist/dev-server/serve-app.js +682 -7
- package/dist/dev-server/serve-file.js +439 -7
- package/dist/dev-server/serve-markdown.js +281 -2
- package/dist/dev-server/serve-multi.js +424 -17
- package/dist/dev-server/terminal-colors.js +45 -2
- package/dist/dev-server/theme-selector.js +111 -2
- package/dist/dev-server/types.js +43 -2
- package/dist/dev-server.js +4 -2
- package/dist/devtools.js +462 -18
- package/dist/directive-api.js +355 -2
- package/dist/docs.js +567 -2
- package/dist/doctor.js +123 -2
- package/dist/document-shell.js +105 -2
- package/dist/dynamic-components.js +78 -2
- package/dist/edge-runtime.js +539 -2
- package/dist/env.js +9 -2
- package/dist/error-boundaries.js +62 -12
- package/dist/error-handling.js +1 -2
- package/dist/errors/codes.js +97 -2
- package/dist/errors/formatter.js +196 -2
- package/dist/errors/index.js +44 -2
- package/dist/errors/logger.js +250 -2
- package/dist/errors/sanitizer.js +181 -2
- package/dist/errors/types.js +86 -2
- package/dist/events.js +382 -2
- package/dist/expressions.js +650 -2
- package/dist/formatter.js +265 -2
- package/dist/forms-validation.js +510 -4
- package/dist/forms.js +709 -2
- package/dist/head.js +224 -2
- package/dist/heatmap.js +566 -2
- package/dist/hot-reload.js +367 -2
- package/dist/html-masking.js +73 -2
- package/dist/hydration-runtime.js +195 -2
- package/dist/hydration.js +654 -2
- package/dist/i18n.js +633 -2
- package/dist/image-optimization/auto-sibling.js +88 -2
- package/dist/image-optimization/build-plugin.js +241 -2
- package/dist/image-optimization/component.js +244 -2
- package/dist/image-optimization/directive.js +203 -2
- package/dist/image-optimization/index.js +54 -2
- package/dist/image-optimization/processor.js +262 -2
- package/dist/image-optimization/serve.js +102 -2
- package/dist/includes.js +733 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +134 -2
- package/dist/init.js +505 -2
- package/dist/inline-assets.js +82 -2
- package/dist/interactive.js +383 -2
- package/dist/internal-markdown.js +141 -2
- package/dist/island-chunking.js +52 -2
- package/dist/js-ts.js +57 -2
- package/dist/jsx-runtime.js +289 -2
- package/dist/keep-alive.js +421 -2
- package/dist/lazy-loader.js +245 -2
- package/dist/loading-indicator.js +322 -2
- package/dist/loops.js +643 -2
- package/dist/manifest.js +31 -2
- package/dist/markdown.js +68 -2
- package/dist/media/client/blur-up.js +217 -2
- package/dist/media/client/index.js +53 -2
- package/dist/media/client/lazy-load.js +283 -2
- package/dist/media/client/upload-handler.js +354 -2
- package/dist/media/image/component.js +574 -2
- package/dist/media/image/directive.js +160 -2
- package/dist/media/image/editing.js +193 -2
- package/dist/media/image/index.js +80 -2
- package/dist/media/image/placeholder.js +188 -2
- package/dist/media/image/processor/cache.js +51 -2
- package/dist/media/image/processor/index.js +3 -2
- package/dist/media/image/processor/optimizer.js +202 -2
- package/dist/media/image/processor/responsive.js +162 -2
- package/dist/media/image/srcset.js +194 -2
- package/dist/media/index.js +198 -2
- package/dist/media/manager/embed.js +253 -2
- package/dist/media/protected/component.js +235 -2
- package/dist/media/protected/index.js +20 -2
- package/dist/media/protected/signature.js +205 -2
- package/dist/media/shared/cache.js +132 -2
- package/dist/media/shared/hash.js +35 -2
- package/dist/media/shared/index.js +2 -2
- package/dist/media/types.js +0 -1
- package/dist/media/upload/component.js +320 -2
- package/dist/media/upload/index.js +1 -2
- package/dist/media/video/directive.js +142 -2
- package/dist/media/video/index.js +583 -2
- package/dist/media/video/processor/cache.js +52 -2
- package/dist/media/video/processor/index.js +4 -2
- package/dist/media/video/processor/streaming.js +197 -2
- package/dist/media/video/processor/thumbnail.js +134 -2
- package/dist/media/video/processor/transcoder.js +283 -2
- package/dist/method-spoofing.js +17 -2
- package/dist/middleware.js +40 -2
- package/dist/misc-directives.js +222 -2
- package/dist/native-build.js +511 -2
- package/dist/parser/directive-parser.js +239 -2
- package/dist/parser/expression-parser.js +358 -2
- package/dist/parser/index.js +23 -2
- package/dist/parser/tokenizer.js +534 -2
- package/dist/partial-hydration.js +427 -2
- package/dist/performance-utils.js +430 -2
- package/dist/placeholder.js +35 -2
- package/dist/plugin-system.js +214 -2
- package/dist/plugin.js +173 -2
- package/dist/precompiler.js +660 -81
- package/dist/process.js +711 -2
- package/dist/production-build.js +596 -2
- package/dist/production-builder.js +132 -2
- package/dist/production-server.js +188 -2
- package/dist/props.js +224 -2
- package/dist/public-env.js +19 -2
- package/dist/pwa/audit.js +255 -2
- package/dist/pwa/directives.js +332 -2
- package/dist/pwa/icons.js +109 -2
- package/dist/pwa/index.js +47 -2
- package/dist/pwa/inject.js +102 -2
- package/dist/pwa/manifest.js +186 -2
- package/dist/pwa/offline.js +259 -2
- package/dist/pwa/precache.js +116 -2
- package/dist/pwa/service-worker.js +860 -2
- package/dist/pwa/workbox-strategies.js +167 -2
- package/dist/pwa/workbox.js +382 -2
- package/dist/pwa.js +427 -427
- package/dist/reactive-bindings.js +266 -2
- package/dist/reactive.js +569 -2
- package/dist/reactivity.js +559 -2
- package/dist/release.js +1 -2
- package/dist/render.js +165 -2
- package/dist/route-middleware.js +17 -2
- package/dist/router.js +9 -2
- package/dist/routes.js +14 -2
- package/dist/runtime-injection.js +120 -2
- package/dist/runtime.js +94 -2
- package/dist/safe-evaluator.js +444 -2
- package/dist/scaffolding.js +897 -2
- package/dist/screenshot.js +87 -2
- package/dist/script-classifier.js +32 -2
- package/dist/script-validation.js +158 -2
- package/dist/seo.js +457 -2
- package/dist/serve.js +237 -2
- package/dist/server-bindings.js +108 -2
- package/dist/server-components.js +338 -11
- package/dist/signal-processing.js +946 -2
- package/dist/signals-api.js +154 -2
- package/dist/signals.js +5287 -2
- package/dist/site-builder/build.js +224 -2
- package/dist/site-builder/i18n.js +140 -2
- package/dist/site-builder/index.js +15 -2
- package/dist/site-builder/robots.js +26 -2
- package/dist/site-builder/router.js +27 -2
- package/dist/site-builder/seo.js +36 -2
- package/dist/site-builder/sitemap.js +26 -2
- package/dist/site-builder/theme.js +33 -2
- package/dist/site-builder/types.js +0 -1
- package/dist/slots.js +201 -2
- package/dist/source-maps.js +350 -2
- package/dist/spa-shell.js +34 -2
- package/dist/ssg.js +389 -389
- package/dist/ssr.js +355 -2
- package/dist/state-management.js +533 -2
- package/dist/store-imports.js +13 -2
- package/dist/store-loader.js +72 -5
- package/dist/stores-client.js +132 -2
- package/dist/story/addons.js +261 -2
- package/dist/story/analytics.js +235 -2
- package/dist/story/auto-stories.js +158 -2
- package/dist/story/bookmarks.js +277 -2
- package/dist/story/bun-test.js +102 -2
- package/dist/story/cli.js +155 -2
- package/dist/story/collect/analyzer.js +305 -2
- package/dist/story/collect/index.js +27 -2
- package/dist/story/collect/parser.js +129 -2
- package/dist/story/collect/scanner.js +101 -2
- package/dist/story/collect/tree.js +110 -2
- package/dist/story/commands/build.js +172 -2
- package/dist/story/commands/dev.js +78 -2
- package/dist/story/commands/index.js +3 -2
- package/dist/story/commands/preview.js +56 -2
- package/dist/story/compiled-output.js +151 -2
- package/dist/story/composition.js +261 -2
- package/dist/story/config-watcher.js +67 -2
- package/dist/story/config.js +64 -2
- package/dist/story/context.js +27 -2
- package/dist/story/controls/index.js +320 -2
- package/dist/story/crosswind.js +189 -2
- package/dist/story/desktop-preview.js +105 -2
- package/dist/story/docs-generator.js +186 -2
- package/dist/story/errors.js +239 -2
- package/dist/story/figma-export.js +224 -2
- package/dist/story/generator.js +165 -2
- package/dist/story/hmr.js +131 -2
- package/dist/story/hot-swap.js +207 -2
- package/dist/story/index.js +49 -2
- package/dist/story/interactions.js +225 -2
- package/dist/story/keyboard-shortcuts.js +345 -2
- package/dist/story/output.js +153 -2
- package/dist/story/performance.js +252 -2
- package/dist/story/presets.js +289 -2
- package/dist/story/props-validation.js +215 -2
- package/dist/story/renderer.js +209 -2
- package/dist/story/search-index.js +106 -2
- package/dist/story/search.js +140 -2
- package/dist/story/server.js +965 -2
- package/dist/story/setup.js +78 -2
- package/dist/story/snapshots.js +170 -2
- package/dist/story/testing.js +163 -2
- package/dist/story/theme.js +170 -2
- package/dist/story/types.js +0 -2
- package/dist/story/ui/code-panel.js +175 -2
- package/dist/story/ui/controls-panel.js +168 -2
- package/dist/story/ui/index.js +4 -2
- package/dist/story/ui/navigation.js +250 -2
- package/dist/story/ui/preview.js +251 -2
- package/dist/story/visual-testing.js +247 -2
- package/dist/streaming.js +537 -2
- package/dist/strict-lint.js +288 -2
- package/dist/style-scoping.js +50 -2
- package/dist/suspense.js +398 -2
- package/dist/teleport.js +109 -2
- package/dist/template-compiler.js +63 -2
- package/dist/template-hydrator.js +82 -2
- package/dist/template-tag-balance.js +93 -2
- package/dist/testing.js +581 -2
- package/dist/transitions.js +443 -2
- package/dist/type-checker.js +581 -2
- package/dist/types/component-types.d.ts +54 -0
- package/dist/types/component-types.js +0 -1
- package/dist/types/config-types.js +0 -1
- package/dist/types/context-types.js +0 -1
- package/dist/types/csp-types.js +0 -1
- package/dist/types/directive-types.js +3 -2
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.js +1 -2
- package/dist/types/pwa-types.js +0 -1
- package/dist/types.js +1 -2
- package/dist/typescript-templates.js +386 -4
- package/dist/utils.js +942 -2
- package/dist/validator.js +171 -2
- package/dist/variable-extractor.js +1094 -2
- package/dist/view-composers.js +29 -2
- package/dist/virtual-scrolling.js +454 -2
- package/dist/visual-editor.js +688 -28
- package/dist/vue-template.js +475 -2
- package/dist/web-components/css-scoping.js +177 -2
- package/dist/web-components/index.js +13 -2
- package/dist/web-components/reactive-generator.js +121 -56
- package/dist/web-components.js +1447 -2
- package/dist/x-element.js +17 -5
- package/package.json +6 -7
- package/dist/chunk-03c26pjz.js +0 -3
- package/dist/chunk-04mvcmcr.js +0 -106
- package/dist/chunk-05hgyyqc.js +0 -4
- package/dist/chunk-095s3972.js +0 -99
- package/dist/chunk-0b9w2w1y.js +0 -1
- package/dist/chunk-0dz85jrp.js +0 -3
- package/dist/chunk-0g4gece6.js +0 -4
- package/dist/chunk-0jd0pndq.js +0 -3
- package/dist/chunk-0jkwrcwj.js +0 -3
- package/dist/chunk-0m9tdm7t.js +0 -71
- package/dist/chunk-0qakwen3.js +0 -1
- package/dist/chunk-0qnz93q2.js +0 -3
- package/dist/chunk-0tatqxj2.js +0 -57
- package/dist/chunk-0wdar532.js +0 -102
- package/dist/chunk-13yz561y.js +0 -3
- package/dist/chunk-174z0cd0.js +0 -3
- package/dist/chunk-1mmykse5.js +0 -81
- package/dist/chunk-1z2yq9em.js +0 -3
- package/dist/chunk-1z5nhbjt.js +0 -90
- package/dist/chunk-1zgsgk4b.js +0 -1
- package/dist/chunk-25s7bckb.js +0 -171
- package/dist/chunk-268adc7r.js +0 -2230
- package/dist/chunk-26r6zh3t.js +0 -194
- package/dist/chunk-2w3302dh.js +0 -3
- package/dist/chunk-2xen423s.js +0 -3
- package/dist/chunk-39gm08bn.js +0 -39
- package/dist/chunk-3bjtemm6.js +0 -128
- package/dist/chunk-3jm3snz8.js +0 -3
- package/dist/chunk-3ngm57nt.js +0 -12
- package/dist/chunk-3rh7va1z.js +0 -3
- package/dist/chunk-3yg9hbmb.js +0 -4
- package/dist/chunk-44hd3kab.js +0 -1
- package/dist/chunk-46mkpbkk.js +0 -12
- package/dist/chunk-48cw2nde.js +0 -2
- package/dist/chunk-48r3qe0k.js +0 -3
- package/dist/chunk-4aj7ftqb.js +0 -1
- package/dist/chunk-4bt81cg3.js +0 -61
- package/dist/chunk-4j188175.js +0 -3
- package/dist/chunk-4k7d8p8d.js +0 -188
- package/dist/chunk-4qq8ffke.js +0 -28
- package/dist/chunk-50vqeesm.js +0 -142
- package/dist/chunk-52agge4n.js +0 -38
- package/dist/chunk-55yp0q8t.js +0 -201
- package/dist/chunk-57p201gb.js +0 -83
- package/dist/chunk-5ggw1dyv.js +0 -3
- package/dist/chunk-5kt3ay7x.js +0 -10
- package/dist/chunk-5p568px4.js +0 -1166
- package/dist/chunk-5ppkfyn2.js +0 -3
- package/dist/chunk-5q87fgkk.js +0 -3
- package/dist/chunk-5qb761h2.js +0 -3
- package/dist/chunk-5xvbq2gs.js +0 -30
- package/dist/chunk-647849kf.js +0 -34
- package/dist/chunk-6b5k6w2q.js +0 -7
- package/dist/chunk-6cr3eeh4.js +0 -23
- package/dist/chunk-6djgb0hr.js +0 -3
- package/dist/chunk-6dqzky7x.js +0 -35
- package/dist/chunk-6e4c6g46.js +0 -3
- package/dist/chunk-6w03t7h6.js +0 -3
- package/dist/chunk-6wn85hn6.js +0 -4
- package/dist/chunk-6y4gqs1q.js +0 -169
- package/dist/chunk-75rndzbd.js +0 -6
- package/dist/chunk-77tga15w.js +0 -3
- package/dist/chunk-7a51hkpf.js +0 -3
- package/dist/chunk-7b0xdy5h.js +0 -386
- package/dist/chunk-7cgmq685.js +0 -33
- package/dist/chunk-7dy588as.js +0 -6
- package/dist/chunk-7rvh2wwv.js +0 -721
- package/dist/chunk-7sm05m0j.js +0 -351
- package/dist/chunk-7sqdeqsw.js +0 -1
- package/dist/chunk-7xcfy2fn.js +0 -4
- package/dist/chunk-82t27pvd.js +0 -5
- package/dist/chunk-87kx8byz.js +0 -1115
- package/dist/chunk-8fgwhhb8.js +0 -6
- package/dist/chunk-8qbax8xn.js +0 -347
- package/dist/chunk-91s2hres.js +0 -8
- package/dist/chunk-94g3cahw.js +0 -11
- package/dist/chunk-957amb71.js +0 -8
- package/dist/chunk-95w08s8v.js +0 -3
- package/dist/chunk-9agvhp1x.js +0 -93
- package/dist/chunk-9tmbrwwx.js +0 -219
- package/dist/chunk-9yz5d003.js +0 -51
- package/dist/chunk-a3hyn4we.js +0 -79
- package/dist/chunk-a69tvya5.js +0 -53
- package/dist/chunk-adjcg6wa.js +0 -498
- package/dist/chunk-adqh2m9z.js +0 -45
- package/dist/chunk-asarebzq.js +0 -292
- package/dist/chunk-aw3rp9ac.js +0 -24
- package/dist/chunk-b0cyc09a.js +0 -109
- package/dist/chunk-b3kkjcdh.js +0 -3
- package/dist/chunk-b3prs7y0.js +0 -5
- package/dist/chunk-b5zc9y0y.js +0 -90
- package/dist/chunk-baa7h4yz.js +0 -3
- package/dist/chunk-bgec9r1v.js +0 -5224
- package/dist/chunk-bjnjpsgn.js +0 -3
- package/dist/chunk-bk8ew8ze.js +0 -24
- package/dist/chunk-bn08k7yy.js +0 -3
- package/dist/chunk-bpgg59wa.js +0 -3
- package/dist/chunk-bwxda6n1.js +0 -3
- package/dist/chunk-bykjk6vj.js +0 -4
- package/dist/chunk-c53hyw5c.js +0 -477
- package/dist/chunk-c7jg8w13.js +0 -3
- package/dist/chunk-ca6qd1dx.js +0 -3
- package/dist/chunk-cdbwprfv.js +0 -6
- package/dist/chunk-ceg2c2q2.js +0 -11
- package/dist/chunk-cn409b69.js +0 -3
- package/dist/chunk-cn8az1b4.js +0 -1
- package/dist/chunk-cp3kwv17.js +0 -8
- package/dist/chunk-cpcc11vp.js +0 -5
- package/dist/chunk-cr3wbrcr.js +0 -10
- package/dist/chunk-cygfdk1n.js +0 -3
- package/dist/chunk-cyp4m0vh.js +0 -16
- package/dist/chunk-cz25azze.js +0 -4
- package/dist/chunk-d77yxcds.js +0 -3
- package/dist/chunk-dvfs1h3c.js +0 -117
- package/dist/chunk-dyjnn5k8.js +0 -262
- package/dist/chunk-dzw95th7.js +0 -3
- package/dist/chunk-e0zytzdh.js +0 -179
- package/dist/chunk-e53h9qhd.js +0 -84
- package/dist/chunk-eds0f8f1.js +0 -3
- package/dist/chunk-eh8hact1.js +0 -5
- package/dist/chunk-epj957jf.js +0 -4
- package/dist/chunk-eqeyaq6g.js +0 -77
- package/dist/chunk-fbxt2mrx.js +0 -5
- package/dist/chunk-fch9tk1k.js +0 -3
- package/dist/chunk-fe7r1mq1.js +0 -9
- package/dist/chunk-fhawx87n.js +0 -8
- package/dist/chunk-fk51yyrw.js +0 -3
- package/dist/chunk-fms20x0n.js +0 -21
- package/dist/chunk-fs0qezn5.js +0 -341
- package/dist/chunk-fzm3y0r3.js +0 -267
- package/dist/chunk-g2hekckm.js +0 -161
- package/dist/chunk-g4ps1dj8.js +0 -140
- package/dist/chunk-g8b81pzc.js +0 -3
- package/dist/chunk-ganag9dm.js +0 -3
- package/dist/chunk-gc84b1d2.js +0 -58
- package/dist/chunk-gcf5v18y.js +0 -60
- package/dist/chunk-ghrx0hn1.js +0 -4
- package/dist/chunk-gqpkp459.js +0 -3
- package/dist/chunk-h45py5w5.js +0 -2
- package/dist/chunk-h5wa62ek.js +0 -145
- package/dist/chunk-h82kjdr4.js +0 -83
- package/dist/chunk-haecq01c.js +0 -3
- package/dist/chunk-hepg894w.js +0 -3
- package/dist/chunk-hjdc99kb.js +0 -3
- package/dist/chunk-hje9v2zh.js +0 -3
- package/dist/chunk-hjv76kcw.js +0 -1
- package/dist/chunk-hke99a0v.js +0 -3
- package/dist/chunk-hpqr9e3x.js +0 -3
- package/dist/chunk-hq5cem49.js +0 -236
- package/dist/chunk-hrampcrj.js +0 -3
- package/dist/chunk-ht4j68cs.js +0 -3
- package/dist/chunk-hxx3za24.js +0 -62
- package/dist/chunk-j4s5qwd7.js +0 -4
- package/dist/chunk-jbejwejg.js +0 -8
- package/dist/chunk-jc0fc4ht.js +0 -11
- package/dist/chunk-jcs0ymw7.js +0 -3
- package/dist/chunk-jfm69keq.js +0 -231
- package/dist/chunk-jfrn43vh.js +0 -2
- package/dist/chunk-jjamhxpm.js +0 -139
- package/dist/chunk-jjvp4t5w.js +0 -27
- package/dist/chunk-jt44av4j.js +0 -3
- package/dist/chunk-jt98jhpt.js +0 -10
- package/dist/chunk-k8440jxh.js +0 -6
- package/dist/chunk-kdxa9epn.js +0 -21
- package/dist/chunk-kfd2hf6f.js +0 -3
- package/dist/chunk-kgym7ch9.js +0 -8
- package/dist/chunk-kh6rfz2v.js +0 -4
- package/dist/chunk-kkp6rs2n.js +0 -36
- package/dist/chunk-ktkmvaa8.js +0 -1
- package/dist/chunk-m59y310j.js +0 -3
- package/dist/chunk-mgmyr1b9.js +0 -6
- package/dist/chunk-mqwbpamc.js +0 -3
- package/dist/chunk-mrehzhxv.js +0 -5
- package/dist/chunk-mv03qb75.js +0 -3
- package/dist/chunk-mv4fb50w.js +0 -1
- package/dist/chunk-mwbng54r.js +0 -2
- package/dist/chunk-n46a5g1g.js +0 -3
- package/dist/chunk-n944baxp.js +0 -3
- package/dist/chunk-nanw7yhz.js +0 -14
- package/dist/chunk-nap11ntr.js +0 -21
- package/dist/chunk-ncnfa8ae.js +0 -29
- package/dist/chunk-ngxfwzq3.js +0 -3
- package/dist/chunk-nvwb4x04.js +0 -3
- package/dist/chunk-nw34xajc.js +0 -8
- package/dist/chunk-payfb24w.js +0 -207
- package/dist/chunk-pc31m5x5.js +0 -398
- package/dist/chunk-pg1fvqb9.js +0 -167
- package/dist/chunk-q60knhjf.js +0 -3
- package/dist/chunk-q6h6yvzb.js +0 -10
- package/dist/chunk-qd5461tt.js +0 -3
- package/dist/chunk-qdc3aav1.js +0 -3
- package/dist/chunk-qfwzdffx.js +0 -3
- package/dist/chunk-qgxwmagw.js +0 -134
- package/dist/chunk-qhdtssn1.js +0 -19
- package/dist/chunk-qk584whs.js +0 -3
- package/dist/chunk-qm4yppj5.js +0 -57
- package/dist/chunk-qwyd9a1d.js +0 -2
- package/dist/chunk-qxs6et76.js +0 -196
- package/dist/chunk-rb1e4cnb.js +0 -3
- package/dist/chunk-rh80q1nd.js +0 -1
- package/dist/chunk-rkffm9sy.js +0 -128
- package/dist/chunk-rv002yn0.js +0 -14
- package/dist/chunk-s6ja2bdg.js +0 -66
- package/dist/chunk-sjagg9qz.js +0 -66
- package/dist/chunk-sn07azv3.js +0 -3
- package/dist/chunk-svahbw0w.js +0 -12
- package/dist/chunk-svhtdb0s.js +0 -6
- package/dist/chunk-t37dp99j.js +0 -3
- package/dist/chunk-tj6zfxeb.js +0 -64
- package/dist/chunk-tmgz5t2g.js +0 -3
- package/dist/chunk-tr0z0e1g.js +0 -3
- package/dist/chunk-tx6br9r4.js +0 -274
- package/dist/chunk-v97390pe.js +0 -1
- package/dist/chunk-vcr5pzpx.js +0 -233
- package/dist/chunk-vdfwv0fp.js +0 -6
- package/dist/chunk-vp2395eb.js +0 -3
- package/dist/chunk-vpe6napb.js +0 -28
- package/dist/chunk-vv9wfz1c.js +0 -12
- package/dist/chunk-vw6ejgmy.js +0 -21
- package/dist/chunk-vx22he47.js +0 -1
- package/dist/chunk-w01y57f5.js +0 -1539
- package/dist/chunk-w21mwxdd.js +0 -4
- package/dist/chunk-w4n8fqp7.js +0 -216
- package/dist/chunk-w959hm8j.js +0 -358
- package/dist/chunk-wf7zrjsw.js +0 -138
- package/dist/chunk-wk07pwtd.js +0 -321
- package/dist/chunk-wvef3ngh.js +0 -127
- package/dist/chunk-wxvyj65q.js +0 -2
- package/dist/chunk-x1hjv24z.js +0 -11
- package/dist/chunk-x39sfpvm.js +0 -302
- package/dist/chunk-x4fze3q2.js +0 -314
- package/dist/chunk-x64kb787.js +0 -15
- package/dist/chunk-xcb0pbr6.js +0 -4
- package/dist/chunk-xhkjhxsp.js +0 -3
- package/dist/chunk-xhnpsngj.js +0 -5
- package/dist/chunk-xsqbk4yk.js +0 -3
- package/dist/chunk-xygc53vr.js +0 -68
- package/dist/chunk-y0qg6rrv.js +0 -3
- package/dist/chunk-y25pr13j.js +0 -19
- package/dist/chunk-y4c744dk.js +0 -3
- package/dist/chunk-y4md9hp0.js +0 -3
- package/dist/chunk-y5wazw6j.js +0 -7
- package/dist/chunk-y5xz0jc4.js +0 -141
- package/dist/chunk-y86m1wr4.js +0 -4
- package/dist/chunk-yaan98dd.js +0 -3
- package/dist/chunk-yach037f.js +0 -32
- package/dist/chunk-yexjrg9d.js +0 -7
- package/dist/chunk-ygvyc6wv.js +0 -90
- package/dist/chunk-yj560gp8.js +0 -8
- package/dist/chunk-yn38c15w.js +0 -4
- package/dist/chunk-yr1gdceh.js +0 -3
- package/dist/chunk-yw2fzq86.js +0 -3
- package/dist/chunk-ywkrxp2h.js +0 -147
- package/dist/chunk-z37xq5rx.js +0 -3
- package/dist/chunk-z4djtgt0.js +0 -71
- package/dist/chunk-z8cjr9n9.js +0 -7
- package/dist/chunk-znxp3zha.js +0 -71
- package/dist/chunk-zt2yag10.js +0 -429
package/dist/story/generator.js
CHANGED
|
@@ -1,2 +1,165 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export function generateAutoStory(component) {
|
|
2
|
+
const id = generateId(component.name), variants = generateVariants(component);
|
|
3
|
+
return {
|
|
4
|
+
id,
|
|
5
|
+
title: component.name,
|
|
6
|
+
variants,
|
|
7
|
+
layout: { type: "single" }
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
function generateVariants(component) {
|
|
11
|
+
const variants = [], defaultState = {};
|
|
12
|
+
for (const prop of component.props)
|
|
13
|
+
if (prop.default !== void 0)
|
|
14
|
+
defaultState[prop.name] = prop.default;
|
|
15
|
+
variants.push({
|
|
16
|
+
id: "default",
|
|
17
|
+
title: "Default",
|
|
18
|
+
state: defaultState
|
|
19
|
+
});
|
|
20
|
+
for (const prop of component.props)
|
|
21
|
+
if (prop.type === "boolean" && prop.default === !1) {
|
|
22
|
+
const state = { ...defaultState, [prop.name]: !0 };
|
|
23
|
+
variants.push({
|
|
24
|
+
id: `with-${prop.name}`,
|
|
25
|
+
title: `With ${formatPropName(prop.name)}`,
|
|
26
|
+
state
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
for (const prop of component.props)
|
|
30
|
+
if (prop.options && prop.options.length > 0) {
|
|
31
|
+
for (const option of prop.options)
|
|
32
|
+
if (option !== prop.default) {
|
|
33
|
+
const state = { ...defaultState, [prop.name]: option };
|
|
34
|
+
variants.push({
|
|
35
|
+
id: `${prop.name}-${String(option).toLowerCase()}`,
|
|
36
|
+
title: `${formatPropName(prop.name)}: ${option}`,
|
|
37
|
+
state
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return variants;
|
|
42
|
+
}
|
|
43
|
+
export function inferControl(prop) {
|
|
44
|
+
const config = { type: inferControlType(prop) };
|
|
45
|
+
if (prop.options && prop.options.length > 0)
|
|
46
|
+
config.options = prop.options.map((opt) => typeof opt === "string" ? { value: opt, label: opt } : opt);
|
|
47
|
+
config.title = formatPropName(prop.name);
|
|
48
|
+
return config;
|
|
49
|
+
}
|
|
50
|
+
function inferControlType(prop) {
|
|
51
|
+
const type = prop.type.toLowerCase();
|
|
52
|
+
if (prop.options && prop.options.length > 0)
|
|
53
|
+
return prop.options.length <= 4 ? "radio" : "select";
|
|
54
|
+
if (type === "boolean" || type === "bool")
|
|
55
|
+
return "boolean";
|
|
56
|
+
if (type === "number" || type === "int" || type === "float")
|
|
57
|
+
return "number";
|
|
58
|
+
if (type === "string" || type === "text") {
|
|
59
|
+
if (prop.name.toLowerCase().includes("color"))
|
|
60
|
+
return "color";
|
|
61
|
+
if (prop.name.toLowerCase().includes("description") || prop.name.toLowerCase().includes("content") || prop.name.toLowerCase().includes("text"))
|
|
62
|
+
return "textarea";
|
|
63
|
+
return "text";
|
|
64
|
+
}
|
|
65
|
+
if (type === "array" || type === "object" || type.startsWith("{") || type.startsWith("["))
|
|
66
|
+
return "json";
|
|
67
|
+
if (type === "date")
|
|
68
|
+
return "date";
|
|
69
|
+
return "text";
|
|
70
|
+
}
|
|
71
|
+
export function generateControls(props) {
|
|
72
|
+
return props.map(inferControl);
|
|
73
|
+
}
|
|
74
|
+
export function generateStorySource(componentName, state) {
|
|
75
|
+
const props = Object.entries(state).map(([key, value]) => {
|
|
76
|
+
if (typeof value === "string")
|
|
77
|
+
return `${key}="${value}"`;
|
|
78
|
+
if (typeof value === "boolean")
|
|
79
|
+
return value ? key : "";
|
|
80
|
+
return `:${key}="${JSON.stringify(value)}"`;
|
|
81
|
+
}).filter(Boolean).join(" ");
|
|
82
|
+
return `<${componentName} ${props} />`;
|
|
83
|
+
}
|
|
84
|
+
function formatPropName(name) {
|
|
85
|
+
return name.replace(/([A-Z])/g, " $1").replace(/^./, (s) => s.toUpperCase()).trim();
|
|
86
|
+
}
|
|
87
|
+
function generateId(name) {
|
|
88
|
+
return name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
89
|
+
}
|
|
90
|
+
export function generateStoryFileContent(component) {
|
|
91
|
+
const story = generateAutoStory(component), controls = generateControls(component.props), initStateProps = component.props.map((prop) => {
|
|
92
|
+
const defaultVal = prop.default !== void 0 ? JSON.stringify(prop.default) : getDefaultForType(prop.type);
|
|
93
|
+
return ` ${prop.name}: ${defaultVal}`;
|
|
94
|
+
}).join(`,
|
|
95
|
+
`), controlComponents = controls.map((ctrl, i) => {
|
|
96
|
+
const prop = component.props[i];
|
|
97
|
+
return ` <${getControlTag(ctrl.type)} v-model="state.${prop.name}" title="${ctrl.title}" />`;
|
|
98
|
+
}).join(`
|
|
99
|
+
`);
|
|
100
|
+
return `<!-- Auto-generated story for ${component.name} -->
|
|
101
|
+
<script>
|
|
102
|
+
import ${component.name} from './${component.name}.stx'
|
|
103
|
+
|
|
104
|
+
function initState() {
|
|
105
|
+
return {
|
|
106
|
+
${initStateProps}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
</script>
|
|
110
|
+
|
|
111
|
+
<Story title="${component.name}">
|
|
112
|
+
<Variant title="Playground" :init-state="initState">
|
|
113
|
+
<template #default="{ state }">
|
|
114
|
+
<${component.name} v-bind="state" />
|
|
115
|
+
</template>
|
|
116
|
+
|
|
117
|
+
<template #controls="{ state }">
|
|
118
|
+
${controlComponents}
|
|
119
|
+
</template>
|
|
120
|
+
</Variant>
|
|
121
|
+
|
|
122
|
+
${story.variants.slice(1).map((v) => ` <Variant title="${v.title}">
|
|
123
|
+
<${component.name} ${formatStateAsProps(v.state || {})} />
|
|
124
|
+
</Variant>`).join(`
|
|
125
|
+
|
|
126
|
+
`)}
|
|
127
|
+
</Story>
|
|
128
|
+
`;
|
|
129
|
+
}
|
|
130
|
+
function getDefaultForType(type) {
|
|
131
|
+
const t = type.toLowerCase();
|
|
132
|
+
if (t === "boolean")
|
|
133
|
+
return "false";
|
|
134
|
+
if (t === "number")
|
|
135
|
+
return "0";
|
|
136
|
+
if (t === "array")
|
|
137
|
+
return "[]";
|
|
138
|
+
if (t === "object")
|
|
139
|
+
return "{}";
|
|
140
|
+
return "''";
|
|
141
|
+
}
|
|
142
|
+
function getControlTag(type) {
|
|
143
|
+
return {
|
|
144
|
+
text: "StxText",
|
|
145
|
+
number: "StxNumber",
|
|
146
|
+
boolean: "StxCheckbox",
|
|
147
|
+
select: "StxSelect",
|
|
148
|
+
radio: "StxRadio",
|
|
149
|
+
color: "StxColorSelect",
|
|
150
|
+
json: "StxJson",
|
|
151
|
+
date: "StxText",
|
|
152
|
+
textarea: "StxTextarea",
|
|
153
|
+
slider: "StxSlider",
|
|
154
|
+
buttongroup: "StxButtonGroup"
|
|
155
|
+
}[type] || "StxText";
|
|
156
|
+
}
|
|
157
|
+
function formatStateAsProps(state) {
|
|
158
|
+
return Object.entries(state).map(([key, value]) => {
|
|
159
|
+
if (typeof value === "string")
|
|
160
|
+
return `${key}="${value}"`;
|
|
161
|
+
if (typeof value === "boolean")
|
|
162
|
+
return value ? key : `:${key}="false"`;
|
|
163
|
+
return `:${key}="${JSON.stringify(value)}"`;
|
|
164
|
+
}).join(" ");
|
|
165
|
+
}
|
package/dist/story/hmr.js
CHANGED
|
@@ -1,2 +1,131 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
const clients = new Set;
|
|
2
|
+
export function createHmrHandler() {
|
|
3
|
+
return {
|
|
4
|
+
open(ws) {
|
|
5
|
+
clients.add(ws);
|
|
6
|
+
ws.send(JSON.stringify({
|
|
7
|
+
type: "connected",
|
|
8
|
+
timestamp: Date.now()
|
|
9
|
+
}));
|
|
10
|
+
},
|
|
11
|
+
close(ws) {
|
|
12
|
+
clients.delete(ws);
|
|
13
|
+
},
|
|
14
|
+
message(_ws, _message) {}
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export function broadcast(message) {
|
|
18
|
+
const payload = JSON.stringify({
|
|
19
|
+
...message,
|
|
20
|
+
timestamp: message.timestamp || Date.now()
|
|
21
|
+
});
|
|
22
|
+
for (const client of clients)
|
|
23
|
+
try {
|
|
24
|
+
client.send(payload);
|
|
25
|
+
} catch {
|
|
26
|
+
clients.delete(client);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export function notifyStoryUpdate(storyId, data) {
|
|
30
|
+
broadcast({
|
|
31
|
+
type: "story-update",
|
|
32
|
+
data: { storyId, ...data }
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
export function notifyStoryAdd(storyId, data) {
|
|
36
|
+
broadcast({
|
|
37
|
+
type: "story-add",
|
|
38
|
+
data: { storyId, ...data }
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
export function notifyStoryRemove(storyId) {
|
|
42
|
+
broadcast({
|
|
43
|
+
type: "story-remove",
|
|
44
|
+
data: { storyId }
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
export function notifyConfigChange() {
|
|
48
|
+
broadcast({
|
|
49
|
+
type: "config-change"
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
export function notifyFullReload() {
|
|
53
|
+
broadcast({
|
|
54
|
+
type: "full-reload"
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
export function notifyError(error) {
|
|
58
|
+
broadcast({
|
|
59
|
+
type: "error",
|
|
60
|
+
data: { error }
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
export function getClientCount() {
|
|
64
|
+
return clients.size;
|
|
65
|
+
}
|
|
66
|
+
export function getHmrClientScript(wsUrl) {
|
|
67
|
+
return `
|
|
68
|
+
<script>
|
|
69
|
+
(function() {
|
|
70
|
+
const ws = new WebSocket('${wsUrl}');
|
|
71
|
+
|
|
72
|
+
ws.onopen = function() {
|
|
73
|
+
console.log('[STX Story] HMR connected');
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
ws.onmessage = function(event) {
|
|
77
|
+
const message = JSON.parse(event.data);
|
|
78
|
+
|
|
79
|
+
switch (message.type) {
|
|
80
|
+
case 'connected':
|
|
81
|
+
console.log('[STX Story] Connected to HMR server');
|
|
82
|
+
break;
|
|
83
|
+
|
|
84
|
+
case 'story-update':
|
|
85
|
+
console.log('[STX Story] Story updated:', message.data.storyId);
|
|
86
|
+
// Reload the current story if it matches
|
|
87
|
+
if (window.__stxStory && window.__stxStory.currentStoryId === message.data.storyId) {
|
|
88
|
+
window.__stxStory.reloadCurrentStory();
|
|
89
|
+
}
|
|
90
|
+
break;
|
|
91
|
+
|
|
92
|
+
case 'story-add':
|
|
93
|
+
console.log('[STX Story] Story added:', message.data.storyId);
|
|
94
|
+
window.__stxStory && window.__stxStory.refreshStoryList();
|
|
95
|
+
break;
|
|
96
|
+
|
|
97
|
+
case 'story-remove':
|
|
98
|
+
console.log('[STX Story] Story removed:', message.data.storyId);
|
|
99
|
+
window.__stxStory && window.__stxStory.refreshStoryList();
|
|
100
|
+
break;
|
|
101
|
+
|
|
102
|
+
case 'config-change':
|
|
103
|
+
console.log('[STX Story] Config changed, reloading...');
|
|
104
|
+
location.reload();
|
|
105
|
+
break;
|
|
106
|
+
|
|
107
|
+
case 'full-reload':
|
|
108
|
+
console.log('[STX Story] Full reload requested');
|
|
109
|
+
location.reload();
|
|
110
|
+
break;
|
|
111
|
+
|
|
112
|
+
case 'error':
|
|
113
|
+
console.error('[STX Story] Error:', message.data.error);
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
ws.onclose = function() {
|
|
119
|
+
console.log('[STX Story] HMR disconnected, attempting reconnect...');
|
|
120
|
+
setTimeout(function() {
|
|
121
|
+
location.reload();
|
|
122
|
+
}, 1000);
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
ws.onerror = function(error) {
|
|
126
|
+
console.error('[STX Story] WebSocket error:', error);
|
|
127
|
+
};
|
|
128
|
+
})();
|
|
129
|
+
</script>
|
|
130
|
+
`;
|
|
131
|
+
}
|
package/dist/story/hot-swap.js
CHANGED
|
@@ -1,2 +1,207 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export function getHotSwapScript() {
|
|
2
|
+
return `
|
|
3
|
+
<script>
|
|
4
|
+
(function() {
|
|
5
|
+
// Hot swap state
|
|
6
|
+
window.__stxHotSwap = {
|
|
7
|
+
storyId: null,
|
|
8
|
+
variantId: null,
|
|
9
|
+
props: {},
|
|
10
|
+
iframe: null,
|
|
11
|
+
|
|
12
|
+
// Initialize hot swap
|
|
13
|
+
init: function(iframeSelector) {
|
|
14
|
+
this.iframe = document.querySelector(iframeSelector);
|
|
15
|
+
if (!this.iframe) {
|
|
16
|
+
console.warn('[STX Story] Hot swap iframe not found');
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Listen for variant changes
|
|
21
|
+
window.addEventListener('stx:variant-change', this.handleVariantChange.bind(this));
|
|
22
|
+
window.addEventListener('stx:props-change', this.handlePropsChange.bind(this));
|
|
23
|
+
|
|
24
|
+
console.log('[STX Story] Hot swap initialized');
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
// Handle variant change
|
|
28
|
+
handleVariantChange: function(event) {
|
|
29
|
+
const { storyId, variantId } = event.detail;
|
|
30
|
+
|
|
31
|
+
if (this.storyId === storyId && this.variantId === variantId) {
|
|
32
|
+
return; // No change
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
this.storyId = storyId;
|
|
36
|
+
this.variantId = variantId;
|
|
37
|
+
|
|
38
|
+
this.swapContent();
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
// Handle props change
|
|
42
|
+
handlePropsChange: function(event) {
|
|
43
|
+
const { props } = event.detail;
|
|
44
|
+
this.props = { ...this.props, ...props };
|
|
45
|
+
this.updateProps();
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
// Swap iframe content without reload
|
|
49
|
+
swapContent: async function() {
|
|
50
|
+
if (!this.iframe || !this.storyId || !this.variantId) return;
|
|
51
|
+
|
|
52
|
+
// Save scroll position
|
|
53
|
+
const scrollTop = this.iframe.contentWindow?.scrollY || 0;
|
|
54
|
+
const scrollLeft = this.iframe.contentWindow?.scrollX || 0;
|
|
55
|
+
|
|
56
|
+
// Fetch new content
|
|
57
|
+
try {
|
|
58
|
+
const response = await fetch('/api/render/' + this.storyId + '/' + this.variantId);
|
|
59
|
+
const data = await response.json();
|
|
60
|
+
|
|
61
|
+
if (data.html) {
|
|
62
|
+
// Fade out
|
|
63
|
+
this.iframe.style.opacity = '0.5';
|
|
64
|
+
this.iframe.style.transition = 'opacity 150ms ease';
|
|
65
|
+
|
|
66
|
+
// Update content
|
|
67
|
+
const doc = this.iframe.contentDocument;
|
|
68
|
+
if (doc) {
|
|
69
|
+
// Find body or create one
|
|
70
|
+
let body = doc.body;
|
|
71
|
+
if (!body) {
|
|
72
|
+
doc.write('<html><head></head><body></body></html>');
|
|
73
|
+
body = doc.body;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Update body content
|
|
77
|
+
body.innerHTML = data.html;
|
|
78
|
+
|
|
79
|
+
// Update styles if provided
|
|
80
|
+
if (data.css) {
|
|
81
|
+
let styleEl = doc.getElementById('stx-component-styles');
|
|
82
|
+
if (!styleEl) {
|
|
83
|
+
styleEl = doc.createElement('style');
|
|
84
|
+
styleEl.id = 'stx-component-styles';
|
|
85
|
+
doc.head.appendChild(styleEl);
|
|
86
|
+
}
|
|
87
|
+
styleEl.textContent = data.css;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Restore scroll position
|
|
91
|
+
this.iframe.contentWindow?.scrollTo(scrollLeft, scrollTop);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Fade in
|
|
95
|
+
setTimeout(() => {
|
|
96
|
+
this.iframe.style.opacity = '1';
|
|
97
|
+
}, 50);
|
|
98
|
+
|
|
99
|
+
// Dispatch event
|
|
100
|
+
window.dispatchEvent(new CustomEvent('stx:swap-complete', {
|
|
101
|
+
detail: { storyId: this.storyId, variantId: this.variantId }
|
|
102
|
+
}));
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
console.error('[STX Story] Hot swap failed:', error);
|
|
107
|
+
// Fallback to full reload
|
|
108
|
+
this.iframe.src = '/preview/' + this.storyId + '/' + this.variantId;
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
// Update props in iframe without content swap
|
|
113
|
+
updateProps: function() {
|
|
114
|
+
if (!this.iframe) return;
|
|
115
|
+
|
|
116
|
+
const win = this.iframe.contentWindow;
|
|
117
|
+
if (win && win.__stxProps) {
|
|
118
|
+
Object.assign(win.__stxProps, this.props);
|
|
119
|
+
|
|
120
|
+
// Trigger re-render if component supports it
|
|
121
|
+
if (win.__stxRerender) {
|
|
122
|
+
win.__stxRerender(this.props);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
window.dispatchEvent(new CustomEvent('stx:props-updated', {
|
|
126
|
+
detail: { props: this.props }
|
|
127
|
+
}));
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
// Select a variant
|
|
132
|
+
selectVariant: function(storyId, variantId) {
|
|
133
|
+
window.dispatchEvent(new CustomEvent('stx:variant-change', {
|
|
134
|
+
detail: { storyId, variantId }
|
|
135
|
+
}));
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
// Update a prop
|
|
139
|
+
updateProp: function(name, value) {
|
|
140
|
+
window.dispatchEvent(new CustomEvent('stx:props-change', {
|
|
141
|
+
detail: { props: { [name]: value } }
|
|
142
|
+
}));
|
|
143
|
+
},
|
|
144
|
+
|
|
145
|
+
// Reset props to defaults
|
|
146
|
+
resetProps: function() {
|
|
147
|
+
this.props = {};
|
|
148
|
+
this.swapContent();
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
// Auto-initialize when DOM is ready
|
|
153
|
+
if (document.readyState === 'loading') {
|
|
154
|
+
document.addEventListener('DOMContentLoaded', function() {
|
|
155
|
+
window.__stxHotSwap.init('#preview-iframe');
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
window.__stxHotSwap.init('#preview-iframe');
|
|
160
|
+
}
|
|
161
|
+
})();
|
|
162
|
+
</script>
|
|
163
|
+
`;
|
|
164
|
+
}
|
|
165
|
+
export function getVariantSelectorHtml(variants, currentVariantId) {
|
|
166
|
+
return `
|
|
167
|
+
<div class="variant-selector">
|
|
168
|
+
${variants.map((v) => `
|
|
169
|
+
<button
|
|
170
|
+
class="variant-btn ${v.id === currentVariantId ? "active" : ""}"
|
|
171
|
+
onclick="window.__stxHotSwap.selectVariant(window.__stxHotSwap.storyId, '${v.id}')"
|
|
172
|
+
>
|
|
173
|
+
${v.title}
|
|
174
|
+
</button>
|
|
175
|
+
`).join("")}
|
|
176
|
+
</div>
|
|
177
|
+
`;
|
|
178
|
+
}
|
|
179
|
+
export function getVariantSelectorStyles() {
|
|
180
|
+
return `
|
|
181
|
+
.variant-selector {
|
|
182
|
+
display: flex;
|
|
183
|
+
gap: 4px;
|
|
184
|
+
padding: 8px;
|
|
185
|
+
background: var(--bg-secondary);
|
|
186
|
+
border-radius: 6px;
|
|
187
|
+
}
|
|
188
|
+
.variant-btn {
|
|
189
|
+
padding: 6px 12px;
|
|
190
|
+
border: 1px solid var(--border);
|
|
191
|
+
border-radius: 4px;
|
|
192
|
+
background: var(--bg);
|
|
193
|
+
color: var(--text);
|
|
194
|
+
cursor: pointer;
|
|
195
|
+
font-size: 13px;
|
|
196
|
+
transition: all 150ms ease;
|
|
197
|
+
}
|
|
198
|
+
.variant-btn:hover {
|
|
199
|
+
background: var(--bg-secondary);
|
|
200
|
+
}
|
|
201
|
+
.variant-btn.active {
|
|
202
|
+
background: var(--primary);
|
|
203
|
+
color: white;
|
|
204
|
+
border-color: var(--primary);
|
|
205
|
+
}
|
|
206
|
+
`;
|
|
207
|
+
}
|
package/dist/story/index.js
CHANGED
|
@@ -1,2 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
import"../chunk-cn8az1b4.js";import{a as DB,b as EB,c as GB,d as HB,e as RB,f as VB,g as IB,h as bB,i as TB}from"../chunk-wvef3ngh.js";import{j as kB,k as PB,l as vB,m as xB}from"../chunk-g4ps1dj8.js";import{n as wB,o as yB,p as fB,q as CB,r as SB,s as lB,t as gB,u as hB,v as mB,w as uB}from"../chunk-4k7d8p8d.js";import{A as aB,B as iB,C as nB,D as sB,E as rB,x as dB,y as cB,z as pB}from"../chunk-payfb24w.js";import{F as oB,G as tB}from"../chunk-1mmykse5.js";import{H as aA,I as iA,J as nA,K as sA,L as rA,M as oA}from"../chunk-0dz85jrp.js";import{N as tA,O as eA,P as jB,Q as qB,R as zB,S as AB,T as BB,U as JB,V as LB}from"../chunk-39gm08bn.js";import{$ as _B,W as NB,X as QB,Y as XB,Z as YB,_ as ZB,aa as $B,ba as FB,ca as KB,da as MB,ea as OB,fa as UB,ga as WB}from"../chunk-ygvyc6wv.js";import"../chunk-44hd3kab.js";import{ha as SA,ia as lA,ja as gA,ka as hA}from"../chunk-h82kjdr4.js";import{la as mA,ma as uA,na as dA,oa as cA,pa as pA}from"../chunk-095s3972.js";import{qa as NA,ra as QA,sa as XA,ta as YA,ua as ZA}from"../chunk-rkffm9sy.js";import{va as _A,wa as $A,xa as FA,ya as KA}from"../chunk-z4djtgt0.js";import{Aa as OA,Ba as UA,Ca as WA,Da as DA,za as MA}from"../chunk-6b5k6w2q.js";import{Ea as EA,Fa as GA,Ga as HA,Ha as RA,Ia as VA}from"../chunk-wf7zrjsw.js";import{Ja as IA,Ka as bA,La as TA,Ma as kA,Na as PA,Oa as vA}from"../chunk-yach037f.js";import{Pa as xA,Qa as wA,Ra as yA,Sa as fA,Ta as CA}from"../chunk-7cgmq685.js";import"../chunk-rh80q1nd.js";import{Ua as Sz,Va as lz,Wa as gz,Xa as hz}from"../chunk-a3hyn4we.js";import{$a as cz,Ya as mz,Za as uz,_a as dz,ab as pz,bb as az,cb as iz}from"../chunk-y5xz0jc4.js";import{db as nz,eb as sz,fb as rz,gb as oz,hb as tz,ib as ez,jb as jA,kb as qA,lb as zA,mb as AA,nb as BA,ob as JA,pb as LA}from"../chunk-vcr5pzpx.js";import{qb as Pz,rb as vz,sb as xz}from"../chunk-yaan98dd.js";import{tb as Tz,ub as kz}from"../chunk-91s2hres.js";import"../chunk-0qakwen3.js";import{vb as wz,wb as yz,xb as fz,yb as Cz}from"../chunk-nvwb4x04.js";import{Ab as wq,zb as xq}from"../chunk-dvfs1h3c.js";import{Bb as Rq,Cb as Vq,Db as Iq,Eb as bq,Fb as Tq,Gb as kq,Hb as Pq,Ib as vq}from"../chunk-0jd0pndq.js";import{Jb as Iz,Kb as bz}from"../chunk-3yg9hbmb.js";import"../chunk-7rvh2wwv.js";import{Mb as Uz,Nb as Wz,Ob as Dz,Pb as Ez,Qb as Gz,Rb as Hz,Sb as Rz,Tb as Vz}from"../chunk-jc0fc4ht.js";import{Ub as rq,Vb as oq,Wb as tq,Xb as eq,Yb as jz}from"../chunk-fzm3y0r3.js";import{$b as Az,Zb as qz,_b as zz,ac as Bz,bc as Jz,cc as Lz}from"../chunk-jjamhxpm.js";import{dc as Nz,ec as Qz,fc as Xz,gc as Yz}from"../chunk-h5wa62ek.js";import{hc as Zz,ic as _z,jc as $z,kc as Fz,lc as Kz,mc as Mz,nc as Oz}from"../chunk-52agge4n.js";import{oc as Sq,pc as lq,qc as gq,rc as hq,sc as mq,tc as uq,uc as dq,vc as cq,wc as pq,xc as aq}from"../chunk-s6ja2bdg.js";import{Ac as sq,yc as iq,zc as nq}from"../chunk-55yp0q8t.js";import{Bc as yq,Cc as fq,Dc as Cq}from"../chunk-6e4c6g46.js";import{$c as Uq,Ec as sj,Fc as rj,Gc as oj,Hc as tj,Ic as ej,Jc as jq,Kc as qq,Lc as zq,Mc as Aq,Nc as Bq,Oc as Jq,Pc as Lq,Qc as Nq,Rc as Qq,Sc as Xq,Tc as Yq,Uc as Zq,Vc as _q,Wc as $q,Xc as Fq,Yc as Kq,Zc as Mq,_c as Oq,ad as Wq,bd as Dq,cd as Eq,dd as Gq,ed as Hq}from"../chunk-yn38c15w.js";import{fd as Sj,gd as lj,hd as gj}from"../chunk-bpgg59wa.js";import{id as pj,jd as aj,kd as ij,ld as nj}from"../chunk-y0qg6rrv.js";import{Ad as Xj,Bd as Yj,Cd as Zj,Dd as _j,Ed as $j,md as s,nd as r,od as o,pd as t,qd as e,rd as jj,sd as qj,td as zj,ud as Aj,vd as Bj,wd as Jj,xd as Lj,yd as Nj,zd as Qj}from"../chunk-1z5nhbjt.js";import{Fd as Fj,Gd as Kj,Hd as Mj}from"../chunk-hxx3za24.js";import{Id as Vj,Jd as Ij,Kd as bj,Ld as Tj}from"../chunk-aw3rp9ac.js";import{Md as Oj,Nd as Uj,Od as Wj,Pd as Dj,Qd as Ej,Rd as Gj,Sd as Hj,Td as Rj}from"../chunk-svhtdb0s.js";import{Ud as kj,Vd as Pj,Wd as vj,Xd as xj}from"../chunk-pg1fvqb9.js";import{$d as dj,Yd as hj,Zd as mj,_d as uj,ae as cj}from"../chunk-4qq8ffke.js";import{be as wj,ce as yj,de as fj,ee as Cj}from"../chunk-05hgyyqc.js";import"../chunk-0qnz93q2.js";import"../chunk-ngxfwzq3.js";import"../chunk-w01y57f5.js";import"../chunk-x1hjv24z.js";import"../chunk-0g4gece6.js";import"../chunk-nap11ntr.js";import"../chunk-03c26pjz.js";import"../chunk-13yz561y.js";import"../chunk-nanw7yhz.js";import"../chunk-ghrx0hn1.js";import"../chunk-82t27pvd.js";import"../chunk-fhawx87n.js";import"../chunk-gc84b1d2.js";import"../chunk-yr1gdceh.js";import"../chunk-baa7h4yz.js";import"../chunk-kdxa9epn.js";import"../chunk-g2hekckm.js";import"../chunk-x39sfpvm.js";import"../chunk-tr0z0e1g.js";import"../chunk-4j188175.js";import"../chunk-eds0f8f1.js";import"../chunk-dyjnn5k8.js";import"../chunk-8fgwhhb8.js";import"../chunk-tj6zfxeb.js";import"../chunk-7xcfy2fn.js";import"../chunk-9yz5d003.js";import"../chunk-fms20x0n.js";import"../chunk-fe7r1mq1.js";import"../chunk-rb1e4cnb.js";import"../chunk-j4s5qwd7.js";import"../chunk-b0cyc09a.js";import"../chunk-0tatqxj2.js";import"../chunk-bykjk6vj.js";import"../chunk-7b0xdy5h.js";import"../chunk-ywkrxp2h.js";import"../chunk-y25pr13j.js";import"../chunk-q6h6yvzb.js";import"../chunk-qdc3aav1.js";import"../chunk-6wn85hn6.js";import"../chunk-qd5461tt.js";import"../chunk-77tga15w.js";import"../chunk-rv002yn0.js";import"../chunk-hke99a0v.js";import"../chunk-mwbng54r.js";import"../chunk-wxvyj65q.js";import"../chunk-yw2fzq86.js";import"../chunk-mrehzhxv.js";import"../chunk-1zgsgk4b.js";import"../chunk-48cw2nde.js";import"../chunk-jjvp4t5w.js";import"../chunk-94g3cahw.js";import"../chunk-ht4j68cs.js";import"../chunk-fch9tk1k.js";import"../chunk-cz25azze.js";import"../chunk-q60knhjf.js";import"../chunk-hrampcrj.js";import"../chunk-t37dp99j.js";import"../chunk-5kt3ay7x.js";import"../chunk-95w08s8v.js";import"../chunk-ceg2c2q2.js";import"../chunk-04mvcmcr.js";import"../chunk-n46a5g1g.js";import"../chunk-vv9wfz1c.js";import"../chunk-dzw95th7.js";import"../chunk-46mkpbkk.js";import"../chunk-3rh7va1z.js";import"../chunk-2xen423s.js";import"../chunk-cp3kwv17.js";import"../chunk-hpqr9e3x.js";import"../chunk-adqh2m9z.js";import"../chunk-8qbax8xn.js";import"../chunk-x64kb787.js";import"../chunk-gcf5v18y.js";import"../chunk-pc31m5x5.js";import"../chunk-3jm3snz8.js";export{ej as yellow,Aq as white,cj as watchStoryTests,gj as watchStoryFiles,yq as watchConfigFile,Bj as viewportAddon,mA as validateProps,yj as updateSnapshots,E as updateContextTree,D as updateContextStoryFiles,r as unregisterAddon,Qq as underline,ZB as toggleDarkMode,rj as style,Pz as storyCommands,Zj as stateAddon,_B as setTheme,rA as searchIndex,Iq as search,Sj as scanStoryFiles,jB as saveSnapshotVersion,iA as saveSearchIndex,hB as saveNavigationState,wj as runVisualTests,uj as runStoryTests,xz as runStoryCLI,oB as runScreenshotTests,lA as runInteractionTests,Cj as runA11yTests,qB as restoreSnapshotVersion,M as resolveStoryConfig,Rz as resetSetup,qA as renderTextareaControl,sz as renderTextControl,_z as renderStoryVariant,Zz as renderStoryComponent,zA as renderSliderControl,tz as renderSelectControl,ez as renderRadioControl,rz as renderNumberControl,AA as renderJsonControl,$z as renderInlineTemplate,BA as renderDateControl,nz as renderControl,jA as renderColorControl,oz as renderCheckboxControl,LA as renderButtonGroupControl,vz as registerStoryCommands,$j as registerBuiltinAddons,s as registerAddon,oj as red,LB as pruneSnapshotVersions,Az as profiler,Fq as printWarning,Uq as printTestSummary,Kq as printSuccess,Zq as printStoryCount,Yq as printServerUrls,Mq as printInfo,Wq as printHelp,_q as printFileChange,$q as printError,Oq as printBuildSummary,Xq as printBanner,Tz as previewCommand,kz as preview,Mz as preloadComponents,Yj as performanceAddon,wz as parseStoryFile,yz as parseStoryContent,SA as parseInteractionBlocks,yB as parseHash,Qj as outlineAddon,$A as openDesktopPreview,gq as notifyStoryUpdate,mq as notifyStoryRemove,hq as notifyStoryAdd,dq as notifyFullReload,cq as notifyError,uq as notifyConfigChange,Nj as measureAddon,qq as magenta,eA as loadSnapshotVersions,Uz as loadSetupFile,aA as loadSearchIndex,mB as loadNavigationState,QA as loadCrosswindCSS,JB as listSnapshotVersions,NB as lightTheme,Nq as italic,lj as isNonComponentFile,sA as isIndexStale,_A as isDesktopPreviewAvailable,YB as isDark,NA as isCrosswindAvailable,$B as initializeTheme,e as initializeAddons,wA as inferControl,vq as importSearchIndex,Xj as i18nAddon,RB as highlightCode,tj as green,Bq as gray,sq as getVariantSelectorStyles,nq as getVariantSelectorHtml,pA as getValidationStyles,uA as getValidationScript,zj as getToolbarItems,MB as getThemeToggleScript,WB as getThemeStyles,GB as getStoryCode,uB as getStatePersistenceScript,Hz as getState,tA as getSnapshotDir,eq as getShortcutsStyles,jz as getShortcutsScript,tq as getShortcutsModalHtml,Vz as getSetupHTML,kq as getSearchIndexSize,bq as getRecentSearches,HB as getPropsJson,rB as getPreviewStyles,Yz as getPresetsScript,Xz as getPresetsPanelStyles,Qz as getPresetsPanelHtml,Lz as getPerformanceScript,Jz as getPerformancePanelStyles,Bz as getPerformancePanelHtml,oA as getOrBuildSearchIndex,TB as getOpenInVSCodeScript,lB as getNavigationStyles,SB as getKeyboardNavigationScript,gA as getInteractionHelpersScript,iq as getHotSwapScript,aq as getHmrClientScript,VB as getHighlightStyles,Gz as getGlobalState,Ez as getGlobalScripts,Wz as getGlobalComponents,Dz as getGlobalCSS,RA as getErrorStyles,BB as getDiffStyles,KA as getDesktopPreviewStyles,FA as getDesktopPreviewButton,az as getDependencyGraphStyles,K as getDefaultStoryConfig,XB as getCurrentTheme,bB as getCopyCodeScript,xB as getControlsPanelStyles,JA as getControlStyles,Cq as getConfigModifiedTime,EB as getComponentSource,gz as getCompiledOutputStyles,hz as getCompiledOutputScript,Sz as getCompiledOutput,IB as getCodePanelStyles,pq as getClientCount,Kz as getCacheStats,xj as getBookmarksScript,vj as getBookmarksPanelStyles,Pj as getBookmarksPanelHtml,Mj as getAnalyticsStyles,Kj as getAnalyticsDashboardHtml,dz as getAllDependents,uz as getAllDependencies,o as getAddons,qj as getAddonPanels,t as getAddon,aB as generateZoomControls,tB as generateVisualTestReport,pB as generateViewportSelector,cA as generateValidationErrorsHTML,KB as generateThemeToggle,FB as generateThemeCSS,zB as generateTextDiff,dj as generateTestFile,fA as generateStorySource,bj as generateStoryForComponent,CA as generateStoryFileContent,MA as generateStoryDocs,Ij as generateStoryContent,gB as generateRecentList,cB as generatePreviewIframe,Oz as generatePreviewDocument,nB as generateOverlayButtons,ZA as generateOptimizedCSS,fB as generateHash,PA as generateFigmaPluginManifest,vA as generateFigmaImportCode,HA as generateErrorHTML,OA as generateDocsIndex,AB as generateDiffHTML,pz as generateDependencyGraphHTML,XA as generateCrosswindStyleTag,PB as generateControlsPanel,yA as generateControls,UA as generateComponentDocs,iz as generateComponentDetailHTML,WA as generateComponentCatalog,lz as generateCompiledOutputPanel,sB as generateComparisonView,DB as generateCodePanel,iB as generateBackgroundSelector,xA as generateAutoStory,vB as generateAutoPropsDisabled,dA as formatValidationResult,fj as formatTestResults,GA as formatStoryError,Hq as formatSize,oq as formatShortcutKey,hA as formatInteractionResults,Gq as formatDuration,ij as flattenTree,nj as findStoryInTree,fq as findConfigFile,kA as figmaColorToCss,YA as extractUsedClasses,Cz as extractTemplateContent,Dj as extractSlots,fz as extractScriptContent,Wj as extractProps,Rj as extractDirectives,Ej as extractDescription,Gj as extractDependencies,Hj as extractCssClasses,bA as exportToFigmaFile,IA as exportToFigma,OB as exportThemeTokensJSON,UB as exportThemeTokensCSS,Pq as exportSearchIndex,DA as exportDesignTokens,Lj as docsAddon,Lq as dim,Iz as devCommand,bz as dev,cz as detectCircularDependencies,F as defaultStoryConfig,rq as defaultShortcuts,$ as defaultResponsivePresets,_ as defaultBackgroundPresets,QB as darkTheme,zq as cyan,TA as cssColorToFigma,pj as createTreePath,mj as createStoryTests,hj as createStoryTestSuite,m as createStoryServer,EA as createStoryError,Eq as createSpinner,dB as createPreviewState,wB as createNavigationState,Sq as createHmrHandler,VA as createErrorBoundary,kB as createControlsPanelState,W as createContext,sj as color,Fz as clearStoryCache,Tq as clearSearchIndex,Dq as clearConsole,aj as buildTree,Rq as buildSearchIndex,nA as buildPersistedSearchIndex,mz as buildDependencyGraph,Vq as buildComponentSearchIndex,xq as buildCommand,wq as build,lq as broadcast,Jq as bold,jq as blue,Jj as backgroundsAddon,Vj as autoGenerateStories,Tj as autoGenerateCommand,jj as applyDecorators,Oj as analyzeComponentFile,Uj as analyzeComponent,CB as addToRecent,Aj as actionsAddon,_j as a11yAddon,zz as RenderTimer,Nz as PresetsManager,qz as PerformanceProfiler,kj as BookmarksManager,Fj as AnalyticsTracker};
|
|
1
|
+
export * from "./addons.js";
|
|
2
|
+
export * from "./analytics.js";
|
|
3
|
+
export * from "./auto-stories.js";
|
|
4
|
+
export * from "./bookmarks.js";
|
|
5
|
+
export * from "./bun-test.js";
|
|
6
|
+
export * from "./cli.js";
|
|
7
|
+
export * from "./collect/index.js";
|
|
8
|
+
export * from "./commands/index.js";
|
|
9
|
+
export * from "./compiled-output.js";
|
|
10
|
+
export * from "./composition.js";
|
|
11
|
+
export {
|
|
12
|
+
defaultBackgroundPresets,
|
|
13
|
+
defaultResponsivePresets,
|
|
14
|
+
defaultStoryConfig,
|
|
15
|
+
getDefaultStoryConfig,
|
|
16
|
+
resolveStoryConfig
|
|
17
|
+
} from "./config.js";
|
|
18
|
+
export * from "./config-watcher.js";
|
|
19
|
+
export {
|
|
20
|
+
createContext,
|
|
21
|
+
updateContextStoryFiles,
|
|
22
|
+
updateContextTree
|
|
23
|
+
} from "./context.js";
|
|
24
|
+
export * from "./controls/index.js";
|
|
25
|
+
export * from "./desktop-preview.js";
|
|
26
|
+
export * from "./docs-generator.js";
|
|
27
|
+
export * from "./errors.js";
|
|
28
|
+
export * from "./figma-export.js";
|
|
29
|
+
export * from "./generator.js";
|
|
30
|
+
export * from "./crosswind.js";
|
|
31
|
+
export * from "./hmr.js";
|
|
32
|
+
export * from "./hot-swap.js";
|
|
33
|
+
export * from "./interactions.js";
|
|
34
|
+
export * from "./keyboard-shortcuts.js";
|
|
35
|
+
export * from "./output.js";
|
|
36
|
+
export * from "./performance.js";
|
|
37
|
+
export * from "./presets.js";
|
|
38
|
+
export * from "./props-validation.js";
|
|
39
|
+
export * from "./renderer.js";
|
|
40
|
+
export * from "./search.js";
|
|
41
|
+
export * from "./search-index.js";
|
|
42
|
+
export { createStoryServer } from "./server.js";
|
|
43
|
+
export * from "./setup.js";
|
|
44
|
+
export * from "./snapshots.js";
|
|
45
|
+
export * from "./testing.js";
|
|
46
|
+
export * from "./theme.js";
|
|
47
|
+
export * from "./types.js";
|
|
48
|
+
export * from "./ui/index.js";
|
|
49
|
+
export * from "./visual-testing.js";
|