@eventcatalog/core 3.0.0 → 3.2.0
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-VO5WYA44.js → chunk-AA47DJ43.js} +1 -1
- package/dist/{chunk-EKGR533N.js → chunk-GGRXP5WM.js} +1 -1
- package/dist/{chunk-E5Q7TZYT.js → chunk-L3QRQT7U.js} +1 -1
- package/dist/{chunk-BYP43AAT.js → chunk-RWYEP5SD.js} +1 -1
- package/dist/{chunk-KF5PARQK.js → chunk-VPQCMMRM.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 +7 -0
- package/dist/eventcatalog.config.d.ts +7 -0
- 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 +520 -247
- package/eventcatalog/src/components/ChatPanel/ChatPanelButton.tsx +3 -3
- package/eventcatalog/src/components/Checkbox.astro +7 -4
- package/eventcatalog/src/components/CopyAsMarkdown.tsx +15 -15
- package/eventcatalog/src/components/EnvironmentDropdown.tsx +15 -7
- package/eventcatalog/src/components/FavoriteButton.tsx +1 -1
- package/eventcatalog/src/components/Grids/DomainGrid.tsx +72 -60
- package/eventcatalog/src/components/Grids/MessageGrid.tsx +68 -48
- package/eventcatalog/src/components/Header.astro +15 -10
- package/eventcatalog/src/components/Lists/OwnersList.tsx +17 -10
- package/eventcatalog/src/components/Lists/PillListFlat.styles.css +12 -0
- package/eventcatalog/src/components/Lists/PillListFlat.tsx +15 -15
- package/eventcatalog/src/components/Lists/VersionList.astro +15 -5
- package/eventcatalog/src/components/MDX/Accordion/Accordion.tsx +3 -3
- package/eventcatalog/src/components/MDX/Admonition.tsx +49 -9
- package/eventcatalog/src/components/MDX/Attachments.astro +15 -11
- package/eventcatalog/src/components/MDX/ChannelInformation/ChannelInformation.tsx +29 -15
- package/eventcatalog/src/components/MDX/EntityPropertiesTable/EntityPropertiesTable.astro +20 -13
- package/eventcatalog/src/components/MDX/Link/Link.astro +1 -1
- package/eventcatalog/src/components/MDX/MessageTable/MessageTable.client.tsx +50 -29
- package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.tsx +14 -12
- package/eventcatalog/src/components/MDX/NodeGraph/StepWalkthrough.tsx +4 -4
- package/eventcatalog/src/components/MDX/NodeGraph/StudioModal.tsx +4 -4
- package/eventcatalog/src/components/MDX/NodeGraph/VisualiserSearch.tsx +2 -2
- package/eventcatalog/src/components/MDX/ResourceGroupTable/ResourceGroupTable.client.tsx +54 -33
- package/eventcatalog/src/components/MDX/ResourceLink/ResourceLink.astro +1 -1
- package/eventcatalog/src/components/MDX/Steps/Step.astro +2 -2
- package/eventcatalog/src/components/MDX/Steps/Steps.astro +3 -3
- package/eventcatalog/src/components/MDX/Tabs/Tabs.astro +13 -9
- package/eventcatalog/src/components/MDX/Tiles/Tile.astro +25 -13
- package/eventcatalog/src/components/MDX/Tiles/Tiles.astro +1 -1
- package/eventcatalog/src/components/SchemaExplorer/ApiAccessSection.tsx +3 -3
- package/eventcatalog/src/components/SchemaExplorer/ApiContentViewer.tsx +3 -3
- package/eventcatalog/src/components/SchemaExplorer/AvroSchemaViewer.tsx +29 -25
- package/eventcatalog/src/components/SchemaExplorer/DiffViewer.tsx +3 -3
- package/eventcatalog/src/components/SchemaExplorer/JSONSchemaViewer.tsx +61 -42
- package/eventcatalog/src/components/SchemaExplorer/OwnersSection.tsx +13 -9
- package/eventcatalog/src/components/SchemaExplorer/Pagination.tsx +6 -4
- package/eventcatalog/src/components/SchemaExplorer/ProducersConsumersSection.tsx +17 -13
- package/eventcatalog/src/components/SchemaExplorer/SchemaContentViewer.tsx +35 -8
- package/eventcatalog/src/components/SchemaExplorer/SchemaDetailsHeader.tsx +33 -21
- package/eventcatalog/src/components/SchemaExplorer/SchemaDetailsPanel.tsx +1 -1
- package/eventcatalog/src/components/SchemaExplorer/SchemaExplorer.tsx +41 -33
- package/eventcatalog/src/components/SchemaExplorer/SchemaListItem.tsx +19 -7
- package/eventcatalog/src/components/SchemaExplorer/SchemaViewerModal.tsx +8 -8
- package/eventcatalog/src/components/Search/Search.astro +3 -3
- package/eventcatalog/src/components/Search/SearchModal.tsx +65 -36
- package/eventcatalog/src/components/SideNav/NestedSideBar/SearchBar.tsx +31 -21
- package/eventcatalog/src/components/SideNav/NestedSideBar/index.tsx +92 -59
- package/eventcatalog/src/components/Tables/Table.tsx +25 -24
- package/eventcatalog/src/components/Tables/columns/ContainersTableColumns.tsx +22 -16
- package/eventcatalog/src/components/Tables/columns/DomainTableColumns.tsx +14 -11
- package/eventcatalog/src/components/Tables/columns/FlowTableColumns.tsx +6 -6
- package/eventcatalog/src/components/Tables/columns/MessageTableColumns.tsx +22 -16
- package/eventcatalog/src/components/Tables/columns/ServiceTableColumns.tsx +22 -16
- package/eventcatalog/src/components/Tables/columns/SharedColumns.tsx +4 -4
- package/eventcatalog/src/components/Tables/columns/TeamsTableColumns.tsx +21 -13
- package/eventcatalog/src/components/Tables/columns/UserTableColumns.tsx +30 -19
- package/eventcatalog/src/components/ThemeToggle.tsx +18 -0
- package/eventcatalog/src/enterprise/ai/chat-api.ts +24 -3
- package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/components/NestedItem.tsx +15 -7
- package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/components/NoResultsFound.tsx +2 -2
- package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/index.tsx +19 -15
- package/eventcatalog/src/enterprise/custom-documentation/pages/docs/custom/index.astro +50 -17
- package/eventcatalog/src/layouts/DirectoryLayout.astro +11 -6
- package/eventcatalog/src/layouts/DiscoverLayout.astro +13 -8
- package/eventcatalog/src/layouts/Footer.astro +6 -6
- package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +62 -14
- package/eventcatalog/src/pages/_index.astro +135 -179
- package/eventcatalog/src/pages/architecture/[type]/[id]/[version]/index.astro +2 -2
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/graphql/[filename].astro +4 -4
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +77 -63
- package/eventcatalog/src/pages/docs/[type]/[id]/language/[dictionaryId]/index.astro +23 -24
- package/eventcatalog/src/pages/docs/[type]/[id]/language/index.astro +66 -50
- package/eventcatalog/src/pages/docs/custom/index.astro +2 -2
- package/eventcatalog/src/pages/docs/teams/[id]/index.astro +25 -21
- package/eventcatalog/src/pages/docs/users/[id]/index.astro +25 -21
- package/eventcatalog/src/pages/schemas/explorer/index.astro +1 -1
- package/eventcatalog/src/pages/studio.astro +59 -31
- package/eventcatalog/src/remark-plugins/directives.ts +6 -6
- package/eventcatalog/src/remark-plugins/mermaid.ts +2 -2
- package/eventcatalog/src/stores/theme-store.ts +93 -0
- package/eventcatalog/src/styles/theme.css +255 -0
- package/eventcatalog/src/styles/themes/forest.css +230 -0
- package/eventcatalog/src/styles/themes/ocean.css +235 -0
- package/eventcatalog/src/styles/themes/sapphire.css +230 -0
- package/eventcatalog/src/styles/themes/sunset.css +230 -0
- package/eventcatalog/src/utils/feature.ts +4 -0
- package/eventcatalog/tailwind.config.mjs +6 -3
- package/package.json +7 -6
|
@@ -71,18 +71,16 @@ const getContentBadges = () =>
|
|
|
71
71
|
|
|
72
72
|
const getBadge = () => {
|
|
73
73
|
if (props.collection === 'services') {
|
|
74
|
-
return [{ backgroundColor: 'pink', textColor: 'pink', content: 'Service', icon: ServerIcon
|
|
74
|
+
return [{ backgroundColor: 'pink', textColor: 'pink', content: 'Service', icon: ServerIcon }];
|
|
75
75
|
}
|
|
76
76
|
if (props.collection === 'events') {
|
|
77
|
-
return [{ backgroundColor: 'orange', textColor: 'orange', content: 'Event', icon: BoltIcon
|
|
77
|
+
return [{ backgroundColor: 'orange', textColor: 'orange', content: 'Event', icon: BoltIcon }];
|
|
78
78
|
}
|
|
79
79
|
if (props.collection === 'commands') {
|
|
80
|
-
return [{ backgroundColor: 'blue', textColor: 'blue', content: 'Command', icon: ChatBubbleLeftIcon
|
|
80
|
+
return [{ backgroundColor: 'blue', textColor: 'blue', content: 'Command', icon: ChatBubbleLeftIcon }];
|
|
81
81
|
}
|
|
82
82
|
if (props.collection === 'queries') {
|
|
83
|
-
return [
|
|
84
|
-
{ backgroundColor: 'green', textColor: 'green', content: 'Query', icon: MagnifyingGlassIcon, class: 'text-green-600' },
|
|
85
|
-
];
|
|
83
|
+
return [{ backgroundColor: 'green', textColor: 'green', content: 'Query', icon: MagnifyingGlassIcon }];
|
|
86
84
|
}
|
|
87
85
|
if (props.collection === 'domains') {
|
|
88
86
|
return [
|
|
@@ -91,24 +89,23 @@ const getBadge = () => {
|
|
|
91
89
|
textColor: 'yellow',
|
|
92
90
|
content: 'Domain',
|
|
93
91
|
icon: RectangleGroupIcon,
|
|
94
|
-
class: 'text-yellow-600',
|
|
95
92
|
},
|
|
96
93
|
];
|
|
97
94
|
}
|
|
98
95
|
|
|
99
96
|
if (props.collection === 'flows') {
|
|
100
|
-
return [{ backgroundColor: 'teal', textColor: 'teal', content: 'Flow', icon: QueueListIcon
|
|
97
|
+
return [{ backgroundColor: 'teal', textColor: 'teal', content: 'Flow', icon: QueueListIcon }];
|
|
101
98
|
}
|
|
102
99
|
|
|
103
100
|
if (props.collection === 'channels') {
|
|
104
|
-
return [{ backgroundColor: 'teal', textColor: 'teal', content: 'Channel', icon: ArrowsRightLeftIcon
|
|
101
|
+
return [{ backgroundColor: 'teal', textColor: 'teal', content: 'Channel', icon: ArrowsRightLeftIcon }];
|
|
105
102
|
}
|
|
106
103
|
|
|
107
104
|
if (props.collection === 'containers') {
|
|
108
105
|
const badges = [];
|
|
109
106
|
const content = props.data.container_type?.charAt(0).toUpperCase() + props.data.container_type?.slice(1) || 'Database';
|
|
110
107
|
|
|
111
|
-
badges.push({ backgroundColor: 'blue', textColor: 'blue', content: content, icon: DatabaseIcon
|
|
108
|
+
badges.push({ backgroundColor: 'blue', textColor: 'blue', content: content, icon: DatabaseIcon });
|
|
112
109
|
|
|
113
110
|
if (props.data?.technology) {
|
|
114
111
|
badges.push({
|
|
@@ -182,7 +179,7 @@ const getSpecificationBadges = () => {
|
|
|
182
179
|
textColor: 'gray',
|
|
183
180
|
content: spec.name || 'OpenAPI Spec',
|
|
184
181
|
iconURL: buildUrl('/icons/openapi.svg', true),
|
|
185
|
-
class: 'text-
|
|
182
|
+
class: 'text-[rgb(var(--ec-page-text))] hover:underline',
|
|
186
183
|
id: 'open-api-badge',
|
|
187
184
|
url: buildUrl(`/docs/${props.collection}/${props.data.id}/${props.data.version}/spec/${spec.filenameWithoutExtension}`),
|
|
188
185
|
});
|
|
@@ -196,7 +193,7 @@ const getSpecificationBadges = () => {
|
|
|
196
193
|
textColor: 'gray',
|
|
197
194
|
content: spec.name || 'AsyncAPI Spec',
|
|
198
195
|
iconURL: buildUrl('/icons/asyncapi.svg', true),
|
|
199
|
-
class: 'text-
|
|
196
|
+
class: 'text-[rgb(var(--ec-page-text))] hover:underline',
|
|
200
197
|
id: 'asyncapi-badge',
|
|
201
198
|
url: buildUrl(
|
|
202
199
|
`/docs/${props.collection}/${props.data.id}/${props.data.version}/asyncapi/${spec.filenameWithoutExtension}`
|
|
@@ -212,7 +209,7 @@ const getSpecificationBadges = () => {
|
|
|
212
209
|
textColor: 'gray',
|
|
213
210
|
content: spec.name || 'GraphQL Spec',
|
|
214
211
|
iconURL: buildUrl('/icons/graphql.svg', true),
|
|
215
|
-
class: 'text-
|
|
212
|
+
class: 'text-[rgb(var(--ec-page-text))] hover:underline',
|
|
216
213
|
id: 'graphql-badge',
|
|
217
214
|
url: buildUrl(
|
|
218
215
|
`/docs/${props.collection}/${props.data.id}/${props.data.version}/graphql/${spec.filenameWithoutExtension}`
|
|
@@ -274,16 +271,16 @@ nodeGraphs.push({
|
|
|
274
271
|
---
|
|
275
272
|
|
|
276
273
|
<VerticalSideBarLayout title={pageTitle} description={props.data.summary}>
|
|
277
|
-
<main class="flex docs-layout h-full" {...pagefindAttributes}>
|
|
274
|
+
<main class="flex docs-layout h-full bg-[rgb(var(--ec-page-bg))]" {...pagefindAttributes}>
|
|
278
275
|
<div class="flex docs-layout w-full pl-16">
|
|
279
|
-
<div class="w-full lg:mr-2 pr-8 overflow-y-auto py-8">
|
|
280
|
-
<div class="border-b border-
|
|
276
|
+
<div class="w-full lg:mr-2 pr-8 overflow-y-auto py-8 bg-[rgb(var(--ec-page-bg))]">
|
|
277
|
+
<div class="border-b border-[rgb(var(--ec-page-border))] md:pb-2">
|
|
281
278
|
<div>
|
|
282
279
|
<div class="flex justify-between items-center">
|
|
283
280
|
<div class="flex items-center gap-2">
|
|
284
281
|
<h2
|
|
285
282
|
id="doc-page-header"
|
|
286
|
-
class={`text-2xl md:text-4xl font-bold text-
|
|
283
|
+
class={`text-2xl md:text-4xl font-bold text-[rgb(var(--ec-page-text))] ${props.data.deprecated && hasDeprecated ? 'text-red-500' : ''}`}
|
|
287
284
|
>
|
|
288
285
|
{props.data.name}
|
|
289
286
|
{props.data.latestVersion !== props.data.version && <span>(v{props.data.version})</span>}
|
|
@@ -345,42 +342,26 @@ nodeGraphs.push({
|
|
|
345
342
|
)
|
|
346
343
|
}
|
|
347
344
|
|
|
348
|
-
<h2 class="text-lg pt-2 text-
|
|
345
|
+
<h2 class="text-lg pt-2 text-[rgb(var(--ec-page-text-muted))] font-light">{props.data.summary}</h2>
|
|
349
346
|
{
|
|
350
347
|
badges && (
|
|
351
348
|
<div class="flex flex-wrap gap-3 py-4">
|
|
352
349
|
{badges.map((badge: any) => {
|
|
353
350
|
return (
|
|
354
|
-
<
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
>
|
|
367
|
-
|
|
368
|
-
<badge.icon
|
|
369
|
-
className={`w-4 h-4 flex-shrink-0 text-${badge.textColor || 'gray'}-600 group-hover:text-${badge.textColor || 'purple'}-700 transition-colors duration-200`}
|
|
370
|
-
/>
|
|
371
|
-
)}
|
|
372
|
-
{badge.iconURL && (
|
|
373
|
-
<img
|
|
374
|
-
src={badge.iconURL}
|
|
375
|
-
class="w-4 h-4 flex-shrink-0 opacity-80 group-hover:opacity-100 transition-opacity duration-200"
|
|
376
|
-
alt=""
|
|
377
|
-
/>
|
|
378
|
-
)}
|
|
379
|
-
<span class={`group-hover:text-${badge.textColor || 'purple'}-800 transition-colors duration-200`}>
|
|
380
|
-
{badge.content}
|
|
381
|
-
</span>
|
|
382
|
-
</span>
|
|
383
|
-
</a>
|
|
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-sm
|
|
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>
|
|
384
365
|
);
|
|
385
366
|
})}
|
|
386
367
|
</div>
|
|
@@ -407,10 +388,10 @@ nodeGraphs.push({
|
|
|
407
388
|
<div data-pagefind-ignore>
|
|
408
389
|
{
|
|
409
390
|
props.data.version !== props.data.latestVersion && (
|
|
410
|
-
<div class="rounded-md bg-
|
|
391
|
+
<div class="rounded-md bg-[rgb(var(--ec-accent-subtle))] p-4 not-prose my-4">
|
|
411
392
|
<div class="flex">
|
|
412
393
|
<div class="flex-shrink-0">
|
|
413
|
-
<svg class="h-5 w-5 text-
|
|
394
|
+
<svg class="h-5 w-5 text-[rgb(var(--ec-accent))]" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
414
395
|
<path
|
|
415
396
|
fill-rule="evenodd"
|
|
416
397
|
d="M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z"
|
|
@@ -419,8 +400,8 @@ nodeGraphs.push({
|
|
|
419
400
|
</svg>
|
|
420
401
|
</div>
|
|
421
402
|
<div class="ml-3">
|
|
422
|
-
<h3 class="text-sm font-medium text-
|
|
423
|
-
<div class="mt-2 text-sm text-
|
|
403
|
+
<h3 class="text-sm font-medium text-[rgb(var(--ec-accent-text))]">New version found</h3>
|
|
404
|
+
<div class="mt-2 text-sm text-[rgb(var(--ec-accent-text))]">
|
|
424
405
|
<p>
|
|
425
406
|
You are looking at a previous version of the {props.collection.slice(0, props.collection.length - 1)}{' '}
|
|
426
407
|
<strong>{props.data.name}</strong>.{' '}
|
|
@@ -482,7 +463,10 @@ nodeGraphs.push({
|
|
|
482
463
|
{
|
|
483
464
|
editUrl && (
|
|
484
465
|
<div class="flex justify-end">
|
|
485
|
-
<a
|
|
466
|
+
<a
|
|
467
|
+
href={editUrl}
|
|
468
|
+
class="text-sm text-[rgb(var(--ec-page-text-muted))] hover:text-[rgb(var(--ec-page-text))] border border-[rgb(var(--ec-page-border))] rounded-md p-2"
|
|
469
|
+
>
|
|
486
470
|
<SquarePenIcon className="w-4 h-4 inline-block mr-1" />
|
|
487
471
|
Edit this page
|
|
488
472
|
</a>
|
|
@@ -493,18 +477,18 @@ nodeGraphs.push({
|
|
|
493
477
|
</div>
|
|
494
478
|
<aside
|
|
495
479
|
id="eventcatalog-docs-sidebar"
|
|
496
|
-
class="hidden xl:block sticky top-0 pb-10 w-[280px] overflow-y-auto py-2 flex-shrink-0 pr-10"
|
|
480
|
+
class="hidden xl:block sticky top-0 pb-10 w-[280px] overflow-y-auto py-2 flex-shrink-0 pr-10 bg-[rgb(var(--ec-page-bg))]"
|
|
497
481
|
>
|
|
498
482
|
<div class="mt-4 space-y-8">
|
|
499
483
|
{
|
|
500
484
|
headings.length > 0 && (
|
|
501
485
|
<div>
|
|
502
|
-
<h3 class="text-xs text-
|
|
486
|
+
<h3 class="text-xs text-[rgb(var(--ec-page-text))] font-semibold group-data-[hover]:text-[rgb(var(--ec-page-text))]/80 capitalize flex items-center gap-2 mb-4">
|
|
503
487
|
<AlignLeft className="w-4 h-4" />
|
|
504
488
|
On this page
|
|
505
489
|
</h3>
|
|
506
490
|
<div class="space-y-8">
|
|
507
|
-
<nav class="text-xs border-l border-
|
|
491
|
+
<nav class="text-xs border-l border-[rgb(var(--ec-page-border))]">
|
|
508
492
|
{headings.map((heading) => {
|
|
509
493
|
const level = heading.depth > 2 ? heading.depth : 1;
|
|
510
494
|
if (heading.depth > 3) {
|
|
@@ -513,7 +497,7 @@ nodeGraphs.push({
|
|
|
513
497
|
return (
|
|
514
498
|
<a
|
|
515
499
|
href={`#${heading.slug}`}
|
|
516
|
-
class={`block py-1.5 pr-2.5 leading-5 text-
|
|
500
|
+
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`}
|
|
517
501
|
style={`padding-left: ${level * 0.75}rem`}
|
|
518
502
|
>
|
|
519
503
|
{heading.text}
|
|
@@ -539,7 +523,7 @@ nodeGraphs.push({
|
|
|
539
523
|
isChangelogEnabled() && shouldRenderSideBarSection(props, 'changelog') && (
|
|
540
524
|
<a
|
|
541
525
|
href={buildUrl(`/docs/${props.collection}/${props.data.id}/${props.data.latestVersion}/changelog`)}
|
|
542
|
-
class="text-xs text-
|
|
526
|
+
class="text-xs text-[rgb(var(--ec-page-text-muted))] underline hover:text-[rgb(var(--ec-page-text))]"
|
|
543
527
|
>
|
|
544
528
|
<span class="block">Read changelog →</span>
|
|
545
529
|
</a>
|
|
@@ -565,6 +549,14 @@ nodeGraphs.push({
|
|
|
565
549
|
margin: 0;
|
|
566
550
|
/* width: 100px !important; */
|
|
567
551
|
}
|
|
552
|
+
|
|
553
|
+
/* TOC active state styles using accent variables */
|
|
554
|
+
.toc-active-text {
|
|
555
|
+
color: rgb(var(--ec-accent));
|
|
556
|
+
}
|
|
557
|
+
.toc-active-border {
|
|
558
|
+
border-color: rgb(var(--ec-accent));
|
|
559
|
+
}
|
|
568
560
|
</style>
|
|
569
561
|
|
|
570
562
|
<script define:vars={{ props, config }}>
|
|
@@ -615,6 +607,27 @@ nodeGraphs.push({
|
|
|
615
607
|
}
|
|
616
608
|
}
|
|
617
609
|
|
|
610
|
+
// Detect current theme from data-theme attribute
|
|
611
|
+
const isDarkMode = document.documentElement.getAttribute('data-theme') === 'dark';
|
|
612
|
+
const currentTheme = isDarkMode ? 'dark' : 'default';
|
|
613
|
+
|
|
614
|
+
// Custom theme variables for better readability in dark mode
|
|
615
|
+
const darkThemeVariables = {
|
|
616
|
+
// Sequence diagram - improve text contrast
|
|
617
|
+
signalColor: '#f0f6fc',
|
|
618
|
+
signalTextColor: '#f0f6fc',
|
|
619
|
+
actorTextColor: '#0d1117',
|
|
620
|
+
actorBkg: '#f0f6fc',
|
|
621
|
+
actorBorder: '#484f58',
|
|
622
|
+
actorLineColor: '#6b7280',
|
|
623
|
+
// General text colors
|
|
624
|
+
primaryTextColor: '#f0f6fc',
|
|
625
|
+
secondaryTextColor: '#c9d1d9',
|
|
626
|
+
tertiaryTextColor: '#f0f6fc',
|
|
627
|
+
// Line colors
|
|
628
|
+
lineColor: '#6b7280',
|
|
629
|
+
};
|
|
630
|
+
|
|
618
631
|
mermaid.initialize({
|
|
619
632
|
// fontSize: 2,
|
|
620
633
|
flowchart: {
|
|
@@ -625,7 +638,8 @@ nodeGraphs.push({
|
|
|
625
638
|
startOnLoad: false,
|
|
626
639
|
fontFamily: 'var(--sans-font)',
|
|
627
640
|
// @ts-ignore This works, but TS expects a enum for some reason
|
|
628
|
-
theme:
|
|
641
|
+
theme: currentTheme,
|
|
642
|
+
themeVariables: isDarkMode ? darkThemeVariables : undefined,
|
|
629
643
|
architecture: {
|
|
630
644
|
useMaxWidth: true,
|
|
631
645
|
},
|
|
@@ -729,15 +743,15 @@ nodeGraphs.push({
|
|
|
729
743
|
function highlightTocItem(id) {
|
|
730
744
|
// Remove active class from all links
|
|
731
745
|
document.querySelectorAll('.active-toc-item').forEach((link) => {
|
|
732
|
-
link.classList.remove('active-toc-item', '
|
|
733
|
-
link.classList.add('
|
|
746
|
+
link.classList.remove('active-toc-item', 'toc-active-text', 'font-medium', 'toc-active-border');
|
|
747
|
+
link.classList.add('border-transparent');
|
|
734
748
|
});
|
|
735
749
|
|
|
736
750
|
// Add active class to current link
|
|
737
751
|
const tocLink = document.querySelector(`nav a[href="#${id}"]`);
|
|
738
752
|
if (tocLink) {
|
|
739
|
-
tocLink.classList.add('active-toc-item', '
|
|
740
|
-
tocLink.classList.remove('
|
|
753
|
+
tocLink.classList.add('active-toc-item', 'toc-active-text', 'font-medium', 'toc-active-border');
|
|
754
|
+
tocLink.classList.remove('border-transparent');
|
|
741
755
|
|
|
742
756
|
// Scroll the highlighted item into view with a small delay to ensure DOM updates first
|
|
743
757
|
setTimeout(() => {
|
|
@@ -24,25 +24,25 @@ marked.setOptions({
|
|
|
24
24
|
|
|
25
25
|
const badges = [
|
|
26
26
|
{
|
|
27
|
-
backgroundColor: 'yellow',
|
|
28
|
-
textColor: 'yellow',
|
|
29
27
|
content: props.domain.name,
|
|
30
28
|
icon: RectangleGroupIcon,
|
|
31
|
-
class: 'text-yellow-400',
|
|
32
|
-
href: buildUrl(`/docs/${props.type}/${props.domainId}`),
|
|
33
29
|
},
|
|
34
30
|
];
|
|
35
31
|
---
|
|
36
32
|
|
|
37
33
|
<VerticalSideBarLayout title={pageTitle} description={ubiquitousLanguage.summary}>
|
|
38
|
-
<main
|
|
34
|
+
<main
|
|
35
|
+
class="flex sm:px-8 docs-layout h-full max-w-7xl bg-[rgb(var(--ec-page-bg))]"
|
|
36
|
+
data-pagefind-body
|
|
37
|
+
data-pagefind-meta={`title:${pageTitle}`}
|
|
38
|
+
>
|
|
39
39
|
<div class="flex docs-layout w-full">
|
|
40
40
|
<div class="w-full lg:mr-2 pr-8 overflow-y-auto py-8 min-h-[50em]">
|
|
41
41
|
{/* Breadcrumb */}
|
|
42
|
-
<nav class="mb-4 flex items-center space-x-2 text-sm text-
|
|
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
|
|
44
44
|
href={buildUrl(`/docs/${props.type}/${props.domainId}/${props.domain.latestVersion}`)}
|
|
45
|
-
class="hover:text-
|
|
45
|
+
class="hover:text-[rgb(var(--ec-page-text))] hover:underline flex items-center gap-2"
|
|
46
46
|
>
|
|
47
47
|
<RectangleGroupIcon className="h-4 w-4" />
|
|
48
48
|
{props.domain.name}
|
|
@@ -52,7 +52,7 @@ const badges = [
|
|
|
52
52
|
</svg>
|
|
53
53
|
<a
|
|
54
54
|
href={buildUrl(`/docs/${props.type}/${props.domainId}/language`)}
|
|
55
|
-
class="hover:text-
|
|
55
|
+
class="hover:text-[rgb(var(--ec-page-text))] hover:underline flex items-center gap-2"
|
|
56
56
|
>
|
|
57
57
|
{
|
|
58
58
|
(() => {
|
|
@@ -66,31 +66,30 @@ const badges = [
|
|
|
66
66
|
<svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="2">
|
|
67
67
|
<path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7"></path>
|
|
68
68
|
</svg>
|
|
69
|
-
<span class="text-
|
|
69
|
+
<span class="text-[rgb(var(--ec-page-text))]">{ubiquitousLanguage.name}</span>
|
|
70
70
|
</nav>
|
|
71
71
|
|
|
72
|
-
<div class="border-b border-
|
|
72
|
+
<div class="border-b border-[rgb(var(--ec-page-border))] flex justify-between items-start md:pb-2">
|
|
73
73
|
<div>
|
|
74
|
-
<h2 id="doc-page-header" class="text-2xl md:text-4xl font-bold text-
|
|
74
|
+
<h2 id="doc-page-header" class="text-2xl md:text-4xl font-bold text-[rgb(var(--ec-page-text))]">
|
|
75
75
|
{ubiquitousLanguage.name}
|
|
76
76
|
</h2>
|
|
77
|
-
<p class="text-lg pt-2 text-
|
|
78
|
-
<!-- Add
|
|
77
|
+
<p class="text-lg pt-2 text-[rgb(var(--ec-page-text-muted))] font-light">{ubiquitousLanguage.summary}</p>
|
|
78
|
+
<!-- Add badge -->
|
|
79
79
|
{
|
|
80
80
|
badges && (
|
|
81
|
-
<div class="flex flex-wrap
|
|
81
|
+
<div class="flex flex-wrap gap-3 py-4">
|
|
82
82
|
{badges.map((badge: any) => {
|
|
83
83
|
return (
|
|
84
|
-
<
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
</a>
|
|
84
|
+
<span
|
|
85
|
+
class="inline-flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium
|
|
86
|
+
bg-[rgb(var(--ec-content-hover))] border border-[rgb(var(--ec-page-border))]
|
|
87
|
+
text-[rgb(var(--ec-page-text))] shadow-sm"
|
|
88
|
+
>
|
|
89
|
+
{badge.icon && <badge.icon className="w-4 h-4 flex-shrink-0 text-[rgb(var(--ec-icon-color))]" />}
|
|
90
|
+
{badge.iconURL && <img src={badge.iconURL} class="w-4 h-4 flex-shrink-0 opacity-80" alt="" />}
|
|
91
|
+
<span>{badge.content}</span>
|
|
92
|
+
</span>
|
|
94
93
|
);
|
|
95
94
|
})}
|
|
96
95
|
</div>
|