eligius 4.2.0 → 4.3.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.
@@ -12,6 +12,23 @@ declare namespace JQuery {
12
12
  type Duration = number | 'fast' | 'slow';
13
13
  type Node = Element | Text | Comment | Document | DocumentFragment;
14
14
  }
15
+ /**
16
+ * DOM-free entry point for the fluent configuration API
17
+ * (`eligius/configuration-api`).
18
+ *
19
+ * Build tools (code generators, the Eligian DSL compiler) run in plain Node,
20
+ * where importing the main `eligius` entry fails: it evaluates jquery@4, which
21
+ * throws `jQuery requires a window with a document`. This entry exports the
22
+ * `ConfigurationFactory` and its editors and the configuration types, and
23
+ * validates operation names against the generated metadata. It never imports
24
+ * the operation or controller implementations, so it stays free of jquery
25
+ * and lottie-web.
26
+ *
27
+ * The `...ByType` methods (for example `addStartOperationByType`) need the
28
+ * operation implementations to map a function to its name, so they only work
29
+ * through the main `eligius` entry. Here they throw; use the name based methods
30
+ * (`addStartOperation('selectElement', ...)`) instead.
31
+ */
15
32
  /**
16
33
  * Event: before-request-timeline-uri
17
34
  *
@@ -62,10 +79,65 @@ interface EngineCommandErrorEvent {
62
79
  name: 'engine-command-error';
63
80
  args: [command: string, error: unknown];
64
81
  }
82
+ /**
83
+ * Engine internals that actions, operations and controllers look up by name.
84
+ *
85
+ * Every engine has its own services object. Operations reach it as
86
+ * `this.services` (see `IOperationScope`), controllers receive it in
87
+ * `attach(eventbus, services)`. Because it belongs to one engine, a lookup
88
+ * always answers for that engine, also when several engines share an
89
+ * eventbus.
90
+ */
91
+ interface IEngineServices {
92
+ /**
93
+ * Returns the configured action (from `actions` or `eventActions`) with
94
+ * this name.
95
+ *
96
+ * @param systemName - The action name
97
+ * @returns The action
98
+ * @throws Error for an unknown name, with a "did you mean" hint
99
+ */
100
+ getAction(systemName: string): IAction;
101
+ /**
102
+ * Returns what the resource importer provides under this name: a custom
103
+ * function, registered JSON or template, or any built-in export.
104
+ *
105
+ * @param systemName - The registered name
106
+ * @returns The registered entry; registered JSON may be `0`, `''` or `false`
107
+ * @throws Error when nothing is registered under the name (the importer's
108
+ * "did you mean" hint is kept)
109
+ */
110
+ getImport(systemName: string): unknown;
111
+ /**
112
+ * Creates a new instance of the class the resource importer provides under
113
+ * this name (a controller, for example), constructed with the engine's
114
+ * eventbus.
115
+ *
116
+ * @param systemName - The registered class name
117
+ * @returns The new instance
118
+ * @throws Error when nothing is registered under the name, or when it is not
119
+ * a class
120
+ */
121
+ createInstance<T = unknown>(systemName: string): T;
122
+ /**
123
+ * Returns the engine's root element (its container selector). From
124
+ * `engine.init()` until `engine.destroy()` this is the same jQuery instance.
125
+ *
126
+ * @returns The engine root
127
+ */
128
+ getEngineRoot(): JQuery<HTMLElement>;
129
+ }
65
130
  interface IController<T extends TOperationData> {
66
131
  name: string;
67
132
  init(operationData: T): void;
68
- attach(eventbus: IEventbus): Promise<any> | void;
133
+ /**
134
+ * Starts the controller.
135
+ *
136
+ * @param eventbus - The engine's eventbus
137
+ * @param services - The engine's services, for looking up actions, classes
138
+ * and the engine root
139
+ */
140
+ attach(eventbus: IEventbus, services: IEngineServices): Promise<any> | void;
69
141
  detach(eventbus: IEventbus): void;
70
142
  }
71
143
  /** A start and end frame. Mirrors lottie-web's `AnimationSegment`. */
@@ -368,20 +440,6 @@ interface PushHistoryStateEvent {
368
440
  name: 'push-history-state';
369
441
  args: [state: any];
370
442
  }
371
- /**
372
- * Request: request-action
373
- * Answered through `eventbus.request('request-action', actionName)` by
374
- * EngineFactory with the configured action of that name. Throws for an
375
- * unknown name, with a "did you mean" hint.
376
- * @param actionName - The name of the action to request
377
- * @returns The action
378
- * @category Engine Request
379
- */
380
- interface RequestActionEvent {
381
- name: 'request-action';
382
- args: [actionName: string];
383
- returns: IAction;
384
- }
385
443
  /**
386
444
  * Request: request-current-language
387
445
  * Answered through `eventbus.request('request-current-language')` by
@@ -428,50 +486,6 @@ interface RequestCurrentVideoPositionEvent {
428
486
  name: 'request-current-video-position';
429
487
  args: [callback: (position: number) => void];
430
488
  }
431
- /**
432
- * Request: request-engine-root
433
- * Answered through `eventbus.request('request-engine-root')` with the
434
- * engine's root element (the container selector). From `engine.init()` until
435
- * `engine.destroy()` every answer is the same jQuery instance. The engine also
436
- * answers the legacy form, a broadcast whose last argument is a callback that
437
- * receives the value.
438
- * @returns The engine root element
439
- * @category Engine Request
440
- */
441
- interface RequestEngineRootEvent {
442
- name: 'request-engine-root';
443
- args: [];
444
- returns: JQuery<HTMLElement>;
445
- }
446
- /**
447
- * Request: request-function
448
- * Answered through `eventbus.request('request-function', systemName)` by
449
- * EngineFactory with the function (such as an operation) the resource
450
- * importer provides under that name. Throws for an unknown name.
451
- * @param systemName - The name of the function to request
452
- * @returns The function
453
- * @category Engine Request
454
- */
455
- interface RequestFunctionEvent {
456
- name: 'request-function';
457
- args: [systemName: string];
458
- returns: unknown;
459
- }
460
- /**
461
- * Request: request-instance
462
- * Answered through `eventbus.request('request-instance', systemName)` by
463
- * EngineFactory with a new instance of the class the resource importer
464
- * provides under that name (a controller, for example), constructed with the
465
- * eventbus. Throws for an unknown name.
466
- * @param systemName - The name of the class to instantiate
467
- * @returns The new instance
468
- * @category Engine Request
469
- */
470
- interface RequestInstanceEvent {
471
- name: 'request-instance';
472
- args: [systemName: string];
473
- returns: unknown;
474
- }
475
489
  /**
476
490
  * Event: request-label-collection
477
491
  * @param language - The language code
@@ -758,7 +772,7 @@ interface VideoCompleteEvent {
758
772
  name: 'video-complete';
759
773
  args: [index: number];
760
774
  }
761
- type AllEvents = BeforeRequestTimelineUriEvent | BeforeRequestVideoUrlEvent | DomMutationEvent | EngineCommandErrorEvent | EngineErrorEvent | HighlightNavigationEvent | LanguageChangeEvent | NavigateToVideoUrlEvent | PushHistoryStateEvent | RequestActionEvent | RequestCurrentLanguageEvent | RequestCurrentNavigationEvent | RequestCurrentTimelinePositionEvent | RequestCurrentVideoPositionEvent | RequestEngineRootEvent | RequestFunctionEvent | RequestInstanceEvent | RequestLabelCollectionEvent | RequestLabelCollectionsEvent | RequestTimelineCleanupEvent | RequestTimelineUriEvent | RequestTranslationEvent | RequestVideoCleanupEvent | RequestVideoUrlEvent | CompleteEvent | ContainerRequestEvent | CurrentTimelineChangeEvent | DurationRequestEvent | DurationEvent | FirstFrameEvent | PauseRequestEvent | PauseEvent | PlayRequestEvent | PlayToggleRequestEvent | PlayEvent | RequestCurrentTimelineEvent | ResizeRequestEvent | ResizeEvent | RestartEvent | SeekRequestEvent | SeekEvent | SeekedEvent | StopRequestEvent | StopEvent | TimeEvent | VideoCompleteEvent;
775
+ type AllEvents = BeforeRequestTimelineUriEvent | BeforeRequestVideoUrlEvent | DomMutationEvent | EngineCommandErrorEvent | EngineErrorEvent | HighlightNavigationEvent | LanguageChangeEvent | NavigateToVideoUrlEvent | PushHistoryStateEvent | RequestCurrentLanguageEvent | RequestCurrentNavigationEvent | RequestCurrentTimelinePositionEvent | RequestCurrentVideoPositionEvent | RequestLabelCollectionEvent | RequestLabelCollectionsEvent | RequestTimelineCleanupEvent | RequestTimelineUriEvent | RequestTranslationEvent | RequestVideoCleanupEvent | RequestVideoUrlEvent | CompleteEvent | ContainerRequestEvent | CurrentTimelineChangeEvent | DurationRequestEvent | DurationEvent | FirstFrameEvent | PauseRequestEvent | PauseEvent | PlayRequestEvent | PlayToggleRequestEvent | PlayEvent | RequestCurrentTimelineEvent | ResizeRequestEvent | ResizeEvent | RestartEvent | SeekRequestEvent | SeekEvent | SeekedEvent | StopRequestEvent | StopEvent | TimeEvent | VideoCompleteEvent;
762
776
  type EventMap = { [K in AllEvents as K['name']]: K extends {
763
777
  returns: infer R;
764
778
  } ? [...K['args'], callback?: (result: R) => void] : K['args']; };
@@ -775,10 +789,6 @@ type EventName = keyof EventMap;
775
789
  * The untyped string overloads remain for custom request names.
776
790
  */
777
791
  interface RequestMap {
778
- 'request-action': {
779
- args: RequestActionEvent['args'];
780
- returns: RequestActionEvent['returns'];
781
- };
782
792
  'request-current-language': {
783
793
  args: RequestCurrentLanguageEvent['args'];
784
794
  returns: RequestCurrentLanguageEvent['returns'];
@@ -787,18 +797,6 @@ interface RequestMap {
787
797
  args: RequestCurrentTimelinePositionEvent['args'];
788
798
  returns: RequestCurrentTimelinePositionEvent['returns'];
789
799
  };
790
- 'request-engine-root': {
791
- args: RequestEngineRootEvent['args'];
792
- returns: RequestEngineRootEvent['returns'];
793
- };
794
- 'request-function': {
795
- args: RequestFunctionEvent['args'];
796
- returns: RequestFunctionEvent['returns'];
797
- };
798
- 'request-instance': {
799
- args: RequestInstanceEvent['args'];
800
- returns: RequestInstanceEvent['returns'];
801
- };
802
800
  'request-translation': {
803
801
  args: RequestTranslationEvent['args'];
804
802
  returns: RequestTranslationEvent['returns'];
@@ -980,6 +978,11 @@ interface IOperationScope {
980
978
  * The eventbus instance shared amongst actions and operations
981
979
  */
982
980
  eventbus: IEventbus;
981
+ /**
982
+ * The services of the engine this operation runs in: looks up actions,
983
+ * registered imports and classes, and the engine root
984
+ */
985
+ services: IEngineServices;
983
986
  /**
984
987
  * The list of operations that is currently being executed
985
988
  */
@@ -1074,12 +1077,13 @@ declare class DOMEventListenerController implements IController<IDOMEventListene
1074
1077
  /**
1075
1078
  * Looks up the configured actions and starts listening for the DOM event.
1076
1079
  *
1077
- * @param eventbus - The eventbus to request the actions from
1078
- * @throws when an action name is unknown (`request-action` throws or
1079
- * returns nothing); the message names the controller, the action and the
1080
- * DOM event, and keeps the responder's "did you mean" hint
1080
+ * @param eventbus - The eventbus the actions report errors on
1081
+ * @param services - The engine services to look the actions up in
1082
+ * @throws when an action name is unknown; the message names the
1083
+ * controller, the action and the DOM event, and keeps the "did you mean"
1084
+ * hint
1081
1085
  */
1082
- attach(eventbus: IEventbus): void;
1086
+ attach(eventbus: IEventbus, services: IEngineServices): void;
1083
1087
  private _eventHandler;
1084
1088
  /**
1085
1089
  * Removes only the handler this controller registered, so other handlers for
@@ -1179,13 +1183,13 @@ declare class KeyboardController implements IController<IKeyboardControllerOpera
1179
1183
  /**
1180
1184
  * Looks up the configured actions and starts listening for the keys.
1181
1185
  *
1182
- * @param eventbus - The eventbus to request the actions and the engine root
1183
- * from
1184
- * @throws when an action name is unknown (`request-action` throws or
1185
- * returns nothing); the message names the controller, the action and the
1186
- * keys, and keeps the responder's "did you mean" hint
1186
+ * @param eventbus - The eventbus the actions report errors on
1187
+ * @param services - The engine services to look the actions and the engine
1188
+ * root up in
1189
+ * @throws when an action name is unknown; the message names the
1190
+ * controller, the action and the keys, and keeps the "did you mean" hint
1187
1191
  */
1188
- attach(eventbus: IEventbus): void;
1192
+ attach(eventbus: IEventbus, services: IEngineServices): void;
1189
1193
  /**
1190
1194
  * Removes only the handler this controller bound, so other bindings of the
1191
1195
  * same keys keep working, and resets the action instances so a later
@@ -1194,7 +1198,7 @@ declare class KeyboardController implements IController<IKeyboardControllerOpera
1194
1198
  detach(_eventbus: IEventbus): void;
1195
1199
  private _handleKey;
1196
1200
  private _trigger;
1197
- private _requestEngineRoot;
1201
+ private _engineRootElement;
1198
1202
  /**
1199
1203
  * @returns The keys with `' '` replaced by `space`
1200
1204
  * @throws when the keys are empty or name a key hotkeys-js can't match
@@ -1263,7 +1267,7 @@ declare abstract class BaseController<T extends TOperationData> implements ICont
1263
1267
  */
1264
1268
  detach(_eventbus: IEventbus): void;
1265
1269
  abstract init(operationData: T): void;
1266
- abstract attach(eventbus: IEventbus): Promise<any> | void;
1270
+ abstract attach(eventbus: IEventbus, services: IEngineServices): Promise<any> | void;
1267
1271
  }
1268
1272
  interface ILabelControllerMetadata {
1269
1273
  /**
@@ -1629,9 +1633,10 @@ declare class NavigationController extends BaseController<INavigationControllerO
1629
1633
  navLookup: Record<string, any>;
1630
1634
  navVidIdLookup: Record<string, any>;
1631
1635
  ctrlLookup: Record<string, LabelController>;
1632
- activeNavigationPoint: any | null;
1636
+ activeNavigationPoint: any;
1633
1637
  labelControllers: LabelController[];
1634
1638
  eventbus: IEventbus | null;
1639
+ services: IEngineServices | null;
1635
1640
  container: JQuery | null;
1636
1641
  private _menuElement;
1637
1642
  private _anchorLookup;
@@ -1642,7 +1647,7 @@ declare class NavigationController extends BaseController<INavigationControllerO
1642
1647
  * navigation id in roots, nextId or children
1643
1648
  */
1644
1649
  init(operationData: INavigationControllerOperationData): void;
1645
- attach(eventbus: IEventbus): void;
1650
+ attach(eventbus: IEventbus, services: IEngineServices): void;
1646
1651
  /**
1647
1652
  * Sets the active navigation point and the menu highlight from the URL hash,
1648
1653
  * falling back to the item with videoUrlIndex 0 when the hash is missing or
@@ -2354,8 +2359,8 @@ interface ICustomFunctionOperationData {
2354
2359
  * This operation retrieves a custom function defined by the given system name
2355
2360
  * and invokes it with the current operation data and eventbus.
2356
2361
  *
2357
- * The function is looked up with the `request-function` event, which the
2358
- * `EngineFactory` answers from its resource importer. Register the function
2362
+ * The function is looked up with `this.services.getImport`, which answers from
2363
+ * the engine's resource importer. Register the function
2359
2364
  * with the `EligiusResourceImporter` constructor:
2360
2365
  * `new EligiusResourceImporter({functions: {myFunction}})`.
2361
2366
  *
@@ -2515,7 +2520,7 @@ interface IFindInArrayOperationData {
2515
2520
  /**
2516
2521
  * @output
2517
2522
  */
2518
- foundItem?: any | undefined;
2523
+ foundItem?: any;
2519
2524
  /**
2520
2525
  * @output
2521
2526
  */
@@ -2866,8 +2871,8 @@ interface IGetImportOperationData {
2866
2871
  * This operation retrieves the import specified by the given `systemName` and
2867
2872
  * assigns it to the `importedInstance` property on the current operaton date.
2868
2873
  *
2869
- * The import is looked up with the `request-function` event, which the
2870
- * `EngineFactory` answers from its resource importer. Functions, templates
2874
+ * The import is looked up with `this.services.getImport`, which answers from
2875
+ * the engine's resource importer. Functions, templates
2871
2876
  * and JSON registered with the `EligiusResourceImporter` constructor
2872
2877
  * (`new EligiusResourceImporter({json: {settings}})`) can be imported this
2873
2878
  * way, as can every built-in operation, controller and provider export.
@@ -3345,14 +3350,16 @@ interface IMapArrayOperationData {
3345
3350
  */
3346
3351
  declare const mapArray: TOperation<IMapArrayOperationData, Omit<IMapArrayOperationData, 'mapFunction'>>;
3347
3352
  type MathFunctionKeys = { [K in keyof Math]: Math[K] extends ((...args: any) => any) ? K : never; }[keyof Math];
3348
- type MathNonFunctionKeys = { [K in keyof Math]: Math[K] extends ((...args: any) => any) ? never : K; }[keyof Math];
3349
3353
  interface IMathOperationData {
3350
3354
  /**
3355
+ * Numbers, property chains, or names of Math constants
3356
+ * ({@link MathNonFunctionKeys}).
3357
+ *
3351
3358
  * @type=ParameterType:array
3352
3359
  * @required
3353
3360
  * @erased
3354
3361
  */
3355
- args: (number | string | MathNonFunctionKeys)[];
3362
+ args: (number | string)[];
3356
3363
  /**
3357
3364
  * @type=ParameterType:mathfunction
3358
3365
  * @required
@@ -5029,7 +5036,7 @@ export declare class EndableActionEditor<T extends IEndableActionConfiguration =
5029
5036
  * @returns
5030
5037
  * @throws Error when `systemName` is neither a built-in nor a declared custom operation
5031
5038
  */
5032
- addEndOperation<T extends TFluentOperationName, O extends TFluentOperationData<T>>(systemName: T, operationData: O): OperationEditor<this, TOperation<IAddClassOperationData, Omit<IAddClassOperationData, "className">> | TOperation<IAddControllerToElementOperationData<TOperationData>> | TOperation<IAddGlobalsToOperationData, Omit<IAddGlobalsToOperationData, "globalProperties">> | TOperation<IAnimateOperationData, Omit<IAnimateOperationData, "animationEasing" | "animationProperties" | "animationDuration">> | TOperation<IAnimateWithClassOperationData, Omit<IAnimateWithClassOperationData, "removeClass" | "className" | "includeDescendants">> | TOperation<IAnnounceToScreenReaderOperationData, Omit<IAnnounceToScreenReaderOperationData, "message" | "priority">> | TOperation<TOperationData> | TOperation<IBroadcastEventOperationData, Omit<IBroadcastEventOperationData, "eventArgs" | "eventTopic" | "eventName">> | TOperation<ICalcOperationData, Omit<ICalcOperationData, "left" | "right" | "operator">> | TOperation<IClearElementOperationData> | TOperation<IClearOperationDataOperationData, Omit<IClearOperationDataOperationData, "properties">> | TOperation<IClearStorageOperationData, Omit<IClearStorageOperationData, "key" | "storageType">> | TOperation<ICompareDateOperationData, Omit<ICompareDateOperationData, "date1" | "date2">> | TOperation<IConcatenateStringsOperationData, Omit<IConcatenateStringsOperationData, "strings" | "separator">> | TOperation<ICreateElementOperationData<keyof HTMLElementTagNameMap>, Omit<RequireKeys<ICreateElementOperationData<keyof HTMLElementTagNameMap>, "template">, "elementName" | "text" | "attributes">> | TOperation<ICustomFunctionOperationData, Omit<ICustomFunctionOperationData, "systemName">> | TOperation<IEndActionOperationData, Omit<IEndActionOperationData, "actionOperationData">> | TOperation<Record<string, unknown>> | TOperation<IExtendControllerOperationData, Omit<IExtendControllerOperationData, "controllerExtension">> | TOperation<IFilterArrayOperationData, Omit<IFilterArrayOperationData, "filterProperty" | "filterValue" | "filterPredicate">> | TOperation<IFindInArrayOperationData, Omit<IFindInArrayOperationData, "findProperty" | "findValue" | "findPredicate">> | TOperation<IForEachOperationData> | TOperation<IFormatDateOperationData, Omit<IFormatDateOperationData, "format">> | TOperation<IFormatTextOperationData, Omit<IFormatTextOperationData, "transformation">> | TOperation<IGetAttributesFromElementOperationData, Omit<IGetAttributesFromElementOperationData, "attributeNames">> | TOperation<IGetControllerFromElementOperationData, Omit<IGetControllerFromElementOperationData, "controllerName">> | TOperation<IGetControllerInstanceOperationData, Omit<IGetControllerInstanceOperationData, "systemName">> | TOperation<IGetCurrentTimeOperationData, IGetCurrentTimeOperationData> | TOperation<IGetElementDimensionsOperationData, Omit<IGetElementDimensionsOperationData, "modifier">> | TOperation<IGetFocusedElementOperationData, IGetFocusedElementOperationData> | TOperation<IGetFormDataOperationData, IGetFormDataOperationData> | TOperation<IGetImportOperationData, Omit<RequireKeys<IGetImportOperationData, "importedInstance">, "systemName">> | TOperation<IGetQueryParamsOperationData, Omit<IGetQueryParamsOperationData, "defaultValues">> | TOperation<IGetScrollPositionOperationData, IGetScrollPositionOperationData> | TOperation<IGetTextContentOperationData, IGetTextContentOperationData> | TOperation<IHttpDeleteOperationData, Omit<IHttpDeleteOperationData, "url" | "headers">> | TOperation<IHttpPostOperationData, Omit<IHttpPostOperationData, "body" | "url" | "headers">> | TOperation<IHttpPutOperationData, Omit<IHttpPutOperationData, "body" | "url" | "headers">> | TOperation<IInvokeObjectMethodOperationData, Omit<IInvokeObjectMethodOperationData, "methodName" | "methodArguments">> | TOperation<IIsElementInViewportOperationData, IIsElementInViewportOperationData> | TOperation<ILoadFromStorageOperationData, Omit<ILoadFromStorageOperationData, "key" | "storageType">> | TOperation<ILoadJSONOperationData, Omit<ILoadJSONOperationData, "url" | "cache">> | TOperation<ILogOperationData, Omit<ILogOperationData, "logValue" | "logName">> | TOperation<IMapArrayOperationData, Omit<IMapArrayOperationData, "mapFunction">> | TOperation<IMathOperationData, Omit<IMathOperationData, "args" | "functionName">> | TOperation<IRemoveClassOperationData, Omit<IRemoveClassOperationData, "className">> | TOperation<IRemoveControllerFromElementOperationData, Omit<IRemoveControllerFromElementOperationData, "controllerName">> | TOperation<IRemoveElementOperationData> | TOperation<IRemovePropertiesFromOperationDataOperationData, Omit<IRemovePropertiesFromOperationDataOperationData, "propertyNames">> | TOperation<IReparentElementOperationData, Omit<IReparentElementOperationData, "newParentSelector">> | TOperation<IReplaceStringOperationData, Omit<IReplaceStringOperationData, "pattern" | "replacement">> | TOperation<IReplaceTextOperationData, Omit<IReplaceTextOperationData, "replacement" | "searchPattern">> | TOperation<IRequestActionOperationData, Omit<Required<IRequestActionOperationData>, "systemName">> | TOperation<ISaveToStorageOperationData, Omit<ISaveToStorageOperationData, "key" | "storageType" | "value">> | TOperation<IScrollToElementOperationData, Omit<IScrollToElementOperationData, "behavior" | "block" | "inline">> | TOperation<IScrollToPositionOperationData, Omit<IScrollToPositionOperationData, "behavior" | "x" | "y">> | TOperation<ISelectElementOperationData, Omit<ISelectElementOperationData, "selector" | "useSelectedElementAsRoot">> | TOperation<ISetDataOperationData, Omit<ISetDataOperationData, "properties">> | TOperation<ISetElementAttributesOperationData, Omit<ISetElementAttributesOperationData, "attributes">> | TOperation<ISetElementContentOperationData, Omit<ISetElementContentOperationData, "template" | "insertionType">> | TOperation<ISetFocusOperationData, ISetFocusOperationData> | TOperation<ISetFormValueOperationData, Omit<ISetFormValueOperationData, "value">> | TOperation<ISetGlobalDataOperationData, Omit<ISetGlobalDataOperationData, "propertyNames">> | TOperation<ISetOperationData, Omit<ISetOperationData, "properties" | "override">> | TOperation<ISetStyleOperationData, Omit<ISetStyleOperationData, "properties">> | TOperation<ISetVariableOperationData, Omit<ISetVariableOperationData, "value" | "name">> | TOperation<ISortArrayOperationData, Omit<ISortArrayOperationData, "sortProperty" | "sortOrder" | "sortComparator">> | TOperation<ISplitStringOperationData, Omit<ISplitStringOperationData, "delimiter" | "limit">> | TOperation<IStartActionOperationData, Omit<IStartActionOperationData, "actionOperationData">> | TOperation<ISubstringTextOperationData, Omit<ISubstringTextOperationData, "start" | "end">> | TOperation<IToggleClassOperationData, Omit<IToggleClassOperationData, "className">> | TOperation<IToggleElementOperationData> | TOperation<IToggleFormElementOperationData, Omit<IToggleFormElementOperationData, "enabled">> | TOperation<IValidateFormOperationData, Omit<IValidateFormOperationData, "validationRules">> | TOperation<IWaitOperationData, Omit<IWaitOperationData, "milliseconds">> | TOperation<IWhenOperationData, Omit<IWhenOperationData, "expression">>>;
5039
+ addEndOperation<T extends TFluentOperationName, O extends TFluentOperationData<T>>(systemName: T, operationData: O): OperationEditor<this, TOperation<IAddClassOperationData, Omit<IAddClassOperationData, "className">> | TOperation<IAddControllerToElementOperationData<TOperationData>> | TOperation<IAddGlobalsToOperationData, Omit<IAddGlobalsToOperationData, "globalProperties">> | TOperation<IAnimateOperationData, Omit<IAnimateOperationData, "animationEasing" | "animationProperties" | "animationDuration">> | TOperation<IAnimateWithClassOperationData, Omit<IAnimateWithClassOperationData, "removeClass" | "className" | "includeDescendants">> | TOperation<IAnnounceToScreenReaderOperationData, Omit<IAnnounceToScreenReaderOperationData, "message" | "priority">> | TOperation<TOperationData> | TOperation<IBroadcastEventOperationData, Omit<IBroadcastEventOperationData, "eventArgs" | "eventTopic" | "eventName">> | TOperation<ICalcOperationData, Omit<ICalcOperationData, "left" | "right" | "operator">> | TOperation<IClearElementOperationData> | TOperation<IClearOperationDataOperationData, Omit<IClearOperationDataOperationData, "properties">> | TOperation<IClearStorageOperationData, Omit<IClearStorageOperationData, "key" | "storageType">> | TOperation<ICompareDateOperationData, Omit<ICompareDateOperationData, "date1" | "date2">> | TOperation<IConcatenateStringsOperationData, Omit<IConcatenateStringsOperationData, "strings" | "separator">> | TOperation<ICreateElementOperationData<keyof HTMLElementTagNameMap>, Omit<RequireKeys<ICreateElementOperationData<keyof HTMLElementTagNameMap>, "template">, "elementName" | "text" | "attributes">> | TOperation<ICustomFunctionOperationData, Omit<ICustomFunctionOperationData, "systemName">> | TOperation<IEndActionOperationData, Omit<IEndActionOperationData, "actionOperationData">> | TOperation<Record<string, unknown>> | TOperation<IExtendControllerOperationData, Omit<IExtendControllerOperationData, "controllerExtension">> | TOperation<IFilterArrayOperationData, Omit<IFilterArrayOperationData, "filterProperty" | "filterValue" | "filterPredicate">> | TOperation<IFindInArrayOperationData, Omit<IFindInArrayOperationData, "findProperty" | "findValue" | "findPredicate">> | TOperation<IForEachOperationData> | TOperation<IFormatDateOperationData, Omit<IFormatDateOperationData, "format">> | TOperation<IFormatTextOperationData, Omit<IFormatTextOperationData, "transformation">> | TOperation<IGetAttributesFromElementOperationData, Omit<IGetAttributesFromElementOperationData, "attributeNames">> | TOperation<IGetControllerFromElementOperationData, Omit<IGetControllerFromElementOperationData, "controllerName">> | TOperation<IGetControllerInstanceOperationData, Omit<IGetControllerInstanceOperationData, "systemName">> | TOperation<IGetCurrentTimeOperationData, IGetCurrentTimeOperationData> | TOperation<IGetElementDimensionsOperationData, Omit<IGetElementDimensionsOperationData, "modifier">> | TOperation<IGetFocusedElementOperationData, IGetFocusedElementOperationData> | TOperation<IGetFormDataOperationData, IGetFormDataOperationData> | TOperation<IGetImportOperationData, Omit<RequireKeys<IGetImportOperationData, "importedInstance">, "systemName">> | TOperation<IGetQueryParamsOperationData, Omit<IGetQueryParamsOperationData, "defaultValues">> | TOperation<IGetScrollPositionOperationData, IGetScrollPositionOperationData> | TOperation<IGetTextContentOperationData, IGetTextContentOperationData> | TOperation<IHttpDeleteOperationData, Omit<IHttpDeleteOperationData, "url" | "headers">> | TOperation<IHttpPostOperationData, Omit<IHttpPostOperationData, "body" | "url" | "headers">> | TOperation<IHttpPutOperationData, Omit<IHttpPutOperationData, "body" | "url" | "headers">> | TOperation<IInvokeObjectMethodOperationData, Omit<IInvokeObjectMethodOperationData, "methodName" | "methodArguments">> | TOperation<IIsElementInViewportOperationData, IIsElementInViewportOperationData> | TOperation<ILoadFromStorageOperationData, Omit<ILoadFromStorageOperationData, "key" | "storageType">> | TOperation<ILoadJSONOperationData, Omit<ILoadJSONOperationData, "url" | "cache">> | TOperation<ILogOperationData, Omit<ILogOperationData, "logValue" | "logName">> | TOperation<IMapArrayOperationData, Omit<IMapArrayOperationData, "mapFunction">> | TOperation<IMathOperationData, Omit<IMathOperationData, "args" | "functionName">> | TOperation<IRemoveClassOperationData, Omit<IRemoveClassOperationData, "className">> | TOperation<IRemoveControllerFromElementOperationData, Omit<IRemoveControllerFromElementOperationData, "controllerName">> | TOperation<IRemoveElementOperationData> | TOperation<IRemovePropertiesFromOperationDataOperationData, Omit<IRemovePropertiesFromOperationDataOperationData, "propertyNames">> | TOperation<IReparentElementOperationData, Omit<IReparentElementOperationData, "newParentSelector">> | TOperation<IReplaceStringOperationData, Omit<IReplaceStringOperationData, "pattern" | "replacement">> | TOperation<IReplaceTextOperationData, Omit<IReplaceTextOperationData, "replacement" | "searchPattern">> | TOperation<IRequestActionOperationData, Omit<Required<IRequestActionOperationData>, "systemName">> | TOperation<ISaveToStorageOperationData, Omit<ISaveToStorageOperationData, "key" | "storageType" | "value">> | TOperation<IScrollToElementOperationData, Omit<IScrollToElementOperationData, "behavior" | "block" | "inline">> | TOperation<IScrollToPositionOperationData, Omit<IScrollToPositionOperationData, "behavior" | "x" | "y">> | TOperation<ISelectElementOperationData, Omit<ISelectElementOperationData, "selector" | "useSelectedElementAsRoot">> | TOperation<ISetDataOperationData, Omit<ISetDataOperationData, "properties">> | TOperation<ISetElementAttributesOperationData, Omit<ISetElementAttributesOperationData, "attributes">> | TOperation<ISetElementContentOperationData, Omit<ISetElementContentOperationData, "template" | "insertionType">> | TOperation<ISetFocusOperationData, ISetFocusOperationData> | TOperation<ISetFormValueOperationData, Omit<ISetFormValueOperationData, "value">> | TOperation<ISetGlobalDataOperationData, Omit<ISetGlobalDataOperationData, "propertyNames">> | TOperation<ISetOperationData, Omit<ISetOperationData, "properties" | "override">> | TOperation<ISetStyleOperationData, Omit<ISetStyleOperationData, "properties">> | TOperation<ISetVariableOperationData, Omit<ISetVariableOperationData, "name" | "value">> | TOperation<ISortArrayOperationData, Omit<ISortArrayOperationData, "sortProperty" | "sortOrder" | "sortComparator">> | TOperation<ISplitStringOperationData, Omit<ISplitStringOperationData, "delimiter" | "limit">> | TOperation<IStartActionOperationData, Omit<IStartActionOperationData, "actionOperationData">> | TOperation<ISubstringTextOperationData, Omit<ISubstringTextOperationData, "start" | "end">> | TOperation<IToggleClassOperationData, Omit<IToggleClassOperationData, "className">> | TOperation<IToggleElementOperationData> | TOperation<IToggleFormElementOperationData, Omit<IToggleFormElementOperationData, "enabled">> | TOperation<IValidateFormOperationData, Omit<IValidateFormOperationData, "validationRules">> | TOperation<IWaitOperationData, Omit<IWaitOperationData, "milliseconds">> | TOperation<IWhenOperationData, Omit<IWhenOperationData, "expression">>>;
5033
5040
  /**
5034
5041
  *
5035
5042
  * Starts an editor for the end operation associated with the given id
@@ -5942,5 +5949,4 @@ export declare class SubtitleEditor {
5942
5949
  setSubtitle(languageCode: TLanguageCode, subtitle: ISubtitle): this;
5943
5950
  export(): ISubtitleCollection[];
5944
5951
  }
5945
- export type { Controllers, ExtractOperationDataType, GetControllerByName, GetOperationByName, IActionConfiguration, IContainerProviderConfig, IEndableActionConfiguration, IEngineConfiguration, IEngineInfo, IEventActionConfiguration, ILabel, IOperationConfiguration, IPlaylistConfig, IPositionSourceConfig, IResolvedActionConfiguration, IResolvedEndableActionConfiguration, IResolvedEngineConfiguration, IResolvedOperation, IResolvedTimelineConfiguration, ITimelineActionConfiguration, ITimelineConfiguration, ITimelineFlow, ITimelineProviderSettings, Operations, TControllerName, TControllerType, TLanguageCode, TOperationName, TOperationType, TTimelineProviderSettings, TimelineTypes };
5946
- //# sourceMappingURL=configuration-api.d.mts.map
5952
+ export type { Controllers, ExtractOperationDataType, GetControllerByName, GetOperationByName, IActionConfiguration, IContainerProviderConfig, IEndableActionConfiguration, IEngineConfiguration, IEngineInfo, IEventActionConfiguration, ILabel, IOperationConfiguration, IPlaylistConfig, IPositionSourceConfig, IResolvedActionConfiguration, IResolvedEndableActionConfiguration, IResolvedEngineConfiguration, IResolvedOperation, IResolvedTimelineConfiguration, ITimelineActionConfiguration, ITimelineConfiguration, ITimelineFlow, ITimelineProviderSettings, Operations, TControllerName, TControllerType, TLanguageCode, TOperationName, TOperationType, TTimelineProviderSettings, TimelineTypes };
@@ -1,5 +1,5 @@
1
1
 
2
- import { t as __exportAll } from "./rolldown-runtime-CGzGPw9x.mjs";
2
+ import { t as __exportAll } from "./rolldown-runtime-DTOZ5ltL.mjs";
3
3
  import { v4 } from "uuid";
4
4
  import { isDefined } from "ts-is-present";
5
5
 
@@ -462,8 +462,8 @@ function customFunction() {
462
462
  description: `This operation retrieves a custom function defined by the given system name
463
463
  and invokes it with the current operation data and eventbus.
464
464
 
465
- The function is looked up with the \`request-function\` event, which the
466
- \`EngineFactory\` answers from its resource importer. Register the function
465
+ The function is looked up with \`this.services.getImport\`, which answers from
466
+ the engine's resource importer. Register the function
467
467
  with the \`EligiusResourceImporter\` constructor:
468
468
  \`new EligiusResourceImporter({functions: {myFunction}})\`.
469
469
 
@@ -786,8 +786,8 @@ function getImport() {
786
786
  description: `This operation retrieves the import specified by the given \`systemName\` and
787
787
  assigns it to the \`importedInstance\` property on the current operaton date.
788
788
 
789
- The import is looked up with the \`request-function\` event, which the
790
- \`EngineFactory\` answers from its resource importer. Functions, templates
789
+ The import is looked up with \`this.services.getImport\`, which answers from
790
+ the engine's resource importer. Functions, templates
791
791
  and JSON registered with the \`EligiusResourceImporter\` constructor
792
792
  (\`new EligiusResourceImporter({json: {settings}})\`) can be imported this
793
793
  way, as can every built-in operation, controller and provider export.`,
@@ -2669,7 +2669,7 @@ var OperationEditor = class {
2669
2669
  */
2670
2670
  setOperationDataItem(key, value) {
2671
2671
  return this.setOperationData({
2672
- ...this.operationConfig.operationData ?? {},
2672
+ ...this.operationConfig.operationData,
2673
2673
  [key]: value
2674
2674
  });
2675
2675
  }