@digo-org/digo-api 1.0.39 → 1.0.41

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/README.md CHANGED
@@ -44,13 +44,13 @@ export class MyVisualization extends DigoAsset {
44
44
  - [`DigoAsset`](src/digo-asset.ts) - Base class for visualization assets
45
45
 
46
46
  ### Data Definition
47
- - [`DataAssetDefinition`](src/types-data.ts) - Structure for tabular data
47
+ - [`DataTableDefinition`](src/types-data.ts) - Structure for tabular data
48
48
  - [`Row`](src/types-data.ts), [`Column`](src/types-data.ts) - Data components
49
49
 
50
50
  ### Visualization Definition
51
51
  - [`VizAssetDefinition`](src/types-viz.ts) - Visualization configuration
52
52
  - [`Instance`](src/types-viz.ts) - Individual visualization instances
53
- - [`VizAssetFiles`](src/types-viz-files.ts) - File structure for viz assets
53
+ - [`CodeFiles`](src/types-code.ts) - File structure for viz assets
54
54
 
55
55
  ### Parameters
56
56
  - [`ParameterType`](src/types-common.ts) - Available parameter types
@@ -60,9 +60,6 @@ export class MyVisualization extends DigoAsset {
60
60
  ### Constants
61
61
  - [`API_MESSAGES`](src/constants.ts) - Message types for asset communication
62
62
 
63
- ### Examples
64
- - [`DATA_ASSET_DEFINITION_EXAMPLES`](src/examples/data-examples.ts) - Sample data structures
65
-
66
63
  > **Note**: Types in [`types-misc.ts`](src/types-misc.ts) and [`types-llm.ts`](src/types-llm.ts) are internal implementation details and not intended for public use.
67
64
 
68
65
  ## Development
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.39",
4
+ "version": "1.0.41",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
7
7
  "types": "src/index.ts",
package/src/index.ts CHANGED
@@ -8,10 +8,8 @@ export * from '@digo-org/digo-api/src/types-llm';
8
8
 
9
9
  export * from '@digo-org/digo-api/src/types-viz';
10
10
 
11
- export * from '@digo-org/digo-api/src/types-viz-files';
11
+ export * from '@digo-org/digo-api/src/types-code';
12
12
 
13
13
  export * from '@digo-org/digo-api/src/constants';
14
14
 
15
15
  export * from '@digo-org/digo-api/src/digo-asset';
16
-
17
- export * from '@digo-org/digo-api/src/examples/data-examples';
@@ -6,4 +6,4 @@ export interface VizParameter extends Parameter {
6
6
  isGlobal: boolean;
7
7
  }
8
8
 
9
- export type VizAssetFiles = Record<string, string>;
9
+ export type CodeFiles = Record<string, string>;
@@ -18,13 +18,14 @@ export interface Parameter {
18
18
  export type ParameterDefinition = ParameterNumber | ParameterBoolean | ParameterColor | ParameterText | ParameterGradient;
19
19
 
20
20
  export interface ParameterNumber {
21
- defaultValue: number;
22
- min?: number;
23
- max?: number;
24
- icon?: string;
25
- decimals?: number;
26
- step?: number;
27
- units?: string;
21
+ defaultValue: number;
22
+ min?: number;
23
+ max?: number;
24
+ icon?: string;
25
+ decimals?: number;
26
+ step?: number;
27
+ units?: string;
28
+ isScrollable?: boolean;
28
29
  };
29
30
 
30
31
  export interface ParameterGradient {
package/src/types-data.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Parameter, ParameterValue } from '@digo-org/digo-api';
2
2
 
3
- export interface DataAssetDefinition {
3
+ export interface DataTableDefinition {
4
4
  timeArray: string[];
5
5
  columns: Column[];
6
6
  rows: Row[];
package/src/types-llm.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { CommonMetadata, DataAssetDefinition, Links, VizAssetDefinition, VizAssetFiles } from '@digo-org/digo-api';
1
+ import { CommonMetadata, DataTableDefinition, Links, VizAssetDefinition, CodeFiles } from '@digo-org/digo-api';
2
2
 
3
3
  export type Artifacts = Partial<Record<ArtifactType, ArtifactValue>> & CommonMetadata;
4
4
 
@@ -10,7 +10,7 @@ export enum ArtifactType {
10
10
  PROJECT_DEFINITION = 'PROJECT_DEFINITION',
11
11
  }
12
12
 
13
- export type ArtifactValue = DataAssetDefinition | VizAssetFiles | VizAssetDefinition | Links;
13
+ export type ArtifactValue = DataTableDefinition | CodeFiles | VizAssetDefinition | Links;
14
14
 
15
15
  export interface MessagePart {
16
16
  type: MessageType;
package/src/types-misc.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ArtifactType, ArtifactValue, DataAssetDefinition, Instance, MessagePart, ParameterDefinition, ParameterValueArray, VizAssetDefinition, VizAssetFiles } from '@digo-org/digo-api';
1
+ import { ArtifactType, ArtifactValue, DataTableDefinition, Instance, MessagePart, ParameterDefinition, ParameterValueArray, VizAssetDefinition, CodeFiles } from '@digo-org/digo-api';
2
2
 
3
3
  export type Links = Record<string, string>; /* parameter-id -> column-id */
4
4
 
@@ -10,9 +10,9 @@ export interface CommonMetadata {
10
10
  }
11
11
 
12
12
  export interface ProjectDefinition {
13
- dataAssetDefinition: DataAssetDefinition;
13
+ dataTableDefinition: DataTableDefinition;
14
14
  vizAssetDefinition: VizAssetDefinition;
15
- vizAssetFiles: VizAssetFiles;
15
+ codeFiles: CodeFiles;
16
16
  links: Links;
17
17
  }
18
18
 
@@ -1,74 +0,0 @@
1
- import { DataAssetDefinition, ParameterType } from '@digo-org/digo-api';
2
-
3
- export const DATA_ASSET_DEFINITION_EXAMPLES: DataAssetDefinition[] = [
4
- {
5
- rows: [
6
- {
7
- 'id': 'row-1',
8
- 'name': 'Iphone',
9
- 'hidden': false,
10
- 'color-1': '#41c968',
11
- 'number-1': 10,
12
- 'number-2': 2000,
13
- },
14
- {
15
- 'id': 'row-2',
16
- 'name': 'Mac',
17
- 'hidden': false,
18
- 'color-1': '#536fa6',
19
- 'number-1': 20,
20
- 'number-2': 2010,
21
- },
22
- {
23
- 'id': 'row-3',
24
- 'name': 'Watch',
25
- 'hidden': false,
26
- 'color-1': '#a6ba62',
27
- 'number-1': 40,
28
- 'number-2': 2020,
29
- },
30
- {
31
- 'id': 'row-4',
32
- 'name': 'Vision Pro',
33
- 'hidden': false,
34
- 'color-1': '#e75a5a',
35
- 'number-1': 30,
36
- 'number-2': 2025,
37
- },
38
- ],
39
- columns: [
40
- {
41
- id: 'number-1',
42
- name: 'Market Share (%)',
43
- type: ParameterType.NUMBER,
44
- isArray: false,
45
- definition: {
46
- max: 100,
47
- min: 0,
48
- defaultValue: 0,
49
- },
50
- },
51
- {
52
- id: 'color-1',
53
- name: 'Color',
54
- type: ParameterType.COLOR,
55
- isArray: false,
56
- definition: {
57
- defaultValue: '#FFFFFF',
58
- },
59
- },
60
- {
61
- id: 'number-2',
62
- name: 'Year',
63
- type: ParameterType.NUMBER,
64
- isArray: false,
65
- definition: {
66
- max: 2025,
67
- min: 2000,
68
- defaultValue: 0,
69
- },
70
- },
71
- ],
72
- timeArray: [],
73
- },
74
- ];