@eventcatalog/core 4.0.0-beta.0 → 4.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/bin/eventcatalog.config.d.ts +1 -1
- 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-HN45LKSL.js → chunk-24K6JJV5.js} +1 -1
- package/dist/{chunk-7PMNFOIL.js → chunk-7NOXTLJP.js} +1 -1
- package/dist/{chunk-D3MI3OFO.js → chunk-FLLYUYF2.js} +1 -1
- package/dist/{chunk-NAOHQDLC.js → chunk-IK6AW6IC.js} +1 -1
- package/dist/{chunk-JMADW4J7.js → chunk-JRCXVY3E.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +1 -1
- package/dist/eventcatalog.config.d.cts +40 -7
- package/dist/eventcatalog.config.d.ts +40 -7
- 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 +16 -2
- package/eventcatalog/src/components/CopyAsMarkdown.tsx +6 -57
- package/eventcatalog/src/content.config.ts +2 -0
- package/eventcatalog/src/enterprise/ai/chat-api.ts +4 -2
- package/eventcatalog/src/enterprise/custom-documentation/pages/docs/custom/index.astro +26 -7
- package/eventcatalog/src/enterprise/feature.ts +0 -4
- package/eventcatalog/src/enterprise/integrations/eventcatalog-features.ts +0 -9
- package/eventcatalog/src/enterprise/tools/catalog-tools.ts +6 -1
- package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +343 -282
- package/eventcatalog/src/pages/diagrams/[id]/[version]/index.astro +6 -81
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +0 -8
- package/eventcatalog/src/stores/sidebar-store/state.ts +4 -4
- package/eventcatalog/src/utils/feature.ts +0 -2
- package/package.json +4 -4
- package/eventcatalog/src/enterprise/print/_message.data.ts +0 -63
- package/eventcatalog/src/enterprise/print/components/PrintHeader.astro +0 -183
- package/eventcatalog/src/enterprise/print/components/PrintLayout.astro +0 -271
- package/eventcatalog/src/enterprise/print/components/PrintParticipantsTable.astro +0 -64
- package/eventcatalog/src/enterprise/print/components/PrintSchemaPropertiesTable.astro +0 -65
- package/eventcatalog/src/enterprise/print/components/PrintSchemaViewer.tsx +0 -55
- package/eventcatalog/src/enterprise/print/components/PrintSection.astro +0 -17
- package/eventcatalog/src/enterprise/print/message.astro +0 -353
- package/eventcatalog/src/enterprise/print/utils.ts +0 -58
- package/eventcatalog/src/utils/sidebar-visibility.ts +0 -41
|
@@ -5,9 +5,9 @@ import VisualiserLayout from '@layouts/VisualiserLayout.astro';
|
|
|
5
5
|
import components from '@components/MDX/components';
|
|
6
6
|
import config from '@config';
|
|
7
7
|
import { buildUrl } from '@utils/url-builder';
|
|
8
|
-
import { GitCompare, X,
|
|
8
|
+
import { GitCompare, X, AlignLeft, HistoryIcon } from 'lucide-react';
|
|
9
9
|
import CopyAsMarkdown from '@components/CopyAsMarkdown';
|
|
10
|
-
import { isLLMSTxtEnabled, isEventCatalogChatEnabled
|
|
10
|
+
import { isLLMSTxtEnabled, isEventCatalogChatEnabled } from '@utils/feature';
|
|
11
11
|
|
|
12
12
|
import { Page } from './_index.data';
|
|
13
13
|
|
|
@@ -21,7 +21,6 @@ const pageTitle = `Diagram | ${props.data.name}`;
|
|
|
21
21
|
const currentVersion = props.data.version;
|
|
22
22
|
const allVersions = props.allVersions || [currentVersion];
|
|
23
23
|
const hasMultipleVersions = allVersions.length > 1;
|
|
24
|
-
const scaleEnabled = isDiagramComparisonEnabled();
|
|
25
24
|
const chatEnabled = isEventCatalogChatEnabled();
|
|
26
25
|
const markdownDownloadEnabled = isLLMSTxtEnabled();
|
|
27
26
|
const chatQuery = `Tell me about the "${props.data.name}" diagram (version ${props.data.version})`;
|
|
@@ -133,7 +132,6 @@ const chatQuery = `Tell me about the "${props.data.name}" diagram (version ${pro
|
|
|
133
132
|
<button
|
|
134
133
|
id="compare-btn"
|
|
135
134
|
type="button"
|
|
136
|
-
data-scale-enabled={scaleEnabled}
|
|
137
135
|
class="inline-flex w-full items-center justify-center gap-1.5 rounded-md border border-[rgb(var(--ec-dropdown-border))] bg-[rgb(var(--ec-dropdown-bg))] px-3 py-2 text-sm font-medium text-[rgb(var(--ec-dropdown-text))] shadow-xs transition-colors hover:bg-[rgb(var(--ec-dropdown-hover))] focus:outline-hidden focus:ring-1 focus:ring-[rgb(var(--ec-accent))]"
|
|
138
136
|
>
|
|
139
137
|
<GitCompare className="w-4 h-4" />
|
|
@@ -148,57 +146,9 @@ const chatQuery = `Tell me about the "${props.data.name}" diagram (version ${pro
|
|
|
148
146
|
</div>
|
|
149
147
|
</div>
|
|
150
148
|
|
|
151
|
-
{/*
|
|
149
|
+
{/* Compare modal */}
|
|
152
150
|
{
|
|
153
|
-
hasMultipleVersions &&
|
|
154
|
-
<div
|
|
155
|
-
id="upgrade-modal"
|
|
156
|
-
class="hidden fixed inset-0 z-50 bg-[rgb(var(--ec-page-bg)/0.8)] backdrop-blur-sm flex items-center justify-center"
|
|
157
|
-
>
|
|
158
|
-
<div class="bg-[rgb(var(--ec-card-bg))] border border-[rgb(var(--ec-page-border))] rounded-lg p-8 max-w-md mx-4 shadow-xl">
|
|
159
|
-
<div class="flex flex-col items-center text-center">
|
|
160
|
-
<div class="flex-shrink-0 mb-4 p-3 bg-[rgb(var(--ec-accent-subtle))] rounded-full">
|
|
161
|
-
<Rocket className="w-10 h-10 text-[rgb(var(--ec-accent))]" />
|
|
162
|
-
</div>
|
|
163
|
-
<h4 class="text-xl font-semibold text-[rgb(var(--ec-page-text))] mb-2">Upgrade to Scale</h4>
|
|
164
|
-
<p class="text-sm text-[rgb(var(--ec-page-text-muted))] mb-6">
|
|
165
|
-
Compare diagram versions side-by-side. Track changes across versions and maintain better documentation governance
|
|
166
|
-
with visual comparisons.
|
|
167
|
-
</p>
|
|
168
|
-
<div class="flex items-center gap-3">
|
|
169
|
-
<a
|
|
170
|
-
href="https://eventcatalog.cloud"
|
|
171
|
-
target="_blank"
|
|
172
|
-
rel="noopener noreferrer"
|
|
173
|
-
class="inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-[rgb(var(--ec-button-text))] bg-[rgb(var(--ec-accent))] rounded-md hover:opacity-90 transition-opacity"
|
|
174
|
-
>
|
|
175
|
-
Start 14-day free trial
|
|
176
|
-
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
177
|
-
<path
|
|
178
|
-
stroke-linecap="round"
|
|
179
|
-
stroke-linejoin="round"
|
|
180
|
-
stroke-width="2"
|
|
181
|
-
d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
|
|
182
|
-
/>
|
|
183
|
-
</svg>
|
|
184
|
-
</a>
|
|
185
|
-
<button
|
|
186
|
-
id="upgrade-close-btn"
|
|
187
|
-
type="button"
|
|
188
|
-
class="px-4 py-2 text-sm font-medium text-[rgb(var(--ec-page-text-muted))] hover:text-[rgb(var(--ec-page-text))] transition-colors"
|
|
189
|
-
>
|
|
190
|
-
Maybe later
|
|
191
|
-
</button>
|
|
192
|
-
</div>
|
|
193
|
-
</div>
|
|
194
|
-
</div>
|
|
195
|
-
</div>
|
|
196
|
-
)
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
{/* Compare modal - shown when Scale is enabled */}
|
|
200
|
-
{
|
|
201
|
-
hasMultipleVersions && scaleEnabled && (
|
|
151
|
+
hasMultipleVersions && (
|
|
202
152
|
<div id="compare-modal" class="hidden fixed inset-0 z-50 bg-[rgb(var(--ec-page-bg))]">
|
|
203
153
|
<div class="flex items-center justify-between px-6 py-3 border-b border-[rgb(var(--ec-page-border))] bg-[rgb(var(--ec-card-bg))]">
|
|
204
154
|
<h2 class="text-sm font-semibold text-[rgb(var(--ec-page-text))]">Compare: {props.data.name}</h2>
|
|
@@ -278,12 +228,10 @@ const chatQuery = `Tell me about the "${props.data.name}" diagram (version ${pro
|
|
|
278
228
|
import { destroyZoomInstances, renderMermaidWithZoom } from '@utils/mermaid-zoom';
|
|
279
229
|
|
|
280
230
|
function initDiagramPage() {
|
|
281
|
-
// Compare modal
|
|
231
|
+
// Compare modal
|
|
282
232
|
const compareBtn = document.getElementById('compare-btn') as HTMLButtonElement;
|
|
283
233
|
const compareModal = document.getElementById('compare-modal');
|
|
284
|
-
const upgradeModal = document.getElementById('upgrade-modal');
|
|
285
234
|
const compareCloseBtn = document.getElementById('compare-close-btn');
|
|
286
|
-
const upgradeCloseBtn = document.getElementById('upgrade-close-btn');
|
|
287
235
|
const leftVersionSelect = document.getElementById('compare-left-version') as HTMLSelectElement;
|
|
288
236
|
const rightVersionSelect = document.getElementById('compare-right-version') as HTMLSelectElement;
|
|
289
237
|
const leftFrame = document.getElementById('compare-left-frame') as HTMLIFrameElement;
|
|
@@ -314,33 +262,11 @@ const chatQuery = `Tell me about the "${props.data.name}" diagram (version ${pro
|
|
|
314
262
|
if (rightFrame) rightFrame.src = '';
|
|
315
263
|
}
|
|
316
264
|
|
|
317
|
-
function openUpgradeModal() {
|
|
318
|
-
if (!upgradeModal) return;
|
|
319
|
-
upgradeModal.classList.remove('hidden');
|
|
320
|
-
document.body.style.overflow = 'hidden';
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
function closeUpgradeModal() {
|
|
324
|
-
if (!upgradeModal) return;
|
|
325
|
-
upgradeModal.classList.add('hidden');
|
|
326
|
-
document.body.style.overflow = '';
|
|
327
|
-
}
|
|
328
|
-
|
|
329
265
|
if (compareBtn) {
|
|
330
|
-
compareBtn.onclick =
|
|
331
|
-
const scaleEnabled = compareBtn.dataset.scaleEnabled === 'true';
|
|
332
|
-
scaleEnabled ? openCompareModal() : openUpgradeModal();
|
|
333
|
-
};
|
|
266
|
+
compareBtn.onclick = openCompareModal;
|
|
334
267
|
}
|
|
335
268
|
|
|
336
269
|
if (compareCloseBtn) compareCloseBtn.onclick = closeCompareModal;
|
|
337
|
-
if (upgradeCloseBtn) upgradeCloseBtn.onclick = closeUpgradeModal;
|
|
338
|
-
|
|
339
|
-
if (upgradeModal) {
|
|
340
|
-
upgradeModal.onclick = (e) => {
|
|
341
|
-
if (e.target === upgradeModal) closeUpgradeModal();
|
|
342
|
-
};
|
|
343
|
-
}
|
|
344
270
|
|
|
345
271
|
if (leftVersionSelect) {
|
|
346
272
|
leftVersionSelect.onchange = () => {
|
|
@@ -356,7 +282,6 @@ const chatQuery = `Tell me about the "${props.data.name}" diagram (version ${pro
|
|
|
356
282
|
document.onkeydown = (e) => {
|
|
357
283
|
if (e.key === 'Escape') {
|
|
358
284
|
if (compareModal && !compareModal.classList.contains('hidden')) closeCompareModal();
|
|
359
|
-
if (upgradeModal && !upgradeModal.classList.contains('hidden')) closeUpgradeModal();
|
|
360
285
|
}
|
|
361
286
|
};
|
|
362
287
|
|
|
@@ -64,7 +64,6 @@ import {
|
|
|
64
64
|
isMarkdownDownloadEnabled,
|
|
65
65
|
isVisualiserEnabled,
|
|
66
66
|
isRSSEnabled,
|
|
67
|
-
isExportPDFEnabled,
|
|
68
67
|
} from '@utils/feature';
|
|
69
68
|
import { getMDXComponentsByName, parseMdxBooleanProp } from '@utils/markdown';
|
|
70
69
|
|
|
@@ -300,12 +299,6 @@ friendlyCollectionName = friendlyCollectionName === 'adr' ? 'architecture decisi
|
|
|
300
299
|
|
|
301
300
|
const schemasForResource = getSchemasFromResource(props);
|
|
302
301
|
|
|
303
|
-
const messageCollections = ['events', 'commands', 'queries'];
|
|
304
|
-
const printUrl =
|
|
305
|
-
isExportPDFEnabled() && messageCollections.includes(props.collection)
|
|
306
|
-
? buildUrl(`/docs/print/${props.collection}/${props.data.id}/${props.data.version}`)
|
|
307
|
-
: undefined;
|
|
308
|
-
|
|
309
302
|
const generatePromptForResource = (props: any) => {
|
|
310
303
|
return `
|
|
311
304
|
Please tell me more about the ${props.collection.slice(0, props.collection.length - 1)} - ${props.data.name} v${props.data.version} in this catalog.
|
|
@@ -465,7 +458,6 @@ if (!isAdrPage && !hasCurrentFlowEmbed && !hasCurrentPageNodeGraph) {
|
|
|
465
458
|
rssFeedEnabled={isRSSEnabled()}
|
|
466
459
|
editUrl={editUrl}
|
|
467
460
|
preferChatAsDefault={isEventCatalogChatEnabled()}
|
|
468
|
-
printUrl={printUrl}
|
|
469
461
|
/>
|
|
470
462
|
</div>
|
|
471
463
|
{
|
|
@@ -1099,10 +1099,10 @@ export const getNestedSideBarData = async (): Promise<NavigationData> => {
|
|
|
1099
1099
|
...(allList ? { 'list:all': allList as NavNode } : {}),
|
|
1100
1100
|
};
|
|
1101
1101
|
|
|
1102
|
-
// System-level views (only show if visualiser is enabled and there are
|
|
1102
|
+
// System-level views (only show if visualiser is enabled and there are systems)
|
|
1103
1103
|
const systemNode: Record<string, NavNode> = {};
|
|
1104
1104
|
|
|
1105
|
-
if (visualiserEnabled &&
|
|
1105
|
+
if (visualiserEnabled && systems.length > 0) {
|
|
1106
1106
|
systemNode['list:system'] = {
|
|
1107
1107
|
type: 'group',
|
|
1108
1108
|
title: 'System',
|
|
@@ -1110,8 +1110,8 @@ export const getNestedSideBarData = async (): Promise<NavigationData> => {
|
|
|
1110
1110
|
pages: [
|
|
1111
1111
|
{
|
|
1112
1112
|
type: 'item',
|
|
1113
|
-
title: '
|
|
1114
|
-
href: buildUrl('/visualiser/
|
|
1113
|
+
title: 'System Context Map',
|
|
1114
|
+
href: buildUrl('/visualiser/system-context-map'),
|
|
1115
1115
|
},
|
|
1116
1116
|
],
|
|
1117
1117
|
};
|
|
@@ -27,9 +27,7 @@ export {
|
|
|
27
27
|
isCustomLandingPageEnabled,
|
|
28
28
|
isAuthEnabled,
|
|
29
29
|
isCustomStylesEnabled,
|
|
30
|
-
isDiagramComparisonEnabled,
|
|
31
30
|
isEventCatalogMCPEnabled,
|
|
32
31
|
isEventCatalogMCPAuthEnabled,
|
|
33
32
|
isIntegrationsEnabled,
|
|
34
|
-
isExportPDFEnabled,
|
|
35
33
|
} from '../enterprise/feature';
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"license": "SEE LICENSE IN LICENSE",
|
|
9
9
|
"type": "module",
|
|
10
|
-
"version": "4.0.0-beta.
|
|
10
|
+
"version": "4.0.0-beta.2",
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
@@ -114,9 +114,9 @@
|
|
|
114
114
|
"update-notifier": "^7.3.1",
|
|
115
115
|
"uuid": "^10.0.0",
|
|
116
116
|
"zod": "^4.3.6",
|
|
117
|
-
"@eventcatalog/
|
|
118
|
-
"@eventcatalog/
|
|
119
|
-
"@eventcatalog/
|
|
117
|
+
"@eventcatalog/linter": "1.1.2-beta.0",
|
|
118
|
+
"@eventcatalog/visualiser": "^4.0.0-beta.0",
|
|
119
|
+
"@eventcatalog/sdk": "2.25.0-beta.0"
|
|
120
120
|
},
|
|
121
121
|
"devDependencies": {
|
|
122
122
|
"@astrojs/check": "^0.9.9",
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Licensed under the EventCatalog Commercial License.
|
|
3
|
-
* See /packages/core/eventcatalog/src/enterprise/LICENSE
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { isSSR } from '@utils/feature';
|
|
7
|
-
import { HybridPage } from '@utils/page-loaders/hybrid-page';
|
|
8
|
-
import type { PageTypes } from '@types';
|
|
9
|
-
import { pageDataLoader } from '@utils/page-loaders/page-data-loader';
|
|
10
|
-
|
|
11
|
-
const messageTypes: PageTypes[] = ['events', 'commands', 'queries'];
|
|
12
|
-
|
|
13
|
-
export class PrintPage extends HybridPage {
|
|
14
|
-
static async getStaticPaths() {
|
|
15
|
-
if (isSSR()) {
|
|
16
|
-
return [];
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const allItems = await Promise.all(messageTypes.map((type) => pageDataLoader[type]()));
|
|
20
|
-
|
|
21
|
-
return allItems.flatMap((items, index) =>
|
|
22
|
-
items.map((item) => ({
|
|
23
|
-
params: {
|
|
24
|
-
type: messageTypes[index],
|
|
25
|
-
id: item.data.id,
|
|
26
|
-
version: item.data.version,
|
|
27
|
-
},
|
|
28
|
-
props: {},
|
|
29
|
-
}))
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
protected static async fetchData(params: any) {
|
|
34
|
-
const { type, id, version } = params;
|
|
35
|
-
|
|
36
|
-
if (!type || !id || !version) {
|
|
37
|
-
return null;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if (!messageTypes.includes(type as PageTypes)) {
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const items = await pageDataLoader[type as PageTypes]();
|
|
45
|
-
const item = items.find((i) => i.data.id === id && i.data.version === version);
|
|
46
|
-
|
|
47
|
-
if (!item) {
|
|
48
|
-
return null;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return {
|
|
52
|
-
type,
|
|
53
|
-
...item,
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
protected static createNotFoundResponse(): Response {
|
|
58
|
-
return new Response(null, {
|
|
59
|
-
status: 404,
|
|
60
|
-
statusText: 'Message not found',
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
}
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { marked } from 'marked';
|
|
3
|
-
|
|
4
|
-
interface Props {
|
|
5
|
-
name: string;
|
|
6
|
-
version: string;
|
|
7
|
-
type: 'event' | 'command' | 'query';
|
|
8
|
-
summary?: string;
|
|
9
|
-
catalogName?: string;
|
|
10
|
-
draft?: boolean | { title?: string; message?: string };
|
|
11
|
-
deprecated?: boolean | { message?: string; date?: string | Date };
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const { name, version, type, summary, catalogName = 'EventCatalog', draft, deprecated } = Astro.props;
|
|
15
|
-
|
|
16
|
-
const isDraft = !!draft;
|
|
17
|
-
const draftMessage = typeof draft === 'object' ? draft.message : undefined;
|
|
18
|
-
const draftMessageHtml = draftMessage ? await marked.parse(draftMessage) : null;
|
|
19
|
-
|
|
20
|
-
const isDeprecated = !!deprecated;
|
|
21
|
-
const deprecatedMessage = typeof deprecated === 'object' ? deprecated.message : undefined;
|
|
22
|
-
const deprecatedMessageHtml = deprecatedMessage ? await marked.parse(deprecatedMessage) : null;
|
|
23
|
-
const deprecatedDate =
|
|
24
|
-
typeof deprecated === 'object' && deprecated.date
|
|
25
|
-
? new Date(deprecated.date).toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' })
|
|
26
|
-
: undefined;
|
|
27
|
-
|
|
28
|
-
const now = new Date();
|
|
29
|
-
const exportDate = now.toLocaleDateString('en-US', {
|
|
30
|
-
year: 'numeric',
|
|
31
|
-
month: 'long',
|
|
32
|
-
day: 'numeric',
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
const badgeColors = {
|
|
36
|
-
event: 'bg-gradient-to-br from-orange-50 to-orange-100 text-orange-700 border-orange-300',
|
|
37
|
-
command: 'bg-gradient-to-br from-blue-50 to-blue-100 text-blue-700 border-blue-300',
|
|
38
|
-
query: 'bg-gradient-to-br from-green-50 to-green-100 text-green-700 border-green-300',
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
const accentColors = {
|
|
42
|
-
event: 'from-orange-500 to-orange-500/50',
|
|
43
|
-
command: 'from-blue-600 to-blue-600/50',
|
|
44
|
-
query: 'from-green-600 to-green-600/50',
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
const typeLabel = type.charAt(0).toUpperCase() + type.slice(1);
|
|
48
|
-
---
|
|
49
|
-
|
|
50
|
-
<header>
|
|
51
|
-
<div class={`h-1 bg-gradient-to-r ${accentColors[type]} rounded-sm mb-7`}></div>
|
|
52
|
-
|
|
53
|
-
<div class="flex justify-between items-start mb-5">
|
|
54
|
-
<div class="flex-1">
|
|
55
|
-
<div class="flex items-center gap-2.5 mb-2.5">
|
|
56
|
-
<span class={`inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-semibold border ${badgeColors[type]}`}>
|
|
57
|
-
{
|
|
58
|
-
type === 'event' && (
|
|
59
|
-
<svg
|
|
60
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
61
|
-
width="12"
|
|
62
|
-
height="12"
|
|
63
|
-
viewBox="0 0 24 24"
|
|
64
|
-
fill="none"
|
|
65
|
-
stroke="currentColor"
|
|
66
|
-
stroke-width="2.5"
|
|
67
|
-
stroke-linecap="round"
|
|
68
|
-
stroke-linejoin="round"
|
|
69
|
-
>
|
|
70
|
-
<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2" />
|
|
71
|
-
</svg>
|
|
72
|
-
)
|
|
73
|
-
}
|
|
74
|
-
{
|
|
75
|
-
type === 'command' && (
|
|
76
|
-
<svg
|
|
77
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
78
|
-
width="12"
|
|
79
|
-
height="12"
|
|
80
|
-
viewBox="0 0 24 24"
|
|
81
|
-
fill="none"
|
|
82
|
-
stroke="currentColor"
|
|
83
|
-
stroke-width="2.5"
|
|
84
|
-
stroke-linecap="round"
|
|
85
|
-
stroke-linejoin="round"
|
|
86
|
-
>
|
|
87
|
-
<path d="m7.9 20A9 9 0 1 0 4 16.1L2 22Z" />
|
|
88
|
-
</svg>
|
|
89
|
-
)
|
|
90
|
-
}
|
|
91
|
-
{
|
|
92
|
-
type === 'query' && (
|
|
93
|
-
<svg
|
|
94
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
95
|
-
width="12"
|
|
96
|
-
height="12"
|
|
97
|
-
viewBox="0 0 24 24"
|
|
98
|
-
fill="none"
|
|
99
|
-
stroke="currentColor"
|
|
100
|
-
stroke-width="2.5"
|
|
101
|
-
stroke-linecap="round"
|
|
102
|
-
stroke-linejoin="round"
|
|
103
|
-
>
|
|
104
|
-
<circle cx="11" cy="11" r="8" />
|
|
105
|
-
<line x1="21" y1="21" x2="16.65" y2="16.65" />
|
|
106
|
-
</svg>
|
|
107
|
-
)
|
|
108
|
-
}
|
|
109
|
-
{typeLabel}
|
|
110
|
-
</span>
|
|
111
|
-
<span class="text-sm font-semibold text-slate-500 bg-slate-100 px-2.5 py-0.5 rounded">v{version}</span>
|
|
112
|
-
</div>
|
|
113
|
-
<h1 class="text-3xl font-extrabold text-slate-900 leading-tight tracking-tight">
|
|
114
|
-
{name}
|
|
115
|
-
</h1>
|
|
116
|
-
</div>
|
|
117
|
-
<div class="text-right shrink-0 ml-8 pt-1">
|
|
118
|
-
<div class="text-[0.6875rem] font-semibold uppercase tracking-wider text-slate-400 mb-0.5">
|
|
119
|
-
{catalogName}
|
|
120
|
-
</div>
|
|
121
|
-
<div class="text-[0.6875rem] text-slate-400">
|
|
122
|
-
{exportDate}
|
|
123
|
-
</div>
|
|
124
|
-
</div>
|
|
125
|
-
</div>
|
|
126
|
-
|
|
127
|
-
{summary && <p class="text-base text-slate-600 mb-6 leading-relaxed max-w-xl">{summary}</p>}
|
|
128
|
-
|
|
129
|
-
{
|
|
130
|
-
isDraft && (
|
|
131
|
-
<div class="px-4 py-3 mb-4 border-2 border-dashed border-amber-400 rounded-lg opacity-75">
|
|
132
|
-
<div>
|
|
133
|
-
<span class="text-sm font-semibold text-amber-700">This message is currently in draft</span>
|
|
134
|
-
{draftMessageHtml ? (
|
|
135
|
-
<div class="text-sm text-slate-600 mt-0.5 prose prose-sm max-w-none" set:html={draftMessageHtml} />
|
|
136
|
-
) : (
|
|
137
|
-
<p class="text-sm text-slate-600 mt-0.5">This document has not been finalized and may be subject to change.</p>
|
|
138
|
-
)}
|
|
139
|
-
</div>
|
|
140
|
-
</div>
|
|
141
|
-
)
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
{
|
|
145
|
-
isDeprecated && (
|
|
146
|
-
<div class="flex items-center gap-3 px-4 py-3 mb-4 bg-red-50 border border-red-200 rounded-lg">
|
|
147
|
-
<span class="inline-flex items-center justify-center w-8 h-8 rounded-full bg-red-100 shrink-0">
|
|
148
|
-
<svg
|
|
149
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
150
|
-
width="16"
|
|
151
|
-
height="16"
|
|
152
|
-
viewBox="0 0 24 24"
|
|
153
|
-
fill="none"
|
|
154
|
-
stroke="currentColor"
|
|
155
|
-
stroke-width="2"
|
|
156
|
-
stroke-linecap="round"
|
|
157
|
-
stroke-linejoin="round"
|
|
158
|
-
class="text-red-600"
|
|
159
|
-
>
|
|
160
|
-
<circle cx="12" cy="12" r="10" />
|
|
161
|
-
<path d="m15 9-6 6" />
|
|
162
|
-
<path d="m9 9 6 6" />
|
|
163
|
-
</svg>
|
|
164
|
-
</span>
|
|
165
|
-
<div>
|
|
166
|
-
<span class="text-sm font-semibold text-red-800">
|
|
167
|
-
This message has been deprecated
|
|
168
|
-
{deprecatedDate && <span class="font-normal text-red-600"> as of {deprecatedDate}</span>}
|
|
169
|
-
</span>
|
|
170
|
-
{deprecatedMessageHtml ? (
|
|
171
|
-
<div class="text-sm text-red-700 mt-0.5 prose prose-sm prose-red max-w-none" set:html={deprecatedMessageHtml} />
|
|
172
|
-
) : (
|
|
173
|
-
<p class="text-sm text-red-700 mt-0.5">
|
|
174
|
-
This message is no longer actively maintained and may be removed in a future version.
|
|
175
|
-
</p>
|
|
176
|
-
)}
|
|
177
|
-
</div>
|
|
178
|
-
</div>
|
|
179
|
-
)
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
<div class="h-px bg-slate-200 mb-8"></div>
|
|
183
|
-
</header>
|