@edrlab/thorium-web 1.0.0-beta.2 → 1.0.0-beta.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.
Files changed (64) hide show
  1. package/LICENSE +1 -1
  2. package/dist/{ThSettingsWrapper-De4qvjsh.d.mts → ThSettingsWrapper-CA2_0nQz.d.mts} +1 -1
  3. package/dist/{actionsReducer-e808e6V_.d.mts → actionsReducer-D4Mphfuv.d.mts} +1 -1
  4. package/dist/chunk-BNPR6V7V.mjs.map +1 -1
  5. package/dist/chunk-IEYR7QV7.mjs.map +1 -1
  6. package/dist/chunk-MLEYTQGK.mjs.map +1 -1
  7. package/dist/chunk-NA3KMUS4.mjs +417 -0
  8. package/dist/chunk-NA3KMUS4.mjs.map +1 -0
  9. package/dist/{chunk-GHEGQBCW.mjs → chunk-NOV43IG4.mjs} +4 -18
  10. package/dist/chunk-NOV43IG4.mjs.map +1 -0
  11. package/dist/chunk-NQ2ZSGCX.mjs.map +1 -1
  12. package/dist/{chunk-O4MBY6P4.mjs → chunk-OCASVHBV.mjs} +91 -36
  13. package/dist/chunk-OCASVHBV.mjs.map +1 -0
  14. package/dist/{chunk-TWGRY5SW.mjs → chunk-RQFPGXWN.mjs} +29 -22
  15. package/dist/chunk-RQFPGXWN.mjs.map +1 -0
  16. package/dist/{chunk-BVSROK7Z.mjs → chunk-SDVDRPT5.mjs} +116 -6
  17. package/dist/chunk-SDVDRPT5.mjs.map +1 -0
  18. package/dist/chunk-TTGURRX3.mjs.map +1 -1
  19. package/dist/{chunk-PGZF5NO2.mjs → chunk-TXILKP4F.mjs} +16 -12
  20. package/dist/chunk-TXILKP4F.mjs.map +1 -0
  21. package/dist/components/Epub/index.d.mts +48 -25
  22. package/dist/components/Epub/index.mjs +878 -408
  23. package/dist/components/Epub/index.mjs.map +1 -1
  24. package/dist/{const-DGYvRLhk.d.mts → const-IAfi9t_g.d.mts} +14 -11
  25. package/dist/core/Components/index.d.mts +52 -6
  26. package/dist/core/Components/index.mjs +2 -2
  27. package/dist/core/Helpers/index.d.mts +3 -9
  28. package/dist/core/Helpers/index.mjs +2 -3
  29. package/dist/core/Hooks/index.d.mts +15 -5
  30. package/dist/core/Hooks/index.mjs +2 -3
  31. package/dist/{enums-DxbWWvn7.d.mts → enums-DqGQ66r1.d.mts} +1 -23
  32. package/dist/lib/index.d.mts +355 -11
  33. package/dist/lib/index.mjs +2 -3
  34. package/dist/{overflowMenu.module-XQRI7RJJ.module.css → overflowMenu.module-FO27A2A3.module.css} +12 -0
  35. package/dist/preferences/index.d.mts +6 -6
  36. package/dist/preferences/index.mjs +2 -3
  37. package/dist/publicationGrid.module-T6ISNRGM.module.css +70 -0
  38. package/dist/{reader-QFK7DGLX.css → reader-NGCQJKLX.css} +74 -36
  39. package/dist/{readerArrowButton.module-NHAUIQXS.module.css → readerArrowButton.module-EFLOIADG.module.css} +4 -0
  40. package/dist/{readerHeader.module-OBKZATSW.module.css → readerHeader.module-K7OLOIJP.module.css} +2 -7
  41. package/dist/{readerLoader.module-U6LLXOVQ.module.css → readerLoader.module-KDBPCQZJ.module.css} +1 -1
  42. package/dist/readerPagination.module-W4IAEOSH.module.css +73 -0
  43. package/dist/readerProgression.module-7PU7L74S.module.css +5 -0
  44. package/dist/{readerSharedUI.module-MCLGNG22.module.css → readerSharedUI.module-Y2VDWFS5.module.css} +1 -5
  45. package/dist/{settings.module-5WB3OOEF.module.css → settings.module-O2SOKTIN.module.css} +4 -0
  46. package/dist/{sheets.module-DDN7GPMG.module.css → sheets.module-NA32WOSZ.module.css} +4 -4
  47. package/dist/{toc.module-XJLXQM7G.module.css → toc.module-KNW5CKIY.module.css} +1 -0
  48. package/dist/{useBreakpoints-I7vHrywa.d.mts → useBreakpoints-BQaiwecQ.d.mts} +1 -1
  49. package/dist/{useEpubNavigator-BrV4MYJy.d.mts → useEpubNavigator-DFRJ_tHa.d.mts} +9 -10
  50. package/dist/{usePreferences-B55XqFto.d.mts → usePreferences-BMyBhq7F.d.mts} +1 -1
  51. package/dist/useTimeline-Bid5B7AQ.d.mts +39 -0
  52. package/package.json +31 -22
  53. package/dist/bookUrlConverter.module-J46O27CR.module.css +0 -63
  54. package/dist/chunk-3QS3WKRC.mjs +0 -29
  55. package/dist/chunk-3QS3WKRC.mjs.map +0 -1
  56. package/dist/chunk-BVSROK7Z.mjs.map +0 -1
  57. package/dist/chunk-GHEGQBCW.mjs.map +0 -1
  58. package/dist/chunk-JS5WI5D4.mjs +0 -600
  59. package/dist/chunk-JS5WI5D4.mjs.map +0 -1
  60. package/dist/chunk-O4MBY6P4.mjs.map +0 -1
  61. package/dist/chunk-PGZF5NO2.mjs.map +0 -1
  62. package/dist/chunk-TWGRY5SW.mjs.map +0 -1
  63. package/dist/index-ClB-1iNN.d.mts +0 -356
  64. package/dist/readerProgression.module-S5R3Y6JI.module.css +0 -11
@@ -1,24 +1,25 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { d as ThActionsKeys, c as ThDockingKeys, s as ThLineHeightOptions, p as ThLayoutStrategy, r as ThTextAlignOptions, i as ThLayoutUI, m as ThSheetTypes, g as ThTextSettingsKeys, h as ThSpacingSettingsKeys, n as ThSheetHeaderVariant } from '../../enums-DxbWWvn7.mjs';
2
+ import { b as ThActionsKeys, a as ThDockingKeys, p as ThLineHeightOptions, o as ThTextAlignOptions, g as ThLayoutUI, k as ThSheetTypes, e as ThTextSettingsKeys, f as ThSpacingSettingsKeys, l as ThSheetHeaderVariant } from '../../enums-DqGQ66r1.mjs';
3
3
  import { T as ThColorScheme } from '../../useContrast-Cgsrl7GS.mjs';
4
- import { x as defaultFontFamilyOptions, i as ThSettingsGroupPref } from '../../const-DGYvRLhk.mjs';
5
- export { q as useTheming } from '../../const-DGYvRLhk.mjs';
6
- import { T as ThActionButtonProps, f as ThMenuItemProps, a as ThCollapsibleActionsBarProps, q as ThSettingsEntry, h as ThNumberFieldProps, k as ThRadioGroupProps, m as ThSliderProps, o as ThSwitchProps } from '../../ThSettingsWrapper-De4qvjsh.mjs';
7
- import { RefObject, ReactNode } from 'react';
4
+ import { x as defaultFontFamilyOptions, i as ThSettingsGroupPref } from '../../const-IAfi9t_g.mjs';
5
+ export { q as useTheming } from '../../const-IAfi9t_g.mjs';
6
+ import { T as ThActionButtonProps, f as ThMenuItemProps, a as ThCollapsibleActionsBarProps, q as ThSettingsEntry, h as ThNumberFieldProps, k as ThRadioGroupProps, m as ThSliderProps, o as ThSwitchProps } from '../../ThSettingsWrapper-CA2_0nQz.mjs';
7
+ import React__default, { RefObject, ReactNode } from 'react';
8
8
  import { d as ThActionsTriggerVariant, T as ThCollapsibilityVisibility, b as ThActionEntry } from '../../useCollapsibility-BmWuCzU4.mjs';
9
- import { a as ActionsStateKeys } from '../../actionsReducer-e808e6V_.mjs';
10
- export { f as ActionOverflowOpenPayload, c as ActionStateDockPayload, g as ActionStateDockedPayload, A as ActionStateObject, d as ActionStateOpenPayload, h as ActionStateSlotPayload, i as ActionStateSlotWidthPayload, e as ActionStateTogglePayload, k as ActionsReducerState, j as DockState, D as DockStateObject, O as OverflowStateKeys, b as OverflowStateObject, l as actionsSlice, o as activateDockPanel, q as collapseDockPanel, p as deactivateDockPanel, m as dockAction, r as expandDockPanel, s as setActionOpen, u as setDockPanelWidth, n as setOverflow, t as toggleActionOpen } from '../../actionsReducer-e808e6V_.mjs';
9
+ import { a as ActionsStateKeys } from '../../actionsReducer-D4Mphfuv.mjs';
10
+ export { f as ActionOverflowOpenPayload, c as ActionStateDockPayload, g as ActionStateDockedPayload, A as ActionStateObject, d as ActionStateOpenPayload, h as ActionStateSlotPayload, i as ActionStateSlotWidthPayload, e as ActionStateTogglePayload, k as ActionsReducerState, j as DockState, D as DockStateObject, O as OverflowStateKeys, b as OverflowStateObject, l as actionsSlice, o as activateDockPanel, q as collapseDockPanel, p as deactivateDockPanel, m as dockAction, r as expandDockPanel, s as setActionOpen, u as setDockPanelWidth, n as setOverflow, t as toggleActionOpen } from '../../actionsReducer-D4Mphfuv.mjs';
11
11
  import { Locator } from '@readium/shared';
12
- import { L as LineLengthStateObject, T as TocItem } from '../../index-ClB-1iNN.mjs';
13
- export { b as AppDispatch, A as AppStore, P as PublicationReducerState, _ as ReaderReducerState, R as RootState, S as SetLineLengthPayload, n as SettingsReducerState, a as ThStoreProvider, M as ThemeReducerState, K as ThemeStateChangePayload, J as ThemeStateObject, m as makeStore, p as publicationSlice, $ as readerSlice, a6 as setArrows, Z as setBreakpoint, Q as setColorScheme, q as setColumnCount, X as setContrast, a0 as setDirection, e as setFXL, v as setFontFamily, r as setFontSize, t as setFontWeight, Y as setForcedColors, a7 as setFullscreen, a5 as setHovering, w as setHyphens, a3 as setImmersive, x as setLayoutStrategy, y as setLetterSpacing, z as setLineHeight, B as setLineLength, a1 as setLoading, O as setMonochrome, C as setParagraphIndent, D as setParagraphSpacing, a2 as setPlatformModifier, h as setPositionsList, g as setProgression, j as setPublicationEnd, i as setPublicationStart, E as setPublisherStyles, f as setRTL, V as setReducedMotion, W as setReducedTransparency, s as setRunningHead, F as setScroll, a8 as setSettingsContainer, G as setTextAlign, H as setTextNormalization, U as setTheme, l as setTocEntry, k as setTocTree, I as setWordSpacing, o as settingsSlice, N as themeSlice, a4 as toggleImmersive, u as useAppDispatch, c as useAppSelector, d as useAppStore } from '../../index-ClB-1iNN.mjs';
12
+ import { LineLengthStateObject } from '../../lib/index.mjs';
13
+ export { AppDispatch, AppState, AppStore, PublicationReducerState, ReaderReducerState, RootState, SetLineLengthPayload, SettingsReducerState, ThStoreProvider, ThemeReducerState, ThemeStateChangePayload, ThemeStateObject, makeStore, publicationSlice, readerSlice, setArrows, setBreakpoint, setColorScheme, setColumnCount, setContrast, setDirection, setFXL, setFontFamily, setFontSize, setFontWeight, setForcedColors, setFullscreen, setHovering, setHyphens, setImmersive, setLetterSpacing, setLineHeight, setLineLength, setLoading, setMonochrome, setParagraphIndent, setParagraphSpacing, setPlatformModifier, setPositionsList, setProgression, setPublicationEnd, setPublicationStart, setPublisherStyles, setRTL, setReducedMotion, setReducedTransparency, setRunningHead, setScroll, setScrollAffordance, setSettingsContainer, setTextAlign, setTextNormalization, setTheme, setTimeline, setTocEntry, setTocTree, setWordSpacing, settingsSlice, themeSlice, toggleImmersive, useAppDispatch, useAppSelector, useAppStore } from '../../lib/index.mjs';
14
14
  import { TooltipProps, PopoverProps } from 'react-aria-components';
15
15
  import { PressEvent } from 'react-aria';
16
- export { u as useEpubNavigator } from '../../useEpubNavigator-BrV4MYJy.mjs';
17
- export { getPlatform, isActiveElement, isIOSish, isInteractiveElement, isIpadOS, isKeyboardTriggered, isMacish, localData, makeBreakpointsMap, propsToCSSVars } from '../../core/Helpers/index.mjs';
16
+ export { u as useEpubNavigator } from '../../useEpubNavigator-DFRJ_tHa.mjs';
17
+ export { getPlatform, isActiveElement, isIOSish, isInteractiveElement, isIpadOS, isKeyboardTriggered, isMacish, makeBreakpointsMap, propsToCSSVars } from '../../core/Helpers/index.mjs';
18
18
  export { a as UnstableKey, b as UnstableMetaKey, d as UnstableMetaKeys, g as UnstablePShortcut, c as UnstablePlatformModifier, f as UnstableShortcut, e as UnstableShortcutMetaKeywords, U as UnstableShortcutRepresentation, j as buildShortcut, h as defaultPlatformModifier, i as getPlatformModifier, m as metaKeys } from '../../keyboardUtilities-CoTR9LKx.mjs';
19
- export { T as ThPreferencesProvider, u as usePreferences } from '../../usePreferences-B55XqFto.mjs';
20
- import '../../useBreakpoints-I7vHrywa.mjs';
19
+ export { T as ThPreferencesProvider, u as usePreferences } from '../../usePreferences-BMyBhq7F.mjs';
20
+ import '../../useBreakpoints-BQaiwecQ.mjs';
21
21
  import '@reduxjs/toolkit';
22
+ import '../../useTimeline-Bid5B7AQ.mjs';
22
23
  import 'react-redux';
23
24
  import '@readium/navigator';
24
25
 
@@ -104,22 +105,18 @@ declare const StatefulOverflowMenuItem: ({ id, label, SVGIcon, shortcut, ...prop
104
105
 
105
106
  interface StatefulCollapsibleActionsBarProps extends ThCollapsibleActionsBarProps {
106
107
  items: ThActionEntry<string | ThActionsKeys | ThDockingKeys>[];
107
- overflowActionCallback?: boolean;
108
108
  overflowMenuClassName?: string;
109
- overflowMenuDisplay?: boolean;
110
109
  }
111
- declare const StatefulCollapsibleActionsBar: ({ id, items, overflowActionCallback, overflowMenuClassName, overflowMenuDisplay, ...props }: StatefulCollapsibleActionsBarProps) => react_jsx_runtime.JSX.Element;
110
+ declare const StatefulCollapsibleActionsBar: ({ id, items, overflowMenuClassName, ...props }: StatefulCollapsibleActionsBarProps) => react_jsx_runtime.JSX.Element;
112
111
 
113
112
  interface StatefulOverflowMenuProps {
114
113
  id: string;
115
114
  items: ThActionEntry<string | ThActionsKeys | ThDockingKeys>[];
116
115
  triggerRef: RefObject<HTMLElement | null>;
117
116
  className?: string;
118
- actionFallback?: boolean;
119
- display: boolean;
120
117
  children?: ReactNode;
121
118
  }
122
- declare const StatefulOverflowMenu: ({ id, className, actionFallback, display, items, triggerRef }: StatefulOverflowMenuProps) => react_jsx_runtime.JSX.Element;
119
+ declare const StatefulOverflowMenu: ({ id, className, items, triggerRef }: StatefulOverflowMenuProps) => react_jsx_runtime.JSX.Element | undefined;
123
120
 
124
121
  type ActionComponent = StatefulActionsMapObject;
125
122
  interface SettingComponent extends ThSettingsEntry {
@@ -144,9 +141,8 @@ interface ReadiumCSSSettings {
144
141
  fontWeight: number;
145
142
  hyphens: boolean | null;
146
143
  letterSpacing: number | null;
147
- lineLength: LineLengthStateObject;
144
+ lineLength: LineLengthStateObject | null;
148
145
  lineHeight: ThLineHeightOptions | null;
149
- layoutStrategy: ThLayoutStrategy;
150
146
  paragraphIndent: number | null;
151
147
  paragraphSpacing: number | null;
152
148
  publisherStyles: boolean;
@@ -159,9 +155,9 @@ interface ReadiumCSSSettings {
159
155
  interface StatelessCache {
160
156
  layoutUI: ThLayoutUI;
161
157
  isImmersive: boolean;
158
+ isHovering: boolean;
162
159
  arrowsOccupySpace: boolean;
163
160
  settings: ReadiumCSSSettings;
164
- tocTree?: TocItem[];
165
161
  positionsList: Locator[];
166
162
  colorScheme?: ThColorScheme;
167
163
  reducedMotion?: boolean;
@@ -173,8 +169,6 @@ interface StatefulReaderProps {
173
169
  }
174
170
  declare const StatefulReader: ({ rawManifest, selfHref, plugins }: StatefulReaderProps) => react_jsx_runtime.JSX.Element | null;
175
171
 
176
- declare const BookUrlConverter: () => react_jsx_runtime.JSX.Element;
177
-
178
172
  declare const useDocking: <T extends string>(key: T) => {
179
173
  getDocker: () => ThDockingKeys[];
180
174
  sheetType: ThSheetTypes;
@@ -265,4 +259,33 @@ declare const StatefulLoader: ({ isLoading, children }: {
265
259
  children: ReactNode;
266
260
  }) => react_jsx_runtime.JSX.Element;
267
261
 
268
- export { ActionsStateKeys, BookUrlConverter, LineLengthStateObject, type ReadiumCSSSettings, type ScrimPref, type StatefulActionContainerProps, StatefulActionIcon, type StatefulActionIconProps, type StatefulActionTriggerProps, type StatefulActionsMapObject, StatefulBottomSheet, type StatefulBottomSheetProps, StatefulCollapsibleActionsBar, type StatefulCollapsibleActionsBarProps, StatefulColumns, StatefulDockedSheet, type StatefulDockedSheetProps, StatefulFontFamily, StatefulFontWeight, StatefulFullScreenSheet, type StatefulFullScreenSheetProps, StatefulFullscreenTrigger, StatefulGroupWrapper, type StatefulGroupWrapperProps, StatefulHyphens, StatefulJumpToPositionContainer, StatefulJumpToPositionTrigger, StatefulLayout, StatefulLetterSpacing, StatefulLineHeight, StatefulLoader, StatefulNumberField, type StatefulNumberFieldProps, StatefulOverflowMenu, StatefulOverflowMenuItem, type StatefulOverflowMenuItemProps, type StatefulOverflowMenuProps, StatefulParagraphIndent, StatefulParagraphSpacing, StatefulPopoverSheet, type StatefulPopoverSheetProps, StatefulPublisherStyles, StatefulRadioGroup, type StatefulRadioGroupProps, StatefulReader, type StatefulReaderProps, StatefulSettingsContainer, type StatefulSettingsItemProps, StatefulSettingsTrigger, type StatefulSheet, StatefulSheetWrapper, StatefulSlider, type StatefulSliderProps, StatefulSpacingGroup, StatefulSpacingGroupContainer, StatefulSwitch, type StatefulSwitchProps, StatefulTextAlign, StatefulTextGroup, StatefulTextGroupContainer, StatefulTextNormalize, StatefulTheme, StatefulTocContainer, StatefulTocTrigger, StatefulWordSpacing, StatefulZoom, type StatelessCache, type ThPlugin, createDefaultPlugin, useDocking };
262
+ declare const DefaultImage: ({ src, alt }: {
263
+ src: string;
264
+ alt?: string;
265
+ }) => react_jsx_runtime.JSX.Element;
266
+ interface Publication {
267
+ title: string;
268
+ author: string;
269
+ cover: string;
270
+ url: string;
271
+ rendition?: string;
272
+ }
273
+ interface PublicationGridProps {
274
+ publications: Publication[];
275
+ columnWidth?: number;
276
+ gap?: string;
277
+ renderCover?: (publication: Publication) => React__default.ReactElement<React__default.ImgHTMLAttributes<HTMLImageElement>>;
278
+ }
279
+ declare const PublicationGrid: ({ publications, columnWidth, gap, renderCover, }: PublicationGridProps) => react_jsx_runtime.JSX.Element;
280
+
281
+ interface UsePublicationOptions {
282
+ url: string;
283
+ onError?: (error: string) => void;
284
+ }
285
+ declare function usePublication({ url, onError }: UsePublicationOptions): {
286
+ error: string;
287
+ manifest: object | undefined;
288
+ selfLink: string | undefined;
289
+ };
290
+
291
+ export { ActionsStateKeys, DefaultImage, LineLengthStateObject, type Publication, PublicationGrid, type PublicationGridProps, type ReadiumCSSSettings, type ScrimPref, type StatefulActionContainerProps, StatefulActionIcon, type StatefulActionIconProps, type StatefulActionTriggerProps, type StatefulActionsMapObject, StatefulBottomSheet, type StatefulBottomSheetProps, StatefulCollapsibleActionsBar, type StatefulCollapsibleActionsBarProps, StatefulColumns, StatefulDockedSheet, type StatefulDockedSheetProps, StatefulFontFamily, StatefulFontWeight, StatefulFullScreenSheet, type StatefulFullScreenSheetProps, StatefulFullscreenTrigger, StatefulGroupWrapper, type StatefulGroupWrapperProps, StatefulHyphens, StatefulJumpToPositionContainer, StatefulJumpToPositionTrigger, StatefulLayout, StatefulLetterSpacing, StatefulLineHeight, StatefulLoader, StatefulNumberField, type StatefulNumberFieldProps, StatefulOverflowMenu, StatefulOverflowMenuItem, type StatefulOverflowMenuItemProps, type StatefulOverflowMenuProps, StatefulParagraphIndent, StatefulParagraphSpacing, StatefulPopoverSheet, type StatefulPopoverSheetProps, StatefulPublisherStyles, StatefulRadioGroup, type StatefulRadioGroupProps, StatefulReader, type StatefulReaderProps, StatefulSettingsContainer, type StatefulSettingsItemProps, StatefulSettingsTrigger, type StatefulSheet, StatefulSheetWrapper, StatefulSlider, type StatefulSliderProps, StatefulSpacingGroup, StatefulSpacingGroupContainer, StatefulSwitch, type StatefulSwitchProps, StatefulTextAlign, StatefulTextGroup, StatefulTextGroupContainer, StatefulTextNormalize, StatefulTheme, StatefulTocContainer, StatefulTocTrigger, StatefulWordSpacing, StatefulZoom, type StatelessCache, type ThPlugin, createDefaultPlugin, useDocking, usePublication };