eligius 1.0.71 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/README.md +16 -7
  2. package/dist/action/action.d.ts +5 -1
  3. package/dist/action/endable-action.d.ts +1 -1
  4. package/dist/action/timeline-action.d.ts +1 -1
  5. package/dist/build/generate-importer-source-code.d.ts +1 -1
  6. package/dist/configuration/api/action-creator-factory.d.ts +1 -1
  7. package/dist/configuration/api/configuration-factory.d.ts +96 -3
  8. package/dist/configuration/configuration-resolver.d.ts +7 -0
  9. package/dist/configuration/types.d.ts +8 -0
  10. package/dist/controllers/event-listener-controller.d.ts +10 -3
  11. package/dist/controllers/label-controller.d.ts +14 -6
  12. package/dist/controllers/lottie-controller.d.ts +15 -9
  13. package/dist/controllers/navigation-controller.d.ts +15 -16
  14. package/dist/controllers/progressbar-controller.d.ts +10 -7
  15. package/dist/controllers/routing-controller.d.ts +11 -8
  16. package/dist/controllers/subtitles-controller.d.ts +3 -3
  17. package/dist/diagnostics/types.d.ts +22 -2
  18. package/dist/eligius-engine.d.ts +39 -10
  19. package/dist/eligius.cjs.development.js +5363 -3767
  20. package/dist/eligius.cjs.development.js.map +1 -1
  21. package/dist/eligius.cjs.production.min.js +1 -1
  22. package/dist/eligius.cjs.production.min.js.map +1 -1
  23. package/dist/eligius.esm.js +5341 -3765
  24. package/dist/eligius.esm.js.map +1 -1
  25. package/dist/engine-factory.d.ts +22 -5
  26. package/dist/eventbus/actionregistry-eventbus-listener.d.ts +4 -0
  27. package/dist/eventbus/eventbus.d.ts +5 -5
  28. package/dist/eventbus/types.d.ts +5 -5
  29. package/dist/index.d.ts +1 -0
  30. package/dist/language-manager.d.ts +10 -3
  31. package/dist/operation/add-controller-to-element.d.ts +5 -5
  32. package/dist/operation/animate-with-class.d.ts +1 -1
  33. package/dist/operation/animate.d.ts +2 -2
  34. package/dist/operation/calc.d.ts +2 -2
  35. package/dist/operation/clear-element.d.ts +2 -1
  36. package/dist/operation/clear-operation-data.d.ts +1 -0
  37. package/dist/operation/create-element.d.ts +2 -4
  38. package/dist/operation/custom-function.d.ts +1 -1
  39. package/dist/operation/end-action.d.ts +5 -1
  40. package/dist/operation/end-loop.d.ts +1 -2
  41. package/dist/operation/end-when.d.ts +8 -0
  42. package/dist/operation/get-controller-from-element.d.ts +1 -1
  43. package/dist/operation/get-controller-instance.d.ts +3 -5
  44. package/dist/operation/get-element-dimensions.d.ts +2 -2
  45. package/dist/operation/get-query-params.d.ts +28 -0
  46. package/dist/operation/helper/find-matching-operation-index.d.ts +35 -0
  47. package/dist/operation/helper/get-property-chain-value.d.ts +24 -0
  48. package/dist/operation/helper/globals.d.ts +3 -0
  49. package/dist/operation/helper/remove-global.d.ts +1 -0
  50. package/dist/operation/helper/resolve-event-arguments.d.ts +2 -2
  51. package/dist/operation/helper/resolve-external-property-chain.d.ts +14 -0
  52. package/dist/operation/helper/resolve-property-chain.d.ts +23 -0
  53. package/dist/operation/helper/resolve-property-values.d.ts +11 -2
  54. package/dist/operation/index.d.ts +6 -0
  55. package/dist/operation/invoke-object-method.d.ts +28 -0
  56. package/dist/operation/load-json.d.ts +11 -3
  57. package/dist/operation/log.d.ts +3 -3
  58. package/dist/operation/math.d.ts +2 -2
  59. package/dist/operation/metadata/end-when.d.ts +3 -0
  60. package/dist/operation/metadata/get-query-params.d.ts +4 -0
  61. package/dist/operation/metadata/index.d.ts +6 -0
  62. package/dist/operation/metadata/invoke-object-method.d.ts +4 -0
  63. package/dist/operation/metadata/otherwise.d.ts +3 -0
  64. package/dist/operation/metadata/set-global-data.d.ts +4 -0
  65. package/dist/operation/metadata/start-loop.d.ts +2 -2
  66. package/dist/operation/metadata/types.d.ts +1 -1
  67. package/dist/operation/metadata/when.d.ts +4 -0
  68. package/dist/operation/otherwise.d.ts +9 -0
  69. package/dist/operation/remove-class.d.ts +1 -1
  70. package/dist/operation/remove-controller-from-element.d.ts +1 -1
  71. package/dist/operation/remove-element.d.ts +1 -1
  72. package/dist/operation/remove-properties-from-operation-data.d.ts +1 -0
  73. package/dist/operation/reparent-element.d.ts +2 -2
  74. package/dist/operation/request-action.d.ts +1 -1
  75. package/dist/operation/select-element.d.ts +3 -4
  76. package/dist/operation/set-element-attributes.d.ts +1 -1
  77. package/dist/operation/set-element-content.d.ts +4 -4
  78. package/dist/operation/set-global-data.d.ts +11 -0
  79. package/dist/operation/set-operation-data.d.ts +1 -1
  80. package/dist/operation/set-style.d.ts +4 -5
  81. package/dist/operation/start-action.d.ts +3 -3
  82. package/dist/operation/start-loop.d.ts +7 -6
  83. package/dist/operation/toggle-class.d.ts +10 -1
  84. package/dist/operation/toggle-element.d.ts +7 -1
  85. package/dist/operation/types.d.ts +45 -3
  86. package/dist/operation/wait.d.ts +3 -3
  87. package/dist/operation/when.d.ts +18 -0
  88. package/dist/timeline-event-names.d.ts +46 -2
  89. package/dist/timelineproviders/index.d.ts +0 -1
  90. package/dist/timelineproviders/media-element-timeline-provider.d.ts +20 -12
  91. package/dist/timelineproviders/request-animation-frame-timeline-provider.d.ts +19 -20
  92. package/dist/timelineproviders/types.d.ts +10 -2
  93. package/dist/{schema-tools/generate-operation-schemas.d.ts → tools/doc-tools/generate-readmes.d.ts} +0 -0
  94. package/dist/tools/schema-tools/generate-operation-schemas.d.ts +1 -0
  95. package/dist/{schema-tools → tools/schema-tools}/html-tag-names.d.ts +0 -0
  96. package/dist/types.d.ts +42 -3
  97. package/dist/util/guards/is-function.d.ts +1 -0
  98. package/dist/util/guards/is-object.d.ts +1 -0
  99. package/dist/util/guards/is-promise.d.ts +1 -0
  100. package/dist/util/guards/is-string.d.ts +1 -0
  101. package/package.json +20 -13
  102. package/dist/action/is-promise.d.ts +0 -1
  103. package/dist/operation/helper/extract-operation-data-argument-values.d.ts +0 -1
  104. package/dist/operation/helper/get-globals.d.ts +0 -1
  105. package/dist/operation/helper/get-nested-property-value.d.ts +0 -1
  106. package/dist/operation/helper/get-nested-value.d.ts +0 -1
  107. package/dist/timelineproviders/jwplayer-timeline-provider.d.ts +0 -42
@@ -4,36 +4,66 @@ import { LanguageManager } from './language-manager';
4
4
  import { ITimelineProvider } from './timelineproviders/types';
5
5
  import { IEligiusEngine, ITimelineProviderInfo, TimelineTypes } from './types';
6
6
  /**
7
- * EligiusEngine, this is where the magic happens. The engine is responsible for starting and stopping
8
- * the given timeline provider and triggering the actions associated with it.
9
- * ...
7
+ * This is where the magic happens. The engine is responsible for starting and stopping
8
+ * the given timeline provider and triggering the actions associated with the positions along the timeline.
10
9
  */
11
10
  export declare class EligiusEngine implements IEligiusEngine {
12
11
  private configuration;
13
12
  private eventbus;
14
13
  private timelineProviders;
15
- private _languageManager;
14
+ private languageManager;
16
15
  private _timeLineActionsLookup;
17
- private _eventbusListeners;
16
+ private _eventbusRemovers;
18
17
  private _currentTimelineUri;
19
18
  private _activeTimelineProvider;
20
19
  private _lastPosition;
21
- constructor(configuration: IResolvedEngineConfiguration, eventbus: IEventbus, timelineProviders: Record<TimelineTypes, ITimelineProviderInfo>, _languageManager: LanguageManager);
20
+ constructor(configuration: IResolvedEngineConfiguration, eventbus: IEventbus, timelineProviders: Record<TimelineTypes, ITimelineProviderInfo>, languageManager: LanguageManager);
21
+ /**
22
+ * Initializes the engine by creating the HTML layout and the first time line
23
+ * by executing its initActions.
24
+ */
22
25
  init(): Promise<ITimelineProvider>;
23
26
  private _createLayoutTemplate;
24
27
  private _initializeTimelineProvider;
28
+ private _onCompleteCallback;
29
+ private _onFirstFrameCallback;
30
+ private _onRestartCallback;
25
31
  private _cleanUp;
32
+ /**
33
+ * Cleans up all the necessary parts that the engine initialized.
34
+ * - It ends the currently active operations and the init actions.
35
+ * - It removes all its eventbus listeners, handlers and interceptors.
36
+ * - It destroys all of its timeline providers
37
+ * - It empties the HTML element indicated by the containerSelector configuration property.
38
+ *
39
+ */
26
40
  destroy(): Promise<void>;
27
- private _addInitialisationListeners;
41
+ private _addEventListener;
42
+ private _addEventbusListeners;
43
+ private seekRequest;
44
+ private durationRequest;
45
+ private containerRequest;
46
+ private _pauseRequest;
47
+ private _stopRequest;
48
+ private _playRequest;
49
+ private _toggleplay;
28
50
  private _createTimelineLookup;
29
- private _addTimelineAction;
51
+ private _addTimelineActionStart;
52
+ private _addTimelineActionEnd;
30
53
  private _initializeUriLookup;
31
54
  private _initializeTimelinePosition;
32
55
  private _executeActions;
33
56
  private _handleRequestEngineRoot;
34
- _handleRequestTimelineUri(uri: string, position?: number, previousVideoPosition?: number): Promise<void>;
57
+ private _handleRequestTimelineUri;
35
58
  private _cleanUpTimeline;
36
59
  private _executeStartActions;
60
+ /**
61
+ * Gets all of the inactive actions whose duration falls within the given timeline position.
62
+ *
63
+ * @param position the given position
64
+ * @param actions all of the relevant actions
65
+ * @returns
66
+ */
37
67
  private _getActionsForPosition;
38
68
  private _getActiveActions;
39
69
  private _executeRelevantActions;
@@ -45,7 +75,6 @@ export declare class EligiusEngine implements IEligiusEngine {
45
75
  private _requestCurrentTimeline;
46
76
  private _getTimelineActionsForUri;
47
77
  private _onTimeHandler;
48
- private _onSeekHandler;
49
78
  private _executeActionsForPosition;
50
79
  private _executeSeekActions;
51
80
  }