@edrlab/thorium-web 1.1.2 → 1.1.4
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/README.md +2 -0
- package/dist/{StatefulReader-BjH7bkU1.d.mts → StatefulReader-lpxHxgKK.d.mts} +8 -6
- package/dist/{ThPreferencesAdapter-x_D4c7wI.d.mts → ThPreferencesAdapter-CcJgE3zC.d.mts} +78 -56
- package/dist/{actionsReducer-BKoeohBu.d.mts → actionsReducer-6UNIgifE.d.mts} +1 -1
- package/dist/{chunk-2JHEFF46.mjs → chunk-GKXS45F4.mjs} +347 -47
- package/dist/chunk-GKXS45F4.mjs.map +1 -0
- package/dist/{chunk-VETE7ULS.mjs → chunk-KKMH2EPS.mjs} +12 -4
- package/dist/chunk-KKMH2EPS.mjs.map +1 -0
- package/dist/{chunk-HE3WFPGE.mjs → chunk-KTZPAJ4S.mjs} +34 -19
- package/dist/chunk-KTZPAJ4S.mjs.map +1 -0
- package/dist/{chunk-EY4D4BZN.mjs → chunk-MW7LXDWC.mjs} +3 -3
- package/dist/{chunk-EY4D4BZN.mjs.map → chunk-MW7LXDWC.mjs.map} +1 -1
- package/dist/{chunk-IRA4ZKAX.mjs → chunk-VN44OJDD.mjs} +819 -43
- package/dist/chunk-VN44OJDD.mjs.map +1 -0
- package/dist/components/Epub/index.css +1 -0
- package/dist/components/Epub/index.css.map +1 -1
- package/dist/components/Epub/index.d.mts +8 -8
- package/dist/components/Epub/index.mjs +55 -18
- package/dist/components/Epub/index.mjs.map +1 -1
- package/dist/components/WebPub/index.css +1 -0
- package/dist/components/WebPub/index.css.map +1 -1
- package/dist/components/WebPub/index.d.mts +12 -12
- package/dist/components/WebPub/index.mjs +39 -16
- package/dist/components/WebPub/index.mjs.map +1 -1
- package/dist/core/Components/index.d.mts +2 -2
- package/dist/core/Helpers/index.d.mts +2 -2
- package/dist/core/Hooks/index.d.mts +4 -4
- package/dist/core/Hooks/index.mjs +1 -1
- package/dist/{enums-CBaXSsr9.d.mts → enums-Bhwwdfx5.d.mts} +1 -1
- package/dist/fonts/AccessibleDfA/AccessibleDfA-Bold.woff2 +0 -0
- package/dist/fonts/AccessibleDfA/AccessibleDfA-Italic.woff2 +0 -0
- package/dist/fonts/AccessibleDfA/AccessibleDfA-Regular.woff2 +0 -0
- package/dist/fonts/AccessibleDfA/LICENSE-AccessibleDfa +95 -0
- package/dist/fonts/AndroidPatch/sans-serif/GNU General Public License.txt +340 -0
- package/dist/fonts/AndroidPatch/sans-serif/NimbusSans-Bold.woff +0 -0
- package/dist/fonts/AndroidPatch/sans-serif/NimbusSans-BoldItalic.woff +0 -0
- package/dist/fonts/AndroidPatch/sans-serif/NimbusSans-Italic.woff +0 -0
- package/dist/fonts/AndroidPatch/sans-serif/NimbusSans.woff +0 -0
- package/dist/fonts/AndroidPatch/serif/GNU General Public License.txt +340 -0
- package/dist/fonts/AndroidPatch/serif/NimbusRoman-Bold.woff +0 -0
- package/dist/fonts/AndroidPatch/serif/NimbusRoman-BoldItalic.woff +0 -0
- package/dist/fonts/AndroidPatch/serif/NimbusRoman-Italic.woff +0 -0
- package/dist/fonts/AndroidPatch/serif/NimbusRoman.woff +0 -0
- package/dist/fonts/Luciole/Luciole-Bold.woff2 +0 -0
- package/dist/fonts/Luciole/Luciole-BoldItalic.woff2 +0 -0
- package/dist/fonts/Luciole/Luciole-Italic.woff2 +0 -0
- package/dist/fonts/Luciole/Luciole-Regular.woff2 +0 -0
- package/dist/fonts/Luciole/Read Me.txt +14 -0
- package/dist/fonts/OpenDyslexic/OpenDyslexic-Bold.otf +0 -0
- package/dist/fonts/OpenDyslexic/OpenDyslexic-BoldItalic.otf +0 -0
- package/dist/fonts/OpenDyslexic/OpenDyslexic-Italic.otf +0 -0
- package/dist/fonts/OpenDyslexic/OpenDyslexic-Regular.otf +0 -0
- package/dist/fonts/iAWriterDuo/README.md +13 -0
- package/dist/fonts/iAWriterDuo/iAWriterDuoS-Bold.woff2 +0 -0
- package/dist/fonts/iAWriterDuo/iAWriterDuoS-BoldItalic.woff2 +0 -0
- package/dist/fonts/iAWriterDuo/iAWriterDuoS-Italic.woff2 +0 -0
- package/dist/fonts/iAWriterDuo/iAWriterDuoS-Regular.woff2 +0 -0
- package/dist/i18n/index.mjs +2 -2
- package/dist/lib/index.d.mts +35 -18
- package/dist/lib/index.mjs +1 -1
- package/dist/locales/ar/thorium-shared.json +258 -2
- package/dist/locales/ar/thorium-web.json +59 -1
- package/dist/locales/da/thorium-shared.json +9 -3
- package/dist/locales/el/thorium-web.json +53 -1
- package/dist/locales/en/thorium-shared.json +30 -12
- package/dist/locales/et/thorium-shared.json +99 -7
- package/dist/locales/fi/thorium-shared.json +68 -15
- package/dist/locales/fr/thorium-shared.json +12 -6
- package/dist/locales/it/thorium-shared.json +82 -14
- package/dist/locales/lt/thorium-shared.json +80 -12
- package/dist/locales/pt-BR/thorium-shared.json +24 -12
- package/dist/locales/pt-PT/thorium-shared.json +24 -12
- package/dist/locales/sv/thorium-shared.json +24 -12
- package/dist/locales/tr/thorium-shared.json +24 -12
- package/dist/preferences/index.d.mts +104 -7
- package/dist/preferences/index.mjs +1 -1
- package/dist/{useBreakpoints-BtHd3571.d.mts → useBreakpoints-LTrHif3E.d.mts} +1 -1
- package/dist/{useEpubNavigator-DpvqVgNu.d.mts → useEpubNavigator-DQq5VlY0.d.mts} +2 -1
- package/dist/usePreferences-CM_Y2jpZ.d.mts +42 -0
- package/dist/{useWebPubNavigator-DBRj8KyC.d.mts → useWebPubNavigator-XFUVekhV.d.mts} +2 -1
- package/package.json +22 -20
- package/dist/chunk-2JHEFF46.mjs.map +0 -1
- package/dist/chunk-HE3WFPGE.mjs.map +0 -1
- package/dist/chunk-IRA4ZKAX.mjs.map +0 -1
- package/dist/chunk-VETE7ULS.mjs.map +0 -1
- package/dist/usePreferences-CRjFlZvF.d.mts +0 -16
|
@@ -46,19 +46,31 @@
|
|
|
46
46
|
"title": "Görüntüleme Ayarları"
|
|
47
47
|
},
|
|
48
48
|
"progression": {
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"
|
|
54
|
-
|
|
49
|
+
"pagesLeft": {
|
|
50
|
+
"descriptive_one": "{{ count }} sayfa kaldı",
|
|
51
|
+
"descriptive_other": "{{ count }} sayfa kaldı"
|
|
52
|
+
},
|
|
53
|
+
"pagesLeftInChapter": {
|
|
54
|
+
"descriptive_one": "Bölümde, {{ count }} sayfa kaldı",
|
|
55
|
+
"descriptive_other": "Bölümde, {{ count }} sayfa kaldı"
|
|
56
|
+
},
|
|
57
|
+
"pagesLeftInPublication": {
|
|
58
|
+
"descriptive_one": "Eserde, {{ count }} sayfa kaldı",
|
|
59
|
+
"descriptive_other": "Eserde, {{ count }} sayfa kaldı"
|
|
60
|
+
},
|
|
55
61
|
"percentage": "%{{ percentage }}",
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
+
"positionsLeft": {
|
|
63
|
+
"descriptive_one": "Geriye {{ count }} kaldı",
|
|
64
|
+
"descriptive_other": "Geriye {{ count }} kaldı"
|
|
65
|
+
},
|
|
66
|
+
"positionsLeftInChapter": {
|
|
67
|
+
"descriptive_one": "Bölümde, geriye {{ count }} kaldı",
|
|
68
|
+
"descriptive_other": "Bölümde, geriye {{ count }} kaldı"
|
|
69
|
+
},
|
|
70
|
+
"positionsLeftInPublication": {
|
|
71
|
+
"descriptive_one": "Eserde, geriye {{ count }} kaldı",
|
|
72
|
+
"descriptive_other": "Eserde, geriye {{ count }} kaldı"
|
|
73
|
+
},
|
|
62
74
|
"range": "{{ start }}–{{ end }}",
|
|
63
75
|
"xOfY": {
|
|
64
76
|
"compact": "{{ x }} / {{ y }}",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { C as CustomizableKeys, D as DefaultKeys, a as ThPreferences, T as ThPreferencesAdapter, b as ThemeTokens } from '../ThPreferencesAdapter-
|
|
2
|
-
export { A as ActionKey,
|
|
1
|
+
import { C as CustomizableKeys, D as DefaultKeys, a as ThPreferences, T as ThPreferencesAdapter, b as ThemeTokens, F as FontCollection, L as LocalStaticFontFile, c as FontDefinition, d as ThActionsTokens, e as ThSettingsRangePref } from '../ThPreferencesAdapter-CcJgE3zC.mjs';
|
|
2
|
+
export { A as ActionKey, U as ActionKeyType, B as BunnyFontSource, j as FontSource, k as FontSpec, G as GoogleFontSource, I as I18nValue, i as LocalFontSource, g as LocalStaticFontSource, f as LocalVariableFontFile, h as LocalVariableFontSource, w as SettingsKey, Y as SettingsKeyType, y as SpacingSettingsKey, _ as SpacingSettingsKeyType, S as SystemFontSource, x as TextSettingsKey, Z as TextSettingsKeyType, r as ThActionsDockedPref, z as ThActionsPref, q as ThActionsSnappedPref, n as ThBackLinkContent, o as ThBackLinkPref, p as ThBottomSheetDetent, M as ThConstraintKeys, E as ThDockingPref, m as ThFontFamilyPref, O as ThFormatPref, N as ThFormatPrefValue, Q as ThPaginatedAffordancePref, P as ThPaginatedAffordancePrefValue, H as ThSettingsGroupPref, K as ThSettingsKeyTypes, J as ThSettingsRadioPref, s as ThSettingsSpacingPresets, t as ThSpacingPreset, v as ThemeKey, X as ThemeKeyType, l as ValidatedLanguageCollection, V as VariableFontRangeConfig, W as WeightConfig, R as createPreferences, u as useTheming, $ as useThemingProps } from '../ThPreferencesAdapter-CcJgE3zC.mjs';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
export { T as ThPreferencesProvider, u as usePreferences } from '../usePreferences-
|
|
4
|
+
export { T as ThPreferencesProvider, u as usePreferences } from '../usePreferences-CM_Y2jpZ.mjs';
|
|
5
5
|
import { T as ThColorScheme } from '../useContrast-Cgsrl7GS.mjs';
|
|
6
|
-
import {
|
|
7
|
-
export {
|
|
6
|
+
import { m as ThActionsKeys, l as ThThemeKeys, o as ThSettingsKeys, p as ThTextSettingsKeys, q as ThSpacingSettingsKeys, u as ThSpacingPresetKeys, T as ThLineHeightOptions } from '../enums-Bhwwdfx5.mjs';
|
|
7
|
+
export { d as ThArrowVariant, g as ThBackLinkVariant, b as ThBreakpoints, c as ThDockingKeys, n as ThDockingTypes, f as ThDocumentTitleFormat, e as ThLayoutDirection, w as ThLayoutOptions, j as ThLayoutUI, i as ThProgressionFormat, h as ThRunningHeadFormat, v as ThSettingsContainerKeys, s as ThSettingsRangePlaceholder, r as ThSettingsRangeVariant, t as ThSheetHeaderVariant, k as ThSheetTypes, a as ThTextAlignOptions } from '../enums-Bhwwdfx5.mjs';
|
|
8
8
|
import '../keyboardUtilities-BWAyLS_D.mjs';
|
|
9
|
-
import '../useBreakpoints-
|
|
9
|
+
import '../useBreakpoints-LTrHif3E.mjs';
|
|
10
10
|
import '@readium/navigator';
|
|
11
11
|
import '../useCollapsibility-CM1I24Ol.mjs';
|
|
12
12
|
import 'react/jsx-runtime';
|
|
@@ -45,6 +45,57 @@ interface buildThemeProps<T extends string> {
|
|
|
45
45
|
}
|
|
46
46
|
declare const buildThemeObject: <T extends string>({ theme, themeKeys, systemThemes, colorScheme }: buildThemeProps<T>) => {};
|
|
47
47
|
|
|
48
|
+
interface BunnyFontDefinitionParams {
|
|
49
|
+
cssUrl: string;
|
|
50
|
+
options?: {
|
|
51
|
+
labels?: Record<string, string>;
|
|
52
|
+
fallbacks?: Record<string, string[]>;
|
|
53
|
+
order?: string[];
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Parses a Bunny Fonts CSS URL and creates font definitions for all families
|
|
58
|
+
* @param params Bunny Fonts CSS URL and optional configuration
|
|
59
|
+
* @returns FontCollection object with all font definitions
|
|
60
|
+
* @throws Error if CSS URL is invalid or cannot be parsed
|
|
61
|
+
*/
|
|
62
|
+
declare const createDefinitionsFromBunnyFonts: (params: BunnyFontDefinitionParams) => FontCollection;
|
|
63
|
+
|
|
64
|
+
interface GoogleFontDefinitionParams {
|
|
65
|
+
cssUrl: string;
|
|
66
|
+
options?: {
|
|
67
|
+
widthStep?: number;
|
|
68
|
+
weightStep?: number;
|
|
69
|
+
display?: "swap" | "block" | "fallback" | "optional";
|
|
70
|
+
labels?: Record<string, string>;
|
|
71
|
+
fallbacks?: Record<string, string[]>;
|
|
72
|
+
order?: string[];
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Parses a Google Fonts CSS URL and creates font definitions for all families
|
|
77
|
+
* @param params Google Fonts CSS URL and optional configuration for step values and display
|
|
78
|
+
* @returns FontCollection object with all font definitions
|
|
79
|
+
* @throws Error if CSS URL is invalid or cannot be parsed
|
|
80
|
+
*/
|
|
81
|
+
declare const createDefinitionsFromGoogleFonts: (params: GoogleFontDefinitionParams) => FontCollection;
|
|
82
|
+
|
|
83
|
+
interface CreateFontDefinitionParams {
|
|
84
|
+
id: string;
|
|
85
|
+
name: string;
|
|
86
|
+
files: LocalStaticFontFile[];
|
|
87
|
+
family?: string;
|
|
88
|
+
label?: string;
|
|
89
|
+
fallbacks?: string[];
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Creates a complete font definition by inferring properties from static font files
|
|
93
|
+
* @param params Font definition parameters
|
|
94
|
+
* @returns Complete font definition with inferred spec
|
|
95
|
+
* @throws Error if files are not static font files or if no files provided
|
|
96
|
+
*/
|
|
97
|
+
declare const createDefinitionFromStaticFonts: (params: CreateFontDefinitionParams) => FontDefinition;
|
|
98
|
+
|
|
48
99
|
declare const usePreferenceKeys: () => {
|
|
49
100
|
reflowActionKeys: ThActionsKeys[];
|
|
50
101
|
fxlActionKeys: ThActionsKeys[];
|
|
@@ -63,4 +114,50 @@ declare const usePreferenceKeys: () => {
|
|
|
63
114
|
webPubSpacingPresetKeys: ThSpacingPresetKeys[];
|
|
64
115
|
};
|
|
65
116
|
|
|
66
|
-
|
|
117
|
+
declare const defaultActionKeysObject: ThActionsTokens;
|
|
118
|
+
declare const defaultTextSettingsMain: ThTextSettingsKeys[];
|
|
119
|
+
declare const defaultTextSettingsSubpanel: ThTextSettingsKeys[];
|
|
120
|
+
declare const defaultSpacingSettingsMain: ThSpacingSettingsKeys[];
|
|
121
|
+
declare const defaultSpacingSettingsSubpanel: ThSpacingSettingsKeys[];
|
|
122
|
+
declare const defaultSpacingPresetsOrder: ThSpacingPresetKeys[];
|
|
123
|
+
declare const readiumCSSFontCollection: FontCollection;
|
|
124
|
+
declare const defaultFontCollection: FontCollection;
|
|
125
|
+
declare const tamilCollection: {
|
|
126
|
+
[x: string]: FontDefinition;
|
|
127
|
+
};
|
|
128
|
+
declare const defaultParagraphSpacing: Required<ThSettingsRangePref>;
|
|
129
|
+
declare const defaultParagraphIndent: Required<ThSettingsRangePref>;
|
|
130
|
+
declare const defaultWordSpacing: Required<ThSettingsRangePref>;
|
|
131
|
+
declare const defaultLetterSpacing: Required<ThSettingsRangePref>;
|
|
132
|
+
declare const defaultLineHeights: {
|
|
133
|
+
small: number;
|
|
134
|
+
medium: number;
|
|
135
|
+
large: number;
|
|
136
|
+
};
|
|
137
|
+
declare const defaultZoom: Required<ThSettingsRangePref>;
|
|
138
|
+
declare const defaultSpacingPresets: {
|
|
139
|
+
tight: {
|
|
140
|
+
lineHeight: ThLineHeightOptions;
|
|
141
|
+
paragraphSpacing: number;
|
|
142
|
+
paragraphIndent: number;
|
|
143
|
+
};
|
|
144
|
+
balanced: {
|
|
145
|
+
lineHeight: ThLineHeightOptions;
|
|
146
|
+
paragraphSpacing: number;
|
|
147
|
+
paragraphIndent: number;
|
|
148
|
+
};
|
|
149
|
+
loose: {
|
|
150
|
+
lineHeight: ThLineHeightOptions;
|
|
151
|
+
paragraphSpacing: number;
|
|
152
|
+
paragraphIndent: number;
|
|
153
|
+
};
|
|
154
|
+
accessible: {
|
|
155
|
+
lineHeight: ThLineHeightOptions;
|
|
156
|
+
paragraphSpacing: number;
|
|
157
|
+
paragraphIndent: number;
|
|
158
|
+
letterSpacing: number;
|
|
159
|
+
wordSpacing: number;
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
export { CustomizableKeys, DefaultKeys, FontCollection, FontDefinition, type GoogleFontDefinitionParams, LocalStaticFontFile, type PreferencesContextValue, ThActionsKeys, ThActionsTokens, ThLineHeightOptions, ThMemoryPreferencesAdapter, ThPreferences, ThPreferencesAdapter, ThPreferencesContext, ThSettingsKeys, ThSettingsRangePref, ThSpacingPresetKeys, ThSpacingSettingsKeys, ThTextSettingsKeys, ThThemeKeys, ThemeTokens, buildThemeObject, type buildThemeProps, createDefinitionFromStaticFonts, createDefinitionsFromBunnyFonts, createDefinitionsFromGoogleFonts, defaultActionKeysObject, defaultFontCollection, defaultLetterSpacing, defaultLineHeights, defaultParagraphIndent, defaultParagraphSpacing, defaultPreferences, defaultPreferencesContextValue, defaultSpacingPresets, defaultSpacingPresetsOrder, defaultSpacingSettingsMain, defaultSpacingSettingsSubpanel, defaultTextSettingsMain, defaultTextSettingsSubpanel, defaultWordSpacing, defaultZoom, readiumCSSFontCollection, tamilCollection, usePreferenceKeys };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ThMemoryPreferencesAdapter, ThPreferencesContext, ThPreferencesProvider, buildThemeObject, createPreferences, defaultActionKeysObject,
|
|
1
|
+
export { ThMemoryPreferencesAdapter, ThPreferencesContext, ThPreferencesProvider, buildThemeObject, createDefinitionFromStaticFonts, createDefinitionsFromBunnyFonts, createDefinitionsFromGoogleFonts, createPreferences, defaultActionKeysObject, defaultFontCollection, defaultLetterSpacing, defaultLineHeights, defaultParagraphIndent, defaultParagraphSpacing, defaultPreferences, defaultPreferencesContextValue, defaultSpacingPresets, defaultSpacingPresetsOrder, defaultSpacingSettingsMain, defaultSpacingSettingsSubpanel, defaultTextSettingsMain, defaultTextSettingsSubpanel, defaultWordSpacing, defaultZoom, readiumCSSFontCollection, tamilCollection, usePreferenceKeys, usePreferences, useTheming } from '../chunk-VN44OJDD.mjs';
|
|
2
2
|
import '../chunk-7CGMWOZN.mjs';
|
|
3
3
|
import '../chunk-BNPR6V7V.mjs';
|
|
4
4
|
import '../chunk-5LUMM7FW.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _readium_navigator from '@readium/navigator';
|
|
2
|
-
import { EpubNavigatorListeners, IEpubPreferences, IEpubDefaults, EpubSettings } from '@readium/navigator';
|
|
2
|
+
import { EpubNavigatorListeners, IEpubPreferences, IEpubDefaults, IInjectablesConfig, EpubSettings } from '@readium/navigator';
|
|
3
3
|
import { Publication, Locator, Link, Layout } from '@readium/shared';
|
|
4
4
|
|
|
5
5
|
type cbb = (ok: boolean) => void;
|
|
@@ -11,6 +11,7 @@ interface EpubNavigatorLoadProps {
|
|
|
11
11
|
initialPosition?: Locator;
|
|
12
12
|
preferences?: IEpubPreferences;
|
|
13
13
|
defaults?: IEpubDefaults;
|
|
14
|
+
injectables?: IInjectablesConfig;
|
|
14
15
|
}
|
|
15
16
|
declare const useEpubNavigator: () => {
|
|
16
17
|
EpubNavigatorLoad: (config: EpubNavigatorLoadProps, cb: Function) => void;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { C as CustomizableKeys, D as DefaultKeys, T as ThPreferencesAdapter, a as ThPreferences, W as WeightConfig, V as VariableFontRangeConfig, F as FontCollection } from './ThPreferencesAdapter-CcJgE3zC.mjs';
|
|
3
|
+
import { ILinkInjectable, IUrlInjectable, IBlobInjectable } from '@readium/navigator';
|
|
4
|
+
|
|
5
|
+
type Props<K extends CustomizableKeys = DefaultKeys> = {
|
|
6
|
+
adapter?: ThPreferencesAdapter<K>;
|
|
7
|
+
initialPreferences?: ThPreferences<K>;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
};
|
|
10
|
+
declare function ThPreferencesProvider<K extends CustomizableKeys = DefaultKeys>({ adapter, initialPreferences, children, }: Props<K>): react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
type FontResource = (ILinkInjectable & IUrlInjectable) | (ILinkInjectable & IBlobInjectable);
|
|
13
|
+
interface InjectableFontResources {
|
|
14
|
+
allowedDomains: string[];
|
|
15
|
+
prepend: FontResource[];
|
|
16
|
+
append: FontResource[];
|
|
17
|
+
}
|
|
18
|
+
interface FontMetadata {
|
|
19
|
+
fontStack: string | null;
|
|
20
|
+
fontFamily: string | null;
|
|
21
|
+
weights: WeightConfig | null;
|
|
22
|
+
widths: VariableFontRangeConfig | null;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare function usePreferences<K extends CustomizableKeys = DefaultKeys>(): {
|
|
26
|
+
preferences: ThPreferences<K>;
|
|
27
|
+
updatePreferences: (prefs: ThPreferences<K>) => void;
|
|
28
|
+
getFontInjectables: (options?: {
|
|
29
|
+
language?: string;
|
|
30
|
+
} | {
|
|
31
|
+
key?: string;
|
|
32
|
+
}, optimize?: boolean) => InjectableFontResources | null;
|
|
33
|
+
getFontsList: (options?: {
|
|
34
|
+
language?: string;
|
|
35
|
+
} | {
|
|
36
|
+
key?: string;
|
|
37
|
+
}) => FontCollection;
|
|
38
|
+
getFontMetadata: (fontId: string) => FontMetadata;
|
|
39
|
+
resolveFontLanguage: (bcp47Tag: string | undefined, direction: "ltr" | "rtl") => string;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export { ThPreferencesProvider as T, usePreferences as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _readium_navigator from '@readium/navigator';
|
|
2
|
-
import { WebPubNavigatorListeners, IWebPubPreferences, IWebPubDefaults, WebPubSettings } from '@readium/navigator';
|
|
2
|
+
import { WebPubNavigatorListeners, IWebPubPreferences, IWebPubDefaults, IInjectablesConfig, WebPubSettings } from '@readium/navigator';
|
|
3
3
|
import { Publication, Locator, Link } from '@readium/shared';
|
|
4
4
|
|
|
5
5
|
type cbb = (ok: boolean) => void;
|
|
@@ -10,6 +10,7 @@ interface WebPubNavigatorLoadProps {
|
|
|
10
10
|
initialPosition?: Locator;
|
|
11
11
|
preferences?: IWebPubPreferences;
|
|
12
12
|
defaults?: IWebPubDefaults;
|
|
13
|
+
injectables?: IInjectablesConfig;
|
|
13
14
|
}
|
|
14
15
|
declare const useWebPubNavigator: () => {
|
|
15
16
|
WebPubNavigatorLoad: (config: WebPubNavigatorLoadProps, 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.1.
|
|
23
|
+
"version": "1.1.4",
|
|
24
24
|
"private": false,
|
|
25
25
|
"files": [
|
|
26
26
|
"./dist"
|
|
@@ -46,21 +46,23 @@
|
|
|
46
46
|
"scripts": {
|
|
47
47
|
"dev": "next dev",
|
|
48
48
|
"build": "pnpm extract-locales && next build",
|
|
49
|
+
"build:analyze": "npx next experimental-analyze",
|
|
49
50
|
"start": "next start",
|
|
50
51
|
"lint": "eslint .",
|
|
51
52
|
"deploy": "npx @cloudflare/next-on-pages && npx wrangler pages deploy",
|
|
52
53
|
"preinstall": "npx only-allow pnpm",
|
|
53
54
|
"copy-locales": "cpx \"public/locales/**/*\" dist/locales",
|
|
55
|
+
"copy-fonts": "cpx \"public/fonts/**/*\" dist/fonts",
|
|
54
56
|
"extract-locales": "node scripts/extract-locales.mjs",
|
|
55
57
|
"check-locales": "node scripts/check-locales.mjs",
|
|
56
58
|
"update-locales": "pnpm remove @edrlab/thorium-locales && pnpm add @edrlab/thorium-locales@github:edrlab/thorium-locales && pnpm extract-locales && pnpm check-locales --summary --show-missing",
|
|
57
|
-
"bundle": "pnpm extract-locales && tsup --config tsup.config.ts && pnpm copy-locales"
|
|
59
|
+
"bundle": "pnpm extract-locales && tsup --config tsup.config.ts && pnpm copy-locales && pnpm copy-fonts"
|
|
58
60
|
},
|
|
59
61
|
"peerDependencies": {
|
|
60
62
|
"@readium/css": "2.0.0-beta.24",
|
|
61
|
-
"@readium/navigator": "2.2.
|
|
62
|
-
"@readium/navigator-html-injectables": "2.2.
|
|
63
|
-
"@readium/shared": "2.1.
|
|
63
|
+
"@readium/navigator": "2.2.9",
|
|
64
|
+
"@readium/navigator-html-injectables": "2.2.5",
|
|
65
|
+
"@readium/shared": "2.1.5",
|
|
64
66
|
"@reduxjs/toolkit": "^2.11.2",
|
|
65
67
|
"i18next": "^25.7.4",
|
|
66
68
|
"i18next-browser-languagedetector": "^8.2.0",
|
|
@@ -79,38 +81,38 @@
|
|
|
79
81
|
"dependencies": {
|
|
80
82
|
"@edrlab/thorium-locales": "github:edrlab/thorium-locales",
|
|
81
83
|
"@readium/css": "2.0.0-beta.24",
|
|
82
|
-
"@readium/navigator": "2.2.
|
|
83
|
-
"@readium/navigator-html-injectables": "2.2.
|
|
84
|
-
"@readium/shared": "2.1.
|
|
84
|
+
"@readium/navigator": "2.2.9",
|
|
85
|
+
"@readium/navigator-html-injectables": "2.2.5",
|
|
86
|
+
"@readium/shared": "2.1.5",
|
|
85
87
|
"@reduxjs/toolkit": "^2.11.2",
|
|
86
88
|
"classnames": "^2.5.1",
|
|
87
89
|
"debounce": "^3.0.0",
|
|
88
|
-
"i18next": "^25.
|
|
90
|
+
"i18next": "^25.8.4",
|
|
89
91
|
"i18next-browser-languagedetector": "^8.2.0",
|
|
90
92
|
"i18next-http-backend": "^3.0.2",
|
|
91
|
-
"motion": "^12.
|
|
92
|
-
"next": "16.1.
|
|
93
|
-
"react": "^19.2.
|
|
94
|
-
"react-aria": "^3.
|
|
95
|
-
"react-aria-components": "^1.
|
|
96
|
-
"react-dom": "^19.2.
|
|
97
|
-
"react-i18next": "^16.5.
|
|
93
|
+
"motion": "^12.33.2",
|
|
94
|
+
"next": "16.1.6",
|
|
95
|
+
"react": "^19.2.4",
|
|
96
|
+
"react-aria": "^3.46.0",
|
|
97
|
+
"react-aria-components": "^1.15.1",
|
|
98
|
+
"react-dom": "^19.2.4",
|
|
99
|
+
"react-i18next": "^16.5.4",
|
|
98
100
|
"react-modal-sheet": "^5.2.1",
|
|
99
101
|
"react-redux": "^9.2.0",
|
|
100
102
|
"react-resizable-panels": "^3.0.6",
|
|
101
|
-
"react-stately": "^3.
|
|
103
|
+
"react-stately": "^3.44.0"
|
|
102
104
|
},
|
|
103
105
|
"devDependencies": {
|
|
104
106
|
"@svgr/webpack": "^8.1.0",
|
|
105
107
|
"@types/css-modules": "^1.0.5",
|
|
106
108
|
"@types/node": "^22.19.7",
|
|
107
|
-
"@types/react": "^19.2.
|
|
109
|
+
"@types/react": "^19.2.13",
|
|
108
110
|
"@types/react-dom": "^19.2.3",
|
|
109
111
|
"cpx2": "^8.0.0",
|
|
110
112
|
"esbuild-plugin-svgr": "^3.1.1",
|
|
111
113
|
"eslint": "^9.39.2",
|
|
112
|
-
"eslint-config-next": "16.1.
|
|
113
|
-
"glob": "^13.0.
|
|
114
|
+
"eslint-config-next": "16.1.6",
|
|
115
|
+
"glob": "^13.0.1",
|
|
114
116
|
"immer": "11.1.2",
|
|
115
117
|
"tsup": "^8.5.1",
|
|
116
118
|
"typescript": "^5.9.3"
|