@readium/navigator 2.5.2 → 2.5.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@readium/navigator",
3
- "version": "2.5.2",
3
+ "version": "2.5.4",
4
4
  "type": "module",
5
5
  "description": "Next generation SDK for publications in Web Apps",
6
6
  "author": "readium",
@@ -50,7 +50,7 @@
50
50
  "generate:css-selector": "node scripts/generate-css-selector.js"
51
51
  },
52
52
  "devDependencies": {
53
- "@readium/css": "^2.0.4",
53
+ "@readium/css": "^2.0.5",
54
54
  "@readium/navigator-html-injectables": "workspace:*",
55
55
  "@readium/shared": "workspace:*",
56
56
  "@types/path-browserify": "^1.0.3",
package/src/Navigator.ts CHANGED
@@ -3,6 +3,7 @@ import {
3
3
  ContentProtectionConfig,
4
4
  PrintProtectionConfig,
5
5
  KeyboardPeripheral,
6
+ KeyboardPeripheralEvent,
6
7
  KeyCombo,
7
8
  DEV_TOOLS,
8
9
  SELECT_ALL,
@@ -12,6 +13,10 @@ import {
12
13
 
13
14
  type cbb = (ok: boolean) => void;
14
15
 
16
+ export interface KeyboardPeripheralEventData extends Omit<KeyboardPeripheralEvent, 'interactiveElement'> {
17
+ interactiveElement?: Element;
18
+ }
19
+
15
20
  export type IKeyboardPeripheralsConfig = Array<Omit<KeyboardPeripheral, 'type'> & {
16
21
  type: Exclude<string, 'developer_tools' | 'select_all' | 'print' | 'save'>;
17
22
  }>;
@@ -1,5 +1,5 @@
1
1
  import { Link, Locator, LocatorLocations, Publication, Timeline, TimelineItem } from "@readium/shared";
2
- import { MediaNavigator, IContentProtectionConfig, IKeyboardPeripheralsConfig } from "../Navigator.ts";
2
+ import { MediaNavigator, IContentProtectionConfig, IKeyboardPeripheralsConfig, KeyboardPeripheralEventData } from "../Navigator.ts";
3
3
  import { Configurable } from "../preferences/Configurable.ts";
4
4
  import { WebAudioEngine, PlaybackState } from "./engine/index.ts";
5
5
  import {
@@ -11,7 +11,7 @@ import {
11
11
  IAudioDefaults
12
12
  } from "./preferences/index.ts";
13
13
  import { AudioPoolManager } from "./AudioPoolManager.ts";
14
- import { ContextMenuEvent, KeyboardEventData, SuspiciousActivityEvent } from "@readium/navigator-html-injectables";
14
+ import { ContextMenuEvent, SuspiciousActivityEvent } from "@readium/navigator-html-injectables";
15
15
  import { AudioNavigatorProtector } from "./protection/AudioNavigatorProtector.ts";
16
16
  import { NAVIGATOR_SUSPICIOUS_ACTIVITY_EVENT } from "../protection/NavigatorProtector.ts";
17
17
  import { KeyboardPeripherals, NAVIGATOR_KEYBOARD_PERIPHERAL_EVENT } from "../peripherals/KeyboardPeripherals.ts";
@@ -36,7 +36,7 @@ export interface AudioNavigatorListeners {
36
36
  seeking: (isSeeking: boolean) => void;
37
37
  seekable: (seekable: TimeRanges) => void;
38
38
  contentProtection: (type: string, data: SuspiciousActivityEvent) => void;
39
- peripheral: (data: KeyboardEventData) => void;
39
+ peripheral: (data: KeyboardPeripheralEventData) => void;
40
40
  contextMenu: (data: ContextMenuEvent) => void;
41
41
  remotePlaybackStateChanged: (state: RemotePlaybackState) => void;
42
42
  }
@@ -16,17 +16,13 @@ import { getContentWidth } from "../helpers/dimensions.ts";
16
16
  import { Injector } from "../injection/Injector.ts";
17
17
  import { createReadiumEpubRules } from "../injection/epubInjectables.ts";
18
18
  import { IInjectableRule, IInjectablesConfig } from "../injection/Injectable.ts";
19
- import { IContentProtectionConfig, IKeyboardPeripheralsConfig } from "../Navigator.ts";
19
+ import { IContentProtectionConfig, IKeyboardPeripheralsConfig, KeyboardPeripheralEventData } from "../Navigator.ts";
20
20
  import { NavigatorProtector, NAVIGATOR_SUSPICIOUS_ACTIVITY_EVENT } from "../protection/NavigatorProtector.ts";
21
21
  import { KeyboardPeripherals, NAVIGATOR_KEYBOARD_PERIPHERAL_EVENT } from "../peripherals/KeyboardPeripherals.ts";
22
22
  import { getScriptMode } from "../helpers/scriptMode.ts";
23
23
 
24
24
  export type ManagerEventKey = "zoom";
25
25
 
26
- export interface KeyboardPeripheralEventData extends Omit<KeyboardPeripheralEvent, 'interactiveElement'> {
27
- interactiveElement?: Element;
28
- }
29
-
30
26
  export interface EpubNavigatorConfiguration {
31
27
  preferences: IEpubPreferences;
32
28
  defaults: IEpubDefaults;
@@ -1,12 +1,11 @@
1
1
  import { Feature, Link, Locator, Publication, ReadingProgression, LocatorLocations } from "@readium/shared";
2
- import { VisualNavigator, VisualNavigatorViewport, ProgressionRange } from "../Navigator.ts";
2
+ import { VisualNavigator, VisualNavigatorViewport, ProgressionRange, KeyboardPeripheralEventData } from "../Navigator.ts";
3
3
  import { Configurable } from "../preferences/Configurable.ts";
4
4
  import { WebPubFramePoolManager } from "./WebPubFramePoolManager.ts";
5
5
  import { BasicTextSelection, CommsEventKey, ContextMenuEvent, FrameClickEvent, KeyboardPeripheralEvent, ModuleName, SuspiciousActivityEvent, WebPubModules } from "@readium/navigator-html-injectables";
6
6
  import * as path from "path-browserify";
7
7
  import { WebPubFrameManager } from "./WebPubFrameManager.ts";
8
-
9
- import { KeyboardPeripheralEventData, ManagerEventKey } from "../epub/EpubNavigator.ts";
8
+ import { ManagerEventKey } from "../epub/EpubNavigator.ts";
10
9
  import { getScriptMode } from "../helpers/scriptMode.ts";
11
10
  import { WebPubCSS } from "./css/WebPubCSS.ts";
12
11
  import { WebUserProperties, WebRSProperties } from "./css/Properties.ts";
@@ -1,6 +1,9 @@
1
1
  import { Link, Locator, Publication, ReadingProgression } from "@readium/shared";
2
- import { ContentProtectionConfig, PrintProtectionConfig, KeyboardPeripheral } from "@readium/navigator-html-injectables";
2
+ import { ContentProtectionConfig, PrintProtectionConfig, KeyboardPeripheral, KeyboardPeripheralEvent } from "@readium/navigator-html-injectables";
3
3
  type cbb = (ok: boolean) => void;
4
+ export interface KeyboardPeripheralEventData extends Omit<KeyboardPeripheralEvent, 'interactiveElement'> {
5
+ interactiveElement?: Element;
6
+ }
4
7
  export type IKeyboardPeripheralsConfig = Array<Omit<KeyboardPeripheral, 'type'> & {
5
8
  type: Exclude<string, 'developer_tools' | 'select_all' | 'print' | 'save'>;
6
9
  }>;
@@ -1,8 +1,8 @@
1
1
  import { Link, Locator, Publication, Timeline, TimelineItem } from "@readium/shared";
2
- import { MediaNavigator, IContentProtectionConfig, IKeyboardPeripheralsConfig } from "../Navigator.ts";
2
+ import { MediaNavigator, IContentProtectionConfig, IKeyboardPeripheralsConfig, KeyboardPeripheralEventData } from "../Navigator.ts";
3
3
  import { Configurable } from "../preferences/Configurable.ts";
4
4
  import { AudioPreferences, AudioSettings, AudioPreferencesEditor, IAudioPreferences, IAudioDefaults } from "./preferences/index.ts";
5
- import { ContextMenuEvent, KeyboardEventData, SuspiciousActivityEvent } from "@readium/navigator-html-injectables";
5
+ import { ContextMenuEvent, SuspiciousActivityEvent } from "@readium/navigator-html-injectables";
6
6
  export interface AudioMetadata {
7
7
  duration: number;
8
8
  textTracks: TextTrackList;
@@ -22,7 +22,7 @@ export interface AudioNavigatorListeners {
22
22
  seeking: (isSeeking: boolean) => void;
23
23
  seekable: (seekable: TimeRanges) => void;
24
24
  contentProtection: (type: string, data: SuspiciousActivityEvent) => void;
25
- peripheral: (data: KeyboardEventData) => void;
25
+ peripheral: (data: KeyboardPeripheralEventData) => void;
26
26
  contextMenu: (data: ContextMenuEvent) => void;
27
27
  remotePlaybackStateChanged: (state: RemotePlaybackState) => void;
28
28
  }
@@ -2,7 +2,7 @@ import { Layout, Link, Locator, Publication, ReadingProgression } from "@readium
2
2
  import { Configurable, ConfigurableSettings, VisualNavigator, VisualNavigatorViewport } from "../index.ts";
3
3
  import { FramePoolManager } from "./frame/FramePoolManager.ts";
4
4
  import { FXLFramePoolManager } from "./fxl/FXLFramePoolManager.ts";
5
- import { CommsEventKey, ContextMenuEvent, BasicTextSelection, FrameClickEvent, SuspiciousActivityEvent, KeyboardPeripheralEvent } from "@readium/navigator-html-injectables";
5
+ import { CommsEventKey, ContextMenuEvent, BasicTextSelection, FrameClickEvent, SuspiciousActivityEvent } from "@readium/navigator-html-injectables";
6
6
  import { FXLFrameManager } from "./fxl/FXLFrameManager.ts";
7
7
  import { FrameManager } from "./frame/FrameManager.ts";
8
8
  import { IEpubPreferences, EpubPreferences } from "./preferences/EpubPreferences.ts";
@@ -10,11 +10,8 @@ import { IEpubDefaults } from "./preferences/EpubDefaults.ts";
10
10
  import { EpubSettings } from "./preferences/index.ts";
11
11
  import { EpubPreferencesEditor } from "./preferences/EpubPreferencesEditor.ts";
12
12
  import { IInjectablesConfig } from "../injection/Injectable.ts";
13
- import { IContentProtectionConfig, IKeyboardPeripheralsConfig } from "../Navigator.ts";
13
+ import { IContentProtectionConfig, IKeyboardPeripheralsConfig, KeyboardPeripheralEventData } from "../Navigator.ts";
14
14
  export type ManagerEventKey = "zoom";
15
- export interface KeyboardPeripheralEventData extends Omit<KeyboardPeripheralEvent, 'interactiveElement'> {
16
- interactiveElement?: Element;
17
- }
18
15
  export interface EpubNavigatorConfiguration {
19
16
  preferences: IEpubPreferences;
20
17
  defaults: IEpubDefaults;
@@ -1,9 +1,9 @@
1
1
  import { Link, Locator, Publication, ReadingProgression } from "@readium/shared";
2
- import { VisualNavigator, VisualNavigatorViewport } from "../Navigator.ts";
2
+ import { VisualNavigator, VisualNavigatorViewport, KeyboardPeripheralEventData } from "../Navigator.ts";
3
3
  import { Configurable } from "../preferences/Configurable.ts";
4
4
  import { BasicTextSelection, CommsEventKey, ContextMenuEvent, FrameClickEvent, SuspiciousActivityEvent } from "@readium/navigator-html-injectables";
5
5
  import { WebPubFrameManager } from "./WebPubFrameManager.ts";
6
- import { KeyboardPeripheralEventData, ManagerEventKey } from "../epub/EpubNavigator.ts";
6
+ import { ManagerEventKey } from "../epub/EpubNavigator.ts";
7
7
  import { IWebPubPreferences, WebPubPreferences } from "./preferences/WebPubPreferences.ts";
8
8
  import { IWebPubDefaults } from "./preferences/WebPubDefaults.ts";
9
9
  import { WebPubSettings } from "./preferences/WebPubSettings.ts";