@edrlab/thorium-web 1.2.1 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ThPreferencesAdapter-DrZ5_6Dv.d.mts → ThPreferencesAdapter-D0rzsGRl.d.mts} +50 -13
- package/dist/{ThSettingsWrapper-8Kx0SnH4.d.mts → ThSettingsWrapper-BXuRgdqp.d.mts} +42 -4
- package/dist/{actions-D2CHvCHu.d.mts → actions-BLAr0oaM.d.mts} +16 -4
- package/dist/{actionsReducer-kc-S130w.d.mts → actionsReducer-XWTGGNUd.d.mts} +46 -14
- package/dist/chunk-2ORXUOH3.mjs +134 -0
- package/dist/chunk-2ORXUOH3.mjs.map +1 -0
- package/dist/chunk-3GDQP6AS.mjs +14 -0
- package/dist/chunk-3GDQP6AS.mjs.map +1 -0
- package/dist/chunk-6BUN7DEA.mjs +854 -0
- package/dist/chunk-6BUN7DEA.mjs.map +1 -0
- package/dist/{chunk-IYAFKTPL.mjs → chunk-6EHFW43Y.mjs} +5 -4
- package/dist/chunk-6EHFW43Y.mjs.map +1 -0
- package/dist/chunk-7CGMWOZN.mjs +20 -0
- package/dist/chunk-7CGMWOZN.mjs.map +1 -0
- package/dist/{chunk-4VHEHMJN.mjs → chunk-A3FZBEUL.mjs} +228 -94
- package/dist/chunk-A3FZBEUL.mjs.map +1 -0
- package/dist/{chunk-NYZBHYW2.mjs → chunk-DETZMFZ7.mjs} +366 -61
- package/dist/chunk-DETZMFZ7.mjs.map +1 -0
- package/dist/{chunk-QPE574OW.mjs → chunk-DMZFSOHK.mjs} +28 -36
- package/dist/chunk-DMZFSOHK.mjs.map +1 -0
- package/dist/{chunk-7NEQAW7J.mjs → chunk-DTPO3J2C.mjs} +676 -930
- package/dist/chunk-DTPO3J2C.mjs.map +1 -0
- package/dist/{chunk-K3K7TUWM.mjs → chunk-EZG6SBSO.mjs} +358 -94
- package/dist/chunk-EZG6SBSO.mjs.map +1 -0
- package/dist/chunk-GPWW5OML.mjs +1955 -0
- package/dist/chunk-GPWW5OML.mjs.map +1 -0
- package/dist/{chunk-P4V3LA5R.mjs → chunk-I4BKU5NN.mjs} +13 -9
- package/dist/chunk-I4BKU5NN.mjs.map +1 -0
- package/dist/{chunk-47AIIJFO.mjs → chunk-ITDBOMY5.mjs} +3 -3
- package/dist/{chunk-47AIIJFO.mjs.map → chunk-ITDBOMY5.mjs.map} +1 -1
- package/dist/{chunk-XVSFXHYB.mjs → chunk-L4XGZAZ5.mjs} +23 -20
- package/dist/chunk-L4XGZAZ5.mjs.map +1 -0
- package/dist/{chunk-PXAUQJEU.mjs → chunk-LP3JFZ4A.mjs} +2425 -1634
- package/dist/chunk-LP3JFZ4A.mjs.map +1 -0
- package/dist/{chunk-72XCX5TD.mjs → chunk-NKO3K3QS.mjs} +14 -9
- package/dist/chunk-NKO3K3QS.mjs.map +1 -0
- package/dist/chunk-SAUOY37Q.mjs +862 -0
- package/dist/chunk-SAUOY37Q.mjs.map +1 -0
- package/dist/chunk-TEZB4ULX.mjs +57 -0
- package/dist/chunk-TEZB4ULX.mjs.map +1 -0
- package/dist/components/Audio/index.css +1858 -0
- package/dist/components/Audio/index.css.map +1 -0
- package/dist/components/Audio/index.d.mts +103 -0
- package/dist/components/Audio/index.mjs +23 -0
- package/dist/components/Audio/index.mjs.map +1 -0
- package/dist/components/Epub/index.css +365 -9
- package/dist/components/Epub/index.css.map +1 -1
- package/dist/components/Epub/index.d.mts +17 -19
- package/dist/components/Epub/index.mjs +18 -13
- package/dist/components/Misc/index.css +7 -4
- package/dist/components/Misc/index.css.map +1 -1
- package/dist/components/Misc/index.mjs +5 -133
- package/dist/components/Misc/index.mjs.map +1 -1
- package/dist/components/Reader/index.css +1022 -183
- package/dist/components/Reader/index.css.map +1 -1
- package/dist/components/Reader/index.d.mts +16 -16
- package/dist/components/Reader/index.mjs +124 -25
- package/dist/components/Reader/index.mjs.map +1 -1
- package/dist/components/WebPub/index.css +365 -9
- package/dist/components/WebPub/index.css.map +1 -1
- package/dist/components/WebPub/index.d.mts +16 -16
- package/dist/components/WebPub/index.mjs +18 -13
- package/dist/core/Components/index.d.mts +64 -15
- package/dist/core/Components/index.mjs +2 -1
- package/dist/core/Helpers/index.d.mts +2 -2
- package/dist/core/Helpers/index.mjs +4 -2
- package/dist/core/Hooks/index.d.mts +7 -8
- package/dist/core/Hooks/index.mjs +3 -1
- package/dist/i18n/index.mjs +6 -7
- package/dist/lib/index.d.mts +159 -15
- package/dist/lib/index.mjs +4 -2
- package/dist/lib-M3PPQDJJ.mjs +6548 -0
- package/dist/lib-M3PPQDJJ.mjs.map +1 -0
- package/dist/locales/en/thorium-web.json +22 -0
- package/dist/next-lib/index.mjs +2 -0
- package/dist/next-lib/index.mjs.map +1 -1
- package/dist/preferences/index.d.mts +111 -13
- package/dist/preferences/index.mjs +6 -3
- package/dist/{settingsReducer-C1wwCAMv.d.mts → settingsReducer-Bu1zeveu.d.mts} +1 -1
- package/dist/{ui-CamWuqOo.d.mts → ui-nBv8gfr0.d.mts} +20 -1
- package/dist/useAudioNavigator-C5aW4-eT.d.mts +133 -0
- package/dist/{useContrast-D6sjPjxy.d.mts → useContrast-2t429O9O.d.mts} +16 -8
- package/dist/usePreferences-VaBf46eP.d.mts +230 -0
- package/dist/useReaderTransitions-IBGdE7qi.d.mts +530 -0
- package/dist/{useTimeline-DyMx_aWY.d.mts → useTimeline-DCZ1qoCO.d.mts} +4 -2
- package/package.json +17 -13
- package/dist/chunk-4VHEHMJN.mjs.map +0 -1
- package/dist/chunk-72XCX5TD.mjs.map +0 -1
- package/dist/chunk-7NEQAW7J.mjs.map +0 -1
- package/dist/chunk-IYAFKTPL.mjs.map +0 -1
- package/dist/chunk-K3K7TUWM.mjs.map +0 -1
- package/dist/chunk-NYZBHYW2.mjs.map +0 -1
- package/dist/chunk-P4V3LA5R.mjs.map +0 -1
- package/dist/chunk-PXAUQJEU.mjs.map +0 -1
- package/dist/chunk-QPE574OW.mjs.map +0 -1
- package/dist/chunk-XVSFXHYB.mjs.map +0 -1
- package/dist/useEpubNavigator-CwHJfoiV.d.mts +0 -42
- package/dist/usePreferences-BXFJbval.d.mts +0 -43
- package/dist/useReaderTransitions-guT-eA-Q.d.mts +0 -365
- package/dist/useWebPubNavigator-CuSNQKMw.d.mts +0 -39
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { e as UnstableShortcutRepresentation } from './keyboardUtilities-BWAyLS_D.mjs';
|
|
2
|
-
import { B as BreakpointsMap,
|
|
3
|
-
import { I as I18nValue,
|
|
4
|
-
import {
|
|
5
|
-
import { IContentProtectionConfig, ExperimentKey } from '@readium/navigator';
|
|
2
|
+
import { B as BreakpointsMap, e as ThBreakpoints, f as ThBreakpointsObject, T as ThLayoutDirection, g as ThDocumentTitleFormat, a as ThBackLinkPref, h as ThFormatPref, i as ThRunningHeadFormat, j as ThProgressionFormat, k as ThLayoutUI, l as ThPaginatedAffordancePref } from './ui-nBv8gfr0.mjs';
|
|
3
|
+
import { I as I18nValue, e as ThColorScheme, f as ThContrast, g as ThSettingsKeys, h as ThTextSettingsKeys, b as ThSpacingSettingsKeys, d as ThSettingsRangePrefRequired, i as ThSettingsRadioPref, T as ThLineHeightOptions, j as ThSettingsGroupPref, a as ThSpacingPresetKeys } from './useContrast-2t429O9O.mjs';
|
|
4
|
+
import { e as ThSheetTypes, g as ThActionsKeys, d as ThCollapsibility, c as ThActionsTokens, f as ThDockingPref, T as ThDockingKeys } from './actions-BLAr0oaM.mjs';
|
|
5
|
+
import { IContentProtectionConfig, IAudioContentProtectionConfig, ExperimentKey } from '@readium/navigator';
|
|
6
6
|
|
|
7
7
|
type CSSValueUnitless = `${number}`;
|
|
8
8
|
type CSSValueWithUnit<Unit extends string> = `${number}${Unit}`;
|
|
@@ -141,6 +141,8 @@ interface ContentProtectionConfig {
|
|
|
141
141
|
disableSave?: boolean;
|
|
142
142
|
/** Monitor developer tools for suspicious activity. We need it for the shortcut protection */
|
|
143
143
|
monitorDevTools?: boolean;
|
|
144
|
+
/** Prevent casting to remote devices via the Remote Playback API. */
|
|
145
|
+
disableRemotePlayback?: boolean;
|
|
144
146
|
}
|
|
145
147
|
/**
|
|
146
148
|
* Resolves content protection configuration with localized strings
|
|
@@ -151,14 +153,44 @@ interface ContentProtectionConfig {
|
|
|
151
153
|
declare const resolveContentProtectionConfig: (contentProtection: ContentProtectionConfig | undefined, t: (key: string, options?: {
|
|
152
154
|
defaultValue?: string;
|
|
153
155
|
}) => string) => IContentProtectionConfig | undefined;
|
|
156
|
+
/**
|
|
157
|
+
* Audio-specific content protection configuration.
|
|
158
|
+
* Differs from ContentProtectionConfig in that protectCopy is boolean only,
|
|
159
|
+
* since audio does not support selection-based copy protection.
|
|
160
|
+
*/
|
|
161
|
+
type AudioContentProtectionConfig = Omit<ContentProtectionConfig, "protectCopy"> & {
|
|
162
|
+
/** Block copy events (Ctrl+C / Cmd+C) */
|
|
163
|
+
protectCopy?: boolean;
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* Resolves audio content protection configuration with localized strings
|
|
167
|
+
*/
|
|
168
|
+
declare const resolveAudioContentProtectionConfig: (contentProtection: AudioContentProtectionConfig | undefined, t: (key: string, options?: {
|
|
169
|
+
defaultValue?: string;
|
|
170
|
+
}) => string) => IAudioContentProtectionConfig | undefined;
|
|
154
171
|
/**
|
|
155
172
|
* Default content protection configuration
|
|
156
173
|
*/
|
|
157
174
|
declare const defaultContentProtectionConfig: ContentProtectionConfig;
|
|
175
|
+
/**
|
|
176
|
+
* Default audio content protection configuration
|
|
177
|
+
*/
|
|
178
|
+
declare const defaultAudioContentProtectionConfig: AudioContentProtectionConfig;
|
|
158
179
|
/**
|
|
159
180
|
* Development content protection configuration - disables all protections
|
|
160
181
|
*/
|
|
161
|
-
declare const devContentProtectionConfig:
|
|
182
|
+
declare const devContentProtectionConfig: {
|
|
183
|
+
protectCopy: boolean;
|
|
184
|
+
disableContextMenu: boolean;
|
|
185
|
+
disableDragAndDrop: boolean;
|
|
186
|
+
protectPrinting: {
|
|
187
|
+
disable: boolean;
|
|
188
|
+
};
|
|
189
|
+
disableSelectAll: boolean;
|
|
190
|
+
disableSave: boolean;
|
|
191
|
+
monitorDevTools: boolean;
|
|
192
|
+
disableRemotePlayback: boolean;
|
|
193
|
+
};
|
|
162
194
|
|
|
163
195
|
declare enum ThThemeKeys {
|
|
164
196
|
light = "light",
|
|
@@ -301,6 +333,9 @@ interface useThemingProps<T extends string> {
|
|
|
301
333
|
};
|
|
302
334
|
breakpointsMap: BreakpointsMap<number | null>;
|
|
303
335
|
initProps?: Record<string, any>;
|
|
336
|
+
coverUrl?: string;
|
|
337
|
+
autoThemeSource?: "cover" | "system";
|
|
338
|
+
onCoverThemeGenerated?: (themeTokens: ThemeTokens) => void;
|
|
304
339
|
onBreakpointChange?: (breakpoint: ThBreakpoints | null) => void;
|
|
305
340
|
onColorSchemeChange?: (colorScheme: ThColorScheme) => void;
|
|
306
341
|
onContrastChange?: (contrast: ThContrast) => void;
|
|
@@ -309,7 +344,7 @@ interface useThemingProps<T extends string> {
|
|
|
309
344
|
onReducedMotionChange?: (reducedMotion: boolean) => void;
|
|
310
345
|
onReducedTransparencyChange?: (reducedTransparency: boolean) => void;
|
|
311
346
|
}
|
|
312
|
-
declare const useTheming: <T extends string>({ theme, systemKeys, themeKeys, breakpointsMap, initProps, onBreakpointChange, onColorSchemeChange, onContrastChange, onForcedColorsChange, onMonochromeChange, onReducedMotionChange, onReducedTransparencyChange, }: useThemingProps<T>) => {
|
|
347
|
+
declare const useTheming: <T extends string>({ theme, systemKeys, themeKeys, breakpointsMap, initProps, coverUrl, autoThemeSource, onBreakpointChange, onColorSchemeChange, onContrastChange, onForcedColorsChange, onMonochromeChange, onReducedMotionChange, onReducedTransparencyChange, onCoverThemeGenerated, }: useThemingProps<T>) => {
|
|
313
348
|
inferThemeAuto: () => T | undefined;
|
|
314
349
|
theme: string | undefined;
|
|
315
350
|
breakpoints: ThBreakpointsObject;
|
|
@@ -319,6 +354,8 @@ declare const useTheming: <T extends string>({ theme, systemKeys, themeKeys, bre
|
|
|
319
354
|
monochrome: boolean;
|
|
320
355
|
reducedMotion: boolean;
|
|
321
356
|
reducedTransparency: boolean;
|
|
357
|
+
coverThemeTokens: ThemeTokens | null;
|
|
358
|
+
themeResolved: boolean;
|
|
322
359
|
};
|
|
323
360
|
|
|
324
361
|
type CustomizableKeys = {
|
|
@@ -377,18 +414,18 @@ interface ThActionsPref<K extends CustomizableKeys> {
|
|
|
377
414
|
}
|
|
378
415
|
type ThSettingsKeyTypes<K extends CustomizableKeys = DefaultKeys> = {
|
|
379
416
|
[ThSettingsKeys.fontFamily]: ThFontFamilyPref;
|
|
380
|
-
[ThSettingsKeys.letterSpacing]:
|
|
417
|
+
[ThSettingsKeys.letterSpacing]: ThSettingsRangePrefRequired;
|
|
381
418
|
[ThSettingsKeys.lineHeight]: ThSettingsRadioPref<Exclude<ThLineHeightOptions, ThLineHeightOptions.publisher>>;
|
|
382
|
-
[ThSettingsKeys.paragraphIndent]:
|
|
383
|
-
[ThSettingsKeys.paragraphSpacing]:
|
|
384
|
-
[ThSettingsKeys.wordSpacing]:
|
|
385
|
-
[ThSettingsKeys.zoom]:
|
|
419
|
+
[ThSettingsKeys.paragraphIndent]: ThSettingsRangePrefRequired;
|
|
420
|
+
[ThSettingsKeys.paragraphSpacing]: ThSettingsRangePrefRequired;
|
|
421
|
+
[ThSettingsKeys.wordSpacing]: ThSettingsRangePrefRequired;
|
|
422
|
+
[ThSettingsKeys.zoom]: ThSettingsRangePrefRequired;
|
|
386
423
|
} & (K extends {
|
|
387
424
|
settings: infer S;
|
|
388
425
|
} ? S extends string ? {
|
|
389
426
|
[key in S]: any;
|
|
390
427
|
} : {} : {});
|
|
391
|
-
type ThConstraintKeys = Extract<ThSheetTypes, ThSheetTypes.bottomSheet | ThSheetTypes.popover> | "pagination";
|
|
428
|
+
type ThConstraintKeys = Extract<ThSheetTypes, ThSheetTypes.bottomSheet | ThSheetTypes.popover | ThSheetTypes.modal> | "pagination" | "dropdown";
|
|
392
429
|
interface ThPreferences<K extends CustomizableKeys = {}> {
|
|
393
430
|
direction?: ThLayoutDirection;
|
|
394
431
|
locale?: string;
|
|
@@ -511,4 +548,4 @@ interface ThPreferencesAdapter<T extends CustomizableKeys = CustomizableKeys> {
|
|
|
511
548
|
unsubscribe(callback: (prefs: ThPreferences<T>) => void): void;
|
|
512
549
|
}
|
|
513
550
|
|
|
514
|
-
export { type
|
|
551
|
+
export { type LocalFontSource as $, type ActionKey as A, type CSSDynamicViewport as B, type CustomizableKeys as C, type DefaultKeys as D, type CSSFrequency as E, type FontCollection as F, type CSSFontRelativeLength as G, type CSSLargeViewport as H, type CSSPhysicalLength as I, type CSSRelativeLength as J, type CSSResolution as K, type LocalStaticFontFile as L, type CSSRootFontRelativeLength as M, type CSSSmallViewport as N, type CSSTime as O, type CSSViewport as P, type CSSColor as Q, type SystemFontSource as R, type SettingsKey as S, ThThemeKeys as T, type BunnyFontSource as U, type VariableFontRangeConfig as V, type WeightConfig as W, type GoogleFontSource as X, type LocalVariableFontFile as Y, type LocalStaticFontSource as Z, type LocalVariableFontSource as _, type ThemeTokens as a, type FontSource as a0, type FontSpec as a1, type ValidatedLanguageCollection as a2, type ThFontFamilyPref as a3, readiumCSSFontCollection as a4, defaultFontCollection as a5, tamilCollection as a6, type CopyProtectionConfig as a7, type PrintProtectionConfig as a8, type ContentProtectionConfig as a9, resolveContentProtectionConfig as aa, resolveAudioContentProtectionConfig as ab, defaultContentProtectionConfig as ac, defaultAudioContentProtectionConfig as ad, devContentProtectionConfig as ae, lightTheme as af, darkTheme as ag, paperTheme as ah, sepiaTheme as ai, contrast1Theme as aj, contrast2Theme as ak, contrast3Theme as al, type AudioContentProtectionConfig as b, type ThPreferencesAdapter as c, type ThPreferences as d, type FontDefinition as e, type ThemeKey as f, type TextSettingsKey as g, type SpacingSettingsKey as h, type ThSettingsSpacingPresets as i, type ThSpacingPreset as j, type ThActionsPref as k, type ThSettingsKeyTypes as l, type ThConstraintKeys as m, createPreferences as n, type ActionKeyType as o, type ThemeKeyType as p, type SettingsKeyType as q, type TextSettingsKeyType as r, type SpacingSettingsKeyType as s, type useThemingProps as t, useTheming as u, type CSSValueUnitless as v, type CSSValueWithUnit as w, type CSSAbsoluteLength as x, type CSSAngle as y, type CSSDefaultViewport as z };
|
|
@@ -2,7 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import React__default, { ComponentType, SVGProps } from 'react';
|
|
3
3
|
import { TooltipTriggerProps, KeyboardProps } from 'react-aria';
|
|
4
4
|
import { ButtonProps, TooltipProps, MenuItemProps, LabelProps, MenuProps, MenuTriggerProps, PopoverProps, NumberFieldProps, GroupProps, InputProps, RadioGroupProps, RadioProps, SliderProps, SliderOutputProps, SliderTrackProps, SliderThumbProps, SwitchProps, HeadingProps, SelectProps, Button, ListBoxProps, ListBox, ListBoxItemProps, Heading } from 'react-aria-components';
|
|
5
|
-
import {
|
|
5
|
+
import { h as ThActionEntry, i as ThActionsBarProps, C as CollapsiblePref } from './actions-BLAr0oaM.mjs';
|
|
6
6
|
|
|
7
7
|
interface HTMLAttributesWithRef<T> extends React.HTMLAttributes<T> {
|
|
8
8
|
ref?: React.ForwardedRef<T>;
|
|
@@ -72,16 +72,18 @@ interface ThCollapsibleActionsBarProps extends ThActionsBarProps {
|
|
|
72
72
|
items: ThActionEntry<string>[];
|
|
73
73
|
prefs: CollapsiblePref;
|
|
74
74
|
breakpoint?: string;
|
|
75
|
+
targetPlacement?: "top" | "bottom";
|
|
75
76
|
children?: never;
|
|
76
77
|
compounds?: {
|
|
77
78
|
menu: THMenuProps<string> | React__default.ReactElement<typeof ThMenu>;
|
|
78
79
|
};
|
|
79
80
|
}
|
|
80
|
-
declare const ThCollapsibleActionsBar: ({ ref, id, items, prefs, breakpoint, compounds, ...props }: ThCollapsibleActionsBarProps) => react_jsx_runtime.JSX.Element;
|
|
81
|
+
declare const ThCollapsibleActionsBar: ({ ref, id, items, prefs, breakpoint, targetPlacement, compounds, ...props }: ThCollapsibleActionsBarProps) => react_jsx_runtime.JSX.Element;
|
|
81
82
|
|
|
82
83
|
interface ThNumberFieldProps extends Omit<NumberFieldProps, "minValue" | "maxValue" | "decrementAriaLabel" | "incrementAriaLabel"> {
|
|
83
84
|
ref?: React.ForwardedRef<HTMLInputElement>;
|
|
84
85
|
onReset?: () => void;
|
|
86
|
+
onInputChange?: (rawValue: string) => void;
|
|
85
87
|
label?: string;
|
|
86
88
|
placeholder?: string;
|
|
87
89
|
range: number[];
|
|
@@ -119,7 +121,7 @@ interface ThNumberFieldProps extends Omit<NumberFieldProps, "minValue" | "maxVal
|
|
|
119
121
|
reset?: ThActionButtonProps;
|
|
120
122
|
};
|
|
121
123
|
}
|
|
122
|
-
declare const ThNumberField: ({ ref, onReset, label, placeholder, range, isVirtualKeyboardDisabled, steppers, compounds, value, ...props }: ThNumberFieldProps) => react_jsx_runtime.JSX.Element;
|
|
124
|
+
declare const ThNumberField: ({ ref, onReset, onInputChange, label, placeholder, range, isVirtualKeyboardDisabled, steppers, compounds, value, ...props }: ThNumberFieldProps) => react_jsx_runtime.JSX.Element;
|
|
123
125
|
|
|
124
126
|
interface ThRadioGroupItems {
|
|
125
127
|
id: string;
|
|
@@ -192,6 +194,42 @@ interface ThSliderProps extends Omit<SliderProps, "minValue" | "maxValue"> {
|
|
|
192
194
|
}
|
|
193
195
|
declare const ThSlider: ({ ref, onReset, label, placeholder, range, compounds, value, ...props }: ThSliderProps) => react_jsx_runtime.JSX.Element;
|
|
194
196
|
|
|
197
|
+
interface ThSliderWithPresetsProps extends Omit<ThSliderProps, "compounds"> {
|
|
198
|
+
presets: number[];
|
|
199
|
+
formatValue?: (value: number) => string;
|
|
200
|
+
compounds?: {
|
|
201
|
+
/**
|
|
202
|
+
* Props for the outer wrapper div (contains slider + presets).
|
|
203
|
+
*/
|
|
204
|
+
wrapper?: HTMLAttributesWithRef<HTMLDivElement>;
|
|
205
|
+
/**
|
|
206
|
+
* Compounds forwarded to the inner ThSlider.
|
|
207
|
+
*/
|
|
208
|
+
slider?: ThSliderProps["compounds"];
|
|
209
|
+
/**
|
|
210
|
+
* Props for the RadioGroup element wrapping the presets.
|
|
211
|
+
*/
|
|
212
|
+
presetsList?: Omit<RadioGroupProps, "value" | "onChange" | "children">;
|
|
213
|
+
/**
|
|
214
|
+
* Props for the inner wrapper div containing the Radio items (grid container).
|
|
215
|
+
*/
|
|
216
|
+
presetsWrapper?: HTMLAttributesWithRef<HTMLDivElement>;
|
|
217
|
+
/**
|
|
218
|
+
* Props applied to each preset Radio.
|
|
219
|
+
*/
|
|
220
|
+
preset?: ThRadioGroupProps["compounds"] extends infer C ? C extends {
|
|
221
|
+
radio?: infer R;
|
|
222
|
+
} ? R : never : never;
|
|
223
|
+
/**
|
|
224
|
+
* Props applied to the label span inside each preset Radio.
|
|
225
|
+
*/
|
|
226
|
+
presetLabel?: ThRadioGroupProps["compounds"] extends infer C ? C extends {
|
|
227
|
+
radioLabel?: infer L;
|
|
228
|
+
} ? L : never : never;
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
declare const ThSliderWithPresets: ({ presets, formatValue, value, onChange, compounds, range, step, ...props }: ThSliderWithPresetsProps) => react_jsx_runtime.JSX.Element;
|
|
232
|
+
|
|
195
233
|
interface ThSwitchProps extends SwitchProps {
|
|
196
234
|
ref?: React.ForwardedRef<HTMLLabelElement>;
|
|
197
235
|
label: string;
|
|
@@ -279,4 +317,4 @@ interface ThSettingsWrapperProps extends HTMLAttributesWithRef<HTMLDivElement> {
|
|
|
279
317
|
}
|
|
280
318
|
declare const ThSettingsWrapper: ({ ref, label, items, prefs, compounds, ...props }: ThSettingsWrapperProps) => react_jsx_runtime.JSX.Element | undefined;
|
|
281
319
|
|
|
282
|
-
export { type HTMLAttributesWithRef as H, type ThActionButtonProps as T, type WithRef as W, type ThCollapsibleActionsBarProps as a, ThCollapsibleActionsBar as b, ThActionButton as c, type THMenuProps as d, ThMenu as e, type ThMenuItemProps as f, ThMenuItem as g, type ThNumberFieldProps as h, ThNumberField as i, type ThRadioGroupItems as j, type ThRadioGroupProps as k, ThRadioGroup as l, type ThSliderProps as m, ThSlider as n, type
|
|
320
|
+
export { type HTMLAttributesWithRef as H, type ThActionButtonProps as T, type WithRef as W, type ThCollapsibleActionsBarProps as a, ThCollapsibleActionsBar as b, ThActionButton as c, type THMenuProps as d, ThMenu as e, type ThMenuItemProps as f, ThMenuItem as g, type ThNumberFieldProps as h, ThNumberField as i, type ThRadioGroupItems as j, type ThRadioGroupProps as k, ThRadioGroup as l, type ThSliderProps as m, ThSlider as n, type ThSliderWithPresetsProps as o, ThSliderWithPresets as p, type ThSwitchProps as q, ThSwitch as r, type ThDropdownEntry as s, type ThDropdownProps as t, ThDropdown as u, type ThSettingsEntry as v, type ThSettingsPrefs as w, type ThSettingsWrapperProps as x, ThSettingsWrapper as y };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ToolbarProps } from 'react-aria-components';
|
|
3
|
-
import { B as BreakpointsMap } from './ui-
|
|
3
|
+
import { B as BreakpointsMap } from './ui-nBv8gfr0.mjs';
|
|
4
4
|
|
|
5
5
|
declare enum ThActionsTriggerVariant {
|
|
6
6
|
button = "iconButton",
|
|
@@ -43,8 +43,18 @@ interface ThActionsTokens {
|
|
|
43
43
|
visibility: ThCollapsibilityVisibility;
|
|
44
44
|
shortcut: string | null;
|
|
45
45
|
sheet?: {
|
|
46
|
-
defaultSheet: Exclude<ThSheetTypes, ThSheetTypes.dockedStart | ThSheetTypes.dockedEnd>;
|
|
47
|
-
breakpoints: BreakpointsMap<ThSheetTypes
|
|
46
|
+
defaultSheet: Exclude<ThSheetTypes, ThSheetTypes.dockedStart | ThSheetTypes.dockedEnd | ThSheetTypes.compactPopover>;
|
|
47
|
+
breakpoints: BreakpointsMap<Exclude<ThSheetTypes, ThSheetTypes.compactPopover>>;
|
|
48
|
+
};
|
|
49
|
+
docked?: ThActionsDockedPref;
|
|
50
|
+
snapped?: ThActionsSnappedPref;
|
|
51
|
+
}
|
|
52
|
+
interface ThAudioActionsTokens {
|
|
53
|
+
visibility: ThCollapsibilityVisibility;
|
|
54
|
+
shortcut: string | null;
|
|
55
|
+
sheet?: {
|
|
56
|
+
defaultSheet: Exclude<ThSheetTypes, ThSheetTypes.dockedStart | ThSheetTypes.dockedEnd | ThSheetTypes.popover>;
|
|
57
|
+
breakpoints: BreakpointsMap<Exclude<ThSheetTypes, ThSheetTypes.popover>>;
|
|
48
58
|
};
|
|
49
59
|
docked?: ThActionsDockedPref;
|
|
50
60
|
snapped?: ThActionsSnappedPref;
|
|
@@ -90,6 +100,8 @@ declare enum ThDockingTypes {
|
|
|
90
100
|
}
|
|
91
101
|
declare enum ThSheetTypes {
|
|
92
102
|
popover = "popover",
|
|
103
|
+
compactPopover = "compactPopover",
|
|
104
|
+
modal = "modal",
|
|
93
105
|
fullscreen = "fullscreen",
|
|
94
106
|
dockedStart = "docked start",
|
|
95
107
|
dockedEnd = "docked end",
|
|
@@ -105,4 +117,4 @@ declare const defaultFullscreenAction: ThActionsTokens;
|
|
|
105
117
|
declare const defaultTocAction: ThActionsTokens;
|
|
106
118
|
declare const defaultJumpToPositionAction: ThActionsTokens;
|
|
107
119
|
|
|
108
|
-
export { type CollapsiblePref as C, ThDockingKeys as T, ThSheetHeaderVariant as a,
|
|
120
|
+
export { type CollapsiblePref as C, ThDockingKeys as T, ThSheetHeaderVariant as a, type ThAudioActionsTokens as b, type ThActionsTokens as c, type ThCollapsibility as d, ThSheetTypes as e, type ThDockingPref as f, ThActionsKeys as g, type ThActionEntry as h, type ThActionsBarProps as i, type ThBottomSheetDetent as j, type ThActionsDockedPref as k, type ThActionsSnappedPref as l, ThDockingTypes as m, defaultActionKeysObject as n, defaultSettingsAction as o, defaultFullscreenAction as p, defaultTocAction as q, defaultJumpToPositionAction as r, ThCollapsibilityVisibility as s, ThActionsTriggerVariant as t, useCollapsibility as u, ThActionsBar as v };
|
|
@@ -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 ThDockingKeys } from './actions-
|
|
3
|
+
import { T as ThDockingKeys } from './actions-BLAr0oaM.mjs';
|
|
4
4
|
|
|
5
5
|
type ActionsStateKeys = string;
|
|
6
6
|
type OverflowStateKeys = string;
|
|
@@ -23,6 +23,7 @@ interface ActionStateDockPayload {
|
|
|
23
23
|
payload: {
|
|
24
24
|
key: ActionsStateKeys;
|
|
25
25
|
dockingKey: ThDockingKeys;
|
|
26
|
+
profile: string;
|
|
26
27
|
};
|
|
27
28
|
}
|
|
28
29
|
interface ActionStateOpenPayload {
|
|
@@ -30,12 +31,14 @@ interface ActionStateOpenPayload {
|
|
|
30
31
|
payload: {
|
|
31
32
|
key: ActionsStateKeys;
|
|
32
33
|
isOpen: boolean;
|
|
34
|
+
profile: string;
|
|
33
35
|
};
|
|
34
36
|
}
|
|
35
37
|
interface ActionStateTogglePayload {
|
|
36
38
|
type: string;
|
|
37
39
|
payload: {
|
|
38
40
|
key: ActionsStateKeys;
|
|
41
|
+
profile: string;
|
|
39
42
|
};
|
|
40
43
|
}
|
|
41
44
|
interface ActionOverflowOpenPayload {
|
|
@@ -56,21 +59,34 @@ interface ActionStateSlotPayload {
|
|
|
56
59
|
type: string;
|
|
57
60
|
payload: ThDockingKeys.start | ThDockingKeys.end;
|
|
58
61
|
}
|
|
62
|
+
interface ActionStateSlotPayloadWithProfile {
|
|
63
|
+
type: string;
|
|
64
|
+
payload: {
|
|
65
|
+
slot: ThDockingKeys.start | ThDockingKeys.end;
|
|
66
|
+
profile: string;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
59
69
|
interface ActionStateSlotWidthPayload {
|
|
60
70
|
type: string;
|
|
61
71
|
payload: {
|
|
62
72
|
key: ThDockingKeys.start | ThDockingKeys.end;
|
|
63
73
|
width: number;
|
|
74
|
+
profile: string;
|
|
64
75
|
};
|
|
65
76
|
}
|
|
66
77
|
interface DockState {
|
|
67
|
-
[
|
|
68
|
-
|
|
78
|
+
[profile: string]: {
|
|
79
|
+
[ThDockingKeys.start]: DockStateObject;
|
|
80
|
+
[ThDockingKeys.end]: DockStateObject;
|
|
81
|
+
};
|
|
69
82
|
}
|
|
70
|
-
|
|
71
|
-
|
|
83
|
+
interface ActionKeysState {
|
|
84
|
+
[profile: string]: {
|
|
72
85
|
[key in ActionsStateKeys]?: ActionStateObject;
|
|
73
86
|
};
|
|
87
|
+
}
|
|
88
|
+
type ActionsReducerState = {
|
|
89
|
+
keys: ActionKeysState;
|
|
74
90
|
dock: DockState;
|
|
75
91
|
overflow: {
|
|
76
92
|
[key in OverflowStateKeys]?: OverflowStateObject;
|
|
@@ -81,34 +97,50 @@ declare const actionsSlice: _reduxjs_toolkit.Slice<ActionsReducerState, {
|
|
|
81
97
|
setActionOpen: (state: WritableDraft<ActionsReducerState>, action: ActionStateOpenPayload) => void;
|
|
82
98
|
toggleActionOpen: (state: WritableDraft<ActionsReducerState>, action: ActionStateTogglePayload) => void;
|
|
83
99
|
setOverflow: (state: WritableDraft<ActionsReducerState>, action: ActionOverflowOpenPayload) => void;
|
|
84
|
-
activateDockPanel: (state: WritableDraft<ActionsReducerState>, action:
|
|
85
|
-
deactivateDockPanel: (state: WritableDraft<ActionsReducerState>, action:
|
|
86
|
-
collapseDockPanel: (state: WritableDraft<ActionsReducerState>, action:
|
|
87
|
-
expandDockPanel: (state: WritableDraft<ActionsReducerState>, action:
|
|
100
|
+
activateDockPanel: (state: WritableDraft<ActionsReducerState>, action: ActionStateSlotPayloadWithProfile) => void;
|
|
101
|
+
deactivateDockPanel: (state: WritableDraft<ActionsReducerState>, action: ActionStateSlotPayloadWithProfile) => void;
|
|
102
|
+
collapseDockPanel: (state: WritableDraft<ActionsReducerState>, action: ActionStateSlotPayloadWithProfile) => void;
|
|
103
|
+
expandDockPanel: (state: WritableDraft<ActionsReducerState>, action: ActionStateSlotPayloadWithProfile) => void;
|
|
88
104
|
setDockPanelWidth: (state: WritableDraft<ActionsReducerState>, action: ActionStateSlotWidthPayload) => void;
|
|
89
105
|
}, "actions", "actions", _reduxjs_toolkit.SliceSelectors<ActionsReducerState>>;
|
|
90
106
|
declare const dockAction: _reduxjs_toolkit.ActionCreatorWithPayload<{
|
|
91
107
|
key: ActionsStateKeys;
|
|
92
108
|
dockingKey: ThDockingKeys;
|
|
109
|
+
profile: string;
|
|
93
110
|
}, "actions/dockAction">;
|
|
94
111
|
declare const setActionOpen: _reduxjs_toolkit.ActionCreatorWithPayload<{
|
|
95
112
|
key: ActionsStateKeys;
|
|
96
113
|
isOpen: boolean;
|
|
114
|
+
profile: string;
|
|
97
115
|
}, "actions/setActionOpen">;
|
|
98
116
|
declare const toggleActionOpen: _reduxjs_toolkit.ActionCreatorWithPayload<{
|
|
99
117
|
key: ActionsStateKeys;
|
|
118
|
+
profile: string;
|
|
100
119
|
}, "actions/toggleActionOpen">;
|
|
101
120
|
declare const setOverflow: _reduxjs_toolkit.ActionCreatorWithPayload<{
|
|
102
121
|
key: OverflowStateKeys;
|
|
103
122
|
isOpen: boolean;
|
|
104
123
|
}, "actions/setOverflow">;
|
|
105
|
-
declare const activateDockPanel: _reduxjs_toolkit.ActionCreatorWithPayload<
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
124
|
+
declare const activateDockPanel: _reduxjs_toolkit.ActionCreatorWithPayload<{
|
|
125
|
+
slot: ThDockingKeys.start | ThDockingKeys.end;
|
|
126
|
+
profile: string;
|
|
127
|
+
}, "actions/activateDockPanel">;
|
|
128
|
+
declare const deactivateDockPanel: _reduxjs_toolkit.ActionCreatorWithPayload<{
|
|
129
|
+
slot: ThDockingKeys.start | ThDockingKeys.end;
|
|
130
|
+
profile: string;
|
|
131
|
+
}, "actions/deactivateDockPanel">;
|
|
132
|
+
declare const collapseDockPanel: _reduxjs_toolkit.ActionCreatorWithPayload<{
|
|
133
|
+
slot: ThDockingKeys.start | ThDockingKeys.end;
|
|
134
|
+
profile: string;
|
|
135
|
+
}, "actions/collapseDockPanel">;
|
|
136
|
+
declare const expandDockPanel: _reduxjs_toolkit.ActionCreatorWithPayload<{
|
|
137
|
+
slot: ThDockingKeys.start | ThDockingKeys.end;
|
|
138
|
+
profile: string;
|
|
139
|
+
}, "actions/expandDockPanel">;
|
|
109
140
|
declare const setDockPanelWidth: _reduxjs_toolkit.ActionCreatorWithPayload<{
|
|
110
141
|
key: ThDockingKeys.start | ThDockingKeys.end;
|
|
111
142
|
width: number;
|
|
143
|
+
profile: string;
|
|
112
144
|
}, "actions/setDockPanelWidth">;
|
|
113
145
|
|
|
114
|
-
export { type ActionsStateKeys as A, type DockStateObject as D, type OverflowStateKeys as O, type ActionStateObject as a, type OverflowStateObject as b, type ActionStateDockPayload as c, type ActionStateOpenPayload as d, type ActionStateTogglePayload as e, type ActionOverflowOpenPayload as f, type ActionStateDockedPayload as g, type ActionStateSlotPayload as h, type
|
|
146
|
+
export { type ActionsStateKeys as A, type DockStateObject as D, type OverflowStateKeys as O, type ActionStateObject as a, type OverflowStateObject as b, type ActionStateDockPayload as c, type ActionStateOpenPayload as d, type ActionStateTogglePayload as e, type ActionOverflowOpenPayload as f, type ActionStateDockedPayload as g, type ActionStateSlotPayload as h, type ActionStateSlotPayloadWithProfile as i, type ActionStateSlotWidthPayload as j, type DockState as k, type ActionKeysState as l, type ActionsReducerState as m, actionsSlice as n, dockAction as o, setOverflow as p, activateDockPanel as q, deactivateDockPanel as r, setActionOpen as s, toggleActionOpen as t, collapseDockPanel as u, expandDockPanel as v, setDockPanelWidth as w };
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { useI18n } from './chunk-6EHFW43Y.mjs';
|
|
2
|
+
import { ThGrid, ThLoader } from './chunk-DETZMFZ7.mjs';
|
|
3
|
+
import { isValidElement, cloneElement } from 'react';
|
|
4
|
+
import { Link } from 'react-aria-components';
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
// src/components/Misc/assets/styles/thorium-web.publicationGrid.module.css
|
|
9
|
+
var thorium_web_publicationGrid_default = {
|
|
10
|
+
wrapper: "thorium_web_publicationGrid_wrapper",
|
|
11
|
+
card: "thorium_web_publicationGrid_card",
|
|
12
|
+
cover: "thorium_web_publicationGrid_cover",
|
|
13
|
+
image: "thorium_web_publicationGrid_image",
|
|
14
|
+
info: "thorium_web_publicationGrid_info",
|
|
15
|
+
title: "thorium_web_publicationGrid_title",
|
|
16
|
+
author: "thorium_web_publicationGrid_author",
|
|
17
|
+
rendition: "thorium_web_publicationGrid_rendition"
|
|
18
|
+
};
|
|
19
|
+
var DefaultImage = ({
|
|
20
|
+
src,
|
|
21
|
+
alt = ""
|
|
22
|
+
}) => /* @__PURE__ */ jsx(
|
|
23
|
+
"img",
|
|
24
|
+
{
|
|
25
|
+
src,
|
|
26
|
+
alt,
|
|
27
|
+
className: thorium_web_publicationGrid_default.image,
|
|
28
|
+
loading: "lazy"
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
var PublicationGrid = ({
|
|
32
|
+
publications,
|
|
33
|
+
columnWidth = 400,
|
|
34
|
+
gap = "1.5rem",
|
|
35
|
+
renderCover = (publication) => /* @__PURE__ */ jsx(
|
|
36
|
+
DefaultImage,
|
|
37
|
+
{
|
|
38
|
+
src: publication.cover,
|
|
39
|
+
alt: ""
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
}) => {
|
|
43
|
+
const renderCoverWithClass = (publication) => {
|
|
44
|
+
const cover = renderCover(publication);
|
|
45
|
+
if (!isValidElement(cover)) {
|
|
46
|
+
return /* @__PURE__ */ jsx(
|
|
47
|
+
DefaultImage,
|
|
48
|
+
{
|
|
49
|
+
src: publication.cover,
|
|
50
|
+
alt: ""
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
return cloneElement(cover, {
|
|
55
|
+
className: classNames(
|
|
56
|
+
thorium_web_publicationGrid_default.image,
|
|
57
|
+
cover.props.className
|
|
58
|
+
)
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
return /* @__PURE__ */ jsx(
|
|
62
|
+
ThGrid,
|
|
63
|
+
{
|
|
64
|
+
className: thorium_web_publicationGrid_default.wrapper,
|
|
65
|
+
items: publications,
|
|
66
|
+
columnWidth,
|
|
67
|
+
gap,
|
|
68
|
+
renderItem: (publication, index) => /* @__PURE__ */ jsxs(
|
|
69
|
+
Link,
|
|
70
|
+
{
|
|
71
|
+
href: publication.url,
|
|
72
|
+
className: thorium_web_publicationGrid_default.card,
|
|
73
|
+
children: [
|
|
74
|
+
/* @__PURE__ */ jsx("figure", { className: thorium_web_publicationGrid_default.cover, children: renderCoverWithClass(publication) }),
|
|
75
|
+
/* @__PURE__ */ jsxs("div", { className: thorium_web_publicationGrid_default.info, children: [
|
|
76
|
+
/* @__PURE__ */ jsx("h2", { className: thorium_web_publicationGrid_default.title, children: publication.title }),
|
|
77
|
+
/* @__PURE__ */ jsx("p", { className: thorium_web_publicationGrid_default.author, children: publication.author }),
|
|
78
|
+
publication.rendition && /* @__PURE__ */ jsx("p", { className: thorium_web_publicationGrid_default.rendition, children: publication.rendition })
|
|
79
|
+
] })
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
index
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
// src/components/Misc/assets/styles/thorium-web.loader.module.css
|
|
89
|
+
var thorium_web_loader_default = {
|
|
90
|
+
wrapper: "thorium_web_loader_wrapper",
|
|
91
|
+
loader: "thorium_web_loader_loader"};
|
|
92
|
+
var StatefulLoader = ({ isLoading, children }) => {
|
|
93
|
+
const { t } = useI18n();
|
|
94
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
95
|
+
ThLoader,
|
|
96
|
+
{
|
|
97
|
+
isLoading,
|
|
98
|
+
loader: /* @__PURE__ */ jsx("div", { className: thorium_web_loader_default.loader, children: t("reader.app.loading") }),
|
|
99
|
+
className: thorium_web_loader_default.wrapper,
|
|
100
|
+
children
|
|
101
|
+
}
|
|
102
|
+
) });
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
// src/components/Misc/assets/styles/thorium-web.error.module.css
|
|
106
|
+
var thorium_web_error_default = {
|
|
107
|
+
wrapper: "thorium_web_error_wrapper",
|
|
108
|
+
title: "thorium_web_error_title",
|
|
109
|
+
message: "thorium_web_error_message"
|
|
110
|
+
};
|
|
111
|
+
var ErrorDisplay = ({
|
|
112
|
+
error,
|
|
113
|
+
title,
|
|
114
|
+
children
|
|
115
|
+
}) => {
|
|
116
|
+
const { t } = useI18n();
|
|
117
|
+
const getUserMessage = () => {
|
|
118
|
+
if (error.isNotFound()) return t("reader.app.errors.notFound");
|
|
119
|
+
if (error.isAccessDenied()) return t("reader.app.errors.accessDenied");
|
|
120
|
+
if (error.isNetwork()) return t("reader.app.errors.network");
|
|
121
|
+
if (error.isServerError()) return t("reader.app.errors.serverError");
|
|
122
|
+
if (error.isClientError()) return t("reader.app.errors.clientError");
|
|
123
|
+
return t("reader.app.errors.generic");
|
|
124
|
+
};
|
|
125
|
+
return /* @__PURE__ */ jsxs("div", { className: thorium_web_error_default.wrapper, children: [
|
|
126
|
+
/* @__PURE__ */ jsx("h1", { className: thorium_web_error_default.title, children: title || t("reader.app.errors.title") }),
|
|
127
|
+
/* @__PURE__ */ jsx("p", { className: thorium_web_error_default.message, children: getUserMessage() }),
|
|
128
|
+
children
|
|
129
|
+
] });
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
export { DefaultImage, ErrorDisplay, PublicationGrid, StatefulLoader };
|
|
133
|
+
//# sourceMappingURL=chunk-2ORXUOH3.mjs.map
|
|
134
|
+
//# sourceMappingURL=chunk-2ORXUOH3.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Misc/assets/styles/thorium-web.publicationGrid.module.css","../src/components/Misc/PublicationGrid.tsx","../src/components/Misc/assets/styles/thorium-web.loader.module.css","../src/components/Misc/StatefulLoader.tsx","../src/components/Misc/assets/styles/thorium-web.error.module.css","../src/components/Misc/ErrorDisplay.tsx"],"names":["wrapper","card","cover","image","info","title","author","rendition","loader","jsx","message","jsxs"],"mappings":"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","file":"chunk-2ORXUOH3.mjs","sourcesContent":[".wrapper {\n --th-color-text: #333;\n --th-color-text-secondary: #666;\n --th-color-background: #fff;\n --th-color-primary: #e0e0e0;\n --th-color-secondary: #fafafa;\n\n padding: 1rem;\n width: 100%;\n}\n\n.card {\n display: flex;\n text-decoration: none;\n color: inherit;\n border: 1px solid var(--th-color-primary);\n border-radius: 8px;\n overflow: hidden;\n transition: transform 0.2s ease, box-shadow 0.2s ease;\n background: white;\n}\n\n.card:hover {\n transform: translateY(-2px);\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);\n}\n\n.cover {\n width: 120px;\n height: 180px;\n flex-shrink: 0;\n margin: 0;\n background-color: var(--th-color-secondary);\n}\n\n.image {\n width: 120px;\n height: 180px;\n object-fit: contain;\n}\n\n.info {\n padding: 1rem;\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n}\n\n.title {\n margin: 0 0 0.5rem;\n font-weight: 600;\n font-size: 1.25rem;\n color: var(--th-color-text);\n}\n\n.author {\n margin: 0 0 0.75rem;\n color: var(--th-color-text-secondary);\n font-size: 1rem;\n}\n\n.rendition {\n background: var(--th-color-primary);\n color: var(--th-color-text);\n padding: 0.25rem 0.75rem;\n margin: 0;\n border-radius: 20px;\n font-size: 0.875rem;\n font-weight: 500;\n margin-top: auto;\n align-self: flex-start;\n}","\"use client\";\n\nimport React, { cloneElement, isValidElement } from \"react\";\n\nimport publicationGridStyles from \"./assets/styles/thorium-web.publicationGrid.module.css\";\n\nimport { ThGrid } from \"@/core/Components\";\nimport { Link } from \"react-aria-components\";\n\nimport classNames from \"classnames\";\n\nexport const DefaultImage = ({\n src,\n alt = \"\"\n}: {\n src: string;\n alt?: string;\n}) => (\n <img\n src={ src }\n alt={ alt }\n className={ publicationGridStyles.image }\n loading=\"lazy\"\n />\n);\n\nexport interface Publication {\n title: string;\n author: string;\n cover: string;\n url: string;\n rendition?: string;\n}\n\nexport interface PublicationGridProps {\n publications: Publication[];\n columnWidth?: number;\n gap?: string;\n renderCover?: (publication: Publication) => React.ReactElement<React.ImgHTMLAttributes<HTMLImageElement>>;\n}\n\nexport const PublicationGrid = ({ \n publications,\n columnWidth = 400,\n gap = \"1.5rem\",\n renderCover = (publication) => (\n <DefaultImage\n src={ publication.cover }\n alt=\"\"\n />\n ),\n}: PublicationGridProps) => {\n const renderCoverWithClass = (publication: Publication) => {\n const cover = renderCover(publication);\n \n if (!isValidElement<React.ImgHTMLAttributes<HTMLImageElement>>(cover)) {\n return (\n <DefaultImage\n src={ publication.cover }\n alt=\"\"\n />\n );\n }\n\n return cloneElement(cover, {\n className: classNames(\n publicationGridStyles.image,\n cover.props.className\n )\n });\n };\n\n return (\n <ThGrid\n className={ publicationGridStyles.wrapper }\n items={ publications }\n columnWidth={ columnWidth }\n gap={ gap }\n renderItem={ (publication, index) => (\n <Link\n href={ publication.url }\n key={ index }\n className={ publicationGridStyles.card }\n >\n <figure className={ publicationGridStyles.cover }>\n { renderCoverWithClass(publication) }\n </figure>\n <div className={ publicationGridStyles.info }>\n <h2 className={ publicationGridStyles.title }>\n { publication.title }\n </h2>\n <p className={ publicationGridStyles.author }>\n { publication.author }\n </p>\n { publication.rendition && (\n <p className={ publicationGridStyles.rendition }>\n { publication.rendition }\n </p>\n ) }\n </div>\n </Link>\n ) }\n />\n );\n};",".wrapper {\n width: 100%;\n height: 100dvh;\n height: 100vh;\n}\n\n.loader {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n color: var(--th-theme-text, CanvasText);\n background-color: var(--th-theme-background, Canvas);\n font-weight: bold;\n}\n\n.loader::after {\n content: \"...\";\n overflow: hidden;\n display: inline-block;\n vertical-align: bottom;\n animation: ellipsis-dot 1s infinite 300ms;\n animation-fill-mode: forwards;\n width: 3ch;\n}\n\n@keyframes ellipsis-dot {\n 25% {\n content: \"\";\n }\n 50% {\n content: \".\";\n }\n 75% {\n content: \"..\";\n }\n 100% {\n content: \"...\";\n }\n}","import { ReactNode } from \"react\";\n\nimport readerLoaderStyles from \"./assets/styles/thorium-web.loader.module.css\";\n\nimport { ThLoader } from \"@/core/Components/Reader/ThLoader\";\n\nimport { useI18n } from \"@/i18n/useI18n\";\n\nexport const StatefulLoader = ({ isLoading, children }: { isLoading: boolean, children: ReactNode }) => {\n const { t } = useI18n();\n\n return (\n <>\n <ThLoader \n isLoading={ isLoading } \n loader={ <div className={ readerLoaderStyles.loader }>{ t(\"reader.app.loading\") }</div> } \n className={ readerLoaderStyles.wrapper } \n >\n { children }\n </ThLoader>\n </>\n )\n}",".wrapper {\n --th-color-text: #333;\n --th-color-text-secondary: #666;\n --th-color-background: #fff;\n\n padding: 2rem;\n text-align: center;\n max-width: 600px;\n margin: 0 auto;\n}\n\n.title {\n font-size: 1.5rem;\n font-weight: 600;\n color: var(--th-color-text);\n margin: 0 0 1rem 0;\n}\n\n.message {\n font-size: 1.125rem;\n color: var(--th-color-text-secondary);\n line-height: 1.6;\n margin: 0 0 1.5rem 0;\n}","import { ReactNode } from \"react\";\nimport { ProcessedError } from \"@/helpers/errorHandler\";\nimport { useI18n } from \"@/i18n/useI18n\";\nimport errorStyles from \"./assets/styles/thorium-web.error.module.css\";\n\ninterface ErrorDisplayProps {\n error: ProcessedError;\n title?: string;\n children?: ReactNode;\n}\n\nexport const ErrorDisplay = ({ \n error, \n title,\n children\n}: ErrorDisplayProps) => {\n const { t } = useI18n();\n \n const getUserMessage = () => {\n if (error.isNotFound()) return t(\"reader.app.errors.notFound\");\n if (error.isAccessDenied()) return t(\"reader.app.errors.accessDenied\");\n if (error.isNetwork()) return t(\"reader.app.errors.network\");\n if (error.isServerError()) return t(\"reader.app.errors.serverError\");\n if (error.isClientError()) return t(\"reader.app.errors.clientError\");\n return t(\"reader.app.errors.generic\");\n };\n\n return (\n <div className={ errorStyles.wrapper }>\n <h1 className={ errorStyles.title }>{ title || t(\"reader.app.errors.title\") }</h1>\n <p className={ errorStyles.message }>{ getUserMessage() }</p>\n { children }\n </div>\n );\n};\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
2
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
3
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
4
|
+
}) : x)(function(x) {
|
|
5
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
6
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
7
|
+
});
|
|
8
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
9
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { __commonJS, __require };
|
|
13
|
+
//# sourceMappingURL=chunk-3GDQP6AS.mjs.map
|
|
14
|
+
//# sourceMappingURL=chunk-3GDQP6AS.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-3GDQP6AS.mjs"}
|