@eventcatalog/visualiser 3.15.0 → 3.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1311 -1291
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +852 -825
- package/dist/index.mjs.map +1 -1
- package/dist/styles-core.css +3118 -149
- package/dist/styles.css +851 -844
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -96,16 +96,16 @@ __export(index_exports, {
|
|
|
96
96
|
module.exports = __toCommonJS(index_exports);
|
|
97
97
|
|
|
98
98
|
// src/components/NodeGraph.tsx
|
|
99
|
-
var
|
|
99
|
+
var import_react69 = require("react");
|
|
100
100
|
var import_react_dom = require("react-dom");
|
|
101
|
-
var
|
|
101
|
+
var import_react70 = require("@xyflow/react");
|
|
102
102
|
var import_style = require("@xyflow/react/dist/style.css");
|
|
103
103
|
var import_lucide_react25 = require("lucide-react");
|
|
104
104
|
var DropdownMenu2 = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
105
105
|
var import_html_to_image = require("html-to-image");
|
|
106
106
|
|
|
107
107
|
// src/nodes/service/ServiceNode.tsx
|
|
108
|
-
var
|
|
108
|
+
var import_react5 = require("react");
|
|
109
109
|
var import_lucide_react3 = require("lucide-react");
|
|
110
110
|
|
|
111
111
|
// src/nodes/OwnerIndicator.tsx
|
|
@@ -237,12 +237,23 @@ var OwnerIndicator = (0, import_react2.memo)(function OwnerIndicator2({
|
|
|
237
237
|
});
|
|
238
238
|
|
|
239
239
|
// src/nodes/service/ServiceNode.tsx
|
|
240
|
-
var
|
|
240
|
+
var import_react6 = require("@xyflow/react");
|
|
241
241
|
|
|
242
242
|
// src/nodes/NotesIndicator.tsx
|
|
243
243
|
var import_lucide_react2 = require("lucide-react");
|
|
244
|
-
var
|
|
244
|
+
var import_react4 = require("react");
|
|
245
245
|
var Dialog = __toESM(require("@radix-ui/react-dialog"));
|
|
246
|
+
|
|
247
|
+
// src/context/PortalContainerContext.tsx
|
|
248
|
+
var import_react3 = require("react");
|
|
249
|
+
var PortalContainerContext = (0, import_react3.createContext)(null);
|
|
250
|
+
var PortalContainerProvider = PortalContainerContext.Provider;
|
|
251
|
+
function usePortalContainer() {
|
|
252
|
+
const container = (0, import_react3.useContext)(PortalContainerContext);
|
|
253
|
+
return container ?? void 0;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// src/nodes/NotesIndicator.tsx
|
|
246
257
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
247
258
|
var AMBER = {
|
|
248
259
|
50: "#fffbeb",
|
|
@@ -517,282 +528,277 @@ function NotesModal({
|
|
|
517
528
|
icon
|
|
518
529
|
}) {
|
|
519
530
|
const isDark = useDarkMode();
|
|
531
|
+
const portalContainer = usePortalContainer();
|
|
520
532
|
const count = notes.length;
|
|
521
533
|
const urgent = notes.filter(
|
|
522
534
|
(n) => n.priority && (n.priority.toLowerCase() === "high" || n.priority.toLowerCase() === "critical")
|
|
523
535
|
);
|
|
524
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Dialog.Root, { open: isOpen, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
525
|
-
|
|
536
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Dialog.Root, { open: isOpen, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Dialog.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
537
|
+
"div",
|
|
526
538
|
{
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
"
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
539
|
+
className: "fixed inset-0 z-[99999]",
|
|
540
|
+
style: { isolation: "isolate" },
|
|
541
|
+
children: [
|
|
542
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
543
|
+
Dialog.Overlay,
|
|
544
|
+
{
|
|
545
|
+
style: {
|
|
546
|
+
position: "fixed",
|
|
547
|
+
inset: 0,
|
|
548
|
+
background: isDark ? "rgba(0, 0, 0, 0.7)" : "rgba(15, 23, 42, 0.55)",
|
|
549
|
+
backdropFilter: "blur(8px)"
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
),
|
|
553
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
554
|
+
Dialog.Content,
|
|
555
|
+
{
|
|
556
|
+
style: {
|
|
557
|
+
position: "fixed",
|
|
558
|
+
top: "50%",
|
|
559
|
+
left: "50%",
|
|
560
|
+
transform: "translate(-50%, -50%)",
|
|
561
|
+
width: "92vw",
|
|
562
|
+
maxWidth: 500,
|
|
563
|
+
maxHeight: "80vh",
|
|
564
|
+
background: isDark ? "#1e2330" : "#ffffff",
|
|
565
|
+
borderRadius: 16,
|
|
566
|
+
border: `1px solid ${isDark ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.08)"}`,
|
|
567
|
+
boxShadow: isDark ? "0 24px 48px rgba(0,0,0,0.5)" : "0 24px 48px rgba(0,0,0,0.15)",
|
|
568
|
+
display: "flex",
|
|
569
|
+
flexDirection: "column",
|
|
570
|
+
overflow: "hidden",
|
|
571
|
+
outline: "none"
|
|
572
|
+
},
|
|
573
|
+
children: [
|
|
574
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
575
|
+
"div",
|
|
576
|
+
{
|
|
577
|
+
style: {
|
|
578
|
+
padding: "20px 22px 16px",
|
|
579
|
+
borderBottom: `1px solid ${isDark ? "rgba(255,255,255,0.06)" : "rgba(0,0,0,0.06)"}`,
|
|
580
|
+
display: "flex",
|
|
581
|
+
alignItems: "center",
|
|
582
|
+
gap: 14
|
|
583
|
+
},
|
|
584
|
+
children: [
|
|
585
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
586
|
+
"div",
|
|
587
|
+
{
|
|
588
|
+
style: {
|
|
589
|
+
width: 36,
|
|
590
|
+
height: 36,
|
|
591
|
+
borderRadius: 10,
|
|
592
|
+
background: accentColor || `linear-gradient(135deg, ${AMBER[400]}, ${AMBER[500]})`,
|
|
593
|
+
display: "flex",
|
|
594
|
+
alignItems: "center",
|
|
595
|
+
justifyContent: "center",
|
|
596
|
+
flexShrink: 0
|
|
597
|
+
},
|
|
598
|
+
children: icon || /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
599
|
+
import_lucide_react2.MessageCircle,
|
|
579
600
|
{
|
|
580
|
-
style: {
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
601
|
+
style: { width: 18, height: 18, color: "white" },
|
|
602
|
+
strokeWidth: 2.5
|
|
603
|
+
}
|
|
604
|
+
)
|
|
605
|
+
}
|
|
606
|
+
),
|
|
607
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
608
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
609
|
+
Dialog.Title,
|
|
610
|
+
{
|
|
611
|
+
style: {
|
|
612
|
+
fontSize: 15,
|
|
613
|
+
fontWeight: 700,
|
|
614
|
+
color: isDark ? "#f1f5f9" : "#0f172a",
|
|
615
|
+
margin: 0,
|
|
616
|
+
lineHeight: 1.3,
|
|
617
|
+
letterSpacing: "-0.01em",
|
|
618
|
+
display: "flex",
|
|
619
|
+
alignItems: "baseline",
|
|
620
|
+
gap: 6
|
|
621
|
+
},
|
|
622
|
+
children: [
|
|
623
|
+
resourceName || "Notes",
|
|
624
|
+
resourceVersion && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
625
|
+
"span",
|
|
592
626
|
{
|
|
593
|
-
style: {
|
|
594
|
-
|
|
627
|
+
style: {
|
|
628
|
+
fontSize: 11,
|
|
629
|
+
fontWeight: 500,
|
|
630
|
+
color: isDark ? "#64748b" : "#94a3b8"
|
|
631
|
+
},
|
|
632
|
+
children: [
|
|
633
|
+
"v",
|
|
634
|
+
resourceVersion
|
|
635
|
+
]
|
|
595
636
|
}
|
|
596
637
|
)
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
638
|
+
]
|
|
639
|
+
}
|
|
640
|
+
),
|
|
641
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
642
|
+
Dialog.Description,
|
|
643
|
+
{
|
|
644
|
+
style: {
|
|
645
|
+
fontSize: 12,
|
|
646
|
+
color: isDark ? "#94a3b8" : "#64748b",
|
|
647
|
+
margin: 0,
|
|
648
|
+
marginTop: 3,
|
|
649
|
+
lineHeight: 1.3,
|
|
650
|
+
display: "flex",
|
|
651
|
+
alignItems: "center",
|
|
652
|
+
gap: 6
|
|
653
|
+
},
|
|
654
|
+
children: [
|
|
655
|
+
resourceType && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
656
|
+
"span",
|
|
657
|
+
{
|
|
658
|
+
style: {
|
|
659
|
+
fontSize: 10,
|
|
660
|
+
fontWeight: 700,
|
|
661
|
+
textTransform: "uppercase",
|
|
662
|
+
letterSpacing: "0.05em"
|
|
663
|
+
},
|
|
664
|
+
children: resourceType
|
|
665
|
+
}
|
|
666
|
+
),
|
|
667
|
+
resourceType && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { style: { opacity: 0.4 }, children: "\xB7" }),
|
|
668
|
+
count,
|
|
669
|
+
" note",
|
|
670
|
+
count !== 1 ? "s" : "",
|
|
671
|
+
urgent.length > 0 && ` \xB7 ${urgent.length} high priority`
|
|
672
|
+
]
|
|
673
|
+
}
|
|
674
|
+
)
|
|
675
|
+
] }),
|
|
676
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Dialog.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
677
|
+
"button",
|
|
678
|
+
{
|
|
679
|
+
"aria-label": "Close",
|
|
680
|
+
style: {
|
|
681
|
+
width: 32,
|
|
682
|
+
height: 32,
|
|
683
|
+
borderRadius: 8,
|
|
684
|
+
border: "none",
|
|
685
|
+
background: isDark ? "rgba(255,255,255,0.06)" : "rgba(0,0,0,0.04)",
|
|
686
|
+
display: "flex",
|
|
687
|
+
alignItems: "center",
|
|
688
|
+
justifyContent: "center",
|
|
689
|
+
cursor: "pointer",
|
|
690
|
+
color: isDark ? "#94a3b8" : "#94a3b8",
|
|
691
|
+
flexShrink: 0
|
|
692
|
+
},
|
|
693
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react2.XIcon, { style: { width: 16, height: 16 } })
|
|
694
|
+
}
|
|
695
|
+
) })
|
|
696
|
+
]
|
|
697
|
+
}
|
|
698
|
+
),
|
|
699
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
700
|
+
"div",
|
|
701
|
+
{
|
|
702
|
+
style: {
|
|
703
|
+
flex: 1,
|
|
704
|
+
overflowY: "auto",
|
|
705
|
+
padding: "16px 22px 24px",
|
|
706
|
+
display: "flex",
|
|
707
|
+
flexDirection: "column",
|
|
708
|
+
gap: 18
|
|
709
|
+
},
|
|
710
|
+
children: groupNotes(notes).map((group) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
|
|
711
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
712
|
+
"div",
|
|
713
|
+
{
|
|
714
|
+
style: {
|
|
715
|
+
display: "flex",
|
|
716
|
+
alignItems: "center",
|
|
717
|
+
gap: 8,
|
|
718
|
+
marginBottom: 10
|
|
719
|
+
},
|
|
720
|
+
children: [
|
|
721
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
722
|
+
"div",
|
|
602
723
|
{
|
|
603
724
|
style: {
|
|
604
|
-
|
|
725
|
+
width: 8,
|
|
726
|
+
height: 8,
|
|
727
|
+
borderRadius: "50%",
|
|
728
|
+
background: group.color,
|
|
729
|
+
flexShrink: 0
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
),
|
|
733
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
734
|
+
"span",
|
|
735
|
+
{
|
|
736
|
+
style: {
|
|
737
|
+
fontSize: 11,
|
|
605
738
|
fontWeight: 700,
|
|
606
|
-
color: isDark ? "#
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
letterSpacing: "-0.01em",
|
|
610
|
-
display: "flex",
|
|
611
|
-
alignItems: "baseline",
|
|
612
|
-
gap: 6
|
|
739
|
+
color: isDark ? "#94a3b8" : "#64748b",
|
|
740
|
+
textTransform: "uppercase",
|
|
741
|
+
letterSpacing: "0.06em"
|
|
613
742
|
},
|
|
614
|
-
children:
|
|
615
|
-
resourceName || "Notes",
|
|
616
|
-
resourceVersion && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
617
|
-
"span",
|
|
618
|
-
{
|
|
619
|
-
style: {
|
|
620
|
-
fontSize: 11,
|
|
621
|
-
fontWeight: 500,
|
|
622
|
-
color: isDark ? "#64748b" : "#94a3b8"
|
|
623
|
-
},
|
|
624
|
-
children: [
|
|
625
|
-
"v",
|
|
626
|
-
resourceVersion
|
|
627
|
-
]
|
|
628
|
-
}
|
|
629
|
-
)
|
|
630
|
-
]
|
|
743
|
+
children: group.label
|
|
631
744
|
}
|
|
632
745
|
),
|
|
633
746
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
634
|
-
|
|
747
|
+
"span",
|
|
635
748
|
{
|
|
636
749
|
style: {
|
|
637
|
-
fontSize:
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
marginTop: 3,
|
|
641
|
-
lineHeight: 1.3,
|
|
642
|
-
display: "flex",
|
|
643
|
-
alignItems: "center",
|
|
644
|
-
gap: 6
|
|
750
|
+
fontSize: 10,
|
|
751
|
+
fontWeight: 600,
|
|
752
|
+
color: isDark ? "#475569" : "#94a3b8"
|
|
645
753
|
},
|
|
646
754
|
children: [
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
style: {
|
|
651
|
-
fontSize: 10,
|
|
652
|
-
fontWeight: 700,
|
|
653
|
-
textTransform: "uppercase",
|
|
654
|
-
letterSpacing: "0.05em"
|
|
655
|
-
},
|
|
656
|
-
children: resourceType
|
|
657
|
-
}
|
|
658
|
-
),
|
|
659
|
-
resourceType && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { style: { opacity: 0.4 }, children: "\xB7" }),
|
|
660
|
-
count,
|
|
661
|
-
" note",
|
|
662
|
-
count !== 1 ? "s" : "",
|
|
663
|
-
urgent.length > 0 && ` \xB7 ${urgent.length} high priority`
|
|
755
|
+
"(",
|
|
756
|
+
group.notes.length,
|
|
757
|
+
")"
|
|
664
758
|
]
|
|
665
759
|
}
|
|
760
|
+
),
|
|
761
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
762
|
+
"div",
|
|
763
|
+
{
|
|
764
|
+
style: {
|
|
765
|
+
flex: 1,
|
|
766
|
+
height: 1,
|
|
767
|
+
background: isDark ? "rgba(255,255,255,0.06)" : "rgba(0,0,0,0.06)"
|
|
768
|
+
}
|
|
769
|
+
}
|
|
666
770
|
)
|
|
667
|
-
]
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
]
|
|
689
|
-
}
|
|
690
|
-
),
|
|
691
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
692
|
-
"div",
|
|
693
|
-
{
|
|
694
|
-
style: {
|
|
695
|
-
flex: 1,
|
|
696
|
-
overflowY: "auto",
|
|
697
|
-
padding: "16px 22px 24px",
|
|
698
|
-
display: "flex",
|
|
699
|
-
flexDirection: "column",
|
|
700
|
-
gap: 18
|
|
701
|
-
},
|
|
702
|
-
children: groupNotes(notes).map((group) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
|
|
703
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
704
|
-
"div",
|
|
705
|
-
{
|
|
706
|
-
style: {
|
|
707
|
-
display: "flex",
|
|
708
|
-
alignItems: "center",
|
|
709
|
-
gap: 8,
|
|
710
|
-
marginBottom: 10
|
|
711
|
-
},
|
|
712
|
-
children: [
|
|
713
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
714
|
-
"div",
|
|
715
|
-
{
|
|
716
|
-
style: {
|
|
717
|
-
width: 8,
|
|
718
|
-
height: 8,
|
|
719
|
-
borderRadius: "50%",
|
|
720
|
-
background: group.color,
|
|
721
|
-
flexShrink: 0
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
),
|
|
725
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
726
|
-
"span",
|
|
727
|
-
{
|
|
728
|
-
style: {
|
|
729
|
-
fontSize: 11,
|
|
730
|
-
fontWeight: 700,
|
|
731
|
-
color: isDark ? "#94a3b8" : "#64748b",
|
|
732
|
-
textTransform: "uppercase",
|
|
733
|
-
letterSpacing: "0.06em"
|
|
734
|
-
},
|
|
735
|
-
children: group.label
|
|
736
|
-
}
|
|
737
|
-
),
|
|
738
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
739
|
-
"span",
|
|
740
|
-
{
|
|
741
|
-
style: {
|
|
742
|
-
fontSize: 10,
|
|
743
|
-
fontWeight: 600,
|
|
744
|
-
color: isDark ? "#475569" : "#94a3b8"
|
|
745
|
-
},
|
|
746
|
-
children: [
|
|
747
|
-
"(",
|
|
748
|
-
group.notes.length,
|
|
749
|
-
")"
|
|
750
|
-
]
|
|
751
|
-
}
|
|
752
|
-
),
|
|
753
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
754
|
-
"div",
|
|
755
|
-
{
|
|
756
|
-
style: {
|
|
757
|
-
flex: 1,
|
|
758
|
-
height: 1,
|
|
759
|
-
background: isDark ? "rgba(255,255,255,0.06)" : "rgba(0,0,0,0.06)"
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
|
-
)
|
|
763
|
-
]
|
|
764
|
-
}
|
|
765
|
-
),
|
|
766
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
767
|
-
"div",
|
|
768
|
-
{
|
|
769
|
-
style: {
|
|
770
|
-
display: "flex",
|
|
771
|
-
flexDirection: "column",
|
|
772
|
-
gap: 16
|
|
773
|
-
},
|
|
774
|
-
children: group.notes.map((note, i) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(NoteCard, { note, isDark }, i))
|
|
775
|
-
}
|
|
776
|
-
)
|
|
777
|
-
] }, group.label))
|
|
778
|
-
}
|
|
779
|
-
)
|
|
780
|
-
]
|
|
781
|
-
}
|
|
782
|
-
)
|
|
783
|
-
]
|
|
784
|
-
}
|
|
785
|
-
)
|
|
771
|
+
]
|
|
772
|
+
}
|
|
773
|
+
),
|
|
774
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
775
|
+
"div",
|
|
776
|
+
{
|
|
777
|
+
style: {
|
|
778
|
+
display: "flex",
|
|
779
|
+
flexDirection: "column",
|
|
780
|
+
gap: 16
|
|
781
|
+
},
|
|
782
|
+
children: group.notes.map((note, i) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(NoteCard, { note, isDark }, i))
|
|
783
|
+
}
|
|
784
|
+
)
|
|
785
|
+
] }, group.label))
|
|
786
|
+
}
|
|
787
|
+
)
|
|
788
|
+
]
|
|
789
|
+
}
|
|
790
|
+
)
|
|
791
|
+
]
|
|
786
792
|
}
|
|
787
|
-
) });
|
|
793
|
+
) }) });
|
|
788
794
|
}
|
|
789
|
-
var NotesIndicator = (0,
|
|
795
|
+
var NotesIndicator = (0, import_react4.memo)(function NotesIndicator2({
|
|
790
796
|
notes,
|
|
791
797
|
resourceName
|
|
792
798
|
}) {
|
|
793
|
-
const [isHovered, setIsHovered] = (0,
|
|
794
|
-
const [isModalOpen, setIsModalOpen] = (0,
|
|
795
|
-
const handleClick = (0,
|
|
799
|
+
const [isHovered, setIsHovered] = (0, import_react4.useState)(false);
|
|
800
|
+
const [isModalOpen, setIsModalOpen] = (0, import_react4.useState)(false);
|
|
801
|
+
const handleClick = (0, import_react4.useCallback)((e) => {
|
|
796
802
|
e.stopPropagation();
|
|
797
803
|
setIsHovered(false);
|
|
798
804
|
setIsModalOpen(true);
|
|
@@ -1020,11 +1026,11 @@ function normalizeSpecTypes(specs) {
|
|
|
1020
1026
|
}
|
|
1021
1027
|
return Array.from(types);
|
|
1022
1028
|
}
|
|
1023
|
-
var SpecBadges = (0,
|
|
1029
|
+
var SpecBadges = (0, import_react5.memo)(function SpecBadges2({
|
|
1024
1030
|
specifications,
|
|
1025
1031
|
isDark
|
|
1026
1032
|
}) {
|
|
1027
|
-
const specTypes = (0,
|
|
1033
|
+
const specTypes = (0, import_react5.useMemo)(
|
|
1028
1034
|
() => normalizeSpecTypes(specifications),
|
|
1029
1035
|
[specifications]
|
|
1030
1036
|
);
|
|
@@ -1045,7 +1051,7 @@ var SpecBadges = (0, import_react4.memo)(function SpecBadges2({
|
|
|
1045
1051
|
);
|
|
1046
1052
|
}) });
|
|
1047
1053
|
});
|
|
1048
|
-
var MiniEnvelope = (0,
|
|
1054
|
+
var MiniEnvelope = (0, import_react5.memo)(function MiniEnvelope2({
|
|
1049
1055
|
side,
|
|
1050
1056
|
delay
|
|
1051
1057
|
}) {
|
|
@@ -1086,7 +1092,7 @@ var MiniEnvelope = (0, import_react4.memo)(function MiniEnvelope2({
|
|
|
1086
1092
|
}
|
|
1087
1093
|
);
|
|
1088
1094
|
});
|
|
1089
|
-
var ServiceMessageFlow = (0,
|
|
1095
|
+
var ServiceMessageFlow = (0, import_react5.memo)(function ServiceMessageFlow2({
|
|
1090
1096
|
side
|
|
1091
1097
|
}) {
|
|
1092
1098
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
@@ -1111,7 +1117,7 @@ var ServiceMessageFlow = (0, import_react4.memo)(function ServiceMessageFlow2({
|
|
|
1111
1117
|
}
|
|
1112
1118
|
);
|
|
1113
1119
|
});
|
|
1114
|
-
var GlowHandle = (0,
|
|
1120
|
+
var GlowHandle = (0, import_react5.memo)(function GlowHandle2({
|
|
1115
1121
|
side
|
|
1116
1122
|
}) {
|
|
1117
1123
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
@@ -1150,18 +1156,18 @@ function PostItService(props) {
|
|
|
1150
1156
|
),
|
|
1151
1157
|
children: [
|
|
1152
1158
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1153
|
-
|
|
1159
|
+
import_react6.Handle,
|
|
1154
1160
|
{
|
|
1155
1161
|
type: "target",
|
|
1156
|
-
position:
|
|
1162
|
+
position: import_react6.Position.Left,
|
|
1157
1163
|
style: HIDDEN_HANDLE_STYLE
|
|
1158
1164
|
}
|
|
1159
1165
|
),
|
|
1160
1166
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1161
|
-
|
|
1167
|
+
import_react6.Handle,
|
|
1162
1168
|
{
|
|
1163
1169
|
type: "source",
|
|
1164
|
-
position:
|
|
1170
|
+
position: import_react6.Position.Right,
|
|
1165
1171
|
style: HIDDEN_HANDLE_STYLE
|
|
1166
1172
|
}
|
|
1167
1173
|
),
|
|
@@ -1244,12 +1250,12 @@ function PostItService(props) {
|
|
|
1244
1250
|
function DefaultService(props) {
|
|
1245
1251
|
const { version, name, summary, deprecated, draft, notes, specifications } = props.data.service;
|
|
1246
1252
|
const mode = props.data.mode || "simple";
|
|
1247
|
-
const owners = (0,
|
|
1253
|
+
const owners = (0, import_react5.useMemo)(
|
|
1248
1254
|
() => normalizeOwners(props.data.service.owners),
|
|
1249
1255
|
[props.data.service.owners]
|
|
1250
1256
|
);
|
|
1251
|
-
const targetConnections = (0,
|
|
1252
|
-
const sourceConnections = (0,
|
|
1257
|
+
const targetConnections = (0, import_react6.useHandleConnections)({ type: "target" });
|
|
1258
|
+
const sourceConnections = (0, import_react6.useHandleConnections)({ type: "source" });
|
|
1253
1259
|
const isDark = useDarkMode();
|
|
1254
1260
|
const deprecatedStripe = isDark ? "rgba(239,68,68,0.25)" : "rgba(239,68,68,0.1)";
|
|
1255
1261
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
@@ -1266,18 +1272,18 @@ function DefaultService(props) {
|
|
|
1266
1272
|
},
|
|
1267
1273
|
children: [
|
|
1268
1274
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1269
|
-
|
|
1275
|
+
import_react6.Handle,
|
|
1270
1276
|
{
|
|
1271
1277
|
type: "target",
|
|
1272
|
-
position:
|
|
1278
|
+
position: import_react6.Position.Left,
|
|
1273
1279
|
style: HIDDEN_HANDLE_STYLE
|
|
1274
1280
|
}
|
|
1275
1281
|
),
|
|
1276
1282
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1277
|
-
|
|
1283
|
+
import_react6.Handle,
|
|
1278
1284
|
{
|
|
1279
1285
|
type: "source",
|
|
1280
|
-
position:
|
|
1286
|
+
position: import_react6.Position.Right,
|
|
1281
1287
|
style: HIDDEN_HANDLE_STYLE
|
|
1282
1288
|
}
|
|
1283
1289
|
),
|
|
@@ -1334,7 +1340,7 @@ function DefaultService(props) {
|
|
|
1334
1340
|
}
|
|
1335
1341
|
);
|
|
1336
1342
|
}
|
|
1337
|
-
var ServiceNode_default = (0,
|
|
1343
|
+
var ServiceNode_default = (0, import_react5.memo)(function Service(props) {
|
|
1338
1344
|
const nodeStyle = props?.data?.style;
|
|
1339
1345
|
if (nodeStyle === "post-it") {
|
|
1340
1346
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PostItService, { ...props });
|
|
@@ -1343,12 +1349,12 @@ var ServiceNode_default = (0, import_react4.memo)(function Service(props) {
|
|
|
1343
1349
|
});
|
|
1344
1350
|
|
|
1345
1351
|
// src/nodes/event/EventNode.tsx
|
|
1346
|
-
var
|
|
1352
|
+
var import_react8 = require("react");
|
|
1347
1353
|
var import_lucide_react4 = require("lucide-react");
|
|
1348
|
-
var
|
|
1354
|
+
var import_react9 = require("@xyflow/react");
|
|
1349
1355
|
|
|
1350
1356
|
// src/nodes/ApiInfo.tsx
|
|
1351
|
-
var
|
|
1357
|
+
var import_react7 = require("react");
|
|
1352
1358
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
1353
1359
|
var METHOD_COLORS = {
|
|
1354
1360
|
GET: { bg: "rgba(34,197,94,0.15)", text: "#22c55e" },
|
|
@@ -1369,7 +1375,7 @@ function getStatusColor(code) {
|
|
|
1369
1375
|
const prefix = String(code)[0];
|
|
1370
1376
|
return STATUS_COLORS[prefix] || STATUS_COLORS["2"];
|
|
1371
1377
|
}
|
|
1372
|
-
var MethodBadge = (0,
|
|
1378
|
+
var MethodBadge = (0, import_react7.memo)(function MethodBadge2({
|
|
1373
1379
|
method
|
|
1374
1380
|
}) {
|
|
1375
1381
|
const upper = method.toUpperCase();
|
|
@@ -1383,7 +1389,7 @@ var MethodBadge = (0, import_react6.memo)(function MethodBadge2({
|
|
|
1383
1389
|
}
|
|
1384
1390
|
);
|
|
1385
1391
|
});
|
|
1386
|
-
var StatusCodes = (0,
|
|
1392
|
+
var StatusCodes = (0, import_react7.memo)(function StatusCodes2({
|
|
1387
1393
|
codes
|
|
1388
1394
|
}) {
|
|
1389
1395
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex items-center gap-1 flex-wrap mt-1.5", children: codes.map((code) => {
|
|
@@ -1399,7 +1405,7 @@ var StatusCodes = (0, import_react6.memo)(function StatusCodes2({
|
|
|
1399
1405
|
);
|
|
1400
1406
|
}) });
|
|
1401
1407
|
});
|
|
1402
|
-
var ApiPath = (0,
|
|
1408
|
+
var ApiPath = (0, import_react7.memo)(function ApiPath2({ path }) {
|
|
1403
1409
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1404
1410
|
"span",
|
|
1405
1411
|
{
|
|
@@ -1412,7 +1418,7 @@ var ApiPath = (0, import_react6.memo)(function ApiPath2({ path }) {
|
|
|
1412
1418
|
|
|
1413
1419
|
// src/nodes/event/EventNode.tsx
|
|
1414
1420
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1415
|
-
var GlowHandle3 = (0,
|
|
1421
|
+
var GlowHandle3 = (0, import_react8.memo)(function GlowHandle4({
|
|
1416
1422
|
side
|
|
1417
1423
|
}) {
|
|
1418
1424
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
@@ -1450,18 +1456,18 @@ function PostItEvent(props) {
|
|
|
1450
1456
|
),
|
|
1451
1457
|
children: [
|
|
1452
1458
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1453
|
-
|
|
1459
|
+
import_react9.Handle,
|
|
1454
1460
|
{
|
|
1455
1461
|
type: "target",
|
|
1456
|
-
position:
|
|
1462
|
+
position: import_react9.Position.Left,
|
|
1457
1463
|
style: HIDDEN_HANDLE_STYLE
|
|
1458
1464
|
}
|
|
1459
1465
|
),
|
|
1460
1466
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1461
|
-
|
|
1467
|
+
import_react9.Handle,
|
|
1462
1468
|
{
|
|
1463
1469
|
type: "source",
|
|
1464
|
-
position:
|
|
1470
|
+
position: import_react9.Position.Right,
|
|
1465
1471
|
style: HIDDEN_HANDLE_STYLE
|
|
1466
1472
|
}
|
|
1467
1473
|
),
|
|
@@ -1549,12 +1555,12 @@ function DefaultEvent(props) {
|
|
|
1549
1555
|
} = props?.data?.message;
|
|
1550
1556
|
const mode = props?.data?.mode || "simple";
|
|
1551
1557
|
const hasApiInfo = !!(method || path);
|
|
1552
|
-
const owners = (0,
|
|
1558
|
+
const owners = (0, import_react8.useMemo)(
|
|
1553
1559
|
() => normalizeOwners(props?.data?.message?.owners),
|
|
1554
1560
|
[props?.data?.message?.owners]
|
|
1555
1561
|
);
|
|
1556
|
-
const targetConnections = (0,
|
|
1557
|
-
const sourceConnections = (0,
|
|
1562
|
+
const targetConnections = (0, import_react9.useHandleConnections)({ type: "target" });
|
|
1563
|
+
const sourceConnections = (0, import_react9.useHandleConnections)({ type: "source" });
|
|
1558
1564
|
const isDark = useDarkMode();
|
|
1559
1565
|
const deprecatedStripe = isDark ? "rgba(239,68,68,0.25)" : "rgba(239,68,68,0.1)";
|
|
1560
1566
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
@@ -1571,18 +1577,18 @@ function DefaultEvent(props) {
|
|
|
1571
1577
|
},
|
|
1572
1578
|
children: [
|
|
1573
1579
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1574
|
-
|
|
1580
|
+
import_react9.Handle,
|
|
1575
1581
|
{
|
|
1576
1582
|
type: "target",
|
|
1577
|
-
position:
|
|
1583
|
+
position: import_react9.Position.Left,
|
|
1578
1584
|
style: HIDDEN_HANDLE_STYLE
|
|
1579
1585
|
}
|
|
1580
1586
|
),
|
|
1581
1587
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1582
|
-
|
|
1588
|
+
import_react9.Handle,
|
|
1583
1589
|
{
|
|
1584
1590
|
type: "source",
|
|
1585
|
-
position:
|
|
1591
|
+
position: import_react9.Position.Right,
|
|
1586
1592
|
style: HIDDEN_HANDLE_STYLE
|
|
1587
1593
|
}
|
|
1588
1594
|
),
|
|
@@ -1661,7 +1667,7 @@ function DefaultEvent(props) {
|
|
|
1661
1667
|
}
|
|
1662
1668
|
);
|
|
1663
1669
|
}
|
|
1664
|
-
var EventNode_default = (0,
|
|
1670
|
+
var EventNode_default = (0, import_react8.memo)(function Event(props) {
|
|
1665
1671
|
const nodeStyle = props?.data?.style;
|
|
1666
1672
|
if (nodeStyle === "post-it") {
|
|
1667
1673
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PostItEvent, { ...props });
|
|
@@ -1670,7 +1676,7 @@ var EventNode_default = (0, import_react7.memo)(function Event(props) {
|
|
|
1670
1676
|
});
|
|
1671
1677
|
|
|
1672
1678
|
// src/nodes/event/config.ts
|
|
1673
|
-
var
|
|
1679
|
+
var import_react10 = require("@xyflow/react");
|
|
1674
1680
|
var import_lucide_react5 = require("lucide-react");
|
|
1675
1681
|
|
|
1676
1682
|
// src/nodes/node-types.ts
|
|
@@ -1698,12 +1704,12 @@ var config_default = {
|
|
|
1698
1704
|
if (EVENT.includes(connection.source) && SERVICE.includes(connection.target)) {
|
|
1699
1705
|
return {
|
|
1700
1706
|
label: "Publishes",
|
|
1701
|
-
markerEnd: { type:
|
|
1707
|
+
markerEnd: { type: import_react10.MarkerType.ArrowClosed, color: "#000000" }
|
|
1702
1708
|
};
|
|
1703
1709
|
}
|
|
1704
1710
|
return {
|
|
1705
1711
|
label: "Subscribes",
|
|
1706
|
-
markerEnd: { type:
|
|
1712
|
+
markerEnd: { type: import_react10.MarkerType.ArrowClosed, color: "#000000" }
|
|
1707
1713
|
};
|
|
1708
1714
|
},
|
|
1709
1715
|
defaultData: {
|
|
@@ -1744,11 +1750,11 @@ var config_default = {
|
|
|
1744
1750
|
};
|
|
1745
1751
|
|
|
1746
1752
|
// src/nodes/query/QueryNode.tsx
|
|
1747
|
-
var
|
|
1753
|
+
var import_react11 = require("react");
|
|
1748
1754
|
var import_lucide_react6 = require("lucide-react");
|
|
1749
|
-
var
|
|
1755
|
+
var import_react12 = require("@xyflow/react");
|
|
1750
1756
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1751
|
-
var GlowHandle5 = (0,
|
|
1757
|
+
var GlowHandle5 = (0, import_react11.memo)(function GlowHandle6({
|
|
1752
1758
|
side
|
|
1753
1759
|
}) {
|
|
1754
1760
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -1786,18 +1792,18 @@ function PostItQuery(props) {
|
|
|
1786
1792
|
),
|
|
1787
1793
|
children: [
|
|
1788
1794
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1789
|
-
|
|
1795
|
+
import_react12.Handle,
|
|
1790
1796
|
{
|
|
1791
1797
|
type: "target",
|
|
1792
|
-
position:
|
|
1798
|
+
position: import_react12.Position.Left,
|
|
1793
1799
|
style: HIDDEN_HANDLE_STYLE
|
|
1794
1800
|
}
|
|
1795
1801
|
),
|
|
1796
1802
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1797
|
-
|
|
1803
|
+
import_react12.Handle,
|
|
1798
1804
|
{
|
|
1799
1805
|
type: "source",
|
|
1800
|
-
position:
|
|
1806
|
+
position: import_react12.Position.Right,
|
|
1801
1807
|
style: HIDDEN_HANDLE_STYLE
|
|
1802
1808
|
}
|
|
1803
1809
|
),
|
|
@@ -1885,12 +1891,12 @@ function DefaultQuery(props) {
|
|
|
1885
1891
|
} = props.data.message;
|
|
1886
1892
|
const mode = props.data.mode || "simple";
|
|
1887
1893
|
const hasApiInfo = !!(method || path);
|
|
1888
|
-
const owners = (0,
|
|
1894
|
+
const owners = (0, import_react11.useMemo)(
|
|
1889
1895
|
() => normalizeOwners(props.data.message?.owners),
|
|
1890
1896
|
[props.data.message?.owners]
|
|
1891
1897
|
);
|
|
1892
|
-
const targetConnections = (0,
|
|
1893
|
-
const sourceConnections = (0,
|
|
1898
|
+
const targetConnections = (0, import_react12.useHandleConnections)({ type: "target" });
|
|
1899
|
+
const sourceConnections = (0, import_react12.useHandleConnections)({ type: "source" });
|
|
1894
1900
|
const isDark = useDarkMode();
|
|
1895
1901
|
const deprecatedStripe = isDark ? "rgba(239,68,68,0.25)" : "rgba(239,68,68,0.1)";
|
|
1896
1902
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
@@ -1907,18 +1913,18 @@ function DefaultQuery(props) {
|
|
|
1907
1913
|
},
|
|
1908
1914
|
children: [
|
|
1909
1915
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1910
|
-
|
|
1916
|
+
import_react12.Handle,
|
|
1911
1917
|
{
|
|
1912
1918
|
type: "target",
|
|
1913
|
-
position:
|
|
1919
|
+
position: import_react12.Position.Left,
|
|
1914
1920
|
style: HIDDEN_HANDLE_STYLE
|
|
1915
1921
|
}
|
|
1916
1922
|
),
|
|
1917
1923
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1918
|
-
|
|
1924
|
+
import_react12.Handle,
|
|
1919
1925
|
{
|
|
1920
1926
|
type: "source",
|
|
1921
|
-
position:
|
|
1927
|
+
position: import_react12.Position.Right,
|
|
1922
1928
|
style: HIDDEN_HANDLE_STYLE
|
|
1923
1929
|
}
|
|
1924
1930
|
),
|
|
@@ -1985,7 +1991,7 @@ function DefaultQuery(props) {
|
|
|
1985
1991
|
}
|
|
1986
1992
|
);
|
|
1987
1993
|
}
|
|
1988
|
-
var QueryNode_default = (0,
|
|
1994
|
+
var QueryNode_default = (0, import_react11.memo)(function Query(props) {
|
|
1989
1995
|
const nodeStyle = props?.data?.style;
|
|
1990
1996
|
if (nodeStyle === "post-it") {
|
|
1991
1997
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PostItQuery, { ...props });
|
|
@@ -1994,11 +2000,11 @@ var QueryNode_default = (0, import_react10.memo)(function Query(props) {
|
|
|
1994
2000
|
});
|
|
1995
2001
|
|
|
1996
2002
|
// src/nodes/command/CommandNode.tsx
|
|
1997
|
-
var
|
|
2003
|
+
var import_react13 = require("react");
|
|
1998
2004
|
var import_lucide_react7 = require("lucide-react");
|
|
1999
|
-
var
|
|
2005
|
+
var import_react14 = require("@xyflow/react");
|
|
2000
2006
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
2001
|
-
var GlowHandle7 = (0,
|
|
2007
|
+
var GlowHandle7 = (0, import_react13.memo)(function GlowHandle8({
|
|
2002
2008
|
side
|
|
2003
2009
|
}) {
|
|
2004
2010
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
@@ -2036,18 +2042,18 @@ function PostItCommand(props) {
|
|
|
2036
2042
|
),
|
|
2037
2043
|
children: [
|
|
2038
2044
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2039
|
-
|
|
2045
|
+
import_react14.Handle,
|
|
2040
2046
|
{
|
|
2041
2047
|
type: "target",
|
|
2042
|
-
position:
|
|
2048
|
+
position: import_react14.Position.Left,
|
|
2043
2049
|
style: HIDDEN_HANDLE_STYLE
|
|
2044
2050
|
}
|
|
2045
2051
|
),
|
|
2046
2052
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2047
|
-
|
|
2053
|
+
import_react14.Handle,
|
|
2048
2054
|
{
|
|
2049
2055
|
type: "source",
|
|
2050
|
-
position:
|
|
2056
|
+
position: import_react14.Position.Right,
|
|
2051
2057
|
style: HIDDEN_HANDLE_STYLE
|
|
2052
2058
|
}
|
|
2053
2059
|
),
|
|
@@ -2141,12 +2147,12 @@ function DefaultCommand(props) {
|
|
|
2141
2147
|
} = props.data.message;
|
|
2142
2148
|
const mode = props.data.mode || "simple";
|
|
2143
2149
|
const hasApiInfo = !!(method || path);
|
|
2144
|
-
const owners = (0,
|
|
2150
|
+
const owners = (0, import_react13.useMemo)(
|
|
2145
2151
|
() => normalizeOwners(props.data.message?.owners),
|
|
2146
2152
|
[props.data.message?.owners]
|
|
2147
2153
|
);
|
|
2148
|
-
const targetConnections = (0,
|
|
2149
|
-
const sourceConnections = (0,
|
|
2154
|
+
const targetConnections = (0, import_react14.useHandleConnections)({ type: "target" });
|
|
2155
|
+
const sourceConnections = (0, import_react14.useHandleConnections)({ type: "source" });
|
|
2150
2156
|
const isDark = useDarkMode();
|
|
2151
2157
|
const deprecatedStripe = isDark ? "rgba(239,68,68,0.25)" : "rgba(239,68,68,0.1)";
|
|
2152
2158
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
@@ -2163,18 +2169,18 @@ function DefaultCommand(props) {
|
|
|
2163
2169
|
},
|
|
2164
2170
|
children: [
|
|
2165
2171
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2166
|
-
|
|
2172
|
+
import_react14.Handle,
|
|
2167
2173
|
{
|
|
2168
2174
|
type: "target",
|
|
2169
|
-
position:
|
|
2175
|
+
position: import_react14.Position.Left,
|
|
2170
2176
|
style: HIDDEN_HANDLE_STYLE
|
|
2171
2177
|
}
|
|
2172
2178
|
),
|
|
2173
2179
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2174
|
-
|
|
2180
|
+
import_react14.Handle,
|
|
2175
2181
|
{
|
|
2176
2182
|
type: "source",
|
|
2177
|
-
position:
|
|
2183
|
+
position: import_react14.Position.Right,
|
|
2178
2184
|
style: HIDDEN_HANDLE_STYLE
|
|
2179
2185
|
}
|
|
2180
2186
|
),
|
|
@@ -2241,7 +2247,7 @@ function DefaultCommand(props) {
|
|
|
2241
2247
|
}
|
|
2242
2248
|
);
|
|
2243
2249
|
}
|
|
2244
|
-
var CommandNode_default = (0,
|
|
2250
|
+
var CommandNode_default = (0, import_react13.memo)(function Command(props) {
|
|
2245
2251
|
const nodeStyle = props?.data?.style;
|
|
2246
2252
|
if (nodeStyle === "post-it") {
|
|
2247
2253
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(PostItCommand, { ...props });
|
|
@@ -2251,8 +2257,8 @@ var CommandNode_default = (0, import_react12.memo)(function Command(props) {
|
|
|
2251
2257
|
|
|
2252
2258
|
// src/nodes/channel/ChannelNode.tsx
|
|
2253
2259
|
var import_lucide_react8 = require("lucide-react");
|
|
2254
|
-
var
|
|
2255
|
-
var
|
|
2260
|
+
var import_react15 = require("@xyflow/react");
|
|
2261
|
+
var import_react16 = require("react");
|
|
2256
2262
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
2257
2263
|
var DELIVERY_GUARANTEE_LABELS = {
|
|
2258
2264
|
"at-most-once": "At most once",
|
|
@@ -2357,18 +2363,18 @@ function PostItChannel(props) {
|
|
|
2357
2363
|
),
|
|
2358
2364
|
children: [
|
|
2359
2365
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2360
|
-
|
|
2366
|
+
import_react15.Handle,
|
|
2361
2367
|
{
|
|
2362
2368
|
type: "target",
|
|
2363
|
-
position:
|
|
2369
|
+
position: import_react15.Position.Left,
|
|
2364
2370
|
style: HIDDEN_HANDLE_STYLE
|
|
2365
2371
|
}
|
|
2366
2372
|
),
|
|
2367
2373
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2368
|
-
|
|
2374
|
+
import_react15.Handle,
|
|
2369
2375
|
{
|
|
2370
2376
|
type: "source",
|
|
2371
|
-
position:
|
|
2377
|
+
position: import_react15.Position.Right,
|
|
2372
2378
|
style: HIDDEN_HANDLE_STYLE
|
|
2373
2379
|
}
|
|
2374
2380
|
),
|
|
@@ -2482,12 +2488,12 @@ function DefaultChannel(props) {
|
|
|
2482
2488
|
deliveryGuarantee
|
|
2483
2489
|
} = data.channel;
|
|
2484
2490
|
const mode = props.data.mode || "simple";
|
|
2485
|
-
const owners = (0,
|
|
2491
|
+
const owners = (0, import_react16.useMemo)(
|
|
2486
2492
|
() => normalizeOwners(data.channel?.owners),
|
|
2487
2493
|
[data.channel?.owners]
|
|
2488
2494
|
);
|
|
2489
|
-
const sourceConnections = (0,
|
|
2490
|
-
const targetConnections = (0,
|
|
2495
|
+
const sourceConnections = (0, import_react15.useHandleConnections)({ type: "source" });
|
|
2496
|
+
const targetConnections = (0, import_react15.useHandleConnections)({ type: "target" });
|
|
2491
2497
|
const isDark = useDarkMode();
|
|
2492
2498
|
const deprecatedStripe = isDark ? "rgba(239,68,68,0.25)" : "rgba(239,68,68,0.1)";
|
|
2493
2499
|
const guarantee = getGuarantee(deliveryGuarantee);
|
|
@@ -2505,18 +2511,18 @@ function DefaultChannel(props) {
|
|
|
2505
2511
|
},
|
|
2506
2512
|
children: [
|
|
2507
2513
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2508
|
-
|
|
2514
|
+
import_react15.Handle,
|
|
2509
2515
|
{
|
|
2510
2516
|
type: "target",
|
|
2511
|
-
position:
|
|
2517
|
+
position: import_react15.Position.Left,
|
|
2512
2518
|
style: HIDDEN_HANDLE_STYLE
|
|
2513
2519
|
}
|
|
2514
2520
|
),
|
|
2515
2521
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2516
|
-
|
|
2522
|
+
import_react15.Handle,
|
|
2517
2523
|
{
|
|
2518
2524
|
type: "source",
|
|
2519
|
-
position:
|
|
2525
|
+
position: import_react15.Position.Right,
|
|
2520
2526
|
style: HIDDEN_HANDLE_STYLE
|
|
2521
2527
|
}
|
|
2522
2528
|
),
|
|
@@ -2610,7 +2616,7 @@ function DefaultChannel(props) {
|
|
|
2610
2616
|
}
|
|
2611
2617
|
);
|
|
2612
2618
|
}
|
|
2613
|
-
var ChannelNode_default = (0,
|
|
2619
|
+
var ChannelNode_default = (0, import_react16.memo)(function Channel(props) {
|
|
2614
2620
|
const nodeStyle = props?.data?.style;
|
|
2615
2621
|
if (nodeStyle === "post-it") {
|
|
2616
2622
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PostItChannel, { ...props });
|
|
@@ -2619,9 +2625,9 @@ var ChannelNode_default = (0, import_react15.memo)(function Channel(props) {
|
|
|
2619
2625
|
});
|
|
2620
2626
|
|
|
2621
2627
|
// src/nodes/data/DataNode.tsx
|
|
2622
|
-
var
|
|
2628
|
+
var import_react17 = require("react");
|
|
2623
2629
|
var import_lucide_react9 = require("lucide-react");
|
|
2624
|
-
var
|
|
2630
|
+
var import_react18 = require("@xyflow/react");
|
|
2625
2631
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
2626
2632
|
function GlowHandle10({ side }) {
|
|
2627
2633
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
@@ -2669,18 +2675,18 @@ function PostItData(props) {
|
|
|
2669
2675
|
),
|
|
2670
2676
|
children: [
|
|
2671
2677
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2672
|
-
|
|
2678
|
+
import_react18.Handle,
|
|
2673
2679
|
{
|
|
2674
2680
|
type: "target",
|
|
2675
|
-
position:
|
|
2681
|
+
position: import_react18.Position.Left,
|
|
2676
2682
|
style: HIDDEN_HANDLE_STYLE
|
|
2677
2683
|
}
|
|
2678
2684
|
),
|
|
2679
2685
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2680
|
-
|
|
2686
|
+
import_react18.Handle,
|
|
2681
2687
|
{
|
|
2682
2688
|
type: "source",
|
|
2683
|
-
position:
|
|
2689
|
+
position: import_react18.Position.Right,
|
|
2684
2690
|
style: HIDDEN_HANDLE_STYLE
|
|
2685
2691
|
}
|
|
2686
2692
|
),
|
|
@@ -2766,9 +2772,9 @@ function DefaultData(props) {
|
|
|
2766
2772
|
notes
|
|
2767
2773
|
} = props.data.data;
|
|
2768
2774
|
const mode = props.data.mode || "simple";
|
|
2769
|
-
const ownersNormalized = (0,
|
|
2770
|
-
const targetConnections = (0,
|
|
2771
|
-
const sourceConnections = (0,
|
|
2775
|
+
const ownersNormalized = (0, import_react17.useMemo)(() => normalizeOwners(owners), [owners]);
|
|
2776
|
+
const targetConnections = (0, import_react18.useHandleConnections)({ type: "target" });
|
|
2777
|
+
const sourceConnections = (0, import_react18.useHandleConnections)({ type: "source" });
|
|
2772
2778
|
const isDark = useDarkMode();
|
|
2773
2779
|
const deprecatedStripe = isDark ? "rgba(239,68,68,0.25)" : "rgba(239,68,68,0.1)";
|
|
2774
2780
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
@@ -2785,18 +2791,18 @@ function DefaultData(props) {
|
|
|
2785
2791
|
},
|
|
2786
2792
|
children: [
|
|
2787
2793
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2788
|
-
|
|
2794
|
+
import_react18.Handle,
|
|
2789
2795
|
{
|
|
2790
2796
|
type: "target",
|
|
2791
|
-
position:
|
|
2797
|
+
position: import_react18.Position.Left,
|
|
2792
2798
|
style: HIDDEN_HANDLE_STYLE
|
|
2793
2799
|
}
|
|
2794
2800
|
),
|
|
2795
2801
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2796
|
-
|
|
2802
|
+
import_react18.Handle,
|
|
2797
2803
|
{
|
|
2798
2804
|
type: "source",
|
|
2799
|
-
position:
|
|
2805
|
+
position: import_react18.Position.Right,
|
|
2800
2806
|
style: HIDDEN_HANDLE_STYLE
|
|
2801
2807
|
}
|
|
2802
2808
|
),
|
|
@@ -2858,7 +2864,7 @@ function DefaultData(props) {
|
|
|
2858
2864
|
}
|
|
2859
2865
|
);
|
|
2860
2866
|
}
|
|
2861
|
-
var DataNode_default = (0,
|
|
2867
|
+
var DataNode_default = (0, import_react17.memo)(function Data(props) {
|
|
2862
2868
|
const nodeStyle = props?.data?.style;
|
|
2863
2869
|
if (nodeStyle === "post-it") {
|
|
2864
2870
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(PostItData, { ...props });
|
|
@@ -2867,7 +2873,7 @@ var DataNode_default = (0, import_react16.memo)(function Data(props) {
|
|
|
2867
2873
|
});
|
|
2868
2874
|
|
|
2869
2875
|
// src/nodes/data/config.ts
|
|
2870
|
-
var
|
|
2876
|
+
var import_react19 = require("@xyflow/react");
|
|
2871
2877
|
var import_lucide_react10 = require("lucide-react");
|
|
2872
2878
|
var config_default2 = {
|
|
2873
2879
|
type: "data",
|
|
@@ -2882,18 +2888,18 @@ var config_default2 = {
|
|
|
2882
2888
|
if (connection.source === "data" && connection.target === "service") {
|
|
2883
2889
|
return {
|
|
2884
2890
|
label: "Provides data to",
|
|
2885
|
-
markerEnd: { type:
|
|
2891
|
+
markerEnd: { type: import_react19.MarkerType.ArrowClosed, color: "#000000" }
|
|
2886
2892
|
};
|
|
2887
2893
|
}
|
|
2888
2894
|
if (connection.source === "service" && connection.target === "data") {
|
|
2889
2895
|
return {
|
|
2890
2896
|
label: "Stores data in",
|
|
2891
|
-
markerEnd: { type:
|
|
2897
|
+
markerEnd: { type: import_react19.MarkerType.ArrowClosed, color: "#000000" }
|
|
2892
2898
|
};
|
|
2893
2899
|
}
|
|
2894
2900
|
return {
|
|
2895
2901
|
label: "Connected to",
|
|
2896
|
-
markerEnd: { type:
|
|
2902
|
+
markerEnd: { type: import_react19.MarkerType.ArrowClosed, color: "#000000" }
|
|
2897
2903
|
};
|
|
2898
2904
|
},
|
|
2899
2905
|
defaultData: {
|
|
@@ -2949,14 +2955,14 @@ var config_default2 = {
|
|
|
2949
2955
|
};
|
|
2950
2956
|
|
|
2951
2957
|
// src/nodes/view/ViewNode.tsx
|
|
2952
|
-
var
|
|
2958
|
+
var import_react20 = require("react");
|
|
2953
2959
|
var import_lucide_react11 = require("lucide-react");
|
|
2954
|
-
var
|
|
2960
|
+
var import_react21 = require("@xyflow/react");
|
|
2955
2961
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
2956
2962
|
function classNames7(...classes) {
|
|
2957
2963
|
return classes.filter(Boolean).join(" ");
|
|
2958
2964
|
}
|
|
2959
|
-
var ViewNode_default = (0,
|
|
2965
|
+
var ViewNode_default = (0, import_react20.memo)(function View(props) {
|
|
2960
2966
|
const { data: _data, selected } = props;
|
|
2961
2967
|
const { name, summary, screenshot } = props.data.view;
|
|
2962
2968
|
const mode = props.data.mode || "simple";
|
|
@@ -2971,18 +2977,18 @@ var ViewNode_default = (0, import_react19.memo)(function View(props) {
|
|
|
2971
2977
|
style: NODE_WIDTH_STYLE,
|
|
2972
2978
|
children: [
|
|
2973
2979
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2974
|
-
|
|
2980
|
+
import_react21.Handle,
|
|
2975
2981
|
{
|
|
2976
2982
|
type: "target",
|
|
2977
|
-
position:
|
|
2983
|
+
position: import_react21.Position.Left,
|
|
2978
2984
|
className: "!left-[-1px] !w-2.5 !h-2.5 !bg-blue-500 !border !border-blue-600 !rounded-full !z-10"
|
|
2979
2985
|
}
|
|
2980
2986
|
),
|
|
2981
2987
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2982
|
-
|
|
2988
|
+
import_react21.Handle,
|
|
2983
2989
|
{
|
|
2984
2990
|
type: "source",
|
|
2985
|
-
position:
|
|
2991
|
+
position: import_react21.Position.Right,
|
|
2986
2992
|
className: "!right-[-1px] !w-2.5 !h-2.5 !bg-blue-500 !border !border-blue-600 !rounded-full !z-10"
|
|
2987
2993
|
}
|
|
2988
2994
|
),
|
|
@@ -3037,9 +3043,9 @@ var ViewNode_default = (0, import_react19.memo)(function View(props) {
|
|
|
3037
3043
|
});
|
|
3038
3044
|
|
|
3039
3045
|
// src/nodes/actor/ActorNode.tsx
|
|
3040
|
-
var
|
|
3046
|
+
var import_react22 = require("react");
|
|
3041
3047
|
var import_lucide_react12 = require("lucide-react");
|
|
3042
|
-
var
|
|
3048
|
+
var import_react23 = require("@xyflow/react");
|
|
3043
3049
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
3044
3050
|
function GlowHandle11({ side }) {
|
|
3045
3051
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
@@ -3077,18 +3083,18 @@ function PostItActor(props) {
|
|
|
3077
3083
|
),
|
|
3078
3084
|
children: [
|
|
3079
3085
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3080
|
-
|
|
3086
|
+
import_react23.Handle,
|
|
3081
3087
|
{
|
|
3082
3088
|
type: "target",
|
|
3083
|
-
position:
|
|
3089
|
+
position: import_react23.Position.Left,
|
|
3084
3090
|
style: HIDDEN_HANDLE_STYLE
|
|
3085
3091
|
}
|
|
3086
3092
|
),
|
|
3087
3093
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3088
|
-
|
|
3094
|
+
import_react23.Handle,
|
|
3089
3095
|
{
|
|
3090
3096
|
type: "source",
|
|
3091
|
-
position:
|
|
3097
|
+
position: import_react23.Position.Right,
|
|
3092
3098
|
style: HIDDEN_HANDLE_STYLE
|
|
3093
3099
|
}
|
|
3094
3100
|
),
|
|
@@ -3160,8 +3166,8 @@ function PostItActor(props) {
|
|
|
3160
3166
|
function DefaultActor(props) {
|
|
3161
3167
|
const { name, summary, deprecated, draft, notes } = props?.data;
|
|
3162
3168
|
const mode = props?.data?.mode || "simple";
|
|
3163
|
-
const targetConnections = (0,
|
|
3164
|
-
const sourceConnections = (0,
|
|
3169
|
+
const targetConnections = (0, import_react23.useHandleConnections)({ type: "target" });
|
|
3170
|
+
const sourceConnections = (0, import_react23.useHandleConnections)({ type: "source" });
|
|
3165
3171
|
const isDark = useDarkMode();
|
|
3166
3172
|
const deprecatedStripe = isDark ? "rgba(239,68,68,0.25)" : "rgba(239,68,68,0.1)";
|
|
3167
3173
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
@@ -3178,18 +3184,18 @@ function DefaultActor(props) {
|
|
|
3178
3184
|
},
|
|
3179
3185
|
children: [
|
|
3180
3186
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3181
|
-
|
|
3187
|
+
import_react23.Handle,
|
|
3182
3188
|
{
|
|
3183
3189
|
type: "target",
|
|
3184
|
-
position:
|
|
3190
|
+
position: import_react23.Position.Left,
|
|
3185
3191
|
style: HIDDEN_HANDLE_STYLE
|
|
3186
3192
|
}
|
|
3187
3193
|
),
|
|
3188
3194
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3189
|
-
|
|
3195
|
+
import_react23.Handle,
|
|
3190
3196
|
{
|
|
3191
3197
|
type: "source",
|
|
3192
|
-
position:
|
|
3198
|
+
position: import_react23.Position.Right,
|
|
3193
3199
|
style: HIDDEN_HANDLE_STYLE
|
|
3194
3200
|
}
|
|
3195
3201
|
),
|
|
@@ -3227,7 +3233,7 @@ function DefaultActor(props) {
|
|
|
3227
3233
|
}
|
|
3228
3234
|
);
|
|
3229
3235
|
}
|
|
3230
|
-
var ActorNode_default = (0,
|
|
3236
|
+
var ActorNode_default = (0, import_react22.memo)(function Actor(props) {
|
|
3231
3237
|
const nodeStyle = props?.data?.style;
|
|
3232
3238
|
if (nodeStyle === "post-it") {
|
|
3233
3239
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PostItActor, { ...props });
|
|
@@ -3236,7 +3242,7 @@ var ActorNode_default = (0, import_react21.memo)(function Actor(props) {
|
|
|
3236
3242
|
});
|
|
3237
3243
|
|
|
3238
3244
|
// src/nodes/actor/config.ts
|
|
3239
|
-
var
|
|
3245
|
+
var import_react24 = require("@xyflow/react");
|
|
3240
3246
|
var import_lucide_react13 = require("lucide-react");
|
|
3241
3247
|
var config_default3 = {
|
|
3242
3248
|
type: "actor",
|
|
@@ -3262,7 +3268,7 @@ var config_default3 = {
|
|
|
3262
3268
|
getEdgeOptions: (_connection) => {
|
|
3263
3269
|
return {
|
|
3264
3270
|
label: "Interacts",
|
|
3265
|
-
markerEnd: { type:
|
|
3271
|
+
markerEnd: { type: import_react24.MarkerType.ArrowClosed, color: "#000000" }
|
|
3266
3272
|
};
|
|
3267
3273
|
},
|
|
3268
3274
|
defaultData: {
|
|
@@ -3295,9 +3301,9 @@ var config_default3 = {
|
|
|
3295
3301
|
};
|
|
3296
3302
|
|
|
3297
3303
|
// src/nodes/external-system/ExternalSystem.tsx
|
|
3298
|
-
var
|
|
3304
|
+
var import_react25 = require("react");
|
|
3299
3305
|
var import_lucide_react14 = require("lucide-react");
|
|
3300
|
-
var
|
|
3306
|
+
var import_react26 = require("@xyflow/react");
|
|
3301
3307
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
3302
3308
|
function GlowHandle12({ side }) {
|
|
3303
3309
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
@@ -3335,18 +3341,18 @@ function PostItExternalSystem(props) {
|
|
|
3335
3341
|
),
|
|
3336
3342
|
children: [
|
|
3337
3343
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3338
|
-
|
|
3344
|
+
import_react26.Handle,
|
|
3339
3345
|
{
|
|
3340
3346
|
type: "target",
|
|
3341
|
-
position:
|
|
3347
|
+
position: import_react26.Position.Left,
|
|
3342
3348
|
style: HIDDEN_HANDLE_STYLE
|
|
3343
3349
|
}
|
|
3344
3350
|
),
|
|
3345
3351
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3346
|
-
|
|
3352
|
+
import_react26.Handle,
|
|
3347
3353
|
{
|
|
3348
3354
|
type: "source",
|
|
3349
|
-
position:
|
|
3355
|
+
position: import_react26.Position.Right,
|
|
3350
3356
|
style: HIDDEN_HANDLE_STYLE
|
|
3351
3357
|
}
|
|
3352
3358
|
),
|
|
@@ -3422,8 +3428,8 @@ function PostItExternalSystem(props) {
|
|
|
3422
3428
|
function DefaultExternalSystem(props) {
|
|
3423
3429
|
const { version, name, summary, deprecated, draft, notes } = props.data.externalSystem;
|
|
3424
3430
|
const mode = props.data.mode || "simple";
|
|
3425
|
-
const targetConnections = (0,
|
|
3426
|
-
const sourceConnections = (0,
|
|
3431
|
+
const targetConnections = (0, import_react26.useHandleConnections)({ type: "target" });
|
|
3432
|
+
const sourceConnections = (0, import_react26.useHandleConnections)({ type: "source" });
|
|
3427
3433
|
const isDark = useDarkMode();
|
|
3428
3434
|
const deprecatedStripe = isDark ? "rgba(239,68,68,0.25)" : "rgba(239,68,68,0.1)";
|
|
3429
3435
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
@@ -3440,18 +3446,18 @@ function DefaultExternalSystem(props) {
|
|
|
3440
3446
|
},
|
|
3441
3447
|
children: [
|
|
3442
3448
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3443
|
-
|
|
3449
|
+
import_react26.Handle,
|
|
3444
3450
|
{
|
|
3445
3451
|
type: "target",
|
|
3446
|
-
position:
|
|
3452
|
+
position: import_react26.Position.Left,
|
|
3447
3453
|
style: HIDDEN_HANDLE_STYLE
|
|
3448
3454
|
}
|
|
3449
3455
|
),
|
|
3450
3456
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3451
|
-
|
|
3457
|
+
import_react26.Handle,
|
|
3452
3458
|
{
|
|
3453
3459
|
type: "source",
|
|
3454
|
-
position:
|
|
3460
|
+
position: import_react26.Position.Right,
|
|
3455
3461
|
style: HIDDEN_HANDLE_STYLE
|
|
3456
3462
|
}
|
|
3457
3463
|
),
|
|
@@ -3496,7 +3502,7 @@ function DefaultExternalSystem(props) {
|
|
|
3496
3502
|
}
|
|
3497
3503
|
);
|
|
3498
3504
|
}
|
|
3499
|
-
var ExternalSystem_default = (0,
|
|
3505
|
+
var ExternalSystem_default = (0, import_react25.memo)(function ExternalSystem(props) {
|
|
3500
3506
|
const nodeStyle = props?.data?.style;
|
|
3501
3507
|
if (nodeStyle === "post-it") {
|
|
3502
3508
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PostItExternalSystem, { ...props });
|
|
@@ -3505,7 +3511,7 @@ var ExternalSystem_default = (0, import_react24.memo)(function ExternalSystem(pr
|
|
|
3505
3511
|
});
|
|
3506
3512
|
|
|
3507
3513
|
// src/nodes/external-system/config.ts
|
|
3508
|
-
var
|
|
3514
|
+
var import_react27 = require("@xyflow/react");
|
|
3509
3515
|
var import_lucide_react15 = require("lucide-react");
|
|
3510
3516
|
var config_default4 = {
|
|
3511
3517
|
type: "external-system",
|
|
@@ -3519,7 +3525,7 @@ var config_default4 = {
|
|
|
3519
3525
|
getEdgeOptions: (connection) => {
|
|
3520
3526
|
return {
|
|
3521
3527
|
label: "Connects",
|
|
3522
|
-
markerEnd: { type:
|
|
3528
|
+
markerEnd: { type: import_react27.MarkerType.ArrowClosed, color: "#000000" }
|
|
3523
3529
|
};
|
|
3524
3530
|
},
|
|
3525
3531
|
defaultData: {
|
|
@@ -3569,8 +3575,8 @@ var config_default4 = {
|
|
|
3569
3575
|
};
|
|
3570
3576
|
|
|
3571
3577
|
// src/nodes/note/NoteNode.tsx
|
|
3572
|
-
var
|
|
3573
|
-
var
|
|
3578
|
+
var import_react28 = require("@xyflow/react");
|
|
3579
|
+
var import_react29 = require("react");
|
|
3574
3580
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
3575
3581
|
function classNames10(...classes) {
|
|
3576
3582
|
return classes.filter(Boolean).join(" ");
|
|
@@ -3621,7 +3627,7 @@ var AVAILABLE_COLORS = {
|
|
|
3621
3627
|
};
|
|
3622
3628
|
var POSITION_RELATIVE_STYLE = { position: "relative" };
|
|
3623
3629
|
var TEXTAREA_STYLE = { height: "100%", minHeight: 0 };
|
|
3624
|
-
var NoteNode_default = (0,
|
|
3630
|
+
var NoteNode_default = (0, import_react29.memo)(function NoteNodeComponent({
|
|
3625
3631
|
id,
|
|
3626
3632
|
data,
|
|
3627
3633
|
selected,
|
|
@@ -3629,11 +3635,11 @@ var NoteNode_default = (0, import_react28.memo)(function NoteNodeComponent({
|
|
|
3629
3635
|
onColorChange,
|
|
3630
3636
|
readOnly = false
|
|
3631
3637
|
}) {
|
|
3632
|
-
const [isEditing, setIsEditing] = (0,
|
|
3633
|
-
const [currentText, setCurrentText] = (0,
|
|
3638
|
+
const [isEditing, setIsEditing] = (0, import_react29.useState)(false);
|
|
3639
|
+
const [currentText, setCurrentText] = (0, import_react29.useState)(
|
|
3634
3640
|
data.text || "Double-click to edit..."
|
|
3635
3641
|
);
|
|
3636
|
-
const textAreaRef = (0,
|
|
3642
|
+
const textAreaRef = (0, import_react29.useRef)(null);
|
|
3637
3643
|
const currentColorName = data.color || "yellow";
|
|
3638
3644
|
const colorClasses = AVAILABLE_COLORS[currentColorName] || AVAILABLE_COLORS.yellow;
|
|
3639
3645
|
const formatText = (text) => {
|
|
@@ -3648,33 +3654,33 @@ var NoteNode_default = (0, import_react28.memo)(function NoteNodeComponent({
|
|
|
3648
3654
|
'<code class="bg-gray-200 px-1 rounded text-[9px] font-mono">$1</code>'
|
|
3649
3655
|
).replace(/^• (.*$)/gim, '<li class="text-[10px] ml-3">\u2022 $1</li>').replace(/^- (.*$)/gim, '<li class="text-[10px] ml-3">\u2022 $1</li>').replace(/\n/g, "<br>");
|
|
3650
3656
|
};
|
|
3651
|
-
(0,
|
|
3657
|
+
(0, import_react29.useEffect)(() => {
|
|
3652
3658
|
setCurrentText(data.text || "Double-click to edit...");
|
|
3653
3659
|
}, [data.text]);
|
|
3654
|
-
(0,
|
|
3660
|
+
(0, import_react29.useEffect)(() => {
|
|
3655
3661
|
if (isEditing && textAreaRef.current) {
|
|
3656
3662
|
textAreaRef.current.focus();
|
|
3657
3663
|
textAreaRef.current.select();
|
|
3658
3664
|
}
|
|
3659
3665
|
}, [isEditing]);
|
|
3660
|
-
const handleDoubleClick = (0,
|
|
3666
|
+
const handleDoubleClick = (0, import_react29.useCallback)(() => {
|
|
3661
3667
|
if (!readOnly) {
|
|
3662
3668
|
setIsEditing(true);
|
|
3663
3669
|
}
|
|
3664
3670
|
}, [readOnly]);
|
|
3665
|
-
const handleTextChange = (0,
|
|
3671
|
+
const handleTextChange = (0, import_react29.useCallback)(
|
|
3666
3672
|
(event) => {
|
|
3667
3673
|
setCurrentText(event.target.value);
|
|
3668
3674
|
},
|
|
3669
3675
|
[]
|
|
3670
3676
|
);
|
|
3671
|
-
const handleBlur = (0,
|
|
3677
|
+
const handleBlur = (0, import_react29.useCallback)(() => {
|
|
3672
3678
|
setIsEditing(false);
|
|
3673
3679
|
if (currentText !== data.text && onTextChange) {
|
|
3674
3680
|
onTextChange(id, currentText);
|
|
3675
3681
|
}
|
|
3676
3682
|
}, [currentText, data.text, id, onTextChange]);
|
|
3677
|
-
const handleKeyDown = (0,
|
|
3683
|
+
const handleKeyDown = (0, import_react29.useCallback)(
|
|
3678
3684
|
(event) => {
|
|
3679
3685
|
if (event.key === "Enter" && !event.shiftKey) {
|
|
3680
3686
|
event.preventDefault();
|
|
@@ -3687,7 +3693,7 @@ var NoteNode_default = (0, import_react28.memo)(function NoteNodeComponent({
|
|
|
3687
3693
|
},
|
|
3688
3694
|
[handleBlur, data.text]
|
|
3689
3695
|
);
|
|
3690
|
-
const handleColorChange = (0,
|
|
3696
|
+
const handleColorChange = (0, import_react29.useCallback)(
|
|
3691
3697
|
(newColor) => {
|
|
3692
3698
|
if (onColorChange) {
|
|
3693
3699
|
onColorChange(id, newColor);
|
|
@@ -3697,18 +3703,18 @@ var NoteNode_default = (0, import_react28.memo)(function NoteNodeComponent({
|
|
|
3697
3703
|
);
|
|
3698
3704
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "relative group", style: FULL_SIZE_STYLE, children: [
|
|
3699
3705
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3700
|
-
|
|
3706
|
+
import_react28.Handle,
|
|
3701
3707
|
{
|
|
3702
3708
|
type: "target",
|
|
3703
|
-
position:
|
|
3709
|
+
position: import_react28.Position.Left,
|
|
3704
3710
|
className: "!left-[-1px] !w-2 !h-2 !bg-gray-400 !border !border-gray-500 !rounded-full !z-10"
|
|
3705
3711
|
}
|
|
3706
3712
|
),
|
|
3707
3713
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3708
|
-
|
|
3714
|
+
import_react28.Handle,
|
|
3709
3715
|
{
|
|
3710
3716
|
type: "source",
|
|
3711
|
-
position:
|
|
3717
|
+
position: import_react28.Position.Right,
|
|
3712
3718
|
className: "!right-[-1px] !w-2 !h-2 !bg-gray-400 !border !border-gray-500 !rounded-full !z-10"
|
|
3713
3719
|
}
|
|
3714
3720
|
),
|
|
@@ -3774,8 +3780,8 @@ var NoteNode_default = (0, import_react28.memo)(function NoteNodeComponent({
|
|
|
3774
3780
|
});
|
|
3775
3781
|
|
|
3776
3782
|
// src/nodes/Flow.tsx
|
|
3777
|
-
var
|
|
3778
|
-
var
|
|
3783
|
+
var import_react30 = require("react");
|
|
3784
|
+
var import_react31 = require("@xyflow/react");
|
|
3779
3785
|
var ContextMenu = __toESM(require("@radix-ui/react-context-menu"));
|
|
3780
3786
|
|
|
3781
3787
|
// src/utils/url-builder.ts
|
|
@@ -3901,7 +3907,7 @@ var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
|
3901
3907
|
function classNames11(...classes) {
|
|
3902
3908
|
return classes.filter(Boolean).join(" ");
|
|
3903
3909
|
}
|
|
3904
|
-
var Flow_default = (0,
|
|
3910
|
+
var Flow_default = (0, import_react30.memo)(function FlowNode({
|
|
3905
3911
|
data,
|
|
3906
3912
|
sourcePosition,
|
|
3907
3913
|
targetPosition
|
|
@@ -3909,7 +3915,8 @@ var Flow_default = (0, import_react29.memo)(function FlowNode({
|
|
|
3909
3915
|
const { mode, flow } = data;
|
|
3910
3916
|
const { id, version, owners = EMPTY_ARRAY, name, styles } = flow.data;
|
|
3911
3917
|
const { node: { color = "teal", label } = {}, icon = "QueueListIcon" } = styles || {};
|
|
3912
|
-
const Icon = (0,
|
|
3918
|
+
const Icon = (0, import_react30.useMemo)(() => getIcon(icon), [icon]);
|
|
3919
|
+
const portalContainer = usePortalContainer();
|
|
3913
3920
|
const nodeLabel = label || flow?.data?.sidebar?.badge || "Flow";
|
|
3914
3921
|
const fontSize = nodeLabel.length > 10 ? "7px" : "9px";
|
|
3915
3922
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(ContextMenu.Root, { children: [
|
|
@@ -3942,8 +3949,8 @@ var Flow_default = (0, import_react29.memo)(function FlowNode({
|
|
|
3942
3949
|
}
|
|
3943
3950
|
),
|
|
3944
3951
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "p-1 flex-1", children: [
|
|
3945
|
-
targetPosition && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3946
|
-
sourcePosition && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3952
|
+
targetPosition && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react31.Handle, { type: "target", position: targetPosition }),
|
|
3953
|
+
sourcePosition && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react31.Handle, { type: "source", position: sourcePosition }),
|
|
3947
3954
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
3948
3955
|
"div",
|
|
3949
3956
|
{
|
|
@@ -3973,7 +3980,7 @@ var Flow_default = (0, import_react29.memo)(function FlowNode({
|
|
|
3973
3980
|
]
|
|
3974
3981
|
}
|
|
3975
3982
|
) }),
|
|
3976
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ContextMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(ContextMenu.Content, { className: "min-w-[220px] bg-[rgb(var(--ec-card-bg))] rounded-md p-1 shadow-md border border-[rgb(var(--ec-page-border))]", children: [
|
|
3983
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ContextMenu.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(ContextMenu.Content, { className: "min-w-[220px] bg-[rgb(var(--ec-card-bg))] rounded-md p-1 shadow-md border border-[rgb(var(--ec-page-border))]", children: [
|
|
3977
3984
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3978
3985
|
ContextMenu.Item,
|
|
3979
3986
|
{
|
|
@@ -4006,14 +4013,14 @@ var Flow_default = (0, import_react29.memo)(function FlowNode({
|
|
|
4006
4013
|
});
|
|
4007
4014
|
|
|
4008
4015
|
// src/nodes/Entity.tsx
|
|
4009
|
-
var
|
|
4016
|
+
var import_react32 = require("@xyflow/react");
|
|
4010
4017
|
var ContextMenu2 = __toESM(require("@radix-ui/react-context-menu"));
|
|
4011
|
-
var
|
|
4018
|
+
var import_react33 = require("react");
|
|
4012
4019
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
4013
4020
|
function classNames12(...classes) {
|
|
4014
4021
|
return classes.filter(Boolean).join(" ");
|
|
4015
4022
|
}
|
|
4016
|
-
var Entity_default = (0,
|
|
4023
|
+
var Entity_default = (0, import_react33.memo)(function EntityNode({
|
|
4017
4024
|
data,
|
|
4018
4025
|
sourcePosition,
|
|
4019
4026
|
targetPosition
|
|
@@ -4031,8 +4038,9 @@ var Entity_default = (0, import_react32.memo)(function EntityNode({
|
|
|
4031
4038
|
node: { color: _color = "blue", label: _label } = {},
|
|
4032
4039
|
icon = "CubeIcon"
|
|
4033
4040
|
} = styles || {};
|
|
4034
|
-
const Icon = (0,
|
|
4035
|
-
const [hoveredProperty, setHoveredProperty] = (0,
|
|
4041
|
+
const Icon = (0, import_react33.useMemo)(() => getIcon(icon), [icon]);
|
|
4042
|
+
const [hoveredProperty, setHoveredProperty] = (0, import_react33.useState)(null);
|
|
4043
|
+
const portalContainer = usePortalContainer();
|
|
4036
4044
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(ContextMenu2.Root, { children: [
|
|
4037
4045
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ContextMenu2.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
4038
4046
|
"div",
|
|
@@ -4078,20 +4086,20 @@ var Entity_default = (0, import_react32.memo)(function EntityNode({
|
|
|
4078
4086
|
onMouseLeave: () => setHoveredProperty(null),
|
|
4079
4087
|
children: [
|
|
4080
4088
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
4081
|
-
|
|
4089
|
+
import_react32.Handle,
|
|
4082
4090
|
{
|
|
4083
4091
|
type: "target",
|
|
4084
|
-
position:
|
|
4092
|
+
position: import_react32.Position.Left,
|
|
4085
4093
|
id: `${property.name}-target`,
|
|
4086
4094
|
className: "!w-3 !h-3 !bg-[rgb(var(--ec-card-bg))] !border-2 !border-[rgb(var(--ec-page-border))] !rounded-full !left-[-0px]",
|
|
4087
4095
|
style: HANDLE_LEFT_OFFSET_STYLE
|
|
4088
4096
|
}
|
|
4089
4097
|
),
|
|
4090
4098
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
4091
|
-
|
|
4099
|
+
import_react32.Handle,
|
|
4092
4100
|
{
|
|
4093
4101
|
type: "source",
|
|
4094
|
-
position:
|
|
4102
|
+
position: import_react32.Position.Right,
|
|
4095
4103
|
id: `${property.name}-source`,
|
|
4096
4104
|
className: "!w-3 !h-3 !bg-[rgb(var(--ec-card-bg))] !border-2 !border-[rgb(var(--ec-page-border))] !rounded-full !right-[-0px]",
|
|
4097
4105
|
style: HANDLE_RIGHT_OFFSET_STYLE
|
|
@@ -4121,13 +4129,13 @@ var Entity_default = (0, import_react32.memo)(function EntityNode({
|
|
|
4121
4129
|
);
|
|
4122
4130
|
}) }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "px-4 py-3 text-sm text-[rgb(var(--ec-page-text-muted))] text-center", children: "No properties defined" }),
|
|
4123
4131
|
properties.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
4124
|
-
targetPosition && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
4125
|
-
sourcePosition && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
4132
|
+
targetPosition && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react32.Handle, { type: "target", position: targetPosition }),
|
|
4133
|
+
sourcePosition && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react32.Handle, { type: "source", position: sourcePosition })
|
|
4126
4134
|
] })
|
|
4127
4135
|
]
|
|
4128
4136
|
}
|
|
4129
4137
|
) }),
|
|
4130
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ContextMenu2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
4138
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ContextMenu2.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
4131
4139
|
ContextMenu2.Content,
|
|
4132
4140
|
{
|
|
4133
4141
|
className: "min-w-[220px] bg-[rgb(var(--ec-card-bg))] rounded-md p-1 shadow-md border border-[rgb(var(--ec-page-border))]",
|
|
@@ -4146,14 +4154,14 @@ var Entity_default = (0, import_react32.memo)(function EntityNode({
|
|
|
4146
4154
|
});
|
|
4147
4155
|
|
|
4148
4156
|
// src/nodes/User.tsx
|
|
4149
|
-
var
|
|
4157
|
+
var import_react34 = require("react");
|
|
4150
4158
|
var import_solid = require("@heroicons/react/20/solid");
|
|
4151
|
-
var
|
|
4159
|
+
var import_react35 = require("@xyflow/react");
|
|
4152
4160
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
4153
4161
|
function classNames13(...classes) {
|
|
4154
4162
|
return classes.filter(Boolean).join(" ");
|
|
4155
4163
|
}
|
|
4156
|
-
var User_default = (0,
|
|
4164
|
+
var User_default = (0, import_react34.memo)(function UserNode({
|
|
4157
4165
|
data,
|
|
4158
4166
|
sourcePosition,
|
|
4159
4167
|
targetPosition
|
|
@@ -4195,8 +4203,8 @@ var User_default = (0, import_react33.memo)(function UserNode({
|
|
|
4195
4203
|
}
|
|
4196
4204
|
),
|
|
4197
4205
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "p-1 flex-1", children: [
|
|
4198
|
-
targetPosition && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
4199
|
-
sourcePosition && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
4206
|
+
targetPosition && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react35.Handle, { type: "target", position: targetPosition }),
|
|
4207
|
+
sourcePosition && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react35.Handle, { type: "source", position: sourcePosition }),
|
|
4200
4208
|
(!summary || mode !== "full") && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "h-full ", children: [
|
|
4201
4209
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-sm font-bold block pb-0.5 w-full", children: name }),
|
|
4202
4210
|
mode === "simple" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "w-full text-right", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: " w-full text-[10px] text-[rgb(var(--ec-page-text-muted))] font-light block pt-0.5 pb-0.5 ", children: "Event" }) })
|
|
@@ -4220,13 +4228,13 @@ var User_default = (0, import_react33.memo)(function UserNode({
|
|
|
4220
4228
|
});
|
|
4221
4229
|
|
|
4222
4230
|
// src/nodes/Step.tsx
|
|
4223
|
-
var
|
|
4224
|
-
var
|
|
4231
|
+
var import_react36 = require("react");
|
|
4232
|
+
var import_react37 = require("@xyflow/react");
|
|
4225
4233
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
4226
4234
|
function classNames14(...classes) {
|
|
4227
4235
|
return classes.filter(Boolean).join(" ");
|
|
4228
4236
|
}
|
|
4229
|
-
var Step_default = (0,
|
|
4237
|
+
var Step_default = (0, import_react36.memo)(function StepNode({
|
|
4230
4238
|
data,
|
|
4231
4239
|
sourcePosition,
|
|
4232
4240
|
targetPosition
|
|
@@ -4260,18 +4268,18 @@ var Step_default = (0, import_react35.memo)(function StepNode({
|
|
|
4260
4268
|
),
|
|
4261
4269
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "p-1 flex-1", children: [
|
|
4262
4270
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4263
|
-
|
|
4271
|
+
import_react37.Handle,
|
|
4264
4272
|
{
|
|
4265
4273
|
type: "target",
|
|
4266
|
-
position: targetPosition ||
|
|
4274
|
+
position: targetPosition || import_react37.Position.Left,
|
|
4267
4275
|
style: HIDDEN_HANDLE_STYLE
|
|
4268
4276
|
}
|
|
4269
4277
|
),
|
|
4270
4278
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4271
|
-
|
|
4279
|
+
import_react37.Handle,
|
|
4272
4280
|
{
|
|
4273
4281
|
type: "source",
|
|
4274
|
-
position: sourcePosition ||
|
|
4282
|
+
position: sourcePosition || import_react37.Position.Right,
|
|
4275
4283
|
style: HIDDEN_HANDLE_STYLE
|
|
4276
4284
|
}
|
|
4277
4285
|
),
|
|
@@ -4295,21 +4303,22 @@ var Step_default = (0, import_react35.memo)(function StepNode({
|
|
|
4295
4303
|
});
|
|
4296
4304
|
|
|
4297
4305
|
// src/nodes/Domain.tsx
|
|
4298
|
-
var
|
|
4306
|
+
var import_react38 = require("@xyflow/react");
|
|
4299
4307
|
var ContextMenu3 = __toESM(require("@radix-ui/react-context-menu"));
|
|
4300
|
-
var
|
|
4308
|
+
var import_react39 = require("react");
|
|
4301
4309
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
4302
|
-
var Domain_default = (0,
|
|
4310
|
+
var Domain_default = (0, import_react39.memo)(function DomainNode({ data, id: nodeId }) {
|
|
4303
4311
|
const { mode, domain } = data;
|
|
4304
|
-
const reactFlow = (0,
|
|
4305
|
-
const [highlightedServices, setHighlightedServices] = (0,
|
|
4312
|
+
const reactFlow = (0, import_react38.useReactFlow)();
|
|
4313
|
+
const [highlightedServices, setHighlightedServices] = (0, import_react39.useState)(
|
|
4306
4314
|
/* @__PURE__ */ new Set()
|
|
4307
4315
|
);
|
|
4308
4316
|
const { id, version, name, services = [], styles } = domain.data;
|
|
4309
4317
|
const { icon = "RectangleGroupIcon" } = styles || {};
|
|
4310
|
-
const Icon = (0,
|
|
4311
|
-
const ServerIcon3 = (0,
|
|
4312
|
-
const
|
|
4318
|
+
const Icon = (0, import_react39.useMemo)(() => getIcon(icon), [icon]);
|
|
4319
|
+
const ServerIcon3 = (0, import_react39.useMemo)(() => getIcon("ServerIcon"), []);
|
|
4320
|
+
const portalContainer = usePortalContainer();
|
|
4321
|
+
const handleSelectionChange = (0, import_react39.useCallback)(
|
|
4313
4322
|
({ nodes: selectedNodes }) => {
|
|
4314
4323
|
if (selectedNodes.length === 0) {
|
|
4315
4324
|
setHighlightedServices(/* @__PURE__ */ new Set());
|
|
@@ -4338,7 +4347,7 @@ var Domain_default = (0, import_react38.memo)(function DomainNode({ data, id: no
|
|
|
4338
4347
|
},
|
|
4339
4348
|
[nodeId, reactFlow]
|
|
4340
4349
|
);
|
|
4341
|
-
(0,
|
|
4350
|
+
(0, import_react38.useOnSelectionChange)({
|
|
4342
4351
|
onChange: handleSelectionChange
|
|
4343
4352
|
});
|
|
4344
4353
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(ContextMenu3.Root, { children: [
|
|
@@ -4362,20 +4371,20 @@ var Domain_default = (0, import_react38.memo)(function DomainNode({ data, id: no
|
|
|
4362
4371
|
className: `relative flex items-center justify-between px-3 py-2 cursor-pointer ${index !== services.length - 1 ? "border-b border-[rgb(var(--ec-page-border))]" : ""} ${isHighlighted ? "bg-pink-100 border-pink-300" : ""}`,
|
|
4363
4372
|
children: [
|
|
4364
4373
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4365
|
-
|
|
4374
|
+
import_react38.Handle,
|
|
4366
4375
|
{
|
|
4367
4376
|
type: "target",
|
|
4368
|
-
position:
|
|
4377
|
+
position: import_react38.Position.Left,
|
|
4369
4378
|
id: `${service.data.id}-target`,
|
|
4370
4379
|
className: "!left-[-1px] !w-2 !h-2 !bg-gray-400 !border !border-gray-500 !rounded-full !z-10",
|
|
4371
4380
|
style: HANDLE_LEFT_STYLE
|
|
4372
4381
|
}
|
|
4373
4382
|
),
|
|
4374
4383
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4375
|
-
|
|
4384
|
+
import_react38.Handle,
|
|
4376
4385
|
{
|
|
4377
4386
|
type: "source",
|
|
4378
|
-
position:
|
|
4387
|
+
position: import_react38.Position.Right,
|
|
4379
4388
|
id: `${service.data.id}-source`,
|
|
4380
4389
|
className: "!right-[-1px] !w-2 !h-2 !bg-gray-400 !border !border-gray-500 !rounded-full !z-10",
|
|
4381
4390
|
style: HANDLE_RIGHT_STYLE
|
|
@@ -4392,7 +4401,7 @@ var Domain_default = (0, import_react38.memo)(function DomainNode({ data, id: no
|
|
|
4392
4401
|
]
|
|
4393
4402
|
}
|
|
4394
4403
|
) }),
|
|
4395
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ContextMenu3.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(ContextMenu3.Content, { className: "min-w-[220px] bg-[rgb(var(--ec-card-bg))] rounded-md p-1 shadow-md border border-[rgb(var(--ec-page-border))]", children: [
|
|
4404
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ContextMenu3.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(ContextMenu3.Content, { className: "min-w-[220px] bg-[rgb(var(--ec-card-bg))] rounded-md p-1 shadow-md border border-[rgb(var(--ec-page-border))]", children: [
|
|
4396
4405
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4397
4406
|
ContextMenu3.Item,
|
|
4398
4407
|
{
|
|
@@ -4417,7 +4426,7 @@ var Domain_default = (0, import_react38.memo)(function DomainNode({ data, id: no
|
|
|
4417
4426
|
] }, `${service.data.id}-${index}`);
|
|
4418
4427
|
}) })
|
|
4419
4428
|
] }) }),
|
|
4420
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ContextMenu3.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(ContextMenu3.Content, { className: "min-w-[220px] bg-[rgb(var(--ec-card-bg))] rounded-md p-1 shadow-md border border-[rgb(var(--ec-page-border))]", children: [
|
|
4429
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ContextMenu3.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(ContextMenu3.Content, { className: "min-w-[220px] bg-[rgb(var(--ec-card-bg))] rounded-md p-1 shadow-md border border-[rgb(var(--ec-page-border))]", children: [
|
|
4421
4430
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
4422
4431
|
ContextMenu3.Item,
|
|
4423
4432
|
{
|
|
@@ -4443,7 +4452,7 @@ var Domain_default = (0, import_react38.memo)(function DomainNode({ data, id: no
|
|
|
4443
4452
|
});
|
|
4444
4453
|
|
|
4445
4454
|
// src/nodes/GroupNode.tsx
|
|
4446
|
-
var
|
|
4455
|
+
var import_react40 = require("react");
|
|
4447
4456
|
var import_lucide_react17 = require("lucide-react");
|
|
4448
4457
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
4449
4458
|
var GROUP_CONTAINER_STYLE = {
|
|
@@ -4517,7 +4526,7 @@ var GROUP_VERSION_STYLE = {
|
|
|
4517
4526
|
};
|
|
4518
4527
|
var GROUP_ICON_COLOR_STYLE = { color: "#7c3aed" };
|
|
4519
4528
|
var GROUP_ICON_WHITE_STYLE = { color: "white" };
|
|
4520
|
-
var GroupNode_default = (0,
|
|
4529
|
+
var GroupNode_default = (0, import_react40.memo)(function GroupNode({ data }) {
|
|
4521
4530
|
const { domain } = data;
|
|
4522
4531
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: GROUP_CONTAINER_STYLE, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: GROUP_HEADER_STYLE, children: [
|
|
4523
4532
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: GROUP_WATERMARK_STYLE, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react17.BoxesIcon, { size: 28, strokeWidth: 2, style: GROUP_ICON_COLOR_STYLE }) }),
|
|
@@ -4540,16 +4549,16 @@ var GroupNode_default = (0, import_react39.memo)(function GroupNode({ data }) {
|
|
|
4540
4549
|
});
|
|
4541
4550
|
|
|
4542
4551
|
// src/nodes/Custom.tsx
|
|
4543
|
-
var
|
|
4552
|
+
var import_react41 = require("@xyflow/react");
|
|
4544
4553
|
var Icons = __toESM(require("@heroicons/react/24/solid"));
|
|
4545
|
-
var
|
|
4554
|
+
var import_react42 = require("react");
|
|
4546
4555
|
var ContextMenu4 = __toESM(require("@radix-ui/react-context-menu"));
|
|
4547
4556
|
var Tooltip = __toESM(require("@radix-ui/react-tooltip"));
|
|
4548
4557
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
4549
4558
|
function classNames15(...classes) {
|
|
4550
4559
|
return classes.filter(Boolean).join(" ");
|
|
4551
4560
|
}
|
|
4552
|
-
var Custom_default = (0,
|
|
4561
|
+
var Custom_default = (0, import_react42.memo)(function UserNode2({
|
|
4553
4562
|
data,
|
|
4554
4563
|
sourcePosition,
|
|
4555
4564
|
targetPosition
|
|
@@ -4566,10 +4575,11 @@ var Custom_default = (0, import_react41.memo)(function UserNode2({
|
|
|
4566
4575
|
menu = EMPTY_ARRAY,
|
|
4567
4576
|
height = 5
|
|
4568
4577
|
} = customProps;
|
|
4569
|
-
const IconComponent = (0,
|
|
4578
|
+
const IconComponent = (0, import_react42.useMemo)(() => Icons[icon], [icon]);
|
|
4570
4579
|
const { actor: { name: _name } = {} } = step;
|
|
4571
4580
|
const isLongType = type && type.length > 10;
|
|
4572
4581
|
const displayType = isLongType ? `${type.substring(0, 10)}...` : type;
|
|
4582
|
+
const portalContainer = usePortalContainer();
|
|
4573
4583
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(ContextMenu4.Root, { children: [
|
|
4574
4584
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ContextMenu4.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4575
4585
|
"div",
|
|
@@ -4600,7 +4610,7 @@ var Custom_default = (0, import_react41.memo)(function UserNode2({
|
|
|
4600
4610
|
children: displayType
|
|
4601
4611
|
}
|
|
4602
4612
|
) }),
|
|
4603
|
-
isLongType && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4613
|
+
isLongType && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Tooltip.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4604
4614
|
Tooltip.Content,
|
|
4605
4615
|
{
|
|
4606
4616
|
className: "bg-slate-800 text-white rounded px-2 py-1 text-xs shadow-md z-50",
|
|
@@ -4617,8 +4627,8 @@ var Custom_default = (0, import_react41.memo)(function UserNode2({
|
|
|
4617
4627
|
}
|
|
4618
4628
|
),
|
|
4619
4629
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "p-1 flex-1", children: [
|
|
4620
|
-
targetPosition && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4621
|
-
sourcePosition && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4630
|
+
targetPosition && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react41.Handle, { type: "target", position: targetPosition }),
|
|
4631
|
+
sourcePosition && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react41.Handle, { type: "source", position: sourcePosition }),
|
|
4622
4632
|
(!summary || mode !== "full") && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "h-full ", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-sm font-bold block pb-0.5 w-full", children: title }) }),
|
|
4623
4633
|
summary && mode === "full" && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { children: [
|
|
4624
4634
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
@@ -4661,7 +4671,7 @@ var Custom_default = (0, import_react41.memo)(function UserNode2({
|
|
|
4661
4671
|
]
|
|
4662
4672
|
}
|
|
4663
4673
|
) }),
|
|
4664
|
-
menu?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ContextMenu4.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ContextMenu4.Content, { className: "min-w-[220px] bg-[rgb(var(--ec-card-bg))] rounded-md p-1 shadow-md border border-[rgb(var(--ec-page-border))]", children: menu?.map((item) => {
|
|
4674
|
+
menu?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ContextMenu4.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ContextMenu4.Content, { className: "min-w-[220px] bg-[rgb(var(--ec-card-bg))] rounded-md p-1 shadow-md border border-[rgb(var(--ec-page-border))]", children: menu?.map((item) => {
|
|
4665
4675
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
4666
4676
|
ContextMenu4.Item,
|
|
4667
4677
|
{
|
|
@@ -4675,25 +4685,25 @@ var Custom_default = (0, import_react41.memo)(function UserNode2({
|
|
|
4675
4685
|
});
|
|
4676
4686
|
|
|
4677
4687
|
// src/nodes/ExternalSystem2.tsx
|
|
4678
|
-
var
|
|
4679
|
-
var
|
|
4688
|
+
var import_react43 = require("react");
|
|
4689
|
+
var import_react44 = require("@xyflow/react");
|
|
4680
4690
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
4681
|
-
var ExternalSystem2_default = (0,
|
|
4691
|
+
var ExternalSystem2_default = (0, import_react43.memo)(function ExternalSystemNode(props) {
|
|
4682
4692
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "relative", children: [
|
|
4683
4693
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4684
|
-
|
|
4694
|
+
import_react44.Handle,
|
|
4685
4695
|
{
|
|
4686
4696
|
type: "target",
|
|
4687
|
-
position:
|
|
4697
|
+
position: import_react44.Position.Left,
|
|
4688
4698
|
style: EXTERNAL_SYSTEM_HANDLE_STYLE,
|
|
4689
4699
|
className: "bg-gray-500"
|
|
4690
4700
|
}
|
|
4691
4701
|
),
|
|
4692
4702
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4693
|
-
|
|
4703
|
+
import_react44.Handle,
|
|
4694
4704
|
{
|
|
4695
4705
|
type: "source",
|
|
4696
|
-
position:
|
|
4706
|
+
position: import_react44.Position.Right,
|
|
4697
4707
|
style: EXTERNAL_SYSTEM_HANDLE_STYLE,
|
|
4698
4708
|
className: "bg-gray-500"
|
|
4699
4709
|
}
|
|
@@ -4703,9 +4713,9 @@ var ExternalSystem2_default = (0, import_react42.memo)(function ExternalSystemNo
|
|
|
4703
4713
|
});
|
|
4704
4714
|
|
|
4705
4715
|
// src/nodes/DataProduct.tsx
|
|
4706
|
-
var
|
|
4716
|
+
var import_react45 = require("react");
|
|
4707
4717
|
var import_lucide_react18 = require("lucide-react");
|
|
4708
|
-
var
|
|
4718
|
+
var import_react46 = require("@xyflow/react");
|
|
4709
4719
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
4710
4720
|
function GlowHandle13({ side }) {
|
|
4711
4721
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
@@ -4743,18 +4753,18 @@ function PostItDataProduct(props) {
|
|
|
4743
4753
|
),
|
|
4744
4754
|
children: [
|
|
4745
4755
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4746
|
-
|
|
4756
|
+
import_react46.Handle,
|
|
4747
4757
|
{
|
|
4748
4758
|
type: "target",
|
|
4749
|
-
position:
|
|
4759
|
+
position: import_react46.Position.Left,
|
|
4750
4760
|
style: HIDDEN_HANDLE_STYLE
|
|
4751
4761
|
}
|
|
4752
4762
|
),
|
|
4753
4763
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4754
|
-
|
|
4764
|
+
import_react46.Handle,
|
|
4755
4765
|
{
|
|
4756
4766
|
type: "source",
|
|
4757
|
-
position:
|
|
4767
|
+
position: import_react46.Position.Right,
|
|
4758
4768
|
style: HIDDEN_HANDLE_STYLE
|
|
4759
4769
|
}
|
|
4760
4770
|
),
|
|
@@ -4830,8 +4840,8 @@ function PostItDataProduct(props) {
|
|
|
4830
4840
|
function DefaultDataProduct(props) {
|
|
4831
4841
|
const { version, name, summary, deprecated, draft, notes } = props.data.dataProduct;
|
|
4832
4842
|
const mode = props.data.mode || "simple";
|
|
4833
|
-
const targetConnections = (0,
|
|
4834
|
-
const sourceConnections = (0,
|
|
4843
|
+
const targetConnections = (0, import_react46.useHandleConnections)({ type: "target" });
|
|
4844
|
+
const sourceConnections = (0, import_react46.useHandleConnections)({ type: "source" });
|
|
4835
4845
|
const isDark = useDarkMode();
|
|
4836
4846
|
const deprecatedStripe = isDark ? "rgba(239,68,68,0.25)" : "rgba(239,68,68,0.1)";
|
|
4837
4847
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
@@ -4848,18 +4858,18 @@ function DefaultDataProduct(props) {
|
|
|
4848
4858
|
},
|
|
4849
4859
|
children: [
|
|
4850
4860
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4851
|
-
|
|
4861
|
+
import_react46.Handle,
|
|
4852
4862
|
{
|
|
4853
4863
|
type: "target",
|
|
4854
|
-
position:
|
|
4864
|
+
position: import_react46.Position.Left,
|
|
4855
4865
|
style: HIDDEN_HANDLE_STYLE
|
|
4856
4866
|
}
|
|
4857
4867
|
),
|
|
4858
4868
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4859
|
-
|
|
4869
|
+
import_react46.Handle,
|
|
4860
4870
|
{
|
|
4861
4871
|
type: "source",
|
|
4862
|
-
position:
|
|
4872
|
+
position: import_react46.Position.Right,
|
|
4863
4873
|
style: HIDDEN_HANDLE_STYLE
|
|
4864
4874
|
}
|
|
4865
4875
|
),
|
|
@@ -4904,7 +4914,7 @@ function DefaultDataProduct(props) {
|
|
|
4904
4914
|
}
|
|
4905
4915
|
);
|
|
4906
4916
|
}
|
|
4907
|
-
var DataProduct_default = (0,
|
|
4917
|
+
var DataProduct_default = (0, import_react45.memo)(function DataProductNode(props) {
|
|
4908
4918
|
const nodeStyle = props?.data?.style;
|
|
4909
4919
|
if (nodeStyle === "post-it") {
|
|
4910
4920
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(PostItDataProduct, { ...props });
|
|
@@ -4913,8 +4923,8 @@ var DataProduct_default = (0, import_react44.memo)(function DataProductNode(prop
|
|
|
4913
4923
|
});
|
|
4914
4924
|
|
|
4915
4925
|
// src/edges/AnimatedMessageEdge.tsx
|
|
4916
|
-
var
|
|
4917
|
-
var
|
|
4926
|
+
var import_react47 = require("react");
|
|
4927
|
+
var import_react48 = require("@xyflow/react");
|
|
4918
4928
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
4919
4929
|
function messageColor(collection) {
|
|
4920
4930
|
switch (collection) {
|
|
@@ -4930,7 +4940,7 @@ function messageColor(collection) {
|
|
|
4930
4940
|
}
|
|
4931
4941
|
var TSPAN_NORMAL_STYLE = { fontStyle: "normal" };
|
|
4932
4942
|
var TSPAN_ITALIC_STYLE = { fontStyle: "italic" };
|
|
4933
|
-
var AnimatedMessageEdge = (0,
|
|
4943
|
+
var AnimatedMessageEdge = (0, import_react47.memo)(
|
|
4934
4944
|
({
|
|
4935
4945
|
id,
|
|
4936
4946
|
sourceX,
|
|
@@ -4944,7 +4954,7 @@ var AnimatedMessageEdge = (0, import_react46.memo)(
|
|
|
4944
4954
|
markerEnd,
|
|
4945
4955
|
markerStart
|
|
4946
4956
|
}) => {
|
|
4947
|
-
const [edgePath, labelX, labelY] = (0,
|
|
4957
|
+
const [edgePath, labelX, labelY] = (0, import_react48.getSmoothStepPath)({
|
|
4948
4958
|
sourceX,
|
|
4949
4959
|
sourceY,
|
|
4950
4960
|
sourcePosition,
|
|
@@ -4957,9 +4967,9 @@ var AnimatedMessageEdge = (0, import_react46.memo)(
|
|
|
4957
4967
|
const customColor = data?.customColor || messageColor(collection ?? "default");
|
|
4958
4968
|
const warning = data?.warning;
|
|
4959
4969
|
const customColors = Array.isArray(customColor) ? customColor : [customColor];
|
|
4960
|
-
const randomDelay = (0,
|
|
4970
|
+
const randomDelay = (0, import_react47.useMemo)(() => Math.random() * 1, []);
|
|
4961
4971
|
const opacityClass = opacity === 1 ? "z-30 opacity-100" : "z-30 opacity-10";
|
|
4962
|
-
const animatedNodes = (0,
|
|
4972
|
+
const animatedNodes = (0, import_react47.useMemo)(
|
|
4963
4973
|
() => customColors.map((color, index) => {
|
|
4964
4974
|
const delay = randomDelay + index * 0.3;
|
|
4965
4975
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
@@ -5009,8 +5019,8 @@ var AnimatedMessageEdge = (0, import_react46.memo)(
|
|
|
5009
5019
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5010
5020
|
[edgePath, id, customColors.join(","), opacity, randomDelay]
|
|
5011
5021
|
);
|
|
5012
|
-
const lines = (0,
|
|
5013
|
-
const longestLine = (0,
|
|
5022
|
+
const lines = (0, import_react47.useMemo)(() => String(label ?? "").split("\n"), [label]);
|
|
5023
|
+
const longestLine = (0, import_react47.useMemo)(
|
|
5014
5024
|
() => lines.reduce(
|
|
5015
5025
|
(a, b) => a.length > b.length ? a : b,
|
|
5016
5026
|
""
|
|
@@ -5020,7 +5030,7 @@ var AnimatedMessageEdge = (0, import_react46.memo)(
|
|
|
5020
5030
|
const labelWidth = Math.max(longestLine.length * 6.5 + 16, 50);
|
|
5021
5031
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
5022
5032
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
5023
|
-
|
|
5033
|
+
import_react48.BaseEdge,
|
|
5024
5034
|
{
|
|
5025
5035
|
id,
|
|
5026
5036
|
path: edgePath,
|
|
@@ -5076,12 +5086,12 @@ var AnimatedMessageEdge = (0, import_react46.memo)(
|
|
|
5076
5086
|
var AnimatedMessageEdge_default = AnimatedMessageEdge;
|
|
5077
5087
|
|
|
5078
5088
|
// src/edges/MultilineEdgeLabel.tsx
|
|
5079
|
-
var
|
|
5080
|
-
var
|
|
5089
|
+
var import_react49 = require("react");
|
|
5090
|
+
var import_react50 = require("@xyflow/react");
|
|
5081
5091
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
5082
5092
|
var TSPAN_NORMAL_STYLE2 = { fontStyle: "normal" };
|
|
5083
5093
|
var TSPAN_ITALIC_STYLE2 = { fontStyle: "italic" };
|
|
5084
|
-
var MultilineEdgeLabel_default = (0,
|
|
5094
|
+
var MultilineEdgeLabel_default = (0, import_react49.memo)(function MultilineEdgeLabel(props) {
|
|
5085
5095
|
const {
|
|
5086
5096
|
id,
|
|
5087
5097
|
sourceX,
|
|
@@ -5097,7 +5107,7 @@ var MultilineEdgeLabel_default = (0, import_react48.memo)(function MultilineEdge
|
|
|
5097
5107
|
style,
|
|
5098
5108
|
selected
|
|
5099
5109
|
} = props;
|
|
5100
|
-
const [edgePath, labelX, labelY] = (0,
|
|
5110
|
+
const [edgePath, labelX, labelY] = (0, import_react50.getSmoothStepPath)({
|
|
5101
5111
|
sourceX,
|
|
5102
5112
|
sourceY,
|
|
5103
5113
|
targetX,
|
|
@@ -5105,7 +5115,7 @@ var MultilineEdgeLabel_default = (0, import_react48.memo)(function MultilineEdge
|
|
|
5105
5115
|
sourcePosition,
|
|
5106
5116
|
targetPosition
|
|
5107
5117
|
});
|
|
5108
|
-
const lines = (0,
|
|
5118
|
+
const lines = (0, import_react49.useMemo)(() => String(label ?? "").split("\n"), [label]);
|
|
5109
5119
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
5110
5120
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
5111
5121
|
"path",
|
|
@@ -5144,8 +5154,8 @@ var MultilineEdgeLabel_default = (0, import_react48.memo)(function MultilineEdge
|
|
|
5144
5154
|
});
|
|
5145
5155
|
|
|
5146
5156
|
// src/edges/FlowEdge.tsx
|
|
5147
|
-
var
|
|
5148
|
-
var
|
|
5157
|
+
var import_react51 = require("react");
|
|
5158
|
+
var import_react52 = require("@xyflow/react");
|
|
5149
5159
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
5150
5160
|
function messageColor2(collection) {
|
|
5151
5161
|
switch (collection) {
|
|
@@ -5160,7 +5170,7 @@ function messageColor2(collection) {
|
|
|
5160
5170
|
}
|
|
5161
5171
|
}
|
|
5162
5172
|
var EMPTY_STYLE = {};
|
|
5163
|
-
var FlowEdge_default = (0,
|
|
5173
|
+
var FlowEdge_default = (0, import_react51.memo)(function CustomEdge({
|
|
5164
5174
|
id,
|
|
5165
5175
|
sourceX,
|
|
5166
5176
|
sourceY,
|
|
@@ -5174,7 +5184,7 @@ var FlowEdge_default = (0, import_react50.memo)(function CustomEdge({
|
|
|
5174
5184
|
labelStyle,
|
|
5175
5185
|
data
|
|
5176
5186
|
}) {
|
|
5177
|
-
const [edgePath, labelX, labelY] = (0,
|
|
5187
|
+
const [edgePath, labelX, labelY] = (0, import_react52.getSmoothStepPath)({
|
|
5178
5188
|
sourceX,
|
|
5179
5189
|
sourceY,
|
|
5180
5190
|
sourcePosition,
|
|
@@ -5182,14 +5192,14 @@ var FlowEdge_default = (0, import_react50.memo)(function CustomEdge({
|
|
|
5182
5192
|
targetY,
|
|
5183
5193
|
targetPosition
|
|
5184
5194
|
});
|
|
5185
|
-
const randomDelay = (0,
|
|
5195
|
+
const randomDelay = (0, import_react51.useMemo)(() => Math.random() * 1, []);
|
|
5186
5196
|
const collection = data?.message?.collection;
|
|
5187
5197
|
const opacity = data?.opacity ?? 1;
|
|
5188
|
-
const mergedStyle = (0,
|
|
5198
|
+
const mergedStyle = (0, import_react51.useMemo)(
|
|
5189
5199
|
() => ({ ...EDGE_FLOW_BASE_STYLE, ...style }),
|
|
5190
5200
|
[style]
|
|
5191
5201
|
);
|
|
5192
|
-
const labelPositionStyle = (0,
|
|
5202
|
+
const labelPositionStyle = (0, import_react51.useMemo)(
|
|
5193
5203
|
() => ({
|
|
5194
5204
|
position: "absolute",
|
|
5195
5205
|
transform: `translate(-50%, -50%) translate(${labelX}px,${labelY}px)`,
|
|
@@ -5199,7 +5209,7 @@ var FlowEdge_default = (0, import_react50.memo)(function CustomEdge({
|
|
|
5199
5209
|
[labelX, labelY, labelStyle]
|
|
5200
5210
|
);
|
|
5201
5211
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
5202
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
5212
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react52.BaseEdge, { path: edgePath, markerEnd, style: mergedStyle }),
|
|
5203
5213
|
data?.animated && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
5204
5214
|
"g",
|
|
5205
5215
|
{
|
|
@@ -5226,7 +5236,7 @@ var FlowEdge_default = (0, import_react50.memo)(function CustomEdge({
|
|
|
5226
5236
|
)
|
|
5227
5237
|
}
|
|
5228
5238
|
),
|
|
5229
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
5239
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react52.EdgeLabelRenderer, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
5230
5240
|
"div",
|
|
5231
5241
|
{
|
|
5232
5242
|
style: labelPositionStyle,
|
|
@@ -5238,34 +5248,34 @@ var FlowEdge_default = (0, import_react50.memo)(function CustomEdge({
|
|
|
5238
5248
|
});
|
|
5239
5249
|
|
|
5240
5250
|
// src/components/VisualiserSearch.tsx
|
|
5241
|
-
var
|
|
5251
|
+
var import_react53 = require("react");
|
|
5242
5252
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
5243
|
-
var VisualiserSearch = (0,
|
|
5244
|
-
(0,
|
|
5253
|
+
var VisualiserSearch = (0, import_react53.memo)(
|
|
5254
|
+
(0, import_react53.forwardRef)(
|
|
5245
5255
|
({ nodes, onNodeSelect, onClear, onPaneClick: _onPaneClick }, ref) => {
|
|
5246
|
-
const [searchQuery, setSearchQuery] = (0,
|
|
5247
|
-
const [filteredSuggestions, setFilteredSuggestions] = (0,
|
|
5248
|
-
const [showSuggestions, setShowSuggestions] = (0,
|
|
5249
|
-
const [selectedSuggestionIndex, setSelectedSuggestionIndex] = (0,
|
|
5250
|
-
const searchInputRef = (0,
|
|
5251
|
-
const containerRef = (0,
|
|
5252
|
-
const hideSuggestions = (0,
|
|
5256
|
+
const [searchQuery, setSearchQuery] = (0, import_react53.useState)("");
|
|
5257
|
+
const [filteredSuggestions, setFilteredSuggestions] = (0, import_react53.useState)([]);
|
|
5258
|
+
const [showSuggestions, setShowSuggestions] = (0, import_react53.useState)(false);
|
|
5259
|
+
const [selectedSuggestionIndex, setSelectedSuggestionIndex] = (0, import_react53.useState)(-1);
|
|
5260
|
+
const searchInputRef = (0, import_react53.useRef)(null);
|
|
5261
|
+
const containerRef = (0, import_react53.useRef)(null);
|
|
5262
|
+
const hideSuggestions = (0, import_react53.useCallback)(() => {
|
|
5253
5263
|
setShowSuggestions(false);
|
|
5254
5264
|
setSelectedSuggestionIndex(-1);
|
|
5255
5265
|
}, []);
|
|
5256
|
-
(0,
|
|
5266
|
+
(0, import_react53.useImperativeHandle)(
|
|
5257
5267
|
ref,
|
|
5258
5268
|
() => ({
|
|
5259
5269
|
hideSuggestions
|
|
5260
5270
|
}),
|
|
5261
5271
|
[hideSuggestions]
|
|
5262
5272
|
);
|
|
5263
|
-
const getNodeDisplayName = (0,
|
|
5273
|
+
const getNodeDisplayName = (0, import_react53.useCallback)((node) => {
|
|
5264
5274
|
const name = node.data?.message?.data?.name || node.data?.service?.data?.name || node.data?.domain?.data?.name || node.data?.entity?.data?.name || node.data?.name || node.id;
|
|
5265
5275
|
const version = node.data?.message?.data?.version || node.data?.service?.data?.version || node.data?.domain?.data?.version || node.data?.entity?.data?.version || node.data?.version;
|
|
5266
5276
|
return version ? `${name} (v${version})` : name;
|
|
5267
5277
|
}, []);
|
|
5268
|
-
const getNodeTypeColorClass = (0,
|
|
5278
|
+
const getNodeTypeColorClass = (0, import_react53.useCallback)((nodeType) => {
|
|
5269
5279
|
const colorClasses = {
|
|
5270
5280
|
events: "bg-orange-600 text-white",
|
|
5271
5281
|
services: "bg-pink-600 text-white",
|
|
@@ -5282,7 +5292,7 @@ var VisualiserSearch = (0, import_react52.memo)(
|
|
|
5282
5292
|
};
|
|
5283
5293
|
return colorClasses[nodeType] || "bg-gray-100 text-gray-700";
|
|
5284
5294
|
}, []);
|
|
5285
|
-
const handleSearchChange = (0,
|
|
5295
|
+
const handleSearchChange = (0, import_react53.useCallback)(
|
|
5286
5296
|
(event) => {
|
|
5287
5297
|
const query = event.target.value;
|
|
5288
5298
|
setSearchQuery(query);
|
|
@@ -5302,14 +5312,14 @@ var VisualiserSearch = (0, import_react52.memo)(
|
|
|
5302
5312
|
},
|
|
5303
5313
|
[nodes, getNodeDisplayName]
|
|
5304
5314
|
);
|
|
5305
|
-
const handleSearchFocus = (0,
|
|
5315
|
+
const handleSearchFocus = (0, import_react53.useCallback)(() => {
|
|
5306
5316
|
if (searchQuery.length === 0) {
|
|
5307
5317
|
setFilteredSuggestions(nodes);
|
|
5308
5318
|
}
|
|
5309
5319
|
setShowSuggestions(true);
|
|
5310
5320
|
setSelectedSuggestionIndex(-1);
|
|
5311
5321
|
}, [nodes, searchQuery]);
|
|
5312
|
-
const handleSuggestionClick = (0,
|
|
5322
|
+
const handleSuggestionClick = (0, import_react53.useCallback)(
|
|
5313
5323
|
(node) => {
|
|
5314
5324
|
setSearchQuery(getNodeDisplayName(node));
|
|
5315
5325
|
setShowSuggestions(false);
|
|
@@ -5317,7 +5327,7 @@ var VisualiserSearch = (0, import_react52.memo)(
|
|
|
5317
5327
|
},
|
|
5318
5328
|
[onNodeSelect, getNodeDisplayName]
|
|
5319
5329
|
);
|
|
5320
|
-
const handleSearchKeyDown = (0,
|
|
5330
|
+
const handleSearchKeyDown = (0, import_react53.useCallback)(
|
|
5321
5331
|
(event) => {
|
|
5322
5332
|
if (!showSuggestions || filteredSuggestions.length === 0) return;
|
|
5323
5333
|
switch (event.key) {
|
|
@@ -5354,7 +5364,7 @@ var VisualiserSearch = (0, import_react52.memo)(
|
|
|
5354
5364
|
handleSuggestionClick
|
|
5355
5365
|
]
|
|
5356
5366
|
);
|
|
5357
|
-
const clearSearch = (0,
|
|
5367
|
+
const clearSearch = (0, import_react53.useCallback)(() => {
|
|
5358
5368
|
setSearchQuery("");
|
|
5359
5369
|
setShowSuggestions(false);
|
|
5360
5370
|
setFilteredSuggestions([]);
|
|
@@ -5364,7 +5374,7 @@ var VisualiserSearch = (0, import_react52.memo)(
|
|
|
5364
5374
|
searchInputRef.current.focus();
|
|
5365
5375
|
}
|
|
5366
5376
|
}, [onClear]);
|
|
5367
|
-
(0,
|
|
5377
|
+
(0, import_react53.useEffect)(() => {
|
|
5368
5378
|
const handleClickOutside = (event) => {
|
|
5369
5379
|
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
5370
5380
|
setShowSuggestions(false);
|
|
@@ -5448,35 +5458,35 @@ VisualiserSearch.displayName = "VisualiserSearch";
|
|
|
5448
5458
|
var VisualiserSearch_default = VisualiserSearch;
|
|
5449
5459
|
|
|
5450
5460
|
// src/components/StepWalkthrough.tsx
|
|
5451
|
-
var
|
|
5461
|
+
var import_react54 = require("react");
|
|
5452
5462
|
var import_outline = require("@heroicons/react/24/outline");
|
|
5453
5463
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
5454
|
-
var StepWalkthrough_default = (0,
|
|
5464
|
+
var StepWalkthrough_default = (0, import_react54.memo)(function StepWalkthrough({
|
|
5455
5465
|
nodes,
|
|
5456
5466
|
edges,
|
|
5457
5467
|
isFlowVisualization,
|
|
5458
5468
|
onStepChange,
|
|
5459
5469
|
mode = "full"
|
|
5460
5470
|
}) {
|
|
5461
|
-
const [currentNodeId, setCurrentNodeId] = (0,
|
|
5462
|
-
const [pathHistory, setPathHistory] = (0,
|
|
5463
|
-
const [currentStepIndex, setCurrentStepIndex] = (0,
|
|
5464
|
-
const [availablePaths, setAvailablePaths] = (0,
|
|
5465
|
-
const [selectedPathIndex, setSelectedPathIndex] = (0,
|
|
5466
|
-
const [startNodeId, setStartNodeId] = (0,
|
|
5467
|
-
const nodeIdsKeyRef = (0,
|
|
5471
|
+
const [currentNodeId, setCurrentNodeId] = (0, import_react54.useState)(null);
|
|
5472
|
+
const [pathHistory, setPathHistory] = (0, import_react54.useState)([]);
|
|
5473
|
+
const [currentStepIndex, setCurrentStepIndex] = (0, import_react54.useState)(-1);
|
|
5474
|
+
const [availablePaths, setAvailablePaths] = (0, import_react54.useState)([]);
|
|
5475
|
+
const [selectedPathIndex, setSelectedPathIndex] = (0, import_react54.useState)(0);
|
|
5476
|
+
const [startNodeId, setStartNodeId] = (0, import_react54.useState)(null);
|
|
5477
|
+
const nodeIdsKeyRef = (0, import_react54.useRef)("");
|
|
5468
5478
|
const computedNodeIdsKey = nodes.map((n) => n.id).join(",");
|
|
5469
5479
|
if (computedNodeIdsKey !== nodeIdsKeyRef.current) {
|
|
5470
5480
|
nodeIdsKeyRef.current = computedNodeIdsKey;
|
|
5471
5481
|
}
|
|
5472
5482
|
const nodeIdsKey = nodeIdsKeyRef.current;
|
|
5473
|
-
const edgeKeyRef = (0,
|
|
5483
|
+
const edgeKeyRef = (0, import_react54.useRef)("");
|
|
5474
5484
|
const computedEdgeKey = edges.map((e) => `${e.source}-${e.target}`).join(",");
|
|
5475
5485
|
if (computedEdgeKey !== edgeKeyRef.current) {
|
|
5476
5486
|
edgeKeyRef.current = computedEdgeKey;
|
|
5477
5487
|
}
|
|
5478
5488
|
const edgeKey = edgeKeyRef.current;
|
|
5479
|
-
(0,
|
|
5489
|
+
(0, import_react54.useEffect)(() => {
|
|
5480
5490
|
if (isFlowVisualization && nodes.length > 0) {
|
|
5481
5491
|
const incomingEdgeMap = /* @__PURE__ */ new Map();
|
|
5482
5492
|
nodes.forEach((node) => incomingEdgeMap.set(node.id, 0));
|
|
@@ -5497,7 +5507,7 @@ var StepWalkthrough_default = (0, import_react53.memo)(function StepWalkthrough(
|
|
|
5497
5507
|
}
|
|
5498
5508
|
}
|
|
5499
5509
|
}, [nodeIdsKey, edgeKey, isFlowVisualization, startNodeId]);
|
|
5500
|
-
(0,
|
|
5510
|
+
(0, import_react54.useEffect)(() => {
|
|
5501
5511
|
if (currentNodeId) {
|
|
5502
5512
|
const outgoingEdges = edges.filter(
|
|
5503
5513
|
(edge) => edge.source === currentNodeId
|
|
@@ -5516,7 +5526,7 @@ var StepWalkthrough_default = (0, import_react53.memo)(function StepWalkthrough(
|
|
|
5516
5526
|
setAvailablePaths([]);
|
|
5517
5527
|
}
|
|
5518
5528
|
}, [currentNodeId, nodeIdsKey, edgeKey]);
|
|
5519
|
-
const handleNextStep = (0,
|
|
5529
|
+
const handleNextStep = (0, import_react54.useCallback)(() => {
|
|
5520
5530
|
if (currentStepIndex === -1) {
|
|
5521
5531
|
if (startNodeId) {
|
|
5522
5532
|
setPathHistory([startNodeId]);
|
|
@@ -5543,7 +5553,7 @@ var StepWalkthrough_default = (0, import_react53.memo)(function StepWalkthrough(
|
|
|
5543
5553
|
currentNodeId,
|
|
5544
5554
|
onStepChange
|
|
5545
5555
|
]);
|
|
5546
|
-
const handlePreviousStep = (0,
|
|
5556
|
+
const handlePreviousStep = (0, import_react54.useCallback)(() => {
|
|
5547
5557
|
if (currentStepIndex > 0) {
|
|
5548
5558
|
const newIndex = currentStepIndex - 1;
|
|
5549
5559
|
const prevNodeId = pathHistory[newIndex];
|
|
@@ -5556,10 +5566,10 @@ var StepWalkthrough_default = (0, import_react53.memo)(function StepWalkthrough(
|
|
|
5556
5566
|
onStepChange(null);
|
|
5557
5567
|
}
|
|
5558
5568
|
}, [currentStepIndex, pathHistory, onStepChange]);
|
|
5559
|
-
const handlePathSelection = (0,
|
|
5569
|
+
const handlePathSelection = (0, import_react54.useCallback)((index) => {
|
|
5560
5570
|
setSelectedPathIndex(index);
|
|
5561
5571
|
}, []);
|
|
5562
|
-
const handleFinish = (0,
|
|
5572
|
+
const handleFinish = (0, import_react54.useCallback)(() => {
|
|
5563
5573
|
setCurrentNodeId(null);
|
|
5564
5574
|
setCurrentStepIndex(-1);
|
|
5565
5575
|
setPathHistory([]);
|
|
@@ -5568,7 +5578,7 @@ var StepWalkthrough_default = (0, import_react53.memo)(function StepWalkthrough(
|
|
|
5568
5578
|
if (!isFlowVisualization || nodes.length === 0 || mode !== "full") {
|
|
5569
5579
|
return null;
|
|
5570
5580
|
}
|
|
5571
|
-
const { title, description } = (0,
|
|
5581
|
+
const { title, description } = (0, import_react54.useMemo)(() => {
|
|
5572
5582
|
if (currentStepIndex === -1) {
|
|
5573
5583
|
return {
|
|
5574
5584
|
title: "Walk through business flow",
|
|
@@ -5681,10 +5691,10 @@ var StepWalkthrough_default = (0, import_react53.memo)(function StepWalkthrough(
|
|
|
5681
5691
|
});
|
|
5682
5692
|
|
|
5683
5693
|
// src/components/StudioModal.tsx
|
|
5684
|
-
var
|
|
5694
|
+
var import_react55 = require("react");
|
|
5685
5695
|
var Dialog2 = __toESM(require("@radix-ui/react-dialog"));
|
|
5686
5696
|
var import_lucide_react19 = require("lucide-react");
|
|
5687
|
-
var
|
|
5697
|
+
var import_react56 = require("@xyflow/react");
|
|
5688
5698
|
|
|
5689
5699
|
// src/utils/export-node-graph.ts
|
|
5690
5700
|
var exportNodeGraphForStudio = (data) => {
|
|
@@ -5749,9 +5759,10 @@ var exportNodeGraphForStudio = (data) => {
|
|
|
5749
5759
|
// src/components/StudioModal.tsx
|
|
5750
5760
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
5751
5761
|
var StudioModal = ({ isOpen, onClose }) => {
|
|
5752
|
-
const [copySuccess, setCopySuccess] = (0,
|
|
5753
|
-
const
|
|
5754
|
-
const
|
|
5762
|
+
const [copySuccess, setCopySuccess] = (0, import_react55.useState)(false);
|
|
5763
|
+
const portalContainer = usePortalContainer();
|
|
5764
|
+
const { toObject } = (0, import_react56.useReactFlow)();
|
|
5765
|
+
const handleCopyToClipboard = (0, import_react55.useCallback)(async () => {
|
|
5755
5766
|
const visualizerData = toObject();
|
|
5756
5767
|
const studioData = exportNodeGraphForStudio(visualizerData);
|
|
5757
5768
|
try {
|
|
@@ -5777,7 +5788,7 @@ var StudioModal = ({ isOpen, onClose }) => {
|
|
|
5777
5788
|
);
|
|
5778
5789
|
onClose();
|
|
5779
5790
|
};
|
|
5780
|
-
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Dialog2.Root, { open: isOpen, onOpenChange: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Dialog2.Portal, { children: [
|
|
5791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Dialog2.Root, { open: isOpen, onOpenChange: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Dialog2.Portal, { container: portalContainer, children: [
|
|
5781
5792
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Dialog2.Overlay, { className: "fixed inset-0 bg-black/50 data-[state=open]:animate-overlayShow z-50" }),
|
|
5782
5793
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Dialog2.Content, { className: "fixed top-1/2 left-1/2 w-[90vw] max-w-md -translate-x-1/2 -translate-y-1/2 rounded-lg bg-white p-6 shadow-xl focus:outline-none data-[state=open]:animate-contentShow z-[100]", children: [
|
|
5783
5794
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Dialog2.Title, { className: "text-lg font-semibold text-gray-900 mb-3", children: "Open in EventCatalog Studio" }),
|
|
@@ -5848,14 +5859,14 @@ var StudioModal = ({ isOpen, onClose }) => {
|
|
|
5848
5859
|
var StudioModal_default = StudioModal;
|
|
5849
5860
|
|
|
5850
5861
|
// src/components/FocusModeModal.tsx
|
|
5851
|
-
var
|
|
5862
|
+
var import_react61 = require("react");
|
|
5852
5863
|
var Dialog3 = __toESM(require("@radix-ui/react-dialog"));
|
|
5853
5864
|
var import_lucide_react21 = require("lucide-react");
|
|
5854
|
-
var
|
|
5865
|
+
var import_react62 = require("@xyflow/react");
|
|
5855
5866
|
|
|
5856
5867
|
// src/components/FocusMode/FocusModeContent.tsx
|
|
5857
|
-
var
|
|
5858
|
-
var
|
|
5868
|
+
var import_react59 = require("react");
|
|
5869
|
+
var import_react60 = require("@xyflow/react");
|
|
5859
5870
|
|
|
5860
5871
|
// src/components/FocusMode/utils.ts
|
|
5861
5872
|
function getConnectedNodes(centerNodeId, nodes, edges) {
|
|
@@ -5936,7 +5947,7 @@ function getNodeDocUrl(node) {
|
|
|
5936
5947
|
}
|
|
5937
5948
|
|
|
5938
5949
|
// src/components/FocusMode/FocusModeNodeActions.tsx
|
|
5939
|
-
var
|
|
5950
|
+
var import_react57 = require("@xyflow/react");
|
|
5940
5951
|
var import_lucide_react20 = require("lucide-react");
|
|
5941
5952
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
5942
5953
|
var FocusModeNodeActions = ({
|
|
@@ -5944,13 +5955,13 @@ var FocusModeNodeActions = ({
|
|
|
5944
5955
|
isCenter,
|
|
5945
5956
|
onSwitch
|
|
5946
5957
|
}) => {
|
|
5947
|
-
const { zoom } = (0,
|
|
5958
|
+
const { zoom } = (0, import_react57.useViewport)();
|
|
5948
5959
|
if (node.type === "placeholder") return null;
|
|
5949
5960
|
const docUrl = getNodeDocUrl(node);
|
|
5950
5961
|
const direction = (node.position?.x ?? 0) < 0 ? "left" : "right";
|
|
5951
|
-
const baseButtonSize =
|
|
5952
|
-
const baseIconSize =
|
|
5953
|
-
const scaleFactor = Math.max(0.
|
|
5962
|
+
const baseButtonSize = 24;
|
|
5963
|
+
const baseIconSize = 12;
|
|
5964
|
+
const scaleFactor = Math.max(0.4, Math.min(1, zoom));
|
|
5954
5965
|
const buttonSize = Math.round(baseButtonSize * scaleFactor);
|
|
5955
5966
|
const iconSize = Math.round(baseIconSize * scaleFactor);
|
|
5956
5967
|
const handleSwitch = (e) => {
|
|
@@ -5966,10 +5977,10 @@ var FocusModeNodeActions = ({
|
|
|
5966
5977
|
if (isCenter) {
|
|
5967
5978
|
if (!docUrl) return null;
|
|
5968
5979
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5969
|
-
|
|
5980
|
+
import_react57.NodeToolbar,
|
|
5970
5981
|
{
|
|
5971
5982
|
nodeId: node.id,
|
|
5972
|
-
position:
|
|
5983
|
+
position: import_react57.Position.Bottom,
|
|
5973
5984
|
isVisible: true,
|
|
5974
5985
|
offset: -16,
|
|
5975
5986
|
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
@@ -5993,10 +6004,10 @@ var FocusModeNodeActions = ({
|
|
|
5993
6004
|
);
|
|
5994
6005
|
}
|
|
5995
6006
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5996
|
-
|
|
6007
|
+
import_react57.NodeToolbar,
|
|
5997
6008
|
{
|
|
5998
6009
|
nodeId: node.id,
|
|
5999
|
-
position:
|
|
6010
|
+
position: import_react57.Position.Bottom,
|
|
6000
6011
|
isVisible: true,
|
|
6001
6012
|
offset: -16,
|
|
6002
6013
|
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
@@ -6034,7 +6045,7 @@ var FocusModeNodeActions = ({
|
|
|
6034
6045
|
var FocusModeNodeActions_default = FocusModeNodeActions;
|
|
6035
6046
|
|
|
6036
6047
|
// src/components/FocusMode/FocusModePlaceholder.tsx
|
|
6037
|
-
var
|
|
6048
|
+
var import_react58 = require("@xyflow/react");
|
|
6038
6049
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
6039
6050
|
var FocusModePlaceholder = ({
|
|
6040
6051
|
data
|
|
@@ -6047,19 +6058,19 @@ var FocusModePlaceholder = ({
|
|
|
6047
6058
|
style: { opacity: 0.6, minHeight: "130px" },
|
|
6048
6059
|
children: [
|
|
6049
6060
|
side === "right" && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
6050
|
-
|
|
6061
|
+
import_react58.Handle,
|
|
6051
6062
|
{
|
|
6052
6063
|
type: "target",
|
|
6053
|
-
position:
|
|
6064
|
+
position: import_react58.Position.Left,
|
|
6054
6065
|
style: { visibility: "hidden" }
|
|
6055
6066
|
}
|
|
6056
6067
|
),
|
|
6057
6068
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "text-center text-sm text-[rgb(var(--ec-page-text-muted))] italic", children: label }),
|
|
6058
6069
|
side === "left" && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
6059
|
-
|
|
6070
|
+
import_react58.Handle,
|
|
6060
6071
|
{
|
|
6061
6072
|
type: "source",
|
|
6062
|
-
position:
|
|
6073
|
+
position: import_react58.Position.Right,
|
|
6063
6074
|
style: { visibility: "hidden" }
|
|
6064
6075
|
}
|
|
6065
6076
|
)
|
|
@@ -6082,21 +6093,21 @@ var FocusModeContent = ({
|
|
|
6082
6093
|
edgeTypes: edgeTypes2,
|
|
6083
6094
|
onSwitchCenter
|
|
6084
6095
|
}) => {
|
|
6085
|
-
const { fitView } = (0,
|
|
6086
|
-
const [isAnimating, setIsAnimating] = (0,
|
|
6087
|
-
const [needsFitView, setNeedsFitView] = (0,
|
|
6088
|
-
const [hoveredEdgeId, setHoveredEdgeId] = (0,
|
|
6089
|
-
const [isReady, setIsReady] = (0,
|
|
6090
|
-
const reactFlowInitialized = (0,
|
|
6091
|
-
const animationTimeoutRef = (0,
|
|
6092
|
-
(0,
|
|
6096
|
+
const { fitView } = (0, import_react60.useReactFlow)();
|
|
6097
|
+
const [isAnimating, setIsAnimating] = (0, import_react59.useState)(false);
|
|
6098
|
+
const [needsFitView, setNeedsFitView] = (0, import_react59.useState)(false);
|
|
6099
|
+
const [hoveredEdgeId, setHoveredEdgeId] = (0, import_react59.useState)(null);
|
|
6100
|
+
const [isReady, setIsReady] = (0, import_react59.useState)(false);
|
|
6101
|
+
const reactFlowInitialized = (0, import_react59.useRef)(false);
|
|
6102
|
+
const animationTimeoutRef = (0, import_react59.useRef)(null);
|
|
6103
|
+
(0, import_react59.useEffect)(() => {
|
|
6093
6104
|
return () => {
|
|
6094
6105
|
if (animationTimeoutRef.current) {
|
|
6095
6106
|
clearTimeout(animationTimeoutRef.current);
|
|
6096
6107
|
}
|
|
6097
6108
|
};
|
|
6098
6109
|
}, []);
|
|
6099
|
-
const calculateFocusedGraph = (0,
|
|
6110
|
+
const calculateFocusedGraph = (0, import_react59.useCallback)(
|
|
6100
6111
|
(centerId) => {
|
|
6101
6112
|
const centerNode = allNodes.find((n) => n.id === centerId);
|
|
6102
6113
|
if (!centerNode) {
|
|
@@ -6179,19 +6190,19 @@ var FocusModeContent = ({
|
|
|
6179
6190
|
},
|
|
6180
6191
|
[allNodes, allEdges]
|
|
6181
6192
|
);
|
|
6182
|
-
const initialGraph = (0,
|
|
6193
|
+
const initialGraph = (0, import_react59.useMemo)(
|
|
6183
6194
|
() => calculateFocusedGraph(centerNodeId),
|
|
6184
6195
|
[centerNodeId, calculateFocusedGraph]
|
|
6185
6196
|
);
|
|
6186
|
-
const [displayNodes, setDisplayNodes] = (0,
|
|
6187
|
-
const [displayEdges, setDisplayEdges] = (0,
|
|
6188
|
-
(0,
|
|
6197
|
+
const [displayNodes, setDisplayNodes] = (0, import_react60.useNodesState)(initialGraph.nodes);
|
|
6198
|
+
const [displayEdges, setDisplayEdges] = (0, import_react60.useEdgesState)(initialGraph.edges);
|
|
6199
|
+
(0, import_react59.useEffect)(() => {
|
|
6189
6200
|
const { nodes, edges } = calculateFocusedGraph(centerNodeId);
|
|
6190
6201
|
setDisplayNodes(nodes);
|
|
6191
6202
|
setDisplayEdges(edges);
|
|
6192
6203
|
setNeedsFitView(true);
|
|
6193
6204
|
}, [centerNodeId, calculateFocusedGraph, setDisplayNodes, setDisplayEdges]);
|
|
6194
|
-
(0,
|
|
6205
|
+
(0, import_react59.useEffect)(() => {
|
|
6195
6206
|
if (needsFitView && reactFlowInitialized.current) {
|
|
6196
6207
|
const timer = setTimeout(() => {
|
|
6197
6208
|
fitView({ padding: 0.2, duration: 300 });
|
|
@@ -6200,14 +6211,14 @@ var FocusModeContent = ({
|
|
|
6200
6211
|
return () => clearTimeout(timer);
|
|
6201
6212
|
}
|
|
6202
6213
|
}, [needsFitView, displayNodes, fitView]);
|
|
6203
|
-
const handleInit = (0,
|
|
6214
|
+
const handleInit = (0, import_react59.useCallback)(() => {
|
|
6204
6215
|
reactFlowInitialized.current = true;
|
|
6205
6216
|
requestAnimationFrame(() => {
|
|
6206
6217
|
fitView({ padding: 0.2, duration: 0 });
|
|
6207
6218
|
setIsReady(true);
|
|
6208
6219
|
});
|
|
6209
6220
|
}, [fitView]);
|
|
6210
|
-
const handleSwitchNode = (0,
|
|
6221
|
+
const handleSwitchNode = (0, import_react59.useCallback)(
|
|
6211
6222
|
(nodeId, direction) => {
|
|
6212
6223
|
if (nodeId === centerNodeId || isAnimating) return;
|
|
6213
6224
|
setIsAnimating(true);
|
|
@@ -6243,7 +6254,7 @@ var FocusModeContent = ({
|
|
|
6243
6254
|
},
|
|
6244
6255
|
[centerNodeId, isAnimating, setDisplayNodes, onSwitchCenter]
|
|
6245
6256
|
);
|
|
6246
|
-
const handleNodeClick = (0,
|
|
6257
|
+
const handleNodeClick = (0, import_react59.useCallback)(
|
|
6247
6258
|
(_, clickedNode) => {
|
|
6248
6259
|
if (clickedNode.id === centerNodeId || isAnimating) return;
|
|
6249
6260
|
const direction = (clickedNode.position?.x ?? 0) < 0 ? "left" : "right";
|
|
@@ -6251,16 +6262,16 @@ var FocusModeContent = ({
|
|
|
6251
6262
|
},
|
|
6252
6263
|
[centerNodeId, isAnimating, handleSwitchNode]
|
|
6253
6264
|
);
|
|
6254
|
-
const handleEdgeMouseEnter = (0,
|
|
6265
|
+
const handleEdgeMouseEnter = (0, import_react59.useCallback)(
|
|
6255
6266
|
(_, edge) => {
|
|
6256
6267
|
setHoveredEdgeId(edge.id);
|
|
6257
6268
|
},
|
|
6258
6269
|
[]
|
|
6259
6270
|
);
|
|
6260
|
-
const handleEdgeMouseLeave = (0,
|
|
6271
|
+
const handleEdgeMouseLeave = (0, import_react59.useCallback)(() => {
|
|
6261
6272
|
setHoveredEdgeId(null);
|
|
6262
6273
|
}, []);
|
|
6263
|
-
const edgesWithHover = (0,
|
|
6274
|
+
const edgesWithHover = (0, import_react59.useMemo)(() => {
|
|
6264
6275
|
return displayEdges.map((edge) => {
|
|
6265
6276
|
if (edge.id === hoveredEdgeId) {
|
|
6266
6277
|
return {
|
|
@@ -6271,7 +6282,7 @@ var FocusModeContent = ({
|
|
|
6271
6282
|
return edge;
|
|
6272
6283
|
});
|
|
6273
6284
|
}, [displayEdges, hoveredEdgeId]);
|
|
6274
|
-
const mergedNodeTypes = (0,
|
|
6285
|
+
const mergedNodeTypes = (0, import_react59.useMemo)(
|
|
6275
6286
|
() => ({
|
|
6276
6287
|
...nodeTypes,
|
|
6277
6288
|
placeholder: FocusModePlaceholder_default
|
|
@@ -6287,7 +6298,7 @@ var FocusModeContent = ({
|
|
|
6287
6298
|
className: "h-full w-full focus-mode-container",
|
|
6288
6299
|
style: { opacity: isReady ? 1 : 0 },
|
|
6289
6300
|
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
6290
|
-
|
|
6301
|
+
import_react60.ReactFlow,
|
|
6291
6302
|
{
|
|
6292
6303
|
nodes: displayNodes,
|
|
6293
6304
|
edges: edgesWithHover,
|
|
@@ -6306,8 +6317,8 @@ var FocusModeContent = ({
|
|
|
6306
6317
|
minZoom: 0.3,
|
|
6307
6318
|
maxZoom: 2,
|
|
6308
6319
|
children: [
|
|
6309
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
6310
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
6320
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react60.Background, { color: "rgb(var(--ec-page-border))", gap: 20 }),
|
|
6321
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react60.Controls, { showInteractive: false }),
|
|
6311
6322
|
displayNodes.map((node, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
6312
6323
|
FocusModeNodeActions_default,
|
|
6313
6324
|
{
|
|
@@ -6336,16 +6347,17 @@ var FocusModeModal = ({
|
|
|
6336
6347
|
nodeTypes,
|
|
6337
6348
|
edgeTypes: edgeTypes2
|
|
6338
6349
|
}) => {
|
|
6339
|
-
const [centerNodeId, setCenterNodeId] = (0,
|
|
6350
|
+
const [centerNodeId, setCenterNodeId] = (0, import_react61.useState)(
|
|
6340
6351
|
initialNodeId
|
|
6341
6352
|
);
|
|
6342
6353
|
const isDark = useDarkMode();
|
|
6343
|
-
|
|
6354
|
+
const portalContainer = usePortalContainer();
|
|
6355
|
+
(0, import_react61.useEffect)(() => {
|
|
6344
6356
|
if (isOpen && initialNodeId) {
|
|
6345
6357
|
setCenterNodeId(initialNodeId);
|
|
6346
6358
|
}
|
|
6347
6359
|
}, [isOpen, initialNodeId]);
|
|
6348
|
-
const handleSwitchCenter = (0,
|
|
6360
|
+
const handleSwitchCenter = (0, import_react61.useCallback)(
|
|
6349
6361
|
(newCenterNodeId, _direction) => {
|
|
6350
6362
|
setCenterNodeId(newCenterNodeId);
|
|
6351
6363
|
},
|
|
@@ -6356,151 +6368,150 @@ var FocusModeModal = ({
|
|
|
6356
6368
|
if (!centerNodeId) {
|
|
6357
6369
|
return null;
|
|
6358
6370
|
}
|
|
6359
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Dialog3.Root, { open: isOpen, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
6360
|
-
|
|
6371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Dialog3.Root, { open: isOpen, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Dialog3.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
6372
|
+
"div",
|
|
6361
6373
|
{
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
"
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6382
|
-
|
|
6383
|
-
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
|
|
6395
|
-
|
|
6396
|
-
|
|
6397
|
-
|
|
6398
|
-
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6374
|
+
className: "eventcatalog-visualizer",
|
|
6375
|
+
style: {
|
|
6376
|
+
position: "fixed",
|
|
6377
|
+
inset: 0,
|
|
6378
|
+
isolation: "isolate",
|
|
6379
|
+
zIndex: 99999
|
|
6380
|
+
},
|
|
6381
|
+
children: [
|
|
6382
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
6383
|
+
Dialog3.Overlay,
|
|
6384
|
+
{
|
|
6385
|
+
style: {
|
|
6386
|
+
position: "fixed",
|
|
6387
|
+
inset: 0,
|
|
6388
|
+
background: isDark ? "rgba(0, 0, 0, 0.75)" : "rgba(15, 23, 42, 0.55)",
|
|
6389
|
+
backdropFilter: "blur(2px)"
|
|
6390
|
+
}
|
|
6391
|
+
}
|
|
6392
|
+
),
|
|
6393
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
6394
|
+
Dialog3.Content,
|
|
6395
|
+
{
|
|
6396
|
+
style: {
|
|
6397
|
+
position: "fixed",
|
|
6398
|
+
inset: "5%",
|
|
6399
|
+
borderRadius: 12,
|
|
6400
|
+
background: isDark ? "#0f172a" : "#ffffff",
|
|
6401
|
+
border: `1px solid ${isDark ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.08)"}`,
|
|
6402
|
+
boxShadow: isDark ? "0 24px 48px rgba(0,0,0,0.5)" : "0 24px 48px rgba(0,0,0,0.15)",
|
|
6403
|
+
outline: "none",
|
|
6404
|
+
display: "flex",
|
|
6405
|
+
flexDirection: "column",
|
|
6406
|
+
overflow: "hidden"
|
|
6407
|
+
},
|
|
6408
|
+
children: [
|
|
6409
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
6410
|
+
"div",
|
|
6411
|
+
{
|
|
6412
|
+
style: {
|
|
6413
|
+
display: "flex",
|
|
6414
|
+
alignItems: "center",
|
|
6415
|
+
justifyContent: "space-between",
|
|
6416
|
+
padding: "1rem 1.5rem",
|
|
6417
|
+
borderBottom: `1px solid ${isDark ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.08)"}`,
|
|
6418
|
+
flexShrink: 0
|
|
6419
|
+
},
|
|
6420
|
+
children: [
|
|
6421
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: 12 }, children: [
|
|
6422
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
6423
|
+
"div",
|
|
6424
|
+
{
|
|
6425
|
+
style: {
|
|
6426
|
+
display: "flex",
|
|
6427
|
+
alignItems: "center",
|
|
6428
|
+
justifyContent: "center",
|
|
6429
|
+
width: 40,
|
|
6430
|
+
height: 40,
|
|
6431
|
+
borderRadius: 10,
|
|
6432
|
+
background: isDark ? "rgba(59, 130, 246, 0.18)" : "rgba(59, 130, 246, 0.12)"
|
|
6433
|
+
},
|
|
6434
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
6435
|
+
import_lucide_react21.FocusIcon,
|
|
6411
6436
|
{
|
|
6412
6437
|
style: {
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
width: 40,
|
|
6417
|
-
height: 40,
|
|
6418
|
-
borderRadius: 10,
|
|
6419
|
-
background: isDark ? "rgba(59, 130, 246, 0.18)" : "rgba(59, 130, 246, 0.12)"
|
|
6420
|
-
},
|
|
6421
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
6422
|
-
import_lucide_react21.FocusIcon,
|
|
6423
|
-
{
|
|
6424
|
-
style: {
|
|
6425
|
-
width: 20,
|
|
6426
|
-
height: 20,
|
|
6427
|
-
color: isDark ? "#93c5fd" : "#2563eb"
|
|
6428
|
-
}
|
|
6429
|
-
}
|
|
6430
|
-
)
|
|
6431
|
-
}
|
|
6432
|
-
),
|
|
6433
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { children: [
|
|
6434
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
6435
|
-
Dialog3.Title,
|
|
6436
|
-
{
|
|
6437
|
-
style: {
|
|
6438
|
-
fontSize: 18,
|
|
6439
|
-
fontWeight: 600,
|
|
6440
|
-
color: isDark ? "#f8fafc" : "#0f172a"
|
|
6441
|
-
},
|
|
6442
|
-
children: "Focus Mode"
|
|
6443
|
-
}
|
|
6444
|
-
),
|
|
6445
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
6446
|
-
Dialog3.Description,
|
|
6447
|
-
{
|
|
6448
|
-
style: {
|
|
6449
|
-
marginTop: 2,
|
|
6450
|
-
fontSize: 14,
|
|
6451
|
-
color: isDark ? "#94a3b8" : "#475569"
|
|
6452
|
-
},
|
|
6453
|
-
children: centerNodeInfo ? `Exploring: ${centerNodeInfo.name} - Click on connected nodes to navigate` : "Explore node connections"
|
|
6438
|
+
width: 20,
|
|
6439
|
+
height: 20,
|
|
6440
|
+
color: isDark ? "#93c5fd" : "#2563eb"
|
|
6454
6441
|
}
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6442
|
+
}
|
|
6443
|
+
)
|
|
6444
|
+
}
|
|
6445
|
+
),
|
|
6446
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { children: [
|
|
6447
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
6448
|
+
Dialog3.Title,
|
|
6460
6449
|
{
|
|
6461
6450
|
style: {
|
|
6462
|
-
|
|
6463
|
-
|
|
6464
|
-
|
|
6465
|
-
width: 40,
|
|
6466
|
-
height: 40,
|
|
6467
|
-
borderRadius: 10,
|
|
6468
|
-
border: "none",
|
|
6469
|
-
cursor: "pointer",
|
|
6470
|
-
background: "transparent",
|
|
6471
|
-
color: isDark ? "#94a3b8" : "#64748b"
|
|
6451
|
+
fontSize: 18,
|
|
6452
|
+
fontWeight: 600,
|
|
6453
|
+
color: isDark ? "#f8fafc" : "#0f172a"
|
|
6472
6454
|
},
|
|
6473
|
-
|
|
6474
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react21.XIcon, { style: { width: 20, height: 20 } })
|
|
6455
|
+
children: "Focus Mode"
|
|
6475
6456
|
}
|
|
6476
|
-
)
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
}
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
|
|
6496
|
-
|
|
6457
|
+
),
|
|
6458
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
6459
|
+
Dialog3.Description,
|
|
6460
|
+
{
|
|
6461
|
+
style: {
|
|
6462
|
+
marginTop: 2,
|
|
6463
|
+
fontSize: 14,
|
|
6464
|
+
color: isDark ? "#94a3b8" : "#475569"
|
|
6465
|
+
},
|
|
6466
|
+
children: centerNodeInfo ? `Exploring: ${centerNodeInfo.name} - Click on connected nodes to navigate` : "Explore node connections"
|
|
6467
|
+
}
|
|
6468
|
+
)
|
|
6469
|
+
] })
|
|
6470
|
+
] }),
|
|
6471
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Dialog3.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
6472
|
+
"button",
|
|
6473
|
+
{
|
|
6474
|
+
style: {
|
|
6475
|
+
display: "flex",
|
|
6476
|
+
alignItems: "center",
|
|
6477
|
+
justifyContent: "center",
|
|
6478
|
+
width: 40,
|
|
6479
|
+
height: 40,
|
|
6480
|
+
borderRadius: 10,
|
|
6481
|
+
border: "none",
|
|
6482
|
+
cursor: "pointer",
|
|
6483
|
+
background: "transparent",
|
|
6484
|
+
color: isDark ? "#94a3b8" : "#64748b"
|
|
6485
|
+
},
|
|
6486
|
+
"aria-label": "Close",
|
|
6487
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react21.XIcon, { style: { width: 20, height: 20 } })
|
|
6488
|
+
}
|
|
6489
|
+
) })
|
|
6490
|
+
]
|
|
6491
|
+
}
|
|
6492
|
+
),
|
|
6493
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { style: { flex: 1, overflow: "hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react62.ReactFlowProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
6494
|
+
FocusModeContent_default,
|
|
6495
|
+
{
|
|
6496
|
+
centerNodeId,
|
|
6497
|
+
nodes,
|
|
6498
|
+
edges,
|
|
6499
|
+
nodeTypes,
|
|
6500
|
+
edgeTypes: edgeTypes2,
|
|
6501
|
+
onSwitchCenter: handleSwitchCenter
|
|
6502
|
+
}
|
|
6503
|
+
) }) })
|
|
6504
|
+
]
|
|
6505
|
+
}
|
|
6506
|
+
)
|
|
6507
|
+
]
|
|
6497
6508
|
}
|
|
6498
|
-
) });
|
|
6509
|
+
) }) });
|
|
6499
6510
|
};
|
|
6500
6511
|
var FocusModeModal_default = FocusModeModal;
|
|
6501
6512
|
|
|
6502
6513
|
// src/components/MermaidView.tsx
|
|
6503
|
-
var
|
|
6514
|
+
var import_react63 = require("react");
|
|
6504
6515
|
var import_lucide_react22 = require("lucide-react");
|
|
6505
6516
|
|
|
6506
6517
|
// src/utils/export-mermaid.ts
|
|
@@ -6746,22 +6757,22 @@ var MermaidView = ({
|
|
|
6746
6757
|
edges,
|
|
6747
6758
|
maxTextSize = 1e5
|
|
6748
6759
|
}) => {
|
|
6749
|
-
const [copySuccess, setCopySuccess] = (0,
|
|
6750
|
-
const [mermaidCode, setMermaidCode] = (0,
|
|
6751
|
-
const [previewSvg, setPreviewSvg] = (0,
|
|
6752
|
-
const [previewError, setPreviewError] = (0,
|
|
6753
|
-
const [isRendering, setIsRendering] = (0,
|
|
6754
|
-
const containerRef = (0,
|
|
6755
|
-
const svgContainerRef = (0,
|
|
6756
|
-
const panZoomInstanceRef = (0,
|
|
6757
|
-
(0,
|
|
6760
|
+
const [copySuccess, setCopySuccess] = (0, import_react63.useState)(false);
|
|
6761
|
+
const [mermaidCode, setMermaidCode] = (0, import_react63.useState)("");
|
|
6762
|
+
const [previewSvg, setPreviewSvg] = (0, import_react63.useState)(null);
|
|
6763
|
+
const [previewError, setPreviewError] = (0, import_react63.useState)(null);
|
|
6764
|
+
const [isRendering, setIsRendering] = (0, import_react63.useState)(true);
|
|
6765
|
+
const containerRef = (0, import_react63.useRef)(null);
|
|
6766
|
+
const svgContainerRef = (0, import_react63.useRef)(null);
|
|
6767
|
+
const panZoomInstanceRef = (0, import_react63.useRef)(null);
|
|
6768
|
+
(0, import_react63.useEffect)(() => {
|
|
6758
6769
|
const code = convertToMermaid(nodes, edges, {
|
|
6759
6770
|
includeStyles: true,
|
|
6760
6771
|
direction: "LR"
|
|
6761
6772
|
});
|
|
6762
6773
|
setMermaidCode(code);
|
|
6763
6774
|
}, [nodes, edges]);
|
|
6764
|
-
(0,
|
|
6775
|
+
(0, import_react63.useEffect)(() => {
|
|
6765
6776
|
if (!mermaidCode) return;
|
|
6766
6777
|
let cancelled = false;
|
|
6767
6778
|
setIsRendering(true);
|
|
@@ -6806,7 +6817,7 @@ var MermaidView = ({
|
|
|
6806
6817
|
cancelled = true;
|
|
6807
6818
|
};
|
|
6808
6819
|
}, [mermaidCode]);
|
|
6809
|
-
(0,
|
|
6820
|
+
(0, import_react63.useEffect)(() => {
|
|
6810
6821
|
if (!previewSvg || !svgContainerRef.current) return;
|
|
6811
6822
|
const initZoom = async () => {
|
|
6812
6823
|
const svgElement = svgContainerRef.current?.querySelector("svg");
|
|
@@ -6845,7 +6856,7 @@ var MermaidView = ({
|
|
|
6845
6856
|
}
|
|
6846
6857
|
};
|
|
6847
6858
|
}, [previewSvg]);
|
|
6848
|
-
const handleCopyToClipboard = (0,
|
|
6859
|
+
const handleCopyToClipboard = (0, import_react63.useCallback)(async () => {
|
|
6849
6860
|
await copyToClipboard(mermaidCode);
|
|
6850
6861
|
setCopySuccess(true);
|
|
6851
6862
|
setTimeout(() => setCopySuccess(false), 2e3);
|
|
@@ -6958,12 +6969,12 @@ var MermaidView = ({
|
|
|
6958
6969
|
var MermaidView_default = MermaidView;
|
|
6959
6970
|
|
|
6960
6971
|
// src/components/VisualizerDropdownContent.tsx
|
|
6961
|
-
var
|
|
6972
|
+
var import_react64 = require("react");
|
|
6962
6973
|
var DropdownMenu = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
6963
6974
|
var import_lucide_react23 = require("lucide-react");
|
|
6964
6975
|
var import_outline2 = require("@heroicons/react/24/outline");
|
|
6965
6976
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
6966
|
-
var VisualizerDropdownContent = (0,
|
|
6977
|
+
var VisualizerDropdownContent = (0, import_react64.memo)(
|
|
6967
6978
|
({
|
|
6968
6979
|
isMermaidView,
|
|
6969
6980
|
setIsMermaidView,
|
|
@@ -6989,7 +7000,8 @@ var VisualizerDropdownContent = (0, import_react63.memo)(
|
|
|
6989
7000
|
notesCount = 0,
|
|
6990
7001
|
onOpenNotes
|
|
6991
7002
|
}) => {
|
|
6992
|
-
const [layoutStatus, setLayoutStatus] = (0,
|
|
7003
|
+
const [layoutStatus, setLayoutStatus] = (0, import_react64.useState)("idle");
|
|
7004
|
+
const portalContainer = usePortalContainer();
|
|
6993
7005
|
const handleSaveLayout = async () => {
|
|
6994
7006
|
if (!onSaveLayout) return;
|
|
6995
7007
|
setLayoutStatus("saving");
|
|
@@ -7035,7 +7047,7 @@ var VisualizerDropdownContent = (0, import_react63.memo)(
|
|
|
7035
7047
|
}
|
|
7036
7048
|
)
|
|
7037
7049
|
] }),
|
|
7038
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropdownMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
7050
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropdownMenu.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
7039
7051
|
DropdownMenu.SubContent,
|
|
7040
7052
|
{
|
|
7041
7053
|
className: "min-w-[200px] bg-[rgb(var(--ec-card-bg))] rounded-lg shadow-xl border border-[rgb(var(--ec-page-border))] py-1.5 z-[60]",
|
|
@@ -7213,7 +7225,7 @@ var VisualizerDropdownContent = (0, import_react63.memo)(
|
|
|
7213
7225
|
}
|
|
7214
7226
|
)
|
|
7215
7227
|
] }),
|
|
7216
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropdownMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
7228
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropdownMenu.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
7217
7229
|
DropdownMenu.SubContent,
|
|
7218
7230
|
{
|
|
7219
7231
|
className: "min-w-[180px] bg-[rgb(var(--ec-card-bg))] rounded-lg shadow-xl border border-[rgb(var(--ec-page-border))] py-1.5 z-[60]",
|
|
@@ -7327,17 +7339,18 @@ VisualizerDropdownContent.displayName = "VisualizerDropdownContent";
|
|
|
7327
7339
|
var VisualizerDropdownContent_default = VisualizerDropdownContent;
|
|
7328
7340
|
|
|
7329
7341
|
// src/components/NodeContextMenu.tsx
|
|
7330
|
-
var
|
|
7342
|
+
var import_react65 = require("react");
|
|
7331
7343
|
var ContextMenu5 = __toESM(require("@radix-ui/react-context-menu"));
|
|
7332
7344
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
7333
|
-
var NodeContextMenu_default = (0,
|
|
7345
|
+
var NodeContextMenu_default = (0, import_react65.memo)(function NodeContextMenu({
|
|
7334
7346
|
items,
|
|
7335
7347
|
children
|
|
7336
7348
|
}) {
|
|
7349
|
+
const portalContainer = usePortalContainer();
|
|
7337
7350
|
if (!items || items.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_jsx_runtime36.Fragment, { children });
|
|
7338
7351
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(ContextMenu5.Root, { children: [
|
|
7339
7352
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ContextMenu5.Trigger, { children }),
|
|
7340
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ContextMenu5.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
7353
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ContextMenu5.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
7341
7354
|
ContextMenu5.Content,
|
|
7342
7355
|
{
|
|
7343
7356
|
className: "min-w-[220px] bg-white rounded-md p-1 shadow-md border border-gray-200 z-50",
|
|
@@ -7368,7 +7381,7 @@ var NodeContextMenu_default = (0, import_react64.memo)(function NodeContextMenu(
|
|
|
7368
7381
|
|
|
7369
7382
|
// src/utils/layout.ts
|
|
7370
7383
|
var import_dagre = __toESM(require("dagre"));
|
|
7371
|
-
var
|
|
7384
|
+
var import_react66 = require("@xyflow/react");
|
|
7372
7385
|
var GROUP_HEADER_HEIGHT = 44;
|
|
7373
7386
|
var GROUP_CONTENT_PADDING_TOP = 50;
|
|
7374
7387
|
var GROUP_CONTENT_PADDING_BOTTOM = 30;
|
|
@@ -7769,7 +7782,7 @@ function layoutGraph(nodes, edges, options = {}, style) {
|
|
|
7769
7782
|
const isFlowStep = edge.type === "flow-step";
|
|
7770
7783
|
const isBidirectional = edge.type === "reads-writes";
|
|
7771
7784
|
const arrowMarker = {
|
|
7772
|
-
type:
|
|
7785
|
+
type: import_react66.MarkerType.ArrowClosed,
|
|
7773
7786
|
width: 20,
|
|
7774
7787
|
height: 20,
|
|
7775
7788
|
color: "rgb(var(--ec-page-text-muted))"
|
|
@@ -7826,7 +7839,7 @@ function flatLayout(nodes, edges, graphOpts, nodeSize, style) {
|
|
|
7826
7839
|
const isFlowStep = edge.type === "flow-step";
|
|
7827
7840
|
const isBidirectional = edge.type === "reads-writes";
|
|
7828
7841
|
const arrowMarker = {
|
|
7829
|
-
type:
|
|
7842
|
+
type: import_react66.MarkerType.ArrowClosed,
|
|
7830
7843
|
width: 20,
|
|
7831
7844
|
height: 20,
|
|
7832
7845
|
color: "rgb(var(--ec-page-text-muted))"
|
|
@@ -7846,9 +7859,9 @@ function flatLayout(nodes, edges, graphOpts, nodeSize, style) {
|
|
|
7846
7859
|
}
|
|
7847
7860
|
|
|
7848
7861
|
// src/components/NotesToolbarButton.tsx
|
|
7849
|
-
var
|
|
7862
|
+
var import_react67 = require("react");
|
|
7850
7863
|
var import_lucide_react24 = require("lucide-react");
|
|
7851
|
-
var
|
|
7864
|
+
var import_react68 = require("@xyflow/react");
|
|
7852
7865
|
var Dialog4 = __toESM(require("@radix-ui/react-dialog"));
|
|
7853
7866
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
7854
7867
|
var NODE_TYPE_META = {
|
|
@@ -8109,11 +8122,12 @@ function AllNotesModal({
|
|
|
8109
8122
|
onClose,
|
|
8110
8123
|
nodes
|
|
8111
8124
|
}) {
|
|
8112
|
-
const { setCenter, getZoom } = (0,
|
|
8113
|
-
const [selectedIdx, setSelectedIdx] = (0,
|
|
8125
|
+
const { setCenter, getZoom } = (0, import_react68.useReactFlow)();
|
|
8126
|
+
const [selectedIdx, setSelectedIdx] = (0, import_react67.useState)(0);
|
|
8127
|
+
const portalContainer = usePortalContainer();
|
|
8114
8128
|
const totalNotes = noteGroups.reduce((sum, g) => sum + g.notes.length, 0);
|
|
8115
8129
|
const selected = noteGroups[selectedIdx] || noteGroups[0];
|
|
8116
|
-
const handleNavigate = (0,
|
|
8130
|
+
const handleNavigate = (0, import_react67.useCallback)(
|
|
8117
8131
|
(nodeId) => {
|
|
8118
8132
|
const node = nodes.find((n) => n.id === nodeId);
|
|
8119
8133
|
if (!node) return;
|
|
@@ -8137,421 +8151,415 @@ function AllNotesModal({
|
|
|
8137
8151
|
setSelectedIdx(0);
|
|
8138
8152
|
}
|
|
8139
8153
|
},
|
|
8140
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8141
|
-
|
|
8154
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Dialog4.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
8155
|
+
"div",
|
|
8142
8156
|
{
|
|
8143
|
-
|
|
8144
|
-
|
|
8145
|
-
|
|
8146
|
-
|
|
8147
|
-
|
|
8148
|
-
|
|
8149
|
-
|
|
8150
|
-
|
|
8151
|
-
|
|
8152
|
-
|
|
8153
|
-
|
|
8154
|
-
|
|
8155
|
-
|
|
8156
|
-
|
|
8157
|
-
|
|
8158
|
-
|
|
8159
|
-
|
|
8160
|
-
|
|
8161
|
-
|
|
8162
|
-
|
|
8163
|
-
|
|
8164
|
-
|
|
8165
|
-
|
|
8166
|
-
|
|
8167
|
-
|
|
8168
|
-
|
|
8169
|
-
|
|
8170
|
-
|
|
8171
|
-
|
|
8172
|
-
|
|
8173
|
-
|
|
8174
|
-
|
|
8175
|
-
|
|
8176
|
-
|
|
8177
|
-
|
|
8178
|
-
|
|
8179
|
-
|
|
8180
|
-
|
|
8181
|
-
|
|
8182
|
-
|
|
8183
|
-
"
|
|
8184
|
-
|
|
8185
|
-
|
|
8186
|
-
|
|
8187
|
-
|
|
8188
|
-
|
|
8189
|
-
|
|
8190
|
-
gap: 12,
|
|
8191
|
-
flexShrink: 0
|
|
8192
|
-
},
|
|
8193
|
-
children: [
|
|
8194
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8195
|
-
"div",
|
|
8196
|
-
{
|
|
8197
|
-
style: {
|
|
8198
|
-
width: 32,
|
|
8199
|
-
height: 32,
|
|
8200
|
-
borderRadius: 8,
|
|
8201
|
-
background: "#f1f5f9",
|
|
8202
|
-
display: "flex",
|
|
8203
|
-
alignItems: "center",
|
|
8204
|
-
justifyContent: "center",
|
|
8205
|
-
flexShrink: 0
|
|
8206
|
-
},
|
|
8207
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8208
|
-
import_lucide_react24.MessageCircle,
|
|
8209
|
-
{
|
|
8210
|
-
style: { width: 16, height: 16, color: "#64748b" },
|
|
8211
|
-
strokeWidth: 2.5
|
|
8212
|
-
}
|
|
8213
|
-
)
|
|
8214
|
-
}
|
|
8215
|
-
),
|
|
8216
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
8217
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8218
|
-
Dialog4.Title,
|
|
8219
|
-
{
|
|
8220
|
-
style: {
|
|
8221
|
-
fontSize: 15,
|
|
8222
|
-
fontWeight: 700,
|
|
8223
|
-
color: "#0f172a",
|
|
8224
|
-
margin: 0,
|
|
8225
|
-
lineHeight: 1.25
|
|
8226
|
-
},
|
|
8227
|
-
children: "Notes"
|
|
8228
|
-
}
|
|
8229
|
-
),
|
|
8230
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
8231
|
-
Dialog4.Description,
|
|
8232
|
-
{
|
|
8233
|
-
style: {
|
|
8234
|
-
fontSize: 12,
|
|
8235
|
-
color: "#64748b",
|
|
8236
|
-
margin: 0,
|
|
8237
|
-
marginTop: 1
|
|
8238
|
-
},
|
|
8239
|
-
children: [
|
|
8240
|
-
totalNotes,
|
|
8241
|
-
" note",
|
|
8242
|
-
totalNotes !== 1 ? "s" : "",
|
|
8243
|
-
" across",
|
|
8244
|
-
" ",
|
|
8245
|
-
noteGroups.length,
|
|
8246
|
-
" resource",
|
|
8247
|
-
noteGroups.length !== 1 ? "s" : ""
|
|
8248
|
-
]
|
|
8249
|
-
}
|
|
8250
|
-
)
|
|
8251
|
-
] }),
|
|
8252
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Dialog4.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8253
|
-
"button",
|
|
8254
|
-
{
|
|
8255
|
-
style: {
|
|
8256
|
-
width: 30,
|
|
8257
|
-
height: 30,
|
|
8258
|
-
borderRadius: 8,
|
|
8259
|
-
border: "none",
|
|
8260
|
-
background: "rgba(0,0,0,0.04)",
|
|
8261
|
-
display: "flex",
|
|
8262
|
-
alignItems: "center",
|
|
8263
|
-
justifyContent: "center",
|
|
8264
|
-
cursor: "pointer",
|
|
8265
|
-
color: "#94a3b8",
|
|
8266
|
-
flexShrink: 0
|
|
8267
|
-
},
|
|
8268
|
-
"aria-label": "Close",
|
|
8269
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react24.X, { style: { width: 15, height: 15 } })
|
|
8270
|
-
}
|
|
8271
|
-
) })
|
|
8272
|
-
]
|
|
8273
|
-
}
|
|
8274
|
-
),
|
|
8275
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { style: { display: "flex", flex: 1, overflow: "hidden" }, children: [
|
|
8157
|
+
className: "fixed inset-0 z-[99999]",
|
|
8158
|
+
style: { isolation: "isolate" },
|
|
8159
|
+
children: [
|
|
8160
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8161
|
+
Dialog4.Overlay,
|
|
8162
|
+
{
|
|
8163
|
+
style: {
|
|
8164
|
+
position: "fixed",
|
|
8165
|
+
inset: 0,
|
|
8166
|
+
background: "rgba(15, 23, 42, 0.55)",
|
|
8167
|
+
backdropFilter: "blur(6px)"
|
|
8168
|
+
}
|
|
8169
|
+
}
|
|
8170
|
+
),
|
|
8171
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
8172
|
+
Dialog4.Content,
|
|
8173
|
+
{
|
|
8174
|
+
style: {
|
|
8175
|
+
position: "fixed",
|
|
8176
|
+
top: "50%",
|
|
8177
|
+
left: "50%",
|
|
8178
|
+
transform: "translate(-50%, -50%)",
|
|
8179
|
+
width: "94vw",
|
|
8180
|
+
maxWidth: 720,
|
|
8181
|
+
height: "78vh",
|
|
8182
|
+
maxHeight: 560,
|
|
8183
|
+
background: "white",
|
|
8184
|
+
borderRadius: 14,
|
|
8185
|
+
boxShadow: "0 0 0 1px rgba(0,0,0,0.06), 0 20px 50px rgba(0,0,0,0.2)",
|
|
8186
|
+
display: "flex",
|
|
8187
|
+
flexDirection: "column",
|
|
8188
|
+
overflow: "hidden",
|
|
8189
|
+
outline: "none"
|
|
8190
|
+
},
|
|
8191
|
+
children: [
|
|
8192
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
8193
|
+
"div",
|
|
8194
|
+
{
|
|
8195
|
+
style: {
|
|
8196
|
+
padding: "14px 20px",
|
|
8197
|
+
borderBottom: "1px solid #e2e8f0",
|
|
8198
|
+
display: "flex",
|
|
8199
|
+
alignItems: "center",
|
|
8200
|
+
gap: 12,
|
|
8201
|
+
flexShrink: 0
|
|
8202
|
+
},
|
|
8203
|
+
children: [
|
|
8276
8204
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8277
8205
|
"div",
|
|
8278
8206
|
{
|
|
8279
8207
|
style: {
|
|
8280
|
-
width:
|
|
8281
|
-
|
|
8282
|
-
|
|
8283
|
-
|
|
8284
|
-
|
|
8208
|
+
width: 32,
|
|
8209
|
+
height: 32,
|
|
8210
|
+
borderRadius: 8,
|
|
8211
|
+
background: "#f1f5f9",
|
|
8212
|
+
display: "flex",
|
|
8213
|
+
alignItems: "center",
|
|
8214
|
+
justifyContent: "center",
|
|
8215
|
+
flexShrink: 0
|
|
8285
8216
|
},
|
|
8286
|
-
children:
|
|
8287
|
-
|
|
8288
|
-
|
|
8289
|
-
|
|
8290
|
-
|
|
8291
|
-
|
|
8292
|
-
|
|
8293
|
-
{
|
|
8294
|
-
onClick: () => setSelectedIdx(i),
|
|
8295
|
-
style: {
|
|
8296
|
-
width: "100%",
|
|
8297
|
-
padding: "12px 16px",
|
|
8298
|
-
background: isActive ? "white" : "transparent",
|
|
8299
|
-
border: "none",
|
|
8300
|
-
borderBottom: "1px solid #f1f5f9",
|
|
8301
|
-
borderRight: isActive ? `2px solid ${iconColor}` : "2px solid transparent",
|
|
8302
|
-
cursor: "pointer",
|
|
8303
|
-
display: "flex",
|
|
8304
|
-
alignItems: "center",
|
|
8305
|
-
gap: 10,
|
|
8306
|
-
textAlign: "left",
|
|
8307
|
-
transition: "background 0.1s"
|
|
8308
|
-
},
|
|
8309
|
-
children: [
|
|
8310
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8311
|
-
"div",
|
|
8312
|
-
{
|
|
8313
|
-
style: {
|
|
8314
|
-
width: 28,
|
|
8315
|
-
height: 28,
|
|
8316
|
-
borderRadius: 7,
|
|
8317
|
-
background: isActive ? iconColor : `${iconColor}14`,
|
|
8318
|
-
display: "flex",
|
|
8319
|
-
alignItems: "center",
|
|
8320
|
-
justifyContent: "center",
|
|
8321
|
-
flexShrink: 0,
|
|
8322
|
-
transition: "background 0.15s"
|
|
8323
|
-
},
|
|
8324
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8325
|
-
IconComp,
|
|
8326
|
-
{
|
|
8327
|
-
style: {
|
|
8328
|
-
width: 14,
|
|
8329
|
-
height: 14,
|
|
8330
|
-
color: isActive ? "white" : iconColor,
|
|
8331
|
-
transition: "color 0.15s"
|
|
8332
|
-
},
|
|
8333
|
-
strokeWidth: 2
|
|
8334
|
-
}
|
|
8335
|
-
)
|
|
8336
|
-
}
|
|
8337
|
-
),
|
|
8338
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
8339
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8340
|
-
"div",
|
|
8341
|
-
{
|
|
8342
|
-
style: {
|
|
8343
|
-
fontSize: 12,
|
|
8344
|
-
fontWeight: isActive ? 600 : 500,
|
|
8345
|
-
color: isActive ? "#0f172a" : "#475569",
|
|
8346
|
-
lineHeight: 1.3,
|
|
8347
|
-
overflow: "hidden",
|
|
8348
|
-
textOverflow: "ellipsis",
|
|
8349
|
-
whiteSpace: "nowrap"
|
|
8350
|
-
},
|
|
8351
|
-
children: group.name
|
|
8352
|
-
}
|
|
8353
|
-
),
|
|
8354
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
8355
|
-
"div",
|
|
8356
|
-
{
|
|
8357
|
-
style: {
|
|
8358
|
-
fontSize: 10,
|
|
8359
|
-
color: "#94a3b8",
|
|
8360
|
-
lineHeight: 1.3,
|
|
8361
|
-
overflow: "hidden",
|
|
8362
|
-
textOverflow: "ellipsis",
|
|
8363
|
-
whiteSpace: "nowrap",
|
|
8364
|
-
marginTop: 2
|
|
8365
|
-
},
|
|
8366
|
-
children: [
|
|
8367
|
-
meta?.label || group.nodeType,
|
|
8368
|
-
" \xB7",
|
|
8369
|
-
" ",
|
|
8370
|
-
group.notes.length,
|
|
8371
|
-
" note",
|
|
8372
|
-
group.notes.length !== 1 ? "s" : ""
|
|
8373
|
-
]
|
|
8374
|
-
}
|
|
8375
|
-
)
|
|
8376
|
-
] }),
|
|
8377
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8378
|
-
import_lucide_react24.ChevronRight,
|
|
8379
|
-
{
|
|
8380
|
-
style: {
|
|
8381
|
-
width: 14,
|
|
8382
|
-
height: 14,
|
|
8383
|
-
color: isActive ? iconColor : "#cbd5e1",
|
|
8384
|
-
flexShrink: 0
|
|
8385
|
-
},
|
|
8386
|
-
strokeWidth: 2
|
|
8387
|
-
}
|
|
8388
|
-
)
|
|
8389
|
-
]
|
|
8390
|
-
},
|
|
8391
|
-
group.nodeId
|
|
8392
|
-
);
|
|
8393
|
-
})
|
|
8217
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8218
|
+
import_lucide_react24.MessageCircle,
|
|
8219
|
+
{
|
|
8220
|
+
style: { width: 16, height: 16, color: "#64748b" },
|
|
8221
|
+
strokeWidth: 2.5
|
|
8222
|
+
}
|
|
8223
|
+
)
|
|
8394
8224
|
}
|
|
8395
8225
|
),
|
|
8396
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.
|
|
8397
|
-
|
|
8226
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
8227
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8228
|
+
Dialog4.Title,
|
|
8229
|
+
{
|
|
8230
|
+
style: {
|
|
8231
|
+
fontSize: 15,
|
|
8232
|
+
fontWeight: 700,
|
|
8233
|
+
color: "#0f172a",
|
|
8234
|
+
margin: 0,
|
|
8235
|
+
lineHeight: 1.25
|
|
8236
|
+
},
|
|
8237
|
+
children: "Notes"
|
|
8238
|
+
}
|
|
8239
|
+
),
|
|
8240
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
8241
|
+
Dialog4.Description,
|
|
8242
|
+
{
|
|
8243
|
+
style: {
|
|
8244
|
+
fontSize: 12,
|
|
8245
|
+
color: "#64748b",
|
|
8246
|
+
margin: 0,
|
|
8247
|
+
marginTop: 1
|
|
8248
|
+
},
|
|
8249
|
+
children: [
|
|
8250
|
+
totalNotes,
|
|
8251
|
+
" note",
|
|
8252
|
+
totalNotes !== 1 ? "s" : "",
|
|
8253
|
+
" across",
|
|
8254
|
+
" ",
|
|
8255
|
+
noteGroups.length,
|
|
8256
|
+
" resource",
|
|
8257
|
+
noteGroups.length !== 1 ? "s" : ""
|
|
8258
|
+
]
|
|
8259
|
+
}
|
|
8260
|
+
)
|
|
8261
|
+
] }),
|
|
8262
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Dialog4.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8263
|
+
"button",
|
|
8398
8264
|
{
|
|
8399
8265
|
style: {
|
|
8400
|
-
|
|
8401
|
-
|
|
8266
|
+
width: 30,
|
|
8267
|
+
height: 30,
|
|
8268
|
+
borderRadius: 8,
|
|
8269
|
+
border: "none",
|
|
8270
|
+
background: "rgba(0,0,0,0.04)",
|
|
8402
8271
|
display: "flex",
|
|
8403
|
-
|
|
8272
|
+
alignItems: "center",
|
|
8273
|
+
justifyContent: "center",
|
|
8274
|
+
cursor: "pointer",
|
|
8275
|
+
color: "#94a3b8",
|
|
8276
|
+
flexShrink: 0
|
|
8404
8277
|
},
|
|
8405
|
-
|
|
8406
|
-
|
|
8407
|
-
|
|
8408
|
-
|
|
8409
|
-
|
|
8410
|
-
|
|
8411
|
-
|
|
8412
|
-
|
|
8413
|
-
|
|
8414
|
-
|
|
8415
|
-
|
|
8416
|
-
|
|
8417
|
-
|
|
8418
|
-
|
|
8419
|
-
|
|
8420
|
-
|
|
8278
|
+
"aria-label": "Close",
|
|
8279
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react24.X, { style: { width: 15, height: 15 } })
|
|
8280
|
+
}
|
|
8281
|
+
) })
|
|
8282
|
+
]
|
|
8283
|
+
}
|
|
8284
|
+
),
|
|
8285
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { style: { display: "flex", flex: 1, overflow: "hidden" }, children: [
|
|
8286
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8287
|
+
"div",
|
|
8288
|
+
{
|
|
8289
|
+
style: {
|
|
8290
|
+
width: 240,
|
|
8291
|
+
flexShrink: 0,
|
|
8292
|
+
borderRight: "1px solid #e2e8f0",
|
|
8293
|
+
overflowY: "auto",
|
|
8294
|
+
background: "#f8fafc"
|
|
8295
|
+
},
|
|
8296
|
+
children: noteGroups.map((group, i) => {
|
|
8297
|
+
const isActive = i === selectedIdx;
|
|
8298
|
+
const meta = getNodeMeta(group.nodeType);
|
|
8299
|
+
const IconComp = meta?.icon || import_lucide_react24.MessageCircle;
|
|
8300
|
+
const iconColor = meta?.color || "#64748b";
|
|
8301
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
8302
|
+
"button",
|
|
8303
|
+
{
|
|
8304
|
+
onClick: () => setSelectedIdx(i),
|
|
8305
|
+
style: {
|
|
8306
|
+
width: "100%",
|
|
8307
|
+
padding: "12px 16px",
|
|
8308
|
+
background: isActive ? "white" : "transparent",
|
|
8309
|
+
border: "none",
|
|
8310
|
+
borderBottom: "1px solid #f1f5f9",
|
|
8311
|
+
borderRight: isActive ? `2px solid ${iconColor}` : "2px solid transparent",
|
|
8312
|
+
cursor: "pointer",
|
|
8313
|
+
display: "flex",
|
|
8314
|
+
alignItems: "center",
|
|
8315
|
+
gap: 10,
|
|
8316
|
+
textAlign: "left",
|
|
8317
|
+
transition: "background 0.1s"
|
|
8318
|
+
},
|
|
8319
|
+
children: [
|
|
8320
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8321
|
+
"div",
|
|
8322
|
+
{
|
|
8323
|
+
style: {
|
|
8324
|
+
width: 28,
|
|
8325
|
+
height: 28,
|
|
8326
|
+
borderRadius: 7,
|
|
8327
|
+
background: isActive ? iconColor : `${iconColor}14`,
|
|
8328
|
+
display: "flex",
|
|
8329
|
+
alignItems: "center",
|
|
8330
|
+
justifyContent: "center",
|
|
8331
|
+
flexShrink: 0,
|
|
8332
|
+
transition: "background 0.15s"
|
|
8333
|
+
},
|
|
8334
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8335
|
+
IconComp,
|
|
8421
8336
|
{
|
|
8422
8337
|
style: {
|
|
8423
|
-
|
|
8424
|
-
|
|
8425
|
-
|
|
8338
|
+
width: 14,
|
|
8339
|
+
height: 14,
|
|
8340
|
+
color: isActive ? "white" : iconColor,
|
|
8341
|
+
transition: "color 0.15s"
|
|
8426
8342
|
},
|
|
8427
|
-
|
|
8428
|
-
|
|
8429
|
-
|
|
8430
|
-
|
|
8431
|
-
|
|
8432
|
-
|
|
8433
|
-
|
|
8434
|
-
|
|
8435
|
-
|
|
8436
|
-
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
|
|
8441
|
-
|
|
8442
|
-
|
|
8443
|
-
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
|
|
8451
|
-
|
|
8452
|
-
|
|
8453
|
-
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
|
|
8457
|
-
|
|
8458
|
-
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
|
|
8466
|
-
|
|
8467
|
-
|
|
8468
|
-
|
|
8469
|
-
|
|
8470
|
-
|
|
8471
|
-
|
|
8472
|
-
|
|
8473
|
-
|
|
8343
|
+
strokeWidth: 2
|
|
8344
|
+
}
|
|
8345
|
+
)
|
|
8346
|
+
}
|
|
8347
|
+
),
|
|
8348
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
8349
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8350
|
+
"div",
|
|
8351
|
+
{
|
|
8352
|
+
style: {
|
|
8353
|
+
fontSize: 12,
|
|
8354
|
+
fontWeight: isActive ? 600 : 500,
|
|
8355
|
+
color: isActive ? "#0f172a" : "#475569",
|
|
8356
|
+
lineHeight: 1.3,
|
|
8357
|
+
overflow: "hidden",
|
|
8358
|
+
textOverflow: "ellipsis",
|
|
8359
|
+
whiteSpace: "nowrap"
|
|
8360
|
+
},
|
|
8361
|
+
children: group.name
|
|
8362
|
+
}
|
|
8363
|
+
),
|
|
8364
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
8365
|
+
"div",
|
|
8366
|
+
{
|
|
8367
|
+
style: {
|
|
8368
|
+
fontSize: 10,
|
|
8369
|
+
color: "#94a3b8",
|
|
8370
|
+
lineHeight: 1.3,
|
|
8371
|
+
overflow: "hidden",
|
|
8372
|
+
textOverflow: "ellipsis",
|
|
8373
|
+
whiteSpace: "nowrap",
|
|
8374
|
+
marginTop: 2
|
|
8375
|
+
},
|
|
8376
|
+
children: [
|
|
8377
|
+
meta?.label || group.nodeType,
|
|
8378
|
+
" \xB7",
|
|
8379
|
+
" ",
|
|
8380
|
+
group.notes.length,
|
|
8381
|
+
" note",
|
|
8382
|
+
group.notes.length !== 1 ? "s" : ""
|
|
8383
|
+
]
|
|
8384
|
+
}
|
|
8385
|
+
)
|
|
8386
|
+
] }),
|
|
8387
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8388
|
+
import_lucide_react24.ChevronRight,
|
|
8389
|
+
{
|
|
8390
|
+
style: {
|
|
8391
|
+
width: 14,
|
|
8392
|
+
height: 14,
|
|
8393
|
+
color: isActive ? iconColor : "#cbd5e1",
|
|
8394
|
+
flexShrink: 0
|
|
8395
|
+
},
|
|
8396
|
+
strokeWidth: 2
|
|
8397
|
+
}
|
|
8398
|
+
)
|
|
8399
|
+
]
|
|
8400
|
+
},
|
|
8401
|
+
group.nodeId
|
|
8402
|
+
);
|
|
8403
|
+
})
|
|
8404
|
+
}
|
|
8405
|
+
),
|
|
8406
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8407
|
+
"div",
|
|
8408
|
+
{
|
|
8409
|
+
style: {
|
|
8410
|
+
flex: 1,
|
|
8411
|
+
overflowY: "auto",
|
|
8412
|
+
display: "flex",
|
|
8413
|
+
flexDirection: "column"
|
|
8414
|
+
},
|
|
8415
|
+
children: selected && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
|
|
8416
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
8417
|
+
"div",
|
|
8418
|
+
{
|
|
8419
|
+
style: {
|
|
8420
|
+
padding: "14px 20px",
|
|
8421
|
+
borderBottom: "1px solid #f1f5f9",
|
|
8422
|
+
display: "flex",
|
|
8423
|
+
alignItems: "center",
|
|
8424
|
+
justifyContent: "space-between",
|
|
8425
|
+
flexShrink: 0,
|
|
8426
|
+
background: "#fafbfc"
|
|
8427
|
+
},
|
|
8428
|
+
children: [
|
|
8429
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
8430
|
+
"div",
|
|
8431
|
+
{
|
|
8432
|
+
style: {
|
|
8433
|
+
display: "flex",
|
|
8434
|
+
alignItems: "center",
|
|
8435
|
+
gap: 10
|
|
8436
|
+
},
|
|
8437
|
+
children: [
|
|
8438
|
+
(() => {
|
|
8439
|
+
const meta = getNodeMeta(selected.nodeType);
|
|
8440
|
+
const Icon = meta?.icon || import_lucide_react24.MessageCircle;
|
|
8441
|
+
const color = meta?.color || "#64748b";
|
|
8442
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8443
|
+
"div",
|
|
8444
|
+
{
|
|
8445
|
+
style: {
|
|
8446
|
+
width: 30,
|
|
8447
|
+
height: 30,
|
|
8448
|
+
borderRadius: 8,
|
|
8449
|
+
background: `${color}14`,
|
|
8450
|
+
display: "flex",
|
|
8451
|
+
alignItems: "center",
|
|
8452
|
+
justifyContent: "center",
|
|
8453
|
+
flexShrink: 0
|
|
8454
|
+
},
|
|
8455
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8456
|
+
Icon,
|
|
8474
8457
|
{
|
|
8475
8458
|
style: {
|
|
8476
|
-
|
|
8477
|
-
|
|
8478
|
-
|
|
8459
|
+
width: 15,
|
|
8460
|
+
height: 15,
|
|
8461
|
+
color
|
|
8479
8462
|
},
|
|
8480
|
-
|
|
8481
|
-
getNodeMeta(selected.nodeType)?.label || selected.nodeType,
|
|
8482
|
-
" ",
|
|
8483
|
-
"\xB7 ",
|
|
8484
|
-
selected.notes.length,
|
|
8485
|
-
" note",
|
|
8486
|
-
selected.notes.length !== 1 ? "s" : ""
|
|
8487
|
-
]
|
|
8463
|
+
strokeWidth: 2
|
|
8488
8464
|
}
|
|
8489
8465
|
)
|
|
8490
|
-
|
|
8491
|
-
|
|
8492
|
-
}
|
|
8493
|
-
|
|
8494
|
-
|
|
8495
|
-
|
|
8496
|
-
|
|
8497
|
-
|
|
8498
|
-
|
|
8499
|
-
|
|
8500
|
-
|
|
8501
|
-
|
|
8502
|
-
|
|
8503
|
-
|
|
8504
|
-
|
|
8505
|
-
|
|
8506
|
-
|
|
8507
|
-
|
|
8508
|
-
|
|
8509
|
-
|
|
8510
|
-
|
|
8511
|
-
|
|
8512
|
-
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
|
|
8516
|
-
|
|
8517
|
-
|
|
8518
|
-
|
|
8519
|
-
|
|
8520
|
-
|
|
8521
|
-
|
|
8522
|
-
|
|
8523
|
-
|
|
8524
|
-
}
|
|
8525
|
-
|
|
8526
|
-
|
|
8527
|
-
|
|
8528
|
-
|
|
8529
|
-
|
|
8530
|
-
|
|
8531
|
-
|
|
8532
|
-
|
|
8533
|
-
|
|
8534
|
-
|
|
8535
|
-
|
|
8536
|
-
|
|
8537
|
-
|
|
8538
|
-
|
|
8539
|
-
|
|
8540
|
-
|
|
8541
|
-
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
|
|
8546
|
-
|
|
8547
|
-
|
|
8548
|
-
|
|
8549
|
-
|
|
8550
|
-
|
|
8551
|
-
|
|
8552
|
-
|
|
8466
|
+
}
|
|
8467
|
+
);
|
|
8468
|
+
})(),
|
|
8469
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { children: [
|
|
8470
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8471
|
+
"div",
|
|
8472
|
+
{
|
|
8473
|
+
style: {
|
|
8474
|
+
fontSize: 14,
|
|
8475
|
+
fontWeight: 600,
|
|
8476
|
+
color: "#0f172a",
|
|
8477
|
+
lineHeight: 1.3
|
|
8478
|
+
},
|
|
8479
|
+
children: selected.name
|
|
8480
|
+
}
|
|
8481
|
+
),
|
|
8482
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
8483
|
+
"div",
|
|
8484
|
+
{
|
|
8485
|
+
style: {
|
|
8486
|
+
fontSize: 11,
|
|
8487
|
+
color: "#94a3b8",
|
|
8488
|
+
marginTop: 2
|
|
8489
|
+
},
|
|
8490
|
+
children: [
|
|
8491
|
+
getNodeMeta(selected.nodeType)?.label || selected.nodeType,
|
|
8492
|
+
" ",
|
|
8493
|
+
"\xB7 ",
|
|
8494
|
+
selected.notes.length,
|
|
8495
|
+
" note",
|
|
8496
|
+
selected.notes.length !== 1 ? "s" : ""
|
|
8497
|
+
]
|
|
8498
|
+
}
|
|
8499
|
+
)
|
|
8500
|
+
] })
|
|
8501
|
+
]
|
|
8502
|
+
}
|
|
8503
|
+
),
|
|
8504
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
8505
|
+
"button",
|
|
8506
|
+
{
|
|
8507
|
+
onClick: () => handleNavigate(selected.nodeId),
|
|
8508
|
+
style: {
|
|
8509
|
+
display: "flex",
|
|
8510
|
+
alignItems: "center",
|
|
8511
|
+
gap: 5,
|
|
8512
|
+
padding: "5px 10px",
|
|
8513
|
+
borderRadius: 6,
|
|
8514
|
+
border: "1px solid #e2e8f0",
|
|
8515
|
+
background: "white",
|
|
8516
|
+
cursor: "pointer",
|
|
8517
|
+
fontSize: 11,
|
|
8518
|
+
fontWeight: 500,
|
|
8519
|
+
color: "#475569",
|
|
8520
|
+
transition: "all 0.12s"
|
|
8521
|
+
},
|
|
8522
|
+
onMouseEnter: (e) => {
|
|
8523
|
+
e.currentTarget.style.borderColor = AMBER2[400];
|
|
8524
|
+
e.currentTarget.style.color = AMBER2[700];
|
|
8525
|
+
},
|
|
8526
|
+
onMouseLeave: (e) => {
|
|
8527
|
+
e.currentTarget.style.borderColor = "#e2e8f0";
|
|
8528
|
+
e.currentTarget.style.color = "#475569";
|
|
8529
|
+
},
|
|
8530
|
+
children: [
|
|
8531
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react24.Locate, { style: { width: 12, height: 12 } }),
|
|
8532
|
+
"Find on canvas"
|
|
8533
|
+
]
|
|
8534
|
+
}
|
|
8535
|
+
)
|
|
8536
|
+
]
|
|
8537
|
+
}
|
|
8538
|
+
),
|
|
8539
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8540
|
+
"div",
|
|
8541
|
+
{
|
|
8542
|
+
style: {
|
|
8543
|
+
flex: 1,
|
|
8544
|
+
overflowY: "auto",
|
|
8545
|
+
padding: "16px 20px",
|
|
8546
|
+
display: "flex",
|
|
8547
|
+
flexDirection: "column",
|
|
8548
|
+
gap: 10
|
|
8549
|
+
},
|
|
8550
|
+
children: selected.notes.map((note, i) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(NoteCard2, { note, index: i }, i))
|
|
8551
|
+
}
|
|
8552
|
+
)
|
|
8553
|
+
] })
|
|
8554
|
+
}
|
|
8555
|
+
)
|
|
8556
|
+
] })
|
|
8557
|
+
]
|
|
8558
|
+
}
|
|
8559
|
+
)
|
|
8560
|
+
]
|
|
8553
8561
|
}
|
|
8554
|
-
)
|
|
8562
|
+
) })
|
|
8555
8563
|
}
|
|
8556
8564
|
);
|
|
8557
8565
|
}
|
|
@@ -8571,13 +8579,13 @@ var LAYOUT_CHANGE_PANEL_STYLE_WITH_WALKTHROUGH = {
|
|
|
8571
8579
|
};
|
|
8572
8580
|
var LAYOUT_CHANGE_PANEL_STYLE_DEFAULT = { marginLeft: "60px" };
|
|
8573
8581
|
var LEGEND_PANEL_STYLE_WITH_MINIMAP = { marginRight: "230px" };
|
|
8574
|
-
var LegendPanel = (0,
|
|
8582
|
+
var LegendPanel = (0, import_react69.memo)(function LegendPanel2({
|
|
8575
8583
|
legend,
|
|
8576
8584
|
showMinimap,
|
|
8577
8585
|
onLegendClick
|
|
8578
8586
|
}) {
|
|
8579
8587
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
8580
|
-
|
|
8588
|
+
import_react70.Panel,
|
|
8581
8589
|
{
|
|
8582
8590
|
position: "bottom-right",
|
|
8583
8591
|
style: showMinimap ? LEGEND_PANEL_STYLE_WITH_MINIMAP : void 0,
|
|
@@ -8633,14 +8641,14 @@ var NodeGraphBuilder = ({
|
|
|
8633
8641
|
onSaveLayout,
|
|
8634
8642
|
onResetLayout
|
|
8635
8643
|
}) => {
|
|
8636
|
-
(0,
|
|
8644
|
+
(0, import_react69.useEffect)(() => {
|
|
8637
8645
|
if (onBuildUrl) {
|
|
8638
8646
|
setBuildUrlFn(onBuildUrl);
|
|
8639
8647
|
}
|
|
8640
8648
|
}, []);
|
|
8641
|
-
const nodeTypes = (0,
|
|
8649
|
+
const nodeTypes = (0, import_react69.useMemo)(() => {
|
|
8642
8650
|
const wrapWithContextMenu = (Component) => {
|
|
8643
|
-
const Wrapped = (0,
|
|
8651
|
+
const Wrapped = (0, import_react69.memo)((props) => {
|
|
8644
8652
|
const items = props.data?.contextMenu;
|
|
8645
8653
|
if (!items?.length) return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Component, { ...props });
|
|
8646
8654
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(NodeContextMenu_default, { items, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Component, { ...props }) });
|
|
@@ -8677,10 +8685,10 @@ var NodeGraphBuilder = ({
|
|
|
8677
8685
|
"data-product": wrapWithContextMenu(DataProduct_default),
|
|
8678
8686
|
"data-products": wrapWithContextMenu(DataProduct_default),
|
|
8679
8687
|
group: GroupNode_default,
|
|
8680
|
-
note: (0,
|
|
8688
|
+
note: (0, import_react69.memo)((props) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(NoteNode_default, { ...props, readOnly: true }))
|
|
8681
8689
|
};
|
|
8682
8690
|
}, []);
|
|
8683
|
-
const edgeTypes2 = (0,
|
|
8691
|
+
const edgeTypes2 = (0, import_react69.useMemo)(
|
|
8684
8692
|
() => ({
|
|
8685
8693
|
animated: AnimatedMessageEdge_default,
|
|
8686
8694
|
multiline: MultilineEdgeLabel_default,
|
|
@@ -8688,47 +8696,47 @@ var NodeGraphBuilder = ({
|
|
|
8688
8696
|
}),
|
|
8689
8697
|
[]
|
|
8690
8698
|
);
|
|
8691
|
-
const [nodes, setNodes, onNodesChange] = (0,
|
|
8692
|
-
const [edges, setEdges, onEdgesChange] = (0,
|
|
8693
|
-
const { fitView, getNodes } = (0,
|
|
8694
|
-
(0,
|
|
8699
|
+
const [nodes, setNodes, onNodesChange] = (0, import_react70.useNodesState)(initialNodes);
|
|
8700
|
+
const [edges, setEdges, onEdgesChange] = (0, import_react70.useEdgesState)(initialEdges);
|
|
8701
|
+
const { fitView, getNodes } = (0, import_react70.useReactFlow)();
|
|
8702
|
+
(0, import_react69.useEffect)(() => {
|
|
8695
8703
|
setNodes(initialNodes);
|
|
8696
8704
|
setEdges(initialEdges);
|
|
8697
8705
|
requestAnimationFrame(() => {
|
|
8698
8706
|
fitView({ duration: 300, padding: 0.2 });
|
|
8699
8707
|
});
|
|
8700
8708
|
}, [initialNodes, initialEdges, setNodes, setEdges, fitView]);
|
|
8701
|
-
const [animateMessages, setAnimateMessages] = (0,
|
|
8702
|
-
const [_activeStepIndex, _setActiveStepIndex] = (0,
|
|
8703
|
-
const [_isFullscreen, _setIsFullscreen] = (0,
|
|
8704
|
-
const [isShareModalOpen, setIsShareModalOpen] = (0,
|
|
8705
|
-
const [shareUrlCopySuccess, setShareUrlCopySuccess] = (0,
|
|
8706
|
-
const [isMermaidView, setIsMermaidView] = (0,
|
|
8707
|
-
const [showMinimap, setShowMinimap] = (0,
|
|
8708
|
-
const [hasLayoutChanges, setHasLayoutChanges] = (0,
|
|
8709
|
-
const [isSavingLayout, setIsSavingLayout] = (0,
|
|
8710
|
-
const initialPositionsRef = (0,
|
|
8709
|
+
const [animateMessages, setAnimateMessages] = (0, import_react69.useState)(true);
|
|
8710
|
+
const [_activeStepIndex, _setActiveStepIndex] = (0, import_react69.useState)(null);
|
|
8711
|
+
const [_isFullscreen, _setIsFullscreen] = (0, import_react69.useState)(false);
|
|
8712
|
+
const [isShareModalOpen, setIsShareModalOpen] = (0, import_react69.useState)(false);
|
|
8713
|
+
const [shareUrlCopySuccess, setShareUrlCopySuccess] = (0, import_react69.useState)(false);
|
|
8714
|
+
const [isMermaidView, setIsMermaidView] = (0, import_react69.useState)(false);
|
|
8715
|
+
const [showMinimap, setShowMinimap] = (0, import_react69.useState)(false);
|
|
8716
|
+
const [hasLayoutChanges, setHasLayoutChanges] = (0, import_react69.useState)(false);
|
|
8717
|
+
const [isSavingLayout, setIsSavingLayout] = (0, import_react69.useState)(false);
|
|
8718
|
+
const initialPositionsRef = (0, import_react69.useRef)(
|
|
8711
8719
|
{}
|
|
8712
8720
|
);
|
|
8713
|
-
const [focusModeOpen, setFocusModeOpen] = (0,
|
|
8714
|
-
const [focusedNodeId, setFocusedNodeId] = (0,
|
|
8715
|
-
const [isNotesModalOpen, setIsNotesModalOpen] = (0,
|
|
8716
|
-
const openNotesModal = (0,
|
|
8717
|
-
const interactionCountRef = (0,
|
|
8718
|
-
const startInteraction = (0,
|
|
8721
|
+
const [focusModeOpen, setFocusModeOpen] = (0, import_react69.useState)(false);
|
|
8722
|
+
const [focusedNodeId, setFocusedNodeId] = (0, import_react69.useState)(null);
|
|
8723
|
+
const [isNotesModalOpen, setIsNotesModalOpen] = (0, import_react69.useState)(false);
|
|
8724
|
+
const openNotesModal = (0, import_react69.useCallback)(() => setIsNotesModalOpen(true), []);
|
|
8725
|
+
const interactionCountRef = (0, import_react69.useRef)(0);
|
|
8726
|
+
const startInteraction = (0, import_react69.useCallback)(() => {
|
|
8719
8727
|
interactionCountRef.current += 1;
|
|
8720
8728
|
if (interactionCountRef.current === 1) {
|
|
8721
8729
|
reactFlowWrapperRef.current?.classList.add("ec-interaction-active");
|
|
8722
8730
|
}
|
|
8723
8731
|
}, []);
|
|
8724
|
-
const endInteraction = (0,
|
|
8732
|
+
const endInteraction = (0, import_react69.useCallback)(() => {
|
|
8725
8733
|
interactionCountRef.current = Math.max(0, interactionCountRef.current - 1);
|
|
8726
8734
|
if (interactionCountRef.current === 0) {
|
|
8727
8735
|
reactFlowWrapperRef.current?.classList.remove("ec-interaction-active");
|
|
8728
8736
|
}
|
|
8729
8737
|
}, []);
|
|
8730
|
-
const hoveredEdgeNodesRef = (0,
|
|
8731
|
-
const handleEdgeMouseEnter = (0,
|
|
8738
|
+
const hoveredEdgeNodesRef = (0, import_react69.useRef)([]);
|
|
8739
|
+
const handleEdgeMouseEnter = (0, import_react69.useCallback)(
|
|
8732
8740
|
(_, edge) => {
|
|
8733
8741
|
const wrapper = reactFlowWrapperRef.current;
|
|
8734
8742
|
if (!wrapper) return;
|
|
@@ -8740,15 +8748,15 @@ var NodeGraphBuilder = ({
|
|
|
8740
8748
|
},
|
|
8741
8749
|
[]
|
|
8742
8750
|
);
|
|
8743
|
-
const handleEdgeMouseLeave = (0,
|
|
8751
|
+
const handleEdgeMouseLeave = (0, import_react69.useCallback)(() => {
|
|
8744
8752
|
hoveredEdgeNodesRef.current.forEach(
|
|
8745
8753
|
(el) => el.classList.remove("ec-edge-hover-node")
|
|
8746
8754
|
);
|
|
8747
8755
|
hoveredEdgeNodesRef.current = [];
|
|
8748
8756
|
}, []);
|
|
8749
|
-
const hoveredNodeEdgesRef = (0,
|
|
8750
|
-
const hoveredNodePeersRef = (0,
|
|
8751
|
-
const handleNodeMouseEnter = (0,
|
|
8757
|
+
const hoveredNodeEdgesRef = (0, import_react69.useRef)([]);
|
|
8758
|
+
const hoveredNodePeersRef = (0, import_react69.useRef)([]);
|
|
8759
|
+
const handleNodeMouseEnter = (0, import_react69.useCallback)(
|
|
8752
8760
|
(_, node) => {
|
|
8753
8761
|
const wrapper = reactFlowWrapperRef.current;
|
|
8754
8762
|
if (!wrapper) return;
|
|
@@ -8777,7 +8785,7 @@ var NodeGraphBuilder = ({
|
|
|
8777
8785
|
},
|
|
8778
8786
|
[]
|
|
8779
8787
|
);
|
|
8780
|
-
const handleNodeMouseLeave = (0,
|
|
8788
|
+
const handleNodeMouseLeave = (0, import_react69.useCallback)(() => {
|
|
8781
8789
|
hoveredNodeEdgesRef.current.forEach(
|
|
8782
8790
|
(el) => el.classList.remove("ec-node-hover-edge")
|
|
8783
8791
|
);
|
|
@@ -8787,21 +8795,21 @@ var NodeGraphBuilder = ({
|
|
|
8787
8795
|
);
|
|
8788
8796
|
hoveredNodePeersRef.current = [];
|
|
8789
8797
|
}, []);
|
|
8790
|
-
const hasChannels = (0,
|
|
8798
|
+
const hasChannels = (0, import_react69.useMemo)(
|
|
8791
8799
|
() => initialNodes.some((node) => node.type === "channels"),
|
|
8792
8800
|
[initialNodes]
|
|
8793
8801
|
);
|
|
8794
8802
|
const hideChannels = false;
|
|
8795
8803
|
const toggleChannelsVisibility = () => {
|
|
8796
8804
|
};
|
|
8797
|
-
const searchRef = (0,
|
|
8798
|
-
const reactFlowWrapperRef = (0,
|
|
8799
|
-
const scrollableContainerRef = (0,
|
|
8800
|
-
const nodesRef = (0,
|
|
8805
|
+
const searchRef = (0, import_react69.useRef)(null);
|
|
8806
|
+
const reactFlowWrapperRef = (0, import_react69.useRef)(null);
|
|
8807
|
+
const scrollableContainerRef = (0, import_react69.useRef)(null);
|
|
8808
|
+
const nodesRef = (0, import_react69.useRef)(nodes);
|
|
8801
8809
|
nodesRef.current = nodes;
|
|
8802
|
-
const edgesRef = (0,
|
|
8810
|
+
const edgesRef = (0, import_react69.useRef)(edges);
|
|
8803
8811
|
edgesRef.current = edges;
|
|
8804
|
-
(0,
|
|
8812
|
+
(0, import_react69.useEffect)(() => {
|
|
8805
8813
|
if (isDevMode && initialNodes.length > 0) {
|
|
8806
8814
|
const positions = {};
|
|
8807
8815
|
initialNodes.forEach((node) => {
|
|
@@ -8810,7 +8818,7 @@ var NodeGraphBuilder = ({
|
|
|
8810
8818
|
initialPositionsRef.current = positions;
|
|
8811
8819
|
}
|
|
8812
8820
|
}, [isDevMode, initialNodes]);
|
|
8813
|
-
const checkForLayoutChanges = (0,
|
|
8821
|
+
const checkForLayoutChanges = (0, import_react69.useCallback)(() => {
|
|
8814
8822
|
if (!isDevMode) return;
|
|
8815
8823
|
const initial = initialPositionsRef.current;
|
|
8816
8824
|
if (Object.keys(initial).length === 0) return;
|
|
@@ -8820,7 +8828,7 @@ var NodeGraphBuilder = ({
|
|
|
8820
8828
|
});
|
|
8821
8829
|
setHasLayoutChanges(hasChanges);
|
|
8822
8830
|
}, [isDevMode]);
|
|
8823
|
-
const handleNodesChange = (0,
|
|
8831
|
+
const handleNodesChange = (0, import_react69.useCallback)(
|
|
8824
8832
|
(changes) => {
|
|
8825
8833
|
onNodesChange(changes);
|
|
8826
8834
|
const hasDragEnd = changes.some(
|
|
@@ -8832,7 +8840,7 @@ var NodeGraphBuilder = ({
|
|
|
8832
8840
|
},
|
|
8833
8841
|
[onNodesChange, checkForLayoutChanges]
|
|
8834
8842
|
);
|
|
8835
|
-
const resetNodesAndEdges = (0,
|
|
8843
|
+
const resetNodesAndEdges = (0, import_react69.useCallback)(() => {
|
|
8836
8844
|
setNodes(
|
|
8837
8845
|
(nds) => nds.map((node) => {
|
|
8838
8846
|
node.style = { ...node.style, opacity: 1 };
|
|
@@ -8851,7 +8859,7 @@ var NodeGraphBuilder = ({
|
|
|
8851
8859
|
})
|
|
8852
8860
|
);
|
|
8853
8861
|
}, [setNodes, setEdges, animateMessages]);
|
|
8854
|
-
(0,
|
|
8862
|
+
(0, import_react69.useEffect)(() => {
|
|
8855
8863
|
if (!focusNodeId) return;
|
|
8856
8864
|
const targetNode = nodesRef.current.find((node) => node.id === focusNodeId);
|
|
8857
8865
|
if (!targetNode) return;
|
|
@@ -8869,13 +8877,13 @@ var NodeGraphBuilder = ({
|
|
|
8869
8877
|
});
|
|
8870
8878
|
});
|
|
8871
8879
|
}, [focusNodeId, focusRequestId, fitView, setNodes]);
|
|
8872
|
-
(0,
|
|
8880
|
+
(0, import_react69.useEffect)(() => {
|
|
8873
8881
|
if (fitRequestId == null) return;
|
|
8874
8882
|
requestAnimationFrame(() => {
|
|
8875
8883
|
fitView({ duration: 400, padding: 0.2 });
|
|
8876
8884
|
});
|
|
8877
8885
|
}, [fitRequestId, fitView]);
|
|
8878
|
-
const handleNodeClick = (0,
|
|
8886
|
+
const handleNodeClick = (0, import_react69.useCallback)(
|
|
8879
8887
|
(_, node) => {
|
|
8880
8888
|
if (onNodeClick) {
|
|
8881
8889
|
onNodeClick(node);
|
|
@@ -8897,7 +8905,7 @@ var NodeGraphBuilder = ({
|
|
|
8897
8905
|
},
|
|
8898
8906
|
[onNodeClick, linksToVisualiser, onNavigate]
|
|
8899
8907
|
);
|
|
8900
|
-
const toggleAnimateMessages = (0,
|
|
8908
|
+
const toggleAnimateMessages = (0, import_react69.useCallback)(() => {
|
|
8901
8909
|
setAnimateMessages((prev) => {
|
|
8902
8910
|
const next = !prev;
|
|
8903
8911
|
localStorage.setItem(
|
|
@@ -8907,10 +8915,10 @@ var NodeGraphBuilder = ({
|
|
|
8907
8915
|
return next;
|
|
8908
8916
|
});
|
|
8909
8917
|
}, []);
|
|
8910
|
-
const handleFitView = (0,
|
|
8918
|
+
const handleFitView = (0, import_react69.useCallback)(() => {
|
|
8911
8919
|
fitView({ duration: 400, padding: 0.2 });
|
|
8912
8920
|
}, [fitView]);
|
|
8913
|
-
(0,
|
|
8921
|
+
(0, import_react69.useEffect)(() => {
|
|
8914
8922
|
if (animated !== void 0) {
|
|
8915
8923
|
setAnimateMessages(animated);
|
|
8916
8924
|
return;
|
|
@@ -8930,7 +8938,7 @@ var NodeGraphBuilder = ({
|
|
|
8930
8938
|
}
|
|
8931
8939
|
}
|
|
8932
8940
|
}, [animated]);
|
|
8933
|
-
(0,
|
|
8941
|
+
(0, import_react69.useEffect)(() => {
|
|
8934
8942
|
setEdges(
|
|
8935
8943
|
(eds) => eds.map((edge) => ({
|
|
8936
8944
|
...edge,
|
|
@@ -8940,12 +8948,12 @@ var NodeGraphBuilder = ({
|
|
|
8940
8948
|
}))
|
|
8941
8949
|
);
|
|
8942
8950
|
}, [animateMessages]);
|
|
8943
|
-
(0,
|
|
8951
|
+
(0, import_react69.useEffect)(() => {
|
|
8944
8952
|
setTimeout(() => {
|
|
8945
8953
|
fitView({ duration: 800 });
|
|
8946
8954
|
}, 150);
|
|
8947
8955
|
}, []);
|
|
8948
|
-
const generateMermaidCode = (0,
|
|
8956
|
+
const generateMermaidCode = (0, import_react69.useCallback)(() => {
|
|
8949
8957
|
try {
|
|
8950
8958
|
return convertToMermaid(nodesRef.current, edgesRef.current, {
|
|
8951
8959
|
includeStyles: true,
|
|
@@ -8956,7 +8964,7 @@ var NodeGraphBuilder = ({
|
|
|
8956
8964
|
return "";
|
|
8957
8965
|
}
|
|
8958
8966
|
}, []);
|
|
8959
|
-
(0,
|
|
8967
|
+
(0, import_react69.useEffect)(() => {
|
|
8960
8968
|
if (zoomOnScroll) return;
|
|
8961
8969
|
const findScrollableContainer = () => {
|
|
8962
8970
|
const selectors = [
|
|
@@ -9001,34 +9009,34 @@ var NodeGraphBuilder = ({
|
|
|
9001
9009
|
};
|
|
9002
9010
|
}
|
|
9003
9011
|
}, [zoomOnScroll]);
|
|
9004
|
-
const handlePaneClick = (0,
|
|
9012
|
+
const handlePaneClick = (0, import_react69.useCallback)(() => {
|
|
9005
9013
|
searchRef.current?.hideSuggestions();
|
|
9006
9014
|
resetNodesAndEdges();
|
|
9007
9015
|
fitView({ duration: 800 });
|
|
9008
9016
|
}, [resetNodesAndEdges, fitView]);
|
|
9009
|
-
const handleNodeSelect = (0,
|
|
9017
|
+
const handleNodeSelect = (0, import_react69.useCallback)(
|
|
9010
9018
|
(node) => {
|
|
9011
9019
|
handleNodeClick(null, node);
|
|
9012
9020
|
},
|
|
9013
9021
|
[handleNodeClick]
|
|
9014
9022
|
);
|
|
9015
|
-
const handleSearchClear = (0,
|
|
9023
|
+
const handleSearchClear = (0, import_react69.useCallback)(() => {
|
|
9016
9024
|
resetNodesAndEdges();
|
|
9017
9025
|
fitView({ duration: 800 });
|
|
9018
9026
|
}, [resetNodesAndEdges, fitView]);
|
|
9019
|
-
const downloadImage = (0,
|
|
9027
|
+
const downloadImage = (0, import_react69.useCallback)((dataUrl, filename) => {
|
|
9020
9028
|
const a = document.createElement("a");
|
|
9021
9029
|
a.setAttribute("download", `${filename || "eventcatalog"}.png`);
|
|
9022
9030
|
a.setAttribute("href", dataUrl);
|
|
9023
9031
|
a.click();
|
|
9024
9032
|
}, []);
|
|
9025
|
-
const openStudioModal = (0,
|
|
9033
|
+
const openStudioModal = (0, import_react69.useCallback)(() => {
|
|
9026
9034
|
setIsStudioModalOpen(true);
|
|
9027
9035
|
}, [setIsStudioModalOpen]);
|
|
9028
|
-
const openChat = (0,
|
|
9036
|
+
const openChat = (0, import_react69.useCallback)(() => {
|
|
9029
9037
|
window.dispatchEvent(new CustomEvent("eventcatalog:open-chat"));
|
|
9030
9038
|
}, []);
|
|
9031
|
-
const handleSaveLayout = (0,
|
|
9039
|
+
const handleSaveLayout = (0, import_react69.useCallback)(async () => {
|
|
9032
9040
|
if (!resourceKey || !onSaveLayout) return false;
|
|
9033
9041
|
const positions = {};
|
|
9034
9042
|
nodesRef.current.forEach((node) => {
|
|
@@ -9039,11 +9047,11 @@ var NodeGraphBuilder = ({
|
|
|
9039
9047
|
});
|
|
9040
9048
|
return await onSaveLayout(resourceKey, positions);
|
|
9041
9049
|
}, [resourceKey, onSaveLayout]);
|
|
9042
|
-
const handleResetLayout = (0,
|
|
9050
|
+
const handleResetLayout = (0, import_react69.useCallback)(async () => {
|
|
9043
9051
|
if (!resourceKey || !onResetLayout) return false;
|
|
9044
9052
|
return await onResetLayout(resourceKey);
|
|
9045
9053
|
}, [resourceKey, onResetLayout]);
|
|
9046
|
-
const handleQuickSaveLayout = (0,
|
|
9054
|
+
const handleQuickSaveLayout = (0, import_react69.useCallback)(async () => {
|
|
9047
9055
|
setIsSavingLayout(true);
|
|
9048
9056
|
const success = await handleSaveLayout();
|
|
9049
9057
|
setIsSavingLayout(false);
|
|
@@ -9056,17 +9064,17 @@ var NodeGraphBuilder = ({
|
|
|
9056
9064
|
setHasLayoutChanges(false);
|
|
9057
9065
|
}
|
|
9058
9066
|
}, [handleSaveLayout]);
|
|
9059
|
-
const handleCopyArchitectureCode = (0,
|
|
9067
|
+
const handleCopyArchitectureCode = (0, import_react69.useCallback)(async () => {
|
|
9060
9068
|
const code = generateMermaidCode();
|
|
9061
9069
|
await copyToClipboard(code);
|
|
9062
9070
|
}, [generateMermaidCode]);
|
|
9063
|
-
const handleCopyShareUrl = (0,
|
|
9071
|
+
const handleCopyShareUrl = (0, import_react69.useCallback)(async () => {
|
|
9064
9072
|
const url = typeof window !== "undefined" ? window.location.href : "";
|
|
9065
9073
|
await copyToClipboard(url);
|
|
9066
9074
|
setShareUrlCopySuccess(true);
|
|
9067
9075
|
setTimeout(() => setShareUrlCopySuccess(false), 2e3);
|
|
9068
9076
|
}, []);
|
|
9069
|
-
const toggleFullScreen = (0,
|
|
9077
|
+
const toggleFullScreen = (0, import_react69.useCallback)(() => {
|
|
9070
9078
|
if (!document.fullscreenElement) {
|
|
9071
9079
|
reactFlowWrapperRef.current?.requestFullscreen().catch((err) => {
|
|
9072
9080
|
console.error(
|
|
@@ -9077,7 +9085,7 @@ var NodeGraphBuilder = ({
|
|
|
9077
9085
|
document.exitFullscreen();
|
|
9078
9086
|
}
|
|
9079
9087
|
}, []);
|
|
9080
|
-
(0,
|
|
9088
|
+
(0, import_react69.useEffect)(() => {
|
|
9081
9089
|
const handleFullscreenChange = () => {
|
|
9082
9090
|
_setIsFullscreen(!!document.fullscreenElement);
|
|
9083
9091
|
setTimeout(() => {
|
|
@@ -9089,13 +9097,13 @@ var NodeGraphBuilder = ({
|
|
|
9089
9097
|
document.removeEventListener("fullscreenchange", handleFullscreenChange);
|
|
9090
9098
|
};
|
|
9091
9099
|
}, [fitView]);
|
|
9092
|
-
const handleExportVisual = (0,
|
|
9100
|
+
const handleExportVisual = (0, import_react69.useCallback)(() => {
|
|
9093
9101
|
const imageWidth = 1024;
|
|
9094
9102
|
const imageHeight = 768;
|
|
9095
|
-
const nodesBounds = (0,
|
|
9103
|
+
const nodesBounds = (0, import_react70.getNodesBounds)(getNodes());
|
|
9096
9104
|
const width = imageWidth > nodesBounds.width ? imageWidth : nodesBounds.width;
|
|
9097
9105
|
const height = imageHeight > nodesBounds.height ? imageHeight : nodesBounds.height;
|
|
9098
|
-
const viewport = (0,
|
|
9106
|
+
const viewport = (0, import_react70.getViewportForBounds)(
|
|
9099
9107
|
nodesBounds,
|
|
9100
9108
|
width,
|
|
9101
9109
|
height,
|
|
@@ -9121,7 +9129,7 @@ var NodeGraphBuilder = ({
|
|
|
9121
9129
|
if (controls) controls.style.display = "block";
|
|
9122
9130
|
});
|
|
9123
9131
|
}, [getNodes, downloadImage, title]);
|
|
9124
|
-
const handleLegendClick = (0,
|
|
9132
|
+
const handleLegendClick = (0, import_react69.useCallback)(
|
|
9125
9133
|
(collectionType, groupId) => {
|
|
9126
9134
|
const updatedNodes = nodes.map((node) => {
|
|
9127
9135
|
if (groupId && node.data.group && node.data.group?.id === groupId) {
|
|
@@ -9152,7 +9160,7 @@ var NodeGraphBuilder = ({
|
|
|
9152
9160
|
},
|
|
9153
9161
|
[nodes, edges, setNodes, setEdges, fitView]
|
|
9154
9162
|
);
|
|
9155
|
-
const getNodesByCollectionWithColors = (0,
|
|
9163
|
+
const getNodesByCollectionWithColors = (0, import_react69.useCallback)((nodes2) => {
|
|
9156
9164
|
const colorClasses = {
|
|
9157
9165
|
events: "bg-orange-600",
|
|
9158
9166
|
services: "bg-pink-600",
|
|
@@ -9203,24 +9211,24 @@ var NodeGraphBuilder = ({
|
|
|
9203
9211
|
);
|
|
9204
9212
|
return { ...legendForDomains, ...legendForNodes };
|
|
9205
9213
|
}, []);
|
|
9206
|
-
const legendKeyRef = (0,
|
|
9214
|
+
const legendKeyRef = (0, import_react69.useRef)("");
|
|
9207
9215
|
const computedLegendKey = nodes.map((n) => `${n.id}:${n.type}:${n.data.group?.id || ""}`).join(",");
|
|
9208
9216
|
if (computedLegendKey !== legendKeyRef.current) {
|
|
9209
9217
|
legendKeyRef.current = computedLegendKey;
|
|
9210
9218
|
}
|
|
9211
9219
|
const legendKey = legendKeyRef.current;
|
|
9212
|
-
const legend = (0,
|
|
9220
|
+
const legend = (0, import_react69.useMemo)(
|
|
9213
9221
|
() => getNodesByCollectionWithColors(nodes),
|
|
9214
9222
|
[getNodesByCollectionWithColors, legendKey]
|
|
9215
9223
|
);
|
|
9216
|
-
const nodeIdsKeyRef = (0,
|
|
9224
|
+
const nodeIdsKeyRef = (0, import_react69.useRef)("");
|
|
9217
9225
|
const computedNodeIdsKey = nodes.map((n) => n.id).join(",");
|
|
9218
9226
|
if (computedNodeIdsKey !== nodeIdsKeyRef.current) {
|
|
9219
9227
|
nodeIdsKeyRef.current = computedNodeIdsKey;
|
|
9220
9228
|
}
|
|
9221
9229
|
const nodeIdsKey = nodeIdsKeyRef.current;
|
|
9222
|
-
const searchNodes = (0,
|
|
9223
|
-
const allNoteGroups = (0,
|
|
9230
|
+
const searchNodes = (0, import_react69.useMemo)(() => nodes, [nodeIdsKey]);
|
|
9231
|
+
const allNoteGroups = (0, import_react69.useMemo)(() => {
|
|
9224
9232
|
const groups = [];
|
|
9225
9233
|
for (const node of nodes) {
|
|
9226
9234
|
const result = getNotesFromNode(node);
|
|
@@ -9235,11 +9243,11 @@ var NodeGraphBuilder = ({
|
|
|
9235
9243
|
}
|
|
9236
9244
|
return groups;
|
|
9237
9245
|
}, [nodeIdsKey]);
|
|
9238
|
-
const totalNotesCount = (0,
|
|
9246
|
+
const totalNotesCount = (0, import_react69.useMemo)(
|
|
9239
9247
|
() => allNoteGroups.reduce((sum, g) => sum + g.notes.length, 0),
|
|
9240
9248
|
[allNoteGroups]
|
|
9241
9249
|
);
|
|
9242
|
-
const handleStepChange = (0,
|
|
9250
|
+
const handleStepChange = (0, import_react69.useCallback)(
|
|
9243
9251
|
(nodeId, highlightPaths, shouldZoomOut) => {
|
|
9244
9252
|
if (nodeId === null) {
|
|
9245
9253
|
resetNodesAndEdges();
|
|
@@ -9314,16 +9322,22 @@ var NodeGraphBuilder = ({
|
|
|
9314
9322
|
},
|
|
9315
9323
|
[nodes, edges, setNodes, setEdges, resetNodesAndEdges, fitView]
|
|
9316
9324
|
);
|
|
9317
|
-
const isFlowVisualization = (0,
|
|
9325
|
+
const isFlowVisualization = (0, import_react69.useMemo)(
|
|
9318
9326
|
() => edges.some((edge) => edge.type === "flow-edge"),
|
|
9319
9327
|
[edges]
|
|
9320
9328
|
);
|
|
9321
|
-
return /* @__PURE__ */ (0, import_jsx_runtime38.
|
|
9329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
9322
9330
|
"div",
|
|
9323
9331
|
{
|
|
9324
9332
|
ref: reactFlowWrapperRef,
|
|
9325
9333
|
className: "w-full h-full bg-[rgb(var(--ec-page-bg))] flex flex-col eventcatalog-visualizer",
|
|
9326
|
-
|
|
9334
|
+
style: {
|
|
9335
|
+
width: "100%",
|
|
9336
|
+
height: "100%",
|
|
9337
|
+
display: "flex",
|
|
9338
|
+
flexDirection: "column"
|
|
9339
|
+
},
|
|
9340
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(PortalContainerProvider, { value: reactFlowWrapperRef.current, children: [
|
|
9327
9341
|
isMermaidView ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
|
9328
9342
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "w-full pr-6 flex space-x-2 justify-between items-center bg-[rgb(var(--ec-page-bg))] border-b border-[rgb(var(--ec-page-border))] p-4", children: [
|
|
9329
9343
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex space-x-2 ml-4", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(DropdownMenu2.Root, { children: [
|
|
@@ -9338,7 +9352,7 @@ var NodeGraphBuilder = ({
|
|
|
9338
9352
|
]
|
|
9339
9353
|
}
|
|
9340
9354
|
) }),
|
|
9341
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(DropdownMenu2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
9355
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(DropdownMenu2.Portal, { container: reactFlowWrapperRef.current, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
9342
9356
|
DropdownMenu2.Content,
|
|
9343
9357
|
{
|
|
9344
9358
|
className: "min-w-56 bg-[rgb(var(--ec-page-bg))] border border-[rgb(var(--ec-page-border))] rounded-lg shadow-xl z-50 py-1.5 animate-in fade-in zoom-in-95 duration-200",
|
|
@@ -9396,7 +9410,7 @@ var NodeGraphBuilder = ({
|
|
|
9396
9410
|
}
|
|
9397
9411
|
) })
|
|
9398
9412
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
9399
|
-
|
|
9413
|
+
import_react70.ReactFlow,
|
|
9400
9414
|
{
|
|
9401
9415
|
nodeTypes,
|
|
9402
9416
|
edgeTypes: edgeTypes2,
|
|
@@ -9408,7 +9422,7 @@ var NodeGraphBuilder = ({
|
|
|
9408
9422
|
onEdgesChange,
|
|
9409
9423
|
onEdgeMouseEnter: handleEdgeMouseEnter,
|
|
9410
9424
|
onEdgeMouseLeave: handleEdgeMouseLeave,
|
|
9411
|
-
connectionLineType:
|
|
9425
|
+
connectionLineType: import_react70.ConnectionLineType.SmoothStep,
|
|
9412
9426
|
nodeOrigin: NODE_ORIGIN,
|
|
9413
9427
|
onNodeClick: handleNodeClick,
|
|
9414
9428
|
onNodeMouseEnter: handleNodeMouseEnter,
|
|
@@ -9422,7 +9436,7 @@ var NodeGraphBuilder = ({
|
|
|
9422
9436
|
className: "relative",
|
|
9423
9437
|
children: [
|
|
9424
9438
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
9425
|
-
|
|
9439
|
+
import_react70.Panel,
|
|
9426
9440
|
{
|
|
9427
9441
|
position: "top-center",
|
|
9428
9442
|
className: "w-full pr-6 pointer-events-none",
|
|
@@ -9440,46 +9454,52 @@ var NodeGraphBuilder = ({
|
|
|
9440
9454
|
]
|
|
9441
9455
|
}
|
|
9442
9456
|
) }),
|
|
9443
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
9444
|
-
DropdownMenu2.
|
|
9457
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
9458
|
+
DropdownMenu2.Portal,
|
|
9445
9459
|
{
|
|
9446
|
-
|
|
9447
|
-
|
|
9448
|
-
|
|
9449
|
-
|
|
9450
|
-
|
|
9451
|
-
|
|
9452
|
-
|
|
9453
|
-
|
|
9454
|
-
|
|
9455
|
-
|
|
9456
|
-
|
|
9457
|
-
|
|
9458
|
-
|
|
9459
|
-
|
|
9460
|
-
|
|
9461
|
-
|
|
9462
|
-
|
|
9463
|
-
|
|
9464
|
-
|
|
9465
|
-
|
|
9466
|
-
|
|
9467
|
-
|
|
9468
|
-
|
|
9469
|
-
|
|
9470
|
-
|
|
9471
|
-
|
|
9472
|
-
|
|
9473
|
-
|
|
9474
|
-
|
|
9475
|
-
|
|
9476
|
-
|
|
9477
|
-
|
|
9478
|
-
|
|
9479
|
-
|
|
9480
|
-
|
|
9460
|
+
container: reactFlowWrapperRef.current,
|
|
9461
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
9462
|
+
DropdownMenu2.Content,
|
|
9463
|
+
{
|
|
9464
|
+
className: "min-w-56 bg-[rgb(var(--ec-page-bg))] border border-[rgb(var(--ec-page-border))] rounded-lg shadow-xl z-50 py-1.5 animate-in fade-in zoom-in-95 duration-200",
|
|
9465
|
+
sideOffset: 0,
|
|
9466
|
+
align: "end",
|
|
9467
|
+
alignOffset: -180,
|
|
9468
|
+
children: [
|
|
9469
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(DropdownMenu2.Arrow, { className: "fill-[rgb(var(--ec-page-bg))] stroke-[rgb(var(--ec-page-border))] stroke-1" }),
|
|
9470
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
9471
|
+
VisualizerDropdownContent_default,
|
|
9472
|
+
{
|
|
9473
|
+
isMermaidView,
|
|
9474
|
+
setIsMermaidView,
|
|
9475
|
+
animateMessages,
|
|
9476
|
+
toggleAnimateMessages,
|
|
9477
|
+
hideChannels,
|
|
9478
|
+
toggleChannelsVisibility,
|
|
9479
|
+
hasChannels,
|
|
9480
|
+
showMinimap,
|
|
9481
|
+
setShowMinimap,
|
|
9482
|
+
handleFitView,
|
|
9483
|
+
searchRef,
|
|
9484
|
+
isChatEnabled,
|
|
9485
|
+
openChat,
|
|
9486
|
+
handleCopyArchitectureCode,
|
|
9487
|
+
handleExportVisual,
|
|
9488
|
+
setIsShareModalOpen,
|
|
9489
|
+
toggleFullScreen,
|
|
9490
|
+
openStudioModal,
|
|
9491
|
+
isDevMode,
|
|
9492
|
+
onSaveLayout: handleSaveLayout,
|
|
9493
|
+
onResetLayout: handleResetLayout,
|
|
9494
|
+
notesCount: totalNotesCount,
|
|
9495
|
+
onOpenNotes: openNotesModal
|
|
9496
|
+
}
|
|
9497
|
+
)
|
|
9498
|
+
]
|
|
9499
|
+
}
|
|
9500
|
+
)
|
|
9481
9501
|
}
|
|
9482
|
-
)
|
|
9502
|
+
)
|
|
9483
9503
|
] }) }),
|
|
9484
9504
|
mode === "full" && showSearch && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex justify-end items-center gap-2", children: !isMermaidView && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "w-96", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
9485
9505
|
VisualiserSearch_default,
|
|
@@ -9533,10 +9553,10 @@ var NodeGraphBuilder = ({
|
|
|
9533
9553
|
]
|
|
9534
9554
|
}
|
|
9535
9555
|
),
|
|
9536
|
-
includeBackground && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
9537
|
-
includeBackground && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
9556
|
+
includeBackground && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react70.Background, { color: "var(--ec-bg-dots)", gap: 16 }),
|
|
9557
|
+
includeBackground && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react70.Controls, {}),
|
|
9538
9558
|
showMinimap && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
9539
|
-
|
|
9559
|
+
import_react70.MiniMap,
|
|
9540
9560
|
{
|
|
9541
9561
|
nodeStrokeWidth: 3,
|
|
9542
9562
|
zoomable: true,
|
|
@@ -9544,7 +9564,7 @@ var NodeGraphBuilder = ({
|
|
|
9544
9564
|
style: MINIMAP_STYLE
|
|
9545
9565
|
}
|
|
9546
9566
|
),
|
|
9547
|
-
isFlowVisualization && showFlowWalkthrough && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
9567
|
+
isFlowVisualization && showFlowWalkthrough && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react70.Panel, { position: "bottom-left", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
9548
9568
|
StepWalkthrough_default,
|
|
9549
9569
|
{
|
|
9550
9570
|
nodes,
|
|
@@ -9555,7 +9575,7 @@ var NodeGraphBuilder = ({
|
|
|
9555
9575
|
}
|
|
9556
9576
|
) }),
|
|
9557
9577
|
isDevMode && hasLayoutChanges && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
9558
|
-
|
|
9578
|
+
import_react70.Panel,
|
|
9559
9579
|
{
|
|
9560
9580
|
position: "bottom-left",
|
|
9561
9581
|
style: isFlowVisualization && showFlowWalkthrough ? LAYOUT_CHANGE_PANEL_STYLE_WITH_WALKTHROUGH : LAYOUT_CHANGE_PANEL_STYLE_DEFAULT,
|
|
@@ -9677,7 +9697,7 @@ var NodeGraphBuilder = ({
|
|
|
9677
9697
|
}
|
|
9678
9698
|
)
|
|
9679
9699
|
] })
|
|
9680
|
-
]
|
|
9700
|
+
] })
|
|
9681
9701
|
}
|
|
9682
9702
|
);
|
|
9683
9703
|
};
|
|
@@ -9714,7 +9734,7 @@ var NodeGraph = ({
|
|
|
9714
9734
|
onSaveLayout,
|
|
9715
9735
|
onResetLayout
|
|
9716
9736
|
}) => {
|
|
9717
|
-
const graphLayout = (0,
|
|
9737
|
+
const graphLayout = (0, import_react69.useMemo)(() => {
|
|
9718
9738
|
if (!graph) return null;
|
|
9719
9739
|
return layoutGraph(
|
|
9720
9740
|
graph.nodes,
|
|
@@ -9729,17 +9749,17 @@ var NodeGraph = ({
|
|
|
9729
9749
|
const includeKey = includeKeyProp !== void 0 ? includeKeyProp : graph?.options?.legend !== false;
|
|
9730
9750
|
const showSearch = showSearchProp !== void 0 ? showSearchProp : graph?.options?.search !== false;
|
|
9731
9751
|
const animated = animatedProp ?? graph?.options?.animated;
|
|
9732
|
-
const [elem, setElem] = (0,
|
|
9733
|
-
const [showFooter, setShowFooter] = (0,
|
|
9734
|
-
const [isStudioModalOpen, setIsStudioModalOpen] = (0,
|
|
9735
|
-
const openStudioModal = (0,
|
|
9752
|
+
const [elem, setElem] = (0, import_react69.useState)(null);
|
|
9753
|
+
const [showFooter, setShowFooter] = (0, import_react69.useState)(true);
|
|
9754
|
+
const [isStudioModalOpen, setIsStudioModalOpen] = (0, import_react69.useState)(false);
|
|
9755
|
+
const openStudioModal = (0, import_react69.useCallback)(() => {
|
|
9736
9756
|
setIsStudioModalOpen(true);
|
|
9737
9757
|
}, []);
|
|
9738
9758
|
const containerToRenderInto = portalId || `${id}-portal`;
|
|
9739
|
-
(0,
|
|
9759
|
+
(0, import_react69.useEffect)(() => {
|
|
9740
9760
|
setElem(document.getElementById(containerToRenderInto));
|
|
9741
9761
|
}, []);
|
|
9742
|
-
(0,
|
|
9762
|
+
(0, import_react69.useEffect)(() => {
|
|
9743
9763
|
const urlParams = new URLSearchParams(window.location.search);
|
|
9744
9764
|
const embed = urlParams.get("embed");
|
|
9745
9765
|
if (embed === "true") {
|
|
@@ -9748,7 +9768,7 @@ var NodeGraph = ({
|
|
|
9748
9768
|
}, []);
|
|
9749
9769
|
if (!elem) return null;
|
|
9750
9770
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { children: (0, import_react_dom.createPortal)(
|
|
9751
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
9771
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_react70.ReactFlowProvider, { children: [
|
|
9752
9772
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
9753
9773
|
NodeGraphBuilder,
|
|
9754
9774
|
{
|
|
@@ -9842,7 +9862,7 @@ var edgeTypes = {
|
|
|
9842
9862
|
};
|
|
9843
9863
|
|
|
9844
9864
|
// src/utils/utils/utils.ts
|
|
9845
|
-
var
|
|
9865
|
+
var import_react71 = require("@xyflow/react");
|
|
9846
9866
|
var import_dagre2 = __toESM(require("dagre"));
|
|
9847
9867
|
var generateIdForNode = (node) => {
|
|
9848
9868
|
return `${node.data.id}-${node.data.version}`;
|
|
@@ -9917,7 +9937,7 @@ var createEdge = (edgeOptions) => {
|
|
|
9917
9937
|
// height: 40,
|
|
9918
9938
|
// },
|
|
9919
9939
|
markerEnd: {
|
|
9920
|
-
type:
|
|
9940
|
+
type: import_react71.MarkerType.ArrowClosed,
|
|
9921
9941
|
width: 40,
|
|
9922
9942
|
height: 40,
|
|
9923
9943
|
color: "rgb(var(--ec-page-text-muted))"
|
|
@@ -9932,8 +9952,8 @@ var createEdge = (edgeOptions) => {
|
|
|
9932
9952
|
};
|
|
9933
9953
|
var createNode = (values) => {
|
|
9934
9954
|
return {
|
|
9935
|
-
sourcePosition:
|
|
9936
|
-
targetPosition:
|
|
9955
|
+
sourcePosition: import_react71.Position.Right,
|
|
9956
|
+
targetPosition: import_react71.Position.Left,
|
|
9937
9957
|
...values
|
|
9938
9958
|
};
|
|
9939
9959
|
};
|