@nypl/web-reader 0.1.3 → 0.2.0-alpha.10

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 (149) 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 +1752 -0
  6. package/dist/esm/ServiceWorker/sw.js.map +7 -0
  7. package/dist/esm/index.js +88812 -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/types/ServiceWorker/client.d.ts +6 -0
  19. package/dist/{ServiceWorker → types/ServiceWorker}/constants.d.ts +4 -3
  20. package/{src/ServiceWorker/index.ts → dist/types/ServiceWorker/index.d.ts} +0 -0
  21. package/dist/types/ServiceWorker/sw.d.ts +19 -0
  22. package/dist/types/ServiceWorker/types.d.ts +13 -0
  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/types/index.d.ts +9 -0
  35. package/dist/{types.d.ts → types/types.d.ts} +74 -66
  36. package/dist/{ui → types/ui}/Button.d.ts +9 -7
  37. package/dist/types/ui/Header.d.ts +3 -0
  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 +35 -36
  76. package/dist/ServiceWorker/client.d.ts +0 -9
  77. package/dist/ServiceWorker/index.d.ts +0 -1
  78. package/dist/ServiceWorker/sw.d.ts +0 -7
  79. package/dist/ServiceWorker/types.d.ts +0 -3
  80. package/dist/index.d.ts +0 -7
  81. package/dist/index.js +0 -8
  82. package/dist/ui/Header.d.ts +0 -6
  83. package/dist/web-reader.cjs.development.js +0 -3363
  84. package/dist/web-reader.cjs.development.js.map +0 -1
  85. package/dist/web-reader.cjs.production.min.js +0 -2
  86. package/dist/web-reader.cjs.production.min.js.map +0 -1
  87. package/dist/web-reader.esm.js +0 -3356
  88. package/dist/web-reader.esm.js.map +0 -1
  89. package/src/HtmlReader/HtmlReaderContent.tsx +0 -19
  90. package/src/HtmlReader/index.tsx +0 -262
  91. package/src/HtmlReader/injectables.ts +0 -26
  92. package/src/PdfReader/index.tsx +0 -492
  93. package/src/PdfReader/useMeasure.tsx +0 -68
  94. package/src/ServiceWorker/client.ts +0 -106
  95. package/src/ServiceWorker/constants.ts +0 -4
  96. package/src/ServiceWorker/sw.ts +0 -84
  97. package/src/ServiceWorker/types.ts +0 -3
  98. package/src/WebpubManifestTypes/ConformsTo.ts +0 -9
  99. package/src/WebpubManifestTypes/Contributor.ts +0 -24
  100. package/src/WebpubManifestTypes/EpubExtension.ts +0 -48
  101. package/src/WebpubManifestTypes/LanguageMap.ts +0 -5
  102. package/src/WebpubManifestTypes/Metadata.ts +0 -48
  103. package/src/WebpubManifestTypes/OPDSLink.ts +0 -251
  104. package/src/WebpubManifestTypes/PresentationHints.ts +0 -54
  105. package/src/WebpubManifestTypes/ReadiumLink.ts +0 -61
  106. package/src/WebpubManifestTypes/Subject.ts +0 -20
  107. package/src/WebpubManifestTypes/WebpubManifest.ts +0 -15
  108. package/src/constants.ts +0 -3
  109. package/src/index.tsx +0 -25
  110. package/src/types.ts +0 -94
  111. package/src/ui/Button.tsx +0 -12
  112. package/src/ui/Header.tsx +0 -89
  113. package/src/ui/HtmlSettings.tsx +0 -97
  114. package/src/ui/PageButton.tsx +0 -39
  115. package/src/ui/PdfSettings.tsx +0 -85
  116. package/src/ui/SettingsButton.tsx +0 -71
  117. package/src/ui/TableOfContent.tsx +0 -144
  118. package/src/ui/ToggleButton.tsx +0 -60
  119. package/src/ui/ToggleGroup.tsx +0 -41
  120. package/src/ui/constants.ts +0 -2
  121. package/src/ui/hooks/useColorModeValue.tsx +0 -19
  122. package/src/ui/hooks/useContainerWidth.ts +0 -24
  123. package/src/ui/hooks/useEventListener.ts +0 -26
  124. package/src/ui/manager.tsx +0 -73
  125. package/src/ui/nypl-base-theme/components/button.ts +0 -117
  126. package/src/ui/nypl-base-theme/components/checkbox.ts +0 -45
  127. package/src/ui/nypl-base-theme/components/form-error.ts +0 -15
  128. package/src/ui/nypl-base-theme/components/form-label.ts +0 -15
  129. package/src/ui/nypl-base-theme/components/form.ts +0 -16
  130. package/src/ui/nypl-base-theme/components/input.ts +0 -101
  131. package/src/ui/nypl-base-theme/components/text-area.ts +0 -17
  132. package/src/ui/nypl-base-theme/foundations/breakpoints.ts +0 -10
  133. package/src/ui/nypl-base-theme/foundations/colors.ts +0 -136
  134. package/src/ui/nypl-base-theme/foundations/global.ts +0 -16
  135. package/src/ui/nypl-base-theme/foundations/radii.ts +0 -13
  136. package/src/ui/nypl-base-theme/foundations/spacing.ts +0 -58
  137. package/src/ui/nypl-base-theme/foundations/typography.ts +0 -43
  138. package/src/ui/nypl-base-theme/index.ts +0 -42
  139. package/src/ui/nypl-base-theme/types.ts +0 -1
  140. package/src/ui/theme/components/button.ts +0 -85
  141. package/src/ui/theme/components/text.ts +0 -24
  142. package/src/ui/theme/foundations/colors.ts +0 -10
  143. package/src/ui/theme/index.ts +0 -34
  144. package/src/ui/theme/types.ts +0 -1
  145. package/src/useWebReader.tsx +0 -105
  146. package/src/utils/decryptAxisNow.ts +0 -45
  147. package/src/utils/fetch.ts +0 -13
  148. package/src/utils/getColor.ts +0 -14
  149. package/src/utils/toggleFullScreen.ts +0 -71
@@ -1,78 +1,78 @@
1
- import { GetColor } from '../../../types';
2
- declare const getButtonStyle: (getColor: GetColor) => {
3
- baseStyle: {
4
- borderRadius: string;
5
- };
6
- sizes: {};
7
- variants: {
8
- solid: (props: any) => {
9
- border: string;
10
- borderColor: string;
11
- transition: string;
12
- fontSize: number;
13
- letterSpacing: number;
14
- textTransform: string;
15
- maxWidth: string;
16
- cursor: string;
17
- bgColor: string;
18
- color: string;
19
- _focus: {
20
- bgColor: string;
21
- color: string;
22
- };
23
- _hover: {
24
- bgColor: string;
25
- color: string;
26
- _disabled: {
27
- bgColor: string;
28
- };
29
- };
30
- _active: {
31
- bgColor: string;
32
- color: string;
33
- };
34
- _checked: {
35
- bgColor: string;
36
- color: string;
37
- };
38
- _disabled: {
39
- bgColor: string;
40
- };
41
- };
42
- toggle: (props: any) => {
43
- bgColor: string;
44
- color: string;
45
- px: number;
46
- fontWeight: string;
47
- fontSize: number;
48
- _focus: {
49
- bgColor: string;
50
- };
51
- _hover: {
52
- bgColor: string;
53
- };
54
- _active: {
55
- bgColor: string;
56
- };
57
- _checked: {
58
- color: string;
59
- bgColor: string;
60
- };
61
- border: string;
62
- borderColor: string;
63
- transition: string;
64
- letterSpacing: number;
65
- textTransform: string;
66
- maxWidth: string;
67
- cursor: string;
68
- _disabled: {
69
- bgColor: string;
70
- };
71
- };
72
- };
73
- defaultProps: {
74
- size: string;
75
- variant: string;
76
- };
77
- };
78
- export default getButtonStyle;
1
+ import { GetColor } from '../../../types';
2
+ declare const getButtonStyle: (getColor: GetColor) => {
3
+ baseStyle: {
4
+ borderRadius: string;
5
+ };
6
+ sizes: {};
7
+ variants: {
8
+ solid: (props: any) => {
9
+ border: string;
10
+ borderColor: string;
11
+ transition: string;
12
+ fontSize: number;
13
+ letterSpacing: number;
14
+ textTransform: string;
15
+ maxWidth: string;
16
+ cursor: string;
17
+ bgColor: string;
18
+ color: string;
19
+ _focus: {
20
+ bgColor: string;
21
+ color: string;
22
+ };
23
+ _hover: {
24
+ bgColor: string;
25
+ color: string;
26
+ _disabled: {
27
+ bgColor: string;
28
+ };
29
+ };
30
+ _active: {
31
+ bgColor: string;
32
+ color: string;
33
+ };
34
+ _checked: {
35
+ bgColor: string;
36
+ color: string;
37
+ };
38
+ _disabled: {
39
+ bgColor: string;
40
+ };
41
+ };
42
+ toggle: (props: any) => {
43
+ bgColor: string;
44
+ color: string;
45
+ px: number;
46
+ fontWeight: string;
47
+ fontSize: number;
48
+ _focus: {
49
+ bgColor: string;
50
+ };
51
+ _hover: {
52
+ bgColor: string;
53
+ };
54
+ _active: {
55
+ bgColor: string;
56
+ };
57
+ _checked: {
58
+ color: string;
59
+ bgColor: string;
60
+ };
61
+ border: string;
62
+ borderColor: string;
63
+ transition: string;
64
+ letterSpacing: number;
65
+ textTransform: string;
66
+ maxWidth: string;
67
+ cursor: string;
68
+ _disabled: {
69
+ bgColor: string;
70
+ };
71
+ };
72
+ };
73
+ defaultProps: {
74
+ size: string;
75
+ variant: string;
76
+ };
77
+ };
78
+ export default getButtonStyle;
@@ -1,20 +1,20 @@
1
- declare const TextStyle: {
2
- baseStyle: {};
3
- sizes: {};
4
- variants: {
5
- headerNav: typeof variantHeaderNav;
6
- };
7
- defaultProps: {};
8
- };
9
- declare function variantHeaderNav(): {
10
- pl: number;
11
- my: number;
12
- letterSpacing: number;
13
- fontSize: number;
14
- display: {
15
- sm: string;
16
- md: string;
17
- lg: string;
18
- };
19
- };
20
- export default TextStyle;
1
+ declare const TextStyle: {
2
+ baseStyle: {};
3
+ sizes: {};
4
+ variants: {
5
+ headerNav: typeof variantHeaderNav;
6
+ };
7
+ defaultProps: {};
8
+ };
9
+ declare function variantHeaderNav(): {
10
+ pl: number;
11
+ my: number;
12
+ letterSpacing: number;
13
+ fontSize: number;
14
+ display: {
15
+ sm: string;
16
+ md: string;
17
+ lg: string;
18
+ };
19
+ };
20
+ export default TextStyle;
@@ -1,3 +1,3 @@
1
- import { Colors } from '@chakra-ui/react';
2
- declare const colors: Colors;
3
- export default colors;
1
+ import { Colors } from '@chakra-ui/react';
2
+ declare const colors: Colors;
3
+ export default colors;
@@ -1,11 +1,11 @@
1
- import { ColorMode } from '../../types';
2
- /**
3
- * See Chakra default theme for shape of theme object:
4
- * https://github.com/chakra-ui/chakra-ui/tree/main/packages/theme
5
- *
6
- * Making this a function because we need to adjust the theme based
7
- * on the colorMode that's being passed in.
8
- *
9
- * Returns the chakra theme object with an additional property `currentColorMode`
10
- */
11
- export declare function getTheme(colorMode: ColorMode): any;
1
+ import { ColorMode } from '../../types';
2
+ /**
3
+ * See Chakra default theme for shape of theme object:
4
+ * https://github.com/chakra-ui/chakra-ui/tree/main/packages/theme
5
+ *
6
+ * Making this a function because we need to adjust the theme based
7
+ * on the colorMode that's being passed in.
8
+ *
9
+ * Returns the chakra theme object with an additional property `currentColorMode`
10
+ */
11
+ export declare function getTheme(colorMode: ColorMode): import("@chakra-ui/utils").Dict<any>;
@@ -1 +1 @@
1
- export declare type Dict<T = any> = Record<string, T>;
1
+ export declare type Dict<T = any> = Record<string, T>;
@@ -1,7 +1,7 @@
1
- import { UseWebReaderArguments, HTMLActiveReader, LoadingReader, PDFActiveReader } from './types';
2
- /**
3
- * The React hook that exposes the main API into the reader. It
4
- * will determine the type of the webpub, and then use the correct reader
5
- * for that type.
6
- */
7
- export default function useWebReader(args: UseWebReaderArguments): HTMLActiveReader | PDFActiveReader | LoadingReader;
1
+ import { UseWebReaderArguments, HTMLActiveReader, LoadingReader, PDFActiveReader } from './types';
2
+ /**
3
+ * The React hook that exposes the main API into the reader. It
4
+ * will determine the type of the webpub, and then use the correct reader
5
+ * for that type.
6
+ */
7
+ export default function useWebReader(args: UseWebReaderArguments): HTMLActiveReader | PDFActiveReader | LoadingReader;
File without changes
@@ -1,4 +1,4 @@
1
- /**
2
- * Utilities for fetching specific types
3
- */
4
- export declare function fetchJson<ExpectedResponse extends any = any>(url: string): Promise<ExpectedResponse>;
1
+ /**
2
+ * Utilities for fetching specific types
3
+ */
4
+ export declare function fetchJson<ExpectedResponse extends any = any>(url: string): Promise<ExpectedResponse>;
@@ -1,2 +1,2 @@
1
- import { ColorMode } from '../types';
2
- export declare function getColor(colorMode: ColorMode): (light: string, dark: string, sepia: string) => string;
1
+ import { ColorMode } from '../types';
2
+ export declare function getColor(colorMode: ColorMode): (light: string, dark: string, sepia: string) => string;
@@ -1,5 +1,5 @@
1
- export declare const fullScreenEnabled: boolean;
2
- /**
3
- * Toggles fullscreen mode on the <html> element.
4
- */
5
- export declare function toggleFullScreen(): void;
1
+ export declare const fullScreenEnabled: boolean;
2
+ /**
3
+ * Toggles fullscreen mode on the <html> element.
4
+ */
5
+ export declare function toggleFullScreen(): void;
package/package.json CHANGED
@@ -1,21 +1,24 @@
1
1
  {
2
2
  "name": "@nypl/web-reader",
3
- "version": "0.1.3",
3
+ "version": "0.2.0-alpha.10",
4
4
  "license": "MIT",
5
5
  "repository": "https://github.com/NYPL-Simplified/web-reader",
6
6
  "homepage": "https://github.com/NYPL-Simplified/web-reader",
7
- "main": "dist/index.js",
8
- "typings": "dist/index.d.ts",
9
7
  "files": [
10
- "dist",
11
- "src"
8
+ "dist"
12
9
  ],
13
- "exports": {
14
- "./package.json": "./package.json",
15
- ".": {
16
- "import": "./dist/web-reader.esm.js",
17
- "require": "./dist/index.cjs.production.min.js",
18
- "types": "./dist/index.d.ts"
10
+ "main": "dist/cjs/index.js",
11
+ "module": "dist/esm/index.js",
12
+ "types": "dist/types/index.d.ts",
13
+ "typings": "dist/types/index.d.ts",
14
+ "typesVersions": {
15
+ "*": {
16
+ "dist/esm/*": [
17
+ "dist/types/*"
18
+ ],
19
+ "dist/cjs/*": [
20
+ "dist/types/*"
21
+ ]
19
22
  }
20
23
  },
21
24
  "scripts": {
@@ -24,13 +27,14 @@
24
27
  "example": "parcel",
25
28
  "example:https": "parcel --cert localhost.pem --key localhost-key.pem",
26
29
  "example:sw": "ENABLE_SW=true npm run example:https",
27
- "start": "tsdx watch --tsconfig tsconfig.build.json",
28
- "build": "tsdx build --tsconfig tsconfig.build.json",
30
+ "start": "ts-node -T build.ts -w",
31
+ "build": "ts-node -T build.ts",
29
32
  "test": "jest --watch",
30
33
  "test:ci": "jest --ci --silent --coverage --maxWorkers=2",
31
34
  "test:ci:integration": "start-server-and-test example http://localhost:1234 cypress:run",
32
35
  "cypress:open": "cypress open",
33
36
  "cypress:run": "cypress run",
37
+ "cypress:run:chrome": "cypress run --browser chrome",
34
38
  "prettier": "prettier --write --ignore-path .eslintignore .",
35
39
  "prettier:check": "prettier --check --ignore-path .eslintignore .",
36
40
  "lint": "eslint --fix .",
@@ -41,10 +45,12 @@
41
45
  "storybook": "start-storybook -p 6006",
42
46
  "build-storybook": "build-storybook",
43
47
  "cors-proxy": "node example/cors-proxy.js",
44
- "release": "release-it --verbose"
48
+ "release": "release-it --verbose",
49
+ "release:alpha": "release-it --verbose --preRelease=alpha"
45
50
  },
46
51
  "peerDependencies": {
47
- "react": ">=16"
52
+ "react": "^16.8.0 || 17.x",
53
+ "react-dom": "^16.8.0 || 17.x"
48
54
  },
49
55
  "prettier": {
50
56
  "printWidth": 80,
@@ -54,17 +60,6 @@
54
60
  "endOfLine": "lf"
55
61
  },
56
62
  "author": "kristojorg",
57
- "module": "dist/web-reader.esm.js",
58
- "size-limit": [
59
- {
60
- "path": "dist/web-reader.cjs.production.min.js",
61
- "limit": "700 KB"
62
- },
63
- {
64
- "path": "dist/web-reader.esm.js",
65
- "limit": "700 KB"
66
- }
67
- ],
68
63
  "staticFiles": {
69
64
  "staticPath": "example/static"
70
65
  },
@@ -85,7 +80,6 @@
85
80
  "@babel/core": "^7.12.10",
86
81
  "@emotion/jest": "^11.3.0",
87
82
  "@parcel/transformer-typescript-tsc": "^2.0.0-alpha.3",
88
- "@size-limit/preset-small-lib": "^4.9.1",
89
83
  "@storybook/addon-actions": "^6.3.1",
90
84
  "@storybook/addon-essentials": "^6.3.1",
91
85
  "@storybook/addon-info": "^5.3.21",
@@ -97,22 +91,29 @@
97
91
  "@testing-library/jest-dom": "^5.14.1",
98
92
  "@testing-library/react": "^12.0.0",
99
93
  "@testing-library/react-hooks": "^7.0.1",
94
+ "@types/debounce": "^1.2.0",
100
95
  "@types/http-proxy": "^1.17.7",
101
96
  "@types/node": "^14.17.10",
102
97
  "@types/react": "^17.0.19",
103
98
  "@types/react-dom": "^17.0.0",
104
99
  "@types/react-pdf": "^5.0.5",
105
100
  "@types/react-router-dom": "^5.1.7",
101
+ "@types/rimraf": "^3.0.2",
106
102
  "@typescript-eslint/eslint-plugin": "^4.29.2",
107
103
  "@typescript-eslint/parser": "^4.29.2",
108
104
  "babel-jest": "^27.0.5",
109
105
  "babel-loader": "^8.2.2",
110
106
  "cypress": "^8.3.0",
107
+ "debounce": "^1.2.1",
108
+ "esbuild": "^0.12.28",
111
109
  "esbuild-jest": "^0.5.0",
112
110
  "eslint": "^7.32.0",
113
111
  "eslint-config-prettier": "^8.3.0",
114
112
  "eslint-config-react-app": "^6.0.0",
115
113
  "eslint-plugin-flowtype": "^5.9.0",
114
+ "eslint-plugin-import": "^2.24.2",
115
+ "eslint-plugin-jsx-a11y": "^6.4.1",
116
+ "eslint-plugin-react": "^7.26.0",
116
117
  "eslint-plugin-react-hooks": "^4.2.0",
117
118
  "express": "^4.17.1",
118
119
  "husky": "^7.0.2",
@@ -125,24 +126,24 @@
125
126
  "parcel-reporter-static-files-copy": "^1.3.0",
126
127
  "prettier": "2.2.1",
127
128
  "r2-shared-js": "^1.0.49",
128
- "react": "^17.0.2",
129
+ "react": ">=16",
129
130
  "react-app-polyfill": "^2.0.0",
130
- "react-dom": "^17.0.2",
131
+ "react-dom": "*",
131
132
  "react-is": "^17.0.1",
132
133
  "react-router-dom": "^5.2.0",
133
134
  "release-it": "^14.11.5",
134
135
  "request": "^2.88.2",
136
+ "rimraf": "^3.0.2",
135
137
  "size-limit": "^4.9.1",
136
138
  "start-server-and-test": "^1.14.0",
137
139
  "ts-jest": "^27.0.3",
138
140
  "ts-node": "^10.1.0",
139
- "tsdx": "^0.14.1",
140
141
  "tslib": "^2.3.1",
141
142
  "typescript": "^4.3.5"
142
143
  },
143
144
  "dependencies": {
144
145
  "@chakra-ui/react": "^1.6.6",
145
- "@d-i-t-a/reader": "^2.0.0-alpha.2",
146
+ "@d-i-t-a/reader": "2.0.0-alpha.7",
146
147
  "@emotion/react": "^11.4.0",
147
148
  "@emotion/styled": "^11.3.0",
148
149
  "@nypl/design-system-react-components": "^0.21.2",
@@ -152,7 +153,8 @@
152
153
  "react-pdf": "^5.3.2",
153
154
  "workbox-expiration": "^6.2.4",
154
155
  "workbox-precaching": "^6.2.4",
155
- "workbox-strategies": "^6.2.4"
156
+ "workbox-routing": "^6.3.0",
157
+ "workbox-strategies": "^6.3.0"
156
158
  },
157
159
  "optionalDependencies": {
158
160
  "@nypl-simplified-packages/axisnow-access-control-web": "^1.3.0"
@@ -163,15 +165,12 @@
163
165
  },
164
166
  "release-it": {
165
167
  "github": {
166
- "update": true,
167
- "releaseName": "v${version}",
168
- "releaseNotes": "git log --pretty=format:\"* %s (%h)\" ${from}...${to}"
168
+ "release": true
169
169
  },
170
170
  "hooks": {
171
171
  "before:init": [
172
172
  "npm run lint",
173
173
  "npm run test:ci",
174
- "npm run test:ci:integration",
175
174
  "npm run build"
176
175
  ]
177
176
  }
@@ -1,9 +0,0 @@
1
- export declare type PublicationConfig = {
2
- manifestUrl: string;
3
- proxyUrl?: string;
4
- };
5
- /**
6
- * Will add all publication resources to the cache so they
7
- * can be picked up by the SW.
8
- */
9
- export default function usePublicationSW(publications: PublicationConfig[]): void;
@@ -1 +0,0 @@
1
- export { default as usePublicationSW } from './client';
@@ -1,7 +0,0 @@
1
- import { WebReaderSWConfig } from './types';
2
- /**
3
- * Sets up the event listeners to:
4
- * - On Fetch
5
- * - Serve cached responses if they exist and are less than a week old.
6
- */
7
- export default function initWebReaderSW({ cacheExpirationSeconds, }?: WebReaderSWConfig | undefined): void;
@@ -1,3 +0,0 @@
1
- export declare type WebReaderSWConfig = {
2
- cacheExpirationSeconds?: number;
3
- };
package/dist/index.d.ts DELETED
@@ -1,7 +0,0 @@
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;
package/dist/index.js DELETED
@@ -1,8 +0,0 @@
1
-
2
- 'use strict'
3
-
4
- if (process.env.NODE_ENV === 'production') {
5
- module.exports = require('./web-reader.cjs.production.min.js')
6
- } else {
7
- module.exports = require('./web-reader.cjs.development.js')
8
- }
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { ActiveReader } from '../types';
3
- export declare type HeaderProps = ActiveReader & {
4
- headerLeft?: React.ReactNode;
5
- };
6
- export default function Header(props: HeaderProps): React.ReactElement;