@digo-org/digo-api 1.0.44 → 1.0.45

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@digo-org/digo-api",
3
3
  "private": false,
4
- "version": "1.0.44",
4
+ "version": "1.0.45",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
7
7
  "types": "src/index.ts",
package/src/constants.ts CHANGED
@@ -2,4 +2,5 @@ export const API_MESSAGES = {
2
2
  setParameter: 'SET_PARAMETER',
3
3
  updateInstances: 'UPDATE_INSTANCES',
4
4
  updateDefinition: 'UPDATE_DEFINITION',
5
+ updateTimeArray: 'UPDATE_TIME_ARRAY',
5
6
  };
package/src/digo-asset.ts CHANGED
@@ -4,6 +4,7 @@ import { ReactNode } from 'react';
4
4
 
5
5
  export abstract class DigoAsset {
6
6
  protected rootElement: any = null;
7
+ protected timeArray: string[] = [];
7
8
  protected instances: Instance[] = [];
8
9
  protected globalParameters: GlobalParameters = {};
9
10
 
@@ -39,6 +40,9 @@ export abstract class DigoAsset {
39
40
  this.instances = (message.definition as VizAssetDefinition).instances.filter(instance => instance.id !== MASTER_INSTANCE.id);
40
41
  this.globalParameters = (message.definition as VizAssetDefinition).globalParameters;
41
42
  break;
43
+ case API_MESSAGES.updateTimeArray:
44
+ this.timeArray = (message.definition ? message.definition as string[] : []);
45
+ break;
42
46
  }
43
47
 
44
48
  this.updateUI();
package/src/types-code.ts CHANGED
@@ -4,6 +4,7 @@ export interface VizParameter extends Parameter {
4
4
  id: string;
5
5
  name: string;
6
6
  isGlobal: boolean;
7
+ isArray?: boolean;
7
8
  }
8
9
 
9
10
  export type CodeFiles = Record<string, string>;
package/src/types-misc.ts CHANGED
@@ -14,6 +14,17 @@ export interface ProjectDefinition {
14
14
  vizAssetDefinition: VizAssetDefinition;
15
15
  codeFiles: CodeFiles;
16
16
  links: Links;
17
+ player: PlayerDefinition;
18
+ }
19
+
20
+ export interface PlayerDefinition {
21
+ isOpen: boolean;
22
+ isPlaying: boolean;
23
+ isLooping: boolean;
24
+ currentIndex: number;
25
+ stepDuration: number;
26
+ minIndex?: number;
27
+ maxIndex?: number;
17
28
  }
18
29
 
19
30
  export interface ParameterTypeDefinition {