@edrlab/thorium-web 1.3.1 → 1.4.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.
Files changed (124) hide show
  1. package/dist/{ThPreferencesAdapter-D0rzsGRl.d.mts → ThPreferencesAdapter-_5AePKHa.d.mts} +26 -7
  2. package/dist/{ThSettingsWrapper-BXuRgdqp.d.mts → ThSettingsWrapper-B_9klYXH.d.mts} +1 -1
  3. package/dist/{actions-BLAr0oaM.d.mts → actions-CuRRM3rp.d.mts} +5 -2
  4. package/dist/{actionsReducer-XWTGGNUd.d.mts → actionsReducer-VFR42qgL.d.mts} +1 -1
  5. package/dist/{chunk-6EHFW43Y.mjs → chunk-2NCN2AG2.mjs} +5 -4
  6. package/dist/chunk-2NCN2AG2.mjs.map +1 -0
  7. package/dist/{chunk-L4XGZAZ5.mjs → chunk-2YRT7RNW.mjs} +20 -3
  8. package/dist/chunk-2YRT7RNW.mjs.map +1 -0
  9. package/dist/{chunk-5LUMM7FW.mjs → chunk-44PEO3DS.mjs} +2 -2
  10. package/dist/{chunk-5LUMM7FW.mjs.map → chunk-44PEO3DS.mjs.map} +1 -1
  11. package/dist/chunk-A575ZW4A.mjs +10 -0
  12. package/dist/chunk-A575ZW4A.mjs.map +1 -0
  13. package/dist/chunk-AE6P4KJB.mjs +13 -0
  14. package/dist/chunk-AE6P4KJB.mjs.map +1 -0
  15. package/dist/chunk-AQSJDL63.mjs +193 -0
  16. package/dist/chunk-AQSJDL63.mjs.map +1 -0
  17. package/dist/{chunk-NKO3K3QS.mjs → chunk-DQDOOTCE.mjs} +5 -5
  18. package/dist/chunk-DQDOOTCE.mjs.map +1 -0
  19. package/dist/{chunk-SAUOY37Q.mjs → chunk-E2JEGVVE.mjs} +15 -15
  20. package/dist/chunk-E2JEGVVE.mjs.map +1 -0
  21. package/dist/{chunk-DETZMFZ7.mjs → chunk-ETLIGONP.mjs} +39 -33
  22. package/dist/chunk-ETLIGONP.mjs.map +1 -0
  23. package/dist/chunk-GNROODJB.mjs +9 -0
  24. package/dist/chunk-GNROODJB.mjs.map +1 -0
  25. package/dist/{chunk-6BUN7DEA.mjs → chunk-KGSFTRCH.mjs} +69 -84
  26. package/dist/chunk-KGSFTRCH.mjs.map +1 -0
  27. package/dist/{chunk-LP3JFZ4A.mjs → chunk-MSHUPSBI.mjs} +718 -466
  28. package/dist/chunk-MSHUPSBI.mjs.map +1 -0
  29. package/dist/chunk-OD75GC5N.mjs +3953 -0
  30. package/dist/chunk-OD75GC5N.mjs.map +1 -0
  31. package/dist/{chunk-I4BKU5NN.mjs → chunk-RBEPH5E5.mjs} +100 -30
  32. package/dist/chunk-RBEPH5E5.mjs.map +1 -0
  33. package/dist/{chunk-DMZFSOHK.mjs → chunk-SI4FBFHM.mjs} +135 -46
  34. package/dist/chunk-SI4FBFHM.mjs.map +1 -0
  35. package/dist/{chunk-A3FZBEUL.mjs → chunk-SZAVAQ6S.mjs} +30 -6
  36. package/dist/chunk-SZAVAQ6S.mjs.map +1 -0
  37. package/dist/{chunk-ITDBOMY5.mjs → chunk-VENFFPK2.mjs} +3 -3
  38. package/dist/{chunk-ITDBOMY5.mjs.map → chunk-VENFFPK2.mjs.map} +1 -1
  39. package/dist/{chunk-2ORXUOH3.mjs → chunk-WF2UOYO7.mjs} +4 -4
  40. package/dist/{chunk-2ORXUOH3.mjs.map → chunk-WF2UOYO7.mjs.map} +1 -1
  41. package/dist/{chunk-EZG6SBSO.mjs → chunk-YEVLT3AV.mjs} +104 -29
  42. package/dist/chunk-YEVLT3AV.mjs.map +1 -0
  43. package/dist/components/Audio/index.css +2 -1
  44. package/dist/components/Audio/index.css.map +1 -1
  45. package/dist/components/Audio/index.d.mts +16 -15
  46. package/dist/components/Audio/index.mjs +16 -16
  47. package/dist/components/Epub/index.css +5 -4
  48. package/dist/components/Epub/index.css.map +1 -1
  49. package/dist/components/Epub/index.d.mts +13 -13
  50. package/dist/components/Epub/index.mjs +17 -17
  51. package/dist/components/Misc/index.mjs +5 -5
  52. package/dist/components/Reader/index.css +5 -4
  53. package/dist/components/Reader/index.css.map +1 -1
  54. package/dist/components/Reader/index.d.mts +11 -11
  55. package/dist/components/Reader/index.mjs +34 -30
  56. package/dist/components/Reader/index.mjs.map +1 -1
  57. package/dist/components/WebPub/index.css +5 -4
  58. package/dist/components/WebPub/index.css.map +1 -1
  59. package/dist/components/WebPub/index.d.mts +13 -13
  60. package/dist/components/WebPub/index.mjs +17 -17
  61. package/dist/core/Components/index.d.mts +12 -22
  62. package/dist/core/Components/index.mjs +2 -2
  63. package/dist/core/Helpers/index.d.mts +1 -1
  64. package/dist/core/Helpers/index.mjs +3 -4
  65. package/dist/core/Hooks/index.d.mts +12 -8
  66. package/dist/core/Hooks/index.mjs +1 -1
  67. package/dist/i18n/index.mjs +4 -7
  68. package/dist/lib/index.d.mts +56 -20
  69. package/dist/lib/index.mjs +3 -2
  70. package/dist/locales/da/thorium-shared.json +3 -0
  71. package/dist/locales/da/thorium-web.json +37 -2
  72. package/dist/locales/en/thorium-shared.json +24 -2
  73. package/dist/locales/en/thorium-web.json +2 -2
  74. package/dist/locales/es/thorium-shared.json +364 -0
  75. package/dist/locales/es/thorium-web.json +130 -0
  76. package/dist/locales/et/thorium-shared.json +121 -9
  77. package/dist/locales/et/thorium-web.json +32 -1
  78. package/dist/locales/fi/thorium-shared.json +42 -4
  79. package/dist/locales/fi/thorium-web.json +36 -2
  80. package/dist/locales/fr/thorium-shared.json +108 -1
  81. package/dist/locales/fr/thorium-web.json +121 -86
  82. package/dist/locales/it/thorium-shared.json +108 -1
  83. package/dist/locales/it/thorium-web.json +15 -2
  84. package/dist/locales/lt/thorium-web.json +36 -2
  85. package/dist/locales/pl/thorium-web.json +1 -1
  86. package/dist/locales/pt-BR/thorium-shared.json +6 -0
  87. package/dist/locales/pt-BR/thorium-web.json +88 -88
  88. package/dist/locales/pt-PT/thorium-shared.json +91 -0
  89. package/dist/locales/pt-PT/thorium-web.json +15 -3
  90. package/dist/locales/sv/thorium-shared.json +108 -2
  91. package/dist/locales/sv/thorium-web.json +15 -3
  92. package/dist/locales/tr/thorium-shared.json +42 -0
  93. package/dist/next-lib/index.mjs +1 -1
  94. package/dist/next-lib/index.mjs.map +1 -1
  95. package/dist/preferences/index.d.mts +59 -13
  96. package/dist/preferences/index.mjs +7 -7
  97. package/dist/{settingsReducer-Bu1zeveu.d.mts → settingsReducer-VqBhLq50.d.mts} +14 -2
  98. package/dist/{ui-nBv8gfr0.d.mts → ui-DnZZhozX.d.mts} +1 -1
  99. package/dist/{useAudioNavigator-C5aW4-eT.d.mts → useAudioNavigator-CWXyNWq1.d.mts} +3 -1
  100. package/dist/{useContrast-2t429O9O.d.mts → useContrast-Cbso7N1l.d.mts} +5 -1
  101. package/dist/{usePreferences-VaBf46eP.d.mts → usePreferences-9ZvbcbLW.d.mts} +6 -8
  102. package/dist/{useReaderTransitions-IBGdE7qi.d.mts → useReaderTransitions-0hKGCvMm.d.mts} +64 -12
  103. package/package.json +10 -9
  104. package/dist/chunk-6BUN7DEA.mjs.map +0 -1
  105. package/dist/chunk-6EHFW43Y.mjs.map +0 -1
  106. package/dist/chunk-7CGMWOZN.mjs +0 -20
  107. package/dist/chunk-7CGMWOZN.mjs.map +0 -1
  108. package/dist/chunk-A3FZBEUL.mjs.map +0 -1
  109. package/dist/chunk-B3WDMWCT.mjs +0 -9
  110. package/dist/chunk-B3WDMWCT.mjs.map +0 -1
  111. package/dist/chunk-DETZMFZ7.mjs.map +0 -1
  112. package/dist/chunk-DMZFSOHK.mjs.map +0 -1
  113. package/dist/chunk-DTPO3J2C.mjs +0 -1732
  114. package/dist/chunk-DTPO3J2C.mjs.map +0 -1
  115. package/dist/chunk-EZG6SBSO.mjs.map +0 -1
  116. package/dist/chunk-GPWW5OML.mjs +0 -1955
  117. package/dist/chunk-GPWW5OML.mjs.map +0 -1
  118. package/dist/chunk-I4BKU5NN.mjs.map +0 -1
  119. package/dist/chunk-L4XGZAZ5.mjs.map +0 -1
  120. package/dist/chunk-LP3JFZ4A.mjs.map +0 -1
  121. package/dist/chunk-MLEYTQGK.mjs +0 -60
  122. package/dist/chunk-MLEYTQGK.mjs.map +0 -1
  123. package/dist/chunk-NKO3K3QS.mjs.map +0 -1
  124. package/dist/chunk-SAUOY37Q.mjs.map +0 -1
@@ -1,19 +1,32 @@
1
- import { a as ThAudioPreferences, A as AudioDefaultKeys, b as AudioCustomizableKeys, c as ThAudioPreferencesAdapter } from '../usePreferences-VaBf46eP.mjs';
2
- export { g as AudioSettingsKey, i as ThAudioActionKey, m as ThAudioActionKeys, j as ThAudioActionsPref, d as ThAudioAffordance, k as ThAudioConstraintKeys, h as ThAudioKeyTypes, n as ThAudioKeys, q as ThAudioSettingsKeys, f as ThAudioThemeKey, e as ThAudioThemeKeys, T as ThPreferencesProvider, p as ThSettingsTimerPref, o as ThSettingsTimerVariant, l as createAudioPreferences, s as defaultAudioPlaybackRate, B as defaultAudioPlaybackRateAction, D as defaultAudioRemotePlaybackAction, t as defaultAudioSkipBackwardInterval, v as defaultAudioSkipForwardInterval, w as defaultAudioSkipInterval, x as defaultAudioSleepTimer, C as defaultAudioSleepTimerAction, y as defaultAudioSleepTimerPresetList, E as defaultAudioTocAction, r as defaultAudioVolume, z as defaultAudioVolumeAction, u as usePreferences } from '../usePreferences-VaBf46eP.mjs';
1
+ import { e as ThGlobalPreferences, f as ThGlobalPreferencesAdapter, C as CustomizableKeys, D as DefaultKeys, d as ThPreferences, c as ThPreferencesAdapter, a as ThemeTokens, F as FontCollection, L as LocalStaticFontFile, g as FontDefinition, T as ThThemeKeys } from '../ThPreferencesAdapter-_5AePKHa.mjs';
2
+ export { A as ActionKey, r as ActionKeyType, b as AudioContentProtectionConfig, Z as BunnyFontSource, B as CSSAbsoluteLength, E as CSSAngle, X as CSSColor, G as CSSDefaultViewport, H as CSSDynamicViewport, J as CSSFontRelativeLength, I as CSSFrequency, K as CSSLargeViewport, M as CSSPhysicalLength, N as CSSRelativeLength, O as CSSResolution, P as CSSRootFontRelativeLength, Q as CSSSmallViewport, R as CSSTime, y as CSSValueUnitless, z as CSSValueWithUnit, U as CSSViewport, aj as ContentProtectionConfig, ah as CopyProtectionConfig, a3 as FontSource, a4 as FontSpec, _ as GoogleFontSource, a2 as LocalFontSource, a0 as LocalStaticFontSource, $ as LocalVariableFontFile, a1 as LocalVariableFontSource, ai as PrintProtectionConfig, S as SettingsKey, t as SettingsKeyType, k as SpacingSettingsKey, w as SpacingSettingsKeyType, Y as SystemFontSource, j as TextSettingsKey, v as TextSettingsKeyType, n as ThActionsPref, p as ThConstraintKeys, a6 as ThFontFamilyPref, o as ThSettingsKeyTypes, l as ThSettingsSpacingPresets, m as ThSpacingPreset, i as ThemeKey, s as ThemeKeyType, a5 as ValidatedLanguageCollection, V as VariableFontRangeConfig, W as WeightConfig, aa as arabicFarsiCollection, ac as chineseSimplifiedCollection, ad as chineseTraditionalCollection, at as contrast1Theme, au as contrast2Theme, av as contrast3Theme, h as createGlobalPreferences, q as createPreferences, aq as darkTheme, an as defaultAudioContentProtectionConfig, am as defaultContentProtectionConfig, a8 as defaultFontCollection, ao as devContentProtectionConfig, ab as hebrewCollection, ae as japaneseCollection, af as japaneseVerticalCollection, ag as koreanCollection, ap as lightTheme, ar as paperTheme, a7 as readiumCSSFontCollection, al as resolveAudioContentProtectionConfig, ak as resolveContentProtectionConfig, as as sepiaTheme, a9 as tamilCollection, u as useTheming, x as useThemingProps } from '../ThPreferencesAdapter-_5AePKHa.mjs';
3
3
  import * as React$1 from 'react';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
- import { C as CustomizableKeys, D as DefaultKeys, d as ThPreferences, c as ThPreferencesAdapter, a as ThemeTokens, F as FontCollection, L as LocalStaticFontFile, e as FontDefinition, T as ThThemeKeys } from '../ThPreferencesAdapter-D0rzsGRl.mjs';
6
- export { A as ActionKey, o as ActionKeyType, b as AudioContentProtectionConfig, U as BunnyFontSource, x as CSSAbsoluteLength, y as CSSAngle, Q as CSSColor, z as CSSDefaultViewport, B as CSSDynamicViewport, G as CSSFontRelativeLength, E as CSSFrequency, H as CSSLargeViewport, I as CSSPhysicalLength, J as CSSRelativeLength, K as CSSResolution, M as CSSRootFontRelativeLength, N as CSSSmallViewport, O as CSSTime, v as CSSValueUnitless, w as CSSValueWithUnit, P as CSSViewport, a9 as ContentProtectionConfig, a7 as CopyProtectionConfig, a0 as FontSource, a1 as FontSpec, X as GoogleFontSource, $ as LocalFontSource, Z as LocalStaticFontSource, Y as LocalVariableFontFile, _ as LocalVariableFontSource, a8 as PrintProtectionConfig, S as SettingsKey, q as SettingsKeyType, h as SpacingSettingsKey, s as SpacingSettingsKeyType, R as SystemFontSource, g as TextSettingsKey, r as TextSettingsKeyType, k as ThActionsPref, m as ThConstraintKeys, a3 as ThFontFamilyPref, l as ThSettingsKeyTypes, i as ThSettingsSpacingPresets, j as ThSpacingPreset, f as ThemeKey, p as ThemeKeyType, a2 as ValidatedLanguageCollection, V as VariableFontRangeConfig, W as WeightConfig, aj as contrast1Theme, ak as contrast2Theme, al as contrast3Theme, n as createPreferences, ag as darkTheme, ad as defaultAudioContentProtectionConfig, ac as defaultContentProtectionConfig, a5 as defaultFontCollection, ae as devContentProtectionConfig, af as lightTheme, ah as paperTheme, a4 as readiumCSSFontCollection, ab as resolveAudioContentProtectionConfig, aa as resolveContentProtectionConfig, ai as sepiaTheme, a6 as tamilCollection, u as useTheming, t as useThemingProps } from '../ThPreferencesAdapter-D0rzsGRl.mjs';
7
- import { e as ThColorScheme, g as ThSettingsKeys, h as ThTextSettingsKeys, b as ThSpacingSettingsKeys, a as ThSpacingPresetKeys } from '../useContrast-2t429O9O.mjs';
8
- export { I as I18nValue, p as ThLayoutOptions, T as ThLineHeightOptions, m as ThSettingsContainerKeys, j as ThSettingsGroupPref, i as ThSettingsRadioPref, o as ThSettingsRangePlaceholder, l as ThSettingsRangePref, d as ThSettingsRangePrefRequired, n as ThSettingsRangeVariant, c as ThTextAlignOptions, z as defaultLetterSpacing, A as defaultLineHeights, x as defaultParagraphIndent, w as defaultParagraphSpacing, C as defaultSpacingPresets, v as defaultSpacingPresetsOrder, s as defaultSpacingSettingsMain, t as defaultSpacingSettingsSubpanel, q as defaultTextSettingsMain, r as defaultTextSettingsSubpanel, y as defaultWordSpacing, B as defaultZoom } from '../useContrast-2t429O9O.mjs';
9
- import { f as ThDockingPref, T as ThDockingKeys, c as ThActionsTokens, b as ThAudioActionsTokens, g as ThActionsKeys } from '../actions-BLAr0oaM.mjs';
10
- export { k as ThActionsDockedPref, l as ThActionsSnappedPref, j as ThBottomSheetDetent, m as ThDockingTypes, a as ThSheetHeaderVariant, e as ThSheetTypes, n as defaultActionKeysObject, p as defaultFullscreenAction, r as defaultJumpToPositionAction, o as defaultSettingsAction, q as defaultTocAction } from '../actions-BLAr0oaM.mjs';
11
- import { T as ThLayoutDirection, a as ThBackLinkPref, B as BreakpointsMap } from '../ui-nBv8gfr0.mjs';
12
- export { p as ThArrowVariant, b as ThAudioPlayerComponent, d as ThAudioProgressBarVariant, r as ThAudioPublicationMetadataComponent, m as ThBackLinkContent, q as ThBackLinkVariant, e as ThBreakpoints, g as ThDocumentTitleFormat, h as ThFormatPref, n as ThFormatPrefValue, k as ThLayoutUI, l as ThPaginatedAffordancePref, o as ThPaginatedAffordancePrefValue, j as ThProgressionFormat, c as ThPublicationMetadataOrder, i as ThRunningHeadFormat } from '../ui-nBv8gfr0.mjs';
5
+ import { a as ThAudioPreferences, A as AudioDefaultKeys, b as AudioCustomizableKeys, c as ThAudioPreferencesAdapter } from '../usePreferences-9ZvbcbLW.mjs';
6
+ export { g as AudioSettingsKey, i as ThAudioActionKey, m as ThAudioActionKeys, j as ThAudioActionsPref, d as ThAudioAffordance, k as ThAudioConstraintKeys, h as ThAudioKeyTypes, n as ThAudioKeys, q as ThAudioSettingsKeys, f as ThAudioThemeKey, e as ThAudioThemeKeys, T as ThPreferencesProvider, p as ThSettingsTimerPref, o as ThSettingsTimerVariant, l as createAudioPreferences, s as defaultAudioPlaybackRate, B as defaultAudioPlaybackRateAction, D as defaultAudioRemotePlaybackAction, t as defaultAudioSkipBackwardInterval, v as defaultAudioSkipForwardInterval, w as defaultAudioSkipInterval, x as defaultAudioSleepTimer, C as defaultAudioSleepTimerAction, y as defaultAudioSleepTimerPresetList, E as defaultAudioTocAction, r as defaultAudioVolume, z as defaultAudioVolumeAction, u as usePreferences } from '../usePreferences-9ZvbcbLW.mjs';
7
+ import { e as ThColorScheme, g as ThSettingsKeys, h as ThTextSettingsKeys, b as ThSpacingSettingsKeys, a as ThSpacingPresetKeys } from '../useContrast-Cbso7N1l.mjs';
8
+ export { I as I18nValue, p as ThLayoutOptions, T as ThLineHeightOptions, m as ThSettingsContainerKeys, j as ThSettingsGroupPref, i as ThSettingsRadioPref, o as ThSettingsRangePlaceholder, l as ThSettingsRangePref, d as ThSettingsRangePrefRequired, n as ThSettingsRangeVariant, c as ThTextAlignOptions, z as defaultLetterSpacing, A as defaultLineHeights, x as defaultParagraphIndent, w as defaultParagraphSpacing, C as defaultSpacingPresets, v as defaultSpacingPresetsOrder, s as defaultSpacingSettingsMain, t as defaultSpacingSettingsSubpanel, q as defaultTextSettingsMain, r as defaultTextSettingsSubpanel, y as defaultWordSpacing, B as defaultZoom } from '../useContrast-Cbso7N1l.mjs';
9
+ import { f as ThDockingPref, T as ThDockingKeys, c as ThActionsTokens, b as ThAudioActionsTokens, g as ThActionsKeys } from '../actions-CuRRM3rp.mjs';
10
+ export { k as ThActionsDockedPref, l as ThActionsSnappedPref, j as ThBottomSheetDetent, m as ThDockingTypes, a as ThSheetHeaderVariant, e as ThSheetTypes, n as defaultActionKeysObject, p as defaultFullscreenAction, r as defaultJumpToPositionAction, o as defaultSettingsAction, q as defaultTocAction } from '../actions-CuRRM3rp.mjs';
11
+ import { T as ThBackLinkPref, B as BreakpointsMap } from '../ui-DnZZhozX.mjs';
12
+ export { o as ThArrowVariant, a as ThAudioPlayerComponent, c as ThAudioProgressBarVariant, r as ThAudioPublicationMetadataComponent, l as ThBackLinkContent, p as ThBackLinkVariant, d as ThBreakpoints, f as ThDocumentTitleFormat, g as ThFormatPref, m as ThFormatPrefValue, q as ThLayoutDirection, j as ThLayoutUI, k as ThPaginatedAffordancePref, n as ThPaginatedAffordancePrefValue, i as ThProgressionFormat, b as ThPublicationMetadataOrder, h as ThRunningHeadFormat } from '../ui-DnZZhozX.mjs';
13
13
  import { e as UnstableShortcutRepresentation } from '../keyboardUtilities-BWAyLS_D.mjs';
14
14
  import '@readium/navigator';
15
15
  import 'react-aria-components';
16
16
 
17
+ interface GlobalPreferencesContextValue {
18
+ preferences: ThGlobalPreferences;
19
+ updatePreferences: (prefs: ThGlobalPreferences) => void;
20
+ }
21
+ declare const ThGlobalPreferencesContext: React$1.Context<GlobalPreferencesContextValue | null>;
22
+
23
+ type Props$1 = {
24
+ adapter?: ThGlobalPreferencesAdapter;
25
+ initialPreferences?: ThGlobalPreferences;
26
+ children: React.ReactNode;
27
+ };
28
+ declare function ThGlobalPreferencesProvider({ adapter, initialPreferences, children }: Props$1): react_jsx_runtime.JSX.Element;
29
+
17
30
  declare const defaultAudioPreferences: ThAudioPreferences<AudioDefaultKeys>;
18
31
 
19
32
  interface AudioPreferencesContextValue<K extends AudioCustomizableKeys = AudioDefaultKeys> {
@@ -62,6 +75,16 @@ declare class ThMemoryPreferencesAdapter<T extends CustomizableKeys = Customizab
62
75
  private notifyListeners;
63
76
  }
64
77
 
78
+ declare class ThGlobalMemoryPreferencesAdapter implements ThGlobalPreferencesAdapter {
79
+ private preferences;
80
+ private listeners;
81
+ constructor(initialPreferences?: ThGlobalPreferences);
82
+ getPreferences(): ThGlobalPreferences;
83
+ setPreferences(prefs: ThGlobalPreferences): void;
84
+ subscribe(callback: (prefs: ThGlobalPreferences) => void): void;
85
+ unsubscribe(callback: (prefs: ThGlobalPreferences) => void): void;
86
+ }
87
+
65
88
  interface buildThemeProps<T extends string> {
66
89
  theme?: string;
67
90
  themeKeys: {
@@ -169,9 +192,30 @@ declare const usePreferenceKeys: () => {
169
192
  webPubSpacingPresetKeys: ThSpacingPresetKeys[];
170
193
  };
171
194
 
195
+ /**
196
+ * Wraps usePreferenceKeys and filters out settings keys that are not applicable
197
+ * for the current publication's script mode (RTL, CJK-horizontal, CJK-vertical).
198
+ * Drop-in replacement for usePreferenceKeys at all call sites.
199
+ */
200
+ declare const useFilteredPreferenceKeys: () => {
201
+ reflowActionKeys: ThActionsKeys[];
202
+ fxlActionKeys: ThActionsKeys[];
203
+ webPubActionKeys: ThActionsKeys[];
204
+ reflowThemeKeys: ("auto" | ThThemeKeys)[];
205
+ fxlThemeKeys: ("auto" | ThThemeKeys)[];
206
+ reflowSettingsKeys: ThSettingsKeys[];
207
+ fxlSettingsKeys: ThSettingsKeys[];
208
+ webPubSettingsKeys: ThSettingsKeys[];
209
+ mainTextSettingsKeys: ThTextSettingsKeys[];
210
+ subPanelTextSettingsKeys: ThTextSettingsKeys[];
211
+ mainSpacingSettingsKeys: ThSpacingSettingsKeys[];
212
+ subPanelSpacingSettingsKeys: ThSpacingSettingsKeys[];
213
+ reflowSpacingPresetKeys: ThSpacingPresetKeys[];
214
+ fxlSpacingPresetKeys: ThSpacingPresetKeys[];
215
+ webPubSpacingPresetKeys: ThSpacingPresetKeys[];
216
+ };
217
+
172
218
  interface SharedPreferences {
173
- direction?: ThLayoutDirection;
174
- locale?: string;
175
219
  shortcuts: {
176
220
  representation: UnstableShortcutRepresentation;
177
221
  joiner?: string;
@@ -212,4 +256,6 @@ interface SharedPreferences {
212
256
  */
213
257
  declare const useSharedPreferences: () => SharedPreferences;
214
258
 
215
- export { type ActionsPreferences, type AudioActionsPreferences, AudioCustomizableKeys, AudioDefaultKeys, type AudioPreferencesContextValue, CustomizableKeys, DefaultKeys, FontCollection, FontDefinition, type GoogleFontDefinitionParams, LocalStaticFontFile, type PreferencesContextValue, type SharedPreferences, ThActionsKeys, ThActionsTokens, ThAudioActionsTokens, ThAudioMemoryPreferencesAdapter, ThAudioPreferences, ThAudioPreferencesAdapter, ThAudioPreferencesContext, ThAudioPreferencesProvider, ThBackLinkPref, ThDockingKeys, ThDockingPref, ThLayoutDirection, ThMemoryPreferencesAdapter, ThPreferences, ThPreferencesAdapter, ThPreferencesContext, ThSettingsKeys, ThSpacingPresetKeys, ThSpacingSettingsKeys, ThTextSettingsKeys, ThThemeKeys, ThemeTokens, buildThemeObject, type buildThemeProps, createDefinitionFromStaticFonts, createDefinitionsFromBunnyFonts, createDefinitionsFromGoogleFonts, defaultAudioPreferences, defaultAudioPreferencesContextValue, defaultPreferences, defaultPreferencesContextValue, useActionsPreferences, useAudioActionsPreferences, useAudioPreferences, usePreferenceKeys, useSharedPreferences, validateObjectKeys };
259
+ declare const useGlobalPreferences: () => GlobalPreferencesContextValue;
260
+
261
+ export { type ActionsPreferences, type AudioActionsPreferences, AudioCustomizableKeys, AudioDefaultKeys, type AudioPreferencesContextValue, CustomizableKeys, DefaultKeys, FontCollection, FontDefinition, type GlobalPreferencesContextValue, type GoogleFontDefinitionParams, LocalStaticFontFile, type PreferencesContextValue, type SharedPreferences, ThActionsKeys, ThActionsTokens, ThAudioActionsTokens, ThAudioMemoryPreferencesAdapter, ThAudioPreferences, ThAudioPreferencesAdapter, ThAudioPreferencesContext, ThAudioPreferencesProvider, ThBackLinkPref, ThDockingKeys, ThDockingPref, ThGlobalMemoryPreferencesAdapter, ThGlobalPreferences, ThGlobalPreferencesAdapter, ThGlobalPreferencesContext, ThGlobalPreferencesProvider, ThMemoryPreferencesAdapter, ThPreferences, ThPreferencesAdapter, ThPreferencesContext, ThSettingsKeys, ThSpacingPresetKeys, ThSpacingSettingsKeys, ThTextSettingsKeys, ThThemeKeys, ThemeTokens, buildThemeObject, type buildThemeProps, createDefinitionFromStaticFonts, createDefinitionsFromBunnyFonts, createDefinitionsFromGoogleFonts, defaultAudioPreferences, defaultAudioPreferencesContextValue, defaultPreferences, defaultPreferencesContextValue, useActionsPreferences, useAudioActionsPreferences, useAudioPreferences, useFilteredPreferenceKeys, useGlobalPreferences, usePreferenceKeys, useSharedPreferences, validateObjectKeys };
@@ -1,12 +1,12 @@
1
- export { ThAudioMemoryPreferencesAdapter, ThAudioPreferencesProvider, ThMemoryPreferencesAdapter, ThPreferencesProvider, buildThemeObject, createDefinitionsFromBunnyFonts, useActionsPreferences, useAudioActionsPreferences, useAudioPreferences, usePreferenceKeys, usePreferences, useTheming } from '../chunk-GPWW5OML.mjs';
1
+ export { ThActionsKeys, ThAudioActionKeys, ThAudioAffordance, ThAudioKeys, ThAudioMemoryPreferencesAdapter, ThAudioPreferencesContext, ThAudioPreferencesProvider, ThDockingKeys, ThDockingTypes, ThGlobalMemoryPreferencesAdapter, ThGlobalPreferencesProvider, ThLayoutOptions, ThLineHeightOptions, ThMemoryPreferencesAdapter, ThPreferencesContext, ThPreferencesProvider, ThSettingsContainerKeys, ThSettingsKeys, ThSettingsRangePlaceholder, ThSettingsRangeVariant, ThSettingsTimerVariant, ThSheetHeaderVariant, ThSheetTypes, ThSpacingPresetKeys, ThSpacingSettingsKeys, ThTextAlignOptions, ThTextSettingsKeys, ThThemeKeys, arabicFarsiCollection, buildThemeObject, chineseSimplifiedCollection, chineseTraditionalCollection, contrast1Theme, contrast2Theme, contrast3Theme, createAudioPreferences, createDefinitionFromStaticFonts, createDefinitionsFromBunnyFonts, createDefinitionsFromGoogleFonts, createGlobalPreferences, createPreferences, darkTheme, defaultActionKeysObject, defaultAudioContentProtectionConfig, defaultAudioPlaybackRate, defaultAudioPlaybackRateAction, defaultAudioPreferences, defaultAudioPreferencesContextValue, defaultAudioRemotePlaybackAction, defaultAudioSkipBackwardInterval, defaultAudioSkipForwardInterval, defaultAudioSkipInterval, defaultAudioSleepTimer, defaultAudioSleepTimerAction, defaultAudioSleepTimerPresetList, defaultAudioTocAction, defaultAudioVolume, defaultAudioVolumeAction, defaultContentProtectionConfig, defaultFontCollection, defaultFullscreenAction, defaultJumpToPositionAction, defaultLetterSpacing, defaultLineHeights, defaultParagraphIndent, defaultParagraphSpacing, defaultPreferences, defaultPreferencesContextValue, defaultSettingsAction, defaultSpacingPresets, defaultSpacingPresetsOrder, defaultSpacingSettingsMain, defaultSpacingSettingsSubpanel, defaultTextSettingsMain, defaultTextSettingsSubpanel, defaultTocAction, defaultWordSpacing, defaultZoom, devContentProtectionConfig, hebrewCollection, japaneseCollection, japaneseVerticalCollection, koreanCollection, lightTheme, paperTheme, readiumCSSFontCollection, resolveAudioContentProtectionConfig, resolveContentProtectionConfig, sepiaTheme, tamilCollection, useActionsPreferences, useAudioActionsPreferences, useAudioPreferences, useFilteredPreferenceKeys, usePreferenceKeys, usePreferences, useSharedPreferences, useTheming, validateObjectKeys } from '../chunk-OD75GC5N.mjs';
2
+ export { ThArrowVariant, ThAudioPlayerComponent, ThAudioProgressBarVariant, ThAudioPublicationMetadataComponent, ThBackLinkVariant, ThBreakpoints, ThDocumentTitleFormat, ThLayoutDirection, ThLayoutUI, ThProgressionFormat, ThRunningHeadFormat } from '../chunk-2YRT7RNW.mjs';
2
3
  import '../chunk-GFSLVQIG.mjs';
4
+ export { ThGlobalPreferencesContext, useGlobalPreferences } from '../chunk-AE6P4KJB.mjs';
5
+ import '../chunk-A575ZW4A.mjs';
6
+ import '../chunk-44PEO3DS.mjs';
3
7
  import '../chunk-NQ2ZSGCX.mjs';
4
- export { ThActionsKeys, ThAudioActionKeys, ThAudioAffordance, ThAudioKeys, ThAudioPreferencesContext, ThDockingKeys, ThDockingTypes, ThLayoutOptions, ThLineHeightOptions, ThPreferencesContext, ThSettingsContainerKeys, ThSettingsKeys, ThSettingsRangePlaceholder, ThSettingsRangeVariant, ThSettingsTimerVariant, ThSheetHeaderVariant, ThSheetTypes, ThSpacingPresetKeys, ThSpacingSettingsKeys, ThTextAlignOptions, ThTextSettingsKeys, ThThemeKeys, contrast1Theme, contrast2Theme, contrast3Theme, createAudioPreferences, createDefinitionFromStaticFonts, createDefinitionsFromGoogleFonts, createPreferences, darkTheme, defaultActionKeysObject, defaultAudioContentProtectionConfig, defaultAudioPlaybackRate, defaultAudioPlaybackRateAction, defaultAudioPreferences, defaultAudioPreferencesContextValue, defaultAudioRemotePlaybackAction, defaultAudioSkipBackwardInterval, defaultAudioSkipForwardInterval, defaultAudioSkipInterval, defaultAudioSleepTimer, defaultAudioSleepTimerAction, defaultAudioSleepTimerPresetList, defaultAudioTocAction, defaultAudioVolume, defaultAudioVolumeAction, defaultContentProtectionConfig, defaultFontCollection, defaultFullscreenAction, defaultJumpToPositionAction, defaultLetterSpacing, defaultLineHeights, defaultParagraphIndent, defaultParagraphSpacing, defaultPreferences, defaultPreferencesContextValue, defaultSettingsAction, defaultSpacingPresets, defaultSpacingPresetsOrder, defaultSpacingSettingsMain, defaultSpacingSettingsSubpanel, defaultTextSettingsMain, defaultTextSettingsSubpanel, defaultTocAction, defaultWordSpacing, defaultZoom, devContentProtectionConfig, lightTheme, paperTheme, readiumCSSFontCollection, resolveAudioContentProtectionConfig, resolveContentProtectionConfig, sepiaTheme, tamilCollection, useSharedPreferences, validateObjectKeys } from '../chunk-DTPO3J2C.mjs';
5
- import '../chunk-B3WDMWCT.mjs';
6
- import '../chunk-MLEYTQGK.mjs';
7
- import '../chunk-7CGMWOZN.mjs';
8
- export { ThArrowVariant, ThAudioPlayerComponent, ThAudioProgressBarVariant, ThAudioPublicationMetadataComponent, ThBackLinkVariant, ThBreakpoints, ThDocumentTitleFormat, ThLayoutDirection, ThLayoutUI, ThProgressionFormat, ThRunningHeadFormat } from '../chunk-L4XGZAZ5.mjs';
9
- import '../chunk-5LUMM7FW.mjs';
8
+ import '../chunk-AQSJDL63.mjs';
9
+ import '../chunk-GNROODJB.mjs';
10
10
  import '../chunk-3GDQP6AS.mjs';
11
11
  //# sourceMappingURL=index.mjs.map
12
12
  //# sourceMappingURL=index.mjs.map
@@ -1,6 +1,6 @@
1
1
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
2
2
  import { W as WritableDraft } from './immer.d-CoRThNOF.mjs';
3
- import { T as ThLineHeightOptions, a as ThSpacingPresetKeys, b as ThSpacingSettingsKeys, c as ThTextAlignOptions } from './useContrast-2t429O9O.mjs';
3
+ import { T as ThLineHeightOptions, a as ThSpacingPresetKeys, b as ThSpacingSettingsKeys, c as ThTextAlignOptions } from './useContrast-Cbso7N1l.mjs';
4
4
 
5
5
  interface FontFamilyStateObject {
6
6
  default: string;
@@ -59,8 +59,10 @@ interface SettingsReducerState {
59
59
  fontWeight: number;
60
60
  hyphens: boolean | null;
61
61
  letterSpacing: number | null;
62
+ ligatures: boolean | null;
62
63
  lineHeight: ThLineHeightOptions | null;
63
64
  lineLength: LineLengthStateObject | null;
65
+ noRuby: boolean | null;
64
66
  paragraphIndent: number | null;
65
67
  paragraphSpacing: number | null;
66
68
  publisherStyles: boolean;
@@ -89,6 +91,10 @@ declare const settingsSlice: _reduxjs_toolkit.Slice<SettingsReducerState, {
89
91
  payload: any;
90
92
  type: string;
91
93
  }) => void;
94
+ setLigatures: (state: WritableDraft<SettingsReducerState>, action: {
95
+ payload: any;
96
+ type: string;
97
+ }) => void;
92
98
  setLetterSpacing: (state: WritableDraft<SettingsReducerState>, action: {
93
99
  payload: any;
94
100
  type: string;
@@ -123,6 +129,10 @@ declare const settingsSlice: _reduxjs_toolkit.Slice<SettingsReducerState, {
123
129
  payload: any;
124
130
  type: string;
125
131
  }) => void;
132
+ setNoRuby: (state: WritableDraft<SettingsReducerState>, action: {
133
+ payload: any;
134
+ type: string;
135
+ }) => void;
126
136
  setWordSpacing: (state: WritableDraft<SettingsReducerState>, action: {
127
137
  payload: any;
128
138
  type: string;
@@ -137,6 +147,7 @@ declare const setFontFamily: _reduxjs_toolkit.ActionCreatorWithPayload<{
137
147
  value: string;
138
148
  }, "settings/setFontFamily">;
139
149
  declare const setHyphens: _reduxjs_toolkit.ActionCreatorWithPayload<any, "settings/setHyphens">;
150
+ declare const setLigatures: _reduxjs_toolkit.ActionCreatorWithPayload<any, "settings/setLigatures">;
140
151
  declare const setLetterSpacing: _reduxjs_toolkit.ActionCreatorWithPayload<any, "settings/setLetterSpacing">;
141
152
  declare const setLineHeight: _reduxjs_toolkit.ActionCreatorWithPayload<any, "settings/setLineHeight">;
142
153
  declare const setLineLength: _reduxjs_toolkit.ActionCreatorWithPayload<{
@@ -154,6 +165,7 @@ declare const setSpacingPreset: _reduxjs_toolkit.ActionCreatorWithPayload<{
154
165
  }, "settings/setSpacingPreset">;
155
166
  declare const setTextAlign: _reduxjs_toolkit.ActionCreatorWithPayload<any, "settings/setTextAlign">;
156
167
  declare const setTextNormalization: _reduxjs_toolkit.ActionCreatorWithPayload<any, "settings/setTextNormalization">;
168
+ declare const setNoRuby: _reduxjs_toolkit.ActionCreatorWithPayload<any, "settings/setNoRuby">;
157
169
  declare const setWordSpacing: _reduxjs_toolkit.ActionCreatorWithPayload<any, "settings/setWordSpacing">;
158
170
 
159
- export { type FontFamilyStateObject as F, type LineLengthStateObject as L, type SetFontFamilyPayload as S, type SetLineLengthPayload as a, type SetSpacingSettingPayload as b, type SetSpacingPresetPayload as c, type SpacingStateKey as d, type SpacingStateObject as e, type SettingsReducerState as f, setColumnCount as g, handleSpacingSetting as h, initialSettingsState as i, setFontSize as j, setFontWeight as k, setFontFamily as l, setHyphens as m, setLetterSpacing as n, setLineHeight as o, setLineLength as p, setParagraphIndent as q, setParagraphSpacing as r, settingsSlice as s, setPublisherStyles as t, setScroll as u, setSpacingPreset as v, setTextAlign as w, setTextNormalization as x, setWordSpacing as y };
171
+ export { setWordSpacing as A, type FontFamilyStateObject as F, type LineLengthStateObject as L, type SetFontFamilyPayload as S, type SetLineLengthPayload as a, type SetSpacingSettingPayload as b, type SetSpacingPresetPayload as c, type SpacingStateKey as d, type SpacingStateObject as e, type SettingsReducerState as f, setColumnCount as g, handleSpacingSetting as h, initialSettingsState as i, setFontSize as j, setFontWeight as k, setFontFamily as l, setHyphens as m, setLigatures as n, setLetterSpacing as o, setLineHeight as p, setLineLength as q, setParagraphIndent as r, settingsSlice as s, setParagraphSpacing as t, setPublisherStyles as u, setScroll as v, setSpacingPreset as w, setTextAlign as x, setTextNormalization as y, setNoRuby as z };
@@ -121,4 +121,4 @@ declare enum ThAudioPublicationMetadataComponent {
121
121
  type TitleVariant = ThAudioPublicationMetadataComponent.title | ThAudioPublicationMetadataComponent.titleWithSubtitle | ThAudioPublicationMetadataComponent.subtitleWithTitle;
122
122
  type ThPublicationMetadataOrder = [TitleVariant] | [TitleVariant, ThAudioPublicationMetadataComponent.authors] | [ThAudioPublicationMetadataComponent.authors, TitleVariant];
123
123
 
124
- export { type BreakpointsMap as B, ThLayoutDirection 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 ThPaginatedAffordancePref as l, type ThBackLinkContent as m, type ThFormatPrefValue as n, type ThPaginatedAffordancePrefValue as o, ThArrowVariant as p, ThBackLinkVariant as q, ThAudioPublicationMetadataComponent as r, useBreakpoints as u };
124
+ export { type BreakpointsMap as B, type ThBackLinkPref as T, ThAudioPlayerComponent as a, type ThPublicationMetadataOrder as b, ThAudioProgressBarVariant as c, ThBreakpoints as d, type ThBreakpointsObject as e, ThDocumentTitleFormat as f, type ThFormatPref as g, ThRunningHeadFormat as h, ThProgressionFormat as i, ThLayoutUI as j, type ThPaginatedAffordancePref as k, type ThBackLinkContent as l, type ThFormatPrefValue as m, type ThPaginatedAffordancePrefValue as n, ThArrowVariant as o, ThBackLinkVariant as p, ThLayoutDirection as q, ThAudioPublicationMetadataComponent as r, useBreakpoints as u };
@@ -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-BLAr0oaM.mjs';
1
+ import { a as ThSheetHeaderVariant } from './actions-CuRRM3rp.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 ThLayoutDirection, a as ThBackLinkPref, b as ThAudioPlayerComponent, c as ThPublicationMetadataOrder, d as ThAudioProgressBarVariant, B as BreakpointsMap } from './ui-nBv8gfr0.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-D0rzsGRl.mjs';
4
- import { b as ThAudioActionsTokens, c as ThActionsTokens, d as ThCollapsibility, e as ThSheetTypes, f as ThDockingPref, T as ThDockingKeys } from './actions-BLAr0oaM.mjs';
5
- import { d as ThSettingsRangePrefRequired } from './useContrast-2t429O9O.mjs';
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-_5AePKHa.mjs';
4
+ import { b as ThAudioActionsTokens, c as ThActionsTokens, d as ThCollapsibility, e as ThSheetTypes, f as ThDockingPref, T as ThDockingKeys } from './actions-CuRRM3rp.mjs';
5
+ import { d as ThSettingsRangePrefRequired } from './useContrast-Cbso7N1l.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, direction: "ltr" | "rtl") => string;
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-BLAr0oaM.mjs';
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-CuRRM3rp.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-BXuRgdqp.mjs';
6
- import { h as ThTextSettingsKeys, b as ThSpacingSettingsKeys, j as ThSettingsGroupPref, a as ThSpacingPresetKeys, T as ThLineHeightOptions } from './useContrast-2t429O9O.mjs';
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-B_9klYXH.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-Cbso7N1l.mjs';
7
7
  import { PressEvent } from 'react-aria';
8
- import { A as ActionsStateKeys } from './actionsReducer-XWTGGNUd.mjs';
9
- import { d as ThPreferences, D as DefaultKeys, C as CustomizableKeys, c as ThPreferencesAdapter } from './ThPreferencesAdapter-D0rzsGRl.mjs';
8
+ import { f as SettingsReducerState } from './settingsReducer-VqBhLq50.mjs';
9
+ import { WebPubSettingsReducerState, ReaderProfile } from './lib/index.mjs';
10
+ import { A as ActionsStateKeys } from './actionsReducer-VFR42qgL.mjs';
11
+ import { d as ThPreferences, D as DefaultKeys, e as ThGlobalPreferences, C as CustomizableKeys, c as ThPreferencesAdapter } from './ThPreferencesAdapter-_5AePKHa.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-C5aW4-eT.mjs';
15
- import { a as ThAudioPreferences, c as ThAudioPreferencesAdapter } from './usePreferences-VaBf46eP.mjs';
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-9ZvbcbLW.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;
@@ -323,12 +366,12 @@ declare const StatefulBottomSheet: ({ id, heading, headerVariant, className, isO
323
366
  interface StatefulCompactPopoverSheetProps extends StatefulSheet {
324
367
  placement?: PopoverProps["placement"];
325
368
  }
326
- declare const StatefulCompactPopoverSheet: ({ id, triggerRef, heading, className, isOpen, onOpenChange, placement, children, resetFocus, focusWithinRef, focusSelector, scrollTopOnFocus, dismissEscapeKeyClose }: StatefulCompactPopoverSheetProps) => react_jsx_runtime.JSX.Element | undefined;
369
+ declare const StatefulCompactPopoverSheet: ({ triggerRef, heading, className, isOpen, onOpenChange, placement, children, resetFocus, focusWithinRef, focusSelector, scrollTopOnFocus, dismissEscapeKeyClose }: StatefulCompactPopoverSheetProps) => react_jsx_runtime.JSX.Element | undefined;
327
370
 
328
371
  interface StatefulDockedSheetProps extends StatefulSheet {
329
372
  flow: ThDockingKeys.start | ThDockingKeys.end | null;
330
373
  }
331
- declare const StatefulDockedSheet: ({ id, heading, headerVariant, className, isOpen, onClosePress, docker, flow, children, resetFocus, focusSelector, focusWithinRef, scrollTopOnFocus }: StatefulDockedSheetProps) => react_jsx_runtime.JSX.Element | undefined;
374
+ declare const StatefulDockedSheet: ({ id, heading, headerVariant, className, isOpen, onClosePress, docker, flow, children, resetFocus, focusSelector, focusWithinRef }: StatefulDockedSheetProps) => react_jsx_runtime.JSX.Element | undefined;
332
375
 
333
376
  interface StatefulFullScreenSheetProps extends StatefulSheet {
334
377
  }
@@ -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;
@@ -463,6 +514,7 @@ interface StatefulReaderProps {
463
514
  localDataKey: string | null;
464
515
  plugins?: ThPlugin[];
465
516
  positionStorage?: PositionStorage;
517
+ containerRefSetter?: (el: Element | null) => void;
466
518
  }
467
519
  type ThPluginFactory = () => ThPlugin[] | Promise<ThPlugin[]>;
468
520
  interface ReaderPlugins {
@@ -527,4 +579,4 @@ interface ReaderTransitions {
527
579
  }
528
580
  declare const useReaderTransitions: () => ReaderTransitions;
529
581
 
530
- export { StatefulWordSpacing 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, type StatefulSettingsItemProps as R, type StatefulActionsMapObject as S, type ThPlugin as T, StatefulLetterSpacing as U, StatefulLineHeight as V, StatefulParagraphIndent as W, StatefulParagraphSpacing as X, StatefulSpacingGroup as Y, StatefulSpacingGroupContainer as Z, StatefulSpacingPresets as _, usePublication as a, useLineHeight as a0, useSpacingPresets as a1, StatefulFontFamily as a2, UnstableStatefulFontWeight as a3, StatefulHyphens as a4, StatefulTextAlign as a5, StatefulTextGroup as a6, StatefulTextGroupContainer as a7, StatefulTextNormalize as a8, StatefulPublisherStyles as a9, StatefulTheme as aa, StatefulZoom as ab, type StatefulBottomSheetProps as ac, type ScrimPref as ad, StatefulBottomSheet as ae, type StatefulCompactPopoverSheetProps as af, StatefulCompactPopoverSheet as ag, type StatefulDockedSheetProps as ah, StatefulDockedSheet as ai, type StatefulFullScreenSheetProps as aj, StatefulFullScreenSheet as ak, type StatefulModalSheetProps as al, StatefulModalSheet as am, type StatefulPopoverSheetProps as an, StatefulPopoverSheet as ao, type StatefulModalBaseProps as ap, StatefulModalBase as aq, StatefulSheetWrapper as ar, type StatefulSheet as as, StatefulPreferencesProvider as at, type PositionStorage as au, type StatefulReaderProps as av, type ThPluginFactory as aw, type ReaderPlugins as ax, type ReaderComponentProps as ay, StatefulReaderWrapper 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 };
582
+ 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.3.1",
23
+ "version": "1.4.1",
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.1",
68
- "@readium/navigator": "2.4.0",
69
- "@readium/navigator-html-injectables": "2.3.1",
70
- "@readium/shared": "2.2.0",
67
+ "@readium/css": "^2.0.2",
68
+ "@readium/navigator": "^2.5.1",
69
+ "@readium/navigator-html-injectables": "^2.4.1",
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",
@@ -85,10 +85,10 @@
85
85
  },
86
86
  "dependencies": {
87
87
  "@edrlab/thorium-locales": "github:edrlab/thorium-locales",
88
- "@readium/css": "^2.0.1",
89
- "@readium/navigator": "2.4.0",
90
- "@readium/navigator-html-injectables": "2.3.1",
91
- "@readium/shared": "2.2.0",
88
+ "@readium/css": "^2.0.2",
89
+ "@readium/navigator": "^2.5.1",
90
+ "@readium/navigator-html-injectables": "^2.4.1",
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",
@@ -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",