@eventcatalog/core 2.16.5 → 2.16.6

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 = "2.16.5";
40
+ var version = "2.16.6";
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-SSON27NB.js";
4
- import "../chunk-EXL47VH2.js";
3
+ } from "../chunk-UQCAHPQ5.js";
4
+ import "../chunk-GY2IBBDA.js";
5
5
  export {
6
6
  raiseEvent
7
7
  };
@@ -106,7 +106,7 @@ var import_axios = __toESM(require("axios"), 1);
106
106
  var import_os = __toESM(require("os"), 1);
107
107
 
108
108
  // package.json
109
- var version = "2.16.5";
109
+ var version = "2.16.6";
110
110
 
111
111
  // src/constants.ts
112
112
  var VERSION = version;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  log_build_default
3
- } from "../chunk-AUXNC7PZ.js";
4
- import "../chunk-SSON27NB.js";
5
- import "../chunk-EXL47VH2.js";
3
+ } from "../chunk-WBHGC6OB.js";
4
+ import "../chunk-UQCAHPQ5.js";
5
+ import "../chunk-GY2IBBDA.js";
6
6
  import "../chunk-E7TXTI7G.js";
7
7
  export {
8
8
  log_build_default as default
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "2.16.5";
2
+ var version = "2.16.6";
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-EXL47VH2.js";
3
+ } from "./chunk-GY2IBBDA.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-SSON27NB.js";
3
+ } from "./chunk-UQCAHPQ5.js";
4
4
  import {
5
5
  getEventCatalogConfigFile,
6
6
  verifyRequiredFieldsAreInCatalogConfigFile
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "2.16.5";
28
+ var version = "2.16.6";
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-EXL47VH2.js";
3
+ } from "./chunk-GY2IBBDA.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -161,7 +161,7 @@ var import_axios = __toESM(require("axios"), 1);
161
161
  var import_os = __toESM(require("os"), 1);
162
162
 
163
163
  // package.json
164
- var version = "2.16.5";
164
+ var version = "2.16.6";
165
165
 
166
166
  // src/constants.ts
167
167
  var VERSION = version;
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  log_build_default
3
- } from "./chunk-AUXNC7PZ.js";
4
- import "./chunk-SSON27NB.js";
3
+ } from "./chunk-WBHGC6OB.js";
4
+ import "./chunk-UQCAHPQ5.js";
5
5
  import {
6
6
  catalogToAstro
7
7
  } from "./chunk-55YPRY5U.js";
8
8
  import {
9
9
  VERSION
10
- } from "./chunk-EXL47VH2.js";
10
+ } from "./chunk-GY2IBBDA.js";
11
11
  import {
12
12
  generate
13
13
  } from "./chunk-YEQVKHST.js";
@@ -5,6 +5,8 @@ import react from '@astrojs/react';
5
5
  import pagefind from "astro-pagefind";
6
6
  import { mermaid } from "./src/remark-plugins/mermaid"
7
7
  import { join } from 'node:path';
8
+ import remarkDirective from 'remark-directive';
9
+ import { remarkDirectives } from "./src/remark-plugins/directives"
8
10
 
9
11
  /** @type {import('bin/eventcatalog.config').Config} */
10
12
  import config from './eventcatalog.config';
@@ -42,7 +44,7 @@ export default defineConfig({
42
44
  mdx({
43
45
  // https://docs.astro.build/en/guides/integrations-guide/mdx/#optimize
44
46
  optimize: config.mdxOptimize || false,
45
- remarkPlugins: [mermaid],
47
+ remarkPlugins: [remarkDirective, remarkDirectives, mermaid],
46
48
  gfm: false,
47
49
  }),
48
50
  pagefind(),
@@ -33,7 +33,7 @@ const components = (props: any) => {
33
33
  Steps,
34
34
  Tabs,
35
35
  TabItem,
36
- Admonition: (mdxProp: any) => <Admonition {...mdxProp} {...props} />,
36
+ Admonition,
37
37
  File: (mdxProp: any) => File({ ...props, ...mdxProp }),
38
38
  NodeGraph: (mdxProp: any) => NodeGraphPortal({ ...props.data, ...mdxProp }),
39
39
  ChannelInformation: (mdxProp: any) => ChannelInformation({ ...props.data, ...mdxProp }),
@@ -0,0 +1,109 @@
1
+ // src/remark-plugins/directives.js
2
+ import { visit } from 'unist-util-visit';
3
+
4
+ export function remarkDirectives() {
5
+ return (tree: any) => {
6
+ visit(tree, (node) => {
7
+ if (node.type === 'containerDirective') {
8
+ const blockTypes = {
9
+ info: 'bg-blue-50 border-l-4 border-blue-500',
10
+ warning: 'bg-yellow-50 border-l-4 border-yellow-500',
11
+ danger: 'bg-red-50 border-l-4 border-red-500',
12
+ tip: 'bg-green-50 border-l-4 border-green-500',
13
+ note: 'bg-gray-50 border-l-4 border-gray-500',
14
+ };
15
+
16
+ // Lucide icon paths
17
+ const iconPaths = {
18
+ info: 'M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z',
19
+ warning:
20
+ 'M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z',
21
+ danger:
22
+ 'M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z',
23
+ tip: 'M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z',
24
+ note: 'M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z',
25
+ };
26
+
27
+ node.data = node.data || {};
28
+ node.data.hName = 'div';
29
+ node.data.hProperties = {
30
+ class: `rounded-lg p-4 my-4 ${blockTypes[node.name as keyof typeof blockTypes] || ''}`,
31
+ };
32
+
33
+ // Create header div that will contain icon and type
34
+ const headerNode = {
35
+ type: 'element',
36
+ data: {
37
+ hName: 'div',
38
+ hProperties: {
39
+ class: 'flex items-center gap-2 font-semibold mb-2',
40
+ },
41
+ },
42
+ children: [
43
+ // Lucide Icon SVG
44
+ {
45
+ type: 'element',
46
+ data: {
47
+ hName: 'svg',
48
+ hProperties: {
49
+ xmlns: 'http://www.w3.org/2000/svg',
50
+ width: '26',
51
+ height: '26',
52
+ viewBox: '0 0 24 24',
53
+ fill: 'none',
54
+ stroke: 'currentColor',
55
+ strokeWidth: '2',
56
+ strokeLinecap: 'round',
57
+ strokeLinejoin: 'round',
58
+ class: 'lucide',
59
+ },
60
+ },
61
+ children: [
62
+ {
63
+ type: 'element',
64
+ data: {
65
+ hName: 'path',
66
+ hProperties: {
67
+ d: iconPaths[node.name as keyof typeof iconPaths] || '',
68
+ },
69
+ },
70
+ },
71
+ ],
72
+ },
73
+ // Type label
74
+ {
75
+ type: 'element',
76
+ data: {
77
+ hName: 'span',
78
+ hProperties: {
79
+ class: '',
80
+ },
81
+ },
82
+ children: [
83
+ {
84
+ type: 'text',
85
+ value: node.name.charAt(0).toUpperCase() + node.name.slice(1),
86
+ },
87
+ ],
88
+ },
89
+ ],
90
+ };
91
+
92
+ // Create content div for the rest of the children
93
+ const contentNode = {
94
+ type: 'element',
95
+ data: {
96
+ hName: 'div',
97
+ hProperties: {
98
+ class: 'prose prose-md w-full !max-w-none ',
99
+ },
100
+ },
101
+ children: node.children,
102
+ };
103
+
104
+ // Replace node's children with header and content
105
+ node.children = [headerNode, contentNode];
106
+ }
107
+ });
108
+ };
109
+ }
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.16.5",
9
+ "version": "2.16.6",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },
@@ -78,6 +78,7 @@
78
78
  "react": "^18.3.1",
79
79
  "react-dom": "^18.3.1",
80
80
  "rehype-slug": "^6.0.0",
81
+ "remark-directive": "^3.0.0",
81
82
  "remark-gfm": "^3.0.1",
82
83
  "rimraf": "^5.0.7",
83
84
  "semver": "7.6.3",