@edrlab/thorium-web 1.0.5 → 1.0.7
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/StatefulReader-BWwn9QKQ.d.mts +378 -0
- package/dist/{ThPreferencesAdapter-DrpMdZt6.d.mts → ThPreferencesAdapter-CbAb0Vth.d.mts} +25 -4
- package/dist/{ThSettingsWrapper-cIeG-ame.d.mts → ThSettingsWrapper-Cz0dIHPG.d.mts} +54 -17
- package/dist/{actionsReducer-CwI-Bgzm.d.mts → actionsReducer-BKoeohBu.d.mts} +2 -2
- package/dist/{chunk-F5DEEGRL.mjs → chunk-3KRYGUCM.mjs} +3 -3
- package/dist/{chunk-F5DEEGRL.mjs.map → chunk-3KRYGUCM.mjs.map} +1 -1
- package/dist/{chunk-IEYR7QV7.mjs → chunk-5LUMM7FW.mjs} +3 -3
- package/dist/chunk-5LUMM7FW.mjs.map +1 -0
- package/dist/{chunk-O6E2A4KD.mjs → chunk-CVM2ZAPL.mjs} +9 -3
- package/dist/chunk-CVM2ZAPL.mjs.map +1 -0
- package/dist/{chunk-DFDBT76F.mjs → chunk-DHFW75RZ.mjs} +79 -12
- package/dist/chunk-DHFW75RZ.mjs.map +1 -0
- package/dist/chunk-EJUXNICF.mjs +4948 -0
- package/dist/chunk-EJUXNICF.mjs.map +1 -0
- package/dist/{chunk-A3CHUZC2.mjs → chunk-JVKABGBT.mjs} +35 -11
- package/dist/chunk-JVKABGBT.mjs.map +1 -0
- package/dist/{chunk-GVHJ4YUH.mjs → chunk-OWJCESNF.mjs} +144 -20
- package/dist/chunk-OWJCESNF.mjs.map +1 -0
- package/dist/{chunk-ACBBACML.mjs → chunk-SQHOOSST.mjs} +300 -60
- package/dist/chunk-SQHOOSST.mjs.map +1 -0
- package/dist/{chunk-SQUC6VZK.mjs → chunk-VH22EPOM.mjs} +67 -5
- package/dist/chunk-VH22EPOM.mjs.map +1 -0
- package/dist/components/Epub/index.d.mts +20 -342
- package/dist/components/Epub/index.mjs +197 -4811
- package/dist/components/Epub/index.mjs.map +1 -1
- package/dist/components/WebPub/index.d.mts +48 -0
- package/dist/components/WebPub/index.mjs +346 -0
- package/dist/components/WebPub/index.mjs.map +1 -0
- package/dist/core/Components/index.d.mts +21 -57
- package/dist/core/Components/index.mjs +3 -3
- package/dist/core/Helpers/index.d.mts +22 -4
- package/dist/core/Helpers/index.mjs +3 -3
- package/dist/core/Hooks/index.d.mts +4 -3
- package/dist/core/Hooks/index.mjs +2 -2
- package/dist/{enums-k2t0ns7n.d.mts → enums-CBaXSsr9.d.mts} +6 -1
- package/dist/i18n/index.mjs +6 -6
- package/dist/{keyboardUtilities-CoTR9LKx.d.mts → keyboardUtilities-BWAyLS_D.d.mts} +1 -1
- package/dist/lib/index.d.mts +169 -19
- package/dist/lib/index.mjs +3 -3
- package/dist/locales/ar/thorium-web.json +22 -0
- package/dist/locales/da/thorium-web.json +232 -1
- package/dist/locales/fi/thorium-web.json +232 -0
- package/dist/locales/lt/thorium-web.json +16 -3
- package/dist/locales/pt-PT/thorium-web.json +56 -7
- package/dist/locales/sv/thorium-web.json +232 -1
- package/dist/{overflowMenu.module-FO27A2A3.module.css → overflowMenu.module-QL32ISXF.module.css} +2 -2
- package/dist/preferences/index.d.mts +10 -7
- package/dist/preferences/index.mjs +5 -5
- package/dist/{readerPagination.module-W4IAEOSH.module.css → readerPagination.module-DYBZAQ7H.module.css} +4 -1
- package/dist/{settings.module-O55ZM6BK.module.css → settings.module-H5MUDFJO.module.css} +6 -1
- package/dist/{useBreakpoints-tXWqELEV.d.mts → useBreakpoints-BtHd3571.d.mts} +1 -1
- package/dist/{usePreferences-DN-y2V__.d.mts → usePreferences-iJ5426UA.d.mts} +1 -1
- package/dist/{useTimeline-Ba3SQ3QB.d.mts → useTimeline-DyMx_aWY.d.mts} +5 -5
- package/dist/useWebPubNavigator-DBRj8KyC.d.mts +37 -0
- package/package.json +34 -33
- package/dist/chunk-A3CHUZC2.mjs.map +0 -1
- package/dist/chunk-ACBBACML.mjs.map +0 -1
- package/dist/chunk-DFDBT76F.mjs.map +0 -1
- package/dist/chunk-GVHJ4YUH.mjs.map +0 -1
- package/dist/chunk-IEYR7QV7.mjs.map +0 -1
- package/dist/chunk-O6E2A4KD.mjs.map +0 -1
- package/dist/chunk-SQUC6VZK.mjs.map +0 -1
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { TooltipProps, PopoverProps } from 'react-aria-components';
|
|
3
|
+
import { d as ThActionsTriggerVariant, a as ThCollapsibilityVisibility, b as ThActionEntry } from './useCollapsibility-CM1I24Ol.mjs';
|
|
4
|
+
import { T as ThActionButtonProps, f as ThMenuItemProps, a as ThCollapsibleActionsBarProps, t as ThSettingsEntry, r as ThDropdownProps, h as ThNumberFieldProps, k as ThRadioGroupProps, m as ThSliderProps, o as ThSwitchProps } from './ThSettingsWrapper-Cz0dIHPG.mjs';
|
|
5
|
+
import { d as ThActionsKeys, c as ThDockingKeys, t as ThSheetTypes, g as ThTextSettingsKeys, h as ThSpacingSettingsKeys, i as ThSpacingPresetKeys, T as ThLineHeightOptions, u as ThSheetHeaderVariant, a as ThTextAlignOptions, j as ThLayoutUI } from './enums-CBaXSsr9.mjs';
|
|
6
|
+
import React__default, { RefObject, ReactNode } from 'react';
|
|
7
|
+
import { q as ThSettingsGroupPref, a as ThPreferences, D as DefaultKeys, d as defaultFontFamilyOptions } from './ThPreferencesAdapter-CbAb0Vth.mjs';
|
|
8
|
+
import { PressEvent } from 'react-aria';
|
|
9
|
+
import { A as ActionsStateKeys } from './actionsReducer-BKoeohBu.mjs';
|
|
10
|
+
import { T as ThColorScheme } from './useContrast-Cgsrl7GS.mjs';
|
|
11
|
+
import { Locator } from '@readium/shared';
|
|
12
|
+
import { LineLengthStateObject } from './lib/index.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
|
+
heading: 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
|
+
}
|
|
102
|
+
declare const StatefulGroupWrapper: <T extends string = ThTextSettingsKeys | ThSpacingSettingsKeys>({ heading, moreLabel, moreTooltip, onPressMore, componentsMap, prefs, defaultPrefs }: StatefulGroupWrapperProps<T>) => react_jsx_runtime.JSX.Element;
|
|
103
|
+
|
|
104
|
+
interface StatefulDropdownProps extends Omit<ThDropdownProps, "classNames"> {
|
|
105
|
+
standalone?: boolean;
|
|
106
|
+
}
|
|
107
|
+
declare const StatefulDropdown: ({ standalone, label, className, compounds, ...props }: StatefulDropdownProps) => react_jsx_runtime.JSX.Element;
|
|
108
|
+
|
|
109
|
+
interface StatefulNumberFieldProps extends Omit<ThNumberFieldProps, "classNames"> {
|
|
110
|
+
standalone?: boolean;
|
|
111
|
+
resetLabel?: string;
|
|
112
|
+
placeholder?: string;
|
|
113
|
+
}
|
|
114
|
+
declare const StatefulNumberField: ({ standalone, label, placeholder, value, resetLabel, ...props }: StatefulNumberFieldProps) => react_jsx_runtime.JSX.Element;
|
|
115
|
+
|
|
116
|
+
interface StatefulRadioGroupProps extends Omit<ThRadioGroupProps, "classNames"> {
|
|
117
|
+
standalone?: boolean;
|
|
118
|
+
useGraphicalNavigation?: boolean;
|
|
119
|
+
onEscape?: () => void;
|
|
120
|
+
}
|
|
121
|
+
declare const StatefulRadioGroup: ({ ref, standalone, useGraphicalNavigation, label, items, value, children, onChange, onEscape, ...props }: StatefulRadioGroupProps) => react_jsx_runtime.JSX.Element;
|
|
122
|
+
|
|
123
|
+
interface StatefulSliderProps extends Omit<ThSliderProps, "classNames"> {
|
|
124
|
+
standalone?: boolean;
|
|
125
|
+
placeholder?: string;
|
|
126
|
+
resetLabel?: string;
|
|
127
|
+
displayTicks?: boolean;
|
|
128
|
+
}
|
|
129
|
+
declare const StatefulSlider: ({ standalone, label, placeholder, displayTicks, value, resetLabel, ...props }: StatefulSliderProps) => react_jsx_runtime.JSX.Element;
|
|
130
|
+
|
|
131
|
+
interface StatefulSwitchProps extends Omit<ThSwitchProps, "classNames"> {
|
|
132
|
+
standalone?: boolean;
|
|
133
|
+
}
|
|
134
|
+
declare const StatefulSwitch: ({ standalone, label, heading, ...props }: StatefulSwitchProps) => react_jsx_runtime.JSX.Element;
|
|
135
|
+
|
|
136
|
+
interface useGridNavigationProps {
|
|
137
|
+
containerRef: React__default.RefObject<HTMLDivElement | null>;
|
|
138
|
+
items: React__default.RefObject<any[]>;
|
|
139
|
+
currentValue: any;
|
|
140
|
+
onChange: (value: any) => void;
|
|
141
|
+
isRTL?: boolean;
|
|
142
|
+
onEscape?: () => void;
|
|
143
|
+
onFocus?: (value: string) => void;
|
|
144
|
+
}
|
|
145
|
+
declare const useGridNavigation: ({ containerRef, items, currentValue, onChange, isRTL, onEscape, onFocus }: useGridNavigationProps) => {
|
|
146
|
+
onKeyDown: (e: React__default.KeyboardEvent) => void;
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
declare const useGridTemplate: (ref: React.RefObject<HTMLDivElement | null>, type?: "columns" | "rows") => number | null;
|
|
150
|
+
|
|
151
|
+
interface StatefulSettingsItemProps {
|
|
152
|
+
standalone?: boolean;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
declare const StatefulLetterSpacing: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
|
|
156
|
+
|
|
157
|
+
declare const StatefulLineHeight: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
|
|
158
|
+
|
|
159
|
+
declare const StatefulParagraphIndent: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
|
|
160
|
+
|
|
161
|
+
declare const StatefulParagraphSpacing: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
|
|
162
|
+
|
|
163
|
+
declare const StatefulSpacingGroup: () => react_jsx_runtime.JSX.Element;
|
|
164
|
+
declare const StatefulSpacingGroupContainer: () => react_jsx_runtime.JSX.Element;
|
|
165
|
+
|
|
166
|
+
declare const StatefulSpacingPresets: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element | null;
|
|
167
|
+
|
|
168
|
+
declare const StatefulWordSpacing: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Hook that returns a mapping of line height options to their actual numeric values
|
|
172
|
+
* This eliminates code duplication across spacing components
|
|
173
|
+
*/
|
|
174
|
+
declare const useLineHeight: () => {
|
|
175
|
+
publisher: null;
|
|
176
|
+
small: any;
|
|
177
|
+
medium: any;
|
|
178
|
+
large: any;
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Hook to determine if preset system should be active
|
|
183
|
+
* Only active when component is both registered AND displayed
|
|
184
|
+
* This allows us to correctly handle overrides for presets,
|
|
185
|
+
* and states for spacing components
|
|
186
|
+
*/
|
|
187
|
+
declare const useSpacingPresets: () => {
|
|
188
|
+
currentPreset: ThSpacingPresetKeys;
|
|
189
|
+
getPresetValues: (presetKey: ThSpacingPresetKeys) => {
|
|
190
|
+
letterSpacing: any;
|
|
191
|
+
lineHeight: any;
|
|
192
|
+
paragraphIndent: any;
|
|
193
|
+
paragraphSpacing: any;
|
|
194
|
+
wordSpacing: any;
|
|
195
|
+
};
|
|
196
|
+
getEffectiveSpacingValue: {
|
|
197
|
+
(key: ThSpacingSettingsKeys.letterSpacing): number | null;
|
|
198
|
+
(key: ThSpacingSettingsKeys.lineHeight): ThLineHeightOptions | null;
|
|
199
|
+
(key: ThSpacingSettingsKeys.paragraphIndent): number | null;
|
|
200
|
+
(key: ThSpacingSettingsKeys.paragraphSpacing): number | null;
|
|
201
|
+
(key: ThSpacingSettingsKeys.wordSpacing): number | null;
|
|
202
|
+
};
|
|
203
|
+
getSpacingResetValue: {
|
|
204
|
+
(key: ThSpacingSettingsKeys.letterSpacing): number | null;
|
|
205
|
+
(key: ThSpacingSettingsKeys.lineHeight): ThLineHeightOptions | null;
|
|
206
|
+
(key: ThSpacingSettingsKeys.paragraphIndent): number | null;
|
|
207
|
+
(key: ThSpacingSettingsKeys.paragraphSpacing): number | null;
|
|
208
|
+
(key: ThSpacingSettingsKeys.wordSpacing): number | null;
|
|
209
|
+
};
|
|
210
|
+
canBeReset: (key: ThSpacingSettingsKeys) => boolean;
|
|
211
|
+
setLetterSpacing: (value: number | null) => void;
|
|
212
|
+
setLineHeight: (value: ThLineHeightOptions) => void;
|
|
213
|
+
setParagraphIndent: (value: number | null) => void;
|
|
214
|
+
setParagraphSpacing: (value: number | null) => void;
|
|
215
|
+
setWordSpacing: (value: number | null) => void;
|
|
216
|
+
setPublisherStyles: (value: boolean) => void;
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
declare const StatefulFontFamily: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
|
|
220
|
+
|
|
221
|
+
declare const UnstableStatefulFontWeight: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
|
|
222
|
+
|
|
223
|
+
declare const StatefulHyphens: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
|
|
224
|
+
|
|
225
|
+
declare const StatefulTextAlign: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
|
|
226
|
+
|
|
227
|
+
declare const StatefulTextGroup: () => react_jsx_runtime.JSX.Element;
|
|
228
|
+
declare const StatefulTextGroupContainer: () => react_jsx_runtime.JSX.Element;
|
|
229
|
+
|
|
230
|
+
declare const StatefulTextNormalize: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
|
|
231
|
+
|
|
232
|
+
declare const StatefulPublisherStyles: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
|
|
233
|
+
|
|
234
|
+
declare const StatefulZoom: () => react_jsx_runtime.JSX.Element;
|
|
235
|
+
|
|
236
|
+
interface StatefulSheet {
|
|
237
|
+
id: ActionsStateKeys;
|
|
238
|
+
triggerRef: RefObject<HTMLElement | null>;
|
|
239
|
+
heading: string;
|
|
240
|
+
headerVariant?: ThSheetHeaderVariant;
|
|
241
|
+
className: string;
|
|
242
|
+
isOpen: boolean;
|
|
243
|
+
onOpenChange: (isOpen: boolean) => void;
|
|
244
|
+
onClosePress: () => void;
|
|
245
|
+
docker?: ThDockingKeys[];
|
|
246
|
+
children?: ReactNode;
|
|
247
|
+
resetFocus?: unknown;
|
|
248
|
+
focusWithinRef?: RefObject<HTMLElement | null>;
|
|
249
|
+
focusSelector?: string;
|
|
250
|
+
scrollTopOnFocus?: boolean;
|
|
251
|
+
dismissEscapeKeyClose?: boolean;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
interface StatefulBottomSheetProps extends StatefulSheet {
|
|
255
|
+
}
|
|
256
|
+
interface ScrimPref {
|
|
257
|
+
active: boolean;
|
|
258
|
+
override?: string;
|
|
259
|
+
}
|
|
260
|
+
declare const StatefulBottomSheet: ({ id, heading, headerVariant, className, isOpen, onOpenChange, onClosePress, children, resetFocus, focusWithinRef, focusSelector, scrollTopOnFocus, dismissEscapeKeyClose }: StatefulBottomSheetProps) => react_jsx_runtime.JSX.Element | undefined;
|
|
261
|
+
|
|
262
|
+
interface StatefulDockedSheetProps extends StatefulSheet {
|
|
263
|
+
flow: ThDockingKeys.start | ThDockingKeys.end | null;
|
|
264
|
+
}
|
|
265
|
+
declare const StatefulDockedSheet: ({ id, heading, headerVariant, className, isOpen, onClosePress, docker, flow, children, resetFocus, focusSelector, focusWithinRef, scrollTopOnFocus }: StatefulDockedSheetProps) => react_jsx_runtime.JSX.Element | undefined;
|
|
266
|
+
|
|
267
|
+
interface StatefulFullScreenSheetProps extends StatefulSheet {
|
|
268
|
+
}
|
|
269
|
+
declare const StatefulFullScreenSheet: ({ heading, headerVariant, className, isOpen, onOpenChange, onClosePress, children, resetFocus, focusWithinRef, focusSelector, scrollTopOnFocus, dismissEscapeKeyClose }: StatefulFullScreenSheetProps) => react_jsx_runtime.JSX.Element | undefined;
|
|
270
|
+
|
|
271
|
+
interface StatefulPopoverSheetProps extends StatefulSheet {
|
|
272
|
+
placement?: PopoverProps["placement"];
|
|
273
|
+
}
|
|
274
|
+
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;
|
|
275
|
+
|
|
276
|
+
declare const StatefulSheetWrapper: ({ sheetType, sheetProps, children }: {
|
|
277
|
+
sheetType: ThSheetTypes;
|
|
278
|
+
sheetProps: StatefulPopoverSheetProps | StatefulFullScreenSheetProps | StatefulDockedSheetProps | StatefulBottomSheetProps;
|
|
279
|
+
children: ReactNode;
|
|
280
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
281
|
+
|
|
282
|
+
declare const StatefulLoader: ({ isLoading, children }: {
|
|
283
|
+
isLoading: boolean;
|
|
284
|
+
children: ReactNode;
|
|
285
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
286
|
+
|
|
287
|
+
declare const DefaultImage: ({ src, alt }: {
|
|
288
|
+
src: string;
|
|
289
|
+
alt?: string;
|
|
290
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
291
|
+
interface Publication {
|
|
292
|
+
title: string;
|
|
293
|
+
author: string;
|
|
294
|
+
cover: string;
|
|
295
|
+
url: string;
|
|
296
|
+
rendition?: string;
|
|
297
|
+
}
|
|
298
|
+
interface PublicationGridProps {
|
|
299
|
+
publications: Publication[];
|
|
300
|
+
columnWidth?: number;
|
|
301
|
+
gap?: string;
|
|
302
|
+
renderCover?: (publication: Publication) => React__default.ReactElement<React__default.ImgHTMLAttributes<HTMLImageElement>>;
|
|
303
|
+
}
|
|
304
|
+
declare const PublicationGrid: ({ publications, columnWidth, gap, renderCover, }: PublicationGridProps) => react_jsx_runtime.JSX.Element;
|
|
305
|
+
|
|
306
|
+
declare const StatefulPreferencesProvider: ({ children, initialPreferences }: {
|
|
307
|
+
children: ReactNode;
|
|
308
|
+
initialPreferences?: ThPreferences<DefaultKeys>;
|
|
309
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
310
|
+
|
|
311
|
+
declare const useNavigator: () => any;
|
|
312
|
+
|
|
313
|
+
interface UsePublicationOptions {
|
|
314
|
+
url: string;
|
|
315
|
+
onError?: (error: string) => void;
|
|
316
|
+
}
|
|
317
|
+
declare const usePublication: ({ url, onError }: UsePublicationOptions) => {
|
|
318
|
+
error: string;
|
|
319
|
+
manifest: object | undefined;
|
|
320
|
+
selfLink: string | undefined;
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
interface ReaderTransitions {
|
|
324
|
+
isImmersive: boolean;
|
|
325
|
+
isFullscreen: boolean;
|
|
326
|
+
isScroll: boolean;
|
|
327
|
+
hasUserNavigated: boolean;
|
|
328
|
+
wasImmersive: boolean;
|
|
329
|
+
wasFullscreen: boolean;
|
|
330
|
+
wasScroll: boolean;
|
|
331
|
+
wasUserNavigated: boolean;
|
|
332
|
+
fromImmersive: boolean;
|
|
333
|
+
toImmersive: boolean;
|
|
334
|
+
fromFullscreen: boolean;
|
|
335
|
+
toFullscreen: boolean;
|
|
336
|
+
fromScroll: boolean;
|
|
337
|
+
toScroll: boolean;
|
|
338
|
+
fromUserNavigation: boolean;
|
|
339
|
+
toUserNavigation: boolean;
|
|
340
|
+
}
|
|
341
|
+
declare const useReaderTransitions: () => ReaderTransitions;
|
|
342
|
+
|
|
343
|
+
interface ReadiumCSSSettings {
|
|
344
|
+
columnCount: string;
|
|
345
|
+
fontFamily: keyof typeof defaultFontFamilyOptions | null;
|
|
346
|
+
fontSize: number;
|
|
347
|
+
fontWeight: number;
|
|
348
|
+
hyphens: boolean | null;
|
|
349
|
+
letterSpacing: number | null;
|
|
350
|
+
lineLength: LineLengthStateObject | null;
|
|
351
|
+
lineHeight: ThLineHeightOptions | null;
|
|
352
|
+
paragraphIndent: number | null;
|
|
353
|
+
paragraphSpacing: number | null;
|
|
354
|
+
publisherStyles: boolean;
|
|
355
|
+
scroll: boolean;
|
|
356
|
+
textAlign: ThTextAlignOptions | null;
|
|
357
|
+
textNormalization: boolean;
|
|
358
|
+
theme?: string;
|
|
359
|
+
wordSpacing: number | null;
|
|
360
|
+
}
|
|
361
|
+
interface StatelessCache {
|
|
362
|
+
layoutUI: ThLayoutUI;
|
|
363
|
+
isImmersive: boolean;
|
|
364
|
+
isHovering: boolean;
|
|
365
|
+
arrowsOccupySpace: boolean;
|
|
366
|
+
settings: ReadiumCSSSettings;
|
|
367
|
+
positionsList: Locator[];
|
|
368
|
+
colorScheme?: ThColorScheme;
|
|
369
|
+
reducedMotion?: boolean;
|
|
370
|
+
}
|
|
371
|
+
interface StatefulReaderProps {
|
|
372
|
+
rawManifest: object;
|
|
373
|
+
selfHref: string;
|
|
374
|
+
plugins?: ThPlugin[];
|
|
375
|
+
}
|
|
376
|
+
declare const StatefulReader: ({ rawManifest, selfHref, plugins }: StatefulReaderProps) => react_jsx_runtime.JSX.Element | null;
|
|
377
|
+
|
|
378
|
+
export { StatefulHyphens as $, StatefulDropdown as A, type StatefulNumberFieldProps as B, StatefulNumberField as C, type StatefulRadioGroupProps as D, StatefulRadioGroup as E, type StatefulSliderProps as F, StatefulSlider as G, type StatefulSwitchProps as H, StatefulSwitch as I, type useGridNavigationProps as J, useGridNavigation as K, useGridTemplate as L, type StatefulSettingsItemProps as M, StatefulLetterSpacing as N, StatefulLineHeight as O, StatefulParagraphIndent as P, StatefulParagraphSpacing as Q, StatefulSpacingGroup as R, type StatefulReaderProps as S, type ThPlugin as T, StatefulSpacingGroupContainer as U, StatefulSpacingPresets as V, StatefulWordSpacing as W, useLineHeight as X, useSpacingPresets as Y, StatefulFontFamily as Z, UnstableStatefulFontWeight as _, usePublication as a, StatefulTextAlign as a0, StatefulTextGroup as a1, StatefulTextGroupContainer as a2, StatefulTextNormalize as a3, StatefulPublisherStyles as a4, StatefulZoom as a5, type StatefulBottomSheetProps as a6, type ScrimPref as a7, StatefulBottomSheet as a8, type StatefulDockedSheetProps as a9, StatefulDockedSheet as aa, type StatefulFullScreenSheetProps as ab, StatefulFullScreenSheet as ac, type StatefulPopoverSheetProps as ad, StatefulPopoverSheet as ae, StatefulSheetWrapper as af, type StatefulSheet as ag, StatefulLoader as ah, DefaultImage as ai, type Publication as aj, type PublicationGridProps as ak, PublicationGrid as al, StatefulPreferencesProvider as am, type ReadiumCSSSettings as an, type StatelessCache as ao, StatefulReader as ap, useReaderTransitions as b, type StatefulActionsMapObject as c, type StatefulActionTriggerProps as d, type StatefulActionContainerProps as e, StatefulFullscreenTrigger as f, StatefulJumpToPositionContainer as g, StatefulJumpToPositionTrigger as h, StatefulSettingsContainer as i, StatefulSettingsTrigger as j, StatefulTocContainer as k, StatefulTocTrigger as l, type StatefulActionIconProps as m, StatefulActionIcon as n, type StatefulOverflowMenuItemProps as o, StatefulOverflowMenuItem as p, type StatefulCollapsibleActionsBarProps as q, StatefulCollapsibleActionsBar as r, type StatefulOverflowMenuProps as s, StatefulOverflowMenu as t, useNavigator as u, useDocking as v, createDefaultPlugin as w, type StatefulGroupWrapperProps as x, StatefulGroupWrapper as y, type StatefulDropdownProps as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { B as BreakpointsMap, T as ThBreakpointsObject } from './useBreakpoints-
|
|
1
|
+
import { b as ThBreakpoints, l as ThArrowVariant, v as ThLayoutDirection, m as ThDocumentTitleFormat, k as ThBackLinkVariant, n as ThRunningHeadFormat, o as ThProgressionFormat, j as ThLayoutUI, t as ThSheetTypes, e as ThThemeKeys, d as ThActionsKeys, p as ThDockingTypes, c as ThDockingKeys, f as ThSettingsKeys, g as ThTextSettingsKeys, h as ThSpacingSettingsKeys, r as ThSettingsRangeVariant, s as ThSettingsRangePlaceholder, T as ThLineHeightOptions, u as ThSheetHeaderVariant, i as ThSpacingPresetKeys } from './enums-CBaXSsr9.mjs';
|
|
2
|
+
import { e as UnstableShortcutRepresentation } from './keyboardUtilities-BWAyLS_D.mjs';
|
|
3
|
+
import { B as BreakpointsMap, T as ThBreakpointsObject } from './useBreakpoints-BtHd3571.mjs';
|
|
4
4
|
import { T as ThColorScheme, a as ThContrast } from './useContrast-Cgsrl7GS.mjs';
|
|
5
5
|
import { T as ThCollapsibility, a as ThCollapsibilityVisibility } from './useCollapsibility-CM1I24Ol.mjs';
|
|
6
6
|
|
|
@@ -97,6 +97,7 @@ interface ThActionsTokens {
|
|
|
97
97
|
}
|
|
98
98
|
interface ThSettingsSpacingPresets<K extends CustomizableKeys = DefaultKeys> {
|
|
99
99
|
reflowOrder: Array<ThSpacingPresetKeys>;
|
|
100
|
+
webPubOrder: Array<ThSpacingPresetKeys>;
|
|
100
101
|
keys: {
|
|
101
102
|
[key in Exclude<ThSpacingPresetKeys, "publisher" | "custom">]?: ThSpacingPreset<K>;
|
|
102
103
|
};
|
|
@@ -137,6 +138,7 @@ type SpacingSettingsKey<K extends CustomizableKeys> = K extends {
|
|
|
137
138
|
interface ThActionsPref<K extends CustomizableKeys> {
|
|
138
139
|
reflowOrder: Array<ActionKey<K>>;
|
|
139
140
|
fxlOrder: Array<ActionKey<K>>;
|
|
141
|
+
webPubOrder: Array<ActionKey<K>>;
|
|
140
142
|
collapse: ThCollapsibility;
|
|
141
143
|
keys: Record<ActionKey<K>, ThActionsTokens>;
|
|
142
144
|
}
|
|
@@ -189,6 +191,17 @@ interface ThFormatPref<T extends string | Array<string>> {
|
|
|
189
191
|
[key in ThBreakpoints]?: ThFormatPrefValue<T>;
|
|
190
192
|
};
|
|
191
193
|
}
|
|
194
|
+
interface ThPaginatedAffordancePrefValue {
|
|
195
|
+
variant: ThArrowVariant;
|
|
196
|
+
discard?: Array<"navigation" | "immersive" | "fullscreen"> | "none";
|
|
197
|
+
hint?: Array<"immersiveChange" | "fullscreenChange" | "layoutChange"> | "none";
|
|
198
|
+
}
|
|
199
|
+
interface ThPaginatedAffordancePref {
|
|
200
|
+
default: Required<ThPaginatedAffordancePrefValue>;
|
|
201
|
+
breakpoints?: {
|
|
202
|
+
[key in ThBreakpoints]?: ThPaginatedAffordancePrefValue;
|
|
203
|
+
};
|
|
204
|
+
}
|
|
192
205
|
interface ThPreferences<K extends CustomizableKeys = {}> {
|
|
193
206
|
direction?: ThLayoutDirection;
|
|
194
207
|
locale?: string;
|
|
@@ -210,6 +223,7 @@ interface ThPreferences<K extends CustomizableKeys = {}> {
|
|
|
210
223
|
format?: {
|
|
211
224
|
reflow?: ThFormatPref<ThRunningHeadFormat>;
|
|
212
225
|
fxl?: ThFormatPref<ThRunningHeadFormat>;
|
|
226
|
+
webPub?: ThFormatPref<ThRunningHeadFormat>;
|
|
213
227
|
};
|
|
214
228
|
};
|
|
215
229
|
};
|
|
@@ -217,6 +231,7 @@ interface ThPreferences<K extends CustomizableKeys = {}> {
|
|
|
217
231
|
format?: {
|
|
218
232
|
reflow?: ThFormatPref<ThProgressionFormat | Array<ThProgressionFormat>>;
|
|
219
233
|
fxl?: ThFormatPref<ThProgressionFormat | Array<ThProgressionFormat>>;
|
|
234
|
+
webPub?: ThFormatPref<ThProgressionFormat | Array<ThProgressionFormat>>;
|
|
220
235
|
};
|
|
221
236
|
};
|
|
222
237
|
arrow: {
|
|
@@ -233,6 +248,7 @@ interface ThPreferences<K extends CustomizableKeys = {}> {
|
|
|
233
248
|
ui?: {
|
|
234
249
|
reflow?: ThLayoutUI;
|
|
235
250
|
fxl?: ThLayoutUI;
|
|
251
|
+
webPub?: ThLayoutUI;
|
|
236
252
|
};
|
|
237
253
|
radius: number;
|
|
238
254
|
spacing: number;
|
|
@@ -262,6 +278,10 @@ interface ThPreferences<K extends CustomizableKeys = {}> {
|
|
|
262
278
|
hideOnForwardScroll: boolean;
|
|
263
279
|
showOnBackwardScroll: boolean;
|
|
264
280
|
};
|
|
281
|
+
paginated: {
|
|
282
|
+
reflow: ThPaginatedAffordancePref;
|
|
283
|
+
fxl: ThPaginatedAffordancePref;
|
|
284
|
+
};
|
|
265
285
|
};
|
|
266
286
|
actions: ThActionsPref<K>;
|
|
267
287
|
shortcuts: {
|
|
@@ -272,6 +292,7 @@ interface ThPreferences<K extends CustomizableKeys = {}> {
|
|
|
272
292
|
settings: {
|
|
273
293
|
reflowOrder: Array<SettingsKey<K>>;
|
|
274
294
|
fxlOrder: Array<SettingsKey<K>>;
|
|
295
|
+
webPubOrder: Array<SettingsKey<K>>;
|
|
275
296
|
keys: ThSettingsKeyTypes<K>;
|
|
276
297
|
text?: ThSettingsGroupPref<TextSettingsKey<K>>;
|
|
277
298
|
spacing?: ThSettingsGroupPref<SpacingSettingsKey<K>> & {
|
|
@@ -354,4 +375,4 @@ interface ThPreferencesAdapter<T extends CustomizableKeys = CustomizableKeys> {
|
|
|
354
375
|
unsubscribe(callback: (prefs: ThPreferences<T>) => void): void;
|
|
355
376
|
}
|
|
356
377
|
|
|
357
|
-
export { type ActionKey as A,
|
|
378
|
+
export { type ActionKey as A, createPreferences as B, type CustomizableKeys as C, type DefaultKeys as D, type ActionKeyType as E, type ThemeKeyType as F, type SettingsKeyType as G, type TextSettingsKeyType as H, type I18nValue as I, type SpacingSettingsKeyType as J, type useThemingProps as K, defaultActionKeysObject as L, defaultTextSettingsMain as M, defaultTextSettingsSubpanel as N, defaultSpacingSettingsMain as O, defaultSpacingSettingsSubpanel as P, defaultSpacingPresetsOrder as Q, defaultParagraphSpacing as R, type SettingsKey as S, type ThPreferencesAdapter as T, defaultParagraphIndent as U, defaultWordSpacing as V, defaultLetterSpacing as W, defaultLineHeights as X, defaultZoom as Y, defaultSpacingPresets as Z, type ThPreferences as a, type ThemeTokens as b, type ThBackLinkContent as c, defaultFontFamilyOptions as d, type ThBackLinkPref as e, type ThBottomSheetDetent as f, type ThActionsSnappedPref as g, type ThActionsDockedPref as h, type ThActionsTokens as i, type ThSettingsSpacingPresets as j, type ThSpacingPreset as k, type ThemeKey as l, type TextSettingsKey as m, type SpacingSettingsKey as n, type ThActionsPref as o, type ThDockingPref as p, type ThSettingsGroupPref as q, type ThSettingsRangePref as r, type ThSettingsRadioPref as s, type ThSettingsKeyTypes as t, useTheming as u, type ThConstraintKeys as v, type ThFormatPrefValue as w, type ThFormatPref as x, type ThPaginatedAffordancePrefValue as y, type ThPaginatedAffordancePref as z };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React__default, { ComponentType, SVGProps } from 'react';
|
|
3
|
-
import { b as ThActionEntry, c as ThActionsBarProps, C as CollapsiblePref } from './useCollapsibility-CM1I24Ol.mjs';
|
|
4
|
-
import { ButtonProps, TooltipProps, MenuProps, MenuTriggerProps, PopoverProps, MenuItemProps, LabelProps, NumberFieldProps, GroupProps, InputProps, RadioGroupProps, RadioProps, SliderProps, SliderOutputProps, SliderTrackProps, SliderThumbProps, SwitchProps, HeadingProps } from 'react-aria-components';
|
|
5
3
|
import { TooltipTriggerProps, KeyboardProps } from 'react-aria';
|
|
4
|
+
import { ButtonProps, TooltipProps, MenuItemProps, LabelProps, MenuProps, MenuTriggerProps, PopoverProps, NumberFieldProps, GroupProps, InputProps, RadioGroupProps, RadioProps, SliderProps, SliderOutputProps, SliderTrackProps, SliderThumbProps, SwitchProps, HeadingProps, SelectProps, Button, ListBoxProps, ListBox, ListBoxItemProps } from 'react-aria-components';
|
|
5
|
+
import { b as ThActionEntry, c as ThActionsBarProps, C as CollapsiblePref } from './useCollapsibility-CM1I24Ol.mjs';
|
|
6
6
|
|
|
7
7
|
interface HTMLAttributesWithRef<T> extends React.HTMLAttributes<T> {
|
|
8
8
|
ref?: React.ForwardedRef<T>;
|
|
@@ -31,6 +31,19 @@ interface ThActionButtonProps extends ButtonProps {
|
|
|
31
31
|
}
|
|
32
32
|
declare const ThActionButton: ({ ref, compounds, children, ...props }: ThActionButtonProps) => react_jsx_runtime.JSX.Element;
|
|
33
33
|
|
|
34
|
+
interface ThMenuItemProps extends MenuItemProps {
|
|
35
|
+
ref?: React__default.Ref<HTMLDivElement>;
|
|
36
|
+
id: string;
|
|
37
|
+
SVGIcon?: React__default.ComponentType<React__default.SVGProps<SVGElement>>;
|
|
38
|
+
label: string;
|
|
39
|
+
shortcut?: string;
|
|
40
|
+
compounds?: {
|
|
41
|
+
label: WithRef<LabelProps, HTMLSpanElement>;
|
|
42
|
+
shortcut: WithRef<KeyboardProps, HTMLSpanElement>;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
declare const ThMenuItem: ({ ref, id, SVGIcon, label, shortcut, compounds, children, ...props }: ThMenuItemProps) => react_jsx_runtime.JSX.Element;
|
|
46
|
+
|
|
34
47
|
interface THMenuProps<T> extends MenuProps<ThActionEntry<T>> {
|
|
35
48
|
ref?: React__default.ForwardedRef<HTMLDivElement>;
|
|
36
49
|
triggerRef?: React__default.RefObject<HTMLElement | null>;
|
|
@@ -66,19 +79,6 @@ interface ThCollapsibleActionsBarProps extends ThActionsBarProps {
|
|
|
66
79
|
}
|
|
67
80
|
declare const ThCollapsibleActionsBar: ({ ref, id, items, prefs, breakpoint, compounds, ...props }: ThCollapsibleActionsBarProps) => react_jsx_runtime.JSX.Element;
|
|
68
81
|
|
|
69
|
-
interface ThMenuItemProps extends MenuItemProps {
|
|
70
|
-
ref?: React__default.Ref<HTMLDivElement>;
|
|
71
|
-
id: string;
|
|
72
|
-
SVGIcon?: React__default.ComponentType<React__default.SVGProps<SVGElement>>;
|
|
73
|
-
label: string;
|
|
74
|
-
shortcut?: string;
|
|
75
|
-
compounds?: {
|
|
76
|
-
label: WithRef<LabelProps, HTMLSpanElement>;
|
|
77
|
-
shortcut: WithRef<KeyboardProps, HTMLSpanElement>;
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
declare const ThMenuItem: ({ ref, id, SVGIcon, label, shortcut, compounds, children, ...props }: ThMenuItemProps) => react_jsx_runtime.JSX.Element;
|
|
81
|
-
|
|
82
82
|
interface ThNumberFieldProps extends Omit<NumberFieldProps, "minValue" | "maxValue" | "decrementAriaLabel" | "incrementAriaLabel"> {
|
|
83
83
|
ref?: React.ForwardedRef<HTMLInputElement>;
|
|
84
84
|
onReset?: () => void;
|
|
@@ -151,7 +151,7 @@ interface ThRadioGroupProps extends RadioGroupProps {
|
|
|
151
151
|
radioLabel?: HTMLAttributesWithRef<HTMLSpanElement>;
|
|
152
152
|
};
|
|
153
153
|
}
|
|
154
|
-
declare const ThRadioGroup: ({ ref, label, items, compounds, children, ...props }: ThRadioGroupProps) => react_jsx_runtime.JSX.Element | undefined;
|
|
154
|
+
declare const ThRadioGroup: ({ ref, label, items, compounds, children, value, ...props }: ThRadioGroupProps) => react_jsx_runtime.JSX.Element | undefined;
|
|
155
155
|
|
|
156
156
|
interface ThSliderProps extends Omit<SliderProps, "minValue" | "maxValue"> {
|
|
157
157
|
ref?: React.ForwardedRef<HTMLDivElement>;
|
|
@@ -213,6 +213,43 @@ interface ThSwitchProps extends SwitchProps {
|
|
|
213
213
|
}
|
|
214
214
|
declare const ThSwitch: ({ ref, label, compounds, heading, ...props }: ThSwitchProps) => react_jsx_runtime.JSX.Element;
|
|
215
215
|
|
|
216
|
+
interface ThDropdownEntry {
|
|
217
|
+
id: string;
|
|
218
|
+
label: string;
|
|
219
|
+
value: string;
|
|
220
|
+
}
|
|
221
|
+
interface ThDropdownProps extends SelectProps {
|
|
222
|
+
ref?: React__default.ForwardedRef<HTMLDivElement>;
|
|
223
|
+
label?: string;
|
|
224
|
+
items?: Iterable<ThDropdownEntry>;
|
|
225
|
+
children?: never;
|
|
226
|
+
compounds?: {
|
|
227
|
+
/**
|
|
228
|
+
* Props for the label component. See `LabelProps` for more information.
|
|
229
|
+
*/
|
|
230
|
+
label?: WithRef<LabelProps, HTMLLabelElement>;
|
|
231
|
+
/**
|
|
232
|
+
* Props for the button component. See `ThDropdownButtonProps` for more information.
|
|
233
|
+
* Alternatively you can provide your own Button component
|
|
234
|
+
*/
|
|
235
|
+
button?: WithRef<ButtonProps, HTMLButtonElement> | React__default.ReactElement<typeof Button>;
|
|
236
|
+
/**
|
|
237
|
+
* Props for the popover component. See `PopoverProps` for more information.
|
|
238
|
+
*/
|
|
239
|
+
popover?: WithRef<PopoverProps, HTMLDivElement>;
|
|
240
|
+
/**
|
|
241
|
+
* Props for the listbox component. See `LisboxProps` for more information.
|
|
242
|
+
* Alternatively you can provide your own Listbox component
|
|
243
|
+
*/
|
|
244
|
+
listbox?: WithRef<ListBoxProps<ThDropdownEntry>, HTMLDivElement> | React__default.ReactElement<typeof ListBox | HTMLDivElement>;
|
|
245
|
+
/**
|
|
246
|
+
* Props for the listboxItem component. See `ListBoxItemProps` for more information.
|
|
247
|
+
*/
|
|
248
|
+
listboxItem?: ListBoxItemProps<ThDropdownEntry>;
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
declare const ThDropdown: ({ ref, label, items, compounds, ...props }: ThDropdownProps) => react_jsx_runtime.JSX.Element | null;
|
|
252
|
+
|
|
216
253
|
interface ThSettingsEntry {
|
|
217
254
|
Comp: React.ComponentType<any>;
|
|
218
255
|
}
|
|
@@ -240,4 +277,4 @@ interface ThSettingsWrapperProps extends HTMLAttributesWithRef<HTMLDivElement> {
|
|
|
240
277
|
}
|
|
241
278
|
declare const ThSettingsWrapper: ({ ref, items, prefs, compounds, ...props }: ThSettingsWrapperProps) => react_jsx_runtime.JSX.Element | undefined;
|
|
242
279
|
|
|
243
|
-
export { type HTMLAttributesWithRef as H, type ThActionButtonProps as T, type WithRef as W, type ThCollapsibleActionsBarProps as a, ThCollapsibleActionsBar as b, ThActionButton as c, type THMenuProps as d, ThMenu as e, type ThMenuItemProps as f, ThMenuItem as g, type ThNumberFieldProps as h, ThNumberField as i, type ThRadioGroupItems as j, type ThRadioGroupProps as k, ThRadioGroup as l, type ThSliderProps as m, ThSlider as n, type ThSwitchProps as o, ThSwitch as p, type
|
|
280
|
+
export { type HTMLAttributesWithRef as H, type ThActionButtonProps as T, type WithRef as W, type ThCollapsibleActionsBarProps as a, ThCollapsibleActionsBar as b, ThActionButton as c, type THMenuProps as d, ThMenu as e, type ThMenuItemProps as f, ThMenuItem as g, type ThNumberFieldProps as h, ThNumberField as i, type ThRadioGroupItems as j, type ThRadioGroupProps as k, ThRadioGroup as l, type ThSliderProps as m, ThSlider as n, type ThSwitchProps as o, ThSwitch as p, type ThDropdownEntry as q, type ThDropdownProps as r, ThDropdown as s, type ThSettingsEntry as t, type ThSettingsPrefs as u, type ThSettingsWrapperProps as v, ThSettingsWrapper as w };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
2
|
-
import {
|
|
2
|
+
import { c as ThDockingKeys } from './enums-CBaXSsr9.mjs';
|
|
3
3
|
|
|
4
4
|
type PrimitiveType = number | string | boolean;
|
|
5
5
|
/** Object types that should never be mapped */
|
|
@@ -132,4 +132,4 @@ declare const setDockPanelWidth: _reduxjs_toolkit.ActionCreatorWithPayload<{
|
|
|
132
132
|
width: number;
|
|
133
133
|
}, "actions/setDockPanelWidth">;
|
|
134
134
|
|
|
135
|
-
export { type
|
|
135
|
+
export { type ActionsStateKeys as A, type DockStateObject as D, type OverflowStateKeys as O, type WritableDraft as W, type ActionStateObject as a, type OverflowStateObject as b, type ActionStateDockPayload as c, type ActionStateOpenPayload as d, type ActionStateTogglePayload as e, type ActionOverflowOpenPayload as f, type ActionStateDockedPayload as g, type ActionStateSlotPayload as h, type ActionStateSlotWidthPayload as i, type DockState as j, type ActionsReducerState as k, actionsSlice as l, dockAction as m, setOverflow as n, activateDockPanel as o, deactivateDockPanel as p, collapseDockPanel as q, expandDockPanel as r, setActionOpen as s, toggleActionOpen as t, setDockPanelWidth as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { usePreferences } from './chunk-
|
|
1
|
+
import { usePreferences } from './chunk-DHFW75RZ.mjs';
|
|
2
2
|
import { initReactI18next, I18nextProvider, useTranslation } from 'react-i18next';
|
|
3
3
|
export { Trans } from 'react-i18next';
|
|
4
4
|
import { useState, useEffect } from 'react';
|
|
@@ -80,5 +80,5 @@ var useI18n = (ns = "thorium-web") => {
|
|
|
80
80
|
};
|
|
81
81
|
|
|
82
82
|
export { DEFAULT_CONFIG, ThI18nProvider, initI18n, useI18n };
|
|
83
|
-
//# sourceMappingURL=chunk-
|
|
84
|
-
//# sourceMappingURL=chunk-
|
|
83
|
+
//# sourceMappingURL=chunk-3KRYGUCM.mjs.map
|
|
84
|
+
//# sourceMappingURL=chunk-3KRYGUCM.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/i18n/config.ts","../src/i18n/ThI18nProvider.tsx","../src/i18n/useI18n.ts"],"names":["i18n"],"mappings":";;;;;;;;;;AAMO,IAAM,cAAA,GAA8B;AAAA,EACzC,WAAA,EAAa,IAAA;AAAA,EACb,IAAA,EAAM,KAAA;AAAA,EACN,wBAAA,EAA0B,IAAA;AAAA,EAC1B,SAAA,EAAW;AAAA,IACT,KAAA,EAAO,CAAC,WAAW,CAAA;AAAA,IACnB,QAAQ;AAAC,GACX;AAAA,EACA,aAAA,EAAe;AAAA,IACb,WAAA,EAAa;AAAA,GACf;AAAA,EACA,OAAA,EAAS;AAAA,IACP,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,EAAA,EAAI,CAAC,aAAa,CAAA;AAAA,EAClB,SAAA,EAAW;AACb;AAEO,IAAM,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;AAAA,IAEL,CAAA;AAAA;AAAA,IAEA,IAAA,EAAAA,KAAAA;AAAA;AAAA,IAEA,KAAA;AAAA;AAAA,IAEA,iBAAiBA,KAAAA,CAAK,QAAA;AAAA;AAAA,IAEtB,WAAWA,KAAAA,CAAK,SAAA;AAAA;AAAA,IAEhB;AAAA,GACF;AACF","file":"chunk-3KRYGUCM.mjs","sourcesContent":["import i18n from \"i18next\";\nimport { initReactI18next } from \"react-i18next\";\nimport LanguageDetector from \"i18next-browser-languagedetector\";\nimport Backend from \"i18next-http-backend\";\nimport { InitOptions } from \"i18next\";\n\nexport const DEFAULT_CONFIG: InitOptions = {\n fallbackLng: \"en\",\n load: \"all\",\n nonExplicitSupportedLngs: true,\n detection: {\n order: [\"navigator\"],\n caches: []\n },\n interpolation: {\n escapeValue: false\n },\n backend: {\n loadPath: \"/locales/{{lng}}/{{ns}}.json\"\n },\n ns: [\"thorium-web\"],\n defaultNS: \"thorium-web\"\n};\n\nexport const initI18n = async (options: Partial<InitOptions> = {}) => {\n if (i18n.isInitialized) {\n return i18n;\n }\n\n return i18n\n .use(Backend)\n .use(LanguageDetector)\n .use(initReactI18next)\n .init({\n ...DEFAULT_CONFIG,\n ...options\n });\n};\n\nexport { i18n };","\"use client\";\n\nimport React, { ReactNode, useEffect, useState } from \"react\";\nimport { I18nextProvider } from \"react-i18next\";\nimport { i18n, initI18n } from \"./config\";\nimport { InitOptions } from \"i18next\";\nimport { usePreferences } from \"@/preferences\";\n\nexport type ThI18nProviderProps = {\n children: ReactNode;\n} & Partial<InitOptions>;\n\nexport const ThI18nProvider = ({\n children,\n ...options\n}: ThI18nProviderProps) => {\n const { preferences } = usePreferences();\n const [isInitialized, setIsInitialized] = useState(false);\n \n useEffect(() => {\n if (!i18n.isInitialized) { \n initI18n({\n ...options,\n lng: preferences?.locale || options.lng,\n }).then(() => setIsInitialized(true));\n }\n });\n\n useEffect(() => {\n if (isInitialized && preferences?.locale) {\n i18n.changeLanguage(preferences.locale);\n }\n }, [preferences?.locale, isInitialized]);\n\n if (!isInitialized) {\n return null;\n }\n\n return <I18nextProvider i18n={ i18n }>{ children }</I18nextProvider>;\n};\n\nexport default ThI18nProvider;\n","import { useTranslation } from \"react-i18next\";\n\n/**\n * Hook to access the i18n instance and translation functions\n * @param ns The namespace to use for translations (defaults to DEFAULT_NAMESPACE)\n * @returns Translation functions and i18n instance\n */\nexport const useI18n = (ns: string = \"thorium-web\") => {\n const { t, i18n, ready } = useTranslation(ns);\n \n // Helper function to change language\n const changeLanguage = (lng: string) => {\n return i18n.changeLanguage(lng);\n };\n\n return {\n // Translation function\n t,\n // i18n instance\n i18n,\n // Whether translations are loaded\n ready,\n // Current language\n currentLanguage: i18n.language,\n // List of available languages\n languages: i18n.languages,\n // Function to change language\n changeLanguage\n };\n};\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var getPlatform = () => {
|
|
3
3
|
if (typeof window !== "undefined") {
|
|
4
4
|
const nav = window.navigator;
|
|
5
|
-
if (
|
|
5
|
+
if (nav.userAgentData) {
|
|
6
6
|
return nav.userAgentData.platform.toLowerCase();
|
|
7
7
|
}
|
|
8
8
|
if (typeof nav.platform !== "undefined") {
|
|
@@ -117,5 +117,5 @@ var buildShortcut = (str) => {
|
|
|
117
117
|
};
|
|
118
118
|
|
|
119
119
|
export { UnstableShortcutMetaKeywords, UnstableShortcutRepresentation, buildShortcut, defaultPlatformModifier, getPlatform, getPlatformModifier, isIOSish, isIpadOS, isMacish, metaKeys };
|
|
120
|
-
//# sourceMappingURL=chunk-
|
|
121
|
-
//# sourceMappingURL=chunk-
|
|
120
|
+
//# sourceMappingURL=chunk-5LUMM7FW.mjs.map
|
|
121
|
+
//# sourceMappingURL=chunk-5LUMM7FW.mjs.map
|