diff options
| author | Maze Winther <mazewinther@gmail.com> | 2026-03-25 16:47:22 +0100 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2026-03-29 15:48:22 +0200 |
| commit | 8db3bead13441a5882d8689dfc6a9f09c82375d9 (patch) | |
| tree | e9d0cafa93904ffcbec3188c37961bcc16c6422d /apps/web/src/types | |
| parent | 39ea298a9ccba3104c549c0ca079c231981811f5 (diff) | |
| download | opencut-8db3bead13441a5882d8689dfc6a9f09c82375d9.tar.gz | |
feat: masks, properties refactor, shaders, storage migrations, and more
Diffstat (limited to 'apps/web/src/types')
| -rw-r--r-- | apps/web/src/types/animation.ts | 97 | ||||
| -rw-r--r-- | apps/web/src/types/assets.ts | 9 | ||||
| -rw-r--r-- | apps/web/src/types/blog.ts | 92 | ||||
| -rw-r--r-- | apps/web/src/types/drag.ts | 34 | ||||
| -rw-r--r-- | apps/web/src/types/editor.ts | 1 | ||||
| -rw-r--r-- | apps/web/src/types/effects.ts | 69 | ||||
| -rw-r--r-- | apps/web/src/types/export.ts | 31 | ||||
| -rw-r--r-- | apps/web/src/types/fonts.ts | 24 | ||||
| -rw-r--r-- | apps/web/src/types/keybinding.ts | 79 | ||||
| -rw-r--r-- | apps/web/src/types/language.ts | 4 | ||||
| -rw-r--r-- | apps/web/src/types/project.ts | 51 | ||||
| -rw-r--r-- | apps/web/src/types/rendering.ts | 27 | ||||
| -rw-r--r-- | apps/web/src/types/sounds.ts | 39 | ||||
| -rw-r--r-- | apps/web/src/types/soundtouchjs.d.ts | 14 | ||||
| -rw-r--r-- | apps/web/src/types/stickers.ts | 54 | ||||
| -rw-r--r-- | apps/web/src/types/time.ts | 1 | ||||
| -rw-r--r-- | apps/web/src/types/timeline.ts | 246 | ||||
| -rw-r--r-- | apps/web/src/types/transcription.ts | 47 |
18 files changed, 14 insertions, 905 deletions
diff --git a/apps/web/src/types/animation.ts b/apps/web/src/types/animation.ts deleted file mode 100644 index 825894c5..00000000 --- a/apps/web/src/types/animation.ts +++ /dev/null @@ -1,97 +0,0 @@ -export const ANIMATION_PROPERTY_PATHS = [ - "transform.position.x", - "transform.position.y", - "transform.scale", - "transform.rotate", - "opacity", - "volume", - "color", - "background.color", - "background.paddingX", - "background.paddingY", - "background.offsetX", - "background.offsetY", - "background.cornerRadius", -] as const; - -export type AnimationPropertyPath = (typeof ANIMATION_PROPERTY_PATHS)[number]; - -export type AnimationValueKind = "number" | "color" | "discrete"; -export type DiscreteValue = boolean | string; -export type AnimationValue = number | string | boolean; - -export type ContinuousKeyframeInterpolation = "linear" | "hold"; -export type DiscreteKeyframeInterpolation = "hold"; -export type AnimationInterpolation = - | ContinuousKeyframeInterpolation - | DiscreteKeyframeInterpolation; - -interface BaseAnimationKeyframe< - TValue extends AnimationValue, - TInterpolation extends AnimationInterpolation, -> { - id: string; - time: number; // relative to element start time - value: TValue; - interpolation: TInterpolation; -} - -export interface NumberKeyframe - extends BaseAnimationKeyframe<number, ContinuousKeyframeInterpolation> {} - -export interface ColorKeyframe - extends BaseAnimationKeyframe<string, ContinuousKeyframeInterpolation> {} - -export interface DiscreteKeyframe - extends BaseAnimationKeyframe<DiscreteValue, DiscreteKeyframeInterpolation> {} - -export type AnimationKeyframe = - | NumberKeyframe - | ColorKeyframe - | DiscreteKeyframe; - -interface BaseAnimationChannel< - TValueKind extends AnimationValueKind, - TKeyframe extends AnimationKeyframe, -> { - valueKind: TValueKind; - keyframes: TKeyframe[]; -} - -export interface NumberAnimationChannel - extends BaseAnimationChannel<"number", NumberKeyframe> {} - -export interface ColorAnimationChannel - extends BaseAnimationChannel<"color", ColorKeyframe> {} - -export interface DiscreteAnimationChannel - extends BaseAnimationChannel<"discrete", DiscreteKeyframe> {} - -export type AnimationChannel = - | NumberAnimationChannel - | ColorAnimationChannel - | DiscreteAnimationChannel; - -export type ElementAnimationChannelMap = Record< - string, - AnimationChannel | undefined ->; - -export interface ElementAnimations { - channels: ElementAnimationChannelMap; -} - -export interface ElementKeyframe { - propertyPath: AnimationPropertyPath; - id: string; - time: number; - value: AnimationValue; - interpolation: AnimationInterpolation; -} - -export interface SelectedKeyframeRef { - trackId: string; - elementId: string; - propertyPath: AnimationPropertyPath; - keyframeId: string; -} diff --git a/apps/web/src/types/assets.ts b/apps/web/src/types/assets.ts deleted file mode 100644 index c8dddfc7..00000000 --- a/apps/web/src/types/assets.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { MediaAssetData } from "@/services/storage/types"; - -export type MediaType = "image" | "video" | "audio"; - -export interface MediaAsset - extends Omit<MediaAssetData, "size" | "lastModified"> { - file: File; - url?: string; -} diff --git a/apps/web/src/types/blog.ts b/apps/web/src/types/blog.ts deleted file mode 100644 index 16795b02..00000000 --- a/apps/web/src/types/blog.ts +++ /dev/null @@ -1,92 +0,0 @@ -export type Post = { - id: string; - slug: string; - title: string; - content: string; - description: string; - coverImage: string; - publishedAt: Date; - updatedAt: Date; - authors: { - id: string; - name: string; - image: string; - }[]; - category: { - id: string; - slug: string; - name: string; - }; - tags: { - id: string; - slug: string; - name: string; - }[]; - attribution: { - author: string; - url: string; - } | null; -}; - -export type Pagination = { - limit: number; - currpage: number; - nextPage: number | null; - prevPage: number | null; - totalItems: number; - totalPages: number; -}; - -export type MarblePostList = { - posts: Post[]; - pagination: Pagination; -}; - -export type MarblePost = { - post: Post; -}; - -export type Tag = { - id: string; - name: string; - slug: string; -}; - -export type MarbleTag = { - tag: Tag; -}; - -export type MarbleTagList = { - tags: Tag[]; - pagination: Pagination; -}; - -export type Category = { - id: string; - name: string; - slug: string; -}; - -export type MarbleCategory = { - category: Category; -}; - -export type MarbleCategoryList = { - categories: Category[]; - pagination: Pagination; -}; - -export type Author = { - id: string; - name: string; - image: string; -}; - -export type MarbleAuthor = { - author: Author; -}; - -export type MarbleAuthorList = { - authors: Author[]; - pagination: Pagination; -}; diff --git a/apps/web/src/types/drag.ts b/apps/web/src/types/drag.ts deleted file mode 100644 index 4e10d767..00000000 --- a/apps/web/src/types/drag.ts +++ /dev/null @@ -1,34 +0,0 @@ -import type { VisualElement } from "./timeline"; - -interface BaseDragData { - id: string; - name: string; -} - -export interface MediaDragData extends BaseDragData { - type: "media"; - mediaType: "image" | "video" | "audio"; - targetElementTypes?: ("video" | "image")[]; -} - -export interface TextDragData extends BaseDragData { - type: "text"; - content: string; -} - -export interface StickerDragData extends BaseDragData { - type: "sticker"; - stickerId: string; -} - -export interface EffectDragData extends BaseDragData { - type: "effect"; - effectType: string; - targetElementTypes: VisualElement["type"][]; -} - -export type TimelineDragData = - | MediaDragData - | TextDragData - | StickerDragData - | EffectDragData; diff --git a/apps/web/src/types/editor.ts b/apps/web/src/types/editor.ts deleted file mode 100644 index 0413b208..00000000 --- a/apps/web/src/types/editor.ts +++ /dev/null @@ -1 +0,0 @@ -export type TPlatformLayout = "tiktok"; diff --git a/apps/web/src/types/effects.ts b/apps/web/src/types/effects.ts deleted file mode 100644 index 6c96dfb2..00000000 --- a/apps/web/src/types/effects.ts +++ /dev/null @@ -1,69 +0,0 @@ -export interface Effect { - id: string; - type: string; - params: EffectParamValues; - enabled: boolean; -} - -export type EffectParamType = "number" | "boolean" | "select" | "color"; - -export type EffectParamValues = Record<string, number | string | boolean>; - -interface BaseEffectParamDefinition { - key: string; - label: string; -} - -export interface NumberEffectParamDefinition extends BaseEffectParamDefinition { - type: "number"; - default: number; - min: number; - max: number; - step: number; -} - -interface BooleanEffectParamDefinition extends BaseEffectParamDefinition { - type: "boolean"; - default: boolean; -} - -interface SelectEffectParamDefinition extends BaseEffectParamDefinition { - type: "select"; - default: string; - options: Array<{ value: string; label: string }>; -} - -interface ColorEffectParamDefinition extends BaseEffectParamDefinition { - type: "color"; - default: string; -} - -export type EffectParamDefinition = - | NumberEffectParamDefinition - | BooleanEffectParamDefinition - | SelectEffectParamDefinition - | ColorEffectParamDefinition; - -export interface WebGLEffectPass { - fragmentShader: string; - uniforms(params: { - effectParams: EffectParamValues; - width: number; - height: number; - }): Record<string, number | number[]>; -} - -export interface WebGLEffectRenderer { - type: "webgl"; - passes: WebGLEffectPass[]; -} - -export type EffectRenderer = WebGLEffectRenderer; - -export interface EffectDefinition { - type: string; - name: string; - keywords: string[]; - params: EffectParamDefinition[]; - renderer: EffectRenderer; -} diff --git a/apps/web/src/types/export.ts b/apps/web/src/types/export.ts deleted file mode 100644 index 2c2408d8..00000000 --- a/apps/web/src/types/export.ts +++ /dev/null @@ -1,31 +0,0 @@ -export const EXPORT_QUALITY_VALUES = [ - "low", - "medium", - "high", - "very_high", -] as const; - -export const EXPORT_FORMAT_VALUES = ["mp4", "webm"] as const; - -export type ExportFormat = (typeof EXPORT_FORMAT_VALUES)[number]; -export type ExportQuality = (typeof EXPORT_QUALITY_VALUES)[number]; - -export interface ExportOptions { - format: ExportFormat; - quality: ExportQuality; - fps?: number; - includeAudio?: boolean; -} - -export interface ExportResult { - success: boolean; - buffer?: ArrayBuffer; - error?: string; - cancelled?: boolean; -} - -export interface ExportState { - isExporting: boolean; - progress: number; - result: ExportResult | null; -} diff --git a/apps/web/src/types/fonts.ts b/apps/web/src/types/fonts.ts deleted file mode 100644 index a2db6f91..00000000 --- a/apps/web/src/types/fonts.ts +++ /dev/null @@ -1,24 +0,0 @@ -export interface FontOption { - value: string; - label: string; - category: "system" | "google" | "custom"; - weights?: number[]; - hasClassName?: boolean; -} - -export interface GoogleFontMeta { - family: string; - category: string; -} - -export interface FontAtlasEntry { - x: number; - y: number; - w: number; - ch: number; - s: string[]; -} - -export interface FontAtlas { - fonts: Record<string, FontAtlasEntry>; -} diff --git a/apps/web/src/types/keybinding.ts b/apps/web/src/types/keybinding.ts deleted file mode 100644 index f9b84e31..00000000 --- a/apps/web/src/types/keybinding.ts +++ /dev/null @@ -1,79 +0,0 @@ -import type { TActionWithOptionalArgs } from "@/lib/actions"; - -/** - * Alt is also regarded as macOS OPTION (⌥) key - * Ctrl is also regarded as macOS COMMAND (⌘) key (NOTE: this differs from HTML Keyboard spec where COMMAND is Meta key!) - */ -export type ModifierKeys = - | "ctrl" - | "alt" - | "shift" - | "ctrl+shift" - | "alt+shift" - | "ctrl+alt" - | "ctrl+alt+shift"; - -export type Key = - | "a" - | "b" - | "c" - | "d" - | "e" - | "f" - | "g" - | "h" - | "i" - | "j" - | "k" - | "l" - | "m" - | "n" - | "o" - | "p" - | "q" - | "r" - | "s" - | "t" - | "u" - | "v" - | "w" - | "x" - | "y" - | "z" - | "0" - | "1" - | "2" - | "3" - | "4" - | "5" - | "6" - | "7" - | "8" - | "9" - | "up" - | "down" - | "left" - | "right" - | "/" - | "?" - | "." - | "enter" - | "tab" - | "space" - | "escape" - | "esc" - | "backspace" - | "delete" - | "home" - | "end"; -/* eslint-enable */ - -export type ModifierBasedShortcutKey = `${ModifierKeys}+${Key}`; -// Singular keybindings (these will be disabled when an input-ish area has been focused) -export type SingleCharacterShortcutKey = `${Key}`; - -export type ShortcutKey = ModifierBasedShortcutKey | SingleCharacterShortcutKey; - -export type KeybindingConfig = { - [key in ShortcutKey]?: TActionWithOptionalArgs; -}; diff --git a/apps/web/src/types/language.ts b/apps/web/src/types/language.ts deleted file mode 100644 index a3f527c8..00000000 --- a/apps/web/src/types/language.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { LANGUAGES } from "@/constants/language-constants"; - -export type Language = (typeof LANGUAGES)[number]; -export type LanguageCode = Language["code"]; diff --git a/apps/web/src/types/project.ts b/apps/web/src/types/project.ts deleted file mode 100644 index c8074c26..00000000 --- a/apps/web/src/types/project.ts +++ /dev/null @@ -1,51 +0,0 @@ -import type { TScene } from "./timeline"; - -export type TBackground = - | { - type: "color"; - color: string; - } - | { - type: "blur"; - blurIntensity: number; - }; - -export interface TCanvasSize { - width: number; - height: number; -} - -export interface TProjectMetadata { - id: string; - name: string; - thumbnail?: string; - duration: number; - createdAt: Date; - updatedAt: Date; -} - -export interface TProjectSettings { - fps: number; - canvasSize: TCanvasSize; - originalCanvasSize?: TCanvasSize | null; - background: TBackground; -} - -export interface TTimelineViewState { - zoomLevel: number; - scrollLeft: number; - playheadTime: number; -} - -export interface TProject { - metadata: TProjectMetadata; - scenes: TScene[]; - currentSceneId: string; - settings: TProjectSettings; - version: number; - timelineViewState?: TTimelineViewState; -} - -export type TProjectSortKey = "createdAt" | "updatedAt" | "name" | "duration"; -export type TSortOrder = "asc" | "desc"; -export type TProjectSortOption = `${TProjectSortKey}-${TSortOrder}`; diff --git a/apps/web/src/types/rendering.ts b/apps/web/src/types/rendering.ts deleted file mode 100644 index 8c9763df..00000000 --- a/apps/web/src/types/rendering.ts +++ /dev/null @@ -1,27 +0,0 @@ -export interface Transform { - scale: number; - position: { - x: number; - y: number; - }; - rotate: number; -} - -export type BlendMode = - | "normal" - | "darken" - | "multiply" - | "color-burn" - | "lighten" - | "screen" - | "plus-lighter" - | "color-dodge" - | "overlay" - | "soft-light" - | "hard-light" - | "difference" - | "exclusion" - | "hue" - | "saturation" - | "color" - | "luminosity"; diff --git a/apps/web/src/types/sounds.ts b/apps/web/src/types/sounds.ts deleted file mode 100644 index eecf7701..00000000 --- a/apps/web/src/types/sounds.ts +++ /dev/null @@ -1,39 +0,0 @@ -export interface SoundEffect { - id: number; - name: string; - description: string; - url: string; - previewUrl?: string; - downloadUrl?: string; - duration: number; - filesize: number; - type: string; - channels: number; - bitrate: number; - bitdepth: number; - samplerate: number; - username: string; - tags: string[]; - license: string; - created: string; - downloads: number; - rating: number; - ratingCount: number; -} - -export interface SavedSound { - id: number; // freesound id - name: string; - username: string; - previewUrl?: string; - downloadUrl?: string; - duration: number; - tags: string[]; - license: string; - savedAt: string; // iso date string -} - -export interface SavedSoundsData { - sounds: SavedSound[]; - lastModified: string; -} diff --git a/apps/web/src/types/soundtouchjs.d.ts b/apps/web/src/types/soundtouchjs.d.ts new file mode 100644 index 00000000..c10f1ff3 --- /dev/null +++ b/apps/web/src/types/soundtouchjs.d.ts @@ -0,0 +1,14 @@ +declare module "soundtouchjs" { + export class PitchShifter { + constructor( + context: BaseAudioContext, + buffer: AudioBuffer, + bufferSize: number, + onEnd?: () => void, + ); + tempo: number; + pitch: number; + connect(destination: AudioNode): void; + off(): void; + } +} diff --git a/apps/web/src/types/stickers.ts b/apps/web/src/types/stickers.ts deleted file mode 100644 index 65c9aeb2..00000000 --- a/apps/web/src/types/stickers.ts +++ /dev/null @@ -1,54 +0,0 @@ -import type { STICKER_CATEGORIES } from "@/constants/sticker-constants"; - -export type StickerCategory = keyof typeof STICKER_CATEGORIES; - -export interface StickerItem { - id: string; - provider: string; - name: string; - previewUrl: string; - metadata: Record<string, unknown>; -} - -export interface StickerSearchResult { - items: StickerItem[]; - total: number; - hasMore: boolean; -} - -export interface StickerProviderSearchOptions { - limit?: number; -} - -export interface StickerProviderBrowseOptions { - page?: number; - limit?: number; -} - -export interface StickerResolveOptions { - width?: number; - height?: number; -} - -export interface StickerProvider { - id: string; - search({ - query, - options, - }: { - query: string; - options?: StickerProviderSearchOptions; - }): Promise<StickerSearchResult>; - browse({ - options, - }: { - options?: StickerProviderBrowseOptions; - }): Promise<StickerSearchResult>; - resolveUrl({ - stickerId, - options, - }: { - stickerId: string; - options?: StickerResolveOptions; - }): string; -} diff --git a/apps/web/src/types/time.ts b/apps/web/src/types/time.ts deleted file mode 100644 index 4009a1e1..00000000 --- a/apps/web/src/types/time.ts +++ /dev/null @@ -1 +0,0 @@ -export type TTimeCode = "MM:SS" | "HH:MM:SS" | "HH:MM:SS:CS" | "HH:MM:SS:FF"; diff --git a/apps/web/src/types/timeline.ts b/apps/web/src/types/timeline.ts deleted file mode 100644 index 15696b34..00000000 --- a/apps/web/src/types/timeline.ts +++ /dev/null @@ -1,246 +0,0 @@ -import type { ElementAnimations } from "./animation"; -import type { Effect, EffectParamValues } from "./effects"; -import type { BlendMode, Transform } from "./rendering"; - -export interface Bookmark { - time: number; - note?: string; - color?: string; - duration?: number; -} - -export interface TScene { - id: string; - name: string; - isMain: boolean; - tracks: TimelineTrack[]; - bookmarks: Bookmark[]; - createdAt: Date; - updatedAt: Date; -} - -export type TrackType = "video" | "text" | "audio" | "sticker" | "effect"; - -interface BaseTrack { - id: string; - name: string; -} - -export interface VideoTrack extends BaseTrack { - type: "video"; - elements: (VideoElement | ImageElement)[]; - isMain: boolean; - muted: boolean; - hidden: boolean; -} - -export interface TextTrack extends BaseTrack { - type: "text"; - elements: TextElement[]; - hidden: boolean; -} - -export interface AudioTrack extends BaseTrack { - type: "audio"; - elements: AudioElement[]; - muted: boolean; -} - -export interface StickerTrack extends BaseTrack { - type: "sticker"; - elements: StickerElement[]; - hidden: boolean; -} - -export interface EffectTrack extends BaseTrack { - type: "effect"; - elements: EffectElement[]; - hidden: boolean; -} - -export type TimelineTrack = - | VideoTrack - | TextTrack - | AudioTrack - | StickerTrack - | EffectTrack; - -export type { Transform } from "./rendering"; - -interface BaseAudioElement extends BaseTimelineElement { - type: "audio"; - volume: number; - muted?: boolean; - buffer?: AudioBuffer; -} - -export interface UploadAudioElement extends BaseAudioElement { - sourceType: "upload"; - mediaId: string; -} - -export interface LibraryAudioElement extends BaseAudioElement { - sourceType: "library"; - sourceUrl: string; -} - -export type AudioElement = UploadAudioElement | LibraryAudioElement; - -interface BaseTimelineElement { - id: string; - name: string; - duration: number; - startTime: number; - trimStart: number; - trimEnd: number; - sourceDuration?: number; - animations?: ElementAnimations; -} - -export interface VideoElement extends BaseTimelineElement { - type: "video"; - mediaId: string; - muted?: boolean; - hidden?: boolean; - transform: Transform; - opacity: number; - blendMode?: BlendMode; - effects?: Effect[]; -} - -export interface ImageElement extends BaseTimelineElement { - type: "image"; - mediaId: string; - hidden?: boolean; - transform: Transform; - opacity: number; - blendMode?: BlendMode; - effects?: Effect[]; -} - -export interface TextBackground { - enabled: boolean; - color: string; - cornerRadius?: number; - paddingX?: number; - paddingY?: number; - offsetX?: number; - offsetY?: number; -} - -export interface TextElement extends BaseTimelineElement { - type: "text"; - content: string; - fontSize: number; - fontFamily: string; - color: string; - background: TextBackground; - textAlign: "left" | "center" | "right"; - fontWeight: "normal" | "bold"; - fontStyle: "normal" | "italic"; - textDecoration: "none" | "underline" | "line-through"; - letterSpacing?: number; - lineHeight?: number; - hidden?: boolean; - transform: Transform; - opacity: number; - blendMode?: BlendMode; - effects?: Effect[]; -} - -export interface StickerElement extends BaseTimelineElement { - type: "sticker"; - stickerId: string; - hidden?: boolean; - transform: Transform; - opacity: number; - blendMode?: BlendMode; - effects?: Effect[]; -} - -export interface EffectElement extends BaseTimelineElement { - type: "effect"; - effectType: string; - params: EffectParamValues; -} - -export type VisualElement = - | VideoElement - | ImageElement - | TextElement - | StickerElement; - -export type ElementUpdatePatch = - | { transform: Transform } - | { opacity: number } - | { volume: number }; - -export type TimelineElement = - | AudioElement - | VideoElement - | ImageElement - | TextElement - | StickerElement - | EffectElement; - -export type ElementType = TimelineElement["type"]; - -export type CreateUploadAudioElement = Omit<UploadAudioElement, "id">; -export type CreateLibraryAudioElement = Omit<LibraryAudioElement, "id">; -export type CreateAudioElement = - | CreateUploadAudioElement - | CreateLibraryAudioElement; -export type CreateVideoElement = Omit<VideoElement, "id">; -export type CreateImageElement = Omit<ImageElement, "id">; -export type CreateTextElement = Omit<TextElement, "id">; -export type CreateStickerElement = Omit<StickerElement, "id">; -export type CreateEffectElement = Omit<EffectElement, "id">; -export type CreateTimelineElement = - | CreateAudioElement - | CreateVideoElement - | CreateImageElement - | CreateTextElement - | CreateStickerElement - | CreateEffectElement; - -export interface ElementDragState { - isDragging: boolean; - elementId: string | null; - trackId: string | null; - startMouseX: number; - startMouseY: number; - startElementTime: number; - clickOffsetTime: number; - currentTime: number; - currentMouseY: number; -} - -export interface DropTarget { - trackIndex: number; - isNewTrack: boolean; - insertPosition: "above" | "below" | null; - xPosition: number; - targetElement: { elementId: string; trackId: string } | null; -} - -export interface ComputeDropTargetParams { - elementType: ElementType; - mouseX: number; - mouseY: number; - tracks: TimelineTrack[]; - playheadTime: number; - isExternalDrop: boolean; - elementDuration: number; - pixelsPerSecond: number; - zoomLevel: number; - verticalDragDirection?: "up" | "down" | null; - startTimeOverride?: number; - excludeElementId?: string; - targetElementTypes?: string[]; -} - -export interface ClipboardItem { - trackId: string; - trackType: TrackType; - element: CreateTimelineElement; -} diff --git a/apps/web/src/types/transcription.ts b/apps/web/src/types/transcription.ts deleted file mode 100644 index f189c6c9..00000000 --- a/apps/web/src/types/transcription.ts +++ /dev/null @@ -1,47 +0,0 @@ -import type { LanguageCode } from "./language"; - -export type TranscriptionLanguage = LanguageCode | "auto"; - -export interface TranscriptionSegment { - text: string; - start: number; - end: number; -} - -export interface TranscriptionResult { - text: string; - segments: TranscriptionSegment[]; - language: string; -} - -export type TranscriptionStatus = - | "idle" - | "loading-model" - | "transcribing" - | "complete" - | "error"; - -export interface TranscriptionProgress { - status: TranscriptionStatus; - progress: number; - message?: string; -} - -export type TranscriptionModelId = - | "whisper-tiny" - | "whisper-small" - | "whisper-medium" - | "whisper-large-v3-turbo"; - -export interface TranscriptionModel { - id: TranscriptionModelId; - name: string; - huggingFaceId: string; - description: string; -} - -export interface CaptionChunk { - text: string; - startTime: number; - duration: number; -} |
