@eventcatalog/visualiser 3.20.2 → 3.21.0

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.mjs CHANGED
@@ -2806,7 +2806,7 @@ function GlowHandle10({ side }) {
2806
2806
  width: 12,
2807
2807
  height: 12,
2808
2808
  borderRadius: "50%",
2809
- background: "linear-gradient(135deg, #3b82f6, #2563eb)",
2809
+ background: "linear-gradient(135deg, #6366f1, #4f46e5)",
2810
2810
  border: "2px solid rgb(var(--ec-page-bg))",
2811
2811
  zIndex: 20,
2812
2812
  animation: "ec-data-handle-pulse 2s ease-in-out infinite",
@@ -2853,7 +2853,7 @@ function PostItData(props) {
2853
2853
  {
2854
2854
  className: classNames6(
2855
2855
  "relative min-w-44 max-w-56 min-h-[120px]",
2856
- props?.selected ? "ring-2 ring-blue-400/60 ring-offset-1" : ""
2856
+ props?.selected ? "ring-2 ring-indigo-400/60 ring-offset-1" : ""
2857
2857
  ),
2858
2858
  children: [
2859
2859
  /* @__PURE__ */ jsx10(
@@ -2878,10 +2878,10 @@ function PostItData(props) {
2878
2878
  {
2879
2879
  className: "absolute inset-0",
2880
2880
  style: {
2881
- background: "linear-gradient(135deg, #bfdbfe 0%, #93c5fd 40%, #3b82f6 100%)",
2881
+ background: "linear-gradient(135deg, #c7d2fe 0%, #a5b4fc 40%, #6366f1 100%)",
2882
2882
  boxShadow: "1px 1px 3px rgba(0,0,0,0.15), 3px 4px 8px rgba(0,0,0,0.08)",
2883
2883
  transform: "rotate(-1deg)",
2884
- border: deprecated ? "2px dashed rgba(239, 68, 68, 0.5)" : draft ? "2px dashed rgba(59, 130, 246, 0.5)" : "none"
2884
+ border: deprecated ? "2px dashed rgba(239, 68, 68, 0.5)" : draft ? "2px dashed rgba(99, 102, 241, 0.5)" : "none"
2885
2885
  },
2886
2886
  children: [
2887
2887
  /* @__PURE__ */ jsx10("div", { style: FOLDED_CORNER_SHADOW_STYLE }),
@@ -2896,7 +2896,7 @@ function PostItData(props) {
2896
2896
  height: 0,
2897
2897
  borderStyle: "solid",
2898
2898
  borderWidth: "18px 0 0 18px",
2899
- borderColor: "#2563eb transparent transparent transparent",
2899
+ borderColor: "#4f46e5 transparent transparent transparent",
2900
2900
  opacity: 0.3
2901
2901
  }
2902
2902
  }
@@ -2907,8 +2907,14 @@ function PostItData(props) {
2907
2907
  /* @__PURE__ */ jsxs8("div", { className: "relative px-3.5 py-3", children: [
2908
2908
  /* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-between mb-2", children: [
2909
2909
  /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-1", children: [
2910
- /* @__PURE__ */ jsx10(Database, { className: "w-3 h-3 text-blue-900/50", strokeWidth: 2.5 }),
2911
- /* @__PURE__ */ jsx10("span", { className: "text-[8px] font-bold text-blue-900/50 uppercase tracking-widest", children: "Data" })
2910
+ /* @__PURE__ */ jsx10(
2911
+ Database,
2912
+ {
2913
+ className: "w-3 h-3 text-indigo-950/50",
2914
+ strokeWidth: 2.5
2915
+ }
2916
+ ),
2917
+ /* @__PURE__ */ jsx10("span", { className: "text-[8px] font-bold text-indigo-950/50 uppercase tracking-widest", children: "Data" })
2912
2918
  ] }),
2913
2919
  draft && /* @__PURE__ */ jsx10("span", { className: "text-[8px] font-extrabold text-amber-900 bg-amber-100 border border-dashed border-amber-400 px-1.5 py-0.5 rounded uppercase", children: "Draft" }),
2914
2920
  deprecated && /* @__PURE__ */ jsx10("span", { className: "text-[7px] font-bold text-white bg-red-500 border border-red-600 px-1.5 py-0.5 rounded uppercase", children: "Deprecated" })
@@ -2927,20 +2933,20 @@ function PostItData(props) {
2927
2933
  {
2928
2934
  className: classNames6(
2929
2935
  "text-[13px] font-bold leading-snug min-w-0 truncate",
2930
- deprecated ? "text-blue-950/40 line-through" : "text-blue-950"
2936
+ deprecated ? "text-indigo-950/40 line-through" : "text-indigo-950"
2931
2937
  ),
2932
2938
  children: name
2933
2939
  }
2934
2940
  )
2935
2941
  ] }),
2936
- version && /* @__PURE__ */ jsxs8("div", { className: "text-[9px] text-blue-900/40 font-semibold mt-0.5", children: [
2942
+ version && /* @__PURE__ */ jsxs8("div", { className: "text-[9px] text-indigo-950/40 font-semibold mt-0.5", children: [
2937
2943
  "v",
2938
2944
  version
2939
2945
  ] }),
2940
2946
  mode === "full" && summary && /* @__PURE__ */ jsx10(
2941
2947
  "div",
2942
2948
  {
2943
- className: "mt-2 pt-1.5 border-t border-blue-900/10 text-[9px] text-blue-950/60 leading-relaxed overflow-hidden",
2949
+ className: "mt-2 pt-1.5 border-t border-indigo-950/10 text-[9px] text-indigo-950/60 leading-relaxed overflow-hidden",
2944
2950
  style: LINE_CLAMP_STYLE,
2945
2951
  title: summary,
2946
2952
  children: summary
@@ -2978,12 +2984,12 @@ function DefaultData(props) {
2978
2984
  {
2979
2985
  className: classNames6(
2980
2986
  "relative min-w-48 max-w-60 rounded-xl border-2 overflow-visible",
2981
- props?.selected ? "ring-2 ring-blue-400/60 ring-offset-2" : "",
2982
- deprecated ? "border-dashed border-red-500" : draft ? `border-dashed ${isDark ? "border-blue-400" : "border-blue-400/60"}` : "border-blue-500"
2987
+ props?.selected ? "ring-2 ring-indigo-400/60 ring-offset-2" : "",
2988
+ deprecated ? "border-dashed border-red-500" : draft ? `border-dashed ${isDark ? "border-indigo-400" : "border-indigo-400/60"}` : "border-indigo-500"
2983
2989
  ),
2984
2990
  style: {
2985
- background: deprecated ? `repeating-linear-gradient(135deg, transparent, transparent 6px, ${deprecatedStripe} 6px, ${deprecatedStripe} 7px), var(--ec-data-node-bg, rgb(var(--ec-card-bg)))` : draft ? `repeating-linear-gradient(135deg, transparent, transparent 4px, ${isDark ? "rgba(59,130,246,0.25)" : "rgba(59,130,246,0.15)"} 4px, ${isDark ? "rgba(59,130,246,0.25)" : "rgba(59,130,246,0.15)"} 4.5px), repeating-linear-gradient(45deg, transparent, transparent 4px, ${isDark ? "rgba(59,130,246,0.25)" : "rgba(59,130,246,0.15)"} 4px, ${isDark ? "rgba(59,130,246,0.25)" : "rgba(59,130,246,0.15)"} 4.5px), var(--ec-data-node-bg, rgb(var(--ec-card-bg)))` : "var(--ec-data-node-bg, rgb(var(--ec-card-bg)))",
2986
- boxShadow: "0 2px 12px rgba(59, 130, 246, 0.15)"
2991
+ background: deprecated ? `repeating-linear-gradient(135deg, transparent, transparent 6px, ${deprecatedStripe} 6px, ${deprecatedStripe} 7px), var(--ec-data-node-bg, rgb(var(--ec-card-bg)))` : draft ? `repeating-linear-gradient(135deg, transparent, transparent 4px, ${isDark ? "rgba(99,102,241,0.25)" : "rgba(99,102,241,0.15)"} 4px, ${isDark ? "rgba(99,102,241,0.25)" : "rgba(99,102,241,0.15)"} 4.5px), repeating-linear-gradient(45deg, transparent, transparent 4px, ${isDark ? "rgba(99,102,241,0.25)" : "rgba(99,102,241,0.15)"} 4px, ${isDark ? "rgba(99,102,241,0.25)" : "rgba(99,102,241,0.15)"} 4.5px), var(--ec-data-node-bg, rgb(var(--ec-card-bg)))` : "var(--ec-data-node-bg, rgb(var(--ec-card-bg)))",
2992
+ boxShadow: "0 2px 12px rgba(99, 102, 241, 0.15)"
2987
2993
  },
2988
2994
  children: [
2989
2995
  /* @__PURE__ */ jsx10(
@@ -3010,7 +3016,7 @@ function DefaultData(props) {
3010
3016
  {
3011
3017
  className: classNames6(
3012
3018
  "inline-flex items-center gap-1 text-[7px] font-bold uppercase tracking-widest text-white px-1.5 py-0.5 rounded shadow-sm",
3013
- deprecated ? "bg-red-500" : "bg-blue-500"
3019
+ deprecated ? "bg-red-500" : "bg-indigo-500"
3014
3020
  ),
3015
3021
  children: [
3016
3022
  /* @__PURE__ */ jsx10(Database, { className: "w-2.5 h-2.5", strokeWidth: 2.5 }),
@@ -3023,7 +3029,7 @@ function DefaultData(props) {
3023
3029
  typeLabel && /* @__PURE__ */ jsx10(
3024
3030
  "span",
3025
3031
  {
3026
- className: "z-10 text-[7px] font-semibold text-[rgb(var(--ec-page-text))] bg-[rgb(var(--ec-card-bg))] border border-blue-500 rounded-full px-1.5 py-0.5 uppercase tracking-wide",
3032
+ className: "z-10 text-[7px] font-semibold text-[rgb(var(--ec-page-text))] bg-[rgb(var(--ec-card-bg))] border border-indigo-500 rounded-full px-1.5 py-0.5 uppercase tracking-wide",
3027
3033
  style: { position: "absolute", top: -8, right: 10 },
3028
3034
  children: typeLabel
3029
3035
  }
@@ -3060,9 +3066,9 @@ function DefaultData(props) {
3060
3066
  OwnerIndicator,
3061
3067
  {
3062
3068
  owners: ownersNormalized,
3063
- accentColor: "bg-blue-400",
3064
- borderColor: "rgba(59,130,246,0.08)",
3065
- iconClass: "text-blue-300"
3069
+ accentColor: "bg-indigo-400",
3070
+ borderColor: "rgba(99,102,241,0.08)",
3071
+ iconClass: "text-indigo-300"
3066
3072
  }
3067
3073
  )
3068
3074
  ] })
@@ -3084,7 +3090,7 @@ import { Database as Database2 } from "lucide-react";
3084
3090
  var config_default2 = {
3085
3091
  type: "data",
3086
3092
  icon: Database2,
3087
- color: "blue",
3093
+ color: "indigo",
3088
3094
  targetCanConnectTo: [...SERVICE, ...CHANNEL, "external-system", ...ACTOR],
3089
3095
  sourceCanConnectTo: [...SERVICE, ...CHANNEL, "external-system", ...ACTOR],
3090
3096
  validateConnection: (connection) => {
@@ -6741,8 +6747,7 @@ var StepWalkthrough_default = memo32(function StepWalkthrough({
6741
6747
  nodes,
6742
6748
  edges,
6743
6749
  isFlowVisualization,
6744
- onStepChange,
6745
- mode = "full"
6750
+ onStepChange
6746
6751
  }) {
6747
6752
  const [currentNodeId, setCurrentNodeId] = useState6(null);
6748
6753
  const [pathHistory, setPathHistory] = useState6([]);
@@ -6862,7 +6867,7 @@ var StepWalkthrough_default = memo32(function StepWalkthrough({
6862
6867
  setPathHistory([]);
6863
6868
  onStepChange(null, [], true);
6864
6869
  }, [onStepChange]);
6865
- if (!isFlowVisualization || nodes.length === 0 || mode !== "full") {
6870
+ if (!isFlowVisualization || nodes.length === 0) {
6866
6871
  return null;
6867
6872
  }
6868
6873
  const { title, description } = useMemo15(() => {
@@ -11779,6 +11784,9 @@ var NodeGraphBuilder = ({
11779
11784
  () => edges.some((edge) => edge.type === "flow-edge"),
11780
11785
  [edges]
11781
11786
  );
11787
+ const isCompactMenuButton = !title;
11788
+ const menuButtonClassName = isCompactMenuButton ? "h-9 w-9 p-0 bg-[rgb(var(--ec-card-bg))] hover:bg-[rgb(var(--ec-accent-subtle))] border border-[rgb(var(--ec-page-border))] rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-[rgb(var(--ec-accent))] flex items-center justify-center transition-colors duration-150 hover:border-[rgb(var(--ec-accent)/0.3)] group" : "py-2.5 px-4 bg-[rgb(var(--ec-card-bg))] hover:bg-[rgb(var(--ec-accent-subtle))] border border-[rgb(var(--ec-page-border))] rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-[rgb(var(--ec-accent))] flex items-center gap-3 transition-colors duration-150 hover:border-[rgb(var(--ec-accent)/0.3)] group whitespace-nowrap";
11789
+ const menuIconClassName = isCompactMenuButton ? "h-4 w-4 text-[rgb(var(--ec-page-text-muted))] flex-shrink-0 group-hover:text-[rgb(var(--ec-accent))] transition-colors duration-150" : "h-5 w-5 text-[rgb(var(--ec-page-text-muted))] flex-shrink-0 group-hover:text-[rgb(var(--ec-accent))] transition-colors duration-150";
11782
11790
  return /* @__PURE__ */ jsx43(
11783
11791
  "div",
11784
11792
  {
@@ -11798,11 +11806,11 @@ var NodeGraphBuilder = ({
11798
11806
  /* @__PURE__ */ jsx43(DropdownMenu2.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs41(
11799
11807
  "button",
11800
11808
  {
11801
- className: "py-2.5 px-4 bg-[rgb(var(--ec-page-bg))] hover:bg-[rgb(var(--ec-accent-subtle)/0.4)] border border-[rgb(var(--ec-page-border))] rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-[rgb(var(--ec-accent))] flex items-center gap-3 transition-all duration-200 hover:border-[rgb(var(--ec-accent)/0.3)] group whitespace-nowrap",
11809
+ className: menuButtonClassName,
11802
11810
  "aria-label": "Open menu",
11803
11811
  children: [
11804
11812
  title && /* @__PURE__ */ jsx43("span", { className: "text-base font-medium text-[rgb(var(--ec-page-text))] leading-tight", children: title }),
11805
- /* @__PURE__ */ jsx43(MoreVertical, { className: "h-5 w-5 text-[rgb(var(--ec-page-text-muted))] flex-shrink-0 group-hover:text-[rgb(var(--ec-accent))] transition-colors duration-150" })
11813
+ /* @__PURE__ */ jsx43(MoreVertical, { className: menuIconClassName })
11806
11814
  ]
11807
11815
  }
11808
11816
  ) }),
@@ -11900,11 +11908,11 @@ var NodeGraphBuilder = ({
11900
11908
  /* @__PURE__ */ jsx43(DropdownMenu2.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs41(
11901
11909
  "button",
11902
11910
  {
11903
- className: "py-2.5 px-4 bg-[rgb(var(--ec-page-bg))] hover:bg-[rgb(var(--ec-accent-subtle)/0.4)] border border-[rgb(var(--ec-page-border))] rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-[rgb(var(--ec-accent))] flex items-center gap-3 transition-all duration-200 hover:border-[rgb(var(--ec-accent)/0.3)] group whitespace-nowrap",
11911
+ className: menuButtonClassName,
11904
11912
  "aria-label": "Open menu",
11905
11913
  children: [
11906
11914
  title && /* @__PURE__ */ jsx43("span", { className: "text-base font-medium text-[rgb(var(--ec-page-text))] leading-tight", children: title }),
11907
- /* @__PURE__ */ jsx43(MoreVertical, { className: "h-5 w-5 text-[rgb(var(--ec-page-text-muted))] flex-shrink-0 group-hover:text-[rgb(var(--ec-accent))] transition-colors duration-150" })
11915
+ /* @__PURE__ */ jsx43(MoreVertical, { className: menuIconClassName })
11908
11916
  ]
11909
11917
  }
11910
11918
  ) }),