@eventcatalog/core 3.0.0-beta.22 → 3.0.0-beta.24

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 (31) hide show
  1. package/dist/analytics/analytics.cjs +1 -1
  2. package/dist/analytics/analytics.js +2 -2
  3. package/dist/analytics/log-build.cjs +1 -1
  4. package/dist/analytics/log-build.js +3 -3
  5. package/dist/{chunk-7INEOCHF.js → chunk-4UUGLZEP.js} +1 -1
  6. package/dist/{chunk-FZN27QZ7.js → chunk-6A3FVZJI.js} +1 -1
  7. package/dist/{chunk-BLLOCEIH.js → chunk-7KD4X5PQ.js} +1 -1
  8. package/dist/{chunk-MO2LVZ2H.js → chunk-HQW2RZD2.js} +1 -1
  9. package/dist/{chunk-KNMWRR6J.js → chunk-ZQX7H4YO.js} +1 -1
  10. package/dist/constants.cjs +1 -1
  11. package/dist/constants.js +1 -1
  12. package/dist/eventcatalog.cjs +1 -1
  13. package/dist/eventcatalog.js +5 -5
  14. package/dist/generate.cjs +1 -1
  15. package/dist/generate.js +3 -3
  16. package/dist/utils/cli-logger.cjs +1 -1
  17. package/dist/utils/cli-logger.js +2 -2
  18. package/eventcatalog/src/components/ChatPanel/ChatPanel.tsx +289 -116
  19. package/eventcatalog/src/components/ChatPanel/ChatPanelButton.tsx +3 -3
  20. package/eventcatalog/src/components/SideNav/NestedSideBar/builders/container.ts +10 -1
  21. package/eventcatalog/src/components/SideNav/NestedSideBar/builders/domain.ts +9 -0
  22. package/eventcatalog/src/components/SideNav/NestedSideBar/builders/message.ts +10 -1
  23. package/eventcatalog/src/components/SideNav/NestedSideBar/builders/service.ts +4 -0
  24. package/eventcatalog/src/components/SideNav/NestedSideBar/builders/shared.ts +13 -0
  25. package/eventcatalog/src/enterprise/ai/chat-api.ts +242 -144
  26. package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +123 -121
  27. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +4 -1
  28. package/eventcatalog/src/pages/schemas/explorer/index.astro +2 -2
  29. package/eventcatalog/src/utils/collections/schemas.ts +14 -0
  30. package/eventcatalog/src/utils/node-graphs/services-node-graph.ts +1 -1
  31. package/package.json +4 -3
@@ -225,152 +225,154 @@ const canPageBeEmbedded = isEmbedEnabled();
225
225
  </style>
226
226
  </head>
227
227
  <body>
228
- <Header />
229
- <div class="flex">
230
- <aside class="flex" id="eventcatalog-vertical-nav">
231
- <div
232
- class="fixed flex flex-col items-center w-14 h-screen py-3 bg-white bg-gradient-to-b from-white to-gray-100 border-r border-gray-200 z-20 shadow-md justify-between"
233
- >
234
- <nav class="flex flex-col h-[calc(100vh-70px)] justify-between">
235
- <div class="flex flex-col items-center flex-1 space-y-6">
236
- {
237
- navigationItems.map((item) => {
238
- return (
228
+ <main id="eventcatalog-application" class="relative">
229
+ <Header />
230
+ <div class="flex">
231
+ <aside class="flex" id="eventcatalog-vertical-nav">
232
+ <div
233
+ class="fixed flex flex-col items-center w-14 h-screen py-3 bg-white bg-gradient-to-b from-white to-gray-100 border-r border-gray-200 z-20 shadow-md justify-between"
234
+ >
235
+ <nav class="flex flex-col h-[calc(100vh-70px)] justify-between">
236
+ <div class="flex flex-col items-center flex-1 space-y-6">
237
+ {
238
+ navigationItems.map((item) => {
239
+ return (
240
+ <a
241
+ id={item.id}
242
+ data-role="nav-item"
243
+ href={item.href}
244
+ aria-label={item.label}
245
+ class={`p-1.5 inline-block transition-colors duration-200 rounded-lg ${
246
+ item.current ? 'text-white bg-gray-900' : 'hover:bg-gray-800 hover:text-white text-gray-700'
247
+ }`}
248
+ >
249
+ <div class="has-tooltip">
250
+ <span
251
+ class="tooltip rounded shadow-lg p-1 text-xs bg-gray-900 text-white ml-10 whitespace-nowrap"
252
+ aria-hidden="true"
253
+ >
254
+ {item.label}
255
+ </span>
256
+ <item.icon className="h-6 w-6" aria-hidden="true" />
257
+ </div>
258
+ </a>
259
+ );
260
+ })
261
+ }
262
+
263
+ <hr class="w-8 border-t border-gray-200" />
264
+
265
+ {
266
+ studioNavigationItem.length > 0 && (
267
+ <a
268
+ id={studioNavigationItem[0].id}
269
+ data-role="nav-item"
270
+ href={studioNavigationItem[0].href}
271
+ aria-label={studioNavigationItem[0].label}
272
+ class={`p-1.5 inline-block pt-1 pb-1 mt-0 mb-0 transition-colors duration-200 rounded-lg relative ${studioNavigationItem[0].current ? 'text-white bg-gray-900' : 'hover:bg-gray-800 hover:text-white text-gray-700'}`}
273
+ >
274
+ <div class="has-tooltip">
275
+ <span
276
+ class="tooltip rounded shadow-lg p-1 text-xs bg-gray-900 text-white ml-10 whitespace-nowrap"
277
+ aria-hidden="true"
278
+ >
279
+ {studioNavigationItem[0].label}
280
+ </span>
281
+ <SquareDashedMousePointerIcon className="h-6 w-6" aria-hidden="true" />
282
+ </div>
283
+ </a>
284
+ )
285
+ }
286
+
287
+ {studioNavigationItem.length > 0 && <hr class="w-8 border-t border-gray-200" />}
288
+
289
+ {
290
+ premiumFeatures.map((item) => (
239
291
  <a
240
292
  id={item.id}
241
293
  data-role="nav-item"
242
294
  href={item.href}
243
295
  aria-label={item.label}
244
- class={`p-1.5 inline-block transition-colors duration-200 rounded-lg ${
296
+ class={`p-1.5 inline-block transition-colors duration-200 rounded-lg mb-8 relative ${
245
297
  item.current ? 'text-white bg-gray-900' : 'hover:bg-gray-800 hover:text-white text-gray-700'
246
298
  }`}
247
299
  >
248
300
  <div class="has-tooltip">
249
301
  <span
250
- class="tooltip rounded shadow-lg p-1 text-xs bg-gray-900 text-white ml-10 whitespace-nowrap"
302
+ class="tooltip rounded shadow-lg p-1 text-xs bg-gray-900 text-white ml-10 flex items-center gap-1 whitespace-nowrap"
251
303
  aria-hidden="true"
252
304
  >
253
- {item.label}
305
+ <Sparkles className="h-3 w-3" aria-hidden="true" /> {item.label}
254
306
  </span>
255
307
  <item.icon className="h-6 w-6" aria-hidden="true" />
308
+ <div
309
+ class="absolute -top-1 -right-1 bg-gradient-to-r from-amber-400 to-amber-500 rounded-full p-0.5 shadow-lg"
310
+ aria-hidden="true"
311
+ >
312
+ <Sparkles className="h-2 w-2 text-white" aria-hidden="true" />
313
+ </div>
256
314
  </div>
257
315
  </a>
258
- );
259
- })
260
- }
261
-
262
- <hr class="w-8 border-t border-gray-200" />
316
+ ))
317
+ }
318
+ </div>
263
319
 
264
320
  {
265
- studioNavigationItem.length > 0 && (
266
- <a
267
- id={studioNavigationItem[0].id}
268
- data-role="nav-item"
269
- href={studioNavigationItem[0].href}
270
- aria-label={studioNavigationItem[0].label}
271
- class={`p-1.5 inline-block pt-1 pb-1 mt-0 mb-0 transition-colors duration-200 rounded-lg relative ${studioNavigationItem[0].current ? 'text-white bg-gray-900' : 'hover:bg-gray-800 hover:text-white text-gray-700'}`}
272
- >
273
- <div class="has-tooltip">
274
- <span
275
- class="tooltip rounded shadow-lg p-1 text-xs bg-gray-900 text-white ml-10 whitespace-nowrap"
276
- aria-hidden="true"
277
- >
278
- {studioNavigationItem[0].label}
279
- </span>
280
- <SquareDashedMousePointerIcon className="h-6 w-6" aria-hidden="true" />
281
- </div>
282
- </a>
321
+ isEventCatalogUpgradeEnabled() && (
322
+ <div class="mb-4">
323
+ <a
324
+ id="/pro"
325
+ data-role="nav-item"
326
+ href={buildUrl('/plans')}
327
+ aria-label="Upgrade EventCatalog"
328
+ class={`p-1.5 inline-block transition-colors duration-200 rounded-lg ${currentPath.includes('/pro') ? 'text-white bg-gray-900' : 'bg-gray-200 hover:bg-gray-800 hover:text-white text-gray-700'}`}
329
+ >
330
+ <div class="has-tooltip">
331
+ <span
332
+ class="tooltip rounded shadow-lg p-1 text-xs bg-gray-900 text-white ml-10 whitespace-nowrap"
333
+ aria-hidden="true"
334
+ >
335
+ Upgrade EventCatalog
336
+ </span>
337
+ <Rocket className="h-6 w-6" aria-hidden="true" />
338
+ </div>
339
+ </a>
340
+ </div>
283
341
  )
284
342
  }
343
+ </nav>
344
+ </div>
285
345
 
286
- {studioNavigationItem.length > 0 && <hr class="w-8 border-t border-gray-200" />}
287
-
288
- {
289
- premiumFeatures.map((item) => (
290
- <a
291
- id={item.id}
292
- data-role="nav-item"
293
- href={item.href}
294
- aria-label={item.label}
295
- class={`p-1.5 inline-block transition-colors duration-200 rounded-lg mb-8 relative ${
296
- item.current ? 'text-white bg-gray-900' : 'hover:bg-gray-800 hover:text-white text-gray-700'
297
- }`}
298
- >
299
- <div class="has-tooltip">
300
- <span
301
- class="tooltip rounded shadow-lg p-1 text-xs bg-gray-900 text-white ml-10 flex items-center gap-1 whitespace-nowrap"
302
- aria-hidden="true"
303
- >
304
- <Sparkles className="h-3 w-3" aria-hidden="true" /> {item.label}
305
- </span>
306
- <item.icon className="h-6 w-6" aria-hidden="true" />
307
- <div
308
- class="absolute -top-1 -right-1 bg-gradient-to-r from-amber-400 to-amber-500 rounded-full p-0.5 shadow-lg"
309
- aria-hidden="true"
310
- >
311
- <Sparkles className="h-2 w-2 text-white" aria-hidden="true" />
312
- </div>
313
- </div>
314
- </a>
315
- ))
316
- }
346
+ {
347
+ showNestedSideBar && (
348
+ <SideNav id="sidebar" class={`sidebar-transition h-content bg-white border-r border-gray-100 w-[320px] ml-14`} />
349
+ )
350
+ }
351
+ </aside>
352
+ <main
353
+ class={`sidebar-transition w-full max-h-content overflow-y-auto ${showNestedSideBar ? 'ml-0' : 'ml-14'}`}
354
+ id="content"
355
+ >
356
+ <slot />
357
+ </main>
358
+
359
+ <!-- Create a overlay that tells people to purchase backstage plugin if they want to embed the page -->
360
+ <div class="absolute inset-0 bg-black items-center justify-center z-50 hidden" id="embed-overlay">
361
+ <div class="text-white text-center space-y-4">
362
+ <div>
363
+ <h1 class="text-2xl font-bold">EventCatalog Backstage Integration</h1>
364
+ <p class="text-md text-red-500">Missing license key for backstage integration.</p>
365
+ </div>
366
+ <div>
367
+ <p class="text-sm text-gray-500">Please configure the backstage plugin to embed this page into Backstage.</p>
368
+ <a href="https://www.eventcatalog.dev/integrations/backstage" class="text-blue-500 text-xs"
369
+ >Configure backstage plugin &rarr;</a
370
+ >
317
371
  </div>
318
-
319
- {
320
- isEventCatalogUpgradeEnabled() && (
321
- <div class="mb-4">
322
- <a
323
- id="/pro"
324
- data-role="nav-item"
325
- href={buildUrl('/plans')}
326
- aria-label="Upgrade EventCatalog"
327
- class={`p-1.5 inline-block transition-colors duration-200 rounded-lg ${currentPath.includes('/pro') ? 'text-white bg-gray-900' : 'bg-gray-200 hover:bg-gray-800 hover:text-white text-gray-700'}`}
328
- >
329
- <div class="has-tooltip">
330
- <span
331
- class="tooltip rounded shadow-lg p-1 text-xs bg-gray-900 text-white ml-10 whitespace-nowrap"
332
- aria-hidden="true"
333
- >
334
- Upgrade EventCatalog
335
- </span>
336
- <Rocket className="h-6 w-6" aria-hidden="true" />
337
- </div>
338
- </a>
339
- </div>
340
- )
341
- }
342
- </nav>
343
- </div>
344
-
345
- {
346
- showNestedSideBar && (
347
- <SideNav id="sidebar" class={`sidebar-transition h-content bg-white border-r border-gray-100 w-[320px] ml-14`} />
348
- )
349
- }
350
- </aside>
351
- <main
352
- class={`sidebar-transition w-full max-h-content overflow-y-auto ${showNestedSideBar ? 'ml-0' : 'ml-14'}`}
353
- id="content"
354
- >
355
- <slot />
356
- </main>
357
-
358
- <!-- Create a overlay that tells people to purchase backstage plugin if they want to embed the page -->
359
- <div class="absolute inset-0 bg-black items-center justify-center z-50 hidden" id="embed-overlay">
360
- <div class="text-white text-center space-y-4">
361
- <div>
362
- <h1 class="text-2xl font-bold">EventCatalog Backstage Integration</h1>
363
- <p class="text-md text-red-500">Missing license key for backstage integration.</p>
364
- </div>
365
- <div>
366
- <p class="text-sm text-gray-500">Please configure the backstage plugin to embed this page into Backstage.</p>
367
- <a href="https://www.eventcatalog.dev/integrations/backstage" class="text-blue-500 text-xs"
368
- >Configure backstage plugin &rarr;</a
369
- >
370
372
  </div>
371
373
  </div>
372
374
  </div>
373
- </div>
375
+ </main>
374
376
  </body>
375
377
  </html>
376
378
  <ClientRouter />
@@ -491,7 +491,10 @@ nodeGraphs.push({
491
491
  }
492
492
  </div>
493
493
  </div>
494
- <aside class="hidden xl:block sticky top-0 pb-10 w-[280px] overflow-y-auto py-2 flex-shrink-0 pr-10">
494
+ <aside
495
+ id="eventcatalog-docs-sidebar"
496
+ class="hidden xl:block sticky top-0 pb-10 w-[280px] overflow-y-auto py-2 flex-shrink-0 pr-10"
497
+ >
495
498
  <div class="mt-4 space-y-8">
496
499
  {
497
500
  headings.length > 0 && (
@@ -13,9 +13,9 @@ const apiAccessEnabled = isEventCatalogScaleEnabled();
13
13
  ---
14
14
 
15
15
  <VerticalSideBarLayout title="Schema Explorer - EventCatalog" showNestedSideBar={false}>
16
- <main class="flex sm:px-8 docs-layout h-[calc(100vh-var(--header-height,0px)-64px)]">
16
+ <main class="flex sm:pl-8 pr-4 docs-layout h-[calc(100vh-var(--header-height,0px)-64px)]">
17
17
  <div class="flex docs-layout w-full h-full">
18
- <div class="w-full lg:mr-2 pr-8 py-6 flex flex-col h-full">
18
+ <div class="w-full lg:mr-2 py-6 flex flex-col h-full">
19
19
  <div class="w-full !max-w-none h-full flex flex-col overflow-hidden">
20
20
  <SchemaExplorer client:load schemas={schemas as any} apiAccessEnabled={apiAccessEnabled} />
21
21
  </div>
@@ -54,6 +54,9 @@ export const getSchemasFromResource = (resource: CollectionEntry<PageTypes>): Sc
54
54
  const openapiPath = Array.isArray(specifications)
55
55
  ? specifications.find((spec) => spec.type === 'openapi')?.path
56
56
  : specifications?.openapiPath;
57
+ const graphqlPath = Array.isArray(specifications)
58
+ ? specifications.find((spec) => spec.type === 'graphql')?.path
59
+ : specifications?.graphqlPath;
57
60
  // @ts-ignore
58
61
  let publicPath = resource?.catalog?.publicPath;
59
62
  const schemas = [];
@@ -80,6 +83,17 @@ export const getSchemasFromResource = (resource: CollectionEntry<PageTypes>): Sc
80
83
  }
81
84
  }
82
85
 
86
+ if (graphqlPath) {
87
+ if (!publicPath) {
88
+ // We try and get the absoulate file path from the resource
89
+ const absoluteFilePath = getAbsoluteFilePathForAstroFile(resource.filePath ?? '', graphqlPath ?? '');
90
+ schemas.push({ url: buildUrl(absoluteFilePath), format: 'graphql' });
91
+ } else {
92
+ // The resource has the public path, so we can use it to build the URL
93
+ schemas.push({ url: buildUrl(path.join(publicPath, graphqlPath)), format: 'graphql' });
94
+ }
95
+ }
96
+
83
97
  return schemas;
84
98
  } else {
85
99
  const pathParts = schemaPublicPath.split('.');
@@ -292,7 +292,7 @@ export const getNodesAndEdges = async ({
292
292
  const uniqueEdges = edges.reduce((acc: any[], edge: any) => {
293
293
  const existingEdge = acc.find((e: any) => e.id === edge.id);
294
294
  if (existingEdge) {
295
- existingEdge.label = `${existingEdge.label} & ${edge.label}`;
295
+ // existingEdge.label = `${existingEdge.label} & ${edge.label}`;
296
296
  // Add the custom colors to the existing edge which can be an array of strings
297
297
  const value = Array.isArray(edge.data.customColor) ? edge.data.customColor : [edge.data.customColor];
298
298
  const existingValue = Array.isArray(existingEdge.data.customColor)
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "https://github.com/event-catalog/eventcatalog.git"
7
7
  },
8
8
  "type": "module",
9
- "version": "3.0.0-beta.22",
9
+ "version": "3.0.0-beta.24",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },
@@ -34,7 +34,7 @@
34
34
  "@eventcatalog/generator-ai": "^1.1.0",
35
35
  "@eventcatalog/license": "^0.0.7",
36
36
  "@eventcatalog/linter": "^0.0.2",
37
- "@eventcatalog/sdk": "^2.9.2",
37
+ "@eventcatalog/sdk": "^2.9.9",
38
38
  "@eventcatalog/visualizer": "^0.0.6",
39
39
  "@fontsource/inter": "^5.2.5",
40
40
  "@headlessui/react": "^2.0.3",
@@ -46,6 +46,7 @@
46
46
  "@radix-ui/react-context-menu": "^2.2.6",
47
47
  "@radix-ui/react-dialog": "^1.1.6",
48
48
  "@radix-ui/react-dropdown-menu": "^2.1.12",
49
+ "@radix-ui/react-popover": "^1.1.15",
49
50
  "@radix-ui/react-tooltip": "^1.1.8",
50
51
  "@scalar/api-reference-react": "^0.4.37",
51
52
  "@tailwindcss/typography": "^0.5.13",
@@ -53,7 +54,7 @@
53
54
  "@tanstack/react-table": "^8.17.3",
54
55
  "@xyflow/react": "^12.3.6",
55
56
  "ai": "^5.0.60",
56
- "astro": "^5.16.5",
57
+ "astro": "^5.16.6",
57
58
  "astro-compress": "^2.3.8",
58
59
  "astro-expressive-code": "^0.41.3",
59
60
  "astro-seo": "^0.8.4",