eligius 4.1.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,21 @@ declare namespace JQuery {
12
12
  type Duration = number | 'fast' | 'slow';
13
13
  type Node = Element | Text | Comment | Document | DocumentFragment;
14
14
  }
15
+ /**
16
+ * Metadata-only entry point (`eligius/metadata`).
17
+ *
18
+ * This re-exports ONLY the operation / controller / event metadata namespaces
19
+ * and their types. The metadata is pure data — each descriptor file imports the
20
+ * operation's data interface as a `type` (erased at build), never the operation
21
+ * implementation — so this entry is bundled into its own chunk that does NOT
22
+ * import jquery / lottie-web.
23
+ *
24
+ * Importing from the main `eligius` entry evaluates the full engine bundle,
25
+ * which pulls in jquery@4 — and jquery@4 throws `jQuery requires a window with a
26
+ * document` the instant it is evaluated in a DOM-less Node context. Tooling that
27
+ * only needs metadata (code generators, completion providers, DSL compilers)
28
+ * should import from `eligius/metadata` so it works in plain Node without a DOM.
29
+ */
15
30
  /**
16
31
  * Event: before-request-timeline-uri
17
32
  *
@@ -101,20 +116,6 @@ interface PushHistoryStateEvent {
101
116
  name: 'push-history-state';
102
117
  args: [state: any];
103
118
  }
104
- /**
105
- * Request: request-action
106
- * Answered through `eventbus.request('request-action', actionName)` by
107
- * EngineFactory with the configured action of that name. Throws for an
108
- * unknown name, with a "did you mean" hint.
109
- * @param actionName - The name of the action to request
110
- * @returns The action
111
- * @category Engine Request
112
- */
113
- interface RequestActionEvent {
114
- name: 'request-action';
115
- args: [actionName: string];
116
- returns: IAction;
117
- }
118
119
  /**
119
120
  * Request: request-current-language
120
121
  * Answered through `eventbus.request('request-current-language')` by
@@ -161,50 +162,6 @@ interface RequestCurrentVideoPositionEvent {
161
162
  name: 'request-current-video-position';
162
163
  args: [callback: (position: number) => void];
163
164
  }
164
- /**
165
- * Request: request-engine-root
166
- * Answered through `eventbus.request('request-engine-root')` with the
167
- * engine's root element (the container selector). From `engine.init()` until
168
- * `engine.destroy()` every answer is the same jQuery instance. The engine also
169
- * answers the legacy form, a broadcast whose last argument is a callback that
170
- * receives the value.
171
- * @returns The engine root element
172
- * @category Engine Request
173
- */
174
- interface RequestEngineRootEvent {
175
- name: 'request-engine-root';
176
- args: [];
177
- returns: JQuery<HTMLElement>;
178
- }
179
- /**
180
- * Request: request-function
181
- * Answered through `eventbus.request('request-function', systemName)` by
182
- * EngineFactory with the function (such as an operation) the resource
183
- * importer provides under that name. Throws for an unknown name.
184
- * @param systemName - The name of the function to request
185
- * @returns The function
186
- * @category Engine Request
187
- */
188
- interface RequestFunctionEvent {
189
- name: 'request-function';
190
- args: [systemName: string];
191
- returns: unknown;
192
- }
193
- /**
194
- * Request: request-instance
195
- * Answered through `eventbus.request('request-instance', systemName)` by
196
- * EngineFactory with a new instance of the class the resource importer
197
- * provides under that name (a controller, for example), constructed with the
198
- * eventbus. Throws for an unknown name.
199
- * @param systemName - The name of the class to instantiate
200
- * @returns The new instance
201
- * @category Engine Request
202
- */
203
- interface RequestInstanceEvent {
204
- name: 'request-instance';
205
- args: [systemName: string];
206
- returns: unknown;
207
- }
208
165
  /**
209
166
  * Event: request-label-collection
210
167
  * @param language - The language code
@@ -531,6 +488,54 @@ export interface IEventMetadata<_TArgs extends any[] = any[]> {
531
488
  optional?: boolean;
532
489
  }>;
533
490
  }
491
+ /**
492
+ * Engine internals that actions, operations and controllers look up by name.
493
+ *
494
+ * Every engine has its own services object. Operations reach it as
495
+ * `this.services` (see `IOperationScope`), controllers receive it in
496
+ * `attach(eventbus, services)`. Because it belongs to one engine, a lookup
497
+ * always answers for that engine, also when several engines share an
498
+ * eventbus.
499
+ */
500
+ interface IEngineServices {
501
+ /**
502
+ * Returns the configured action (from `actions` or `eventActions`) with
503
+ * this name.
504
+ *
505
+ * @param systemName - The action name
506
+ * @returns The action
507
+ * @throws Error for an unknown name, with a "did you mean" hint
508
+ */
509
+ getAction(systemName: string): IAction;
510
+ /**
511
+ * Returns what the resource importer provides under this name: a custom
512
+ * function, registered JSON or template, or any built-in export.
513
+ *
514
+ * @param systemName - The registered name
515
+ * @returns The registered entry; registered JSON may be `0`, `''` or `false`
516
+ * @throws Error when nothing is registered under the name (the importer's
517
+ * "did you mean" hint is kept)
518
+ */
519
+ getImport(systemName: string): unknown;
520
+ /**
521
+ * Creates a new instance of the class the resource importer provides under
522
+ * this name (a controller, for example), constructed with the engine's
523
+ * eventbus.
524
+ *
525
+ * @param systemName - The registered class name
526
+ * @returns The new instance
527
+ * @throws Error when nothing is registered under the name, or when it is not
528
+ * a class
529
+ */
530
+ createInstance<T = unknown>(systemName: string): T;
531
+ /**
532
+ * Returns the engine's root element (its container selector). From
533
+ * `engine.init()` until `engine.destroy()` this is the same jQuery instance.
534
+ *
535
+ * @returns The engine root
536
+ */
537
+ getEngineRoot(): JQuery<HTMLElement>;
538
+ }
534
539
  type TOperationData = Record<string, any>;
535
540
  type TOperationResult<T = TOperationData> = Promise<T> | T;
536
541
  interface IOperationScope {
@@ -562,6 +567,11 @@ interface IOperationScope {
562
567
  * The eventbus instance shared amongst actions and operations
563
568
  */
564
569
  eventbus: IEventbus;
570
+ /**
571
+ * The services of the engine this operation runs in: looks up actions,
572
+ * registered imports and classes, and the engine root
573
+ */
574
+ services: IEngineServices;
565
575
  /**
566
576
  * The list of operations that is currently being executed
567
577
  */
@@ -620,9 +630,28 @@ interface IEngineActionError extends Error {
620
630
  readonly operationSystemName?: string;
621
631
  /** Index of the failing operation in its operation list, when known */
622
632
  readonly operationIndex?: number;
633
+ /**
634
+ * The operations between the failing action and the failing operation,
635
+ * outermost first, when known. Entry 0 is an operation of the failing
636
+ * action itself: for a failure inside a called action it is the
637
+ * `startAction` or `endAction` that called it. Each further entry is an
638
+ * operation of the action the previous entry started. The last entry is the
639
+ * failing operation, the same as `operationSystemName` and
640
+ * `operationIndex`. A direct failure has one entry.
641
+ */
642
+ readonly operationPath?: readonly IOperationPathEntry[];
623
643
  /** The original error */
624
644
  readonly cause: unknown;
625
645
  }
646
+ /**
647
+ * One operation on {@link IEngineActionError.operationPath}.
648
+ */
649
+ interface IOperationPathEntry {
650
+ /** System name of the operation */
651
+ readonly systemName: string;
652
+ /** Its index in the operation list of its action */
653
+ readonly index: number;
654
+ }
626
655
  /**
627
656
  * Describes a duration of time expressed in a start and an optional end range with a one second interval.
628
657
  */
@@ -647,7 +676,8 @@ interface ISubtitle {
647
676
  * Event: engine-error
648
677
  * Broadcast when a timeline action that the engine started or ended on its
649
678
  * own fails. The error names the action, the phase (start or end) and, when
650
- * known, the failing operation.
679
+ * known, the failing operation (`operationSystemName`, `operationIndex`) and
680
+ * the path to it through called actions (`operationPath`, outermost first).
651
681
  * @param error - The error, with the original error as its `cause`
652
682
  * @category Engine
653
683
  */
@@ -655,7 +685,7 @@ interface EngineErrorEvent {
655
685
  name: 'engine-error';
656
686
  args: [error: IEngineActionError];
657
687
  }
658
- 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;
688
+ 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;
659
689
  type EventMap = { [K in AllEvents as K['name']]: K extends {
660
690
  returns: infer R;
661
691
  } ? [...K['args'], callback?: (result: R) => void] : K['args']; };
@@ -672,10 +702,6 @@ type EventName = keyof EventMap;
672
702
  * The untyped string overloads remain for custom request names.
673
703
  */
674
704
  interface RequestMap {
675
- 'request-action': {
676
- args: RequestActionEvent['args'];
677
- returns: RequestActionEvent['returns'];
678
- };
679
705
  'request-current-language': {
680
706
  args: RequestCurrentLanguageEvent['args'];
681
707
  returns: RequestCurrentLanguageEvent['returns'];
@@ -684,18 +710,6 @@ interface RequestMap {
684
710
  args: RequestCurrentTimelinePositionEvent['args'];
685
711
  returns: RequestCurrentTimelinePositionEvent['returns'];
686
712
  };
687
- 'request-engine-root': {
688
- args: RequestEngineRootEvent['args'];
689
- returns: RequestEngineRootEvent['returns'];
690
- };
691
- 'request-function': {
692
- args: RequestFunctionEvent['args'];
693
- returns: RequestFunctionEvent['returns'];
694
- };
695
- 'request-instance': {
696
- args: RequestInstanceEvent['args'];
697
- returns: RequestInstanceEvent['returns'];
698
- };
699
713
  'request-translation': {
700
714
  args: RequestTranslationEvent['args'];
701
715
  returns: RequestTranslationEvent['returns'];
@@ -849,7 +863,14 @@ interface IEventbusInterceptor {
849
863
  interface IController<T extends TOperationData> {
850
864
  name: string;
851
865
  init(operationData: T): void;
852
- attach(eventbus: IEventbus): Promise<any> | void;
866
+ /**
867
+ * Starts the controller.
868
+ *
869
+ * @param eventbus - The engine's eventbus
870
+ * @param services - The engine's services, for looking up actions, classes
871
+ * and the engine root
872
+ */
873
+ attach(eventbus: IEventbus, services: IEngineServices): Promise<any> | void;
853
874
  detach(eventbus: IEventbus): void;
854
875
  }
855
876
  /** A start and end frame. Mirrors lottie-web's `AnimationSegment`. */
@@ -1084,13 +1105,13 @@ declare class KeyboardController$1 implements IController<IKeyboardControllerOpe
1084
1105
  /**
1085
1106
  * Looks up the configured actions and starts listening for the keys.
1086
1107
  *
1087
- * @param eventbus - The eventbus to request the actions and the engine root
1088
- * from
1089
- * @throws when an action name is unknown (`request-action` throws or
1090
- * returns nothing); the message names the controller, the action and the
1091
- * keys, and keeps the responder's "did you mean" hint
1108
+ * @param eventbus - The eventbus the actions report errors on
1109
+ * @param services - The engine services to look the actions and the engine
1110
+ * root up in
1111
+ * @throws when an action name is unknown; the message names the
1112
+ * controller, the action and the keys, and keeps the "did you mean" hint
1092
1113
  */
1093
- attach(eventbus: IEventbus): void;
1114
+ attach(eventbus: IEventbus, services: IEngineServices): void;
1094
1115
  /**
1095
1116
  * Removes only the handler this controller bound, so other bindings of the
1096
1117
  * same keys keep working, and resets the action instances so a later
@@ -1099,7 +1120,7 @@ declare class KeyboardController$1 implements IController<IKeyboardControllerOpe
1099
1120
  detach(_eventbus: IEventbus): void;
1100
1121
  private _handleKey;
1101
1122
  private _trigger;
1102
- private _requestEngineRoot;
1123
+ private _engineRootElement;
1103
1124
  /**
1104
1125
  * @returns The keys with `' '` replaced by `space`
1105
1126
  * @throws when the keys are empty or name a key hotkeys-js can't match
@@ -1168,7 +1189,7 @@ declare abstract class BaseController<T extends TOperationData> implements ICont
1168
1189
  */
1169
1190
  detach(_eventbus: IEventbus): void;
1170
1191
  abstract init(operationData: T): void;
1171
- abstract attach(eventbus: IEventbus): Promise<any> | void;
1192
+ abstract attach(eventbus: IEventbus, services: IEngineServices): Promise<any> | void;
1172
1193
  }
1173
1194
  interface ILabelControllerMetadata {
1174
1195
  /**
@@ -1534,9 +1555,10 @@ declare class NavigationController$1 extends BaseController<INavigationControlle
1534
1555
  navLookup: Record<string, any>;
1535
1556
  navVidIdLookup: Record<string, any>;
1536
1557
  ctrlLookup: Record<string, LabelController$1>;
1537
- activeNavigationPoint: any | null;
1558
+ activeNavigationPoint: any;
1538
1559
  labelControllers: LabelController$1[];
1539
1560
  eventbus: IEventbus | null;
1561
+ services: IEngineServices | null;
1540
1562
  container: JQuery | null;
1541
1563
  private _menuElement;
1542
1564
  private _anchorLookup;
@@ -1547,7 +1569,7 @@ declare class NavigationController$1 extends BaseController<INavigationControlle
1547
1569
  * navigation id in roots, nextId or children
1548
1570
  */
1549
1571
  init(operationData: INavigationControllerOperationData): void;
1550
- attach(eventbus: IEventbus): void;
1572
+ attach(eventbus: IEventbus, services: IEngineServices): void;
1551
1573
  /**
1552
1574
  * Sets the active navigation point and the menu highlight from the URL hash,
1553
1575
  * falling back to the item with videoUrlIndex 0 when the hash is missing or
@@ -2121,7 +2143,7 @@ interface IFindInArrayOperationData {
2121
2143
  /**
2122
2144
  * @output
2123
2145
  */
2124
- foundItem?: any | undefined;
2146
+ foundItem?: any;
2125
2147
  /**
2126
2148
  * @output
2127
2149
  */
@@ -2486,14 +2508,16 @@ interface IMapArrayOperationData {
2486
2508
  mappedArray?: any[];
2487
2509
  }
2488
2510
  type MathFunctionKeys = { [K in keyof Math]: Math[K] extends ((...args: any) => any) ? K : never; }[keyof Math];
2489
- type MathNonFunctionKeys = { [K in keyof Math]: Math[K] extends ((...args: any) => any) ? never : K; }[keyof Math];
2490
2511
  interface IMathOperationData {
2491
2512
  /**
2513
+ * Numbers, property chains, or names of Math constants
2514
+ * ({@link MathNonFunctionKeys}).
2515
+ *
2492
2516
  * @type=ParameterType:array
2493
2517
  * @required
2494
2518
  * @erased
2495
2519
  */
2496
- args: (number | string | MathNonFunctionKeys)[];
2520
+ args: (number | string)[];
2497
2521
  /**
2498
2522
  * @type=ParameterType:mathfunction
2499
2523
  * @required
@@ -3008,12 +3032,13 @@ declare class DOMEventListenerController$1 implements IController<IDOMEventListe
3008
3032
  /**
3009
3033
  * Looks up the configured actions and starts listening for the DOM event.
3010
3034
  *
3011
- * @param eventbus - The eventbus to request the actions from
3012
- * @throws when an action name is unknown (`request-action` throws or
3013
- * returns nothing); the message names the controller, the action and the
3014
- * DOM event, and keeps the responder's "did you mean" hint
3035
+ * @param eventbus - The eventbus the actions report errors on
3036
+ * @param services - The engine services to look the actions up in
3037
+ * @throws when an action name is unknown; the message names the
3038
+ * controller, the action and the DOM event, and keeps the "did you mean"
3039
+ * hint
3015
3040
  */
3016
- attach(eventbus: IEventbus): void;
3041
+ attach(eventbus: IEventbus, services: IEngineServices): void;
3017
3042
  private _eventHandler;
3018
3043
  /**
3019
3044
  * Removes only the handler this controller registered, so other handlers for
@@ -3098,14 +3123,10 @@ declare function highlightNavigation(): IEventMetadata<HighlightNavigationEvent[
3098
3123
  declare function languageChange(): IEventMetadata<LanguageChangeEvent['args']>;
3099
3124
  declare function navigateToVideoUrl(): IEventMetadata<NavigateToVideoUrlEvent['args']>;
3100
3125
  declare function pushHistoryState(): IEventMetadata<PushHistoryStateEvent['args']>;
3101
- declare function requestAction$1(): IEventMetadata<RequestActionEvent['args']>;
3102
3126
  declare function requestCurrentLanguage(): IEventMetadata<RequestCurrentLanguageEvent['args']>;
3103
3127
  declare function requestCurrentNavigation(): IEventMetadata<RequestCurrentNavigationEvent['args']>;
3104
3128
  declare function requestCurrentTimelinePosition(): IEventMetadata<RequestCurrentTimelinePositionEvent['args']>;
3105
3129
  declare function requestCurrentVideoPosition(): IEventMetadata<RequestCurrentVideoPositionEvent['args']>;
3106
- declare function requestEngineRoot(): IEventMetadata<RequestEngineRootEvent['args']>;
3107
- declare function requestFunction(): IEventMetadata<RequestFunctionEvent['args']>;
3108
- declare function requestInstance(): IEventMetadata<RequestInstanceEvent['args']>;
3109
3130
  declare function requestLabelCollection(): IEventMetadata<RequestLabelCollectionEvent['args']>;
3110
3131
  declare function requestLabelCollections(): IEventMetadata<RequestLabelCollectionsEvent['args']>;
3111
3132
  declare function requestTimelineCleanup(): IEventMetadata<RequestTimelineCleanupEvent['args']>;
@@ -3136,7 +3157,7 @@ declare function timelineStop(): IEventMetadata<StopEvent['args']>;
3136
3157
  declare function timelineTime(): IEventMetadata<TimeEvent['args']>;
3137
3158
  declare function videoComplete(): IEventMetadata<VideoCompleteEvent['args']>;
3138
3159
  declare namespace index_d_exports$1 {
3139
- export { IEventMetadata, beforeRequestTimelineUri, beforeRequestVideoUrl, domMutation, engineCommandError, engineError, highlightNavigation, languageChange, navigateToVideoUrl, pushHistoryState, requestAction$1 as requestAction, requestCurrentLanguage, requestCurrentNavigation, requestCurrentTimelinePosition, requestCurrentVideoPosition, requestEngineRoot, requestFunction, requestInstance, requestLabelCollection, requestLabelCollections, requestTimelineCleanup, requestTimelineUri, requestTranslation, requestVideoCleanup, requestVideoUrl, timelineComplete, timelineContainerRequest, timelineCurrentTimelineChange, timelineDuration, timelineDurationRequest, timelineFirstframe, timelinePause, timelinePauseRequest, timelinePlay, timelinePlayRequest, timelinePlayToggleRequest, timelineRequestCurrentTimeline, timelineResize, timelineResizeRequest, timelineRestart, timelineSeek, timelineSeekRequest, timelineSeeked, timelineStop, timelineStopRequest, timelineTime, videoComplete };
3160
+ export { IEventMetadata, beforeRequestTimelineUri, beforeRequestVideoUrl, domMutation, engineCommandError, engineError, highlightNavigation, languageChange, navigateToVideoUrl, pushHistoryState, requestCurrentLanguage, requestCurrentNavigation, requestCurrentTimelinePosition, requestCurrentVideoPosition, requestLabelCollection, requestLabelCollections, requestTimelineCleanup, requestTimelineUri, requestTranslation, requestVideoCleanup, requestVideoUrl, timelineComplete, timelineContainerRequest, timelineCurrentTimelineChange, timelineDuration, timelineDurationRequest, timelineFirstframe, timelinePause, timelinePauseRequest, timelinePlay, timelinePlayRequest, timelinePlayToggleRequest, timelineRequestCurrentTimeline, timelineResize, timelineResizeRequest, timelineRestart, timelineSeek, timelineSeekRequest, timelineSeeked, timelineStop, timelineStopRequest, timelineTime, videoComplete };
3140
3161
  }
3141
3162
  declare function addClass(): IOperationMetadata<IAddClassOperationData>;
3142
3163
  declare function addControllerToElement(): IOperationMetadata<IAddControllerToElementOperationData<TOperationData>>;
@@ -3220,5 +3241,4 @@ declare function when(): IOperationMetadata<IWhenOperationData>;
3220
3241
  declare namespace index_d_exports$2 {
3221
3242
  export { IOperationMetadata, TArrayProperyMetadata, TComplexPropertyMetadata, TConstantParametersTypes, THasDescription, THasErased, THasRequired, TOperationCategory, TParameterTypeName, TParameterTypes, TParameterTypesDelimited, TPropertiesMetadata, TPropertyMetadata, addClass, addControllerToElement, addGlobalsToOperation, animate, animateWithClass, announceToScreenReader, breakForEach, broadcastEvent, calc, clearElement, clearOperationData, clearStorage, compareDate, concatenateStrings, continueForEach, createElement, customFunction, endAction, endForEach, endWhen, extendController, filterArray, findInArray, forEach, formatDate, formatText, getAttributesFromElement, getControllerFromElement, getControllerInstance, getCurrentTime, getElementDimensions, getFocusedElement, getFormData, getImport, getQueryParams, getScrollPosition, getTextContent, httpDelete, httpPost, httpPut, invokeObjectMethod, isElementInViewport, loadFromStorage, loadJson, log, mapArray, math, otherwise, removeClass, removeControllerFromElement, removeElement, removePropertiesFromOperationData, reparentElement, replaceString, replaceText, requestAction, saveToStorage, scrollToElement, scrollToPosition, selectElement, setData, setElementAttributes, setElementContent, setFocus, setFormValue, setGlobalData, setOperationData, setStyle, setVariable, sortArray, splitString, startAction, substringText, toggleClass, toggleElement, toggleFormElement, validateForm, wait, when };
3222
3243
  }
3223
- export { index_d_exports as ctrlmetadata, index_d_exports$1 as eventmetadata, index_d_exports$2 as metadata };
3224
- //# sourceMappingURL=metadata.d.mts.map
3244
+ export { index_d_exports as ctrlmetadata, index_d_exports$1 as eventmetadata, index_d_exports$2 as metadata };
package/dist/metadata.mjs CHANGED
@@ -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
 
4
4
  // src/controllers/metadata/dom-event-listener-controller.ts
5
5
  function DOMEventListenerController() {
@@ -320,7 +320,8 @@ function engineError() {
320
320
  description: `Event: engine-error
321
321
  Broadcast when a timeline action that the engine started or ended on its
322
322
  own fails. The error names the action, the phase (start or end) and, when
323
- known, the failing operation.`,
323
+ known, the failing operation (\`operationSystemName\`, \`operationIndex\`) and
324
+ the path to it through called actions (\`operationPath\`, outermost first).`,
324
325
  category: `Engine`,
325
326
  args: [{
326
327
  name: "error",
@@ -387,22 +388,6 @@ function pushHistoryState() {
387
388
  };
388
389
  }
389
390
 
390
- // src/eventbus/events/metadata/request-action.ts
391
- function requestAction$1() {
392
- return {
393
- description: `Request: request-action
394
- Answered through \`eventbus.request('request-action', actionName)\` by
395
- EngineFactory with the configured action of that name. Throws for an
396
- unknown name, with a "did you mean" hint.`,
397
- category: `Engine Request`,
398
- args: [{
399
- name: "actionName",
400
- type: "string",
401
- description: "The name of the action to request"
402
- }]
403
- };
404
- }
405
-
406
391
  // src/eventbus/events/metadata/request-current-language.ts
407
392
  function requestCurrentLanguage() {
408
393
  return {
@@ -453,53 +438,6 @@ function requestCurrentVideoPosition() {
453
438
  };
454
439
  }
455
440
 
456
- // src/eventbus/events/metadata/request-engine-root.ts
457
- function requestEngineRoot() {
458
- return {
459
- description: `Request: request-engine-root
460
- Answered through \`eventbus.request('request-engine-root')\` with the
461
- engine's root element (the container selector). From \`engine.init()\` until
462
- \`engine.destroy()\` every answer is the same jQuery instance. The engine also
463
- answers the legacy form, a broadcast whose last argument is a callback that
464
- receives the value.`,
465
- category: `Engine Request`,
466
- args: []
467
- };
468
- }
469
-
470
- // src/eventbus/events/metadata/request-function.ts
471
- function requestFunction() {
472
- return {
473
- description: `Request: request-function
474
- Answered through \`eventbus.request('request-function', systemName)\` by
475
- EngineFactory with the function (such as an operation) the resource
476
- importer provides under that name. Throws for an unknown name.`,
477
- category: `Engine Request`,
478
- args: [{
479
- name: "systemName",
480
- type: "string",
481
- description: "The name of the function to request"
482
- }]
483
- };
484
- }
485
-
486
- // src/eventbus/events/metadata/request-instance.ts
487
- function requestInstance() {
488
- return {
489
- description: `Request: request-instance
490
- Answered through \`eventbus.request('request-instance', systemName)\` by
491
- EngineFactory with a new instance of the class the resource importer
492
- provides under that name (a controller, for example), constructed with the
493
- eventbus. Throws for an unknown name.`,
494
- category: `Engine Request`,
495
- args: [{
496
- name: "systemName",
497
- type: "string",
498
- description: "The name of the class to instantiate"
499
- }]
500
- };
501
- }
502
-
503
441
  // src/eventbus/events/metadata/request-label-collection.ts
504
442
  function requestLabelCollection() {
505
443
  return {
@@ -883,14 +821,10 @@ var metadata_exports$1 = /* @__PURE__ */ __exportAll({
883
821
  languageChange: () => languageChange,
884
822
  navigateToVideoUrl: () => navigateToVideoUrl,
885
823
  pushHistoryState: () => pushHistoryState,
886
- requestAction: () => requestAction$1,
887
824
  requestCurrentLanguage: () => requestCurrentLanguage,
888
825
  requestCurrentNavigation: () => requestCurrentNavigation,
889
826
  requestCurrentTimelinePosition: () => requestCurrentTimelinePosition,
890
827
  requestCurrentVideoPosition: () => requestCurrentVideoPosition,
891
- requestEngineRoot: () => requestEngineRoot,
892
- requestFunction: () => requestFunction,
893
- requestInstance: () => requestInstance,
894
828
  requestLabelCollection: () => requestLabelCollection,
895
829
  requestLabelCollections: () => requestLabelCollections,
896
830
  requestTimelineCleanup: () => requestTimelineCleanup,
@@ -1277,8 +1211,8 @@ function customFunction() {
1277
1211
  description: `This operation retrieves a custom function defined by the given system name
1278
1212
  and invokes it with the current operation data and eventbus.
1279
1213
 
1280
- The function is looked up with the \`request-function\` event, which the
1281
- \`EngineFactory\` answers from its resource importer. Register the function
1214
+ The function is looked up with \`this.services.getImport\`, which answers from
1215
+ the engine's resource importer. Register the function
1282
1216
  with the \`EligiusResourceImporter\` constructor:
1283
1217
  \`new EligiusResourceImporter({functions: {myFunction}})\`.
1284
1218
 
@@ -1601,8 +1535,8 @@ function getImport() {
1601
1535
  description: `This operation retrieves the import specified by the given \`systemName\` and
1602
1536
  assigns it to the \`importedInstance\` property on the current operaton date.
1603
1537
 
1604
- The import is looked up with the \`request-function\` event, which the
1605
- \`EngineFactory\` answers from its resource importer. Functions, templates
1538
+ The import is looked up with \`this.services.getImport\`, which answers from
1539
+ the engine's resource importer. Functions, templates
1606
1540
  and JSON registered with the \`EligiusResourceImporter\` constructor
1607
1541
  (\`new EligiusResourceImporter({json: {settings}})\`) can be imported this
1608
1542
  way, as can every built-in operation, controller and provider export.`,