@eventcatalog/core 4.8.4 → 4.10.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-EGWBSVND.js → chunk-5XURY2JV.js} +1 -1
- package/dist/{chunk-FQEK3FUI.js → chunk-BDFTJVGN.js} +1 -1
- package/dist/{chunk-QB4W7ZUL.js → chunk-BQXEWQ5J.js} +1 -1
- package/dist/{chunk-Y57SL3H3.js → chunk-HFAQXAG3.js} +1 -1
- package/dist/{chunk-AATZMWL3.js → chunk-IC6XSXJO.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/Badge.astro +3 -1
- package/eventcatalog/src/components/FieldsExplorer/FieldNodeGraph.tsx +0 -5
- package/eventcatalog/src/components/MDX/Design/Design.astro +2 -0
- package/eventcatalog/src/components/MDX/EntityMap/EntityMap.astro +2 -0
- package/eventcatalog/src/components/MDX/Flow/Flow.astro +2 -0
- package/eventcatalog/src/components/MDX/NodeGraph/AstroNodeGraph.tsx +5 -7
- package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.astro +5 -0
- package/eventcatalog/src/components/MDX/SchemaViewer/schema-viewer-utils.spec.ts +3 -3
- package/eventcatalog/src/components/MDX/SchemaViewer/schema-viewer-utils.ts +2 -2
- package/eventcatalog/src/components/SchemaExplorer/useDarkMode.ts +13 -4
- package/eventcatalog/src/components/SideNav/NestedSideBar/index.tsx +121 -88
- package/eventcatalog/src/components/SideNav/NestedSideBar/storage.ts +55 -7
- package/eventcatalog/src/components/SideNav/NestedSideBar/utils.spec.ts +59 -15
- package/eventcatalog/src/components/SideNav/NestedSideBar/utils.ts +53 -7
- package/eventcatalog/src/components/Tables/columns/TeamsTableColumns.tsx +1 -1
- package/eventcatalog/src/components/Tables/columns/UserTableColumns.tsx +2 -2
- package/eventcatalog/src/content.config.ts +71 -1
- package/eventcatalog/src/enterprise/api/schemas/[collection]/[id]/[version]/index.ts +3 -3
- package/eventcatalog/src/enterprise/collections/resource-docs-utils.ts +19 -0
- package/eventcatalog/src/enterprise/fields/pages/fields.astro +2 -0
- package/eventcatalog/src/enterprise/tools/catalog-tools.ts +1 -1
- package/eventcatalog/src/pages/architecture/[type]/[id]/[version]/index.astro +1 -1
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/[docVersion]/index.astro +16 -15
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/index.astro +21 -17
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/graphql/[filename].astro +1 -1
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +4 -4
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/resources/index.astro +16 -8
- package/eventcatalog/src/pages/docs/[type]/[id]/language/[dictionaryId]/index.astro +48 -65
- package/eventcatalog/src/pages/docs/[type]/[id]/language/index.astro +45 -18
- package/eventcatalog/src/pages/docs/llm/schemas.txt.ts +3 -3
- package/eventcatalog/src/pages/docs/teams/[id]/index.astro +1 -1
- package/eventcatalog/src/pages/docs/users/[id]/index.astro +1 -1
- package/eventcatalog/src/pages/schemas/[type]/[id]/[version]/_index.data.ts +6 -4
- package/eventcatalog/src/pages/schemas/[type]/[id]/[version]/index.astro +6 -2
- package/eventcatalog/src/pages/schemas/explorer/_index.data.ts +2 -2
- package/eventcatalog/src/pages/triggers/[type]/[id]/[version]/index.astro +2 -0
- package/eventcatalog/src/pages/visualiser/designs/[id]/index.astro +2 -0
- package/eventcatalog/src/stores/sidebar-store/builders/adr.ts +96 -34
- package/eventcatalog/src/stores/sidebar-store/builders/agent.ts +167 -75
- package/eventcatalog/src/stores/sidebar-store/builders/container.ts +135 -59
- package/eventcatalog/src/stores/sidebar-store/builders/data-product.ts +144 -58
- package/eventcatalog/src/stores/sidebar-store/builders/domain.ts +306 -188
- package/eventcatalog/src/stores/sidebar-store/builders/entity.ts +108 -39
- package/eventcatalog/src/stores/sidebar-store/builders/flow.ts +147 -63
- package/eventcatalog/src/stores/sidebar-store/builders/message.ts +213 -122
- package/eventcatalog/src/stores/sidebar-store/builders/service.ts +223 -127
- package/eventcatalog/src/stores/sidebar-store/builders/shared.ts +3 -23
- package/eventcatalog/src/stores/sidebar-store/builders/system.ts +187 -97
- package/eventcatalog/src/stores/sidebar-store/custom-sidebar.ts +678 -0
- package/eventcatalog/src/stores/sidebar-store/state.ts +66 -36
- package/eventcatalog/src/stores/theme-store.ts +6 -3
- package/eventcatalog/src/styles/tailwind.css +82 -0
- package/eventcatalog/src/utils/collections/resource-docs.ts +1 -0
- package/eventcatalog/src/utils/collections/schema-loader.ts +10 -8
- package/package.json +3 -2
|
@@ -1179,7 +1179,7 @@ const schemas = defineCollection({
|
|
|
1179
1179
|
default: z.boolean().optional(),
|
|
1180
1180
|
latest: z.boolean().optional(),
|
|
1181
1181
|
message: z.object({
|
|
1182
|
-
|
|
1182
|
+
collectionName: z.enum(['events', 'commands', 'queries']),
|
|
1183
1183
|
id: z.string(),
|
|
1184
1184
|
name: z.string().optional(),
|
|
1185
1185
|
version: z.string(),
|
|
@@ -1199,6 +1199,73 @@ const schemas = defineCollection({
|
|
|
1199
1199
|
.extend(baseSchema.shape),
|
|
1200
1200
|
});
|
|
1201
1201
|
|
|
1202
|
+
// Optional `sidebar.json` next to a resource's index.mdx. When present it fully
|
|
1203
|
+
// replaces the generated sidebar for that resource (see stores/sidebar-store/custom-sidebar.ts).
|
|
1204
|
+
const sidebarLinkSchema = z
|
|
1205
|
+
.object({
|
|
1206
|
+
title: z.string(),
|
|
1207
|
+
href: z.string(),
|
|
1208
|
+
icon: z.string().optional(),
|
|
1209
|
+
})
|
|
1210
|
+
.strict();
|
|
1211
|
+
|
|
1212
|
+
// { "title": "Runbooks", "icon": "Siren", "collapsed": true, "pages": [...] } (custom group).
|
|
1213
|
+
// Groups nest: a page can itself be a group, rendered as a subsection.
|
|
1214
|
+
type SidebarGroupInput = {
|
|
1215
|
+
title: string;
|
|
1216
|
+
icon?: string;
|
|
1217
|
+
collapsed?: boolean;
|
|
1218
|
+
pages: Array<string | z.input<typeof sidebarLinkSchema> | SidebarGroupInput>;
|
|
1219
|
+
};
|
|
1220
|
+
const sidebarGroupSchema: z.ZodType<SidebarGroupInput> = z.lazy(() =>
|
|
1221
|
+
z
|
|
1222
|
+
.object({
|
|
1223
|
+
title: z.string(),
|
|
1224
|
+
icon: z.string().optional(),
|
|
1225
|
+
collapsed: z.boolean().optional(),
|
|
1226
|
+
// "$quick-reference", "[[service|OrderService@1.0.0]]", "[[doc|guides/sla]]", { title, href } or a nested group
|
|
1227
|
+
pages: z.array(z.union([z.string(), sidebarLinkSchema, sidebarGroupSchema])),
|
|
1228
|
+
})
|
|
1229
|
+
.strict()
|
|
1230
|
+
);
|
|
1231
|
+
|
|
1232
|
+
const sidebarSchema = z
|
|
1233
|
+
.object({
|
|
1234
|
+
$schema: z.string().optional(),
|
|
1235
|
+
sections: z.array(
|
|
1236
|
+
z.union([
|
|
1237
|
+
// "$quick-reference" (predefined section)
|
|
1238
|
+
z.string(),
|
|
1239
|
+
// { "section": "$owners", "title": "Team", "collapsed": false } (predefined section, adjusted)
|
|
1240
|
+
z
|
|
1241
|
+
.object({
|
|
1242
|
+
section: z.string(),
|
|
1243
|
+
title: z.string().optional(),
|
|
1244
|
+
icon: z.string().optional(),
|
|
1245
|
+
collapsed: z.boolean().optional(),
|
|
1246
|
+
})
|
|
1247
|
+
.strict(),
|
|
1248
|
+
sidebarGroupSchema,
|
|
1249
|
+
])
|
|
1250
|
+
),
|
|
1251
|
+
})
|
|
1252
|
+
.strict();
|
|
1253
|
+
|
|
1254
|
+
const sidebars = defineCollection({
|
|
1255
|
+
loader: globWithSafeWatcher({
|
|
1256
|
+
// Anchored to the resource roots (like resourceDocCategories) so an unrelated
|
|
1257
|
+
// sidebar.json elsewhere in the project — or the public/generated mirror — is ignored.
|
|
1258
|
+
pattern: withIgnoredBuildArtifacts(
|
|
1259
|
+
withFederatedContent([
|
|
1260
|
+
'{services,events,commands,queries,flows,containers,channels,entities,data-products,systems,agents,adrs}/**/sidebar.json',
|
|
1261
|
+
'domains/**/sidebar.json',
|
|
1262
|
+
])
|
|
1263
|
+
),
|
|
1264
|
+
base: projectDirBase,
|
|
1265
|
+
}),
|
|
1266
|
+
schema: sidebarSchema,
|
|
1267
|
+
});
|
|
1268
|
+
|
|
1202
1269
|
export const collections = {
|
|
1203
1270
|
events,
|
|
1204
1271
|
commands,
|
|
@@ -1236,4 +1303,7 @@ export const collections = {
|
|
|
1236
1303
|
|
|
1237
1304
|
// Generated from message schema references
|
|
1238
1305
|
schemas,
|
|
1306
|
+
|
|
1307
|
+
// Optional per-resource sidebar overrides (sidebar.json)
|
|
1308
|
+
sidebars,
|
|
1239
1309
|
};
|
|
@@ -11,7 +11,7 @@ import { sortVersioned } from '@utils/collections/util';
|
|
|
11
11
|
const findSchema = async (collection: string | undefined, id: string, version: string | undefined) => {
|
|
12
12
|
const schemas = await getCollection('schemas');
|
|
13
13
|
const matchingSchemas = schemas.filter(
|
|
14
|
-
(schema) => schema.data.message.
|
|
14
|
+
(schema) => schema.data.message.collectionName === collection && schema.data.message.id === id
|
|
15
15
|
);
|
|
16
16
|
|
|
17
17
|
if (version === 'latest') {
|
|
@@ -30,7 +30,7 @@ export async function getStaticPaths() {
|
|
|
30
30
|
// Generate paths for specific versions
|
|
31
31
|
const versionedPaths = schemas.map((schema) => ({
|
|
32
32
|
params: {
|
|
33
|
-
collection: schema.data.message.
|
|
33
|
+
collection: schema.data.message.collectionName,
|
|
34
34
|
id: schema.data.message.id,
|
|
35
35
|
version: schema.data.message.version,
|
|
36
36
|
},
|
|
@@ -45,7 +45,7 @@ export async function getStaticPaths() {
|
|
|
45
45
|
.filter((schema) => schema.data.latest)
|
|
46
46
|
.map((latestSchema) => ({
|
|
47
47
|
params: {
|
|
48
|
-
collection: latestSchema.data.message.
|
|
48
|
+
collection: latestSchema.data.message.collectionName,
|
|
49
49
|
id: latestSchema.data.message.id,
|
|
50
50
|
version: 'latest',
|
|
51
51
|
},
|
|
@@ -71,6 +71,25 @@ type InferredResource = {
|
|
|
71
71
|
resourceVersion: string;
|
|
72
72
|
};
|
|
73
73
|
|
|
74
|
+
const DOC_TYPE_LABELS: Record<string, string> = {
|
|
75
|
+
adrs: 'ADR',
|
|
76
|
+
runbooks: 'Runbook',
|
|
77
|
+
contracts: 'Contract',
|
|
78
|
+
troubleshooting: 'Troubleshooting',
|
|
79
|
+
guides: 'Guide',
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/** Human label for a doc type folder, e.g. `guides` → "Guide", `release-notes` → "Release Notes". */
|
|
83
|
+
export const getResourceDocTypeLabel = (type: string): string => {
|
|
84
|
+
if (DOC_TYPE_LABELS[type]) return DOC_TYPE_LABELS[type];
|
|
85
|
+
const normalized = type
|
|
86
|
+
.split(/[-_\s]+/)
|
|
87
|
+
.filter(Boolean)
|
|
88
|
+
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
|
|
89
|
+
.join(' ');
|
|
90
|
+
return normalized || 'Doc';
|
|
91
|
+
};
|
|
92
|
+
|
|
74
93
|
let memoryCache: ResourceDocEntry[] | null = null;
|
|
75
94
|
let memoryCategoryCache: ResourceDocCategoryEntry[] | null = null;
|
|
76
95
|
let memoryResourceLookupCache: Record<ResourceCollection, ResourceLookup> | null = null;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
+
// Visualiser styles ship in the page head so ClientRouter navigations keep them (see NodeGraph.astro).
|
|
3
|
+
import '@eventcatalog/visualiser/styles-core.css';
|
|
2
4
|
import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
3
5
|
import FieldsExplorer from '@components/FieldsExplorer/FieldsExplorer';
|
|
4
6
|
import { isEventCatalogScaleEnabled } from '@utils/feature';
|
|
@@ -310,7 +310,7 @@ export async function getSchemaForResource(params: { resourceId: string; resourc
|
|
|
310
310
|
const schemaEntries = await getCollection('schemas');
|
|
311
311
|
const schemas = schemaEntries.filter(
|
|
312
312
|
(schema) =>
|
|
313
|
-
schema.data.message.
|
|
313
|
+
schema.data.message.collectionName === params.resourceCollection &&
|
|
314
314
|
schema.data.message.id === params.resourceId &&
|
|
315
315
|
schema.data.message.version === params.resourceVersion
|
|
316
316
|
);
|
|
@@ -24,7 +24,7 @@ const specifications = type === 'services' ? getSpecificationsForService(props)
|
|
|
24
24
|
<VerticalSideBarLayout title={pageTitle}>
|
|
25
25
|
<main class="flex docs-layout min-h-full bg-[rgb(var(--ec-page-bg))]">
|
|
26
26
|
<div class="flex docs-layout w-full">
|
|
27
|
-
<div class="w-full lg:mr-2 pr-24 py-8 bg-[rgb(var(--ec-page-bg))]">
|
|
27
|
+
<div class="w-full min-w-0 lg:mr-2 pr-24 py-8 bg-[rgb(var(--ec-page-bg))]">
|
|
28
28
|
{type === 'domains' && <DomainGrid domain={domain} client:load />}
|
|
29
29
|
{type === 'systems' && <SystemGrid system={props} client:load />}
|
|
30
30
|
{
|
package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/[docVersion]/index.astro
CHANGED
|
@@ -8,7 +8,8 @@ import CopyAsMarkdown from '@components/CopyAsMarkdown';
|
|
|
8
8
|
import Badge from '@components/Badge.astro';
|
|
9
9
|
import { buildUrl } from '@utils/url-builder';
|
|
10
10
|
import { AlignLeftIcon, HistoryIcon } from 'lucide-react';
|
|
11
|
-
import { isEventCatalogChatEnabled, isResourceDocsEnabled } from '@utils/feature';
|
|
11
|
+
import { isEventCatalogChatEnabled, isMarkdownDownloadEnabled, isResourceDocsEnabled } from '@utils/feature';
|
|
12
|
+
import { getResourceDocTypeLabel } from '@utils/collections/resource-docs';
|
|
12
13
|
import { getIcon } from '@utils/badges';
|
|
13
14
|
import { collectionToResourceMap } from '@utils/collections/util';
|
|
14
15
|
|
|
@@ -51,28 +52,28 @@ const pagefindAttributes =
|
|
|
51
52
|
<VerticalSideBarLayout title={pageTitle} description={props.data.summary}>
|
|
52
53
|
<main class="flex docs-layout min-h-full bg-[rgb(var(--ec-page-bg))]" {...pagefindAttributes}>
|
|
53
54
|
<div class="flex docs-layout w-full">
|
|
54
|
-
<div class="w-full lg:mr-2 pr-24 py-8 bg-[rgb(var(--ec-page-bg))]">
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
</
|
|
55
|
+
<div class="w-full min-w-0 lg:mr-2 pr-24 py-8 bg-[rgb(var(--ec-page-bg))]">
|
|
56
|
+
{/* Header mirrors the latest-doc page ([docId]/index.astro) and the resource page. */}
|
|
57
|
+
<div class="border-b border-[rgb(var(--ec-page-border))] md:pb-3 pt-4">
|
|
58
|
+
<div class="flex flex-col gap-4">
|
|
59
|
+
<span class="text-xs md:text-sm font-semibold text-[rgb(var(--ec-accent))] capitalize">
|
|
60
|
+
{getResourceDocTypeLabel(props.data.type)}
|
|
61
|
+
</span>
|
|
62
|
+
<h2 id="doc-page-header" class="text-2xl md:text-4xl font-bold text-[rgb(var(--ec-page-text))]">{title}</h2>
|
|
62
63
|
</div>
|
|
63
64
|
{
|
|
64
65
|
props.data.summary && (
|
|
65
|
-
<p class="text-base pt-
|
|
66
|
+
<p class="text-base pt-4 text-[rgb(var(--ec-page-text-muted))] font-light">{props.data.summary}</p>
|
|
66
67
|
)
|
|
67
68
|
}
|
|
68
69
|
{
|
|
69
70
|
badges.length > 0 && (
|
|
70
|
-
<div class="flex flex-wrap gap-1.5
|
|
71
|
+
<div class="flex flex-wrap gap-1.5 pt-4">
|
|
71
72
|
{badges.map((badge: any) => <Badge badge={badge} />)}
|
|
72
73
|
</div>
|
|
73
74
|
)
|
|
74
75
|
}
|
|
75
|
-
<div class="pt-
|
|
76
|
+
<div class="pt-5">
|
|
76
77
|
<CopyAsMarkdown
|
|
77
78
|
client:only="react"
|
|
78
79
|
variant="toolbar"
|
|
@@ -80,9 +81,9 @@ const pagefindAttributes =
|
|
|
80
81
|
chatQuery={chatQuery}
|
|
81
82
|
chatEnabled={chatEnabled}
|
|
82
83
|
editUrl=""
|
|
83
|
-
markdownDownloadEnabled={
|
|
84
|
+
markdownDownloadEnabled={isMarkdownDownloadEnabled()}
|
|
84
85
|
rssFeedEnabled={false}
|
|
85
|
-
preferChatAsDefault={
|
|
86
|
+
preferChatAsDefault={chatEnabled}
|
|
86
87
|
/>
|
|
87
88
|
</div>
|
|
88
89
|
</div>
|
|
@@ -100,7 +101,7 @@ const pagefindAttributes =
|
|
|
100
101
|
)
|
|
101
102
|
}
|
|
102
103
|
</div>
|
|
103
|
-
<div class="prose
|
|
104
|
+
<div class="prose prose-md pt-8 pb-4 w-full text-[15px]">
|
|
104
105
|
<Content components={components(props)} />
|
|
105
106
|
</div>
|
|
106
107
|
</div>
|
|
@@ -8,9 +8,10 @@ import CopyAsMarkdown from '@components/CopyAsMarkdown';
|
|
|
8
8
|
import Badge from '@components/Badge.astro';
|
|
9
9
|
import { buildUrl } from '@utils/url-builder';
|
|
10
10
|
import { AlignLeftIcon, HistoryIcon } from 'lucide-react';
|
|
11
|
-
import { isEventCatalogChatEnabled, isResourceDocsEnabled } from '@utils/feature';
|
|
11
|
+
import { isEventCatalogChatEnabled, isMarkdownDownloadEnabled, isResourceDocsEnabled } from '@utils/feature';
|
|
12
12
|
import { getIcon } from '@utils/badges';
|
|
13
13
|
import { collectionToResourceMap } from '@utils/collections/util';
|
|
14
|
+
import { getResourceDocTypeLabel } from '@utils/collections/resource-docs';
|
|
14
15
|
|
|
15
16
|
import { Page } from './_index.data';
|
|
16
17
|
|
|
@@ -36,6 +37,7 @@ const docsBasePath = `/docs/${props.data.resourceCollection}/${props.data.resour
|
|
|
36
37
|
const singularResourceName =
|
|
37
38
|
collectionToResourceMap[props.data.resourceCollection as keyof typeof collectionToResourceMap] ??
|
|
38
39
|
props.data.resourceCollection.slice(0, props.data.resourceCollection.length - 1);
|
|
40
|
+
const typeLabel = getResourceDocTypeLabel(props.data.type);
|
|
39
41
|
const chatEnabled = isEventCatalogChatEnabled();
|
|
40
42
|
const chatQuery = `Tell me about the ${props.data.type} doc "${title}" for ${props.data.resourceId} (version ${props.data.version})`;
|
|
41
43
|
|
|
@@ -51,20 +53,22 @@ const pagefindAttributes =
|
|
|
51
53
|
<VerticalSideBarLayout title={pageTitle} description={props.data.summary}>
|
|
52
54
|
<main class="flex docs-layout min-h-full bg-[rgb(var(--ec-page-bg))]" {...pagefindAttributes}>
|
|
53
55
|
<div class="flex docs-layout w-full">
|
|
54
|
-
<div class="w-full lg:mr-2 pr-24 py-8 bg-[rgb(var(--ec-page-bg))]">
|
|
55
|
-
|
|
56
|
+
<div class="w-full min-w-0 lg:mr-2 pr-24 py-8 bg-[rgb(var(--ec-page-bg))]">
|
|
57
|
+
{/* Header mirrors the resource page (docs/[type]/[id]/[version]/index.astro) so docs feel like part of the resource. */}
|
|
58
|
+
<div class="border-b border-[rgb(var(--ec-page-border))] md:pb-3 pt-4">
|
|
56
59
|
<div class="flex flex-col gap-4">
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
60
|
+
<span class="text-xs md:text-sm font-semibold text-[rgb(var(--ec-accent))] capitalize">{typeLabel}</span>
|
|
61
|
+
<h2 id="doc-page-header" class="text-2xl md:text-4xl font-bold text-[rgb(var(--ec-page-text))]">{title}</h2>
|
|
62
|
+
</div>
|
|
63
|
+
{props.data.summary && <p class="text-base pt-4 text-[rgb(var(--ec-page-text-muted))] font-light">{props.data.summary}</p>}
|
|
64
|
+
{
|
|
65
|
+
badges.length > 0 && (
|
|
66
|
+
<div class="flex flex-wrap gap-1.5 pt-4">
|
|
67
|
+
{badges.map((badge: any) => <Badge badge={badge} />)}
|
|
68
|
+
</div>
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
<div class="pt-5">
|
|
68
72
|
<CopyAsMarkdown
|
|
69
73
|
client:only="react"
|
|
70
74
|
variant="toolbar"
|
|
@@ -72,9 +76,9 @@ const pagefindAttributes =
|
|
|
72
76
|
chatQuery={chatQuery}
|
|
73
77
|
chatEnabled={chatEnabled}
|
|
74
78
|
editUrl=""
|
|
75
|
-
markdownDownloadEnabled={
|
|
79
|
+
markdownDownloadEnabled={isMarkdownDownloadEnabled()}
|
|
76
80
|
rssFeedEnabled={false}
|
|
77
|
-
preferChatAsDefault={
|
|
81
|
+
preferChatAsDefault={chatEnabled}
|
|
78
82
|
/>
|
|
79
83
|
</div>
|
|
80
84
|
</div>
|
|
@@ -92,7 +96,7 @@ const pagefindAttributes =
|
|
|
92
96
|
)
|
|
93
97
|
}
|
|
94
98
|
</div>
|
|
95
|
-
<div class="prose
|
|
99
|
+
<div class="prose prose-md pt-8 pb-4 w-full text-[15px]">
|
|
96
100
|
<Content components={components(props)} />
|
|
97
101
|
</div>
|
|
98
102
|
</div>
|
|
@@ -66,7 +66,7 @@ const pagefindAttributes =
|
|
|
66
66
|
<VerticalSideBarLayout title={pageTitle} description={`GraphQL schema for ${data.name}`}>
|
|
67
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-24 py-8 bg-[rgb(var(--ec-page-bg))]">
|
|
69
|
+
<div class="w-full min-w-0 lg:mr-2 pr-24 py-8 bg-[rgb(var(--ec-page-bg))]">
|
|
70
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">
|
|
@@ -408,8 +408,8 @@ if (!isAdrPage && !hasCurrentFlowEmbed && !hasCurrentPageNodeGraph) {
|
|
|
408
408
|
<VerticalSideBarLayout title={pageTitle} description={props.data.summary}>
|
|
409
409
|
<main class="flex docs-layout min-h-full bg-[rgb(var(--ec-page-bg))]" {...pagefindAttributes}>
|
|
410
410
|
<div class="flex docs-layout w-full">
|
|
411
|
-
<div class="w-full lg:mr-2 pr-24 py-8 bg-[rgb(var(--ec-page-bg))]">
|
|
412
|
-
<div class="border-b border-[rgb(var(--ec-page-border))] md:pb-
|
|
411
|
+
<div class="w-full min-w-0 lg:mr-2 pr-24 py-8 bg-[rgb(var(--ec-page-bg))]">
|
|
412
|
+
<div class="border-b border-[rgb(var(--ec-page-border))] md:pb-3 pt-4">
|
|
413
413
|
<div>
|
|
414
414
|
<div>
|
|
415
415
|
<div class="flex flex-col gap-4">
|
|
@@ -447,7 +447,7 @@ if (!isAdrPage && !hasCurrentFlowEmbed && !hasCurrentPageNodeGraph) {
|
|
|
447
447
|
</div>
|
|
448
448
|
</div>
|
|
449
449
|
|
|
450
|
-
<
|
|
450
|
+
<p class="text-base pt-4 text-[rgb(var(--ec-page-text-muted))] font-light">{props.data.summary}</p>
|
|
451
451
|
{
|
|
452
452
|
badges && (
|
|
453
453
|
<div class="flex flex-wrap gap-1.5 pt-4">
|
|
@@ -596,7 +596,7 @@ if (!isAdrPage && !hasCurrentFlowEmbed && !hasCurrentPageNodeGraph) {
|
|
|
596
596
|
}
|
|
597
597
|
</div>
|
|
598
598
|
|
|
599
|
-
<div class="prose prose-md
|
|
599
|
+
<div class="prose prose-md pt-8 pb-4 w-full text-[15px]">
|
|
600
600
|
<Content components={components(props)} />
|
|
601
601
|
</div>
|
|
602
602
|
<div data-pagefind-ignore>
|
|
@@ -29,6 +29,8 @@ const hrefForResource = (collection: SystemResourceCollection, id: string, versi
|
|
|
29
29
|
return buildUrl(`/docs/${collection}/${id}/${version}`);
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
+
const ownerTypeLabel = ownerCollection === 'domains' ? 'Domain' : 'System';
|
|
33
|
+
|
|
32
34
|
const resources: SystemResourceItem[] = resourceGroups.flatMap(({ collection, items }) =>
|
|
33
35
|
items.map((item: any) => ({
|
|
34
36
|
collection,
|
|
@@ -45,16 +47,22 @@ const resources: SystemResourceItem[] = resourceGroups.flatMap(({ collection, it
|
|
|
45
47
|
<VerticalSideBarLayout title={`${data.name} | Resources`}>
|
|
46
48
|
<main class="flex docs-layout min-h-full bg-[rgb(var(--ec-page-bg))]">
|
|
47
49
|
<div class="flex docs-layout w-full">
|
|
48
|
-
<div class="w-full lg:mr-2 pr-24 py-8 bg-[rgb(var(--ec-page-bg))]">
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
<div class="w-full min-w-0 lg:mr-2 pr-24 py-8 bg-[rgb(var(--ec-page-bg))]">
|
|
51
|
+
{/* Header mirrors the resource page (docs/[type]/[id]/[version]/index.astro). */}
|
|
52
|
+
<div class="border-b border-[rgb(var(--ec-page-border))] md:pb-3 pt-4">
|
|
53
|
+
<div class="flex flex-col gap-4">
|
|
54
|
+
<span class="text-xs md:text-sm font-semibold text-[rgb(var(--ec-accent))] capitalize">{ownerTypeLabel}</span>
|
|
55
|
+
<h2 id="doc-page-header" class="text-2xl md:text-4xl font-bold text-[rgb(var(--ec-page-text))]">
|
|
56
|
+
{data.name} Resources
|
|
57
|
+
</h2>
|
|
58
|
+
</div>
|
|
59
|
+
<p class="text-base pt-4 pb-1 text-[rgb(var(--ec-page-text-muted))] font-light">
|
|
60
|
+
{resources.length} {resources.length === 1 ? 'resource' : 'resources'} mapped to the {data.name}{' '}
|
|
61
|
+
{ownerTypeLabel.toLowerCase()}.
|
|
62
|
+
</p>
|
|
55
63
|
</div>
|
|
56
64
|
|
|
57
|
-
<div class="
|
|
65
|
+
<div class="pt-8 pb-4 w-full">
|
|
58
66
|
<SystemResourcesTable resources={resources} client:only="react" />
|
|
59
67
|
</div>
|
|
60
68
|
</div>
|
|
@@ -25,90 +25,73 @@ const editUrl = resolveUbiquitousLanguageTermEditUrl({
|
|
|
25
25
|
configEditUrl: config.editUrl,
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
-
marked.setOptions
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
// Pass options per call rather than via `marked.setOptions`, which mutates module-global
|
|
29
|
+
// state and leaks between pages (and between HMR reloads) in the same process.
|
|
30
|
+
const renderMarkdown = (markdown: string) => marked.parse(markdown, { gfm: true, breaks: false }) as string;
|
|
31
|
+
|
|
32
|
+
const TermIcon = ubiquitousLanguage.icon
|
|
33
|
+
? ((LucideIcons as unknown as Record<string, LucideIcons.LucideIcon>)[ubiquitousLanguage.icon] ?? null)
|
|
34
|
+
: null;
|
|
32
35
|
|
|
36
|
+
// Badges double as navigation back up the hierarchy: the owning domain and its glossary.
|
|
33
37
|
const badges = [
|
|
34
38
|
{
|
|
35
39
|
content: props.domain.name,
|
|
36
40
|
icon: RectangleGroupIcon,
|
|
41
|
+
url: buildUrl(`/docs/${props.type}/${props.domainId}/${props.domain.latestVersion}`),
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
content: 'Ubiquitous Language',
|
|
45
|
+
icon: LucideIcons.BookOpen,
|
|
46
|
+
url: buildUrl(`/docs/${props.type}/${props.domainId}/language`),
|
|
37
47
|
},
|
|
38
48
|
];
|
|
39
49
|
---
|
|
40
50
|
|
|
41
51
|
<VerticalSideBarLayout title={pageTitle} description={ubiquitousLanguage.summary}>
|
|
42
52
|
<main
|
|
43
|
-
class="flex
|
|
53
|
+
class="flex docs-layout min-h-full bg-[rgb(var(--ec-page-bg))]"
|
|
44
54
|
data-pagefind-body
|
|
45
55
|
data-pagefind-meta={`title:${pageTitle}`}
|
|
46
56
|
>
|
|
47
57
|
<div class="flex docs-layout w-full">
|
|
48
|
-
<div class="w-full lg:mr-2 pr-
|
|
49
|
-
{/*
|
|
50
|
-
<
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
class="
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
</a>
|
|
74
|
-
<svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="2">
|
|
75
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7"></path>
|
|
76
|
-
</svg>
|
|
77
|
-
<span class="text-[rgb(var(--ec-page-text))]">{ubiquitousLanguage.name}</span>
|
|
78
|
-
</nav>
|
|
79
|
-
|
|
80
|
-
<div class="border-b border-[rgb(var(--ec-page-border))] flex justify-between items-start md:pb-2">
|
|
81
|
-
<div>
|
|
82
|
-
<h2 id="doc-page-header" class="text-2xl md:text-4xl font-bold text-[rgb(var(--ec-page-text))]">
|
|
83
|
-
{ubiquitousLanguage.name}
|
|
84
|
-
</h2>
|
|
85
|
-
<p class="text-lg pt-2 text-[rgb(var(--ec-page-text-muted))] font-light">{ubiquitousLanguage.summary}</p>
|
|
86
|
-
<!-- Add badge -->
|
|
87
|
-
{
|
|
88
|
-
badges && badges.length > 0 && (
|
|
89
|
-
<div class="flex flex-wrap gap-3 py-4">
|
|
90
|
-
{badges.map((badge: any) => {
|
|
91
|
-
return <Badge badge={badge} />;
|
|
92
|
-
})}
|
|
93
|
-
</div>
|
|
94
|
-
)
|
|
95
|
-
}
|
|
58
|
+
<div class="w-full min-w-0 lg:mr-2 pr-24 py-8 min-h-[50em]">
|
|
59
|
+
{/* Header mirrors the resource page (docs/[type]/[id]/[version]/index.astro). */}
|
|
60
|
+
<div class="border-b border-[rgb(var(--ec-page-border))] md:pb-3 pt-4">
|
|
61
|
+
<div class="flex flex-col gap-4">
|
|
62
|
+
<span class="text-xs md:text-sm font-semibold text-[rgb(var(--ec-accent))] capitalize">Term</span>
|
|
63
|
+
<div class="flex items-center gap-3">
|
|
64
|
+
{
|
|
65
|
+
TermIcon && (
|
|
66
|
+
<div class="flex items-center justify-center w-8 h-8 md:w-10 md:h-10 rounded-md bg-[rgb(var(--ec-accent-subtle))] shrink-0">
|
|
67
|
+
<TermIcon className="w-5 h-5 md:w-6 md:h-6 text-[rgb(var(--ec-accent))]" />
|
|
68
|
+
</div>
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
<h2 id="doc-page-header" class="text-2xl md:text-4xl font-bold text-[rgb(var(--ec-page-text))]">
|
|
72
|
+
{ubiquitousLanguage.name}
|
|
73
|
+
</h2>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
{
|
|
77
|
+
ubiquitousLanguage.summary && (
|
|
78
|
+
<p class="text-base pt-4 text-[rgb(var(--ec-page-text-muted))] font-light">{ubiquitousLanguage.summary}</p>
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
<div class="flex flex-wrap gap-1.5 pt-4 pb-1">
|
|
82
|
+
{badges.map((badge: any) => <Badge badge={badge} />)}
|
|
96
83
|
</div>
|
|
97
84
|
</div>
|
|
98
85
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
{
|
|
106
|
-
!ubiquitousLanguage.description && (
|
|
107
|
-
<div class="prose prose-md py-4 max-w-none">
|
|
86
|
+
<div class="prose prose-md pt-8 pb-4 w-full text-[15px]">
|
|
87
|
+
{
|
|
88
|
+
ubiquitousLanguage.description ? (
|
|
89
|
+
<Fragment set:html={renderMarkdown(ubiquitousLanguage.description)} />
|
|
90
|
+
) : (
|
|
108
91
|
<p>No description for {ubiquitousLanguage.name} available.</p>
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
92
|
+
)
|
|
93
|
+
}
|
|
94
|
+
</div>
|
|
112
95
|
|
|
113
96
|
<Footer />
|
|
114
97
|
<div class="flex justify-end">
|