@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-asarebzq.js
DELETED
|
@@ -1,292 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
function g(j){let{endpoint:O,accept:q,maxSize:B,maxFiles:Q=1,fieldName:C="file",preview:D=!1,dropzone:E=!0,multiple:R=!1,autoUpload:T=!0,showProgress:V=!0,disabled:G=!1,placeholder:W="Drop files here or click to select",label:I}=j,J=j.class||"",K=j.style||"",L=j.id||`stx-upload-${Math.random().toString(36).slice(2,8)}`,k=Array.isArray(q)?q.join(","):q,X=`
|
|
3
|
-
<div id="${L}" class="stx-upload${E?" stx-upload-dropzone":""}${G?" stx-upload-disabled":""}${J?" "+J:""}"${K?` style="${K}"`:""}>
|
|
4
|
-
${I?`<label class="stx-upload-label">${M(I)}</label>`:""}
|
|
5
|
-
<div class="stx-upload-area" data-stx-upload-area>
|
|
6
|
-
<input
|
|
7
|
-
type="file"
|
|
8
|
-
name="${C}"
|
|
9
|
-
${k?`accept="${k}"`:""}
|
|
10
|
-
${R?"multiple":""}
|
|
11
|
-
${G?"disabled":""}
|
|
12
|
-
class="stx-upload-input"
|
|
13
|
-
data-stx-upload-input
|
|
14
|
-
/>
|
|
15
|
-
<div class="stx-upload-placeholder">
|
|
16
|
-
<svg class="stx-upload-icon" viewBox="0 0 24 24" width="48" height="48">
|
|
17
|
-
<path fill="currentColor" d="M9 16h6v-6h4l-7-7-7 7h4v6zm-4 2h14v2H5v-2z"/>
|
|
18
|
-
</svg>
|
|
19
|
-
<span class="stx-upload-text">${M(W)}</span>
|
|
20
|
-
${B?`<span class="stx-upload-hint">Max size: ${$(B)}</span>`:""}
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
${D?'<div class="stx-upload-previews" data-stx-upload-previews></div>':""}
|
|
24
|
-
${V?'<div class="stx-upload-progress" data-stx-upload-progress style="display:none;"><div class="stx-upload-progress-bar"></div><span class="stx-upload-progress-text">0%</span></div>':""}
|
|
25
|
-
</div>
|
|
26
|
-
`.trim(),Y=`
|
|
27
|
-
(function() {
|
|
28
|
-
var container = document.getElementById('${L}');
|
|
29
|
-
if (!container) return;
|
|
30
|
-
|
|
31
|
-
var input = container.querySelector('[data-stx-upload-input]');
|
|
32
|
-
var area = container.querySelector('[data-stx-upload-area]');
|
|
33
|
-
var previews = container.querySelector('[data-stx-upload-previews]');
|
|
34
|
-
var progress = container.querySelector('[data-stx-upload-progress]');
|
|
35
|
-
var progressBar = progress ? progress.querySelector('.stx-upload-progress-bar') : null;
|
|
36
|
-
var progressText = progress ? progress.querySelector('.stx-upload-progress-text') : null;
|
|
37
|
-
|
|
38
|
-
var config = {
|
|
39
|
-
endpoint: '${_(O)}',
|
|
40
|
-
fieldName: '${C}',
|
|
41
|
-
maxSize: ${B||"null"},
|
|
42
|
-
maxFiles: ${Q},
|
|
43
|
-
accept: ${k?JSON.stringify(k.split(",")):"null"},
|
|
44
|
-
autoUpload: ${T}
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
// Handle file selection
|
|
48
|
-
input.addEventListener('change', function(e) {
|
|
49
|
-
var files = Array.from(e.target.files);
|
|
50
|
-
handleFiles(files);
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
// Dropzone events
|
|
54
|
-
if (${E}) {
|
|
55
|
-
area.addEventListener('dragover', function(e) {
|
|
56
|
-
e.preventDefault();
|
|
57
|
-
area.classList.add('stx-upload-dragover');
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
area.addEventListener('dragleave', function(e) {
|
|
61
|
-
e.preventDefault();
|
|
62
|
-
area.classList.remove('stx-upload-dragover');
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
area.addEventListener('drop', function(e) {
|
|
66
|
-
e.preventDefault();
|
|
67
|
-
area.classList.remove('stx-upload-dragover');
|
|
68
|
-
var files = Array.from(e.dataTransfer.files);
|
|
69
|
-
handleFiles(files);
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
function handleFiles(files) {
|
|
74
|
-
files = files.slice(0, config.maxFiles);
|
|
75
|
-
|
|
76
|
-
// Validate files
|
|
77
|
-
files = files.filter(function(file) {
|
|
78
|
-
var valid = STX.validateFile(file, config);
|
|
79
|
-
if (!valid.valid) {
|
|
80
|
-
console.warn('File validation failed:', file.name, valid.error);
|
|
81
|
-
return false;
|
|
82
|
-
}
|
|
83
|
-
return true;
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
if (files.length === 0) return;
|
|
87
|
-
|
|
88
|
-
// Generate previews
|
|
89
|
-
if (${D} && previews) {
|
|
90
|
-
previews.innerHTML = '';
|
|
91
|
-
files.forEach(function(file) {
|
|
92
|
-
createPreview(file);
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// Auto upload
|
|
97
|
-
if (config.autoUpload) {
|
|
98
|
-
uploadFiles(files);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function createPreview(file) {
|
|
103
|
-
var item = document.createElement('div');
|
|
104
|
-
item.className = 'stx-upload-preview-item';
|
|
105
|
-
|
|
106
|
-
if (file.type.startsWith('image/')) {
|
|
107
|
-
var reader = new FileReader();
|
|
108
|
-
reader.onload = function(e) {
|
|
109
|
-
item.innerHTML = '<img src="' + e.target.result + '" alt="' + escapeHtml(file.name) + '" /><span>' + escapeHtml(file.name) + '</span>';
|
|
110
|
-
};
|
|
111
|
-
reader.readAsDataURL(file);
|
|
112
|
-
}
|
|
113
|
-
else {
|
|
114
|
-
item.innerHTML = '<div class="stx-upload-preview-file">' + getFileIcon(file.type) + '</div><span>' + escapeHtml(file.name) + '</span>';
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
previews.appendChild(item);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
function uploadFiles(files) {
|
|
121
|
-
if (progress) progress.style.display = 'block';
|
|
122
|
-
|
|
123
|
-
var uploaded = 0;
|
|
124
|
-
var total = files.length;
|
|
125
|
-
|
|
126
|
-
files.forEach(function(file) {
|
|
127
|
-
STX.uploadFile(file, config, function(prog) {
|
|
128
|
-
if (progressBar) progressBar.style.width = prog.percent + '%';
|
|
129
|
-
if (progressText) progressText.textContent = prog.percent + '%';
|
|
130
|
-
}).then(function(result) {
|
|
131
|
-
uploaded++;
|
|
132
|
-
if (result.success) {
|
|
133
|
-
container.dispatchEvent(new CustomEvent('upload', { detail: result }));
|
|
134
|
-
}
|
|
135
|
-
else {
|
|
136
|
-
container.dispatchEvent(new CustomEvent('error', { detail: result }));
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
if (uploaded === total) {
|
|
140
|
-
container.dispatchEvent(new CustomEvent('complete', { detail: { files: files.length } }));
|
|
141
|
-
if (progress) {
|
|
142
|
-
setTimeout(function() { progress.style.display = 'none'; }, 1000);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
function escapeHtml(str) {
|
|
150
|
-
return str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
function getFileIcon(type) {
|
|
154
|
-
if (type.startsWith('video/')) return '\uD83C\uDFAC';
|
|
155
|
-
if (type.startsWith('audio/')) return '\uD83C\uDFB5';
|
|
156
|
-
if (type.includes('pdf')) return '\uD83D\uDCC4';
|
|
157
|
-
if (type.includes('zip') || type.includes('rar')) return '\uD83D\uDCE6';
|
|
158
|
-
return '\uD83D\uDCC1';
|
|
159
|
-
}
|
|
160
|
-
})();
|
|
161
|
-
`.trim(),Z=`
|
|
162
|
-
.stx-upload {
|
|
163
|
-
font-family: system-ui, -apple-system, sans-serif;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.stx-upload-label {
|
|
167
|
-
display: block;
|
|
168
|
-
margin-bottom: 0.5rem;
|
|
169
|
-
font-weight: 500;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.stx-upload-area {
|
|
173
|
-
position: relative;
|
|
174
|
-
border: 2px dashed #d1d5db;
|
|
175
|
-
border-radius: 0.5rem;
|
|
176
|
-
padding: 2rem;
|
|
177
|
-
text-align: center;
|
|
178
|
-
cursor: pointer;
|
|
179
|
-
transition: border-color 0.2s, background-color 0.2s;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.stx-upload-area:hover,
|
|
183
|
-
.stx-upload-dragover {
|
|
184
|
-
border-color: #3b82f6;
|
|
185
|
-
background-color: #eff6ff;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.stx-upload-input {
|
|
189
|
-
position: absolute;
|
|
190
|
-
top: 0;
|
|
191
|
-
left: 0;
|
|
192
|
-
width: 100%;
|
|
193
|
-
height: 100%;
|
|
194
|
-
opacity: 0;
|
|
195
|
-
cursor: pointer;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.stx-upload-placeholder {
|
|
199
|
-
display: flex;
|
|
200
|
-
flex-direction: column;
|
|
201
|
-
align-items: center;
|
|
202
|
-
gap: 0.5rem;
|
|
203
|
-
color: #6b7280;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.stx-upload-icon {
|
|
207
|
-
color: #9ca3af;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.stx-upload-text {
|
|
211
|
-
font-size: 0.875rem;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.stx-upload-hint {
|
|
215
|
-
font-size: 0.75rem;
|
|
216
|
-
color: #9ca3af;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.stx-upload-previews {
|
|
220
|
-
display: flex;
|
|
221
|
-
flex-wrap: wrap;
|
|
222
|
-
gap: 0.5rem;
|
|
223
|
-
margin-top: 1rem;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.stx-upload-preview-item {
|
|
227
|
-
display: flex;
|
|
228
|
-
flex-direction: column;
|
|
229
|
-
align-items: center;
|
|
230
|
-
padding: 0.5rem;
|
|
231
|
-
border: 1px solid #e5e7eb;
|
|
232
|
-
border-radius: 0.25rem;
|
|
233
|
-
background: #f9fafb;
|
|
234
|
-
max-width: 100px;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
.stx-upload-preview-item img {
|
|
238
|
-
max-width: 80px;
|
|
239
|
-
max-height: 80px;
|
|
240
|
-
object-fit: cover;
|
|
241
|
-
border-radius: 0.25rem;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
.stx-upload-preview-item span {
|
|
245
|
-
font-size: 0.625rem;
|
|
246
|
-
color: #6b7280;
|
|
247
|
-
margin-top: 0.25rem;
|
|
248
|
-
max-width: 80px;
|
|
249
|
-
overflow: hidden;
|
|
250
|
-
text-overflow: ellipsis;
|
|
251
|
-
white-space: nowrap;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
.stx-upload-preview-file {
|
|
255
|
-
font-size: 2rem;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
.stx-upload-progress {
|
|
259
|
-
margin-top: 1rem;
|
|
260
|
-
background: #e5e7eb;
|
|
261
|
-
border-radius: 0.25rem;
|
|
262
|
-
height: 0.5rem;
|
|
263
|
-
position: relative;
|
|
264
|
-
overflow: hidden;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
.stx-upload-progress-bar {
|
|
268
|
-
position: absolute;
|
|
269
|
-
top: 0;
|
|
270
|
-
left: 0;
|
|
271
|
-
height: 100%;
|
|
272
|
-
background: #3b82f6;
|
|
273
|
-
transition: width 0.3s;
|
|
274
|
-
width: 0;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
.stx-upload-progress-text {
|
|
278
|
-
position: absolute;
|
|
279
|
-
top: 50%;
|
|
280
|
-
left: 50%;
|
|
281
|
-
transform: translate(-50%, -50%);
|
|
282
|
-
font-size: 0.625rem;
|
|
283
|
-
color: white;
|
|
284
|
-
text-shadow: 0 0 2px rgba(0,0,0,0.5);
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
.stx-upload-disabled {
|
|
288
|
-
opacity: 0.5;
|
|
289
|
-
pointer-events: none;
|
|
290
|
-
}
|
|
291
|
-
`.trim();return{html:X,script:Y,css:Z}}function M(j){return j.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function _(j){return j.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'")}function $(j){if(j<1024)return`${j} B`;if(j<1048576)return`${(j/1024).toFixed(1)} KB`;return`${(j/1048576).toFixed(1)} MB`}
|
|
292
|
-
export{g as uj};
|
package/dist/chunk-aw3rp9ac.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Md as $}from"./chunk-svhtdb0s.js";import Y from"fs";import X from"path";async function V(q){let{componentsDir:A,outputDir:K=A,include:R=["**/*.stx"],exclude:M=["**/*.story.stx","**/node_modules/**"],generateVariants:O=!0,includeDefaults:Q=!0,overwrite:J=!1}=q,T=[],j=await w(A,R,M);for(let H of j){let U=H.replace(/\.stx$/,".story.stx"),W=await z(U);if(W&&!J){T.push({componentPath:H,storyPath:U,content:"",status:"skipped"});continue}let b=await $(H),B=L(b,{generateVariants:O,includeDefaults:Q}),Z=K===A?U:X.join(K,X.basename(U));await Y.promises.mkdir(X.dirname(Z),{recursive:!0}),await Y.promises.writeFile(Z,B),T.push({componentPath:H,storyPath:Z,content:B,status:W?"updated":"created"})}return T}function L(q,A={}){let{generateVariants:K=!0,includeDefaults:R=!0}=A,M=[],O={};if(R){for(let j of q.props)if(j.default!==void 0)O[j.name]=j.default}if(M.push({id:"default",title:"Default",state:O}),K){for(let j of q.props)if(j.type==="boolean")M.push({id:`${j.name}-true`,title:`${_(j.name)} (true)`,state:{...O,[j.name]:!0}}),M.push({id:`${j.name}-false`,title:`${_(j.name)} (false)`,state:{...O,[j.name]:!1}});for(let j of q.props)if(j.options&&j.options.length>0)for(let H of j.options)M.push({id:`${j.name}-${H}`,title:`${_(j.name)}: ${H}`,state:{...O,[j.name]:H}})}let Q=q.name,J=q.description||`Stories for ${Q} component`,T=M.map((j)=>{let H=Object.entries(j.state).map(([U,W])=>{if(typeof W==="string")return`${U}="${W}"`;return`:${U}="${JSON.stringify(W)}"`}).join(" ");return`
|
|
3
|
-
@story('${j.title}')
|
|
4
|
-
<${Q} ${H} />
|
|
5
|
-
@endstory`}).join(`
|
|
6
|
-
`);return`<!--
|
|
7
|
-
${J}
|
|
8
|
-
Auto-generated by STX Story
|
|
9
|
-
-->
|
|
10
|
-
|
|
11
|
-
<script>
|
|
12
|
-
import ${Q} from './${Q}.stx'
|
|
13
|
-
|
|
14
|
-
// Story metadata
|
|
15
|
-
const meta = {
|
|
16
|
-
title: '${Q}',
|
|
17
|
-
component: ${Q},
|
|
18
|
-
}
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
${T}
|
|
22
|
-
`}async function C(q,A={}){let K=await $(q);return L(K,A)}async function w(q,A,K){let R=[];async function M(O){let Q=await Y.promises.readdir(O,{withFileTypes:!0});for(let J of Q){let T=X.join(O,J.name),j=X.relative(q,T);if(K.some((H)=>I(j,H)))continue;if(J.isDirectory())await M(T);else if(J.isFile()){if(A.some((H)=>I(j,H)))R.push(T)}}}return await M(q),R}function I(q,A){let K=A.replace(/\*\*/g,"{{GLOBSTAR}}").replace(/\*/g,"[^/]*").replace(/\?/g,".").replace(/\{\{GLOBSTAR\}\}/g,".*");return new RegExp(`^${K}$`).test(q)}async function z(q){try{return await Y.promises.access(q),!0}catch{return!1}}function _(q){return q.replace(/([A-Z])/g," $1").replace(/^./,(A)=>A.toUpperCase()).trim()}async function x(q){let A=q[0]||"./src/components",K=q[1]||A;console.log(`Scanning for components in ${A}...`);let R=await V({componentsDir:A,outputDir:K,generateVariants:!0,includeDefaults:!0}),M=R.filter((J)=>J.status==="created").length,O=R.filter((J)=>J.status==="updated").length,Q=R.filter((J)=>J.status==="skipped").length;console.log(`
|
|
23
|
-
Results:`),console.log(` Created: ${M}`),console.log(` Updated: ${O}`),console.log(` Skipped: ${Q}`),console.log(` Total: ${R.length}`)}
|
|
24
|
-
export{V as Id,L as Jd,C as Kd,x as Ld};
|
package/dist/chunk-b0cyc09a.js
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
var O=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","contextmenu","wheel","keydown","keyup","keypress","submit","reset","change","input","focus","blur","focusin","focusout","select","invalid","touchstart","touchend","touchmove","touchcancel","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","scroll","resize","load","error","abort","animationstart","animationend","animationiteration","transitionstart","transitionend","transitionrun","transitioncancel","mounted","unmounted"]),Q={enter:"Enter",tab:"Tab",delete:"Delete",backspace:"Backspace",esc:"Escape",escape:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown"},N=new Set(["ctrl","alt","shift","meta"]),H={left:0,middle:1,right:2};function W(q){let j={prevent:!1,stop:!1,once:!1,capture:!1,self:!1,passive:!1,keys:[],systemKeys:[],mouse:null,debounce:null,throttle:null};for(let F of q){let z=F.toLowerCase();if(z==="prevent")j.prevent=!0;else if(z==="stop")j.stop=!0;else if(z==="once")j.once=!0;else if(z==="capture")j.capture=!0;else if(z==="self")j.self=!0;else if(z==="passive")j.passive=!0;else if(N.has(z))j.systemKeys.push(z);else if(z in H)j.mouse=z;else if(z in Q||/^[a-z]$/.test(z))j.keys.push(Q[z]||z.toUpperCase());else if(z.startsWith("debounce")){let J=z.match(/debounce(?:\.(\d+))?/);j.debounce=J?.[1]?Number.parseInt(J[1],10):300}else if(z.startsWith("throttle")){let J=z.match(/throttle(?:\.(\d+))?/);j.throttle=J?.[1]?Number.parseInt(J[1],10):300}}return j}function _(q){let j=[],F=0,z=/<([a-z][a-z0-9-]*)\s+([^>]*@[a-z][^>]*)>/gi,J;while((J=z.exec(q))!==null){let[G,$,X]=J,D=J.index,V=D+G.length,Z=`__stx_evt_${F++}`,K=[],L=/@([a-z][a-z0-9.]*)\s*=\s*"([^"]*)"/gi,B;while((B=L.exec(X))!==null){let[,C,y]=B,R=C.split("."),U=R[0];if(!O.has(U))continue;K.push({attribute:`@${C}`,event:U,handler:y,modifiers:W(R.slice(1)),elementId:Z})}let Y=/@([a-z][a-z0-9.]*)\s*=\s*'([^']*)'/gi;while((B=Y.exec(X))!==null){let[,C,y]=B,R=C.split("."),U=R[0];if(!O.has(U))continue;K.push({attribute:`@${C}`,event:U,handler:y,modifiers:W(R.slice(1)),elementId:Z})}if(K.length>0)j.push({originalTag:G,elementId:Z,events:K,startIndex:D,endIndex:V})}return j}function A(q){let j=[],{modifiers:F}=q;if(F.self)j.push("if ($event.target !== $el) return");for(let z of F.systemKeys)j.push(`if (!$event.${z}Key) return`);if(F.keys.length>0){let z=F.keys.map((J)=>`$event.key === '${J}'`).join(" || ");j.push(`if (!(${z})) return`)}if(F.mouse!==null){let z=H[F.mouse];j.push(`if ($event.button !== ${z}) return`)}if(F.prevent)j.push("$event.preventDefault()");if(F.stop)j.push("$event.stopPropagation()");return j.join("; ")}function b(q,j){let F=q;if(j.debounce!==null)F=`__stx_debounce(() => { ${F} }, ${j.debounce})`;else if(j.throttle!==null)F=`__stx_throttle(() => { ${F} }, ${j.throttle})`;return F}function I(q){let{modifiers:j}=q,F=q.elementId.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),z=A(q),J=b(q.handler,j),G=[];if(j.once)G.push("once: true");if(j.capture)G.push("capture: true");if(j.passive)G.push("passive: true");let $=G.length>0?`, { ${G.join(", ")} }`:"",X=J.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t");if(q.event==="mounted")return`
|
|
3
|
-
(function() {
|
|
4
|
-
var $el = document.getElementById('${F}');
|
|
5
|
-
if (!$el) return;
|
|
6
|
-
// Run mounted handler immediately (DOM is ready)
|
|
7
|
-
var scope = $el.closest('[data-stx-scope]');
|
|
8
|
-
if (scope && scope.__stx_execute) {
|
|
9
|
-
scope.__stx_execute('${X}', null, $el);
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
__stx_runHandler('${X}', null, $el);
|
|
13
|
-
}
|
|
14
|
-
})();`;if(q.event==="unmounted")return`
|
|
15
|
-
(function() {
|
|
16
|
-
var $el = document.getElementById('${F}');
|
|
17
|
-
if (!$el) return;
|
|
18
|
-
// Set up MutationObserver to detect removal
|
|
19
|
-
var observer = new MutationObserver(function(mutations) {
|
|
20
|
-
for (var m of mutations) {
|
|
21
|
-
for (var node of m.removedNodes) {
|
|
22
|
-
if (node === $el || (node.contains && node.contains($el))) {
|
|
23
|
-
observer.disconnect();
|
|
24
|
-
var scope = $el.closest('[data-stx-scope]');
|
|
25
|
-
if (scope && scope.__stx_execute) {
|
|
26
|
-
scope.__stx_execute('${X}', null, $el);
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
__stx_runHandler('${X}', null, $el);
|
|
30
|
-
}
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
observer.observe(document.body, { childList: true, subtree: true });
|
|
37
|
-
// Store observer for cleanup
|
|
38
|
-
$el.__stx_unmount_observer = observer;
|
|
39
|
-
})();`;return`
|
|
40
|
-
(function() {
|
|
41
|
-
var $el = document.getElementById('${F}');
|
|
42
|
-
if (!$el) return;
|
|
43
|
-
// eslint-disable-next-line pickier/no-unused-vars
|
|
44
|
-
$el.addEventListener('${q.event}', function($event) {
|
|
45
|
-
${z?z+";":""}
|
|
46
|
-
// Find the closest reactive scope and execute within its context
|
|
47
|
-
var scope = $el.closest('[data-stx-scope]');
|
|
48
|
-
if (scope && scope.__stx_execute) {
|
|
49
|
-
scope.__stx_execute('${X}', $event, $el);
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
// Fallback for non-reactive context (entity-safe; decoded + run in memory)
|
|
53
|
-
__stx_runHandler('${X}', $event, $el);
|
|
54
|
-
}
|
|
55
|
-
}${$});
|
|
56
|
-
})();`}function k(q){if(q.length===0)return"";return`
|
|
57
|
-
<script data-stx-events>
|
|
58
|
-
(function() {
|
|
59
|
-
'use strict';
|
|
60
|
-
|
|
61
|
-
// Utility functions
|
|
62
|
-
function __stx_debounce(fn, delay) {
|
|
63
|
-
var timeout;
|
|
64
|
-
return function() {
|
|
65
|
-
var args = arguments;
|
|
66
|
-
var ctx = this;
|
|
67
|
-
clearTimeout(timeout);
|
|
68
|
-
timeout = setTimeout(function() { fn.apply(ctx, args); }, delay);
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function __stx_throttle(fn, delay) {
|
|
73
|
-
var last = 0;
|
|
74
|
-
return function() {
|
|
75
|
-
var now = Date.now();
|
|
76
|
-
if (now - last >= delay) {
|
|
77
|
-
last = now;
|
|
78
|
-
fn.apply(this, arguments);
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
// Non-reactive fallback runner. The handler is embedded HTML-entity-encoded so
|
|
84
|
-
// the surrounding <script> can never contain raw markup (e.g. </script>); we
|
|
85
|
-
// decode it to JS only in memory here, then run it with $event/$el in scope.
|
|
86
|
-
function __stx_runHandler(h, $event, $el) {
|
|
87
|
-
var code = h
|
|
88
|
-
.replace(/</g, '<')
|
|
89
|
-
.replace(/>/g, '>')
|
|
90
|
-
.replace(/"/g, '"')
|
|
91
|
-
.replace(/'/g, "'")
|
|
92
|
-
.replace(/'/g, "'")
|
|
93
|
-
.replace(/&/g, '&');
|
|
94
|
-
try {
|
|
95
|
-
// eslint-disable-next-line no-new-func
|
|
96
|
-
(new Function('$event', '$el', code)).call($el, $event, $el);
|
|
97
|
-
}
|
|
98
|
-
catch (e) {
|
|
99
|
-
if (typeof console !== 'undefined') console.error('[stx] event handler error:', e);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// Event listeners
|
|
104
|
-
${q.flatMap((F)=>F.events).map(I).join(`
|
|
105
|
-
`)}
|
|
106
|
-
})();
|
|
107
|
-
</script>`}function x(q){let j=_(q);if(j.length===0)return{template:q,bindings:[]};let F=q,z=[];for(let J=j.length-1;J>=0;J--){let G=j[J],$=G.originalTag;if(!$.includes(" id="))$=$.replace(/^<([a-z][a-z0-9-]*)/,`<$1 id="${G.elementId}"`);else{let X=$.match(/id=["']([^"']+)["']/);if(X)for(let D of G.events)D.elementId=X[1]}for(let X of G.events){let D=X.attribute.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),V=new RegExp(`\\s*${D}\\s*=\\s*"[^"]*"`,"g"),Z=new RegExp(`\\s*${D}\\s*=\\s*'[^']*'`,"g");$=$.replace(V,""),$=$.replace(Z,"")}F=F.slice(0,G.startIndex)+$+F.slice(G.endIndex),z.push(...G.events)}return{template:F,bindings:z}}function S(q,j,F){if(/\b(?:state|derived|effect)\s*(?:<[^<>()]*>)?\s*\(/.test(q)||/@(?:model|show|for|if)\s*=/.test(q)||/data-stx(?:-auto)?(?![-\w])/.test(q))return q;if(j.__stx_sfc_mode){if(/x-data\s*=\s*["']/.test(q))return q;let{template:D,bindings:V}=x(q),Z=j.__stx_event_bindings||[];return j.__stx_event_bindings=[...Z,...V],D}let J=_(q);if(J.length===0)return q;let G=q;for(let D=J.length-1;D>=0;D--){let V=J[D],Z=V.originalTag;if(!Z.includes(" id="))Z=Z.replace(/^<([a-z][a-z0-9-]*)/,`<$1 id="${V.elementId}"`);else{let K=Z.match(/id=["']([^"']+)["']/);if(K)for(let L of V.events)L.elementId=K[1]}for(let K of V.events){let L=K.attribute.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),B=new RegExp(`\\s*${L}\\s*=\\s*"[^"]*"`,"g"),Y=new RegExp(`\\s*${L}\\s*=\\s*'[^']*'`,"g");Z=Z.replace(B,""),Z=Z.replace(Y,"")}G=G.slice(0,V.startIndex)+Z+G.slice(V.endIndex)}let $=k(J),X=G.lastIndexOf("</body>");if(X!==-1)G=G.slice(0,X)+$+`
|
|
108
|
-
`+G.slice(X);else G+=$;return G}function E(q){return/@[a-z]+(?:\.[a-z]+)*\s*=\s*["'][^"']*["']/i.test(q)}
|
|
109
|
-
export{x as Lv,S as Mv,E as Nv};
|
package/dist/chunk-b3kkjcdh.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import W from"process";function X(){if(typeof globalThis<"u"&&"caches"in globalThis&&"CF"in globalThis)return{platform:"cloudflare",supportsStreaming:!0,supportsCrypto:!0,supportsKV:!0,supportsCache:!0,capabilities:["kv","r2","d1","durable-objects","queues"]};if(typeof globalThis<"u"&&"Deno"in globalThis)return{platform:"deno",version:globalThis.Deno.version?.deno,supportsStreaming:!0,supportsCrypto:!0,supportsKV:!0,supportsCache:!0,capabilities:["kv","deploy","ffi"]};if(typeof globalThis<"u"&&"Bun"in globalThis)return{platform:"bun",version:globalThis.Bun.version,supportsStreaming:!0,supportsCrypto:!0,supportsKV:!1,supportsCache:!1,capabilities:["sqlite","ffi","native-modules"]};if(typeof globalThis<"u"&&"EdgeRuntime"in globalThis)return{platform:"vercel",supportsStreaming:!0,supportsCrypto:!0,supportsKV:!0,supportsCache:!0,capabilities:["edge-config","blob"]};if(typeof globalThis<"u"&&"Netlify"in globalThis)return{platform:"netlify",supportsStreaming:!0,supportsCrypto:!0,supportsKV:!0,supportsCache:!1,capabilities:["blobs","edge-functions"]};if(typeof globalThis<"u"&&"fastly"in globalThis)return{platform:"fastly",supportsStreaming:!0,supportsCrypto:!0,supportsKV:!0,supportsCache:!0,capabilities:["dictionary","backend","geolocation"]};if(W.versions?.node)return{platform:"node",version:W.versions.node,supportsStreaming:!0,supportsCrypto:!0,supportsKV:!1,supportsCache:!1,capabilities:["fs","child-process","native-modules"]};return{platform:"unknown",supportsStreaming:!1,supportsCrypto:!1,supportsKV:!1,supportsCache:!1,capabilities:[]}}function K(){let j=X();return["cloudflare","deno","vercel","netlify","fastly"].includes(j.platform)}function V(){return X().platform!=="unknown"}function $(j){return{get(z){if(j&&z in j){let b=j[z];return typeof b==="string"?b:void 0}if(typeof globalThis<"u"&&"Deno"in globalThis)return globalThis.Deno.env.get(z);if(W.env)return W.env[z];return},getOrThrow(z){let b=this.get(z);if(b===void 0)throw Error(`Environment variable "${z}" is not set`);return b},has(z){return this.get(z)!==void 0},all(){let z={};if(j){for(let[b,B]of Object.entries(j))if(typeof B==="string")z[b]=B}if(typeof globalThis<"u"&&"Deno"in globalThis){let b=globalThis.Deno.env.toObject();Object.assign(z,b)}if(W.env){for(let[b,B]of Object.entries(W.env))if(B!==void 0)z[b]=B}return z}}}function D(j){let z=X();if(z.platform==="cloudflare"&&j)return j;if(z.platform==="deno"&&"Deno"in globalThis)return G();if(z.platform==="node"||z.platform==="bun")return N();return}function G(){let j=null,z=async()=>{if(!j)j=await globalThis.Deno.openKv();return j};return{async get(b){return(await(await z()).get(["stx",b])).value},async getWithMetadata(b){let B=await z(),F=await B.get(["stx",b]),J=await B.get(["stx-meta",b]);return{value:F.value,metadata:J.value}},async put(b,B,F){let J=await z(),L=F?.expirationTtl?F.expirationTtl*1000:void 0;if(await J.set(["stx",b],B,L?{expireIn:L}:void 0),F?.metadata)await J.set(["stx-meta",b],F.metadata,L?{expireIn:L}:void 0)},async delete(b){let B=await z();await B.delete(["stx",b]),await B.delete(["stx-meta",b])},async list(b){let B=await z(),F=b?.prefix?["stx",b.prefix]:["stx"],J=B.list({prefix:F,limit:b?.limit||100}),L=[];for await(let O of J){let S=O.key.slice(1).join("/");if(!S.startsWith("stx-meta/"))L.push({name:S})}return{keys:L,list_complete:!0}}}}function N(){let j=new Map,z=()=>{let b=Date.now();for(let[B,F]of j.entries())if(F.expiration&&F.expiration<b)j.delete(B)};return{async get(b){z();let B=j.get(b);if(!B)return null;if(B.expiration&&B.expiration<Date.now())return j.delete(b),null;return B.value},async getWithMetadata(b){z();let B=j.get(b);if(!B)return{value:null,metadata:null};if(B.expiration&&B.expiration<Date.now())return j.delete(b),{value:null,metadata:null};return{value:B.value,metadata:B.metadata||null}},async put(b,B,F){let J=F?.expiration?F.expiration*1000:F?.expirationTtl?Date.now()+F.expirationTtl*1000:void 0;j.set(b,{value:B,metadata:F?.metadata,expiration:J})},async delete(b){j.delete(b)},async list(b){z();let B=[];for(let[F,J]of j.entries()){if(b?.prefix&&!F.startsWith(b.prefix))continue;if(B.push({name:F,expiration:J.expiration,metadata:J.metadata}),b?.limit&&B.length>=b.limit)break}return{keys:B,list_complete:!0}}}}function T(){let j=X();if(j.platform==="cloudflare"&&"caches"in globalThis)return M();if(j.supportsStreaming)return A();return}function M(){return{async match(j){return(await caches.default).match(j)},async put(j,z){await(await caches.default).put(j,z.clone())},async delete(j){return(await caches.default).delete(j)}}}function A(){let j=new Map,z=60000;return{async match(b){let B=b.url,F=j.get(B);if(!F)return;if(Date.now()>F.expiration){j.delete(B);return}return F.response.clone()},async put(b,B){let F=b.url,J=B.headers.get("Cache-Control"),L=60000;if(J){let O=J.match(/max-age=(\d+)/);if(O)L=Number.parseInt(O[1],10)*1000}j.set(F,{response:B.clone(),expiration:Date.now()+L})},async delete(b){return j.delete(b.url)}}}function w(){return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,9)}`}function P(j,z){if(z.platform==="cloudflare"){let b=j.cf;if(b)return{city:b.city,country:b.country,countryCode:b.country,region:b.region,latitude:b.latitude?Number.parseFloat(b.latitude):void 0,longitude:b.longitude?Number.parseFloat(b.longitude):void 0,timezone:b.timezone}}if(z.platform==="vercel"){let b={},B=j.headers.get("x-vercel-ip-city"),F=j.headers.get("x-vercel-ip-country"),J=j.headers.get("x-vercel-ip-country-region"),L=j.headers.get("x-vercel-ip-latitude"),O=j.headers.get("x-vercel-ip-longitude");if(B)b.city=decodeURIComponent(B);if(F)b.countryCode=F;if(J)b.region=J;if(L)b.latitude=Number.parseFloat(L);if(O)b.longitude=Number.parseFloat(O);return Object.keys(b).length>0?b:void 0}if(z.platform==="netlify"){let b={},B=j.headers.get("x-nf-geo-city"),F=j.headers.get("x-nf-geo-country");if(B)b.city=B;if(F)b.countryCode=F;return Object.keys(b).length>0?b:void 0}return}function Z(j,z,b){let B=new Headers(j.headers);if(z.origins==="*")B.set("Access-Control-Allow-Origin","*");else if(z.origins&&b&&z.origins.includes(b))B.set("Access-Control-Allow-Origin",b),B.set("Vary","Origin");if(z.methods)B.set("Access-Control-Allow-Methods",z.methods.join(", "));if(z.headers)B.set("Access-Control-Allow-Headers",z.headers.join(", "));if(z.exposeHeaders)B.set("Access-Control-Expose-Headers",z.exposeHeaders.join(", "));if(z.credentials)B.set("Access-Control-Allow-Credentials","true");if(z.maxAge)B.set("Access-Control-Max-Age",String(z.maxAge));return new Response(j.body,{status:j.status,statusText:j.statusText,headers:B})}function Y(j){let z=X();return async(b,B)=>{let F=performance.now(),J=w(),L={runtime:z,platform:B||{},requestId:J,geo:P(b,z),timing:{start:F,getElapsed:()=>performance.now()-F},kv:D(B?.KV),cache:T(),env:$(B?.env)};try{if(b.method==="OPTIONS"&&j.cors){let Q=new Response(null,{status:204});return Q=Z(Q,j.cors,b.headers.get("Origin")||void 0),Q}if(j.cache?.enabled&&b.method==="GET"&&L.cache){if(_(b,j.cache)){let S=await L.cache.match(b);if(S){let U=new Response(S.body,S);return U.headers.set("X-Cache","HIT"),U.headers.set("X-Request-Id",J),j.cors?Z(U,j.cors,b.headers.get("Origin")||void 0):U}}}let O;if(j.middleware&&j.middleware.length>0)O=await H(b,L,j.middleware,async()=>{let Q=await j.render(b,L);return typeof Q==="string"?new Response(Q,{headers:{"Content-Type":"text/html; charset=utf-8"}}):Q});else{let Q=await j.render(b,L);O=typeof Q==="string"?new Response(Q,{headers:{"Content-Type":"text/html; charset=utf-8"}}):Q}if(O.headers.set("X-Request-Id",J),O.headers.set("X-Response-Time",`${L.timing.getElapsed().toFixed(2)}ms`),j.cache?.enabled&&b.method==="GET"&&L.cache){if(_(b,j.cache)&&O.status===200){let S=j.cache.ttl||60,U=O.clone();U.headers.set("Cache-Control",`public, max-age=${S}`),await L.cache.put(b,U),O.headers.set("X-Cache","MISS")}}if(j.cors)O=Z(O,j.cors,b.headers.get("Origin")||void 0);return O}catch(O){let Q=O instanceof Error?O:Error(String(O));if(j.onError)return j.onError(Q,b);return new Response(`Internal Server Error: ${Q.message}`,{status:500,headers:{"Content-Type":"text/plain","X-Request-Id":J}})}}}function _(j,z){let B=new URL(j.url).pathname;if(z.excludePaths){for(let F of z.excludePaths)if(F.test(B))return!1}if(z.includePaths){for(let F of z.includePaths)if(F.test(B))return!0;return!1}return!0}async function H(j,z,b,B){let F=0,J=async()=>{if(F>=b.length)return B();let L=b[F];return F++,L(j,z,J)};return J()}function C(j,z){let b=new Headers(z?.headers);return b.set("Content-Type","text/html; charset=utf-8"),b.set("Transfer-Encoding","chunked"),new Response(j,{...z,headers:b})}function I(){let j=new TextEncoder;return new TransformStream({transform(z,b){b.enqueue(j.encode(z))}})}function E(j){let z=new TextEncoder;return new ReadableStream({async start(b){for await(let B of j)b.enqueue(z.encode(B));b.close()}})}function x(j){let z=Y(j);return{async fetch(b,B,F){return z(b,{env:B,ctx:F,KV:B.KV})}}}function v(j){let z=Y(j);return(b)=>z(b,{})}function h(j){let z=Y(j);return(b)=>z(b,{})}function m(j){let z=Y(j);return(b,B)=>{return z(b,{netlifyContext:B})}}function y(j){let z=j.headers.get("Cookie");if(!z)return{};let b={};for(let B of z.split(";")){let[F,J]=B.split("=").map((L)=>L.trim());if(F&&J)b[F]=decodeURIComponent(J)}return b}function k(j,z,b){let B=`${encodeURIComponent(j)}=${encodeURIComponent(z)}`;if(b?.maxAge!==void 0)B+=`; Max-Age=${b.maxAge}`;if(b?.expires)B+=`; Expires=${b.expires.toUTCString()}`;if(b?.path)B+=`; Path=${b.path}`;if(b?.domain)B+=`; Domain=${b.domain}`;if(b?.secure)B+="; Secure";if(b?.httpOnly)B+="; HttpOnly";if(b?.sameSite)B+=`; SameSite=${b.sameSite}`;return B}function q(j,z){let b=new Headers(z?.headers);return b.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(j),{...z,headers:b})}function d(j,z=302){return new Response(null,{status:z,headers:{Location:j}})}function l(j="Not Found"){return new Response(j,{status:404,headers:{"Content-Type":"text/plain"}})}
|
|
3
|
-
export{X as pn,K as qn,V as rn,$ as sn,D as tn,T as un,Y as vn,C as wn,I as xn,E as yn,x as zn,v as An,h as Bn,m as Cn,y as Dn,k as En,q as Fn,d as Gn,l as Hn};
|
package/dist/chunk-b3prs7y0.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{existsSync as q,readFileSync as H}from"fs";import{join as T,resolve as Y}from"path";import z from"process";function A(C,E=z.cwd()){let B=C.i18n;if(!B||!Array.isArray(B.locales)||B.locales.length===0)return null;let I=B.defaultLocale??B.locales[0],D=U(B,E);return{locales:B.locales,defaultLocale:I,labels:B.labels??Object.fromEntries(B.locales.map((G)=>[G,G.toUpperCase()])),translations:D,pickerSelector:B.pickerSelector??"#lang-picker"}}function U(C,E){let B=C.translations??{},I={},D=C.translationsDir,G=D===!1?null:Y(E,typeof D==="string"&&D?D:"translations"),J=C.format??"json";for(let M of C.locales){let N=G?K(G,M,J):{};I[M]={...N,...B[M]??{}}}return I}function K(C,E,B){let I=B==="json"?[`${E}.json`]:[`${E}.${B}`,`${E}.${B==="yaml"?"yml":"yaml"}`];for(let D of I){let G=T(C,D);if(!q(G))continue;try{let J=H(G,"utf8"),M=B==="json"?JSON.parse(J):O(J);return _(M)}catch{continue}}return{}}function _(C,E="",B={}){if(!C||typeof C!=="object")return B;for(let[I,D]of Object.entries(C)){let G=E?`${E}.${I}`:I;if(D&&typeof D==="object"&&!Array.isArray(D))_(D,G,B);else if(typeof D==="string")B[G]=D;else if(typeof D==="number"||typeof D==="boolean")B[G]=String(D)}return B}function O(C){let E={},B=[{obj:E,indent:-1}];for(let I of C.split(`
|
|
3
|
-
`)){let D=I.replace(/#.*$/,"").trimEnd();if(!D.trim())continue;let G=D.search(/\S/);if(G===-1)continue;while(B.length>1&&B[B.length-1].indent>=G)B.pop();let J=B[B.length-1].obj,M=D.match(/^(\s*)(\S[^:]*):\s*(.*)$/);if(!M)continue;let[,,N,$]=M,Q=N.trim(),X=$.trim();if(X==="")J[Q]={},B.push({obj:J[Q],indent:G});else J[Q]=V(X)}return E}function V(C){if(C.startsWith("'")&&C.endsWith("'")||C.startsWith('"')&&C.endsWith('"'))return C.slice(1,-1);return C}function F(C,E,B){let I=C.translations[E]?.[B];if(typeof I==="string")return I;let D=C.translations[C.defaultLocale]?.[B];if(typeof D==="string")return D;return B}function L(C,E,B){return C.replace(/\{t(!?):([a-zA-Z][\w.-]*)\}/g,(I,D,G)=>{let J=F(E,B,G);return D==="!"?J:R(J)})}function Z(C,E,B){if(E===B)return C;if(C==="/")return`/${E}/`;if(C==="/404.html")return`/${E}/404.html`;return`/${E}${C}`}function P(C,E){for(let B of E){if(C===`/${B}`||C===`/${B}/`)return{locale:B,path:"/"};if(C.startsWith(`/${B}/`))return{locale:B,path:C.slice(B.length+1)}}return{locale:null,path:C}}function w(C,E,B){let I=C.replace(/\/$/,""),D=[];for(let J of B.locales){let M=`${I}${Z(E,J,B.defaultLocale)}`;D.push(`<link rel="alternate" hreflang="${W(J)}" href="${W(M)}">`)}let G=`${I}${Z(E,B.defaultLocale,B.defaultLocale)}`;return D.push(`<link rel="alternate" hreflang="x-default" href="${W(G)}">`),D.join(`
|
|
4
|
-
`)}function j(C,E){return`<script data-stx-lang-picker="1">window.__stxI18n=${JSON.stringify({locales:C.locales,defaultLocale:C.defaultLocale,current:E,pickerSelector:C.pickerSelector})};(function(){function cfg(){return window.__stxI18n}function localeFromPath(p){var d=cfg();for(var i=0;i<d.locales.length;i++){var c=d.locales[i];if(p==='/'+c||p==='/'+c+'/')return c;if(p.indexOf('/'+c+'/')===0)return c}return d.defaultLocale}function localePathFor(loc,p){var d=cfg();var stripped=p;for(var i=0;i<d.locales.length;i++){var c=d.locales[i];if(p==='/'+c||p==='/'+c+'/'){stripped='/';break}if(p.indexOf('/'+c+'/')===0){stripped=p.slice(c.length+1);break}}if(loc===d.defaultLocale)return stripped;if(stripped==='/')return '/'+loc+'/';return '/'+loc+stripped}cfg().localizeHref=function(href){try{var u=new URL(href,location.origin);if(u.origin!==location.origin)return href;return localePathFor(localeFromPath(location.pathname),u.pathname)+(u.search||'')+(u.hash||'')}catch(_){return href}};function syncFromUrl(){var d=cfg();var loc=localeFromPath(location.pathname);d.current=loc;var picker=document.querySelector(d.pickerSelector);if(picker){var btns=picker.querySelectorAll('[data-lang]');for(var i=0;i<btns.length;i++){var b=btns[i];if(b.getAttribute('data-lang')===loc)b.setAttribute('aria-current','true');else b.removeAttribute('aria-current')}}if(document.documentElement.lang!==loc)document.documentElement.lang=loc}function onLangClick(e){var d=cfg();var btn=e.target&&e.target.closest&&e.target.closest('[data-lang]');if(!btn)return;var picker=document.querySelector(d.pickerSelector);if(!picker||!picker.contains(btn))return;e.preventDefault();e.stopPropagation();var loc=btn.getAttribute('data-lang');if(!loc||loc===localeFromPath(location.pathname))return;var dest=localePathFor(loc,location.pathname);var r=window.__stxRouter;if(r&&r.navigate)r.navigate(dest,true,true);else location.assign(dest)}syncFromUrl();if(window.__stxLangPickerBound){document.removeEventListener('click',window.__stxLangPickerClick,true);window.removeEventListener('stx:navigate',window.__stxLangPickerSync);window.removeEventListener('popstate',window.__stxLangPickerSync)}window.__stxLangPickerClick=onLangClick;window.__stxLangPickerSync=syncFromUrl;window.__stxLangPickerBound=1;document.addEventListener('click',onLangClick,true);window.addEventListener('stx:navigate',syncFromUrl);window.addEventListener('popstate',syncFromUrl)})();</script>`}function W(C){return C.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function R(C){return C.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}
|
|
5
|
-
export{A as Xg,F as Yg,L as Zg,Z as _g,P as $g,w as ah,j as bh};
|
package/dist/chunk-b5zc9y0y.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ho as b,Jo as v}from"./chunk-268adc7r.js";import{_o as V}from"./chunk-5p568px4.js";import{rB as z}from"./chunk-3jm3snz8.js";import{existsSync as y,mkdirSync as _,copyFileSync as O,chmodSync as A}from"fs";import{join as H,basename as P}from"path";import{spawn as R,execSync as d}from"child_process";import{tmpdir as S,homedir as B,platform as N}from"os";async function D(K){let Q=Date.now();try{if(!await Bun.file(K.input).exists())return{success:!1,target:K.target||I(),format:K.format||"app",error:`Input file not found: ${K.input}`};let J=K.target||I(),$=K.format||f(J),U=K.output||H(process.cwd(),"dist","native");if(!y(U))_(U,{recursive:!0});let q=await Bun.file(K.input).text();if(q=V(q,{debug:K.verbose}),q=v(q),!q.includes("craft-component-styles")){if(q.includes("</head>"))q=q.replace("</head>",`${b}
|
|
3
|
-
</head>`)}let X=K.name||P(K.input,".stx"),Y=K.version||"1.0.0",Z=K.craftPath||await m();if(!Z)return{success:!1,target:J,format:$,error:"Craft binary not found. Please install Craft or specify craftPath."};if(K.verbose)console.log(`\uD83D\uDCE6 Building native app for ${J}...`),console.log(` Input: ${K.input}`),console.log(` Output: ${U}`),console.log(` Craft: ${Z}`);let G;switch(J){case"macos":G=await h(q,X,Y,U,$,K,Z);break;case"windows":G=await u(q,X,Y,U,$,K,Z);break;case"linux":G=await l(q,X,Y,U,$,K,Z);break;case"ios":G=await s(q,X,Y,U,K,Z);break;case"android":G=await g(q,X,Y,U,K,Z);break;default:G={success:!1,target:J,format:$,error:`Unsupported target: ${J}`}}return G.duration=Date.now()-Q,G}catch(J){return{success:!1,target:K.target||I(),format:K.format||"app",error:J.message,duration:Date.now()-Q}}}async function h(K,Q,J,$,U,q,X){let Y=q.bundleId||`com.stx.${Q.toLowerCase().replace(/[^a-z0-9]/g,"")}`,Z=H($,`${Q}.app`),G=H(Z,"Contents"),L=H(G,"MacOS"),W=H(G,"Resources");_(L,{recursive:!0}),_(W,{recursive:!0});let x=H(W,"index.html");await Bun.write(x,K);let E="";if(q.sidebar?.enabled&&q.sidebar?.config)E=H(W,"sidebar-config.json"),await Bun.write(E,JSON.stringify(q.sidebar.config));let T=q.sidebar?.enabled?`--native-sidebar --sidebar-width ${q.sidebar?.width||240} --sidebar-config "$(cat "$RESOURCES/sidebar-config.json")"`:"",M=`#!/bin/bash
|
|
4
|
-
DIR="$( cd "$( dirname "\${BASH_SOURCE[0]}" )" && pwd )"
|
|
5
|
-
RESOURCES="$DIR/../Resources"
|
|
6
|
-
"${X}" --html "$(cat "$RESOURCES/index.html")" \\
|
|
7
|
-
--title "${q.window?.title||Q}" \\
|
|
8
|
-
--width ${q.window?.width||1200} \\
|
|
9
|
-
--height ${q.window?.height||800} \\
|
|
10
|
-
${q.systemTray?"--system-tray":""} \\
|
|
11
|
-
${q.devTools?"--dev-tools":""} \\
|
|
12
|
-
${q.window?.frameless?"--frameless":""} \\
|
|
13
|
-
${q.window?.alwaysOnTop?"--always-on-top":""} \\
|
|
14
|
-
${T}
|
|
15
|
-
`,w=H(L,Q);await Bun.write(w,M),A(w,493);let C=H(L,"craft");try{O(X,C),A(C,493)}catch{let F=`#!/bin/bash
|
|
16
|
-
exec "${X}" "$@"`;await Bun.write(C,F),A(C,493)}let j=`<?xml version="1.0" encoding="UTF-8"?>
|
|
17
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
18
|
-
<plist version="1.0">
|
|
19
|
-
<dict>
|
|
20
|
-
<key>CFBundleExecutable</key>
|
|
21
|
-
<string>${Q}</string>
|
|
22
|
-
<key>CFBundleIdentifier</key>
|
|
23
|
-
<string>${Y}</string>
|
|
24
|
-
<key>CFBundleName</key>
|
|
25
|
-
<string>${Q}</string>
|
|
26
|
-
<key>CFBundleDisplayName</key>
|
|
27
|
-
<string>${Q}</string>
|
|
28
|
-
<key>CFBundleShortVersionString</key>
|
|
29
|
-
<string>${J}</string>
|
|
30
|
-
<key>CFBundleVersion</key>
|
|
31
|
-
<string>${J}</string>
|
|
32
|
-
<key>CFBundlePackageType</key>
|
|
33
|
-
<string>APPL</string>
|
|
34
|
-
<key>CFBundleSignature</key>
|
|
35
|
-
<string>????</string>
|
|
36
|
-
<key>LSMinimumSystemVersion</key>
|
|
37
|
-
<string>10.15</string>
|
|
38
|
-
<key>NSHighResolutionCapable</key>
|
|
39
|
-
<true/>
|
|
40
|
-
<key>NSSupportsAutomaticGraphicsSwitching</key>
|
|
41
|
-
<true/>
|
|
42
|
-
<key>LSUIElement</key>
|
|
43
|
-
<${q.systemTray?"true":"false"}/>
|
|
44
|
-
</dict>
|
|
45
|
-
</plist>`;if(await Bun.write(H(G,"Info.plist"),j),q.icon&&await Bun.file(q.icon).exists())O(q.icon,H(W,"AppIcon.icns"));if(U==="dmg"){let F=H($,`${Q}-${J}.dmg`),k=await c(Z,F,Q);if(!k.success)return{success:!1,target:"macos",format:"dmg",error:k.error};return{success:!0,target:"macos",format:"dmg",outputPath:F}}return{success:!0,target:"macos",format:"app",outputPath:Z}}async function u(K,Q,J,$,U,q,X){let Y=H($,Q);_(Y,{recursive:!0});let Z=H(Y,"index.html");await Bun.write(Z,K);let G=`@echo off
|
|
46
|
-
set DIR=%~dp0
|
|
47
|
-
"${X}" --html-file "%DIR%index.html" ^
|
|
48
|
-
--title "${q.window?.title||Q}" ^
|
|
49
|
-
--width ${q.window?.width||1200} ^
|
|
50
|
-
--height ${q.window?.height||800} ^
|
|
51
|
-
${q.systemTray?"--system-tray":""} ^
|
|
52
|
-
${q.devTools?"--dev-tools":""}
|
|
53
|
-
`;if(await Bun.write(H(Y,`${Q}.bat`),G),U==="zip"){let L=H($,`${Q}-${J}-windows.zip`),W=await n(Y,L);if(!W.success)return{success:!1,target:"windows",format:"zip",error:W.error};return{success:!0,target:"windows",format:"zip",outputPath:L}}return{success:!0,target:"windows",format:"app",outputPath:Y}}async function l(K,Q,J,$,U,q,X){let Y=H($,Q);_(Y,{recursive:!0});let Z=H(Y,"index.html");await Bun.write(Z,K);let G=`#!/bin/bash
|
|
54
|
-
DIR="$( cd "$( dirname "\${BASH_SOURCE[0]}" )" && pwd )"
|
|
55
|
-
"${X}" --html-file "$DIR/index.html" \\
|
|
56
|
-
--title "${q.window?.title||Q}" \\
|
|
57
|
-
--width ${q.window?.width||1200} \\
|
|
58
|
-
--height ${q.window?.height||800} \\
|
|
59
|
-
${q.systemTray?"--system-tray":""} \\
|
|
60
|
-
${q.devTools?"--dev-tools":""}
|
|
61
|
-
`,L=H(Y,Q.toLowerCase());await Bun.write(L,G),A(L,493);let W=`[Desktop Entry]
|
|
62
|
-
Type=Application
|
|
63
|
-
Name=${Q}
|
|
64
|
-
Exec=${L}
|
|
65
|
-
Terminal=false
|
|
66
|
-
Categories=Utility;
|
|
67
|
-
`;if(await Bun.write(H(Y,`${Q.toLowerCase()}.desktop`),W),U==="deb"){let x=H($,`${Q.toLowerCase()}_${J}_amd64.deb`),E=await t(Y,x,Q,J,q);if(!E.success)return{success:!1,target:"linux",format:"deb",error:E.error};return{success:!0,target:"linux",format:"deb",outputPath:x}}if(U==="appimage"){let x=H($,`${Q}-${J}-x86_64.AppImage`),E=await r(Y,x,Q,q);if(!E.success)return{success:!1,target:"linux",format:"appimage",error:E.error};return{success:!0,target:"linux",format:"appimage",outputPath:x}}return{success:!0,target:"linux",format:"app",outputPath:Y}}async function s(K,Q,J,$,U,q){return{success:!1,target:"ios",format:"ipa",error:`iOS build requires Xcode and additional setup. Use 'stx init:ios ${Q}' to create an iOS project.`}}async function g(K,Q,J,$,U,q){return{success:!1,target:"android",format:"apk",error:`Android build requires Android SDK and additional setup. Use 'stx init:android ${Q}' to create an Android project.`}}async function m(){let K=[H(process.cwd(),"../../craft/packages/zig/zig-out/bin/craft-minimal"),H(process.cwd(),"../craft/packages/zig/zig-out/bin/craft-minimal"),H(B(),"Code/craft/packages/zig/zig-out/bin/craft-minimal"),"/usr/local/bin/craft","/usr/bin/craft",H(B(),".local/bin/craft"),H(process.env.LOCALAPPDATA||"","craft","craft.exe"),H(process.env.PROGRAMFILES||"","craft","craft.exe")];for(let Q of K)if(await Bun.file(Q).exists())return Q;try{let J=d("which craft 2>/dev/null || where craft 2>nul",{encoding:"utf-8"}).trim().split(`
|
|
68
|
-
`)[0];if(J&&await Bun.file(J).exists())return J}catch{}return null}function I(){switch(N()){case"darwin":return"macos";case"win32":return"windows";default:return"linux"}}function f(K){switch(K){case"macos":return"app";case"windows":return"zip";case"linux":return"appimage";case"ios":return"ipa";case"android":return"apk";default:return"app"}}async function c(K,Q,J){return new Promise(($)=>{let U=R("hdiutil",["create","-volname",J,"-srcfolder",K,"-ov","-format","UDZO",Q]);U.on("close",(q)=>{if(q===0)$({success:!0});else $({success:!1,error:`hdiutil exited with code ${q}`})}),U.on("error",(q)=>{$({success:!1,error:q.message})})})}async function n(K,Q){return new Promise((J)=>{let $=R("zip",["-r",Q,"."],{cwd:K});$.on("close",(U)=>{if(U===0)J({success:!0});else J({success:!1,error:`zip exited with code ${U}`})}),$.on("error",(U)=>{J({success:!1,error:U.message})})})}async function t(K,Q,J,$,U){return new Promise((q)=>{try{let X=H(S(),`stx-deb-${Date.now()}`),Y=H(X,"DEBIAN"),Z=H(X,"usr","bin"),G=H(X,"usr","share","applications"),L=H(X,"usr","share",J.toLowerCase());_(Y,{recursive:!0}),_(Z,{recursive:!0}),_(G,{recursive:!0}),_(L,{recursive:!0});let W=z("fs").readdirSync(K);for(let M of W)O(H(K,M),H(L,M));let x=`#!/bin/bash
|
|
69
|
-
exec /usr/share/${J.toLowerCase()}/${J.toLowerCase()} "$@"`;z("fs").writeFileSync(H(Z,J.toLowerCase()),x),A(H(Z,J.toLowerCase()),493);let E=`Package: ${J.toLowerCase()}
|
|
70
|
-
Version: ${$}
|
|
71
|
-
Section: utils
|
|
72
|
-
Priority: optional
|
|
73
|
-
Architecture: amd64
|
|
74
|
-
Depends: libgtk-3-0, libwebkit2gtk-4.0-37
|
|
75
|
-
Maintainer: ${U.author||"Unknown"}
|
|
76
|
-
Description: ${U.description||J}
|
|
77
|
-
`;z("fs").writeFileSync(H(Y,"control"),E);let T=R("dpkg-deb",["--build",X,Q]);T.on("close",(M)=>{if(z("fs").rmSync(X,{recursive:!0,force:!0}),M===0)q({success:!0});else q({success:!1,error:`dpkg-deb exited with code ${M}`})}),T.on("error",(M)=>{z("fs").rmSync(X,{recursive:!0,force:!0}),q({success:!1,error:M.message})})}catch(X){q({success:!1,error:X.message})}})}async function r(K,Q,J,$){return new Promise((U)=>{try{let q=H(S(),`stx-appimage-${Date.now()}`),X=H(q,`${J}.AppDir`),Y=H(X,"usr"),Z=H(Y,"bin"),G=H(Y,"share");_(Z,{recursive:!0}),_(G,{recursive:!0});let L=H(G,J.toLowerCase());_(L,{recursive:!0});let W=z("fs").readdirSync(K);for(let w of W)O(H(K,w),H(L,w));let x=`#!/bin/bash
|
|
78
|
-
SELF=$(readlink -f "$0")
|
|
79
|
-
HERE=\${SELF%/*}
|
|
80
|
-
export PATH="\${HERE}/usr/bin:\${PATH}"
|
|
81
|
-
exec "\${HERE}/usr/share/${J.toLowerCase()}/${J.toLowerCase()}" "$@"
|
|
82
|
-
`;z("fs").writeFileSync(H(X,"AppRun"),x),A(H(X,"AppRun"),493);let E=`[Desktop Entry]
|
|
83
|
-
Type=Application
|
|
84
|
-
Name=${J}
|
|
85
|
-
Exec=${J.toLowerCase()}
|
|
86
|
-
Terminal=false
|
|
87
|
-
Categories=Utility;
|
|
88
|
-
Icon=${J.toLowerCase()}
|
|
89
|
-
`;z("fs").writeFileSync(H(X,`${J.toLowerCase()}.desktop`),E);let T=Buffer.from([137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,1,0,0,0,1,8,2,0,0,0,144,119,83,222,0,0,0,12,73,68,65,84,8,215,99,248,255,255,63,0,5,254,2,254,220,204,89,231,0,0,0,0,73,69,78,68,174,66,96,130]);if(z("fs").writeFileSync(H(X,`${J.toLowerCase()}.png`),T),$.icon&&y($.icon))O($.icon,H(X,`${J.toLowerCase()}.png`));let M=R("appimagetool",[X,Q],{env:{...process.env,ARCH:"x86_64"}});M.on("close",(w)=>{if(z("fs").rmSync(q,{recursive:!0,force:!0}),w===0)A(Q,493),U({success:!0});else U({success:!1,error:`appimagetool exited with code ${w}. Install from https://appimage.github.io/appimagetool/`})}),M.on("error",(w)=>{z("fs").rmSync(q,{recursive:!0,force:!0}),U({success:!1,error:`appimagetool not found: ${w.message}`})})}catch(q){U({success:!1,error:q.message})}})}function o(){return[I()]}function e(K){switch(K){case"macos":return["app","dmg","pkg"];case"windows":return["app","zip","msi"];case"linux":return["app","deb","rpm","appimage"];case"ios":return["ipa"];case"android":return["apk"];default:return["app"]}}var i={buildNative:D,getAvailableTargets:o,getAvailableFormats:e,detectPlatform:I},$q=i;
|
|
90
|
-
export{D as yo,o as zo,e as Ao,$q as Bo};
|
package/dist/chunk-baa7h4yz.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{wz as w}from"./chunk-adqh2m9z.js";import{defineRoute as M,defineRoutes as Q,resetRoutes as R,route as S,setAppUrl as T}from"stx-router";import{route as B}from"stx-router";function I(y){return y.replace(/@route\(\s*(['"])([^'"]+)\1(?:\s*,\s*(\{[^}]+\}))?\s*(?:,\s*(true|false)\s*)?\)/g,(C,D,z,q,A)=>{try{let k=q?w(q,{}):{};return B(z,k,A==="true")}catch(k){return console.error(`Error processing @route directive: ${k}`),"#route-error"}})}
|
|
3
|
-
export{I as Kt,M as Lt,Q as Mt,R as Nt,S as Ot,T as Pt};
|