@eventcatalog/core 5.0.0-beta.6 → 5.0.0-beta.8
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/analytics/analytics.cjs +1 -1
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/log-build.cjs +3 -1
- package/dist/analytics/log-build.js +4 -4
- package/dist/{chunk-XMPFHLK4.js → chunk-4W55ZOOS.js} +2 -2
- package/dist/{chunk-PIYJM642.js → chunk-AWOO63ME.js} +70 -44
- package/dist/{chunk-QBP3BBSV.js → chunk-C6T2AAFR.js} +1 -1
- package/dist/{chunk-MDWB5HLO.js → chunk-ENAG6UH7.js} +5 -0
- package/dist/{chunk-56CD2NH6.js → chunk-PU25TOOJ.js} +1 -1
- package/dist/{chunk-L2IRFOE7.js → chunk-RDIZJ7UT.js} +1 -1
- package/dist/{chunk-DE3QHVJP.js → chunk-T4G3VVZ4.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +138 -90
- package/dist/eventcatalog.config.d.cts +47 -0
- package/dist/eventcatalog.config.d.ts +47 -0
- package/dist/eventcatalog.js +30 -11
- package/dist/features.cjs +8 -2
- package/dist/features.d.cts +3 -1
- package/dist/features.d.ts +3 -1
- package/dist/features.js +5 -3
- package/dist/generate.cjs +1 -1
- package/dist/generate.js +3 -3
- package/dist/utils/cli-logger.cjs +1 -1
- package/dist/utils/cli-logger.js +2 -2
- package/dist/utils/license-status.cjs +70 -44
- package/dist/utils/license-status.d.cts +14 -5
- package/dist/utils/license-status.d.ts +14 -5
- package/dist/utils/license-status.js +1 -1
- package/eventcatalog/integrations/studio-server.mjs +15 -3
- package/eventcatalog/src/components/Header.astro +3 -3
- package/eventcatalog/src/features/integrations/eventcatalog-features.ts +10 -2
- package/eventcatalog/src/features/mcp/apps/canvas/shared.ts +9 -1
- package/eventcatalog/src/features/mcp/apps/canvas/view.tsx +9 -2
- package/eventcatalog/src/features/mcp/apps/generated/canvas.html +70 -69
- package/eventcatalog/src/features/mcp/apps/generated/viewer.html +69 -69
- package/eventcatalog/src/features/mcp/mcp-server.ts +5 -3
- package/eventcatalog/src/features/studio/agent-choreography.ts +8 -5
- package/eventcatalog/src/features/studio/canvas-actions.ts +148 -21
- package/eventcatalog/src/features/studio/canvas-doc.ts +138 -9
- package/eventcatalog/src/features/studio/canvas-preview.ts +53 -0
- package/eventcatalog/src/features/studio/catalog-resources.ts +5 -2
- package/eventcatalog/src/features/studio/clipboard.ts +97 -0
- package/eventcatalog/src/features/studio/components/CanvasControls.tsx +4 -3
- package/eventcatalog/src/features/studio/components/CanvasHeader.tsx +39 -22
- package/eventcatalog/src/features/studio/components/CanvasStatusMenu.tsx +117 -0
- package/eventcatalog/src/features/studio/components/Comments.tsx +345 -30
- package/eventcatalog/src/features/studio/components/ConnectAgentDialog.tsx +140 -76
- package/eventcatalog/src/features/studio/components/ConnectionsChooser.tsx +144 -0
- package/eventcatalog/src/features/studio/components/ContainerChooser.tsx +1 -1
- package/eventcatalog/src/features/studio/components/DragGhost.tsx +115 -0
- package/eventcatalog/src/features/studio/components/JoinForm.tsx +0 -24
- package/eventcatalog/src/features/studio/components/LeftPanel.tsx +131 -35
- package/eventcatalog/src/features/studio/components/Picture.tsx +21 -0
- package/eventcatalog/src/features/studio/components/Presence.tsx +2 -0
- package/eventcatalog/src/features/studio/components/PropertiesPanel.tsx +187 -50
- package/eventcatalog/src/features/studio/components/ShareDialog.tsx +260 -0
- package/eventcatalog/src/features/studio/components/StudioDesigner.tsx +442 -40
- package/eventcatalog/src/features/studio/components/canvas-nodes.tsx +198 -22
- package/eventcatalog/src/features/studio/components/icons.ts +6 -1
- package/eventcatalog/src/features/studio/components/status.ts +30 -1
- package/eventcatalog/src/features/studio/edges.ts +2 -0
- package/eventcatalog/src/features/studio/grouping.ts +95 -2
- package/eventcatalog/src/features/studio/hooks/presence-store.ts +5 -1
- package/eventcatalog/src/features/studio/hooks/use-canvas-webmcp.ts +13 -3
- package/eventcatalog/src/features/studio/hooks/use-comments.ts +8 -1
- package/eventcatalog/src/features/studio/hooks/use-follow-camera.ts +7 -2
- package/eventcatalog/src/features/studio/hooks/use-studio-flow.ts +174 -27
- package/eventcatalog/src/features/studio/identity.ts +35 -0
- package/eventcatalog/src/features/studio/layout.ts +7 -4
- package/eventcatalog/src/features/studio/levels.ts +138 -72
- package/eventcatalog/src/features/studio/node-types.ts +35 -3
- package/eventcatalog/src/features/studio/pages/[id].astro +7 -2
- package/eventcatalog/src/features/studio/pages/index.astro +555 -2
- package/eventcatalog/src/features/studio/pages/new.astro +24 -0
- package/eventcatalog/src/features/studio/pages/wake.ts +15 -0
- package/eventcatalog/src/features/studio/server/canvas-mcp.ts +48 -13
- package/eventcatalog/src/features/studio/server/runtime.ts +193 -14
- package/eventcatalog/src/features/studio/server/sign-in.ts +18 -0
- package/eventcatalog/src/features/studio/server/storage.ts +110 -0
- package/eventcatalog/src/features/studio/studio.css +184 -0
- package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +1 -1
- package/eventcatalog/src/utils/feature.ts +7 -3
- package/eventcatalog/src/utils/node-graphs/export-mermaid.ts +0 -2
- package/package.json +4 -4
|
@@ -35,6 +35,27 @@
|
|
|
35
35
|
stroke-width: 2px !important;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
/*
|
|
39
|
+
* A connection being dragged (a new one, or an end moved to another node): once it's on a node it can connect
|
|
40
|
+
* to, it turns the hover colour, so you know letting go will connect it
|
|
41
|
+
*/
|
|
42
|
+
.studio-canvas .react-flow__connection-path {
|
|
43
|
+
stroke-width: 2px;
|
|
44
|
+
transition: stroke 100ms ease;
|
|
45
|
+
}
|
|
46
|
+
/* Like a hovered edge in the visualiser: glowing, with the dashes flowing (ec-edge-dash, from its styles) */
|
|
47
|
+
.studio-canvas .react-flow__connection.valid .react-flow__connection-path {
|
|
48
|
+
stroke: #2563eb;
|
|
49
|
+
stroke-width: 4px;
|
|
50
|
+
filter: drop-shadow(0 0 8px #2563eb);
|
|
51
|
+
stroke-dasharray: 5 5;
|
|
52
|
+
animation: ec-edge-dash 0.5s linear infinite;
|
|
53
|
+
}
|
|
54
|
+
[data-theme='dark'] .studio-canvas .react-flow__connection.valid .react-flow__connection-path {
|
|
55
|
+
stroke: #00d9ff;
|
|
56
|
+
filter: drop-shadow(0 0 8px #00d9ff);
|
|
57
|
+
}
|
|
58
|
+
|
|
38
59
|
/* Comment mode (C): click anywhere to drop a comment */
|
|
39
60
|
.studio-canvas.comment-mode .react-flow__pane,
|
|
40
61
|
.studio-canvas.comment-mode .react-flow__node {
|
|
@@ -55,6 +76,14 @@
|
|
|
55
76
|
transition: none;
|
|
56
77
|
}
|
|
57
78
|
|
|
79
|
+
/* Containers grow smoothly when they're fitted to what's in them, or someone else resizes them */
|
|
80
|
+
.studio-canvas.is-container-resize :is(.react-flow__node-domain-group, .react-flow__node-system-group) {
|
|
81
|
+
transition:
|
|
82
|
+
width 300ms ease,
|
|
83
|
+
height 300ms ease,
|
|
84
|
+
transform 300ms ease;
|
|
85
|
+
}
|
|
86
|
+
|
|
58
87
|
/* Nodes pop in when they're added (by anyone, people or agents) */
|
|
59
88
|
@keyframes studio-node-in {
|
|
60
89
|
from {
|
|
@@ -87,3 +116,158 @@
|
|
|
87
116
|
.studio-canvas .react-flow__node-system-group :is(.ec-group-grip, .react-flow__resize-control) {
|
|
88
117
|
pointer-events: auto;
|
|
89
118
|
}
|
|
119
|
+
|
|
120
|
+
/*
|
|
121
|
+
* Selected nodes get an accent outline and glow around them, and hovered ones a faint outline (like Figma and
|
|
122
|
+
* Miro). Drawn by the node's wrapper, so it fits every kind of node. Containers draw their own.
|
|
123
|
+
*/
|
|
124
|
+
.studio-canvas .react-flow__node:not(.react-flow__node-domain-group, .react-flow__node-system-group)::after {
|
|
125
|
+
content: '';
|
|
126
|
+
position: absolute;
|
|
127
|
+
inset: -6px;
|
|
128
|
+
border-radius: 12px;
|
|
129
|
+
border: 2px solid transparent;
|
|
130
|
+
pointer-events: none;
|
|
131
|
+
transition:
|
|
132
|
+
border-color 120ms ease,
|
|
133
|
+
box-shadow 120ms ease;
|
|
134
|
+
}
|
|
135
|
+
.studio-canvas .react-flow__node:not(.react-flow__node-domain-group, .react-flow__node-system-group):hover::after {
|
|
136
|
+
border-color: rgb(var(--ec-accent) / 0.35);
|
|
137
|
+
}
|
|
138
|
+
.studio-canvas .react-flow__node.selected:not(.react-flow__node-domain-group, .react-flow__node-system-group)::after {
|
|
139
|
+
border-color: rgb(var(--ec-accent));
|
|
140
|
+
box-shadow: 0 0 0 4px rgb(var(--ec-accent) / 0.15);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* A selected or hovered connection shows the ends you can drag to another node */
|
|
144
|
+
.studio-canvas .react-flow__edge .react-flow__edgeupdater {
|
|
145
|
+
cursor: grab;
|
|
146
|
+
}
|
|
147
|
+
.studio-canvas .react-flow__edge:is(.selected, :hover) .react-flow__edgeupdater {
|
|
148
|
+
fill: rgb(var(--ec-accent) / 0.2);
|
|
149
|
+
stroke: rgb(var(--ec-accent));
|
|
150
|
+
stroke-width: 1.5;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* A selected container */
|
|
154
|
+
.studio-canvas .ec-group-selected {
|
|
155
|
+
position: absolute;
|
|
156
|
+
inset: 0;
|
|
157
|
+
border-radius: 14px;
|
|
158
|
+
box-shadow: 0 0 0 2px rgb(var(--ec-accent) / 0.7);
|
|
159
|
+
pointer-events: none;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/* A container something's dragged over: it goes in it when it's dropped (in the theme's button colours, which stay
|
|
163
|
+
strong in light and dark themes) */
|
|
164
|
+
.studio-canvas .ec-drop-target {
|
|
165
|
+
position: absolute;
|
|
166
|
+
inset: -5px;
|
|
167
|
+
border-radius: 17px;
|
|
168
|
+
border: 3px solid rgb(var(--ec-button-bg));
|
|
169
|
+
background: rgb(var(--ec-button-bg) / 0.1);
|
|
170
|
+
box-shadow: 0 0 0 6px rgb(var(--ec-button-bg) / 0.2);
|
|
171
|
+
pointer-events: none;
|
|
172
|
+
animation: ec-drop-target-in 150ms ease-out;
|
|
173
|
+
}
|
|
174
|
+
.studio-canvas .ec-drop-target-label {
|
|
175
|
+
position: absolute;
|
|
176
|
+
top: -16px;
|
|
177
|
+
left: 50%;
|
|
178
|
+
translate: -50% 0;
|
|
179
|
+
white-space: nowrap;
|
|
180
|
+
border-radius: 9999px;
|
|
181
|
+
padding: 4px 12px;
|
|
182
|
+
font-size: 12px;
|
|
183
|
+
font-weight: 600;
|
|
184
|
+
color: rgb(var(--ec-button-text));
|
|
185
|
+
background: rgb(var(--ec-button-bg));
|
|
186
|
+
box-shadow: 0 2px 8px rgb(0 0 0 / 0.25);
|
|
187
|
+
}
|
|
188
|
+
@keyframes ec-drop-target-in {
|
|
189
|
+
from {
|
|
190
|
+
opacity: 0;
|
|
191
|
+
scale: 0.98;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/*
|
|
196
|
+
* What's dragged from the left panel (DragGhost): just the node, on nothing. The visualiser's class gives it the page
|
|
197
|
+
* background, and its handles are hidden on the canvas only.
|
|
198
|
+
*/
|
|
199
|
+
.studio-drag-preview,
|
|
200
|
+
.studio-drag-preview .react-flow,
|
|
201
|
+
.studio-drag-preview .react-flow__renderer,
|
|
202
|
+
.studio-drag-preview .react-flow__pane {
|
|
203
|
+
background: transparent !important;
|
|
204
|
+
}
|
|
205
|
+
.studio-drag-preview .react-flow__handle {
|
|
206
|
+
display: none !important;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/* Text written on the canvas: no card around it, in the page's text colour */
|
|
210
|
+
.studio-canvas .studio-text,
|
|
211
|
+
.studio-drag-preview .studio-text {
|
|
212
|
+
min-width: 80px;
|
|
213
|
+
padding: 2px 4px;
|
|
214
|
+
}
|
|
215
|
+
.studio-text .studio-text-body {
|
|
216
|
+
margin: 0;
|
|
217
|
+
font-size: 16px;
|
|
218
|
+
line-height: 1.4;
|
|
219
|
+
color: rgb(var(--ec-page-text));
|
|
220
|
+
white-space: pre-wrap;
|
|
221
|
+
overflow-wrap: anywhere;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.studio-canvas .studio-width-handle {
|
|
225
|
+
border-color: rgb(var(--ec-accent)) !important;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/* A sticky note: about square like a post-it, taller if more is written on it (dark text: the paper is light in
|
|
229
|
+
every theme) */
|
|
230
|
+
.studio-note {
|
|
231
|
+
position: relative;
|
|
232
|
+
min-height: 176px;
|
|
233
|
+
height: 100%;
|
|
234
|
+
padding: 12px 14px;
|
|
235
|
+
border: 1px solid;
|
|
236
|
+
border-radius: 6px;
|
|
237
|
+
box-shadow:
|
|
238
|
+
0 1px 2px rgb(0 0 0 / 0.06),
|
|
239
|
+
0 6px 16px -6px rgb(0 0 0 / 0.18);
|
|
240
|
+
color: #1f2937;
|
|
241
|
+
}
|
|
242
|
+
.studio-note .studio-note-body {
|
|
243
|
+
margin: 0;
|
|
244
|
+
font-size: 13px;
|
|
245
|
+
line-height: 1.45;
|
|
246
|
+
color: inherit;
|
|
247
|
+
white-space: pre-wrap;
|
|
248
|
+
overflow-wrap: anywhere;
|
|
249
|
+
}
|
|
250
|
+
.studio-note .studio-note-body::placeholder {
|
|
251
|
+
color: inherit;
|
|
252
|
+
opacity: 0.5;
|
|
253
|
+
}
|
|
254
|
+
/* Its colours, above it while it's selected */
|
|
255
|
+
.studio-note .studio-note-colors {
|
|
256
|
+
position: absolute;
|
|
257
|
+
bottom: calc(100% + 8px);
|
|
258
|
+
left: 0;
|
|
259
|
+
display: flex;
|
|
260
|
+
gap: 4px;
|
|
261
|
+
padding: 4px;
|
|
262
|
+
border-radius: 9999px;
|
|
263
|
+
border: 1px solid rgb(var(--ec-page-border));
|
|
264
|
+
background: rgb(var(--ec-card-bg));
|
|
265
|
+
box-shadow: 0 2px 8px rgb(0 0 0 / 0.15);
|
|
266
|
+
}
|
|
267
|
+
.studio-note .studio-note-color {
|
|
268
|
+
width: 16px;
|
|
269
|
+
height: 16px;
|
|
270
|
+
border-radius: 9999px;
|
|
271
|
+
border: 2px solid;
|
|
272
|
+
cursor: pointer;
|
|
273
|
+
}
|
|
@@ -241,7 +241,7 @@ const builtinNavigationItems: Record<string, Omit<VerticalNavigationItem, 'curre
|
|
|
241
241
|
'/studio': {
|
|
242
242
|
id: '/studio',
|
|
243
243
|
matchId: '/studio',
|
|
244
|
-
label: '
|
|
244
|
+
label: 'Studio',
|
|
245
245
|
icon: 'SquareDashedMousePointer',
|
|
246
246
|
href: buildUrl('/studio'),
|
|
247
247
|
},
|
|
@@ -28,7 +28,11 @@ export const isAuthEnabled = () =>
|
|
|
28
28
|
|
|
29
29
|
export const isEventCatalogMCPEnabled = () => isSSR() && (config?.mcp?.enabled ?? true);
|
|
30
30
|
|
|
31
|
-
// Collaborative canvases (EventCatalog Studio, /studio) are an experiment:
|
|
32
|
-
//
|
|
33
|
-
|
|
31
|
+
// Collaborative canvases (EventCatalog Studio, /studio) are an experiment: on the dev server (unless studio.enabled is
|
|
32
|
+
// false), and in production (server output) when studio.enabled is set. With sign-in on, only signed-in people can
|
|
33
|
+
// open them.
|
|
34
|
+
export const isCanvasEnabled = () => {
|
|
35
|
+
const enabled = config?.studio?.enabled;
|
|
36
|
+
return enabled !== false && (isDevMode() || (isSSR() && enabled === true));
|
|
37
|
+
};
|
|
34
38
|
export const isEventCatalogMCPAuthEnabled = () => isEventCatalogMCPEnabled() && (config?.mcp?.auth?.enabled ?? false);
|
|
@@ -38,7 +38,6 @@ const NODE_SHAPE_MAP: Record<string, [string, string]> = {
|
|
|
38
38
|
'context-actor': ['((', '))'], // circle
|
|
39
39
|
flows: ['([', '])'], // stadium (rounded)
|
|
40
40
|
flow: ['([', '])'],
|
|
41
|
-
systems: ['[[', ']]'],
|
|
42
41
|
system: ['[[', ']]'],
|
|
43
42
|
step: ['[', ']'], // rectangle
|
|
44
43
|
user: ['((', '))'], // circle
|
|
@@ -79,7 +78,6 @@ const NODE_STYLE_CLASSES: Record<string, string> = {
|
|
|
79
78
|
domains: 'fill:#eab308,stroke:#a16207,color:#000',
|
|
80
79
|
domain: 'fill:#eab308,stroke:#a16207,color:#000',
|
|
81
80
|
'context-domain': 'fill:#eab308,stroke:#a16207,color:#000',
|
|
82
|
-
systems: 'fill:#7c3aed,stroke:#5b21b6,color:#fff',
|
|
83
81
|
'context-actor': 'fill:#8b5cf6,stroke:#6d28d9,color:#fff',
|
|
84
82
|
flows: 'fill:#14b8a6,stroke:#0f766e,color:#fff',
|
|
85
83
|
flow: 'fill:#14b8a6,stroke:#0f766e,color:#fff',
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"license": "BUSL-1.1",
|
|
9
9
|
"type": "module",
|
|
10
|
-
"version": "5.0.0-beta.
|
|
10
|
+
"version": "5.0.0-beta.8",
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
@@ -140,9 +140,9 @@
|
|
|
140
140
|
"y-protocols": "^1.0.7",
|
|
141
141
|
"yjs": "^13.6.33",
|
|
142
142
|
"zod": "^4.3.6",
|
|
143
|
-
"@eventcatalog/
|
|
144
|
-
"@eventcatalog/visualiser": "^5.0.0-beta.
|
|
145
|
-
"@eventcatalog/
|
|
143
|
+
"@eventcatalog/sdk": "2.30.0-beta.1",
|
|
144
|
+
"@eventcatalog/visualiser": "^5.0.0-beta.4",
|
|
145
|
+
"@eventcatalog/linter": "1.2.0-beta.2"
|
|
146
146
|
},
|
|
147
147
|
"devDependencies": {
|
|
148
148
|
"@astrojs/check": "^0.9.10",
|