@digo-org/digo-api 1.0.42 → 1.0.44

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.42",
4
+ "version": "1.0.44",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
7
7
  "types": "src/index.ts",
package/src/digo-asset.ts CHANGED
@@ -11,7 +11,6 @@ export abstract class DigoAsset {
11
11
  this.handleMessage = this.handleMessage.bind(this);
12
12
 
13
13
  window.addEventListener('message', this.handleMessage);
14
- console.log('using latest');
15
14
  }
16
15
 
17
16
  public dispose(): void {
@@ -1,5 +1,5 @@
1
1
  {
2
- "DATA_ASSET_DEFINITION": {
2
+ "DATA_TABLE_DEFINITION": {
3
3
  "timeArray": [],
4
4
  "columns": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "DATA_ASSET_DEFINITION": {
2
+ "DATA_TABLE_DEFINITION": {
3
3
  "timeArray": [],
4
4
  "columns": [
5
5
  {
@@ -81,7 +81,7 @@
81
81
  "bar-color": "color-1",
82
82
  "bar-value": "number-1"
83
83
  },
84
- "VIZ_ASSET_FILES": {
84
+ "CODE_FILES": {
85
85
  "/asset.tsx": "import { DigoAsset } from '@digo-org/digo-api';\n\nimport { ResponsiveContainer, Cell, BarChart, CartesianGrid, XAxis, YAxis, Legend, Bar, Rectangle, Tooltip } from 'recharts';\n\nexport class Asset extends DigoAsset {\n constructor() {\n super();\n }\n\n override render() {\n return (\n <ResponsiveContainer width=\"100%\" height=\"100%\" key=\"responsive-container\">\n <BarChart\n data={this.instances}\n layout=\"horizontal\"\n margin={{\n top: 120,\n right: 60,\n left: 40,\n bottom: 120,\n }}\n style={{ backgroundColor: this.globalParameters['bg-color'] as string }}\n\n >\n <CartesianGrid strokeDasharray=\"3 3\" />\n\n <XAxis dataKey=\"id\" />\n\n <YAxis />\n\n <Legend />\n\n <Tooltip />\n\n <Bar\n dataKey=\"bar-value\"\n fill=\"#ff\"\n animationEasing=\"ease-in-out\"\n animationDuration={200}\n activeBar={<Rectangle fill=\"pink\" stroke=\"blue\" />}\n >\n {this.instances?.map((instance, index) => {\n const color = instance['bar-color'];\n return <Cell key={`cell-${index}`} fill={color as string} />;\n })}\n </Bar>\n\n </BarChart>\n </ResponsiveContainer>\n );\n }\n}\n",
86
86
  "/styles.css": "body {\n font-family: sans-serif;\n -webkit-font-smoothing: auto;\n -moz-font-smoothing: auto;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n font-smooth: always;\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n}\n\n.root {\n height: 100vh;\n background-color: 'red';\n display: grid;\n}",
87
87
  "/package.json": "{\n \"dependencies\": {\n \"react\": \"^19.0.0\",\n \"react-dom\": \"^19.0.0\",\n \"react-scripts\": \"^5.0.0\",\n \"@digo-org/digo-api\": \"1.0.28\",\n \"@react-three/drei\": \"^10.0.6\",\n \"@react-three/fiber\": \"^9.1.2\",\n \"recharts\": \"^2.15.1\"\n },\n \"main\": \"/index.tsx\",\n \"devDependencies\": {}\n}",
@@ -1,5 +1,5 @@
1
1
  {
2
- "VIZ_ASSET_FILES": {
2
+ "CODE_FILES": {
3
3
  "/asset.tsx": "import { DigoAsset } from '@digo-org/digo-api';\n\nimport { ResponsiveContainer, Cell, BarChart, CartesianGrid, XAxis, YAxis, Legend, Bar, Rectangle, Tooltip } from 'recharts';\n\nexport class Asset extends DigoAsset {\n constructor() {\n super();\n }\n\n override render() {\n return (\n <ResponsiveContainer width=\"100%\" height=\"100%\" key=\"responsive-container\">\n <BarChart\n data={this.instances}\n layout=\"horizontal\"\n margin={{\n top: 120,\n right: 60,\n left: 40,\n bottom: 120,\n }}\n style={{ backgroundColor: this.globalParameters['bg-color'] as string }}\n\n >\n <CartesianGrid strokeDasharray=\"3 3\" />\n\n <XAxis dataKey=\"id\" />\n\n <YAxis />\n\n <Legend />\n\n <Tooltip />\n\n <Bar\n dataKey=\"bar-value\"\n fill=\"#ff\"\n animationEasing=\"ease-in-out\"\n animationDuration={200}\n activeBar={<Rectangle fill=\"pink\" stroke=\"blue\" />}\n >\n {this.instances?.map((instance, index) => {\n const color = instance['bar-color'];\n return <Cell key={`cell-${index}`} fill={color as string} />;\n })}\n </Bar>\n\n </BarChart>\n </ResponsiveContainer>\n );\n }\n}\n",
4
4
  "/styles.css": "body {\n font-family: sans-serif;\n -webkit-font-smoothing: auto;\n -moz-font-smoothing: auto;\n -moz-osx-font-smoothing: grayscale;\n text-rendering: optimizeLegibility;\n font-smooth: always;\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n}\n\n.root {\n height: 100vh;\n background-color: 'red';\n display: grid;\n}",
5
5
  "/package.json": "{\n \"dependencies\": {\n \"react\": \"^19.0.0\",\n \"react-dom\": \"^19.0.0\",\n \"react-scripts\": \"^5.0.0\",\n \"@digo-org/digo-api\": \"1.0.28\",\n \"@react-three/drei\": \"^10.0.6\",\n \"@react-three/fiber\": \"^9.1.2\",\n \"recharts\": \"^2.15.1\"\n },\n \"main\": \"/index.tsx\",\n \"devDependencies\": {}\n}",
package/src/types-llm.ts CHANGED
@@ -3,8 +3,8 @@ import { CommonMetadata, DataTableDefinition, Links, VizAssetDefinition, CodeFil
3
3
  export type Artifacts = Partial<Record<ArtifactType, ArtifactValue>> & CommonMetadata;
4
4
 
5
5
  export enum ArtifactType {
6
- DATA_ASSET_DEFINITION = 'DATA_ASSET_DEFINITION',
7
- VIZ_ASSET_FILES = 'VIZ_ASSET_FILES',
6
+ DATA_TABLE_DEFINITION = 'DATA_TABLE_DEFINITION',
7
+ CODE_FILES = 'CODE_FILES',
8
8
  VIZ_ASSET_DEFINITION = 'VIZ_ASSET_DEFINITION',
9
9
  LINKS = 'LINKS',
10
10
  PROJECT_DEFINITION = 'PROJECT_DEFINITION',