@eventcatalog/core 2.53.0 → 2.54.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-UPR7DQB2.js → chunk-E4632BOL.js} +1 -1
- package/dist/{chunk-AYGHOQI3.js → chunk-EPCSIZTP.js} +1 -1
- package/dist/{chunk-LUUBKWYP.js → chunk-MCSZBCOG.js} +5 -0
- package/dist/{chunk-K5EGYLT5.js → chunk-TWNARJRZ.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +19 -1
- package/dist/eventcatalog.js +19 -4
- package/dist/features.cjs +6 -0
- package/dist/features.d.cts +2 -1
- package/dist/features.d.ts +2 -1
- package/dist/features.js +3 -1
- package/eventcatalog/astro.config.mjs +0 -2
- package/eventcatalog/src/components/Header.astro +1 -1
- package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.astro +3 -0
- package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.tsx +213 -139
- package/eventcatalog/src/components/Search/Search.astro +102 -0
- package/eventcatalog/src/components/Search/SearchModal.tsx +815 -0
- package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/index.astro +1 -0
- package/package.json +3 -2
- package/eventcatalog/src/components/Search.astro +0 -128
|
@@ -30,6 +30,7 @@ const {
|
|
|
30
30
|
linkTo="visualiser"
|
|
31
31
|
version={props.data.version}
|
|
32
32
|
linksToVisualiser={false}
|
|
33
|
+
zoomOnScroll={true}
|
|
33
34
|
href={{
|
|
34
35
|
label: `Open documentation for ${props.data.name} v${props.data.version}`,
|
|
35
36
|
url: buildUrl(`/docs/${props.collection}/${props.data.id}/${props.data.version}`),
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"url": "https://github.com/event-catalog/eventcatalog.git"
|
|
7
7
|
},
|
|
8
8
|
"type": "module",
|
|
9
|
-
"version": "2.
|
|
9
|
+
"version": "2.54.0",
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
@@ -59,7 +59,6 @@
|
|
|
59
59
|
"astro": "^5.12.0",
|
|
60
60
|
"astro-compress": "^2.3.8",
|
|
61
61
|
"astro-expressive-code": "^0.40.1",
|
|
62
|
-
"astro-pagefind": "^1.6.0",
|
|
63
62
|
"astro-seo": "^0.8.4",
|
|
64
63
|
"auth-astro": "^4.2.0",
|
|
65
64
|
"axios": "^1.7.7",
|
|
@@ -85,6 +84,7 @@
|
|
|
85
84
|
"lucide-react": "^0.453.0",
|
|
86
85
|
"marked": "^15.0.6",
|
|
87
86
|
"mermaid": "^11.4.1",
|
|
87
|
+
"pagefind": "^1.3.0",
|
|
88
88
|
"pako": "^2.1.0",
|
|
89
89
|
"react": "^18.3.1",
|
|
90
90
|
"react-dom": "^18.3.1",
|
|
@@ -142,6 +142,7 @@
|
|
|
142
142
|
"preview": "astro preview",
|
|
143
143
|
"astro": "astro",
|
|
144
144
|
"start:catalog": "node scripts/start-catalog-locally.js",
|
|
145
|
+
"pagefind": "node scripts/pagefind.js",
|
|
145
146
|
"preview:catalog": "node scripts/preview-catalog-locally.js",
|
|
146
147
|
"generate:catalog": "node scripts/generate-catalog-locally.js",
|
|
147
148
|
"verify-build:catalog": "rimraf dist && pnpm run build:cd",
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import MagnifyingGlassIcon from '@heroicons/react/24/outline/MagnifyingGlassIcon';
|
|
3
|
-
import PageFindSearch from 'astro-pagefind/components/Search';
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
<div>
|
|
7
|
-
<div class="relative flex items-center">
|
|
8
|
-
<input
|
|
9
|
-
id="search-dummy-input"
|
|
10
|
-
type="text"
|
|
11
|
-
name="search"
|
|
12
|
-
id="search"
|
|
13
|
-
placeholder="Search EventCatalog"
|
|
14
|
-
class="block w-full rounded-md caret-transparent border-0 py-1.5 pr-14 pl-10 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 font-light sm:text-sm sm:leading-6 px-4"
|
|
15
|
-
/>
|
|
16
|
-
<MagnifyingGlassIcon className="absolute inset-y-0 -left-1 h-9 w-8 flex items-center pl-4 text-gray-400" />
|
|
17
|
-
<div class="absolute inset-y-0 right-0 flex py-1.5 pr-1.5">
|
|
18
|
-
<kbd class="inline-flex items-center rounded px-1 font-sans text-xs text-gray-400">⌘K</kbd>
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
|
|
23
|
-
<div id="search-dialog" class="hidden relative z-[100]" role="dialog" aria-modal="true">
|
|
24
|
-
<div class="fixed inset-0 bg-gray-500 bg-opacity-25 transition-opacity search-background backdrop-blur-sm bg-black/10"></div>
|
|
25
|
-
<div id="search-background" class="fixed inset-0 z-40 w-screen overflow-y-auto p-4 sm:p-6 md:p-20">
|
|
26
|
-
<div
|
|
27
|
-
id="command-pal"
|
|
28
|
-
class="mx-auto max-w-xl divide-y divide-gray-100 overflow-hidden rounded-xl bg-white shadow-2xl ring-1 ring-black ring-opacity-5 transition-all"
|
|
29
|
-
>
|
|
30
|
-
<div class="relative">
|
|
31
|
-
<svg
|
|
32
|
-
class="pointer-events-none absolute left-4 top-3.5 h-5 w-5 text-gray-400"
|
|
33
|
-
viewBox="0 0 20 20"
|
|
34
|
-
fill="currentColor"
|
|
35
|
-
aria-hidden="true"
|
|
36
|
-
>
|
|
37
|
-
<path
|
|
38
|
-
fill-rule="evenodd"
|
|
39
|
-
d="M9 3.5a5.5 5.5 0 100 11 5.5 5.5 0 000-11zM2 9a7 7 0 1112.452 4.391l3.328 3.329a.75.75 0 11-1.06 1.06l-3.329-3.328A7 7 0 012 9z"
|
|
40
|
-
clip-rule="evenodd"></path>
|
|
41
|
-
</svg>
|
|
42
|
-
<PageFindSearch id="search" className="pagefind-ui" uiOptions={{ showImages: false }} />
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
|
|
48
|
-
<script>
|
|
49
|
-
const dummyInput = document.getElementById('search-dummy-input');
|
|
50
|
-
const dialog = document.getElementById('search-dialog');
|
|
51
|
-
const header = document.getElementById('eventcatalog-header');
|
|
52
|
-
const verticalNav = document.getElementById('eventcatalog-vertical-nav');
|
|
53
|
-
|
|
54
|
-
// Listen for the short cut keys
|
|
55
|
-
window.addEventListener('keydown', (event) => {
|
|
56
|
-
if ((event.metaKey || event.ctrlKey) && event.key === 'k') {
|
|
57
|
-
event.preventDefault();
|
|
58
|
-
dummyInput?.click();
|
|
59
|
-
}
|
|
60
|
-
if (event.key === 'Escape') {
|
|
61
|
-
if (dialog) {
|
|
62
|
-
dialog.style.display = 'none';
|
|
63
|
-
if (header) header.classList.add('backdrop-blur-sm');
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
// Fake input, to load the dialog
|
|
69
|
-
if (dummyInput) {
|
|
70
|
-
dummyInput.addEventListener('click', function (e) {
|
|
71
|
-
e.preventDefault();
|
|
72
|
-
this.blur();
|
|
73
|
-
const input = document.querySelector('.pagefind-ui__search-input');
|
|
74
|
-
setTimeout(() => {
|
|
75
|
-
// @ts-ignore
|
|
76
|
-
input && input.focus();
|
|
77
|
-
}, 10);
|
|
78
|
-
if (header) header.classList.remove('backdrop-blur-sm');
|
|
79
|
-
if (verticalNav) verticalNav.style.zIndex = '-100';
|
|
80
|
-
// @ts-ignore
|
|
81
|
-
dialog.style.display = 'block';
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// Close it
|
|
86
|
-
dialog?.addEventListener('click', function (e) {
|
|
87
|
-
// @ts-ignore
|
|
88
|
-
if (e.target.id === 'search-background') {
|
|
89
|
-
if (header) header.classList.add('backdrop-blur-sm');
|
|
90
|
-
if (verticalNav) verticalNav.style.zIndex = '10';
|
|
91
|
-
dialog.style.display = 'none';
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
// document.getElementById('search-dummy-input').addEventListener('click', function () {
|
|
96
|
-
// document.getElementById('search-dialog').style.display = 'block';
|
|
97
|
-
// });
|
|
98
|
-
</script>
|
|
99
|
-
|
|
100
|
-
<style is:global>
|
|
101
|
-
.pagefind-ui__search-input,
|
|
102
|
-
#search-dummy-input {
|
|
103
|
-
outline: none;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.pagefind-ui__drawer {
|
|
107
|
-
padding: 0 1em !important;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.pagefind-ui__result {
|
|
111
|
-
padding: 0.5em 0 !important;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.pagefind-ui__results-area {
|
|
115
|
-
margin: 0 !important;
|
|
116
|
-
}
|
|
117
|
-
</style>
|
|
118
|
-
|
|
119
|
-
<!--
|
|
120
|
-
Command palette, show/hide based on modal state.
|
|
121
|
-
|
|
122
|
-
Entering: "ease-out duration-300"
|
|
123
|
-
From: "opacity-0 scale-95"
|
|
124
|
-
To: "opacity-100 scale-100"
|
|
125
|
-
Leaving: "ease-in duration-200"
|
|
126
|
-
From: "opacity-100 scale-100"
|
|
127
|
-
To: "opacity-0 scale-95"
|
|
128
|
-
-->
|