/**
 * Options for placeholder generation
 */
export declare interface PlaceholderOptions {
  strategy: PlaceholderStrategy
  width?: number
  height?: number
  quality?: number
  blurLevel?: number
  transitionDuration?: number
  easing?: string
}
/**
 * Result from placeholder generation
 */
export declare interface PlaceholderResult {
  dataURL: string
  width: number
  height: number
  aspectRatio: number
  originalWidth: number
  originalHeight: number
  strategy: PlaceholderStrategy
  dominantColor?: string
  css?: string
}
/**
 * imgix-style image transformation parameters
 */
export declare interface ImageParams {
  w?: number
  h?: number
  fit?: ImageFit
  crop?: ImageCrop
  ar?: string
  fm?: ImageFormat
  q?: number
  lossless?: boolean
  progressive?: boolean
  blur?: number
  sharp?: number
  bri?: number
  con?: number
  sat?: number
  hue?: number
  exp?: number
  vib?: number
  high?: number
  shad?: number
  gam?: number
  rot?: number
  flip?: 'h' | 'v' | 'hv'
  orient?: number
  mark?: string
  markx?: number
  marky?: number
  markalpha?: number
  markscale?: number
  markalign?: 'top' | 'middle' | 'bottom' | 'left' | 'center' | 'right'
  sepia?: number
  px?: number
  mono?: string
  duotone?: string
  invert?: boolean
  auto?: string | string[]
  dpr?: number
}
/**
 * Image variant generated at a specific size/format
 */
export declare interface ImageVariant {
  path: string
  url: string
  width: number
  height: number
  format: ImageFormat
  size: number
  dpr?: number
}
/**
 * Processed image with all variants
 */
export declare interface ProcessedImage {
  src: string
  variants: ImageVariant[]
  placeholder?: PlaceholderResult
  width: number
  height: number
  aspectRatio: number
  hash: string
}
/**
 * <Img> component props
 */
export declare interface ImgProps {
  src: string
  alt: string
  width?: number | string
  height?: number | string
  sizes?: string
  widths?: number[]
  dpr?: number[]
  formats?: ImageFormat[]
  quality?: number
  params?: ImageParams
  placeholder?: PlaceholderStrategy
  placeholderOptions?: Partial<PlaceholderOptions>
  lazy?: boolean
  priority?: boolean
  loading?: 'lazy' | 'eager'
  decoding?: 'sync' | 'async' | 'auto'
  fetchpriority?: 'high' | 'low' | 'auto'
  objectFit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down'
  objectPosition?: string
  class?: string
  style?: string
  id?: string
  data?: Record<string, string>
  crossorigin?: 'anonymous' | 'use-credentials'
  referrerpolicy?: string
}
/**
 * @img directive options
 */
export declare interface ImgDirectiveOptions extends Omit<ImgProps, 'src' | 'alt'> {
  srcset?: string
}
/**
 * Image render context
 */
export declare interface ImageRenderContext {
  processedImage?: ProcessedImage
  optimize?: boolean
  isDev?: boolean
  baseUrl?: string
  outputDir?: string
}
/**
 * Image render result
 */
export declare interface ImageRenderResult {
  html: string
  preloadLink?: string
  css?: string
  script?: string
}
/**
 * Video source definition
 */
export declare interface VideoSource {
  src: string
  type: string
  media?: string
  codecs?: string
}
/**
 * Plyr.js configuration options
 */
export declare interface PlyrOptions {
  controls?: PlyrControl[] | boolean
  autoplay?: boolean
  muted?: boolean
  loop?: { active: boolean }
  seekTime?: number
  volume?: number
  clickToPlay?: boolean
  hideControls?: number
  resetOnEnd?: boolean
  disableContextMenu?: boolean
  keyboard?: { focused: boolean; global: boolean }
  tooltips?: { controls: boolean; seek: boolean }
  quality?: { default: number; options: number[]; forced: boolean }
  captions?: { active: boolean; language: string; update: boolean }
  storage?: { enabled: boolean; key: string }
  speed?: { selected: number; options: number[] }
  ratio?: string
  fullscreen?: { enabled: boolean; fallback: boolean; iosNative: boolean }
  previewThumbnails?: { enabled: boolean; src: string }
  i18n?: Record<string, string>
}
/**
 * <Video> component props
 */
export declare interface VideoProps {
  src?: string
  sources?: VideoSource[]
  poster?: string
  posterPlaceholder?: PlaceholderStrategy
  controls?: boolean
  autoplay?: boolean
  muted?: boolean
  loop?: boolean
  preload?: 'none' | 'metadata' | 'auto'
  playsinline?: boolean
  lazy?: boolean
  player?: 'native' | 'plyr' | 'ts-video'
  title?: string
  plyrOptions?: PlyrOptions
  type?: VideoEmbedType
  width?: number | string
  height?: number | string
  class?: string
  style?: string
  id?: string
  crossorigin?: 'anonymous' | 'use-credentials'
  disablePictureInPicture?: boolean
  disableRemotePlayback?: boolean
}
/**
 * @video directive options
 */
export declare interface VideoDirectiveOptions extends Omit<VideoProps, 'src'> {}
/**
 * Video render result
 */
export declare interface VideoRenderResult {
  html: string
  script?: string
  css?: string
}
/**
 * File validation result
 */
export declare interface FileValidationResult {
  valid: boolean
  error?: string
  code?: 'INVALID_TYPE' | 'FILE_TOO_LARGE' | 'FILE_TOO_SMALL' | 'INVALID_DIMENSIONS'
}
/**
 * Upload progress information
 */
export declare interface UploadProgress {
  file: File
  loaded: number
  total: number
  percent: number
  speed?: number
  timeRemaining?: number
}
/**
 * Upload result
 */
export declare interface UploadResult {
  success: boolean
  url?: string
  id?: string
  name?: string
  size?: number
  type?: string
  error?: string
  errorCode?: string
  data?: Record<string, unknown>
}
/**
 * Upload configuration
 */
export declare interface UploadConfig {
  endpoint: string
  method?: 'POST' | 'PUT' | 'PATCH'
  headers?: Record<string, string>
  fieldName?: string
  maxSize?: number
  minSize?: number
  maxFiles?: number
  accept?: string[]
  chunkSize?: number
  retries?: number
  timeout?: number
  withCredentials?: boolean
  formData?: Record<string, string>
  validateDimensions?: {
    minWidth?: number
    maxWidth?: number
    minHeight?: number
    maxHeight?: number
  }
}
/**
 * <MediaUpload> component props
 */
export declare interface MediaUploadProps extends UploadConfig {
  preview?: boolean
  dropzone?: boolean
  multiple?: boolean
  autoUpload?: boolean
  showProgress?: boolean
  disabled?: boolean
  class?: string
  style?: string
  id?: string
  placeholder?: string
  label?: string
}
/**
 * @upload directive options
 */
export declare interface UploadDirectiveOptions extends Omit<MediaUploadProps, 'endpoint'> {
  onProgress?: string
  onComplete?: string
  onError?: string
}
/**
 * Signed URL result
 */
export declare interface SignedUrl {
  url: string
  signature: string
  expires: number
  oneTimeUse?: boolean
}
/**
 * Signature request configuration
 */
export declare interface SignatureConfig {
  endpoint: string
  method?: 'GET' | 'POST'
  headers?: Record<string, string>
  expirationSeconds?: number
  oneTimeUse?: boolean
  params?: Record<string, unknown>
}
/**
 * Batch signature request
 */
export declare interface BatchSignatureRequest {
  sources: string[]
  config: SignatureConfig
}
/**
 * Batch signature result
 */
export declare interface BatchSignatureResult {
  signatures: Map<string, SignedUrl>
  errors: Map<string, string>
}
/**
 * Protected media authentication context
 */
export declare interface ProtectedAuthContext {
  role?: string
  permission?: string
  userId?: string
  check?: () => boolean | Promise<boolean>
}
/**
 * <ProtectedImg> component props
 */
export declare interface ProtectedMediaProps {
  src: string
  alt?: string
  signatureEndpoint?: string
  signatureConfig?: Partial<SignatureConfig>
  auth?: ProtectedAuthContext
  fallback?: string
  oneTimeUse?: boolean
  class?: string
  style?: string
}
/**
 * @protected directive options
 */
export declare interface ProtectedDirectiveOptions extends Omit<ProtectedMediaProps, 'src' | 'alt'> {}
/**
 * Media manager configuration
 */
export declare interface MediaManagerConfig {
  src: string
  apiKey?: string
  bucket?: string
  allowedTypes?: string[]
  maxFileSize?: number
  multiple?: boolean
  customStyles?: Record<string, string>
  callbacks?: {
    onSelect?: string
    onUpload?: string
    onDelete?: string
    onError?: string
  }
}
/**
 * Media item from manager
 */
export declare interface MediaItem {
  id: string
  url: string
  name: string
  type: string
  size: number
  width?: number
  height?: number
  duration?: number
  createdAt: string
  updatedAt: string
  metadata?: Record<string, unknown>
}
/**
 * Image optimization configuration
 */
export declare interface MediaImageConfig {
  enabled?: boolean
  defaultWidths?: number[]
  defaultFormats?: ImageFormat[]
  defaultQuality?: number
  placeholderStrategy?: PlaceholderStrategy
  lazyByDefault?: boolean
  editingEndpoint?: string | null
  outputDir?: string
  baseUrl?: string
  enableDpr?: boolean
  defaultDpr?: number[]
  tsImages?: Record<string, unknown>
}
/**
 * Video configuration
 */
export declare interface MediaVideoConfig {
  enabled?: boolean
  plyrVersion?: string
  plyrTheme?: string
  lazyByDefault?: boolean
  defaultControls?: boolean
  defaultPlyrOptions?: Partial<PlyrOptions>
  tsVideos?: Record<string, unknown>
}
/**
 * Upload configuration
 */
export declare interface MediaUploadConfig {
  enabled?: boolean
  defaultEndpoint?: string
  maxSize?: number
  allowedTypes?: string[]
  chunkSize?: number
  maxConcurrent?: number
}
/**
 * Protected media configuration
 */
export declare interface MediaProtectedConfig {
  enabled?: boolean
  signatureEndpoint?: string
  expirationSeconds?: number
  batchSize?: number
}
/**
 * Media cache configuration
 */
export declare interface MediaCacheConfig {
  enabled?: boolean
  directory?: string
  maxAge?: number
  maxSize?: number
}
/**
 * Complete media module configuration
 */
export declare interface MediaConfig {
  enabled?: boolean
  image?: MediaImageConfig
  video?: MediaVideoConfig
  upload?: MediaUploadConfig
  protected?: MediaProtectedConfig
  cache?: MediaCacheConfig
}
/**
 * Lazy load observer options
 */
export declare interface LazyLoadOptions {
  root?: Element | null
  rootMargin?: string
  threshold?: number | number[]
  useNative?: boolean
}
/**
 * Blur-up animation options
 */
export declare interface BlurUpOptions {
  duration?: number
  easing?: string
  removePlaceholder?: boolean
  loadedClass?: string
}
/**
 * Breakpoint definition for responsive images
 */
export declare interface Breakpoint {
  name: string
  minWidth?: number
  maxWidth?: number
  imageWidth: number | string
}
/**
 * Srcset generation options
 */
export declare interface SrcsetOptions {
  src: string
  widths?: number[]
  dprValues?: number[]
  fixedWidth?: number
  formats?: ImageFormat[]
  baseUrl?: string
  params?: ImageParams
}
/**
 * Generated srcset data
 */
export declare interface SrcsetData {
  srcset: string
  format: ImageFormat
  mimeType: string
  variants: ImageVariant[]
}
/**
 * Watermark configuration
 */
export declare interface WatermarkConfig {
  image?: string
  text?: string
  position?: WatermarkPosition
  opacity?: number
  scale?: number
  font?: string
  fontSize?: number
  color?: string
}
/**
 * Art direction configuration for responsive images
 */
export declare interface ArtDirectionConfig {
  media: string
  src: string
  widths?: number[]
  crop?: ImageCrop
  aspectRatio?: string
}
/**
 * Image transformation configuration
 */
export declare interface ImageTransformationConfig {
  type: ImageTransformation
  options?: {
    width?: number
    height?: number
    fit?: ImageFit
    sigma?: number
    amount?: number
    angle?: number
    value?: number
  }
}
/**
 * Format-specific quality settings for ts-images
 */
export declare interface FormatQualitySettings {
  jpeg?: {
    quality?: number
    mozjpeg?: boolean
    chromaSubsampling?: '4:4:4' | '4:2:2' | '4:2:0'
    progressive?: boolean
    optimizeCoding?: boolean
  }
  png?: {
    quality?: number
    compressionLevel?: number
    palette?: boolean
    adaptiveFiltering?: boolean
    progressive?: boolean
  }
  webp?: {
    quality?: number
    lossless?: boolean
    effort?: number
    smartSubsample?: boolean
    nearLossless?: number
  }
  avif?: {
    quality?: number
    lossless?: boolean
    effort?: number
    chromaSubsampling?: '4:4:4' | '4:2:2' | '4:2:0'
  }
  [format: string]: Record<string, unknown> | undefined
}
/**
 * ts-images integration configuration
 */
export declare interface TsImagesConfig {
  enabled: boolean
  outputDir: string
  baseUrl?: string
  formatQuality?: FormatQualitySettings
  breakpoints?: number[]
  defaultFormats?: ImageFormat[]
  defaultQuality?: number
  batchOptions?: {
    concurrency?: number
    optimizationPreset?: ImageOptimizationPreset
  }
  placeholderStrategy?: string
  generateSprites?: boolean
  spriteOutputDir?: string
}
/**
 * Enhanced image props with ts-images integration
 */
export declare interface EnhancedImgProps extends ImgProps {
  preset?: ImageOptimizationPreset
  process?: boolean
  transformations?: ImageTransformationConfig[]
  responsiveWidths?: number[]
  watermark?: WatermarkConfig
  artDirection?: ArtDirectionConfig[]
  useDominantColor?: boolean
  embedThumbhash?: boolean
  blurAmount?: number
  outputPattern?: string
  skipOptimization?: boolean
  outputFormat?: ImageFormat
}
/**
 * Result from processing an image with ts-images
 */
export declare interface ProcessedImageResult {
  src: string
  processed: boolean
  variants?: Array<{
    path: string
    url: string
    width: number
    height: number
    format: ImageFormat
    size: number
    dpr?: number
  }>
  placeholder?: string
  dominantColor?: string
  originalWidth?: number
  originalHeight?: number
  hash?: string
  errors?: string[]
}
/**
 * Responsive variant set result
 */
export declare interface ResponsiveVariantSet {
  src: string
  byFormat: Record<ImageFormat, ProcessedImageResult['variants']>
  srcsets: Record<ImageFormat, string>
  sizes?: string
  placeholder?: {
    dataURL: string
    width: number
    height: number
    strategy: PlaceholderStrategy
  }
}
/**
 * Poster/thumbnail generation options
 */
export declare interface PosterGenerationConfig {
  timestamp?: number
  width?: number
  height?: number
  format?: 'jpeg' | 'png' | 'webp'
  quality?: number
}
/**
 * Sprite sheet configuration for video scrubbing preview
 */
export declare interface SpriteSheetConfig {
  columns?: number
  thumbnailWidth?: number
  thumbnailHeight?: number
  interval?: number
  format?: 'jpeg' | 'png' | 'webp'
  quality?: number
}
/**
 * Streaming quality level configuration
 */
export declare interface StreamingQualityLevel {
  label: string
  width: number
  height?: number
  bitrate: number
  audioBitrate?: number
}
/**
 * Adaptive streaming configuration
 */
export declare interface StreamingConfig {
  format?: 'hls' | 'dash'
  segmentDuration?: number
  qualities?: StreamingQualityLevel[]
  encryption?: {
    enabled: boolean
    keyUrl?: string
    iv?: string
  }
}
/**
 * Video transcoding options
 */
export declare interface TranscodeConfig {
  codec?: VideoCodec
  bitrate?: number
  maxWidth?: number
  maxHeight?: number
  frameRate?: number
  audioCodec?: AudioCodec
  audioBitrate?: number
  sampleRate?: number
  channels?: number
  twoPass?: boolean
  speedPreset?: 'ultrafast' | 'superfast' | 'veryfast' | 'faster' | 'fast' | 'medium' | 'slow' | 'slower' | 'veryslow'
  crf?: number
}
/**
 * Waveform visualization configuration
 */
export declare interface WaveformConfig {
  width?: number
  height?: number
  color?: string
  backgroundColor?: string
  format?: 'png' | 'svg' | 'json'
  samples?: number
}
/**
 * ts-videos integration configuration
 */
export declare interface TsVideosConfig {
  enabled: boolean
  outputDir: string
  baseUrl?: string
  defaultQuality?: VideoQualityPreset
  streaming?: {
    enabled: boolean
    format?: 'hls' | 'dash'
    segmentDuration?: number
    defaultQualities?: StreamingQualityLevel[]
  }
  thumbnails?: {
    enabled: boolean
    count?: number
    interval?: number
    format?: 'jpeg' | 'png' | 'webp'
    width?: number
  }
  transcoding?: {
    defaultCodec?: VideoCodec
    defaultAudioCodec?: AudioCodec
    speedPreset?: TranscodeConfig['speedPreset']
  }
}
/**
 * Enhanced video props with ts-videos integration
 */
export declare interface EnhancedVideoProps extends VideoProps {
  quality?: VideoQualityPreset
  platform?: VideoPlatformPreset
  process?: boolean
  generatePoster?: boolean | PosterGenerationConfig
  spriteSheet?: boolean | SpriteSheetConfig
  streaming?: boolean | StreamingConfig
  transcode?: TranscodeConfig
  waveform?: boolean | WaveformConfig
  onProcessProgress?: (progress: {
    percentage: number
    currentTime: number
    duration: number
    stage: 'analyzing' | 'transcoding' | 'generating-manifests' | 'complete'
  }) => void
  outputPattern?: string
  skipProcessing?: boolean
  title?: string
}
/**
 * Result from generating a thumbnail
 */
export declare interface ThumbnailResult {
  path: string
  url: string
  width: number
  height: number
  timestamp: number
  size: number
}
/**
 * Result from generating HLS manifest
 */
export declare interface HLSResult {
  manifestUrl: string
  manifestPath: string
  playlists: Array<{
    quality: StreamingQualityLevel
    url: string
    path: string
  }>
  segmentCount: number
  duration: number
}
/**
 * Result from generating DASH manifest
 */
export declare interface DASHResult {
  manifestUrl: string
  manifestPath: string
  adaptationSets: Array<{
    type: 'video' | 'audio'
    representations: Array<{
      bandwidth: number
      width?: number
      height?: number
      url: string
    }>
  }>
  duration: number
}
/**
 * Result from video transcoding
 */
export declare interface TranscodeResult {
  path: string
  url: string
  duration: number
  size: number
  video: {
    codec: VideoCodec
    width: number
    height: number
    bitrate: number
    frameRate: number
  }
  audio?: {
    codec: AudioCodec
    bitrate: number
    sampleRate: number
    channels: number
  }
}
/**
 * Result from processing a video with ts-videos
 */
export declare interface ProcessedVideoResult {
  src: string
  processed: boolean
  transcoded?: TranscodeResult
  poster?: ThumbnailResult
  thumbnails?: ThumbnailResult[]
  spriteSheet?: {
    url: string
    path: string
    columns: number
    rows: number
    thumbnailWidth: number
    thumbnailHeight: number
    interval: number
    totalFrames: number
  }
  streaming?: {
    hls?: HLSResult
    dash?: DASHResult
  }
  waveform?: {
    url: string
    path: string
    data?: number[]
  }
  metadata?: {
    duration: number
    width: number
    height: number
    frameRate: number
    bitrate: number
    codec: string
    audioCodec?: string
  }
  hash?: string
  errors?: string[]
}
/**
 * Placeholder generation strategies for lazy loading
 */
export type PlaceholderStrategy = | 'blur' // Low-quality blurred image (LQIP)
  | 'thumbhash' // Thumbhash-based placeholder
  | 'blurhash' // Blurhash-based placeholder
  | 'pixelate' // Pixelated low-res version
  | 'dominant-color' // Solid dominant color
  | 'none' // No placeholder;
/**
 * Supported image formats
 */
export type ImageFormat = 'webp' | 'avif' | 'jpeg' | 'png' | 'gif';
/**
 * Image fit modes (similar to CSS object-fit)
 */
export type ImageFit = 'clip' | 'crop' | 'fill' | 'max' | 'min' | 'scale' | 'cover' | 'contain';
/**
 * Image crop positions
 */
export type ImageCrop = | 'top'
  | 'bottom'
  | 'left'
  | 'right'
  | 'center'
  | 'top-left'
  | 'top-right'
  | 'bottom-left'
  | 'bottom-right'
  | 'faces' // AI face detection
  | 'entropy' // Maximum entropy region;
/**
 * Video embed type
 */
export type VideoEmbedType = 'video' | 'youtube' | 'vimeo' | 'dailymotion' | 'twitch';
/**
 * Plyr.js control options
 */
export type PlyrControl = | 'play-large'
  | 'restart'
  | 'rewind'
  | 'play'
  | 'fast-forward'
  | 'progress'
  | 'current-time'
  | 'duration'
  | 'mute'
  | 'volume'
  | 'captions'
  | 'settings'
  | 'pip'
  | 'airplay'
  | 'fullscreen';
/**
 * Image optimization presets for ts-images
 */
export type ImageOptimizationPreset = 'web' | 'quality' | 'performance';
/**
 * Image transformation types supported by ts-images
 */
export type ImageTransformation = | 'resize'
  | 'blur'
  | 'sharpen'
  | 'grayscale'
  | 'rotate'
  | 'flip'
  | 'flop'
  | 'brightness'
  | 'contrast'
  | 'saturation';
/**
 * Watermark position options
 */
export type WatermarkPosition = | 'center'
  | 'top'
  | 'bottom'
  | 'left'
  | 'right'
  | 'top-left'
  | 'top-right'
  | 'bottom-left'
  | 'bottom-right';
/**
 * Video quality presets
 */
export type VideoQualityPreset = | 'very-low'
  | 'low'
  | 'medium'
  | 'high'
  | 'very-high'
  | 'lossless';
/**
 * Platform-specific video presets
 */
export type VideoPlatformPreset = | 'youtube'
  | 'twitter'
  | 'instagram-feed'
  | 'instagram-story'
  | 'instagram-reels'
  | 'tiktok'
  | 'discord'
  | 'linkedin'
  | 'facebook'
  | 'web-progressive'
  | 'web-streaming';
/**
 * Video codec options
 */
export type VideoCodec = 'h264' | 'h265' | 'vp9' | 'av1';
/**
 * Audio codec options
 */
export type AudioCodec = 'aac' | 'opus' | 'mp3' | 'flac';
