Introduce a new eBook reader with support for EPUB, MOBI, AZW3, and FB2 formats (#2258)

Co-authored-by: acx10 <acx10@users.noreply.github.com>
This commit is contained in:
ACX
2026-01-15 20:39:52 -07:00
committed by GitHub
co-authored by acx10
parent 775887b55f
commit 8c35f2415c
107 changed files with 13351 additions and 1733 deletions
@@ -3,7 +3,7 @@ import {CbxBackgroundColor, CbxFitMode, CbxPageSpread, CbxPageViewMode, CbxScrol
import {BookReview} from '../components/book-reviews/book-review-service';
import {ZoomType} from 'ngx-extended-pdf-viewer';
export type BookType = "PDF" | "EPUB" | "CBX" | "FB2";
export type BookType = "PDF" | "EPUB" | "CBX" | "FB2" | "MOBI" | "AZW3";
export enum AdditionalFileType {
ALTERNATIVE_FORMAT = 'ALTERNATIVE_FORMAT',
@@ -48,6 +48,7 @@ export interface Book extends FileInfo {
libraryPath?: { id: number };
alternativeFormats?: AdditionalFile[];
supplementaryFiles?: AdditionalFile[];
[key: string]: unknown;
}
@@ -150,6 +151,7 @@ export interface BookMetadata {
tagsLocked?: boolean;
coverLocked?: boolean;
reviewsLocked?: boolean;
[key: string]: unknown;
}
@@ -210,6 +212,21 @@ export interface EpubViewerSetting {
customFontId?: number | null;
}
export interface EbookViewerSetting {
lineHeight: number;
justify: boolean;
hyphenate: boolean;
maxColumnCount: number;
gap: number;
fontSize: number;
theme: string
maxInlineSize: number;
maxBlockSize: number;
fontFamily: string | null;
isDark: boolean;
flow: 'paginated' | 'scrolled';
}
export interface CbxViewerSetting {
pageSpread: CbxPageSpread;
pageViewMode: CbxPageViewMode;
@@ -221,8 +238,10 @@ export interface CbxViewerSetting {
export interface BookSetting {
pdfSettings?: PdfViewerSetting;
epubSettings?: EpubViewerSetting;
ebookSettings?: EbookViewerSetting;
cbxSettings?: CbxViewerSetting;
newPdfSettings?: NewPdfReaderSetting;
[key: string]: unknown;
}