eligius 1.3.0 → 1.3.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 +6 -0
- package/dist/{chunk-CTAAG5j7.js → chunk-Bp6m_JJh.js} +1 -1
- package/dist/index.d.ts +54 -51
- package/dist/index.js +23 -40
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -6,6 +6,10 @@ The engine can be the basis for video annotations, presentation software or inte
|
|
|
6
6
|
|
|
7
7
|
Eligius is NOT a game or animation engine, instead, it is a Story Telling Engine.
|
|
8
8
|
|
|
9
|
+
## Eligian
|
|
10
|
+
|
|
11
|
+
Eligius is also the runtime for the [Eligian](https://github.com/rolandzwaga/eligian) language.
|
|
12
|
+
|
|
9
13
|
## description
|
|
10
14
|
|
|
11
15
|
The main concepts in Eligius are timelines, actions and operations. A timeline can be played, paused, stopped and scrubbed through.
|
|
@@ -282,6 +286,8 @@ Obviously having to type all of that JSON by hand can be a tad overwhelming and
|
|
|
282
286
|
|
|
283
287
|
It is encouraged to use this API to build specialized DSL's for specific presentations.
|
|
284
288
|
|
|
289
|
+
Also, there is the [Eligian](https://github.com/rolandzwaga/eligian) project that aims to become an actual programming language for the ELigius runtime.
|
|
290
|
+
|
|
285
291
|
## Source documentation
|
|
286
292
|
|
|
287
293
|
[Check out this link for the full type docs](https://rolandzwaga.github.io/eligius/)
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as __export } from "./chunk-Bp6m_JJh.js";
|
|
1
2
|
import { AnimationItem, CanvasRendererConfig, HTMLRendererConfig, SVGRendererConfig } from "lottie-web";
|
|
2
3
|
|
|
3
4
|
//#region src/eventbus/types.d.ts
|
|
@@ -59,7 +60,7 @@ declare class RequestVideoUriInterceptor implements IEventbusInterceptor {
|
|
|
59
60
|
//#endregion
|
|
60
61
|
//#region src/operation/types.d.ts
|
|
61
62
|
type TOperationData = Record<string, any>;
|
|
62
|
-
type TOperationResult<T = TOperationData> = Promise<T> | T;
|
|
63
|
+
type TOperationResult<T$1 = TOperationData> = Promise<T$1> | T$1;
|
|
63
64
|
interface IOperationScope {
|
|
64
65
|
/**
|
|
65
66
|
* When inside a loop, this is the current iteration of said loop
|
|
@@ -114,9 +115,9 @@ interface IOperationScope {
|
|
|
114
115
|
*/
|
|
115
116
|
variables?: Record<string, unknown>;
|
|
116
117
|
}
|
|
117
|
-
type TOperation<T extends TOperationData = TOperationData, RT = T> = (this: IOperationScope, operationData: T) => TOperationResult<RT>;
|
|
118
|
-
type ExtractOperationData<T extends TOperation<TOperationData>> = T extends TOperation<infer K> ? K : never;
|
|
119
|
-
type ExtractReturnedOperationData<T extends TOperation<TOperationData, TOperationData>> = T extends TOperation<any, infer K> ? unknown extends K ? ExtractOperationData<T> : K : never;
|
|
118
|
+
type TOperation<T$1 extends TOperationData = TOperationData, RT = T$1> = (this: IOperationScope, operationData: T$1) => TOperationResult<RT>;
|
|
119
|
+
type ExtractOperationData<T$1 extends TOperation<TOperationData>> = T$1 extends TOperation<infer K> ? K : never;
|
|
120
|
+
type ExtractReturnedOperationData<T$1 extends TOperation<TOperationData, TOperationData>> = T$1 extends TOperation<any, infer K> ? unknown extends K ? ExtractOperationData<T$1> : K : never;
|
|
120
121
|
//#endregion
|
|
121
122
|
//#region src/timelineproviders/types.d.ts
|
|
122
123
|
type TPlayState = 'stopped' | 'running';
|
|
@@ -140,7 +141,7 @@ interface ITimelineProvider {
|
|
|
140
141
|
}
|
|
141
142
|
//#endregion
|
|
142
143
|
//#region src/types.d.ts
|
|
143
|
-
type KeysOfType<T, U> = { [P in keyof T]-?: T[P] extends U | undefined ? P : never }[keyof T];
|
|
144
|
+
type KeysOfType<T$1, U> = { [P in keyof T$1]-?: T$1[P] extends U | undefined ? P : never }[keyof T$1];
|
|
144
145
|
/**
|
|
145
146
|
* Describes an object that is capable of processing the given configuration and constructing an IEligiusEngine
|
|
146
147
|
* based on this configuration.
|
|
@@ -189,7 +190,7 @@ interface IResourceImporter extends ISimpleResourceImporter {
|
|
|
189
190
|
interface IConfigurationResolver {
|
|
190
191
|
process(configuration: IEngineConfiguration, actionRegistryListener?: IEventbusListener): [Record<string, IAction>, IResolvedEngineConfiguration];
|
|
191
192
|
}
|
|
192
|
-
type TResultCallback<T> = (result: T) => void;
|
|
193
|
+
type TResultCallback<T$1> = (result: T$1) => void;
|
|
193
194
|
/**
|
|
194
195
|
* Describes a duration of time expressed in a start and an optional end range with a one second interval.
|
|
195
196
|
*/
|
|
@@ -248,7 +249,7 @@ interface ISubtitle {
|
|
|
248
249
|
duration: IStrictDuration;
|
|
249
250
|
text: string;
|
|
250
251
|
}
|
|
251
|
-
type RequireKeys<T, K extends keyof T> = { [P in K]-?: T[P] };
|
|
252
|
+
type RequireKeys<T$1, K$1 extends keyof T$1> = { [P in K$1]-?: T$1[P] };
|
|
252
253
|
//#endregion
|
|
253
254
|
//#region src/action/types.d.ts
|
|
254
255
|
interface IAction {
|
|
@@ -267,9 +268,9 @@ interface ITimelineAction extends IEndableAction {
|
|
|
267
268
|
}
|
|
268
269
|
//#endregion
|
|
269
270
|
//#region src/controllers/types.d.ts
|
|
270
|
-
interface IController<T extends TOperationData> {
|
|
271
|
+
interface IController<T$1 extends TOperationData> {
|
|
271
272
|
name: string;
|
|
272
|
-
init(operationData: T): void;
|
|
273
|
+
init(operationData: T$1): void;
|
|
273
274
|
attach(eventbus: IEventbus): Promise<any> | void;
|
|
274
275
|
detach(eventbus: IEventbus): void;
|
|
275
276
|
}
|
|
@@ -573,7 +574,7 @@ interface IAddClassOperationData {
|
|
|
573
574
|
declare const addClass: TOperation<IAddClassOperationData>;
|
|
574
575
|
//#endregion
|
|
575
576
|
//#region src/operation/add-controller-to-element.d.ts
|
|
576
|
-
type IAddControllerToElementOperationData<T extends TOperationData = TOperationData> = {
|
|
577
|
+
type IAddControllerToElementOperationData<T$1 extends TOperationData = TOperationData> = {
|
|
577
578
|
/**
|
|
578
579
|
* @dependency
|
|
579
580
|
*/
|
|
@@ -581,8 +582,8 @@ type IAddControllerToElementOperationData<T extends TOperationData = TOperationD
|
|
|
581
582
|
/**
|
|
582
583
|
* @dependency
|
|
583
584
|
*/
|
|
584
|
-
controllerInstance: IController<T>;
|
|
585
|
-
} & T;
|
|
585
|
+
controllerInstance: IController<T$1>;
|
|
586
|
+
} & T$1;
|
|
586
587
|
/**
|
|
587
588
|
* This operation adds the specified controller instance to the given selected element.
|
|
588
589
|
*
|
|
@@ -764,13 +765,13 @@ declare const continueForEach: TOperation<TOperationData>;
|
|
|
764
765
|
//#endregion
|
|
765
766
|
//#region src/operation/create-element.d.ts
|
|
766
767
|
type TTagNames = keyof HTMLElementTagNameMap;
|
|
767
|
-
interface ICreateElementOperationData<T extends TTagNames> {
|
|
768
|
+
interface ICreateElementOperationData<T$1 extends TTagNames> {
|
|
768
769
|
/**
|
|
769
770
|
* @type=ParameterType:htmlElementName
|
|
770
771
|
* @required
|
|
771
772
|
* @erased
|
|
772
773
|
*/
|
|
773
|
-
elementName: T;
|
|
774
|
+
elementName: T$1;
|
|
774
775
|
/**
|
|
775
776
|
* @erased
|
|
776
777
|
*/
|
|
@@ -779,7 +780,7 @@ interface ICreateElementOperationData<T extends TTagNames> {
|
|
|
779
780
|
* @type=ParameterType:object
|
|
780
781
|
* @erased
|
|
781
782
|
*/
|
|
782
|
-
attributes?: Partial<HTMLElementTagNameMap[T]>;
|
|
783
|
+
attributes?: Partial<HTMLElementTagNameMap[T$1]>;
|
|
783
784
|
/**
|
|
784
785
|
* @type=ParameterType:object
|
|
785
786
|
* @output
|
|
@@ -1562,12 +1563,12 @@ declare namespace index_d_exports$1 {
|
|
|
1562
1563
|
type Controllers = typeof index_d_exports$2;
|
|
1563
1564
|
type TControllerName = keyof Controllers;
|
|
1564
1565
|
type TControllerType = Controllers[TControllerName];
|
|
1565
|
-
type GetControllerByName<T extends TControllerName> = Controllers[T];
|
|
1566
|
+
type GetControllerByName<T$1 extends TControllerName> = Controllers[T$1];
|
|
1566
1567
|
type Operations = typeof index_d_exports$1;
|
|
1567
1568
|
type TOperationName = keyof Operations;
|
|
1568
1569
|
type TOperationType = Operations[TOperationName];
|
|
1569
|
-
type GetOperationByName<T extends TOperationName> = Operations[T];
|
|
1570
|
-
type ExtractOperationDataType<P> = P extends TOperation<infer T, any> ? T : never;
|
|
1570
|
+
type GetOperationByName<T$1 extends TOperationName> = Operations[T$1];
|
|
1571
|
+
type ExtractOperationDataType<P$1> = P$1 extends TOperation<infer T, any> ? T : never;
|
|
1571
1572
|
interface IEngineInfo {
|
|
1572
1573
|
systemName: string;
|
|
1573
1574
|
}
|
|
@@ -1577,6 +1578,7 @@ interface IEngineConfiguration {
|
|
|
1577
1578
|
engine: IEngineInfo;
|
|
1578
1579
|
timelineProviderSettings?: TTimelineProviderSettings;
|
|
1579
1580
|
containerSelector: string;
|
|
1581
|
+
cssFiles: string[];
|
|
1580
1582
|
language: TLanguageCode;
|
|
1581
1583
|
layoutTemplate: string;
|
|
1582
1584
|
availableLanguages: ILabel[];
|
|
@@ -1592,6 +1594,7 @@ interface IResolvedEngineConfiguration {
|
|
|
1592
1594
|
engine: IEngineInfo;
|
|
1593
1595
|
timelineProviderSettings: TTimelineProviderSettings;
|
|
1594
1596
|
containerSelector: string;
|
|
1597
|
+
cssFiles: string[];
|
|
1595
1598
|
language: TLanguageCode;
|
|
1596
1599
|
layoutTemplate: string;
|
|
1597
1600
|
availableLanguages: ILabel[];
|
|
@@ -1635,10 +1638,10 @@ interface ITimelineConfiguration {
|
|
|
1635
1638
|
selector: string;
|
|
1636
1639
|
timelineActions: ITimelineActionConfiguration[];
|
|
1637
1640
|
}
|
|
1638
|
-
interface IOperationConfiguration<T extends TOperationData> {
|
|
1641
|
+
interface IOperationConfiguration<T$1 extends TOperationData> {
|
|
1639
1642
|
id: string;
|
|
1640
1643
|
systemName: string;
|
|
1641
|
-
operationData?: T;
|
|
1644
|
+
operationData?: T$1;
|
|
1642
1645
|
}
|
|
1643
1646
|
interface IEventActionConfiguration extends IActionConfiguration {
|
|
1644
1647
|
eventName: string;
|
|
@@ -1720,10 +1723,10 @@ declare function generateImporterSourceCode(config: IEngineConfiguration, config
|
|
|
1720
1723
|
* A factory that assists in editing an action
|
|
1721
1724
|
*
|
|
1722
1725
|
*/
|
|
1723
|
-
declare class ActionEditor<T extends IActionConfiguration = IActionConfiguration> {
|
|
1724
|
-
protected actionConfig: T;
|
|
1726
|
+
declare class ActionEditor<T$1 extends IActionConfiguration = IActionConfiguration> {
|
|
1727
|
+
protected actionConfig: T$1;
|
|
1725
1728
|
protected readonly configurationFactory: ConfigurationFactory;
|
|
1726
|
-
constructor(actionConfig: T, configurationFactory: ConfigurationFactory);
|
|
1729
|
+
constructor(actionConfig: T$1, configurationFactory: ConfigurationFactory);
|
|
1727
1730
|
updateConfiguration(): void;
|
|
1728
1731
|
/**
|
|
1729
1732
|
*
|
|
@@ -1732,7 +1735,7 @@ declare class ActionEditor<T extends IActionConfiguration = IActionConfiguration
|
|
|
1732
1735
|
* @param callBack
|
|
1733
1736
|
* @returns
|
|
1734
1737
|
*/
|
|
1735
|
-
getConfiguration(callBack: (config: T) => T | undefined): this;
|
|
1738
|
+
getConfiguration(callBack: (config: T$1) => T$1 | undefined): this;
|
|
1736
1739
|
/**
|
|
1737
1740
|
*
|
|
1738
1741
|
* Sets the action name
|
|
@@ -1756,7 +1759,7 @@ declare class ActionEditor<T extends IActionConfiguration = IActionConfiguration
|
|
|
1756
1759
|
* @param operationData
|
|
1757
1760
|
* @returns
|
|
1758
1761
|
*/
|
|
1759
|
-
addStartOperationByType<T extends TOperation<TOperationData>>(operationClass: T, operationData: Partial<ExtractOperationDataType<T>>): OperationEditor<this, T>;
|
|
1762
|
+
addStartOperationByType<T extends TOperation<TOperationData>>(operationClass: T$1, operationData: Partial<ExtractOperationDataType<T$1>>): OperationEditor<this, T$1>;
|
|
1760
1763
|
/**
|
|
1761
1764
|
*
|
|
1762
1765
|
* Adds the operation data for a start operation specified by the given system name
|
|
@@ -1774,7 +1777,7 @@ declare class ActionEditor<T extends IActionConfiguration = IActionConfiguration
|
|
|
1774
1777
|
* @param id
|
|
1775
1778
|
* @returns
|
|
1776
1779
|
*/
|
|
1777
|
-
editStartOperation(id: string): OperationEditor<ActionEditor<T>, TOperation<TOperationData>>;
|
|
1780
|
+
editStartOperation(id: string): OperationEditor<ActionEditor<T$1>, TOperation<TOperationData>>;
|
|
1778
1781
|
/**
|
|
1779
1782
|
*
|
|
1780
1783
|
* Removes the start operation associated with the given id
|
|
@@ -1805,7 +1808,7 @@ declare class ActionEditor<T extends IActionConfiguration = IActionConfiguration
|
|
|
1805
1808
|
* A factory that assists in editing an endable action
|
|
1806
1809
|
*
|
|
1807
1810
|
*/
|
|
1808
|
-
declare class EndableActionEditor<T extends IEndableActionConfiguration = IEndableActionConfiguration> extends ActionEditor<T> {
|
|
1811
|
+
declare class EndableActionEditor<T$1 extends IEndableActionConfiguration = IEndableActionConfiguration> extends ActionEditor<T$1> {
|
|
1809
1812
|
/**
|
|
1810
1813
|
*
|
|
1811
1814
|
* Adds the operation data for a end operation specified by the given type
|
|
@@ -1814,7 +1817,7 @@ declare class EndableActionEditor<T extends IEndableActionConfiguration = IEndab
|
|
|
1814
1817
|
* @param operationData
|
|
1815
1818
|
* @returns
|
|
1816
1819
|
*/
|
|
1817
|
-
addEndOperationByType<T extends TOperationType, Dt extends Partial<ExtractOperationDataType<T>>>(operationClass: T, operationData: Dt): OperationEditor<this, TOperationType>;
|
|
1820
|
+
addEndOperationByType<T extends TOperationType, Dt extends Partial<ExtractOperationDataType<T$1>>>(operationClass: T$1, operationData: Dt): OperationEditor<this, TOperationType>;
|
|
1818
1821
|
/**
|
|
1819
1822
|
*
|
|
1820
1823
|
* Adds the operation data for a start operation specified by the given system name
|
|
@@ -1823,7 +1826,7 @@ declare class EndableActionEditor<T extends IEndableActionConfiguration = IEndab
|
|
|
1823
1826
|
* @param operationData
|
|
1824
1827
|
* @returns
|
|
1825
1828
|
*/
|
|
1826
|
-
addEndOperation<T extends TOperationName, O extends Partial<ExtractOperationDataType<GetOperationByName<T>>>>(systemName: TOperationName, operationData: O): OperationEditor<this, TOperation<IAddClassOperationData> | TOperation<IAddControllerToElementOperationData<TOperationData>> | TOperation<IAddGlobalsToOperationData> | TOperation<IAnimateOperationData> | TOperation<IAnimateWithClassOperationData, Promise<IAnimateWithClassOperationData>> | TOperation<TOperationData> | TOperation<IBroadcastEventOperationData> | TOperation<ICalcOperationData> | TOperation<IClearElementOperationData> | TOperation<IClearOperationDataOperationData> | TOperation<ICreateElementOperationData<keyof HTMLElementTagNameMap>, RequireKeys<ICreateElementOperationData<keyof HTMLElementTagNameMap>, "template">> | TOperation<ICustomFunctionOperationData> | TOperation<IEndActionOperationData> | TOperation<Record<string, unknown>> | TOperation<IExtendControllerOperationData> | TOperation<IForEachOperationData> | TOperation<IGetAttributesFromElementOperationData> | TOperation<IGetControllerFromElementOperationData> | TOperation<IGetControllerInstanceOperationData> | TOperation<IGetElementDimensionsOperationData> | TOperation<IGetImportOperationData, Omit<RequireKeys<IGetImportOperationData, "importedInstance">, "systemName">> | TOperation<IGetQueryParamsOperationData> | TOperation<IInvokeObjectMethodOperationData, Omit<IInvokeObjectMethodOperationData, "methodName" | "methodArguments">> | TOperation<ILoadJSONOperationData> | TOperation<ILogOperationData> | TOperation<IMathOperationData, Omit<IMathOperationData, "args" | "functionName">> | TOperation<IRemoveClassOperationData> | TOperation<IRemoveControllerFromElementOperationData> | TOperation<IRemoveElementOperationData> | TOperation<IRemovePropertiesFromOperationDataOperationData, Omit<IRemovePropertiesFromOperationDataOperationData, "propertyNames">> | TOperation<IReparentElementOperationData> | TOperation<IRequestActionOperationData, Required<IRequestActionOperationData>> | TOperation<ISelectElementOperationData> | TOperation<ISetDataOperationData> | TOperation<ISetElementAttributesOperationData> | TOperation<ISetElementContentOperationData> | TOperation<ISetGlobalDataOperationData, Omit<ISetGlobalDataOperationData, "propertyNames">> | TOperation<ISetOperationData, Omit<ISetOperationData, "override" | "properties">> | TOperation<ISetStyleOperationData> | TOperation<ISetVariableOperationData> | TOperation<IStartActionOperationData> | TOperation<IToggleClassOperationData> | TOperation<IToggleElementOperationData> | TOperation<IWaitOperationData> | TOperation<IWhenOperationData>>;
|
|
1829
|
+
addEndOperation<T extends TOperationName, O extends Partial<ExtractOperationDataType<GetOperationByName<T$1>>>>(systemName: TOperationName, operationData: O): OperationEditor<this, TOperation<IAddClassOperationData> | TOperation<IAddControllerToElementOperationData<TOperationData>> | TOperation<IAddGlobalsToOperationData> | TOperation<IAnimateOperationData> | TOperation<IAnimateWithClassOperationData, Promise<IAnimateWithClassOperationData>> | TOperation<TOperationData> | TOperation<IBroadcastEventOperationData> | TOperation<ICalcOperationData> | TOperation<IClearElementOperationData> | TOperation<IClearOperationDataOperationData> | TOperation<ICreateElementOperationData<keyof HTMLElementTagNameMap>, RequireKeys<ICreateElementOperationData<keyof HTMLElementTagNameMap>, "template">> | TOperation<ICustomFunctionOperationData> | TOperation<IEndActionOperationData> | TOperation<Record<string, unknown>> | TOperation<IExtendControllerOperationData> | TOperation<IForEachOperationData> | TOperation<IGetAttributesFromElementOperationData> | TOperation<IGetControllerFromElementOperationData> | TOperation<IGetControllerInstanceOperationData> | TOperation<IGetElementDimensionsOperationData> | TOperation<IGetImportOperationData, Omit<RequireKeys<IGetImportOperationData, "importedInstance">, "systemName">> | TOperation<IGetQueryParamsOperationData> | TOperation<IInvokeObjectMethodOperationData, Omit<IInvokeObjectMethodOperationData, "methodName" | "methodArguments">> | TOperation<ILoadJSONOperationData> | TOperation<ILogOperationData> | TOperation<IMathOperationData, Omit<IMathOperationData, "args" | "functionName">> | TOperation<IRemoveClassOperationData> | TOperation<IRemoveControllerFromElementOperationData> | TOperation<IRemoveElementOperationData> | TOperation<IRemovePropertiesFromOperationDataOperationData, Omit<IRemovePropertiesFromOperationDataOperationData, "propertyNames">> | TOperation<IReparentElementOperationData> | TOperation<IRequestActionOperationData, Required<IRequestActionOperationData>> | TOperation<ISelectElementOperationData> | TOperation<ISetDataOperationData> | TOperation<ISetElementAttributesOperationData> | TOperation<ISetElementContentOperationData> | TOperation<ISetGlobalDataOperationData, Omit<ISetGlobalDataOperationData, "propertyNames">> | TOperation<ISetOperationData, Omit<ISetOperationData, "override" | "properties">> | TOperation<ISetStyleOperationData> | TOperation<ISetVariableOperationData> | TOperation<IStartActionOperationData> | TOperation<IToggleClassOperationData> | TOperation<IToggleElementOperationData> | TOperation<IWaitOperationData> | TOperation<IWhenOperationData>>;
|
|
1827
1830
|
/**
|
|
1828
1831
|
*
|
|
1829
1832
|
* Starts an editor for the end operation associated with the given id
|
|
@@ -1871,10 +1874,10 @@ declare class TimelineActionEditor extends EndableActionEditor<ITimelineActionCo
|
|
|
1871
1874
|
* A factory that assists in editing an operation
|
|
1872
1875
|
*
|
|
1873
1876
|
*/
|
|
1874
|
-
declare class OperationEditor<T extends ActionEditor, O extends TOperationType = TOperation<TOperationData>> {
|
|
1877
|
+
declare class OperationEditor<T$1 extends ActionEditor, O$1 extends TOperationType = TOperation<TOperationData>> {
|
|
1875
1878
|
private operationConfig;
|
|
1876
1879
|
private actionEditor;
|
|
1877
|
-
constructor(operationConfig: IOperationConfiguration<ExtractOperationDataType<O>>, actionEditor: T);
|
|
1880
|
+
constructor(operationConfig: IOperationConfiguration<ExtractOperationDataType<O$1>>, actionEditor: T$1);
|
|
1878
1881
|
/**
|
|
1879
1882
|
*
|
|
1880
1883
|
* Invokes the given callback with a copy of the internal state of the factory
|
|
@@ -1882,7 +1885,7 @@ declare class OperationEditor<T extends ActionEditor, O extends TOperationType =
|
|
|
1882
1885
|
* @param callBack
|
|
1883
1886
|
* @returns
|
|
1884
1887
|
*/
|
|
1885
|
-
getConfiguration(callBack: (config: IOperationConfiguration<ExtractOperationDataType<O>>) => IOperationConfiguration<ExtractOperationDataType<O>>): this;
|
|
1888
|
+
getConfiguration(callBack: (config: IOperationConfiguration<ExtractOperationDataType<O$1>>) => IOperationConfiguration<ExtractOperationDataType<O$1>>): this;
|
|
1886
1889
|
/**
|
|
1887
1890
|
*
|
|
1888
1891
|
* Gets the system name
|
|
@@ -1905,7 +1908,7 @@ declare class OperationEditor<T extends ActionEditor, O extends TOperationType =
|
|
|
1905
1908
|
* @param operationData
|
|
1906
1909
|
* @returns
|
|
1907
1910
|
*/
|
|
1908
|
-
setOperationData(operationData: ExtractOperationDataType<O>): this;
|
|
1911
|
+
setOperationData(operationData: ExtractOperationDataType<O$1>): this;
|
|
1909
1912
|
/**
|
|
1910
1913
|
*
|
|
1911
1914
|
* Sets the value on the current `operationData` with the given key
|
|
@@ -1914,14 +1917,14 @@ declare class OperationEditor<T extends ActionEditor, O extends TOperationType =
|
|
|
1914
1917
|
* @param value
|
|
1915
1918
|
* @returns
|
|
1916
1919
|
*/
|
|
1917
|
-
setOperationDataItem(key: keyof ExtractOperationDataType<O>, value: ExtractOperationDataType<O>[keyof ExtractOperationDataType<O>]): this;
|
|
1920
|
+
setOperationDataItem(key: keyof ExtractOperationDataType<O$1>, value: ExtractOperationDataType<O$1>[keyof ExtractOperationDataType<O$1>]): this;
|
|
1918
1921
|
/**
|
|
1919
1922
|
*
|
|
1920
1923
|
* returns all of the defined property names on the current `operationData`
|
|
1921
1924
|
*
|
|
1922
1925
|
* @returns
|
|
1923
1926
|
*/
|
|
1924
|
-
getOperationDataKeys(): keyof ExtractOperationDataType<O>;
|
|
1927
|
+
getOperationDataKeys(): keyof ExtractOperationDataType<O$1>;
|
|
1925
1928
|
/**
|
|
1926
1929
|
*
|
|
1927
1930
|
* Gets the value of the given key on the current `operationData`
|
|
@@ -1929,14 +1932,14 @@ declare class OperationEditor<T extends ActionEditor, O extends TOperationType =
|
|
|
1929
1932
|
* @param key
|
|
1930
1933
|
* @returns
|
|
1931
1934
|
*/
|
|
1932
|
-
getOperationDataValue(key: keyof ExtractOperationDataType<O>): ExtractOperationDataType<O>[keyof ExtractOperationDataType<O>] | undefined;
|
|
1935
|
+
getOperationDataValue(key: keyof ExtractOperationDataType<O$1>): ExtractOperationDataType<O$1>[keyof ExtractOperationDataType<O$1>] | undefined;
|
|
1933
1936
|
/**
|
|
1934
1937
|
*
|
|
1935
1938
|
* Returns the fluent scope back to the action editor
|
|
1936
1939
|
*
|
|
1937
1940
|
* @returns
|
|
1938
1941
|
*/
|
|
1939
|
-
next(): T;
|
|
1942
|
+
next(): T$1;
|
|
1940
1943
|
}
|
|
1941
1944
|
//#endregion
|
|
1942
1945
|
//#region src/configuration/api/label-editor.d.ts
|
|
@@ -2398,9 +2401,9 @@ declare class ActionCreatorFactory {
|
|
|
2398
2401
|
* A factory that assists in creating an action
|
|
2399
2402
|
*
|
|
2400
2403
|
*/
|
|
2401
|
-
declare class ActionCreator<T extends IActionConfiguration = IActionConfiguration> {
|
|
2404
|
+
declare class ActionCreator<T$1 extends IActionConfiguration = IActionConfiguration> {
|
|
2402
2405
|
private readonly factory;
|
|
2403
|
-
actionConfig: T;
|
|
2406
|
+
actionConfig: T$1;
|
|
2404
2407
|
/**
|
|
2405
2408
|
*
|
|
2406
2409
|
* Initializes an action configuration with the given name
|
|
@@ -2431,7 +2434,7 @@ declare class ActionCreator<T extends IActionConfiguration = IActionConfiguratio
|
|
|
2431
2434
|
* @param callBack
|
|
2432
2435
|
* @returns
|
|
2433
2436
|
*/
|
|
2434
|
-
getConfiguration(callBack: (config: T) => T): this;
|
|
2437
|
+
getConfiguration(callBack: (config: T$1) => T$1): this;
|
|
2435
2438
|
/**
|
|
2436
2439
|
*
|
|
2437
2440
|
* Adds the operation data for a start operation specified by the given type
|
|
@@ -2440,7 +2443,7 @@ declare class ActionCreator<T extends IActionConfiguration = IActionConfiguratio
|
|
|
2440
2443
|
* @param operationData
|
|
2441
2444
|
* @returns
|
|
2442
2445
|
*/
|
|
2443
|
-
addStartOperationByType<T extends TOperationType, Dt extends Partial<ExtractOperationDataType<T>>>(operationClass: T, operationData: Dt): this;
|
|
2446
|
+
addStartOperationByType<T extends TOperationType, Dt extends Partial<ExtractOperationDataType<T$1>>>(operationClass: T$1, operationData: Dt): this;
|
|
2444
2447
|
/**
|
|
2445
2448
|
*
|
|
2446
2449
|
* Adds the operation data for a start operation specified by the given system name
|
|
@@ -2449,7 +2452,7 @@ declare class ActionCreator<T extends IActionConfiguration = IActionConfiguratio
|
|
|
2449
2452
|
* @param operationData
|
|
2450
2453
|
* @returns
|
|
2451
2454
|
*/
|
|
2452
|
-
addStartOperation<T extends TOperationName, O extends Partial<ExtractOperationDataType<GetOperationByName<T>>>>(systemName: T, operationData: O): this;
|
|
2455
|
+
addStartOperation<T extends TOperationName, O extends Partial<ExtractOperationDataType<GetOperationByName<T$1>>>>(systemName: T$1, operationData: O): this;
|
|
2453
2456
|
/**
|
|
2454
2457
|
*
|
|
2455
2458
|
* Returns the fluent scope back to the `ActionCreatorFactory`
|
|
@@ -2463,7 +2466,7 @@ declare class ActionCreator<T extends IActionConfiguration = IActionConfiguratio
|
|
|
2463
2466
|
* A factory that assists in creating an endable action
|
|
2464
2467
|
*
|
|
2465
2468
|
*/
|
|
2466
|
-
declare class EndableActionCreator<T extends IEndableActionConfiguration = IEndableActionConfiguration> extends ActionCreator<T> {
|
|
2469
|
+
declare class EndableActionCreator<T$1 extends IEndableActionConfiguration = IEndableActionConfiguration> extends ActionCreator<T$1> {
|
|
2467
2470
|
constructor(name: string | undefined, factory: ActionCreatorFactory);
|
|
2468
2471
|
/**
|
|
2469
2472
|
*
|
|
@@ -2473,7 +2476,7 @@ declare class EndableActionCreator<T extends IEndableActionConfiguration = IEnda
|
|
|
2473
2476
|
* @param operationData
|
|
2474
2477
|
* @returns
|
|
2475
2478
|
*/
|
|
2476
|
-
addEndOperationByType<T extends TOperationType, Dt extends Partial<ExtractOperationDataType<T>>>(operationClass: T, operationData: Dt): this;
|
|
2479
|
+
addEndOperationByType<T extends TOperationType, Dt extends Partial<ExtractOperationDataType<T$1>>>(operationClass: T$1, operationData: Dt): this;
|
|
2477
2480
|
/**
|
|
2478
2481
|
*
|
|
2479
2482
|
* Adds the operation data for an end operation specified by the given system name
|
|
@@ -2482,7 +2485,7 @@ declare class EndableActionCreator<T extends IEndableActionConfiguration = IEnda
|
|
|
2482
2485
|
* @param operationData
|
|
2483
2486
|
* @returns
|
|
2484
2487
|
*/
|
|
2485
|
-
addEndOperation<T extends TOperationName, O extends Partial<ExtractOperationDataType<GetOperationByName<T>>>>(systemName: TOperationName, operationData: O): this;
|
|
2488
|
+
addEndOperation<T extends TOperationName, O extends Partial<ExtractOperationDataType<GetOperationByName<T$1>>>>(systemName: TOperationName, operationData: O): this;
|
|
2486
2489
|
}
|
|
2487
2490
|
/**
|
|
2488
2491
|
*
|
|
@@ -2524,12 +2527,12 @@ type TConstantParametersTypes = {
|
|
|
2524
2527
|
default?: boolean;
|
|
2525
2528
|
} & THasDescription;
|
|
2526
2529
|
type TPropertyMetadata = TComplexPropertyMetadata | TArrayProperyMetadata | TParameterTypes;
|
|
2527
|
-
type TPropertiesMetadata<T> = { [P in keyof T]?: TPropertyMetadata };
|
|
2528
|
-
interface IOperationMetadata<T> {
|
|
2530
|
+
type TPropertiesMetadata<T$1> = { [P in keyof T$1]?: TPropertyMetadata };
|
|
2531
|
+
interface IOperationMetadata<T$1> {
|
|
2529
2532
|
description: string;
|
|
2530
|
-
dependentProperties?: (keyof T)[];
|
|
2531
|
-
properties?: TPropertiesMetadata<T>;
|
|
2532
|
-
outputProperties?: TPropertiesMetadata<T>;
|
|
2533
|
+
dependentProperties?: (keyof T$1)[];
|
|
2534
|
+
properties?: TPropertiesMetadata<T$1>;
|
|
2535
|
+
outputProperties?: TPropertiesMetadata<T$1>;
|
|
2533
2536
|
}
|
|
2534
2537
|
type TParameterTypesDelimited = `${TParameterTypes}` | `${TParameterTypes}|${string}`;
|
|
2535
2538
|
type TParameterTypes = 'ParameterType:htmlElementName' | 'ParameterType:className' | 'ParameterType:selector' | 'ParameterType:string' | 'ParameterType:number' | 'ParameterType:object' | 'ParameterType:boolean' | 'ParameterType:array' | 'ParameterType:eventTopic' | 'ParameterType:eventName' | 'ParameterType:systemName' | 'ParameterType:actionName' | 'ParameterType:controllerName' | 'ParameterType:dimensions' | 'ParameterType:dimensionsModifier' | 'ParameterType:url' | 'ParameterType:htmlContent' | 'ParameterType:labelId' | 'ParameterType:ImagePath' | 'ParameterType:QuadrantPosition' | 'ParameterType:jQuery' | 'ParameterType:expression' | 'ParameterType:mathfunction' | 'ParameterType:cssProperties';
|
|
@@ -2684,7 +2687,7 @@ declare namespace index_d_exports {
|
|
|
2684
2687
|
//#region src/timeline-event-names.d.ts
|
|
2685
2688
|
type TimelineEventName = keyof typeof TimelineEventNames;
|
|
2686
2689
|
/**
|
|
2687
|
-
* These are the event names that are being
|
|
2690
|
+
* These are the event names that are being broadcast and/or handled by Eligius.
|
|
2688
2691
|
*/
|
|
2689
2692
|
declare class TimelineEventNames {
|
|
2690
2693
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __export } from "./chunk-
|
|
1
|
+
import { t as __export } from "./chunk-Bp6m_JJh.js";
|
|
2
2
|
import $ from "jquery";
|
|
3
3
|
import { isDefined } from "ts-is-present";
|
|
4
4
|
import fs from "node:fs";
|
|
@@ -495,8 +495,7 @@ function dashToCamelCase(input) {
|
|
|
495
495
|
* @param assetInfo
|
|
496
496
|
*/
|
|
497
497
|
function generateImporterSourceCode(config, configPath, assetInfo) {
|
|
498
|
-
|
|
499
|
-
return _generateSourceCode(importPaths);
|
|
498
|
+
return _generateSourceCode(_gatherImportPaths(config, configPath, assetInfo));
|
|
500
499
|
}
|
|
501
500
|
function _generateSourceCode(importPaths) {
|
|
502
501
|
const result = importPaths.filter((x) => x.defaultImport).map((imp) => `import ${imp.systemName} from '${imp.path}';`).concat(importPaths.filter((x) => !x.defaultImport).map((imp) => `import {${imp.systemName}} from '${imp.path ?? "eligius"}';`));
|
|
@@ -565,13 +564,11 @@ function _gatherOperations(config) {
|
|
|
565
564
|
}
|
|
566
565
|
function _gatherControllerImportPathsFromActions(actionsConfig) {
|
|
567
566
|
if (!actionsConfig) return [];
|
|
568
|
-
|
|
569
|
-
return _gatherControllerImportPaths(operations$1);
|
|
567
|
+
return _gatherControllerImportPaths(actionsConfig.flatMap((x) => [...x.startOperations, ...x.endOperations ?? []]));
|
|
570
568
|
}
|
|
571
569
|
function _gatherOperationImportPathsFromActions(actionsConfig) {
|
|
572
570
|
if (!actionsConfig) return [];
|
|
573
|
-
|
|
574
|
-
return _gatherOperationImportPaths(operations$1);
|
|
571
|
+
return _gatherOperationImportPaths(actionsConfig.flatMap((x) => [...x.startOperations, ...x.endOperations ?? []]));
|
|
575
572
|
}
|
|
576
573
|
function _gatherControllerImportPaths(operationConfigs) {
|
|
577
574
|
if (!operationConfigs) return [];
|
|
@@ -784,8 +781,7 @@ const cache = [];
|
|
|
784
781
|
*/
|
|
785
782
|
function resolvePropertyValues(operationData, operationScope, newProperties) {
|
|
786
783
|
const copy = newProperties !== operationData ? deepCopy(newProperties) : newProperties;
|
|
787
|
-
|
|
788
|
-
resolveNewProperties(newProperties, copy, resolvePropertyChain$1);
|
|
784
|
+
resolveNewProperties(newProperties, copy, resolveExternalPropertyChain.bind(null, operationData, operationScope));
|
|
789
785
|
return copy;
|
|
790
786
|
}
|
|
791
787
|
function resolveNewProperties(properties, copy, resolvePropertyChain$1) {
|
|
@@ -904,7 +900,7 @@ const createElement = function(operationData) {
|
|
|
904
900
|
//#endregion
|
|
905
901
|
//#region src/timeline-event-names.ts
|
|
906
902
|
/**
|
|
907
|
-
* These are the event names that are being
|
|
903
|
+
* These are the event names that are being broadcast and/or handled by Eligius.
|
|
908
904
|
*/
|
|
909
905
|
var TimelineEventNames = class {
|
|
910
906
|
/**
|
|
@@ -1023,11 +1019,10 @@ const endAction = (operationData) => {
|
|
|
1023
1019
|
return new Promise((resolve, reject) => {
|
|
1024
1020
|
newOperationData = mergeOperationData(newOperationData, actionOperationData);
|
|
1025
1021
|
newOperationData.actionInstance.end(newOperationData).then(() => {
|
|
1026
|
-
|
|
1022
|
+
internalResolve(resolve, Object.keys(newOperationData).filter((key) => !(key in actionOperationData)).reduce((acc, key) => {
|
|
1027
1023
|
acc[key] = newOperationData[key];
|
|
1028
1024
|
return acc;
|
|
1029
|
-
}, {});
|
|
1030
|
-
internalResolve(resolve, sanitizedData);
|
|
1025
|
+
}, {}));
|
|
1031
1026
|
}, reject);
|
|
1032
1027
|
});
|
|
1033
1028
|
};
|
|
@@ -1571,12 +1566,11 @@ function resolveTargets(data, operationData, scope) {
|
|
|
1571
1566
|
if (!isDataTarget(rootTarget)) throw new Error(`Unrecognized target: ${rootTarget}, known targets are: ${knownTargets.join(", ")}`);
|
|
1572
1567
|
const property = path$1.pop() ?? "";
|
|
1573
1568
|
const propertyValue = resolveExternalPropertyChain(operationData, scope, data[item]);
|
|
1574
|
-
const
|
|
1569
|
+
const propertyTarget = getPropertyChainValue(path$1, {
|
|
1575
1570
|
scope,
|
|
1576
1571
|
operationdata: operationData,
|
|
1577
1572
|
globaldata: getGlobals()
|
|
1578
|
-
};
|
|
1579
|
-
const propertyTarget = getPropertyChainValue(path$1, targets[rootTarget]);
|
|
1573
|
+
}[rootTarget]);
|
|
1580
1574
|
propertyTarget[property] = propertyValue;
|
|
1581
1575
|
});
|
|
1582
1576
|
}
|
|
@@ -1637,8 +1631,7 @@ const setElementContent = (operationData) => {
|
|
|
1637
1631
|
*/
|
|
1638
1632
|
const setGlobalData = (operationData) => {
|
|
1639
1633
|
const { propertyNames,...newOperationData } = operationData;
|
|
1640
|
-
|
|
1641
|
-
setGlobals(newGlobals);
|
|
1634
|
+
setGlobals(Object.fromEntries(Object.entries(operationData).filter(([name, _value]) => propertyNames.includes(name))));
|
|
1642
1635
|
return newOperationData;
|
|
1643
1636
|
};
|
|
1644
1637
|
|
|
@@ -2177,8 +2170,7 @@ var ActionEditor = class {
|
|
|
2177
2170
|
if (!operation) throw new Error(`start operation not found for id ${id}`);
|
|
2178
2171
|
const idx = startOperations.indexOf(operation);
|
|
2179
2172
|
if (idx > -1) {
|
|
2180
|
-
|
|
2181
|
-
array_move(startOperations, idx, newIdx);
|
|
2173
|
+
array_move(startOperations, idx, direction === "up" ? idx + 1 : idx - 1);
|
|
2182
2174
|
this.actionConfig = {
|
|
2183
2175
|
...this.actionConfig,
|
|
2184
2176
|
startOperations
|
|
@@ -2284,8 +2276,7 @@ var EndableActionEditor = class extends ActionEditor {
|
|
|
2284
2276
|
if (!isDefined(operation)) throw new Error(`operation not found for id ${id}`);
|
|
2285
2277
|
const idx = endOperations.indexOf(operation);
|
|
2286
2278
|
if (idx > -1) {
|
|
2287
|
-
|
|
2288
|
-
array_move(endOperations, idx, newIdx);
|
|
2279
|
+
array_move(endOperations, idx, direction === "up" ? idx + 1 : idx - 1);
|
|
2289
2280
|
this.actionConfig = {
|
|
2290
2281
|
...this.actionConfig,
|
|
2291
2282
|
endOperations
|
|
@@ -2504,9 +2495,7 @@ function animationInterval(ms, signal, callback) {
|
|
|
2504
2495
|
};
|
|
2505
2496
|
const { round } = Math;
|
|
2506
2497
|
const scheduleFrame = (time) => {
|
|
2507
|
-
const
|
|
2508
|
-
const roundedElapsed = round(elapsed / ms) * ms;
|
|
2509
|
-
const delay = start + roundedElapsed + ms - performance.now();
|
|
2498
|
+
const delay = start + round((time - start) / ms) * ms + ms - performance.now();
|
|
2510
2499
|
setTimeout(() => requestAnimationFrame(frame), delay);
|
|
2511
2500
|
};
|
|
2512
2501
|
scheduleFrame(start);
|
|
@@ -2721,8 +2710,7 @@ var VideoJsTimelineProvider = class {
|
|
|
2721
2710
|
return this._player?.duration() ?? 0;
|
|
2722
2711
|
}
|
|
2723
2712
|
getContainer() {
|
|
2724
|
-
|
|
2725
|
-
return $(selector);
|
|
2713
|
+
return $(this.config.timelineProviderSettings.mediaplayer?.selector ?? "");
|
|
2726
2714
|
}
|
|
2727
2715
|
destroy() {
|
|
2728
2716
|
this._eventHandlers.forEach((remover) => remover());
|
|
@@ -2955,6 +2943,7 @@ var ConfigurationFactory = class ConfigurationFactory {
|
|
|
2955
2943
|
id: v4(),
|
|
2956
2944
|
engine: { systemName: "EligiusEngine" },
|
|
2957
2945
|
containerSelector: "[data-ct-container=true]",
|
|
2946
|
+
cssFiles: [],
|
|
2958
2947
|
timelineProviderSettings: {},
|
|
2959
2948
|
language: defaultLanguage,
|
|
2960
2949
|
availableLanguages: [],
|
|
@@ -3026,10 +3015,7 @@ var ConfigurationFactory = class ConfigurationFactory {
|
|
|
3026
3015
|
*/
|
|
3027
3016
|
getConfiguration(callBack) {
|
|
3028
3017
|
const copy = deepCopy(this.configuration);
|
|
3029
|
-
if (callBack)
|
|
3030
|
-
const newConfig = callBack.call(this, copy);
|
|
3031
|
-
this.configuration = deepCopy(newConfig);
|
|
3032
|
-
}
|
|
3018
|
+
if (callBack) this.configuration = deepCopy(callBack.call(this, copy));
|
|
3033
3019
|
return copy;
|
|
3034
3020
|
}
|
|
3035
3021
|
/**
|
|
@@ -5014,8 +5000,7 @@ var SubtitleEditor = class {
|
|
|
5014
5000
|
* The result of the invocation `resolvePropertyChain('mySource.subSource.element.value', foo)` would then yield the value `bar`.
|
|
5015
5001
|
*/
|
|
5016
5002
|
function resolvePropertyChain(propertyChain, sourceObject) {
|
|
5017
|
-
|
|
5018
|
-
return getPropertyChainValue(properties, sourceObject);
|
|
5003
|
+
return getPropertyChainValue(propertyChain.split("."), sourceObject);
|
|
5019
5004
|
}
|
|
5020
5005
|
|
|
5021
5006
|
//#endregion
|
|
@@ -5040,6 +5025,7 @@ var ConfigurationResolver = class {
|
|
|
5040
5025
|
engine: { ...configuration.engine },
|
|
5041
5026
|
timelineProviderSettings: deepCopy(configuration.timelineProviderSettings),
|
|
5042
5027
|
containerSelector: configuration.containerSelector,
|
|
5028
|
+
cssFiles: configuration.cssFiles,
|
|
5043
5029
|
language: configuration.language,
|
|
5044
5030
|
layoutTemplate: configuration.layoutTemplate,
|
|
5045
5031
|
availableLanguages: deepCopy(configuration.availableLanguages),
|
|
@@ -5128,10 +5114,8 @@ function resolvePlaceholders(configFragment, rootConfig, importer) {
|
|
|
5128
5114
|
function resolvePlaceholder(key, configFragment, rootConfig, importer) {
|
|
5129
5115
|
const configValue = configFragment[key];
|
|
5130
5116
|
if (isString(configValue)) {
|
|
5131
|
-
if (configValue.startsWith("config:"))
|
|
5132
|
-
|
|
5133
|
-
configFragment[key] = resolvePropertyChain(configProperty, rootConfig);
|
|
5134
|
-
} else if (configValue.startsWith("template:")) {
|
|
5117
|
+
if (configValue.startsWith("config:")) configFragment[key] = resolvePropertyChain(configValue.substring(7, configValue.length), rootConfig);
|
|
5118
|
+
else if (configValue.startsWith("template:")) {
|
|
5135
5119
|
const templateKey = configValue.substring(9, configValue.length);
|
|
5136
5120
|
configFragment[key] = importer.import(templateKey)[templateKey];
|
|
5137
5121
|
} else if (configValue.startsWith("json:")) {
|
|
@@ -5620,10 +5604,9 @@ var LanguageManager = class {
|
|
|
5620
5604
|
resultCallback(this._labelLookup[labelId]);
|
|
5621
5605
|
}
|
|
5622
5606
|
_handleRequestLabelCollections(labelIds, resultCallback) {
|
|
5623
|
-
|
|
5607
|
+
resultCallback(labelIds.map((labelId) => {
|
|
5624
5608
|
return this._labelLookup[labelId];
|
|
5625
|
-
});
|
|
5626
|
-
resultCallback(labelCollections);
|
|
5609
|
+
}));
|
|
5627
5610
|
}
|
|
5628
5611
|
_handleLanguageChange(language) {
|
|
5629
5612
|
this._currentLanguage = language;
|