@eventcatalog/core 2.10.1 → 2.11.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/CHANGELOG.md +6 -0
- package/README.md +10 -2
- package/images/sponsors/gravitee-logo-black.svg +54 -0
- package/package.json +4 -1
- package/public/icons/discord.svg +1 -0
- package/public/icons/github-purple.svg +1 -0
- package/src/components/DocsNavigation.astro +12 -12
- package/src/components/Header.astro +18 -18
- package/src/components/Lists/OwnersList.tsx +21 -58
- package/src/components/Lists/PillList.tsx +20 -16
- package/src/components/Lists/PillListFlat.styles.css +8 -0
- package/src/components/Lists/PillListFlat.tsx +69 -0
- package/src/components/Lists/SpecificationsList.astro +4 -4
- package/src/components/Lists/VersionList.astro +33 -13
- package/src/components/Search.astro +5 -2
- package/src/components/SideBars/CatalogResourcesSideBar/index.tsx +120 -0
- package/src/components/SideBars/CatalogResourcesSideBar/styles.css +8 -0
- package/src/components/SideBars/DomainSideBar.astro +15 -8
- package/src/components/SideBars/MessageSideBar.astro +51 -43
- package/src/components/SideBars/ServiceSideBar.astro +23 -31
- package/src/components/Tables/Table.tsx +2 -2
- package/src/components/Tables/columns/MessageTableColumns.tsx +4 -4
- package/src/components/Tables/columns/ServiceTableColumns.tsx +4 -4
- package/src/layouts/DiscoverLayout.astro +7 -7
- package/src/layouts/Footer.astro +1 -1
- package/src/layouts/VerticalSideBarLayout.astro +312 -0
- package/src/layouts/VisualiserLayout.astro +6 -10
- package/src/pages/docs/[type]/[id]/[version]/asyncapi/index.astro +3 -2
- package/src/pages/docs/[type]/[id]/[version]/changelog/index.astro +40 -5
- package/src/pages/docs/[type]/[id]/[version]/index.astro +149 -144
- package/src/pages/docs/[type]/[id]/[version]/spec/index.astro +13 -3
- package/src/pages/docs/[type]/[id]/[version]/spec/styles.css +3 -0
- package/src/pages/docs/index.astro +4 -4
- package/src/pages/docs/teams/[id]/index.astro +13 -10
- package/src/pages/docs/users/[id]/index.astro +115 -91
- package/src/pages/index.astro +83 -63
- package/src/pages/visualiser/[type]/[id]/[version]/index.astro +3 -1
- package/src/utils/collections/icons.ts +33 -0
- package/tailwind.config.mjs +2 -1
- package/src/components/Lists/BasicList.tsx +0 -59
- package/src/layouts/DocsLayout.astro +0 -62
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
---
|
|
2
|
-
import DocsLayout from '@layouts/DocsLayout.astro';
|
|
3
2
|
import components from '@components/MDX/components';
|
|
4
3
|
|
|
5
4
|
// SideBars
|
|
6
5
|
import type { CollectionEntry } from 'astro:content';
|
|
7
6
|
import OwnersList from '@components/Lists/OwnersList';
|
|
8
|
-
import
|
|
7
|
+
import PillListFlat from '@components/Lists/PillListFlat';
|
|
9
8
|
import { getUsers } from '@utils/users';
|
|
10
9
|
import EnvelopeIcon from '@heroicons/react/16/solid/EnvelopeIcon';
|
|
11
10
|
import { buildUrl } from '@utils/url-builder';
|
|
11
|
+
import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
12
12
|
|
|
13
13
|
export async function getStaticPaths() {
|
|
14
14
|
const teams = await getUsers();
|
|
@@ -38,12 +38,14 @@ const teams = props.data.associatedTeams as CollectionEntry<'teams'>[];
|
|
|
38
38
|
const ownedDomainsList = domains.map((p) => ({
|
|
39
39
|
label: `${p.data.name}`,
|
|
40
40
|
href: buildUrl(`/docs/${p.collection}/${p.data.id}/${p.data.version}`),
|
|
41
|
+
collection: p.collection,
|
|
41
42
|
tag: `v${p.data.version}`,
|
|
42
43
|
}));
|
|
43
44
|
|
|
44
45
|
const ownedServicesList = services.map((p) => ({
|
|
45
46
|
label: `${p.data.name} (service)`,
|
|
46
47
|
href: buildUrl(`/docs/${p.collection}/${p.data.id}/${p.data.version}`),
|
|
48
|
+
collection: p.collection,
|
|
47
49
|
tag: `v${p.data.version}`,
|
|
48
50
|
}));
|
|
49
51
|
|
|
@@ -51,6 +53,7 @@ const ownedMessageList = [...events, ...commands].map((p) => ({
|
|
|
51
53
|
label: `${p.data.name}`,
|
|
52
54
|
badge: p.collection,
|
|
53
55
|
color: p.collection === 'events' ? 'orange' : 'blue',
|
|
56
|
+
collection: p.collection,
|
|
54
57
|
tag: `v${p.data.version}`,
|
|
55
58
|
href: buildUrl(`/docs/${p.collection}/${p.data.id}/${p.data.version}`),
|
|
56
59
|
}));
|
|
@@ -63,107 +66,128 @@ const associatedTeams = teams.map((o) => ({
|
|
|
63
66
|
}));
|
|
64
67
|
---
|
|
65
68
|
|
|
66
|
-
<
|
|
67
|
-
<
|
|
68
|
-
<
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
<div class="
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
<div>
|
|
75
|
-
<
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
<
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
69
|
+
<VerticalSideBarLayout title={`User | ${props.data.name}`}>
|
|
70
|
+
<main class="flex sm:px-8 docs-layout h-full">
|
|
71
|
+
<div class="flex docs-layout w-full">
|
|
72
|
+
<div class="w-full lg:mr-6 pr-8 overflow-y-auto py-4">
|
|
73
|
+
<!-- <span class="text-purple-500 bg-purple-100 px-2 py-1 rounded-md">v{props.data.version}</span> -->
|
|
74
|
+
<div class="border-b border-gray-200 pb-4 py-4">
|
|
75
|
+
<div class="flex justify-start space-x-8">
|
|
76
|
+
<img src={props.data.avatarUrl} alt="Profile picture" class="shadow-md w-28 rounded-md" />
|
|
77
|
+
<div class="flex flex-col justify-between">
|
|
78
|
+
<div>
|
|
79
|
+
<h2 class="text-4xl font-bold">{props.data.name}</h2>
|
|
80
|
+
<span class="text-xl font-bold text-gray-500">{props.data.role}</span>
|
|
81
|
+
</div>
|
|
82
|
+
<div class="space-y-1">
|
|
83
|
+
{
|
|
84
|
+
props.data.email && (
|
|
85
|
+
<div class="flex space-x-1 items-center text-xs text-gray-500 font-bold hover:underline hover:text-primary">
|
|
86
|
+
<EnvelopeIcon className="w-4 h-4 text-purple-400" />
|
|
87
|
+
<a href={`mailto:${props.data.email}`}>Email</a>
|
|
88
|
+
</div>
|
|
89
|
+
)
|
|
90
|
+
}
|
|
91
|
+
{
|
|
92
|
+
props.data.slackDirectMessageUrl && (
|
|
93
|
+
<div class="flex space-x-1 items-center text-xs text-gray-500 font-bold hover:underline hover:text-primary">
|
|
94
|
+
<img src="/slack-icon.svg" class="w-4 h-3" />
|
|
95
|
+
<a href={`${props.data.slackDirectMessageUrl}`}>Send DM on Slack</a>
|
|
96
|
+
</div>
|
|
97
|
+
)
|
|
98
|
+
}
|
|
99
|
+
</div>
|
|
95
100
|
</div>
|
|
96
101
|
</div>
|
|
97
102
|
</div>
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
<
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
<
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
<
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
103
|
+
<div class="border-b border-gray-200">
|
|
104
|
+
<div class="mx-auto max-w-7xl px-6 lg:px-8">
|
|
105
|
+
<div class="mx-auto max-w-2xl lg:max-w-none">
|
|
106
|
+
<dl
|
|
107
|
+
class="hidden lg:grid grid-cols-1 gap-0.5 overflow-hidden rounded-2xl text-center sm:grid-cols-4 lg:grid-cols-4"
|
|
108
|
+
>
|
|
109
|
+
<div class="flex flex-col p-8">
|
|
110
|
+
<dt class="text-sm font-semibold leading-6 text-gray-600"># owned domains</dt>
|
|
111
|
+
<dd class="order-first text-3xl font-semibold tracking-tight text-gray-900">{ownedDomainsList.length}</dd>
|
|
112
|
+
</div>
|
|
113
|
+
<div class="flex flex-col p-8">
|
|
114
|
+
<dt class="text-sm font-semibold leading-6 text-gray-600"># owned services</dt>
|
|
115
|
+
<dd class="order-first text-3xl font-semibold tracking-tight text-gray-900">{ownedServicesList.length}</dd>
|
|
116
|
+
</div>
|
|
117
|
+
<div class="flex flex-col p-8">
|
|
118
|
+
<dt class="text-sm font-semibold leading-6 text-gray-600"># owned messages</dt>
|
|
119
|
+
<dd class="order-first text-3xl font-semibold tracking-tight text-gray-900">{ownedMessageList.length}</dd>
|
|
120
|
+
</div>
|
|
121
|
+
<!-- <div class="flex flex-col p-8">
|
|
116
122
|
<dt class="text-sm font-semibold leading-6 text-gray-600"># owned domains</dt>
|
|
117
123
|
<dd class="order-first text-3xl font-semibold tracking-tight text-gray-900">2</dd>
|
|
118
124
|
</div> -->
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
125
|
+
<div class="flex flex-col p-8">
|
|
126
|
+
<dt class="text-sm font-semibold leading-6 text-gray-600"># teams joined</dt>
|
|
127
|
+
<dd class="order-first text-3xl font-semibold tracking-tight text-gray-900">{associatedTeams.length}</dd>
|
|
128
|
+
</div>
|
|
129
|
+
</dl>
|
|
130
|
+
</div>
|
|
124
131
|
</div>
|
|
125
132
|
</div>
|
|
133
|
+
<div class="prose prose-md py-4 w-full">
|
|
134
|
+
<Content components={components(props)} />
|
|
135
|
+
</div>
|
|
126
136
|
</div>
|
|
127
|
-
<
|
|
128
|
-
<
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
137
|
+
<aside class="hidden lg:block sticky top-0 h-[calc(100vh-theme(spacing.16))] w-72 overflow-y-auto py-2">
|
|
138
|
+
<div class="divide-y-2 divide-gray-100 pr-6">
|
|
139
|
+
{
|
|
140
|
+
ownedDomainsList.length > 0 && (
|
|
141
|
+
<PillListFlat
|
|
142
|
+
color="pink"
|
|
143
|
+
title={`Owned domains (${ownedDomainsList.length})`}
|
|
144
|
+
pills={ownedDomainsList}
|
|
145
|
+
emptyMessage={`${props.data.name} does not own any domains.`}
|
|
146
|
+
client:load
|
|
147
|
+
/>
|
|
148
|
+
)
|
|
149
|
+
}
|
|
150
|
+
{
|
|
151
|
+
ownedServicesList.length > 0 && (
|
|
152
|
+
<PillListFlat
|
|
153
|
+
color="pink"
|
|
154
|
+
title={`Owned services (${ownedServicesList.length})`}
|
|
155
|
+
pills={ownedServicesList}
|
|
156
|
+
emptyMessage={`${props.data.name} does not own any services.`}
|
|
157
|
+
client:load
|
|
158
|
+
/>
|
|
159
|
+
)
|
|
160
|
+
}
|
|
161
|
+
{
|
|
162
|
+
ownedMessageList.length > 0 && (
|
|
163
|
+
<PillListFlat
|
|
164
|
+
color="orange"
|
|
165
|
+
title={`Owned messages (${ownedMessageList.length})`}
|
|
166
|
+
pills={ownedMessageList}
|
|
167
|
+
emptyMessage={`${props.data.name} does not own any messages.`}
|
|
168
|
+
client:load
|
|
169
|
+
/>
|
|
170
|
+
)
|
|
171
|
+
}
|
|
172
|
+
{
|
|
173
|
+
associatedTeams.length > 0 && (
|
|
174
|
+
<OwnersList
|
|
175
|
+
title={`Member of team (${associatedTeams.length})`}
|
|
176
|
+
owners={associatedTeams}
|
|
177
|
+
emptyMessage={`${props.data.name} is not part of any documented team.`}
|
|
178
|
+
client:load
|
|
179
|
+
/>
|
|
180
|
+
)
|
|
181
|
+
}
|
|
182
|
+
</div>
|
|
183
|
+
</aside>
|
|
184
|
+
</div>
|
|
185
|
+
</main>
|
|
186
|
+
</VerticalSideBarLayout>
|
|
164
187
|
|
|
165
188
|
<style>
|
|
166
189
|
.docs-layout .prose {
|
|
167
190
|
max-width: none;
|
|
191
|
+
overflow: auto;
|
|
168
192
|
}
|
|
169
193
|
</style>
|
package/src/pages/index.astro
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
---
|
|
2
|
-
import Footer from '@layouts/Footer.astro';
|
|
3
|
-
import PlainPage from '@layouts/PlainPage.astro';
|
|
4
2
|
import { buildUrl } from '@utils/url-builder';
|
|
5
3
|
import {
|
|
6
4
|
BoltIcon,
|
|
@@ -16,86 +14,108 @@ import { getDomains } from '@utils/domains/domains';
|
|
|
16
14
|
import { getServices } from '@utils/services/services';
|
|
17
15
|
import { getFlows } from '@utils/flows/flows';
|
|
18
16
|
import DiscoverInsight from '@components/DiscoverInsight.astro';
|
|
17
|
+
import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
18
|
+
import { BookOpen, BookOpenText, TableProperties, Workflow } from 'lucide-react';
|
|
19
19
|
|
|
20
20
|
const { commands = [], events = [], queries = [] } = await getMessages();
|
|
21
21
|
const domains = await getDomains();
|
|
22
22
|
const services = await getServices();
|
|
23
23
|
const flows = await getFlows();
|
|
24
|
+
|
|
25
|
+
const getDefaultUrl = (route: string, defaultValue: string) => {
|
|
26
|
+
if (domains.length > 0) return buildUrl(`/${route}/domains/${domains[0].data.id}/${domains[0].data.latestVersion}`);
|
|
27
|
+
if (services.length > 0) return buildUrl(`/${route}/services/${services[0].data.id}/${services[0].data.latestVersion}`);
|
|
28
|
+
if (flows.length > 0) return buildUrl(`/${route}/flows/${flows[0].data.id}/${flows[0].data.latestVersion}`);
|
|
29
|
+
return buildUrl(defaultValue);
|
|
30
|
+
};
|
|
24
31
|
---
|
|
25
32
|
|
|
26
|
-
<
|
|
33
|
+
<VerticalSideBarLayout title="EventCatalog">
|
|
27
34
|
<body class="min-h-screen">
|
|
28
|
-
<main class="
|
|
29
|
-
<
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
<main class="">
|
|
36
|
+
<div class="container mx-auto px-6 py-20 max-w-[90em]">
|
|
37
|
+
<section class="text-center mb-8">
|
|
38
|
+
<h1 class="text-5xl font-bold mb-6 text-gray-800">Welcome to <span class="text-primary">EventCatalog</span></h1>
|
|
39
|
+
<p class="text-xl mb-8 text-gray-700 max-w-2xl mx-auto font-light">
|
|
40
|
+
Discover and document your event-driven architecture effortlessly. EventCatalog centralizes your events, services, and
|
|
41
|
+
schemas in one place.
|
|
42
|
+
</p>
|
|
43
|
+
</section>
|
|
36
44
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
45
|
+
<div class="hidden md:block">
|
|
46
|
+
<!-- <h2 class="text-center text-xl ">Architecture insights</h2> -->
|
|
47
|
+
<section class="mb-16 bg-white rounded-xl shadow-lg p-6">
|
|
48
|
+
<div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4">
|
|
49
|
+
<DiscoverInsight color="text-yellow-600" dataTarget={domains.length} icon={RectangleGroupIcon} label="domains" />
|
|
42
50
|
|
|
43
|
-
|
|
51
|
+
<DiscoverInsight color="text-pink-500" dataTarget={services.length} icon={ServerIcon} label="services" />
|
|
44
52
|
|
|
45
|
-
|
|
53
|
+
<DiscoverInsight color="text-blue-500" dataTarget={commands.length} icon={ChatBubbleLeftIcon} label="commands" />
|
|
46
54
|
|
|
47
|
-
|
|
55
|
+
<DiscoverInsight color="text-green-500" dataTarget={queries.length} icon={MagnifyingGlassIcon} label="queries" />
|
|
48
56
|
|
|
49
|
-
|
|
57
|
+
<DiscoverInsight color="text-orange-400" dataTarget={events.length} icon={BoltIcon} label="events" />
|
|
50
58
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
59
|
+
<DiscoverInsight color="text-green-800" dataTarget={flows.length} icon={QueueListIcon} label="flows" />
|
|
60
|
+
</div>
|
|
61
|
+
</section>
|
|
54
62
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
<section class="grid grid-cols-1 md:grid-cols-3 gap-8 mb-16">
|
|
64
|
+
<div
|
|
65
|
+
class="bg-white rounded-xl shadow-lg overflow-hidden hover:shadow-xl transition duration-300 transform hover:-translate-y-1"
|
|
66
|
+
>
|
|
67
|
+
<div class="h-2 bg-blue-400"></div>
|
|
68
|
+
<div class="p-6">
|
|
69
|
+
<h2 class="text-2xl font-semibold mb-4 text-blue-700 flex items-center">
|
|
70
|
+
<BookOpenText size={24} className="inline-block mr-2" />
|
|
71
|
+
<span class="block">Documentation</span>
|
|
72
|
+
</h2>
|
|
73
|
+
<p class="text-gray-600 mb-4">
|
|
74
|
+
Create and maintain comprehensive documentation for your events, including schemas, examples, and versioning.
|
|
75
|
+
</p>
|
|
76
|
+
<a href={getDefaultUrl('docs', '/docs')} class="text-blue-600 hover:text-blue-800 font-semibold">Explore docs →</a
|
|
77
|
+
>
|
|
78
|
+
</div>
|
|
66
79
|
</div>
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
80
|
+
<div
|
|
81
|
+
class="bg-white rounded-xl shadow-lg overflow-hidden hover:shadow-xl transition duration-300 transform hover:-translate-y-1"
|
|
82
|
+
>
|
|
83
|
+
<div class="h-2 bg-teal-400"></div>
|
|
84
|
+
<div class="p-6">
|
|
85
|
+
<h2 class="text-2xl font-semibold mb-4 text-teal-700 flex items-center">
|
|
86
|
+
<Workflow size={24} className="inline-block mr-2" />
|
|
87
|
+
<span class="block">Visualiser</span>
|
|
88
|
+
</h2>
|
|
89
|
+
<p class="text-gray-600 mb-4">
|
|
90
|
+
Transform complex event flows into clear, interactive diagrams. Gain insights at a glance and communicate
|
|
91
|
+
effectively across teams.
|
|
92
|
+
</p>
|
|
93
|
+
<a href={getDefaultUrl('visualiser', '/visualiser')} class="text-teal-600 hover:text-teal-800 font-semibold"
|
|
94
|
+
>Explore visualiser →</a
|
|
95
|
+
>
|
|
96
|
+
</div>
|
|
79
97
|
</div>
|
|
80
|
-
</div>
|
|
81
98
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
99
|
+
<div
|
|
100
|
+
class="bg-white rounded-xl shadow-lg overflow-hidden hover:shadow-xl transition duration-300 transform hover:-translate-y-1"
|
|
101
|
+
>
|
|
102
|
+
<div class="h-2 bg-red-700"></div>
|
|
103
|
+
<div class="p-6">
|
|
104
|
+
<h2 class="text-2xl font-semibold mb-4 text-red-700 flex items-center">
|
|
105
|
+
<TableProperties size={24} className="inline-block mr-2" />
|
|
106
|
+
<span class="block">Discover</span>
|
|
107
|
+
</h2>
|
|
108
|
+
<p class="text-gray-600 mb-4">
|
|
109
|
+
Dive deep into your event catalog. Search, filter, and analyze your events to gain insights and improve your
|
|
110
|
+
architecture.
|
|
111
|
+
</p>
|
|
112
|
+
<a href={buildUrl('/discover/events')} class="text-red-600 hover:text-red-800 font-semibold">Start exploring →</a>
|
|
113
|
+
</div>
|
|
93
114
|
</div>
|
|
94
|
-
</
|
|
95
|
-
</
|
|
115
|
+
</section>
|
|
116
|
+
</div>
|
|
117
|
+
<!-- <Footer className="px-10" /> -->
|
|
96
118
|
</div>
|
|
97
119
|
</main>
|
|
98
120
|
</body>
|
|
99
|
-
</
|
|
100
|
-
|
|
101
|
-
<Footer className="px-10" />
|
|
121
|
+
</VerticalSideBarLayout>
|
|
@@ -6,6 +6,7 @@ import { getFlows } from '@utils/flows/flows';
|
|
|
6
6
|
import { buildUrl } from '@utils/url-builder';
|
|
7
7
|
|
|
8
8
|
import { pageDataLoader } from '@utils/pages/pages';
|
|
9
|
+
import { ViewTransitions } from 'astro:transitions';
|
|
9
10
|
type PageTypesWithFlows = PageTypes | 'flows';
|
|
10
11
|
|
|
11
12
|
export async function getStaticPaths() {
|
|
@@ -41,7 +42,7 @@ const {
|
|
|
41
42
|
---
|
|
42
43
|
|
|
43
44
|
<VisualiserLayout title={`Visualiser | ${props.data.name} (${props.collection})`} description={props.data.summary}>
|
|
44
|
-
<div class="bg-gray-100/50">
|
|
45
|
+
<div class="bg-gray-100/50 m-4">
|
|
45
46
|
<div class="h-[calc(100vh-110px)] w-full relative border border-gray-200" id={`${id}-portal`} transition:animate="fade"></div>
|
|
46
47
|
<NodeGraph
|
|
47
48
|
id={id}
|
|
@@ -57,4 +58,5 @@ const {
|
|
|
57
58
|
}}
|
|
58
59
|
/>
|
|
59
60
|
</div>
|
|
61
|
+
<ViewTransitions />
|
|
60
62
|
</VisualiserLayout>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ServerIcon,
|
|
3
|
+
RectangleGroupIcon,
|
|
4
|
+
BoltIcon,
|
|
5
|
+
ChatBubbleLeftIcon,
|
|
6
|
+
MagnifyingGlassIcon,
|
|
7
|
+
QueueListIcon,
|
|
8
|
+
UserGroupIcon,
|
|
9
|
+
UserIcon,
|
|
10
|
+
} from '@heroicons/react/24/outline';
|
|
11
|
+
|
|
12
|
+
export const getIconForCollection = (collection: string) => {
|
|
13
|
+
switch (collection) {
|
|
14
|
+
case 'domains':
|
|
15
|
+
return RectangleGroupIcon;
|
|
16
|
+
case 'services':
|
|
17
|
+
return ServerIcon;
|
|
18
|
+
case 'events':
|
|
19
|
+
return BoltIcon;
|
|
20
|
+
case 'commands':
|
|
21
|
+
return ChatBubbleLeftIcon;
|
|
22
|
+
case 'queries':
|
|
23
|
+
return MagnifyingGlassIcon;
|
|
24
|
+
case 'flows':
|
|
25
|
+
return QueueListIcon;
|
|
26
|
+
case 'teams':
|
|
27
|
+
return UserGroupIcon;
|
|
28
|
+
case 'users':
|
|
29
|
+
return UserIcon;
|
|
30
|
+
default:
|
|
31
|
+
return ServerIcon;
|
|
32
|
+
}
|
|
33
|
+
};
|
package/tailwind.config.mjs
CHANGED
|
@@ -24,7 +24,8 @@ export default {
|
|
|
24
24
|
safelist: [
|
|
25
25
|
{ pattern: /border-.*-(200|400|500)/ },
|
|
26
26
|
{ pattern: /bg-.*-(100|200|400|500)/ },
|
|
27
|
-
{ pattern: /from-.*-(100|200|400|500|700)/ },
|
|
27
|
+
{ pattern: /from-.*-(100|200|300|400|500|700)/ },
|
|
28
|
+
{ pattern: /to-.*-(100|200|300|400|500|700)/ },
|
|
28
29
|
{ pattern: /text-.*-(400|500|800)/ },
|
|
29
30
|
'border-blue-200',
|
|
30
31
|
'border-green-300',
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Disclosure, DisclosureButton, DisclosurePanel } from '@headlessui/react';
|
|
2
|
-
import { ChevronDownIcon } from '@heroicons/react/20/solid';
|
|
3
|
-
|
|
4
|
-
interface Props {
|
|
5
|
-
title: string;
|
|
6
|
-
color: string;
|
|
7
|
-
items: {
|
|
8
|
-
label: string;
|
|
9
|
-
version: string;
|
|
10
|
-
badge?: string;
|
|
11
|
-
href: string;
|
|
12
|
-
color: string;
|
|
13
|
-
active: boolean;
|
|
14
|
-
}[];
|
|
15
|
-
emptyMessage: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const BasicList = ({ title, items, emptyMessage, color = 'gray' }: Props) => {
|
|
19
|
-
return (
|
|
20
|
-
<div>
|
|
21
|
-
<div className="mx-auto w-full max-w-lg divide-y divide-white/5 rounded-xl bg-white/5 py-2 ">
|
|
22
|
-
<Disclosure as="div" className="pb-4" defaultOpen={true}>
|
|
23
|
-
<DisclosureButton className="group flex w-full items-center justify-between">
|
|
24
|
-
<span className="font-semibold capitalize"> {title} </span>
|
|
25
|
-
<ChevronDownIcon className="size-5 fill-black/60 group-data-[hover]:fill-black/50 group-data-[open]:rotate-180" />
|
|
26
|
-
</DisclosureButton>
|
|
27
|
-
<DisclosurePanel className="mt-2 text-sm/5 text-black/80">
|
|
28
|
-
<ul role="list" className="">
|
|
29
|
-
{items.map((item) => {
|
|
30
|
-
return (
|
|
31
|
-
<li key={item.version} className="px-2 w-full text-md xl:text-lg border-l border-gray-200 py-1 ">
|
|
32
|
-
<a
|
|
33
|
-
className={`flex justify-between items-center w-full px-2 rounded-md font-normal ${item.active ? 'bg-primary/10 text-primary ' : 'font-thin'}`}
|
|
34
|
-
href={item.href}
|
|
35
|
-
>
|
|
36
|
-
<span className="block truncate !whitespace-normal">{item.label}</span>
|
|
37
|
-
{item.version && (
|
|
38
|
-
<span className="block text-sm bg-primary/20 p-0.5 px-1 text-gray-600 rounded-md font-light">
|
|
39
|
-
v{item.version}
|
|
40
|
-
</span>
|
|
41
|
-
)}
|
|
42
|
-
</a>
|
|
43
|
-
</li>
|
|
44
|
-
);
|
|
45
|
-
})}
|
|
46
|
-
{items.length === 0 && (
|
|
47
|
-
<li className="inline mr-2 leading-6 text-sm">
|
|
48
|
-
<span className="text-gray-500">{emptyMessage}</span>
|
|
49
|
-
</li>
|
|
50
|
-
)}
|
|
51
|
-
</ul>
|
|
52
|
-
</DisclosurePanel>
|
|
53
|
-
</Disclosure>
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
);
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export default BasicList;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
interface Props {
|
|
3
|
-
title: string;
|
|
4
|
-
description?: string;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
const { title, description } = Astro.props;
|
|
8
|
-
|
|
9
|
-
import SideBar from '../components/DocsNavigation.astro';
|
|
10
|
-
import Header from '../components/Header.astro';
|
|
11
|
-
import SEO from '../components/Seo.astro';
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
<!doctype html>
|
|
15
|
-
<html lang="en">
|
|
16
|
-
<head>
|
|
17
|
-
<SEO title={`EventCatalog | ${title}`} description={description} ogTitle={title} />
|
|
18
|
-
</head>
|
|
19
|
-
<body>
|
|
20
|
-
<div class="px-10 max-w-[120em] mx-auto">
|
|
21
|
-
<Header />
|
|
22
|
-
|
|
23
|
-
<div>
|
|
24
|
-
<nav class="hidden sm:flex grow w-56 xl:w-[19em] fixed overflow-y-auto h-full">
|
|
25
|
-
<div class="w-full">
|
|
26
|
-
<div class="sticky top-0 z-10 h-8 pointer-events-none -mt-4">
|
|
27
|
-
<div class="h-full bg-gradient-to-b from-white to-transparent"></div>
|
|
28
|
-
</div>
|
|
29
|
-
<SideBar />
|
|
30
|
-
</div>
|
|
31
|
-
</nav>
|
|
32
|
-
|
|
33
|
-
<div class="pl-0 sm:pl-64 lg:pl-72 xl:pl-80 w-full pt-0 pb-40">
|
|
34
|
-
<slot />
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
</body>
|
|
39
|
-
</html>
|
|
40
|
-
|
|
41
|
-
<style is:global>
|
|
42
|
-
.expressive-code {
|
|
43
|
-
margin: 1.2em 0;
|
|
44
|
-
}
|
|
45
|
-
html {
|
|
46
|
-
scroll-behavior: smooth;
|
|
47
|
-
}
|
|
48
|
-
h1,
|
|
49
|
-
h2,
|
|
50
|
-
h3 {
|
|
51
|
-
scroll-behavior: smooth;
|
|
52
|
-
scroll-margin: 70px;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.react-flow__handle {
|
|
56
|
-
opacity: 0;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.react-flow__attribution {
|
|
60
|
-
opacity: 0.1;
|
|
61
|
-
}
|
|
62
|
-
</style>
|