@ebubekirylmaz/link-test 1.2.44 → 1.2.46

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.
Files changed (121) hide show
  1. package/package.json +13 -6
  2. package/src/Platform.jsx +14 -15
  3. package/src/assets/illustrations/avatar-shape.jsx +6 -7
  4. package/src/assets/illustrations/booking-illustration.jsx +4 -14
  5. package/src/assets/illustrations/check-in-illustration.jsx +4 -10
  6. package/src/assets/illustrations/check-out-illustration.jsx +4 -3
  7. package/src/assets/illustrations/coming-soon-illustration.jsx +4 -17
  8. package/src/assets/illustrations/forbidden-illustration.jsx +4 -12
  9. package/src/assets/illustrations/maintenance-illustration.jsx +4 -24
  10. package/src/assets/illustrations/motivation-illustration.jsx +4 -9
  11. package/src/assets/illustrations/order-complete-illustration.jsx +4 -12
  12. package/src/assets/illustrations/page-not-found-illustration.jsx +4 -9
  13. package/src/assets/illustrations/seo-illustration.jsx +4 -16
  14. package/src/assets/illustrations/sever-error-illustration.jsx +4 -21
  15. package/src/assets/illustrations/upgrade-storage-illustration.jsx +4 -20
  16. package/src/assets/illustrations/upload-illustration.jsx +4 -81
  17. package/src/components/NucleoidLoginForm/NucleoidLoginForm.jsx +1 -0
  18. package/src/components/TopNavBar/TopNavBar.jsx +6 -2
  19. package/src/components/file-thumbnail/file-thumbnail.jsx +5 -6
  20. package/src/components/nav-section/horizontal/nav-section-horizontal.jsx +5 -6
  21. package/src/components/settings/drawer/layout-options.jsx +5 -4
  22. package/src/components/settings/drawer/presets-options.jsx +6 -5
  23. package/src/components/settings/drawer/settings-drawer.jsx +7 -4
  24. package/src/components/settings/drawer/stretch-options.jsx +5 -5
  25. package/src/config/schemas.js +1 -0
  26. package/src/context/Context.js +98 -0
  27. package/src/context/reducer.js +590 -10
  28. package/src/hooks/index.js +2 -1
  29. package/src/hooks/use-beta.js +8 -0
  30. package/src/layouts/DashboardLayout/header.jsx +5 -4
  31. package/src/layouts/DashboardLayout/nav-mini.jsx +5 -7
  32. package/src/layouts/DashboardLayout/nav-vertical.jsx +11 -11
  33. package/src/layouts/FullScreenLayout/FullScreenLayout.jsx +5 -1
  34. package/src/layouts/FullScreenLayout/nav-vertical.jsx +11 -11
  35. package/src/layouts/MainLayout/footer.jsx +7 -7
  36. package/src/layouts/MainLayout/header.jsx +3 -2
  37. package/src/layouts/MainLayout/nav/desktop/nav-list.jsx +8 -8
  38. package/src/layouts/MainLayout/nav/mobile/index.jsx +7 -6
  39. package/src/layouts/auth/classic.jsx +6 -6
  40. package/src/layouts/auth/modern.jsx +7 -6
  41. package/src/layouts/common/ProjectBar/index.jsx +13 -11
  42. package/src/layouts/common/account-popover.jsx +1 -2
  43. package/src/layouts/common/header-sim.jsx +3 -2
  44. package/src/layouts/common/header-simple.jsx +6 -3
  45. package/src/layouts/common/notifications-popover/index.jsx +18 -13
  46. package/src/layouts/common/notifications-popover/notification-item.jsx +28 -16
  47. package/src/lib/APIDialogAction/APIDialogAction.jsx +109 -0
  48. package/src/lib/APIDialogAction/index.js +1 -0
  49. package/src/lib/APIDialogAction/styles.js +6 -0
  50. package/src/lib/APIParams/APIParams.jsx +57 -0
  51. package/src/lib/APIParams/index.js +1 -0
  52. package/src/lib/APIPath/APIPath.jsx +82 -0
  53. package/src/lib/APIPath/index.js +1 -0
  54. package/src/lib/APIPath/styles.js +19 -0
  55. package/src/lib/APITree/APITree.jsx +411 -0
  56. package/src/lib/APITree/Arrow.jsx +21 -0
  57. package/src/lib/APITree/DeleteMethodDialog.jsx +41 -0
  58. package/src/lib/APITree/index.js +1 -0
  59. package/src/lib/APITree/styles.js +19 -0
  60. package/src/lib/APITypes/APITypes.jsx +141 -0
  61. package/src/lib/APITypes/TypeEditor.jsx +46 -0
  62. package/src/lib/APITypes/TypeList.jsx +180 -0
  63. package/src/lib/APITypes/index.js +1 -0
  64. package/src/lib/AddItemWizard/AddItemWizard.jsx +21 -10
  65. package/src/lib/BlankTreeMessage/BlankTreeMessage.jsx +39 -0
  66. package/src/lib/BlankTreeMessage/index.js +1 -0
  67. package/src/lib/CustomBreadcrumbs/CustomBreadcrumbs.jsx +3 -2
  68. package/src/lib/DialogTootip/DialogTooltip.jsx +67 -0
  69. package/src/lib/DialogTootip/index.js +1 -0
  70. package/src/lib/DialogTootip/styles.js +9 -0
  71. package/src/lib/Flow/connectors/DynamicConnector.jsx +179 -107
  72. package/src/lib/Flow/core/Flow.jsx +2 -0
  73. package/src/lib/Flow/core/FlowNode.jsx +2 -0
  74. package/src/lib/Flow/core/FlowViewport.jsx +41 -9
  75. package/src/lib/Flow/hooks/useNodeStyle.js +14 -0
  76. package/src/lib/Flow/layouts/CardLayout.jsx +4 -3
  77. package/src/lib/Flow/nodes/DefaultCard.jsx +6 -8
  78. package/src/lib/Flow/nodes/FlowNodeView.jsx +105 -21
  79. package/src/lib/Flow/styles.js +4 -0
  80. package/src/lib/IconSelector/IconSelector.jsx +5 -1
  81. package/src/lib/ItemSummary/ItemSummary.jsx +11 -6
  82. package/src/lib/ItemSummary/ItemsSummary.jsx +38 -26
  83. package/src/lib/NewApiBody/NewAPIBody.jsx +97 -0
  84. package/src/lib/NewApiBody/ParamView.jsx +38 -0
  85. package/src/lib/NucDialog/NucDialog.jsx +108 -0
  86. package/src/lib/NucDialog/index.js +1 -0
  87. package/src/lib/ParamTable/ParamTable.jsx +133 -0
  88. package/src/lib/ParamTable/TypeMenu.jsx +102 -0
  89. package/src/lib/ParamTable/defaults.js +47 -0
  90. package/src/lib/ParamTable/index.js +1 -0
  91. package/src/lib/ParamTable/styles.js +12 -0
  92. package/src/lib/ResourceMenu/AlertMassage.jsx +28 -0
  93. package/src/lib/ResourceMenu/DeleteResourceDialog.jsx +60 -0
  94. package/src/lib/ResourceMenu/ResourceMenu.jsx +158 -0
  95. package/src/lib/ResourceMenu/index.js +1 -0
  96. package/src/lib/ResourceMenu/styles.js +5 -0
  97. package/src/lib/Schema/Schema.jsx +204 -0
  98. package/src/lib/Schema/index.js +1 -0
  99. package/src/lib/SchemaEditor/SchemaEditor.jsx +258 -0
  100. package/src/lib/SchemaEditor/SchemaEditor.test.js +193 -0
  101. package/src/lib/SchemaEditor/SchemaPropertyEditor.jsx +135 -0
  102. package/src/lib/SchemaEditor/SchemaUtils.js +152 -0
  103. package/src/lib/SchemaEditor/index.js +1 -0
  104. package/src/lib/SparkleInput/SparkleInput.jsx +31 -28
  105. package/src/lib/TableSelectedAction/TableSelectedAction.jsx +7 -8
  106. package/src/lib/ToggleableMenu/ToggleableMenu.jsx +35 -0
  107. package/src/lib/ToggleableMenu/index.js +1 -0
  108. package/src/lib/index.js +14 -0
  109. package/src/pages/Callback.jsx +6 -8
  110. package/src/pages/ConfigError.jsx +3 -1
  111. package/src/pages/LoginPage.jsx +3 -12
  112. package/src/stories/APITree.stories.jsx +429 -0
  113. package/src/stories/FlowChart.stories.jsx +1 -1
  114. package/src/templates/ActionTemplate.js +24 -0
  115. package/src/theme/overrides/default-props.jsx +17 -11
  116. package/src/widgets/Login/CognitoLogin.jsx +165 -173
  117. package/src/widgets/Login/DemoLogin.jsx +43 -38
  118. package/src/widgets/Login/amplifyAuth.js +6 -6
  119. package/src/widgets/Login/amplifyConfig.js +3 -0
  120. package/src/widgets/LoginForm/LoginForm.jsx +8 -3
  121. package/src/widgets/SettingsDialog.jsx +206 -16
@@ -1,3 +1,5 @@
1
+ import { Box } from "@mui/material";
2
+
1
3
  import React, { useId, useLayoutEffect, useMemo, useState } from "react";
2
4
 
3
5
  const DynamicConnector = ({
@@ -18,6 +20,12 @@ const DynamicConnector = ({
18
20
  animationSpeed = 1,
19
21
  gradient = null,
20
22
  curvature = 0.5,
23
+ connectorType = "curved",
24
+ label = null,
25
+ labelStyle = {},
26
+ labelPosition = 0.5,
27
+ labelOffsetX = 0,
28
+ labelOffsetY = -10,
21
29
  }) => {
22
30
  const uniqueId = useId();
23
31
  const [dims, setDims] = useState(null);
@@ -91,6 +99,19 @@ const DynamicConnector = ({
91
99
  );
92
100
 
93
101
  const getPath = (from, to) => {
102
+ const isCornered =
103
+ connectorType === "cornered" || connectorType === "normal";
104
+
105
+ if (isCornered) {
106
+ if (isHorizontal) {
107
+ const midX = from.x + (to.x - from.x) / 2;
108
+ return `M ${from.x} ${from.y} L ${midX} ${from.y} L ${midX} ${to.y} L ${to.x} ${to.y}`;
109
+ }
110
+
111
+ const midY = from.y + (to.y - from.y) / 2;
112
+ return `M ${from.x} ${from.y} L ${from.x} ${midY} L ${to.x} ${midY} L ${to.x} ${to.y}`;
113
+ }
114
+
94
115
  const dx = Math.abs(to.x - from.x);
95
116
  const dy = Math.abs(to.y - from.y);
96
117
  const distance = Math.sqrt(dx * dx + dy * dy);
@@ -129,118 +150,169 @@ const DynamicConnector = ({
129
150
  const dashArray = getDashArray();
130
151
 
131
152
  return (
132
- <svg
133
- style={{
134
- position: "absolute",
135
- inset: 0,
136
- pointerEvents: "none",
137
- overflow: "visible",
138
- zIndex: 0,
139
- }}
140
- width="100%"
141
- height="100%"
142
- viewBox={`0 0 ${dims.w} ${dims.h}`}
143
- >
144
- <defs>
145
- {gradient && (
146
- <linearGradient
147
- id={ids.gradient}
148
- gradientUnits="userSpaceOnUse"
149
- x1={points.parent.x}
150
- y1={points.parent.y}
151
- x2={points.children[0]?.x || points.parent.x}
152
- y2={points.children[0]?.y || points.parent.y}
153
- >
154
- <stop offset="0%" stopColor={gradient.from} />
155
- <stop offset="100%" stopColor={gradient.to} />
156
- </linearGradient>
157
- )}
153
+ <>
154
+ <svg
155
+ style={{
156
+ position: "absolute",
157
+ inset: 0,
158
+ pointerEvents: "none",
159
+ overflow: "visible",
160
+ zIndex: 0,
161
+ }}
162
+ width="100%"
163
+ height="100%"
164
+ viewBox={`0 0 ${dims.w} ${dims.h}`}
165
+ >
166
+ <defs>
167
+ {gradient && (
168
+ <linearGradient
169
+ id={ids.gradient}
170
+ gradientUnits="userSpaceOnUse"
171
+ x1={points.parent.x}
172
+ y1={points.parent.y}
173
+ x2={points.children[0]?.x || points.parent.x}
174
+ y2={points.children[0]?.y || points.parent.y}
175
+ >
176
+ <stop offset="0%" stopColor={gradient.from} />
177
+ <stop offset="100%" stopColor={gradient.to} />
178
+ </linearGradient>
179
+ )}
158
180
 
159
- {showArrow && (
160
- <marker
161
- id={ids.arrow}
162
- viewBox="0 0 10 10"
163
- refX="9"
164
- refY="5"
165
- markerWidth={arrowSize}
166
- markerHeight={arrowSize}
167
- orient="auto-start-reverse"
168
- >
169
- <path
170
- d="M 0 0 L 10 5 L 0 10 z"
171
- fill={gradient ? `url(#${ids.gradient})` : stroke}
172
- />
173
- </marker>
174
- )}
181
+ {showArrow && (
182
+ <marker
183
+ id={ids.arrow}
184
+ viewBox="0 0 10 10"
185
+ refX="9"
186
+ refY="5"
187
+ markerWidth={arrowSize}
188
+ markerHeight={arrowSize}
189
+ orient="auto-start-reverse"
190
+ >
191
+ <path
192
+ d="M 0 0 L 10 5 L 0 10 z"
193
+ fill={gradient ? `url(#${ids.gradient})` : stroke}
194
+ />
195
+ </marker>
196
+ )}
175
197
 
176
- {animated && <style>{animationStyle}</style>}
177
- </defs>
178
-
179
- {points.children.map((child, i) => {
180
- const pathD = getPath(points.parent, child);
181
- const pathStroke = gradient ? `url(#${ids.gradient})` : stroke;
182
-
183
- return (
184
- <g key={i}>
185
- <path
186
- d={pathD}
187
- fill="none"
188
- stroke={pathStroke}
189
- strokeWidth={strokeWidth}
190
- strokeDasharray={animated ? "8,4" : dashArray}
191
- strokeLinecap="round"
192
- strokeLinejoin="round"
193
- markerEnd={showArrow ? `url(#${ids.arrow})` : undefined}
194
- style={{
195
- transition: "stroke 0.2s ease, stroke-width 0.2s ease",
196
- ...(animated
197
- ? {
198
- animation: `flowAnimation ${
199
- 0.5 / animationSpeed
200
- }s linear infinite`,
201
- }
202
- : {}),
203
- }}
204
- />
205
- </g>
206
- );
207
- })}
208
-
209
- {showDots && (
210
- <>
211
- <circle
212
- cx={points.parent.x}
213
- cy={points.parent.y}
214
- r={dotRadius}
215
- fill={gradient ? gradient.from : effectiveDotColor}
216
- stroke="#fff"
217
- strokeWidth={1.5}
218
- style={{
219
- filter: "drop-shadow(0 1px 2px rgba(0,0,0,0.15))",
220
- }}
221
- />
222
-
223
- {points.children.map((child, i) => {
224
- const dotFill = gradient ? gradient.to : effectiveDotColor;
225
-
226
- return (
227
- <circle
228
- key={i}
229
- cx={child.x}
230
- cy={child.y}
231
- r={dotRadius}
232
- fill={dotFill}
233
- stroke="#fff"
234
- strokeWidth={1.5}
198
+ {animated && <style>{animationStyle}</style>}
199
+ </defs>
200
+
201
+ {points.children.map((child, i) => {
202
+ const pathD = getPath(points.parent, child);
203
+ const pathStroke = gradient ? `url(#${ids.gradient})` : stroke;
204
+
205
+ const labelX =
206
+ points.parent.x +
207
+ (child.x - points.parent.x) * labelPosition +
208
+ labelOffsetX;
209
+ const labelY =
210
+ points.parent.y +
211
+ (child.y - points.parent.y) * labelPosition +
212
+ labelOffsetY;
213
+
214
+ return (
215
+ <g key={i}>
216
+ <path
217
+ d={pathD}
218
+ fill="none"
219
+ stroke={pathStroke}
220
+ strokeWidth={strokeWidth}
221
+ strokeDasharray={animated ? "8,4" : dashArray}
222
+ strokeLinecap="round"
223
+ strokeLinejoin="round"
224
+ markerEnd={showArrow ? `url(#${ids.arrow})` : undefined}
235
225
  style={{
236
- filter: "drop-shadow(0 1px 2px rgba(0,0,0,0.15))",
226
+ transition: "stroke 0.2s ease, stroke-width 0.2s ease",
227
+ ...(animated
228
+ ? {
229
+ animation: `flowAnimation ${
230
+ 0.5 / animationSpeed
231
+ }s linear infinite`,
232
+ }
233
+ : {}),
237
234
  }}
238
235
  />
239
- );
240
- })}
241
- </>
242
- )}
243
- </svg>
236
+ </g>
237
+ );
238
+ })}
239
+
240
+ {showDots && (
241
+ <>
242
+ <circle
243
+ cx={points.parent.x}
244
+ cy={points.parent.y}
245
+ r={dotRadius}
246
+ fill={gradient ? gradient.from : effectiveDotColor}
247
+ stroke="#fff"
248
+ strokeWidth={1.5}
249
+ style={{
250
+ filter: "drop-shadow(0 1px 2px rgba(0,0,0,0.15))",
251
+ }}
252
+ />
253
+
254
+ {points.children.map((child, i) => {
255
+ const dotFill = gradient ? gradient.to : effectiveDotColor;
256
+
257
+ return (
258
+ <circle
259
+ key={i}
260
+ cx={child.x}
261
+ cy={child.y}
262
+ r={dotRadius}
263
+ fill={dotFill}
264
+ stroke="#fff"
265
+ strokeWidth={1.5}
266
+ style={{
267
+ filter: "drop-shadow(0 1px 2px rgba(0,0,0,0.15))",
268
+ }}
269
+ />
270
+ );
271
+ })}
272
+ </>
273
+ )}
274
+ </svg>
275
+
276
+ {label &&
277
+ points.children.map((child, i) => {
278
+ const labelX =
279
+ points.parent.x +
280
+ (child.x - points.parent.x) * labelPosition +
281
+ labelOffsetX;
282
+ const labelY =
283
+ points.parent.y +
284
+ (child.y - points.parent.y) * labelPosition +
285
+ labelOffsetY;
286
+
287
+ return (
288
+ <Box
289
+ key={`label-${i}`}
290
+ sx={{
291
+ position: "absolute",
292
+ left: labelX,
293
+ top: labelY,
294
+ transform: "translate(-50%, -50%)",
295
+ px: 1,
296
+ py: 0.5,
297
+ borderRadius: 1,
298
+ backgroundColor: "background.paper",
299
+ border: 1,
300
+ borderColor: labelStyle.color || stroke,
301
+ fontSize: labelStyle.fontSize || "12px",
302
+ fontWeight: labelStyle.fontWeight || 600,
303
+ color: labelStyle.textColor || stroke,
304
+ pointerEvents: "none",
305
+ userSelect: "none",
306
+ zIndex: 10,
307
+ boxShadow: 1,
308
+ whiteSpace: "nowrap",
309
+ }}
310
+ >
311
+ {label}
312
+ </Box>
313
+ );
314
+ })}
315
+ </>
244
316
  );
245
317
  };
246
318
 
@@ -11,6 +11,7 @@ export const Flow = ({
11
11
  plugin,
12
12
  editable = false,
13
13
  onChange,
14
+ height,
14
15
  }) => {
15
16
  const [floatingNodes, setFloatingNodes] = useState([]);
16
17
 
@@ -72,6 +73,7 @@ export const Flow = ({
72
73
  onCut={editable ? handleCut : undefined}
73
74
  onConnect={editable ? handleConnect : undefined}
74
75
  floatingNodes={floatingNodes}
76
+ height={height}
75
77
  />
76
78
  );
77
79
  };
@@ -16,6 +16,7 @@ const FlowNode = ({
16
16
  style,
17
17
  plugin,
18
18
  node,
19
+ height,
19
20
  ...props
20
21
  }) => {
21
22
  if (!isRoot) {
@@ -48,6 +49,7 @@ const FlowNode = ({
48
49
  variant={variant}
49
50
  style={style}
50
51
  plugin={plugin}
52
+ height={height}
51
53
  >
52
54
  {node && (
53
55
  <FlowNodeView
@@ -16,6 +16,9 @@ const FlowViewport = ({
16
16
  variant,
17
17
  style,
18
18
  plugin,
19
+ height = "100vh",
20
+ sx = {},
21
+ ...rest
19
22
  }) => {
20
23
  const clampZoom = (zoom) => Math.min(2.5, Math.max(0.25, zoom));
21
24
 
@@ -50,16 +53,44 @@ const FlowViewport = ({
50
53
  }, []);
51
54
 
52
55
  useEffect(() => {
56
+ const container = containerRef.current;
57
+ if (!container) return;
58
+
53
59
  const onWheel = (e) => {
54
- const wantsZoom = e.ctrlKey || e.metaKey;
55
- if (!wantsZoom) return;
56
60
  e.preventDefault();
57
- const direction = e.deltaY > 0 ? -1 : 1;
58
- const factor = direction > 0 ? 1.1 : 1 / 1.1;
59
- setZoom((z) => clampZoom(z * factor));
61
+
62
+ let deltaX = e.deltaX;
63
+ let deltaY = e.deltaY;
64
+ if (e.deltaMode === 1) {
65
+ deltaX *= 20;
66
+ deltaY *= 20;
67
+ } else if (e.deltaMode === 2) {
68
+ deltaX *= 400;
69
+ deltaY *= 400;
70
+ }
71
+
72
+ const wantsZoom = e.ctrlKey || e.metaKey;
73
+
74
+ if (wantsZoom) {
75
+ const maxDelta = 15;
76
+ const clamped = Math.max(-maxDelta, Math.min(maxDelta, deltaY));
77
+ const factor = Math.exp(-clamped * 0.007);
78
+ setZoom((z) => clampZoom(z * factor));
79
+ } else if (e.shiftKey) {
80
+ const delta = deltaX !== 0 ? deltaX : deltaY;
81
+ setOffset((prev) => ({
82
+ x: prev.x - delta,
83
+ y: prev.y,
84
+ }));
85
+ } else {
86
+ setOffset((prev) => ({
87
+ x: prev.x - deltaX,
88
+ y: prev.y - deltaY,
89
+ }));
90
+ }
60
91
  };
61
- window.addEventListener("wheel", onWheel, { passive: false });
62
- return () => window.removeEventListener("wheel", onWheel);
92
+ container.addEventListener("wheel", onWheel, { passive: false });
93
+ return () => container.removeEventListener("wheel", onWheel);
63
94
  }, []);
64
95
 
65
96
  useEffect(() => {
@@ -225,13 +256,14 @@ const FlowViewport = ({
225
256
  transform: `translate(${offset.x}px, ${offset.y}px) scale(${zoom})`,
226
257
  transformOrigin: "center center",
227
258
  width: "100%",
228
- height: "100%",
259
+ height: height,
229
260
  display: "flex",
230
261
  alignItems: "center",
231
- justifyContent: "center",
262
+ justifyContent: variant === "horizontal" ? "flex-start" : "center",
232
263
  transition: isDragging ? "none" : "transform 0.1s ease-out",
233
264
  pointerEvents: "auto",
234
265
  position: "relative",
266
+ pl: variant === "horizontal" ? 4 : 0,
235
267
  }}
236
268
  >
237
269
  {children}
@@ -38,6 +38,15 @@ export const useNodeStyle = ({ node, type, variant, style, plugin }) => {
38
38
  }) || {};
39
39
  }
40
40
 
41
+ let pluginEdgeTokens = {};
42
+ if (resolvedPlugin && typeof resolvedPlugin.edge === "function") {
43
+ pluginEdgeTokens =
44
+ resolvedPlugin.edge({
45
+ node,
46
+ style: styleTokens,
47
+ }) || {};
48
+ }
49
+
41
50
  const rawNodeStyle = {
42
51
  ...baseStyle,
43
52
  ...variantTokens,
@@ -47,9 +56,14 @@ export const useNodeStyle = ({ node, type, variant, style, plugin }) => {
47
56
 
48
57
  const nodeStyle = applySemanticTokens(rawNodeStyle, baseStyle);
49
58
 
59
+ const edgeStyle = {
60
+ ...pluginEdgeTokens,
61
+ };
62
+
50
63
  return {
51
64
  baseStyle,
52
65
  nodeStyle,
66
+ edgeStyle,
53
67
  plugin: resolvedPlugin,
54
68
  };
55
69
  }, [node, type, variant, style, plugin]);
@@ -383,9 +383,10 @@ export function AvatarRoleCard({
383
383
  >
384
384
  <Stack
385
385
  direction="row"
386
- justifyContent="space-between"
387
- alignItems="flex-start"
388
- >
386
+ sx={{
387
+ justifyContent: "space-between",
388
+ alignItems: "flex-start"
389
+ }}>
389
390
  {leftContent}
390
391
  {topRightContent}
391
392
  </Stack>
@@ -70,13 +70,12 @@ const DefaultNodeCard = ({
70
70
  {subtitle && (
71
71
  <Typography
72
72
  variant="body2"
73
- color="text.secondary"
74
73
  sx={{
74
+ color: "text.secondary",
75
75
  textAlign: "center",
76
76
  fontSize: 11,
77
- mb: metaEntries.length ? 0.5 : 0,
78
- }}
79
- >
77
+ mb: metaEntries.length ? 0.5 : 0
78
+ }}>
80
79
  {subtitle}
81
80
  </Typography>
82
81
  )}
@@ -87,13 +86,12 @@ const DefaultNodeCard = ({
87
86
  <Typography
88
87
  key={key}
89
88
  variant="caption"
90
- color="text.secondary"
91
89
  sx={{
90
+ color: "text.secondary",
92
91
  textAlign: "center",
93
92
  display: "block",
94
- fontSize: 10,
95
- }}
96
- >
93
+ fontSize: 10
94
+ }}>
97
95
  {key}: {String(value)}
98
96
  </Typography>
99
97
  ))}
@@ -24,6 +24,7 @@ const FlowNodeView = ({
24
24
  const {
25
25
  baseStyle,
26
26
  nodeStyle,
27
+ edgeStyle,
27
28
  plugin: _plugin,
28
29
  } = useNodeStyle({
29
30
  node,
@@ -56,14 +57,33 @@ const FlowNodeView = ({
56
57
  animationSpeed = baseStyle.animationSpeed ?? 1,
57
58
  gradient = baseStyle.gradient ?? null,
58
59
  curvature = baseStyle.curvature ?? 0.5,
60
+ connectorType = baseStyle.connectorType ?? "curved",
59
61
  selectionColor = baseStyle.selectionColor ?? "#64748b",
60
62
  } = nodeStyle;
61
63
 
64
+ const edgeProps = {
65
+ lineColor: edgeStyle.lineColor ?? lineColor,
66
+ lineWidth: edgeStyle.lineWidth ?? lineWidth,
67
+ lineStyle: edgeStyle.lineStyle ?? lineStyle,
68
+ showDots: edgeStyle.showDots ?? showDots,
69
+ dotRadius: edgeStyle.dotRadius ?? dotRadius,
70
+ dotColor: edgeStyle.dotColor ?? dotColor,
71
+ showArrow: edgeStyle.showArrow ?? showArrow,
72
+ arrowSize: edgeStyle.arrowSize ?? arrowSize,
73
+ animated: edgeStyle.animated ?? animated,
74
+ animationSpeed: edgeStyle.animationSpeed ?? animationSpeed,
75
+ gradient: edgeStyle.gradient ?? gradient,
76
+ curvature: edgeStyle.curvature ?? curvature,
77
+ connectorType: edgeStyle.connectorType ?? connectorType,
78
+ };
79
+
62
80
  const isHorizontal = direction === "horizontal";
63
81
 
64
- const strokeWidth = toPxNumber(lineWidth, 1.5);
82
+ const strokeWidth = toPxNumber(edgeProps.lineWidth, 1.5);
65
83
  const dashStyle =
66
- lineStyle === "dashed" || lineStyle === "dotted" ? lineStyle : "solid";
84
+ edgeProps.lineStyle === "dashed" || edgeProps.lineStyle === "dotted"
85
+ ? edgeProps.lineStyle
86
+ : "solid";
67
87
 
68
88
  const containerRef = useRef(null);
69
89
  const parentRef = useRef(null);
@@ -152,25 +172,89 @@ const FlowNodeView = ({
152
172
 
153
173
  {hasChildren && (
154
174
  <>
155
- <DynamicConnector
156
- containerEl={containerRef.current}
157
- parentEl={parentRef.current}
158
- childEls={childElList}
159
- stroke={lineColor}
160
- strokeWidth={strokeWidth}
161
- lineStyle={dashStyle}
162
- tick={connectorTick}
163
- orientation={direction}
164
- showDots={showDots}
165
- dotRadius={dotRadius}
166
- dotColor={dotColor}
167
- showArrow={showArrow}
168
- arrowSize={arrowSize}
169
- animated={animated}
170
- animationSpeed={animationSpeed}
171
- gradient={gradient}
172
- curvature={curvature}
173
- />
175
+ {node.children.map((child, index) => {
176
+ let childEdgeProps = { ...edgeProps };
177
+ if (_plugin && typeof _plugin.edge === "function") {
178
+ const childSpecificStyle = _plugin.edge({
179
+ node,
180
+ child,
181
+ style: nodeStyle,
182
+ });
183
+ if (childSpecificStyle) {
184
+ childEdgeProps = {
185
+ lineColor:
186
+ childSpecificStyle.lineColor ?? childEdgeProps.lineColor,
187
+ lineWidth:
188
+ childSpecificStyle.lineWidth ?? childEdgeProps.lineWidth,
189
+ lineStyle:
190
+ childSpecificStyle.lineStyle ?? childEdgeProps.lineStyle,
191
+ showDots:
192
+ childSpecificStyle.showDots ?? childEdgeProps.showDots,
193
+ dotRadius:
194
+ childSpecificStyle.dotRadius ?? childEdgeProps.dotRadius,
195
+ dotColor:
196
+ childSpecificStyle.dotColor ?? childEdgeProps.dotColor,
197
+ showArrow:
198
+ childSpecificStyle.showArrow ?? childEdgeProps.showArrow,
199
+ arrowSize:
200
+ childSpecificStyle.arrowSize ?? childEdgeProps.arrowSize,
201
+ animated:
202
+ childSpecificStyle.animated ?? childEdgeProps.animated,
203
+ animationSpeed:
204
+ childSpecificStyle.animationSpeed ??
205
+ childEdgeProps.animationSpeed,
206
+ gradient:
207
+ childSpecificStyle.gradient ?? childEdgeProps.gradient,
208
+ curvature:
209
+ childSpecificStyle.curvature ?? childEdgeProps.curvature,
210
+ connectorType:
211
+ childSpecificStyle.connectorType ??
212
+ childEdgeProps.connectorType,
213
+ label: childSpecificStyle.label,
214
+ labelStyle: childSpecificStyle.labelStyle,
215
+ labelPosition: childSpecificStyle.labelPosition,
216
+ labelOffsetX: childSpecificStyle.labelOffsetX,
217
+ labelOffsetY: childSpecificStyle.labelOffsetY,
218
+ };
219
+ }
220
+ }
221
+
222
+ const childStrokeWidth = toPxNumber(childEdgeProps.lineWidth, 1.5);
223
+ const childDashStyle =
224
+ childEdgeProps.lineStyle === "dashed" ||
225
+ childEdgeProps.lineStyle === "dotted"
226
+ ? childEdgeProps.lineStyle
227
+ : "solid";
228
+
229
+ return (
230
+ <DynamicConnector
231
+ key={child.id}
232
+ containerEl={containerRef.current}
233
+ parentEl={parentRef.current}
234
+ childEls={[childElList[index]]}
235
+ stroke={childEdgeProps.lineColor}
236
+ strokeWidth={childStrokeWidth}
237
+ lineStyle={childDashStyle}
238
+ tick={connectorTick}
239
+ orientation={direction}
240
+ showDots={childEdgeProps.showDots}
241
+ dotRadius={childEdgeProps.dotRadius}
242
+ dotColor={childEdgeProps.dotColor}
243
+ showArrow={childEdgeProps.showArrow}
244
+ arrowSize={childEdgeProps.arrowSize}
245
+ animated={childEdgeProps.animated}
246
+ animationSpeed={childEdgeProps.animationSpeed}
247
+ gradient={childEdgeProps.gradient}
248
+ curvature={childEdgeProps.curvature}
249
+ connectorType={childEdgeProps.connectorType}
250
+ label={childEdgeProps.label}
251
+ labelStyle={childEdgeProps.labelStyle}
252
+ labelPosition={childEdgeProps.labelPosition}
253
+ labelOffsetX={childEdgeProps.labelOffsetX}
254
+ labelOffsetY={childEdgeProps.labelOffsetY}
255
+ />
256
+ );
257
+ })}
174
258
 
175
259
  <Box
176
260
  sx={{