@principal-ai/subsystems-react 0.56.24 → 0.56.25

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 (125) hide show
  1. package/dist/index.d.ts +7 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +4 -0
  4. package/dist/index.js.map +1 -1
  5. package/dist/stories/Canvases/Subsystem/issuesFixtures.d.ts +4 -0
  6. package/dist/stories/Canvases/Subsystem/issuesFixtures.d.ts.map +1 -0
  7. package/dist/stories/Canvases/Subsystem/issuesFixtures.js +189 -0
  8. package/dist/stories/Canvases/Subsystem/issuesFixtures.js.map +1 -0
  9. package/dist/stories/Canvases/Subsystem/reorderFixtures.d.ts +8 -0
  10. package/dist/stories/Canvases/Subsystem/reorderFixtures.d.ts.map +1 -0
  11. package/dist/stories/Canvases/Subsystem/reorderFixtures.js +103 -0
  12. package/dist/stories/Canvases/Subsystem/reorderFixtures.js.map +1 -0
  13. package/dist/subsystem/C4ContainersPanel.d.ts +35 -0
  14. package/dist/subsystem/C4ContainersPanel.d.ts.map +1 -0
  15. package/dist/subsystem/C4ContainersPanel.js +165 -0
  16. package/dist/subsystem/C4ContainersPanel.js.map +1 -0
  17. package/dist/subsystem/C4NodeCard.d.ts.map +1 -1
  18. package/dist/subsystem/C4NodeCard.js +10 -4
  19. package/dist/subsystem/C4NodeCard.js.map +1 -1
  20. package/dist/subsystem/C4ProjectionView.d.ts.map +1 -1
  21. package/dist/subsystem/C4ProjectionView.js +81 -27
  22. package/dist/subsystem/C4ProjectionView.js.map +1 -1
  23. package/dist/subsystem/C4SketchView.d.ts.map +1 -1
  24. package/dist/subsystem/C4SketchView.js +53 -34
  25. package/dist/subsystem/C4SketchView.js.map +1 -1
  26. package/dist/subsystem/DescriptionOverlay.d.ts +10 -2
  27. package/dist/subsystem/DescriptionOverlay.d.ts.map +1 -1
  28. package/dist/subsystem/DescriptionOverlay.js +4 -4
  29. package/dist/subsystem/DescriptionOverlay.js.map +1 -1
  30. package/dist/subsystem/DescriptionPreview.d.ts +31 -0
  31. package/dist/subsystem/DescriptionPreview.d.ts.map +1 -0
  32. package/dist/subsystem/DescriptionPreview.js +31 -0
  33. package/dist/subsystem/DescriptionPreview.js.map +1 -0
  34. package/dist/subsystem/SubsystemComponentGraph.d.ts.map +1 -1
  35. package/dist/subsystem/SubsystemComponentGraph.js +3 -19
  36. package/dist/subsystem/SubsystemComponentGraph.js.map +1 -1
  37. package/dist/subsystem/__fixtures__/c4Sketch.d.ts.map +1 -1
  38. package/dist/subsystem/__fixtures__/c4Sketch.js +1 -0
  39. package/dist/subsystem/__fixtures__/c4Sketch.js.map +1 -1
  40. package/dist/subsystem/__fixtures__/c4SketchGallery.d.ts +27 -0
  41. package/dist/subsystem/__fixtures__/c4SketchGallery.d.ts.map +1 -0
  42. package/dist/subsystem/__fixtures__/c4SketchGallery.js +312 -0
  43. package/dist/subsystem/__fixtures__/c4SketchGallery.js.map +1 -0
  44. package/dist/subsystem/__fixtures__/c4Sketches/maintenance-bridge.json +777 -0
  45. package/dist/subsystem/__fixtures__/c4Sketches/openbot.json +886 -0
  46. package/dist/subsystem/c4Sketch.d.ts +12 -0
  47. package/dist/subsystem/c4Sketch.d.ts.map +1 -1
  48. package/dist/subsystem/c4Sketch.js +2 -1
  49. package/dist/subsystem/c4Sketch.js.map +1 -1
  50. package/dist/subsystem/containerCard.d.ts +3 -1
  51. package/dist/subsystem/containerCard.d.ts.map +1 -1
  52. package/dist/subsystem/containerCard.js +2 -2
  53. package/dist/subsystem/containerCard.js.map +1 -1
  54. package/dist/subsystem/techIcons/index.d.ts +3 -1
  55. package/dist/subsystem/techIcons/index.d.ts.map +1 -1
  56. package/dist/subsystem/techIcons/index.js +2 -2
  57. package/dist/subsystem/techIcons/index.js.map +1 -1
  58. package/package.json +1 -1
  59. package/src/index.ts +10 -0
  60. package/src/stories/Canvases/C4/C4CardGrow.stories.tsx +1 -1
  61. package/src/stories/Canvases/C4/C4Component.stories.tsx +1 -1
  62. package/src/stories/Canvases/C4/C4Container.stories.tsx +1 -1
  63. package/src/stories/Canvases/C4/C4Draft.stories.tsx +1 -1
  64. package/src/stories/Canvases/C4/C4NodeGallery.stories.tsx +1 -1
  65. package/src/stories/Canvases/C4/C4Sketch.stories.tsx +56 -4
  66. package/src/stories/Canvases/C4/C4ToComponentDrill.stories.tsx +1 -1
  67. package/src/stories/Canvases/C4/C4Transition.stories.tsx +1 -1
  68. package/src/stories/Canvases/Subsystem/AnimatedProgression.stories.tsx +1 -1
  69. package/src/stories/Canvases/Subsystem/Appearance.stories.tsx +1 -1
  70. package/src/stories/Canvases/Subsystem/Basics.stories.tsx +1 -1
  71. package/src/stories/Canvases/Subsystem/Captures.stories.tsx +1 -1
  72. package/src/stories/Canvases/Subsystem/Constructs.stories.tsx +3 -7
  73. package/src/stories/Canvases/Subsystem/ConstructsEmbed.stories.tsx +27 -0
  74. package/src/stories/Canvases/Subsystem/ContainerFrames.stories.tsx +1 -1
  75. package/src/stories/Canvases/Subsystem/CustomEntities.stories.tsx +1 -1
  76. package/src/stories/Canvases/Subsystem/Deprecated.stories.tsx +2 -100
  77. package/src/stories/Canvases/Subsystem/DeprecatedGraph.stories.tsx +124 -0
  78. package/src/stories/Canvases/Subsystem/DetailPanel.stories.tsx +1 -1
  79. package/src/stories/Canvases/Subsystem/Diagnostics.stories.tsx +1 -43
  80. package/src/stories/Canvases/Subsystem/DiagnosticsStates.stories.tsx +63 -0
  81. package/src/stories/Canvases/Subsystem/EdgeViews.stories.tsx +1 -1
  82. package/src/stories/Canvases/Subsystem/FrameworkStereotype.stories.tsx +1 -1
  83. package/src/stories/Canvases/Subsystem/GraphTitle.stories.tsx +1 -19
  84. package/src/stories/Canvases/Subsystem/GraphTitleGraph.stories.tsx +51 -0
  85. package/src/stories/Canvases/Subsystem/Issues.stories.tsx +3 -228
  86. package/src/stories/Canvases/Subsystem/IssuesList.stories.tsx +60 -0
  87. package/src/stories/Canvases/Subsystem/LayoutDirection.stories.tsx +1 -1
  88. package/src/stories/Canvases/Subsystem/ModuleBadges.stories.tsx +3 -61
  89. package/src/stories/Canvases/Subsystem/ModuleBadgesNode.stories.tsx +81 -0
  90. package/src/stories/Canvases/Subsystem/ModulePathNesting.stories.tsx +1 -1
  91. package/src/stories/Canvases/Subsystem/Modules.stories.tsx +1 -1
  92. package/src/stories/Canvases/Subsystem/NodeAnatomy.stories.tsx +1 -1
  93. package/src/stories/Canvases/Subsystem/Packages.stories.tsx +1 -1
  94. package/src/stories/Canvases/Subsystem/Presentation.stories.tsx +1 -1
  95. package/src/stories/Canvases/Subsystem/Processes.stories.tsx +1 -1
  96. package/src/stories/Canvases/Subsystem/Reorder.stories.tsx +3 -153
  97. package/src/stories/Canvases/Subsystem/ReorderPanel.stories.tsx +75 -0
  98. package/src/stories/Canvases/Subsystem/Scenarios.stories.tsx +1 -1
  99. package/src/stories/Canvases/Subsystem/Spotlights.stories.tsx +1 -1
  100. package/src/stories/Canvases/Subsystem/StepEmphasis.stories.tsx +1 -1
  101. package/src/stories/Canvases/Subsystem/StoreValueType.stories.tsx +1 -1
  102. package/src/stories/Canvases/Subsystem/TrailAutoplay.stories.tsx +1 -1
  103. package/src/stories/Canvases/Subsystem/TrailSidebarViews.stories.tsx +1 -1
  104. package/src/stories/Canvases/Subsystem/Trails.stories.tsx +1 -1
  105. package/src/stories/Canvases/Subsystem/WorkspacePackageFrames.stories.tsx +1 -1
  106. package/src/stories/Canvases/Subsystem/issuesFixtures.ts +192 -0
  107. package/src/stories/Canvases/Subsystem/reorderFixtures.tsx +125 -0
  108. package/src/subsystem/C4ContainersPanel.test.tsx +151 -0
  109. package/src/subsystem/C4ContainersPanel.tsx +315 -0
  110. package/src/subsystem/C4NodeCard.tsx +12 -4
  111. package/src/subsystem/C4ProjectionView.tsx +107 -37
  112. package/src/subsystem/C4SketchView.tsx +96 -74
  113. package/src/subsystem/DescriptionOverlay.test.tsx +2 -0
  114. package/src/subsystem/DescriptionOverlay.tsx +20 -5
  115. package/src/subsystem/DescriptionPreview.tsx +96 -0
  116. package/src/subsystem/SubsystemComponentGraph.sidebar.test.tsx +1 -1
  117. package/src/subsystem/SubsystemComponentGraph.tsx +14 -43
  118. package/src/subsystem/__fixtures__/c4Sketch.ts +2 -0
  119. package/src/subsystem/__fixtures__/c4SketchGallery.test.ts +65 -0
  120. package/src/subsystem/__fixtures__/c4SketchGallery.ts +351 -0
  121. package/src/subsystem/__fixtures__/c4Sketches/maintenance-bridge.json +777 -0
  122. package/src/subsystem/__fixtures__/c4Sketches/openbot.json +886 -0
  123. package/src/subsystem/c4Sketch.ts +13 -0
  124. package/src/subsystem/containerCard.tsx +4 -1
  125. package/src/subsystem/techIcons/index.tsx +11 -2
@@ -8,6 +8,9 @@
8
8
 
9
9
  import type { C4Model } from './c4';
10
10
 
11
+ /** Maximum length of an authored sketch description (short sidebar blurb). */
12
+ export const C4_SKETCH_DESCRIPTION_MAX = 200;
13
+
11
14
  /**
12
15
  * A C4 sketch — an authored, unverified architecture hypothesis.
13
16
  *
@@ -22,9 +25,19 @@ export interface C4Sketch {
22
25
  title: string;
23
26
  /** Repos the sketch claims to describe; can be empty for greenfield. */
24
27
  repoKeys: string[];
28
+ /**
29
+ * Short description shown at the top of the sidebar. At most
30
+ * {@link C4_SKETCH_DESCRIPTION_MAX} characters; hosts reject longer values.
31
+ */
32
+ description?: string;
25
33
  /** Authored nodes + edges. */
26
34
  model: C4Model;
27
35
  author?: string;
36
+ /**
37
+ * Extended Markdown notes about the sketch. The sidebar shows the short
38
+ * `description` (or a clamped preview of these notes when it is absent);
39
+ * `More` opens the full document in an Overview overlay.
40
+ */
28
41
  notes?: string;
29
42
  createdAt: string;
30
43
  updatedAt: string;
@@ -118,6 +118,8 @@ export interface ContainerCardHeaderProps {
118
118
  iconLabel?: string;
119
119
  /** The border colour; the glyph takes it so the two read as one accent. */
120
120
  color: string;
121
+ /** Override for the kind glyph colour; defaults to `color`. */
122
+ iconColor?: string;
121
123
  /** The technology row's text. Empty hides the text but not the row. */
122
124
  topLabel?: string;
123
125
  /** The official technology mark, when we hold one. */
@@ -146,6 +148,7 @@ export function ContainerCardHeader({
146
148
  Icon,
147
149
  iconLabel,
148
150
  color,
151
+ iconColor,
149
152
  topLabel,
150
153
  brand,
151
154
  hasTechRow,
@@ -199,7 +202,7 @@ export function ContainerCardHeader({
199
202
  style={{
200
203
  display: 'inline-flex',
201
204
  flexShrink: 0,
202
- color,
205
+ color: iconColor ?? color,
203
206
  // Nudge down so the glyph optically centres on the first text line.
204
207
  marginTop: 3,
205
208
  }}
@@ -68,10 +68,19 @@ export function technologyBrand(technology: string | undefined): TechBrand | und
68
68
  }
69
69
 
70
70
  /** A brand mark sized to the top row. Full-colour, not tinted by state. */
71
- export function TechMark({ brand, size = 14 }: { brand: TechBrand; size?: number }) {
71
+ export function TechMark({
72
+ brand,
73
+ size = 14,
74
+ showTitle = true,
75
+ }: {
76
+ brand: TechBrand;
77
+ size?: number;
78
+ /** Render the attribution tooltip. Off inside rows that already explain themselves. */
79
+ showTitle?: boolean;
80
+ }) {
72
81
  return (
73
82
  <span
74
- title={`${brand.name} — ${brand.source}`}
83
+ {...(showTitle ? { title: `${brand.name} — ${brand.source}` } : {})}
75
84
  aria-label={brand.name}
76
85
  style={{ display: 'inline-flex', width: size, height: size, flexShrink: 0 }}
77
86
  // The SVG is a static, vendored string — never user input.