@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-g2hekckm.js
DELETED
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import*as T from"crypto";function L(C){let D=/\$(\w+)\./g,w=[],j;while((j=D.exec(C))!==null)if(!w.includes(j[1]))w.push(j[1]);return w}function S(){return`stx-${T.randomBytes(4).toString("hex")}`}function R(C){return/\$\w+\./.test(C)}function y(C){let D=[],w=new Set,j=/<(\w+)([^>]*?)(\s*\/?>)/g,k=C;return k=k.replace(j,(q,F,Q,G)=>{if(["script","style","template"].includes(F.toLowerCase()))return q;let W=[],X=!1,z=Q,V=/(\w+(?:-\w+)*)\s*=\s*"([^"]*\{\{[^}]*\$\w+[^}]*\}\}[^"]*)"/g,P=[...Q.matchAll(V)];for(let J of P){let O=J[0],K=J[1],Z=J[2];if(R(Z)){X=!0;let _=Z.match(/\{\{\s*([\s\S]+?)\s*\}\}/);if(_){let $=_[1];if(W.push({attr:K,expr:$,fullMatch:O,originalAttr:K}),L($).forEach((H)=>w.add(H)),K==="text")z=z.replace(O,"");else if(K==="class")z=z.replace(O,'class=""');else if(K==="disabled"||K==="hidden")z=z.replace(O,"");else z=z.replace(O,`${K}=""`)}}}if(!X)return q;let Y=z.match(/\bid\s*=\s*"([^"]+)"/),U;if(Y)U=Y[1];else U=S(),z=` id="${U}"${z}`;for(let J of W)D.push({elementId:U,attribute:J.attr,expression:J.expr,stores:L(J.expr)});return`<${F}${z}${G}`}),{html:k,bindings:D,stores:w}}function B(C,D){if(C.length===0)return"";let w=Array.from(D),j=`
|
|
3
|
-
<script>
|
|
4
|
-
(function() {
|
|
5
|
-
'use strict';
|
|
6
|
-
|
|
7
|
-
// Wait for stores to be available
|
|
8
|
-
function initBindings() {
|
|
9
|
-
var stores = window.VoideStores;
|
|
10
|
-
if (!stores) {
|
|
11
|
-
setTimeout(initBindings, 10);
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
// Store references for expressions
|
|
16
|
-
// eslint-disable-next-line pickier/no-unused-vars
|
|
17
|
-
var $state = {};
|
|
18
|
-
`;for(let k of w)j+=` $state.${k} = stores.${k} ? stores.${k}.get() : {};
|
|
19
|
-
`;j+=`
|
|
20
|
-
// Binding update functions
|
|
21
|
-
function updateBindings() {
|
|
22
|
-
`;for(let k of C){let{elementId:q,attribute:F,expression:Q}=k,G=Q.replace(/\$(\w+)\./g,"$state.$1.");if(F==="text")j+=` (function() {
|
|
23
|
-
var el = document.getElementById('${q}');
|
|
24
|
-
if (el) {
|
|
25
|
-
try {
|
|
26
|
-
el.textContent = ${G};
|
|
27
|
-
}
|
|
28
|
-
catch (e) { console.error('Binding error:', e); }
|
|
29
|
-
}
|
|
30
|
-
})();
|
|
31
|
-
`;else if(F==="html")j+=` (function() {
|
|
32
|
-
var el = document.getElementById('${q}');
|
|
33
|
-
if (el) {
|
|
34
|
-
try {
|
|
35
|
-
el.innerHTML = ${G};
|
|
36
|
-
}
|
|
37
|
-
catch (e) { console.error('Binding error:', e); }
|
|
38
|
-
}
|
|
39
|
-
})();
|
|
40
|
-
`;else if(F==="class")j+=` (function() {
|
|
41
|
-
var el = document.getElementById('${q}');
|
|
42
|
-
if (el) {
|
|
43
|
-
try {
|
|
44
|
-
var value = ${G};
|
|
45
|
-
if (typeof value === 'string') {
|
|
46
|
-
// Dynamic class string - merge with existing static classes
|
|
47
|
-
// eslint-disable-next-line pickier/no-unused-vars
|
|
48
|
-
var staticClasses = el.getAttribute('data-static-class') || el.className;
|
|
49
|
-
if (!el.hasAttribute('data-static-class')) {
|
|
50
|
-
el.setAttribute('data-static-class', el.className);
|
|
51
|
-
}
|
|
52
|
-
el.className = (el.getAttribute('data-static-class') + ' ' + value).trim();
|
|
53
|
-
}
|
|
54
|
-
else if (typeof value === 'object') {
|
|
55
|
-
// Object syntax: { 'class-name': condition }
|
|
56
|
-
for (var cls in value) {
|
|
57
|
-
if (value[cls]) {
|
|
58
|
-
el.classList.add(cls);
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
el.classList.remove(cls);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
catch (e) { console.error('Binding error:', e); }
|
|
67
|
-
}
|
|
68
|
-
})();
|
|
69
|
-
`;else if(F==="show")j+=` (function() {
|
|
70
|
-
var el = document.getElementById('${q}');
|
|
71
|
-
if (el) {
|
|
72
|
-
try {
|
|
73
|
-
el.style.display = (${G}) ? '' : 'none';
|
|
74
|
-
}
|
|
75
|
-
catch (e) { console.error('Binding error:', e); }
|
|
76
|
-
}
|
|
77
|
-
})();
|
|
78
|
-
`;else if(F==="if")j+=` (function() {
|
|
79
|
-
var el = document.getElementById('${q}');
|
|
80
|
-
if (el) {
|
|
81
|
-
try {
|
|
82
|
-
el.style.visibility = (${G}) ? 'visible' : 'hidden';
|
|
83
|
-
}
|
|
84
|
-
catch (e) { console.error('Binding error:', e); }
|
|
85
|
-
}
|
|
86
|
-
})();
|
|
87
|
-
`;else j+=` (function() {
|
|
88
|
-
var el = document.getElementById('${q}');
|
|
89
|
-
if (el) {
|
|
90
|
-
try {
|
|
91
|
-
var value = ${G};
|
|
92
|
-
if (value === false || value === null || value === undefined) {
|
|
93
|
-
el.removeAttribute('${F}');
|
|
94
|
-
}
|
|
95
|
-
else if (value === true) {
|
|
96
|
-
el.setAttribute('${F}', '');
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
el.setAttribute('${F}', value);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
catch (e) { console.error('Binding error:', e); }
|
|
103
|
-
}
|
|
104
|
-
})();
|
|
105
|
-
`}j+=` }
|
|
106
|
-
|
|
107
|
-
// Subscribe to stores and update on changes. Capture the disposers so
|
|
108
|
-
// SPA fragment swaps can tear down old bindings before the next page's
|
|
109
|
-
// runtime takes over \u2014 without this, every navigation between pages
|
|
110
|
-
// using reactive-bindings stacked another subscription on every store,
|
|
111
|
-
// walking detached DOM forever. See stacksjs/stx#1709.
|
|
112
|
-
var _disposers = [];
|
|
113
|
-
`;for(let k of w)j+=` if (stores.${k}) {
|
|
114
|
-
var _unsub_${k} = stores.${k}.subscribe(function(state) {
|
|
115
|
-
$state.${k} = state;
|
|
116
|
-
updateBindings();
|
|
117
|
-
});
|
|
118
|
-
// store.subscribe() may return the disposer (preferred) or void; both
|
|
119
|
-
// are tolerated here.
|
|
120
|
-
if (typeof _unsub_${k} === 'function') _disposers.push(_unsub_${k});
|
|
121
|
-
}
|
|
122
|
-
`;return j+=`
|
|
123
|
-
// Initial update
|
|
124
|
-
updateBindings();
|
|
125
|
-
|
|
126
|
-
// Register this runtime's cleanup so SPA navigation can run it before
|
|
127
|
-
// swapping pages. The router (and any code) can call
|
|
128
|
-
// window.__stxCleanupBindings() to dispose subscriptions; we also wire
|
|
129
|
-
// 'popstate' and 'beforeunload' as a safety net for browser-driven nav.
|
|
130
|
-
function _cleanup() {
|
|
131
|
-
for (var i = 0; i < _disposers.length; i++) {
|
|
132
|
-
try { _disposers[i](); } catch (e) { /* swallow */ }
|
|
133
|
-
}
|
|
134
|
-
_disposers.length = 0;
|
|
135
|
-
}
|
|
136
|
-
if (!window.__stxBindingsCleanups) window.__stxBindingsCleanups = [];
|
|
137
|
-
window.__stxBindingsCleanups.push(_cleanup);
|
|
138
|
-
if (!window.__stxCleanupBindings) {
|
|
139
|
-
window.__stxCleanupBindings = function() {
|
|
140
|
-
var fns = window.__stxBindingsCleanups || [];
|
|
141
|
-
for (var i = 0; i < fns.length; i++) {
|
|
142
|
-
try { fns[i](); } catch (e) { /* swallow */ }
|
|
143
|
-
}
|
|
144
|
-
window.__stxBindingsCleanups = [];
|
|
145
|
-
};
|
|
146
|
-
window.addEventListener('popstate', window.__stxCleanupBindings);
|
|
147
|
-
window.addEventListener('beforeunload', window.__stxCleanupBindings);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
// Start when DOM is ready
|
|
152
|
-
if (document.readyState === 'loading') {
|
|
153
|
-
document.addEventListener('DOMContentLoaded', initBindings);
|
|
154
|
-
}
|
|
155
|
-
else {
|
|
156
|
-
initBindings();
|
|
157
|
-
}
|
|
158
|
-
})();
|
|
159
|
-
</script>
|
|
160
|
-
`,j}function E(C){let{html:D,bindings:w,stores:j}=y(C);if(w.length===0)return C;let k=B(w,j),q=D.lastIndexOf("</body>");if(q!==-1)return D.slice(0,q)+k+D.slice(q);return D+k}
|
|
161
|
-
export{y as Tt,B as Ut,E as Vt};
|
package/dist/chunk-g4ps1dj8.js
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Qa as x}from"./chunk-7cgmq685.js";import{db as w}from"./chunk-vcr5pzpx.js";function K(j){let b={};if(j)for(let q of j.props)b[q.name]=q.default;return{collapsed:!1,values:b,filter:""}}function N(j,b){if(!j)return`
|
|
3
|
-
<div class="stx-controls-panel">
|
|
4
|
-
<div class="stx-controls-empty">
|
|
5
|
-
Select a story to edit props
|
|
6
|
-
</div>
|
|
7
|
-
</div>
|
|
8
|
-
`;let z=(b.filter?j.props.filter((k)=>k.name.toLowerCase().includes(b.filter.toLowerCase())):j.props).map((k)=>{let A=x(k),B=b.values[k.name],D=`window.__stxStory.setProp('${k.name}', this.value)`;return w(A,B,D)}).join("");return`
|
|
9
|
-
<div class="stx-controls-panel ${b.collapsed?"collapsed":""}">
|
|
10
|
-
<div class="stx-controls-header" onclick="window.__stxStory.toggleControlsPanel()">
|
|
11
|
-
<span class="stx-controls-title">Controls</span>
|
|
12
|
-
<span class="stx-controls-toggle">${b.collapsed?"\u25C0":"\u25B6"}</span>
|
|
13
|
-
</div>
|
|
14
|
-
<div class="stx-controls-body">
|
|
15
|
-
<div class="stx-controls-search">
|
|
16
|
-
<input
|
|
17
|
-
type="text"
|
|
18
|
-
placeholder="Filter props..."
|
|
19
|
-
value="${F(b.filter)}"
|
|
20
|
-
oninput="window.__stxStory.filterProps(this.value)"
|
|
21
|
-
/>
|
|
22
|
-
</div>
|
|
23
|
-
<div class="stx-controls-list">
|
|
24
|
-
${z}
|
|
25
|
-
</div>
|
|
26
|
-
<div class="stx-controls-actions">
|
|
27
|
-
<button onclick="window.__stxStory.resetProps()">Reset</button>
|
|
28
|
-
<button onclick="window.__stxStory.copyProps()">Copy JSON</button>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
`}function O(){return`
|
|
33
|
-
<div class="stx-controls-panel">
|
|
34
|
-
<div class="stx-controls-header">
|
|
35
|
-
<span class="stx-controls-title">Controls</span>
|
|
36
|
-
</div>
|
|
37
|
-
<div class="stx-controls-body">
|
|
38
|
-
<div class="stx-controls-disabled">
|
|
39
|
-
Auto props are disabled for this story.
|
|
40
|
-
<br><br>
|
|
41
|
-
Use <code><template #controls></code> to define custom controls.
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
`}function P(){return`
|
|
46
|
-
.stx-controls-panel {
|
|
47
|
-
width: 280px;
|
|
48
|
-
border-left: 1px solid var(--border);
|
|
49
|
-
background: var(--bg);
|
|
50
|
-
display: flex;
|
|
51
|
-
flex-direction: column;
|
|
52
|
-
transition: width 0.2s;
|
|
53
|
-
}
|
|
54
|
-
.stx-controls-panel.collapsed {
|
|
55
|
-
width: 40px;
|
|
56
|
-
}
|
|
57
|
-
.stx-controls-panel.collapsed .stx-controls-body {
|
|
58
|
-
display: none;
|
|
59
|
-
}
|
|
60
|
-
.stx-controls-header {
|
|
61
|
-
display: flex;
|
|
62
|
-
justify-content: space-between;
|
|
63
|
-
align-items: center;
|
|
64
|
-
padding: 12px;
|
|
65
|
-
border-bottom: 1px solid var(--border);
|
|
66
|
-
cursor: pointer;
|
|
67
|
-
user-select: none;
|
|
68
|
-
}
|
|
69
|
-
.stx-controls-header:hover {
|
|
70
|
-
background: var(--bg-secondary);
|
|
71
|
-
}
|
|
72
|
-
.stx-controls-title {
|
|
73
|
-
font-weight: 600;
|
|
74
|
-
font-size: 13px;
|
|
75
|
-
}
|
|
76
|
-
.stx-controls-toggle {
|
|
77
|
-
font-size: 10px;
|
|
78
|
-
color: var(--text-secondary);
|
|
79
|
-
}
|
|
80
|
-
.stx-controls-body {
|
|
81
|
-
flex: 1;
|
|
82
|
-
overflow-y: auto;
|
|
83
|
-
padding: 12px;
|
|
84
|
-
}
|
|
85
|
-
.stx-controls-search {
|
|
86
|
-
margin-bottom: 12px;
|
|
87
|
-
}
|
|
88
|
-
.stx-controls-search input {
|
|
89
|
-
width: 100%;
|
|
90
|
-
padding: 8px;
|
|
91
|
-
border: 1px solid var(--border);
|
|
92
|
-
border-radius: 4px;
|
|
93
|
-
background: var(--bg);
|
|
94
|
-
color: var(--text);
|
|
95
|
-
font-size: 13px;
|
|
96
|
-
}
|
|
97
|
-
.stx-controls-search input:focus {
|
|
98
|
-
outline: none;
|
|
99
|
-
border-color: var(--primary);
|
|
100
|
-
}
|
|
101
|
-
.stx-controls-list {
|
|
102
|
-
display: flex;
|
|
103
|
-
flex-direction: column;
|
|
104
|
-
gap: 12px;
|
|
105
|
-
}
|
|
106
|
-
.stx-controls-actions {
|
|
107
|
-
display: flex;
|
|
108
|
-
gap: 8px;
|
|
109
|
-
margin-top: 16px;
|
|
110
|
-
padding-top: 16px;
|
|
111
|
-
border-top: 1px solid var(--border);
|
|
112
|
-
}
|
|
113
|
-
.stx-controls-actions button {
|
|
114
|
-
flex: 1;
|
|
115
|
-
padding: 8px;
|
|
116
|
-
border: 1px solid var(--border);
|
|
117
|
-
border-radius: 4px;
|
|
118
|
-
background: var(--bg);
|
|
119
|
-
color: var(--text);
|
|
120
|
-
font-size: 12px;
|
|
121
|
-
cursor: pointer;
|
|
122
|
-
}
|
|
123
|
-
.stx-controls-actions button:hover {
|
|
124
|
-
background: var(--bg-secondary);
|
|
125
|
-
}
|
|
126
|
-
.stx-controls-empty,
|
|
127
|
-
.stx-controls-disabled {
|
|
128
|
-
padding: 24px;
|
|
129
|
-
text-align: center;
|
|
130
|
-
color: var(--text-secondary);
|
|
131
|
-
font-size: 13px;
|
|
132
|
-
}
|
|
133
|
-
.stx-controls-disabled code {
|
|
134
|
-
background: var(--bg-secondary);
|
|
135
|
-
padding: 2px 6px;
|
|
136
|
-
border-radius: 4px;
|
|
137
|
-
font-size: 12px;
|
|
138
|
-
}
|
|
139
|
-
`}function F(j){return j.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}
|
|
140
|
-
export{K as j,N as k,O as l,P as m};
|
package/dist/chunk-g8b81pzc.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import L from"fs";import C from"path";import{gzipSync as H}from"zlib";import{createHash as _}from"crypto";var Y={".js":"js",".mjs":"js",".cjs":"js",".ts":"js",".jsx":"js",".tsx":"js",".css":"css",".scss":"css",".sass":"css",".less":"css",".html":"html",".htm":"html",".png":"image",".jpg":"image",".jpeg":"image",".gif":"image",".svg":"image",".webp":"image",".avif":"image",".ico":"image",".woff":"font",".woff2":"font",".ttf":"font",".eot":"font",".otf":"font"},R=[/node_modules/,/vendor/,/bower_components/,/\.min\./],N=[/index\.(js|ts|html)$/,/main\.(js|ts)$/,/app\.(js|ts)$/,/entry\.(js|ts)$/];async function y(j,Q={}){let{includeSourceMaps:U=!1,parseImports:K=!0,detectDuplicates:W=!0,topModulesCount:X=20}=Q;if(!L.existsSync(j))throw Error(`Build directory not found: ${j}`);if(!L.statSync(j).isDirectory())throw Error(`Not a directory: ${j}`);let J=await E(j,U),q=[],V=[];for(let G of J)try{let O=await I(G,j,K);q.push(O)}catch(O){V.push(`Failed to process ${G}: ${O}`)}let $=g(q,j),B=q.reduce((G,O)=>G+O.size,0),w=q.reduce((G,O)=>G+O.gzipSize,0),A=k(q),F=W?z(q):[],v=[...q].sort((G,O)=>O.size-G.size).slice(0,X);return{timestamp:Date.now(),buildDir:C.resolve(j),chunks:$,totalSize:B,totalGzipSize:w,moduleCount:q.length,duplicates:F,byType:A,largestModules:v,warnings:V}}async function E(j,Q){let U=[];async function K(W){let X=await L.promises.readdir(W,{withFileTypes:!0});for(let Z of X){let J=C.join(W,Z.name);if(Z.isDirectory()){if(!Z.name.startsWith(".")&&Z.name!=="node_modules")await K(J)}else if(Z.isFile()){if(!Q&&Z.name.endsWith(".map"))continue;U.push(J)}}}return await K(j),U}async function I(j,Q,U){let K=await L.promises.readFile(j),W=C.relative(Q,j),X=C.extname(j).toLowerCase(),Z=K.length,J=S(K),q=T(K,X),V=_("md5").update(K).digest("hex").slice(0,8),$=Y[X]||"other",B=[];if(U&&$==="js")B.push(...x(K.toString("utf-8")));return{id:W,path:W,size:Z,gzipSize:J,parsedSize:q,extension:X,type:$,imports:B,importedBy:[],hash:V}}function S(j){try{let Q=H(j,{level:9}).length;return Math.min(Q,j.length)}catch{return j.length}}function T(j,Q){if(Q.includes(".min.")||j.length<1000)return j.length;let K=Y[Q];if(K==="js")return Math.round(j.length*0.6);if(K==="css")return Math.round(j.length*0.7);return j.length}function x(j){let Q=[],U=/import\s+(?:[\w*{}\s,]+\s+from\s+)?['"]([^'"]+)['"]/g,K;while((K=U.exec(j))!==null)Q.push(K[1]);let W=/import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;while((K=W.exec(j))!==null)Q.push(K[1]);let X=/require\s*\(\s*['"]([^'"]+)['"]\s*\)/g;while((K=X.exec(j))!==null)Q.push(K[1]);return[...new Set(Q)]}function g(j,Q){let U=new Map;for(let W of j){let X=W.path.split(C.sep),Z;if(X.length===1)Z=C.basename(W.path,W.extension);else Z=X[0];let J=U.get(Z)||[];J.push(W),U.set(Z,J)}let K=[];for(let[W,X]of U){let Z=X.reduce(($,B)=>$+B.size,0),J=X.reduce(($,B)=>$+B.gzipSize,0),q=X.some(($)=>N.some((B)=>B.test($.path))),V=X.some(($)=>R.some((B)=>B.test($.path)));K.push({name:W,files:X.map(($)=>$.path),modules:X,size:Z,gzipSize:J,isEntry:q,isVendor:V})}return K.sort((W,X)=>X.size-W.size)}function k(j){let Q={js:{count:0,size:0,gzipSize:0},css:{count:0,size:0,gzipSize:0},html:{count:0,size:0,gzipSize:0},image:{count:0,size:0,gzipSize:0},font:{count:0,size:0,gzipSize:0},other:{count:0,size:0,gzipSize:0}};for(let U of j)Q[U.type].count++,Q[U.type].size+=U.size,Q[U.type].gzipSize+=U.gzipSize;return Q}function z(j){let Q=new Map;for(let K of j){let W=Q.get(K.hash)||[];W.push(K),Q.set(K.hash,W)}let U=[];for(let[,K]of Q)if(K.length>1){let W=K[0];U.push({path:W.path,count:K.length,wastedBytes:W.size*(K.length-1),locations:K.map((X)=>X.path)})}return U.sort((K,W)=>W.wastedBytes-K.wastedBytes)}function b(j){if(j<1024)return`${j} B`;if(j<1048576)return`${(j/1024).toFixed(2)} KB`;return`${(j/1048576).toFixed(2)} MB`}function h(j){let Q=j.match(/^([\d.]+)\s*(B|KB|MB|GB)?$/i);if(!Q)return 0;let U=Number.parseFloat(Q[1]);switch((Q[2]||"B").toUpperCase()){case"KB":return U*1024;case"MB":return U*1024*1024;case"GB":return U*1024*1024*1024;default:return U}}function p(j,Q){if(Q===0)return"0%";return`${(j/Q*100).toFixed(1)}%`}
|
|
3
|
-
export{y as Dp,b as Ep,h as Fp,p as Gp};
|
package/dist/chunk-ganag9dm.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{$q as J}from"./chunk-xygc53vr.js";function Q(E,D){let A=new Set,B=new Map,C=new Map,F={globalProperties:{},performance:!1,compilerOptions:{}},z={config:F,_components:B,_directives:C,_installedPlugins:A,use(q,...x){if(A.has(q))return z;if(A.add(q),typeof q==="function")q(z,...x);else if(typeof q.install==="function")q.install(z,...x);return z},provide(q,x){return J(q,x),z},component(q,x){if(!x)return B.get(q);return B.set(q,x),z},directive(q,x){if(!x)return C.get(q);return C.set(q,x),z},mount(q){if(typeof document<"u"){let x=globalThis.__stx_globals||(globalThis.__stx_globals={});Object.assign(x,F.globalProperties),document.querySelectorAll("[v-cloak]").forEach((K)=>{K.removeAttribute("v-cloak")})}return z},unmount(){B.clear(),C.clear(),A.clear()}};return z}function R(E){return class extends HTMLElement{_component;_shadow;constructor(){super();this._shadow=this.attachShadow({mode:"open"}),this._component=E}connectedCallback(){if(this._component?.render){let D=this._component.render();if(typeof D==="string")this._shadow.innerHTML=D}else if(this._component?.template)this._shadow.innerHTML=this._component.template;else if(typeof this._component==="string")this._shadow.innerHTML=this._component}disconnectedCallback(){this._shadow.innerHTML=""}}}
|
|
3
|
-
export{Q as Sq,R as Tq};
|
package/dist/chunk-gc84b1d2.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ry as U}from"./chunk-jjvp4t5w.js";import{Ty as v}from"./chunk-cz25azze.js";import{wz as D}from"./chunk-adqh2m9z.js";function P(F,z,V,Y){let G=F;G=G.replace(/@meta\(\s*['"]([^'"]+)['"](?:,\s*['"]([^'"]+)['"]\s*)?\)/g,($,N,A)=>{if(!A&&N.includes(":")){let Z=N.split(":"),q=N,B=Z.length>1?Z[1]:"";if(B&&z[B])A=z[B];else if(q.startsWith("og:")&&z.openGraph&&z.openGraph[Z[1]])A=z.openGraph[Z[1]];else A="";return A?`<meta property="${J(q)}" content="${J(A)}">`:""}return A?`<meta name="${J(N)}" content="${J(A)}">`:""});let I=/@metaTag\s*\(/g,_;while((_=I.exec(G))!==null){let $=_.index,N=$+_[0].length-1,A=1,Z=N+1;while(Z<G.length&&A>0){if(G[Z]==="(")A++;else if(G[Z]===")"){if(A--,A===0)break}Z++}if(A!==0)break;let q=G.substring(N+1,Z).trim(),B=Z+1,L=(()=>{try{let R=D(q,z);if(!R)return"";let j="<meta";if(R.name)j+=` name="${J(String(R.name))}"`;if(R.property)j+=` property="${J(String(R.property))}"`;if(R.httpEquiv)j+=` http-equiv="${J(String(R.httpEquiv))}"`;if(R.content)j+=` content="${J(String(R.content))}"`;return j+=">",j}catch(R){let j=R instanceof Error?R.message:String(R);return U("MetaTag",j,v.EVALUATION_ERROR)}})();G=G.substring(0,$)+L+G.substring(B),I.lastIndex=0}return G}function y(F,z,V){let Y=F,G=/@structuredData\s*\(/g,I;while((I=G.exec(Y))!==null){let _=I.index,$=_+I[0].length-1,N=1,A=$+1;while(A<Y.length&&N>0){if(Y[A]==="(")N++;else if(Y[A]===")"){if(N--,N===0)break}A++}if(N!==0)break;let Z=Y.substring($+1,A).trim(),q=A+1,B=(()=>{try{let L=D(Z,z);if(!L)return"";if(!L["@context"])L["@context"]="https://schema.org";return`<script type="application/ld+json">${JSON.stringify(L).replace(/<\//g,"<\\/")}</script>`}catch(L){let R=L instanceof Error?L.message:String(L);return U("StructuredData",R,v.EVALUATION_ERROR)}})();Y=Y.substring(0,_)+B+Y.substring(q),G.lastIndex=0}return Y}function T(F,z,V,Y){let G=F,I=/@seo\s*\(\s*\{/g,_;while((_=I.exec(G))!==null){let $=G.indexOf("{",_.index+4),N=1,A=$+1,Z=null,q=!1;while(A<G.length&&N>0){let O=G[A];if(q){q=!1,A++;continue}if(O==="\\"&&Z){q=!0,A++;continue}if(Z){if(O===Z)Z=null;A++;continue}if(O==='"'||O==="'"||O==="`"){Z=O,A++;continue}if(O==="{")N++;else if(O==="}")N--;A++}if(N!==0)break;let B=G.substring(A).match(/^\s*\)/);if(!B)break;let L=A+B[0].length,R=G.substring($,A),j=G.substring(_.index,L),X=((O)=>{try{let Q=D(O,z);if(!Q)return"";let k="";if(Q.title)k+=`<title>${J(Q.title)}</title>
|
|
3
|
-
`,k+=`<meta name="title" content="${J(Q.title)}">
|
|
4
|
-
`;if(Q.description)k+=`<meta name="description" content="${J(Q.description)}">
|
|
5
|
-
`;if(Q.keywords){let W=Array.isArray(Q.keywords)?Q.keywords.join(", "):Q.keywords;k+=`<meta name="keywords" content="${J(W)}">
|
|
6
|
-
`}if(Q.robots)k+=`<meta name="robots" content="${J(Q.robots)}">
|
|
7
|
-
`;if(Q.canonical)k+=`<link rel="canonical" href="${J(Q.canonical)}">
|
|
8
|
-
`;if(Q.openGraph){let W=Q.openGraph;if(k+=`<meta property="og:type" content="${J(W.type||"website")}">
|
|
9
|
-
`,W.title||Q.title){let K=W.title||Q.title||"";k+=`<meta property="og:title" content="${J(K)}">
|
|
10
|
-
`}if(W.description||Q.description){let K=W.description||Q.description||"";k+=`<meta property="og:description" content="${J(K)}">
|
|
11
|
-
`}if(W.url||Q.canonical){let K=W.url||Q.canonical||"";k+=`<meta property="og:url" content="${J(K)}">
|
|
12
|
-
`}if(W.image){if(k+=`<meta property="og:image" content="${J(W.image)}">
|
|
13
|
-
`,W.imageAlt)k+=`<meta property="og:image:alt" content="${J(W.imageAlt)}">
|
|
14
|
-
`;if(W.imageWidth)k+=`<meta property="og:image:width" content="${J(String(W.imageWidth))}">
|
|
15
|
-
`;if(W.imageHeight)k+=`<meta property="og:image:height" content="${J(String(W.imageHeight))}">
|
|
16
|
-
`}if(W.siteName)k+=`<meta property="og:site_name" content="${J(W.siteName)}">
|
|
17
|
-
`}if(Q.twitter){let W=Q.twitter;if(k+=`<meta name="twitter:card" content="${J(W.card||"summary_large_image")}">
|
|
18
|
-
`,W.title||Q.title){let K=W.title||Q.title||"";k+=`<meta name="twitter:title" content="${J(K)}">
|
|
19
|
-
`}if(W.description||Q.description){let K=W.description||Q.description||"";k+=`<meta name="twitter:description" content="${J(K)}">
|
|
20
|
-
`}if(W.image||Q.openGraph&&Q.openGraph.image){let K=W.image||(Q.openGraph?Q.openGraph.image:"")||"";k+=`<meta name="twitter:image" content="${J(K)}">
|
|
21
|
-
`}if(W.site)k+=`<meta name="twitter:site" content="${J(W.site)}">
|
|
22
|
-
`;if(W.creator)k+=`<meta name="twitter:creator" content="${J(W.creator)}">
|
|
23
|
-
`}if(Q.structuredData){let W=JSON.stringify(Q.structuredData).replace(/<\//g,"<\\/");k+=`<script type="application/ld+json">${W}</script>
|
|
24
|
-
`}return k.trim()}catch(Q){let k=Q instanceof Error?Q.message:String(Q);return U("SEO",`Error processing @seo directive: ${k}`,v.EVALUATION_ERROR)}})(R);G=G.substring(0,_.index)+X+G.substring(L),I.lastIndex=_.index+X.length}return G}function H(F,z,V){if(V.seo?.enabled===!1)return F;if(F.includes("<!-- stx SEO Tags -->")||V.skipDefaultSeoTags===!0)return F;let Y=z.__stx_runtime_head;if(!!(Y?.title||Y?.meta?.some((q)=>q.property==="og:title"||q.name==="og:title"||q.name==="twitter:title"||q.name==="description")))return F;if(/<meta\s+(?:[^>]*\s)?property=["']og:title["']/i.test(F)||/<meta\s+(?:[^>]*\s)?name=["']og:title["']/i.test(F)||/<meta\s+(?:[^>]*\s)?name=["']twitter:title["']/i.test(F))return F;if(!F.includes("<head>")&&!F.includes("<head "))return F;let I=F.includes("<title>")||F.includes("</title>"),_="";if(z.title)_=z.title;else if(z.meta&&z.meta.title)_=z.meta.title;else if(V.seo?.defaultConfig?.title)_=V.seo.defaultConfig.title;else _=V.defaultTitle||"stx Project";let $="";if(z.description)$=z.description;else if(z.meta&&z.meta.description)$=z.meta.description;else if(V.seo?.defaultConfig?.description)$=V.seo.defaultConfig.description;else $=V.defaultDescription||"A website built with stx templating engine";let N="";if(z.image)N=z.image;else if(z.meta&&z.meta.image)N=z.meta.image;else if(z.openGraph&&z.openGraph.image)N=z.openGraph.image;else if(V.seo?.defaultImage)N=V.seo.defaultImage;else if(V.defaultImage)N=V.defaultImage;let A=`
|
|
25
|
-
<!-- stx SEO Tags -->
|
|
26
|
-
<meta name="title" content="${J(_)}">
|
|
27
|
-
<meta name="description" content="${J($)}">
|
|
28
|
-
<meta property="og:title" content="${J(_)}">
|
|
29
|
-
<meta property="og:description" content="${J($)}">
|
|
30
|
-
<meta property="og:type" content="website">
|
|
31
|
-
<meta name="twitter:card" content="summary_large_image">
|
|
32
|
-
<meta name="twitter:title" content="${J(_)}">
|
|
33
|
-
<meta name="twitter:description" content="${J($)}">
|
|
34
|
-
`;if(N)A+=`
|
|
35
|
-
<meta property="og:image" content="${J(N)}">
|
|
36
|
-
<meta name="twitter:image" content="${J(N)}">
|
|
37
|
-
`;let Z=F;if(!I)Z=Z.replace(/<head[^>]*>/,`$&
|
|
38
|
-
<title>${J(_)}</title>`);return Z.replace(/<head[^>]*>/,`$&
|
|
39
|
-
${A}
|
|
40
|
-
`)}function J(F){return F.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}var S={name:"meta",handler:(F,z,V,Y)=>{if(z.length<1)return U("Meta","meta directive requires at least the meta name",v.INVALID_DIRECTIVE_SYNTAX);let G=z[0].replace(/['"]/g,""),I=z.length>1?z[1].replace(/['"]/g,""):"";return`<meta name="${J(G)}" content="${J(I)}">`},hasEndTag:!1},w={name:"structuredData",handler:(F,z,V,Y)=>{if(F.trim()==="")return U("StructuredData","structuredData directive requires JSON-LD content",v.INVALID_DIRECTIVE_SYNTAX);try{let G=JSON.parse(F);if(!G["@context"])G["@context"]="https://schema.org";if(!G["@type"])return U("StructuredData","structuredData requires @type property",v.INVALID_DIRECTIVE_SYNTAX);return`<script type="application/ld+json">${JSON.stringify(G)}</script>`}catch(G){let I=G instanceof Error?G.message:String(G);return U("StructuredData",I,v.EVALUATION_ERROR)}},hasEndTag:!0};function f(){return[S,w]}function x(F,z){let{baseUrl:V,defaultChangefreq:Y="weekly",defaultPriority:G=0.5,includeLastmod:I=!0}=z,_=V.replace(/\/$/,"");return`<?xml version="1.0" encoding="UTF-8"?>
|
|
41
|
-
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
42
|
-
${F.map((N)=>{let A=N.loc.startsWith("http")?N.loc:`${_}${N.loc.startsWith("/")?"":"/"}${N.loc}`,Z=N.lastmod||(I?new Date().toISOString().split("T")[0]:void 0),q=N.changefreq||Y,B=N.priority??G,L=` <url>
|
|
43
|
-
<loc>${C(A)}</loc>`;if(Z)L+=`
|
|
44
|
-
<lastmod>${Z}</lastmod>`;return L+=`
|
|
45
|
-
<changefreq>${q}</changefreq>`,L+=`
|
|
46
|
-
<priority>${B.toFixed(1)}</priority>`,L+=`
|
|
47
|
-
</url>`,L}).join(`
|
|
48
|
-
`)}
|
|
49
|
-
</urlset>`}function h(F,z){let V=z.replace(/\/$/,""),Y=new Date().toISOString().split("T")[0];return`<?xml version="1.0" encoding="UTF-8"?>
|
|
50
|
-
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
51
|
-
${F.map((I)=>{let _=I.startsWith("http")?I:`${V}${I.startsWith("/")?"":"/"}${I}`;return` <sitemap>
|
|
52
|
-
<loc>${C(_)}</loc>
|
|
53
|
-
<lastmod>${Y}</lastmod>
|
|
54
|
-
</sitemap>`}).join(`
|
|
55
|
-
`)}
|
|
56
|
-
</sitemapindex>`}async function d(F,z){let{extensions:V=[".stx",".html",".htm"],ignore:Y=["_*",".*","node_modules","components","partials","layouts"]}=z,G=[],I=V.length===1?`*${V[0]}`:`*{${V.join(",")}}`,_=new Bun.Glob(`**/${I}`);for await(let $ of _.scan(F)){if(Y.some((B)=>{if(B.startsWith("*"))return $.includes(B.slice(1));return $.startsWith(B)||$.includes(`/${B}`)}))continue;let A=$.replace(/\\/g,"/").replace(/index\.(stx|html|htm)$/,"").replace(/\.(stx|html|htm)$/,"");if(!A.startsWith("/"))A=`/${A}`;if(A!=="/"&&A.endsWith("/"))A=A.slice(0,-1);let Z=`${F}/${$}`,q;try{let B=await Bun.file(Z).stat();if(B)q=new Date(B.mtime).toISOString().split("T")[0]}catch{}G.push({loc:A||"/",lastmod:q,priority:A==="/"?1:0.5})}return G.sort(($,N)=>$.loc.localeCompare(N.loc)),G}function b(F){let z=[];for(let V of F.rules){if(z.push(`User-agent: ${V.userAgent}`),V.allow)for(let Y of V.allow)z.push(`Allow: ${Y}`);if(V.disallow)for(let Y of V.disallow)z.push(`Disallow: ${Y}`);if(V.crawlDelay!==void 0)z.push(`Crawl-delay: ${V.crawlDelay}`);z.push("")}if(F.sitemap){let V=Array.isArray(F.sitemap)?F.sitemap:[F.sitemap];for(let Y of V)z.push(`Sitemap: ${Y}`)}if(F.host)z.push(`Host: ${F.host}`);return z.join(`
|
|
57
|
-
`).trim()}function u(F){return b({rules:[{userAgent:"*",allow:["/"]}],sitemap:F})}function C(F){return F.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}
|
|
58
|
-
export{P as xt,y as yt,T as zt,H as At,S as Bt,w as Ct,f as Dt,x as Et,h as Ft,d as Gt,b as Ht,u as It};
|
package/dist/chunk-gcf5v18y.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 mA,Y as nA,Z as oA};
|
package/dist/chunk-ghrx0hn1.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
var E=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),N=new Set(["html","head","body","p","li","dt","dd","rt","rp","option","optgroup","thead","tbody","tfoot","tr","td","th","colgroup","caption"]);function H(W){return W.replace(/[^\n]/g," ")}function R(W){let J=W.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,H).replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,H).replace(/<!--[\s\S]*?-->/g,H).replace(/\{\{\{[\s\S]*?\}\}\}/g,H).replace(/\{\{[\s\S]*?\}\}/g,H).replace(/\{!![\s\S]*?!!\}/g,H).replace(/"[^"]*"/g,H).replace(/'[^']*'/g,H),F=new Map,M=new Map,Y=/<(\/?)([A-Za-z][\w-]*)\b[^>]*?(\/?)>/g,z;while((z=Y.exec(J))!==null){let j=z[1]==="/",q=z[2],X=z[3]==="/";if(E.has(q.toLowerCase()))continue;if(X)continue;if(j)M.set(q,(M.get(q)??0)+1);else{let Z=F.get(q);if(Z)Z.count++;else{let B=J.slice(0,z.index).split(`
|
|
3
|
-
`).length;F.set(q,{count:1,firstLine:B})}}}let Q=[];for(let j of new Set([...F.keys(),...M.keys()])){if(N.has(j.toLowerCase()))continue;let q=F.get(j)?.count??0,X=M.get(j)??0;if(q!==X)Q.push({tag:j,opened:q,closed:X,firstOpenLine:F.get(j)?.firstLine??0})}return Q}var $=new Set;function U(W,J){let F;try{F=R(W)}catch{return}if(F.length===0)return;let M=`${J}:${W.length}`;if($.has(M))return;$.add(M);let Y=J?J.split(/[/\\]/).pop()||J:"template";for(let{tag:z,opened:Q,closed:j,firstOpenLine:q}of F)if(Q>j){let X=q?` (first opened at line ${q})`:"";console.warn(`[stx] ${Y}: <${z}> ${Q} opened, ${j} closed \u2014 an unclosed <${z}>${X} may swallow the content that follows it.`)}else console.warn(`[stx] ${Y}: <${z}> ${Q} opened, ${j} closed \u2014 ${j-Q} stray </${z}>.`)}
|
|
4
|
-
export{R as st,U as tt};
|
package/dist/chunk-gqpkp459.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Sk as Z,Vk as U,Wk as X,Xk as _}from"./chunk-5ggw1dyv.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 Hk,F as Ik,k as Jk,D as Kk,P as Lk,u as Mk,d as Nk};
|
package/dist/chunk-h45py5w5.js
DELETED
package/dist/chunk-h5wa62ek.js
DELETED
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import U from"fs";import Y from"path";var $=".stx/story/presets.json",W=1,C=10;class F{storage;storagePath;dirty=!1;constructor(k){this.storagePath=Y.join(k,$),this.storage=this.loadStorage()}loadStorage(){try{let k=U.readFileSync(this.storagePath,"utf-8"),z=JSON.parse(k);if(z.version!==W)return this.migrateStorage(z);return z}catch{return{version:W,presets:[],recentIds:[]}}}migrateStorage(k){return{version:W,presets:k.presets||[],recentIds:k.recentIds||[]}}async save(){if(!this.dirty)return;let k=Y.dirname(this.storagePath);await U.promises.mkdir(k,{recursive:!0}),await U.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}createPreset(k,z,B={}){let H={id:L(),name:k,description:B.description,props:z,componentId:B.componentId,created:Date.now(),usageCount:0,tags:B.tags};return this.storage.presets.push(H),this.dirty=!0,H}getPreset(k){return this.storage.presets.find((z)=>z.id===k)}getAllPresets(){return[...this.storage.presets]}getPresetsForComponent(k){return this.storage.presets.filter((z)=>!z.componentId||z.componentId===k)}getRecentPresets(){return this.storage.recentIds.map((k)=>this.getPreset(k)).filter((k)=>k!==void 0)}usePreset(k){let z=this.getPreset(k);if(!z)return;return z.lastUsed=Date.now(),z.usageCount++,this.storage.recentIds=[k,...this.storage.recentIds.filter((B)=>B!==k)].slice(0,C),this.dirty=!0,z}updatePreset(k,z){let B=this.getPreset(k);if(!B)return;return Object.assign(B,z),this.dirty=!0,B}deletePreset(k){let z=this.storage.presets.findIndex((B)=>B.id===k);if(z===-1)return!1;return this.storage.presets.splice(z,1),this.storage.recentIds=this.storage.recentIds.filter((B)=>B!==k),this.dirty=!0,!0}searchPresets(k){let z=k.toLowerCase();return this.storage.presets.filter((B)=>{if(B.name.toLowerCase().includes(z))return!0;if(B.description?.toLowerCase().includes(z))return!0;if(B.tags?.some((H)=>H.toLowerCase().includes(z)))return!0;return!1})}getMostUsedPresets(k=5){return[...this.storage.presets].sort((z,B)=>B.usageCount-z.usageCount).slice(0,k)}exportPresets(k){let z=k?this.storage.presets.filter((B)=>k.includes(B.id)):this.storage.presets;return JSON.stringify({presets:z},null,2)}importPresets(k,z=!1){let B=JSON.parse(k),H=0;for(let J of B.presets){let K=this.storage.presets.find((Z)=>Z.id===J.id);if(K&&!z)continue;if(K)Object.assign(K,J);else this.storage.presets.push(J);H++}if(H>0)this.dirty=!0;return H}}function L(){return`preset-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}function X(k){return`
|
|
3
|
-
<div class="presets-panel">
|
|
4
|
-
<div class="presets-header">
|
|
5
|
-
<h3>Presets</h3>
|
|
6
|
-
<button class="preset-save-btn" onclick="saveCurrentAsPreset()">+ Save Current</button>
|
|
7
|
-
</div>
|
|
8
|
-
<div class="presets-list">
|
|
9
|
-
${k.map((B)=>`
|
|
10
|
-
<div class="preset-item" data-preset-id="${B.id}">
|
|
11
|
-
<div class="preset-info">
|
|
12
|
-
<div class="preset-name">${B.name}</div>
|
|
13
|
-
${B.description?`<div class="preset-desc">${B.description}</div>`:""}
|
|
14
|
-
</div>
|
|
15
|
-
<div class="preset-actions">
|
|
16
|
-
<button class="preset-apply" onclick="applyPreset('${B.id}')">Apply</button>
|
|
17
|
-
<button class="preset-delete" onclick="deletePreset('${B.id}')">\xD7</button>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
`).join("")||'<div class="presets-empty">No presets saved</div>'}
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
`}function b(){return`
|
|
24
|
-
.presets-panel {
|
|
25
|
-
padding: 12px;
|
|
26
|
-
background: var(--bg-secondary);
|
|
27
|
-
border-radius: 8px;
|
|
28
|
-
}
|
|
29
|
-
.presets-header {
|
|
30
|
-
display: flex;
|
|
31
|
-
justify-content: space-between;
|
|
32
|
-
align-items: center;
|
|
33
|
-
margin-bottom: 12px;
|
|
34
|
-
}
|
|
35
|
-
.presets-header h3 {
|
|
36
|
-
margin: 0;
|
|
37
|
-
font-size: 14px;
|
|
38
|
-
}
|
|
39
|
-
.preset-save-btn {
|
|
40
|
-
padding: 4px 8px;
|
|
41
|
-
font-size: 12px;
|
|
42
|
-
background: var(--primary);
|
|
43
|
-
color: white;
|
|
44
|
-
border: none;
|
|
45
|
-
border-radius: 4px;
|
|
46
|
-
cursor: pointer;
|
|
47
|
-
}
|
|
48
|
-
.presets-list {
|
|
49
|
-
display: flex;
|
|
50
|
-
flex-direction: column;
|
|
51
|
-
gap: 8px;
|
|
52
|
-
}
|
|
53
|
-
.preset-item {
|
|
54
|
-
display: flex;
|
|
55
|
-
justify-content: space-between;
|
|
56
|
-
align-items: center;
|
|
57
|
-
padding: 8px;
|
|
58
|
-
background: var(--bg);
|
|
59
|
-
border-radius: 4px;
|
|
60
|
-
border: 1px solid var(--border);
|
|
61
|
-
}
|
|
62
|
-
.preset-name {
|
|
63
|
-
font-weight: 500;
|
|
64
|
-
font-size: 13px;
|
|
65
|
-
}
|
|
66
|
-
.preset-desc {
|
|
67
|
-
font-size: 11px;
|
|
68
|
-
color: var(--text-secondary);
|
|
69
|
-
}
|
|
70
|
-
.preset-actions {
|
|
71
|
-
display: flex;
|
|
72
|
-
gap: 4px;
|
|
73
|
-
}
|
|
74
|
-
.preset-apply {
|
|
75
|
-
padding: 4px 8px;
|
|
76
|
-
font-size: 11px;
|
|
77
|
-
background: var(--bg-secondary);
|
|
78
|
-
border: 1px solid var(--border);
|
|
79
|
-
border-radius: 4px;
|
|
80
|
-
cursor: pointer;
|
|
81
|
-
}
|
|
82
|
-
.preset-delete {
|
|
83
|
-
padding: 4px 8px;
|
|
84
|
-
font-size: 11px;
|
|
85
|
-
background: transparent;
|
|
86
|
-
border: none;
|
|
87
|
-
color: var(--text-secondary);
|
|
88
|
-
cursor: pointer;
|
|
89
|
-
}
|
|
90
|
-
.preset-delete:hover {
|
|
91
|
-
color: #ef4444;
|
|
92
|
-
}
|
|
93
|
-
.presets-empty {
|
|
94
|
-
text-align: center;
|
|
95
|
-
color: var(--text-secondary);
|
|
96
|
-
font-size: 13px;
|
|
97
|
-
padding: 20px;
|
|
98
|
-
}
|
|
99
|
-
`}function j(){return`
|
|
100
|
-
<script>
|
|
101
|
-
window.__stxPresets = {
|
|
102
|
-
async saveCurrentAsPreset() {
|
|
103
|
-
const name = prompt('Preset name:');
|
|
104
|
-
if (!name) return;
|
|
105
|
-
|
|
106
|
-
const props = window.__stxProps || {};
|
|
107
|
-
const storyId = window.__stxStory?.currentStoryId;
|
|
108
|
-
|
|
109
|
-
const response = await fetch('/api/presets', {
|
|
110
|
-
method: 'POST',
|
|
111
|
-
headers: { 'Content-Type': 'application/json' },
|
|
112
|
-
body: JSON.stringify({ name, props, componentId: storyId })
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
if (response.ok) {
|
|
116
|
-
window.__stxStory?.refreshPresets?.();
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
|
|
120
|
-
async applyPreset(id) {
|
|
121
|
-
const response = await fetch('/api/presets/' + id + '/use', { method: 'POST' });
|
|
122
|
-
const preset = await response.json();
|
|
123
|
-
|
|
124
|
-
if (preset.props) {
|
|
125
|
-
window.dispatchEvent(new CustomEvent('stx:props-change', {
|
|
126
|
-
detail: { props: preset.props }
|
|
127
|
-
}));
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
|
|
131
|
-
async deletePreset(id) {
|
|
132
|
-
if (!confirm('Delete this preset?')) return;
|
|
133
|
-
|
|
134
|
-
await fetch('/api/presets/' + id, { method: 'DELETE' });
|
|
135
|
-
window.__stxStory?.refreshPresets?.();
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
// Expose to global scope
|
|
140
|
-
window.saveCurrentAsPreset = window.__stxPresets.saveCurrentAsPreset;
|
|
141
|
-
window.applyPreset = window.__stxPresets.applyPreset;
|
|
142
|
-
window.deletePreset = window.__stxPresets.deletePreset;
|
|
143
|
-
</script>
|
|
144
|
-
`}
|
|
145
|
-
export{F as dc,X as ec,b as fc,j as gc};
|