@eventcatalog/visualiser 5.0.0-beta.2 → 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.d.mts +30 -22
- package/dist/index.d.ts +30 -22
- package/dist/index.js +163 -115
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +231 -184
- 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
|
),
|
|
@@ -4242,7 +4283,8 @@ var DomainCard_default = memo17(function DomainCardNode({ data }) {
|
|
|
4242
4283
|
systemsCount = 0,
|
|
4243
4284
|
servicesCount = 0,
|
|
4244
4285
|
entitiesCount = 0,
|
|
4245
|
-
subdomain = false
|
|
4286
|
+
subdomain = false,
|
|
4287
|
+
navigable = true
|
|
4246
4288
|
} = data;
|
|
4247
4289
|
const { id, version, name, summary } = domain;
|
|
4248
4290
|
const stats = [
|
|
@@ -4254,14 +4296,16 @@ var DomainCard_default = memo17(function DomainCardNode({ data }) {
|
|
|
4254
4296
|
return /* @__PURE__ */ jsxs17(
|
|
4255
4297
|
"div",
|
|
4256
4298
|
{
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4299
|
+
...navigable ? {
|
|
4300
|
+
role: "button",
|
|
4301
|
+
tabIndex: 0,
|
|
4302
|
+
onClick: goToDiagram,
|
|
4303
|
+
onKeyDown: (e) => {
|
|
4304
|
+
if (e.key === "Enter" || e.key === " ") goToDiagram();
|
|
4305
|
+
},
|
|
4306
|
+
title: `Open the ${name} diagram`
|
|
4307
|
+
} : {},
|
|
4308
|
+
className: `relative min-w-48 max-w-60 rounded-xl border-2 border-yellow-400 overflow-visible${navigable ? " cursor-pointer" : ""}`,
|
|
4265
4309
|
style: CARD_STYLE,
|
|
4266
4310
|
children: [
|
|
4267
4311
|
/* @__PURE__ */ jsx19(
|
|
@@ -4331,9 +4375,9 @@ var DomainCard_default = memo17(function DomainCardNode({ data }) {
|
|
|
4331
4375
|
// src/nodes/external-system/ExternalSystem.tsx
|
|
4332
4376
|
import { memo as memo18 } from "react";
|
|
4333
4377
|
import { Globe as Globe2 } from "lucide-react";
|
|
4334
|
-
import { Handle as Handle14, Position as Position14, useNodeConnections as
|
|
4378
|
+
import { Handle as Handle14, Position as Position14, useNodeConnections as useNodeConnections11 } from "@xyflow/react";
|
|
4335
4379
|
import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4336
|
-
function
|
|
4380
|
+
function GlowHandle16({ side }) {
|
|
4337
4381
|
return /* @__PURE__ */ jsx20(
|
|
4338
4382
|
"div",
|
|
4339
4383
|
{
|
|
@@ -4355,7 +4399,7 @@ function GlowHandle14({ side }) {
|
|
|
4355
4399
|
}
|
|
4356
4400
|
);
|
|
4357
4401
|
}
|
|
4358
|
-
function
|
|
4402
|
+
function classNames10(...classes) {
|
|
4359
4403
|
return classes.filter(Boolean).join(" ");
|
|
4360
4404
|
}
|
|
4361
4405
|
function PostItExternalSystem(props) {
|
|
@@ -4364,7 +4408,7 @@ function PostItExternalSystem(props) {
|
|
|
4364
4408
|
return /* @__PURE__ */ jsxs18(
|
|
4365
4409
|
"div",
|
|
4366
4410
|
{
|
|
4367
|
-
className:
|
|
4411
|
+
className: classNames10(
|
|
4368
4412
|
"relative min-w-44 max-w-56 min-h-[120px]",
|
|
4369
4413
|
props?.selected ? "ring-2 ring-purple-400/60 ring-offset-1" : ""
|
|
4370
4414
|
),
|
|
@@ -4432,7 +4476,7 @@ function PostItExternalSystem(props) {
|
|
|
4432
4476
|
as: "div",
|
|
4433
4477
|
value: name,
|
|
4434
4478
|
tooltipBorderColor: "#a855f7",
|
|
4435
|
-
className:
|
|
4479
|
+
className: classNames10(
|
|
4436
4480
|
"text-[13px] font-bold leading-snug truncate",
|
|
4437
4481
|
deprecated ? "text-purple-950/40 line-through" : "text-purple-950"
|
|
4438
4482
|
),
|
|
@@ -4460,14 +4504,14 @@ function PostItExternalSystem(props) {
|
|
|
4460
4504
|
function DefaultExternalSystem(props) {
|
|
4461
4505
|
const { version, name, summary, deprecated, draft, notes } = props.data.externalSystem;
|
|
4462
4506
|
const mode = props.data.mode || "simple";
|
|
4463
|
-
const targetConnections =
|
|
4464
|
-
const sourceConnections =
|
|
4507
|
+
const targetConnections = useNodeConnections11({ handleType: "target" });
|
|
4508
|
+
const sourceConnections = useNodeConnections11({ handleType: "source" });
|
|
4465
4509
|
const isDark = useDarkMode();
|
|
4466
4510
|
const deprecatedStripe = isDark ? "rgba(239,68,68,0.25)" : "rgba(239,68,68,0.1)";
|
|
4467
4511
|
return /* @__PURE__ */ jsxs18(
|
|
4468
4512
|
"div",
|
|
4469
4513
|
{
|
|
4470
|
-
className:
|
|
4514
|
+
className: classNames10(
|
|
4471
4515
|
"relative min-w-48 max-w-60 rounded-xl border-2 overflow-visible",
|
|
4472
4516
|
props?.selected ? "ring-2 ring-purple-400/60 ring-offset-2" : "",
|
|
4473
4517
|
deprecated ? "border-dashed border-red-500" : draft ? `border-dashed ${isDark ? "border-purple-400" : "border-purple-400/60"}` : "border-purple-500"
|
|
@@ -4494,12 +4538,12 @@ function DefaultExternalSystem(props) {
|
|
|
4494
4538
|
}
|
|
4495
4539
|
),
|
|
4496
4540
|
notes && notes.length > 0 && /* @__PURE__ */ jsx20(NotesIndicator, { notes, resourceName: name }),
|
|
4497
|
-
targetConnections.length > 0 && /* @__PURE__ */ jsx20(
|
|
4498
|
-
sourceConnections.length > 0 && /* @__PURE__ */ jsx20(
|
|
4541
|
+
targetConnections.length > 0 && /* @__PURE__ */ jsx20(GlowHandle16, { side: "left" }),
|
|
4542
|
+
sourceConnections.length > 0 && /* @__PURE__ */ jsx20(GlowHandle16, { side: "right" }),
|
|
4499
4543
|
/* @__PURE__ */ jsx20("div", { className: "absolute -top-2.5 left-2.5 flex items-center gap-1.5 z-10", children: /* @__PURE__ */ jsxs18(
|
|
4500
4544
|
"span",
|
|
4501
4545
|
{
|
|
4502
|
-
className:
|
|
4546
|
+
className: classNames10(
|
|
4503
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",
|
|
4504
4548
|
deprecated ? "bg-red-500" : "bg-purple-500"
|
|
4505
4549
|
),
|
|
@@ -4618,7 +4662,7 @@ var config_default4 = {
|
|
|
4618
4662
|
import { Handle as Handle15, Position as Position15 } from "@xyflow/react";
|
|
4619
4663
|
import { memo as memo19, useState as useState3, useEffect as useEffect2, useRef as useRef2, useCallback as useCallback2 } from "react";
|
|
4620
4664
|
import { Fragment as Fragment3, jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4621
|
-
function
|
|
4665
|
+
function classNames11(...classes) {
|
|
4622
4666
|
return classes.filter(Boolean).join(" ");
|
|
4623
4667
|
}
|
|
4624
4668
|
var AVAILABLE_COLORS = {
|
|
@@ -4785,7 +4829,7 @@ var NoteNode_default = memo19(function NoteNodeComponent({
|
|
|
4785
4829
|
"button",
|
|
4786
4830
|
{
|
|
4787
4831
|
onClick: () => handleColorChange(colorKey),
|
|
4788
|
-
className:
|
|
4832
|
+
className: classNames11(
|
|
4789
4833
|
"w-6 h-6 rounded-full border-2",
|
|
4790
4834
|
AVAILABLE_COLORS[colorKey].bg,
|
|
4791
4835
|
AVAILABLE_COLORS[colorKey].border,
|
|
@@ -4799,7 +4843,7 @@ var NoteNode_default = memo19(function NoteNodeComponent({
|
|
|
4799
4843
|
"div",
|
|
4800
4844
|
{
|
|
4801
4845
|
onDoubleClick: handleDoubleClick,
|
|
4802
|
-
className:
|
|
4846
|
+
className: classNames11(
|
|
4803
4847
|
"w-full h-full rounded-lg border p-3 flex flex-col min-w-[150px] min-h-[150px] relative",
|
|
4804
4848
|
colorClasses.bg,
|
|
4805
4849
|
colorClasses.border,
|
|
@@ -4818,7 +4862,7 @@ var NoteNode_default = memo19(function NoteNodeComponent({
|
|
|
4818
4862
|
onChange: handleTextChange,
|
|
4819
4863
|
onBlur: handleBlur,
|
|
4820
4864
|
onKeyDown: handleKeyDown,
|
|
4821
|
-
className:
|
|
4865
|
+
className: classNames11(
|
|
4822
4866
|
"w-full flex-1 bg-transparent border-none outline-none resize-none text-[10px] p-0 m-0",
|
|
4823
4867
|
colorClasses.text,
|
|
4824
4868
|
colorClasses.placeholder
|
|
@@ -4868,9 +4912,9 @@ var NoteNode_default = memo19(function NoteNodeComponent({
|
|
|
4868
4912
|
// src/nodes/field/FieldNode.tsx
|
|
4869
4913
|
import { memo as memo20 } from "react";
|
|
4870
4914
|
import { Database as Database3 } from "lucide-react";
|
|
4871
|
-
import { Handle as Handle16, Position as Position16, useNodeConnections as
|
|
4915
|
+
import { Handle as Handle16, Position as Position16, useNodeConnections as useNodeConnections12 } from "@xyflow/react";
|
|
4872
4916
|
import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4873
|
-
function
|
|
4917
|
+
function GlowHandle17({ side }) {
|
|
4874
4918
|
return /* @__PURE__ */ jsx22(
|
|
4875
4919
|
"div",
|
|
4876
4920
|
{
|
|
@@ -4892,19 +4936,19 @@ function GlowHandle15({ side }) {
|
|
|
4892
4936
|
}
|
|
4893
4937
|
);
|
|
4894
4938
|
}
|
|
4895
|
-
function
|
|
4939
|
+
function classNames12(...classes) {
|
|
4896
4940
|
return classes.filter(Boolean).join(" ");
|
|
4897
4941
|
}
|
|
4898
4942
|
var FieldNode_default = memo20(function Field(props) {
|
|
4899
4943
|
const { name, type: fieldType } = props.data;
|
|
4900
4944
|
const mode = props.data.mode || "simple";
|
|
4901
|
-
const targetConnections =
|
|
4902
|
-
const sourceConnections =
|
|
4945
|
+
const targetConnections = useNodeConnections12({ handleType: "target" });
|
|
4946
|
+
const sourceConnections = useNodeConnections12({ handleType: "source" });
|
|
4903
4947
|
const isDark = useDarkMode();
|
|
4904
4948
|
return /* @__PURE__ */ jsxs20(
|
|
4905
4949
|
"div",
|
|
4906
4950
|
{
|
|
4907
|
-
className:
|
|
4951
|
+
className: classNames12(
|
|
4908
4952
|
"relative min-w-48 max-w-60 rounded-xl border-2 overflow-visible",
|
|
4909
4953
|
props?.selected ? "ring-2 ring-cyan-400/60 ring-offset-2" : "",
|
|
4910
4954
|
"border-cyan-500"
|
|
@@ -4930,8 +4974,8 @@ var FieldNode_default = memo20(function Field(props) {
|
|
|
4930
4974
|
style: HIDDEN_HANDLE_STYLE
|
|
4931
4975
|
}
|
|
4932
4976
|
),
|
|
4933
|
-
targetConnections.length > 0 && /* @__PURE__ */ jsx22(
|
|
4934
|
-
sourceConnections.length > 0 && /* @__PURE__ */ jsx22(
|
|
4977
|
+
targetConnections.length > 0 && /* @__PURE__ */ jsx22(GlowHandle17, { side: "left" }),
|
|
4978
|
+
sourceConnections.length > 0 && /* @__PURE__ */ jsx22(GlowHandle17, { side: "right" }),
|
|
4935
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: [
|
|
4936
4980
|
/* @__PURE__ */ jsx22(Database3, { className: "w-2.5 h-2.5", strokeWidth: 2.5 }),
|
|
4937
4981
|
"Field"
|
|
@@ -4993,7 +5037,7 @@ var config_default5 = {
|
|
|
4993
5037
|
};
|
|
4994
5038
|
|
|
4995
5039
|
// src/nodes/Flow.tsx
|
|
4996
|
-
import { memo as memo21, useMemo as
|
|
5040
|
+
import { memo as memo21, useMemo as useMemo9 } from "react";
|
|
4997
5041
|
import { Handle as Handle17 } from "@xyflow/react";
|
|
4998
5042
|
import { Maximize2 } from "lucide-react";
|
|
4999
5043
|
import * as ContextMenu from "@radix-ui/react-context-menu";
|
|
@@ -5106,7 +5150,7 @@ function getIcon(iconName) {
|
|
|
5106
5150
|
|
|
5107
5151
|
// src/nodes/Flow.tsx
|
|
5108
5152
|
import { Fragment as Fragment4, jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5109
|
-
function
|
|
5153
|
+
function classNames13(...classes) {
|
|
5110
5154
|
return classes.filter(Boolean).join(" ");
|
|
5111
5155
|
}
|
|
5112
5156
|
var Flow_default = memo21(function FlowNode({
|
|
@@ -5118,7 +5162,7 @@ var Flow_default = memo21(function FlowNode({
|
|
|
5118
5162
|
const canExpand = Array.isArray(data?.expandedNodes) && data.expandedNodes.length > 0;
|
|
5119
5163
|
const { id, version, owners = EMPTY_ARRAY, name, styles } = flow.data;
|
|
5120
5164
|
const { node: { color = "teal", label } = {}, icon = "QueueListIcon" } = styles || {};
|
|
5121
|
-
const Icon =
|
|
5165
|
+
const Icon = useMemo9(() => getIcon(icon), [icon]);
|
|
5122
5166
|
const portalContainer = usePortalContainer();
|
|
5123
5167
|
const nodeLabel = label || flow?.data?.sidebar?.badge || "Flow";
|
|
5124
5168
|
const fontSize = nodeLabel.length > 10 ? "7px" : "9px";
|
|
@@ -5150,7 +5194,7 @@ var Flow_default = memo21(function FlowNode({
|
|
|
5150
5194
|
/* @__PURE__ */ jsxs22(
|
|
5151
5195
|
"div",
|
|
5152
5196
|
{
|
|
5153
|
-
className:
|
|
5197
|
+
className: classNames13(
|
|
5154
5198
|
`relative rounded-md border flex justify-start bg-[rgb(var(--ec-card-bg))] text-[rgb(var(--ec-page-text))] border-${color}-400`
|
|
5155
5199
|
),
|
|
5156
5200
|
style: NODE_WIDTH_STYLE,
|
|
@@ -5158,7 +5202,7 @@ var Flow_default = memo21(function FlowNode({
|
|
|
5158
5202
|
/* @__PURE__ */ jsxs22(
|
|
5159
5203
|
"div",
|
|
5160
5204
|
{
|
|
5161
|
-
className:
|
|
5205
|
+
className: classNames13(
|
|
5162
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`,
|
|
5163
5207
|
`border-r-[1px] border-${color}-500`
|
|
5164
5208
|
),
|
|
@@ -5181,7 +5225,7 @@ var Flow_default = memo21(function FlowNode({
|
|
|
5181
5225
|
/* @__PURE__ */ jsxs22(
|
|
5182
5226
|
"div",
|
|
5183
5227
|
{
|
|
5184
|
-
className:
|
|
5228
|
+
className: classNames13(
|
|
5185
5229
|
mode === "full" ? `border-b border-[rgb(var(--ec-page-border))]` : ""
|
|
5186
5230
|
),
|
|
5187
5231
|
children: [
|
|
@@ -5390,11 +5434,11 @@ var FlowExpandedNode_default = memo22(function FlowExpandedNode({
|
|
|
5390
5434
|
// src/nodes/Entity.tsx
|
|
5391
5435
|
import { Handle as Handle18, Position as Position17, useUpdateNodeInternals } from "@xyflow/react";
|
|
5392
5436
|
import * as ContextMenu2 from "@radix-ui/react-context-menu";
|
|
5393
|
-
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";
|
|
5394
5438
|
import { ChevronDownIcon, ChevronRightIcon } from "@heroicons/react/20/solid";
|
|
5395
5439
|
import { Fragment as Fragment5, jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
5396
5440
|
var ENTITY_TARGET_HANDLE_ID = "__eventcatalog-entity-target";
|
|
5397
|
-
function
|
|
5441
|
+
function classNames14(...classes) {
|
|
5398
5442
|
return classes.filter(Boolean).join(" ");
|
|
5399
5443
|
}
|
|
5400
5444
|
var getPropertyTypeLabel = (property) => {
|
|
@@ -5436,7 +5480,7 @@ var Entity_default = memo23(function EntityNode({
|
|
|
5436
5480
|
node: { color: _color = "blue", label: _label } = {},
|
|
5437
5481
|
icon = "CubeIcon"
|
|
5438
5482
|
} = styles || {};
|
|
5439
|
-
const Icon =
|
|
5483
|
+
const Icon = useMemo10(() => getIcon(icon), [icon]);
|
|
5440
5484
|
const [hoveredProperty, setHoveredProperty] = useState4(null);
|
|
5441
5485
|
const [expandedProperties, setExpandedProperties] = useState4(
|
|
5442
5486
|
() => /* @__PURE__ */ new Set()
|
|
@@ -5444,7 +5488,7 @@ var Entity_default = memo23(function EntityNode({
|
|
|
5444
5488
|
const previousExpandedProperties = useRef3(expandedProperties);
|
|
5445
5489
|
const updateNodeInternals = useUpdateNodeInternals();
|
|
5446
5490
|
const portalContainer = usePortalContainer();
|
|
5447
|
-
const referenceProperties =
|
|
5491
|
+
const referenceProperties = useMemo10(
|
|
5448
5492
|
() => new Set(referencePropertyNames),
|
|
5449
5493
|
[referencePropertyNames]
|
|
5450
5494
|
);
|
|
@@ -5477,7 +5521,7 @@ var Entity_default = memo23(function EntityNode({
|
|
|
5477
5521
|
/* @__PURE__ */ jsxs24(
|
|
5478
5522
|
"div",
|
|
5479
5523
|
{
|
|
5480
|
-
className:
|
|
5524
|
+
className: classNames14(
|
|
5481
5525
|
"relative flex items-center justify-between py-2 pr-4 hover:bg-[rgb(var(--ec-page-border)/0.2)]",
|
|
5482
5526
|
isExpandable && "nodrag nopan cursor-pointer"
|
|
5483
5527
|
),
|
|
@@ -5559,7 +5603,7 @@ var Entity_default = memo23(function EntityNode({
|
|
|
5559
5603
|
/* @__PURE__ */ jsx26(ContextMenu2.Trigger, { children: /* @__PURE__ */ jsxs24(
|
|
5560
5604
|
"div",
|
|
5561
5605
|
{
|
|
5562
|
-
className:
|
|
5606
|
+
className: classNames14(
|
|
5563
5607
|
"bg-[rgb(var(--ec-card-bg))] border rounded-lg shadow-sm min-w-[200px]",
|
|
5564
5608
|
externalToDomain ? "border-amber-500/60" : "border-blue-400/50"
|
|
5565
5609
|
),
|
|
@@ -5567,7 +5611,7 @@ var Entity_default = memo23(function EntityNode({
|
|
|
5567
5611
|
/* @__PURE__ */ jsxs24(
|
|
5568
5612
|
"div",
|
|
5569
5613
|
{
|
|
5570
|
-
className:
|
|
5614
|
+
className: classNames14(
|
|
5571
5615
|
"relative px-4 py-2 rounded-t-lg border-b border-[rgb(var(--ec-page-border))]",
|
|
5572
5616
|
externalToDomain ? "bg-amber-500/20" : "bg-blue-500/15"
|
|
5573
5617
|
),
|
|
@@ -5656,7 +5700,7 @@ import { memo as memo24 } from "react";
|
|
|
5656
5700
|
import { UserIcon as UserIcon2 } from "@heroicons/react/20/solid";
|
|
5657
5701
|
import { Handle as Handle19 } from "@xyflow/react";
|
|
5658
5702
|
import { jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
5659
|
-
function
|
|
5703
|
+
function classNames15(...classes) {
|
|
5660
5704
|
return classes.filter(Boolean).join(" ");
|
|
5661
5705
|
}
|
|
5662
5706
|
var User_default = memo24(function UserNode({
|
|
@@ -5675,7 +5719,7 @@ var User_default = memo24(function UserNode({
|
|
|
5675
5719
|
return /* @__PURE__ */ jsxs25(
|
|
5676
5720
|
"div",
|
|
5677
5721
|
{
|
|
5678
|
-
className:
|
|
5722
|
+
className: classNames15(
|
|
5679
5723
|
`rounded-md border flex justify-start bg-[rgb(var(--ec-card-bg))] text-[rgb(var(--ec-page-text))] border-yellow-400`,
|
|
5680
5724
|
mode === "full" ? "min-h-[5em]" : "min-h-[2em]"
|
|
5681
5725
|
),
|
|
@@ -5684,7 +5728,7 @@ var User_default = memo24(function UserNode({
|
|
|
5684
5728
|
/* @__PURE__ */ jsxs25(
|
|
5685
5729
|
"div",
|
|
5686
5730
|
{
|
|
5687
|
-
className:
|
|
5731
|
+
className: classNames15(
|
|
5688
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",
|
|
5689
5733
|
`border-r-[1px] border-yellow-500`
|
|
5690
5734
|
),
|
|
@@ -5721,7 +5765,7 @@ var User_default = memo24(function UserNode({
|
|
|
5721
5765
|
/* @__PURE__ */ jsx27(
|
|
5722
5766
|
"div",
|
|
5723
5767
|
{
|
|
5724
|
-
className:
|
|
5768
|
+
className: classNames15(
|
|
5725
5769
|
mode === "full" ? `border-b border-[rgb(var(--ec-page-border))]` : ""
|
|
5726
5770
|
),
|
|
5727
5771
|
children: /* @__PURE__ */ jsx27(
|
|
@@ -5748,7 +5792,7 @@ var User_default = memo24(function UserNode({
|
|
|
5748
5792
|
import { memo as memo25 } from "react";
|
|
5749
5793
|
import { Handle as Handle20, Position as Position18 } from "@xyflow/react";
|
|
5750
5794
|
import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5751
|
-
function
|
|
5795
|
+
function classNames16(...classes) {
|
|
5752
5796
|
return classes.filter(Boolean).join(" ");
|
|
5753
5797
|
}
|
|
5754
5798
|
var Step_default = memo25(function StepNode({
|
|
@@ -5761,7 +5805,7 @@ var Step_default = memo25(function StepNode({
|
|
|
5761
5805
|
return /* @__PURE__ */ jsxs26(
|
|
5762
5806
|
"div",
|
|
5763
5807
|
{
|
|
5764
|
-
className:
|
|
5808
|
+
className: classNames16(
|
|
5765
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]"
|
|
5766
5810
|
),
|
|
5767
5811
|
style: NODE_WIDTH_STYLE,
|
|
@@ -5769,7 +5813,7 @@ var Step_default = memo25(function StepNode({
|
|
|
5769
5813
|
/* @__PURE__ */ jsx28(
|
|
5770
5814
|
"div",
|
|
5771
5815
|
{
|
|
5772
|
-
className:
|
|
5816
|
+
className: classNames16(
|
|
5773
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",
|
|
5774
5818
|
`border-r-[1px] border-gray-500`
|
|
5775
5819
|
),
|
|
@@ -5814,7 +5858,7 @@ var Step_default = memo25(function StepNode({
|
|
|
5814
5858
|
/* @__PURE__ */ jsx28(
|
|
5815
5859
|
"div",
|
|
5816
5860
|
{
|
|
5817
|
-
className:
|
|
5861
|
+
className: classNames16(
|
|
5818
5862
|
mode === "full" ? `border-b border-[rgb(var(--ec-page-border))]` : ""
|
|
5819
5863
|
),
|
|
5820
5864
|
children: /* @__PURE__ */ jsx28(
|
|
@@ -5845,7 +5889,7 @@ import {
|
|
|
5845
5889
|
Position as Position19
|
|
5846
5890
|
} from "@xyflow/react";
|
|
5847
5891
|
import * as ContextMenu3 from "@radix-ui/react-context-menu";
|
|
5848
|
-
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";
|
|
5849
5893
|
import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
5850
5894
|
var Domain_default = memo26(function DomainNode({ data, id: nodeId }) {
|
|
5851
5895
|
const { mode, domain } = data;
|
|
@@ -5855,8 +5899,8 @@ var Domain_default = memo26(function DomainNode({ data, id: nodeId }) {
|
|
|
5855
5899
|
);
|
|
5856
5900
|
const { id, version, name, services = [], styles } = domain.data;
|
|
5857
5901
|
const { icon = "RectangleGroupIcon" } = styles || {};
|
|
5858
|
-
const Icon =
|
|
5859
|
-
const ServerIcon6 =
|
|
5902
|
+
const Icon = useMemo11(() => getIcon(icon), [icon]);
|
|
5903
|
+
const ServerIcon6 = useMemo11(() => getIcon("ServerIcon"), []);
|
|
5860
5904
|
const portalContainer = usePortalContainer();
|
|
5861
5905
|
const handleSelectionChange = useCallback4(
|
|
5862
5906
|
({ nodes: selectedNodes }) => {
|
|
@@ -6018,7 +6062,7 @@ import {
|
|
|
6018
6062
|
} from "lucide-react";
|
|
6019
6063
|
import { memo as memo27 } from "react";
|
|
6020
6064
|
import { jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6021
|
-
function
|
|
6065
|
+
function classNames17(...classes) {
|
|
6022
6066
|
return classes.filter(Boolean).join(" ");
|
|
6023
6067
|
}
|
|
6024
6068
|
var System_default = memo27(function SystemNode({ data }) {
|
|
@@ -6029,12 +6073,14 @@ var System_default = memo27(function SystemNode({ data }) {
|
|
|
6029
6073
|
entitiesCount = 0,
|
|
6030
6074
|
containersCount = 0,
|
|
6031
6075
|
messagesCount = 0,
|
|
6032
|
-
isFocused = false
|
|
6076
|
+
isFocused = false,
|
|
6077
|
+
navigable = true
|
|
6033
6078
|
} = data;
|
|
6034
6079
|
const { id, version, name, summary, scope } = system;
|
|
6035
6080
|
const isExternal = scope === "external";
|
|
6036
6081
|
const isDark = useDarkMode();
|
|
6037
6082
|
const isFlowStep = Boolean(data.step);
|
|
6083
|
+
const opensMap = navigable && !isFlowStep;
|
|
6038
6084
|
const stats = [
|
|
6039
6085
|
{ icon: ServerIcon3, label: "Services", count: servicesCount },
|
|
6040
6086
|
{ icon: MessageSquareIcon, label: "Messages", count: messagesCount },
|
|
@@ -6048,7 +6094,7 @@ var System_default = memo27(function SystemNode({ data }) {
|
|
|
6048
6094
|
return /* @__PURE__ */ jsxs28(
|
|
6049
6095
|
"div",
|
|
6050
6096
|
{
|
|
6051
|
-
|
|
6097
|
+
...!opensMap ? {} : {
|
|
6052
6098
|
role: "button",
|
|
6053
6099
|
tabIndex: 0,
|
|
6054
6100
|
onClick: goToMap,
|
|
@@ -6057,9 +6103,9 @@ var System_default = memo27(function SystemNode({ data }) {
|
|
|
6057
6103
|
},
|
|
6058
6104
|
title: `Open the ${name} map`
|
|
6059
6105
|
},
|
|
6060
|
-
className:
|
|
6106
|
+
className: classNames17(
|
|
6061
6107
|
"relative min-w-48 max-w-60 rounded-xl border-2 overflow-visible",
|
|
6062
|
-
|
|
6108
|
+
opensMap && "cursor-pointer",
|
|
6063
6109
|
isExternal ? "border-dashed border-violet-400" : "border-violet-500"
|
|
6064
6110
|
),
|
|
6065
6111
|
style: {
|
|
@@ -6108,7 +6154,7 @@ var System_default = memo27(function SystemNode({ data }) {
|
|
|
6108
6154
|
mode === "full" && summary && /* @__PURE__ */ jsx30(
|
|
6109
6155
|
"div",
|
|
6110
6156
|
{
|
|
6111
|
-
className:
|
|
6157
|
+
className: classNames17(
|
|
6112
6158
|
"mt-1.5 text-[9px] text-[rgb(var(--ec-page-text-muted))] leading-relaxed overflow-hidden"
|
|
6113
6159
|
),
|
|
6114
6160
|
style: LINE_CLAMP_STYLE,
|
|
@@ -6243,8 +6289,8 @@ var GroupNode_default = memo28(function GroupNode({ data }) {
|
|
|
6243
6289
|
});
|
|
6244
6290
|
|
|
6245
6291
|
// src/nodes/Custom.tsx
|
|
6246
|
-
import { memo as memo29, useMemo as
|
|
6247
|
-
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";
|
|
6248
6294
|
import * as Icons from "@heroicons/react/24/solid";
|
|
6249
6295
|
import * as ContextMenu4 from "@radix-ui/react-context-menu";
|
|
6250
6296
|
import { jsx as jsx32, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
@@ -6378,13 +6424,13 @@ var PALETTES = {
|
|
|
6378
6424
|
pillBorder: "#f43f5e"
|
|
6379
6425
|
}
|
|
6380
6426
|
};
|
|
6381
|
-
function
|
|
6427
|
+
function classNames18(...classes) {
|
|
6382
6428
|
return classes.filter(Boolean).join(" ");
|
|
6383
6429
|
}
|
|
6384
6430
|
function getPalette(color) {
|
|
6385
6431
|
return PALETTES[color || "blue"] ?? PALETTES.blue;
|
|
6386
6432
|
}
|
|
6387
|
-
function
|
|
6433
|
+
function GlowHandle18({
|
|
6388
6434
|
side,
|
|
6389
6435
|
gradient
|
|
6390
6436
|
}) {
|
|
@@ -6423,17 +6469,17 @@ var Custom_default = memo29(function CustomNode({ data, selected }) {
|
|
|
6423
6469
|
height = 5
|
|
6424
6470
|
} = customProps;
|
|
6425
6471
|
const palette = getPalette(color);
|
|
6426
|
-
const IconComponent =
|
|
6472
|
+
const IconComponent = useMemo12(() => Icons[icon] || Icons.CubeIcon, [icon]);
|
|
6427
6473
|
const portalContainer = usePortalContainer();
|
|
6428
|
-
const targetConnections =
|
|
6429
|
-
const sourceConnections =
|
|
6474
|
+
const targetConnections = useNodeConnections13({ handleType: "target" });
|
|
6475
|
+
const sourceConnections = useNodeConnections13({ handleType: "source" });
|
|
6430
6476
|
const propertyEntries = Object.entries(properties);
|
|
6431
6477
|
const contextMenuItems = url ? [{ label: `Open ${type.toLowerCase()}`, url }, ...menu] : menu;
|
|
6432
6478
|
return /* @__PURE__ */ jsxs30(ContextMenu4.Root, { children: [
|
|
6433
6479
|
/* @__PURE__ */ jsx32(ContextMenu4.Trigger, { children: /* @__PURE__ */ jsxs30(
|
|
6434
6480
|
"div",
|
|
6435
6481
|
{
|
|
6436
|
-
className:
|
|
6482
|
+
className: classNames18(
|
|
6437
6483
|
"relative min-w-48 max-w-60 rounded-xl border-2 overflow-visible",
|
|
6438
6484
|
selected ? palette.ring : "",
|
|
6439
6485
|
palette.border
|
|
@@ -6460,12 +6506,12 @@ var Custom_default = memo29(function CustomNode({ data, selected }) {
|
|
|
6460
6506
|
style: HIDDEN_HANDLE_STYLE
|
|
6461
6507
|
}
|
|
6462
6508
|
),
|
|
6463
|
-
targetConnections.length > 0 && /* @__PURE__ */ jsx32(
|
|
6464
|
-
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 }),
|
|
6465
6511
|
/* @__PURE__ */ jsx32("div", { className: "absolute -top-3 left-2.5 z-10", children: /* @__PURE__ */ jsxs30(
|
|
6466
6512
|
"span",
|
|
6467
6513
|
{
|
|
6468
|
-
className:
|
|
6514
|
+
className: classNames18(
|
|
6469
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",
|
|
6470
6516
|
palette.badge
|
|
6471
6517
|
),
|
|
@@ -6571,9 +6617,9 @@ var ExternalSystem2_default = memo30(function ExternalSystemNode(props) {
|
|
|
6571
6617
|
// src/nodes/DataProduct.tsx
|
|
6572
6618
|
import { memo as memo31 } from "react";
|
|
6573
6619
|
import { Package } from "lucide-react";
|
|
6574
|
-
import { Handle as Handle25, Position as Position23, useNodeConnections as
|
|
6620
|
+
import { Handle as Handle25, Position as Position23, useNodeConnections as useNodeConnections14 } from "@xyflow/react";
|
|
6575
6621
|
import { jsx as jsx34, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
6576
|
-
function
|
|
6622
|
+
function GlowHandle19({ side }) {
|
|
6577
6623
|
return /* @__PURE__ */ jsx34(
|
|
6578
6624
|
"div",
|
|
6579
6625
|
{
|
|
@@ -6595,7 +6641,7 @@ function GlowHandle17({ side }) {
|
|
|
6595
6641
|
}
|
|
6596
6642
|
);
|
|
6597
6643
|
}
|
|
6598
|
-
function
|
|
6644
|
+
function classNames19(...classes) {
|
|
6599
6645
|
return classes.filter(Boolean).join(" ");
|
|
6600
6646
|
}
|
|
6601
6647
|
function PostItDataProduct(props) {
|
|
@@ -6605,7 +6651,7 @@ function PostItDataProduct(props) {
|
|
|
6605
6651
|
return /* @__PURE__ */ jsxs32(
|
|
6606
6652
|
"div",
|
|
6607
6653
|
{
|
|
6608
|
-
className:
|
|
6654
|
+
className: classNames19(
|
|
6609
6655
|
"relative min-w-44 max-w-56 min-h-[120px]",
|
|
6610
6656
|
props?.selected ? "ring-2 ring-indigo-400/60 ring-offset-1" : ""
|
|
6611
6657
|
),
|
|
@@ -6682,7 +6728,7 @@ function PostItDataProduct(props) {
|
|
|
6682
6728
|
as: "div",
|
|
6683
6729
|
value: name,
|
|
6684
6730
|
tooltipBorderColor: "#6366f1",
|
|
6685
|
-
className:
|
|
6731
|
+
className: classNames19(
|
|
6686
6732
|
"text-[13px] font-bold leading-snug min-w-0 truncate",
|
|
6687
6733
|
deprecated ? "text-indigo-950/40 line-through" : "text-indigo-950"
|
|
6688
6734
|
),
|
|
@@ -6712,14 +6758,14 @@ function DefaultDataProduct(props) {
|
|
|
6712
6758
|
const { version, name, summary, deprecated, draft, notes, styles } = props.data.dataProduct;
|
|
6713
6759
|
const mode = props.data.mode || "simple";
|
|
6714
6760
|
const customIcon = isIconPath(styles?.icon) ? styles.icon : void 0;
|
|
6715
|
-
const targetConnections =
|
|
6716
|
-
const sourceConnections =
|
|
6761
|
+
const targetConnections = useNodeConnections14({ handleType: "target" });
|
|
6762
|
+
const sourceConnections = useNodeConnections14({ handleType: "source" });
|
|
6717
6763
|
const isDark = useDarkMode();
|
|
6718
6764
|
const deprecatedStripe = isDark ? "rgba(239,68,68,0.25)" : "rgba(239,68,68,0.1)";
|
|
6719
6765
|
return /* @__PURE__ */ jsxs32(
|
|
6720
6766
|
"div",
|
|
6721
6767
|
{
|
|
6722
|
-
className:
|
|
6768
|
+
className: classNames19(
|
|
6723
6769
|
"relative min-w-48 max-w-60 rounded-xl border-2 overflow-visible",
|
|
6724
6770
|
props?.selected ? "ring-2 ring-indigo-400/60 ring-offset-2" : "",
|
|
6725
6771
|
deprecated ? "border-dashed border-red-500" : draft ? `border-dashed ${isDark ? "border-indigo-400" : "border-indigo-400/60"}` : "border-indigo-500"
|
|
@@ -6746,12 +6792,12 @@ function DefaultDataProduct(props) {
|
|
|
6746
6792
|
}
|
|
6747
6793
|
),
|
|
6748
6794
|
notes && notes.length > 0 && /* @__PURE__ */ jsx34(NotesIndicator, { notes, resourceName: name }),
|
|
6749
|
-
targetConnections.length > 0 && /* @__PURE__ */ jsx34(
|
|
6750
|
-
sourceConnections.length > 0 && /* @__PURE__ */ jsx34(
|
|
6795
|
+
targetConnections.length > 0 && /* @__PURE__ */ jsx34(GlowHandle19, { side: "left" }),
|
|
6796
|
+
sourceConnections.length > 0 && /* @__PURE__ */ jsx34(GlowHandle19, { side: "right" }),
|
|
6751
6797
|
/* @__PURE__ */ jsx34("div", { className: "absolute -top-2.5 left-2.5 flex items-center gap-1.5 z-10", children: /* @__PURE__ */ jsxs32(
|
|
6752
6798
|
"span",
|
|
6753
6799
|
{
|
|
6754
|
-
className:
|
|
6800
|
+
className: classNames19(
|
|
6755
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",
|
|
6756
6802
|
deprecated ? "bg-red-500" : "bg-indigo-500"
|
|
6757
6803
|
),
|
|
@@ -6813,9 +6859,9 @@ var DataProduct_default = memo31(function DataProductNode(props) {
|
|
|
6813
6859
|
});
|
|
6814
6860
|
|
|
6815
6861
|
// src/nodes/message-group/MessageGroupNode.tsx
|
|
6816
|
-
import { memo as memo32, useMemo as
|
|
6862
|
+
import { memo as memo32, useMemo as useMemo13 } from "react";
|
|
6817
6863
|
import { Layers, Zap as Zap3, Terminal, HelpCircle, Maximize2 as Maximize22 } from "lucide-react";
|
|
6818
|
-
import { Handle as Handle26, Position as Position24, useNodeConnections as
|
|
6864
|
+
import { Handle as Handle26, Position as Position24, useNodeConnections as useNodeConnections15 } from "@xyflow/react";
|
|
6819
6865
|
import { jsx as jsx35, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
6820
6866
|
var TYPE_ICONS = {
|
|
6821
6867
|
events: Zap3,
|
|
@@ -6831,10 +6877,10 @@ var CARD_STYLE2 = {
|
|
|
6831
6877
|
var MessageGroupNode_default = memo32(function MessageGroupNode(props) {
|
|
6832
6878
|
const { groupName, messageCount } = props.data;
|
|
6833
6879
|
const isDark = useDarkMode();
|
|
6834
|
-
const targetConnections =
|
|
6835
|
-
const sourceConnections =
|
|
6880
|
+
const targetConnections = useNodeConnections15({ handleType: "target" });
|
|
6881
|
+
const sourceConnections = useNodeConnections15({ handleType: "source" });
|
|
6836
6882
|
const stackDepth = messageCount >= 3 ? 3 : messageCount;
|
|
6837
|
-
const typeBreakdown =
|
|
6883
|
+
const typeBreakdown = useMemo13(() => {
|
|
6838
6884
|
const counts = {};
|
|
6839
6885
|
props.data.messages.forEach(({ message }) => {
|
|
6840
6886
|
const type = message?.collection || "unknown";
|
|
@@ -7109,7 +7155,7 @@ var MessageGroupExpandedNode_default = memo33(function MessageGroupExpandedNode(
|
|
|
7109
7155
|
});
|
|
7110
7156
|
|
|
7111
7157
|
// src/edges/AnimatedMessageEdge.tsx
|
|
7112
|
-
import { memo as memo34, useMemo as
|
|
7158
|
+
import { memo as memo34, useMemo as useMemo14 } from "react";
|
|
7113
7159
|
import { BaseEdge, getSmoothStepPath } from "@xyflow/react";
|
|
7114
7160
|
|
|
7115
7161
|
// src/edges/EdgeLabel.tsx
|
|
@@ -7340,9 +7386,9 @@ var AnimatedMessageEdge = memo34(
|
|
|
7340
7386
|
const customColor = data?.customColor || messageColor(collection ?? "default");
|
|
7341
7387
|
const warning = data?.warning;
|
|
7342
7388
|
const customColors = Array.isArray(customColor) ? customColor : [customColor];
|
|
7343
|
-
const randomDelay =
|
|
7389
|
+
const randomDelay = useMemo14(() => Math.random() * 1, []);
|
|
7344
7390
|
const opacityClass = opacity === 1 ? "z-30 opacity-100" : "z-30 opacity-10";
|
|
7345
|
-
const animatedNodes =
|
|
7391
|
+
const animatedNodes = useMemo14(
|
|
7346
7392
|
() => customColors.map((color, index) => {
|
|
7347
7393
|
const delay = randomDelay + index * 0.3;
|
|
7348
7394
|
return /* @__PURE__ */ jsx38(
|
|
@@ -7494,7 +7540,7 @@ var MultilineEdgeLabel_default = memo35(function MultilineEdgeLabel(props) {
|
|
|
7494
7540
|
});
|
|
7495
7541
|
|
|
7496
7542
|
// src/edges/FlowEdge.tsx
|
|
7497
|
-
import { memo as memo36, useMemo as
|
|
7543
|
+
import { memo as memo36, useMemo as useMemo15 } from "react";
|
|
7498
7544
|
import {
|
|
7499
7545
|
BaseEdge as BaseEdge2,
|
|
7500
7546
|
EdgeLabelRenderer as EdgeLabelRenderer2,
|
|
@@ -7553,15 +7599,15 @@ var FlowEdge_default = memo36(function CustomEdge({
|
|
|
7553
7599
|
targetPosition
|
|
7554
7600
|
})
|
|
7555
7601
|
);
|
|
7556
|
-
const randomDelay =
|
|
7602
|
+
const randomDelay = useMemo15(() => Math.random() * 1, []);
|
|
7557
7603
|
const collection = data?.message?.collection;
|
|
7558
7604
|
const opacity = data?.opacity ?? 1;
|
|
7559
|
-
const mergedStyle =
|
|
7605
|
+
const mergedStyle = useMemo15(
|
|
7560
7606
|
() => ({ ...EDGE_FLOW_BASE_STYLE, ...style }),
|
|
7561
7607
|
[style]
|
|
7562
7608
|
);
|
|
7563
7609
|
const crossDomain = isCrossDomain(data);
|
|
7564
|
-
const labelPositionStyle =
|
|
7610
|
+
const labelPositionStyle = useMemo15(
|
|
7565
7611
|
() => ({
|
|
7566
7612
|
position: "absolute",
|
|
7567
7613
|
transform: `translate(-50%, -50%) translate(${labelX}px,${labelY}px)`,
|
|
@@ -8298,7 +8344,7 @@ import {
|
|
|
8298
8344
|
useEffect as useEffect5,
|
|
8299
8345
|
useLayoutEffect,
|
|
8300
8346
|
useCallback as useCallback7,
|
|
8301
|
-
useMemo as
|
|
8347
|
+
useMemo as useMemo16,
|
|
8302
8348
|
useRef as useRef5,
|
|
8303
8349
|
memo as memo38
|
|
8304
8350
|
} from "react";
|
|
@@ -8513,7 +8559,7 @@ var StepWalkthrough_default = memo38(function StepWalkthrough({
|
|
|
8513
8559
|
edgeKeyRef.current = computedEdgeKey;
|
|
8514
8560
|
}
|
|
8515
8561
|
const edgeKey = edgeKeyRef.current;
|
|
8516
|
-
const nodesById =
|
|
8562
|
+
const nodesById = useMemo16(
|
|
8517
8563
|
() => new Map(nodes.map((node) => [node.id, node])),
|
|
8518
8564
|
[nodeIdsKey]
|
|
8519
8565
|
);
|
|
@@ -8536,7 +8582,7 @@ var StepWalkthrough_default = memo38(function StepWalkthrough({
|
|
|
8536
8582
|
})).filter((path) => !!path.targetNode) : [],
|
|
8537
8583
|
[edgeKey, nodesById]
|
|
8538
8584
|
);
|
|
8539
|
-
const availablePaths =
|
|
8585
|
+
const availablePaths = useMemo16(
|
|
8540
8586
|
() => pathsFrom(currentNodeId),
|
|
8541
8587
|
[pathsFrom, currentNodeId]
|
|
8542
8588
|
);
|
|
@@ -8554,11 +8600,11 @@ var StepWalkthrough_default = memo38(function StepWalkthrough({
|
|
|
8554
8600
|
},
|
|
8555
8601
|
[pathsFrom]
|
|
8556
8602
|
);
|
|
8557
|
-
const totalSteps =
|
|
8603
|
+
const totalSteps = useMemo16(
|
|
8558
8604
|
() => currentNodeId ? trail.length + stepsAfter(currentNodeId, trail) : 0,
|
|
8559
8605
|
[trail, currentNodeId, stepsAfter]
|
|
8560
8606
|
);
|
|
8561
|
-
const startSteps =
|
|
8607
|
+
const startSteps = useMemo16(
|
|
8562
8608
|
() => startNodeId ? 1 + stepsAfter(startNodeId, [startNodeId]) : 0,
|
|
8563
8609
|
[startNodeId, stepsAfter]
|
|
8564
8610
|
);
|
|
@@ -8609,7 +8655,7 @@ var StepWalkthrough_default = memo38(function StepWalkthrough({
|
|
|
8609
8655
|
return () => window.removeEventListener("keydown", onKeyDown);
|
|
8610
8656
|
}, [isWalking, availablePaths, next, previous, finish]);
|
|
8611
8657
|
const currentNode = currentNodeId ? nodesById.get(currentNodeId) : void 0;
|
|
8612
|
-
const info =
|
|
8658
|
+
const info = useMemo16(
|
|
8613
8659
|
() => currentNode ? getStepInfo(currentNode) : void 0,
|
|
8614
8660
|
[currentNode]
|
|
8615
8661
|
);
|
|
@@ -8626,7 +8672,7 @@ var StepWalkthrough_default = memo38(function StepWalkthrough({
|
|
|
8626
8672
|
!!info?.detail || !!title && title.scrollWidth > title.clientWidth || !!summary && summary.scrollHeight > summary.clientHeight + 1
|
|
8627
8673
|
);
|
|
8628
8674
|
}, [info, expanded]);
|
|
8629
|
-
const startInfo =
|
|
8675
|
+
const startInfo = useMemo16(() => {
|
|
8630
8676
|
const startNode = startNodeId ? nodesById.get(startNodeId) : void 0;
|
|
8631
8677
|
return startNode ? getStepInfo(startNode) : void 0;
|
|
8632
8678
|
}, [startNodeId, nodesById]);
|
|
@@ -9964,7 +10010,7 @@ import {
|
|
|
9964
10010
|
|
|
9965
10011
|
// src/components/FocusMode/FocusModeContent.tsx
|
|
9966
10012
|
import {
|
|
9967
|
-
useMemo as
|
|
10013
|
+
useMemo as useMemo17,
|
|
9968
10014
|
useCallback as useCallback8,
|
|
9969
10015
|
useEffect as useEffect7,
|
|
9970
10016
|
useState as useState9,
|
|
@@ -10223,7 +10269,7 @@ var FocusModeContent = ({
|
|
|
10223
10269
|
},
|
|
10224
10270
|
[allNodes, allEdges]
|
|
10225
10271
|
);
|
|
10226
|
-
const initialGraph =
|
|
10272
|
+
const initialGraph = useMemo17(
|
|
10227
10273
|
() => calculateFocusedGraph(centerNodeId),
|
|
10228
10274
|
[centerNodeId, calculateFocusedGraph]
|
|
10229
10275
|
);
|
|
@@ -10304,7 +10350,7 @@ var FocusModeContent = ({
|
|
|
10304
10350
|
const handleEdgeMouseLeave = useCallback8(() => {
|
|
10305
10351
|
setHoveredEdgeId(null);
|
|
10306
10352
|
}, []);
|
|
10307
|
-
const edgesWithHover =
|
|
10353
|
+
const edgesWithHover = useMemo17(() => {
|
|
10308
10354
|
return displayEdges.map((edge) => {
|
|
10309
10355
|
if (edge.id === hoveredEdgeId) {
|
|
10310
10356
|
return {
|
|
@@ -10315,7 +10361,7 @@ var FocusModeContent = ({
|
|
|
10315
10361
|
return edge;
|
|
10316
10362
|
});
|
|
10317
10363
|
}, [displayEdges, hoveredEdgeId]);
|
|
10318
|
-
const mergedNodeTypes =
|
|
10364
|
+
const mergedNodeTypes = useMemo17(
|
|
10319
10365
|
() => ({
|
|
10320
10366
|
...nodeTypes,
|
|
10321
10367
|
placeholder: FocusModePlaceholder_default
|
|
@@ -13558,7 +13604,7 @@ var NodeGraphBuilder = ({
|
|
|
13558
13604
|
setBuildUrlFn(onBuildUrl);
|
|
13559
13605
|
}
|
|
13560
13606
|
}, []);
|
|
13561
|
-
const nodeTypes =
|
|
13607
|
+
const nodeTypes = useMemo18(() => {
|
|
13562
13608
|
const wrapWithContextMenu = (Component) => {
|
|
13563
13609
|
const Wrapped = (props) => {
|
|
13564
13610
|
const items = props.data?.contextMenu;
|
|
@@ -13623,7 +13669,7 @@ var NodeGraphBuilder = ({
|
|
|
13623
13669
|
])
|
|
13624
13670
|
);
|
|
13625
13671
|
}, []);
|
|
13626
|
-
const edgeTypes2 =
|
|
13672
|
+
const edgeTypes2 = useMemo18(
|
|
13627
13673
|
() => ({
|
|
13628
13674
|
animated: AnimatedMessageEdge_default,
|
|
13629
13675
|
multiline: MultilineEdgeLabel_default,
|
|
@@ -13764,15 +13810,15 @@ var NodeGraphBuilder = ({
|
|
|
13764
13810
|
);
|
|
13765
13811
|
hoveredNodePeersRef.current = [];
|
|
13766
13812
|
}, []);
|
|
13767
|
-
const hasChannels =
|
|
13813
|
+
const hasChannels = useMemo18(
|
|
13768
13814
|
() => initialNodes.some((node) => node.type === "channels"),
|
|
13769
13815
|
[initialNodes]
|
|
13770
13816
|
);
|
|
13771
|
-
const hasMessages =
|
|
13817
|
+
const hasMessages = useMemo18(
|
|
13772
13818
|
() => initialNodes.some(isMessageNode),
|
|
13773
13819
|
[initialNodes]
|
|
13774
13820
|
);
|
|
13775
|
-
const isFlowGraph =
|
|
13821
|
+
const isFlowGraph = useMemo18(
|
|
13776
13822
|
() => initialEdges.some((edge) => edge.type === "flow-edge"),
|
|
13777
13823
|
[initialEdges]
|
|
13778
13824
|
);
|
|
@@ -13799,19 +13845,19 @@ var NodeGraphBuilder = ({
|
|
|
13799
13845
|
unlanedGraphRef.current = unlaned;
|
|
13800
13846
|
return layoutSwimlanes(unlaned, groupBy, { sizeOf: renderedSizeOf });
|
|
13801
13847
|
}, []);
|
|
13802
|
-
const hasLevels =
|
|
13848
|
+
const hasLevels = useMemo18(
|
|
13803
13849
|
() => initialNodes.some(
|
|
13804
13850
|
(node) => LEVEL_NODE_TYPES.includes(node.type || "")
|
|
13805
13851
|
),
|
|
13806
13852
|
[initialNodes]
|
|
13807
13853
|
);
|
|
13808
|
-
const isContextGraph =
|
|
13854
|
+
const isContextGraph = useMemo18(
|
|
13809
13855
|
() => initialNodes.every(
|
|
13810
13856
|
(node) => CONTEXT_NODE_TYPES.includes(node.type || "")
|
|
13811
13857
|
),
|
|
13812
13858
|
[initialNodes]
|
|
13813
13859
|
);
|
|
13814
|
-
const hasOtherDomains =
|
|
13860
|
+
const hasOtherDomains = useMemo18(
|
|
13815
13861
|
() => mode === "full" && initialNodes.some((node) => !!node.data?.otherDomain),
|
|
13816
13862
|
[initialNodes, mode]
|
|
13817
13863
|
);
|
|
@@ -13860,7 +13906,7 @@ var NodeGraphBuilder = ({
|
|
|
13860
13906
|
}),
|
|
13861
13907
|
[onShowOverview, getNodes, getEdges, getViewport]
|
|
13862
13908
|
);
|
|
13863
|
-
const levels =
|
|
13909
|
+
const levels = useMemo18(() => {
|
|
13864
13910
|
if (isFlowGraph) return [];
|
|
13865
13911
|
if (!overviewLabel && !isContextGraph && !hasLevels) return [];
|
|
13866
13912
|
const selectDetailLevel = (level) => {
|
|
@@ -13902,7 +13948,7 @@ var NodeGraphBuilder = ({
|
|
|
13902
13948
|
setDetailLevel,
|
|
13903
13949
|
switchGraph
|
|
13904
13950
|
]);
|
|
13905
|
-
const canvasTools =
|
|
13951
|
+
const canvasTools = useMemo18(
|
|
13906
13952
|
() => hasOtherDomains ? [
|
|
13907
13953
|
{
|
|
13908
13954
|
label: highlightCrossDomain ? "Stop highlighting cross-domain communication" : "Highlight cross-domain communication",
|
|
@@ -13929,7 +13975,7 @@ var NodeGraphBuilder = ({
|
|
|
13929
13975
|
walkthroughKeyRef.current = computedWalkthroughKey;
|
|
13930
13976
|
}
|
|
13931
13977
|
const walkthroughKey = walkthroughKeyRef.current;
|
|
13932
|
-
const { walkthroughNodes, walkthroughEdges } =
|
|
13978
|
+
const { walkthroughNodes, walkthroughEdges } = useMemo18(() => {
|
|
13933
13979
|
const wrapperNodeIds = new Set(
|
|
13934
13980
|
nodes.filter((n) => isExpandedWrapper(n.type) || isSwimlaneNode(n)).map((n) => n.id)
|
|
13935
13981
|
);
|
|
@@ -14760,12 +14806,12 @@ var NodeGraphBuilder = ({
|
|
|
14760
14806
|
legendKeyRef.current = computedLegendKey;
|
|
14761
14807
|
}
|
|
14762
14808
|
const legendKey = legendKeyRef.current;
|
|
14763
|
-
const graphLegend =
|
|
14809
|
+
const graphLegend = useMemo18(
|
|
14764
14810
|
() => getNodesByCollectionWithColors(nodes),
|
|
14765
14811
|
[getNodesByCollectionWithColors, legendKey]
|
|
14766
14812
|
);
|
|
14767
14813
|
const legendEntries = useRef9(null);
|
|
14768
|
-
const legend =
|
|
14814
|
+
const legend = useMemo18(() => {
|
|
14769
14815
|
legendEntries.current ?? (legendEntries.current = getNodesByCollectionWithColors(initialNodes));
|
|
14770
14816
|
Object.assign(legendEntries.current, graphLegend);
|
|
14771
14817
|
return Object.fromEntries(
|
|
@@ -14781,11 +14827,11 @@ var NodeGraphBuilder = ({
|
|
|
14781
14827
|
nodeIdsKeyRef.current = computedNodeIdsKey;
|
|
14782
14828
|
}
|
|
14783
14829
|
const nodeIdsKey = nodeIdsKeyRef.current;
|
|
14784
|
-
const searchNodes =
|
|
14830
|
+
const searchNodes = useMemo18(
|
|
14785
14831
|
() => nodes.filter((node) => !isSwimlaneNode(node)),
|
|
14786
14832
|
[nodeIdsKey]
|
|
14787
14833
|
);
|
|
14788
|
-
const allNoteGroups =
|
|
14834
|
+
const allNoteGroups = useMemo18(() => {
|
|
14789
14835
|
const groups = [];
|
|
14790
14836
|
for (const node of nodes) {
|
|
14791
14837
|
const result = getNotesFromNode(node);
|
|
@@ -14800,7 +14846,7 @@ var NodeGraphBuilder = ({
|
|
|
14800
14846
|
}
|
|
14801
14847
|
return groups;
|
|
14802
14848
|
}, [nodeIdsKey]);
|
|
14803
|
-
const totalNotesCount =
|
|
14849
|
+
const totalNotesCount = useMemo18(
|
|
14804
14850
|
() => allNoteGroups.reduce((sum, g) => sum + g.notes.length, 0),
|
|
14805
14851
|
[allNoteGroups]
|
|
14806
14852
|
);
|
|
@@ -14882,13 +14928,13 @@ var NodeGraphBuilder = ({
|
|
|
14882
14928
|
},
|
|
14883
14929
|
[setNodes, setEdges, resetNodesAndEdges, setViewport, storeApi]
|
|
14884
14930
|
);
|
|
14885
|
-
const swimlaneOptions =
|
|
14931
|
+
const swimlaneOptions = useMemo18(
|
|
14886
14932
|
() => isFlowGraph ? FLOW_GROUP_BYS.filter(
|
|
14887
14933
|
(groupBy) => hasSwimlanes(initialNodes, groupBy)
|
|
14888
14934
|
) : [],
|
|
14889
14935
|
[isFlowGraph, initialNodes]
|
|
14890
14936
|
);
|
|
14891
|
-
const swimlaneCounts =
|
|
14937
|
+
const swimlaneCounts = useMemo18(
|
|
14892
14938
|
() => Object.fromEntries(
|
|
14893
14939
|
swimlaneOptions.map((groupBy) => [
|
|
14894
14940
|
groupBy,
|
|
@@ -15659,6 +15705,7 @@ export {
|
|
|
15659
15705
|
DATA,
|
|
15660
15706
|
DataNode_default as Data,
|
|
15661
15707
|
DataProduct_default as DataProductNode,
|
|
15708
|
+
DomainCard_default as DomainCardNode,
|
|
15662
15709
|
Domain_default as DomainNode,
|
|
15663
15710
|
ENTITY_TARGET_HANDLE_ID,
|
|
15664
15711
|
EVENT,
|