@eventcatalog/core 3.29.2 → 3.31.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-36IA4UE4.js → chunk-7IGMIOQF.js} +1 -1
- package/dist/{chunk-EGQGCB2B.js → chunk-HVOLSUC2.js} +1 -1
- package/dist/{chunk-DB4IQ3GB.js → chunk-LWVHWR77.js} +1 -1
- package/dist/{chunk-VEUNSJ6Z.js → chunk-QIJOBQZ7.js} +1 -1
- package/dist/{chunk-MEJOYC5Z.js → chunk-UY5QDWK7.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/astro.config.mjs +11 -7
- package/eventcatalog/public/logo.png +0 -0
- package/eventcatalog/src/components/CopyAsMarkdown.tsx +29 -24
- package/eventcatalog/src/components/EnvironmentDropdown.tsx +33 -21
- package/eventcatalog/src/components/FieldsExplorer/FieldFilters.tsx +3 -53
- package/eventcatalog/src/components/FieldsExplorer/FieldsExplorer.tsx +144 -91
- package/eventcatalog/src/components/FieldsExplorer/FieldsTable.tsx +112 -109
- package/eventcatalog/src/components/Header.astro +9 -19
- package/eventcatalog/src/components/MDX/Accordion/Accordion.tsx +12 -14
- package/eventcatalog/src/components/MDX/Accordion/AccordionGroup.astro +11 -3
- package/eventcatalog/src/components/MDX/Design/Design.astro +1 -1
- package/eventcatalog/src/components/MDX/ResourceRef/ResourceRef.astro +15 -5
- package/eventcatalog/src/components/MDX/Tiles/Tile.astro +11 -8
- package/eventcatalog/src/components/SchemaExplorer/ApiContentViewer.tsx +164 -53
- package/eventcatalog/src/components/SchemaExplorer/DiffViewer.tsx +1 -1
- package/eventcatalog/src/components/SchemaExplorer/ExamplesViewer.tsx +4 -4
- package/eventcatalog/src/components/SchemaExplorer/Pagination.tsx +12 -10
- package/eventcatalog/src/components/SchemaExplorer/SchemaContentViewer.tsx +48 -77
- package/eventcatalog/src/components/SchemaExplorer/SchemaDetailsPanel.tsx +238 -169
- package/eventcatalog/src/components/SchemaExplorer/SchemaExplorer.tsx +189 -230
- package/eventcatalog/src/components/SchemaExplorer/SchemaListItem.tsx +39 -36
- package/eventcatalog/src/components/Search/Search.astro +1 -1
- package/eventcatalog/src/components/Seo.astro +1 -1
- package/eventcatalog/src/components/Settings/AssistantSettingsForm.tsx +218 -0
- package/eventcatalog/src/components/Settings/BillingSettingsForm.tsx +265 -0
- package/eventcatalog/src/components/Settings/GeneralSettingsForm.tsx +371 -0
- package/eventcatalog/src/components/Settings/LlmAccessSettingsForm.tsx +183 -0
- package/eventcatalog/src/components/Settings/LogoUpload.tsx +137 -0
- package/eventcatalog/src/components/Settings/McpSettingsForm.tsx +91 -0
- package/eventcatalog/src/components/Settings/ReadOnlyBanner.tsx +18 -0
- package/eventcatalog/src/components/Settings/Row.tsx +59 -0
- package/eventcatalog/src/components/Settings/SettingsShared.tsx +176 -0
- package/eventcatalog/src/components/SideNav/NestedSideBar/SearchBar.tsx +3 -3
- package/eventcatalog/src/components/SideNav/NestedSideBar/index.tsx +233 -261
- package/eventcatalog/src/components/Tables/Discover/DiscoverTable.tsx +116 -68
- package/eventcatalog/src/components/Tables/Discover/FilterComponents.tsx +2 -2
- package/eventcatalog/src/components/Tables/Discover/columns.tsx +130 -197
- package/eventcatalog/src/components/Tables/Table.tsx +21 -18
- package/eventcatalog/src/components/Tables/columns/TeamsTableColumns.tsx +79 -131
- package/eventcatalog/src/components/Tables/columns/UserTableColumns.tsx +104 -175
- package/eventcatalog/src/content.config.ts +1 -1
- package/eventcatalog/src/enterprise/auth/error.astro +1 -1
- package/eventcatalog/src/enterprise/auth/login.astro +1 -1
- package/eventcatalog/src/enterprise/auth/middleware/middleware-auth.ts +11 -7
- package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/index.tsx +97 -95
- package/eventcatalog/src/enterprise/custom-documentation/pages/docs/custom/index.astro +232 -181
- package/eventcatalog/src/enterprise/feature.ts +2 -1
- package/eventcatalog/src/enterprise/fields/pages/fields.astro +10 -8
- package/eventcatalog/src/enterprise/integrations/eventcatalog-features.ts +0 -8
- package/eventcatalog/src/layouts/DirectoryLayout.astro +17 -88
- package/eventcatalog/src/layouts/SettingsLayout.astro +116 -0
- package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +562 -141
- package/eventcatalog/src/layouts/VisualiserLayout.astro +7 -2
- package/eventcatalog/src/pages/_index.astro +253 -256
- package/eventcatalog/src/pages/api/settings/ai.ts +57 -0
- package/eventcatalog/src/pages/api/settings/general.ts +71 -0
- package/eventcatalog/src/pages/api/settings/logo.ts +113 -0
- package/eventcatalog/src/pages/architecture/[type]/[id]/[version]/index.astro +3 -3
- package/eventcatalog/src/pages/diagrams/[id]/[version]/index.astro +223 -73
- package/eventcatalog/src/pages/discover/[type]/index.astro +22 -141
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/[docVersion]/index.astro +130 -30
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/index.astro +147 -53
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/asyncapi/[filename].astro +6 -2
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/examples/[...filename].astro +2 -2
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/graphql/[filename].astro +22 -19
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +71 -61
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/spec/[filename].astro +5 -1
- package/eventcatalog/src/pages/docs/[type]/[id]/language/[dictionaryId]/index.astro +3 -3
- package/eventcatalog/src/pages/docs/[type]/[id]/language/index.astro +6 -32
- package/eventcatalog/src/pages/docs/llm/llms.txt.ts +5 -1
- package/eventcatalog/src/pages/docs/teams/[id]/index.astro +11 -4
- package/eventcatalog/src/pages/docs/users/[id]/index.astro +12 -5
- package/eventcatalog/src/pages/schemas/explorer/index.astro +10 -8
- package/eventcatalog/src/pages/settings/assistant.astro +37 -0
- package/eventcatalog/src/pages/settings/billing.astro +17 -0
- package/eventcatalog/src/pages/settings/general.astro +32 -0
- package/eventcatalog/src/pages/settings/index.astro +21 -0
- package/eventcatalog/src/pages/settings/llm-access.astro +34 -0
- package/eventcatalog/src/pages/settings/mcp.astro +14 -0
- package/eventcatalog/src/pages/studio.astro +1 -1
- package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/entity-map/index.astro +2 -7
- package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/index.astro +2 -2
- package/eventcatalog/src/pages/visualiser/domains/[id]/[version]/entity-map/index.astro +2 -7
- package/eventcatalog/src/styles/theme.css +95 -30
- package/eventcatalog/src/styles/themes/forest.css +17 -9
- package/eventcatalog/src/styles/themes/ocean.css +10 -2
- package/eventcatalog/src/styles/themes/sapphire.css +10 -2
- package/eventcatalog/src/styles/themes/sunset.css +25 -17
- package/eventcatalog/src/types/react-syntax-highlighter.d.ts +13 -0
- package/eventcatalog/src/utils/eventcatalog-config/config-schema.ts +49 -0
- package/eventcatalog/src/utils/eventcatalog-config/config-writer.ts +149 -0
- package/eventcatalog/src/utils/url-builder.ts +4 -2
- package/package.json +7 -5
- package/eventcatalog/public/logo.svg +0 -14
- package/eventcatalog/src/enterprise/plans/index.astro +0 -319
- package/eventcatalog/src/pages/docs/llm/llms-services.txt.ts +0 -81
|
@@ -3,9 +3,10 @@ import { render } from 'astro:content';
|
|
|
3
3
|
|
|
4
4
|
import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
5
5
|
import components from '@components/MDX/components';
|
|
6
|
+
import CopyAsMarkdown from '@components/CopyAsMarkdown';
|
|
6
7
|
import { buildUrl } from '@utils/url-builder';
|
|
7
8
|
import { AlignLeftIcon, HistoryIcon } from 'lucide-react';
|
|
8
|
-
import { isResourceDocsEnabled } from '@utils/feature';
|
|
9
|
+
import { isEventCatalogChatEnabled, isResourceDocsEnabled } from '@utils/feature';
|
|
9
10
|
import { getIcon } from '@utils/badges';
|
|
10
11
|
import { collectionToResourceMap } from '@utils/collections/util';
|
|
11
12
|
|
|
@@ -33,6 +34,8 @@ const docsBasePath = `/docs/${props.data.resourceCollection}/${props.data.resour
|
|
|
33
34
|
const singularResourceName =
|
|
34
35
|
collectionToResourceMap[props.data.resourceCollection as keyof typeof collectionToResourceMap] ??
|
|
35
36
|
props.data.resourceCollection.slice(0, props.data.resourceCollection.length - 1);
|
|
37
|
+
const chatEnabled = isEventCatalogChatEnabled();
|
|
38
|
+
const chatQuery = `Tell me about the ${props.data.type} doc "${title}" for ${props.data.resourceId} (version ${props.data.version})`;
|
|
36
39
|
|
|
37
40
|
const pagefindAttributes =
|
|
38
41
|
props.data.version === props.data.latestVersion
|
|
@@ -44,52 +47,48 @@ const pagefindAttributes =
|
|
|
44
47
|
---
|
|
45
48
|
|
|
46
49
|
<VerticalSideBarLayout title={pageTitle} description={props.data.summary}>
|
|
47
|
-
<main class="flex docs-layout h-full bg-[rgb(var(--ec-page-bg))]" {...pagefindAttributes}>
|
|
48
|
-
<div class="flex docs-layout w-full
|
|
49
|
-
<div class="w-full lg:mr-2 pr-
|
|
50
|
-
<div class="border-b border-[rgb(var(--ec-page-border))] pb-
|
|
51
|
-
<
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
class="
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
{props.data.version === props.data.latestVersion && ' (latest)'}
|
|
66
|
-
</span>
|
|
67
|
-
</div>
|
|
68
|
-
{
|
|
69
|
-
props.data.summary && (
|
|
70
|
-
<p class="text-lg pt-2 text-[rgb(var(--ec-page-text-muted))] font-light">{props.data.summary}</p>
|
|
71
|
-
)
|
|
72
|
-
}
|
|
73
|
-
{
|
|
74
|
-
badges.length > 0 && (
|
|
75
|
-
<div class="flex flex-wrap gap-3 pt-4">
|
|
76
|
-
{badges.map((badge: any) => (
|
|
77
|
-
<span
|
|
78
|
-
class={`
|
|
79
|
-
inline-flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium
|
|
80
|
-
bg-[rgb(var(--ec-content-hover))] border border-[rgb(var(--ec-page-border))]
|
|
81
|
-
text-[rgb(var(--ec-page-text))]
|
|
82
|
-
`}
|
|
83
|
-
>
|
|
84
|
-
{badge.iconComponent && (
|
|
85
|
-
<badge.iconComponent className="w-4 h-4 flex-shrink-0 text-[rgb(var(--ec-icon-color))]" />
|
|
86
|
-
)}
|
|
87
|
-
<span>{badge.content}</span>
|
|
88
|
-
</span>
|
|
89
|
-
))}
|
|
50
|
+
<main class="flex docs-layout min-h-full bg-[rgb(var(--ec-page-bg))]" {...pagefindAttributes}>
|
|
51
|
+
<div class="flex docs-layout w-full">
|
|
52
|
+
<div class="w-full lg:mr-2 pr-24 py-8 bg-[rgb(var(--ec-page-bg))]">
|
|
53
|
+
<div class="border-b border-[rgb(var(--ec-page-border))] md:pb-2">
|
|
54
|
+
<div class="flex flex-col gap-4">
|
|
55
|
+
<div class="flex justify-between items-center gap-4">
|
|
56
|
+
<h2 id="doc-page-header" class="text-2xl md:text-4xl font-bold text-[rgb(var(--ec-page-text))]">{title}</h2>
|
|
57
|
+
<div class="hidden lg:block shrink-0">
|
|
58
|
+
<CopyAsMarkdown
|
|
59
|
+
client:only="react"
|
|
60
|
+
schemas={[]}
|
|
61
|
+
chatQuery={chatQuery}
|
|
62
|
+
chatEnabled={chatEnabled}
|
|
63
|
+
editUrl=""
|
|
64
|
+
markdownDownloadEnabled={true}
|
|
65
|
+
rssFeedEnabled={false}
|
|
66
|
+
preferChatAsDefault={false}
|
|
67
|
+
/>
|
|
90
68
|
</div>
|
|
91
|
-
|
|
92
|
-
|
|
69
|
+
</div>
|
|
70
|
+
{props.data.summary && <p class="text-base text-[rgb(var(--ec-page-text-muted))] font-light">{props.data.summary}</p>}
|
|
71
|
+
{
|
|
72
|
+
badges.length > 0 && (
|
|
73
|
+
<div class="flex flex-wrap gap-3 py-4">
|
|
74
|
+
{badges.map((badge: any) => (
|
|
75
|
+
<span
|
|
76
|
+
class={`
|
|
77
|
+
inline-flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium
|
|
78
|
+
bg-[rgb(var(--ec-content-hover))] border border-[rgb(var(--ec-page-border))]
|
|
79
|
+
text-[rgb(var(--ec-page-text))]
|
|
80
|
+
`}
|
|
81
|
+
>
|
|
82
|
+
{badge.iconComponent && (
|
|
83
|
+
<badge.iconComponent className="w-4 h-4 flex-shrink-0 text-[rgb(var(--ec-icon-color))]" />
|
|
84
|
+
)}
|
|
85
|
+
<span>{badge.content}</span>
|
|
86
|
+
</span>
|
|
87
|
+
))}
|
|
88
|
+
</div>
|
|
89
|
+
)
|
|
90
|
+
}
|
|
91
|
+
</div>
|
|
93
92
|
</div>
|
|
94
93
|
<div data-pagefind-ignore>
|
|
95
94
|
{
|
|
@@ -124,27 +123,30 @@ const pagefindAttributes =
|
|
|
124
123
|
)
|
|
125
124
|
}
|
|
126
125
|
</div>
|
|
127
|
-
<div class="prose py-
|
|
126
|
+
<div class="prose py-4 max-w-none">
|
|
128
127
|
<Content components={components(props)} />
|
|
129
128
|
</div>
|
|
130
129
|
</div>
|
|
131
|
-
<aside
|
|
132
|
-
|
|
133
|
-
|
|
130
|
+
<aside
|
|
131
|
+
class="hidden xl:block sticky top-[4rem] self-start w-[280px] max-h-[calc(100vh-4rem)] overflow-y-auto py-2 flex-shrink-0 pr-10 bg-[rgb(var(--ec-page-bg))]"
|
|
132
|
+
>
|
|
133
|
+
<div class="mt-8 space-y-8">
|
|
134
|
+
<h3 class="text-xs text-[rgb(var(--ec-page-text))] font-semibold capitalize flex items-center gap-2 mb-4">
|
|
134
135
|
<AlignLeftIcon className="w-4 h-4" />
|
|
135
136
|
On this page
|
|
136
137
|
</h3>
|
|
137
|
-
<nav class="
|
|
138
|
+
<nav class="text-xs border-l border-[rgb(var(--ec-page-border))]">
|
|
138
139
|
{
|
|
139
140
|
headings.map((heading) => {
|
|
141
|
+
const level = heading.depth > 2 ? heading.depth : 1;
|
|
140
142
|
if (heading.depth > 3) {
|
|
141
143
|
return null;
|
|
142
144
|
}
|
|
143
145
|
return (
|
|
144
146
|
<a
|
|
145
147
|
href={`#${heading.slug}`}
|
|
146
|
-
class={`block
|
|
147
|
-
style={`padding-left: ${
|
|
148
|
+
class={`block py-1.5 pr-2.5 leading-5 text-[rgb(var(--ec-page-text-muted))] hover:border-[rgb(var(--ec-page-border))] hover:text-[rgb(var(--ec-page-text))] border-l-2 border-transparent -ml-px transition-all duration-200`}
|
|
149
|
+
style={`padding-left: ${level * 0.75}rem`}
|
|
148
150
|
>
|
|
149
151
|
{heading.text}
|
|
150
152
|
</a>
|
|
@@ -189,7 +191,99 @@ const pagefindAttributes =
|
|
|
189
191
|
overflow: auto;
|
|
190
192
|
}
|
|
191
193
|
|
|
194
|
+
.toc-active-text {
|
|
195
|
+
color: rgb(var(--ec-accent));
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.toc-active-border {
|
|
199
|
+
border-color: rgb(var(--ec-accent));
|
|
200
|
+
}
|
|
201
|
+
|
|
192
202
|
.version-item:hover {
|
|
193
203
|
background: linear-gradient(to left, rgb(var(--ec-accent-gradient-from)), rgb(var(--ec-accent-gradient-to)));
|
|
194
204
|
}
|
|
195
205
|
</style>
|
|
206
|
+
|
|
207
|
+
<script>
|
|
208
|
+
// @ts-nocheck
|
|
209
|
+
function setupObserver() {
|
|
210
|
+
try {
|
|
211
|
+
const observerOptions = {
|
|
212
|
+
rootMargin: '0px 0px -40% 0px',
|
|
213
|
+
threshold: 0.1,
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
let observerPaused = false;
|
|
217
|
+
|
|
218
|
+
function highlightTocItem(id) {
|
|
219
|
+
document.querySelectorAll('.active-toc-item').forEach((link) => {
|
|
220
|
+
link.classList.remove('active-toc-item', 'toc-active-text', 'font-medium', 'toc-active-border');
|
|
221
|
+
link.classList.add('border-transparent');
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
const tocLink = document.querySelector(`nav a[href="#${id}"]`);
|
|
225
|
+
if (tocLink) {
|
|
226
|
+
tocLink.classList.add('active-toc-item', 'toc-active-text', 'font-medium', 'toc-active-border');
|
|
227
|
+
tocLink.classList.remove('border-transparent');
|
|
228
|
+
|
|
229
|
+
setTimeout(() => {
|
|
230
|
+
tocLink.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'nearest' });
|
|
231
|
+
}, 10);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
const observer = new IntersectionObserver((entries) => {
|
|
236
|
+
if (observerPaused) return;
|
|
237
|
+
|
|
238
|
+
entries.forEach((entry) => {
|
|
239
|
+
const id = entry.target.getAttribute('id');
|
|
240
|
+
if (entry.isIntersecting && id) {
|
|
241
|
+
highlightTocItem(id);
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
}, observerOptions);
|
|
245
|
+
|
|
246
|
+
const prose = document.querySelector('.prose');
|
|
247
|
+
if (!prose) return;
|
|
248
|
+
|
|
249
|
+
const headings = prose.querySelectorAll('h1[id], h2[id], h3[id]');
|
|
250
|
+
|
|
251
|
+
if (headings.length > 0) {
|
|
252
|
+
headings.forEach((heading) => observer.observe(heading));
|
|
253
|
+
} else {
|
|
254
|
+
const allHeadings = prose.querySelectorAll('h1, h2, h3');
|
|
255
|
+
allHeadings.forEach((heading) => {
|
|
256
|
+
if (!heading.id) {
|
|
257
|
+
const text = heading.textContent || '';
|
|
258
|
+
heading.id = text
|
|
259
|
+
.toLowerCase()
|
|
260
|
+
.replace(/[^\w\s-]/g, '')
|
|
261
|
+
.replace(/\s+/g, '-');
|
|
262
|
+
}
|
|
263
|
+
observer.observe(heading);
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
const tocLinks = document.querySelectorAll('nav a[href^="#"]');
|
|
268
|
+
tocLinks.forEach((link) => {
|
|
269
|
+
link.addEventListener('click', () => {
|
|
270
|
+
const hrefAttr = link.getAttribute('href');
|
|
271
|
+
if (!hrefAttr) return;
|
|
272
|
+
|
|
273
|
+
const id = hrefAttr.substring(1);
|
|
274
|
+
highlightTocItem(id);
|
|
275
|
+
|
|
276
|
+
observerPaused = true;
|
|
277
|
+
setTimeout(() => {
|
|
278
|
+
observerPaused = false;
|
|
279
|
+
}, 1000);
|
|
280
|
+
});
|
|
281
|
+
});
|
|
282
|
+
} catch (error) {
|
|
283
|
+
console.error('Error setting up TOC observer:', error);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
setupObserver();
|
|
288
|
+
document.addEventListener('astro:page-load', setupObserver);
|
|
289
|
+
</script>
|
|
@@ -149,7 +149,11 @@ const pagefindAttributes =
|
|
|
149
149
|
---
|
|
150
150
|
|
|
151
151
|
<VerticalSideBarLayout title={pageTitle}>
|
|
152
|
-
<div
|
|
152
|
+
<div
|
|
153
|
+
{...pagefindAttributes}
|
|
154
|
+
class="relative"
|
|
155
|
+
style="margin-left: calc(var(--ec-app-content-padding-left, 5rem) * -1); margin-right: calc(var(--ec-app-content-padding-right, 5rem) * -1);"
|
|
156
|
+
>
|
|
153
157
|
{
|
|
154
158
|
// Currently, Pagefind does not index metadata (such as the title),
|
|
155
159
|
// so we need to ensure it is included as text on the page.
|
|
@@ -173,7 +177,7 @@ const pagefindAttributes =
|
|
|
173
177
|
</div>
|
|
174
178
|
)
|
|
175
179
|
}
|
|
176
|
-
<div id="asyncapi" class="not-prose
|
|
180
|
+
<div id="asyncapi" class="not-prose" set:html={renderedComponent} />
|
|
177
181
|
</div>
|
|
178
182
|
</VerticalSideBarLayout>
|
|
179
183
|
|
|
@@ -16,9 +16,9 @@ const lang = getLanguageForHighlight(example.extension);
|
|
|
16
16
|
---
|
|
17
17
|
|
|
18
18
|
<VerticalSideBarLayout title={pageTitle} description={`Example: ${example.title} for ${data.name}`}>
|
|
19
|
-
<main class="flex sm:px-8 docs-layout h-full">
|
|
19
|
+
<main class="flex sm:px-8 docs-layout min-h-full">
|
|
20
20
|
<div class="flex docs-layout w-full">
|
|
21
|
-
<div class="w-full lg:mr-2 pr-8
|
|
21
|
+
<div class="w-full lg:mr-2 pr-8 py-8">
|
|
22
22
|
<div class="border-b border-[rgb(var(--ec-page-border))] md:pb-4">
|
|
23
23
|
<h1 class="text-2xl md:text-4xl font-bold text-[rgb(var(--ec-page-text))] mb-2">
|
|
24
24
|
{example.title}
|
|
@@ -64,10 +64,10 @@ const pagefindAttributes =
|
|
|
64
64
|
---
|
|
65
65
|
|
|
66
66
|
<VerticalSideBarLayout title={pageTitle} description={`GraphQL schema for ${data.name}`}>
|
|
67
|
-
<main class="flex
|
|
67
|
+
<main class="flex docs-layout min-h-full bg-[rgb(var(--ec-page-bg))]" {...pagefindAttributes}>
|
|
68
68
|
<div class="flex docs-layout w-full">
|
|
69
|
-
<div class="w-full lg:mr-2 pr-8
|
|
70
|
-
<div class="border-b border-[rgb(var(--ec-page-border))] md:pb-
|
|
69
|
+
<div class="w-full lg:mr-2 pr-24 py-8 bg-[rgb(var(--ec-page-bg))]">
|
|
70
|
+
<div class="border-b border-[rgb(var(--ec-page-border))] md:pb-2">
|
|
71
71
|
<div>
|
|
72
72
|
<div class="flex justify-between items-start">
|
|
73
73
|
<div class="flex-1">
|
|
@@ -80,23 +80,26 @@ const pagefindAttributes =
|
|
|
80
80
|
</div>
|
|
81
81
|
|
|
82
82
|
{
|
|
83
|
-
badges && (
|
|
83
|
+
badges && badges.length > 0 && (
|
|
84
84
|
<div class="flex flex-wrap gap-3 py-4">
|
|
85
|
-
{badges.map((badge: any) =>
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
85
|
+
{badges.map((badge: any) => {
|
|
86
|
+
return (
|
|
87
|
+
<span
|
|
88
|
+
id={badge.id || ''}
|
|
89
|
+
class={`
|
|
90
|
+
inline-flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium
|
|
91
|
+
bg-[rgb(var(--ec-content-hover))] border border-[rgb(var(--ec-page-border))]
|
|
92
|
+
text-[rgb(var(--ec-page-text))]
|
|
93
|
+
shadow-xs
|
|
94
|
+
${badge.class ? badge.class : ''}
|
|
95
|
+
`}
|
|
96
|
+
>
|
|
97
|
+
{badge.icon && <badge.icon className="w-4 h-4 flex-shrink-0 text-[rgb(var(--ec-icon-color))]" />}
|
|
98
|
+
{badge.iconURL && <img src={badge.iconURL} class="w-4 h-4 flex-shrink-0 opacity-80" alt="" />}
|
|
99
|
+
<span>{badge.content}</span>
|
|
100
|
+
</span>
|
|
101
|
+
);
|
|
102
|
+
})}
|
|
100
103
|
</div>
|
|
101
104
|
)
|
|
102
105
|
}
|
|
@@ -248,6 +248,7 @@ const {
|
|
|
248
248
|
|
|
249
249
|
let friendlyCollectionName = props.collection.slice(0, props.collection.length - 1);
|
|
250
250
|
friendlyCollectionName = friendlyCollectionName === 'querie' ? 'query' : friendlyCollectionName;
|
|
251
|
+
friendlyCollectionName = friendlyCollectionName === 'entitie' ? 'entity' : friendlyCollectionName;
|
|
251
252
|
|
|
252
253
|
const schemasForResource = getSchemasFromResource(props);
|
|
253
254
|
|
|
@@ -284,41 +285,49 @@ nodeGraphs.push({
|
|
|
284
285
|
---
|
|
285
286
|
|
|
286
287
|
<VerticalSideBarLayout title={pageTitle} description={props.data.summary}>
|
|
287
|
-
<main class="flex docs-layout h-full bg-[rgb(var(--ec-page-bg))]" {...pagefindAttributes}>
|
|
288
|
-
<div class="flex docs-layout w-full
|
|
289
|
-
<div class="w-full lg:mr-2 pr-
|
|
290
|
-
<div class="border-b border-[rgb(var(--ec-page-border))] md:pb-
|
|
288
|
+
<main class="flex docs-layout min-h-full bg-[rgb(var(--ec-page-bg))]" {...pagefindAttributes}>
|
|
289
|
+
<div class="flex docs-layout w-full">
|
|
290
|
+
<div class="w-full lg:mr-2 pr-24 py-8 bg-[rgb(var(--ec-page-bg))]">
|
|
291
|
+
<div class="border-b border-[rgb(var(--ec-page-border))] md:pb-6 pt-4">
|
|
291
292
|
<div>
|
|
292
|
-
<div class="flex justify-between items-
|
|
293
|
-
<div class="flex
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
293
|
+
<div class="flex justify-between items-end">
|
|
294
|
+
<div class="flex flex-col gap-4">
|
|
295
|
+
<span class="text-xs md:text-sm font-semibold text-[rgb(var(--ec-accent))] capitalize">
|
|
296
|
+
{friendlyCollectionName}
|
|
297
|
+
</span>
|
|
298
|
+
<div class="flex items-center gap-3">
|
|
299
|
+
{
|
|
300
|
+
headerIconSrc && (
|
|
301
|
+
<img
|
|
302
|
+
src={headerIconSrc}
|
|
303
|
+
alt={props.data.name}
|
|
304
|
+
class="w-8 h-8 md:w-10 md:h-10 object-contain rounded-md shrink-0"
|
|
305
|
+
/>
|
|
306
|
+
)
|
|
307
|
+
}
|
|
308
|
+
<div class="flex items-center gap-2">
|
|
309
|
+
<h2
|
|
310
|
+
id="doc-page-header"
|
|
311
|
+
class={`text-2xl md:text-4xl font-bold text-[rgb(var(--ec-page-text))] ${props.data.deprecated && hasDeprecated ? 'text-red-500' : ''}`}
|
|
312
|
+
>
|
|
313
|
+
{props.data.name}
|
|
314
|
+
{props.data.latestVersion !== props.data.version && <span>(v{props.data.version})</span>}
|
|
315
|
+
</h2>
|
|
316
|
+
<FavoriteButton
|
|
317
|
+
client:load
|
|
318
|
+
nodeKey={`${collectionToResourceMap[props.collection as keyof typeof collectionToResourceMap]}:${props.data.id}:${props.data.version}`}
|
|
319
|
+
title={props.data.name}
|
|
320
|
+
badge={collectionToResourceMap[props.collection as keyof typeof collectionToResourceMap]
|
|
321
|
+
.charAt(0)
|
|
322
|
+
.toUpperCase() +
|
|
323
|
+
collectionToResourceMap[props.collection as keyof typeof collectionToResourceMap].slice(1)}
|
|
324
|
+
href={buildUrl(`/docs/${props.collection}/${props.data.id}/${props.data.version}`)}
|
|
325
|
+
size="md"
|
|
300
326
|
/>
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
<h2
|
|
304
|
-
id="doc-page-header"
|
|
305
|
-
class={`text-2xl md:text-4xl font-bold text-[rgb(var(--ec-page-text))] ${props.data.deprecated && hasDeprecated ? 'text-red-500' : ''}`}
|
|
306
|
-
>
|
|
307
|
-
{props.data.name}
|
|
308
|
-
{props.data.latestVersion !== props.data.version && <span>(v{props.data.version})</span>}
|
|
309
|
-
</h2>
|
|
310
|
-
<FavoriteButton
|
|
311
|
-
client:load
|
|
312
|
-
nodeKey={`${collectionToResourceMap[props.collection as keyof typeof collectionToResourceMap]}:${props.data.id}:${props.data.version}`}
|
|
313
|
-
title={props.data.name}
|
|
314
|
-
badge={collectionToResourceMap[props.collection as keyof typeof collectionToResourceMap]
|
|
315
|
-
.charAt(0)
|
|
316
|
-
.toUpperCase() + collectionToResourceMap[props.collection as keyof typeof collectionToResourceMap].slice(1)}
|
|
317
|
-
href={buildUrl(`/docs/${props.collection}/${props.data.id}/${props.data.version}`)}
|
|
318
|
-
size="md"
|
|
319
|
-
/>
|
|
327
|
+
</div>
|
|
328
|
+
</div>
|
|
320
329
|
</div>
|
|
321
|
-
<div class="hidden lg:block">
|
|
330
|
+
<div class="hidden lg:block mb-2">
|
|
322
331
|
<CopyAsMarkdown
|
|
323
332
|
client:only="react"
|
|
324
333
|
schemas={schemasForResource}
|
|
@@ -332,6 +341,33 @@ nodeGraphs.push({
|
|
|
332
341
|
/>
|
|
333
342
|
</div>
|
|
334
343
|
</div>
|
|
344
|
+
|
|
345
|
+
<h2 class="text-base pt-4 text-[rgb(var(--ec-page-text-muted))] font-light">{props.data.summary}</h2>
|
|
346
|
+
{
|
|
347
|
+
badges && (
|
|
348
|
+
<div class="flex flex-wrap gap-3 pt-6 pb-2">
|
|
349
|
+
{badges.map((badge: any) => {
|
|
350
|
+
return (
|
|
351
|
+
<span
|
|
352
|
+
id={badge.id || ''}
|
|
353
|
+
class={`
|
|
354
|
+
inline-flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium
|
|
355
|
+
bg-[rgb(var(--ec-content-hover))] border border-[rgb(var(--ec-page-border))]
|
|
356
|
+
text-[rgb(var(--ec-page-text))]
|
|
357
|
+
shadow-xs
|
|
358
|
+
${badge.class ? badge.class : ''}
|
|
359
|
+
`}
|
|
360
|
+
>
|
|
361
|
+
{badge.icon && <badge.icon className="w-4 h-4 flex-shrink-0 text-[rgb(var(--ec-icon-color))]" />}
|
|
362
|
+
{badge.iconURL && <img src={badge.iconURL} class="w-4 h-4 flex-shrink-0 opacity-80" alt="" />}
|
|
363
|
+
<span>{badge.content}</span>
|
|
364
|
+
</span>
|
|
365
|
+
);
|
|
366
|
+
})}
|
|
367
|
+
</div>
|
|
368
|
+
)
|
|
369
|
+
}
|
|
370
|
+
|
|
335
371
|
{
|
|
336
372
|
isMarkedAsDeprecated && hasDeprecated && (
|
|
337
373
|
<Admonition
|
|
@@ -366,32 +402,6 @@ nodeGraphs.push({
|
|
|
366
402
|
)
|
|
367
403
|
}
|
|
368
404
|
|
|
369
|
-
<h2 class="text-lg pt-2 text-[rgb(var(--ec-page-text-muted))] font-light">{props.data.summary}</h2>
|
|
370
|
-
{
|
|
371
|
-
badges && (
|
|
372
|
-
<div class="flex flex-wrap gap-3 py-4">
|
|
373
|
-
{badges.map((badge: any) => {
|
|
374
|
-
return (
|
|
375
|
-
<span
|
|
376
|
-
id={badge.id || ''}
|
|
377
|
-
class={`
|
|
378
|
-
inline-flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium
|
|
379
|
-
bg-[rgb(var(--ec-content-hover))] border border-[rgb(var(--ec-page-border))]
|
|
380
|
-
text-[rgb(var(--ec-page-text))]
|
|
381
|
-
shadow-xs
|
|
382
|
-
${badge.class ? badge.class : ''}
|
|
383
|
-
`}
|
|
384
|
-
>
|
|
385
|
-
{badge.icon && <badge.icon className="w-4 h-4 flex-shrink-0 text-[rgb(var(--ec-icon-color))]" />}
|
|
386
|
-
{badge.iconURL && <img src={badge.iconURL} class="w-4 h-4 flex-shrink-0 opacity-80" alt="" />}
|
|
387
|
-
<span>{badge.content}</span>
|
|
388
|
-
</span>
|
|
389
|
-
);
|
|
390
|
-
})}
|
|
391
|
-
</div>
|
|
392
|
-
)
|
|
393
|
-
}
|
|
394
|
-
|
|
395
405
|
{
|
|
396
406
|
props.data.draft && (
|
|
397
407
|
<Admonition type="warning" title={props.data?.draft?.title || `Draft ${friendlyCollectionName}`}>
|
|
@@ -445,7 +455,7 @@ nodeGraphs.push({
|
|
|
445
455
|
}
|
|
446
456
|
</div>
|
|
447
457
|
|
|
448
|
-
<div class="prose prose-md py-4 w-full">
|
|
458
|
+
<div class="prose prose-md py-4 w-full text-[15px]">
|
|
449
459
|
<Content components={components(props)} />
|
|
450
460
|
</div>
|
|
451
461
|
<div data-pagefind-ignore>
|
|
@@ -501,9 +511,9 @@ nodeGraphs.push({
|
|
|
501
511
|
</div>
|
|
502
512
|
<aside
|
|
503
513
|
id="eventcatalog-docs-sidebar"
|
|
504
|
-
class="hidden xl:block sticky top-
|
|
514
|
+
class="hidden xl:block sticky top-[4rem] self-start w-[280px] max-h-[calc(100vh-4rem)] overflow-y-auto py-2 flex-shrink-0 pr-10 bg-[rgb(var(--ec-page-bg))]"
|
|
505
515
|
>
|
|
506
|
-
<div class="mt-
|
|
516
|
+
<div class="mt-8 space-y-8">
|
|
507
517
|
{
|
|
508
518
|
headings.length > 0 && (
|
|
509
519
|
<div>
|
|
@@ -64,7 +64,11 @@ if (isRemote) {
|
|
|
64
64
|
</p>
|
|
65
65
|
</div>
|
|
66
66
|
) : (
|
|
67
|
-
<div
|
|
67
|
+
<div
|
|
68
|
+
{...pagefindAttributes}
|
|
69
|
+
class="relative"
|
|
70
|
+
style="margin-left: calc(var(--ec-app-content-padding-left, 5rem) * -1); margin-right: calc(var(--ec-app-content-padding-right, 5rem) * -1);"
|
|
71
|
+
>
|
|
68
72
|
{
|
|
69
73
|
// Currently, Pagefind does not index metadata (such as the title),
|
|
70
74
|
// so we need to ensure it is included as text on the page.
|
|
@@ -32,12 +32,12 @@ const badges = [
|
|
|
32
32
|
|
|
33
33
|
<VerticalSideBarLayout title={pageTitle} description={ubiquitousLanguage.summary}>
|
|
34
34
|
<main
|
|
35
|
-
class="flex sm:px-8 docs-layout h-full max-w-7xl bg-[rgb(var(--ec-page-bg))]"
|
|
35
|
+
class="flex sm:px-8 docs-layout min-h-full max-w-7xl bg-[rgb(var(--ec-page-bg))]"
|
|
36
36
|
data-pagefind-body
|
|
37
37
|
data-pagefind-meta={`title:${pageTitle}`}
|
|
38
38
|
>
|
|
39
39
|
<div class="flex docs-layout w-full">
|
|
40
|
-
<div class="w-full lg:mr-2 pr-8
|
|
40
|
+
<div class="w-full lg:mr-2 pr-8 py-8 min-h-[50em]">
|
|
41
41
|
{/* Breadcrumb */}
|
|
42
42
|
<nav class="mb-4 flex items-center space-x-2 text-sm text-[rgb(var(--ec-page-text-muted))]" aria-label="Breadcrumb">
|
|
43
43
|
<a
|
|
@@ -77,7 +77,7 @@ const badges = [
|
|
|
77
77
|
<p class="text-lg pt-2 text-[rgb(var(--ec-page-text-muted))] font-light">{ubiquitousLanguage.summary}</p>
|
|
78
78
|
<!-- Add badge -->
|
|
79
79
|
{
|
|
80
|
-
badges && (
|
|
80
|
+
badges && badges.length > 0 && (
|
|
81
81
|
<div class="flex flex-wrap gap-3 py-4">
|
|
82
82
|
{badges.map((badge: any) => {
|
|
83
83
|
return (
|