@eventcatalog/visualiser 5.0.0-beta.6 → 5.0.0-beta.7
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.
|
@@ -7583,7 +7583,7 @@ var RESOURCE_NODE_TYPES = /* @__PURE__ */ new Set([
|
|
|
7583
7583
|
|
|
7584
7584
|
// src/edges/AnimatedMessageEdge.tsx
|
|
7585
7585
|
import { memo as memo35, useMemo as useMemo15 } from "react";
|
|
7586
|
-
import { BaseEdge
|
|
7586
|
+
import { BaseEdge } from "@xyflow/react";
|
|
7587
7587
|
|
|
7588
7588
|
// src/utils/flow-portals.tsx
|
|
7589
7589
|
import { createPortal } from "react-dom";
|
|
@@ -7654,7 +7654,11 @@ function EdgeLabel({
|
|
|
7654
7654
|
|
|
7655
7655
|
// src/edges/route.ts
|
|
7656
7656
|
import { useCallback as useCallback6 } from "react";
|
|
7657
|
-
import {
|
|
7657
|
+
import {
|
|
7658
|
+
getSmoothStepPath,
|
|
7659
|
+
Position as Position25,
|
|
7660
|
+
useStore as useStore3
|
|
7661
|
+
} from "@xyflow/react";
|
|
7658
7662
|
var ROUTE_TOLERANCE = { x: 60, y: 400 };
|
|
7659
7663
|
var isStraight = (a, b) => a.x === b.x || a.y === b.y;
|
|
7660
7664
|
var add = (a, b) => ({ x: a.x + b.x, y: a.y + b.y });
|
|
@@ -7721,6 +7725,13 @@ var moveLabel = (label, points, moved) => {
|
|
|
7721
7725
|
const [a, b] = [shift(segment), shift(segment + 1)];
|
|
7722
7726
|
return { x: label.x + (a.x + b.x) / 2, y: label.y + (a.y + b.y) / 2 };
|
|
7723
7727
|
};
|
|
7728
|
+
var getStepPath = (props) => {
|
|
7729
|
+
const [path, labelX, labelY, offsetX, offsetY] = getSmoothStepPath(props);
|
|
7730
|
+
const { sourceX, targetX, targetY } = props;
|
|
7731
|
+
const forwards = (props.sourcePosition ?? Position25.Bottom) === Position25.Right && (props.targetPosition ?? Position25.Top) === Position25.Left && targetX > sourceX;
|
|
7732
|
+
if (!forwards) return [path, labelX, labelY, offsetX, offsetY];
|
|
7733
|
+
return [path, (labelX + targetX) / 2, targetY, offsetX, offsetY];
|
|
7734
|
+
};
|
|
7724
7735
|
var getMoved = (state, nodeId, at) => {
|
|
7725
7736
|
const position = state.nodeLookup.get(nodeId)?.internals.positionAbsolute;
|
|
7726
7737
|
return position && { x: position.x - at.x, y: position.y - at.y };
|
|
@@ -7823,7 +7834,7 @@ var AnimatedMessageEdge = memo35(
|
|
|
7823
7834
|
sourceHandleId,
|
|
7824
7835
|
targetHandleId
|
|
7825
7836
|
},
|
|
7826
|
-
|
|
7837
|
+
getStepPath({
|
|
7827
7838
|
sourceX,
|
|
7828
7839
|
sourceY,
|
|
7829
7840
|
sourcePosition,
|
|
@@ -8114,11 +8125,7 @@ var FlowEdge_default = memo37(function CustomEdge({
|
|
|
8114
8125
|
});
|
|
8115
8126
|
|
|
8116
8127
|
// src/edges/LabelledEdge.tsx
|
|
8117
|
-
import {
|
|
8118
|
-
BaseEdge as BaseEdge3,
|
|
8119
|
-
getBezierPath,
|
|
8120
|
-
getSmoothStepPath as getSmoothStepPath4
|
|
8121
|
-
} from "@xyflow/react";
|
|
8128
|
+
import { BaseEdge as BaseEdge3, getBezierPath } from "@xyflow/react";
|
|
8122
8129
|
import { memo as memo38 } from "react";
|
|
8123
8130
|
import { Fragment as Fragment9, jsx as jsx42, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
8124
8131
|
function LabelledEdge({
|
|
@@ -8164,7 +8171,7 @@ function LabelledEdge({
|
|
|
8164
8171
|
sourceHandleId,
|
|
8165
8172
|
targetHandleId
|
|
8166
8173
|
},
|
|
8167
|
-
pathType === "bezier" ? getBezierPath(pathProps) :
|
|
8174
|
+
pathType === "bezier" ? getBezierPath(pathProps) : getStepPath({
|
|
8168
8175
|
...pathProps,
|
|
8169
8176
|
...pathType === "step" ? { borderRadius: 0 } : {}
|
|
8170
8177
|
})
|
|
@@ -9907,7 +9914,7 @@ import {
|
|
|
9907
9914
|
import { memo as memo44 } from "react";
|
|
9908
9915
|
import {
|
|
9909
9916
|
NodeToolbar,
|
|
9910
|
-
Position as
|
|
9917
|
+
Position as Position26,
|
|
9911
9918
|
useStore as useStore5
|
|
9912
9919
|
} from "@xyflow/react";
|
|
9913
9920
|
import { ArrowRightLeft as ArrowRightLeft2, FileText } from "lucide-react";
|
|
@@ -9942,7 +9949,7 @@ var FocusModeNodeActions = ({
|
|
|
9942
9949
|
NodeToolbar,
|
|
9943
9950
|
{
|
|
9944
9951
|
nodeId: node.id,
|
|
9945
|
-
position:
|
|
9952
|
+
position: Position26.Bottom,
|
|
9946
9953
|
isVisible: true,
|
|
9947
9954
|
offset: -16,
|
|
9948
9955
|
children: /* @__PURE__ */ jsx49(
|
|
@@ -9969,7 +9976,7 @@ var FocusModeNodeActions = ({
|
|
|
9969
9976
|
NodeToolbar,
|
|
9970
9977
|
{
|
|
9971
9978
|
nodeId: node.id,
|
|
9972
|
-
position:
|
|
9979
|
+
position: Position26.Bottom,
|
|
9973
9980
|
isVisible: true,
|
|
9974
9981
|
offset: -16,
|
|
9975
9982
|
children: /* @__PURE__ */ jsxs45(
|
|
@@ -10007,7 +10014,7 @@ var FocusModeNodeActions = ({
|
|
|
10007
10014
|
var FocusModeNodeActions_default = memo44(FocusModeNodeActions);
|
|
10008
10015
|
|
|
10009
10016
|
// src/components/FocusMode/FocusModePlaceholder.tsx
|
|
10010
|
-
import { Handle as Handle27, Position as
|
|
10017
|
+
import { Handle as Handle27, Position as Position27 } from "@xyflow/react";
|
|
10011
10018
|
import { jsx as jsx50, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
10012
10019
|
var FocusModePlaceholder = ({
|
|
10013
10020
|
data
|
|
@@ -10023,7 +10030,7 @@ var FocusModePlaceholder = ({
|
|
|
10023
10030
|
Handle27,
|
|
10024
10031
|
{
|
|
10025
10032
|
type: "target",
|
|
10026
|
-
position:
|
|
10033
|
+
position: Position27.Left,
|
|
10027
10034
|
style: { visibility: "hidden" }
|
|
10028
10035
|
}
|
|
10029
10036
|
),
|
|
@@ -10032,7 +10039,7 @@ var FocusModePlaceholder = ({
|
|
|
10032
10039
|
Handle27,
|
|
10033
10040
|
{
|
|
10034
10041
|
type: "source",
|
|
10035
|
-
position:
|
|
10042
|
+
position: Position27.Right,
|
|
10036
10043
|
style: { visibility: "hidden" }
|
|
10037
10044
|
}
|
|
10038
10045
|
)
|
|
@@ -15695,4 +15702,4 @@ export {
|
|
|
15695
15702
|
edgeTypes,
|
|
15696
15703
|
exportNodeGraphForStudio
|
|
15697
15704
|
};
|
|
15698
|
-
//# sourceMappingURL=chunk-
|
|
15705
|
+
//# sourceMappingURL=chunk-Y2IJ5XR6.mjs.map
|