@edrlab/thorium-web 1.0.9 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/{StatefulReader-DdQrrgZY.d.mts → StatefulReader-BjH7bkU1.d.mts} +1 -25
- package/dist/chunk-7CGMWOZN.mjs +20 -0
- package/dist/chunk-7CGMWOZN.mjs.map +1 -0
- package/dist/{chunk-PVGIY5SC.mjs → chunk-D24O64OP.mjs} +375 -278
- package/dist/chunk-D24O64OP.mjs.map +1 -0
- package/dist/{chunk-G2SKPGPO.mjs → chunk-FG6BJGVE.mjs} +5 -25
- package/dist/chunk-FG6BJGVE.mjs.map +1 -0
- package/dist/{chunk-SQHOOSST.mjs → chunk-HE3WFPGE.mjs} +84 -85
- package/dist/chunk-HE3WFPGE.mjs.map +1 -0
- package/dist/chunk-KKJA56IZ.mjs +27 -0
- package/dist/chunk-KKJA56IZ.mjs.map +1 -0
- package/dist/{chunk-OXZU5FTD.mjs → chunk-SPAC7T57.mjs} +32 -21
- package/dist/chunk-SPAC7T57.mjs.map +1 -0
- package/dist/components/Epub/index.css +1282 -0
- package/dist/components/Epub/index.css.map +1 -0
- package/dist/components/Epub/index.d.mts +1 -1
- package/dist/components/Epub/index.mjs +47 -44
- package/dist/components/Epub/index.mjs.map +1 -1
- package/dist/components/Misc/index.css +102 -0
- package/dist/components/Misc/index.css.map +1 -0
- package/dist/components/Misc/index.d.mts +28 -0
- package/dist/components/Misc/index.mjs +110 -0
- package/dist/components/Misc/index.mjs.map +1 -0
- package/dist/components/WebPub/index.css +1214 -0
- package/dist/components/WebPub/index.css.map +1 -0
- package/dist/components/WebPub/index.d.mts +2 -2
- package/dist/components/WebPub/index.mjs +28 -25
- package/dist/components/WebPub/index.mjs.map +1 -1
- package/dist/core/Components/index.mjs +0 -1
- package/dist/core/Helpers/index.d.mts +12 -2
- package/dist/core/Helpers/index.mjs +1 -2
- package/dist/core/Hooks/index.mjs +0 -1
- package/dist/i18n/index.mjs +5 -5
- package/dist/lib/index.mjs +2 -3
- package/dist/locales/et/thorium-web.json +1 -0
- package/dist/locales/it/thorium-web.json +1 -0
- package/dist/locales/pl/thorium-web.json +26 -13
- package/dist/locales/sv/thorium-web.json +37 -37
- package/dist/next-lib/index.mjs +0 -2
- package/dist/next-lib/index.mjs.map +1 -1
- package/dist/preferences/index.mjs +3 -4
- package/package.json +38 -34
- package/dist/backLink.module-QFOMD4RA.module.css +0 -36
- package/dist/chunk-3QS3WKRC.mjs +0 -29
- package/dist/chunk-3QS3WKRC.mjs.map +0 -1
- package/dist/chunk-G2SKPGPO.mjs.map +0 -1
- package/dist/chunk-OXZU5FTD.mjs.map +0 -1
- package/dist/chunk-PVGIY5SC.mjs.map +0 -1
- package/dist/chunk-SQHOOSST.mjs.map +0 -1
- package/dist/chunk-TTGURRX3.mjs +0 -19
- package/dist/chunk-TTGURRX3.mjs.map +0 -1
- package/dist/docking.module-TDNYZX4H.module.css +0 -40
- package/dist/jumpToPosition.module-4C47UYPE.module.css +0 -41
- package/dist/overflowMenu.module-QL32ISXF.module.css +0 -68
- package/dist/publicationGrid.module-T6ISNRGM.module.css +0 -70
- package/dist/reader-NGCQJKLX.css +0 -261
- package/dist/readerArrowButton.module-EFLOIADG.module.css +0 -77
- package/dist/readerHeader.module-RNGQFLVS.module.css +0 -35
- package/dist/readerLoader.module-KDBPCQZJ.module.css +0 -40
- package/dist/readerPagination.module-DYBZAQ7H.module.css +0 -76
- package/dist/readerProgression.module-7PU7L74S.module.css +0 -5
- package/dist/readerSharedUI.module-Y2VDWFS5.module.css +0 -98
- package/dist/settings.module-H5MUDFJO.module.css +0 -437
- package/dist/sheets.module-LJOLY4MK.module.css +0 -195
- package/dist/toc.module-F47C5CDS.module.css +0 -153
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Thorium Web is a web-based reader for EPUB and other digital publications, built using Next.js and modern web technologies. It is designed to provide a fast, responsive, and accessible reading experience.
|
|
4
4
|
|
|
5
|
+

|
|
6
|
+
|
|
5
7
|
## Features
|
|
6
8
|
|
|
7
9
|
- Supports EPUB
|
|
@@ -288,30 +288,6 @@ declare const StatefulSheetWrapper: ({ sheetType, sheetProps, children }: {
|
|
|
288
288
|
children: ReactNode;
|
|
289
289
|
}) => react_jsx_runtime.JSX.Element;
|
|
290
290
|
|
|
291
|
-
declare const StatefulLoader: ({ isLoading, children }: {
|
|
292
|
-
isLoading: boolean;
|
|
293
|
-
children: ReactNode;
|
|
294
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
295
|
-
|
|
296
|
-
declare const DefaultImage: ({ src, alt }: {
|
|
297
|
-
src: string;
|
|
298
|
-
alt?: string;
|
|
299
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
300
|
-
interface Publication {
|
|
301
|
-
title: string;
|
|
302
|
-
author: string;
|
|
303
|
-
cover: string;
|
|
304
|
-
url: string;
|
|
305
|
-
rendition?: string;
|
|
306
|
-
}
|
|
307
|
-
interface PublicationGridProps {
|
|
308
|
-
publications: Publication[];
|
|
309
|
-
columnWidth?: number;
|
|
310
|
-
gap?: string;
|
|
311
|
-
renderCover?: (publication: Publication) => React__default.ReactElement<React__default.ImgHTMLAttributes<HTMLImageElement>>;
|
|
312
|
-
}
|
|
313
|
-
declare const PublicationGrid: ({ publications, columnWidth, gap, renderCover, }: PublicationGridProps) => react_jsx_runtime.JSX.Element;
|
|
314
|
-
|
|
315
291
|
declare const StatefulPreferencesProvider: ({ children, initialPreferences }: {
|
|
316
292
|
children: ReactNode;
|
|
317
293
|
initialPreferences?: ThPreferences<DefaultKeys>;
|
|
@@ -384,4 +360,4 @@ interface StatefulReaderProps {
|
|
|
384
360
|
}
|
|
385
361
|
declare const StatefulReader: ({ rawManifest, selfHref, plugins }: StatefulReaderProps) => react_jsx_runtime.JSX.Element | null;
|
|
386
362
|
|
|
387
|
-
export { StatefulHyphens as $, StatefulDropdown as A, type StatefulNumberFieldProps as B, StatefulNumberField as C, type StatefulRadioGroupProps as D, StatefulRadioGroup as E, type StatefulSliderProps as F, StatefulSlider as G, type StatefulSwitchProps as H, StatefulSwitch as I, type useGridNavigationProps as J, useGridNavigation as K, useGridTemplate as L, type StatefulSettingsItemProps as M, StatefulLetterSpacing as N, StatefulLineHeight as O, StatefulParagraphIndent as P, StatefulParagraphSpacing as Q, StatefulSpacingGroup as R, type StatefulReaderProps as S, type ThPlugin as T, StatefulSpacingGroupContainer as U, StatefulSpacingPresets as V, StatefulWordSpacing as W, useLineHeight as X, useSpacingPresets as Y, StatefulFontFamily as Z, UnstableStatefulFontWeight as _, usePublication as a, StatefulTextAlign as a0, StatefulTextGroup as a1, StatefulTextGroupContainer as a2, StatefulTextNormalize as a3, StatefulPublisherStyles as a4, StatefulZoom as a5, type StatefulBottomSheetProps as a6, type ScrimPref as a7, StatefulBottomSheet as a8, type StatefulDockedSheetProps as a9, StatefulDockedSheet as aa, type StatefulFullScreenSheetProps as ab, StatefulFullScreenSheet as ac, type StatefulPopoverSheetProps as ad, StatefulPopoverSheet as ae, StatefulSheetWrapper as af, type StatefulSheet as ag,
|
|
363
|
+
export { StatefulHyphens as $, StatefulDropdown as A, type StatefulNumberFieldProps as B, StatefulNumberField as C, type StatefulRadioGroupProps as D, StatefulRadioGroup as E, type StatefulSliderProps as F, StatefulSlider as G, type StatefulSwitchProps as H, StatefulSwitch as I, type useGridNavigationProps as J, useGridNavigation as K, useGridTemplate as L, type StatefulSettingsItemProps as M, StatefulLetterSpacing as N, StatefulLineHeight as O, StatefulParagraphIndent as P, StatefulParagraphSpacing as Q, StatefulSpacingGroup as R, type StatefulReaderProps as S, type ThPlugin as T, StatefulSpacingGroupContainer as U, StatefulSpacingPresets as V, StatefulWordSpacing as W, useLineHeight as X, useSpacingPresets as Y, StatefulFontFamily as Z, UnstableStatefulFontWeight as _, usePublication as a, StatefulTextAlign as a0, StatefulTextGroup as a1, StatefulTextGroupContainer as a2, StatefulTextNormalize as a3, StatefulPublisherStyles as a4, StatefulZoom as a5, type StatefulBottomSheetProps as a6, type ScrimPref as a7, StatefulBottomSheet as a8, type StatefulDockedSheetProps as a9, StatefulDockedSheet as aa, type StatefulFullScreenSheetProps as ab, StatefulFullScreenSheet as ac, type StatefulPopoverSheetProps as ad, StatefulPopoverSheet as ae, StatefulSheetWrapper as af, type StatefulSheet as ag, StatefulPreferencesProvider as ah, type ReadiumCSSSettings as ai, type StatelessCache as aj, StatefulReader as ak, useReaderTransitions as b, type StatefulActionsMapObject as c, type StatefulActionTriggerProps as d, type StatefulActionContainerProps as e, StatefulFullscreenTrigger as f, StatefulJumpToPositionContainer as g, StatefulJumpToPositionTrigger as h, StatefulSettingsContainer as i, StatefulSettingsTrigger as j, StatefulTocContainer as k, StatefulTocTrigger as l, type StatefulActionIconProps as m, StatefulActionIcon as n, type StatefulOverflowMenuItemProps as o, StatefulOverflowMenuItem as p, type StatefulCollapsibleActionsBarProps as q, StatefulCollapsibleActionsBar as r, type StatefulOverflowMenuProps as s, StatefulOverflowMenu as t, useNavigator as u, useDocking as v, createDefaultPlugin as w, type StatefulGroupWrapperProps as x, StatefulGroupWrapper as y, type StatefulDropdownProps as z };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// src/core/Helpers/propsToCSSVars.ts
|
|
2
|
+
var propsToCSSVars = (props, { prefix, exclude = [] } = {}) => {
|
|
3
|
+
return Object.entries(props).reduce((acc, [key, value]) => {
|
|
4
|
+
if (exclude.includes(key)) {
|
|
5
|
+
return acc;
|
|
6
|
+
}
|
|
7
|
+
const cssVar = prefix ? `--${prefix}-${key}` : `--${key}`;
|
|
8
|
+
if (typeof value === "object" && value !== null) {
|
|
9
|
+
Object.assign(acc, propsToCSSVars(value, { prefix: prefix ? `${prefix}-${key}` : key }));
|
|
10
|
+
} else if (value != null) {
|
|
11
|
+
const cssValue = typeof value === "number" ? `${value}px` : value;
|
|
12
|
+
acc[cssVar] = cssValue;
|
|
13
|
+
}
|
|
14
|
+
return acc;
|
|
15
|
+
}, {});
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { propsToCSSVars };
|
|
19
|
+
//# sourceMappingURL=chunk-7CGMWOZN.mjs.map
|
|
20
|
+
//# sourceMappingURL=chunk-7CGMWOZN.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/Helpers/propsToCSSVars.ts"],"names":[],"mappings":";AAcO,IAAM,cAAA,GAAiB,CAAC,KAAA,EAA8B,EAAE,MAAA,EAAQ,UAAU,EAAC,EAAE,GAA2B,EAAC,KAAM;AACpH,EAAA,OAAO,MAAA,CAAO,OAAA,CAAQ,KAAK,CAAA,CAClB,MAAA,CAAO,CAAC,GAAA,EAA6B,CAAC,GAAA,EAAK,KAAK,CAAA,KAAM;AACrD,IAAA,IAAI,OAAA,CAAQ,QAAA,CAAS,GAAG,CAAA,EAAG;AACzB,MAAA,OAAO,GAAA;AAAA,IACT;AACA,IAAA,MAAM,MAAA,GAAS,SAAS,CAAA,EAAA,EAAK,MAAM,IAAI,GAAG,CAAA,CAAA,GAAK,KAAK,GAAG,CAAA,CAAA;AACvD,IAAA,IAAI,OAAO,KAAA,KAAU,QAAA,IAAY,KAAA,KAAU,IAAA,EAAM;AAE/C,MAAA,MAAA,CAAO,MAAA,CAAO,GAAA,EAAK,cAAA,CAAe,KAAA,EAAO,EAAE,MAAA,EAAQ,MAAA,GAAS,CAAA,EAAG,MAAM,CAAA,CAAA,EAAI,GAAG,CAAA,CAAA,GAAK,GAAA,EAAK,CAAC,CAAA;AAAA,IACzF,CAAA,MAAA,IAAW,SAAS,IAAA,EAAM;AACxB,MAAA,MAAM,WAAW,OAAO,KAAA,KAAU,QAAA,GAAW,CAAA,EAAG,KAAK,CAAA,EAAA,CAAA,GAAO,KAAA;AAC5D,MAAA,GAAA,CAAI,MAAM,CAAA,GAAI,QAAA;AAAA,IAChB;AACA,IAAA,OAAO,GAAA;AAAA,EACT,CAAA,EAAG,EAAE,CAAA;AACf","file":"chunk-7CGMWOZN.mjs","sourcesContent":["\"use client\";\n\ninterface PropsToCSSVarsOptions {\n prefix?: string;\n exclude?: string[];\n}\n\n/** \n * Converts Object properties to CSS custom properties, recursively.\n * @param props - The object containing CSS property values\n * @param options - Configuration options\n * @param options.prefix - Optional prefix for CSS variable names (applies to all levels)\n * @param options.exclude - Array of property names to exclude\n */\nexport const propsToCSSVars = (props: { [x: string]: any; }, { prefix, exclude = [] }: PropsToCSSVarsOptions = {}) => {\n return Object.entries(props)\n .reduce((acc: { [key: string]: any }, [key, value]) => {\n if (exclude.includes(key)) {\n return acc;\n }\n const cssVar = prefix ? `--${prefix}-${key}` : `--${key}`;\n if (typeof value === \"object\" && value !== null) {\n // Keep the same prefix for nested objects\n Object.assign(acc, propsToCSSVars(value, { prefix: prefix ? `${prefix}-${key}` : key }));\n } else if (value != null) {\n const cssValue = typeof value === \"number\" ? `${value}px` : value;\n acc[cssVar] = cssValue;\n } \n return acc;\n }, {});\n}"]}
|