@edrlab/thorium-web 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ThPreferencesAdapter-L1H6gzmu.d.mts → ThPreferencesAdapter-_5AePKHa.d.mts} +5 -3
- package/dist/{ThSettingsWrapper-DWEA4hYF.d.mts → ThSettingsWrapper-B_9klYXH.d.mts} +1 -1
- package/dist/{actions-BjeRjaJU.d.mts → actions-CuRRM3rp.d.mts} +4 -1
- package/dist/{actionsReducer-B32cq2mB.d.mts → actionsReducer-VFR42qgL.d.mts} +1 -1
- package/dist/{chunk-NUXGQWED.mjs → chunk-2NCN2AG2.mjs} +3 -3
- package/dist/{chunk-NUXGQWED.mjs.map → chunk-2NCN2AG2.mjs.map} +1 -1
- package/dist/{chunk-5LUMM7FW.mjs → chunk-44PEO3DS.mjs} +2 -2
- package/dist/{chunk-5LUMM7FW.mjs.map → chunk-44PEO3DS.mjs.map} +1 -1
- package/dist/chunk-AQSJDL63.mjs +193 -0
- package/dist/chunk-AQSJDL63.mjs.map +1 -0
- package/dist/{chunk-T5ENYSDJ.mjs → chunk-DQDOOTCE.mjs} +3 -3
- package/dist/{chunk-T5ENYSDJ.mjs.map → chunk-DQDOOTCE.mjs.map} +1 -1
- package/dist/{chunk-QUSGPT5M.mjs → chunk-E2JEGVVE.mjs} +12 -11
- package/dist/chunk-E2JEGVVE.mjs.map +1 -0
- package/dist/{chunk-P6ILEQ5P.mjs → chunk-ETLIGONP.mjs} +17 -9
- package/dist/chunk-ETLIGONP.mjs.map +1 -0
- package/dist/chunk-GNROODJB.mjs +9 -0
- package/dist/chunk-GNROODJB.mjs.map +1 -0
- package/dist/{chunk-6MONB2DN.mjs → chunk-KGSFTRCH.mjs} +15 -37
- package/dist/chunk-KGSFTRCH.mjs.map +1 -0
- package/dist/{chunk-PXXWEMNL.mjs → chunk-MSHUPSBI.mjs} +54 -38
- package/dist/chunk-MSHUPSBI.mjs.map +1 -0
- package/dist/{chunk-XRFLDNAY.mjs → chunk-OD75GC5N.mjs} +52 -12
- package/dist/chunk-OD75GC5N.mjs.map +1 -0
- package/dist/{chunk-KVUG6BNI.mjs → chunk-RBEPH5E5.mjs} +19 -13
- package/dist/chunk-RBEPH5E5.mjs.map +1 -0
- package/dist/{chunk-TSLTLQ6O.mjs → chunk-SI4FBFHM.mjs} +20 -16
- package/dist/chunk-SI4FBFHM.mjs.map +1 -0
- package/dist/{chunk-IVXRCKWR.mjs → chunk-WF2UOYO7.mjs} +4 -4
- package/dist/{chunk-IVXRCKWR.mjs.map → chunk-WF2UOYO7.mjs.map} +1 -1
- package/dist/{chunk-WLVE3WNW.mjs → chunk-YEVLT3AV.mjs} +12 -7
- package/dist/chunk-YEVLT3AV.mjs.map +1 -0
- package/dist/components/Audio/index.css +2 -1
- package/dist/components/Audio/index.css.map +1 -1
- package/dist/components/Audio/index.d.mts +14 -13
- package/dist/components/Audio/index.mjs +10 -10
- package/dist/components/Epub/index.css +2 -1
- package/dist/components/Epub/index.css.map +1 -1
- package/dist/components/Epub/index.d.mts +11 -11
- package/dist/components/Epub/index.mjs +11 -11
- package/dist/components/Misc/index.mjs +5 -5
- package/dist/components/Reader/index.css +2 -1
- package/dist/components/Reader/index.css.map +1 -1
- package/dist/components/Reader/index.d.mts +9 -9
- package/dist/components/Reader/index.mjs +24 -22
- package/dist/components/Reader/index.mjs.map +1 -1
- package/dist/components/WebPub/index.css +2 -1
- package/dist/components/WebPub/index.css.map +1 -1
- package/dist/components/WebPub/index.d.mts +11 -11
- package/dist/components/WebPub/index.mjs +11 -11
- package/dist/core/Components/index.d.mts +6 -6
- package/dist/core/Components/index.mjs +2 -2
- package/dist/core/Helpers/index.mjs +1 -1
- package/dist/core/Hooks/index.d.mts +4 -4
- package/dist/i18n/index.mjs +3 -3
- package/dist/lib/index.d.mts +15 -8
- package/dist/lib/index.mjs +2 -2
- package/dist/locales/da/thorium-web.json +37 -2
- package/dist/locales/fi/thorium-web.json +1 -1
- package/dist/locales/fr/thorium-web.json +1 -1
- package/dist/locales/lt/thorium-web.json +26 -1
- package/dist/next-lib/index.mjs +1 -1
- package/dist/next-lib/index.mjs.map +1 -1
- package/dist/preferences/index.d.mts +8 -8
- package/dist/preferences/index.mjs +4 -4
- package/dist/{settingsReducer-DLaT2wUB.d.mts → settingsReducer-VqBhLq50.d.mts} +1 -1
- package/dist/{useContrast-Bo7cDw_X.d.mts → useContrast-Cbso7N1l.d.mts} +1 -1
- package/dist/{usePreferences-D8NU1yhP.d.mts → usePreferences-9ZvbcbLW.d.mts} +3 -3
- package/dist/{useReaderTransitions-BQGzKeY2.d.mts → useReaderTransitions-0hKGCvMm.d.mts} +10 -9
- package/package.json +5 -5
- package/dist/chunk-6MONB2DN.mjs.map +0 -1
- package/dist/chunk-B3WDMWCT.mjs +0 -9
- package/dist/chunk-B3WDMWCT.mjs.map +0 -1
- package/dist/chunk-KVUG6BNI.mjs.map +0 -1
- package/dist/chunk-MLEYTQGK.mjs +0 -60
- package/dist/chunk-MLEYTQGK.mjs.map +0 -1
- package/dist/chunk-P6ILEQ5P.mjs.map +0 -1
- package/dist/chunk-PXXWEMNL.mjs.map +0 -1
- package/dist/chunk-QUSGPT5M.mjs.map +0 -1
- package/dist/chunk-TSLTLQ6O.mjs.map +0 -1
- package/dist/chunk-WLVE3WNW.mjs.map +0 -1
- package/dist/chunk-XRFLDNAY.mjs.map +0 -1
|
@@ -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","leftButton","progression","rightButton","label","useMemo","classNames","useRef","jsxs","useCallback","useEffect"],"mappings":";;;;;;;;;;;;;;AAcO,IAAM,4BAA4B,CAAC;AAAA,EACxC;AACF,CAAA,KAEM;AACJ,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,OAAA,EAAQ;AAEtB,EAAA,MAAM,gBAAA,GAAmB,cAAA,CAAe,CAAA,KAAA,KAAS,KAAA,CAAM,YAAY,gBAAgB,CAAA;AACnF,EAAA,MAAM,WAAA,GAAc,cAAA,CAAe,CAAA,KAAA,KAAS,KAAA,CAAM,OAAO,WAAW,CAAA;AACpE,EAAA,MAAM,UAAA,GAAa,cAAA,CAAe,CAAA,KAAA,KAAS,KAAA,CAAM,OAAO,UAAU,CAAA;AAClE,EAAA,MAAM,YAAA,GAAe,cAAA,CAAe,CAAA,KAAA,KAAS,KAAA,CAAM,OAAO,YAAY,CAAA;AACtE,EAAA,MAAM,UAAA,GAAa,cAAA,CAAe,CAAA,KAAA,KAAS,KAAA,CAAM,QAAQ,mBAAmB,CAAA;AAG5E,EAAA,MAAM,cAAA,GAAiB,QAAgD,OAAO;AAAA,IAC5E,QAAA,EAAA,OAAA;AAAA,IACA,kBAAA,EAAoB,IAAA;AAAA,IACpB,mBAAA,EAAqB;AAAA,GACvB,CAAA,EAAI,EAAE,CAAA;AAEN,EAAA,MAAM,cAAA,GAAiB,QAAQ,MAAM;AACnC,IAAA,OAAO,kBAAA,CAA2D;AAAA,MAChE,YAAA,EAAc,YAAY,OAAA,IAAW,cAAA;AAAA,MACrC,QAAA,EAAU,mBAAA;AAAA,MACV,MAAM,UAAA,EAAY,WAAA;AAAA,MAClB,WAAA,EAAa;AAAA,KACd,CAAA;AAAA,EACH,CAAA,EAAG,CAAC,UAAA,EAAY,cAAc,CAAC,CAAA;AAG/B,EAAA,MAAM,YAAA,GAAe,QAAQ,MAAM;AACjC,IAAA,IAAI,CAAC,UAAA,EAAY,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CAAU,YAAA,CAAa,iBAAA,CAAkB,SAAS,CAAA;AAAA,UACzD;AAAC,QACH;AACA,QAAA;AAAA;AACJ,EACF;AACF;ACrIA,IAAM,cAAA,GAAiB;AAAA,EACrB,8BAAsB,uBAAA;AAAA,EACtB,8BAAsB;AACxB,CAAA;AAEA,IAAM,oBAAoB,CAAC,MAAA,EAAgB,EAAA,KACzC,CAAA,EAAI,MAAO,CAAA,EAAI,EAAA,CAAG,MAAA,CAAO,CAAC,EAAE,WAAA,EAAY,GAAI,EAAA,CAAG,KAAA,CAAM,CAAC,CAAE,CAAA,CAAA;AAEnD,SAAS,oBAAoB,OAAA,EAAqC;AACvE,EAAA,MAAM;AAAA,IACJ,QAAA;AAAA,IACA,QAAA;AAAA,IACA,WAAA,GAAc,KAAA;AAAA,IACd,UAAA,GAAa,KAAA;AAAA,IACb,KAAA,GAAQ,KAAA;AAAA,IACR,UAAA;AAAA,IACA;AAAA,GACF,GAAI,OAAA;AAEJ,EAAA,OAAOJ,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,iBAAA,CAAkB,gBAAA,EAAkB,UAAU,CAAA,GAAI,MAAA;AAAA,IAC/D,mBAAA,GAAsB,iBAAA,CAAkB,0BAAA,EAA4B,mBAAmB,CAAA,GAAI;AAAA,GAC7F;AACF","file":"chunk-KGSFTRCH.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.containerBreakpoint);\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(.leftButton) {\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(.rightButton) {\n grid-area: pagination-end;\n justify-self: end;\n}\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.rightButton {\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 { useMemo } 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 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 leftButtonRef = useRef<HTMLButtonElement>(null);\n const rightButtonRef = useRef<HTMLButtonElement>(null);\n\n const updatedCompounds = {\n ...compounds,\n leftButton: {\n ...compounds?.leftButton,\n ref: leftButtonRef,\n onKeyDown: (e: KeyboardEvent) => {\n if (e.key === \"Escape\") {\n leftButtonRef.current?.blur();\n }\n }\n },\n rightButton: {\n ...compounds?.rightButton,\n ref: rightButtonRef,\n onKeyDown: (e: KeyboardEvent) => {\n if (e.key === \"Escape\") {\n rightButtonRef.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}\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, useLocale } from \"react-aria\";\nimport { useI18n } from \"@/i18n/useI18n\";\n\nimport { setHovering } from \"@/lib/readerReducer\";\nimport { useAppDispatch, useAppSelector } from \"@/lib/hooks\";\nimport { useIsScroll } from \"@/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 { direction } = useLocale();\n const footerRef = useRef<HTMLDivElement>(null);\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 isRTL = useAppSelector(state => state.publication.isRTL);\n const isFXL = useAppSelector(state => state.publication.isFXL);\n const isScroll = useIsScroll();\n const breakpoint = useAppSelector(state => state.theming.containerBreakpoint);\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 buildNode = useCallback((\n locator: ReturnType<typeof previousLocator>,\n title: string | undefined,\n compactKey: string,\n descriptiveKey: string\n ) => {\n if (!locator) return undefined;\n\n return breakpoint !== ThBreakpoints.compact && breakpoint !== ThBreakpoints.medium ? (\n <>\n <span className={ readerStyles.srOnly }>{ t(descriptiveKey) }</span>\n <span className={ readerPaginationStyles.label }>{ title || locator.title || t(compactKey) }</span>\n </>\n ) : (\n <span className={ readerPaginationStyles.label }>{ t(compactKey) }</span>\n );\n }, [t, breakpoint]);\n\n const updateLinks = useCallback(() => {\n const previous = previousLocator();\n const next = nextLocator();\n\n const previousLink: ThPaginationLinkProps | undefined = previous ? {\n node: buildNode(\n previous,\n timeline?.previousItem?.title,\n isFXL ? \"reader.actions.goToPreviousPage.compact\" : \"reader.actions.goToPreviousChapter.compact\",\n isFXL ? \"reader.actions.goToPreviousPage.descriptive\" : \"reader.actions.goToPreviousChapter.descriptive\"\n ),\n onPress: () => go(previous, !reducedMotion, () => {})\n } : undefined;\n\n const nextLink: ThPaginationLinkProps | undefined = next ? {\n node: buildNode(\n next,\n timeline?.nextItem?.title,\n isFXL ? \"reader.actions.goToNextPage.compact\" : \"reader.actions.goToNextChapter.compact\",\n isFXL ? \"reader.actions.goToNextPage.descriptive\" : \"reader.actions.goToNextChapter.descriptive\"\n ),\n onPress: () => go(next, !reducedMotion, () => {})\n } : undefined;\n\n return isRTL\n ? { left: nextLink, right: previousLink }\n : { left: previousLink, right: nextLink };\n }, [go, previousLocator, nextLocator, buildNode, timeline, reducedMotion, isFXL, isRTL]);\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)\n ? <StatefulReaderPagination\n aria-label={ t(\"reader.navigation.scroll.wrapper\") }\n links={ updateLinks() }\n dir={ direction }\n compounds={ {\n listItem: {\n className: readerPaginationStyles.listItem\n },\n leftButton: {\n className: readerPaginationStyles.leftButton,\n preventFocusOnPress: true\n },\n rightButton: {\n className: readerPaginationStyles.rightButton,\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}\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 containerBreakpoint?: string;\n}\n\nconst LAYOUT_CLASSES = {\n [ThLayoutUI.stacked]: \"thorium_web_stackedUI\",\n [ThLayoutUI.layered]: \"thorium_web_layeredUI\",\n} as const;\n\nconst toBreakpointClass = (prefix: string, bp: string) =>\n `${ prefix }${ bp.charAt(0).toUpperCase() + bp.slice(1) }`;\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 containerBreakpoint,\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 ? toBreakpointClass(\"thorium_web_is\", breakpoint) : undefined,\n containerBreakpoint ? toBreakpointClass(\"thorium_web_container_is\", containerBreakpoint) : undefined\n );\n}"]}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { makeBreakpointsMap, isKeyboardTriggered, isActiveElement } from './chunk-VENFFPK2.mjs';
|
|
2
2
|
import { useFullscreen, useLocalStorage, useEpubNavigator } from './chunk-SZAVAQ6S.mjs';
|
|
3
|
-
import { setFullscreen, setReaderProfile, setPositionsList, setTocTree, setScriptMode, setRTL, setFXL, setHasDisplayTransformability, setActionOpen, dockAction, setHovering, setSettingsContainer, debounce, setColumnCount, initialWebPubSettingsState, initialSettingsState, setWebPubFontFamily, setFontFamily, setWebPubFontWeight, setFontWeight, setWebPubHyphens, setHyphens, setScroll, setWebPubLetterSpacing, setLetterSpacing, setWebPubLineHeight, setLineHeight, setWebPubParagraphIndent, setParagraphIndent, setWebPubParagraphSpacing, setParagraphSpacing, setWebPubWordSpacing, setWordSpacing, setWebPubSpacingPreset, setWebPubPublisherStyles, setSpacingPreset, setPublisherStyles, setWebPubTextAlign, setTextAlign, setWebPubTextNormalization, setTextNormalization, setWebPubLigatures, setLigatures, setWebPubNoRuby, setNoRuby, setTheme, setWebPubZoom, setFontSize, setSkipBackwardInterval, setSkipForwardInterval, setSkipInterval, setAutoPlay, toggleActionOpen, setVolume, setPlaybackRate, setSleepTimerRemainingSeconds, setSleepTimerOnTrackEnd, setSleepTimerOnFragmentEnd, setRemotePlaybackState, ThReduxPreferencesAdapter, ThReduxGlobalPreferencesAdapter, setImmersive, setOverflow, setUserNavigated, setTocEntry, collapseDockPanel, expandDockPanel, activateDockPanel, deactivateDockPanel, setDockPanelWidth } from './chunk-
|
|
3
|
+
import { setFullscreen, setReaderProfile, setPositionsList, setTocTree, setScriptMode, setRTL, setFXL, setHasDisplayTransformability, setActionOpen, dockAction, setHovering, setSettingsContainer, debounce, setColumnCount, initialWebPubSettingsState, initialSettingsState, setWebPubFontFamily, setFontFamily, setWebPubFontWeight, setFontWeight, setWebPubHyphens, setHyphens, setScroll, setWebPubLetterSpacing, setLetterSpacing, setWebPubLineHeight, setLineHeight, setWebPubParagraphIndent, setParagraphIndent, setWebPubParagraphSpacing, setParagraphSpacing, setWebPubWordSpacing, setWordSpacing, setWebPubSpacingPreset, setWebPubPublisherStyles, setSpacingPreset, setPublisherStyles, setWebPubTextAlign, setTextAlign, setWebPubTextNormalization, setTextNormalization, setWebPubLigatures, setLigatures, setWebPubNoRuby, setNoRuby, setTheme, setWebPubZoom, setFontSize, setSkipBackwardInterval, setSkipForwardInterval, setSkipInterval, setAutoPlay, toggleActionOpen, setVolume, setPlaybackRate, setSleepTimerRemainingSeconds, setSleepTimerOnTrackEnd, setSleepTimerOnFragmentEnd, setRemotePlaybackState, ThReduxPreferencesAdapter, ThReduxGlobalPreferencesAdapter, setImmersive, setOverflow, setUserNavigated, setTocEntry, collapseDockPanel, expandDockPanel, activateDockPanel, deactivateDockPanel, setDockPanelWidth } from './chunk-YEVLT3AV.mjs';
|
|
4
4
|
import { buildTocTree, findTocItemById } from './chunk-TEZB4ULX.mjs';
|
|
5
|
-
import { useSharedPreferences, useActionsPreferences, prefixString, ThDockingTypes, ThSheetTypes, useAudioPreferences, usePreferences, useFilteredPreferenceKeys, defaultSpacingSettingsSubpanel, defaultSpacingSettingsMain, defaultTextSettingsSubpanel, defaultTextSettingsMain, ThTextSettingsKeys, ThSpacingSettingsKeys, buildThemeObject, defaultAudioSkipBackwardInterval, defaultAudioSkipForwardInterval, defaultAudioSkipInterval, defaultPreferences, ThPreferencesProvider, ThGlobalPreferencesProvider } from './chunk-
|
|
5
|
+
import { useSharedPreferences, useActionsPreferences, prefixString, ThDockingTypes, ThSheetTypes, useAudioPreferences, usePreferences, useFilteredPreferenceKeys, defaultSpacingSettingsSubpanel, defaultSpacingSettingsMain, defaultTextSettingsSubpanel, defaultTextSettingsMain, ThTextSettingsKeys, ThSpacingSettingsKeys, buildThemeObject, defaultAudioSkipBackwardInterval, defaultAudioSkipForwardInterval, defaultAudioSkipInterval, defaultPreferences, ThPreferencesProvider, ThGlobalPreferencesProvider } from './chunk-OD75GC5N.mjs';
|
|
6
6
|
import { useAppDispatch, useAppSelector } from './chunk-A575ZW4A.mjs';
|
|
7
|
-
import { isIOSish, buildShortcut, metaKeys } from './chunk-
|
|
7
|
+
import { isIOSish, buildShortcut, metaKeys } from './chunk-44PEO3DS.mjs';
|
|
8
8
|
import { ErrorHandler } from './chunk-RRDEPGBK.mjs';
|
|
9
|
-
import { ThMenuItem, ThActionButton, ThMenu, ThCollapsibleActionsBar, ThPopover, ThContainerHeader, ThNavigationButton, ThContainerBody, ThModal, ThBottomSheet, ThCloseButton, ThDockedPanel, useFirstFocusable, ThTypedComponentRenderer, useActions, useActionComponentStatus, ThForm, ThFormNumberField, usePlugins, ThSettingsWrapper, ThRadioGroup, ThDropdown, ThSwitch, ThNumberField, ThSlider, ThSliderWithPresets, ThLink, ThLibrary, ThHome, ThBackArrow, ThFormSearchField } from './chunk-
|
|
9
|
+
import { ThMenuItem, ThActionButton, ThMenu, ThCollapsibleActionsBar, ThPopover, ThContainerHeader, ThNavigationButton, ThContainerBody, ThModal, ThBottomSheet, ThCloseButton, ThDockedPanel, useFirstFocusable, ThTypedComponentRenderer, useActions, useActionComponentStatus, ThForm, ThFormNumberField, usePlugins, ThSettingsWrapper, ThRadioGroup, ThDropdown, ThSwitch, ThNumberField, ThSlider, ThSliderWithPresets, ThLink, ThLibrary, ThHome, ThBackArrow, ThFormSearchField } from './chunk-ETLIGONP.mjs';
|
|
10
10
|
import { usePrevious } from './chunk-YZ73DHRU.mjs';
|
|
11
|
-
import { useI18n } from './chunk-
|
|
11
|
+
import { useI18n } from './chunk-2NCN2AG2.mjs';
|
|
12
12
|
import { Text, Popover, Dialog, ListBox, ListBoxItem, Radio, Button, Keyboard, Toolbar, useFilter, Tree, TreeItem, TreeItemContent, Collection } from 'react-aria-components';
|
|
13
13
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
14
14
|
import { useObjectRef, useNumberFormatter, FocusScope, useLocale, useFocusWithin } from 'react-aria';
|
|
15
15
|
import classNames4 from 'classnames';
|
|
16
|
-
import React22, { createContext, useCallback, useRef,
|
|
16
|
+
import React22, { createContext, useCallback, useRef, useMemo, useContext, useState, useEffect } from 'react';
|
|
17
17
|
import { Link, HttpFetcher, Manifest, Publication, ReadingProgression, Layout, Feature, Profile } from '@readium/shared';
|
|
18
18
|
import { getScriptMode, TextAlignment } from '@readium/navigator';
|
|
19
19
|
import { useStore } from 'react-redux';
|
|
@@ -219,6 +219,7 @@ var StatefulFullscreenTrigger = ({ variant }) => {
|
|
|
219
219
|
};
|
|
220
220
|
var SvgMoreVert = (props) => /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 -960 960 960", width: "24px", fill: "inherit", ...props, children: /* @__PURE__ */ jsx("path", { d: "M480-160q-33 0-56.5-23.5T400-240q0-33 23.5-56.5T480-320q33 0 56.5 23.5T560-240q0 33-23.5 56.5T480-160Zm0-240q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Zm0-240q-33 0-56.5-23.5T400-720q0-33 23.5-56.5T480-800q33 0 56.5 23.5T560-720q0 33-23.5 56.5T480-640Z" }) });
|
|
221
221
|
var more_vert_default = SvgMoreVert;
|
|
222
|
+
var MENU_DEPENDENCIES = ["Trigger"];
|
|
222
223
|
var StatefulOverflowMenu = ({
|
|
223
224
|
id,
|
|
224
225
|
className,
|
|
@@ -241,7 +242,7 @@ var StatefulOverflowMenu = ({
|
|
|
241
242
|
triggerRef,
|
|
242
243
|
selectionMode: "none",
|
|
243
244
|
className: thorium_web_overflow_default.menu,
|
|
244
|
-
dependencies:
|
|
245
|
+
dependencies: MENU_DEPENDENCIES,
|
|
245
246
|
items,
|
|
246
247
|
compounds: {
|
|
247
248
|
menuTrigger: {
|
|
@@ -274,7 +275,18 @@ var StatefulCollapsibleActionsBar = ({
|
|
|
274
275
|
...props
|
|
275
276
|
}) => {
|
|
276
277
|
const ref = useRef(null);
|
|
277
|
-
const breakpoint = useAppSelector((state) => state.theming.
|
|
278
|
+
const breakpoint = useAppSelector((state) => state.theming.containerBreakpoint);
|
|
279
|
+
const compounds = useMemo(() => ({
|
|
280
|
+
menu: /* @__PURE__ */ jsx(
|
|
281
|
+
StatefulOverflowMenu,
|
|
282
|
+
{
|
|
283
|
+
id,
|
|
284
|
+
triggerRef: ref,
|
|
285
|
+
className: overflowMenuClassName,
|
|
286
|
+
items: []
|
|
287
|
+
}
|
|
288
|
+
)
|
|
289
|
+
}), [id, overflowMenuClassName]);
|
|
278
290
|
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
279
291
|
ThCollapsibleActionsBar,
|
|
280
292
|
{
|
|
@@ -282,17 +294,7 @@ var StatefulCollapsibleActionsBar = ({
|
|
|
282
294
|
id,
|
|
283
295
|
items,
|
|
284
296
|
breakpoint,
|
|
285
|
-
compounds
|
|
286
|
-
menu: /* @__PURE__ */ jsx(
|
|
287
|
-
StatefulOverflowMenu,
|
|
288
|
-
{
|
|
289
|
-
id,
|
|
290
|
-
triggerRef: ref,
|
|
291
|
-
className: overflowMenuClassName,
|
|
292
|
-
items: []
|
|
293
|
-
}
|
|
294
|
-
)
|
|
295
|
-
},
|
|
297
|
+
compounds,
|
|
296
298
|
...props
|
|
297
299
|
}
|
|
298
300
|
) });
|
|
@@ -879,7 +881,7 @@ var useWebkitPatch = (isOpen) => {
|
|
|
879
881
|
try {
|
|
880
882
|
const visual = useNavigator().visual;
|
|
881
883
|
getCframes = visual.getCframes;
|
|
882
|
-
} catch (
|
|
884
|
+
} catch (_e) {
|
|
883
885
|
getCframes = void 0;
|
|
884
886
|
}
|
|
885
887
|
useEffect(() => {
|
|
@@ -907,7 +909,7 @@ var useWebkitPatch = (isOpen) => {
|
|
|
907
909
|
try {
|
|
908
910
|
frameWindow = frame?.window;
|
|
909
911
|
if (!frameWindow?.document?.scrollingElement) return;
|
|
910
|
-
} catch (
|
|
912
|
+
} catch (_e) {
|
|
911
913
|
return;
|
|
912
914
|
}
|
|
913
915
|
if (isHorizontalScroll) {
|
|
@@ -1457,8 +1459,7 @@ var StatefulDockedSheet = ({
|
|
|
1457
1459
|
children,
|
|
1458
1460
|
resetFocus,
|
|
1459
1461
|
focusSelector,
|
|
1460
|
-
focusWithinRef
|
|
1461
|
-
scrollTopOnFocus
|
|
1462
|
+
focusWithinRef
|
|
1462
1463
|
}) => {
|
|
1463
1464
|
const { t } = useI18n();
|
|
1464
1465
|
const dockPortal = flow && document.getElementById(flow);
|
|
@@ -1552,7 +1553,6 @@ var StatefulDockedSheet = ({
|
|
|
1552
1553
|
}
|
|
1553
1554
|
};
|
|
1554
1555
|
var StatefulCompactPopoverSheet = ({
|
|
1555
|
-
id,
|
|
1556
1556
|
triggerRef,
|
|
1557
1557
|
heading,
|
|
1558
1558
|
className,
|
|
@@ -3935,7 +3935,7 @@ var StatefulLineHeight = ({ standalone = true }) => {
|
|
|
3935
3935
|
[prefKey]: computedValue
|
|
3936
3936
|
});
|
|
3937
3937
|
const currentLineHeight = getSetting(prefKey);
|
|
3938
|
-
const currentDisplayLineHeightOption = Object.entries(lineHeightOptions).find(([
|
|
3938
|
+
const currentDisplayLineHeightOption = Object.entries(lineHeightOptions).find(([_key, value2]) => value2 === currentLineHeight)?.[0];
|
|
3939
3939
|
setLineHeight2(currentDisplayLineHeightOption);
|
|
3940
3940
|
}, [prefKey, submitPreferences, getSetting, setLineHeight2, lineHeightOptions]);
|
|
3941
3941
|
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
@@ -4315,6 +4315,7 @@ var StatefulTextAlign = ({ standalone = true }) => {
|
|
|
4315
4315
|
const isWebPub = profile === "webPub";
|
|
4316
4316
|
const isRTL = useAppSelector((state) => state.publication.isRTL);
|
|
4317
4317
|
const textAlign = useReaderSetting("textAlign");
|
|
4318
|
+
const hyphens = useReaderSetting("hyphens");
|
|
4318
4319
|
const dispatch = useAppDispatch();
|
|
4319
4320
|
const { getSetting, submitPreferences } = useNavigator().visual;
|
|
4320
4321
|
const hyphensPrefKey = SETTINGS_KEY_TO_PREFERENCE["hyphens" /* hyphens */];
|
|
@@ -4345,27 +4346,40 @@ var StatefulTextAlign = ({ standalone = true }) => {
|
|
|
4345
4346
|
}
|
|
4346
4347
|
];
|
|
4347
4348
|
const updatePreference = useCallback(async (value) => {
|
|
4348
|
-
const
|
|
4349
|
-
const
|
|
4350
|
-
const hyphens = textAlign2 === null ? null : currentHyphens ?? textAlign2 === TextAlignment.justify;
|
|
4349
|
+
const oldTextAlign = textAlign;
|
|
4350
|
+
const navigatorTextAlign = value === "publisher" /* publisher */ ? null : value === "start" /* start */ ? TextAlignment.start : TextAlignment.justify;
|
|
4351
4351
|
const preferencesToSubmit = {
|
|
4352
|
-
[textAlignPrefKey]:
|
|
4352
|
+
[textAlignPrefKey]: navigatorTextAlign
|
|
4353
4353
|
};
|
|
4354
|
-
if (isHyphensUsed) {
|
|
4355
|
-
preferencesToSubmit[hyphensPrefKey] = hyphens;
|
|
4356
|
-
}
|
|
4357
4354
|
await submitPreferences(preferencesToSubmit);
|
|
4358
4355
|
const textAlignSetting = getSetting(textAlignPrefKey);
|
|
4359
4356
|
const textAlignValue = textAlignSetting === null ? "publisher" /* publisher */ : textAlignSetting;
|
|
4360
|
-
const effectiveHyphens = getSetting(hyphensPrefKey);
|
|
4361
4357
|
if (isWebPub) {
|
|
4362
4358
|
dispatch(setWebPubTextAlign(textAlignValue));
|
|
4363
|
-
dispatch(setWebPubHyphens(effectiveHyphens));
|
|
4364
4359
|
} else {
|
|
4365
4360
|
dispatch(setTextAlign(textAlignValue));
|
|
4366
|
-
dispatch(setHyphens(effectiveHyphens));
|
|
4367
4361
|
}
|
|
4368
|
-
|
|
4362
|
+
if (isHyphensUsed) {
|
|
4363
|
+
if (navigatorTextAlign === null) {
|
|
4364
|
+
await submitPreferences({ [hyphensPrefKey]: null });
|
|
4365
|
+
} else {
|
|
4366
|
+
const wasPublisher = oldTextAlign === "publisher" /* publisher */;
|
|
4367
|
+
let hyphensToSubmit;
|
|
4368
|
+
if (wasPublisher && hyphens === null) {
|
|
4369
|
+
hyphensToSubmit = navigatorTextAlign === TextAlignment.justify;
|
|
4370
|
+
} else {
|
|
4371
|
+
hyphensToSubmit = hyphens;
|
|
4372
|
+
}
|
|
4373
|
+
await submitPreferences({ [hyphensPrefKey]: hyphensToSubmit });
|
|
4374
|
+
const effectiveHyphens = getSetting(hyphensPrefKey);
|
|
4375
|
+
if (isWebPub) {
|
|
4376
|
+
dispatch(setWebPubHyphens(effectiveHyphens));
|
|
4377
|
+
} else {
|
|
4378
|
+
dispatch(setHyphens(effectiveHyphens));
|
|
4379
|
+
}
|
|
4380
|
+
}
|
|
4381
|
+
}
|
|
4382
|
+
}, [hyphensPrefKey, textAlignPrefKey, isWebPub, getSetting, submitPreferences, dispatch, isHyphensUsed, hyphens, textAlign]);
|
|
4369
4383
|
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
4370
4384
|
StatefulRadioGroup,
|
|
4371
4385
|
{
|
|
@@ -5345,6 +5359,7 @@ var StatefulAudioVolumeTrigger = ({ ref }) => {
|
|
|
5345
5359
|
if (volume <= max / 3 * 2) return volume_down_default;
|
|
5346
5360
|
return volume_up_default;
|
|
5347
5361
|
}, [volume, range]);
|
|
5362
|
+
if (isIOSish()) return null;
|
|
5348
5363
|
return /* @__PURE__ */ jsx(
|
|
5349
5364
|
StatefulActionIcon,
|
|
5350
5365
|
{
|
|
@@ -5385,6 +5400,7 @@ var StatefulAudioVolumeContainer = ({ triggerRef, placement = "top" }) => {
|
|
|
5385
5400
|
dispatch(setActionOpen({ key: "audio.volume" /* volume */, isOpen: open, profile }));
|
|
5386
5401
|
}
|
|
5387
5402
|
}, [dispatch, profile]);
|
|
5403
|
+
if (isIOSish()) return null;
|
|
5388
5404
|
return /* @__PURE__ */ jsx(
|
|
5389
5405
|
StatefulSheetWrapper,
|
|
5390
5406
|
{
|
|
@@ -6557,5 +6573,5 @@ var useReaderHeaderBase = (actionKeys) => {
|
|
|
6557
6573
|
};
|
|
6558
6574
|
|
|
6559
6575
|
export { NavigatorProvider, StatefulActionIcon, StatefulAudioAutoPlay, StatefulAudioPlaybackRateContainer, StatefulAudioPlaybackRateTrigger, StatefulAudioRemotePlaybackTrigger, StatefulAudioSettingsContainer, StatefulAudioSkipBackwardInterval, StatefulAudioSkipForwardInterval, StatefulAudioSkipInterval, StatefulAudioSleepTimerContainer, StatefulAudioSleepTimerTrigger, StatefulAudioTocContainer, StatefulAudioTocTrigger, StatefulAudioVolumeContainer, StatefulAudioVolumeTrigger, StatefulBackLink, StatefulBottomSheet, StatefulCollapsibleActionsBar, StatefulColumns, StatefulCompactPopoverSheet, StatefulDockedSheet, StatefulDockingWrapper, StatefulDropdown, StatefulFontFamily, StatefulFullScreenSheet, StatefulFullscreenTrigger, StatefulGlobalPreferencesProvider, StatefulGroupWrapper, StatefulHyphens, StatefulJumpToPositionContainer, StatefulJumpToPositionTrigger, StatefulLayout, StatefulLetterSpacing, StatefulLigatures, StatefulLineHeight, StatefulModalBase, StatefulModalSheet, StatefulNoRuby, StatefulNumberField, StatefulOverflowMenu, StatefulOverflowMenuItem, StatefulParagraphIndent, StatefulParagraphSpacing, StatefulPopoverSheet, StatefulPreferencesProvider, StatefulPublisherStyles, StatefulRadioGroup, StatefulSettingsTrigger, StatefulSettingsWrapper, StatefulSheetWrapper, StatefulSlider, StatefulSliderWithPresets, StatefulSpacingGroup, StatefulSpacingGroupContainer, StatefulSpacingPresets, StatefulSwitch, StatefulTextAlign, StatefulTextGroup, StatefulTextGroupContainer, StatefulTextNormalize, StatefulTheme, StatefulTocContainer, StatefulTocTrigger, StatefulVisualSettingsContainer, StatefulWordSpacing, StatefulZoom, UnstableStatefulFontWeight, createAudioDefaultPlugin, createDefaultPlugin, thorium_web_button_default, thorium_web_overflow_default, thorium_web_reader_app_default, thorium_web_reader_header_default, useDocking, useEffectiveRange, useGridNavigation, useGridTemplate, useIsScroll, useLineHeight, useNavigator, usePlaceholder, usePositionStorage, usePublication, useReaderHeaderBase, useReaderSetting, useReaderTransitions, useSettingsComponentStatus, useSpacingPresets };
|
|
6560
|
-
//# sourceMappingURL=chunk-
|
|
6561
|
-
//# sourceMappingURL=chunk-
|
|
6576
|
+
//# sourceMappingURL=chunk-MSHUPSBI.mjs.map
|
|
6577
|
+
//# sourceMappingURL=chunk-MSHUPSBI.mjs.map
|