@ohos-ports/stacksjs-stx 0.2.287-beta.0
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/LICENSE.md +21 -0
- package/README.md +1042 -0
- package/dist/a11y.d.ts +256 -0
- package/dist/a11y.js +671 -0
- package/dist/analytics.d.ts +40 -0
- package/dist/analytics.js +159 -0
- package/dist/analyzer.d.ts +68 -0
- package/dist/analyzer.js +240 -0
- package/dist/animation.d.ts +123 -0
- package/dist/animation.js +688 -0
- package/dist/app-shell.d.ts +76 -0
- package/dist/app-shell.js +209 -0
- package/dist/app.d.ts +65 -0
- package/dist/app.js +79 -0
- package/dist/appearance-bootstrap.d.ts +54 -0
- package/dist/appearance-bootstrap.js +92 -0
- package/dist/asset-roots.d.ts +32 -0
- package/dist/asset-roots.js +7 -0
- package/dist/assets.d.ts +21 -0
- package/dist/assets.js +155 -0
- package/dist/ast.d.ts +265 -0
- package/dist/ast.js +630 -0
- package/dist/async-components.d.ts +123 -0
- package/dist/async-components.js +428 -0
- package/dist/auth.d.ts +13 -0
- package/dist/auth.js +12 -0
- package/dist/broadcasting.d.ts +77 -0
- package/dist/broadcasting.js +103 -0
- package/dist/browser-composables.d.ts +348 -0
- package/dist/browser-composables.js +606 -0
- package/dist/browser-core-imports.d.ts +12 -0
- package/dist/browser-core-imports.js +28 -0
- package/dist/build-assets.d.ts +32 -0
- package/dist/build-assets.js +29 -0
- package/dist/build-externalize-repeated.d.ts +34 -0
- package/dist/build-externalize-repeated.js +101 -0
- package/dist/build-externalize.d.ts +73 -0
- package/dist/build-externalize.js +80 -0
- package/dist/build-id.d.ts +57 -0
- package/dist/build-id.js +25 -0
- package/dist/build-message.d.ts +81 -0
- package/dist/build-message.js +65 -0
- package/dist/build-mode-detector.d.ts +26 -0
- package/dist/build-mode-detector.js +50 -0
- package/dist/build-optimizer.d.ts +101 -0
- package/dist/build-optimizer.js +433 -0
- package/dist/build-views.d.ts +56 -0
- package/dist/build-views.js +180 -0
- package/dist/build.d.ts +31 -0
- package/dist/build.js +34 -0
- package/dist/builtins/attrs.d.ts +49 -0
- package/dist/builtins/attrs.js +39 -0
- package/dist/builtins/drawer.d.ts +24 -0
- package/dist/builtins/drawer.js +37 -0
- package/dist/builtins/escape.d.ts +12 -0
- package/dist/builtins/escape.js +3 -0
- package/dist/builtins/icon.d.ts +45 -0
- package/dist/builtins/icon.js +100 -0
- package/dist/builtins/image-delivery.d.ts +16 -0
- package/dist/builtins/image-delivery.js +115 -0
- package/dist/builtins/image-placeholder.d.ts +78 -0
- package/dist/builtins/image-placeholder.js +137 -0
- package/dist/builtins/index.d.ts +26 -0
- package/dist/builtins/index.js +34 -0
- package/dist/builtins/modal.d.ts +26 -0
- package/dist/builtins/modal.js +38 -0
- package/dist/builtins/safe-image.d.ts +44 -0
- package/dist/builtins/safe-image.js +45 -0
- package/dist/builtins/stx-image.d.ts +29 -0
- package/dist/builtins/stx-image.js +222 -0
- package/dist/builtins/stx-link.d.ts +11 -0
- package/dist/builtins/stx-link.js +35 -0
- package/dist/builtins/stx-loading-indicator.d.ts +13 -0
- package/dist/builtins/stx-loading-indicator.js +35 -0
- package/dist/builtins/suspense.d.ts +30 -0
- package/dist/builtins/suspense.js +24 -0
- package/dist/builtins/toast.d.ts +19 -0
- package/dist/builtins/toast.js +42 -0
- package/dist/builtins/tooltip.d.ts +18 -0
- package/dist/builtins/tooltip.js +106 -0
- package/dist/builtins/transition-group.d.ts +27 -0
- package/dist/builtins/transition-group.js +22 -0
- package/dist/bun-shim.js +496 -0
- package/dist/bundle-analyzer/collector.d.ts +66 -0
- package/dist/bundle-analyzer/collector.js +233 -0
- package/dist/bundle-analyzer/index.d.ts +98 -0
- package/dist/bundle-analyzer/index.js +82 -0
- package/dist/bundle-analyzer/report.d.ts +39 -0
- package/dist/bundle-analyzer/report.js +318 -0
- package/dist/bundle-analyzer/treemap.d.ts +19 -0
- package/dist/bundle-analyzer/treemap.js +594 -0
- package/dist/bundle-analyzer.js +499 -0
- package/dist/caching.d.ts +69 -0
- package/dist/caching.js +135 -0
- package/dist/chunk-0y46fbkx.js +3 -0
- package/dist/chunk-122tyfre.js +2 -0
- package/dist/chunk-19nfvxfw.js +43 -0
- package/dist/chunk-1kah92n2.js +3 -0
- package/dist/chunk-1kms3b9d.js +2 -0
- package/dist/chunk-1q4y74mh.js +1194 -0
- package/dist/chunk-248e84r1.js +4 -0
- package/dist/chunk-24ps8kft.js +2 -0
- package/dist/chunk-2et5hxfv.js +2 -0
- package/dist/chunk-2r1rd8f0.js +2 -0
- package/dist/chunk-2tk1zkrz.js +2 -0
- package/dist/chunk-38ejahd9.js +3 -0
- package/dist/chunk-3zv4wz87.js +2 -0
- package/dist/chunk-4122k1bh.js +2 -0
- package/dist/chunk-45az9zht.js +2 -0
- package/dist/chunk-4qr85f07.js +2 -0
- package/dist/chunk-4ww3znrr.js +15 -0
- package/dist/chunk-54st8g2j.js +397 -0
- package/dist/chunk-58f0mthg.js +3 -0
- package/dist/chunk-5a19dhx5.js +2 -0
- package/dist/chunk-5kk8gsj2.js +3 -0
- package/dist/chunk-5w1e3yxs.js +499 -0
- package/dist/chunk-6gdycmxr.js +2 -0
- package/dist/chunk-6hmnaza7.js +4473 -0
- package/dist/chunk-71t0yan0.js +5 -0
- package/dist/chunk-74cv4ta1.js +3 -0
- package/dist/chunk-74v15e8z.js +2 -0
- package/dist/chunk-7b329e5v.js +3 -0
- package/dist/chunk-7q9mwh4v.js +84 -0
- package/dist/chunk-866y9d8b.js +8169 -0
- package/dist/chunk-8fwerspy.js +2 -0
- package/dist/chunk-8mjdpr94.js +147 -0
- package/dist/chunk-92mj1t26.js +60 -0
- package/dist/chunk-9b22663r.js +2 -0
- package/dist/chunk-9hjdgm4d.js +2 -0
- package/dist/chunk-9n0gvfrg.js +4 -0
- package/dist/chunk-9wr7zcad.js +18 -0
- package/dist/chunk-9y0g8kzt.js +358 -0
- package/dist/chunk-a0nfbmeh.js +3 -0
- package/dist/chunk-acn1b56m.js +1280 -0
- package/dist/chunk-awkq3xfx.js +2 -0
- package/dist/chunk-b6ej2fdf.js +1814 -0
- package/dist/chunk-b8rrnqry.js +2 -0
- package/dist/chunk-bfqfs07m.js +3022 -0
- package/dist/chunk-bs6kapy7.js +2 -0
- package/dist/chunk-btav940g.js +2 -0
- package/dist/chunk-bz820epz.js +3 -0
- package/dist/chunk-ccspd3mc.js +2 -0
- package/dist/chunk-csbgwaa5.js +2 -0
- package/dist/chunk-d8t4sjsp.js +2 -0
- package/dist/chunk-dap191q2.js +2 -0
- package/dist/chunk-de7fye10.js +4 -0
- package/dist/chunk-dgrt76d2.js +2 -0
- package/dist/chunk-dhh5q7qt.js +3 -0
- package/dist/chunk-dsffsqnt.js +2 -0
- package/dist/chunk-dtq7y5ym.js +2 -0
- package/dist/chunk-fed3xsp9.js +3 -0
- package/dist/chunk-ferav3bw.js +19 -0
- package/dist/chunk-fvhm8psm.js +3 -0
- package/dist/chunk-g4vpzv6b.js +2 -0
- package/dist/chunk-g9csmj0s.js +2 -0
- package/dist/chunk-gtcrpmz1.js +2 -0
- package/dist/chunk-h4xh8cms.js +4 -0
- package/dist/chunk-h8yqsz9m.js +2 -0
- package/dist/chunk-hcq5dw7a.js +2 -0
- package/dist/chunk-hm0xha6c.js +12 -0
- package/dist/chunk-hpybjwwf.js +8 -0
- package/dist/chunk-jegt35zh.js +2 -0
- package/dist/chunk-jr3jp3ev.js +8 -0
- package/dist/chunk-k56rjjc0.js +24 -0
- package/dist/chunk-kdh37tp8.js +194 -0
- package/dist/chunk-kxzb4et3.js +29 -0
- package/dist/chunk-mf4n3x1j.js +14 -0
- package/dist/chunk-mkd9kjgb.js +3 -0
- package/dist/chunk-mxfh1nxg.js +2 -0
- package/dist/chunk-n3ggrhb3.js +3 -0
- package/dist/chunk-nkb3scg6.js +8 -0
- package/dist/chunk-nnd4wq8j.js +231 -0
- package/dist/chunk-nsp1cw38.js +11 -0
- package/dist/chunk-nx5qkm8k.js +30 -0
- package/dist/chunk-p3242nck.js +2 -0
- package/dist/chunk-p98kfh94.js +2 -0
- package/dist/chunk-pkaabd8h.js +3 -0
- package/dist/chunk-pzm13sdc.js +3 -0
- package/dist/chunk-q4p5k2p3.js +2 -0
- package/dist/chunk-q9n5swx7.js +3 -0
- package/dist/chunk-qc1f74ek.js +3 -0
- package/dist/chunk-qpyjak7z.js +2 -0
- package/dist/chunk-qr82je1m.js +22 -0
- package/dist/chunk-qy73j6m4.js +288 -0
- package/dist/chunk-qzkhpsam.js +505 -0
- package/dist/chunk-r3ayvdz3.js +2 -0
- package/dist/chunk-r7r66978.js +2 -0
- package/dist/chunk-rbb7dvja.js +30 -0
- package/dist/chunk-refwkt87.js +71 -0
- package/dist/chunk-rj4kajww.js +2 -0
- package/dist/chunk-rp4rjjmf.js +2 -0
- package/dist/chunk-se0p17c2.js +898 -0
- package/dist/chunk-sj9pmene.js +2 -0
- package/dist/chunk-sscwkffs.js +2 -0
- package/dist/chunk-svpqxn2c.js +2 -0
- package/dist/chunk-t6nseeb9.js +351 -0
- package/dist/chunk-t8y1ggdy.js +2 -0
- package/dist/chunk-tndhnk9e.js +2 -0
- package/dist/chunk-v5e1gxwm.js +3 -0
- package/dist/chunk-vqxmxgaj.js +4 -0
- package/dist/chunk-vrrax298.js +2 -0
- package/dist/chunk-w3ycm4na.js +3 -0
- package/dist/chunk-wcm80anz.js +321 -0
- package/dist/chunk-wrzwgkbx.js +22 -0
- package/dist/chunk-x650vjcp.js +302 -0
- package/dist/chunk-xgnc1wy6.js +116 -0
- package/dist/chunk-xpp135ad.js +11 -0
- package/dist/chunk-xttsqmkm.js +216 -0
- package/dist/chunk-y11cxbxd.js +3757 -0
- package/dist/chunk-y7m2dpd3.js +341 -0
- package/dist/chunk-y98jsjqq.js +2 -0
- package/dist/chunk-ya386h70.js +2 -0
- package/dist/chunk-ydrz60kr.js +2 -0
- package/dist/chunk-ypmqf7tm.js +4 -0
- package/dist/chunk-z4jhj5e5.js +28 -0
- package/dist/chunk-zg75gjns.js +2 -0
- package/dist/chunk-zqqx1qaj.js +2 -0
- package/dist/cli-flags.d.ts +34 -0
- package/dist/cli-flags.js +20 -0
- package/dist/cli.js +174 -0
- package/dist/client/directive.d.ts +17 -0
- package/dist/client/directive.js +14 -0
- package/dist/client/index.d.ts +7 -0
- package/dist/client/index.js +2 -0
- package/dist/client-helpers.d.ts +317 -0
- package/dist/client-helpers.js +312 -0
- package/dist/client-script-bundler.d.ts +103 -0
- package/dist/client-script-bundler.js +390 -0
- package/dist/client-script.d.ts +215 -0
- package/dist/client-script.js +865 -0
- package/dist/client.d.ts +21 -0
- package/dist/client.js +73 -0
- package/dist/codemod.d.ts +33 -0
- package/dist/codemod.js +244 -0
- package/dist/color-mode-boot.d.ts +92 -0
- package/dist/color-mode-boot.js +72 -0
- package/dist/component-client-factories.d.ts +33 -0
- package/dist/component-client-factories.js +77 -0
- package/dist/component-hmr.d.ts +107 -0
- package/dist/component-hmr.js +585 -0
- package/dist/component-library.d.ts +38 -0
- package/dist/component-library.js +994 -0
- package/dist/component-processing.d.ts +198 -0
- package/dist/component-processing.js +677 -0
- package/dist/component-registry.d.ts +127 -0
- package/dist/component-registry.js +90 -0
- package/dist/component-renderer.d.ts +52 -0
- package/dist/component-renderer.js +790 -0
- package/dist/components/StxImage.stx +12 -0
- package/dist/components/StxLink.stx +18 -0
- package/dist/components.d.ts +28 -0
- package/dist/components.js +213 -0
- package/dist/composable-loader.d.ts +62 -0
- package/dist/composable-loader.js +190 -0
- package/dist/composables/index.d.ts +417 -0
- package/dist/composables/index.js +222 -0
- package/dist/composables/use-battery.d.ts +46 -0
- package/dist/composables/use-battery.js +101 -0
- package/dist/composables/use-broadcast-channel.d.ts +59 -0
- package/dist/composables/use-broadcast-channel.js +80 -0
- package/dist/composables/use-channel.d.ts +67 -0
- package/dist/composables/use-channel.js +124 -0
- package/dist/composables/use-clipboard.d.ts +30 -0
- package/dist/composables/use-clipboard.js +90 -0
- package/dist/composables/use-color-mode.d.ts +67 -0
- package/dist/composables/use-color-mode.js +152 -0
- package/dist/composables/use-cookie.d.ts +59 -0
- package/dist/composables/use-cookie.js +86 -0
- package/dist/composables/use-device-orientation.d.ts +116 -0
- package/dist/composables/use-device-orientation.js +181 -0
- package/dist/composables/use-event-listener.d.ts +35 -0
- package/dist/composables/use-event-listener.js +27 -0
- package/dist/composables/use-event-source.d.ts +90 -0
- package/dist/composables/use-event-source.js +166 -0
- package/dist/composables/use-eye-dropper.d.ts +117 -0
- package/dist/composables/use-eye-dropper.js +142 -0
- package/dist/composables/use-fetch.d.ts +59 -0
- package/dist/composables/use-fetch.js +273 -0
- package/dist/composables/use-form.d.ts +91 -0
- package/dist/composables/use-form.js +112 -0
- package/dist/composables/use-fullscreen.d.ts +47 -0
- package/dist/composables/use-fullscreen.js +110 -0
- package/dist/composables/use-geolocation.d.ts +62 -0
- package/dist/composables/use-geolocation.js +101 -0
- package/dist/composables/use-idle.d.ts +102 -0
- package/dist/composables/use-idle.js +182 -0
- package/dist/composables/use-intersection-observer.d.ts +83 -0
- package/dist/composables/use-intersection-observer.js +168 -0
- package/dist/composables/use-keyboard.d.ts +100 -0
- package/dist/composables/use-keyboard.js +224 -0
- package/dist/composables/use-media-query.d.ts +56 -0
- package/dist/composables/use-media-query.js +62 -0
- package/dist/composables/use-meta.d.ts +35 -0
- package/dist/composables/use-meta.js +48 -0
- package/dist/composables/use-mouse.d.ts +65 -0
- package/dist/composables/use-mouse.js +286 -0
- package/dist/composables/use-mutation-observer.d.ts +101 -0
- package/dist/composables/use-mutation-observer.js +129 -0
- package/dist/composables/use-network.d.ts +40 -0
- package/dist/composables/use-network.js +85 -0
- package/dist/composables/use-notification.d.ts +98 -0
- package/dist/composables/use-notification.js +94 -0
- package/dist/composables/use-permissions.d.ts +119 -0
- package/dist/composables/use-permissions.js +132 -0
- package/dist/composables/use-query.d.ts +48 -0
- package/dist/composables/use-query.js +0 -0
- package/dist/composables/use-resize-observer.d.ts +60 -0
- package/dist/composables/use-resize-observer.js +157 -0
- package/dist/composables/use-router.d.ts +80 -0
- package/dist/composables/use-router.js +105 -0
- package/dist/composables/use-scroll-lock.d.ts +13 -0
- package/dist/composables/use-scroll-lock.js +55 -0
- package/dist/composables/use-share.d.ts +74 -0
- package/dist/composables/use-share.js +104 -0
- package/dist/composables/use-speech.d.ts +117 -0
- package/dist/composables/use-speech.js +294 -0
- package/dist/composables/use-storage.d.ts +69 -0
- package/dist/composables/use-storage.js +196 -0
- package/dist/composables/use-text-selection.d.ts +121 -0
- package/dist/composables/use-text-selection.js +205 -0
- package/dist/composables/use-timer.d.ts +92 -0
- package/dist/composables/use-timer.js +193 -0
- package/dist/composables/use-utilities.d.ts +103 -0
- package/dist/composables/use-utilities.js +176 -0
- package/dist/composables/use-wake-lock.d.ts +85 -0
- package/dist/composables/use-wake-lock.js +122 -0
- package/dist/composables/use-websocket.d.ts +70 -0
- package/dist/composables/use-websocket.js +165 -0
- package/dist/composables/use-window.d.ts +84 -0
- package/dist/composables/use-window.js +163 -0
- package/dist/composables.d.ts +287 -0
- package/dist/composables.js +562 -0
- package/dist/composition-api.d.ts +197 -0
- package/dist/composition-api.js +199 -0
- package/dist/compression.d.ts +30 -0
- package/dist/compression.js +107 -0
- package/dist/computed.d.ts +138 -0
- package/dist/computed.js +382 -0
- package/dist/conditionals.d.ts +48 -0
- package/dist/conditionals.js +626 -0
- package/dist/config.d.ts +77 -0
- package/dist/config.js +828 -0
- package/dist/cookie-serialize.d.ts +40 -0
- package/dist/cookie-serialize.js +18 -0
- package/dist/craft-bridge.d.ts +525 -0
- package/dist/craft-bridge.js +511 -0
- package/dist/craft-compiler.d.ts +245 -0
- package/dist/craft-compiler.js +810 -0
- package/dist/craft-components.d.ts +739 -0
- package/dist/craft-components.js +1074 -0
- package/dist/craft-entry.d.ts +6 -0
- package/dist/craft-entry.js +9 -0
- package/dist/craft-ssr.d.ts +147 -0
- package/dist/craft-ssr.js +559 -0
- package/dist/craft.js +9 -0
- package/dist/csp.d.ts +295 -0
- package/dist/csp.js +220 -0
- package/dist/csrf.d.ts +38 -0
- package/dist/csrf.js +38 -0
- package/dist/custom-directives.d.ts +5 -0
- package/dist/custom-directives.js +136 -0
- package/dist/database.d.ts +391 -0
- package/dist/database.js +5 -0
- package/dist/defer.d.ts +28 -0
- package/dist/defer.js +156 -0
- package/dist/deploy/config-generators.d.ts +75 -0
- package/dist/deploy/config-generators.js +214 -0
- package/dist/deploy/index.d.ts +88 -0
- package/dist/deploy/index.js +203 -0
- package/dist/deploy/netlify.d.ts +109 -0
- package/dist/deploy/netlify.js +167 -0
- package/dist/desktop.d.ts +16 -0
- package/dist/desktop.js +1 -0
- package/dist/dev-server/index.d.ts +22 -0
- package/dist/dev-server/index.js +7 -0
- package/dist/dev-server/keyboard-shortcuts.d.ts +34 -0
- package/dist/dev-server/keyboard-shortcuts.js +81 -0
- package/dist/dev-server/native-window.d.ts +59 -0
- package/dist/dev-server/native-window.js +91 -0
- package/dist/dev-server/port-utils.d.ts +27 -0
- package/dist/dev-server/port-utils.js +40 -0
- package/dist/dev-server/serve-app.d.ts +15 -0
- package/dist/dev-server/serve-app.js +727 -0
- package/dist/dev-server/serve-file.d.ts +3 -0
- package/dist/dev-server/serve-file.js +443 -0
- package/dist/dev-server/serve-markdown.d.ts +3 -0
- package/dist/dev-server/serve-markdown.js +284 -0
- package/dist/dev-server/serve-multi.d.ts +5 -0
- package/dist/dev-server/serve-multi.js +596 -0
- package/dist/dev-server/terminal-colors.d.ts +56 -0
- package/dist/dev-server/terminal-colors.js +45 -0
- package/dist/dev-server/theme-selector.d.ts +32 -0
- package/dist/dev-server/theme-selector.js +111 -0
- package/dist/dev-server/ts-css.d.ts +108 -0
- package/dist/dev-server/ts-css.js +438 -0
- package/dist/dev-server/types.d.ts +99 -0
- package/dist/dev-server/types.js +43 -0
- package/dist/dev-server.d.ts +6 -0
- package/dist/dev-server.js +4 -0
- package/dist/devtools.d.ts +182 -0
- package/dist/devtools.js +593 -0
- package/dist/directive-api.d.ts +154 -0
- package/dist/directive-api.js +355 -0
- package/dist/docs.d.ts +56 -0
- package/dist/docs.js +567 -0
- package/dist/doctor.d.ts +29 -0
- package/dist/doctor.js +123 -0
- package/dist/document-shell.d.ts +218 -0
- package/dist/document-shell.js +338 -0
- package/dist/dynamic-components.d.ts +23 -0
- package/dist/dynamic-components.js +197 -0
- package/dist/edge-runtime.d.ts +193 -0
- package/dist/edge-runtime.js +525 -0
- package/dist/env.d.ts +3 -0
- package/dist/env.js +9 -0
- package/dist/error-boundaries.d.ts +78 -0
- package/dist/error-boundaries.js +281 -0
- package/dist/error-handling.d.ts +14 -0
- package/dist/error-handling.js +1 -0
- package/dist/errors/codes.d.ts +92 -0
- package/dist/errors/codes.js +97 -0
- package/dist/errors/formatter.d.ts +84 -0
- package/dist/errors/formatter.js +196 -0
- package/dist/errors/index.d.ts +12 -0
- package/dist/errors/index.js +44 -0
- package/dist/errors/logger.d.ts +135 -0
- package/dist/errors/logger.js +250 -0
- package/dist/errors/sanitizer.d.ts +73 -0
- package/dist/errors/sanitizer.js +181 -0
- package/dist/errors/types.d.ts +92 -0
- package/dist/errors/types.js +86 -0
- package/dist/events.d.ts +145 -0
- package/dist/events.js +396 -0
- package/dist/expressions.d.ts +180 -0
- package/dist/expressions.js +719 -0
- package/dist/find-body-tag.d.ts +50 -0
- package/dist/find-body-tag.js +57 -0
- package/dist/formatter.d.ts +19 -0
- package/dist/formatter.js +265 -0
- package/dist/forms-validation.d.ts +189 -0
- package/dist/forms-validation.js +421 -0
- package/dist/forms.d.ts +224 -0
- package/dist/forms.js +729 -0
- package/dist/fragment-container.d.ts +57 -0
- package/dist/fragment-container.js +123 -0
- package/dist/framework-composables.d.ts +73 -0
- package/dist/framework-composables.js +126 -0
- package/dist/head-injection.d.ts +61 -0
- package/dist/head-injection.js +28 -0
- package/dist/head.d.ts +282 -0
- package/dist/head.js +231 -0
- package/dist/heatmap.d.ts +206 -0
- package/dist/heatmap.js +566 -0
- package/dist/hot-reload.d.ts +87 -0
- package/dist/hot-reload.js +373 -0
- package/dist/html-masking.d.ts +125 -0
- package/dist/html-masking.js +196 -0
- package/dist/hydration-runtime.d.ts +44 -0
- package/dist/hydration-runtime.js +195 -0
- package/dist/hydration.d.ts +135 -0
- package/dist/hydration.js +654 -0
- package/dist/i18n.d.ts +342 -0
- package/dist/i18n.js +678 -0
- package/dist/image-optimization/auto-sibling.d.ts +42 -0
- package/dist/image-optimization/auto-sibling.js +88 -0
- package/dist/image-optimization/build-plugin.d.ts +54 -0
- package/dist/image-optimization/build-plugin.js +241 -0
- package/dist/image-optimization/component.d.ts +46 -0
- package/dist/image-optimization/component.js +244 -0
- package/dist/image-optimization/directive.d.ts +30 -0
- package/dist/image-optimization/directive.js +203 -0
- package/dist/image-optimization/index.d.ts +156 -0
- package/dist/image-optimization/index.js +54 -0
- package/dist/image-optimization/processor.d.ts +140 -0
- package/dist/image-optimization/processor.js +262 -0
- package/dist/image-optimization/serve.d.ts +54 -0
- package/dist/image-optimization/serve.js +102 -0
- package/dist/import-rebase.d.ts +16 -0
- package/dist/import-rebase.js +16 -0
- package/dist/imported-signals.d.ts +43 -0
- package/dist/imported-signals.js +35 -0
- package/dist/includes.d.ts +171 -0
- package/dist/includes.js +764 -0
- package/dist/index.d.ts +365 -0
- package/dist/index.js +202 -0
- package/dist/init.d.ts +39 -0
- package/dist/init.js +505 -0
- package/dist/inline-assets.d.ts +28 -0
- package/dist/inline-assets.js +82 -0
- package/dist/interactive.d.ts +14 -0
- package/dist/interactive.js +383 -0
- package/dist/internal-markdown.d.ts +22 -0
- package/dist/internal-markdown.js +141 -0
- package/dist/island-chunking.d.ts +48 -0
- package/dist/island-chunking.js +52 -0
- package/dist/isolated-build.d.ts +12 -0
- package/dist/isolated-build.js +18 -0
- package/dist/js-ts.d.ts +10 -0
- package/dist/js-ts.js +60 -0
- package/dist/jsx-runtime.d.ts +92 -0
- package/dist/jsx-runtime.js +289 -0
- package/dist/keep-alive.d.ts +108 -0
- package/dist/keep-alive.js +421 -0
- package/dist/layout-types.d.ts +45 -0
- package/dist/layout-types.js +56 -0
- package/dist/lazy-loader.d.ts +90 -0
- package/dist/lazy-loader.js +245 -0
- package/dist/lazy-module.d.ts +11 -0
- package/dist/lazy-module.js +18 -0
- package/dist/loading-indicator.d.ts +50 -0
- package/dist/loading-indicator.js +322 -0
- package/dist/loops.d.ts +91 -0
- package/dist/loops.js +690 -0
- package/dist/manifest.d.ts +41 -0
- package/dist/manifest.js +31 -0
- package/dist/markdown-view.d.ts +25 -0
- package/dist/markdown-view.js +39 -0
- package/dist/markdown.d.ts +10 -0
- package/dist/markdown.js +68 -0
- package/dist/media/client/blur-up.d.ts +66 -0
- package/dist/media/client/blur-up.js +217 -0
- package/dist/media/client/index.d.ts +93 -0
- package/dist/media/client/index.js +53 -0
- package/dist/media/client/lazy-load.d.ts +74 -0
- package/dist/media/client/lazy-load.js +283 -0
- package/dist/media/client/upload-handler.d.ts +80 -0
- package/dist/media/client/upload-handler.js +354 -0
- package/dist/media/image/component.d.ts +60 -0
- package/dist/media/image/component.js +574 -0
- package/dist/media/image/directive.d.ts +23 -0
- package/dist/media/image/directive.js +160 -0
- package/dist/media/image/editing.d.ts +212 -0
- package/dist/media/image/editing.js +193 -0
- package/dist/media/image/index.d.ts +142 -0
- package/dist/media/image/index.js +80 -0
- package/dist/media/image/placeholder.d.ts +89 -0
- package/dist/media/image/placeholder.js +188 -0
- package/dist/media/image/processor/cache.d.ts +53 -0
- package/dist/media/image/processor/cache.js +51 -0
- package/dist/media/image/processor/index.d.ts +11 -0
- package/dist/media/image/processor/index.js +3 -0
- package/dist/media/image/processor/optimizer.d.ts +24 -0
- package/dist/media/image/processor/optimizer.js +202 -0
- package/dist/media/image/processor/responsive.d.ts +28 -0
- package/dist/media/image/processor/responsive.js +162 -0
- package/dist/media/image/srcset.d.ts +157 -0
- package/dist/media/image/srcset.js +194 -0
- package/dist/media/index.d.ts +331 -0
- package/dist/media/index.js +198 -0
- package/dist/media/manager/embed.d.ts +25 -0
- package/dist/media/manager/embed.js +253 -0
- package/dist/media/protected/component.d.ts +33 -0
- package/dist/media/protected/component.js +235 -0
- package/dist/media/protected/index.d.ts +47 -0
- package/dist/media/protected/index.js +20 -0
- package/dist/media/protected/signature.d.ts +72 -0
- package/dist/media/protected/signature.js +205 -0
- package/dist/media/shared/cache.d.ts +76 -0
- package/dist/media/shared/cache.js +132 -0
- package/dist/media/shared/hash.d.ts +31 -0
- package/dist/media/shared/hash.js +35 -0
- package/dist/media/shared/index.d.ts +7 -0
- package/dist/media/shared/index.js +2 -0
- package/dist/media/types.d.ts +1477 -0
- package/dist/media/types.js +0 -0
- package/dist/media/upload/component.d.ts +9 -0
- package/dist/media/upload/component.js +320 -0
- package/dist/media/upload/index.d.ts +8 -0
- package/dist/media/upload/index.js +1 -0
- package/dist/media/video/directive.d.ts +23 -0
- package/dist/media/video/directive.js +142 -0
- package/dist/media/video/index.d.ts +76 -0
- package/dist/media/video/index.js +583 -0
- package/dist/media/video/processor/cache.d.ts +55 -0
- package/dist/media/video/processor/cache.js +52 -0
- package/dist/media/video/processor/index.d.ts +12 -0
- package/dist/media/video/processor/index.js +4 -0
- package/dist/media/video/processor/streaming.d.ts +26 -0
- package/dist/media/video/processor/streaming.js +197 -0
- package/dist/media/video/processor/thumbnail.d.ts +35 -0
- package/dist/media/video/processor/thumbnail.js +134 -0
- package/dist/media/video/processor/transcoder.d.ts +19 -0
- package/dist/media/video/processor/transcoder.js +283 -0
- package/dist/menubar.d.ts +65 -0
- package/dist/menubar.js +99 -0
- package/dist/method-spoofing.d.ts +20 -0
- package/dist/method-spoofing.js +17 -0
- package/dist/middleware.d.ts +112 -0
- package/dist/middleware.js +40 -0
- package/dist/misc-directives.d.ts +55 -0
- package/dist/misc-directives.js +328 -0
- package/dist/native-build.d.ts +88 -0
- package/dist/native-build.js +575 -0
- package/dist/owned-routes.d.ts +42 -0
- package/dist/owned-routes.js +26 -0
- package/dist/page-action.d.ts +73 -0
- package/dist/page-action.js +91 -0
- package/dist/page-meta.d.ts +38 -0
- package/dist/page-meta.js +16 -0
- package/dist/page-response.d.ts +120 -0
- package/dist/page-response.js +117 -0
- package/dist/parser/directive-parser.d.ts +119 -0
- package/dist/parser/directive-parser.js +249 -0
- package/dist/parser/expression-parser.d.ts +58 -0
- package/dist/parser/expression-parser.js +358 -0
- package/dist/parser/index.d.ts +13 -0
- package/dist/parser/index.js +23 -0
- package/dist/parser/tokenizer.d.ts +77 -0
- package/dist/parser/tokenizer.js +534 -0
- package/dist/partial-hydration.d.ts +123 -0
- package/dist/partial-hydration.js +427 -0
- package/dist/performance-utils.d.ts +318 -0
- package/dist/performance-utils.js +466 -0
- package/dist/placeholder.d.ts +54 -0
- package/dist/placeholder.js +35 -0
- package/dist/plugin-system.d.ts +301 -0
- package/dist/plugin-system.js +214 -0
- package/dist/plugin.d.ts +3 -0
- package/dist/plugin.js +174 -0
- package/dist/precompiler.d.ts +43 -0
- package/dist/precompiler.js +670 -0
- package/dist/process.d.ts +16 -0
- package/dist/process.js +879 -0
- package/dist/production-build.d.ts +163 -0
- package/dist/production-build.js +596 -0
- package/dist/production-builder.d.ts +42 -0
- package/dist/production-builder.js +146 -0
- package/dist/production-server.d.ts +19 -0
- package/dist/production-server.js +208 -0
- package/dist/prop-sentinels.d.ts +31 -0
- package/dist/prop-sentinels.js +7 -0
- package/dist/props.d.ts +216 -0
- package/dist/props.js +224 -0
- package/dist/public-env.d.ts +29 -0
- package/dist/public-env.js +19 -0
- package/dist/pwa/audit.d.ts +42 -0
- package/dist/pwa/audit.js +255 -0
- package/dist/pwa/directives.d.ts +38 -0
- package/dist/pwa/directives.js +332 -0
- package/dist/pwa/icons.d.ts +42 -0
- package/dist/pwa/icons.js +109 -0
- package/dist/pwa/index.d.ts +104 -0
- package/dist/pwa/index.js +47 -0
- package/dist/pwa/inject.d.ts +32 -0
- package/dist/pwa/inject.js +102 -0
- package/dist/pwa/manifest.d.ts +104 -0
- package/dist/pwa/manifest.js +186 -0
- package/dist/pwa/offline.d.ts +8 -0
- package/dist/pwa/offline.js +259 -0
- package/dist/pwa/precache.d.ts +35 -0
- package/dist/pwa/precache.js +116 -0
- package/dist/pwa/service-worker.d.ts +33 -0
- package/dist/pwa/service-worker.js +860 -0
- package/dist/pwa/workbox-strategies.d.ts +100 -0
- package/dist/pwa/workbox-strategies.js +167 -0
- package/dist/pwa/workbox.d.ts +51 -0
- package/dist/pwa/workbox.js +382 -0
- package/dist/pwa.d.ts +52 -0
- package/dist/pwa.js +236 -0
- package/dist/reactive-bindings.d.ts +47 -0
- package/dist/reactive-bindings.js +268 -0
- package/dist/reactive-tracking.d.ts +81 -0
- package/dist/reactive-tracking.js +49 -0
- package/dist/reactive.d.ts +117 -0
- package/dist/reactive.js +593 -0
- package/dist/reactivity.d.ts +206 -0
- package/dist/reactivity.js +574 -0
- package/dist/release.d.ts +1 -0
- package/dist/release.js +1 -0
- package/dist/render-memo.d.ts +40 -0
- package/dist/render-memo.js +33 -0
- package/dist/render.d.ts +54 -0
- package/dist/render.js +153 -0
- package/dist/resolve-stx-targets.d.ts +49 -0
- package/dist/resolve-stx-targets.js +38 -0
- package/dist/route-middleware.d.ts +2 -0
- package/dist/route-middleware.js +17 -0
- package/dist/route-types.d.ts +134 -0
- package/dist/route-types.js +24 -0
- package/dist/router.d.ts +9 -0
- package/dist/router.js +9 -0
- package/dist/routes.d.ts +6 -0
- package/dist/routes.js +14 -0
- package/dist/runtime-globals.d.ts +236 -0
- package/dist/runtime-globals.js +230 -0
- package/dist/runtime-injection.d.ts +113 -0
- package/dist/runtime-injection.js +156 -0
- package/dist/runtime.d.ts +140 -0
- package/dist/runtime.js +94 -0
- package/dist/safe-evaluator.d.ts +165 -0
- package/dist/safe-evaluator.js +461 -0
- package/dist/scaffolding.d.ts +113 -0
- package/dist/scaffolding.js +897 -0
- package/dist/screenshot.d.ts +22 -0
- package/dist/screenshot.js +100 -0
- package/dist/script-classifier.d.ts +41 -0
- package/dist/script-classifier.js +51 -0
- package/dist/script-emit.d.ts +50 -0
- package/dist/script-emit.js +11 -0
- package/dist/script-json.d.ts +36 -0
- package/dist/script-json.js +6 -0
- package/dist/script-validation.d.ts +26 -0
- package/dist/script-validation.js +179 -0
- package/dist/seo.d.ts +225 -0
- package/dist/seo.js +486 -0
- package/dist/serve.d.ts +44 -0
- package/dist/serve.js +233 -0
- package/dist/server-bindings.d.ts +39 -0
- package/dist/server-bindings.js +171 -0
- package/dist/server-components.d.ts +138 -0
- package/dist/server-components.js +427 -0
- package/dist/sfc-template.d.ts +17 -0
- package/dist/sfc-template.js +32 -0
- package/dist/signal-processing.d.ts +222 -0
- package/dist/signal-processing.js +1081 -0
- package/dist/signals-api.d.ts +459 -0
- package/dist/signals-api.js +172 -0
- package/dist/signals.d.ts +41 -0
- package/dist/signals.js +8233 -0
- package/dist/site-builder/build.d.ts +18 -0
- package/dist/site-builder/build.js +252 -0
- package/dist/site-builder/i18n.d.ts +104 -0
- package/dist/site-builder/i18n.js +150 -0
- package/dist/site-builder/index.d.ts +27 -0
- package/dist/site-builder/index.js +16 -0
- package/dist/site-builder/robots.d.ts +2 -0
- package/dist/site-builder/robots.js +26 -0
- package/dist/site-builder/router.d.ts +10 -0
- package/dist/site-builder/router.js +27 -0
- package/dist/site-builder/seo.d.ts +8 -0
- package/dist/site-builder/seo.js +67 -0
- package/dist/site-builder/sitemap.d.ts +10 -0
- package/dist/site-builder/sitemap.js +26 -0
- package/dist/site-builder/theme.d.ts +12 -0
- package/dist/site-builder/theme.js +38 -0
- package/dist/site-builder/types.d.ts +74 -0
- package/dist/site-builder/types.js +0 -0
- package/dist/site-url.d.ts +46 -0
- package/dist/site-url.js +70 -0
- package/dist/slots.d.ts +129 -0
- package/dist/slots.js +286 -0
- package/dist/source-maps.d.ts +98 -0
- package/dist/source-maps.js +350 -0
- package/dist/source-signature.d.ts +45 -0
- package/dist/source-signature.js +20 -0
- package/dist/spa-nav.d.ts +49 -0
- package/dist/spa-nav.js +12 -0
- package/dist/spa-shell.d.ts +21 -0
- package/dist/spa-shell.js +34 -0
- package/dist/ssg.d.ts +357 -0
- package/dist/ssg.js +94 -0
- package/dist/ssr.d.ts +116 -0
- package/dist/ssr.js +339 -0
- package/dist/state-dir.d.ts +36 -0
- package/dist/state-dir.js +22 -0
- package/dist/state-management.d.ts +299 -0
- package/dist/state-management.js +519 -0
- package/dist/store-imports.d.ts +47 -0
- package/dist/store-imports.js +16 -0
- package/dist/store-loader.d.ts +15 -0
- package/dist/store-loader.js +111 -0
- package/dist/stores-client.d.ts +70 -0
- package/dist/stores-client.js +132 -0
- package/dist/story/addons.d.ts +123 -0
- package/dist/story/addons.js +261 -0
- package/dist/story/analytics.d.ts +163 -0
- package/dist/story/analytics.js +235 -0
- package/dist/story/auto-stories.d.ts +38 -0
- package/dist/story/auto-stories.js +158 -0
- package/dist/story/bookmarks.d.ts +102 -0
- package/dist/story/bookmarks.js +277 -0
- package/dist/story/bun-test.d.ts +45 -0
- package/dist/story/bun-test.js +102 -0
- package/dist/story/cli.d.ts +132 -0
- package/dist/story/cli.js +155 -0
- package/dist/story/collect/analyzer.d.ts +33 -0
- package/dist/story/collect/analyzer.js +305 -0
- package/dist/story/collect/index.d.ts +31 -0
- package/dist/story/collect/index.js +27 -0
- package/dist/story/collect/parser.d.ts +17 -0
- package/dist/story/collect/parser.js +129 -0
- package/dist/story/collect/scanner.d.ts +17 -0
- package/dist/story/collect/scanner.js +101 -0
- package/dist/story/collect/tree.d.ts +24 -0
- package/dist/story/collect/tree.js +110 -0
- package/dist/story/commands/build.d.ts +19 -0
- package/dist/story/commands/build.js +172 -0
- package/dist/story/commands/dev.d.ts +23 -0
- package/dist/story/commands/dev.js +78 -0
- package/dist/story/commands/index.d.ts +9 -0
- package/dist/story/commands/index.js +3 -0
- package/dist/story/commands/preview.d.ts +21 -0
- package/dist/story/commands/preview.js +56 -0
- package/dist/story/compiled-output.d.ts +27 -0
- package/dist/story/compiled-output.js +151 -0
- package/dist/story/composition.d.ts +47 -0
- package/dist/story/composition.js +261 -0
- package/dist/story/config-watcher.d.ts +33 -0
- package/dist/story/config-watcher.js +67 -0
- package/dist/story/config.d.ts +29 -0
- package/dist/story/config.js +64 -0
- package/dist/story/context.d.ts +27 -0
- package/dist/story/context.js +27 -0
- package/dist/story/controls/index.d.ts +54 -0
- package/dist/story/controls/index.js +320 -0
- package/dist/story/desktop-preview.d.ts +34 -0
- package/dist/story/desktop-preview.js +105 -0
- package/dist/story/docs-generator.d.ts +30 -0
- package/dist/story/docs-generator.js +187 -0
- package/dist/story/errors.d.ts +47 -0
- package/dist/story/errors.js +239 -0
- package/dist/story/figma-export.d.ts +169 -0
- package/dist/story/figma-export.js +224 -0
- package/dist/story/generator.d.ts +21 -0
- package/dist/story/generator.js +165 -0
- package/dist/story/hmr.d.ts +62 -0
- package/dist/story/hmr.js +131 -0
- package/dist/story/hot-swap.d.ts +46 -0
- package/dist/story/hot-swap.js +207 -0
- package/dist/story/index.d.ts +99 -0
- package/dist/story/index.js +49 -0
- package/dist/story/interactions.d.ts +53 -0
- package/dist/story/interactions.js +225 -0
- package/dist/story/keyboard-shortcuts.d.ts +39 -0
- package/dist/story/keyboard-shortcuts.js +345 -0
- package/dist/story/output.d.ts +115 -0
- package/dist/story/output.js +153 -0
- package/dist/story/performance.d.ts +129 -0
- package/dist/story/performance.js +252 -0
- package/dist/story/presets.d.ts +123 -0
- package/dist/story/presets.js +289 -0
- package/dist/story/props-validation.d.ts +45 -0
- package/dist/story/props-validation.js +215 -0
- package/dist/story/renderer.d.ts +69 -0
- package/dist/story/renderer.js +209 -0
- package/dist/story/search-index.d.ts +47 -0
- package/dist/story/search-index.js +106 -0
- package/dist/story/search.d.ts +56 -0
- package/dist/story/search.js +140 -0
- package/dist/story/server.d.ts +31 -0
- package/dist/story/server.js +965 -0
- package/dist/story/setup.d.ts +56 -0
- package/dist/story/setup.js +78 -0
- package/dist/story/snapshots.d.ts +65 -0
- package/dist/story/snapshots.js +171 -0
- package/dist/story/testing.d.ts +83 -0
- package/dist/story/testing.js +164 -0
- package/dist/story/theme.d.ts +68 -0
- package/dist/story/theme.js +170 -0
- package/dist/story/ts-css.d.ts +29 -0
- package/dist/story/ts-css.js +189 -0
- package/dist/story/types.d.ts +342 -0
- package/dist/story/types.js +0 -0
- package/dist/story/ui/code-panel.d.ts +43 -0
- package/dist/story/ui/code-panel.js +175 -0
- package/dist/story/ui/controls-panel.d.ts +25 -0
- package/dist/story/ui/controls-panel.js +168 -0
- package/dist/story/ui/index.d.ts +8 -0
- package/dist/story/ui/index.js +4 -0
- package/dist/story/ui/navigation.d.ts +55 -0
- package/dist/story/ui/navigation.js +250 -0
- package/dist/story/ui/preview.d.ts +46 -0
- package/dist/story/ui/preview.js +251 -0
- package/dist/story/visual-testing.d.ts +45 -0
- package/dist/story/visual-testing.js +248 -0
- package/dist/streaming.d.ts +238 -0
- package/dist/streaming.js +537 -0
- package/dist/strict-lint.d.ts +52 -0
- package/dist/strict-lint.js +269 -0
- package/dist/strip-literals.d.ts +40 -0
- package/dist/strip-literals.js +149 -0
- package/dist/stx-virtual-ts.d.ts +358 -0
- package/dist/stx-virtual-ts.js +670 -0
- package/dist/stx.d.ts +924 -0
- package/dist/style-scoping.d.ts +42 -0
- package/dist/style-scoping.js +82 -0
- package/dist/suspense.d.ts +98 -0
- package/dist/suspense.js +398 -0
- package/dist/teleport.d.ts +31 -0
- package/dist/teleport.js +109 -0
- package/dist/template-compiler.d.ts +33 -0
- package/dist/template-compiler.js +68 -0
- package/dist/template-hydrator.d.ts +28 -0
- package/dist/template-hydrator.js +95 -0
- package/dist/template-tag-balance.d.ts +32 -0
- package/dist/template-tag-balance.js +93 -0
- package/dist/testing.d.ts +330 -0
- package/dist/testing.js +588 -0
- package/dist/theme-tokens.d.ts +88 -0
- package/dist/theme-tokens.js +71 -0
- package/dist/transitions.d.ts +99 -0
- package/dist/transitions.js +443 -0
- package/dist/ts-css-config.d.ts +71 -0
- package/dist/ts-css-config.js +44 -0
- package/dist/type-checker.d.ts +85 -0
- package/dist/type-checker.js +581 -0
- package/dist/typecheck.d.ts +70 -0
- package/dist/typecheck.js +365 -0
- package/dist/types/component-types.d.ts +248 -0
- package/dist/types/component-types.js +0 -0
- package/dist/types/config-types.d.ts +938 -0
- package/dist/types/config-types.js +0 -0
- package/dist/types/context-types.d.ts +122 -0
- package/dist/types/context-types.js +0 -0
- package/dist/types/csp-types.d.ts +83 -0
- package/dist/types/csp-types.js +0 -0
- package/dist/types/directive-types.d.ts +315 -0
- package/dist/types/directive-types.js +3 -0
- package/dist/types/index.d.ts +20 -0
- package/dist/types/index.js +1 -0
- package/dist/types/pwa-types.d.ts +338 -0
- package/dist/types/pwa-types.js +0 -0
- package/dist/types.d.ts +27 -0
- package/dist/types.js +1 -0
- package/dist/typescript-templates.d.ts +156 -0
- package/dist/typescript-templates.js +386 -0
- package/dist/unresolved-identifiers.d.ts +52 -0
- package/dist/unresolved-identifiers.js +148 -0
- package/dist/utils.d.ts +112 -0
- package/dist/utils.js +1170 -0
- package/dist/validator.d.ts +80 -0
- package/dist/validator.js +171 -0
- package/dist/variable-extractor.d.ts +142 -0
- package/dist/variable-extractor.js +1306 -0
- package/dist/view-composers.d.ts +171 -0
- package/dist/view-composers.js +29 -0
- package/dist/virtual-scrolling.d.ts +127 -0
- package/dist/virtual-scrolling.js +454 -0
- package/dist/visual-editor.d.ts +185 -0
- package/dist/visual-editor.js +735 -0
- package/dist/visual-testing.d.ts +135 -0
- package/dist/visual-testing.js +126 -0
- package/dist/vue-template.d.ts +39 -0
- package/dist/vue-template.js +476 -0
- package/dist/web-components/css-scoping.d.ts +64 -0
- package/dist/web-components/css-scoping.js +210 -0
- package/dist/web-components/index.d.ts +29 -0
- package/dist/web-components/index.js +13 -0
- package/dist/web-components/reactive-generator.d.ts +72 -0
- package/dist/web-components/reactive-generator.js +484 -0
- package/dist/web-components.d.ts +253 -0
- package/dist/web-components.js +1466 -0
- package/dist/x-element.d.ts +42 -0
- package/dist/x-element.js +301 -0
- package/package.json +107 -0
- package/stx.d.ts +924 -0
|
@@ -0,0 +1,1477 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* STX Media Module Types
|
|
3
|
+
*
|
|
4
|
+
* Comprehensive type definitions for responsive images, video,
|
|
5
|
+
* content protection, file upload, and media management.
|
|
6
|
+
*
|
|
7
|
+
* @module media/types
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Placeholder generation strategies for lazy loading
|
|
11
|
+
*/
|
|
12
|
+
export type PlaceholderStrategy = 'blur' | 'thumbhash' | 'blurhash' | 'pixelate' | 'dominant-color' | 'none';
|
|
13
|
+
/**
|
|
14
|
+
* Options for placeholder generation
|
|
15
|
+
*/
|
|
16
|
+
export interface PlaceholderOptions {
|
|
17
|
+
/** Strategy for generating placeholder */
|
|
18
|
+
strategy: PlaceholderStrategy;
|
|
19
|
+
/** Width of placeholder image (default: 20) */
|
|
20
|
+
width?: number;
|
|
21
|
+
/** Height of placeholder image */
|
|
22
|
+
height?: number;
|
|
23
|
+
/** Quality for blur strategy (1-100) */
|
|
24
|
+
quality?: number;
|
|
25
|
+
/** Blur level for blur strategy (0-100) */
|
|
26
|
+
blurLevel?: number;
|
|
27
|
+
/** CSS transition duration in ms */
|
|
28
|
+
transitionDuration?: number;
|
|
29
|
+
/** CSS transition easing function */
|
|
30
|
+
easing?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Result from placeholder generation
|
|
34
|
+
*/
|
|
35
|
+
export interface PlaceholderResult {
|
|
36
|
+
/** Base64 data URL for the placeholder */
|
|
37
|
+
dataURL: string;
|
|
38
|
+
/** Placeholder width */
|
|
39
|
+
width: number;
|
|
40
|
+
/** Placeholder height */
|
|
41
|
+
height: number;
|
|
42
|
+
/** Original image aspect ratio */
|
|
43
|
+
aspectRatio: number;
|
|
44
|
+
/** Original image width */
|
|
45
|
+
originalWidth: number;
|
|
46
|
+
/** Original image height */
|
|
47
|
+
originalHeight: number;
|
|
48
|
+
/** Strategy used */
|
|
49
|
+
strategy: PlaceholderStrategy;
|
|
50
|
+
/** Dominant color (for dominant-color strategy) */
|
|
51
|
+
dominantColor?: string;
|
|
52
|
+
/** Optional CSS for the placeholder */
|
|
53
|
+
css?: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Supported image formats
|
|
57
|
+
*/
|
|
58
|
+
export type ImageFormat = 'webp' | 'avif' | 'jpeg' | 'png' | 'gif';
|
|
59
|
+
/**
|
|
60
|
+
* Image fit modes (similar to CSS object-fit)
|
|
61
|
+
*/
|
|
62
|
+
export type ImageFit = 'clip' | 'crop' | 'fill' | 'max' | 'min' | 'scale' | 'cover' | 'contain';
|
|
63
|
+
/**
|
|
64
|
+
* Image crop positions
|
|
65
|
+
*/
|
|
66
|
+
export type ImageCrop = 'top' | 'bottom' | 'left' | 'right' | 'center' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'faces' | 'entropy';
|
|
67
|
+
/**
|
|
68
|
+
* imgix-style image transformation parameters
|
|
69
|
+
*/
|
|
70
|
+
export interface ImageParams {
|
|
71
|
+
/** Width in pixels */
|
|
72
|
+
w?: number;
|
|
73
|
+
/** Height in pixels */
|
|
74
|
+
h?: number;
|
|
75
|
+
/** Fit mode */
|
|
76
|
+
fit?: ImageFit;
|
|
77
|
+
/** Crop position */
|
|
78
|
+
crop?: ImageCrop;
|
|
79
|
+
/** Aspect ratio (e.g., "16:9") */
|
|
80
|
+
ar?: string;
|
|
81
|
+
/** Output format */
|
|
82
|
+
fm?: ImageFormat;
|
|
83
|
+
/** Quality (1-100) */
|
|
84
|
+
q?: number;
|
|
85
|
+
/** Lossless compression */
|
|
86
|
+
lossless?: boolean;
|
|
87
|
+
/** Progressive rendering */
|
|
88
|
+
progressive?: boolean;
|
|
89
|
+
/** Blur radius (0-2000) */
|
|
90
|
+
blur?: number;
|
|
91
|
+
/** Sharpen amount (0-100) */
|
|
92
|
+
sharp?: number;
|
|
93
|
+
/** Brightness (-100 to 100) */
|
|
94
|
+
bri?: number;
|
|
95
|
+
/** Contrast (-100 to 100) */
|
|
96
|
+
con?: number;
|
|
97
|
+
/** Saturation (-100 to 100) */
|
|
98
|
+
sat?: number;
|
|
99
|
+
/** Hue rotation (0-360) */
|
|
100
|
+
hue?: number;
|
|
101
|
+
/** Exposure (-100 to 100) */
|
|
102
|
+
exp?: number;
|
|
103
|
+
/** Vibrance (-100 to 100) */
|
|
104
|
+
vib?: number;
|
|
105
|
+
/** Highlight (-100 to 100) */
|
|
106
|
+
high?: number;
|
|
107
|
+
/** Shadow (-100 to 100) */
|
|
108
|
+
shad?: number;
|
|
109
|
+
/** Gamma (0.1 to 10) */
|
|
110
|
+
gam?: number;
|
|
111
|
+
/** Rotation degrees (0-359) */
|
|
112
|
+
rot?: number;
|
|
113
|
+
/** Flip: h (horizontal), v (vertical), hv (both) */
|
|
114
|
+
flip?: 'h' | 'v' | 'hv';
|
|
115
|
+
/** Orientation (auto-rotate based on EXIF) */
|
|
116
|
+
orient?: number;
|
|
117
|
+
/** Watermark image URL */
|
|
118
|
+
mark?: string;
|
|
119
|
+
/** Watermark X position */
|
|
120
|
+
markx?: number;
|
|
121
|
+
/** Watermark Y position */
|
|
122
|
+
marky?: number;
|
|
123
|
+
/** Watermark opacity (0-1) */
|
|
124
|
+
markalpha?: number;
|
|
125
|
+
/** Watermark scale (0-1) */
|
|
126
|
+
markscale?: number;
|
|
127
|
+
/** Watermark alignment */
|
|
128
|
+
markalign?: 'top' | 'middle' | 'bottom' | 'left' | 'center' | 'right';
|
|
129
|
+
/** Apply sepia tone (0-100) */
|
|
130
|
+
sepia?: number;
|
|
131
|
+
/** Apply pixelate effect (1-100) */
|
|
132
|
+
px?: number;
|
|
133
|
+
/** Monochrome with tint color */
|
|
134
|
+
mono?: string;
|
|
135
|
+
/** Duotone colors (highlight,shadow) */
|
|
136
|
+
duotone?: string;
|
|
137
|
+
/** Invert colors */
|
|
138
|
+
invert?: boolean;
|
|
139
|
+
/** Auto-enhance: format, compress, enhance */
|
|
140
|
+
auto?: string | string[];
|
|
141
|
+
/** Device pixel ratio (1-5) */
|
|
142
|
+
dpr?: number;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Image variant generated at a specific size/format
|
|
146
|
+
*/
|
|
147
|
+
export interface ImageVariant {
|
|
148
|
+
/** Output file path */
|
|
149
|
+
path: string;
|
|
150
|
+
/** URL for srcset */
|
|
151
|
+
url: string;
|
|
152
|
+
/** Width in pixels */
|
|
153
|
+
width: number;
|
|
154
|
+
/** Height in pixels */
|
|
155
|
+
height: number;
|
|
156
|
+
/** Output format */
|
|
157
|
+
format: ImageFormat;
|
|
158
|
+
/** File size in bytes */
|
|
159
|
+
size: number;
|
|
160
|
+
/** Device pixel ratio (for DPR-based srcsets) */
|
|
161
|
+
dpr?: number;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Processed image with all variants
|
|
165
|
+
*/
|
|
166
|
+
export interface ProcessedImage {
|
|
167
|
+
/** Original source path */
|
|
168
|
+
src: string;
|
|
169
|
+
/** Generated variants */
|
|
170
|
+
variants: ImageVariant[];
|
|
171
|
+
/** Placeholder data */
|
|
172
|
+
placeholder?: PlaceholderResult;
|
|
173
|
+
/** Original width */
|
|
174
|
+
width: number;
|
|
175
|
+
/** Original height */
|
|
176
|
+
height: number;
|
|
177
|
+
/** Aspect ratio */
|
|
178
|
+
aspectRatio: number;
|
|
179
|
+
/** Content hash for caching */
|
|
180
|
+
hash: string;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* <Img> component props
|
|
184
|
+
*/
|
|
185
|
+
export interface ImgProps {
|
|
186
|
+
/** Image source URL or path */
|
|
187
|
+
src: string;
|
|
188
|
+
/** Alternative text (required for accessibility) */
|
|
189
|
+
alt: string;
|
|
190
|
+
/** Display width */
|
|
191
|
+
width?: number | string;
|
|
192
|
+
/** Display height */
|
|
193
|
+
height?: number | string;
|
|
194
|
+
/** Responsive sizes attribute */
|
|
195
|
+
sizes?: string;
|
|
196
|
+
/** Custom breakpoint widths for srcset */
|
|
197
|
+
widths?: number[];
|
|
198
|
+
/** Device pixel ratios for fixed-width images */
|
|
199
|
+
dpr?: number[];
|
|
200
|
+
/** Output formats (default: ['avif', 'webp', 'jpeg']) */
|
|
201
|
+
formats?: ImageFormat[];
|
|
202
|
+
/** Output quality (1-100) */
|
|
203
|
+
quality?: number;
|
|
204
|
+
/** imgix-style transformation params */
|
|
205
|
+
params?: ImageParams;
|
|
206
|
+
/** Placeholder strategy */
|
|
207
|
+
placeholder?: PlaceholderStrategy;
|
|
208
|
+
/** Placeholder options */
|
|
209
|
+
placeholderOptions?: Partial<PlaceholderOptions>;
|
|
210
|
+
/** Enable lazy loading (default: true) */
|
|
211
|
+
lazy?: boolean;
|
|
212
|
+
/** High priority (preload, fetchpriority=high) */
|
|
213
|
+
priority?: boolean;
|
|
214
|
+
/** Loading attribute */
|
|
215
|
+
loading?: 'lazy' | 'eager';
|
|
216
|
+
/** Decoding hint */
|
|
217
|
+
decoding?: 'sync' | 'async' | 'auto';
|
|
218
|
+
/** Fetch priority */
|
|
219
|
+
fetchpriority?: 'high' | 'low' | 'auto';
|
|
220
|
+
/** Object fit */
|
|
221
|
+
objectFit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
222
|
+
/** Object position */
|
|
223
|
+
objectPosition?: string;
|
|
224
|
+
/** CSS class */
|
|
225
|
+
class?: string;
|
|
226
|
+
/** Inline styles */
|
|
227
|
+
style?: string;
|
|
228
|
+
/** ID attribute */
|
|
229
|
+
id?: string;
|
|
230
|
+
/** Data attributes */
|
|
231
|
+
data?: Record<string, string>;
|
|
232
|
+
/** Cross-origin setting */
|
|
233
|
+
crossorigin?: 'anonymous' | 'use-credentials';
|
|
234
|
+
/** Referrer policy */
|
|
235
|
+
referrerpolicy?: string;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* @img directive options
|
|
239
|
+
*/
|
|
240
|
+
export interface ImgDirectiveOptions extends Omit<ImgProps, 'src' | 'alt'> {
|
|
241
|
+
/** Custom srcset string (overrides auto-generation) */
|
|
242
|
+
srcset?: string;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Image render context
|
|
246
|
+
*/
|
|
247
|
+
export interface ImageRenderContext {
|
|
248
|
+
/** Pre-processed image data */
|
|
249
|
+
processedImage?: ProcessedImage;
|
|
250
|
+
/** Whether optimization is enabled */
|
|
251
|
+
optimize?: boolean;
|
|
252
|
+
/** Development mode flag */
|
|
253
|
+
isDev?: boolean;
|
|
254
|
+
/** Base URL for generated images */
|
|
255
|
+
baseUrl?: string;
|
|
256
|
+
/** Output directory */
|
|
257
|
+
outputDir?: string;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Image render result
|
|
261
|
+
*/
|
|
262
|
+
export interface ImageRenderResult {
|
|
263
|
+
/** Generated HTML */
|
|
264
|
+
html: string;
|
|
265
|
+
/** Preload link tag (for priority images) */
|
|
266
|
+
preloadLink?: string;
|
|
267
|
+
/** CSS for placeholder */
|
|
268
|
+
css?: string;
|
|
269
|
+
/** Client-side script */
|
|
270
|
+
script?: string;
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Video source definition
|
|
274
|
+
*/
|
|
275
|
+
export interface VideoSource {
|
|
276
|
+
/** Video URL */
|
|
277
|
+
src: string;
|
|
278
|
+
/** MIME type (e.g., 'video/mp4') */
|
|
279
|
+
type: string;
|
|
280
|
+
/** Media query for adaptive sources */
|
|
281
|
+
media?: string;
|
|
282
|
+
/** Codec specification */
|
|
283
|
+
codecs?: string;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Video embed type
|
|
287
|
+
*/
|
|
288
|
+
export type VideoEmbedType = 'video' | 'youtube' | 'vimeo' | 'dailymotion' | 'twitch';
|
|
289
|
+
/**
|
|
290
|
+
* Plyr.js control options
|
|
291
|
+
*/
|
|
292
|
+
export type PlyrControl = 'play-large' | 'restart' | 'rewind' | 'play' | 'fast-forward' | 'progress' | 'current-time' | 'duration' | 'mute' | 'volume' | 'captions' | 'settings' | 'pip' | 'airplay' | 'fullscreen';
|
|
293
|
+
/**
|
|
294
|
+
* Plyr.js configuration options
|
|
295
|
+
*/
|
|
296
|
+
export interface PlyrOptions {
|
|
297
|
+
/** Enable/disable controls */
|
|
298
|
+
controls?: PlyrControl[] | boolean;
|
|
299
|
+
/** Autoplay on load */
|
|
300
|
+
autoplay?: boolean;
|
|
301
|
+
/** Mute by default */
|
|
302
|
+
muted?: boolean;
|
|
303
|
+
/** Loop playback */
|
|
304
|
+
loop?: {
|
|
305
|
+
active: boolean;
|
|
306
|
+
};
|
|
307
|
+
/** Seek time in seconds */
|
|
308
|
+
seekTime?: number;
|
|
309
|
+
/** Volume (0-1) */
|
|
310
|
+
volume?: number;
|
|
311
|
+
/** Click to play/pause */
|
|
312
|
+
clickToPlay?: boolean;
|
|
313
|
+
/** Hide controls timeout (ms) */
|
|
314
|
+
hideControls?: number;
|
|
315
|
+
/** Reset to start when playback ends */
|
|
316
|
+
resetOnEnd?: boolean;
|
|
317
|
+
/** Disable context menu */
|
|
318
|
+
disableContextMenu?: boolean;
|
|
319
|
+
/** Keyboard shortcuts */
|
|
320
|
+
keyboard?: {
|
|
321
|
+
focused: boolean;
|
|
322
|
+
global: boolean;
|
|
323
|
+
};
|
|
324
|
+
/** Tooltips */
|
|
325
|
+
tooltips?: {
|
|
326
|
+
controls: boolean;
|
|
327
|
+
seek: boolean;
|
|
328
|
+
};
|
|
329
|
+
/** Quality selector options */
|
|
330
|
+
quality?: {
|
|
331
|
+
default: number;
|
|
332
|
+
options: number[];
|
|
333
|
+
forced: boolean;
|
|
334
|
+
};
|
|
335
|
+
/** Captions settings */
|
|
336
|
+
captions?: {
|
|
337
|
+
active: boolean;
|
|
338
|
+
language: string;
|
|
339
|
+
update: boolean;
|
|
340
|
+
};
|
|
341
|
+
/** Storage settings */
|
|
342
|
+
storage?: {
|
|
343
|
+
enabled: boolean;
|
|
344
|
+
key: string;
|
|
345
|
+
};
|
|
346
|
+
/** Speed settings */
|
|
347
|
+
speed?: {
|
|
348
|
+
selected: number;
|
|
349
|
+
options: number[];
|
|
350
|
+
};
|
|
351
|
+
/** Ratio for responsive sizing */
|
|
352
|
+
ratio?: string;
|
|
353
|
+
/** Full screen settings */
|
|
354
|
+
fullscreen?: {
|
|
355
|
+
enabled: boolean;
|
|
356
|
+
fallback: boolean;
|
|
357
|
+
iosNative: boolean;
|
|
358
|
+
};
|
|
359
|
+
/** Preview thumbnails */
|
|
360
|
+
previewThumbnails?: {
|
|
361
|
+
enabled: boolean;
|
|
362
|
+
src: string;
|
|
363
|
+
};
|
|
364
|
+
/** i18n strings */
|
|
365
|
+
i18n?: Record<string, string>;
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* <Video> component props
|
|
369
|
+
*/
|
|
370
|
+
export interface VideoProps {
|
|
371
|
+
/** Video source URL */
|
|
372
|
+
src?: string;
|
|
373
|
+
/** Multiple video sources */
|
|
374
|
+
sources?: VideoSource[];
|
|
375
|
+
/** Poster image URL */
|
|
376
|
+
poster?: string;
|
|
377
|
+
/** Placeholder for poster image */
|
|
378
|
+
posterPlaceholder?: PlaceholderStrategy;
|
|
379
|
+
/** Show controls */
|
|
380
|
+
controls?: boolean;
|
|
381
|
+
/** Autoplay on load */
|
|
382
|
+
autoplay?: boolean;
|
|
383
|
+
/** Mute audio */
|
|
384
|
+
muted?: boolean;
|
|
385
|
+
/** Loop playback */
|
|
386
|
+
loop?: boolean;
|
|
387
|
+
/** Preload behavior */
|
|
388
|
+
preload?: 'none' | 'metadata' | 'auto';
|
|
389
|
+
/** Inline playback (iOS) */
|
|
390
|
+
playsinline?: boolean;
|
|
391
|
+
/** Enable lazy loading */
|
|
392
|
+
lazy?: boolean;
|
|
393
|
+
/** Video player type */
|
|
394
|
+
player?: 'native' | 'plyr' | 'ts-video';
|
|
395
|
+
/** Video title for accessibility and metadata */
|
|
396
|
+
title?: string;
|
|
397
|
+
/** Plyr.js options */
|
|
398
|
+
plyrOptions?: PlyrOptions;
|
|
399
|
+
/** Embed type */
|
|
400
|
+
type?: VideoEmbedType;
|
|
401
|
+
/** Width */
|
|
402
|
+
width?: number | string;
|
|
403
|
+
/** Height */
|
|
404
|
+
height?: number | string;
|
|
405
|
+
/** CSS class */
|
|
406
|
+
class?: string;
|
|
407
|
+
/** Inline styles */
|
|
408
|
+
style?: string;
|
|
409
|
+
/** ID attribute */
|
|
410
|
+
id?: string;
|
|
411
|
+
/** Cross-origin setting */
|
|
412
|
+
crossorigin?: 'anonymous' | 'use-credentials';
|
|
413
|
+
/** Disable picture-in-picture */
|
|
414
|
+
disablePictureInPicture?: boolean;
|
|
415
|
+
/** Disable remote playback */
|
|
416
|
+
disableRemotePlayback?: boolean;
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* @video directive options
|
|
420
|
+
*/
|
|
421
|
+
export interface VideoDirectiveOptions extends Omit<VideoProps, 'src'> {
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* Video render result
|
|
425
|
+
*/
|
|
426
|
+
export interface VideoRenderResult {
|
|
427
|
+
/** Generated HTML */
|
|
428
|
+
html: string;
|
|
429
|
+
/** Script tags for player initialization */
|
|
430
|
+
script?: string;
|
|
431
|
+
/** CSS styles */
|
|
432
|
+
css?: string;
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* File validation result
|
|
436
|
+
*/
|
|
437
|
+
export interface FileValidationResult {
|
|
438
|
+
/** Whether the file is valid */
|
|
439
|
+
valid: boolean;
|
|
440
|
+
/** Error message if invalid */
|
|
441
|
+
error?: string;
|
|
442
|
+
/** Validation error code */
|
|
443
|
+
code?: 'INVALID_TYPE' | 'FILE_TOO_LARGE' | 'FILE_TOO_SMALL' | 'INVALID_DIMENSIONS';
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* Upload progress information
|
|
447
|
+
*/
|
|
448
|
+
export interface UploadProgress {
|
|
449
|
+
/** File being uploaded */
|
|
450
|
+
file: File;
|
|
451
|
+
/** Bytes loaded */
|
|
452
|
+
loaded: number;
|
|
453
|
+
/** Total bytes */
|
|
454
|
+
total: number;
|
|
455
|
+
/** Percentage complete (0-100) */
|
|
456
|
+
percent: number;
|
|
457
|
+
/** Upload speed in bytes/sec */
|
|
458
|
+
speed?: number;
|
|
459
|
+
/** Estimated time remaining in ms */
|
|
460
|
+
timeRemaining?: number;
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* Upload result
|
|
464
|
+
*/
|
|
465
|
+
export interface UploadResult {
|
|
466
|
+
/** Whether upload succeeded */
|
|
467
|
+
success: boolean;
|
|
468
|
+
/** Uploaded file URL */
|
|
469
|
+
url?: string;
|
|
470
|
+
/** File ID from server */
|
|
471
|
+
id?: string;
|
|
472
|
+
/** File name */
|
|
473
|
+
name?: string;
|
|
474
|
+
/** File size */
|
|
475
|
+
size?: number;
|
|
476
|
+
/** MIME type */
|
|
477
|
+
type?: string;
|
|
478
|
+
/** Error message if failed */
|
|
479
|
+
error?: string;
|
|
480
|
+
/** Error code */
|
|
481
|
+
errorCode?: string;
|
|
482
|
+
/** Server response data */
|
|
483
|
+
data?: Record<string, unknown>;
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* Upload configuration
|
|
487
|
+
*/
|
|
488
|
+
export interface UploadConfig {
|
|
489
|
+
/** Upload endpoint URL */
|
|
490
|
+
endpoint: string;
|
|
491
|
+
/** HTTP method (default: POST) */
|
|
492
|
+
method?: 'POST' | 'PUT' | 'PATCH';
|
|
493
|
+
/** Request headers */
|
|
494
|
+
headers?: Record<string, string>;
|
|
495
|
+
/** Form field name (default: 'file') */
|
|
496
|
+
fieldName?: string;
|
|
497
|
+
/** Maximum file size in bytes */
|
|
498
|
+
maxSize?: number;
|
|
499
|
+
/** Minimum file size in bytes */
|
|
500
|
+
minSize?: number;
|
|
501
|
+
/** Maximum number of files */
|
|
502
|
+
maxFiles?: number;
|
|
503
|
+
/** Accepted MIME types */
|
|
504
|
+
accept?: string[];
|
|
505
|
+
/** Chunk size for chunked uploads (bytes) */
|
|
506
|
+
chunkSize?: number;
|
|
507
|
+
/** Number of retry attempts */
|
|
508
|
+
retries?: number;
|
|
509
|
+
/** Timeout in ms */
|
|
510
|
+
timeout?: number;
|
|
511
|
+
/** With credentials (cookies) */
|
|
512
|
+
withCredentials?: boolean;
|
|
513
|
+
/** Additional form data */
|
|
514
|
+
formData?: Record<string, string>;
|
|
515
|
+
/** Validate image dimensions */
|
|
516
|
+
validateDimensions?: {
|
|
517
|
+
minWidth?: number;
|
|
518
|
+
maxWidth?: number;
|
|
519
|
+
minHeight?: number;
|
|
520
|
+
maxHeight?: number;
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* <MediaUpload> component props
|
|
525
|
+
*/
|
|
526
|
+
export interface MediaUploadProps extends UploadConfig {
|
|
527
|
+
/** Show file preview */
|
|
528
|
+
preview?: boolean;
|
|
529
|
+
/** Enable drag and drop */
|
|
530
|
+
dropzone?: boolean;
|
|
531
|
+
/** Multiple file selection */
|
|
532
|
+
multiple?: boolean;
|
|
533
|
+
/** Auto-upload on file selection */
|
|
534
|
+
autoUpload?: boolean;
|
|
535
|
+
/** Show progress bar */
|
|
536
|
+
showProgress?: boolean;
|
|
537
|
+
/** Disabled state */
|
|
538
|
+
disabled?: boolean;
|
|
539
|
+
/** CSS class */
|
|
540
|
+
class?: string;
|
|
541
|
+
/** Inline styles */
|
|
542
|
+
style?: string;
|
|
543
|
+
/** ID attribute */
|
|
544
|
+
id?: string;
|
|
545
|
+
/** Placeholder text */
|
|
546
|
+
placeholder?: string;
|
|
547
|
+
/** Label text */
|
|
548
|
+
label?: string;
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* @upload directive options
|
|
552
|
+
*/
|
|
553
|
+
export interface UploadDirectiveOptions extends Omit<MediaUploadProps, 'endpoint'> {
|
|
554
|
+
/** Progress callback variable name */
|
|
555
|
+
onProgress?: string;
|
|
556
|
+
/** Complete callback variable name */
|
|
557
|
+
onComplete?: string;
|
|
558
|
+
/** Error callback variable name */
|
|
559
|
+
onError?: string;
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* Signed URL result
|
|
563
|
+
*/
|
|
564
|
+
export interface SignedUrl {
|
|
565
|
+
/** Signed URL */
|
|
566
|
+
url: string;
|
|
567
|
+
/** Signature token */
|
|
568
|
+
signature: string;
|
|
569
|
+
/** Expiration timestamp (ms) */
|
|
570
|
+
expires: number;
|
|
571
|
+
/** Whether URL is one-time use */
|
|
572
|
+
oneTimeUse?: boolean;
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* Signature request configuration
|
|
576
|
+
*/
|
|
577
|
+
export interface SignatureConfig {
|
|
578
|
+
/** Signature endpoint URL */
|
|
579
|
+
endpoint: string;
|
|
580
|
+
/** HTTP method (default: POST) */
|
|
581
|
+
method?: 'GET' | 'POST';
|
|
582
|
+
/** Request headers */
|
|
583
|
+
headers?: Record<string, string>;
|
|
584
|
+
/** Expiration time in seconds */
|
|
585
|
+
expirationSeconds?: number;
|
|
586
|
+
/** Generate one-time use URL */
|
|
587
|
+
oneTimeUse?: boolean;
|
|
588
|
+
/** Custom parameters to include */
|
|
589
|
+
params?: Record<string, unknown>;
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* Batch signature request
|
|
593
|
+
*/
|
|
594
|
+
export interface BatchSignatureRequest {
|
|
595
|
+
/** Array of source URLs to sign */
|
|
596
|
+
sources: string[];
|
|
597
|
+
/** Signature configuration */
|
|
598
|
+
config: SignatureConfig;
|
|
599
|
+
}
|
|
600
|
+
/**
|
|
601
|
+
* Batch signature result
|
|
602
|
+
*/
|
|
603
|
+
export interface BatchSignatureResult {
|
|
604
|
+
/** Map of source URL to signed URL */
|
|
605
|
+
signatures: Map<string, SignedUrl>;
|
|
606
|
+
/** Sources that failed to sign */
|
|
607
|
+
errors: Map<string, string>;
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* Protected media authentication context
|
|
611
|
+
*/
|
|
612
|
+
export interface ProtectedAuthContext {
|
|
613
|
+
/** Required role */
|
|
614
|
+
role?: string;
|
|
615
|
+
/** Required permission */
|
|
616
|
+
permission?: string;
|
|
617
|
+
/** User ID (for ownership check) */
|
|
618
|
+
userId?: string;
|
|
619
|
+
/** Custom auth function */
|
|
620
|
+
check?: () => boolean | Promise<boolean>;
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* <ProtectedImg> component props
|
|
624
|
+
*/
|
|
625
|
+
export interface ProtectedMediaProps {
|
|
626
|
+
/** Source URL (to be signed) */
|
|
627
|
+
src: string;
|
|
628
|
+
/** Alternative text */
|
|
629
|
+
alt?: string;
|
|
630
|
+
/** Signature endpoint */
|
|
631
|
+
signatureEndpoint?: string;
|
|
632
|
+
/** Signature configuration */
|
|
633
|
+
signatureConfig?: Partial<SignatureConfig>;
|
|
634
|
+
/** Authentication context */
|
|
635
|
+
auth?: ProtectedAuthContext;
|
|
636
|
+
/** Fallback image if unauthorized */
|
|
637
|
+
fallback?: string;
|
|
638
|
+
/** One-time use URL */
|
|
639
|
+
oneTimeUse?: boolean;
|
|
640
|
+
/** CSS class */
|
|
641
|
+
class?: string;
|
|
642
|
+
/** Inline styles */
|
|
643
|
+
style?: string;
|
|
644
|
+
}
|
|
645
|
+
/**
|
|
646
|
+
* @protected directive options
|
|
647
|
+
*/
|
|
648
|
+
export interface ProtectedDirectiveOptions extends Omit<ProtectedMediaProps, 'src' | 'alt'> {
|
|
649
|
+
}
|
|
650
|
+
/**
|
|
651
|
+
* Media manager configuration
|
|
652
|
+
*/
|
|
653
|
+
export interface MediaManagerConfig {
|
|
654
|
+
/** CDN script URL */
|
|
655
|
+
src: string;
|
|
656
|
+
/** API key */
|
|
657
|
+
apiKey?: string;
|
|
658
|
+
/** Storage bucket */
|
|
659
|
+
bucket?: string;
|
|
660
|
+
/** Allowed file types */
|
|
661
|
+
allowedTypes?: string[];
|
|
662
|
+
/** Maximum file size */
|
|
663
|
+
maxFileSize?: number;
|
|
664
|
+
/** Allow multiple selection */
|
|
665
|
+
multiple?: boolean;
|
|
666
|
+
/** Custom styling */
|
|
667
|
+
customStyles?: Record<string, string>;
|
|
668
|
+
/** Callback variable names */
|
|
669
|
+
callbacks?: {
|
|
670
|
+
onSelect?: string;
|
|
671
|
+
onUpload?: string;
|
|
672
|
+
onDelete?: string;
|
|
673
|
+
onError?: string;
|
|
674
|
+
};
|
|
675
|
+
}
|
|
676
|
+
/**
|
|
677
|
+
* Media item from manager
|
|
678
|
+
*/
|
|
679
|
+
export interface MediaItem {
|
|
680
|
+
/** Unique ID */
|
|
681
|
+
id: string;
|
|
682
|
+
/** File URL */
|
|
683
|
+
url: string;
|
|
684
|
+
/** File name */
|
|
685
|
+
name: string;
|
|
686
|
+
/** MIME type */
|
|
687
|
+
type: string;
|
|
688
|
+
/** File size in bytes */
|
|
689
|
+
size: number;
|
|
690
|
+
/** Width (for images/videos) */
|
|
691
|
+
width?: number;
|
|
692
|
+
/** Height (for images/videos) */
|
|
693
|
+
height?: number;
|
|
694
|
+
/** Duration in seconds (for audio/video) */
|
|
695
|
+
duration?: number;
|
|
696
|
+
/** Creation timestamp */
|
|
697
|
+
createdAt: string;
|
|
698
|
+
/** Last modified timestamp */
|
|
699
|
+
updatedAt: string;
|
|
700
|
+
/** Custom metadata */
|
|
701
|
+
metadata?: Record<string, unknown>;
|
|
702
|
+
}
|
|
703
|
+
/**
|
|
704
|
+
* Image optimization configuration
|
|
705
|
+
*/
|
|
706
|
+
export interface MediaImageConfig {
|
|
707
|
+
/** Enable image optimization */
|
|
708
|
+
enabled?: boolean;
|
|
709
|
+
/** Default breakpoint widths */
|
|
710
|
+
defaultWidths?: number[];
|
|
711
|
+
/** Default output formats */
|
|
712
|
+
defaultFormats?: ImageFormat[];
|
|
713
|
+
/** Default quality (1-100) */
|
|
714
|
+
defaultQuality?: number;
|
|
715
|
+
/** Default placeholder strategy */
|
|
716
|
+
placeholderStrategy?: PlaceholderStrategy;
|
|
717
|
+
/** Lazy load by default */
|
|
718
|
+
lazyByDefault?: boolean;
|
|
719
|
+
/** URL-based editing endpoint */
|
|
720
|
+
editingEndpoint?: string | null;
|
|
721
|
+
/** Output directory for generated images */
|
|
722
|
+
outputDir?: string;
|
|
723
|
+
/** Base URL for generated images */
|
|
724
|
+
baseUrl?: string;
|
|
725
|
+
/** Enable device pixel ratio handling */
|
|
726
|
+
enableDpr?: boolean;
|
|
727
|
+
/** Default DPR values */
|
|
728
|
+
defaultDpr?: number[];
|
|
729
|
+
/** ts-images integration configuration */
|
|
730
|
+
tsImages?: Record<string, unknown>;
|
|
731
|
+
/**
|
|
732
|
+
* Auto-discover .webp / .avif siblings next to plain <img src="*.jpg">
|
|
733
|
+
* references in rendered HTML and wrap them in <picture> with <source>
|
|
734
|
+
* entries for each format that actually exists on disk. Works for ANY
|
|
735
|
+
* <img> tag without consumers having to change anything — drop the
|
|
736
|
+
* optimized format next to the original asset and capable browsers
|
|
737
|
+
* pick it up.
|
|
738
|
+
*
|
|
739
|
+
* Disabled by default (off-spec content negotiation has a non-zero cost
|
|
740
|
+
* on every render). Opt in via:
|
|
741
|
+
*
|
|
742
|
+
* media: { image: { autoSiblings: true } }
|
|
743
|
+
*/
|
|
744
|
+
autoSiblings?: boolean;
|
|
745
|
+
}
|
|
746
|
+
/**
|
|
747
|
+
* Video configuration
|
|
748
|
+
*/
|
|
749
|
+
export interface MediaVideoConfig {
|
|
750
|
+
/** Enable video features */
|
|
751
|
+
enabled?: boolean;
|
|
752
|
+
/** Plyr.js CDN version */
|
|
753
|
+
plyrVersion?: string;
|
|
754
|
+
/** Plyr.js theme URL */
|
|
755
|
+
plyrTheme?: string;
|
|
756
|
+
/** Lazy load videos by default */
|
|
757
|
+
lazyByDefault?: boolean;
|
|
758
|
+
/** Default controls for native player */
|
|
759
|
+
defaultControls?: boolean;
|
|
760
|
+
/** Default Plyr options */
|
|
761
|
+
defaultPlyrOptions?: Partial<PlyrOptions>;
|
|
762
|
+
/** ts-videos integration configuration */
|
|
763
|
+
tsVideos?: Record<string, unknown>;
|
|
764
|
+
}
|
|
765
|
+
/**
|
|
766
|
+
* Upload configuration
|
|
767
|
+
*/
|
|
768
|
+
export interface MediaUploadConfig {
|
|
769
|
+
/** Enable upload features */
|
|
770
|
+
enabled?: boolean;
|
|
771
|
+
/** Default upload endpoint */
|
|
772
|
+
defaultEndpoint?: string;
|
|
773
|
+
/** Default max file size (bytes) */
|
|
774
|
+
maxSize?: number;
|
|
775
|
+
/** Allowed file types */
|
|
776
|
+
allowedTypes?: string[];
|
|
777
|
+
/** Chunk size for large uploads */
|
|
778
|
+
chunkSize?: number;
|
|
779
|
+
/** Maximum concurrent uploads */
|
|
780
|
+
maxConcurrent?: number;
|
|
781
|
+
}
|
|
782
|
+
/**
|
|
783
|
+
* Protected media configuration
|
|
784
|
+
*/
|
|
785
|
+
export interface MediaProtectedConfig {
|
|
786
|
+
/** Enable protected media */
|
|
787
|
+
enabled?: boolean;
|
|
788
|
+
/** Default signature endpoint */
|
|
789
|
+
signatureEndpoint?: string;
|
|
790
|
+
/** Default expiration time (seconds) */
|
|
791
|
+
expirationSeconds?: number;
|
|
792
|
+
/** Batch signature request size */
|
|
793
|
+
batchSize?: number;
|
|
794
|
+
}
|
|
795
|
+
/**
|
|
796
|
+
* Media cache configuration
|
|
797
|
+
*/
|
|
798
|
+
export interface MediaCacheConfig {
|
|
799
|
+
/** Enable caching */
|
|
800
|
+
enabled?: boolean;
|
|
801
|
+
/** Cache directory */
|
|
802
|
+
directory?: string;
|
|
803
|
+
/** Max cache age in days */
|
|
804
|
+
maxAge?: number;
|
|
805
|
+
/** Max cache size in MB */
|
|
806
|
+
maxSize?: number;
|
|
807
|
+
}
|
|
808
|
+
/**
|
|
809
|
+
* Complete media module configuration
|
|
810
|
+
*/
|
|
811
|
+
export interface MediaConfig {
|
|
812
|
+
/** Enable media module */
|
|
813
|
+
enabled?: boolean;
|
|
814
|
+
/** Image configuration */
|
|
815
|
+
image?: MediaImageConfig;
|
|
816
|
+
/** Video configuration */
|
|
817
|
+
video?: MediaVideoConfig;
|
|
818
|
+
/** Upload configuration */
|
|
819
|
+
upload?: MediaUploadConfig;
|
|
820
|
+
/** Protected media configuration */
|
|
821
|
+
protected?: MediaProtectedConfig;
|
|
822
|
+
/** Cache configuration */
|
|
823
|
+
cache?: MediaCacheConfig;
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* Lazy load observer options
|
|
827
|
+
*/
|
|
828
|
+
export interface LazyLoadOptions {
|
|
829
|
+
/** Root element for intersection observer */
|
|
830
|
+
root?: Element | null;
|
|
831
|
+
/** Root margin */
|
|
832
|
+
rootMargin?: string;
|
|
833
|
+
/** Intersection threshold(s) */
|
|
834
|
+
threshold?: number | number[];
|
|
835
|
+
/** Use native loading="lazy" when supported */
|
|
836
|
+
useNative?: boolean;
|
|
837
|
+
}
|
|
838
|
+
/**
|
|
839
|
+
* Blur-up animation options
|
|
840
|
+
*/
|
|
841
|
+
export interface BlurUpOptions {
|
|
842
|
+
/** Transition duration in ms */
|
|
843
|
+
duration?: number;
|
|
844
|
+
/** CSS easing function */
|
|
845
|
+
easing?: string;
|
|
846
|
+
/** Remove placeholder after load */
|
|
847
|
+
removePlaceholder?: boolean;
|
|
848
|
+
/** Class to add when loaded */
|
|
849
|
+
loadedClass?: string;
|
|
850
|
+
}
|
|
851
|
+
/**
|
|
852
|
+
* Breakpoint definition for responsive images
|
|
853
|
+
*/
|
|
854
|
+
export interface Breakpoint {
|
|
855
|
+
/** Breakpoint name (e.g., 'sm', 'md', 'lg') */
|
|
856
|
+
name: string;
|
|
857
|
+
/** Min-width in pixels */
|
|
858
|
+
minWidth?: number;
|
|
859
|
+
/** Max-width in pixels */
|
|
860
|
+
maxWidth?: number;
|
|
861
|
+
/** Image width at this breakpoint */
|
|
862
|
+
imageWidth: number | string;
|
|
863
|
+
}
|
|
864
|
+
/**
|
|
865
|
+
* Srcset generation options
|
|
866
|
+
*/
|
|
867
|
+
export interface SrcsetOptions {
|
|
868
|
+
/** Source image path */
|
|
869
|
+
src: string;
|
|
870
|
+
/** Widths for width-based srcset */
|
|
871
|
+
widths?: number[];
|
|
872
|
+
/** DPR values for fixed-width srcset */
|
|
873
|
+
dprValues?: number[];
|
|
874
|
+
/** Fixed width (enables DPR-based srcset) */
|
|
875
|
+
fixedWidth?: number;
|
|
876
|
+
/** Output formats */
|
|
877
|
+
formats?: ImageFormat[];
|
|
878
|
+
/** Base URL for paths */
|
|
879
|
+
baseUrl?: string;
|
|
880
|
+
/** Image transformation params */
|
|
881
|
+
params?: ImageParams;
|
|
882
|
+
}
|
|
883
|
+
/**
|
|
884
|
+
* Generated srcset data
|
|
885
|
+
*/
|
|
886
|
+
export interface SrcsetData {
|
|
887
|
+
/** Srcset string */
|
|
888
|
+
srcset: string;
|
|
889
|
+
/** Format this srcset is for */
|
|
890
|
+
format: ImageFormat;
|
|
891
|
+
/** MIME type */
|
|
892
|
+
mimeType: string;
|
|
893
|
+
/** Array of variants included */
|
|
894
|
+
variants: ImageVariant[];
|
|
895
|
+
}
|
|
896
|
+
/**
|
|
897
|
+
* Image optimization presets for ts-images
|
|
898
|
+
*/
|
|
899
|
+
export type ImageOptimizationPreset = 'web' | 'quality' | 'performance';
|
|
900
|
+
/**
|
|
901
|
+
* Image transformation types supported by ts-images
|
|
902
|
+
*/
|
|
903
|
+
export type ImageTransformation = 'resize' | 'blur' | 'sharpen' | 'grayscale' | 'rotate' | 'flip' | 'flop' | 'brightness' | 'contrast' | 'saturation';
|
|
904
|
+
/**
|
|
905
|
+
* Watermark position options
|
|
906
|
+
*/
|
|
907
|
+
export type WatermarkPosition = 'center' | 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
908
|
+
/**
|
|
909
|
+
* Watermark configuration
|
|
910
|
+
*/
|
|
911
|
+
export interface WatermarkConfig {
|
|
912
|
+
/** Watermark image path */
|
|
913
|
+
image?: string;
|
|
914
|
+
/** Watermark text */
|
|
915
|
+
text?: string;
|
|
916
|
+
/** Position of the watermark */
|
|
917
|
+
position?: WatermarkPosition;
|
|
918
|
+
/** Opacity (0-1) */
|
|
919
|
+
opacity?: number;
|
|
920
|
+
/** Scale factor (0-1) */
|
|
921
|
+
scale?: number;
|
|
922
|
+
/** Font for text watermark */
|
|
923
|
+
font?: string;
|
|
924
|
+
/** Font size for text watermark */
|
|
925
|
+
fontSize?: number;
|
|
926
|
+
/** Color for text watermark */
|
|
927
|
+
color?: string;
|
|
928
|
+
}
|
|
929
|
+
/**
|
|
930
|
+
* Art direction configuration for responsive images
|
|
931
|
+
*/
|
|
932
|
+
export interface ArtDirectionConfig {
|
|
933
|
+
/** Media query (e.g., "(max-width: 768px)") */
|
|
934
|
+
media: string;
|
|
935
|
+
/** Source image for this breakpoint */
|
|
936
|
+
src: string;
|
|
937
|
+
/** Optional specific widths for this breakpoint */
|
|
938
|
+
widths?: number[];
|
|
939
|
+
/** Optional crop settings for this breakpoint */
|
|
940
|
+
crop?: ImageCrop;
|
|
941
|
+
/** Optional aspect ratio override */
|
|
942
|
+
aspectRatio?: string;
|
|
943
|
+
}
|
|
944
|
+
/**
|
|
945
|
+
* Image transformation configuration
|
|
946
|
+
*/
|
|
947
|
+
export interface ImageTransformationConfig {
|
|
948
|
+
/** Type of transformation */
|
|
949
|
+
type: ImageTransformation;
|
|
950
|
+
/** Transformation-specific options */
|
|
951
|
+
options?: {
|
|
952
|
+
width?: number;
|
|
953
|
+
height?: number;
|
|
954
|
+
fit?: ImageFit;
|
|
955
|
+
sigma?: number;
|
|
956
|
+
amount?: number;
|
|
957
|
+
angle?: number;
|
|
958
|
+
value?: number;
|
|
959
|
+
};
|
|
960
|
+
}
|
|
961
|
+
/**
|
|
962
|
+
* Format-specific quality settings for ts-images
|
|
963
|
+
*/
|
|
964
|
+
export interface FormatQualitySettings {
|
|
965
|
+
/** JPEG optimization settings */
|
|
966
|
+
jpeg?: {
|
|
967
|
+
/** Quality (1-100) */
|
|
968
|
+
quality?: number;
|
|
969
|
+
/** Use MozJPEG encoder */
|
|
970
|
+
mozjpeg?: boolean;
|
|
971
|
+
/** Chroma subsampling */
|
|
972
|
+
chromaSubsampling?: '4:4:4' | '4:2:2' | '4:2:0';
|
|
973
|
+
/** Progressive encoding */
|
|
974
|
+
progressive?: boolean;
|
|
975
|
+
/** Optimize Huffman coding */
|
|
976
|
+
optimizeCoding?: boolean;
|
|
977
|
+
};
|
|
978
|
+
/** PNG optimization settings */
|
|
979
|
+
png?: {
|
|
980
|
+
/** Quality (1-100) */
|
|
981
|
+
quality?: number;
|
|
982
|
+
/** Compression level (0-9) */
|
|
983
|
+
compressionLevel?: number;
|
|
984
|
+
/** Use palette mode */
|
|
985
|
+
palette?: boolean;
|
|
986
|
+
/** Adaptive filtering */
|
|
987
|
+
adaptiveFiltering?: boolean;
|
|
988
|
+
/** Progressive scan */
|
|
989
|
+
progressive?: boolean;
|
|
990
|
+
};
|
|
991
|
+
/** WebP optimization settings */
|
|
992
|
+
webp?: {
|
|
993
|
+
/** Quality (1-100) */
|
|
994
|
+
quality?: number;
|
|
995
|
+
/** Lossless encoding */
|
|
996
|
+
lossless?: boolean;
|
|
997
|
+
/** Compression effort (0-6) */
|
|
998
|
+
effort?: number;
|
|
999
|
+
/** Smart chroma subsampling */
|
|
1000
|
+
smartSubsample?: boolean;
|
|
1001
|
+
/** Near-lossless mode (0-100) */
|
|
1002
|
+
nearLossless?: number;
|
|
1003
|
+
};
|
|
1004
|
+
/** AVIF optimization settings */
|
|
1005
|
+
avif?: {
|
|
1006
|
+
/** Quality (1-100) */
|
|
1007
|
+
quality?: number;
|
|
1008
|
+
/** Lossless encoding */
|
|
1009
|
+
lossless?: boolean;
|
|
1010
|
+
/** Compression effort (0-9) */
|
|
1011
|
+
effort?: number;
|
|
1012
|
+
/** Chroma subsampling */
|
|
1013
|
+
chromaSubsampling?: '4:4:4' | '4:2:2' | '4:2:0';
|
|
1014
|
+
};
|
|
1015
|
+
/** Allow indexing by any format string */
|
|
1016
|
+
[format: string]: Record<string, unknown> | undefined;
|
|
1017
|
+
}
|
|
1018
|
+
/**
|
|
1019
|
+
* ts-images integration configuration
|
|
1020
|
+
*/
|
|
1021
|
+
export interface TsImagesConfig {
|
|
1022
|
+
/** Enable ts-images processing */
|
|
1023
|
+
enabled: boolean;
|
|
1024
|
+
/** Output directory for processed images */
|
|
1025
|
+
outputDir: string;
|
|
1026
|
+
/** Base URL for generated images (CDN prefix) */
|
|
1027
|
+
baseUrl?: string;
|
|
1028
|
+
/** Format-specific quality settings */
|
|
1029
|
+
formatQuality?: FormatQualitySettings;
|
|
1030
|
+
/** Default responsive breakpoints */
|
|
1031
|
+
breakpoints?: number[];
|
|
1032
|
+
/** Default output formats */
|
|
1033
|
+
defaultFormats?: ImageFormat[];
|
|
1034
|
+
/** Default quality (1-100) */
|
|
1035
|
+
defaultQuality?: number;
|
|
1036
|
+
/** Batch processing options */
|
|
1037
|
+
batchOptions?: {
|
|
1038
|
+
/** Max concurrent processing */
|
|
1039
|
+
concurrency?: number;
|
|
1040
|
+
/** Optimization preset */
|
|
1041
|
+
optimizationPreset?: ImageOptimizationPreset;
|
|
1042
|
+
};
|
|
1043
|
+
/** Default placeholder strategy */
|
|
1044
|
+
placeholderStrategy?: string;
|
|
1045
|
+
/** Generate sprite sheets for icons */
|
|
1046
|
+
generateSprites?: boolean;
|
|
1047
|
+
/** Sprite output directory */
|
|
1048
|
+
spriteOutputDir?: string;
|
|
1049
|
+
}
|
|
1050
|
+
/**
|
|
1051
|
+
* Enhanced image props with ts-images integration
|
|
1052
|
+
*/
|
|
1053
|
+
export interface EnhancedImgProps extends ImgProps {
|
|
1054
|
+
/** ts-images optimization preset */
|
|
1055
|
+
preset?: ImageOptimizationPreset;
|
|
1056
|
+
/** Process at build time (true) or runtime URL generation (false) */
|
|
1057
|
+
process?: boolean;
|
|
1058
|
+
/** Custom transformations to apply */
|
|
1059
|
+
transformations?: ImageTransformationConfig[];
|
|
1060
|
+
/** Generate responsive variants at these widths (overrides config) */
|
|
1061
|
+
responsiveWidths?: number[];
|
|
1062
|
+
/** Watermark configuration */
|
|
1063
|
+
watermark?: WatermarkConfig;
|
|
1064
|
+
/** Art direction: different images for breakpoints */
|
|
1065
|
+
artDirection?: ArtDirectionConfig[];
|
|
1066
|
+
/** Extract and use dominant color as placeholder background */
|
|
1067
|
+
useDominantColor?: boolean;
|
|
1068
|
+
/** Generate and embed thumbhash at build time */
|
|
1069
|
+
embedThumbhash?: boolean;
|
|
1070
|
+
/** Blur amount for placeholder (when using blur strategy) */
|
|
1071
|
+
blurAmount?: number;
|
|
1072
|
+
/** Custom output filename pattern */
|
|
1073
|
+
outputPattern?: string;
|
|
1074
|
+
/** Skip optimization for this image */
|
|
1075
|
+
skipOptimization?: boolean;
|
|
1076
|
+
/** Force specific output format */
|
|
1077
|
+
outputFormat?: ImageFormat;
|
|
1078
|
+
}
|
|
1079
|
+
/**
|
|
1080
|
+
* Result from processing an image with ts-images
|
|
1081
|
+
*/
|
|
1082
|
+
export interface ProcessedImageResult {
|
|
1083
|
+
/** Original source path */
|
|
1084
|
+
src: string;
|
|
1085
|
+
/** Whether processing was performed */
|
|
1086
|
+
processed: boolean;
|
|
1087
|
+
/** Generated variants by format and width */
|
|
1088
|
+
variants?: Array<{
|
|
1089
|
+
/** Output path */
|
|
1090
|
+
path: string;
|
|
1091
|
+
/** URL for srcset */
|
|
1092
|
+
url: string;
|
|
1093
|
+
/** Width in pixels */
|
|
1094
|
+
width: number;
|
|
1095
|
+
/** Height in pixels */
|
|
1096
|
+
height: number;
|
|
1097
|
+
/** Output format */
|
|
1098
|
+
format: ImageFormat;
|
|
1099
|
+
/** File size in bytes */
|
|
1100
|
+
size: number;
|
|
1101
|
+
/** Device pixel ratio (for DPR-based srcsets) */
|
|
1102
|
+
dpr?: number;
|
|
1103
|
+
}>;
|
|
1104
|
+
/** Placeholder data URL (thumbhash/blur) */
|
|
1105
|
+
placeholder?: string;
|
|
1106
|
+
/** Dominant color extracted */
|
|
1107
|
+
dominantColor?: string;
|
|
1108
|
+
/** Original dimensions */
|
|
1109
|
+
originalWidth?: number;
|
|
1110
|
+
originalHeight?: number;
|
|
1111
|
+
/** Content hash for cache invalidation */
|
|
1112
|
+
hash?: string;
|
|
1113
|
+
/** Processing errors if any */
|
|
1114
|
+
errors?: string[];
|
|
1115
|
+
}
|
|
1116
|
+
/**
|
|
1117
|
+
* Responsive variant set result
|
|
1118
|
+
*/
|
|
1119
|
+
export interface ResponsiveVariantSet {
|
|
1120
|
+
/** Source image */
|
|
1121
|
+
src: string;
|
|
1122
|
+
/** Variants grouped by format */
|
|
1123
|
+
byFormat: Record<ImageFormat, ProcessedImageResult['variants']>;
|
|
1124
|
+
/** Generated srcset strings by format */
|
|
1125
|
+
srcsets: Record<ImageFormat, string>;
|
|
1126
|
+
/** Recommended sizes attribute */
|
|
1127
|
+
sizes?: string;
|
|
1128
|
+
/** Placeholder data */
|
|
1129
|
+
placeholder?: {
|
|
1130
|
+
dataURL: string;
|
|
1131
|
+
width: number;
|
|
1132
|
+
height: number;
|
|
1133
|
+
strategy: PlaceholderStrategy;
|
|
1134
|
+
};
|
|
1135
|
+
}
|
|
1136
|
+
/**
|
|
1137
|
+
* Video quality presets
|
|
1138
|
+
*/
|
|
1139
|
+
export type VideoQualityPreset = 'very-low' | 'low' | 'medium' | 'high' | 'very-high' | 'lossless';
|
|
1140
|
+
/**
|
|
1141
|
+
* Platform-specific video presets
|
|
1142
|
+
*/
|
|
1143
|
+
export type VideoPlatformPreset = 'youtube' | 'twitter' | 'instagram-feed' | 'instagram-story' | 'instagram-reels' | 'tiktok' | 'discord' | 'linkedin' | 'facebook' | 'web-progressive' | 'web-streaming';
|
|
1144
|
+
/**
|
|
1145
|
+
* Video codec options
|
|
1146
|
+
*/
|
|
1147
|
+
export type VideoCodec = 'h264' | 'h265' | 'vp9' | 'av1';
|
|
1148
|
+
/**
|
|
1149
|
+
* Audio codec options
|
|
1150
|
+
*/
|
|
1151
|
+
export type AudioCodec = 'aac' | 'opus' | 'mp3' | 'flac';
|
|
1152
|
+
/**
|
|
1153
|
+
* Poster/thumbnail generation options
|
|
1154
|
+
*/
|
|
1155
|
+
export interface PosterGenerationConfig {
|
|
1156
|
+
/** Timestamp in seconds to extract frame */
|
|
1157
|
+
timestamp?: number;
|
|
1158
|
+
/** Output width */
|
|
1159
|
+
width?: number;
|
|
1160
|
+
/** Output height (auto-calculated if not specified) */
|
|
1161
|
+
height?: number;
|
|
1162
|
+
/** Output format */
|
|
1163
|
+
format?: 'jpeg' | 'png' | 'webp';
|
|
1164
|
+
/** Quality (1-100) */
|
|
1165
|
+
quality?: number;
|
|
1166
|
+
}
|
|
1167
|
+
/**
|
|
1168
|
+
* Sprite sheet configuration for video scrubbing preview
|
|
1169
|
+
*/
|
|
1170
|
+
export interface SpriteSheetConfig {
|
|
1171
|
+
/** Number of columns in sprite sheet */
|
|
1172
|
+
columns?: number;
|
|
1173
|
+
/** Thumbnail width */
|
|
1174
|
+
thumbnailWidth?: number;
|
|
1175
|
+
/** Thumbnail height */
|
|
1176
|
+
thumbnailHeight?: number;
|
|
1177
|
+
/** Interval between frames in seconds */
|
|
1178
|
+
interval?: number;
|
|
1179
|
+
/** Output format */
|
|
1180
|
+
format?: 'jpeg' | 'png' | 'webp';
|
|
1181
|
+
/** Quality (1-100) */
|
|
1182
|
+
quality?: number;
|
|
1183
|
+
}
|
|
1184
|
+
/**
|
|
1185
|
+
* Streaming quality level configuration
|
|
1186
|
+
*/
|
|
1187
|
+
export interface StreamingQualityLevel {
|
|
1188
|
+
/** Display label (e.g., "1080p") */
|
|
1189
|
+
label: string;
|
|
1190
|
+
/** Video width */
|
|
1191
|
+
width: number;
|
|
1192
|
+
/** Video height (auto-calculated if not specified) */
|
|
1193
|
+
height?: number;
|
|
1194
|
+
/** Video bitrate in bps */
|
|
1195
|
+
bitrate: number;
|
|
1196
|
+
/** Audio bitrate in bps */
|
|
1197
|
+
audioBitrate?: number;
|
|
1198
|
+
}
|
|
1199
|
+
/**
|
|
1200
|
+
* Adaptive streaming configuration
|
|
1201
|
+
*/
|
|
1202
|
+
export interface StreamingConfig {
|
|
1203
|
+
/** Streaming format */
|
|
1204
|
+
format?: 'hls' | 'dash';
|
|
1205
|
+
/** Segment duration in seconds */
|
|
1206
|
+
segmentDuration?: number;
|
|
1207
|
+
/** Quality levels */
|
|
1208
|
+
qualities?: StreamingQualityLevel[];
|
|
1209
|
+
/** Enable encryption */
|
|
1210
|
+
encryption?: {
|
|
1211
|
+
enabled: boolean;
|
|
1212
|
+
keyUrl?: string;
|
|
1213
|
+
iv?: string;
|
|
1214
|
+
};
|
|
1215
|
+
}
|
|
1216
|
+
/**
|
|
1217
|
+
* Video transcoding options
|
|
1218
|
+
*/
|
|
1219
|
+
export interface TranscodeConfig {
|
|
1220
|
+
/** Video codec */
|
|
1221
|
+
codec?: VideoCodec;
|
|
1222
|
+
/** Video bitrate in bps */
|
|
1223
|
+
bitrate?: number;
|
|
1224
|
+
/** Maximum width */
|
|
1225
|
+
maxWidth?: number;
|
|
1226
|
+
/** Maximum height */
|
|
1227
|
+
maxHeight?: number;
|
|
1228
|
+
/** Frame rate */
|
|
1229
|
+
frameRate?: number;
|
|
1230
|
+
/** Audio codec */
|
|
1231
|
+
audioCodec?: AudioCodec;
|
|
1232
|
+
/** Audio bitrate in bps */
|
|
1233
|
+
audioBitrate?: number;
|
|
1234
|
+
/** Sample rate in Hz */
|
|
1235
|
+
sampleRate?: number;
|
|
1236
|
+
/** Number of audio channels */
|
|
1237
|
+
channels?: number;
|
|
1238
|
+
/** Two-pass encoding for better quality */
|
|
1239
|
+
twoPass?: boolean;
|
|
1240
|
+
/** Speed preset */
|
|
1241
|
+
speedPreset?: 'ultrafast' | 'superfast' | 'veryfast' | 'faster' | 'fast' | 'medium' | 'slow' | 'slower' | 'veryslow';
|
|
1242
|
+
/** CRF value (0-51 for H.264, lower = better quality) */
|
|
1243
|
+
crf?: number;
|
|
1244
|
+
}
|
|
1245
|
+
/**
|
|
1246
|
+
* Waveform visualization configuration
|
|
1247
|
+
*/
|
|
1248
|
+
export interface WaveformConfig {
|
|
1249
|
+
/** Output width */
|
|
1250
|
+
width?: number;
|
|
1251
|
+
/** Output height */
|
|
1252
|
+
height?: number;
|
|
1253
|
+
/** Waveform color */
|
|
1254
|
+
color?: string;
|
|
1255
|
+
/** Background color */
|
|
1256
|
+
backgroundColor?: string;
|
|
1257
|
+
/** Output format */
|
|
1258
|
+
format?: 'png' | 'svg' | 'json';
|
|
1259
|
+
/** Number of samples to render */
|
|
1260
|
+
samples?: number;
|
|
1261
|
+
}
|
|
1262
|
+
/**
|
|
1263
|
+
* ts-videos integration configuration
|
|
1264
|
+
*/
|
|
1265
|
+
export interface TsVideosConfig {
|
|
1266
|
+
/** Enable ts-videos processing */
|
|
1267
|
+
enabled: boolean;
|
|
1268
|
+
/** Output directory for processed videos */
|
|
1269
|
+
outputDir: string;
|
|
1270
|
+
/** Base URL for video assets */
|
|
1271
|
+
baseUrl?: string;
|
|
1272
|
+
/** Default quality preset */
|
|
1273
|
+
defaultQuality?: VideoQualityPreset;
|
|
1274
|
+
/** Streaming configuration */
|
|
1275
|
+
streaming?: {
|
|
1276
|
+
/** Enable streaming manifest generation */
|
|
1277
|
+
enabled: boolean;
|
|
1278
|
+
/** Default format */
|
|
1279
|
+
format?: 'hls' | 'dash';
|
|
1280
|
+
/** Segment duration */
|
|
1281
|
+
segmentDuration?: number;
|
|
1282
|
+
/** Default quality levels */
|
|
1283
|
+
defaultQualities?: StreamingQualityLevel[];
|
|
1284
|
+
};
|
|
1285
|
+
/** Thumbnail generation configuration */
|
|
1286
|
+
thumbnails?: {
|
|
1287
|
+
/** Enable thumbnail generation */
|
|
1288
|
+
enabled: boolean;
|
|
1289
|
+
/** Number of thumbnails to generate */
|
|
1290
|
+
count?: number;
|
|
1291
|
+
/** Interval between thumbnails in seconds */
|
|
1292
|
+
interval?: number;
|
|
1293
|
+
/** Output format */
|
|
1294
|
+
format?: 'jpeg' | 'png' | 'webp';
|
|
1295
|
+
/** Thumbnail width */
|
|
1296
|
+
width?: number;
|
|
1297
|
+
};
|
|
1298
|
+
/** Default transcoding settings */
|
|
1299
|
+
transcoding?: {
|
|
1300
|
+
/** Default codec */
|
|
1301
|
+
defaultCodec?: VideoCodec;
|
|
1302
|
+
/** Default audio codec */
|
|
1303
|
+
defaultAudioCodec?: AudioCodec;
|
|
1304
|
+
/** Default speed preset */
|
|
1305
|
+
speedPreset?: TranscodeConfig['speedPreset'];
|
|
1306
|
+
};
|
|
1307
|
+
}
|
|
1308
|
+
/**
|
|
1309
|
+
* Enhanced video props with ts-videos integration
|
|
1310
|
+
*/
|
|
1311
|
+
export interface EnhancedVideoProps extends VideoProps {
|
|
1312
|
+
/** ts-videos quality preset */
|
|
1313
|
+
quality?: VideoQualityPreset;
|
|
1314
|
+
/** Platform-specific optimization preset */
|
|
1315
|
+
platform?: VideoPlatformPreset;
|
|
1316
|
+
/** Process video at build time */
|
|
1317
|
+
process?: boolean;
|
|
1318
|
+
/** Generate poster from video frame */
|
|
1319
|
+
generatePoster?: boolean | PosterGenerationConfig;
|
|
1320
|
+
/** Generate sprite sheet for scrubbing preview */
|
|
1321
|
+
spriteSheet?: boolean | SpriteSheetConfig;
|
|
1322
|
+
/** Adaptive streaming configuration */
|
|
1323
|
+
streaming?: boolean | StreamingConfig;
|
|
1324
|
+
/** Transcoding options */
|
|
1325
|
+
transcode?: TranscodeConfig;
|
|
1326
|
+
/** Generate waveform for audio visualization */
|
|
1327
|
+
waveform?: boolean | WaveformConfig;
|
|
1328
|
+
/** Progress callback for video processing */
|
|
1329
|
+
onProcessProgress?: (progress: {
|
|
1330
|
+
percentage: number;
|
|
1331
|
+
currentTime: number;
|
|
1332
|
+
duration: number;
|
|
1333
|
+
stage: 'analyzing' | 'transcoding' | 'generating-manifests' | 'complete';
|
|
1334
|
+
}) => void;
|
|
1335
|
+
/** Custom output filename pattern */
|
|
1336
|
+
outputPattern?: string;
|
|
1337
|
+
/** Skip processing for this video */
|
|
1338
|
+
skipProcessing?: boolean;
|
|
1339
|
+
/** Title for accessibility and metadata */
|
|
1340
|
+
title?: string;
|
|
1341
|
+
}
|
|
1342
|
+
/**
|
|
1343
|
+
* Result from generating a thumbnail
|
|
1344
|
+
*/
|
|
1345
|
+
export interface ThumbnailResult {
|
|
1346
|
+
/** Output path */
|
|
1347
|
+
path: string;
|
|
1348
|
+
/** URL for use in poster attribute */
|
|
1349
|
+
url: string;
|
|
1350
|
+
/** Width in pixels */
|
|
1351
|
+
width: number;
|
|
1352
|
+
/** Height in pixels */
|
|
1353
|
+
height: number;
|
|
1354
|
+
/** Timestamp in seconds */
|
|
1355
|
+
timestamp: number;
|
|
1356
|
+
/** File size in bytes */
|
|
1357
|
+
size: number;
|
|
1358
|
+
}
|
|
1359
|
+
/**
|
|
1360
|
+
* Result from generating HLS manifest
|
|
1361
|
+
*/
|
|
1362
|
+
export interface HLSResult {
|
|
1363
|
+
/** Master playlist URL */
|
|
1364
|
+
manifestUrl: string;
|
|
1365
|
+
/** Path to master playlist file */
|
|
1366
|
+
manifestPath: string;
|
|
1367
|
+
/** Individual quality level playlists */
|
|
1368
|
+
playlists: Array<{
|
|
1369
|
+
quality: StreamingQualityLevel;
|
|
1370
|
+
url: string;
|
|
1371
|
+
path: string;
|
|
1372
|
+
}>;
|
|
1373
|
+
/** Total segment count */
|
|
1374
|
+
segmentCount: number;
|
|
1375
|
+
/** Total duration in seconds */
|
|
1376
|
+
duration: number;
|
|
1377
|
+
}
|
|
1378
|
+
/**
|
|
1379
|
+
* Result from generating DASH manifest
|
|
1380
|
+
*/
|
|
1381
|
+
export interface DASHResult {
|
|
1382
|
+
/** MPD manifest URL */
|
|
1383
|
+
manifestUrl: string;
|
|
1384
|
+
/** Path to MPD file */
|
|
1385
|
+
manifestPath: string;
|
|
1386
|
+
/** Adaptation sets */
|
|
1387
|
+
adaptationSets: Array<{
|
|
1388
|
+
type: 'video' | 'audio';
|
|
1389
|
+
representations: Array<{
|
|
1390
|
+
bandwidth: number;
|
|
1391
|
+
width?: number;
|
|
1392
|
+
height?: number;
|
|
1393
|
+
url: string;
|
|
1394
|
+
}>;
|
|
1395
|
+
}>;
|
|
1396
|
+
/** Total duration in seconds */
|
|
1397
|
+
duration: number;
|
|
1398
|
+
}
|
|
1399
|
+
/**
|
|
1400
|
+
* Result from video transcoding
|
|
1401
|
+
*/
|
|
1402
|
+
export interface TranscodeResult {
|
|
1403
|
+
/** Output file path */
|
|
1404
|
+
path: string;
|
|
1405
|
+
/** URL for use in video source */
|
|
1406
|
+
url: string;
|
|
1407
|
+
/** Duration in seconds */
|
|
1408
|
+
duration: number;
|
|
1409
|
+
/** File size in bytes */
|
|
1410
|
+
size: number;
|
|
1411
|
+
/** Video properties */
|
|
1412
|
+
video: {
|
|
1413
|
+
codec: VideoCodec;
|
|
1414
|
+
width: number;
|
|
1415
|
+
height: number;
|
|
1416
|
+
bitrate: number;
|
|
1417
|
+
frameRate: number;
|
|
1418
|
+
};
|
|
1419
|
+
/** Audio properties */
|
|
1420
|
+
audio?: {
|
|
1421
|
+
codec: AudioCodec;
|
|
1422
|
+
bitrate: number;
|
|
1423
|
+
sampleRate: number;
|
|
1424
|
+
channels: number;
|
|
1425
|
+
};
|
|
1426
|
+
}
|
|
1427
|
+
/**
|
|
1428
|
+
* Result from processing a video with ts-videos
|
|
1429
|
+
*/
|
|
1430
|
+
export interface ProcessedVideoResult {
|
|
1431
|
+
/** Original source path */
|
|
1432
|
+
src: string;
|
|
1433
|
+
/** Whether processing was performed */
|
|
1434
|
+
processed: boolean;
|
|
1435
|
+
/** Transcoded video result */
|
|
1436
|
+
transcoded?: TranscodeResult;
|
|
1437
|
+
/** Generated poster/thumbnail */
|
|
1438
|
+
poster?: ThumbnailResult;
|
|
1439
|
+
/** Additional thumbnails */
|
|
1440
|
+
thumbnails?: ThumbnailResult[];
|
|
1441
|
+
/** Sprite sheet for scrubbing */
|
|
1442
|
+
spriteSheet?: {
|
|
1443
|
+
url: string;
|
|
1444
|
+
path: string;
|
|
1445
|
+
columns: number;
|
|
1446
|
+
rows: number;
|
|
1447
|
+
thumbnailWidth: number;
|
|
1448
|
+
thumbnailHeight: number;
|
|
1449
|
+
interval: number;
|
|
1450
|
+
totalFrames: number;
|
|
1451
|
+
};
|
|
1452
|
+
/** Streaming manifests */
|
|
1453
|
+
streaming?: {
|
|
1454
|
+
hls?: HLSResult;
|
|
1455
|
+
dash?: DASHResult;
|
|
1456
|
+
};
|
|
1457
|
+
/** Waveform data */
|
|
1458
|
+
waveform?: {
|
|
1459
|
+
url: string;
|
|
1460
|
+
path: string;
|
|
1461
|
+
data?: number[];
|
|
1462
|
+
};
|
|
1463
|
+
/** Video metadata */
|
|
1464
|
+
metadata?: {
|
|
1465
|
+
duration: number;
|
|
1466
|
+
width: number;
|
|
1467
|
+
height: number;
|
|
1468
|
+
frameRate: number;
|
|
1469
|
+
bitrate: number;
|
|
1470
|
+
codec: string;
|
|
1471
|
+
audioCodec?: string;
|
|
1472
|
+
};
|
|
1473
|
+
/** Content hash for cache invalidation */
|
|
1474
|
+
hash?: string;
|
|
1475
|
+
/** Processing errors if any */
|
|
1476
|
+
errors?: string[];
|
|
1477
|
+
}
|