@edrlab/thorium-web 1.2.1 → 1.3.1

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 (100) hide show
  1. package/dist/{ThPreferencesAdapter-DrZ5_6Dv.d.mts → ThPreferencesAdapter-D0rzsGRl.d.mts} +50 -13
  2. package/dist/{ThSettingsWrapper-8Kx0SnH4.d.mts → ThSettingsWrapper-BXuRgdqp.d.mts} +42 -4
  3. package/dist/{actions-D2CHvCHu.d.mts → actions-BLAr0oaM.d.mts} +16 -4
  4. package/dist/{actionsReducer-kc-S130w.d.mts → actionsReducer-XWTGGNUd.d.mts} +46 -14
  5. package/dist/chunk-2ORXUOH3.mjs +134 -0
  6. package/dist/chunk-2ORXUOH3.mjs.map +1 -0
  7. package/dist/chunk-3GDQP6AS.mjs +14 -0
  8. package/dist/chunk-3GDQP6AS.mjs.map +1 -0
  9. package/dist/chunk-6BUN7DEA.mjs +854 -0
  10. package/dist/chunk-6BUN7DEA.mjs.map +1 -0
  11. package/dist/{chunk-IYAFKTPL.mjs → chunk-6EHFW43Y.mjs} +5 -4
  12. package/dist/chunk-6EHFW43Y.mjs.map +1 -0
  13. package/dist/chunk-7CGMWOZN.mjs +20 -0
  14. package/dist/chunk-7CGMWOZN.mjs.map +1 -0
  15. package/dist/{chunk-4VHEHMJN.mjs → chunk-A3FZBEUL.mjs} +228 -94
  16. package/dist/chunk-A3FZBEUL.mjs.map +1 -0
  17. package/dist/{chunk-NYZBHYW2.mjs → chunk-DETZMFZ7.mjs} +366 -61
  18. package/dist/chunk-DETZMFZ7.mjs.map +1 -0
  19. package/dist/{chunk-QPE574OW.mjs → chunk-DMZFSOHK.mjs} +28 -36
  20. package/dist/chunk-DMZFSOHK.mjs.map +1 -0
  21. package/dist/{chunk-7NEQAW7J.mjs → chunk-DTPO3J2C.mjs} +676 -930
  22. package/dist/chunk-DTPO3J2C.mjs.map +1 -0
  23. package/dist/{chunk-K3K7TUWM.mjs → chunk-EZG6SBSO.mjs} +358 -94
  24. package/dist/chunk-EZG6SBSO.mjs.map +1 -0
  25. package/dist/chunk-GPWW5OML.mjs +1955 -0
  26. package/dist/chunk-GPWW5OML.mjs.map +1 -0
  27. package/dist/{chunk-P4V3LA5R.mjs → chunk-I4BKU5NN.mjs} +13 -9
  28. package/dist/chunk-I4BKU5NN.mjs.map +1 -0
  29. package/dist/{chunk-47AIIJFO.mjs → chunk-ITDBOMY5.mjs} +3 -3
  30. package/dist/{chunk-47AIIJFO.mjs.map → chunk-ITDBOMY5.mjs.map} +1 -1
  31. package/dist/{chunk-XVSFXHYB.mjs → chunk-L4XGZAZ5.mjs} +23 -20
  32. package/dist/chunk-L4XGZAZ5.mjs.map +1 -0
  33. package/dist/{chunk-PXAUQJEU.mjs → chunk-LP3JFZ4A.mjs} +2425 -1634
  34. package/dist/chunk-LP3JFZ4A.mjs.map +1 -0
  35. package/dist/{chunk-72XCX5TD.mjs → chunk-NKO3K3QS.mjs} +14 -9
  36. package/dist/chunk-NKO3K3QS.mjs.map +1 -0
  37. package/dist/chunk-SAUOY37Q.mjs +862 -0
  38. package/dist/chunk-SAUOY37Q.mjs.map +1 -0
  39. package/dist/chunk-TEZB4ULX.mjs +57 -0
  40. package/dist/chunk-TEZB4ULX.mjs.map +1 -0
  41. package/dist/components/Audio/index.css +1858 -0
  42. package/dist/components/Audio/index.css.map +1 -0
  43. package/dist/components/Audio/index.d.mts +103 -0
  44. package/dist/components/Audio/index.mjs +23 -0
  45. package/dist/components/Audio/index.mjs.map +1 -0
  46. package/dist/components/Epub/index.css +365 -9
  47. package/dist/components/Epub/index.css.map +1 -1
  48. package/dist/components/Epub/index.d.mts +17 -19
  49. package/dist/components/Epub/index.mjs +18 -13
  50. package/dist/components/Misc/index.css +7 -4
  51. package/dist/components/Misc/index.css.map +1 -1
  52. package/dist/components/Misc/index.mjs +5 -133
  53. package/dist/components/Misc/index.mjs.map +1 -1
  54. package/dist/components/Reader/index.css +1022 -183
  55. package/dist/components/Reader/index.css.map +1 -1
  56. package/dist/components/Reader/index.d.mts +16 -16
  57. package/dist/components/Reader/index.mjs +124 -25
  58. package/dist/components/Reader/index.mjs.map +1 -1
  59. package/dist/components/WebPub/index.css +365 -9
  60. package/dist/components/WebPub/index.css.map +1 -1
  61. package/dist/components/WebPub/index.d.mts +16 -16
  62. package/dist/components/WebPub/index.mjs +18 -13
  63. package/dist/core/Components/index.d.mts +64 -15
  64. package/dist/core/Components/index.mjs +2 -1
  65. package/dist/core/Helpers/index.d.mts +2 -2
  66. package/dist/core/Helpers/index.mjs +4 -2
  67. package/dist/core/Hooks/index.d.mts +7 -8
  68. package/dist/core/Hooks/index.mjs +3 -1
  69. package/dist/i18n/index.mjs +6 -7
  70. package/dist/lib/index.d.mts +159 -15
  71. package/dist/lib/index.mjs +4 -2
  72. package/dist/lib-M3PPQDJJ.mjs +6548 -0
  73. package/dist/lib-M3PPQDJJ.mjs.map +1 -0
  74. package/dist/locales/en/thorium-web.json +22 -0
  75. package/dist/next-lib/index.mjs +2 -0
  76. package/dist/next-lib/index.mjs.map +1 -1
  77. package/dist/preferences/index.d.mts +111 -13
  78. package/dist/preferences/index.mjs +6 -3
  79. package/dist/{settingsReducer-C1wwCAMv.d.mts → settingsReducer-Bu1zeveu.d.mts} +1 -1
  80. package/dist/{ui-CamWuqOo.d.mts → ui-nBv8gfr0.d.mts} +20 -1
  81. package/dist/useAudioNavigator-C5aW4-eT.d.mts +133 -0
  82. package/dist/{useContrast-D6sjPjxy.d.mts → useContrast-2t429O9O.d.mts} +16 -8
  83. package/dist/usePreferences-VaBf46eP.d.mts +230 -0
  84. package/dist/useReaderTransitions-IBGdE7qi.d.mts +530 -0
  85. package/dist/{useTimeline-DyMx_aWY.d.mts → useTimeline-DCZ1qoCO.d.mts} +4 -2
  86. package/package.json +17 -13
  87. package/dist/chunk-4VHEHMJN.mjs.map +0 -1
  88. package/dist/chunk-72XCX5TD.mjs.map +0 -1
  89. package/dist/chunk-7NEQAW7J.mjs.map +0 -1
  90. package/dist/chunk-IYAFKTPL.mjs.map +0 -1
  91. package/dist/chunk-K3K7TUWM.mjs.map +0 -1
  92. package/dist/chunk-NYZBHYW2.mjs.map +0 -1
  93. package/dist/chunk-P4V3LA5R.mjs.map +0 -1
  94. package/dist/chunk-PXAUQJEU.mjs.map +0 -1
  95. package/dist/chunk-QPE574OW.mjs.map +0 -1
  96. package/dist/chunk-XVSFXHYB.mjs.map +0 -1
  97. package/dist/useEpubNavigator-CwHJfoiV.d.mts +0 -42
  98. package/dist/usePreferences-BXFJbval.d.mts +0 -43
  99. package/dist/useReaderTransitions-guT-eA-Q.d.mts +0 -365
  100. package/dist/useWebPubNavigator-CuSNQKMw.d.mts +0 -39
@@ -1,365 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { TooltipProps, Heading, HeadingProps, PopoverProps } from 'react-aria-components';
3
- import { s as ThActionsTriggerVariant, r as ThCollapsibilityVisibility, p as ThActionEntry, c as ThActionsKeys, T as ThDockingKeys, b as ThSheetTypes, a as ThSheetHeaderVariant } from './actions-D2CHvCHu.mjs';
4
- import { T as ThActionButtonProps, f as ThMenuItemProps, a as ThCollapsibleActionsBarProps, t as ThSettingsEntry, W as WithRef, r as ThDropdownProps, h as ThNumberFieldProps, k as ThRadioGroupProps, m as ThSliderProps, o as ThSwitchProps } from './ThSettingsWrapper-8Kx0SnH4.mjs';
5
- import React__default, { RefObject, ReactNode } from 'react';
6
- import { g as ThTextSettingsKeys, b as ThSpacingSettingsKeys, j as ThSettingsGroupPref, a as ThSpacingPresetKeys, T as ThLineHeightOptions } from './useContrast-D6sjPjxy.mjs';
7
- import { PressEvent } from 'react-aria';
8
- import { A as ActionsStateKeys } from './actionsReducer-kc-S130w.mjs';
9
- import { a as ThPreferences, D as DefaultKeys } from './ThPreferencesAdapter-DrZ5_6Dv.mjs';
10
- import { Publication, Locator, Fetcher } from '@readium/shared';
11
- import { ReaderProfile } from './lib/index.mjs';
12
- import { P as ProcessedError } from './errorHandler-CL2YIfQY.mjs';
13
-
14
- interface StatefulActionsMapObject {
15
- Trigger: React.ComponentType<StatefulActionTriggerProps>;
16
- Target?: React.ComponentType<StatefulActionContainerProps>;
17
- }
18
- interface StatefulActionTriggerProps {
19
- variant: ThActionsTriggerVariant;
20
- associatedKey?: ActionsStateKeys;
21
- }
22
- interface StatefulActionContainerProps {
23
- triggerRef: RefObject<HTMLElement | null>;
24
- }
25
-
26
- declare const StatefulFullscreenTrigger: ({ variant }: StatefulActionTriggerProps) => react_jsx_runtime.JSX.Element | null;
27
-
28
- declare const StatefulJumpToPositionContainer: ({ triggerRef }: StatefulActionContainerProps) => react_jsx_runtime.JSX.Element | null;
29
-
30
- declare const StatefulJumpToPositionTrigger: ({ variant }: StatefulActionTriggerProps) => react_jsx_runtime.JSX.Element | null;
31
-
32
- declare const StatefulSettingsContainer: ({ triggerRef }: StatefulActionContainerProps) => react_jsx_runtime.JSX.Element;
33
-
34
- declare const StatefulSettingsTrigger: ({ variant }: StatefulActionTriggerProps) => react_jsx_runtime.JSX.Element;
35
-
36
- declare const StatefulTocContainer: ({ triggerRef }: StatefulActionContainerProps) => react_jsx_runtime.JSX.Element;
37
-
38
- declare const StatefulTocTrigger: ({ variant }: StatefulActionTriggerProps) => react_jsx_runtime.JSX.Element;
39
-
40
- interface StatefulActionIconProps extends ThActionButtonProps {
41
- visibility?: ThCollapsibilityVisibility;
42
- placement?: TooltipProps["placement"];
43
- tooltipLabel?: string;
44
- }
45
- declare const StatefulActionIcon: ({ visibility, placement, tooltipLabel, children, ...props }: StatefulActionIconProps) => react_jsx_runtime.JSX.Element;
46
-
47
- interface StatefulOverflowMenuItemProps extends Omit<ThMenuItemProps, "shortcut"> {
48
- shortcut?: string | null;
49
- }
50
- declare const StatefulOverflowMenuItem: ({ id, label, SVGIcon, shortcut, ...props }: StatefulOverflowMenuItemProps) => react_jsx_runtime.JSX.Element;
51
-
52
- interface StatefulCollapsibleActionsBarProps extends ThCollapsibleActionsBarProps {
53
- items: ThActionEntry<string | ThActionsKeys | ThDockingKeys>[];
54
- overflowMenuClassName?: string;
55
- }
56
- declare const StatefulCollapsibleActionsBar: ({ id, items, overflowMenuClassName, ...props }: StatefulCollapsibleActionsBarProps) => react_jsx_runtime.JSX.Element;
57
-
58
- interface StatefulOverflowMenuProps {
59
- id: string;
60
- items: ThActionEntry<string | ThActionsKeys | ThDockingKeys>[];
61
- triggerRef: RefObject<HTMLElement | null>;
62
- className?: string;
63
- children?: ReactNode;
64
- }
65
- declare const StatefulOverflowMenu: ({ id, className, items, triggerRef }: StatefulOverflowMenuProps) => react_jsx_runtime.JSX.Element | undefined;
66
-
67
- declare const useDocking: <T extends string>(key: T) => {
68
- getDocker: () => ThDockingKeys[];
69
- sheetType: ThSheetTypes;
70
- };
71
-
72
- type ActionComponent = StatefulActionsMapObject;
73
- interface SettingComponent extends ThSettingsEntry {
74
- type?: "text" | "spacing";
75
- props?: any;
76
- }
77
- interface ThPlugin {
78
- id: string;
79
- name: string;
80
- description?: string;
81
- version?: string;
82
- components: {
83
- actions?: Record<string, ActionComponent>;
84
- settings?: Record<string, SettingComponent>;
85
- };
86
- }
87
-
88
- declare const createDefaultPlugin: () => ThPlugin;
89
-
90
- interface StatefulGroupWrapperProps<T extends string = ThTextSettingsKeys | ThSpacingSettingsKeys> {
91
- label: string;
92
- moreLabel: string;
93
- moreTooltip: string;
94
- onPressMore: (e: PressEvent) => void;
95
- componentsMap: Record<string, SettingComponent>;
96
- prefs?: ThSettingsGroupPref<T>;
97
- defaultPrefs: {
98
- main: T[];
99
- subPanel: T[];
100
- };
101
- isDisabled?: boolean;
102
- compounds?: {
103
- /**
104
- * Custom heading. Can be either:
105
- * - A React element that will be rendered directly
106
- * - Props that will be spread onto the default Heading component
107
- */
108
- heading?: React.ReactElement<typeof Heading> | WithRef<HeadingProps, HTMLHeadingElement>;
109
- };
110
- }
111
- declare const StatefulGroupWrapper: <T extends string = ThTextSettingsKeys | ThSpacingSettingsKeys>({ label, moreLabel, moreTooltip, onPressMore, componentsMap, prefs, defaultPrefs, isDisabled, compounds }: StatefulGroupWrapperProps<T>) => react_jsx_runtime.JSX.Element;
112
-
113
- interface StatefulDropdownProps extends Omit<ThDropdownProps, "classNames"> {
114
- standalone?: boolean;
115
- }
116
- declare const StatefulDropdown: ({ standalone, label, className, compounds, ...props }: StatefulDropdownProps) => react_jsx_runtime.JSX.Element;
117
-
118
- interface StatefulNumberFieldProps extends Omit<ThNumberFieldProps, "classNames"> {
119
- standalone?: boolean;
120
- resetLabel?: string;
121
- placeholder?: string;
122
- }
123
- declare const StatefulNumberField: ({ standalone, label, placeholder, value, resetLabel, ...props }: StatefulNumberFieldProps) => react_jsx_runtime.JSX.Element;
124
-
125
- interface StatefulRadioGroupProps extends Omit<ThRadioGroupProps, "classNames"> {
126
- standalone?: boolean;
127
- useGraphicalNavigation?: boolean;
128
- onEscape?: () => void;
129
- }
130
- declare const StatefulRadioGroup: ({ ref, standalone, useGraphicalNavigation, label, items, value, children, onChange, onEscape, ...props }: StatefulRadioGroupProps) => react_jsx_runtime.JSX.Element;
131
-
132
- interface StatefulSliderProps extends Omit<ThSliderProps, "classNames"> {
133
- standalone?: boolean;
134
- placeholder?: string;
135
- resetLabel?: string;
136
- displayTicks?: boolean;
137
- }
138
- declare const StatefulSlider: ({ standalone, label, placeholder, displayTicks, value, resetLabel, ...props }: StatefulSliderProps) => react_jsx_runtime.JSX.Element;
139
-
140
- interface StatefulSwitchProps extends Omit<ThSwitchProps, "classNames"> {
141
- standalone?: boolean;
142
- }
143
- declare const StatefulSwitch: ({ standalone, label, heading, ...props }: StatefulSwitchProps) => react_jsx_runtime.JSX.Element;
144
-
145
- interface useGridNavigationProps {
146
- containerRef: React__default.RefObject<HTMLDivElement | null>;
147
- items: React__default.RefObject<any[]>;
148
- currentValue: any;
149
- onChange: (value: any) => void;
150
- isRTL?: boolean;
151
- onEscape?: () => void;
152
- onFocus?: (value: string) => void;
153
- }
154
- declare const useGridNavigation: ({ containerRef, items, currentValue, onChange, isRTL, onEscape, onFocus }: useGridNavigationProps) => {
155
- onKeyDown: (e: React__default.KeyboardEvent) => void;
156
- };
157
-
158
- declare const useGridTemplate: (ref: React.RefObject<HTMLDivElement | null>, type?: "columns" | "rows") => number | null;
159
-
160
- interface StatefulSettingsItemProps {
161
- standalone?: boolean;
162
- }
163
-
164
- declare const StatefulLetterSpacing: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
165
-
166
- declare const StatefulLineHeight: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
167
-
168
- declare const StatefulParagraphIndent: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
169
-
170
- declare const StatefulParagraphSpacing: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
171
-
172
- declare const StatefulSpacingGroup: () => react_jsx_runtime.JSX.Element;
173
- declare const StatefulSpacingGroupContainer: () => react_jsx_runtime.JSX.Element;
174
-
175
- declare const StatefulSpacingPresets: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element | null;
176
-
177
- declare const StatefulWordSpacing: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
178
-
179
- /**
180
- * Hook that returns a mapping of line height options to their actual numeric values
181
- * This eliminates code duplication across spacing components
182
- */
183
- declare const useLineHeight: () => {
184
- publisher: null;
185
- small: any;
186
- medium: any;
187
- large: any;
188
- };
189
-
190
- /**
191
- * Hook to determine if preset system should be active
192
- * Only active when component is both registered AND displayed
193
- * This allows us to correctly handle overrides for presets,
194
- * and states for spacing components
195
- */
196
- declare const useSpacingPresets: () => {
197
- currentPreset: ThSpacingPresetKeys;
198
- getPresetValues: (presetKey: ThSpacingPresetKeys) => {
199
- letterSpacing: any;
200
- lineHeight: any;
201
- paragraphIndent: any;
202
- paragraphSpacing: any;
203
- wordSpacing: any;
204
- };
205
- getEffectiveSpacingValue: {
206
- (key: ThSpacingSettingsKeys.letterSpacing): number | null;
207
- (key: ThSpacingSettingsKeys.lineHeight): ThLineHeightOptions | null;
208
- (key: ThSpacingSettingsKeys.paragraphIndent): number | null;
209
- (key: ThSpacingSettingsKeys.paragraphSpacing): number | null;
210
- (key: ThSpacingSettingsKeys.wordSpacing): number | null;
211
- };
212
- getSpacingResetValue: {
213
- (key: ThSpacingSettingsKeys.letterSpacing): number | null;
214
- (key: ThSpacingSettingsKeys.lineHeight): ThLineHeightOptions | null;
215
- (key: ThSpacingSettingsKeys.paragraphIndent): number | null;
216
- (key: ThSpacingSettingsKeys.paragraphSpacing): number | null;
217
- (key: ThSpacingSettingsKeys.wordSpacing): number | null;
218
- };
219
- canBeReset: (key: ThSpacingSettingsKeys) => boolean;
220
- setLetterSpacing: (value: number | null) => void;
221
- setLineHeight: (value: ThLineHeightOptions) => void;
222
- setParagraphIndent: (value: number | null) => void;
223
- setParagraphSpacing: (value: number | null) => void;
224
- setWordSpacing: (value: number | null) => void;
225
- setPublisherStyles: (value: boolean) => void;
226
- };
227
-
228
- declare const StatefulFontFamily: ({ standalone }: StatefulSettingsItemProps & {
229
- publicationLanguage?: string;
230
- }) => react_jsx_runtime.JSX.Element;
231
-
232
- declare const UnstableStatefulFontWeight: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
233
-
234
- declare const StatefulHyphens: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
235
-
236
- declare const StatefulTextAlign: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
237
-
238
- declare const StatefulTextGroup: () => react_jsx_runtime.JSX.Element;
239
- declare const StatefulTextGroupContainer: () => react_jsx_runtime.JSX.Element;
240
-
241
- declare const StatefulTextNormalize: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
242
-
243
- declare const StatefulPublisherStyles: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
244
-
245
- declare const StatefulZoom: () => react_jsx_runtime.JSX.Element;
246
-
247
- interface StatefulSheet {
248
- id: ActionsStateKeys;
249
- triggerRef: RefObject<HTMLElement | null>;
250
- heading: string;
251
- headerVariant?: ThSheetHeaderVariant;
252
- className: string;
253
- isOpen: boolean;
254
- onOpenChange: (isOpen: boolean) => void;
255
- onClosePress: () => void;
256
- docker?: ThDockingKeys[];
257
- children?: ReactNode;
258
- resetFocus?: unknown;
259
- focusWithinRef?: RefObject<HTMLElement | null>;
260
- focusSelector?: string;
261
- scrollTopOnFocus?: boolean;
262
- dismissEscapeKeyClose?: boolean;
263
- }
264
-
265
- interface StatefulBottomSheetProps extends StatefulSheet {
266
- }
267
- interface ScrimPref {
268
- active: boolean;
269
- override?: string;
270
- }
271
- declare const StatefulBottomSheet: ({ id, heading, headerVariant, className, isOpen, onOpenChange, onClosePress, children, resetFocus, focusWithinRef, focusSelector, scrollTopOnFocus, dismissEscapeKeyClose }: StatefulBottomSheetProps) => react_jsx_runtime.JSX.Element | undefined;
272
-
273
- interface StatefulDockedSheetProps extends StatefulSheet {
274
- flow: ThDockingKeys.start | ThDockingKeys.end | null;
275
- }
276
- declare const StatefulDockedSheet: ({ id, heading, headerVariant, className, isOpen, onClosePress, docker, flow, children, resetFocus, focusSelector, focusWithinRef, scrollTopOnFocus }: StatefulDockedSheetProps) => react_jsx_runtime.JSX.Element | undefined;
277
-
278
- interface StatefulFullScreenSheetProps extends StatefulSheet {
279
- }
280
- declare const StatefulFullScreenSheet: ({ heading, headerVariant, className, isOpen, onOpenChange, onClosePress, children, resetFocus, focusWithinRef, focusSelector, scrollTopOnFocus, dismissEscapeKeyClose }: StatefulFullScreenSheetProps) => react_jsx_runtime.JSX.Element | undefined;
281
-
282
- interface StatefulPopoverSheetProps extends StatefulSheet {
283
- placement?: PopoverProps["placement"];
284
- }
285
- declare const StatefulPopoverSheet: ({ id, triggerRef, heading, headerVariant, className, isOpen, onOpenChange, onClosePress, placement, docker, children, resetFocus, focusWithinRef, focusSelector, scrollTopOnFocus, dismissEscapeKeyClose }: StatefulPopoverSheetProps) => react_jsx_runtime.JSX.Element | undefined;
286
-
287
- declare const StatefulSheetWrapper: ({ sheetType, sheetProps, children }: {
288
- sheetType: ThSheetTypes;
289
- sheetProps: StatefulPopoverSheetProps | StatefulFullScreenSheetProps | StatefulDockedSheetProps | StatefulBottomSheetProps;
290
- children: ReactNode;
291
- }) => react_jsx_runtime.JSX.Element;
292
-
293
- declare const StatefulPreferencesProvider: ({ children, initialPreferences }: {
294
- children: ReactNode;
295
- initialPreferences?: ThPreferences<DefaultKeys>;
296
- }) => react_jsx_runtime.JSX.Element;
297
-
298
- declare const useNavigator: () => any;
299
-
300
- interface PositionStorage {
301
- get: () => Locator | undefined;
302
- set: (locator: Locator) => void | Promise<void>;
303
- }
304
- interface StatefulReaderProps {
305
- publication: Publication;
306
- localDataKey: string | null;
307
- plugins?: ThPlugin[];
308
- positionStorage?: PositionStorage;
309
- }
310
- type ThPluginFactory = () => ThPlugin[] | Promise<ThPlugin[]>;
311
- interface ReaderPlugins {
312
- epub?: ThPluginFactory;
313
- webPub?: ThPluginFactory;
314
- audio?: ThPluginFactory;
315
- }
316
- interface ReaderComponentProps {
317
- profile: "epub" | "webPub" | "audio" | undefined | null;
318
- publication: Publication;
319
- localDataKey: string | null;
320
- positionStorage?: PositionStorage;
321
- plugins?: ReaderPlugins;
322
- }
323
- declare const StatefulReaderWrapper: ({ profile, plugins, ...props }: ReaderComponentProps) => react_jsx_runtime.JSX.Element | null;
324
-
325
- interface UsePublicationOptions {
326
- url: string;
327
- onError?: (error: ProcessedError) => void;
328
- fetcher?: Fetcher;
329
- }
330
- interface UsePublicationReturn {
331
- isLoading: boolean;
332
- error: ProcessedError | null;
333
- publication: Publication | null;
334
- manifest: object | null;
335
- selfLink: string | null;
336
- localDataKey: string | null;
337
- profile: ReaderProfile | null;
338
- isRTL: boolean;
339
- isFXL: boolean;
340
- fontLanguage: string;
341
- hasDisplayTransformability: boolean;
342
- }
343
- declare const usePublication: ({ url, onError, fetcher: customFetcher }: UsePublicationOptions) => UsePublicationReturn;
344
-
345
- interface ReaderTransitions {
346
- isImmersive: boolean;
347
- isFullscreen: boolean;
348
- isScroll: boolean;
349
- hasUserNavigated: boolean;
350
- wasImmersive: boolean;
351
- wasFullscreen: boolean;
352
- wasScroll: boolean;
353
- wasUserNavigated: boolean;
354
- fromImmersive: boolean;
355
- toImmersive: boolean;
356
- fromFullscreen: boolean;
357
- toFullscreen: boolean;
358
- fromScroll: boolean;
359
- toScroll: boolean;
360
- fromUserNavigation: boolean;
361
- toUserNavigation: boolean;
362
- }
363
- declare const useReaderTransitions: () => ReaderTransitions;
364
-
365
- export { StatefulTextAlign as $, type StatefulNumberFieldProps as A, StatefulNumberField as B, type StatefulRadioGroupProps as C, StatefulRadioGroup as D, type StatefulSliderProps as E, StatefulSlider as F, type StatefulSwitchProps as G, StatefulSwitch as H, type useGridNavigationProps as I, useGridNavigation as J, useGridTemplate as K, type StatefulSettingsItemProps as L, StatefulLetterSpacing as M, StatefulLineHeight as N, StatefulParagraphIndent as O, StatefulParagraphSpacing as P, StatefulSpacingGroup as Q, StatefulSpacingGroupContainer as R, type StatefulActionsMapObject as S, type ThPlugin as T, StatefulSpacingPresets as U, StatefulWordSpacing as V, useLineHeight as W, useSpacingPresets as X, StatefulFontFamily as Y, UnstableStatefulFontWeight as Z, StatefulHyphens as _, usePublication as a, StatefulTextGroup as a0, StatefulTextGroupContainer as a1, StatefulTextNormalize as a2, StatefulPublisherStyles as a3, StatefulZoom as a4, type StatefulBottomSheetProps as a5, type ScrimPref as a6, StatefulBottomSheet as a7, type StatefulDockedSheetProps as a8, StatefulDockedSheet as a9, type StatefulFullScreenSheetProps as aa, StatefulFullScreenSheet as ab, type StatefulPopoverSheetProps as ac, StatefulPopoverSheet as ad, StatefulSheetWrapper as ae, type StatefulSheet as af, StatefulPreferencesProvider as ag, type PositionStorage as ah, type StatefulReaderProps as ai, type ThPluginFactory as aj, type ReaderPlugins as ak, type ReaderComponentProps as al, StatefulReaderWrapper as am, useReaderTransitions as b, type StatefulActionTriggerProps as c, type StatefulActionContainerProps as d, StatefulFullscreenTrigger as e, StatefulJumpToPositionContainer as f, StatefulJumpToPositionTrigger as g, StatefulSettingsContainer as h, StatefulSettingsTrigger as i, StatefulTocContainer as j, StatefulTocTrigger as k, type StatefulActionIconProps as l, StatefulActionIcon as m, type StatefulOverflowMenuItemProps as n, StatefulOverflowMenuItem as o, type StatefulCollapsibleActionsBarProps as p, StatefulCollapsibleActionsBar as q, type StatefulOverflowMenuProps as r, StatefulOverflowMenu as s, useDocking as t, useNavigator as u, createDefaultPlugin as v, type StatefulGroupWrapperProps as w, StatefulGroupWrapper as x, type StatefulDropdownProps as y, StatefulDropdown as z };
@@ -1,39 +0,0 @@
1
- import * as _readium_navigator from '@readium/navigator';
2
- import { WebPubNavigatorListeners, IWebPubPreferences, IWebPubDefaults, IInjectablesConfig, IContentProtectionConfig, WebPubSettings } from '@readium/navigator';
3
- import { Publication, Locator, Link } from '@readium/shared';
4
-
5
- type cbb = (ok: boolean) => void;
6
- interface WebPubNavigatorLoadProps {
7
- container: HTMLDivElement | null;
8
- publication: Publication;
9
- listeners: WebPubNavigatorListeners;
10
- initialPosition?: Locator;
11
- preferences?: IWebPubPreferences;
12
- defaults?: IWebPubDefaults;
13
- injectables?: IInjectablesConfig;
14
- contentProtection?: IContentProtectionConfig;
15
- }
16
- declare const useWebPubNavigator: () => {
17
- WebPubNavigatorLoad: (config: WebPubNavigatorLoadProps, cb: Function) => void;
18
- WebPubNavigatorDestroy: (cb: Function) => void;
19
- goRight: (animated: boolean, callback: cbb) => void;
20
- goLeft: (animated: boolean, callback: cbb) => void;
21
- goBackward: (animated: boolean, callback: cbb) => void;
22
- goForward: (animated: boolean, callback: cbb) => void;
23
- goLink: (link: Link, animated: boolean, callback: cbb) => void;
24
- go: (locator: Locator, animated: boolean, callback: cbb) => void;
25
- currentLocator: () => Locator | undefined;
26
- previousLocator: () => Locator | null | undefined;
27
- nextLocator: () => Locator | null | undefined;
28
- currentPositions: () => number[] | null | undefined;
29
- canGoBackward: () => boolean | undefined;
30
- canGoForward: () => boolean | undefined;
31
- isScrollStart: () => boolean | undefined;
32
- isScrollEnd: () => boolean | undefined;
33
- preferencesEditor: _readium_navigator.WebPubPreferencesEditor | undefined;
34
- getSetting: <K extends keyof WebPubSettings>(settingKey: K) => WebPubSettings[K];
35
- submitPreferences: (preferences: IWebPubPreferences) => Promise<void>;
36
- getCframes: () => (_readium_navigator.WebPubFrameManager | undefined)[] | undefined;
37
- };
38
-
39
- export { type WebPubNavigatorLoadProps as W, useWebPubNavigator as u };