@eventcatalog/visualiser 5.0.0-beta.3 → 5.0.0-beta.4
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/index.js +144 -103
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +213 -172
- package/dist/index.mjs.map +1 -1
- package/dist/styles-core.css +2 -23
- package/dist/styles.css +2 -23
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/components/NodeGraph.tsx
|
|
2
2
|
import {
|
|
3
3
|
useEffect as useEffect11,
|
|
4
|
-
useMemo as
|
|
4
|
+
useMemo as useMemo18,
|
|
5
5
|
useState as useState15,
|
|
6
6
|
useCallback as useCallback13,
|
|
7
7
|
useRef as useRef9,
|
|
@@ -187,6 +187,7 @@ var HANDLE_GLOW = {
|
|
|
187
187
|
actor: glow("234, 179, 8"),
|
|
188
188
|
external: glow("168, 85, 247"),
|
|
189
189
|
dataProduct: glow("99, 102, 241"),
|
|
190
|
+
view: glow("14, 165, 233"),
|
|
190
191
|
// Nodes without a colour of their own (fields, message groups, custom steps)
|
|
191
192
|
generic: glow("251, 146, 60")
|
|
192
193
|
};
|
|
@@ -3693,33 +3694,67 @@ var config_default2 = {
|
|
|
3693
3694
|
};
|
|
3694
3695
|
|
|
3695
3696
|
// src/nodes/view/ViewNode.tsx
|
|
3696
|
-
import { memo as memo13 } from "react";
|
|
3697
|
+
import { memo as memo13, useMemo as useMemo8 } from "react";
|
|
3697
3698
|
import { MonitorIcon } from "lucide-react";
|
|
3698
|
-
import { Handle as Handle9, Position as Position9 } from "@xyflow/react";
|
|
3699
|
+
import { Handle as Handle9, Position as Position9, useNodeConnections as useNodeConnections9 } from "@xyflow/react";
|
|
3699
3700
|
import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3701
|
+
var VIEW_COLOR = "#0ea5e9";
|
|
3702
|
+
var GlowHandle13 = memo13(function GlowHandle14({
|
|
3703
|
+
side
|
|
3704
|
+
}) {
|
|
3705
|
+
return /* @__PURE__ */ jsx15(
|
|
3706
|
+
"div",
|
|
3707
|
+
{
|
|
3708
|
+
className: "ec-handle-glow",
|
|
3709
|
+
style: {
|
|
3710
|
+
position: "absolute",
|
|
3711
|
+
top: "50%",
|
|
3712
|
+
[side]: -6,
|
|
3713
|
+
transform: "translateY(-50%)",
|
|
3714
|
+
width: 12,
|
|
3715
|
+
height: 12,
|
|
3716
|
+
borderRadius: "50%",
|
|
3717
|
+
background: "linear-gradient(135deg, #38bdf8, #0284c7)",
|
|
3718
|
+
border: "2px solid rgb(var(--ec-page-bg))",
|
|
3719
|
+
zIndex: 20,
|
|
3720
|
+
...HANDLE_GLOW.view,
|
|
3721
|
+
pointerEvents: "none"
|
|
3722
|
+
}
|
|
3723
|
+
}
|
|
3724
|
+
);
|
|
3725
|
+
});
|
|
3703
3726
|
var ViewNode_default = memo13(function View(props) {
|
|
3704
|
-
const {
|
|
3705
|
-
|
|
3727
|
+
const {
|
|
3728
|
+
name,
|
|
3729
|
+
version,
|
|
3730
|
+
summary,
|
|
3731
|
+
screenshot,
|
|
3732
|
+
owners = EMPTY_ARRAY,
|
|
3733
|
+
notes
|
|
3734
|
+
} = props.data.view;
|
|
3706
3735
|
const mode = props.data.mode || "simple";
|
|
3707
|
-
const
|
|
3736
|
+
const ownersNormalized = useMemo8(() => normalizeOwners(owners), [owners]);
|
|
3737
|
+
const targetConnections = useNodeConnections9({ handleType: "target" });
|
|
3738
|
+
const sourceConnections = useNodeConnections9({ handleType: "source" });
|
|
3708
3739
|
return /* @__PURE__ */ jsxs13(
|
|
3709
3740
|
"div",
|
|
3710
3741
|
{
|
|
3711
|
-
className:
|
|
3712
|
-
"
|
|
3713
|
-
selected ? "
|
|
3714
|
-
),
|
|
3715
|
-
style:
|
|
3742
|
+
className: [
|
|
3743
|
+
"relative min-w-48 max-w-60 rounded-xl border-2 border-sky-500 overflow-visible",
|
|
3744
|
+
props.selected ? "ring-2 ring-sky-400/60 ring-offset-2" : ""
|
|
3745
|
+
].join(" "),
|
|
3746
|
+
style: {
|
|
3747
|
+
background: "rgb(var(--ec-card-bg))",
|
|
3748
|
+
boxShadow: "0 2px 12px rgba(14, 165, 233, 0.15)"
|
|
3749
|
+
},
|
|
3716
3750
|
children: [
|
|
3751
|
+
props.data.isFocused && /* @__PURE__ */ jsx15(FocusedResourceIndicator, {}),
|
|
3717
3752
|
/* @__PURE__ */ jsx15(
|
|
3718
3753
|
Handle9,
|
|
3719
3754
|
{
|
|
3720
3755
|
type: "target",
|
|
3721
3756
|
position: Position9.Left,
|
|
3722
|
-
|
|
3757
|
+
style: HIDDEN_HANDLE_STYLE
|
|
3723
3758
|
}
|
|
3724
3759
|
),
|
|
3725
3760
|
/* @__PURE__ */ jsx15(
|
|
@@ -3727,53 +3762,59 @@ var ViewNode_default = memo13(function View(props) {
|
|
|
3727
3762
|
{
|
|
3728
3763
|
type: "source",
|
|
3729
3764
|
position: Position9.Right,
|
|
3730
|
-
|
|
3731
|
-
}
|
|
3732
|
-
),
|
|
3733
|
-
/* @__PURE__ */ jsxs13(
|
|
3734
|
-
"div",
|
|
3735
|
-
{
|
|
3736
|
-
className: `bg-gradient-to-b from-blue-500 to-blue-700 relative flex flex-col items-center w-5 justify-between rounded-l-sm text-blue-100 border-r-[1px] border-blue-500`,
|
|
3737
|
-
children: [
|
|
3738
|
-
/* @__PURE__ */ jsx15(
|
|
3739
|
-
MonitorIcon,
|
|
3740
|
-
{
|
|
3741
|
-
className: `w-4 h-4 opacity-90 text-white mt-1 ${mode === "full" ? "mb-2" : "mb-1"}`
|
|
3742
|
-
}
|
|
3743
|
-
),
|
|
3744
|
-
mode === "full" && /* @__PURE__ */ jsx15(
|
|
3745
|
-
"span",
|
|
3746
|
-
{
|
|
3747
|
-
className: "text-center text-[8px] text-white font-bold uppercase mb-4",
|
|
3748
|
-
style: ROTATED_LABEL_STYLE,
|
|
3749
|
-
children: nodeLabel
|
|
3750
|
-
}
|
|
3751
|
-
)
|
|
3752
|
-
]
|
|
3765
|
+
style: HIDDEN_HANDLE_STYLE
|
|
3753
3766
|
}
|
|
3754
3767
|
),
|
|
3755
|
-
/* @__PURE__ */
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3768
|
+
notes && notes.length > 0 && /* @__PURE__ */ jsx15(NotesIndicator, { notes, resourceName: name }),
|
|
3769
|
+
targetConnections.length > 0 && /* @__PURE__ */ jsx15(GlowHandle13, { side: "left" }),
|
|
3770
|
+
sourceConnections.length > 0 && /* @__PURE__ */ jsx15(GlowHandle13, { side: "right" }),
|
|
3771
|
+
/* @__PURE__ */ jsx15("div", { className: "absolute -top-2.5 left-2.5 z-10", children: /* @__PURE__ */ jsxs13("span", { className: "inline-flex items-center gap-1 text-[7px] font-bold uppercase tracking-widest text-white px-1.5 py-0.5 rounded shadow-sm bg-sky-500", children: [
|
|
3772
|
+
/* @__PURE__ */ jsx15(MonitorIcon, { className: "w-2.5 h-2.5", strokeWidth: 2.5 }),
|
|
3773
|
+
"View"
|
|
3774
|
+
] }) }),
|
|
3775
|
+
/* @__PURE__ */ jsxs13("div", { className: "px-3 pt-3.5 pb-2.5", children: [
|
|
3776
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex items-baseline gap-1 min-w-0", children: [
|
|
3777
|
+
/* @__PURE__ */ jsx15(
|
|
3778
|
+
TruncatedResourceName,
|
|
3779
|
+
{
|
|
3780
|
+
value: name,
|
|
3781
|
+
tooltipBorderColor: VIEW_COLOR,
|
|
3782
|
+
className: "text-[13px] font-semibold leading-snug text-[rgb(var(--ec-page-text))] truncate",
|
|
3783
|
+
children: name
|
|
3784
|
+
}
|
|
3785
|
+
),
|
|
3786
|
+
version && /* @__PURE__ */ jsxs13("span", { className: "text-[10px] font-normal text-[rgb(var(--ec-page-text-muted))] shrink-0", children: [
|
|
3787
|
+
"(v",
|
|
3788
|
+
version,
|
|
3789
|
+
")"
|
|
3790
|
+
] })
|
|
3759
3791
|
] }),
|
|
3760
|
-
|
|
3792
|
+
mode === "full" && summary && /* @__PURE__ */ jsx15(
|
|
3761
3793
|
"div",
|
|
3762
3794
|
{
|
|
3763
|
-
className: "text-[
|
|
3795
|
+
className: "mt-1.5 text-[9px] text-[rgb(var(--ec-page-text-muted))] leading-relaxed overflow-hidden",
|
|
3764
3796
|
style: LINE_CLAMP_STYLE,
|
|
3765
3797
|
title: summary,
|
|
3766
3798
|
children: summary
|
|
3767
3799
|
}
|
|
3768
|
-
)
|
|
3769
|
-
|
|
3800
|
+
),
|
|
3801
|
+
mode === "full" && screenshot && /* @__PURE__ */ jsx15(
|
|
3770
3802
|
"img",
|
|
3771
3803
|
{
|
|
3772
3804
|
src: screenshot,
|
|
3773
3805
|
alt: `${name} screenshot`,
|
|
3774
|
-
className: "
|
|
3806
|
+
className: "mt-2 w-full h-24 object-cover rounded-md border border-[rgb(var(--ec-page-border))]"
|
|
3775
3807
|
}
|
|
3776
|
-
)
|
|
3808
|
+
),
|
|
3809
|
+
/* @__PURE__ */ jsx15(
|
|
3810
|
+
OwnerIndicator,
|
|
3811
|
+
{
|
|
3812
|
+
owners: ownersNormalized,
|
|
3813
|
+
accentColor: "bg-sky-400",
|
|
3814
|
+
borderColor: "rgba(14,165,233,0.08)",
|
|
3815
|
+
iconClass: "text-sky-300"
|
|
3816
|
+
}
|
|
3817
|
+
)
|
|
3777
3818
|
] })
|
|
3778
3819
|
]
|
|
3779
3820
|
}
|
|
@@ -3783,9 +3824,9 @@ var ViewNode_default = memo13(function View(props) {
|
|
|
3783
3824
|
// src/nodes/actor/ActorNode.tsx
|
|
3784
3825
|
import { memo as memo14 } from "react";
|
|
3785
3826
|
import { User } from "lucide-react";
|
|
3786
|
-
import { Handle as Handle10, Position as Position10, useNodeConnections as
|
|
3827
|
+
import { Handle as Handle10, Position as Position10, useNodeConnections as useNodeConnections10 } from "@xyflow/react";
|
|
3787
3828
|
import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3788
|
-
function
|
|
3829
|
+
function GlowHandle15({ side }) {
|
|
3789
3830
|
return /* @__PURE__ */ jsx16(
|
|
3790
3831
|
"div",
|
|
3791
3832
|
{
|
|
@@ -3807,7 +3848,7 @@ function GlowHandle13({ side }) {
|
|
|
3807
3848
|
}
|
|
3808
3849
|
);
|
|
3809
3850
|
}
|
|
3810
|
-
function
|
|
3851
|
+
function classNames9(...classes) {
|
|
3811
3852
|
return classes.filter(Boolean).join(" ");
|
|
3812
3853
|
}
|
|
3813
3854
|
function PostItActor(props) {
|
|
@@ -3816,7 +3857,7 @@ function PostItActor(props) {
|
|
|
3816
3857
|
return /* @__PURE__ */ jsxs14(
|
|
3817
3858
|
"div",
|
|
3818
3859
|
{
|
|
3819
|
-
className:
|
|
3860
|
+
className: classNames9(
|
|
3820
3861
|
"relative min-w-44 max-w-56 min-h-[120px]",
|
|
3821
3862
|
props?.selected ? "ring-2 ring-yellow-400/60 ring-offset-1" : ""
|
|
3822
3863
|
),
|
|
@@ -3884,7 +3925,7 @@ function PostItActor(props) {
|
|
|
3884
3925
|
as: "div",
|
|
3885
3926
|
value: name,
|
|
3886
3927
|
tooltipBorderColor: "#eab308",
|
|
3887
|
-
className:
|
|
3928
|
+
className: classNames9(
|
|
3888
3929
|
"text-[13px] font-bold leading-snug truncate",
|
|
3889
3930
|
deprecated ? "text-yellow-950/40 line-through" : "text-yellow-950"
|
|
3890
3931
|
),
|
|
@@ -3908,14 +3949,14 @@ function PostItActor(props) {
|
|
|
3908
3949
|
function DefaultActor(props) {
|
|
3909
3950
|
const { name, summary, deprecated, draft, notes } = props?.data;
|
|
3910
3951
|
const mode = props?.data?.mode || "simple";
|
|
3911
|
-
const targetConnections =
|
|
3912
|
-
const sourceConnections =
|
|
3952
|
+
const targetConnections = useNodeConnections10({ handleType: "target" });
|
|
3953
|
+
const sourceConnections = useNodeConnections10({ handleType: "source" });
|
|
3913
3954
|
const isDark = useDarkMode();
|
|
3914
3955
|
const deprecatedStripe = isDark ? "rgba(239,68,68,0.25)" : "rgba(239,68,68,0.1)";
|
|
3915
3956
|
return /* @__PURE__ */ jsxs14(
|
|
3916
3957
|
"div",
|
|
3917
3958
|
{
|
|
3918
|
-
className:
|
|
3959
|
+
className: classNames9(
|
|
3919
3960
|
"relative min-w-48 max-w-60 rounded-xl border-2 overflow-visible",
|
|
3920
3961
|
props?.selected ? "ring-2 ring-yellow-400/60 ring-offset-2" : "",
|
|
3921
3962
|
deprecated ? "border-dashed border-red-500" : draft ? `border-dashed ${isDark ? "border-yellow-400" : "border-yellow-400/60"}` : "border-yellow-500"
|
|
@@ -3942,12 +3983,12 @@ function DefaultActor(props) {
|
|
|
3942
3983
|
}
|
|
3943
3984
|
),
|
|
3944
3985
|
notes && notes.length > 0 && /* @__PURE__ */ jsx16(NotesIndicator, { notes, resourceName: name }),
|
|
3945
|
-
targetConnections.length > 0 && /* @__PURE__ */ jsx16(
|
|
3946
|
-
sourceConnections.length > 0 && /* @__PURE__ */ jsx16(
|
|
3986
|
+
targetConnections.length > 0 && /* @__PURE__ */ jsx16(GlowHandle15, { side: "left" }),
|
|
3987
|
+
sourceConnections.length > 0 && /* @__PURE__ */ jsx16(GlowHandle15, { side: "right" }),
|
|
3947
3988
|
/* @__PURE__ */ jsx16("div", { className: "absolute -top-2.5 left-2.5 flex items-center gap-1.5 z-10", children: /* @__PURE__ */ jsxs14(
|
|
3948
3989
|
"span",
|
|
3949
3990
|
{
|
|
3950
|
-
className:
|
|
3991
|
+
className: classNames9(
|
|
3951
3992
|
"inline-flex items-center gap-1 text-[7px] font-bold uppercase tracking-widest text-white px-1.5 py-0.5 rounded shadow-sm",
|
|
3952
3993
|
deprecated ? "bg-red-500" : "bg-yellow-500"
|
|
3953
3994
|
),
|
|
@@ -4334,9 +4375,9 @@ var DomainCard_default = memo17(function DomainCardNode({ data }) {
|
|
|
4334
4375
|
// src/nodes/external-system/ExternalSystem.tsx
|
|
4335
4376
|
import { memo as memo18 } from "react";
|
|
4336
4377
|
import { Globe as Globe2 } from "lucide-react";
|
|
4337
|
-
import { Handle as Handle14, Position as Position14, useNodeConnections as
|
|
4378
|
+
import { Handle as Handle14, Position as Position14, useNodeConnections as useNodeConnections11 } from "@xyflow/react";
|
|
4338
4379
|
import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4339
|
-
function
|
|
4380
|
+
function GlowHandle16({ side }) {
|
|
4340
4381
|
return /* @__PURE__ */ jsx20(
|
|
4341
4382
|
"div",
|
|
4342
4383
|
{
|
|
@@ -4358,7 +4399,7 @@ function GlowHandle14({ side }) {
|
|
|
4358
4399
|
}
|
|
4359
4400
|
);
|
|
4360
4401
|
}
|
|
4361
|
-
function
|
|
4402
|
+
function classNames10(...classes) {
|
|
4362
4403
|
return classes.filter(Boolean).join(" ");
|
|
4363
4404
|
}
|
|
4364
4405
|
function PostItExternalSystem(props) {
|
|
@@ -4367,7 +4408,7 @@ function PostItExternalSystem(props) {
|
|
|
4367
4408
|
return /* @__PURE__ */ jsxs18(
|
|
4368
4409
|
"div",
|
|
4369
4410
|
{
|
|
4370
|
-
className:
|
|
4411
|
+
className: classNames10(
|
|
4371
4412
|
"relative min-w-44 max-w-56 min-h-[120px]",
|
|
4372
4413
|
props?.selected ? "ring-2 ring-purple-400/60 ring-offset-1" : ""
|
|
4373
4414
|
),
|
|
@@ -4435,7 +4476,7 @@ function PostItExternalSystem(props) {
|
|
|
4435
4476
|
as: "div",
|
|
4436
4477
|
value: name,
|
|
4437
4478
|
tooltipBorderColor: "#a855f7",
|
|
4438
|
-
className:
|
|
4479
|
+
className: classNames10(
|
|
4439
4480
|
"text-[13px] font-bold leading-snug truncate",
|
|
4440
4481
|
deprecated ? "text-purple-950/40 line-through" : "text-purple-950"
|
|
4441
4482
|
),
|
|
@@ -4463,14 +4504,14 @@ function PostItExternalSystem(props) {
|
|
|
4463
4504
|
function DefaultExternalSystem(props) {
|
|
4464
4505
|
const { version, name, summary, deprecated, draft, notes } = props.data.externalSystem;
|
|
4465
4506
|
const mode = props.data.mode || "simple";
|
|
4466
|
-
const targetConnections =
|
|
4467
|
-
const sourceConnections =
|
|
4507
|
+
const targetConnections = useNodeConnections11({ handleType: "target" });
|
|
4508
|
+
const sourceConnections = useNodeConnections11({ handleType: "source" });
|
|
4468
4509
|
const isDark = useDarkMode();
|
|
4469
4510
|
const deprecatedStripe = isDark ? "rgba(239,68,68,0.25)" : "rgba(239,68,68,0.1)";
|
|
4470
4511
|
return /* @__PURE__ */ jsxs18(
|
|
4471
4512
|
"div",
|
|
4472
4513
|
{
|
|
4473
|
-
className:
|
|
4514
|
+
className: classNames10(
|
|
4474
4515
|
"relative min-w-48 max-w-60 rounded-xl border-2 overflow-visible",
|
|
4475
4516
|
props?.selected ? "ring-2 ring-purple-400/60 ring-offset-2" : "",
|
|
4476
4517
|
deprecated ? "border-dashed border-red-500" : draft ? `border-dashed ${isDark ? "border-purple-400" : "border-purple-400/60"}` : "border-purple-500"
|
|
@@ -4497,12 +4538,12 @@ function DefaultExternalSystem(props) {
|
|
|
4497
4538
|
}
|
|
4498
4539
|
),
|
|
4499
4540
|
notes && notes.length > 0 && /* @__PURE__ */ jsx20(NotesIndicator, { notes, resourceName: name }),
|
|
4500
|
-
targetConnections.length > 0 && /* @__PURE__ */ jsx20(
|
|
4501
|
-
sourceConnections.length > 0 && /* @__PURE__ */ jsx20(
|
|
4541
|
+
targetConnections.length > 0 && /* @__PURE__ */ jsx20(GlowHandle16, { side: "left" }),
|
|
4542
|
+
sourceConnections.length > 0 && /* @__PURE__ */ jsx20(GlowHandle16, { side: "right" }),
|
|
4502
4543
|
/* @__PURE__ */ jsx20("div", { className: "absolute -top-2.5 left-2.5 flex items-center gap-1.5 z-10", children: /* @__PURE__ */ jsxs18(
|
|
4503
4544
|
"span",
|
|
4504
4545
|
{
|
|
4505
|
-
className:
|
|
4546
|
+
className: classNames10(
|
|
4506
4547
|
"inline-flex items-center gap-1 text-[7px] font-bold uppercase tracking-widest text-white px-1.5 py-0.5 rounded shadow-sm",
|
|
4507
4548
|
deprecated ? "bg-red-500" : "bg-purple-500"
|
|
4508
4549
|
),
|
|
@@ -4621,7 +4662,7 @@ var config_default4 = {
|
|
|
4621
4662
|
import { Handle as Handle15, Position as Position15 } from "@xyflow/react";
|
|
4622
4663
|
import { memo as memo19, useState as useState3, useEffect as useEffect2, useRef as useRef2, useCallback as useCallback2 } from "react";
|
|
4623
4664
|
import { Fragment as Fragment3, jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4624
|
-
function
|
|
4665
|
+
function classNames11(...classes) {
|
|
4625
4666
|
return classes.filter(Boolean).join(" ");
|
|
4626
4667
|
}
|
|
4627
4668
|
var AVAILABLE_COLORS = {
|
|
@@ -4788,7 +4829,7 @@ var NoteNode_default = memo19(function NoteNodeComponent({
|
|
|
4788
4829
|
"button",
|
|
4789
4830
|
{
|
|
4790
4831
|
onClick: () => handleColorChange(colorKey),
|
|
4791
|
-
className:
|
|
4832
|
+
className: classNames11(
|
|
4792
4833
|
"w-6 h-6 rounded-full border-2",
|
|
4793
4834
|
AVAILABLE_COLORS[colorKey].bg,
|
|
4794
4835
|
AVAILABLE_COLORS[colorKey].border,
|
|
@@ -4802,7 +4843,7 @@ var NoteNode_default = memo19(function NoteNodeComponent({
|
|
|
4802
4843
|
"div",
|
|
4803
4844
|
{
|
|
4804
4845
|
onDoubleClick: handleDoubleClick,
|
|
4805
|
-
className:
|
|
4846
|
+
className: classNames11(
|
|
4806
4847
|
"w-full h-full rounded-lg border p-3 flex flex-col min-w-[150px] min-h-[150px] relative",
|
|
4807
4848
|
colorClasses.bg,
|
|
4808
4849
|
colorClasses.border,
|
|
@@ -4821,7 +4862,7 @@ var NoteNode_default = memo19(function NoteNodeComponent({
|
|
|
4821
4862
|
onChange: handleTextChange,
|
|
4822
4863
|
onBlur: handleBlur,
|
|
4823
4864
|
onKeyDown: handleKeyDown,
|
|
4824
|
-
className:
|
|
4865
|
+
className: classNames11(
|
|
4825
4866
|
"w-full flex-1 bg-transparent border-none outline-none resize-none text-[10px] p-0 m-0",
|
|
4826
4867
|
colorClasses.text,
|
|
4827
4868
|
colorClasses.placeholder
|
|
@@ -4871,9 +4912,9 @@ var NoteNode_default = memo19(function NoteNodeComponent({
|
|
|
4871
4912
|
// src/nodes/field/FieldNode.tsx
|
|
4872
4913
|
import { memo as memo20 } from "react";
|
|
4873
4914
|
import { Database as Database3 } from "lucide-react";
|
|
4874
|
-
import { Handle as Handle16, Position as Position16, useNodeConnections as
|
|
4915
|
+
import { Handle as Handle16, Position as Position16, useNodeConnections as useNodeConnections12 } from "@xyflow/react";
|
|
4875
4916
|
import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4876
|
-
function
|
|
4917
|
+
function GlowHandle17({ side }) {
|
|
4877
4918
|
return /* @__PURE__ */ jsx22(
|
|
4878
4919
|
"div",
|
|
4879
4920
|
{
|
|
@@ -4895,19 +4936,19 @@ function GlowHandle15({ side }) {
|
|
|
4895
4936
|
}
|
|
4896
4937
|
);
|
|
4897
4938
|
}
|
|
4898
|
-
function
|
|
4939
|
+
function classNames12(...classes) {
|
|
4899
4940
|
return classes.filter(Boolean).join(" ");
|
|
4900
4941
|
}
|
|
4901
4942
|
var FieldNode_default = memo20(function Field(props) {
|
|
4902
4943
|
const { name, type: fieldType } = props.data;
|
|
4903
4944
|
const mode = props.data.mode || "simple";
|
|
4904
|
-
const targetConnections =
|
|
4905
|
-
const sourceConnections =
|
|
4945
|
+
const targetConnections = useNodeConnections12({ handleType: "target" });
|
|
4946
|
+
const sourceConnections = useNodeConnections12({ handleType: "source" });
|
|
4906
4947
|
const isDark = useDarkMode();
|
|
4907
4948
|
return /* @__PURE__ */ jsxs20(
|
|
4908
4949
|
"div",
|
|
4909
4950
|
{
|
|
4910
|
-
className:
|
|
4951
|
+
className: classNames12(
|
|
4911
4952
|
"relative min-w-48 max-w-60 rounded-xl border-2 overflow-visible",
|
|
4912
4953
|
props?.selected ? "ring-2 ring-cyan-400/60 ring-offset-2" : "",
|
|
4913
4954
|
"border-cyan-500"
|
|
@@ -4933,8 +4974,8 @@ var FieldNode_default = memo20(function Field(props) {
|
|
|
4933
4974
|
style: HIDDEN_HANDLE_STYLE
|
|
4934
4975
|
}
|
|
4935
4976
|
),
|
|
4936
|
-
targetConnections.length > 0 && /* @__PURE__ */ jsx22(
|
|
4937
|
-
sourceConnections.length > 0 && /* @__PURE__ */ jsx22(
|
|
4977
|
+
targetConnections.length > 0 && /* @__PURE__ */ jsx22(GlowHandle17, { side: "left" }),
|
|
4978
|
+
sourceConnections.length > 0 && /* @__PURE__ */ jsx22(GlowHandle17, { side: "right" }),
|
|
4938
4979
|
/* @__PURE__ */ jsx22("div", { className: "absolute -top-2.5 left-2.5 z-10", children: /* @__PURE__ */ jsxs20("span", { className: "inline-flex items-center gap-1 text-[7px] font-bold uppercase tracking-widest text-white px-1.5 py-0.5 rounded shadow-sm bg-cyan-600", children: [
|
|
4939
4980
|
/* @__PURE__ */ jsx22(Database3, { className: "w-2.5 h-2.5", strokeWidth: 2.5 }),
|
|
4940
4981
|
"Field"
|
|
@@ -4996,7 +5037,7 @@ var config_default5 = {
|
|
|
4996
5037
|
};
|
|
4997
5038
|
|
|
4998
5039
|
// src/nodes/Flow.tsx
|
|
4999
|
-
import { memo as memo21, useMemo as
|
|
5040
|
+
import { memo as memo21, useMemo as useMemo9 } from "react";
|
|
5000
5041
|
import { Handle as Handle17 } from "@xyflow/react";
|
|
5001
5042
|
import { Maximize2 } from "lucide-react";
|
|
5002
5043
|
import * as ContextMenu from "@radix-ui/react-context-menu";
|
|
@@ -5109,7 +5150,7 @@ function getIcon(iconName) {
|
|
|
5109
5150
|
|
|
5110
5151
|
// src/nodes/Flow.tsx
|
|
5111
5152
|
import { Fragment as Fragment4, jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5112
|
-
function
|
|
5153
|
+
function classNames13(...classes) {
|
|
5113
5154
|
return classes.filter(Boolean).join(" ");
|
|
5114
5155
|
}
|
|
5115
5156
|
var Flow_default = memo21(function FlowNode({
|
|
@@ -5121,7 +5162,7 @@ var Flow_default = memo21(function FlowNode({
|
|
|
5121
5162
|
const canExpand = Array.isArray(data?.expandedNodes) && data.expandedNodes.length > 0;
|
|
5122
5163
|
const { id, version, owners = EMPTY_ARRAY, name, styles } = flow.data;
|
|
5123
5164
|
const { node: { color = "teal", label } = {}, icon = "QueueListIcon" } = styles || {};
|
|
5124
|
-
const Icon =
|
|
5165
|
+
const Icon = useMemo9(() => getIcon(icon), [icon]);
|
|
5125
5166
|
const portalContainer = usePortalContainer();
|
|
5126
5167
|
const nodeLabel = label || flow?.data?.sidebar?.badge || "Flow";
|
|
5127
5168
|
const fontSize = nodeLabel.length > 10 ? "7px" : "9px";
|
|
@@ -5153,7 +5194,7 @@ var Flow_default = memo21(function FlowNode({
|
|
|
5153
5194
|
/* @__PURE__ */ jsxs22(
|
|
5154
5195
|
"div",
|
|
5155
5196
|
{
|
|
5156
|
-
className:
|
|
5197
|
+
className: classNames13(
|
|
5157
5198
|
`relative rounded-md border flex justify-start bg-[rgb(var(--ec-card-bg))] text-[rgb(var(--ec-page-text))] border-${color}-400`
|
|
5158
5199
|
),
|
|
5159
5200
|
style: NODE_WIDTH_STYLE,
|
|
@@ -5161,7 +5202,7 @@ var Flow_default = memo21(function FlowNode({
|
|
|
5161
5202
|
/* @__PURE__ */ jsxs22(
|
|
5162
5203
|
"div",
|
|
5163
5204
|
{
|
|
5164
|
-
className:
|
|
5205
|
+
className: classNames13(
|
|
5165
5206
|
`bg-gradient-to-b from-${color}-500 to-${color}-700 relative flex flex-col items-center w-5 justify-between rounded-l-sm text-${color}-100`,
|
|
5166
5207
|
`border-r-[1px] border-${color}-500`
|
|
5167
5208
|
),
|
|
@@ -5184,7 +5225,7 @@ var Flow_default = memo21(function FlowNode({
|
|
|
5184
5225
|
/* @__PURE__ */ jsxs22(
|
|
5185
5226
|
"div",
|
|
5186
5227
|
{
|
|
5187
|
-
className:
|
|
5228
|
+
className: classNames13(
|
|
5188
5229
|
mode === "full" ? `border-b border-[rgb(var(--ec-page-border))]` : ""
|
|
5189
5230
|
),
|
|
5190
5231
|
children: [
|
|
@@ -5393,11 +5434,11 @@ var FlowExpandedNode_default = memo22(function FlowExpandedNode({
|
|
|
5393
5434
|
// src/nodes/Entity.tsx
|
|
5394
5435
|
import { Handle as Handle18, Position as Position17, useUpdateNodeInternals } from "@xyflow/react";
|
|
5395
5436
|
import * as ContextMenu2 from "@radix-ui/react-context-menu";
|
|
5396
|
-
import { memo as memo23, useCallback as useCallback3, useEffect as useEffect3, useMemo as
|
|
5437
|
+
import { memo as memo23, useCallback as useCallback3, useEffect as useEffect3, useMemo as useMemo10, useRef as useRef3, useState as useState4 } from "react";
|
|
5397
5438
|
import { ChevronDownIcon, ChevronRightIcon } from "@heroicons/react/20/solid";
|
|
5398
5439
|
import { Fragment as Fragment5, jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
5399
5440
|
var ENTITY_TARGET_HANDLE_ID = "__eventcatalog-entity-target";
|
|
5400
|
-
function
|
|
5441
|
+
function classNames14(...classes) {
|
|
5401
5442
|
return classes.filter(Boolean).join(" ");
|
|
5402
5443
|
}
|
|
5403
5444
|
var getPropertyTypeLabel = (property) => {
|
|
@@ -5439,7 +5480,7 @@ var Entity_default = memo23(function EntityNode({
|
|
|
5439
5480
|
node: { color: _color = "blue", label: _label } = {},
|
|
5440
5481
|
icon = "CubeIcon"
|
|
5441
5482
|
} = styles || {};
|
|
5442
|
-
const Icon =
|
|
5483
|
+
const Icon = useMemo10(() => getIcon(icon), [icon]);
|
|
5443
5484
|
const [hoveredProperty, setHoveredProperty] = useState4(null);
|
|
5444
5485
|
const [expandedProperties, setExpandedProperties] = useState4(
|
|
5445
5486
|
() => /* @__PURE__ */ new Set()
|
|
@@ -5447,7 +5488,7 @@ var Entity_default = memo23(function EntityNode({
|
|
|
5447
5488
|
const previousExpandedProperties = useRef3(expandedProperties);
|
|
5448
5489
|
const updateNodeInternals = useUpdateNodeInternals();
|
|
5449
5490
|
const portalContainer = usePortalContainer();
|
|
5450
|
-
const referenceProperties =
|
|
5491
|
+
const referenceProperties = useMemo10(
|
|
5451
5492
|
() => new Set(referencePropertyNames),
|
|
5452
5493
|
[referencePropertyNames]
|
|
5453
5494
|
);
|
|
@@ -5480,7 +5521,7 @@ var Entity_default = memo23(function EntityNode({
|
|
|
5480
5521
|
/* @__PURE__ */ jsxs24(
|
|
5481
5522
|
"div",
|
|
5482
5523
|
{
|
|
5483
|
-
className:
|
|
5524
|
+
className: classNames14(
|
|
5484
5525
|
"relative flex items-center justify-between py-2 pr-4 hover:bg-[rgb(var(--ec-page-border)/0.2)]",
|
|
5485
5526
|
isExpandable && "nodrag nopan cursor-pointer"
|
|
5486
5527
|
),
|
|
@@ -5562,7 +5603,7 @@ var Entity_default = memo23(function EntityNode({
|
|
|
5562
5603
|
/* @__PURE__ */ jsx26(ContextMenu2.Trigger, { children: /* @__PURE__ */ jsxs24(
|
|
5563
5604
|
"div",
|
|
5564
5605
|
{
|
|
5565
|
-
className:
|
|
5606
|
+
className: classNames14(
|
|
5566
5607
|
"bg-[rgb(var(--ec-card-bg))] border rounded-lg shadow-sm min-w-[200px]",
|
|
5567
5608
|
externalToDomain ? "border-amber-500/60" : "border-blue-400/50"
|
|
5568
5609
|
),
|
|
@@ -5570,7 +5611,7 @@ var Entity_default = memo23(function EntityNode({
|
|
|
5570
5611
|
/* @__PURE__ */ jsxs24(
|
|
5571
5612
|
"div",
|
|
5572
5613
|
{
|
|
5573
|
-
className:
|
|
5614
|
+
className: classNames14(
|
|
5574
5615
|
"relative px-4 py-2 rounded-t-lg border-b border-[rgb(var(--ec-page-border))]",
|
|
5575
5616
|
externalToDomain ? "bg-amber-500/20" : "bg-blue-500/15"
|
|
5576
5617
|
),
|
|
@@ -5659,7 +5700,7 @@ import { memo as memo24 } from "react";
|
|
|
5659
5700
|
import { UserIcon as UserIcon2 } from "@heroicons/react/20/solid";
|
|
5660
5701
|
import { Handle as Handle19 } from "@xyflow/react";
|
|
5661
5702
|
import { jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
5662
|
-
function
|
|
5703
|
+
function classNames15(...classes) {
|
|
5663
5704
|
return classes.filter(Boolean).join(" ");
|
|
5664
5705
|
}
|
|
5665
5706
|
var User_default = memo24(function UserNode({
|
|
@@ -5678,7 +5719,7 @@ var User_default = memo24(function UserNode({
|
|
|
5678
5719
|
return /* @__PURE__ */ jsxs25(
|
|
5679
5720
|
"div",
|
|
5680
5721
|
{
|
|
5681
|
-
className:
|
|
5722
|
+
className: classNames15(
|
|
5682
5723
|
`rounded-md border flex justify-start bg-[rgb(var(--ec-card-bg))] text-[rgb(var(--ec-page-text))] border-yellow-400`,
|
|
5683
5724
|
mode === "full" ? "min-h-[5em]" : "min-h-[2em]"
|
|
5684
5725
|
),
|
|
@@ -5687,7 +5728,7 @@ var User_default = memo24(function UserNode({
|
|
|
5687
5728
|
/* @__PURE__ */ jsxs25(
|
|
5688
5729
|
"div",
|
|
5689
5730
|
{
|
|
5690
|
-
className:
|
|
5731
|
+
className: classNames15(
|
|
5691
5732
|
"bg-gradient-to-b from-yellow-400 to-yellow-600 relative flex flex-col items-center w-5 justify-between rounded-l-sm text-orange-100-500",
|
|
5692
5733
|
`border-r-[1px] border-yellow-500`
|
|
5693
5734
|
),
|
|
@@ -5724,7 +5765,7 @@ var User_default = memo24(function UserNode({
|
|
|
5724
5765
|
/* @__PURE__ */ jsx27(
|
|
5725
5766
|
"div",
|
|
5726
5767
|
{
|
|
5727
|
-
className:
|
|
5768
|
+
className: classNames15(
|
|
5728
5769
|
mode === "full" ? `border-b border-[rgb(var(--ec-page-border))]` : ""
|
|
5729
5770
|
),
|
|
5730
5771
|
children: /* @__PURE__ */ jsx27(
|
|
@@ -5751,7 +5792,7 @@ var User_default = memo24(function UserNode({
|
|
|
5751
5792
|
import { memo as memo25 } from "react";
|
|
5752
5793
|
import { Handle as Handle20, Position as Position18 } from "@xyflow/react";
|
|
5753
5794
|
import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5754
|
-
function
|
|
5795
|
+
function classNames16(...classes) {
|
|
5755
5796
|
return classes.filter(Boolean).join(" ");
|
|
5756
5797
|
}
|
|
5757
5798
|
var Step_default = memo25(function StepNode({
|
|
@@ -5764,7 +5805,7 @@ var Step_default = memo25(function StepNode({
|
|
|
5764
5805
|
return /* @__PURE__ */ jsxs26(
|
|
5765
5806
|
"div",
|
|
5766
5807
|
{
|
|
5767
|
-
className:
|
|
5808
|
+
className: classNames16(
|
|
5768
5809
|
"rounded-md border flex justify-start bg-[rgb(var(--ec-card-bg))] text-[rgb(var(--ec-page-text))] border-blue-400 min-h-[3em]"
|
|
5769
5810
|
),
|
|
5770
5811
|
style: NODE_WIDTH_STYLE,
|
|
@@ -5772,7 +5813,7 @@ var Step_default = memo25(function StepNode({
|
|
|
5772
5813
|
/* @__PURE__ */ jsx28(
|
|
5773
5814
|
"div",
|
|
5774
5815
|
{
|
|
5775
|
-
className:
|
|
5816
|
+
className: classNames16(
|
|
5776
5817
|
"bg-gradient-to-b from-gray-700 to-gray-700 relative flex flex-col items-center w-5 justify-end rounded-l-sm text-orange-100-500",
|
|
5777
5818
|
`border-r-[1px] border-gray-500`
|
|
5778
5819
|
),
|
|
@@ -5817,7 +5858,7 @@ var Step_default = memo25(function StepNode({
|
|
|
5817
5858
|
/* @__PURE__ */ jsx28(
|
|
5818
5859
|
"div",
|
|
5819
5860
|
{
|
|
5820
|
-
className:
|
|
5861
|
+
className: classNames16(
|
|
5821
5862
|
mode === "full" ? `border-b border-[rgb(var(--ec-page-border))]` : ""
|
|
5822
5863
|
),
|
|
5823
5864
|
children: /* @__PURE__ */ jsx28(
|
|
@@ -5848,7 +5889,7 @@ import {
|
|
|
5848
5889
|
Position as Position19
|
|
5849
5890
|
} from "@xyflow/react";
|
|
5850
5891
|
import * as ContextMenu3 from "@radix-ui/react-context-menu";
|
|
5851
|
-
import { memo as memo26, useState as useState5, useCallback as useCallback4, useMemo as
|
|
5892
|
+
import { memo as memo26, useState as useState5, useCallback as useCallback4, useMemo as useMemo11 } from "react";
|
|
5852
5893
|
import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
5853
5894
|
var Domain_default = memo26(function DomainNode({ data, id: nodeId }) {
|
|
5854
5895
|
const { mode, domain } = data;
|
|
@@ -5858,8 +5899,8 @@ var Domain_default = memo26(function DomainNode({ data, id: nodeId }) {
|
|
|
5858
5899
|
);
|
|
5859
5900
|
const { id, version, name, services = [], styles } = domain.data;
|
|
5860
5901
|
const { icon = "RectangleGroupIcon" } = styles || {};
|
|
5861
|
-
const Icon =
|
|
5862
|
-
const ServerIcon6 =
|
|
5902
|
+
const Icon = useMemo11(() => getIcon(icon), [icon]);
|
|
5903
|
+
const ServerIcon6 = useMemo11(() => getIcon("ServerIcon"), []);
|
|
5863
5904
|
const portalContainer = usePortalContainer();
|
|
5864
5905
|
const handleSelectionChange = useCallback4(
|
|
5865
5906
|
({ nodes: selectedNodes }) => {
|
|
@@ -6021,7 +6062,7 @@ import {
|
|
|
6021
6062
|
} from "lucide-react";
|
|
6022
6063
|
import { memo as memo27 } from "react";
|
|
6023
6064
|
import { jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6024
|
-
function
|
|
6065
|
+
function classNames17(...classes) {
|
|
6025
6066
|
return classes.filter(Boolean).join(" ");
|
|
6026
6067
|
}
|
|
6027
6068
|
var System_default = memo27(function SystemNode({ data }) {
|
|
@@ -6062,7 +6103,7 @@ var System_default = memo27(function SystemNode({ data }) {
|
|
|
6062
6103
|
},
|
|
6063
6104
|
title: `Open the ${name} map`
|
|
6064
6105
|
},
|
|
6065
|
-
className:
|
|
6106
|
+
className: classNames17(
|
|
6066
6107
|
"relative min-w-48 max-w-60 rounded-xl border-2 overflow-visible",
|
|
6067
6108
|
opensMap && "cursor-pointer",
|
|
6068
6109
|
isExternal ? "border-dashed border-violet-400" : "border-violet-500"
|
|
@@ -6113,7 +6154,7 @@ var System_default = memo27(function SystemNode({ data }) {
|
|
|
6113
6154
|
mode === "full" && summary && /* @__PURE__ */ jsx30(
|
|
6114
6155
|
"div",
|
|
6115
6156
|
{
|
|
6116
|
-
className:
|
|
6157
|
+
className: classNames17(
|
|
6117
6158
|
"mt-1.5 text-[9px] text-[rgb(var(--ec-page-text-muted))] leading-relaxed overflow-hidden"
|
|
6118
6159
|
),
|
|
6119
6160
|
style: LINE_CLAMP_STYLE,
|
|
@@ -6248,8 +6289,8 @@ var GroupNode_default = memo28(function GroupNode({ data }) {
|
|
|
6248
6289
|
});
|
|
6249
6290
|
|
|
6250
6291
|
// src/nodes/Custom.tsx
|
|
6251
|
-
import { memo as memo29, useMemo as
|
|
6252
|
-
import { Handle as Handle23, Position as Position21, useNodeConnections as
|
|
6292
|
+
import { memo as memo29, useMemo as useMemo12 } from "react";
|
|
6293
|
+
import { Handle as Handle23, Position as Position21, useNodeConnections as useNodeConnections13 } from "@xyflow/react";
|
|
6253
6294
|
import * as Icons from "@heroicons/react/24/solid";
|
|
6254
6295
|
import * as ContextMenu4 from "@radix-ui/react-context-menu";
|
|
6255
6296
|
import { jsx as jsx32, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
@@ -6383,13 +6424,13 @@ var PALETTES = {
|
|
|
6383
6424
|
pillBorder: "#f43f5e"
|
|
6384
6425
|
}
|
|
6385
6426
|
};
|
|
6386
|
-
function
|
|
6427
|
+
function classNames18(...classes) {
|
|
6387
6428
|
return classes.filter(Boolean).join(" ");
|
|
6388
6429
|
}
|
|
6389
6430
|
function getPalette(color) {
|
|
6390
6431
|
return PALETTES[color || "blue"] ?? PALETTES.blue;
|
|
6391
6432
|
}
|
|
6392
|
-
function
|
|
6433
|
+
function GlowHandle18({
|
|
6393
6434
|
side,
|
|
6394
6435
|
gradient
|
|
6395
6436
|
}) {
|
|
@@ -6428,17 +6469,17 @@ var Custom_default = memo29(function CustomNode({ data, selected }) {
|
|
|
6428
6469
|
height = 5
|
|
6429
6470
|
} = customProps;
|
|
6430
6471
|
const palette = getPalette(color);
|
|
6431
|
-
const IconComponent =
|
|
6472
|
+
const IconComponent = useMemo12(() => Icons[icon] || Icons.CubeIcon, [icon]);
|
|
6432
6473
|
const portalContainer = usePortalContainer();
|
|
6433
|
-
const targetConnections =
|
|
6434
|
-
const sourceConnections =
|
|
6474
|
+
const targetConnections = useNodeConnections13({ handleType: "target" });
|
|
6475
|
+
const sourceConnections = useNodeConnections13({ handleType: "source" });
|
|
6435
6476
|
const propertyEntries = Object.entries(properties);
|
|
6436
6477
|
const contextMenuItems = url ? [{ label: `Open ${type.toLowerCase()}`, url }, ...menu] : menu;
|
|
6437
6478
|
return /* @__PURE__ */ jsxs30(ContextMenu4.Root, { children: [
|
|
6438
6479
|
/* @__PURE__ */ jsx32(ContextMenu4.Trigger, { children: /* @__PURE__ */ jsxs30(
|
|
6439
6480
|
"div",
|
|
6440
6481
|
{
|
|
6441
|
-
className:
|
|
6482
|
+
className: classNames18(
|
|
6442
6483
|
"relative min-w-48 max-w-60 rounded-xl border-2 overflow-visible",
|
|
6443
6484
|
selected ? palette.ring : "",
|
|
6444
6485
|
palette.border
|
|
@@ -6465,12 +6506,12 @@ var Custom_default = memo29(function CustomNode({ data, selected }) {
|
|
|
6465
6506
|
style: HIDDEN_HANDLE_STYLE
|
|
6466
6507
|
}
|
|
6467
6508
|
),
|
|
6468
|
-
targetConnections.length > 0 && /* @__PURE__ */ jsx32(
|
|
6469
|
-
sourceConnections.length > 0 && /* @__PURE__ */ jsx32(
|
|
6509
|
+
targetConnections.length > 0 && /* @__PURE__ */ jsx32(GlowHandle18, { side: "left", gradient: palette.glow }),
|
|
6510
|
+
sourceConnections.length > 0 && /* @__PURE__ */ jsx32(GlowHandle18, { side: "right", gradient: palette.glow }),
|
|
6470
6511
|
/* @__PURE__ */ jsx32("div", { className: "absolute -top-3 left-2.5 z-10", children: /* @__PURE__ */ jsxs30(
|
|
6471
6512
|
"span",
|
|
6472
6513
|
{
|
|
6473
|
-
className:
|
|
6514
|
+
className: classNames18(
|
|
6474
6515
|
"inline-flex items-center gap-1 text-[7px] font-bold uppercase tracking-widest text-white px-1.5 py-0.5 rounded shadow-sm",
|
|
6475
6516
|
palette.badge
|
|
6476
6517
|
),
|
|
@@ -6576,9 +6617,9 @@ var ExternalSystem2_default = memo30(function ExternalSystemNode(props) {
|
|
|
6576
6617
|
// src/nodes/DataProduct.tsx
|
|
6577
6618
|
import { memo as memo31 } from "react";
|
|
6578
6619
|
import { Package } from "lucide-react";
|
|
6579
|
-
import { Handle as Handle25, Position as Position23, useNodeConnections as
|
|
6620
|
+
import { Handle as Handle25, Position as Position23, useNodeConnections as useNodeConnections14 } from "@xyflow/react";
|
|
6580
6621
|
import { jsx as jsx34, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
6581
|
-
function
|
|
6622
|
+
function GlowHandle19({ side }) {
|
|
6582
6623
|
return /* @__PURE__ */ jsx34(
|
|
6583
6624
|
"div",
|
|
6584
6625
|
{
|
|
@@ -6600,7 +6641,7 @@ function GlowHandle17({ side }) {
|
|
|
6600
6641
|
}
|
|
6601
6642
|
);
|
|
6602
6643
|
}
|
|
6603
|
-
function
|
|
6644
|
+
function classNames19(...classes) {
|
|
6604
6645
|
return classes.filter(Boolean).join(" ");
|
|
6605
6646
|
}
|
|
6606
6647
|
function PostItDataProduct(props) {
|
|
@@ -6610,7 +6651,7 @@ function PostItDataProduct(props) {
|
|
|
6610
6651
|
return /* @__PURE__ */ jsxs32(
|
|
6611
6652
|
"div",
|
|
6612
6653
|
{
|
|
6613
|
-
className:
|
|
6654
|
+
className: classNames19(
|
|
6614
6655
|
"relative min-w-44 max-w-56 min-h-[120px]",
|
|
6615
6656
|
props?.selected ? "ring-2 ring-indigo-400/60 ring-offset-1" : ""
|
|
6616
6657
|
),
|
|
@@ -6687,7 +6728,7 @@ function PostItDataProduct(props) {
|
|
|
6687
6728
|
as: "div",
|
|
6688
6729
|
value: name,
|
|
6689
6730
|
tooltipBorderColor: "#6366f1",
|
|
6690
|
-
className:
|
|
6731
|
+
className: classNames19(
|
|
6691
6732
|
"text-[13px] font-bold leading-snug min-w-0 truncate",
|
|
6692
6733
|
deprecated ? "text-indigo-950/40 line-through" : "text-indigo-950"
|
|
6693
6734
|
),
|
|
@@ -6717,14 +6758,14 @@ function DefaultDataProduct(props) {
|
|
|
6717
6758
|
const { version, name, summary, deprecated, draft, notes, styles } = props.data.dataProduct;
|
|
6718
6759
|
const mode = props.data.mode || "simple";
|
|
6719
6760
|
const customIcon = isIconPath(styles?.icon) ? styles.icon : void 0;
|
|
6720
|
-
const targetConnections =
|
|
6721
|
-
const sourceConnections =
|
|
6761
|
+
const targetConnections = useNodeConnections14({ handleType: "target" });
|
|
6762
|
+
const sourceConnections = useNodeConnections14({ handleType: "source" });
|
|
6722
6763
|
const isDark = useDarkMode();
|
|
6723
6764
|
const deprecatedStripe = isDark ? "rgba(239,68,68,0.25)" : "rgba(239,68,68,0.1)";
|
|
6724
6765
|
return /* @__PURE__ */ jsxs32(
|
|
6725
6766
|
"div",
|
|
6726
6767
|
{
|
|
6727
|
-
className:
|
|
6768
|
+
className: classNames19(
|
|
6728
6769
|
"relative min-w-48 max-w-60 rounded-xl border-2 overflow-visible",
|
|
6729
6770
|
props?.selected ? "ring-2 ring-indigo-400/60 ring-offset-2" : "",
|
|
6730
6771
|
deprecated ? "border-dashed border-red-500" : draft ? `border-dashed ${isDark ? "border-indigo-400" : "border-indigo-400/60"}` : "border-indigo-500"
|
|
@@ -6751,12 +6792,12 @@ function DefaultDataProduct(props) {
|
|
|
6751
6792
|
}
|
|
6752
6793
|
),
|
|
6753
6794
|
notes && notes.length > 0 && /* @__PURE__ */ jsx34(NotesIndicator, { notes, resourceName: name }),
|
|
6754
|
-
targetConnections.length > 0 && /* @__PURE__ */ jsx34(
|
|
6755
|
-
sourceConnections.length > 0 && /* @__PURE__ */ jsx34(
|
|
6795
|
+
targetConnections.length > 0 && /* @__PURE__ */ jsx34(GlowHandle19, { side: "left" }),
|
|
6796
|
+
sourceConnections.length > 0 && /* @__PURE__ */ jsx34(GlowHandle19, { side: "right" }),
|
|
6756
6797
|
/* @__PURE__ */ jsx34("div", { className: "absolute -top-2.5 left-2.5 flex items-center gap-1.5 z-10", children: /* @__PURE__ */ jsxs32(
|
|
6757
6798
|
"span",
|
|
6758
6799
|
{
|
|
6759
|
-
className:
|
|
6800
|
+
className: classNames19(
|
|
6760
6801
|
"inline-flex items-center gap-1 text-[7px] font-bold uppercase tracking-widest text-white px-1.5 py-0.5 rounded shadow-sm",
|
|
6761
6802
|
deprecated ? "bg-red-500" : "bg-indigo-500"
|
|
6762
6803
|
),
|
|
@@ -6818,9 +6859,9 @@ var DataProduct_default = memo31(function DataProductNode(props) {
|
|
|
6818
6859
|
});
|
|
6819
6860
|
|
|
6820
6861
|
// src/nodes/message-group/MessageGroupNode.tsx
|
|
6821
|
-
import { memo as memo32, useMemo as
|
|
6862
|
+
import { memo as memo32, useMemo as useMemo13 } from "react";
|
|
6822
6863
|
import { Layers, Zap as Zap3, Terminal, HelpCircle, Maximize2 as Maximize22 } from "lucide-react";
|
|
6823
|
-
import { Handle as Handle26, Position as Position24, useNodeConnections as
|
|
6864
|
+
import { Handle as Handle26, Position as Position24, useNodeConnections as useNodeConnections15 } from "@xyflow/react";
|
|
6824
6865
|
import { jsx as jsx35, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
6825
6866
|
var TYPE_ICONS = {
|
|
6826
6867
|
events: Zap3,
|
|
@@ -6836,10 +6877,10 @@ var CARD_STYLE2 = {
|
|
|
6836
6877
|
var MessageGroupNode_default = memo32(function MessageGroupNode(props) {
|
|
6837
6878
|
const { groupName, messageCount } = props.data;
|
|
6838
6879
|
const isDark = useDarkMode();
|
|
6839
|
-
const targetConnections =
|
|
6840
|
-
const sourceConnections =
|
|
6880
|
+
const targetConnections = useNodeConnections15({ handleType: "target" });
|
|
6881
|
+
const sourceConnections = useNodeConnections15({ handleType: "source" });
|
|
6841
6882
|
const stackDepth = messageCount >= 3 ? 3 : messageCount;
|
|
6842
|
-
const typeBreakdown =
|
|
6883
|
+
const typeBreakdown = useMemo13(() => {
|
|
6843
6884
|
const counts = {};
|
|
6844
6885
|
props.data.messages.forEach(({ message }) => {
|
|
6845
6886
|
const type = message?.collection || "unknown";
|
|
@@ -7114,7 +7155,7 @@ var MessageGroupExpandedNode_default = memo33(function MessageGroupExpandedNode(
|
|
|
7114
7155
|
});
|
|
7115
7156
|
|
|
7116
7157
|
// src/edges/AnimatedMessageEdge.tsx
|
|
7117
|
-
import { memo as memo34, useMemo as
|
|
7158
|
+
import { memo as memo34, useMemo as useMemo14 } from "react";
|
|
7118
7159
|
import { BaseEdge, getSmoothStepPath } from "@xyflow/react";
|
|
7119
7160
|
|
|
7120
7161
|
// src/edges/EdgeLabel.tsx
|
|
@@ -7345,9 +7386,9 @@ var AnimatedMessageEdge = memo34(
|
|
|
7345
7386
|
const customColor = data?.customColor || messageColor(collection ?? "default");
|
|
7346
7387
|
const warning = data?.warning;
|
|
7347
7388
|
const customColors = Array.isArray(customColor) ? customColor : [customColor];
|
|
7348
|
-
const randomDelay =
|
|
7389
|
+
const randomDelay = useMemo14(() => Math.random() * 1, []);
|
|
7349
7390
|
const opacityClass = opacity === 1 ? "z-30 opacity-100" : "z-30 opacity-10";
|
|
7350
|
-
const animatedNodes =
|
|
7391
|
+
const animatedNodes = useMemo14(
|
|
7351
7392
|
() => customColors.map((color, index) => {
|
|
7352
7393
|
const delay = randomDelay + index * 0.3;
|
|
7353
7394
|
return /* @__PURE__ */ jsx38(
|
|
@@ -7499,7 +7540,7 @@ var MultilineEdgeLabel_default = memo35(function MultilineEdgeLabel(props) {
|
|
|
7499
7540
|
});
|
|
7500
7541
|
|
|
7501
7542
|
// src/edges/FlowEdge.tsx
|
|
7502
|
-
import { memo as memo36, useMemo as
|
|
7543
|
+
import { memo as memo36, useMemo as useMemo15 } from "react";
|
|
7503
7544
|
import {
|
|
7504
7545
|
BaseEdge as BaseEdge2,
|
|
7505
7546
|
EdgeLabelRenderer as EdgeLabelRenderer2,
|
|
@@ -7558,15 +7599,15 @@ var FlowEdge_default = memo36(function CustomEdge({
|
|
|
7558
7599
|
targetPosition
|
|
7559
7600
|
})
|
|
7560
7601
|
);
|
|
7561
|
-
const randomDelay =
|
|
7602
|
+
const randomDelay = useMemo15(() => Math.random() * 1, []);
|
|
7562
7603
|
const collection = data?.message?.collection;
|
|
7563
7604
|
const opacity = data?.opacity ?? 1;
|
|
7564
|
-
const mergedStyle =
|
|
7605
|
+
const mergedStyle = useMemo15(
|
|
7565
7606
|
() => ({ ...EDGE_FLOW_BASE_STYLE, ...style }),
|
|
7566
7607
|
[style]
|
|
7567
7608
|
);
|
|
7568
7609
|
const crossDomain = isCrossDomain(data);
|
|
7569
|
-
const labelPositionStyle =
|
|
7610
|
+
const labelPositionStyle = useMemo15(
|
|
7570
7611
|
() => ({
|
|
7571
7612
|
position: "absolute",
|
|
7572
7613
|
transform: `translate(-50%, -50%) translate(${labelX}px,${labelY}px)`,
|
|
@@ -8303,7 +8344,7 @@ import {
|
|
|
8303
8344
|
useEffect as useEffect5,
|
|
8304
8345
|
useLayoutEffect,
|
|
8305
8346
|
useCallback as useCallback7,
|
|
8306
|
-
useMemo as
|
|
8347
|
+
useMemo as useMemo16,
|
|
8307
8348
|
useRef as useRef5,
|
|
8308
8349
|
memo as memo38
|
|
8309
8350
|
} from "react";
|
|
@@ -8518,7 +8559,7 @@ var StepWalkthrough_default = memo38(function StepWalkthrough({
|
|
|
8518
8559
|
edgeKeyRef.current = computedEdgeKey;
|
|
8519
8560
|
}
|
|
8520
8561
|
const edgeKey = edgeKeyRef.current;
|
|
8521
|
-
const nodesById =
|
|
8562
|
+
const nodesById = useMemo16(
|
|
8522
8563
|
() => new Map(nodes.map((node) => [node.id, node])),
|
|
8523
8564
|
[nodeIdsKey]
|
|
8524
8565
|
);
|
|
@@ -8541,7 +8582,7 @@ var StepWalkthrough_default = memo38(function StepWalkthrough({
|
|
|
8541
8582
|
})).filter((path) => !!path.targetNode) : [],
|
|
8542
8583
|
[edgeKey, nodesById]
|
|
8543
8584
|
);
|
|
8544
|
-
const availablePaths =
|
|
8585
|
+
const availablePaths = useMemo16(
|
|
8545
8586
|
() => pathsFrom(currentNodeId),
|
|
8546
8587
|
[pathsFrom, currentNodeId]
|
|
8547
8588
|
);
|
|
@@ -8559,11 +8600,11 @@ var StepWalkthrough_default = memo38(function StepWalkthrough({
|
|
|
8559
8600
|
},
|
|
8560
8601
|
[pathsFrom]
|
|
8561
8602
|
);
|
|
8562
|
-
const totalSteps =
|
|
8603
|
+
const totalSteps = useMemo16(
|
|
8563
8604
|
() => currentNodeId ? trail.length + stepsAfter(currentNodeId, trail) : 0,
|
|
8564
8605
|
[trail, currentNodeId, stepsAfter]
|
|
8565
8606
|
);
|
|
8566
|
-
const startSteps =
|
|
8607
|
+
const startSteps = useMemo16(
|
|
8567
8608
|
() => startNodeId ? 1 + stepsAfter(startNodeId, [startNodeId]) : 0,
|
|
8568
8609
|
[startNodeId, stepsAfter]
|
|
8569
8610
|
);
|
|
@@ -8614,7 +8655,7 @@ var StepWalkthrough_default = memo38(function StepWalkthrough({
|
|
|
8614
8655
|
return () => window.removeEventListener("keydown", onKeyDown);
|
|
8615
8656
|
}, [isWalking, availablePaths, next, previous, finish]);
|
|
8616
8657
|
const currentNode = currentNodeId ? nodesById.get(currentNodeId) : void 0;
|
|
8617
|
-
const info =
|
|
8658
|
+
const info = useMemo16(
|
|
8618
8659
|
() => currentNode ? getStepInfo(currentNode) : void 0,
|
|
8619
8660
|
[currentNode]
|
|
8620
8661
|
);
|
|
@@ -8631,7 +8672,7 @@ var StepWalkthrough_default = memo38(function StepWalkthrough({
|
|
|
8631
8672
|
!!info?.detail || !!title && title.scrollWidth > title.clientWidth || !!summary && summary.scrollHeight > summary.clientHeight + 1
|
|
8632
8673
|
);
|
|
8633
8674
|
}, [info, expanded]);
|
|
8634
|
-
const startInfo =
|
|
8675
|
+
const startInfo = useMemo16(() => {
|
|
8635
8676
|
const startNode = startNodeId ? nodesById.get(startNodeId) : void 0;
|
|
8636
8677
|
return startNode ? getStepInfo(startNode) : void 0;
|
|
8637
8678
|
}, [startNodeId, nodesById]);
|
|
@@ -9969,7 +10010,7 @@ import {
|
|
|
9969
10010
|
|
|
9970
10011
|
// src/components/FocusMode/FocusModeContent.tsx
|
|
9971
10012
|
import {
|
|
9972
|
-
useMemo as
|
|
10013
|
+
useMemo as useMemo17,
|
|
9973
10014
|
useCallback as useCallback8,
|
|
9974
10015
|
useEffect as useEffect7,
|
|
9975
10016
|
useState as useState9,
|
|
@@ -10228,7 +10269,7 @@ var FocusModeContent = ({
|
|
|
10228
10269
|
},
|
|
10229
10270
|
[allNodes, allEdges]
|
|
10230
10271
|
);
|
|
10231
|
-
const initialGraph =
|
|
10272
|
+
const initialGraph = useMemo17(
|
|
10232
10273
|
() => calculateFocusedGraph(centerNodeId),
|
|
10233
10274
|
[centerNodeId, calculateFocusedGraph]
|
|
10234
10275
|
);
|
|
@@ -10309,7 +10350,7 @@ var FocusModeContent = ({
|
|
|
10309
10350
|
const handleEdgeMouseLeave = useCallback8(() => {
|
|
10310
10351
|
setHoveredEdgeId(null);
|
|
10311
10352
|
}, []);
|
|
10312
|
-
const edgesWithHover =
|
|
10353
|
+
const edgesWithHover = useMemo17(() => {
|
|
10313
10354
|
return displayEdges.map((edge) => {
|
|
10314
10355
|
if (edge.id === hoveredEdgeId) {
|
|
10315
10356
|
return {
|
|
@@ -10320,7 +10361,7 @@ var FocusModeContent = ({
|
|
|
10320
10361
|
return edge;
|
|
10321
10362
|
});
|
|
10322
10363
|
}, [displayEdges, hoveredEdgeId]);
|
|
10323
|
-
const mergedNodeTypes =
|
|
10364
|
+
const mergedNodeTypes = useMemo17(
|
|
10324
10365
|
() => ({
|
|
10325
10366
|
...nodeTypes,
|
|
10326
10367
|
placeholder: FocusModePlaceholder_default
|
|
@@ -13563,7 +13604,7 @@ var NodeGraphBuilder = ({
|
|
|
13563
13604
|
setBuildUrlFn(onBuildUrl);
|
|
13564
13605
|
}
|
|
13565
13606
|
}, []);
|
|
13566
|
-
const nodeTypes =
|
|
13607
|
+
const nodeTypes = useMemo18(() => {
|
|
13567
13608
|
const wrapWithContextMenu = (Component) => {
|
|
13568
13609
|
const Wrapped = (props) => {
|
|
13569
13610
|
const items = props.data?.contextMenu;
|
|
@@ -13628,7 +13669,7 @@ var NodeGraphBuilder = ({
|
|
|
13628
13669
|
])
|
|
13629
13670
|
);
|
|
13630
13671
|
}, []);
|
|
13631
|
-
const edgeTypes2 =
|
|
13672
|
+
const edgeTypes2 = useMemo18(
|
|
13632
13673
|
() => ({
|
|
13633
13674
|
animated: AnimatedMessageEdge_default,
|
|
13634
13675
|
multiline: MultilineEdgeLabel_default,
|
|
@@ -13769,15 +13810,15 @@ var NodeGraphBuilder = ({
|
|
|
13769
13810
|
);
|
|
13770
13811
|
hoveredNodePeersRef.current = [];
|
|
13771
13812
|
}, []);
|
|
13772
|
-
const hasChannels =
|
|
13813
|
+
const hasChannels = useMemo18(
|
|
13773
13814
|
() => initialNodes.some((node) => node.type === "channels"),
|
|
13774
13815
|
[initialNodes]
|
|
13775
13816
|
);
|
|
13776
|
-
const hasMessages =
|
|
13817
|
+
const hasMessages = useMemo18(
|
|
13777
13818
|
() => initialNodes.some(isMessageNode),
|
|
13778
13819
|
[initialNodes]
|
|
13779
13820
|
);
|
|
13780
|
-
const isFlowGraph =
|
|
13821
|
+
const isFlowGraph = useMemo18(
|
|
13781
13822
|
() => initialEdges.some((edge) => edge.type === "flow-edge"),
|
|
13782
13823
|
[initialEdges]
|
|
13783
13824
|
);
|
|
@@ -13804,19 +13845,19 @@ var NodeGraphBuilder = ({
|
|
|
13804
13845
|
unlanedGraphRef.current = unlaned;
|
|
13805
13846
|
return layoutSwimlanes(unlaned, groupBy, { sizeOf: renderedSizeOf });
|
|
13806
13847
|
}, []);
|
|
13807
|
-
const hasLevels =
|
|
13848
|
+
const hasLevels = useMemo18(
|
|
13808
13849
|
() => initialNodes.some(
|
|
13809
13850
|
(node) => LEVEL_NODE_TYPES.includes(node.type || "")
|
|
13810
13851
|
),
|
|
13811
13852
|
[initialNodes]
|
|
13812
13853
|
);
|
|
13813
|
-
const isContextGraph =
|
|
13854
|
+
const isContextGraph = useMemo18(
|
|
13814
13855
|
() => initialNodes.every(
|
|
13815
13856
|
(node) => CONTEXT_NODE_TYPES.includes(node.type || "")
|
|
13816
13857
|
),
|
|
13817
13858
|
[initialNodes]
|
|
13818
13859
|
);
|
|
13819
|
-
const hasOtherDomains =
|
|
13860
|
+
const hasOtherDomains = useMemo18(
|
|
13820
13861
|
() => mode === "full" && initialNodes.some((node) => !!node.data?.otherDomain),
|
|
13821
13862
|
[initialNodes, mode]
|
|
13822
13863
|
);
|
|
@@ -13865,7 +13906,7 @@ var NodeGraphBuilder = ({
|
|
|
13865
13906
|
}),
|
|
13866
13907
|
[onShowOverview, getNodes, getEdges, getViewport]
|
|
13867
13908
|
);
|
|
13868
|
-
const levels =
|
|
13909
|
+
const levels = useMemo18(() => {
|
|
13869
13910
|
if (isFlowGraph) return [];
|
|
13870
13911
|
if (!overviewLabel && !isContextGraph && !hasLevels) return [];
|
|
13871
13912
|
const selectDetailLevel = (level) => {
|
|
@@ -13907,7 +13948,7 @@ var NodeGraphBuilder = ({
|
|
|
13907
13948
|
setDetailLevel,
|
|
13908
13949
|
switchGraph
|
|
13909
13950
|
]);
|
|
13910
|
-
const canvasTools =
|
|
13951
|
+
const canvasTools = useMemo18(
|
|
13911
13952
|
() => hasOtherDomains ? [
|
|
13912
13953
|
{
|
|
13913
13954
|
label: highlightCrossDomain ? "Stop highlighting cross-domain communication" : "Highlight cross-domain communication",
|
|
@@ -13934,7 +13975,7 @@ var NodeGraphBuilder = ({
|
|
|
13934
13975
|
walkthroughKeyRef.current = computedWalkthroughKey;
|
|
13935
13976
|
}
|
|
13936
13977
|
const walkthroughKey = walkthroughKeyRef.current;
|
|
13937
|
-
const { walkthroughNodes, walkthroughEdges } =
|
|
13978
|
+
const { walkthroughNodes, walkthroughEdges } = useMemo18(() => {
|
|
13938
13979
|
const wrapperNodeIds = new Set(
|
|
13939
13980
|
nodes.filter((n) => isExpandedWrapper(n.type) || isSwimlaneNode(n)).map((n) => n.id)
|
|
13940
13981
|
);
|
|
@@ -14765,12 +14806,12 @@ var NodeGraphBuilder = ({
|
|
|
14765
14806
|
legendKeyRef.current = computedLegendKey;
|
|
14766
14807
|
}
|
|
14767
14808
|
const legendKey = legendKeyRef.current;
|
|
14768
|
-
const graphLegend =
|
|
14809
|
+
const graphLegend = useMemo18(
|
|
14769
14810
|
() => getNodesByCollectionWithColors(nodes),
|
|
14770
14811
|
[getNodesByCollectionWithColors, legendKey]
|
|
14771
14812
|
);
|
|
14772
14813
|
const legendEntries = useRef9(null);
|
|
14773
|
-
const legend =
|
|
14814
|
+
const legend = useMemo18(() => {
|
|
14774
14815
|
legendEntries.current ?? (legendEntries.current = getNodesByCollectionWithColors(initialNodes));
|
|
14775
14816
|
Object.assign(legendEntries.current, graphLegend);
|
|
14776
14817
|
return Object.fromEntries(
|
|
@@ -14786,11 +14827,11 @@ var NodeGraphBuilder = ({
|
|
|
14786
14827
|
nodeIdsKeyRef.current = computedNodeIdsKey;
|
|
14787
14828
|
}
|
|
14788
14829
|
const nodeIdsKey = nodeIdsKeyRef.current;
|
|
14789
|
-
const searchNodes =
|
|
14830
|
+
const searchNodes = useMemo18(
|
|
14790
14831
|
() => nodes.filter((node) => !isSwimlaneNode(node)),
|
|
14791
14832
|
[nodeIdsKey]
|
|
14792
14833
|
);
|
|
14793
|
-
const allNoteGroups =
|
|
14834
|
+
const allNoteGroups = useMemo18(() => {
|
|
14794
14835
|
const groups = [];
|
|
14795
14836
|
for (const node of nodes) {
|
|
14796
14837
|
const result = getNotesFromNode(node);
|
|
@@ -14805,7 +14846,7 @@ var NodeGraphBuilder = ({
|
|
|
14805
14846
|
}
|
|
14806
14847
|
return groups;
|
|
14807
14848
|
}, [nodeIdsKey]);
|
|
14808
|
-
const totalNotesCount =
|
|
14849
|
+
const totalNotesCount = useMemo18(
|
|
14809
14850
|
() => allNoteGroups.reduce((sum, g) => sum + g.notes.length, 0),
|
|
14810
14851
|
[allNoteGroups]
|
|
14811
14852
|
);
|
|
@@ -14887,13 +14928,13 @@ var NodeGraphBuilder = ({
|
|
|
14887
14928
|
},
|
|
14888
14929
|
[setNodes, setEdges, resetNodesAndEdges, setViewport, storeApi]
|
|
14889
14930
|
);
|
|
14890
|
-
const swimlaneOptions =
|
|
14931
|
+
const swimlaneOptions = useMemo18(
|
|
14891
14932
|
() => isFlowGraph ? FLOW_GROUP_BYS.filter(
|
|
14892
14933
|
(groupBy) => hasSwimlanes(initialNodes, groupBy)
|
|
14893
14934
|
) : [],
|
|
14894
14935
|
[isFlowGraph, initialNodes]
|
|
14895
14936
|
);
|
|
14896
|
-
const swimlaneCounts =
|
|
14937
|
+
const swimlaneCounts = useMemo18(
|
|
14897
14938
|
() => Object.fromEntries(
|
|
14898
14939
|
swimlaneOptions.map((groupBy) => [
|
|
14899
14940
|
groupBy,
|