@pressy-pub/components 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -14,6 +14,22 @@ interface ChapterMapData {
14
14
  }>>;
15
15
  chapterOrder: string[];
16
16
  }
17
+ interface OfflineProps {
18
+ bookSlug: string;
19
+ chapterUrls: string[];
20
+ cachedBooks: {
21
+ value: Set<string>;
22
+ };
23
+ cacheProgress: {
24
+ value: {
25
+ bookSlug: string;
26
+ current: number;
27
+ total: number;
28
+ } | null;
29
+ };
30
+ onDownload: (bookSlug: string, chapterUrls: string[]) => void;
31
+ onRemove: (bookSlug: string) => void;
32
+ }
17
33
  interface ReaderProps {
18
34
  children: ComponentChildren;
19
35
  title: string;
@@ -45,8 +61,9 @@ interface ReaderProps {
45
61
  bookBasePath?: string;
46
62
  onChapterChange?: (slug: string, page: number, totalPages: number) => void;
47
63
  mdxComponents?: Record<string, unknown>;
64
+ offlineProps?: OfflineProps;
48
65
  }
49
- declare function Reader({ children, bookTitle, prevChapter, nextChapter, showDropCap, paginationMode, onSaveProgress, onRestoreProgress, bookProgressPercent, initialContent, chapterMapData, currentChapterSlug, allChapters, bookBasePath, onChapterChange, mdxComponents, }: ReaderProps): preact.JSX.Element;
66
+ declare function Reader({ children, bookTitle, prevChapter, nextChapter, showDropCap, paginationMode, onSaveProgress, onRestoreProgress, bookProgressPercent, initialContent, chapterMapData, currentChapterSlug, allChapters, bookBasePath, onChapterChange, mdxComponents, offlineProps, }: ReaderProps): preact.JSX.Element;
50
67
 
51
68
  interface NavigationProps {
52
69
  prev?: {
@@ -128,4 +145,4 @@ interface BookProgressProps {
128
145
  }
129
146
  declare function BookProgress({ chapters, basePath, bookSlug, loadAllProgress, }: BookProgressProps): preact.JSX.Element;
130
147
 
131
- export { BookProgress, type BookProgressProps, type ChapterMapData, DownloadBook, type DownloadBookProps, Navigation, type NavigationProps, OfflineIndicator, Paywall, type PaywallProps, type ProgressData, Reader, type ReaderProps, type TOCItem, TableOfContents, type TableOfContentsProps, TextShare, ThemeSwitcher };
148
+ export { BookProgress, type BookProgressProps, type ChapterMapData, DownloadBook, type DownloadBookProps, Navigation, type NavigationProps, OfflineIndicator, type OfflineProps, Paywall, type PaywallProps, type ProgressData, Reader, type ReaderProps, type TOCItem, TableOfContents, type TableOfContentsProps, TextShare, ThemeSwitcher };