@stacksjs/stx 0.2.572 → 0.2.573
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/a11y.d.ts +51 -111
- package/dist/animation.d.ts +131 -74
- package/dist/api-client.d.ts +11 -21
- package/dist/api-handler.d.ts +4 -4
- package/dist/appearance-bootstrap.d.ts +16 -77
- package/dist/application-layers.d.ts +11 -20
- package/dist/asset-roots.d.ts +7 -27
- package/dist/assets.d.ts +7 -9
- package/dist/async-components.d.ts +56 -78
- package/dist/auth.d.ts +0 -3
- package/dist/browser-core-imports.d.ts +2 -2
- package/dist/build-externalize-repeated.d.ts +0 -25
- package/dist/build-externalize.d.ts +18 -53
- package/dist/build-id.d.ts +40 -28
- package/dist/build-message.d.ts +20 -44
- package/dist/builtins/attrs.d.ts +0 -14
- package/dist/builtins/drawer.d.ts +3 -22
- package/dist/builtins/icon.d.ts +17 -19
- package/dist/builtins/image-alpha.d.ts +8 -8
- package/dist/builtins/image-delivery.d.ts +38 -40
- package/dist/builtins/image-placeholder.d.ts +12 -50
- package/dist/builtins/image-warmup-worker.d.ts +1 -1
- package/dist/builtins/image-worker.d.ts +6 -32
- package/dist/builtins/index.d.ts +16 -6
- package/dist/builtins/modal.d.ts +13 -23
- package/dist/builtins/safe-image.d.ts +2 -42
- package/dist/builtins/stx-image.d.ts +44 -24
- package/dist/builtins/stx-link.d.ts +5 -8
- package/dist/builtins/stx-loading-indicator.d.ts +11 -10
- package/dist/builtins/suspense.d.ts +6 -27
- package/dist/builtins/toast.d.ts +15 -16
- package/dist/builtins/transition-group.d.ts +1 -25
- package/dist/caching.d.ts +24 -21
- package/dist/{chunk-f4jh9vrj.js → chunk-0s647d0b.js} +53 -53
- package/dist/{chunk-09gtbb1w.js → chunk-1bsafdnt.js} +1 -1
- package/dist/{chunk-m6mxqepz.js → chunk-1btr5tme.js} +1 -1
- package/dist/{chunk-01mxer9s.js → chunk-2g6wcnna.js} +1 -1
- package/dist/{chunk-rrj5m9xv.js → chunk-2hg2bqtj.js} +1 -1
- package/dist/{chunk-xckzvbvn.js → chunk-4f0fh2a9.js} +1 -1
- package/dist/chunk-557wtdps.js +2 -0
- package/dist/{chunk-vr36s2en.js → chunk-58vrf6kh.js} +1 -1
- package/dist/{chunk-qzbzn1yf.js → chunk-6tsnz28m.js} +1 -1
- package/dist/{chunk-cvswrbzw.js → chunk-6x8cwscv.js} +1 -1
- package/dist/{chunk-1n64749x.js → chunk-74ew8ajw.js} +1 -1
- package/dist/{chunk-jqefcghh.js → chunk-78d6yyxz.js} +2 -2
- package/dist/{chunk-83fdt4yj.js → chunk-824cnbac.js} +1 -1
- package/dist/{chunk-ntgy4e1q.js → chunk-864xm0jy.js} +1 -1
- package/dist/{chunk-nn174xjh.js → chunk-9fbkdrm8.js} +1 -1
- package/dist/{chunk-kzjrgh0b.js → chunk-a3gvw1q2.js} +1 -1
- package/dist/{chunk-pqcvh9pp.js → chunk-amtrg7pn.js} +1 -1
- package/dist/{chunk-pw9verqx.js → chunk-b5fpsp5n.js} +1 -1
- package/dist/{chunk-5afw7z6v.js → chunk-bcjr3fw7.js} +1 -1
- package/dist/{chunk-n6qp05t9.js → chunk-bkj0j5se.js} +1 -1
- package/dist/{chunk-mzqyv7s5.js → chunk-cf97xdqa.js} +1 -1
- package/dist/{chunk-cgwyd9aq.js → chunk-cr67dpx4.js} +1 -1
- package/dist/{chunk-f1apaqfk.js → chunk-dpqvacd1.js} +1 -1
- package/dist/{chunk-ghy82tsc.js → chunk-et8726at.js} +1 -1
- package/dist/{chunk-4bgfpkwx.js → chunk-ev8t5cxk.js} +1 -1
- package/dist/{chunk-s34g3awk.js → chunk-fynh3bkq.js} +1 -1
- package/dist/{chunk-gzgc8zk5.js → chunk-g8757f97.js} +2 -2
- package/dist/{chunk-3gft8zng.js → chunk-hm4j4d8q.js} +1 -1
- package/dist/{chunk-0bt0fbs1.js → chunk-j9qy9t3t.js} +5 -5
- package/dist/{chunk-2a1q5y6r.js → chunk-jhc47xzj.js} +1 -1
- package/dist/{chunk-79vdkvhf.js → chunk-kns5m52j.js} +1 -1
- package/dist/{chunk-2cqbyb8w.js → chunk-mjpewk4r.js} +1 -1
- package/dist/{chunk-2jjff8kv.js → chunk-nj488tj2.js} +2 -2
- package/dist/{chunk-dcpf6kas.js → chunk-q9chv68c.js} +1 -1
- package/dist/{chunk-xq2ck69k.js → chunk-qm280dp3.js} +1 -1
- package/dist/{chunk-ymawe0y5.js → chunk-sjcstv33.js} +1 -1
- package/dist/{chunk-tc5r2vmw.js → chunk-t0zdz8kd.js} +1 -1
- package/dist/{chunk-jwvzvapp.js → chunk-t3dnak1j.js} +1 -1
- package/dist/{chunk-2jsnrfc8.js → chunk-t64nnmmj.js} +1 -1
- package/dist/{chunk-m2a1fxpb.js → chunk-tvb8p7c0.js} +1 -1
- package/dist/{chunk-6f4qrd0s.js → chunk-tyhgq6rw.js} +1 -1
- package/dist/{chunk-4wfr074d.js → chunk-vn7tc8hm.js} +1 -1
- package/dist/{chunk-y4ajd836.js → chunk-xy6g8zb9.js} +1 -1
- package/dist/{chunk-zddzjd60.js → chunk-ya7xks9t.js} +1 -1
- package/dist/chunk-zpz6q2fh.js +2 -0
- package/dist/chunk-zxt94g45.js +2 -0
- package/dist/{chunk-cyg9w31a.js → chunk-zz7tw07b.js} +1 -1
- package/dist/{chunk-ta8bhz27.js → chunk-zzcxacjf.js} +1 -1
- package/dist/cli.js +7 -7
- package/dist/client/directive.d.ts +0 -7
- package/dist/client/index.d.ts +1 -0
- package/dist/client/signals-appearance-runtime.d.ts +1 -1
- package/dist/client/signals-binding-utils-runtime.d.ts +1 -1
- package/dist/client/signals-bootstrap-runtime.d.ts +2 -2
- package/dist/client/signals-class-runtime.d.ts +1 -1
- package/dist/client/signals-component-api-runtime.d.ts +1 -1
- package/dist/client/signals-component-hydration-runtime.d.ts +1 -1
- package/dist/client/signals-component-props-runtime.d.ts +1 -1
- package/dist/client/signals-conditional-chain-runtime.d.ts +1 -1
- package/dist/client/signals-conditional-component-runtime.d.ts +1 -1
- package/dist/client/signals-container-cleanup-runtime.d.ts +1 -1
- package/dist/client/signals-context-runtime.d.ts +1 -1
- package/dist/client/signals-cookie-runtime.d.ts +1 -1
- package/dist/client/signals-devtools-runtime.d.ts +1 -1
- package/dist/client/signals-dialog-runtime.d.ts +1 -1
- package/dist/client/signals-dom-ready-runtime.d.ts +1 -1
- package/dist/client/signals-drawer-runtime.d.ts +1 -1
- package/dist/client/signals-effect-runtime.d.ts +1 -1
- package/dist/client/signals-event-shorthand-runtime.d.ts +1 -1
- package/dist/client/signals-expression-compiler-runtime.d.ts +1 -1
- package/dist/client/signals-expression-runtime.d.ts +1 -1
- package/dist/client/signals-fetch-transport-runtime.d.ts +1 -1
- package/dist/client/signals-for-runtime.d.ts +1 -1
- package/dist/client/signals-globals-runtime.d.ts +1 -1
- package/dist/client/signals-handler-runtime.d.ts +1 -1
- package/dist/client/signals-head-runtime.d.ts +1 -1
- package/dist/client/signals-helpers-runtime.d.ts +1 -1
- package/dist/client/signals-host-runtime.d.ts +1 -1
- package/dist/client/signals-hydration-audit-runtime.d.ts +1 -1
- package/dist/client/signals-hydration-runtime.d.ts +1 -1
- package/dist/client/signals-if-chain-runtime.d.ts +1 -1
- package/dist/client/signals-if-runtime.d.ts +1 -1
- package/dist/client/signals-lazy-hydration-runtime.d.ts +1 -1
- package/dist/client/signals-lifecycle-runtime.d.ts +1 -1
- package/dist/client/signals-loop-component-remap-runtime.d.ts +1 -1
- package/dist/client/signals-loop-conditional-runtime.d.ts +1 -1
- package/dist/client/signals-loop-row-runtime.d.ts +1 -1
- package/dist/client/signals-manifest-hydration-runtime.d.ts +1 -1
- package/dist/client/signals-model-runtime.d.ts +1 -1
- package/dist/client/signals-mount-runtime.d.ts +1 -1
- package/dist/client/signals-navigation-runtime.d.ts +1 -1
- package/dist/client/signals-notify-runtime.d.ts +1 -1
- package/dist/client/signals-optimistic-runtime.d.ts +1 -1
- package/dist/client/signals-overlay-runtime.d.ts +1 -1
- package/dist/client/signals-pipe-runtime.d.ts +1 -1
- package/dist/client/signals-proxy-runtime.d.ts +1 -1
- package/dist/client/signals-query-runtime.d.ts +1 -1
- package/dist/client/signals-reactive-runtime.d.ts +1 -1
- package/dist/client/signals-ref-runtime.d.ts +1 -1
- package/dist/client/signals-scope-disposal-runtime.d.ts +1 -1
- package/dist/client/signals-scope-traversal-runtime.d.ts +1 -1
- package/dist/client/signals-show-runtime.d.ts +1 -1
- package/dist/client/signals-spa-load-control-runtime.d.ts +1 -1
- package/dist/client/signals-spa-load-runtime.d.ts +1 -1
- package/dist/client/signals-state-runtime.d.ts +1 -1
- package/dist/client/signals-storage-runtime.d.ts +1 -1
- package/dist/client/signals-store-registry-runtime.d.ts +1 -1
- package/dist/client/signals-style-runtime.d.ts +1 -1
- package/dist/client/signals-suspense-runtime.d.ts +1 -1
- package/dist/client/signals-timer-runtime.d.ts +1 -1
- package/dist/client/signals-toast-runtime.d.ts +1 -1
- package/dist/client/signals-tooltip-runtime.d.ts +1 -1
- package/dist/client/signals-transition-group-runtime.d.ts +1 -1
- package/dist/client/signals-websocket-runtime.d.ts +1 -1
- package/dist/client-helpers.d.ts +1 -312
- package/dist/client-module-registry.d.ts +4 -27
- package/dist/client-parameter-bindings.d.ts +1 -4
- package/dist/client-script-bundler.d.ts +55 -103
- package/dist/client-script.d.ts +69 -127
- package/dist/color-mode-boot.d.ts +21 -58
- package/dist/component-client-factories.d.ts +8 -9
- package/dist/component-contract-checks.d.ts +15 -18
- package/dist/component-contract.d.ts +6 -6
- package/dist/component-hmr.d.ts +8 -7
- package/dist/component-model.d.ts +14 -20
- package/dist/component-processing.d.ts +51 -59
- package/dist/component-registry.d.ts +28 -99
- package/dist/component-renderer.d.ts +19 -16
- package/dist/component-resolution.d.ts +8 -8
- package/dist/component-tags.d.ts +1 -1
- package/dist/composable-loader.d.ts +6 -41
- package/dist/composables/use-fetch.d.ts +45 -114
- package/dist/composables/use-form.d.ts +2 -56
- package/dist/composables/use-intersection-observer.d.ts +1 -1
- package/dist/composables.d.ts +75 -74
- package/dist/composition-api.d.ts +19 -43
- package/dist/computed.d.ts +93 -86
- package/dist/conditionals.d.ts +0 -24
- package/dist/config.d.ts +30 -24
- package/dist/config.js +3 -0
- package/dist/craft-bridge.d.ts +1 -467
- package/dist/craft-components.d.ts +234 -680
- package/dist/craft-entry.js +1 -1
- package/dist/craft.js +1 -1
- package/dist/csp.d.ts +41 -107
- package/dist/database.d.ts +1 -1
- package/dist/defer.d.ts +0 -24
- package/dist/dev-server/terminal-colors.d.ts +32 -32
- package/dist/dev-server/ts-css.d.ts +26 -35
- package/dist/dev-server/types.d.ts +33 -29
- package/dist/directive-api.d.ts +42 -85
- package/dist/directive-arguments.d.ts +14 -39
- package/dist/document-shell.d.ts +49 -81
- package/dist/dynamic-components.d.ts +0 -9
- package/dist/engine-bindings.d.ts +1 -1
- package/dist/env.d.ts +26 -0
- package/dist/error-boundaries.d.ts +36 -43
- package/dist/error-handling.d.ts +1 -1
- package/dist/errors/codes.d.ts +43 -51
- package/dist/errors/formatter.d.ts +38 -58
- package/dist/errors/index.d.ts +61 -5
- package/dist/errors/logger.d.ts +40 -114
- package/dist/errors/sanitizer.d.ts +28 -53
- package/dist/errors/types.d.ts +31 -44
- package/dist/events.d.ts +32 -94
- package/dist/expressions.d.ts +57 -62
- package/dist/find-body-tag.d.ts +5 -34
- package/dist/first-script-tag.d.ts +0 -23
- package/dist/forms-validation.d.ts +117 -149
- package/dist/forms.d.ts +161 -120
- package/dist/framework-composables.d.ts +0 -32
- package/dist/head-injection.d.ts +30 -32
- package/dist/head-keys.d.ts +12 -15
- package/dist/head.d.ts +110 -139
- package/dist/heatmap.d.ts +76 -152
- package/dist/html-masking.d.ts +38 -62
- package/dist/hydration-runtime.d.ts +24 -20
- package/dist/hydration.d.ts +11 -10
- package/dist/i18n.d.ts +34 -95
- package/dist/image-optimization/auto-sibling.d.ts +4 -32
- package/dist/imported-signals.d.ts +0 -36
- package/dist/includes.d.ts +6 -69
- package/dist/index.d.ts +2 -1
- package/dist/init.d.ts +12 -20
- package/dist/internal-markdown.d.ts +8 -12
- package/dist/interpolation-context.d.ts +15 -15
- package/dist/island-chunking.d.ts +13 -30
- package/dist/keep-alive.d.ts +52 -72
- package/dist/layout-types.d.ts +2 -27
- package/dist/lazy-module.d.ts +0 -10
- package/dist/loading-indicator.d.ts +8 -5
- package/dist/loop-binding.d.ts +4 -7
- package/dist/loops.d.ts +25 -67
- package/dist/markdown.d.ts +1 -0
- package/dist/media/image/component.d.ts +9 -25
- package/dist/media/image/directive.d.ts +1 -15
- package/dist/media/image/placeholder.d.ts +9 -20
- package/dist/media/image/processor/cache.d.ts +18 -40
- package/dist/media/image/processor/index.d.ts +10 -1
- package/dist/media/image/processor/optimizer.d.ts +1 -12
- package/dist/media/image/processor/responsive.d.ts +6 -16
- package/dist/media/image/srcset.d.ts +49 -47
- package/dist/media/shared/cache.d.ts +31 -51
- package/dist/media/shared/hash.d.ts +0 -7
- package/dist/media/types.d.ts +754 -1235
- package/dist/media/video/directive.d.ts +1 -15
- package/dist/media/video/index.d.ts +17 -39
- package/dist/media/video/processor/cache.d.ts +19 -42
- package/dist/media/video/processor/index.d.ts +18 -1
- package/dist/media/video/processor/streaming.d.ts +10 -17
- package/dist/media/video/processor/thumbnail.d.ts +15 -21
- package/dist/media/video/processor/transcoder.d.ts +1 -11
- package/dist/meta-arguments.d.ts +14 -39
- package/dist/method-spoofing.d.ts +0 -7
- package/dist/middleware.d.ts +0 -60
- package/dist/native/bridge/protocol.d.ts +2 -1
- package/dist/native/compiler/headwind-to-style.d.ts +383 -359
- package/dist/native/compiler/icons.d.ts +249 -243
- package/dist/native/compiler/svg.d.ts +35 -24
- package/dist/native/runtime/jsc-globals.d.ts +1 -1
- package/dist/native/runtime/native-host.d.ts +1 -1
- package/dist/native/runtime/native-host.js +3 -0
- package/dist/offline/app-service-worker.d.ts +50 -114
- package/dist/offline/kept-store.d.ts +23 -37
- package/dist/offline/query-cache.d.ts +55 -126
- package/dist/owned-routes.d.ts +0 -31
- package/dist/page-response.d.ts +8 -39
- package/dist/parser/directive-parser.d.ts +45 -57
- package/dist/parser/expression-parser.d.ts +35 -33
- package/dist/parser/index.d.ts +39 -4
- package/dist/parser/tokenizer.d.ts +49 -61
- package/dist/partial-hydration.d.ts +51 -82
- package/dist/performance-utils.d.ts +115 -255
- package/dist/placeholder.d.ts +9 -18
- package/dist/plugin-system.d.ts +115 -264
- package/dist/process.d.ts +4 -9
- package/dist/process.js +6 -4
- package/dist/prop-sentinels.d.ts +11 -11
- package/dist/public-env.d.ts +0 -14
- package/dist/pwa/directives.d.ts +20 -12
- package/dist/pwa/inject.d.ts +0 -10
- package/dist/pwa/precache.d.ts +16 -22
- package/dist/pwa/service-worker.d.ts +0 -12
- package/dist/pwa.js +1 -1
- package/dist/reactive-bindings.d.ts +11 -34
- package/dist/reactive-tracking.d.ts +0 -36
- package/dist/reactive.d.ts +41 -58
- package/dist/render-memo.d.ts +5 -23
- package/dist/resolve-stx-targets.d.ts +6 -44
- package/dist/route-middleware.d.ts +35 -2
- package/dist/route-rules.d.ts +10 -13
- package/dist/router.d.ts +9 -8
- package/dist/routes.d.ts +3 -1
- package/dist/runtime-config-server.d.ts +14 -17
- package/dist/runtime-config.d.ts +2 -3
- package/dist/runtime-globals.d.ts +90 -122
- package/dist/runtime-injection.d.ts +0 -8
- package/dist/scaffolding.d.ts +30 -26
- package/dist/script-emit.d.ts +0 -30
- package/dist/script-validation.d.ts +6 -12
- package/dist/seo.d.ts +75 -153
- package/dist/server-api.d.ts +9 -12
- package/dist/server-bindings.d.ts +1 -26
- package/dist/server-data.d.ts +4 -5
- package/dist/sfc-template.d.ts +8 -8
- package/dist/signal-processing.d.ts +37 -53
- package/dist/signals-api.d.ts +58 -135
- package/dist/signals.d.ts +18 -24
- package/dist/site-url.d.ts +31 -28
- package/dist/slots.d.ts +20 -86
- package/dist/source-signature.d.ts +5 -28
- package/dist/ssg.d.ts +158 -337
- package/dist/ssg.js +2 -2
- package/dist/state-dir.d.ts +4 -4
- package/dist/store-loader.d.ts +0 -10
- package/dist/story/analytics.d.ts +60 -138
- package/dist/story/bookmarks.d.ts +34 -87
- package/dist/story/cli.d.ts +69 -123
- package/dist/story/collect/scanner.d.ts +0 -4
- package/dist/story/collect/tree.d.ts +1 -8
- package/dist/story/commands/build.d.ts +6 -11
- package/dist/story/commands/dev.d.ts +8 -15
- package/dist/story/commands/preview.d.ts +7 -13
- package/dist/story/config-watcher.d.ts +13 -20
- package/dist/story/config.d.ts +8 -11
- package/dist/story/context.d.ts +8 -14
- package/dist/story/hmr.d.ts +26 -24
- package/dist/story/hot-swap.d.ts +23 -34
- package/dist/story/keyboard-shortcuts.d.ts +18 -23
- package/dist/story/output.d.ts +44 -46
- package/dist/story/performance.d.ts +45 -107
- package/dist/story/presets.d.ts +41 -107
- package/dist/story/renderer.d.ts +27 -41
- package/dist/story/search.d.ts +12 -23
- package/dist/story/server.d.ts +11 -21
- package/dist/story/setup.d.ts +15 -23
- package/dist/story/testing.d.ts +40 -65
- package/dist/story/types.d.ts +160 -262
- package/dist/streaming.d.ts +57 -119
- package/dist/strip-literals.d.ts +1 -25
- package/dist/stx-module-imports.d.ts +7 -0
- package/dist/stx-virtual-ts.d.ts +102 -253
- package/dist/style-scoping.d.ts +8 -21
- package/dist/suspense.d.ts +52 -67
- package/dist/teleport.d.ts +0 -22
- package/dist/template-syntax-escape.d.ts +8 -8
- package/dist/template-tag-balance.d.ts +6 -22
- package/dist/testing.d.ts +26 -11
- package/dist/theme-tokens.d.ts +388 -134
- package/dist/transitions.d.ts +55 -66
- package/dist/ts-css-config.d.ts +12 -70
- package/dist/types/component-types.d.ts +122 -187
- package/dist/types/config-types.d.ts +341 -956
- package/dist/types/context-types.d.ts +24 -46
- package/dist/types/csp-types.d.ts +66 -70
- package/dist/types/directive-types.d.ts +156 -223
- package/dist/types/index.d.ts +110 -6
- package/dist/types/pwa-types.d.ts +148 -273
- package/dist/types.d.ts +1 -0
- package/dist/unresolved-identifiers.d.ts +22 -24
- package/dist/url-safety.d.ts +32 -32
- package/dist/utils.d.ts +21 -36
- package/dist/validator.d.ts +26 -28
- package/dist/variable-extractor.d.ts +19 -49
- package/dist/view-composers.d.ts +81 -80
- package/dist/virtual-scrolling.d.ts +82 -101
- package/dist/visual-testing.d.ts +10 -9
- package/dist/vue-template.d.ts +0 -23
- package/dist/web-components/css-scoping.d.ts +11 -21
- package/dist/web-components.d.ts +58 -81
- package/dist/x-element.d.ts +1 -0
- package/package.json +6 -6
- package/stx.d.ts +2 -2
- package/dist/app-service-worker.d.ts +0 -165
- package/dist/chunk-49gwmcrn.js +0 -2
- package/dist/chunk-6va5pe2m.js +0 -2
- package/dist/chunk-bm2q1srp.js +0 -2
- package/dist/signals-context-runtime.d.ts +0 -2
- package/dist/signals-drawer-runtime.d.ts +0 -2
- package/dist/signals-host-runtime.d.ts +0 -9
- package/dist/signals-loop-conditional-runtime.d.ts +0 -2
- package/dist/signals-manifest-hydration-runtime.d.ts +0 -2
- package/dist/signals-notify-runtime.d.ts +0 -2
- package/dist/signals-optimistic-runtime.d.ts +0 -2
- package/dist/signals-overlay-runtime.d.ts +0 -2
- package/dist/signals-scope-disposal-runtime.d.ts +0 -2
- package/dist/signals-spa-load-control-runtime.d.ts +0 -2
- package/dist/signals-storage-runtime.d.ts +0 -2
package/dist/media/types.d.ts
CHANGED
|
@@ -1,1477 +1,996 @@
|
|
|
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
1
|
/**
|
|
14
2
|
* Options for placeholder generation
|
|
15
3
|
*/
|
|
16
|
-
export interface PlaceholderOptions {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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;
|
|
4
|
+
export declare interface PlaceholderOptions {
|
|
5
|
+
strategy: PlaceholderStrategy
|
|
6
|
+
width?: number
|
|
7
|
+
height?: number
|
|
8
|
+
quality?: number
|
|
9
|
+
blurLevel?: number
|
|
10
|
+
transitionDuration?: number
|
|
11
|
+
easing?: string
|
|
31
12
|
}
|
|
32
13
|
/**
|
|
33
14
|
* Result from placeholder generation
|
|
34
15
|
*/
|
|
35
|
-
export interface PlaceholderResult {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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;
|
|
16
|
+
export declare interface PlaceholderResult {
|
|
17
|
+
dataURL: string
|
|
18
|
+
width: number
|
|
19
|
+
height: number
|
|
20
|
+
aspectRatio: number
|
|
21
|
+
originalWidth: number
|
|
22
|
+
originalHeight: number
|
|
23
|
+
strategy: PlaceholderStrategy
|
|
24
|
+
dominantColor?: string
|
|
25
|
+
css?: string
|
|
54
26
|
}
|
|
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
27
|
/**
|
|
68
28
|
* imgix-style image transformation parameters
|
|
69
29
|
*/
|
|
70
|
-
export interface ImageParams {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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;
|
|
30
|
+
export declare interface ImageParams {
|
|
31
|
+
w?: number
|
|
32
|
+
h?: number
|
|
33
|
+
fit?: ImageFit
|
|
34
|
+
crop?: ImageCrop
|
|
35
|
+
ar?: string
|
|
36
|
+
fm?: ImageFormat
|
|
37
|
+
q?: number
|
|
38
|
+
lossless?: boolean
|
|
39
|
+
progressive?: boolean
|
|
40
|
+
blur?: number
|
|
41
|
+
sharp?: number
|
|
42
|
+
bri?: number
|
|
43
|
+
con?: number
|
|
44
|
+
sat?: number
|
|
45
|
+
hue?: number
|
|
46
|
+
exp?: number
|
|
47
|
+
vib?: number
|
|
48
|
+
high?: number
|
|
49
|
+
shad?: number
|
|
50
|
+
gam?: number
|
|
51
|
+
rot?: number
|
|
52
|
+
flip?: 'h' | 'v' | 'hv'
|
|
53
|
+
orient?: number
|
|
54
|
+
mark?: string
|
|
55
|
+
markx?: number
|
|
56
|
+
marky?: number
|
|
57
|
+
markalpha?: number
|
|
58
|
+
markscale?: number
|
|
59
|
+
markalign?: 'top' | 'middle' | 'bottom' | 'left' | 'center' | 'right'
|
|
60
|
+
sepia?: number
|
|
61
|
+
px?: number
|
|
62
|
+
mono?: string
|
|
63
|
+
duotone?: string
|
|
64
|
+
invert?: boolean
|
|
65
|
+
auto?: string | string[]
|
|
66
|
+
dpr?: number
|
|
143
67
|
}
|
|
144
68
|
/**
|
|
145
69
|
* Image variant generated at a specific size/format
|
|
146
70
|
*/
|
|
147
|
-
export interface ImageVariant {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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;
|
|
71
|
+
export declare interface ImageVariant {
|
|
72
|
+
path: string
|
|
73
|
+
url: string
|
|
74
|
+
width: number
|
|
75
|
+
height: number
|
|
76
|
+
format: ImageFormat
|
|
77
|
+
size: number
|
|
78
|
+
dpr?: number
|
|
162
79
|
}
|
|
163
80
|
/**
|
|
164
81
|
* Processed image with all variants
|
|
165
82
|
*/
|
|
166
|
-
export interface ProcessedImage {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
width: number;
|
|
175
|
-
/** Original height */
|
|
176
|
-
height: number;
|
|
177
|
-
/** Aspect ratio */
|
|
178
|
-
aspectRatio: number;
|
|
179
|
-
/** Content hash for caching */
|
|
180
|
-
hash: string;
|
|
83
|
+
export declare interface ProcessedImage {
|
|
84
|
+
src: string
|
|
85
|
+
variants: ImageVariant[]
|
|
86
|
+
placeholder?: PlaceholderResult
|
|
87
|
+
width: number
|
|
88
|
+
height: number
|
|
89
|
+
aspectRatio: number
|
|
90
|
+
hash: string
|
|
181
91
|
}
|
|
182
92
|
/**
|
|
183
93
|
* <Img> component props
|
|
184
94
|
*/
|
|
185
|
-
export interface ImgProps {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
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;
|
|
95
|
+
export declare interface ImgProps {
|
|
96
|
+
src: string
|
|
97
|
+
alt: string
|
|
98
|
+
width?: number | string
|
|
99
|
+
height?: number | string
|
|
100
|
+
sizes?: string
|
|
101
|
+
widths?: number[]
|
|
102
|
+
dpr?: number[]
|
|
103
|
+
formats?: ImageFormat[]
|
|
104
|
+
quality?: number
|
|
105
|
+
params?: ImageParams
|
|
106
|
+
placeholder?: PlaceholderStrategy
|
|
107
|
+
placeholderOptions?: Partial<PlaceholderOptions>
|
|
108
|
+
lazy?: boolean
|
|
109
|
+
priority?: boolean
|
|
110
|
+
loading?: 'lazy' | 'eager'
|
|
111
|
+
decoding?: 'sync' | 'async' | 'auto'
|
|
112
|
+
fetchpriority?: 'high' | 'low' | 'auto'
|
|
113
|
+
objectFit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down'
|
|
114
|
+
objectPosition?: string
|
|
115
|
+
class?: string
|
|
116
|
+
style?: string
|
|
117
|
+
id?: string
|
|
118
|
+
data?: Record<string, string>
|
|
119
|
+
crossorigin?: 'anonymous' | 'use-credentials'
|
|
120
|
+
referrerpolicy?: string
|
|
236
121
|
}
|
|
237
122
|
/**
|
|
238
123
|
* @img directive options
|
|
239
124
|
*/
|
|
240
|
-
export interface ImgDirectiveOptions extends Omit<ImgProps, 'src' | 'alt'> {
|
|
241
|
-
|
|
242
|
-
srcset?: string;
|
|
125
|
+
export declare interface ImgDirectiveOptions extends Omit<ImgProps, 'src' | 'alt'> {
|
|
126
|
+
srcset?: string
|
|
243
127
|
}
|
|
244
128
|
/**
|
|
245
129
|
* Image render context
|
|
246
130
|
*/
|
|
247
|
-
export interface ImageRenderContext {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
isDev?: boolean;
|
|
254
|
-
/** Base URL for generated images */
|
|
255
|
-
baseUrl?: string;
|
|
256
|
-
/** Output directory */
|
|
257
|
-
outputDir?: string;
|
|
131
|
+
export declare interface ImageRenderContext {
|
|
132
|
+
processedImage?: ProcessedImage
|
|
133
|
+
optimize?: boolean
|
|
134
|
+
isDev?: boolean
|
|
135
|
+
baseUrl?: string
|
|
136
|
+
outputDir?: string
|
|
258
137
|
}
|
|
259
138
|
/**
|
|
260
139
|
* Image render result
|
|
261
140
|
*/
|
|
262
|
-
export interface ImageRenderResult {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
/** CSS for placeholder */
|
|
268
|
-
css?: string;
|
|
269
|
-
/** Client-side script */
|
|
270
|
-
script?: string;
|
|
141
|
+
export declare interface ImageRenderResult {
|
|
142
|
+
html: string
|
|
143
|
+
preloadLink?: string
|
|
144
|
+
css?: string
|
|
145
|
+
script?: string
|
|
271
146
|
}
|
|
272
147
|
/**
|
|
273
148
|
* Video source definition
|
|
274
149
|
*/
|
|
275
|
-
export interface VideoSource {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
/** Media query for adaptive sources */
|
|
281
|
-
media?: string;
|
|
282
|
-
/** Codec specification */
|
|
283
|
-
codecs?: string;
|
|
150
|
+
export declare interface VideoSource {
|
|
151
|
+
src: string
|
|
152
|
+
type: string
|
|
153
|
+
media?: string
|
|
154
|
+
codecs?: string
|
|
284
155
|
}
|
|
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
156
|
/**
|
|
294
157
|
* Plyr.js configuration options
|
|
295
158
|
*/
|
|
296
|
-
export interface PlyrOptions {
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
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>;
|
|
159
|
+
export declare interface PlyrOptions {
|
|
160
|
+
controls?: PlyrControl[] | boolean
|
|
161
|
+
autoplay?: boolean
|
|
162
|
+
muted?: boolean
|
|
163
|
+
loop?: { active: boolean }
|
|
164
|
+
seekTime?: number
|
|
165
|
+
volume?: number
|
|
166
|
+
clickToPlay?: boolean
|
|
167
|
+
hideControls?: number
|
|
168
|
+
resetOnEnd?: boolean
|
|
169
|
+
disableContextMenu?: boolean
|
|
170
|
+
keyboard?: { focused: boolean; global: boolean }
|
|
171
|
+
tooltips?: { controls: boolean; seek: boolean }
|
|
172
|
+
quality?: { default: number; options: number[]; forced: boolean }
|
|
173
|
+
captions?: { active: boolean; language: string; update: boolean }
|
|
174
|
+
storage?: { enabled: boolean; key: string }
|
|
175
|
+
speed?: { selected: number; options: number[] }
|
|
176
|
+
ratio?: string
|
|
177
|
+
fullscreen?: { enabled: boolean; fallback: boolean; iosNative: boolean }
|
|
178
|
+
previewThumbnails?: { enabled: boolean; src: string }
|
|
179
|
+
i18n?: Record<string, string>
|
|
366
180
|
}
|
|
367
181
|
/**
|
|
368
182
|
* <Video> component props
|
|
369
183
|
*/
|
|
370
|
-
export interface VideoProps {
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
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;
|
|
184
|
+
export declare interface VideoProps {
|
|
185
|
+
src?: string
|
|
186
|
+
sources?: VideoSource[]
|
|
187
|
+
poster?: string
|
|
188
|
+
posterPlaceholder?: PlaceholderStrategy
|
|
189
|
+
controls?: boolean
|
|
190
|
+
autoplay?: boolean
|
|
191
|
+
muted?: boolean
|
|
192
|
+
loop?: boolean
|
|
193
|
+
preload?: 'none' | 'metadata' | 'auto'
|
|
194
|
+
playsinline?: boolean
|
|
195
|
+
lazy?: boolean
|
|
196
|
+
player?: 'native' | 'plyr' | 'ts-video'
|
|
197
|
+
title?: string
|
|
198
|
+
plyrOptions?: PlyrOptions
|
|
199
|
+
type?: VideoEmbedType
|
|
200
|
+
width?: number | string
|
|
201
|
+
height?: number | string
|
|
202
|
+
class?: string
|
|
203
|
+
style?: string
|
|
204
|
+
id?: string
|
|
205
|
+
crossorigin?: 'anonymous' | 'use-credentials'
|
|
206
|
+
disablePictureInPicture?: boolean
|
|
207
|
+
disableRemotePlayback?: boolean
|
|
417
208
|
}
|
|
418
209
|
/**
|
|
419
210
|
* @video directive options
|
|
420
211
|
*/
|
|
421
|
-
export interface VideoDirectiveOptions extends Omit<VideoProps, 'src'> {
|
|
422
|
-
}
|
|
212
|
+
export declare interface VideoDirectiveOptions extends Omit<VideoProps, 'src'> {}
|
|
423
213
|
/**
|
|
424
214
|
* Video render result
|
|
425
215
|
*/
|
|
426
|
-
export interface VideoRenderResult {
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
script?: string;
|
|
431
|
-
/** CSS styles */
|
|
432
|
-
css?: string;
|
|
216
|
+
export declare interface VideoRenderResult {
|
|
217
|
+
html: string
|
|
218
|
+
script?: string
|
|
219
|
+
css?: string
|
|
433
220
|
}
|
|
434
221
|
/**
|
|
435
222
|
* File validation result
|
|
436
223
|
*/
|
|
437
|
-
export interface FileValidationResult {
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
error?: string;
|
|
442
|
-
/** Validation error code */
|
|
443
|
-
code?: 'INVALID_TYPE' | 'FILE_TOO_LARGE' | 'FILE_TOO_SMALL' | 'INVALID_DIMENSIONS';
|
|
224
|
+
export declare interface FileValidationResult {
|
|
225
|
+
valid: boolean
|
|
226
|
+
error?: string
|
|
227
|
+
code?: 'INVALID_TYPE' | 'FILE_TOO_LARGE' | 'FILE_TOO_SMALL' | 'INVALID_DIMENSIONS'
|
|
444
228
|
}
|
|
445
229
|
/**
|
|
446
230
|
* Upload progress information
|
|
447
231
|
*/
|
|
448
|
-
export interface UploadProgress {
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
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;
|
|
232
|
+
export declare interface UploadProgress {
|
|
233
|
+
file: File
|
|
234
|
+
loaded: number
|
|
235
|
+
total: number
|
|
236
|
+
percent: number
|
|
237
|
+
speed?: number
|
|
238
|
+
timeRemaining?: number
|
|
461
239
|
}
|
|
462
240
|
/**
|
|
463
241
|
* Upload result
|
|
464
242
|
*/
|
|
465
|
-
export interface UploadResult {
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
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>;
|
|
243
|
+
export declare interface UploadResult {
|
|
244
|
+
success: boolean
|
|
245
|
+
url?: string
|
|
246
|
+
id?: string
|
|
247
|
+
name?: string
|
|
248
|
+
size?: number
|
|
249
|
+
type?: string
|
|
250
|
+
error?: string
|
|
251
|
+
errorCode?: string
|
|
252
|
+
data?: Record<string, unknown>
|
|
484
253
|
}
|
|
485
254
|
/**
|
|
486
255
|
* Upload configuration
|
|
487
256
|
*/
|
|
488
|
-
export interface UploadConfig {
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
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
|
-
};
|
|
257
|
+
export declare interface UploadConfig {
|
|
258
|
+
endpoint: string
|
|
259
|
+
method?: 'POST' | 'PUT' | 'PATCH'
|
|
260
|
+
headers?: Record<string, string>
|
|
261
|
+
fieldName?: string
|
|
262
|
+
maxSize?: number
|
|
263
|
+
minSize?: number
|
|
264
|
+
maxFiles?: number
|
|
265
|
+
accept?: string[]
|
|
266
|
+
chunkSize?: number
|
|
267
|
+
retries?: number
|
|
268
|
+
timeout?: number
|
|
269
|
+
withCredentials?: boolean
|
|
270
|
+
formData?: Record<string, string>
|
|
271
|
+
validateDimensions?: {
|
|
272
|
+
minWidth?: number
|
|
273
|
+
maxWidth?: number
|
|
274
|
+
minHeight?: number
|
|
275
|
+
maxHeight?: number
|
|
276
|
+
}
|
|
522
277
|
}
|
|
523
278
|
/**
|
|
524
279
|
* <MediaUpload> component props
|
|
525
280
|
*/
|
|
526
|
-
export interface MediaUploadProps extends UploadConfig {
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
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;
|
|
281
|
+
export declare interface MediaUploadProps extends UploadConfig {
|
|
282
|
+
preview?: boolean
|
|
283
|
+
dropzone?: boolean
|
|
284
|
+
multiple?: boolean
|
|
285
|
+
autoUpload?: boolean
|
|
286
|
+
showProgress?: boolean
|
|
287
|
+
disabled?: boolean
|
|
288
|
+
class?: string
|
|
289
|
+
style?: string
|
|
290
|
+
id?: string
|
|
291
|
+
placeholder?: string
|
|
292
|
+
label?: string
|
|
549
293
|
}
|
|
550
294
|
/**
|
|
551
295
|
* @upload directive options
|
|
552
296
|
*/
|
|
553
|
-
export interface UploadDirectiveOptions extends Omit<MediaUploadProps, 'endpoint'> {
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
onComplete?: string;
|
|
558
|
-
/** Error callback variable name */
|
|
559
|
-
onError?: string;
|
|
297
|
+
export declare interface UploadDirectiveOptions extends Omit<MediaUploadProps, 'endpoint'> {
|
|
298
|
+
onProgress?: string
|
|
299
|
+
onComplete?: string
|
|
300
|
+
onError?: string
|
|
560
301
|
}
|
|
561
302
|
/**
|
|
562
303
|
* Signed URL result
|
|
563
304
|
*/
|
|
564
|
-
export interface SignedUrl {
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
/** Expiration timestamp (ms) */
|
|
570
|
-
expires: number;
|
|
571
|
-
/** Whether URL is one-time use */
|
|
572
|
-
oneTimeUse?: boolean;
|
|
305
|
+
export declare interface SignedUrl {
|
|
306
|
+
url: string
|
|
307
|
+
signature: string
|
|
308
|
+
expires: number
|
|
309
|
+
oneTimeUse?: boolean
|
|
573
310
|
}
|
|
574
311
|
/**
|
|
575
312
|
* Signature request configuration
|
|
576
313
|
*/
|
|
577
|
-
export interface SignatureConfig {
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
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>;
|
|
314
|
+
export declare interface SignatureConfig {
|
|
315
|
+
endpoint: string
|
|
316
|
+
method?: 'GET' | 'POST'
|
|
317
|
+
headers?: Record<string, string>
|
|
318
|
+
expirationSeconds?: number
|
|
319
|
+
oneTimeUse?: boolean
|
|
320
|
+
params?: Record<string, unknown>
|
|
590
321
|
}
|
|
591
322
|
/**
|
|
592
323
|
* Batch signature request
|
|
593
324
|
*/
|
|
594
|
-
export interface BatchSignatureRequest {
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
/** Signature configuration */
|
|
598
|
-
config: SignatureConfig;
|
|
325
|
+
export declare interface BatchSignatureRequest {
|
|
326
|
+
sources: string[]
|
|
327
|
+
config: SignatureConfig
|
|
599
328
|
}
|
|
600
329
|
/**
|
|
601
330
|
* Batch signature result
|
|
602
331
|
*/
|
|
603
|
-
export interface BatchSignatureResult {
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
/** Sources that failed to sign */
|
|
607
|
-
errors: Map<string, string>;
|
|
332
|
+
export declare interface BatchSignatureResult {
|
|
333
|
+
signatures: Map<string, SignedUrl>
|
|
334
|
+
errors: Map<string, string>
|
|
608
335
|
}
|
|
609
336
|
/**
|
|
610
337
|
* Protected media authentication context
|
|
611
338
|
*/
|
|
612
|
-
export interface ProtectedAuthContext {
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
/** User ID (for ownership check) */
|
|
618
|
-
userId?: string;
|
|
619
|
-
/** Custom auth function */
|
|
620
|
-
check?: () => boolean | Promise<boolean>;
|
|
339
|
+
export declare interface ProtectedAuthContext {
|
|
340
|
+
role?: string
|
|
341
|
+
permission?: string
|
|
342
|
+
userId?: string
|
|
343
|
+
check?: () => boolean | Promise<boolean>
|
|
621
344
|
}
|
|
622
345
|
/**
|
|
623
346
|
* <ProtectedImg> component props
|
|
624
347
|
*/
|
|
625
|
-
export interface ProtectedMediaProps {
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
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;
|
|
348
|
+
export declare interface ProtectedMediaProps {
|
|
349
|
+
src: string
|
|
350
|
+
alt?: string
|
|
351
|
+
signatureEndpoint?: string
|
|
352
|
+
signatureConfig?: Partial<SignatureConfig>
|
|
353
|
+
auth?: ProtectedAuthContext
|
|
354
|
+
fallback?: string
|
|
355
|
+
oneTimeUse?: boolean
|
|
356
|
+
class?: string
|
|
357
|
+
style?: string
|
|
644
358
|
}
|
|
645
359
|
/**
|
|
646
360
|
* @protected directive options
|
|
647
361
|
*/
|
|
648
|
-
export interface ProtectedDirectiveOptions extends Omit<ProtectedMediaProps, 'src' | 'alt'> {
|
|
649
|
-
}
|
|
362
|
+
export declare interface ProtectedDirectiveOptions extends Omit<ProtectedMediaProps, 'src' | 'alt'> {}
|
|
650
363
|
/**
|
|
651
364
|
* Media manager configuration
|
|
652
365
|
*/
|
|
653
|
-
export interface MediaManagerConfig {
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
customStyles?: Record<string, string>;
|
|
668
|
-
/** Callback variable names */
|
|
669
|
-
callbacks?: {
|
|
670
|
-
onSelect?: string;
|
|
671
|
-
onUpload?: string;
|
|
672
|
-
onDelete?: string;
|
|
673
|
-
onError?: string;
|
|
674
|
-
};
|
|
366
|
+
export declare interface MediaManagerConfig {
|
|
367
|
+
src: string
|
|
368
|
+
apiKey?: string
|
|
369
|
+
bucket?: string
|
|
370
|
+
allowedTypes?: string[]
|
|
371
|
+
maxFileSize?: number
|
|
372
|
+
multiple?: boolean
|
|
373
|
+
customStyles?: Record<string, string>
|
|
374
|
+
callbacks?: {
|
|
375
|
+
onSelect?: string
|
|
376
|
+
onUpload?: string
|
|
377
|
+
onDelete?: string
|
|
378
|
+
onError?: string
|
|
379
|
+
}
|
|
675
380
|
}
|
|
676
381
|
/**
|
|
677
382
|
* Media item from manager
|
|
678
383
|
*/
|
|
679
|
-
export interface MediaItem {
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
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>;
|
|
384
|
+
export declare interface MediaItem {
|
|
385
|
+
id: string
|
|
386
|
+
url: string
|
|
387
|
+
name: string
|
|
388
|
+
type: string
|
|
389
|
+
size: number
|
|
390
|
+
width?: number
|
|
391
|
+
height?: number
|
|
392
|
+
duration?: number
|
|
393
|
+
createdAt: string
|
|
394
|
+
updatedAt: string
|
|
395
|
+
metadata?: Record<string, unknown>
|
|
702
396
|
}
|
|
703
397
|
/**
|
|
704
398
|
* Image optimization configuration
|
|
705
399
|
*/
|
|
706
|
-
export interface MediaImageConfig {
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
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;
|
|
400
|
+
export declare interface MediaImageConfig {
|
|
401
|
+
enabled?: boolean
|
|
402
|
+
defaultWidths?: number[]
|
|
403
|
+
defaultFormats?: ImageFormat[]
|
|
404
|
+
defaultQuality?: number
|
|
405
|
+
placeholderStrategy?: PlaceholderStrategy
|
|
406
|
+
lazyByDefault?: boolean
|
|
407
|
+
editingEndpoint?: string | null
|
|
408
|
+
outputDir?: string
|
|
409
|
+
baseUrl?: string
|
|
410
|
+
enableDpr?: boolean
|
|
411
|
+
defaultDpr?: number[]
|
|
412
|
+
tsImages?: Record<string, unknown>
|
|
413
|
+
autoSiblings?: boolean
|
|
745
414
|
}
|
|
746
415
|
/**
|
|
747
416
|
* Video configuration
|
|
748
417
|
*/
|
|
749
|
-
export interface MediaVideoConfig {
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
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>;
|
|
418
|
+
export declare interface MediaVideoConfig {
|
|
419
|
+
enabled?: boolean
|
|
420
|
+
plyrVersion?: string
|
|
421
|
+
plyrTheme?: string
|
|
422
|
+
lazyByDefault?: boolean
|
|
423
|
+
defaultControls?: boolean
|
|
424
|
+
defaultPlyrOptions?: Partial<PlyrOptions>
|
|
425
|
+
tsVideos?: Record<string, unknown>
|
|
764
426
|
}
|
|
765
427
|
/**
|
|
766
428
|
* Upload configuration
|
|
767
429
|
*/
|
|
768
|
-
export interface MediaUploadConfig {
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
/** Allowed file types */
|
|
776
|
-
allowedTypes?: string[];
|
|
777
|
-
/** Chunk size for large uploads */
|
|
778
|
-
chunkSize?: number;
|
|
779
|
-
/** Maximum concurrent uploads */
|
|
780
|
-
maxConcurrent?: number;
|
|
430
|
+
export declare interface MediaUploadConfig {
|
|
431
|
+
enabled?: boolean
|
|
432
|
+
defaultEndpoint?: string
|
|
433
|
+
maxSize?: number
|
|
434
|
+
allowedTypes?: string[]
|
|
435
|
+
chunkSize?: number
|
|
436
|
+
maxConcurrent?: number
|
|
781
437
|
}
|
|
782
438
|
/**
|
|
783
439
|
* Protected media configuration
|
|
784
440
|
*/
|
|
785
|
-
export interface MediaProtectedConfig {
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
/** Default expiration time (seconds) */
|
|
791
|
-
expirationSeconds?: number;
|
|
792
|
-
/** Batch signature request size */
|
|
793
|
-
batchSize?: number;
|
|
441
|
+
export declare interface MediaProtectedConfig {
|
|
442
|
+
enabled?: boolean
|
|
443
|
+
signatureEndpoint?: string
|
|
444
|
+
expirationSeconds?: number
|
|
445
|
+
batchSize?: number
|
|
794
446
|
}
|
|
795
447
|
/**
|
|
796
448
|
* Media cache configuration
|
|
797
449
|
*/
|
|
798
|
-
export interface MediaCacheConfig {
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
/** Max cache age in days */
|
|
804
|
-
maxAge?: number;
|
|
805
|
-
/** Max cache size in MB */
|
|
806
|
-
maxSize?: number;
|
|
450
|
+
export declare interface MediaCacheConfig {
|
|
451
|
+
enabled?: boolean
|
|
452
|
+
directory?: string
|
|
453
|
+
maxAge?: number
|
|
454
|
+
maxSize?: number
|
|
807
455
|
}
|
|
808
456
|
/**
|
|
809
457
|
* Complete media module configuration
|
|
810
458
|
*/
|
|
811
|
-
export interface MediaConfig {
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
/** Upload configuration */
|
|
819
|
-
upload?: MediaUploadConfig;
|
|
820
|
-
/** Protected media configuration */
|
|
821
|
-
protected?: MediaProtectedConfig;
|
|
822
|
-
/** Cache configuration */
|
|
823
|
-
cache?: MediaCacheConfig;
|
|
459
|
+
export declare interface MediaConfig {
|
|
460
|
+
enabled?: boolean
|
|
461
|
+
image?: MediaImageConfig
|
|
462
|
+
video?: MediaVideoConfig
|
|
463
|
+
upload?: MediaUploadConfig
|
|
464
|
+
protected?: MediaProtectedConfig
|
|
465
|
+
cache?: MediaCacheConfig
|
|
824
466
|
}
|
|
825
467
|
/**
|
|
826
468
|
* Lazy load observer options
|
|
827
469
|
*/
|
|
828
|
-
export interface LazyLoadOptions {
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
/** Intersection threshold(s) */
|
|
834
|
-
threshold?: number | number[];
|
|
835
|
-
/** Use native loading="lazy" when supported */
|
|
836
|
-
useNative?: boolean;
|
|
470
|
+
export declare interface LazyLoadOptions {
|
|
471
|
+
root?: Element | null
|
|
472
|
+
rootMargin?: string
|
|
473
|
+
threshold?: number | number[]
|
|
474
|
+
useNative?: boolean
|
|
837
475
|
}
|
|
838
476
|
/**
|
|
839
477
|
* Blur-up animation options
|
|
840
478
|
*/
|
|
841
|
-
export interface BlurUpOptions {
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
/** Remove placeholder after load */
|
|
847
|
-
removePlaceholder?: boolean;
|
|
848
|
-
/** Class to add when loaded */
|
|
849
|
-
loadedClass?: string;
|
|
479
|
+
export declare interface BlurUpOptions {
|
|
480
|
+
duration?: number
|
|
481
|
+
easing?: string
|
|
482
|
+
removePlaceholder?: boolean
|
|
483
|
+
loadedClass?: string
|
|
850
484
|
}
|
|
851
485
|
/**
|
|
852
486
|
* Breakpoint definition for responsive images
|
|
853
487
|
*/
|
|
854
|
-
export interface Breakpoint {
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
/** Max-width in pixels */
|
|
860
|
-
maxWidth?: number;
|
|
861
|
-
/** Image width at this breakpoint */
|
|
862
|
-
imageWidth: number | string;
|
|
488
|
+
export declare interface Breakpoint {
|
|
489
|
+
name: string
|
|
490
|
+
minWidth?: number
|
|
491
|
+
maxWidth?: number
|
|
492
|
+
imageWidth: number | string
|
|
863
493
|
}
|
|
864
494
|
/**
|
|
865
495
|
* Srcset generation options
|
|
866
496
|
*/
|
|
867
|
-
export interface SrcsetOptions {
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
fixedWidth?: number;
|
|
876
|
-
/** Output formats */
|
|
877
|
-
formats?: ImageFormat[];
|
|
878
|
-
/** Base URL for paths */
|
|
879
|
-
baseUrl?: string;
|
|
880
|
-
/** Image transformation params */
|
|
881
|
-
params?: ImageParams;
|
|
497
|
+
export declare interface SrcsetOptions {
|
|
498
|
+
src: string
|
|
499
|
+
widths?: number[]
|
|
500
|
+
dprValues?: number[]
|
|
501
|
+
fixedWidth?: number
|
|
502
|
+
formats?: ImageFormat[]
|
|
503
|
+
baseUrl?: string
|
|
504
|
+
params?: ImageParams
|
|
882
505
|
}
|
|
883
506
|
/**
|
|
884
507
|
* Generated srcset data
|
|
885
508
|
*/
|
|
886
|
-
export interface SrcsetData {
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
/** MIME type */
|
|
892
|
-
mimeType: string;
|
|
893
|
-
/** Array of variants included */
|
|
894
|
-
variants: ImageVariant[];
|
|
509
|
+
export declare interface SrcsetData {
|
|
510
|
+
srcset: string
|
|
511
|
+
format: ImageFormat
|
|
512
|
+
mimeType: string
|
|
513
|
+
variants: ImageVariant[]
|
|
895
514
|
}
|
|
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
515
|
/**
|
|
909
516
|
* Watermark configuration
|
|
910
517
|
*/
|
|
911
|
-
export interface WatermarkConfig {
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
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;
|
|
518
|
+
export declare interface WatermarkConfig {
|
|
519
|
+
image?: string
|
|
520
|
+
text?: string
|
|
521
|
+
position?: WatermarkPosition
|
|
522
|
+
opacity?: number
|
|
523
|
+
scale?: number
|
|
524
|
+
font?: string
|
|
525
|
+
fontSize?: number
|
|
526
|
+
color?: string
|
|
928
527
|
}
|
|
929
528
|
/**
|
|
930
529
|
* Art direction configuration for responsive images
|
|
931
530
|
*/
|
|
932
|
-
export interface ArtDirectionConfig {
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
widths?: number[];
|
|
939
|
-
/** Optional crop settings for this breakpoint */
|
|
940
|
-
crop?: ImageCrop;
|
|
941
|
-
/** Optional aspect ratio override */
|
|
942
|
-
aspectRatio?: string;
|
|
531
|
+
export declare interface ArtDirectionConfig {
|
|
532
|
+
media: string
|
|
533
|
+
src: string
|
|
534
|
+
widths?: number[]
|
|
535
|
+
crop?: ImageCrop
|
|
536
|
+
aspectRatio?: string
|
|
943
537
|
}
|
|
944
538
|
/**
|
|
945
539
|
* Image transformation configuration
|
|
946
540
|
*/
|
|
947
|
-
export interface ImageTransformationConfig {
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
value?: number;
|
|
959
|
-
};
|
|
541
|
+
export declare interface ImageTransformationConfig {
|
|
542
|
+
type: ImageTransformation
|
|
543
|
+
options?: {
|
|
544
|
+
width?: number
|
|
545
|
+
height?: number
|
|
546
|
+
fit?: ImageFit
|
|
547
|
+
sigma?: number
|
|
548
|
+
amount?: number
|
|
549
|
+
angle?: number
|
|
550
|
+
value?: number
|
|
551
|
+
}
|
|
960
552
|
}
|
|
961
553
|
/**
|
|
962
554
|
* Format-specific quality settings for ts-images
|
|
963
555
|
*/
|
|
964
|
-
export interface FormatQualitySettings {
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
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;
|
|
556
|
+
export declare interface FormatQualitySettings {
|
|
557
|
+
jpeg?: {
|
|
558
|
+
quality?: number
|
|
559
|
+
mozjpeg?: boolean
|
|
560
|
+
chromaSubsampling?: '4:4:4' | '4:2:2' | '4:2:0'
|
|
561
|
+
progressive?: boolean
|
|
562
|
+
optimizeCoding?: boolean
|
|
563
|
+
}
|
|
564
|
+
png?: {
|
|
565
|
+
quality?: number
|
|
566
|
+
compressionLevel?: number
|
|
567
|
+
palette?: boolean
|
|
568
|
+
adaptiveFiltering?: boolean
|
|
569
|
+
progressive?: boolean
|
|
570
|
+
}
|
|
571
|
+
webp?: {
|
|
572
|
+
quality?: number
|
|
573
|
+
lossless?: boolean
|
|
574
|
+
effort?: number
|
|
575
|
+
smartSubsample?: boolean
|
|
576
|
+
nearLossless?: number
|
|
577
|
+
}
|
|
578
|
+
avif?: {
|
|
579
|
+
quality?: number
|
|
580
|
+
lossless?: boolean
|
|
581
|
+
effort?: number
|
|
582
|
+
chromaSubsampling?: '4:4:4' | '4:2:2' | '4:2:0'
|
|
583
|
+
}
|
|
584
|
+
[format: string]: Record<string, unknown> | undefined
|
|
1017
585
|
}
|
|
1018
586
|
/**
|
|
1019
587
|
* ts-images integration configuration
|
|
1020
588
|
*/
|
|
1021
|
-
export interface TsImagesConfig {
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
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;
|
|
589
|
+
export declare interface TsImagesConfig {
|
|
590
|
+
enabled: boolean
|
|
591
|
+
outputDir: string
|
|
592
|
+
baseUrl?: string
|
|
593
|
+
formatQuality?: FormatQualitySettings
|
|
594
|
+
breakpoints?: number[]
|
|
595
|
+
defaultFormats?: ImageFormat[]
|
|
596
|
+
defaultQuality?: number
|
|
597
|
+
batchOptions?: {
|
|
598
|
+
concurrency?: number
|
|
599
|
+
optimizationPreset?: ImageOptimizationPreset
|
|
600
|
+
}
|
|
601
|
+
placeholderStrategy?: string
|
|
602
|
+
generateSprites?: boolean
|
|
603
|
+
spriteOutputDir?: string
|
|
1049
604
|
}
|
|
1050
605
|
/**
|
|
1051
606
|
* Enhanced image props with ts-images integration
|
|
1052
607
|
*/
|
|
1053
|
-
export interface EnhancedImgProps extends ImgProps {
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
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;
|
|
608
|
+
export declare interface EnhancedImgProps extends ImgProps {
|
|
609
|
+
preset?: ImageOptimizationPreset
|
|
610
|
+
process?: boolean
|
|
611
|
+
transformations?: ImageTransformationConfig[]
|
|
612
|
+
responsiveWidths?: number[]
|
|
613
|
+
watermark?: WatermarkConfig
|
|
614
|
+
artDirection?: ArtDirectionConfig[]
|
|
615
|
+
useDominantColor?: boolean
|
|
616
|
+
embedThumbhash?: boolean
|
|
617
|
+
blurAmount?: number
|
|
618
|
+
outputPattern?: string
|
|
619
|
+
skipOptimization?: boolean
|
|
620
|
+
outputFormat?: ImageFormat
|
|
1078
621
|
}
|
|
1079
622
|
/**
|
|
1080
623
|
* Result from processing an image with ts-images
|
|
1081
624
|
*/
|
|
1082
|
-
export interface ProcessedImageResult {
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
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[];
|
|
625
|
+
export declare interface ProcessedImageResult {
|
|
626
|
+
src: string
|
|
627
|
+
processed: boolean
|
|
628
|
+
variants?: Array<{
|
|
629
|
+
path: string
|
|
630
|
+
url: string
|
|
631
|
+
width: number
|
|
632
|
+
height: number
|
|
633
|
+
format: ImageFormat
|
|
634
|
+
size: number
|
|
635
|
+
dpr?: number
|
|
636
|
+
}>
|
|
637
|
+
placeholder?: string
|
|
638
|
+
dominantColor?: string
|
|
639
|
+
originalWidth?: number
|
|
640
|
+
originalHeight?: number
|
|
641
|
+
hash?: string
|
|
642
|
+
errors?: string[]
|
|
1115
643
|
}
|
|
1116
644
|
/**
|
|
1117
645
|
* Responsive variant set result
|
|
1118
646
|
*/
|
|
1119
|
-
export interface ResponsiveVariantSet {
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
dataURL: string;
|
|
1131
|
-
width: number;
|
|
1132
|
-
height: number;
|
|
1133
|
-
strategy: PlaceholderStrategy;
|
|
1134
|
-
};
|
|
647
|
+
export declare interface ResponsiveVariantSet {
|
|
648
|
+
src: string
|
|
649
|
+
byFormat: Record<ImageFormat, ProcessedImageResult['variants']>
|
|
650
|
+
srcsets: Record<ImageFormat, string>
|
|
651
|
+
sizes?: string
|
|
652
|
+
placeholder?: {
|
|
653
|
+
dataURL: string
|
|
654
|
+
width: number
|
|
655
|
+
height: number
|
|
656
|
+
strategy: PlaceholderStrategy
|
|
657
|
+
}
|
|
1135
658
|
}
|
|
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
659
|
/**
|
|
1153
660
|
* Poster/thumbnail generation options
|
|
1154
661
|
*/
|
|
1155
|
-
export interface PosterGenerationConfig {
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
height?: number;
|
|
1162
|
-
/** Output format */
|
|
1163
|
-
format?: 'jpeg' | 'png' | 'webp';
|
|
1164
|
-
/** Quality (1-100) */
|
|
1165
|
-
quality?: number;
|
|
662
|
+
export declare interface PosterGenerationConfig {
|
|
663
|
+
timestamp?: number
|
|
664
|
+
width?: number
|
|
665
|
+
height?: number
|
|
666
|
+
format?: 'jpeg' | 'png' | 'webp'
|
|
667
|
+
quality?: number
|
|
1166
668
|
}
|
|
1167
669
|
/**
|
|
1168
670
|
* Sprite sheet configuration for video scrubbing preview
|
|
1169
671
|
*/
|
|
1170
|
-
export interface SpriteSheetConfig {
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
/** Interval between frames in seconds */
|
|
1178
|
-
interval?: number;
|
|
1179
|
-
/** Output format */
|
|
1180
|
-
format?: 'jpeg' | 'png' | 'webp';
|
|
1181
|
-
/** Quality (1-100) */
|
|
1182
|
-
quality?: number;
|
|
672
|
+
export declare interface SpriteSheetConfig {
|
|
673
|
+
columns?: number
|
|
674
|
+
thumbnailWidth?: number
|
|
675
|
+
thumbnailHeight?: number
|
|
676
|
+
interval?: number
|
|
677
|
+
format?: 'jpeg' | 'png' | 'webp'
|
|
678
|
+
quality?: number
|
|
1183
679
|
}
|
|
1184
680
|
/**
|
|
1185
681
|
* Streaming quality level configuration
|
|
1186
682
|
*/
|
|
1187
|
-
export interface StreamingQualityLevel {
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
height?: number;
|
|
1194
|
-
/** Video bitrate in bps */
|
|
1195
|
-
bitrate: number;
|
|
1196
|
-
/** Audio bitrate in bps */
|
|
1197
|
-
audioBitrate?: number;
|
|
683
|
+
export declare interface StreamingQualityLevel {
|
|
684
|
+
label: string
|
|
685
|
+
width: number
|
|
686
|
+
height?: number
|
|
687
|
+
bitrate: number
|
|
688
|
+
audioBitrate?: number
|
|
1198
689
|
}
|
|
1199
690
|
/**
|
|
1200
691
|
* Adaptive streaming configuration
|
|
1201
692
|
*/
|
|
1202
|
-
export interface StreamingConfig {
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
enabled: boolean;
|
|
1212
|
-
keyUrl?: string;
|
|
1213
|
-
iv?: string;
|
|
1214
|
-
};
|
|
693
|
+
export declare interface StreamingConfig {
|
|
694
|
+
format?: 'hls' | 'dash'
|
|
695
|
+
segmentDuration?: number
|
|
696
|
+
qualities?: StreamingQualityLevel[]
|
|
697
|
+
encryption?: {
|
|
698
|
+
enabled: boolean
|
|
699
|
+
keyUrl?: string
|
|
700
|
+
iv?: string
|
|
701
|
+
}
|
|
1215
702
|
}
|
|
1216
703
|
/**
|
|
1217
704
|
* Video transcoding options
|
|
1218
705
|
*/
|
|
1219
|
-
export interface TranscodeConfig {
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
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;
|
|
706
|
+
export declare interface TranscodeConfig {
|
|
707
|
+
codec?: VideoCodec
|
|
708
|
+
bitrate?: number
|
|
709
|
+
maxWidth?: number
|
|
710
|
+
maxHeight?: number
|
|
711
|
+
frameRate?: number
|
|
712
|
+
audioCodec?: AudioCodec
|
|
713
|
+
audioBitrate?: number
|
|
714
|
+
sampleRate?: number
|
|
715
|
+
channels?: number
|
|
716
|
+
twoPass?: boolean
|
|
717
|
+
speedPreset?: 'ultrafast' | 'superfast' | 'veryfast' | 'faster' | 'fast' | 'medium' | 'slow' | 'slower' | 'veryslow'
|
|
718
|
+
crf?: number
|
|
1244
719
|
}
|
|
1245
720
|
/**
|
|
1246
721
|
* Waveform visualization configuration
|
|
1247
722
|
*/
|
|
1248
|
-
export interface WaveformConfig {
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
/** Background color */
|
|
1256
|
-
backgroundColor?: string;
|
|
1257
|
-
/** Output format */
|
|
1258
|
-
format?: 'png' | 'svg' | 'json';
|
|
1259
|
-
/** Number of samples to render */
|
|
1260
|
-
samples?: number;
|
|
723
|
+
export declare interface WaveformConfig {
|
|
724
|
+
width?: number
|
|
725
|
+
height?: number
|
|
726
|
+
color?: string
|
|
727
|
+
backgroundColor?: string
|
|
728
|
+
format?: 'png' | 'svg' | 'json'
|
|
729
|
+
samples?: number
|
|
1261
730
|
}
|
|
1262
731
|
/**
|
|
1263
732
|
* ts-videos integration configuration
|
|
1264
733
|
*/
|
|
1265
|
-
export interface TsVideosConfig {
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
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
|
-
};
|
|
734
|
+
export declare interface TsVideosConfig {
|
|
735
|
+
enabled: boolean
|
|
736
|
+
outputDir: string
|
|
737
|
+
baseUrl?: string
|
|
738
|
+
defaultQuality?: VideoQualityPreset
|
|
739
|
+
streaming?: {
|
|
740
|
+
enabled: boolean
|
|
741
|
+
format?: 'hls' | 'dash'
|
|
742
|
+
segmentDuration?: number
|
|
743
|
+
defaultQualities?: StreamingQualityLevel[]
|
|
744
|
+
}
|
|
745
|
+
thumbnails?: {
|
|
746
|
+
enabled: boolean
|
|
747
|
+
count?: number
|
|
748
|
+
interval?: number
|
|
749
|
+
format?: 'jpeg' | 'png' | 'webp'
|
|
750
|
+
width?: number
|
|
751
|
+
}
|
|
752
|
+
transcoding?: {
|
|
753
|
+
defaultCodec?: VideoCodec
|
|
754
|
+
defaultAudioCodec?: AudioCodec
|
|
755
|
+
speedPreset?: TranscodeConfig['speedPreset']
|
|
756
|
+
}
|
|
1307
757
|
}
|
|
1308
758
|
/**
|
|
1309
759
|
* Enhanced video props with ts-videos integration
|
|
1310
760
|
*/
|
|
1311
|
-
export interface EnhancedVideoProps extends VideoProps {
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
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;
|
|
761
|
+
export declare interface EnhancedVideoProps extends VideoProps {
|
|
762
|
+
quality?: VideoQualityPreset
|
|
763
|
+
platform?: VideoPlatformPreset
|
|
764
|
+
process?: boolean
|
|
765
|
+
generatePoster?: boolean | PosterGenerationConfig
|
|
766
|
+
spriteSheet?: boolean | SpriteSheetConfig
|
|
767
|
+
streaming?: boolean | StreamingConfig
|
|
768
|
+
transcode?: TranscodeConfig
|
|
769
|
+
waveform?: boolean | WaveformConfig
|
|
770
|
+
onProcessProgress?: (progress: {
|
|
771
|
+
percentage: number
|
|
772
|
+
currentTime: number
|
|
773
|
+
duration: number
|
|
774
|
+
stage: 'analyzing' | 'transcoding' | 'generating-manifests' | 'complete'
|
|
775
|
+
}) => void
|
|
776
|
+
outputPattern?: string
|
|
777
|
+
skipProcessing?: boolean
|
|
778
|
+
title?: string
|
|
1341
779
|
}
|
|
1342
780
|
/**
|
|
1343
781
|
* Result from generating a thumbnail
|
|
1344
782
|
*/
|
|
1345
|
-
export interface ThumbnailResult {
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
/** Height in pixels */
|
|
1353
|
-
height: number;
|
|
1354
|
-
/** Timestamp in seconds */
|
|
1355
|
-
timestamp: number;
|
|
1356
|
-
/** File size in bytes */
|
|
1357
|
-
size: number;
|
|
783
|
+
export declare interface ThumbnailResult {
|
|
784
|
+
path: string
|
|
785
|
+
url: string
|
|
786
|
+
width: number
|
|
787
|
+
height: number
|
|
788
|
+
timestamp: number
|
|
789
|
+
size: number
|
|
1358
790
|
}
|
|
1359
791
|
/**
|
|
1360
792
|
* Result from generating HLS manifest
|
|
1361
793
|
*/
|
|
1362
|
-
export interface HLSResult {
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
}>;
|
|
1373
|
-
/** Total segment count */
|
|
1374
|
-
segmentCount: number;
|
|
1375
|
-
/** Total duration in seconds */
|
|
1376
|
-
duration: number;
|
|
794
|
+
export declare interface HLSResult {
|
|
795
|
+
manifestUrl: string
|
|
796
|
+
manifestPath: string
|
|
797
|
+
playlists: Array<{
|
|
798
|
+
quality: StreamingQualityLevel
|
|
799
|
+
url: string
|
|
800
|
+
path: string
|
|
801
|
+
}>
|
|
802
|
+
segmentCount: number
|
|
803
|
+
duration: number
|
|
1377
804
|
}
|
|
1378
805
|
/**
|
|
1379
806
|
* Result from generating DASH manifest
|
|
1380
807
|
*/
|
|
1381
|
-
export interface DASHResult {
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
}>;
|
|
1395
|
-
}>;
|
|
1396
|
-
/** Total duration in seconds */
|
|
1397
|
-
duration: number;
|
|
808
|
+
export declare interface DASHResult {
|
|
809
|
+
manifestUrl: string
|
|
810
|
+
manifestPath: string
|
|
811
|
+
adaptationSets: Array<{
|
|
812
|
+
type: 'video' | 'audio'
|
|
813
|
+
representations: Array<{
|
|
814
|
+
bandwidth: number
|
|
815
|
+
width?: number
|
|
816
|
+
height?: number
|
|
817
|
+
url: string
|
|
818
|
+
}>
|
|
819
|
+
}>
|
|
820
|
+
duration: number
|
|
1398
821
|
}
|
|
1399
822
|
/**
|
|
1400
823
|
* Result from video transcoding
|
|
1401
824
|
*/
|
|
1402
|
-
export interface TranscodeResult {
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
audio?: {
|
|
1421
|
-
codec: AudioCodec;
|
|
1422
|
-
bitrate: number;
|
|
1423
|
-
sampleRate: number;
|
|
1424
|
-
channels: number;
|
|
1425
|
-
};
|
|
825
|
+
export declare interface TranscodeResult {
|
|
826
|
+
path: string
|
|
827
|
+
url: string
|
|
828
|
+
duration: number
|
|
829
|
+
size: number
|
|
830
|
+
video: {
|
|
831
|
+
codec: VideoCodec
|
|
832
|
+
width: number
|
|
833
|
+
height: number
|
|
834
|
+
bitrate: number
|
|
835
|
+
frameRate: number
|
|
836
|
+
}
|
|
837
|
+
audio?: {
|
|
838
|
+
codec: AudioCodec
|
|
839
|
+
bitrate: number
|
|
840
|
+
sampleRate: number
|
|
841
|
+
channels: number
|
|
842
|
+
}
|
|
1426
843
|
}
|
|
1427
844
|
/**
|
|
1428
845
|
* Result from processing a video with ts-videos
|
|
1429
846
|
*/
|
|
1430
|
-
export interface ProcessedVideoResult {
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
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[];
|
|
847
|
+
export declare interface ProcessedVideoResult {
|
|
848
|
+
src: string
|
|
849
|
+
processed: boolean
|
|
850
|
+
transcoded?: TranscodeResult
|
|
851
|
+
poster?: ThumbnailResult
|
|
852
|
+
thumbnails?: ThumbnailResult[]
|
|
853
|
+
spriteSheet?: {
|
|
854
|
+
url: string
|
|
855
|
+
path: string
|
|
856
|
+
columns: number
|
|
857
|
+
rows: number
|
|
858
|
+
thumbnailWidth: number
|
|
859
|
+
thumbnailHeight: number
|
|
860
|
+
interval: number
|
|
861
|
+
totalFrames: number
|
|
862
|
+
}
|
|
863
|
+
streaming?: {
|
|
864
|
+
hls?: HLSResult
|
|
865
|
+
dash?: DASHResult
|
|
866
|
+
}
|
|
867
|
+
waveform?: {
|
|
868
|
+
url: string
|
|
869
|
+
path: string
|
|
870
|
+
data?: number[]
|
|
871
|
+
}
|
|
872
|
+
metadata?: {
|
|
873
|
+
duration: number
|
|
874
|
+
width: number
|
|
875
|
+
height: number
|
|
876
|
+
frameRate: number
|
|
877
|
+
bitrate: number
|
|
878
|
+
codec: string
|
|
879
|
+
audioCodec?: string
|
|
880
|
+
}
|
|
881
|
+
hash?: string
|
|
882
|
+
errors?: string[]
|
|
1477
883
|
}
|
|
884
|
+
/**
|
|
885
|
+
* Placeholder generation strategies for lazy loading
|
|
886
|
+
*/
|
|
887
|
+
export type PlaceholderStrategy = | 'blur' // Low-quality blurred image (LQIP)
|
|
888
|
+
| 'thumbhash' // Thumbhash-based placeholder
|
|
889
|
+
| 'blurhash' // Blurhash-based placeholder
|
|
890
|
+
| 'pixelate' // Pixelated low-res version
|
|
891
|
+
| 'dominant-color' // Solid dominant color
|
|
892
|
+
| 'none' // No placeholder;
|
|
893
|
+
/**
|
|
894
|
+
* Supported image formats
|
|
895
|
+
*/
|
|
896
|
+
export type ImageFormat = 'webp' | 'avif' | 'jpeg' | 'png' | 'gif';
|
|
897
|
+
/**
|
|
898
|
+
* Image fit modes (similar to CSS object-fit)
|
|
899
|
+
*/
|
|
900
|
+
export type ImageFit = 'clip' | 'crop' | 'fill' | 'max' | 'min' | 'scale' | 'cover' | 'contain';
|
|
901
|
+
/**
|
|
902
|
+
* Image crop positions
|
|
903
|
+
*/
|
|
904
|
+
export type ImageCrop = | 'top'
|
|
905
|
+
| 'bottom'
|
|
906
|
+
| 'left'
|
|
907
|
+
| 'right'
|
|
908
|
+
| 'center'
|
|
909
|
+
| 'top-left'
|
|
910
|
+
| 'top-right'
|
|
911
|
+
| 'bottom-left'
|
|
912
|
+
| 'bottom-right'
|
|
913
|
+
| 'faces' // AI face detection
|
|
914
|
+
| 'entropy' // Maximum entropy region;
|
|
915
|
+
/**
|
|
916
|
+
* Video embed type
|
|
917
|
+
*/
|
|
918
|
+
export type VideoEmbedType = 'video' | 'youtube' | 'vimeo' | 'dailymotion' | 'twitch';
|
|
919
|
+
/**
|
|
920
|
+
* Plyr.js control options
|
|
921
|
+
*/
|
|
922
|
+
export type PlyrControl = | 'play-large'
|
|
923
|
+
| 'restart'
|
|
924
|
+
| 'rewind'
|
|
925
|
+
| 'play'
|
|
926
|
+
| 'fast-forward'
|
|
927
|
+
| 'progress'
|
|
928
|
+
| 'current-time'
|
|
929
|
+
| 'duration'
|
|
930
|
+
| 'mute'
|
|
931
|
+
| 'volume'
|
|
932
|
+
| 'captions'
|
|
933
|
+
| 'settings'
|
|
934
|
+
| 'pip'
|
|
935
|
+
| 'airplay'
|
|
936
|
+
| 'fullscreen';
|
|
937
|
+
/**
|
|
938
|
+
* Image optimization presets for ts-images
|
|
939
|
+
*/
|
|
940
|
+
export type ImageOptimizationPreset = 'web' | 'quality' | 'performance';
|
|
941
|
+
/**
|
|
942
|
+
* Image transformation types supported by ts-images
|
|
943
|
+
*/
|
|
944
|
+
export type ImageTransformation = | 'resize'
|
|
945
|
+
| 'blur'
|
|
946
|
+
| 'sharpen'
|
|
947
|
+
| 'grayscale'
|
|
948
|
+
| 'rotate'
|
|
949
|
+
| 'flip'
|
|
950
|
+
| 'flop'
|
|
951
|
+
| 'brightness'
|
|
952
|
+
| 'contrast'
|
|
953
|
+
| 'saturation';
|
|
954
|
+
/**
|
|
955
|
+
* Watermark position options
|
|
956
|
+
*/
|
|
957
|
+
export type WatermarkPosition = | 'center'
|
|
958
|
+
| 'top'
|
|
959
|
+
| 'bottom'
|
|
960
|
+
| 'left'
|
|
961
|
+
| 'right'
|
|
962
|
+
| 'top-left'
|
|
963
|
+
| 'top-right'
|
|
964
|
+
| 'bottom-left'
|
|
965
|
+
| 'bottom-right';
|
|
966
|
+
/**
|
|
967
|
+
* Video quality presets
|
|
968
|
+
*/
|
|
969
|
+
export type VideoQualityPreset = | 'very-low'
|
|
970
|
+
| 'low'
|
|
971
|
+
| 'medium'
|
|
972
|
+
| 'high'
|
|
973
|
+
| 'very-high'
|
|
974
|
+
| 'lossless';
|
|
975
|
+
/**
|
|
976
|
+
* Platform-specific video presets
|
|
977
|
+
*/
|
|
978
|
+
export type VideoPlatformPreset = | 'youtube'
|
|
979
|
+
| 'twitter'
|
|
980
|
+
| 'instagram-feed'
|
|
981
|
+
| 'instagram-story'
|
|
982
|
+
| 'instagram-reels'
|
|
983
|
+
| 'tiktok'
|
|
984
|
+
| 'discord'
|
|
985
|
+
| 'linkedin'
|
|
986
|
+
| 'facebook'
|
|
987
|
+
| 'web-progressive'
|
|
988
|
+
| 'web-streaming';
|
|
989
|
+
/**
|
|
990
|
+
* Video codec options
|
|
991
|
+
*/
|
|
992
|
+
export type VideoCodec = 'h264' | 'h265' | 'vp9' | 'av1';
|
|
993
|
+
/**
|
|
994
|
+
* Audio codec options
|
|
995
|
+
*/
|
|
996
|
+
export type AudioCodec = 'aac' | 'opus' | 'mp3' | 'flac';
|