@edrlab/thorium-web 1.2.0 → 1.3.0
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/{ThPreferencesAdapter-DrZ5_6Dv.d.mts → ThPreferencesAdapter-D0rzsGRl.d.mts} +50 -13
- package/dist/{ThSettingsWrapper-8Kx0SnH4.d.mts → ThSettingsWrapper-BXuRgdqp.d.mts} +42 -4
- package/dist/{actions-D2CHvCHu.d.mts → actions-BLAr0oaM.d.mts} +16 -4
- package/dist/{actionsReducer-kc-S130w.d.mts → actionsReducer-BhG1wicI.d.mts} +37 -12
- package/dist/chunk-3GDQP6AS.mjs +14 -0
- package/dist/chunk-3GDQP6AS.mjs.map +1 -0
- package/dist/{chunk-72XCX5TD.mjs → chunk-3LDWKC5N.mjs} +13 -8
- package/dist/chunk-3LDWKC5N.mjs.map +1 -0
- package/dist/{chunk-NYZBHYW2.mjs → chunk-4ODYHZKD.mjs} +343 -38
- package/dist/chunk-4ODYHZKD.mjs.map +1 -0
- package/dist/{chunk-34MVY33F.mjs → chunk-4TVEDX7L.mjs} +23 -32
- package/dist/chunk-4TVEDX7L.mjs.map +1 -0
- package/dist/chunk-7CGMWOZN.mjs +20 -0
- package/dist/chunk-7CGMWOZN.mjs.map +1 -0
- package/dist/{chunk-7NEQAW7J.mjs → chunk-C236BQQB.mjs} +656 -917
- package/dist/chunk-C236BQQB.mjs.map +1 -0
- package/dist/{chunk-H4J2VY7Z.mjs → chunk-D7MFLHXV.mjs} +2267 -1599
- package/dist/chunk-D7MFLHXV.mjs.map +1 -0
- package/dist/{chunk-47AIIJFO.mjs → chunk-ITDBOMY5.mjs} +3 -3
- package/dist/{chunk-47AIIJFO.mjs.map → chunk-ITDBOMY5.mjs.map} +1 -1
- package/dist/{chunk-XVSFXHYB.mjs → chunk-L4XGZAZ5.mjs} +23 -20
- package/dist/chunk-L4XGZAZ5.mjs.map +1 -0
- package/dist/chunk-OWHP7ONM.mjs +134 -0
- package/dist/chunk-OWHP7ONM.mjs.map +1 -0
- package/dist/{chunk-S4M7ED5Q.mjs → chunk-RRVLWDT3.mjs} +10 -7
- package/dist/chunk-RRVLWDT3.mjs.map +1 -0
- package/dist/chunk-T2E6MRVP.mjs +862 -0
- package/dist/chunk-T2E6MRVP.mjs.map +1 -0
- package/dist/chunk-TEZB4ULX.mjs +57 -0
- package/dist/chunk-TEZB4ULX.mjs.map +1 -0
- package/dist/chunk-UCTMVCW7.mjs +833 -0
- package/dist/chunk-UCTMVCW7.mjs.map +1 -0
- package/dist/chunk-WECWPYZB.mjs +1950 -0
- package/dist/chunk-WECWPYZB.mjs.map +1 -0
- package/dist/{chunk-4VHEHMJN.mjs → chunk-XBZWGRDM.mjs} +228 -94
- package/dist/chunk-XBZWGRDM.mjs.map +1 -0
- package/dist/{chunk-K3K7TUWM.mjs → chunk-YZ3KCMKY.mjs} +237 -83
- package/dist/chunk-YZ3KCMKY.mjs.map +1 -0
- package/dist/components/Audio/index.css +1858 -0
- package/dist/components/Audio/index.css.map +1 -0
- package/dist/components/Audio/index.d.mts +103 -0
- package/dist/components/Audio/index.mjs +23 -0
- package/dist/components/Audio/index.mjs.map +1 -0
- package/dist/components/Epub/index.css +372 -9
- package/dist/components/Epub/index.css.map +1 -1
- package/dist/components/Epub/index.d.mts +17 -19
- package/dist/components/Epub/index.mjs +15 -10
- package/dist/components/Misc/index.css +5 -2
- package/dist/components/Misc/index.css.map +1 -1
- package/dist/components/Misc/index.mjs +4 -132
- package/dist/components/Misc/index.mjs.map +1 -1
- package/dist/components/Reader/index.css +1030 -184
- package/dist/components/Reader/index.css.map +1 -1
- package/dist/components/Reader/index.d.mts +16 -16
- package/dist/components/Reader/index.mjs +121 -22
- package/dist/components/Reader/index.mjs.map +1 -1
- package/dist/components/WebPub/index.css +372 -9
- package/dist/components/WebPub/index.css.map +1 -1
- package/dist/components/WebPub/index.d.mts +16 -16
- package/dist/components/WebPub/index.mjs +15 -10
- package/dist/core/Components/index.d.mts +64 -15
- package/dist/core/Components/index.mjs +2 -1
- package/dist/core/Helpers/index.d.mts +2 -2
- package/dist/core/Helpers/index.mjs +4 -2
- package/dist/core/Hooks/index.d.mts +7 -8
- package/dist/core/Hooks/index.mjs +3 -1
- package/dist/i18n/index.mjs +4 -5
- package/dist/lib/index.d.mts +159 -15
- package/dist/lib/index.mjs +4 -2
- package/dist/lib-M3PPQDJJ.mjs +6548 -0
- package/dist/lib-M3PPQDJJ.mjs.map +1 -0
- package/dist/locales/en/thorium-shared.json +84 -0
- package/dist/locales/en/thorium-web.json +22 -0
- package/dist/locales/et/thorium-shared.json +93 -2
- package/dist/locales/fi/thorium-shared.json +68 -0
- package/dist/next-lib/index.mjs +2 -0
- package/dist/next-lib/index.mjs.map +1 -1
- package/dist/preferences/index.d.mts +111 -13
- package/dist/preferences/index.mjs +6 -3
- package/dist/{settingsReducer-C1wwCAMv.d.mts → settingsReducer-Bu1zeveu.d.mts} +1 -1
- package/dist/{ui-CamWuqOo.d.mts → ui-nBv8gfr0.d.mts} +20 -1
- package/dist/useAudioNavigator-C5aW4-eT.d.mts +133 -0
- package/dist/{useContrast-D6sjPjxy.d.mts → useContrast-2t429O9O.d.mts} +16 -8
- package/dist/usePreferences-VaBf46eP.d.mts +230 -0
- package/dist/useReaderTransitions-JDzlBFsu.d.mts +530 -0
- package/dist/{useTimeline-DyMx_aWY.d.mts → useTimeline-DCZ1qoCO.d.mts} +4 -2
- package/package.json +15 -11
- package/dist/chunk-34MVY33F.mjs.map +0 -1
- package/dist/chunk-4VHEHMJN.mjs.map +0 -1
- package/dist/chunk-72XCX5TD.mjs.map +0 -1
- package/dist/chunk-7NEQAW7J.mjs.map +0 -1
- package/dist/chunk-H4J2VY7Z.mjs.map +0 -1
- package/dist/chunk-K3K7TUWM.mjs.map +0 -1
- package/dist/chunk-NYZBHYW2.mjs.map +0 -1
- package/dist/chunk-S4M7ED5Q.mjs.map +0 -1
- package/dist/chunk-XVSFXHYB.mjs.map +0 -1
- package/dist/useEpubNavigator-CwHJfoiV.d.mts +0 -42
- package/dist/usePreferences-BXFJbval.d.mts +0 -43
- package/dist/useReaderTransitions-guT-eA-Q.d.mts +0 -365
- package/dist/useWebPubNavigator-Che8r5Wg.d.mts +0 -39
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React__default, { RefObject, ReactNode } from 'react';
|
|
3
|
+
import { t as ThActionsTriggerVariant, a as ThSheetHeaderVariant, s as ThCollapsibilityVisibility, h as ThActionEntry, g as ThActionsKeys, T as ThDockingKeys, e as ThSheetTypes } from './actions-BLAr0oaM.mjs';
|
|
4
|
+
import { TooltipProps, Heading, HeadingProps, PopoverProps } from 'react-aria-components';
|
|
5
|
+
import { T as ThActionButtonProps, f as ThMenuItemProps, a as ThCollapsibleActionsBarProps, v as ThSettingsEntry, W as WithRef, t as ThDropdownProps, h as ThNumberFieldProps, k as ThRadioGroupProps, m as ThSliderProps, o as ThSliderWithPresetsProps, q as ThSwitchProps } from './ThSettingsWrapper-BXuRgdqp.mjs';
|
|
6
|
+
import { h as ThTextSettingsKeys, b as ThSpacingSettingsKeys, j as ThSettingsGroupPref, a as ThSpacingPresetKeys, T as ThLineHeightOptions } from './useContrast-2t429O9O.mjs';
|
|
7
|
+
import { PressEvent } from 'react-aria';
|
|
8
|
+
import { A as ActionsStateKeys } from './actionsReducer-BhG1wicI.mjs';
|
|
9
|
+
import { d as ThPreferences, D as DefaultKeys, C as CustomizableKeys, c as ThPreferencesAdapter } from './ThPreferencesAdapter-D0rzsGRl.mjs';
|
|
10
|
+
import * as _readium_navigator from '@readium/navigator';
|
|
11
|
+
import { EpubSettings, WebPubSettings, FXLFrameManager, FrameManager, WebPubFrameManager } from '@readium/navigator';
|
|
12
|
+
import * as _readium_shared from '@readium/shared';
|
|
13
|
+
import { Locator, Link, Publication, Fetcher } from '@readium/shared';
|
|
14
|
+
import { E as EpubNavigatorLoadProps, W as WebPubNavigatorLoadProps, A as AudioNavigatorLoadProps, c as AudioSettings, a as useEpubNavigator, b as useWebPubNavigator, u as useAudioNavigator } from './useAudioNavigator-C5aW4-eT.mjs';
|
|
15
|
+
import { a as ThAudioPreferences, c as ThAudioPreferencesAdapter } from './usePreferences-VaBf46eP.mjs';
|
|
16
|
+
import { InitOptions } from 'i18next';
|
|
17
|
+
import { ReaderProfile } from './lib/index.mjs';
|
|
18
|
+
import { P as ProcessedError } from './errorHandler-CL2YIfQY.mjs';
|
|
19
|
+
|
|
20
|
+
interface StatefulActionsMapObject {
|
|
21
|
+
Trigger: React.ComponentType<StatefulActionTriggerProps>;
|
|
22
|
+
Target?: React.ComponentType<StatefulActionContainerProps>;
|
|
23
|
+
}
|
|
24
|
+
interface StatefulActionTriggerProps {
|
|
25
|
+
variant: ThActionsTriggerVariant;
|
|
26
|
+
associatedKey?: ActionsStateKeys;
|
|
27
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
28
|
+
}
|
|
29
|
+
interface StatefulActionContainerProps {
|
|
30
|
+
triggerRef: RefObject<HTMLElement | null>;
|
|
31
|
+
placement?: "top" | "bottom";
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare const StatefulFullscreenTrigger: ({ variant }: StatefulActionTriggerProps) => react_jsx_runtime.JSX.Element | null;
|
|
35
|
+
|
|
36
|
+
declare const StatefulJumpToPositionContainer: ({ triggerRef }: StatefulActionContainerProps) => react_jsx_runtime.JSX.Element | null;
|
|
37
|
+
|
|
38
|
+
declare const StatefulJumpToPositionTrigger: ({ variant }: StatefulActionTriggerProps) => react_jsx_runtime.JSX.Element | null;
|
|
39
|
+
|
|
40
|
+
interface StatefulSettingsWrapperProps extends StatefulActionContainerProps {
|
|
41
|
+
heading: string;
|
|
42
|
+
headerVariant: ThSheetHeaderVariant;
|
|
43
|
+
onClosePress: () => void;
|
|
44
|
+
dismissEscapeKeyClose?: boolean;
|
|
45
|
+
resetFocus?: unknown;
|
|
46
|
+
onReset?: () => void;
|
|
47
|
+
children: ReactNode;
|
|
48
|
+
}
|
|
49
|
+
declare const StatefulSettingsWrapper: ({ triggerRef, heading, headerVariant, onClosePress, dismissEscapeKeyClose, resetFocus, onReset, children }: StatefulSettingsWrapperProps) => react_jsx_runtime.JSX.Element;
|
|
50
|
+
|
|
51
|
+
declare const StatefulAudioSettingsContainer: ({ triggerRef }: StatefulActionContainerProps) => react_jsx_runtime.JSX.Element;
|
|
52
|
+
|
|
53
|
+
declare const StatefulVisualSettingsContainer: ({ triggerRef }: StatefulActionContainerProps) => react_jsx_runtime.JSX.Element;
|
|
54
|
+
|
|
55
|
+
declare const StatefulSettingsTrigger: ({ variant }: StatefulActionTriggerProps) => react_jsx_runtime.JSX.Element;
|
|
56
|
+
|
|
57
|
+
declare const StatefulTocContainer: ({ triggerRef }: StatefulActionContainerProps) => react_jsx_runtime.JSX.Element;
|
|
58
|
+
|
|
59
|
+
declare const StatefulTocTrigger: ({ variant }: StatefulActionTriggerProps) => react_jsx_runtime.JSX.Element;
|
|
60
|
+
|
|
61
|
+
interface StatefulActionIconProps extends ThActionButtonProps {
|
|
62
|
+
visibility?: ThCollapsibilityVisibility;
|
|
63
|
+
placement?: TooltipProps["placement"];
|
|
64
|
+
tooltipLabel?: string;
|
|
65
|
+
}
|
|
66
|
+
declare const StatefulActionIcon: ({ ref: externalRef, visibility, placement, tooltipLabel, children, ...props }: StatefulActionIconProps) => react_jsx_runtime.JSX.Element;
|
|
67
|
+
|
|
68
|
+
interface StatefulOverflowMenuItemProps extends Omit<ThMenuItemProps, "shortcut"> {
|
|
69
|
+
shortcut?: string | null;
|
|
70
|
+
}
|
|
71
|
+
declare const StatefulOverflowMenuItem: ({ id, label, SVGIcon, shortcut, ...props }: StatefulOverflowMenuItemProps) => react_jsx_runtime.JSX.Element;
|
|
72
|
+
|
|
73
|
+
interface StatefulCollapsibleActionsBarProps extends ThCollapsibleActionsBarProps {
|
|
74
|
+
items: ThActionEntry<string | ThActionsKeys | ThDockingKeys>[];
|
|
75
|
+
overflowMenuClassName?: string;
|
|
76
|
+
}
|
|
77
|
+
declare const StatefulCollapsibleActionsBar: ({ id, items, overflowMenuClassName, ...props }: StatefulCollapsibleActionsBarProps) => react_jsx_runtime.JSX.Element;
|
|
78
|
+
|
|
79
|
+
interface StatefulOverflowMenuProps {
|
|
80
|
+
id: string;
|
|
81
|
+
items: ThActionEntry<string | ThActionsKeys | ThDockingKeys>[];
|
|
82
|
+
triggerRef: RefObject<HTMLElement | null>;
|
|
83
|
+
className?: string;
|
|
84
|
+
children?: ReactNode;
|
|
85
|
+
}
|
|
86
|
+
declare const StatefulOverflowMenu: ({ id, className, items, triggerRef }: StatefulOverflowMenuProps) => react_jsx_runtime.JSX.Element | undefined;
|
|
87
|
+
|
|
88
|
+
declare const useDocking: <T extends string>(key: T) => {
|
|
89
|
+
getDocker: () => ThDockingKeys[];
|
|
90
|
+
sheetType: ThSheetTypes;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
type ActionComponent = StatefulActionsMapObject;
|
|
94
|
+
interface SettingComponent extends ThSettingsEntry {
|
|
95
|
+
type?: "text" | "spacing";
|
|
96
|
+
props?: any;
|
|
97
|
+
}
|
|
98
|
+
interface ThPlugin {
|
|
99
|
+
id: string;
|
|
100
|
+
name: string;
|
|
101
|
+
description?: string;
|
|
102
|
+
version?: string;
|
|
103
|
+
components: {
|
|
104
|
+
actions?: Record<string, ActionComponent>;
|
|
105
|
+
settings?: Record<string, SettingComponent>;
|
|
106
|
+
primaryAudioActions?: Record<string, ActionComponent>;
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
declare const createDefaultPlugin: () => ThPlugin;
|
|
111
|
+
|
|
112
|
+
declare const createAudioDefaultPlugin: () => ThPlugin;
|
|
113
|
+
|
|
114
|
+
interface StatefulGroupWrapperProps<T extends string = ThTextSettingsKeys | ThSpacingSettingsKeys> {
|
|
115
|
+
label: string;
|
|
116
|
+
moreLabel: string;
|
|
117
|
+
moreTooltip: string;
|
|
118
|
+
onPressMore: (e: PressEvent) => void;
|
|
119
|
+
componentsMap: Record<string, SettingComponent>;
|
|
120
|
+
prefs?: ThSettingsGroupPref<T>;
|
|
121
|
+
defaultPrefs: {
|
|
122
|
+
main: T[];
|
|
123
|
+
subPanel: T[];
|
|
124
|
+
};
|
|
125
|
+
isDisabled?: boolean;
|
|
126
|
+
compounds?: {
|
|
127
|
+
/**
|
|
128
|
+
* Custom heading. Can be either:
|
|
129
|
+
* - A React element that will be rendered directly
|
|
130
|
+
* - Props that will be spread onto the default Heading component
|
|
131
|
+
*/
|
|
132
|
+
heading?: React.ReactElement<typeof Heading> | WithRef<HeadingProps, HTMLHeadingElement>;
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
declare const StatefulGroupWrapper: <T extends string = ThTextSettingsKeys | ThSpacingSettingsKeys>({ label, moreLabel, moreTooltip, onPressMore, componentsMap, prefs, defaultPrefs, isDisabled, compounds }: StatefulGroupWrapperProps<T>) => react_jsx_runtime.JSX.Element;
|
|
136
|
+
|
|
137
|
+
interface StatefulDropdownProps extends Omit<ThDropdownProps, "classNames"> {
|
|
138
|
+
standalone?: boolean;
|
|
139
|
+
}
|
|
140
|
+
declare const StatefulDropdown: ({ standalone, label, className, compounds, ...props }: StatefulDropdownProps) => react_jsx_runtime.JSX.Element;
|
|
141
|
+
|
|
142
|
+
interface StatefulNumberFieldProps extends Omit<ThNumberFieldProps, "classNames"> {
|
|
143
|
+
standalone?: boolean;
|
|
144
|
+
resetLabel?: string;
|
|
145
|
+
placeholder?: string;
|
|
146
|
+
}
|
|
147
|
+
declare const StatefulNumberField: ({ standalone, label, placeholder, value, resetLabel, ...props }: StatefulNumberFieldProps) => react_jsx_runtime.JSX.Element;
|
|
148
|
+
|
|
149
|
+
interface StatefulRadioGroupProps extends Omit<ThRadioGroupProps, "classNames"> {
|
|
150
|
+
standalone?: boolean;
|
|
151
|
+
useGraphicalNavigation?: boolean;
|
|
152
|
+
onEscape?: () => void;
|
|
153
|
+
}
|
|
154
|
+
declare const StatefulRadioGroup: ({ ref, standalone, useGraphicalNavigation, label, items, value, children, onChange, onEscape, ...props }: StatefulRadioGroupProps) => react_jsx_runtime.JSX.Element;
|
|
155
|
+
|
|
156
|
+
interface StatefulSliderProps extends Omit<ThSliderProps, "classNames"> {
|
|
157
|
+
standalone?: boolean;
|
|
158
|
+
placeholder?: string;
|
|
159
|
+
resetLabel?: string;
|
|
160
|
+
displayTicks?: boolean;
|
|
161
|
+
}
|
|
162
|
+
declare const StatefulSlider: ({ standalone, label, placeholder, displayTicks, value, resetLabel, ...props }: StatefulSliderProps) => react_jsx_runtime.JSX.Element;
|
|
163
|
+
|
|
164
|
+
interface StatefulSliderWithPresetsProps extends Omit<ThSliderWithPresetsProps, "compounds"> {
|
|
165
|
+
standalone?: boolean;
|
|
166
|
+
placeholder?: string;
|
|
167
|
+
resetLabel?: string;
|
|
168
|
+
displayTicks?: boolean;
|
|
169
|
+
hideOutput?: boolean;
|
|
170
|
+
onEscape?: () => void;
|
|
171
|
+
}
|
|
172
|
+
declare const StatefulSliderWithPresets: ({ standalone, label, placeholder, displayTicks, hideOutput, value, resetLabel, presets, formatValue, onEscape, ...props }: StatefulSliderWithPresetsProps) => react_jsx_runtime.JSX.Element;
|
|
173
|
+
|
|
174
|
+
interface StatefulSwitchProps extends Omit<ThSwitchProps, "classNames"> {
|
|
175
|
+
standalone?: boolean;
|
|
176
|
+
}
|
|
177
|
+
declare const StatefulSwitch: ({ standalone, label, heading, ...props }: StatefulSwitchProps) => react_jsx_runtime.JSX.Element;
|
|
178
|
+
|
|
179
|
+
interface EffectiveRangeResult {
|
|
180
|
+
range: [number, number];
|
|
181
|
+
presets?: number[];
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Returns the effective range and presets to use for a range setting, clamped
|
|
185
|
+
* to the navigator's supported range when provided. Falls back to the preferred
|
|
186
|
+
* range if it fits within the supported range, otherwise uses the supported
|
|
187
|
+
* range directly. Presets outside the effective range are filtered out.
|
|
188
|
+
*/
|
|
189
|
+
declare const useEffectiveRange: (preferred: [number, number], supportedRange: [number, number] | undefined, presets?: number[]) => EffectiveRangeResult;
|
|
190
|
+
|
|
191
|
+
interface useGridNavigationProps {
|
|
192
|
+
containerRef: React__default.RefObject<HTMLDivElement | null>;
|
|
193
|
+
items: React__default.RefObject<any[]>;
|
|
194
|
+
currentValue: any;
|
|
195
|
+
onChange: (value: any) => void;
|
|
196
|
+
isRTL?: boolean;
|
|
197
|
+
onEscape?: () => void;
|
|
198
|
+
onFocus?: (value: string) => void;
|
|
199
|
+
}
|
|
200
|
+
declare const useGridNavigation: ({ containerRef, items, currentValue, onChange, isRTL, onEscape, onFocus }: useGridNavigationProps) => {
|
|
201
|
+
onKeyDown: (e: React__default.KeyboardEvent) => void;
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
declare const useGridTemplate: (ref: React.RefObject<HTMLDivElement | null>, type?: "columns" | "rows") => number | null;
|
|
205
|
+
|
|
206
|
+
interface StatefulSettingsItemProps {
|
|
207
|
+
standalone?: boolean;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
declare const StatefulLetterSpacing: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
|
|
211
|
+
|
|
212
|
+
declare const StatefulLineHeight: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
|
|
213
|
+
|
|
214
|
+
declare const StatefulParagraphIndent: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
|
|
215
|
+
|
|
216
|
+
declare const StatefulParagraphSpacing: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
|
|
217
|
+
|
|
218
|
+
declare const StatefulSpacingGroup: () => react_jsx_runtime.JSX.Element;
|
|
219
|
+
declare const StatefulSpacingGroupContainer: () => react_jsx_runtime.JSX.Element;
|
|
220
|
+
|
|
221
|
+
declare const StatefulSpacingPresets: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element | null;
|
|
222
|
+
|
|
223
|
+
declare const StatefulWordSpacing: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Hook that returns a mapping of line height options to their actual numeric values
|
|
227
|
+
* This eliminates code duplication across spacing components
|
|
228
|
+
*/
|
|
229
|
+
declare const useLineHeight: () => {
|
|
230
|
+
publisher: null;
|
|
231
|
+
small: any;
|
|
232
|
+
medium: any;
|
|
233
|
+
large: any;
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Hook to determine if preset system should be active
|
|
238
|
+
* Only active when component is both registered AND displayed
|
|
239
|
+
* This allows us to correctly handle overrides for presets,
|
|
240
|
+
* and states for spacing components
|
|
241
|
+
*/
|
|
242
|
+
declare const useSpacingPresets: () => {
|
|
243
|
+
currentPreset: ThSpacingPresetKeys;
|
|
244
|
+
getPresetValues: (presetKey: ThSpacingPresetKeys) => {
|
|
245
|
+
letterSpacing: any;
|
|
246
|
+
lineHeight: any;
|
|
247
|
+
paragraphIndent: any;
|
|
248
|
+
paragraphSpacing: any;
|
|
249
|
+
wordSpacing: any;
|
|
250
|
+
};
|
|
251
|
+
getEffectiveSpacingValue: {
|
|
252
|
+
(key: ThSpacingSettingsKeys.letterSpacing): number | null;
|
|
253
|
+
(key: ThSpacingSettingsKeys.lineHeight): ThLineHeightOptions | null;
|
|
254
|
+
(key: ThSpacingSettingsKeys.paragraphIndent): number | null;
|
|
255
|
+
(key: ThSpacingSettingsKeys.paragraphSpacing): number | null;
|
|
256
|
+
(key: ThSpacingSettingsKeys.wordSpacing): number | null;
|
|
257
|
+
};
|
|
258
|
+
getSpacingResetValue: {
|
|
259
|
+
(key: ThSpacingSettingsKeys.letterSpacing): number | null;
|
|
260
|
+
(key: ThSpacingSettingsKeys.lineHeight): ThLineHeightOptions | null;
|
|
261
|
+
(key: ThSpacingSettingsKeys.paragraphIndent): number | null;
|
|
262
|
+
(key: ThSpacingSettingsKeys.paragraphSpacing): number | null;
|
|
263
|
+
(key: ThSpacingSettingsKeys.wordSpacing): number | null;
|
|
264
|
+
};
|
|
265
|
+
canBeReset: (key: ThSpacingSettingsKeys) => boolean;
|
|
266
|
+
setLetterSpacing: (value: number | null) => void;
|
|
267
|
+
setLineHeight: (value: ThLineHeightOptions) => void;
|
|
268
|
+
setParagraphIndent: (value: number | null) => void;
|
|
269
|
+
setParagraphSpacing: (value: number | null) => void;
|
|
270
|
+
setWordSpacing: (value: number | null) => void;
|
|
271
|
+
setPublisherStyles: (value: boolean) => void;
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
declare const StatefulFontFamily: ({ standalone }: StatefulSettingsItemProps & {
|
|
275
|
+
publicationLanguage?: string;
|
|
276
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
277
|
+
|
|
278
|
+
declare const UnstableStatefulFontWeight: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
|
|
279
|
+
|
|
280
|
+
declare const StatefulHyphens: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
|
|
281
|
+
|
|
282
|
+
declare const StatefulTextAlign: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
|
|
283
|
+
|
|
284
|
+
declare const StatefulTextGroup: () => react_jsx_runtime.JSX.Element;
|
|
285
|
+
declare const StatefulTextGroupContainer: () => react_jsx_runtime.JSX.Element;
|
|
286
|
+
|
|
287
|
+
declare const StatefulTextNormalize: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
|
|
288
|
+
|
|
289
|
+
declare const StatefulPublisherStyles: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
|
|
290
|
+
|
|
291
|
+
declare const StatefulTheme: () => react_jsx_runtime.JSX.Element;
|
|
292
|
+
|
|
293
|
+
declare const StatefulZoom: () => react_jsx_runtime.JSX.Element;
|
|
294
|
+
|
|
295
|
+
interface StatefulSheet {
|
|
296
|
+
id: ActionsStateKeys;
|
|
297
|
+
triggerRef: RefObject<HTMLElement | null>;
|
|
298
|
+
heading: string;
|
|
299
|
+
headerVariant?: ThSheetHeaderVariant;
|
|
300
|
+
className?: string;
|
|
301
|
+
underlayClassName?: string;
|
|
302
|
+
headerClassName?: string;
|
|
303
|
+
isOpen: boolean;
|
|
304
|
+
onOpenChange: (isOpen: boolean) => void;
|
|
305
|
+
onClosePress: () => void;
|
|
306
|
+
docker?: ThDockingKeys[];
|
|
307
|
+
children?: ReactNode;
|
|
308
|
+
resetFocus?: unknown;
|
|
309
|
+
focusWithinRef?: RefObject<HTMLElement | null>;
|
|
310
|
+
focusSelector?: string;
|
|
311
|
+
scrollTopOnFocus?: boolean;
|
|
312
|
+
dismissEscapeKeyClose?: boolean;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
interface StatefulBottomSheetProps extends StatefulSheet {
|
|
316
|
+
}
|
|
317
|
+
interface ScrimPref {
|
|
318
|
+
active: boolean;
|
|
319
|
+
override?: string;
|
|
320
|
+
}
|
|
321
|
+
declare const StatefulBottomSheet: ({ id, heading, headerVariant, className, isOpen, onOpenChange, onClosePress, children, resetFocus, focusWithinRef, focusSelector, scrollTopOnFocus, dismissEscapeKeyClose }: StatefulBottomSheetProps) => react_jsx_runtime.JSX.Element | undefined;
|
|
322
|
+
|
|
323
|
+
interface StatefulCompactPopoverSheetProps extends StatefulSheet {
|
|
324
|
+
placement?: PopoverProps["placement"];
|
|
325
|
+
}
|
|
326
|
+
declare const StatefulCompactPopoverSheet: ({ id, triggerRef, heading, className, isOpen, onOpenChange, placement, children, resetFocus, focusWithinRef, focusSelector, scrollTopOnFocus, dismissEscapeKeyClose }: StatefulCompactPopoverSheetProps) => react_jsx_runtime.JSX.Element | undefined;
|
|
327
|
+
|
|
328
|
+
interface StatefulDockedSheetProps extends StatefulSheet {
|
|
329
|
+
flow: ThDockingKeys.start | ThDockingKeys.end | null;
|
|
330
|
+
}
|
|
331
|
+
declare const StatefulDockedSheet: ({ id, heading, headerVariant, className, isOpen, onClosePress, docker, flow, children, resetFocus, focusSelector, focusWithinRef, scrollTopOnFocus }: StatefulDockedSheetProps) => react_jsx_runtime.JSX.Element | undefined;
|
|
332
|
+
|
|
333
|
+
interface StatefulFullScreenSheetProps extends StatefulSheet {
|
|
334
|
+
}
|
|
335
|
+
declare const StatefulFullScreenSheet: (props: StatefulFullScreenSheetProps) => react_jsx_runtime.JSX.Element;
|
|
336
|
+
|
|
337
|
+
interface StatefulModalSheetProps extends StatefulSheet {
|
|
338
|
+
}
|
|
339
|
+
declare const StatefulModalSheet: (props: StatefulModalSheetProps) => react_jsx_runtime.JSX.Element;
|
|
340
|
+
|
|
341
|
+
interface StatefulPopoverSheetProps extends StatefulSheet {
|
|
342
|
+
placement?: PopoverProps["placement"];
|
|
343
|
+
}
|
|
344
|
+
declare const StatefulPopoverSheet: ({ id, triggerRef, heading, headerVariant, className, headerClassName, isOpen, onOpenChange, onClosePress, placement, docker, children, resetFocus, focusWithinRef, focusSelector, scrollTopOnFocus, dismissEscapeKeyClose }: StatefulPopoverSheetProps) => react_jsx_runtime.JSX.Element | undefined;
|
|
345
|
+
|
|
346
|
+
interface StatefulModalBaseProps extends StatefulSheet {
|
|
347
|
+
sheetClassName: string;
|
|
348
|
+
dialogClassName?: string;
|
|
349
|
+
}
|
|
350
|
+
declare const StatefulModalBase: ({ id, heading, headerVariant, className, sheetClassName, dialogClassName, isOpen, onOpenChange, onClosePress, docker, children, resetFocus, focusWithinRef, focusSelector, scrollTopOnFocus, dismissEscapeKeyClose }: StatefulModalBaseProps) => react_jsx_runtime.JSX.Element | undefined;
|
|
351
|
+
|
|
352
|
+
declare const StatefulSheetWrapper: ({ sheetType, sheetProps, children }: {
|
|
353
|
+
sheetType: ThSheetTypes;
|
|
354
|
+
sheetProps: StatefulPopoverSheetProps | StatefulModalSheetProps | StatefulFullScreenSheetProps | StatefulDockedSheetProps | StatefulBottomSheetProps;
|
|
355
|
+
children: ReactNode;
|
|
356
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
357
|
+
|
|
358
|
+
declare const StatefulPreferencesProvider: ({ children, initialPreferences }: {
|
|
359
|
+
children: ReactNode;
|
|
360
|
+
initialPreferences?: ThPreferences<DefaultKeys>;
|
|
361
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
362
|
+
|
|
363
|
+
type VisualNavigator = ReturnType<typeof useEpubNavigator> | ReturnType<typeof useWebPubNavigator>;
|
|
364
|
+
type MediaNavigator = ReturnType<typeof useAudioNavigator>;
|
|
365
|
+
type AllVisualSettings = EpubSettings & WebPubSettings;
|
|
366
|
+
type NavigationCallback = (ok: boolean) => void;
|
|
367
|
+
interface UnifiedNavigator {
|
|
368
|
+
go(locator: Locator, animated: boolean, callback: NavigationCallback): void;
|
|
369
|
+
goLink(link: Link, animated: boolean, callback: NavigationCallback): void;
|
|
370
|
+
currentLocator(): Locator | undefined;
|
|
371
|
+
previousLocator(): Locator | null;
|
|
372
|
+
nextLocator(): Locator | null;
|
|
373
|
+
goForward(animated: boolean, callback: NavigationCallback): void;
|
|
374
|
+
goBackward(animated: boolean, callback: NavigationCallback): void;
|
|
375
|
+
isVisual(): boolean;
|
|
376
|
+
getCframes?(): (FXLFrameManager | FrameManager | WebPubFrameManager | undefined)[] | undefined;
|
|
377
|
+
underlying: VisualNavigator | MediaNavigator;
|
|
378
|
+
}
|
|
379
|
+
declare const useNavigator: () => {
|
|
380
|
+
readonly visual: {
|
|
381
|
+
getSetting: <K extends keyof AllVisualSettings>(settingKey: K) => AllVisualSettings[K];
|
|
382
|
+
EpubNavigatorLoad: (config: EpubNavigatorLoadProps, cb: Function, fxlCallback?: (locator: Locator) => void) => void;
|
|
383
|
+
EpubNavigatorDestroy: (cb: Function) => void;
|
|
384
|
+
goRight: (animated: boolean, callback: (ok: boolean) => void) => void;
|
|
385
|
+
goLeft: (animated: boolean, callback: (ok: boolean) => void) => void;
|
|
386
|
+
goBackward: (animated: boolean, callback: (ok: boolean) => void) => void;
|
|
387
|
+
goForward: (animated: boolean, callback: (ok: boolean) => void) => void;
|
|
388
|
+
goLink: (link: Link, animated: boolean, callback: (ok: boolean) => void) => void;
|
|
389
|
+
go: (locator: Locator, animated: boolean, callback: (ok: boolean) => void) => void;
|
|
390
|
+
navLayout: () => _readium_shared.Layout | undefined;
|
|
391
|
+
currentLocator: () => Locator | undefined;
|
|
392
|
+
previousLocator: () => Locator | null | undefined;
|
|
393
|
+
nextLocator: () => Locator | null | undefined;
|
|
394
|
+
currentPositions: () => number[] | null | undefined;
|
|
395
|
+
canGoBackward: () => boolean | undefined;
|
|
396
|
+
canGoForward: () => boolean | undefined;
|
|
397
|
+
isScrollStart: () => boolean | undefined;
|
|
398
|
+
isScrollEnd: () => boolean | undefined;
|
|
399
|
+
preferencesEditor: _readium_navigator.EpubPreferencesEditor | undefined;
|
|
400
|
+
submitPreferences: (preferences: _readium_navigator.IEpubPreferences) => Promise<void>;
|
|
401
|
+
getCframes: () => (FXLFrameManager | FrameManager | undefined)[] | undefined;
|
|
402
|
+
onFXLPositionChange: (cb: (locator: Locator) => void) => void;
|
|
403
|
+
} | {
|
|
404
|
+
getSetting: <K extends keyof AllVisualSettings>(settingKey: K) => AllVisualSettings[K];
|
|
405
|
+
WebPubNavigatorLoad: (config: WebPubNavigatorLoadProps, cb: Function) => void;
|
|
406
|
+
WebPubNavigatorDestroy: (cb: Function) => void;
|
|
407
|
+
goRight: (animated: boolean, callback: (ok: boolean) => void) => void;
|
|
408
|
+
goLeft: (animated: boolean, callback: (ok: boolean) => void) => void;
|
|
409
|
+
goBackward: (animated: boolean, callback: (ok: boolean) => void) => void;
|
|
410
|
+
goForward: (animated: boolean, callback: (ok: boolean) => void) => void;
|
|
411
|
+
goLink: (link: Link, animated: boolean, callback: (ok: boolean) => void) => void;
|
|
412
|
+
go: (locator: Locator, animated: boolean, callback: (ok: boolean) => void) => void;
|
|
413
|
+
currentLocator: () => Locator | undefined;
|
|
414
|
+
previousLocator: () => Locator | null | undefined;
|
|
415
|
+
nextLocator: () => Locator | null | undefined;
|
|
416
|
+
currentPositions: () => number[] | null | undefined;
|
|
417
|
+
canGoBackward: () => boolean | undefined;
|
|
418
|
+
canGoForward: () => boolean | undefined;
|
|
419
|
+
isScrollStart: () => boolean | undefined;
|
|
420
|
+
isScrollEnd: () => boolean | undefined;
|
|
421
|
+
preferencesEditor: _readium_navigator.WebPubPreferencesEditor | undefined;
|
|
422
|
+
submitPreferences: (preferences: _readium_navigator.IWebPubPreferences) => Promise<void>;
|
|
423
|
+
getCframes: () => (WebPubFrameManager | undefined)[] | undefined;
|
|
424
|
+
};
|
|
425
|
+
readonly media: {
|
|
426
|
+
AudioNavigatorLoad: (config: AudioNavigatorLoadProps, cb: Function) => void;
|
|
427
|
+
AudioNavigatorDestroy: (cb: Function) => void;
|
|
428
|
+
play: () => void;
|
|
429
|
+
pause: () => void;
|
|
430
|
+
stop: () => void;
|
|
431
|
+
seek: (time: number) => void;
|
|
432
|
+
jump: (seconds: number) => void;
|
|
433
|
+
skipForward: () => void;
|
|
434
|
+
skipBackward: () => void;
|
|
435
|
+
go: (locator: Locator, animated: boolean, callback: (ok: boolean) => void) => void;
|
|
436
|
+
goLink: (link: Link, animated: boolean, callback: (ok: boolean) => void) => void;
|
|
437
|
+
goForward: (animated: boolean, callback: (ok: boolean) => void) => void;
|
|
438
|
+
goBackward: (animated: boolean, callback: (ok: boolean) => void) => void;
|
|
439
|
+
currentLocator: () => Locator | undefined;
|
|
440
|
+
canGoBackward: () => boolean;
|
|
441
|
+
canGoForward: () => boolean;
|
|
442
|
+
isTrackStart: () => boolean;
|
|
443
|
+
isTrackEnd: () => boolean;
|
|
444
|
+
isPlaying: () => boolean;
|
|
445
|
+
isPaused: () => boolean;
|
|
446
|
+
duration: () => number;
|
|
447
|
+
currentTime: () => number;
|
|
448
|
+
preferencesEditor: _readium_navigator.AudioPreferencesEditor | undefined;
|
|
449
|
+
remotePlayback: RemotePlayback | undefined;
|
|
450
|
+
getSetting: <K extends keyof AudioSettings>(settingKey: K) => number | boolean | undefined;
|
|
451
|
+
submitPreferences: (preferences: _readium_navigator.IAudioPreferences) => Promise<void>;
|
|
452
|
+
timeline: () => _readium_shared.Timeline | undefined;
|
|
453
|
+
};
|
|
454
|
+
readonly unified: UnifiedNavigator;
|
|
455
|
+
};
|
|
456
|
+
|
|
457
|
+
interface PositionStorage {
|
|
458
|
+
get: () => Locator | undefined;
|
|
459
|
+
set: (locator: Locator) => void | Promise<void>;
|
|
460
|
+
}
|
|
461
|
+
interface StatefulReaderProps {
|
|
462
|
+
publication: Publication;
|
|
463
|
+
localDataKey: string | null;
|
|
464
|
+
plugins?: ThPlugin[];
|
|
465
|
+
positionStorage?: PositionStorage;
|
|
466
|
+
}
|
|
467
|
+
type ThPluginFactory = () => ThPlugin[] | Promise<ThPlugin[]>;
|
|
468
|
+
interface ReaderPlugins {
|
|
469
|
+
epub?: ThPluginFactory;
|
|
470
|
+
webPub?: ThPluginFactory;
|
|
471
|
+
audio?: ThPluginFactory;
|
|
472
|
+
}
|
|
473
|
+
interface ReaderComponentProps<P extends "epub" | "webPub" | "audio" | undefined | null = undefined, K extends CustomizableKeys = {}> {
|
|
474
|
+
profile: P;
|
|
475
|
+
publication: Publication;
|
|
476
|
+
localDataKey: string | null;
|
|
477
|
+
isLoading?: boolean;
|
|
478
|
+
positionStorage?: PositionStorage;
|
|
479
|
+
plugins?: ReaderPlugins;
|
|
480
|
+
i18n?: Partial<InitOptions>;
|
|
481
|
+
preferences?: P extends "audio" ? {
|
|
482
|
+
initialPreferences?: ThAudioPreferences<K>;
|
|
483
|
+
adapter?: ThAudioPreferencesAdapter<K>;
|
|
484
|
+
} : P extends "epub" | "webPub" ? {
|
|
485
|
+
initialPreferences?: ThPreferences<K>;
|
|
486
|
+
adapter?: ThPreferencesAdapter<K>;
|
|
487
|
+
} : never;
|
|
488
|
+
}
|
|
489
|
+
declare const StatefulReaderWrapper: ({ profile, plugins, isLoading, preferences, i18n: i18nOptions, ...props }: ReaderComponentProps<any, any>) => react_jsx_runtime.JSX.Element | null;
|
|
490
|
+
|
|
491
|
+
interface UsePublicationOptions {
|
|
492
|
+
url: string;
|
|
493
|
+
onError?: (error: ProcessedError) => void;
|
|
494
|
+
fetcher?: Fetcher;
|
|
495
|
+
}
|
|
496
|
+
interface UsePublicationReturn {
|
|
497
|
+
isLoading: boolean;
|
|
498
|
+
error: ProcessedError | null;
|
|
499
|
+
publication: Publication | null;
|
|
500
|
+
manifest: object | null;
|
|
501
|
+
selfLink: string | null;
|
|
502
|
+
localDataKey: string | null;
|
|
503
|
+
profile: ReaderProfile | null;
|
|
504
|
+
isRTL: boolean;
|
|
505
|
+
isFXL: boolean;
|
|
506
|
+
hasDisplayTransformability: boolean;
|
|
507
|
+
}
|
|
508
|
+
declare const usePublication: ({ url, onError, fetcher: customFetcher }: UsePublicationOptions) => UsePublicationReturn;
|
|
509
|
+
|
|
510
|
+
interface ReaderTransitions {
|
|
511
|
+
isImmersive: boolean;
|
|
512
|
+
isFullscreen: boolean;
|
|
513
|
+
isScroll: boolean;
|
|
514
|
+
hasUserNavigated: boolean;
|
|
515
|
+
wasImmersive: boolean;
|
|
516
|
+
wasFullscreen: boolean;
|
|
517
|
+
wasScroll: boolean;
|
|
518
|
+
wasUserNavigated: boolean;
|
|
519
|
+
fromImmersive: boolean;
|
|
520
|
+
toImmersive: boolean;
|
|
521
|
+
fromFullscreen: boolean;
|
|
522
|
+
toFullscreen: boolean;
|
|
523
|
+
fromScroll: boolean;
|
|
524
|
+
toScroll: boolean;
|
|
525
|
+
fromUserNavigation: boolean;
|
|
526
|
+
toUserNavigation: boolean;
|
|
527
|
+
}
|
|
528
|
+
declare const useReaderTransitions: () => ReaderTransitions;
|
|
529
|
+
|
|
530
|
+
export { StatefulWordSpacing as $, StatefulGroupWrapper as A, type StatefulDropdownProps as B, StatefulDropdown as C, type StatefulNumberFieldProps as D, StatefulNumberField as E, type StatefulRadioGroupProps as F, StatefulRadioGroup as G, type StatefulSliderProps as H, StatefulSlider as I, type StatefulSliderWithPresetsProps as J, StatefulSliderWithPresets as K, type StatefulSwitchProps as L, StatefulSwitch as M, useEffectiveRange as N, type useGridNavigationProps as O, useGridNavigation as P, useGridTemplate as Q, type StatefulSettingsItemProps as R, type StatefulActionsMapObject as S, type ThPlugin as T, StatefulLetterSpacing as U, StatefulLineHeight as V, StatefulParagraphIndent as W, StatefulParagraphSpacing as X, StatefulSpacingGroup as Y, StatefulSpacingGroupContainer as Z, StatefulSpacingPresets as _, usePublication as a, useLineHeight as a0, useSpacingPresets as a1, StatefulFontFamily as a2, UnstableStatefulFontWeight as a3, StatefulHyphens as a4, StatefulTextAlign as a5, StatefulTextGroup as a6, StatefulTextGroupContainer as a7, StatefulTextNormalize as a8, StatefulPublisherStyles as a9, StatefulTheme as aa, StatefulZoom as ab, type StatefulBottomSheetProps as ac, type ScrimPref as ad, StatefulBottomSheet as ae, type StatefulCompactPopoverSheetProps as af, StatefulCompactPopoverSheet as ag, type StatefulDockedSheetProps as ah, StatefulDockedSheet as ai, type StatefulFullScreenSheetProps as aj, StatefulFullScreenSheet as ak, type StatefulModalSheetProps as al, StatefulModalSheet as am, type StatefulPopoverSheetProps as an, StatefulPopoverSheet as ao, type StatefulModalBaseProps as ap, StatefulModalBase as aq, StatefulSheetWrapper as ar, type StatefulSheet as as, StatefulPreferencesProvider as at, type PositionStorage as au, type StatefulReaderProps as av, type ThPluginFactory as aw, type ReaderPlugins as ax, type ReaderComponentProps as ay, StatefulReaderWrapper as az, useReaderTransitions as b, type StatefulActionTriggerProps as c, type StatefulActionContainerProps as d, StatefulFullscreenTrigger as e, StatefulJumpToPositionContainer as f, StatefulJumpToPositionTrigger as g, StatefulSettingsWrapper as h, StatefulAudioSettingsContainer as i, StatefulVisualSettingsContainer as j, StatefulSettingsTrigger as k, StatefulTocContainer as l, StatefulTocTrigger as m, type StatefulActionIconProps as n, StatefulActionIcon as o, type StatefulOverflowMenuItemProps as p, StatefulOverflowMenuItem as q, type StatefulCollapsibleActionsBarProps as r, StatefulCollapsibleActionsBar as s, type StatefulOverflowMenuProps as t, useNavigator as u, StatefulOverflowMenu as v, useDocking as w, createDefaultPlugin as x, createAudioDefaultPlugin as y, type StatefulGroupWrapperProps as z };
|
|
@@ -7,6 +7,8 @@ interface TocItem {
|
|
|
7
7
|
children?: TocItem[];
|
|
8
8
|
position?: number;
|
|
9
9
|
}
|
|
10
|
+
type TocEntryRef = Omit<TocItem, "children">;
|
|
11
|
+
|
|
10
12
|
interface TimelineItem {
|
|
11
13
|
href: string;
|
|
12
14
|
readingOrderIndex?: number;
|
|
@@ -34,7 +36,7 @@ interface UnstableTimeline {
|
|
|
34
36
|
};
|
|
35
37
|
toc?: {
|
|
36
38
|
tree?: TocItem[];
|
|
37
|
-
currentEntry?:
|
|
39
|
+
currentEntry?: TocEntryRef | null;
|
|
38
40
|
};
|
|
39
41
|
currentItem?: TimelineItem | null;
|
|
40
42
|
previousItem?: TimelineItem | null;
|
|
@@ -50,4 +52,4 @@ declare const useTimeline: ({ publication, currentLocation, currentPositions, po
|
|
|
50
52
|
onChange?: (timeline: UnstableTimeline) => void;
|
|
51
53
|
}) => UnstableTimeline;
|
|
52
54
|
|
|
53
|
-
export { type
|
|
55
|
+
export { type TimelineItem as T, type UnstableTimeline as U, type TimelineProgression as a, type TocItem as b, type TocEntryRef as c, timelineInstance as t, useTimeline as u };
|
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"bugs": {
|
|
21
21
|
"url": "https://github.com/edrlab/thorium-web/issues"
|
|
22
22
|
},
|
|
23
|
-
"version": "1.
|
|
23
|
+
"version": "1.3.0",
|
|
24
24
|
"private": false,
|
|
25
25
|
"files": [
|
|
26
26
|
"./dist"
|
|
@@ -32,9 +32,11 @@
|
|
|
32
32
|
"./core/components": "./dist/core/Components/index.mjs",
|
|
33
33
|
"./core/helpers": "./dist/core/Helpers/index.mjs",
|
|
34
34
|
"./core/hooks": "./dist/core/Hooks/index.mjs",
|
|
35
|
-
"./core/i18n": "./dist/
|
|
35
|
+
"./core/i18n": "./dist/i18n/index.mjs",
|
|
36
36
|
"./core/lib": "./dist/lib/index.mjs",
|
|
37
37
|
"./core/preferences": "./dist/preferences/index.mjs",
|
|
38
|
+
"./audio": "./dist/components/Audio/index.mjs",
|
|
39
|
+
"./audio/styles": "./dist/components/Audio/index.css",
|
|
38
40
|
"./epub": "./dist/components/Epub/index.mjs",
|
|
39
41
|
"./epub/styles": "./dist/components/Epub/index.css",
|
|
40
42
|
"./misc": "./dist/components/Misc/index.mjs",
|
|
@@ -58,13 +60,14 @@
|
|
|
58
60
|
"extract-locales": "node scripts/extract-locales.mjs",
|
|
59
61
|
"check-locales": "node scripts/check-locales.mjs",
|
|
60
62
|
"update-locales": "pnpm remove @edrlab/thorium-locales && pnpm add @edrlab/thorium-locales@github:edrlab/thorium-locales && pnpm extract-locales && pnpm check-locales --summary --show-missing",
|
|
61
|
-
"bundle": "pnpm extract-locales && tsup --config tsup.config.ts && pnpm copy-locales && pnpm copy-fonts"
|
|
63
|
+
"bundle": "pnpm extract-locales && tsup --config tsup.config.ts && pnpm copy-locales && pnpm copy-fonts",
|
|
64
|
+
"increment": "node scripts/increment.mjs"
|
|
62
65
|
},
|
|
63
66
|
"peerDependencies": {
|
|
64
|
-
"@readium/css": "^2.0.
|
|
65
|
-
"@readium/navigator": "2.
|
|
66
|
-
"@readium/navigator-html-injectables": "2.3.
|
|
67
|
-
"@readium/shared": "2.
|
|
67
|
+
"@readium/css": "^2.0.1",
|
|
68
|
+
"@readium/navigator": "2.4.0",
|
|
69
|
+
"@readium/navigator-html-injectables": "2.3.1",
|
|
70
|
+
"@readium/shared": "2.2.0",
|
|
68
71
|
"@reduxjs/toolkit": "^2.11.2",
|
|
69
72
|
"i18next": "^25.8.13",
|
|
70
73
|
"i18next-browser-languagedetector": "^8.2.1",
|
|
@@ -82,12 +85,13 @@
|
|
|
82
85
|
},
|
|
83
86
|
"dependencies": {
|
|
84
87
|
"@edrlab/thorium-locales": "github:edrlab/thorium-locales",
|
|
85
|
-
"@readium/css": "^2.0.
|
|
86
|
-
"@readium/navigator": "2.
|
|
87
|
-
"@readium/navigator-html-injectables": "2.3.
|
|
88
|
-
"@readium/shared": "2.
|
|
88
|
+
"@readium/css": "^2.0.1",
|
|
89
|
+
"@readium/navigator": "2.4.0",
|
|
90
|
+
"@readium/navigator-html-injectables": "2.3.1",
|
|
91
|
+
"@readium/shared": "2.2.0",
|
|
89
92
|
"@reduxjs/toolkit": "^2.11.2",
|
|
90
93
|
"classnames": "^2.5.1",
|
|
94
|
+
"colorthief": "^3.3.1",
|
|
91
95
|
"debounce": "^3.0.0",
|
|
92
96
|
"i18next": "^25.8.13",
|
|
93
97
|
"i18next-browser-languagedetector": "^8.2.1",
|