@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.
Files changed (144) hide show
  1. package/dist/cjs/ServiceWorker/sw.js +2 -0
  2. package/dist/cjs/ServiceWorker/sw.js.map +7 -0
  3. package/dist/cjs/index.js +683 -0
  4. package/dist/cjs/index.js.map +7 -0
  5. package/dist/esm/ServiceWorker/sw.js +1263 -0
  6. package/dist/esm/ServiceWorker/sw.js.map +7 -0
  7. package/dist/esm/index.js +88803 -0
  8. package/dist/esm/index.js.map +7 -0
  9. package/dist/html-styles.css +2 -0
  10. package/dist/html-styles.css.map +7 -0
  11. package/dist/pdf-styles.css +2 -0
  12. package/dist/pdf-styles.css.map +7 -0
  13. package/dist/{HtmlReader → types/HtmlReader}/HtmlReaderContent.d.ts +3 -3
  14. package/dist/{HtmlReader → types/HtmlReader}/index.d.ts +22 -22
  15. package/dist/{HtmlReader → types/HtmlReader}/injectables.d.ts +30 -30
  16. package/dist/{PdfReader → types/PdfReader}/index.d.ts +11 -12
  17. package/dist/{PdfReader → types/PdfReader}/useMeasure.d.ts +7 -4
  18. package/dist/{ServiceWorker → types/ServiceWorker}/client.d.ts +9 -9
  19. package/dist/{ServiceWorker → types/ServiceWorker}/constants.d.ts +3 -3
  20. package/{src/ServiceWorker/index.ts → dist/types/ServiceWorker/index.d.ts} +0 -0
  21. package/dist/{ServiceWorker → types/ServiceWorker}/sw.d.ts +7 -7
  22. package/dist/{ServiceWorker → types/ServiceWorker}/types.d.ts +3 -3
  23. package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/ConformsTo.d.ts +3 -3
  24. package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/Contributor.d.ts +17 -17
  25. package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/EpubExtension.d.ts +47 -47
  26. package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/LanguageMap.d.ts +3 -3
  27. package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/Metadata.d.ts +46 -46
  28. package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/OPDSLink.d.ts +63 -63
  29. package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/PresentationHints.d.ts +53 -53
  30. package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/ReadiumLink.d.ts +58 -58
  31. package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/Subject.d.ts +16 -16
  32. package/dist/{WebpubManifestTypes → types/WebpubManifestTypes}/WebpubManifest.d.ts +14 -14
  33. package/dist/{constants.d.ts → types/constants.d.ts} +2 -2
  34. package/dist/{index.d.ts → types/index.d.ts} +7 -7
  35. package/dist/{types.d.ts → types/types.d.ts} +66 -66
  36. package/dist/{ui → types/ui}/Button.d.ts +9 -7
  37. package/dist/{ui → types/ui}/Header.d.ts +6 -6
  38. package/dist/{ui → types/ui}/HtmlSettings.d.ts +9 -9
  39. package/dist/{ui → types/ui}/PageButton.d.ts +7 -7
  40. package/dist/{ui → types/ui}/PdfSettings.d.ts +9 -9
  41. package/dist/{ui → types/ui}/SettingsButton.d.ts +5 -5
  42. package/dist/{ui → types/ui}/TableOfContent.d.ts +7 -7
  43. package/dist/{ui → types/ui}/ToggleButton.d.ts +10 -10
  44. package/dist/{ui → types/ui}/ToggleGroup.d.ts +8 -8
  45. package/dist/{ui → types/ui}/constants.d.ts +1 -1
  46. package/dist/{ui → types/ui}/hooks/useColorModeValue.d.ts +7 -7
  47. package/dist/{ui → types/ui}/hooks/useContainerWidth.d.ts +6 -6
  48. package/dist/{ui → types/ui}/hooks/useEventListener.d.ts +8 -8
  49. package/dist/{ui → types/ui}/manager.d.ts +9 -9
  50. package/dist/{ui → types/ui}/nypl-base-theme/components/button.d.ts +94 -94
  51. package/dist/{ui → types/ui}/nypl-base-theme/components/checkbox.d.ts +41 -41
  52. package/dist/{ui → types/ui}/nypl-base-theme/components/form-error.d.ts +14 -14
  53. package/dist/{ui → types/ui}/nypl-base-theme/components/form-label.d.ts +14 -14
  54. package/dist/{ui → types/ui}/nypl-base-theme/components/form.d.ts +15 -15
  55. package/dist/{ui → types/ui}/nypl-base-theme/components/input.d.ts +107 -107
  56. package/dist/{ui → types/ui}/nypl-base-theme/components/text-area.d.ts +34 -34
  57. package/dist/{ui → types/ui}/nypl-base-theme/foundations/breakpoints.d.ts +8 -8
  58. package/dist/{ui → types/ui}/nypl-base-theme/foundations/colors.d.ts +3 -3
  59. package/dist/{ui → types/ui}/nypl-base-theme/foundations/global.d.ts +13 -13
  60. package/dist/{ui → types/ui}/nypl-base-theme/foundations/radii.d.ts +12 -12
  61. package/dist/{ui → types/ui}/nypl-base-theme/foundations/spacing.d.ts +49 -49
  62. package/dist/{ui → types/ui}/nypl-base-theme/foundations/typography.d.ts +10 -10
  63. package/dist/{ui → types/ui}/nypl-base-theme/index.d.ts +6 -6
  64. package/dist/{ui → types/ui}/nypl-base-theme/types.d.ts +1 -1
  65. package/dist/{ui → types/ui}/theme/components/button.d.ts +78 -78
  66. package/dist/{ui → types/ui}/theme/components/text.d.ts +20 -20
  67. package/dist/{ui → types/ui}/theme/foundations/colors.d.ts +3 -3
  68. package/dist/{ui → types/ui}/theme/index.d.ts +11 -11
  69. package/dist/{ui → types/ui}/theme/types.d.ts +1 -1
  70. package/dist/{useWebReader.d.ts → types/useWebReader.d.ts} +7 -7
  71. package/dist/{utils → types/utils}/decryptAxisNow.d.ts +0 -0
  72. package/dist/{utils → types/utils}/fetch.d.ts +4 -4
  73. package/dist/{utils → types/utils}/getColor.d.ts +2 -2
  74. package/dist/{utils → types/utils}/toggleFullScreen.d.ts +5 -5
  75. package/package.json +21 -33
  76. package/dist/ServiceWorker/index.d.ts +0 -1
  77. package/dist/index.js +0 -8
  78. package/dist/web-reader.cjs.development.js +0 -3363
  79. package/dist/web-reader.cjs.development.js.map +0 -1
  80. package/dist/web-reader.cjs.production.min.js +0 -2
  81. package/dist/web-reader.cjs.production.min.js.map +0 -1
  82. package/dist/web-reader.esm.js +0 -3356
  83. package/dist/web-reader.esm.js.map +0 -1
  84. package/src/HtmlReader/HtmlReaderContent.tsx +0 -19
  85. package/src/HtmlReader/index.tsx +0 -262
  86. package/src/HtmlReader/injectables.ts +0 -26
  87. package/src/PdfReader/index.tsx +0 -492
  88. package/src/PdfReader/useMeasure.tsx +0 -68
  89. package/src/ServiceWorker/client.ts +0 -106
  90. package/src/ServiceWorker/constants.ts +0 -4
  91. package/src/ServiceWorker/sw.ts +0 -84
  92. package/src/ServiceWorker/types.ts +0 -3
  93. package/src/WebpubManifestTypes/ConformsTo.ts +0 -9
  94. package/src/WebpubManifestTypes/Contributor.ts +0 -24
  95. package/src/WebpubManifestTypes/EpubExtension.ts +0 -48
  96. package/src/WebpubManifestTypes/LanguageMap.ts +0 -5
  97. package/src/WebpubManifestTypes/Metadata.ts +0 -48
  98. package/src/WebpubManifestTypes/OPDSLink.ts +0 -251
  99. package/src/WebpubManifestTypes/PresentationHints.ts +0 -54
  100. package/src/WebpubManifestTypes/ReadiumLink.ts +0 -61
  101. package/src/WebpubManifestTypes/Subject.ts +0 -20
  102. package/src/WebpubManifestTypes/WebpubManifest.ts +0 -15
  103. package/src/constants.ts +0 -3
  104. package/src/index.tsx +0 -25
  105. package/src/types.ts +0 -94
  106. package/src/ui/Button.tsx +0 -12
  107. package/src/ui/Header.tsx +0 -89
  108. package/src/ui/HtmlSettings.tsx +0 -97
  109. package/src/ui/PageButton.tsx +0 -39
  110. package/src/ui/PdfSettings.tsx +0 -85
  111. package/src/ui/SettingsButton.tsx +0 -71
  112. package/src/ui/TableOfContent.tsx +0 -144
  113. package/src/ui/ToggleButton.tsx +0 -60
  114. package/src/ui/ToggleGroup.tsx +0 -41
  115. package/src/ui/constants.ts +0 -2
  116. package/src/ui/hooks/useColorModeValue.tsx +0 -19
  117. package/src/ui/hooks/useContainerWidth.ts +0 -24
  118. package/src/ui/hooks/useEventListener.ts +0 -26
  119. package/src/ui/manager.tsx +0 -73
  120. package/src/ui/nypl-base-theme/components/button.ts +0 -117
  121. package/src/ui/nypl-base-theme/components/checkbox.ts +0 -45
  122. package/src/ui/nypl-base-theme/components/form-error.ts +0 -15
  123. package/src/ui/nypl-base-theme/components/form-label.ts +0 -15
  124. package/src/ui/nypl-base-theme/components/form.ts +0 -16
  125. package/src/ui/nypl-base-theme/components/input.ts +0 -101
  126. package/src/ui/nypl-base-theme/components/text-area.ts +0 -17
  127. package/src/ui/nypl-base-theme/foundations/breakpoints.ts +0 -10
  128. package/src/ui/nypl-base-theme/foundations/colors.ts +0 -136
  129. package/src/ui/nypl-base-theme/foundations/global.ts +0 -16
  130. package/src/ui/nypl-base-theme/foundations/radii.ts +0 -13
  131. package/src/ui/nypl-base-theme/foundations/spacing.ts +0 -58
  132. package/src/ui/nypl-base-theme/foundations/typography.ts +0 -43
  133. package/src/ui/nypl-base-theme/index.ts +0 -42
  134. package/src/ui/nypl-base-theme/types.ts +0 -1
  135. package/src/ui/theme/components/button.ts +0 -85
  136. package/src/ui/theme/components/text.ts +0 -24
  137. package/src/ui/theme/foundations/colors.ts +0 -10
  138. package/src/ui/theme/index.ts +0 -34
  139. package/src/ui/theme/types.ts +0 -1
  140. package/src/useWebReader.tsx +0 -105
  141. package/src/utils/decryptAxisNow.ts +0 -45
  142. package/src/utils/fetch.ts +0 -13
  143. package/src/utils/getColor.ts +0 -14
  144. 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;