@edrlab/thorium-web 1.5.5 → 1.5.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/{ThPreferencesAdapter-B3a-f5v-.d.mts → ThPreferencesAdapter-GepvYoaL.d.mts} +4 -3
- package/dist/{ThSettingsWrapper-D4WIzlXA.d.mts → ThSettingsWrapper-DyYC678Q.d.mts} +1 -1
- package/dist/{actions-C33UN3Ji.d.mts → actions-CTg9C4C-.d.mts} +1 -1
- package/dist/{actionsReducer-Bzcj3wk3.d.mts → actionsReducer-Cnd7Cdh9.d.mts} +1 -1
- package/dist/{chunk-I572ZFCT.mjs → chunk-2YS5JTIR.mjs} +55 -35
- package/dist/chunk-2YS5JTIR.mjs.map +1 -0
- package/dist/{chunk-VYSDLACR.mjs → chunk-3R5JARA2.mjs} +3 -3
- package/dist/{chunk-VYSDLACR.mjs.map → chunk-3R5JARA2.mjs.map} +1 -1
- package/dist/{chunk-UOFADXXI.mjs → chunk-6DR4EAK3.mjs} +40 -47
- package/dist/chunk-6DR4EAK3.mjs.map +1 -0
- package/dist/chunk-7SMOXFAF.mjs +121 -0
- package/dist/chunk-7SMOXFAF.mjs.map +1 -0
- package/dist/{chunk-7A6UGSHQ.mjs → chunk-C6LWEQL2.mjs} +82 -69
- package/dist/chunk-C6LWEQL2.mjs.map +1 -0
- package/dist/{chunk-AEEGHJVM.mjs → chunk-CXKDZVAV.mjs} +113 -258
- package/dist/chunk-CXKDZVAV.mjs.map +1 -0
- package/dist/{chunk-GFSLVQIG.mjs → chunk-EREFYF5J.mjs} +3 -3
- package/dist/{chunk-GFSLVQIG.mjs.map → chunk-EREFYF5J.mjs.map} +1 -1
- package/dist/{chunk-G2M4MYVF.mjs → chunk-I765HTBI.mjs} +15 -109
- package/dist/chunk-I765HTBI.mjs.map +1 -0
- package/dist/{chunk-7AHUCM7Z.mjs → chunk-JXHRUQKP.mjs} +39 -16
- package/dist/chunk-JXHRUQKP.mjs.map +1 -0
- package/dist/{chunk-NJOWH5YK.mjs → chunk-MBWYHA4U.mjs} +43 -48
- package/dist/chunk-MBWYHA4U.mjs.map +1 -0
- package/dist/{chunk-NQ2ZSGCX.mjs → chunk-MFVZ5AEN.mjs} +7 -3
- package/dist/chunk-MFVZ5AEN.mjs.map +1 -0
- package/dist/{chunk-2YRT7RNW.mjs → chunk-QOU3R5ZT.mjs} +9 -3
- package/dist/chunk-QOU3R5ZT.mjs.map +1 -0
- package/dist/{chunk-N6MQQMTM.mjs → chunk-TNXLY2ZQ.mjs} +41 -18
- package/dist/chunk-TNXLY2ZQ.mjs.map +1 -0
- package/dist/components/Audio/index.d.mts +13 -13
- package/dist/components/Audio/index.mjs +10 -11
- package/dist/components/Epub/index.d.mts +13 -13
- package/dist/components/Epub/index.mjs +11 -12
- package/dist/components/Reader/index.d.mts +12 -12
- package/dist/components/Reader/index.mjs +18 -18
- package/dist/components/WebPub/index.d.mts +13 -13
- package/dist/components/WebPub/index.mjs +11 -12
- package/dist/core/Components/index.d.mts +6 -6
- package/dist/core/Helpers/index.d.mts +4 -4
- package/dist/core/Helpers/index.mjs +2 -2
- package/dist/core/Hooks/index.d.mts +14 -9
- package/dist/core/Hooks/index.mjs +4 -4
- package/dist/lib/index.d.mts +38 -27
- package/dist/lib/index.mjs +3 -4
- package/dist/locales/ar/thorium-shared.json +39 -0
- package/dist/locales/bg/thorium-web.json +23 -0
- package/dist/locales/brh/thorium-shared.json +1 -0
- package/dist/locales/brh/thorium-web.json +1 -0
- package/dist/locales/da/thorium-shared.json +3 -0
- package/dist/locales/el/thorium-web.json +41 -6
- package/dist/locales/en/thorium-shared.json +3 -0
- package/dist/locales/es/thorium-shared.json +3 -0
- package/dist/locales/et/thorium-shared.json +3 -0
- package/dist/locales/fi/thorium-shared.json +3 -0
- package/dist/locales/fi/thorium-web.json +3 -3
- package/dist/locales/fr/thorium-shared.json +3 -0
- package/dist/locales/he/thorium-shared.json +3 -1
- package/dist/locales/it/thorium-shared.json +3 -0
- package/dist/locales/lt/thorium-shared.json +36 -10
- package/dist/locales/pt-PT/thorium-shared.json +8 -5
- package/dist/locales/sv/thorium-shared.json +3 -3
- package/dist/locales/tr/thorium-shared.json +80 -0
- package/dist/preferences/index.d.mts +10 -10
- package/dist/preferences/index.mjs +4 -5
- package/dist/{settingsReducer-Pp9aoiiC.d.mts → settingsReducer-DRWEq8Cm.d.mts} +1 -1
- package/dist/{ui-DnZZhozX.d.mts → ui-DHQ_zvWn.d.mts} +7 -1
- package/dist/{useAudioNavigator-9RuOpLGB.d.mts → useAudioNavigator-B4NBPvmZ.d.mts} +4 -5
- package/dist/{useContrast-Bl08zDTU.d.mts → useContrast-Unp3534Z.d.mts} +1 -1
- package/dist/{usePreferences-Cy7-JN2x.d.mts → usePreferences-Bi-ptif0.d.mts} +6 -9
- package/dist/usePublicationProgress-DT-X5ZLf.d.mts +44 -0
- package/dist/{useReaderTransitions-BsTdWZDK.d.mts → useReaderTransitions-B9fOF61y.d.mts} +10 -14
- package/package.json +23 -15
- package/dist/chunk-2YRT7RNW.mjs.map +0 -1
- package/dist/chunk-7A6UGSHQ.mjs.map +0 -1
- package/dist/chunk-7AHUCM7Z.mjs.map +0 -1
- package/dist/chunk-A575ZW4A.mjs +0 -10
- package/dist/chunk-A575ZW4A.mjs.map +0 -1
- package/dist/chunk-AEEGHJVM.mjs.map +0 -1
- package/dist/chunk-G2M4MYVF.mjs.map +0 -1
- package/dist/chunk-I572ZFCT.mjs.map +0 -1
- package/dist/chunk-N6MQQMTM.mjs.map +0 -1
- package/dist/chunk-NJOWH5YK.mjs.map +0 -1
- package/dist/chunk-NQ2ZSGCX.mjs.map +0 -1
- package/dist/chunk-TEZB4ULX.mjs +0 -57
- package/dist/chunk-TEZB4ULX.mjs.map +0 -1
- package/dist/chunk-UOFADXXI.mjs.map +0 -1
- package/dist/useTimeline-DCZ1qoCO.d.mts +0 -55
|
@@ -58,6 +58,12 @@ declare enum ThArrowVariant {
|
|
|
58
58
|
stacked = "stacked",
|
|
59
59
|
layered = "layered"
|
|
60
60
|
}
|
|
61
|
+
declare enum ThNavigationAffordance {
|
|
62
|
+
timeline = "timeline",
|
|
63
|
+
readingOrder = "readingOrder",
|
|
64
|
+
toc = "toc"
|
|
65
|
+
}
|
|
66
|
+
type ThScrollAffordance = Exclude<ThNavigationAffordance, ThNavigationAffordance.toc>;
|
|
61
67
|
declare enum ThBreakpoints {
|
|
62
68
|
compact = "compact",
|
|
63
69
|
medium = "medium",
|
|
@@ -121,4 +127,4 @@ declare enum ThAudioPublicationMetadataComponent {
|
|
|
121
127
|
type TitleVariant = ThAudioPublicationMetadataComponent.title | ThAudioPublicationMetadataComponent.titleWithSubtitle | ThAudioPublicationMetadataComponent.subtitleWithTitle;
|
|
122
128
|
type ThPublicationMetadataOrder = [TitleVariant] | [TitleVariant, ThAudioPublicationMetadataComponent.authors] | [ThAudioPublicationMetadataComponent.authors, TitleVariant];
|
|
123
129
|
|
|
124
|
-
export { type BreakpointsMap as B, type ThBackLinkPref as
|
|
130
|
+
export { type BreakpointsMap as B, ThNavigationAffordance as T, type ThBackLinkPref as a, ThAudioPlayerComponent as b, type ThPublicationMetadataOrder as c, ThAudioProgressBarVariant as d, ThBreakpoints as e, type ThBreakpointsObject as f, ThDocumentTitleFormat as g, type ThFormatPref as h, ThRunningHeadFormat as i, ThProgressionFormat as j, ThLayoutUI as k, type ThScrollAffordance as l, type ThPaginatedAffordancePref as m, type ThBackLinkContent as n, type ThFormatPrefValue as o, type ThPaginatedAffordancePrefValue as p, ThArrowVariant as q, ThBackLinkVariant as r, ThLayoutDirection as s, ThAudioPublicationMetadataComponent as t, useBreakpoints as u };
|
|
@@ -2,6 +2,7 @@ import * as _readium_navigator from '@readium/navigator';
|
|
|
2
2
|
import { EpubNavigatorListeners, IEpubPreferences, IEpubDefaults, IInjectablesConfig, IContentProtectionConfig, IKeyboardPeripheralsConfig, EpubSettings, ScriptMode, WebPubNavigatorListeners, IWebPubPreferences, IWebPubDefaults, WebPubSettings, AudioNavigatorListeners, IAudioPreferences, IAudioDefaults } from '@readium/navigator';
|
|
3
3
|
import * as _readium_shared from '@readium/shared';
|
|
4
4
|
import { Publication, Locator, Link, Timeline } from '@readium/shared';
|
|
5
|
+
import { S as SerializedLocator } from './usePublicationProgress-DT-X5ZLf.mjs';
|
|
5
6
|
import * as React from 'react';
|
|
6
7
|
|
|
7
8
|
type cbb$2 = (ok: boolean) => void;
|
|
@@ -9,7 +10,7 @@ interface EpubNavigatorLoadProps {
|
|
|
9
10
|
container: HTMLDivElement | null;
|
|
10
11
|
publication: Publication;
|
|
11
12
|
listeners: EpubNavigatorListeners;
|
|
12
|
-
positionsList?:
|
|
13
|
+
positionsList?: SerializedLocator[];
|
|
13
14
|
initialPosition?: Locator;
|
|
14
15
|
preferences?: IEpubPreferences;
|
|
15
16
|
defaults?: IEpubDefaults;
|
|
@@ -28,8 +29,6 @@ declare const useEpubNavigator: () => {
|
|
|
28
29
|
go: (locator: Locator, animated: boolean, callback: cbb$2) => void;
|
|
29
30
|
navLayout: () => _readium_shared.Layout | undefined;
|
|
30
31
|
currentLocator: () => Locator | undefined;
|
|
31
|
-
previousLocator: () => Locator | null | undefined;
|
|
32
|
-
nextLocator: () => Locator | null | undefined;
|
|
33
32
|
currentPositions: () => number[] | null | undefined;
|
|
34
33
|
canGoBackward: () => boolean | undefined;
|
|
35
34
|
canGoForward: () => boolean | undefined;
|
|
@@ -40,6 +39,7 @@ declare const useEpubNavigator: () => {
|
|
|
40
39
|
submitPreferences: (preferences: IEpubPreferences) => Promise<void>;
|
|
41
40
|
getCframes: () => (_readium_navigator.FXLFrameManager | _readium_navigator.FrameManager | undefined)[] | undefined;
|
|
42
41
|
getScriptMode: () => ScriptMode | undefined;
|
|
42
|
+
timeline: () => Timeline | undefined;
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
type cbb$1 = (ok: boolean) => void;
|
|
@@ -64,8 +64,6 @@ declare const useWebPubNavigator: () => {
|
|
|
64
64
|
goLink: (link: Link, animated: boolean, callback: cbb$1) => void;
|
|
65
65
|
go: (locator: Locator, animated: boolean, callback: cbb$1) => void;
|
|
66
66
|
currentLocator: () => Locator | undefined;
|
|
67
|
-
previousLocator: () => Locator | null | undefined;
|
|
68
|
-
nextLocator: () => Locator | null | undefined;
|
|
69
67
|
currentPositions: () => number[] | null | undefined;
|
|
70
68
|
canGoBackward: () => boolean | undefined;
|
|
71
69
|
canGoForward: () => boolean | undefined;
|
|
@@ -76,6 +74,7 @@ declare const useWebPubNavigator: () => {
|
|
|
76
74
|
submitPreferences: (preferences: IWebPubPreferences) => Promise<void>;
|
|
77
75
|
getCframes: () => (_readium_navigator.WebPubFrameManager | undefined)[] | undefined;
|
|
78
76
|
getScriptMode: () => ScriptMode | undefined;
|
|
77
|
+
timeline: () => Timeline | undefined;
|
|
79
78
|
};
|
|
80
79
|
|
|
81
80
|
interface AudioSettings {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { T as
|
|
2
|
-
import { T as ThThemeKeys, A as ActionKey, a as ThemeTokens, b as AudioContentProtectionConfig, c as ThShortcutsPref, C as CustomizableKeys, D as DefaultKeys, d as ThPreferencesAdapter, e as ThPreferences, W as WeightConfig, V as VariableFontRangeConfig, F as FontCollection } from './ThPreferencesAdapter-
|
|
3
|
-
import { b as ThAudioActionsTokens, c as ThActionsTokens, d as ThCollapsibility, e as ThSheetTypes, f as ThDockingPref, T as ThDockingKeys } from './actions-
|
|
4
|
-
import { d as ThSettingsRangePrefRequired } from './useContrast-
|
|
1
|
+
import { T as ThNavigationAffordance, a as ThBackLinkPref, b as ThAudioPlayerComponent, c as ThPublicationMetadataOrder, d as ThAudioProgressBarVariant, B as BreakpointsMap } from './ui-DHQ_zvWn.mjs';
|
|
2
|
+
import { T as ThThemeKeys, A as ActionKey, a as ThemeTokens, b as AudioContentProtectionConfig, c as ThShortcutsPref, C as CustomizableKeys, D as DefaultKeys, d as ThPreferencesAdapter, e as ThPreferences, W as WeightConfig, V as VariableFontRangeConfig, F as FontCollection } from './ThPreferencesAdapter-GepvYoaL.mjs';
|
|
3
|
+
import { b as ThAudioActionsTokens, c as ThActionsTokens, d as ThCollapsibility, e as ThSheetTypes, f as ThDockingPref, T as ThDockingKeys } from './actions-CTg9C4C-.mjs';
|
|
4
|
+
import { d as ThSettingsRangePrefRequired } from './useContrast-Unp3534Z.mjs';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
import { ILinkInjectable, IUrlInjectable, IBlobInjectable, ScriptMode } from '@readium/navigator';
|
|
7
7
|
|
|
@@ -53,11 +53,8 @@ type AudioCustomizableKeys = {
|
|
|
53
53
|
audio?: string;
|
|
54
54
|
theme?: string;
|
|
55
55
|
};
|
|
56
|
-
declare
|
|
57
|
-
|
|
58
|
-
"readingOrder" = "readingOrder",
|
|
59
|
-
"toc" = "toc"
|
|
60
|
-
}
|
|
56
|
+
declare const ThAudioAffordance: typeof ThNavigationAffordance;
|
|
57
|
+
type ThAudioAffordance = ThNavigationAffordance;
|
|
61
58
|
type ThAudioThemeKeys = ThThemeKeys.light | ThThemeKeys.dark;
|
|
62
59
|
type ThAudioThemeKey<K extends AudioCustomizableKeys = {}> = K extends {
|
|
63
60
|
theme: infer T;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Publication, Timeline, TimelineItem, Locator } from '@readium/shared';
|
|
2
|
+
|
|
3
|
+
interface SerializedLocator {
|
|
4
|
+
href: string;
|
|
5
|
+
type: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
locations?: {
|
|
8
|
+
fragments?: string[];
|
|
9
|
+
progression?: number;
|
|
10
|
+
totalProgression?: number;
|
|
11
|
+
position?: number;
|
|
12
|
+
};
|
|
13
|
+
text?: {
|
|
14
|
+
after?: string;
|
|
15
|
+
before?: string;
|
|
16
|
+
highlight?: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
interface ProgressionDetails {
|
|
21
|
+
totalItems?: number;
|
|
22
|
+
currentIndex?: number;
|
|
23
|
+
totalPositions?: number;
|
|
24
|
+
currentPositions?: number[];
|
|
25
|
+
relativeProgression?: number;
|
|
26
|
+
totalProgression?: number;
|
|
27
|
+
currentChapter?: string;
|
|
28
|
+
positionsLeft?: number;
|
|
29
|
+
}
|
|
30
|
+
interface Progress {
|
|
31
|
+
title?: string;
|
|
32
|
+
progression?: ProgressionDetails;
|
|
33
|
+
}
|
|
34
|
+
declare const usePublicationProgress: ({ publication, getNavigatorTimeline, currentTimelineItem, currentLocation, currentPositions, positionsList, onChange }: {
|
|
35
|
+
publication: Publication | null;
|
|
36
|
+
getNavigatorTimeline: () => Timeline | undefined;
|
|
37
|
+
currentTimelineItem?: TimelineItem;
|
|
38
|
+
currentLocation?: Locator;
|
|
39
|
+
currentPositions?: number[];
|
|
40
|
+
positionsList?: SerializedLocator[];
|
|
41
|
+
onChange?: (progress: Progress) => void;
|
|
42
|
+
}) => Progress;
|
|
43
|
+
|
|
44
|
+
export { type ProgressionDetails as P, type SerializedLocator as S, type Progress as a, usePublicationProgress as u };
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React__default, { RefObject, ReactNode } from 'react';
|
|
3
|
-
import { w as ThActionsTriggerVariant, a as ThSheetHeaderVariant, u as ThCollapsibilityVisibility, j as ThShortcutConfig, h as ThActionEntry, g as ThActionsKeys, T as ThDockingKeys, e as ThSheetTypes } from './actions-
|
|
3
|
+
import { w as ThActionsTriggerVariant, a as ThSheetHeaderVariant, u as ThCollapsibilityVisibility, j as ThShortcutConfig, h as ThActionEntry, g as ThActionsKeys, T as ThDockingKeys, e as ThSheetTypes } from './actions-CTg9C4C-.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, o as ThSettingsRangePlaceholder, g as ThSettingsKeys, T as ThLineHeightOptions, a as ThSpacingPresetKeys } 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-DyYC678Q.mjs';
|
|
6
|
+
import { h as ThTextSettingsKeys, b as ThSpacingSettingsKeys, j as ThSettingsGroupPref, o as ThSettingsRangePlaceholder, g as ThSettingsKeys, T as ThLineHeightOptions, a as ThSpacingPresetKeys } from './useContrast-Unp3534Z.mjs';
|
|
7
7
|
import { PressEvent } from 'react-aria';
|
|
8
|
-
import { f as SettingsReducerState } from './settingsReducer-
|
|
8
|
+
import { f as SettingsReducerState } from './settingsReducer-DRWEq8Cm.mjs';
|
|
9
9
|
import { WebPubSettingsReducerState, ReaderProfile } from './lib/index.mjs';
|
|
10
|
-
import { A as ActionsStateKeys } from './actionsReducer-
|
|
11
|
-
import { e as ThPreferences, D as DefaultKeys, f as ThGlobalPreferences, C as CustomizableKeys, d as ThPreferencesAdapter } from './ThPreferencesAdapter-
|
|
10
|
+
import { A as ActionsStateKeys } from './actionsReducer-Cnd7Cdh9.mjs';
|
|
11
|
+
import { e as ThPreferences, D as DefaultKeys, f as ThGlobalPreferences, C as CustomizableKeys, d as ThPreferencesAdapter } from './ThPreferencesAdapter-GepvYoaL.mjs';
|
|
12
12
|
import * as _readium_navigator from '@readium/navigator';
|
|
13
13
|
import { EpubSettings, WebPubSettings, FXLFrameManager, FrameManager, ScriptMode, WebPubFrameManager } from '@readium/navigator';
|
|
14
14
|
import * as _readium_shared from '@readium/shared';
|
|
15
15
|
import { Link, Locator, Publication, Fetcher } from '@readium/shared';
|
|
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-
|
|
17
|
-
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-B4NBPvmZ.mjs';
|
|
17
|
+
import { a as ThAudioPreferences, c as ThAudioPreferencesAdapter } from './usePreferences-Bi-ptif0.mjs';
|
|
18
18
|
import { InitOptions } from 'i18next';
|
|
19
19
|
import { P as ProcessedError } from './errorHandler-CL2YIfQY.mjs';
|
|
20
20
|
|
|
@@ -444,8 +444,6 @@ interface UnifiedNavigator {
|
|
|
444
444
|
go(locator: Locator, animated: boolean, callback: NavigationCallback): void;
|
|
445
445
|
goLink(link: Link, animated: boolean, callback: NavigationCallback): void;
|
|
446
446
|
currentLocator(): Locator | undefined;
|
|
447
|
-
previousLocator(): Locator | null;
|
|
448
|
-
nextLocator(): Locator | null;
|
|
449
447
|
goForward(animated: boolean, callback: NavigationCallback): void;
|
|
450
448
|
goBackward(animated: boolean, callback: NavigationCallback): void;
|
|
451
449
|
isVisual(): boolean;
|
|
@@ -466,8 +464,6 @@ declare const useNavigator: () => {
|
|
|
466
464
|
go: (locator: Locator, animated: boolean, callback: (ok: boolean) => void) => void;
|
|
467
465
|
navLayout: () => _readium_shared.Layout | undefined;
|
|
468
466
|
currentLocator: () => Locator | undefined;
|
|
469
|
-
previousLocator: () => Locator | null | undefined;
|
|
470
|
-
nextLocator: () => Locator | null | undefined;
|
|
471
467
|
currentPositions: () => number[] | null | undefined;
|
|
472
468
|
canGoBackward: () => boolean | undefined;
|
|
473
469
|
canGoForward: () => boolean | undefined;
|
|
@@ -477,6 +473,7 @@ declare const useNavigator: () => {
|
|
|
477
473
|
submitPreferences: (preferences: _readium_navigator.IEpubPreferences) => Promise<void>;
|
|
478
474
|
getCframes: () => (FXLFrameManager | FrameManager | undefined)[] | undefined;
|
|
479
475
|
getScriptMode: () => ScriptMode | undefined;
|
|
476
|
+
timeline: () => _readium_shared.Timeline | undefined;
|
|
480
477
|
} | {
|
|
481
478
|
getSetting: <K extends keyof AllVisualSettings>(settingKey: K) => AllVisualSettings[K];
|
|
482
479
|
WebPubNavigatorLoad: (config: WebPubNavigatorLoadProps, cb: Function) => void;
|
|
@@ -488,8 +485,6 @@ declare const useNavigator: () => {
|
|
|
488
485
|
goLink: (link: Link, animated: boolean, callback: (ok: boolean) => void) => void;
|
|
489
486
|
go: (locator: Locator, animated: boolean, callback: (ok: boolean) => void) => void;
|
|
490
487
|
currentLocator: () => Locator | undefined;
|
|
491
|
-
previousLocator: () => Locator | null | undefined;
|
|
492
|
-
nextLocator: () => Locator | null | undefined;
|
|
493
488
|
currentPositions: () => number[] | null | undefined;
|
|
494
489
|
canGoBackward: () => boolean | undefined;
|
|
495
490
|
canGoForward: () => boolean | undefined;
|
|
@@ -499,6 +494,7 @@ declare const useNavigator: () => {
|
|
|
499
494
|
submitPreferences: (preferences: _readium_navigator.IWebPubPreferences) => Promise<void>;
|
|
500
495
|
getCframes: () => (WebPubFrameManager | undefined)[] | undefined;
|
|
501
496
|
getScriptMode: () => ScriptMode | undefined;
|
|
497
|
+
timeline: () => _readium_shared.Timeline | undefined;
|
|
502
498
|
};
|
|
503
499
|
readonly media: {
|
|
504
500
|
AudioNavigatorLoad: (config: AudioNavigatorLoadProps, cb: Function) => void;
|
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.5.
|
|
23
|
+
"version": "1.5.7",
|
|
24
24
|
"private": false,
|
|
25
25
|
"files": [
|
|
26
26
|
"./dist"
|
|
@@ -47,9 +47,16 @@
|
|
|
47
47
|
"./webpub": "./dist/components/WebPub/index.mjs",
|
|
48
48
|
"./webpub/styles": "./dist/components/WebPub/index.css"
|
|
49
49
|
},
|
|
50
|
+
"devEngines": {
|
|
51
|
+
"packageManager": {
|
|
52
|
+
"name": "pnpm",
|
|
53
|
+
"version": "11.1.0",
|
|
54
|
+
"onFail": "warn"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
50
57
|
"scripts": {
|
|
51
58
|
"dev": "next dev",
|
|
52
|
-
"build": "
|
|
59
|
+
"build": "next build",
|
|
53
60
|
"build:analyze": "npx next experimental-analyze",
|
|
54
61
|
"start": "next start",
|
|
55
62
|
"lint": "eslint .",
|
|
@@ -57,17 +64,16 @@
|
|
|
57
64
|
"preinstall": "npx only-allow pnpm",
|
|
58
65
|
"copy-locales": "cpx \"public/locales/**/*\" dist/locales",
|
|
59
66
|
"copy-fonts": "cpx \"public/fonts/**/*\" dist/fonts",
|
|
60
|
-
"extract-locales": "node scripts/extract-locales.mjs",
|
|
61
67
|
"check-locales": "node scripts/check-locales.mjs",
|
|
62
|
-
"update-locales": "
|
|
63
|
-
"bundle": "
|
|
68
|
+
"update-locales": "node scripts/update-locales.mjs && pnpm check-locales --summary --show-missing",
|
|
69
|
+
"bundle": "tsup --config tsup.config.ts && pnpm copy-locales && pnpm copy-fonts",
|
|
64
70
|
"increment": "node scripts/increment.mjs"
|
|
65
71
|
},
|
|
66
72
|
"peerDependencies": {
|
|
67
|
-
"@readium/css": "
|
|
68
|
-
"@readium/navigator": "
|
|
69
|
-
"@readium/navigator-html-injectables": "
|
|
70
|
-
"@readium/shared": "
|
|
73
|
+
"@readium/css": "^2.0.5",
|
|
74
|
+
"@readium/navigator": "^2.8.0",
|
|
75
|
+
"@readium/navigator-html-injectables": "^2.6.3",
|
|
76
|
+
"@readium/shared": "^2.4.0",
|
|
71
77
|
"@reduxjs/toolkit": "^2.11.2",
|
|
72
78
|
"i18next": "^25.8.13",
|
|
73
79
|
"i18next-browser-languagedetector": "^8.2.1",
|
|
@@ -84,11 +90,10 @@
|
|
|
84
90
|
"react-stately": "^3.44.0"
|
|
85
91
|
},
|
|
86
92
|
"dependencies": {
|
|
87
|
-
"@
|
|
88
|
-
"@readium/
|
|
89
|
-
"@readium/navigator": "
|
|
90
|
-
"@readium/
|
|
91
|
-
"@readium/shared": ">=2.2.3",
|
|
93
|
+
"@readium/css": "^2.0.5",
|
|
94
|
+
"@readium/navigator": "^2.8.0",
|
|
95
|
+
"@readium/navigator-html-injectables": "^2.6.3",
|
|
96
|
+
"@readium/shared": "^2.4.0",
|
|
92
97
|
"@reduxjs/toolkit": "^2.11.2",
|
|
93
98
|
"classnames": "^2.5.1",
|
|
94
99
|
"colorthief": "^3.3.1",
|
|
@@ -109,6 +114,8 @@
|
|
|
109
114
|
"react-stately": "^3.47.0"
|
|
110
115
|
},
|
|
111
116
|
"devDependencies": {
|
|
117
|
+
"@cloudflare/next-on-pages": "1.13.16",
|
|
118
|
+
"@cloudflare/workers-types": "4.20260702.1",
|
|
112
119
|
"@svgr/webpack": "^8.1.0",
|
|
113
120
|
"@types/css-modules": "^1.0.5",
|
|
114
121
|
"@types/node": "^22.19.7",
|
|
@@ -122,6 +129,7 @@
|
|
|
122
129
|
"glob": "^13.0.6",
|
|
123
130
|
"immer": "11.1.2",
|
|
124
131
|
"tsup": "^8.5.1",
|
|
125
|
-
"typescript": "^5.9.3"
|
|
132
|
+
"typescript": "^5.9.3",
|
|
133
|
+
"wrangler": "4.107.1"
|
|
126
134
|
}
|
|
127
135
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/preferences/models/ui.ts","../src/core/Helpers/propsToCSSVars.ts"],"names":["ThArrowVariant","ThBreakpoints","ThBackLinkVariant","ThDocumentTitleFormat","ThLayoutDirection","ThLayoutU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AA,CAAO,MAAA,CAAO,GAAA,EAAK,cAAA,CAAe,KAAA,EAAO,EAAE,MAAA,EAAQ,MAAA,GAAS,CAAA,EAAG,MAAM,CAAA,CAAA,EAAI,GAAG,CAAA,CAAA,GAAK,GAAA,EAAK,CAAC,CAAA;AAAA,IACzF,CAAA,MAAA,IAAW,SAAS,IAAA,EAAM;AACxB,MAAA,MAAM,WAAW,OAAO,KAAA,KAAU,QAAA,GAAW,CAAA,EAAG,KAAK,CAAA,EAAA,CAAA,GAAO,KAAA;AAC5D,MAAA,GAAA,CAAI,MAAM,CAAA,GAAI,QAAA;AAAA,IAChB;AACA,IAAA,OAAO,GAAA;AAAA,EACT,CAAA,EAAG,EAAE,CAAA;AACf","file":"chunk-2YRT7RNW.mjs","sourcesContent":["export type ThBackLinkContent = \n | { \n type: \"img\";\n src: string;\n alt?: string;\n }\n | {\n type: \"svg\";\n content: string; // Raw SVG string\n };\n\nexport interface ThBackLinkPref {\n href: string;\n variant?: ThBackLinkVariant;\n visibility?: \"always\" | \"partially\";\n content?: ThBackLinkContent;\n}\n\nexport interface ThFormatPrefValue<T extends string | Array<string>> {\n variants: T;\n displayInImmersive?: boolean;\n displayInFullscreen?: boolean;\n}\n\nexport interface ThFormatPref<T extends string | Array<string>> {\n default: ThFormatPrefValue<T>;\n breakpoints?: { \n [key in ThBreakpoints]?: ThFormatPrefValue<T>;\n };\n}\n\nexport interface ThPaginatedAffordancePrefValue {\n variant: ThArrowVariant;\n discard?: Array<\"navigation\" | \"immersive\" | \"fullscreen\"> | \"none\";\n hint?: Array<\"immersiveChange\" | \"fullscreenChange\" | \"layoutChange\"> | \"none\";\n}\n\nexport interface ThPaginatedAffordancePref {\n default: Required<ThPaginatedAffordancePrefValue>;\n breakpoints?: {\n [key in ThBreakpoints]?: ThPaginatedAffordancePrefValue;\n };\n}\n\nexport enum ThArrowVariant {\n none = \"none\",\n stacked = \"stacked\",\n layered = \"layered\"\n}\n\nexport enum ThBreakpoints {\n compact = \"compact\",\n medium = \"medium\",\n expanded = \"expanded\",\n large = \"large\",\n xLarge = \"xLarge\"\n}\n\nexport enum ThBackLinkVariant {\n arrow = \"arrow\",\n home = \"home\",\n library = \"library\",\n custom = \"custom\"\n}\n\nexport enum ThDocumentTitleFormat {\n title = \"title\",\n chapter = \"chapter\",\n titleAndChapter = \"titleAndChapter\",\n none = \"none\"\n}\n\nexport enum ThLayoutDirection {\n rtl = \"rtl\",\n ltr = \"ltr\"\n}\n\nexport enum ThLayoutUI {\n stacked = \"stacked-ui\",\n layered = \"layered-ui\"\n}\n\nexport enum ThProgressionFormat {\n positionsPercentOfTotal = \"positionsPercentOfTotal\", // x-y of z (%)\n positionsOfTotal = \"positionsOfTotal\", // x-y of z\n positions = \"positions\", // x-y\n overallProgression = \"overallProgression\", // x%\n positionsLeft = \"positionsLeft\", // x left in chapter\n readingOrderIndex = \"readingOrderIndex\", // x of y\n resourceProgression = \"resourceProgression\", // x%\n progressionOfResource = \"progressionOfResource\", // x% of y\n none = \"none\" // nothing displayed\n}\n\nexport enum ThRunningHeadFormat {\n title = \"title\",\n chapter = \"chapter\",\n // titleAndChapter = \"titleAndChapter\",\n none = \"none\"\n}\n\nexport enum ThAudioPlayerComponent {\n cover = \"cover\",\n metadata = \"metadata\",\n playbackControls = \"playbackControls\",\n progressBar = \"progressBar\",\n mediaActions = \"mediaActions\"\n}\n\nexport enum ThAudioProgressBarVariant {\n normal = \"normal\",\n segmented = \"segmented\"\n}\n\nexport enum ThAudioPublicationMetadataComponent {\n title = \"title\",\n titleWithSubtitle = \"titleWithSubtitle\",\n subtitleWithTitle = \"subtitleWithTitle\",\n authors = \"authors\"\n}\n\ntype TitleVariant = ThAudioPublicationMetadataComponent.title | ThAudioPublicationMetadataComponent.titleWithSubtitle | ThAudioPublicationMetadataComponent.subtitleWithTitle;\n\nexport type ThPublicationMetadataOrder = [TitleVariant] | [TitleVariant, ThAudioPublicationMetadataComponent.authors] | [ThAudioPublicationMetadataComponent.authors, TitleVariant];","\"use client\";\n\ninterface PropsToCSSVarsOptions {\n prefix?: string;\n exclude?: string[];\n}\n\n/** \n * Converts Object properties to CSS custom properties, recursively.\n * @param props - The object containing CSS property values\n * @param options - Configuration options\n * @param options.prefix - Optional prefix for CSS variable names (applies to all levels)\n * @param options.exclude - Array of property names to exclude\n */\nexport const propsToCSSVars = (props: { [x: string]: any; }, { prefix, exclude = [] }: PropsToCSSVarsOptions = {}) => {\n return Object.entries(props)\n .reduce((acc: { [key: string]: any }, [key, value]) => {\n if (exclude.includes(key)) {\n return acc;\n }\n const cssVar = prefix ? `--${prefix}-${key}` : `--${key}`;\n if (typeof value === \"object\" && value !== null) {\n // Keep the same prefix for nested objects\n Object.assign(acc, propsToCSSVars(value, { prefix: prefix ? `${prefix}-${key}` : key }));\n } else if (value != null) {\n const cssValue = typeof value === \"number\" ? `${value}px` : value;\n acc[cssVar] = cssValue;\n } \n return acc;\n }, {});\n}"]}
|