@readium/navigator 2.4.0-beta.9 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +597 -451
- package/dist/index.umd.cjs +190 -127
- package/package.json +2 -2
- package/src/audio/AudioNavigator.ts +155 -42
- package/src/audio/AudioPoolManager.ts +27 -14
- package/src/audio/engine/AudioEngine.ts +4 -3
- package/src/audio/engine/PreservePitchProcessor.js +166 -101
- package/src/audio/engine/PreservePitchWorklet.ts +2 -17
- package/src/audio/engine/WebAudioEngine.ts +138 -160
- package/src/audio/engine/index.ts +2 -2
- package/src/audio/index.ts +3 -3
- package/src/audio/preferences/AudioDefaults.ts +2 -2
- package/src/audio/preferences/AudioPreferences.ts +11 -11
- package/src/audio/preferences/AudioPreferencesEditor.ts +13 -13
- package/src/audio/preferences/AudioSettings.ts +3 -3
- package/src/audio/preferences/index.ts +4 -4
- package/src/audio/protection/AudioNavigatorProtector.ts +4 -4
- package/src/css/index.ts +1 -1
- package/src/epub/EpubNavigator.ts +52 -52
- package/src/epub/css/Properties.ts +15 -15
- package/src/epub/css/ReadiumCSS.ts +43 -43
- package/src/epub/css/index.ts +2 -2
- package/src/epub/frame/FrameBlobBuilder.ts +10 -11
- package/src/epub/frame/FrameComms.ts +1 -1
- package/src/epub/frame/FrameManager.ts +9 -9
- package/src/epub/frame/FramePoolManager.ts +13 -13
- package/src/epub/frame/index.ts +4 -4
- package/src/epub/fxl/FXLCoordinator.ts +3 -3
- package/src/epub/fxl/FXLFrameManager.ts +8 -8
- package/src/epub/fxl/FXLFramePoolManager.ts +13 -13
- package/src/epub/fxl/FXLPeripherals.ts +4 -4
- package/src/epub/fxl/index.ts +5 -5
- package/src/epub/index.ts +5 -5
- package/src/epub/preferences/EpubDefaults.ts +23 -23
- package/src/epub/preferences/EpubPreferences.ts +16 -16
- package/src/epub/preferences/EpubPreferencesEditor.ts +53 -53
- package/src/epub/preferences/EpubSettings.ts +101 -101
- package/src/epub/preferences/index.ts +4 -4
- package/src/helpers/index.ts +2 -2
- package/src/index.ts +8 -8
- package/src/injection/Injector.ts +42 -42
- package/src/injection/epubInjectables.ts +8 -8
- package/src/injection/index.ts +2 -2
- package/src/injection/webpubInjectables.ts +1 -1
- package/src/preferences/Configurable.ts +2 -2
- package/src/preferences/PreferencesEditor.ts +2 -2
- package/src/preferences/guards.ts +2 -2
- package/src/preferences/index.ts +5 -5
- package/src/protection/CopyProtector.ts +5 -1
- package/src/protection/DevToolsDetector.ts +16 -16
- package/src/protection/DragAndDropProtector.ts +14 -1
- package/src/protection/NavigatorProtector.ts +6 -6
- package/src/webpub/WebPubBlobBuilder.ts +1 -1
- package/src/webpub/WebPubFrameManager.ts +8 -8
- package/src/webpub/WebPubFramePoolManager.ts +7 -7
- package/src/webpub/WebPubNavigator.ts +27 -27
- package/src/webpub/css/Properties.ts +3 -3
- package/src/webpub/css/WebPubCSS.ts +11 -11
- package/src/webpub/css/index.ts +2 -2
- package/src/webpub/index.ts +6 -6
- package/src/webpub/preferences/WebPubDefaults.ts +12 -12
- package/src/webpub/preferences/WebPubPreferences.ts +8 -8
- package/src/webpub/preferences/WebPubPreferencesEditor.ts +31 -31
- package/src/webpub/preferences/WebPubSettings.ts +45 -45
- package/src/webpub/preferences/index.ts +4 -4
- package/types/src/audio/AudioNavigator.d.ts +34 -5
- package/types/src/audio/AudioPoolManager.d.ts +7 -4
- package/types/src/audio/engine/AudioEngine.d.ts +4 -3
- package/types/src/audio/engine/PreservePitchWorklet.d.ts +1 -4
- package/types/src/audio/engine/WebAudioEngine.d.ts +15 -9
- package/types/src/audio/engine/index.d.ts +2 -2
- package/types/src/audio/index.d.ts +3 -3
- package/types/src/audio/preferences/AudioPreferences.d.ts +9 -9
- package/types/src/audio/preferences/AudioPreferencesEditor.d.ts +4 -4
- package/types/src/audio/preferences/AudioSettings.d.ts +3 -3
- package/types/src/audio/preferences/index.d.ts +4 -4
- package/types/src/audio/protection/AudioNavigatorProtector.d.ts +2 -2
- package/types/src/css/index.d.ts +1 -1
- package/types/src/epub/EpubNavigator.d.ts +11 -11
- package/types/src/epub/css/Properties.d.ts +2 -2
- package/types/src/epub/css/ReadiumCSS.d.ts +3 -3
- package/types/src/epub/css/index.d.ts +2 -2
- package/types/src/epub/frame/FrameBlobBuilder.d.ts +1 -1
- package/types/src/epub/frame/FrameComms.d.ts +1 -1
- package/types/src/epub/frame/FrameManager.d.ts +2 -2
- package/types/src/epub/frame/FramePoolManager.d.ts +3 -3
- package/types/src/epub/frame/index.d.ts +4 -4
- package/types/src/epub/fxl/FXLFrameManager.d.ts +3 -3
- package/types/src/epub/fxl/FXLFramePoolManager.d.ts +5 -5
- package/types/src/epub/fxl/FXLPeripherals.d.ts +2 -2
- package/types/src/epub/fxl/index.d.ts +5 -5
- package/types/src/epub/index.d.ts +5 -5
- package/types/src/epub/preferences/EpubDefaults.d.ts +1 -1
- package/types/src/epub/preferences/EpubPreferences.d.ts +2 -2
- package/types/src/epub/preferences/EpubPreferencesEditor.d.ts +5 -5
- package/types/src/epub/preferences/EpubSettings.d.ts +4 -4
- package/types/src/epub/preferences/index.d.ts +4 -4
- package/types/src/helpers/index.d.ts +2 -2
- package/types/src/index.d.ts +8 -8
- package/types/src/injection/Injector.d.ts +1 -1
- package/types/src/injection/epubInjectables.d.ts +1 -1
- package/types/src/injection/index.d.ts +2 -2
- package/types/src/preferences/Configurable.d.ts +1 -1
- package/types/src/preferences/PreferencesEditor.d.ts +1 -1
- package/types/src/preferences/guards.d.ts +1 -1
- package/types/src/preferences/index.d.ts +5 -5
- package/types/src/protection/CopyProtector.d.ts +1 -0
- package/types/src/protection/DragAndDropProtector.d.ts +2 -0
- package/types/src/protection/NavigatorProtector.d.ts +1 -1
- package/types/src/webpub/WebPubBlobBuilder.d.ts +1 -1
- package/types/src/webpub/WebPubFrameManager.d.ts +2 -2
- package/types/src/webpub/WebPubFramePoolManager.d.ts +3 -3
- package/types/src/webpub/WebPubNavigator.d.ts +10 -10
- package/types/src/webpub/css/Properties.d.ts +2 -2
- package/types/src/webpub/css/WebPubCSS.d.ts +2 -2
- package/types/src/webpub/css/index.d.ts +2 -2
- package/types/src/webpub/index.d.ts +6 -6
- package/types/src/webpub/preferences/WebPubDefaults.d.ts +1 -1
- package/types/src/webpub/preferences/WebPubPreferences.d.ts +2 -2
- package/types/src/webpub/preferences/WebPubPreferencesEditor.d.ts +5 -5
- package/types/src/webpub/preferences/WebPubSettings.d.ts +4 -4
- package/types/src/webpub/preferences/index.d.ts +4 -4
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Publication } from "@readium/shared";
|
|
2
|
-
import { WebAudioEngine } from "./engine/WebAudioEngine";
|
|
2
|
+
import { WebAudioEngine } from "./engine/WebAudioEngine.ts";
|
|
3
|
+
import type { IAudioContentProtectionConfig } from "./AudioNavigator.ts";
|
|
3
4
|
export declare class AudioPoolManager {
|
|
4
5
|
private readonly pool;
|
|
5
6
|
private _audioEngine;
|
|
6
7
|
private readonly _publication;
|
|
7
8
|
private readonly _supportedAudioTypes;
|
|
8
|
-
constructor(audioEngine: WebAudioEngine, publication: Publication);
|
|
9
|
+
constructor(audioEngine: WebAudioEngine, publication: Publication, contentProtection?: IAudioContentProtectionConfig);
|
|
9
10
|
private detectSupportedAudioTypes;
|
|
10
11
|
private pickPlayableHref;
|
|
11
12
|
get audioEngine(): WebAudioEngine;
|
|
@@ -17,11 +18,13 @@ export declare class AudioPoolManager {
|
|
|
17
18
|
/**
|
|
18
19
|
* Updates the pool around the given index: ensures elements exist within
|
|
19
20
|
* the LOWER_BOUNDARY and disposes those beyond the UPPER_BOUNDARY.
|
|
21
|
+
* The current track is excluded — the primary engine element represents it.
|
|
20
22
|
*/
|
|
21
23
|
private update;
|
|
22
24
|
/**
|
|
23
|
-
* Sets the current audio for playback at the given track index
|
|
24
|
-
*
|
|
25
|
+
* Sets the current audio for playback at the given track index by changing
|
|
26
|
+
* the src on the persistent primary element. This preserves the RemotePlayback
|
|
27
|
+
* session and any Web Audio graph connections across track changes.
|
|
25
28
|
*/
|
|
26
29
|
setCurrentAudio(currentIndex: number, _direction: 'forward' | 'backward'): void;
|
|
27
30
|
destroy(): void;
|
|
@@ -49,10 +49,11 @@ export interface AudioEngine {
|
|
|
49
49
|
*/
|
|
50
50
|
off(event: string, callback: (data: any) => void): void;
|
|
51
51
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
52
|
+
* Changes the src of the primary media element without swapping it,
|
|
53
|
+
* preserving the RemotePlayback session and all attached event listeners.
|
|
54
|
+
* @param href The URL of the new audio resource.
|
|
54
55
|
*/
|
|
55
|
-
|
|
56
|
+
changeSrc(href: string): void;
|
|
56
57
|
/**
|
|
57
58
|
* Plays the current audio resource.
|
|
58
59
|
*/
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
interface PreservePitchWorkletOptions {
|
|
2
2
|
ctx: AudioContext;
|
|
3
|
-
mediaElement?: HTMLMediaElement;
|
|
4
3
|
pitchFactor?: number;
|
|
5
4
|
modulePath?: string;
|
|
6
5
|
}
|
|
7
6
|
export declare class PreservePitchWorklet {
|
|
8
|
-
mediaElement: HTMLMediaElement | null;
|
|
9
|
-
source: MediaElementAudioSourceNode | null;
|
|
10
7
|
ctx: AudioContext;
|
|
11
8
|
workletNode: AudioWorkletNode | null;
|
|
12
|
-
url
|
|
9
|
+
private url;
|
|
13
10
|
static createWorklet(options: PreservePitchWorkletOptions): Promise<PreservePitchWorklet>;
|
|
14
11
|
constructor(ctx: AudioContext);
|
|
15
12
|
updatePitchFactor(factor: number): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AudioEngine, Playback } from "./AudioEngine";
|
|
1
|
+
import { AudioEngine, Playback } from "./AudioEngine.ts";
|
|
2
2
|
type EventCallback = (data: any) => void;
|
|
3
3
|
export declare class WebAudioEngine implements AudioEngine {
|
|
4
4
|
readonly playback: Playback;
|
|
@@ -7,8 +7,6 @@ export declare class WebAudioEngine implements AudioEngine {
|
|
|
7
7
|
private sourceNode;
|
|
8
8
|
private gainNode;
|
|
9
9
|
private listeners;
|
|
10
|
-
private currentVolume;
|
|
11
|
-
private currentPlaybackRate;
|
|
12
10
|
private isMutedValue;
|
|
13
11
|
private isPlayingValue;
|
|
14
12
|
private isPausedValue;
|
|
@@ -48,12 +46,6 @@ export declare class WebAudioEngine implements AudioEngine {
|
|
|
48
46
|
* @param callback - callback function to be removed.
|
|
49
47
|
*/
|
|
50
48
|
off(event: string, callback: EventCallback): void;
|
|
51
|
-
private deactivateWebAudio;
|
|
52
|
-
/**
|
|
53
|
-
* Sets the media element for playback.
|
|
54
|
-
* @param element The HTML audio element to use.
|
|
55
|
-
*/
|
|
56
|
-
setMediaElement(element: HTMLAudioElement): void;
|
|
57
49
|
private ensureAudioContextRunning;
|
|
58
50
|
private getOrCreateAudioContext;
|
|
59
51
|
private onTimeUpdate;
|
|
@@ -140,6 +132,20 @@ export declare class WebAudioEngine implements AudioEngine {
|
|
|
140
132
|
*/
|
|
141
133
|
private activateWebAudio;
|
|
142
134
|
get isWebAudioActive(): boolean;
|
|
135
|
+
/**
|
|
136
|
+
* Tears down the Web Audio graph and restores the media element to standalone
|
|
137
|
+
* playback. Safe to call even if Web Audio was never activated.
|
|
138
|
+
*/
|
|
139
|
+
private tearDownWebAudio;
|
|
140
|
+
/**
|
|
141
|
+
* Changes the src of the primary media element without swapping the element.
|
|
142
|
+
* Preserves the RemotePlayback session and all attached event listeners.
|
|
143
|
+
* When the Web Audio graph is active, the new src is loaded with
|
|
144
|
+
* crossOrigin="anonymous". If the CORS request fails (server does not send
|
|
145
|
+
* the required headers), the graph is torn down and the src is reloaded
|
|
146
|
+
* without CORS so playback continues — just without pitch correction.
|
|
147
|
+
*/
|
|
148
|
+
changeSrc(href: string): void;
|
|
143
149
|
/**
|
|
144
150
|
* Returns the HTML media element used for playback.
|
|
145
151
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './AudioEngine';
|
|
2
|
-
export * from './WebAudioEngine';
|
|
1
|
+
export * from './AudioEngine.ts';
|
|
2
|
+
export * from './WebAudioEngine.ts';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './engine';
|
|
2
|
-
export * from './preferences';
|
|
3
|
-
export * from './AudioNavigator';
|
|
1
|
+
export * from './engine/index.ts';
|
|
2
|
+
export * from './preferences/index.ts';
|
|
3
|
+
export * from './AudioNavigator.ts';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConfigurablePreferences } from "../../preferences/Configurable";
|
|
1
|
+
import { ConfigurablePreferences } from "../../preferences/Configurable.ts";
|
|
2
2
|
export interface IAudioPreferences {
|
|
3
3
|
volume?: number | null;
|
|
4
4
|
playbackRate?: number | null;
|
|
@@ -10,14 +10,14 @@ export interface IAudioPreferences {
|
|
|
10
10
|
enableMediaSession?: boolean | null;
|
|
11
11
|
}
|
|
12
12
|
export declare class AudioPreferences implements ConfigurablePreferences<AudioPreferences> {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
volume: number | null | undefined;
|
|
14
|
+
playbackRate: number | null | undefined;
|
|
15
|
+
preservePitch: boolean | null | undefined;
|
|
16
|
+
skipBackwardInterval: number | null | undefined;
|
|
17
|
+
skipForwardInterval: number | null | undefined;
|
|
18
|
+
pollInterval: number | null | undefined;
|
|
19
|
+
autoPlay: boolean | null | undefined;
|
|
20
|
+
enableMediaSession: boolean | null | undefined;
|
|
21
21
|
constructor(preferences?: IAudioPreferences);
|
|
22
22
|
merging(other: AudioPreferences): AudioPreferences;
|
|
23
23
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IPreferencesEditor } from "../../preferences/PreferencesEditor";
|
|
2
|
-
import { AudioPreferences } from "./AudioPreferences";
|
|
3
|
-
import { AudioSettings } from "./AudioSettings";
|
|
4
|
-
import { Preference, BooleanPreference, RangePreference } from "../../preferences/Preference";
|
|
1
|
+
import { IPreferencesEditor } from "../../preferences/PreferencesEditor.ts";
|
|
2
|
+
import { AudioPreferences } from "./AudioPreferences.ts";
|
|
3
|
+
import { AudioSettings } from "./AudioSettings.ts";
|
|
4
|
+
import { Preference, BooleanPreference, RangePreference } from "../../preferences/Preference.ts";
|
|
5
5
|
export declare class AudioPreferencesEditor implements IPreferencesEditor {
|
|
6
6
|
preferences: AudioPreferences;
|
|
7
7
|
private settings;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AudioPreferences } from "./AudioPreferences";
|
|
2
|
-
import { AudioDefaults } from "./AudioDefaults";
|
|
3
|
-
import { ConfigurableSettings } from "../../preferences/Configurable";
|
|
1
|
+
import { AudioPreferences } from "./AudioPreferences.ts";
|
|
2
|
+
import { AudioDefaults } from "./AudioDefaults.ts";
|
|
3
|
+
import { ConfigurableSettings } from "../../preferences/Configurable.ts";
|
|
4
4
|
export interface IAudioSettings extends ConfigurableSettings {
|
|
5
5
|
volume: number;
|
|
6
6
|
playbackRate: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './AudioPreferences';
|
|
2
|
-
export * from './AudioDefaults';
|
|
3
|
-
export * from './AudioSettings';
|
|
4
|
-
export * from './AudioPreferencesEditor';
|
|
1
|
+
export * from './AudioPreferences.ts';
|
|
2
|
+
export * from './AudioDefaults.ts';
|
|
3
|
+
export * from './AudioSettings.ts';
|
|
4
|
+
export * from './AudioPreferencesEditor.ts';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NavigatorProtector } from "../../protection/NavigatorProtector";
|
|
2
|
-
import { IContentProtectionConfig } from "../../Navigator";
|
|
1
|
+
import { NavigatorProtector } from "../../protection/NavigatorProtector.ts";
|
|
2
|
+
import { IContentProtectionConfig } from "../../Navigator.ts";
|
|
3
3
|
export declare class AudioNavigatorProtector extends NavigatorProtector {
|
|
4
4
|
private dragAndDropProtector?;
|
|
5
5
|
private copyProtector?;
|
package/types/src/css/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./Properties";
|
|
1
|
+
export * from "./Properties.ts";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Layout, Link, Locator, Publication, ReadingProgression } from "@readium/shared";
|
|
2
|
-
import { Configurable, ConfigurableSettings, VisualNavigator, VisualNavigatorViewport } from "../";
|
|
3
|
-
import { FramePoolManager } from "./frame/FramePoolManager";
|
|
4
|
-
import { FXLFramePoolManager } from "./fxl/FXLFramePoolManager";
|
|
2
|
+
import { Configurable, ConfigurableSettings, VisualNavigator, VisualNavigatorViewport } from "../index.ts";
|
|
3
|
+
import { FramePoolManager } from "./frame/FramePoolManager.ts";
|
|
4
|
+
import { FXLFramePoolManager } from "./fxl/FXLFramePoolManager.ts";
|
|
5
5
|
import { CommsEventKey, ContextMenuEvent, KeyboardEventData } from "@readium/navigator-html-injectables";
|
|
6
6
|
import { BasicTextSelection, FrameClickEvent, SuspiciousActivityEvent } from "@readium/navigator-html-injectables";
|
|
7
|
-
import { FXLFrameManager } from "./fxl/FXLFrameManager";
|
|
8
|
-
import { FrameManager } from "./frame/FrameManager";
|
|
9
|
-
import { IEpubPreferences, EpubPreferences } from "./preferences/EpubPreferences";
|
|
10
|
-
import { IEpubDefaults } from "./preferences/EpubDefaults";
|
|
11
|
-
import { EpubSettings } from "./preferences";
|
|
12
|
-
import { EpubPreferencesEditor } from "./preferences/EpubPreferencesEditor";
|
|
13
|
-
import { IInjectablesConfig } from "../injection/Injectable";
|
|
14
|
-
import { IContentProtectionConfig, IKeyboardPeripheralsConfig } from "../Navigator";
|
|
7
|
+
import { FXLFrameManager } from "./fxl/FXLFrameManager.ts";
|
|
8
|
+
import { FrameManager } from "./frame/FrameManager.ts";
|
|
9
|
+
import { IEpubPreferences, EpubPreferences } from "./preferences/EpubPreferences.ts";
|
|
10
|
+
import { IEpubDefaults } from "./preferences/EpubDefaults.ts";
|
|
11
|
+
import { EpubSettings } from "./preferences/index.ts";
|
|
12
|
+
import { EpubPreferencesEditor } from "./preferences/EpubPreferencesEditor.ts";
|
|
13
|
+
import { IInjectablesConfig } from "../injection/Injectable.ts";
|
|
14
|
+
import { IContentProtectionConfig, IKeyboardPeripheralsConfig } from "../Navigator.ts";
|
|
15
15
|
export type ManagerEventKey = "zoom";
|
|
16
16
|
export interface EpubNavigatorConfiguration {
|
|
17
17
|
preferences: IEpubPreferences;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ExperimentKey, TextAlignment } from "../../preferences/Types";
|
|
2
|
-
import { BodyHyphens, BoxSizing, FontOpticalSizing, FontWidth, Ligatures, Properties, TypeScale, View } from "../../css/Properties";
|
|
1
|
+
import { ExperimentKey, TextAlignment } from "../../preferences/Types.ts";
|
|
2
|
+
import { BodyHyphens, BoxSizing, FontOpticalSizing, FontWidth, Ligatures, Properties, TypeScale, View } from "../../css/Properties.ts";
|
|
3
3
|
export interface IUserProperties {
|
|
4
4
|
advancedSettings?: boolean | null;
|
|
5
5
|
a11yNormalize?: boolean | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LineLengths } from "../../helpers";
|
|
2
|
-
import { EpubSettings } from "../preferences/EpubSettings";
|
|
3
|
-
import { RSProperties, UserProperties } from "./Properties";
|
|
1
|
+
import { LineLengths } from "../../helpers/index.ts";
|
|
2
|
+
import { EpubSettings } from "../preferences/EpubSettings.ts";
|
|
3
|
+
import { RSProperties, UserProperties } from "./Properties.ts";
|
|
4
4
|
export interface IReadiumCSS {
|
|
5
5
|
rsProperties: RSProperties;
|
|
6
6
|
userProperties: UserProperties;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./Properties";
|
|
2
|
-
export * from "./ReadiumCSS";
|
|
1
|
+
export * from "./Properties.ts";
|
|
2
|
+
export * from "./ReadiumCSS.ts";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommsCommandKey, CommsAck, CommsEventKey } from "@readium/navigator-html-injectables";
|
|
2
|
-
import { ManagerEventKey } from "../EpubNavigator";
|
|
2
|
+
import { ManagerEventKey } from "../EpubNavigator.ts";
|
|
3
3
|
export type FrameCommsListener = (key: CommsEventKey | ManagerEventKey, value: unknown) => void;
|
|
4
4
|
export declare class FrameComms {
|
|
5
5
|
private readonly wnd;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Loader, ModuleName } from "@readium/navigator-html-injectables";
|
|
2
|
-
import { FrameComms } from "./FrameComms";
|
|
3
|
-
import type { IContentProtectionConfig, IKeyboardPeripheralsConfig } from "../../Navigator";
|
|
2
|
+
import { FrameComms } from "./FrameComms.ts";
|
|
3
|
+
import type { IContentProtectionConfig, IKeyboardPeripheralsConfig } from "../../Navigator.ts";
|
|
4
4
|
export declare class FrameManager {
|
|
5
5
|
private frame;
|
|
6
6
|
private loader;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ModuleName } from "@readium/navigator-html-injectables";
|
|
2
2
|
import { Locator, Publication } from "@readium/shared";
|
|
3
|
-
import { FrameManager } from "./FrameManager";
|
|
4
|
-
import { Injector } from "../../injection/Injector";
|
|
5
|
-
import { IContentProtectionConfig, IKeyboardPeripheralsConfig } from "../../Navigator";
|
|
3
|
+
import { FrameManager } from "./FrameManager.ts";
|
|
4
|
+
import { Injector } from "../../injection/Injector.ts";
|
|
5
|
+
import { IContentProtectionConfig, IKeyboardPeripheralsConfig } from "../../Navigator.ts";
|
|
6
6
|
export declare class FramePoolManager {
|
|
7
7
|
private readonly container;
|
|
8
8
|
private readonly positions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./FrameBlobBuilder";
|
|
2
|
-
export * from "./FrameComms";
|
|
3
|
-
export * from "./FrameManager";
|
|
4
|
-
export * from "./FramePoolManager";
|
|
1
|
+
export * from "./FrameBlobBuilder.ts";
|
|
2
|
+
export * from "./FrameComms.ts";
|
|
3
|
+
export * from "./FrameManager.ts";
|
|
4
|
+
export * from "./FramePoolManager.ts";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Loader, ModuleName } from "@readium/navigator-html-injectables";
|
|
2
2
|
import { Page, ReadingProgression } from "@readium/shared";
|
|
3
|
-
import { FrameComms } from "../frame/FrameComms";
|
|
4
|
-
import { FXLPeripherals } from "./FXLPeripherals";
|
|
5
|
-
import { IContentProtectionConfig, IKeyboardPeripheralsConfig } from "../../Navigator";
|
|
3
|
+
import { FrameComms } from "../frame/FrameComms.ts";
|
|
4
|
+
import { FXLPeripherals } from "./FXLPeripherals.ts";
|
|
5
|
+
import { IContentProtectionConfig, IKeyboardPeripheralsConfig } from "../../Navigator.ts";
|
|
6
6
|
export declare class FXLFrameManager {
|
|
7
7
|
private frame;
|
|
8
8
|
private loader;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ModuleName } from "@readium/navigator-html-injectables";
|
|
2
2
|
import { Locator, Publication, Page, Link } from "@readium/shared";
|
|
3
|
-
import { FrameCommsListener } from "../frame";
|
|
4
|
-
import { FXLFrameManager } from "./FXLFrameManager";
|
|
5
|
-
import { FXLPeripherals } from "./FXLPeripherals";
|
|
6
|
-
import { VisualNavigatorViewport, IContentProtectionConfig, IKeyboardPeripheralsConfig } from "../../Navigator";
|
|
7
|
-
import { Injector } from "../../injection/Injector";
|
|
3
|
+
import { FrameCommsListener } from "../frame/index.ts";
|
|
4
|
+
import { FXLFrameManager } from "./FXLFrameManager.ts";
|
|
5
|
+
import { FXLPeripherals } from "./FXLPeripherals.ts";
|
|
6
|
+
import { VisualNavigatorViewport, IContentProtectionConfig, IKeyboardPeripheralsConfig } from "../../Navigator.ts";
|
|
7
|
+
import { Injector } from "../../injection/Injector.ts";
|
|
8
8
|
export declare class FXLFramePoolManager {
|
|
9
9
|
private readonly container;
|
|
10
10
|
private readonly positions;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Point } from "./FXLCoordinator";
|
|
2
|
-
import { FXLFramePoolManager } from "./FXLFramePoolManager";
|
|
1
|
+
import { Point } from "./FXLCoordinator.ts";
|
|
2
|
+
import { FXLFramePoolManager } from "./FXLFramePoolManager.ts";
|
|
3
3
|
export interface PanTracker {
|
|
4
4
|
startX: number;
|
|
5
5
|
endX: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./FXLCoordinator";
|
|
2
|
-
export * from "./FXLFrameManager";
|
|
3
|
-
export * from "./FXLFramePoolManager";
|
|
4
|
-
export * from "./FXLPeripherals";
|
|
5
|
-
export * from "./FXLSpreader";
|
|
1
|
+
export * from "./FXLCoordinator.ts";
|
|
2
|
+
export * from "./FXLFrameManager.ts";
|
|
3
|
+
export * from "./FXLFramePoolManager.ts";
|
|
4
|
+
export * from "./FXLPeripherals.ts";
|
|
5
|
+
export * from "./FXLSpreader.ts";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./EpubNavigator";
|
|
2
|
-
export * from "./frame";
|
|
3
|
-
export * from "./fxl";
|
|
4
|
-
export * from "./preferences";
|
|
5
|
-
export * from "./css";
|
|
1
|
+
export * from "./EpubNavigator.ts";
|
|
2
|
+
export * from "./frame/index.ts";
|
|
3
|
+
export * from "./fxl/index.ts";
|
|
4
|
+
export * from "./preferences/index.ts";
|
|
5
|
+
export * from "./css/index.ts";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConfigurablePreferences } from "../../preferences/Configurable";
|
|
2
|
-
import { TextAlignment } from "../../preferences/Types";
|
|
1
|
+
import { ConfigurablePreferences } from "../../preferences/Configurable.ts";
|
|
2
|
+
import { TextAlignment } from "../../preferences/Types.ts";
|
|
3
3
|
export interface IEpubPreferences {
|
|
4
4
|
backgroundColor?: string | null;
|
|
5
5
|
blendFilter?: boolean | null;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Metadata } from "@readium/shared";
|
|
2
|
-
import { IPreferencesEditor } from "../../preferences/PreferencesEditor";
|
|
3
|
-
import { EpubPreferences } from "./EpubPreferences";
|
|
4
|
-
import { EpubSettings } from "./EpubSettings";
|
|
5
|
-
import { BooleanPreference, EnumPreference, Preference, RangePreference } from "../../preferences/Preference";
|
|
6
|
-
import { TextAlignment } from "../../preferences/Types";
|
|
2
|
+
import { IPreferencesEditor } from "../../preferences/PreferencesEditor.ts";
|
|
3
|
+
import { EpubPreferences } from "./EpubPreferences.ts";
|
|
4
|
+
import { EpubSettings } from "./EpubSettings.ts";
|
|
5
|
+
import { BooleanPreference, EnumPreference, Preference, RangePreference } from "../../preferences/Preference.ts";
|
|
6
|
+
import { TextAlignment } from "../../preferences/Types.ts";
|
|
7
7
|
export declare class EpubPreferencesEditor implements IPreferencesEditor {
|
|
8
8
|
preferences: EpubPreferences;
|
|
9
9
|
private settings;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ConfigurableSettings } from "../../preferences/Configurable";
|
|
2
|
-
import { ExperimentKey, TextAlignment } from "../../preferences/Types";
|
|
3
|
-
import { EpubDefaults } from "./EpubDefaults";
|
|
4
|
-
import { EpubPreferences } from "./EpubPreferences";
|
|
1
|
+
import { ConfigurableSettings } from "../../preferences/Configurable.ts";
|
|
2
|
+
import { ExperimentKey, TextAlignment } from "../../preferences/Types.ts";
|
|
3
|
+
import { EpubDefaults } from "./EpubDefaults.ts";
|
|
4
|
+
import { EpubPreferences } from "./EpubPreferences.ts";
|
|
5
5
|
export interface IEpubSettings {
|
|
6
6
|
backgroundColor?: string | null;
|
|
7
7
|
blendFilter?: boolean | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./EpubDefaults";
|
|
2
|
-
export * from "./EpubPreferencesEditor";
|
|
3
|
-
export * from "./EpubPreferences";
|
|
4
|
-
export * from "./EpubSettings";
|
|
1
|
+
export * from "./EpubDefaults.ts";
|
|
2
|
+
export * from "./EpubPreferencesEditor.ts";
|
|
3
|
+
export * from "./EpubPreferences.ts";
|
|
4
|
+
export * from "./EpubSettings.ts";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./lineLength";
|
|
2
|
-
export * from './sML';
|
|
1
|
+
export * from "./lineLength.ts";
|
|
2
|
+
export * from './sML.ts';
|
package/types/src/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from './Navigator';
|
|
2
|
-
export * from './webpub';
|
|
3
|
-
export * from './epub';
|
|
4
|
-
export * from './audio';
|
|
5
|
-
export * from './helpers';
|
|
6
|
-
export * from './preferences';
|
|
7
|
-
export * from './css';
|
|
8
|
-
export * from './injection';
|
|
1
|
+
export * from './Navigator.ts';
|
|
2
|
+
export * from './webpub/index.ts';
|
|
3
|
+
export * from './epub/index.ts';
|
|
4
|
+
export * from './audio/index.ts';
|
|
5
|
+
export * from './helpers/index.ts';
|
|
6
|
+
export * from './preferences/index.ts';
|
|
7
|
+
export * from './css/index.ts';
|
|
8
|
+
export * from './injection/index.ts';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./Injectable";
|
|
2
|
-
export * from "./Injector";
|
|
1
|
+
export * from "./Injectable.ts";
|
|
2
|
+
export * from "./Injector.ts";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExperimentKey } from './Types';
|
|
1
|
+
import { ExperimentKey } from './Types.ts';
|
|
2
2
|
export declare function ensureLessThanOrEqual<T extends number | null | undefined>(value: T, compareTo: T): T | undefined;
|
|
3
3
|
export declare function ensureMoreThanOrEqual<T extends number | null | undefined>(value: T, compareTo: T): T | undefined;
|
|
4
4
|
export declare function ensureString(value: string | null | undefined): string | null | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./Configurable";
|
|
2
|
-
export * from "./Preference";
|
|
3
|
-
export * from "./PreferencesEditor";
|
|
4
|
-
export * from "./Types";
|
|
5
|
-
export * from "./guards";
|
|
1
|
+
export * from "./Configurable.ts";
|
|
2
|
+
export * from "./Preference.ts";
|
|
3
|
+
export * from "./PreferencesEditor.ts";
|
|
4
|
+
export * from "./Types.ts";
|
|
5
|
+
export * from "./guards.ts";
|
|
@@ -4,7 +4,9 @@ export interface DragAndDropProtectionOptions {
|
|
|
4
4
|
}
|
|
5
5
|
export declare class DragAndDropProtector {
|
|
6
6
|
private dragstartHandler;
|
|
7
|
+
private dragoverHandler;
|
|
7
8
|
private dropHandler;
|
|
9
|
+
private unloadHandler;
|
|
8
10
|
constructor(options?: DragAndDropProtectionOptions);
|
|
9
11
|
destroy(): void;
|
|
10
12
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IContentProtectionConfig } from "../Navigator";
|
|
1
|
+
import { IContentProtectionConfig } from "../Navigator.ts";
|
|
2
2
|
export declare const NAVIGATOR_SUSPICIOUS_ACTIVITY_EVENT = "readium:navigator:suspiciousActivity";
|
|
3
3
|
export declare class NavigatorProtector {
|
|
4
4
|
private automationDetector?;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Loader, ModuleName } from "@readium/navigator-html-injectables";
|
|
2
|
-
import { FrameComms } from "../epub/frame/FrameComms";
|
|
3
|
-
import { IContentProtectionConfig, IKeyboardPeripheralsConfig } from "../Navigator";
|
|
2
|
+
import { FrameComms } from "../epub/frame/FrameComms.ts";
|
|
3
|
+
import { IContentProtectionConfig, IKeyboardPeripheralsConfig } from "../Navigator.ts";
|
|
4
4
|
export declare class WebPubFrameManager {
|
|
5
5
|
private frame;
|
|
6
6
|
private loader;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ModuleName } from "@readium/navigator-html-injectables";
|
|
2
2
|
import { Locator, Publication } from "@readium/shared";
|
|
3
|
-
import { WebPubFrameManager } from "./WebPubFrameManager";
|
|
4
|
-
import { Injector } from "../injection/Injector";
|
|
5
|
-
import { IContentProtectionConfig, IKeyboardPeripheralsConfig } from "../Navigator";
|
|
3
|
+
import { WebPubFrameManager } from "./WebPubFrameManager.ts";
|
|
4
|
+
import { Injector } from "../injection/Injector.ts";
|
|
5
|
+
import { IContentProtectionConfig, IKeyboardPeripheralsConfig } from "../Navigator.ts";
|
|
6
6
|
export declare class WebPubFramePoolManager {
|
|
7
7
|
private readonly container;
|
|
8
8
|
private _currentFrame;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Link, Locator, Publication, ReadingProgression } from "@readium/shared";
|
|
2
|
-
import { VisualNavigator, VisualNavigatorViewport } from "../Navigator";
|
|
3
|
-
import { Configurable } from "../preferences/Configurable";
|
|
2
|
+
import { VisualNavigator, VisualNavigatorViewport } from "../Navigator.ts";
|
|
3
|
+
import { Configurable } from "../preferences/Configurable.ts";
|
|
4
4
|
import { BasicTextSelection, CommsEventKey, ContextMenuEvent, FrameClickEvent, KeyboardEventData, SuspiciousActivityEvent } from "@readium/navigator-html-injectables";
|
|
5
|
-
import { WebPubFrameManager } from "./WebPubFrameManager";
|
|
6
|
-
import { ManagerEventKey } from "../epub/EpubNavigator";
|
|
7
|
-
import { IWebPubPreferences, WebPubPreferences } from "./preferences/WebPubPreferences";
|
|
8
|
-
import { IWebPubDefaults } from "./preferences/WebPubDefaults";
|
|
9
|
-
import { WebPubSettings } from "./preferences/WebPubSettings";
|
|
10
|
-
import { WebPubPreferencesEditor } from "./preferences/WebPubPreferencesEditor";
|
|
11
|
-
import { IInjectablesConfig } from "../injection/Injectable";
|
|
12
|
-
import { IContentProtectionConfig, IKeyboardPeripheralsConfig } from "../Navigator";
|
|
5
|
+
import { WebPubFrameManager } from "./WebPubFrameManager.ts";
|
|
6
|
+
import { ManagerEventKey } from "../epub/EpubNavigator.ts";
|
|
7
|
+
import { IWebPubPreferences, WebPubPreferences } from "./preferences/WebPubPreferences.ts";
|
|
8
|
+
import { IWebPubDefaults } from "./preferences/WebPubDefaults.ts";
|
|
9
|
+
import { WebPubSettings } from "./preferences/WebPubSettings.ts";
|
|
10
|
+
import { WebPubPreferencesEditor } from "./preferences/WebPubPreferencesEditor.ts";
|
|
11
|
+
import { IInjectablesConfig } from "../injection/Injectable.ts";
|
|
12
|
+
import { IContentProtectionConfig, IKeyboardPeripheralsConfig } from "../Navigator.ts";
|
|
13
13
|
export interface WebPubNavigatorConfiguration {
|
|
14
14
|
preferences: IWebPubPreferences;
|
|
15
15
|
defaults: IWebPubDefaults;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ExperimentKey, TextAlignment } from "../../preferences/Types";
|
|
2
|
-
import { BodyHyphens, Ligatures, Properties } from "../../css/Properties";
|
|
1
|
+
import { ExperimentKey, TextAlignment } from "../../preferences/Types.ts";
|
|
2
|
+
import { BodyHyphens, Ligatures, Properties } from "../../css/Properties.ts";
|
|
3
3
|
export interface IWebUserProperties {
|
|
4
4
|
a11yNormalize?: boolean | null;
|
|
5
5
|
bodyHyphens?: BodyHyphens | null;
|