@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
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storybook fixtures for the C4 sketch gallery.
|
|
3
|
+
*
|
|
4
|
+
* The two `OPENBOT_*` / `MAINTENANCE_BRIDGE_*` sketches are the real authored
|
|
5
|
+
* sketches from `~/.principal/c4-sketches`, kept verbatim so the stories
|
|
6
|
+
* exercise the container shapes and edge counts the views actually see.
|
|
7
|
+
*
|
|
8
|
+
* `STUDIO_SKETCH` is this repo's own system drawn at the same level: host,
|
|
9
|
+
* renderer, CLI, site, and the on-disk model store. `CONTAINER_MATRIX_SKETCH`
|
|
10
|
+
* and `DESCRIPTION_BOUNDARY_SKETCH` are deliberate stress rows for the sidebar
|
|
11
|
+
* (kind, state, technology, member count, long labels, 200-char description).
|
|
12
|
+
*/
|
|
13
|
+
import openbot from './c4Sketches/openbot.json';
|
|
14
|
+
import maintenanceBridge from './c4Sketches/maintenance-bridge.json';
|
|
15
|
+
const PURL = 'pkg:github/principal-ai/subsystem-modeling';
|
|
16
|
+
function container(over) {
|
|
17
|
+
return {
|
|
18
|
+
kind: 'container',
|
|
19
|
+
containerKind: 'application',
|
|
20
|
+
technology: '',
|
|
21
|
+
state: 'proposed',
|
|
22
|
+
...over,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function component(over) {
|
|
26
|
+
return {
|
|
27
|
+
kind: 'component',
|
|
28
|
+
technology: '',
|
|
29
|
+
state: 'proposed',
|
|
30
|
+
...over,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function external(over) {
|
|
34
|
+
return { kind: 'external-system', state: 'proposed', ...over };
|
|
35
|
+
}
|
|
36
|
+
function person(over) {
|
|
37
|
+
return { kind: 'person', state: 'proposed', ...over };
|
|
38
|
+
}
|
|
39
|
+
let edgeSeq = 0;
|
|
40
|
+
function edge(source, target, label, over = {}) {
|
|
41
|
+
edgeSeq += 1;
|
|
42
|
+
return {
|
|
43
|
+
id: `e:${edgeSeq}`,
|
|
44
|
+
source,
|
|
45
|
+
target,
|
|
46
|
+
label,
|
|
47
|
+
protocol: label,
|
|
48
|
+
mechanisms: ['calls'],
|
|
49
|
+
count: 1,
|
|
50
|
+
...over,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
/** This repo's system containers, at the C4 container level. */
|
|
54
|
+
export const STUDIO_SKETCH = {
|
|
55
|
+
id: 'c4s-gallery-studio',
|
|
56
|
+
title: 'Subsystem Modeling — system containers',
|
|
57
|
+
repoKeys: [PURL],
|
|
58
|
+
author: 'storybook',
|
|
59
|
+
description: 'The shipped system: Studio host and renderer, the Principal CLI, the web site, and the on-disk model store they share.',
|
|
60
|
+
notes: '## System containers\n\nThis sketch draws the containers this repository actually ships:\n\n- **Studio host** — Bun + Electrobun process that owns the disk store API.\n- **Studio renderer** — React surfaces for the model list and model tabs.\n- **Principal CLI** — the agent-facing author path.\n- **Site — web** — the public gist viewer.\n- **Model store** — JSON files under `~/.principal/subsystem-models`.\n\nEverything is `proposed`: a sketch is a hypothesis, never an accepted element.',
|
|
61
|
+
createdAt: '2026-11-01T00:00:00.000Z',
|
|
62
|
+
updatedAt: '2026-11-01T00:00:00.000Z',
|
|
63
|
+
model: {
|
|
64
|
+
view: 'container',
|
|
65
|
+
system: { id: 'system:subsystem-modeling', label: 'Subsystem Modeling', repoKey: PURL },
|
|
66
|
+
nodes: [
|
|
67
|
+
container({
|
|
68
|
+
id: 'container:studio-host',
|
|
69
|
+
label: 'Studio host',
|
|
70
|
+
technology: 'Bun + Electrobun',
|
|
71
|
+
process: 'subsystems-studio/host',
|
|
72
|
+
description: 'Owns the disk store API: create, update, get, index rows, tab opening.',
|
|
73
|
+
}),
|
|
74
|
+
component({
|
|
75
|
+
id: 'component:host-store',
|
|
76
|
+
label: 'Subsystem model store',
|
|
77
|
+
container: 'container:studio-host',
|
|
78
|
+
technology: 'Bun fs',
|
|
79
|
+
}),
|
|
80
|
+
component({
|
|
81
|
+
id: 'component:host-tabs',
|
|
82
|
+
label: 'Tab opening',
|
|
83
|
+
container: 'container:studio-host',
|
|
84
|
+
technology: 'Bun',
|
|
85
|
+
}),
|
|
86
|
+
container({
|
|
87
|
+
id: 'container:studio-renderer',
|
|
88
|
+
label: 'Studio renderer',
|
|
89
|
+
technology: 'Electrobun + React',
|
|
90
|
+
process: 'subsystems-studio/renderer',
|
|
91
|
+
description: 'Model list and model tab chrome.',
|
|
92
|
+
}),
|
|
93
|
+
component({
|
|
94
|
+
id: 'component:renderer-views',
|
|
95
|
+
label: 'Model views',
|
|
96
|
+
container: 'container:studio-renderer',
|
|
97
|
+
technology: 'React',
|
|
98
|
+
}),
|
|
99
|
+
component({
|
|
100
|
+
id: 'component:renderer-c4',
|
|
101
|
+
label: 'C4 views',
|
|
102
|
+
container: 'container:studio-renderer',
|
|
103
|
+
technology: 'React + React Flow',
|
|
104
|
+
}),
|
|
105
|
+
container({
|
|
106
|
+
id: 'container:principal-cli',
|
|
107
|
+
label: 'Principal CLI',
|
|
108
|
+
technology: 'Bun',
|
|
109
|
+
process: 'principal-studio-cli',
|
|
110
|
+
description: 'Agent-facing author path for subsystem models.',
|
|
111
|
+
}),
|
|
112
|
+
component({
|
|
113
|
+
id: 'component:cli-create',
|
|
114
|
+
label: 'subsystem-model command',
|
|
115
|
+
container: 'container:principal-cli',
|
|
116
|
+
technology: 'Bun',
|
|
117
|
+
}),
|
|
118
|
+
container({
|
|
119
|
+
id: 'container:site-web',
|
|
120
|
+
label: 'Site — web',
|
|
121
|
+
technology: 'React + Vite',
|
|
122
|
+
process: 'site/web',
|
|
123
|
+
description: 'The public gist viewer.',
|
|
124
|
+
}),
|
|
125
|
+
component({
|
|
126
|
+
id: 'component:site-gist',
|
|
127
|
+
label: 'Gist page & loader',
|
|
128
|
+
container: 'container:site-web',
|
|
129
|
+
technology: 'React',
|
|
130
|
+
}),
|
|
131
|
+
container({
|
|
132
|
+
id: 'container:model-store',
|
|
133
|
+
label: 'Model store',
|
|
134
|
+
containerKind: 'data-store',
|
|
135
|
+
technology: 'JSON on disk',
|
|
136
|
+
description: 'Shared on-disk store; not owned by any one process.',
|
|
137
|
+
}),
|
|
138
|
+
external({
|
|
139
|
+
id: 'external:github',
|
|
140
|
+
label: 'GitHub Gists API',
|
|
141
|
+
technology: 'REST',
|
|
142
|
+
members: ['github-gists-api'],
|
|
143
|
+
}),
|
|
144
|
+
person({ id: 'person:maintainer', label: 'Maintainer' }),
|
|
145
|
+
],
|
|
146
|
+
edges: [
|
|
147
|
+
edge('person:maintainer', 'container:studio-renderer', 'uses'),
|
|
148
|
+
edge('container:studio-renderer', 'container:studio-host', 'RPC'),
|
|
149
|
+
edge('container:principal-cli', 'container:studio-host', 'calls'),
|
|
150
|
+
edge('container:studio-host', 'container:model-store', 'writes'),
|
|
151
|
+
edge('container:studio-host', 'external:github', 'HTTPS'),
|
|
152
|
+
edge('container:site-web', 'external:github', 'reads', { mechanisms: ['reads'] }),
|
|
153
|
+
],
|
|
154
|
+
},
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* One row per drawer/row variant: application vs data-store, accepted vs
|
|
158
|
+
* proposed, technology brand vs missing, long labels, and 0 / 1 / 6 members.
|
|
159
|
+
*/
|
|
160
|
+
export const CONTAINER_MATRIX_SKETCH = {
|
|
161
|
+
id: 'c4s-gallery-matrix',
|
|
162
|
+
title: 'Container matrix',
|
|
163
|
+
repoKeys: [PURL],
|
|
164
|
+
author: 'storybook',
|
|
165
|
+
description: 'Every container-row variant in one sketch: application/data-store, accepted/proposed, known/missing technology, long labels, and zero or many members.',
|
|
166
|
+
createdAt: '2026-11-01T00:00:00.000Z',
|
|
167
|
+
updatedAt: '2026-11-01T00:00:00.000Z',
|
|
168
|
+
model: {
|
|
169
|
+
view: 'container',
|
|
170
|
+
system: { id: 'system:matrix', label: 'Container matrix' },
|
|
171
|
+
nodes: [
|
|
172
|
+
container({
|
|
173
|
+
id: 'container:mono',
|
|
174
|
+
label: 'Bun service',
|
|
175
|
+
technology: 'Bun + Hono',
|
|
176
|
+
state: 'accepted',
|
|
177
|
+
description: 'Accepted application with a known technology brand.',
|
|
178
|
+
}),
|
|
179
|
+
component({
|
|
180
|
+
id: 'component:mono-handler',
|
|
181
|
+
label: 'HTTP handler',
|
|
182
|
+
container: 'container:mono',
|
|
183
|
+
technology: 'Hono',
|
|
184
|
+
state: 'accepted',
|
|
185
|
+
}),
|
|
186
|
+
container({
|
|
187
|
+
id: 'container:draft-worker',
|
|
188
|
+
label: 'Draft worker',
|
|
189
|
+
technology: 'Bun',
|
|
190
|
+
description: 'Proposed application — dashed card and a proposed chip in the row.',
|
|
191
|
+
}),
|
|
192
|
+
component({
|
|
193
|
+
id: 'component:worker-sweep',
|
|
194
|
+
label: 'Routine sweep',
|
|
195
|
+
container: 'container:draft-worker',
|
|
196
|
+
technology: 'Bun',
|
|
197
|
+
}),
|
|
198
|
+
component({
|
|
199
|
+
id: 'component:worker-queue',
|
|
200
|
+
label: 'Queue reader',
|
|
201
|
+
container: 'container:draft-worker',
|
|
202
|
+
technology: 'PostgreSQL',
|
|
203
|
+
}),
|
|
204
|
+
container({
|
|
205
|
+
id: 'container:postgres',
|
|
206
|
+
label: 'PostgreSQL + pgvector',
|
|
207
|
+
containerKind: 'data-store',
|
|
208
|
+
technology: 'PostgreSQL 17 + pgvector',
|
|
209
|
+
state: 'accepted',
|
|
210
|
+
description: 'Accepted data store with a long technology string.',
|
|
211
|
+
}),
|
|
212
|
+
component({
|
|
213
|
+
id: 'component:product-schema',
|
|
214
|
+
label: 'Product schema',
|
|
215
|
+
container: 'container:postgres',
|
|
216
|
+
technology: 'Drizzle + SQL',
|
|
217
|
+
state: 'accepted',
|
|
218
|
+
}),
|
|
219
|
+
container({
|
|
220
|
+
id: 'container:cache',
|
|
221
|
+
label: 'Ephemeral cache',
|
|
222
|
+
containerKind: 'data-store',
|
|
223
|
+
technology: '',
|
|
224
|
+
description: 'Data store with no stated technology — the card shows the gap.',
|
|
225
|
+
}),
|
|
226
|
+
container({
|
|
227
|
+
id: 'container:long-label',
|
|
228
|
+
label: 'An intentionally long container label that has to truncate in the sidebar',
|
|
229
|
+
technology: 'React 19 + Vite + TanStack Router + TypeScript',
|
|
230
|
+
state: 'accepted',
|
|
231
|
+
description: 'Long label and long technology; the row ellipsizes both.',
|
|
232
|
+
}),
|
|
233
|
+
component({
|
|
234
|
+
id: 'component:long-label-view',
|
|
235
|
+
label: 'Router view',
|
|
236
|
+
container: 'container:long-label',
|
|
237
|
+
technology: 'React',
|
|
238
|
+
state: 'accepted',
|
|
239
|
+
}),
|
|
240
|
+
container({
|
|
241
|
+
id: 'container:no-members',
|
|
242
|
+
label: 'Empty but accepted',
|
|
243
|
+
technology: 'Rust',
|
|
244
|
+
state: 'accepted',
|
|
245
|
+
description: 'Zero components — member count reads 0.',
|
|
246
|
+
}),
|
|
247
|
+
container({
|
|
248
|
+
id: 'container:many-members',
|
|
249
|
+
label: 'Crowded container',
|
|
250
|
+
technology: 'Bun',
|
|
251
|
+
state: 'accepted',
|
|
252
|
+
description: 'Six components, for the row count and the opened card.',
|
|
253
|
+
}),
|
|
254
|
+
...[
|
|
255
|
+
['orders', 'Orders service', 'Bun'],
|
|
256
|
+
['billing', 'Billing service', 'Bun'],
|
|
257
|
+
['audit', 'Audit trail', 'PostgreSQL'],
|
|
258
|
+
['identity', 'Identity', 'better-auth'],
|
|
259
|
+
['approvals', 'Approvals', 'Bun'],
|
|
260
|
+
['delivery', 'Delivery', 'Hono'],
|
|
261
|
+
].map(([slug, label, technology]) => component({
|
|
262
|
+
id: `component:many-${slug}`,
|
|
263
|
+
label: label,
|
|
264
|
+
container: 'container:many-members',
|
|
265
|
+
technology: technology,
|
|
266
|
+
state: 'accepted',
|
|
267
|
+
})),
|
|
268
|
+
],
|
|
269
|
+
edges: [
|
|
270
|
+
edge('container:mono', 'container:postgres', 'writes'),
|
|
271
|
+
edge('container:draft-worker', 'container:postgres', 'reads', { mechanisms: ['reads'] }),
|
|
272
|
+
edge('container:mono', 'container:cache', 'caches', { mechanisms: ['writes'] }),
|
|
273
|
+
edge('container:long-label', 'container:mono', 'calls'),
|
|
274
|
+
edge('container:many-members', 'container:postgres', 'writes'),
|
|
275
|
+
],
|
|
276
|
+
},
|
|
277
|
+
};
|
|
278
|
+
/** A description at the 200-character boundary plus long Markdown notes. */
|
|
279
|
+
export const DESCRIPTION_BOUNDARY_SKETCH = {
|
|
280
|
+
id: 'c4s-gallery-description',
|
|
281
|
+
title: 'Description boundary',
|
|
282
|
+
repoKeys: [PURL],
|
|
283
|
+
author: 'storybook',
|
|
284
|
+
description: 'A deliberately long description that fills the 200-character budget so the sidebar header can be sized at its limit. It names the host, renderer, store, CLI, and sites without needing extended notes!',
|
|
285
|
+
notes: '## Overview\n\nThe short description stays at the top of the sidebar and the header is sized by it. This extended document is what **Show more** opens.\n\n### What it covers\n\n- A description at the 200-character cap.\n- Markdown notes long enough to need the overlay.\n- A single container so the sidebar row is the only other content.\n\n### Why it matters\n\nThe cap makes the header height predictable; the extended notes keep the detail out of the canvas until someone asks for it.',
|
|
286
|
+
createdAt: '2026-11-01T00:00:00.000Z',
|
|
287
|
+
updatedAt: '2026-11-01T00:00:00.000Z',
|
|
288
|
+
model: {
|
|
289
|
+
view: 'container',
|
|
290
|
+
system: { id: 'system:boundary', label: 'Description boundary' },
|
|
291
|
+
nodes: [
|
|
292
|
+
container({
|
|
293
|
+
id: 'container:only',
|
|
294
|
+
label: 'Single container',
|
|
295
|
+
technology: 'Bun',
|
|
296
|
+
description: 'The one row under a long description.',
|
|
297
|
+
}),
|
|
298
|
+
component({
|
|
299
|
+
id: 'component:only-handler',
|
|
300
|
+
label: 'Handler',
|
|
301
|
+
container: 'container:only',
|
|
302
|
+
technology: 'Hono',
|
|
303
|
+
}),
|
|
304
|
+
],
|
|
305
|
+
edges: [],
|
|
306
|
+
},
|
|
307
|
+
};
|
|
308
|
+
/** The real OpenBot architecture sketch (12 containers, 32 authored edges). */
|
|
309
|
+
export const OPENBOT_SKETCH = openbot;
|
|
310
|
+
/** The real Studio → OpenBot maintenance bridge sketch (6 containers). */
|
|
311
|
+
export const MAINTENANCE_BRIDGE_SKETCH = maintenanceBridge;
|
|
312
|
+
/** Legacy shape: notes only, no short description (tests the fallback preview). */
|
|
313
|
+
export const NOTES_ONLY_SKETCH = {
|
|
314
|
+
...STUDIO_SKETCH,
|
|
315
|
+
id: 'c4s-gallery-notes-only',
|
|
316
|
+
title: 'Notes only — no description',
|
|
317
|
+
description: undefined,
|
|
318
|
+
notes: '## About this sketch\n\nThis sketch has no short description. The sidebar falls back to a clamped preview of these notes, and **Show more** opens the full Markdown in the Overview overlay.\n\n- Use this story to check the legacy shape.\n- Existing sketches with only `notes` keep working.',
|
|
319
|
+
};
|
|
320
|
+
//# sourceMappingURL=c4SketchGallery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"c4SketchGallery.js","sourceRoot":"","sources":["../../../src/subsystem/__fixtures__/c4SketchGallery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAUH,OAAO,OAAO,MAAM,2BAA2B,CAAC;AAChD,OAAO,iBAAiB,MAAM,sCAAsC,CAAC;AAErE,MAAM,IAAI,GAAG,4CAA4C,CAAC;AAE1D,SAAS,SAAS,CAChB,IAA8D;IAE9D,OAAO;QACL,IAAI,EAAE,WAAW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