@eventcatalog/core 5.6.1 → 5.7.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/analytics/analytics.cjs +1 -1
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/log-build.cjs +1 -1
- package/dist/analytics/log-build.js +3 -3
- package/dist/{chunk-LVOGLB6C.js → chunk-22KZ4TJF.js} +1 -1
- package/dist/{chunk-2NALBBWH.js → chunk-4CV7VC4K.js} +1 -1
- package/dist/{chunk-QJXVAM76.js → chunk-BE5PTWNC.js} +1 -1
- package/dist/{chunk-N7LDFUEB.js → chunk-FMWQ2YYN.js} +1 -1
- package/dist/{chunk-L63ED43X.js → chunk-MOPKQMQP.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +1 -1
- package/dist/eventcatalog.js +5 -5
- 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/eventcatalog/src/components/ChatPanel/ChatPanel.tsx +7 -2
- package/eventcatalog/src/components/MDX/NodeGraph/AstroNodeGraph.tsx +21 -1
- package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.astro +2 -1
- package/eventcatalog/src/features/mcp/apps/generated/canvas.html +73 -73
- package/eventcatalog/src/features/mcp/apps/generated/viewer.html +73 -73
- package/eventcatalog/src/features/studio/components/NodeDetails.tsx +4 -0
- package/eventcatalog/src/features/studio/components/StudioDesigner.tsx +74 -8
- package/eventcatalog/src/features/studio/hooks/use-studio-flow.ts +9 -4
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +4 -0
- package/eventcatalog/src/utils/node-graphs/compact-visualiser-graph.ts +14 -0
- package/eventcatalog/src/utils/node-graphs/node-resource.ts +26 -0
- package/package.json +7 -7
|
@@ -169,7 +169,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
169
169
|
var import_os = __toESM(require("os"), 1);
|
|
170
170
|
|
|
171
171
|
// package.json
|
|
172
|
-
var version = "5.
|
|
172
|
+
var version = "5.7.0";
|
|
173
173
|
|
|
174
174
|
// src/constants.ts
|
|
175
175
|
var VERSION = version;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-22KZ4TJF.js";
|
|
4
4
|
import "../chunk-AD7CL772.js";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-4CV7VC4K.js";
|
|
6
6
|
import "../chunk-YRZK7HKX.js";
|
|
7
7
|
import "../chunk-CA6WCQ2T.js";
|
|
8
8
|
import "../chunk-CPW6G62V.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-MOPKQMQP.js";
|
|
10
10
|
import "../chunk-4G7FSRPN.js";
|
|
11
11
|
export {
|
|
12
12
|
log_build_default as default
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
|
@@ -174,7 +174,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
174
174
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
175
175
|
|
|
176
176
|
// package.json
|
|
177
|
-
var version = "5.
|
|
177
|
+
var version = "5.7.0";
|
|
178
178
|
|
|
179
179
|
// src/constants.ts
|
|
180
180
|
var VERSION = version;
|
package/dist/eventcatalog.js
CHANGED
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
import "./chunk-CA4U2JP7.js";
|
|
8
8
|
import {
|
|
9
9
|
log_build_default
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-22KZ4TJF.js";
|
|
11
11
|
import {
|
|
12
12
|
getLicenseStatus,
|
|
13
13
|
printLicenseStatus
|
|
14
14
|
} from "./chunk-AD7CL772.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-4CV7VC4K.js";
|
|
16
16
|
import "./chunk-YRZK7HKX.js";
|
|
17
17
|
import "./chunk-CA6WCQ2T.js";
|
|
18
18
|
import "./chunk-CPW6G62V.js";
|
|
@@ -39,10 +39,10 @@ import {
|
|
|
39
39
|
} from "./chunk-NKNOXQ62.js";
|
|
40
40
|
import {
|
|
41
41
|
generate
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-FMWQ2YYN.js";
|
|
43
43
|
import {
|
|
44
44
|
logger
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-BE5PTWNC.js";
|
|
46
46
|
import {
|
|
47
47
|
resolve_catalog_dependencies_default
|
|
48
48
|
} from "./chunk-PD7KTSYN.js";
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
} from "./chunk-LFQJXLHG.js";
|
|
80
80
|
import {
|
|
81
81
|
VERSION
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-MOPKQMQP.js";
|
|
83
83
|
import {
|
|
84
84
|
getEventCatalogConfigFile,
|
|
85
85
|
verifyRequiredFieldsAreInCatalogConfigFile
|
package/dist/generate.cjs
CHANGED
|
@@ -105,7 +105,7 @@ var getEventCatalogConfigFile = async (projectDirectory) => {
|
|
|
105
105
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
106
106
|
|
|
107
107
|
// package.json
|
|
108
|
-
var version = "5.
|
|
108
|
+
var version = "5.7.0";
|
|
109
109
|
|
|
110
110
|
// src/constants.ts
|
|
111
111
|
var VERSION = version;
|
package/dist/generate.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generate
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-FMWQ2YYN.js";
|
|
4
|
+
import "./chunk-BE5PTWNC.js";
|
|
5
|
+
import "./chunk-MOPKQMQP.js";
|
|
6
6
|
import "./chunk-4G7FSRPN.js";
|
|
7
7
|
export {
|
|
8
8
|
generate
|
package/dist/utils/cli-logger.js
CHANGED
|
@@ -619,9 +619,14 @@ const ChatPanel = ({ isOpen, onClose, configured = false }: ChatPanelProps) => {
|
|
|
619
619
|
}
|
|
620
620
|
}, [configured, isOpen, tools.length, chatApiUrl]);
|
|
621
621
|
|
|
622
|
-
//
|
|
622
|
+
// Follow the current URL (pathname + search): the panel lives in the persisted header, so it stays mounted while
|
|
623
|
+
// ClientRouter swaps pages underneath it. Reading the URL again after each swap keeps the suggested questions and
|
|
624
|
+
// the "Based on" context on the page the person is actually looking at, not the one they opened the panel from.
|
|
623
625
|
useEffect(() => {
|
|
624
|
-
setPathname(window.location.pathname + window.location.search);
|
|
626
|
+
const updatePathname = () => setPathname(window.location.pathname + window.location.search);
|
|
627
|
+
updatePathname();
|
|
628
|
+
document.addEventListener('astro:after-swap', updatePathname);
|
|
629
|
+
return () => document.removeEventListener('astro:after-swap', updatePathname);
|
|
625
630
|
}, [isOpen]);
|
|
626
631
|
|
|
627
632
|
// Memoize suggested questions to avoid recalculating on every render
|
|
@@ -17,6 +17,7 @@ import { createPortal } from 'react-dom';
|
|
|
17
17
|
import type { Node, Edge } from '@xyflow/react';
|
|
18
18
|
import type { FlowGroupBy, OpenInStudioRequest } from '@eventcatalog/visualiser';
|
|
19
19
|
import { buildUrl } from '@utils/url-builder';
|
|
20
|
+
import { getNodeDiagramPath } from '@utils/node-graphs/node-resource';
|
|
20
21
|
import { createCanvasThroughApi } from '@features/studio/api/client';
|
|
21
22
|
import { getStoredName } from '@features/studio/identity';
|
|
22
23
|
|
|
@@ -84,9 +85,27 @@ interface AstroNodeGraphProps {
|
|
|
84
85
|
swimlanes?: FlowGroupBy;
|
|
85
86
|
// The Studio API's address, when Studio is on: the menu can then start a canvas from the diagram
|
|
86
87
|
studioApiUrl?: string;
|
|
88
|
+
// Clicking a node opens its diagram (when the catalog has the visualiser's pages)
|
|
89
|
+
opensDiagrams?: boolean;
|
|
87
90
|
}
|
|
88
91
|
|
|
89
|
-
const
|
|
92
|
+
const withoutTrailingSlash = (path: string) => path.replace(/\/+$/, '');
|
|
93
|
+
|
|
94
|
+
/** The diagram page a node opens, unless it's the page this is (e.g. the service on its own diagram) */
|
|
95
|
+
const getNodeDiagramUrl = (node: Node) => {
|
|
96
|
+
const path = getNodeDiagramPath(node);
|
|
97
|
+
if (!path) return undefined;
|
|
98
|
+
const url = buildUrl(path);
|
|
99
|
+
return withoutTrailingSlash(url) === withoutTrailingSlash(window.location.pathname) ? undefined : url;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const AstroNodeGraph = ({
|
|
103
|
+
isDevMode = false,
|
|
104
|
+
resourceKey,
|
|
105
|
+
studioApiUrl,
|
|
106
|
+
opensDiagrams = false,
|
|
107
|
+
...otherProps
|
|
108
|
+
}: AstroNodeGraphProps) => {
|
|
90
109
|
// Astro-specific navigation handler
|
|
91
110
|
const handleNavigate = useCallback((url: string) => {
|
|
92
111
|
// Use window.location for navigation since we can't import astro:transitions/client in a React component
|
|
@@ -167,6 +186,7 @@ const AstroNodeGraph = ({ isDevMode = false, resourceKey, studioApiUrl, ...other
|
|
|
167
186
|
isDevMode={isDevMode}
|
|
168
187
|
onNavigate={handleNavigate}
|
|
169
188
|
onBuildUrl={handleBuildUrl}
|
|
189
|
+
getNodeDiagramUrl={opensDiagrams ? getNodeDiagramUrl : undefined}
|
|
170
190
|
onSaveLayout={handleSaveLayout}
|
|
171
191
|
onResetLayout={handleResetLayout}
|
|
172
192
|
onOpenInStudio={studioApiUrl ? setToOpen : undefined}
|
|
@@ -31,7 +31,7 @@ import { pageDataLoader } from '@utils/page-loaders/page-data-loader';
|
|
|
31
31
|
import { getNodesAndEdges as getNodesAndEdgesForContainer } from '@utils/node-graphs/container-node-graph';
|
|
32
32
|
import { getNodesAndEdges as getNodesAndEdgesForChannel } from '@utils/node-graphs/channel-node-graph';
|
|
33
33
|
import config from '@config';
|
|
34
|
-
import { isEventCatalogChatVisible, isDevMode, isCanvasEnabled } from '@utils/feature';
|
|
34
|
+
import { isEventCatalogChatVisible, isDevMode, isCanvasEnabled, isVisualiserEnabled } from '@utils/feature';
|
|
35
35
|
import { CANVASES_API_PATH } from '@features/studio/api/canvases-api';
|
|
36
36
|
import { loadSavedLayout, applyLayoutToNodes, buildResourceKey } from '@utils/node-graphs/layout-persistence';
|
|
37
37
|
import { compactVisualiserGraph } from '@utils/node-graphs/compact-visualiser-graph';
|
|
@@ -268,6 +268,7 @@ if (overview && levelsOverview) {
|
|
|
268
268
|
swimlanes={lanes}
|
|
269
269
|
studioApiUrl={studioApiUrl}
|
|
270
270
|
syncRenderModeWithUrl={syncRenderModeWithUrl}
|
|
271
|
+
opensDiagrams={isVisualiserEnabled()}
|
|
271
272
|
/>
|
|
272
273
|
</div>
|
|
273
274
|
|