diff --git a/web/src/api.ts b/web/src/api.ts index 11e20c5..bd9eb86 100644 --- a/web/src/api.ts +++ b/web/src/api.ts @@ -91,17 +91,6 @@ function handleError(error: unknown, context: string): void { // ============================================================ // Reader API Functions // ============================================================ -interface ReaderMetadata { - media_item_id: string; - title: string; - author: string; - cover_image_path: string; - library_type: "ebook" | "comic" | "manga" | "pdf"; - mime_type: string; - file_path: string; - chapter_metadata?: ChapterMetadata; - total_pages?: number; -} interface ChapterMetadata { chapters: Chapter[]; } diff --git a/web/src/reader/reader.ts b/web/src/reader/reader.ts new file mode 100644 index 0000000..345b02c --- /dev/null +++ b/web/src/reader/reader.ts @@ -0,0 +1,13 @@ +import "../alpine"; +import { Alpine } from "../alpine"; +// Core utilities (minimal set needed by reader) +import "../api"; // API calls for reading progress +import "../dom"; // DOM helpers +import "../events"; // Event system +import "../storage"; // localStorage helpers +import "../theme"; // Theme support (reader needs theme) +import "../toast"; // Toast notifications +import "../toast-error"; // Error toasts +// Reader functionality +import "./reader-shell"; +Alpine.start(); diff --git a/web/src/types/reader.d.ts b/web/src/types/reader.d.ts index ecf273d..c1e6ab7 100644 --- a/web/src/types/reader.d.ts +++ b/web/src/types/reader.d.ts @@ -76,8 +76,11 @@ interface ReaderMetadata { title: string; author: string; cover_image_path: string; - library_type: "ebook" | "comic" | "manga" | "pdf"; + format_group: "reflowable" | "fixed_layout" | "comic_archive" | "unkown"; + library_type_name: "ebooks" | "comics" | "manga" | "pdf"; mime_type: string; + mime_type: string; + manga_type: "unknown" | "no" | "yes" | "yes_and_right_to_left"; file_path: string; chapter_metadata?: ChapterMetadata; total_pages?: number;