From 8e737d87e0accbf1d433f4c8b1e8e0f125849799 Mon Sep 17 00:00:00 2001 From: Kha Nguyen Date: Thu, 24 Jul 2025 17:04:27 -0500 Subject: Revert "merge main" This reverts commit 1ccacf6bb5db579cf6f343d9de57bce92d296f5f. --- apps/web/src/types/editor.ts | 24 +++--- apps/web/src/types/keybinding.ts | 58 ++------------ apps/web/src/types/post.ts | 169 ++++++++++++++++++++------------------- apps/web/src/types/timeline.ts | 3 +- 4 files changed, 104 insertions(+), 150 deletions(-) (limited to 'apps/web/src/types') diff --git a/apps/web/src/types/editor.ts b/apps/web/src/types/editor.ts index b0449991..dce7ac50 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 831f3abd..d97c88da 100644 --- a/apps/web/src/types/keybinding.ts +++ b/apps/web/src/types/keybinding.ts @@ -16,58 +16,12 @@ 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 fbee239e..c3436847 100644 --- a/apps/web/src/types/post.ts +++ b/apps/web/src/types/post.ts @@ -1,92 +1,93 @@ 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; + 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; }; - tags: { + + 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; - }[]; - 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; -}; + image: string; + }; + + export type MarbleAuthor = { + author: Author; + }; + + export type MarbleAuthorList = { + authors: Author[]; + pagination: Pagination; + }; + \ No newline at end of file diff --git a/apps/web/src/types/timeline.ts b/apps/web/src/types/timeline.ts index ef20c642..f8a79d03 100644 --- a/apps/web/src/types/timeline.ts +++ b/apps/web/src/types/timeline.ts @@ -138,8 +138,7 @@ export function canElementGoOnTrack( ): boolean { if (elementType === "text") { return trackType === "text"; - } - if (elementType === "media") { + } else if (elementType === "media") { return trackType === "media" || trackType === "audio"; } return false; -- cgit v1.3.1