@eventcatalog/core 3.0.0-beta.1 → 3.0.0-beta.2
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-FH5AN4Z6.js → chunk-H4QHE5YZ.js} +1 -1
- package/dist/{chunk-M6QG3NPM.js → chunk-JSONCD7V.js} +1 -1
- package/dist/{chunk-KE2IUVK6.js → chunk-PQL6O5YA.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 +3 -3
- package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.tsx +45 -3
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-PQL6O5YA.js";
|
|
4
|
+
import "../chunk-JSONCD7V.js";
|
|
5
|
+
import "../chunk-H4QHE5YZ.js";
|
|
6
6
|
import "../chunk-UPONRQSN.js";
|
|
7
7
|
export {
|
|
8
8
|
log_build_default as default
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
package/dist/eventcatalog.js
CHANGED
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
} from "./chunk-PLNJC7NZ.js";
|
|
7
7
|
import {
|
|
8
8
|
log_build_default
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-PQL6O5YA.js";
|
|
10
|
+
import "./chunk-JSONCD7V.js";
|
|
11
11
|
import {
|
|
12
12
|
runMigrations
|
|
13
13
|
} from "./chunk-BH3JMNAV.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
import "./chunk-55D645EH.js";
|
|
20
20
|
import {
|
|
21
21
|
VERSION
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-H4QHE5YZ.js";
|
|
23
23
|
import {
|
|
24
24
|
isAuthEnabled,
|
|
25
25
|
isOutputServer
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
import '@xyflow/react/dist/style.css';
|
|
20
20
|
import { ExternalLink, HistoryIcon } from 'lucide-react';
|
|
21
21
|
import { toPng } from 'html-to-image';
|
|
22
|
-
import { DocumentArrowDownIcon } from '@heroicons/react/24/outline';
|
|
22
|
+
import { DocumentArrowDownIcon, PresentationChartLineIcon } from '@heroicons/react/24/outline';
|
|
23
23
|
// Nodes and edges
|
|
24
24
|
import ServiceNode from './Nodes/Service';
|
|
25
25
|
import FlowNode from './Nodes/Flow';
|
|
@@ -135,6 +135,7 @@ const NodeGraphBuilder = ({
|
|
|
135
135
|
const [isSettingsOpen, setIsSettingsOpen] = useState(false);
|
|
136
136
|
const [animateMessages, setAnimateMessages] = useState(false);
|
|
137
137
|
const [activeStepIndex, setActiveStepIndex] = useState<number | null>(null);
|
|
138
|
+
const [isFullscreen, setIsFullscreen] = useState(false);
|
|
138
139
|
// const [isStudioModalOpen, setIsStudioModalOpen] = useState(false);
|
|
139
140
|
|
|
140
141
|
// Check if there are channels to determine if we need the visualizer functionality
|
|
@@ -349,6 +350,30 @@ const NodeGraphBuilder = ({
|
|
|
349
350
|
setIsStudioModalOpen(true);
|
|
350
351
|
};
|
|
351
352
|
|
|
353
|
+
const toggleFullScreen = useCallback(() => {
|
|
354
|
+
if (!document.fullscreenElement) {
|
|
355
|
+
reactFlowWrapperRef.current?.requestFullscreen().catch((err) => {
|
|
356
|
+
console.error(`Error attempting to enable full-screen mode: ${err.message} (${err.name})`);
|
|
357
|
+
});
|
|
358
|
+
} else {
|
|
359
|
+
document.exitFullscreen();
|
|
360
|
+
}
|
|
361
|
+
}, []);
|
|
362
|
+
|
|
363
|
+
useEffect(() => {
|
|
364
|
+
const handleFullscreenChange = () => {
|
|
365
|
+
setIsFullscreen(!!document.fullscreenElement);
|
|
366
|
+
setTimeout(() => {
|
|
367
|
+
fitView({ duration: 800 });
|
|
368
|
+
}, 100);
|
|
369
|
+
};
|
|
370
|
+
|
|
371
|
+
document.addEventListener('fullscreenchange', handleFullscreenChange);
|
|
372
|
+
return () => {
|
|
373
|
+
document.removeEventListener('fullscreenchange', handleFullscreenChange);
|
|
374
|
+
};
|
|
375
|
+
}, [fitView]);
|
|
376
|
+
|
|
352
377
|
const handleExportVisual = useCallback(() => {
|
|
353
378
|
const imageWidth = 1024;
|
|
354
379
|
const imageHeight = 768;
|
|
@@ -563,7 +588,7 @@ const NodeGraphBuilder = ({
|
|
|
563
588
|
const isFlowVisualization = edges.some((edge: Edge) => edge.type === 'flow-edge');
|
|
564
589
|
|
|
565
590
|
return (
|
|
566
|
-
<div ref={reactFlowWrapperRef} className="w-full h-full">
|
|
591
|
+
<div ref={reactFlowWrapperRef} className="w-full h-full bg-gray-50">
|
|
567
592
|
<ReactFlow
|
|
568
593
|
nodeTypes={nodeTypes}
|
|
569
594
|
edgeTypes={edgeTypes}
|
|
@@ -583,7 +608,7 @@ const NodeGraphBuilder = ({
|
|
|
583
608
|
<Panel position="top-center" className="w-full pr-6 ">
|
|
584
609
|
<div className="flex space-x-2 justify-between items-center">
|
|
585
610
|
<div className="flex space-x-2 ml-4">
|
|
586
|
-
<div>
|
|
611
|
+
<div className="relative group">
|
|
587
612
|
<button
|
|
588
613
|
onClick={() => setIsSettingsOpen(!isSettingsOpen)}
|
|
589
614
|
className="py-2.5 px-3 bg-white rounded-md shadow-md hover:bg-purple-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500"
|
|
@@ -591,6 +616,23 @@ const NodeGraphBuilder = ({
|
|
|
591
616
|
>
|
|
592
617
|
<CogIcon className="h-5 w-5 text-gray-600" />
|
|
593
618
|
</button>
|
|
619
|
+
<div className="absolute top-full left-0 mt-2 px-2 py-1 bg-gray-900 text-white text-xs rounded shadow-lg opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap pointer-events-none z-50">
|
|
620
|
+
Settings
|
|
621
|
+
</div>
|
|
622
|
+
</div>
|
|
623
|
+
<div className="relative group">
|
|
624
|
+
<button
|
|
625
|
+
onClick={toggleFullScreen}
|
|
626
|
+
className={`py-2.5 px-3 bg-white rounded-md shadow-md hover:bg-purple-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500 ${
|
|
627
|
+
isFullscreen ? 'bg-purple-50 text-purple-600' : ''
|
|
628
|
+
}`}
|
|
629
|
+
aria-label={isFullscreen ? 'Exit presentation mode' : 'Enter presentation mode'}
|
|
630
|
+
>
|
|
631
|
+
<PresentationChartLineIcon className={`h-5 w-5 ${isFullscreen ? 'text-purple-600' : 'text-gray-600'}`} />
|
|
632
|
+
</button>
|
|
633
|
+
<div className="absolute top-full left-1/2 -translate-x-1/2 mt-2 px-2 py-1 bg-gray-900 text-white text-xs rounded shadow-lg opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap pointer-events-none z-50">
|
|
634
|
+
{isFullscreen ? 'Exit Presentation Mode' : 'Presentation Mode'}
|
|
635
|
+
</div>
|
|
594
636
|
</div>
|
|
595
637
|
|
|
596
638
|
{title && (
|