@edrlab/thorium-web 1.2.1 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ThPreferencesAdapter-DrZ5_6Dv.d.mts → ThPreferencesAdapter-D0rzsGRl.d.mts} +50 -13
- package/dist/{ThSettingsWrapper-8Kx0SnH4.d.mts → ThSettingsWrapper-BXuRgdqp.d.mts} +42 -4
- package/dist/{actions-D2CHvCHu.d.mts → actions-BLAr0oaM.d.mts} +16 -4
- package/dist/{actionsReducer-kc-S130w.d.mts → actionsReducer-XWTGGNUd.d.mts} +46 -14
- package/dist/chunk-2ORXUOH3.mjs +134 -0
- package/dist/chunk-2ORXUOH3.mjs.map +1 -0
- package/dist/chunk-3GDQP6AS.mjs +14 -0
- package/dist/chunk-3GDQP6AS.mjs.map +1 -0
- package/dist/chunk-6BUN7DEA.mjs +854 -0
- package/dist/chunk-6BUN7DEA.mjs.map +1 -0
- package/dist/{chunk-IYAFKTPL.mjs → chunk-6EHFW43Y.mjs} +5 -4
- package/dist/chunk-6EHFW43Y.mjs.map +1 -0
- package/dist/chunk-7CGMWOZN.mjs +20 -0
- package/dist/chunk-7CGMWOZN.mjs.map +1 -0
- package/dist/{chunk-4VHEHMJN.mjs → chunk-A3FZBEUL.mjs} +228 -94
- package/dist/chunk-A3FZBEUL.mjs.map +1 -0
- package/dist/{chunk-NYZBHYW2.mjs → chunk-DETZMFZ7.mjs} +366 -61
- package/dist/chunk-DETZMFZ7.mjs.map +1 -0
- package/dist/{chunk-QPE574OW.mjs → chunk-DMZFSOHK.mjs} +28 -36
- package/dist/chunk-DMZFSOHK.mjs.map +1 -0
- package/dist/{chunk-7NEQAW7J.mjs → chunk-DTPO3J2C.mjs} +676 -930
- package/dist/chunk-DTPO3J2C.mjs.map +1 -0
- package/dist/{chunk-K3K7TUWM.mjs → chunk-EZG6SBSO.mjs} +358 -94
- package/dist/chunk-EZG6SBSO.mjs.map +1 -0
- package/dist/chunk-GPWW5OML.mjs +1955 -0
- package/dist/chunk-GPWW5OML.mjs.map +1 -0
- package/dist/{chunk-P4V3LA5R.mjs → chunk-I4BKU5NN.mjs} +13 -9
- package/dist/chunk-I4BKU5NN.mjs.map +1 -0
- package/dist/{chunk-47AIIJFO.mjs → chunk-ITDBOMY5.mjs} +3 -3
- package/dist/{chunk-47AIIJFO.mjs.map → chunk-ITDBOMY5.mjs.map} +1 -1
- package/dist/{chunk-XVSFXHYB.mjs → chunk-L4XGZAZ5.mjs} +23 -20
- package/dist/chunk-L4XGZAZ5.mjs.map +1 -0
- package/dist/{chunk-PXAUQJEU.mjs → chunk-LP3JFZ4A.mjs} +2425 -1634
- package/dist/chunk-LP3JFZ4A.mjs.map +1 -0
- package/dist/{chunk-72XCX5TD.mjs → chunk-NKO3K3QS.mjs} +14 -9
- package/dist/chunk-NKO3K3QS.mjs.map +1 -0
- package/dist/chunk-SAUOY37Q.mjs +862 -0
- package/dist/chunk-SAUOY37Q.mjs.map +1 -0
- package/dist/chunk-TEZB4ULX.mjs +57 -0
- package/dist/chunk-TEZB4ULX.mjs.map +1 -0
- package/dist/components/Audio/index.css +1858 -0
- package/dist/components/Audio/index.css.map +1 -0
- package/dist/components/Audio/index.d.mts +103 -0
- package/dist/components/Audio/index.mjs +23 -0
- package/dist/components/Audio/index.mjs.map +1 -0
- package/dist/components/Epub/index.css +365 -9
- package/dist/components/Epub/index.css.map +1 -1
- package/dist/components/Epub/index.d.mts +17 -19
- package/dist/components/Epub/index.mjs +18 -13
- package/dist/components/Misc/index.css +7 -4
- package/dist/components/Misc/index.css.map +1 -1
- package/dist/components/Misc/index.mjs +5 -133
- package/dist/components/Misc/index.mjs.map +1 -1
- package/dist/components/Reader/index.css +1022 -183
- package/dist/components/Reader/index.css.map +1 -1
- package/dist/components/Reader/index.d.mts +16 -16
- package/dist/components/Reader/index.mjs +124 -25
- package/dist/components/Reader/index.mjs.map +1 -1
- package/dist/components/WebPub/index.css +365 -9
- package/dist/components/WebPub/index.css.map +1 -1
- package/dist/components/WebPub/index.d.mts +16 -16
- package/dist/components/WebPub/index.mjs +18 -13
- package/dist/core/Components/index.d.mts +64 -15
- package/dist/core/Components/index.mjs +2 -1
- package/dist/core/Helpers/index.d.mts +2 -2
- package/dist/core/Helpers/index.mjs +4 -2
- package/dist/core/Hooks/index.d.mts +7 -8
- package/dist/core/Hooks/index.mjs +3 -1
- package/dist/i18n/index.mjs +6 -7
- package/dist/lib/index.d.mts +159 -15
- package/dist/lib/index.mjs +4 -2
- package/dist/lib-M3PPQDJJ.mjs +6548 -0
- package/dist/lib-M3PPQDJJ.mjs.map +1 -0
- package/dist/locales/en/thorium-web.json +22 -0
- package/dist/next-lib/index.mjs +2 -0
- package/dist/next-lib/index.mjs.map +1 -1
- package/dist/preferences/index.d.mts +111 -13
- package/dist/preferences/index.mjs +6 -3
- package/dist/{settingsReducer-C1wwCAMv.d.mts → settingsReducer-Bu1zeveu.d.mts} +1 -1
- package/dist/{ui-CamWuqOo.d.mts → ui-nBv8gfr0.d.mts} +20 -1
- package/dist/useAudioNavigator-C5aW4-eT.d.mts +133 -0
- package/dist/{useContrast-D6sjPjxy.d.mts → useContrast-2t429O9O.d.mts} +16 -8
- package/dist/usePreferences-VaBf46eP.d.mts +230 -0
- package/dist/useReaderTransitions-IBGdE7qi.d.mts +530 -0
- package/dist/{useTimeline-DyMx_aWY.d.mts → useTimeline-DCZ1qoCO.d.mts} +4 -2
- package/package.json +17 -13
- package/dist/chunk-4VHEHMJN.mjs.map +0 -1
- package/dist/chunk-72XCX5TD.mjs.map +0 -1
- package/dist/chunk-7NEQAW7J.mjs.map +0 -1
- package/dist/chunk-IYAFKTPL.mjs.map +0 -1
- package/dist/chunk-K3K7TUWM.mjs.map +0 -1
- package/dist/chunk-NYZBHYW2.mjs.map +0 -1
- package/dist/chunk-P4V3LA5R.mjs.map +0 -1
- package/dist/chunk-PXAUQJEU.mjs.map +0 -1
- package/dist/chunk-QPE574OW.mjs.map +0 -1
- package/dist/chunk-XVSFXHYB.mjs.map +0 -1
- package/dist/useEpubNavigator-CwHJfoiV.d.mts +0 -42
- package/dist/usePreferences-BXFJbval.d.mts +0 -43
- package/dist/useReaderTransitions-guT-eA-Q.d.mts +0 -365
- package/dist/useWebPubNavigator-CuSNQKMw.d.mts +0 -39
|
@@ -104,5 +104,27 @@
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
+
},
|
|
108
|
+
"audio": {
|
|
109
|
+
"player": {
|
|
110
|
+
"progress": "Playback progress",
|
|
111
|
+
"controls": "Playback controls",
|
|
112
|
+
"mediaControls": "Audio settings",
|
|
113
|
+
"coverAlt": "Audiobook cover"
|
|
114
|
+
},
|
|
115
|
+
"remotePlayback": {
|
|
116
|
+
"trigger": "Remote Playback",
|
|
117
|
+
"connected": "Remote connected"
|
|
118
|
+
},
|
|
119
|
+
"settings": {
|
|
120
|
+
"sleepTimer": {
|
|
121
|
+
"hours": "h",
|
|
122
|
+
"minutes": "min",
|
|
123
|
+
"seconds": "s",
|
|
124
|
+
"start": "Start",
|
|
125
|
+
"instruction": "Playback will pause after the set duration.",
|
|
126
|
+
"remaining": "Pausing in {{ remaining }}"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
107
129
|
}
|
|
108
130
|
}
|
package/dist/next-lib/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/next-lib/helpers/verifyManifest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/next-lib/helpers/verifyManifest.ts"],"names":[],"mappings":";;;AAyCO,IAAM,iBAAA,GAAoB,CAC/B,OAAA,KACyB;AACzB,EAAA,MAAM,EAAE,WAAA,EAAa,cAAA,GAAiB,EAAC,EAAG,kBAAkB,OAAA,CAAQ,GAAA,CAAI,QAAA,KAAa,YAAA,EAAa,GAAI,OAAA;AAEtG,EAAA,IAAI,CAAC,WAAA,EAAa;AAChB,IAAA,OAAO;AAAA,MACL,OAAA,EAAS,KAAA;AAAA,MACT,GAAA,EAAK,EAAA;AAAA,MACL,KAAA,EAAO;AAAA,KACT;AAAA,EACF;AAEA,EAAA,IAAI;AACF,IAAA,MAAM,GAAA,GAAM,IAAI,GAAA,CAAI,WAAW,CAAA;AAG/B,IAAA,MAAM,SAAA,GAAY,eAAA,IAChB,cAAA,CAAe,MAAA,KAAW,CAAA,IAC1B,cAAA,CAAe,QAAA,CAAS,GAAG,CAAA,IAC3B,cAAA,CAAe,IAAA,CAAK,CAAA,MAAA,KAAU;AAC5B,MAAA,IAAI;AACF,QAAA,MAAM,SAAA,GAAY,MAAA,CAAO,UAAA,CAAW,MAAM,CAAA,GACtC,IAAI,GAAA,CAAI,MAAM,CAAA,GACd,IAAI,GAAA,CAAI,CAAA,QAAA,EAAY,MAAO,CAAA,CAAE,CAAA;AACjC,QAAA,OAAO,GAAA,CAAI,aAAa,SAAA,CAAU,QAAA;AAAA,MACpC,CAAA,CAAA,MAAQ;AACN,QAAA,OAAO,KAAA;AAAA,MACT;AAAA,IACF,CAAC,CAAA;AAEH,IAAA,IAAI,CAAC,SAAA,EAAW;AACd,MAAA,OAAO;AAAA,QACL,OAAA,EAAS,KAAA;AAAA,QACT,GAAA,EAAK,WAAA;AAAA,QACL,KAAA,EAAO;AAAA,OACT;AAAA,IACF;AAEA,IAAA,OAAO;AAAA,MACL,OAAA,EAAS,IAAA;AAAA,MACT,GAAA,EAAK;AAAA,KACP;AAAA,EAEF,SAAS,KAAA,EAAO;AACd,IAAA,OAAO;AAAA,MACL,OAAA,EAAS,KAAA;AAAA,MACT,GAAA,EAAK,WAAA;AAAA,MACL,KAAA,EAAO;AAAA,KACT;AAAA,EACF;AACF;AAQO,IAAM,wBAAA,GAA2B,CAAC,WAAA,KAA8C;AACrF,EAAA,MAAM,iBAAA,GAAoB,OAAA,CAAQ,GAAA,CAAI,wBAAA,EAA0B,MAAK,IAAK,EAAA;AAC1E,EAAA,MAAM,cAAA,GAAiB,iBAAA,CACpB,KAAA,CAAM,GAAG,CAAA,CACT,GAAA,CAAI,CAAA,CAAA,KAAK,CAAA,CAAE,IAAA,EAAM,CAAA,CACjB,MAAA,CAAO,OAAO,CAAA;AAEjB,EAAA,OAAO,iBAAA,CAAkB;AAAA,IACvB,WAAA;AAAA,IACA,cAAA;AAAA,IACA,iBAAiB,OAAA,CAAQ,GAAA,CAAI,QAAA,KAAa,YAAA,IAAgB,eAAe,MAAA,KAAW;AAAA,GACrF,CAAA;AACH","file":"index.mjs","sourcesContent":["interface VerifyManifestOptions {\n /**\n * The URL of the manifest to verify\n */\n manifestUrl: string;\n \n /**\n * List of allowed domains (without protocol)\n * If empty or contains \"*\", all domains are allowed\n */\n allowedDomains?: string[];\n \n /**\n * Whether to allow all domains (overrides allowedDomains if true)\n * @default process.env.NODE_ENV !== \"production\"\n */\n allowAllDomains?: boolean;\n}\n\ninterface VerifyManifestResult {\n /**\n * Whether the manifest URL is allowed\n */\n allowed: boolean;\n \n /**\n * The normalized manifest URL\n */\n url: string;\n \n /**\n * Error message if verification failed\n */\n error?: string;\n}\n\n/**\n * Verifies if a manifest URL is allowed based on domain restrictions\n * @param options Verification options\n * @returns Verification result\n */\nexport const verifyManifestUrl = (\n options: VerifyManifestOptions\n): VerifyManifestResult => {\n const { manifestUrl, allowedDomains = [], allowAllDomains = process.env.NODE_ENV !== \"production\" } = options;\n \n if (!manifestUrl) {\n return {\n allowed: false,\n url: \"\",\n error: \"URL is required\"\n };\n }\n\n try {\n const url = new URL(manifestUrl);\n \n // In development or if no domains are specified, allow all\n const isAllowed = allowAllDomains || \n allowedDomains.length === 0 ||\n allowedDomains.includes(\"*\") ||\n allowedDomains.some(domain => {\n try {\n const domainUrl = domain.startsWith(\"http\") \n ? new URL(domain) \n : new URL(`https://${ domain }`);\n return url.hostname === domainUrl.hostname;\n } catch {\n return false;\n }\n });\n \n if (!isAllowed) {\n return {\n allowed: false,\n url: manifestUrl,\n error: \"Domain not allowed\"\n };\n }\n \n return {\n allowed: true,\n url: manifestUrl\n };\n \n } catch (error) {\n return {\n allowed: false,\n url: manifestUrl,\n error: \"Invalid URL\"\n };\n }\n}\n\n/**\n * Verifies a manifest URL from environment configuration\n * Uses MANIFEST_ALLOWED_DOMAINS environment variable for domain restrictions\n * @param manifestUrl The manifest URL to verify\n * @returns Verification result\n */\nexport const verifyManifestUrlFromEnv = (manifestUrl: string): VerifyManifestResult => {\n const allowedDomainsRaw = process.env.MANIFEST_ALLOWED_DOMAINS?.trim() || \"\";\n const allowedDomains = allowedDomainsRaw\n .split(\",\")\n .map(d => d.trim())\n .filter(Boolean);\n \n return verifyManifestUrl({\n manifestUrl,\n allowedDomains,\n allowAllDomains: process.env.NODE_ENV !== \"production\" || allowedDomains.length === 0\n });\n}\n"]}
|
|
@@ -1,26 +1,56 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
export {
|
|
7
|
-
import {
|
|
8
|
-
export {
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { a as ThAudioPreferences, A as AudioDefaultKeys, b as AudioCustomizableKeys, c as ThAudioPreferencesAdapter } from '../usePreferences-VaBf46eP.mjs';
|
|
2
|
+
export { g as AudioSettingsKey, i as ThAudioActionKey, m as ThAudioActionKeys, j as ThAudioActionsPref, d as ThAudioAffordance, k as ThAudioConstraintKeys, h as ThAudioKeyTypes, n as ThAudioKeys, q as ThAudioSettingsKeys, f as ThAudioThemeKey, e as ThAudioThemeKeys, T as ThPreferencesProvider, p as ThSettingsTimerPref, o as ThSettingsTimerVariant, l as createAudioPreferences, s as defaultAudioPlaybackRate, B as defaultAudioPlaybackRateAction, D as defaultAudioRemotePlaybackAction, t as defaultAudioSkipBackwardInterval, v as defaultAudioSkipForwardInterval, w as defaultAudioSkipInterval, x as defaultAudioSleepTimer, C as defaultAudioSleepTimerAction, y as defaultAudioSleepTimerPresetList, E as defaultAudioTocAction, r as defaultAudioVolume, z as defaultAudioVolumeAction, u as usePreferences } from '../usePreferences-VaBf46eP.mjs';
|
|
3
|
+
import * as React$1 from 'react';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
+
import { C as CustomizableKeys, D as DefaultKeys, d as ThPreferences, c as ThPreferencesAdapter, a as ThemeTokens, F as FontCollection, L as LocalStaticFontFile, e as FontDefinition, T as ThThemeKeys } from '../ThPreferencesAdapter-D0rzsGRl.mjs';
|
|
6
|
+
export { A as ActionKey, o as ActionKeyType, b as AudioContentProtectionConfig, U as BunnyFontSource, x as CSSAbsoluteLength, y as CSSAngle, Q as CSSColor, z as CSSDefaultViewport, B as CSSDynamicViewport, G as CSSFontRelativeLength, E as CSSFrequency, H as CSSLargeViewport, I as CSSPhysicalLength, J as CSSRelativeLength, K as CSSResolution, M as CSSRootFontRelativeLength, N as CSSSmallViewport, O as CSSTime, v as CSSValueUnitless, w as CSSValueWithUnit, P as CSSViewport, a9 as ContentProtectionConfig, a7 as CopyProtectionConfig, a0 as FontSource, a1 as FontSpec, X as GoogleFontSource, $ as LocalFontSource, Z as LocalStaticFontSource, Y as LocalVariableFontFile, _ as LocalVariableFontSource, a8 as PrintProtectionConfig, S as SettingsKey, q as SettingsKeyType, h as SpacingSettingsKey, s as SpacingSettingsKeyType, R as SystemFontSource, g as TextSettingsKey, r as TextSettingsKeyType, k as ThActionsPref, m as ThConstraintKeys, a3 as ThFontFamilyPref, l as ThSettingsKeyTypes, i as ThSettingsSpacingPresets, j as ThSpacingPreset, f as ThemeKey, p as ThemeKeyType, a2 as ValidatedLanguageCollection, V as VariableFontRangeConfig, W as WeightConfig, aj as contrast1Theme, ak as contrast2Theme, al as contrast3Theme, n as createPreferences, ag as darkTheme, ad as defaultAudioContentProtectionConfig, ac as defaultContentProtectionConfig, a5 as defaultFontCollection, ae as devContentProtectionConfig, af as lightTheme, ah as paperTheme, a4 as readiumCSSFontCollection, ab as resolveAudioContentProtectionConfig, aa as resolveContentProtectionConfig, ai as sepiaTheme, a6 as tamilCollection, u as useTheming, t as useThemingProps } from '../ThPreferencesAdapter-D0rzsGRl.mjs';
|
|
7
|
+
import { e as ThColorScheme, g as ThSettingsKeys, h as ThTextSettingsKeys, b as ThSpacingSettingsKeys, a as ThSpacingPresetKeys } from '../useContrast-2t429O9O.mjs';
|
|
8
|
+
export { I as I18nValue, p as ThLayoutOptions, T as ThLineHeightOptions, m as ThSettingsContainerKeys, j as ThSettingsGroupPref, i as ThSettingsRadioPref, o as ThSettingsRangePlaceholder, l as ThSettingsRangePref, d as ThSettingsRangePrefRequired, n as ThSettingsRangeVariant, c as ThTextAlignOptions, z as defaultLetterSpacing, A as defaultLineHeights, x as defaultParagraphIndent, w as defaultParagraphSpacing, C as defaultSpacingPresets, v as defaultSpacingPresetsOrder, s as defaultSpacingSettingsMain, t as defaultSpacingSettingsSubpanel, q as defaultTextSettingsMain, r as defaultTextSettingsSubpanel, y as defaultWordSpacing, B as defaultZoom } from '../useContrast-2t429O9O.mjs';
|
|
9
|
+
import { f as ThDockingPref, T as ThDockingKeys, c as ThActionsTokens, b as ThAudioActionsTokens, g as ThActionsKeys } from '../actions-BLAr0oaM.mjs';
|
|
10
|
+
export { k as ThActionsDockedPref, l as ThActionsSnappedPref, j as ThBottomSheetDetent, m as ThDockingTypes, a as ThSheetHeaderVariant, e as ThSheetTypes, n as defaultActionKeysObject, p as defaultFullscreenAction, r as defaultJumpToPositionAction, o as defaultSettingsAction, q as defaultTocAction } from '../actions-BLAr0oaM.mjs';
|
|
11
|
+
import { T as ThLayoutDirection, a as ThBackLinkPref, B as BreakpointsMap } from '../ui-nBv8gfr0.mjs';
|
|
12
|
+
export { p as ThArrowVariant, b as ThAudioPlayerComponent, d as ThAudioProgressBarVariant, r as ThAudioPublicationMetadataComponent, m as ThBackLinkContent, q as ThBackLinkVariant, e as ThBreakpoints, g as ThDocumentTitleFormat, h as ThFormatPref, n as ThFormatPrefValue, k as ThLayoutUI, l as ThPaginatedAffordancePref, o as ThPaginatedAffordancePrefValue, j as ThProgressionFormat, c as ThPublicationMetadataOrder, i as ThRunningHeadFormat } from '../ui-nBv8gfr0.mjs';
|
|
13
|
+
import { e as UnstableShortcutRepresentation } from '../keyboardUtilities-BWAyLS_D.mjs';
|
|
11
14
|
import '@readium/navigator';
|
|
12
|
-
import 'react/jsx-runtime';
|
|
13
15
|
import 'react-aria-components';
|
|
14
16
|
|
|
17
|
+
declare const defaultAudioPreferences: ThAudioPreferences<AudioDefaultKeys>;
|
|
18
|
+
|
|
19
|
+
interface AudioPreferencesContextValue<K extends AudioCustomizableKeys = AudioDefaultKeys> {
|
|
20
|
+
preferences: ThAudioPreferences<K>;
|
|
21
|
+
updatePreferences: (prefs: ThAudioPreferences<K>) => void;
|
|
22
|
+
}
|
|
23
|
+
declare const ThAudioPreferencesContext: React$1.Context<AudioPreferencesContextValue<any> | null>;
|
|
24
|
+
declare const defaultAudioPreferencesContextValue: AudioPreferencesContextValue<AudioDefaultKeys>;
|
|
25
|
+
|
|
26
|
+
type Props<K extends AudioCustomizableKeys = AudioDefaultKeys> = {
|
|
27
|
+
adapter?: ThAudioPreferencesAdapter<K>;
|
|
28
|
+
initialPreferences?: ThAudioPreferences<K>;
|
|
29
|
+
devMode?: boolean;
|
|
30
|
+
children: React.ReactNode;
|
|
31
|
+
};
|
|
32
|
+
declare function ThAudioPreferencesProvider<K extends AudioCustomizableKeys = AudioDefaultKeys>({ adapter, initialPreferences, devMode, children, }: Props<K>): react_jsx_runtime.JSX.Element;
|
|
33
|
+
|
|
15
34
|
interface PreferencesContextValue<K extends CustomizableKeys = DefaultKeys> {
|
|
16
35
|
preferences: ThPreferences<K>;
|
|
17
36
|
updatePreferences: (prefs: ThPreferences<K>) => void;
|
|
18
37
|
}
|
|
19
|
-
declare const ThPreferencesContext: React.Context<PreferencesContextValue<any> | null>;
|
|
38
|
+
declare const ThPreferencesContext: React$1.Context<PreferencesContextValue<any> | null>;
|
|
20
39
|
declare const defaultPreferencesContextValue: PreferencesContextValue<DefaultKeys>;
|
|
21
40
|
|
|
22
41
|
declare const defaultPreferences: ThPreferences<DefaultKeys>;
|
|
23
42
|
|
|
43
|
+
declare class ThAudioMemoryPreferencesAdapter<T extends AudioCustomizableKeys = AudioCustomizableKeys> implements ThAudioPreferencesAdapter<T> {
|
|
44
|
+
private currentPreferences;
|
|
45
|
+
private listeners;
|
|
46
|
+
constructor(initialPreferences: ThAudioPreferences<T>);
|
|
47
|
+
getPreferences(): ThAudioPreferences<T>;
|
|
48
|
+
setPreferences(prefs: ThAudioPreferences<T>): void;
|
|
49
|
+
subscribe(listener: (prefs: ThAudioPreferences<T>) => void): void;
|
|
50
|
+
unsubscribe(listener: (prefs: ThAudioPreferences<T>) => void): void;
|
|
51
|
+
private notifyListeners;
|
|
52
|
+
}
|
|
53
|
+
|
|
24
54
|
declare class ThMemoryPreferencesAdapter<T extends CustomizableKeys = CustomizableKeys> implements ThPreferencesAdapter<T> {
|
|
25
55
|
private currentPreferences;
|
|
26
56
|
private listeners;
|
|
@@ -96,6 +126,31 @@ interface CreateFontDefinitionParams {
|
|
|
96
126
|
*/
|
|
97
127
|
declare const createDefinitionFromStaticFonts: (params: CreateFontDefinitionParams) => FontDefinition;
|
|
98
128
|
|
|
129
|
+
declare const validateObjectKeys: <K extends string, V>(orderArrays: K[][], keysObj: Record<string, V>, context: string, specialCase?: string | string[], fallback?: V) => void;
|
|
130
|
+
|
|
131
|
+
interface ActionsPreferences {
|
|
132
|
+
docking: ThDockingPref<ThDockingKeys>;
|
|
133
|
+
actionsKeys: Record<string, ThActionsTokens | ThAudioActionsTokens>;
|
|
134
|
+
}
|
|
135
|
+
interface AudioActionsPreferences {
|
|
136
|
+
docking: ThDockingPref<ThDockingKeys>;
|
|
137
|
+
primaryActionsKeys: Record<string, ThAudioActionsTokens>;
|
|
138
|
+
secondaryActionsKeys: Record<string, ThActionsTokens>;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Context-agnostic hook for docking/actions infrastructure.
|
|
142
|
+
* Resolves preferences from the audio context when available,
|
|
143
|
+
* falling back to the reader context. This allows shared
|
|
144
|
+
* components (docking, action containers) to work in both.
|
|
145
|
+
*/
|
|
146
|
+
declare const useActionsPreferences: () => ActionsPreferences;
|
|
147
|
+
declare const useAudioActionsPreferences: () => AudioActionsPreferences;
|
|
148
|
+
|
|
149
|
+
declare function useAudioPreferences<K extends AudioCustomizableKeys = AudioDefaultKeys>(): {
|
|
150
|
+
preferences: ThAudioPreferences<K>;
|
|
151
|
+
updatePreferences: (prefs: ThAudioPreferences<K>) => void;
|
|
152
|
+
};
|
|
153
|
+
|
|
99
154
|
declare const usePreferenceKeys: () => {
|
|
100
155
|
reflowActionKeys: ThActionsKeys[];
|
|
101
156
|
fxlActionKeys: ThActionsKeys[];
|
|
@@ -114,4 +169,47 @@ declare const usePreferenceKeys: () => {
|
|
|
114
169
|
webPubSpacingPresetKeys: ThSpacingPresetKeys[];
|
|
115
170
|
};
|
|
116
171
|
|
|
117
|
-
|
|
172
|
+
interface SharedPreferences {
|
|
173
|
+
direction?: ThLayoutDirection;
|
|
174
|
+
locale?: string;
|
|
175
|
+
shortcuts: {
|
|
176
|
+
representation: UnstableShortcutRepresentation;
|
|
177
|
+
joiner?: string;
|
|
178
|
+
};
|
|
179
|
+
docking: ThDockingPref<ThDockingKeys>;
|
|
180
|
+
theming: {
|
|
181
|
+
icon: {
|
|
182
|
+
size: number;
|
|
183
|
+
tooltipOffset: number;
|
|
184
|
+
tooltipDelay?: number;
|
|
185
|
+
};
|
|
186
|
+
header?: {
|
|
187
|
+
backLink?: ThBackLinkPref | null;
|
|
188
|
+
};
|
|
189
|
+
themes: {
|
|
190
|
+
systemThemes?: {
|
|
191
|
+
light: string;
|
|
192
|
+
dark: string;
|
|
193
|
+
};
|
|
194
|
+
keys: Record<string, ThemeTokens>;
|
|
195
|
+
audioOrder?: Array<string>;
|
|
196
|
+
reflowOrder?: Array<string>;
|
|
197
|
+
fxlOrder?: Array<string>;
|
|
198
|
+
};
|
|
199
|
+
layout: {
|
|
200
|
+
defaults: {
|
|
201
|
+
dockingWidth: number;
|
|
202
|
+
scrim: string;
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
breakpoints: BreakpointsMap<number | null>;
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Resolves preference values that are shared across both provider trees
|
|
210
|
+
* (audio and reader). Both providers expose these fields — this hook picks
|
|
211
|
+
* the active one so callers never need to touch the contexts directly.
|
|
212
|
+
*/
|
|
213
|
+
declare const useSharedPreferences: () => SharedPreferences;
|
|
214
|
+
|
|
215
|
+
export { type ActionsPreferences, type AudioActionsPreferences, AudioCustomizableKeys, AudioDefaultKeys, type AudioPreferencesContextValue, CustomizableKeys, DefaultKeys, FontCollection, FontDefinition, type GoogleFontDefinitionParams, LocalStaticFontFile, type PreferencesContextValue, type SharedPreferences, ThActionsKeys, ThActionsTokens, ThAudioActionsTokens, ThAudioMemoryPreferencesAdapter, ThAudioPreferences, ThAudioPreferencesAdapter, ThAudioPreferencesContext, ThAudioPreferencesProvider, ThBackLinkPref, ThDockingKeys, ThDockingPref, ThLayoutDirection, ThMemoryPreferencesAdapter, ThPreferences, ThPreferencesAdapter, ThPreferencesContext, ThSettingsKeys, ThSpacingPresetKeys, ThSpacingSettingsKeys, ThTextSettingsKeys, ThThemeKeys, ThemeTokens, buildThemeObject, type buildThemeProps, createDefinitionFromStaticFonts, createDefinitionsFromBunnyFonts, createDefinitionsFromGoogleFonts, defaultAudioPreferences, defaultAudioPreferencesContextValue, defaultPreferences, defaultPreferencesContextValue, useActionsPreferences, useAudioActionsPreferences, useAudioPreferences, usePreferenceKeys, useSharedPreferences, validateObjectKeys };
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { ThArrowVariant, ThBackLinkVariant, ThBreakpoints, ThDocumentTitleFormat, ThLayoutDirection, ThLayoutUI, ThProgressionFormat, ThRunningHeadFormat } from '../chunk-XVSFXHYB.mjs';
|
|
1
|
+
export { ThAudioMemoryPreferencesAdapter, ThAudioPreferencesProvider, ThMemoryPreferencesAdapter, ThPreferencesProvider, buildThemeObject, createDefinitionsFromBunnyFonts, useActionsPreferences, useAudioActionsPreferences, useAudioPreferences, usePreferenceKeys, usePreferences, useTheming } from '../chunk-GPWW5OML.mjs';
|
|
3
2
|
import '../chunk-GFSLVQIG.mjs';
|
|
4
|
-
import '../chunk-5LUMM7FW.mjs';
|
|
5
3
|
import '../chunk-NQ2ZSGCX.mjs';
|
|
4
|
+
export { ThActionsKeys, ThAudioActionKeys, ThAudioAffordance, ThAudioKeys, ThAudioPreferencesContext, ThDockingKeys, ThDockingTypes, ThLayoutOptions, ThLineHeightOptions, ThPreferencesContext, ThSettingsContainerKeys, ThSettingsKeys, ThSettingsRangePlaceholder, ThSettingsRangeVariant, ThSettingsTimerVariant, ThSheetHeaderVariant, ThSheetTypes, ThSpacingPresetKeys, ThSpacingSettingsKeys, ThTextAlignOptions, ThTextSettingsKeys, ThThemeKeys, contrast1Theme, contrast2Theme, contrast3Theme, createAudioPreferences, createDefinitionFromStaticFonts, createDefinitionsFromGoogleFonts, createPreferences, darkTheme, defaultActionKeysObject, defaultAudioContentProtectionConfig, defaultAudioPlaybackRate, defaultAudioPlaybackRateAction, defaultAudioPreferences, defaultAudioPreferencesContextValue, defaultAudioRemotePlaybackAction, defaultAudioSkipBackwardInterval, defaultAudioSkipForwardInterval, defaultAudioSkipInterval, defaultAudioSleepTimer, defaultAudioSleepTimerAction, defaultAudioSleepTimerPresetList, defaultAudioTocAction, defaultAudioVolume, defaultAudioVolumeAction, defaultContentProtectionConfig, defaultFontCollection, defaultFullscreenAction, defaultJumpToPositionAction, defaultLetterSpacing, defaultLineHeights, defaultParagraphIndent, defaultParagraphSpacing, defaultPreferences, defaultPreferencesContextValue, defaultSettingsAction, defaultSpacingPresets, defaultSpacingPresetsOrder, defaultSpacingSettingsMain, defaultSpacingSettingsSubpanel, defaultTextSettingsMain, defaultTextSettingsSubpanel, defaultTocAction, defaultWordSpacing, defaultZoom, devContentProtectionConfig, lightTheme, paperTheme, readiumCSSFontCollection, resolveAudioContentProtectionConfig, resolveContentProtectionConfig, sepiaTheme, tamilCollection, useSharedPreferences, validateObjectKeys } from '../chunk-DTPO3J2C.mjs';
|
|
6
5
|
import '../chunk-B3WDMWCT.mjs';
|
|
7
6
|
import '../chunk-MLEYTQGK.mjs';
|
|
7
|
+
import '../chunk-7CGMWOZN.mjs';
|
|
8
|
+
export { ThArrowVariant, ThAudioPlayerComponent, ThAudioProgressBarVariant, ThAudioPublicationMetadataComponent, ThBackLinkVariant, ThBreakpoints, ThDocumentTitleFormat, ThLayoutDirection, ThLayoutUI, ThProgressionFormat, ThRunningHeadFormat } from '../chunk-L4XGZAZ5.mjs';
|
|
9
|
+
import '../chunk-5LUMM7FW.mjs';
|
|
10
|
+
import '../chunk-3GDQP6AS.mjs';
|
|
8
11
|
//# sourceMappingURL=index.mjs.map
|
|
9
12
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
2
2
|
import { W as WritableDraft } from './immer.d-CoRThNOF.mjs';
|
|
3
|
-
import { T as ThLineHeightOptions, a as ThSpacingPresetKeys, b as ThSpacingSettingsKeys, c as ThTextAlignOptions } from './useContrast-
|
|
3
|
+
import { T as ThLineHeightOptions, a as ThSpacingPresetKeys, b as ThSpacingSettingsKeys, c as ThTextAlignOptions } from './useContrast-2t429O9O.mjs';
|
|
4
4
|
|
|
5
5
|
interface FontFamilyStateObject {
|
|
6
6
|
default: string;
|
|
@@ -101,5 +101,24 @@ declare enum ThRunningHeadFormat {
|
|
|
101
101
|
chapter = "chapter",
|
|
102
102
|
none = "none"
|
|
103
103
|
}
|
|
104
|
+
declare enum ThAudioPlayerComponent {
|
|
105
|
+
cover = "cover",
|
|
106
|
+
metadata = "metadata",
|
|
107
|
+
playbackControls = "playbackControls",
|
|
108
|
+
progressBar = "progressBar",
|
|
109
|
+
mediaActions = "mediaActions"
|
|
110
|
+
}
|
|
111
|
+
declare enum ThAudioProgressBarVariant {
|
|
112
|
+
normal = "normal",
|
|
113
|
+
segmented = "segmented"
|
|
114
|
+
}
|
|
115
|
+
declare enum ThAudioPublicationMetadataComponent {
|
|
116
|
+
title = "title",
|
|
117
|
+
titleWithSubtitle = "titleWithSubtitle",
|
|
118
|
+
subtitleWithTitle = "subtitleWithTitle",
|
|
119
|
+
authors = "authors"
|
|
120
|
+
}
|
|
121
|
+
type TitleVariant = ThAudioPublicationMetadataComponent.title | ThAudioPublicationMetadataComponent.titleWithSubtitle | ThAudioPublicationMetadataComponent.subtitleWithTitle;
|
|
122
|
+
type ThPublicationMetadataOrder = [TitleVariant] | [TitleVariant, ThAudioPublicationMetadataComponent.authors] | [ThAudioPublicationMetadataComponent.authors, TitleVariant];
|
|
104
123
|
|
|
105
|
-
export { type BreakpointsMap as B,
|
|
124
|
+
export { type BreakpointsMap as B, ThLayoutDirection as T, type ThBackLinkPref as a, ThAudioPlayerComponent as b, type ThPublicationMetadataOrder as c, ThAudioProgressBarVariant as d, ThBreakpoints as e, type ThBreakpointsObject as f, ThDocumentTitleFormat as g, type ThFormatPref as h, ThRunningHeadFormat as i, ThProgressionFormat as j, ThLayoutUI as k, type ThPaginatedAffordancePref as l, type ThBackLinkContent as m, type ThFormatPrefValue as n, type ThPaginatedAffordancePrefValue as o, ThArrowVariant as p, ThBackLinkVariant as q, ThAudioPublicationMetadataComponent as r, useBreakpoints as u };
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import * as _readium_navigator from '@readium/navigator';
|
|
2
|
+
import { EpubNavigatorListeners, IEpubPreferences, IEpubDefaults, IInjectablesConfig, IContentProtectionConfig, EpubSettings, WebPubNavigatorListeners, IWebPubPreferences, IWebPubDefaults, WebPubSettings, AudioNavigatorListeners, IAudioPreferences, IAudioDefaults } from '@readium/navigator';
|
|
3
|
+
import { Publication, Locator, Link, Layout, Timeline } from '@readium/shared';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
|
|
6
|
+
type cbb$2 = (ok: boolean) => void;
|
|
7
|
+
interface EpubNavigatorLoadProps {
|
|
8
|
+
container: HTMLDivElement | null;
|
|
9
|
+
publication: Publication;
|
|
10
|
+
listeners: EpubNavigatorListeners;
|
|
11
|
+
positionsList?: Locator[];
|
|
12
|
+
initialPosition?: Locator;
|
|
13
|
+
preferences?: IEpubPreferences;
|
|
14
|
+
defaults?: IEpubDefaults;
|
|
15
|
+
injectables?: IInjectablesConfig;
|
|
16
|
+
contentProtection?: IContentProtectionConfig;
|
|
17
|
+
}
|
|
18
|
+
declare const useEpubNavigator: () => {
|
|
19
|
+
EpubNavigatorLoad: (config: EpubNavigatorLoadProps, cb: Function, fxlCallback?: (locator: Locator) => void) => void;
|
|
20
|
+
EpubNavigatorDestroy: (cb: Function) => void;
|
|
21
|
+
goRight: (animated: boolean, callback: cbb$2) => void;
|
|
22
|
+
goLeft: (animated: boolean, callback: cbb$2) => void;
|
|
23
|
+
goBackward: (animated: boolean, callback: cbb$2) => void;
|
|
24
|
+
goForward: (animated: boolean, callback: cbb$2) => void;
|
|
25
|
+
goLink: (link: Link, animated: boolean, callback: cbb$2) => void;
|
|
26
|
+
go: (locator: Locator, animated: boolean, callback: cbb$2) => void;
|
|
27
|
+
navLayout: () => Layout | undefined;
|
|
28
|
+
currentLocator: () => Locator | undefined;
|
|
29
|
+
previousLocator: () => Locator | null | undefined;
|
|
30
|
+
nextLocator: () => Locator | null | undefined;
|
|
31
|
+
currentPositions: () => number[] | null | undefined;
|
|
32
|
+
canGoBackward: () => boolean | undefined;
|
|
33
|
+
canGoForward: () => boolean | undefined;
|
|
34
|
+
isScrollStart: () => boolean | undefined;
|
|
35
|
+
isScrollEnd: () => boolean | undefined;
|
|
36
|
+
preferencesEditor: _readium_navigator.EpubPreferencesEditor | undefined;
|
|
37
|
+
getSetting: <K extends keyof EpubSettings>(settingKey: K) => EpubSettings[K];
|
|
38
|
+
submitPreferences: (preferences: IEpubPreferences) => Promise<void>;
|
|
39
|
+
getCframes: () => (_readium_navigator.FXLFrameManager | _readium_navigator.FrameManager | undefined)[] | undefined;
|
|
40
|
+
onFXLPositionChange: (cb: (locator: Locator) => void) => void;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
type cbb$1 = (ok: boolean) => void;
|
|
44
|
+
interface WebPubNavigatorLoadProps {
|
|
45
|
+
container: HTMLDivElement | null;
|
|
46
|
+
publication: Publication;
|
|
47
|
+
listeners: WebPubNavigatorListeners;
|
|
48
|
+
initialPosition?: Locator;
|
|
49
|
+
preferences?: IWebPubPreferences;
|
|
50
|
+
defaults?: IWebPubDefaults;
|
|
51
|
+
injectables?: IInjectablesConfig;
|
|
52
|
+
contentProtection?: IContentProtectionConfig;
|
|
53
|
+
}
|
|
54
|
+
declare const useWebPubNavigator: () => {
|
|
55
|
+
WebPubNavigatorLoad: (config: WebPubNavigatorLoadProps, cb: Function) => void;
|
|
56
|
+
WebPubNavigatorDestroy: (cb: Function) => void;
|
|
57
|
+
goRight: (animated: boolean, callback: cbb$1) => void;
|
|
58
|
+
goLeft: (animated: boolean, callback: cbb$1) => void;
|
|
59
|
+
goBackward: (animated: boolean, callback: cbb$1) => void;
|
|
60
|
+
goForward: (animated: boolean, callback: cbb$1) => void;
|
|
61
|
+
goLink: (link: Link, animated: boolean, callback: cbb$1) => void;
|
|
62
|
+
go: (locator: Locator, animated: boolean, callback: cbb$1) => void;
|
|
63
|
+
currentLocator: () => Locator | undefined;
|
|
64
|
+
previousLocator: () => Locator | null | undefined;
|
|
65
|
+
nextLocator: () => Locator | null | undefined;
|
|
66
|
+
currentPositions: () => number[] | null | undefined;
|
|
67
|
+
canGoBackward: () => boolean | undefined;
|
|
68
|
+
canGoForward: () => boolean | undefined;
|
|
69
|
+
isScrollStart: () => boolean | undefined;
|
|
70
|
+
isScrollEnd: () => boolean | undefined;
|
|
71
|
+
preferencesEditor: _readium_navigator.WebPubPreferencesEditor | undefined;
|
|
72
|
+
getSetting: <K extends keyof WebPubSettings>(settingKey: K) => WebPubSettings[K];
|
|
73
|
+
submitPreferences: (preferences: IWebPubPreferences) => Promise<void>;
|
|
74
|
+
getCframes: () => (_readium_navigator.WebPubFrameManager | undefined)[] | undefined;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
interface AudioSettings {
|
|
78
|
+
volume: number;
|
|
79
|
+
playbackRate: number;
|
|
80
|
+
preservePitch: boolean;
|
|
81
|
+
skipBackwardInterval: number;
|
|
82
|
+
skipForwardInterval: number;
|
|
83
|
+
skipInterval: number;
|
|
84
|
+
pollInterval: number;
|
|
85
|
+
autoPlay: boolean;
|
|
86
|
+
enableMediaSession: boolean;
|
|
87
|
+
}
|
|
88
|
+
interface AudioSettingsCache {
|
|
89
|
+
settings: AudioSettings;
|
|
90
|
+
}
|
|
91
|
+
declare const useAudioSettingsCache: (volume: number, playbackRate: number, preservePitch: boolean, skipBackwardInterval: number, skipForwardInterval: number, skipInterval: number, pollInterval: number, autoPlay: boolean, enableMediaSession: boolean) => React.RefObject<AudioSettingsCache>;
|
|
92
|
+
|
|
93
|
+
type cbb = (ok: boolean) => void;
|
|
94
|
+
interface AudioNavigatorLoadProps {
|
|
95
|
+
publication: Publication;
|
|
96
|
+
listeners: AudioNavigatorListeners;
|
|
97
|
+
initialPosition?: Locator;
|
|
98
|
+
preferences?: IAudioPreferences;
|
|
99
|
+
defaults?: IAudioDefaults;
|
|
100
|
+
contentProtection?: IContentProtectionConfig;
|
|
101
|
+
audioContext?: AudioContext;
|
|
102
|
+
}
|
|
103
|
+
declare const useAudioNavigator: () => {
|
|
104
|
+
AudioNavigatorLoad: (config: AudioNavigatorLoadProps, cb: Function) => void;
|
|
105
|
+
AudioNavigatorDestroy: (cb: Function) => void;
|
|
106
|
+
play: () => void;
|
|
107
|
+
pause: () => void;
|
|
108
|
+
stop: () => void;
|
|
109
|
+
seek: (time: number) => void;
|
|
110
|
+
jump: (seconds: number) => void;
|
|
111
|
+
skipForward: () => void;
|
|
112
|
+
skipBackward: () => void;
|
|
113
|
+
go: (locator: Locator, animated: boolean, callback: cbb) => void;
|
|
114
|
+
goLink: (link: Link, animated: boolean, callback: cbb) => void;
|
|
115
|
+
goForward: (animated: boolean, callback: cbb) => void;
|
|
116
|
+
goBackward: (animated: boolean, callback: cbb) => void;
|
|
117
|
+
currentLocator: () => Locator | undefined;
|
|
118
|
+
canGoBackward: () => boolean;
|
|
119
|
+
canGoForward: () => boolean;
|
|
120
|
+
isTrackStart: () => boolean;
|
|
121
|
+
isTrackEnd: () => boolean;
|
|
122
|
+
isPlaying: () => boolean;
|
|
123
|
+
isPaused: () => boolean;
|
|
124
|
+
duration: () => number;
|
|
125
|
+
currentTime: () => number;
|
|
126
|
+
preferencesEditor: _readium_navigator.AudioPreferencesEditor | undefined;
|
|
127
|
+
remotePlayback: RemotePlayback | undefined;
|
|
128
|
+
getSetting: <K extends keyof AudioSettings>(settingKey: K) => number | boolean | undefined;
|
|
129
|
+
submitPreferences: (preferences: IAudioPreferences) => Promise<void>;
|
|
130
|
+
timeline: () => Timeline | undefined;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
export { type AudioNavigatorLoadProps as A, type EpubNavigatorLoadProps as E, type WebPubNavigatorLoadProps as W, useEpubNavigator as a, useWebPubNavigator as b, type AudioSettings as c, type AudioSettingsCache as d, useAudioSettingsCache as e, useAudioNavigator as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ThSheetHeaderVariant } from './actions-
|
|
1
|
+
import { a as ThSheetHeaderVariant } from './actions-BLAr0oaM.mjs';
|
|
2
2
|
|
|
3
3
|
type I18nValue<T> = T | string | {
|
|
4
4
|
key: string;
|
|
@@ -15,7 +15,13 @@ interface ThSettingsRangePref {
|
|
|
15
15
|
placeholder?: I18nValue<ThSettingsRangePlaceholder>;
|
|
16
16
|
range?: [number, number];
|
|
17
17
|
step?: number;
|
|
18
|
+
presets?: number[];
|
|
18
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Use instead of ThSettingsRangePrefRequired for default values,
|
|
22
|
+
* so that presets remains optional.
|
|
23
|
+
*/
|
|
24
|
+
type ThSettingsRangePrefRequired = Required<Omit<ThSettingsRangePref, "presets">> & Pick<ThSettingsRangePref, "presets">;
|
|
19
25
|
interface ThSettingsRadioPref<T extends string> {
|
|
20
26
|
allowUnset?: boolean;
|
|
21
27
|
keys: {
|
|
@@ -66,7 +72,9 @@ declare enum ThSettingsContainerKeys {
|
|
|
66
72
|
declare enum ThSettingsRangeVariant {
|
|
67
73
|
slider = "slider",
|
|
68
74
|
incrementedSlider = "incrementedSlider",
|
|
69
|
-
numberField = "numberField"
|
|
75
|
+
numberField = "numberField",
|
|
76
|
+
sliderWithPresets = "sliderWithPresets",
|
|
77
|
+
presetsGroup = "presetsGroup"
|
|
70
78
|
}
|
|
71
79
|
declare enum ThSettingsRangePlaceholder {
|
|
72
80
|
range = "range",
|
|
@@ -100,16 +108,16 @@ declare const defaultTextSettingsSubpanel: ThTextSettingsKeys[];
|
|
|
100
108
|
declare const defaultSpacingSettingsMain: ThSpacingSettingsKeys[];
|
|
101
109
|
declare const defaultSpacingSettingsSubpanel: ThSpacingSettingsKeys[];
|
|
102
110
|
declare const defaultSpacingPresetsOrder: ThSpacingPresetKeys[];
|
|
103
|
-
declare const defaultParagraphSpacing:
|
|
104
|
-
declare const defaultParagraphIndent:
|
|
105
|
-
declare const defaultWordSpacing:
|
|
106
|
-
declare const defaultLetterSpacing:
|
|
111
|
+
declare const defaultParagraphSpacing: ThSettingsRangePrefRequired;
|
|
112
|
+
declare const defaultParagraphIndent: ThSettingsRangePrefRequired;
|
|
113
|
+
declare const defaultWordSpacing: ThSettingsRangePrefRequired;
|
|
114
|
+
declare const defaultLetterSpacing: ThSettingsRangePrefRequired;
|
|
107
115
|
declare const defaultLineHeights: {
|
|
108
116
|
small: number;
|
|
109
117
|
medium: number;
|
|
110
118
|
large: number;
|
|
111
119
|
};
|
|
112
|
-
declare const defaultZoom:
|
|
120
|
+
declare const defaultZoom: ThSettingsRangePrefRequired;
|
|
113
121
|
declare const defaultSpacingPresets: {
|
|
114
122
|
tight: {
|
|
115
123
|
lineHeight: ThLineHeightOptions;
|
|
@@ -149,4 +157,4 @@ declare enum ThContrast {
|
|
|
149
157
|
}
|
|
150
158
|
declare const useContrast: (onChange?: (contrast: ThContrast) => void) => ThContrast;
|
|
151
159
|
|
|
152
|
-
export {
|
|
160
|
+
export { defaultLineHeights as A, defaultZoom as B, defaultSpacingPresets as C, type I18nValue as I, ThLineHeightOptions as T, ThSpacingPresetKeys as a, ThSpacingSettingsKeys as b, ThTextAlignOptions as c, type ThSettingsRangePrefRequired as d, ThColorScheme as e, ThContrast as f, ThSettingsKeys as g, ThTextSettingsKeys as h, type ThSettingsRadioPref as i, type ThSettingsGroupPref as j, useContrast as k, type ThSettingsRangePref as l, ThSettingsContainerKeys as m, ThSettingsRangeVariant as n, ThSettingsRangePlaceholder as o, ThLayoutOptions as p, defaultTextSettingsMain as q, defaultTextSettingsSubpanel as r, defaultSpacingSettingsMain as s, defaultSpacingSettingsSubpanel as t, useColorScheme as u, defaultSpacingPresetsOrder as v, defaultParagraphSpacing as w, defaultParagraphIndent as x, defaultWordSpacing as y, defaultLetterSpacing as z };
|