@eventcatalog/core 4.3.0 → 4.3.1

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.
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(analytics_exports);
36
36
  var import_os = __toESM(require("os"), 1);
37
37
 
38
38
  // package.json
39
- var version = "4.3.0";
39
+ var version = "4.3.1";
40
40
 
41
41
  // src/constants.ts
42
42
  var VERSION = version;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "../chunk-ZLUUUTWP.js";
4
- import "../chunk-GZOFTODZ.js";
3
+ } from "../chunk-GC6SSPJI.js";
4
+ import "../chunk-E3KVC4LF.js";
5
5
  export {
6
6
  raiseEvent
7
7
  };
@@ -140,7 +140,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
140
140
  var import_os = __toESM(require("os"), 1);
141
141
 
142
142
  // package.json
143
- var version = "4.3.0";
143
+ var version = "4.3.1";
144
144
 
145
145
  // src/constants.ts
146
146
  var VERSION = version;
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  log_build_default
3
- } from "../chunk-32ZHIOUO.js";
4
- import "../chunk-ZLUUUTWP.js";
3
+ } from "../chunk-ZYVGVWMQ.js";
5
4
  import "../chunk-K2XIENVT.js";
6
- import "../chunk-GZOFTODZ.js";
5
+ import "../chunk-GC6SSPJI.js";
6
+ import "../chunk-E3KVC4LF.js";
7
7
  import "../chunk-6QENHZZP.js";
8
8
  export {
9
9
  log_build_default as default
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "4.3.0";
2
+ var version = "4.3.1";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-GZOFTODZ.js";
3
+ } from "./chunk-E3KVC4LF.js";
4
4
 
5
5
  // src/analytics/analytics.js
6
6
  import os from "os";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-GZOFTODZ.js";
3
+ } from "./chunk-E3KVC4LF.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-RQCRNCF6.js";
3
+ } from "./chunk-GC7WNQP6.js";
4
4
  import {
5
5
  cleanup,
6
6
  getEventCatalogConfigFile
@@ -1,10 +1,10 @@
1
- import {
2
- raiseEvent
3
- } from "./chunk-ZLUUUTWP.js";
4
1
  import {
5
2
  countResources,
6
3
  serializeCounts
7
4
  } from "./chunk-K2XIENVT.js";
5
+ import {
6
+ raiseEvent
7
+ } from "./chunk-GC6SSPJI.js";
8
8
  import {
9
9
  getEventCatalogConfigFile,
10
10
  verifyRequiredFieldsAreInCatalogConfigFile
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "4.3.0";
28
+ var version = "4.3.1";
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-GZOFTODZ.js";
3
+ } from "./chunk-E3KVC4LF.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -144,7 +144,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
144
144
  var import_picocolors = __toESM(require("picocolors"), 1);
145
145
 
146
146
  // package.json
147
- var version = "4.3.0";
147
+ var version = "4.3.1";
148
148
 
149
149
  // src/constants.ts
150
150
  var VERSION = version;
@@ -1,8 +1,11 @@
1
1
  import {
2
2
  log_build_default
3
- } from "./chunk-32ZHIOUO.js";
4
- import "./chunk-ZLUUUTWP.js";
3
+ } from "./chunk-ZYVGVWMQ.js";
5
4
  import "./chunk-K2XIENVT.js";
5
+ import {
6
+ runMigrations
7
+ } from "./chunk-XUAF2H54.js";
8
+ import "./chunk-CA4U2JP7.js";
6
9
  import {
7
10
  getProjectOutDir,
8
11
  isAuthEnabled,
@@ -11,10 +14,10 @@ import {
11
14
  } from "./chunk-B7HCX5HM.js";
12
15
  import {
13
16
  generate
14
- } from "./chunk-TE4QQSPT.js";
17
+ } from "./chunk-UXHV3GN7.js";
15
18
  import {
16
19
  logger
17
- } from "./chunk-RQCRNCF6.js";
20
+ } from "./chunk-GC7WNQP6.js";
18
21
  import {
19
22
  resolve_catalog_dependencies_default
20
23
  } from "./chunk-LHR4G2UO.js";
@@ -24,10 +27,7 @@ import {
24
27
  import {
25
28
  watch
26
29
  } from "./chunk-CAJUIMDJ.js";
27
- import {
28
- runMigrations
29
- } from "./chunk-XUAF2H54.js";
30
- import "./chunk-CA4U2JP7.js";
30
+ import "./chunk-GC6SSPJI.js";
31
31
  import {
32
32
  createAstroDevLineFilter,
33
33
  createAstroLineFilter
@@ -38,7 +38,7 @@ import {
38
38
  import "./chunk-W5JQON7Z.js";
39
39
  import {
40
40
  VERSION
41
- } from "./chunk-GZOFTODZ.js";
41
+ } from "./chunk-E3KVC4LF.js";
42
42
  import {
43
43
  linkCoreNodeModules,
44
44
  resolveInstalledCoreNodeModules
package/dist/generate.cjs CHANGED
@@ -108,7 +108,7 @@ var getEventCatalogConfigFile = async (projectDirectory) => {
108
108
  var import_picocolors = __toESM(require("picocolors"), 1);
109
109
 
110
110
  // package.json
111
- var version = "4.3.0";
111
+ var version = "4.3.1";
112
112
 
113
113
  // src/constants.ts
114
114
  var VERSION = version;
package/dist/generate.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  generate
3
- } from "./chunk-TE4QQSPT.js";
4
- import "./chunk-RQCRNCF6.js";
5
- import "./chunk-GZOFTODZ.js";
3
+ } from "./chunk-UXHV3GN7.js";
4
+ import "./chunk-GC7WNQP6.js";
5
+ import "./chunk-E3KVC4LF.js";
6
6
  import "./chunk-6QENHZZP.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 = "4.3.0";
39
+ var version = "4.3.1";
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-RQCRNCF6.js";
4
- import "../chunk-GZOFTODZ.js";
3
+ } from "../chunk-GC7WNQP6.js";
4
+ import "../chunk-E3KVC4LF.js";
5
5
  export {
6
6
  logger
7
7
  };
@@ -13,7 +13,7 @@ import {
13
13
  removeFavorite as removeFavoriteAction,
14
14
  type FavoriteItem,
15
15
  } from '@stores/favorites-store';
16
- import { getBadgeClasses } from './utils';
16
+ import { getBadgeClasses, isGroupCollapsed } from './utils';
17
17
  import { resolveIconUrl } from '@utils/icon';
18
18
 
19
19
  const cn = (...classes: (string | false | undefined)[]) => classes.filter(Boolean).join(' ');
@@ -754,9 +754,9 @@ export default function NestedSideBar() {
754
754
  return child && isVisible(child);
755
755
  }) ?? [];
756
756
 
757
- const groupId = groupKey || `group-${index}`;
757
+ const groupId = groupKey || group.collapseKey || `group-${index}`;
758
758
  const canCollapse = visibleChildren.length > 3;
759
- const isCollapsed = collapsedSections.has(groupId);
759
+ const isCollapsed = isGroupCollapsed(canCollapse, groupId, collapsedSections);
760
760
 
761
761
  // When a group's children are subtle subgroups (e.g. Resources > Services/Flows/Data Stores),
762
762
  // they render flush under the parent icon instead of inside the indented border guide.
@@ -0,0 +1,12 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import { isGroupCollapsed } from './utils';
3
+
4
+ describe('isGroupCollapsed', () => {
5
+ it('ignores persisted collapse state when the group cannot be expanded', () => {
6
+ expect(isGroupCollapsed(false, 'group-1', new Set(['group-1']))).toBe(false);
7
+ });
8
+
9
+ it('uses persisted collapse state when the group can be expanded', () => {
10
+ expect(isGroupCollapsed(true, 'adrs:status:superseded', new Set(['adrs:status:superseded']))).toBe(true);
11
+ });
12
+ });
@@ -1,5 +1,8 @@
1
1
  // Shared utilities for NestedSideBar components
2
2
 
3
+ export const isGroupCollapsed = (canCollapse: boolean, groupId: string, collapsedSections: Set<string>): boolean =>
4
+ canCollapse && collapsedSections.has(groupId);
5
+
3
6
  /**
4
7
  * Returns Tailwind classes for badge styling based on badge type.
5
8
  * Uses CSS variables from theme.css for proper theming support.
@@ -23,6 +23,7 @@ export type ChildRef = string | NavNode;
23
23
  export type NavNode = {
24
24
  type: 'group' | 'item';
25
25
  title: string;
26
+ collapseKey?: string; // Stable key used to persist collapse state for inline groups
26
27
  icon?: string; // Lucide icon name
27
28
  subtle?: boolean; // Render lightweight styling for nested subgroup headers
28
29
  leftIcon?: string; // Path to SVG icon shown on the left of the label
@@ -69,6 +69,7 @@ const groupAdrsByStatus = (adrs: Adr[]): NavNode[] =>
69
69
  groups.push({
70
70
  type: 'group',
71
71
  title: `${formatAdrStatus(status)} (${adrsForStatus.length})`,
72
+ collapseKey: `adrs:status:${status}`,
72
73
  subtle: true,
73
74
  pages: [...adrsForStatus].sort(byResourceName).map(getAdrNodeKey),
74
75
  });
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "license": "SEE LICENSE IN LICENSE",
9
9
  "type": "module",
10
- "version": "4.3.0",
10
+ "version": "4.3.1",
11
11
  "publishConfig": {
12
12
  "access": "public"
13
13
  },
@@ -117,8 +117,8 @@
117
117
  "uuid": "^10.0.0",
118
118
  "zod": "^4.3.6",
119
119
  "@eventcatalog/sdk": "2.26.2",
120
- "@eventcatalog/linter": "1.1.7",
121
- "@eventcatalog/visualiser": "^4.1.0"
120
+ "@eventcatalog/visualiser": "^4.1.0",
121
+ "@eventcatalog/linter": "1.1.7"
122
122
  },
123
123
  "devDependencies": {
124
124
  "@astrojs/check": "^0.9.9",