@eventcatalog/core 3.39.4 → 3.39.5

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.
@@ -37,7 +37,7 @@ var import_axios = __toESM(require("axios"), 1);
37
37
  var import_os = __toESM(require("os"), 1);
38
38
 
39
39
  // package.json
40
- var version = "3.39.4";
40
+ var version = "3.39.5";
41
41
 
42
42
  // src/constants.ts
43
43
  var VERSION = version;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "../chunk-ONQOIF2X.js";
4
- import "../chunk-WLUQZCIH.js";
3
+ } from "../chunk-H5BZMNK3.js";
4
+ import "../chunk-TNE5QSJ4.js";
5
5
  export {
6
6
  raiseEvent
7
7
  };
@@ -111,7 +111,7 @@ var import_axios = __toESM(require("axios"), 1);
111
111
  var import_os = __toESM(require("os"), 1);
112
112
 
113
113
  // package.json
114
- var version = "3.39.4";
114
+ var version = "3.39.5";
115
115
 
116
116
  // src/constants.ts
117
117
  var VERSION = version;
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  log_build_default
3
- } from "../chunk-O2CZERUN.js";
4
- import "../chunk-ONQOIF2X.js";
3
+ } from "../chunk-KVAEAYEP.js";
4
+ import "../chunk-H5BZMNK3.js";
5
5
  import "../chunk-4UVFXLPI.js";
6
- import "../chunk-WLUQZCIH.js";
6
+ import "../chunk-TNE5QSJ4.js";
7
7
  import "../chunk-5T63CXKU.js";
8
8
  export {
9
9
  log_build_default as default
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-WLUQZCIH.js";
3
+ } from "./chunk-TNE5QSJ4.js";
4
4
 
5
5
  // src/analytics/analytics.js
6
6
  import axios from "axios";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "./chunk-ONQOIF2X.js";
3
+ } from "./chunk-H5BZMNK3.js";
4
4
  import {
5
5
  countResources,
6
6
  serializeCounts
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-WLUQZCIH.js";
3
+ } from "./chunk-TNE5QSJ4.js";
4
4
 
5
5
  // src/utils/cli-logger.ts
6
6
  import pc from "picocolors";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  logger
3
- } from "./chunk-NSR4DZXS.js";
3
+ } from "./chunk-M4S7PORQ.js";
4
4
  import {
5
5
  cleanup,
6
6
  getEventCatalogConfigFile
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "3.39.4";
2
+ var version = "3.39.5";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "3.39.4";
28
+ var version = "3.39.5";
29
29
 
30
30
  // src/constants.ts
31
31
  var VERSION = version;
package/dist/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-WLUQZCIH.js";
3
+ } from "./chunk-TNE5QSJ4.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -114,7 +114,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
114
114
  var import_picocolors = __toESM(require("picocolors"), 1);
115
115
 
116
116
  // package.json
117
- var version = "3.39.4";
117
+ var version = "3.39.5";
118
118
 
119
119
  // src/constants.ts
120
120
  var VERSION = version;
@@ -13,8 +13,8 @@ import {
13
13
  } from "./chunk-K3ZVEX2Y.js";
14
14
  import {
15
15
  log_build_default
16
- } from "./chunk-O2CZERUN.js";
17
- import "./chunk-ONQOIF2X.js";
16
+ } from "./chunk-KVAEAYEP.js";
17
+ import "./chunk-H5BZMNK3.js";
18
18
  import "./chunk-4UVFXLPI.js";
19
19
  import {
20
20
  catalogToAstro
@@ -28,13 +28,13 @@ import {
28
28
  } from "./chunk-ULZYHF3V.js";
29
29
  import {
30
30
  generate
31
- } from "./chunk-PVOVC2UV.js";
31
+ } from "./chunk-S4HLJWQ7.js";
32
32
  import {
33
33
  logger
34
- } from "./chunk-NSR4DZXS.js";
34
+ } from "./chunk-M4S7PORQ.js";
35
35
  import {
36
36
  VERSION
37
- } from "./chunk-WLUQZCIH.js";
37
+ } from "./chunk-TNE5QSJ4.js";
38
38
  import {
39
39
  getEventCatalogConfigFile,
40
40
  verifyRequiredFieldsAreInCatalogConfigFile
package/dist/generate.cjs CHANGED
@@ -78,7 +78,7 @@ var getEventCatalogConfigFile = async (projectDirectory) => {
78
78
  var import_picocolors = __toESM(require("picocolors"), 1);
79
79
 
80
80
  // package.json
81
- var version = "3.39.4";
81
+ var version = "3.39.5";
82
82
 
83
83
  // src/constants.ts
84
84
  var VERSION = version;
package/dist/generate.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  generate
3
- } from "./chunk-PVOVC2UV.js";
4
- import "./chunk-NSR4DZXS.js";
5
- import "./chunk-WLUQZCIH.js";
3
+ } from "./chunk-S4HLJWQ7.js";
4
+ import "./chunk-M4S7PORQ.js";
5
+ import "./chunk-TNE5QSJ4.js";
6
6
  import "./chunk-5T63CXKU.js";
7
7
  export {
8
8
  generate
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(cli_logger_exports);
36
36
  var import_picocolors = __toESM(require("picocolors"), 1);
37
37
 
38
38
  // package.json
39
- var version = "3.39.4";
39
+ var version = "3.39.5";
40
40
 
41
41
  // src/constants.ts
42
42
  var VERSION = version;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  logger
3
- } from "../chunk-NSR4DZXS.js";
4
- import "../chunk-WLUQZCIH.js";
3
+ } from "../chunk-M4S7PORQ.js";
4
+ import "../chunk-TNE5QSJ4.js";
5
5
  export {
6
6
  logger
7
7
  };
@@ -64,6 +64,7 @@ import { isCollectionVisibleInCatalog } from '@eventcatalog';
64
64
  import { buildUrl } from '@utils/url-builder';
65
65
  import { getQueries } from '@utils/collections/queries';
66
66
  import { hasLandingPageForDocs } from '@utils/pages';
67
+ import { filterSidebarItems } from '@utils/sidebar-visibility';
67
68
 
68
69
  import { isEmbedEnabled, isCustomStylesEnabled, isEventCatalogScaleEnabled, isCustomDocsEnabled, isSSR } from '@utils/feature';
69
70
 
@@ -128,66 +129,66 @@ const getDefaultUrl = (route: string, defaultValue: string) => {
128
129
 
129
130
  const userSideBarConfiguration = config.sidebar || [];
130
131
 
131
- const navigationItems = [
132
- {
133
- id: '/',
134
- label: 'Catalog',
135
- icon: BookOpen,
136
- href: buildUrl(config.landingPage || '/'),
137
- current:
138
- currentPath === '/' ||
139
- (currentPath.includes('/docs') && !currentPath.includes('/docs/custom')) ||
140
- currentPath.includes('/architecture/') ||
141
- currentPath.includes('/visualiser') ||
142
- (currentPath.includes('/schemas') &&
143
- !currentPath.includes('/schemas/explorer') &&
144
- !currentPath.includes('/schemas/fields')),
145
- },
146
- {
147
- id: '/docs/custom',
148
- label: 'Documentation',
149
- icon: FileText,
150
- href: getDefaultUrl('docs/custom', '/docs/custom'),
151
- current: currentPath.includes('/docs/custom'),
152
- isPremium: true,
153
- visible: isCustomDocsEnabled() && customDocs.length > 0,
154
- },
155
- {
156
- id: '/schemas/explorer',
157
- label: 'Schemas',
158
- icon: FileCode,
159
- href: buildUrl('/schemas/explorer'),
160
- current: currentPath.includes('/schemas/explorer') && !currentPath.includes('/schemas/fields'),
161
- },
162
- ...(isSSR()
163
- ? [
164
- {
165
- id: '/schemas/fields',
166
- label: 'Schema Insights',
167
- icon: Waypoints,
168
- href: buildUrl('/schemas/fields'),
169
- current: currentPath.includes('/schemas/fields'),
170
- },
171
- ]
172
- : []),
173
- ].filter((item) => {
174
- const userSideBarOption = userSideBarConfiguration.find((config: { id: string; visible: boolean }) => config.id === item.id);
175
- const defaultVisible = item.visible ?? true;
176
- return userSideBarOption ? userSideBarOption.visible : defaultVisible;
177
- });
178
-
179
- const studioNavigationItem = [
180
- {
181
- id: '/studio',
182
- label: 'EventCatalog Studio',
183
- icon: SquareDashedMousePointerIcon,
184
- href: buildUrl('/studio'),
185
- current: currentPath.includes('/studio'),
186
- },
187
- ].filter((item) => {
188
- const userSideBarOption = userSideBarConfiguration.find((config: { id: string; visible: boolean }) => config.id === item.id);
189
- return userSideBarOption ? userSideBarOption.visible : true;
190
- });
132
+ const navigationItems = filterSidebarItems(
133
+ [
134
+ {
135
+ id: '/',
136
+ label: 'Catalog',
137
+ icon: BookOpen,
138
+ href: buildUrl(config.landingPage || '/'),
139
+ current:
140
+ currentPath === '/' ||
141
+ (currentPath.includes('/docs') && !currentPath.includes('/docs/custom')) ||
142
+ currentPath.includes('/architecture/') ||
143
+ currentPath.includes('/visualiser') ||
144
+ (currentPath.includes('/schemas') &&
145
+ !currentPath.includes('/schemas/explorer') &&
146
+ !currentPath.includes('/schemas/fields')),
147
+ },
148
+ {
149
+ id: '/docs/custom',
150
+ aliases: ['/docs'],
151
+ label: 'Documentation',
152
+ icon: FileText,
153
+ href: getDefaultUrl('docs/custom', '/docs/custom'),
154
+ current: currentPath.includes('/docs/custom'),
155
+ isPremium: true,
156
+ visible: isCustomDocsEnabled() && customDocs.length > 0,
157
+ },
158
+ {
159
+ id: '/schemas/explorer',
160
+ label: 'Schemas',
161
+ icon: FileCode,
162
+ href: buildUrl('/schemas/explorer'),
163
+ current: currentPath.includes('/schemas/explorer') && !currentPath.includes('/schemas/fields'),
164
+ },
165
+ ...(isSSR()
166
+ ? [
167
+ {
168
+ id: '/schemas/fields',
169
+ label: 'Schema Insights',
170
+ icon: Waypoints,
171
+ href: buildUrl('/schemas/fields'),
172
+ current: currentPath.includes('/schemas/fields'),
173
+ },
174
+ ]
175
+ : []),
176
+ ],
177
+ userSideBarConfiguration
178
+ );
179
+
180
+ const studioNavigationItem = filterSidebarItems(
181
+ [
182
+ {
183
+ id: '/studio',
184
+ label: 'EventCatalog Studio',
185
+ icon: SquareDashedMousePointerIcon,
186
+ href: buildUrl('/studio'),
187
+ current: currentPath.includes('/studio'),
188
+ },
189
+ ],
190
+ userSideBarConfiguration
191
+ );
191
192
 
192
193
  const premiumFeatures: Array<{
193
194
  id: string;
@@ -198,86 +199,119 @@ const premiumFeatures: Array<{
198
199
  isPremium?: boolean;
199
200
  }> = [];
200
201
 
201
- const browseItems = [
202
- {
203
- label: 'Domains',
204
- icon: RectangleGroupIcon,
205
- href: buildUrl('/discover/domains'),
206
- current: currentPath === buildUrl('/discover/domains'),
207
- },
208
- {
209
- label: 'Services',
210
- icon: ServerIcon,
211
- href: buildUrl('/discover/services'),
212
- current: currentPath === buildUrl('/discover/services'),
213
- },
214
- {
215
- label: 'External Systems',
216
- icon: GlobeAltIcon,
217
- href: buildUrl('/discover/external-systems'),
218
- current: currentPath === buildUrl('/discover/external-systems'),
219
- },
220
- {
221
- label: 'Events',
222
- icon: BoltIcon,
223
- href: buildUrl('/discover/events'),
224
- current: currentPath === buildUrl('/discover/events'),
225
- },
226
- {
227
- label: 'Commands',
228
- icon: ChatBubbleLeftIcon,
229
- href: buildUrl('/discover/commands'),
230
- current: currentPath === buildUrl('/discover/commands'),
231
- },
232
- {
233
- label: 'Queries',
234
- icon: MagnifyingGlassIcon,
235
- href: buildUrl('/discover/queries'),
236
- current: currentPath === buildUrl('/discover/queries'),
237
- },
238
- {
239
- label: 'Flows',
240
- icon: QueueListIcon,
241
- href: buildUrl('/discover/flows'),
242
- current: currentPath === buildUrl('/discover/flows'),
243
- },
244
- {
245
- label: 'Data Stores',
246
- icon: Database,
247
- href: buildUrl('/discover/containers'),
248
- current: currentPath === buildUrl('/discover/containers'),
249
- },
250
- {
251
- label: 'Data Products',
252
- icon: CubeIcon,
253
- href: buildUrl('/discover/data-products'),
254
- current: currentPath === buildUrl('/discover/data-products'),
255
- },
256
- ];
257
-
258
- const organizationItems = [
259
- {
260
- label: 'Teams',
261
- icon: UsersRound,
262
- href: buildUrl('/directory/teams'),
263
- current: currentPath === buildUrl('/directory/teams'),
264
- },
265
- {
266
- label: 'Users',
267
- icon: UserRound,
268
- href: buildUrl('/directory/users'),
269
- current: currentPath === buildUrl('/directory/users'),
270
- },
271
- ];
272
-
273
- const settingsItems = [
274
- {
275
- label: 'Settings',
276
- icon: Settings,
277
- href: buildUrl('/settings/general'),
278
- current: currentPath.startsWith(buildUrl('/settings')),
279
- },
280
- ];
202
+ const browseItems = filterSidebarItems(
203
+ [
204
+ {
205
+ id: '/discover/domains',
206
+ aliases: ['/discover'],
207
+ label: 'Domains',
208
+ icon: RectangleGroupIcon,
209
+ href: buildUrl('/discover/domains'),
210
+ current: currentPath === buildUrl('/discover/domains'),
211
+ },
212
+ {
213
+ id: '/discover/services',
214
+ aliases: ['/discover'],
215
+ label: 'Services',
216
+ icon: ServerIcon,
217
+ href: buildUrl('/discover/services'),
218
+ current: currentPath === buildUrl('/discover/services'),
219
+ },
220
+ {
221
+ id: '/discover/external-systems',
222
+ aliases: ['/discover'],
223
+ label: 'External Systems',
224
+ icon: GlobeAltIcon,
225
+ href: buildUrl('/discover/external-systems'),
226
+ current: currentPath === buildUrl('/discover/external-systems'),
227
+ },
228
+ {
229
+ id: '/discover/events',
230
+ aliases: ['/discover'],
231
+ label: 'Events',
232
+ icon: BoltIcon,
233
+ href: buildUrl('/discover/events'),
234
+ current: currentPath === buildUrl('/discover/events'),
235
+ },
236
+ {
237
+ id: '/discover/commands',
238
+ aliases: ['/discover'],
239
+ label: 'Commands',
240
+ icon: ChatBubbleLeftIcon,
241
+ href: buildUrl('/discover/commands'),
242
+ current: currentPath === buildUrl('/discover/commands'),
243
+ },
244
+ {
245
+ id: '/discover/queries',
246
+ aliases: ['/discover'],
247
+ label: 'Queries',
248
+ icon: MagnifyingGlassIcon,
249
+ href: buildUrl('/discover/queries'),
250
+ current: currentPath === buildUrl('/discover/queries'),
251
+ },
252
+ {
253
+ id: '/discover/flows',
254
+ aliases: ['/discover'],
255
+ label: 'Flows',
256
+ icon: QueueListIcon,
257
+ href: buildUrl('/discover/flows'),
258
+ current: currentPath === buildUrl('/discover/flows'),
259
+ },
260
+ {
261
+ id: '/discover/containers',
262
+ aliases: ['/discover'],
263
+ label: 'Data Stores',
264
+ icon: Database,
265
+ href: buildUrl('/discover/containers'),
266
+ current: currentPath === buildUrl('/discover/containers'),
267
+ },
268
+ {
269
+ id: '/discover/data-products',
270
+ aliases: ['/discover'],
271
+ label: 'Data Products',
272
+ icon: CubeIcon,
273
+ href: buildUrl('/discover/data-products'),
274
+ current: currentPath === buildUrl('/discover/data-products'),
275
+ },
276
+ ],
277
+ userSideBarConfiguration
278
+ );
279
+
280
+ const organizationItems = filterSidebarItems(
281
+ [
282
+ {
283
+ id: '/directory/teams',
284
+ aliases: ['/directory'],
285
+ label: 'Teams',
286
+ icon: UsersRound,
287
+ href: buildUrl('/directory/teams'),
288
+ current: currentPath === buildUrl('/directory/teams'),
289
+ },
290
+ {
291
+ id: '/directory/users',
292
+ aliases: ['/directory'],
293
+ label: 'Users',
294
+ icon: UserRound,
295
+ href: buildUrl('/directory/users'),
296
+ current: currentPath === buildUrl('/directory/users'),
297
+ },
298
+ ],
299
+ userSideBarConfiguration
300
+ );
301
+
302
+ const settingsItems = filterSidebarItems(
303
+ [
304
+ {
305
+ id: '/settings/general',
306
+ aliases: ['/settings'],
307
+ label: 'Settings',
308
+ icon: Settings,
309
+ href: buildUrl('/settings/general'),
310
+ current: currentPath.startsWith(buildUrl('/settings')),
311
+ },
312
+ ],
313
+ userSideBarConfiguration
314
+ );
281
315
 
282
316
  const currentNavigationItem = [...navigationItems, ...studioNavigationItem, ...premiumFeatures].find((item) => item.current);
283
317
  const { title, description, showNestedSideBar = true, showHeader = true } = Astro.props;
@@ -521,58 +555,64 @@ const canPageBeEmbedded = isEmbedEnabled();
521
555
  })
522
556
  }
523
557
 
524
- <hr class="rail-divider my-3 border-t border-[rgb(var(--ec-sidebar-border)/0.7)]" />
525
-
526
- <div
527
- class="rail-section-label px-3 pb-1 text-[0.65rem] font-semibold tracking-[0.18em] uppercase text-[rgb(var(--ec-sidebar-text)/0.5)]"
528
- >
529
- Browse
530
- </div>
531
-
532
558
  {
533
- browseItems.map((item) => (
534
- <a
535
- href={item.href}
536
- data-role="secondary-nav-item"
537
- aria-label={item.label}
538
- class={`nav-secondary-item flex items-center gap-3 px-3 py-2.5 rounded-xl border text-[13px] font-medium transition-all duration-150 ${
539
- item.current
540
- ? 'border-[rgb(var(--ec-accent)/0.2)] bg-[rgb(var(--ec-page-bg)/0.88)] text-[rgb(var(--ec-accent))] shadow-sm'
541
- : 'border-transparent text-[rgb(var(--ec-sidebar-text))] hover:border-[rgb(var(--ec-sidebar-border)/0.65)] hover:bg-[rgb(var(--ec-page-bg)/0.78)] hover:text-[rgb(var(--ec-page-text))]'
542
- }`}
543
- title={item.label}
544
- >
545
- <item.icon className="h-3.5 w-3.5 flex-shrink-0" aria-hidden="true" />
546
- <span class="nav-item-label">{item.label}</span>
547
- </a>
548
- ))
559
+ browseItems.length > 0 && (
560
+ <Fragment>
561
+ <hr class="rail-divider my-3 border-t border-[rgb(var(--ec-sidebar-border)/0.7)]" />
562
+
563
+ <div class="rail-section-label px-3 pb-1 text-[0.65rem] font-semibold tracking-[0.18em] uppercase text-[rgb(var(--ec-sidebar-text)/0.5)]">
564
+ Browse
565
+ </div>
566
+
567
+ {browseItems.map((item) => (
568
+ <a
569
+ id={item.id}
570
+ href={item.href}
571
+ data-role="secondary-nav-item"
572
+ aria-label={item.label}
573
+ class={`nav-secondary-item flex items-center gap-3 px-3 py-2.5 rounded-xl border text-[13px] font-medium transition-all duration-150 ${
574
+ item.current
575
+ ? 'border-[rgb(var(--ec-accent)/0.2)] bg-[rgb(var(--ec-page-bg)/0.88)] text-[rgb(var(--ec-accent))] shadow-sm'
576
+ : 'border-transparent text-[rgb(var(--ec-sidebar-text))] hover:border-[rgb(var(--ec-sidebar-border)/0.65)] hover:bg-[rgb(var(--ec-page-bg)/0.78)] hover:text-[rgb(var(--ec-page-text))]'
577
+ }`}
578
+ title={item.label}
579
+ >
580
+ <item.icon className="h-3.5 w-3.5 flex-shrink-0" aria-hidden="true" />
581
+ <span class="nav-item-label">{item.label}</span>
582
+ </a>
583
+ ))}
584
+ </Fragment>
585
+ )
549
586
  }
550
587
 
551
- <hr class="rail-divider my-3 border-t border-[rgb(var(--ec-sidebar-border)/0.7)]" />
552
-
553
- <div
554
- class="rail-section-label px-3 pb-1 text-[0.65rem] font-semibold tracking-[0.18em] uppercase text-[rgb(var(--ec-sidebar-text)/0.5)]"
555
- >
556
- Organization
557
- </div>
558
-
559
588
  {
560
- organizationItems.map((item) => (
561
- <a
562
- href={item.href}
563
- data-role="secondary-nav-item"
564
- aria-label={item.label}
565
- class={`nav-secondary-item flex items-center gap-3 px-3 py-2.5 rounded-xl border text-[13px] font-medium transition-all duration-150 ${
566
- item.current
567
- ? 'border-[rgb(var(--ec-accent)/0.2)] bg-[rgb(var(--ec-page-bg)/0.88)] text-[rgb(var(--ec-accent))] shadow-sm'
568
- : 'border-transparent text-[rgb(var(--ec-sidebar-text))] hover:border-[rgb(var(--ec-sidebar-border)/0.65)] hover:bg-[rgb(var(--ec-page-bg)/0.78)] hover:text-[rgb(var(--ec-page-text))]'
569
- }`}
570
- title={item.label}
571
- >
572
- <item.icon className="h-3.5 w-3.5 flex-shrink-0" aria-hidden="true" />
573
- <span class="nav-item-label">{item.label}</span>
574
- </a>
575
- ))
589
+ organizationItems.length > 0 && (
590
+ <Fragment>
591
+ <hr class="rail-divider my-3 border-t border-[rgb(var(--ec-sidebar-border)/0.7)]" />
592
+
593
+ <div class="rail-section-label px-3 pb-1 text-[0.65rem] font-semibold tracking-[0.18em] uppercase text-[rgb(var(--ec-sidebar-text)/0.5)]">
594
+ Organization
595
+ </div>
596
+
597
+ {organizationItems.map((item) => (
598
+ <a
599
+ id={item.id}
600
+ href={item.href}
601
+ data-role="secondary-nav-item"
602
+ aria-label={item.label}
603
+ class={`nav-secondary-item flex items-center gap-3 px-3 py-2.5 rounded-xl border text-[13px] font-medium transition-all duration-150 ${
604
+ item.current
605
+ ? 'border-[rgb(var(--ec-accent)/0.2)] bg-[rgb(var(--ec-page-bg)/0.88)] text-[rgb(var(--ec-accent))] shadow-sm'
606
+ : 'border-transparent text-[rgb(var(--ec-sidebar-text))] hover:border-[rgb(var(--ec-sidebar-border)/0.65)] hover:bg-[rgb(var(--ec-page-bg)/0.78)] hover:text-[rgb(var(--ec-page-text))]'
607
+ }`}
608
+ title={item.label}
609
+ >
610
+ <item.icon className="h-3.5 w-3.5 flex-shrink-0" aria-hidden="true" />
611
+ <span class="nav-item-label">{item.label}</span>
612
+ </a>
613
+ ))}
614
+ </Fragment>
615
+ )
576
616
  }
577
617
 
578
618
  {premiumFeatures.length > 0 && <hr class="rail-divider my-2 border-t border-[rgb(var(--ec-sidebar-border)/0.7)]" />}
@@ -598,24 +638,29 @@ const canPageBeEmbedded = isEmbedEnabled();
598
638
  }
599
639
 
600
640
  <div class="mt-auto pt-3">
601
- <hr class="rail-divider mb-3 border-t border-[rgb(var(--ec-sidebar-border)/0.7)]" />
602
641
  {
603
- settingsItems.map((item) => (
604
- <a
605
- href={item.href}
606
- data-role="secondary-nav-item"
607
- aria-label={item.label}
608
- class={`nav-secondary-item flex items-center gap-3 px-3 py-2.5 rounded-xl border text-[13px] font-medium transition-all duration-150 ${
609
- item.current
610
- ? 'border-[rgb(var(--ec-accent)/0.2)] bg-[rgb(var(--ec-page-bg)/0.88)] text-[rgb(var(--ec-accent))] shadow-sm'
611
- : 'border-transparent text-[rgb(var(--ec-sidebar-text))] hover:border-[rgb(var(--ec-sidebar-border)/0.65)] hover:bg-[rgb(var(--ec-page-bg)/0.78)] hover:text-[rgb(var(--ec-page-text))]'
612
- }`}
613
- title={item.label}
614
- >
615
- <item.icon className="h-4 w-4 flex-shrink-0" aria-hidden="true" />
616
- <span class="nav-item-label">{item.label}</span>
617
- </a>
618
- ))
642
+ settingsItems.length > 0 && (
643
+ <Fragment>
644
+ <hr class="rail-divider mb-3 border-t border-[rgb(var(--ec-sidebar-border)/0.7)]" />
645
+ {settingsItems.map((item) => (
646
+ <a
647
+ id={item.id}
648
+ href={item.href}
649
+ data-role="secondary-nav-item"
650
+ aria-label={item.label}
651
+ class={`nav-secondary-item flex items-center gap-3 px-3 py-2.5 rounded-xl border text-[13px] font-medium transition-all duration-150 ${
652
+ item.current
653
+ ? 'border-[rgb(var(--ec-accent)/0.2)] bg-[rgb(var(--ec-page-bg)/0.88)] text-[rgb(var(--ec-accent))] shadow-sm'
654
+ : 'border-transparent text-[rgb(var(--ec-sidebar-text))] hover:border-[rgb(var(--ec-sidebar-border)/0.65)] hover:bg-[rgb(var(--ec-page-bg)/0.78)] hover:text-[rgb(var(--ec-page-text))]'
655
+ }`}
656
+ title={item.label}
657
+ >
658
+ <item.icon className="h-4 w-4 flex-shrink-0" aria-hidden="true" />
659
+ <span class="nav-item-label">{item.label}</span>
660
+ </a>
661
+ ))}
662
+ </Fragment>
663
+ )
619
664
  }
620
665
  </div>
621
666
  </nav>
@@ -0,0 +1,41 @@
1
+ export type SidebarVisibilityConfig = {
2
+ id: string;
3
+ visible: boolean;
4
+ };
5
+
6
+ export type SidebarConfigurableItem = {
7
+ id: string;
8
+ aliases?: string[];
9
+ visible?: boolean;
10
+ };
11
+
12
+ const getVisibilityOption = <T extends SidebarConfigurableItem>(
13
+ item: T,
14
+ configuration: SidebarVisibilityConfig[]
15
+ ): SidebarVisibilityConfig | undefined => {
16
+ const exactMatch = configuration.find((option) => option.id === item.id);
17
+
18
+ if (exactMatch) {
19
+ return exactMatch;
20
+ }
21
+
22
+ return configuration.find((option) => item.aliases?.includes(option.id));
23
+ };
24
+
25
+ export const isSidebarItemVisible = <T extends SidebarConfigurableItem>(
26
+ item: T,
27
+ configuration: SidebarVisibilityConfig[] = []
28
+ ): boolean => {
29
+ const visibilityOption = getVisibilityOption(item, configuration);
30
+
31
+ if (visibilityOption) {
32
+ return visibilityOption.visible;
33
+ }
34
+
35
+ return item.visible ?? true;
36
+ };
37
+
38
+ export const filterSidebarItems = <T extends SidebarConfigurableItem>(
39
+ items: T[],
40
+ configuration: SidebarVisibilityConfig[] = []
41
+ ): T[] => items.filter((item) => isSidebarItemVisible(item, configuration));
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "license": "SEE LICENSE IN LICENSE",
9
9
  "type": "module",
10
- "version": "3.39.4",
10
+ "version": "3.39.5",
11
11
  "publishConfig": {
12
12
  "access": "public"
13
13
  },
@@ -106,9 +106,9 @@
106
106
  "update-notifier": "^7.3.1",
107
107
  "uuid": "^10.0.0",
108
108
  "zod": "^4.3.6",
109
- "@eventcatalog/sdk": "2.21.1",
109
+ "@eventcatalog/linter": "1.0.23",
110
110
  "@eventcatalog/visualiser": "^3.21.0",
111
- "@eventcatalog/linter": "1.0.23"
111
+ "@eventcatalog/sdk": "2.21.1"
112
112
  },
113
113
  "devDependencies": {
114
114
  "@astrojs/check": "^0.9.9",