import { LexicalEditor } from 'lexical'; export type { UploadProgress } from '@layers-app/editor-core'; export type { AlignmentType } from '@layers-app/editor-core'; export type { MediaPlatform as VideoPlatform } from '@layers-app/editor-core'; export interface ImperativeHandle { insertVideos?: (files: File[]) => void; [key: string]: unknown; } export interface ObservedVideoUpload { progress: (percent: number) => void; succeed: (result?: { id?: string; url?: string; }) => void; fail: (error: unknown) => void; cancel: () => void; } export interface PendingVideoUpload { blockTicket: string; url: string; id?: string; } export interface PendingVideoUploadsPort { get: () => PendingVideoUpload[]; subscribe: (listener: () => void) => () => void; settle: (blockTicket: string) => void; } export interface VideoPluginConfig { pageId?: string; maxFileSize?: number; onUploadStateChange?: (isUploading: boolean, uploadingCount: number) => void; onError?: (error: VideoApiError) => void; onTrack?: (event: string, params?: Record) => void; observeUpload?: (file: File, blockTicket: string) => ObservedVideoUpload | null; pendingUploads?: PendingVideoUploadsPort; } export type VideoApiErrorSource = 'init' | 'upload' | 'status' | 'cover' | 'subtitles' | 'chapters' | 'retry' | 'unknown'; export interface VideoApiError { status: number; statusText: string; message: string; data?: unknown; source: VideoApiErrorSource; videoId?: string; } export type UploadState = 'default' | 'hover' | 'focus' | 'upload' | 'error-size-limit' | 'error-format' | 'error-interrupted' | 'error-offset-mismatch' | 'error-stall' | 'analysis' | 'conversion' | 'video-preview'; export type ErrorType = 'size-limit' | 'format' | 'interrupted' | 'offset-mismatch' | 'stall'; export interface VideoThumbnail { url: string; timestamp: number; selected?: boolean; } export interface VideoUploadProps { onFileSelect: (file: File) => void; onUploadComplete: (url: string, id: string) => void; onError: (error: ErrorType) => void; maxFileSize: number; nodeKey: string; editor: LexicalEditor; } export interface TranscodingProgress { percent: number; stage: 'analysis' | 'conversion'; remaining?: number; } export interface InitResponse { videoId: string; sourceAttachmentId: string; statusUrl?: string; status?: VideoStatus; } export interface UploadChunkResponse { nextOffset?: number; expectedOffset?: number; } export interface VideoSubtitleTrack { id: string; lang?: string; label?: string; kind?: string; isDefault?: boolean; isDisabled?: boolean; url?: string; createdAt?: string; fileName?: string; } export interface VideoStatus { state: 'UPLOADING' | 'PROCESSING' | 'READY' | 'FAILED'; upload?: { nextOffset?: number; }; file?: { bytesTotal?: number; }; processing?: { stage?: 'QUEUED' | 'PROXY_LQ' | 'TRANSCODING' | 'PACKAGING' | 'THUMBNAILS'; percent?: number; message?: string; }; failure?: { message?: string; reason?: string; actions?: Array<{ type: string; label: string; url?: string; }>; }; previews?: Array<{ id: string; url: string; order?: number; }>; cover?: { previewId?: string; url?: string; }; playback?: { primaryUrl?: string; rawUrl?: string; fallbackUrl?: string; downloadUrl?: string; mime?: string; supportsRange?: boolean; playable?: boolean; optimizedReady?: boolean; rawPlayable?: boolean; proxyReady?: boolean; proxyLowReady?: boolean; }; storyboard?: { ready?: boolean; vttUrl?: string; metaUrl?: string; }; chapters?: Array<{ startSec: number; title: string; auto?: boolean; thumb?: { sheetUrl?: string; x?: number; y?: number; w?: number; h?: number; }; }>; subtitles?: VideoSubtitleTrack[]; } export interface StoryboardMeta { durationSec?: number; } export interface StoryboardCue { start: number; end: number; sheetUrl: string; x: number; y: number; w: number; h: number; } export interface StoryboardFrame extends StoryboardCue { sheetWidth?: number; sheetHeight?: number; } //# sourceMappingURL=types.d.ts.map