@edrlab/thorium-web 1.3.0 → 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.
Files changed (59) hide show
  1. package/dist/{actionsReducer-BhG1wicI.d.mts → actionsReducer-XWTGGNUd.d.mts} +10 -3
  2. package/dist/{chunk-OWHP7ONM.mjs → chunk-2ORXUOH3.mjs} +4 -4
  3. package/dist/{chunk-OWHP7ONM.mjs.map → chunk-2ORXUOH3.mjs.map} +1 -1
  4. package/dist/{chunk-UCTMVCW7.mjs → chunk-6BUN7DEA.mjs} +35 -14
  5. package/dist/chunk-6BUN7DEA.mjs.map +1 -0
  6. package/dist/{chunk-IYAFKTPL.mjs → chunk-6EHFW43Y.mjs} +5 -4
  7. package/dist/chunk-6EHFW43Y.mjs.map +1 -0
  8. package/dist/{chunk-XBZWGRDM.mjs → chunk-A3FZBEUL.mjs} +2 -2
  9. package/dist/{chunk-XBZWGRDM.mjs.map → chunk-A3FZBEUL.mjs.map} +1 -1
  10. package/dist/{chunk-4ODYHZKD.mjs → chunk-DETZMFZ7.mjs} +27 -27
  11. package/dist/chunk-DETZMFZ7.mjs.map +1 -0
  12. package/dist/{chunk-4TVEDX7L.mjs → chunk-DMZFSOHK.mjs} +14 -13
  13. package/dist/chunk-DMZFSOHK.mjs.map +1 -0
  14. package/dist/{chunk-C236BQQB.mjs → chunk-DTPO3J2C.mjs} +10 -3
  15. package/dist/chunk-DTPO3J2C.mjs.map +1 -0
  16. package/dist/{chunk-YZ3KCMKY.mjs → chunk-EZG6SBSO.mjs} +145 -35
  17. package/dist/chunk-EZG6SBSO.mjs.map +1 -0
  18. package/dist/{chunk-WECWPYZB.mjs → chunk-GPWW5OML.mjs} +20 -15
  19. package/dist/chunk-GPWW5OML.mjs.map +1 -0
  20. package/dist/{chunk-RRVLWDT3.mjs → chunk-I4BKU5NN.mjs} +12 -11
  21. package/dist/chunk-I4BKU5NN.mjs.map +1 -0
  22. package/dist/{chunk-D7MFLHXV.mjs → chunk-LP3JFZ4A.mjs} +311 -188
  23. package/dist/chunk-LP3JFZ4A.mjs.map +1 -0
  24. package/dist/{chunk-3LDWKC5N.mjs → chunk-NKO3K3QS.mjs} +4 -4
  25. package/dist/{chunk-3LDWKC5N.mjs.map → chunk-NKO3K3QS.mjs.map} +1 -1
  26. package/dist/{chunk-T2E6MRVP.mjs → chunk-SAUOY37Q.mjs} +9 -9
  27. package/dist/{chunk-T2E6MRVP.mjs.map → chunk-SAUOY37Q.mjs.map} +1 -1
  28. package/dist/components/Audio/index.d.mts +3 -3
  29. package/dist/components/Audio/index.mjs +15 -15
  30. package/dist/components/Epub/index.d.mts +3 -3
  31. package/dist/components/Epub/index.mjs +16 -16
  32. package/dist/components/Misc/index.css +2 -2
  33. package/dist/components/Misc/index.css.map +1 -1
  34. package/dist/components/Misc/index.mjs +4 -4
  35. package/dist/components/Reader/index.css +2 -2
  36. package/dist/components/Reader/index.css.map +1 -1
  37. package/dist/components/Reader/index.d.mts +2 -2
  38. package/dist/components/Reader/index.mjs +24 -24
  39. package/dist/components/Reader/index.mjs.map +1 -1
  40. package/dist/components/WebPub/index.d.mts +3 -3
  41. package/dist/components/WebPub/index.mjs +16 -16
  42. package/dist/core/Components/index.d.mts +1 -1
  43. package/dist/core/Components/index.mjs +1 -1
  44. package/dist/core/Hooks/index.mjs +1 -1
  45. package/dist/i18n/index.mjs +5 -5
  46. package/dist/lib/index.d.mts +2 -2
  47. package/dist/lib/index.mjs +1 -1
  48. package/dist/preferences/index.mjs +5 -5
  49. package/dist/{useReaderTransitions-JDzlBFsu.d.mts → useReaderTransitions-IBGdE7qi.d.mts} +1 -1
  50. package/package.json +3 -3
  51. package/dist/chunk-4ODYHZKD.mjs.map +0 -1
  52. package/dist/chunk-4TVEDX7L.mjs.map +0 -1
  53. package/dist/chunk-C236BQQB.mjs.map +0 -1
  54. package/dist/chunk-D7MFLHXV.mjs.map +0 -1
  55. package/dist/chunk-IYAFKTPL.mjs.map +0 -1
  56. package/dist/chunk-RRVLWDT3.mjs.map +0 -1
  57. package/dist/chunk-UCTMVCW7.mjs.map +0 -1
  58. package/dist/chunk-WECWPYZB.mjs.map +0 -1
  59. package/dist/chunk-YZ3KCMKY.mjs.map +0 -1
@@ -31,12 +31,14 @@ interface ActionStateOpenPayload {
31
31
  payload: {
32
32
  key: ActionsStateKeys;
33
33
  isOpen: boolean;
34
+ profile: string;
34
35
  };
35
36
  }
36
37
  interface ActionStateTogglePayload {
37
38
  type: string;
38
39
  payload: {
39
40
  key: ActionsStateKeys;
41
+ profile: string;
40
42
  };
41
43
  }
42
44
  interface ActionOverflowOpenPayload {
@@ -78,10 +80,13 @@ interface DockState {
78
80
  [ThDockingKeys.end]: DockStateObject;
79
81
  };
80
82
  }
81
- type ActionsReducerState = {
82
- keys: {
83
+ interface ActionKeysState {
84
+ [profile: string]: {
83
85
  [key in ActionsStateKeys]?: ActionStateObject;
84
86
  };
87
+ }
88
+ type ActionsReducerState = {
89
+ keys: ActionKeysState;
85
90
  dock: DockState;
86
91
  overflow: {
87
92
  [key in OverflowStateKeys]?: OverflowStateObject;
@@ -106,9 +111,11 @@ declare const dockAction: _reduxjs_toolkit.ActionCreatorWithPayload<{
106
111
  declare const setActionOpen: _reduxjs_toolkit.ActionCreatorWithPayload<{
107
112
  key: ActionsStateKeys;
108
113
  isOpen: boolean;
114
+ profile: string;
109
115
  }, "actions/setActionOpen">;
110
116
  declare const toggleActionOpen: _reduxjs_toolkit.ActionCreatorWithPayload<{
111
117
  key: ActionsStateKeys;
118
+ profile: string;
112
119
  }, "actions/toggleActionOpen">;
113
120
  declare const setOverflow: _reduxjs_toolkit.ActionCreatorWithPayload<{
114
121
  key: OverflowStateKeys;
@@ -136,4 +143,4 @@ declare const setDockPanelWidth: _reduxjs_toolkit.ActionCreatorWithPayload<{
136
143
  profile: string;
137
144
  }, "actions/setDockPanelWidth">;
138
145
 
139
- 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 ActionsReducerState as l, actionsSlice as m, dockAction as n, setOverflow as o, activateDockPanel as p, deactivateDockPanel as q, collapseDockPanel as r, setActionOpen as s, toggleActionOpen as t, expandDockPanel as u, setDockPanelWidth as v };
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 };
@@ -1,5 +1,5 @@
1
- import { ThGrid, ThLoader } from './chunk-4ODYHZKD.mjs';
2
- import { useI18n } from './chunk-IYAFKTPL.mjs';
1
+ import { useI18n } from './chunk-6EHFW43Y.mjs';
2
+ import { ThGrid, ThLoader } from './chunk-DETZMFZ7.mjs';
3
3
  import { isValidElement, cloneElement } from 'react';
4
4
  import { Link } from 'react-aria-components';
5
5
  import classNames from 'classnames';
@@ -130,5 +130,5 @@ var ErrorDisplay = ({
130
130
  };
131
131
 
132
132
  export { DefaultImage, ErrorDisplay, PublicationGrid, StatefulLoader };
133
- //# sourceMappingURL=chunk-OWHP7ONM.mjs.map
134
- //# sourceMappingURL=chunk-OWHP7ONM.mjs.map
133
+ //# sourceMappingURL=chunk-2ORXUOH3.mjs.map
134
+ //# sourceMappingURL=chunk-2ORXUOH3.mjs.map
@@ -1 +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":";;;;;;;;AAAA,IAAA,mCAAA,GAAA;AAAA,EAAC,OAAA,EAAAA,qCAAAA;AAAA,EAWA,IAAA,EAAAC,kCAAAA;AAAA,EAgBA,KAAA,EAAAC,mCAAAA;AAAA,EAQA,KAAA,EAAAC,mCAAAA;AAAA,EAMA,IAAA,EAAAC,kCAAAA;AAAA,EAOA,KAAA,EAAAC,mCAAAA;AAAA,EAOA,MAAA,EAAAC,oCAAAA;AAAA,EAMA,SAAA,EAAAC;AAAA,CAAA;AClDM,IAAM,eAAe,CAAC;AAAA,EAC3B,GAAA;AAAA,EACA,GAAA,GAAM;AACR,CAAA,qBAIE,GAAA;AAAA,EAAC,KAAA;AAAA,EAAA;AAAA,IACC,GAAA;AAAA,IACA,GAAA;AAAA,IACA,WAAY,mCAAA,CAAsB,KAAA;AAAA,IAClC,OAAA,EAAQ;AAAA;AACV;AAkBK,IAAM,kBAAkB,CAAC;AAAA,EAC9B,YAAA;AAAA,EACA,WAAA,GAAc,GAAA;AAAA,EACd,GAAA,GAAM,QAAA;AAAA,EACN,WAAA,GAAc,CAAC,WAAA,qBACb,GAAA;AAAA,IAAC,YAAA;AAAA,IAAA;AAAA,MACC,KAAM,WAAA,CAAY,KAAA;AAAA,MAClB,GAAA,EAAI;AAAA;AAAA;AAGV,CAAA,KAA4B;AAC1B,EAAA,MAAM,oBAAA,GAAuB,CAAC,WAAA,KAA6B;AACzD,IAAA,MAAM,KAAA,GAAQ,YAAY,WAAW,CAAA;AAErC,IAAA,IAAI,CAAC,cAAA,CAA0D,KAAK,CAAA,EA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I,KAAA,CAAM,aAAA,EAAc,EAAG,OAAO,EAAE,+BAA+B,CAAA;AACnE,IAAA,OAAO,EAAE,2BAA2B,CAAA;AAAA,EACtC,CAAA;AAEA,EAAA,uBACEC,IAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAY,0BAAY,OAAA,EAC3B,QAAA,EAAA;AAAA,oBAAAF,GAAAA,CAAC,QAAG,SAAA,EAAY,yBAAA,CAAY,OAAU,QAAA,EAAA,KAAA,IAAS,CAAA,CAAE,yBAAyB,CAAA,EAAG,CAAA;AAAA,oBAC7EA,GAAAA,CAAC,GAAA,EAAA,EAAE,WAAY,yBAAA,CAAY,OAAA,EAAY,0BAAe,EAAG,CAAA;AAAA,IACvD;AAAA,GAAA,EACJ,CAAA;AAEJ","file":"chunk-OWHP7ONM.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);\n background-color: var(--th-theme-background);\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"]}
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":";;;;;;;;AAAA,IAAA,mCAAA,GAAA;AAAA,EAAC,OAAA,EAAAA,qCAAAA;AAAA,EAWA,IAAA,EAAAC,kCAAAA;AAAA,EAgBA,KAAA,EAAAC,mCAAAA;AAAA,EAQA,KAAA,EAAAC,mCAAAA;AAAA,EAMA,IAAA,EAAAC,kCAAAA;AAAA,EAOA,KAAA,EAAAC,mCAAAA;AAAA,EAOA,MAAA,EAAAC,oCAAAA;AAAA,EAMA,SAAA,EAAAC;AAAA,CAAA;AClDM,IAAM,eAAe,CAAC;AAAA,EAC3B,GAAA;AAAA,EACA,GAAA,GAAM;AACR,CAAA,qBAIE,GAAA;AAAA,EAAC,KAAA;AAAA,EAAA;AAAA,IACC,GAAA;AAAA,IACA,GAAA;AAAA,IACA,WAAY,mCAAA,CAAsB,KAAA;AAAA,IAClC,OAAA,EA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KAAA;AAAA,EACA;AACF,CAAA,KAAyB;AACvB,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,OAAA,EAAQ;AAEtB,EAAA,MAAM,iBAAiB,MAAM;AAC3B,IAAA,IAAI,KAAA,CAAM,UAAA,EAAW,EAAG,OAAO,EAAE,4BAA4B,CAAA;AAC7D,IAAA,IAAI,KAAA,CAAM,cAAA,EAAe,EAAG,OAAO,EAAE,gCAAgC,CAAA;AACrE,IAAA,IAAI,KAAA,CAAM,SAAA,EAAU,EAAG,OAAO,EAAE,2BAA2B,CAAA;AAC3D,IAAA,IAAI,KAAA,CAAM,aAAA,EAAc,EAAG,OAAO,EAAE,+BAA+B,CAAA;AACnE,IAAA,IAAI,KAAA,CAAM,aAAA,EAAc,EAAG,OAAO,EAAE,+BAA+B,CAAA;AACnE,IAAA,OAAO,EAAE,2BAA2B,CAAA;AAAA,EACtC,CAAA;AAEA,EAAA,uBACEC,IAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAY,0BAAY,OAAA,EAC3B,QAAA,EAAA;AAAA,oBAAAF,GAAAA,CAAC,QAAG,SAAA,EAAY,yBAAA,CAAY,OAAU,QAAA,EAAA,KAAA,IAAS,CAAA,CAAE,yBAAyB,CAAA,EAAG,CAAA;AAAA,oBAC7EA,GAAAA,CAAC,GAAA,EAAA,EAAE,WAAY,yBAAA,CAAY,OAAA,EAAY,0BAAe,EAAG,CAAA;AAAA,IACvD;AAAA,GAAA,EACJ,CAAA;AAEJ","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"]}
@@ -1,12 +1,12 @@
1
- import { useReaderHeaderBase, thorium_web_reader_app_default, StatefulBackLink, thorium_web_reader_header_default, StatefulCollapsibleActionsBar, thorium_web_overflow_default, useNavigator } from './chunk-D7MFLHXV.mjs';
1
+ import { useReaderHeaderBase, thorium_web_reader_app_default, StatefulBackLink, thorium_web_reader_header_default, StatefulCollapsibleActionsBar, thorium_web_overflow_default, useNavigator } from './chunk-LP3JFZ4A.mjs';
2
+ import { useAppSelector, useAppDispatch, setHovering } from './chunk-EZG6SBSO.mjs';
3
+ import { usePreferences } from './chunk-GPWW5OML.mjs';
4
+ import { useI18n } from './chunk-6EHFW43Y.mjs';
5
+ import { ThInteractiveOverlay, ThHeader, ThFooter, ThRunningHead, ThPagination } from './chunk-DETZMFZ7.mjs';
2
6
  import { isInteractiveElement, makeBreakpointsMap, getBestMatchingProgressionFormat } from './chunk-ITDBOMY5.mjs';
3
- import { useAppSelector, useAppDispatch, setHovering } from './chunk-YZ3KCMKY.mjs';
4
- import { usePreferences } from './chunk-WECWPYZB.mjs';
5
7
  import { ThRunningHeadFormat, ThProgressionFormat } from './chunk-L4XGZAZ5.mjs';
6
8
  import { getPlatform, buildShortcut } from './chunk-5LUMM7FW.mjs';
7
- import { ThInteractiveOverlay, ThHeader, ThFooter, ThRunningHead, ThPagination } from './chunk-4ODYHZKD.mjs';
8
- import { useI18n } from './chunk-IYAFKTPL.mjs';
9
- import { useRef, useCallback, useEffect, useMemo, useState } from 'react';
9
+ import { useRef, useCallback, useEffect, useMemo } from 'react';
10
10
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
11
11
  import classNames from 'classnames';
12
12
  import { useFocusWithin } from 'react-aria';
@@ -161,7 +161,29 @@ var StatefulReaderProgression = ({
161
161
  const isFullscreen = useAppSelector((state) => state.reader.isFullscreen);
162
162
  const isHovering = useAppSelector((state) => state.reader.isHovering);
163
163
  const breakpoint = useAppSelector((state) => state.theming.breakpoint);
164
- const [displayText, setDisplayText] = useState("");
164
+ useMemo(() => {
165
+ if (!unstableTimeline?.progression) return "";
166
+ const {
167
+ currentPositions = [],
168
+ totalPositions,
169
+ relativeProgression,
170
+ totalProgression,
171
+ currentChapter,
172
+ positionsLeft,
173
+ totalItems,
174
+ currentIndex
175
+ } = unstableTimeline.progression;
176
+ return JSON.stringify({
177
+ currentPositions,
178
+ totalPositions,
179
+ relativeProgression,
180
+ totalProgression,
181
+ currentChapter,
182
+ positionsLeft,
183
+ totalItems,
184
+ currentIndex
185
+ });
186
+ }, [unstableTimeline?.progression]);
165
187
  const fallbackFormat = useMemo(() => {
166
188
  return {
167
189
  variants: fallbackVariant,
@@ -195,10 +217,9 @@ var StatefulReaderProgression = ({
195
217
  }
196
218
  return variants;
197
219
  }, [variants, unstableTimeline?.progression, fallbackFormat, isImmersive, isHovering, isFullscreen, displayInImmersive, displayInFullscreen]);
198
- useEffect(() => {
220
+ const displayText = useMemo(() => {
199
221
  if (displayFormat === "none" /* none */ || !unstableTimeline?.progression) {
200
- setDisplayText("");
201
- return;
222
+ return "";
202
223
  }
203
224
  const {
204
225
  currentPositions = [],
@@ -278,8 +299,8 @@ var StatefulReaderProgression = ({
278
299
  }
279
300
  break;
280
301
  }
281
- setDisplayText(text);
282
- }, [displayFormat, unstableTimeline?.progression, t]);
302
+ return text;
303
+ }, [displayFormat, unstableTimeline, t]);
283
304
  if (!displayText || displayFormat === "none" /* none */) {
284
305
  return null;
285
306
  }
@@ -829,5 +850,5 @@ function getReaderClassNames(options) {
829
850
  }
830
851
 
831
852
  export { Peripherals, StatefulReaderFooter, StatefulReaderHeader, getReaderClassNames, useFonts };
832
- //# sourceMappingURL=chunk-UCTMVCW7.mjs.map
833
- //# sourceMappingURL=chunk-UCTMVCW7.mjs.map
853
+ //# sourceMappingURL=chunk-6BUN7DEA.mjs.map
854
+ //# sourceMappingURL=chunk-6BUN7DEA.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/StatefulReaderRunningHead.tsx","../src/components/StatefulReaderHeader.tsx","../src/components/assets/styles/thorium-web.reader.pagination.module.css","../src/components/assets/styles/thorium-web.reader.progression.module.css","../src/core/Components/Reader/ThProgression.tsx","../src/components/StatefulReaderProgression.tsx","../src/components/StatefulReaderPagination.tsx","../src/components/StatefulReaderFooter.tsx","../src/core/Hooks/fonts/androidPatchCss.ts","../src/core/Hooks/fonts/useFonts.ts","../src/helpers/peripherals.ts","../src/components/Helpers/getReaderClassNames.ts"],"names":["Fragment","jsx","wrapper","listItem","previousButton","progression","nextButton","label","useMemo","class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AA,OAAOH,UAAAA;AAAA,IACL,8BAAA,CAAa,KAAA;AAAA,IACb,WAAW,sBAAA,GAAyB,qBAAA;AAAA,IACpC,WAAA,IAAe,yBAAA;AAAA,IACf,UAAA,IAAc,wBAAA;AAAA,IACd,QAAQ,mBAAA,GAAsB,sBAAA;AAAA,IAC9B,eAAe,QAAQ,CAAA;AAAA,IACvB,UAAA,GAAa,CAAA,cAAA,EAAkB,UAAA,CAAW,MAAA,CAAO,CAAC,CAAA,CAAE,WAAA,EAAY,GAAI,UAAA,CAAW,KAAA,CAAM,CAAC,CAAE,CAAA,CAAA,GAAK;AAAA,GAC/F;AACF","file":"chunk-6BUN7DEA.mjs","sourcesContent":["\"use client\";\n\nimport { useMemo } from \"react\";\n\nimport { ThRunningHeadFormat } from \"@/preferences/models\";\nimport { ThFormatPref, ThFormatPrefValue } from \"@/preferences\";\n\nimport { ThRunningHead } from \"@/core/Components\";\n\nimport { useI18n } from \"@/i18n/useI18n\";\n\nimport { useAppSelector } from \"@/lib/hooks\";\nimport { makeBreakpointsMap } from \"@/core/Helpers/breakpointsMap\";\n\nexport const StatefulReaderRunningHead = ({ \n formatPref\n}: {\n formatPref?: ThFormatPref<ThRunningHeadFormat>;\n}) => {\n const { t } = useI18n();\n \n const unstableTimeline = useAppSelector(state => state.publication.unstableTimeline);\n const isImmersive = useAppSelector(state => state.reader.isImmersive);\n const isHovering = useAppSelector(state => state.reader.isHovering);\n const isFullscreen = useAppSelector(state => state.reader.isFullscreen);\n const breakpoint = useAppSelector(state => state.theming.breakpoint);\n\n // Get the fallback format based on isFXL\n const fallbackFormat = useMemo<ThFormatPrefValue<ThRunningHeadFormat>>(() => ({\n variants: ThRunningHeadFormat.title,\n displayInImmersive: true,\n displayInFullscreen: true\n }), []);\n\n const breakpointsMap = useMemo(() => {\n return makeBreakpointsMap<ThFormatPrefValue<ThRunningHeadFormat>>({\n defaultValue: formatPref?.default || fallbackFormat,\n fromEnum: ThRunningHeadFormat,\n pref: formatPref?.breakpoints,\n validateKey: \"variants\"\n });\n }, [formatPref, fallbackFormat]);\n \n // Get current preferences with proper fallback\n const currentPrefs = useMemo(() => {\n if (!breakpoint) return formatPref?.default || fallbackFormat;\n return breakpointsMap[breakpoint] || formatPref?.default || fallbackFormat;\n }, [breakpoint, breakpointsMap, formatPref?.default, fallbackFormat]);\n\n const { variants, displayInImmersive, displayInFullscreen } = currentPrefs;\n\n const displayFormat = useMemo(() => {\n if (!variants) return ThRunningHeadFormat.title;\n \n // Check if we should hide in immersive mode\n if (isImmersive && displayInImmersive === false && !isHovering) {\n return ThRunningHeadFormat.none;\n }\n \n // Check if we should hide in fullscreen mode\n if (isImmersive && isFullscreen && displayInFullscreen === false && !isHovering) {\n return ThRunningHeadFormat.none;\n }\n \n return variants;\n }, [variants, isImmersive, displayInImmersive, isHovering, isFullscreen, displayInFullscreen]);\n\n const runningHead = useMemo(() => {\n if (displayFormat === ThRunningHeadFormat.title) {\n return unstableTimeline?.title || \"\";\n } else if (displayFormat === ThRunningHeadFormat.chapter) {\n return unstableTimeline?.progression?.currentChapter || unstableTimeline?.title || \"\";\n }\n return \"\";\n }, [displayFormat, unstableTimeline]);\n\n if (!runningHead || displayFormat === ThRunningHeadFormat.none) return null;\n \n return (\n <>\n <ThRunningHead \n label={ runningHead } \n aria-label={ t(\"reader.app.header.runningHead\") }\n />\n </>\n );\n}","\"use client\";\n\nimport React from \"react\";\n\nimport { ActionKeyType } from \"@/preferences\";\nimport { ThLayoutUI, ThRunningHeadFormat } from \"@/preferences/models\";\nimport { ThFormatPref } from \"@/preferences\";\n\nimport readerStyles from \"./assets/styles/thorium-web.reader.app.module.css\";\nimport readerHeaderStyles from \"./assets/styles/thorium-web.reader.header.module.css\";\nimport overflowMenuStyles from \"./Actions/assets/styles/thorium-web.overflow.module.css\";\n\nimport { ThHeader } from \"@/core/Components/Reader/ThHeader\";\nimport { StatefulBackLink } from \"./StatefulBackLink\";\nimport { StatefulReaderRunningHead } from \"./StatefulReaderRunningHead\";\nimport { ThInteractiveOverlay } from \"../core/Components/Reader/ThInteractiveOverlay\";\nimport { StatefulCollapsibleActionsBar } from \"./Actions/StatefulCollapsibleActionsBar\";\n\nimport { useReaderHeaderBase } from \"./hooks/useReaderHeaderBase\";\nimport { usePreferences } from \"@/preferences/hooks\";\n\nimport classNames from \"classnames\";\n\nexport const StatefulReaderHeader = ({\n actionKeys,\n actionsOrder,\n layout,\n runningHeadFormatPref\n}: {\n actionKeys: ActionKeyType[];\n actionsOrder: ActionKeyType[];\n layout: ThLayoutUI;\n runningHeadFormatPref?: ThFormatPref<ThRunningHeadFormat>;\n}) => {\n const {\n headerRef, focusWithinProps, setHover, removeHover,\n listActionItems, isImmersive, isHovering, isScroll, t,\n } = useReaderHeaderBase(actionKeys);\n\n const { preferences } = usePreferences();\n\n return (\n <>\n <ThInteractiveOverlay\n className={ classNames(readerStyles.barOverlay, readerStyles.headerOverlay) }\n isActive={ layout === ThLayoutUI.layered && isImmersive && !isHovering }\n onMouseEnter={ setHover }\n onMouseLeave={ removeHover }\n />\n\n <ThHeader\n ref={ headerRef }\n className={ classNames(readerStyles.topBar, readerHeaderStyles.header) }\n aria-label={ t(\"reader.app.header.label\") }\n onMouseEnter={ setHover }\n onMouseLeave={ removeHover }\n { ...focusWithinProps }\n >\n { preferences.theming.header?.backLink && <StatefulBackLink className={ readerHeaderStyles.backlinkWrapper } /> }\n\n <StatefulReaderRunningHead formatPref={ runningHeadFormatPref } />\n\n <StatefulCollapsibleActionsBar\n id=\"reader-header-overflowMenu\"\n items={ listActionItems() }\n prefs={{ ...preferences.actions, displayOrder: actionsOrder }}\n className={ readerHeaderStyles.actionsWrapper }\n aria-label={ t(\"reader.app.header.actions\") }\n overflowMenuClassName={\n (!isScroll || preferences.affordances.scroll.hintInImmersive)\n ? overflowMenuStyles.hint\n : undefined\n }\n />\n </ThHeader>\n </>\n );\n};\n",".wrapper {\n box-sizing: border-box;\n display: grid;\n gap: calc(var(--th-layout-spacing) / 2);\n grid-template-areas: \"pagination-start pagination-center pagination-end\";\n grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);\n background-color: var(--th-theme-background);\n color: var(--th-theme-text);\n align-items: center;\n width: 100%;\n max-width: var(--th-layout-constraints-pagination, 100%);\n}\n\n.listItem {\n box-sizing: border-box;\n list-style: none;\n}\n\n.listItem:has(.previousButton) {\n grid-area: pagination-start;\n justify-self: start;\n}\n\n.listItem:has(.progression) {\n grid-area: pagination-center;\n justify-self: center;\n}\n\n.listItem:has(.nextButton) {\n grid-area: pagination-end;\n justify-self: end;\n}\n\n.listItem button {\n box-sizing: border-box;\n padding: calc(var(--th-icon-size, 24px) * (1/4)) calc(var(--th-layout-spacing) / 2);\n gap: calc(var(--th-layout-spacing) / 2);\n max-height: calc(var(--th-icon-size, 24px) * 2);\n max-width: 100%;\n border-radius: var(--th-layout-radius);\n display: flex;\n align-items: center;\n}\n\n.nextButton {\n margin-inline-start: auto;\n text-align: end;\n}\n\n.listItem button[data-hovered] {\n background-color: var(--th-theme-hover);\n color: var(--th-theme-onHover);\n}\n\n.listItem button[data-focus-visible] {\n outline: 2px solid var(--th-theme-focus);\n}\n\n.listItem button[data-disabled] {\n color: var(--th-theme-disable);\n}\n\n.listItem button .label {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n overflow: hidden;\n white-space: normal;\n -webkit-line-clamp: 1;\n line-clamp: 1;\n}\n\n.listItem button svg {\n flex: none;\n width: var(--th-icon-size, 24px);\n height: var(--th-icon-size, 24px);\n fill: currentColor;\n}",".wrapper {\n color: var(--th-theme-text);\n font-variant-numeric: lining-nums tabular-nums;\n text-align: center;\n}","\"use client\";\n\nimport React from \"react\";\n\nexport interface ThProgressionProps extends React.HTMLAttributes<HTMLDivElement> {\n ref?: React.RefObject<HTMLDivElement>\n}\n\nexport const ThProgression = ({ \n ref,\n children, \n ...props\n}: ThProgressionProps) => {\n return (\n <>\n <div \n ref={ ref } \n {...props }\n >\n { children }\n </div>\n </>\n )\n}","\"use client\";\n\nimport React, { useEffect, useState, useMemo, useRef } from \"react\";\n\nimport progressionStyles from \"./assets/styles/thorium-web.reader.progression.module.css\";\n\nimport { ThProgressionFormat } from \"@/preferences/models\";\nimport { ThFormatPref, ThFormatPrefValue } from \"@/preferences\";\n\nimport { ThProgression } from \"@/core/Components/Reader/ThProgression\";\n\nimport { useI18n } from \"@/i18n/useI18n\";\n\nimport { useAppSelector } from \"@/lib/hooks\";\n\nimport { makeBreakpointsMap } from \"@/core/Helpers/breakpointsMap\";\nimport { getBestMatchingProgressionFormat } from \"@/core/Helpers/progressionFormat\";\n\nimport classNames from \"classnames\";\n\nexport const StatefulReaderProgression = ({ \n className,\n formatPref,\n fallbackVariant\n}: { \n className?: string,\n formatPref?: ThFormatPref<ThProgressionFormat | ThProgressionFormat[]>,\n fallbackVariant: ThProgressionFormat | Array<ThProgressionFormat>\n}) => {\n const { t } = useI18n();\n \n const unstableTimeline = useAppSelector(state => state.publication.unstableTimeline);\n const isImmersive = useAppSelector(state => state.reader.isImmersive);\n const isFullscreen = useAppSelector(state => state.reader.isFullscreen);\n const isHovering = useAppSelector(state => state.reader.isHovering);\n const breakpoint = useAppSelector(state => state.theming.breakpoint);\n\n \n // Create a stable string representation of progression data to prevent infinite loops\n const progressionKey = useMemo(() => {\n if (!unstableTimeline?.progression) return \"\";\n const { \n currentPositions = [],\n totalPositions,\n relativeProgression,\n totalProgression,\n currentChapter,\n positionsLeft,\n totalItems,\n currentIndex\n } = unstableTimeline.progression;\n return JSON.stringify({\n currentPositions,\n totalPositions,\n relativeProgression,\n totalProgression,\n currentChapter,\n positionsLeft,\n totalItems,\n currentIndex\n });\n }, [unstableTimeline?.progression]);\n \n const fallbackFormat = useMemo(() => {\n return {\n variants: fallbackVariant,\n displayInImmersive: true,\n displayInFullscreen: true\n };\n }, [fallbackVariant]);\n \n const breakpointsMap = useMemo(() => {\n return makeBreakpointsMap<ThFormatPrefValue<ThProgressionFormat | ThProgressionFormat[]>>({\n defaultValue: formatPref?.default || fallbackFormat,\n fromEnum: ThProgressionFormat,\n pref: formatPref?.breakpoints,\n validateKey: \"variants\"\n });\n }, [formatPref, fallbackFormat]);\n \n // Get current preferences with proper fallback\n const currentPrefs = useMemo(() => {\n if (!breakpoint) return formatPref?.default || fallbackFormat;\n return breakpointsMap[breakpoint] || formatPref?.default || fallbackFormat;\n }, [breakpoint, breakpointsMap, formatPref?.default, fallbackFormat]);\n\n const { variants, displayInImmersive, displayInFullscreen } = currentPrefs;\n \n // Get the display format, handling both single format and array of formats\n const displayFormat = useMemo(() => {\n if (!variants) return fallbackFormat.variants;\n \n // Check if we should hide in immersive mode\n if (isImmersive && displayInImmersive === false && !isHovering) {\n return ThProgressionFormat.none;\n }\n \n // Check if we should hide in fullscreen mode\n if (isImmersive && isFullscreen && displayInFullscreen === false && !isHovering) {\n return ThProgressionFormat.none;\n }\n \n if (Array.isArray(variants)) {\n return getBestMatchingProgressionFormat(variants, unstableTimeline?.progression) || \n fallbackFormat.variants;\n }\n \n return variants;\n }, [variants, unstableTimeline?.progression, fallbackFormat, isImmersive, isHovering, isFullscreen, displayInImmersive, displayInFullscreen]);\n\n // Compute display text based on current position and timeline\n const displayText = useMemo(() => {\n if (displayFormat === ThProgressionFormat.none || !unstableTimeline?.progression) {\n return \"\";\n }\n\n const { \n currentPositions = [],\n totalPositions,\n relativeProgression,\n totalProgression,\n currentChapter,\n positionsLeft,\n totalItems,\n currentIndex\n } = unstableTimeline.progression;\n \n let text = \"\";\n \n // Format positions for display (handle array of two positions with a dash)\n const formatPositions = (positions: number[]) => {\n if (positions.length === 2) {\n return positions.join(\"–\");\n }\n return positions[0]?.toString() || \"\";\n };\n \n switch (displayFormat) {\n case ThProgressionFormat.positions:\n if (currentPositions.length > 0) {\n text = formatPositions(currentPositions);\n }\n break;\n \n case ThProgressionFormat.positionsOfTotal:\n if (currentPositions.length > 0 && totalPositions) {\n text = t(\"reader.progression.xOfY.compact\", { \n x: formatPositions(currentPositions),\n y: totalPositions\n });\n }\n break;\n\n case ThProgressionFormat.positionsPercentOfTotal:\n if (currentPositions.length > 0 && totalPositions) {\n const percentage = Math.round((totalProgression || 0) * 100);\n text = t(\"reader.progression.xOfY.descriptive\", { \n x: formatPositions(currentPositions),\n y: totalPositions,\n z: `${ percentage }%`\n });\n }\n break;\n \n case ThProgressionFormat.positionsLeft:\n if (positionsLeft !== undefined) {\n text = t(`reader.progression.positionsLeftInChapter.descriptive`, { \n count: positionsLeft\n });\n }\n break;\n \n case ThProgressionFormat.overallProgression:\n if (totalProgression !== undefined) {\n const percentage = Math.round(totalProgression * 100);\n text = `${ percentage }%`;\n }\n break;\n \n case ThProgressionFormat.resourceProgression:\n if (relativeProgression !== undefined) {\n const percentage = Math.round(relativeProgression * 100);\n text = `${ percentage }%`;\n }\n break;\n \n case ThProgressionFormat.progressionOfResource:\n if (relativeProgression !== undefined) {\n const percentage = Math.round(relativeProgression * 100);\n text = t(\"reader.progression.xOfY.compact\", {\n x: `${ percentage }%`,\n y: currentChapter || t(\"reader.app.progression.referenceFallback\")\n });\n }\n break;\n\n case ThProgressionFormat.readingOrderIndex:\n if (currentIndex !== undefined && totalItems !== undefined) {\n text = t(\"reader.progression.xOfY.compact\", {\n x: currentIndex,\n y: totalItems\n });\n }\n break;\n }\n \n return text;\n }, [displayFormat, unstableTimeline, t]);\n\n if (!displayText || displayFormat === ThProgressionFormat.none) {\n return null;\n }\n\n return (\n <ThProgression \n id=\"current-progression\" \n className={ classNames(progressionStyles.wrapper, className) }\n aria-label={ t(\"reader.app.progression.wrapper\") }\n >\n { displayText }\n </ThProgression>\n );\n};","\"use client\";\n\nimport { useRef, KeyboardEvent } from \"react\";\n\nimport { ThPagination, ThPaginationProps } from \"@/core/Components/Reader/ThPagination\";\n\nimport readerPaginationStyles from \"./assets/styles/thorium-web.reader.pagination.module.css\";\n \nexport const StatefulReaderPagination = ({\n ref,\n links,\n compounds,\n children,\n ...props\n}: ThPaginationProps) => {\n const previousButtonRef = useRef<HTMLButtonElement>(null);\n const nextButtonRef = useRef<HTMLButtonElement>(null);\n\n const updatedCompounds = {\n ...compounds,\n previousButton: {\n ...compounds?.previousButton,\n ref: previousButtonRef,\n onKeyDown: (e: KeyboardEvent) => {\n if (e.key === \"Escape\") {\n previousButtonRef.current?.blur();\n }\n }\n },\n nextButton: {\n ...compounds?.nextButton,\n ref: nextButtonRef,\n onKeyDown: (e: KeyboardEvent) => {\n if (e.key === \"Escape\") {\n nextButtonRef.current?.blur();\n }\n }\n }\n };\n\n return (\n <ThPagination \n ref={ ref } \n className={ readerPaginationStyles.wrapper }\n links={ links } \n compounds={ updatedCompounds } \n { ...props }\n >\n { children }\n </ThPagination>\n )\n}","\"use client\";\n\nimport { useCallback, useEffect, useRef } from \"react\";\n\nimport readerStyles from \"./assets/styles/thorium-web.reader.app.module.css\";\nimport readerPaginationStyles from \"./assets/styles/thorium-web.reader.pagination.module.css\";\n\nimport { ThBreakpoints, ThLayoutUI, ThFormatPref, ThProgressionFormat } from \"@/preferences/models\";\n\nimport { ThFooter } from \"@/core/Components/Reader/ThFooter\";\nimport { StatefulReaderProgression } from \"./StatefulReaderProgression\";\nimport { ThInteractiveOverlay } from \"../core/Components/Reader/ThInteractiveOverlay\";\nimport { StatefulReaderPagination } from \"./StatefulReaderPagination\";\nimport { ThPaginationLinkProps } from \"@/core/Components/Reader/ThPagination\";\n\nimport { useNavigator } from \"@/core/Navigator\";\nimport { useFocusWithin } from \"react-aria\";\nimport { useI18n } from \"@/i18n/useI18n\";\n\nimport { setHovering } from \"@/lib/readerReducer\";\nimport { useAppDispatch, useAppSelector } from \"@/lib/hooks\";\n\nimport classNames from \"classnames\";\n\nexport const StatefulReaderFooter = ({\n layout,\n progressionFormatPref,\n progressionFormatFallback\n}: {\n layout: ThLayoutUI;\n progressionFormatPref?: ThFormatPref<ThProgressionFormat | ThProgressionFormat[]>;\n progressionFormatFallback: ThProgressionFormat | ThProgressionFormat[];\n}) => {\n const { t } = useI18n();\n const footerRef = useRef<HTMLDivElement>(null);\n const readerProfile = useAppSelector(state => state.reader.profile);\n const isImmersive = useAppSelector(state => state.reader.isImmersive);\n const isHovering = useAppSelector(state => state.reader.isHovering);\n const hasScrollAffordance = useAppSelector(state => state.reader.hasScrollAffordance);\n const scroll = useAppSelector(state => state.settings.scroll);\n const isFXL = useAppSelector(state => state.publication.isFXL);\n const isScroll = scroll && !isFXL;\n const breakpoint = useAppSelector(state => state.theming.breakpoint);\n const reducedMotion = useAppSelector(state => state.theming.prefersReducedMotion);\n const timeline = useAppSelector(state => state.publication.unstableTimeline);\n\n const dispatch = useAppDispatch();\n\n const { focusWithinProps } = useFocusWithin({\n onFocusWithin() {\n dispatch(setHovering(true));\n },\n onBlurWithin() {\n dispatch(setHovering(false));\n }\n });\n\n const setHover = () => {\n if (!hasScrollAffordance) {\n dispatch(setHovering(true));\n }\n };\n\n const removeHover = () => {\n if (!hasScrollAffordance) {\n dispatch(setHovering(false));\n }\n };\n\n const { previousLocator, nextLocator, go } = useNavigator().unified;\n\n const updateLinks = useCallback(() => {\n const links: { previous?: ThPaginationLinkProps; next?: ThPaginationLinkProps } = {\n previous: undefined,\n next: undefined\n };\n\n const previous = previousLocator();\n const next = nextLocator();\n\n if (previous) {\n links.previous = {\n node: breakpoint !== ThBreakpoints.compact && breakpoint !== ThBreakpoints.medium ? (\n <>\n <span className={ readerStyles.srOnly }>{ t(isFXL ? \"reader.actions.goToPreviousPage.descriptive\" : \"reader.actions.goToPreviousChapter.descriptive\") }</span>\n <span className={ readerPaginationStyles.label }>{ timeline?.previousItem?.title || previous.title || t(isFXL ? \"reader.actions.goToPreviousPage.compact\" : \"reader.actions.goToPreviousChapter.compact\") }</span>\n </>\n ) : (\n <>\n <span className={ readerPaginationStyles.label }>{ t(isFXL ? \"reader.actions.goToPreviousPage.compact\" : \"reader.actions.goToPreviousChapter.compact\") }</span>\n </>\n ),\n onPress: () => go(previous, !reducedMotion, () => {})\n }\n }\n\n if (next) {\n links.next = {\n node: breakpoint !== ThBreakpoints.compact && breakpoint !== ThBreakpoints.medium ? (\n <>\n <span className={ readerStyles.srOnly }>{ t(isFXL ? \"reader.actions.goToNextPage.descriptive\" : \"reader.actions.goToNextChapter.descriptive\") }</span>\n <span className={ readerPaginationStyles.label }>{ timeline?.nextItem?.title || next.title || t(isFXL ? \"reader.actions.goToNextPage.compact\" : \"reader.actions.goToNextChapter.compact\") }</span>\n </>\n ) : ( \n <>\n <span className={ readerPaginationStyles.label }>{ t(isFXL ? \"reader.actions.goToNextPage.compact\" : \"reader.actions.goToNextChapter.compact\") }</span>\n </>\n ),\n onPress: () => go(next, !reducedMotion, () => {})\n }\n }\n\n return links;\n }, [go, previousLocator, nextLocator, t, timeline, breakpoint, reducedMotion, isFXL]);\n\n useEffect(() => {\n updateLinks();\n }, [timeline, updateLinks]);\n\n useEffect(() => {\n // Blur any focused element when entering immersive mode\n if (isImmersive) {\n const focusElement = document.activeElement;\n if (focusElement && footerRef.current?.contains(focusElement)) {\n (focusElement as HTMLElement).blur();\n }\n }\n }, [isImmersive]);\n\n return(\n <>\n <ThInteractiveOverlay \n className={ classNames(readerStyles.barOverlay, readerStyles.footerOverlay) }\n isActive={ layout === ThLayoutUI.layered && isImmersive && !isHovering }\n onMouseEnter={ setHover }\n onMouseLeave={ removeHover }\n />\n \n <ThFooter \n ref={ footerRef }\n className={ readerStyles.bottomBar }\n aria-label={ t(\"reader.app.footer.label\") } \n onMouseEnter={ setHover } \n onMouseLeave={ removeHover }\n { ...focusWithinProps }\n >\n { (isScroll || readerProfile === \"webPub\")\n ? <StatefulReaderPagination \n aria-label={ t(\"reader.navigation.scroll.wrapper\") }\n links={ updateLinks() } \n compounds={ {\n listItem: {\n className: readerPaginationStyles.listItem\n },\n previousButton: {\n className: readerPaginationStyles.previousButton,\n preventFocusOnPress: true\n },\n nextButton: {\n className: readerPaginationStyles.nextButton,\n preventFocusOnPress: true\n }\n } } \n >\n <StatefulReaderProgression \n className={ readerPaginationStyles.progression } \n formatPref={ progressionFormatPref }\n fallbackVariant={ progressionFormatFallback }\n />\n </StatefulReaderPagination> \n : <StatefulReaderProgression \n formatPref={ progressionFormatPref }\n fallbackVariant={ progressionFormatFallback }\n /> }\n </ThFooter>\n </>\n )\n}","export const getAndroidPatchCss = () => {\n if (typeof window === \"undefined\") {\n return \"\";\n }\n \n const origin = window.location.origin;\n \n return `/* Readium CSS\n Android Fonts Patch module\n\n A stylesheet aligning Android generic serif and sans-serif fonts on other platforms\n\n Repo: https://github.com/readium/css */\n\n/* Android resolves sans-serif to Roboto, and serif to Droid Serif \n This created issues for FXL EPUBs relying on Times (New Roman),\n Helvetica or Arial while not embedding the font files in the package.\n\n See https://github.com/readium/css/issues/149\n\n Unfortunately it is no possible to target generic family using @font-face,\n we have to target specific font-family names e.g. Times, Arial, etc.\n\n This stylesheet/patch should be loaded only for this case i.e.\n a Fixed-Layout EPUB with text but no embedded font on an Android device.\n The logic for checking these conditions are up to implementers.\n*/\n\n/* Serif (Times + Times New Roman) */\n\n@font-face {\n font-family: Times;\n src: url(\"${ new URL(\"/fonts/AndroidPatch/serif/NimbusRoman.woff\", origin).toString() }\") format(\"woff\");\n font-weight: normal;\n font-style: normal;\n}\n\n@font-face {\n font-family: \"Times New Roman\";\n src: url(\"${ new URL(\"/fonts/AndroidPatch/serif/NimbusRoman.woff\", origin).toString() }\") format(\"woff\");\n font-weight: normal;\n font-style: normal;\n}\n\n@font-face {\n font-family: Times;\n src: url(\"${ new URL(\"/fonts/AndroidPatch/serif/NimbusRoman-Italic.woff\", origin).toString() }\") format(\"woff\");\n font-weight: normal;\n font-style: italic;\n}\n\n@font-face {\n font-family: \"Times New Roman\";\n src: url(\"${ new URL(\"/fonts/AndroidPatch/serif/NimbusRoman-Italic.woff\", origin).toString() }\") format(\"woff\");\n font-weight: normal;\n font-style: italic;\n}\n\n@font-face {\n font-family: Times;\n src: url(\"${ new URL(\"/fonts/AndroidPatch/serif/NimbusRoman-Bold.woff\", origin).toString() }\") format(\"woff\");\n font-weight: bold;\n font-style: normal;\n}\n\n@font-face {\n font-family: \"Times New Roman\";\n src: url(\"${ new URL(\"/fonts/AndroidPatch/serif/NimbusRoman-Bold.woff\", origin).toString() }\") format(\"woff\");\n font-weight: bold;\n font-style: normal;\n}\n\n@font-face {\n font-family: Times;\n src: url(\"${ new URL(\"/fonts/AndroidPatch/serif/NimbusRoman-BoldItalic.woff\", origin).toString() }\") format(\"woff\");\n font-weight: bold;\n font-style: italic;\n}\n\n@font-face {\n font-family: \"Times New Roman\";\n src: url(\"${ new URL(\"/fonts/AndroidPatch/serif/NimbusRoman-BoldItalic.woff\", origin).toString() }\") format(\"woff\");\n font-weight: bold;\n font-style: italic;\n}\n\n/* Sans-serif (Helvetica + Arial) */\n\n@font-face {\n font-family: Helvetica;\n src: url(\"${ new URL(\"/fonts/AndroidPatch/sans-serif/NimbusSans.woff\", origin).toString() }\") format(\"woff\");\n font-weight: normal;\n font-style: normal;\n}\n\n@font-face {\n font-family: Arial;\n src: url(\"${ new URL(\"/fonts/AndroidPatch/sans-serif/NimbusSans.woff\", origin).toString() }\") format(\"woff\");\n font-weight: normal;\n font-style: normal;\n}\n\n@font-face {\n font-family: Helvetica;\n src: url(\"${ new URL(\"/fonts/AndroidPatch/sans-serif/NimbusSans-Italic.woff\", origin).toString() }\") format(\"woff\");\n font-weight: normal;\n font-style: italic;\n}\n\n@font-face {\n font-family: Arial;\n src: url(\"${ new URL(\"/fonts/AndroidPatch/sans-serif/NimbusSans-Italic.woff\", origin).toString() }\") format(\"woff\");\n font-weight: normal;\n font-style: italic;\n}\n\n@font-face {\n font-family: Helvetica;\n src: url(\"${ new URL(\"/fonts/AndroidPatch/sans-serif/NimbusSans-Bold.woff\", origin).toString() }\") format(\"woff\");\n font-weight: bold;\n font-style: normal;\n}\n\n@font-face {\n font-family: Arial;\n src: url(\"${ new URL(\"/fonts/AndroidPatch/sans-serif/NimbusSans-Bold.woff\", origin).toString() }\") format(\"woff\");\n font-weight: bold;\n font-style: normal;\n}\n\n@font-face {\n font-family: Helvetica;\n src: url(\"${ new URL(\"/fonts/AndroidPatch/sans-serif/NimbusSans-BoldItalic.woff\", origin).toString() }\") format(\"woff\");\n font-weight: bold;\n font-style: italic;\n}\n\n@font-face {\n font-family: Arial;\n src: url(\"${ new URL(\"/fonts/AndroidPatch/sans-serif/NimbusSans-BoldItalic.woff\", origin).toString() }\") format(\"woff\");\n font-weight: bold;\n font-style: italic;\n}`;\n};\n","\"use client\";\n\nimport { useCallback, useEffect, useRef } from \"react\";\n\nimport { InjectableFontResources } from \"@/preferences/services/fonts\";\nimport { ILinkInjectable, IUrlInjectable, IBlobInjectable } from \"@readium/navigator\";\n\nimport { getPlatform } from \"@/core/Helpers/getPlatform\";\nimport { getAndroidPatchCss } from \"./androidPatchCss\";\n\ntype FontResource = (ILinkInjectable & IUrlInjectable) | (ILinkInjectable & IBlobInjectable);\n\nexport const useFonts = (fontResources?: InjectableFontResources | null) => {\n const injectedElementsRef = useRef<{\n prepend: HTMLElement[];\n append: HTMLElement[];\n }>({\n prepend: [],\n append: []\n });\n\n const createLinkElement = useCallback((resource: FontResource): HTMLLinkElement => {\n const link = document.createElement(\"link\");\n \n // Set all custom attributes first to make sure they are\n // overridden by the core attributes\n if (\"attributes\" in resource && resource.attributes) {\n Object.entries(resource.attributes).forEach(([key, value]) => {\n link.setAttribute(key, value as string);\n });\n }\n \n link.rel = resource.rel;\n link.as = resource.as;\n \n if (\"url\" in resource) {\n link.href = resource.url;\n } else if (\"blob\" in resource && resource.blob) {\n link.href = URL.createObjectURL(resource.blob);\n }\n \n return link;\n }, []);\n\n const removeInjectedElements = useCallback(() => {\n const { prepend, append } = injectedElementsRef.current;\n \n [...prepend, ...append].forEach(element => {\n if (element.parentNode) {\n element.parentNode.removeChild(element);\n }\n // Revoke blob URLs to prevent memory leaks\n if (element instanceof HTMLLinkElement && element.href.startsWith(\"blob:\")) {\n URL.revokeObjectURL(element.href);\n }\n });\n \n injectedElementsRef.current = {\n prepend: [],\n append: []\n };\n }, []);\n\n const injectFontResources = useCallback((resources: InjectableFontResources | null) => {\n if (typeof document === \"undefined\") return;\n \n removeInjectedElements();\n \n if (!resources) return;\n \n const { prepend, append } = resources;\n const injectedElements = injectedElementsRef.current;\n \n prepend.forEach(resource => {\n const element = createLinkElement(resource);\n document.head.insertBefore(element, document.head.firstChild);\n injectedElements.prepend.push(element);\n });\n \n append.forEach(resource => {\n const element = createLinkElement(resource);\n document.head.appendChild(element);\n injectedElements.append.push(element);\n });\n }, [createLinkElement, removeInjectedElements]);\n\n const getAndroidFXLPatch = useCallback((): (ILinkInjectable & IBlobInjectable) | null => {\n const platform = getPlatform();\n const isAndroid = platform === \"android\";\n \n if (!isAndroid) {\n return null;\n }\n \n const cssContent = getAndroidPatchCss();\n const blob = new Blob([cssContent], { type: \"text/css\" });\n \n return {\n as: \"link\",\n rel: \"stylesheet\",\n blob\n };\n }, []);\n\n useEffect(() => {\n injectFontResources(fontResources || null);\n \n return () => {\n removeInjectedElements();\n };\n }, [fontResources, injectFontResources, removeInjectedElements]);\n\n return {\n injectFontResources,\n removeFontResources: removeInjectedElements,\n getAndroidFXLPatch\n };\n};","// Peripherals based on XBReader\nimport { ThActionsPref, DefaultKeys } from \"@/preferences\";\n\nimport { ThActionsKeys } from \"@/preferences/models\";\n\nimport { buildShortcut, UnstablePShortcut } from \"@/core/Helpers/keyboardUtilities\";\nimport { isInteractiveElement } from \"@/core/Helpers/focusUtilities\";\n\nimport { useAppStore } from \"@/lib/hooks\";\n\nexport interface PCallbacks {\n moveTo: (direction: \"left\" | \"right\" | \"up\" | \"down\" | \"home\" | \"end\") => void;\n goProgression: (shiftKey?: boolean) => void;\n toggleAction: (action: ThActionsKeys) => void;\n}\n\nexport interface PShortcuts {\n [key: string]: {\n actionKey: ThActionsKeys;\n modifiers: UnstablePShortcut[\"modifiers\"];\n }\n}\n\nexport default class Peripherals {\n private readonly observers = [\"keydown\"];\n private targets: EventTarget[] = [];\n private readonly callbacks: PCallbacks;\n private readonly store: ReturnType<typeof useAppStore>;\n private readonly actionsPref: ThActionsPref<DefaultKeys> | undefined;\n private readonly shortcuts: PShortcuts;\n\n constructor(store: ReturnType<typeof useAppStore>, actionsPref: ThActionsPref<DefaultKeys> | undefined, callbacks: PCallbacks) {\n this.observers.forEach((method) => {\n (this as any)[\"on\" + method] = (this as any)[\"on\" + method].bind(this);\n });\n this.store = store;\n this.actionsPref = actionsPref;\n this.callbacks = callbacks;\n this.shortcuts = this.retrieveShortcuts();\n }\n\n private getPlatformModifier(): \"ctrlKey\" | \"metaKey\" {\n return this.store.getState().reader.platformModifier.modifier;\n }\n\n private retrieveShortcuts() {\n if (!this.actionsPref) return {};\n\n const shortcutsObj: PShortcuts = {};\n\n const displayOrder = this.store.getState().publication.isFXL\n ? this.actionsPref.fxlOrder\n : this.actionsPref.reflowOrder;\n\n for (const actionKey of displayOrder) {\n const shortcutString = this.actionsPref.keys[actionKey].shortcut;\n \n if (shortcutString) {\n const shortcutObj = buildShortcut(shortcutString);\n\n if (shortcutObj?.key) {\n Object.defineProperty(shortcutsObj, shortcutObj.key, {\n value: {\n actionKey: actionKey,\n modifiers: shortcutObj.modifiers\n },\n writable: false,\n enumerable: true\n });\n }\n }\n };\n \n return shortcutsObj;\n }\n\n destroy() {\n this.targets.forEach((t) => this.unobserve(t));\n }\n\n unobserve(item: EventTarget) {\n if (!item) return;\n this.observers.forEach((EventName) => {\n item.removeEventListener(\n EventName,\n (this as any)[\"on\" + EventName],\n false\n );\n });\n this.targets = this.targets.filter((t) => t !== item);\n }\n\n observe(item: EventTarget) {\n if (!item) return;\n if (this.targets.includes(item)) return;\n this.observers.forEach((EventName) => {\n item.addEventListener(EventName, (this as any)[\"on\" + EventName], false);\n });\n this.targets.push(item);\n }\n\n onkeydown(e: KeyboardEvent) {\n const focusIsSafe = !isInteractiveElement(document.activeElement);\n \n switch(e.code) {\n case \"Space\":\n focusIsSafe && this.callbacks.goProgression(e.shiftKey);\n break;\n case \"ArrowRight\":\n focusIsSafe && this.callbacks.moveTo(\"right\");\n break;\n case \"ArrowLeft\":\n focusIsSafe && this.callbacks.moveTo(\"left\");\n break;\n case \"ArrowUp\":\n case \"PageUp\":\n focusIsSafe && this.callbacks.moveTo(\"up\");\n break;\n case \"ArrowDown\":\n case \"PageDown\":\n focusIsSafe && this.callbacks.moveTo(\"down\");\n break;\n case \"Home\":\n focusIsSafe && this.callbacks.moveTo(\"home\");\n break;\n case \"End\":\n focusIsSafe && this.callbacks.moveTo(\"end\");\n break;\n default:\n if (this.shortcuts.hasOwnProperty(e.code)) {\n const customShortcutObj = this.shortcuts[e.code];\n const sendCallback = Object.entries(customShortcutObj.modifiers).every(( [modifier, value] ) => {\n if (modifier === \"platformKey\") {\n return e[this.getPlatformModifier()] === value;\n } else {\n return e[modifier as \"altKey\" | \"ctrlKey\" | \"metaKey\" | \"shiftKey\"] === value;\n }\n })\n \n if (sendCallback) {\n e.preventDefault();\n this.callbacks.toggleAction(customShortcutObj.actionKey)\n };\n }\n break;\n }\n }\n}","import { ThLayoutUI } from \"@/preferences\";\nimport readerStyles from \"../assets/styles/thorium-web.reader.app.module.css\";\nimport classNames from \"classnames\";\n\ninterface ReaderStyleOptions {\n layoutUI: ThLayoutUI;\n isScroll: boolean;\n isImmersive?: boolean;\n isHovering?: boolean;\n isFXL?: boolean;\n breakpoint?: string;\n}\n\nconst LAYOUT_CLASSES = {\n [ThLayoutUI.stacked]: \"thorium_web_stackedUI\",\n [ThLayoutUI.layered]: \"thorium_web_layeredUI\",\n} as const;\n\nexport function getReaderClassNames(options: ReaderStyleOptions): string {\n const {\n layoutUI,\n isScroll,\n isImmersive = false,\n isHovering = false,\n isFXL = false,\n breakpoint,\n } = options;\n\n return classNames(\n readerStyles.shell,\n isScroll ? \"thorium_web_isScroll\" : \"thorium_web_isPaged\",\n isImmersive && \"thorium_web_isImmersive\",\n isHovering && \"thorium_web_isHovering\",\n isFXL ? \"thorium_web_isFXL\" : \"thorium_web_isReflow\",\n LAYOUT_CLASSES[layoutUI],\n breakpoint ? `thorium_web_is${ breakpoint.charAt(0).toUpperCase() + breakpoint.slice(1) }` : undefined\n );\n}"]}
@@ -4,6 +4,7 @@ export { default as i18n } from 'i18next';
4
4
  import { initReactI18next, useTranslation } from 'react-i18next';
5
5
  import LanguageDetector from 'i18next-browser-languagedetector';
6
6
  import Backend from 'i18next-http-backend';
7
+ import { useCallback } from 'react';
7
8
 
8
9
  var DEFAULT_CONFIG = {
9
10
  fallbackLng: "en",
@@ -37,7 +38,7 @@ var useI18n = (ns) => {
37
38
  const changeLanguage = (lng) => {
38
39
  return i18n2.changeLanguage(lng);
39
40
  };
40
- const t = (key, options) => {
41
+ const t = useCallback((key, options) => {
41
42
  if (ns) {
42
43
  return tRaw(key, options);
43
44
  } else {
@@ -47,7 +48,7 @@ var useI18n = (ns) => {
47
48
  }
48
49
  return key;
49
50
  }
50
- };
51
+ }, [ns, tRaw]);
51
52
  return {
52
53
  // Translation function
53
54
  t,
@@ -65,5 +66,5 @@ var useI18n = (ns) => {
65
66
  };
66
67
 
67
68
  export { DEFAULT_CONFIG, initI18n, useI18n };
68
- //# sourceMappingURL=chunk-IYAFKTPL.mjs.map
69
- //# sourceMappingURL=chunk-IYAFKTPL.mjs.map
69
+ //# sourceMappingURL=chunk-6EHFW43Y.mjs.map
70
+ //# sourceMappingURL=chunk-6EHFW43Y.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/i18n/config.ts","../src/i18n/useI18n.ts"],"names":["i18n"],"mappings":";;;;;;;;AAOO,IAAM,cAAA,GAA8B;AAAA,EACzC,WAAA,EAAa,IAAA;AAAA,EACb,IAAA,EAAM,KAAA;AAAA,EACN,wBAAA,EAA0B,IAAA;AAAA,EAC1B,aAAA,EAAe,gBAAA;AAAA,EACf,SAAA,EAAW;AAAA,IACT,KAAA,EAAO,CAAC,WAAW,CAAA;AAAA,IACnB,QAAQ;AAAC,GACX;AAAA,EACA,aAAA,EAAe;AAAA,IACb,WAAA,EAAa;AAAA,GACf;AAAA,EACA,OAAA,EAAS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AA,EAAI,IAAI,CAAC,CAAA;AAEb,EAAA,OAAO;AAAA;AAAA,IAEL,CAAA;AAAA;AAAA,IAEA,IAAA,EAAAA,KAAAA;AAAA;AAAA,IAEA,KAAA;AAAA;AAAA,IAEA,iBAAiBA,KAAAA,CAAK,QAAA;AAAA;AAAA,IAEtB,WAAWA,KAAAA,CAAK,SAAA;AAAA;AAAA,IAEhB;AAAA,GACF;AACF","file":"chunk-6EHFW43Y.mjs","sourcesContent":["import i18n from \"i18next\";\nimport { initReactI18next } from \"react-i18next\";\nimport LanguageDetector from \"i18next-browser-languagedetector\";\nimport Backend from \"i18next-http-backend\";\nimport { InitOptions } from \"i18next\";\nimport { supportedLocales } from \"./supported-locales\";\n\nexport const DEFAULT_CONFIG: InitOptions = {\n fallbackLng: \"en\",\n load: \"all\",\n nonExplicitSupportedLngs: true,\n supportedLngs: supportedLocales,\n detection: {\n order: [\"navigator\"],\n caches: []\n },\n interpolation: {\n escapeValue: false\n },\n backend: {\n loadPath: \"/locales/{{lng}}/{{ns}}.json\"\n },\n ns: [\"thorium-shared\", \"thorium-web\"],\n defaultNS: [\"thorium-web\", \"thorium-shared\"]\n};\n\nexport const initI18n = async (options: Partial<InitOptions> = {}) => {\n if (i18n.isInitialized) {\n return i18n;\n }\n\n return i18n\n .use(Backend)\n .use(LanguageDetector)\n .use(initReactI18next)\n .init({\n ...DEFAULT_CONFIG,\n ...options\n });\n};\n\nexport { i18n };","import { useCallback } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { DEFAULT_CONFIG } from \"./config\";\n\n/**\n * Hook to access the i18n instance and translation functions\n * @param ns Optional additional namespace(s) to include alongside the default namespaces\n * @returns Translation functions and i18n instance\n */\nexport const useI18n = (ns?: string | string[]) => {\n // If no namespace provided, use both defaults with fallback\n // If namespace provided, use only that (override behavior)\n const { t: tRaw, i18n, ready } = useTranslation(ns || DEFAULT_CONFIG.ns as string[]);\n \n // Helper function to change language\n const changeLanguage = (lng: string) => {\n return i18n.changeLanguage(lng);\n };\n\n // Enhanced t function that searches both namespaces only when using defaults\n const t = useCallback((key: string, options?: any): string => {\n if (ns) {\n // If custom namespace provided, use it directly (no fallback)\n return tRaw(key, options) as string;\n } else {\n // If no namespace provided, search all default namespaces\n for (const namespace of DEFAULT_CONFIG.ns as string[]) {\n const result = tRaw(key, { ...options, ns: namespace });\n if (result !== key) return result as string;\n }\n return key;\n }\n }, [ns, tRaw]);\n\n return {\n // Translation function\n t,\n // i18n instance\n i18n,\n // Whether translations are loaded\n ready,\n // Current language\n currentLanguage: i18n.language,\n // List of available languages\n languages: i18n.languages,\n // Function to change language\n changeLanguage\n };\n};\n"]}
@@ -840,5 +840,5 @@ var useWebPubSettingsCache = (fontFamily, fontWeight, hyphens, letterSpacing, li
840
840
  };
841
841
 
842
842
  export { timelineInstance, useAudioNavigator, useAudioSettingsCache, useDocumentTitle, useEpubNavigator, useEpubSettingsCache, useFullscreen, useIsClient, useLocalStorage, useTimeline, useWebPubNavigator, useWebPubSettingsCache };
843
- //# sourceMappingURL=chunk-XBZWGRDM.mjs.map
844
- //# sourceMappingURL=chunk-XBZWGRDM.mjs.map
843
+ //# sourceMappingURL=chunk-A3FZBEUL.mjs.map
844
+ //# sourceMappingURL=chunk-A3FZBEUL.mjs.map