@eventcatalog/core 2.24.3 → 2.25.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.
- 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/catalog-to-astro-content-directory.cjs +0 -1
- package/dist/catalog-to-astro-content-directory.js +1 -1
- package/dist/{chunk-3MDI2MXJ.js → chunk-DZIMF2ES.js} +1 -1
- package/dist/{chunk-OZZMZUB3.js → chunk-O33THQNO.js} +1 -1
- package/dist/{chunk-7K4ERS3X.js → chunk-OZLFIB46.js} +1 -1
- package/dist/{chunk-CXKIF3EI.js → chunk-VCR3LHZR.js} +0 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +1 -2
- package/dist/eventcatalog.js +4 -4
- package/eventcatalog/src/components/MDX/NodeGraph/Edges/FlowEdge.tsx +96 -0
- package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.tsx +10 -7
- package/eventcatalog/src/components/MDX/NodeGraph/Nodes/Channel.tsx +82 -54
- package/eventcatalog/src/components/MDX/NodeGraph/Nodes/Command.tsx +44 -41
- package/eventcatalog/src/components/MDX/NodeGraph/Nodes/Event.tsx +43 -41
- package/eventcatalog/src/components/MDX/NodeGraph/Nodes/MessageContextMenu.tsx +54 -0
- package/eventcatalog/src/components/MDX/NodeGraph/Nodes/Query.tsx +45 -43
- package/eventcatalog/src/components/MDX/NodeGraph/Nodes/Service.tsx +112 -42
- package/eventcatalog/src/components/MDX/Tiles/Tile.astro +7 -1
- package/eventcatalog/src/components/SideNav/TreeView/getTreeView.ts +1 -1
- package/eventcatalog/src/pages/chat/index.astro +4 -1
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/spec/index.astro +0 -1
- package/eventcatalog/src/pages/docs/_default-docs.mdx +24 -0
- package/eventcatalog/src/pages/docs/index.astro +13 -18
- package/eventcatalog/src/utils/node-graphs/flows-node-graph.ts +3 -3
- package/package.json +6 -5
- package/default-files-for-collections/pages.md +0 -7
- package/eventcatalog/src/components/DocsNavigation.astro +0 -145
- package/eventcatalog/src/layouts/CustomDocsPageLayout.astro +0 -131
- package/eventcatalog/src/layouts/PlainPage.astro +0 -29
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-OZLFIB46.js";
|
|
4
|
+
import "../chunk-O33THQNO.js";
|
|
5
|
+
import "../chunk-DZIMF2ES.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
|
@@ -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.
|
|
164
|
+
var version = "2.25.1";
|
|
165
165
|
|
|
166
166
|
// src/constants.ts
|
|
167
167
|
var VERSION = version;
|
|
@@ -435,7 +435,6 @@ var ensureAstroCollectionNotEmpty = async (astroDir) => {
|
|
|
435
435
|
"teams",
|
|
436
436
|
"domains",
|
|
437
437
|
"flows",
|
|
438
|
-
"pages",
|
|
439
438
|
"changelogs",
|
|
440
439
|
"queries",
|
|
441
440
|
"channels",
|
package/dist/eventcatalog.js
CHANGED
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
} from "./chunk-OW2FQPYP.js";
|
|
7
7
|
import {
|
|
8
8
|
log_build_default
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-OZLFIB46.js";
|
|
10
|
+
import "./chunk-O33THQNO.js";
|
|
11
11
|
import {
|
|
12
12
|
catalogToAstro
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-VCR3LHZR.js";
|
|
14
14
|
import {
|
|
15
15
|
VERSION
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-DZIMF2ES.js";
|
|
17
17
|
import {
|
|
18
18
|
isBackstagePluginEnabled
|
|
19
19
|
} from "./chunk-XMDPVKIJ.js";
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { BaseEdge, EdgeLabelRenderer, getBezierPath, type EdgeProps as XYFlowEdgeProps } from '@xyflow/react';
|
|
3
|
+
|
|
4
|
+
interface EdgeData {
|
|
5
|
+
message?: {
|
|
6
|
+
collection?: string;
|
|
7
|
+
};
|
|
8
|
+
opacity?: number;
|
|
9
|
+
animated?: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface CustomEdgeProps extends Omit<XYFlowEdgeProps, 'data'> {
|
|
13
|
+
data?: EdgeData;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default function CustomEdge({
|
|
17
|
+
id,
|
|
18
|
+
sourceX,
|
|
19
|
+
sourceY,
|
|
20
|
+
targetX,
|
|
21
|
+
targetY,
|
|
22
|
+
sourcePosition,
|
|
23
|
+
targetPosition,
|
|
24
|
+
style = {},
|
|
25
|
+
markerEnd,
|
|
26
|
+
label,
|
|
27
|
+
labelStyle,
|
|
28
|
+
data,
|
|
29
|
+
}: CustomEdgeProps) {
|
|
30
|
+
const [edgePath, labelX, labelY] = getBezierPath({
|
|
31
|
+
sourceX,
|
|
32
|
+
sourceY,
|
|
33
|
+
sourcePosition,
|
|
34
|
+
targetX,
|
|
35
|
+
targetY,
|
|
36
|
+
targetPosition,
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
const randomDelay = useMemo(() => Math.random() * 1, []);
|
|
40
|
+
const collection = data?.message?.collection;
|
|
41
|
+
const opacity = data?.opacity ?? 1;
|
|
42
|
+
|
|
43
|
+
const messageColor = useMemo(
|
|
44
|
+
() => (collection: string) => {
|
|
45
|
+
switch (collection) {
|
|
46
|
+
case 'events':
|
|
47
|
+
return 'orange';
|
|
48
|
+
case 'commands':
|
|
49
|
+
return 'blue';
|
|
50
|
+
case 'queries':
|
|
51
|
+
return 'green';
|
|
52
|
+
default:
|
|
53
|
+
return 'gray';
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
[]
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<>
|
|
61
|
+
<BaseEdge
|
|
62
|
+
path={edgePath}
|
|
63
|
+
markerEnd={markerEnd}
|
|
64
|
+
style={{
|
|
65
|
+
strokeWidth: 2,
|
|
66
|
+
stroke: '#fff',
|
|
67
|
+
...style,
|
|
68
|
+
}}
|
|
69
|
+
/>
|
|
70
|
+
{data?.animated && (
|
|
71
|
+
<g className={`z-30 ${opacity === 1 ? 'opacity-100' : 'opacity-10'}`}>
|
|
72
|
+
<circle cx="0" cy="0" r="7" fill={messageColor(collection || 'default')}>
|
|
73
|
+
<animateMotion dur="2s" repeatCount="indefinite" path={edgePath} rotate="auto" begin={`${randomDelay}s`}>
|
|
74
|
+
<mpath href={`#${id}`} />
|
|
75
|
+
</animateMotion>
|
|
76
|
+
</circle>
|
|
77
|
+
</g>
|
|
78
|
+
)}
|
|
79
|
+
{label && (
|
|
80
|
+
<EdgeLabelRenderer>
|
|
81
|
+
<div
|
|
82
|
+
style={{
|
|
83
|
+
position: 'absolute',
|
|
84
|
+
transform: `translate(-50%, -50%) translate(${labelX}px,${labelY}px)`,
|
|
85
|
+
zIndex: 1000,
|
|
86
|
+
...labelStyle,
|
|
87
|
+
}}
|
|
88
|
+
className="nodrag nopan max-w-[150px] text-xs bg-white px-2 py-1 rounded border border-gray-200 text-gray-600 font-medium shadow-sm"
|
|
89
|
+
>
|
|
90
|
+
{label}
|
|
91
|
+
</div>
|
|
92
|
+
</EdgeLabelRenderer>
|
|
93
|
+
)}
|
|
94
|
+
</>
|
|
95
|
+
);
|
|
96
|
+
}
|
|
@@ -24,6 +24,7 @@ import StepNode from './Nodes/Step';
|
|
|
24
24
|
import CommandNode from './Nodes/Command';
|
|
25
25
|
import ExternalSystemNode from './Nodes/ExternalSystem';
|
|
26
26
|
import AnimatedMessageEdge from './Edges/AnimatedMessageEdge';
|
|
27
|
+
import FlowEdge from './Edges/FlowEdge';
|
|
27
28
|
|
|
28
29
|
import type { CollectionEntry } from 'astro:content';
|
|
29
30
|
import { navigate } from 'astro:transitions/client';
|
|
@@ -75,6 +76,7 @@ const NodeGraphBuilder = ({
|
|
|
75
76
|
const edgeTypes = useMemo(
|
|
76
77
|
() => ({
|
|
77
78
|
animated: AnimatedMessageEdge,
|
|
79
|
+
'flow-edge': FlowEdge,
|
|
78
80
|
}),
|
|
79
81
|
[]
|
|
80
82
|
);
|
|
@@ -97,7 +99,7 @@ const NodeGraphBuilder = ({
|
|
|
97
99
|
eds.map((edge) => {
|
|
98
100
|
edge.style = { ...edge.style, opacity: 1 };
|
|
99
101
|
edge.labelStyle = { ...edge.labelStyle, opacity: 1 };
|
|
100
|
-
return { ...edge, data: { ...edge.data, opacity: 1 }, animated: animateMessages };
|
|
102
|
+
return { ...edge, data: { ...edge.data, opacity: 1, animated: animateMessages }, animated: animateMessages };
|
|
101
103
|
})
|
|
102
104
|
);
|
|
103
105
|
}, [setNodes, setEdges, animateMessages]);
|
|
@@ -125,7 +127,7 @@ const NodeGraphBuilder = ({
|
|
|
125
127
|
connectedNodeIds.add(edge.target);
|
|
126
128
|
return {
|
|
127
129
|
...edge,
|
|
128
|
-
data: { ...edge.data, opacity: 1 },
|
|
130
|
+
data: { ...edge.data, opacity: 1, animated: animateMessages },
|
|
129
131
|
style: { ...edge.style, opacity: 1 },
|
|
130
132
|
labelStyle: { ...edge.labelStyle, opacity: 1 },
|
|
131
133
|
animated: true,
|
|
@@ -133,7 +135,7 @@ const NodeGraphBuilder = ({
|
|
|
133
135
|
}
|
|
134
136
|
return {
|
|
135
137
|
...edge,
|
|
136
|
-
data: { ...edge.data, opacity: 0.1 },
|
|
138
|
+
data: { ...edge.data, opacity: 0.1, animated: animateMessages },
|
|
137
139
|
style: { ...edge.style, opacity: 0.1 },
|
|
138
140
|
labelStyle: { ...edge.labelStyle, opacity: 0.1 },
|
|
139
141
|
animated: animateMessages,
|
|
@@ -178,8 +180,8 @@ const NodeGraphBuilder = ({
|
|
|
178
180
|
eds.map((edge) => ({
|
|
179
181
|
...edge,
|
|
180
182
|
animated: animateMessages,
|
|
181
|
-
type: animateMessages ? 'animated' : 'default',
|
|
182
|
-
data: { ...edge.data, animateMessages },
|
|
183
|
+
type: edge.type === 'flow-edge' ? 'flow-edge' : animateMessages ? 'animated' : 'default',
|
|
184
|
+
data: { ...edge.data, animateMessages, animated: animateMessages },
|
|
183
185
|
}))
|
|
184
186
|
);
|
|
185
187
|
}, [animateMessages]);
|
|
@@ -427,8 +429,9 @@ const NodeGraph = ({
|
|
|
427
429
|
)}
|
|
428
430
|
|
|
429
431
|
{href && (
|
|
430
|
-
<div className="py-2 w-full text-right">
|
|
431
|
-
<
|
|
432
|
+
<div className="py-2 w-full text-right flex justify-between">
|
|
433
|
+
<span className="text-sm text-gray-500 italic">Right click a node to access documentation</span>
|
|
434
|
+
<a className=" text-sm underline text-gray-800 hover:text-primary" href={href}>
|
|
432
435
|
{hrefLabel} →
|
|
433
436
|
</a>
|
|
434
437
|
</div>
|
|
@@ -3,6 +3,8 @@ import { ArrowsRightLeftIcon } from '@heroicons/react/20/solid';
|
|
|
3
3
|
import type { CollectionMessageTypes, CollectionTypes } from '@types';
|
|
4
4
|
import type { CollectionEntry } from 'astro:content';
|
|
5
5
|
import { Handle } from '@xyflow/react';
|
|
6
|
+
import * as ContextMenu from '@radix-ui/react-context-menu';
|
|
7
|
+
import { buildUrl } from '@utils/url-builder';
|
|
6
8
|
|
|
7
9
|
interface Data {
|
|
8
10
|
title: string;
|
|
@@ -67,67 +69,93 @@ export default function ChannelNode({ data, sourcePosition, targetPosition }: an
|
|
|
67
69
|
};
|
|
68
70
|
|
|
69
71
|
return (
|
|
70
|
-
<
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
{targetPosition && <Handle type="target" position={targetPosition} />}
|
|
91
|
-
{sourcePosition && <Handle type="source" position={sourcePosition} />}
|
|
92
|
-
<div className={classNames(mode === 'full' ? `border-b border-gray-200` : '')}>
|
|
93
|
-
<div className="flex justify-between items-center">
|
|
94
|
-
<span className="text-xs font-bold block pb-0.5">{name}</span>
|
|
95
|
-
{Icon && <Icon className="w-5 h-5 opacity-60 p-0.5" />}
|
|
96
|
-
</div>
|
|
97
|
-
<div className="flex justify-between">
|
|
98
|
-
<span className="text-[10px] font-light block pt-0.5 pb-0.5 ">v{version}</span>
|
|
99
|
-
{mode === 'simple' && <span className="text-[10px] text-gray-500 font-light block pt-0.5 pb-0.5 ">Channel</span>}
|
|
72
|
+
<ContextMenu.Root>
|
|
73
|
+
<ContextMenu.Trigger>
|
|
74
|
+
<div
|
|
75
|
+
className={classNames(
|
|
76
|
+
mode === 'simple' ? 'min-h-[3em]' : 'min-h-[6.5em]',
|
|
77
|
+
'w-full rounded-md border flex justify-start bg-white text-black border-gray-400 transform '
|
|
78
|
+
)}
|
|
79
|
+
>
|
|
80
|
+
<div
|
|
81
|
+
className={classNames(
|
|
82
|
+
'bg-gradient-to-b from-gray-500 to-gray-700 relative flex items-center w-5 justify-center rounded-l-sm text-gray-100-500',
|
|
83
|
+
`border-r-[1px] border-gray-500`
|
|
84
|
+
)}
|
|
85
|
+
>
|
|
86
|
+
<ArrowsRightLeftIcon className="w-4 h-4 opacity-90 text-white absolute top-1 " />
|
|
87
|
+
{mode === 'full' && (
|
|
88
|
+
<span className="rotate -rotate-90 w-1/2 text-center absolute bottom-1 text-[9px] text-white font-bold uppercase tracking-[3px] ">
|
|
89
|
+
Channel
|
|
90
|
+
</span>
|
|
91
|
+
)}
|
|
100
92
|
</div>
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
<div className=
|
|
105
|
-
<
|
|
93
|
+
<div className="p-1 min-w-60 max-w-[min-content]">
|
|
94
|
+
{targetPosition && <Handle type="target" position={targetPosition} />}
|
|
95
|
+
{sourcePosition && <Handle type="source" position={sourcePosition} />}
|
|
96
|
+
<div className={classNames(mode === 'full' ? `border-b border-gray-200` : '')}>
|
|
97
|
+
<div className="flex justify-between items-center">
|
|
98
|
+
<span className="text-xs font-bold block pb-0.5">{name}</span>
|
|
99
|
+
{Icon && <Icon className="w-5 h-5 opacity-60 p-0.5" />}
|
|
100
|
+
</div>
|
|
101
|
+
<div className="flex justify-between">
|
|
102
|
+
<span className="text-[10px] font-light block pt-0.5 pb-0.5 ">v{version}</span>
|
|
103
|
+
{mode === 'simple' && <span className="text-[10px] text-gray-500 font-light block pt-0.5 pb-0.5 ">Channel</span>}
|
|
104
|
+
</div>
|
|
106
105
|
</div>
|
|
107
|
-
{
|
|
108
|
-
<div className="
|
|
109
|
-
<div className="
|
|
110
|
-
<
|
|
111
|
-
<span className="block font-normal ">{getAddress()}</span>
|
|
106
|
+
{mode === 'full' && (
|
|
107
|
+
<div className="divide-y divide-gray-200 ">
|
|
108
|
+
<div className="leading-[10px] py-1 ">
|
|
109
|
+
<span className="text-[8px] font-light">{summary}</span>
|
|
112
110
|
</div>
|
|
113
|
-
{
|
|
114
|
-
<div className="
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
111
|
+
{address && (
|
|
112
|
+
<div className="leading-3 py-1 flex flex-col items-start space-y-0.5">
|
|
113
|
+
<div className="text-[6px] flex items-center space-x-0.5 ">
|
|
114
|
+
<LinkIcon className="w-2 h-2 opacity-60" />
|
|
115
|
+
<span className="block font-normal ">{getAddress()}</span>
|
|
116
|
+
</div>
|
|
117
|
+
{protocols.length > 0 && (
|
|
118
|
+
<div className="text-[6px] font-semibold flex space-x-2 items-center ">
|
|
119
|
+
{[...protocols].map((protocol, index) => {
|
|
120
|
+
const ProtoColIcon = getIconForProtocol(protocol);
|
|
121
|
+
return (
|
|
122
|
+
<span key={index} className="font-normal flex items-center -ml-[1px] space-x-0.5">
|
|
123
|
+
{ProtoColIcon && <ProtoColIcon className="w-2 h-2 opacity-60 inline-block" />}
|
|
124
|
+
<span>{protocol}</span>
|
|
125
|
+
</span>
|
|
126
|
+
);
|
|
127
|
+
})}
|
|
128
|
+
</div>
|
|
129
|
+
)}
|
|
124
130
|
</div>
|
|
125
131
|
)}
|
|
126
132
|
</div>
|
|
127
133
|
)}
|
|
128
134
|
</div>
|
|
129
|
-
|
|
130
|
-
</
|
|
131
|
-
|
|
135
|
+
</div>
|
|
136
|
+
</ContextMenu.Trigger>
|
|
137
|
+
<ContextMenu.Portal>
|
|
138
|
+
<ContextMenu.Content className="min-w-[220px] bg-white rounded-md p-1 shadow-md border border-gray-200">
|
|
139
|
+
<ContextMenu.Item
|
|
140
|
+
asChild
|
|
141
|
+
className="text-sm px-2 py-1.5 outline-none cursor-pointer hover:bg-orange-100 rounded-sm flex items-center"
|
|
142
|
+
>
|
|
143
|
+
<a href={buildUrl(`/docs/channels/${id}/${version}`)}>Read documentation</a>
|
|
144
|
+
</ContextMenu.Item>
|
|
145
|
+
<ContextMenu.Separator className="h-[1px] bg-gray-200 m-1" />
|
|
146
|
+
|
|
147
|
+
<ContextMenu.Item asChild>
|
|
148
|
+
<a
|
|
149
|
+
href={buildUrl(`/docs/channels/${id}/${version}/changelog`)}
|
|
150
|
+
className="text-sm px-2 py-1.5 outline-none cursor-pointer hover:bg-orange-100 rounded-sm flex items-center"
|
|
151
|
+
target="_blank"
|
|
152
|
+
rel="noopener noreferrer"
|
|
153
|
+
>
|
|
154
|
+
Read changelog
|
|
155
|
+
</a>
|
|
156
|
+
</ContextMenu.Item>
|
|
157
|
+
</ContextMenu.Content>
|
|
158
|
+
</ContextMenu.Portal>
|
|
159
|
+
</ContextMenu.Root>
|
|
132
160
|
);
|
|
133
161
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ChatBubbleLeftIcon } from '@heroicons/react/16/solid';
|
|
2
2
|
import type { CollectionEntry } from 'astro:content';
|
|
3
3
|
import { Handle } from '@xyflow/react';
|
|
4
|
+
import MessageContextMenu from './MessageContextMenu';
|
|
4
5
|
|
|
5
6
|
interface Data {
|
|
6
7
|
title: string;
|
|
@@ -20,52 +21,54 @@ function classNames(...classes: any) {
|
|
|
20
21
|
export default function CommandNode({ data, sourcePosition, targetPosition }: any) {
|
|
21
22
|
const { mode, message } = data as Data;
|
|
22
23
|
|
|
23
|
-
const { name, version, summary, owners = [], producers = [], consumers = [] } = message.data;
|
|
24
|
+
const { id, name, version, summary, owners = [], producers = [], consumers = [], schemaPath } = message.data;
|
|
24
25
|
|
|
25
26
|
return (
|
|
26
|
-
<
|
|
27
|
-
<div
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
<div className="p-1 min-w-60 max-w-[min-content]">
|
|
41
|
-
{targetPosition && <Handle type="target" position={targetPosition} />}
|
|
42
|
-
{sourcePosition && <Handle type="source" position={sourcePosition} />}
|
|
43
|
-
<div className={classNames(mode === 'full' ? `border-b border-gray-200` : '')}>
|
|
44
|
-
<span className="text-xs font-bold block pb-0.5">{name}</span>
|
|
45
|
-
<div className="flex justify-between">
|
|
46
|
-
<span className="text-[10px] font-light block pt-0.5 pb-0.5 ">v{version}</span>
|
|
47
|
-
{mode === 'simple' && <span className="text-[10px] text-gray-500 font-light block pt-0.5 pb-0.5 ">Command</span>}
|
|
48
|
-
</div>
|
|
27
|
+
<MessageContextMenu message={message} messageType="commands">
|
|
28
|
+
<div className={classNames('w-full rounded-md border flex justify-start bg-white text-black border-blue-400')}>
|
|
29
|
+
<div
|
|
30
|
+
className={classNames(
|
|
31
|
+
'bg-gradient-to-b from-blue-500 to-blue-700 relative flex items-center w-5 justify-center rounded-l-sm text-blue-100-500',
|
|
32
|
+
`border-r-[1px] border-blue-500`
|
|
33
|
+
)}
|
|
34
|
+
>
|
|
35
|
+
<ChatBubbleLeftIcon className="w-4 h-4 opacity-90 text-white absolute top-1 " />
|
|
36
|
+
{mode === 'full' && (
|
|
37
|
+
<span className="rotate -rotate-90 w-1/2 text-center absolute bottom-1 text-[9px] text-white font-bold uppercase tracking-[3px] ">
|
|
38
|
+
Command
|
|
39
|
+
</span>
|
|
40
|
+
)}
|
|
49
41
|
</div>
|
|
50
|
-
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
</
|
|
55
|
-
<div className="
|
|
56
|
-
<span className="text-
|
|
57
|
-
|
|
58
|
-
</span>
|
|
59
|
-
<span className="text-xs" style={{ fontSize: '0.2em' }}>
|
|
60
|
-
Consumers: {consumers.length}
|
|
61
|
-
</span>
|
|
62
|
-
<span className="text-xs" style={{ fontSize: '0.2em' }}>
|
|
63
|
-
Owners: {owners.length}
|
|
64
|
-
</span>
|
|
42
|
+
<div className="p-1 min-w-60 max-w-[min-content]">
|
|
43
|
+
{targetPosition && <Handle type="target" position={targetPosition} />}
|
|
44
|
+
{sourcePosition && <Handle type="source" position={sourcePosition} />}
|
|
45
|
+
<div className={classNames(mode === 'full' ? `border-b border-gray-200` : '')}>
|
|
46
|
+
<span className="text-xs font-bold block pb-0.5">{name}</span>
|
|
47
|
+
<div className="flex justify-between">
|
|
48
|
+
<span className="text-[10px] font-light block pt-0.5 pb-0.5 ">v{version}</span>
|
|
49
|
+
{mode === 'simple' && <span className="text-[10px] text-gray-500 font-light block pt-0.5 pb-0.5 ">Command</span>}
|
|
65
50
|
</div>
|
|
66
51
|
</div>
|
|
67
|
-
|
|
52
|
+
{mode === 'full' && (
|
|
53
|
+
<div className="divide-y divide-gray-200 ">
|
|
54
|
+
<div className="leading-3 py-1">
|
|
55
|
+
<span className="text-[8px] font-light">{summary}</span>
|
|
56
|
+
</div>
|
|
57
|
+
<div className="grid grid-cols-2 gap-x-4 py-1">
|
|
58
|
+
<span className="text-xs" style={{ fontSize: '0.2em' }}>
|
|
59
|
+
Producers: {producers.length}
|
|
60
|
+
</span>
|
|
61
|
+
<span className="text-xs" style={{ fontSize: '0.2em' }}>
|
|
62
|
+
Consumers: {consumers.length}
|
|
63
|
+
</span>
|
|
64
|
+
<span className="text-xs" style={{ fontSize: '0.2em' }}>
|
|
65
|
+
Owners: {owners.length}
|
|
66
|
+
</span>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
)}
|
|
70
|
+
</div>
|
|
68
71
|
</div>
|
|
69
|
-
</
|
|
72
|
+
</MessageContextMenu>
|
|
70
73
|
);
|
|
71
74
|
}
|