eligius 2.1.0 → 2.2.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 (173) hide show
  1. package/dist/index.d.mts +452 -227
  2. package/dist/index.mjs +356 -283
  3. package/dist/index.mjs.map +1 -1
  4. package/jsonschema/eligius-configuration.json +698 -125
  5. package/jsonschema/operations/add-class.json +20 -23
  6. package/jsonschema/operations/add-controller-to-element.json +13 -12
  7. package/jsonschema/operations/animate-with-class.json +21 -25
  8. package/jsonschema/operations/animate.json +23 -31
  9. package/jsonschema/operations/announce-to-screen-reader.json +20 -24
  10. package/jsonschema/operations/broadcast-event.json +19 -31
  11. package/jsonschema/operations/calc.json +24 -30
  12. package/jsonschema/operations/clear-element.json +24 -13
  13. package/jsonschema/operations/clear-operation-data.json +15 -18
  14. package/jsonschema/operations/compare-date.json +51 -23
  15. package/jsonschema/operations/concatenate-strings.json +22 -24
  16. package/jsonschema/operations/create-element.json +11 -144
  17. package/jsonschema/operations/custom-function.json +15 -22
  18. package/jsonschema/operations/end-action.json +19 -22
  19. package/jsonschema/operations/extend-controller.json +19 -22
  20. package/jsonschema/operations/filter-array.json +40 -26
  21. package/jsonschema/operations/find-in-array.json +40 -26
  22. package/jsonschema/operations/for-each.json +23 -22
  23. package/jsonschema/operations/format-date.json +33 -22
  24. package/jsonschema/operations/format-text.json +22 -20
  25. package/jsonschema/operations/get-attributes-from-element.json +28 -22
  26. package/jsonschema/operations/get-controller-from-element.json +23 -34
  27. package/jsonschema/operations/get-controller-instance.json +11 -25
  28. package/jsonschema/operations/get-current-time.json +23 -13
  29. package/jsonschema/operations/get-element-dimensions.json +30 -20
  30. package/jsonschema/operations/get-focused-element.json +20 -13
  31. package/jsonschema/operations/get-form-data.json +27 -13
  32. package/jsonschema/operations/get-import.json +17 -23
  33. package/jsonschema/operations/get-query-params.json +17 -18
  34. package/jsonschema/operations/get-scroll-position.json +23 -13
  35. package/jsonschema/operations/get-text-content.json +27 -13
  36. package/jsonschema/operations/http-delete.json +20 -24
  37. package/jsonschema/operations/http-post.json +21 -30
  38. package/jsonschema/operations/http-put.json +21 -30
  39. package/jsonschema/operations/invoke-object-method.json +26 -24
  40. package/jsonschema/operations/is-element-in-viewport.json +27 -13
  41. package/jsonschema/operations/load-from-storage.json +19 -26
  42. package/jsonschema/operations/load-json.json +21 -24
  43. package/jsonschema/operations/log.json +13 -26
  44. package/jsonschema/operations/map-array.json +39 -22
  45. package/jsonschema/operations/math.json +33 -27
  46. package/jsonschema/operations/remove-class.json +20 -23
  47. package/jsonschema/operations/remove-controller-from-element.json +20 -34
  48. package/jsonschema/operations/remove-element.json +24 -13
  49. package/jsonschema/operations/remove-properties-from-operation-data.json +18 -22
  50. package/jsonschema/operations/reparent-element.json +20 -22
  51. package/jsonschema/operations/replace-string.json +32 -25
  52. package/jsonschema/operations/replace-text.json +32 -25
  53. package/jsonschema/operations/request-action.json +18 -22
  54. package/jsonschema/operations/save-to-storage.json +19 -32
  55. package/jsonschema/operations/scroll-to-element.json +21 -22
  56. package/jsonschema/operations/scroll-to-position.json +18 -29
  57. package/jsonschema/operations/select-element.json +19 -24
  58. package/jsonschema/operations/set-data.json +15 -22
  59. package/jsonschema/operations/set-element-attributes.json +20 -22
  60. package/jsonschema/operations/set-element-content.json +36 -20
  61. package/jsonschema/operations/set-focus.json +24 -13
  62. package/jsonschema/operations/set-form-value.json +24 -20
  63. package/jsonschema/operations/set-global-data.json +18 -22
  64. package/jsonschema/operations/set-style.json +20 -22
  65. package/jsonschema/operations/set-variable.json +17 -31
  66. package/jsonschema/operations/set.json +40 -0
  67. package/jsonschema/operations/sort-array.json +39 -22
  68. package/jsonschema/operations/split-string.json +34 -22
  69. package/jsonschema/operations/start-action.json +19 -20
  70. package/jsonschema/operations/substring-text.json +23 -24
  71. package/jsonschema/operations/toggle-class.json +21 -23
  72. package/jsonschema/operations/toggle-element.json +24 -13
  73. package/jsonschema/operations/toggle-form-element.json +20 -22
  74. package/jsonschema/operations/validate-form.json +25 -18
  75. package/jsonschema/operations/wait.json +16 -22
  76. package/jsonschema/operations/when.json +15 -22
  77. package/package.json +4 -2
  78. package/jsonschema/endable-action-template.json +0 -527
  79. package/jsonschema/endable-action.json +0 -527
  80. package/jsonschema/engine-config.json +0 -21
  81. package/jsonschema/event-action.json +0 -295
  82. package/jsonschema/mediaplayer-timeline-provider-settings.json +0 -95
  83. package/jsonschema/operation-templates/add-class.json +0 -40
  84. package/jsonschema/operation-templates/add-controller-to-element.json +0 -26
  85. package/jsonschema/operation-templates/add-globals-to-operation.json +0 -39
  86. package/jsonschema/operation-templates/animate-with-class.json +0 -44
  87. package/jsonschema/operation-templates/animate.json +0 -51
  88. package/jsonschema/operation-templates/announce-to-screen-reader.json +0 -43
  89. package/jsonschema/operation-templates/break-for-each.json +0 -26
  90. package/jsonschema/operation-templates/broadcast-event.json +0 -51
  91. package/jsonschema/operation-templates/calc.json +0 -49
  92. package/jsonschema/operation-templates/clear-element.json +0 -26
  93. package/jsonschema/operation-templates/clear-operation-data.json +0 -37
  94. package/jsonschema/operation-templates/clear-storage.json +0 -41
  95. package/jsonschema/operation-templates/compare-date.json +0 -41
  96. package/jsonschema/operation-templates/concatenate-strings.json +0 -43
  97. package/jsonschema/operation-templates/continue-for-each.json +0 -26
  98. package/jsonschema/operation-templates/create-element.json +0 -156
  99. package/jsonschema/operation-templates/custom-function.json +0 -39
  100. package/jsonschema/operation-templates/end-action.json +0 -39
  101. package/jsonschema/operation-templates/end-for-each.json +0 -26
  102. package/jsonschema/operation-templates/end-when.json +0 -26
  103. package/jsonschema/operation-templates/extend-controller.json +0 -39
  104. package/jsonschema/operation-templates/filter-array.json +0 -47
  105. package/jsonschema/operation-templates/find-in-array.json +0 -47
  106. package/jsonschema/operation-templates/for-each.json +0 -40
  107. package/jsonschema/operation-templates/format-date.json +0 -39
  108. package/jsonschema/operation-templates/format-text.json +0 -37
  109. package/jsonschema/operation-templates/get-attributes-from-element.json +0 -39
  110. package/jsonschema/operation-templates/get-controller-from-element.json +0 -51
  111. package/jsonschema/operation-templates/get-controller-instance.json +0 -37
  112. package/jsonschema/operation-templates/get-current-time.json +0 -26
  113. package/jsonschema/operation-templates/get-element-dimensions.json +0 -39
  114. package/jsonschema/operation-templates/get-focused-element.json +0 -26
  115. package/jsonschema/operation-templates/get-form-data.json +0 -26
  116. package/jsonschema/operation-templates/get-import.json +0 -39
  117. package/jsonschema/operation-templates/get-query-params.json +0 -37
  118. package/jsonschema/operation-templates/get-scroll-position.json +0 -26
  119. package/jsonschema/operation-templates/get-text-content.json +0 -26
  120. package/jsonschema/operation-templates/http-delete.json +0 -43
  121. package/jsonschema/operation-templates/http-post.json +0 -49
  122. package/jsonschema/operation-templates/http-put.json +0 -49
  123. package/jsonschema/operation-templates/invoke-object-method.json +0 -43
  124. package/jsonschema/operation-templates/is-element-in-viewport.json +0 -26
  125. package/jsonschema/operation-templates/load-from-storage.json +0 -43
  126. package/jsonschema/operation-templates/load-json.json +0 -43
  127. package/jsonschema/operation-templates/log.json +0 -47
  128. package/jsonschema/operation-templates/map-array.json +0 -39
  129. package/jsonschema/operation-templates/math.json +0 -45
  130. package/jsonschema/operation-templates/otherwise.json +0 -26
  131. package/jsonschema/operation-templates/remove-class.json +0 -40
  132. package/jsonschema/operation-templates/remove-controller-from-element.json +0 -51
  133. package/jsonschema/operation-templates/remove-element.json +0 -26
  134. package/jsonschema/operation-templates/remove-properties-from-operation-data.json +0 -39
  135. package/jsonschema/operation-templates/reparent-element.json +0 -39
  136. package/jsonschema/operation-templates/replace-string.json +0 -43
  137. package/jsonschema/operation-templates/replace-text.json +0 -43
  138. package/jsonschema/operation-templates/request-action.json +0 -39
  139. package/jsonschema/operation-templates/save-to-storage.json +0 -49
  140. package/jsonschema/operation-templates/scroll-to-element.json +0 -45
  141. package/jsonschema/operation-templates/scroll-to-position.json +0 -49
  142. package/jsonschema/operation-templates/select-element.json +0 -43
  143. package/jsonschema/operation-templates/set-data.json +0 -39
  144. package/jsonschema/operation-templates/set-element-attributes.json +0 -39
  145. package/jsonschema/operation-templates/set-element-content.json +0 -41
  146. package/jsonschema/operation-templates/set-focus.json +0 -26
  147. package/jsonschema/operation-templates/set-form-value.json +0 -37
  148. package/jsonschema/operation-templates/set-global-data.json +0 -39
  149. package/jsonschema/operation-templates/set-operation-data.json +0 -43
  150. package/jsonschema/operation-templates/set-style.json +0 -39
  151. package/jsonschema/operation-templates/set-variable.json +0 -49
  152. package/jsonschema/operation-templates/sort-array.json +0 -45
  153. package/jsonschema/operation-templates/split-string.json +0 -41
  154. package/jsonschema/operation-templates/start-action.json +0 -39
  155. package/jsonschema/operation-templates/substring-text.json +0 -43
  156. package/jsonschema/operation-templates/toggle-class.json +0 -40
  157. package/jsonschema/operation-templates/toggle-element.json +0 -26
  158. package/jsonschema/operation-templates/toggle-form-element.json +0 -39
  159. package/jsonschema/operation-templates/validate-form.json +0 -37
  160. package/jsonschema/operation-templates/wait.json +0 -39
  161. package/jsonschema/operation-templates/when.json +0 -39
  162. package/jsonschema/operations/add-globals-to-operation.json +0 -43
  163. package/jsonschema/operations/break-for-each.json +0 -26
  164. package/jsonschema/operations/clear-storage.json +0 -45
  165. package/jsonschema/operations/continue-for-each.json +0 -26
  166. package/jsonschema/operations/end-for-each.json +0 -26
  167. package/jsonschema/operations/end-when.json +0 -26
  168. package/jsonschema/operations/otherwise.json +0 -26
  169. package/jsonschema/operations/set-operation-data.json +0 -47
  170. package/jsonschema/raf-timeline-provider-settings.json +0 -141
  171. package/jsonschema/timeline-action.json +0 -542
  172. package/jsonschema/timeline-provider-settings.json +0 -19
  173. package/jsonschema/timeline.json +0 -73
@@ -1,176 +1,749 @@
1
1
  {
2
- "definitions": {
3
- "label": {
4
- "type": "object",
5
- "title": "Label",
6
- "description": "A localized label with language code",
7
- "required": ["id", "languageCode", "label"],
8
- "properties": {
9
- "id": {
10
- "type": "string",
11
- "title": "Id",
12
- "description": "Unique identifier for the label"
13
- },
14
- "languageCode": {
15
- "type": "string",
16
- "title": "Language Code",
17
- "description": "IETF language tag (e.g., en-US, nl-NL)",
18
- "examples": ["en-US", "nl-NL", "de-DE"]
19
- },
20
- "label": {
21
- "type": "string",
22
- "title": "Label",
23
- "description": "The localized label text"
24
- }
25
- }
26
- },
27
- "languageLabel": {
28
- "type": "object",
29
- "title": "Language Label Collection",
30
- "description": "A collection of labels for different languages",
31
- "required": ["id", "labels"],
32
- "properties": {
33
- "id": {
34
- "type": "string",
35
- "title": "Id",
36
- "description": "Unique identifier for the label collection"
37
- },
38
- "labels": {
39
- "type": "array",
40
- "title": "Labels",
41
- "description": "Array of localized labels",
42
- "items": {
43
- "$ref": "#/definitions/label"
44
- }
45
- }
46
- }
47
- }
48
- },
49
2
  "$schema": "http://json-schema.org/draft-07/schema#",
50
- "$id": "https://rolandzwaga.github.io/eligius/jsonschema/eligius-configuration.json",
51
3
  "type": "object",
52
- "title": "Eligius Configuration Schema",
53
- "description": "Configuration schema for the Eligius timeline engine",
54
- "required": [
55
- "id",
56
- "engine",
57
- "containerSelector",
58
- "cssFiles",
59
- "language",
60
- "layoutTemplate",
61
- "availableLanguages",
62
- "initActions",
63
- "actions",
64
- "timelines",
65
- "labels"
66
- ],
67
4
  "properties": {
68
5
  "id": {
69
- "$id": "#/properties/id",
70
6
  "type": "string",
71
- "title": "Id",
72
- "description": "Unique identifier for the configuration",
73
- "examples": ["123e4567-e89b-12d3-a456-426614174000"],
74
- "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
7
+ "description": "Unique identifier for the configuration (UUID format)"
75
8
  },
76
9
  "engine": {
77
- "$ref": "engine-config.json",
78
- "description": "Engine configuration"
10
+ "$ref": "#/definitions/IEngineInfo",
11
+ "description": "Engine identification info"
79
12
  },
80
13
  "timelineProviderSettings": {
81
- "$ref": "timeline-provider-settings.json",
14
+ "$ref": "#/definitions/TTimelineProviderSettings",
82
15
  "description": "Optional settings for timeline providers by type"
83
16
  },
84
17
  "containerSelector": {
85
- "$id": "#/properties/containerSelector",
86
18
  "type": "string",
87
- "title": "Container Selector",
88
- "description": "CSS selector for the main container element",
89
- "examples": ["#eligius-container"]
19
+ "description": "CSS selector for the main container element"
90
20
  },
91
21
  "cssFiles": {
92
- "$id": "#/properties/cssFiles",
93
22
  "type": "array",
94
- "title": "CSS Files",
95
- "description": "Array of CSS file paths to load",
96
23
  "items": {
97
24
  "type": "string"
98
25
  },
99
- "examples": [["styles/main.css", "styles/theme.css"]]
26
+ "description": "Array of CSS file paths to load"
100
27
  },
101
28
  "language": {
102
- "$id": "#/properties/language",
103
- "type": "string",
104
- "title": "Language",
105
- "description": "Default language code (IETF language tag)",
106
- "examples": ["en-US", "nl-NL"]
29
+ "$ref": "#/definitions/TLanguageCode",
30
+ "description": "Default language code (IETF language tag)"
107
31
  },
108
32
  "layoutTemplate": {
109
- "$id": "#/properties/layoutTemplate",
110
33
  "type": "string",
111
- "title": "Layout Template",
112
- "description": "HTML template for the layout, can be inline HTML or a template reference",
113
- "examples": ["template:layoutTemplate", "<div class=\"container\"></div>"]
34
+ "description": "HTML template for the layout (inline HTML or template reference)"
114
35
  },
115
36
  "availableLanguages": {
116
- "$id": "#/properties/availableLanguages",
117
37
  "type": "array",
118
- "title": "Available Languages",
119
- "description": "List of available languages for the application",
120
38
  "items": {
121
- "$ref": "#/definitions/label"
122
- }
39
+ "$ref": "#/definitions/ILabel"
40
+ },
41
+ "description": "List of available languages for the application"
123
42
  },
124
43
  "initActions": {
125
- "$id": "#/properties/initActions",
126
44
  "type": "array",
127
- "title": "Init Actions",
128
- "description": "Actions to execute during engine initialization",
129
45
  "items": {
130
- "$ref": "endable-action.json"
131
- }
46
+ "$ref": "#/definitions/IEndableActionConfiguration"
47
+ },
48
+ "description": "Actions to execute during engine initialization"
132
49
  },
133
50
  "actions": {
134
- "$id": "#/properties/actions",
135
51
  "type": "array",
136
- "title": "Actions",
137
- "description": "Reusable action templates",
138
52
  "items": {
139
- "$ref": "endable-action-template.json"
140
- }
53
+ "$ref": "#/definitions/IEndableActionConfiguration"
54
+ },
55
+ "description": "Reusable action templates"
141
56
  },
142
57
  "eventActions": {
143
- "$id": "#/properties/eventActions",
144
58
  "type": "array",
145
- "title": "Event Actions",
146
- "description": "Actions triggered by events",
147
59
  "items": {
148
- "$ref": "event-action.json"
149
- }
60
+ "$ref": "#/definitions/IEventActionConfiguration"
61
+ },
62
+ "description": "Optional actions triggered by events"
150
63
  },
151
64
  "timelines": {
152
- "$id": "#/properties/timelines",
153
65
  "type": "array",
154
- "title": "Timelines",
155
- "description": "Timeline configurations",
156
66
  "items": {
157
- "$ref": "timeline.json"
158
- }
67
+ "$ref": "#/definitions/ITimelineConfiguration"
68
+ },
69
+ "description": "Timeline configurations"
159
70
  },
160
71
  "timelineFlow": {
161
- "$id": "#/properties/timelineFlow",
162
- "type": "object",
163
- "title": "Timeline Flow",
72
+ "$ref": "#/definitions/ITimelineFlow",
164
73
  "description": "Optional timeline flow configuration for navigation between timelines"
165
74
  },
166
- "labels": {
167
- "$id": "#/properties/labels",
168
- "type": "array",
169
- "title": "Labels",
170
- "description": "Label collections for multi-language support",
171
- "items": {
172
- "$ref": "#/definitions/languageLabel"
75
+ "locales": {
76
+ "$ref": "#/definitions/ILocalesConfiguration",
77
+ "description": "Locale configuration for rosetta-based translations"
78
+ }
79
+ },
80
+ "required": [
81
+ "id",
82
+ "engine",
83
+ "containerSelector",
84
+ "cssFiles",
85
+ "language",
86
+ "layoutTemplate",
87
+ "availableLanguages",
88
+ "initActions",
89
+ "actions",
90
+ "timelines"
91
+ ],
92
+ "additionalProperties": false,
93
+ "description": "Root configuration for the Eligius timeline engine.\n\nThis is the main configuration object passed to `EngineFactory.createEngine()`. It defines all aspects of the engine: timelines, actions, language settings, and more.",
94
+ "example": "```typescript\nconst config: IEngineConfiguration = {\n id: '123e4567-e89b-12d3-a456-426614174000',\n engine: { systemName: 'EligiusEngine' },\n containerSelector: '#eligius-container',\n cssFiles: ['styles/main.css'],\n language: 'en-US',\n layoutTemplate: '<div class=\"container\"></div>',\n availableLanguages: [{ id: 'en', languageCode: 'en-US', label: 'English' }],\n initActions: [],\n actions: [],\n timelines: []\n};\n```",
95
+ "definitions": {
96
+ "IEngineInfo": {
97
+ "type": "object",
98
+ "properties": {
99
+ "systemName": {
100
+ "type": "string",
101
+ "description": "Name of the engine system to use"
102
+ }
103
+ },
104
+ "required": [
105
+ "systemName"
106
+ ],
107
+ "additionalProperties": false,
108
+ "description": "Engine identification information."
109
+ },
110
+ "TTimelineProviderSettings": {
111
+ "$ref": "#/definitions/Partial%3CRecord%3CTimelineTypes%2CITimelineProviderSettings%3E%3E",
112
+ "description": "Provider settings indexed by timeline type. Allows different configurations for 'animation' vs 'mediaplayer' timelines."
113
+ },
114
+ "Partial<Record<TimelineTypes,ITimelineProviderSettings>>": {
115
+ "type": "object",
116
+ "properties": {
117
+ "animation": {
118
+ "$ref": "#/definitions/ITimelineProviderSettings"
119
+ },
120
+ "mediaplayer": {
121
+ "$ref": "#/definitions/ITimelineProviderSettings"
122
+ }
123
+ },
124
+ "additionalProperties": false
125
+ },
126
+ "ITimelineProviderSettings": {
127
+ "type": "object",
128
+ "properties": {
129
+ "positionSource": {
130
+ "$ref": "#/definitions/IPositionSourceConfig",
131
+ "description": "Configuration for the position source"
132
+ },
133
+ "container": {
134
+ "$ref": "#/definitions/IContainerProviderConfig",
135
+ "description": "Optional container provider configuration"
136
+ },
137
+ "playlist": {
138
+ "$ref": "#/definitions/IPlaylistConfig",
139
+ "description": "Optional playlist configuration"
140
+ }
141
+ },
142
+ "required": [
143
+ "positionSource"
144
+ ],
145
+ "additionalProperties": false,
146
+ "description": "Settings for a timeline provider.\n\nTimeline providers are assembled from decomposed components:\n- Position source: drives timeline position (required)\n- Container provider: manages render container (optional)\n- Playlist: manages multi-item navigation (optional)\n\nAll components are resolved dynamically via the resource importer using the `systemName` property, allowing custom implementations.",
147
+ "example": "```typescript\nconst settings: ITimelineProviderSettings = {\n positionSource: { systemName: 'RafPositionSource', tickInterval: 1000 },\n container: { systemName: 'DomContainerProvider', selector: '#render-area' },\n};\n```"
148
+ },
149
+ "IPositionSourceConfig": {
150
+ "type": "object",
151
+ "properties": {
152
+ "systemName": {
153
+ "type": "string",
154
+ "description": "Name of the position source class to instantiate. Resolved via the resource importer.\n\nBuilt-in options: 'RafPositionSource', 'ScrollPositionSource', 'VideoPositionSource'"
155
+ },
156
+ "selector": {
157
+ "type": "string",
158
+ "description": "CSS selector for sources that need a DOM element (scroll, video)."
159
+ },
160
+ "tickInterval": {
161
+ "type": "number",
162
+ "description": "Interval between position updates in milliseconds (RAF sources).",
163
+ "default": 1000
164
+ },
165
+ "poster": {
166
+ "type": "string",
167
+ "description": "Optional poster image URL (video sources)."
168
+ }
169
+ },
170
+ "required": [
171
+ "systemName"
172
+ ],
173
+ "additionalProperties": {
174
+ "description": "Additional configuration options passed to the position source constructor. Use this for custom position source implementations."
175
+ },
176
+ "description": "Configuration for a position source.\n\nPosition sources drive timeline position. They are resolved dynamically via the resource importer using the `systemName` property.\n\nBuilt-in position sources:\n- `RafPositionSource`: RAF-based, drives timeline by elapsed time\n- `ScrollPositionSource`: Scroll-based, drives timeline by scroll position\n- `VideoPositionSource`: Video.js-based, drives timeline by video playback",
177
+ "example": "```typescript\n// RAF-based position source\nconst rafConfig: IPositionSourceConfig = {\n systemName: 'RafPositionSource',\n tickInterval: 1000,\n};\n\n// Scroll-based position source\nconst scrollConfig: IPositionSourceConfig = {\n systemName: 'ScrollPositionSource',\n selector: '.scroll-container',\n};\n\n// Video-based position source\nconst videoConfig: IPositionSourceConfig = {\n systemName: 'VideoPositionSource',\n selector: '#video-player',\n poster: '/poster.jpg',\n};\n```"
178
+ },
179
+ "IContainerProviderConfig": {
180
+ "type": "object",
181
+ "properties": {
182
+ "systemName": {
183
+ "type": "string",
184
+ "description": "Name of the container provider class to instantiate. Resolved via the resource importer.\n\nBuilt-in options: 'DomContainerProvider'"
185
+ },
186
+ "selector": {
187
+ "type": "string",
188
+ "description": "CSS selector for the container element"
189
+ }
190
+ },
191
+ "required": [
192
+ "systemName",
193
+ "selector"
194
+ ],
195
+ "additionalProperties": {
196
+ "description": "Additional configuration options passed to the container provider constructor. Use this for custom container provider implementations."
197
+ },
198
+ "description": "Configuration for a container provider.\n\nContainer providers manage DOM elements where timeline content is rendered. They are resolved dynamically via the resource importer using `systemName`.\n\nBuilt-in container providers:\n- `DomContainerProvider`: Manages a DOM element by selector",
199
+ "example": "```typescript\nconst config: IContainerProviderConfig = {\n systemName: 'DomContainerProvider',\n selector: '#render-area',\n};\n```"
200
+ },
201
+ "IPlaylistConfig": {
202
+ "type": "object",
203
+ "properties": {
204
+ "systemName": {
205
+ "type": "string",
206
+ "description": "Name of the playlist class to instantiate. Resolved via the resource importer.\n\nBuilt-in options: 'SimplePlaylist'"
207
+ },
208
+ "items": {
209
+ "type": "array",
210
+ "items": {},
211
+ "description": "The items in the playlist"
212
+ },
213
+ "identifierKey": {
214
+ "type": "string",
215
+ "description": "Property key used to identify items. Used when selecting items by identifier (e.g., 'uri', 'id', 'chapterId')."
216
+ }
217
+ },
218
+ "required": [
219
+ "systemName",
220
+ "items",
221
+ "identifierKey"
222
+ ],
223
+ "additionalProperties": {
224
+ "description": "Additional configuration options passed to the playlist constructor. Use this for custom playlist implementations."
225
+ },
226
+ "description": "Configuration for a playlist.\n\nPlaylists manage collections of items (e.g., video chapters) that can be selected and navigated. They are resolved dynamically via the resource importer using `systemName`.\n\nBuilt-in playlists:\n- `SimplePlaylist`: Basic playlist with array of items",
227
+ "example": "```typescript\nconst config: IPlaylistConfig = {\n systemName: 'SimplePlaylist',\n items: [{ uri: '/video1.mp4' }, { uri: '/video2.mp4' }],\n identifierKey: 'uri',\n};\n```"
228
+ },
229
+ "TLanguageCode": {
230
+ "type": "string",
231
+ "description": "IETF language tag format (e.g., 'en-US', 'nl-NL')"
232
+ },
233
+ "ILabel": {
234
+ "type": "object",
235
+ "properties": {
236
+ "id": {
237
+ "type": "string"
238
+ },
239
+ "languageCode": {
240
+ "$ref": "#/definitions/TLanguageCode"
241
+ },
242
+ "label": {
243
+ "type": "string"
244
+ }
245
+ },
246
+ "required": [
247
+ "id",
248
+ "languageCode",
249
+ "label"
250
+ ],
251
+ "additionalProperties": false,
252
+ "description": "Represents a language option for the available languages list. Used for UI elements like language selection dropdowns."
253
+ },
254
+ "IEndableActionConfiguration": {
255
+ "type": "object",
256
+ "properties": {
257
+ "id": {
258
+ "type": "string",
259
+ "description": "Unique identifier for the action"
260
+ },
261
+ "name": {
262
+ "type": "string",
263
+ "description": "Human-readable name for the action"
264
+ },
265
+ "startOperations": {
266
+ "type": "array",
267
+ "items": {
268
+ "$ref": "#/definitions/IOperationConfiguration%3CTOperationData%3E"
269
+ },
270
+ "description": "Operations to execute when the action starts"
271
+ },
272
+ "endOperations": {
273
+ "type": "array",
274
+ "items": {
275
+ "$ref": "#/definitions/IOperationConfiguration%3CTOperationData%3E"
276
+ },
277
+ "description": "Operations to execute when the action ends"
278
+ }
279
+ },
280
+ "required": [
281
+ "endOperations",
282
+ "id",
283
+ "name",
284
+ "startOperations"
285
+ ],
286
+ "additionalProperties": false,
287
+ "description": "Configuration for an action that has both start and end operations.\n\nEndable actions execute startOperations when triggered and endOperations when completed or reversed."
288
+ },
289
+ "IOperationConfiguration<TOperationData>": {
290
+ "description": "An operation configuration. The systemName determines which operation type is used.",
291
+ "oneOf": [
292
+ {
293
+ "$ref": "operations/add-class.json"
294
+ },
295
+ {
296
+ "$ref": "operations/add-controller-to-element.json"
297
+ },
298
+ {
299
+ "$ref": "operations/animate-with-class.json"
300
+ },
301
+ {
302
+ "$ref": "operations/animate.json"
303
+ },
304
+ {
305
+ "$ref": "operations/announce-to-screen-reader.json"
306
+ },
307
+ {
308
+ "$ref": "operations/broadcast-event.json"
309
+ },
310
+ {
311
+ "$ref": "operations/calc.json"
312
+ },
313
+ {
314
+ "$ref": "operations/clear-element.json"
315
+ },
316
+ {
317
+ "$ref": "operations/clear-operation-data.json"
318
+ },
319
+ {
320
+ "$ref": "operations/compare-date.json"
321
+ },
322
+ {
323
+ "$ref": "operations/concatenate-strings.json"
324
+ },
325
+ {
326
+ "$ref": "operations/create-element.json"
327
+ },
328
+ {
329
+ "$ref": "operations/custom-function.json"
330
+ },
331
+ {
332
+ "$ref": "operations/end-action.json"
333
+ },
334
+ {
335
+ "$ref": "operations/extend-controller.json"
336
+ },
337
+ {
338
+ "$ref": "operations/filter-array.json"
339
+ },
340
+ {
341
+ "$ref": "operations/find-in-array.json"
342
+ },
343
+ {
344
+ "$ref": "operations/for-each.json"
345
+ },
346
+ {
347
+ "$ref": "operations/format-date.json"
348
+ },
349
+ {
350
+ "$ref": "operations/format-text.json"
351
+ },
352
+ {
353
+ "$ref": "operations/get-attributes-from-element.json"
354
+ },
355
+ {
356
+ "$ref": "operations/get-controller-from-element.json"
357
+ },
358
+ {
359
+ "$ref": "operations/get-controller-instance.json"
360
+ },
361
+ {
362
+ "$ref": "operations/get-current-time.json"
363
+ },
364
+ {
365
+ "$ref": "operations/get-element-dimensions.json"
366
+ },
367
+ {
368
+ "$ref": "operations/get-focused-element.json"
369
+ },
370
+ {
371
+ "$ref": "operations/get-form-data.json"
372
+ },
373
+ {
374
+ "$ref": "operations/get-import.json"
375
+ },
376
+ {
377
+ "$ref": "operations/get-query-params.json"
378
+ },
379
+ {
380
+ "$ref": "operations/get-scroll-position.json"
381
+ },
382
+ {
383
+ "$ref": "operations/get-text-content.json"
384
+ },
385
+ {
386
+ "$ref": "operations/http-delete.json"
387
+ },
388
+ {
389
+ "$ref": "operations/http-post.json"
390
+ },
391
+ {
392
+ "$ref": "operations/http-put.json"
393
+ },
394
+ {
395
+ "$ref": "operations/invoke-object-method.json"
396
+ },
397
+ {
398
+ "$ref": "operations/is-element-in-viewport.json"
399
+ },
400
+ {
401
+ "$ref": "operations/load-from-storage.json"
402
+ },
403
+ {
404
+ "$ref": "operations/load-json.json"
405
+ },
406
+ {
407
+ "$ref": "operations/log.json"
408
+ },
409
+ {
410
+ "$ref": "operations/map-array.json"
411
+ },
412
+ {
413
+ "$ref": "operations/math.json"
414
+ },
415
+ {
416
+ "$ref": "operations/remove-class.json"
417
+ },
418
+ {
419
+ "$ref": "operations/remove-controller-from-element.json"
420
+ },
421
+ {
422
+ "$ref": "operations/remove-element.json"
423
+ },
424
+ {
425
+ "$ref": "operations/remove-properties-from-operation-data.json"
426
+ },
427
+ {
428
+ "$ref": "operations/reparent-element.json"
429
+ },
430
+ {
431
+ "$ref": "operations/replace-string.json"
432
+ },
433
+ {
434
+ "$ref": "operations/replace-text.json"
435
+ },
436
+ {
437
+ "$ref": "operations/request-action.json"
438
+ },
439
+ {
440
+ "$ref": "operations/save-to-storage.json"
441
+ },
442
+ {
443
+ "$ref": "operations/scroll-to-element.json"
444
+ },
445
+ {
446
+ "$ref": "operations/scroll-to-position.json"
447
+ },
448
+ {
449
+ "$ref": "operations/select-element.json"
450
+ },
451
+ {
452
+ "$ref": "operations/set-data.json"
453
+ },
454
+ {
455
+ "$ref": "operations/set-element-attributes.json"
456
+ },
457
+ {
458
+ "$ref": "operations/set-element-content.json"
459
+ },
460
+ {
461
+ "$ref": "operations/set-focus.json"
462
+ },
463
+ {
464
+ "$ref": "operations/set-form-value.json"
465
+ },
466
+ {
467
+ "$ref": "operations/set-global-data.json"
468
+ },
469
+ {
470
+ "$ref": "operations/set-style.json"
471
+ },
472
+ {
473
+ "$ref": "operations/set-variable.json"
474
+ },
475
+ {
476
+ "$ref": "operations/set.json"
477
+ },
478
+ {
479
+ "$ref": "operations/sort-array.json"
480
+ },
481
+ {
482
+ "$ref": "operations/split-string.json"
483
+ },
484
+ {
485
+ "$ref": "operations/start-action.json"
486
+ },
487
+ {
488
+ "$ref": "operations/substring-text.json"
489
+ },
490
+ {
491
+ "$ref": "operations/toggle-class.json"
492
+ },
493
+ {
494
+ "$ref": "operations/toggle-element.json"
495
+ },
496
+ {
497
+ "$ref": "operations/toggle-form-element.json"
498
+ },
499
+ {
500
+ "$ref": "operations/validate-form.json"
501
+ },
502
+ {
503
+ "$ref": "operations/wait.json"
504
+ },
505
+ {
506
+ "$ref": "operations/when.json"
507
+ }
508
+ ]
509
+ },
510
+ "TOperationData": {
511
+ "$ref": "#/definitions/Record%3Cstring%2Cany%3E"
512
+ },
513
+ "Record<string,any>": {
514
+ "type": "object"
515
+ },
516
+ "IEventActionConfiguration": {
517
+ "type": "object",
518
+ "properties": {
519
+ "id": {
520
+ "type": "string",
521
+ "description": "Unique identifier for the action"
522
+ },
523
+ "name": {
524
+ "type": "string",
525
+ "description": "Human-readable name for the action"
526
+ },
527
+ "startOperations": {
528
+ "type": "array",
529
+ "items": {
530
+ "$ref": "#/definitions/IOperationConfiguration%3CTOperationData%3E"
531
+ },
532
+ "description": "Operations to execute when the action starts"
533
+ },
534
+ "eventName": {
535
+ "type": "string",
536
+ "description": "Name of the event that triggers this action"
537
+ },
538
+ "eventTopic": {
539
+ "type": "string",
540
+ "description": "Optional event topic for filtering (defaults to global topic)"
541
+ }
542
+ },
543
+ "required": [
544
+ "eventName",
545
+ "id",
546
+ "name",
547
+ "startOperations"
548
+ ],
549
+ "additionalProperties": false,
550
+ "description": "Configuration for an event-triggered action.\n\nEvent actions execute in response to eventbus events."
551
+ },
552
+ "ITimelineConfiguration": {
553
+ "type": "object",
554
+ "properties": {
555
+ "id": {
556
+ "type": "string",
557
+ "description": "Unique identifier for the timeline"
558
+ },
559
+ "uri": {
560
+ "type": "string",
561
+ "description": "URI for timeline identification and switching"
562
+ },
563
+ "type": {
564
+ "$ref": "#/definitions/TimelineTypes",
565
+ "description": "Timeline type: 'animation' (RAF-based) or 'mediaplayer' (video-based)"
566
+ },
567
+ "duration": {
568
+ "type": "number",
569
+ "description": "Duration in seconds"
570
+ },
571
+ "loop": {
572
+ "type": "boolean",
573
+ "description": "Whether the timeline should loop when complete"
574
+ },
575
+ "selector": {
576
+ "type": "string",
577
+ "description": "CSS selector for the timeline's target element"
578
+ },
579
+ "timelineActions": {
580
+ "type": "array",
581
+ "items": {
582
+ "$ref": "#/definitions/ITimelineActionConfiguration"
583
+ },
584
+ "description": "Actions to execute at specific timeline positions"
585
+ },
586
+ "container": {
587
+ "type": "string",
588
+ "description": "Optional container selector for the timeline. Defaults to the timeline selector if not specified. Used by position sources that don't have an intrinsic container."
589
+ }
590
+ },
591
+ "required": [
592
+ "id",
593
+ "uri",
594
+ "type",
595
+ "duration",
596
+ "loop",
597
+ "selector",
598
+ "timelineActions"
599
+ ],
600
+ "additionalProperties": false,
601
+ "description": "Configuration for a single timeline.\n\nA timeline represents a time-based sequence of actions that can be played, paused, and seeked. Multiple timelines can exist in a configuration.",
602
+ "example": "```typescript\nconst timeline: ITimelineConfiguration = {\n id: 'main-timeline',\n uri: 'timeline://main',\n type: 'animation',\n duration: 60,\n loop: false,\n selector: '#timeline-container',\n timelineActions: []\n};\n```"
603
+ },
604
+ "TimelineTypes": {
605
+ "type": "string",
606
+ "enum": [
607
+ "animation",
608
+ "mediaplayer"
609
+ ],
610
+ "description": "Describes the different kinds of timeline providers."
611
+ },
612
+ "ITimelineActionConfiguration": {
613
+ "type": "object",
614
+ "properties": {
615
+ "id": {
616
+ "type": "string",
617
+ "description": "Unique identifier for the action"
618
+ },
619
+ "name": {
620
+ "type": "string",
621
+ "description": "Human-readable name for the action"
622
+ },
623
+ "startOperations": {
624
+ "type": "array",
625
+ "items": {
626
+ "$ref": "#/definitions/IOperationConfiguration%3CTOperationData%3E"
627
+ },
628
+ "description": "Operations to execute when the action starts"
629
+ },
630
+ "endOperations": {
631
+ "type": "array",
632
+ "items": {
633
+ "$ref": "#/definitions/IOperationConfiguration%3CTOperationData%3E"
634
+ },
635
+ "description": "Operations to execute when the action ends"
636
+ },
637
+ "duration": {
638
+ "$ref": "#/definitions/IDuration",
639
+ "description": "Time range when this action is active (start/end in seconds)"
640
+ }
641
+ },
642
+ "required": [
643
+ "duration",
644
+ "endOperations",
645
+ "id",
646
+ "name",
647
+ "startOperations"
648
+ ],
649
+ "additionalProperties": false,
650
+ "description": "Configuration for a timeline-bound action with duration.\n\nTimeline actions execute at specific time ranges within a timeline."
651
+ },
652
+ "IDuration": {
653
+ "type": "object",
654
+ "properties": {
655
+ "start": {
656
+ "type": "number"
657
+ },
658
+ "end": {
659
+ "type": "number"
660
+ }
661
+ },
662
+ "required": [
663
+ "start"
664
+ ],
665
+ "additionalProperties": false,
666
+ "description": "Describes a duration of time expressed in a start and an optional end range with a one second interval."
667
+ },
668
+ "ITimelineFlow": {
669
+ "$ref": "#/definitions/Record%3Cstring%2Cnever%3E",
670
+ "description": "Configuration for timeline flow navigation.\n\nDefines how timelines connect and transition between each other. Currently a placeholder type for future implementation."
671
+ },
672
+ "Record<string,never>": {
673
+ "type": "object",
674
+ "additionalProperties": {
675
+ "not": {}
173
676
  }
677
+ },
678
+ "ILocalesConfiguration": {
679
+ "type": "object",
680
+ "additionalProperties": {
681
+ "$ref": "#/definitions/TLocaleEntry"
682
+ },
683
+ "description": "Top-level configuration object for all locales. Keys are language codes, values are inline data or external references."
684
+ },
685
+ "TLocaleEntry": {
686
+ "anyOf": [
687
+ {
688
+ "$ref": "#/definitions/TLocaleData"
689
+ },
690
+ {
691
+ "$ref": "#/definitions/ILocaleReference"
692
+ }
693
+ ],
694
+ "description": "A single locale entry can be inline data or an external reference."
695
+ },
696
+ "TLocaleData": {
697
+ "type": "object",
698
+ "additionalProperties": {
699
+ "anyOf": [
700
+ {
701
+ "type": "string"
702
+ },
703
+ {
704
+ "$comment": "(params: Record<string, unknown>) => string",
705
+ "type": "object",
706
+ "properties": {
707
+ "namedArgs": {
708
+ "type": "object",
709
+ "properties": {
710
+ "params": {
711
+ "$ref": "#/definitions/Record%3Cstring%2Cunknown%3E"
712
+ }
713
+ },
714
+ "required": [
715
+ "params"
716
+ ],
717
+ "additionalProperties": false
718
+ }
719
+ }
720
+ },
721
+ {
722
+ "$ref": "#/definitions/TLocaleData"
723
+ }
724
+ ]
725
+ },
726
+ "description": "Recursive interface for nested translation data. Compatible with rosetta's expected format. Uses interface to support recursive definition."
727
+ },
728
+ "Record<string,unknown>": {
729
+ "type": "object",
730
+ "additionalProperties": {}
731
+ },
732
+ "ILocaleReference": {
733
+ "type": "object",
734
+ "properties": {
735
+ "$ref": {
736
+ "type": "string",
737
+ "description": "URL or relative path to JSON locale file"
738
+ }
739
+ },
740
+ "required": [
741
+ "$ref"
742
+ ],
743
+ "additionalProperties": false,
744
+ "description": "External locale file reference using JSON Reference syntax. The loader resolves these to TLocaleData at initialization."
174
745
  }
175
- }
176
- }
746
+ },
747
+ "$id": "https://rolandzwaga.github.io/eligius/jsonschema/eligius-configuration.json",
748
+ "title": "Eligius Configuration Schema"
749
+ }