@eventcatalog/core 2.32.2 → 2.33.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 +8 -4
- package/dist/analytics/log-build.d.cts +3 -2
- package/dist/analytics/log-build.d.ts +3 -2
- package/dist/analytics/log-build.js +3 -3
- package/dist/{chunk-DSBB2TAS.js → chunk-MC6EBL4I.js} +1 -1
- package/dist/{chunk-IHJ2QDXX.js → chunk-MXEVMOGW.js} +8 -4
- package/dist/{chunk-JJKQS722.js → chunk-TNU27WQF.js} +1 -1
- package/dist/{chunk-NJGR7XUU.js → chunk-ZIZUBYNO.js} +52 -9
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +79 -23
- package/dist/eventcatalog.js +27 -16
- package/dist/features.cjs +54 -10
- package/dist/features.d.cts +3 -2
- package/dist/features.d.ts +3 -2
- package/dist/features.js +5 -3
- package/eventcatalog/public/images/eventcatalog-upgrade.png +0 -0
- package/eventcatalog/src/enterprise/ai-assistant/components/ChatSidebar.tsx +59 -61
- package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +72 -34
- package/eventcatalog/src/pages/chat/feature.astro +159 -0
- package/eventcatalog/src/pages/chat/index.astro +6 -2
- package/eventcatalog/src/pages/docs/custom/[...path]/index.astro +3 -9
- package/eventcatalog/src/pages/docs/custom/feature.astro +165 -0
- package/eventcatalog/src/pages/docs/custom/index.astro +6 -2
- package/eventcatalog/src/pages/plans/index.astro +292 -0
- package/eventcatalog/src/utils/feature.ts +21 -5
- package/package.json +1 -1
- package/eventcatalog/src/pages/pro/index.astro +0 -272
package/dist/features.cjs
CHANGED
|
@@ -31,7 +31,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var features_exports = {};
|
|
32
32
|
__export(features_exports, {
|
|
33
33
|
isBackstagePluginEnabled: () => isBackstagePluginEnabled,
|
|
34
|
-
|
|
34
|
+
isEventCatalogScaleEnabled: () => isEventCatalogScaleEnabled,
|
|
35
|
+
isEventCatalogStarterEnabled: () => isEventCatalogStarterEnabled
|
|
35
36
|
});
|
|
36
37
|
module.exports = __toCommonJS(features_exports);
|
|
37
38
|
var import_boxen = __toESM(require("boxen"), 1);
|
|
@@ -77,8 +78,8 @@ var isBackstagePluginEnabled = async (licenseKey) => {
|
|
|
77
78
|
}
|
|
78
79
|
return true;
|
|
79
80
|
};
|
|
80
|
-
var
|
|
81
|
-
const LICENSE_KEY = process.env.
|
|
81
|
+
var isEventCatalogScaleEnabled = async (licenseKey) => {
|
|
82
|
+
const LICENSE_KEY = process.env.EVENTCATALOG_SCALE_LICENSE_KEY || null;
|
|
82
83
|
if (!LICENSE_KEY) {
|
|
83
84
|
return false;
|
|
84
85
|
}
|
|
@@ -91,28 +92,70 @@ var isEventCatalogProEnabled = async (licenseKey) => {
|
|
|
91
92
|
});
|
|
92
93
|
if (response.status !== 200) {
|
|
93
94
|
console.log(
|
|
94
|
-
"\nTried to verify your EventCatalog
|
|
95
|
+
"\nTried to verify your EventCatalog Scale plan, but your license key is not valid. Please check your license key or purchase a license at https://eventcatalog.cloud/\n"
|
|
95
96
|
);
|
|
96
97
|
return false;
|
|
97
98
|
}
|
|
98
99
|
if (response.status === 200) {
|
|
99
100
|
const data = await response.json();
|
|
100
|
-
if ("@eventcatalog/eventcatalog-
|
|
101
|
+
if ("@eventcatalog/eventcatalog-scale" !== data.plugin) {
|
|
101
102
|
console.log(
|
|
102
|
-
"\nInvalid license key for EventCatalog
|
|
103
|
+
"\nInvalid license key for EventCatalog Scale plan, please check your license key or purchase a license at https://eventcatalog.cloud/\n"
|
|
103
104
|
);
|
|
104
105
|
return false;
|
|
105
106
|
}
|
|
106
|
-
let message = "EventCatalog
|
|
107
|
+
let message = "EventCatalog Scale plan is enabled for EventCatalog";
|
|
107
108
|
if (data.is_trial) {
|
|
108
|
-
message += "\nYou are using a trial license for EventCatalog
|
|
109
|
+
message += "\nYou are using a trial license for EventCatalog Scale plan.";
|
|
109
110
|
}
|
|
110
111
|
console.log(
|
|
111
112
|
(0, import_boxen.default)(message, {
|
|
112
113
|
padding: 1,
|
|
113
114
|
margin: 1,
|
|
114
115
|
borderColor: "green",
|
|
115
|
-
title: "@eventcatalog/eventcatalog-
|
|
116
|
+
title: "@eventcatalog/eventcatalog-scale",
|
|
117
|
+
titleAlignment: "center"
|
|
118
|
+
})
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
return true;
|
|
122
|
+
};
|
|
123
|
+
var isEventCatalogStarterEnabled = async (licenseKey) => {
|
|
124
|
+
const LICENSE_KEY = process.env.EVENTCATALOG_STARTER_LICENSE_KEY || null;
|
|
125
|
+
if (!LICENSE_KEY) {
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
const response = await fetch("https://api.eventcatalog.cloud/functions/v1/license", {
|
|
129
|
+
method: "POST",
|
|
130
|
+
headers: {
|
|
131
|
+
Authorization: `Bearer ${LICENSE_KEY}`,
|
|
132
|
+
"Content-Type": "application/json"
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
if (response.status !== 200) {
|
|
136
|
+
console.log(
|
|
137
|
+
"\nTried to verify your EventCatalog Starter plan, but your license key is not valid. Please check your license key or purchase a license at https://eventcatalog.cloud/\n"
|
|
138
|
+
);
|
|
139
|
+
return false;
|
|
140
|
+
}
|
|
141
|
+
if (response.status === 200) {
|
|
142
|
+
const data = await response.json();
|
|
143
|
+
if ("@eventcatalog/eventcatalog-starter" !== data.plugin) {
|
|
144
|
+
console.log(
|
|
145
|
+
"\nInvalid license key for EventCatalog Starter plan, please check your license key or purchase a license at https://eventcatalog.cloud/\n"
|
|
146
|
+
);
|
|
147
|
+
return false;
|
|
148
|
+
}
|
|
149
|
+
let message = "EventCatalog Starter plan is enabled for EventCatalog";
|
|
150
|
+
if (data.is_trial) {
|
|
151
|
+
message += "\nYou are using a trial license for EventCatalog Starter Plan.";
|
|
152
|
+
}
|
|
153
|
+
console.log(
|
|
154
|
+
(0, import_boxen.default)(message, {
|
|
155
|
+
padding: 1,
|
|
156
|
+
margin: 1,
|
|
157
|
+
borderColor: "green",
|
|
158
|
+
title: "@eventcatalog/eventcatalog-starter",
|
|
116
159
|
titleAlignment: "center"
|
|
117
160
|
})
|
|
118
161
|
);
|
|
@@ -122,5 +165,6 @@ var isEventCatalogProEnabled = async (licenseKey) => {
|
|
|
122
165
|
// Annotate the CommonJS export names for ESM import in node:
|
|
123
166
|
0 && (module.exports = {
|
|
124
167
|
isBackstagePluginEnabled,
|
|
125
|
-
|
|
168
|
+
isEventCatalogScaleEnabled,
|
|
169
|
+
isEventCatalogStarterEnabled
|
|
126
170
|
});
|
package/dist/features.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
declare const isBackstagePluginEnabled: (licenseKey?: string) => Promise<boolean>;
|
|
2
|
-
declare const
|
|
2
|
+
declare const isEventCatalogScaleEnabled: (licenseKey?: string) => Promise<boolean>;
|
|
3
|
+
declare const isEventCatalogStarterEnabled: (licenseKey?: string) => Promise<boolean>;
|
|
3
4
|
|
|
4
|
-
export { isBackstagePluginEnabled,
|
|
5
|
+
export { isBackstagePluginEnabled, isEventCatalogScaleEnabled, isEventCatalogStarterEnabled };
|
package/dist/features.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
declare const isBackstagePluginEnabled: (licenseKey?: string) => Promise<boolean>;
|
|
2
|
-
declare const
|
|
2
|
+
declare const isEventCatalogScaleEnabled: (licenseKey?: string) => Promise<boolean>;
|
|
3
|
+
declare const isEventCatalogStarterEnabled: (licenseKey?: string) => Promise<boolean>;
|
|
3
4
|
|
|
4
|
-
export { isBackstagePluginEnabled,
|
|
5
|
+
export { isBackstagePluginEnabled, isEventCatalogScaleEnabled, isEventCatalogStarterEnabled };
|
package/dist/features.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isBackstagePluginEnabled,
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
isEventCatalogScaleEnabled,
|
|
4
|
+
isEventCatalogStarterEnabled
|
|
5
|
+
} from "./chunk-ZIZUBYNO.js";
|
|
5
6
|
export {
|
|
6
7
|
isBackstagePluginEnabled,
|
|
7
|
-
|
|
8
|
+
isEventCatalogScaleEnabled,
|
|
9
|
+
isEventCatalogStarterEnabled
|
|
8
10
|
};
|
|
Binary file
|
|
@@ -90,66 +90,6 @@ const Sidebar: React.FC<{}> = () => {
|
|
|
90
90
|
|
|
91
91
|
{/* Beta Message */}
|
|
92
92
|
<div className="p-4 text-xs text-gray-500 border-t border-gray-200">
|
|
93
|
-
<div className="flex items-center justify-between mb-2">
|
|
94
|
-
<p className="font-bold">This feature is currently in beta.</p>
|
|
95
|
-
<Dialog.Root open={showHelp} onOpenChange={setShowHelp}>
|
|
96
|
-
<Dialog.Trigger asChild>
|
|
97
|
-
<button title="Help" className="p-1.5 text-gray-500 hover:text-gray-700 hover:bg-gray-100 rounded-lg">
|
|
98
|
-
<svg xmlns="http://www.w3.org/2000/svg" className="h-4 w-4" viewBox="0 0 20 20" fill="currentColor">
|
|
99
|
-
<path
|
|
100
|
-
fillRule="evenodd"
|
|
101
|
-
d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z"
|
|
102
|
-
clipRule="evenodd"
|
|
103
|
-
/>
|
|
104
|
-
</svg>
|
|
105
|
-
</button>
|
|
106
|
-
</Dialog.Trigger>
|
|
107
|
-
<Dialog.Portal>
|
|
108
|
-
<Dialog.Overlay className="fixed inset-0 bg-black/50 z-40" />
|
|
109
|
-
<Dialog.Content className="fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-white rounded-lg z-50 p-6 w-[600px] max-h-[85vh] overflow-y-auto">
|
|
110
|
-
<Dialog.Title className="text-lg font-semibold text-gray-900 mb-4">
|
|
111
|
-
Welcome to the EventCatalog AI Assistant
|
|
112
|
-
</Dialog.Title>
|
|
113
|
-
<div className="text-sm text-gray-600 space-y-4">
|
|
114
|
-
<p>
|
|
115
|
-
This is your private AI assistant for EventCatalog. All conversations are stored locally and your data
|
|
116
|
-
remains completely private.
|
|
117
|
-
</p>
|
|
118
|
-
<p>Key features:</p>
|
|
119
|
-
<ul className="list-disc pl-4 space-y-2">
|
|
120
|
-
<li>Local-first: All conversations are stored on your device only</li>
|
|
121
|
-
<li>Privacy-focused: Your data is never shared with external servers</li>
|
|
122
|
-
<li>Persistent chat history: Access your previous conversations anytime</li>
|
|
123
|
-
<li>Multiple sessions: Organize different topics in separate chats</li>
|
|
124
|
-
</ul>
|
|
125
|
-
|
|
126
|
-
<div className="mt-6">
|
|
127
|
-
<p className="font-medium mb-2">Example prompts you can try:</p>
|
|
128
|
-
<ul className="list-disc pl-4 space-y-2 bg-gray-50 p-4 rounded-lg">
|
|
129
|
-
<li>"I want to create a new feature, what events do we have related to Payments?"</li>
|
|
130
|
-
<li>"What domains do we have and who owns them?"</li>
|
|
131
|
-
<li>"What are the events for the X domain?"</li>
|
|
132
|
-
<li>"Create me a code snippet for this event"</li>
|
|
133
|
-
</ul>
|
|
134
|
-
</div>
|
|
135
|
-
|
|
136
|
-
<p className="mt-4">For additional support or feature requests, please join our Discord community.</p>
|
|
137
|
-
</div>
|
|
138
|
-
<Dialog.Close asChild>
|
|
139
|
-
<button className="absolute top-4 right-4 text-gray-400 hover:text-gray-600" aria-label="Close">
|
|
140
|
-
<svg xmlns="http://www.w3.org/2000/svg" className="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
|
|
141
|
-
<path
|
|
142
|
-
fillRule="evenodd"
|
|
143
|
-
d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
|
|
144
|
-
clipRule="evenodd"
|
|
145
|
-
/>
|
|
146
|
-
</svg>
|
|
147
|
-
</button>
|
|
148
|
-
</Dialog.Close>
|
|
149
|
-
</Dialog.Content>
|
|
150
|
-
</Dialog.Portal>
|
|
151
|
-
</Dialog.Root>
|
|
152
|
-
</div>
|
|
153
93
|
<p>
|
|
154
94
|
Have issues or ideas? Let us know on{' '}
|
|
155
95
|
<a
|
|
@@ -160,7 +100,65 @@ const Sidebar: React.FC<{}> = () => {
|
|
|
160
100
|
>
|
|
161
101
|
Discord
|
|
162
102
|
</a>
|
|
163
|
-
|
|
103
|
+
<div className="inline-block">
|
|
104
|
+
<Dialog.Root open={showHelp} onOpenChange={setShowHelp}>
|
|
105
|
+
<Dialog.Trigger asChild>
|
|
106
|
+
<button title="Help" className="p-1.5 text-gray-500 hover:text-gray-700 hover:bg-gray-100 rounded-lg">
|
|
107
|
+
<svg xmlns="http://www.w3.org/2000/svg" className="h-3 w-3" viewBox="0 0 20 20" fill="currentColor">
|
|
108
|
+
<path
|
|
109
|
+
fillRule="evenodd"
|
|
110
|
+
d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z"
|
|
111
|
+
clipRule="evenodd"
|
|
112
|
+
/>
|
|
113
|
+
</svg>
|
|
114
|
+
</button>
|
|
115
|
+
</Dialog.Trigger>
|
|
116
|
+
<Dialog.Portal>
|
|
117
|
+
<Dialog.Overlay className="fixed inset-0 bg-black/50 z-40" />
|
|
118
|
+
<Dialog.Content className="fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-white rounded-lg z-50 p-6 w-[600px] max-h-[85vh] overflow-y-auto">
|
|
119
|
+
<Dialog.Title className="text-lg font-semibold text-gray-900 mb-4">
|
|
120
|
+
Welcome to the EventCatalog AI Assistant
|
|
121
|
+
</Dialog.Title>
|
|
122
|
+
<div className="text-sm text-gray-600 space-y-4">
|
|
123
|
+
<p>
|
|
124
|
+
This is your private AI assistant for EventCatalog. All conversations are stored locally and your data
|
|
125
|
+
remains completely private.
|
|
126
|
+
</p>
|
|
127
|
+
<p>Key features:</p>
|
|
128
|
+
<ul className="list-disc pl-4 space-y-2">
|
|
129
|
+
<li>Local-first: All conversations are stored on your device only</li>
|
|
130
|
+
<li>Privacy-focused: Your data is never shared with external servers</li>
|
|
131
|
+
<li>Persistent chat history: Access your previous conversations anytime</li>
|
|
132
|
+
<li>Multiple sessions: Organize different topics in separate chats</li>
|
|
133
|
+
</ul>
|
|
134
|
+
|
|
135
|
+
<div className="mt-6">
|
|
136
|
+
<p className="font-medium mb-2">Example prompts you can try:</p>
|
|
137
|
+
<ul className="list-disc pl-4 space-y-2 bg-gray-50 p-4 rounded-lg">
|
|
138
|
+
<li>"I want to create a new feature, what events do we have related to Payments?"</li>
|
|
139
|
+
<li>"What domains do we have and who owns them?"</li>
|
|
140
|
+
<li>"What are the events for the X domain?"</li>
|
|
141
|
+
<li>"Create me a code snippet for this event"</li>
|
|
142
|
+
</ul>
|
|
143
|
+
</div>
|
|
144
|
+
|
|
145
|
+
<p className="mt-4">For additional support or feature requests, please join our Discord community.</p>
|
|
146
|
+
</div>
|
|
147
|
+
<Dialog.Close asChild>
|
|
148
|
+
<button className="absolute top-4 right-4 text-gray-400 hover:text-gray-600" aria-label="Close">
|
|
149
|
+
<svg xmlns="http://www.w3.org/2000/svg" className="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
|
|
150
|
+
<path
|
|
151
|
+
fillRule="evenodd"
|
|
152
|
+
d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
|
|
153
|
+
clipRule="evenodd"
|
|
154
|
+
/>
|
|
155
|
+
</svg>
|
|
156
|
+
</button>
|
|
157
|
+
</Dialog.Close>
|
|
158
|
+
</Dialog.Content>
|
|
159
|
+
</Dialog.Portal>
|
|
160
|
+
</Dialog.Root>
|
|
161
|
+
</div>
|
|
164
162
|
</p>
|
|
165
163
|
</div>
|
|
166
164
|
</div>
|
|
@@ -7,17 +7,15 @@ interface Props {
|
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
9
|
BookOpenText,
|
|
10
|
-
BookText,
|
|
11
10
|
Workflow,
|
|
12
11
|
TableProperties,
|
|
13
12
|
House,
|
|
14
13
|
BookUser,
|
|
15
|
-
MessageSquare,
|
|
16
14
|
BotMessageSquare,
|
|
17
15
|
Users,
|
|
18
|
-
Star,
|
|
19
|
-
BadgeCheck,
|
|
20
16
|
Sparkles,
|
|
17
|
+
Rocket,
|
|
18
|
+
FileText,
|
|
21
19
|
} from 'lucide-react';
|
|
22
20
|
import Header from '../components/Header.astro';
|
|
23
21
|
import SEO from '../components/Seo.astro';
|
|
@@ -37,7 +35,6 @@ import { isCollectionVisibleInCatalog } from '@eventcatalog';
|
|
|
37
35
|
import { buildUrl } from '@utils/url-builder';
|
|
38
36
|
import { getQueries } from '@utils/queries';
|
|
39
37
|
import { hasLandingPageForDocs } from '@utils/pages';
|
|
40
|
-
import { isEventCatalogProEnabled } from '@utils/feature';
|
|
41
38
|
const events = await getEvents({ getAllVersions: false });
|
|
42
39
|
const commands = await getCommands({ getAllVersions: false });
|
|
43
40
|
const queries = await getQueries({ getAllVersions: false });
|
|
@@ -46,6 +43,8 @@ const domains = await getDomains({ getAllVersions: false });
|
|
|
46
43
|
const flows = await getFlows({ getAllVersions: false });
|
|
47
44
|
const customDocs = await getCollection('customPages');
|
|
48
45
|
|
|
46
|
+
import { isEventCatalogUpgradeEnabled } from '@utils/feature';
|
|
47
|
+
|
|
49
48
|
const currentPath = Astro.url.pathname;
|
|
50
49
|
|
|
51
50
|
const catalogHasDefaultLandingPageForDocs = await hasLandingPageForDocs();
|
|
@@ -93,15 +92,6 @@ const navigationItems = [
|
|
|
93
92
|
(currentPath.includes('/docs') && !currentPath.includes('/docs/custom')) || currentPath.includes('/architecture/docs/'),
|
|
94
93
|
sidebar: true,
|
|
95
94
|
},
|
|
96
|
-
{
|
|
97
|
-
id: '/docs/custom',
|
|
98
|
-
label: 'Documentation',
|
|
99
|
-
icon: BookText,
|
|
100
|
-
href: getDefaultUrl('docs/custom', '/docs/custom'),
|
|
101
|
-
current: currentPath.includes('/docs/custom'),
|
|
102
|
-
sidebar: false,
|
|
103
|
-
hidden: !isEventCatalogProEnabled(),
|
|
104
|
-
},
|
|
105
95
|
{
|
|
106
96
|
id: '/visualiser',
|
|
107
97
|
label: 'Visualiser',
|
|
@@ -135,19 +125,35 @@ const navigationItems = [
|
|
|
135
125
|
sidebar: false,
|
|
136
126
|
hidden: true,
|
|
137
127
|
},
|
|
128
|
+
].filter((item) => {
|
|
129
|
+
const userSideBarOption = userSideBarConfiguration.find((config: { id: string; visible: boolean }) => config.id === item.id);
|
|
130
|
+
return userSideBarOption ? userSideBarOption.visible : true;
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
const premiumFeatures = [
|
|
134
|
+
{
|
|
135
|
+
id: '/docs/custom',
|
|
136
|
+
label: 'Custom Documentation',
|
|
137
|
+
icon: FileText,
|
|
138
|
+
href: getDefaultUrl('docs/custom', '/docs/custom'),
|
|
139
|
+
current: currentPath.includes('/docs/custom'),
|
|
140
|
+
sidebar: false,
|
|
141
|
+
isPremium: true,
|
|
142
|
+
},
|
|
138
143
|
{
|
|
139
144
|
id: '/chat',
|
|
140
|
-
label: '
|
|
145
|
+
label: 'EventCatalog Chat',
|
|
141
146
|
icon: BotMessageSquare,
|
|
142
147
|
href: buildUrl('/chat'),
|
|
143
148
|
current: currentPath.includes('/chat'),
|
|
149
|
+
isPremium: true,
|
|
144
150
|
},
|
|
145
151
|
].filter((item) => {
|
|
146
152
|
const userSideBarOption = userSideBarConfiguration.find((config: { id: string; visible: boolean }) => config.id === item.id);
|
|
147
153
|
return userSideBarOption ? userSideBarOption.visible : true;
|
|
148
154
|
});
|
|
149
155
|
|
|
150
|
-
const currentNavigationItem = navigationItems.find((item) => item.current);
|
|
156
|
+
const currentNavigationItem = [...navigationItems, ...premiumFeatures].find((item) => item.current);
|
|
151
157
|
const { title, description } = Astro.props;
|
|
152
158
|
|
|
153
159
|
const showSideBarOnLoad = currentNavigationItem?.sidebar;
|
|
@@ -193,38 +199,70 @@ const canPageBeEmbedded = process.env.ENABLE_EMBED === 'true';
|
|
|
193
199
|
id={item.id}
|
|
194
200
|
data-role="nav-item"
|
|
195
201
|
href={item.href}
|
|
196
|
-
class={`p-1.5 inline-block transition-colors duration-200 rounded-lg ${
|
|
202
|
+
class={`p-1.5 inline-block transition-colors duration-200 rounded-lg ${
|
|
203
|
+
item.current
|
|
204
|
+
? 'text-white bg-gradient-to-b from-purple-500 to-purple-700'
|
|
205
|
+
: 'hover:bg-gradient-to-r hover:from-purple-500 hover:to-purple-700 hover:text-white text-gray-700'
|
|
206
|
+
}`}
|
|
197
207
|
>
|
|
198
208
|
<div class="has-tooltip">
|
|
199
209
|
<span class="tooltip rounded shadow-lg p-1 text-xs bg-gradient-to-l from-purple-500 to-purple-700 text-white ml-10">
|
|
200
210
|
{item.label}
|
|
201
211
|
</span>
|
|
202
|
-
<item.icon className="h-6 w-6
|
|
212
|
+
<item.icon className="h-6 w-6" />
|
|
203
213
|
</div>
|
|
204
214
|
</a>
|
|
205
215
|
);
|
|
206
216
|
})
|
|
207
217
|
}
|
|
218
|
+
|
|
219
|
+
<hr class="w-8 border-t border-gray-200" />
|
|
220
|
+
|
|
221
|
+
{
|
|
222
|
+
premiumFeatures.map((item) => (
|
|
223
|
+
<a
|
|
224
|
+
id={item.id}
|
|
225
|
+
data-role="nav-item"
|
|
226
|
+
href={item.href}
|
|
227
|
+
class={`p-1.5 inline-block transition-colors duration-200 rounded-lg mb-8 relative ${
|
|
228
|
+
item.current
|
|
229
|
+
? 'text-white bg-gradient-to-b from-purple-500 to-purple-700'
|
|
230
|
+
: 'hover:bg-gradient-to-r hover:from-purple-500 hover:to-purple-700 hover:text-white text-gray-700'
|
|
231
|
+
}`}
|
|
232
|
+
>
|
|
233
|
+
<div class="has-tooltip">
|
|
234
|
+
<span class="tooltip rounded shadow-lg p-1 text-xs bg-gradient-to-l from-indigo-500 to-indigo-700 text-white ml-10 flex items-center gap-1">
|
|
235
|
+
<Sparkles className="h-3 w-3" /> {item.label}
|
|
236
|
+
</span>
|
|
237
|
+
<item.icon className="h-6 w-6" />
|
|
238
|
+
<div class="absolute -top-1 -right-1 bg-gradient-to-r from-amber-400 to-amber-500 rounded-full p-0.5 shadow-lg">
|
|
239
|
+
<Sparkles className="h-2 w-2 text-white" />
|
|
240
|
+
</div>
|
|
241
|
+
</div>
|
|
242
|
+
</a>
|
|
243
|
+
))
|
|
244
|
+
}
|
|
208
245
|
</div>
|
|
209
246
|
|
|
210
|
-
{
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
<div class="has-tooltip">
|
|
219
|
-
<span
|
|
220
|
-
class="tooltip rounded shadow-lg p-1 text-xs bg-gradient-to-l from-purple-500 to-purple-700 text-white ml-10"
|
|
247
|
+
{
|
|
248
|
+
isEventCatalogUpgradeEnabled() && (
|
|
249
|
+
<div class="mb-4">
|
|
250
|
+
<a
|
|
251
|
+
id="/pro"
|
|
252
|
+
data-role="nav-item"
|
|
253
|
+
href={buildUrl('/plans')}
|
|
254
|
+
class={`p-1.5 inline-block transition-colors duration-200 rounded-lg ${currentPath.includes('/pro') ? 'text-white bg-gradient-to-b from-purple-500 to-purple-700' : 'bg-gradient-to-r from-purple-100 to-indigo-100 hover:from-purple-500 hover:to-purple-700 hover:text-white text-purple-700'}`}
|
|
221
255
|
>
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
256
|
+
<div class="has-tooltip">
|
|
257
|
+
<span class="tooltip rounded shadow-lg p-1 text-xs bg-gradient-to-l from-purple-500 to-purple-700 text-white ml-10">
|
|
258
|
+
Upgrade EventCatalog
|
|
259
|
+
</span>
|
|
260
|
+
<Rocket className="h-6 w-6" />
|
|
261
|
+
</div>
|
|
262
|
+
</a>
|
|
225
263
|
</div>
|
|
226
|
-
|
|
227
|
-
|
|
264
|
+
)
|
|
265
|
+
}
|
|
228
266
|
</nav>
|
|
229
267
|
</div>
|
|
230
268
|
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
---
|
|
2
|
+
import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
3
|
+
import { isEventCatalogChatEnabled as hasEventCatlaogChatLicense } from '@utils/feature';
|
|
4
|
+
import { BotMessageSquare } from 'lucide-react';
|
|
5
|
+
const hasChatLicense = hasEventCatlaogChatLicense();
|
|
6
|
+
|
|
7
|
+
if (hasChatLicense) {
|
|
8
|
+
return Astro.redirect('/chat');
|
|
9
|
+
}
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<VerticalSideBarLayout title="AI Chat">
|
|
13
|
+
<div class="min-h-[calc(100vh-60px)] bg-white">
|
|
14
|
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16">
|
|
15
|
+
{/* Hero Section */}
|
|
16
|
+
<div class="grid grid-cols-1 lg:grid-cols-2 gap-12 items-center mb-16">
|
|
17
|
+
<div>
|
|
18
|
+
<div class="inline-flex items-center px-4 py-2 rounded-full bg-purple-100 text-purple-700 font-medium text-sm mb-6">
|
|
19
|
+
<BotMessageSquare className="w-4 h-4 mr-2" />
|
|
20
|
+
New: Ask your catalog anything
|
|
21
|
+
</div>
|
|
22
|
+
<h1 class="text-4xl font-bold text-gray-900 tracking-tight mb-4">Ask. Understand. Ship faster.</h1>
|
|
23
|
+
<p class="text-xl text-gray-600 mb-8">
|
|
24
|
+
Get answers about your events, services, and domains — instantly. Runs entirely in your browser — your data never
|
|
25
|
+
leaves your machine.
|
|
26
|
+
</p>
|
|
27
|
+
<div class="flex flex-col sm:flex-row gap-4 mb-8">
|
|
28
|
+
<a
|
|
29
|
+
href="https://demo.eventcatalog.dev/chat"
|
|
30
|
+
target="_blank"
|
|
31
|
+
class="inline-flex items-center juNot ready for AI chat? You castify-center px-6 py-3 border border-transparent text-base font-medium rounded-lg text-white bg-purple-600 hover:bg-purple-700 transition-colors duration-150"
|
|
32
|
+
>
|
|
33
|
+
Try the demo
|
|
34
|
+
<svg class="ml-2 w-4 h-4" viewBox="0 0 20 20" fill="currentColor">
|
|
35
|
+
<path
|
|
36
|
+
fill-rule="evenodd"
|
|
37
|
+
d="M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z"
|
|
38
|
+
clip-rule="evenodd"></path>
|
|
39
|
+
</svg>
|
|
40
|
+
</a>
|
|
41
|
+
<a
|
|
42
|
+
href="https://www.eventcatalog.cloud"
|
|
43
|
+
target="_blank"
|
|
44
|
+
class="inline-flex items-center justify-center px-6 py-3 border border-gray-300 text-base font-medium rounded-lg text-gray-700 bg-white hover:bg-gray-50 transition-colors duration-150"
|
|
45
|
+
>
|
|
46
|
+
Try for free
|
|
47
|
+
</a>
|
|
48
|
+
</div>
|
|
49
|
+
<p class="text-sm text-gray-500">
|
|
50
|
+
Available with EventCatalog Starter or Scale plans
|
|
51
|
+
<a href="https://www.eventcatalog.dev/pricing" class="text-purple-600 font-medium block"
|
|
52
|
+
>Try free for 14 days, no credit card required</a
|
|
53
|
+
>
|
|
54
|
+
</p>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<div class="relative">
|
|
58
|
+
<div class="absolute -inset-4">
|
|
59
|
+
<div
|
|
60
|
+
class="w-full h-full max-w-full mx-auto opacity-30 blur-lg filter"
|
|
61
|
+
style="background: linear-gradient(90deg, #C084FC 0%, #818CF8 100%);"
|
|
62
|
+
>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
<div class="relative">
|
|
66
|
+
<div class="bg-white rounded-xl shadow-xl border border-gray-200 overflow-hidden">
|
|
67
|
+
<div class="bg-gray-50 px-4 py-3 border-b border-gray-200">
|
|
68
|
+
<div class="flex items-center space-x-2">
|
|
69
|
+
<div class="w-3 h-3 bg-red-400 rounded-full"></div>
|
|
70
|
+
<div class="w-3 h-3 bg-yellow-400 rounded-full"></div>
|
|
71
|
+
<div class="w-3 h-3 bg-green-400 rounded-full"></div>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
<div class="p-4 space-y-4">
|
|
75
|
+
<div class="flex justify-end">
|
|
76
|
+
<div class="bg-purple-600 text-white rounded-2xl rounded-tr-sm px-4 py-2 max-w-md text-sm">
|
|
77
|
+
What services publish order.created?
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
<div class="flex justify-start">
|
|
82
|
+
<div class="bg-gray-50 rounded-2xl rounded-tl-sm px-4 py-3 max-w-md shadow-sm">
|
|
83
|
+
<p class="text-gray-700 text-sm">
|
|
84
|
+
The <span class="font-semibold">Order Service</span> publishes the order.created event.
|
|
85
|
+
</p>
|
|
86
|
+
<p class="text-gray-700 text-sm mt-2 mb-1">This event is consumed by:</p>
|
|
87
|
+
<ul class="space-y-1 text-gray-600 text-sm">
|
|
88
|
+
<li>• Payment Service - Initiates payment processing</li>
|
|
89
|
+
<li>• Inventory Service - Updates stock levels</li>
|
|
90
|
+
<li>• Notification Service - Sends order confirmations</li>
|
|
91
|
+
</ul>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
{/* Features Section */}
|
|
101
|
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
|
|
102
|
+
<div class="bg-white rounded-xl p-6 shadow-sm border border-gray-200">
|
|
103
|
+
<div class="w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center mb-4">
|
|
104
|
+
<svg class="w-6 h-6 text-purple-600" viewBox="0 0 24 24" fill="currentColor">
|
|
105
|
+
<path
|
|
106
|
+
d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"
|
|
107
|
+
></path>
|
|
108
|
+
</svg>
|
|
109
|
+
</div>
|
|
110
|
+
<h3 class="text-lg font-semibold text-gray-900 mb-2">Instant Search</h3>
|
|
111
|
+
<p class="text-gray-600">
|
|
112
|
+
Search and understand complex service relationships in seconds with natural language queries.
|
|
113
|
+
</p>
|
|
114
|
+
</div>
|
|
115
|
+
|
|
116
|
+
<div class="bg-white rounded-xl p-6 shadow-sm border border-gray-200">
|
|
117
|
+
<div class="w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center mb-4">
|
|
118
|
+
<svg class="w-6 h-6 text-purple-600" viewBox="0 0 24 24" fill="currentColor">
|
|
119
|
+
<path
|
|
120
|
+
d="M9 21c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-1H9v1zm3-19C8.14 2 5 5.14 5 9c0 2.38 1.19 4.47 3 5.74V17c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.86-3.14-7-7-7zm2.85 11.1l-.85.6V16h-4v-2.3l-.85-.6C7.8 12.16 7 10.63 7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 1.63-.8 3.16-2.15 4.1z"
|
|
121
|
+
></path>
|
|
122
|
+
</svg>
|
|
123
|
+
</div>
|
|
124
|
+
<h3 class="text-lg font-semibold text-gray-900 mb-2">Smart Insights</h3>
|
|
125
|
+
<p class="text-gray-600">Get intelligent suggestions and insights about your architecture automatically.</p>
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
<div class="bg-white rounded-xl p-6 shadow-sm border border-gray-200">
|
|
129
|
+
<div class="w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center mb-4">
|
|
130
|
+
<svg class="w-6 h-6 text-purple-600" viewBox="0 0 24 24" fill="currentColor">
|
|
131
|
+
<path
|
|
132
|
+
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"
|
|
133
|
+
></path>
|
|
134
|
+
</svg>
|
|
135
|
+
</div>
|
|
136
|
+
<h3 class="text-lg font-semibold text-gray-900 mb-2">Privacy First</h3>
|
|
137
|
+
<p class="text-gray-600">All processing happens locally in your browser. Your data never leaves your machine.</p>
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
|
|
141
|
+
{/* Bottom Link */}
|
|
142
|
+
<div class="mt-16 text-center">
|
|
143
|
+
<a
|
|
144
|
+
href="https://www.eventcatalog.dev/docs/development/guides/customize-sidebars/application-sidebar"
|
|
145
|
+
target="_blank"
|
|
146
|
+
class="text-sm text-gray-400 hover:text-gray-500 transition-colors duration-150"
|
|
147
|
+
>
|
|
148
|
+
Not ready for AI chat? You can hide this feature in settings
|
|
149
|
+
</a>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
</VerticalSideBarLayout>
|
|
154
|
+
|
|
155
|
+
<style>
|
|
156
|
+
.scroll-smooth {
|
|
157
|
+
scroll-behavior: smooth;
|
|
158
|
+
}
|
|
159
|
+
</style>
|
|
@@ -4,9 +4,9 @@ import Chat from '@enterprise/ai-assistant/components/Chat';
|
|
|
4
4
|
import config from '@config';
|
|
5
5
|
import path from 'node:path';
|
|
6
6
|
import fs from 'node:fs';
|
|
7
|
-
|
|
7
|
+
import { isEventCatalogChatEnabled } from '@utils/feature';
|
|
8
8
|
import { Code } from 'astro-expressive-code/components';
|
|
9
|
-
|
|
9
|
+
import { buildUrl } from '@utils/url-builder';
|
|
10
10
|
const isEnabled = config.chat?.enabled || false;
|
|
11
11
|
const chatConfig = config.chat || {};
|
|
12
12
|
|
|
@@ -25,6 +25,10 @@ const generatorConfig = `
|
|
|
25
25
|
],
|
|
26
26
|
],
|
|
27
27
|
`;
|
|
28
|
+
|
|
29
|
+
if (!isEventCatalogChatEnabled()) {
|
|
30
|
+
return Astro.redirect(buildUrl('/chat/feature'));
|
|
31
|
+
}
|
|
28
32
|
---
|
|
29
33
|
|
|
30
34
|
<VerticalSideBarLayout title="AI Chat">
|