@stacksjs/stx 0.2.95 → 0.2.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/a11y.js +598 -2
- package/dist/analytics.js +159 -2
- package/dist/analyzer.js +240 -2
- package/dist/animation.js +688 -2
- package/dist/app-shell.js +220 -2
- package/dist/app.js +79 -2
- package/dist/assets.js +155 -2
- package/dist/ast.js +630 -2
- package/dist/async-components.js +428 -2
- package/dist/auth.js +12 -2
- package/dist/broadcasting.js +102 -2
- package/dist/browser-composables.js +565 -2
- package/dist/build-assets.js +29 -2
- package/dist/build-mode-detector.js +50 -2
- package/dist/build-optimizer.js +433 -2
- package/dist/build-views.js +180 -2
- package/dist/build.js +33 -2
- package/dist/builtins/drawer.js +37 -2
- package/dist/builtins/escape.js +3 -2
- package/dist/builtins/icon.js +83 -2
- package/dist/builtins/index.js +34 -2
- package/dist/builtins/modal.js +38 -2
- package/dist/builtins/safe-image.js +51 -2
- package/dist/builtins/stx-image.js +200 -2
- package/dist/builtins/stx-link.js +41 -2
- package/dist/builtins/stx-loading-indicator.js +35 -2
- package/dist/builtins/suspense.js +24 -2
- package/dist/builtins/toast.js +42 -2
- package/dist/builtins/tooltip.js +106 -2
- package/dist/builtins/transition-group.js +22 -2
- package/dist/bundle-analyzer/collector.js +233 -2
- package/dist/bundle-analyzer/index.js +82 -2
- package/dist/bundle-analyzer/report.js +318 -2
- package/dist/bundle-analyzer/treemap.js +594 -2
- package/dist/caching.js +131 -2
- package/dist/cli.js +11317 -10982
- package/dist/client/directive.js +14 -2
- package/dist/client/index.js +2 -2
- package/dist/client-helpers.js +312 -2
- package/dist/client-script-bundler.js +216 -6
- package/dist/client-script.js +754 -2
- package/dist/client.js +73 -4
- package/dist/component-hmr.js +585 -2
- package/dist/component-library.d.ts +6 -0
- package/dist/component-library.js +683 -0
- package/dist/component-processing.js +613 -2
- package/dist/component-registry.js +90 -2
- package/dist/component-renderer.js +660 -2
- package/dist/components.js +213 -2
- package/dist/composables/index.js +220 -2
- package/dist/composables/use-battery.js +101 -2
- package/dist/composables/use-broadcast-channel.js +80 -2
- package/dist/composables/use-channel.js +124 -2
- package/dist/composables/use-clipboard.js +79 -2
- package/dist/composables/use-color-mode.js +131 -2
- package/dist/composables/use-cookie.js +86 -2
- package/dist/composables/use-device-orientation.js +181 -2
- package/dist/composables/use-event-listener.js +27 -2
- package/dist/composables/use-event-source.js +166 -2
- package/dist/composables/use-eye-dropper.js +142 -2
- package/dist/composables/use-fetch.js +223 -2
- package/dist/composables/use-fullscreen.js +110 -2
- package/dist/composables/use-geolocation.js +101 -2
- package/dist/composables/use-idle.js +182 -2
- package/dist/composables/use-intersection-observer.js +168 -2
- package/dist/composables/use-keyboard.js +224 -2
- package/dist/composables/use-media-query.js +62 -2
- package/dist/composables/use-meta.js +48 -2
- package/dist/composables/use-mouse.js +286 -2
- package/dist/composables/use-mutation-observer.js +129 -2
- package/dist/composables/use-network.js +85 -2
- package/dist/composables/use-notification.js +94 -2
- package/dist/composables/use-permissions.js +132 -2
- package/dist/composables/use-query.js +0 -1
- package/dist/composables/use-resize-observer.js +157 -2
- package/dist/composables/use-router.js +51 -2
- package/dist/composables/use-share.js +104 -2
- package/dist/composables/use-speech.js +294 -2
- package/dist/composables/use-storage.js +130 -2
- package/dist/composables/use-text-selection.js +205 -4
- package/dist/composables/use-timer.js +183 -2
- package/dist/composables/use-utilities.js +176 -2
- package/dist/composables/use-wake-lock.js +122 -2
- package/dist/composables/use-websocket.js +165 -2
- package/dist/composables/use-window.js +163 -2
- package/dist/composables.js +552 -2
- package/dist/composition-api.js +190 -2
- package/dist/computed.js +376 -8
- package/dist/conditionals.js +599 -2
- package/dist/config.js +751 -2
- package/dist/craft-bridge.js +432 -2
- package/dist/craft-compiler.js +810 -2
- package/dist/craft-components.js +945 -2
- package/dist/craft-entry.js +5 -2
- package/dist/craft-ssr.js +559 -2
- package/dist/csp.js +220 -2
- package/dist/csrf.js +38 -2
- package/dist/custom-directives.js +136 -2
- package/dist/defer.js +156 -2
- package/dist/deploy/config-generators.js +214 -2
- package/dist/deploy/index.js +203 -2
- package/dist/deploy/netlify.js +167 -2
- package/dist/dev-server/crosswind.js +379 -2
- package/dist/dev-server/index.js +7 -2
- package/dist/dev-server/keyboard-shortcuts.js +81 -2
- package/dist/dev-server/native-window.js +91 -2
- package/dist/dev-server/port-utils.js +40 -2
- package/dist/dev-server/serve-app.js +682 -2
- package/dist/dev-server/serve-file.js +439 -2
- package/dist/dev-server/serve-markdown.js +281 -2
- package/dist/dev-server/serve-multi.js +579 -2
- package/dist/dev-server/terminal-colors.js +45 -2
- package/dist/dev-server/theme-selector.js +111 -2
- package/dist/dev-server/types.js +43 -2
- package/dist/dev-server.js +4 -2
- package/dist/devtools.js +462 -18
- package/dist/directive-api.js +355 -2
- package/dist/docs.js +567 -2
- package/dist/doctor.js +123 -2
- package/dist/document-shell.js +105 -2
- package/dist/dynamic-components.js +78 -2
- package/dist/edge-runtime.js +539 -2
- package/dist/env.js +9 -2
- package/dist/error-boundaries.js +62 -12
- package/dist/error-handling.js +1 -2
- package/dist/errors/codes.js +97 -2
- package/dist/errors/formatter.js +196 -2
- package/dist/errors/index.js +44 -2
- package/dist/errors/logger.js +250 -2
- package/dist/errors/sanitizer.js +181 -2
- package/dist/errors/types.js +86 -2
- package/dist/events.js +382 -2
- package/dist/expressions.js +650 -2
- package/dist/formatter.js +265 -2
- package/dist/forms-validation.js +510 -4
- package/dist/forms.js +709 -2
- package/dist/head.js +224 -2
- package/dist/heatmap.js +566 -2
- package/dist/hot-reload.js +367 -2
- package/dist/html-masking.js +73 -2
- package/dist/hydration-runtime.js +195 -2
- package/dist/hydration.js +654 -2
- package/dist/i18n.js +633 -2
- package/dist/image-optimization/auto-sibling.js +88 -2
- package/dist/image-optimization/build-plugin.js +241 -2
- package/dist/image-optimization/component.js +244 -2
- package/dist/image-optimization/directive.js +203 -2
- package/dist/image-optimization/index.js +54 -2
- package/dist/image-optimization/processor.js +262 -2
- package/dist/image-optimization/serve.js +102 -2
- package/dist/includes.js +733 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +134 -2
- package/dist/init.js +505 -2
- package/dist/inline-assets.js +82 -2
- package/dist/interactive.js +383 -2
- package/dist/internal-markdown.js +141 -2
- package/dist/island-chunking.js +52 -2
- package/dist/js-ts.js +57 -2
- package/dist/jsx-runtime.js +289 -2
- package/dist/keep-alive.js +421 -2
- package/dist/lazy-loader.js +245 -2
- package/dist/loading-indicator.js +322 -2
- package/dist/loops.js +643 -2
- package/dist/manifest.js +31 -2
- package/dist/markdown.js +68 -2
- package/dist/media/client/blur-up.js +217 -2
- package/dist/media/client/index.js +53 -2
- package/dist/media/client/lazy-load.js +283 -2
- package/dist/media/client/upload-handler.js +354 -2
- package/dist/media/image/component.js +574 -2
- package/dist/media/image/directive.js +160 -2
- package/dist/media/image/editing.js +193 -2
- package/dist/media/image/index.js +80 -2
- package/dist/media/image/placeholder.js +188 -2
- package/dist/media/image/processor/cache.js +51 -2
- package/dist/media/image/processor/index.js +3 -2
- package/dist/media/image/processor/optimizer.js +202 -2
- package/dist/media/image/processor/responsive.js +162 -2
- package/dist/media/image/srcset.js +194 -2
- package/dist/media/index.js +198 -2
- package/dist/media/manager/embed.js +253 -2
- package/dist/media/protected/component.js +235 -2
- package/dist/media/protected/index.js +20 -2
- package/dist/media/protected/signature.js +205 -2
- package/dist/media/shared/cache.js +132 -2
- package/dist/media/shared/hash.js +35 -2
- package/dist/media/shared/index.js +2 -2
- package/dist/media/types.js +0 -1
- package/dist/media/upload/component.js +320 -2
- package/dist/media/upload/index.js +1 -2
- package/dist/media/video/directive.js +142 -2
- package/dist/media/video/index.js +583 -2
- package/dist/media/video/processor/cache.js +52 -2
- package/dist/media/video/processor/index.js +4 -2
- package/dist/media/video/processor/streaming.js +197 -2
- package/dist/media/video/processor/thumbnail.js +134 -2
- package/dist/media/video/processor/transcoder.js +283 -2
- package/dist/method-spoofing.js +17 -2
- package/dist/middleware.js +40 -2
- package/dist/misc-directives.js +222 -2
- package/dist/native-build.js +511 -2
- package/dist/parser/directive-parser.js +239 -2
- package/dist/parser/expression-parser.js +358 -2
- package/dist/parser/index.js +23 -2
- package/dist/parser/tokenizer.js +534 -2
- package/dist/partial-hydration.js +427 -2
- package/dist/performance-utils.js +430 -2
- package/dist/placeholder.js +35 -2
- package/dist/plugin-system.js +214 -2
- package/dist/plugin.js +173 -2
- package/dist/precompiler.js +660 -81
- package/dist/process.js +711 -2
- package/dist/production-build.js +596 -2
- package/dist/production-builder.js +132 -2
- package/dist/production-server.js +188 -2
- package/dist/props.js +224 -2
- package/dist/public-env.js +19 -2
- package/dist/pwa/audit.js +255 -2
- package/dist/pwa/directives.js +332 -2
- package/dist/pwa/icons.js +109 -2
- package/dist/pwa/index.js +47 -2
- package/dist/pwa/inject.js +102 -2
- package/dist/pwa/manifest.js +186 -2
- package/dist/pwa/offline.js +259 -2
- package/dist/pwa/precache.js +116 -2
- package/dist/pwa/service-worker.js +860 -2
- package/dist/pwa/workbox-strategies.js +167 -2
- package/dist/pwa/workbox.js +382 -2
- package/dist/pwa.js +427 -427
- package/dist/reactive-bindings.js +266 -2
- package/dist/reactive.js +569 -2
- package/dist/reactivity.js +559 -2
- package/dist/release.js +1 -2
- package/dist/render.js +165 -2
- package/dist/route-middleware.js +17 -2
- package/dist/router.js +9 -2
- package/dist/routes.js +14 -2
- package/dist/runtime-injection.js +120 -2
- package/dist/runtime.js +94 -2
- package/dist/safe-evaluator.js +444 -2
- package/dist/scaffolding.js +897 -2
- package/dist/screenshot.js +87 -2
- package/dist/script-classifier.js +32 -2
- package/dist/script-validation.js +158 -2
- package/dist/seo.js +457 -2
- package/dist/serve.js +237 -2
- package/dist/server-bindings.js +108 -2
- package/dist/server-components.js +338 -11
- package/dist/signal-processing.js +946 -2
- package/dist/signals-api.js +154 -2
- package/dist/signals.js +5287 -2
- package/dist/site-builder/build.js +224 -2
- package/dist/site-builder/i18n.js +140 -2
- package/dist/site-builder/index.js +15 -2
- package/dist/site-builder/robots.js +26 -2
- package/dist/site-builder/router.js +27 -2
- package/dist/site-builder/seo.js +36 -2
- package/dist/site-builder/sitemap.js +26 -2
- package/dist/site-builder/theme.js +33 -2
- package/dist/site-builder/types.js +0 -1
- package/dist/slots.js +201 -2
- package/dist/source-maps.js +350 -2
- package/dist/spa-shell.js +34 -2
- package/dist/ssg.js +389 -389
- package/dist/ssr.js +355 -2
- package/dist/state-management.js +533 -2
- package/dist/store-imports.js +13 -2
- package/dist/store-loader.js +72 -5
- package/dist/stores-client.js +132 -2
- package/dist/story/addons.js +261 -2
- package/dist/story/analytics.js +235 -2
- package/dist/story/auto-stories.js +158 -2
- package/dist/story/bookmarks.js +277 -2
- package/dist/story/bun-test.js +102 -2
- package/dist/story/cli.js +155 -2
- package/dist/story/collect/analyzer.js +305 -2
- package/dist/story/collect/index.js +27 -2
- package/dist/story/collect/parser.js +129 -2
- package/dist/story/collect/scanner.js +101 -2
- package/dist/story/collect/tree.js +110 -2
- package/dist/story/commands/build.js +172 -2
- package/dist/story/commands/dev.js +78 -2
- package/dist/story/commands/index.js +3 -2
- package/dist/story/commands/preview.js +56 -2
- package/dist/story/compiled-output.js +151 -2
- package/dist/story/composition.js +261 -2
- package/dist/story/config-watcher.js +67 -2
- package/dist/story/config.js +64 -2
- package/dist/story/context.js +27 -2
- package/dist/story/controls/index.js +320 -2
- package/dist/story/crosswind.js +189 -2
- package/dist/story/desktop-preview.js +105 -2
- package/dist/story/docs-generator.js +186 -2
- package/dist/story/errors.js +239 -2
- package/dist/story/figma-export.js +224 -2
- package/dist/story/generator.js +165 -2
- package/dist/story/hmr.js +131 -2
- package/dist/story/hot-swap.js +207 -2
- package/dist/story/index.js +49 -2
- package/dist/story/interactions.js +225 -2
- package/dist/story/keyboard-shortcuts.js +345 -2
- package/dist/story/output.js +153 -2
- package/dist/story/performance.js +252 -2
- package/dist/story/presets.js +289 -2
- package/dist/story/props-validation.js +215 -2
- package/dist/story/renderer.js +209 -2
- package/dist/story/search-index.js +106 -2
- package/dist/story/search.js +140 -2
- package/dist/story/server.js +965 -2
- package/dist/story/setup.js +78 -2
- package/dist/story/snapshots.js +170 -2
- package/dist/story/testing.js +163 -2
- package/dist/story/theme.js +170 -2
- package/dist/story/types.js +0 -2
- package/dist/story/ui/code-panel.js +175 -2
- package/dist/story/ui/controls-panel.js +168 -2
- package/dist/story/ui/index.js +4 -2
- package/dist/story/ui/navigation.js +250 -2
- package/dist/story/ui/preview.js +251 -2
- package/dist/story/visual-testing.js +247 -2
- package/dist/streaming.js +537 -2
- package/dist/strict-lint.js +288 -2
- package/dist/style-scoping.js +50 -2
- package/dist/suspense.js +398 -2
- package/dist/teleport.js +109 -2
- package/dist/template-compiler.js +63 -2
- package/dist/template-hydrator.js +82 -2
- package/dist/template-tag-balance.js +93 -2
- package/dist/testing.js +581 -2
- package/dist/transitions.js +443 -2
- package/dist/type-checker.js +581 -2
- package/dist/types/component-types.d.ts +54 -0
- package/dist/types/component-types.js +0 -1
- package/dist/types/config-types.js +0 -1
- package/dist/types/context-types.js +0 -1
- package/dist/types/csp-types.js +0 -1
- package/dist/types/directive-types.js +3 -2
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.js +1 -2
- package/dist/types/pwa-types.js +0 -1
- package/dist/types.js +1 -2
- package/dist/typescript-templates.js +386 -4
- package/dist/utils.js +942 -2
- package/dist/validator.js +171 -2
- package/dist/variable-extractor.js +1094 -2
- package/dist/view-composers.js +29 -2
- package/dist/virtual-scrolling.js +454 -2
- package/dist/visual-editor.js +688 -28
- package/dist/vue-template.js +475 -2
- package/dist/web-components/css-scoping.js +177 -2
- package/dist/web-components/index.js +13 -2
- package/dist/web-components/reactive-generator.js +121 -56
- package/dist/web-components.js +1447 -2
- package/dist/x-element.js +17 -5
- package/package.json +5 -6
- package/dist/chunk-04n64bnt.js +0 -5
- package/dist/chunk-06w68hyg.js +0 -7
- package/dist/chunk-07y6m5xx.js +0 -3
- package/dist/chunk-095s3972.js +0 -99
- package/dist/chunk-09k66d8a.js +0 -3
- package/dist/chunk-0a61y94n.js +0 -24
- package/dist/chunk-0b9w2w1y.js +0 -1
- package/dist/chunk-0dx4q6yq.js +0 -3
- package/dist/chunk-0dz85jrp.js +0 -3
- package/dist/chunk-0jd0pndq.js +0 -3
- package/dist/chunk-0p0nyq50.js +0 -6
- package/dist/chunk-0p1h3p3w.js +0 -3
- package/dist/chunk-0qakwen3.js +0 -1
- package/dist/chunk-0qnz93q2.js +0 -3
- package/dist/chunk-10debkj5.js +0 -71
- package/dist/chunk-15nesxgt.js +0 -5224
- package/dist/chunk-1sr54zp8.js +0 -3
- package/dist/chunk-1v49fwr5.js +0 -3
- package/dist/chunk-1xz0w746.js +0 -1539
- package/dist/chunk-1z5nhbjt.js +0 -90
- package/dist/chunk-1zgsgk4b.js +0 -1
- package/dist/chunk-20swzkx3.js +0 -216
- package/dist/chunk-27zsyhrd.js +0 -4
- package/dist/chunk-29y0hk5z.js +0 -3
- package/dist/chunk-2cdvw21b.js +0 -274
- package/dist/chunk-2j21d3ka.js +0 -161
- package/dist/chunk-2jxbwnkz.js +0 -2
- package/dist/chunk-31dr4bys.js +0 -6
- package/dist/chunk-35faj94w.js +0 -15
- package/dist/chunk-39gm08bn.js +0 -39
- package/dist/chunk-3a4qsygv.js +0 -51
- package/dist/chunk-3te20hqw.js +0 -3
- package/dist/chunk-43t7faps.js +0 -24
- package/dist/chunk-44hd3kab.js +0 -1
- package/dist/chunk-47kpewks.js +0 -71
- package/dist/chunk-4aj7ftqb.js +0 -1
- package/dist/chunk-4d2y57k7.js +0 -3
- package/dist/chunk-4deg33rw.js +0 -57
- package/dist/chunk-4k7d8p8d.js +0 -188
- package/dist/chunk-4qcy5tx6.js +0 -53
- package/dist/chunk-4x7kae4j.js +0 -3
- package/dist/chunk-55nwdnsd.js +0 -3
- package/dist/chunk-55yp0q8t.js +0 -201
- package/dist/chunk-5f43yz6z.js +0 -12
- package/dist/chunk-5shey2e4.js +0 -3
- package/dist/chunk-6b5k6w2q.js +0 -7
- package/dist/chunk-6djzdes9.js +0 -14
- package/dist/chunk-6e4c6g46.js +0 -3
- package/dist/chunk-6eqbxcrd.js +0 -8
- package/dist/chunk-7074g241.js +0 -3
- package/dist/chunk-7b6s3g65.js +0 -179
- package/dist/chunk-7cgmq685.js +0 -33
- package/dist/chunk-7dkz6z2s.js +0 -3
- package/dist/chunk-7ed3tean.js +0 -3
- package/dist/chunk-7gd339hd.js +0 -109
- package/dist/chunk-7j5e8sdj.js +0 -3
- package/dist/chunk-7n8g0nfn.js +0 -38
- package/dist/chunk-7sqdeqsw.js +0 -1
- package/dist/chunk-80g54ncj.js +0 -3
- package/dist/chunk-8a5bxece.js +0 -4
- package/dist/chunk-8ahwt6a4.js +0 -721
- package/dist/chunk-8b3z0zd5.js +0 -8
- package/dist/chunk-8dhdpa5h.js +0 -4
- package/dist/chunk-8n9nnqr6.js +0 -3
- package/dist/chunk-8qc1bsym.js +0 -3
- package/dist/chunk-8va64c9n.js +0 -3
- package/dist/chunk-8vtm0m84.js +0 -3
- package/dist/chunk-8xj7c3mf.js +0 -8
- package/dist/chunk-988dw6q3.js +0 -9
- package/dist/chunk-9b6cec0v.js +0 -321
- package/dist/chunk-9cf97f9p.js +0 -3
- package/dist/chunk-9ecv8aqj.js +0 -14
- package/dist/chunk-9eq3ht5f.js +0 -8
- package/dist/chunk-9jtj77jx.js +0 -3
- package/dist/chunk-9t14se2t.js +0 -83
- package/dist/chunk-9wmq2272.js +0 -3
- package/dist/chunk-9zbk5zx5.js +0 -57
- package/dist/chunk-a2g2qb2y.js +0 -386
- package/dist/chunk-a3hyn4we.js +0 -79
- package/dist/chunk-a87qqft6.js +0 -194
- package/dist/chunk-ah88wzbg.js +0 -10
- package/dist/chunk-akf1r75r.js +0 -102
- package/dist/chunk-amaa1bev.js +0 -2
- package/dist/chunk-avx8aydt.js +0 -3
- package/dist/chunk-ay9qf4zj.js +0 -6
- package/dist/chunk-aywxfqev.js +0 -3
- package/dist/chunk-azkegjd8.js +0 -61
- package/dist/chunk-b77wjyn7.js +0 -84
- package/dist/chunk-baf1hfwh.js +0 -231
- package/dist/chunk-bdk6g1vj.js +0 -3
- package/dist/chunk-bhqgmyqw.js +0 -36
- package/dist/chunk-bk3j0n82.js +0 -341
- package/dist/chunk-bndmdahk.js +0 -3
- package/dist/chunk-bpgg59wa.js +0 -3
- package/dist/chunk-bs3gmfxz.js +0 -5
- package/dist/chunk-bxc7kjsk.js +0 -32
- package/dist/chunk-c7jg8w13.js +0 -3
- package/dist/chunk-ckxjqqn9.js +0 -3
- package/dist/chunk-cn8az1b4.js +0 -1
- package/dist/chunk-d0zjtdw4.js +0 -29
- package/dist/chunk-d1qh1x2g.js +0 -3
- package/dist/chunk-djddhmcc.js +0 -60
- package/dist/chunk-dqn9gyhb.js +0 -21
- package/dist/chunk-drjq2zwg.js +0 -3
- package/dist/chunk-dvfs1h3c.js +0 -117
- package/dist/chunk-e2q9c5vq.js +0 -8
- package/dist/chunk-e98v1bc6.js +0 -12
- package/dist/chunk-ejayeex8.js +0 -2
- package/dist/chunk-ejh8fyak.js +0 -3
- package/dist/chunk-ek2w6zvy.js +0 -4
- package/dist/chunk-ewa88139.js +0 -6
- package/dist/chunk-fjk3x41y.js +0 -3
- package/dist/chunk-frg705zq.js +0 -302
- package/dist/chunk-fzm3y0r3.js +0 -267
- package/dist/chunk-g1vt329s.js +0 -21
- package/dist/chunk-g4ps1dj8.js +0 -140
- package/dist/chunk-gkzq8zw4.js +0 -23
- package/dist/chunk-gz5fmp3q.js +0 -3
- package/dist/chunk-h0hjy0kn.js +0 -292
- package/dist/chunk-h5jxydqq.js +0 -147
- package/dist/chunk-h5wa62ek.js +0 -145
- package/dist/chunk-h7aq56qj.js +0 -28
- package/dist/chunk-h82kjdr4.js +0 -83
- package/dist/chunk-hbehnm18.js +0 -3
- package/dist/chunk-hbgxbgam.js +0 -58
- package/dist/chunk-hc2mf5h6.js +0 -4
- package/dist/chunk-hjm2xab3.js +0 -3
- package/dist/chunk-hjv76kcw.js +0 -1
- package/dist/chunk-hrnnh4tq.js +0 -142
- package/dist/chunk-ht43ds42.js +0 -236
- package/dist/chunk-hxx3za24.js +0 -62
- package/dist/chunk-hy8820vc.js +0 -6
- package/dist/chunk-j447q024.js +0 -28
- package/dist/chunk-j58vh0w6.js +0 -314
- package/dist/chunk-j8tn8enq.js +0 -3
- package/dist/chunk-jc0fc4ht.js +0 -11
- package/dist/chunk-jcs0ymw7.js +0 -3
- package/dist/chunk-jjamhxpm.js +0 -139
- package/dist/chunk-jjb05d21.js +0 -3
- package/dist/chunk-jjdq01dv.js +0 -128
- package/dist/chunk-jnmgm2xw.js +0 -5
- package/dist/chunk-jpndqst5.js +0 -3
- package/dist/chunk-jt0ezawy.js +0 -351
- package/dist/chunk-jz73j3qs.js +0 -169
- package/dist/chunk-k21df0pg.js +0 -10
- package/dist/chunk-k848dzsa.js +0 -429
- package/dist/chunk-kdfe4t91.js +0 -3
- package/dist/chunk-keawsbpn.js +0 -5
- package/dist/chunk-kgym7ch9.js +0 -8
- package/dist/chunk-khdn7jwe.js +0 -3
- package/dist/chunk-km25cwz6.js +0 -3
- package/dist/chunk-knm8a8yx.js +0 -398
- package/dist/chunk-krqn0ddk.js +0 -3
- package/dist/chunk-ktkmvaa8.js +0 -1
- package/dist/chunk-kx6eb6ma.js +0 -4
- package/dist/chunk-kypas8vy.js +0 -4
- package/dist/chunk-m167kjhv.js +0 -4
- package/dist/chunk-m491r0rj.js +0 -358
- package/dist/chunk-m8448qby.js +0 -11
- package/dist/chunk-mgj88zeq.js +0 -64
- package/dist/chunk-mhgk632d.js +0 -3
- package/dist/chunk-mv4fb50w.js +0 -1
- package/dist/chunk-n5kg7fpx.js +0 -7
- package/dist/chunk-n98x35xd.js +0 -8
- package/dist/chunk-n9dhs1dw.js +0 -106
- package/dist/chunk-nd9rmddh.js +0 -6
- package/dist/chunk-ngxfwzq3.js +0 -3
- package/dist/chunk-nhv099jv.js +0 -19
- package/dist/chunk-nm15ccsg.js +0 -5
- package/dist/chunk-npfmdb6y.js +0 -71
- package/dist/chunk-nvwb4x04.js +0 -3
- package/dist/chunk-nw34xajc.js +0 -8
- package/dist/chunk-p077sw22.js +0 -3
- package/dist/chunk-p1h8065h.js +0 -3
- package/dist/chunk-p3e0cqtt.js +0 -34
- package/dist/chunk-p3fpb79v.js +0 -477
- package/dist/chunk-p52yzjq6.js +0 -498
- package/dist/chunk-p73meypx.js +0 -134
- package/dist/chunk-pa9zb7ty.js +0 -4
- package/dist/chunk-payfb24w.js +0 -207
- package/dist/chunk-pcm1vd8w.js +0 -3
- package/dist/chunk-pcntd9h4.js +0 -3
- package/dist/chunk-pg1fvqb9.js +0 -167
- package/dist/chunk-psc3wfcf.js +0 -1115
- package/dist/chunk-pznnww6k.js +0 -6
- package/dist/chunk-q6zhd9yf.js +0 -3
- package/dist/chunk-qa59zejf.js +0 -246
- package/dist/chunk-qvrbjpdc.js +0 -3
- package/dist/chunk-qygvvygy.js +0 -12
- package/dist/chunk-r0jcmpv6.js +0 -68
- package/dist/chunk-r5m9xtm7.js +0 -3
- package/dist/chunk-rh80q1nd.js +0 -1
- package/dist/chunk-rkffm9sy.js +0 -128
- package/dist/chunk-rpx5fa65.js +0 -3
- package/dist/chunk-rqxf5hns.js +0 -3
- package/dist/chunk-rtr974rc.js +0 -30
- package/dist/chunk-rvptcndz.js +0 -3
- package/dist/chunk-rw26rpek.js +0 -171
- package/dist/chunk-rw7937v4.js +0 -19
- package/dist/chunk-rwrv9wbf.js +0 -3
- package/dist/chunk-rz2ec6g7.js +0 -347
- package/dist/chunk-s6ja2bdg.js +0 -66
- package/dist/chunk-scpkdrdb.js +0 -4
- package/dist/chunk-shv88d2d.js +0 -10
- package/dist/chunk-t0c9wvpr.js +0 -3
- package/dist/chunk-tffh3b1e.js +0 -35
- package/dist/chunk-tg2f1mzq.js +0 -11
- package/dist/chunk-trfswy66.js +0 -77
- package/dist/chunk-tzwtg722.js +0 -3
- package/dist/chunk-v7f8jj15.js +0 -4
- package/dist/chunk-v8j49spx.js +0 -3
- package/dist/chunk-v97390pe.js +0 -1
- package/dist/chunk-vcr5pzpx.js +0 -233
- package/dist/chunk-veeerpwa.js +0 -3
- package/dist/chunk-vg5kt6az.js +0 -4
- package/dist/chunk-vgv7jvyz.js +0 -219
- package/dist/chunk-vjbefncc.js +0 -3
- package/dist/chunk-vmxjghsm.js +0 -3
- package/dist/chunk-vw7vqd76.js +0 -3
- package/dist/chunk-vx22he47.js +0 -1
- package/dist/chunk-w3b6m427.js +0 -45
- package/dist/chunk-wazkqv7n.js +0 -3
- package/dist/chunk-wf7zrjsw.js +0 -138
- package/dist/chunk-wfg2gm11.js +0 -3
- package/dist/chunk-wg9k6h8w.js +0 -12
- package/dist/chunk-wkz2vwkr.js +0 -81
- package/dist/chunk-wvef3ngh.js +0 -127
- package/dist/chunk-wvf31nzs.js +0 -3
- package/dist/chunk-x05nxhyv.js +0 -262
- package/dist/chunk-x0770gt9.js +0 -4
- package/dist/chunk-x24s4heg.js +0 -1166
- package/dist/chunk-x3r64r0c.js +0 -6
- package/dist/chunk-x5g9w4hh.js +0 -5
- package/dist/chunk-xgkv66q5.js +0 -2230
- package/dist/chunk-xqq1vxb6.js +0 -1
- package/dist/chunk-xs03kc1h.js +0 -196
- package/dist/chunk-xv34zbp4.js +0 -3
- package/dist/chunk-xw36p73h.js +0 -90
- package/dist/chunk-xyg1r5w0.js +0 -4
- package/dist/chunk-xys2sxh6.js +0 -16
- package/dist/chunk-y0qg6rrv.js +0 -3
- package/dist/chunk-y1k17c8b.js +0 -21
- package/dist/chunk-y5xz0jc4.js +0 -141
- package/dist/chunk-y6xsqe9a.js +0 -10
- package/dist/chunk-yb1t2h8h.js +0 -11
- package/dist/chunk-ygvyc6wv.js +0 -90
- package/dist/chunk-yj4x5ehw.js +0 -21
- package/dist/chunk-yn38c15w.js +0 -4
- package/dist/chunk-ynhngsdh.js +0 -3
- package/dist/chunk-yrsb6j3z.js +0 -3
- package/dist/chunk-yywfvfph.js +0 -2
- package/dist/chunk-zcxzdrn7.js +0 -5
- package/dist/chunk-zen6ax1y.js +0 -27
- package/dist/chunk-zf2pek72.js +0 -3
- package/dist/chunk-zk3d0jjf.js +0 -7
- package/dist/chunk-zy3rp1ab.js +0 -93
package/dist/chunk-bk3j0n82.js
DELETED
|
@@ -1,341 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
var J=0;function K(){return`suspense-${++J}-${Date.now().toString(36)}`}function N(q,v={},w){let j=/@suspense(?:\s*\(([^)]*)\))?\s*([\s\S]*?)@fallback\s*([\s\S]*?)@endsuspense/gi;return q.replace(j,(z,A,B,D)=>{let E=K(),F=L(A||"");return M(E,B.trim(),D.trim(),F)})}function L(q){let v={},w=/(\w+)\s*:\s*(?:'([^']*)'|"([^"]*)"|(\d+)|(\w+))/g,j;while((j=w.exec(q))!==null){let z=j[1],A=j[2]||j[3],B=j[4];switch(z){case"id":v.id=A;break;case"timeout":v.timeout=B?parseInt(B,10):void 0;break}}return v}function M(q,v,w,j){let z=j.timeout||30000,A=j.id||q;return`
|
|
3
|
-
<div class="stx-suspense" data-suspense-id="${q}" data-custom-id="${A}" data-status="pending">
|
|
4
|
-
<div class="stx-suspense-fallback" data-suspense-fallback="${q}">
|
|
5
|
-
${w}
|
|
6
|
-
</div>
|
|
7
|
-
<div class="stx-suspense-content" data-suspense-content="${q}" style="display: none;">
|
|
8
|
-
${v}
|
|
9
|
-
</div>
|
|
10
|
-
</div>
|
|
11
|
-
<script>
|
|
12
|
-
(function() {
|
|
13
|
-
const suspenseId = '${q}';
|
|
14
|
-
const customId = '${A}';
|
|
15
|
-
const timeout = ${z};
|
|
16
|
-
|
|
17
|
-
const container = document.querySelector('[data-suspense-id="' + suspenseId + '"]');
|
|
18
|
-
const fallbackEl = document.querySelector('[data-suspense-fallback="' + suspenseId + '"]');
|
|
19
|
-
const contentEl = document.querySelector('[data-suspense-content="' + suspenseId + '"]');
|
|
20
|
-
|
|
21
|
-
if (!container || !fallbackEl || !contentEl) return;
|
|
22
|
-
|
|
23
|
-
// State
|
|
24
|
-
const pending = new Set();
|
|
25
|
-
const resolved = new Set();
|
|
26
|
-
let status = 'pending';
|
|
27
|
-
let error = null;
|
|
28
|
-
let timeoutTimer = null;
|
|
29
|
-
|
|
30
|
-
// Update UI based on state
|
|
31
|
-
function updateUI() {
|
|
32
|
-
container.setAttribute('data-status', status);
|
|
33
|
-
|
|
34
|
-
if (status === 'resolved') {
|
|
35
|
-
fallbackEl.style.display = 'none';
|
|
36
|
-
contentEl.style.display = '';
|
|
37
|
-
}
|
|
38
|
-
else if (status === 'rejected') {
|
|
39
|
-
fallbackEl.style.display = 'none';
|
|
40
|
-
contentEl.style.display = '';
|
|
41
|
-
// Show error in content area if needed
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
fallbackEl.style.display = '';
|
|
45
|
-
contentEl.style.display = 'none';
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// Check if all children are resolved
|
|
50
|
-
function checkResolved() {
|
|
51
|
-
if (pending.size === 0 && resolved.size > 0) {
|
|
52
|
-
clearTimeout(timeoutTimer);
|
|
53
|
-
status = 'resolved';
|
|
54
|
-
updateUI();
|
|
55
|
-
|
|
56
|
-
container.dispatchEvent(new CustomEvent('stx:suspense:resolved', {
|
|
57
|
-
detail: { suspenseId: suspenseId, customId: customId },
|
|
58
|
-
bubbles: true
|
|
59
|
-
}));
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// Register an async child
|
|
64
|
-
function register(childId) {
|
|
65
|
-
if (status === 'resolved') {
|
|
66
|
-
// Reset if we get a new child after resolution
|
|
67
|
-
status = 'pending';
|
|
68
|
-
updateUI();
|
|
69
|
-
}
|
|
70
|
-
pending.add(childId);
|
|
71
|
-
|
|
72
|
-
// Start timeout on first registration
|
|
73
|
-
if (pending.size === 1 && !timeoutTimer) {
|
|
74
|
-
timeoutTimer = setTimeout(function() {
|
|
75
|
-
if (status === 'pending') {
|
|
76
|
-
error = new Error('Suspense timeout after ' + timeout + 'ms');
|
|
77
|
-
status = 'rejected';
|
|
78
|
-
updateUI();
|
|
79
|
-
|
|
80
|
-
container.dispatchEvent(new CustomEvent('stx:suspense:timeout', {
|
|
81
|
-
detail: { suspenseId: suspenseId, customId: customId, pending: Array.from(pending) },
|
|
82
|
-
bubbles: true
|
|
83
|
-
}));
|
|
84
|
-
}
|
|
85
|
-
}, timeout);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// Resolve a child
|
|
90
|
-
function resolve(childId) {
|
|
91
|
-
pending.delete(childId);
|
|
92
|
-
resolved.add(childId);
|
|
93
|
-
checkResolved();
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// Reject a child
|
|
97
|
-
function reject(childId, err) {
|
|
98
|
-
pending.delete(childId);
|
|
99
|
-
error = err;
|
|
100
|
-
status = 'rejected';
|
|
101
|
-
clearTimeout(timeoutTimer);
|
|
102
|
-
updateUI();
|
|
103
|
-
|
|
104
|
-
container.dispatchEvent(new CustomEvent('stx:suspense:error', {
|
|
105
|
-
detail: { suspenseId: suspenseId, customId: customId, error: err, childId: childId },
|
|
106
|
-
bubbles: true
|
|
107
|
-
}));
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
// Reset the boundary
|
|
111
|
-
function reset() {
|
|
112
|
-
pending.clear();
|
|
113
|
-
resolved.clear();
|
|
114
|
-
status = 'pending';
|
|
115
|
-
error = null;
|
|
116
|
-
clearTimeout(timeoutTimer);
|
|
117
|
-
timeoutTimer = null;
|
|
118
|
-
updateUI();
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
// Expose API globally for async components to use
|
|
122
|
-
window.STX = window.STX || {};
|
|
123
|
-
window.STX.suspense = window.STX.suspense || {
|
|
124
|
-
boundaries: {},
|
|
125
|
-
// Find the nearest suspense boundary for a child
|
|
126
|
-
findBoundary: function(element) {
|
|
127
|
-
const boundary = element.closest('[data-suspense-id]');
|
|
128
|
-
if (boundary) {
|
|
129
|
-
return boundary.getAttribute('data-suspense-id');
|
|
130
|
-
}
|
|
131
|
-
return null;
|
|
132
|
-
},
|
|
133
|
-
register: function(childId, boundaryId) {
|
|
134
|
-
if (!boundaryId) {
|
|
135
|
-
// Find nearest boundary
|
|
136
|
-
const asyncEl = document.querySelector('[data-async-id="' + childId + '"]');
|
|
137
|
-
if (asyncEl) {
|
|
138
|
-
boundaryId = this.findBoundary(asyncEl);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
if (boundaryId && this.boundaries[boundaryId]) {
|
|
142
|
-
this.boundaries[boundaryId].register(childId);
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
resolve: function(childId, boundaryId) {
|
|
146
|
-
if (!boundaryId) {
|
|
147
|
-
const asyncEl = document.querySelector('[data-async-id="' + childId + '"]');
|
|
148
|
-
if (asyncEl) {
|
|
149
|
-
boundaryId = this.findBoundary(asyncEl);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
if (boundaryId && this.boundaries[boundaryId]) {
|
|
153
|
-
this.boundaries[boundaryId].resolve(childId);
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
reject: function(childId, error, boundaryId) {
|
|
157
|
-
if (!boundaryId) {
|
|
158
|
-
const asyncEl = document.querySelector('[data-async-id="' + childId + '"]');
|
|
159
|
-
if (asyncEl) {
|
|
160
|
-
boundaryId = this.findBoundary(asyncEl);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
if (boundaryId && this.boundaries[boundaryId]) {
|
|
164
|
-
this.boundaries[boundaryId].reject(childId, error);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
// Register this boundary
|
|
170
|
-
window.STX.suspense.boundaries[suspenseId] = {
|
|
171
|
-
id: suspenseId,
|
|
172
|
-
customId: customId,
|
|
173
|
-
getStatus: function() { return status; },
|
|
174
|
-
getPending: function() { return Array.from(pending); },
|
|
175
|
-
getResolved: function() { return Array.from(resolved); },
|
|
176
|
-
getError: function() { return error; },
|
|
177
|
-
register: register,
|
|
178
|
-
resolve: resolve,
|
|
179
|
-
reject: reject,
|
|
180
|
-
reset: reset
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
// Initial state - if no async children register within a tick, show content
|
|
184
|
-
setTimeout(function() {
|
|
185
|
-
if (pending.size === 0 && resolved.size === 0) {
|
|
186
|
-
status = 'resolved';
|
|
187
|
-
updateUI();
|
|
188
|
-
}
|
|
189
|
-
}, 0);
|
|
190
|
-
})();
|
|
191
|
-
</script>
|
|
192
|
-
`}function Q(q,v,w){return{id:q,fallback:w,content:v}}async function T(q){let v=q.map((j)=>`
|
|
193
|
-
<div id="stx-ssr-suspense-${j.id}" class="stx-ssr-suspense">
|
|
194
|
-
${j.fallback}
|
|
195
|
-
</div>
|
|
196
|
-
`).join(`
|
|
197
|
-
`);async function*w(){for(let j of q)try{let z=await j.content;yield`
|
|
198
|
-
<script>
|
|
199
|
-
(function() {
|
|
200
|
-
const el = document.getElementById('stx-ssr-suspense-${j.id}');
|
|
201
|
-
if (el) {
|
|
202
|
-
el.innerHTML = ${JSON.stringify(z)};
|
|
203
|
-
el.classList.add('stx-ssr-suspense-resolved');
|
|
204
|
-
}
|
|
205
|
-
})();
|
|
206
|
-
</script>
|
|
207
|
-
`}catch(z){yield`
|
|
208
|
-
<script>
|
|
209
|
-
(function() {
|
|
210
|
-
const el = document.getElementById('stx-ssr-suspense-${j.id}');
|
|
211
|
-
if (el) {
|
|
212
|
-
el.classList.add('stx-ssr-suspense-error');
|
|
213
|
-
console.error('SSR Suspense error for ${j.id}:', ${JSON.stringify(String(z))});
|
|
214
|
-
}
|
|
215
|
-
})();
|
|
216
|
-
</script>
|
|
217
|
-
`}}return{initial:v,streaming:w()}}function U(){return`
|
|
218
|
-
/* STX Suspense Styles */
|
|
219
|
-
.stx-suspense {
|
|
220
|
-
position: relative;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.stx-suspense[data-status="pending"] .stx-suspense-fallback {
|
|
224
|
-
display: block;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.stx-suspense[data-status="pending"] .stx-suspense-content {
|
|
228
|
-
display: none;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.stx-suspense[data-status="resolved"] .stx-suspense-fallback {
|
|
232
|
-
display: none;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
.stx-suspense[data-status="resolved"] .stx-suspense-content {
|
|
236
|
-
display: block;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
/* SSR Suspense */
|
|
240
|
-
.stx-ssr-suspense {
|
|
241
|
-
transition: opacity 0.3s ease;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
.stx-ssr-suspense-resolved {
|
|
245
|
-
animation: stx-suspense-fade-in 0.3s ease;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
@keyframes stx-suspense-fade-in {
|
|
249
|
-
from { opacity: 0; }
|
|
250
|
-
to { opacity: 1; }
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
/* Skeleton fallback helper */
|
|
254
|
-
.stx-suspense-skeleton {
|
|
255
|
-
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
|
256
|
-
background-size: 200% 100%;
|
|
257
|
-
animation: stx-suspense-shimmer 1.5s infinite;
|
|
258
|
-
border-radius: 0.25rem;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
@keyframes stx-suspense-shimmer {
|
|
262
|
-
0% { background-position: 200% 0; }
|
|
263
|
-
100% { background-position: -200% 0; }
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
/* Dark mode */
|
|
267
|
-
@media (prefers-color-scheme: dark) {
|
|
268
|
-
.stx-suspense-skeleton {
|
|
269
|
-
background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
|
|
270
|
-
background-size: 200% 100%;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
`}function W(){return`
|
|
274
|
-
// STX Suspense Runtime
|
|
275
|
-
(function() {
|
|
276
|
-
if (typeof window === 'undefined') return;
|
|
277
|
-
|
|
278
|
-
window.STX = window.STX || {};
|
|
279
|
-
|
|
280
|
-
// Suspense boundary management is set up per-boundary in the HTML
|
|
281
|
-
// This just provides additional utilities
|
|
282
|
-
|
|
283
|
-
window.STX.suspense = window.STX.suspense || {
|
|
284
|
-
boundaries: {},
|
|
285
|
-
findBoundary: function(element) {
|
|
286
|
-
const boundary = element.closest('[data-suspense-id]');
|
|
287
|
-
return boundary ? boundary.getAttribute('data-suspense-id') : null;
|
|
288
|
-
},
|
|
289
|
-
register: function(childId, boundaryId) {},
|
|
290
|
-
resolve: function(childId, boundaryId) {},
|
|
291
|
-
reject: function(childId, error, boundaryId) {}
|
|
292
|
-
};
|
|
293
|
-
|
|
294
|
-
// Wait for all suspense boundaries to resolve
|
|
295
|
-
window.STX.suspense.waitForAll = function() {
|
|
296
|
-
return new Promise(function(resolve, reject) {
|
|
297
|
-
const boundaries = Object.values(window.STX.suspense.boundaries);
|
|
298
|
-
if (boundaries.length === 0) {
|
|
299
|
-
resolve();
|
|
300
|
-
return;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
let resolved = 0;
|
|
304
|
-
let rejected = false;
|
|
305
|
-
|
|
306
|
-
boundaries.forEach(function(boundary) {
|
|
307
|
-
if (boundary.getStatus() === 'resolved') {
|
|
308
|
-
resolved++;
|
|
309
|
-
if (resolved === boundaries.length) resolve();
|
|
310
|
-
}
|
|
311
|
-
else if (boundary.getStatus() === 'rejected') {
|
|
312
|
-
if (!rejected) {
|
|
313
|
-
rejected = true;
|
|
314
|
-
reject(boundary.getError());
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
else {
|
|
318
|
-
// Listen for resolution
|
|
319
|
-
const container = document.querySelector('[data-suspense-id="' + boundary.id + '"]');
|
|
320
|
-
if (container) {
|
|
321
|
-
container.addEventListener('stx:suspense:resolved', function() {
|
|
322
|
-
resolved++;
|
|
323
|
-
if (resolved === boundaries.length && !rejected) resolve();
|
|
324
|
-
}, { once: true });
|
|
325
|
-
|
|
326
|
-
container.addEventListener('stx:suspense:error', function(e) {
|
|
327
|
-
if (!rejected) {
|
|
328
|
-
rejected = true;
|
|
329
|
-
reject(e.detail.error);
|
|
330
|
-
}
|
|
331
|
-
}, { once: true });
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
});
|
|
335
|
-
});
|
|
336
|
-
};
|
|
337
|
-
|
|
338
|
-
console.log('[stx] Suspense runtime initialized');
|
|
339
|
-
})();
|
|
340
|
-
`}
|
|
341
|
-
export{N as Jf,Q as Kf,T as Lf,U as Mf,W as Nf};
|
package/dist/chunk-bndmdahk.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Hk as x,Ik as C}from"./chunk-khdn7jwe.js";import{Vk as U,_k as k}from"./chunk-jpndqst5.js";import{pB as q}from"./chunk-xv34zbp4.js";import{resolve as B,basename as F,extname as T,join as z}from"path";import{mkdir as R}from"fs/promises";async function X(){try{return await import("ts-images")}catch{return null}}function A(K){switch(K){case"quality":return{jpeg:{quality:90,mozjpeg:!0,progressive:!0},png:{compressionLevel:6,palette:!1},webp:{quality:90,effort:6,smartSubsample:!0},avif:{quality:85,effort:6}};case"performance":return{jpeg:{quality:70,mozjpeg:!0,progressive:!0},png:{compressionLevel:9,palette:!0},webp:{quality:70,effort:4,smartSubsample:!0},avif:{quality:60,effort:2}};case"web":default:return{jpeg:{quality:82,mozjpeg:!0,progressive:!0},png:{compressionLevel:8,palette:!1},webp:{quality:82,effort:5,smartSubsample:!0},avif:{quality:75,effort:4}}}}function P(K,L){let N=L?A(L):A("web"),G=K.formatQuality||{};return{jpeg:{...N.jpeg,...G.jpeg},png:{...N.png,...G.png},webp:{...N.webp,...G.webp},avif:{...N.avif,...G.avif}}}async function f(K,L,N){let G=await X();if(!G)return console.warn("[stx-media] ts-images not installed, skipping optimization"),{src:K,processed:!1};let w=await x(K,L,N);if(w)return w;try{let O=B(K);if(!await k(O))return{src:K,processed:!1,errors:[`Source file not found: ${K}`]};let J=P(N,L.preset),Y=N.outputDir||"dist/images",E=N.baseUrl||"/images";await R(Y,{recursive:!0});let Z=await U(O),H=F(K,T(K)),S=L.outputFormat?[L.outputFormat]:N.defaultFormats||["avif","webp","jpeg"],M={src:K,processed:!0,variants:[],hash:Z},_=null;if(L.transformations&&L.transformations.length>0)_=await d(O,L.transformations,G);for(let V of S){let $=J[V]||{},j=`${H}-${Z}.${V}`,v=z(Y,j);try{let W=await G.optimizeImage({input:_||O,output:v,format:V,quality:$.quality,progressive:$.progressive});if(W){if(M.variants.push({path:v,url:`${E}/${j}`,width:W.width||0,height:W.height||0,format:V,size:W.outputSize||0}),!M.originalWidth&&W.width)M.originalWidth=W.width,M.originalHeight=W.height}}catch(W){M.errors=M.errors||[],M.errors.push(`Failed to optimize ${V}: ${W}`)}}if(L.embedThumbhash||L.placeholder==="thumbhash")try{let V=await G.generateThumbHash(O);M.placeholder=V.dataUrl}catch(V){M.errors=M.errors||[],M.errors.push(`Failed to generate thumbhash: ${V}`)}if(L.useDominantColor)try{let V=await G.generatePlaceholder(O,{strategy:"dominant-color"});M.dominantColor=V.dominantColor}catch(V){M.errors=M.errors||[],M.errors.push(`Failed to extract dominant color: ${V}`)}return await C(K,L,M,N),M}catch(O){return{src:K,processed:!1,errors:[`Processing failed: ${O}`]}}}async function n(K,L,N,G){let w=await X();if(!w)return{success:!1,error:"ts-images not installed"};try{return{success:!0,size:(await w.optimizeImage({input:K,output:G,format:L,quality:N}))?.outputSize}}catch(O){return{success:!1,error:String(O)}}}async function d(K,L,N){let G=N||await X();if(!G)return console.warn("[stx-media] ts-images not installed, skipping transformations"),null;try{let w=await G.decode(K);for(let O of L){let J=O.options||{};switch(O.type){case"resize":if(J.width||J.height)w=await G.resize(w,{width:J.width,height:J.height,fit:J.fit});break;case"blur":if(J.sigma!==void 0)w=await G.blur(w,J.sigma);break;case"sharpen":if(J.amount!==void 0)w=await G.sharpen(w,J.amount);break;case"grayscale":w=await G.grayscale(w);break;case"rotate":if(J.angle!==void 0)w=await G.rotate(w,J.angle);break;case"flip":w=await G.flip(w);break;case"flop":w=await G.flop(w);break;case"brightness":if(J.value!==void 0)w=await G.brightness(w,J.value);break;case"contrast":if(J.value!==void 0)w=await G.contrast(w,J.value);break;case"saturation":if(J.value!==void 0)w=await G.saturation(w,J.value);break}}return await G.encode(w,"png")}catch(w){return console.error(`[stx-media] Transformation failed: ${w}`),null}}
|
|
3
|
-
export{f as Dk,n as Ek,d as Fk};
|
package/dist/chunk-bpgg59wa.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import Z from"fs";import Y from"path";async function _(j){let{root:q,config:B}=j,J=[],H=await E(q,B.storyMatch,B.storyIgnored);for(let Q of H){let L=Y.resolve(q,Q),V=$(Q,L);J.push(V)}return J}async function E(j,q,B){let J=[];async function H(Q,L){let V=await Z.promises.readdir(Q,{withFileTypes:!0});for(let K of V){let X=Y.join(Q,K.name),U=Y.relative(L,X);if(A(U,B))continue;if(K.isDirectory())await H(X,L);else if(K.isFile()){if(W(U,q))J.push(U)}}}return await H(j,j),J}function A(j,q){for(let B of q)if(z(j,B))return!0;return!1}var I=["**/layouts/**","**/pages/**","**/partials/**","**/_*.stx","**/layout.stx","**/page.stx","**/error.stx","**/loading.stx"];function k(j){for(let q of I)if(z(j,q))return!0;return!1}function W(j,q){for(let B of q)if(z(j,B))return!0;return!1}function z(j,q){let B=j.replace(/\\/g,"/"),H=q.replace(/\\/g,"/").replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*\*/g,"{{GLOBSTAR}}").replace(/\*/g,"[^/]*").replace(/\?/g,".").replace(/\{\{GLOBSTAR\}\}/g,".*");return H=`^${H}$`,new RegExp(H).test(B)}function $(j,q){let B=Y.basename(j,".story.stx");return{id:j.toLowerCase().replace(/\.story\.stx$/,"").replace(/[/\\]/g,"-").replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),path:q,relativePath:j,fileName:B,treeFile:{title:B,path:j}}}function G(j,q){let{root:B,config:J}=j,H=[],Q=Z.watch(B,{recursive:!0},async(L,V)=>{if(!V)return;let K=V.replace(/\\/g,"/");if(!W(K,J.storyMatch))return;if(A(K,J.storyIgnored))return;let X=Y.resolve(B,K);try{await Z.promises.access(X);let U=$(K,X);q(L==="rename"?"add":"change",U)}catch{let U=$(K,X);q("unlink",U)}});return H.push(Q),()=>{for(let L of H)L.close()}}
|
|
3
|
-
export{_ as fd,k as gd,G as hd};
|
package/dist/chunk-bs3gmfxz.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
class J{source;pos=0;line=1;column=0;tokens=[];constructor(b){this.source=b}tokenize(){this.tokens=[],this.pos=0,this.line=1,this.column=0;while(this.pos<this.source.length){let b=this.nextToken();if(b)this.tokens.push(b)}return this.tokens.push({type:"EOF",value:"",start:this.pos,end:this.pos,line:this.line,column:this.column}),this.tokens}nextToken(){if(this.pos>=this.source.length)return null;let b=this.pos,w=this.line,j=this.column,v=this.source[this.pos];if(/\s/.test(v))return this.readWhitespace(b,w,j);if(v==="/"&&this.peek(1)==="/")return this.readLineComment(b,w,j);if(v==="/"&&this.peek(1)==="*")return this.readBlockComment(b,w,j);if(v==='"'||v==="'")return this.readString(v,b,w,j);if(v==="`")return this.readTemplateString(b,w,j);if(/\d/.test(v)||v==="."&&/\d/.test(this.peek(1)||""))return this.readNumber(b,w,j);if(/[a-z_$]/i.test(v))return this.readIdentifier(b,w,j);if(v==="{"){if(this.peek(1)==="{"&&this.peek(2)==="{")return this.advance(3),{type:"RAW_START",value:"{{{",start:b,end:this.pos,line:w,column:j};if(this.peek(1)==="{")return this.advance(2),{type:"EXPRESSION_START",value:"{{",start:b,end:this.pos,line:w,column:j};if(this.peek(1)==="!"&&this.peek(2)==="!")return this.advance(3),{type:"RAW_START",value:"{!!",start:b,end:this.pos,line:w,column:j}}if(v==="}"){if(this.peek(1)==="}"&&this.peek(2)==="}")return this.advance(3),{type:"RAW_END",value:"}}}",start:b,end:this.pos,line:w,column:j};if(this.peek(1)==="}")return this.advance(2),{type:"EXPRESSION_END",value:"}}",start:b,end:this.pos,line:w,column:j}}if(v==="!"&&this.peek(1)==="!"&&this.peek(2)==="}")return this.advance(3),{type:"RAW_END",value:"!!}",start:b,end:this.pos,line:w,column:j};if(v==="@"&&/[a-z]/i.test(this.peek(1)||""))return this.readDirective(b,w,j);let z=["===","!==","==","!=","<=",">=","&&","||","??","++","--","+=","-=","*=","/=","%=","**","=>","?.","...","<<",">>",">>>","&=","|=","^="];for(let B of z)if(this.source.slice(this.pos,this.pos+B.length)===B)return this.advance(B.length),{type:"OPERATOR",value:B,start:b,end:this.pos,line:w,column:j};if(/[+\-*/%<>=!&|^~?:]/.test(v))return this.advance(),{type:"OPERATOR",value:v,start:b,end:this.pos,line:w,column:j};if(/[()[\]{},;.]/.test(v))return this.advance(),{type:"PUNCTUATION",value:v,start:b,end:this.pos,line:w,column:j};return this.advance(),{type:"PUNCTUATION",value:v,start:b,end:this.pos,line:w,column:j}}readWhitespace(b,w,j){while(this.pos<this.source.length&&/\s/.test(this.source[this.pos]))this.advance();return{type:"WHITESPACE",value:this.source.slice(b,this.pos),start:b,end:this.pos,line:w,column:j}}readLineComment(b,w,j){this.advance(2);while(this.pos<this.source.length&&this.source[this.pos]!==`
|
|
3
|
-
`)this.advance();return{type:"COMMENT",value:this.source.slice(b,this.pos),start:b,end:this.pos,line:w,column:j}}readBlockComment(b,w,j){this.advance(2);while(this.pos<this.source.length-1){if(this.source[this.pos]==="*"&&this.source[this.pos+1]==="/"){this.advance(2);break}this.advance()}return{type:"COMMENT",value:this.source.slice(b,this.pos),start:b,end:this.pos,line:w,column:j}}readString(b,w,j,v){this.advance();while(this.pos<this.source.length){let z=this.source[this.pos];if(z==="\\"){this.advance(2);continue}if(z===b){this.advance();break}this.advance()}return{type:"STRING",value:this.source.slice(w,this.pos),start:w,end:this.pos,line:j,column:v}}readTemplateString(b,w,j){this.advance();let v=0,z=256;while(this.pos<this.source.length){let B=this.source[this.pos];if(B==="\\"){this.advance(2);continue}if(B==="$"&&this.peek(1)==="{"){if(v>=z){this.pos=this.source.length;break}this.advance(2),v++;continue}if(B==="{"&&v>0){v++,this.advance();continue}if(B==="}"&&v>0){v--,this.advance();continue}if(B==="`"&&v===0){this.advance();break}this.advance()}return{type:"TEMPLATE_STRING",value:this.source.slice(b,this.pos),start:b,end:this.pos,line:w,column:j}}readNumber(b,w,j){if(this.source[this.pos]==="0"){let v=this.peek(1)?.toLowerCase();if(v==="x"||v==="o"||v==="b"){this.advance(2);while(this.pos<this.source.length&&/[\da-f_]/i.test(this.source[this.pos]))this.advance();return{type:"NUMBER",value:this.source.slice(b,this.pos),start:b,end:this.pos,line:w,column:j}}}while(this.pos<this.source.length&&/[\d_]/.test(this.source[this.pos]))this.advance();if(this.source[this.pos]==="."&&/\d/.test(this.peek(1)||"")){this.advance();while(this.pos<this.source.length&&/[\d_]/.test(this.source[this.pos]))this.advance()}if(/e/i.test(this.source[this.pos]||"")){if(this.advance(),/[+-]/.test(this.source[this.pos]||""))this.advance();while(this.pos<this.source.length&&/[\d_]/.test(this.source[this.pos]))this.advance()}if(this.source[this.pos]==="n")this.advance();return{type:"NUMBER",value:this.source.slice(b,this.pos),start:b,end:this.pos,line:w,column:j}}readIdentifier(b,w,j){while(this.pos<this.source.length&&/[\w$]/.test(this.source[this.pos]))this.advance();return{type:"IDENTIFIER",value:this.source.slice(b,this.pos),start:b,end:this.pos,line:w,column:j}}readDirective(b,w,j){this.advance();while(this.pos<this.source.length&&/[a-z]/i.test(this.source[this.pos]))this.advance();return{type:"DIRECTIVE",value:this.source.slice(b,this.pos),start:b,end:this.pos,line:w,column:j}}advance(b=1){for(let w=0;w<b&&this.pos<this.source.length;w++){if(this.source[this.pos]===`
|
|
4
|
-
`)this.line++,this.column=0;else this.column++;this.pos++}}peek(b){return this.source[this.pos+b]}saveState(){return{pos:this.pos,line:this.line,column:this.column}}restoreState(b){this.pos=b.pos,this.line=b.line,this.column=b.column}}function K(b,w,j,v=0){let z=0,B=v,y=null,D=0,H=!1;while(B<b.length){let F=b[B];if(y&&H){H=!1,B++;continue}if(y&&F==="\\"){H=!0,B++;continue}if(H=!1,(F==='"'||F==="'"||F==="`")&&!y){y=F,B++;continue}if(F===y&&y!=="`"){y=null,B++;continue}if(y==="`"&&F==="$"&&b[B+1]==="{"){D++,B+=2;continue}if(D>0&&F==="}"){D--,B++;continue}if(F==="`"&&y==="`"&&D===0){y=null,B++;continue}if(y){B++;continue}if(F===w)z++;else if(F===j){if(z--,z===0)return B}B++}return-1}function O(b,w){let j=w,v={paren:0,bracket:0,brace:0},z=null,B=0;while(j<b.length){let y=b[j];if((j>0?b[j-1]:"")==="\\"&&z){j++;continue}if((y==='"'||y==="'")&&!z){z=y,j++;continue}if(y===z&&z!=="`"){z=null,j++;continue}if(y==="`"&&!z){z="`",j++;continue}if(y==="`"&&z==="`"&&B===0){z=null,j++;continue}if(z==="`"&&y==="$"&&b[j+1]==="{"){B++,j+=2;continue}if(B>0){if(y==="{")B++;else if(y==="}")B--;j++;continue}if(z){j++;continue}if(v.paren===0&&v.bracket===0&&v.brace===0){if(b.slice(j,j+2)==="}}"||b.slice(j,j+3)==="!!}")break;if(y===","||y===";")break}if(y==="(")v.paren++;else if(y===")"){if(v.paren--,v.paren<0)break}else if(y==="[")v.bracket++;else if(y==="]"){if(v.bracket--,v.bracket<0)break}else if(y==="{")v.brace++;else if(y==="}"){if(v.brace--,v.brace<0)break}j++}return{expression:b.slice(w,j),endPos:j}}function Q(b){let w=[],j="",v={paren:0,bracket:0,brace:0},z=null,B=0;for(let y=0;y<b.length;y++){let D=b[y];if((y>0?b[y-1]:"")==="\\"&&z){j+=D;continue}if((D==='"'||D==="'")&&!z){z=D,j+=D;continue}if(D===z&&z!=="`"){z=null,j+=D;continue}if(D==="`"&&!z){z="`",j+=D;continue}if(D==="`"&&z==="`"&&B===0){z=null,j+=D;continue}if(z==="`"&&D==="$"&&b[y+1]==="{"){B++,j+=D+b[y+1],y++;continue}if(B>0&&D==="{"){B++,j+=D;continue}if(B>0&&D==="}"){B--,j+=D;continue}if(z){j+=D;continue}if(D==="(")v.paren++;else if(D===")")v.paren--;else if(D==="[")v.bracket++;else if(D==="]")v.bracket--;else if(D==="{")v.brace++;else if(D==="}")v.brace--;if(D==="|"&&b[y+1]!=="|"&&(y===0||b[y-1]!=="|")&&b[y-1]!=="\\"&&v.paren===0&&v.bracket===0&&v.brace===0){w.push(j.trim()),j="";continue}if(D==="|"&&b[y-1]==="\\"&&!z){j=j.slice(0,-1)+D;continue}j+=D}if(j.trim())w.push(j.trim());return w}
|
|
5
|
-
export{J as ey,K as fy,O as gy,Q as hy};
|
package/dist/chunk-bxc7kjsk.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{pB as X}from"./chunk-xv34zbp4.js";function Z(k,q={}){let{includeVariants:z=!0,includeProps:A=!0,frameWidth:B=400,frameHeight:E=300,componentSpacing:K=40}=q,J={},L={},U=[],V=0;for(let Q of k){let R=j(),Y=_(Q,R,V,0,B,E,A);U.push(Y),J[R]={key:R,name:Q.name,description:Q.description||""},V+=B+K}return{name:"STX Components",lastModified:new Date().toISOString(),version:"1.0.0",document:{id:"0:0",name:"Document",type:"DOCUMENT",children:[{id:"0:1",name:"Components",type:"CANVAS",children:U}]},components:J,styles:L}}function _(k,q,z,A,B,E,K){let J=[];if(J.push({id:`${q}:title`,name:"Title",type:"TEXT",characters:k.name,style:{fontFamily:"Inter",fontWeight:600,fontSize:16},fills:[{type:"SOLID",color:{r:0,g:0,b:0,a:1}}]}),k.description)J.push({id:`${q}:desc`,name:"Description",type:"TEXT",characters:k.description,style:{fontFamily:"Inter",fontWeight:400,fontSize:12},fills:[{type:"SOLID",color:{r:0.4,g:0.4,b:0.4,a:1}}]});if(K&&k.props.length>0){let L=$(k.props,`${q}:props`);J.push(L)}return J.push({id:`${q}:preview`,name:"Preview",type:"RECTANGLE",absoluteBoundingBox:{x:0,y:0,width:B-32,height:150},fills:[{type:"SOLID",color:{r:0.95,g:0.95,b:0.95,a:1}}],strokes:[{type:"SOLID",color:{r:0.9,g:0.9,b:0.9,a:1}}],strokeWeight:1,cornerRadius:8}),{id:q,name:k.name,type:"COMPONENT",children:J,absoluteBoundingBox:{x:z,y:A,width:B,height:E},fills:[{type:"SOLID",color:{r:1,g:1,b:1,a:1}}],strokes:[{type:"SOLID",color:{r:0.9,g:0.9,b:0.9,a:1}}],strokeWeight:1,cornerRadius:12,paddingLeft:16,paddingRight:16,paddingTop:16,paddingBottom:16,itemSpacing:12,layoutMode:"VERTICAL",primaryAxisAlignItems:"MIN",counterAxisAlignItems:"MIN"}}function $(k,q){let z=[];z.push({id:`${q}:header`,name:"Props Header",type:"TEXT",characters:"Props",style:{fontFamily:"Inter",fontWeight:600,fontSize:12},fills:[{type:"SOLID",color:{r:0.4,g:0.4,b:0.4,a:1}}]});for(let A=0;A<k.length;A++){let B=k[A];z.push({id:`${q}:prop:${A}`,name:B.name,type:"TEXT",characters:`${B.name}: ${B.type}${B.required?" (required)":""}`,style:{fontFamily:"SF Mono",fontWeight:400,fontSize:11},fills:[{type:"SOLID",color:{r:0.2,g:0.2,b:0.2,a:1}}]})}return{id:q,name:"Props",type:"FRAME",children:z,fills:[{type:"SOLID",color:{r:0.98,g:0.98,b:0.98,a:1}}],cornerRadius:6,paddingLeft:12,paddingRight:12,paddingTop:8,paddingBottom:8,itemSpacing:4,layoutMode:"VERTICAL",primaryAxisAlignItems:"MIN",counterAxisAlignItems:"MIN"}}function j(){return`${Date.now()}:${Math.random().toString(36).slice(2,8)}`}async function D(k,q,z={}){let A=Z(k,z),B=JSON.stringify(A,null,2),E=await import("fs"),K=await import("path");await E.promises.mkdir(K.dirname(q),{recursive:!0}),await E.promises.writeFile(q,B)}function G(k){if(k.startsWith("#")){let z=k.slice(1),A=Number.parseInt(z.slice(0,2),16)/255,B=Number.parseInt(z.slice(2,4),16)/255,E=Number.parseInt(z.slice(4,6),16)/255,K=z.length===8?Number.parseInt(z.slice(6,8),16)/255:1;return{r:A,g:B,b:E,a:K}}let q=k.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(q)return{r:Number.parseInt(q[1])/255,g:Number.parseInt(q[2])/255,b:Number.parseInt(q[3])/255,a:q[4]?Number.parseFloat(q[4]):1};return{r:0,g:0,b:0,a:1}}function H(k){let q=Math.round(k.r*255),z=Math.round(k.g*255),A=Math.round(k.b*255);if(k.a===1)return`#${q.toString(16).padStart(2,"0")}${z.toString(16).padStart(2,"0")}${A.toString(16).padStart(2,"0")}`;return`rgba(${q}, ${z}, ${A}, ${k.a})`}function N(k){return{name:k,id:`stx-story-${k.toLowerCase().replace(/\s+/g,"-")}`,api:"1.0.0",main:"code.js",ui:"ui.html",editorType:["figma"],capabilities:["inspect"],permissions:["currentuser"]}}function T(k){let q=k.map((z)=>z.name).join(", ");return`
|
|
3
|
-
// Figma Plugin Code to import STX components
|
|
4
|
-
// Run this in Figma's plugin console
|
|
5
|
-
|
|
6
|
-
const components = ${JSON.stringify(k.map((z)=>({name:z.name,props:z.props.map((A)=>({name:A.name,type:A.type}))})),null,2)};
|
|
7
|
-
|
|
8
|
-
async function importComponents() {
|
|
9
|
-
for (const comp of components) {
|
|
10
|
-
const frame = figma.createFrame();
|
|
11
|
-
frame.name = comp.name;
|
|
12
|
-
frame.resize(400, 300);
|
|
13
|
-
|
|
14
|
-
// Add title
|
|
15
|
-
const title = figma.createText();
|
|
16
|
-
await figma.loadFontAsync({ family: "Inter", style: "Semi Bold" });
|
|
17
|
-
title.fontName = { family: "Inter", style: "Semi Bold" };
|
|
18
|
-
title.characters = comp.name;
|
|
19
|
-
title.fontSize = 16;
|
|
20
|
-
frame.appendChild(title);
|
|
21
|
-
|
|
22
|
-
// Position on canvas
|
|
23
|
-
frame.x = figma.viewport.center.x;
|
|
24
|
-
frame.y = figma.viewport.center.y;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
figma.notify('Imported ${q}');
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
importComponents();
|
|
31
|
-
`}
|
|
32
|
-
export{Z as Ja,D as Ka,G as La,H as Ma,N as Na,T as Oa};
|
package/dist/chunk-c7jg8w13.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
function Z(E,j,q,B){let K=[],L=B.join(" ");for(let G of E)if(K.push({src:`${j}/icon-${G}x${G}.png`,sizes:`${G}x${G}`,type:"image/png",purpose:L}),q)K.push({src:`${j}/icon-${G}x${G}.webp`,sizes:`${G}x${G}`,type:"image/webp",purpose:L});return K}function _(E){return E.map((j)=>({name:j.name,short_name:j.shortName,description:j.description,url:j.url,icons:j.icons?.map((q)=>({src:q.src,sizes:q.sizes,type:q.type}))}))}function $(E){let j=E.pwa?.shareTarget;if(!j?.enabled)return;let q={action:j.action||"/share",method:j.method||"POST",enctype:j.enctype||"multipart/form-data",params:{title:j.params?.title||"title",text:j.params?.text||"text",url:j.params?.url||"url"}};if(j.acceptFiles&&j.acceptFiles.length>0)q.params.files=j.acceptFiles.map((B)=>({name:B.name,accept:B.accept}));return q}function k(E){let j=E.pwa?.fileHandlers;if(!j?.enabled||!j.accept)return;let q=[{action:j.action||"/",accept:j.accept,launch_type:j.launchType||"single-client"}];if(j.icons)q[0].icons=j.icons.map((B)=>({src:B.src,sizes:B.sizes,type:B.type}));return q}function F(E){let j=E.pwa?.protocolHandlers;if(!j||j.length===0)return;return j.map((q)=>({protocol:q.protocol,url:q.url}))}function I(E){let j=E.pwa;if(!j?.enabled||!j.manifest)return null;let{manifest:q,icons:B}=j,K=B?.sizes||[72,96,128,144,152,192,384,512],L=B?.outputDir?`/${B.outputDir}`:"/pwa-icons",G=B?.generateWebP??!0,N=B?.purpose||["any","maskable"],J={name:q.name,short_name:q.shortName||q.name,description:q.description,start_url:q.startUrl||"/",display:q.display||"standalone",display_override:q.displayOverride,orientation:q.orientation,theme_color:q.themeColor,background_color:q.backgroundColor,scope:q.scope||"/",lang:q.lang,dir:q.dir,id:q.id,categories:q.categories,icons:Z(K,L,G,N)};if(q.shortcuts&&q.shortcuts.length>0)J.shortcuts=_(q.shortcuts);if(q.screenshots&&q.screenshots.length>0)J.screenshots=q.screenshots.map((Q)=>({src:Q.src,sizes:Q.sizes,type:Q.type,label:Q.label,form_factor:Q.platform}));let U=$(E);if(U)J.share_target=U;let X=k(E);if(X)J.file_handlers=X;let Y=F(E);if(Y)J.protocol_handlers=Y;if(q.launchHandler)J.launch_handler={client_mode:q.launchHandler};if(q.handleLinks)J.handle_links=q.handleLinks;if(q.edgeSidePanel?.enabled)J.edge_side_panel={preferred_width:q.edgeSidePanel.preferredWidth};return J}function O(E){let j=I(E);if(!j)return"";let q=JSON.parse(JSON.stringify(j));return JSON.stringify(q,null,2)}function y(E,j){return{...j,...E,shortcuts:E.shortcuts||j.shortcuts,screenshots:E.screenshots||j.screenshots,categories:E.categories||j.categories}}function R(E){let j=[],q=E.pwa;if(!q?.enabled)return j;let B=q.manifest;if(!B)return j.push("PWA manifest configuration is missing"),j;if(!B.name)j.push("Manifest name is required");let K=["fullscreen","standalone","minimal-ui","browser"];if(B.display&&!K.includes(B.display))j.push(`Invalid display mode: ${B.display}. Must be one of: ${K.join(", ")}`);let L=["any","natural","landscape","landscape-primary","landscape-secondary","portrait","portrait-primary","portrait-secondary"];if(B.orientation&&!L.includes(B.orientation))j.push(`Invalid orientation: ${B.orientation}`);let G=/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/;if(B.themeColor&&!G.test(B.themeColor))j.push(`Invalid theme color: ${B.themeColor}. Must be a valid hex color.`);if(B.backgroundColor&&!G.test(B.backgroundColor))j.push(`Invalid background color: ${B.backgroundColor}. Must be a valid hex color.`);if(q.shareTarget?.enabled){if(!q.shareTarget.action)j.push("Share target action URL is required")}if(q.fileHandlers?.enabled){if(!q.fileHandlers.accept||Object.keys(q.fileHandlers.accept).length===0)j.push("File handlers must specify accepted MIME types")}if(q.protocolHandlers)for(let N of q.protocolHandlers){if(!N.protocol)j.push("Protocol handler missing protocol");if(!N.url||!N.url.includes("%s"))j.push(`Protocol handler URL must contain %s placeholder: ${N.protocol}`)}return j}
|
|
3
|
-
export{I as ef,O as ff,y as gf,R as hf};
|
package/dist/chunk-ckxjqqn9.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Vk as Z,Yk as U,Zk as X,_k as _}from"./chunk-jpndqst5.js";import{mkdir as S,readFile as $,writeFile as V,readdir as v,rm as W,stat as A}from"fs/promises";import{join as R,dirname as K}from"path";var L=new Map,T={enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:500};async function M(b){try{await S(b,{recursive:!0})}catch{}}function w(b,q,G){return R(b,G,`${q}.json`)}async function Y(b,q,G){if((Date.now()-b.createdAt)/86400000>G)return!1;if(await X(q)!==b.srcMtime)return!1;return!0}async function F(b,q,G,B=T){if(!B.enabled)return null;let z=U(b,q),I=L.get(z);if(I){if(await Y(I,b,B.maxAge))return I.lastAccessedAt=Date.now(),I.data;L.delete(z)}let O=w(B.directory,z,G);if(await _(O))try{let J=await $(O,"utf-8"),N=JSON.parse(J);if(await Y(N,b,B.maxAge))return N.lastAccessedAt=Date.now(),L.set(z,N),N.data}catch{}return null}async function k(b,q,G,B,z=T){if(!z.enabled)return;let I=U(b,q),O=await Z(b),J=await X(b),N={key:I,src:b,srcHash:O,srcMtime:J,optionsHash:U("",q),data:G,createdAt:Date.now(),lastAccessedAt:Date.now()};L.set(I,N);let Q=w(z.directory,I,B);try{await M(K(Q)),await V(Q,JSON.stringify(N,null,2))}catch(H){console.warn(`[stx-media] Failed to write cache: ${H}`)}}async function D(b,q,G=T){for(let[B,z]of L.entries())if(z.src===b)L.delete(B)}async function P(b,q=T){if(b==="all")L.clear();else L.clear();let G=b==="all"?["image","video"]:[b];for(let B of G){let z=R(q.directory,B);try{await W(z,{recursive:!0,force:!0})}catch{}}}async function u(b=T){let q={memoryEntries:L.size,diskEntries:{image:0,video:0},totalSizeMB:0};for(let G of["image","video"]){let B=R(b.directory,G);try{let z=await v(B);q.diskEntries[G]=z.length;for(let I of z){let O=R(B,I),J=await A(O);q.totalSizeMB+=J.size/1048576}}catch{}}return q}async function d(b=T){let q=0,G=b.maxAge*24*60*60*1000;for(let B of["image","video"]){let z=R(b.directory,B);try{let I=await v(z);for(let O of I){let J=R(z,O);try{let N=await $(J,"utf-8"),Q=JSON.parse(N);if(Date.now()-Q.createdAt>G)await W(J),L.delete(Q.key),q++}catch{await W(J).catch(()=>{}),q++}}}catch{}}return q}
|
|
3
|
-
export{T as Kk,F as Lk,k as Mk,D as Nk,P as Ok,u as Pk,d as Qk};
|
package/dist/chunk-cn8az1b4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
// @bun
|
package/dist/chunk-d0zjtdw4.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Qq as E}from"./chunk-mhgk632d.js";import{pB as f}from"./chunk-xv34zbp4.js";import D from"path";import{extractLayoutMetadata as p}from"stx-router/layout-metadata";var P="stx-page-head:",R=/<!--stx-page-head:([A-Za-z0-9+/=]+)-->\n?/,H=null;function M(){if(H!==null)return H;try{let{getRouterScript:z}=f("stx-router");H=`<script>${z()}</script>`}catch{H=""}return H}async function x(z,X){if(X===!1)return null;if(X&&typeof X==="string"){let J=D.resolve(z,X);if(await Bun.file(J).exists())return J;return null}let w=D.join(z,"app.stx");if(await Bun.file(w).exists())return w;return null}async function y(z,X){try{let w=await Bun.file(z).text(),J=w,Y=w.match(/<template\b[^>]*>([\s\S]*?)<\/template>/i);if(Y)J=Y[1].trim();let N=E(w),V=[...N.client.map((Q)=>Q.fullTag),...N.signals.map((Q)=>Q.fullTag)],F=[],Z=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,$;while(($=Z.exec(w))!==null)F.push($[0]);let B=J;for(let Q of N.server)B=B.replace(Q.fullTag,"");for(let Q of N.client)B=B.replace(Q.fullTag,"");B=B.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let j="<!--__STX_PAGE_SLOT__-->";if(B=B.replace(/<slot\s*\/>/gi,j).replace(/<slot\s*>\s*<\/slot>/gi,j),!B.includes(j))return console.warn(`[stx] Shell ${z} has no <slot /> \u2014 pages won't be injected`),null;let{processDirectives:G,extractVariables:I,defaultConfig:W,loadStxConfig:K}=await import("././index.js"),A=await K(),q={__filename:z,__dirname:D.dirname(z)};for(let Q of V){let k=Q.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i);if(k&&!Q.includes("client")&&!Q.includes('type="module"'))await I(k[1],q,z)}let U=await G(B,q,z,{...W,...A,...X},new Set),v=U.indexOf(j);if(v===-1)return console.warn("[stx] Shell slot placeholder lost during processing"),null;return{beforeSlot:U.substring(0,v),afterSlot:U.substring(v+j.length),filePath:z,shellScripts:V,shellStyles:F}}catch(w){return console.error(`[stx] Error processing shell ${z}:`,w),null}}function S(z,X,w){let J,Y="",N=X.match(R);if(N){X=X.replace(N[0],"");try{let B=Buffer.from(N[1],"base64").toString("utf8"),j=B.match(/<title[^>]*>([\s\S]*?)<\/title>/i);if(j)J=j[1].trim();Y=B.replace(/<title[^>]*>[\s\S]*?<\/title>/i,"").trim()}catch{}}let V=w||J||"stx App",F=M(),Z="<script>window.__stxRouterConfig={container:'[data-stx-content]'};</script>";return`<!DOCTYPE html>
|
|
3
|
-
<html lang="en">
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="UTF-8">
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
-
<title>${V}</title>
|
|
8
|
-
${Y?` ${Y}
|
|
9
|
-
`:""} ${z.shellStyles.join(`
|
|
10
|
-
`)}
|
|
11
|
-
</head>
|
|
12
|
-
<body>
|
|
13
|
-
${z.beforeSlot}
|
|
14
|
-
<div data-stx-content>${X}</div>
|
|
15
|
-
${z.afterSlot}
|
|
16
|
-
${z.shellScripts.filter((B)=>!B.includes("server")).join(`
|
|
17
|
-
`)}
|
|
18
|
-
${Z}
|
|
19
|
-
${F}
|
|
20
|
-
</body>
|
|
21
|
-
</html>`}function b(z,X={}){let w=z.trim();if(!/<!DOCTYPE\b/i.test(w)&&!/^<html[\s>]/i.test(w))return z;let J=[],Y=w.match(/<head\b[^>]*>([\s\S]*?)<\/head>/i);if(Y){let Z=Y[1],$=/<style\b[^>]*>[\s\S]*?<\/style>/gi,B;while((B=$.exec(Z))!==null)J.push(B[0])}if(X.preserveHead&&Y){let Z=[],$=/<title\b[^>]*>[\s\S]*?<\/title>|<meta\b[^>]*>|<link\b[^>]*>/gi,B;while((B=$.exec(Y[1]))!==null){if(/<meta\b[^>]*(?:\bcharset|name="viewport")/i.test(B[0]))continue;Z.push(B[0])}if(Z.length>0)J.unshift(`<!--${P}${Buffer.from(Z.join(`
|
|
22
|
-
`),"utf8").toString("base64")}-->`)}let N=w.match(/<body\b[^>]*>/i),V=w.lastIndexOf("</body>");if(N&&V!==-1){let Z=N.index+N[0].length,$=w.slice(Z,V).trim();if(J.length>0)return J.join(`
|
|
23
|
-
`)+`
|
|
24
|
-
`+$;return $}let F=w;if(F=F.replace(/<!DOCTYPE\b[^>]*>/i,""),F=F.replace(/<html\b[^>]*>/i,""),F=F.replace(/<\/html\s*>/i,""),Y)F=F.replace(/<head\b[^>]*>[\s\S]*?<\/head>/i,J.join(`
|
|
25
|
-
`));return F=F.replace(/<body\b[^>]*>/i,""),F=F.replace(/<\/body\s*>/i,""),F.trim()}function C(z){return z.headers.get("X-STX-Router")==="true"}function g(z,X="main"){let w=z.trim(),J=[],Y=w.match(/<head\b[^>]*>([\s\S]*?)<\/head>/i);if(Y){let U=Y[1],v=/<style\b[^>]*>[\s\S]*?<\/style>/gi,Q;while((Q=v.exec(U))!==null)J.push(Q[0])}let N=X.replace(/^[.#]/,"").toLowerCase(),V=new RegExp(`<${N}\\b[^>]*>`,"i"),F=w.match(V);if(!F||F.index===void 0)return b(z);let Z=F.index+F[0].length,$=new RegExp(`<${N}\\b[^>]*>`,"gi"),B=new RegExp(`</${N}\\s*>`,"gi");$.lastIndex=Z,B.lastIndex=Z;let j=1,G=-1;while(j>0){let U=$.exec(w),v=B.exec(w);if(!v)break;if(U&&U.index<v.index)j++,B.lastIndex=U.index+U[0].length;else if(j--,G=v.index,j>0)$.lastIndex=v.index+v[0].length}if(G===-1)return b(z);let I=w.slice(Z,G).trim(),W=[],K=w.match(/<body\b[^>]*>/i),A=w.lastIndexOf("</body>");if(K&&K.index!==void 0&&A!==-1){let v=[[K.index+K[0].length,F.index],[G+`</${N}>`.length,A]],Q=/<script\b[^>]*>[\s\S]*?<\/script>/gi;for(let[k,_]of v){if(k>=_)continue;let O=w.slice(k,_),L;Q.lastIndex=0;while((L=Q.exec(O))!==null)W.push(L[0])}}let q=[];if(J.length>0)q.push(J.join(`
|
|
26
|
-
`));if(W.length>0)q.push(W.join(`
|
|
27
|
-
`));return q.push(I),q.join(`
|
|
28
|
-
`)}
|
|
29
|
-
export{x as Iq,y as Jq,S as Kq,b as Lq,C as Mq,g as Nq,p as Oq};
|
package/dist/chunk-d1qh1x2g.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{tr as U,zr as W}from"./chunk-1xz0w746.js";import{dt as X}from"./chunk-g1vt329s.js";import{du as R,eu as O}from"./chunk-hjm2xab3.js";import{pB as Q}from"./chunk-xv34zbp4.js";async function F(j,N={}){return(await _(j,N)).html}async function V(j,N={}){let{html:J,context:A}=await _(j,N),{extractStreamBoundaries:G}=await import("././streaming.js"),z=G(A),w=j.streamTemplates;if(w&&Object.keys(w).length>0){let{processDirectives:$}=await import("././process.js"),{defaultConfig:D}=await import("././config.js"),Y=A.streamBoundaries||{},I={...D,autoShell:!1},Z=Object.keys(w).map((K)=>({id:K,render:async()=>{let M=typeof Y[K]==="function"?await Y[K]():void 0;return $(w[K],{...A,$boundary:M},j.sourceFile,I,new Set)}})),L=new Set(Z.map((K)=>K.id));z=[...(z||[]).filter((K)=>!L.has(K.id)),...Z]}return{html:J,boundaries:z&&z.length>0?z:void 0}}async function _(j,N){let J={__filename:j.sourceFile,__dirname:j.sourceFile.replace(/[/\\][^/\\]+$/,""),...N};if(!j.hasServerScripts&&!O(j.html))return{html:j.html,context:J};for(let G of j.serverScriptContent)try{await X(G,J,j.sourceFile)}catch(z){console.warn(`[stx] Server script error in ${j.sourceFile}:`,z)}if(!O(j.html))return{html:j.html,context:J};let A=new Map;for(let[G,z]of Object.entries(j.placeholders))if(z.expression)try{let w=W(z.expression,J);if(z.type==="raw")A.set(G,w!==void 0&&w!==null?String(w):"");else A.set(G,w!==void 0&&w!==null?U(String(w)):"")}catch{A.set(G,"")}return{html:R(j.html,A),context:J}}async function y(j,N={}){if(!j.hasServerScripts&&!O(j.fragment))return j.fragment;let J={__filename:j.sourceFile,__dirname:j.sourceFile.replace(/[/\\][^/\\]+$/,""),...N};for(let G of j.serverScriptContent)try{await X(G,J,j.sourceFile)}catch(z){console.warn(`[stx] Server script error in ${j.sourceFile}:`,z)}if(!O(j.fragment))return j.fragment;let A=new Map;for(let[G,z]of Object.entries(j.placeholders))if(z.expression)try{let w=W(z.expression,J);if(z.type==="raw")A.set(G,w!==void 0&&w!==null?String(w):"");else A.set(G,w!==void 0&&w!==null?U(String(w)):"")}catch{A.set(G,"")}return R(j.fragment,A)}
|
|
3
|
-
export{F as Oi,V as Pi,y as Qi};
|
package/dist/chunk-djddhmcc.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
function N(q){let j=q.analytics;if(!j?.enabled)return"";switch(j.driver){case"fathom":return Q(j);case"google-analytics":return R(j);case"plausible":return V(j);case"self-hosted":return W(j);case"custom":return X(j);default:return""}}function Q(q){let j=q.fathom;if(!j?.siteId)return"";let w=j.scriptUrl||"https://cdn.usefathom.com/script.js",K=j.defer!==!1?" defer":"",z=[`data-site="${J(j.siteId)}"`];if(j.honorDnt)z.push('data-honor-dnt="true"');if(j.spa)z.push('data-spa="auto"');if(j.canonical)z.push(`data-canonical="${J(j.canonical)}"`);if(j.auto===!1)z.push('data-auto="false"');return`
|
|
3
|
-
<!-- Fathom Analytics -->
|
|
4
|
-
<script src="${J(w)}" ${z.join(" ")}${K}></script>
|
|
5
|
-
`}function R(q){let j=q.googleAnalytics;if(!j?.measurementId)return"";let w=J(j.measurementId),K=j.debug?`gtag('config', '${w}', { 'debug_mode': true });`:"";return`
|
|
6
|
-
<!-- Google Analytics -->
|
|
7
|
-
<script async src="https://www.googletagmanager.com/gtag/js?id=${w}"></script>
|
|
8
|
-
<script>
|
|
9
|
-
window.dataLayer = window.dataLayer || [];
|
|
10
|
-
function gtag(){dataLayer.push(arguments);}
|
|
11
|
-
gtag('js', new Date());
|
|
12
|
-
gtag('config', '${w}');
|
|
13
|
-
${K}
|
|
14
|
-
</script>
|
|
15
|
-
`}function V(q){let j=q.plausible;if(!j?.domain)return"";let w=j.scriptUrl||"https://plausible.io/js/script.js",K=[`data-domain="${J(j.domain)}"`],z=w,L=[];if(j.trackLocalhost)L.push("local");if(j.hashMode)L.push("hash");if(L.length>0&&w==="https://plausible.io/js/script.js")z=`https://plausible.io/js/script.${L.join(".")}.js`;return`
|
|
16
|
-
<!-- Plausible Analytics -->
|
|
17
|
-
<script defer data-domain="${J(j.domain)}" src="${J(z)}"></script>
|
|
18
|
-
`}function W(q){let j=q.selfHosted;if(!j?.siteId||!j?.apiEndpoint)return"";let w=J(j.siteId),K=J(j.apiEndpoint),z=j.honorDnt?'if(n.doNotTrack==="1")return;':"",L=j.trackHashChanges?"w.addEventListener('hashchange',pv);":"",O=j.trackOutboundLinks?`
|
|
19
|
-
d.addEventListener('click',function(e){
|
|
20
|
-
var a=e.target.closest('a');
|
|
21
|
-
if(a&&a.hostname!==location.hostname){
|
|
22
|
-
t('outbound',{url:a.href});
|
|
23
|
-
}
|
|
24
|
-
});`:"";return`
|
|
25
|
-
<!-- Self-Hosted Analytics -->
|
|
26
|
-
<script data-site="${w}" data-api="${K}" defer>
|
|
27
|
-
(function(){
|
|
28
|
-
'use strict';
|
|
29
|
-
var d=document,w=window,n=navigator,s=d.currentScript;
|
|
30
|
-
var site=s.dataset.site,api=s.dataset.api;
|
|
31
|
-
${z}
|
|
32
|
-
var q=[],sid=Math.random().toString(36).slice(2);
|
|
33
|
-
function t(e,p){
|
|
34
|
-
var x=new XMLHttpRequest();
|
|
35
|
-
x.open('POST',api+'/collect',true);
|
|
36
|
-
x.setRequestHeader('Content-Type','application/json');
|
|
37
|
-
x.send(JSON.stringify({
|
|
38
|
-
s:site,sid:sid,e:e,p:p||{},
|
|
39
|
-
u:location.href,r:d.referrer,t:d.title,
|
|
40
|
-
sw:screen.width,sh:screen.height
|
|
41
|
-
}));
|
|
42
|
-
}
|
|
43
|
-
function pv(){t('pageview');}
|
|
44
|
-
${L}
|
|
45
|
-
${O}
|
|
46
|
-
if(d.readyState==='complete')pv();
|
|
47
|
-
else w.addEventListener('load',pv);
|
|
48
|
-
w.stxAnalytics={track:function(n,v){t('event',{name:n,value:v});}};
|
|
49
|
-
})();
|
|
50
|
-
</script>
|
|
51
|
-
`}function X(q){let j=q.custom;if(!j)return"";if(j.inlineScript)return`
|
|
52
|
-
<!-- Custom Analytics -->
|
|
53
|
-
<script>
|
|
54
|
-
${j.inlineScript}
|
|
55
|
-
</script>
|
|
56
|
-
`;if(!j.scriptUrl)return"";let w=[];if(j.scriptId)w.push(`id="${J(j.scriptId)}"`);if(j.attributes)for(let[z,L]of Object.entries(j.attributes))w.push(`${J(z)}="${J(L)}"`);return`
|
|
57
|
-
<!-- Custom Analytics -->
|
|
58
|
-
<script${w.length>0?` ${w.join(" ")}`:""} src="${J(j.scriptUrl)}" defer></script>
|
|
59
|
-
`}function Y(q,j){let w=N(j);if(!w)return q;if(!q.includes("</head>")){let K=q.lastIndexOf("</body>");if(K!==-1)return q.slice(0,K)+w+q.slice(K);return q+w}return q.replace("</head>",`${w}</head>`)}function J(q){return q.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}var Z={name:"analytics",hasEndTag:!1,handler:async(q,j,w,K)=>{let z=w.__stx_config||{};return N(z)}};
|
|
60
|
-
export{N as kA,Y as lA,Z as mA};
|
package/dist/chunk-dqn9gyhb.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
function K(F){return F.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Z(F){let M=F.trim().toLowerCase();return!M.startsWith("javascript:")&&!M.startsWith("vbscript:")&&!M.startsWith("data:text/html")}function A(F){let M=/^---\r?\n([\s\S]*?)\r?\n---\r?\n/,N=F.match(M);if(!N)return{data:{},content:F.trim()};let Q=N[1],j=F.slice(N[0].length),O={};for(let W of Q.split(`
|
|
3
|
-
`)){let D=W.trim();if(!D||D.startsWith("#"))continue;let G=D.indexOf(":");if(G===-1)continue;let J=D.slice(0,G).trim(),q=D.slice(G+1).trim();if(typeof q==="string"){if(q.startsWith('"')&&q.endsWith('"')||q.startsWith("'")&&q.endsWith("'"))q=q.slice(1,-1);else if(q.startsWith("[")&&q.endsWith("]"))try{q=JSON.parse(q)}catch{}else if(q==="true")q=!0;else if(q==="false")q=!1;else if(/^-?\d+(?:\.\d+)?$/.test(q))q=Number(q)}O[J]=q}return{data:O,content:j.trim()}}function S(F,M={}){let{gfm:N=!0,breaks:Q=!1}=M,j=F,O=[];if(j=j.replace(/```(\w*)\n([\s\S]*?)```/g,(q,z,E)=>{let V=O.length,X=z?` class="language-${K(z)}"`:"";return O.push(`<pre><code${X}>${K(E.trim())}</code></pre>`),`\x00CODEBLOCK${V}\x00`}),j=j.replace(/`([^`]*)`/g,(q,z)=>`<code>${K(z)}</code>`),j=j.replace(/^######\s+(.*)$/gm,"<h6>$1</h6>"),j=j.replace(/^#####\s+(.*)$/gm,"<h5>$1</h5>"),j=j.replace(/^####\s+(.*)$/gm,"<h4>$1</h4>"),j=j.replace(/^###\s+(.*)$/gm,"<h3>$1</h3>"),j=j.replace(/^##\s+(.*)$/gm,"<h2>$1</h2>"),j=j.replace(/^#\s+(.*)$/gm,"<h1>$1</h1>"),j=j.replace(/\*\*\*(.+?)\*\*\*/g,"<strong><em>$1</em></strong>"),j=j.replace(/___(.+?)___/g,"<strong><em>$1</em></strong>"),j=j.replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>"),j=j.replace(/__(.+?)__/g,"<strong>$1</strong>"),j=j.replace(/\*(.+?)\*/g,"<em>$1</em>"),j=j.replace(/(?<![a-zA-Z0-9])_(.+?)_(?![a-zA-Z0-9])/g,"<em>$1</em>"),N)j=j.replace(/~~(.+?)~~/g,"<del>$1</del>");if(j=j.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,(q,z,E)=>{return`<img src="${Z(E)?K(E):""}" alt="${K(z)}" />`}),j=j.replace(/\[([^\]]+)\]\(([^)]+)\)/g,(q,z,E)=>{return`<a href="${Z(E)?K(E):""}">${z}</a>`}),j=j.replace(/^(?:---|\*\*\*|___)\s*$/gm,"<hr />"),j=j.replace(/^>\s+(.*)$/gm,"<blockquote>$1</blockquote>"),j=j.replace(/<\/blockquote>\n<blockquote>/g,`
|
|
4
|
-
`),j=j.replace(/^[*\-+]\s+(.*)$/gm,"<li data-ul>$1</li>"),j=j.replace(/(<li data-ul>.*<\/li>\n?)+/g,"<ul>$&</ul>"),j=j.replace(/<\/ul>\n<ul>/g,""),j=j.replace(/^\d+\.\s+(.*)$/gm,"<li data-ol>$1</li>"),j=j.replace(/(<li data-ol>.*<\/li>\n?)+/g,"<ol>$&</ol>"),j=j.replace(/<\/ol>\n<ol>/g,""),j=j.replace(/<li data-ul>/g,"<li>"),j=j.replace(/<li data-ol>/g,"<li>"),N)j=j.replace(/^\|(.+)\|\s*\n\|[-:\s|]+\|\s*\n((?:\|.+\|\s*\n)*)/gm,(q,z,E)=>{let X=`<tr>${z.split("|").map((T)=>T.trim()).filter(Boolean).map((T)=>`<th>${K(T)}</th>`).join("")}</tr>`,_=E.trim().split(`
|
|
5
|
-
`).map((T)=>{return`<tr>${T.split("|").map((Y)=>Y.trim()).filter(Boolean).map((Y)=>`<td>${K(Y)}</td>`).join("")}</tr>`}).join(`
|
|
6
|
-
`);return`<table>
|
|
7
|
-
<thead>
|
|
8
|
-
${X}
|
|
9
|
-
</thead>
|
|
10
|
-
<tbody>
|
|
11
|
-
${_}
|
|
12
|
-
</tbody>
|
|
13
|
-
</table>`});if(N)j=j.replace(/<li>\s*\[\s*\]\s*/g,'<li><input type="checkbox" disabled /> '),j=j.replace(/<li>\s*\[x\]\s*/gi,'<li><input type="checkbox" checked disabled /> ');let W=j.split(`
|
|
14
|
-
`),D=[],G=!1,J=[];for(let q of W){let z=q.trim();if(/^<(?:h[1-6]|ul|ol|li|blockquote|pre|table|thead|tbody|tr|th|td|hr|div|p)/.test(z)||/^\0CODEBLOCK\d+\0$/.test(z)||z===""){if(G&&J.length>0)D.push(`<p>${J.join(Q?`<br />
|
|
15
|
-
`:`
|
|
16
|
-
`)}</p>`),J=[],G=!1;D.push(q)}else G=!0,J.push(z)}if(G&&J.length>0)D.push(`<p>${J.join(Q?`<br />
|
|
17
|
-
`:`
|
|
18
|
-
`)}</p>`);if(j=D.join(`
|
|
19
|
-
`),Q)j=j.replace(/\n/g,`<br />
|
|
20
|
-
`);for(let q=0;q<O.length;q++)j=j.replace(`\x00CODEBLOCK${q}\x00`,O[q]);return j=j.replace(/<p>\s*<\/p>/g,""),j.trim()}
|
|
21
|
-
export{A as fv,S as gv};
|
package/dist/chunk-drjq2zwg.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Rr as E}from"./chunk-1xz0w746.js";import{pB as D}from"./chunk-xv34zbp4.js";import I from"path";async function M(q={}){let G=performance.now(),J=q.root||process.cwd(),j=await E(),y=j.ssr?"ssr":"ssg";console.log(`[stx build] Mode: ${y.toUpperCase()}${j.ssr?" (ssr: true in stx.config.ts)":" (default \u2014 ssr is false)"}`);let A,B;if(y==="ssg"){let{generateStaticSite:z}=await import("././ssg.js");A=await z({pagesDir:I.join(j.root||".",j.pagesDir||j.build?.pagesDir||"pages"),publicDir:j.publicDir||j.build?.publicDir||"public",outputDir:j.build?.outputDir||"dist",generate404:j.build?.generate404??!0,minify:j.build?.minify??!0,cleanOutput:j.build?.cleanOutput??!0,...q.ssg})}else{let{buildForProduction:z}=await import("././production-builder.js");B=await z({outputDir:".output",debug:q.debug,...q.ssr})}let H=Math.round(performance.now()-G);return{mode:y,ssg:A,ssr:B,duration:H}}
|
|
3
|
-
export{M as Gp};
|