@principal-ai/subsystems-react 0.21.0 → 0.21.1

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 (201) hide show
  1. package/package.json +1 -1
  2. package/dist/components/ConfigurationSelector.d.ts +0 -35
  3. package/dist/components/ConfigurationSelector.d.ts.map +0 -1
  4. package/dist/components/ConfigurationSelector.js +0 -63
  5. package/dist/components/ConfigurationSelector.js.map +0 -1
  6. package/dist/components/GraphRenderer.d.ts +0 -295
  7. package/dist/components/GraphRenderer.d.ts.map +0 -1
  8. package/dist/components/GraphRenderer.js +0 -2008
  9. package/dist/components/GraphRenderer.js.map +0 -1
  10. package/dist/components/MultiCanvasRenderer.d.ts +0 -75
  11. package/dist/components/MultiCanvasRenderer.d.ts.map +0 -1
  12. package/dist/components/MultiCanvasRenderer.js +0 -203
  13. package/dist/components/MultiCanvasRenderer.js.map +0 -1
  14. package/dist/components/NodeTooltip.d.ts +0 -24
  15. package/dist/components/NodeTooltip.d.ts.map +0 -1
  16. package/dist/components/NodeTooltip.js +0 -160
  17. package/dist/components/NodeTooltip.js.map +0 -1
  18. package/dist/components/SelectionSidebar.d.ts +0 -18
  19. package/dist/components/SelectionSidebar.d.ts.map +0 -1
  20. package/dist/components/SelectionSidebar.js +0 -190
  21. package/dist/components/SelectionSidebar.js.map +0 -1
  22. package/dist/components/SequenceDiagramRenderer.d.ts +0 -77
  23. package/dist/components/SequenceDiagramRenderer.d.ts.map +0 -1
  24. package/dist/components/SequenceDiagramRenderer.js +0 -604
  25. package/dist/components/SequenceDiagramRenderer.js.map +0 -1
  26. package/dist/components/WorkflowSequenceDiagram.d.ts +0 -63
  27. package/dist/components/WorkflowSequenceDiagram.d.ts.map +0 -1
  28. package/dist/components/WorkflowSequenceDiagram.js +0 -147
  29. package/dist/components/WorkflowSequenceDiagram.js.map +0 -1
  30. package/dist/components/dashboard/DashboardRenderer.d.ts +0 -10
  31. package/dist/components/dashboard/DashboardRenderer.d.ts.map +0 -1
  32. package/dist/components/dashboard/DashboardRenderer.js +0 -179
  33. package/dist/components/dashboard/DashboardRenderer.js.map +0 -1
  34. package/dist/components/dashboard/MetricPanel.d.ts +0 -10
  35. package/dist/components/dashboard/MetricPanel.d.ts.map +0 -1
  36. package/dist/components/dashboard/MetricPanel.js +0 -103
  37. package/dist/components/dashboard/MetricPanel.js.map +0 -1
  38. package/dist/components/dashboard/MockDataProvider.d.ts +0 -30
  39. package/dist/components/dashboard/MockDataProvider.d.ts.map +0 -1
  40. package/dist/components/dashboard/MockDataProvider.js +0 -270
  41. package/dist/components/dashboard/MockDataProvider.js.map +0 -1
  42. package/dist/components/dashboard/components/BarChart.d.ts +0 -10
  43. package/dist/components/dashboard/components/BarChart.d.ts.map +0 -1
  44. package/dist/components/dashboard/components/BarChart.js +0 -167
  45. package/dist/components/dashboard/components/BarChart.js.map +0 -1
  46. package/dist/components/dashboard/components/LineChart.d.ts +0 -10
  47. package/dist/components/dashboard/components/LineChart.d.ts.map +0 -1
  48. package/dist/components/dashboard/components/LineChart.js +0 -141
  49. package/dist/components/dashboard/components/LineChart.js.map +0 -1
  50. package/dist/components/dashboard/components/MetricCard.d.ts +0 -9
  51. package/dist/components/dashboard/components/MetricCard.d.ts.map +0 -1
  52. package/dist/components/dashboard/components/MetricCard.js +0 -163
  53. package/dist/components/dashboard/components/MetricCard.js.map +0 -1
  54. package/dist/components/dashboard/components/SourceLink.d.ts +0 -9
  55. package/dist/components/dashboard/components/SourceLink.d.ts.map +0 -1
  56. package/dist/components/dashboard/components/SourceLink.js +0 -39
  57. package/dist/components/dashboard/components/SourceLink.js.map +0 -1
  58. package/dist/components/dashboard/components/TimeRangeSelector.d.ts +0 -9
  59. package/dist/components/dashboard/components/TimeRangeSelector.d.ts.map +0 -1
  60. package/dist/components/dashboard/components/TimeRangeSelector.js +0 -167
  61. package/dist/components/dashboard/components/TimeRangeSelector.js.map +0 -1
  62. package/dist/components/dashboard/components/index.d.ts +0 -6
  63. package/dist/components/dashboard/components/index.d.ts.map +0 -1
  64. package/dist/components/dashboard/components/index.js +0 -6
  65. package/dist/components/dashboard/components/index.js.map +0 -1
  66. package/dist/components/dashboard/index.d.ts +0 -6
  67. package/dist/components/dashboard/index.d.ts.map +0 -1
  68. package/dist/components/dashboard/index.js +0 -8
  69. package/dist/components/dashboard/index.js.map +0 -1
  70. package/dist/components/dashboard/types.d.ts +0 -74
  71. package/dist/components/dashboard/types.d.ts.map +0 -1
  72. package/dist/components/dashboard/types.js +0 -8
  73. package/dist/components/dashboard/types.js.map +0 -1
  74. package/dist/components/state-view/PipelineView.d.ts +0 -14
  75. package/dist/components/state-view/PipelineView.d.ts.map +0 -1
  76. package/dist/components/state-view/PipelineView.js +0 -195
  77. package/dist/components/state-view/PipelineView.js.map +0 -1
  78. package/dist/components/state-view/index.d.ts +0 -14
  79. package/dist/components/state-view/index.d.ts.map +0 -1
  80. package/dist/components/state-view/index.js +0 -12
  81. package/dist/components/state-view/index.js.map +0 -1
  82. package/dist/components/state-view/types.d.ts +0 -188
  83. package/dist/components/state-view/types.d.ts.map +0 -1
  84. package/dist/components/state-view/types.js +0 -10
  85. package/dist/components/state-view/types.js.map +0 -1
  86. package/dist/components/state-view/useStateView.d.ts +0 -32
  87. package/dist/components/state-view/useStateView.d.ts.map +0 -1
  88. package/dist/components/state-view/useStateView.js +0 -129
  89. package/dist/components/state-view/useStateView.js.map +0 -1
  90. package/dist/contexts/GraphEditContext.d.ts +0 -20
  91. package/dist/contexts/GraphEditContext.d.ts.map +0 -1
  92. package/dist/contexts/GraphEditContext.js +0 -8
  93. package/dist/contexts/GraphEditContext.js.map +0 -1
  94. package/dist/contexts/TooltipPortalContext.d.ts +0 -8
  95. package/dist/contexts/TooltipPortalContext.d.ts.map +0 -1
  96. package/dist/contexts/TooltipPortalContext.js +0 -8
  97. package/dist/contexts/TooltipPortalContext.js.map +0 -1
  98. package/dist/edges/CustomEdge.d.ts +0 -24
  99. package/dist/edges/CustomEdge.d.ts.map +0 -1
  100. package/dist/edges/CustomEdge.js +0 -222
  101. package/dist/edges/CustomEdge.js.map +0 -1
  102. package/dist/edges/GenericEdge.d.ts +0 -18
  103. package/dist/edges/GenericEdge.d.ts.map +0 -1
  104. package/dist/edges/GenericEdge.js +0 -10
  105. package/dist/edges/GenericEdge.js.map +0 -1
  106. package/dist/graphify/kind.d.ts +0 -23
  107. package/dist/graphify/kind.d.ts.map +0 -1
  108. package/dist/graphify/kind.js +0 -77
  109. package/dist/graphify/kind.js.map +0 -1
  110. package/dist/hooks/usePathBasedEvents.d.ts +0 -42
  111. package/dist/hooks/usePathBasedEvents.d.ts.map +0 -1
  112. package/dist/hooks/usePathBasedEvents.js +0 -119
  113. package/dist/hooks/usePathBasedEvents.js.map +0 -1
  114. package/dist/hooks/useSequenceLayout.d.ts +0 -186
  115. package/dist/hooks/useSequenceLayout.d.ts.map +0 -1
  116. package/dist/hooks/useSequenceLayout.js +0 -327
  117. package/dist/hooks/useSequenceLayout.js.map +0 -1
  118. package/dist/hooks/useUndoRedo.d.ts +0 -80
  119. package/dist/hooks/useUndoRedo.d.ts.map +0 -1
  120. package/dist/hooks/useUndoRedo.js +0 -70
  121. package/dist/hooks/useUndoRedo.js.map +0 -1
  122. package/dist/nodes/CustomNode.d.ts +0 -28
  123. package/dist/nodes/CustomNode.d.ts.map +0 -1
  124. package/dist/nodes/CustomNode.js +0 -820
  125. package/dist/nodes/CustomNode.js.map +0 -1
  126. package/dist/nodes/GenericNode.d.ts +0 -20
  127. package/dist/nodes/GenericNode.d.ts.map +0 -1
  128. package/dist/nodes/GenericNode.js +0 -20
  129. package/dist/nodes/GenericNode.js.map +0 -1
  130. package/dist/nodes/otel/OtelBoundaryNode.d.ts +0 -55
  131. package/dist/nodes/otel/OtelBoundaryNode.d.ts.map +0 -1
  132. package/dist/nodes/otel/OtelBoundaryNode.js +0 -81
  133. package/dist/nodes/otel/OtelBoundaryNode.js.map +0 -1
  134. package/dist/nodes/otel/OtelEventNode.d.ts +0 -59
  135. package/dist/nodes/otel/OtelEventNode.d.ts.map +0 -1
  136. package/dist/nodes/otel/OtelEventNode.js +0 -82
  137. package/dist/nodes/otel/OtelEventNode.js.map +0 -1
  138. package/dist/nodes/otel/OtelResourceNode.d.ts +0 -53
  139. package/dist/nodes/otel/OtelResourceNode.d.ts.map +0 -1
  140. package/dist/nodes/otel/OtelResourceNode.js +0 -105
  141. package/dist/nodes/otel/OtelResourceNode.js.map +0 -1
  142. package/dist/nodes/otel/OtelScopeNode.d.ts +0 -53
  143. package/dist/nodes/otel/OtelScopeNode.d.ts.map +0 -1
  144. package/dist/nodes/otel/OtelScopeNode.js +0 -81
  145. package/dist/nodes/otel/OtelScopeNode.js.map +0 -1
  146. package/dist/nodes/otel/OtelSpanConventionNode.d.ts +0 -61
  147. package/dist/nodes/otel/OtelSpanConventionNode.d.ts.map +0 -1
  148. package/dist/nodes/otel/OtelSpanConventionNode.js +0 -131
  149. package/dist/nodes/otel/OtelSpanConventionNode.js.map +0 -1
  150. package/dist/nodes/otel/index.d.ts +0 -17
  151. package/dist/nodes/otel/index.d.ts.map +0 -1
  152. package/dist/nodes/otel/index.js +0 -13
  153. package/dist/nodes/otel/index.js.map +0 -1
  154. package/dist/nodes/otel/shared/NodeBadges.d.ts +0 -10
  155. package/dist/nodes/otel/shared/NodeBadges.d.ts.map +0 -1
  156. package/dist/nodes/otel/shared/NodeBadges.js +0 -178
  157. package/dist/nodes/otel/shared/NodeBadges.js.map +0 -1
  158. package/dist/nodes/otel/shared/NodeContent.d.ts +0 -10
  159. package/dist/nodes/otel/shared/NodeContent.d.ts.map +0 -1
  160. package/dist/nodes/otel/shared/NodeContent.js +0 -96
  161. package/dist/nodes/otel/shared/NodeContent.js.map +0 -1
  162. package/dist/nodes/otel/shared/index.d.ts +0 -8
  163. package/dist/nodes/otel/shared/index.d.ts.map +0 -1
  164. package/dist/nodes/otel/shared/index.js +0 -8
  165. package/dist/nodes/otel/shared/index.js.map +0 -1
  166. package/dist/nodes/otel/shared/types.d.ts +0 -129
  167. package/dist/nodes/otel/shared/types.d.ts.map +0 -1
  168. package/dist/nodes/otel/shared/types.js +0 -5
  169. package/dist/nodes/otel/shared/types.js.map +0 -1
  170. package/dist/nodes/otel/shared/useNodeBehavior.d.ts +0 -42
  171. package/dist/nodes/otel/shared/useNodeBehavior.d.ts.map +0 -1
  172. package/dist/nodes/otel/shared/useNodeBehavior.js +0 -61
  173. package/dist/nodes/otel/shared/useNodeBehavior.js.map +0 -1
  174. package/dist/pierre/PierreThroughlineCodeView.d.ts +0 -22
  175. package/dist/pierre/PierreThroughlineCodeView.d.ts.map +0 -1
  176. package/dist/pierre/PierreThroughlineCodeView.js +0 -206
  177. package/dist/pierre/PierreThroughlineCodeView.js.map +0 -1
  178. package/dist/subsystem/SubsystemCarousel.d.ts +0 -36
  179. package/dist/subsystem/SubsystemCarousel.d.ts.map +0 -1
  180. package/dist/subsystem/SubsystemCarousel.js +0 -163
  181. package/dist/subsystem/SubsystemCarousel.js.map +0 -1
  182. package/dist/utils/animationMapping.d.ts +0 -53
  183. package/dist/utils/animationMapping.d.ts.map +0 -1
  184. package/dist/utils/animationMapping.js +0 -126
  185. package/dist/utils/animationMapping.js.map +0 -1
  186. package/dist/utils/canvasBounds.d.ts +0 -50
  187. package/dist/utils/canvasBounds.d.ts.map +0 -1
  188. package/dist/utils/canvasBounds.js +0 -88
  189. package/dist/utils/canvasBounds.js.map +0 -1
  190. package/dist/utils/graphConverter.d.ts +0 -18
  191. package/dist/utils/graphConverter.d.ts.map +0 -1
  192. package/dist/utils/graphConverter.js +0 -114
  193. package/dist/utils/graphConverter.js.map +0 -1
  194. package/dist/utils/iconResolver.d.ts +0 -29
  195. package/dist/utils/iconResolver.d.ts.map +0 -1
  196. package/dist/utils/iconResolver.js +0 -30
  197. package/dist/utils/iconResolver.js.map +0 -1
  198. package/dist/utils/orientationUtils.d.ts +0 -19
  199. package/dist/utils/orientationUtils.d.ts.map +0 -1
  200. package/dist/utils/orientationUtils.js +0 -62
  201. package/dist/utils/orientationUtils.js.map +0 -1
@@ -1,160 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useEffect, useState, useContext } from 'react';
3
- import { createPortal } from 'react-dom';
4
- import { useTheme } from '@principal-ade/industry-theme';
5
- import { IndustryMarkdownSlide } from 'themed-markdown';
6
- import { TooltipPortalContext } from '../contexts/TooltipPortalContext';
7
- /**
8
- * Tooltip component for displaying node information on hover
9
- * Uses a portal to render above all other elements
10
- */
11
- export const NodeTooltip = ({ description, otel, sources, references, visible, nodeRef, }) => {
12
- const { theme } = useTheme();
13
- const portalTarget = useContext(TooltipPortalContext);
14
- const [position, setPosition] = useState(null);
15
- useEffect(() => {
16
- if (visible && nodeRef?.current && portalTarget) {
17
- const nodeRect = nodeRef.current.getBoundingClientRect();
18
- const containerRect = portalTarget.getBoundingClientRect();
19
- // Position relative to the container, not the viewport
20
- setPosition({
21
- top: nodeRect.bottom - containerRect.top + 8,
22
- left: nodeRect.left - containerRect.left + nodeRect.width / 2, // centered horizontally
23
- });
24
- }
25
- else if (visible && nodeRef?.current && !portalTarget) {
26
- // Fallback to viewport positioning if no portal target
27
- const rect = nodeRef.current.getBoundingClientRect();
28
- setPosition({
29
- top: rect.bottom + 8,
30
- left: rect.left + rect.width / 2,
31
- });
32
- }
33
- else if (!nodeRef) {
34
- // No ref provided - will use relative positioning (for storybook demos)
35
- setPosition({ top: 0, left: 0 });
36
- }
37
- }, [visible, nodeRef, portalTarget]);
38
- if (!visible)
39
- return null;
40
- // If no nodeRef, render inline (for storybook demos)
41
- const usePortal = Boolean(nodeRef);
42
- const getKindLabel = (kind) => {
43
- switch (kind) {
44
- case 'type':
45
- return 'Type';
46
- case 'service':
47
- return 'Service';
48
- case 'instance':
49
- return 'Instance';
50
- default:
51
- return kind;
52
- }
53
- };
54
- const getKindColor = (kind) => {
55
- switch (kind) {
56
- case 'type':
57
- return '#4A90E2'; // Blue
58
- case 'service':
59
- return '#7ED321'; // Green
60
- case 'instance':
61
- return '#9B59B6'; // Purple
62
- default:
63
- return '#888';
64
- }
65
- };
66
- const renderTooltipContent = () => (_jsxs("div", { style: {
67
- // Use absolute positioning relative to portal target container
68
- position: usePortal ? 'absolute' : 'absolute',
69
- top: usePortal ? position?.top ?? 0 : '100%',
70
- left: usePortal ? position?.left ?? 0 : '50%',
71
- transform: 'translateX(-50%)',
72
- marginTop: usePortal ? 0 : '8px',
73
- padding: '8px 12px',
74
- backgroundColor: 'rgba(0, 0, 0, 0.9)',
75
- color: 'white',
76
- borderRadius: '6px',
77
- fontSize: theme.fontSizes[0],
78
- fontFamily: theme.fonts.body,
79
- maxWidth: '400px',
80
- maxHeight: '500px',
81
- zIndex: 99999,
82
- pointerEvents: 'none',
83
- boxShadow: '0 4px 12px rgba(0,0,0,0.4)',
84
- whiteSpace: 'normal',
85
- opacity: usePortal ? (position ? 1 : 0) : 1,
86
- overflow: 'auto',
87
- }, children: [_jsx("div", { style: {
88
- position: 'absolute',
89
- top: '-6px',
90
- left: '50%',
91
- transform: 'translateX(-50%)',
92
- width: 0,
93
- height: 0,
94
- borderLeft: '6px solid transparent',
95
- borderRight: '6px solid transparent',
96
- borderBottom: '6px solid rgba(0, 0, 0, 0.9)',
97
- } }), otel && (_jsxs("div", { style: {
98
- display: 'flex',
99
- alignItems: 'center',
100
- gap: '6px',
101
- marginBottom: description || otel.scope ? '6px' : 0,
102
- }, children: [_jsx("span", { style: {
103
- backgroundColor: getKindColor(otel.kind),
104
- color: 'white',
105
- padding: '2px 6px',
106
- borderRadius: '3px',
107
- fontSize: theme.fontSizes[0],
108
- fontWeight: theme.fontWeights.semibold,
109
- fontFamily: theme.fonts.body,
110
- textTransform: 'uppercase',
111
- }, children: getKindLabel(otel.kind) }), otel.category && (_jsx("span", { style: { color: 'rgba(255,255,255,0.7)', fontSize: theme.fontSizes[0], fontFamily: theme.fonts.body }, children: otel.category }))] })), otel?.scope && (_jsxs("div", { style: {
112
- marginBottom: description ? '6px' : 0,
113
- fontSize: theme.fontSizes[0],
114
- fontFamily: theme.fonts.body,
115
- color: 'rgba(255,255,255,0.8)'
116
- }, children: [_jsx("span", { style: {
117
- color: 'rgba(255,255,255,0.6)',
118
- fontWeight: theme.fontWeights.semibold
119
- }, children: "Scope:" }), ' ', _jsx("span", { style: { fontFamily: 'monospace' }, children: otel.scope })] })), description ? (_jsx("div", { style: { lineHeight: '1.4', color: 'rgba(255,255,255,0.9)' }, children: _jsx(IndustryMarkdownSlide, { content: description, slideIdPrefix: "tooltip", slideIndex: 0, isVisible: true, theme: {
120
- ...theme,
121
- colors: {
122
- ...theme.colors,
123
- background: 'transparent',
124
- text: 'rgba(255,255,255,0.9)',
125
- },
126
- }, transparentBackground: true, disableScroll: true, fontSizeScale: 0.85, enableKeyboardScrolling: false, autoFocusOnVisible: false }) })) : (_jsx("div", { style: { lineHeight: '1.4', color: 'rgba(255,255,255,0.5)' }, children: "No description" })), (() => {
127
- const sourceFiles = otel?.files || sources;
128
- if (!sourceFiles || sourceFiles.length === 0)
129
- return null;
130
- return (_jsxs("div", { style: { marginTop: '8px', borderTop: '1px solid rgba(255,255,255,0.2)', paddingTop: '6px' }, children: [_jsx("div", { style: {
131
- fontSize: theme.fontSizes[0],
132
- fontWeight: theme.fontWeights.semibold,
133
- color: 'rgba(255,255,255,0.7)',
134
- marginBottom: '4px'
135
- }, children: "Source Files:" }), _jsx("div", { style: { fontSize: theme.fontSizes[0], color: 'rgba(255,255,255,0.8)' }, children: sourceFiles.map((file, index) => (_jsx("div", { style: {
136
- fontFamily: 'monospace',
137
- fontSize: theme.fontSizes[0],
138
- marginTop: index > 0 ? '2px' : 0,
139
- wordBreak: 'break-all'
140
- }, children: file }, index))) })] }));
141
- })(), references && references.length > 0 && (_jsxs("div", { style: { marginTop: '8px', borderTop: '1px solid rgba(255,255,255,0.2)', paddingTop: '6px' }, children: [_jsx("div", { style: {
142
- fontSize: theme.fontSizes[0],
143
- fontWeight: theme.fontWeights.semibold,
144
- color: 'rgba(255,255,255,0.7)',
145
- marginBottom: '4px'
146
- }, children: "References:" }), _jsx("div", { style: { fontSize: theme.fontSizes[0], color: 'rgba(255,255,255,0.8)' }, children: references.map((ref, index) => (_jsx("div", { style: {
147
- fontFamily: 'monospace',
148
- fontSize: theme.fontSizes[0],
149
- marginTop: index > 0 ? '2px' : 0,
150
- wordBreak: 'break-all'
151
- }, children: ref }, index))) })] }))] }));
152
- // Use portal to render in the graph container when available, otherwise render inline
153
- if (usePortal) {
154
- // Portal to graph container (hides with tab) or fallback to body
155
- const target = portalTarget || document.body;
156
- return createPortal(renderTooltipContent(), target);
157
- }
158
- return renderTooltipContent();
159
- };
160
- //# sourceMappingURL=NodeTooltip.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NodeTooltip.js","sourceRoot":"","sources":["../../src/components/NodeTooltip.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAqBxE;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAA+B,CAAC,EACtD,WAAW,EACX,IAAI,EACJ,OAAO,EACP,UAAU,EACV,OAAO,EACP,OAAO,GACR,EAAE,EAAE;IACH,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,CAAC;IAC7B,MAAM,YAAY,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IACtD,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAuC,IAAI,CAAC,CAAC;IAErF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,OAAO,IAAI,OAAO,EAAE,OAAO,IAAI,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AE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,uBAAuB,EAAE,YACzE,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,CAC9B,cAAiB,KAAK,EAAE;gCACtB,UAAU,EAAE,WAAW;gCACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;gCAC5B,SAAS,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gCAChC,SAAS,EAAE,WAAW;6BACvB,YACE,GAAG,IANI,KAAK,CAOT,CACP,CAAC,GACE,IACF,CACP,IACG,CACP,CAAC;IAEF,sFAAsF;IACtF,IAAI,SAAS,EAAE;QACb,iEAAiE;QACjE,MAAM,MAAM,GAAG,YAAY,IAAI,QAAQ,CAAC,IAAI,CAAC;QAC7C,OAAO,YAAY,CAAC,oBAAoB,EAAE,EAAE,MAAM,CAAC,CAAC;KACrD;IACD,OAAO,oBAAoB,EAAE,CAAC;AAChC,CAAC,CAAC"}
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import type { NodeState, NodeTypeDefinition } from '@principal-ai/subsystems-core';
3
- export interface SelectionSidebarProps {
4
- /** Set of selected node IDs */
5
- selectedNodeIds: Set<string>;
6
- /** All nodes in the graph */
7
- nodes: NodeState[];
8
- /** Node type definitions for icons and colors */
9
- nodeTypeDefinitions: Record<string, NodeTypeDefinition>;
10
- /** Callback when sidebar is closed */
11
- onClose: () => void;
12
- }
13
- /**
14
- * Sidebar that displays information about multiple selected nodes
15
- * Shows name and description for each node, with expandable details
16
- */
17
- export declare const SelectionSidebar: React.FC<SelectionSidebarProps>;
18
- //# sourceMappingURL=SelectionSidebar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectionSidebar.d.ts","sourceRoot":"","sources":["../../src/components/SelectionSidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAInF,MAAM,WAAW,qBAAqB;IACpC,+BAA+B;IAC/B,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,6BAA6B;IAC7B,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,iDAAiD;IACjD,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IACxD,sCAAsC;IACtC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAMD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAuU5D,CAAC"}
@@ -1,190 +0,0 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
- import { useState } from 'react';
3
- import { useTheme } from '@principal-ade/industry-theme';
4
- import { resolveIcon } from '../utils/iconResolver';
5
- /**
6
- * Sidebar that displays information about multiple selected nodes
7
- * Shows name and description for each node, with expandable details
8
- */
9
- export const SelectionSidebar = ({ selectedNodeIds, nodes, nodeTypeDefinitions, onClose, }) => {
10
- const { theme } = useTheme();
11
- const [expandedNodes, setExpandedNodes] = useState({});
12
- // Get the selected nodes in order
13
- const selectedNodes = nodes.filter((n) => selectedNodeIds.has(n.id));
14
- const toggleExpanded = (nodeId) => {
15
- setExpandedNodes((prev) => ({
16
- ...prev,
17
- [nodeId]: !prev[nodeId],
18
- }));
19
- };
20
- // Internal fields that should not be displayed
21
- const internalFields = [
22
- 'icon',
23
- 'name',
24
- 'description',
25
- 'sources',
26
- 'color',
27
- 'stroke',
28
- 'width',
29
- 'height',
30
- 'canvasType',
31
- 'text',
32
- 'file',
33
- 'url',
34
- 'shape',
35
- 'states',
36
- 'actions',
37
- 'nodeType',
38
- ];
39
- return (_jsxs("div", { style: {
40
- position: 'absolute',
41
- top: '60px',
42
- right: '20px',
43
- backgroundColor: theme.colors.background,
44
- color: theme.colors.text,
45
- borderRadius: '8px',
46
- boxShadow: '0 4px 12px rgba(0,0,0,0.15)',
47
- padding: '16px',
48
- minWidth: '280px',
49
- maxWidth: '350px',
50
- maxHeight: 'calc(100vh - 120px)',
51
- overflowY: 'auto',
52
- zIndex: 1000,
53
- border: `1px solid ${theme.colors.border}`,
54
- }, children: [_jsxs("div", { style: {
55
- display: 'flex',
56
- justifyContent: 'space-between',
57
- alignItems: 'center',
58
- marginBottom: '12px',
59
- paddingBottom: '8px',
60
- borderBottom: `2px solid ${theme.colors.primary}`,
61
- }, children: [_jsxs("div", { style: { fontWeight: theme.fontWeights.bold, fontSize: theme.fontSizes[1], fontFamily: theme.fonts.body, color: theme.colors.primary }, children: [selectedNodes.length, " nodes selected"] }), _jsx("button", { onClick: onClose, style: {
62
- border: 'none',
63
- background: 'none',
64
- cursor: 'pointer',
65
- fontSize: theme.fontSizes[3],
66
- fontFamily: theme.fonts.body,
67
- color: theme.colors.textSecondary,
68
- padding: '0',
69
- width: '24px',
70
- height: '24px',
71
- display: 'flex',
72
- alignItems: 'center',
73
- justifyContent: 'center',
74
- }, children: "x" })] }), _jsx("div", { style: { display: 'flex', flexDirection: 'column', gap: '8px' }, children: selectedNodes.map((node) => {
75
- const typeDefinition = nodeTypeDefinitions[node.type];
76
- const nodeColor = node.data?.color || typeDefinition?.color || theme.colors.secondary;
77
- const icon = node.data?.icon || typeDefinition?.icon;
78
- const isExpanded = expandedNodes[node.id] || false;
79
- const description = node.data?.description;
80
- // Get displayable data entries
81
- const dataEntries = node.data
82
- ? Object.entries(node.data).filter(([key]) => !internalFields.includes(key))
83
- : [];
84
- return (_jsxs("div", { style: {
85
- backgroundColor: theme.colors.surface,
86
- borderRadius: '6px',
87
- border: `1px solid ${theme.colors.border}`,
88
- overflow: 'hidden',
89
- }, children: [_jsxs("button", { onClick: () => toggleExpanded(node.id), style: {
90
- width: '100%',
91
- padding: '10px 12px',
92
- backgroundColor: 'transparent',
93
- border: 'none',
94
- cursor: 'pointer',
95
- display: 'flex',
96
- alignItems: 'flex-start',
97
- gap: '10px',
98
- textAlign: 'left',
99
- }, children: [_jsx("div", { style: {
100
- width: '28px',
101
- height: '28px',
102
- borderRadius: '6px',
103
- backgroundColor: nodeColor,
104
- display: 'flex',
105
- alignItems: 'center',
106
- justifyContent: 'center',
107
- flexShrink: 0,
108
- color: 'white',
109
- }, children: icon ? resolveIcon(icon, 16) : null }), _jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [_jsx("div", { style: {
110
- fontWeight: theme.fontWeights.semibold,
111
- fontSize: theme.fontSizes[1],
112
- fontFamily: theme.fonts.body,
113
- color: theme.colors.text,
114
- marginBottom: description ? '2px' : 0,
115
- }, children: node.name || node.id }), description && (_jsx("div", { style: {
116
- fontSize: theme.fontSizes[0],
117
- fontFamily: theme.fonts.body,
118
- color: theme.colors.textSecondary,
119
- overflow: 'hidden',
120
- textOverflow: 'ellipsis',
121
- display: '-webkit-box',
122
- WebkitLineClamp: isExpanded ? 'unset' : 2,
123
- WebkitBoxOrient: 'vertical',
124
- }, children: description }))] }), _jsx("div", { style: {
125
- color: theme.colors.textSecondary,
126
- fontSize: '10px',
127
- transform: isExpanded ? 'rotate(180deg)' : 'rotate(0deg)',
128
- transition: 'transform 0.2s',
129
- flexShrink: 0,
130
- }, children: "\u25BC" })] }), isExpanded && (_jsxs("div", { style: {
131
- padding: '0 12px 10px 12px',
132
- borderTop: `1px solid ${theme.colors.border}`,
133
- marginTop: '0',
134
- }, children: [_jsxs("div", { style: { marginTop: '10px' }, children: [_jsx("div", { style: {
135
- fontSize: theme.fontSizes[0],
136
- fontFamily: theme.fonts.body,
137
- color: theme.colors.textSecondary,
138
- marginBottom: '4px',
139
- }, children: "Type" }), _jsx("div", { style: {
140
- fontSize: theme.fontSizes[0],
141
- fontFamily: theme.fonts.body,
142
- padding: '3px 8px',
143
- backgroundColor: nodeColor,
144
- color: 'white',
145
- borderRadius: '4px',
146
- display: 'inline-block',
147
- }, children: node.type })] }), node.state && (_jsxs("div", { style: { marginTop: '8px' }, children: [_jsx("div", { style: {
148
- fontSize: theme.fontSizes[0],
149
- fontFamily: theme.fonts.body,
150
- color: theme.colors.textSecondary,
151
- marginBottom: '4px',
152
- }, children: "State" }), _jsx("div", { style: {
153
- fontSize: theme.fontSizes[0],
154
- fontFamily: theme.fonts.body,
155
- padding: '3px 8px',
156
- backgroundColor: typeDefinition?.states?.[node.state]?.color || theme.colors.secondary,
157
- color: 'white',
158
- borderRadius: '4px',
159
- display: 'inline-block',
160
- }, children: typeDefinition?.states?.[node.state]?.label || node.state })] })), dataEntries.length > 0 && (_jsxs("div", { style: { marginTop: '8px' }, children: [_jsx("div", { style: {
161
- fontSize: theme.fontSizes[0],
162
- fontFamily: theme.fonts.body,
163
- color: theme.colors.textSecondary,
164
- marginBottom: '6px',
165
- fontWeight: 'bold',
166
- }, children: "Properties" }), dataEntries.map(([key, value]) => (_jsxs("div", { style: { marginBottom: '6px' }, children: [_jsx("div", { style: {
167
- fontSize: theme.fontSizes[0],
168
- fontFamily: theme.fonts.body,
169
- color: theme.colors.textSecondary,
170
- marginBottom: '2px',
171
- }, children: key }), _jsx("div", { style: {
172
- fontSize: theme.fontSizes[0],
173
- fontFamily: theme.fonts.body,
174
- color: theme.colors.text,
175
- wordBreak: 'break-word',
176
- }, children: value !== undefined && value !== null
177
- ? typeof value === 'object'
178
- ? JSON.stringify(value, null, 2)
179
- : String(value)
180
- : '-' })] }, key)))] })), _jsxs("div", { style: {
181
- fontSize: theme.fontSizes[0],
182
- fontFamily: theme.fonts.body,
183
- color: theme.colors.textMuted,
184
- marginTop: '8px',
185
- paddingTop: '6px',
186
- borderTop: `1px solid ${theme.colors.border}`,
187
- }, children: ["ID: ", node.id] })] }))] }, node.id));
188
- }) })] }));
189
- };
190
- //# sourceMappingURL=SelectionSidebar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectionSidebar.js","sourceRoot":"","sources":["../../src/components/SelectionSidebar.tsx"],"names":[],"mappings":";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,aAAa;4DACjC,YAAY,EAAE,KAAK;yDACpB,YAEA,GAAG,GACA,EACN,cACE,KAAK,EAAE;4DACL,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;4DAClC,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI;4DACtB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;4DACxB,SAAS,EAAE,YAAY;yDACxB,YAEA,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;4DACpC,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ;gEACzB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;gEAChC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;4DACjB,CAAC,CAAC,GAAG,GACH,KAxBE,GAAG,CAyBP,CACP,CAAC,IACE,CACP,EAGD,eACE,KAAK,EAAE;4CACL,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;4CAC5B,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI;4CAC5B,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS;4CAC7B,SAAS,EAAE,KAAK;4CAChB,UAAU,EAAE,KAAK;4CACjB,SAAS,EAAE,aAAa,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE;yCAC9C,qBAEI,IAAI,CAAC,EAAE,IACR,IACF,CACP,KAlNI,IAAI,CAAC,EAAE,CAmNR,CACP,CAAC;gBACJ,CAAC,CAAC,GACE,IACF,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,77 +0,0 @@
1
- /**
2
- * Sequence Diagram Renderer
3
- *
4
- * Renders events in swimlane-based sequence diagram layout.
5
- * Uses namespaces to determine swimlanes and event order for vertical positioning.
6
- */
7
- import React from 'react';
8
- import { type NodeTypes, type EdgeTypes } from '@xyflow/react';
9
- import { type SequenceEvent, type SequenceEdge, type UseSequenceLayoutOptions } from '../hooks/useSequenceLayout';
10
- /**
11
- * Props for SequenceDiagramRenderer
12
- */
13
- export interface SequenceDiagramRendererProps {
14
- /** Events to display in the diagram */
15
- events: SequenceEvent[];
16
- /** Edges connecting events */
17
- edges: SequenceEdge[];
18
- /** Layout options */
19
- layoutOptions?: UseSequenceLayoutOptions;
20
- /** Optional custom node types */
21
- nodeTypes?: NodeTypes;
22
- /** Optional custom edge types */
23
- edgeTypes?: EdgeTypes;
24
- /**
25
- * Called when the user toggles a lane's drill state via the header
26
- * chevrons. Update `layoutOptions.openedNamespaces` in response to
27
- * open/close the lane.
28
- */
29
- onToggleNamespace?: (namespace: string) => void;
30
- /** Callback when a node is clicked */
31
- onNodeClick?: (nodeId: string, event: React.MouseEvent) => void;
32
- /** ID of the currently selected node (for visual highlighting) */
33
- selectedNodeId?: string;
34
- /** Optional class name */
35
- className?: string;
36
- /** Optional width */
37
- width?: number | string;
38
- /** Optional height */
39
- height?: number | string;
40
- /** Whether to show controls */
41
- showControls?: boolean;
42
- /** Whether to show background grid */
43
- showBackground?: boolean;
44
- /** Whether swimlane headers should stick to the top when scrolling vertically (default: true) */
45
- stickyHeaders?: boolean;
46
- /** Whether to show event labels on nodes (default: false, labels already shown on edges) */
47
- showEventLabels?: boolean;
48
- /**
49
- * When true, render the diagram chrome (canvas background, swimlane fills,
50
- * header backgrounds) as transparent so the diagram can be composited over
51
- * an arbitrary backdrop. Lifelines, borders, edges, and label pills keep
52
- * their theme colors so the diagram stays legible. Defaults to `false`.
53
- */
54
- transparent?: boolean;
55
- }
56
- /**
57
- * Sequence Diagram Renderer
58
- *
59
- * Renders events as a sequence diagram with swimlanes based on namespaces.
60
- *
61
- * @example
62
- * ```tsx
63
- * <SequenceDiagramRenderer
64
- * events={[
65
- * { id: '1', name: 'auth.validation.started' },
66
- * { id: '2', name: 'auth.validation.completed' },
67
- * { id: '3', name: 'database.query.executed' },
68
- * ]}
69
- * edges={[
70
- * { id: 'e1', fromEvent: '1', toEvent: '2' },
71
- * { id: 'e2', fromEvent: '2', toEvent: '3' },
72
- * ]}
73
- * />
74
- * ```
75
- */
76
- export declare function SequenceDiagramRenderer(props: SequenceDiagramRendererProps): React.JSX.Element;
77
- //# sourceMappingURL=SequenceDiagramRenderer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SequenceDiagramRenderer.d.ts","sourceRoot":"","sources":["../../src/components/SequenceDiagramRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAyC,MAAM,OAAO,CAAC;AAC9D,OAAO,EAaL,KAAK,SAAS,EACd,KAAK,SAAS,EAGf,MAAM,eAAe,CAAC;AAGvB,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAG9B,MAAM,4BAA4B,CAAC;AA8uBpC;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,uCAAuC;IACvC,MAAM,EAAE,aAAa,EAAE,CAAC;IAExB,8BAA8B;IAC9B,KAAK,EAAE,YAAY,EAAE,CAAC;IAEtB,qBAAqB;IACrB,aAAa,CAAC,EAAE,wBAAwB,CAAC;IAEzC,iCAAiC;IACjC,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,iCAAiC;IACjC,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAEhD,sCAAsC;IACtC,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAEhE,kEAAkE;IAClE,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,0BAA0B;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,qBAAqB;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAExB,sBAAsB;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAEzB,+BA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