@stacksjs/stx 0.2.94 → 0.2.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/a11y.js +598 -2
- package/dist/analytics.js +159 -2
- package/dist/analyzer.js +240 -2
- package/dist/animation.js +688 -2
- package/dist/app-shell.js +220 -2
- package/dist/app.js +79 -2
- package/dist/assets.js +155 -2
- package/dist/ast.js +630 -2
- package/dist/async-components.js +428 -2
- package/dist/auth.js +12 -2
- package/dist/broadcasting.js +102 -2
- package/dist/browser-composables.js +565 -2
- package/dist/build-assets.js +29 -2
- package/dist/build-mode-detector.js +50 -2
- package/dist/build-optimizer.js +433 -2
- package/dist/build-views.js +180 -2
- package/dist/build.js +33 -2
- package/dist/builtins/drawer.js +37 -2
- package/dist/builtins/escape.js +3 -2
- package/dist/builtins/icon.js +83 -2
- package/dist/builtins/index.js +34 -2
- package/dist/builtins/modal.js +38 -2
- package/dist/builtins/safe-image.js +51 -2
- package/dist/builtins/stx-image.js +200 -2
- package/dist/builtins/stx-link.js +41 -2
- package/dist/builtins/stx-loading-indicator.js +35 -2
- package/dist/builtins/suspense.js +24 -2
- package/dist/builtins/toast.js +42 -2
- package/dist/builtins/tooltip.js +106 -2
- package/dist/builtins/transition-group.js +22 -2
- package/dist/bundle-analyzer/collector.js +233 -2
- package/dist/bundle-analyzer/index.js +82 -2
- package/dist/bundle-analyzer/report.js +318 -2
- package/dist/bundle-analyzer/treemap.js +594 -2
- package/dist/caching.js +131 -2
- package/dist/cli.js +11317 -10982
- package/dist/client/directive.js +14 -2
- package/dist/client/index.js +2 -2
- package/dist/client-helpers.js +312 -2
- package/dist/client-script-bundler.js +216 -6
- package/dist/client-script.js +754 -2
- package/dist/client.js +73 -4
- package/dist/component-hmr.js +585 -2
- package/dist/component-library.d.ts +6 -0
- package/dist/component-library.js +683 -0
- package/dist/component-processing.js +613 -2
- package/dist/component-registry.js +90 -2
- package/dist/component-renderer.js +660 -2
- package/dist/components.js +213 -2
- package/dist/composables/index.js +220 -2
- package/dist/composables/use-battery.js +101 -2
- package/dist/composables/use-broadcast-channel.js +80 -2
- package/dist/composables/use-channel.js +124 -2
- package/dist/composables/use-clipboard.js +79 -2
- package/dist/composables/use-color-mode.js +131 -2
- package/dist/composables/use-cookie.js +86 -2
- package/dist/composables/use-device-orientation.js +181 -2
- package/dist/composables/use-event-listener.js +27 -2
- package/dist/composables/use-event-source.js +166 -2
- package/dist/composables/use-eye-dropper.js +142 -2
- package/dist/composables/use-fetch.js +223 -2
- package/dist/composables/use-fullscreen.js +110 -2
- package/dist/composables/use-geolocation.js +101 -2
- package/dist/composables/use-idle.js +182 -2
- package/dist/composables/use-intersection-observer.js +168 -2
- package/dist/composables/use-keyboard.js +224 -2
- package/dist/composables/use-media-query.js +62 -2
- package/dist/composables/use-meta.js +48 -2
- package/dist/composables/use-mouse.js +286 -2
- package/dist/composables/use-mutation-observer.js +129 -2
- package/dist/composables/use-network.js +85 -2
- package/dist/composables/use-notification.js +94 -2
- package/dist/composables/use-permissions.js +132 -2
- package/dist/composables/use-query.js +0 -1
- package/dist/composables/use-resize-observer.js +157 -2
- package/dist/composables/use-router.js +51 -2
- package/dist/composables/use-share.js +104 -2
- package/dist/composables/use-speech.js +294 -2
- package/dist/composables/use-storage.js +130 -2
- package/dist/composables/use-text-selection.js +205 -4
- package/dist/composables/use-timer.js +183 -2
- package/dist/composables/use-utilities.js +176 -2
- package/dist/composables/use-wake-lock.js +122 -2
- package/dist/composables/use-websocket.js +165 -2
- package/dist/composables/use-window.js +163 -2
- package/dist/composables.js +552 -2
- package/dist/composition-api.js +190 -2
- package/dist/computed.js +376 -8
- package/dist/conditionals.js +599 -2
- package/dist/config.js +751 -2
- package/dist/craft-bridge.js +432 -2
- package/dist/craft-compiler.js +810 -2
- package/dist/craft-components.js +945 -2
- package/dist/craft-entry.js +5 -2
- package/dist/craft-ssr.js +559 -2
- package/dist/csp.js +220 -2
- package/dist/csrf.js +38 -2
- package/dist/custom-directives.js +136 -2
- package/dist/defer.js +156 -2
- package/dist/deploy/config-generators.js +214 -2
- package/dist/deploy/index.js +203 -2
- package/dist/deploy/netlify.js +167 -2
- package/dist/dev-server/crosswind.js +379 -2
- package/dist/dev-server/index.js +7 -2
- package/dist/dev-server/keyboard-shortcuts.js +81 -2
- package/dist/dev-server/native-window.js +91 -2
- package/dist/dev-server/port-utils.js +40 -2
- package/dist/dev-server/serve-app.js +682 -7
- package/dist/dev-server/serve-file.js +439 -7
- package/dist/dev-server/serve-markdown.js +281 -2
- package/dist/dev-server/serve-multi.js +424 -17
- package/dist/dev-server/terminal-colors.js +45 -2
- package/dist/dev-server/theme-selector.js +111 -2
- package/dist/dev-server/types.js +43 -2
- package/dist/dev-server.js +4 -2
- package/dist/devtools.js +462 -18
- package/dist/directive-api.js +355 -2
- package/dist/docs.js +567 -2
- package/dist/doctor.js +123 -2
- package/dist/document-shell.js +105 -2
- package/dist/dynamic-components.js +78 -2
- package/dist/edge-runtime.js +539 -2
- package/dist/env.js +9 -2
- package/dist/error-boundaries.js +62 -12
- package/dist/error-handling.js +1 -2
- package/dist/errors/codes.js +97 -2
- package/dist/errors/formatter.js +196 -2
- package/dist/errors/index.js +44 -2
- package/dist/errors/logger.js +250 -2
- package/dist/errors/sanitizer.js +181 -2
- package/dist/errors/types.js +86 -2
- package/dist/events.js +382 -2
- package/dist/expressions.js +650 -2
- package/dist/formatter.js +265 -2
- package/dist/forms-validation.js +510 -4
- package/dist/forms.js +709 -2
- package/dist/head.js +224 -2
- package/dist/heatmap.js +566 -2
- package/dist/hot-reload.js +367 -2
- package/dist/html-masking.js +73 -2
- package/dist/hydration-runtime.js +195 -2
- package/dist/hydration.js +654 -2
- package/dist/i18n.js +633 -2
- package/dist/image-optimization/auto-sibling.js +88 -2
- package/dist/image-optimization/build-plugin.js +241 -2
- package/dist/image-optimization/component.js +244 -2
- package/dist/image-optimization/directive.js +203 -2
- package/dist/image-optimization/index.js +54 -2
- package/dist/image-optimization/processor.js +262 -2
- package/dist/image-optimization/serve.js +102 -2
- package/dist/includes.js +733 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +134 -2
- package/dist/init.js +505 -2
- package/dist/inline-assets.js +82 -2
- package/dist/interactive.js +383 -2
- package/dist/internal-markdown.js +141 -2
- package/dist/island-chunking.js +52 -2
- package/dist/js-ts.js +57 -2
- package/dist/jsx-runtime.js +289 -2
- package/dist/keep-alive.js +421 -2
- package/dist/lazy-loader.js +245 -2
- package/dist/loading-indicator.js +322 -2
- package/dist/loops.js +643 -2
- package/dist/manifest.js +31 -2
- package/dist/markdown.js +68 -2
- package/dist/media/client/blur-up.js +217 -2
- package/dist/media/client/index.js +53 -2
- package/dist/media/client/lazy-load.js +283 -2
- package/dist/media/client/upload-handler.js +354 -2
- package/dist/media/image/component.js +574 -2
- package/dist/media/image/directive.js +160 -2
- package/dist/media/image/editing.js +193 -2
- package/dist/media/image/index.js +80 -2
- package/dist/media/image/placeholder.js +188 -2
- package/dist/media/image/processor/cache.js +51 -2
- package/dist/media/image/processor/index.js +3 -2
- package/dist/media/image/processor/optimizer.js +202 -2
- package/dist/media/image/processor/responsive.js +162 -2
- package/dist/media/image/srcset.js +194 -2
- package/dist/media/index.js +198 -2
- package/dist/media/manager/embed.js +253 -2
- package/dist/media/protected/component.js +235 -2
- package/dist/media/protected/index.js +20 -2
- package/dist/media/protected/signature.js +205 -2
- package/dist/media/shared/cache.js +132 -2
- package/dist/media/shared/hash.js +35 -2
- package/dist/media/shared/index.js +2 -2
- package/dist/media/types.js +0 -1
- package/dist/media/upload/component.js +320 -2
- package/dist/media/upload/index.js +1 -2
- package/dist/media/video/directive.js +142 -2
- package/dist/media/video/index.js +583 -2
- package/dist/media/video/processor/cache.js +52 -2
- package/dist/media/video/processor/index.js +4 -2
- package/dist/media/video/processor/streaming.js +197 -2
- package/dist/media/video/processor/thumbnail.js +134 -2
- package/dist/media/video/processor/transcoder.js +283 -2
- package/dist/method-spoofing.js +17 -2
- package/dist/middleware.js +40 -2
- package/dist/misc-directives.js +222 -2
- package/dist/native-build.js +511 -2
- package/dist/parser/directive-parser.js +239 -2
- package/dist/parser/expression-parser.js +358 -2
- package/dist/parser/index.js +23 -2
- package/dist/parser/tokenizer.js +534 -2
- package/dist/partial-hydration.js +427 -2
- package/dist/performance-utils.js +430 -2
- package/dist/placeholder.js +35 -2
- package/dist/plugin-system.js +214 -2
- package/dist/plugin.js +173 -2
- package/dist/precompiler.js +660 -81
- package/dist/process.js +711 -2
- package/dist/production-build.js +596 -2
- package/dist/production-builder.js +132 -2
- package/dist/production-server.js +188 -2
- package/dist/props.js +224 -2
- package/dist/public-env.js +19 -2
- package/dist/pwa/audit.js +255 -2
- package/dist/pwa/directives.js +332 -2
- package/dist/pwa/icons.js +109 -2
- package/dist/pwa/index.js +47 -2
- package/dist/pwa/inject.js +102 -2
- package/dist/pwa/manifest.js +186 -2
- package/dist/pwa/offline.js +259 -2
- package/dist/pwa/precache.js +116 -2
- package/dist/pwa/service-worker.js +860 -2
- package/dist/pwa/workbox-strategies.js +167 -2
- package/dist/pwa/workbox.js +382 -2
- package/dist/pwa.js +427 -427
- package/dist/reactive-bindings.js +266 -2
- package/dist/reactive.js +569 -2
- package/dist/reactivity.js +559 -2
- package/dist/release.js +1 -2
- package/dist/render.js +165 -2
- package/dist/route-middleware.js +17 -2
- package/dist/router.js +9 -2
- package/dist/routes.js +14 -2
- package/dist/runtime-injection.js +120 -2
- package/dist/runtime.js +94 -2
- package/dist/safe-evaluator.js +444 -2
- package/dist/scaffolding.js +897 -2
- package/dist/screenshot.js +87 -2
- package/dist/script-classifier.js +32 -2
- package/dist/script-validation.js +158 -2
- package/dist/seo.js +457 -2
- package/dist/serve.js +237 -2
- package/dist/server-bindings.js +108 -2
- package/dist/server-components.js +338 -11
- package/dist/signal-processing.js +946 -2
- package/dist/signals-api.js +154 -2
- package/dist/signals.js +5287 -2
- package/dist/site-builder/build.js +224 -2
- package/dist/site-builder/i18n.js +140 -2
- package/dist/site-builder/index.js +15 -2
- package/dist/site-builder/robots.js +26 -2
- package/dist/site-builder/router.js +27 -2
- package/dist/site-builder/seo.js +36 -2
- package/dist/site-builder/sitemap.js +26 -2
- package/dist/site-builder/theme.js +33 -2
- package/dist/site-builder/types.js +0 -1
- package/dist/slots.js +201 -2
- package/dist/source-maps.js +350 -2
- package/dist/spa-shell.js +34 -2
- package/dist/ssg.js +389 -389
- package/dist/ssr.js +355 -2
- package/dist/state-management.js +533 -2
- package/dist/store-imports.js +13 -2
- package/dist/store-loader.js +72 -5
- package/dist/stores-client.js +132 -2
- package/dist/story/addons.js +261 -2
- package/dist/story/analytics.js +235 -2
- package/dist/story/auto-stories.js +158 -2
- package/dist/story/bookmarks.js +277 -2
- package/dist/story/bun-test.js +102 -2
- package/dist/story/cli.js +155 -2
- package/dist/story/collect/analyzer.js +305 -2
- package/dist/story/collect/index.js +27 -2
- package/dist/story/collect/parser.js +129 -2
- package/dist/story/collect/scanner.js +101 -2
- package/dist/story/collect/tree.js +110 -2
- package/dist/story/commands/build.js +172 -2
- package/dist/story/commands/dev.js +78 -2
- package/dist/story/commands/index.js +3 -2
- package/dist/story/commands/preview.js +56 -2
- package/dist/story/compiled-output.js +151 -2
- package/dist/story/composition.js +261 -2
- package/dist/story/config-watcher.js +67 -2
- package/dist/story/config.js +64 -2
- package/dist/story/context.js +27 -2
- package/dist/story/controls/index.js +320 -2
- package/dist/story/crosswind.js +189 -2
- package/dist/story/desktop-preview.js +105 -2
- package/dist/story/docs-generator.js +186 -2
- package/dist/story/errors.js +239 -2
- package/dist/story/figma-export.js +224 -2
- package/dist/story/generator.js +165 -2
- package/dist/story/hmr.js +131 -2
- package/dist/story/hot-swap.js +207 -2
- package/dist/story/index.js +49 -2
- package/dist/story/interactions.js +225 -2
- package/dist/story/keyboard-shortcuts.js +345 -2
- package/dist/story/output.js +153 -2
- package/dist/story/performance.js +252 -2
- package/dist/story/presets.js +289 -2
- package/dist/story/props-validation.js +215 -2
- package/dist/story/renderer.js +209 -2
- package/dist/story/search-index.js +106 -2
- package/dist/story/search.js +140 -2
- package/dist/story/server.js +965 -2
- package/dist/story/setup.js +78 -2
- package/dist/story/snapshots.js +170 -2
- package/dist/story/testing.js +163 -2
- package/dist/story/theme.js +170 -2
- package/dist/story/types.js +0 -2
- package/dist/story/ui/code-panel.js +175 -2
- package/dist/story/ui/controls-panel.js +168 -2
- package/dist/story/ui/index.js +4 -2
- package/dist/story/ui/navigation.js +250 -2
- package/dist/story/ui/preview.js +251 -2
- package/dist/story/visual-testing.js +247 -2
- package/dist/streaming.js +537 -2
- package/dist/strict-lint.js +288 -2
- package/dist/style-scoping.js +50 -2
- package/dist/suspense.js +398 -2
- package/dist/teleport.js +109 -2
- package/dist/template-compiler.js +63 -2
- package/dist/template-hydrator.js +82 -2
- package/dist/template-tag-balance.js +93 -2
- package/dist/testing.js +581 -2
- package/dist/transitions.js +443 -2
- package/dist/type-checker.js +581 -2
- package/dist/types/component-types.d.ts +54 -0
- package/dist/types/component-types.js +0 -1
- package/dist/types/config-types.js +0 -1
- package/dist/types/context-types.js +0 -1
- package/dist/types/csp-types.js +0 -1
- package/dist/types/directive-types.js +3 -2
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.js +1 -2
- package/dist/types/pwa-types.js +0 -1
- package/dist/types.js +1 -2
- package/dist/typescript-templates.js +386 -4
- package/dist/utils.js +942 -2
- package/dist/validator.js +171 -2
- package/dist/variable-extractor.js +1094 -2
- package/dist/view-composers.js +29 -2
- package/dist/virtual-scrolling.js +454 -2
- package/dist/visual-editor.js +688 -28
- package/dist/vue-template.js +475 -2
- package/dist/web-components/css-scoping.js +177 -2
- package/dist/web-components/index.js +13 -2
- package/dist/web-components/reactive-generator.js +121 -56
- package/dist/web-components.js +1447 -2
- package/dist/x-element.js +17 -5
- package/package.json +6 -7
- package/dist/chunk-03c26pjz.js +0 -3
- package/dist/chunk-04mvcmcr.js +0 -106
- package/dist/chunk-05hgyyqc.js +0 -4
- package/dist/chunk-095s3972.js +0 -99
- package/dist/chunk-0b9w2w1y.js +0 -1
- package/dist/chunk-0dz85jrp.js +0 -3
- package/dist/chunk-0g4gece6.js +0 -4
- package/dist/chunk-0jd0pndq.js +0 -3
- package/dist/chunk-0jkwrcwj.js +0 -3
- package/dist/chunk-0m9tdm7t.js +0 -71
- package/dist/chunk-0qakwen3.js +0 -1
- package/dist/chunk-0qnz93q2.js +0 -3
- package/dist/chunk-0tatqxj2.js +0 -57
- package/dist/chunk-0wdar532.js +0 -102
- package/dist/chunk-13yz561y.js +0 -3
- package/dist/chunk-174z0cd0.js +0 -3
- package/dist/chunk-1mmykse5.js +0 -81
- package/dist/chunk-1z2yq9em.js +0 -3
- package/dist/chunk-1z5nhbjt.js +0 -90
- package/dist/chunk-1zgsgk4b.js +0 -1
- package/dist/chunk-25s7bckb.js +0 -171
- package/dist/chunk-268adc7r.js +0 -2230
- package/dist/chunk-26r6zh3t.js +0 -194
- package/dist/chunk-2w3302dh.js +0 -3
- package/dist/chunk-2xen423s.js +0 -3
- package/dist/chunk-39gm08bn.js +0 -39
- package/dist/chunk-3bjtemm6.js +0 -128
- package/dist/chunk-3jm3snz8.js +0 -3
- package/dist/chunk-3ngm57nt.js +0 -12
- package/dist/chunk-3rh7va1z.js +0 -3
- package/dist/chunk-3yg9hbmb.js +0 -4
- package/dist/chunk-44hd3kab.js +0 -1
- package/dist/chunk-46mkpbkk.js +0 -12
- package/dist/chunk-48cw2nde.js +0 -2
- package/dist/chunk-48r3qe0k.js +0 -3
- package/dist/chunk-4aj7ftqb.js +0 -1
- package/dist/chunk-4bt81cg3.js +0 -61
- package/dist/chunk-4j188175.js +0 -3
- package/dist/chunk-4k7d8p8d.js +0 -188
- package/dist/chunk-4qq8ffke.js +0 -28
- package/dist/chunk-50vqeesm.js +0 -142
- package/dist/chunk-52agge4n.js +0 -38
- package/dist/chunk-55yp0q8t.js +0 -201
- package/dist/chunk-57p201gb.js +0 -83
- package/dist/chunk-5ggw1dyv.js +0 -3
- package/dist/chunk-5kt3ay7x.js +0 -10
- package/dist/chunk-5p568px4.js +0 -1166
- package/dist/chunk-5ppkfyn2.js +0 -3
- package/dist/chunk-5q87fgkk.js +0 -3
- package/dist/chunk-5qb761h2.js +0 -3
- package/dist/chunk-5xvbq2gs.js +0 -30
- package/dist/chunk-647849kf.js +0 -34
- package/dist/chunk-6b5k6w2q.js +0 -7
- package/dist/chunk-6cr3eeh4.js +0 -23
- package/dist/chunk-6djgb0hr.js +0 -3
- package/dist/chunk-6dqzky7x.js +0 -35
- package/dist/chunk-6e4c6g46.js +0 -3
- package/dist/chunk-6w03t7h6.js +0 -3
- package/dist/chunk-6wn85hn6.js +0 -4
- package/dist/chunk-6y4gqs1q.js +0 -169
- package/dist/chunk-75rndzbd.js +0 -6
- package/dist/chunk-77tga15w.js +0 -3
- package/dist/chunk-7a51hkpf.js +0 -3
- package/dist/chunk-7b0xdy5h.js +0 -386
- package/dist/chunk-7cgmq685.js +0 -33
- package/dist/chunk-7dy588as.js +0 -6
- package/dist/chunk-7rvh2wwv.js +0 -721
- package/dist/chunk-7sm05m0j.js +0 -351
- package/dist/chunk-7sqdeqsw.js +0 -1
- package/dist/chunk-7xcfy2fn.js +0 -4
- package/dist/chunk-82t27pvd.js +0 -5
- package/dist/chunk-87kx8byz.js +0 -1115
- package/dist/chunk-8fgwhhb8.js +0 -6
- package/dist/chunk-8qbax8xn.js +0 -347
- package/dist/chunk-91s2hres.js +0 -8
- package/dist/chunk-94g3cahw.js +0 -11
- package/dist/chunk-957amb71.js +0 -8
- package/dist/chunk-95w08s8v.js +0 -3
- package/dist/chunk-9agvhp1x.js +0 -93
- package/dist/chunk-9tmbrwwx.js +0 -219
- package/dist/chunk-9yz5d003.js +0 -51
- package/dist/chunk-a3hyn4we.js +0 -79
- package/dist/chunk-a69tvya5.js +0 -53
- package/dist/chunk-adjcg6wa.js +0 -498
- package/dist/chunk-adqh2m9z.js +0 -45
- package/dist/chunk-asarebzq.js +0 -292
- package/dist/chunk-aw3rp9ac.js +0 -24
- package/dist/chunk-b0cyc09a.js +0 -109
- package/dist/chunk-b3kkjcdh.js +0 -3
- package/dist/chunk-b3prs7y0.js +0 -5
- package/dist/chunk-b5zc9y0y.js +0 -90
- package/dist/chunk-baa7h4yz.js +0 -3
- package/dist/chunk-bgec9r1v.js +0 -5224
- package/dist/chunk-bjnjpsgn.js +0 -3
- package/dist/chunk-bk8ew8ze.js +0 -24
- package/dist/chunk-bn08k7yy.js +0 -3
- package/dist/chunk-bpgg59wa.js +0 -3
- package/dist/chunk-bwxda6n1.js +0 -3
- package/dist/chunk-bykjk6vj.js +0 -4
- package/dist/chunk-c53hyw5c.js +0 -477
- package/dist/chunk-c7jg8w13.js +0 -3
- package/dist/chunk-ca6qd1dx.js +0 -3
- package/dist/chunk-cdbwprfv.js +0 -6
- package/dist/chunk-ceg2c2q2.js +0 -11
- package/dist/chunk-cn409b69.js +0 -3
- package/dist/chunk-cn8az1b4.js +0 -1
- package/dist/chunk-cp3kwv17.js +0 -8
- package/dist/chunk-cpcc11vp.js +0 -5
- package/dist/chunk-cr3wbrcr.js +0 -10
- package/dist/chunk-cygfdk1n.js +0 -3
- package/dist/chunk-cyp4m0vh.js +0 -16
- package/dist/chunk-cz25azze.js +0 -4
- package/dist/chunk-d77yxcds.js +0 -3
- package/dist/chunk-dvfs1h3c.js +0 -117
- package/dist/chunk-dyjnn5k8.js +0 -262
- package/dist/chunk-dzw95th7.js +0 -3
- package/dist/chunk-e0zytzdh.js +0 -179
- package/dist/chunk-e53h9qhd.js +0 -84
- package/dist/chunk-eds0f8f1.js +0 -3
- package/dist/chunk-eh8hact1.js +0 -5
- package/dist/chunk-epj957jf.js +0 -4
- package/dist/chunk-eqeyaq6g.js +0 -77
- package/dist/chunk-fbxt2mrx.js +0 -5
- package/dist/chunk-fch9tk1k.js +0 -3
- package/dist/chunk-fe7r1mq1.js +0 -9
- package/dist/chunk-fhawx87n.js +0 -8
- package/dist/chunk-fk51yyrw.js +0 -3
- package/dist/chunk-fms20x0n.js +0 -21
- package/dist/chunk-fs0qezn5.js +0 -341
- package/dist/chunk-fzm3y0r3.js +0 -267
- package/dist/chunk-g2hekckm.js +0 -161
- package/dist/chunk-g4ps1dj8.js +0 -140
- package/dist/chunk-g8b81pzc.js +0 -3
- package/dist/chunk-ganag9dm.js +0 -3
- package/dist/chunk-gc84b1d2.js +0 -58
- package/dist/chunk-gcf5v18y.js +0 -60
- package/dist/chunk-ghrx0hn1.js +0 -4
- package/dist/chunk-gqpkp459.js +0 -3
- package/dist/chunk-h45py5w5.js +0 -2
- package/dist/chunk-h5wa62ek.js +0 -145
- package/dist/chunk-h82kjdr4.js +0 -83
- package/dist/chunk-haecq01c.js +0 -3
- package/dist/chunk-hepg894w.js +0 -3
- package/dist/chunk-hjdc99kb.js +0 -3
- package/dist/chunk-hje9v2zh.js +0 -3
- package/dist/chunk-hjv76kcw.js +0 -1
- package/dist/chunk-hke99a0v.js +0 -3
- package/dist/chunk-hpqr9e3x.js +0 -3
- package/dist/chunk-hq5cem49.js +0 -236
- package/dist/chunk-hrampcrj.js +0 -3
- package/dist/chunk-ht4j68cs.js +0 -3
- package/dist/chunk-hxx3za24.js +0 -62
- package/dist/chunk-j4s5qwd7.js +0 -4
- package/dist/chunk-jbejwejg.js +0 -8
- package/dist/chunk-jc0fc4ht.js +0 -11
- package/dist/chunk-jcs0ymw7.js +0 -3
- package/dist/chunk-jfm69keq.js +0 -231
- package/dist/chunk-jfrn43vh.js +0 -2
- package/dist/chunk-jjamhxpm.js +0 -139
- package/dist/chunk-jjvp4t5w.js +0 -27
- package/dist/chunk-jt44av4j.js +0 -3
- package/dist/chunk-jt98jhpt.js +0 -10
- package/dist/chunk-k8440jxh.js +0 -6
- package/dist/chunk-kdxa9epn.js +0 -21
- package/dist/chunk-kfd2hf6f.js +0 -3
- package/dist/chunk-kgym7ch9.js +0 -8
- package/dist/chunk-kh6rfz2v.js +0 -4
- package/dist/chunk-kkp6rs2n.js +0 -36
- package/dist/chunk-ktkmvaa8.js +0 -1
- package/dist/chunk-m59y310j.js +0 -3
- package/dist/chunk-mgmyr1b9.js +0 -6
- package/dist/chunk-mqwbpamc.js +0 -3
- package/dist/chunk-mrehzhxv.js +0 -5
- package/dist/chunk-mv03qb75.js +0 -3
- package/dist/chunk-mv4fb50w.js +0 -1
- package/dist/chunk-mwbng54r.js +0 -2
- package/dist/chunk-n46a5g1g.js +0 -3
- package/dist/chunk-n944baxp.js +0 -3
- package/dist/chunk-nanw7yhz.js +0 -14
- package/dist/chunk-nap11ntr.js +0 -21
- package/dist/chunk-ncnfa8ae.js +0 -29
- package/dist/chunk-ngxfwzq3.js +0 -3
- package/dist/chunk-nvwb4x04.js +0 -3
- package/dist/chunk-nw34xajc.js +0 -8
- package/dist/chunk-payfb24w.js +0 -207
- package/dist/chunk-pc31m5x5.js +0 -398
- package/dist/chunk-pg1fvqb9.js +0 -167
- package/dist/chunk-q60knhjf.js +0 -3
- package/dist/chunk-q6h6yvzb.js +0 -10
- package/dist/chunk-qd5461tt.js +0 -3
- package/dist/chunk-qdc3aav1.js +0 -3
- package/dist/chunk-qfwzdffx.js +0 -3
- package/dist/chunk-qgxwmagw.js +0 -134
- package/dist/chunk-qhdtssn1.js +0 -19
- package/dist/chunk-qk584whs.js +0 -3
- package/dist/chunk-qm4yppj5.js +0 -57
- package/dist/chunk-qwyd9a1d.js +0 -2
- package/dist/chunk-qxs6et76.js +0 -196
- package/dist/chunk-rb1e4cnb.js +0 -3
- package/dist/chunk-rh80q1nd.js +0 -1
- package/dist/chunk-rkffm9sy.js +0 -128
- package/dist/chunk-rv002yn0.js +0 -14
- package/dist/chunk-s6ja2bdg.js +0 -66
- package/dist/chunk-sjagg9qz.js +0 -66
- package/dist/chunk-sn07azv3.js +0 -3
- package/dist/chunk-svahbw0w.js +0 -12
- package/dist/chunk-svhtdb0s.js +0 -6
- package/dist/chunk-t37dp99j.js +0 -3
- package/dist/chunk-tj6zfxeb.js +0 -64
- package/dist/chunk-tmgz5t2g.js +0 -3
- package/dist/chunk-tr0z0e1g.js +0 -3
- package/dist/chunk-tx6br9r4.js +0 -274
- package/dist/chunk-v97390pe.js +0 -1
- package/dist/chunk-vcr5pzpx.js +0 -233
- package/dist/chunk-vdfwv0fp.js +0 -6
- package/dist/chunk-vp2395eb.js +0 -3
- package/dist/chunk-vpe6napb.js +0 -28
- package/dist/chunk-vv9wfz1c.js +0 -12
- package/dist/chunk-vw6ejgmy.js +0 -21
- package/dist/chunk-vx22he47.js +0 -1
- package/dist/chunk-w01y57f5.js +0 -1539
- package/dist/chunk-w21mwxdd.js +0 -4
- package/dist/chunk-w4n8fqp7.js +0 -216
- package/dist/chunk-w959hm8j.js +0 -358
- package/dist/chunk-wf7zrjsw.js +0 -138
- package/dist/chunk-wk07pwtd.js +0 -321
- package/dist/chunk-wvef3ngh.js +0 -127
- package/dist/chunk-wxvyj65q.js +0 -2
- package/dist/chunk-x1hjv24z.js +0 -11
- package/dist/chunk-x39sfpvm.js +0 -302
- package/dist/chunk-x4fze3q2.js +0 -314
- package/dist/chunk-x64kb787.js +0 -15
- package/dist/chunk-xcb0pbr6.js +0 -4
- package/dist/chunk-xhkjhxsp.js +0 -3
- package/dist/chunk-xhnpsngj.js +0 -5
- package/dist/chunk-xsqbk4yk.js +0 -3
- package/dist/chunk-xygc53vr.js +0 -68
- package/dist/chunk-y0qg6rrv.js +0 -3
- package/dist/chunk-y25pr13j.js +0 -19
- package/dist/chunk-y4c744dk.js +0 -3
- package/dist/chunk-y4md9hp0.js +0 -3
- package/dist/chunk-y5wazw6j.js +0 -7
- package/dist/chunk-y5xz0jc4.js +0 -141
- package/dist/chunk-y86m1wr4.js +0 -4
- package/dist/chunk-yaan98dd.js +0 -3
- package/dist/chunk-yach037f.js +0 -32
- package/dist/chunk-yexjrg9d.js +0 -7
- package/dist/chunk-ygvyc6wv.js +0 -90
- package/dist/chunk-yj560gp8.js +0 -8
- package/dist/chunk-yn38c15w.js +0 -4
- package/dist/chunk-yr1gdceh.js +0 -3
- package/dist/chunk-yw2fzq86.js +0 -3
- package/dist/chunk-ywkrxp2h.js +0 -147
- package/dist/chunk-z37xq5rx.js +0 -3
- package/dist/chunk-z4djtgt0.js +0 -71
- package/dist/chunk-z8cjr9n9.js +0 -7
- package/dist/chunk-znxp3zha.js +0 -71
- package/dist/chunk-zt2yag10.js +0 -429
package/dist/chunk-26r6zh3t.js
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ls as H,Rr as g,Vs as x,ur as O}from"./chunk-w01y57f5.js";import{et as R}from"./chunk-nap11ntr.js";import b from"path";var v={enabled:!0,bufferSize:16384,strategy:"auto",timeout:30000},M=/<!-- @section:([\w-]+) -->([\s\S]*?)<!-- @endsection:\1 -->/g;var T=/<!-- @suspense:([\w-]+) -->([\s\S]*?)<!-- @endsuspense:\1 -->/g;function f(q){let B=[],Q=0,G;T.lastIndex=0;while((G=T.exec(q))!==null){if(G.index>Q){let X=q.slice(Q,G.index);if(X.trim())B.push({type:B.length===0?"shell":"content",content:X})}let J=G[1],K=G[2];B.push({type:"suspense",name:J,content:K}),Q=G.index+G[0].length}if(Q<q.length){let J=q.slice(Q);if(J.trim())B.push({type:B.length===0?"shell":"content",content:J})}if(B.length===0)B.push({type:"shell",content:q});return B}async function r(q,B={},Q={}){let G={...g,...Q,streaming:{...v,...Q.streaming}},J=G.streaming?.bufferSize||16384;return new ReadableStream({async start(K){try{let X=await Bun.file(q).text(),z=X.match(/<script\b[^>]*\bserver\b[^>]*>([\s\S]*?)<\/script>/i),L=z?z[1]:"",Y=X.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),j={...B,__filename:q,__dirname:b.dirname(q)};if(L.trim())await R(L,j,q);let D=f(Y),$=new Set;if(!D.some((w)=>w.type==="suspense")){let w=G.streaming?.strategy||"auto",U=new RegExp(M.source,"g");if(!(w!=="manual"&&U.test(Y))){let F=await H(Y,j,q,G,$);for(let V=0;V<F.length;V+=J)K.enqueue(F.slice(V,V+J)),await new Promise((W)=>setTimeout(W,0))}else{let F=[],V=new RegExp(M.source,"g"),W;while((W=V.exec(Y))!==null)F.push({name:W[1],content:W[2],start:W.index,end:W.index+W[0].length});let y=0;for(let A of F){if(A.start>y){let k=Y.slice(y,A.start);if(k.trim()){let E=await H(k,j,q,G,$);K.enqueue(E),await new Promise((S)=>setTimeout(S,0))}}let I=await H(A.content,j,q,G,$);K.enqueue(I),await new Promise((k)=>setTimeout(k,0)),y=A.end}if(y<Y.length){let A=Y.slice(y);if(A.trim()){let I=await H(A,j,q,G,$);K.enqueue(I)}}}}else{let w=new Map;for(let Z of D)if(Z.type==="shell"||Z.type==="content"){let F=await H(Z.content,j,q,G,$);K.enqueue(F)}else if(Z.type==="suspense"&&Z.name){let F=`stx-suspense-${Z.name}`;K.enqueue(`<div id="${F}" data-suspense="${Z.name}" style="display:contents;">
|
|
3
|
-
<template data-suspense-fallback>Loading...</template>
|
|
4
|
-
</div>`),w.set(Z.name,H(Z.content,j,q,G,$))}K.enqueue(`
|
|
5
|
-
<script>
|
|
6
|
-
(function() {
|
|
7
|
-
window.__stxSuspense = window.__stxSuspense || {
|
|
8
|
-
resolve: function(name, content) {
|
|
9
|
-
var el = document.querySelector('[data-suspense="' + name + '"]');
|
|
10
|
-
if (el) {
|
|
11
|
-
// Create a template to parse the HTML
|
|
12
|
-
var template = document.createElement('template');
|
|
13
|
-
template.innerHTML = content;
|
|
14
|
-
// Replace placeholder with actual content
|
|
15
|
-
el.replaceWith(template.content);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
})();
|
|
20
|
-
</script>`);let U=Array.from(w.entries()).map(async([Z,F])=>{K.enqueue(await N(Z,F))});await Promise.all(U)}K.close()}catch(X){K.error(X)}}})}async function N(q,B){try{let G=(await B).replace(/`/g,"\\`").replace(/<\/script>/gi,"<\\/script>");return`
|
|
21
|
-
<script>
|
|
22
|
-
window.__stxSuspense.resolve('${q}', \`${G}\`);
|
|
23
|
-
</script>`}catch(Q){let G=Q instanceof Error?Q.message:String(Q);return`
|
|
24
|
-
<script>
|
|
25
|
-
window.__stxSuspense.resolve('${q}', '<div class="stx-error">Error loading content: ${O(G)}</div>');
|
|
26
|
-
</script>`}}var C=`
|
|
27
|
-
<script>
|
|
28
|
-
(function(){
|
|
29
|
-
window.__stxSuspense = window.__stxSuspense || {
|
|
30
|
-
resolve: function(name, content){
|
|
31
|
-
var el = document.querySelector('[data-suspense="' + name + '"]');
|
|
32
|
-
if (!el) return;
|
|
33
|
-
var t = document.createElement('template');
|
|
34
|
-
t.innerHTML = content;
|
|
35
|
-
// Keep handles to the inserted nodes \u2014 the fragment is emptied on insert.
|
|
36
|
-
var nodes = Array.prototype.slice.call(t.content.childNodes);
|
|
37
|
-
el.replaceWith(t.content);
|
|
38
|
-
// Hydrate the streamed content so interactive islands/directives inside
|
|
39
|
-
// it come alive (no-op when the signals runtime isn't on the page).
|
|
40
|
-
if (window.stx && typeof window.stx.hydrate === 'function') {
|
|
41
|
-
nodes.forEach(function(n){ if (n.nodeType === 1) window.stx.hydrate(n); });
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
})();
|
|
46
|
-
</script>`;function P(q,B,Q){if(!B||B<=0)return q;let G,J=new Promise((K,X)=>{G=setTimeout(()=>X(Error(`streaming boundary "${Q}" timed out after ${B}ms`)),B)});return Promise.race([q,J]).finally(()=>clearTimeout(G))}function s(q,B=[],Q={}){let G=Q.timeoutMs??0;return new ReadableStream({async start(J){try{if(J.enqueue(q),B.length>0)J.enqueue(C),await Promise.all(B.map(async(K)=>{let X=P(K.render(),G,K.id);J.enqueue(await N(K.id,X))}));J.close()}catch(K){J.error(K)}}})}var u=/@stream\s*\(\s*['"]([^'"]+)['"]\s*\)([\s\S]*?)@endstream/gi;function a(q,B){return q.replace(u,(Q,G,J)=>{let K=G.trim(),X=J.split(/@fallback/i),z=X[0].trim(),L=X.length>1?X.slice(1).join("@fallback").trim():"";if(!B.__streamTemplates)B.__streamTemplates={};return B.__streamTemplates[K]=z,`<div data-suspense="${K}">${L}</div>`})}function o(q){let B=q?.streamBoundaries;if(!B||typeof B!=="object")return;let Q=Object.entries(B).filter(([,G])=>typeof G==="function");return Q.length>0?Q.map(([G,J])=>({id:G,render:J})):void 0}async function n(q,B={},Q={}){let G={...g,...Q,streaming:{...v,...Q.streaming}},J=G.streaming?.bufferSize||16384;return new ReadableStream({async start(K){try{let X=await Bun.file(q).text(),z=X.match(/<script\b[^>]*\bserver\b[^>]*>([\s\S]*?)<\/script>/i),L=z?z[1]:"",Y=X.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),j={...B,__filename:q,__dirname:b.dirname(q)};if(L.trim())await R(L,j,q);let D=new Set,$=G.streaming?.strategy||"auto",_=new RegExp(M.source,"g");if(!($!=="manual"&&_.test(Y))){let U=await H(Y,j,q,G,D);for(let Z=0;Z<U.length;Z+=J)K.enqueue(U.slice(Z,Z+J))}else{let U=[],Z=new RegExp(M.source,"g"),F;while((F=Z.exec(Y))!==null)U.push({name:F[1],content:F[2],start:F.index,end:F.index+F[0].length});let V=0;for(let W of U){if(W.start>V){let A=Y.slice(V,W.start);if(A.trim()){let I=await H(A,j,q,G,D);K.enqueue(I)}}let y=await H(W.content,j,q,G,D);K.enqueue(y),V=W.end}if(V<Y.length){let W=Y.slice(V);if(W.trim()){let y=await H(W,j,q,G,D);K.enqueue(y)}}}K.close()}catch(X){K.error(X)}}})}async function e(q,B={}){let Q={...g,...B,streaming:{...v,...B.streaming}},G=await Bun.file(q).text(),J=G.match(/<script\b[^>]*\bserver\b[^>]*>([\s\S]*?)<\/script>/i),K=J?J[1]:"",X=G.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),z=X,L={},Y;M.lastIndex=0;while((Y=M.exec(X))!==null){let $=Y[1],_=Y[2];L[$]=_}let j=X.replace(M,"");return{renderShell:async($={})=>{let _={...$,__filename:q,__dirname:b.dirname(q)};return await R(K,_,q),H(j,_,q,Q,new Set)},renderSection:async($,_={})=>{try{if(!L[$])return`<div class="error-message">Section "${O($)}" not found in template "${O(q)}"</div>`;let w={..._,__filename:q,__dirname:b.dirname(q)};await R(K,w,q);let U=new Set;return await H(L[$],w,q,Q,U)}catch(w){let U=w instanceof Error?w.message:String(w);return x("Expression",U,q,L[$]||"",0,L[$]||"")}},getSections:()=>{return Object.keys(L)},getTemplate:()=>{return z}}}var d={name:"suspense",hasEndTag:!0,handler:(q,B,Q,G)=>{if(!B||B.length===0)throw Error("Suspense directive requires a name parameter");let J=B[0].replace(/['"`]/g,"");return`<!-- @suspense:${J} -->${q}<!-- @endsuspense:${J} -->`}},h={name:"island",hasEndTag:!0,handler:(q,B,Q,G)=>{if(!B||B.length===0)throw Error("Island directive requires a name parameter");let J=B[0].replace(/['"`]/g,""),K=B[1]?B[1].replace(/['"`]/g,""):"lazy",X=`island-${J}-${Math.random().toString(36).substring(2,9)}`,z=q.match(/<script\s+props\s*>([\s\S]*?)<\/script>/i),L=z?z[1].trim():"",Y=z?q.replace(z[0],""):q;return`<div data-island="${J}" data-island-id="${X}" data-priority="${K}">
|
|
47
|
-
${Y}
|
|
48
|
-
<script type="application/json" data-island-props="${X}">
|
|
49
|
-
${L?`{${L}}`:"{}"}
|
|
50
|
-
</script>
|
|
51
|
-
</div>`}};function t(q={}){let B=[];if(q.streaming?.enabled)B.push(d);if(q.hydration?.enabled)B.push(h);return B}async function qq(q,B,Q,G={}){return q}function Bq(q,B={}){let Q=new TextEncoder,G=q.pipeThrough(new TransformStream({transform(K,X){X.enqueue(Q.encode(K))}})),J=new Headers(B.headers);if(!J.has("Content-Type"))J.set("Content-Type","text/html; charset=utf-8");if(!J.has("Transfer-Encoding"))J.set("Transfer-Encoding","chunked");if(!J.has("X-Content-Type-Options"))J.set("X-Content-Type-Options","nosniff");if(!J.has("X-Accel-Buffering"))J.set("X-Accel-Buffering","no");return new Response(G,{...B,headers:J})}function Gq(q={mode:"full"}){let{mode:B,components:Q={},dynamicImports:G=!0}=q,J=Object.entries(Q).map(([K,X])=>`'${K}': ${G?`() => import('${X}')`:`require('${X}')`}`).join(`,
|
|
52
|
-
`);if(B==="loader")return`
|
|
53
|
-
(function() {
|
|
54
|
-
window.__stx = window.__stx || {};
|
|
55
|
-
window.__stx.islands = new Map();
|
|
56
|
-
window.__stx.registerComponent = function(name, component) {
|
|
57
|
-
window.__stx.islands.set(name, component);
|
|
58
|
-
};
|
|
59
|
-
})();`;return`
|
|
60
|
-
(function() {
|
|
61
|
-
'use strict';
|
|
62
|
-
|
|
63
|
-
// Hydration runtime for stx islands
|
|
64
|
-
const stx = {
|
|
65
|
-
// Component registry
|
|
66
|
-
components: {
|
|
67
|
-
${J}
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
// Loaded island instances
|
|
71
|
-
islands: new Map(),
|
|
72
|
-
|
|
73
|
-
// Register a component for hydration
|
|
74
|
-
registerComponent: function(name, loader) {
|
|
75
|
-
this.components[name] = loader;
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
// Get props for an island by ID
|
|
79
|
-
getIslandProps: function(id) {
|
|
80
|
-
const propsScript = document.querySelector('[data-island-props="' + id + '"]');
|
|
81
|
-
if (!propsScript) return {};
|
|
82
|
-
try {
|
|
83
|
-
return JSON.parse(propsScript.textContent || '{}');
|
|
84
|
-
}
|
|
85
|
-
catch (e) {
|
|
86
|
-
console.warn('[stx] Failed to parse island props:', id, e);
|
|
87
|
-
return {};
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
// Hydrate a single island
|
|
92
|
-
hydrateIsland: async function(element) {
|
|
93
|
-
const name = element.dataset.island;
|
|
94
|
-
const id = element.dataset.islandId;
|
|
95
|
-
|
|
96
|
-
if (!name || this.islands.has(id)) return;
|
|
97
|
-
|
|
98
|
-
const loader = this.components[name];
|
|
99
|
-
if (!loader) {
|
|
100
|
-
console.warn('[stx] Unknown island component:', name);
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
try {
|
|
105
|
-
const component = typeof loader === 'function' ? await loader() : loader;
|
|
106
|
-
const props = this.getIslandProps(id);
|
|
107
|
-
|
|
108
|
-
// Mark as hydrating
|
|
109
|
-
element.dataset.hydrating = 'true';
|
|
110
|
-
|
|
111
|
-
// Call component's hydrate method if available
|
|
112
|
-
if (component.hydrate) {
|
|
113
|
-
await component.hydrate(element, props);
|
|
114
|
-
}
|
|
115
|
-
else if (component.default && component.default.hydrate) {
|
|
116
|
-
await component.default.hydrate(element, props);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
// Mark as hydrated
|
|
120
|
-
delete element.dataset.hydrating;
|
|
121
|
-
element.dataset.hydrated = 'true';
|
|
122
|
-
this.islands.set(id, { element, component, props });
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
catch (error) {
|
|
126
|
-
console.error('[stx] Failed to hydrate island:', name, error);
|
|
127
|
-
element.dataset.hydrateError = 'true';
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
|
|
131
|
-
// Hydrate all islands based on priority
|
|
132
|
-
hydrate: function() {
|
|
133
|
-
const islands = document.querySelectorAll('[data-island]');
|
|
134
|
-
|
|
135
|
-
// Group by priority
|
|
136
|
-
const eager = [];
|
|
137
|
-
const lazy = [];
|
|
138
|
-
const idle = [];
|
|
139
|
-
|
|
140
|
-
islands.forEach(function(el) {
|
|
141
|
-
const priority = el.dataset.priority || 'lazy';
|
|
142
|
-
if (priority === 'eager') eager.push(el);
|
|
143
|
-
else if (priority === 'idle') idle.push(el);
|
|
144
|
-
else lazy.push(el);
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
// Hydrate eager immediately
|
|
148
|
-
eager.forEach(function(el) { stx.hydrateIsland(el); });
|
|
149
|
-
|
|
150
|
-
// Hydrate lazy on intersection
|
|
151
|
-
if (lazy.length > 0 && 'IntersectionObserver' in window) {
|
|
152
|
-
const observer = new IntersectionObserver(function(entries) {
|
|
153
|
-
entries.forEach(function(entry) {
|
|
154
|
-
if (entry.isIntersecting) {
|
|
155
|
-
observer.unobserve(entry.target);
|
|
156
|
-
stx.hydrateIsland(entry.target);
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
}, { rootMargin: '50px' });
|
|
160
|
-
|
|
161
|
-
lazy.forEach(function(el) { observer.observe(el); });
|
|
162
|
-
}
|
|
163
|
-
else {
|
|
164
|
-
// Fallback: hydrate all lazy immediately
|
|
165
|
-
lazy.forEach(function(el) { stx.hydrateIsland(el); });
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
// Hydrate idle during browser idle time
|
|
169
|
-
if (idle.length > 0 && 'requestIdleCallback' in window) {
|
|
170
|
-
requestIdleCallback(function() {
|
|
171
|
-
idle.forEach(function(el) { stx.hydrateIsland(el); });
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
else {
|
|
175
|
-
// Fallback: hydrate after a delay
|
|
176
|
-
setTimeout(function() {
|
|
177
|
-
idle.forEach(function(el) { stx.hydrateIsland(el); });
|
|
178
|
-
}, 200);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
// Expose to window
|
|
184
|
-
window.__stx = stx;
|
|
185
|
-
|
|
186
|
-
// Auto-hydrate on DOMContentLoaded if not SSR
|
|
187
|
-
if (document.readyState === 'loading') {
|
|
188
|
-
document.addEventListener('DOMContentLoaded', function() { stx.hydrate(); });
|
|
189
|
-
}
|
|
190
|
-
else {
|
|
191
|
-
stx.hydrate();
|
|
192
|
-
}
|
|
193
|
-
})();`}
|
|
194
|
-
export{r as Tf,N as Uf,C as Vf,s as Wf,a as Xf,o as Yf,n as Zf,e as _f,d as $f,h as ag,t as bg,qq as cg,Bq as dg,Gq as eg};
|
package/dist/chunk-2w3302dh.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{matchRoute as v,Router as y}from"stx-router";import{findErrorPage as G,formatRoutes as H,generateRouteManifest as I,generateRouteTypes as J,matchRoute as K}from"stx-router";function A(f,j={}){return new y(f,j).routes}function C(f,j){let q=v(f,j);return q?q.params:null}
|
|
3
|
-
export{A as Di,C as Ei,G as Fi,H as Gi,I as Hi,J as Ii,K as Ji};
|
package/dist/chunk-2xen423s.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
function z(j){return j.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function B(j,F){if(j.serverDynamic[F]!==void 0)return String(j.serverDynamic[F]);let G=j.static[F];if(typeof G==="string")return G;return}var $="<script>window.__stxSafeImageHandler||(window.__stxSafeImageHandler=function(i){if(i.__stx_fb)return;i.__stx_fb=1;var f=i.getAttribute('data-fallback')||'/images/safe-image-default.svg';var c=i.getAttribute('data-fallback-class');i.src=f;if(c)i.className=c;});</script>",w={name:"SafeImage",aliases:["safe-image","safe-img"],render(j,F,G){let W=B(j,"src")||"",X=B(j,"alt")||"",Y=B(j,"fallback")||"/images/safe-image-default.svg",O=B(j,"class")||B(j,"className")||"",Q=B(j,"fallbackClassName")||"",q=[];if(q.push(`src="${z(W)}"`),q.push(`alt="${z(X)}"`),O)q.push(`class="${z(O)}"`);if(q.push(`data-fallback="${z(Y)}"`),Q)q.push(`data-fallback-class="${z(Q)}"`);q.push('onerror="window.__stxSafeImageHandler(this)"');let Z=new Set(["src","alt","fallback","class","className","fallbackClassName"]);for(let[J,K]of Object.entries(j.static)){if(Z.has(J))continue;if(typeof K==="boolean"){if(K)q.push(z(J))}else q.push(`${z(J)}="${z(K)}"`)}let U=`<img ${q.join(" ")} />`,V=G.context;if(!V.__safeImageHandlerEmitted)return V.__safeImageHandlerEmitted=!0,`${$}${U}`;return U}};
|
|
3
|
-
export{w as jz};
|
package/dist/chunk-39gm08bn.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import M from"fs";import N from"path";function Q(j){return N.join(j.root,".stx","story","snapshots")}function R(j,q){return N.join(j,`${q}.versions.json`)}async function T(j,q){let z=Q(j),A=R(z,q);try{let B=await M.promises.readFile(A,"utf-8");return JSON.parse(B)}catch{return null}}async function Z(j,q,z){let A=Q(j),B=R(A,q);await M.promises.mkdir(A,{recursive:!0});let b=await T(j,q);if(!b)b={current:{version:0,timestamp:0},history:[],maxVersions:10};let E={version:b.current.version+1,timestamp:Date.now(),commit:await W(j.root),description:z};if(b.current.version>0){if(b.history.unshift(b.current),b.history.length>b.maxVersions)b.history=b.history.slice(0,b.maxVersions)}return b.current=E,await M.promises.writeFile(B,JSON.stringify(b,null,2)),E}async function W(j){try{let q=N.join(j,".git","HEAD"),z=await M.promises.readFile(q,"utf-8");if(z.startsWith("ref:")){let A=N.join(j,".git",z.slice(5).trim());return(await M.promises.readFile(A,"utf-8")).trim().slice(0,8)}return z.trim().slice(0,8)}catch{return}}async function _(j,q,z){let A=await T(j,q);if(!A)return!1;let B=A.history.find((K)=>K.version===z);if(!B)return!1;let b=Q(j),E=N.join(b,`${q}.v${z}.html`),J=N.join(b,`${q}.html`);try{await M.promises.copyFile(E,J),A.current=B;let K=R(b,q);return await M.promises.writeFile(K,JSON.stringify(A,null,2)),!0}catch{return!1}}function $(j,q){let z=j.split(`
|
|
3
|
-
`),A=q.split(`
|
|
4
|
-
`),B=0,b=Math.max(z.length,A.length);for(let J=0;J<b;J++)if(z[J]!==A[J])B++;let E=b>0?B/b*100:0;return{hasDiff:B>0,percentage:E,changedPixels:B,totalPixels:b}}function G(j,q){let z=j.split(`
|
|
5
|
-
`),A=q.split(`
|
|
6
|
-
`),B=[],b=Math.max(z.length,A.length);for(let E=0;E<b;E++){let J=z[E]||"",K=A[E]||"";if(J===K)B.push(`<div class="diff-line diff-same">${O(J)}</div>`);else if(!J)B.push(`<div class="diff-line diff-added">+ ${O(K)}</div>`);else if(!K)B.push(`<div class="diff-line diff-removed">- ${O(J)}</div>`);else B.push(`<div class="diff-line diff-removed">- ${O(J)}</div>`),B.push(`<div class="diff-line diff-added">+ ${O(K)}</div>`)}return`
|
|
7
|
-
<div class="stx-diff-view">
|
|
8
|
-
<div class="diff-content">
|
|
9
|
-
${B.join(`
|
|
10
|
-
`)}
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|
|
13
|
-
`}function k(){return`
|
|
14
|
-
.stx-diff-view {
|
|
15
|
-
font-family: var(--code-font-family);
|
|
16
|
-
font-size: 12px;
|
|
17
|
-
line-height: 1.5;
|
|
18
|
-
overflow: auto;
|
|
19
|
-
}
|
|
20
|
-
.diff-content {
|
|
21
|
-
padding: 12px;
|
|
22
|
-
}
|
|
23
|
-
.diff-line {
|
|
24
|
-
padding: 2px 8px;
|
|
25
|
-
white-space: pre;
|
|
26
|
-
}
|
|
27
|
-
.diff-same {
|
|
28
|
-
color: var(--text);
|
|
29
|
-
}
|
|
30
|
-
.diff-added {
|
|
31
|
-
background: rgba(34, 197, 94, 0.2);
|
|
32
|
-
color: #22c55e;
|
|
33
|
-
}
|
|
34
|
-
.diff-removed {
|
|
35
|
-
background: rgba(239, 68, 68, 0.2);
|
|
36
|
-
color: #ef4444;
|
|
37
|
-
}
|
|
38
|
-
`}function O(j){return j.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}async function u(j,q){let z=await T(j,q);if(!z)return[];return[z.current,...z.history]}async function C(j,q,z=5){let A=await T(j,q);if(!A)return 0;let B=A.history.slice(z),b=Q(j),E=0;for(let K of B){let U=N.join(b,`${q}.v${K.version}.html`);try{await M.promises.unlink(U),E++}catch{}}A.history=A.history.slice(0,z);let J=R(b,q);return await M.promises.writeFile(J,JSON.stringify(A,null,2)),E}
|
|
39
|
-
export{Q as N,T as O,Z as P,_ as Q,$ as R,G as S,k as T,u as U,C as V};
|
package/dist/chunk-3bjtemm6.js
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
var W=typeof window<"u"&&typeof document<"u",A={color:"#6366f1",initialColor:"",height:"3px",duration:2000,throttle:200,autoFinish:!0,zIndex:999999},D=null,G=0,_=!1,X=null,V=null,K=null;function F(b){if(!W)return null;let j=document.getElementById("stx-loading-indicator");if(j)j.remove();let z=document.createElement("div");z.id="stx-loading-indicator";let J=b.initialColor?`linear-gradient(to right, ${b.initialColor}, ${b.color})`:b.color;z.style.cssText=`
|
|
3
|
-
position: fixed;
|
|
4
|
-
top: 0;
|
|
5
|
-
left: 0;
|
|
6
|
-
right: 0;
|
|
7
|
-
height: ${b.height};
|
|
8
|
-
background: ${J};
|
|
9
|
-
z-index: ${b.zIndex};
|
|
10
|
-
transform: scaleX(0);
|
|
11
|
-
transform-origin: left;
|
|
12
|
-
transition: transform 0.1s ease-out, opacity 0.3s ease;
|
|
13
|
-
opacity: 0;
|
|
14
|
-
pointer-events: none;
|
|
15
|
-
`;let Y=document.createElement("div");if(Y.style.cssText=`
|
|
16
|
-
position: absolute;
|
|
17
|
-
top: 0;
|
|
18
|
-
left: 0;
|
|
19
|
-
right: 0;
|
|
20
|
-
bottom: 0;
|
|
21
|
-
background: linear-gradient(
|
|
22
|
-
90deg,
|
|
23
|
-
transparent 0%,
|
|
24
|
-
rgba(255,255,255,0.4) 50%,
|
|
25
|
-
transparent 100%
|
|
26
|
-
);
|
|
27
|
-
animation: stx-shimmer 1.5s infinite;
|
|
28
|
-
`,z.appendChild(Y),!document.getElementById("stx-loading-styles")){let Q=document.createElement("style");Q.id="stx-loading-styles",Q.textContent=`
|
|
29
|
-
@keyframes stx-shimmer {
|
|
30
|
-
0% { transform: translateX(-100%); }
|
|
31
|
-
100% { transform: translateX(100%); }
|
|
32
|
-
}
|
|
33
|
-
`,document.head.appendChild(Q)}return document.body.appendChild(z),z}function H(b,j){if(!W||!D)return;if(G=Math.min(Math.max(b,0),100),X)cancelAnimationFrame(X);X=requestAnimationFrame(()=>{if(!D)return;D.style.opacity=G>0?"1":"0",D.style.transform=`scaleX(${G/100})`})}function k(b){if(!W)return;if(_=!0,G=0,!D)D=F(b);if(V)clearTimeout(V);if(K)clearInterval(K);H(10,b),K=setInterval(()=>{if(!_)return;let j=90-G,z=Math.max(0.5,j*0.1);if(G<90)H(G+z,b)},b.throttle)}function B(b){if(!W)return;if(_=!1,K)clearInterval(K),K=null;H(100,b),V=setTimeout(()=>{if(D)D.style.opacity="0";setTimeout(()=>{if(G=0,D)D.style.transform="scaleX(0)"},300)},200)}function O(){if(!W)return;if(_=!1,G=0,K)clearInterval(K),K=null;if(V)clearTimeout(V),V=null;if(D)D.style.opacity="0",D.style.transform="scaleX(0)"}function R(b){let j={...A,...b};return{start:()=>k(j),set:(z)=>H(z,j),finish:()=>B(j),clear:()=>O(),get state(){return{isLoading:_,progress:G,error:!1}}}}var N=null;function T(b){if(!W)return;if(N)N(),N=null;let j={...A,...b},z=R(j);D=F(j);let J=!1,Y=(U)=>{let M=U.target.closest("a");if(!M)return;let Z=M.getAttribute("href");if(!Z)return;if(Z.startsWith("http")||Z.startsWith("#")||Z.startsWith("mailto:")||Z.startsWith("tel:")||M.target==="_blank"||M.hasAttribute("download"))return;J=!0,z.start()},Q=()=>{if(!J)z.start(),J=!0},x=()=>{if(J||j.autoFinish)z.finish(),J=!1};document.addEventListener("click",Y),window.addEventListener("popstate",Q),window.addEventListener("load",x);let y=window.fetch,$=0,q=async function(...U){let S=typeof U[0]==="string"?U[0]:U[0].url,M=S.includes("/api/")||S.startsWith("/api");if(M){if($++,$===1&&!J)z.start()}try{return await y.apply(this,U)}finally{if(M){if($--,$===0&&!J)z.finish()}}};window.fetch=q,N=()=>{if(document.removeEventListener("click",Y),window.removeEventListener("popstate",Q),window.removeEventListener("load",x),window.fetch===q)window.fetch=y}}function C(){if(N)N(),N=null}function w(b){let j={...A,...b},z=j.initialColor?`linear-gradient(to right, ${j.initialColor}, ${j.color})`:j.color;return`
|
|
34
|
-
<div id="stx-loading-indicator" style="
|
|
35
|
-
position: fixed;
|
|
36
|
-
top: 0;
|
|
37
|
-
left: 0;
|
|
38
|
-
right: 0;
|
|
39
|
-
height: ${j.height};
|
|
40
|
-
background: ${z};
|
|
41
|
-
z-index: ${j.zIndex};
|
|
42
|
-
transform: scaleX(0);
|
|
43
|
-
transform-origin: left;
|
|
44
|
-
transition: transform 0.1s ease-out, opacity 0.3s ease;
|
|
45
|
-
opacity: 0;
|
|
46
|
-
pointer-events: none;
|
|
47
|
-
">
|
|
48
|
-
<div style="
|
|
49
|
-
position: absolute;
|
|
50
|
-
top: 0;
|
|
51
|
-
left: 0;
|
|
52
|
-
right: 0;
|
|
53
|
-
bottom: 0;
|
|
54
|
-
background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
|
|
55
|
-
animation: stx-shimmer 1.5s infinite;
|
|
56
|
-
"></div>
|
|
57
|
-
</div>
|
|
58
|
-
<style>
|
|
59
|
-
@keyframes stx-shimmer {
|
|
60
|
-
0% { transform: translateX(-100%); }
|
|
61
|
-
100% { transform: translateX(100%); }
|
|
62
|
-
}
|
|
63
|
-
</style>
|
|
64
|
-
<script>
|
|
65
|
-
(function() {
|
|
66
|
-
var opts = ${JSON.stringify(j)};
|
|
67
|
-
var el = document.getElementById('stx-loading-indicator');
|
|
68
|
-
var progress = 0;
|
|
69
|
-
var loading = false;
|
|
70
|
-
var interval = null;
|
|
71
|
-
|
|
72
|
-
function update(p) {
|
|
73
|
-
progress = Math.min(Math.max(p, 0), 100);
|
|
74
|
-
if (el) {
|
|
75
|
-
el.style.opacity = progress > 0 ? '1' : '0';
|
|
76
|
-
el.style.transform = 'scaleX(' + (progress / 100) + ')';
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
window.stxLoading = {
|
|
81
|
-
start: function() {
|
|
82
|
-
loading = true;
|
|
83
|
-
progress = 0;
|
|
84
|
-
update(10);
|
|
85
|
-
if (interval) clearInterval(interval);
|
|
86
|
-
interval = setInterval(function() {
|
|
87
|
-
if (!loading) return;
|
|
88
|
-
var remaining = 90 - progress;
|
|
89
|
-
var inc = Math.max(0.5, remaining * 0.1);
|
|
90
|
-
if (progress < 90) update(progress + inc);
|
|
91
|
-
}, opts.throttle);
|
|
92
|
-
},
|
|
93
|
-
finish: function() {
|
|
94
|
-
loading = false;
|
|
95
|
-
if (interval) { clearInterval(interval); interval = null; }
|
|
96
|
-
update(100);
|
|
97
|
-
setTimeout(function() {
|
|
98
|
-
if (el) el.style.opacity = '0';
|
|
99
|
-
setTimeout(function() {
|
|
100
|
-
progress = 0;
|
|
101
|
-
if (el) el.style.transform = 'scaleX(0)';
|
|
102
|
-
}, 300);
|
|
103
|
-
}, 200);
|
|
104
|
-
},
|
|
105
|
-
set: function(v) { update(v); },
|
|
106
|
-
clear: function() {
|
|
107
|
-
loading = false;
|
|
108
|
-
progress = 0;
|
|
109
|
-
if (interval) { clearInterval(interval); interval = null; }
|
|
110
|
-
if (el) { el.style.opacity = '0'; el.style.transform = 'scaleX(0)'; }
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
// Auto-hook navigation
|
|
115
|
-
document.addEventListener('click', function(e) {
|
|
116
|
-
var link = e.target.closest && e.target.closest('a');
|
|
117
|
-
if (!link) return;
|
|
118
|
-
var href = link.getAttribute('href');
|
|
119
|
-
if (!href || href.startsWith('http') || href.startsWith('#') || href.startsWith('mailto:') || href.startsWith('tel:') || link.target === '_blank') return;
|
|
120
|
-
window.stxLoading.start();
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
window.addEventListener('popstate', function() { window.stxLoading.start(); });
|
|
124
|
-
window.addEventListener('load', function() { window.stxLoading.finish(); });
|
|
125
|
-
})();
|
|
126
|
-
</script>
|
|
127
|
-
`}var P={useLoadingIndicator:R,initLoadingIndicator:T,generateLoadingIndicatorHtml:w};
|
|
128
|
-
export{R as Tl,T as Ul,C as Vl,w as Wl,P as Xl};
|
package/dist/chunk-3jm3snz8.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
var{defineProperty:e,getOwnPropertyNames:g,getOwnPropertyDescriptor:h}=Object,i=Object.prototype.hasOwnProperty;function j(a){return this[a]}var m=(a)=>{var b=(f??=new WeakMap).get(a),c;if(b)return b;if(b=e({},"__esModule",{value:!0}),a&&typeof a==="object"||typeof a==="function"){for(var d of g(a))if(!i.call(b,d))e(b,d,{get:j.bind(a,d),enumerable:!(c=h(a,d))||c.enumerable})}return f.set(a,b),b},f;var k=(a)=>a;function l(a,b){this[a]=k.bind(null,b)}var n=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0,configurable:!0,set:l.bind(b,c)})};var o=(a,b)=>()=>(a&&(b=a(a=0)),b);var p=import.meta.require;
|
|
3
|
-
export{m as oB,n as pB,o as qB,p as rB};
|
package/dist/chunk-3ngm57nt.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ls as T,Rr as B}from"./chunk-w01y57f5.js";import{et as N}from"./chunk-nap11ntr.js";import{rB as M}from"./chunk-3jm3snz8.js";import O from"fs";import Z from"path";async function S(q,G={},z={}){let E=await Bun.file(q).text(),j=E.match(/<script\s+server\s*>([\s\S]*?)<\/script>/i),F=j?j[1]:"",J=j?E.replace(/<script\s+server\s*>[\s\S]*?<\/script>/i,""):E;J=J.replace(/<script\s+client\s*>/gi,"<script>");let K={__filename:q,__dirname:Z.dirname(q),props:G,...G};if(F)await N(F,K,q);let L={...B,...z};return await T(J,K,q,L,new Set)}async function y(q){let G=performance.now(),z={success:!0,views:[],errors:[],duration:0},{viewsDir:E,outputDir:j,componentsDir:F=Z.join(E,"components"),layoutsDir:J=Z.join(E,"layouts"),partialsDir:K=Z.join(E,"partials"),globalProps:L={},placeholders:Q={},views:U,debug:I=!1,generateManifest:R=!0}=q;if(I)console.log("Building STX views..."),console.log(` Source: ${E}`),console.log(` Output: ${j}`);O.mkdirSync(j,{recursive:!0});let A={componentsDir:F,layoutsDir:J,partialsDir:K,debug:I},_;if(U&&U.length>0)_=U;else _=O.readdirSync(E).filter((W)=>W.endsWith(".stx")).map((W)=>({input:W}));for(let H of _){let W=Z.join(E,H.input),X=H.output||H.input.replace(/\.stx$/,".html"),$=Z.join(j,X);if(I)console.log(` Building ${H.input}...`);try{let Y={...L,...H.props,...Q},k=await S(W,Y,A);await Bun.write($,k),z.views.push(X)}catch(Y){let k=Y instanceof Error?Y.message:String(Y);if(z.errors.push({file:H.input,error:k}),z.success=!1,I)console.error(` Error: ${k}`)}}if(R){let H={buildTime:new Date().toISOString(),views:z.views,placeholders:Q,errors:z.errors.length>0?z.errors:void 0};await Bun.write(Z.join(j,"manifest.json"),JSON.stringify(H,null,2))}if(z.duration=performance.now()-G,I)if(z.success)console.log(`
|
|
3
|
-
\u2705 Built ${z.views.length} views in ${z.duration.toFixed(0)}ms`);else console.log(`
|
|
4
|
-
\u26A0\uFE0F Built ${z.views.length} views with ${z.errors.length} errors`);return z}function C(q,G){let z=O.watch(q.viewsDir,{recursive:!0},async(E,j)=>{if(!j)return;if(j.endsWith(".stx")||j.endsWith(".ts")||j.endsWith(".js")){if(q.debug)console.log(`
|
|
5
|
-
File changed: ${j}, rebuilding...`);let F=await y(q);G?.(F)}});return{close:()=>z.close()}}async function g(q,G={},z={}){let E={...z,skipDefaultSeoTags:!0,skipSignalsRuntime:!0},j=await S(q,G,E);j=await x(j),j=j.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),j=j.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,""),j=j.replace(/<!--\s*stx SEO Tags\s*-->/gi,""),j=j.replace(/\n\s*\n\s*\n/g,`
|
|
6
|
-
|
|
7
|
-
`).trim();let F=D(j);return{html:j,text:F}}async function x(q){try{let{generateCrosswindCSS:G,extractClassNames:z}=await import("./dev-server/crosswind.js");if(z(q).size===0)return q;let j=await G(q);if(!j)return q;let F=V(j);if(F.size===0)return q;return q.replace(/(<[a-z][a-z0-9]*)((?:\s+[a-z][a-z0-9-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]*))?)*\s+)class\s*=\s*"([^"]*)"((?:\s+[a-z][a-z0-9-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]*))?)*\s*)(\/?>)/gi,(J,K,L,Q,U,I)=>{let R=Q.split(/\s+/).filter(Boolean),A=[];for(let X of R){let $=F.get(X);if($)A.push($)}if(A.length===0)return`${K}${L}class="${Q}"${U}${I}`;let _=A.join("; "),W=`${L}${U}`.match(/style\s*=\s*"([^"]*)"/);if(W){let X=`${_}; ${W[1]}`,$=L.replace(/style\s*=\s*"[^"]*"/,`style="${X}"`),Y=U.replace(/style\s*=\s*"[^"]*"/,`style="${X}"`);return`${K}${$}class="${Q}"${Y}${I}`}return`${K}${L}class="${Q}" style="${_}"${U}${I}`})}catch{return q}}function V(q){let G=new Map,z=/\.([a-zA-Z0-9_-]+(?:\\:[a-zA-Z0-9_-]+)*)\s*\{([^}]+)\}/g,E=z.exec(q);while(E!==null){let j=E[1].replace(/\\/g,""),F=E[2].split(";").map((J)=>J.trim()).filter(Boolean).join("; ");if(F)G.set(j,F);E=z.exec(q)}return G}function D(q){return q.replace(/<br\s*\/?>/gi,`
|
|
8
|
-
`).replace(/<\/(p|div|h[1-6]|li|tr)>/gi,`
|
|
9
|
-
`).replace(/<\/td>/gi,"\t").replace(/<[^>]*>/g,"").replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/©/g,"(c)").replace(/·/g,"-").replace(/\n\s*\n\s*\n/g,`
|
|
10
|
-
|
|
11
|
-
`).trim()}var u=y;
|
|
12
|
-
export{S as Cq,y as Dq,C as Eq,g as Fq,u as Gq};
|
package/dist/chunk-3rh7va1z.js
DELETED
package/dist/chunk-3yg9hbmb.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Lb as P}from"./chunk-7rvh2wwv.js";import{Mb as Q}from"./chunk-jc0fc4ht.js";import{Bc as O}from"./chunk-6e4c6g46.js";import{Sc as G,Tc as J,Uc as K,Wc as M,Xc as N,ad as L}from"./chunk-yn38c15w.js";import{fe as D}from"./chunk-0qnz93q2.js";import{rB as Z}from"./chunk-3jm3snz8.js";async function $(k={}){G();let b=await D({mode:"dev"});if(!b.config.enabled){N("Story feature is disabled in config.");return}await Q(b);let T=k.port??b.config.port,j,q=async()=>{j=await P(b,{port:T,open:k.open,host:k.host}),K(b.storyFiles.length),J(j.url),L()};await q();let V=O(b,{onChange:async()=>{await j.close();let A=await D({mode:"dev"});Object.assign(b,A),await q()}}),z=async()=>{console.log(`
|
|
3
|
-
`),V.stop(),await j.close(),process.exit(0)};if(process.on("SIGINT",z),process.on("SIGTERM",z),process.stdin.isTTY)process.stdin.setRawMode(!0),process.stdin.resume(),process.stdin.on("data",async(A)=>{switch(A.toString()){case"h":L();break;case"o":try{let{exec:X}=await import("child_process"),Y=process.platform==="darwin"?"open":process.platform==="win32"?"start":"xdg-open";X(`${Y} ${j.url}`)}catch{M("Failed to open browser")}break;case"r":await j.close(),await q();break;case"c":console.clear(),G(),K(b.storyFiles.length),J(j.url);break;case"q":case"\x03":await z();break}});await new Promise(()=>{})}var U=$;
|
|
4
|
-
export{$ as Jb,U as Kb};
|
package/dist/chunk-44hd3kab.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
// @bun
|
package/dist/chunk-46mkpbkk.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{iz as i}from"./chunk-3rh7va1z.js";function a(e,t){if(e.serverDynamic[t]!==void 0)return String(e.serverDynamic[t]);let o=e.static[t];if(typeof o==="string")return o;return}var r={sm:"max-width:24rem",md:"max-width:32rem",lg:"max-width:42rem",xl:"max-width:56rem",full:"max-width:calc(100vw - 2rem);max-height:calc(100vh - 2rem)"},x={name:"StxModal",aliases:["stx-modal"],render(e,t,o){let d=a(e,"id");if(!d)return console.warn('[stx] <StxModal> requires an "id" prop'),"<!-- StxModal: missing id prop -->";let s=i(d),n=a(e,"size")||"md",l=a(e,"closeOnBackdrop")!=="false",c=a(e,"closeOnEscape")!=="false",m=r[n]||r.md;return`<div id="stx-modal-${s}" class="stx-modal-backdrop" data-stx-modal="${s}" data-close-backdrop="${l}" data-close-escape="${c}" style="display:none;position:fixed;inset:0;z-index:99999;align-items:center;justify-content:center;background:rgba(0,0,0,0.5);backdrop-filter:blur(2px);opacity:0;transition:opacity 0.2s ease" aria-modal="true" role="dialog">
|
|
3
|
-
<div class="stx-modal-panel" style="${m};width:100%;margin:1rem;border-radius:0.75rem;box-shadow:0 20px 60px rgba(0,0,0,0.3);overflow:hidden;transform:scale(0.95) translateY(8px);transition:transform 0.2s ease,opacity 0.2s ease;opacity:0;background:var(--stx-modal-bg,#fff);color:var(--stx-modal-text,#1f2937)">
|
|
4
|
-
<div style="padding:1.5rem">${t}</div>
|
|
5
|
-
</div>
|
|
6
|
-
</div>
|
|
7
|
-
<style>
|
|
8
|
-
@media(prefers-color-scheme:dark){[data-stx-modal]{--stx-modal-bg:#1f2937;--stx-modal-text:#f3f4f6}}
|
|
9
|
-
.stx-modal-backdrop[data-stx-modal-open]{display:flex!important;opacity:1}
|
|
10
|
-
.stx-modal-backdrop[data-stx-modal-open] .stx-modal-panel{transform:scale(1) translateY(0);opacity:1}
|
|
11
|
-
</style>`}};
|
|
12
|
-
export{x as hz};
|
package/dist/chunk-48cw2nde.js
DELETED
package/dist/chunk-48r3qe0k.js
DELETED
package/dist/chunk-4aj7ftqb.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
// @bun
|
package/dist/chunk-4bt81cg3.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Se as O,Ve as Q}from"./chunk-87kx8byz.js";Q();function J(j){let q=j.pwa;if(!q?.enabled)return"";let A=q.manifest,z=q.icons?.outputDir?`/${q.icons.outputDir}`:"/pwa-icons",G=O(j),C=`
|
|
3
|
-
<!-- stx PWA Meta Tags -->
|
|
4
|
-
<link rel="manifest" href="/manifest.json">
|
|
5
|
-
<meta name="theme-color" content="${K(A?.themeColor||"#000000")}">
|
|
6
|
-
<meta name="mobile-web-app-capable" content="yes">
|
|
7
|
-
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
8
|
-
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
|
9
|
-
<meta name="apple-mobile-web-app-title" content="${K(A?.shortName||A?.name||"App")}">`;if(q.icons?.generateAppleIcons!==!1)C+=`
|
|
10
|
-
<link rel="apple-touch-icon" href="${z}/apple-touch-icon.png">
|
|
11
|
-
<link rel="apple-touch-icon" sizes="120x120" href="${z}/apple-touch-icon-120x120.png">
|
|
12
|
-
<link rel="apple-touch-icon" sizes="152x152" href="${z}/apple-touch-icon-152x152.png">
|
|
13
|
-
<link rel="apple-touch-icon" sizes="167x167" href="${z}/apple-touch-icon-167x167.png">
|
|
14
|
-
<link rel="apple-touch-icon" sizes="180x180" href="${z}/apple-touch-icon-180x180.png">`;return C+=`
|
|
15
|
-
<link rel="icon" type="image/png" sizes="32x32" href="${z}/favicon-32x32.png">
|
|
16
|
-
<link rel="icon" type="image/png" sizes="16x16" href="${z}/favicon-16x16.png">
|
|
17
|
-
<link rel="icon" type="image/png" sizes="192x192" href="${z}/icon-192x192.png">`,C+=`
|
|
18
|
-
<!-- stx Service Worker Registration -->
|
|
19
|
-
<script>
|
|
20
|
-
if ('serviceWorker' in navigator) {
|
|
21
|
-
window.addEventListener('load', function() {
|
|
22
|
-
navigator.serviceWorker.register('/${G}')
|
|
23
|
-
.then(function(registration) {
|
|
24
|
-
console.log('[PWA] Service Worker registered:', registration.scope);
|
|
25
|
-
|
|
26
|
-
// Check for updates
|
|
27
|
-
registration.addEventListener('updatefound', function() {
|
|
28
|
-
const newWorker = registration.installing;
|
|
29
|
-
if (newWorker) {
|
|
30
|
-
newWorker.addEventListener('statechange', function() {
|
|
31
|
-
if (newWorker.state === 'installed' && navigator.serviceWorker.controller) {
|
|
32
|
-
console.log('[PWA] New content available, refresh to update');
|
|
33
|
-
// Optionally dispatch a custom event for UI notification
|
|
34
|
-
window.dispatchEvent(new CustomEvent('pwa-update-available'));
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
})
|
|
40
|
-
.catch(function(error) {
|
|
41
|
-
console.error('[PWA] Service Worker registration failed:', error);
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
</script>
|
|
46
|
-
<!-- End stx PWA -->`,C}function U(j,q){let A=q.pwa;if(!A?.enabled||A.autoInject===!1)return j;if(j.includes("<!-- stx PWA Meta Tags -->"))return j;if(!j.includes("</head>")){let G=j.lastIndexOf("</body>");if(G!==-1){let C=J(q);return j.slice(0,G)+C+`
|
|
47
|
-
`+j.slice(G)}return j+J(q)}let z=J(q);return j.replace("</head>",`${z}
|
|
48
|
-
</head>`)}function V(j){if(!j.pwa?.enabled)return"";return`<script>
|
|
49
|
-
if ('serviceWorker' in navigator) {
|
|
50
|
-
window.addEventListener('load', function() {
|
|
51
|
-
navigator.serviceWorker.register('/${O(j)}')
|
|
52
|
-
.then(function(registration) {
|
|
53
|
-
console.log('[PWA] Service Worker registered:', registration.scope);
|
|
54
|
-
})
|
|
55
|
-
.catch(function(error) {
|
|
56
|
-
console.error('[PWA] Service Worker registration failed:', error);
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
</script>`}function X(){return'<link rel="manifest" href="/manifest.json">'}function Y(j){return`<meta name="theme-color" content="${K(j)}">`}function K(j){return j.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}
|
|
61
|
-
export{J as He,U as Ie,V as Je,X as Ke,Y as Le};
|
package/dist/chunk-4j188175.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
function z(c,j="_method"){let k=c.toUpperCase();if(k==="GET"||k==="POST")return"";return`<input type="hidden" name="${j}" value="${k}">`}function B(c){return c.replace(/@method\(\s*(['"])([^'"]+)\1\s*(?:,\s*(['"])([^'"]+)\3\s*)?\)/g,(j,k,v,A,x)=>{return z(v,x||"_method")})}function C(c,j="_method"){if(c&&typeof c[j]==="string")return c[j].toUpperCase();return null}
|
|
3
|
-
export{z as gu,B as hu,C as iu};
|