@canmingir/link 1.2.8 → 1.2.10
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/.github/workflows/publish.yml +64 -7
- package/package.json +1 -1
- package/src/lib/Flow/DraggableNode.jsx +68 -2
- package/src/lib/Flow/DynamicConnector.jsx +192 -121
- package/src/lib/Flow/FlowNode.jsx +167 -19
- package/src/lib/Flow/SelectionContext.jsx +123 -0
- package/src/lib/Flow/layouts/InfoNode.jsx +115 -56
- package/src/lib/Flow/styles.js +59 -19
- package/.idea/codeStyles/Project.xml +0 -84
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/copilot.data.migration.agent.xml +0 -6
- package/.idea/copilot.data.migration.ask.xml +0 -6
- package/.idea/copilot.data.migration.ask2agent.xml +0 -6
- package/.idea/copilot.data.migration.edit.xml +0 -6
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/misc.xml +0 -5
- package/.idea/modules.xml +0 -8
- package/.idea/platform.iml +0 -9
- package/.idea/vcs.xml +0 -6
package/src/lib/Flow/styles.js
CHANGED
|
@@ -9,37 +9,80 @@ export const getBaseStyleForVariant = (v) => {
|
|
|
9
9
|
switch (v) {
|
|
10
10
|
case "card":
|
|
11
11
|
return {
|
|
12
|
-
lineColor: "#
|
|
12
|
+
lineColor: "#b1b1b7",
|
|
13
13
|
lineWidth: "2px",
|
|
14
14
|
lineStyle: "solid",
|
|
15
15
|
gap: 56,
|
|
16
|
-
shape:
|
|
16
|
+
shape: 10,
|
|
17
17
|
bg: "background.paper",
|
|
18
|
-
hoverBg: "grey.
|
|
19
|
-
borderColor: "#
|
|
18
|
+
hoverBg: "grey.50",
|
|
19
|
+
borderColor: "#e2e8f0",
|
|
20
|
+
selectionColor: "#64748b",
|
|
21
|
+
showDots: false,
|
|
22
|
+
showArrow: true,
|
|
23
|
+
arrowSize: 6,
|
|
24
|
+
animated: false,
|
|
25
|
+
animationSpeed: 1,
|
|
26
|
+
gradient: null,
|
|
27
|
+
curvature: 0.5,
|
|
20
28
|
};
|
|
21
29
|
case "pill":
|
|
22
30
|
return {
|
|
23
|
-
lineColor: "#
|
|
31
|
+
lineColor: "#8b5cf6",
|
|
24
32
|
lineWidth: "2px",
|
|
25
|
-
lineStyle: "
|
|
33
|
+
lineStyle: "solid",
|
|
26
34
|
gap: 48,
|
|
27
35
|
shape: 9999,
|
|
28
|
-
bg: "rgba(
|
|
29
|
-
hoverBg: "rgba(
|
|
30
|
-
borderColor: "#
|
|
36
|
+
bg: "rgba(139, 92, 246, 0.08)",
|
|
37
|
+
hoverBg: "rgba(139, 92, 246, 0.16)",
|
|
38
|
+
borderColor: "#8b5cf6",
|
|
39
|
+
selectionColor: "#8b5cf6",
|
|
40
|
+
showDots: false,
|
|
41
|
+
showArrow: true,
|
|
42
|
+
arrowSize: 6,
|
|
43
|
+
animated: false,
|
|
44
|
+
animationSpeed: 1,
|
|
45
|
+
gradient: null,
|
|
46
|
+
curvature: 0.4,
|
|
47
|
+
};
|
|
48
|
+
case "n8n":
|
|
49
|
+
return {
|
|
50
|
+
lineColor: "#b1b1b7",
|
|
51
|
+
lineWidth: "2px",
|
|
52
|
+
lineStyle: "solid",
|
|
53
|
+
gap: 60,
|
|
54
|
+
shape: 8,
|
|
55
|
+
bg: "#ffffff",
|
|
56
|
+
hoverBg: "#f8fafc",
|
|
57
|
+
borderColor: "#e2e8f0",
|
|
58
|
+
selectionColor: "#ff6d5a",
|
|
59
|
+
showDots: false,
|
|
60
|
+
showArrow: true,
|
|
61
|
+
arrowSize: 6,
|
|
62
|
+
animated: false,
|
|
63
|
+
animationSpeed: 1,
|
|
64
|
+
gradient: null,
|
|
65
|
+
curvature: 0.5,
|
|
31
66
|
};
|
|
32
67
|
case "simple":
|
|
33
68
|
default:
|
|
34
69
|
return {
|
|
35
|
-
lineColor: "#
|
|
36
|
-
lineWidth: "
|
|
70
|
+
lineColor: "#b1b1b7",
|
|
71
|
+
lineWidth: "2px",
|
|
37
72
|
lineStyle: "solid",
|
|
38
|
-
gap:
|
|
39
|
-
shape:
|
|
40
|
-
bg: "background.
|
|
41
|
-
hoverBg: "grey.
|
|
42
|
-
borderColor: "#
|
|
73
|
+
gap: 50,
|
|
74
|
+
shape: 8,
|
|
75
|
+
bg: "background.paper",
|
|
76
|
+
hoverBg: "grey.50",
|
|
77
|
+
borderColor: "#e2e8f0",
|
|
78
|
+
selectionColor: "#64748b",
|
|
79
|
+
showDots: false,
|
|
80
|
+
showArrow: true,
|
|
81
|
+
arrowSize: 6,
|
|
82
|
+
animated: false,
|
|
83
|
+
animationSpeed: 1,
|
|
84
|
+
gradient: null,
|
|
85
|
+
curvature: 0.5,
|
|
43
86
|
};
|
|
44
87
|
}
|
|
45
88
|
};
|
|
@@ -74,7 +117,6 @@ export const applySemanticTokens = (styleObj, base) => {
|
|
|
74
117
|
s.borderColor = s.border;
|
|
75
118
|
}
|
|
76
119
|
|
|
77
|
-
// size: small | medium | large
|
|
78
120
|
const sizeMap = {
|
|
79
121
|
small: { cardWidth: 140, gap: 20 },
|
|
80
122
|
medium: { cardWidth: 180, gap: 30 },
|
|
@@ -86,7 +128,6 @@ export const applySemanticTokens = (styleObj, base) => {
|
|
|
86
128
|
if (s.gap == null) s.gap = gap;
|
|
87
129
|
}
|
|
88
130
|
|
|
89
|
-
// shape: "square" | "vertical" (affects dimensions)
|
|
90
131
|
if (s.shape === "square") {
|
|
91
132
|
const defaultSize = 140;
|
|
92
133
|
if (s.cardWidth != null && s.minHeight == null) s.minHeight = s.cardWidth;
|
|
@@ -104,7 +145,6 @@ export const applySemanticTokens = (styleObj, base) => {
|
|
|
104
145
|
if (s.minHeight == null) s.minHeight = Math.max(s.cardWidth * 1.3, 110);
|
|
105
146
|
}
|
|
106
147
|
|
|
107
|
-
// shadow: "none" | "soft" | "heavy"
|
|
108
148
|
const shadowVariantMap = { none: 0, soft: 2, heavy: 6 };
|
|
109
149
|
if (s.shadow && shadowVariantMap[s.shadow] != null && s.shadowLevel == null) {
|
|
110
150
|
s.shadowLevel = shadowVariantMap[s.shadow];
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
<component name="ProjectCodeStyleConfiguration">
|
|
2
|
-
<code_scheme name="Project" version="173">
|
|
3
|
-
<HTMLCodeStyleSettings>
|
|
4
|
-
<option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
|
|
5
|
-
</HTMLCodeStyleSettings>
|
|
6
|
-
<JSCodeStyleSettings version="0">
|
|
7
|
-
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
8
|
-
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
|
9
|
-
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
10
|
-
<option name="ENFORCE_TRAILING_COMMA" value="Remove" />
|
|
11
|
-
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
12
|
-
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
13
|
-
<option name="CHAINED_CALL_DOT_ON_NEW_LINE" value="false" />
|
|
14
|
-
</JSCodeStyleSettings>
|
|
15
|
-
<JetCodeStyleSettings>
|
|
16
|
-
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
|
|
17
|
-
</JetCodeStyleSettings>
|
|
18
|
-
<TypeScriptCodeStyleSettings version="0">
|
|
19
|
-
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
20
|
-
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
|
21
|
-
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
22
|
-
<option name="ENFORCE_TRAILING_COMMA" value="Remove" />
|
|
23
|
-
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
24
|
-
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
25
|
-
</TypeScriptCodeStyleSettings>
|
|
26
|
-
<VueCodeStyleSettings>
|
|
27
|
-
<option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
|
|
28
|
-
<option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
|
|
29
|
-
</VueCodeStyleSettings>
|
|
30
|
-
<codeStyleSettings language="HTML">
|
|
31
|
-
<option name="SOFT_MARGINS" value="80" />
|
|
32
|
-
<indentOptions>
|
|
33
|
-
<option name="INDENT_SIZE" value="2" />
|
|
34
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
35
|
-
<option name="TAB_SIZE" value="2" />
|
|
36
|
-
</indentOptions>
|
|
37
|
-
</codeStyleSettings>
|
|
38
|
-
<codeStyleSettings language="JSON">
|
|
39
|
-
<indentOptions>
|
|
40
|
-
<option name="TAB_SIZE" value="2" />
|
|
41
|
-
</indentOptions>
|
|
42
|
-
</codeStyleSettings>
|
|
43
|
-
<codeStyleSettings language="JavaScript">
|
|
44
|
-
<option name="RIGHT_MARGIN" value="80" />
|
|
45
|
-
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
|
|
46
|
-
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
|
|
47
|
-
<option name="ALIGN_MULTILINE_FOR" value="false" />
|
|
48
|
-
<option name="CALL_PARAMETERS_WRAP" value="1" />
|
|
49
|
-
<option name="METHOD_PARAMETERS_WRAP" value="1" />
|
|
50
|
-
<option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
|
|
51
|
-
<option name="METHOD_CALL_CHAIN_WRAP" value="5" />
|
|
52
|
-
<option name="BINARY_OPERATION_WRAP" value="1" />
|
|
53
|
-
<option name="TERNARY_OPERATION_WRAP" value="5" />
|
|
54
|
-
<option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
|
|
55
|
-
<option name="KEEP_SIMPLE_BLOCKS_IN_ONE_LINE" value="true" />
|
|
56
|
-
<option name="KEEP_SIMPLE_METHODS_IN_ONE_LINE" value="true" />
|
|
57
|
-
<option name="ARRAY_INITIALIZER_WRAP" value="5" />
|
|
58
|
-
<option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" />
|
|
59
|
-
<option name="SOFT_MARGINS" value="80" />
|
|
60
|
-
<indentOptions>
|
|
61
|
-
<option name="INDENT_SIZE" value="2" />
|
|
62
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
63
|
-
<option name="TAB_SIZE" value="2" />
|
|
64
|
-
</indentOptions>
|
|
65
|
-
</codeStyleSettings>
|
|
66
|
-
<codeStyleSettings language="TypeScript">
|
|
67
|
-
<option name="SOFT_MARGINS" value="80" />
|
|
68
|
-
<indentOptions>
|
|
69
|
-
<option name="INDENT_SIZE" value="2" />
|
|
70
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
71
|
-
<option name="TAB_SIZE" value="2" />
|
|
72
|
-
</indentOptions>
|
|
73
|
-
</codeStyleSettings>
|
|
74
|
-
<codeStyleSettings language="Vue">
|
|
75
|
-
<option name="SOFT_MARGINS" value="80" />
|
|
76
|
-
<indentOptions>
|
|
77
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
78
|
-
</indentOptions>
|
|
79
|
-
</codeStyleSettings>
|
|
80
|
-
<codeStyleSettings language="kotlin">
|
|
81
|
-
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
|
|
82
|
-
</codeStyleSettings>
|
|
83
|
-
</code_scheme>
|
|
84
|
-
</component>
|
package/.idea/misc.xml
DELETED
package/.idea/modules.xml
DELETED
package/.idea/platform.iml
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module type="JAVA_MODULE" version="4">
|
|
3
|
-
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
4
|
-
<exclude-output />
|
|
5
|
-
<content url="file://$MODULE_DIR$" />
|
|
6
|
-
<orderEntry type="inheritedJdk" />
|
|
7
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
|
8
|
-
</component>
|
|
9
|
-
</module>
|