eligius 1.0.81 → 1.1.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/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 +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 +96 -3
- 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 +12 -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 +35 -7
- package/dist/eligius.cjs.development.js +5095 -3574
- 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 +5073 -3572
- 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-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 +3 -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 +6 -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-query-params.d.ts +4 -0
- package/dist/operation/metadata/index.d.ts +6 -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-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-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 -2
- 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 +18 -12
- 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
|
@@ -4,6 +4,7 @@ export interface IRemovePropertiesFromOperationDataOperationData {
|
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
6
|
* This operation removes the given list of properties from the current operation data.
|
|
7
|
+
* It will also omit the property 'propertyNames' from the result.
|
|
7
8
|
*
|
|
8
9
|
* @param operationData
|
|
9
10
|
* @returns
|
|
@@ -5,8 +5,8 @@ export interface IReparentElementOperationData {
|
|
|
5
5
|
newParentSelector: string;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
* This operation moves the
|
|
9
|
-
* by the specified
|
|
8
|
+
* This operation moves the given selected element to the new parent that is defined
|
|
9
|
+
* by the specified `newParentSelector`.
|
|
10
10
|
*
|
|
11
11
|
* @param operationData
|
|
12
12
|
* @returns
|
|
@@ -6,7 +6,7 @@ export interface IRequestActionOperationData {
|
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* This operation requests an action instance with the specified name and assigns it
|
|
9
|
-
* to the actionInstance property on the current operation data.
|
|
9
|
+
* to the `actionInstance` property on the current operation data.
|
|
10
10
|
*
|
|
11
11
|
* @param operationData
|
|
12
12
|
* @returns
|
|
@@ -2,16 +2,15 @@
|
|
|
2
2
|
import { TOperation } from './types';
|
|
3
3
|
export interface ISelectElementOperationData {
|
|
4
4
|
selector: string;
|
|
5
|
-
propertyName?: string;
|
|
6
5
|
useSelectedElementAsRoot?: boolean;
|
|
7
6
|
selectedElement?: JQuery;
|
|
8
7
|
}
|
|
9
8
|
/**
|
|
10
9
|
* This operation selects one or more elements using the specified selector.
|
|
11
10
|
*
|
|
12
|
-
* If useSelectedElementAsRoot is set to true and a valid DOM element is assigned
|
|
13
|
-
* to the current operation data
|
|
14
|
-
* then the element will be looked for only in the
|
|
11
|
+
* If `useSelectedElementAsRoot` is set to true and a valid DOM element is assigned
|
|
12
|
+
* to the current operation data's `selectedElement` property
|
|
13
|
+
* then the element will be looked for only in the descendant elements of this DOM element.
|
|
15
14
|
*
|
|
16
15
|
* @param operationData
|
|
17
16
|
* @returns
|
|
@@ -5,7 +5,7 @@ export interface ISetElementAttributesOperationData {
|
|
|
5
5
|
selectedElement: JQuery;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
* This operation sets the
|
|
8
|
+
* This operation sets the specified set of attributes on the given selected element.
|
|
9
9
|
*
|
|
10
10
|
* @param operationData
|
|
11
11
|
* @returns
|
|
@@ -7,12 +7,12 @@ export interface ISetElementContentOperationData {
|
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
9
|
* This operation sets the specified content defined by the value assigned to the template property
|
|
10
|
-
* to the
|
|
10
|
+
* to the given selected element.
|
|
11
11
|
*
|
|
12
|
-
* When the insertionType is set to
|
|
12
|
+
* When the `insertionType` is set to `overwrite` the contents of the selected element are replaced
|
|
13
13
|
* by the given template.
|
|
14
|
-
* When set to
|
|
15
|
-
* When set to
|
|
14
|
+
* When set to `append` the new content will be inserted after the current content.
|
|
15
|
+
* When set to `prepend` the new content will be inserted before the current content.
|
|
16
16
|
*
|
|
17
17
|
* @param operationData
|
|
18
18
|
* @returns
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TOperation } from './types';
|
|
2
|
+
export interface ISetGlobalDataOperationData {
|
|
3
|
+
properties: string[];
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* This operation copies the specified property values from the operationData to the global data.
|
|
7
|
+
*
|
|
8
|
+
* @param operationData
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
export declare const setGlobalData: TOperation<ISetGlobalDataOperationData>;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
+
/// <reference types="jquery" />
|
|
1
2
|
import { TOperation } from './types';
|
|
2
3
|
export interface ISetStyleOperationData {
|
|
3
|
-
properties: any
|
|
4
|
-
|
|
4
|
+
properties: Record<string, any>;
|
|
5
|
+
selectedElement: JQuery;
|
|
5
6
|
}
|
|
6
7
|
/**
|
|
7
8
|
* This operation assigns the specified CSS style properties to the
|
|
8
|
-
*
|
|
9
|
-
* the property defined by the propertyName property which defaults
|
|
10
|
-
* to 'selectedElement'.
|
|
9
|
+
* given selected element.
|
|
11
10
|
*
|
|
12
11
|
* @param operationData
|
|
13
12
|
* @returns
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { IAction } from '../action/types';
|
|
2
|
-
import { TOperation } from './types';
|
|
2
|
+
import { TOperation, TOperationData } from './types';
|
|
3
3
|
export interface IStartActionOperationData {
|
|
4
4
|
actionInstance: IAction;
|
|
5
|
-
actionOperationData:
|
|
5
|
+
actionOperationData: TOperationData;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
* This operation starts the specified action instance using the
|
|
8
|
+
* This operation starts the specified action instance using the given action operation data.
|
|
9
9
|
*
|
|
10
10
|
* The action operation data is first merged with the current operation data before it is
|
|
11
11
|
* passed on to the action. After the action has completed the action operation data properties
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { TOperation } from './types';
|
|
2
|
-
export
|
|
2
|
+
export interface IStartLoopOperationData {
|
|
3
3
|
collection: any[] | string;
|
|
4
|
-
|
|
5
|
-
};
|
|
4
|
+
}
|
|
6
5
|
/**
|
|
7
6
|
* This operation starts a loop using the given collection.
|
|
8
7
|
*
|
|
9
8
|
* Each iteration the current item from the specified collection is
|
|
10
|
-
* assigned to the property on the
|
|
11
|
-
*
|
|
9
|
+
* assigned to the {@link IOperationContext.currentItem} property on the operation context.
|
|
10
|
+
*
|
|
11
|
+
* At the start of the loop, the associated {@link endLoop} operation is determined and when
|
|
12
|
+
* the last iteration is completed the flow control is set to the index of that operation.
|
|
12
13
|
*
|
|
13
14
|
* @param operationData
|
|
14
15
|
* @returns
|
|
15
16
|
*/
|
|
16
|
-
export declare const startLoop: TOperation<
|
|
17
|
+
export declare const startLoop: TOperation<IStartLoopOperationData>;
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
/// <reference types="jquery" />
|
|
2
2
|
import { TOperation } from './types';
|
|
3
3
|
export interface IToggleClassOperationData {
|
|
4
|
+
/**
|
|
5
|
+
* The element on which the class will be toggled
|
|
6
|
+
*/
|
|
4
7
|
selectedElement: JQuery;
|
|
8
|
+
/**
|
|
9
|
+
* The class that will be toggled
|
|
10
|
+
*/
|
|
5
11
|
className: string;
|
|
6
12
|
}
|
|
7
13
|
/**
|
|
8
|
-
* This operation toggles the specfied class name on the
|
|
14
|
+
* This operation toggles the specfied class name on the given selected element.
|
|
15
|
+
*
|
|
16
|
+
* Meaning, if the specified class name exists on the given element it will be removed,
|
|
17
|
+
* otherwise it will be added.
|
|
9
18
|
*
|
|
10
19
|
* @param operationData
|
|
11
20
|
* @returns
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
/// <reference types="jquery" />
|
|
2
2
|
import { TOperation } from './types';
|
|
3
3
|
export interface IToggleElementOperationData {
|
|
4
|
+
/**
|
|
5
|
+
* The element whose visibility will be toggled
|
|
6
|
+
*/
|
|
4
7
|
selectedElement: JQuery;
|
|
5
8
|
}
|
|
6
9
|
/**
|
|
7
|
-
* This operation toggles the visibility of the
|
|
10
|
+
* This operation toggles the visibility of the given selected element.
|
|
11
|
+
*
|
|
12
|
+
* Meaning, if the element is hidden, it will be made visible, otherwise
|
|
13
|
+
* it will be hidden.
|
|
8
14
|
*
|
|
9
15
|
* @param operationData
|
|
10
16
|
* @returns
|
|
@@ -1,13 +1,55 @@
|
|
|
1
|
+
import { IResolvedOperation } from '../configuration/types';
|
|
1
2
|
import { IEventbus } from '../eventbus';
|
|
2
|
-
export declare type TOperationData = any
|
|
3
|
+
export declare type TOperationData = Record<string, any>;
|
|
3
4
|
export declare type TOperationResult<T = TOperationData> = Promise<T> | T;
|
|
4
5
|
export interface IOperationContext {
|
|
6
|
+
/**
|
|
7
|
+
* When inside a loop, this is the current iteration of said loop
|
|
8
|
+
*/
|
|
5
9
|
loopIndex?: number;
|
|
10
|
+
/**
|
|
11
|
+
* The number of iterations for the current loop
|
|
12
|
+
*/
|
|
6
13
|
loopLength?: number;
|
|
7
|
-
|
|
14
|
+
/**
|
|
15
|
+
* The start index of the loop within the total number of operations
|
|
16
|
+
*/
|
|
17
|
+
loopStartIndex?: number;
|
|
18
|
+
/**
|
|
19
|
+
* The end index of the loop within the total number of operations
|
|
20
|
+
*/
|
|
21
|
+
loopEndIndex?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Set this index to change the current item in the main operations loop
|
|
24
|
+
*/
|
|
8
25
|
newIndex?: number;
|
|
26
|
+
/**
|
|
27
|
+
* The current index with in the main operations loop
|
|
28
|
+
*/
|
|
9
29
|
currentIndex: number;
|
|
10
|
-
|
|
30
|
+
/**
|
|
31
|
+
* The eventbus instance shared amongst actions and operations
|
|
32
|
+
*/
|
|
11
33
|
eventbus: IEventbus;
|
|
34
|
+
/**
|
|
35
|
+
* The list of operations that is currently being executed
|
|
36
|
+
*/
|
|
37
|
+
operations: IResolvedOperation[];
|
|
38
|
+
/**
|
|
39
|
+
* The result of the last when evaluation, if any
|
|
40
|
+
*/
|
|
41
|
+
whenEvaluation?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
owner?: any;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
*/
|
|
49
|
+
currentItem?: any;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
*/
|
|
53
|
+
parent?: IOperationContext;
|
|
12
54
|
}
|
|
13
55
|
export declare type TOperation<T = TOperationData> = (this: IOperationContext, operationData: T) => TOperationResult<T>;
|
package/dist/operation/wait.d.ts
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TOperation } from './types';
|
|
2
|
+
declare type TOperator = '!=' | '==' | '>=' | '<=' | '>' | '<';
|
|
3
|
+
declare type TValue = `'${string}'` | number | `operationdata.${string}` | `globaldata.${string}` | `context.${string}`;
|
|
4
|
+
declare type TExpression = `${TValue}${TOperator}${TValue}`;
|
|
5
|
+
export interface IWhenOperationData {
|
|
6
|
+
expression: TExpression;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* When the given expression evaluates to false, subsequent operations will be skipped
|
|
10
|
+
* until an {@link endWhen} or {@link otherwise} operation is encountered.
|
|
11
|
+
*
|
|
12
|
+
* Practically, this means an `if` or `if`/`else` statement control flow implementation in a list of operations.
|
|
13
|
+
*
|
|
14
|
+
* @param operationData
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
export declare const when: TOperation<IWhenOperationData>;
|
|
18
|
+
export {};
|
|
@@ -1,16 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* These are the event names that are being braodcast and/or handled by Eligius.
|
|
3
|
+
*/
|
|
1
4
|
export declare class TimelineEventNames {
|
|
5
|
+
/**
|
|
6
|
+
* Broadcasting this event will start the current timeline when it is currently paused, or pauses when it is playing.
|
|
7
|
+
*/
|
|
2
8
|
static PLAY_TOGGLE_REQUEST: string;
|
|
9
|
+
/**
|
|
10
|
+
* Broadcasting this event will start the current timeline.
|
|
11
|
+
*/
|
|
3
12
|
static PLAY_REQUEST: string;
|
|
13
|
+
/**
|
|
14
|
+
* Broadcasting this event will stop the current timeline.
|
|
15
|
+
*/
|
|
4
16
|
static STOP_REQUEST: string;
|
|
17
|
+
/**
|
|
18
|
+
* Broadcasting this event will pause the current timeline.
|
|
19
|
+
*/
|
|
5
20
|
static PAUSE_REQUEST: string;
|
|
21
|
+
/**
|
|
22
|
+
* Broadcasting this event will seek the specified position in the current timeline.
|
|
23
|
+
* This event takes one argument: A numeric value that represents the new position.
|
|
24
|
+
*/
|
|
6
25
|
static SEEK_REQUEST: string;
|
|
26
|
+
/**
|
|
27
|
+
* Broadcasting this event will tell the current {@link ITimelineProvider} to resize.
|
|
28
|
+
*/
|
|
7
29
|
static RESIZE_REQUEST: string;
|
|
30
|
+
/**
|
|
31
|
+
* Broadcasting this event will return the element in which the current timeline is being rendered.
|
|
32
|
+
* This event takes one argument: The callback function that will return the specified element.
|
|
33
|
+
*/
|
|
8
34
|
static CONTAINER_REQUEST: string;
|
|
35
|
+
/**
|
|
36
|
+
* Broadcasting this event will return the duration of the current timeline.
|
|
37
|
+
* This event takes one argument: The callback function that will return the duration.
|
|
38
|
+
*/
|
|
9
39
|
static DURATION_REQUEST: string;
|
|
40
|
+
/**
|
|
41
|
+
* Broadcasting this event will return the uri of the current timeline.
|
|
42
|
+
* This event takes one argument: The callback function that will return the uri.
|
|
43
|
+
*/
|
|
10
44
|
static REQUEST_CURRENT_TIMELINE: string;
|
|
45
|
+
/**
|
|
46
|
+
* This event is broadcast by {@link ITimelineProvider} instances to announce their duration.
|
|
47
|
+
*/
|
|
11
48
|
static DURATION: string;
|
|
49
|
+
/**
|
|
50
|
+
* This event is broadcast by {@link ITimelineProvider} instances to announce the current play position whenever it changes.
|
|
51
|
+
*/
|
|
12
52
|
static TIME: string;
|
|
53
|
+
/**
|
|
54
|
+
* This event is broadcast by {@link ITimelineProvider} instances to announce the new play position and duration after a seek was executed.
|
|
55
|
+
*/
|
|
13
56
|
static SEEKED: string;
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
*/
|
|
14
60
|
static COMPLETE: string;
|
|
15
61
|
static RESTART: string;
|
|
16
62
|
static PLAY: string;
|
|
@@ -18,8 +64,6 @@ export declare class TimelineEventNames {
|
|
|
18
64
|
static PAUSE: string;
|
|
19
65
|
static SEEK: string;
|
|
20
66
|
static RESIZE: string;
|
|
21
|
-
static POSITION_UPDATE: string;
|
|
22
|
-
static TIME_UPDATE: string;
|
|
23
67
|
static CURRENT_TIMELINE_CHANGE: string;
|
|
24
68
|
static FIRST_FRAME: string;
|
|
25
69
|
static REQUEST_INSTANCE: string;
|
|
@@ -1,22 +1,32 @@
|
|
|
1
|
+
/// <reference types="jquery" />
|
|
1
2
|
import 'mediaelement';
|
|
2
3
|
import { IResolvedEngineConfiguration } from '../configuration/types';
|
|
3
|
-
import {
|
|
4
|
-
import { TResultCallback } from '../types';
|
|
5
|
-
import { ITimelineProvider } from './types';
|
|
4
|
+
import { ITimelineProvider, TPlayState } from './types';
|
|
6
5
|
export declare class MediaElementTimelineProvider implements ITimelineProvider {
|
|
7
|
-
private eventbus;
|
|
8
6
|
private config;
|
|
9
7
|
private _videoElementId;
|
|
10
|
-
private
|
|
8
|
+
private _firstFramePending;
|
|
11
9
|
private _playlist;
|
|
12
10
|
private _length;
|
|
13
11
|
private _urls;
|
|
14
|
-
|
|
12
|
+
private _onTime;
|
|
13
|
+
private _onComplete;
|
|
14
|
+
private _onRestart;
|
|
15
|
+
private _onFirstFrame;
|
|
16
|
+
private _player;
|
|
15
17
|
loop: boolean;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
private _playState;
|
|
19
|
+
get playState(): TPlayState;
|
|
20
|
+
constructor(config: IResolvedEngineConfiguration);
|
|
18
21
|
_extractUrls(configuration: IResolvedEngineConfiguration): string[];
|
|
19
22
|
init(): Promise<void>;
|
|
23
|
+
private _endedHandler;
|
|
24
|
+
private _playingHandler;
|
|
25
|
+
private _pauseHandler;
|
|
26
|
+
onTime(callback: (position: number) => void): void;
|
|
27
|
+
onComplete(callback: () => void): void;
|
|
28
|
+
onRestart(callback: () => void): void;
|
|
29
|
+
onFirstFrame(callback: () => void): void;
|
|
20
30
|
private _timeUpdateHandler;
|
|
21
31
|
private _addVideoElements;
|
|
22
32
|
_extractFileType(url: string): string;
|
|
@@ -25,10 +35,8 @@ export declare class MediaElementTimelineProvider implements ITimelineProvider {
|
|
|
25
35
|
stop(): void;
|
|
26
36
|
destroy(): void;
|
|
27
37
|
pause(): void;
|
|
28
|
-
seek(position: number):
|
|
29
|
-
resize(): void;
|
|
30
|
-
duration(resultCallback: TResultCallback): void;
|
|
38
|
+
seek(position: number): Promise<number>;
|
|
31
39
|
getDuration(): number;
|
|
32
40
|
getPosition(): number;
|
|
33
|
-
|
|
41
|
+
getContainer(): JQuery<HTMLElement> | undefined;
|
|
34
42
|
}
|
|
@@ -1,41 +1,40 @@
|
|
|
1
|
+
/// <reference types="jquery" />
|
|
1
2
|
import { IResolvedEngineConfiguration } from '../configuration/types';
|
|
2
|
-
import {
|
|
3
|
-
import { TResultCallback } from '../types';
|
|
4
|
-
import { ITimelineProvider } from './types';
|
|
5
|
-
declare type TPlayState = 'stopped' | 'running' | 'paused';
|
|
3
|
+
import { ITimelineProvider, TPlayState } from './types';
|
|
6
4
|
export declare class RequestAnimationFrameTimelineProvider implements ITimelineProvider {
|
|
7
|
-
private eventbus;
|
|
8
|
-
private config;
|
|
9
5
|
private _currentPosition;
|
|
10
6
|
private _updateBound;
|
|
11
|
-
private
|
|
12
|
-
private _firstFrame;
|
|
7
|
+
private _firstFramePending;
|
|
13
8
|
private _currentPlaylistItem;
|
|
14
9
|
private _tickInterval;
|
|
15
10
|
private _playlist;
|
|
16
11
|
private _containerElement;
|
|
17
12
|
private _abortController;
|
|
18
|
-
|
|
13
|
+
private _onTime;
|
|
14
|
+
private _onComplete;
|
|
15
|
+
private _onRestart;
|
|
16
|
+
private _onFirstFrame;
|
|
19
17
|
loop: boolean;
|
|
20
|
-
|
|
18
|
+
private _playState;
|
|
19
|
+
get playState(): TPlayState;
|
|
20
|
+
constructor(config: IResolvedEngineConfiguration);
|
|
21
21
|
private _extractPlaylist;
|
|
22
|
+
onTime(callback: (position: number) => void): void;
|
|
23
|
+
onComplete(callback: () => void): void;
|
|
24
|
+
onRestart(callback: () => void): void;
|
|
25
|
+
onFirstFrame(callback: () => void): void;
|
|
22
26
|
playlistItem(uri: string): void;
|
|
23
|
-
private _addEventListeners;
|
|
24
27
|
private _update;
|
|
25
|
-
private
|
|
28
|
+
private _callbackPosition;
|
|
29
|
+
start(): void;
|
|
26
30
|
private _resetToStartPosition;
|
|
27
|
-
|
|
28
|
-
private _container;
|
|
31
|
+
getContainer(): JQuery<HTMLElement> | undefined;
|
|
29
32
|
private _stopAnimationInterval;
|
|
30
|
-
init(): Promise<
|
|
33
|
+
init(): Promise<void>;
|
|
31
34
|
destroy(): void;
|
|
32
|
-
toggleplay(): void;
|
|
33
|
-
start(): void;
|
|
34
35
|
stop(): void;
|
|
35
36
|
pause(): void;
|
|
36
|
-
seek(position: number):
|
|
37
|
+
seek(position: number): Promise<number>;
|
|
37
38
|
getPosition(): number;
|
|
38
39
|
getDuration(): number;
|
|
39
|
-
requestDurationHandler(callBack: TResultCallback): void;
|
|
40
40
|
}
|
|
41
|
-
export {};
|
|
@@ -1,12 +1,20 @@
|
|
|
1
|
+
/// <reference types="jquery" />
|
|
2
|
+
export declare type TPlayState = 'stopped' | 'running';
|
|
1
3
|
export interface ITimelineProvider {
|
|
2
4
|
loop: boolean;
|
|
3
|
-
init(): Promise<
|
|
5
|
+
init(): Promise<void>;
|
|
4
6
|
start(): void;
|
|
5
7
|
stop(): void;
|
|
6
8
|
pause(): void;
|
|
7
|
-
seek(position: number):
|
|
9
|
+
seek(position: number): Promise<number>;
|
|
8
10
|
playlistItem(uri: string): void;
|
|
9
11
|
getPosition(): number;
|
|
10
12
|
getDuration(): number;
|
|
13
|
+
getContainer(): JQuery<HTMLElement> | undefined;
|
|
11
14
|
destroy(): void;
|
|
15
|
+
onTime(callback: (position: number) => void): void;
|
|
16
|
+
onComplete(callback: () => void): void;
|
|
17
|
+
onRestart(callback: () => void): void;
|
|
18
|
+
onFirstFrame(callback: () => void): void;
|
|
19
|
+
playState: TPlayState;
|
|
12
20
|
}
|
package/dist/{schema-tools/generate-operation-schemas.d.ts → tools/doc-tools/generate-readmes.d.ts}
RENAMED
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
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;
|