@principal-ai/principal-view-react 0.13.0 → 0.13.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.
@@ -25,15 +25,6 @@ const createThemeWithFontSize = (baseFontSize: number): Theme => ({
25
25
  fontSizes: [baseFontSize, baseFontSize + 2, baseFontSize + 4, baseFontSize + 6, baseFontSize + 8, baseFontSize + 12, baseFontSize + 20, baseFontSize + 36, baseFontSize + 52, baseFontSize + 84],
26
26
  });
27
27
 
28
- const FONT_SIZES = {
29
- tiny: 10,
30
- small: 12,
31
- medium: 14,
32
- large: 16,
33
- xlarge: 18,
34
- xxlarge: 20,
35
- };
36
-
37
28
  const TEXT_SAMPLES = {
38
29
  veryShort: 'Init',
39
30
  short: 'File Parsed',
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
3
  import { GraphRenderer } from '../components/GraphRenderer';
4
- import type { ExtendedCanvas } from '@principal-ai/principal-view-core';
4
+ import type { ExtendedCanvas, ExtendedCanvasNode } from '@principal-ai/principal-view-core';
5
5
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
6
6
 
7
7
  const meta = {
@@ -29,7 +29,7 @@ type Story = StoryObj<typeof meta>;
29
29
  const FallbackExample: React.FC<{
30
30
  title: string;
31
31
  scenario: string;
32
- nodeDefinition: any;
32
+ nodeDefinition: ExtendedCanvasNode;
33
33
  expectedDisplay: string;
34
34
  explanation: string;
35
35
  }> = ({ title, scenario, nodeDefinition, expectedDisplay, explanation }) => {
@@ -50,7 +50,7 @@ const obsidianNumericColorsCanvas: ExtendedCanvas = {
50
50
  width: 140,
51
51
  height: 80,
52
52
  text: 'color: "1"\nRed\n#ef4444',
53
- color: '1' as any, // Obsidian format
53
+ color: '1', // Obsidian format
54
54
  pv: { nodeType: 'preset', shape: 'rectangle' },
55
55
  },
56
56
  {
@@ -61,7 +61,7 @@ const obsidianNumericColorsCanvas: ExtendedCanvas = {
61
61
  width: 140,
62
62
  height: 80,
63
63
  text: 'color: "2"\nOrange\n#f97316',
64
- color: '2' as any,
64
+ color: '2',
65
65
  pv: { nodeType: 'preset', shape: 'rectangle' },
66
66
  },
67
67
  {
@@ -72,7 +72,7 @@ const obsidianNumericColorsCanvas: ExtendedCanvas = {
72
72
  width: 140,
73
73
  height: 80,
74
74
  text: 'color: "3"\nYellow\n#eab308',
75
- color: '3' as any,
75
+ color: '3',
76
76
  pv: { nodeType: 'preset', shape: 'rectangle' },
77
77
  },
78
78
  {
@@ -83,7 +83,7 @@ const obsidianNumericColorsCanvas: ExtendedCanvas = {
83
83
  width: 140,
84
84
  height: 80,
85
85
  text: 'color: "4"\nGreen\n#22c55e',
86
- color: '4' as any,
86
+ color: '4',
87
87
  pv: { nodeType: 'preset', shape: 'rectangle' },
88
88
  },
89
89
  {
@@ -94,7 +94,7 @@ const obsidianNumericColorsCanvas: ExtendedCanvas = {
94
94
  width: 140,
95
95
  height: 80,
96
96
  text: 'color: "5"\nCyan\n#06b6d4',
97
- color: '5' as any,
97
+ color: '5',
98
98
  pv: { nodeType: 'preset', shape: 'rectangle' },
99
99
  },
100
100
  {
@@ -105,7 +105,7 @@ const obsidianNumericColorsCanvas: ExtendedCanvas = {
105
105
  width: 140,
106
106
  height: 80,
107
107
  text: 'color: "6"\nPurple\n#8b5cf6',
108
- color: '6' as any,
108
+ color: '6',
109
109
  pv: { nodeType: 'preset', shape: 'rectangle' },
110
110
  },
111
111
  // Label for row 2
@@ -381,7 +381,7 @@ const edgeNumericColorsCanvas: ExtendedCanvas = {
381
381
  id: 'edge-string-1',
382
382
  fromNode: 'source',
383
383
  toNode: 'target-1',
384
- color: '1' as any, // String format - red
384
+ color: '1', // String format - red
385
385
  label: 'color: "1"',
386
386
  },
387
387
  {
@@ -395,7 +395,7 @@ const edgeNumericColorsCanvas: ExtendedCanvas = {
395
395
  id: 'edge-string-6',
396
396
  fromNode: 'source',
397
397
  toNode: 'target-3',
398
- color: '6' as any, // String format - purple
398
+ color: '6', // String format - purple
399
399
  label: 'color: "6"',
400
400
  },
401
401
  {
@@ -2,7 +2,7 @@
2
2
  {
3
3
  "id": "span-1",
4
4
  "name": "should convert simple config to nodes and edges",
5
- "startTime": 1770138679053,
5
+ "startTime": 1771168677432,
6
6
  "attributes": {
7
7
  "span.kind": "test.case",
8
8
  "test.name": "should convert simple config to nodes and edges",
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "events": [
15
15
  {
16
- "time": 1770138679053,
16
+ "time": 1771168677432,
17
17
  "name": "setup.started",
18
18
  "attributes": {
19
19
  "code.filepath": "GraphConverter.test.ts",
@@ -22,7 +22,7 @@
22
22
  }
23
23
  },
24
24
  {
25
- "time": 1770138679053,
25
+ "time": 1771168677432,
26
26
  "name": "setup.complete",
27
27
  "attributes": {
28
28
  "code.filepath": "GraphConverter.test.ts",
@@ -32,7 +32,7 @@
32
32
  }
33
33
  },
34
34
  {
35
- "time": 1770138679053,
35
+ "time": 1771168677432,
36
36
  "name": "execution.started",
37
37
  "attributes": {
38
38
  "code.filepath": "GraphConverter.ts",
@@ -41,7 +41,7 @@
41
41
  }
42
42
  },
43
43
  {
44
- "time": 1770138679053,
44
+ "time": 1771168677432,
45
45
  "name": "execution.complete",
46
46
  "attributes": {
47
47
  "code.filepath": "GraphConverter.ts",
@@ -51,7 +51,7 @@
51
51
  }
52
52
  },
53
53
  {
54
- "time": 1770138679053,
54
+ "time": 1771168677432,
55
55
  "name": "assertion.started",
56
56
  "attributes": {
57
57
  "code.filepath": "GraphConverter.test.ts",
@@ -60,7 +60,7 @@
60
60
  }
61
61
  },
62
62
  {
63
- "time": 1770138679053,
63
+ "time": 1771168677432,
64
64
  "name": "assertion.complete",
65
65
  "attributes": {
66
66
  "code.filepath": "GraphConverter.test.ts",
@@ -71,13 +71,13 @@
71
71
  }
72
72
  ],
73
73
  "status": "OK",
74
- "endTime": 1770138679053,
74
+ "endTime": 1771168677432,
75
75
  "duration": 0
76
76
  },
77
77
  {
78
78
  "id": "span-2",
79
79
  "name": "should extract manual positions from node types",
80
- "startTime": 1770138679053,
80
+ "startTime": 1771168677432,
81
81
  "attributes": {
82
82
  "span.kind": "test.case",
83
83
  "test.name": "should extract manual positions from node types",
@@ -88,7 +88,7 @@
88
88
  },
89
89
  "events": [
90
90
  {
91
- "time": 1770138679053,
91
+ "time": 1771168677432,
92
92
  "name": "setup.started",
93
93
  "attributes": {
94
94
  "code.filepath": "GraphConverter.test.ts",
@@ -97,7 +97,7 @@
97
97
  }
98
98
  },
99
99
  {
100
- "time": 1770138679053,
100
+ "time": 1771168677432,
101
101
  "name": "setup.complete",
102
102
  "attributes": {
103
103
  "code.filepath": "GraphConverter.test.ts",
@@ -107,7 +107,7 @@
107
107
  }
108
108
  },
109
109
  {
110
- "time": 1770138679053,
110
+ "time": 1771168677432,
111
111
  "name": "execution.started",
112
112
  "attributes": {
113
113
  "code.filepath": "GraphConverter.ts",
@@ -116,7 +116,7 @@
116
116
  }
117
117
  },
118
118
  {
119
- "time": 1770138679053,
119
+ "time": 1771168677432,
120
120
  "name": "execution.complete",
121
121
  "attributes": {
122
122
  "code.filepath": "GraphConverter.ts",
@@ -125,7 +125,7 @@
125
125
  }
126
126
  },
127
127
  {
128
- "time": 1770138679053,
128
+ "time": 1771168677432,
129
129
  "name": "assertion.started",
130
130
  "attributes": {
131
131
  "code.filepath": "GraphConverter.test.ts",
@@ -134,7 +134,7 @@
134
134
  }
135
135
  },
136
136
  {
137
- "time": 1770138679053,
137
+ "time": 1771168677432,
138
138
  "name": "assertion.complete",
139
139
  "attributes": {
140
140
  "code.filepath": "GraphConverter.test.ts",
@@ -145,13 +145,13 @@
145
145
  }
146
146
  ],
147
147
  "status": "OK",
148
- "endTime": 1770138679053,
148
+ "endTime": 1771168677432,
149
149
  "duration": 0
150
150
  },
151
151
  {
152
152
  "id": "span-3",
153
153
  "name": "should handle nodes without positions",
154
- "startTime": 1770138679053,
154
+ "startTime": 1771168677432,
155
155
  "attributes": {
156
156
  "span.kind": "test.case",
157
157
  "test.name": "should handle nodes without positions",
@@ -162,7 +162,7 @@
162
162
  },
163
163
  "events": [
164
164
  {
165
- "time": 1770138679053,
165
+ "time": 1771168677432,
166
166
  "name": "setup.started",
167
167
  "attributes": {
168
168
  "code.filepath": "GraphConverter.test.ts",
@@ -171,7 +171,7 @@
171
171
  }
172
172
  },
173
173
  {
174
- "time": 1770138679053,
174
+ "time": 1771168677432,
175
175
  "name": "setup.complete",
176
176
  "attributes": {
177
177
  "code.filepath": "GraphConverter.test.ts",
@@ -181,7 +181,7 @@
181
181
  }
182
182
  },
183
183
  {
184
- "time": 1770138679053,
184
+ "time": 1771168677432,
185
185
  "name": "execution.started",
186
186
  "attributes": {
187
187
  "code.filepath": "GraphConverter.ts",
@@ -190,7 +190,7 @@
190
190
  }
191
191
  },
192
192
  {
193
- "time": 1770138679053,
193
+ "time": 1771168677432,
194
194
  "name": "execution.complete",
195
195
  "attributes": {
196
196
  "code.filepath": "GraphConverter.ts",
@@ -199,7 +199,7 @@
199
199
  }
200
200
  },
201
201
  {
202
- "time": 1770138679053,
202
+ "time": 1771168677432,
203
203
  "name": "assertion.started",
204
204
  "attributes": {
205
205
  "code.filepath": "GraphConverter.test.ts",
@@ -208,7 +208,7 @@
208
208
  }
209
209
  },
210
210
  {
211
- "time": 1770138679053,
211
+ "time": 1771168677432,
212
212
  "name": "assertion.complete",
213
213
  "attributes": {
214
214
  "code.filepath": "GraphConverter.test.ts",
@@ -219,7 +219,7 @@
219
219
  }
220
220
  ],
221
221
  "status": "OK",
222
- "endTime": 1770138679053,
222
+ "endTime": 1771168677432,
223
223
  "duration": 0
224
224
  }
225
225
  ]
@@ -2,7 +2,7 @@
2
2
  {
3
3
  "id": "span-1",
4
4
  "name": "graph conversion with validation",
5
- "startTime": 1770138678945,
5
+ "startTime": 1771168677308,
6
6
  "attributes": {
7
7
  "span.kind": "test.case",
8
8
  "test.name": "graph conversion with validation",
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "events": [
14
14
  {
15
- "time": 1770138678945,
15
+ "time": 1771168677308,
16
16
  "name": "conversion.started",
17
17
  "attributes": {
18
18
  "code.filepath": "GraphConverter.ts",
@@ -22,7 +22,7 @@
22
22
  }
23
23
  },
24
24
  {
25
- "time": 1770138678945,
25
+ "time": 1771168677308,
26
26
  "name": "conversion.processingNodes",
27
27
  "attributes": {
28
28
  "code.filepath": "GraphConverter.ts",
@@ -31,7 +31,7 @@
31
31
  }
32
32
  },
33
33
  {
34
- "time": 1770138678945,
34
+ "time": 1771168677308,
35
35
  "name": "conversion.processingEdges",
36
36
  "attributes": {
37
37
  "code.filepath": "GraphConverter.ts",
@@ -40,7 +40,7 @@
40
40
  }
41
41
  },
42
42
  {
43
- "time": 1770138678945,
43
+ "time": 1771168677308,
44
44
  "name": "conversion.complete",
45
45
  "attributes": {
46
46
  "code.filepath": "GraphConverter.ts",
@@ -52,7 +52,7 @@
52
52
  }
53
53
  ],
54
54
  "status": "OK",
55
- "endTime": 1770138678945,
55
+ "endTime": 1771168677308,
56
56
  "duration": 0
57
57
  }
58
58
  ]