@eventcatalog/visualiser 5.0.0-beta.4 → 5.0.0-beta.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.
- package/dist/elk-layout-BVUJjv6i.d.mts +47 -0
- package/dist/elk-layout-BVUJjv6i.d.ts +47 -0
- package/dist/index.d.mts +178 -9
- package/dist/index.d.ts +178 -9
- package/dist/index.js +5451 -5096
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8960 -8623
- package/dist/index.mjs.map +1 -1
- package/dist/layout.d.mts +2 -45
- package/dist/layout.d.ts +2 -45
- package/dist/styles-core.css +11 -1
- package/dist/styles.css +11 -1
- package/package.json +1 -1
package/dist/layout.d.mts
CHANGED
|
@@ -1,49 +1,6 @@
|
|
|
1
|
+
export { E as EdgeRoute, L as LayoutGraph, a as LayoutSize, g as getNodeSize, l as layoutWithElk } from './elk-layout-BVUJjv6i.mjs';
|
|
1
2
|
import { Node, Edge } from '@xyflow/react';
|
|
2
3
|
|
|
3
|
-
type LayoutGraph = {
|
|
4
|
-
nodes: Node[];
|
|
5
|
-
edges: Edge[];
|
|
6
|
-
};
|
|
7
|
-
type LayoutSize = {
|
|
8
|
-
width: number;
|
|
9
|
-
height: number;
|
|
10
|
-
};
|
|
11
|
-
type EdgeRoute = {
|
|
12
|
-
points: {
|
|
13
|
-
x: number;
|
|
14
|
-
y: number;
|
|
15
|
-
}[];
|
|
16
|
-
label?: {
|
|
17
|
-
x: number;
|
|
18
|
-
y: number;
|
|
19
|
-
};
|
|
20
|
-
/** Where the edge's source and target were laid out (top-left, in the flow) */
|
|
21
|
-
source?: {
|
|
22
|
-
x: number;
|
|
23
|
-
y: number;
|
|
24
|
-
};
|
|
25
|
-
target?: {
|
|
26
|
-
x: number;
|
|
27
|
-
y: number;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
/** The size a node is laid out at: as rendered, or an estimate for its type */
|
|
31
|
-
declare const getNodeSize: (node: Node) => LayoutSize;
|
|
32
|
-
/**
|
|
33
|
-
* Lays a graph out with ELK (left to right). Nested groups (nodes other nodes
|
|
34
|
-
* have as their `parentId`) are laid out in one pass with their children.
|
|
35
|
-
* Edges are routed at right angles around nodes, each edge with its own
|
|
36
|
-
* connection point so edges don't run on top of each other, and labels are
|
|
37
|
-
* placed on their edge. Each edge keeps its type and gets its route (and label
|
|
38
|
-
* position) in `data.route`, which the visualiser's edges are drawn along.
|
|
39
|
-
*
|
|
40
|
-
* Node positions are top-left corners (nodes get `origin: [0, 0]`), children
|
|
41
|
-
* relative to their group. Groups are sized to fit their children.
|
|
42
|
-
*/
|
|
43
|
-
declare const layoutWithElk: ({ nodes, edges }: LayoutGraph, { sizeOf }?: {
|
|
44
|
-
sizeOf?: (node: Node) => LayoutSize;
|
|
45
|
-
}) => Promise<LayoutGraph>;
|
|
46
|
-
|
|
47
4
|
declare const isMessageNode: (node: Node) => boolean;
|
|
48
5
|
/**
|
|
49
6
|
* Label for an edge carrying messages (name -> collection), e.g.
|
|
@@ -71,4 +28,4 @@ declare const hideMessageNodes: (nodes: Node[], edges: Edge[]) => {
|
|
|
71
28
|
edges: Edge[];
|
|
72
29
|
};
|
|
73
30
|
|
|
74
|
-
export {
|
|
31
|
+
export { getMessagesLabel, hideMessageNodes, hideNodes, isCarrier, isMessageNode };
|
package/dist/layout.d.ts
CHANGED
|
@@ -1,49 +1,6 @@
|
|
|
1
|
+
export { E as EdgeRoute, L as LayoutGraph, a as LayoutSize, g as getNodeSize, l as layoutWithElk } from './elk-layout-BVUJjv6i.js';
|
|
1
2
|
import { Node, Edge } from '@xyflow/react';
|
|
2
3
|
|
|
3
|
-
type LayoutGraph = {
|
|
4
|
-
nodes: Node[];
|
|
5
|
-
edges: Edge[];
|
|
6
|
-
};
|
|
7
|
-
type LayoutSize = {
|
|
8
|
-
width: number;
|
|
9
|
-
height: number;
|
|
10
|
-
};
|
|
11
|
-
type EdgeRoute = {
|
|
12
|
-
points: {
|
|
13
|
-
x: number;
|
|
14
|
-
y: number;
|
|
15
|
-
}[];
|
|
16
|
-
label?: {
|
|
17
|
-
x: number;
|
|
18
|
-
y: number;
|
|
19
|
-
};
|
|
20
|
-
/** Where the edge's source and target were laid out (top-left, in the flow) */
|
|
21
|
-
source?: {
|
|
22
|
-
x: number;
|
|
23
|
-
y: number;
|
|
24
|
-
};
|
|
25
|
-
target?: {
|
|
26
|
-
x: number;
|
|
27
|
-
y: number;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
/** The size a node is laid out at: as rendered, or an estimate for its type */
|
|
31
|
-
declare const getNodeSize: (node: Node) => LayoutSize;
|
|
32
|
-
/**
|
|
33
|
-
* Lays a graph out with ELK (left to right). Nested groups (nodes other nodes
|
|
34
|
-
* have as their `parentId`) are laid out in one pass with their children.
|
|
35
|
-
* Edges are routed at right angles around nodes, each edge with its own
|
|
36
|
-
* connection point so edges don't run on top of each other, and labels are
|
|
37
|
-
* placed on their edge. Each edge keeps its type and gets its route (and label
|
|
38
|
-
* position) in `data.route`, which the visualiser's edges are drawn along.
|
|
39
|
-
*
|
|
40
|
-
* Node positions are top-left corners (nodes get `origin: [0, 0]`), children
|
|
41
|
-
* relative to their group. Groups are sized to fit their children.
|
|
42
|
-
*/
|
|
43
|
-
declare const layoutWithElk: ({ nodes, edges }: LayoutGraph, { sizeOf }?: {
|
|
44
|
-
sizeOf?: (node: Node) => LayoutSize;
|
|
45
|
-
}) => Promise<LayoutGraph>;
|
|
46
|
-
|
|
47
4
|
declare const isMessageNode: (node: Node) => boolean;
|
|
48
5
|
/**
|
|
49
6
|
* Label for an edge carrying messages (name -> collection), e.g.
|
|
@@ -71,4 +28,4 @@ declare const hideMessageNodes: (nodes: Node[], edges: Edge[]) => {
|
|
|
71
28
|
edges: Edge[];
|
|
72
29
|
};
|
|
73
30
|
|
|
74
|
-
export {
|
|
31
|
+
export { getMessagesLabel, hideMessageNodes, hideNodes, isCarrier, isMessageNode };
|
package/dist/styles-core.css
CHANGED
|
@@ -3903,9 +3903,12 @@
|
|
|
3903
3903
|
inset: -2px;
|
|
3904
3904
|
border-radius: 50%;
|
|
3905
3905
|
box-shadow: 0 0 0 2px rgba(var(--ec-glow), 0.5);
|
|
3906
|
-
animation: ec-handle-glow 2s ease-in-out infinite;
|
|
3907
3906
|
pointer-events: none;
|
|
3908
3907
|
}
|
|
3908
|
+
.eventcatalog-visualizer .react-flow__node:hover .ec-handle-glow::after,
|
|
3909
|
+
.eventcatalog-visualizer .react-flow__node.selected .ec-handle-glow::after {
|
|
3910
|
+
animation: ec-handle-glow 2s ease-in-out infinite;
|
|
3911
|
+
}
|
|
3909
3912
|
@keyframes ec-handle-glow {
|
|
3910
3913
|
0%,
|
|
3911
3914
|
100% {
|
|
@@ -4167,6 +4170,13 @@
|
|
|
4167
4170
|
.eventcatalog-visualizer .ec-interaction-active .ec-animated-msg {
|
|
4168
4171
|
visibility: hidden;
|
|
4169
4172
|
}
|
|
4173
|
+
.eventcatalog-visualizer .react-flow__edge.animated .ec-animated-msg path {
|
|
4174
|
+
animation: none;
|
|
4175
|
+
stroke-dasharray: none;
|
|
4176
|
+
}
|
|
4177
|
+
.eventcatalog-visualizer .ec-interaction-active .react-flow__edge.animated path {
|
|
4178
|
+
animation-play-state: paused;
|
|
4179
|
+
}
|
|
4170
4180
|
.eventcatalog-visualizer .react-flow__minimap {
|
|
4171
4181
|
background-color: rgb(var(--ec-card-bg));
|
|
4172
4182
|
border: 1px solid rgb(var(--ec-page-border));
|
package/dist/styles.css
CHANGED
|
@@ -3904,9 +3904,12 @@
|
|
|
3904
3904
|
inset: -2px;
|
|
3905
3905
|
border-radius: 50%;
|
|
3906
3906
|
box-shadow: 0 0 0 2px rgba(var(--ec-glow), 0.5);
|
|
3907
|
-
animation: ec-handle-glow 2s ease-in-out infinite;
|
|
3908
3907
|
pointer-events: none;
|
|
3909
3908
|
}
|
|
3909
|
+
.eventcatalog-visualizer .react-flow__node:hover .ec-handle-glow::after,
|
|
3910
|
+
.eventcatalog-visualizer .react-flow__node.selected .ec-handle-glow::after {
|
|
3911
|
+
animation: ec-handle-glow 2s ease-in-out infinite;
|
|
3912
|
+
}
|
|
3910
3913
|
@keyframes ec-handle-glow {
|
|
3911
3914
|
0%,
|
|
3912
3915
|
100% {
|
|
@@ -4161,6 +4164,13 @@
|
|
|
4161
4164
|
.eventcatalog-visualizer .ec-interaction-active .ec-animated-msg {
|
|
4162
4165
|
visibility: hidden;
|
|
4163
4166
|
}
|
|
4167
|
+
.eventcatalog-visualizer .react-flow__edge.animated .ec-animated-msg path {
|
|
4168
|
+
animation: none;
|
|
4169
|
+
stroke-dasharray: none;
|
|
4170
|
+
}
|
|
4171
|
+
.eventcatalog-visualizer .ec-interaction-active .react-flow__edge.animated path {
|
|
4172
|
+
animation-play-state: paused;
|
|
4173
|
+
}
|
|
4164
4174
|
.eventcatalog-visualizer .react-flow__minimap {
|
|
4165
4175
|
background-color: rgb(var(--ec-card-bg));
|
|
4166
4176
|
border: 1px solid rgb(var(--ec-page-border));
|
package/package.json
CHANGED