@principal-ai/principal-view-react 0.8.0 → 0.8.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.
Files changed (73) hide show
  1. package/dist/components/ConfigurationSelector.d.ts +1 -1
  2. package/dist/components/ConfigurationSelector.d.ts.map +1 -1
  3. package/dist/components/EdgeInfoPanel.d.ts +1 -1
  4. package/dist/components/EdgeInfoPanel.d.ts.map +1 -1
  5. package/dist/components/EdgeInfoPanel.js +77 -86
  6. package/dist/components/EdgeInfoPanel.js.map +1 -1
  7. package/dist/components/GraphRenderer.d.ts +1 -1
  8. package/dist/components/GraphRenderer.d.ts.map +1 -1
  9. package/dist/components/GraphRenderer.js +1 -1
  10. package/dist/components/GraphRenderer.js.map +1 -1
  11. package/dist/components/NodeInfoPanel.d.ts +1 -1
  12. package/dist/components/NodeInfoPanel.d.ts.map +1 -1
  13. package/dist/components/NodeInfoPanel.js +88 -67
  14. package/dist/components/NodeInfoPanel.js.map +1 -1
  15. package/dist/components/NodeTooltip.d.ts +1 -0
  16. package/dist/components/NodeTooltip.d.ts.map +1 -1
  17. package/dist/components/NodeTooltip.js +12 -2
  18. package/dist/components/NodeTooltip.js.map +1 -1
  19. package/dist/components/SelectionSidebar.d.ts +1 -1
  20. package/dist/components/SelectionSidebar.d.ts.map +1 -1
  21. package/dist/edges/CustomEdge.d.ts +1 -1
  22. package/dist/edges/CustomEdge.d.ts.map +1 -1
  23. package/dist/edges/GenericEdge.d.ts +1 -1
  24. package/dist/edges/GenericEdge.d.ts.map +1 -1
  25. package/dist/hooks/usePathBasedEvents.d.ts +1 -1
  26. package/dist/hooks/usePathBasedEvents.d.ts.map +1 -1
  27. package/dist/index.d.ts +1 -1
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/nodes/CustomNode.d.ts +1 -1
  30. package/dist/nodes/CustomNode.d.ts.map +1 -1
  31. package/dist/nodes/CustomNode.js +5 -4
  32. package/dist/nodes/CustomNode.js.map +1 -1
  33. package/dist/nodes/GenericNode.d.ts +1 -1
  34. package/dist/nodes/GenericNode.d.ts.map +1 -1
  35. package/dist/utils/animationMapping.d.ts +1 -1
  36. package/dist/utils/animationMapping.d.ts.map +1 -1
  37. package/dist/utils/graphConverter.d.ts +1 -1
  38. package/dist/utils/graphConverter.d.ts.map +1 -1
  39. package/dist/utils/orientationUtils.d.ts +1 -1
  40. package/dist/utils/orientationUtils.d.ts.map +1 -1
  41. package/package.json +2 -2
  42. package/src/components/ConfigurationSelector.tsx +1 -1
  43. package/src/components/EdgeInfoPanel.tsx +161 -167
  44. package/src/components/GraphRenderer.test.tsx +1 -1
  45. package/src/components/GraphRenderer.tsx +2 -2
  46. package/src/components/NodeInfoPanel.tsx +178 -139
  47. package/src/components/NodeTooltip.tsx +28 -0
  48. package/src/components/PendingChanges.test.tsx +1 -1
  49. package/src/components/SelectionSidebar.tsx +1 -1
  50. package/src/edges/CustomEdge.tsx +1 -1
  51. package/src/edges/GenericEdge.tsx +1 -1
  52. package/src/hooks/usePathBasedEvents.ts +1 -1
  53. package/src/index.ts +1 -1
  54. package/src/nodes/CustomNode.tsx +6 -2
  55. package/src/nodes/GenericNode.tsx +1 -1
  56. package/src/stories/AnimationWorkshop.stories.tsx +1 -1
  57. package/src/stories/CanvasEdgeTypes.stories.tsx +1 -1
  58. package/src/stories/CanvasNodeTypes.stories.tsx +1 -1
  59. package/src/stories/ColorPriority.stories.tsx +1 -1
  60. package/src/stories/EventDrivenAnimations.stories.tsx +1 -1
  61. package/src/stories/GraphOrientation.stories.tsx +2 -2
  62. package/src/stories/GraphRenderer.stories.tsx +253 -1
  63. package/src/stories/MultiConfig.stories.tsx +1 -1
  64. package/src/stories/MultiDirectionalConnections.stories.tsx +1 -1
  65. package/src/stories/NodeFieldsAudit.stories.tsx +1 -1
  66. package/src/stories/NodeShapes.stories.tsx +1 -1
  67. package/src/stories/OtelComponents.stories.tsx +1 -1
  68. package/src/stories/TraceViewer.stories.tsx +1 -1
  69. package/src/stories/data/graph-converter-test-execution.json +256 -38
  70. package/src/stories/data/graph-converter-validated-execution.json +6 -6
  71. package/src/utils/animationMapping.ts +1 -1
  72. package/src/utils/graphConverter.ts +1 -1
  73. package/src/utils/orientationUtils.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from 'react';
2
- import type { NodeState, NodeTypeDefinition, JsonValue } from '@principal-ai/principal-view-core/browser';
2
+ import type { NodeState, NodeTypeDefinition, JsonValue } from '@principal-ai/principal-view-core';
3
3
  import { useTheme } from '@principal-ade/industry-theme';
4
4
  import { resolveIcon } from '../utils/iconResolver';
5
5
 
@@ -164,17 +164,17 @@ export const NodeInfoPanel: React.FC<NodeInfoPanelProps> = ({
164
164
  <div
165
165
  style={{
166
166
  position: 'absolute',
167
- top: '60px',
168
- right: '20px',
167
+ bottom: 0,
168
+ left: 0,
169
+ right: 0,
169
170
  backgroundColor: theme.colors.background,
170
171
  color: theme.colors.text,
171
- borderRadius: '8px',
172
- boxShadow: '0 4px 12px rgba(0,0,0,0.15)',
173
- padding: '16px',
174
- minWidth: '250px',
175
- maxWidth: '350px',
172
+ borderTop: `2px solid ${nodeColor}`,
173
+ boxShadow: '0 -4px 12px rgba(0,0,0,0.15)',
174
+ padding: '16px 24px',
176
175
  zIndex: 1000,
177
- border: `1px solid ${theme.colors.border}`,
176
+ maxHeight: '40%',
177
+ overflowY: 'auto',
178
178
  }}
179
179
  >
180
180
  {/* Header - shows node name */}
@@ -182,14 +182,17 @@ export const NodeInfoPanel: React.FC<NodeInfoPanelProps> = ({
182
182
  style={{
183
183
  display: 'flex',
184
184
  justifyContent: 'space-between',
185
- alignItems: 'center',
186
- marginBottom: '12px',
187
- paddingBottom: '8px',
188
- borderBottom: `2px solid ${nodeColor}`,
185
+ alignItems: 'flex-start',
186
+ marginBottom: '16px',
189
187
  }}
190
188
  >
191
- <div style={{ fontWeight: theme.fontWeights.bold, fontSize: theme.fontSizes[1], fontFamily: theme.fonts.body, color: nodeColor }}>
192
- {node.name || node.id}
189
+ <div style={{ display: 'flex', alignItems: 'center', gap: '12px', flex: 1 }}>
190
+ <div style={{ fontWeight: theme.fontWeights.bold, fontSize: theme.fontSizes[2], fontFamily: theme.fonts.body, color: nodeColor }}>
191
+ {node.name || node.id}
192
+ </div>
193
+ <div style={{ fontSize: theme.fontSizes[0], fontFamily: theme.fonts.body, color: theme.colors.textMuted }}>
194
+ {node.type}
195
+ </div>
193
196
  </div>
194
197
  <button
195
198
  onClick={onClose}
@@ -200,144 +203,180 @@ export const NodeInfoPanel: React.FC<NodeInfoPanelProps> = ({
200
203
  fontSize: theme.fontSizes[3],
201
204
  fontFamily: theme.fonts.body,
202
205
  color: theme.colors.textSecondary,
203
- padding: '0',
204
- width: '24px',
205
- height: '24px',
206
+ padding: '4px',
207
+ width: '28px',
208
+ height: '28px',
206
209
  display: 'flex',
207
210
  alignItems: 'center',
208
211
  justifyContent: 'center',
212
+ borderRadius: '4px',
213
+ transition: 'background-color 0.15s',
214
+ }}
215
+ onMouseEnter={(e) => {
216
+ e.currentTarget.style.backgroundColor = theme.colors.muted;
217
+ }}
218
+ onMouseLeave={(e) => {
219
+ e.currentTarget.style.backgroundColor = 'transparent';
209
220
  }}
210
221
  >
211
222
  ×
212
223
  </button>
213
224
  </div>
214
225
 
215
- {/* Description - first field under header */}
216
- {node.data?.description && (
217
- <div style={{ marginBottom: '12px' }}>
218
- <div style={{ fontSize: theme.fontSizes[0], fontFamily: theme.fonts.body, color: theme.colors.textSecondary, marginBottom: '4px' }}>
219
- Description
220
- </div>
221
- <div style={{ fontSize: theme.fontSizes[0], fontFamily: theme.fonts.body }}>{String(node.data.description)}</div>
222
- </div>
223
- )}
226
+ {/* Content - use horizontal layout for better space usage */}
227
+ <div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(300px, 1fr))', gap: '24px' }}>
224
228
 
225
- {/* Sources - shown after description */}
226
- {sources.length > 0 && (
227
- <div style={{ marginBottom: '12px' }}>
228
- <div style={{ fontSize: theme.fontSizes[0], fontFamily: theme.fonts.body, color: theme.colors.textSecondary, marginBottom: '4px' }}>
229
- Sources
230
- </div>
231
- <div style={{ display: 'flex', flexWrap: 'wrap', gap: '4px' }}>
232
- {sources.map((source, index) =>
233
- onSourceClick ? (
234
- <button
235
- key={index}
236
- onClick={() => onSourceClick(node.id, source)}
237
- style={{
238
- fontSize: theme.fontSizes[0],
239
- fontFamily: theme.fonts.body,
240
- padding: '2px 8px',
241
- backgroundColor: theme.colors.muted,
242
- borderRadius: '4px',
243
- color: theme.colors.textSecondary,
244
- border: 'none',
245
- cursor: 'pointer',
246
- transition: 'background-color 0.15s, color 0.15s',
247
- }}
248
- onMouseEnter={(e) => {
249
- e.currentTarget.style.backgroundColor = theme.colors.primary;
250
- e.currentTarget.style.color = theme.colors.background;
251
- }}
252
- onMouseLeave={(e) => {
253
- e.currentTarget.style.backgroundColor = theme.colors.muted;
254
- e.currentTarget.style.color = theme.colors.textSecondary;
255
- }}
256
- >
257
- {source}
258
- </button>
259
- ) : (
260
- <span
261
- key={index}
262
- style={{
263
- fontSize: theme.fontSizes[0],
264
- fontFamily: theme.fonts.body,
265
- padding: '2px 8px',
266
- backgroundColor: theme.colors.muted,
267
- borderRadius: '4px',
268
- color: theme.colors.textSecondary,
269
- }}
270
- >
271
- {source}
272
- </span>
273
- )
229
+ {/* Left column - Description and basic info */}
230
+ <div>
231
+ {/* Description - first field under header */}
232
+ {node.data?.description && (
233
+ <div style={{ marginBottom: '12px' }}>
234
+ <div style={{ fontSize: theme.fontSizes[0], fontFamily: theme.fonts.body, color: theme.colors.textSecondary, marginBottom: '4px' }}>
235
+ Description
236
+ </div>
237
+ <div style={{ fontSize: theme.fontSizes[0], fontFamily: theme.fonts.body }}>{String(node.data.description)}</div>
238
+ </div>
239
+ )}
240
+
241
+ {/* OTEL Info */}
242
+ {otelInfo && (
243
+ <div style={{ marginBottom: '12px' }}>
244
+ <div style={{ fontSize: theme.fontSizes[0], fontFamily: theme.fonts.body, color: theme.colors.textSecondary, marginBottom: '4px' }}>
245
+ OpenTelemetry
246
+ </div>
247
+ <div style={{ display: 'flex', flexWrap: 'wrap', gap: '6px', alignItems: 'center' }}>
248
+ {/* Kind badge */}
249
+ {otelInfo.kind && (
250
+ <span
251
+ style={{
252
+ fontSize: theme.fontSizes[0],
253
+ fontWeight: theme.fontWeights.semibold,
254
+ fontFamily: theme.fonts.body,
255
+ padding: '3px 8px',
256
+ borderRadius: '4px',
257
+ textTransform: 'uppercase',
258
+ color: 'white',
259
+ backgroundColor:
260
+ otelInfo.kind === 'type'
261
+ ? '#4A90E2'
262
+ : otelInfo.kind === 'service'
263
+ ? '#7ED321'
264
+ : otelInfo.kind === 'instance'
265
+ ? '#9B59B6'
266
+ : '#888',
267
+ }}
268
+ >
269
+ {otelInfo.kind}
270
+ </span>
274
271
  )}
275
- </div>
272
+ {/* Category */}
273
+ {otelInfo.category && (
274
+ <span
275
+ style={{
276
+ fontSize: theme.fontSizes[0],
277
+ fontFamily: theme.fonts.body,
278
+ color: theme.colors.textSecondary,
279
+ }}
280
+ >
281
+ {otelInfo.category}
282
+ </span>
283
+ )}
284
+ {/* NEW badge */}
285
+ {otelInfo.isNew && (
286
+ <span
287
+ style={{
288
+ fontSize: theme.fontSizes[0],
289
+ fontWeight: theme.fontWeights.semibold,
290
+ fontFamily: theme.fonts.body,
291
+ padding: '2px 6px',
292
+ borderRadius: '3px',
293
+ backgroundColor: '#F5A623',
294
+ color: 'white',
295
+ }}
296
+ >
297
+ NEW
298
+ </span>
299
+ )}
300
+ </div>
301
+ </div>
302
+ )}
276
303
  </div>
277
- )}
278
304
 
279
- {/* OTEL Info - shown after sources */}
280
- {otelInfo && (
281
- <div style={{ marginBottom: '12px' }}>
282
- <div style={{ fontSize: theme.fontSizes[0], fontFamily: theme.fonts.body, color: theme.colors.textSecondary, marginBottom: '4px' }}>
283
- OpenTelemetry
284
- </div>
285
- <div style={{ display: 'flex', flexWrap: 'wrap', gap: '6px', alignItems: 'center' }}>
286
- {/* Kind badge */}
287
- {otelInfo.kind && (
288
- <span
289
- style={{
290
- fontSize: theme.fontSizes[0],
291
- fontWeight: theme.fontWeights.semibold,
292
- fontFamily: theme.fonts.body,
293
- padding: '3px 8px',
294
- borderRadius: '4px',
295
- textTransform: 'uppercase',
296
- color: 'white',
297
- backgroundColor:
298
- otelInfo.kind === 'type'
299
- ? '#4A90E2'
300
- : otelInfo.kind === 'service'
301
- ? '#7ED321'
302
- : otelInfo.kind === 'instance'
303
- ? '#9B59B6'
304
- : '#888',
305
- }}
306
- >
307
- {otelInfo.kind}
308
- </span>
309
- )}
310
- {/* Category */}
311
- {otelInfo.category && (
312
- <span
313
- style={{
314
- fontSize: theme.fontSizes[0],
315
- fontFamily: theme.fonts.body,
316
- color: theme.colors.textSecondary,
317
- }}
318
- >
319
- {otelInfo.category}
320
- </span>
321
- )}
322
- {/* NEW badge */}
323
- {otelInfo.isNew && (
324
- <span
325
- style={{
326
- fontSize: theme.fontSizes[0],
327
- fontWeight: theme.fontWeights.semibold,
328
- fontFamily: theme.fonts.body,
329
- padding: '2px 6px',
330
- borderRadius: '3px',
331
- backgroundColor: '#F5A623',
332
- color: 'white',
333
- }}
334
- >
335
- NEW
336
- </span>
337
- )}
338
- </div>
305
+ {/* Right column - Sources and other metadata */}
306
+ <div>
307
+ {/* Sources */}
308
+ {sources.length > 0 && (
309
+ <div style={{ marginBottom: '12px' }}>
310
+ <div style={{ fontSize: theme.fontSizes[0], fontFamily: theme.fonts.body, color: theme.colors.textSecondary, marginBottom: '4px' }}>
311
+ Sources
312
+ </div>
313
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '4px' }}>
314
+ {sources.map((source, index) =>
315
+ onSourceClick ? (
316
+ <button
317
+ key={index}
318
+ onClick={() => {
319
+ console.log('Source clicked:', source, 'from node:', node.id);
320
+ onSourceClick(node.id, source);
321
+ }}
322
+ style={{
323
+ fontSize: theme.fontSizes[0],
324
+ fontFamily: 'monospace',
325
+ padding: '6px 10px',
326
+ backgroundColor: theme.colors.muted,
327
+ borderRadius: '4px',
328
+ color: theme.colors.primary,
329
+ border: `1px solid ${theme.colors.border}`,
330
+ cursor: 'pointer',
331
+ transition: 'all 0.15s',
332
+ textAlign: 'left',
333
+ width: '100%',
334
+ textDecoration: 'underline',
335
+ textDecorationStyle: 'dotted',
336
+ textDecorationColor: theme.colors.primary,
337
+ }}
338
+ onMouseEnter={(e) => {
339
+ e.currentTarget.style.backgroundColor = theme.colors.primary;
340
+ e.currentTarget.style.color = theme.colors.background;
341
+ e.currentTarget.style.borderColor = theme.colors.primary;
342
+ e.currentTarget.style.textDecoration = 'underline';
343
+ e.currentTarget.style.textDecorationColor = theme.colors.background;
344
+ }}
345
+ onMouseLeave={(e) => {
346
+ e.currentTarget.style.backgroundColor = theme.colors.muted;
347
+ e.currentTarget.style.color = theme.colors.primary;
348
+ e.currentTarget.style.borderColor = theme.colors.border;
349
+ e.currentTarget.style.textDecoration = 'underline';
350
+ e.currentTarget.style.textDecorationStyle = 'dotted';
351
+ e.currentTarget.style.textDecorationColor = theme.colors.primary;
352
+ }}
353
+ >
354
+ {source}
355
+ </button>
356
+ ) : (
357
+ <span
358
+ key={index}
359
+ style={{
360
+ fontSize: theme.fontSizes[0],
361
+ fontFamily: 'monospace',
362
+ padding: '6px 10px',
363
+ backgroundColor: theme.colors.muted,
364
+ borderRadius: '4px',
365
+ color: theme.colors.textSecondary,
366
+ display: 'block',
367
+ border: `1px solid ${theme.colors.border}`,
368
+ }}
369
+ >
370
+ {source}
371
+ </span>
372
+ )
373
+ )}
374
+ </div>
375
+ </div>
376
+ )}
339
377
  </div>
340
- )}
378
+
379
+ </div>
341
380
 
342
381
  {/* Expand/Collapse button for additional details */}
343
382
  <button
@@ -11,6 +11,7 @@ export interface OtelInfo {
11
11
  export interface NodeTooltipProps {
12
12
  description?: string;
13
13
  otel?: OtelInfo;
14
+ sources?: string[];
14
15
  visible: boolean;
15
16
  /** Reference to the node element for positioning */
16
17
  nodeRef?: React.RefObject<HTMLDivElement>;
@@ -23,6 +24,7 @@ export interface NodeTooltipProps {
23
24
  export const NodeTooltip: React.FC<NodeTooltipProps> = ({
24
25
  description,
25
26
  otel,
27
+ sources,
26
28
  visible,
27
29
  nodeRef,
28
30
  }) => {
@@ -161,6 +163,32 @@ export const NodeTooltip: React.FC<NodeTooltipProps> = ({
161
163
  <div style={{ lineHeight: '1.4', color: description ? 'rgba(255,255,255,0.9)' : 'rgba(255,255,255,0.5)' }}>
162
164
  {description || 'No description'}
163
165
  </div>
166
+
167
+ {/* Sources */}
168
+ {sources && sources.length > 0 && (
169
+ <div style={{ marginTop: '8px', borderTop: '1px solid rgba(255,255,255,0.2)', paddingTop: '6px' }}>
170
+ <div style={{
171
+ fontSize: theme.fontSizes[0],
172
+ fontWeight: theme.fontWeights.semibold,
173
+ color: 'rgba(255,255,255,0.7)',
174
+ marginBottom: '4px'
175
+ }}>
176
+ Sources:
177
+ </div>
178
+ <div style={{ fontSize: theme.fontSizes[0], color: 'rgba(255,255,255,0.8)' }}>
179
+ {sources.map((source, index) => (
180
+ <div key={index} style={{
181
+ fontFamily: 'monospace',
182
+ fontSize: theme.fontSizes[0],
183
+ marginTop: index > 0 ? '2px' : 0,
184
+ wordBreak: 'break-all'
185
+ }}>
186
+ {source}
187
+ </div>
188
+ ))}
189
+ </div>
190
+ </div>
191
+ )}
164
192
  </div>
165
193
  );
166
194
 
@@ -2,7 +2,7 @@ import { describe, expect, test, mock } from 'bun:test';
2
2
  import React, { createRef } from 'react';
3
3
  import { render } from '@testing-library/react';
4
4
  import { GraphRenderer, type GraphRendererHandle } from './GraphRenderer';
5
- import type { ExtendedCanvas } from '@principal-ai/principal-view-core/browser';
5
+ import type { ExtendedCanvas } from '@principal-ai/principal-view-core';
6
6
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
7
7
  import { Window } from 'happy-dom';
8
8
 
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from 'react';
2
- import type { NodeState, NodeTypeDefinition } from '@principal-ai/principal-view-core/browser';
2
+ import type { NodeState, NodeTypeDefinition } from '@principal-ai/principal-view-core';
3
3
  import { useTheme } from '@principal-ade/industry-theme';
4
4
  import { resolveIcon } from '../utils/iconResolver';
5
5
 
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useEffect, useRef } from 'react';
2
2
  import { BaseEdge, EdgeLabelRenderer, getBezierPath } from '@xyflow/react';
3
3
  import type { EdgeProps } from '@xyflow/react';
4
- import type { EdgeTypeDefinition } from '@principal-ai/principal-view-core/browser';
4
+ import type { EdgeTypeDefinition } from '@principal-ai/principal-view-core';
5
5
  import { useTheme } from '@principal-ade/industry-theme';
6
6
 
7
7
  export interface CustomEdgeData extends Record<string, unknown> {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { EdgeTypeDefinition } from '@principal-ai/principal-view-core/browser';
2
+ import type { EdgeTypeDefinition } from '@principal-ai/principal-view-core';
3
3
 
4
4
  export interface GenericEdgeProps {
5
5
  /** Edge ID */
@@ -11,7 +11,7 @@ import type {
11
11
  ComponentActionEvent,
12
12
  EdgeAnimationEvent,
13
13
  PathBasedEvent,
14
- } from '@principal-ai/principal-view-core/browser';
14
+ } from '@principal-ai/principal-view-core';
15
15
  import {
16
16
  logLevelToNodeAnimation,
17
17
  actionToNodeAnimation,
package/src/index.ts CHANGED
@@ -26,7 +26,7 @@ export type {
26
26
  ComponentLibrary,
27
27
  LibraryNodeComponent,
28
28
  LibraryEdgeComponent,
29
- } from '@principal-ai/principal-view-core/browser';
29
+ } from '@principal-ai/principal-view-core';
30
30
 
31
31
  // Export components
32
32
  export { GraphRenderer } from './components/GraphRenderer';
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useRef } from 'react';
2
2
  import { Handle, Position, NodeResizer } from '@xyflow/react';
3
3
  import type { NodeProps } from '@xyflow/react';
4
- import type { NodeTypeDefinition } from '@principal-ai/principal-view-core/browser';
4
+ import type { NodeTypeDefinition } from '@principal-ai/principal-view-core';
5
5
  import { useTheme } from '@principal-ade/industry-theme';
6
6
  import { resolveIcon } from '../utils/iconResolver';
7
7
  import { NodeTooltip } from '../components/NodeTooltip';
@@ -81,9 +81,10 @@ export const CustomNode: React.FC<NodeProps<any>> = ({ data, selected, dragging
81
81
  // Only show tooltip when hovering, not dragging, and shift key is pressed
82
82
  const showTooltip = isHovered && !dragging && shiftKeyPressed;
83
83
 
84
- // Extract OTEL info and description for tooltip
84
+ // Extract OTEL info, description, and sources for tooltip
85
85
  const otelInfo = nodeData?.otel as OtelInfo | undefined;
86
86
  const description = nodeData?.description as string | undefined;
87
+ const sources = nodeData?.sources as string[] | undefined;
87
88
 
88
89
  // OTEL kind badge colors
89
90
  const getOtelBadgeColor = (kind: string) => {
@@ -516,6 +517,7 @@ export const CustomNode: React.FC<NodeProps<any>> = ({ data, selected, dragging
516
517
  <NodeTooltip
517
518
  description={description}
518
519
  otel={otelInfo}
520
+ sources={sources}
519
521
  visible={showTooltip}
520
522
  nodeRef={nodeRef}
521
523
  />
@@ -571,6 +573,7 @@ export const CustomNode: React.FC<NodeProps<any>> = ({ data, selected, dragging
571
573
  <NodeTooltip
572
574
  description={description}
573
575
  otel={otelInfo}
576
+ sources={sources}
574
577
  visible={showTooltip}
575
578
  nodeRef={nodeRef}
576
579
  />
@@ -651,6 +654,7 @@ export const CustomNode: React.FC<NodeProps<any>> = ({ data, selected, dragging
651
654
  <NodeTooltip
652
655
  description={description}
653
656
  otel={otelInfo}
657
+ sources={sources}
654
658
  visible={showTooltip}
655
659
  nodeRef={nodeRef}
656
660
  />
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { NodeTypeDefinition } from '@principal-ai/principal-view-core/browser';
2
+ import type { NodeTypeDefinition } from '@principal-ai/principal-view-core';
3
3
 
4
4
  export interface GenericNodeProps {
5
5
  /** Node ID */
@@ -5,7 +5,7 @@ import { CustomNode } from '../nodes/CustomNode';
5
5
  import { CustomEdge } from '../edges/CustomEdge';
6
6
  import type { CustomNodeData } from '../nodes/CustomNode';
7
7
  import type { CustomEdgeData } from '../edges/CustomEdge';
8
- import type { NodeTypeDefinition, EdgeTypeDefinition } from '@principal-ai/principal-view-core/browser';
8
+ import type { NodeTypeDefinition, EdgeTypeDefinition } from '@principal-ai/principal-view-core';
9
9
  import React from 'react';
10
10
 
11
11
  const meta = {
@@ -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/browser';
4
+ import type { ExtendedCanvas } from '@principal-ai/principal-view-core';
5
5
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
6
6
 
7
7
  const meta = {
@@ -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/browser';
4
+ import type { ExtendedCanvas } from '@principal-ai/principal-view-core';
5
5
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
6
6
 
7
7
  const meta = {
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useEffect } from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
3
  import { GraphRenderer } from '../components/GraphRenderer';
4
- import type { ExtendedCanvas, GraphEvent } from '@principal-ai/principal-view-core/browser';
4
+ import type { ExtendedCanvas, GraphEvent } from '@principal-ai/principal-view-core';
5
5
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
6
6
 
7
7
  // Helper component that sets initial node states via events
@@ -1,6 +1,6 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { GraphRenderer } from '../components/GraphRenderer';
3
- import type { GraphEvent, ExtendedCanvas } from '@principal-ai/principal-view-core/browser';
3
+ import type { GraphEvent, ExtendedCanvas } from '@principal-ai/principal-view-core';
4
4
  import { useState, useEffect } from 'react';
5
5
  import React from 'react';
6
6
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
@@ -1,10 +1,10 @@
1
1
  import React, { useState, useMemo } 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/browser';
4
+ import type { ExtendedCanvas } from '@principal-ai/principal-view-core';
5
5
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
6
6
  import { swapGraphOrientation } from '../utils/orientationUtils';
7
- import { CanvasConverter } from '@principal-ai/principal-view-core/browser';
7
+ import { CanvasConverter } from '@principal-ai/principal-view-core';
8
8
 
9
9
  const meta = {
10
10
  title: 'Features/Graph Orientation',