@canopycanopycanopy/b-ber-reader-react 1.2.13-react-reader.14 → 1.2.13-react-reader.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -9
- package/index.d.ts +25 -2
- package/package.json +4 -4
package/index.d.ts
CHANGED
|
@@ -41,8 +41,25 @@ export enum Layout {
|
|
|
41
41
|
COLUMNS = 'columns',
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
type RequireOneOf<T, Keys extends keyof T = keyof T> = Pick<
|
|
45
|
+
T,
|
|
46
|
+
Exclude<keyof T, Keys>
|
|
47
|
+
> &
|
|
48
|
+
{
|
|
49
|
+
[K in Keys]-?: Required<Pick<T, K>> &
|
|
50
|
+
Partial<Record<Exclude<Keys, K>, undefined>>
|
|
51
|
+
}[Keys]
|
|
52
|
+
|
|
53
|
+
// Used for renaming the query parameters
|
|
54
|
+
export interface BberReaderQueryParameterKeys {
|
|
55
|
+
slug?: string
|
|
56
|
+
currentSpineItemIndex?: string
|
|
57
|
+
spreadIndex?: string
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
interface OptionalBberReaderProps {
|
|
61
|
+
bookURL?: string
|
|
62
|
+
manifestURL?: string
|
|
46
63
|
projectURL?: string
|
|
47
64
|
books?: Book[]
|
|
48
65
|
downloads?: Download[]
|
|
@@ -51,6 +68,12 @@ export interface BberReaderProps {
|
|
|
51
68
|
uiOptions?: UI
|
|
52
69
|
cache?: boolean
|
|
53
70
|
layout?: Layout
|
|
71
|
+
paramKeys?: BberReaderQueryParameterKeys
|
|
54
72
|
}
|
|
55
73
|
|
|
74
|
+
export type BberReaderProps = RequireOneOf<
|
|
75
|
+
OptionalBberReaderProps,
|
|
76
|
+
'bookURL' | 'manifestURL'
|
|
77
|
+
>
|
|
78
|
+
|
|
56
79
|
export default function BberReader(props?: BberReaderProps): JSX.Element
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canopycanopycanopy/b-ber-reader-react",
|
|
3
|
-
"version": "1.2.13-react-reader.
|
|
3
|
+
"version": "1.2.13-react-reader.19+49c23ef0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"css-loader": "^0.28.10",
|
|
41
41
|
"cssnano": "^4.1.10",
|
|
42
42
|
"eslint": "^7.32.0",
|
|
43
|
-
"eslint-config-airbnb": "^
|
|
44
|
-
"eslint-config-airbnb-base": "^
|
|
43
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
44
|
+
"eslint-config-airbnb-base": "^15.0.0",
|
|
45
45
|
"eslint-plugin-babel": "^4.1.2",
|
|
46
46
|
"eslint-plugin-import": "^2.9.0",
|
|
47
47
|
"eslint-plugin-jsx-a11y": "^6.0.3",
|
|
@@ -120,5 +120,5 @@
|
|
|
120
120
|
"url": "https://maxwellsimmer.com"
|
|
121
121
|
}
|
|
122
122
|
],
|
|
123
|
-
"gitHead": "
|
|
123
|
+
"gitHead": "49c23ef079e76f36e3716189ef9e6cec84b3f429"
|
|
124
124
|
}
|