@eventcatalog/core 4.10.5 → 4.10.7

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 (38) 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-U52FCZQ6.js → chunk-EG62NTWS.js} +7 -7
  6. package/dist/{chunk-RX2XDKHZ.js → chunk-RJYRPQOA.js} +1 -1
  7. package/dist/{chunk-JE6ZSCPU.js → chunk-TFALFJEC.js} +1 -1
  8. package/dist/{chunk-7PXZNQPR.js → chunk-YBRQCBWG.js} +1 -1
  9. package/dist/{chunk-NWWGCVSE.js → chunk-YJVD7UW3.js} +1 -1
  10. package/dist/{chunk-GLEQKW6W.js → chunk-Z7YK3QA3.js} +1 -1
  11. package/dist/constants.cjs +1 -1
  12. package/dist/constants.js +1 -1
  13. package/dist/eventcatalog.cjs +1 -1
  14. package/dist/eventcatalog.js +10 -10
  15. package/dist/federation/federate.js +5 -5
  16. package/dist/federation/source-provider.js +2 -2
  17. package/dist/generate.cjs +1 -1
  18. package/dist/generate.js +3 -3
  19. package/dist/utils/cli-logger.cjs +1 -1
  20. package/dist/utils/cli-logger.js +2 -2
  21. package/eventcatalog/src/components/MDX/MermaidFileLoader/MermaidFileLoader.astro +10 -3
  22. package/eventcatalog/src/components/SchemaExplorer/SchemaExplorer.tsx +2 -0
  23. package/eventcatalog/src/components/Tables/Discover/DiscoverTable.tsx +2 -0
  24. package/eventcatalog/src/layouts/BaseLayout.astro +10 -2
  25. package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +15 -0
  26. package/eventcatalog/src/pages/diagrams/[id]/[version]/embed.astro +665 -325
  27. package/eventcatalog/src/pages/discover/[type]/index.astro +10 -0
  28. package/eventcatalog/src/pages/schemas/[type]/[id]/[version]/index.astro +6 -0
  29. package/eventcatalog/src/pages/schemas/explorer/index.astro +10 -0
  30. package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/index.astro +11 -13
  31. package/eventcatalog/src/pages/visualiser/graph/index.astro +18 -2
  32. package/eventcatalog/src/pages/visualiser/system-context-map/index.astro +11 -13
  33. package/eventcatalog/src/pages/visualiser/systems/[id]/[version]/context/index.astro +11 -13
  34. package/eventcatalog/src/remark-plugins/mermaid.ts +48 -1
  35. package/eventcatalog/src/stores/theme-store.ts +18 -0
  36. package/eventcatalog/src/utils/mermaid-zoom.ts +781 -404
  37. package/package.json +5 -6
  38. package/dist/{chunk-6K7XZAYI.js → chunk-A2RZR3U4.js} +3 -3
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(analytics_exports);
36
36
  var import_os = __toESM(require("os"), 1);
37
37
 
38
38
  // package.json
39
- var version = "4.10.5";
39
+ var version = "4.10.7";
40
40
 
41
41
  // src/constants.ts
42
42
  var VERSION = version;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "../chunk-GLEQKW6W.js";
4
- import "../chunk-RX2XDKHZ.js";
3
+ } from "../chunk-Z7YK3QA3.js";
4
+ import "../chunk-RJYRPQOA.js";
5
5
  export {
6
6
  raiseEvent
7
7
  };
@@ -140,7 +140,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
140
140
  var import_os = __toESM(require("os"), 1);
141
141
 
142
142
  // package.json
143
- var version = "4.10.5";
143
+ var version = "4.10.7";
144
144
 
145
145
  // src/constants.ts
146
146
  var VERSION = version;
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  log_build_default
3
- } from "../chunk-NWWGCVSE.js";
4
- import "../chunk-GLEQKW6W.js";
3
+ } from "../chunk-YJVD7UW3.js";
4
+ import "../chunk-Z7YK3QA3.js";
5
5
  import "../chunk-ZAZHAVKB.js";
6
- import "../chunk-RX2XDKHZ.js";
6
+ import "../chunk-RJYRPQOA.js";
7
7
  import "../chunk-6QENHZZP.js";
8
8
  export {
9
9
  log_build_default as default
@@ -1,12 +1,6 @@
1
- import {
2
- withFederationOutputTransaction
3
- } from "./chunk-WRNH5C3U.js";
4
- import {
5
- composePublicAssets
6
- } from "./chunk-5EPNFDT5.js";
7
1
  import {
8
2
  createFederationSourceProvider
9
- } from "./chunk-6K7XZAYI.js";
3
+ } from "./chunk-A2RZR3U4.js";
10
4
  import {
11
5
  createFederationContentCache
12
6
  } from "./chunk-R7Z5ALYI.js";
@@ -17,6 +11,12 @@ import {
17
11
  import {
18
12
  isFederationEnabled
19
13
  } from "./chunk-FV56YFM4.js";
14
+ import {
15
+ withFederationOutputTransaction
16
+ } from "./chunk-WRNH5C3U.js";
17
+ import {
18
+ composePublicAssets
19
+ } from "./chunk-5EPNFDT5.js";
20
20
  import {
21
21
  getEventCatalogConfigFile
22
22
  } from "./chunk-6QENHZZP.js";
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "4.10.5";
2
+ var version = "4.10.7";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  logger
3
- } from "./chunk-7PXZNQPR.js";
3
+ } from "./chunk-YBRQCBWG.js";
4
4
  import {
5
5
  cleanup,
6
6
  getEventCatalogConfigFile
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-RX2XDKHZ.js";
3
+ } from "./chunk-RJYRPQOA.js";
4
4
 
5
5
  // src/utils/cli-logger.ts
6
6
  import pc from "picocolors";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "./chunk-GLEQKW6W.js";
3
+ } from "./chunk-Z7YK3QA3.js";
4
4
  import {
5
5
  countResources,
6
6
  hashCatalogContent,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-RX2XDKHZ.js";
3
+ } from "./chunk-RJYRPQOA.js";
4
4
 
5
5
  // src/analytics/analytics.js
6
6
  import os from "os";
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "4.10.5";
28
+ var version = "4.10.7";
29
29
 
30
30
  // src/constants.ts
31
31
  var VERSION = version;
package/dist/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-RX2XDKHZ.js";
3
+ } from "./chunk-RJYRPQOA.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -144,7 +144,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
144
144
  var import_picocolors = __toESM(require("picocolors"), 1);
145
145
 
146
146
  // package.json
147
- var version = "4.10.5";
147
+ var version = "4.10.7";
148
148
 
149
149
  // src/constants.ts
150
150
  var VERSION = version;
@@ -4,18 +4,15 @@ import {
4
4
  import "./chunk-CA4U2JP7.js";
5
5
  import {
6
6
  log_build_default
7
- } from "./chunk-NWWGCVSE.js";
8
- import "./chunk-GLEQKW6W.js";
7
+ } from "./chunk-YJVD7UW3.js";
8
+ import "./chunk-Z7YK3QA3.js";
9
9
  import "./chunk-ZAZHAVKB.js";
10
10
  import {
11
11
  FederationConflictError,
12
12
  FederationDiagnosticError,
13
13
  federateCatalog
14
- } from "./chunk-U52FCZQ6.js";
15
- import "./chunk-WRNH5C3U.js";
16
- import "./chunk-5EPNFDT5.js";
17
- import "./chunk-6K7XZAYI.js";
18
- import "./chunk-352FGP6W.js";
14
+ } from "./chunk-EG62NTWS.js";
15
+ import "./chunk-A2RZR3U4.js";
19
16
  import "./chunk-R7Z5ALYI.js";
20
17
  import {
21
18
  getFederationDiagnosticCounts,
@@ -23,6 +20,9 @@ import {
23
20
  } from "./chunk-JJPB6EOZ.js";
24
21
  import "./chunk-FV56YFM4.js";
25
22
  import "./chunk-SDZQJTJW.js";
23
+ import "./chunk-352FGP6W.js";
24
+ import "./chunk-WRNH5C3U.js";
25
+ import "./chunk-5EPNFDT5.js";
26
26
  import {
27
27
  getProjectOutDir,
28
28
  isAuthEnabled,
@@ -31,10 +31,10 @@ import {
31
31
  } from "./chunk-B7HCX5HM.js";
32
32
  import {
33
33
  generate
34
- } from "./chunk-JE6ZSCPU.js";
34
+ } from "./chunk-TFALFJEC.js";
35
35
  import {
36
36
  logger
37
- } from "./chunk-7PXZNQPR.js";
37
+ } from "./chunk-YBRQCBWG.js";
38
38
  import {
39
39
  resolve_catalog_dependencies_default
40
40
  } from "./chunk-LHR4G2UO.js";
@@ -54,7 +54,7 @@ import {
54
54
  import "./chunk-W5JQON7Z.js";
55
55
  import {
56
56
  VERSION
57
- } from "./chunk-RX2XDKHZ.js";
57
+ } from "./chunk-RJYRPQOA.js";
58
58
  import {
59
59
  linkCoreNodeModules,
60
60
  resolveInstalledCoreNodeModules
@@ -2,15 +2,15 @@ import {
2
2
  FederationConflictError,
3
3
  FederationDiagnosticError,
4
4
  federateCatalog
5
- } from "../chunk-U52FCZQ6.js";
6
- import "../chunk-WRNH5C3U.js";
7
- import "../chunk-5EPNFDT5.js";
8
- import "../chunk-6K7XZAYI.js";
9
- import "../chunk-352FGP6W.js";
5
+ } from "../chunk-EG62NTWS.js";
6
+ import "../chunk-A2RZR3U4.js";
10
7
  import "../chunk-R7Z5ALYI.js";
11
8
  import "../chunk-JJPB6EOZ.js";
12
9
  import "../chunk-FV56YFM4.js";
13
10
  import "../chunk-SDZQJTJW.js";
11
+ import "../chunk-352FGP6W.js";
12
+ import "../chunk-WRNH5C3U.js";
13
+ import "../chunk-5EPNFDT5.js";
14
14
  import "../chunk-6QENHZZP.js";
15
15
  export {
16
16
  FederationConflictError,
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  createFederationSourceProvider
3
- } from "../chunk-6K7XZAYI.js";
4
- import "../chunk-352FGP6W.js";
3
+ } from "../chunk-A2RZR3U4.js";
5
4
  import "../chunk-SDZQJTJW.js";
5
+ import "../chunk-352FGP6W.js";
6
6
  export {
7
7
  createFederationSourceProvider
8
8
  };
package/dist/generate.cjs CHANGED
@@ -108,7 +108,7 @@ var getEventCatalogConfigFile = async (projectDirectory) => {
108
108
  var import_picocolors = __toESM(require("picocolors"), 1);
109
109
 
110
110
  // package.json
111
- var version = "4.10.5";
111
+ var version = "4.10.7";
112
112
 
113
113
  // src/constants.ts
114
114
  var VERSION = version;
package/dist/generate.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  generate
3
- } from "./chunk-JE6ZSCPU.js";
4
- import "./chunk-7PXZNQPR.js";
5
- import "./chunk-RX2XDKHZ.js";
3
+ } from "./chunk-TFALFJEC.js";
4
+ import "./chunk-YBRQCBWG.js";
5
+ import "./chunk-RJYRPQOA.js";
6
6
  import "./chunk-6QENHZZP.js";
7
7
  export {
8
8
  generate
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(cli_logger_exports);
36
36
  var import_picocolors = __toESM(require("picocolors"), 1);
37
37
 
38
38
  // package.json
39
- var version = "4.10.5";
39
+ var version = "4.10.7";
40
40
 
41
41
  // src/constants.ts
42
42
  var VERSION = version;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  logger
3
- } from "../chunk-7PXZNQPR.js";
4
- import "../chunk-RX2XDKHZ.js";
3
+ } from "../chunk-YBRQCBWG.js";
4
+ import "../chunk-RJYRPQOA.js";
5
5
  export {
6
6
  logger
7
7
  };
@@ -3,7 +3,9 @@ import fs from 'fs';
3
3
  import { getAbsoluteFilePathForAstroFile } from '@utils/files';
4
4
  import Admonition from '@components/MDX/Admonition';
5
5
 
6
- const { file: mermaidFile, filePath } = Astro.props;
6
+ // `placement` and `actions` configure the interactive controls, e.g.
7
+ // <MermaidFileLoader file="diagram.mmd" placement="top-left" actions={false} />
8
+ const { file: mermaidFile, filePath, placement, actions } = Astro.props;
7
9
 
8
10
  // const escapeHtml = (str: string) => str.replace(/[&<>"']/g, (c) => escapeMap[c]);
9
11
  let isValidMermaidFile = mermaidFile.endsWith('.mmd') || mermaidFile.endsWith('.mermaid');
@@ -48,8 +50,13 @@ if (isValidMermaidFile) {
48
50
  {
49
51
  mermaidFileContent && isValidMermaidFile && (
50
52
  <div class="mermaid-block pb-4">
51
- <div class="mermaid border border-gray-200 rounded-lg p-1" data-content={mermaidFileContent}>
52
- <p>Loading graph...</p>
53
+ <div
54
+ class="mermaid border border-[rgb(var(--ec-page-border))] rounded-lg p-1"
55
+ data-content={mermaidFileContent}
56
+ data-placement={placement}
57
+ data-actions={actions !== undefined ? String(actions) : undefined}
58
+ >
59
+ <p class="text-[rgb(var(--ec-page-text-muted))]">Loading graph...</p>
53
60
  </div>
54
61
  </div>
55
62
  )
@@ -384,6 +384,7 @@ export default function SchemaExplorer({ schemas, apiAccessEnabled = false }: Sc
384
384
  />
385
385
  <div className="flex flex-1 min-h-0 gap-0 overflow-hidden">
386
386
  <div
387
+ id="schema-explorer-sidebar"
387
388
  className="fixed top-0 z-20 flex h-screen flex-col overflow-hidden border-r border-[rgb(var(--ec-page-border))] bg-linear-to-b from-[rgb(var(--ec-page-bg))] via-[rgb(var(--ec-page-bg))] to-[rgb(var(--ec-accent)/0.06)]"
388
389
  style={{ left: 'var(--ec-vertical-nav-width)', width: 'var(--ec-schema-sidebar-width, 360px)' }}
389
390
  >
@@ -583,6 +584,7 @@ export default function SchemaExplorer({ schemas, apiAccessEnabled = false }: Sc
583
584
  </div>
584
585
 
585
586
  <div
587
+ id="schema-explorer-content"
586
588
  className="flex-1 min-h-0 min-w-0 overflow-hidden bg-[rgb(var(--ec-card-bg,var(--ec-page-bg)))]"
587
589
  style={{ marginLeft: 'var(--ec-schema-sidebar-width, 360px)' }}
588
590
  >
@@ -812,6 +812,7 @@ export function DiscoverTable<T extends DiscoverTableData>({
812
812
  <div className="flex h-full min-h-0" style={{ ['--ec-discover-sidebar-width' as any]: '320px' }}>
813
813
  {/* Filter Sidebar */}
814
814
  <div
815
+ id="discover-filter-sidebar"
815
816
  className="fixed left-[var(--ec-vertical-nav-width)] top-0 z-20 flex h-screen w-[320px] flex-shrink-0 flex-col border-r border-[rgb(var(--ec-content-border))] bg-[rgb(var(--ec-rail-bg))]"
816
817
  style={{ width: 'var(--ec-discover-sidebar-width, 320px)' }}
817
818
  >
@@ -1180,6 +1181,7 @@ export function DiscoverTable<T extends DiscoverTableData>({
1180
1181
 
1181
1182
  {/* Main Table */}
1182
1183
  <div
1184
+ id="discover-results"
1183
1185
  className="flex-1 min-w-0 flex flex-col overflow-hidden"
1184
1186
  style={{ marginLeft: 'var(--ec-discover-sidebar-width, 320px)' }}
1185
1187
  >
@@ -25,10 +25,18 @@ const catalogTheme = config.theme || 'default';
25
25
  return 'dark';
26
26
  }
27
27
 
28
+ function getEmbeddedTheme() {
29
+ const params = new URLSearchParams(window.location.search);
30
+ const requestedTheme = params.get('theme');
31
+ const embedded = params.get('embed') === 'true';
32
+ return embedded && (requestedTheme === 'light' || requestedTheme === 'dark') ? requestedTheme : null;
33
+ }
34
+
28
35
  function applyTheme() {
29
- // Check localStorage first, fall back to dark mode
36
+ // An embed can request its own theme without changing the user's saved catalog preference.
37
+ const embeddedTheme = getEmbeddedTheme();
30
38
  const stored = localStorage.getItem('eventcatalog-theme');
31
- const theme = stored === 'light' || stored === 'dark' ? stored : getDefaultTheme();
39
+ const theme = embeddedTheme || (stored === 'light' || stored === 'dark' ? stored : getDefaultTheme());
32
40
  document.documentElement.setAttribute('data-theme', theme);
33
41
  // Also ensure catalog theme is set (for page transitions)
34
42
  document.documentElement.setAttribute('data-catalog-theme', catalogTheme);
@@ -432,6 +432,10 @@ const verticalNavAutoCollapsePaths = [buildUrl('/discover', true), buildUrl('/do
432
432
  <script is:inline define:vars={{ verticalNavAutoCollapsePaths }}>
433
433
  (() => {
434
434
  const verticalNavStorageKey = 'eventcatalog-vertical-nav-collapsed';
435
+ const embedded = new URLSearchParams(window.location.search).get('embed') === 'true';
436
+
437
+ document.documentElement.setAttribute('data-embedded', embedded ? 'true' : 'false');
438
+
435
439
  const routeShouldAutoCollapseVerticalNav = (pathname) =>
436
440
  verticalNavAutoCollapsePaths.some((path) => pathname === path || pathname.startsWith(`${path}/`));
437
441
 
@@ -514,6 +518,15 @@ const verticalNavAutoCollapsePaths = [buildUrl('/discover', true), buildUrl('/do
514
518
  .app-shell--with-sidebar {
515
519
  margin-left: calc(var(--ec-vertical-nav-width) + var(--ec-sidebar-panel-width));
516
520
  }
521
+ :root[data-embedded='true'] #eventcatalog-vertical-nav,
522
+ :root[data-embedded='true'] #eventcatalog-header,
523
+ :root[data-embedded='true'] #eventcatalog-header-spacer,
524
+ :root[data-embedded='true'] #sidebar {
525
+ display: none !important;
526
+ }
527
+ :root[data-embedded='true'] .app-shell {
528
+ margin-left: 0 !important;
529
+ }
517
530
  .vertical-nav-rail {
518
531
  width: var(--ec-vertical-nav-width);
519
532
  border-right: 1px solid rgb(var(--ec-page-border));
@@ -1087,6 +1100,7 @@ const verticalNavAutoCollapsePaths = [buildUrl('/discover', true), buildUrl('/do
1087
1100
  const urlSearchParams = new URLSearchParams(window.location.search);
1088
1101
  const params = Object.fromEntries(urlSearchParams.entries());
1089
1102
  const embeded = params.embed === 'true' ? true : false;
1103
+ document.documentElement.setAttribute('data-embedded', embeded ? 'true' : 'false');
1090
1104
  const content = document.getElementById('content');
1091
1105
  const shell = document.querySelector('.app-shell');
1092
1106
  const app = document.getElementById('eventcatalog-application');
@@ -1130,6 +1144,7 @@ const verticalNavAutoCollapsePaths = [buildUrl('/discover', true), buildUrl('/do
1130
1144
  'eventcatalog-vertical-nav',
1131
1145
  'eventcatalog-header',
1132
1146
  'eventcatalog-header-spacer',
1147
+ 'sidebar',
1133
1148
  'visualiser-footer',
1134
1149
  // /discover page elements
1135
1150
  'discover-collection-tabs',