@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-e0zytzdh.js
DELETED
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
var Q=null,R=null;function $(z,A,G=new WeakSet){if(Object.is(z,A))return!0;if(typeof z!=="object"||typeof A!=="object"||z===null||A===null)return!1;if(G.has(z))return!0;if(G.add(z),z instanceof Date&&A instanceof Date)return z.getTime()===A.getTime();if(z instanceof RegExp&&A instanceof RegExp)return z.source===A.source&&z.flags===A.flags;if(Array.isArray(z)){if(!Array.isArray(A)||z.length!==A.length)return!1;for(let F=0;F<z.length;F++)if(!$(z[F],A[F],G))return!1;return!0}if(Array.isArray(A))return!1;if(z instanceof Map){if(!(A instanceof Map)||z.size!==A.size)return!1;for(let[F,B]of z)if(!A.has(F)||!$(B,A.get(F),G))return!1;return!0}if(A instanceof Map)return!1;if(z instanceof Set){if(!(A instanceof Set)||z.size!==A.size)return!1;for(let F of z)if(!A.has(F))return!1;return!0}if(A instanceof Set)return!1;let P=Object.keys(z),U=Object.keys(A);if(P.length!==U.length)return!1;for(let F of P){if(!Object.prototype.hasOwnProperty.call(A,F))return!1;if(!$(z[F],A[F],G))return!1}return!0}function K(z){Q=z}function q(){return Q}function x(){return{isMounted:!1,isUnmounted:!1,hooks:{beforeMount:[],mounted:[],beforeUpdate:[],updated:[],beforeUnmount:[],unmounted:[]},effects:[],scope:N()}}function N(){return{refs:new Map,effects:new Set,cleanups:[]}}function S(z){let A=new Set,G=new Set,P=z,U=Symbol("ref"),F={get value(){if(R)G.add(R);return P},set value(B){if(!Object.is(B,P)){let J=P;P=B;for(let L of A)L(B,J);for(let L of G)L()}},subscribe(B){return A.add(B),()=>{A.delete(B)}}};if(Q)Q.scope.refs.set(U,F);return F}var D=new WeakMap;function O(z){let A=D.get(z);if(A)return A;let G=new Map,P=(B)=>{let J=G.get(B);if(J)for(let L of[...J])L()},U=(B,J)=>{if(!G.has(B))G.set(B,new Set);return G.get(B).add(J),()=>{G.get(B)?.delete(J)}},F=new Proxy(z,{get(B,J,L){let X=Reflect.get(B,J,L);if(R)U(J,R);if(X!==null&&typeof X==="object"&&!Array.isArray(X)){let Y=Object.getPrototypeOf(X);if(Y===Object.prototype||Y===null)return O(X)}return X},set(B,J,L,X){let Y=Reflect.get(B,J,X),_=Reflect.set(B,J,L,X);if(!Object.is(L,Y))P(J);return _},deleteProperty(B,J){let L=Reflect.deleteProperty(B,J);return P(J),L}});return D.set(z,F),F}function H(z){let A,G=!0,P=new Set,U=new Set,F=()=>{G=!0,B()},B=()=>{if(G){let L=A,X=R;if(R=F,A=z(),R=X,G=!1,!Object.is(A,L)){for(let Y of P)Y(A,L);for(let Y of U)Y()}}},J=R;return R=F,A=z(),G=!1,R=J,{get value(){if(R)U.add(R);return B(),A},set value(L){console.warn("[stx] Computed properties are readonly")},subscribe(L){return P.add(L),()=>{P.delete(L)}}}}function m(z,A,G={}){let{immediate:P=!1,deep:U=!1,flush:F="post"}=G,B,J,L=!1,X=()=>{if(L)return;let W=C();if((U?!$(W,B):!Object.is(W,B))||P)if(A(W,B),U&&W!==null&&typeof W==="object")try{B=structuredClone(W)}catch{B=W}else B=W},Y=(W)=>{if(F==="sync")W();else if(F==="pre")Promise.resolve().then(W);else requestAnimationFrame(()=>{requestAnimationFrame(W)})},_=!1,M=()=>{if(L||_)return;_=!0,Y(()=>{_=!1,X()})},C=()=>{if(typeof z==="function"){let W=R;R=M;try{return z()}finally{R=W}}return z.value};if(typeof z!=="function"){let W=z.subscribe(()=>{Y(X)});J=()=>{L=!0,W()}}else J=()=>{L=!0};if(B=C(),P)Y(X);if(Q)Q.scope.cleanups.push(()=>J?.());return()=>J?.()}function j(z,A,G={}){let P=[],U=z.map((F)=>F.value);for(let F of z){let B=F.subscribe(()=>{let J=z.map((L)=>L.value);A(J,U),U=[...J]});P.push(B)}if(G.immediate){let F=z.map((B)=>B.value);A(F,U)}return()=>{for(let F of P)F()}}function g(z){let A,G=!1,P=()=>{if(G)return;if(A)A();let U=R;R=P,A=z(),R=U};if(P(),Q)Q.scope.cleanups.push(()=>{if(G=!0,A)A()});return()=>{if(G=!0,A)A()}}function w(z){if(Q)Q.hooks.beforeMount.push(z);else console.warn("[stx] onBeforeMount called outside of component setup")}function h(z){if(Q)Q.hooks.mounted.push(z);else console.warn("[stx] onMounted called outside of component setup")}function I(z){if(Q)Q.hooks.beforeUpdate.push(z);else console.warn("[stx] onBeforeUpdate called outside of component setup")}function y(z){if(Q)Q.hooks.updated.push(z);else console.warn("[stx] onUpdated called outside of component setup")}function E(z){if(Q)Q.hooks.beforeUnmount.push(z);else console.warn("[stx] onBeforeUnmount called outside of component setup")}function v(z){if(Q)Q.hooks.unmounted.push(z);else console.warn("[stx] onUnmounted called outside of component setup")}async function Z(z,A){let G=z.hooks[A];for(let P of G)await P()}async function V(z){await Z(z,"beforeMount"),z.isMounted=!0,await Z(z,"mounted")}async function d(z){if(!z.isMounted||z.isUnmounted)return;await Z(z,"beforeUpdate"),await Z(z,"updated")}async function k(z){if(z.isUnmounted)return;await Z(z,"beforeUnmount");for(let A of z.scope.cleanups)A();z.isUnmounted=!0,await Z(z,"unmounted")}function f(){return`
|
|
3
|
-
<script data-stx-client-runtime>
|
|
4
|
-
(function() {
|
|
5
|
-
'use strict';
|
|
6
|
-
|
|
7
|
-
// Reactive ref implementation
|
|
8
|
-
function ref(initialValue) {
|
|
9
|
-
const subscribers = new Set();
|
|
10
|
-
let value = initialValue;
|
|
11
|
-
|
|
12
|
-
return {
|
|
13
|
-
get value() { return value; },
|
|
14
|
-
set value(newValue) {
|
|
15
|
-
if (!Object.is(newValue, value)) {
|
|
16
|
-
const oldValue = value;
|
|
17
|
-
value = newValue;
|
|
18
|
-
subscribers.forEach(cb => cb(newValue, oldValue));
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
subscribe(callback) {
|
|
22
|
-
subscribers.add(callback);
|
|
23
|
-
return () => subscribers.delete(callback);
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// Reactive object implementation
|
|
29
|
-
function reactive(target) {
|
|
30
|
-
const subscribers = new Map();
|
|
31
|
-
|
|
32
|
-
const notify = (key) => {
|
|
33
|
-
const subs = subscribers.get(key);
|
|
34
|
-
if (subs) subs.forEach(cb => cb());
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
return new Proxy(target, {
|
|
38
|
-
get(obj, prop, receiver) {
|
|
39
|
-
const value = Reflect.get(obj, prop, receiver);
|
|
40
|
-
if (value !== null && typeof value === 'object' && !Array.isArray(value)) {
|
|
41
|
-
return reactive(value);
|
|
42
|
-
}
|
|
43
|
-
return value;
|
|
44
|
-
},
|
|
45
|
-
set(obj, prop, value, receiver) {
|
|
46
|
-
const oldValue = Reflect.get(obj, prop, receiver);
|
|
47
|
-
const result = Reflect.set(obj, prop, value, receiver);
|
|
48
|
-
if (!Object.is(value, oldValue)) notify(prop);
|
|
49
|
-
return result;
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// Computed implementation
|
|
55
|
-
function computed(getter) {
|
|
56
|
-
let cachedValue;
|
|
57
|
-
let dirty = true;
|
|
58
|
-
const subscribers = new Set();
|
|
59
|
-
|
|
60
|
-
return {
|
|
61
|
-
get value() {
|
|
62
|
-
if (dirty) {
|
|
63
|
-
cachedValue = getter();
|
|
64
|
-
dirty = false;
|
|
65
|
-
}
|
|
66
|
-
return cachedValue;
|
|
67
|
-
},
|
|
68
|
-
subscribe(callback) {
|
|
69
|
-
subscribers.add(callback);
|
|
70
|
-
return () => subscribers.delete(callback);
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// Watch implementation
|
|
76
|
-
function watch(source, callback, options = {}) {
|
|
77
|
-
const { immediate = false } = options;
|
|
78
|
-
let oldValue = typeof source === 'function' ? source() : source.value;
|
|
79
|
-
|
|
80
|
-
const unsubscribe = (typeof source === 'function' ? { subscribe: () => {} } : source)
|
|
81
|
-
.subscribe((newValue) => {
|
|
82
|
-
callback(newValue, oldValue);
|
|
83
|
-
oldValue = newValue;
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
if (immediate) {
|
|
87
|
-
callback(oldValue, undefined);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
return unsubscribe;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// Lifecycle hooks
|
|
94
|
-
const lifecycleHooks = {
|
|
95
|
-
beforeMount: [],
|
|
96
|
-
mounted: [],
|
|
97
|
-
beforeUpdate: [],
|
|
98
|
-
updated: [],
|
|
99
|
-
beforeUnmount: [],
|
|
100
|
-
unmounted: []
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
function onBeforeMount(cb) { lifecycleHooks.beforeMount.push(cb); }
|
|
104
|
-
function onMounted(cb) { lifecycleHooks.mounted.push(cb); }
|
|
105
|
-
function onBeforeUpdate(cb) { lifecycleHooks.beforeUpdate.push(cb); }
|
|
106
|
-
function onUpdated(cb) { lifecycleHooks.updated.push(cb); }
|
|
107
|
-
function onBeforeUnmount(cb) { lifecycleHooks.beforeUnmount.push(cb); }
|
|
108
|
-
function onUnmounted(cb) { lifecycleHooks.unmounted.push(cb); }
|
|
109
|
-
|
|
110
|
-
// Run lifecycle hooks
|
|
111
|
-
async function runHooks(hookName) {
|
|
112
|
-
for (const hook of lifecycleHooks[hookName]) {
|
|
113
|
-
await hook();
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
// Initialize on DOM ready
|
|
118
|
-
document.addEventListener('DOMContentLoaded', async () => {
|
|
119
|
-
await runHooks('beforeMount');
|
|
120
|
-
await runHooks('mounted');
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
// Cleanup on page unload
|
|
124
|
-
window.addEventListener('beforeunload', async () => {
|
|
125
|
-
await runHooks('beforeUnmount');
|
|
126
|
-
await runHooks('unmounted');
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
// Internal state (hidden from developers)
|
|
130
|
-
var __stores = {};
|
|
131
|
-
var __routeParams = {};
|
|
132
|
-
var __middlewareState = {};
|
|
133
|
-
|
|
134
|
-
// provide() \u2014 share values across components (like Vue's provide/inject)
|
|
135
|
-
function provide(name, value) {
|
|
136
|
-
window[name] = value;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
// Expose globally for <script client> blocks
|
|
140
|
-
window.stx = {
|
|
141
|
-
// Reactivity
|
|
142
|
-
ref,
|
|
143
|
-
reactive,
|
|
144
|
-
computed,
|
|
145
|
-
watch,
|
|
146
|
-
onBeforeMount,
|
|
147
|
-
onMounted,
|
|
148
|
-
onBeforeUpdate,
|
|
149
|
-
onUpdated,
|
|
150
|
-
onBeforeUnmount,
|
|
151
|
-
onUnmounted,
|
|
152
|
-
provide,
|
|
153
|
-
|
|
154
|
-
// Store access (clean API - no window.* exposure)
|
|
155
|
-
useStore: function(name) { return __stores[name] || null; },
|
|
156
|
-
hasStore: function(name) { return name in __stores; },
|
|
157
|
-
getStoreNames: function() { return Object.keys(__stores); },
|
|
158
|
-
|
|
159
|
-
// Route params (clean API)
|
|
160
|
-
useRouteParams: function() { return __routeParams; },
|
|
161
|
-
useRouteParam: function(name) { return __routeParams[name]; },
|
|
162
|
-
|
|
163
|
-
// Middleware state (clean API)
|
|
164
|
-
useMiddlewareState: function() { return __middlewareState; },
|
|
165
|
-
|
|
166
|
-
// Internal setters (used by framework, not exposed in docs)
|
|
167
|
-
// eslint-disable-next-line pickier/no-unused-vars
|
|
168
|
-
setRouteParams: function(params) { __routeParams = params || {}; },
|
|
169
|
-
// eslint-disable-next-line pickier/no-unused-vars
|
|
170
|
-
setMiddlewareState: function(state) { __middlewareState = state || {}; },
|
|
171
|
-
registerStore: function(name, store) { __stores[name] = store; },
|
|
172
|
-
|
|
173
|
-
// SSR detection
|
|
174
|
-
isClient: function() { return true; },
|
|
175
|
-
isServer: function() { return false; }
|
|
176
|
-
};
|
|
177
|
-
window.provide = provide;
|
|
178
|
-
})();
|
|
179
|
-
</script>`}export{K as $h,q as ai,x as bi,N as ci,S as di,O as ei,H as fi,m as gi,j as hi,g as ii,w as ji,h as ki,I as li,y as mi,E as ni,v as oi,Z as pi,V as qi,d as ri,k as si,f as ti};
|
package/dist/chunk-e53h9qhd.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
var P=0;function W(){return`stx-defer-${++P}`}function X(E){let z=E.match(/on:\s*['"]?(\w+)(?:\((\d+)\))?['"]?/);if(z)return{trigger:z[1],value:z[2]};return{trigger:"immediate"}}function Y(E,z,A){let{trigger:F,value:w}=X(z),j=A,J,G,q,K=A.match(/@placeholder\s*([\s\S]*?)(?=@loading|@error|$)/);if(K)J=K[1].trim(),j=j.replace(/@placeholder[\s\S]*?(?=@loading|@error|$)/,"");let N=A.match(/@loading\s*([\s\S]*?)(?=@error|$)/);if(N)G=N[1].trim(),j=j.replace(/@loading[\s\S]*?(?=@error|$)/,"");let O=A.match(/@error(?:\s*\(\s*(\w+)\s*\))?\s*([\s\S]*)$/);if(O)q=O[2].trim(),j=j.replace(/@error(?:\s*\(\s*\w+\s*\))?[\s\S]*$/,"");return j=j.trim(),{trigger:F,triggerValue:w,content:j,placeholder:J,loading:G,error:q}}function Z(E,z){let{trigger:A,triggerValue:F}=z,w;switch(A){case"visible":w=`
|
|
3
|
-
const observer = new IntersectionObserver((entries) => {
|
|
4
|
-
if (entries[0].isIntersecting) {
|
|
5
|
-
observer.disconnect();
|
|
6
|
-
loadContent();
|
|
7
|
-
}
|
|
8
|
-
}, { threshold: 0.1 });
|
|
9
|
-
observer.observe(container);
|
|
10
|
-
`;break;case"idle":w=`
|
|
11
|
-
if ('requestIdleCallback' in window) {
|
|
12
|
-
requestIdleCallback(() => loadContent(), { timeout: 3000 });
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
setTimeout(loadContent, 200);
|
|
16
|
-
}
|
|
17
|
-
`;break;case"interaction":w=`
|
|
18
|
-
const events = ['click', 'focus', 'touchstart'];
|
|
19
|
-
const handler = () => {
|
|
20
|
-
events.forEach(e => container.removeEventListener(e, handler));
|
|
21
|
-
loadContent();
|
|
22
|
-
};
|
|
23
|
-
events.forEach(e => container.addEventListener(e, handler, { once: true, passive: true }));
|
|
24
|
-
`;break;case"hover":w=`
|
|
25
|
-
const handler = () => {
|
|
26
|
-
container.removeEventListener('mouseenter', handler);
|
|
27
|
-
container.removeEventListener('focusin', handler);
|
|
28
|
-
loadContent();
|
|
29
|
-
};
|
|
30
|
-
container.addEventListener('mouseenter', handler, { once: true });
|
|
31
|
-
container.addEventListener('focusin', handler, { once: true });
|
|
32
|
-
`;break;case"timer":w=`
|
|
33
|
-
setTimeout(loadContent, ${F||"1000"});
|
|
34
|
-
`;break;case"immediate":default:w=`
|
|
35
|
-
Promise.resolve().then(loadContent);
|
|
36
|
-
`;break}return`
|
|
37
|
-
<script>
|
|
38
|
-
(function() {
|
|
39
|
-
const container = document.getElementById('${E}');
|
|
40
|
-
if (!container) return;
|
|
41
|
-
|
|
42
|
-
const contentEl = container.querySelector('[data-defer-content]');
|
|
43
|
-
const placeholderEl = container.querySelector('[data-defer-placeholder]');
|
|
44
|
-
const loadingEl = container.querySelector('[data-defer-loading]');
|
|
45
|
-
const errorEl = container.querySelector('[data-defer-error]');
|
|
46
|
-
|
|
47
|
-
function showElement(el) {
|
|
48
|
-
if (el) el.style.display = '';
|
|
49
|
-
}
|
|
50
|
-
function hideElement(el) {
|
|
51
|
-
if (el) el.style.display = 'none';
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function loadContent() {
|
|
55
|
-
hideElement(placeholderEl);
|
|
56
|
-
showElement(loadingEl);
|
|
57
|
-
|
|
58
|
-
// Simulate async load (content is already rendered but hidden)
|
|
59
|
-
Promise.resolve().then(() => {
|
|
60
|
-
hideElement(loadingEl);
|
|
61
|
-
showElement(contentEl);
|
|
62
|
-
container.dispatchEvent(new CustomEvent('defer:loaded'));
|
|
63
|
-
}).catch((err) => {
|
|
64
|
-
hideElement(loadingEl);
|
|
65
|
-
if (errorEl) {
|
|
66
|
-
showElement(errorEl);
|
|
67
|
-
}
|
|
68
|
-
console.error('Defer load error:', err);
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
${w}
|
|
73
|
-
})();
|
|
74
|
-
</script>
|
|
75
|
-
`}function _(E,z,A){P=0;let F=/@defer\s*\(([^)]*)\)\s*([\s\S]*?)@enddefer/g;return E.replace(F,(w,j,J)=>{let G=W(),q=Y(w,j,J),K=q.placeholder?`<div data-defer-placeholder>${q.placeholder}</div>`:"",N=q.loading?`<div data-defer-loading style="display: none;">${q.loading}</div>`:'<div data-defer-loading style="display: none;"></div>',O=q.error?`<div data-defer-error style="display: none;">${q.error}</div>`:"",Q=`<div data-defer-content style="display: none;">${q.content}</div>`,U=Z(G,q);return`
|
|
76
|
-
<div id="${G}" class="stx-defer" data-defer-trigger="${q.trigger}">
|
|
77
|
-
${K}
|
|
78
|
-
${N}
|
|
79
|
-
${Q}
|
|
80
|
-
${O}
|
|
81
|
-
</div>
|
|
82
|
-
${U}
|
|
83
|
-
`})}
|
|
84
|
-
export{_ as In};
|
package/dist/chunk-eds0f8f1.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{yy as T}from"./chunk-94g3cahw.js";import{sz as j,xz as O}from"./chunk-adqh2m9z.js";function b(z,H){let X=z,F=/@json\s*\(/g,Y;while((Y=F.exec(X))!==null){let J=Y.index,v=J+Y[0].length-1,K=1,q=v+1,w=null,U=!1;while(q<X.length&&K>0){let G=X[q];if(U){U=!1,q++;continue}if(G==="\\"&&w){U=!0,q++;continue}if(w){if(G===w)w=null;q++;continue}if(G==='"'||G==="'"||G==="`"){w=G,q++;continue}if(G==="(")K++;else if(G===")"){if(K--,K===0)break}q++}if(K!==0)break;let V=X.substring(v+1,q).trim(),_=X.substring(J,q+1),W=-1,Z=0,$=null,R=!1;for(let G=0;G<V.length;G++){let B=V[G];if(R){R=!1;continue}if(B==="\\"&&$){R=!0;continue}if($){if(B===$)$=null;continue}if(B==='"'||B==="'"||B==="`"){$=B;continue}if(B==="("||B==="["||B==="{")Z++;else if(B===")"||B==="]"||B==="}")Z--;if(B===","&&Z===0){W=G;break}}let A=W>=0?V.substring(0,W).trim():V,L=W>=0?V.substring(W+1).trim():void 0;try{let G=A.trim(),B;if(j(G))B=O(G,Object.keys(H))(...Object.values(H));else B=void 0;let y;if(L==="true")y=JSON.stringify(B,null,2);else y=JSON.stringify(B);let N=y.replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029");X=X.substring(0,J)+N+X.substring(q+1),F.lastIndex=J+N.length}catch(G){T.log(G instanceof Error?G:Error(String(G)),{directive:"@json"},"error"),F.lastIndex=J+_.length}}return X}function S(z){return z.replace(/@once\s*([\s\S]*?)@endonce/g,"$1")}function x(z){let H=z,X=/@memo\s*\(/g,F,Y=[];while((F=X.exec(H))!==null){let J=F.index,v=J+F[0].length,K=1,q=v;while(q<H.length&&K>0){if(H[q]==="(")K++;else if(H[q]===")")K--;q++}if(K!==0)continue;let w=H.slice(v,q-1).trim(),U=q,V=H.slice(U),_=V.indexOf("@endmemo");if(_===-1)continue;let W=V.slice(0,_),Z=U+_+8,$=W.match(/^(\s*(?:(?:<!--[\s\S]*?-->|\x00STX_HTML_COMMENT_\d+\x00)\s*)*)/),R=$?$[0].length:0,A=W.slice(R),L=W.match(/(\s*)$/),G=L?L[0].length:0,B=A.slice(0,A.length-G),y=B.match(/^<([a-zA-Z][a-zA-Z0-9-]*)(\s[^>]*?)?(\/?)>/),N;if(y){let[P,D,E="",Q]=y,k=`<${D}${E} data-stx-memo="${w}"${Q}>`;N=W.slice(0,R)+k+B.slice(P.length)+W.slice(R+B.length)}else N=`${W.slice(0,R)}<div data-stx-memo="${w}">${B}</div>${W.slice(R+B.length)}`;Y.push({start:J,end:Z,replacement:N}),X.lastIndex=Z}for(let J=Y.length-1;J>=0;J--){let v=Y[J];H=H.slice(0,v.start)+v.replacement+H.slice(v.end)}return H.replace(/@memo="([^"]*)"/g,'data-stx-memo="$1"')}function I(z){let H=z.replace(/@ref="([^"]+)"/g,'data-stx-ref="$1"');return H=H.replace(/(<[a-zA-Z][a-zA-Z0-9-]*\b[^>]*?)\sref="([^"]+)"/g,'$1 data-stx-ref="$2"'),H}function u(z){let X=new RegExp("<(div|span|p|h[1-6]|td|th|li|a|button|label|section|article|header|footer|main|nav|aside|dd|dt|figcaption|summary|caption|blockquote|pre|code|em|strong|small|sub|sup|time|mark|abbr|cite|q|s|u|b|i)\\b","gi"),F="",Y=0,J;while((J=X.exec(z))!==null){let v=J.index,K=v+J[0].length,q=!1,w=!1,U=-1;while(K<z.length){let $=z[K];if(q){if($==="'")q=!1}else if(w){if($==='"')w=!1}else if($==="'")q=!0;else if($==='"')w=!0;else if($===">"){U=K;break}K++}if(U===-1)continue;if(z.slice(v,U+1).includes("x-cloak"))continue;let _=z.slice(U+1),W=_.indexOf("</"),Z=W>=0?_.slice(0,W):_.slice(0,200);if(/\{\{[\s\S]*?\}\}/.test(Z))F+=z.slice(Y,U)+" x-cloak>",Y=U+1}return F+=z.slice(Y),F}var M=/(?:^|\s)(?::else-if|:if|:else|:show|x-else-if|x-if|x-else|x-show|@if|@show)(?:=|\s|\/|>|$)/;function m(z){let H=/<[a-z][\w-]*/gi,X="",F=0,Y;while((Y=H.exec(z))!==null){let J=Y.index,v=Y[0].slice(1).toLowerCase();if(v==="script"||v==="style"){let Z=`</${v}>`,$=z.toLowerCase().indexOf(Z,J);if($!==-1)H.lastIndex=$+Z.length;continue}let K=J+Y[0].length,q=!1,w=!1,U=-1;while(K<z.length){let Z=z[K];if(q){if(Z==="'")q=!1}else if(w){if(Z==='"')w=!1}else if(Z==="'")q=!0;else if(Z==='"')w=!0;else if(Z===">"){U=K;break}K++}if(U===-1)continue;let V=z.slice(J+Y[0].length,U);if(/(?:^|\s)x-cloak(?:=|\s|\/|>|$)/.test(V))continue;if(!M.test(V))continue;let _=z[U-1]==="/",W=_?U-1:U;X+=`${z.slice(F,W)} x-cloak${_?" ":""}`,F=W}return X+=z.slice(F),X}
|
|
3
|
-
export{b as ju,S as ku,x as lu,I as mu,u as nu,m as ou};
|
package/dist/chunk-eh8hact1.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import Q from"fs";import L from"path";function Z(w){let q=[];if(q.push("[build]"),q.push(` command = "${E(w.build.command)}"`),q.push(` publish = "${E(w.build.publish)}"`),w.build.functions)q.push(` functions = "${E(w.build.functions)}"`);if(w.build.edge_functions)q.push(` edge_functions = "${E(w.build.edge_functions)}"`);if(w.build.environment&&Object.keys(w.build.environment).length>0){q.push(""),q.push("[build.environment]");for(let[z,B]of Object.entries(w.build.environment))q.push(` ${z} = "${E(B)}"`)}if(w.functions){if(q.push(""),q.push("[functions]"),w.functions.directory)q.push(` directory = "${E(w.functions.directory)}"`);if(w.functions.node_bundler)q.push(` node_bundler = "${w.functions.node_bundler}"`);if(w.functions.external_node_modules&&w.functions.external_node_modules.length>0)q.push(` external_node_modules = [${w.functions.external_node_modules.map((z)=>`"${z}"`).join(", ")}]`)}if(w.edge_functions&&w.edge_functions.length>0){q.push("");for(let z of w.edge_functions)q.push("[[edge_functions]]"),q.push(` function = "${E(z.function)}"`),q.push(` path = "${E(z.path)}"`)}if(w.redirects&&w.redirects.length>0){q.push("");for(let z of w.redirects){if(q.push("[[redirects]]"),q.push(` from = "${E(z.from)}"`),q.push(` to = "${E(z.to)}"`),z.status!==void 0)q.push(` status = ${z.status}`);if(z.force!==void 0)q.push(` force = ${z.force}`);if(z.conditions&&Object.keys(z.conditions).length>0){q.push(" [redirects.conditions]");for(let[B,G]of Object.entries(z.conditions))q.push(` ${B} = "${E(G)}"`)}}}if(w.headers&&w.headers.length>0){q.push("");for(let z of w.headers){q.push("[[headers]]"),q.push(` for = "${E(z.for)}"`),q.push(" [headers.values]");for(let[B,G]of Object.entries(z.values))q.push(` ${B} = "${E(G)}"`)}}if(w.plugins&&w.plugins.length>0){q.push("");for(let z of w.plugins)if(q.push("[[plugins]]"),q.push(` package = "${E(z.package)}"`),z.inputs&&Object.keys(z.inputs).length>0){q.push(" [plugins.inputs]");for(let[B,G]of Object.entries(z.inputs))if(typeof G==="string")q.push(` ${B} = "${E(G)}"`);else if(typeof G==="boolean"||typeof G==="number")q.push(` ${B} = ${G}`)}}if(w.context&&Object.keys(w.context).length>0)for(let[z,B]of Object.entries(w.context)){if(q.push(""),q.push(`[context.${z}]`),B.command)q.push(` command = "${E(B.command)}"`);if(B.publish)q.push(` publish = "${E(B.publish)}"`);if(B.environment&&Object.keys(B.environment).length>0){q.push(` [context.${z}.environment]`);for(let[G,U]of Object.entries(B.environment))q.push(` ${G} = "${E(U)}"`)}}return q.join(`
|
|
3
|
-
`)+`
|
|
4
|
-
`}function E(w){return w.replace(/\\/g,"\\\\").replace(/"/g,"\\\"").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}async function _(w){let q={framework:"stx",buildCommand:"bun run build",outputDir:"dist"},z=L.join(w,"package.json");if(await Bun.file(z).exists())try{let K=JSON.parse(await Bun.file(z).text());if(K.scripts?.build)q.buildCommand="bun run build";let M={...K.dependencies,...K.devDependencies};if(M["@stacksjs/stx"]||M.stx)q.framework="stx"}catch{}let B=L.join(w,"stx.config.ts"),G=L.join(w,".config","stx.config.ts");if(await Bun.file(B).exists()||await Bun.file(G).exists())q.framework="stx";let U=["dist","build","out","public",".output"];for(let K of U){let M=L.join(w,K);if(Q.existsSync(M)&&Q.statSync(M).isDirectory()){q.outputDir=K;break}}let W=["functions","netlify/functions","api"];for(let K of W){let M=L.join(w,K);if(Q.existsSync(M)&&Q.statSync(M).isDirectory()){q.functionsDir=K;break}}let X=L.join(w,"netlify","edge-functions");if(Q.existsSync(X))q.edgeFunctionsDir="netlify/edge-functions";let V=L.join(w,q.outputDir||"dist");if(Q.existsSync(V)){let K=Q.existsSync(L.join(V,"index.html")),M=Q.readdirSync(V).filter((Y)=>Y.endsWith(".html"));q.isSPA=K&&M.length===1}return q}function $(w={}){let q={build:{command:w.buildCommand||"bun run build",publish:w.outputDir||"dist"}};if(w.functionsDir)q.build.functions=w.functionsDir,q.functions={directory:w.functionsDir,node_bundler:"esbuild"};if(w.edgeFunctionsDir)q.build.edge_functions=w.edgeFunctionsDir;if(q.headers=[{for:"/*",values:{"X-Frame-Options":"DENY","X-Content-Type-Options":"nosniff","X-XSS-Protection":"1; mode=block","Referrer-Policy":"strict-origin-when-cross-origin"}},{for:"/assets/*",values:{"Cache-Control":"public, max-age=31536000, immutable"}}],w.isSPA!==!1)q.redirects=[{from:"/*",to:"/index.html",status:200}];return q.context={production:{environment:{NODE_ENV:"production"}},"deploy-preview":{environment:{NODE_ENV:"development"}}},q}async function I(w,q){let z=await _(w),B=q||$(z),G=Z(B),U=L.join(w,"netlify.toml");return await Bun.write(U,G),U}function O(w){return Q.existsSync(L.join(w,"netlify.toml"))}async function R(w){let q=L.join(w,"netlify.toml");if(!await Bun.file(q).exists())return null;return Bun.file(q).text()}
|
|
5
|
-
export{Z as Mn,_ as Nn,$ as On,I as Pn,O as Qn,R as Rn};
|
package/dist/chunk-epj957jf.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
var L=new Set(["if","else","elseif","else-if","for","foreach","show","model","html","text","bind","key","ref","once","memo","slot","teleport","cloak","pre","effect","init"]),O=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function w(q){return q.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function P(q){let Q=[],W=/<(script|style)\b[^>]*>[\s\S]*?<\/\1\s*>/gi,y;while((y=W.exec(q))!==null)Q.push([y.index,y.index+y[0].length]);return Q}function k(q,Q){for(let[W,y]of q)if(Q>=W&&Q<y)return!0;return!1}function B(q,Q){let W=1,y=0;for(let U=0;U<Q&&U<q.length;U++)if(q[U]===`
|
|
3
|
-
`)W++,y=U+1;return{line:W,column:Q-y+1}}function M(q,Q,W){let y=Q.toLowerCase(),U=q.length,Y=1,J=W;while(J<U){let X=q.indexOf("<",J);if(X===-1)return-1;if(J=X,q.startsWith("<!--",J)){let G=q.indexOf("-->",J+4);if(G===-1)return-1;J=G+3;continue}if(q[J+1]==="/"){let G=/^<\/([a-z][\w-]*)\s*>/i.exec(q.slice(J,J+64));if(!G){J++;continue}if(G[1].toLowerCase()===y){if(Y--,J+=G[0].length,Y===0)return J;continue}J+=G[0].length;continue}let Z=/^<([a-z][\w-]*)\b/i.exec(q.slice(J,J+64));if(!Z){J++;continue}let $=q.indexOf(">",J);if($===-1)return-1;if(Z[1].toLowerCase()===y&&q[$-1]!=="/")Y++;J=$+1}return-1}function C(q,Q,W){let y=/@([a-z][\w:-]*)((?:\.[a-z][\w-]*)*)\s*=\s*"([^"]*)"/gi,U;while((U=y.exec(q))!==null){if(k(Q,U.index))continue;let Y=U[1].toLowerCase().split(":")[0];if(L.has(Y))continue;let J=U[3].trim();if(/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*$/.test(J)){let X=q.indexOf(U[3],U.index),{line:Z,column:$}=B(q,X<0?U.index:X);W.push({ruleId:"stx/no-bare-function-ref-in-event",message:`Event handler @${U[1]}="${J}" is a bare reference and will not fire. Call it: @${U[1]}="${J}()".`,line:Z,column:$,severity:"error"})}}}function I(q,Q,W){if(Q!=="view")return;let y=/<script\b([^>]*)>/gi,U;while((U=y.exec(q))!==null)if(/(?:^|\s)client(?=[\s/=]|$)/i.test(U[1])){let{line:Y,column:J}=B(q,U.index);W.push({ruleId:"stx/no-view-level-script-client",message:"<script client> at the top level of a view is silently dropped \u2014 only components get client scopes. Move it into a component, or use <script> (server).",line:Y,column:J,severity:"error"})}}function D(q){let Q=q.split("/"),W=[];for(let y of Q){if(y===""||y===".")continue;if(y==="..")W.pop();else W.push(y)}return W.join("/")}function V(q,Q,W){let y=Q.replace(/\\/g,"/"),U=y.indexOf("resources/stores/");if(U===-1)return;let Y=y.slice(0,U+16),J=y.slice(0,y.lastIndexOf("/")),X=/\b(import|export)\s+(type\s+)?([^'"]*?)\s*from\s*['"]([^'"]+)['"]/g,Z;while((Z=X.exec(q))!==null){if(Z[2])continue;let $=Z[1],G=Z[4],N;if(G.startsWith("."))N=!D(`${J}/${G}`).startsWith(D(Y));else N=!0;if(N){let{line:j,column:H}=B(q,Z.index),F=$==="export"?"Value re-export":"Value import";W.push({ruleId:"stx/store-value-imports-must-be-local",message:`${F} from "${G}" is outside resources/stores/ and will be stripped from the store bundle. Use \`${$} type\`, or move the value into the stores dir.`,line:j,column:H,severity:"error"})}}}function b(q){let Q=q.trim(),W=(J)=>{let X=J.match(/[A-Za-z_$][\w$]*/g);return X?X:[]},y=/\bas\s+(.+)$/.exec(Q);if(y){let J=y[1].trim(),X=/^([A-Za-z_$][\w$]*)\s*=>\s*([A-Za-z_$][\w$]*)/.exec(J);if(X)return[X[1],X[2]];let Z=/^\(([^)]*)\)/.exec(J);if(Z)return W(Z[1]);let $=/^([A-Za-z_$][\w$]*)/.exec(J);return $?[$[1]]:[]}let U=/^\(([^)]*)\)\s+(?:in|of)\s+/.exec(Q);if(U)return W(U[1]);let Y=/^([A-Za-z_$][\w$]*)\s+(?:in|of)\s+/.exec(Q);return Y?[Y[1]]:[]}function v(q,Q){let W=/(?::for|x-for|@for)\s*=\s*"([^"]*)"/gi,y;while((y=W.exec(q))!==null){let U=b(y[1]);if(U.length===0)continue;let Y=q.lastIndexOf("<",y.index);if(Y===-1)continue;let J=/^<([a-z][\w-]*)/i.exec(q.slice(Y,Y+64));if(!J)continue;let X=q.indexOf(">",y.index);if(X===-1)continue;let $=q[X-1]==="/"||O.has(J[1].toLowerCase())?X+1:M(q,J[1],X+1),G=$===-1?X+1:$,N=q.indexOf(y[1],y.index),j=q.slice(Y,G);if(N>=0&&N+y[1].length<=G){let H=N-Y;j=j.slice(0,H)+" ".repeat(y[1].length)+j.slice(H+y[1].length)}for(let H of U){let F=new RegExp(`(?<![.\\w$])${w(H)}\\s*\\(`,"g"),A;while((A=F.exec(j))!==null){let K=Y+A.index,{line:_,column:x}=B(q,K);Q.push({ruleId:"stx/no-signal-call-in-for-iteration-var",message:`"${H}" is a :for iteration variable, not a signal \u2014 calling it as "${H}()" leaves it as a function and silently breaks comparisons. Use "${H}" directly.`,line:_,column:x,severity:"error"})}}}}function R(q,Q){let W=/<!--([\s\S]*?)-->/g,y;while((y=W.exec(q))!==null){let Y=y[1].indexOf("`");if(Y!==-1){let J=y.index+4+Y,{line:X,column:Z}=B(q,J);Q.push({ruleId:"stx/no-backticks-in-html-comments",message:"Backtick inside an HTML comment leaks into the merged setup function and flips the JS parser into template-literal mode. Remove it or rephrase the comment.",line:X,column:Z,severity:"error"})}}}function z(q,Q){return q?.[Q]!==!1}function E(q,Q={}){let W=[],y=P(q),U=(Q.filePath??"").replace(/\\/g,"/"),Y=Q.fileKind??(/\/components?\//i.test(U)?"component":"view");if(z(Q.rules,"stx/no-bare-function-ref-in-event"))C(q,y,W);if(z(Q.rules,"stx/no-view-level-script-client"))I(q,Y,W);if(U&&z(Q.rules,"stx/store-value-imports-must-be-local"))V(q,U,W);if(z(Q.rules,"stx/no-signal-call-in-for-iteration-var"))v(q,W);if(z(Q.rules,"stx/no-backticks-in-html-comments"))R(q,W);W.sort((X,Z)=>X.line-Z.line||X.column-Z.column);let J=new Set;return W.filter((X)=>{let Z=`${X.ruleId}:${X.line}:${X.column}`;if(J.has(Z))return!1;return J.add(Z),!0})}
|
|
4
|
-
export{E as fg};
|
package/dist/chunk-eqeyaq6g.js
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
async function Z(j,q){let{endpoint:H,method:v="POST",headers:I={},expirationSeconds:J=3600,oneTimeUse:L=!1,params:B={}}=q,N=JSON.stringify({url:j,expirationSeconds:J,oneTimeUse:L,...B}),D=await fetch(H,{method:v,headers:{"Content-Type":"application/json",...I},body:v!=="GET"?N:void 0});if(!D.ok)throw Error(`Failed to sign URL: ${D.status} ${D.statusText}`);let F=await D.json();return{url:F.url||F.signedUrl,signature:F.signature,expires:F.expires||Date.now()+J*1000,oneTimeUse:F.oneTimeUse||L}}async function _(j,q){let{endpoint:H,method:v="POST",headers:I={},expirationSeconds:J=3600,oneTimeUse:L=!1,params:B={}}=q,N=JSON.stringify({urls:j,expirationSeconds:J,oneTimeUse:L,...B}),D=await fetch(H,{method:v,headers:{"Content-Type":"application/json",...I},body:v!=="GET"?N:void 0});if(!D.ok)throw Error(`Failed to batch sign URLs: ${D.status} ${D.statusText}`);let F=await D.json(),Q=new Map,X=new Map;if(Array.isArray(F.results))for(let A of F.results)if(A.error)X.set(A.url,A.error);else Q.set(A.url||A.originalUrl,{url:A.signedUrl||A.url,signature:A.signature,expires:A.expires||Date.now()+J*1000,oneTimeUse:A.oneTimeUse||L});else if(typeof F.signatures==="object"){for(let[A,Y]of Object.entries(F.signatures)){let P=Y;Q.set(A,{url:P.signedUrl||P.url||A,signature:P.signature,expires:P.expires||Date.now()+J*1000,oneTimeUse:L})}if(F.errors)for(let[A,Y]of Object.entries(F.errors))X.set(A,Y)}return{signatures:Q,errors:X}}async function R(j,q,H=10){let v=new Map,I=new Map,J=[];for(let B=0;B<j.length;B+=H)J.push(j.slice(B,B+H));let L=await Promise.all(J.map((B)=>_(B,q)));for(let B of L){for(let[N,D]of B.signatures)v.set(N,D);for(let[N,D]of B.errors)I.set(N,D)}return{signatures:v,errors:I}}function $(j){return j.expires>Date.now()}function k(j){return Math.max(0,j.expires-Date.now())}function G(j,q=300000){return k(j)<q}async function V(j){if(j.check)return await j.check();return!0}function K(j){let q={};if(j.role)q.role=j.role;if(j.permission)q.permission=j.permission;if(j.userId)q.userId=j.userId;return q}var O=new Map;async function M(j,q){let H=`${j}:${q.endpoint}`,v=O.get(H);if(v&&$(v)&&!G(v))return v;let I=await Z(j,q);return O.set(H,I),I}function W(){O.clear()}function w(){let j=0,q=Date.now();for(let[H,v]of O)if(v.expires<=q)O.delete(H),j++;return j}function E(){return`
|
|
3
|
-
(function() {
|
|
4
|
-
'use strict';
|
|
5
|
-
|
|
6
|
-
if (typeof window === 'undefined') return;
|
|
7
|
-
|
|
8
|
-
window.STX = window.STX || {};
|
|
9
|
-
var cache = new Map();
|
|
10
|
-
|
|
11
|
-
window.STX.signUrl = async function(src, config) {
|
|
12
|
-
var cacheKey = src + ':' + config.endpoint;
|
|
13
|
-
var cached = cache.get(cacheKey);
|
|
14
|
-
|
|
15
|
-
if (cached && cached.expires > Date.now()) {
|
|
16
|
-
return cached;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
var response = await fetch(config.endpoint, {
|
|
20
|
-
method: config.method || 'POST',
|
|
21
|
-
headers: Object.assign({ 'Content-Type': 'application/json' }, config.headers || {}),
|
|
22
|
-
body: JSON.stringify({ url: src, expirationSeconds: config.expirationSeconds || 3600 })
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
if (!response.ok) throw new Error('Failed to sign URL');
|
|
26
|
-
|
|
27
|
-
var data = await response.json();
|
|
28
|
-
var signed = {
|
|
29
|
-
url: data.url || data.signedUrl,
|
|
30
|
-
signature: data.signature,
|
|
31
|
-
expires: data.expires || Date.now() + (config.expirationSeconds || 3600) * 1000
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
cache.set(cacheKey, signed);
|
|
35
|
-
return signed;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
window.STX.batchSignUrls = async function(sources, config) {
|
|
39
|
-
var response = await fetch(config.endpoint, {
|
|
40
|
-
method: config.method || 'POST',
|
|
41
|
-
headers: Object.assign({ 'Content-Type': 'application/json' }, config.headers || {}),
|
|
42
|
-
body: JSON.stringify({ urls: sources, expirationSeconds: config.expirationSeconds || 3600 })
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
if (!response.ok) throw new Error('Failed to batch sign URLs');
|
|
46
|
-
|
|
47
|
-
return response.json();
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
window.STX.loadProtectedMedia = async function(element, config) {
|
|
51
|
-
var src = element.dataset.protectedSrc;
|
|
52
|
-
if (!src) return;
|
|
53
|
-
|
|
54
|
-
try {
|
|
55
|
-
var signed = await window.STX.signUrl(src, config);
|
|
56
|
-
if (element.tagName === 'IMG') {
|
|
57
|
-
element.src = signed.url;
|
|
58
|
-
}
|
|
59
|
-
else if (element.tagName === 'VIDEO') {
|
|
60
|
-
element.src = signed.url;
|
|
61
|
-
element.load();
|
|
62
|
-
}
|
|
63
|
-
else if (element.tagName === 'SOURCE') {
|
|
64
|
-
element.src = signed.url;
|
|
65
|
-
element.parentElement.load();
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
catch (error) {
|
|
69
|
-
console.error('Failed to load protected media:', error);
|
|
70
|
-
if (element.dataset.fallback) {
|
|
71
|
-
element.src = element.dataset.fallback;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
})();
|
|
76
|
-
`.trim()}
|
|
77
|
-
export{Z as Nj,_ as Oj,R as Pj,$ as Qj,k as Rj,G as Sj,V as Tj,K as Uj,M as Vj,W as Wj,w as Xj,E as Yj};
|
package/dist/chunk-fbxt2mrx.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ep as H,Gp as $}from"./chunk-g8b81pzc.js";function A(q,U){switch(U.format){case"json":return J(q,U);case"markdown":return O(q,U);case"text":default:return K(q,U)}}function J(q,U){let j=x(q,U);return JSON.stringify({timestamp:q.timestamp,buildDir:q.buildDir,summary:{totalSize:q.totalSize,totalSizeFormatted:H(q.totalSize),totalGzipSize:q.totalGzipSize,totalGzipSizeFormatted:H(q.totalGzipSize),moduleCount:q.moduleCount,chunkCount:q.chunks.length,duplicateCount:q.duplicates.length},byType:Object.fromEntries(Object.entries(q.byType).map(([Q,Y])=>[Q,{...Y,sizeFormatted:H(Y.size),gzipSizeFormatted:H(Y.gzipSize)}])),chunks:q.chunks.map((Q)=>({name:Q.name,size:Q.size,sizeFormatted:H(Q.size),gzipSize:Q.gzipSize,gzipSizeFormatted:H(Q.gzipSize),moduleCount:Q.modules.length,isEntry:Q.isEntry,isVendor:Q.isVendor})),largestModules:q.largestModules.slice(0,U.topModules||10).map((Q)=>({path:Q.path,size:Q.size,sizeFormatted:H(Q.size),gzipSize:Q.gzipSize,gzipSizeFormatted:H(Q.gzipSize),type:Q.type})),duplicates:q.duplicates,analysis:j,warnings:q.warnings},null,2)}function K(q,U){let j=[],Q=U.showGzip!==!1;if(j.push(""),j.push("Bundle Analysis Report"),j.push("\u2550".repeat(50)),j.push(""),j.push("Summary"),j.push("\u2500".repeat(50)),Q)j.push(`Total Size: ${H(q.totalSize)} (${H(q.totalGzipSize)} gzip)`);else j.push(`Total Size: ${H(q.totalSize)}`);if(j.push(`Modules: ${q.moduleCount}`),j.push(`Chunks: ${q.chunks.length}`),q.duplicates.length>0)j.push(`Duplicates: ${q.duplicates.length}`);if(j.push(""),U.threshold&&q.totalSize>U.threshold)j.push(`\u26A0\uFE0F Bundle exceeds threshold of ${H(U.threshold)}!`),j.push("");j.push("Size by Type"),j.push("\u2500".repeat(50));let Y=["js","css","html","image","font","other"];for(let D of Y){let F=q.byType[D];if(F.count>0){let X=$(F.size,q.totalSize),Z=Q?` (${H(F.gzipSize)} gzip)`:"";j.push(` ${D.padEnd(8)} ${H(F.size).padStart(12)}${Z} ${X.padStart(6)} (${F.count} files)`)}}j.push(""),j.push("Chunks"),j.push("\u2500".repeat(50));for(let D of q.chunks.slice(0,10)){let F=[];if(D.isEntry)F.push("entry");if(D.isVendor)F.push("vendor");let X=F.length>0?` [${F.join(", ")}]`:"",Z=Q?` (${H(D.gzipSize)} gzip)`:"";j.push(` ${D.name.padEnd(20)} ${H(D.size).padStart(12)}${Z}${X}`)}if(q.chunks.length>10)j.push(` ... and ${q.chunks.length-10} more chunks`);j.push("");let V=U.topModules||10;j.push(`Largest Modules (Top ${V})`),j.push("\u2500".repeat(50));for(let D=0;D<Math.min(V,q.largestModules.length);D++){let F=q.largestModules[D],X=Q?` (${H(F.gzipSize)} gzip)`:"";j.push(` ${(D+1).toString().padStart(2)}. ${F.path}`),j.push(` ${H(F.size)}${X}`)}if(j.push(""),q.duplicates.length>0){j.push("Duplicate Modules"),j.push("\u2500".repeat(50));for(let D of q.duplicates.slice(0,5))j.push(` ${D.path}`),j.push(` ${D.count} copies, wasting ${H(D.wastedBytes)}`);if(q.duplicates.length>5)j.push(` ... and ${q.duplicates.length-5} more duplicates`);j.push("")}if(U.recommendations!==!1){let D=x(q,U);if(D.recommendations.length>0){j.push("Recommendations"),j.push("\u2500".repeat(50));for(let F of D.recommendations.slice(0,5)){let X=F.impact==="high"?"\u26A1":F.impact==="medium"?"\uD83D\uDCCA":"\uD83D\uDCA1";j.push(` ${X} ${F.title}`),j.push(` ${F.description}`)}j.push("")}}if(q.warnings.length>0){j.push("Warnings"),j.push("\u2500".repeat(50));for(let D of q.warnings)j.push(` \u26A0\uFE0F ${D}`);j.push("")}return j.join(`
|
|
3
|
-
`)}function O(q,U){let j=[],Q=U.showGzip!==!1;if(j.push("# Bundle Analysis Report"),j.push(""),j.push(`Generated: ${new Date(q.timestamp).toISOString()}`),j.push(""),j.push("## Summary"),j.push(""),j.push("| Metric | Value |"),j.push("|--------|-------|"),j.push(`| Total Size | ${H(q.totalSize)} |`),Q)j.push(`| Gzip Size | ${H(q.totalGzipSize)} |`);j.push(`| Modules | ${q.moduleCount} |`),j.push(`| Chunks | ${q.chunks.length} |`),j.push(`| Duplicates | ${q.duplicates.length} |`),j.push(""),j.push("## Size by Type"),j.push(""),j.push("| Type | Size | Gzip | % | Files |"),j.push("|------|------|------|---|-------|");let Y=["js","css","html","image","font","other"];for(let D of Y){let F=q.byType[D];if(F.count>0)j.push(`| ${D} | ${H(F.size)} | ${H(F.gzipSize)} | ${$(F.size,q.totalSize)} | ${F.count} |`)}j.push(""),j.push("## Chunks"),j.push(""),j.push("| Name | Size | Gzip | Modules | Type |"),j.push("|------|------|------|---------|------|");for(let D of q.chunks.slice(0,15)){let F=D.isEntry?"Entry":D.isVendor?"Vendor":"-";j.push(`| ${D.name} | ${H(D.size)} | ${H(D.gzipSize)} | ${D.modules.length} | ${F} |`)}j.push("");let V=U.topModules||10;j.push(`## Largest Modules (Top ${V})`),j.push(""),j.push("| # | Path | Size | Gzip |"),j.push("|---|------|------|------|");for(let D=0;D<Math.min(V,q.largestModules.length);D++){let F=q.largestModules[D];j.push(`| ${D+1} | \`${F.path}\` | ${H(F.size)} | ${H(F.gzipSize)} |`)}if(j.push(""),q.duplicates.length>0){j.push("## Duplicates"),j.push(""),j.push("| Path | Copies | Wasted |"),j.push("|------|--------|--------|");for(let D of q.duplicates.slice(0,10))j.push(`| \`${D.path}\` | ${D.count} | ${H(D.wastedBytes)} |`);j.push("")}if(U.recommendations!==!1){let D=x(q,U);if(D.recommendations.length>0){j.push("## Recommendations"),j.push("");for(let F of D.recommendations)j.push(`### ${F.title}`),j.push(""),j.push(F.description),j.push(""),j.push(`- **Impact:** ${F.impact}`),j.push(`- **Effort:** ${F.effort}`),j.push("")}}return j.join(`
|
|
4
|
-
`)}function x(q,U){let j=[],Q=[];if(U.threshold&&q.totalSize>U.threshold)j.push({severity:"error",message:`Bundle size (${H(q.totalSize)}) exceeds threshold (${H(U.threshold)})`});if(q.totalSize>1048576)j.push({severity:"warning",message:`Bundle is over 1MB (${H(q.totalSize)})`,details:"Large bundles can significantly impact load time"});if(q.duplicates.length>0){let F=q.duplicates.reduce((X,Z)=>X+Z.wastedBytes,0);j.push({severity:"warning",message:`${q.duplicates.length} duplicate modules found, wasting ${H(F)}`}),Q.push({title:"Remove Duplicate Modules",description:"Consider using import aliases or ensuring consistent package versions to eliminate duplicates.",impact:"medium",effort:"low"})}if(q.byType.js.size/q.totalSize>0.8&&q.totalSize>512000)Q.push({title:"Code Splitting",description:"Over 80% of your bundle is JavaScript. Consider splitting code by route or feature.",impact:"high",effort:"medium"});let V=q.largestModules.filter((F)=>F.size>102400);if(V.length>0){j.push({severity:"info",message:`${V.length} modules are over 100KB`});for(let F of V){if(F.path.includes("lodash")&&!F.path.includes("lodash-es"))Q.push({title:"Use lodash-es instead of lodash",description:"lodash-es supports tree-shaking and can significantly reduce bundle size.",impact:"high",effort:"low"});if(F.path.includes("moment"))Q.push({title:"Replace moment.js",description:"Consider using date-fns or dayjs for smaller date handling libraries.",impact:"high",effort:"medium"})}}if(q.byType.image.size>512000)Q.push({title:"Optimize Images",description:`Images account for ${H(q.byType.image.size)}. Consider using WebP/AVIF formats and responsive images.`,impact:"high",effort:"low"});let D=100;if(q.totalSize>1048576)D-=20;else if(q.totalSize>512000)D-=10;if(D-=Math.min(20,q.duplicates.length*2),D-=Math.min(15,V.length*3),U.threshold&&q.totalSize>U.threshold)D-=25;return{score:Math.max(0,D),issues:j,recommendations:Q}}var W={lodash:{alternative:"lodash-es or individual imports",savings:"~70%"},moment:{alternative:"date-fns or dayjs",savings:"~90%"},"chart.js":{alternative:"chart.js with tree-shaking",savings:"~50%"},"highlight.js":{alternative:"Selective language imports",savings:"~80%"},fontawesome:{alternative:"Individual icon imports",savings:"~90%"},"material-ui":{alternative:"Named imports from @mui/*",savings:"~60%"}};function E(q){for(let[U,j]of Object.entries(W))if(q.includes(U))return{title:`Optimize ${U}`,description:`Consider using ${j.alternative}. Potential savings: ${j.savings}`,impact:"high",effort:"low"};return null}
|
|
5
|
-
export{A as yp,x as zp,E as Ap};
|
package/dist/chunk-fch9tk1k.js
DELETED
package/dist/chunk-fe7r1mq1.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Vy as $}from"./chunk-q60knhjf.js";import H from"path";function Z(j){return j.startsWith("http://")||j.startsWith("https://")||j.startsWith("//")}async function _(j,z,Q){try{let q;if(j.startsWith("/")){let B=z;for(let J=0;J<5;J++){let K=H.join(B,j);if(await Bun.file(K).exists())return K;B=H.dirname(B)}q=H.join(z,j)}else if(j.startsWith("./")||j.startsWith("../"))q=H.resolve(z,j);else q=H.resolve(z,j);if(await Bun.file(q).exists())return q;return null}catch{return null}}async function I(j,z,Q){let q=j,B=H.dirname(z),J=/<script\b([^>]*)src=["']([^"']+)["']([^>]*)><\/script>/gi,K;while((K=J.exec(q))!==null){let[T,X,w,Y]=K;if(Z(w))continue;let G=await _(w,B,z);if(G)try{let O=await Bun.file(G).text();if(Q.add(G),w.endsWith(".ts")||w.endsWith(".tsx")){let N=await Bun.build({entrypoints:[G],target:"browser",minify:!1,define:$()});if(N.outputs.length>0)O=await N.outputs[0].text()}let L=`<script>
|
|
3
|
-
// Source: ${w}
|
|
4
|
-
${O}
|
|
5
|
-
</script>`;q=q.replace(T,L),J.lastIndex=0}catch(O){}}let V=/<link\b([^>]*)href=["']([^"']+)["']([^>]*)(?:\/?>)/gi,W;while((W=V.exec(q))!==null){let[T,X,w,Y]=W,G=X+Y;if(Z(w))continue;if(/rel=["']stylesheet["']/.test(G)||w.endsWith(".css")){let L=await _(w,B,z);if(L)try{let N=await Bun.file(L).text();Q.add(L);let y=`<style>
|
|
6
|
-
/* Source: ${w} */
|
|
7
|
-
${N}
|
|
8
|
-
</style>`;q=q.replace(T,y),V.lastIndex=0}catch(N){}}}return q}
|
|
9
|
-
export{Z as iv,_ as jv,I as kv};
|
package/dist/chunk-fhawx87n.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
var Y=[{pattern:/document\.getElementById\s*\(/g,message:"document.getElementById() is prohibited",suggestion:'Use useRef("name") instead'},{pattern:/document\.querySelector\s*\(/g,message:"document.querySelector() is prohibited",suggestion:'Use useRef("name") instead'},{pattern:/document\.querySelectorAll\s*\(/g,message:"document.querySelectorAll() is prohibited",suggestion:'Use useRef("name") and access children instead'},{pattern:/document\.getElementsBy\w+\s*\(/g,message:"document.getElementsBy*() is prohibited",suggestion:'Use useRef("name") instead'},{pattern:/document\.createElement\s*\(/g,message:"document.createElement() is prohibited",suggestion:"Use template directives or component composition instead"},{pattern:/document\.activeElement(?![A-Za-z])/g,message:"document.activeElement is prohibited",suggestion:"Use useRef() to track focused elements"},{pattern:/document\.title\s*=/g,message:"document.title assignment is prohibited",suggestion:"Use useTitle() from composables"},{pattern:/document\.cookie(?![A-Za-z])/g,message:"document.cookie is prohibited",suggestion:"Use useCookie() from composables"},{pattern:/document\.addEventListener\s*\(/g,message:"document.addEventListener() is prohibited",suggestion:"Use useEventListener() or template @event directives"},{pattern:/window\.location(?![A-Za-z])/g,message:"window.location is prohibited",suggestion:"Use navigate() or useRoute()"},{pattern:/window\.history(?![A-Za-z])/g,message:"window.history is prohibited",suggestion:"Use navigate(), goBack(), goForward()"},{pattern:/window\.addEventListener\s*\(/g,message:"window.addEventListener() is prohibited",suggestion:"Use useEventListener() or @click directives"},{pattern:/window\.localStorage(?![A-Za-z])/g,message:"window.localStorage is prohibited",suggestion:"Use useLocalStorage() from composables"},{pattern:/window\.sessionStorage(?![A-Za-z])/g,message:"window.sessionStorage is prohibited",suggestion:"Use useSessionStorage() from composables"},{pattern:/window\.scrollTo\s*\(/g,message:"window.scrollTo() is prohibited",suggestion:"Use useScroll().scrollTo() from composables"},{pattern:/window\.alert\s*\(/g,message:"window.alert() is prohibited",suggestion:"Use stx modal/dialog APIs instead"},{pattern:/window\.confirm\s*\(/g,message:"window.confirm() is prohibited",suggestion:"Use stx modal/dialog APIs instead"},{pattern:/window\.prompt\s*\(/g,message:"window.prompt() is prohibited",suggestion:"Use stx modal/dialog APIs instead"},{pattern:/(?<!\w)setTimeout\s*\(/g,message:"setTimeout() is prohibited",suggestion:"Use useTimeout() or useDebounce() from composables"},{pattern:/(?<!\w)setInterval\s*\(/g,message:"setInterval() is prohibited",suggestion:"Use useInterval() from composables"},{pattern:/(?<!\w)clearTimeout\s*\(/g,message:"clearTimeout() is prohibited",suggestion:"Use useTimeout().stop() or useDebounce().cancel()"},{pattern:/(?<!\w)clearInterval\s*\(/g,message:"clearInterval() is prohibited",suggestion:"Use useInterval().pause()"},{pattern:/(?<!\w)location\.href\s*=/g,message:"location.href assignment is prohibited",suggestion:"Use navigate() instead"},{pattern:/(?<!\w)location\.assign\s*\(/g,message:"location.assign() is prohibited",suggestion:"Use navigate() instead"},{pattern:/(?<!\w)location\.replace\s*\(/g,message:"location.replace() is prohibited",suggestion:"Use navigate() instead"}];function Z(J,K,q){let z=typeof q==="boolean"?{enabled:q,failOnViolation:q}:q??{enabled:!1},Q=z.allowPatterns??[],G=[];for(let{pattern:j,message:k,suggestion:U}of Y){if(Q.some((v)=>k.includes(v)||j.source.includes(v)))continue;j.lastIndex=0;let L=J.match(j);if(L&&L.length>0){let v=J.split(`
|
|
3
|
-
`),y=[];v.forEach((W,X)=>{if(j.lastIndex=0,j.test(W))y.push(X+1)});let V=y.length>0?` (line${y.length>1?"s":""}: ${y.join(", ")})`:"";G.push(` \u2717 ${k}${V}
|
|
4
|
-
\u2192 ${U}`)}}if(G.length>0&&z.enabled){let k=`[STX] DOM API violation in ${K.split("/").pop()||K}:
|
|
5
|
-
${G.join(`
|
|
6
|
-
`)}
|
|
7
|
-
Tip: prefer useRef(), navigate(), and composables for component code`;if(z.failOnViolation)throw Error(k);else console.warn(k)}}
|
|
8
|
-
export{Y as vt,Z as wt};
|
package/dist/chunk-fk51yyrw.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{abortNavigation as r,clearMiddleware as t,createClientCookieManager as o,createMiddlewareContext as i,createRouteLocation as d,createServerCookieManager as l,createStorageManager as n,defineMiddleware as M,getMiddleware as g,getMiddlewareNames as w,hasMiddleware as s,loadMiddlewareFromDirectory as u,navigateTo as c,registerMiddleware as R,runMiddleware as v}from"stx-router";
|
|
3
|
-
export{r as lh,t as mh,o as nh,i as oh,d as ph,l as qh,n as rh,M as sh,g as th,w as uh,s as vh,u as wh,c as xh,R as yh,v as zh};
|
package/dist/chunk-fms20x0n.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
function K(F){return F.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Z(F){let M=F.trim().toLowerCase();return!M.startsWith("javascript:")&&!M.startsWith("vbscript:")&&!M.startsWith("data:text/html")}function A(F){let M=/^---\r?\n([\s\S]*?)\r?\n---\r?\n/,N=F.match(M);if(!N)return{data:{},content:F.trim()};let Q=N[1],j=F.slice(N[0].length),O={};for(let W of Q.split(`
|
|
3
|
-
`)){let D=W.trim();if(!D||D.startsWith("#"))continue;let G=D.indexOf(":");if(G===-1)continue;let J=D.slice(0,G).trim(),q=D.slice(G+1).trim();if(typeof q==="string"){if(q.startsWith('"')&&q.endsWith('"')||q.startsWith("'")&&q.endsWith("'"))q=q.slice(1,-1);else if(q.startsWith("[")&&q.endsWith("]"))try{q=JSON.parse(q)}catch{}else if(q==="true")q=!0;else if(q==="false")q=!1;else if(/^-?\d+(?:\.\d+)?$/.test(q))q=Number(q)}O[J]=q}return{data:O,content:j.trim()}}function S(F,M={}){let{gfm:N=!0,breaks:Q=!1}=M,j=F,O=[];if(j=j.replace(/```(\w*)\n([\s\S]*?)```/g,(q,z,E)=>{let V=O.length,X=z?` class="language-${K(z)}"`:"";return O.push(`<pre><code${X}>${K(E.trim())}</code></pre>`),`\x00CODEBLOCK${V}\x00`}),j=j.replace(/`([^`]*)`/g,(q,z)=>`<code>${K(z)}</code>`),j=j.replace(/^######\s+(.*)$/gm,"<h6>$1</h6>"),j=j.replace(/^#####\s+(.*)$/gm,"<h5>$1</h5>"),j=j.replace(/^####\s+(.*)$/gm,"<h4>$1</h4>"),j=j.replace(/^###\s+(.*)$/gm,"<h3>$1</h3>"),j=j.replace(/^##\s+(.*)$/gm,"<h2>$1</h2>"),j=j.replace(/^#\s+(.*)$/gm,"<h1>$1</h1>"),j=j.replace(/\*\*\*(.+?)\*\*\*/g,"<strong><em>$1</em></strong>"),j=j.replace(/___(.+?)___/g,"<strong><em>$1</em></strong>"),j=j.replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>"),j=j.replace(/__(.+?)__/g,"<strong>$1</strong>"),j=j.replace(/\*(.+?)\*/g,"<em>$1</em>"),j=j.replace(/(?<![a-zA-Z0-9])_(.+?)_(?![a-zA-Z0-9])/g,"<em>$1</em>"),N)j=j.replace(/~~(.+?)~~/g,"<del>$1</del>");if(j=j.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,(q,z,E)=>{return`<img src="${Z(E)?K(E):""}" alt="${K(z)}" />`}),j=j.replace(/\[([^\]]+)\]\(([^)]+)\)/g,(q,z,E)=>{return`<a href="${Z(E)?K(E):""}">${z}</a>`}),j=j.replace(/^(?:---|\*\*\*|___)\s*$/gm,"<hr />"),j=j.replace(/^>\s+(.*)$/gm,"<blockquote>$1</blockquote>"),j=j.replace(/<\/blockquote>\n<blockquote>/g,`
|
|
4
|
-
`),j=j.replace(/^[*\-+]\s+(.*)$/gm,"<li data-ul>$1</li>"),j=j.replace(/(<li data-ul>.*<\/li>\n?)+/g,"<ul>$&</ul>"),j=j.replace(/<\/ul>\n<ul>/g,""),j=j.replace(/^\d+\.\s+(.*)$/gm,"<li data-ol>$1</li>"),j=j.replace(/(<li data-ol>.*<\/li>\n?)+/g,"<ol>$&</ol>"),j=j.replace(/<\/ol>\n<ol>/g,""),j=j.replace(/<li data-ul>/g,"<li>"),j=j.replace(/<li data-ol>/g,"<li>"),N)j=j.replace(/^\|(.+)\|\s*\n\|[-:\s|]+\|\s*\n((?:\|.+\|\s*\n)*)/gm,(q,z,E)=>{let X=`<tr>${z.split("|").map((T)=>T.trim()).filter(Boolean).map((T)=>`<th>${K(T)}</th>`).join("")}</tr>`,_=E.trim().split(`
|
|
5
|
-
`).map((T)=>{return`<tr>${T.split("|").map((Y)=>Y.trim()).filter(Boolean).map((Y)=>`<td>${K(Y)}</td>`).join("")}</tr>`}).join(`
|
|
6
|
-
`);return`<table>
|
|
7
|
-
<thead>
|
|
8
|
-
${X}
|
|
9
|
-
</thead>
|
|
10
|
-
<tbody>
|
|
11
|
-
${_}
|
|
12
|
-
</tbody>
|
|
13
|
-
</table>`});if(N)j=j.replace(/<li>\s*\[\s*\]\s*/g,'<li><input type="checkbox" disabled /> '),j=j.replace(/<li>\s*\[x\]\s*/gi,'<li><input type="checkbox" checked disabled /> ');let W=j.split(`
|
|
14
|
-
`),D=[],G=!1,J=[];for(let q of W){let z=q.trim();if(/^<(?:h[1-6]|ul|ol|li|blockquote|pre|table|thead|tbody|tr|th|td|hr|div|p)/.test(z)||/^\0CODEBLOCK\d+\0$/.test(z)||z===""){if(G&&J.length>0)D.push(`<p>${J.join(Q?`<br />
|
|
15
|
-
`:`
|
|
16
|
-
`)}</p>`),J=[],G=!1;D.push(q)}else G=!0,J.push(z)}if(G&&J.length>0)D.push(`<p>${J.join(Q?`<br />
|
|
17
|
-
`:`
|
|
18
|
-
`)}</p>`);if(j=D.join(`
|
|
19
|
-
`),Q)j=j.replace(/\n/g,`<br />
|
|
20
|
-
`);for(let q=0;q<O.length;q++)j=j.replace(`\x00CODEBLOCK${q}\x00`,O[q]);return j=j.replace(/<p>\s*<\/p>/g,""),j.trim()}
|
|
21
|
-
export{A as gv,S as hv};
|