refactor(reader): update reader-shell imports for new architecture

Update reader-shell.ts to import from the new modular structure, preparing
for the integration of page-based pagination system for reflowable formats.

## Import Updates

### Format Modules
- parseReflowable: Unified parser for EPUB, FB2, TXT, HTML
- calculatePagination: Word-count based page calculation
- shouldRecalculate: Viewport change detection for recalculation
- restorePosition: CFI-based position restoration
- applyPaginatedStyles: CSS styling for paginated content

### Type System
- ReflowableBook: New type for page-based book data
- PaginationSettings: Configuration for page calculation

### UI Components
- updatePageDisplay: Page X of Y display
- updateProgressBar: Progress bar updates

## Purpose

These imports prepare reader-shell.ts for the upcoming implementation of:
1. Page-based pagination for reflowable formats
2. CFI-based progress tracking and restoration
3. Dynamic recalculation on viewport/font changes
4. Integration with new modular architecture

The actual implementation using these imports will follow in subsequent commits
to replace the broken spine-based system with working page-based pagination.
This commit is contained in:
2026-04-09 14:53:53 -04:00
parent c7dd8029de
commit ef5f6370d3
+12
View File
@@ -6,6 +6,18 @@ import { getState, setState } from "./core/reader-state";
import { createNavigationAPI } from "./core/reader-navigation";
import { readerEvents } from "./core/reader-events";
import { renderSpineItem } from "./core/reader-navigation";
import { parseReflowable } from "./formats/reflowable/parser";
import {
calculatePagination,
shouldRecalculate,
} from "./formats/reflowable/page-calculator";
import { restorePosition } from "./formats/reflowable/progress-tracker";
import { applyPaginatedStyles } from "./formats/reflowable/content-renderer";
import type {
ReflowableBook,
PaginationSettings,
} from "./formats/reflowable/types";
import { updatePageDisplay, updateProgressBar } from "./ui/page-display";
export interface UniversalReader {
type: "ebook";