@edrlab/thorium-web 1.1.7 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ThPreferencesAdapter-B8AYujCA.d.mts → ThPreferencesAdapter-DrZ5_6Dv.d.mts} +4 -139
- package/dist/{ThSettingsWrapper-BlmAxcWF.d.mts → ThSettingsWrapper-8Kx0SnH4.d.mts} +1 -1
- package/dist/{actions-BRtHsxpm.d.mts → actions-D2CHvCHu.d.mts} +2 -2
- package/dist/{actionsReducer-bT0pfxLJ.d.mts → actionsReducer-kc-S130w.d.mts} +3 -24
- package/dist/{chunk-KJXHAJYK.mjs → chunk-4VHEHMJN.mjs} +128 -11
- package/dist/chunk-4VHEHMJN.mjs.map +1 -0
- package/dist/{chunk-6V3O7FCS.mjs → chunk-72XCX5TD.mjs} +3 -3
- package/dist/{chunk-6V3O7FCS.mjs.map → chunk-72XCX5TD.mjs.map} +1 -1
- package/dist/{chunk-YIW2OOMW.mjs → chunk-7NEQAW7J.mjs} +2 -2
- package/dist/chunk-7NEQAW7J.mjs.map +1 -0
- package/dist/{chunk-COQXDRKD.mjs → chunk-K3K7TUWM.mjs} +2 -2
- package/dist/chunk-K3K7TUWM.mjs.map +1 -0
- package/dist/chunk-P4V3LA5R.mjs +407 -0
- package/dist/chunk-P4V3LA5R.mjs.map +1 -0
- package/dist/{chunk-4C3UOTX4.mjs → chunk-PXAUQJEU.mjs} +172 -27
- package/dist/chunk-PXAUQJEU.mjs.map +1 -0
- package/dist/chunk-QPE574OW.mjs +913 -0
- package/dist/chunk-QPE574OW.mjs.map +1 -0
- package/dist/chunk-RRDEPGBK.mjs +75 -0
- package/dist/chunk-RRDEPGBK.mjs.map +1 -0
- package/dist/components/Epub/index.css +7 -0
- package/dist/components/Epub/index.css.map +1 -1
- package/dist/components/Epub/index.d.mts +17 -11
- package/dist/components/Epub/index.mjs +9 -828
- package/dist/components/Epub/index.mjs.map +1 -1
- package/dist/components/Misc/index.css +23 -0
- package/dist/components/Misc/index.css.map +1 -1
- package/dist/components/Misc/index.d.mts +10 -1
- package/dist/components/Misc/index.mjs +31 -3
- package/dist/components/Misc/index.mjs.map +1 -1
- package/dist/components/Reader/index.css +1290 -0
- package/dist/components/Reader/index.css.map +1 -0
- package/dist/components/Reader/index.d.mts +30 -0
- package/dist/components/Reader/index.mjs +79 -0
- package/dist/components/Reader/index.mjs.map +1 -0
- package/dist/components/WebPub/index.css +7 -0
- package/dist/components/WebPub/index.css.map +1 -1
- package/dist/components/WebPub/index.d.mts +16 -32
- package/dist/components/WebPub/index.mjs +9 -372
- package/dist/components/WebPub/index.mjs.map +1 -1
- package/dist/core/Components/index.d.mts +7 -6
- package/dist/core/Helpers/index.d.mts +1 -1
- package/dist/core/Hooks/index.d.mts +55 -6
- package/dist/core/Hooks/index.mjs +1 -1
- package/dist/errorHandler-CL2YIfQY.d.mts +26 -0
- package/dist/i18n/index.mjs +2 -2
- package/dist/immer.d-CoRThNOF.d.mts +23 -0
- package/dist/lib/index.d.mts +12 -162
- package/dist/lib/index.mjs +1 -1
- package/dist/locales/el/thorium-web.json +31 -0
- package/dist/locales/en/thorium-shared.json +84 -0
- package/dist/locales/en/thorium-web.json +10 -1
- package/dist/locales/et/thorium-shared.json +93 -2
- package/dist/locales/et/thorium-web.json +6 -2
- package/dist/locales/fi/thorium-shared.json +82 -8
- package/dist/locales/fi/thorium-web.json +2 -1
- package/dist/locales/fr/thorium-shared.json +100 -0
- package/dist/locales/it/thorium-shared.json +9 -0
- package/dist/locales/lt/thorium-shared.json +22 -13
- package/dist/locales/lt/thorium-web.json +2 -1
- package/dist/locales/pt-PT/thorium-shared.json +64 -1
- package/dist/locales/pt-PT/thorium-web.json +4 -3
- package/dist/locales/sv/thorium-shared.json +61 -3
- package/dist/locales/sv/thorium-web.json +4 -3
- package/dist/preferences/index.d.mts +8 -7
- package/dist/preferences/index.mjs +1 -1
- package/dist/settingsReducer-C1wwCAMv.d.mts +159 -0
- package/dist/{ui-BVlJcPL_.d.mts → ui-CamWuqOo.d.mts} +1 -1
- package/dist/useContrast-D6sjPjxy.d.mts +152 -0
- package/dist/{useEpubNavigator-CsraD65e.d.mts → useEpubNavigator-CwHJfoiV.d.mts} +1 -1
- package/dist/{usePreferences-rfT368__.d.mts → usePreferences-BXFJbval.d.mts} +1 -1
- package/dist/{StatefulReader-CjgFzHoO.d.mts → useReaderTransitions-guT-eA-Q.d.mts} +50 -50
- package/dist/{useWebPubNavigator-Che8r5Wg.d.mts → useWebPubNavigator-CuSNQKMw.d.mts} +1 -1
- package/package.json +5 -3
- package/dist/chunk-4C3UOTX4.mjs.map +0 -1
- package/dist/chunk-COQXDRKD.mjs.map +0 -1
- package/dist/chunk-KJXHAJYK.mjs.map +0 -1
- package/dist/chunk-YIW2OOMW.mjs.map +0 -1
- package/dist/useContrast-Cgsrl7GS.d.mts +0 -15
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { TooltipProps, Heading, HeadingProps, PopoverProps } from 'react-aria-components';
|
|
3
|
-
import { s as ThActionsTriggerVariant, r as ThCollapsibilityVisibility, p as ThActionEntry,
|
|
4
|
-
import { T as ThActionButtonProps, f as ThMenuItemProps, a as ThCollapsibleActionsBarProps, t as ThSettingsEntry, W as WithRef, r as ThDropdownProps, h as ThNumberFieldProps, k as ThRadioGroupProps, m as ThSliderProps, o as ThSwitchProps } from './ThSettingsWrapper-
|
|
3
|
+
import { s as ThActionsTriggerVariant, r as ThCollapsibilityVisibility, p as ThActionEntry, c as ThActionsKeys, T as ThDockingKeys, b as ThSheetTypes, a as ThSheetHeaderVariant } from './actions-D2CHvCHu.mjs';
|
|
4
|
+
import { T as ThActionButtonProps, f as ThMenuItemProps, a as ThCollapsibleActionsBarProps, t as ThSettingsEntry, W as WithRef, r as ThDropdownProps, h as ThNumberFieldProps, k as ThRadioGroupProps, m as ThSliderProps, o as ThSwitchProps } from './ThSettingsWrapper-8Kx0SnH4.mjs';
|
|
5
5
|
import React__default, { RefObject, ReactNode } from 'react';
|
|
6
|
-
import {
|
|
6
|
+
import { g as ThTextSettingsKeys, b as ThSpacingSettingsKeys, j as ThSettingsGroupPref, a as ThSpacingPresetKeys, T as ThLineHeightOptions } from './useContrast-D6sjPjxy.mjs';
|
|
7
7
|
import { PressEvent } from 'react-aria';
|
|
8
|
-
import { A as ActionsStateKeys } from './actionsReducer-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
8
|
+
import { A as ActionsStateKeys } from './actionsReducer-kc-S130w.mjs';
|
|
9
|
+
import { a as ThPreferences, D as DefaultKeys } from './ThPreferencesAdapter-DrZ5_6Dv.mjs';
|
|
10
|
+
import { Publication, Locator, Fetcher } from '@readium/shared';
|
|
11
|
+
import { ReaderProfile } from './lib/index.mjs';
|
|
12
|
+
import { P as ProcessedError } from './errorHandler-CL2YIfQY.mjs';
|
|
13
13
|
|
|
14
14
|
interface StatefulActionsMapObject {
|
|
15
15
|
Trigger: React.ComponentType<StatefulActionTriggerProps>;
|
|
@@ -297,15 +297,50 @@ declare const StatefulPreferencesProvider: ({ children, initialPreferences }: {
|
|
|
297
297
|
|
|
298
298
|
declare const useNavigator: () => any;
|
|
299
299
|
|
|
300
|
+
interface PositionStorage {
|
|
301
|
+
get: () => Locator | undefined;
|
|
302
|
+
set: (locator: Locator) => void | Promise<void>;
|
|
303
|
+
}
|
|
304
|
+
interface StatefulReaderProps {
|
|
305
|
+
publication: Publication;
|
|
306
|
+
localDataKey: string | null;
|
|
307
|
+
plugins?: ThPlugin[];
|
|
308
|
+
positionStorage?: PositionStorage;
|
|
309
|
+
}
|
|
310
|
+
type ThPluginFactory = () => ThPlugin[] | Promise<ThPlugin[]>;
|
|
311
|
+
interface ReaderPlugins {
|
|
312
|
+
epub?: ThPluginFactory;
|
|
313
|
+
webPub?: ThPluginFactory;
|
|
314
|
+
audio?: ThPluginFactory;
|
|
315
|
+
}
|
|
316
|
+
interface ReaderComponentProps {
|
|
317
|
+
profile: "epub" | "webPub" | "audio" | undefined | null;
|
|
318
|
+
publication: Publication;
|
|
319
|
+
localDataKey: string | null;
|
|
320
|
+
positionStorage?: PositionStorage;
|
|
321
|
+
plugins?: ReaderPlugins;
|
|
322
|
+
}
|
|
323
|
+
declare const StatefulReaderWrapper: ({ profile, plugins, ...props }: ReaderComponentProps) => react_jsx_runtime.JSX.Element | null;
|
|
324
|
+
|
|
300
325
|
interface UsePublicationOptions {
|
|
301
326
|
url: string;
|
|
302
|
-
onError?: (error:
|
|
327
|
+
onError?: (error: ProcessedError) => void;
|
|
328
|
+
fetcher?: Fetcher;
|
|
303
329
|
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
330
|
+
interface UsePublicationReturn {
|
|
331
|
+
isLoading: boolean;
|
|
332
|
+
error: ProcessedError | null;
|
|
333
|
+
publication: Publication | null;
|
|
334
|
+
manifest: object | null;
|
|
335
|
+
selfLink: string | null;
|
|
336
|
+
localDataKey: string | null;
|
|
337
|
+
profile: ReaderProfile | null;
|
|
338
|
+
isRTL: boolean;
|
|
339
|
+
isFXL: boolean;
|
|
340
|
+
fontLanguage: string;
|
|
341
|
+
hasDisplayTransformability: boolean;
|
|
342
|
+
}
|
|
343
|
+
declare const usePublication: ({ url, onError, fetcher: customFetcher }: UsePublicationOptions) => UsePublicationReturn;
|
|
309
344
|
|
|
310
345
|
interface ReaderTransitions {
|
|
311
346
|
isImmersive: boolean;
|
|
@@ -327,39 +362,4 @@ interface ReaderTransitions {
|
|
|
327
362
|
}
|
|
328
363
|
declare const useReaderTransitions: () => ReaderTransitions;
|
|
329
364
|
|
|
330
|
-
|
|
331
|
-
columnCount: string;
|
|
332
|
-
fontFamily: FontFamilyStateObject;
|
|
333
|
-
fontSize: number;
|
|
334
|
-
fontWeight: number;
|
|
335
|
-
hyphens: boolean | null;
|
|
336
|
-
letterSpacing: number | null;
|
|
337
|
-
lineLength: LineLengthStateObject | null;
|
|
338
|
-
lineHeight: ThLineHeightOptions | null;
|
|
339
|
-
paragraphIndent: number | null;
|
|
340
|
-
paragraphSpacing: number | null;
|
|
341
|
-
publisherStyles: boolean;
|
|
342
|
-
scroll: boolean;
|
|
343
|
-
textAlign: ThTextAlignOptions | null;
|
|
344
|
-
textNormalization: boolean;
|
|
345
|
-
theme?: string;
|
|
346
|
-
wordSpacing: number | null;
|
|
347
|
-
}
|
|
348
|
-
interface StatelessCache {
|
|
349
|
-
layoutUI: ThLayoutUI;
|
|
350
|
-
isImmersive: boolean;
|
|
351
|
-
isHovering: boolean;
|
|
352
|
-
arrowsOccupySpace: boolean;
|
|
353
|
-
settings: ReadiumCSSSettings;
|
|
354
|
-
positionsList: Locator[];
|
|
355
|
-
colorScheme?: ThColorScheme;
|
|
356
|
-
reducedMotion?: boolean;
|
|
357
|
-
}
|
|
358
|
-
interface StatefulReaderProps {
|
|
359
|
-
rawManifest: object;
|
|
360
|
-
selfHref: string;
|
|
361
|
-
plugins?: ThPlugin[];
|
|
362
|
-
}
|
|
363
|
-
declare const StatefulReader: ({ rawManifest, selfHref, plugins }: StatefulReaderProps) => react_jsx_runtime.JSX.Element | null;
|
|
364
|
-
|
|
365
|
-
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, StatefulPreferencesProvider as ah, type ReadiumCSSSettings as ai, type StatelessCache as aj, StatefulReader as ak, 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 };
|
|
365
|
+
export { StatefulTextAlign as $, type StatefulNumberFieldProps as A, StatefulNumberField as B, type StatefulRadioGroupProps as C, StatefulRadioGroup as D, type StatefulSliderProps as E, StatefulSlider as F, type StatefulSwitchProps as G, StatefulSwitch as H, type useGridNavigationProps as I, useGridNavigation as J, useGridTemplate as K, type StatefulSettingsItemProps as L, StatefulLetterSpacing as M, StatefulLineHeight as N, StatefulParagraphIndent as O, StatefulParagraphSpacing as P, StatefulSpacingGroup as Q, StatefulSpacingGroupContainer as R, type StatefulActionsMapObject as S, type ThPlugin as T, StatefulSpacingPresets as U, StatefulWordSpacing as V, useLineHeight as W, useSpacingPresets as X, StatefulFontFamily as Y, UnstableStatefulFontWeight as Z, StatefulHyphens as _, usePublication as a, StatefulTextGroup as a0, StatefulTextGroupContainer as a1, StatefulTextNormalize as a2, StatefulPublisherStyles as a3, StatefulZoom as a4, type StatefulBottomSheetProps as a5, type ScrimPref as a6, StatefulBottomSheet as a7, type StatefulDockedSheetProps as a8, StatefulDockedSheet as a9, type StatefulFullScreenSheetProps as aa, StatefulFullScreenSheet as ab, type StatefulPopoverSheetProps as ac, StatefulPopoverSheet as ad, StatefulSheetWrapper as ae, type StatefulSheet as af, StatefulPreferencesProvider as ag, type PositionStorage as ah, type StatefulReaderProps as ai, type ThPluginFactory as aj, type ReaderPlugins as ak, type ReaderComponentProps as al, StatefulReaderWrapper as am, useReaderTransitions as b, type StatefulActionTriggerProps as c, type StatefulActionContainerProps as d, StatefulFullscreenTrigger as e, StatefulJumpToPositionContainer as f, StatefulJumpToPositionTrigger as g, StatefulSettingsContainer as h, StatefulSettingsTrigger as i, StatefulTocContainer as j, StatefulTocTrigger as k, type StatefulActionIconProps as l, StatefulActionIcon as m, type StatefulOverflowMenuItemProps as n, StatefulOverflowMenuItem as o, type StatefulCollapsibleActionsBarProps as p, StatefulCollapsibleActionsBar as q, type StatefulOverflowMenuProps as r, StatefulOverflowMenu as s, useDocking as t, useNavigator as u, createDefaultPlugin as v, type StatefulGroupWrapperProps as w, StatefulGroupWrapper as x, type StatefulDropdownProps as y, StatefulDropdown as z };
|
|
@@ -30,7 +30,7 @@ declare const useWebPubNavigator: () => {
|
|
|
30
30
|
canGoForward: () => boolean | undefined;
|
|
31
31
|
isScrollStart: () => boolean | undefined;
|
|
32
32
|
isScrollEnd: () => boolean | undefined;
|
|
33
|
-
preferencesEditor: _readium_navigator.
|
|
33
|
+
preferencesEditor: _readium_navigator.WebPubPreferencesEditor | undefined;
|
|
34
34
|
getSetting: <K extends keyof WebPubSettings>(settingKey: K) => WebPubSettings[K];
|
|
35
35
|
submitPreferences: (preferences: IWebPubPreferences) => Promise<void>;
|
|
36
36
|
getCframes: () => (_readium_navigator.WebPubFrameManager | undefined)[] | undefined;
|
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.1
|
|
23
|
+
"version": "1.2.1",
|
|
24
24
|
"private": false,
|
|
25
25
|
"files": [
|
|
26
26
|
"./dist"
|
|
@@ -40,6 +40,8 @@
|
|
|
40
40
|
"./misc": "./dist/components/Misc/index.mjs",
|
|
41
41
|
"./misc/styles": "./dist/components/Misc/index.css",
|
|
42
42
|
"./next": "./dist/next-lib/index.mjs",
|
|
43
|
+
"./reader": "./dist/components/Reader/index.mjs",
|
|
44
|
+
"./reader/styles": "./dist/components/Reader/index.css",
|
|
43
45
|
"./webpub": "./dist/components/WebPub/index.mjs",
|
|
44
46
|
"./webpub/styles": "./dist/components/WebPub/index.css"
|
|
45
47
|
},
|
|
@@ -60,7 +62,7 @@
|
|
|
60
62
|
},
|
|
61
63
|
"peerDependencies": {
|
|
62
64
|
"@readium/css": "^2.0.0",
|
|
63
|
-
"@readium/navigator": "2.3.
|
|
65
|
+
"@readium/navigator": "2.3.1",
|
|
64
66
|
"@readium/navigator-html-injectables": "2.3.0",
|
|
65
67
|
"@readium/shared": "2.1.5",
|
|
66
68
|
"@reduxjs/toolkit": "^2.11.2",
|
|
@@ -81,7 +83,7 @@
|
|
|
81
83
|
"dependencies": {
|
|
82
84
|
"@edrlab/thorium-locales": "github:edrlab/thorium-locales",
|
|
83
85
|
"@readium/css": "^2.0.0",
|
|
84
|
-
"@readium/navigator": "2.3.
|
|
86
|
+
"@readium/navigator": "2.3.1",
|
|
85
87
|
"@readium/navigator-html-injectables": "2.3.0",
|
|
86
88
|
"@readium/shared": "2.1.5",
|
|
87
89
|
"@reduxjs/toolkit": "^2.11.2",
|