diff options
| author | Kha Nguyen <hi@khanguyen.com> | 2025-07-24 17:08:33 -0500 |
|---|---|---|
| committer | Kha Nguyen <hi@khanguyen.com> | 2025-07-24 17:10:39 -0500 |
| commit | 8dcbbfa25245624cfaa1f8b8b1a21c6c4e29d993 (patch) | |
| tree | 6d5e8268b98bea8fda8356a817a0662730613cb5 /apps/web/src/types | |
| parent | 8e737d87e0accbf1d433f4c8b1e8e0f125849799 (diff) | |
| parent | 65c3f9f7f78f787262a88c75b96a118ca5bee15c (diff) | |
| download | opencut-8dcbbfa25245624cfaa1f8b8b1a21c6c4e29d993.tar.gz | |
Merge branch 'main' into fix/project-title-styling
Diffstat (limited to 'apps/web/src/types')
| -rw-r--r-- | apps/web/src/types/editor.ts | 24 | ||||
| -rw-r--r-- | apps/web/src/types/keybinding.ts | 58 | ||||
| -rw-r--r-- | apps/web/src/types/post.ts | 169 | ||||
| -rw-r--r-- | apps/web/src/types/timeline.ts | 3 |
4 files changed, 150 insertions, 104 deletions
diff --git a/apps/web/src/types/editor.ts b/apps/web/src/types/editor.ts index dce7ac50..b0449991 100644 --- a/apps/web/src/types/editor.ts +++ b/apps/web/src/types/editor.ts @@ -1,12 +1,12 @@ -export type BackgroundType = "blur" | "mirror" | "color";
-
-export interface CanvasSize {
- width: number;
- height: number;
-}
-
-export interface CanvasPreset {
- name: string;
- width: number;
- height: number;
-}
+export type BackgroundType = "blur" | "mirror" | "color"; + +export interface CanvasSize { + width: number; + height: number; +} + +export interface CanvasPreset { + name: string; + width: number; + height: number; +} diff --git a/apps/web/src/types/keybinding.ts b/apps/web/src/types/keybinding.ts index d97c88da..831f3abd 100644 --- a/apps/web/src/types/keybinding.ts +++ b/apps/web/src/types/keybinding.ts @@ -16,12 +16,58 @@ export type ModifierKeys = /* eslint-disable prettier/prettier */ // prettier-ignore 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" + | "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}`; diff --git a/apps/web/src/types/post.ts b/apps/web/src/types/post.ts index c3436847..fbee239e 100644 --- a/apps/web/src/types/post.ts +++ b/apps/web/src/types/post.ts @@ -1,93 +1,92 @@ 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; + slug: string; + title: string; + content: string; + description: string; + coverImage: string; + publishedAt: Date; + updatedAt: Date; + authors: { id: string; name: string; - slug: string; - }; - - export type MarbleTag = { - tag: Tag; - }; - - export type MarbleTagList = { - tags: Tag[]; - pagination: Pagination; - }; - - export type Category = { + image: string; + }[]; + category: { id: string; - name: string; slug: string; + name: string; }; - - export type MarbleCategory = { - category: Category; - }; - - export type MarbleCategoryList = { - categories: Category[]; - pagination: Pagination; - }; - - export type Author = { + tags: { id: string; + slug: string; name: string; - image: string; - }; - - export type MarbleAuthor = { - author: Author; - }; - - export type MarbleAuthorList = { - authors: Author[]; - pagination: Pagination; - }; -
\ No newline at end of file + }[]; + 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/timeline.ts b/apps/web/src/types/timeline.ts index f8a79d03..ef20c642 100644 --- a/apps/web/src/types/timeline.ts +++ b/apps/web/src/types/timeline.ts @@ -138,7 +138,8 @@ export function canElementGoOnTrack( ): boolean { if (elementType === "text") { return trackType === "text"; - } else if (elementType === "media") { + } + if (elementType === "media") { return trackType === "media" || trackType === "audio"; } return false; |
