@principal-ai/principal-view-react 0.6.7 → 0.6.9

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.
@@ -34,7 +34,7 @@ const sampleCanvas: ExtendedCanvas = {
34
34
  height: 70,
35
35
  text: 'Input Processor',
36
36
  color: '#4A90E2',
37
- vv: {
37
+ pv: {
38
38
  nodeType: 'process',
39
39
  shape: 'rectangle',
40
40
  icon: 'Settings',
@@ -49,7 +49,7 @@ const sampleCanvas: ExtendedCanvas = {
49
49
  height: 100,
50
50
  text: 'Database',
51
51
  color: '#7B68EE',
52
- vv: {
52
+ pv: {
53
53
  nodeType: 'data',
54
54
  shape: 'circle',
55
55
  icon: 'Database',
@@ -64,7 +64,7 @@ const sampleCanvas: ExtendedCanvas = {
64
64
  height: 70,
65
65
  text: 'Output Handler',
66
66
  color: '#4A90E2',
67
- vv: {
67
+ pv: {
68
68
  nodeType: 'process',
69
69
  shape: 'rectangle',
70
70
  icon: 'Settings',
@@ -76,16 +76,16 @@ const sampleCanvas: ExtendedCanvas = {
76
76
  id: 'edge-1',
77
77
  fromNode: 'node-1',
78
78
  toNode: 'node-2',
79
- vv: { edgeType: 'dataflow' },
79
+ pv: { edgeType: 'dataflow' },
80
80
  },
81
81
  {
82
82
  id: 'edge-2',
83
83
  fromNode: 'node-2',
84
84
  toNode: 'node-3',
85
- vv: { edgeType: 'dataflow' },
85
+ pv: { edgeType: 'dataflow' },
86
86
  },
87
87
  ],
88
- vv: {
88
+ pv: {
89
89
  version: '1.0.0',
90
90
  name: 'Sample Validation Graph',
91
91
  description: 'Example graph configuration',
@@ -110,7 +110,7 @@ const sampleCanvas: ExtendedCanvas = {
110
110
  const emptyCanvas: ExtendedCanvas = {
111
111
  nodes: [],
112
112
  edges: [],
113
- vv: {
113
+ pv: {
114
114
  version: '1.0.0',
115
115
  name: 'Empty Graph',
116
116
  edgeTypes: {},
@@ -131,7 +131,7 @@ const singleNodeCanvas: ExtendedCanvas = {
131
131
  height: 70,
132
132
  text: 'Input Processor',
133
133
  color: '#4A90E2',
134
- vv: {
134
+ pv: {
135
135
  nodeType: 'process',
136
136
  shape: 'rectangle',
137
137
  icon: 'Settings',
@@ -139,7 +139,7 @@ const singleNodeCanvas: ExtendedCanvas = {
139
139
  },
140
140
  ],
141
141
  edges: [],
142
- vv: {
142
+ pv: {
143
143
  version: '1.0.0',
144
144
  name: 'Single Node',
145
145
  edgeTypes: {},
@@ -160,7 +160,7 @@ const largeCanvas: ExtendedCanvas = {
160
160
  height: 70,
161
161
  text: 'Input Processor',
162
162
  color: '#4A90E2',
163
- vv: {
163
+ pv: {
164
164
  nodeType: 'process',
165
165
  shape: 'rectangle',
166
166
  icon: 'Settings',
@@ -175,7 +175,7 @@ const largeCanvas: ExtendedCanvas = {
175
175
  height: 100,
176
176
  text: 'Database',
177
177
  color: '#7B68EE',
178
- vv: {
178
+ pv: {
179
179
  nodeType: 'data',
180
180
  shape: 'circle',
181
181
  icon: 'Database',
@@ -190,7 +190,7 @@ const largeCanvas: ExtendedCanvas = {
190
190
  height: 70,
191
191
  text: 'Output Handler',
192
192
  color: '#4A90E2',
193
- vv: {
193
+ pv: {
194
194
  nodeType: 'process',
195
195
  shape: 'rectangle',
196
196
  icon: 'Settings',
@@ -205,7 +205,7 @@ const largeCanvas: ExtendedCanvas = {
205
205
  height: 70,
206
206
  text: 'Validator',
207
207
  color: '#4A90E2',
208
- vv: {
208
+ pv: {
209
209
  nodeType: 'process',
210
210
  shape: 'rectangle',
211
211
  icon: 'Check',
@@ -220,7 +220,7 @@ const largeCanvas: ExtendedCanvas = {
220
220
  height: 100,
221
221
  text: 'Cache',
222
222
  color: '#7B68EE',
223
- vv: {
223
+ pv: {
224
224
  nodeType: 'data',
225
225
  shape: 'circle',
226
226
  icon: 'Zap',
@@ -232,28 +232,28 @@ const largeCanvas: ExtendedCanvas = {
232
232
  id: 'edge-1',
233
233
  fromNode: 'node-1',
234
234
  toNode: 'node-2',
235
- vv: { edgeType: 'dataflow' },
235
+ pv: { edgeType: 'dataflow' },
236
236
  },
237
237
  {
238
238
  id: 'edge-2',
239
239
  fromNode: 'node-2',
240
240
  toNode: 'node-3',
241
- vv: { edgeType: 'dataflow' },
241
+ pv: { edgeType: 'dataflow' },
242
242
  },
243
243
  {
244
244
  id: 'edge-3',
245
245
  fromNode: 'node-1',
246
246
  toNode: 'node-4',
247
- vv: { edgeType: 'dataflow' },
247
+ pv: { edgeType: 'dataflow' },
248
248
  },
249
249
  {
250
250
  id: 'edge-4',
251
251
  fromNode: 'node-4',
252
252
  toNode: 'node-5',
253
- vv: { edgeType: 'dataflow' },
253
+ pv: { edgeType: 'dataflow' },
254
254
  },
255
255
  ],
256
- vv: {
256
+ pv: {
257
257
  version: '1.0.0',
258
258
  name: 'Large Graph',
259
259
  edgeTypes: {
@@ -280,7 +280,7 @@ const serviceArchitectureCanvas: ExtendedCanvas = {
280
280
  height: 120,
281
281
  text: '# Client',
282
282
  color: 5, // cyan preset
283
- vv: {
283
+ pv: {
284
284
  nodeType: 'client',
285
285
  shape: 'circle',
286
286
  icon: 'user',
@@ -300,7 +300,7 @@ const serviceArchitectureCanvas: ExtendedCanvas = {
300
300
  height: 140,
301
301
  text: '# API Server\n\nHandles REST endpoints',
302
302
  color: 6, // purple preset
303
- vv: {
303
+ pv: {
304
304
  nodeType: 'api-server',
305
305
  shape: 'rectangle',
306
306
  icon: 'server',
@@ -320,7 +320,7 @@ const serviceArchitectureCanvas: ExtendedCanvas = {
320
320
  height: 100,
321
321
  text: '# Database',
322
322
  color: 4, // green preset
323
- vv: {
323
+ pv: {
324
324
  nodeType: 'database',
325
325
  shape: 'hexagon',
326
326
  icon: 'database',
@@ -335,7 +335,7 @@ const serviceArchitectureCanvas: ExtendedCanvas = {
335
335
  height: 80,
336
336
  text: '# Cache',
337
337
  color: 2, // orange preset
338
- vv: {
338
+ pv: {
339
339
  nodeType: 'cache',
340
340
  shape: 'diamond',
341
341
  icon: 'zap',
@@ -350,7 +350,7 @@ const serviceArchitectureCanvas: ExtendedCanvas = {
350
350
  fromSide: 'right',
351
351
  toSide: 'left',
352
352
  label: 'HTTP',
353
- vv: {
353
+ pv: {
354
354
  edgeType: 'http-request',
355
355
  },
356
356
  },
@@ -361,7 +361,7 @@ const serviceArchitectureCanvas: ExtendedCanvas = {
361
361
  fromSide: 'right',
362
362
  toSide: 'left',
363
363
  label: 'SQL',
364
- vv: {
364
+ pv: {
365
365
  edgeType: 'db-query',
366
366
  },
367
367
  },
@@ -372,12 +372,12 @@ const serviceArchitectureCanvas: ExtendedCanvas = {
372
372
  fromSide: 'bottom',
373
373
  toSide: 'top',
374
374
  label: 'GET/SET',
375
- vv: {
375
+ pv: {
376
376
  edgeType: 'cache-access',
377
377
  },
378
378
  },
379
379
  ],
380
- vv: {
380
+ pv: {
381
381
  version: '1.0.0',
382
382
  name: 'Simple Service Architecture',
383
383
  description: 'A basic client-server architecture with caching',
@@ -34,7 +34,7 @@ const simpleServiceCanvas: ExtendedCanvas = {
34
34
  height: 70,
35
35
  text: 'API',
36
36
  color: '#4A90E2',
37
- vv: {
37
+ pv: {
38
38
  nodeType: 'api',
39
39
  shape: 'rectangle',
40
40
  icon: 'Globe',
@@ -49,7 +49,7 @@ const simpleServiceCanvas: ExtendedCanvas = {
49
49
  height: 100,
50
50
  text: 'Service',
51
51
  color: '#7ED321',
52
- vv: {
52
+ pv: {
53
53
  nodeType: 'service',
54
54
  shape: 'hexagon',
55
55
  icon: 'Cog',
@@ -64,7 +64,7 @@ const simpleServiceCanvas: ExtendedCanvas = {
64
64
  height: 80,
65
65
  text: 'Database',
66
66
  color: '#BD10E0',
67
- vv: {
67
+ pv: {
68
68
  nodeType: 'database',
69
69
  shape: 'circle',
70
70
  icon: 'Database',
@@ -76,16 +76,16 @@ const simpleServiceCanvas: ExtendedCanvas = {
76
76
  id: 'edge-1',
77
77
  fromNode: 'api-1',
78
78
  toNode: 'service-1',
79
- vv: { edgeType: 'api_call' },
79
+ pv: { edgeType: 'api_call' },
80
80
  },
81
81
  {
82
82
  id: 'edge-2',
83
83
  fromNode: 'service-1',
84
84
  toNode: 'database-1',
85
- vv: { edgeType: 'data_access' },
85
+ pv: { edgeType: 'data_access' },
86
86
  },
87
87
  ],
88
- vv: {
88
+ pv: {
89
89
  version: '1.0.0',
90
90
  name: 'Simple Service',
91
91
  description: 'Basic 3-tier service architecture',
@@ -120,7 +120,7 @@ const microservicesCanvas: ExtendedCanvas = {
120
120
  height: 70,
121
121
  text: 'Gateway',
122
122
  color: '#00C853',
123
- vv: {
123
+ pv: {
124
124
  nodeType: 'gateway',
125
125
  shape: 'rectangle',
126
126
  icon: 'Network',
@@ -135,7 +135,7 @@ const microservicesCanvas: ExtendedCanvas = {
135
135
  height: 70,
136
136
  text: 'Auth Service',
137
137
  color: '#FF6B6B',
138
- vv: {
138
+ pv: {
139
139
  nodeType: 'auth_service',
140
140
  shape: 'rectangle',
141
141
  icon: 'Lock',
@@ -150,7 +150,7 @@ const microservicesCanvas: ExtendedCanvas = {
150
150
  height: 70,
151
151
  text: 'User Service',
152
152
  color: '#4A90E2',
153
- vv: {
153
+ pv: {
154
154
  nodeType: 'user_service',
155
155
  shape: 'rectangle',
156
156
  icon: 'Users',
@@ -165,7 +165,7 @@ const microservicesCanvas: ExtendedCanvas = {
165
165
  height: 80,
166
166
  text: 'Cache',
167
167
  color: '#3498DB',
168
- vv: {
168
+ pv: {
169
169
  nodeType: 'cache',
170
170
  shape: 'circle',
171
171
  icon: 'Zap',
@@ -180,7 +180,7 @@ const microservicesCanvas: ExtendedCanvas = {
180
180
  height: 80,
181
181
  text: 'Database',
182
182
  color: '#27AE60',
183
- vv: {
183
+ pv: {
184
184
  nodeType: 'database',
185
185
  shape: 'circle',
186
186
  icon: 'Database',
@@ -192,28 +192,28 @@ const microservicesCanvas: ExtendedCanvas = {
192
192
  id: 'edge-1',
193
193
  fromNode: 'gateway-1',
194
194
  toNode: 'auth-1',
195
- vv: { edgeType: 'http_request' },
195
+ pv: { edgeType: 'http_request' },
196
196
  },
197
197
  {
198
198
  id: 'edge-2',
199
199
  fromNode: 'gateway-1',
200
200
  toNode: 'user-1',
201
- vv: { edgeType: 'http_request' },
201
+ pv: { edgeType: 'http_request' },
202
202
  },
203
203
  {
204
204
  id: 'edge-3',
205
205
  fromNode: 'auth-1',
206
206
  toNode: 'cache-1',
207
- vv: { edgeType: 'cache_access' },
207
+ pv: { edgeType: 'cache_access' },
208
208
  },
209
209
  {
210
210
  id: 'edge-4',
211
211
  fromNode: 'user-1',
212
212
  toNode: 'db-1',
213
- vv: { edgeType: 'http_request' },
213
+ pv: { edgeType: 'http_request' },
214
214
  },
215
215
  ],
216
- vv: {
216
+ pv: {
217
217
  version: '2.0.0',
218
218
  name: 'Microservices',
219
219
  description: 'Distributed microservices architecture',
@@ -252,7 +252,7 @@ const dataPipelineCanvas: ExtendedCanvas = {
252
252
  height: 70,
253
253
  text: 'Data Source',
254
254
  color: '#6C5CE7',
255
- vv: {
255
+ pv: {
256
256
  nodeType: 'data_source',
257
257
  shape: 'rectangle',
258
258
  icon: 'FileInput',
@@ -267,7 +267,7 @@ const dataPipelineCanvas: ExtendedCanvas = {
267
267
  height: 90,
268
268
  text: 'Validator',
269
269
  color: '#00B894',
270
- vv: {
270
+ pv: {
271
271
  nodeType: 'validator',
272
272
  shape: 'diamond',
273
273
  icon: 'CheckCircle',
@@ -282,7 +282,7 @@ const dataPipelineCanvas: ExtendedCanvas = {
282
282
  height: 100,
283
283
  text: 'Transformer',
284
284
  color: '#FD79A8',
285
- vv: {
285
+ pv: {
286
286
  nodeType: 'transformer',
287
287
  shape: 'hexagon',
288
288
  icon: 'RefreshCw',
@@ -297,7 +297,7 @@ const dataPipelineCanvas: ExtendedCanvas = {
297
297
  height: 80,
298
298
  text: 'Warehouse',
299
299
  color: '#0984E3',
300
- vv: {
300
+ pv: {
301
301
  nodeType: 'data_warehouse',
302
302
  shape: 'circle',
303
303
  icon: 'Database',
@@ -309,22 +309,22 @@ const dataPipelineCanvas: ExtendedCanvas = {
309
309
  id: 'edge-1',
310
310
  fromNode: 'source-1',
311
311
  toNode: 'validator-1',
312
- vv: { edgeType: 'validation_flow' },
312
+ pv: { edgeType: 'validation_flow' },
313
313
  },
314
314
  {
315
315
  id: 'edge-2',
316
316
  fromNode: 'validator-1',
317
317
  toNode: 'transformer-1',
318
- vv: { edgeType: 'data_flow' },
318
+ pv: { edgeType: 'data_flow' },
319
319
  },
320
320
  {
321
321
  id: 'edge-3',
322
322
  fromNode: 'transformer-1',
323
323
  toNode: 'warehouse-1',
324
- vv: { edgeType: 'data_flow' },
324
+ pv: { edgeType: 'data_flow' },
325
325
  },
326
326
  ],
327
- vv: {
327
+ pv: {
328
328
  version: '1.0.0',
329
329
  name: 'Data Pipeline',
330
330
  description: 'ETL data processing pipeline',
@@ -32,7 +32,7 @@ const multiDirectionalCanvas: ExtendedCanvas = {
32
32
  height: 100,
33
33
  text: 'API Gateway',
34
34
  color: '#06B6D4',
35
- vv: {
35
+ pv: {
36
36
  nodeType: 'gateway',
37
37
  shape: 'diamond',
38
38
  icon: 'Network',
@@ -47,7 +47,7 @@ const multiDirectionalCanvas: ExtendedCanvas = {
47
47
  height: 80,
48
48
  text: 'Auth Service',
49
49
  color: '#4A90E2',
50
- vv: {
50
+ pv: {
51
51
  nodeType: 'service',
52
52
  shape: 'rectangle',
53
53
  icon: 'Server',
@@ -67,7 +67,7 @@ const multiDirectionalCanvas: ExtendedCanvas = {
67
67
  height: 80,
68
68
  text: 'API Service',
69
69
  color: '#4A90E2',
70
- vv: {
70
+ pv: {
71
71
  nodeType: 'service',
72
72
  shape: 'rectangle',
73
73
  icon: 'Server',
@@ -87,7 +87,7 @@ const multiDirectionalCanvas: ExtendedCanvas = {
87
87
  height: 100,
88
88
  text: 'Redis Cache',
89
89
  color: '#F59E0B',
90
- vv: {
90
+ pv: {
91
91
  nodeType: 'cache',
92
92
  shape: 'hexagon',
93
93
  icon: 'Zap',
@@ -102,7 +102,7 @@ const multiDirectionalCanvas: ExtendedCanvas = {
102
102
  height: 100,
103
103
  text: 'PostgreSQL',
104
104
  color: '#7B68EE',
105
- vv: {
105
+ pv: {
106
106
  nodeType: 'database',
107
107
  shape: 'circle',
108
108
  icon: 'Database',
@@ -117,7 +117,7 @@ const multiDirectionalCanvas: ExtendedCanvas = {
117
117
  height: 80,
118
118
  text: 'Notification Service',
119
119
  color: '#4A90E2',
120
- vv: {
120
+ pv: {
121
121
  nodeType: 'service',
122
122
  shape: 'rectangle',
123
123
  icon: 'Bell',
@@ -138,7 +138,7 @@ const multiDirectionalCanvas: ExtendedCanvas = {
138
138
  fromSide: 'bottom',
139
139
  toSide: 'top',
140
140
  label: 'POST /auth/login',
141
- vv: { edgeType: 'http' },
141
+ pv: { edgeType: 'http' },
142
142
  },
143
143
  {
144
144
  id: 'edge-2',
@@ -147,7 +147,7 @@ const multiDirectionalCanvas: ExtendedCanvas = {
147
147
  fromSide: 'bottom',
148
148
  toSide: 'top',
149
149
  label: 'GET /api/users',
150
- vv: { edgeType: 'http' },
150
+ pv: { edgeType: 'http' },
151
151
  },
152
152
  // Horizontal connections (left <-> right)
153
153
  {
@@ -157,7 +157,7 @@ const multiDirectionalCanvas: ExtendedCanvas = {
157
157
  fromSide: 'right',
158
158
  toSide: 'left',
159
159
  label: '/internal/validate',
160
- vv: { edgeType: 'http' },
160
+ pv: { edgeType: 'http' },
161
161
  },
162
162
  // Services to data layer
163
163
  {
@@ -167,7 +167,7 @@ const multiDirectionalCanvas: ExtendedCanvas = {
167
167
  fromSide: 'bottom',
168
168
  toSide: 'top',
169
169
  label: 'GET',
170
- vv: { edgeType: 'cache_access' },
170
+ pv: { edgeType: 'cache_access' },
171
171
  },
172
172
  {
173
173
  id: 'edge-5',
@@ -176,7 +176,7 @@ const multiDirectionalCanvas: ExtendedCanvas = {
176
176
  fromSide: 'bottom',
177
177
  toSide: 'top',
178
178
  label: 'SELECT users',
179
- vv: { edgeType: 'database_query' },
179
+ pv: { edgeType: 'database_query' },
180
180
  },
181
181
  {
182
182
  id: 'edge-6',
@@ -185,7 +185,7 @@ const multiDirectionalCanvas: ExtendedCanvas = {
185
185
  fromSide: 'bottom',
186
186
  toSide: 'top',
187
187
  label: 'UPDATE sessions',
188
- vv: { edgeType: 'database_query' },
188
+ pv: { edgeType: 'database_query' },
189
189
  },
190
190
  {
191
191
  id: 'edge-7',
@@ -194,7 +194,7 @@ const multiDirectionalCanvas: ExtendedCanvas = {
194
194
  fromSide: 'right',
195
195
  toSide: 'left',
196
196
  label: 'POST /notify',
197
- vv: { edgeType: 'http' },
197
+ pv: { edgeType: 'http' },
198
198
  },
199
199
  // Cache to database (horizontal)
200
200
  {
@@ -204,10 +204,10 @@ const multiDirectionalCanvas: ExtendedCanvas = {
204
204
  fromSide: 'right',
205
205
  toSide: 'left',
206
206
  label: 'cache miss',
207
- vv: { edgeType: 'database_query' },
207
+ pv: { edgeType: 'database_query' },
208
208
  },
209
209
  ],
210
- vv: {
210
+ pv: {
211
211
  version: '1.0.0',
212
212
  name: 'Multi-Directional Connection Demo',
213
213
  description: 'Showcasing edges connecting from all sides with rich metadata',
@@ -243,7 +243,7 @@ const multiDirectionalCanvas: ExtendedCanvas = {
243
243
  // Canvas with violation highlighting
244
244
  const canvasWithViolations: ExtendedCanvas = {
245
245
  ...multiDirectionalCanvas,
246
- vv: {
246
+ pv: {
247
247
  ...multiDirectionalCanvas.vv!,
248
248
  name: 'Connection Demo with Violations',
249
249
  },
@@ -253,7 +253,7 @@ const canvasWithViolations: ExtendedCanvas = {
253
253
  const minimalCanvas: ExtendedCanvas = {
254
254
  nodes: multiDirectionalCanvas.nodes!.slice(0, 4),
255
255
  edges: multiDirectionalCanvas.edges!.slice(0, 4),
256
- vv: {
256
+ pv: {
257
257
  ...multiDirectionalCanvas.vv!,
258
258
  name: 'Minimal View',
259
259
  },
@@ -272,7 +272,7 @@ const complexMeshCanvas: ExtendedCanvas = {
272
272
  height: 100,
273
273
  text: 'Internal Gateway',
274
274
  color: '#06B6D4',
275
- vv: {
275
+ pv: {
276
276
  nodeType: 'gateway',
277
277
  shape: 'diamond',
278
278
  icon: 'Network',
@@ -288,10 +288,10 @@ const complexMeshCanvas: ExtendedCanvas = {
288
288
  fromSide: 'bottom',
289
289
  toSide: 'top',
290
290
  label: 'wss',
291
- vv: { edgeType: 'websocket' },
291
+ pv: { edgeType: 'websocket' },
292
292
  },
293
293
  ],
294
- vv: {
294
+ pv: {
295
295
  ...multiDirectionalCanvas.vv!,
296
296
  name: 'Complex Mesh',
297
297
  },