@flowuent-org/diagramming-core 1.2.1 → 1.2.2
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/apps/diagramming/src/AutomationDiagramData.ts +65 -1
- package/package.json +1 -1
- package/packages/diagrams/src/lib/components/CanvasSearchBar.tsx +281 -0
- package/packages/diagrams/src/lib/components/automation/AutomationApiNode.tsx +796 -788
- package/packages/diagrams/src/lib/components/automation/AutomationEndNode.tsx +608 -600
- package/packages/diagrams/src/lib/components/automation/AutomationFormattingNode.tsx +833 -825
- package/packages/diagrams/src/lib/components/automation/AutomationNavigationNode.tsx +584 -0
- package/packages/diagrams/src/lib/components/automation/AutomationNoteNode.tsx +422 -414
- package/packages/diagrams/src/lib/components/automation/AutomationSheetsNode.tsx +1120 -1112
- package/packages/diagrams/src/lib/components/automation/AutomationStartNode.tsx +511 -503
- package/packages/diagrams/src/lib/components/automation/NodeAIAssistantPopup.tsx +504 -0
- package/packages/diagrams/src/lib/components/automation/NodeActionButtons.tsx +146 -145
- package/packages/diagrams/src/lib/components/automation/index.ts +21 -12
- package/packages/diagrams/src/lib/contexts/SearchContext.tsx +78 -0
- package/packages/diagrams/src/lib/templates/DiagramContainer.tsx +79 -76
- package/packages/diagrams/src/lib/templates/DiagramContent.tsx +276 -61
- package/packages/diagrams/src/lib/types/automation-node-data-types.ts +22 -2
- package/packages/diagrams/src/lib/types/node-types.ts +2 -0
- package/packages/diagrams/src/lib/utils/highlightText.tsx +93 -0
- package/packages/diagrams/src/lib/utils/nodeAIAssistantConfig.ts +54 -0
|
@@ -1,145 +1,146 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Box, IconButton, Tooltip } from '@mui/material';
|
|
3
|
-
import {
|
|
4
|
-
IconLayoutGrid,
|
|
5
|
-
IconMessage,
|
|
6
|
-
IconPlus,
|
|
7
|
-
IconCopy,
|
|
8
|
-
IconTrash,
|
|
9
|
-
} from '@tabler/icons-react';
|
|
10
|
-
|
|
11
|
-
interface NodeActionButtonsProps {
|
|
12
|
-
selected?: boolean;
|
|
13
|
-
onLayout?: () => void;
|
|
14
|
-
|
|
15
|
-
onAddToGroup?: () => void;
|
|
16
|
-
onDuplicate?: () => void;
|
|
17
|
-
onDelete?: () => void;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export const NodeActionButtons: React.FC<NodeActionButtonsProps> = ({
|
|
21
|
-
selected,
|
|
22
|
-
onLayout,
|
|
23
|
-
|
|
24
|
-
onAddToGroup,
|
|
25
|
-
onDuplicate,
|
|
26
|
-
onDelete,
|
|
27
|
-
}) => {
|
|
28
|
-
if (!selected) return null;
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
<Box
|
|
32
|
-
sx={{
|
|
33
|
-
position: 'absolute',
|
|
34
|
-
left: '100%',
|
|
35
|
-
top: '50%',
|
|
36
|
-
transform: 'translateY(-50%)',
|
|
37
|
-
marginLeft: '12px',
|
|
38
|
-
display: 'flex',
|
|
39
|
-
flexDirection: 'column',
|
|
40
|
-
gap: 0.5,
|
|
41
|
-
backgroundColor: 'rgba(15, 15, 35, 0.95)',
|
|
42
|
-
borderRadius: '12px',
|
|
43
|
-
border: '1px solid rgba(255, 255, 255, 0.1)',
|
|
44
|
-
p: 0.5,
|
|
45
|
-
zIndex: 1000,
|
|
46
|
-
boxShadow: '0 4px 20px rgba(0, 0, 0, 0.3)',
|
|
47
|
-
}}
|
|
48
|
-
onClick={(e) => e.stopPropagation()}
|
|
49
|
-
>
|
|
50
|
-
<Tooltip title="Layout" placement="right">
|
|
51
|
-
<IconButton
|
|
52
|
-
size="small"
|
|
53
|
-
onClick={(e) => {
|
|
54
|
-
e.stopPropagation();
|
|
55
|
-
onLayout?.();
|
|
56
|
-
}}
|
|
57
|
-
sx={{
|
|
58
|
-
color: 'rgba(255, 255, 255, 0.6)',
|
|
59
|
-
'&:hover': {
|
|
60
|
-
backgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
61
|
-
color: '#fff',
|
|
62
|
-
},
|
|
63
|
-
}}
|
|
64
|
-
>
|
|
65
|
-
<IconLayoutGrid size={18} />
|
|
66
|
-
</IconButton>
|
|
67
|
-
</Tooltip>
|
|
68
|
-
<Tooltip title="
|
|
69
|
-
<IconButton
|
|
70
|
-
size="small"
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
'
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
'
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
'
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
'
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Box, IconButton, Tooltip } from '@mui/material';
|
|
3
|
+
import {
|
|
4
|
+
IconLayoutGrid,
|
|
5
|
+
IconMessage,
|
|
6
|
+
IconPlus,
|
|
7
|
+
IconCopy,
|
|
8
|
+
IconTrash,
|
|
9
|
+
} from '@tabler/icons-react';
|
|
10
|
+
|
|
11
|
+
interface NodeActionButtonsProps {
|
|
12
|
+
selected?: boolean;
|
|
13
|
+
onLayout?: () => void;
|
|
14
|
+
onOpenAIAssistant?: (buttonElement: HTMLElement) => void;
|
|
15
|
+
onAddToGroup?: () => void;
|
|
16
|
+
onDuplicate?: () => void;
|
|
17
|
+
onDelete?: () => void;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const NodeActionButtons: React.FC<NodeActionButtonsProps> = ({
|
|
21
|
+
selected,
|
|
22
|
+
onLayout,
|
|
23
|
+
onOpenAIAssistant,
|
|
24
|
+
onAddToGroup,
|
|
25
|
+
onDuplicate,
|
|
26
|
+
onDelete,
|
|
27
|
+
}) => {
|
|
28
|
+
if (!selected) return null;
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<Box
|
|
32
|
+
sx={{
|
|
33
|
+
position: 'absolute',
|
|
34
|
+
left: '100%',
|
|
35
|
+
top: '50%',
|
|
36
|
+
transform: 'translateY(-50%)',
|
|
37
|
+
marginLeft: '12px',
|
|
38
|
+
display: 'flex',
|
|
39
|
+
flexDirection: 'column',
|
|
40
|
+
gap: 0.5,
|
|
41
|
+
backgroundColor: 'rgba(15, 15, 35, 0.95)',
|
|
42
|
+
borderRadius: '12px',
|
|
43
|
+
border: '1px solid rgba(255, 255, 255, 0.1)',
|
|
44
|
+
p: 0.5,
|
|
45
|
+
zIndex: 1000,
|
|
46
|
+
boxShadow: '0 4px 20px rgba(0, 0, 0, 0.3)',
|
|
47
|
+
}}
|
|
48
|
+
onClick={(e) => e.stopPropagation()}
|
|
49
|
+
>
|
|
50
|
+
<Tooltip title="Layout" placement="right">
|
|
51
|
+
<IconButton
|
|
52
|
+
size="small"
|
|
53
|
+
onClick={(e) => {
|
|
54
|
+
e.stopPropagation();
|
|
55
|
+
onLayout?.();
|
|
56
|
+
}}
|
|
57
|
+
sx={{
|
|
58
|
+
color: 'rgba(255, 255, 255, 0.6)',
|
|
59
|
+
'&:hover': {
|
|
60
|
+
backgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
61
|
+
color: '#fff',
|
|
62
|
+
},
|
|
63
|
+
}}
|
|
64
|
+
>
|
|
65
|
+
<IconLayoutGrid size={18} />
|
|
66
|
+
</IconButton>
|
|
67
|
+
</Tooltip>
|
|
68
|
+
<Tooltip title="Node AI Assistant" placement="right">
|
|
69
|
+
<IconButton
|
|
70
|
+
size="small"
|
|
71
|
+
data-node-ai-assistant-button
|
|
72
|
+
onClick={(e) => {
|
|
73
|
+
e.stopPropagation();
|
|
74
|
+
onOpenAIAssistant?.(e.currentTarget);
|
|
75
|
+
}}
|
|
76
|
+
sx={{
|
|
77
|
+
color: 'rgba(255, 255, 255, 0.6)',
|
|
78
|
+
'&:hover': {
|
|
79
|
+
backgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
80
|
+
color: '#fff',
|
|
81
|
+
},
|
|
82
|
+
}}
|
|
83
|
+
>
|
|
84
|
+
<IconMessage size={18} />
|
|
85
|
+
</IconButton>
|
|
86
|
+
</Tooltip>
|
|
87
|
+
<Tooltip title="Add to Group" placement="right">
|
|
88
|
+
<IconButton
|
|
89
|
+
size="small"
|
|
90
|
+
onClick={(e) => {
|
|
91
|
+
e.stopPropagation();
|
|
92
|
+
onAddToGroup?.();
|
|
93
|
+
}}
|
|
94
|
+
sx={{
|
|
95
|
+
color: 'rgba(255, 255, 255, 0.6)',
|
|
96
|
+
'&:hover': {
|
|
97
|
+
backgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
98
|
+
color: '#fff',
|
|
99
|
+
},
|
|
100
|
+
}}
|
|
101
|
+
>
|
|
102
|
+
<IconPlus size={18} />
|
|
103
|
+
</IconButton>
|
|
104
|
+
</Tooltip>
|
|
105
|
+
<Tooltip title="Duplicate" placement="right">
|
|
106
|
+
<IconButton
|
|
107
|
+
size="small"
|
|
108
|
+
onClick={(e) => {
|
|
109
|
+
e.stopPropagation();
|
|
110
|
+
onDuplicate?.();
|
|
111
|
+
}}
|
|
112
|
+
sx={{
|
|
113
|
+
color: 'rgba(255, 255, 255, 0.6)',
|
|
114
|
+
'&:hover': {
|
|
115
|
+
backgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
116
|
+
color: '#fff',
|
|
117
|
+
},
|
|
118
|
+
}}
|
|
119
|
+
>
|
|
120
|
+
<IconCopy size={18} />
|
|
121
|
+
</IconButton>
|
|
122
|
+
</Tooltip>
|
|
123
|
+
<Tooltip title="Delete" placement="right">
|
|
124
|
+
<IconButton
|
|
125
|
+
size="small"
|
|
126
|
+
onClick={(e) => {
|
|
127
|
+
e.stopPropagation();
|
|
128
|
+
onDelete?.();
|
|
129
|
+
}}
|
|
130
|
+
sx={{
|
|
131
|
+
color: 'rgba(255, 255, 255, 0.6)',
|
|
132
|
+
'&:hover': {
|
|
133
|
+
backgroundColor: 'rgba(239, 68, 68, 0.2)',
|
|
134
|
+
color: '#EF4444',
|
|
135
|
+
},
|
|
136
|
+
}}
|
|
137
|
+
>
|
|
138
|
+
<IconTrash size={18} />
|
|
139
|
+
</IconButton>
|
|
140
|
+
</Tooltip>
|
|
141
|
+
</Box>
|
|
142
|
+
);
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export default NodeActionButtons;
|
|
146
|
+
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
export { AutomationStartNode } from './AutomationStartNode';
|
|
2
|
-
export { AutomationApiNode } from './AutomationApiNode';
|
|
3
|
-
export { AutomationFormattingNode } from './AutomationFormattingNode';
|
|
4
|
-
export { AutomationSheetsNode } from './AutomationSheetsNode';
|
|
5
|
-
export { AutomationEndNode } from './AutomationEndNode';
|
|
6
|
-
export { AutomationNoteNode } from './AutomationNoteNode';
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export
|
|
1
|
+
export { AutomationStartNode } from './AutomationStartNode';
|
|
2
|
+
export { AutomationApiNode } from './AutomationApiNode';
|
|
3
|
+
export { AutomationFormattingNode } from './AutomationFormattingNode';
|
|
4
|
+
export { AutomationSheetsNode } from './AutomationSheetsNode';
|
|
5
|
+
export { AutomationEndNode } from './AutomationEndNode';
|
|
6
|
+
export { AutomationNoteNode } from './AutomationNoteNode';
|
|
7
|
+
export { AutomationNavigationNode } from './AutomationNavigationNode';
|
|
8
|
+
export { AutomationExecutionPanel } from './AutomationExecutionPanel';
|
|
9
|
+
export { AutomationAISuggestionNode } from './AutomationAISuggestionNode';
|
|
10
|
+
export { AISuggestionsModal, showAISuggestionsModal } from './AISuggestionsModal';
|
|
11
|
+
export { AISuggestionsPanel } from './AISuggestionsPanel';
|
|
12
|
+
export { NodeActionButtons } from './NodeActionButtons';
|
|
13
|
+
export { NodeAIAssistantPopup, showNodeAIAssistantPopup } from './NodeAIAssistantPopup';
|
|
14
|
+
export type { AISuggestion } from './AISuggestionsModal';
|
|
15
|
+
export {
|
|
16
|
+
setNodeAIAssistantEndpoint,
|
|
17
|
+
setNodeAIAssistantHeaders,
|
|
18
|
+
getNodeAIAssistantEndpoint,
|
|
19
|
+
getNodeAIAssistantHeaders,
|
|
20
|
+
configureNodeAIAssistant,
|
|
21
|
+
} from '../../utils/nodeAIAssistantConfig';
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import React, { createContext, useContext, useState, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
interface SearchContextType {
|
|
4
|
+
searchQuery: string;
|
|
5
|
+
setSearchQuery: (query: string) => void;
|
|
6
|
+
highlightText: (text: string) => React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const SearchContext = createContext<SearchContextType | undefined>(undefined);
|
|
10
|
+
|
|
11
|
+
export const SearchProvider: React.FC<{ children: ReactNode }> = ({ children }) => {
|
|
12
|
+
const [searchQuery, setSearchQuery] = useState('');
|
|
13
|
+
|
|
14
|
+
const highlightText = (text: string): React.ReactNode => {
|
|
15
|
+
if (!searchQuery.trim() || !text) {
|
|
16
|
+
return text;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const searchLower = searchQuery.toLowerCase();
|
|
20
|
+
const textLower = String(text).toLowerCase();
|
|
21
|
+
const parts: React.ReactNode[] = [];
|
|
22
|
+
let lastIndex = 0;
|
|
23
|
+
let index = textLower.indexOf(searchLower, lastIndex);
|
|
24
|
+
|
|
25
|
+
// Highlight all occurrences
|
|
26
|
+
while (index !== -1) {
|
|
27
|
+
// Add text before match
|
|
28
|
+
if (index > lastIndex) {
|
|
29
|
+
parts.push(String(text).substring(lastIndex, index));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Add highlighted match
|
|
33
|
+
parts.push(
|
|
34
|
+
<mark
|
|
35
|
+
key={index}
|
|
36
|
+
style={{
|
|
37
|
+
backgroundColor: '#FFD700',
|
|
38
|
+
color: '#000',
|
|
39
|
+
padding: '2px 4px',
|
|
40
|
+
borderRadius: '3px',
|
|
41
|
+
fontWeight: 'bold',
|
|
42
|
+
}}
|
|
43
|
+
>
|
|
44
|
+
{String(text).substring(index, index + searchQuery.length)}
|
|
45
|
+
</mark>
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
lastIndex = index + searchQuery.length;
|
|
49
|
+
index = textLower.indexOf(searchLower, lastIndex);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Add remaining text
|
|
53
|
+
if (lastIndex < String(text).length) {
|
|
54
|
+
parts.push(String(text).substring(lastIndex));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return parts.length > 0 ? <>{parts}</> : text;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<SearchContext.Provider value={{ searchQuery, setSearchQuery, highlightText }}>
|
|
62
|
+
{children}
|
|
63
|
+
</SearchContext.Provider>
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export const useSearch = () => {
|
|
68
|
+
const context = useContext(SearchContext);
|
|
69
|
+
if (!context) {
|
|
70
|
+
return {
|
|
71
|
+
searchQuery: '',
|
|
72
|
+
setSearchQuery: () => {},
|
|
73
|
+
highlightText: (text: string) => text,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
return context;
|
|
77
|
+
};
|
|
78
|
+
|
|
@@ -1,76 +1,79 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ReactFlowProps, ReactFlowProvider } from '@xyflow/react';
|
|
3
|
-
import '@xyflow/react/dist/style.css';
|
|
4
|
-
import { DiagramContent } from './DiagramContent';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
<
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ReactFlowProps, ReactFlowProvider } from '@xyflow/react';
|
|
3
|
+
import '@xyflow/react/dist/style.css';
|
|
4
|
+
import { DiagramContent } from './DiagramContent';
|
|
5
|
+
import { SearchProvider } from '../contexts/SearchContext';
|
|
6
|
+
|
|
7
|
+
interface DiagramContainerProps
|
|
8
|
+
extends Omit<ReactFlowProps, 'nodes' | 'edges' | 'onChange'> {
|
|
9
|
+
showAutomationExecutionPanel?: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// Default arrow marker definitions for edges
|
|
13
|
+
const EdgeMarkerDefinitions = () => (
|
|
14
|
+
<svg style={{ position: 'absolute', width: 0, height: 0 }}>
|
|
15
|
+
<defs>
|
|
16
|
+
{/* Arrow marker - Green */}
|
|
17
|
+
<marker
|
|
18
|
+
id="arrow"
|
|
19
|
+
viewBox="0 0 10 10"
|
|
20
|
+
refX="8"
|
|
21
|
+
refY="5"
|
|
22
|
+
markerWidth="6"
|
|
23
|
+
markerHeight="6"
|
|
24
|
+
orient="auto-start-reverse"
|
|
25
|
+
>
|
|
26
|
+
<path d="M 0 0 L 10 5 L 0 10 z" fill="#10B981" />
|
|
27
|
+
</marker>
|
|
28
|
+
|
|
29
|
+
{/* Arrow marker - Blue */}
|
|
30
|
+
<marker
|
|
31
|
+
id="arrow-blue"
|
|
32
|
+
viewBox="0 0 10 10"
|
|
33
|
+
refX="8"
|
|
34
|
+
refY="5"
|
|
35
|
+
markerWidth="6"
|
|
36
|
+
markerHeight="6"
|
|
37
|
+
orient="auto-start-reverse"
|
|
38
|
+
>
|
|
39
|
+
<path d="M 0 0 L 10 5 L 0 10 z" fill="#4858E9" />
|
|
40
|
+
</marker>
|
|
41
|
+
|
|
42
|
+
{/* Arrow marker - White */}
|
|
43
|
+
<marker
|
|
44
|
+
id="arrow-white"
|
|
45
|
+
viewBox="0 0 10 10"
|
|
46
|
+
refX="8"
|
|
47
|
+
refY="5"
|
|
48
|
+
markerWidth="6"
|
|
49
|
+
markerHeight="6"
|
|
50
|
+
orient="auto-start-reverse"
|
|
51
|
+
>
|
|
52
|
+
<path d="M 0 0 L 10 5 L 0 10 z" fill="#ffffff" />
|
|
53
|
+
</marker>
|
|
54
|
+
|
|
55
|
+
{/* Circle marker */}
|
|
56
|
+
<marker
|
|
57
|
+
id="circle"
|
|
58
|
+
viewBox="0 0 10 10"
|
|
59
|
+
refX="5"
|
|
60
|
+
refY="5"
|
|
61
|
+
markerWidth="5"
|
|
62
|
+
markerHeight="5"
|
|
63
|
+
>
|
|
64
|
+
<circle cx="5" cy="5" r="4" fill="#10B981" />
|
|
65
|
+
</marker>
|
|
66
|
+
</defs>
|
|
67
|
+
</svg>
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
export const DiagramContainer: React.FC<DiagramContainerProps> = (props) => {
|
|
71
|
+
return (
|
|
72
|
+
<ReactFlowProvider>
|
|
73
|
+
<SearchProvider>
|
|
74
|
+
<EdgeMarkerDefinitions />
|
|
75
|
+
<DiagramContent {...props} />
|
|
76
|
+
</SearchProvider>
|
|
77
|
+
</ReactFlowProvider>
|
|
78
|
+
);
|
|
79
|
+
};
|