@readium/navigator-html-injectables 2.3.1-alpha.2 → 2.4.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/index.js +852 -701
  2. package/dist/index.umd.cjs +24 -13
  3. package/package.json +8 -8
  4. package/src/Loader.ts +3 -3
  5. package/src/comms/comms.ts +5 -5
  6. package/src/comms/index.ts +3 -3
  7. package/src/helpers/css.ts +2 -4
  8. package/src/helpers/document.ts +13 -10
  9. package/src/helpers/locator.ts +2 -2
  10. package/src/index.ts +4 -4
  11. package/src/modules/Decorator.ts +18 -18
  12. package/src/modules/Module.ts +4 -4
  13. package/src/modules/ModuleLibrary.ts +15 -11
  14. package/src/modules/Peripherals.ts +70 -61
  15. package/src/modules/index.ts +4 -4
  16. package/src/modules/setup/FixedSetup.ts +6 -6
  17. package/src/modules/setup/ReflowableSetup.ts +6 -6
  18. package/src/modules/setup/Setup.ts +5 -5
  19. package/src/modules/setup/WebPubSetup.ts +5 -5
  20. package/src/modules/snapper/CJKVerticalSnapper.ts +322 -0
  21. package/src/modules/snapper/ColumnSnapper.ts +161 -99
  22. package/src/modules/snapper/ScrollSnapper.ts +18 -18
  23. package/src/modules/snapper/Snapper.ts +5 -5
  24. package/src/modules/snapper/WebPubSnapper.ts +15 -15
  25. package/src/protection/BulkCopyProtector.ts +15 -15
  26. package/src/protection/KeyCombinationManager.ts +8 -8
  27. package/src/protection/PatternAnalyzer.ts +18 -18
  28. package/src/protection/PrintProtector.ts +12 -12
  29. package/src/protection/SelectionAnalyzer.ts +1 -1
  30. package/src/protection/config.ts +4 -4
  31. package/src/protection/index.ts +6 -6
  32. package/src/vendor/hypothesis/anchoring/html.ts +1 -1
  33. package/src/vendor/hypothesis/anchoring/types.ts +1 -1
  34. package/types/src/Loader.d.ts +2 -2
  35. package/types/src/comms/comms.d.ts +2 -2
  36. package/types/src/comms/index.d.ts +3 -3
  37. package/types/src/helpers/css.d.ts +1 -2
  38. package/types/src/helpers/document.d.ts +1 -1
  39. package/types/src/index.d.ts +4 -4
  40. package/types/src/modules/Decorator.d.ts +4 -4
  41. package/types/src/modules/Module.d.ts +3 -3
  42. package/types/src/modules/ModuleLibrary.d.ts +2 -2
  43. package/types/src/modules/Peripherals.d.ts +10 -9
  44. package/types/src/modules/index.d.ts +4 -4
  45. package/types/src/modules/setup/FixedSetup.d.ts +4 -4
  46. package/types/src/modules/setup/ReflowableSetup.d.ts +3 -3
  47. package/types/src/modules/setup/Setup.d.ts +4 -4
  48. package/types/src/modules/setup/WebPubSetup.d.ts +3 -3
  49. package/types/src/modules/snapper/CJKVerticalSnapper.d.ts +57 -0
  50. package/types/src/modules/snapper/ColumnSnapper.d.ts +16 -5
  51. package/types/src/modules/snapper/ScrollSnapper.d.ts +5 -5
  52. package/types/src/modules/snapper/Snapper.d.ts +4 -4
  53. package/types/src/modules/snapper/WebPubSnapper.d.ts +5 -5
  54. package/types/src/protection/BulkCopyProtector.d.ts +1 -1
  55. package/types/src/protection/KeyCombinationManager.d.ts +3 -3
  56. package/types/src/protection/PrintProtector.d.ts +4 -4
  57. package/types/src/protection/config.d.ts +3 -3
  58. package/types/src/protection/index.d.ts +6 -6
  59. package/types/src/vendor/hypothesis/anchoring/html.d.ts +1 -1
  60. package/types/src/vendor/hypothesis/anchoring/types.d.ts +1 -1
@@ -1,7 +1,7 @@
1
- import { Comms } from "../../comms";
2
- import { ReadiumWindow } from "../../helpers/dom";
3
- import { Module } from "../Module";
4
- import { ModuleName } from "../ModuleLibrary";
1
+ import { Comms } from "../../comms/index.ts";
2
+ import { ReadiumWindow } from "../../helpers/dom.ts";
3
+ import { Module } from "../Module.ts";
4
+ import { ModuleName } from "../ModuleLibrary.ts";
5
5
  export declare abstract class Snapper extends Module {
6
6
  static readonly moduleName: ModuleName;
7
7
  private protected;
@@ -1,8 +1,8 @@
1
- import { Comms } from "../../comms/comms";
2
- import { ReadiumWindow } from "../../helpers/dom";
3
- import { ModuleName } from "../ModuleLibrary";
4
- import { Snapper } from "./Snapper";
5
- import { SuspiciousScrollingEvent } from "./ScrollSnapper";
1
+ import { Comms } from "../../comms/comms.ts";
2
+ import { ReadiumWindow } from "../../helpers/dom.ts";
3
+ import { ModuleName } from "../ModuleLibrary.ts";
4
+ import { Snapper } from "./Snapper.ts";
5
+ import { SuspiciousScrollingEvent } from "./ScrollSnapper.ts";
6
6
  export type { SuspiciousScrollingEvent };
7
7
  export declare class WebPubSnapper extends Snapper {
8
8
  static readonly moduleName: ModuleName;
@@ -1,4 +1,4 @@
1
- import { ReadiumWindow } from "../helpers/dom";
1
+ import { ReadiumWindow } from "../helpers/dom.ts";
2
2
  export interface BulkCopyProtectionOptions {
3
3
  enabled: boolean;
4
4
  maxSelectionPercent: number;
@@ -1,6 +1,6 @@
1
- import { KeyCombo, KeyboardPeripheral } from "./KeyboardCombinations";
2
- import { BaseKeyboardPeripheralEvent, KeyboardEventData } from "../modules/Peripherals";
3
- import { ReadiumWindow } from "../helpers/dom";
1
+ import { KeyCombo, KeyboardPeripheral } from "./KeyboardCombinations.ts";
2
+ import { BaseKeyboardPeripheralEvent, KeyboardEventData } from "../modules/Peripherals.ts";
3
+ import { ReadiumWindow } from "../helpers/dom.ts";
4
4
  export type KeyHandler = (event: KeyboardEvent) => void;
5
5
  export type ActivityEventDispatcher = (event: KeyboardPeripheralEvent) => void;
6
6
  export interface KeyboardPeripheralEvent extends BaseKeyboardPeripheralEvent, KeyboardEventData {
@@ -1,7 +1,7 @@
1
- import { Comms } from "../comms";
2
- import { ReadiumWindow } from "../helpers/dom";
3
- import { Module } from "../modules/Module";
4
- import { ModuleName } from "../modules/ModuleLibrary";
1
+ import { Comms } from "../comms/index.ts";
2
+ import { ReadiumWindow } from "../helpers/dom.ts";
3
+ import { Module } from "../modules/Module.ts";
4
+ import { ModuleName } from "../modules/ModuleLibrary.ts";
5
5
  export interface PrintProtectionConfig {
6
6
  disable?: boolean;
7
7
  watermark?: string;
@@ -1,6 +1,6 @@
1
- import { BulkCopyProtectionOptions } from "./BulkCopyProtector";
2
- import { PatternAnalyzerOptions } from "./PatternAnalyzer";
3
- import { SelectionAnalyzerOptions } from "./SelectionAnalyzer";
1
+ import { BulkCopyProtectionOptions } from "./BulkCopyProtector.ts";
2
+ import { PatternAnalyzerOptions } from "./PatternAnalyzer.ts";
3
+ import { SelectionAnalyzerOptions } from "./SelectionAnalyzer.ts";
4
4
  export declare const DEFAULT_PATTERN_ANALYZER_CONFIG: PatternAnalyzerOptions;
5
5
  export declare const SCROLL_PROTECTION_CONFIG: PatternAnalyzerOptions;
6
6
  export declare const SELECTION_ANALYZER_CONFIG: SelectionAnalyzerOptions;
@@ -1,6 +1,6 @@
1
- export * from "./BulkCopyProtector";
2
- export * from "./KeyCombinationManager";
3
- export * from "./KeyboardCombinations";
4
- export * from "./PatternAnalyzer";
5
- export * from "./SelectionAnalyzer";
6
- export * from "./PrintProtector";
1
+ export * from "./BulkCopyProtector.ts";
2
+ export * from "./KeyCombinationManager.ts";
3
+ export * from "./KeyboardCombinations.ts";
4
+ export * from "./PatternAnalyzer.ts";
5
+ export * from "./SelectionAnalyzer.ts";
6
+ export * from "./PrintProtector.ts";
@@ -1,4 +1,4 @@
1
- import type { MediaTimeSelector, RangeSelector, Selector, TextPositionSelector, TextQuoteSelector } from './api-types';
1
+ import type { MediaTimeSelector, RangeSelector, Selector, TextPositionSelector, TextQuoteSelector } from './api-types.ts';
2
2
  type Options = {
3
3
  hint?: number;
4
4
  };
@@ -7,7 +7,7 @@
7
7
  * 2. Insulating the rest of the code from API changes in the underlying anchoring
8
8
  * libraries.
9
9
  */
10
- import type { MediaTimeSelector, RangeSelector, TextPositionSelector, TextQuoteSelector } from './api-types';
10
+ import type { MediaTimeSelector, RangeSelector, TextPositionSelector, TextQuoteSelector } from './api-types.ts';
11
11
  /**
12
12
  * Converts between `RangeSelector` selectors and `Range` objects.
13
13
  */