@eventcatalog/core 2.33.4 → 2.33.6
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-MRFHOQZ5.js → chunk-CHTRHQHZ.js} +1 -1
- package/dist/{chunk-2OM7CIOD.js → chunk-Q22YAXYM.js} +1 -1
- package/dist/{chunk-AUIYWFSM.js → chunk-UPH7SKWZ.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/Miro/Miro.astro +87 -0
- package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.tsx +4 -2
- package/eventcatalog/src/components/MDX/components.tsx +2 -0
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/changelog/index.astro +2 -1
- package/eventcatalog/src/pages/miro/index.astro +121 -0
- 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-CHTRHQHZ.js";
|
|
4
|
+
import "../chunk-UPH7SKWZ.js";
|
|
5
|
+
import "../chunk-Q22YAXYM.js";
|
|
6
6
|
import "../chunk-E7TXTI7G.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,15 +6,15 @@ import {
|
|
|
6
6
|
} from "./chunk-UKJ7F5WR.js";
|
|
7
7
|
import {
|
|
8
8
|
log_build_default
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-CHTRHQHZ.js";
|
|
10
|
+
import "./chunk-UPH7SKWZ.js";
|
|
11
11
|
import {
|
|
12
12
|
catalogToAstro,
|
|
13
13
|
checkAndConvertMdToMdx
|
|
14
14
|
} from "./chunk-7SI5EVOX.js";
|
|
15
15
|
import {
|
|
16
16
|
VERSION
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-Q22YAXYM.js";
|
|
18
18
|
import {
|
|
19
19
|
isBackstagePluginEnabled,
|
|
20
20
|
isEventCatalogScaleEnabled,
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
import Admonition from '@components/MDX/Admonition';
|
|
3
|
+
import { buildUrl, buildUrlWithParams } from '@utils/url-builder';
|
|
4
|
+
import type { CollectionEntry } from 'astro:content';
|
|
5
|
+
import { ExpandIcon } from 'lucide-react';
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
title?: string;
|
|
9
|
+
height: string;
|
|
10
|
+
boardId: string;
|
|
11
|
+
autoplay: boolean;
|
|
12
|
+
moveToViewport: string;
|
|
13
|
+
moveToWidget: string;
|
|
14
|
+
edit: boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const {
|
|
18
|
+
title,
|
|
19
|
+
height = '500',
|
|
20
|
+
boardId,
|
|
21
|
+
autoplay = true,
|
|
22
|
+
edit = false,
|
|
23
|
+
moveToViewport,
|
|
24
|
+
moveToWidget,
|
|
25
|
+
...eventCatalogResource
|
|
26
|
+
} = Astro.props;
|
|
27
|
+
|
|
28
|
+
const resource = eventCatalogResource as CollectionEntry<'services'>;
|
|
29
|
+
|
|
30
|
+
const baseUrl = 'https://miro.com/app/live-embed';
|
|
31
|
+
const params = {
|
|
32
|
+
autoplay: autoplay ? 'true' : 'false',
|
|
33
|
+
embedMode: !edit ? 'view_only_without_ui' : undefined,
|
|
34
|
+
moveToViewport: moveToViewport || undefined,
|
|
35
|
+
moveToWidget: moveToWidget || undefined,
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const backUrl = buildUrl(`/docs/${resource.collection}/${resource.data.id}/${resource.data.version}#${title}-miro-title`);
|
|
39
|
+
|
|
40
|
+
const fullScreenParams = {
|
|
41
|
+
...params,
|
|
42
|
+
boardId: boardId,
|
|
43
|
+
title: title,
|
|
44
|
+
back: backUrl,
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const url = new URL(`${baseUrl}/${boardId}`);
|
|
48
|
+
Object.entries(params).forEach(([key, value]) => {
|
|
49
|
+
if (value !== undefined) {
|
|
50
|
+
url.searchParams.set(key, value);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
const openFullScreenUrl = buildUrlWithParams(`/miro`, fullScreenParams);
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
{
|
|
58
|
+
!boardId && (
|
|
59
|
+
<Admonition type="warning">
|
|
60
|
+
<div>
|
|
61
|
+
<span class="block font-bold">{`<Miro/>`} failed to load</span>
|
|
62
|
+
<span class="block">Please provide a boardId to use the Miro component.</span>
|
|
63
|
+
</div>
|
|
64
|
+
</Admonition>
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
{
|
|
69
|
+
boardId && (
|
|
70
|
+
<div>
|
|
71
|
+
{title && (
|
|
72
|
+
<h3 id={`${title}-miro-title`} class="text-3xl font-bold">
|
|
73
|
+
{title}
|
|
74
|
+
</h3>
|
|
75
|
+
)}
|
|
76
|
+
<div class="relative">
|
|
77
|
+
<iframe class="border border-gray-200 rounded-md" src={url.href} width="100%" height={height} />
|
|
78
|
+
<a
|
|
79
|
+
href={openFullScreenUrl}
|
|
80
|
+
class="absolute bottom-[15px] right-5 bg-white border border-gray-300 text-gray-700 hover:bg-gray-50 px-4 py-2 rounded-md transition-colors"
|
|
81
|
+
>
|
|
82
|
+
<ExpandIcon className="w-5 h-5" />
|
|
83
|
+
</a>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
)
|
|
87
|
+
}
|
|
@@ -189,8 +189,10 @@ const NodeGraphBuilder = ({
|
|
|
189
189
|
}, [animateMessages]);
|
|
190
190
|
|
|
191
191
|
useEffect(() => {
|
|
192
|
-
|
|
193
|
-
|
|
192
|
+
setTimeout(() => {
|
|
193
|
+
fitView({ duration: 800 });
|
|
194
|
+
}, 150);
|
|
195
|
+
}, []);
|
|
194
196
|
|
|
195
197
|
const handlePaneClick = useCallback(() => {
|
|
196
198
|
setIsSettingsOpen(false);
|
|
@@ -18,6 +18,7 @@ import Tabs from '@components/MDX/Tabs/Tabs.astro';
|
|
|
18
18
|
import TabItem from '@components/MDX/Tabs/TabItem.astro';
|
|
19
19
|
import ResourceLink from '@components/MDX/ResourceLink/ResourceLink.astro';
|
|
20
20
|
import Link from '@components/MDX/Link/Link.astro';
|
|
21
|
+
import Miro from '@components/MDX/Miro/Miro.astro';
|
|
21
22
|
// Portals: required for server/client components
|
|
22
23
|
import NodeGraphPortal from '@components/MDX/NodeGraph/NodeGraphPortal';
|
|
23
24
|
import SchemaViewerPortal from '@components/MDX/SchemaViewer/SchemaViewerPortal';
|
|
@@ -46,6 +47,7 @@ const components = (props: any) => {
|
|
|
46
47
|
Tabs,
|
|
47
48
|
Tile,
|
|
48
49
|
Tiles,
|
|
50
|
+
Miro: (mdxProp: any) => jsx(Miro, { ...props, ...mdxProp }),
|
|
49
51
|
};
|
|
50
52
|
};
|
|
51
53
|
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
} from '@heroicons/react/24/outline';
|
|
14
14
|
import { pageDataLoader } from '@utils/page-loaders/page-data-loader';
|
|
15
15
|
import { render, getEntry } from 'astro:content';
|
|
16
|
+
import mdxComponents from '@components/MDX/components';
|
|
16
17
|
import 'diff2html/bundles/css/diff2html.min.css';
|
|
17
18
|
|
|
18
19
|
import { buildUrl } from '@utils/url-builder';
|
|
@@ -226,7 +227,7 @@ const pages = [
|
|
|
226
227
|
</div>
|
|
227
228
|
)}
|
|
228
229
|
<div class="prose prose-md !max-w-none py-2">
|
|
229
|
-
<log.Content />
|
|
230
|
+
<log.Content components={mdxComponents(props)} />
|
|
230
231
|
</div>
|
|
231
232
|
{log.diffs && log.diffs.map((diff) => <div id="diff-container" set:html={diff} />)}
|
|
232
233
|
</div>
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
---
|
|
2
|
+
import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
3
|
+
import { ClientRouter } from 'astro:transitions';
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<VerticalSideBarLayout title="Miro">
|
|
7
|
+
<div class="h-[calc(100vh-80px)] bg-white p-3">
|
|
8
|
+
<div class="flex items-center justify-between mb-4">
|
|
9
|
+
<h1 id="boardTitle" class="text-2xl font-bold">Miro Board</h1>
|
|
10
|
+
<div class="flex items-center gap-3">
|
|
11
|
+
<button
|
|
12
|
+
id="backButton"
|
|
13
|
+
class="hidden items-center gap-2 bg-white border border-gray-300 text-gray-700 hover:bg-gray-50 px-4 py-2 rounded-md transition-colors"
|
|
14
|
+
>
|
|
15
|
+
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
|
|
16
|
+
<path
|
|
17
|
+
fill-rule="evenodd"
|
|
18
|
+
d="M9.707 16.707a1 1 0 01-1.414 0l-6-6a1 1 0 010-1.414l6-6a1 1 0 011.414 1.414L4.414 9H17a1 1 0 110 2H4.414l5.293 5.293a1 1 0 010 1.414z"
|
|
19
|
+
clip-rule="evenodd"></path>
|
|
20
|
+
</svg>
|
|
21
|
+
<span>Back</span>
|
|
22
|
+
</button>
|
|
23
|
+
<button id="toggleEditButton" class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-md transition-colors">
|
|
24
|
+
Enable Editing
|
|
25
|
+
</button>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
<div class="w-full bg-gray-100 h-[calc(100%-4rem)]">
|
|
29
|
+
<iframe class="w-full h-full border border-gray-200 rounded-md"></iframe>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</VerticalSideBarLayout>
|
|
33
|
+
|
|
34
|
+
<ClientRouter />
|
|
35
|
+
<script>
|
|
36
|
+
function configureMiro() {
|
|
37
|
+
// Get url from query params and then embed into the iframe
|
|
38
|
+
const url = new URL(window.location.href);
|
|
39
|
+
const boardId = url.searchParams.get('boardId');
|
|
40
|
+
const moveToViewport = url.searchParams.get('moveToViewport');
|
|
41
|
+
const moveToWidget = url.searchParams.get('moveToWidget');
|
|
42
|
+
const autoplay = url.searchParams.get('autoplay');
|
|
43
|
+
const edit = url.searchParams.get('edit');
|
|
44
|
+
const title = url.searchParams.get('title') || 'Miro Board';
|
|
45
|
+
const backUrl = url.searchParams.get('back');
|
|
46
|
+
|
|
47
|
+
// Configure back button if back URL is provided
|
|
48
|
+
const backButton = document.querySelector('#backButton');
|
|
49
|
+
if (backButton && backUrl) {
|
|
50
|
+
backButton.classList.remove('hidden');
|
|
51
|
+
backButton.classList.add('flex');
|
|
52
|
+
backButton.addEventListener('click', () => {
|
|
53
|
+
window.location.href = `${decodeURIComponent(backUrl)}#${title}-miro-title`;
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Update the board title
|
|
58
|
+
const boardTitleElement = document.querySelector('#boardTitle');
|
|
59
|
+
if (boardTitleElement) {
|
|
60
|
+
boardTitleElement.textContent = title;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Create base Miro URL
|
|
64
|
+
const miroBaseUrl = `https://miro.com/app/live-embed/${boardId}`;
|
|
65
|
+
const miroUrlParams = new URLSearchParams({
|
|
66
|
+
autoplay: autoplay ? 'true' : 'false',
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
// Add optional parameters
|
|
70
|
+
if (!edit) {
|
|
71
|
+
miroUrlParams.set('embedMode', 'view_only_without_ui');
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (moveToViewport) {
|
|
75
|
+
miroUrlParams.set('moveToViewport', moveToViewport);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (moveToWidget) {
|
|
79
|
+
miroUrlParams.set('moveToWidget', moveToWidget);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const miroUrl = `${miroBaseUrl}?${miroUrlParams.toString()}`;
|
|
83
|
+
|
|
84
|
+
const iframe = document.querySelector('iframe');
|
|
85
|
+
if (iframe) {
|
|
86
|
+
iframe.src = miroUrl;
|
|
87
|
+
iframe.width = '100%';
|
|
88
|
+
iframe.height = '100%';
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// Configure toggle edit button
|
|
92
|
+
const toggleEditButton = document.querySelector('#toggleEditButton');
|
|
93
|
+
if (toggleEditButton) {
|
|
94
|
+
// Update button text and style based on current mode
|
|
95
|
+
if (edit === 'true') {
|
|
96
|
+
toggleEditButton.textContent = 'Switch to Read only';
|
|
97
|
+
toggleEditButton.classList.remove('bg-blue-500', 'hover:bg-blue-600');
|
|
98
|
+
toggleEditButton.classList.add('bg-gray-500', 'hover:bg-gray-600');
|
|
99
|
+
} else {
|
|
100
|
+
toggleEditButton.textContent = 'Enable Editing';
|
|
101
|
+
toggleEditButton.classList.remove('bg-gray-500', 'hover:bg-gray-600');
|
|
102
|
+
toggleEditButton.classList.add('bg-blue-500', 'hover:bg-blue-600');
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Add click handler
|
|
106
|
+
toggleEditButton.addEventListener('click', () => {
|
|
107
|
+
const currentUrl = new URL(window.location.href);
|
|
108
|
+
if (edit === 'true') {
|
|
109
|
+
currentUrl.searchParams.delete('edit');
|
|
110
|
+
} else {
|
|
111
|
+
currentUrl.searchParams.set('edit', 'true');
|
|
112
|
+
}
|
|
113
|
+
window.location.href = currentUrl.toString();
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
configureMiro();
|
|
119
|
+
|
|
120
|
+
document.addEventListener('astro:page-load', configureMiro);
|
|
121
|
+
</script>
|