eligius 1.1.0 → 1.1.2

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.
@@ -0,0 +1,20 @@
1
+ /// <reference types="jquery" />
2
+ import { TOperation } from './types';
3
+ export interface IGetAttributesFromElementOperationData {
4
+ /**
5
+ * The HTML element whose attributes will be retrieved
6
+ */
7
+ selectedElement?: JQuery;
8
+ /**
9
+ * The specified attribute names that will be retrieved
10
+ */
11
+ attributeNames: string[];
12
+ /**
13
+ * The retrieved attributes
14
+ */
15
+ attributeValues?: Record<string, any>;
16
+ }
17
+ /**
18
+ * This operation retrieves the values for the specified attribute names from the given selected element.
19
+ */
20
+ export declare const getAttributesFromElement: TOperation<IGetAttributesFromElementOperationData>;
@@ -1,3 +1,4 @@
1
- export declare const getGlobals: (name?: string) => Record<string, any> | any;
2
- export declare const setGlobals: (newValues: Record<string, any>) => void;
1
+ export declare type TGlobalCache = Record<string, any>;
2
+ export declare const getGlobals: (name?: string) => TGlobalCache | any;
3
+ export declare const setGlobals: (newValues: TGlobalCache) => void;
3
4
  export declare const clearGlobals: () => void;
@@ -12,6 +12,7 @@ export { endAction } from './end-action';
12
12
  export { endLoop } from './end-loop';
13
13
  export { endWhen } from './end-when';
14
14
  export { extendController } from './extend-controller';
15
+ export { getAttributesFromElement } from './get-attributes-from-element';
15
16
  export { getControllerFromElement } from './get-controller-from-element';
16
17
  export { getControllerInstance } from './get-controller-instance';
17
18
  export { getElementDimensions } from './get-element-dimensions';
@@ -30,6 +31,7 @@ export { reparentElement } from './reparent-element';
30
31
  export { requestAction } from './request-action';
31
32
  export { resizeAction } from './resize-action';
32
33
  export { selectElement } from './select-element';
34
+ export { setData } from './set-data';
33
35
  export { setElementAttributes } from './set-element-attributes';
34
36
  export { setElementContent } from './set-element-content';
35
37
  export { setGlobalData } from './set-global-data';
@@ -1,6 +1,6 @@
1
1
  import { TOperation, TOperationData } from './types';
2
2
  /**
3
- * This operation logs the current operation data and context to the console.
3
+ * This operation logs the current operation data, global data and context to the console.
4
4
  *
5
5
  * @param operationData
6
6
  * @returns
@@ -0,0 +1,4 @@
1
+ import { IGetAttributesFromElementOperationData } from '../get-attributes-from-element';
2
+ import { IOperationMetadata } from './types';
3
+ declare function getAttributesFromElement(): IOperationMetadata<IGetAttributesFromElementOperationData>;
4
+ export default getAttributesFromElement;
@@ -12,6 +12,7 @@ export { default as endAction } from './end-action';
12
12
  export { default as endLoop } from './end-loop';
13
13
  export { default as endWhen } from './end-when';
14
14
  export { default as extendController } from './extend-controller';
15
+ export { default as getAttributesFromElement } from './get-attributes-from-element';
15
16
  export { default as getControllerFromElement } from './get-controller-from-element';
16
17
  export { default as getControllerInstance } from './get-controller-instance';
17
18
  export { default as getElementDimensions } from './get-element-dimensions';
@@ -30,6 +31,7 @@ export { default as reparentElement } from './reparent-element';
30
31
  export { default as requestAction } from './request-action';
31
32
  export { default as resizeAction } from './resize-action';
32
33
  export { default as selectElement } from './select-element';
34
+ export { default as setData } from './set-data';
33
35
  export { default as setElementAttributes } from './set-element-attributes';
34
36
  export { default as setElementContent } from './set-element-content';
35
37
  export { default as setGlobalData } from './set-global-data';
@@ -0,0 +1,4 @@
1
+ import { ISetDataOperationData } from '../set-data';
2
+ import { IOperationMetadata } from './types';
3
+ declare function setData(): IOperationMetadata<ISetDataOperationData>;
4
+ export default setData;
@@ -0,0 +1,21 @@
1
+ import { TOperation } from './types';
2
+ export declare type TDataTarget = `context.${string}` | `operationdata.${string}` | `globaldata.${string}`;
3
+ export interface ISetDataOperationData {
4
+ properties: Record<TDataTarget, any>;
5
+ }
6
+ /**
7
+ * This operation assigns the specified properties to the specified data targets.
8
+ *
9
+ * @example The various ways of assigning data
10
+ * ```ts
11
+ * setData({
12
+ * 'operationdata.foo': 'context.currentItem', // context.currentItem will be assigned to operationdata.foo
13
+ * 'globaldata.foo': 'context.currentItem', // context.currentItem will be assigned to globaldata.foo
14
+ * 'context.newIndex': 100, // The constant 100 will be assigned to context.newIndex
15
+ * })
16
+ * ```
17
+ *
18
+ * @param operationData
19
+ * @returns
20
+ */
21
+ export declare const setData: TOperation<ISetDataOperationData>;
@@ -74,8 +74,6 @@ export declare class TimelineEventNames {
74
74
  static REQUEST_ENGINE_ROOT: string;
75
75
  static REQUEST_CURRENT_TIMELINE_POSITION: string;
76
76
  static REQUEST_TIMELINE_CLEANUP: string;
77
- static EXECUTE_TIMELINEACTION: string;
78
- static RESIZE_TIMELINEACTION: string;
79
77
  static REQUEST_LABEL_COLLECTION: string;
80
78
  static REQUEST_LABEL_COLLECTIONS: string;
81
79
  static REQUEST_CURRENT_LANGUAGE: string;
package/dist/types.d.ts CHANGED
@@ -91,3 +91,12 @@ export interface IDimensions {
91
91
  width: number;
92
92
  height: number;
93
93
  }
94
+ export interface ISubtitleCollection {
95
+ languageCode: string;
96
+ titles: ISubtitle[];
97
+ }
98
+ export interface ISubtitle {
99
+ id: string;
100
+ duration: IStrictDuration;
101
+ text: string;
102
+ }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.0",
2
+ "version": "1.1.2",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "homepage": "https://rolandzwaga.github.io/eligius/",
@@ -12,7 +12,7 @@
12
12
  "dist"
13
13
  ],
14
14
  "engines": {
15
- "node": ">=10"
15
+ "node": ">=16"
16
16
  },
17
17
  "scripts": {
18
18
  "typecheck": "tsc --noEmit",