@eventcatalog/core 3.2.0 → 3.2.1
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-GGRXP5WM.js → chunk-7PHTRC72.js} +1 -1
- package/dist/{chunk-VPQCMMRM.js → chunk-LWUJQOCC.js} +1 -1
- package/dist/{chunk-AA47DJ43.js → chunk-SFQ3BU4M.js} +1 -1
- package/dist/{chunk-RWYEP5SD.js → chunk-SYOF3QEG.js} +1 -1
- package/dist/{chunk-L3QRQT7U.js → chunk-VBEYXPR5.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/MDX/IcePanel/IcePanel.astro +77 -0
- package/eventcatalog/src/components/MDX/components.tsx +2 -0
- package/eventcatalog/src/pages/icepanel/index.astro +67 -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-LWUJQOCC.js";
|
|
4
|
+
import "../chunk-SFQ3BU4M.js";
|
|
5
|
+
import "../chunk-SYOF3QEG.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
|
@@ -109,7 +109,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
109
109
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
110
110
|
|
|
111
111
|
// package.json
|
|
112
|
-
var version = "3.2.
|
|
112
|
+
var version = "3.2.1";
|
|
113
113
|
|
|
114
114
|
// src/constants.ts
|
|
115
115
|
var VERSION = version;
|
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-LWUJQOCC.js";
|
|
10
|
+
import "./chunk-SFQ3BU4M.js";
|
|
11
11
|
import {
|
|
12
12
|
runMigrations
|
|
13
13
|
} from "./chunk-BH3JMNAV.js";
|
|
@@ -21,13 +21,13 @@ import {
|
|
|
21
21
|
} from "./chunk-5VBIXL6C.js";
|
|
22
22
|
import {
|
|
23
23
|
generate
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-7PHTRC72.js";
|
|
25
25
|
import {
|
|
26
26
|
logger
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-VBEYXPR5.js";
|
|
28
28
|
import {
|
|
29
29
|
VERSION
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-SYOF3QEG.js";
|
|
31
31
|
import "./chunk-UPONRQSN.js";
|
|
32
32
|
|
|
33
33
|
// src/eventcatalog.ts
|
package/dist/generate.cjs
CHANGED
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-7PHTRC72.js";
|
|
4
|
+
import "./chunk-VBEYXPR5.js";
|
|
5
|
+
import "./chunk-SYOF3QEG.js";
|
|
6
6
|
import "./chunk-UPONRQSN.js";
|
|
7
7
|
export {
|
|
8
8
|
generate
|
package/dist/utils/cli-logger.js
CHANGED
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
description?: string;
|
|
10
|
+
height?: string;
|
|
11
|
+
width?: string;
|
|
12
|
+
url: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const { title, description, height = '600', width = '100%', url, ...eventCatalogResource } = Astro.props;
|
|
16
|
+
|
|
17
|
+
const resource = eventCatalogResource as CollectionEntry<'services'>;
|
|
18
|
+
|
|
19
|
+
// Validate that the URL is from IcePanel
|
|
20
|
+
const isValidIcePanelUrl = url?.startsWith('https://s.icepanel.io/') || url?.startsWith('https://icepanel.io/');
|
|
21
|
+
|
|
22
|
+
const backUrl = resource.collection
|
|
23
|
+
? buildUrl(`/docs/${resource.collection}/${resource.data.id}/${resource.data.version}#${title}-icepanel-title`)
|
|
24
|
+
: undefined;
|
|
25
|
+
|
|
26
|
+
const fullScreenParams = {
|
|
27
|
+
url: url,
|
|
28
|
+
title: title,
|
|
29
|
+
back: backUrl,
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const openFullScreenUrl = buildUrlWithParams(`/icepanel`, fullScreenParams);
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
{
|
|
36
|
+
!url && (
|
|
37
|
+
<Admonition type="warning">
|
|
38
|
+
<div>
|
|
39
|
+
<span class="block font-bold">{`<IcePanel/>`} failed to load</span>
|
|
40
|
+
<span class="block">Please provide a url to use the IcePanel component.</span>
|
|
41
|
+
</div>
|
|
42
|
+
</Admonition>
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
{
|
|
47
|
+
url && !isValidIcePanelUrl && (
|
|
48
|
+
<Admonition type="warning">
|
|
49
|
+
<div>
|
|
50
|
+
<span class="block font-bold">{`<IcePanel/>`} invalid URL</span>
|
|
51
|
+
<span class="block">Please provide a valid IcePanel URL (e.g., https://s.icepanel.io/...).</span>
|
|
52
|
+
</div>
|
|
53
|
+
</Admonition>
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
{
|
|
58
|
+
url && isValidIcePanelUrl && (
|
|
59
|
+
<div>
|
|
60
|
+
{title && (
|
|
61
|
+
<h3 id={`${title}-icepanel-title`} class="text-3xl font-bold">
|
|
62
|
+
{title}
|
|
63
|
+
</h3>
|
|
64
|
+
)}
|
|
65
|
+
{description && <p class="text-[rgb(var(--ec-page-text-muted))] mb-3">{description}</p>}
|
|
66
|
+
<div class="relative">
|
|
67
|
+
<iframe class="rounded-2xl border-none" src={url} width={width} height={height} title={title || 'IcePanel Diagram'} />
|
|
68
|
+
<a
|
|
69
|
+
href={openFullScreenUrl}
|
|
70
|
+
class="absolute bottom-[15px] right-5 bg-[rgb(var(--ec-card-bg))] border border-[rgb(var(--ec-page-border))] text-[rgb(var(--ec-page-text))] hover:bg-[rgb(var(--ec-accent-subtle))] px-4 py-2 rounded-md transition-colors"
|
|
71
|
+
>
|
|
72
|
+
<ExpandIcon className="w-5 h-5" />
|
|
73
|
+
</a>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
)
|
|
77
|
+
}
|
|
@@ -25,6 +25,7 @@ import Miro from '@components/MDX/Miro/Miro.astro';
|
|
|
25
25
|
import Lucid from '@components/MDX/Lucid/Lucid.astro';
|
|
26
26
|
import DrawIO from '@components/MDX/DrawIO/DrawIO.astro';
|
|
27
27
|
import FigJam from '@components/MDX/FigJam/FigJam.astro';
|
|
28
|
+
import IcePanel from '@components/MDX/IcePanel/IcePanel.astro';
|
|
28
29
|
import Design from '@components/MDX/Design/Design.astro';
|
|
29
30
|
import MermaidFileLoader from '@components/MDX/MermaidFileLoader/MermaidFileLoader.astro';
|
|
30
31
|
// Portals: required for server/client components
|
|
@@ -65,6 +66,7 @@ const components = (props: any) => {
|
|
|
65
66
|
Lucid: (mdxProp: any) => jsx(Lucid, { ...props, ...mdxProp }),
|
|
66
67
|
DrawIO: (mdxProp: any) => jsx(DrawIO, { ...props, ...mdxProp }),
|
|
67
68
|
FigJam: (mdxProp: any) => jsx(FigJam, { ...props, ...mdxProp }),
|
|
69
|
+
IcePanel: (mdxProp: any) => jsx(IcePanel, { ...props, ...mdxProp }),
|
|
68
70
|
MermaidFileLoader: (mdxProp: any) => jsx(MermaidFileLoader, { ...props, ...mdxProp }),
|
|
69
71
|
};
|
|
70
72
|
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
3
|
+
import { ClientRouter } from 'astro:transitions';
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<VerticalSideBarLayout title="IcePanel">
|
|
7
|
+
<div class="h-[calc(100vh-80px)] bg-[rgb(var(--ec-page-bg))] p-3">
|
|
8
|
+
<div class="flex items-center justify-between mb-4">
|
|
9
|
+
<h1 id="diagramTitle" class="text-2xl font-bold text-[rgb(var(--ec-page-text))]">IcePanel Diagram</h1>
|
|
10
|
+
<div class="flex items-center gap-3">
|
|
11
|
+
<button
|
|
12
|
+
id="backButton"
|
|
13
|
+
class="hidden items-center gap-2 bg-[rgb(var(--ec-card-bg))] border border-[rgb(var(--ec-page-border))] text-[rgb(var(--ec-page-text))] hover:bg-[rgb(var(--ec-accent-subtle))] 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
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="w-full bg-[rgb(var(--ec-card-bg))] h-[calc(100%-4rem)] rounded-2xl">
|
|
26
|
+
<iframe class="w-full h-full rounded-2xl border-none"></iframe>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</VerticalSideBarLayout>
|
|
30
|
+
|
|
31
|
+
<ClientRouter />
|
|
32
|
+
<script>
|
|
33
|
+
function configureIcePanel() {
|
|
34
|
+
// Get url from query params and then embed into the iframe
|
|
35
|
+
const pageUrl = new URL(window.location.href);
|
|
36
|
+
const icePanelUrl = pageUrl.searchParams.get('url');
|
|
37
|
+
const title = pageUrl.searchParams.get('title') || 'IcePanel Diagram';
|
|
38
|
+
const backUrl = pageUrl.searchParams.get('back');
|
|
39
|
+
|
|
40
|
+
// Configure back button if back URL is provided
|
|
41
|
+
const backButton = document.querySelector('#backButton');
|
|
42
|
+
if (backButton && backUrl) {
|
|
43
|
+
backButton.classList.remove('hidden');
|
|
44
|
+
backButton.classList.add('flex');
|
|
45
|
+
backButton.addEventListener('click', () => {
|
|
46
|
+
window.location.href = `${decodeURIComponent(backUrl)}#${title}-icepanel-title`;
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Update the diagram title
|
|
51
|
+
const diagramTitleElement = document.querySelector('#diagramTitle');
|
|
52
|
+
if (diagramTitleElement) {
|
|
53
|
+
diagramTitleElement.textContent = title;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const iframe = document.querySelector('iframe');
|
|
57
|
+
if (iframe && icePanelUrl) {
|
|
58
|
+
iframe.src = icePanelUrl;
|
|
59
|
+
iframe.width = '100%';
|
|
60
|
+
iframe.height = '100%';
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
configureIcePanel();
|
|
65
|
+
|
|
66
|
+
document.addEventListener('astro:page-load', configureIcePanel);
|
|
67
|
+
</script>
|