@eventcatalog/core 2.35.9 → 2.35.10
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 +1 -1
- package/dist/analytics/log-build.js +3 -3
- package/dist/{chunk-KEOGLT6Y.js → chunk-APUSQIXG.js} +1 -1
- package/dist/{chunk-RKOF335E.js → chunk-BLST6HNF.js} +1 -1
- package/dist/{chunk-K2XHQGHN.js → chunk-X5PED26N.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +1 -1
- package/dist/eventcatalog.js +3 -3
- package/eventcatalog/src/utils/badges.tsx +22 -0
- package/package.json +1 -1
- package/eventcatalog/src/utils/badges.ts +0 -5
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-X5PED26N.js";
|
|
4
|
+
import "../chunk-APUSQIXG.js";
|
|
5
|
+
import "../chunk-BLST6HNF.js";
|
|
6
6
|
import "../chunk-E7TXTI7G.js";
|
|
7
7
|
export {
|
|
8
8
|
log_build_default as default
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
package/dist/eventcatalog.js
CHANGED
|
@@ -6,15 +6,15 @@ import {
|
|
|
6
6
|
} from "./chunk-DCLTVJDP.js";
|
|
7
7
|
import {
|
|
8
8
|
log_build_default
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-X5PED26N.js";
|
|
10
|
+
import "./chunk-APUSQIXG.js";
|
|
11
11
|
import {
|
|
12
12
|
catalogToAstro,
|
|
13
13
|
checkAndConvertMdToMdx
|
|
14
14
|
} from "./chunk-SLEMYHTU.js";
|
|
15
15
|
import {
|
|
16
16
|
VERSION
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-BLST6HNF.js";
|
|
18
18
|
import {
|
|
19
19
|
isBackstagePluginEnabled,
|
|
20
20
|
isEventCatalogScaleEnabled,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as HeroIcons from '@heroicons/react/24/outline';
|
|
2
|
+
import * as ProtocolIcons from '@icons/protocols';
|
|
3
|
+
|
|
4
|
+
// const allIcons = [...HeroIcons, ...ProtocolIcons];
|
|
5
|
+
|
|
6
|
+
const protocolIcons = Object.keys(ProtocolIcons).reduce(
|
|
7
|
+
(icons, key) => {
|
|
8
|
+
const iconKey = key as keyof typeof ProtocolIcons;
|
|
9
|
+
icons[key.toLowerCase()] = ProtocolIcons[iconKey];
|
|
10
|
+
return icons;
|
|
11
|
+
},
|
|
12
|
+
{} as { [key: string]: string }
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
const getIconForProtocol = (icon: keyof typeof protocolIcons) => {
|
|
16
|
+
const Icon = protocolIcons[icon];
|
|
17
|
+
return Icon ? (props: any) => <span {...props} dangerouslySetInnerHTML={{ __html: Icon }} /> : null;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export function getIcon(iconName: string) {
|
|
21
|
+
return getIconForProtocol(iconName as keyof typeof protocolIcons) || HeroIcons[iconName as keyof typeof HeroIcons] || null;
|
|
22
|
+
}
|
package/package.json
CHANGED