@vanduo-oss/vd3-flowchart 1.5.0 → 1.6.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/CHANGELOG.md +71 -0
- package/README.md +18 -167
- package/SKILL.md +57 -15
- package/dist/core.d.ts +89 -2
- package/dist/index.cjs +1449 -86
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +10 -0
- package/dist/index.js +1449 -86
- package/dist/index.js.map +3 -3
- package/dist/meta.json +19 -15
- package/dist/vd3-flowchart.css +546 -4
- package/dist/vue.d.ts +33 -0
- package/package.json +1 -1
package/dist/vd3-flowchart.css
CHANGED
|
@@ -26,6 +26,160 @@
|
|
|
26
26
|
--vd-flowchart-panel-bg: color-mix(in srgb, var(--vd-flowchart-panel-alt) 88%, transparent);
|
|
27
27
|
/* Font for SVG text + UI chrome (SVG <text> does not inherit reliably). */
|
|
28
28
|
--vd-flowchart-font: inherit;
|
|
29
|
+
/* Theme-adaptive semantic & categorical color palettes (light mode). */
|
|
30
|
+
--vd-flowchart-palette-primary-fill: #dbeafe;
|
|
31
|
+
--vd-flowchart-palette-primary-stroke: #2563eb;
|
|
32
|
+
--vd-flowchart-palette-primary-text: #1e3a8a;
|
|
33
|
+
--vd-flowchart-palette-primary-edge: #2563eb;
|
|
34
|
+
--vd-flowchart-palette-secondary-fill: #e0e7ff;
|
|
35
|
+
--vd-flowchart-palette-secondary-stroke: #4f46e5;
|
|
36
|
+
--vd-flowchart-palette-secondary-text: #312e81;
|
|
37
|
+
--vd-flowchart-palette-secondary-edge: #4f46e5;
|
|
38
|
+
--vd-flowchart-palette-success-fill: #dcfce7;
|
|
39
|
+
--vd-flowchart-palette-success-stroke: #16a34a;
|
|
40
|
+
--vd-flowchart-palette-success-text: #14532d;
|
|
41
|
+
--vd-flowchart-palette-success-edge: #16a34a;
|
|
42
|
+
--vd-flowchart-palette-warning-fill: #fef3c7;
|
|
43
|
+
--vd-flowchart-palette-warning-stroke: #d97706;
|
|
44
|
+
--vd-flowchart-palette-warning-text: #78350f;
|
|
45
|
+
--vd-flowchart-palette-warning-edge: #d97706;
|
|
46
|
+
--vd-flowchart-palette-danger-fill: #fee2e2;
|
|
47
|
+
--vd-flowchart-palette-danger-stroke: #dc2626;
|
|
48
|
+
--vd-flowchart-palette-danger-text: #7f1d1d;
|
|
49
|
+
--vd-flowchart-palette-danger-edge: #dc2626;
|
|
50
|
+
--vd-flowchart-palette-info-fill: #e0f2fe;
|
|
51
|
+
--vd-flowchart-palette-info-stroke: #0284c7;
|
|
52
|
+
--vd-flowchart-palette-info-text: #0c4a6e;
|
|
53
|
+
--vd-flowchart-palette-info-edge: #0284c7;
|
|
54
|
+
--vd-flowchart-palette-violet-fill: #f3e8ff;
|
|
55
|
+
--vd-flowchart-palette-violet-stroke: #9333ea;
|
|
56
|
+
--vd-flowchart-palette-violet-text: #581c87;
|
|
57
|
+
--vd-flowchart-palette-violet-edge: #9333ea;
|
|
58
|
+
--vd-flowchart-palette-teal-fill: #ccfbf1;
|
|
59
|
+
--vd-flowchart-palette-teal-stroke: #0d9488;
|
|
60
|
+
--vd-flowchart-palette-teal-text: #134e4a;
|
|
61
|
+
--vd-flowchart-palette-teal-edge: #0d9488;
|
|
62
|
+
--vd-flowchart-palette-orange-fill: #ffedd5;
|
|
63
|
+
--vd-flowchart-palette-orange-stroke: #ea580c;
|
|
64
|
+
--vd-flowchart-palette-orange-text: #7c2d12;
|
|
65
|
+
--vd-flowchart-palette-orange-edge: #ea580c;
|
|
66
|
+
--vd-flowchart-palette-pink-fill: #fce7f3;
|
|
67
|
+
--vd-flowchart-palette-pink-stroke: #db2777;
|
|
68
|
+
--vd-flowchart-palette-pink-text: #831843;
|
|
69
|
+
--vd-flowchart-palette-pink-edge: #db2777;
|
|
70
|
+
--vd-flowchart-palette-neutral-fill: #f1f5f9;
|
|
71
|
+
--vd-flowchart-palette-neutral-stroke: #64748b;
|
|
72
|
+
--vd-flowchart-palette-neutral-text: #1e293b;
|
|
73
|
+
--vd-flowchart-palette-neutral-edge: #64748b;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* Dark idle strokes lean on accent so nodes stay outlined without hover. Hosts
|
|
77
|
+
may still override --vd-flowchart-node-stroke for a stronger brand stroke. */
|
|
78
|
+
[data-theme='dark'],
|
|
79
|
+
:root:where([data-theme='dark']) {
|
|
80
|
+
--vd-flowchart-node-stroke: color-mix(
|
|
81
|
+
in srgb,
|
|
82
|
+
var(--vd-flowchart-accent) 48%,
|
|
83
|
+
var(--vd-border-color, #404040)
|
|
84
|
+
);
|
|
85
|
+
--vd-flowchart-palette-primary-fill: #1e3a8a;
|
|
86
|
+
--vd-flowchart-palette-primary-stroke: #60a5fa;
|
|
87
|
+
--vd-flowchart-palette-primary-text: #dbeafe;
|
|
88
|
+
--vd-flowchart-palette-primary-edge: #60a5fa;
|
|
89
|
+
--vd-flowchart-palette-secondary-fill: #312e81;
|
|
90
|
+
--vd-flowchart-palette-secondary-stroke: #818cf8;
|
|
91
|
+
--vd-flowchart-palette-secondary-text: #e0e7ff;
|
|
92
|
+
--vd-flowchart-palette-secondary-edge: #818cf8;
|
|
93
|
+
--vd-flowchart-palette-success-fill: #14532d;
|
|
94
|
+
--vd-flowchart-palette-success-stroke: #4ade80;
|
|
95
|
+
--vd-flowchart-palette-success-text: #dcfce7;
|
|
96
|
+
--vd-flowchart-palette-success-edge: #4ade80;
|
|
97
|
+
--vd-flowchart-palette-warning-fill: #78350f;
|
|
98
|
+
--vd-flowchart-palette-warning-stroke: #fbbf24;
|
|
99
|
+
--vd-flowchart-palette-warning-text: #fef3c7;
|
|
100
|
+
--vd-flowchart-palette-warning-edge: #fbbf24;
|
|
101
|
+
--vd-flowchart-palette-danger-fill: #7f1d1d;
|
|
102
|
+
--vd-flowchart-palette-danger-stroke: #f87171;
|
|
103
|
+
--vd-flowchart-palette-danger-text: #fee2e2;
|
|
104
|
+
--vd-flowchart-palette-danger-edge: #f87171;
|
|
105
|
+
--vd-flowchart-palette-info-fill: #0c4a6e;
|
|
106
|
+
--vd-flowchart-palette-info-stroke: #38bdf8;
|
|
107
|
+
--vd-flowchart-palette-info-text: #e0f2fe;
|
|
108
|
+
--vd-flowchart-palette-info-edge: #38bdf8;
|
|
109
|
+
--vd-flowchart-palette-violet-fill: #581c87;
|
|
110
|
+
--vd-flowchart-palette-violet-stroke: #c084fc;
|
|
111
|
+
--vd-flowchart-palette-violet-text: #f3e8ff;
|
|
112
|
+
--vd-flowchart-palette-violet-edge: #c084fc;
|
|
113
|
+
--vd-flowchart-palette-teal-fill: #134e4a;
|
|
114
|
+
--vd-flowchart-palette-teal-stroke: #2dd4bf;
|
|
115
|
+
--vd-flowchart-palette-teal-text: #ccfbf1;
|
|
116
|
+
--vd-flowchart-palette-teal-edge: #2dd4bf;
|
|
117
|
+
--vd-flowchart-palette-orange-fill: #7c2d12;
|
|
118
|
+
--vd-flowchart-palette-orange-stroke: #fb923c;
|
|
119
|
+
--vd-flowchart-palette-orange-text: #ffedd5;
|
|
120
|
+
--vd-flowchart-palette-orange-edge: #fb923c;
|
|
121
|
+
--vd-flowchart-palette-pink-fill: #831843;
|
|
122
|
+
--vd-flowchart-palette-pink-stroke: #f472b6;
|
|
123
|
+
--vd-flowchart-palette-pink-text: #fce7f3;
|
|
124
|
+
--vd-flowchart-palette-pink-edge: #f472b6;
|
|
125
|
+
--vd-flowchart-palette-neutral-fill: #1e293b;
|
|
126
|
+
--vd-flowchart-palette-neutral-stroke: #94a3b8;
|
|
127
|
+
--vd-flowchart-palette-neutral-text: #f1f5f9;
|
|
128
|
+
--vd-flowchart-palette-neutral-edge: #94a3b8;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@media (prefers-color-scheme: dark) {
|
|
132
|
+
:root:not([data-theme='light']) {
|
|
133
|
+
--vd-flowchart-node-stroke: color-mix(
|
|
134
|
+
in srgb,
|
|
135
|
+
var(--vd-flowchart-accent) 48%,
|
|
136
|
+
var(--vd-border-color, #404040)
|
|
137
|
+
);
|
|
138
|
+
--vd-flowchart-palette-primary-fill: #1e3a8a;
|
|
139
|
+
--vd-flowchart-palette-primary-stroke: #60a5fa;
|
|
140
|
+
--vd-flowchart-palette-primary-text: #dbeafe;
|
|
141
|
+
--vd-flowchart-palette-primary-edge: #60a5fa;
|
|
142
|
+
--vd-flowchart-palette-secondary-fill: #312e81;
|
|
143
|
+
--vd-flowchart-palette-secondary-stroke: #818cf8;
|
|
144
|
+
--vd-flowchart-palette-secondary-text: #e0e7ff;
|
|
145
|
+
--vd-flowchart-palette-secondary-edge: #818cf8;
|
|
146
|
+
--vd-flowchart-palette-success-fill: #14532d;
|
|
147
|
+
--vd-flowchart-palette-success-stroke: #4ade80;
|
|
148
|
+
--vd-flowchart-palette-success-text: #dcfce7;
|
|
149
|
+
--vd-flowchart-palette-success-edge: #4ade80;
|
|
150
|
+
--vd-flowchart-palette-warning-fill: #78350f;
|
|
151
|
+
--vd-flowchart-palette-warning-stroke: #fbbf24;
|
|
152
|
+
--vd-flowchart-palette-warning-text: #fef3c7;
|
|
153
|
+
--vd-flowchart-palette-warning-edge: #fbbf24;
|
|
154
|
+
--vd-flowchart-palette-danger-fill: #7f1d1d;
|
|
155
|
+
--vd-flowchart-palette-danger-stroke: #f87171;
|
|
156
|
+
--vd-flowchart-palette-danger-text: #fee2e2;
|
|
157
|
+
--vd-flowchart-palette-danger-edge: #f87171;
|
|
158
|
+
--vd-flowchart-palette-info-fill: #0c4a6e;
|
|
159
|
+
--vd-flowchart-palette-info-stroke: #38bdf8;
|
|
160
|
+
--vd-flowchart-palette-info-text: #e0f2fe;
|
|
161
|
+
--vd-flowchart-palette-info-edge: #38bdf8;
|
|
162
|
+
--vd-flowchart-palette-violet-fill: #581c87;
|
|
163
|
+
--vd-flowchart-palette-violet-stroke: #c084fc;
|
|
164
|
+
--vd-flowchart-palette-violet-text: #f3e8ff;
|
|
165
|
+
--vd-flowchart-palette-violet-edge: #c084fc;
|
|
166
|
+
--vd-flowchart-palette-teal-fill: #134e4a;
|
|
167
|
+
--vd-flowchart-palette-teal-stroke: #2dd4bf;
|
|
168
|
+
--vd-flowchart-palette-teal-text: #ccfbf1;
|
|
169
|
+
--vd-flowchart-palette-teal-edge: #2dd4bf;
|
|
170
|
+
--vd-flowchart-palette-orange-fill: #7c2d12;
|
|
171
|
+
--vd-flowchart-palette-orange-stroke: #fb923c;
|
|
172
|
+
--vd-flowchart-palette-orange-text: #ffedd5;
|
|
173
|
+
--vd-flowchart-palette-orange-edge: #fb923c;
|
|
174
|
+
--vd-flowchart-palette-pink-fill: #831843;
|
|
175
|
+
--vd-flowchart-palette-pink-stroke: #f472b6;
|
|
176
|
+
--vd-flowchart-palette-pink-text: #fce7f3;
|
|
177
|
+
--vd-flowchart-palette-pink-edge: #f472b6;
|
|
178
|
+
--vd-flowchart-palette-neutral-fill: #1e293b;
|
|
179
|
+
--vd-flowchart-palette-neutral-stroke: #94a3b8;
|
|
180
|
+
--vd-flowchart-palette-neutral-text: #f1f5f9;
|
|
181
|
+
--vd-flowchart-palette-neutral-edge: #94a3b8;
|
|
182
|
+
}
|
|
29
183
|
}
|
|
30
184
|
|
|
31
185
|
.vd-flowchart-host {
|
|
@@ -57,6 +211,8 @@
|
|
|
57
211
|
}
|
|
58
212
|
|
|
59
213
|
.vd-flowchart-toolbar {
|
|
214
|
+
position: relative;
|
|
215
|
+
z-index: 7;
|
|
60
216
|
display: flex;
|
|
61
217
|
align-items: center;
|
|
62
218
|
justify-content: space-between;
|
|
@@ -753,11 +909,14 @@
|
|
|
753
909
|
box-sizing: border-box;
|
|
754
910
|
min-width: 0;
|
|
755
911
|
min-height: 0;
|
|
756
|
-
|
|
912
|
+
/* Transparent chrome so the SVG silhouette (circle, diamond, …) stays
|
|
913
|
+
visible while typing. Opaque fills are restored for textbox/edge/label. */
|
|
914
|
+
border: 1px solid transparent;
|
|
757
915
|
border-radius: 8px;
|
|
758
|
-
background:
|
|
916
|
+
background: transparent;
|
|
759
917
|
color: var(--vd-flowchart-text);
|
|
760
|
-
box-shadow:
|
|
918
|
+
box-shadow: none;
|
|
919
|
+
caret-color: var(--vd-flowchart-accent);
|
|
761
920
|
font: inherit;
|
|
762
921
|
font-weight: 600;
|
|
763
922
|
outline: none;
|
|
@@ -766,13 +925,27 @@
|
|
|
766
925
|
text-align: center;
|
|
767
926
|
}
|
|
768
927
|
|
|
928
|
+
.vd-flowchart-text-editor--circle {
|
|
929
|
+
border-radius: 50%;
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
.vd-flowchart-text-editor--diamond {
|
|
933
|
+
border-radius: 0;
|
|
934
|
+
clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
|
|
935
|
+
}
|
|
936
|
+
|
|
769
937
|
.vd-flowchart-text-editor--textbox {
|
|
770
|
-
border
|
|
938
|
+
border: 1px dashed color-mix(in srgb, var(--vd-flowchart-accent) 78%, var(--vd-flowchart-border));
|
|
939
|
+
background: color-mix(in srgb, var(--vd-flowchart-panel) 92%, var(--vd-bg-primary, #fcfbf7));
|
|
940
|
+
box-shadow: 0 12px 26px color-mix(in srgb, var(--vd-flowchart-accent) 16%, transparent);
|
|
771
941
|
font-weight: 500;
|
|
772
942
|
text-align: left;
|
|
773
943
|
}
|
|
774
944
|
|
|
775
945
|
.vd-flowchart-text-editor--edge {
|
|
946
|
+
border: 1px solid color-mix(in srgb, var(--vd-flowchart-accent) 78%, var(--vd-flowchart-border));
|
|
947
|
+
background: color-mix(in srgb, var(--vd-flowchart-panel) 92%, var(--vd-bg-primary, #fcfbf7));
|
|
948
|
+
box-shadow: 0 12px 26px color-mix(in srgb, var(--vd-flowchart-accent) 16%, transparent);
|
|
776
949
|
font-weight: 500;
|
|
777
950
|
white-space: nowrap;
|
|
778
951
|
}
|
|
@@ -780,6 +953,7 @@
|
|
|
780
953
|
.vd-flowchart-text-editor--label {
|
|
781
954
|
border-color: transparent;
|
|
782
955
|
background: color-mix(in srgb, var(--vd-flowchart-panel) 82%, transparent);
|
|
956
|
+
box-shadow: 0 12px 26px color-mix(in srgb, var(--vd-flowchart-accent) 16%, transparent);
|
|
783
957
|
font-weight: 700;
|
|
784
958
|
}
|
|
785
959
|
|
|
@@ -937,6 +1111,13 @@
|
|
|
937
1111
|
outline-offset: -2px;
|
|
938
1112
|
}
|
|
939
1113
|
|
|
1114
|
+
/* The canvas is often full-bleed. Hide the viewport ring once a node is
|
|
1115
|
+
selected (Enter/Tab shape entry). An empty focused canvas still shows it. */
|
|
1116
|
+
.vd-flowchart-canvas:focus-visible:has(.is-selected),
|
|
1117
|
+
.vd-flowchart-canvas:focus:has(.is-selected) {
|
|
1118
|
+
outline: none;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
940
1121
|
.vd-flowchart-sr-only {
|
|
941
1122
|
position: absolute;
|
|
942
1123
|
width: 1px;
|
|
@@ -946,3 +1127,364 @@
|
|
|
946
1127
|
clip-path: inset(50%);
|
|
947
1128
|
white-space: nowrap;
|
|
948
1129
|
}
|
|
1130
|
+
|
|
1131
|
+
/* --- v1.6.0: Coloring, Edge Stroke Styles, Node Locking, Inspector Grid --- */
|
|
1132
|
+
|
|
1133
|
+
.vd-flowchart-color-popover-wrap {
|
|
1134
|
+
position: relative;
|
|
1135
|
+
display: inline-flex;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
.vd-flowchart-color-popover {
|
|
1139
|
+
position: absolute;
|
|
1140
|
+
top: calc(100% + 0.4rem);
|
|
1141
|
+
left: 0;
|
|
1142
|
+
z-index: 10;
|
|
1143
|
+
width: 11.5rem;
|
|
1144
|
+
padding: 0.55rem;
|
|
1145
|
+
border: 1px solid var(--vd-flowchart-border);
|
|
1146
|
+
border-radius: 8px;
|
|
1147
|
+
background-color: color-mix(in srgb, var(--vd-flowchart-panel) 98%, var(--vd-bg-primary, #fcfbf7));
|
|
1148
|
+
box-shadow: 0 12px 26px color-mix(in srgb, var(--vd-flowchart-text) 16%, transparent);
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
.vd-flowchart-color-popover[hidden] {
|
|
1152
|
+
display: none;
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
.vd-flowchart-swatch-grid {
|
|
1156
|
+
display: grid;
|
|
1157
|
+
grid-template-columns: repeat(6, minmax(0, 1fr));
|
|
1158
|
+
gap: 0.35rem;
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
.vd-flowchart-swatch {
|
|
1162
|
+
appearance: none;
|
|
1163
|
+
width: 100%;
|
|
1164
|
+
aspect-ratio: 1;
|
|
1165
|
+
min-height: 1.55rem;
|
|
1166
|
+
padding: 0;
|
|
1167
|
+
border: 2px solid var(--vd-flowchart-border);
|
|
1168
|
+
border-radius: 6px;
|
|
1169
|
+
background-color: var(--vd-flowchart-node-fill);
|
|
1170
|
+
cursor: pointer;
|
|
1171
|
+
transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
.vd-flowchart-swatch:hover:not(:disabled) {
|
|
1175
|
+
transform: scale(1.08);
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
.vd-flowchart-swatch:focus-visible {
|
|
1179
|
+
outline: 2px solid var(--vd-flowchart-accent);
|
|
1180
|
+
outline-offset: 2px;
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
.vd-flowchart-swatch:disabled {
|
|
1184
|
+
cursor: not-allowed;
|
|
1185
|
+
opacity: 0.5;
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
.vd-flowchart-swatch.is-active {
|
|
1189
|
+
box-shadow: 0 0 0 2px var(--vd-flowchart-surface), 0 0 0 4px var(--vd-flowchart-accent);
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
.vd-flowchart-swatch--default {
|
|
1193
|
+
background-color: var(--vd-flowchart-node-fill);
|
|
1194
|
+
border-color: var(--vd-flowchart-node-stroke);
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
.vd-flowchart-swatch--primary {
|
|
1198
|
+
background-color: var(--vd-flowchart-palette-primary-fill);
|
|
1199
|
+
border-color: var(--vd-flowchart-palette-primary-stroke);
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
.vd-flowchart-swatch--secondary {
|
|
1203
|
+
background-color: var(--vd-flowchart-palette-secondary-fill);
|
|
1204
|
+
border-color: var(--vd-flowchart-palette-secondary-stroke);
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
.vd-flowchart-swatch--success {
|
|
1208
|
+
background-color: var(--vd-flowchart-palette-success-fill);
|
|
1209
|
+
border-color: var(--vd-flowchart-palette-success-stroke);
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
.vd-flowchart-swatch--warning {
|
|
1213
|
+
background-color: var(--vd-flowchart-palette-warning-fill);
|
|
1214
|
+
border-color: var(--vd-flowchart-palette-warning-stroke);
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
.vd-flowchart-swatch--danger {
|
|
1218
|
+
background-color: var(--vd-flowchart-palette-danger-fill);
|
|
1219
|
+
border-color: var(--vd-flowchart-palette-danger-stroke);
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
.vd-flowchart-swatch--info {
|
|
1223
|
+
background-color: var(--vd-flowchart-palette-info-fill);
|
|
1224
|
+
border-color: var(--vd-flowchart-palette-info-stroke);
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
.vd-flowchart-swatch--violet {
|
|
1228
|
+
background-color: var(--vd-flowchart-palette-violet-fill);
|
|
1229
|
+
border-color: var(--vd-flowchart-palette-violet-stroke);
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
.vd-flowchart-swatch--teal {
|
|
1233
|
+
background-color: var(--vd-flowchart-palette-teal-fill);
|
|
1234
|
+
border-color: var(--vd-flowchart-palette-teal-stroke);
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
.vd-flowchart-swatch--orange {
|
|
1238
|
+
background-color: var(--vd-flowchart-palette-orange-fill);
|
|
1239
|
+
border-color: var(--vd-flowchart-palette-orange-stroke);
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
.vd-flowchart-swatch--pink {
|
|
1243
|
+
background-color: var(--vd-flowchart-palette-pink-fill);
|
|
1244
|
+
border-color: var(--vd-flowchart-palette-pink-stroke);
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
.vd-flowchart-swatch--neutral {
|
|
1248
|
+
background-color: var(--vd-flowchart-palette-neutral-fill);
|
|
1249
|
+
border-color: var(--vd-flowchart-palette-neutral-stroke);
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
.vd-flowchart-inspector-stack {
|
|
1253
|
+
display: flex;
|
|
1254
|
+
flex-direction: column;
|
|
1255
|
+
gap: 0.65rem;
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
.vd-flowchart-action-grid {
|
|
1259
|
+
display: grid;
|
|
1260
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
1261
|
+
gap: 0.4rem;
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
.vd-flowchart-action-btn {
|
|
1265
|
+
min-height: 1.85rem;
|
|
1266
|
+
padding: 0.3rem 0.45rem;
|
|
1267
|
+
font-size: 0.76rem;
|
|
1268
|
+
font-weight: 600;
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
.vd-flowchart-action-btn.is-active {
|
|
1272
|
+
border-color: var(--vd-flowchart-accent);
|
|
1273
|
+
background-color: color-mix(in srgb, var(--vd-flowchart-accent) 16%, transparent);
|
|
1274
|
+
color: var(--vd-flowchart-accent);
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
/* Node color presets */
|
|
1278
|
+
.vd-flowchart-node[data-color='primary'] {
|
|
1279
|
+
--vd-flowchart-node-fill: var(--vd-flowchart-palette-primary-fill);
|
|
1280
|
+
--vd-flowchart-node-stroke: var(--vd-flowchart-palette-primary-stroke);
|
|
1281
|
+
--vd-flowchart-node-stroke-selected: var(--vd-flowchart-palette-primary-stroke);
|
|
1282
|
+
--vd-flowchart-text: var(--vd-flowchart-palette-primary-text);
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
.vd-flowchart-node[data-color='secondary'] {
|
|
1286
|
+
--vd-flowchart-node-fill: var(--vd-flowchart-palette-secondary-fill);
|
|
1287
|
+
--vd-flowchart-node-stroke: var(--vd-flowchart-palette-secondary-stroke);
|
|
1288
|
+
--vd-flowchart-node-stroke-selected: var(--vd-flowchart-palette-secondary-stroke);
|
|
1289
|
+
--vd-flowchart-text: var(--vd-flowchart-palette-secondary-text);
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
.vd-flowchart-node[data-color='success'] {
|
|
1293
|
+
--vd-flowchart-node-fill: var(--vd-flowchart-palette-success-fill);
|
|
1294
|
+
--vd-flowchart-node-stroke: var(--vd-flowchart-palette-success-stroke);
|
|
1295
|
+
--vd-flowchart-node-stroke-selected: var(--vd-flowchart-palette-success-stroke);
|
|
1296
|
+
--vd-flowchart-text: var(--vd-flowchart-palette-success-text);
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
.vd-flowchart-node[data-color='warning'] {
|
|
1300
|
+
--vd-flowchart-node-fill: var(--vd-flowchart-palette-warning-fill);
|
|
1301
|
+
--vd-flowchart-node-stroke: var(--vd-flowchart-palette-warning-stroke);
|
|
1302
|
+
--vd-flowchart-node-stroke-selected: var(--vd-flowchart-palette-warning-stroke);
|
|
1303
|
+
--vd-flowchart-text: var(--vd-flowchart-palette-warning-text);
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
.vd-flowchart-node[data-color='danger'] {
|
|
1307
|
+
--vd-flowchart-node-fill: var(--vd-flowchart-palette-danger-fill);
|
|
1308
|
+
--vd-flowchart-node-stroke: var(--vd-flowchart-palette-danger-stroke);
|
|
1309
|
+
--vd-flowchart-node-stroke-selected: var(--vd-flowchart-palette-danger-stroke);
|
|
1310
|
+
--vd-flowchart-text: var(--vd-flowchart-palette-danger-text);
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
.vd-flowchart-node[data-color='info'] {
|
|
1314
|
+
--vd-flowchart-node-fill: var(--vd-flowchart-palette-info-fill);
|
|
1315
|
+
--vd-flowchart-node-stroke: var(--vd-flowchart-palette-info-stroke);
|
|
1316
|
+
--vd-flowchart-node-stroke-selected: var(--vd-flowchart-palette-info-stroke);
|
|
1317
|
+
--vd-flowchart-text: var(--vd-flowchart-palette-info-text);
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
.vd-flowchart-node[data-color='violet'] {
|
|
1321
|
+
--vd-flowchart-node-fill: var(--vd-flowchart-palette-violet-fill);
|
|
1322
|
+
--vd-flowchart-node-stroke: var(--vd-flowchart-palette-violet-stroke);
|
|
1323
|
+
--vd-flowchart-node-stroke-selected: var(--vd-flowchart-palette-violet-stroke);
|
|
1324
|
+
--vd-flowchart-text: var(--vd-flowchart-palette-violet-text);
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
.vd-flowchart-node[data-color='teal'] {
|
|
1328
|
+
--vd-flowchart-node-fill: var(--vd-flowchart-palette-teal-fill);
|
|
1329
|
+
--vd-flowchart-node-stroke: var(--vd-flowchart-palette-teal-stroke);
|
|
1330
|
+
--vd-flowchart-node-stroke-selected: var(--vd-flowchart-palette-teal-stroke);
|
|
1331
|
+
--vd-flowchart-text: var(--vd-flowchart-palette-teal-text);
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
.vd-flowchart-node[data-color='orange'] {
|
|
1335
|
+
--vd-flowchart-node-fill: var(--vd-flowchart-palette-orange-fill);
|
|
1336
|
+
--vd-flowchart-node-stroke: var(--vd-flowchart-palette-orange-stroke);
|
|
1337
|
+
--vd-flowchart-node-stroke-selected: var(--vd-flowchart-palette-orange-stroke);
|
|
1338
|
+
--vd-flowchart-text: var(--vd-flowchart-palette-orange-text);
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
.vd-flowchart-node[data-color='pink'] {
|
|
1342
|
+
--vd-flowchart-node-fill: var(--vd-flowchart-palette-pink-fill);
|
|
1343
|
+
--vd-flowchart-node-stroke: var(--vd-flowchart-palette-pink-stroke);
|
|
1344
|
+
--vd-flowchart-node-stroke-selected: var(--vd-flowchart-palette-pink-stroke);
|
|
1345
|
+
--vd-flowchart-text: var(--vd-flowchart-palette-pink-text);
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
.vd-flowchart-node[data-color='neutral'] {
|
|
1349
|
+
--vd-flowchart-node-fill: var(--vd-flowchart-palette-neutral-fill);
|
|
1350
|
+
--vd-flowchart-node-stroke: var(--vd-flowchart-palette-neutral-stroke);
|
|
1351
|
+
--vd-flowchart-node-stroke-selected: var(--vd-flowchart-palette-neutral-stroke);
|
|
1352
|
+
--vd-flowchart-text: var(--vd-flowchart-palette-neutral-text);
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
/* Edge color presets */
|
|
1356
|
+
.vd-flowchart-edge[data-color='primary'] {
|
|
1357
|
+
--vd-flowchart-edge-stroke: var(--vd-flowchart-palette-primary-edge);
|
|
1358
|
+
--vd-flowchart-edge-stroke-selected: var(--vd-flowchart-palette-primary-edge);
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
.vd-flowchart-edge[data-color='secondary'] {
|
|
1362
|
+
--vd-flowchart-edge-stroke: var(--vd-flowchart-palette-secondary-edge);
|
|
1363
|
+
--vd-flowchart-edge-stroke-selected: var(--vd-flowchart-palette-secondary-edge);
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
.vd-flowchart-edge[data-color='success'] {
|
|
1367
|
+
--vd-flowchart-edge-stroke: var(--vd-flowchart-palette-success-edge);
|
|
1368
|
+
--vd-flowchart-edge-stroke-selected: var(--vd-flowchart-palette-success-edge);
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
.vd-flowchart-edge[data-color='warning'] {
|
|
1372
|
+
--vd-flowchart-edge-stroke: var(--vd-flowchart-palette-warning-edge);
|
|
1373
|
+
--vd-flowchart-edge-stroke-selected: var(--vd-flowchart-palette-warning-edge);
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
.vd-flowchart-edge[data-color='danger'] {
|
|
1377
|
+
--vd-flowchart-edge-stroke: var(--vd-flowchart-palette-danger-edge);
|
|
1378
|
+
--vd-flowchart-edge-stroke-selected: var(--vd-flowchart-palette-danger-edge);
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
.vd-flowchart-edge[data-color='info'] {
|
|
1382
|
+
--vd-flowchart-edge-stroke: var(--vd-flowchart-palette-info-edge);
|
|
1383
|
+
--vd-flowchart-edge-stroke-selected: var(--vd-flowchart-palette-info-edge);
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
.vd-flowchart-edge[data-color='violet'] {
|
|
1387
|
+
--vd-flowchart-edge-stroke: var(--vd-flowchart-palette-violet-edge);
|
|
1388
|
+
--vd-flowchart-edge-stroke-selected: var(--vd-flowchart-palette-violet-edge);
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
.vd-flowchart-edge[data-color='teal'] {
|
|
1392
|
+
--vd-flowchart-edge-stroke: var(--vd-flowchart-palette-teal-edge);
|
|
1393
|
+
--vd-flowchart-edge-stroke-selected: var(--vd-flowchart-palette-teal-edge);
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
.vd-flowchart-edge[data-color='orange'] {
|
|
1397
|
+
--vd-flowchart-edge-stroke: var(--vd-flowchart-palette-orange-edge);
|
|
1398
|
+
--vd-flowchart-edge-stroke-selected: var(--vd-flowchart-palette-orange-edge);
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
.vd-flowchart-edge[data-color='pink'] {
|
|
1402
|
+
--vd-flowchart-edge-stroke: var(--vd-flowchart-palette-pink-edge);
|
|
1403
|
+
--vd-flowchart-edge-stroke-selected: var(--vd-flowchart-palette-pink-edge);
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
.vd-flowchart-edge[data-color='neutral'] {
|
|
1407
|
+
--vd-flowchart-edge-stroke: var(--vd-flowchart-palette-neutral-edge);
|
|
1408
|
+
--vd-flowchart-edge-stroke-selected: var(--vd-flowchart-palette-neutral-edge);
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
/* Minimap colored nodes */
|
|
1412
|
+
.vd-flowchart-minimap-node[data-color='primary'] {
|
|
1413
|
+
fill: var(--vd-flowchart-palette-primary-stroke);
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
.vd-flowchart-minimap-node[data-color='secondary'] {
|
|
1417
|
+
fill: var(--vd-flowchart-palette-secondary-stroke);
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
.vd-flowchart-minimap-node[data-color='success'] {
|
|
1421
|
+
fill: var(--vd-flowchart-palette-success-stroke);
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1424
|
+
.vd-flowchart-minimap-node[data-color='warning'] {
|
|
1425
|
+
fill: var(--vd-flowchart-palette-warning-stroke);
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
.vd-flowchart-minimap-node[data-color='danger'] {
|
|
1429
|
+
fill: var(--vd-flowchart-palette-danger-stroke);
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
.vd-flowchart-minimap-node[data-color='info'] {
|
|
1433
|
+
fill: var(--vd-flowchart-palette-info-stroke);
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
.vd-flowchart-minimap-node[data-color='violet'] {
|
|
1437
|
+
fill: var(--vd-flowchart-palette-violet-stroke);
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
.vd-flowchart-minimap-node[data-color='teal'] {
|
|
1441
|
+
fill: var(--vd-flowchart-palette-teal-stroke);
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
.vd-flowchart-minimap-node[data-color='orange'] {
|
|
1445
|
+
fill: var(--vd-flowchart-palette-orange-stroke);
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
.vd-flowchart-minimap-node[data-color='pink'] {
|
|
1449
|
+
fill: var(--vd-flowchart-palette-pink-stroke);
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
.vd-flowchart-minimap-node[data-color='neutral'] {
|
|
1453
|
+
fill: var(--vd-flowchart-palette-neutral-stroke);
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
/* Edge stroke styles */
|
|
1457
|
+
@keyframes vd-flowchart-edge-flow {
|
|
1458
|
+
to {
|
|
1459
|
+
stroke-dashoffset: -26;
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
.vd-flowchart-edge.is-stroke-animated .vd-flowchart-edge-path {
|
|
1464
|
+
animation: vd-flowchart-edge-flow 900ms linear infinite;
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1468
|
+
.vd-flowchart-edge.is-stroke-animated .vd-flowchart-edge-path {
|
|
1469
|
+
animation: none;
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
/* Locked nodes */
|
|
1474
|
+
.vd-flowchart-node.is-locked {
|
|
1475
|
+
cursor: default;
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1478
|
+
.vd-flowchart-node-lock {
|
|
1479
|
+
pointer-events: none;
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
.vd-flowchart-node-lock-bg {
|
|
1483
|
+
fill: color-mix(in srgb, var(--vd-flowchart-panel) 92%, var(--vd-bg-primary, #fcfbf7));
|
|
1484
|
+
stroke: var(--vd-flowchart-border);
|
|
1485
|
+
stroke-width: 1;
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
.vd-flowchart-node-lock-icon {
|
|
1489
|
+
fill: var(--vd-flowchart-muted);
|
|
1490
|
+
}
|
package/dist/vue.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { DefineComponent } from 'vue';
|
|
2
2
|
import type {
|
|
3
3
|
FlowchartDocument,
|
|
4
|
+
FlowchartNode,
|
|
5
|
+
FlowchartEdge,
|
|
4
6
|
FlowchartChangeEvent,
|
|
5
7
|
FlowchartSelectEvent,
|
|
6
8
|
FlowchartViewportEvent,
|
|
@@ -9,6 +11,11 @@ import type {
|
|
|
9
11
|
LayoutMode,
|
|
10
12
|
LayoutOptions,
|
|
11
13
|
FlowchartKeyboardShortcuts,
|
|
14
|
+
FlowchartColorPreset,
|
|
15
|
+
FlowchartNodeColorPatch,
|
|
16
|
+
FlowchartNodeAlignment,
|
|
17
|
+
FlowchartDistributeAxis,
|
|
18
|
+
ExportSvgOptions,
|
|
12
19
|
} from './core';
|
|
13
20
|
|
|
14
21
|
/** Loosely-typed document accepted by the `data` prop. */
|
|
@@ -68,6 +75,32 @@ export interface VdFlowchartExposed {
|
|
|
68
75
|
canRedo(): boolean;
|
|
69
76
|
layout(mode?: LayoutMode, options?: LayoutOptions): void;
|
|
70
77
|
fitNode(nodeId: string, padding?: number): void;
|
|
78
|
+
setNodeColor(
|
|
79
|
+
nodeId: string,
|
|
80
|
+
colorOrPatch: FlowchartColorPreset | string | FlowchartNodeColorPatch | null,
|
|
81
|
+
): FlowchartNode | null;
|
|
82
|
+
setEdgeColor(
|
|
83
|
+
edgeId: string,
|
|
84
|
+
color: FlowchartColorPreset | string | { color?: string | null; stroke?: string | null } | null,
|
|
85
|
+
): FlowchartEdge | null;
|
|
86
|
+
setSelectionColor(
|
|
87
|
+
colorOrPatch: FlowchartColorPreset | string | FlowchartNodeColorPatch | null,
|
|
88
|
+
): void;
|
|
89
|
+
clearSelectionColor(): void;
|
|
90
|
+
bringToFront(targetId?: string | string[]): void;
|
|
91
|
+
bringForward(targetId?: string | string[]): void;
|
|
92
|
+
sendBackward(targetId?: string | string[]): void;
|
|
93
|
+
sendToBack(targetId?: string | string[]): void;
|
|
94
|
+
alignNodes(alignment?: FlowchartNodeAlignment, nodeIds?: string[]): void;
|
|
95
|
+
distributeNodes(axis?: FlowchartDistributeAxis, nodeIds?: string[]): void;
|
|
96
|
+
setNodeLocked(nodeId?: string | string[] | boolean, locked?: boolean): boolean;
|
|
97
|
+
toggleNodeLocked(nodeId?: string | string[]): boolean;
|
|
98
|
+
duplicateSelection(): FlowchartNode | FlowchartNode[] | null;
|
|
99
|
+
copySelection(): boolean;
|
|
100
|
+
pasteClipboard(): boolean;
|
|
101
|
+
pasteSelection(): FlowchartNode | FlowchartNode[] | null;
|
|
102
|
+
cutSelection(): boolean;
|
|
103
|
+
exportSvg(options?: ExportSvgOptions): string;
|
|
71
104
|
}
|
|
72
105
|
|
|
73
106
|
/* eslint-disable @typescript-eslint/no-empty-object-type -- DefineComponent filler params */
|
package/package.json
CHANGED