@nypl/web-reader 4.3.4 → 5.0.0-alpha.0

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.
@@ -0,0 +1,549 @@
1
+ import { FC } from 'react';
2
+
3
+ interface Injectable {
4
+ type: string;
5
+ url?: string;
6
+ r2after?: boolean;
7
+ r2before?: boolean;
8
+ r2default?: boolean;
9
+ fontFamily?: string;
10
+ systemFont?: boolean;
11
+ appearance?: string;
12
+ async?: boolean;
13
+ }
14
+
15
+ interface Locator {
16
+ href: string;
17
+ type?: string;
18
+ title?: string;
19
+ locations: Locations;
20
+ text?: LocatorText;
21
+ }
22
+ interface LocatorText {
23
+ after?: string;
24
+ before?: string;
25
+ highlight?: string;
26
+ }
27
+ interface Locations {
28
+ fragment?: string;
29
+ progression?: number;
30
+ position?: number;
31
+ totalProgression?: number;
32
+ remainingPositions?: number;
33
+ totalRemainingPositions?: number;
34
+ }
35
+
36
+ declare const ReadiumWebpubContext = "http://readium.org/webpub/default.jsonld";
37
+ declare const IS_DEV: boolean;
38
+ declare const HEADER_HEIGHT = 48;
39
+ declare const CHROME_HEIGHT = 48;
40
+ declare const DEFAULT_HEIGHT = "calc(100vh - 48px)";
41
+ declare const DEFAULT_SHOULD_GROW_WHEN_SCROLLING = true;
42
+ declare const READER_MARGIN = 16;
43
+ declare const DEFAULT_SETTINGS: ReaderSettings;
44
+ declare const DEFAULT_FIT_MODE = "height";
45
+ declare const DEFAULT_FONT_HEIGHT = 100;
46
+ declare const DEFAULT_FONT_WIDTH = 250;
47
+ declare const FONT_DETAILS: {
48
+ publisher: {
49
+ heading: string;
50
+ body: string;
51
+ token: string;
52
+ fontWeight: string;
53
+ };
54
+ serif: {
55
+ heading: string;
56
+ body: string;
57
+ token: string;
58
+ fontWeight: string;
59
+ };
60
+ 'sans-serif': {
61
+ heading: string;
62
+ body: string;
63
+ token: string;
64
+ fontWeight: string;
65
+ };
66
+ 'open-dyslexic': {
67
+ heading: string;
68
+ body: string;
69
+ token: string;
70
+ fontWeight: string;
71
+ };
72
+ };
73
+ declare const LOCAL_STORAGE_SETTINGS_KEY = "web-reader-settings";
74
+ declare const LOCAL_STORAGE_LOCATIONS_KEY = "web-reader-locations";
75
+ declare const MAIN_CONTENT_ID = "mainContent";
76
+
77
+ declare const WebpubPdfConformsTo = "http://librarysimplified.org/terms/profiles/pdf";
78
+ declare const EpubConformsTo = "https://readium.org/webpub-manifest/profiles/epub";
79
+ type ConformsTo = typeof WebpubPdfConformsTo | typeof EpubConformsTo;
80
+
81
+ interface EPUBExtensionLinkProperties {
82
+ /**
83
+ * Identifies content contained in the linked resource, that cannot be strictly identified using a media type.
84
+ */
85
+ contains?: ('mathml' | 'onix' | 'remote-resources' | 'js' | 'svg' | 'xmp')[];
86
+ /**
87
+ * Hints how the layout of the resource should be presented
88
+ */
89
+ layout?: 'fixed' | 'reflowable';
90
+ /**
91
+ * Indicates that a resource is encrypted/obfuscated and provides relevant information for decryption
92
+ */
93
+ encrypted?: {
94
+ /**
95
+ * Identifies the algorithm used to encrypt the resource
96
+ */
97
+ algorithm: string;
98
+ /**
99
+ * Compression method used on the resource
100
+ */
101
+ compression?: string;
102
+ /**
103
+ * Original length of the resource in bytes before compression and/or encryption
104
+ */
105
+ originalLength?: number;
106
+ /**
107
+ * Identifies the encryption profile used to encrypt the resource
108
+ */
109
+ profile?: string;
110
+ /**
111
+ * Identifies the encryption scheme used to encrypt the resource
112
+ */
113
+ scheme?: string;
114
+ [k: string]: unknown;
115
+ };
116
+ [k: string]: unknown;
117
+ }
118
+ interface EPUBExtensionMetadata {
119
+ presentation?: {
120
+ /**
121
+ * Hints how the layout of the resource should be presented
122
+ */
123
+ layout?: 'fixed' | 'reflowable';
124
+ [k: string]: unknown;
125
+ };
126
+ [k: string]: unknown;
127
+ }
128
+
129
+ interface OPDSLinkProperties {
130
+ /**
131
+ * Provide a hint about the expected number of items returned
132
+ */
133
+ numberOfItems?: number;
134
+ /**
135
+ * The price of a publication is tied to its acquisition link
136
+ */
137
+ price?: {
138
+ value: number;
139
+ currency: 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'UYI' | 'UYU' | 'UZS' | 'VEF' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XSU' | 'XTS' | 'XUA' | 'XXX' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL';
140
+ [k: string]: unknown;
141
+ };
142
+ /**
143
+ * Indirect acquisition provides a hint for the expected media type that will be acquired after additional steps
144
+ */
145
+ indirectAcquisition?: OPDSAcquisitionObject[];
146
+ /**
147
+ * Library-specific feature for unavailable books that support a hold list
148
+ */
149
+ holds?: {
150
+ total?: number;
151
+ position?: number;
152
+ [k: string]: unknown;
153
+ };
154
+ /**
155
+ * Library-specific feature that contains information about the copies that a library has acquired
156
+ */
157
+ copies?: {
158
+ total?: number;
159
+ available?: number;
160
+ [k: string]: unknown;
161
+ };
162
+ /**
163
+ * Indicates the availability of a given resource
164
+ */
165
+ availability?: {
166
+ state: 'available' | 'unavailable' | 'reserved' | 'ready';
167
+ /**
168
+ * Timestamp for the previous state change
169
+ */
170
+ since?: ({
171
+ [k: string]: unknown;
172
+ } | {
173
+ [k: string]: unknown;
174
+ }) & string;
175
+ /**
176
+ * Timestamp for the next state change
177
+ */
178
+ until?: ({
179
+ [k: string]: unknown;
180
+ } | {
181
+ [k: string]: unknown;
182
+ }) & string;
183
+ [k: string]: unknown;
184
+ };
185
+ [k: string]: unknown;
186
+ }
187
+ interface OPDSAcquisitionObject {
188
+ type: string;
189
+ child?: OPDSAcquisitionObject[];
190
+ [k: string]: unknown;
191
+ }
192
+
193
+ interface PresentationHintsLinkProperties {
194
+ /**
195
+ * Specifies whether or not the parts of a linked resource that flow out of the viewport are clipped.
196
+ */
197
+ clipped?: boolean;
198
+ /**
199
+ * Specifies constraints for the presentation of a linked resource within the viewport.
200
+ */
201
+ fit?: 'contain' | 'cover' | 'width' | 'height';
202
+ /**
203
+ * Suggested orientation for the device when displaying the linked resource.
204
+ */
205
+ orientation?: 'auto' | 'landscape' | 'portrait';
206
+ /**
207
+ * Indicates how the linked resource should be displayed in a reading environment that displays synthetic spreads.
208
+ */
209
+ page?: 'left' | 'right' | 'center';
210
+ /**
211
+ * Indicates the condition to be met for the linked resource to be rendered within a synthetic spread.
212
+ */
213
+ spread?: 'auto' | 'both' | 'none' | 'landscape';
214
+ [k: string]: unknown;
215
+ }
216
+
217
+ interface ReadiumLink {
218
+ /**
219
+ * URI or URI template of the linked resource
220
+ */
221
+ href: string;
222
+ /**
223
+ * MIME type of the linked resource
224
+ */
225
+ type?: string;
226
+ /**
227
+ * Indicates that a URI template is used in href
228
+ */
229
+ templated?: boolean;
230
+ /**
231
+ * Title of the linked resource
232
+ */
233
+ title?: string;
234
+ /**
235
+ * Relation between the linked resource and its containing collection
236
+ */
237
+ rel?: string | string[];
238
+ /**
239
+ * Properties associated to the linked resource
240
+ */
241
+ properties?: OPDSLinkProperties & EPUBExtensionLinkProperties & PresentationHintsLinkProperties;
242
+ /**
243
+ * Height of the linked resource in pixels
244
+ */
245
+ height?: number;
246
+ /**
247
+ * Width of the linked resource in pixels
248
+ */
249
+ width?: number;
250
+ /**
251
+ * Bitrate of the linked resource in kbps
252
+ */
253
+ bitrate?: number;
254
+ /**
255
+ * Length of the linked resource in seconds
256
+ */
257
+ duration?: number;
258
+ /**
259
+ * Expected language of the linked resource
260
+ */
261
+ language?: string | string[];
262
+ /**
263
+ * Alternate resources for the linked resource
264
+ */
265
+ alternate?: ReadiumLink[];
266
+ /**
267
+ * Resources that are children of the linked resource, in the context of a given collection role
268
+ */
269
+ children?: ReadiumLink[];
270
+ [k: string]: unknown;
271
+ }
272
+
273
+ interface ContributorObject {
274
+ name: string | {
275
+ /**
276
+ * This interface was referenced by `undefined`'s JSON-Schema definition
277
+ * via the `patternProperty` "^((?<grandfathered>(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?<language>([A-Za-z]{2,3}(-(?<extlang>[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-(?<script>[A-Za-z]{4}))?(-(?<region>[A-Za-z]{2}|[0-9]{3}))?(-(?<variant>[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?<extension>[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?<privateUse>x(-[A-Za-z0-9]{1,8})+))?)|(?<privateUse2>x(-[A-Za-z0-9]{1,8})+))$".
278
+ */
279
+ [k: string]: string;
280
+ };
281
+ identifier?: string;
282
+ sortAs?: string;
283
+ role?: string | string[];
284
+ position?: number;
285
+ links?: ReadiumLink[];
286
+ [k: string]: unknown;
287
+ }
288
+ type Contributor = string | (string | ContributorObject)[] | ContributorObject;
289
+
290
+ type LanguageMap = string | {
291
+ [k: string]: string;
292
+ };
293
+
294
+ interface SubjectObject {
295
+ name: string | {
296
+ /**
297
+ * This interface was referenced by `undefined`'s JSON-Schema definition
298
+ * via the `patternProperty` "^((?<grandfathered>(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?<language>([A-Za-z]{2,3}(-(?<extlang>[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-(?<script>[A-Za-z]{4}))?(-(?<region>[A-Za-z]{2}|[0-9]{3}))?(-(?<variant>[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?<extension>[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?<privateUse>x(-[A-Za-z0-9]{1,8})+))?)|(?<privateUse2>x(-[A-Za-z0-9]{1,8})+))$".
299
+ */
300
+ [k: string]: string;
301
+ };
302
+ sortAs?: string;
303
+ code?: string;
304
+ scheme?: string;
305
+ links?: ReadiumLink[];
306
+ [k: string]: unknown;
307
+ }
308
+ type Subject = string | (string | SubjectObject)[] | SubjectObject;
309
+
310
+ interface Metadata extends Contributors, EPUBExtensionMetadata {
311
+ identifier?: string;
312
+ '@type'?: string;
313
+ conformsTo?: ConformsTo;
314
+ title: LanguageMap;
315
+ subtitle?: LanguageMap;
316
+ modified?: string;
317
+ published?: {
318
+ [k: string]: unknown;
319
+ } & string;
320
+ /**
321
+ * The language must be a valid BCP 47 tag.
322
+ */
323
+ language?: string | string[];
324
+ sortAs?: LanguageMap;
325
+ subject?: Subject;
326
+ readingProgression?: 'rtl' | 'ltr' | 'ttb' | 'btt' | 'auto';
327
+ description?: string;
328
+ duration?: number;
329
+ numberOfPages?: number;
330
+ belongsTo?: {
331
+ collection?: Contributor;
332
+ series?: Contributor;
333
+ [k: string]: unknown;
334
+ };
335
+ [k: string]: unknown;
336
+ }
337
+ interface Contributors {
338
+ author?: Contributor;
339
+ translator?: Contributor;
340
+ editor?: Contributor;
341
+ artist?: Contributor;
342
+ illustrator?: Contributor;
343
+ letterer?: Contributor;
344
+ penciler?: Contributor;
345
+ colorist?: Contributor;
346
+ inker?: Contributor;
347
+ narrator?: Contributor;
348
+ contributor?: Contributor;
349
+ publisher?: Contributor;
350
+ imprint?: Contributor;
351
+ }
352
+
353
+ /**
354
+ * Type definitions for a manifest
355
+ */
356
+
357
+ interface WebpubManifest {
358
+ '@context'?: typeof ReadiumWebpubContext;
359
+ metadata: Metadata;
360
+ links: ReadiumLink[];
361
+ readingOrder: ReadiumLink[];
362
+ resources?: ReadiumLink[];
363
+ toc?: ReadiumLink[];
364
+ }
365
+
366
+ type ColorMode = 'night' | 'sepia' | 'day';
367
+ type FontFamily = 'publisher' | 'serif' | 'sans-serif' | 'open-dyslexic';
368
+ type FitMode = 'width' | 'height';
369
+ type Navigator = {
370
+ goForward: () => void;
371
+ goBackward: () => void;
372
+ setScroll: (val: 'scrolling' | 'paginated') => Promise<void>;
373
+ goToPage: (href: string) => void;
374
+ goToPageNumber: (pageNumber: number) => void;
375
+ setFitMode: (mode: FitMode) => void;
376
+ };
377
+ type PdfNavigator = Navigator & {
378
+ zoomIn: () => Promise<void>;
379
+ zoomOut: () => Promise<void>;
380
+ rotateCounterClockwise: () => void;
381
+ };
382
+ type HtmlNavigator = Navigator & {
383
+ increaseFontSize: () => Promise<void>;
384
+ decreaseFontSize: () => Promise<void>;
385
+ setFontFamily: (family: FontFamily) => Promise<void>;
386
+ setColorMode: (mode: ColorMode) => Promise<void>;
387
+ resetSettings: () => Promise<void>;
388
+ };
389
+ type ReaderSettings = {
390
+ colorMode: ColorMode;
391
+ isScrolling: boolean;
392
+ fontSize: number;
393
+ fontFamily: FontFamily;
394
+ };
395
+ /**
396
+ * This is the "public" state of the reader that
397
+ * is returned to consumers of useWebReader. Each
398
+ * reader (pdf/html) has its own internal state with
399
+ * more details necessary for rendering
400
+ */
401
+ type ReaderState = {
402
+ atStart: boolean;
403
+ atEnd: boolean;
404
+ location?: Locator;
405
+ settings: ReaderSettings | undefined;
406
+ fitMode: FitMode;
407
+ rotation?: number;
408
+ };
409
+ type InactiveReader = null;
410
+ type LoadingReader = {
411
+ isLoading: true;
412
+ content: JSX.Element;
413
+ navigator: null;
414
+ state: null;
415
+ manifest: null;
416
+ type: null;
417
+ };
418
+ type CommonReader = {
419
+ isLoading: false;
420
+ content: JSX.Element;
421
+ manifest: WebpubManifest;
422
+ currentPage: number;
423
+ totalPages: number;
424
+ toggleFullScreen?: () => void;
425
+ };
426
+ type PDFActiveReader = CommonReader & {
427
+ state: ReaderState;
428
+ navigator: PdfNavigator;
429
+ type: 'PDF';
430
+ };
431
+ type HTMLActiveReader = CommonReader & {
432
+ state: ReaderState;
433
+ navigator: HtmlNavigator;
434
+ type: 'HTML';
435
+ };
436
+ type ActiveReader = PDFActiveReader | HTMLActiveReader;
437
+ type ReaderReturn = InactiveReader | LoadingReader | ActiveReader;
438
+ type GetContent<T extends string | Uint8Array> = (href: string, proxyUrl?: string) => Promise<T>;
439
+ type UseWebReaderArguments<T extends string | Uint8Array> = {
440
+ webpubManifestUrl: string;
441
+ proxyUrl?: string;
442
+ getContent?: GetContent<T>;
443
+ pdfWorkerSrc?: string;
444
+ injectablesReflowable?: Injectable[];
445
+ injectablesFixed?: Injectable[];
446
+ /**
447
+ * CSS string to set the height of the reader in paginated mode, and also
448
+ * in scrolling mode if `growWhenScrolling` is `false`.
449
+ *
450
+ * eg: "800px" or `calc(100vh-${CHROME_HEIGHT})`
451
+ *
452
+ * Default: `calc(100vh-${CHROME_HEIGHT})`
453
+ */
454
+ height?: string;
455
+ /**
456
+ * Tells the renderer if it should grow to fit content in scrolling mode, or if should
457
+ * remain the same height and instead show an internal scroll bar. Set to `true` by
458
+ * default, as this should be used in a full-page reader, the most common use case.
459
+ *
460
+ * Default: `true`
461
+ */
462
+ growWhenScrolling?: boolean;
463
+ /**
464
+ * Initial user settings for the reader
465
+ */
466
+ readerSettings?: Partial<ReaderSettings>;
467
+ /**
468
+ * If enabled, reading location will be persisted to local storage and recalled from
469
+ * there upon initial load.
470
+ *
471
+ * Default: `true`
472
+ */
473
+ persistLastLocation?: boolean;
474
+ /**
475
+ * If enabled, reader settings will be persisted to local storage and recalled
476
+ * from there upon initial load.
477
+ *
478
+ * Default: `true`
479
+ */
480
+ persistSettings?: boolean;
481
+ /**
482
+ * Optional callback to expand the reader to full viewport.
483
+ */
484
+ toggleFullScreen?: () => void;
485
+ };
486
+ type ActiveReaderArguments<T extends string | Uint8Array> = UseWebReaderArguments<T> & {
487
+ manifest: WebpubManifest;
488
+ };
489
+ type InactiveReaderArguments = undefined;
490
+
491
+ type HtmlReaderArguments = ActiveReaderArguments<string> | InactiveReaderArguments;
492
+
493
+ declare function useHtmlReader(args: HtmlReaderArguments): ReaderReturn;
494
+
495
+ type PdfReaderArguments = ActiveReaderArguments<Uint8Array> | InactiveReaderArguments;
496
+
497
+ /**
498
+ * The PDF reader
499
+ *
500
+ * The PDF reader loads resources in two stages: First, it fetches the PDF resource as an Uint8Array
501
+ * Then, it passes this array into the <Document> object, which loads the PDF inside an iframe
502
+ *
503
+ * @param args T
504
+ * @returns
505
+ */
506
+ declare function usePdfReader(args: PdfReaderArguments): ReaderReturn;
507
+
508
+ /**
509
+ * Adds TOC data to Webpub Manifest from single-resource PDF using PDF.js
510
+ * @param manifest
511
+ * @param getResource - a function to get the resource. This allows the caller
512
+ * to decide how to get the resource, for example through a proxy if necessary.
513
+ * @param pdfWorkerSrc - the path to the pdfjs worker file. Necessary to use pdfjs.
514
+ * @returns {WebpubManifest} manifest object
515
+ */
516
+ declare function addTocToManifest(manifest: WebpubManifest, getResource: (url: string) => Promise<Uint8Array>, pdfWorkerSrc: string): Promise<WebpubManifest>;
517
+
518
+ declare const useColorModeValue: (light: string, dark: string, sepia: string) => string;
519
+
520
+ type Dict<T = any> = Record<string, T>;
521
+
522
+ /**
523
+ * See Chakra default theme for shape of theme object:
524
+ * https://github.com/chakra-ui/chakra-ui/tree/main/packages/theme
525
+ *
526
+ * Making this a function because we need to adjust the theme based
527
+ * on the colorMode that's being passed in.
528
+ *
529
+ * Returns the chakra theme object with an additional property `currentColorMode`
530
+ */
531
+ declare function getTheme(colorMode?: ColorMode): Dict<unknown>;
532
+
533
+ /**
534
+ * The React hook that exposes the main API into the reader. It
535
+ * will determine the type of the webpub, and then use the correct reader
536
+ * for that type.
537
+ */
538
+ declare function useWebReader(args: UseWebReaderArguments<string | Uint8Array>): HTMLActiveReader | PDFActiveReader | LoadingReader;
539
+
540
+ declare function clearWebReaderLocalStorage(): void;
541
+
542
+ /**
543
+ * The main React component export.
544
+ */
545
+ type WebReaderProps = UseWebReaderArguments<string | Uint8Array>;
546
+ declare const WebReaderWithoutBoundary: FC<WebReaderProps>;
547
+ declare const WebReader: FC<WebReaderProps>;
548
+
549
+ export { CHROME_HEIGHT, DEFAULT_FIT_MODE, DEFAULT_FONT_HEIGHT, DEFAULT_FONT_WIDTH, DEFAULT_HEIGHT, DEFAULT_SETTINGS, DEFAULT_SHOULD_GROW_WHEN_SCROLLING, FONT_DETAILS, HEADER_HEIGHT, IS_DEV, LOCAL_STORAGE_LOCATIONS_KEY, LOCAL_STORAGE_SETTINGS_KEY, MAIN_CONTENT_ID, READER_MARGIN, type ReadiumLink, ReadiumWebpubContext, type WebReaderProps, WebReaderWithoutBoundary, type WebpubManifest, addTocToManifest, clearWebReaderLocalStorage, WebReader as default, getTheme, useColorModeValue, useHtmlReader, usePdfReader, useWebReader };