dishui 0.0.43 → 0.0.45
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/components/pro/Flow/hooks/useMindMap.js +1 -1
- package/dist/components/pro/Flow/hooks/useMindMap.js.map +1 -1
- package/dist/components/pro/Flow/nodes/NodeRenderer.js +87 -89
- package/dist/components/pro/Flow/nodes/NodeRenderer.js.map +1 -1
- package/dist/components/pro/Flow/nodes/shapes.d.ts +4 -0
- package/dist/components/pro/Flow/nodes/shapes.js +95 -83
- package/dist/components/pro/Flow/nodes/shapes.js.map +1 -1
- package/dist/components/pro/Flow/panels/FlowToolbar.js +38 -36
- package/dist/components/pro/Flow/panels/FlowToolbar.js.map +1 -1
- package/dist/dishui.css +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
function
|
|
1
|
+
function M(e, t) {
|
|
2
2
|
if (!(!e || e === "solid")) {
|
|
3
3
|
if (e === "dynamic") return [t * 4, t * 3];
|
|
4
4
|
if (e === "dashed") return [t * 4, t * 2];
|
|
5
5
|
if (e === "dotted") return [t, t * 2];
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function W(e, t, h = 3) {
|
|
9
9
|
const n = [];
|
|
10
10
|
for (let i = 0; i <= e; i += h) n.push({
|
|
11
11
|
x: i,
|
|
@@ -28,93 +28,104 @@ function D(e, t, h = 3) {
|
|
|
28
28
|
y: 0
|
|
29
29
|
}), n;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
const i = [],
|
|
33
|
-
for (let y = 0; y <=
|
|
34
|
-
const p = c + Math.PI / 2 * (y /
|
|
31
|
+
function P(e, t, h, n = 3) {
|
|
32
|
+
const i = [], a = Math.max(4, Math.ceil(Math.PI / 2 * h / n)), r = (s, l, c) => {
|
|
33
|
+
for (let y = 0; y <= a; y++) {
|
|
34
|
+
const p = c + Math.PI / 2 * (y / a);
|
|
35
35
|
i.push({
|
|
36
36
|
x: s + h * Math.cos(p),
|
|
37
|
-
y:
|
|
37
|
+
y: l + h * Math.sin(p)
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
return r(e - h, h, -Math.PI / 2), r(e - h, t - h, 0), r(h, t - h, Math.PI / 2), r(h, h, Math.PI), i.length > 0 && i.push(i[0]), i;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
const
|
|
43
|
+
function D(e, t, h, n, i = 60) {
|
|
44
|
+
const a = [];
|
|
45
45
|
for (let r = 0; r <= i; r++) {
|
|
46
46
|
const s = Math.PI * 2 * r / i;
|
|
47
|
-
|
|
47
|
+
a.push({
|
|
48
48
|
x: e + h * Math.cos(s),
|
|
49
49
|
y: t + n * Math.sin(s)
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
return
|
|
52
|
+
return a;
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function k(e, t, h, n, i, a) {
|
|
55
55
|
if (t.length < 2) return;
|
|
56
56
|
const r = [0];
|
|
57
57
|
for (let o = 1; o < t.length; o++) r.push(r[o - 1] + Math.hypot(t[o].x - t[o - 1].x, t[o].y - t[o - 1].y));
|
|
58
58
|
const s = r[r.length - 1];
|
|
59
59
|
if (s < 1) return;
|
|
60
|
-
const
|
|
61
|
-
let c = -((n %
|
|
60
|
+
const l = h[0] + h[1];
|
|
61
|
+
let c = -((n % l + l) % l), y = !0;
|
|
62
62
|
const p = (o) => {
|
|
63
63
|
if (o <= 0) return t[0];
|
|
64
64
|
if (o >= s) return t[t.length - 1];
|
|
65
|
-
let d = 0,
|
|
66
|
-
for (; d <
|
|
67
|
-
const T = d +
|
|
68
|
-
r[T] <= o ? d = T :
|
|
65
|
+
let d = 0, w = r.length - 1;
|
|
66
|
+
for (; d < w - 1; ) {
|
|
67
|
+
const T = d + w >> 1;
|
|
68
|
+
r[T] <= o ? d = T : w = T;
|
|
69
69
|
}
|
|
70
|
-
const m = r[
|
|
70
|
+
const m = r[w] - r[d] > 0 ? (o - r[d]) / (r[w] - r[d]) : 0;
|
|
71
71
|
return {
|
|
72
|
-
x: t[d].x + (t[
|
|
73
|
-
y: t[d].y + (t[
|
|
72
|
+
x: t[d].x + (t[w].x - t[d].x) * m,
|
|
73
|
+
y: t[d].y + (t[w].y - t[d].y) * m
|
|
74
74
|
};
|
|
75
75
|
};
|
|
76
76
|
for (; c < s; ) {
|
|
77
|
-
const o = y ? h[0] : h[1], d = Math.max(c, 0),
|
|
78
|
-
if (y &&
|
|
77
|
+
const o = y ? h[0] : h[1], d = Math.max(c, 0), w = Math.min(c + o, s);
|
|
78
|
+
if (y && w > d) {
|
|
79
79
|
const m = p(d);
|
|
80
80
|
e.moveTo(m.x, m.y);
|
|
81
|
-
for (let
|
|
82
|
-
const
|
|
83
|
-
e.lineTo(
|
|
81
|
+
for (let g = d + 2; g < w; g += 2) {
|
|
82
|
+
const v = p(g);
|
|
83
|
+
e.lineTo(v.x, v.y);
|
|
84
84
|
}
|
|
85
|
-
const T = p(
|
|
85
|
+
const T = p(w);
|
|
86
86
|
e.lineTo(T.x, T.y);
|
|
87
87
|
}
|
|
88
88
|
c += o, y = !y;
|
|
89
89
|
}
|
|
90
90
|
e.stroke({
|
|
91
91
|
color: i,
|
|
92
|
-
width:
|
|
92
|
+
width: a,
|
|
93
93
|
cap: "round"
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
function f(e, t) {
|
|
97
|
-
t.fill && t.fill !== "transparent" && e.fill({ color: t.fill }), t.borderStyle !== "none" && t.stroke && t.stroke !== "transparent" && t.strokeWidth > 0 && (
|
|
97
|
+
t.fill && t.fill !== "transparent" && e.fill({ color: t.fill }), t.borderStyle !== "none" && t.stroke && t.stroke !== "transparent" && t.strokeWidth > 0 && (M(t.borderStyle, t.strokeWidth) || e.stroke({
|
|
98
98
|
color: t.stroke,
|
|
99
99
|
width: t.strokeWidth
|
|
100
100
|
}));
|
|
101
101
|
}
|
|
102
102
|
function u(e, t, h) {
|
|
103
|
-
const n =
|
|
104
|
-
!n || !t.stroke || t.stroke === "transparent" || t.strokeWidth <= 0 ||
|
|
103
|
+
const n = M(t.borderStyle, t.strokeWidth);
|
|
104
|
+
!n || !t.stroke || t.stroke === "transparent" || t.strokeWidth <= 0 || k(e, h, n, t.borderStyle === "dynamic" ? t.dashOffset ?? 0 : 0, t.stroke, t.strokeWidth);
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function K(e, t, h) {
|
|
107
|
+
if (t.borderStyle === "none" || !t.stroke || t.stroke === "transparent" || t.strokeWidth <= 0) return;
|
|
108
|
+
const n = h ?? Math.min(12, t.width * 0.1, t.height * 0.1), i = M(t.borderStyle, t.strokeWidth);
|
|
109
|
+
if (i) {
|
|
110
|
+
const a = t.borderStyle === "dynamic" ? t.dashOffset ?? 0 : 0;
|
|
111
|
+
k(e, P(t.width, t.height, n), i, a, t.stroke, t.strokeWidth);
|
|
112
|
+
} else e.roundRect(0, 0, t.width, t.height, n).stroke({
|
|
113
|
+
color: t.stroke,
|
|
114
|
+
width: t.strokeWidth
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
function x(e) {
|
|
107
118
|
return [...e, e[0]];
|
|
108
119
|
}
|
|
109
|
-
function
|
|
110
|
-
e.rect(0, 0, t.width, t.height), f(e, t), u(e, t,
|
|
120
|
+
function R(e, t) {
|
|
121
|
+
e.rect(0, 0, t.width, t.height), f(e, t), u(e, t, W(t.width, t.height));
|
|
111
122
|
}
|
|
112
|
-
function
|
|
123
|
+
function I(e, t) {
|
|
113
124
|
const h = Math.min(12, t.width * 0.1, t.height * 0.1);
|
|
114
|
-
e.roundRect(0, 0, t.width, t.height, h), f(e, t), u(e, t,
|
|
125
|
+
e.roundRect(0, 0, t.width, t.height, h), f(e, t), u(e, t, P(t.width, t.height, h));
|
|
115
126
|
}
|
|
116
|
-
function
|
|
117
|
-
e.ellipse(t.width / 2, t.height / 2, t.width / 2, t.height / 2), f(e, t), u(e, t,
|
|
127
|
+
function G(e, t) {
|
|
128
|
+
e.ellipse(t.width / 2, t.height / 2, t.width / 2, t.height / 2), f(e, t), u(e, t, D(t.width / 2, t.height / 2, t.width / 2, t.height / 2));
|
|
118
129
|
}
|
|
119
130
|
function C(e, t) {
|
|
120
131
|
const h = t.width / 2, n = t.height / 2, i = [
|
|
@@ -135,12 +146,12 @@ function C(e, t) {
|
|
|
135
146
|
y: n
|
|
136
147
|
}
|
|
137
148
|
];
|
|
138
|
-
e.moveTo(h, 0).lineTo(t.width, n).lineTo(h, t.height).lineTo(0, n).closePath(), f(e, t), u(e, t,
|
|
149
|
+
e.moveTo(h, 0).lineTo(t.width, n).lineTo(h, t.height).lineTo(0, n).closePath(), f(e, t), u(e, t, x(i));
|
|
139
150
|
}
|
|
140
151
|
function H(e, t) {
|
|
141
152
|
const h = t.width, n = t.height, i = n * 0.15;
|
|
142
153
|
e.moveTo(0, 0).lineTo(h, 0).lineTo(h, n - i).bezierCurveTo(h * 0.75, n - i * 2, h * 0.25, n, 0, n - i).closePath(), f(e, t);
|
|
143
|
-
const
|
|
154
|
+
const a = [
|
|
144
155
|
{
|
|
145
156
|
x: 0,
|
|
146
157
|
y: 0
|
|
@@ -155,16 +166,16 @@ function H(e, t) {
|
|
|
155
166
|
}
|
|
156
167
|
], r = 20;
|
|
157
168
|
for (let s = 1; s <= r; s++) {
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
x: c * c * c * h + 3 * c * c *
|
|
161
|
-
y: c * c * c * (n - i) + 3 * c * c *
|
|
169
|
+
const l = s / r, c = 1 - l;
|
|
170
|
+
a.push({
|
|
171
|
+
x: c * c * c * h + 3 * c * c * l * (h * 0.75) + 3 * c * l * l * (h * 0.25),
|
|
172
|
+
y: c * c * c * (n - i) + 3 * c * c * l * (n - i * 2) + 3 * c * l * l * n + l * l * l * (n - i)
|
|
162
173
|
});
|
|
163
174
|
}
|
|
164
|
-
|
|
175
|
+
a.push({
|
|
165
176
|
x: 0,
|
|
166
177
|
y: 0
|
|
167
|
-
}), u(e, t,
|
|
178
|
+
}), u(e, t, a);
|
|
168
179
|
}
|
|
169
180
|
function z(e, t) {
|
|
170
181
|
const h = t.width * 0.2, n = [
|
|
@@ -185,7 +196,7 @@ function z(e, t) {
|
|
|
185
196
|
y: t.height
|
|
186
197
|
}
|
|
187
198
|
];
|
|
188
|
-
e.moveTo(h, 0).lineTo(t.width, 0).lineTo(t.width - h, t.height).lineTo(0, t.height).closePath(), f(e, t), u(e, t,
|
|
199
|
+
e.moveTo(h, 0).lineTo(t.width, 0).lineTo(t.width - h, t.height).lineTo(0, t.height).closePath(), f(e, t), u(e, t, x(n));
|
|
189
200
|
}
|
|
190
201
|
function E(e, t) {
|
|
191
202
|
const h = [
|
|
@@ -202,7 +213,7 @@ function E(e, t) {
|
|
|
202
213
|
y: t.height
|
|
203
214
|
}
|
|
204
215
|
];
|
|
205
|
-
e.moveTo(t.width / 2, 0).lineTo(t.width, t.height).lineTo(0, t.height).closePath(), f(e, t), u(e, t,
|
|
216
|
+
e.moveTo(t.width / 2, 0).lineTo(t.width, t.height).lineTo(0, t.height).closePath(), f(e, t), u(e, t, x(h));
|
|
206
217
|
}
|
|
207
218
|
function L(e, t) {
|
|
208
219
|
const h = t.width * 0.15, n = [
|
|
@@ -223,52 +234,52 @@ function L(e, t) {
|
|
|
223
234
|
y: t.height
|
|
224
235
|
}
|
|
225
236
|
];
|
|
226
|
-
e.moveTo(h, 0).lineTo(t.width - h, 0).lineTo(t.width, t.height).lineTo(0, t.height).closePath(), f(e, t), u(e, t,
|
|
237
|
+
e.moveTo(h, 0).lineTo(t.width - h, 0).lineTo(t.width, t.height).lineTo(0, t.height).closePath(), f(e, t), u(e, t, x(n));
|
|
227
238
|
}
|
|
228
|
-
function S(e, t, h, n, i,
|
|
239
|
+
function S(e, t, h, n, i, a) {
|
|
229
240
|
const r = [];
|
|
230
241
|
for (let s = 0; s < h; s++) {
|
|
231
|
-
const
|
|
242
|
+
const l = Math.PI * 2 * s / h + a;
|
|
232
243
|
r.push({
|
|
233
|
-
x: e + n * Math.cos(
|
|
234
|
-
y: t + i * Math.sin(
|
|
244
|
+
x: e + n * Math.cos(l),
|
|
245
|
+
y: t + i * Math.sin(l)
|
|
235
246
|
});
|
|
236
247
|
}
|
|
237
248
|
return r;
|
|
238
249
|
}
|
|
239
250
|
function O(e, t) {
|
|
240
|
-
const h = t.width / 2, n = t.height / 2, i = Math.min(h, n),
|
|
241
|
-
for (let r = 0; r <
|
|
242
|
-
e.closePath(), f(e, t), u(e, t,
|
|
251
|
+
const h = t.width / 2, n = t.height / 2, i = Math.min(h, n), a = S(h, n, 5, i, i, -Math.PI / 2);
|
|
252
|
+
for (let r = 0; r < a.length; r++) r === 0 ? e.moveTo(a[r].x, a[r].y) : e.lineTo(a[r].x, a[r].y);
|
|
253
|
+
e.closePath(), f(e, t), u(e, t, x(a));
|
|
243
254
|
}
|
|
244
255
|
function B(e, t) {
|
|
245
256
|
const h = t.width / 2, n = t.height / 2, i = S(h, n, 6, h, n, -Math.PI / 6);
|
|
246
|
-
for (let
|
|
247
|
-
e.closePath(), f(e, t), u(e, t,
|
|
257
|
+
for (let a = 0; a < i.length; a++) a === 0 ? e.moveTo(i[a].x, i[a].y) : e.lineTo(i[a].x, i[a].y);
|
|
258
|
+
e.closePath(), f(e, t), u(e, t, x(i));
|
|
248
259
|
}
|
|
249
260
|
function F(e, t) {
|
|
250
|
-
const h = t.width / 2, n = t.height / 2, i = Math.min(h, n),
|
|
251
|
-
for (let
|
|
252
|
-
const c = Math.PI *
|
|
261
|
+
const h = t.width / 2, n = t.height / 2, i = Math.min(h, n), a = i * 0.4, r = 5, s = [];
|
|
262
|
+
for (let l = 0; l < r * 2; l++) {
|
|
263
|
+
const c = Math.PI * l / r - Math.PI / 2, y = l % 2 === 0 ? i : a;
|
|
253
264
|
s.push({
|
|
254
265
|
x: h + y * Math.cos(c),
|
|
255
266
|
y: n + y * Math.sin(c)
|
|
256
267
|
});
|
|
257
268
|
}
|
|
258
|
-
for (let
|
|
259
|
-
e.closePath(), f(e, t), u(e, t,
|
|
269
|
+
for (let l = 0; l < s.length; l++) l === 0 ? e.moveTo(s[l].x, s[l].y) : e.lineTo(s[l].x, s[l].y);
|
|
270
|
+
e.closePath(), f(e, t), u(e, t, x(s));
|
|
260
271
|
}
|
|
261
272
|
function j(e, t) {
|
|
262
|
-
const h = t.width / 2, n = t.height / 2, i = Math.min(h, n),
|
|
273
|
+
const h = t.width / 2, n = t.height / 2, i = Math.min(h, n), a = i * 0.55, r = [];
|
|
263
274
|
for (let s = 0; s < 12; s++) {
|
|
264
|
-
const
|
|
275
|
+
const l = Math.PI * s / 6 - Math.PI / 2, c = s % 2 === 0 ? i : a;
|
|
265
276
|
r.push({
|
|
266
|
-
x: h + c * Math.cos(
|
|
267
|
-
y: n + c * Math.sin(
|
|
277
|
+
x: h + c * Math.cos(l),
|
|
278
|
+
y: n + c * Math.sin(l)
|
|
268
279
|
});
|
|
269
280
|
}
|
|
270
281
|
for (let s = 0; s < r.length; s++) s === 0 ? e.moveTo(r[s].x, r[s].y) : e.lineTo(r[s].x, r[s].y);
|
|
271
|
-
e.closePath(), f(e, t), u(e, t,
|
|
282
|
+
e.closePath(), f(e, t), u(e, t, x(r));
|
|
272
283
|
}
|
|
273
284
|
function q(e, t) {
|
|
274
285
|
const h = [
|
|
@@ -285,7 +296,7 @@ function q(e, t) {
|
|
|
285
296
|
y: t.height
|
|
286
297
|
}
|
|
287
298
|
];
|
|
288
|
-
e.moveTo(0, 0).lineTo(t.width, t.height).lineTo(0, t.height).closePath(), f(e, t), u(e, t,
|
|
299
|
+
e.moveTo(0, 0).lineTo(t.width, t.height).lineTo(0, t.height).closePath(), f(e, t), u(e, t, x(h));
|
|
289
300
|
}
|
|
290
301
|
function A(e, t) {
|
|
291
302
|
const h = Math.min(t.width, t.height) * 0.4, n = [
|
|
@@ -314,7 +325,7 @@ function A(e, t) {
|
|
|
314
325
|
y: t.height
|
|
315
326
|
}
|
|
316
327
|
];
|
|
317
|
-
e.moveTo(0, 0).lineTo(t.width, 0).lineTo(t.width, h).lineTo(h, h).lineTo(h, t.height).lineTo(0, t.height).closePath(), f(e, t), u(e, t,
|
|
328
|
+
e.moveTo(0, 0).lineTo(t.width, 0).lineTo(t.width, h).lineTo(h, h).lineTo(h, t.height).lineTo(0, t.height).closePath(), f(e, t), u(e, t, x(n));
|
|
318
329
|
}
|
|
319
330
|
function b(e, t) {
|
|
320
331
|
const h = Math.min(6, t.width * 0.04, t.height * 0.04);
|
|
@@ -324,20 +335,20 @@ function b(e, t) {
|
|
|
324
335
|
});
|
|
325
336
|
const n = t.borderStyle ?? "dashed";
|
|
326
337
|
if (n !== "none" && t.stroke && t.stroke !== "transparent" && t.strokeWidth > 0) {
|
|
327
|
-
const i =
|
|
338
|
+
const i = M(n, t.strokeWidth);
|
|
328
339
|
if (i) {
|
|
329
|
-
const
|
|
330
|
-
|
|
340
|
+
const a = n === "dynamic" ? t.dashOffset ?? 0 : 0;
|
|
341
|
+
k(e, P(t.width, t.height, h), i, a, t.stroke, t.strokeWidth);
|
|
331
342
|
} else e.stroke({
|
|
332
343
|
color: t.stroke,
|
|
333
344
|
width: t.strokeWidth
|
|
334
345
|
});
|
|
335
346
|
}
|
|
336
347
|
}
|
|
337
|
-
var J = b,
|
|
338
|
-
shapeRect:
|
|
339
|
-
shapeRoundRect:
|
|
340
|
-
shapeEllipse:
|
|
348
|
+
var J = b, N = {
|
|
349
|
+
shapeRect: R,
|
|
350
|
+
shapeRoundRect: I,
|
|
351
|
+
shapeEllipse: G,
|
|
341
352
|
shapeDiamond: C,
|
|
342
353
|
shapeDocument: H,
|
|
343
354
|
shapeParallelogram: z,
|
|
@@ -349,29 +360,30 @@ var J = b, K = {
|
|
|
349
360
|
shapeHexagram: j,
|
|
350
361
|
shapeRightTriangle: q,
|
|
351
362
|
shapeCorner: A,
|
|
352
|
-
textLabel:
|
|
363
|
+
textLabel: R,
|
|
353
364
|
flowGroup: b,
|
|
354
365
|
geometryGroup: J,
|
|
355
|
-
shapeSvg:
|
|
366
|
+
shapeSvg: I
|
|
356
367
|
};
|
|
357
368
|
export {
|
|
358
369
|
A as drawCorner,
|
|
359
370
|
C as drawDiamond,
|
|
360
371
|
H as drawDocument,
|
|
361
|
-
|
|
372
|
+
G as drawEllipse,
|
|
362
373
|
b as drawFlowGroup,
|
|
363
374
|
J as drawGeometryGroup,
|
|
364
375
|
B as drawHexagon,
|
|
365
376
|
j as drawHexagram,
|
|
366
377
|
z as drawParallelogram,
|
|
367
378
|
O as drawPentagon,
|
|
368
|
-
|
|
379
|
+
R as drawRect,
|
|
369
380
|
q as drawRightTriangle,
|
|
370
|
-
|
|
381
|
+
I as drawRoundRect,
|
|
382
|
+
K as drawRoundRectBorder,
|
|
371
383
|
F as drawStar,
|
|
372
384
|
L as drawTrapezoid,
|
|
373
385
|
E as drawTriangle,
|
|
374
|
-
|
|
386
|
+
N as shapeDrawers
|
|
375
387
|
};
|
|
376
388
|
|
|
377
389
|
//# sourceMappingURL=shapes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shapes.js","names":[],"sources":["../../../../../src/components/pro/Flow/nodes/shapes.ts"],"sourcesContent":["import { Graphics } from 'pixi.js';\nimport type { FlowShapeType, FlowNodeData } from '../types';\n\nexport interface ShapeDrawOptions {\n width: number;\n height: number;\n fill: string;\n stroke: string;\n strokeWidth: number;\n borderStyle?: 'solid' | 'dashed' | 'dotted' | 'dynamic' | 'none';\n dashOffset?: number;\n}\n\nfunction parseDash(style: string | undefined, strokeWidth: number): number[] | undefined {\n if (!style || style === 'solid') return undefined;\n if (style === 'dynamic') return [strokeWidth * 4, strokeWidth * 3];\n if (style === 'dashed') return [strokeWidth * 4, strokeWidth * 2];\n if (style === 'dotted') return [strokeWidth, strokeWidth * 2];\n return undefined;\n}\n\n/**\n * Sample a rectangle's outline as points for dashed border.\n */\nfunction sampleRect(w: number, h: number, step = 3): Array<{ x: number; y: number }> {\n const pts: Array<{ x: number; y: number }> = [];\n for (let x = 0; x <= w; x += step) pts.push({ x, y: 0 });\n for (let y = step; y <= h; y += step) pts.push({ x: w, y });\n for (let x = w - step; x >= 0; x -= step) pts.push({ x, y: h });\n for (let y = h - step; y > 0; y -= step) pts.push({ x: 0, y });\n pts.push({ x: 0, y: 0 });\n return pts;\n}\n\n/**\n * Sample a rounded rectangle outline as points.\n */\nfunction sampleRoundRect(w: number, h: number, r: number, step = 3): Array<{ x: number; y: number }> {\n const pts: Array<{ x: number; y: number }> = [];\n const cornerSamples = Math.max(4, Math.ceil((Math.PI / 2) * r / step));\n const addCorner = (cx: number, cy: number, startAngle: number) => {\n for (let i = 0; i <= cornerSamples; i++) {\n const a = startAngle + (Math.PI / 2) * (i / cornerSamples);\n pts.push({ x: cx + r * Math.cos(a), y: cy + r * Math.sin(a) });\n }\n };\n addCorner(w - r, r, -Math.PI / 2);\n addCorner(w - r, h - r, 0);\n addCorner(r, h - r, Math.PI / 2);\n addCorner(r, r, Math.PI);\n if (pts.length > 0) pts.push(pts[0]);\n return pts;\n}\n\n/**\n * Sample an ellipse outline.\n */\nfunction sampleEllipse(cx: number, cy: number, rx: number, ry: number, samples = 60): Array<{ x: number; y: number }> {\n const pts: Array<{ x: number; y: number }> = [];\n for (let i = 0; i <= samples; i++) {\n const a = (Math.PI * 2 * i) / samples;\n pts.push({ x: cx + rx * Math.cos(a), y: cy + ry * Math.sin(a) });\n }\n return pts;\n}\n\n/**\n * Draw dashed polyline onto graphics.\n */\nfunction drawDashedPoly(g: Graphics, pts: Array<{ x: number; y: number }>, dash: number[], offset: number, color: string, width: number): void {\n if (pts.length < 2) return;\n const dists = [0];\n for (let i = 1; i < pts.length; i++) {\n dists.push(dists[i - 1] + Math.hypot(pts[i].x - pts[i - 1].x, pts[i].y - pts[i - 1].y));\n }\n const total = dists[dists.length - 1];\n if (total < 1) return;\n const patternLen = dash[0] + dash[1];\n let pos = -(((offset % patternLen) + patternLen) % patternLen);\n let drawing = true;\n\n const lerp = (d: number) => {\n if (d <= 0) return pts[0];\n if (d >= total) return pts[pts.length - 1];\n let lo = 0, hi = dists.length - 1;\n while (lo < hi - 1) { const m = (lo + hi) >> 1; if (dists[m] <= d) lo = m; else hi = m; }\n const t = dists[hi] - dists[lo] > 0 ? (d - dists[lo]) / (dists[hi] - dists[lo]) : 0;\n return { x: pts[lo].x + (pts[hi].x - pts[lo].x) * t, y: pts[lo].y + (pts[hi].y - pts[lo].y) * t };\n };\n\n while (pos < total) {\n const segLen = drawing ? dash[0] : dash[1];\n const start = Math.max(pos, 0);\n const end = Math.min(pos + segLen, total);\n if (drawing && end > start) {\n const p0 = lerp(start);\n g.moveTo(p0.x, p0.y);\n for (let d = start + 2; d < end; d += 2) {\n const p = lerp(d);\n g.lineTo(p.x, p.y);\n }\n const pe = lerp(end);\n g.lineTo(pe.x, pe.y);\n }\n pos += segLen;\n drawing = !drawing;\n }\n g.stroke({ color, width, cap: 'round' as const });\n}\n\nfunction fillShape(g: Graphics, o: ShapeDrawOptions) {\n if (o.fill && o.fill !== 'transparent') {\n g.fill({ color: o.fill });\n }\n if (o.borderStyle === 'none') return;\n if (o.stroke && o.stroke !== 'transparent' && o.strokeWidth > 0) {\n const dash = parseDash(o.borderStyle, o.strokeWidth);\n if (dash) {\n // Dashed/dotted/dynamic: don't stroke the shape path, we'll draw dashed separately\n } else {\n g.stroke({ color: o.stroke, width: o.strokeWidth });\n }\n }\n}\n\n/**\n * After fillShape, draw dashed border if needed.\n * Pass shape-specific outline points.\n */\nfunction drawDashedBorder(g: Graphics, o: ShapeDrawOptions, outlinePts: Array<{ x: number; y: number }>) {\n const dash = parseDash(o.borderStyle, o.strokeWidth);\n if (!dash || !o.stroke || o.stroke === 'transparent' || o.strokeWidth <= 0) return;\n const offset = o.borderStyle === 'dynamic' ? (o.dashOffset ?? 0) : 0;\n drawDashedPoly(g, outlinePts, dash, offset, o.stroke, o.strokeWidth);\n}\n\nfunction polyPoints(verts: Array<{ x: number; y: number }>): Array<{ x: number; y: number }> {\n return [...verts, verts[0]];\n}\n\nexport function drawRect(g: Graphics, o: ShapeDrawOptions): void {\n g.rect(0, 0, o.width, o.height);\n fillShape(g, o);\n drawDashedBorder(g, o, sampleRect(o.width, o.height));\n}\n\nexport function drawRoundRect(g: Graphics, o: ShapeDrawOptions): void {\n const r = Math.min(12, o.width * 0.1, o.height * 0.1);\n g.roundRect(0, 0, o.width, o.height, r);\n fillShape(g, o);\n drawDashedBorder(g, o, sampleRoundRect(o.width, o.height, r));\n}\n\nexport function drawEllipse(g: Graphics, o: ShapeDrawOptions): void {\n g.ellipse(o.width / 2, o.height / 2, o.width / 2, o.height / 2);\n fillShape(g, o);\n drawDashedBorder(g, o, sampleEllipse(o.width / 2, o.height / 2, o.width / 2, o.height / 2));\n}\n\nexport function drawDiamond(g: Graphics, o: ShapeDrawOptions): void {\n const cx = o.width / 2, cy = o.height / 2;\n const verts = [{ x: cx, y: 0 }, { x: o.width, y: cy }, { x: cx, y: o.height }, { x: 0, y: cy }];\n g.moveTo(cx, 0).lineTo(o.width, cy).lineTo(cx, o.height).lineTo(0, cy).closePath();\n fillShape(g, o);\n drawDashedBorder(g, o, polyPoints(verts));\n}\n\nexport function drawDocument(g: Graphics, o: ShapeDrawOptions): void {\n const w = o.width, h = o.height, curve = h * 0.15;\n g.moveTo(0, 0)\n .lineTo(w, 0)\n .lineTo(w, h - curve)\n .bezierCurveTo(w * 0.75, h - curve * 2, w * 0.25, h, 0, h - curve)\n .closePath();\n fillShape(g, o);\n const pts: Array<{ x: number; y: number }> = [{ x: 0, y: 0 }, { x: w, y: 0 }, { x: w, y: h - curve }];\n const samples = 20;\n for (let i = 1; i <= samples; i++) {\n const t = i / samples;\n const u = 1 - t;\n pts.push({\n x: u * u * u * w + 3 * u * u * t * (w * 0.75) + 3 * u * t * t * (w * 0.25),\n y: u * u * u * (h - curve) + 3 * u * u * t * (h - curve * 2) + 3 * u * t * t * h + t * t * t * (h - curve),\n });\n }\n pts.push({ x: 0, y: 0 });\n drawDashedBorder(g, o, pts);\n}\n\nexport function drawParallelogram(g: Graphics, o: ShapeDrawOptions): void {\n const skew = o.width * 0.2;\n const verts = [{ x: skew, y: 0 }, { x: o.width, y: 0 }, { x: o.width - skew, y: o.height }, { x: 0, y: o.height }];\n g.moveTo(skew, 0).lineTo(o.width, 0).lineTo(o.width - skew, o.height).lineTo(0, o.height).closePath();\n fillShape(g, o);\n drawDashedBorder(g, o, polyPoints(verts));\n}\n\nexport function drawTriangle(g: Graphics, o: ShapeDrawOptions): void {\n const verts = [{ x: o.width / 2, y: 0 }, { x: o.width, y: o.height }, { x: 0, y: o.height }];\n g.moveTo(o.width / 2, 0).lineTo(o.width, o.height).lineTo(0, o.height).closePath();\n fillShape(g, o);\n drawDashedBorder(g, o, polyPoints(verts));\n}\n\nexport function drawTrapezoid(g: Graphics, o: ShapeDrawOptions): void {\n const inset = o.width * 0.15;\n const verts = [{ x: inset, y: 0 }, { x: o.width - inset, y: 0 }, { x: o.width, y: o.height }, { x: 0, y: o.height }];\n g.moveTo(inset, 0).lineTo(o.width - inset, 0).lineTo(o.width, o.height).lineTo(0, o.height).closePath();\n fillShape(g, o);\n drawDashedBorder(g, o, polyPoints(verts));\n}\n\nfunction regularPoly(cx: number, cy: number, sides: number, rx: number, ry: number, startAngle: number): Array<{ x: number; y: number }> {\n const verts: Array<{ x: number; y: number }> = [];\n for (let i = 0; i < sides; i++) {\n const a = (Math.PI * 2 * i) / sides + startAngle;\n verts.push({ x: cx + rx * Math.cos(a), y: cy + ry * Math.sin(a) });\n }\n return verts;\n}\n\nexport function drawPentagon(g: Graphics, o: ShapeDrawOptions): void {\n const cx = o.width / 2, cy = o.height / 2, r = Math.min(cx, cy);\n const verts = regularPoly(cx, cy, 5, r, r, -Math.PI / 2);\n for (let i = 0; i < verts.length; i++) {\n if (i === 0) g.moveTo(verts[i].x, verts[i].y); else g.lineTo(verts[i].x, verts[i].y);\n }\n g.closePath();\n fillShape(g, o);\n drawDashedBorder(g, o, polyPoints(verts));\n}\n\nexport function drawHexagon(g: Graphics, o: ShapeDrawOptions): void {\n const cx = o.width / 2, cy = o.height / 2;\n const verts = regularPoly(cx, cy, 6, cx, cy, -Math.PI / 6);\n for (let i = 0; i < verts.length; i++) {\n if (i === 0) g.moveTo(verts[i].x, verts[i].y); else g.lineTo(verts[i].x, verts[i].y);\n }\n g.closePath();\n fillShape(g, o);\n drawDashedBorder(g, o, polyPoints(verts));\n}\n\nexport function drawStar(g: Graphics, o: ShapeDrawOptions): void {\n const cx = o.width / 2, cy = o.height / 2;\n const outer = Math.min(cx, cy), inner = outer * 0.4, points = 5;\n const verts: Array<{ x: number; y: number }> = [];\n for (let i = 0; i < points * 2; i++) {\n const angle = (Math.PI * i) / points - Math.PI / 2;\n const r = i % 2 === 0 ? outer : inner;\n verts.push({ x: cx + r * Math.cos(angle), y: cy + r * Math.sin(angle) });\n }\n for (let i = 0; i < verts.length; i++) {\n if (i === 0) g.moveTo(verts[i].x, verts[i].y); else g.lineTo(verts[i].x, verts[i].y);\n }\n g.closePath();\n fillShape(g, o);\n drawDashedBorder(g, o, polyPoints(verts));\n}\n\nexport function drawHexagram(g: Graphics, o: ShapeDrawOptions): void {\n const cx = o.width / 2, cy = o.height / 2;\n const outer = Math.min(cx, cy), inner = outer * 0.55;\n const verts: Array<{ x: number; y: number }> = [];\n for (let i = 0; i < 12; i++) {\n const angle = (Math.PI * i) / 6 - Math.PI / 2;\n const r = i % 2 === 0 ? outer : inner;\n verts.push({ x: cx + r * Math.cos(angle), y: cy + r * Math.sin(angle) });\n }\n for (let i = 0; i < verts.length; i++) {\n if (i === 0) g.moveTo(verts[i].x, verts[i].y); else g.lineTo(verts[i].x, verts[i].y);\n }\n g.closePath();\n fillShape(g, o);\n drawDashedBorder(g, o, polyPoints(verts));\n}\n\nexport function drawRightTriangle(g: Graphics, o: ShapeDrawOptions): void {\n const verts = [{ x: 0, y: 0 }, { x: o.width, y: o.height }, { x: 0, y: o.height }];\n g.moveTo(0, 0).lineTo(o.width, o.height).lineTo(0, o.height).closePath();\n fillShape(g, o);\n drawDashedBorder(g, o, polyPoints(verts));\n}\n\nexport function drawCorner(g: Graphics, o: ShapeDrawOptions): void {\n const half = Math.min(o.width, o.height) * 0.4;\n const verts = [\n { x: 0, y: 0 }, { x: o.width, y: 0 }, { x: o.width, y: half },\n { x: half, y: half }, { x: half, y: o.height }, { x: 0, y: o.height },\n ];\n g.moveTo(0, 0).lineTo(o.width, 0).lineTo(o.width, half)\n .lineTo(half, half).lineTo(half, o.height).lineTo(0, o.height).closePath();\n fillShape(g, o);\n drawDashedBorder(g, o, polyPoints(verts));\n}\n\nexport function drawFlowGroup(g: Graphics, o: ShapeDrawOptions): void {\n const r = Math.min(6, o.width * 0.04, o.height * 0.04);\n g.roundRect(0, 0, o.width, o.height, r);\n if (o.fill && o.fill !== 'transparent') {\n g.fill({ color: o.fill, alpha: 0.08 });\n }\n const border = o.borderStyle ?? 'dashed';\n if (border !== 'none' && o.stroke && o.stroke !== 'transparent' && o.strokeWidth > 0) {\n const dash = parseDash(border, o.strokeWidth);\n if (dash) {\n const offset = border === 'dynamic' ? (o.dashOffset ?? 0) : 0;\n drawDashedPoly(g, sampleRoundRect(o.width, o.height, r), dash, offset, o.stroke, o.strokeWidth);\n } else {\n g.stroke({ color: o.stroke, width: o.strokeWidth });\n }\n }\n}\n\nexport const drawGeometryGroup = drawFlowGroup;\n\n/** Lookup table mapping shape type to draw function */\nexport const shapeDrawers: Record<string, (g: Graphics, o: ShapeDrawOptions) => void> = {\n shapeRect: drawRect,\n shapeRoundRect: drawRoundRect,\n shapeEllipse: drawEllipse,\n shapeDiamond: drawDiamond,\n shapeDocument: drawDocument,\n shapeParallelogram: drawParallelogram,\n shapeTriangle: drawTriangle,\n shapeTrapezoid: drawTrapezoid,\n shapePentagon: drawPentagon,\n shapeHexagon: drawHexagon,\n shapeStar: drawStar,\n shapeHexagram: drawHexagram,\n shapeRightTriangle: drawRightTriangle,\n shapeCorner: drawCorner,\n text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A,EACX,eAAe;AAAA,EACf,UAAU;AACZ"}
|
|
1
|
+
{"version":3,"file":"shapes.js","names":[],"sources":["../../../../../src/components/pro/Flow/nodes/shapes.ts"],"sourcesContent":["import { Graphics } from 'pixi.js';\nimport type { FlowShapeType, FlowNodeData } from '../types';\n\nexport interface ShapeDrawOptions {\n width: number;\n height: number;\n fill: string;\n stroke: string;\n strokeWidth: number;\n borderStyle?: 'solid' | 'dashed' | 'dotted' | 'dynamic' | 'none';\n dashOffset?: number;\n}\n\nfunction parseDash(style: string | undefined, strokeWidth: number): number[] | undefined {\n if (!style || style === 'solid') return undefined;\n if (style === 'dynamic') return [strokeWidth * 4, strokeWidth * 3];\n if (style === 'dashed') return [strokeWidth * 4, strokeWidth * 2];\n if (style === 'dotted') return [strokeWidth, strokeWidth * 2];\n return undefined;\n}\n\n/**\n * Sample a rectangle's outline as points for dashed border.\n */\nfunction sampleRect(w: number, h: number, step = 3): Array<{ x: number; y: number }> {\n const pts: Array<{ x: number; y: number }> = [];\n for (let x = 0; x <= w; x += step) pts.push({ x, y: 0 });\n for (let y = step; y <= h; y += step) pts.push({ x: w, y });\n for (let x = w - step; x >= 0; x -= step) pts.push({ x, y: h });\n for (let y = h - step; y > 0; y -= step) pts.push({ x: 0, y });\n pts.push({ x: 0, y: 0 });\n return pts;\n}\n\n/**\n * Sample a rounded rectangle outline as points.\n */\nfunction sampleRoundRect(w: number, h: number, r: number, step = 3): Array<{ x: number; y: number }> {\n const pts: Array<{ x: number; y: number }> = [];\n const cornerSamples = Math.max(4, Math.ceil((Math.PI / 2) * r / step));\n const addCorner = (cx: number, cy: number, startAngle: number) => {\n for (let i = 0; i <= cornerSamples; i++) {\n const a = startAngle + (Math.PI / 2) * (i / cornerSamples);\n pts.push({ x: cx + r * Math.cos(a), y: cy + r * Math.sin(a) });\n }\n };\n addCorner(w - r, r, -Math.PI / 2);\n addCorner(w - r, h - r, 0);\n addCorner(r, h - r, Math.PI / 2);\n addCorner(r, r, Math.PI);\n if (pts.length > 0) pts.push(pts[0]);\n return pts;\n}\n\n/**\n * Sample an ellipse outline.\n */\nfunction sampleEllipse(cx: number, cy: number, rx: number, ry: number, samples = 60): Array<{ x: number; y: number }> {\n const pts: Array<{ x: number; y: number }> = [];\n for (let i = 0; i <= samples; i++) {\n const a = (Math.PI * 2 * i) / samples;\n pts.push({ x: cx + rx * Math.cos(a), y: cy + ry * Math.sin(a) });\n }\n return pts;\n}\n\n/**\n * Draw dashed polyline onto graphics.\n */\nfunction drawDashedPoly(g: Graphics, pts: Array<{ x: number; y: number }>, dash: number[], offset: number, color: string, width: number): void {\n if (pts.length < 2) return;\n const dists = [0];\n for (let i = 1; i < pts.length; i++) {\n dists.push(dists[i - 1] + Math.hypot(pts[i].x - pts[i - 1].x, pts[i].y - pts[i - 1].y));\n }\n const total = dists[dists.length - 1];\n if (total < 1) return;\n const patternLen = dash[0] + dash[1];\n let pos = -(((offset % patternLen) + patternLen) % patternLen);\n let drawing = true;\n\n const lerp = (d: number) => {\n if (d <= 0) return pts[0];\n if (d >= total) return pts[pts.length - 1];\n let lo = 0, hi = dists.length - 1;\n while (lo < hi - 1) { const m = (lo + hi) >> 1; if (dists[m] <= d) lo = m; else hi = m; }\n const t = dists[hi] - dists[lo] > 0 ? (d - dists[lo]) / (dists[hi] - dists[lo]) : 0;\n return { x: pts[lo].x + (pts[hi].x - pts[lo].x) * t, y: pts[lo].y + (pts[hi].y - pts[lo].y) * t };\n };\n\n while (pos < total) {\n const segLen = drawing ? dash[0] : dash[1];\n const start = Math.max(pos, 0);\n const end = Math.min(pos + segLen, total);\n if (drawing && end > start) {\n const p0 = lerp(start);\n g.moveTo(p0.x, p0.y);\n for (let d = start + 2; d < end; d += 2) {\n const p = lerp(d);\n g.lineTo(p.x, p.y);\n }\n const pe = lerp(end);\n g.lineTo(pe.x, pe.y);\n }\n pos += segLen;\n drawing = !drawing;\n }\n g.stroke({ color, width, cap: 'round' as const });\n}\n\nfunction fillShape(g: Graphics, o: ShapeDrawOptions) {\n if (o.fill && o.fill !== 'transparent') {\n g.fill({ color: o.fill });\n }\n if (o.borderStyle === 'none') return;\n if (o.stroke && o.stroke !== 'transparent' && o.strokeWidth > 0) {\n const dash = parseDash(o.borderStyle, o.strokeWidth);\n if (dash) {\n // Dashed/dotted/dynamic: don't stroke the shape path, we'll draw dashed separately\n } else {\n g.stroke({ color: o.stroke, width: o.strokeWidth });\n }\n }\n}\n\n/**\n * After fillShape, draw dashed border if needed.\n * Pass shape-specific outline points.\n */\nfunction drawDashedBorder(g: Graphics, o: ShapeDrawOptions, outlinePts: Array<{ x: number; y: number }>) {\n const dash = parseDash(o.borderStyle, o.strokeWidth);\n if (!dash || !o.stroke || o.stroke === 'transparent' || o.strokeWidth <= 0) return;\n const offset = o.borderStyle === 'dynamic' ? (o.dashOffset ?? 0) : 0;\n drawDashedPoly(g, outlinePts, dash, offset, o.stroke, o.strokeWidth);\n}\n\n/** Draw only a rounded-rectangle border, without leaving a base path that can\n * be picked up by the dashed stroke. Useful when fill and border are rendered\n * independently, as they are for SVG icon nodes. */\nexport function drawRoundRectBorder(g: Graphics, o: ShapeDrawOptions, radius?: number): void {\n if (o.borderStyle === 'none' || !o.stroke || o.stroke === 'transparent' || o.strokeWidth <= 0) return;\n const r = radius ?? Math.min(12, o.width * 0.1, o.height * 0.1);\n const dash = parseDash(o.borderStyle, o.strokeWidth);\n if (dash) {\n const offset = o.borderStyle === 'dynamic' ? (o.dashOffset ?? 0) : 0;\n drawDashedPoly(g, sampleRoundRect(o.width, o.height, r), dash, offset, o.stroke, o.strokeWidth);\n } else {\n g.roundRect(0, 0, o.width, o.height, r).stroke({ color: o.stroke, width: o.strokeWidth });\n }\n}\n\nfunction polyPoints(verts: Array<{ x: number; y: number }>): Array<{ x: number; y: number }> {\n return [...verts, verts[0]];\n}\n\nexport function drawRect(g: Graphics, o: ShapeDrawOptions): void {\n g.rect(0, 0, o.width, o.height);\n fillShape(g, o);\n drawDashedBorder(g, o, sampleRect(o.width, o.height));\n}\n\nexport function drawRoundRect(g: Graphics, o: ShapeDrawOptions): void {\n const r = Math.min(12, o.width * 0.1, o.height * 0.1);\n g.roundRect(0, 0, o.width, o.height, r);\n fillShape(g, o);\n drawDashedBorder(g, o, sampleRoundRect(o.width, o.height, r));\n}\n\nexport function drawEllipse(g: Graphics, o: ShapeDrawOptions): void {\n g.ellipse(o.width / 2, o.height / 2, o.width / 2, o.height / 2);\n fillShape(g, o);\n drawDashedBorder(g, o, sampleEllipse(o.width / 2, o.height / 2, o.width / 2, o.height / 2));\n}\n\nexport function drawDiamond(g: Graphics, o: ShapeDrawOptions): void {\n const cx = o.width / 2, cy = o.height / 2;\n const verts = [{ x: cx, y: 0 }, { x: o.width, y: cy }, { x: cx, y: o.height }, { x: 0, y: cy }];\n g.moveTo(cx, 0).lineTo(o.width, cy).lineTo(cx, o.height).lineTo(0, cy).closePath();\n fillShape(g, o);\n drawDashedBorder(g, o, polyPoints(verts));\n}\n\nexport function drawDocument(g: Graphics, o: ShapeDrawOptions): void {\n const w = o.width, h = o.height, curve = h * 0.15;\n g.moveTo(0, 0)\n .lineTo(w, 0)\n .lineTo(w, h - curve)\n .bezierCurveTo(w * 0.75, h - curve * 2, w * 0.25, h, 0, h - curve)\n .closePath();\n fillShape(g, o);\n const pts: Array<{ x: number; y: number }> = [{ x: 0, y: 0 }, { x: w, y: 0 }, { x: w, y: h - curve }];\n const samples = 20;\n for (let i = 1; i <= samples; i++) {\n const t = i / samples;\n const u = 1 - t;\n pts.push({\n x: u * u * u * w + 3 * u * u * t * (w * 0.75) + 3 * u * t * t * (w * 0.25),\n y: u * u * u * (h - curve) + 3 * u * u * t * (h - curve * 2) + 3 * u * t * t * h + t * t * t * (h - curve),\n });\n }\n pts.push({ x: 0, y: 0 });\n drawDashedBorder(g, o, pts);\n}\n\nexport function drawParallelogram(g: Graphics, o: ShapeDrawOptions): void {\n const skew = o.width * 0.2;\n const verts = [{ x: skew, y: 0 }, { x: o.width, y: 0 }, { x: o.width - skew, y: o.height }, { x: 0, y: o.height }];\n g.moveTo(skew, 0).lineTo(o.width, 0).lineTo(o.width - skew, o.height).lineTo(0, o.height).closePath();\n fillShape(g, o);\n drawDashedBorder(g, o, polyPoints(verts));\n}\n\nexport function drawTriangle(g: Graphics, o: ShapeDrawOptions): void {\n const verts = [{ x: o.width / 2, y: 0 }, { x: o.width, y: o.height }, { x: 0, y: o.height }];\n g.moveTo(o.width / 2, 0).lineTo(o.width, o.height).lineTo(0, o.height).closePath();\n fillShape(g, o);\n drawDashedBorder(g, o, polyPoints(verts));\n}\n\nexport function drawTrapezoid(g: Graphics, o: ShapeDrawOptions): void {\n const inset = o.width * 0.15;\n const verts = [{ x: inset, y: 0 }, { x: o.width - inset, y: 0 }, { x: o.width, y: o.height }, { x: 0, y: o.height }];\n g.moveTo(inset, 0).lineTo(o.width - inset, 0).lineTo(o.width, o.height).lineTo(0, o.height).closePath();\n fillShape(g, o);\n drawDashedBorder(g, o, polyPoints(verts));\n}\n\nfunction regularPoly(cx: number, cy: number, sides: number, rx: number, ry: number, startAngle: number): Array<{ x: number; y: number }> {\n const verts: Array<{ x: number; y: number }> = [];\n for (let i = 0; i < sides; i++) {\n const a = (Math.PI * 2 * i) / sides + startAngle;\n verts.push({ x: cx + rx * Math.cos(a), y: cy + ry * Math.sin(a) });\n }\n return verts;\n}\n\nexport function drawPentagon(g: Graphics, o: ShapeDrawOptions): void {\n const cx = o.width / 2, cy = o.height / 2, r = Math.min(cx, cy);\n const verts = regularPoly(cx, cy, 5, r, r, -Math.PI / 2);\n for (let i = 0; i < verts.length; i++) {\n if (i === 0) g.moveTo(verts[i].x, verts[i].y); else g.lineTo(verts[i].x, verts[i].y);\n }\n g.closePath();\n fillShape(g, o);\n drawDashedBorder(g, o, polyPoints(verts));\n}\n\nexport function drawHexagon(g: Graphics, o: ShapeDrawOptions): void {\n const cx = o.width / 2, cy = o.height / 2;\n const verts = regularPoly(cx, cy, 6, cx, cy, -Math.PI / 6);\n for (let i = 0; i < verts.length; i++) {\n if (i === 0) g.moveTo(verts[i].x, verts[i].y); else g.lineTo(verts[i].x, verts[i].y);\n }\n g.closePath();\n fillShape(g, o);\n drawDashedBorder(g, o, polyPoints(verts));\n}\n\nexport function drawStar(g: Graphics, o: ShapeDrawOptions): void {\n const cx = o.width / 2, cy = o.height / 2;\n const outer = Math.min(cx, cy), inner = outer * 0.4, points = 5;\n const verts: Array<{ x: number; y: number }> = [];\n for (let i = 0; i < points * 2; i++) {\n const angle = (Math.PI * i) / points - Math.PI / 2;\n const r = i % 2 === 0 ? outer : inner;\n verts.push({ x: cx + r * Math.cos(angle), y: cy + r * Math.sin(angle) });\n }\n for (let i = 0; i < verts.length; i++) {\n if (i === 0) g.moveTo(verts[i].x, verts[i].y); else g.lineTo(verts[i].x, verts[i].y);\n }\n g.closePath();\n fillShape(g, o);\n drawDashedBorder(g, o, polyPoints(verts));\n}\n\nexport function drawHexagram(g: Graphics, o: ShapeDrawOptions): void {\n const cx = o.width / 2, cy = o.height / 2;\n const outer = Math.min(cx, cy), inner = outer * 0.55;\n const verts: Array<{ x: number; y: number }> = [];\n for (let i = 0; i < 12; i++) {\n const angle = (Math.PI * i) / 6 - Math.PI / 2;\n const r = i % 2 === 0 ? outer : inner;\n verts.push({ x: cx + r * Math.cos(angle), y: cy + r * Math.sin(angle) });\n }\n for (let i = 0; i < verts.length; i++) {\n if (i === 0) g.moveTo(verts[i].x, verts[i].y); else g.lineTo(verts[i].x, verts[i].y);\n }\n g.closePath();\n fillShape(g, o);\n drawDashedBorder(g, o, polyPoints(verts));\n}\n\nexport function drawRightTriangle(g: Graphics, o: ShapeDrawOptions): void {\n const verts = [{ x: 0, y: 0 }, { x: o.width, y: o.height }, { x: 0, y: o.height }];\n g.moveTo(0, 0).lineTo(o.width, o.height).lineTo(0, o.height).closePath();\n fillShape(g, o);\n drawDashedBorder(g, o, polyPoints(verts));\n}\n\nexport function drawCorner(g: Graphics, o: ShapeDrawOptions): void {\n const half = Math.min(o.width, o.height) * 0.4;\n const verts = [\n { x: 0, y: 0 }, { x: o.width, y: 0 }, { x: o.width, y: half },\n { x: half, y: half }, { x: half, y: o.height }, { x: 0, y: o.height },\n ];\n g.moveTo(0, 0).lineTo(o.width, 0).lineTo(o.width, half)\n .lineTo(half, half).lineTo(half, o.height).lineTo(0, o.height).closePath();\n fillShape(g, o);\n drawDashedBorder(g, o, polyPoints(verts));\n}\n\nexport function drawFlowGroup(g: Graphics, o: ShapeDrawOptions): void {\n const r = Math.min(6, o.width * 0.04, o.height * 0.04);\n g.roundRect(0, 0, o.width, o.height, r);\n if (o.fill && o.fill !== 'transparent') {\n g.fill({ color: o.fill, alpha: 0.08 });\n }\n const border = o.borderStyle ?? 'dashed';\n if (border !== 'none' && o.stroke && o.stroke !== 'transparent' && o.strokeWidth > 0) {\n const dash = parseDash(border, o.strokeWidth);\n if (dash) {\n const offset = border === 'dynamic' ? (o.dashOffset ?? 0) : 0;\n drawDashedPoly(g, sampleRoundRect(o.width, o.height, r), dash, offset, o.stroke, o.strokeWidth);\n } else {\n g.stroke({ color: o.stroke, width: o.strokeWidth });\n }\n }\n}\n\nexport const drawGeometryGroup = drawFlowGroup;\n\n/** Lookup table mapping shape type to draw function */\nexport const shapeDrawers: Record<string, (g: Graphics, o: ShapeDrawOptions) => void> = {\n shapeRect: drawRect,\n shapeRoundRect: drawRoundRect,\n shapeEllipse: drawEllipse,\n shapeDiamond: drawDiamond,\n shapeDocument: drawDocument,\n shapeParallelogram: drawParallelogram,\n shapeTriangle: drawTriangle,\n shapeTrapezoid: drawTrapezoid,\n shapePentagon: drawPentagon,\n shapeHexagon: drawHexagon,\n shapeStar: drawStar,\n shapeHexagram: drawHexagram,\n shapeRightTriangle: drawRightTriangle,\n shapeCorner: drawCorner,\n textLabel: drawRect,\n flowGroup: drawFlowGroup,\n geometryGroup: drawGeometryGroup,\n shapeSvg: drawRoundRect,\n};\n"],"mappings":"AAaA,SAAS,EAAU,GAA2B,GAA2C;AACvF,MAAI,GAAC,KAAS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