@carandesign/drawui 0.2.1 → 0.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/CHANGELOG.md +6 -0
- package/README.md +1 -0
- package/dist/drawui.cjs.js +3 -3
- package/dist/drawui.es.js +250 -224
- package/package.json +4 -2
package/dist/drawui.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import st, { createContext as nt, useContext as rt, useRef as
|
|
2
|
-
var ce = { exports: {} },
|
|
1
|
+
import st, { createContext as nt, useContext as rt, useRef as O, useState as Y, useEffect as R } from "react";
|
|
2
|
+
var ce = { exports: {} }, Z = {};
|
|
3
3
|
var je;
|
|
4
4
|
function ot() {
|
|
5
|
-
if (je) return
|
|
5
|
+
if (je) return Z;
|
|
6
6
|
je = 1;
|
|
7
7
|
var o = /* @__PURE__ */ Symbol.for("react.transitional.element"), e = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
8
8
|
function s(t, n, r) {
|
|
@@ -20,9 +20,9 @@ function ot() {
|
|
|
20
20
|
props: r
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
return
|
|
23
|
+
return Z.Fragment = e, Z.jsx = s, Z.jsxs = s, Z;
|
|
24
24
|
}
|
|
25
|
-
var
|
|
25
|
+
var X = {};
|
|
26
26
|
var $e;
|
|
27
27
|
function at() {
|
|
28
28
|
return $e || ($e = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
@@ -51,19 +51,19 @@ function at() {
|
|
|
51
51
|
), p.$$typeof) {
|
|
52
52
|
case m:
|
|
53
53
|
return "Portal";
|
|
54
|
-
case
|
|
54
|
+
case z:
|
|
55
55
|
return p.displayName || "Context";
|
|
56
|
-
case
|
|
56
|
+
case C:
|
|
57
57
|
return (p._context.displayName || "Context") + ".Consumer";
|
|
58
|
-
case
|
|
59
|
-
var
|
|
60
|
-
return p = p.displayName, p || (p =
|
|
58
|
+
case N:
|
|
59
|
+
var w = p.render;
|
|
60
|
+
return p = p.displayName, p || (p = w.displayName || w.name || "", p = p !== "" ? "ForwardRef(" + p + ")" : "ForwardRef"), p;
|
|
61
61
|
case se:
|
|
62
|
-
return
|
|
63
|
-
case
|
|
64
|
-
|
|
62
|
+
return w = p.displayName || null, w !== null ? w : o(p.type) || "Memo";
|
|
63
|
+
case D:
|
|
64
|
+
w = p._payload, p = p._init;
|
|
65
65
|
try {
|
|
66
|
-
return o(p(
|
|
66
|
+
return o(p(w));
|
|
67
67
|
} catch {
|
|
68
68
|
}
|
|
69
69
|
}
|
|
@@ -75,15 +75,15 @@ function at() {
|
|
|
75
75
|
function s(p) {
|
|
76
76
|
try {
|
|
77
77
|
e(p);
|
|
78
|
-
var
|
|
78
|
+
var w = !1;
|
|
79
79
|
} catch {
|
|
80
|
-
|
|
80
|
+
w = !0;
|
|
81
81
|
}
|
|
82
|
-
if (
|
|
83
|
-
|
|
84
|
-
var _ =
|
|
82
|
+
if (w) {
|
|
83
|
+
w = console;
|
|
84
|
+
var _ = w.error, P = typeof Symbol == "function" && Symbol.toStringTag && p[Symbol.toStringTag] || p.constructor.name || "Object";
|
|
85
85
|
return _.call(
|
|
86
|
-
|
|
86
|
+
w,
|
|
87
87
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
88
88
|
P
|
|
89
89
|
), e(p);
|
|
@@ -91,11 +91,11 @@ function at() {
|
|
|
91
91
|
}
|
|
92
92
|
function t(p) {
|
|
93
93
|
if (p === b) return "<>";
|
|
94
|
-
if (typeof p == "object" && p !== null && p.$$typeof ===
|
|
94
|
+
if (typeof p == "object" && p !== null && p.$$typeof === D)
|
|
95
95
|
return "<...>";
|
|
96
96
|
try {
|
|
97
|
-
var
|
|
98
|
-
return
|
|
97
|
+
var w = o(p);
|
|
98
|
+
return w ? "<" + w + ">" : "<...>";
|
|
99
99
|
} catch {
|
|
100
100
|
return "<...>";
|
|
101
101
|
}
|
|
@@ -109,16 +109,16 @@ function at() {
|
|
|
109
109
|
}
|
|
110
110
|
function i(p) {
|
|
111
111
|
if (S.call(p, "key")) {
|
|
112
|
-
var
|
|
113
|
-
if (
|
|
112
|
+
var w = Object.getOwnPropertyDescriptor(p, "key").get;
|
|
113
|
+
if (w && w.isReactWarning) return !1;
|
|
114
114
|
}
|
|
115
115
|
return p.key !== void 0;
|
|
116
116
|
}
|
|
117
|
-
function a(p,
|
|
117
|
+
function a(p, w) {
|
|
118
118
|
function _() {
|
|
119
|
-
|
|
119
|
+
I || (I = !0, console.error(
|
|
120
120
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
121
|
-
|
|
121
|
+
w
|
|
122
122
|
));
|
|
123
123
|
}
|
|
124
124
|
_.isReactWarning = !0, Object.defineProperty(p, "key", {
|
|
@@ -132,12 +132,12 @@ function at() {
|
|
|
132
132
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
133
133
|
)), p = this.props.ref, p !== void 0 ? p : null;
|
|
134
134
|
}
|
|
135
|
-
function u(p,
|
|
135
|
+
function u(p, w, _, P, ie, Me) {
|
|
136
136
|
var T = _.ref;
|
|
137
137
|
return p = {
|
|
138
138
|
$$typeof: g,
|
|
139
139
|
type: p,
|
|
140
|
-
key:
|
|
140
|
+
key: w,
|
|
141
141
|
props: _,
|
|
142
142
|
_owner: P
|
|
143
143
|
}, (T !== void 0 ? T : null) !== null ? Object.defineProperty(p, "ref", {
|
|
@@ -162,14 +162,14 @@ function at() {
|
|
|
162
162
|
configurable: !1,
|
|
163
163
|
enumerable: !1,
|
|
164
164
|
writable: !0,
|
|
165
|
-
value:
|
|
165
|
+
value: Me
|
|
166
166
|
}), Object.freeze && (Object.freeze(p.props), Object.freeze(p)), p;
|
|
167
167
|
}
|
|
168
|
-
function l(p,
|
|
169
|
-
var T =
|
|
168
|
+
function l(p, w, _, P, ie, Me) {
|
|
169
|
+
var T = w.children;
|
|
170
170
|
if (T !== void 0)
|
|
171
171
|
if (P)
|
|
172
|
-
if (
|
|
172
|
+
if ($(T)) {
|
|
173
173
|
for (P = 0; P < T.length; P++)
|
|
174
174
|
h(T[P]);
|
|
175
175
|
Object.freeze && Object.freeze(T);
|
|
@@ -178,12 +178,12 @@ function at() {
|
|
|
178
178
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
179
179
|
);
|
|
180
180
|
else h(T);
|
|
181
|
-
if (S.call(
|
|
181
|
+
if (S.call(w, "key")) {
|
|
182
182
|
T = o(p);
|
|
183
|
-
var G = Object.keys(
|
|
183
|
+
var G = Object.keys(w).filter(function(tt) {
|
|
184
184
|
return tt !== "key";
|
|
185
185
|
});
|
|
186
|
-
P = 0 < G.length ? "{key: someKey, " + G.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
186
|
+
P = 0 < G.length ? "{key: someKey, " + G.join(": ..., ") + ": ...}" : "{key: someKey}", B[T + P] || (G = 0 < G.length ? "{" + G.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
187
187
|
`A props object containing a "key" prop is being spread into JSX:
|
|
188
188
|
let props = %s;
|
|
189
189
|
<%s {...props} />
|
|
@@ -194,13 +194,13 @@ React keys must be passed directly to JSX without using spread:
|
|
|
194
194
|
T,
|
|
195
195
|
G,
|
|
196
196
|
T
|
|
197
|
-
),
|
|
197
|
+
), B[T + P] = !0);
|
|
198
198
|
}
|
|
199
|
-
if (T = null, _ !== void 0 && (s(_), T = "" + _), i(
|
|
199
|
+
if (T = null, _ !== void 0 && (s(_), T = "" + _), i(w) && (s(w.key), T = "" + w.key), "key" in w) {
|
|
200
200
|
_ = {};
|
|
201
|
-
for (var ye in
|
|
202
|
-
ye !== "key" && (_[ye] =
|
|
203
|
-
} else _ =
|
|
201
|
+
for (var ye in w)
|
|
202
|
+
ye !== "key" && (_[ye] = w[ye]);
|
|
203
|
+
} else _ = w;
|
|
204
204
|
return T && a(
|
|
205
205
|
_,
|
|
206
206
|
typeof p == "function" ? p.displayName || p.name || "Unknown" : p
|
|
@@ -210,16 +210,16 @@ React keys must be passed directly to JSX without using spread:
|
|
|
210
210
|
_,
|
|
211
211
|
n(),
|
|
212
212
|
ie,
|
|
213
|
-
|
|
213
|
+
Me
|
|
214
214
|
);
|
|
215
215
|
}
|
|
216
216
|
function h(p) {
|
|
217
|
-
f(p) ? p._store && (p._store.validated = 1) : typeof p == "object" && p !== null && p.$$typeof ===
|
|
217
|
+
f(p) ? p._store && (p._store.validated = 1) : typeof p == "object" && p !== null && p.$$typeof === D && (p._payload.status === "fulfilled" ? f(p._payload.value) && p._payload.value._store && (p._payload.value._store.validated = 1) : p._store && (p._store.validated = 1));
|
|
218
218
|
}
|
|
219
219
|
function f(p) {
|
|
220
220
|
return typeof p == "object" && p !== null && p.$$typeof === g;
|
|
221
221
|
}
|
|
222
|
-
var d = st, g = /* @__PURE__ */ Symbol.for("react.transitional.element"), m = /* @__PURE__ */ Symbol.for("react.portal"), b = /* @__PURE__ */ Symbol.for("react.fragment"), v = /* @__PURE__ */ Symbol.for("react.strict_mode"), y = /* @__PURE__ */ Symbol.for("react.profiler"),
|
|
222
|
+
var d = st, g = /* @__PURE__ */ Symbol.for("react.transitional.element"), m = /* @__PURE__ */ Symbol.for("react.portal"), b = /* @__PURE__ */ Symbol.for("react.fragment"), v = /* @__PURE__ */ Symbol.for("react.strict_mode"), y = /* @__PURE__ */ Symbol.for("react.profiler"), C = /* @__PURE__ */ Symbol.for("react.consumer"), z = /* @__PURE__ */ Symbol.for("react.context"), N = /* @__PURE__ */ Symbol.for("react.forward_ref"), ee = /* @__PURE__ */ Symbol.for("react.suspense"), te = /* @__PURE__ */ Symbol.for("react.suspense_list"), se = /* @__PURE__ */ Symbol.for("react.memo"), D = /* @__PURE__ */ Symbol.for("react.lazy"), ne = /* @__PURE__ */ Symbol.for("react.activity"), re = /* @__PURE__ */ Symbol.for("react.client.reference"), x = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, S = Object.prototype.hasOwnProperty, $ = Array.isArray, W = console.createTask ? console.createTask : function() {
|
|
223
223
|
return null;
|
|
224
224
|
};
|
|
225
225
|
d = {
|
|
@@ -227,38 +227,38 @@ React keys must be passed directly to JSX without using spread:
|
|
|
227
227
|
return p();
|
|
228
228
|
}
|
|
229
229
|
};
|
|
230
|
-
var
|
|
230
|
+
var I, q = {}, oe = d.react_stack_bottom_frame.bind(
|
|
231
231
|
d,
|
|
232
232
|
r
|
|
233
|
-
)(), ae =
|
|
234
|
-
|
|
233
|
+
)(), ae = W(t(r)), B = {};
|
|
234
|
+
X.Fragment = b, X.jsx = function(p, w, _) {
|
|
235
235
|
var P = 1e4 > x.recentlyCreatedOwnerStacks++;
|
|
236
236
|
return l(
|
|
237
237
|
p,
|
|
238
|
-
|
|
238
|
+
w,
|
|
239
239
|
_,
|
|
240
240
|
!1,
|
|
241
241
|
P ? Error("react-stack-top-frame") : oe,
|
|
242
|
-
P ?
|
|
242
|
+
P ? W(t(p)) : ae
|
|
243
243
|
);
|
|
244
|
-
},
|
|
244
|
+
}, X.jsxs = function(p, w, _) {
|
|
245
245
|
var P = 1e4 > x.recentlyCreatedOwnerStacks++;
|
|
246
246
|
return l(
|
|
247
247
|
p,
|
|
248
|
-
|
|
248
|
+
w,
|
|
249
249
|
_,
|
|
250
250
|
!0,
|
|
251
251
|
P ? Error("react-stack-top-frame") : oe,
|
|
252
|
-
P ?
|
|
252
|
+
P ? W(t(p)) : ae
|
|
253
253
|
);
|
|
254
254
|
};
|
|
255
|
-
})()),
|
|
255
|
+
})()), X;
|
|
256
256
|
}
|
|
257
|
-
var
|
|
257
|
+
var ze;
|
|
258
258
|
function it() {
|
|
259
|
-
return
|
|
259
|
+
return ze || (ze = 1, process.env.NODE_ENV === "production" ? ce.exports = ot() : ce.exports = at()), ce.exports;
|
|
260
260
|
}
|
|
261
|
-
var
|
|
261
|
+
var M = it();
|
|
262
262
|
function Te(o, e, s) {
|
|
263
263
|
if (o && o.length) {
|
|
264
264
|
const [t, n] = e, r = Math.PI / 180 * s, i = Math.cos(r), a = Math.sin(r);
|
|
@@ -365,7 +365,7 @@ class Le {
|
|
|
365
365
|
return t;
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function we(o) {
|
|
369
369
|
const e = o[0], s = o[1];
|
|
370
370
|
return Math.sqrt(Math.pow(e[0] - s[0], 2) + Math.pow(e[1] - s[1], 2));
|
|
371
371
|
}
|
|
@@ -375,7 +375,7 @@ class ft extends Le {
|
|
|
375
375
|
t < 0 && (t = s.strokeWidth * 4), t = Math.max(t, 0.1);
|
|
376
376
|
const n = Object.assign({}, s, { hachureGap: t }), r = J(e, n), i = Math.PI / 180 * s.hachureAngle, a = [], c = t * 0.5 * Math.cos(i), u = t * 0.5 * Math.sin(i);
|
|
377
377
|
for (const [h, f] of r)
|
|
378
|
-
|
|
378
|
+
we([h, f]) && a.push([
|
|
379
379
|
[h[0] - c, h[1] + u],
|
|
380
380
|
[...f]
|
|
381
381
|
], [
|
|
@@ -408,7 +408,7 @@ class pt {
|
|
|
408
408
|
r < 0 && (r = s.strokeWidth / 2);
|
|
409
409
|
const i = n / 4;
|
|
410
410
|
for (const a of e) {
|
|
411
|
-
const c =
|
|
411
|
+
const c = we(a), u = c / n, l = Math.ceil(u) - 1, h = c - l * n, f = (a[0][0] + a[1][0]) / 2 - n / 4, d = Math.min(a[0][1], a[1][1]);
|
|
412
412
|
for (let g = 0; g < l; g++) {
|
|
413
413
|
const m = d + h + g * n, b = f - i + Math.random() * 2 * i, v = m - i + Math.random() * 2 * i, y = this.helper.ellipse(b, v, r, r, s);
|
|
414
414
|
t.push(...y.ops);
|
|
@@ -428,7 +428,7 @@ class gt {
|
|
|
428
428
|
dashedLine(e, s) {
|
|
429
429
|
const t = s.dashOffset < 0 ? s.hachureGap < 0 ? s.strokeWidth * 4 : s.hachureGap : s.dashOffset, n = s.dashGap < 0 ? s.hachureGap < 0 ? s.strokeWidth * 4 : s.hachureGap : s.dashGap, r = [];
|
|
430
430
|
return e.forEach((i) => {
|
|
431
|
-
const a =
|
|
431
|
+
const a = we(i), c = Math.floor(a / (t + n)), u = (a + n - c * (t + n)) / 2;
|
|
432
432
|
let l = i[0], h = i[1];
|
|
433
433
|
l[0] > h[0] && (l = i[1], h = i[0]);
|
|
434
434
|
const f = Math.atan((h[1] - l[1]) / (h[0] - l[0]));
|
|
@@ -452,7 +452,7 @@ class mt {
|
|
|
452
452
|
zigzagLines(e, s, t) {
|
|
453
453
|
const n = [];
|
|
454
454
|
return e.forEach((r) => {
|
|
455
|
-
const i =
|
|
455
|
+
const i = we(r), a = Math.round(i / (2 * s));
|
|
456
456
|
let c = r[0], u = r[1];
|
|
457
457
|
c[0] > u[0] && (c = r[1], u = r[0]);
|
|
458
458
|
const l = Math.atan((u[1] - c[1]) / (u[0] - c[0]));
|
|
@@ -463,31 +463,31 @@ class mt {
|
|
|
463
463
|
}), n;
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
const
|
|
466
|
+
const E = {};
|
|
467
467
|
function kt(o, e) {
|
|
468
468
|
let s = o.fillStyle || "hachure";
|
|
469
|
-
if (!
|
|
469
|
+
if (!E[s])
|
|
470
470
|
switch (s) {
|
|
471
471
|
case "zigzag":
|
|
472
|
-
|
|
472
|
+
E[s] || (E[s] = new ft(e));
|
|
473
473
|
break;
|
|
474
474
|
case "cross-hatch":
|
|
475
|
-
|
|
475
|
+
E[s] || (E[s] = new dt(e));
|
|
476
476
|
break;
|
|
477
477
|
case "dots":
|
|
478
|
-
|
|
478
|
+
E[s] || (E[s] = new pt(e));
|
|
479
479
|
break;
|
|
480
480
|
case "dashed":
|
|
481
|
-
|
|
481
|
+
E[s] || (E[s] = new gt(e));
|
|
482
482
|
break;
|
|
483
483
|
case "zigzag-line":
|
|
484
|
-
|
|
484
|
+
E[s] || (E[s] = new mt(e));
|
|
485
485
|
break;
|
|
486
486
|
default:
|
|
487
|
-
s = "hachure",
|
|
487
|
+
s = "hachure", E[s] || (E[s] = new Le(e));
|
|
488
488
|
break;
|
|
489
489
|
}
|
|
490
|
-
return
|
|
490
|
+
return E[s];
|
|
491
491
|
}
|
|
492
492
|
function bt() {
|
|
493
493
|
return Math.floor(Math.random() * 2 ** 31);
|
|
@@ -500,14 +500,14 @@ class vt {
|
|
|
500
500
|
return this.seed ? (2 ** 31 - 1 & (this.seed = Math.imul(48271, this.seed))) / 2 ** 31 : Math.random();
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
|
-
const
|
|
504
|
-
function
|
|
503
|
+
const wt = 0, xe = 1, Be = 2, le = { A: 7, a: 7, C: 6, c: 6, H: 1, h: 1, L: 2, l: 2, M: 2, m: 2, Q: 4, q: 4, S: 4, s: 4, T: 2, t: 2, V: 1, v: 1, Z: 0, z: 0 };
|
|
504
|
+
function Mt(o) {
|
|
505
505
|
const e = new Array();
|
|
506
506
|
for (; o !== ""; )
|
|
507
507
|
if (o.match(/^([ \t\r\n,]+)/))
|
|
508
508
|
o = o.substr(RegExp.$1.length);
|
|
509
509
|
else if (o.match(/^([aAcChHlLmMqQsStTvVzZ])/))
|
|
510
|
-
e[e.length] = { type:
|
|
510
|
+
e[e.length] = { type: wt, text: RegExp.$1 }, o = o.substr(RegExp.$1.length);
|
|
511
511
|
else if (o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))
|
|
512
512
|
e[e.length] = { type: xe, text: `${parseFloat(RegExp.$1)}` }, o = o.substr(RegExp.$1.length);
|
|
513
513
|
else
|
|
@@ -518,7 +518,7 @@ function _e(o, e) {
|
|
|
518
518
|
return o.type === e;
|
|
519
519
|
}
|
|
520
520
|
function Ae(o) {
|
|
521
|
-
const e = [], s =
|
|
521
|
+
const e = [], s = Mt(o);
|
|
522
522
|
let t = "BOD", n = 0, r = s[n];
|
|
523
523
|
for (; !_e(r, Be); ) {
|
|
524
524
|
let i = 0;
|
|
@@ -659,8 +659,8 @@ function Xe(o) {
|
|
|
659
659
|
}
|
|
660
660
|
case "A": {
|
|
661
661
|
const h = Math.abs(l[0]), f = Math.abs(l[1]), d = l[2], g = l[3], m = l[4], b = l[5], v = l[6];
|
|
662
|
-
h === 0 || f === 0 ? (e.push({ key: "C", data: [t, n, b, v, b, v] }), t = b, n = v) : (t !== b || n !== v) && (Ue(t, n, b, v, h, f, d, g, m).forEach(function(
|
|
663
|
-
e.push({ key: "C", data:
|
|
662
|
+
h === 0 || f === 0 ? (e.push({ key: "C", data: [t, n, b, v, b, v] }), t = b, n = v) : (t !== b || n !== v) && (Ue(t, n, b, v, h, f, d, g, m).forEach(function(C) {
|
|
663
|
+
e.push({ key: "C", data: C });
|
|
664
664
|
}), t = b, n = v);
|
|
665
665
|
break;
|
|
666
666
|
}
|
|
@@ -675,7 +675,7 @@ function Xe(o) {
|
|
|
675
675
|
function yt(o) {
|
|
676
676
|
return Math.PI * o / 180;
|
|
677
677
|
}
|
|
678
|
-
function
|
|
678
|
+
function U(o, e, s) {
|
|
679
679
|
const t = o * Math.cos(s) - e * Math.sin(s), n = o * Math.sin(s) + e * Math.cos(s);
|
|
680
680
|
return [t, n];
|
|
681
681
|
}
|
|
@@ -685,28 +685,28 @@ function Ue(o, e, s, t, n, r, i, a, c, u) {
|
|
|
685
685
|
if (u)
|
|
686
686
|
[f, d, g, m] = u;
|
|
687
687
|
else {
|
|
688
|
-
[o, e] =
|
|
688
|
+
[o, e] = U(o, e, -l), [s, t] = U(s, t, -l);
|
|
689
689
|
const x = (o - s) / 2, S = (e - t) / 2;
|
|
690
|
-
let
|
|
691
|
-
|
|
692
|
-
const
|
|
693
|
-
g =
|
|
690
|
+
let $ = x * x / (n * n) + S * S / (r * r);
|
|
691
|
+
$ > 1 && ($ = Math.sqrt($), n = $ * n, r = $ * r);
|
|
692
|
+
const W = a === c ? -1 : 1, I = n * n, q = r * r, oe = I * q - I * S * S - q * x * x, ae = I * S * S + q * x * x, B = W * Math.sqrt(Math.abs(oe / ae));
|
|
693
|
+
g = B * n * S / r + (o + s) / 2, m = B * -r * x / n + (e + t) / 2, f = Math.asin(parseFloat(((e - m) / r).toFixed(9))), d = Math.asin(parseFloat(((t - m) / r).toFixed(9))), o < g && (f = Math.PI - f), s < g && (d = Math.PI - d), f < 0 && (f = Math.PI * 2 + f), d < 0 && (d = Math.PI * 2 + d), c && f > d && (f = f - Math.PI * 2), !c && d > f && (d = d - Math.PI * 2);
|
|
694
694
|
}
|
|
695
695
|
let b = d - f;
|
|
696
696
|
if (Math.abs(b) > Math.PI * 120 / 180) {
|
|
697
|
-
const x = d, S = s,
|
|
698
|
-
c && d > f ? d = f + Math.PI * 120 / 180 * 1 : d = f + Math.PI * 120 / 180 * -1, s = g + n * Math.cos(d), t = m + r * Math.sin(d), h = Ue(s, t, S,
|
|
697
|
+
const x = d, S = s, $ = t;
|
|
698
|
+
c && d > f ? d = f + Math.PI * 120 / 180 * 1 : d = f + Math.PI * 120 / 180 * -1, s = g + n * Math.cos(d), t = m + r * Math.sin(d), h = Ue(s, t, S, $, n, r, i, 0, c, [d, x, g, m]);
|
|
699
699
|
}
|
|
700
700
|
b = d - f;
|
|
701
|
-
const v = Math.cos(f), y = Math.sin(f),
|
|
702
|
-
if (
|
|
703
|
-
return [
|
|
701
|
+
const v = Math.cos(f), y = Math.sin(f), C = Math.cos(d), z = Math.sin(d), N = Math.tan(b / 4), ee = 4 / 3 * n * N, te = 4 / 3 * r * N, se = [o, e], D = [o + ee * y, e - te * v], ne = [s + ee * z, t - te * C], re = [s, t];
|
|
702
|
+
if (D[0] = 2 * se[0] - D[0], D[1] = 2 * se[1] - D[1], u)
|
|
703
|
+
return [D, ne, re].concat(h);
|
|
704
704
|
{
|
|
705
|
-
h = [
|
|
705
|
+
h = [D, ne, re].concat(h);
|
|
706
706
|
const x = [];
|
|
707
707
|
for (let S = 0; S < h.length; S += 3) {
|
|
708
|
-
const
|
|
709
|
-
x.push([
|
|
708
|
+
const $ = U(h[S][0], h[S][1], l), W = U(h[S + 1][0], h[S + 1][1], l), I = U(h[S + 2][0], h[S + 2][1], l);
|
|
709
|
+
x.push([$[0], $[1], W[0], W[1], I[0], I[1]]);
|
|
710
710
|
}
|
|
711
711
|
return x;
|
|
712
712
|
}
|
|
@@ -718,15 +718,15 @@ const _t = {
|
|
|
718
718
|
doubleLineOps: Rt
|
|
719
719
|
};
|
|
720
720
|
function Qe(o, e, s, t, n) {
|
|
721
|
-
return { type: "path", ops:
|
|
721
|
+
return { type: "path", ops: H(o, e, s, t, n) };
|
|
722
722
|
}
|
|
723
723
|
function de(o, e, s) {
|
|
724
724
|
const t = (o || []).length;
|
|
725
725
|
if (t > 2) {
|
|
726
726
|
const n = [];
|
|
727
727
|
for (let r = 0; r < t - 1; r++)
|
|
728
|
-
n.push(...
|
|
729
|
-
return e && n.push(...
|
|
728
|
+
n.push(...H(o[r][0], o[r][1], o[r + 1][0], o[r + 1][1], s));
|
|
729
|
+
return e && n.push(...H(o[t - 1][0], o[t - 1][1], o[0][0], o[0][1], s)), { type: "path", ops: n };
|
|
730
730
|
} else if (t === 2)
|
|
731
731
|
return Qe(o[0][0], o[0][1], o[1][0], o[1][1], s);
|
|
732
732
|
return { type: "path", ops: [] };
|
|
@@ -743,7 +743,7 @@ function Pt(o, e, s, t, n) {
|
|
|
743
743
|
];
|
|
744
744
|
return St(r, n);
|
|
745
745
|
}
|
|
746
|
-
function
|
|
746
|
+
function De(o, e) {
|
|
747
747
|
if (o.length) {
|
|
748
748
|
const t = typeof o[0][0] == "number" ? [o] : o, n = ue(t[0], 1 * (1 + e.roughness * 0.2), e), r = e.disableMultiStroke ? [] : ue(t[0], 1.5 * (1 + e.roughness * 0.22), We(e));
|
|
749
749
|
for (let i = 1; i < t.length; i++) {
|
|
@@ -771,10 +771,10 @@ function Je(o, e, s) {
|
|
|
771
771
|
return i += k(i * c, s), a += k(a * c, s), { increment: r, rx: i, ry: a };
|
|
772
772
|
}
|
|
773
773
|
function Oe(o, e, s, t) {
|
|
774
|
-
const [n, r] =
|
|
774
|
+
const [n, r] = He(t.increment, o, e, t.rx, t.ry, 1, t.increment * me(0.1, me(0.4, 1, s), s), s);
|
|
775
775
|
let i = ke(n, null, s);
|
|
776
776
|
if (!s.disableMultiStroke && s.roughness !== 0) {
|
|
777
|
-
const [a] =
|
|
777
|
+
const [a] = He(t.increment, o, e, t.rx, t.ry, 1.5, 0, s), c = ke(a, null, s);
|
|
778
778
|
i = i.concat(c);
|
|
779
779
|
}
|
|
780
780
|
return {
|
|
@@ -790,12 +790,12 @@ function Ie(o, e, s, t, n, r, i, a, c) {
|
|
|
790
790
|
for (; d < 0; )
|
|
791
791
|
d += Math.PI * 2, g += Math.PI * 2;
|
|
792
792
|
g - d > Math.PI * 2 && (d = 0, g = Math.PI * 2);
|
|
793
|
-
const m = Math.PI * 2 / c.curveStepCount, b = Math.min(m / 2, (g - d) / 2), v =
|
|
793
|
+
const m = Math.PI * 2 / c.curveStepCount, b = Math.min(m / 2, (g - d) / 2), v = Fe(b, u, l, h, f, d, g, 1, c);
|
|
794
794
|
if (!c.disableMultiStroke) {
|
|
795
|
-
const y =
|
|
795
|
+
const y = Fe(b, u, l, h, f, d, g, 1.5, c);
|
|
796
796
|
v.push(...y);
|
|
797
797
|
}
|
|
798
|
-
return i && (a ? v.push(...
|
|
798
|
+
return i && (a ? v.push(...H(u, l, u + h * Math.cos(d), l + f * Math.sin(d), c), ...H(u, l, u + h * Math.cos(g), l + f * Math.sin(g), c)) : v.push({ op: "lineTo", data: [u, l] }, { op: "lineTo", data: [u + h * Math.cos(d), l + f * Math.sin(d)] })), { type: "path", ops: v };
|
|
799
799
|
}
|
|
800
800
|
function Ne(o, e) {
|
|
801
801
|
const s = Xe(Ze(Ae(o))), t = [];
|
|
@@ -807,7 +807,7 @@ function Ne(o, e) {
|
|
|
807
807
|
break;
|
|
808
808
|
}
|
|
809
809
|
case "L":
|
|
810
|
-
t.push(...
|
|
810
|
+
t.push(...H(r[0], r[1], a[0], a[1], e)), r = [a[0], a[1]];
|
|
811
811
|
break;
|
|
812
812
|
case "C": {
|
|
813
813
|
const [c, u, l, h, f, d] = a;
|
|
@@ -815,7 +815,7 @@ function Ne(o, e) {
|
|
|
815
815
|
break;
|
|
816
816
|
}
|
|
817
817
|
case "Z":
|
|
818
|
-
t.push(...
|
|
818
|
+
t.push(...H(r[0], r[1], n[0], n[1], e)), r = [n[0], n[1]];
|
|
819
819
|
break;
|
|
820
820
|
}
|
|
821
821
|
return { type: "path", ops: t };
|
|
@@ -856,7 +856,7 @@ function Et(o, e, s) {
|
|
|
856
856
|
return me(o, e, s);
|
|
857
857
|
}
|
|
858
858
|
function Rt(o, e, s, t, n) {
|
|
859
|
-
return
|
|
859
|
+
return H(o, e, s, t, n, !0);
|
|
860
860
|
}
|
|
861
861
|
function We(o) {
|
|
862
862
|
const e = Object.assign({}, o);
|
|
@@ -871,7 +871,7 @@ function me(o, e, s, t = 1) {
|
|
|
871
871
|
function k(o, e, s = 1) {
|
|
872
872
|
return me(-o, o, e, s);
|
|
873
873
|
}
|
|
874
|
-
function
|
|
874
|
+
function H(o, e, s, t, n, r = !1) {
|
|
875
875
|
const i = r ? n.disableMultiStrokeFill : n.disableMultiStroke, a = Ee(o, e, s, t, n, !0, !1);
|
|
876
876
|
if (i)
|
|
877
877
|
return a;
|
|
@@ -965,7 +965,7 @@ function ke(o, e, s) {
|
|
|
965
965
|
})) : t === 2 && n.push(...Ee(o[0][0], o[0][1], o[1][0], o[1][1], s, !0, !0));
|
|
966
966
|
return n;
|
|
967
967
|
}
|
|
968
|
-
function
|
|
968
|
+
function He(o, e, s, t, n, r, i, a) {
|
|
969
969
|
const c = a.roughness === 0, u = [], l = [];
|
|
970
970
|
if (c) {
|
|
971
971
|
o = o / 4, l.push([
|
|
@@ -1013,7 +1013,7 @@ function Fe(o, e, s, t, n, r, i, a) {
|
|
|
1013
1013
|
}
|
|
1014
1014
|
return [l, u];
|
|
1015
1015
|
}
|
|
1016
|
-
function
|
|
1016
|
+
function Fe(o, e, s, t, n, r, i, a, c) {
|
|
1017
1017
|
const u = r + k(0.1, c), l = [];
|
|
1018
1018
|
l.push([
|
|
1019
1019
|
k(a, c) + e + 0.9 * t * Math.cos(u - o),
|
|
@@ -1050,7 +1050,7 @@ function Ct(o, e, s, t, n, r, i, a) {
|
|
|
1050
1050
|
});
|
|
1051
1051
|
return c;
|
|
1052
1052
|
}
|
|
1053
|
-
function
|
|
1053
|
+
function Q(o) {
|
|
1054
1054
|
return [...o];
|
|
1055
1055
|
}
|
|
1056
1056
|
function qe(o, e = 0) {
|
|
@@ -1059,14 +1059,14 @@ function qe(o, e = 0) {
|
|
|
1059
1059
|
throw new Error("A curve must have at least three points.");
|
|
1060
1060
|
const t = [];
|
|
1061
1061
|
if (s === 3)
|
|
1062
|
-
t.push(
|
|
1062
|
+
t.push(Q(o[0]), Q(o[1]), Q(o[2]), Q(o[2]));
|
|
1063
1063
|
else {
|
|
1064
1064
|
const n = [];
|
|
1065
1065
|
n.push(o[0], o[0]);
|
|
1066
1066
|
for (let a = 1; a < o.length; a++)
|
|
1067
1067
|
n.push(o[a]), a === o.length - 1 && n.push(o[a]);
|
|
1068
1068
|
const r = [], i = 1 - e;
|
|
1069
|
-
t.push(
|
|
1069
|
+
t.push(Q(n[0]));
|
|
1070
1070
|
for (let a = 1; a + 2 < n.length; a++) {
|
|
1071
1071
|
const c = n[a];
|
|
1072
1072
|
r[0] = [c[0], c[1]], r[1] = [c[0] + (i * n[a + 1][0] - i * n[a - 1][0]) / 6, c[1] + (i * n[a + 1][1] - i * n[a - 1][1]) / 6], r[2] = [n[a + 1][0] + (i * n[a][0] - i * n[a + 2][0]) / 6, n[a + 1][1] + (i * n[a][1] - i * n[a + 2][1]) / 6], r[3] = [n[a + 1][0], n[a + 1][1]], t.push(r[1], r[2], r[3]);
|
|
@@ -1085,9 +1085,9 @@ function At(o, e, s) {
|
|
|
1085
1085
|
if (t === 0)
|
|
1086
1086
|
return pe(o, e);
|
|
1087
1087
|
let n = ((o[0] - e[0]) * (s[0] - e[0]) + (o[1] - e[1]) * (s[1] - e[1])) / t;
|
|
1088
|
-
return n = Math.max(0, Math.min(1, n)), pe(o,
|
|
1088
|
+
return n = Math.max(0, Math.min(1, n)), pe(o, F(e, s, n));
|
|
1089
1089
|
}
|
|
1090
|
-
function
|
|
1090
|
+
function F(o, e, s) {
|
|
1091
1091
|
return [
|
|
1092
1092
|
o[0] + (e[0] - o[0]) * s,
|
|
1093
1093
|
o[1] + (e[1] - o[1]) * s
|
|
@@ -1110,7 +1110,7 @@ function Re(o, e, s, t) {
|
|
|
1110
1110
|
const r = o[e + 0];
|
|
1111
1111
|
n.length ? Lt(n[n.length - 1], r) > 1 && n.push(r) : n.push(r), n.push(o[e + 3]);
|
|
1112
1112
|
} else {
|
|
1113
|
-
const i = o[e + 0], a = o[e + 1], c = o[e + 2], u = o[e + 3], l =
|
|
1113
|
+
const i = o[e + 0], a = o[e + 1], c = o[e + 2], u = o[e + 3], l = F(i, a, 0.5), h = F(a, c, 0.5), f = F(c, u, 0.5), d = F(l, h, 0.5), g = F(h, f, 0.5), m = F(d, g, 0.5);
|
|
1114
1114
|
Re([i, l, d, m], 0, s, n), Re([m, g, f, u], 0, s, n);
|
|
1115
1115
|
}
|
|
1116
1116
|
return n;
|
|
@@ -1135,7 +1135,7 @@ function Ce(o, e = 0.15, s) {
|
|
|
1135
1135
|
}
|
|
1136
1136
|
return s && s > 0 ? be(t, 0, t.length, s) : t;
|
|
1137
1137
|
}
|
|
1138
|
-
function
|
|
1138
|
+
function zt(o, e, s) {
|
|
1139
1139
|
const t = Ae(o), n = Xe(Ze(t)), r = [];
|
|
1140
1140
|
let i = [], a = [0, 0], c = [];
|
|
1141
1141
|
const u = () => {
|
|
@@ -1171,7 +1171,7 @@ function Dt(o, e, s) {
|
|
|
1171
1171
|
}
|
|
1172
1172
|
return h;
|
|
1173
1173
|
}
|
|
1174
|
-
const
|
|
1174
|
+
const L = "none";
|
|
1175
1175
|
class ve {
|
|
1176
1176
|
constructor(e) {
|
|
1177
1177
|
this.defaultOptions = {
|
|
@@ -1216,7 +1216,7 @@ class ve {
|
|
|
1216
1216
|
const u = [[e, s], [e + t, s], [e + t, s + n], [e, s + n]];
|
|
1217
1217
|
i.fillStyle === "solid" ? a.push(Se([u], i)) : a.push(V([u], i));
|
|
1218
1218
|
}
|
|
1219
|
-
return i.stroke !==
|
|
1219
|
+
return i.stroke !== L && a.push(c), this._d("rectangle", a, i);
|
|
1220
1220
|
}
|
|
1221
1221
|
ellipse(e, s, t, n, r) {
|
|
1222
1222
|
const i = this._o(r), a = [], c = Je(t, n, i), u = Oe(e, s, i, c);
|
|
@@ -1226,7 +1226,7 @@ class ve {
|
|
|
1226
1226
|
l.type = "fillPath", a.push(l);
|
|
1227
1227
|
} else
|
|
1228
1228
|
a.push(V([u.estimatedPoints], i));
|
|
1229
|
-
return i.stroke !==
|
|
1229
|
+
return i.stroke !== L && a.push(u.opset), this._d("ellipse", a, i);
|
|
1230
1230
|
}
|
|
1231
1231
|
circle(e, s, t, n) {
|
|
1232
1232
|
const r = this.ellipse(e, s, t, t, n);
|
|
@@ -1246,13 +1246,13 @@ class ve {
|
|
|
1246
1246
|
d.type = "fillPath", l.push(d);
|
|
1247
1247
|
} else
|
|
1248
1248
|
l.push(xt(e, s, t, n, r, i, u));
|
|
1249
|
-
return u.stroke !==
|
|
1249
|
+
return u.stroke !== L && l.push(h), this._d("arc", l, u);
|
|
1250
1250
|
}
|
|
1251
1251
|
curve(e, s) {
|
|
1252
|
-
const t = this._o(s), n = [], r =
|
|
1253
|
-
if (t.fill && t.fill !==
|
|
1252
|
+
const t = this._o(s), n = [], r = De(e, t);
|
|
1253
|
+
if (t.fill && t.fill !== L)
|
|
1254
1254
|
if (t.fillStyle === "solid") {
|
|
1255
|
-
const i =
|
|
1255
|
+
const i = De(e, Object.assign(Object.assign({}, t), { disableMultiStroke: !0, roughness: t.roughness ? t.roughness + t.fillShapeRoughnessGain : 0 }));
|
|
1256
1256
|
n.push({
|
|
1257
1257
|
type: "fillPath",
|
|
1258
1258
|
ops: this._mergedShape(i.ops)
|
|
@@ -1271,18 +1271,18 @@ class ve {
|
|
|
1271
1271
|
}
|
|
1272
1272
|
i.length && n.push(V([i], t));
|
|
1273
1273
|
}
|
|
1274
|
-
return t.stroke !==
|
|
1274
|
+
return t.stroke !== L && n.push(r), this._d("curve", n, t);
|
|
1275
1275
|
}
|
|
1276
1276
|
polygon(e, s) {
|
|
1277
1277
|
const t = this._o(s), n = [], r = de(e, !0, t);
|
|
1278
|
-
return t.fill && (t.fillStyle === "solid" ? n.push(Se([e], t)) : n.push(V([e], t))), t.stroke !==
|
|
1278
|
+
return t.fill && (t.fillStyle === "solid" ? n.push(Se([e], t)) : n.push(V([e], t))), t.stroke !== L && n.push(r), this._d("polygon", n, t);
|
|
1279
1279
|
}
|
|
1280
1280
|
path(e, s) {
|
|
1281
1281
|
const t = this._o(s), n = [];
|
|
1282
1282
|
if (!e)
|
|
1283
1283
|
return this._d("path", n, t);
|
|
1284
1284
|
e = (e || "").replace(/\n/g, " ").replace(/(-\s)/g, "-").replace("/(ss)/g", " ");
|
|
1285
|
-
const r = t.fill && t.fill !== "transparent" && t.fill !==
|
|
1285
|
+
const r = t.fill && t.fill !== "transparent" && t.fill !== L, i = t.stroke !== L, a = !!(t.simplification && t.simplification < 1), c = a ? 4 - 4 * (t.simplification || 1) : (1 + t.roughness) / 2, u = zt(e, 1, c), l = Ne(e, t);
|
|
1286
1286
|
if (r)
|
|
1287
1287
|
if (t.fillStyle === "solid")
|
|
1288
1288
|
if (u.length === 1) {
|
|
@@ -1327,15 +1327,15 @@ class ve {
|
|
|
1327
1327
|
d: this.opsToPath(r),
|
|
1328
1328
|
stroke: t.stroke,
|
|
1329
1329
|
strokeWidth: t.strokeWidth,
|
|
1330
|
-
fill:
|
|
1330
|
+
fill: L
|
|
1331
1331
|
};
|
|
1332
1332
|
break;
|
|
1333
1333
|
case "fillPath":
|
|
1334
1334
|
i = {
|
|
1335
1335
|
d: this.opsToPath(r),
|
|
1336
|
-
stroke:
|
|
1336
|
+
stroke: L,
|
|
1337
1337
|
strokeWidth: 0,
|
|
1338
|
-
fill: t.fill ||
|
|
1338
|
+
fill: t.fill || L
|
|
1339
1339
|
};
|
|
1340
1340
|
break;
|
|
1341
1341
|
case "fillSketch":
|
|
@@ -1350,16 +1350,16 @@ class ve {
|
|
|
1350
1350
|
let t = s.fillWeight;
|
|
1351
1351
|
return t < 0 && (t = s.strokeWidth / 2), {
|
|
1352
1352
|
d: this.opsToPath(e),
|
|
1353
|
-
stroke: s.fill ||
|
|
1353
|
+
stroke: s.fill || L,
|
|
1354
1354
|
strokeWidth: t,
|
|
1355
|
-
fill:
|
|
1355
|
+
fill: L
|
|
1356
1356
|
};
|
|
1357
1357
|
}
|
|
1358
1358
|
_mergedShape(e) {
|
|
1359
1359
|
return e.filter((s, t) => t === 0 ? !0 : s.op !== "move");
|
|
1360
1360
|
}
|
|
1361
1361
|
}
|
|
1362
|
-
class
|
|
1362
|
+
class Dt {
|
|
1363
1363
|
constructor(e, s) {
|
|
1364
1364
|
this.canvas = e, this.ctx = this.canvas.getContext("2d"), this.gen = new ve(s);
|
|
1365
1365
|
}
|
|
@@ -1525,9 +1525,9 @@ class It {
|
|
|
1525
1525
|
return this.draw(t);
|
|
1526
1526
|
}
|
|
1527
1527
|
}
|
|
1528
|
-
const
|
|
1528
|
+
const A = {
|
|
1529
1529
|
canvas(o, e) {
|
|
1530
|
-
return new
|
|
1530
|
+
return new Dt(o, e);
|
|
1531
1531
|
},
|
|
1532
1532
|
svg(o, e) {
|
|
1533
1533
|
return new It(o, e);
|
|
@@ -1635,8 +1635,8 @@ const L = {
|
|
|
1635
1635
|
...o?.radius
|
|
1636
1636
|
}
|
|
1637
1637
|
};
|
|
1638
|
-
return /* @__PURE__ */
|
|
1639
|
-
},
|
|
1638
|
+
return /* @__PURE__ */ M.jsx(et.Provider, { value: s, children: e });
|
|
1639
|
+
}, j = () => rt(et), Vt = ({
|
|
1640
1640
|
strokeWeight: o = "medium",
|
|
1641
1641
|
radius: e = "md",
|
|
1642
1642
|
size: s = "sm",
|
|
@@ -1645,10 +1645,10 @@ const L = {
|
|
|
1645
1645
|
fillStyle: r,
|
|
1646
1646
|
...i
|
|
1647
1647
|
}) => {
|
|
1648
|
-
const a =
|
|
1649
|
-
return
|
|
1648
|
+
const a = j(), c = O(null), [u, l] = Y(!1), h = a.buttonSize[s].width, f = a.buttonSize[s].height, d = a.buttonSize[s].fontSize;
|
|
1649
|
+
return R(() => {
|
|
1650
1650
|
if (!c.current) return;
|
|
1651
|
-
const g =
|
|
1651
|
+
const g = A.svg(c.current);
|
|
1652
1652
|
c.current.innerHTML = "";
|
|
1653
1653
|
const m = a.stroke[o], b = g.path(
|
|
1654
1654
|
K(0, 0, h, f, a.radius[e]),
|
|
@@ -1662,7 +1662,7 @@ const L = {
|
|
|
1662
1662
|
}
|
|
1663
1663
|
);
|
|
1664
1664
|
c.current.appendChild(b);
|
|
1665
|
-
}, [u, o, e, a]), /* @__PURE__ */
|
|
1665
|
+
}, [u, o, e, a]), /* @__PURE__ */ M.jsxs(
|
|
1666
1666
|
"button",
|
|
1667
1667
|
{
|
|
1668
1668
|
...i,
|
|
@@ -1678,7 +1678,7 @@ const L = {
|
|
|
1678
1678
|
cursor: "pointer"
|
|
1679
1679
|
},
|
|
1680
1680
|
children: [
|
|
1681
|
-
/* @__PURE__ */
|
|
1681
|
+
/* @__PURE__ */ M.jsx(
|
|
1682
1682
|
"svg",
|
|
1683
1683
|
{
|
|
1684
1684
|
ref: c,
|
|
@@ -1687,7 +1687,7 @@ const L = {
|
|
|
1687
1687
|
style: { position: "absolute", inset: 0 }
|
|
1688
1688
|
}
|
|
1689
1689
|
),
|
|
1690
|
-
/* @__PURE__ */
|
|
1690
|
+
/* @__PURE__ */ M.jsx(
|
|
1691
1691
|
"span",
|
|
1692
1692
|
{
|
|
1693
1693
|
style: {
|
|
@@ -1706,10 +1706,10 @@ const L = {
|
|
|
1706
1706
|
"drawui-card-header": "_drawui-card-header_vhoat_7",
|
|
1707
1707
|
"drawui-card-body": "_drawui-card-body_vhoat_12",
|
|
1708
1708
|
"drawui-card-footer": "_drawui-card-footer_vhoat_17"
|
|
1709
|
-
}, Wt = "_vertical_1tdom_6",
|
|
1709
|
+
}, Wt = "_vertical_1tdom_6", Ht = "_horizontal_1tdom_11", Pe = {
|
|
1710
1710
|
"drawui-divider": "_drawui-divider_1tdom_1",
|
|
1711
1711
|
vertical: Wt,
|
|
1712
|
-
horizontal:
|
|
1712
|
+
horizontal: Ht
|
|
1713
1713
|
}, Ge = ({
|
|
1714
1714
|
strokeWeight: o = "medium",
|
|
1715
1715
|
width: e = "100%",
|
|
@@ -1717,11 +1717,11 @@ const L = {
|
|
|
1717
1717
|
className: t,
|
|
1718
1718
|
fillStyle: n
|
|
1719
1719
|
}) => {
|
|
1720
|
-
const r =
|
|
1721
|
-
return
|
|
1720
|
+
const r = j(), i = O(null);
|
|
1721
|
+
return R(() => {
|
|
1722
1722
|
if (!i.current) return;
|
|
1723
1723
|
i.current.innerHTML = "";
|
|
1724
|
-
const a =
|
|
1724
|
+
const a = A.svg(i.current), c = r.stroke[o];
|
|
1725
1725
|
if (s) {
|
|
1726
1726
|
const u = typeof e == "number" ? e : 100, l = a.line(0, 0, 0, u, {
|
|
1727
1727
|
stroke: c.color,
|
|
@@ -1740,12 +1740,12 @@ const L = {
|
|
|
1740
1740
|
});
|
|
1741
1741
|
i.current.appendChild(l);
|
|
1742
1742
|
}
|
|
1743
|
-
}, [r, o, e, s]), /* @__PURE__ */
|
|
1743
|
+
}, [r, o, e, s]), /* @__PURE__ */ M.jsx(
|
|
1744
1744
|
"div",
|
|
1745
1745
|
{
|
|
1746
1746
|
className: `${Pe["drawui-divider"]} ${s ? Pe.vertical : Pe.horizontal} ${t ?? ""}`,
|
|
1747
1747
|
style: { width: s ? void 0 : e },
|
|
1748
|
-
children: /* @__PURE__ */
|
|
1748
|
+
children: /* @__PURE__ */ M.jsx(
|
|
1749
1749
|
"svg",
|
|
1750
1750
|
{
|
|
1751
1751
|
ref: i,
|
|
@@ -1760,7 +1760,8 @@ const L = {
|
|
|
1760
1760
|
strokeWeight: o = "medium",
|
|
1761
1761
|
radius: e = "md",
|
|
1762
1762
|
width: s = 300,
|
|
1763
|
-
height: t
|
|
1763
|
+
height: t,
|
|
1764
|
+
//optional, card adjust height itself by content
|
|
1764
1765
|
backgroundColor: n,
|
|
1765
1766
|
header: r,
|
|
1766
1767
|
footer: i,
|
|
@@ -1768,51 +1769,76 @@ const L = {
|
|
|
1768
1769
|
children: c,
|
|
1769
1770
|
...u
|
|
1770
1771
|
}) => {
|
|
1771
|
-
const l =
|
|
1772
|
-
|
|
1772
|
+
const l = j(), h = O(null), f = O(null), [d, g] = Y(!1), [m, b] = Y(t ?? 200);
|
|
1773
|
+
R(() => {
|
|
1774
|
+
if (!f.current || t) return;
|
|
1775
|
+
const y = () => {
|
|
1776
|
+
if (f.current) {
|
|
1777
|
+
const z = f.current.scrollHeight;
|
|
1778
|
+
b(z);
|
|
1779
|
+
}
|
|
1780
|
+
};
|
|
1781
|
+
y();
|
|
1782
|
+
const C = new ResizeObserver(y);
|
|
1783
|
+
return C.observe(f.current), () => C.disconnect();
|
|
1784
|
+
}, [c, r, i, t]), R(() => {
|
|
1773
1785
|
if (!h.current) return;
|
|
1774
|
-
const
|
|
1786
|
+
const y = A.svg(h.current);
|
|
1775
1787
|
h.current.innerHTML = "";
|
|
1776
|
-
const
|
|
1777
|
-
K(0, 0, s,
|
|
1788
|
+
const C = l.stroke[o], z = t ?? m, N = y.path(
|
|
1789
|
+
K(0, 0, s, z, l.radius[e]),
|
|
1778
1790
|
{
|
|
1779
|
-
stroke:
|
|
1780
|
-
strokeWidth:
|
|
1791
|
+
stroke: C.color,
|
|
1792
|
+
strokeWidth: C.width,
|
|
1781
1793
|
fill: n ?? l.fill.background,
|
|
1782
|
-
roughness:
|
|
1794
|
+
roughness: d ? l.roughness.roughness + 1 : l.roughness.roughness,
|
|
1783
1795
|
bowing: l.roughness.bowing,
|
|
1784
1796
|
fillStyle: a
|
|
1785
1797
|
}
|
|
1786
1798
|
);
|
|
1787
|
-
h.current.appendChild(
|
|
1788
|
-
}, [
|
|
1799
|
+
h.current.appendChild(N);
|
|
1800
|
+
}, [
|
|
1801
|
+
o,
|
|
1802
|
+
e,
|
|
1803
|
+
s,
|
|
1804
|
+
m,
|
|
1805
|
+
t,
|
|
1806
|
+
n,
|
|
1807
|
+
l,
|
|
1808
|
+
d,
|
|
1809
|
+
a
|
|
1810
|
+
]);
|
|
1811
|
+
const v = t ?? m;
|
|
1812
|
+
return /* @__PURE__ */ M.jsxs(
|
|
1789
1813
|
"div",
|
|
1790
1814
|
{
|
|
1791
1815
|
...u,
|
|
1816
|
+
ref: f,
|
|
1792
1817
|
className: `${fe["drawui-card"]} ${u.className ?? ""}`,
|
|
1793
|
-
onMouseEnter: () =>
|
|
1794
|
-
onMouseLeave: () =>
|
|
1818
|
+
onMouseEnter: () => g(!0),
|
|
1819
|
+
onMouseLeave: () => g(!1),
|
|
1795
1820
|
style: {
|
|
1796
1821
|
position: "relative",
|
|
1797
1822
|
width: s,
|
|
1798
|
-
|
|
1823
|
+
minHeight: t || "auto",
|
|
1824
|
+
height: t || "auto",
|
|
1799
1825
|
cursor: "default",
|
|
1800
1826
|
display: "flex",
|
|
1801
1827
|
flexDirection: "column",
|
|
1802
1828
|
overflow: "hidden"
|
|
1803
1829
|
},
|
|
1804
1830
|
children: [
|
|
1805
|
-
/* @__PURE__ */
|
|
1831
|
+
/* @__PURE__ */ M.jsx(
|
|
1806
1832
|
"svg",
|
|
1807
1833
|
{
|
|
1808
1834
|
ref: h,
|
|
1809
1835
|
width: s,
|
|
1810
|
-
height:
|
|
1836
|
+
height: v,
|
|
1811
1837
|
style: { position: "absolute", inset: 0, pointerEvents: "none" }
|
|
1812
1838
|
}
|
|
1813
1839
|
),
|
|
1814
|
-
r && /* @__PURE__ */
|
|
1815
|
-
/* @__PURE__ */
|
|
1840
|
+
r && /* @__PURE__ */ M.jsxs(M.Fragment, { children: [
|
|
1841
|
+
/* @__PURE__ */ M.jsx(
|
|
1816
1842
|
"div",
|
|
1817
1843
|
{
|
|
1818
1844
|
className: fe["drawui-card-header"],
|
|
@@ -1820,9 +1846,9 @@ const L = {
|
|
|
1820
1846
|
children: r
|
|
1821
1847
|
}
|
|
1822
1848
|
),
|
|
1823
|
-
/* @__PURE__ */
|
|
1849
|
+
/* @__PURE__ */ M.jsx(Ge, { width: s, strokeWeight: "thick" })
|
|
1824
1850
|
] }),
|
|
1825
|
-
/* @__PURE__ */
|
|
1851
|
+
/* @__PURE__ */ M.jsx(
|
|
1826
1852
|
"div",
|
|
1827
1853
|
{
|
|
1828
1854
|
className: fe["drawui-card-body"],
|
|
@@ -1830,9 +1856,9 @@ const L = {
|
|
|
1830
1856
|
children: c
|
|
1831
1857
|
}
|
|
1832
1858
|
),
|
|
1833
|
-
i && /* @__PURE__ */
|
|
1834
|
-
/* @__PURE__ */
|
|
1835
|
-
/* @__PURE__ */
|
|
1859
|
+
i && /* @__PURE__ */ M.jsxs(M.Fragment, { children: [
|
|
1860
|
+
/* @__PURE__ */ M.jsx(Ge, { width: s, strokeWeight: "thick" }),
|
|
1861
|
+
/* @__PURE__ */ M.jsx(
|
|
1836
1862
|
"div",
|
|
1837
1863
|
{
|
|
1838
1864
|
className: fe["drawui-card-footer"],
|
|
@@ -1856,10 +1882,10 @@ const L = {
|
|
|
1856
1882
|
fillStyle: r,
|
|
1857
1883
|
className: i
|
|
1858
1884
|
}) => {
|
|
1859
|
-
const a =
|
|
1860
|
-
return
|
|
1885
|
+
const a = j(), c = O(null);
|
|
1886
|
+
return R(() => {
|
|
1861
1887
|
if (!c.current) return;
|
|
1862
|
-
const u =
|
|
1888
|
+
const u = A.svg(c.current);
|
|
1863
1889
|
c.current.innerHTML = "";
|
|
1864
1890
|
const l = a.stroke[s], h = u.path(
|
|
1865
1891
|
K(0, 0, n, 40, a.radius[t]),
|
|
@@ -1873,9 +1899,9 @@ const L = {
|
|
|
1873
1899
|
}
|
|
1874
1900
|
);
|
|
1875
1901
|
c.current.appendChild(h);
|
|
1876
|
-
}, [a, s, t, n]), /* @__PURE__ */
|
|
1877
|
-
/* @__PURE__ */
|
|
1878
|
-
/* @__PURE__ */
|
|
1902
|
+
}, [a, s, t, n]), /* @__PURE__ */ M.jsx("div", { className: `${Ve["drawui-collapse"]} ${i ?? ""}`, style: { width: n }, children: /* @__PURE__ */ M.jsxs("details", { children: [
|
|
1903
|
+
/* @__PURE__ */ M.jsxs("summary", { style: { position: "relative" }, children: [
|
|
1904
|
+
/* @__PURE__ */ M.jsx(
|
|
1879
1905
|
"svg",
|
|
1880
1906
|
{
|
|
1881
1907
|
ref: c,
|
|
@@ -1884,11 +1910,11 @@ const L = {
|
|
|
1884
1910
|
style: { position: "absolute", inset: 0, pointerEvents: "none" }
|
|
1885
1911
|
}
|
|
1886
1912
|
),
|
|
1887
|
-
/* @__PURE__ */
|
|
1913
|
+
/* @__PURE__ */ M.jsx("span", { style: { position: "relative", zIndex: 1 }, children: o })
|
|
1888
1914
|
] }),
|
|
1889
|
-
/* @__PURE__ */
|
|
1915
|
+
/* @__PURE__ */ M.jsx("div", { className: Ve["drawui-collapse-content"], children: e })
|
|
1890
1916
|
] }) });
|
|
1891
|
-
},
|
|
1917
|
+
}, Ft = {}, Zt = ({
|
|
1892
1918
|
strokeWeight: o = "medium",
|
|
1893
1919
|
radius: e = "md",
|
|
1894
1920
|
size: s = "sm",
|
|
@@ -1897,10 +1923,10 @@ const L = {
|
|
|
1897
1923
|
backgroundColor: r,
|
|
1898
1924
|
...i
|
|
1899
1925
|
}) => {
|
|
1900
|
-
const a =
|
|
1901
|
-
return
|
|
1926
|
+
const a = j(), c = O(null), [u, l] = Y(!1), h = a.buttonSize[s].height;
|
|
1927
|
+
return R(() => {
|
|
1902
1928
|
if (!c.current) return;
|
|
1903
|
-
const f =
|
|
1929
|
+
const f = A.svg(c.current);
|
|
1904
1930
|
c.current.innerHTML = "";
|
|
1905
1931
|
const d = a.stroke[o], g = f.path(
|
|
1906
1932
|
K(0, 0, h, h, a.radius[e]),
|
|
@@ -1914,13 +1940,13 @@ const L = {
|
|
|
1914
1940
|
}
|
|
1915
1941
|
);
|
|
1916
1942
|
c.current.appendChild(g);
|
|
1917
|
-
}, [u, o, e, a, h, r]), /* @__PURE__ */
|
|
1943
|
+
}, [u, o, e, a, h, r]), /* @__PURE__ */ M.jsxs(
|
|
1918
1944
|
"button",
|
|
1919
1945
|
{
|
|
1920
1946
|
...i,
|
|
1921
1947
|
onMouseEnter: () => l(!0),
|
|
1922
1948
|
onMouseLeave: () => l(!1),
|
|
1923
|
-
className: `${
|
|
1949
|
+
className: `${Ft["drawui-button"]} ${i.className ?? ""}`,
|
|
1924
1950
|
style: {
|
|
1925
1951
|
position: "relative",
|
|
1926
1952
|
width: h,
|
|
@@ -1935,7 +1961,7 @@ const L = {
|
|
|
1935
1961
|
padding: 0
|
|
1936
1962
|
},
|
|
1937
1963
|
children: [
|
|
1938
|
-
/* @__PURE__ */
|
|
1964
|
+
/* @__PURE__ */ M.jsx(
|
|
1939
1965
|
"svg",
|
|
1940
1966
|
{
|
|
1941
1967
|
ref: c,
|
|
@@ -1948,7 +1974,7 @@ const L = {
|
|
|
1948
1974
|
}
|
|
1949
1975
|
}
|
|
1950
1976
|
),
|
|
1951
|
-
/* @__PURE__ */
|
|
1977
|
+
/* @__PURE__ */ M.jsx(
|
|
1952
1978
|
"span",
|
|
1953
1979
|
{
|
|
1954
1980
|
style: {
|
|
@@ -1977,24 +2003,24 @@ const L = {
|
|
|
1977
2003
|
style: i,
|
|
1978
2004
|
...a
|
|
1979
2005
|
}) => {
|
|
1980
|
-
const c =
|
|
1981
|
-
return
|
|
2006
|
+
const c = j(), u = O(null), l = O(null), [h, f] = Y(!1), [d, g] = Y(!1), m = c.inputSize[t].height, b = c.inputSize[t].fontSize, v = c.inputSize[t].paddingX;
|
|
2007
|
+
return R(() => {
|
|
1982
2008
|
if (!u.current || !l.current) return;
|
|
1983
|
-
const y = l.current.offsetWidth,
|
|
2009
|
+
const y = l.current.offsetWidth, C = A.svg(u.current);
|
|
1984
2010
|
u.current.innerHTML = "";
|
|
1985
|
-
const
|
|
2011
|
+
const z = c.stroke[o], N = C.path(
|
|
1986
2012
|
K(0, 0, y, m, c.radius[s]),
|
|
1987
2013
|
{
|
|
1988
|
-
stroke:
|
|
1989
|
-
strokeWidth:
|
|
2014
|
+
stroke: z.color,
|
|
2015
|
+
strokeWidth: z.width,
|
|
1990
2016
|
fill: e ?? c.fill.background,
|
|
1991
2017
|
roughness: h ? c.roughness.roughness + 1 : c.roughness.roughness,
|
|
1992
2018
|
bowing: c.roughness.bowing,
|
|
1993
2019
|
fillStyle: r
|
|
1994
2020
|
}
|
|
1995
2021
|
);
|
|
1996
|
-
u.current.appendChild(
|
|
1997
|
-
}, [h, d, o, s, t, c, e]), /* @__PURE__ */
|
|
2022
|
+
u.current.appendChild(N);
|
|
2023
|
+
}, [h, d, o, s, t, c, e]), /* @__PURE__ */ M.jsxs(
|
|
1998
2024
|
"div",
|
|
1999
2025
|
{
|
|
2000
2026
|
ref: l,
|
|
@@ -2003,7 +2029,7 @@ const L = {
|
|
|
2003
2029
|
onMouseEnter: () => g(!0),
|
|
2004
2030
|
onMouseLeave: () => g(!1),
|
|
2005
2031
|
children: [
|
|
2006
|
-
/* @__PURE__ */
|
|
2032
|
+
/* @__PURE__ */ M.jsx(
|
|
2007
2033
|
"svg",
|
|
2008
2034
|
{
|
|
2009
2035
|
ref: u,
|
|
@@ -2012,7 +2038,7 @@ const L = {
|
|
|
2012
2038
|
style: { position: "absolute", inset: 0 }
|
|
2013
2039
|
}
|
|
2014
2040
|
),
|
|
2015
|
-
/* @__PURE__ */
|
|
2041
|
+
/* @__PURE__ */ M.jsx(
|
|
2016
2042
|
"input",
|
|
2017
2043
|
{
|
|
2018
2044
|
...a,
|
|
@@ -2040,10 +2066,10 @@ const L = {
|
|
|
2040
2066
|
color: s,
|
|
2041
2067
|
className: t
|
|
2042
2068
|
}) => {
|
|
2043
|
-
const n =
|
|
2044
|
-
return
|
|
2069
|
+
const n = j(), r = O(null);
|
|
2070
|
+
return R(() => {
|
|
2045
2071
|
if (!r.current) return;
|
|
2046
|
-
const i =
|
|
2072
|
+
const i = A.svg(r.current);
|
|
2047
2073
|
r.current.innerHTML = "";
|
|
2048
2074
|
const a = n.stroke[e], c = s ?? a.color, u = i.path(
|
|
2049
2075
|
"M6 18 H18 L16 12 A6 6 0 0 0 8 12 Z",
|
|
@@ -2064,17 +2090,17 @@ const L = {
|
|
|
2064
2090
|
fill: "transparent"
|
|
2065
2091
|
});
|
|
2066
2092
|
r.current.appendChild(l);
|
|
2067
|
-
}, [n, e, s]), /* @__PURE__ */
|
|
2093
|
+
}, [n, e, s]), /* @__PURE__ */ M.jsx("svg", { ref: r, width: o, height: o, viewBox: "0 0 24 24", className: t });
|
|
2068
2094
|
}, Qt = ({
|
|
2069
2095
|
size: o = 24,
|
|
2070
2096
|
strokeWeight: e = "medium",
|
|
2071
2097
|
color: s,
|
|
2072
2098
|
className: t
|
|
2073
2099
|
}) => {
|
|
2074
|
-
const n =
|
|
2075
|
-
return
|
|
2100
|
+
const n = j(), r = O(null);
|
|
2101
|
+
return R(() => {
|
|
2076
2102
|
if (!r.current) return;
|
|
2077
|
-
const i =
|
|
2103
|
+
const i = A.svg(r.current);
|
|
2078
2104
|
r.current.innerHTML = "";
|
|
2079
2105
|
const a = n.stroke[e], c = s ?? a.color, u = i.path(
|
|
2080
2106
|
"M2 12 L12 2 L22 12 V22 H2 Z",
|
|
@@ -2087,7 +2113,7 @@ const L = {
|
|
|
2087
2113
|
}
|
|
2088
2114
|
);
|
|
2089
2115
|
r.current.appendChild(u);
|
|
2090
|
-
}, [n, e, s]), /* @__PURE__ */
|
|
2116
|
+
}, [n, e, s]), /* @__PURE__ */ M.jsx(
|
|
2091
2117
|
"svg",
|
|
2092
2118
|
{
|
|
2093
2119
|
ref: r,
|
|
@@ -2103,10 +2129,10 @@ const L = {
|
|
|
2103
2129
|
color: s,
|
|
2104
2130
|
className: t
|
|
2105
2131
|
}) => {
|
|
2106
|
-
const n =
|
|
2107
|
-
return
|
|
2132
|
+
const n = j(), r = O(null);
|
|
2133
|
+
return R(() => {
|
|
2108
2134
|
if (!r.current) return;
|
|
2109
|
-
const i =
|
|
2135
|
+
const i = A.svg(r.current);
|
|
2110
2136
|
r.current.innerHTML = "";
|
|
2111
2137
|
const a = n.stroke[e], c = s ?? a.color, u = i.line(4, 12, 20, 12, {
|
|
2112
2138
|
stroke: c,
|
|
@@ -2115,17 +2141,17 @@ const L = {
|
|
|
2115
2141
|
bowing: n.roughness.bowing
|
|
2116
2142
|
});
|
|
2117
2143
|
r.current.appendChild(u);
|
|
2118
|
-
}, [n, e, s]), /* @__PURE__ */
|
|
2144
|
+
}, [n, e, s]), /* @__PURE__ */ M.jsx("svg", { ref: r, width: o, height: o, viewBox: "0 0 24 24", className: t });
|
|
2119
2145
|
}, Kt = ({
|
|
2120
2146
|
size: o = 24,
|
|
2121
2147
|
strokeWeight: e = "medium",
|
|
2122
2148
|
color: s,
|
|
2123
2149
|
className: t
|
|
2124
2150
|
}) => {
|
|
2125
|
-
const n =
|
|
2126
|
-
return
|
|
2151
|
+
const n = j(), r = O(null);
|
|
2152
|
+
return R(() => {
|
|
2127
2153
|
if (!r.current) return;
|
|
2128
|
-
const i =
|
|
2154
|
+
const i = A.svg(r.current);
|
|
2129
2155
|
r.current.innerHTML = "";
|
|
2130
2156
|
const a = n.stroke[e], c = s ?? a.color, u = i.line(12, 4, 12, 20, {
|
|
2131
2157
|
stroke: c,
|
|
@@ -2139,17 +2165,17 @@ const L = {
|
|
|
2139
2165
|
bowing: n.roughness.bowing
|
|
2140
2166
|
});
|
|
2141
2167
|
r.current.appendChild(u), r.current.appendChild(l);
|
|
2142
|
-
}, [n, e, s]), /* @__PURE__ */
|
|
2168
|
+
}, [n, e, s]), /* @__PURE__ */ M.jsx("svg", { ref: r, width: o, height: o, viewBox: "0 0 24 24", className: t });
|
|
2143
2169
|
}, es = ({
|
|
2144
2170
|
size: o = 24,
|
|
2145
2171
|
strokeWeight: e = "medium",
|
|
2146
2172
|
color: s,
|
|
2147
2173
|
className: t
|
|
2148
2174
|
}) => {
|
|
2149
|
-
const n =
|
|
2150
|
-
return
|
|
2175
|
+
const n = j(), r = O(null);
|
|
2176
|
+
return R(() => {
|
|
2151
2177
|
if (!r.current) return;
|
|
2152
|
-
const i =
|
|
2178
|
+
const i = A.svg(r.current);
|
|
2153
2179
|
r.current.innerHTML = "";
|
|
2154
2180
|
const a = n.stroke[e], c = s ?? a.color, u = i.circle(10, 10, 14, {
|
|
2155
2181
|
stroke: c,
|
|
@@ -2164,7 +2190,7 @@ const L = {
|
|
|
2164
2190
|
bowing: n.roughness.bowing
|
|
2165
2191
|
});
|
|
2166
2192
|
r.current.appendChild(u), r.current.appendChild(l);
|
|
2167
|
-
}, [n, e, s]), /* @__PURE__ */
|
|
2193
|
+
}, [n, e, s]), /* @__PURE__ */ M.jsx(
|
|
2168
2194
|
"svg",
|
|
2169
2195
|
{
|
|
2170
2196
|
ref: r,
|
|
@@ -2180,10 +2206,10 @@ const L = {
|
|
|
2180
2206
|
color: s,
|
|
2181
2207
|
className: t
|
|
2182
2208
|
}) => {
|
|
2183
|
-
const n =
|
|
2184
|
-
return
|
|
2209
|
+
const n = j(), r = O(null);
|
|
2210
|
+
return R(() => {
|
|
2185
2211
|
if (!r.current) return;
|
|
2186
|
-
const i =
|
|
2212
|
+
const i = A.svg(r.current);
|
|
2187
2213
|
r.current.innerHTML = "";
|
|
2188
2214
|
const a = n.stroke[e], c = s ?? a.color, u = i.circle(12, 12, 14, {
|
|
2189
2215
|
stroke: c,
|
|
@@ -2202,17 +2228,17 @@ const L = {
|
|
|
2202
2228
|
});
|
|
2203
2229
|
r.current.appendChild(b);
|
|
2204
2230
|
}
|
|
2205
|
-
}, [n, e, s]), /* @__PURE__ */
|
|
2231
|
+
}, [n, e, s]), /* @__PURE__ */ M.jsx("svg", { ref: r, width: o, height: o, viewBox: "0 0 24 24", className: t });
|
|
2206
2232
|
}, ss = ({
|
|
2207
2233
|
size: o = 24,
|
|
2208
2234
|
strokeWeight: e = "medium",
|
|
2209
2235
|
color: s,
|
|
2210
2236
|
className: t
|
|
2211
2237
|
}) => {
|
|
2212
|
-
const n =
|
|
2213
|
-
return
|
|
2238
|
+
const n = j(), r = O(null);
|
|
2239
|
+
return R(() => {
|
|
2214
2240
|
if (!r.current) return;
|
|
2215
|
-
const i =
|
|
2241
|
+
const i = A.svg(r.current);
|
|
2216
2242
|
r.current.innerHTML = "";
|
|
2217
2243
|
const a = n.stroke[e], c = s ?? a.color, u = i.circle(12, 8, 6, {
|
|
2218
2244
|
stroke: c,
|
|
@@ -2233,7 +2259,7 @@ const L = {
|
|
|
2233
2259
|
}
|
|
2234
2260
|
);
|
|
2235
2261
|
r.current.appendChild(l);
|
|
2236
|
-
}, [n, e, s]), /* @__PURE__ */
|
|
2262
|
+
}, [n, e, s]), /* @__PURE__ */ M.jsx("svg", { ref: r, width: o, height: o, viewBox: "0 0 24 24", className: t });
|
|
2237
2263
|
};
|
|
2238
2264
|
export {
|
|
2239
2265
|
Vt as DrawuiButton,
|
|
@@ -2250,5 +2276,5 @@ export {
|
|
|
2250
2276
|
es as IconSearch,
|
|
2251
2277
|
ts as IconSettings,
|
|
2252
2278
|
ss as IconUser,
|
|
2253
|
-
|
|
2279
|
+
j as useDrawuiTheme
|
|
2254
2280
|
};
|