@principal-ai/principal-view-react 0.16.56 → 0.16.57

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 (102) hide show
  1. package/dist/graphify/consolidated.d.ts +16 -1
  2. package/dist/graphify/consolidated.d.ts.map +1 -1
  3. package/dist/graphify/index.d.ts +1 -1
  4. package/dist/graphify/index.d.ts.map +1 -1
  5. package/dist/graphify/index.js.map +1 -1
  6. package/dist/graphify/kind.d.ts +1 -1
  7. package/dist/graphify/kind.d.ts.map +1 -1
  8. package/dist/graphify/kind.js +7 -1
  9. package/dist/graphify/kind.js.map +1 -1
  10. package/dist/index.d.ts +3 -2
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +2 -1
  13. package/dist/index.js.map +1 -1
  14. package/dist/pierre/constructColors.d.ts +24 -0
  15. package/dist/pierre/constructColors.d.ts.map +1 -0
  16. package/dist/pierre/constructColors.js +91 -0
  17. package/dist/pierre/constructColors.js.map +1 -0
  18. package/dist/stories/Subsystem/ComponentGraph/fixtures.d.ts +8 -0
  19. package/dist/stories/Subsystem/ComponentGraph/fixtures.d.ts.map +1 -0
  20. package/dist/stories/Subsystem/ComponentGraph/fixtures.js +116 -0
  21. package/dist/stories/Subsystem/ComponentGraph/fixtures.js.map +1 -0
  22. package/dist/subsystem/ComponentDeclaration.d.ts +2 -2
  23. package/dist/subsystem/ComponentDeclaration.d.ts.map +1 -1
  24. package/dist/subsystem/ComponentDeclaration.js +12 -11
  25. package/dist/subsystem/ComponentDeclaration.js.map +1 -1
  26. package/dist/subsystem/SubsystemComponentGraph.d.ts.map +1 -1
  27. package/dist/subsystem/SubsystemComponentGraph.js +22 -1
  28. package/dist/subsystem/SubsystemComponentGraph.js.map +1 -1
  29. package/dist/subsystem/formatDeclaration.d.ts.map +1 -1
  30. package/dist/subsystem/formatDeclaration.js +49 -10
  31. package/dist/subsystem/formatDeclaration.js.map +1 -1
  32. package/dist/subsystem/model.d.ts +55 -12
  33. package/dist/subsystem/model.d.ts.map +1 -1
  34. package/dist/subsystem/model.js +54 -24
  35. package/dist/subsystem/model.js.map +1 -1
  36. package/dist/subsystem/nodes.d.ts +4 -1
  37. package/dist/subsystem/nodes.d.ts.map +1 -1
  38. package/dist/subsystem/nodes.js +70 -21
  39. package/dist/subsystem/nodes.js.map +1 -1
  40. package/dist/subsystem/tokenizeComponent.js +1 -1
  41. package/dist/subsystem/tokenizeComponent.js.map +1 -1
  42. package/package.json +1 -1
  43. package/src/graphify/consolidated.ts +18 -1
  44. package/src/graphify/index.ts +1 -0
  45. package/src/graphify/kind.ts +7 -1
  46. package/src/index.ts +3 -2
  47. package/src/pierre/constructColors.test.ts +52 -0
  48. package/src/pierre/constructColors.ts +112 -0
  49. package/src/stories/{BoundaryNodes.stories.tsx → Audit/BoundaryNodes.stories.tsx} +1 -1
  50. package/src/stories/{CanvasEdgeTypes.stories.tsx → Audit/CanvasEdgeTypes.stories.tsx} +1 -1
  51. package/src/stories/{CanvasNodeTypes.stories.tsx → Audit/CanvasNodeTypes.stories.tsx} +1 -1
  52. package/src/stories/{ColorPriority.stories.tsx → Audit/ColorPriority.stories.tsx} +1 -1
  53. package/src/stories/{DiamondBadges.stories.tsx → Audit/DiamondBadges.stories.tsx} +1 -1
  54. package/src/stories/{NodeDimensionsTesting.stories.tsx → Audit/NodeDimensionsTesting.stories.tsx} +2 -2
  55. package/src/stories/{NodeFieldsAudit.stories.tsx → Audit/NodeFieldsAudit.stories.tsx} +1 -1
  56. package/src/stories/{NodeFontSizeTesting.stories.tsx → Audit/NodeFontSizeTesting.stories.tsx} +2 -2
  57. package/src/stories/{NodeShapes.stories.tsx → Audit/NodeShapes.stories.tsx} +1 -1
  58. package/src/stories/{WideNodesTesting.stories.tsx → Audit/WideNodesTesting.stories.tsx} +2 -2
  59. package/src/stories/{dashboard → Components}/DashboardRenderer.stories.tsx +2 -2
  60. package/src/stories/{GraphRenderer.stories.tsx → Components/GraphRenderer.stories.tsx} +2 -2
  61. package/src/stories/{MultiCanvasRenderer.stories.tsx → Components/MultiCanvasRenderer.stories.tsx} +2 -2
  62. package/src/stories/{SequenceDiagram.stories.tsx → Components/SequenceDiagram.stories.tsx} +2 -2
  63. package/src/stories/{StateView.stories.tsx → Components/StateView.stories.tsx} +2 -2
  64. package/src/stories/{TraceViewer.stories.tsx → Components/TraceViewer.stories.tsx} +3 -3
  65. package/src/stories/{WorkflowSequenceDiagram.stories.tsx → Components/WorkflowSequenceDiagram.stories.tsx} +1 -1
  66. package/src/stories/{AnimationWorkshop.stories.tsx → Features/AnimationWorkshop.stories.tsx} +5 -5
  67. package/src/stories/{ChangeTypeVisual.stories.tsx → Features/ChangeTypeVisual.stories.tsx} +2 -2
  68. package/src/stories/{EventDrivenAnimations.stories.tsx → Features/EventDrivenAnimations.stories.tsx} +2 -2
  69. package/src/stories/{MultiConfig.stories.tsx → Features/MultiConfig.stories.tsx} +2 -2
  70. package/src/stories/{ElkEdgeRouting.stories.tsx → Layout/ElkEdgeRouting.stories.tsx} +2 -2
  71. package/src/stories/{GraphOrientation.stories.tsx → Layout/GraphOrientation.stories.tsx} +3 -3
  72. package/src/stories/{MultiDirectionalConnections.stories.tsx → Layout/MultiDirectionalConnections.stories.tsx} +2 -2
  73. package/src/stories/{NodeDefinitionComparison.stories.tsx → Nodes/NodeDefinitionComparison.stories.tsx} +2 -2
  74. package/src/stories/{NodeNameFallbacks.stories.tsx → Nodes/NodeNameFallbacks.stories.tsx} +2 -2
  75. package/src/stories/{NumericColors.stories.tsx → Nodes/NumericColors.stories.tsx} +2 -2
  76. package/src/stories/{EventNameDisplay.stories.tsx → OTEL/EventNameDisplay.stories.tsx} +2 -2
  77. package/src/stories/{EventNameFallback.stories.tsx → OTEL/EventNameFallback.stories.tsx} +2 -2
  78. package/src/stories/{OtelComponents.stories.tsx → OTEL/OtelComponents.stories.tsx} +3 -3
  79. package/src/stories/{OtelNodeTypesPrototype.stories.tsx → OTEL/OtelNodeTypesPrototype.stories.tsx} +2 -2
  80. package/src/stories/{RawEventCards.stories.tsx → OTEL/RawEventCards.stories.tsx} +3 -3
  81. package/src/stories/{SpanBadges.stories.tsx → OTEL/SpanBadges.stories.tsx} +1 -1
  82. package/src/stories/{ValidationEventsCanvas.stories.tsx → OTEL/ValidationEventsCanvas.stories.tsx} +3 -3
  83. package/src/stories/{BacklogMdCanvases.stories.tsx → RealWorld/BacklogMdCanvases.stories.tsx} +2 -2
  84. package/src/stories/{FileCitySequence.stories.tsx → RealWorld/FileCitySequence.stories.tsx} +4 -4
  85. package/src/stories/{RealCanvasFiles.stories.tsx → RealWorld/RealCanvasFiles.stories.tsx} +7 -7
  86. package/src/stories/{ComponentDeclarationAudit.stories.tsx → Subsystem/ComponentDeclarationAudit.stories.tsx} +19 -20
  87. package/src/stories/Subsystem/ComponentGraph/Appearance.stories.tsx +365 -0
  88. package/src/stories/Subsystem/ComponentGraph/Basics.stories.tsx +137 -0
  89. package/src/stories/Subsystem/ComponentGraph/Captures.stories.tsx +238 -0
  90. package/src/stories/Subsystem/ComponentGraph/DetailPanel.stories.tsx +315 -0
  91. package/src/stories/Subsystem/ComponentGraph/Scenarios.stories.tsx +959 -0
  92. package/src/stories/Subsystem/ComponentGraph/Spotlights.stories.tsx +646 -0
  93. package/src/stories/Subsystem/ComponentGraph/fixtures.ts +129 -0
  94. package/src/subsystem/ComponentDeclaration.tsx +13 -13
  95. package/src/subsystem/SubsystemComponentGraph.tsx +25 -5
  96. package/src/subsystem/formatDeclaration.ts +57 -11
  97. package/src/subsystem/model.test.ts +38 -6
  98. package/src/subsystem/model.ts +108 -31
  99. package/src/subsystem/nodes.tsx +103 -27
  100. package/src/subsystem/tokenizeComponent.ts +1 -1
  101. package/src/stories/SubsystemComponentGraph.stories.tsx +0 -1225
  102. /package/src/stories/{dashboard/sample-dashboards → data}/activity-feed-analytics.dashboard.json +0 -0
@@ -0,0 +1,112 @@
1
+ /**
2
+ * Construct colors derived from the Pierre syntax themes.
3
+ *
4
+ * Single source of truth for node coloring: the same palette the declaration
5
+ * panel and Pierre file views render with. The themes are static JSON objects
6
+ * (VS Code/Shiki `tokenColors` scope rules), so extraction is a synchronous
7
+ * scope lookup — no Shiki call, no React context. Dark/light (and any future
8
+ * variant) resolves by mode at render time.
9
+ *
10
+ * Syntax themes deliberately reuse one hue across related scopes (class and
11
+ * type share `entity.name.class`); the node taxonomy needs distinguishable
12
+ * colors, so colliding constructs take a shade of the scope color — derived
13
+ * from the theme itself, toward white in dark themes and toward black in
14
+ * light themes.
15
+ */
16
+
17
+ import type { SubsystemComponentConstruct } from '../subsystem/model';
18
+ import type { PierreSyntaxThemeName } from './pierreSyntaxTheme';
19
+ import pierreDark from '@pierre/theme/pierre-dark';
20
+ import pierreLight from '@pierre/theme/pierre-light';
21
+
22
+ interface PierreThemeInput {
23
+ type: 'dark' | 'light';
24
+ colors: Record<string, string>;
25
+ tokenColors: Array<{ scope: string | string[]; settings: { foreground?: string } }>;
26
+ }
27
+
28
+ const THEMES: Record<PierreSyntaxThemeName, PierreThemeInput> = {
29
+ 'pierre-dark': pierreDark as unknown as PierreThemeInput,
30
+ 'pierre-light': pierreLight as unknown as PierreThemeInput,
31
+ };
32
+
33
+ /** First rule whose scope list contains the exact scope. */
34
+ function scopeColor(theme: PierreThemeInput, scope: string): string | undefined {
35
+ for (const rule of theme.tokenColors) {
36
+ const scopes = Array.isArray(rule.scope) ? rule.scope : [rule.scope];
37
+ if (scopes.includes(scope)) return rule.settings.foreground;
38
+ }
39
+ return undefined;
40
+ }
41
+
42
+ function hexToRgb(hex: string): [number, number, number] {
43
+ const h = hex.replace('#', '');
44
+ const full = h.length === 3 ? h.split('').map((c) => c + c).join('') : h;
45
+ const n = parseInt(full.slice(0, 6), 16);
46
+ return [(n >> 16) & 255, (n >> 8) & 255, n & 255];
47
+ }
48
+
49
+ function rgbToHex([r, g, b]: [number, number, number]): string {
50
+ const to = (v: number) => Math.max(0, Math.min(255, Math.round(v))).toString(16).padStart(2, '0');
51
+ return `#${to(r)}${to(g)}${to(b)}`;
52
+ }
53
+
54
+ /** Linear blend of two hex colors; amount 0 = base, 1 = other. */
55
+ function mix(hex: string, other: string, amount: number): string {
56
+ const base = hexToRgb(hex);
57
+ const target = hexToRgb(other);
58
+ return rgbToHex([
59
+ base[0] + (target[0] - base[0]) * amount,
60
+ base[1] + (target[1] - base[1]) * amount,
61
+ base[2] + (target[2] - base[2]) * amount,
62
+ ]);
63
+ }
64
+
65
+ export function constructColorsFromPierreTheme(
66
+ themeName: PierreSyntaxThemeName,
67
+ ): Record<SubsystemComponentConstruct, string> {
68
+ const theme = THEMES[themeName];
69
+ // A scope the theme doesn't declare resolves to the theme's own foreground —
70
+ // still all-Pierre, never a hand-picked value.
71
+ const editorFg = theme.colors['editor.foreground'] ?? '#fafafa';
72
+ const pick = (scope: string) => scopeColor(theme, scope) ?? editorFg;
73
+ const towardBackground = theme.type === 'dark' ? lighten : darken;
74
+
75
+ const classColor = pick('entity.name.class');
76
+ const functionColor = pick('entity.name.function');
77
+ const typeColor = pick('support.type');
78
+ const moduleColor = pick('entity.name.namespace');
79
+
80
+ return {
81
+ class: classColor,
82
+ // interface/type are the type-name scope, shaded to separate them from
83
+ // class (whose declaration name shares the same hue in syntax themes)
84
+ interface: towardBackground(typeColor, 0.14),
85
+ type_alias: towardBackground(typeColor, 0.28),
86
+ function: functionColor,
87
+ method: towardBackground(functionColor, 0.14),
88
+ // enum members are constants — the generic constant hue
89
+ enum: pick('constant'),
90
+ // module and store share the constant hue — the module holds the store,
91
+ // and the store IS the retained value, so the store keeps the pure
92
+ // `variable.other.constant` color and the module takes the shade
93
+ module: towardBackground(moduleColor, 0.18),
94
+ store: pick('variable.other.constant'),
95
+ external: pick('comment'),
96
+ };
97
+ }
98
+
99
+ function lighten(hex: string, amount: number): string {
100
+ return mix(hex, '#ffffff', amount);
101
+ }
102
+
103
+ function darken(hex: string, amount: number): string {
104
+ return mix(hex, '#000000', amount);
105
+ }
106
+
107
+ /**
108
+ * The dark-theme instantiation, for consumers without a mode context (the
109
+ * bun-side excalidraw exporter). React components derive per mode instead.
110
+ */
111
+ export const CONSTRUCT_COLOR: Record<SubsystemComponentConstruct, string> =
112
+ constructColorsFromPierreTheme('pierre-dark');
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
- import { GraphRenderer } from '../components/GraphRenderer';
3
+ import { GraphRenderer } from '../../components/GraphRenderer';
4
4
  import type { ExtendedCanvas } from '@principal-ai/principal-view-core';
5
5
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import React, { useState } from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
- import { GraphRenderer } from '../components/GraphRenderer';
3
+ import { GraphRenderer } from '../../components/GraphRenderer';
4
4
  import type { ExtendedCanvas, DerivedEdge } from '@principal-ai/principal-view-core';
5
5
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
- import { GraphRenderer } from '../components/GraphRenderer';
3
+ import { GraphRenderer } from '../../components/GraphRenderer';
4
4
  import type { ExtendedCanvas } from '@principal-ai/principal-view-core';
5
5
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import React, { useState, useEffect } from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
- import { GraphRenderer } from '../components/GraphRenderer';
3
+ import { GraphRenderer } from '../../components/GraphRenderer';
4
4
  import type { ExtendedCanvas, GraphEvent, ComponentLibrary } from '@principal-ai/principal-view-core';
5
5
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
- import { GraphRenderer } from '../components/GraphRenderer';
3
+ import { GraphRenderer } from '../../components/GraphRenderer';
4
4
  import type { ExtendedCanvas } from '@principal-ai/principal-view-core';
5
5
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
6
6
 
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
- import { GraphRenderer } from '../components/GraphRenderer';
3
+ import { GraphRenderer } from '../../components/GraphRenderer';
4
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 = {
8
- title: 'Testing/Node Dimensions & Text Readability',
8
+ title: 'Audit/NodeDimensionsTesting',
9
9
  component: GraphRenderer,
10
10
  parameters: {
11
11
  layout: 'fullscreen',
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
- import { GraphRenderer } from '../components/GraphRenderer';
3
+ import { GraphRenderer } from '../../components/GraphRenderer';
4
4
  import type { ExtendedCanvas } from '@principal-ai/principal-view-core';
5
5
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
6
6
 
@@ -1,12 +1,12 @@
1
1
  import React from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
- import { GraphRenderer } from '../components/GraphRenderer';
3
+ import { GraphRenderer } from '../../components/GraphRenderer';
4
4
  import type { ExtendedCanvas } from '@principal-ai/principal-view-core';
5
5
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
6
6
  import type { Theme } from '@principal-ade/industry-theme';
7
7
 
8
8
  const meta = {
9
- title: 'Testing/Node Font Size & Dimensions',
9
+ title: 'Audit/NodeFontSizeTesting',
10
10
  component: GraphRenderer,
11
11
  parameters: {
12
12
  layout: 'fullscreen',
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
- import { GraphRenderer } from '../components/GraphRenderer';
3
+ import { GraphRenderer } from '../../components/GraphRenderer';
4
4
  import type { ExtendedCanvas } from '@principal-ai/principal-view-core';
5
5
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
6
6
 
@@ -1,12 +1,12 @@
1
1
  import React from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
- import { GraphRenderer } from '../components/GraphRenderer';
3
+ import { GraphRenderer } from '../../components/GraphRenderer';
4
4
  import type { ExtendedCanvas } from '@principal-ai/principal-view-core';
5
5
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
6
6
  import type { Theme } from '@principal-ade/industry-theme';
7
7
 
8
8
  const meta = {
9
- title: 'Testing/Wide Nodes (16px Font)',
9
+ title: 'Audit/WideNodesTesting',
10
10
  component: GraphRenderer,
11
11
  parameters: {
12
12
  layout: 'fullscreen',
@@ -7,11 +7,11 @@
7
7
  import type { Meta, StoryObj } from '@storybook/react';
8
8
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
9
9
  import { DashboardRenderer } from '../../components/dashboard';
10
- import activityFeedDashboard from './sample-dashboards/activity-feed-analytics.dashboard.json';
10
+ import activityFeedDashboard from '../data/activity-feed-analytics.dashboard.json';
11
11
  import type { DashboardDefinition } from '../../components/dashboard';
12
12
 
13
13
  const meta: Meta<typeof DashboardRenderer> = {
14
- title: 'Dashboard/DashboardRenderer',
14
+ title: 'Components/DashboardRenderer',
15
15
  component: DashboardRenderer,
16
16
  parameters: {
17
17
  layout: 'fullscreen',
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
3
  import '@xyflow/react/dist/style.css';
4
- import { GraphRenderer } from '../components/GraphRenderer';
5
- import type { GraphRendererHandle, PendingChanges } from '../components/GraphRenderer';
4
+ import { GraphRenderer } from '../../components/GraphRenderer';
5
+ import type { GraphRendererHandle, PendingChanges } from '../../components/GraphRenderer';
6
6
  import type { ExtendedCanvas, PVEventSchema } from '@principal-ai/principal-view-core';
7
7
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
8
8
 
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
- import { MultiCanvasRenderer } from '../components/MultiCanvasRenderer';
4
- import type { MultiCanvasLayout } from '../components/MultiCanvasRenderer';
3
+ import { MultiCanvasRenderer } from '../../components/MultiCanvasRenderer';
4
+ import type { MultiCanvasLayout } from '../../components/MultiCanvasRenderer';
5
5
  import type { ExtendedCanvas } from '@principal-ai/principal-view-core';
6
6
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
7
7
 
@@ -1,7 +1,7 @@
1
1
  import React, { useState } from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
- import { SequenceDiagramRenderer } from '../components/SequenceDiagramRenderer';
4
- import type { SequenceEvent, SequenceEdge } from '../hooks/useSequenceLayout';
3
+ import { SequenceDiagramRenderer } from '../../components/SequenceDiagramRenderer';
4
+ import type { SequenceEvent, SequenceEdge } from '../../hooks/useSequenceLayout';
5
5
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
6
6
 
7
7
  const meta = {
@@ -5,10 +5,10 @@ import {
5
5
  type PipelineEvent,
6
6
  type EventSource,
7
7
  type PipelineEventType,
8
- } from '../components/state-view';
8
+ } from '../../components/state-view';
9
9
 
10
10
  const meta = {
11
- title: 'State View/Pipeline',
11
+ title: 'Components/StateView',
12
12
  component: PipelineView,
13
13
  parameters: {
14
14
  layout: 'centered',
@@ -1,14 +1,14 @@
1
1
  import React from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
- import { GraphRenderer } from '../components/GraphRenderer';
3
+ import { GraphRenderer } from '../../components/GraphRenderer';
4
4
  import type { ExtendedCanvas } from '@principal-ai/principal-view-core';
5
5
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
6
6
 
7
7
  // Import captured trace canvas data
8
- import testRunTrace from './__traces__/test-run.canvas.json';
8
+ import testRunTrace from '../__traces__/test-run.canvas.json';
9
9
 
10
10
  const meta = {
11
- title: 'Traces/TraceViewer',
11
+ title: 'Components/TraceViewer',
12
12
  component: GraphRenderer,
13
13
  parameters: {
14
14
  layout: 'fullscreen',
@@ -1,6 +1,6 @@
1
1
  import React, { useState } from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
- import { WorkflowSequenceDiagram } from '../components/WorkflowSequenceDiagram';
3
+ import { WorkflowSequenceDiagram } from '../../components/WorkflowSequenceDiagram';
4
4
  import type { WorkflowScenario, Canvas } from '@principal-ai/principal-view-core';
5
5
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
6
6
 
@@ -1,15 +1,15 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { ReactFlow, ReactFlowProvider, Background, Controls } from '@xyflow/react';
3
3
  import '@xyflow/react/dist/style.css';
4
- import { CustomNode } from '../nodes/CustomNode';
5
- import { CustomEdge } from '../edges/CustomEdge';
6
- import type { CustomNodeData } from '../nodes/CustomNode';
7
- import type { CustomEdgeData } from '../edges/CustomEdge';
4
+ import { CustomNode } from '../../nodes/CustomNode';
5
+ import { CustomEdge } from '../../edges/CustomEdge';
6
+ import type { CustomNodeData } from '../../nodes/CustomNode';
7
+ import type { CustomEdgeData } from '../../edges/CustomEdge';
8
8
  import type { NodeTypeDefinition, EdgeTypeDefinition } from '@principal-ai/principal-view-core';
9
9
  import React from 'react';
10
10
 
11
11
  const meta = {
12
- title: 'Workshop/Animation',
12
+ title: 'Features/AnimationWorkshop',
13
13
  component: ReactFlow,
14
14
  parameters: {
15
15
  layout: 'fullscreen',
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
3
  import { ThemeProvider, slateTheme } from '@principal-ade/industry-theme';
4
- import { ChangeTypeVisual } from '../../../trail-viewer/src/mainview/components/ChangeTypeVisual';
4
+ import { ChangeTypeVisual } from '../../../../trail-viewer/src/mainview/components/ChangeTypeVisual';
5
5
 
6
6
  const meta = {
7
- title: 'Concepts/ChangeTypeVisual',
7
+ title: 'Features/ChangeTypeVisual',
8
8
  component: ChangeTypeVisual,
9
9
  decorators: [
10
10
  (Story) => (
@@ -1,12 +1,12 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
- import { GraphRenderer } from '../components/GraphRenderer';
2
+ import { GraphRenderer } from '../../components/GraphRenderer';
3
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';
7
7
 
8
8
  const meta = {
9
- title: 'Workshop/Event-Driven Animations',
9
+ title: 'Features/EventDrivenAnimations',
10
10
  component: GraphRenderer,
11
11
  parameters: {
12
12
  layout: 'fullscreen',
@@ -1,12 +1,12 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { useState } from 'react';
3
- import { GraphRenderer } from '../components/GraphRenderer';
3
+ import { GraphRenderer } from '../../components/GraphRenderer';
4
4
  import type { ExtendedCanvas } from '@principal-ai/principal-view-core';
5
5
  import React from 'react';
6
6
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
7
7
 
8
8
  const meta: Meta<typeof GraphRenderer> = {
9
- title: 'Multi-Config/Configuration Switcher',
9
+ title: 'Features/MultiConfig',
10
10
  component: GraphRenderer,
11
11
  parameters: {
12
12
  layout: 'fullscreen',
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
- import { GraphRenderer } from '../components/GraphRenderer';
3
+ import { GraphRenderer } from '../../components/GraphRenderer';
4
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 = {
8
- title: 'Layout/ELK Edge Routing',
8
+ title: 'Layout/ElkEdgeRouting',
9
9
  component: GraphRenderer,
10
10
  parameters: {
11
11
  layout: 'centered',
@@ -1,13 +1,13 @@
1
1
  import React, { useState, useMemo } from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
- import { GraphRenderer } from '../components/GraphRenderer';
3
+ import { GraphRenderer } from '../../components/GraphRenderer';
4
4
  import type { ExtendedCanvas } from '@principal-ai/principal-view-core';
5
5
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
6
- import { swapGraphOrientation } from '../utils/orientationUtils';
6
+ import { swapGraphOrientation } from '../../utils/orientationUtils';
7
7
  import { CanvasConverter } from '@principal-ai/principal-view-core';
8
8
 
9
9
  const meta = {
10
- title: 'Features/Graph Orientation',
10
+ title: 'Layout/GraphOrientation',
11
11
  component: GraphRenderer,
12
12
  parameters: {
13
13
  layout: 'centered',
@@ -1,10 +1,10 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
- import { GraphRenderer } from '../components/GraphRenderer';
2
+ import { GraphRenderer } from '../../components/GraphRenderer';
3
3
  import type { ExtendedCanvas } from '@principal-ai/principal-view-core';
4
4
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
5
5
 
6
6
  const meta = {
7
- title: 'Features/Multi-Directional Connections',
7
+ title: 'Layout/MultiDirectionalConnections',
8
8
  component: GraphRenderer,
9
9
  parameters: {
10
10
  layout: 'fullscreen',
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
- import { GraphRenderer } from '../components/GraphRenderer';
3
+ import { GraphRenderer } from '../../components/GraphRenderer';
4
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 = {
8
- title: 'Documentation/Node Definition Comparison',
8
+ title: 'Nodes/NodeDefinitionComparison',
9
9
  component: GraphRenderer,
10
10
  parameters: {
11
11
  layout: 'fullscreen',
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
- import { GraphRenderer } from '../components/GraphRenderer';
3
+ import { GraphRenderer } from '../../components/GraphRenderer';
4
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 = {
8
- title: 'Documentation/Node Name Fallbacks',
8
+ title: 'Nodes/NodeNameFallbacks',
9
9
  component: GraphRenderer,
10
10
  parameters: {
11
11
  layout: 'fullscreen',
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
- import { GraphRenderer } from '../components/GraphRenderer';
3
+ import { GraphRenderer } from '../../components/GraphRenderer';
4
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 = {
8
- title: 'Features/NumericColors',
8
+ title: 'Nodes/NumericColors',
9
9
  component: GraphRenderer,
10
10
  parameters: {
11
11
  layout: 'centered',
@@ -1,12 +1,12 @@
1
1
  import React from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
- import { GraphRenderer } from '../components/GraphRenderer';
3
+ import { GraphRenderer } from '../../components/GraphRenderer';
4
4
  import type { ExtendedCanvas } from '@principal-ai/principal-view-core';
5
5
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
6
6
  import type { Theme } from '@principal-ade/industry-theme';
7
7
 
8
8
  const meta = {
9
- title: 'Features/Event Name Display',
9
+ title: 'OTEL/EventNameDisplay',
10
10
  component: GraphRenderer,
11
11
  parameters: {
12
12
  layout: 'fullscreen',
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
- import { GraphRenderer } from '../components/GraphRenderer';
3
+ import { GraphRenderer } from '../../components/GraphRenderer';
4
4
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
5
5
 
6
6
  const meta = {
7
- title: 'Documentation/Event Name NOT Used for Display',
7
+ title: 'OTEL/EventNameFallback',
8
8
  component: GraphRenderer,
9
9
  parameters: {
10
10
  layout: 'fullscreen',
@@ -1,8 +1,8 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
2
  import React from 'react';
3
3
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
4
- import { GraphRenderer } from '../components/GraphRenderer';
5
- import { NodeTooltip } from '../components/NodeTooltip';
4
+ import { GraphRenderer } from '../../components/GraphRenderer';
5
+ import { NodeTooltip } from '../../components/NodeTooltip';
6
6
 
7
7
  // OTEL Log Association canvas data
8
8
  const otelCanvas = {
@@ -165,7 +165,7 @@ Routes incoming OTEL logs to canvas nodes based on matching criteria.
165
165
  };
166
166
 
167
167
  const meta: Meta = {
168
- title: 'OTEL/Components',
168
+ title: 'OTEL/OtelComponents',
169
169
  parameters: {
170
170
  layout: 'fullscreen',
171
171
  },
@@ -1,7 +1,7 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
2
  import React from 'react';
3
3
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
4
- import { GraphRenderer } from '../components/GraphRenderer';
4
+ import { GraphRenderer } from '../../components/GraphRenderer';
5
5
  import type { ExtendedCanvas, ComponentLibrary } from '@principal-ai/principal-view-core';
6
6
 
7
7
  /**
@@ -399,7 +399,7 @@ function buildDescription(node: NewFormatNode): string {
399
399
  // =============================================================================
400
400
 
401
401
  const meta: Meta = {
402
- title: 'OTEL/Node Types Prototype',
402
+ title: 'OTEL/OtelNodeTypesPrototype',
403
403
  parameters: {
404
404
  layout: 'fullscreen',
405
405
  },
@@ -6,11 +6,11 @@ import {
6
6
  SessionEventFeed,
7
7
  SessionEventFeedGrouped,
8
8
  type SessionEventFeedRow,
9
- } from '../components/session-events';
10
- import rawSession from './data/opencode-session-raw-events.json';
9
+ } from '../../components/session-events';
10
+ import rawSession from '../data/opencode-session-raw-events.json';
11
11
 
12
12
  const meta = {
13
- title: 'Agent Raw Events/Cards',
13
+ title: 'OTEL/RawEventCards',
14
14
  parameters: {
15
15
  layout: 'fullscreen',
16
16
  },
@@ -1,6 +1,6 @@
1
1
  import React, { useState } from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
- import { GraphRenderer } from '../components/GraphRenderer';
3
+ import { GraphRenderer } from '../../components/GraphRenderer';
4
4
  import type { ExtendedCanvas, WorkflowChip } from '@principal-ai/principal-view-core';
5
5
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
6
6
 
@@ -1,12 +1,12 @@
1
1
  import React, { useState, useEffect } from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
3
  import '@xyflow/react/dist/style.css';
4
- import { GraphRenderer } from '../components/GraphRenderer';
4
+ import { GraphRenderer } from '../../components/GraphRenderer';
5
5
  import type { ExtendedCanvas } from '@principal-ai/principal-view-core';
6
6
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
7
7
 
8
8
  // Import the CLI events canvas
9
- import validationEventsCanvasUrl from '../../../../.principal-views/principal-view-cli.events.canvas?url';
9
+ import validationEventsCanvasUrl from '../../../../../.principal-views/principal-view-cli.events.canvas?url';
10
10
 
11
11
  // Helper to load canvas from URL
12
12
  async function loadCanvas(url: string): Promise<ExtendedCanvas> {
@@ -41,7 +41,7 @@ function CanvasLoader({ url, children }: { url: string; children: (canvas: Exten
41
41
  }
42
42
 
43
43
  const meta = {
44
- title: 'Validation/Event Namespace Canvas',
44
+ title: 'OTEL/ValidationEventsCanvas',
45
45
  component: GraphRenderer,
46
46
  parameters: {
47
47
  layout: 'fullscreen',
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useEffect } from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
3
  import '@xyflow/react/dist/style.css';
4
- import { GraphRenderer } from '../components/GraphRenderer';
4
+ import { GraphRenderer } from '../../components/GraphRenderer';
5
5
  import type { ExtendedCanvas } from '@principal-ai/principal-view-core';
6
6
  import { ThemeProvider, defaultEditorTheme } from '@principal-ade/industry-theme';
7
7
 
@@ -67,7 +67,7 @@ function CanvasLoader({
67
67
  }
68
68
 
69
69
  const meta = {
70
- title: 'Real Projects/Backlog.md Canvases',
70
+ title: 'RealWorld/BacklogMdCanvases',
71
71
  component: GraphRenderer,
72
72
  parameters: {
73
73
  layout: 'fullscreen',