@principal-ai/subsystems-react 0.49.0 → 0.51.0
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 +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/pierre/PierreFileView.d.ts +1 -1
- package/dist/pierre/PierreFileView.d.ts.map +1 -1
- package/dist/pierre/PierreFileView.js +2 -1
- package/dist/pierre/PierreFileView.js.map +1 -1
- package/dist/pierre/PierreSnippetView.d.ts +1 -1
- package/dist/pierre/PierreSnippetView.d.ts.map +1 -1
- package/dist/pierre/PierreSnippetView.js +2 -1
- package/dist/pierre/PierreSnippetView.js.map +1 -1
- package/dist/pierre/PierreTrailCodeView.d.ts +7 -1
- package/dist/pierre/PierreTrailCodeView.d.ts.map +1 -1
- package/dist/pierre/PierreTrailCodeView.js +71 -18
- package/dist/pierre/PierreTrailCodeView.js.map +1 -1
- package/dist/pierre/pierreBackground.d.ts +36 -2
- package/dist/pierre/pierreBackground.d.ts.map +1 -1
- package/dist/pierre/pierreBackground.js +40 -13
- package/dist/pierre/pierreBackground.js.map +1 -1
- package/dist/pierre/visibleStep.d.ts +48 -0
- package/dist/pierre/visibleStep.d.ts.map +1 -0
- package/dist/pierre/visibleStep.js +53 -0
- package/dist/pierre/visibleStep.js.map +1 -0
- package/dist/stories/Subsystem/C4Graph/c4Associations.fixture.d.ts +95 -0
- package/dist/stories/Subsystem/C4Graph/c4Associations.fixture.d.ts.map +1 -0
- package/dist/stories/Subsystem/C4Graph/c4Associations.fixture.js +340 -0
- package/dist/stories/Subsystem/C4Graph/c4Associations.fixture.js.map +1 -0
- package/dist/stories/Subsystem/C4Graph/c4Fixture.d.ts +4 -0
- package/dist/stories/Subsystem/C4Graph/c4Fixture.d.ts.map +1 -1
- package/dist/stories/Subsystem/C4Graph/c4Fixture.js +7334 -1
- package/dist/stories/Subsystem/C4Graph/c4Fixture.js.map +1 -1
- package/dist/stories/Subsystem/C4Graph/generateFixture.d.ts +2 -0
- package/dist/stories/Subsystem/C4Graph/generateFixture.d.ts.map +1 -0
- package/dist/stories/Subsystem/C4Graph/generateFixture.js +145 -0
- package/dist/stories/Subsystem/C4Graph/generateFixture.js.map +1 -0
- package/dist/subsystem/C4Graph.d.ts.map +1 -1
- package/dist/subsystem/C4Graph.js +16 -60
- package/dist/subsystem/C4Graph.js.map +1 -1
- package/dist/subsystem/C4NodeCard.d.ts +84 -0
- package/dist/subsystem/C4NodeCard.d.ts.map +1 -0
- package/dist/subsystem/C4NodeCard.js +229 -0
- package/dist/subsystem/C4NodeCard.js.map +1 -0
- package/dist/subsystem/DiagnosticToggle.d.ts +8 -1
- package/dist/subsystem/DiagnosticToggle.d.ts.map +1 -1
- package/dist/subsystem/DiagnosticToggle.js +40 -6
- package/dist/subsystem/DiagnosticToggle.js.map +1 -1
- package/dist/subsystem/FileDrawer.d.ts +10 -1
- package/dist/subsystem/FileDrawer.d.ts.map +1 -1
- package/dist/subsystem/FileDrawer.js +61 -40
- package/dist/subsystem/FileDrawer.js.map +1 -1
- package/dist/subsystem/SubsystemComponentGraph.d.ts +6 -0
- package/dist/subsystem/SubsystemComponentGraph.d.ts.map +1 -1
- package/dist/subsystem/SubsystemComponentGraph.js +21 -10
- package/dist/subsystem/SubsystemComponentGraph.js.map +1 -1
- package/dist/subsystem/c4Associations.d.ts +186 -0
- package/dist/subsystem/c4Associations.d.ts.map +1 -0
- package/dist/subsystem/c4Associations.js +284 -0
- package/dist/subsystem/c4Associations.js.map +1 -0
- package/dist/subsystem/model.d.ts +25 -1
- package/dist/subsystem/model.d.ts.map +1 -1
- package/dist/subsystem/model.js +15 -0
- package/dist/subsystem/model.js.map +1 -1
- package/dist/subsystem/nodes.d.ts.map +1 -1
- package/dist/subsystem/nodes.js +78 -7
- package/dist/subsystem/nodes.js.map +1 -1
- package/dist/subsystem/toC4.d.ts +119 -0
- package/dist/subsystem/toC4.d.ts.map +1 -1
- package/dist/subsystem/toC4.js +95 -5
- package/dist/subsystem/toC4.js.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +39 -0
- package/src/pierre/PierreFileView.tsx +2 -1
- package/src/pierre/PierreSnippetView.tsx +2 -1
- package/src/pierre/PierreTrailCodeView.tsx +81 -22
- package/src/pierre/pierreBackground.ts +62 -12
- package/src/pierre/visibleStep.test.ts +108 -0
- package/src/pierre/visibleStep.ts +76 -0
- package/src/stories/Subsystem/C4Graph/C4Associations.stories.tsx +273 -0
- package/src/stories/Subsystem/C4Graph/C4NodeGallery.stories.tsx +325 -0
- package/src/stories/Subsystem/C4Graph/c4Associations.fixture.ts +344 -0
- package/src/stories/Subsystem/C4Graph/c4Fixture.ts +7337 -4
- package/src/stories/Subsystem/C4Graph/generateFixture.ts +161 -0
- package/src/stories/Subsystem/ComponentGraph/Deprecated.stories.tsx +358 -0
- package/src/stories/Subsystem/ComponentGraph/Diagnostics.stories.tsx +27 -2
- package/src/stories/Subsystem/ComponentGraph/{Flows.stories.tsx → Trails.stories.tsx} +10 -4
- package/src/subsystem/C4Graph.tsx +51 -92
- package/src/subsystem/C4NodeCard.test.ts +196 -0
- package/src/subsystem/C4NodeCard.tsx +307 -0
- package/src/subsystem/DiagnosticToggle.tsx +58 -4
- package/src/subsystem/FileDrawer.tsx +112 -63
- package/src/subsystem/SubsystemComponentGraph.tsx +29 -5
- package/src/subsystem/c4Associations.test.ts +484 -0
- package/src/subsystem/c4Associations.ts +398 -0
- package/src/subsystem/model.ts +34 -1
- package/src/subsystem/nodes.tsx +124 -5
- package/src/subsystem/toC4.ts +210 -5
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { ThemeProvider, defaultEditorTheme, useTheme } from '@principal-ade/industry-theme';
|
|
4
|
+
import { C4NodeCard, nodeStyle, nodeSubtitle, nodeTag, nodeMissing, NODE_W } from '../../../subsystem/C4NodeCard';
|
|
5
|
+
import type { C4Node, C4ElementType } from '../../../subsystem/toC4';
|
|
6
|
+
|
|
7
|
+
// ---------------------------------------------------------------------------
|
|
8
|
+
// A card gallery: every C4 box variant, outside the graph.
|
|
9
|
+
//
|
|
10
|
+
// The graph answers "what does this system look like". This answers "what does
|
|
11
|
+
// a box MEAN" — which encoding maps to which C4 concept, and which gaps the
|
|
12
|
+
// notation still wants filled.
|
|
13
|
+
//
|
|
14
|
+
// Rendering the card directly (not through React Flow) is the point: the node
|
|
15
|
+
// is a plain presentational component, so it can be reviewed and diffed
|
|
16
|
+
// without a layout engine in the way.
|
|
17
|
+
// ---------------------------------------------------------------------------
|
|
18
|
+
|
|
19
|
+
const meta = {
|
|
20
|
+
title: 'Subsystem/C4Graph/C4NodeGallery',
|
|
21
|
+
parameters: { layout: 'fullscreen' },
|
|
22
|
+
tags: ['autodocs'],
|
|
23
|
+
decorators: [
|
|
24
|
+
(Story) => (
|
|
25
|
+
<ThemeProvider theme={defaultEditorTheme}>
|
|
26
|
+
<Story />
|
|
27
|
+
</ThemeProvider>
|
|
28
|
+
),
|
|
29
|
+
],
|
|
30
|
+
} satisfies Meta;
|
|
31
|
+
|
|
32
|
+
export default meta;
|
|
33
|
+
type Story = StoryObj<typeof meta>;
|
|
34
|
+
|
|
35
|
+
// --- sample nodes ---------------------------------------------------------
|
|
36
|
+
|
|
37
|
+
function node(over: Partial<C4Node> & { id: string; label: string }): C4Node {
|
|
38
|
+
return {
|
|
39
|
+
kind: 'container',
|
|
40
|
+
members: [],
|
|
41
|
+
constructs: [],
|
|
42
|
+
isStore: false,
|
|
43
|
+
...over,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const CONFIRMED = {
|
|
48
|
+
id: 'container:studio-host',
|
|
49
|
+
label: 'Studio Host',
|
|
50
|
+
type: 'application' as C4ElementType,
|
|
51
|
+
technology: 'Bun + Electrobun',
|
|
52
|
+
description: 'Runs the audit pipeline, owns the model store, serves the RPC surface.',
|
|
53
|
+
state: 'accepted' as const,
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const VARIANTS: Array<{ group: string; note: string; node: C4Node }> = [
|
|
57
|
+
// `id` on each variant is its caption key, not a component field.
|
|
58
|
+
// --- confirmation state: the axis that matters most --------------------
|
|
59
|
+
{
|
|
60
|
+
group: 'Confirmation state',
|
|
61
|
+
note: 'The whole point of the association layer. Solid = a person signed off. Dashed = an agent asked, nobody answered. Muted = raw derivation, never reviewed.',
|
|
62
|
+
node: node({
|
|
63
|
+
id: 'a1',
|
|
64
|
+
label: 'subsystems-studio/host',
|
|
65
|
+
key: 'subsystems-studio/host',
|
|
66
|
+
members: ['a', 'b', 'c'],
|
|
67
|
+
constructs: ['function', 'store'],
|
|
68
|
+
decoration: CONFIRMED,
|
|
69
|
+
}),
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
group: '',
|
|
73
|
+
note: '',
|
|
74
|
+
node: node({
|
|
75
|
+
id: 'a2',
|
|
76
|
+
label: 'subsystems-core/types',
|
|
77
|
+
key: 'subsystems-core/types',
|
|
78
|
+
members: ['x', 'y'],
|
|
79
|
+
constructs: ['interface', 'type_alias'],
|
|
80
|
+
decoration: {
|
|
81
|
+
id: 'container:subsystems-core/types',
|
|
82
|
+
label: 'subsystems-core/types',
|
|
83
|
+
type: 'library',
|
|
84
|
+
state: 'proposed',
|
|
85
|
+
},
|
|
86
|
+
}),
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
group: '',
|
|
90
|
+
note: '',
|
|
91
|
+
node: node({
|
|
92
|
+
id: 'a3',
|
|
93
|
+
label: 'principal-studio-cli',
|
|
94
|
+
key: 'principal-studio-cli',
|
|
95
|
+
members: ['cli-create'],
|
|
96
|
+
constructs: ['function'],
|
|
97
|
+
}),
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
group: '',
|
|
101
|
+
note: '',
|
|
102
|
+
node: node({
|
|
103
|
+
id: 'a4',
|
|
104
|
+
label: 'graphify/extract',
|
|
105
|
+
key: 'graphify/extract',
|
|
106
|
+
members: ['extract'],
|
|
107
|
+
constructs: ['function'],
|
|
108
|
+
decoration: {
|
|
109
|
+
id: 'container:graphify/extract',
|
|
110
|
+
label: 'graphify/extract',
|
|
111
|
+
type: 'application',
|
|
112
|
+
state: 'rejected',
|
|
113
|
+
},
|
|
114
|
+
}),
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
group: '',
|
|
118
|
+
note: '',
|
|
119
|
+
node: node({ id: 'a5', label: 'Studio Host', key: 'p1 + p2', sourceKeys: ['p1', 'p2'], members: ['a'], constructs: ['function'], decoration: CONFIRMED }),
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
// --- C4 element type ----------------------------------------------------
|
|
123
|
+
{
|
|
124
|
+
group: 'C4 element type',
|
|
125
|
+
note: 'C4 requires a type on every element. The document has no such field, so this is always a confirmation.',
|
|
126
|
+
node: node({
|
|
127
|
+
id: 'b1',
|
|
128
|
+
label: 'Subsystem model store',
|
|
129
|
+
members: ['s1'],
|
|
130
|
+
constructs: ['store'],
|
|
131
|
+
decoration: { id: 'container:ds', label: 'Subsystem model store', type: 'data-store', technology: 'JSON files on disk', state: 'accepted', description: 'Every stored model plus its index.' },
|
|
132
|
+
}),
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
group: '',
|
|
136
|
+
note: '',
|
|
137
|
+
node: node({
|
|
138
|
+
id: 'b2',
|
|
139
|
+
label: 'Audit correction queue',
|
|
140
|
+
members: ['s2'],
|
|
141
|
+
constructs: ['store'],
|
|
142
|
+
decoration: { id: 'container:q', label: 'Audit correction queue', type: 'queue', technology: 'agent session transport', state: 'accepted', description: 'Proposals awaiting a human decision.' },
|
|
143
|
+
}),
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
group: '',
|
|
147
|
+
note: '',
|
|
148
|
+
node: node({
|
|
149
|
+
id: 'b3',
|
|
150
|
+
label: 'subsystems-core',
|
|
151
|
+
members: ['i1', 'i2'],
|
|
152
|
+
constructs: ['interface', 'function'],
|
|
153
|
+
decoration: { id: 'container:lib', label: 'subsystems-core', type: 'library', technology: 'TypeScript', state: 'accepted', description: 'Schema and validation. Not a deployable unit.' },
|
|
154
|
+
}),
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
group: '',
|
|
158
|
+
note: '',
|
|
159
|
+
node: node({
|
|
160
|
+
id: 'b4',
|
|
161
|
+
label: 'OpenCode v2 service',
|
|
162
|
+
kind: 'external',
|
|
163
|
+
members: ['oc2'],
|
|
164
|
+
constructs: ['external'],
|
|
165
|
+
decoration: { id: 'external:oc2', label: 'OpenCode v2 service', type: 'software-system', technology: 'HTTP', state: 'accepted', description: 'Runs maintain agent sessions.' },
|
|
166
|
+
}),
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
group: '',
|
|
170
|
+
note: '',
|
|
171
|
+
node: node({
|
|
172
|
+
id: 'b5',
|
|
173
|
+
label: 'Maintain operator',
|
|
174
|
+
kind: 'actor',
|
|
175
|
+
members: ['a'],
|
|
176
|
+
constructs: ['custom_entity'],
|
|
177
|
+
decoration: { id: 'actor:a', label: 'Maintain operator', type: 'person', state: 'proposed', description: 'Reviews and accepts correction proposals.' },
|
|
178
|
+
}),
|
|
179
|
+
},
|
|
180
|
+
|
|
181
|
+
// --- the gaps C4 keeps asking about ------------------------------------
|
|
182
|
+
{
|
|
183
|
+
group: 'Notation gaps',
|
|
184
|
+
note: 'C4 requires technology and description on every container. A confirmed box that never got either says so on its face rather than looking finished.',
|
|
185
|
+
node: node({
|
|
186
|
+
id: 'c1',
|
|
187
|
+
label: 'site/web',
|
|
188
|
+
key: 'site/web',
|
|
189
|
+
members: ['w1', 'w2', 'w3'],
|
|
190
|
+
constructs: ['function'],
|
|
191
|
+
decoration: { id: 'container:site/web', label: 'site/web', type: 'application', state: 'accepted' },
|
|
192
|
+
}),
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
group: '',
|
|
196
|
+
note: '',
|
|
197
|
+
node: node({
|
|
198
|
+
id: 'c2',
|
|
199
|
+
label: 'subsystems-studio/renderer',
|
|
200
|
+
key: 'subsystems-studio/renderer',
|
|
201
|
+
members: ['r1', 'r2'],
|
|
202
|
+
constructs: ['function'],
|
|
203
|
+
decoration: { id: 'container:renderer', label: 'subsystems-studio/renderer', type: 'application', technology: 'React', state: 'accepted' },
|
|
204
|
+
}),
|
|
205
|
+
},
|
|
206
|
+
|
|
207
|
+
// --- component level ---------------------------------------------------
|
|
208
|
+
{
|
|
209
|
+
group: 'Component level',
|
|
210
|
+
note: 'Same card, one level down. A component has no type requirement — it inherits from its container.',
|
|
211
|
+
node: node({
|
|
212
|
+
id: 'd1',
|
|
213
|
+
label: 'buildBoundaryLayoutGroups',
|
|
214
|
+
kind: 'component',
|
|
215
|
+
members: ['b1'],
|
|
216
|
+
constructs: ['function'],
|
|
217
|
+
component: { alias: 'b1', name: 'buildBoundaryLayoutGroups', construct: 'function', file: 'src/subsystem/model.ts', purl: 'pkg:x#src/subsystem/model.ts' },
|
|
218
|
+
}),
|
|
219
|
+
},
|
|
220
|
+
];
|
|
221
|
+
|
|
222
|
+
function Section({ title, note }: { title?: string; note?: string }) {
|
|
223
|
+
if (!title) return null;
|
|
224
|
+
return (
|
|
225
|
+
<div style={{ marginBottom: 10, maxWidth: 720 }}>
|
|
226
|
+
<h2 style={{ margin: '0 0 3px', fontSize: 15, color: '#e8e8ea' }}>{title}</h2>
|
|
227
|
+
{note ? <p style={{ margin: 0, fontSize: 12, lineHeight: 1.45, color: '#9a9aa0' }}>{note}</p> : null}
|
|
228
|
+
</div>
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
function Row({ children }: { children: React.ReactNode }) {
|
|
233
|
+
return (
|
|
234
|
+
<div style={{ display: 'flex', flexWrap: 'wrap', gap: 14, alignItems: 'flex-start', marginBottom: 6 }}>
|
|
235
|
+
{children}
|
|
236
|
+
</div>
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/** Label under a card, so a reviewer can name the case they are looking at. */
|
|
241
|
+
function Case({ caption, children }: { caption: string; children: React.ReactNode }) {
|
|
242
|
+
return (
|
|
243
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 5, alignItems: 'flex-start' }}>
|
|
244
|
+
{children}
|
|
245
|
+
<span
|
|
246
|
+
style={{
|
|
247
|
+
fontFamily: 'monospace',
|
|
248
|
+
fontSize: 10,
|
|
249
|
+
lineHeight: 1.4,
|
|
250
|
+
color: '#6a6a70',
|
|
251
|
+
width: NODE_W,
|
|
252
|
+
}}
|
|
253
|
+
>
|
|
254
|
+
{caption}
|
|
255
|
+
</span>
|
|
256
|
+
</div>
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
function Gallery() {
|
|
261
|
+
const { theme } = useTheme();
|
|
262
|
+
const muted = theme.colors.textMuted ?? '#9a9aa0';
|
|
263
|
+
|
|
264
|
+
const legend: Array<[string, string]> = [
|
|
265
|
+
['accepted', nodeStyle({ id: 'x', kind: 'container', label: '', members: [], constructs: [], isStore: false, decoration: CONFIRMED } as C4Node, theme).color],
|
|
266
|
+
['proposed', nodeStyle({ id: 'x', kind: 'container', label: '', members: [], constructs: [], isStore: false, decoration: { id: 'y', state: 'proposed' } } as C4Node, theme).color],
|
|
267
|
+
['unconfirmed', nodeStyle({ id: 'x', kind: 'container', label: '', members: [], constructs: [], isStore: false } as C4Node, theme).color],
|
|
268
|
+
];
|
|
269
|
+
|
|
270
|
+
let currentGroup = '';
|
|
271
|
+
return (
|
|
272
|
+
<div style={{ padding: 28, background: theme.colors.background, minHeight: '100vh' }}>
|
|
273
|
+
<h1 style={{ margin: '0 0 4px', fontSize: 22, color: theme.colors.text }}>C4 node gallery</h1>
|
|
274
|
+
<p style={{ margin: '0 0 22px', fontSize: 13, color: muted, maxWidth: 720, lineHeight: 1.5 }}>
|
|
275
|
+
Every box the graph can draw, rendered on its own. The graph answers “what does this system
|
|
276
|
+
look like”; this answers “what does a box mean”. No layout engine, no edges — just the
|
|
277
|
+
encoding.
|
|
278
|
+
</p>
|
|
279
|
+
|
|
280
|
+
<div style={{ display: 'flex', gap: 16, fontFamily: 'monospace', fontSize: 11, marginBottom: 26 }}>
|
|
281
|
+
{legend.map(([name, color]) => (
|
|
282
|
+
<span key={name} style={{ display: 'flex', alignItems: 'center', gap: 6, color: muted }}>
|
|
283
|
+
<span style={{ width: 22, height: 0, borderTop: `3px solid ${color}`, display: 'inline-block' }} />
|
|
284
|
+
{name}
|
|
285
|
+
</span>
|
|
286
|
+
))}
|
|
287
|
+
</div>
|
|
288
|
+
|
|
289
|
+
<Row>
|
|
290
|
+
{VARIANTS.map((v) => {
|
|
291
|
+
const showHeader = v.group && v.group !== currentGroup;
|
|
292
|
+
if (v.group) currentGroup = v.group;
|
|
293
|
+
return (
|
|
294
|
+
<React.Fragment key={v.id ?? v.node.id}>
|
|
295
|
+
{showHeader && (
|
|
296
|
+
<div style={{ width: '100%' }}>
|
|
297
|
+
<Section title={v.group} note={v.note} />
|
|
298
|
+
</div>
|
|
299
|
+
)}
|
|
300
|
+
<Case
|
|
301
|
+
caption={`${v.node.id} · tag "${nodeTag(v.node)}" · ${nodeSubtitle(v.node)}${
|
|
302
|
+
nodeMissing(v.node).length ? ` · missing ${nodeMissing(v.node).join('+')}` : ''
|
|
303
|
+
}`}
|
|
304
|
+
>
|
|
305
|
+
<C4NodeCard node={v.node} />
|
|
306
|
+
</Case>
|
|
307
|
+
</React.Fragment>
|
|
308
|
+
);
|
|
309
|
+
})}
|
|
310
|
+
</Row>
|
|
311
|
+
|
|
312
|
+
<div style={{ marginTop: 22, maxWidth: 720 }}>
|
|
313
|
+
<Section
|
|
314
|
+
title="Selected"
|
|
315
|
+
note="A selected node overrides its confirmation styling, so a click target reads differently from the graph around it."
|
|
316
|
+
/>
|
|
317
|
+
<C4NodeCard node={VARIANTS[0]!.node} selected />
|
|
318
|
+
</div>
|
|
319
|
+
</div>
|
|
320
|
+
);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
export const All: Story = {
|
|
324
|
+
render: () => <Gallery />,
|
|
325
|
+
};
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
// GENERATED from live store data by generateFixture.ts — do not hand-edit.
|
|
2
|
+
//
|
|
3
|
+
// Derived from the SAME composition as c4Fixture.ts: 225 components
|
|
4
|
+
// → 13 container keys → 13 associations.
|
|
5
|
+
//
|
|
6
|
+
// Every association is state:'proposed'. None of it is accepted — accepting is
|
|
7
|
+
// a human's decision, and this story exists to make that decision visible.
|
|
8
|
+
|
|
9
|
+
import type { C4Association } from "../../../subsystem/toC4";
|
|
10
|
+
|
|
11
|
+
/** Container keys whose trailing role matches — candidates for a merge. */
|
|
12
|
+
export const C4_MERGE_CANDIDATES = [
|
|
13
|
+
{
|
|
14
|
+
"role": "host",
|
|
15
|
+
"keys": [
|
|
16
|
+
"principal-studio/host",
|
|
17
|
+
"subsystems-studio/host"
|
|
18
|
+
],
|
|
19
|
+
"reason": "2 process keys end in \"/host\" (principal-studio/host, subsystems-studio/host) — one deployable unit under two names, or two units?"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"role": "renderer",
|
|
23
|
+
"keys": [
|
|
24
|
+
"principal-studio/renderer",
|
|
25
|
+
"subsystems-studio/renderer"
|
|
26
|
+
],
|
|
27
|
+
"reason": "2 process keys end in \"/renderer\" (principal-studio/renderer, subsystems-studio/renderer) — one deployable unit under two names, or two units?"
|
|
28
|
+
}
|
|
29
|
+
] as const;
|
|
30
|
+
|
|
31
|
+
/** Every mechanical concern, for the review panel. */
|
|
32
|
+
export const C4_CONCERNS = [
|
|
33
|
+
{
|
|
34
|
+
"target": "subsystems-studio/host",
|
|
35
|
+
"kind": "store_unclassified",
|
|
36
|
+
"message": "1 store(s) in \"subsystems-studio/host\" declare no storage kind (c127) — decide whether each is a C4 data store or an internal detail",
|
|
37
|
+
"members": [
|
|
38
|
+
"c127"
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"target": "subsystems-studio/renderer",
|
|
43
|
+
"kind": "store_unclassified",
|
|
44
|
+
"message": "4 store(s) in \"subsystems-studio/renderer\" declare no storage kind (c42, c95, c102, c131) — decide whether each is a C4 data store or an internal detail",
|
|
45
|
+
"members": [
|
|
46
|
+
"c42",
|
|
47
|
+
"c95",
|
|
48
|
+
"c102",
|
|
49
|
+
"c131"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"target": "site/web",
|
|
54
|
+
"kind": "missing_technology",
|
|
55
|
+
"message": "container \"site/web\" has no framework signal — C4 requires a technology on every container",
|
|
56
|
+
"members": [
|
|
57
|
+
"c82",
|
|
58
|
+
"c83",
|
|
59
|
+
"c84"
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"target": "subsystems-core/types",
|
|
64
|
+
"kind": "missing_technology",
|
|
65
|
+
"message": "container \"subsystems-core/types\" has no framework signal — C4 requires a technology on every container",
|
|
66
|
+
"members": [
|
|
67
|
+
"c85",
|
|
68
|
+
"c86",
|
|
69
|
+
"c87"
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"target": "principal-studio-cli",
|
|
74
|
+
"kind": "singleton",
|
|
75
|
+
"message": "process \"principal-studio-cli\" has exactly one member (c88) — a lone function is not a deployable unit",
|
|
76
|
+
"members": [
|
|
77
|
+
"c88"
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"target": "principal-studio-cli",
|
|
82
|
+
"kind": "missing_technology",
|
|
83
|
+
"message": "container \"principal-studio-cli\" has no framework signal — C4 requires a technology on every container",
|
|
84
|
+
"members": [
|
|
85
|
+
"c88"
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"target": "subsystems-react",
|
|
90
|
+
"kind": "missing_technology",
|
|
91
|
+
"message": "container \"subsystems-react\" has no framework signal — C4 requires a technology on every container",
|
|
92
|
+
"members": [
|
|
93
|
+
"c96",
|
|
94
|
+
"c97",
|
|
95
|
+
"c98",
|
|
96
|
+
"c99",
|
|
97
|
+
"c100",
|
|
98
|
+
"c101",
|
|
99
|
+
"c108",
|
|
100
|
+
"c109",
|
|
101
|
+
"c112",
|
|
102
|
+
"c113",
|
|
103
|
+
"c114"
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"target": "subsystems-react",
|
|
108
|
+
"kind": "store_unclassified",
|
|
109
|
+
"message": "1 store(s) in \"subsystems-react\" declare no storage kind (c98) — decide whether each is a C4 data store or an internal detail",
|
|
110
|
+
"members": [
|
|
111
|
+
"c98"
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"target": "subsystems-core",
|
|
116
|
+
"kind": "missing_technology",
|
|
117
|
+
"message": "container \"subsystems-core\" has no framework signal — C4 requires a technology on every container",
|
|
118
|
+
"members": [
|
|
119
|
+
"c106",
|
|
120
|
+
"c107",
|
|
121
|
+
"c167"
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"target": "subsystems-studio/shared",
|
|
126
|
+
"kind": "library_shaped",
|
|
127
|
+
"message": "process \"subsystems-studio/shared\" has 2 member(s) but none execute at runtime (type_alias) — this reads as a library, not a container",
|
|
128
|
+
"members": [
|
|
129
|
+
"c132",
|
|
130
|
+
"c133"
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"target": "packages/subsystems-studio/run",
|
|
135
|
+
"kind": "missing_technology",
|
|
136
|
+
"message": "container \"packages/subsystems-studio/run\" has no framework signal — C4 requires a technology on every container",
|
|
137
|
+
"members": [
|
|
138
|
+
"c147",
|
|
139
|
+
"c148",
|
|
140
|
+
"c149"
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"target": "packages/subsystems-studio/run",
|
|
145
|
+
"kind": "store_unclassified",
|
|
146
|
+
"message": "1 store(s) in \"packages/subsystems-studio/run\" declare no storage kind (c148) — decide whether each is a C4 data store or an internal detail",
|
|
147
|
+
"members": [
|
|
148
|
+
"c148"
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"target": "principal-studio/host",
|
|
153
|
+
"kind": "singleton",
|
|
154
|
+
"message": "process \"principal-studio/host\" has exactly one member (c155) — a lone function is not a deployable unit",
|
|
155
|
+
"members": [
|
|
156
|
+
"c155"
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"target": "principal-studio/host",
|
|
161
|
+
"kind": "missing_technology",
|
|
162
|
+
"message": "container \"principal-studio/host\" has no framework signal — C4 requires a technology on every container",
|
|
163
|
+
"members": [
|
|
164
|
+
"c155"
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"target": "subsystems-react/session-ui",
|
|
169
|
+
"kind": "singleton",
|
|
170
|
+
"message": "process \"subsystems-react/session-ui\" has exactly one member (c211) — a lone function is not a deployable unit",
|
|
171
|
+
"members": [
|
|
172
|
+
"c211"
|
|
173
|
+
]
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"target": "subsystems-react/session-ui",
|
|
177
|
+
"kind": "missing_technology",
|
|
178
|
+
"message": "container \"subsystems-react/session-ui\" has no framework signal — C4 requires a technology on every container",
|
|
179
|
+
"members": [
|
|
180
|
+
"c211"
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
] as const;
|
|
184
|
+
|
|
185
|
+
export const c4Associations: C4Association[] = [
|
|
186
|
+
{
|
|
187
|
+
"id": "container:(unassigned)",
|
|
188
|
+
"level": "container",
|
|
189
|
+
"sourceKeys": [
|
|
190
|
+
"(unassigned)"
|
|
191
|
+
],
|
|
192
|
+
"label": "(unassigned)",
|
|
193
|
+
"type": "application",
|
|
194
|
+
"technology": "react",
|
|
195
|
+
"state": "proposed",
|
|
196
|
+
"author": "c4-proposer"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"id": "container:packages/subsystems-studio/run",
|
|
200
|
+
"level": "container",
|
|
201
|
+
"sourceKeys": [
|
|
202
|
+
"packages/subsystems-studio/run"
|
|
203
|
+
],
|
|
204
|
+
"label": "packages/subsystems-studio/run",
|
|
205
|
+
"type": "application",
|
|
206
|
+
"state": "proposed",
|
|
207
|
+
"rationale": "container \"packages/subsystems-studio/run\" has no framework signal — C4 requires a technology on every container 1 store(s) in \"packages/subsystems-studio/run\" declare no storage kind (c148) — decide whether each is a C4 data store or an internal detail",
|
|
208
|
+
"author": "c4-proposer"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"id": "container:principal-studio-cli",
|
|
212
|
+
"level": "container",
|
|
213
|
+
"sourceKeys": [
|
|
214
|
+
"principal-studio-cli"
|
|
215
|
+
],
|
|
216
|
+
"label": "principal-studio-cli",
|
|
217
|
+
"type": "application",
|
|
218
|
+
"state": "proposed",
|
|
219
|
+
"rationale": "process \"principal-studio-cli\" has exactly one member (c88) — a lone function is not a deployable unit container \"principal-studio-cli\" has no framework signal — C4 requires a technology on every container",
|
|
220
|
+
"author": "c4-proposer"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"id": "container:principal-studio/host",
|
|
224
|
+
"level": "container",
|
|
225
|
+
"sourceKeys": [
|
|
226
|
+
"principal-studio/host"
|
|
227
|
+
],
|
|
228
|
+
"label": "principal-studio/host",
|
|
229
|
+
"type": "application",
|
|
230
|
+
"state": "proposed",
|
|
231
|
+
"rationale": "process \"principal-studio/host\" has exactly one member (c155) — a lone function is not a deployable unit container \"principal-studio/host\" has no framework signal — C4 requires a technology on every container",
|
|
232
|
+
"author": "c4-proposer"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"id": "container:principal-studio/renderer",
|
|
236
|
+
"level": "container",
|
|
237
|
+
"sourceKeys": [
|
|
238
|
+
"principal-studio/renderer"
|
|
239
|
+
],
|
|
240
|
+
"label": "principal-studio/renderer",
|
|
241
|
+
"type": "application",
|
|
242
|
+
"technology": "react",
|
|
243
|
+
"state": "proposed",
|
|
244
|
+
"author": "c4-proposer"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"id": "container:site/web",
|
|
248
|
+
"level": "container",
|
|
249
|
+
"sourceKeys": [
|
|
250
|
+
"site/web"
|
|
251
|
+
],
|
|
252
|
+
"label": "site/web",
|
|
253
|
+
"type": "application",
|
|
254
|
+
"state": "proposed",
|
|
255
|
+
"rationale": "container \"site/web\" has no framework signal — C4 requires a technology on every container",
|
|
256
|
+
"author": "c4-proposer"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"id": "container:subsystems-core",
|
|
260
|
+
"level": "container",
|
|
261
|
+
"sourceKeys": [
|
|
262
|
+
"subsystems-core"
|
|
263
|
+
],
|
|
264
|
+
"label": "subsystems-core",
|
|
265
|
+
"type": "application",
|
|
266
|
+
"state": "proposed",
|
|
267
|
+
"rationale": "container \"subsystems-core\" has no framework signal — C4 requires a technology on every container",
|
|
268
|
+
"author": "c4-proposer"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"id": "container:subsystems-core/types",
|
|
272
|
+
"level": "container",
|
|
273
|
+
"sourceKeys": [
|
|
274
|
+
"subsystems-core/types"
|
|
275
|
+
],
|
|
276
|
+
"label": "subsystems-core/types",
|
|
277
|
+
"type": "application",
|
|
278
|
+
"state": "proposed",
|
|
279
|
+
"rationale": "container \"subsystems-core/types\" has no framework signal — C4 requires a technology on every container",
|
|
280
|
+
"author": "c4-proposer"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"id": "container:subsystems-react",
|
|
284
|
+
"level": "container",
|
|
285
|
+
"sourceKeys": [
|
|
286
|
+
"subsystems-react"
|
|
287
|
+
],
|
|
288
|
+
"label": "subsystems-react",
|
|
289
|
+
"type": "application",
|
|
290
|
+
"state": "proposed",
|
|
291
|
+
"rationale": "container \"subsystems-react\" has no framework signal — C4 requires a technology on every container 1 store(s) in \"subsystems-react\" declare no storage kind (c98) — decide whether each is a C4 data store or an internal detail",
|
|
292
|
+
"author": "c4-proposer"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"id": "container:subsystems-react/session-ui",
|
|
296
|
+
"level": "container",
|
|
297
|
+
"sourceKeys": [
|
|
298
|
+
"subsystems-react/session-ui"
|
|
299
|
+
],
|
|
300
|
+
"label": "subsystems-react/session-ui",
|
|
301
|
+
"type": "application",
|
|
302
|
+
"state": "proposed",
|
|
303
|
+
"rationale": "process \"subsystems-react/session-ui\" has exactly one member (c211) — a lone function is not a deployable unit container \"subsystems-react/session-ui\" has no framework signal — C4 requires a technology on every container",
|
|
304
|
+
"author": "c4-proposer"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"id": "container:subsystems-studio/host",
|
|
308
|
+
"level": "container",
|
|
309
|
+
"sourceKeys": [
|
|
310
|
+
"subsystems-studio/host"
|
|
311
|
+
],
|
|
312
|
+
"label": "subsystems-studio/host",
|
|
313
|
+
"type": "data-store",
|
|
314
|
+
"technology": "bun",
|
|
315
|
+
"state": "proposed",
|
|
316
|
+
"rationale": "1 store(s) in \"subsystems-studio/host\" declare no storage kind (c127) — decide whether each is a C4 data store or an internal detail",
|
|
317
|
+
"author": "c4-proposer"
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"id": "container:subsystems-studio/renderer",
|
|
321
|
+
"level": "container",
|
|
322
|
+
"sourceKeys": [
|
|
323
|
+
"subsystems-studio/renderer"
|
|
324
|
+
],
|
|
325
|
+
"label": "subsystems-studio/renderer",
|
|
326
|
+
"type": "application",
|
|
327
|
+
"technology": "react",
|
|
328
|
+
"state": "proposed",
|
|
329
|
+
"rationale": "4 store(s) in \"subsystems-studio/renderer\" declare no storage kind (c42, c95, c102, c131) — decide whether each is a C4 data store or an internal detail",
|
|
330
|
+
"author": "c4-proposer"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"id": "container:subsystems-studio/shared",
|
|
334
|
+
"level": "container",
|
|
335
|
+
"sourceKeys": [
|
|
336
|
+
"subsystems-studio/shared"
|
|
337
|
+
],
|
|
338
|
+
"label": "subsystems-studio/shared",
|
|
339
|
+
"type": "library",
|
|
340
|
+
"state": "proposed",
|
|
341
|
+
"rationale": "process \"subsystems-studio/shared\" has 2 member(s) but none execute at runtime (type_alias) — this reads as a library, not a container",
|
|
342
|
+
"author": "c4-proposer"
|
|
343
|
+
}
|
|
344
|
+
];
|