@eventcatalog/core 2.32.1 → 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.
Files changed (33) hide show
  1. package/dist/analytics/analytics.cjs +1 -1
  2. package/dist/analytics/analytics.js +2 -2
  3. package/dist/analytics/log-build.cjs +8 -4
  4. package/dist/analytics/log-build.d.cts +3 -2
  5. package/dist/analytics/log-build.d.ts +3 -2
  6. package/dist/analytics/log-build.js +3 -3
  7. package/dist/{chunk-PTMNJZTX.js → chunk-MC6EBL4I.js} +1 -1
  8. package/dist/{chunk-OW47VWAS.js → chunk-MXEVMOGW.js} +8 -4
  9. package/dist/{chunk-SPOXZSZQ.js → chunk-TNU27WQF.js} +1 -1
  10. package/dist/{chunk-NJGR7XUU.js → chunk-ZIZUBYNO.js} +52 -9
  11. package/dist/constants.cjs +1 -1
  12. package/dist/constants.js +1 -1
  13. package/dist/eventcatalog.cjs +79 -23
  14. package/dist/eventcatalog.js +27 -16
  15. package/dist/features.cjs +54 -10
  16. package/dist/features.d.cts +3 -2
  17. package/dist/features.d.ts +3 -2
  18. package/dist/features.js +5 -3
  19. package/eventcatalog/public/images/eventcatalog-upgrade.png +0 -0
  20. package/eventcatalog/src/components/MDX/Link/Link.astro +7 -0
  21. package/eventcatalog/src/components/MDX/ResourceLink/ResourceLink.astro +34 -0
  22. package/eventcatalog/src/components/MDX/components.tsx +16 -13
  23. package/eventcatalog/src/enterprise/ai-assistant/components/ChatSidebar.tsx +59 -61
  24. package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +72 -34
  25. package/eventcatalog/src/pages/chat/feature.astro +159 -0
  26. package/eventcatalog/src/pages/chat/index.astro +6 -2
  27. package/eventcatalog/src/pages/docs/custom/[...path]/index.astro +3 -9
  28. package/eventcatalog/src/pages/docs/custom/feature.astro +165 -0
  29. package/eventcatalog/src/pages/docs/custom/index.astro +6 -2
  30. package/eventcatalog/src/pages/plans/index.astro +292 -0
  31. package/eventcatalog/src/utils/feature.ts +21 -5
  32. package/package.json +5 -5
  33. 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
- isEventCatalogProEnabled: () => isEventCatalogProEnabled
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 isEventCatalogProEnabled = async (licenseKey) => {
81
- const LICENSE_KEY = process.env.EVENTCATALOG_PRO_LICENSE_KEY || null;
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 Pro license but it is not valid. Please check your license key or purchase a license at https://eventcatalog.cloud/\n"
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-pro" !== data.plugin) {
101
+ if ("@eventcatalog/eventcatalog-scale" !== data.plugin) {
101
102
  console.log(
102
- "\nInvalid license key for EventCatalog Pro, please check your license key or purchase a license at https://eventcatalog.cloud/\n"
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 Pro is enabled for 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 Pro.";
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-pro",
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
- isEventCatalogProEnabled
168
+ isEventCatalogScaleEnabled,
169
+ isEventCatalogStarterEnabled
126
170
  });
@@ -1,4 +1,5 @@
1
1
  declare const isBackstagePluginEnabled: (licenseKey?: string) => Promise<boolean>;
2
- declare const isEventCatalogProEnabled: (licenseKey?: string) => Promise<boolean>;
2
+ declare const isEventCatalogScaleEnabled: (licenseKey?: string) => Promise<boolean>;
3
+ declare const isEventCatalogStarterEnabled: (licenseKey?: string) => Promise<boolean>;
3
4
 
4
- export { isBackstagePluginEnabled, isEventCatalogProEnabled };
5
+ export { isBackstagePluginEnabled, isEventCatalogScaleEnabled, isEventCatalogStarterEnabled };
@@ -1,4 +1,5 @@
1
1
  declare const isBackstagePluginEnabled: (licenseKey?: string) => Promise<boolean>;
2
- declare const isEventCatalogProEnabled: (licenseKey?: string) => Promise<boolean>;
2
+ declare const isEventCatalogScaleEnabled: (licenseKey?: string) => Promise<boolean>;
3
+ declare const isEventCatalogStarterEnabled: (licenseKey?: string) => Promise<boolean>;
3
4
 
4
- export { isBackstagePluginEnabled, isEventCatalogProEnabled };
5
+ export { isBackstagePluginEnabled, isEventCatalogScaleEnabled, isEventCatalogStarterEnabled };
package/dist/features.js CHANGED
@@ -1,8 +1,10 @@
1
1
  import {
2
2
  isBackstagePluginEnabled,
3
- isEventCatalogProEnabled
4
- } from "./chunk-NJGR7XUU.js";
3
+ isEventCatalogScaleEnabled,
4
+ isEventCatalogStarterEnabled
5
+ } from "./chunk-ZIZUBYNO.js";
5
6
  export {
6
7
  isBackstagePluginEnabled,
7
- isEventCatalogProEnabled
8
+ isEventCatalogScaleEnabled,
9
+ isEventCatalogStarterEnabled
8
10
  };
@@ -0,0 +1,7 @@
1
+ ---
2
+ import { buildUrl } from '@utils/url-builder';
3
+
4
+ const { href } = Astro.props;
5
+ ---
6
+
7
+ <a href={buildUrl(href)} class="text-purple-500 hover:text-purple-700"><slot /></a>
@@ -0,0 +1,34 @@
1
+ ---
2
+ import { buildUrl } from '@utils/url-builder';
3
+
4
+ const resourceToCollectionMap = {
5
+ service: 'services',
6
+ event: 'events',
7
+ command: 'commands',
8
+ query: 'queries',
9
+ domain: 'domains',
10
+ flow: 'flows',
11
+ channel: 'channels',
12
+ user: 'users',
13
+ team: 'teams',
14
+ } as const;
15
+
16
+ const { id, version, type } = Astro.props;
17
+ const collection = resourceToCollectionMap[type as keyof typeof resourceToCollectionMap];
18
+ ---
19
+
20
+ {
21
+ version && (
22
+ <a href={buildUrl(`/docs/${collection}/${id}/${version}`)} class="text-purple-500 hover:text-purple-700">
23
+ <slot />
24
+ </a>
25
+ )
26
+ }
27
+
28
+ {
29
+ !version && (
30
+ <a href={buildUrl(`/docs/${collection}/${id}`)} class="text-purple-500 hover:text-purple-700">
31
+ <slot />
32
+ </a>
33
+ )
34
+ }
@@ -16,7 +16,8 @@ import MessageTable from '@components/MDX/MessageTable/MessageTable.astro';
16
16
  import ResourceGroupTable from '@components/MDX/ResourceGroupTable/ResourceGroupTable.astro';
17
17
  import Tabs from '@components/MDX/Tabs/Tabs.astro';
18
18
  import TabItem from '@components/MDX/Tabs/TabItem.astro';
19
-
19
+ import ResourceLink from '@components/MDX/ResourceLink/ResourceLink.astro';
20
+ import Link from '@components/MDX/Link/Link.astro';
20
21
  // Portals: required for server/client components
21
22
  import NodeGraphPortal from '@components/MDX/NodeGraph/NodeGraphPortal';
22
23
  import SchemaViewerPortal from '@components/MDX/SchemaViewer/SchemaViewerPortal';
@@ -26,23 +27,25 @@ const components = (props: any) => {
26
27
  return {
27
28
  Accordion,
28
29
  AccordionGroup,
30
+ Admonition,
31
+ AsyncAPI,
32
+ ChannelInformation: (mdxProp: any) => ChannelInformation({ ...props.data, ...mdxProp }),
33
+ File: (mdxProp: any) => File({ ...props, ...mdxProp }),
29
34
  Flow,
35
+ Link: (mdxProp: any) => jsx(Link, { ...props, ...mdxProp }),
36
+ MessageTable: (mdxProp: any) => jsx(MessageTable, { ...props, ...mdxProp }),
37
+ NodeGraph: (mdxProp: any) => NodeGraphPortal({ ...props.data, ...mdxProp }),
30
38
  OpenAPI,
31
- AsyncAPI,
32
- Tile,
33
- Tiles,
39
+ ResourceGroupTable: (mdxProp: any) => jsx(ResourceGroupTable, { ...props, ...mdxProp }),
40
+ ResourceLink: (mdxProp: any) => jsx(ResourceLink, { ...props, ...mdxProp }),
41
+ Schema: (mdxProp: any) => jsx(Schema, { ...props, ...mdxProp }),
42
+ SchemaViewer: (mdxProp: any) => SchemaViewerPortal({ ...props.data, ...mdxProp }),
34
43
  Step,
35
44
  Steps,
36
- Tabs,
37
45
  TabItem,
38
- Admonition,
39
- File: (mdxProp: any) => File({ ...props, ...mdxProp }),
40
- NodeGraph: (mdxProp: any) => NodeGraphPortal({ ...props.data, ...mdxProp }),
41
- ChannelInformation: (mdxProp: any) => ChannelInformation({ ...props.data, ...mdxProp }),
42
- SchemaViewer: (mdxProp: any) => SchemaViewerPortal({ ...props.data, ...mdxProp }),
43
- Schema: (mdxProp: any) => jsx(Schema, { ...props, ...mdxProp }),
44
- MessageTable: (mdxProp: any) => jsx(MessageTable, { ...props, ...mdxProp }),
45
- ResourceGroupTable: (mdxProp: any) => jsx(ResourceGroupTable, { ...props, ...mdxProp }),
46
+ Tabs,
47
+ Tile,
48
+ Tiles,
46
49
  };
47
50
  };
48
51
 
@@ -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: 'AI Assistant',
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 ${item.current ? 'text-white bg-gradient-to-b from-purple-500 to-purple-700' : 'hover:bg-gradient-to-r hover:from-purple-500 hover:to-purple-700 hover:text-white text-gray-700'}`}
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
- {/* Pro link at the bottom */}
211
- <div class="mb-4">
212
- <a
213
- id="/pro"
214
- data-role="nav-item"
215
- href={buildUrl('/pro')}
216
- 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'}`}
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
- EventCatalog Pro
223
- </span>
224
- <Sparkles className="h-6 w-6" />
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
- </a>
227
- </div>
264
+ )
265
+ }
228
266
  </nav>
229
267
  </div>
230
268