eligius 1.0.5 → 1.0.7

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.
@@ -1,12 +1,13 @@
1
1
  import { IEngineConfiguration } from './configuration/types';
2
- import { IEventbus } from './eventbus';
3
- import { IConfigurationResolver, IEligiusEngine, IEngineFactory, ISimpleResourceImporter } from './types';
2
+ import { IConfigurationResolver, IEligiusEngine, IEngineFactory, IEngineFactoryOptions, ISimpleResourceImporter } from './types';
4
3
  export declare class EngineFactory implements IEngineFactory {
5
4
  private resizeTimeout;
6
5
  private actionsLookup;
7
6
  private importer;
8
7
  private eventbus;
9
- constructor(importer: ISimpleResourceImporter, windowRef: any, eventbus?: IEventbus);
8
+ private _handleSpaceBound;
9
+ constructor(importer: ISimpleResourceImporter, windowRef: Window, options?: IEngineFactoryOptions);
10
+ private _handleSpacePress;
10
11
  private _initializeDevtools;
11
12
  destroy(): void;
12
13
  private _resizeHandler;
@@ -12,6 +12,7 @@ export declare class TimelineEventNames {
12
12
  static TIME: string;
13
13
  static SEEKED: string;
14
14
  static COMPLETE: string;
15
+ static RESTART: string;
15
16
  static PLAY: string;
16
17
  static STOP: string;
17
18
  static PAUSE: string;
@@ -6,16 +6,15 @@ declare type TPlayState = 'stopped' | 'running' | 'paused';
6
6
  export declare class RequestAnimationFrameTimelineProvider implements ITimelineProvider {
7
7
  private eventbus;
8
8
  private config;
9
- private _requestID;
10
- private _last;
11
9
  private _currentPosition;
12
10
  private _updateBound;
13
11
  private _eventbusListeners;
14
12
  private _firstFrame;
15
13
  private _currentPlaylistItem;
16
- private _granularity;
14
+ private _tickInterval;
17
15
  private _playlist;
18
16
  private _containerElement;
17
+ private _abortController;
19
18
  playState: TPlayState;
20
19
  loop: boolean;
21
20
  constructor(eventbus: IEventbus, config: IResolvedEngineConfiguration);
@@ -24,10 +23,10 @@ export declare class RequestAnimationFrameTimelineProvider implements ITimelineP
24
23
  private _addEventListeners;
25
24
  private _update;
26
25
  private _start;
27
- private _reset;
26
+ private _resetToStartPosition;
28
27
  private _resize;
29
28
  private _container;
30
- private _cancelAnimationFrame;
29
+ private _stopAnimationInterval;
31
30
  init(): Promise<any>;
32
31
  destroy(): void;
33
32
  toggleplay(): void;
package/dist/types.d.ts CHANGED
@@ -1,10 +1,14 @@
1
1
  import { IAction } from './action/types';
2
2
  import { IEngineConfiguration, IResolvedEngineConfiguration } from './configuration/types';
3
- import { IEventbusListener } from './eventbus/types';
3
+ import { IEventbus, IEventbusListener } from './eventbus/types';
4
4
  import { ITimelineProvider } from './timelineproviders/types';
5
5
  export interface IEngineFactory {
6
6
  createEngine(engineConfig: IEngineConfiguration, resolver?: IConfigurationResolver): IEligiusEngine;
7
7
  }
8
+ export interface IEngineFactoryOptions {
9
+ eventbus?: IEventbus;
10
+ devtools?: boolean;
11
+ }
8
12
  export interface IEligiusEngine {
9
13
  init(): Promise<ITimelineProvider>;
10
14
  destroy(): Promise<void>;
@@ -0,0 +1 @@
1
+ export declare function animationInterval(ms: number, signal: AbortSignal, callback: (time: number) => void): void;
@@ -0,0 +1 @@
1
+ export declare function prepareValueForSerialization(value: any): any;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.5",
2
+ "version": "1.0.7",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/eligius.esm.js",
@@ -43,19 +43,19 @@
43
43
  ],
44
44
  "devDependencies": {
45
45
  "@size-limit/preset-small-lib": "8.1.0",
46
+ "@ts-morph/bootstrap": "0.17.0",
46
47
  "@types/chai": "4.3.3",
47
48
  "@types/fs-extra": "9.0.13",
48
49
  "@types/jasmine": "4.3.0",
49
50
  "@types/jquery": "3.5.14",
50
51
  "@types/jsdom": "^20.0.0",
51
- "@types/mousetrap": "1.6.9",
52
- "@types/node": "18.11.3",
52
+ "@types/node": "18.11.5",
53
53
  "@types/sinon": "10.0.13",
54
54
  "@types/uuid": "8.3.4",
55
- "acorn": "8.8.0",
55
+ "acorn": "8.8.1",
56
56
  "ajv": "8.11.0",
57
57
  "astring": "1.8.3",
58
- "babel-jest": "29.2.1",
58
+ "babel-jest": "29.2.2",
59
59
  "canvas": "2.10.1",
60
60
  "chai": "4.3.6",
61
61
  "cross-env": "7.0.3",
@@ -69,21 +69,22 @@
69
69
  "mediaelement": "5.1.0",
70
70
  "sinon": "14.0.1",
71
71
  "size-limit": "8.1.0",
72
+ "ts-morph": "16.0.0",
72
73
  "ts-node": "10.9.1",
73
74
  "tsconfig-paths": "^4.1.0",
74
75
  "tslib": "2.4.0",
75
- "typedoc": "0.23.17",
76
+ "typedoc": "0.23.18",
76
77
  "typedoc-plugin-missing-exports": "1.0.0",
77
78
  "typescript": "4.8.4",
78
79
  "uvu": "0.5.6"
79
80
  },
80
81
  "peerDependencies": {
81
- "jquery": "3.6.0",
82
- "lottie-web": "5.8.1",
83
- "mediaelement": "5.0.4"
82
+ "jquery": "3.6.1",
83
+ "lottie-web": "5.9.6",
84
+ "mediaelement": "5.1.0"
84
85
  },
85
86
  "dependencies": {
86
- "mousetrap": "1.6.5",
87
+ "hotkeys-js": "3.10.0",
87
88
  "ts-is-present": "1.2.2",
88
89
  "uuid": "9.0.0"
89
90
  },