eligius 1.0.81 → 1.1.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/README.md +16 -7
- package/dist/action/action.d.ts +5 -1
- package/dist/action/endable-action.d.ts +1 -1
- package/dist/action/timeline-action.d.ts +5 -3
- package/dist/action/types.d.ts +1 -1
- package/dist/build/generate-importer-source-code.d.ts +1 -1
- package/dist/configuration/api/action-creator-factory.d.ts +1 -1
- package/dist/configuration/api/configuration-factory.d.ts +104 -8
- package/dist/configuration/api/label-editor.d.ts +11 -0
- package/dist/configuration/configuration-resolver.d.ts +7 -0
- package/dist/configuration/types.d.ts +8 -0
- package/dist/controllers/event-listener-controller.d.ts +10 -3
- package/dist/controllers/label-controller.d.ts +13 -4
- package/dist/controllers/lottie-controller.d.ts +14 -8
- package/dist/controllers/navigation-controller.d.ts +13 -14
- package/dist/controllers/progressbar-controller.d.ts +9 -6
- package/dist/controllers/routing-controller.d.ts +9 -6
- package/dist/controllers/subtitles-controller.d.ts +1 -1
- package/dist/eligius-engine.d.ts +46 -10
- package/dist/eligius.cjs.development.js +5210 -3472
- package/dist/eligius.cjs.development.js.map +1 -1
- package/dist/eligius.cjs.production.min.js +1 -1
- package/dist/eligius.cjs.production.min.js.map +1 -1
- package/dist/eligius.esm.js +5186 -3470
- package/dist/eligius.esm.js.map +1 -1
- package/dist/engine-factory.d.ts +17 -0
- package/dist/eventbus/actionregistry-eventbus-listener.d.ts +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/language-manager.d.ts +6 -0
- package/dist/operation/add-controller-to-element.d.ts +5 -5
- package/dist/operation/animate-with-class.d.ts +1 -1
- package/dist/operation/animate.d.ts +2 -2
- package/dist/operation/calc.d.ts +2 -2
- package/dist/operation/clear-element.d.ts +2 -1
- package/dist/operation/clear-operation-data.d.ts +1 -0
- package/dist/operation/create-element.d.ts +2 -4
- package/dist/operation/custom-function.d.ts +1 -1
- package/dist/operation/end-action.d.ts +5 -1
- package/dist/operation/end-loop.d.ts +1 -2
- package/dist/operation/end-when.d.ts +8 -0
- package/dist/operation/get-attributes-from-element.d.ts +20 -0
- package/dist/operation/get-controller-from-element.d.ts +1 -1
- package/dist/operation/get-controller-instance.d.ts +3 -5
- package/dist/operation/get-element-dimensions.d.ts +2 -2
- package/dist/operation/get-query-params.d.ts +28 -0
- package/dist/operation/helper/find-matching-operation-index.d.ts +35 -0
- package/dist/operation/helper/get-property-chain-value.d.ts +24 -0
- package/dist/operation/helper/globals.d.ts +4 -0
- package/dist/operation/helper/remove-global.d.ts +1 -0
- package/dist/operation/helper/resolve-event-arguments.d.ts +2 -2
- package/dist/operation/helper/resolve-external-property-chain.d.ts +14 -0
- package/dist/operation/helper/resolve-property-chain.d.ts +23 -0
- package/dist/operation/helper/resolve-property-values.d.ts +11 -2
- package/dist/operation/index.d.ts +8 -0
- package/dist/operation/invoke-object-method.d.ts +28 -0
- package/dist/operation/load-json.d.ts +11 -3
- package/dist/operation/log.d.ts +3 -3
- package/dist/operation/math.d.ts +2 -2
- package/dist/operation/metadata/end-when.d.ts +3 -0
- package/dist/operation/metadata/get-attributes-from-element.d.ts +4 -0
- package/dist/operation/metadata/get-query-params.d.ts +4 -0
- package/dist/operation/metadata/index.d.ts +8 -0
- package/dist/operation/metadata/invoke-object-method.d.ts +4 -0
- package/dist/operation/metadata/otherwise.d.ts +3 -0
- package/dist/operation/metadata/set-data.d.ts +4 -0
- package/dist/operation/metadata/set-global-data.d.ts +4 -0
- package/dist/operation/metadata/start-loop.d.ts +2 -2
- package/dist/operation/metadata/types.d.ts +1 -1
- package/dist/operation/metadata/when.d.ts +4 -0
- package/dist/operation/otherwise.d.ts +9 -0
- package/dist/operation/remove-class.d.ts +1 -1
- package/dist/operation/remove-controller-from-element.d.ts +1 -1
- package/dist/operation/remove-element.d.ts +1 -1
- package/dist/operation/remove-properties-from-operation-data.d.ts +1 -0
- package/dist/operation/reparent-element.d.ts +2 -2
- package/dist/operation/request-action.d.ts +1 -1
- package/dist/operation/select-element.d.ts +3 -4
- package/dist/operation/set-data.d.ts +21 -0
- package/dist/operation/set-element-attributes.d.ts +1 -1
- package/dist/operation/set-element-content.d.ts +4 -4
- package/dist/operation/set-global-data.d.ts +11 -0
- package/dist/operation/set-operation-data.d.ts +1 -1
- package/dist/operation/set-style.d.ts +4 -5
- package/dist/operation/start-action.d.ts +3 -3
- package/dist/operation/start-loop.d.ts +7 -6
- package/dist/operation/toggle-class.d.ts +10 -1
- package/dist/operation/toggle-element.d.ts +7 -1
- package/dist/operation/types.d.ts +45 -3
- package/dist/operation/wait.d.ts +3 -3
- package/dist/operation/when.d.ts +18 -0
- package/dist/timeline-event-names.d.ts +46 -4
- package/dist/timelineproviders/index.d.ts +0 -1
- package/dist/timelineproviders/media-element-timeline-provider.d.ts +20 -12
- package/dist/timelineproviders/request-animation-frame-timeline-provider.d.ts +19 -20
- package/dist/timelineproviders/types.d.ts +10 -2
- package/dist/{schema-tools/generate-operation-schemas.d.ts → tools/doc-tools/generate-readmes.d.ts} +0 -0
- package/dist/tools/schema-tools/generate-operation-schemas.d.ts +1 -0
- package/dist/{schema-tools → tools/schema-tools}/html-tag-names.d.ts +0 -0
- package/dist/types.d.ts +42 -3
- package/dist/util/guards/is-function.d.ts +1 -0
- package/dist/util/guards/is-object.d.ts +1 -0
- package/dist/util/guards/is-promise.d.ts +1 -0
- package/dist/util/guards/is-string.d.ts +1 -0
- package/package.json +19 -13
- package/dist/action/is-promise.d.ts +0 -1
- package/dist/operation/helper/extract-operation-data-argument-values.d.ts +0 -1
- package/dist/operation/helper/get-globals.d.ts +0 -1
- package/dist/operation/helper/get-nested-property-value.d.ts +0 -1
- package/dist/operation/helper/get-nested-value.d.ts +0 -1
- package/dist/timelineproviders/jwplayer-timeline-provider.d.ts +0 -42
package/dist/types.d.ts
CHANGED
|
@@ -2,20 +2,49 @@ import { IAction } from './action/types';
|
|
|
2
2
|
import { IEngineConfiguration, IResolvedEngineConfiguration } from './configuration/types';
|
|
3
3
|
import { IEventbus, IEventbusListener } from './eventbus/types';
|
|
4
4
|
import { ITimelineProvider } from './timelineproviders/types';
|
|
5
|
+
export declare type KeysOfType<T, U, B = false> = {
|
|
6
|
+
[P in keyof T]: B extends true ? T[P] extends U ? U extends T[P] ? P : never : never : T[P] extends U ? P : never;
|
|
7
|
+
}[keyof T];
|
|
8
|
+
/**
|
|
9
|
+
* Describes an object that is capable of processing the given configuration and constructing an IEligiusEngine
|
|
10
|
+
* based on this configuration.
|
|
11
|
+
*/
|
|
5
12
|
export interface IEngineFactory {
|
|
13
|
+
/**
|
|
14
|
+
* Returns a fully configured IEligiusEngine instance.
|
|
15
|
+
*
|
|
16
|
+
* @param engineConfig The given configuration
|
|
17
|
+
* @param resolver An optional resolver to process the given IEngineConfiguration. When not provided the IEngineFactory is expected to create their own instance.
|
|
18
|
+
*/
|
|
6
19
|
createEngine(engineConfig: IEngineConfiguration, resolver?: IConfigurationResolver): IEligiusEngine;
|
|
7
20
|
}
|
|
8
21
|
export interface IEngineFactoryOptions {
|
|
9
22
|
eventbus?: IEventbus;
|
|
10
23
|
devtools?: boolean;
|
|
11
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Describes an object that is play one or more timelines, defined by a given set of ITimelineProviders.
|
|
27
|
+
*/
|
|
12
28
|
export interface IEligiusEngine {
|
|
29
|
+
/**
|
|
30
|
+
* Do the preparations needed in order to run the given timelines.
|
|
31
|
+
*/
|
|
13
32
|
init(): Promise<ITimelineProvider>;
|
|
33
|
+
/**
|
|
34
|
+
* Do the necessary cleanup before discarding this instance.
|
|
35
|
+
*/
|
|
14
36
|
destroy(): Promise<void>;
|
|
15
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Describes an object that acts as a registry for imported resources.
|
|
40
|
+
*/
|
|
16
41
|
export interface ISimpleResourceImporter {
|
|
17
42
|
import(name: string): Record<string, any>;
|
|
18
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Describes an object that acts as a registry for imported resources and
|
|
46
|
+
* is able to return all of the registered operation, controller and provider names.
|
|
47
|
+
*/
|
|
19
48
|
export interface IResourceImporter extends ISimpleResourceImporter {
|
|
20
49
|
getOperationNames(): string[];
|
|
21
50
|
getControllerNames(): string[];
|
|
@@ -25,15 +54,25 @@ export interface IConfigurationResolver {
|
|
|
25
54
|
process(configuration: IEngineConfiguration, actionRegistryListener?: IEventbusListener): [Record<string, IAction>, IResolvedEngineConfiguration];
|
|
26
55
|
}
|
|
27
56
|
export declare type TResultCallback = (result: any) => void;
|
|
57
|
+
/**
|
|
58
|
+
* Describes a duration of time expressed in a start and an optional end range with a one second interval.
|
|
59
|
+
*/
|
|
28
60
|
export interface IDuration {
|
|
29
61
|
start: number;
|
|
30
62
|
end?: number;
|
|
31
63
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
64
|
+
/**
|
|
65
|
+
* Describes a duration of time expressed in a start and an end range with a one second interval.
|
|
66
|
+
*/
|
|
67
|
+
export interface IStrictDuration extends Required<IDuration> {
|
|
35
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Describes the different kinds of timeline providers.
|
|
71
|
+
*/
|
|
36
72
|
export declare type TimelineTypes = 'animation' | 'mediaplayer';
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
*/
|
|
37
76
|
export interface ITimelineProviderInfo {
|
|
38
77
|
id: string;
|
|
39
78
|
vendor: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isFunction(value: any): value is Function;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isObject(value: any): value is Object;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isPromise(obj: any): obj is Promise<any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isString(value: any): value is string;
|
package/package.json
CHANGED
|
@@ -1,28 +1,33 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
2
|
+
"version": "1.1.1",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"homepage": "https://rolandzwaga.github.io/eligius/",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/rolandzwaga/eligius/issues?q=is%3Aissue+is%3Aopen+label%3ABug"
|
|
8
|
+
},
|
|
6
9
|
"module": "dist/eligius.esm.js",
|
|
7
10
|
"typings": "dist/index.d.ts",
|
|
8
11
|
"files": [
|
|
9
12
|
"dist"
|
|
10
13
|
],
|
|
11
14
|
"engines": {
|
|
12
|
-
"node": ">=
|
|
15
|
+
"node": ">=16"
|
|
13
16
|
},
|
|
14
17
|
"scripts": {
|
|
15
18
|
"typecheck": "tsc --noEmit",
|
|
16
19
|
"dev": "dts watch",
|
|
17
20
|
"build": "dts build",
|
|
18
21
|
"test": "cross-env TS_NODE_PROJECT=tsconfig.test.json uvu -r ts-node/register -r jsdom-global/register src/test",
|
|
22
|
+
"test:watch": "watchlist src test -- yarn test",
|
|
19
23
|
"check": "tsc --pretty --noEmit",
|
|
20
24
|
"lint": "dts lint",
|
|
21
25
|
"prepare": "dts build",
|
|
22
26
|
"size": "size-limit",
|
|
23
|
-
"generate-
|
|
24
|
-
"
|
|
25
|
-
"
|
|
27
|
+
"generate-readmes": "ts-node ./src/tools/doc-tools/generate-readmes",
|
|
28
|
+
"generate-schema": "ts-node ./src/tools/schema-tools/generate-operation-schemas",
|
|
29
|
+
"typedoc": "typedoc --options typedoc-metadata.json & typedoc --options typedoc.json",
|
|
30
|
+
"docs": "yarn generate-schema && yarn typedoc && node copy-schema && yarn generate-readmes"
|
|
26
31
|
},
|
|
27
32
|
"prettier": {
|
|
28
33
|
"printWidth": 80,
|
|
@@ -49,22 +54,22 @@
|
|
|
49
54
|
"@types/fs-extra": "9.0.13",
|
|
50
55
|
"@types/jasmine": "4.3.0",
|
|
51
56
|
"@types/jquery": "3.5.14",
|
|
52
|
-
"@types/jsdom": "
|
|
53
|
-
"@types/node": "18.11.
|
|
57
|
+
"@types/jsdom": "20.0.0",
|
|
58
|
+
"@types/node": "18.11.9",
|
|
54
59
|
"@types/sinon": "10.0.13",
|
|
55
60
|
"@types/uuid": "8.3.4",
|
|
56
61
|
"acorn": "8.8.1",
|
|
57
62
|
"ajv": "8.11.0",
|
|
58
63
|
"astring": "1.8.3",
|
|
59
64
|
"babel-jest": "29.2.2",
|
|
60
|
-
"canvas": "2.10.
|
|
65
|
+
"canvas": "2.10.2",
|
|
61
66
|
"chai": "4.3.6",
|
|
62
67
|
"cross-env": "7.0.3",
|
|
63
68
|
"dts-cli": "1.6.0",
|
|
64
69
|
"fs-extra": "10.1.0",
|
|
65
70
|
"husky": "8.0.1",
|
|
66
71
|
"jquery": "3.6.1",
|
|
67
|
-
"jsdom": "20.0.
|
|
72
|
+
"jsdom": "20.0.2",
|
|
68
73
|
"jsdom-global": "3.0.2",
|
|
69
74
|
"lottie-web": "5.9.6",
|
|
70
75
|
"mediaelement": "5.1.0",
|
|
@@ -72,12 +77,13 @@
|
|
|
72
77
|
"size-limit": "8.1.0",
|
|
73
78
|
"ts-morph": "16.0.0",
|
|
74
79
|
"ts-node": "10.9.1",
|
|
75
|
-
"tsconfig-paths": "
|
|
76
|
-
"tslib": "2.4.
|
|
77
|
-
"typedoc": "0.23.
|
|
80
|
+
"tsconfig-paths": "4.1.0",
|
|
81
|
+
"tslib": "2.4.1",
|
|
82
|
+
"typedoc": "0.23.20",
|
|
78
83
|
"typedoc-plugin-missing-exports": "1.0.0",
|
|
79
84
|
"typescript": "4.8.4",
|
|
80
|
-
"uvu": "0.5.6"
|
|
85
|
+
"uvu": "0.5.6",
|
|
86
|
+
"watchlist": "0.3.1"
|
|
81
87
|
},
|
|
82
88
|
"peerDependencies": {
|
|
83
89
|
"jquery": "3.6.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isPromise(obj: any): obj is Promise<unknown>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function extractOperationDataArgumentValues(sourceObject: any, argumentValue: string | any): any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getGlobals: (name?: string) => any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getNestedPropertyValue(propertyChain: string, sourceObject: any): any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getNestedValue(properties: any, sourceObject: any): any;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { IResolvedEngineConfiguration } from '../configuration/types';
|
|
2
|
-
import { IEventbus } from '../eventbus/types';
|
|
3
|
-
import { TResultCallback } from '../types';
|
|
4
|
-
import { ITimelineProvider } from './types';
|
|
5
|
-
export declare class JwPlayerTimelineProvider implements ITimelineProvider {
|
|
6
|
-
private eventbus;
|
|
7
|
-
private config;
|
|
8
|
-
private _paused;
|
|
9
|
-
private _player;
|
|
10
|
-
private _currentLoopHandler;
|
|
11
|
-
private _eventbusListeners;
|
|
12
|
-
private _playlist;
|
|
13
|
-
private _videoElementId;
|
|
14
|
-
loop: boolean;
|
|
15
|
-
constructor(eventbus: IEventbus, config: IResolvedEngineConfiguration);
|
|
16
|
-
_extractUrls(configuration: IResolvedEngineConfiguration): string[];
|
|
17
|
-
init(): Promise<any>;
|
|
18
|
-
_handlePlayerReady(resolve: (value: any | PromiseLike<any>) => void): void;
|
|
19
|
-
_handlePlayerComplete(): void;
|
|
20
|
-
_seekedHandler(): void;
|
|
21
|
-
destroy(): void;
|
|
22
|
-
_loopHandler(floor: (x: number) => number, jwplayerEvent: any): void;
|
|
23
|
-
_timeResetLoopHandler(): void;
|
|
24
|
-
_addEventListeners(): void;
|
|
25
|
-
_container(resultCallback: TResultCallback): void;
|
|
26
|
-
toggleplay(): void;
|
|
27
|
-
start(): void;
|
|
28
|
-
stop(): void;
|
|
29
|
-
pause(): void;
|
|
30
|
-
seek(position: number): void;
|
|
31
|
-
resize(width: number, height: number): void;
|
|
32
|
-
duration(resultCallback: TResultCallback): void;
|
|
33
|
-
playlistItem(uri: string): void;
|
|
34
|
-
getPosition(): any;
|
|
35
|
-
getPlaylistIndex(): any;
|
|
36
|
-
getState(): any;
|
|
37
|
-
getDuration(): any;
|
|
38
|
-
getMute(): any;
|
|
39
|
-
getVolume(): any;
|
|
40
|
-
setMute(state: boolean): void;
|
|
41
|
-
setVolume(volume: number): void;
|
|
42
|
-
}
|