@canopycanopycanopy/b-ber-reader-react 1.2.13-react-reader.42 → 1.2.13-react-reader.46

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/index.d.ts CHANGED
@@ -41,7 +41,7 @@ export enum Layout {
41
41
  COLUMNS = 'columns',
42
42
  }
43
43
 
44
- type RequireOneOf<T, Keys extends keyof T = keyof T> = Pick<
44
+ export type RequireOneOf<T, Keys extends keyof T = keyof T> = Pick<
45
45
  T,
46
46
  Exclude<keyof T, Keys>
47
47
  > &
@@ -57,54 +57,49 @@ export interface BberReaderQueryParameterKeys {
57
57
  spreadIndex?: number
58
58
  }
59
59
 
60
- interface Download {
60
+ export interface Download {
61
61
  label: string
62
62
  title: string
63
63
  url: string
64
64
  description?: string
65
65
  }
66
66
 
67
- interface UiOptionsNavigationHeaderIcons {
67
+ export interface UiOptionsNavigationHeaderIcons {
68
68
  home?: boolean
69
69
  toc?: boolean
70
70
  downloads?: boolean
71
71
  info?: boolean
72
72
  }
73
73
 
74
- interface UiOptionsNavigationFooterIcons {
74
+ export interface UiOptionsNavigationFooterIcons {
75
75
  chapter?: boolean
76
76
  page?: boolean
77
77
  }
78
78
 
79
- interface UiOptionsNavigation {
79
+ export interface UiOptionsNavigation {
80
80
  header_icons?: UiOptionsNavigationHeaderIcons
81
81
  footer_icons?: UiOptionsNavigationFooterIcons
82
82
  }
83
83
 
84
- interface UiOptions {
84
+ export interface UiOptions {
85
85
  navigation?: UiOptionsNavigation
86
86
  }
87
87
 
88
- enum SidebarName {
88
+ export enum SidebarName {
89
89
  CHAPTERS = 'chapters',
90
90
  DOWNLOADS = 'downloads',
91
91
  METADATA = 'metadata',
92
92
  // SETTINGS = 'settings',
93
93
  }
94
94
 
95
- interface NavigationHeaderProps {
95
+ export interface NavigationHeaderProps {
96
96
  destroyReaderComponent: () => void
97
- handleSidebarButtonClick: (name: SidebarName | null) => void
97
+ handleSidebarButtonClick: (name: `${SidebarName}` | null) => void
98
98
  downloads: Download[]
99
99
  uiOptions: UiOptions
100
100
  }
101
101
 
102
- enum Layout {
103
- SCROLL = 'scroll',
104
- COLUMNS = 'columns',
105
- }
106
-
107
- interface SpineItem {
102
+ export interface SpineItem {
108
103
  absoluteURL: string
109
104
  children: SpineItem[]
110
105
  depth: number
@@ -119,9 +114,9 @@ interface SpineItem {
119
114
  title: string
120
115
  }
121
116
 
122
- type Spine = SpineItem[]
117
+ export type Spine = SpineItem[]
123
118
 
124
- interface Metadata {
119
+ export interface Metadata {
125
120
  title: string
126
121
  creator: string
127
122
  date: string
@@ -132,11 +127,11 @@ interface Metadata {
132
127
  identifier: string
133
128
  }
134
129
 
135
- interface NavigationFooterProps {
130
+ export interface NavigationFooterProps {
136
131
  uiOptions: UiOptions
137
132
  currentSpineItemIndex: number
138
133
  spine: Spine
139
- layout: Layout
134
+ layout: `${Layout}`
140
135
  spreadIndex: number
141
136
  lastSpreadIndex: number
142
137
  handleEvents: boolean
@@ -149,34 +144,34 @@ interface NavigationFooterProps {
149
144
  goToNextPage: () => void
150
145
  }
151
146
 
152
- interface SidebarChaptersProps {
147
+ export interface SidebarChaptersProps {
153
148
  showSidebar: SidebarName | null
154
149
  spine: Spine
155
150
  currentSpineItemIndex: number
156
151
  navigateToChapterByURL: (url: string) => void
157
152
  }
158
153
 
159
- interface SidebarDownloadsProps {
154
+ export interface SidebarDownloadsProps {
160
155
  showSidebar: SidebarName | null
161
156
  downloads: Download[]
162
157
  }
163
158
 
164
- interface SidebarMetadataProps {
159
+ export interface SidebarMetadataProps {
165
160
  showSidebar: SidebarName | null
166
161
  metadata: Metadata
167
162
  }
168
163
 
169
164
  // interface SidebarSettingsProps {}
170
165
 
171
- type UiReaderProp<T> = React.Component<T> | ((props: T) => JSX.Element)
166
+ export type UiReaderProp<T> = React.Component<T> | ((props: T) => JSX.Element)
172
167
 
173
- type LocationState = 'memory' | 'localStorage' | 'queryParams'
168
+ export type LocationState = 'memory' | 'localStorage' | 'queryParams'
174
169
 
175
- type KeysValues<T> = { [P in keyof T]: T[P] }
170
+ export type KeysValues<T> = { [P in keyof T]: T[P] }
176
171
 
177
- type SearchParams = string | KeysValues<BberReaderQueryParameterKeys>
172
+ export type SearchParams = string | KeysValues<BberReaderQueryParameterKeys>
178
173
 
179
- interface OptionalBberReaderProps {
174
+ export interface OptionalBberReaderProps {
180
175
  bookURL?: string
181
176
  manifestURL?: string
182
177
  projectURL?: string
@@ -186,7 +181,7 @@ interface OptionalBberReaderProps {
186
181
  loadRemoteLibrary?: boolean
187
182
  uiOptions?: UI
188
183
  cache?: boolean
189
- layout?: Layout
184
+ layout?: `${Layout}`
190
185
  searchParamKeys?: BberReaderQueryParameterKeys
191
186
  disableBodyStyles?: boolean
192
187
 
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.42+51bd8a89",
3
+ "version": "1.2.13-react-reader.46+f81c7a90",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -122,5 +122,5 @@
122
122
  "url": "https://maxwellsimmer.com"
123
123
  }
124
124
  ],
125
- "gitHead": "51bd8a894e97b78603602b891f92a35091e4371a"
125
+ "gitHead": "f81c7a90944b03e5d9a00eaeb70d6fc3b573fb35"
126
126
  }