@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-xcb0pbr6.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import J from"fs";import F from"path";function V(z){try{return J.statSync(z).mtimeMs}catch{return null}}function Q(z,B){let j=Math.max(0,Math.round((B-z)/1000));if(j<60)return`${j}s ago`;if(j<3600)return`${Math.round(j/60)}m ago`;return`${Math.round(j/3600)}h ago`}function X(z,B){try{return globalThis.Bun?.resolveSync(z,B)??null}catch{return null}}function Y(z,B="stx"){let j=F.resolve(z);for(let A=0;A<10;A++){let q=F.join(j,"pantry","@stacksjs",B);if(J.existsSync(q))return q;let K=F.dirname(j);if(K===j)break;j=K}return null}async function $(z={}){let B=z.cwd?F.resolve(z.cwd):process.cwd(),j=z.resolve??X,A=Date.now(),q=[],K=j("@stacksjs/stx",B);q.push(K?{name:"@stacksjs/stx resolves to",status:"ok",detail:K}:{name:"@stacksjs/stx resolves to",status:"info",detail:"not resolvable from here (running inside the stx repo, or not installed)"});let T=j("bun-plugin-stx",B);if(T)q.push({name:"bun-plugin-stx resolves to",status:"ok",detail:T});let C=Y(B,"stx");if(!C)q.push({name:"pantry",status:"info",detail:"no pantry/@stacksjs/stx found \u2014 standard install (nothing to rebuild)"});else{let H=F.join(C,"src/signals.ts"),I=[F.join(C,"dist/index.js"),F.join(C,"dist/signals.js")].find((G)=>J.existsSync(G))||null,L=V(H),N=I?V(I):null;if(L==null)q.push({name:"pantry dist freshness",status:"info",detail:`found pantry at ${C} but no src/signals.ts to compare`});else if(N==null)q.push({name:"pantry dist freshness",status:"error",detail:"pantry has src but no built dist \u2014 the dev server will resolve nothing (or a stale copy elsewhere)",fix:`cd ${C} && bun build.ts`});else if(N<L){let G=Math.round((L-N)/1000);q.push({name:"pantry dist freshness",status:"error",detail:`dist (${Q(N,A)}) is OLDER than src/signals.ts (${Q(L,A)}) by ${G}s \u2014 your edit isn't built`,fix:`cd ${C} && bun build.ts`})}else q.push({name:"pantry dist freshness",status:"ok",detail:`dist rebuilt after src (src ${Q(L,A)}, dist ${Q(N,A)})`});let U=F.join(B,"node_modules/@stacksjs/stx"),O=null;try{O=J.lstatSync(U)}catch{O=null}if(!O)q.push({name:"node_modules \u2192 pantry",status:"info",detail:"node_modules/@stacksjs/stx not present (not installed here)"});else if(O.isSymbolicLink()){let G=null;try{G=J.realpathSync(U)}catch{}let W=(()=>{try{return J.realpathSync(C)}catch{return C}})();q.push(G===W?{name:"node_modules \u2192 pantry",status:"ok",detail:"symlinked to pantry"}:{name:"node_modules \u2192 pantry",status:"warn",detail:`symlinked to ${G||"(dangling)"}, not pantry`})}else q.push({name:"node_modules \u2192 pantry",status:"warn",detail:"is a real directory, NOT symlinked to pantry \u2014 edits to pantry src/dist won't be resolved",fix:"rm -rf node_modules/@stacksjs/stx && ln -s ../../pantry/@stacksjs/stx node_modules/@stacksjs/stx"})}if(q.push({name:"dev runtime cache",status:"info",detail:"cleared automatically on source edits by the dev watcher (clearDevCaches, #1745 item C)"}),z.generateRuntime)try{let I=z.generateRuntime().length;q.push(I>1000?{name:"signals runtime",status:"ok",detail:`generated ${I.toLocaleString()} chars`}:{name:"signals runtime",status:"warn",detail:`generated only ${I} chars \u2014 suspiciously short`})}catch(H){q.push({name:"signals runtime",status:"error",detail:`failed to generate: ${H.message}`})}return{checks:q,ok:!q.some((H)=>H.status==="error")}}function b(z){let B={ok:"\u2713",warn:"\u26A0",error:"\u2717",info:"\xB7"},j=["stx runtime resolution:"];for(let A of z.checks)if(j.push(` ${B[A.status]} ${A.name}: ${A.detail}`),A.fix)j.push(` \u2192 ${A.fix}`);return j.push(""),j.push(z.ok?"\u2713 All framework-runtime layers are aligned.":"\u2717 A runtime layer is stale \u2014 see the fixes above."),j.join(`
|
|
3
|
-
`)}
|
|
4
|
-
export{Y as mn,$ as nn,b as on};
|
package/dist/chunk-xhkjhxsp.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
function W(C){let{token:J,baseUrl:K="https://api.netlify.com/api/v1"}=C;async function E(A,j,F={}){let L=`${K}${j}`,O={Authorization:`Bearer ${J}`,"User-Agent":"stx-deploy/1.0"},M;if(F.rawBody)O["Content-Type"]=F.contentType||"application/octet-stream",M=F.rawBody;else if(F.body)O["Content-Type"]="application/json",M=JSON.stringify(F.body);let D=await fetch(L,{method:A,headers:O,body:M});if(!D.ok){let Q=Error(`Netlify API error: ${D.status} ${D.statusText}`);Q.status=D.status;try{let R=await D.json();Q.message=R.message||Q.message,Q.code=R.code,Q.details=R}catch{}throw Q}let H=await D.text();if(!H)return{};return JSON.parse(H)}return{async getSite(A){return E("GET",`/sites/${A}`)},async listSites(){return E("GET","/sites")},async createSite(A){let j={};if(A)j.name=A;return E("POST","/sites",{body:j})},async createDeploy(A,j){let F={files:j.files,draft:j.draft??!0,async:j.async??!0};if(j.title)F.title=j.title;if(j.branch)F.branch=j.branch;if(j.functions)F.functions=j.functions;return E("POST",`/sites/${A}/deploys`,{body:F})},async uploadFile(A,j,F){let L=j.startsWith("/")?j.slice(1):j;await E("PUT",`/deploys/${A}/files/${L}`,{rawBody:F,contentType:"application/octet-stream"})},async uploadFiles(A,j){let L=[...j],O=async()=>{while(L.length>0){let D=L.shift();if(D)await this.uploadFile(A,D.path,D.content)}},M=Array.from({length:Math.min(5,j.length)},()=>O());await Promise.all(M)},async getDeploy(A){return E("GET",`/deploys/${A}`)},async waitForDeploy(A,j={}){let{timeout:F=300000,pollInterval:L=2000,onProgress:O}=j,M=Date.now();while(!0){let D=await this.getDeploy(A);if(O)O(D);if(D.state==="ready")return D;if(D.state==="error"){let H=Error(`Deploy failed: ${D.error_message||"Unknown error"}`);throw H.status=500,H.details=D,H}if(Date.now()-M>F){let H=Error(`Deploy timed out after ${F}ms`);throw H.status=408,H.details=D,H}await new Promise((H)=>setTimeout(H,L))}},async lockDeploy(A){return E("POST",`/deploys/${A}/lock`)},async unlockDeploy(A){return E("POST",`/deploys/${A}/unlock`)}}}async function V(C){let J=await crypto.subtle.digest("SHA-1",C);return Array.from(new Uint8Array(J)).map((E)=>E.toString(16).padStart(2,"0")).join("")}async function X(C,J={}){let{ignore:K=["node_modules",".git",".env*","*.map"]}=J,E=[],A=new Bun.Glob("**/*");for await(let j of A.scan({cwd:C,onlyFiles:!0,dot:!1})){if(K.some((H)=>{if(H.includes("*"))return new RegExp(`^${H.replace(/\*/g,".*")}$`).test(j);return j.includes(H)}))continue;let L=`${C}/${j}`,M=await Bun.file(L).arrayBuffer(),D=await V(M);E.push({path:j,content:new Uint8Array(M),sha1:D})}return E}function Y(C){let J={};for(let K of C)J[`/${K.path}`]=K.sha1;return J}function Z(C,J){let K=new Set(J.map((E)=>E.startsWith("/")?E.slice(1):E));return C.filter((E)=>K.has(E.path))}function _(C){if(C<1024)return`${C} B`;if(C<1048576)return`${(C/1024).toFixed(1)} KB`;if(C<1073741824)return`${(C/1048576).toFixed(1)} MB`;return`${(C/1073741824).toFixed(1)} GB`}function $(C){return C.reduce((J,K)=>J+K.content.byteLength,0)}
|
|
3
|
-
export{W as Sn,V as Tn,X as Un,Y as Vn,Z as Wn,_ as Xn,$ as Yn};
|
package/dist/chunk-xhnpsngj.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{il as k,jl as q}from"./chunk-0wdar532.js";import{tl as j}from"./chunk-9agvhp1x.js";import{zl as A}from"./chunk-znxp3zha.js";function H(){return{script:[j(),k(),A()].join(`
|
|
3
|
-
|
|
4
|
-
`),css:q()}}function y(){let{script:D,css:E}=H(),F=D.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/.*$/gm,"").replace(/\s+/g," ").replace(/\s*([{};,:])\s*/g,"$1").trim(),G=E.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\s+/g," ").replace(/\s*([{};,:])\s*/g,"$1").trim();return{script:F,css:G}}
|
|
5
|
-
export{H as $k,y as al};
|
package/dist/chunk-xsqbk4yk.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ls as y}from"./chunk-w01y57f5.js";import{et as x}from"./chunk-nap11ntr.js";import{yy as I}from"./chunk-94g3cahw.js";import g from"crypto";import w from"path";class h{store=new Map;async get(B){let U=this.store.get(B);if(!U||U.expires<=Date.now()){if(U)this.store.delete(B);return null}return{...U.data}}async set(B,U,A){this.store.set(B,{data:{...U},expires:Date.now()+A*1000})}async delete(B){this.store.delete(B)}}async function l(B,U,A){let Q={},z={},b=await A.get(B);if(b)Object.assign(Q,b);let E={id:B,data:Q,get(G){return Q[G]},set(G,O){Q[G]=O,W()},delete(G){delete Q[G],W()},clear(){Object.keys(Q).forEach((G)=>delete Q[G]),W()},has(G){return G in Q},flash(G,O){if(O!==void 0){z[G]=O;return}let R=z[G];return delete z[G],R},regenerate(){let G=B;B=u(),E.id=B,A.delete(G),W()},destroy(){A.delete(B),Object.keys(Q).forEach((G)=>delete Q[G])}};function W(){A.set(B,{...Q,__flash:z},U)}return W(),E}function u(){return g.randomBytes(32).toString("hex")}function p(B){if(!B)return{};return B.split(";").reduce((U,A)=>{let[Q,...z]=A.trim().split("=");if(Q)U[Q]=decodeURIComponent(z.join("="));return U},{})}function v(B,U,A={}){let Q=`${encodeURIComponent(B)}=${encodeURIComponent(U)}`;if(A.maxAge!==void 0)Q+=`; Max-Age=${A.maxAge}`;if(A.expires)Q+=`; Expires=${A.expires.toUTCString()}`;if(A.path)Q+=`; Path=${A.path}`;if(A.domain)Q+=`; Domain=${A.domain}`;if(A.secure)Q+="; Secure";if(A.httpOnly)Q+="; HttpOnly";if(A.sameSite)Q+=`; SameSite=${A.sameSite}`;return Q}function d(){return g.randomBytes(32).toString("hex")}function r(B,U){if(!B||!U)return!1;try{return g.timingSafeEqual(Buffer.from(B),Buffer.from(U))}catch{return!1}}async function i(B,U={},A={}){let Q=A.viewsDir||"./views",z=A.layoutsDir||"./layouts",b=!B.includes("<")&&!B.includes("@"),E,W;if(b){if(W=w.resolve(Q,B),!W.endsWith(".stx"))W+=".stx";if(!await Bun.file(W).exists())return new Response(`Template not found: ${B}`,{status:500});E=await Bun.file(W).text()}else E=B,W="inline-template.stx";let G={...U,props:U,__filename:W,__dirname:w.dirname(W)};if(A.ctx)G.csrf_token=A.ctx.csrfToken,G.csrf_field=`<input type="hidden" name="_token" value="${A.ctx.csrfToken}">`,G.old=A.ctx.old,G.errors=A.ctx.errors,G.session=A.ctx.session,G.user=A.ctx.user(),G.isAuthenticated=A.ctx.isAuthenticated();let O=E.match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(O){let H=O[1];E=E.replace(/<script\s+server\b[^>]*>[\s\S]*?<\/script>/gi,""),await x(H,G,W)}let R={layoutsDir:z,...A.stxOptions},P=await y(E,G,W,R,new Set),C=new Headers({"Content-Type":"text/html; charset=utf-8"});if(A.ctx)A.ctx.responseHeaders.forEach((H,T)=>{C.set(T,H)});return new Response(P,{headers:C})}function e(B={}){let{viewsDir:U="./views",layoutsDir:A="./layouts",defaultLayout:Q,sessionSecret:z=g.randomBytes(32).toString("hex"),sessionCookieName:b="stx_session",sessionTtl:E=86400,stxOptions:W={},csrfCookieName:G="csrf_token",csrfEnabled:O=!0}=B,R=B.sessionStore??new h,q=[],P=[];function C(j,J){for(let K of q){if(K.method!==j&&K.method!=="*")continue;let Y=[],V=K.pattern.replace(/\/:(\w+)/g,(Z,X)=>{return Y.push(X),"/([^/]+)"}).replace(/\//g,"\\/"),L=new RegExp(`^${V}$`),_=J.match(L);if(_){let Z={};return Y.forEach((X,N)=>{Z[X]=_[N+1]}),{route:K,params:Z}}}return null}async function H(j,J){let K=new URL(j.url),Y=p(j.headers.get("Cookie")),V=new Headers,L=[],_=Y[b];if(!_)_=u(),L.push(v(b,_,{httpOnly:!0,secure:K.protocol==="https:",sameSite:"Lax",path:"/",maxAge:E}));let Z=await l(_,E,R),X=Z.get("_csrf");if(!X)X=d(),Z.set("_csrf",X);let N={};K.searchParams.forEach(($,F)=>{N[F]=$});let f=Z.flash("_errors")||{},k=Z.flash("_old_input")||{},m={request:j,url:K,params:J,query:N,session:Z,csrfToken:X,cookies:Y,responseHeaders:V,errors:f,async formData(){let $=await j.formData(),F={};return $.forEach((D,c)=>{F[c]=D}),F},async json(){return await j.json()},setCookie($,F,D={}){L.push(v($,F,D))},flash($,F){Z.flash($,F)},getFlash($){return Z.flash($)},old($){return k[$]||""},isAuthenticated(){return Z.has("user")},user(){return Z.get("user")}};if(L.length>0)L.forEach(($)=>{V.append("Set-Cookie",$)});return m}let T=async(j,J)=>{if(["GET","HEAD","OPTIONS"].includes(j.request.method))return J();if(!O)return J();let Y=(await j.request.clone().formData().catch(()=>new FormData)).get("_token"),V=j.request.headers.get("X-CSRF-Token"),L=Y||V,_=j.session.get("_csrf");if(!L||!_||!r(L,_))return new Response("CSRF token mismatch",{status:419});return J()};async function S(j){let J=new URL(j.url),K=j.method,Y=C(K,J.pathname);if(!Y)return new Response("Not Found",{status:404});let V=await H(j,Y.params),L=[...P,T,...Y.route.middleware],_=0,Z=async()=>{if(_<L.length){let X=L[_++];return X(V,Z)}return Y.route.handler(V)};try{let X=await Z();return V.responseHeaders.forEach((N,f)=>{X.headers.set(f,N)}),X}catch(X){return I.log(X instanceof Error?X:Error(String(X)),{handler:"request"},"error"),new Response("Internal Server Error",{status:500})}}function M(j,J,K,Y=[]){q.push({method:j,pattern:J,handler:K,middleware:Y})}return{fetch:S,get(j,J,K=[]){return M("GET",j,J,K),this},post(j,J,K=[]){return M("POST",j,J,K),this},put(j,J,K=[]){return M("PUT",j,J,K),this},delete(j,J,K=[]){return M("DELETE",j,J,K),this},patch(j,J,K=[]){return M("PATCH",j,J,K),this},use(j){return P.push(j),this},async render(j,J={},K){return i(j,J,{viewsDir:U,layoutsDir:A,stxOptions:W,ctx:K})},redirect(j,J=302){return new Response(null,{status:J,headers:{Location:j}})},back(j,J,K){if(J)j.session.flash("_errors",J);if(K)j.session.flash("_old_input",K);let Y=j.request.headers.get("Referer")||"/";return new Response(null,{status:302,headers:{Location:Y}})},listen(j=3000){return Bun.serve({port:j,fetch:S})}}}
|
|
3
|
-
export{h as ng,i as og,e as pg};
|
package/dist/chunk-xygc53vr.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
var B=null,F=[],J=0;function K(){return`stx-${++J}`}function M(q=null){return{scopeId:K(),parent:q,provides:new Map(q?.provides),exposed:null,refs:{},props:{},attrs:{},slots:{},emit:()=>{},el:null,errorCapturedHooks:[],isMounted:!1}}function N(q){if(q)F.push(q);else if(F.length>0)F.pop();B=q||F[F.length-1]||null}function O(){return B}function Q(){B=null,F.length=0}function R(q,w){if(B)B.provides.set(q,w);else H.set(q,w)}function U(q,w){let z=B;while(z){if(z.provides.has(q))return z.provides.get(q);z=z.parent}if(H.has(q))return H.get(q);return w}var H=new Map;function W(q,w){H.set(q,w)}function X(q){let w=B,z=(D,...E)=>{if(typeof document>"u")return;if(w?.el)w.el.dispatchEvent(new CustomEvent(D,{detail:E.length===1?E[0]:E,bubbles:!0,cancelable:!0}))};if(w)w.emit=z;return z}function Y(q){if(B)B.exposed=q}function Z(q){let w=Promise.resolve();return q?w.then(q):w}function _(q){if(B)B.errorCapturedHooks.push(q)}function $(q,w,z){let D=w?.parent;while(D){for(let E of D.errorCapturedHooks)if(E(q,w,z)===!1)return;D=D.parent}}function j(){return B?.slots??{}}function A(){return B?.slots??{}}function G(){return B?.attrs??{}}function T(q){let w=q.__provides?new Map(Object.entries(q.__provides)):new Map;return{...q,__provides:w,__provide(z,D){w.set(z,D)},__inject(z,D){if(w.has(z))return w.get(z);if(q.__provides){let E=q.__provides instanceof Map?q.__provides:new Map(Object.entries(q.__provides));if(E.has(z))return E.get(z)}return D}}}function b(){return`
|
|
3
|
-
// STX Composition API Runtime
|
|
4
|
-
(function() {
|
|
5
|
-
const _provides = new Map();
|
|
6
|
-
const _scopes = window.__stx_scopes || (window.__stx_scopes = {});
|
|
7
|
-
const _exposed = window.__stx_exposed || (window.__stx_exposed = {});
|
|
8
|
-
|
|
9
|
-
// provide() stores values in the nearest scope's provide map
|
|
10
|
-
window.__stx_provide = function(key, value) {
|
|
11
|
-
_provides.set(key, value);
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
// inject() walks up DOM ancestors with data-stx-scope to find provided values
|
|
15
|
-
window.__stx_inject = function(key, defaultValue, el) {
|
|
16
|
-
// Walk up the DOM tree
|
|
17
|
-
let current = el ? el.closest('[data-stx-scope]') : null;
|
|
18
|
-
while (current) {
|
|
19
|
-
const scopeId = current.getAttribute('data-stx-scope');
|
|
20
|
-
const scope = _scopes[scopeId];
|
|
21
|
-
if (scope && scope.__provided && scope.__provided.has(key)) {
|
|
22
|
-
return scope.__provided.get(key);
|
|
23
|
-
}
|
|
24
|
-
current = current.parentElement ? current.parentElement.closest('[data-stx-scope]') : null;
|
|
25
|
-
}
|
|
26
|
-
// Check global provides
|
|
27
|
-
if (_provides.has(key)) return _provides.get(key);
|
|
28
|
-
return defaultValue;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
// defineEmits() returns an emit function
|
|
32
|
-
window.__stx_defineEmits = function(scopeId) {
|
|
33
|
-
return function emit(event, ...args) {
|
|
34
|
-
const el = document.querySelector('[data-stx-scope="' + scopeId + '"]');
|
|
35
|
-
if (el) {
|
|
36
|
-
el.dispatchEvent(new CustomEvent(event, {
|
|
37
|
-
detail: args.length === 1 ? args[0] : args,
|
|
38
|
-
bubbles: true,
|
|
39
|
-
cancelable: true
|
|
40
|
-
}));
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
// defineExpose() registers exposed properties
|
|
46
|
-
window.__stx_defineExpose = function(scopeId, exposed) {
|
|
47
|
-
_exposed[scopeId] = exposed;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
// nextTick()
|
|
51
|
-
window.__stx_nextTick = function(fn) {
|
|
52
|
-
return Promise.resolve().then(fn);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
// Template ref resolution
|
|
56
|
-
window.__stx_resolveRefs = function(scopeId) {
|
|
57
|
-
const scope = document.querySelector('[data-stx-scope="' + scopeId + '"]');
|
|
58
|
-
if (!scope) return {};
|
|
59
|
-
const refs = {};
|
|
60
|
-
// eslint-disable-next-line pickier/no-unused-vars
|
|
61
|
-
scope.querySelectorAll('[data-stx-ref]').forEach(function(el) {
|
|
62
|
-
refs[el.getAttribute('data-stx-ref')] = el;
|
|
63
|
-
});
|
|
64
|
-
return refs;
|
|
65
|
-
};
|
|
66
|
-
})();
|
|
67
|
-
`}
|
|
68
|
-
export{K as Uq,M as Vq,N as Wq,O as Xq,Q as Yq,R as Zq,U as _q,W as $q,X as ar,Y as br,Z as cr,_ as dr,$ as er,j as fr,A as gr,G as hr,T as ir,b as jr};
|
package/dist/chunk-y0qg6rrv.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
function K(B,E){let C=E.treeFile||{title:E.fileName,path:E.relativePath};if(B.tree.file==="title")return C.title.split("/");if(B.tree.file==="path")return[...E.relativePath.split("/").slice(0,-1),C.title];if(typeof B.tree.file==="function")return B.tree.file(C);return[C.title]}function Q(B,E){for(let z of E)z.treePath=K(B,z);let C=(B.tree.groups||[]).map((z)=>({groupConfig:{id:z.id||z.title,title:z.title,include:z.include},treeObject:{}})),q={treeObject:{}};C.push(q);for(let z=0;z<E.length;z++){let H=E[z],J=L(H,C,q);M(H.treePath,z,J.treeObject)}let A=B.tree.order==="asc"?(z,H)=>z.localeCompare(H):B.tree.order,D=[];for(let z of C)if(z===q)D.push(...I(z.treeObject,A));else if(z.groupConfig&&Object.keys(z.treeObject).length>0)D.push({group:!0,id:z.groupConfig.id,title:z.groupConfig.title,children:I(z.treeObject,A)});return D}function L(B,E,C){let q=B.treeFile||{title:B.fileName,path:B.relativePath};for(let A of E)if(A.groupConfig?.include&&A.groupConfig.include(q))return A;return C}function M(B,E,C){let q=C;for(let A=0;A<B.length;A++){let D=B[A];if(A===B.length-1)if(q[D]!==void 0){let H=1;while(q[`${D}-${H}`]!==void 0)H++;q[`${D}-${H}`]=E}else q[D]=E;else{if(q[D]===void 0)q[D]={};else if(typeof q[D]==="number"){let H=q[D];q[D]={"":H}}q=q[D]}}}function I(B,E){let C=[];for(let[q,A]of Object.entries(B))if(typeof A==="number")C.push({title:q,index:A});else C.push({title:q,children:I(A,E)});return C.sort((q,A)=>E(q.title,A.title)),C}function R(B){let E=[];function C(q){for(let A of q)if("index"in A)E.push(A.index);else if("children"in A)C(A.children)}return C(B),E}function S(B,E){function C(q,A){for(let D of q)if("index"in D&&D.index===E)return{path:[...A,D.title],node:D};else if("children"in D){let z=C(D.children,[...A,D.title]);if(z)return z}return null}return C(B,[])}
|
|
3
|
-
export{K as id,Q as jd,R as kd,S as ld};
|
package/dist/chunk-y25pr13j.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
var S="<style data-stx-cloak>[x-cloak]{display:none !important}</style>";function b(q){if(q.includes("data-stx-cloak"))return q;let K=q.lastIndexOf("</head>");if(K===-1)return q;return`${q.slice(0,K)}<style data-stx-cloak>[x-cloak]{display:none !important}</style>
|
|
3
|
-
${q.slice(K)}`}function A(q,K={},F={}){let{title:Z="stx App",lang:_="en",meta:$=[],link:U=[],script:N=[],headRaw:G="",bodyClass:z="",bodyAttrs:J={}}=K,O=F.title||Z,M=[...[{charset:"UTF-8"},{name:"viewport",content:"width=device-width, initial-scale=1.0"}],...$].map((B)=>{return` <meta ${Object.entries(B).map(([Q,V])=>`${Q}="${V}"`).join(" ")}>`}).join(`
|
|
4
|
-
`),Y=U.map((B)=>{return` <link ${Object.entries(B).map(([Q,V])=>`${Q}="${V}"`).join(" ")}>`}).join(`
|
|
5
|
-
`),j=N.map((B)=>{if(B.src)return` <script ${Object.entries(B).filter(([Q])=>Q!=="content").map(([Q,V])=>`${Q}="${V}"`).join(" ")}></script>`;if(B.content)return` <script>${B.content}</script>`;return""}).filter(Boolean).join(`
|
|
6
|
-
`),L=Object.entries(J).map(([B,X])=>` ${B}="${X}"`).join(""),P=z?` class="${z}"`:"",W=[M,` <title>${O}</title>`," <style data-stx-cloak>[x-cloak]{display:none !important}</style>",Y,j,G?` ${G}`:"",...(F.styles||[]).map((B)=>` ${B}`),...(F.headScripts||[]).map((B)=>` ${B}`),F.headStack||""].filter(Boolean),D=[q,...(F.bodyScripts||[]).map((B)=>B),F.bodyStack||""].filter(Boolean);return`<!DOCTYPE html>
|
|
7
|
-
<html lang="${_}">
|
|
8
|
-
<head>
|
|
9
|
-
${W.join(`
|
|
10
|
-
`)}
|
|
11
|
-
</head>
|
|
12
|
-
<body${P}${L}>
|
|
13
|
-
${D.join(`
|
|
14
|
-
`)}
|
|
15
|
-
</body>
|
|
16
|
-
</html>`}function H(q){return/<!DOCTYPE\b/i.test(q)||/<html[\s>]/i.test(q)}function w(q,K={}){let F=q.lastIndexOf("</head>");if(F===-1)return q;let{meta:Z=[],link:_=[],script:$=[],headRaw:U=""}=K,N=q.slice(0,F),G=[];for(let z of Z){let J=z.name?`name="${z.name}"`:z.property?`property="${z.property}"`:z.charset!=null?"charset=":z["http-equiv"]?`http-equiv="${z["http-equiv"]}"`:"";if(J&&N.includes(J))continue;G.push(` <meta ${Object.entries(z).map(([O,E])=>`${O}="${E}"`).join(" ")}>`)}for(let z of _){if(z.href&&N.includes(`href="${z.href}"`))continue;G.push(` <link ${Object.entries(z).map(([J,O])=>`${J}="${O}"`).join(" ")}>`)}for(let z of $)if(z.src){if(N.includes(`src="${z.src}"`))continue;G.push(` <script ${Object.entries(z).filter(([J])=>J!=="content").map(([J,O])=>`${J}="${O}"`).join(" ")}></script>`)}else if(z.content){if(N.includes(z.content))continue;G.push(` <script>${z.content}</script>`)}if(U&&!N.includes(U))G.push(` ${U}`);if(G.length===0)return q;return`${q.slice(0,F)}${G.join(`
|
|
17
|
-
`)}
|
|
18
|
-
${q.slice(F)}`}function x(q,K={},F={}){if(H(q))return q;return A(q,K,F)}
|
|
19
|
-
export{S as Dw,b as Ew,A as Fw,H as Gw,w as Hw,x as Iw};
|
package/dist/chunk-y4c744dk.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{bq as B,cq as C}from"./chunk-bgec9r1v.js";import{createHash as F}from"crypto";import{getRouterScript as I}from"stx-router";function E(j){return F("sha256").update(j).digest("hex").slice(0,8)}function M(j=!1){let q=j?C():B(),A=E(q);return{content:q,filename:`runtime.${A}.js`,hash:A}}function N(){let j=I(),q=E(j);return{content:j,filename:`router.${q}.js`,hash:q}}function O(j){return{runtimeTag:j.runtime?`<script src="/__stx/${j.runtime.filename}"></script>`:"",routerTag:j.router?`<script src="/__stx/${j.router.filename}"></script>`:"",cssTag:j.css?`<link rel="stylesheet" href="/__stx/${j.css.filename}">`:""}}
|
|
3
|
-
export{E as Zp,M as _p,N as $p,O as aq};
|
package/dist/chunk-y4md9hp0.js
DELETED
package/dist/chunk-y5wazw6j.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
var M=(j,q,v,x)=>`(function(){function read(){try{var k=${JSON.stringify(q)};var t=localStorage.getItem(k);return t===null?(${JSON.stringify(j)}==='dark'||(${JSON.stringify(j)}==='auto'&&window.matchMedia('(prefers-color-scheme: dark)').matches)):t==='dark'}catch(e){return ${JSON.stringify(j)}==='dark'}}function apply(){var isDark=read();var html=document.documentElement;html.classList[isDark?'add':'remove']('dark');var color=isDark?${JSON.stringify(x)}:${JSON.stringify(v)};if(!document.head)return;var tc=document.querySelector('meta[name="theme-color"]:not([media])');if(!tc){tc=document.createElement('meta');tc.setAttribute('name','theme-color');tc.setAttribute('data-stx-theme-meta','1')}tc.setAttribute('content',color);if(tc!==document.head.firstChild){document.head.insertBefore(tc,document.head.firstChild)}}apply();window.addEventListener('stx:navigate',apply);window.addEventListener('popstate',apply)})();`,Q=(j,q,v)=>`document.addEventListener('click',function(e){var t=e.target&&e.target.closest&&e.target.closest('#theme-toggle');if(!t)return;var html=document.documentElement;var isDark=html.classList.toggle('dark');try{localStorage.setItem(${JSON.stringify(j)},isDark?'dark':'light')}catch(e){}var tc=document.querySelector('meta[name="theme-color"]:not([media])');if(tc)tc.setAttribute('content',isDark?${JSON.stringify(v)}:${JSON.stringify(q)})});`;function V(j,q){if(q.theme===!1)return j;let v=typeof q.theme==="object"&&q.theme!==null?q.theme:{},x=v.default??"dark",J=v.storageKey??"theme",z=v.colors?.light??"#ffffff",B=v.colors?.dark??"#000000";if(x==="dark"){if(!/<html\b[^>]*\bclass=/.test(j))j=j.replace(/<html\b([^>]*)>/i,'<html$1 class="dark">');else if(!/<html\b[^>]*\bclass="[^"]*\bdark\b/.test(j))j=j.replace(/<html\b([^>]*\bclass=")([^"]*)(")/i,"<html$1$2 dark$3")}if(!j.includes("data-stx-theme-meta")&&/<head\b[^>]*>/i.test(j)){let w=['<meta name="color-scheme" content="dark light" data-stx-theme-meta="1">',`<meta name="theme-color" media="(prefers-color-scheme: light)" content="${z}" data-stx-theme-meta="1">`,`<meta name="theme-color" media="(prefers-color-scheme: dark)" content="${B}" data-stx-theme-meta="1">`].join(`
|
|
3
|
-
`);j=j.replace(/<head\b([^>]*)>/i,`<head$1>
|
|
4
|
-
${w}`)}if(!j.includes("__stxThemeGuard")&&/<head\b[^>]*>/i.test(j)){let w=`<script data-stx-theme-guard="1">${M(x,J,z,B)};window.__stxThemeGuard=1;</script>`;j=j.replace(/<head\b([^>]*)>/i,`<head$1>
|
|
5
|
-
${w}`)}if(!j.includes("__stxThemeToggle")&&/<\/body>/i.test(j)){let w=`<script data-stx-theme-toggle="1">${Q(J,z,B)};window.__stxThemeToggle=1;</script>`;j=j.replace(/<\/body>/i,`${w}
|
|
6
|
-
</body>`)}return j}
|
|
7
|
-
export{V as Wg};
|
package/dist/chunk-y5xz0jc4.js
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
function K(w){let z=new Map;for(let b of w)z.set(b.name,{name:b.name,path:b.path,dependencies:b.dependencies,dependents:[],depth:0});for(let b of w)for(let q of b.dependencies){let F=z.get(q);if(F)F.dependents.push(b.name)}let k=new Set;function A(b,q){let F=z.get(b);if(!F||k.has(b))return;F.depth=Math.max(F.depth,q),k.add(b);for(let E of F.dependencies)A(E,q+1);k.delete(b)}let B=[],j=[];for(let[b,q]of z){if(q.dependents.length===0)B.push(b),A(b,0);if(q.dependencies.length===0)j.push(b)}return{nodes:z,roots:B,leaves:j}}function O(w,z){let k=new Set,A=new Set;function B(j){if(A.has(j))return;A.add(j);let b=w.nodes.get(j);if(!b)return;for(let q of b.dependencies)k.add(q),B(q)}return B(z),Array.from(k)}function P(w,z){let k=new Set,A=new Set;function B(j){if(A.has(j))return;A.add(j);let b=w.nodes.get(j);if(!b)return;for(let q of b.dependents)k.add(q),B(q)}return B(z),Array.from(k)}function Q(w){let z=[],k=new Set,A=[];function B(j){if(A.includes(j)){let q=A.indexOf(j);z.push([...A.slice(q),j]);return}if(k.has(j))return;k.add(j),A.push(j);let b=w.nodes.get(j);if(b)for(let q of b.dependencies)B(q);A.pop()}for(let j of w.nodes.keys())B(j);return z}function R(w,z){let k=Array.from(w.nodes.values()),A=Math.max(...k.map((b)=>b.depth),0),B=[];for(let b=0;b<=A;b++)B.push(k.filter((q)=>q.depth===b));let j=B.map((b,q)=>{let F=b.map((E)=>{let J=E.name===z,I=["dep-node"];if(J)I.push("selected");if(w.roots.includes(E.name))I.push("root");if(w.leaves.includes(E.name))I.push("leaf");return`
|
|
3
|
-
<div
|
|
4
|
-
class="${I.join(" ")}"
|
|
5
|
-
onclick="window.__stxStory.selectComponent('${E.name}')"
|
|
6
|
-
title="${E.path}"
|
|
7
|
-
>
|
|
8
|
-
<span class="dep-node-name">${E.name}</span>
|
|
9
|
-
<span class="dep-node-count">
|
|
10
|
-
${E.dependencies.length>0?`\u2193${E.dependencies.length}`:""}
|
|
11
|
-
${E.dependents.length>0?`\u2191${E.dependents.length}`:""}
|
|
12
|
-
</span>
|
|
13
|
-
</div>
|
|
14
|
-
`}).join("");return`
|
|
15
|
-
<div class="dep-level" data-depth="${q}">
|
|
16
|
-
<div class="dep-level-label">Level ${q}</div>
|
|
17
|
-
<div class="dep-level-nodes">${F}</div>
|
|
18
|
-
</div>
|
|
19
|
-
`}).join("");return`
|
|
20
|
-
<div class="stx-dependency-graph">
|
|
21
|
-
<div class="dep-graph-header">
|
|
22
|
-
<span>Component Dependencies</span>
|
|
23
|
-
<span class="dep-graph-stats">
|
|
24
|
-
${w.nodes.size} components,
|
|
25
|
-
${w.roots.length} roots,
|
|
26
|
-
${w.leaves.length} leaves
|
|
27
|
-
</span>
|
|
28
|
-
</div>
|
|
29
|
-
<div class="dep-graph-body">
|
|
30
|
-
${j}
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
`}function U(){return`
|
|
34
|
-
.stx-dependency-graph {
|
|
35
|
-
padding: 16px;
|
|
36
|
-
}
|
|
37
|
-
.dep-graph-header {
|
|
38
|
-
display: flex;
|
|
39
|
-
justify-content: space-between;
|
|
40
|
-
align-items: center;
|
|
41
|
-
margin-bottom: 16px;
|
|
42
|
-
font-weight: 600;
|
|
43
|
-
}
|
|
44
|
-
.dep-graph-stats {
|
|
45
|
-
font-size: 12px;
|
|
46
|
-
color: var(--text-secondary);
|
|
47
|
-
font-weight: normal;
|
|
48
|
-
}
|
|
49
|
-
.dep-graph-body {
|
|
50
|
-
display: flex;
|
|
51
|
-
flex-direction: column;
|
|
52
|
-
gap: 16px;
|
|
53
|
-
}
|
|
54
|
-
.dep-level {
|
|
55
|
-
display: flex;
|
|
56
|
-
align-items: flex-start;
|
|
57
|
-
gap: 12px;
|
|
58
|
-
}
|
|
59
|
-
.dep-level-label {
|
|
60
|
-
width: 60px;
|
|
61
|
-
font-size: 11px;
|
|
62
|
-
color: var(--text-secondary);
|
|
63
|
-
text-transform: uppercase;
|
|
64
|
-
padding-top: 8px;
|
|
65
|
-
}
|
|
66
|
-
.dep-level-nodes {
|
|
67
|
-
display: flex;
|
|
68
|
-
flex-wrap: wrap;
|
|
69
|
-
gap: 8px;
|
|
70
|
-
flex: 1;
|
|
71
|
-
}
|
|
72
|
-
.dep-node {
|
|
73
|
-
padding: 8px 12px;
|
|
74
|
-
background: var(--bg-secondary);
|
|
75
|
-
border: 1px solid var(--border);
|
|
76
|
-
border-radius: 4px;
|
|
77
|
-
cursor: pointer;
|
|
78
|
-
display: flex;
|
|
79
|
-
align-items: center;
|
|
80
|
-
gap: 8px;
|
|
81
|
-
}
|
|
82
|
-
.dep-node:hover {
|
|
83
|
-
border-color: var(--primary);
|
|
84
|
-
}
|
|
85
|
-
.dep-node.selected {
|
|
86
|
-
background: var(--primary);
|
|
87
|
-
color: white;
|
|
88
|
-
border-color: var(--primary);
|
|
89
|
-
}
|
|
90
|
-
.dep-node.root {
|
|
91
|
-
border-left: 3px solid #22c55e;
|
|
92
|
-
}
|
|
93
|
-
.dep-node.leaf {
|
|
94
|
-
border-left: 3px solid #f59e0b;
|
|
95
|
-
}
|
|
96
|
-
.dep-node-name {
|
|
97
|
-
font-size: 13px;
|
|
98
|
-
}
|
|
99
|
-
.dep-node-count {
|
|
100
|
-
font-size: 11px;
|
|
101
|
-
color: var(--text-secondary);
|
|
102
|
-
}
|
|
103
|
-
.dep-node.selected .dep-node-count {
|
|
104
|
-
color: rgba(255,255,255,0.7);
|
|
105
|
-
}
|
|
106
|
-
`}function V(w,z){let k=w.nodes.get(z);if(!k)return'<div class="dep-detail-empty">Component not found</div>';let A=k.dependencies.length>0?k.dependencies.map((j)=>`
|
|
107
|
-
<div class="dep-link" onclick="window.__stxStory.selectComponent('${j}')">
|
|
108
|
-
\u2193 ${j}
|
|
109
|
-
</div>
|
|
110
|
-
`).join(""):'<div class="dep-none">No dependencies</div>',B=k.dependents.length>0?k.dependents.map((j)=>`
|
|
111
|
-
<div class="dep-link" onclick="window.__stxStory.selectComponent('${j}')">
|
|
112
|
-
\u2191 ${j}
|
|
113
|
-
</div>
|
|
114
|
-
`).join(""):'<div class="dep-none">No dependents</div>';return`
|
|
115
|
-
<div class="stx-component-detail">
|
|
116
|
-
<div class="dep-detail-header">
|
|
117
|
-
<span class="dep-detail-name">${z}</span>
|
|
118
|
-
<span class="dep-detail-path">${k.path}</span>
|
|
119
|
-
</div>
|
|
120
|
-
|
|
121
|
-
<div class="dep-detail-section">
|
|
122
|
-
<div class="dep-detail-title">Dependencies (${k.dependencies.length})</div>
|
|
123
|
-
${A}
|
|
124
|
-
</div>
|
|
125
|
-
|
|
126
|
-
<div class="dep-detail-section">
|
|
127
|
-
<div class="dep-detail-title">Used by (${k.dependents.length})</div>
|
|
128
|
-
${B}
|
|
129
|
-
</div>
|
|
130
|
-
|
|
131
|
-
<div class="dep-detail-actions">
|
|
132
|
-
<button onclick="window.__stxStory.openStory('${z}')">
|
|
133
|
-
Open Story
|
|
134
|
-
</button>
|
|
135
|
-
<button onclick="window.__stxStory.openSource('${k.path}')">
|
|
136
|
-
View Source
|
|
137
|
-
</button>
|
|
138
|
-
</div>
|
|
139
|
-
</div>
|
|
140
|
-
`}
|
|
141
|
-
export{K as Ya,O as Za,P as _a,Q as $a,R as ab,U as bb,V as cb};
|
package/dist/chunk-y86m1wr4.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ci as S}from"./chunk-bjnjpsgn.js";import{Di as g}from"./chunk-2w3302dh.js";import{Yk as A,Zk as D}from"./chunk-cn409b69.js";import{$p as P,_p as C}from"./chunk-y4c744dk.js";import{Oq as f}from"./chunk-ncnfa8ae.js";import{Sr as R}from"./chunk-w01y57f5.js";import{Iw as b}from"./chunk-y25pr13j.js";import{Sw as y}from"./chunk-q6h6yvzb.js";import V from"fs";import H from"path";var d=new Set([".DS_Store","Thumbs.db","desktop.ini",".gitkeep",".gitignore"]);function n(J,K){let X=0,z=0;if(!V.existsSync(J))return{copied:X,bytes:z};function Q(E,O){let U=V.readdirSync(E,{withFileTypes:!0});for(let W of U){if(d.has(W.name))continue;let G=H.join(E,W.name),Y=H.join(O,W.name);if(W.isDirectory())V.mkdirSync(Y,{recursive:!0}),Q(G,Y);else if(W.isFile()){if(V.existsSync(Y))continue;V.copyFileSync(G,Y),X++,z+=V.statSync(Y).size}}}return Q(J,K),{copied:X,bytes:z}}async function zq(J={}){let K=Date.now(),X=H.resolve(J.root||process.cwd()),z=H.resolve(X,J.outputDir||".output");console.log("[stx build] Starting production build...");let Q={};try{Q=await R()}catch{}let E=J.componentsDir??Q.componentsDir??"components",O=J.partialsDir??Q.partialsDir??"partials",U=J.layoutsDir??Q.layoutsDir??"layouts",W=J.publicDir??Q.publicDir??"public",G=Q.app?.head||{},Y=Q.router?.container||"main";if(V.existsSync(z))V.rmSync(z,{recursive:!0});let h=[H.join(z,"public","__stx"),H.join(z,"public","assets"),H.join(z,"server","pages"),H.join(z,"server","fragments")];for(let F of h)V.mkdirSync(F,{recursive:!0});console.log("[stx build] Discovering routes...");let I=g(X),m=["components","layouts","partials"],k=I.filter((F)=>{return!m.some((q)=>F.pattern.startsWith(`/${q}/`)||F.pattern===`/${q}`)});console.log(`[stx build] Found ${k.length} page routes (${I.length-k.length} non-page files excluded)`),console.log("[stx build] Generating shared assets...");let $=C(J.debug),Z=P();await Bun.write(H.join(z,"public","__stx",$.filename),$.content),await Bun.write(H.join(z,"public","__stx",Z.filename),Z.content),console.log(`[stx build] Runtime: ${$.filename} (${($.content.length/1024).toFixed(1)}KB)`),console.log(`[stx build] Router: ${Z.filename} (${(Z.content.length/1024).toFixed(1)}KB)`),console.log("[stx build] Compiling templates...");let v=[],N=[];for(let F of k)try{let q=await S(F.filePath,F.pattern,{componentsDir:E,partialsDir:O,layoutsDir:U,debug:J.debug});if(v.push(q),q.html=q.html.replace(/runtime\.__STX_HASH__\.js/g,$.filename).replace(/router\.__STX_HASH__\.js/g,Z.filename),q.html=b(q.html,G,{bodyScripts:[`<script src="/__stx/${Z.filename}"></script>`]}),!/<body[^>]*\bdata-stx=/.test(q.html)){let B=q.html.match(/<(?!body\b)[a-zA-Z][a-zA-Z0-9-]*\b[^>]*?\s(data-stx="[^"]+")[^>]*>/);if(B&&B[1]){let x=B[1];q.html=q.html.replace(" "+x,""),q.html=q.html.replace(/<body([^>]*)>/,`<body$1 ${x}>`)}}q.html=q.html.replace(/<style data-crosswind="generated">[\s\S]*?<\/style>\s*/g,""),q.html=await y(q.html),q.fragment=f(q.html,Y);let w=F.pattern==="/"?"index":F.pattern.slice(1).replace(/\//g,"-").replace(/[[\]]/g,"_"),M=H.join("server","pages",`${w}.compiled.json`),j=H.join("server","fragments",`${w}.html`);await Bun.write(H.join(z,M),JSON.stringify(q,null,2)),await Bun.write(H.join(z,j),q.fragment),N.push({pattern:F.pattern,compiledPath:M,fragmentPath:j,isDynamic:q.hasServerScripts,hasParams:F.pattern.includes(":")||F.pattern.includes("[")}),console.log(`[stx build] \u2713 ${F.pattern}`)}catch(q){console.error(`[stx build] \u2717 ${F.pattern}:`,q instanceof Error?q.message:q)}let _=H.resolve(X,W);if(V.existsSync(_)){let{copied:F,bytes:q}=n(_,H.join(z,"public"));if(F>0)console.log(`[stx build] Copied ${F} public asset${F===1?"":"s"} (${(q/1024).toFixed(1)}KB) from ${W}/`)}let L={runtime:$.filename,router:Z.filename},l=A(N,L,z);D(l,z);let T=Date.now()-K;return console.log(`
|
|
3
|
-
[stx build] Done in ${T}ms \u2014 ${v.length} pages compiled`),{pageCount:v.length,assets:L,outputDir:z,duration:T}}
|
|
4
|
-
export{zq as Bi};
|
package/dist/chunk-yaan98dd.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{tb as G}from"./chunk-91s2hres.js";import{zb as F}from"./chunk-dvfs1h3c.js";import{Jb as E}from"./chunk-3yg9hbmb.js";import{rB as J}from"./chunk-3jm3snz8.js";var k={story:{description:"Component showcase and testing",options:{port:{alias:"p",type:"number",description:"Server port (default: 6006)"},open:{alias:"o",type:"boolean",description:"Open browser automatically"},host:{type:"string",description:"Host to bind to"}},action:async(j)=>{await E(j)}},"story:dev":{description:"Start story development server",options:{port:{alias:"p",type:"number",description:"Server port (default: 6006)"},open:{alias:"o",type:"boolean",description:"Open browser automatically"},host:{type:"string",description:"Host to bind to"}},action:async(j)=>{await E(j)}},"story:build":{description:"Build static story site",options:{outDir:{alias:"o",type:"string",description:"Output directory"}},action:async(j)=>{await F(j)}},"story:preview":{description:"Preview built story site",options:{port:{alias:"p",type:"number",description:"Server port (default: 4173)"},open:{alias:"o",type:"boolean",description:"Open browser automatically"}},action:async(j)=>{await G(j)}},"story:test":{description:"Run visual regression tests",options:{update:{alias:"u",type:"boolean",description:"Update snapshots"},filter:{alias:"f",type:"string",description:"Filter components by name"}},action:async(j)=>{let{createContext:B}=await import("./story/context.js"),{runVisualTests:q,updateSnapshots:A,formatTestResults:z}=await import("./story/testing.js"),H=await B({mode:"build"});if(j.update){let D=await A(H,{filter:j.filter?[j.filter]:void 0});console.log(`Updated ${D} snapshots`)}else{let D=await q(H,{filter:j.filter?[j.filter]:void 0});if(console.log(z(D)),D.failed>0)process.exit(1)}}}};function O(j){j.command("story",k.story.description).option("-p, --port <port>",k.story.options.port.description).option("-o, --open",k.story.options.open.description).option("--host <host>",k.story.options.host.description).action(k.story.action),j.command("story dev",k["story:dev"].description).option("-p, --port <port>",k["story:dev"].options.port.description).option("-o, --open",k["story:dev"].options.open.description).option("--host <host>",k["story:dev"].options.host.description).action(k["story:dev"].action),j.command("story build",k["story:build"].description).option("-o, --outDir <dir>",k["story:build"].options.outDir.description).action(k["story:build"].action),j.command("story preview",k["story:preview"].description).option("-p, --port <port>",k["story:preview"].options.port.description).option("-o, --open",k["story:preview"].options.open.description).action(k["story:preview"].action),j.command("story test",k["story:test"].description).option("-u, --update",k["story:test"].options.update.description).option("-f, --filter <name>",k["story:test"].options.filter.description).action(k["story:test"].action)}async function Q(j=process.argv.slice(2)){let B=j[0]||"dev",q={};for(let A=1;A<j.length;A++){let z=j[A];if(z==="-p"||z==="--port")q.port=Number.parseInt(j[++A],10);else if(z==="-o"||z==="--open")q.open=!0;else if(z==="--host")q.host=j[++A];else if(z==="-u"||z==="--update")q.update=!0;else if(z==="-f"||z==="--filter")q.filter=j[++A];else if(z==="--outDir")q.outDir=j[++A]}switch(B){case"dev":case"":await E(q);break;case"build":await F(q);break;case"preview":await G(q);break;case"test":await k["story:test"].action(q);break;default:console.log("Unknown command:",B),console.log("Available commands: dev, build, preview, test"),process.exit(1)}}
|
|
3
|
-
export{k as qb,O as rb,Q as sb};
|
package/dist/chunk-yach037f.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{rB as X}from"./chunk-3jm3snz8.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-yexjrg9d.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Wg as b}from"./chunk-y5wazw6j.js";import{Xg as f,Zg as u,_g as v,ah as d,bh as p}from"./chunk-b3prs7y0.js";import{ch as y}from"./chunk-jbejwejg.js";import{dh as S}from"./chunk-k8440jxh.js";import{eh as F}from"./chunk-yj560gp8.js";import{fh as P}from"./chunk-7dy588as.js";import{Sw as D}from"./chunk-q6h6yvzb.js";var{Glob:m}=globalThis.Bun;import{cpSync as h,existsSync as T,mkdirSync as j,readFileSync as g,readdirSync as s,rmSync as r,statSync as n,unlinkSync as a,writeFileSync as A}from"fs";import{dirname as i,join as H,relative as o}from"path";import w from"process";import e from"bun-plugin-stx";async function Aq(q){let N=Date.now(),V=q.pagesDir??"pages",K=q.outDir??"dist",Q=q.publicDir??"public";if(!q.noClean)r(K,{recursive:!0,force:!0});j(K,{recursive:!0});let B=new m(`${V}/**/*.stx`),Z=await Array.fromAsync(B.scan("."));if(Z.length===0)throw Error(`No .stx files found in ${V}/`);let _=await Bun.build({entrypoints:Z,outdir:K,plugins:[e()],naming:{entry:"[name].[ext]"}});if(!_.success)throw console.error(_.logs),Error("Build failed");qq(K);let $=z(K).filter((G)=>G.endsWith(".html")),X=f(q,w.cwd()),M=new Set($.map(I));for(let G of $){let E=H(K,G),x=g(E,"utf8"),J=I(G),O=X?X.locales:[q.seo?.locale?.split(/[_-]/)[0]??"en"];for(let W of O){let Y=x;if(Y=Kq(Y),X)Y=u(Y,X,W);if(Y=await D(Y,w.cwd()),Y=F(Y,q,q.pages?.[J],J),X)Y=Nq(Y,q,X,W,J),Y=Qq(Y,W,X.defaultLocale,M);if(Y=b(Y,q),Y=Vq(Y),X)Y=Y.replace(/<\/body>/i,`${p(X,W)}
|
|
3
|
-
</body>`);if(q.spa!==!1)Y=await S(Y,q.router);let C=X?l(J,W,X.defaultLocale):G,L=H(K,C);if(j(t(L),{recursive:!0}),A(L,Y),X&&W!==X.defaultLocale&&C!==G);}}if(T(Q))h(Q,K,{recursive:!0});let R=H(K,"404.html");if(!T(R)&&T(H(K,"index.html"))){let G=g(H(K,"index.html"),"utf8").replace(/<title>[^<]*<\/title>/i,`<title>404 \u2014 ${Xq(q.name)}</title>`);A(R,G)}if(q.sitemap!==!1){let G=[],E=$.filter((J)=>J!=="404.html").map(I),x=X?X.locales:[null];for(let J of E){let O=q.pages?.[J];for(let W of x){let Y=W&&X?v(J,W,X.defaultLocale):J;G.push({path:Y,page:O})}}A(H(K,"sitemap.xml"),P(q,G))}let U=y(q);if(U!==null)A(H(K,"robots.txt"),U);let c=$.map(I);return{outDir:K,pages:c,durationMs:Date.now()-N}}function t(q){return i(q)}function l(q,N,V){let K=v(q,N,V);if(K==="/")return"index.html";let Q=K.replace(/^\//,"").replace(/\/$/,"");if(!Q.includes("/")){if(N!==V&&Q===N)return`${N}/index.html`;return`${Q}.html`}return`${Q}.html`.replace(/\.html\.html$/,".html")}function I(q){if(q==="index.html")return"/";return`/${q.replace(/\.html$/,"").replace(/\/index$/,"")}`}function z(q,N=q){let V=[];if(!T(q))return V;for(let K of s(q,{withFileTypes:!0})){let Q=H(q,K.name);if(K.isDirectory())V.push(...z(Q,N));else V.push(o(N,Q))}return V}function qq(q){for(let N of z(q)){if(!/^chunk-.*\.js(?:\.map)?$/.test(N))continue;let V=H(q,N);try{if(n(V).size===0)a(V)}catch{}}}function Kq(q){return q.replace(/<script[^>]*src=["']\.\/chunk-[^"']*\.js["'][^>]*><\/script>\s*/g,"")}function Nq(q,N,V,K,Q){if(!V)return q;if(/<html\b[^>]*\blang=/i.test(q))q=q.replace(/<html\b([^>]*)\blang="[^"]*"/i,`<html$1lang="${K}"`);else q=q.replace(/<html\b([^>]*)>/i,`<html$1 lang="${K}">`);let B=`${N.url.replace(/\/$/,"")}${v(Q,K,V.defaultLocale)}`;if(/<link rel="canonical"/.test(q))q=q.replace(/<link rel="canonical"[^>]*>/,`<link rel="canonical" href="${k(B)}">`);let Z=K.includes("_")||K.includes("-")?K:K.toLowerCase();if(/<meta property="og:locale"/.test(q))q=q.replace(/<meta property="og:locale"[^>]*>/,`<meta property="og:locale" content="${k(Z)}">`);if(/<meta property="og:url"/.test(q))q=q.replace(/<meta property="og:url"[^>]*>/,`<meta property="og:url" content="${k(B)}">`);let _=d(N.url,Q,V);if(!q.includes("hreflang="))q=q.replace(/<link rel="canonical"[^>]*>/,($)=>`${_}
|
|
4
|
-
${$}`);return q}function k(q){return q.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function Qq(q,N,V,K){if(N===V)return q;return q.replace(/<a\b([^>]*?)\bhref="(\/[^"]*)"([^>]*)>/gi,(Q,B,Z,_)=>{if(Z.startsWith("//"))return Q;if(Z===`/${N}`||Z===`/${N}/`||Z.startsWith(`/${N}/`))return Q;let $=Z.match(/^(\/[^?#]*)(.*)$/);if(!$)return Q;let[,X,M]=$,R=X==="/"?"/":X.replace(/\/$/,"");if(!K.has(R))return Q;let U=R==="/"?`/${N}/`:`/${N}${R}`;return`<a${B}href="${U}${M}"${_}>`})}function Vq(q){if(/<main\b/i.test(q)||/\bdata-stx-content\b/i.test(q))return q;let N=q.match(/<body\b[^>]*>/i),V=q.search(/<\/body\s*>/i);if(!N||V<0)return q;let K=N.index+N[0].length,Q=q.slice(K,V),B=0,Z=[...Q.matchAll(/<\/nav>/gi)];if(Z.length>0){let U=Z[Z.length-1];B=U.index+U[0].length}let _=Q.length,$=Q.search(/<footer\b/i);if($!==-1)_=Math.min(_,$);let X=Q.search(/<script\b[^>]*data-stx-(?:theme-toggle|reparent-progress)\b/i);if(X!==-1)_=Math.min(_,X);if(_<=B)return q;let M=Q.slice(B,_);if(!M.trim())return q;let R=`${Q.slice(0,B)}
|
|
5
|
-
<main>${M}</main>
|
|
6
|
-
${Q.slice(_)}`;return`${q.slice(0,K)}${R}${q.slice(V)}`}function Xq(q){return q.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function Iq(q){return q}
|
|
7
|
-
export{Aq as Ug,Iq as Vg};
|
package/dist/chunk-ygvyc6wv.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
var v={colorScheme:"light",primaryColor:"#3b82f6",backgroundColor:"#ffffff",textColor:"#333333",borderColor:"#e0e0e0",secondaryBackground:"#f5f5f5",secondaryText:"#666666",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',codeFontFamily:'"SF Mono", Monaco, Consolas, monospace',borderRadius:"4px"},f={colorScheme:"dark",primaryColor:"#60a5fa",backgroundColor:"#1a1a1a",textColor:"#ffffff",borderColor:"#404040",secondaryBackground:"#2a2a2a",secondaryText:"#a0a0a0",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',codeFontFamily:'"SF Mono", Monaco, Consolas, monospace',borderRadius:"4px"},j=v,q=!1;function z(){return j}function A(){return q}function B(){q=!q,j=q?f:v}function F(b){j={...j,...b}}function H(b){let{theme:w}=b.config;if(w.defaultColorScheme==="dark")q=!0,j=f;else if(w.defaultColorScheme==="auto"){if(typeof window<"u"&&window.matchMedia)q=window.matchMedia("(prefers-color-scheme: dark)").matches,j=q?f:v}}function I(b=j){return`
|
|
3
|
-
:root {
|
|
4
|
-
--primary: ${b.primaryColor};
|
|
5
|
-
--bg: ${b.backgroundColor};
|
|
6
|
-
--text: ${b.textColor};
|
|
7
|
-
--border: ${b.borderColor};
|
|
8
|
-
--bg-secondary: ${b.secondaryBackground};
|
|
9
|
-
--text-secondary: ${b.secondaryText};
|
|
10
|
-
--font-family: ${b.fontFamily};
|
|
11
|
-
--code-font-family: ${b.codeFontFamily};
|
|
12
|
-
--border-radius: ${b.borderRadius};
|
|
13
|
-
}
|
|
14
|
-
`}function J(){return`
|
|
15
|
-
<button
|
|
16
|
-
class="stx-theme-toggle"
|
|
17
|
-
onclick="window.__stxStory.toggleTheme()"
|
|
18
|
-
title="Toggle dark mode"
|
|
19
|
-
>
|
|
20
|
-
${q?"\u2600\uFE0F":"\uD83C\uDF19"}
|
|
21
|
-
</button>
|
|
22
|
-
`}function K(){return`
|
|
23
|
-
window.__stxStory.toggleTheme = function() {
|
|
24
|
-
document.documentElement.classList.toggle('dark');
|
|
25
|
-
const btn = document.querySelector('.stx-theme-toggle');
|
|
26
|
-
if (btn) {
|
|
27
|
-
const isDark = document.documentElement.classList.contains('dark');
|
|
28
|
-
btn.textContent = isDark ? '\u2600\uFE0F' : '\uD83C\uDF19';
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
// Initialize from system preference
|
|
33
|
-
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
|
34
|
-
document.documentElement.classList.add('dark');
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// Listen for system preference changes
|
|
38
|
-
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', e => {
|
|
39
|
-
if (e.matches) {
|
|
40
|
-
document.documentElement.classList.add('dark');
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
document.documentElement.classList.remove('dark');
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
`}function L(b=j){return JSON.stringify({colors:{primary:b.primaryColor,background:b.backgroundColor,text:b.textColor,border:b.borderColor,secondaryBackground:b.secondaryBackground,secondaryText:b.secondaryText},typography:{fontFamily:b.fontFamily,codeFontFamily:b.codeFontFamily},spacing:{borderRadius:b.borderRadius}},null,2)}function N(b=j){return`/* STX Story Theme Tokens */
|
|
47
|
-
:root {
|
|
48
|
-
/* Colors */
|
|
49
|
-
--stx-color-primary: ${b.primaryColor};
|
|
50
|
-
--stx-color-background: ${b.backgroundColor};
|
|
51
|
-
--stx-color-text: ${b.textColor};
|
|
52
|
-
--stx-color-border: ${b.borderColor};
|
|
53
|
-
--stx-color-background-secondary: ${b.secondaryBackground};
|
|
54
|
-
--stx-color-text-secondary: ${b.secondaryText};
|
|
55
|
-
|
|
56
|
-
/* Typography */
|
|
57
|
-
--stx-font-family: ${b.fontFamily};
|
|
58
|
-
--stx-font-family-code: ${b.codeFontFamily};
|
|
59
|
-
|
|
60
|
-
/* Spacing */
|
|
61
|
-
--stx-border-radius: ${b.borderRadius};
|
|
62
|
-
}
|
|
63
|
-
`}function O(){return`
|
|
64
|
-
.stx-theme-toggle {
|
|
65
|
-
width: 32px;
|
|
66
|
-
height: 32px;
|
|
67
|
-
border: 1px solid var(--border);
|
|
68
|
-
border-radius: var(--border-radius);
|
|
69
|
-
background: var(--bg);
|
|
70
|
-
cursor: pointer;
|
|
71
|
-
font-size: 16px;
|
|
72
|
-
display: flex;
|
|
73
|
-
align-items: center;
|
|
74
|
-
justify-content: center;
|
|
75
|
-
}
|
|
76
|
-
.stx-theme-toggle:hover {
|
|
77
|
-
background: var(--bg-secondary);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/* Dark mode overrides */
|
|
81
|
-
.dark {
|
|
82
|
-
--bg: ${f.backgroundColor};
|
|
83
|
-
--bg-secondary: ${f.secondaryBackground};
|
|
84
|
-
--text: ${f.textColor};
|
|
85
|
-
--text-secondary: ${f.secondaryText};
|
|
86
|
-
--border: ${f.borderColor};
|
|
87
|
-
--primary: ${f.primaryColor};
|
|
88
|
-
}
|
|
89
|
-
`}
|
|
90
|
-
export{v as W,f as X,z as Y,A as Z,B as _,F as $,H as aa,I as ba,J as ca,K as da,L as ea,N as fa,O as ga};
|
package/dist/chunk-yj560gp8.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
function X(q,D,G={},Q="/"){let z=D.seo??{},H=G.title??z.title??D.name,J=G.description??z.description??D.description??"",F=G.image??z.image,K=`${D.url.replace(/\/$/,"")}${Q}`,S=z.siteName??D.name,U=z.type??"website",V=z.locale??"en_US",C=[];if(z.favicon){let E=z.favicon.toLowerCase().split(".").pop(),O=E==="svg"?"image/svg+xml":E==="ico"?"image/x-icon":E==="png"?"image/png":E==="jpg"||E==="jpeg"?"image/jpeg":"";C.push(`<link rel="icon"${O?` type="${O}"`:""} href="${w(z.favicon)}">`)}if(C.push(`<title>${W(H)}</title>`,`<link rel="canonical" href="${w(K)}">`,`<meta name="description" content="${w(J)}">`,`<meta property="og:title" content="${w(H)}">`,`<meta property="og:description" content="${w(J)}">`,`<meta property="og:type" content="${w(U)}">`,`<meta property="og:url" content="${w(K)}">`,`<meta property="og:site_name" content="${w(S)}">`,`<meta property="og:locale" content="${w(V)}">`,`<meta name="twitter:card" content="${F?"summary_large_image":"summary"}">`,`<meta name="twitter:title" content="${w(H)}">`,`<meta name="twitter:description" content="${w(J)}">`),F)C.push(`<meta property="og:image" content="${w(F)}">`),C.push(`<meta name="twitter:image" content="${w(F)}">`);if(z.twitter)C.push(`<meta name="twitter:site" content="@${w(z.twitter.replace(/^@/,""))}">`),C.push(`<meta name="twitter:creator" content="@${w(z.twitter.replace(/^@/,""))}">`);let L=`<!-- SEO -->
|
|
3
|
-
${C.join(`
|
|
4
|
-
`)}
|
|
5
|
-
<!-- /SEO -->`,M=/<!--\s*stx SEO Tags\s*-->[\s\S]*?<meta\s+name="twitter:description"[^>]*>\s*/i;if(M.test(q))q=q.replace(M,"");if(q=q.replace(/<!--\s*SEO\s*-->[\s\S]*?<!--\s*\/SEO\s*-->\s*/g,""),q=q.replace(/<title>[\s\S]*?<\/title>\s*/i,""),q=q.replace(/<meta\s+name="title"\s+content="stx Project"[^>]*>\s*/g,"").replace(/<meta\s+name="description"\s+content="A website built with stx[^"]*"[^>]*>\s*/g,"").replace(/<meta\s+property="og:title"\s+content="stx Project"[^>]*>\s*/g,"").replace(/<meta\s+property="og:description"\s+content="A website built with stx[^"]*"[^>]*>\s*/g,"").replace(/<meta\s+property="og:type"\s+content="website"[^>]*>\s*/g,"").replace(/<meta\s+name="twitter:card"\s+content="summary_large_image"[^>]*>\s*/g,"").replace(/<meta\s+name="twitter:title"\s+content="stx Project"[^>]*>\s*/g,"").replace(/<meta\s+name="twitter:description"\s+content="A website built with stx[^"]*"[^>]*>\s*/g,""),/<head[^>]*>/i.test(q))return q.replace(/<head([^>]*)>/i,`<head$1>
|
|
6
|
-
${L}`);return`${L}
|
|
7
|
-
${q}`}function w(q){return q.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function W(q){return q.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}
|
|
8
|
-
export{X as eh};
|
package/dist/chunk-yn38c15w.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
var S={black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",gray:"\x1B[90m",brightRed:"\x1B[91m",brightGreen:"\x1B[92m",brightYellow:"\x1B[93m",brightBlue:"\x1B[94m",brightMagenta:"\x1B[95m",brightCyan:"\x1B[96m",brightWhite:"\x1B[97m"},V={bold:"\x1B[1m",dim:"\x1B[2m",italic:"\x1B[3m",underline:"\x1B[4m",inverse:"\x1B[7m",strikethrough:"\x1B[9m"};function J(j,q){return`${S[q]}${j}\x1B[0m`}function O(j,q){return`${V[q]}${j}\x1B[0m`}var K=(j)=>J(j,"red"),G=(j)=>J(j,"green"),M=(j)=>J(j,"yellow"),W=(j)=>J(j,"blue"),X=(j)=>J(j,"magenta"),A=(j)=>J(j,"cyan"),Y=(j)=>J(j,"white"),Z=(j)=>J(j,"gray"),B=(j)=>O(j,"bold"),L=(j)=>O(j,"dim"),_=(j)=>O(j,"italic"),$=(j)=>O(j,"underline");function h(){console.log(""),console.log(A(" \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557")),console.log(A(" \u2551")+B(" \uD83D\uDCD6 STX Story ")+A("\u2551")),console.log(A(" \u2551")+L(" Component Showcase & Testing ")+A("\u2551")),console.log(A(" \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D")),console.log("")}function z(j,q){if(console.log(B(" Server running at:")),console.log(""),console.log(` ${L("\u279C")} ${B("Local:")} ${A(j)}`),q)console.log(` ${L("\u279C")} ${B("Network:")} ${A(q)}`);console.log("")}function F(j){let q=j>0?"\u2713":"\u25CB",E=j>0?G:M;console.log(` ${E(q)} Found ${B(String(j))} story ${j===1?"file":"files"}`)}function p(j,q){let H={add:G("+"),change:M("~"),unlink:K("-")}[j]||"\u2022";console.log(` ${H} ${L(`[${j}]`)} ${q}`)}function D(j,q){if(console.log(""),console.log(` ${K("\u2717")} ${B(K("Error:"))} ${j}`),q)console.log(` ${L(q)}`);console.log("")}function C(j){console.log(` ${M("\u26A0")} ${M("Warning:")} ${j}`)}function I(j){console.log(` ${G("\u2713")} ${j}`)}function k(j){console.log(` ${W("\u2139")} ${j}`)}function N(j,q,E){console.log(""),console.log(A(" \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557")),console.log(A(" \u2551")+B(" Build Complete ")+A("\u2551")),console.log(A(" \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D")),console.log(""),console.log(` ${G("\u2713")} Stories: ${B(String(j))}`),console.log(` ${G("\u2713")} Output: ${B(q)}`),console.log(` ${G("\u2713")} Time: ${B(`${E}ms`)}`),console.log("")}function U(j,q,E,H){if(console.log(""),console.log(A(" \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557")),console.log(A(" \u2551")+B(" Test Results ")+A("\u2551")),console.log(A(" \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D")),console.log(""),console.log(` Total: ${B(String(j))}`),console.log(` Passed: ${G(String(q))} ${G("\u2713")}`),E>0)console.log(` Failed: ${K(String(E))} ${K("\u2717")}`);console.log(` Time: ${B(`${H}ms`)}`),console.log("")}function T(){console.log(""),console.log(B(" Keyboard Shortcuts:")),console.log(""),console.log(` ${A("h")} Show this help`),console.log(` ${A("o")} Open in browser`),console.log(` ${A("r")} Restart server`),console.log(` ${A("c")} Clear console`),console.log(` ${A("q")} Quit`),console.log("")}function v(){process.stdout.write("\x1Bc")}function w(j){let q=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],E=0,H=null,P=j;return{start(){H=setInterval(()=>{process.stdout.write(`\r ${A(q[E])} ${P}`),E=(E+1)%q.length},80)},stop(Q=!0){if(H)clearInterval(H),H=null;let R=Q?G("\u2713"):K("\u2717");process.stdout.write(`\r ${R} ${P}
|
|
3
|
-
`)},update(Q){P=Q}}}function f(j){if(j<1000)return`${j}ms`;if(j<60000)return`${(j/1000).toFixed(1)}s`;let q=Math.floor(j/60000),E=(j%60000/1000).toFixed(0);return`${q}m ${E}s`}function g(j){if(j<1024)return`${j} B`;if(j<1048576)return`${(j/1024).toFixed(1)} KB`;return`${(j/1048576).toFixed(1)} MB`}
|
|
4
|
-
export{J as Ec,O as Fc,K as Gc,G as Hc,M as Ic,W as Jc,X as Kc,A as Lc,Y as Mc,Z as Nc,B as Oc,L as Pc,_ as Qc,$ as Rc,h as Sc,z as Tc,F as Uc,p as Vc,D as Wc,C as Xc,I as Yc,k as Zc,N as _c,U as $c,T as ad,v as bd,w as cd,f as dd,g as ed};
|
package/dist/chunk-yr1gdceh.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
var O=new Set(["disabled","checked","readonly","required","autofocus","autoplay","controls","default","defer","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","reversed","selected"]);function L(k){if(typeof k==="string")return k;if(Array.isArray(k))return k.filter(Boolean).map((F)=>L(F)).join(" ");if(k&&typeof k==="object")return Object.entries(k).filter(([,F])=>F).map(([F])=>F).join(" ");return k?String(k):""}function B(k,F){if(!/:[\w-]+=/.test(k))return k;let Q=k,P=/<(script|style)\b[^>]*>[\s\S]*?<\/\1>/gi,E=[],q;while((q=P.exec(k))!==null)E.push([q.index,q.index+q[0].length]);function V(D){return E.some(([G,U])=>D>=G&&D<U)}let _=/<([a-zA-Z][a-zA-Z0-9-]*)((?:\s+(?:[^>"']|"[^"]*"|'[^']*'))*)\s*\/?>/g,Z=[];while((q=_.exec(Q))!==null){if(V(q.index))continue;let D=q[0],G=q[2];if(!G||!G.includes(":"))continue;let U=/\s:([a-zA-Z_][\w-]*)\s*=\s*"([^"]*)"/g,z,j=G,X=!1;while((z=U.exec(G))!==null){let I=z[1],H=z[2];if(H.includes("()")&&!H.includes(".get(")||H.includes("$store")||H.includes("$ref"))continue;try{let Y=Object.keys(F),K=Object.values(F),$=H.match(/^([a-zA-Z_$][\w$]*)/);if($&&!Y.includes($[1])&&!["true","false","null","undefined","Math","JSON","String","Number","Array","Object","Date","parseInt","parseFloat"].includes($[1]))continue;let J=Function(...Y,`return (${H})`)(...K);if(I==="class"){let W=L(J);if(W){let b=j.match(/\sclass="([^"]*)"/);if(b)j=j.replace(b[0],` class="${b[1]} ${W}"`);else j=j.replace(z[0],` class="${W}"`)}else j=j.replace(z[0],"");X=!0;continue}if(O.has(I)){if(J)j=j.replace(z[0],` ${I}`);else j=j.replace(z[0],"");X=!0;continue}if(J===null||J===void 0||J===!1)j=j.replace(z[0],"");else{let W=String(J).replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">");j=j.replace(z[0],` ${I}="${W}"`)}X=!0}catch{continue}}if(X){let I=D.endsWith("/>")?" /":"",Y=`<${q[1]}${j}${I}>`;Z.push({start:q.index,end:q.index+D.length,replacement:Y})}}for(let D=Z.length-1;D>=0;D--){let{start:G,end:U,replacement:z}=Z[D];Q=Q.slice(0,G)+z+Q.slice(U)}return Q}
|
|
3
|
-
export{B as Jt};
|
package/dist/chunk-yw2fzq86.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{hy as y}from"./chunk-mrehzhxv.js";function O(j,H){let F=R(j,H);return F.ok?{expression:F.expression,endPos:F.endPos}:null}function R(j,H){let F=H;while(F<j.length&&/\s/.test(j[F]))F++;if(j[F]!=="(")return{ok:!1,reason:"missing-open-paren",pos:F};let L=y(j,"(",")",F);if(L===-1)return{ok:!1,reason:"unclosed-paren",pos:F};return{ok:!0,expression:j.slice(F+1,L),endPos:L+1}}function z(j,H,F,L){let Q=1,A=L,V=new RegExp(`@${H}\\s*\\(`,"g"),J=new RegExp(`@${F}(?![a-z])`,"g");while(A<j.length&&Q>0){V.lastIndex=A,J.lastIndex=A;let W=V.exec(j),q=J.exec(j),G=W?W.index:1/0,U=q?q.index:1/0;if(G<U)Q++,A=G+W[0].length;else if(U<1/0){if(Q--,Q===0)return U;A=U+q[0].length}else break}return-1}function I(j,H){let F=j.slice(H).match(/^@if\s*/);if(!F)return null;let L=H+F[0].length,Q=O(j,L);if(!Q)return null;let A=Q.endPos,V=z(j,"if","endif",A);if(V===-1)return null;let J=j.slice(A,V),W=[],q=0,G="if",U=Q.expression,K=0,Z=0;while(q<J.length){let X=J.indexOf("@",q);if(X===-1)break;q=X;let Y=J.substring(X);if(/^@if\s*\(/.test(Y)){Z++,q++;continue}if(/^@endif(?![a-z])/.test(Y)){Z--,q+=6;continue}if(Z===0){let _=Y.match(/^@elseif\s*/);if(_){W.push({type:G,condition:U,content:J.substring(K,q),start:A+K,end:A+q});let B=q+_[0].length,$=O(J,B);if(!$){q++;continue}G="elseif",U=$.expression,q=$.endPos,K=q;continue}else if(/^@else(?![a-z])/.test(Y)){W.push({type:G,condition:U,content:J.substring(K,q),start:A+K,end:A+q}),G="else",U=void 0,q+=5,K=q;continue}}q++}return W.push({type:G,condition:U,content:J.slice(K),start:A+K,end:A+J.length}),{fullMatch:j.slice(H,V+6),branches:W,start:H,end:V+6}}function v(j){let H=[],F=/@if\s*\(/g,L=F.exec(j);while(L!==null){if(H.some((V)=>L.index>V.start&&L.index<V.end)){L=F.exec(j);continue}let A=I(j,L.index);if(A)H.push(A),F.lastIndex=A.end;L=F.exec(j)}return H}function w(j,H,F){let L=[],Q=new RegExp(`@${H}\\s*\\(`,"g"),A=Q.exec(j);while(A!==null){if(L.some((Y)=>A.index>Y.start&&A.index<Y.end)){A=Q.exec(j);continue}let J=A.index,W=J+A[0].length-1,q=y(j,"(",")",W);if(q===-1){A=Q.exec(j);continue}let G=j.slice(W+1,q),U=q+1,K=z(j,H,F,U);if(K===-1){A=Q.exec(j);continue}let Z=j.slice(U,K),X=K+`@${F}`.length;L.push({fullMatch:j.slice(J,X),name:H,params:G,content:Z,start:J,end:X}),Q.lastIndex=X,A=Q.exec(j)}return L}function D(j,H){let F=j.slice(H).match(/^@switch\s*/);if(!F)return null;let L=H+F[0].length,Q=O(j,L);if(!Q)return null;let A=Q.endPos,V=z(j,"switch","endswitch",A);if(V===-1)return null;let J=j.slice(A,V),W=[],q=0,G=null,U=0;while(q<J.length){let K=J.slice(q),Z=K.match(/^@switch\s*\(/),X=K.match(/^@endswitch(?![a-z])/);if(Z){if(U++,G)G.content+=Z[0];q+=Z[0].length;continue}if(X){if(U--,G)G.content+=X[0];q+=X[0].length;continue}if(U>0){if(G)G.content+=J[q];q++;continue}let Y=K.match(/^@case\s*/),_=K.match(/^@default(?![a-z])/),B=K.match(/^@break(?![a-z])/);if(Y&&K.startsWith("@case")){if(G)W.push(G);let $=q+Y[0].length,k=O(J,$);if(!k){q++;continue}G={type:"case",value:k.expression,content:""},q=k.endPos}else if(_&&K.startsWith("@default")){if(G)W.push(G);G={type:"default",content:""},q+=_[0].length}else if(B&&K.startsWith("@break"))q+=B[0].length;else{if(G)G.content+=J[q];q++}}if(G)W.push(G);return{fullMatch:j.slice(H,V+10),expression:Q.expression,cases:W,start:H,end:V+10}}
|
|
3
|
-
export{O as $x,R as ay,z as by,I as cy,v as dy,w as ey,D as fy};
|