@principal-ai/subsystems-react 0.56.24 → 0.56.26
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.
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/stories/Canvases/Subsystem/issuesFixtures.d.ts +4 -0
- package/dist/stories/Canvases/Subsystem/issuesFixtures.d.ts.map +1 -0
- package/dist/stories/Canvases/Subsystem/issuesFixtures.js +189 -0
- package/dist/stories/Canvases/Subsystem/issuesFixtures.js.map +1 -0
- package/dist/stories/Canvases/Subsystem/reorderFixtures.d.ts +8 -0
- package/dist/stories/Canvases/Subsystem/reorderFixtures.d.ts.map +1 -0
- package/dist/stories/Canvases/Subsystem/reorderFixtures.js +103 -0
- package/dist/stories/Canvases/Subsystem/reorderFixtures.js.map +1 -0
- package/dist/subsystem/C4ContainersPanel.d.ts +35 -0
- package/dist/subsystem/C4ContainersPanel.d.ts.map +1 -0
- package/dist/subsystem/C4ContainersPanel.js +165 -0
- package/dist/subsystem/C4ContainersPanel.js.map +1 -0
- package/dist/subsystem/C4NodeCard.d.ts.map +1 -1
- package/dist/subsystem/C4NodeCard.js +10 -4
- package/dist/subsystem/C4NodeCard.js.map +1 -1
- package/dist/subsystem/C4ProjectionView.d.ts +12 -2
- package/dist/subsystem/C4ProjectionView.d.ts.map +1 -1
- package/dist/subsystem/C4ProjectionView.js +100 -33
- package/dist/subsystem/C4ProjectionView.js.map +1 -1
- package/dist/subsystem/C4SketchView.d.ts.map +1 -1
- package/dist/subsystem/C4SketchView.js +53 -34
- package/dist/subsystem/C4SketchView.js.map +1 -1
- package/dist/subsystem/ConstructsCatalog.d.ts +18 -11
- package/dist/subsystem/ConstructsCatalog.d.ts.map +1 -1
- package/dist/subsystem/ConstructsCatalog.js +25 -27
- package/dist/subsystem/ConstructsCatalog.js.map +1 -1
- package/dist/subsystem/DescriptionOverlay.d.ts +10 -2
- package/dist/subsystem/DescriptionOverlay.d.ts.map +1 -1
- package/dist/subsystem/DescriptionOverlay.js +4 -4
- package/dist/subsystem/DescriptionOverlay.js.map +1 -1
- package/dist/subsystem/DescriptionPreview.d.ts +31 -0
- package/dist/subsystem/DescriptionPreview.d.ts.map +1 -0
- package/dist/subsystem/DescriptionPreview.js +31 -0
- package/dist/subsystem/DescriptionPreview.js.map +1 -0
- package/dist/subsystem/SubsystemComponentGraph.d.ts +13 -3
- package/dist/subsystem/SubsystemComponentGraph.d.ts.map +1 -1
- package/dist/subsystem/SubsystemComponentGraph.js +18 -23
- package/dist/subsystem/SubsystemComponentGraph.js.map +1 -1
- package/dist/subsystem/__fixtures__/c4Sketch.d.ts.map +1 -1
- package/dist/subsystem/__fixtures__/c4Sketch.js +1 -0
- package/dist/subsystem/__fixtures__/c4Sketch.js.map +1 -1
- package/dist/subsystem/__fixtures__/c4SketchGallery.d.ts +29 -0
- package/dist/subsystem/__fixtures__/c4SketchGallery.d.ts.map +1 -0
- package/dist/subsystem/__fixtures__/c4SketchGallery.js +320 -0
- package/dist/subsystem/__fixtures__/c4SketchGallery.js.map +1 -0
- package/dist/subsystem/__fixtures__/c4Sketches/maintenance-bridge.json +778 -0
- package/dist/subsystem/__fixtures__/c4Sketches/openbot.json +887 -0
- package/dist/subsystem/c4Sketch.d.ts +12 -0
- package/dist/subsystem/c4Sketch.d.ts.map +1 -1
- package/dist/subsystem/c4Sketch.js +2 -1
- package/dist/subsystem/c4Sketch.js.map +1 -1
- package/dist/subsystem/containerCard.d.ts +3 -1
- package/dist/subsystem/containerCard.d.ts.map +1 -1
- package/dist/subsystem/containerCard.js +2 -2
- package/dist/subsystem/containerCard.js.map +1 -1
- package/dist/subsystem/techIcons/index.d.ts +3 -1
- package/dist/subsystem/techIcons/index.d.ts.map +1 -1
- package/dist/subsystem/techIcons/index.js +2 -2
- package/dist/subsystem/techIcons/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +10 -0
- package/src/stories/Canvases/C4/C4CardGrow.stories.tsx +1 -1
- package/src/stories/Canvases/C4/C4Component.stories.tsx +1 -1
- package/src/stories/Canvases/C4/C4Container.stories.tsx +1 -1
- package/src/stories/Canvases/C4/C4Draft.stories.tsx +1 -1
- package/src/stories/Canvases/C4/C4NodeGallery.stories.tsx +1 -1
- package/src/stories/Canvases/C4/C4Sketch.stories.tsx +62 -4
- package/src/stories/Canvases/C4/C4ToComponentDrill.stories.tsx +1 -1
- package/src/stories/Canvases/C4/C4Transition.stories.tsx +1 -1
- package/src/stories/Canvases/Subsystem/AnimatedProgression.stories.tsx +1 -1
- package/src/stories/Canvases/Subsystem/Appearance.stories.tsx +1 -1
- package/src/stories/Canvases/Subsystem/Basics.stories.tsx +1 -1
- package/src/stories/Canvases/Subsystem/Captures.stories.tsx +1 -1
- package/src/stories/Canvases/Subsystem/Constructs.stories.tsx +3 -7
- package/src/stories/Canvases/Subsystem/ConstructsEmbed.stories.tsx +27 -0
- package/src/stories/Canvases/Subsystem/ContainerFrames.stories.tsx +7 -4
- package/src/stories/Canvases/Subsystem/CustomEntities.stories.tsx +3 -2
- package/src/stories/Canvases/Subsystem/Deprecated.stories.tsx +2 -100
- package/src/stories/Canvases/Subsystem/DeprecatedGraph.stories.tsx +124 -0
- package/src/stories/Canvases/Subsystem/DetailPanel.stories.tsx +1 -1
- package/src/stories/Canvases/Subsystem/Diagnostics.stories.tsx +1 -43
- package/src/stories/Canvases/Subsystem/DiagnosticsStates.stories.tsx +63 -0
- package/src/stories/Canvases/Subsystem/EdgeViews.stories.tsx +3 -2
- package/src/stories/Canvases/Subsystem/FrameworkStereotype.stories.tsx +1 -1
- package/src/stories/Canvases/Subsystem/GraphTitle.stories.tsx +1 -19
- package/src/stories/Canvases/Subsystem/GraphTitleGraph.stories.tsx +51 -0
- package/src/stories/Canvases/Subsystem/Issues.stories.tsx +5 -229
- package/src/stories/Canvases/Subsystem/IssuesList.stories.tsx +60 -0
- package/src/stories/Canvases/Subsystem/LayoutDirection.stories.tsx +1 -1
- package/src/stories/Canvases/Subsystem/ModuleBadges.stories.tsx +6 -63
- package/src/stories/Canvases/Subsystem/ModuleBadgesNode.stories.tsx +81 -0
- package/src/stories/Canvases/Subsystem/ModulePathNesting.stories.tsx +1 -1
- package/src/stories/Canvases/Subsystem/Modules.stories.tsx +1 -1
- package/src/stories/Canvases/Subsystem/NodeAnatomy.stories.tsx +1 -1
- package/src/stories/Canvases/Subsystem/Packages.stories.tsx +1 -1
- package/src/stories/Canvases/Subsystem/Presentation.stories.tsx +1 -1
- package/src/stories/Canvases/Subsystem/Processes.stories.tsx +3 -2
- package/src/stories/Canvases/Subsystem/Reorder.stories.tsx +5 -154
- package/src/stories/Canvases/Subsystem/ReorderPanel.stories.tsx +75 -0
- package/src/stories/Canvases/Subsystem/Scenarios.stories.tsx +7 -4
- package/src/stories/Canvases/Subsystem/Spotlights.stories.tsx +1 -1
- package/src/stories/Canvases/Subsystem/StepEmphasis.stories.tsx +1 -1
- package/src/stories/Canvases/Subsystem/StoreValueType.stories.tsx +1 -1
- package/src/stories/Canvases/Subsystem/TrailAutoplay.stories.tsx +3 -2
- package/src/stories/Canvases/Subsystem/TrailSidebarViews.stories.tsx +1 -1
- package/src/stories/Canvases/Subsystem/Trails.stories.tsx +5 -3
- package/src/stories/Canvases/Subsystem/WorkspacePackageFrames.stories.tsx +1 -1
- package/src/stories/Canvases/Subsystem/issuesFixtures.ts +192 -0
- package/src/stories/Canvases/Subsystem/reorderFixtures.tsx +125 -0
- package/src/stories/Components/ConstructsCatalog.stories.tsx +2 -1
- package/src/subsystem/C4ContainersPanel.test.tsx +151 -0
- package/src/subsystem/C4ContainersPanel.tsx +315 -0
- package/src/subsystem/C4NodeCard.tsx +12 -4
- package/src/subsystem/C4ProjectionView.tsx +151 -53
- package/src/subsystem/C4SketchView.tsx +96 -74
- package/src/subsystem/ConstructsCatalog.tsx +59 -58
- package/src/subsystem/DescriptionOverlay.test.tsx +18 -8
- package/src/subsystem/DescriptionOverlay.tsx +20 -5
- package/src/subsystem/DescriptionPreview.tsx +96 -0
- package/src/subsystem/SubsystemComponentGraph.sidebar.test.tsx +28 -8
- package/src/subsystem/SubsystemComponentGraph.tsx +46 -51
- package/src/subsystem/__fixtures__/c4Sketch.ts +2 -0
- package/src/subsystem/__fixtures__/c4SketchGallery.test.ts +65 -0
- package/src/subsystem/__fixtures__/c4SketchGallery.ts +361 -0
- package/src/subsystem/__fixtures__/c4Sketches/maintenance-bridge.json +778 -0
- package/src/subsystem/__fixtures__/c4Sketches/openbot.json +887 -0
- package/src/subsystem/c4Sketch.ts +13 -0
- package/src/subsystem/containerCard.tsx +4 -1
- 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({
|
|
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
|
|
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.
|