@edrlab/thorium-web 1.1.6 → 1.2.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-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-34MVY33F.mjs +913 -0
- package/dist/chunk-34MVY33F.mjs.map +1 -0
- package/dist/{chunk-KJXHAJYK.mjs → chunk-4VHEHMJN.mjs} +128 -11
- package/dist/chunk-4VHEHMJN.mjs.map +1 -0
- package/dist/{chunk-QNYZCQKO.mjs → chunk-72XCX5TD.mjs} +4 -4
- package/dist/chunk-72XCX5TD.mjs.map +1 -0
- package/dist/{chunk-SMK7A7VF.mjs → chunk-7NEQAW7J.mjs} +3 -3
- package/dist/chunk-7NEQAW7J.mjs.map +1 -0
- package/dist/{chunk-SFHOVH6R.mjs → chunk-H4J2VY7Z.mjs} +201 -35
- package/dist/chunk-H4J2VY7Z.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-KTPIH35Y.mjs → chunk-NYZBHYW2.mjs} +5 -3
- package/dist/chunk-NYZBHYW2.mjs.map +1 -0
- package/dist/chunk-RRDEPGBK.mjs +75 -0
- package/dist/chunk-RRDEPGBK.mjs.map +1 -0
- package/dist/chunk-S4M7ED5Q.mjs +407 -0
- package/dist/chunk-S4M7ED5Q.mjs.map +1 -0
- package/dist/components/Epub/index.d.mts +17 -11
- package/dist/components/Epub/index.mjs +12 -831
- 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 +30 -2
- package/dist/components/Misc/index.mjs.map +1 -1
- package/dist/components/Reader/index.css +1283 -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.d.mts +15 -31
- package/dist/components/WebPub/index.mjs +11 -374
- package/dist/components/WebPub/index.mjs.map +1 -1
- package/dist/core/Components/index.d.mts +11 -8
- package/dist/core/Components/index.mjs +1 -1
- package/dist/core/Helpers/index.d.mts +1 -1
- package/dist/core/Hooks/index.d.mts +54 -5
- package/dist/core/Hooks/index.mjs +1 -1
- package/dist/errorHandler-CL2YIfQY.d.mts +26 -0
- package/dist/i18n/index.mjs +4 -4
- package/dist/immer.d-CoRThNOF.d.mts +23 -0
- package/dist/lib/index.d.mts +12 -162
- package/dist/lib/index.mjs +2 -2
- package/dist/locales/el/thorium-web.json +31 -0
- package/dist/locales/en/thorium-web.json +14 -2
- package/dist/locales/et/thorium-web.json +6 -2
- package/dist/locales/fi/thorium-shared.json +14 -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 +3 -3
- 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/package.json +5 -3
- package/dist/chunk-COQXDRKD.mjs.map +0 -1
- package/dist/chunk-KJXHAJYK.mjs.map +0 -1
- package/dist/chunk-KTPIH35Y.mjs.map +0 -1
- package/dist/chunk-QNYZCQKO.mjs.map +0 -1
- package/dist/chunk-SFHOVH6R.mjs.map +0 -1
- package/dist/chunk-SMK7A7VF.mjs.map +0 -1
- package/dist/useContrast-Cgsrl7GS.d.mts +0 -15
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { e as UnstableShortcutRepresentation } from './keyboardUtilities-BWAyLS_D.mjs';
|
|
2
|
-
import { B as BreakpointsMap,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { B as BreakpointsMap, T as ThBreakpoints, a as ThBreakpointsObject, b as ThLayoutDirection, c as ThDocumentTitleFormat, d as ThBackLinkPref, e as ThFormatPref, f as ThRunningHeadFormat, g as ThProgressionFormat, h as ThLayoutUI, i as ThPaginatedAffordancePref } from './ui-CamWuqOo.mjs';
|
|
3
|
+
import { I as I18nValue, d as ThColorScheme, e as ThContrast, f as ThSettingsKeys, g as ThTextSettingsKeys, b as ThSpacingSettingsKeys, h as ThSettingsRangePref, i as ThSettingsRadioPref, T as ThLineHeightOptions, j as ThSettingsGroupPref, a as ThSpacingPresetKeys } from './useContrast-D6sjPjxy.mjs';
|
|
4
|
+
import { b as ThSheetTypes, c as ThActionsKeys, d as ThCollapsibility, e as ThActionsTokens, f as ThDockingPref, T as ThDockingKeys } from './actions-D2CHvCHu.mjs';
|
|
5
5
|
import { IContentProtectionConfig, ExperimentKey } from '@readium/navigator';
|
|
6
6
|
|
|
7
7
|
type CSSValueUnitless = `${number}`;
|
|
@@ -22,11 +22,6 @@ type CSSTime = CSSValueWithUnit<"ms" | "s">;
|
|
|
22
22
|
type CSSViewport = CSSDefaultViewport | CSSDynamicViewport | CSSLargeViewport | CSSSmallViewport;
|
|
23
23
|
type CSSColor = string | `#${string}` | `rgb(${string})` | `rgba(${string})` | `hsl(${string})` | `hsla(${string})` | `hwb(${string})` | `lab(${string})` | `lch(${string})` | `oklab(${string})` | `oklch(${string})` | `color(${string})` | `color-mix(${string})` | `light-dark(${string})`;
|
|
24
24
|
|
|
25
|
-
type I18nValue<T> = T | string | {
|
|
26
|
-
key: string;
|
|
27
|
-
fallback?: string;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
25
|
interface SystemFontSource {
|
|
31
26
|
type: "system";
|
|
32
27
|
}
|
|
@@ -165,136 +160,6 @@ declare const defaultContentProtectionConfig: ContentProtectionConfig;
|
|
|
165
160
|
*/
|
|
166
161
|
declare const devContentProtectionConfig: ContentProtectionConfig;
|
|
167
162
|
|
|
168
|
-
interface ThSettingsGroupPref<T> {
|
|
169
|
-
main: T[];
|
|
170
|
-
subPanel: T[] | null;
|
|
171
|
-
header?: ThSheetHeaderVariant;
|
|
172
|
-
}
|
|
173
|
-
interface ThSettingsRangePref {
|
|
174
|
-
variant?: ThSettingsRangeVariant;
|
|
175
|
-
placeholder?: I18nValue<ThSettingsRangePlaceholder>;
|
|
176
|
-
range?: [number, number];
|
|
177
|
-
step?: number;
|
|
178
|
-
}
|
|
179
|
-
interface ThSettingsRadioPref<T extends string> {
|
|
180
|
-
allowUnset?: boolean;
|
|
181
|
-
keys: {
|
|
182
|
-
[key in T]: number;
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
declare enum ThSettingsKeys {
|
|
186
|
-
columns = "columns",
|
|
187
|
-
fontFamily = "fontFamily",
|
|
188
|
-
fontWeight = "fontWeight",
|
|
189
|
-
hyphens = "hyphens",
|
|
190
|
-
layout = "layout",
|
|
191
|
-
letterSpacing = "letterSpacing",
|
|
192
|
-
lineHeight = "lineHeight",
|
|
193
|
-
paragraphIndent = "paragraphIndent",
|
|
194
|
-
paragraphSpacing = "paragraphSpacing",
|
|
195
|
-
publisherStyles = "publisherStyles",
|
|
196
|
-
spacingGroup = "spacingGroup",
|
|
197
|
-
spacingPresets = "spacingPresets",
|
|
198
|
-
textAlign = "textAlign",
|
|
199
|
-
textGroup = "textGroup",
|
|
200
|
-
textNormalize = "textNormalize",
|
|
201
|
-
theme = "theme",
|
|
202
|
-
wordSpacing = "wordSpacing",
|
|
203
|
-
zoom = "zoom"
|
|
204
|
-
}
|
|
205
|
-
declare enum ThTextSettingsKeys {
|
|
206
|
-
fontFamily = "fontFamily",
|
|
207
|
-
fontWeight = "fontWeight",
|
|
208
|
-
hyphens = "hyphens",
|
|
209
|
-
textAlign = "textAlign",
|
|
210
|
-
textNormalize = "textNormalize"
|
|
211
|
-
}
|
|
212
|
-
declare enum ThSpacingSettingsKeys {
|
|
213
|
-
letterSpacing = "letterSpacing",
|
|
214
|
-
lineHeight = "lineHeight",
|
|
215
|
-
paragraphIndent = "paragraphIndent",
|
|
216
|
-
paragraphSpacing = "paragraphSpacing",
|
|
217
|
-
publisherStyles = "publisherStyles",
|
|
218
|
-
spacingPresets = "spacingPresets",
|
|
219
|
-
wordSpacing = "wordSpacing"
|
|
220
|
-
}
|
|
221
|
-
declare enum ThSettingsContainerKeys {
|
|
222
|
-
initial = "initial",
|
|
223
|
-
text = "text",
|
|
224
|
-
spacing = "spacing"
|
|
225
|
-
}
|
|
226
|
-
declare enum ThSettingsRangeVariant {
|
|
227
|
-
slider = "slider",
|
|
228
|
-
incrementedSlider = "incrementedSlider",
|
|
229
|
-
numberField = "numberField"
|
|
230
|
-
}
|
|
231
|
-
declare enum ThSettingsRangePlaceholder {
|
|
232
|
-
range = "range",
|
|
233
|
-
none = "none"
|
|
234
|
-
}
|
|
235
|
-
declare enum ThSpacingPresetKeys {
|
|
236
|
-
publisher = "publisher",
|
|
237
|
-
tight = "tight",
|
|
238
|
-
balanced = "balanced",
|
|
239
|
-
loose = "loose",
|
|
240
|
-
accessible = "accessible",
|
|
241
|
-
custom = "custom"
|
|
242
|
-
}
|
|
243
|
-
declare enum ThLayoutOptions {
|
|
244
|
-
scroll = "scroll_option",
|
|
245
|
-
paginated = "page_option"
|
|
246
|
-
}
|
|
247
|
-
declare enum ThTextAlignOptions {
|
|
248
|
-
publisher = "publisher",
|
|
249
|
-
start = "start",
|
|
250
|
-
justify = "justify"
|
|
251
|
-
}
|
|
252
|
-
declare enum ThLineHeightOptions {
|
|
253
|
-
publisher = "publisher",
|
|
254
|
-
small = "small",
|
|
255
|
-
medium = "medium",
|
|
256
|
-
large = "large"
|
|
257
|
-
}
|
|
258
|
-
declare const defaultTextSettingsMain: ThTextSettingsKeys[];
|
|
259
|
-
declare const defaultTextSettingsSubpanel: ThTextSettingsKeys[];
|
|
260
|
-
declare const defaultSpacingSettingsMain: ThSpacingSettingsKeys[];
|
|
261
|
-
declare const defaultSpacingSettingsSubpanel: ThSpacingSettingsKeys[];
|
|
262
|
-
declare const defaultSpacingPresetsOrder: ThSpacingPresetKeys[];
|
|
263
|
-
declare const defaultParagraphSpacing: Required<ThSettingsRangePref>;
|
|
264
|
-
declare const defaultParagraphIndent: Required<ThSettingsRangePref>;
|
|
265
|
-
declare const defaultWordSpacing: Required<ThSettingsRangePref>;
|
|
266
|
-
declare const defaultLetterSpacing: Required<ThSettingsRangePref>;
|
|
267
|
-
declare const defaultLineHeights: {
|
|
268
|
-
small: number;
|
|
269
|
-
medium: number;
|
|
270
|
-
large: number;
|
|
271
|
-
};
|
|
272
|
-
declare const defaultZoom: Required<ThSettingsRangePref>;
|
|
273
|
-
declare const defaultSpacingPresets: {
|
|
274
|
-
tight: {
|
|
275
|
-
lineHeight: ThLineHeightOptions;
|
|
276
|
-
paragraphSpacing: number;
|
|
277
|
-
paragraphIndent: number;
|
|
278
|
-
};
|
|
279
|
-
balanced: {
|
|
280
|
-
lineHeight: ThLineHeightOptions;
|
|
281
|
-
paragraphSpacing: number;
|
|
282
|
-
paragraphIndent: number;
|
|
283
|
-
};
|
|
284
|
-
loose: {
|
|
285
|
-
lineHeight: ThLineHeightOptions;
|
|
286
|
-
paragraphSpacing: number;
|
|
287
|
-
paragraphIndent: number;
|
|
288
|
-
};
|
|
289
|
-
accessible: {
|
|
290
|
-
lineHeight: ThLineHeightOptions;
|
|
291
|
-
paragraphSpacing: number;
|
|
292
|
-
paragraphIndent: number;
|
|
293
|
-
letterSpacing: number;
|
|
294
|
-
wordSpacing: number;
|
|
295
|
-
};
|
|
296
|
-
};
|
|
297
|
-
|
|
298
163
|
declare enum ThThemeKeys {
|
|
299
164
|
light = "light",
|
|
300
165
|
sepia = "sepia",
|
|
@@ -646,4 +511,4 @@ interface ThPreferencesAdapter<T extends CustomizableKeys = CustomizableKeys> {
|
|
|
646
511
|
unsubscribe(callback: (prefs: ThPreferences<T>) => void): void;
|
|
647
512
|
}
|
|
648
513
|
|
|
649
|
-
export { type
|
|
514
|
+
export { type FontSource as $, type ActionKey as A, type CSSFrequency as B, type CustomizableKeys as C, type DefaultKeys as D, type CSSFontRelativeLength as E, type FontCollection as F, type CSSLargeViewport as G, type CSSPhysicalLength as H, type CSSRelativeLength as I, type CSSResolution as J, type CSSRootFontRelativeLength as K, type LocalStaticFontFile as L, type CSSSmallViewport as M, type CSSTime as N, type CSSViewport as O, type CSSColor as P, type SystemFontSource as Q, type BunnyFontSource as R, type SettingsKey as S, type ThPreferencesAdapter as T, type GoogleFontSource as U, type VariableFontRangeConfig as V, type WeightConfig as W, type LocalVariableFontFile as X, type LocalStaticFontSource as Y, type LocalVariableFontSource as Z, type LocalFontSource as _, type ThPreferences as a, type FontSpec as a0, type ValidatedLanguageCollection as a1, type ThFontFamilyPref as a2, readiumCSSFontCollection as a3, defaultFontCollection as a4, tamilCollection as a5, type CopyProtectionConfig as a6, type PrintProtectionConfig as a7, type ContentProtectionConfig as a8, resolveContentProtectionConfig as a9, defaultContentProtectionConfig as aa, devContentProtectionConfig as ab, lightTheme as ac, darkTheme as ad, paperTheme as ae, sepiaTheme as af, contrast1Theme as ag, contrast2Theme as ah, contrast3Theme as ai, type ThemeTokens as b, type FontDefinition as c, ThThemeKeys as d, type ThemeKey as e, type TextSettingsKey as f, type SpacingSettingsKey as g, type ThSettingsSpacingPresets as h, type ThSpacingPreset as i, type ThActionsPref as j, type ThSettingsKeyTypes as k, type ThConstraintKeys as l, createPreferences as m, type ActionKeyType as n, type ThemeKeyType as o, type SettingsKeyType as p, type TextSettingsKeyType as q, type SpacingSettingsKeyType as r, type useThemingProps as s, type CSSValueUnitless as t, useTheming as u, type CSSValueWithUnit as v, type CSSAbsoluteLength as w, type CSSAngle as x, type CSSDefaultViewport as y, type CSSDynamicViewport as z };
|
|
@@ -2,7 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import React__default, { ComponentType, SVGProps } from 'react';
|
|
3
3
|
import { TooltipTriggerProps, KeyboardProps } from 'react-aria';
|
|
4
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, Heading } from 'react-aria-components';
|
|
5
|
-
import { p as ThActionEntry, q as ThActionsBarProps, C as CollapsiblePref } from './actions-
|
|
5
|
+
import { p as ThActionEntry, q as ThActionsBarProps, C as CollapsiblePref } from './actions-D2CHvCHu.mjs';
|
|
6
6
|
|
|
7
7
|
interface HTMLAttributesWithRef<T> extends React.HTMLAttributes<T> {
|
|
8
8
|
ref?: React.ForwardedRef<T>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ToolbarProps } from 'react-aria-components';
|
|
3
|
-
import { B as BreakpointsMap } from './ui-
|
|
3
|
+
import { B as BreakpointsMap } from './ui-CamWuqOo.mjs';
|
|
4
4
|
|
|
5
5
|
declare enum ThActionsTriggerVariant {
|
|
6
6
|
button = "iconButton",
|
|
@@ -105,4 +105,4 @@ declare const defaultFullscreenAction: ThActionsTokens;
|
|
|
105
105
|
declare const defaultTocAction: ThActionsTokens;
|
|
106
106
|
declare const defaultJumpToPositionAction: ThActionsTokens;
|
|
107
107
|
|
|
108
|
-
export { type CollapsiblePref as C, ThDockingKeys as T,
|
|
108
|
+
export { type CollapsiblePref as C, ThDockingKeys as T, ThSheetHeaderVariant as a, ThSheetTypes as b, ThActionsKeys as c, type ThCollapsibility as d, type ThActionsTokens as e, type ThDockingPref as f, type ThBottomSheetDetent as g, type ThActionsDockedPref as h, type ThActionsSnappedPref as i, ThDockingTypes as j, defaultActionKeysObject as k, defaultSettingsAction as l, defaultFullscreenAction as m, defaultTocAction as n, defaultJumpToPositionAction as o, type ThActionEntry as p, type ThActionsBarProps as q, ThCollapsibilityVisibility as r, ThActionsTriggerVariant as s, ThActionsBar as t, useCollapsibility as u };
|
|
@@ -1,27 +1,6 @@
|
|
|
1
1
|
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
type PrimitiveType = number | string | boolean;
|
|
5
|
-
/** Object types that should never be mapped */
|
|
6
|
-
type AtomicObject = Function | Promise<any> | Date | RegExp;
|
|
7
|
-
/**
|
|
8
|
-
* If the lib "ES2015.Collection" is not included in tsconfig.json,
|
|
9
|
-
* types like ReadonlyArray, WeakMap etc. fall back to `any` (specified nowhere)
|
|
10
|
-
* or `{}` (from the node types), in both cases entering an infinite recursion in
|
|
11
|
-
* pattern matching type mappings
|
|
12
|
-
* This type can be used to cast these types to `void` in these cases.
|
|
13
|
-
*/
|
|
14
|
-
type IfAvailable<T, Fallback = void> = true | false extends (T extends never ? true : false) ? Fallback : keyof T extends never ? Fallback : T;
|
|
15
|
-
/**
|
|
16
|
-
* These should also never be mapped but must be tested after regular Map and
|
|
17
|
-
* Set
|
|
18
|
-
*/
|
|
19
|
-
type WeakReferences = IfAvailable<WeakMap<any, any>> | IfAvailable<WeakSet<any>>;
|
|
20
|
-
type WritableDraft<T> = {
|
|
21
|
-
-readonly [K in keyof T]: Draft<T[K]>;
|
|
22
|
-
};
|
|
23
|
-
/** Convert a readonly type into a mutable type, if possible */
|
|
24
|
-
type Draft<T> = T extends PrimitiveType ? T : T extends AtomicObject ? T : T extends ReadonlyMap<infer K, infer V> ? Map<Draft<K>, Draft<V>> : T extends ReadonlySet<infer V> ? Set<Draft<V>> : T extends WeakReferences ? T : T extends object ? WritableDraft<T> : T;
|
|
2
|
+
import { W as WritableDraft } from './immer.d-CoRThNOF.mjs';
|
|
3
|
+
import { T as ThDockingKeys } from './actions-D2CHvCHu.mjs';
|
|
25
4
|
|
|
26
5
|
type ActionsStateKeys = string;
|
|
27
6
|
type OverflowStateKeys = string;
|
|
@@ -132,4 +111,4 @@ declare const setDockPanelWidth: _reduxjs_toolkit.ActionCreatorWithPayload<{
|
|
|
132
111
|
width: number;
|
|
133
112
|
}, "actions/setDockPanelWidth">;
|
|
134
113
|
|
|
135
|
-
export { type ActionsStateKeys as A, type DockStateObject as D, type OverflowStateKeys as O, type
|
|
114
|
+
export { type ActionsStateKeys as A, type DockStateObject as D, type OverflowStateKeys as O, 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 };
|