@edrlab/thorium-web 1.3.0 → 1.4.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-D0rzsGRl.d.mts → ThPreferencesAdapter-L1H6gzmu.d.mts} +23 -6
- package/dist/{ThSettingsWrapper-BXuRgdqp.d.mts → ThSettingsWrapper-DWEA4hYF.d.mts} +1 -1
- package/dist/{actions-BLAr0oaM.d.mts → actions-BjeRjaJU.d.mts} +1 -1
- package/dist/{actionsReducer-BhG1wicI.d.mts → actionsReducer-B32cq2mB.d.mts} +11 -4
- package/dist/{chunk-L4XGZAZ5.mjs → chunk-2YRT7RNW.mjs} +20 -3
- package/dist/chunk-2YRT7RNW.mjs.map +1 -0
- package/dist/{chunk-UCTMVCW7.mjs → chunk-6MONB2DN.mjs} +91 -63
- package/dist/chunk-6MONB2DN.mjs.map +1 -0
- package/dist/chunk-A575ZW4A.mjs +10 -0
- package/dist/chunk-A575ZW4A.mjs.map +1 -0
- package/dist/chunk-AE6P4KJB.mjs +13 -0
- package/dist/chunk-AE6P4KJB.mjs.map +1 -0
- package/dist/{chunk-OWHP7ONM.mjs → chunk-IVXRCKWR.mjs} +4 -4
- package/dist/{chunk-OWHP7ONM.mjs.map → chunk-IVXRCKWR.mjs.map} +1 -1
- package/dist/{chunk-RRVLWDT3.mjs → chunk-KVUG6BNI.mjs} +92 -27
- package/dist/chunk-KVUG6BNI.mjs.map +1 -0
- package/dist/{chunk-IYAFKTPL.mjs → chunk-NUXGQWED.mjs} +7 -5
- package/dist/chunk-NUXGQWED.mjs.map +1 -0
- package/dist/{chunk-4ODYHZKD.mjs → chunk-P6ILEQ5P.mjs} +49 -51
- package/dist/chunk-P6ILEQ5P.mjs.map +1 -0
- package/dist/{chunk-D7MFLHXV.mjs → chunk-PXXWEMNL.mjs} +951 -592
- package/dist/chunk-PXXWEMNL.mjs.map +1 -0
- package/dist/{chunk-T2E6MRVP.mjs → chunk-QUSGPT5M.mjs} +11 -12
- package/dist/chunk-QUSGPT5M.mjs.map +1 -0
- package/dist/{chunk-XBZWGRDM.mjs → chunk-SZAVAQ6S.mjs} +30 -6
- package/dist/chunk-SZAVAQ6S.mjs.map +1 -0
- package/dist/{chunk-3LDWKC5N.mjs → chunk-T5ENYSDJ.mjs} +5 -5
- package/dist/chunk-T5ENYSDJ.mjs.map +1 -0
- package/dist/{chunk-4TVEDX7L.mjs → chunk-TSLTLQ6O.mjs} +127 -41
- package/dist/chunk-TSLTLQ6O.mjs.map +1 -0
- package/dist/{chunk-ITDBOMY5.mjs → chunk-VENFFPK2.mjs} +3 -3
- package/dist/{chunk-ITDBOMY5.mjs.map → chunk-VENFFPK2.mjs.map} +1 -1
- package/dist/{chunk-YZ3KCMKY.mjs → chunk-WLVE3WNW.mjs} +238 -58
- package/dist/chunk-WLVE3WNW.mjs.map +1 -0
- package/dist/chunk-XRFLDNAY.mjs +3913 -0
- package/dist/chunk-XRFLDNAY.mjs.map +1 -0
- package/dist/components/Audio/index.d.mts +12 -12
- package/dist/components/Audio/index.mjs +14 -14
- package/dist/components/Epub/index.css +3 -3
- package/dist/components/Epub/index.css.map +1 -1
- package/dist/components/Epub/index.d.mts +12 -12
- package/dist/components/Epub/index.mjs +15 -15
- package/dist/components/Misc/index.css +2 -2
- package/dist/components/Misc/index.css.map +1 -1
- package/dist/components/Misc/index.mjs +4 -4
- package/dist/components/Reader/index.css +5 -5
- package/dist/components/Reader/index.css.map +1 -1
- package/dist/components/Reader/index.d.mts +11 -11
- package/dist/components/Reader/index.mjs +26 -24
- package/dist/components/Reader/index.mjs.map +1 -1
- package/dist/components/WebPub/index.css +3 -3
- package/dist/components/WebPub/index.css.map +1 -1
- package/dist/components/WebPub/index.d.mts +12 -12
- package/dist/components/WebPub/index.mjs +15 -15
- package/dist/core/Components/index.d.mts +11 -21
- package/dist/core/Components/index.mjs +1 -1
- package/dist/core/Helpers/index.d.mts +1 -1
- package/dist/core/Helpers/index.mjs +2 -3
- package/dist/core/Hooks/index.d.mts +12 -8
- package/dist/core/Hooks/index.mjs +1 -1
- package/dist/i18n/index.mjs +3 -6
- package/dist/lib/index.d.mts +49 -20
- package/dist/lib/index.mjs +3 -2
- package/dist/locales/da/thorium-shared.json +3 -0
- package/dist/locales/en/thorium-shared.json +24 -2
- package/dist/locales/en/thorium-web.json +2 -2
- package/dist/locales/es/thorium-shared.json +364 -0
- package/dist/locales/es/thorium-web.json +130 -0
- package/dist/locales/et/thorium-shared.json +121 -9
- package/dist/locales/et/thorium-web.json +32 -1
- package/dist/locales/fi/thorium-shared.json +42 -4
- package/dist/locales/fi/thorium-web.json +36 -2
- package/dist/locales/fr/thorium-shared.json +108 -1
- package/dist/locales/fr/thorium-web.json +121 -86
- package/dist/locales/it/thorium-shared.json +108 -1
- package/dist/locales/it/thorium-web.json +15 -2
- package/dist/locales/lt/thorium-web.json +10 -1
- package/dist/locales/pl/thorium-web.json +1 -1
- package/dist/locales/pt-BR/thorium-shared.json +6 -0
- package/dist/locales/pt-BR/thorium-web.json +88 -88
- package/dist/locales/pt-PT/thorium-shared.json +91 -0
- package/dist/locales/pt-PT/thorium-web.json +15 -3
- package/dist/locales/sv/thorium-shared.json +108 -2
- package/dist/locales/sv/thorium-web.json +15 -3
- package/dist/locales/tr/thorium-shared.json +42 -0
- package/dist/preferences/index.d.mts +59 -13
- package/dist/preferences/index.mjs +6 -6
- package/dist/{settingsReducer-Bu1zeveu.d.mts → settingsReducer-DLaT2wUB.d.mts} +14 -2
- package/dist/{ui-nBv8gfr0.d.mts → ui-DnZZhozX.d.mts} +1 -1
- package/dist/{useAudioNavigator-C5aW4-eT.d.mts → useAudioNavigator-CWXyNWq1.d.mts} +3 -1
- package/dist/{useContrast-2t429O9O.d.mts → useContrast-Bo7cDw_X.d.mts} +5 -1
- package/dist/{usePreferences-VaBf46eP.d.mts → usePreferences-D8NU1yhP.d.mts} +6 -8
- package/dist/{useReaderTransitions-JDzlBFsu.d.mts → useReaderTransitions-BQGzKeY2.d.mts} +61 -10
- package/package.json +12 -11
- package/dist/chunk-3LDWKC5N.mjs.map +0 -1
- package/dist/chunk-4ODYHZKD.mjs.map +0 -1
- package/dist/chunk-4TVEDX7L.mjs.map +0 -1
- package/dist/chunk-7CGMWOZN.mjs +0 -20
- package/dist/chunk-7CGMWOZN.mjs.map +0 -1
- package/dist/chunk-C236BQQB.mjs +0 -1725
- package/dist/chunk-C236BQQB.mjs.map +0 -1
- package/dist/chunk-D7MFLHXV.mjs.map +0 -1
- package/dist/chunk-IYAFKTPL.mjs.map +0 -1
- package/dist/chunk-L4XGZAZ5.mjs.map +0 -1
- package/dist/chunk-RRVLWDT3.mjs.map +0 -1
- package/dist/chunk-T2E6MRVP.mjs.map +0 -1
- package/dist/chunk-UCTMVCW7.mjs.map +0 -1
- package/dist/chunk-WECWPYZB.mjs +0 -1950
- package/dist/chunk-WECWPYZB.mjs.map +0 -1
- package/dist/chunk-XBZWGRDM.mjs.map +0 -1
- package/dist/chunk-YZ3KCMKY.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _readium_navigator from '@readium/navigator';
|
|
2
|
-
import { EpubNavigatorListeners, IEpubPreferences, IEpubDefaults, IInjectablesConfig, IContentProtectionConfig, EpubSettings, WebPubNavigatorListeners, IWebPubPreferences, IWebPubDefaults, WebPubSettings, AudioNavigatorListeners, IAudioPreferences, IAudioDefaults } from '@readium/navigator';
|
|
2
|
+
import { EpubNavigatorListeners, IEpubPreferences, IEpubDefaults, IInjectablesConfig, IContentProtectionConfig, EpubSettings, ScriptMode, WebPubNavigatorListeners, IWebPubPreferences, IWebPubDefaults, WebPubSettings, AudioNavigatorListeners, IAudioPreferences, IAudioDefaults } from '@readium/navigator';
|
|
3
3
|
import { Publication, Locator, Link, Layout, Timeline } from '@readium/shared';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
|
|
@@ -37,6 +37,7 @@ declare const useEpubNavigator: () => {
|
|
|
37
37
|
getSetting: <K extends keyof EpubSettings>(settingKey: K) => EpubSettings[K];
|
|
38
38
|
submitPreferences: (preferences: IEpubPreferences) => Promise<void>;
|
|
39
39
|
getCframes: () => (_readium_navigator.FXLFrameManager | _readium_navigator.FrameManager | undefined)[] | undefined;
|
|
40
|
+
getScriptMode: () => ScriptMode | undefined;
|
|
40
41
|
onFXLPositionChange: (cb: (locator: Locator) => void) => void;
|
|
41
42
|
};
|
|
42
43
|
|
|
@@ -72,6 +73,7 @@ declare const useWebPubNavigator: () => {
|
|
|
72
73
|
getSetting: <K extends keyof WebPubSettings>(settingKey: K) => WebPubSettings[K];
|
|
73
74
|
submitPreferences: (preferences: IWebPubPreferences) => Promise<void>;
|
|
74
75
|
getCframes: () => (_readium_navigator.WebPubFrameManager | undefined)[] | undefined;
|
|
76
|
+
getScriptMode: () => ScriptMode | undefined;
|
|
75
77
|
};
|
|
76
78
|
|
|
77
79
|
interface AudioSettings {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ThSheetHeaderVariant } from './actions-
|
|
1
|
+
import { a as ThSheetHeaderVariant } from './actions-BjeRjaJU.mjs';
|
|
2
2
|
|
|
3
3
|
type I18nValue<T> = T | string | {
|
|
4
4
|
key: string;
|
|
@@ -35,7 +35,9 @@ declare enum ThSettingsKeys {
|
|
|
35
35
|
hyphens = "hyphens",
|
|
36
36
|
layout = "layout",
|
|
37
37
|
letterSpacing = "letterSpacing",
|
|
38
|
+
ligatures = "ligatures",
|
|
38
39
|
lineHeight = "lineHeight",
|
|
40
|
+
noRuby = "noRuby",
|
|
39
41
|
paragraphIndent = "paragraphIndent",
|
|
40
42
|
paragraphSpacing = "paragraphSpacing",
|
|
41
43
|
publisherStyles = "publisherStyles",
|
|
@@ -52,6 +54,8 @@ declare enum ThTextSettingsKeys {
|
|
|
52
54
|
fontFamily = "fontFamily",
|
|
53
55
|
fontWeight = "fontWeight",
|
|
54
56
|
hyphens = "hyphens",
|
|
57
|
+
ligatures = "ligatures",
|
|
58
|
+
noRuby = "noRuby",
|
|
55
59
|
textAlign = "textAlign",
|
|
56
60
|
textNormalize = "textNormalize"
|
|
57
61
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { e as UnstableShortcutRepresentation } from './keyboardUtilities-BWAyLS_D.mjs';
|
|
2
|
-
import { T as
|
|
3
|
-
import { T as ThThemeKeys, A as ActionKey, a as ThemeTokens, b as AudioContentProtectionConfig, C as CustomizableKeys, D as DefaultKeys, c as ThPreferencesAdapter, d as ThPreferences, W as WeightConfig, V as VariableFontRangeConfig, F as FontCollection } from './ThPreferencesAdapter-
|
|
4
|
-
import { b as ThAudioActionsTokens, c as ThActionsTokens, d as ThCollapsibility, e as ThSheetTypes, f as ThDockingPref, T as ThDockingKeys } from './actions-
|
|
5
|
-
import { d as ThSettingsRangePrefRequired } from './useContrast-
|
|
2
|
+
import { T as ThBackLinkPref, a as ThAudioPlayerComponent, b as ThPublicationMetadataOrder, c as ThAudioProgressBarVariant, B as BreakpointsMap } from './ui-DnZZhozX.mjs';
|
|
3
|
+
import { T as ThThemeKeys, A as ActionKey, a as ThemeTokens, b as AudioContentProtectionConfig, C as CustomizableKeys, D as DefaultKeys, c as ThPreferencesAdapter, d as ThPreferences, W as WeightConfig, V as VariableFontRangeConfig, F as FontCollection } from './ThPreferencesAdapter-L1H6gzmu.mjs';
|
|
4
|
+
import { b as ThAudioActionsTokens, c as ThActionsTokens, d as ThCollapsibility, e as ThSheetTypes, f as ThDockingPref, T as ThDockingKeys } from './actions-BjeRjaJU.mjs';
|
|
5
|
+
import { d as ThSettingsRangePrefRequired } from './useContrast-Bo7cDw_X.mjs';
|
|
6
6
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
|
-
import { ILinkInjectable, IUrlInjectable, IBlobInjectable } from '@readium/navigator';
|
|
7
|
+
import { ILinkInjectable, IUrlInjectable, IBlobInjectable, ScriptMode } from '@readium/navigator';
|
|
8
8
|
|
|
9
9
|
declare enum ThAudioActionKeys {
|
|
10
10
|
toc = "audio.toc",
|
|
@@ -115,8 +115,6 @@ interface ThAudioActionsPref<K extends AudioCustomizableKeys = {}> {
|
|
|
115
115
|
}
|
|
116
116
|
type ThAudioConstraintKeys = Extract<ThSheetTypes, ThSheetTypes.bottomSheet | ThSheetTypes.popover | ThSheetTypes.modal> | "cover";
|
|
117
117
|
interface ThAudioPreferences<K extends AudioCustomizableKeys = {}> {
|
|
118
|
-
direction?: ThLayoutDirection;
|
|
119
|
-
locale?: string;
|
|
120
118
|
theming: {
|
|
121
119
|
header?: {
|
|
122
120
|
backLink?: ThBackLinkPref | null;
|
|
@@ -224,7 +222,7 @@ declare function usePreferences<K extends CustomizableKeys = DefaultKeys>(): {
|
|
|
224
222
|
key?: string;
|
|
225
223
|
}) => FontCollection;
|
|
226
224
|
getFontMetadata: (fontId: string) => FontMetadata;
|
|
227
|
-
resolveFontLanguage: (bcp47Tag: string | undefined,
|
|
225
|
+
resolveFontLanguage: (bcp47Tag: string | undefined, scriptMode: ScriptMode) => string;
|
|
228
226
|
};
|
|
229
227
|
|
|
230
228
|
export { type AudioDefaultKeys as A, defaultAudioPlaybackRateAction as B, defaultAudioSleepTimerAction as C, defaultAudioRemotePlaybackAction as D, defaultAudioTocAction as E, ThPreferencesProvider as T, type ThAudioPreferences as a, type AudioCustomizableKeys as b, type ThAudioPreferencesAdapter as c, ThAudioAffordance as d, type ThAudioThemeKeys as e, type ThAudioThemeKey as f, type AudioSettingsKey as g, type ThAudioKeyTypes as h, type ThAudioActionKey as i, type ThAudioActionsPref as j, type ThAudioConstraintKeys as k, createAudioPreferences as l, ThAudioActionKeys as m, ThAudioKeys as n, ThSettingsTimerVariant as o, type ThSettingsTimerPref as p, type ThAudioSettingsKeys as q, defaultAudioVolume as r, defaultAudioPlaybackRate as s, defaultAudioSkipBackwardInterval as t, usePreferences as u, defaultAudioSkipForwardInterval as v, defaultAudioSkipInterval as w, defaultAudioSleepTimer as x, defaultAudioSleepTimerPresetList as y, defaultAudioVolumeAction as z };
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
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-
|
|
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-BjeRjaJU.mjs';
|
|
4
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-
|
|
6
|
-
import { h as ThTextSettingsKeys, b as ThSpacingSettingsKeys, j as ThSettingsGroupPref, a as ThSpacingPresetKeys, T as ThLineHeightOptions } from './useContrast-
|
|
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-DWEA4hYF.mjs';
|
|
6
|
+
import { h as ThTextSettingsKeys, b as ThSpacingSettingsKeys, j as ThSettingsGroupPref, o as ThSettingsRangePlaceholder, g as ThSettingsKeys, a as ThSpacingPresetKeys, T as ThLineHeightOptions } from './useContrast-Bo7cDw_X.mjs';
|
|
7
7
|
import { PressEvent } from 'react-aria';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { f as SettingsReducerState } from './settingsReducer-DLaT2wUB.mjs';
|
|
9
|
+
import { WebPubSettingsReducerState, ReaderProfile } from './lib/index.mjs';
|
|
10
|
+
import { A as ActionsStateKeys } from './actionsReducer-B32cq2mB.mjs';
|
|
11
|
+
import { d as ThPreferences, D as DefaultKeys, e as ThGlobalPreferences, C as CustomizableKeys, c as ThPreferencesAdapter } from './ThPreferencesAdapter-L1H6gzmu.mjs';
|
|
10
12
|
import * as _readium_navigator from '@readium/navigator';
|
|
11
|
-
import { EpubSettings, WebPubSettings, FXLFrameManager, FrameManager, WebPubFrameManager } from '@readium/navigator';
|
|
13
|
+
import { EpubSettings, WebPubSettings, FXLFrameManager, FrameManager, ScriptMode, WebPubFrameManager } from '@readium/navigator';
|
|
12
14
|
import * as _readium_shared from '@readium/shared';
|
|
13
15
|
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-
|
|
15
|
-
import { a as ThAudioPreferences, c as ThAudioPreferencesAdapter } from './usePreferences-
|
|
16
|
+
import { E as EpubNavigatorLoadProps, W as WebPubNavigatorLoadProps, A as AudioNavigatorLoadProps, c as AudioSettings, a as useEpubNavigator, b as useWebPubNavigator, u as useAudioNavigator } from './useAudioNavigator-CWXyNWq1.mjs';
|
|
17
|
+
import { a as ThAudioPreferences, c as ThAudioPreferencesAdapter } from './usePreferences-D8NU1yhP.mjs';
|
|
16
18
|
import { InitOptions } from 'i18next';
|
|
17
|
-
import { ReaderProfile } from './lib/index.mjs';
|
|
18
19
|
import { P as ProcessedError } from './errorHandler-CL2YIfQY.mjs';
|
|
19
20
|
|
|
20
21
|
interface StatefulActionsMapObject {
|
|
@@ -203,6 +204,44 @@ declare const useGridNavigation: ({ containerRef, items, currentValue, onChange,
|
|
|
203
204
|
|
|
204
205
|
declare const useGridTemplate: (ref: React.RefObject<HTMLDivElement | null>, type?: "columns" | "rows") => number | null;
|
|
205
206
|
|
|
207
|
+
declare const usePlaceholder: (placeholder: ThSettingsRangePlaceholder | string | {
|
|
208
|
+
key: string;
|
|
209
|
+
fallback?: string;
|
|
210
|
+
} | undefined, range: [number, number], format?: "percent" | "number" | "multiplier") => string | undefined;
|
|
211
|
+
|
|
212
|
+
type SharedSettingsKey = keyof SettingsReducerState & keyof WebPubSettingsReducerState;
|
|
213
|
+
declare function useReaderSetting(key: "zoom"): number;
|
|
214
|
+
declare function useReaderSetting<K extends SharedSettingsKey>(key: K): SettingsReducerState[K];
|
|
215
|
+
|
|
216
|
+
interface UseSettingsComponentStatusOptions {
|
|
217
|
+
/** The settings key to check (e.g., ThSettingsKeys.spacingPresets) */
|
|
218
|
+
settingsKey: ThSettingsKeys | ThTextSettingsKeys | ThSpacingSettingsKeys;
|
|
219
|
+
/** The publication type to determine which order array to check */
|
|
220
|
+
publicationType?: "reflow" | "fxl" | "webpub";
|
|
221
|
+
/** Optional additional condition that must be true for the component to be considered displayed */
|
|
222
|
+
additionalCondition?: boolean;
|
|
223
|
+
}
|
|
224
|
+
interface SettingsComponentStatus {
|
|
225
|
+
/** Whether the component is registered in the component map */
|
|
226
|
+
isComponentRegistered: boolean;
|
|
227
|
+
/** Whether the component is included in the main panel display order */
|
|
228
|
+
isInMainPanel: boolean;
|
|
229
|
+
/** Whether the component is included in the sub-panel display order */
|
|
230
|
+
isInSubPanel: boolean;
|
|
231
|
+
/** Whether the component is displayed (in either panel and meets additional conditions) */
|
|
232
|
+
isDisplayed: boolean;
|
|
233
|
+
/** Whether the component is currently being used (both registered AND displayed) */
|
|
234
|
+
isComponentUsed: boolean;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Generic hook to check if a settings component is registered and displayed.
|
|
238
|
+
* This abstracts the common pattern of checking component registration and display order.
|
|
239
|
+
*
|
|
240
|
+
* @param options - Configuration options for the component status check
|
|
241
|
+
* @returns Object containing various status flags for the component
|
|
242
|
+
*/
|
|
243
|
+
declare function useSettingsComponentStatus(options: UseSettingsComponentStatusOptions): SettingsComponentStatus;
|
|
244
|
+
|
|
206
245
|
interface StatefulSettingsItemProps {
|
|
207
246
|
standalone?: boolean;
|
|
208
247
|
}
|
|
@@ -286,6 +325,10 @@ declare const StatefulTextGroupContainer: () => react_jsx_runtime.JSX.Element;
|
|
|
286
325
|
|
|
287
326
|
declare const StatefulTextNormalize: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
|
|
288
327
|
|
|
328
|
+
declare const StatefulLigatures: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
|
|
329
|
+
|
|
330
|
+
declare const StatefulNoRuby: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
|
|
331
|
+
|
|
289
332
|
declare const StatefulPublisherStyles: ({ standalone }: StatefulSettingsItemProps) => react_jsx_runtime.JSX.Element;
|
|
290
333
|
|
|
291
334
|
declare const StatefulTheme: () => react_jsx_runtime.JSX.Element;
|
|
@@ -360,6 +403,11 @@ declare const StatefulPreferencesProvider: ({ children, initialPreferences }: {
|
|
|
360
403
|
initialPreferences?: ThPreferences<DefaultKeys>;
|
|
361
404
|
}) => react_jsx_runtime.JSX.Element;
|
|
362
405
|
|
|
406
|
+
declare const StatefulGlobalPreferencesProvider: ({ children, initialPreferences, }: {
|
|
407
|
+
children: ReactNode;
|
|
408
|
+
initialPreferences?: ThGlobalPreferences;
|
|
409
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
410
|
+
|
|
363
411
|
type VisualNavigator = ReturnType<typeof useEpubNavigator> | ReturnType<typeof useWebPubNavigator>;
|
|
364
412
|
type MediaNavigator = ReturnType<typeof useAudioNavigator>;
|
|
365
413
|
type AllVisualSettings = EpubSettings & WebPubSettings;
|
|
@@ -373,6 +421,7 @@ interface UnifiedNavigator {
|
|
|
373
421
|
goForward(animated: boolean, callback: NavigationCallback): void;
|
|
374
422
|
goBackward(animated: boolean, callback: NavigationCallback): void;
|
|
375
423
|
isVisual(): boolean;
|
|
424
|
+
getScriptMode(): ScriptMode | undefined;
|
|
376
425
|
getCframes?(): (FXLFrameManager | FrameManager | WebPubFrameManager | undefined)[] | undefined;
|
|
377
426
|
underlying: VisualNavigator | MediaNavigator;
|
|
378
427
|
}
|
|
@@ -399,6 +448,7 @@ declare const useNavigator: () => {
|
|
|
399
448
|
preferencesEditor: _readium_navigator.EpubPreferencesEditor | undefined;
|
|
400
449
|
submitPreferences: (preferences: _readium_navigator.IEpubPreferences) => Promise<void>;
|
|
401
450
|
getCframes: () => (FXLFrameManager | FrameManager | undefined)[] | undefined;
|
|
451
|
+
getScriptMode: () => ScriptMode | undefined;
|
|
402
452
|
onFXLPositionChange: (cb: (locator: Locator) => void) => void;
|
|
403
453
|
} | {
|
|
404
454
|
getSetting: <K extends keyof AllVisualSettings>(settingKey: K) => AllVisualSettings[K];
|
|
@@ -421,6 +471,7 @@ declare const useNavigator: () => {
|
|
|
421
471
|
preferencesEditor: _readium_navigator.WebPubPreferencesEditor | undefined;
|
|
422
472
|
submitPreferences: (preferences: _readium_navigator.IWebPubPreferences) => Promise<void>;
|
|
423
473
|
getCframes: () => (WebPubFrameManager | undefined)[] | undefined;
|
|
474
|
+
getScriptMode: () => ScriptMode | undefined;
|
|
424
475
|
};
|
|
425
476
|
readonly media: {
|
|
426
477
|
AudioNavigatorLoad: (config: AudioNavigatorLoadProps, cb: Function) => void;
|
|
@@ -527,4 +578,4 @@ interface ReaderTransitions {
|
|
|
527
578
|
}
|
|
528
579
|
declare const useReaderTransitions: () => ReaderTransitions;
|
|
529
580
|
|
|
530
|
-
export {
|
|
581
|
+
export { StatefulSpacingGroup 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, usePlaceholder as R, type StatefulActionsMapObject as S, type ThPlugin as T, useReaderSetting as U, useSettingsComponentStatus as V, type StatefulSettingsItemProps as W, StatefulLetterSpacing as X, StatefulLineHeight as Y, StatefulParagraphIndent as Z, StatefulParagraphSpacing as _, usePublication as a, StatefulSpacingGroupContainer as a0, StatefulSpacingPresets as a1, StatefulWordSpacing as a2, useLineHeight as a3, useSpacingPresets as a4, StatefulFontFamily as a5, UnstableStatefulFontWeight as a6, StatefulHyphens as a7, StatefulTextAlign as a8, StatefulTextGroup as a9, type PositionStorage as aA, type StatefulReaderProps as aB, type ThPluginFactory as aC, type ReaderPlugins as aD, type ReaderComponentProps as aE, StatefulReaderWrapper as aF, StatefulTextGroupContainer as aa, StatefulTextNormalize as ab, StatefulLigatures as ac, StatefulNoRuby as ad, StatefulPublisherStyles as ae, StatefulTheme as af, StatefulZoom as ag, type StatefulBottomSheetProps as ah, type ScrimPref as ai, StatefulBottomSheet as aj, type StatefulCompactPopoverSheetProps as ak, StatefulCompactPopoverSheet as al, type StatefulDockedSheetProps as am, StatefulDockedSheet as an, type StatefulFullScreenSheetProps as ao, StatefulFullScreenSheet as ap, type StatefulModalSheetProps as aq, StatefulModalSheet as ar, type StatefulPopoverSheetProps as as, StatefulPopoverSheet as at, type StatefulModalBaseProps as au, StatefulModalBase as av, StatefulSheetWrapper as aw, type StatefulSheet as ax, StatefulPreferencesProvider as ay, StatefulGlobalPreferencesProvider 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 };
|
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.4.0",
|
|
24
24
|
"private": false,
|
|
25
25
|
"files": [
|
|
26
26
|
"./dist"
|
|
@@ -64,10 +64,10 @@
|
|
|
64
64
|
"increment": "node scripts/increment.mjs"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
|
-
"@readium/css": "^2.0.
|
|
68
|
-
"@readium/navigator": "2.
|
|
69
|
-
"@readium/navigator-html-injectables": "2.
|
|
70
|
-
"@readium/shared": "2.2.0",
|
|
67
|
+
"@readium/css": "^2.0.2",
|
|
68
|
+
"@readium/navigator": "^2.5.0",
|
|
69
|
+
"@readium/navigator-html-injectables": "^2.4.0",
|
|
70
|
+
"@readium/shared": "^2.2.0",
|
|
71
71
|
"@reduxjs/toolkit": "^2.11.2",
|
|
72
72
|
"i18next": "^25.8.13",
|
|
73
73
|
"i18next-browser-languagedetector": "^8.2.1",
|
|
@@ -78,17 +78,17 @@
|
|
|
78
78
|
"react-aria-components": "^1.15.1",
|
|
79
79
|
"react-dom": "^19.2.4",
|
|
80
80
|
"react-i18next": "^16.5.4",
|
|
81
|
-
"react-modal-sheet": "
|
|
81
|
+
"react-modal-sheet": "5.2.1",
|
|
82
82
|
"react-redux": "^9.2.0",
|
|
83
83
|
"react-resizable-panels": "^3.0.6",
|
|
84
84
|
"react-stately": "^3.44.0"
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
87
|
"@edrlab/thorium-locales": "github:edrlab/thorium-locales",
|
|
88
|
-
"@readium/css": "^2.0.
|
|
89
|
-
"@readium/navigator": "2.
|
|
90
|
-
"@readium/navigator-html-injectables": "2.
|
|
91
|
-
"@readium/shared": "2.2.0",
|
|
88
|
+
"@readium/css": "^2.0.2",
|
|
89
|
+
"@readium/navigator": "^2.5.0",
|
|
90
|
+
"@readium/navigator-html-injectables": "^2.4.0",
|
|
91
|
+
"@readium/shared": "^2.2.0",
|
|
92
92
|
"@reduxjs/toolkit": "^2.11.2",
|
|
93
93
|
"classnames": "^2.5.1",
|
|
94
94
|
"colorthief": "^3.3.1",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"react-aria-components": "^1.15.1",
|
|
104
104
|
"react-dom": "^19.2.4",
|
|
105
105
|
"react-i18next": "^16.5.4",
|
|
106
|
-
"react-modal-sheet": "
|
|
106
|
+
"react-modal-sheet": "5.2.1",
|
|
107
107
|
"react-redux": "^9.2.0",
|
|
108
108
|
"react-resizable-panels": "^3.0.6",
|
|
109
109
|
"react-stately": "^3.44.0"
|
|
@@ -118,6 +118,7 @@
|
|
|
118
118
|
"esbuild-plugin-svgr": "^3.1.1",
|
|
119
119
|
"eslint": "^9.39.2",
|
|
120
120
|
"eslint-config-next": "16.1.6",
|
|
121
|
+
"eslint-plugin-unused-imports": "^4.4.1",
|
|
121
122
|
"glob": "^13.0.6",
|
|
122
123
|
"immer": "11.1.2",
|
|
123
124
|
"tsup": "^8.5.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/i18n/ThI18nProvider.tsx"],"names":[],"mappings":";;;;;;;AAYO,IAAM,iBAAiB,CAAC;AAAA,EAC7B,QAAA;AAAA,EACA,GAAG;AACL,CAAA,KAA2B;AACzB,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,oBAAA,EAAqB;AACxC,EAAA,MAAM,CAAC,aAAA,EAAe,gBAAgB,CAAA,GAAI,QAAA,CAAS,KAAK,aAAa,CAAA;AAErE,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,CAAC,KAAK,aAAA,EAAe;AACvB,MAAA,QAAA,CAAS;AAAA,QACP,GAAG,OAAA;AAAA,QACH,GAAA,EAAK,UAAU,OAAA,CAAQ;AAAA,OACxB,CAAA,CAAE,IAAA,CAAK,MAAM,gBAAA,CAAiB,IAAI,CAAC,CAAA;AAAA,IACtC;AAAA,EACF,CAAC,CAAA;AAED,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,iBAAiB,MAAA,EAAQ;AAC3B,MAAA,IAAA,CAAK,eAAe,MAAM,CAAA;AAAA,IAC5B;AAAA,EACF,CAAA,EAAG,CAAC,MAAA,EAAQ,aAAa,CAAC,CAAA;AAE1B,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,CAAC,aAAA,EAAe;AACpB,IAAA,MAAM,IAAA,GAAO,MAAA,IAAU,IAAA,CAAK,gBAAA,IAAoB,KAAK,QAAA,IAAY,IAAA;AACjE,IAAA,QAAA,CAAS,gBAAgB,IAAA,GAAO,IAAA;AAAA,EAClC,CAAA,EAAG,CAAC,MAAA,EAAQ,aAAa,CAAC,CAAA;AAE1B,EAAA,IAAI,CAAC,aAAA,EAAe;AAClB,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,uBAAO,GAAA,CAAC,eAAA,EAAA,EAAgB,IAAA,EAAgB,QAAA,EAAU,CAAA;AACpD","file":"chunk-3LDWKC5N.mjs","sourcesContent":["\"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 { useSharedPreferences } from \"@/preferences/hooks/useSharedPreferences\";\n\nexport type ThI18nProviderProps = {\n children: ReactNode;\n} & Partial<InitOptions>;\n\nexport const ThI18nProvider = ({\n children,\n ...options\n}: ThI18nProviderProps) => {\n const { locale } = useSharedPreferences();\n const [isInitialized, setIsInitialized] = useState(i18n.isInitialized);\n \n useEffect(() => {\n if (!i18n.isInitialized) { \n initI18n({\n ...options,\n lng: locale || options.lng,\n }).then(() => setIsInitialized(true));\n }\n });\n\n useEffect(() => {\n if (isInitialized && locale) {\n i18n.changeLanguage(locale);\n }\n }, [locale, isInitialized]);\n\n useEffect(() => {\n if (!isInitialized) return;\n const lang = locale || i18n.resolvedLanguage || i18n.language || \"en\";\n document.documentElement.lang = lang;\n }, [locale, isInitialized]);\n\n if (!isInitialized) {\n return null;\n }\n\n return <I18nextProvider i18n={ i18n }>{ children }</I18nextProvider>;\n};\n\nexport default ThI18nProvider;\n"]}
|