@nypl/web-reader 0.1.4 → 0.2.0-alpha.3
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/cjs/ServiceWorker/sw.js +2 -0
- package/dist/cjs/ServiceWorker/sw.js.map +7 -0
- package/dist/cjs/index.js +683 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/esm/ServiceWorker/sw.js +1263 -0
- package/dist/esm/ServiceWorker/sw.js.map +7 -0
- package/dist/esm/index.js +88803 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/html-styles.css +2 -0
- package/dist/html-styles.css.map +7 -0
- package/dist/pdf-styles.css +2 -0
- package/dist/pdf-styles.css.map +7 -0
- package/dist/{HtmlReader → types/HtmlReader}/HtmlReaderContent.d.ts +3 -3
- package/dist/{HtmlReader → types/HtmlReader}/index.d.ts +22 -22
- package/dist/{HtmlReader → types/HtmlReader}/injectables.d.ts +30 -30
- package/dist/{PdfReader → types/PdfReader}/index.d.ts +11 -12
- package/dist/{PdfReader → types/PdfReader}/useMeasure.d.ts +7 -4
- package/dist/{ServiceWorker → types/ServiceWorker}/client.d.ts +9 -9
- package/dist/{ServiceWorker → types/ServiceWorker}/constants.d.ts +3 -3
- package/{src/ServiceWorker/index.ts → dist/types/ServiceWorker/index.d.ts} +0 -0
- package/dist/{ServiceWorker → types/ServiceWorker}/sw.d.ts +7 -7
- package/dist/{ServiceWorker → types/ServiceWorker}/types.d.ts +3 -3
- package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/ConformsTo.d.ts +3 -3
- package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/Contributor.d.ts +17 -17
- package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/EpubExtension.d.ts +47 -47
- package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/LanguageMap.d.ts +3 -3
- package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/Metadata.d.ts +46 -46
- package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/OPDSLink.d.ts +63 -63
- package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/PresentationHints.d.ts +53 -53
- package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/ReadiumLink.d.ts +58 -58
- package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/Subject.d.ts +16 -16
- package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/WebpubManifest.d.ts +14 -14
- package/dist/{constants.d.ts → types/constants.d.ts} +2 -2
- package/dist/{index.d.ts → types/index.d.ts} +7 -7
- package/dist/{types.d.ts → types/types.d.ts} +66 -66
- package/dist/{ui → types/ui}/Button.d.ts +9 -7
- package/dist/{ui → types/ui}/Header.d.ts +6 -6
- package/dist/{ui → types/ui}/HtmlSettings.d.ts +9 -9
- package/dist/{ui → types/ui}/PageButton.d.ts +7 -7
- package/dist/{ui → types/ui}/PdfSettings.d.ts +9 -9
- package/dist/{ui → types/ui}/SettingsButton.d.ts +5 -5
- package/dist/{ui → types/ui}/TableOfContent.d.ts +7 -7
- package/dist/{ui → types/ui}/ToggleButton.d.ts +10 -10
- package/dist/{ui → types/ui}/ToggleGroup.d.ts +8 -8
- package/dist/{ui → types/ui}/constants.d.ts +1 -1
- package/dist/{ui → types/ui}/hooks/useColorModeValue.d.ts +7 -7
- package/dist/{ui → types/ui}/hooks/useContainerWidth.d.ts +6 -6
- package/dist/{ui → types/ui}/hooks/useEventListener.d.ts +8 -8
- package/dist/{ui → types/ui}/manager.d.ts +9 -9
- package/dist/{ui → types/ui}/nypl-base-theme/components/button.d.ts +94 -94
- package/dist/{ui → types/ui}/nypl-base-theme/components/checkbox.d.ts +41 -41
- package/dist/{ui → types/ui}/nypl-base-theme/components/form-error.d.ts +14 -14
- package/dist/{ui → types/ui}/nypl-base-theme/components/form-label.d.ts +14 -14
- package/dist/{ui → types/ui}/nypl-base-theme/components/form.d.ts +15 -15
- package/dist/{ui → types/ui}/nypl-base-theme/components/input.d.ts +107 -107
- package/dist/{ui → types/ui}/nypl-base-theme/components/text-area.d.ts +34 -34
- package/dist/{ui → types/ui}/nypl-base-theme/foundations/breakpoints.d.ts +8 -8
- package/dist/{ui → types/ui}/nypl-base-theme/foundations/colors.d.ts +3 -3
- package/dist/{ui → types/ui}/nypl-base-theme/foundations/global.d.ts +13 -13
- package/dist/{ui → types/ui}/nypl-base-theme/foundations/radii.d.ts +12 -12
- package/dist/{ui → types/ui}/nypl-base-theme/foundations/spacing.d.ts +49 -49
- package/dist/{ui → types/ui}/nypl-base-theme/foundations/typography.d.ts +10 -10
- package/dist/{ui → types/ui}/nypl-base-theme/index.d.ts +6 -6
- package/dist/{ui → types/ui}/nypl-base-theme/types.d.ts +1 -1
- package/dist/{ui → types/ui}/theme/components/button.d.ts +78 -78
- package/dist/{ui → types/ui}/theme/components/text.d.ts +20 -20
- package/dist/{ui → types/ui}/theme/foundations/colors.d.ts +3 -3
- package/dist/{ui → types/ui}/theme/index.d.ts +11 -11
- package/dist/{ui → types/ui}/theme/types.d.ts +1 -1
- package/dist/{useWebReader.d.ts → types/useWebReader.d.ts} +7 -7
- package/dist/{utils → types/utils}/decryptAxisNow.d.ts +0 -0
- package/dist/{utils → types/utils}/fetch.d.ts +4 -4
- package/dist/{utils → types/utils}/getColor.d.ts +2 -2
- package/dist/{utils → types/utils}/toggleFullScreen.d.ts +5 -5
- package/package.json +21 -33
- package/dist/ServiceWorker/index.d.ts +0 -1
- package/dist/index.js +0 -8
- package/dist/web-reader.cjs.development.js +0 -3363
- package/dist/web-reader.cjs.development.js.map +0 -1
- package/dist/web-reader.cjs.production.min.js +0 -2
- package/dist/web-reader.cjs.production.min.js.map +0 -1
- package/dist/web-reader.esm.js +0 -3356
- package/dist/web-reader.esm.js.map +0 -1
- package/src/HtmlReader/HtmlReaderContent.tsx +0 -19
- package/src/HtmlReader/index.tsx +0 -262
- package/src/HtmlReader/injectables.ts +0 -26
- package/src/PdfReader/index.tsx +0 -492
- package/src/PdfReader/useMeasure.tsx +0 -68
- package/src/ServiceWorker/client.ts +0 -106
- package/src/ServiceWorker/constants.ts +0 -4
- package/src/ServiceWorker/sw.ts +0 -84
- package/src/ServiceWorker/types.ts +0 -3
- package/src/WebpubManifestTypes/ConformsTo.ts +0 -9
- package/src/WebpubManifestTypes/Contributor.ts +0 -24
- package/src/WebpubManifestTypes/EpubExtension.ts +0 -48
- package/src/WebpubManifestTypes/LanguageMap.ts +0 -5
- package/src/WebpubManifestTypes/Metadata.ts +0 -48
- package/src/WebpubManifestTypes/OPDSLink.ts +0 -251
- package/src/WebpubManifestTypes/PresentationHints.ts +0 -54
- package/src/WebpubManifestTypes/ReadiumLink.ts +0 -61
- package/src/WebpubManifestTypes/Subject.ts +0 -20
- package/src/WebpubManifestTypes/WebpubManifest.ts +0 -15
- package/src/constants.ts +0 -3
- package/src/index.tsx +0 -25
- package/src/types.ts +0 -94
- package/src/ui/Button.tsx +0 -12
- package/src/ui/Header.tsx +0 -89
- package/src/ui/HtmlSettings.tsx +0 -97
- package/src/ui/PageButton.tsx +0 -39
- package/src/ui/PdfSettings.tsx +0 -85
- package/src/ui/SettingsButton.tsx +0 -71
- package/src/ui/TableOfContent.tsx +0 -144
- package/src/ui/ToggleButton.tsx +0 -60
- package/src/ui/ToggleGroup.tsx +0 -41
- package/src/ui/constants.ts +0 -2
- package/src/ui/hooks/useColorModeValue.tsx +0 -19
- package/src/ui/hooks/useContainerWidth.ts +0 -24
- package/src/ui/hooks/useEventListener.ts +0 -26
- package/src/ui/manager.tsx +0 -73
- package/src/ui/nypl-base-theme/components/button.ts +0 -117
- package/src/ui/nypl-base-theme/components/checkbox.ts +0 -45
- package/src/ui/nypl-base-theme/components/form-error.ts +0 -15
- package/src/ui/nypl-base-theme/components/form-label.ts +0 -15
- package/src/ui/nypl-base-theme/components/form.ts +0 -16
- package/src/ui/nypl-base-theme/components/input.ts +0 -101
- package/src/ui/nypl-base-theme/components/text-area.ts +0 -17
- package/src/ui/nypl-base-theme/foundations/breakpoints.ts +0 -10
- package/src/ui/nypl-base-theme/foundations/colors.ts +0 -136
- package/src/ui/nypl-base-theme/foundations/global.ts +0 -16
- package/src/ui/nypl-base-theme/foundations/radii.ts +0 -13
- package/src/ui/nypl-base-theme/foundations/spacing.ts +0 -58
- package/src/ui/nypl-base-theme/foundations/typography.ts +0 -43
- package/src/ui/nypl-base-theme/index.ts +0 -42
- package/src/ui/nypl-base-theme/types.ts +0 -1
- package/src/ui/theme/components/button.ts +0 -85
- package/src/ui/theme/components/text.ts +0 -24
- package/src/ui/theme/foundations/colors.ts +0 -10
- package/src/ui/theme/index.ts +0 -34
- package/src/ui/theme/types.ts +0 -1
- package/src/useWebReader.tsx +0 -105
- package/src/utils/decryptAxisNow.ts +0 -45
- package/src/utils/fetch.ts +0 -13
- package/src/utils/getColor.ts +0 -14
- package/src/utils/toggleFullScreen.ts +0 -71
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { ConformsTo } from './ConformsTo';
|
|
2
|
-
import { Contributor } from './Contributor';
|
|
3
|
-
import { LanguageMap } from './LanguageMap';
|
|
4
|
-
import { Subject } from './Subject';
|
|
5
|
-
export interface Metadata extends Contributors {
|
|
6
|
-
identifier?: string;
|
|
7
|
-
'@type'?: string;
|
|
8
|
-
conformsTo?: ConformsTo;
|
|
9
|
-
title: LanguageMap;
|
|
10
|
-
subtitle?: LanguageMap;
|
|
11
|
-
modified?: string;
|
|
12
|
-
published?: {
|
|
13
|
-
[k: string]: unknown;
|
|
14
|
-
} & string;
|
|
15
|
-
/**
|
|
16
|
-
* The language must be a valid BCP 47 tag.
|
|
17
|
-
*/
|
|
18
|
-
language?: string | string[];
|
|
19
|
-
sortAs?: LanguageMap;
|
|
20
|
-
subject?: Subject;
|
|
21
|
-
readingProgression?: 'rtl' | 'ltr' | 'ttb' | 'btt' | 'auto';
|
|
22
|
-
description?: string;
|
|
23
|
-
duration?: number;
|
|
24
|
-
numberOfPages?: number;
|
|
25
|
-
belongsTo?: {
|
|
26
|
-
collection?: Contributor;
|
|
27
|
-
series?: Contributor;
|
|
28
|
-
[k: string]: unknown;
|
|
29
|
-
};
|
|
30
|
-
[k: string]: unknown;
|
|
31
|
-
}
|
|
32
|
-
export interface Contributors {
|
|
33
|
-
author?: Contributor;
|
|
34
|
-
translator?: Contributor;
|
|
35
|
-
editor?: Contributor;
|
|
36
|
-
artist?: Contributor;
|
|
37
|
-
illustrator?: Contributor;
|
|
38
|
-
letterer?: Contributor;
|
|
39
|
-
penciler?: Contributor;
|
|
40
|
-
colorist?: Contributor;
|
|
41
|
-
inker?: Contributor;
|
|
42
|
-
narrator?: Contributor;
|
|
43
|
-
contributor?: Contributor;
|
|
44
|
-
publisher?: Contributor;
|
|
45
|
-
imprint?: Contributor;
|
|
46
|
-
}
|
|
1
|
+
import { ConformsTo } from './ConformsTo';
|
|
2
|
+
import { Contributor } from './Contributor';
|
|
3
|
+
import { LanguageMap } from './LanguageMap';
|
|
4
|
+
import { Subject } from './Subject';
|
|
5
|
+
export interface Metadata extends Contributors {
|
|
6
|
+
identifier?: string;
|
|
7
|
+
'@type'?: string;
|
|
8
|
+
conformsTo?: ConformsTo;
|
|
9
|
+
title: LanguageMap;
|
|
10
|
+
subtitle?: LanguageMap;
|
|
11
|
+
modified?: string;
|
|
12
|
+
published?: {
|
|
13
|
+
[k: string]: unknown;
|
|
14
|
+
} & string;
|
|
15
|
+
/**
|
|
16
|
+
* The language must be a valid BCP 47 tag.
|
|
17
|
+
*/
|
|
18
|
+
language?: string | string[];
|
|
19
|
+
sortAs?: LanguageMap;
|
|
20
|
+
subject?: Subject;
|
|
21
|
+
readingProgression?: 'rtl' | 'ltr' | 'ttb' | 'btt' | 'auto';
|
|
22
|
+
description?: string;
|
|
23
|
+
duration?: number;
|
|
24
|
+
numberOfPages?: number;
|
|
25
|
+
belongsTo?: {
|
|
26
|
+
collection?: Contributor;
|
|
27
|
+
series?: Contributor;
|
|
28
|
+
[k: string]: unknown;
|
|
29
|
+
};
|
|
30
|
+
[k: string]: unknown;
|
|
31
|
+
}
|
|
32
|
+
export interface Contributors {
|
|
33
|
+
author?: Contributor;
|
|
34
|
+
translator?: Contributor;
|
|
35
|
+
editor?: Contributor;
|
|
36
|
+
artist?: Contributor;
|
|
37
|
+
illustrator?: Contributor;
|
|
38
|
+
letterer?: Contributor;
|
|
39
|
+
penciler?: Contributor;
|
|
40
|
+
colorist?: Contributor;
|
|
41
|
+
inker?: Contributor;
|
|
42
|
+
narrator?: Contributor;
|
|
43
|
+
contributor?: Contributor;
|
|
44
|
+
publisher?: Contributor;
|
|
45
|
+
imprint?: Contributor;
|
|
46
|
+
}
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
export interface OPDSLinkProperties {
|
|
2
|
-
/**
|
|
3
|
-
* Provide a hint about the expected number of items returned
|
|
4
|
-
*/
|
|
5
|
-
numberOfItems?: number;
|
|
6
|
-
/**
|
|
7
|
-
* The price of a publication is tied to its acquisition link
|
|
8
|
-
*/
|
|
9
|
-
price?: {
|
|
10
|
-
value: number;
|
|
11
|
-
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';
|
|
12
|
-
[k: string]: unknown;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Indirect acquisition provides a hint for the expected media type that will be acquired after additional steps
|
|
16
|
-
*/
|
|
17
|
-
indirectAcquisition?: OPDSAcquisitionObject[];
|
|
18
|
-
/**
|
|
19
|
-
* Library-specific feature for unavailable books that support a hold list
|
|
20
|
-
*/
|
|
21
|
-
holds?: {
|
|
22
|
-
total?: number;
|
|
23
|
-
position?: number;
|
|
24
|
-
[k: string]: unknown;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Library-specific feature that contains information about the copies that a library has acquired
|
|
28
|
-
*/
|
|
29
|
-
copies?: {
|
|
30
|
-
total?: number;
|
|
31
|
-
available?: number;
|
|
32
|
-
[k: string]: unknown;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Indicates the availability of a given resource
|
|
36
|
-
*/
|
|
37
|
-
availability?: {
|
|
38
|
-
state: 'available' | 'unavailable' | 'reserved' | 'ready';
|
|
39
|
-
/**
|
|
40
|
-
* Timestamp for the previous state change
|
|
41
|
-
*/
|
|
42
|
-
since?: ({
|
|
43
|
-
[k: string]: unknown;
|
|
44
|
-
} | {
|
|
45
|
-
[k: string]: unknown;
|
|
46
|
-
}) & string;
|
|
47
|
-
/**
|
|
48
|
-
* Timestamp for the next state change
|
|
49
|
-
*/
|
|
50
|
-
until?: ({
|
|
51
|
-
[k: string]: unknown;
|
|
52
|
-
} | {
|
|
53
|
-
[k: string]: unknown;
|
|
54
|
-
}) & string;
|
|
55
|
-
[k: string]: unknown;
|
|
56
|
-
};
|
|
57
|
-
[k: string]: unknown;
|
|
58
|
-
}
|
|
59
|
-
export interface OPDSAcquisitionObject {
|
|
60
|
-
type: string;
|
|
61
|
-
child?: OPDSAcquisitionObject[];
|
|
62
|
-
[k: string]: unknown;
|
|
63
|
-
}
|
|
1
|
+
export interface OPDSLinkProperties {
|
|
2
|
+
/**
|
|
3
|
+
* Provide a hint about the expected number of items returned
|
|
4
|
+
*/
|
|
5
|
+
numberOfItems?: number;
|
|
6
|
+
/**
|
|
7
|
+
* The price of a publication is tied to its acquisition link
|
|
8
|
+
*/
|
|
9
|
+
price?: {
|
|
10
|
+
value: number;
|
|
11
|
+
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';
|
|
12
|
+
[k: string]: unknown;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Indirect acquisition provides a hint for the expected media type that will be acquired after additional steps
|
|
16
|
+
*/
|
|
17
|
+
indirectAcquisition?: OPDSAcquisitionObject[];
|
|
18
|
+
/**
|
|
19
|
+
* Library-specific feature for unavailable books that support a hold list
|
|
20
|
+
*/
|
|
21
|
+
holds?: {
|
|
22
|
+
total?: number;
|
|
23
|
+
position?: number;
|
|
24
|
+
[k: string]: unknown;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Library-specific feature that contains information about the copies that a library has acquired
|
|
28
|
+
*/
|
|
29
|
+
copies?: {
|
|
30
|
+
total?: number;
|
|
31
|
+
available?: number;
|
|
32
|
+
[k: string]: unknown;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Indicates the availability of a given resource
|
|
36
|
+
*/
|
|
37
|
+
availability?: {
|
|
38
|
+
state: 'available' | 'unavailable' | 'reserved' | 'ready';
|
|
39
|
+
/**
|
|
40
|
+
* Timestamp for the previous state change
|
|
41
|
+
*/
|
|
42
|
+
since?: ({
|
|
43
|
+
[k: string]: unknown;
|
|
44
|
+
} | {
|
|
45
|
+
[k: string]: unknown;
|
|
46
|
+
}) & string;
|
|
47
|
+
/**
|
|
48
|
+
* Timestamp for the next state change
|
|
49
|
+
*/
|
|
50
|
+
until?: ({
|
|
51
|
+
[k: string]: unknown;
|
|
52
|
+
} | {
|
|
53
|
+
[k: string]: unknown;
|
|
54
|
+
}) & string;
|
|
55
|
+
[k: string]: unknown;
|
|
56
|
+
};
|
|
57
|
+
[k: string]: unknown;
|
|
58
|
+
}
|
|
59
|
+
export interface OPDSAcquisitionObject {
|
|
60
|
+
type: string;
|
|
61
|
+
child?: OPDSAcquisitionObject[];
|
|
62
|
+
[k: string]: unknown;
|
|
63
|
+
}
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
export interface PresentationHintsMetadata {
|
|
2
|
-
presentation?: {
|
|
3
|
-
/**
|
|
4
|
-
* Specifies whether or not the parts of a linked resource that flow out of the viewport are clipped.
|
|
5
|
-
*/
|
|
6
|
-
clipped?: boolean;
|
|
7
|
-
/**
|
|
8
|
-
* Indicates if consecutive linked resources from the `reading order` should be handled in a continuous or discontinuous way.
|
|
9
|
-
*/
|
|
10
|
-
continuous?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Specifies constraints for the presentation of a linked resource within the viewport.
|
|
13
|
-
*/
|
|
14
|
-
fit?: 'width' | 'height' | 'contain' | 'cover';
|
|
15
|
-
/**
|
|
16
|
-
* Suggested orientation for the device when displaying the linked resource.
|
|
17
|
-
*/
|
|
18
|
-
orientation?: 'auto' | 'landscape' | 'portrait';
|
|
19
|
-
/**
|
|
20
|
-
* Indicates if the overflow of linked resources from the `readingOrder` or `resources` should be handled using dynamic pagination or scrolling.
|
|
21
|
-
*/
|
|
22
|
-
overflow?: 'auto' | 'paginated' | 'scrolled' | 'scrolled-continuous';
|
|
23
|
-
/**
|
|
24
|
-
* Indicates the condition to be met for the linked resource to be rendered within a synthetic spread.
|
|
25
|
-
*/
|
|
26
|
-
spread?: 'auto' | 'both' | 'none' | 'landscape';
|
|
27
|
-
[k: string]: unknown;
|
|
28
|
-
};
|
|
29
|
-
[k: string]: unknown;
|
|
30
|
-
}
|
|
31
|
-
export interface PresentationHintsLinkProperties {
|
|
32
|
-
/**
|
|
33
|
-
* Specifies whether or not the parts of a linked resource that flow out of the viewport are clipped.
|
|
34
|
-
*/
|
|
35
|
-
clipped?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Specifies constraints for the presentation of a linked resource within the viewport.
|
|
38
|
-
*/
|
|
39
|
-
fit?: 'contain' | 'cover' | 'width' | 'height';
|
|
40
|
-
/**
|
|
41
|
-
* Suggested orientation for the device when displaying the linked resource.
|
|
42
|
-
*/
|
|
43
|
-
orientation?: 'auto' | 'landscape' | 'portrait';
|
|
44
|
-
/**
|
|
45
|
-
* Indicates how the linked resource should be displayed in a reading environment that displays synthetic spreads.
|
|
46
|
-
*/
|
|
47
|
-
page?: 'left' | 'right' | 'center';
|
|
48
|
-
/**
|
|
49
|
-
* Indicates the condition to be met for the linked resource to be rendered within a synthetic spread.
|
|
50
|
-
*/
|
|
51
|
-
spread?: 'auto' | 'both' | 'none' | 'landscape';
|
|
52
|
-
[k: string]: unknown;
|
|
53
|
-
}
|
|
1
|
+
export interface PresentationHintsMetadata {
|
|
2
|
+
presentation?: {
|
|
3
|
+
/**
|
|
4
|
+
* Specifies whether or not the parts of a linked resource that flow out of the viewport are clipped.
|
|
5
|
+
*/
|
|
6
|
+
clipped?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Indicates if consecutive linked resources from the `reading order` should be handled in a continuous or discontinuous way.
|
|
9
|
+
*/
|
|
10
|
+
continuous?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Specifies constraints for the presentation of a linked resource within the viewport.
|
|
13
|
+
*/
|
|
14
|
+
fit?: 'width' | 'height' | 'contain' | 'cover';
|
|
15
|
+
/**
|
|
16
|
+
* Suggested orientation for the device when displaying the linked resource.
|
|
17
|
+
*/
|
|
18
|
+
orientation?: 'auto' | 'landscape' | 'portrait';
|
|
19
|
+
/**
|
|
20
|
+
* Indicates if the overflow of linked resources from the `readingOrder` or `resources` should be handled using dynamic pagination or scrolling.
|
|
21
|
+
*/
|
|
22
|
+
overflow?: 'auto' | 'paginated' | 'scrolled' | 'scrolled-continuous';
|
|
23
|
+
/**
|
|
24
|
+
* Indicates the condition to be met for the linked resource to be rendered within a synthetic spread.
|
|
25
|
+
*/
|
|
26
|
+
spread?: 'auto' | 'both' | 'none' | 'landscape';
|
|
27
|
+
[k: string]: unknown;
|
|
28
|
+
};
|
|
29
|
+
[k: string]: unknown;
|
|
30
|
+
}
|
|
31
|
+
export interface PresentationHintsLinkProperties {
|
|
32
|
+
/**
|
|
33
|
+
* Specifies whether or not the parts of a linked resource that flow out of the viewport are clipped.
|
|
34
|
+
*/
|
|
35
|
+
clipped?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Specifies constraints for the presentation of a linked resource within the viewport.
|
|
38
|
+
*/
|
|
39
|
+
fit?: 'contain' | 'cover' | 'width' | 'height';
|
|
40
|
+
/**
|
|
41
|
+
* Suggested orientation for the device when displaying the linked resource.
|
|
42
|
+
*/
|
|
43
|
+
orientation?: 'auto' | 'landscape' | 'portrait';
|
|
44
|
+
/**
|
|
45
|
+
* Indicates how the linked resource should be displayed in a reading environment that displays synthetic spreads.
|
|
46
|
+
*/
|
|
47
|
+
page?: 'left' | 'right' | 'center';
|
|
48
|
+
/**
|
|
49
|
+
* Indicates the condition to be met for the linked resource to be rendered within a synthetic spread.
|
|
50
|
+
*/
|
|
51
|
+
spread?: 'auto' | 'both' | 'none' | 'landscape';
|
|
52
|
+
[k: string]: unknown;
|
|
53
|
+
}
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import { EPUBExtensionLinkProperties } from './EpubExtension';
|
|
2
|
-
import { OPDSLinkProperties } from './OPDSLink';
|
|
3
|
-
import { PresentationHintsLinkProperties } from './PresentationHints';
|
|
4
|
-
export interface ReadiumLink {
|
|
5
|
-
/**
|
|
6
|
-
* URI or URI template of the linked resource
|
|
7
|
-
*/
|
|
8
|
-
href: string;
|
|
9
|
-
/**
|
|
10
|
-
* MIME type of the linked resource
|
|
11
|
-
*/
|
|
12
|
-
type?: string;
|
|
13
|
-
/**
|
|
14
|
-
* Indicates that a URI template is used in href
|
|
15
|
-
*/
|
|
16
|
-
templated?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Title of the linked resource
|
|
19
|
-
*/
|
|
20
|
-
title?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Relation between the linked resource and its containing collection
|
|
23
|
-
*/
|
|
24
|
-
rel?: string | string[];
|
|
25
|
-
/**
|
|
26
|
-
* Properties associated to the linked resource
|
|
27
|
-
*/
|
|
28
|
-
properties?: OPDSLinkProperties & EPUBExtensionLinkProperties & PresentationHintsLinkProperties;
|
|
29
|
-
/**
|
|
30
|
-
* Height of the linked resource in pixels
|
|
31
|
-
*/
|
|
32
|
-
height?: number;
|
|
33
|
-
/**
|
|
34
|
-
* Width of the linked resource in pixels
|
|
35
|
-
*/
|
|
36
|
-
width?: number;
|
|
37
|
-
/**
|
|
38
|
-
* Bitrate of the linked resource in kbps
|
|
39
|
-
*/
|
|
40
|
-
bitrate?: number;
|
|
41
|
-
/**
|
|
42
|
-
* Length of the linked resource in seconds
|
|
43
|
-
*/
|
|
44
|
-
duration?: number;
|
|
45
|
-
/**
|
|
46
|
-
* Expected language of the linked resource
|
|
47
|
-
*/
|
|
48
|
-
language?: string | string[];
|
|
49
|
-
/**
|
|
50
|
-
* Alternate resources for the linked resource
|
|
51
|
-
*/
|
|
52
|
-
alternate?: ReadiumLink[];
|
|
53
|
-
/**
|
|
54
|
-
* Resources that are children of the linked resource, in the context of a given collection role
|
|
55
|
-
*/
|
|
56
|
-
children?: ReadiumLink[];
|
|
57
|
-
[k: string]: unknown;
|
|
58
|
-
}
|
|
1
|
+
import { EPUBExtensionLinkProperties } from './EpubExtension';
|
|
2
|
+
import { OPDSLinkProperties } from './OPDSLink';
|
|
3
|
+
import { PresentationHintsLinkProperties } from './PresentationHints';
|
|
4
|
+
export interface ReadiumLink {
|
|
5
|
+
/**
|
|
6
|
+
* URI or URI template of the linked resource
|
|
7
|
+
*/
|
|
8
|
+
href: string;
|
|
9
|
+
/**
|
|
10
|
+
* MIME type of the linked resource
|
|
11
|
+
*/
|
|
12
|
+
type?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Indicates that a URI template is used in href
|
|
15
|
+
*/
|
|
16
|
+
templated?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Title of the linked resource
|
|
19
|
+
*/
|
|
20
|
+
title?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Relation between the linked resource and its containing collection
|
|
23
|
+
*/
|
|
24
|
+
rel?: string | string[];
|
|
25
|
+
/**
|
|
26
|
+
* Properties associated to the linked resource
|
|
27
|
+
*/
|
|
28
|
+
properties?: OPDSLinkProperties & EPUBExtensionLinkProperties & PresentationHintsLinkProperties;
|
|
29
|
+
/**
|
|
30
|
+
* Height of the linked resource in pixels
|
|
31
|
+
*/
|
|
32
|
+
height?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Width of the linked resource in pixels
|
|
35
|
+
*/
|
|
36
|
+
width?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Bitrate of the linked resource in kbps
|
|
39
|
+
*/
|
|
40
|
+
bitrate?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Length of the linked resource in seconds
|
|
43
|
+
*/
|
|
44
|
+
duration?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Expected language of the linked resource
|
|
47
|
+
*/
|
|
48
|
+
language?: string | string[];
|
|
49
|
+
/**
|
|
50
|
+
* Alternate resources for the linked resource
|
|
51
|
+
*/
|
|
52
|
+
alternate?: ReadiumLink[];
|
|
53
|
+
/**
|
|
54
|
+
* Resources that are children of the linked resource, in the context of a given collection role
|
|
55
|
+
*/
|
|
56
|
+
children?: ReadiumLink[];
|
|
57
|
+
[k: string]: unknown;
|
|
58
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { ReadiumLink } from './ReadiumLink';
|
|
2
|
-
export interface SubjectObject {
|
|
3
|
-
name: string | {
|
|
4
|
-
/**
|
|
5
|
-
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
6
|
-
* 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})+))$".
|
|
7
|
-
*/
|
|
8
|
-
[k: string]: string;
|
|
9
|
-
};
|
|
10
|
-
sortAs?: string;
|
|
11
|
-
code?: string;
|
|
12
|
-
scheme?: string;
|
|
13
|
-
links?: ReadiumLink[];
|
|
14
|
-
[k: string]: unknown;
|
|
15
|
-
}
|
|
16
|
-
export declare type Subject = string | (string | SubjectObject)[] | SubjectObject;
|
|
1
|
+
import { ReadiumLink } from './ReadiumLink';
|
|
2
|
+
export interface SubjectObject {
|
|
3
|
+
name: string | {
|
|
4
|
+
/**
|
|
5
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
6
|
+
* 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})+))$".
|
|
7
|
+
*/
|
|
8
|
+
[k: string]: string;
|
|
9
|
+
};
|
|
10
|
+
sortAs?: string;
|
|
11
|
+
code?: string;
|
|
12
|
+
scheme?: string;
|
|
13
|
+
links?: ReadiumLink[];
|
|
14
|
+
[k: string]: unknown;
|
|
15
|
+
}
|
|
16
|
+
export declare type Subject = string | (string | SubjectObject)[] | SubjectObject;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type definitions for a manifest
|
|
3
|
-
*/
|
|
4
|
-
import { ReadiumWebpubContext } from '../constants';
|
|
5
|
-
import { Metadata } from './Metadata';
|
|
6
|
-
import { ReadiumLink } from './ReadiumLink';
|
|
7
|
-
export interface WebpubManifest {
|
|
8
|
-
'@context'?: typeof ReadiumWebpubContext;
|
|
9
|
-
metadata: Metadata;
|
|
10
|
-
links: ReadiumLink[];
|
|
11
|
-
readingOrder: ReadiumLink[];
|
|
12
|
-
resources?: ReadiumLink[];
|
|
13
|
-
toc?: ReadiumLink[];
|
|
14
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for a manifest
|
|
3
|
+
*/
|
|
4
|
+
import { ReadiumWebpubContext } from '../constants';
|
|
5
|
+
import { Metadata } from './Metadata';
|
|
6
|
+
import { ReadiumLink } from './ReadiumLink';
|
|
7
|
+
export interface WebpubManifest {
|
|
8
|
+
'@context'?: typeof ReadiumWebpubContext;
|
|
9
|
+
metadata: Metadata;
|
|
10
|
+
links: ReadiumLink[];
|
|
11
|
+
readingOrder: ReadiumLink[];
|
|
12
|
+
resources?: ReadiumLink[];
|
|
13
|
+
toc?: ReadiumLink[];
|
|
14
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ReadiumWebpubContext = "http://readium.org/webpub/default.jsonld";
|
|
2
|
-
export declare const IS_DEV: boolean;
|
|
1
|
+
export declare const ReadiumWebpubContext = "http://readium.org/webpub/default.jsonld";
|
|
2
|
+
export declare const IS_DEV: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { UseWebReaderArguments } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* The main React component export.
|
|
5
|
-
*/
|
|
6
|
-
declare const WebReader: FC<UseWebReaderArguments>;
|
|
7
|
-
export default WebReader;
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { UseWebReaderArguments } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* The main React component export.
|
|
5
|
+
*/
|
|
6
|
+
declare const WebReader: FC<UseWebReaderArguments>;
|
|
7
|
+
export default WebReader;
|