@commentkit/comment-kit 0.7.0 → 0.7.1
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 +27 -0
- package/dist/angular.es.js +2 -2
- package/dist/comment-kit.es.js +5 -5
- package/dist/demo.es.js +4 -3
- package/dist/headless.es.js +3 -3
- package/dist/preact.es.js +2 -2
- package/dist/qwik.qwik.mjs +2 -2
- package/dist/react.es.js +2 -2
- package/dist/shared/{annotation-toolbar-B9SxYqoF.js → annotation-toolbar-cGC1p-SP.js} +379 -379
- package/dist/shared/attachment-refresh-CzQFXHkL.js +94 -0
- package/dist/shared/{button-group-Cl9CrvvU.js → button-group-CWdKaOlC.js} +14 -16
- package/dist/shared/capture-colors-CxSLsU5-.js +74 -0
- package/dist/shared/{comment-drawing-canvas-Dzb5YoFw.js → comment-drawing-canvas-DdXlMgbF.js} +2 -2
- package/dist/shared/{comment-utils-BycYTSxA.js → comment-icon-Dg9ZWpz-.js} +29 -23
- package/dist/shared/comment-image-lightbox-B7iHjnAz.js +190 -0
- package/dist/shared/comment-images-content-D7YNUgo5.js +214 -0
- package/dist/shared/{comment-kit-core-BaSuMzp9.js → comment-kit-core-C862uNAm.js} +998 -778
- package/dist/shared/{comment-kit-ui-CzfdAZs2.js → comment-kit-ui-0vd-DY4S.js} +5206 -5410
- package/dist/shared/{comment-screenshot-annotator-C7X-_bm6.js → comment-screenshot-annotator-DcaSSuWB.js} +5 -5
- package/dist/shared/{comment-screenshot-overlay-wIrZrcRy.js → comment-screenshot-overlay-D_nFoJmM.js} +6 -5
- package/dist/shared/{dev-export-panel-FwFVdady.js → dev-export-panel-pWBlhlse.js} +7 -7
- package/dist/shared/dev-grab-eQ9EgEGY.js +210 -0
- package/dist/shared/{element-selector-BhJm-NSs.js → element-selector-DC-_XJ0k.js} +311 -272
- package/dist/shared/{mount-ui--ijs8pWT.js → mount-ui-B68j8r6I.js} +4 -4
- package/dist/shared/{pusher-ipHMJnO_.js → pusher-C1FHQGXV.js} +1 -1
- package/dist/shared/realtime-Diqz7G_y.js +317 -0
- package/dist/shared/realtime-recovery-DJ_adc-H.js +135 -0
- package/dist/shared/{shadow-root-C5v-T8lQ.js → shadow-root-CrO75sED.js} +1 -1
- package/dist/shared/{styles-D3yMtaec.js → styles-C9Jwvm0Q.js} +1 -1
- package/dist/shared/useRender-D1z_X_BY.js +5 -0
- package/dist/shared/{validation-C7QG8j7Z.js → validation-D-8u4M7I.js} +14 -1
- package/dist/shared/{websocket-manager-DhLWh3Jr.js → websocket-manager-CFak_YHy.js} +148 -89
- package/dist/solid.es.js +2 -2
- package/dist/svelte.es.js +2 -2
- package/dist/types/core/api-client.d.ts +8 -1
- package/dist/types/core/comment-kit-core.d.ts +9 -0
- package/dist/types/core/types.d.ts +35 -0
- package/dist/types/core/websocket-manager.d.ts +12 -0
- package/dist/types/core/write-access.d.ts +9 -0
- package/dist/vue.es.js +2 -2
- package/docs/api-reference.md +6 -0
- package/package.json +3 -2
- package/dist/shared/comment-image-lightbox-BPYJT1sB.js +0 -183
- package/dist/shared/dev-grab-DDqg0LQf.js +0 -203
- package/dist/shared/realtime-Dk41VwKg.js +0 -302
|
@@ -2,57 +2,57 @@ import { D as e, I as t, L as n, T as r, c as i, d as a, f as o, g as s, m as c,
|
|
|
2
2
|
import { $t as p, Ct as m, Et as h, Nt as ee, Ot as g, Tt as _, Zt as v, en as y, i as b, o as x, r as S, t as C, x as w, xt as T } from "./separator-XDBsaWyw.js";
|
|
3
3
|
import { E as te, M as ne, S as re, h as ie, j as ae, n as oe, t as se, u as ce, y as le } from "./useValueChanged-CrzfD8l-.js";
|
|
4
4
|
import { i as ue } from "./ShadowRootContext-Bv-4aElu.js";
|
|
5
|
-
import { a as de,
|
|
6
|
-
import {
|
|
7
|
-
import { a as
|
|
8
|
-
import * as
|
|
9
|
-
import { jsx as
|
|
10
|
-
var
|
|
11
|
-
function Pe() {
|
|
12
|
-
return w(je, Me, Ne);
|
|
13
|
-
}
|
|
5
|
+
import { a as de, i as fe, l as pe, n as me, o as he, r as ge, s as E, t as D, u as _e } from "./button-group-CWdKaOlC.js";
|
|
6
|
+
import { A as ve, B as O, D as k, E as ye, F as be, I as A, L as xe, M as j, O as M, P as N, R as P, T as Se, b as Ce, d as F, f as we, k as Te, o as I, s as L, w as R, x as Ee, y as De, z } from "./comment-kit-ui-0vd-DY4S.js";
|
|
7
|
+
import { a as Oe, c as B, d as V, l as H, n as ke, o as U, r as Ae, s as je, t as W, u as G } from "./annotation-icons-Dh-bmNYK.js";
|
|
8
|
+
import * as K from "react";
|
|
9
|
+
import { jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
10
|
+
var Me = () => () => {}, Ne = () => !0, Pe = () => !1;
|
|
14
11
|
function Fe() {
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
return w(Me, Ne, Pe);
|
|
13
|
+
}
|
|
14
|
+
function Ie() {
|
|
15
|
+
let [e, t] = K.useState(!1);
|
|
16
|
+
return K.useEffect(() => {
|
|
17
17
|
t(!0);
|
|
18
18
|
}, []), e;
|
|
19
19
|
}
|
|
20
|
-
var
|
|
21
|
-
function
|
|
22
|
-
return !
|
|
20
|
+
var Le = l(18) ? Fe : Ie;
|
|
21
|
+
function Re() {
|
|
22
|
+
return !Le();
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
let { script: t } = e, { nonce: n } =
|
|
26
|
-
return
|
|
24
|
+
function ze(e) {
|
|
25
|
+
let { script: t } = e, { nonce: n } = we();
|
|
26
|
+
return Re() ? /*#__PURE__*/ q("script", {
|
|
27
27
|
nonce: n,
|
|
28
28
|
dangerouslySetInnerHTML: { __html: t },
|
|
29
29
|
suppressHydrationWarning: !0
|
|
30
30
|
}) : null;
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
let e =
|
|
32
|
+
function Y() {
|
|
33
|
+
let e = K.useRef(0), [t, n] = K.useState({
|
|
34
34
|
paths: [],
|
|
35
35
|
undone: [],
|
|
36
36
|
activePath: null,
|
|
37
37
|
tool: "pen",
|
|
38
|
-
color:
|
|
38
|
+
color: j,
|
|
39
39
|
strokeWidth: 3
|
|
40
|
-
}), r =
|
|
40
|
+
}), r = K.useCallback((e) => {
|
|
41
41
|
n((t) => ({
|
|
42
42
|
...t,
|
|
43
43
|
tool: e
|
|
44
44
|
}));
|
|
45
|
-
}, []), i =
|
|
45
|
+
}, []), i = K.useCallback((e) => {
|
|
46
46
|
n((t) => ({
|
|
47
47
|
...t,
|
|
48
48
|
color: e
|
|
49
49
|
}));
|
|
50
|
-
}, []), a =
|
|
50
|
+
}, []), a = K.useCallback((e) => {
|
|
51
51
|
n((t) => ({
|
|
52
52
|
...t,
|
|
53
53
|
strokeWidth: e
|
|
54
54
|
}));
|
|
55
|
-
}, []), o =
|
|
55
|
+
}, []), o = K.useCallback((t, r, i = 1) => {
|
|
56
56
|
let a = `path-${String(++e.current)}`;
|
|
57
57
|
n((e) => ({
|
|
58
58
|
...e,
|
|
@@ -67,7 +67,7 @@ function X() {
|
|
|
67
67
|
strokeWidth: e.strokeWidth * i
|
|
68
68
|
}
|
|
69
69
|
}));
|
|
70
|
-
}, []), s =
|
|
70
|
+
}, []), s = K.useCallback((e, t) => {
|
|
71
71
|
n((n) => {
|
|
72
72
|
if (!n.activePath) return n;
|
|
73
73
|
if (n.activePath.tool === "pen") return {
|
|
@@ -95,7 +95,7 @@ function X() {
|
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
97
|
});
|
|
98
|
-
}, []), c =
|
|
98
|
+
}, []), c = K.useCallback(() => {
|
|
99
99
|
n((e) => !e.activePath || e.activePath.points.length < 2 ? {
|
|
100
100
|
...e,
|
|
101
101
|
activePath: null
|
|
@@ -105,24 +105,24 @@ function X() {
|
|
|
105
105
|
undone: [],
|
|
106
106
|
activePath: null
|
|
107
107
|
});
|
|
108
|
-
}, []), l =
|
|
108
|
+
}, []), l = K.useCallback(() => {
|
|
109
109
|
n((e) => ({
|
|
110
110
|
...e,
|
|
111
111
|
activePath: null
|
|
112
112
|
}));
|
|
113
|
-
}, []), u =
|
|
113
|
+
}, []), u = K.useCallback(() => {
|
|
114
114
|
n((e) => e.paths.length === 0 ? e : {
|
|
115
115
|
...e,
|
|
116
116
|
paths: e.paths.slice(0, -1),
|
|
117
117
|
undone: [...e.undone, ...e.paths.slice(-1)]
|
|
118
118
|
});
|
|
119
|
-
}, []), d =
|
|
119
|
+
}, []), d = K.useCallback(() => {
|
|
120
120
|
n((e) => e.undone.length === 0 ? e : {
|
|
121
121
|
...e,
|
|
122
122
|
paths: [...e.paths, ...e.undone.slice(-1)],
|
|
123
123
|
undone: e.undone.slice(0, -1)
|
|
124
124
|
});
|
|
125
|
-
}, []), f =
|
|
125
|
+
}, []), f = K.useCallback(() => {
|
|
126
126
|
n((e) => ({
|
|
127
127
|
...e,
|
|
128
128
|
paths: [],
|
|
@@ -146,7 +146,7 @@ function X() {
|
|
|
146
146
|
canRedo: t.undone.length > 0
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function Be(e) {
|
|
150
150
|
let t = e.composedPath?.()[0] ?? e.target;
|
|
151
151
|
return t instanceof Element ? [
|
|
152
152
|
"INPUT",
|
|
@@ -154,10 +154,10 @@ function ze(e) {
|
|
|
154
154
|
"SELECT"
|
|
155
155
|
].includes(t.tagName) || t instanceof HTMLElement && t.isContentEditable : !1;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
|
|
157
|
+
function X(e, t, n) {
|
|
158
|
+
K.useEffect(() => {
|
|
159
159
|
let r = (r) => {
|
|
160
|
-
if (r.defaultPrevented || r.isComposing ||
|
|
160
|
+
if (r.defaultPrevented || r.isComposing || Be(r)) return;
|
|
161
161
|
let i = r.key.toLowerCase();
|
|
162
162
|
(r.metaKey || r.ctrlKey) && !r.altKey && (i === "z" || i === "y") ? (r.preventDefault(), i === "y" || r.shiftKey ? t() : e()) : r.key === "Escape" && (r.preventDefault(), n());
|
|
163
163
|
};
|
|
@@ -168,209 +168,209 @@ function Z(e, t, n) {
|
|
|
168
168
|
n
|
|
169
169
|
]);
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function Ve(e, t) {
|
|
172
172
|
return e - t;
|
|
173
173
|
}
|
|
174
|
-
function
|
|
175
|
-
let o =
|
|
174
|
+
function He(e, t, n, r, i, a) {
|
|
175
|
+
let o = F(e, n, r);
|
|
176
176
|
if (!i) return o;
|
|
177
177
|
let s = a.slice();
|
|
178
|
-
return s[t] =
|
|
178
|
+
return s[t] = F(o, a[t - 1] ?? -Infinity, a[t + 1] ?? Infinity), s.sort(Ve);
|
|
179
179
|
}
|
|
180
|
-
function
|
|
180
|
+
function Ue(e, t, n) {
|
|
181
181
|
if (!Array.isArray(e)) return !0;
|
|
182
182
|
let r = t * n;
|
|
183
183
|
for (let t = 0; t < e.length - 1; t += 1) if (!(Math.abs(e[t] - e[t + 1]) >= r)) return !1;
|
|
184
184
|
return !0;
|
|
185
185
|
}
|
|
186
|
-
var
|
|
187
|
-
activeThumbIndex:
|
|
188
|
-
max:
|
|
189
|
-
min:
|
|
190
|
-
minStepsBetweenValues:
|
|
191
|
-
step:
|
|
192
|
-
values:
|
|
193
|
-
...
|
|
194
|
-
},
|
|
195
|
-
process.env.NODE_ENV !== "production" && (
|
|
196
|
-
function
|
|
197
|
-
let e =
|
|
186
|
+
var Z = () => null, We = {
|
|
187
|
+
activeThumbIndex: Z,
|
|
188
|
+
max: Z,
|
|
189
|
+
min: Z,
|
|
190
|
+
minStepsBetweenValues: Z,
|
|
191
|
+
step: Z,
|
|
192
|
+
values: Z,
|
|
193
|
+
...ve
|
|
194
|
+
}, Ge = /*#__PURE__*/ K.createContext(void 0);
|
|
195
|
+
process.env.NODE_ENV !== "production" && (Ge.displayName = "SliderRootContext");
|
|
196
|
+
function Ke() {
|
|
197
|
+
let e = K.useContext(Ge);
|
|
198
198
|
if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? t(62) : "Base UI: SliderRootContext is missing. Slider parts must be placed within <Slider.Root>.");
|
|
199
199
|
return e;
|
|
200
200
|
}
|
|
201
|
-
function
|
|
202
|
-
return e === t || Array.isArray(e) && Array.isArray(t) &&
|
|
201
|
+
function qe(e, t) {
|
|
202
|
+
return e === t || Array.isArray(e) && Array.isArray(t) && Ee(e, t);
|
|
203
203
|
}
|
|
204
|
-
var
|
|
205
|
-
let { "aria-labelledby": r, className: i, defaultValue: a, disabled: s = !1, id: l, format: u, largeStep: d = 10, locale: h, render: ee, max: g = 100, min: _ = 0, minStepsBetweenValues: y = 0, form: b, name: x, onValueChange: S, onValueCommitted: C, orientation: w = "horizontal", step: T = 1, thumbCollisionBehavior: te = "push", thumbAlignment: ce = "center", value: ue, style: de, ...fe } = e, pe = oe(l), me =
|
|
204
|
+
var Je = /*#__PURE__*/ K.forwardRef(function(e, t) {
|
|
205
|
+
let { "aria-labelledby": r, className: i, defaultValue: a, disabled: s = !1, id: l, format: u, largeStep: d = 10, locale: h, render: ee, max: g = 100, min: _ = 0, minStepsBetweenValues: y = 0, form: b, name: x, onValueChange: S, onValueCommitted: C, orientation: w = "horizontal", step: T = 1, thumbCollisionBehavior: te = "push", thumbAlignment: ce = "center", value: ue, style: de, ...fe } = e, pe = oe(l), me = De(pe), he = c(S), ge = c(C), { clearErrors: E } = ye(), { state: D, disabled: _e, name: ve, setTouched: O, setDirty: be, validityData: xe, validation: j } = Te(), { labelId: M } = Se(), [N, we] = K.useState(), I = r ?? Ce(M, N), L = _e || s, R = ve ?? x, [z, Oe] = P({
|
|
206
206
|
controlled: ue,
|
|
207
207
|
default: a ?? _,
|
|
208
208
|
name: "Slider"
|
|
209
|
-
}),
|
|
210
|
-
|
|
211
|
-
}),
|
|
212
|
-
e && (
|
|
213
|
-
}),
|
|
209
|
+
}), B = K.useRef(null), V = K.useRef(null), H = K.useRef([]), ke = K.useRef(null), U = K.useRef(-1), Ae = K.useRef(null), je = K.useRef(re), [W, G] = K.useState(-1), [J, Me] = K.useState(-1), [Ne, Pe] = K.useState(!1), [Fe, Ie] = K.useState(() => /* @__PURE__ */ new Map()), [Le, Re] = K.useState([void 0, void 0]), ze = c((e) => {
|
|
210
|
+
G(e), e !== -1 && Me(e);
|
|
211
|
+
}), Y = c((e) => {
|
|
212
|
+
e && (V.current = e);
|
|
213
|
+
}), Be = Array.isArray(z), X = K.useMemo(() => Be ? z.map((e) => F(e, _, g)).sort(Ve) : [F(z, _, g)], [
|
|
214
214
|
g,
|
|
215
215
|
_,
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
]),
|
|
219
|
-
|
|
220
|
-
E(
|
|
221
|
-
let e =
|
|
222
|
-
t = Array.isArray(
|
|
216
|
+
Be,
|
|
217
|
+
z
|
|
218
|
+
]), Z = Be ? X : X[0];
|
|
219
|
+
k(j.inputRef, pe, Z, void 0, !L, x), se(Z, () => {
|
|
220
|
+
E(R), j.change(Z);
|
|
221
|
+
let e = xe.initialValue, t;
|
|
222
|
+
t = Array.isArray(Z) && Array.isArray(e) ? !Ee(Z, e) : Z !== e, be(t);
|
|
223
223
|
});
|
|
224
|
-
let
|
|
225
|
-
if (Number.isNaN(e) ||
|
|
224
|
+
let Ke = c((e, t) => {
|
|
225
|
+
if (Number.isNaN(e) || qe(e, z)) return !1;
|
|
226
226
|
let n = t.event, r = n.constructor, i = new r(n.type, n);
|
|
227
227
|
return Object.defineProperty(i, "target", {
|
|
228
228
|
writable: !0,
|
|
229
229
|
value: {
|
|
230
230
|
value: e,
|
|
231
|
-
name:
|
|
231
|
+
name: R
|
|
232
232
|
}
|
|
233
|
-
}), t.event = i, he(e, t), !t.isCanceled && (
|
|
234
|
-
}),
|
|
235
|
-
let r =
|
|
236
|
-
if (
|
|
237
|
-
let e = "key" in n ? le : ie, i =
|
|
238
|
-
|
|
233
|
+
}), t.event = i, he(e, t), !t.isCanceled && (je.current = t.reason, Oe(e), !0);
|
|
234
|
+
}), Je = c((e, t, n) => {
|
|
235
|
+
let r = He(e, t, _, g, Be, X);
|
|
236
|
+
if (Ue(r, T, y)) {
|
|
237
|
+
let e = "key" in n ? le : ie, i = Ke(r, ae(e, n.nativeEvent, void 0, { activeThumbIndex: t }));
|
|
238
|
+
O(!0), i && ge(r, ne(e, n.nativeEvent));
|
|
239
239
|
}
|
|
240
240
|
});
|
|
241
241
|
process.env.NODE_ENV !== "production" && _ >= g && o("Slider `max` must be greater than `min`."), n(() => {
|
|
242
|
-
if (!
|
|
243
|
-
let e = v(m(
|
|
244
|
-
p(
|
|
242
|
+
if (!L) return;
|
|
243
|
+
let e = v(m(B.current));
|
|
244
|
+
p(B.current, e) && e.blur(), W !== -1 && ze(-1);
|
|
245
245
|
}, [
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
246
|
+
W,
|
|
247
|
+
L,
|
|
248
|
+
ze
|
|
249
249
|
]);
|
|
250
|
-
let
|
|
250
|
+
let Q = K.useMemo(() => ({
|
|
251
251
|
...D,
|
|
252
|
-
activeThumbIndex:
|
|
253
|
-
disabled:
|
|
254
|
-
dragging:
|
|
252
|
+
activeThumbIndex: W,
|
|
253
|
+
disabled: L,
|
|
254
|
+
dragging: Ne,
|
|
255
255
|
orientation: w,
|
|
256
256
|
max: g,
|
|
257
257
|
min: _,
|
|
258
258
|
minStepsBetweenValues: y,
|
|
259
259
|
step: T,
|
|
260
|
-
values:
|
|
260
|
+
values: X
|
|
261
261
|
}), [
|
|
262
262
|
D,
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
263
|
+
W,
|
|
264
|
+
L,
|
|
265
|
+
Ne,
|
|
266
266
|
g,
|
|
267
267
|
_,
|
|
268
268
|
y,
|
|
269
269
|
w,
|
|
270
270
|
T,
|
|
271
|
-
|
|
272
|
-
]),
|
|
273
|
-
active:
|
|
274
|
-
controlRef:
|
|
275
|
-
disabled:
|
|
276
|
-
dragging:
|
|
277
|
-
validation:
|
|
271
|
+
X
|
|
272
|
+
]), Ye = K.useMemo(() => ({
|
|
273
|
+
active: W,
|
|
274
|
+
controlRef: V,
|
|
275
|
+
disabled: L,
|
|
276
|
+
dragging: Ne,
|
|
277
|
+
validation: j,
|
|
278
278
|
format: u,
|
|
279
|
-
handleInputChange:
|
|
280
|
-
indicatorPosition:
|
|
279
|
+
handleInputChange: Je,
|
|
280
|
+
indicatorPosition: Le,
|
|
281
281
|
inset: ce !== "center",
|
|
282
|
-
isArrayValue:
|
|
283
|
-
labelId:
|
|
282
|
+
isArrayValue: Be,
|
|
283
|
+
labelId: I,
|
|
284
284
|
rootLabelId: me,
|
|
285
285
|
largeStep: d,
|
|
286
|
-
lastUsedThumbIndex:
|
|
287
|
-
lastChangeReasonRef:
|
|
286
|
+
lastUsedThumbIndex: J,
|
|
287
|
+
lastChangeReasonRef: je,
|
|
288
288
|
form: b,
|
|
289
289
|
locale: h,
|
|
290
290
|
max: g,
|
|
291
291
|
min: _,
|
|
292
292
|
minStepsBetweenValues: y,
|
|
293
|
-
name:
|
|
293
|
+
name: R,
|
|
294
294
|
onValueCommitted: ge,
|
|
295
295
|
orientation: w,
|
|
296
|
-
pressedThumbCenterOffsetRef:
|
|
297
|
-
pressedThumbIndexRef:
|
|
298
|
-
pressedValuesRef:
|
|
299
|
-
registerFieldControlRef:
|
|
296
|
+
pressedThumbCenterOffsetRef: ke,
|
|
297
|
+
pressedThumbIndexRef: U,
|
|
298
|
+
pressedValuesRef: Ae,
|
|
299
|
+
registerFieldControlRef: Y,
|
|
300
300
|
renderBeforeHydration: ce === "edge",
|
|
301
|
-
setActive:
|
|
302
|
-
setDragging:
|
|
303
|
-
setIndicatorPosition:
|
|
304
|
-
setLabelId:
|
|
305
|
-
setValue:
|
|
306
|
-
state:
|
|
301
|
+
setActive: ze,
|
|
302
|
+
setDragging: Pe,
|
|
303
|
+
setIndicatorPosition: Re,
|
|
304
|
+
setLabelId: we,
|
|
305
|
+
setValue: Ke,
|
|
306
|
+
state: Q,
|
|
307
307
|
step: T,
|
|
308
308
|
thumbCollisionBehavior: te,
|
|
309
|
-
thumbMap:
|
|
310
|
-
thumbRefs:
|
|
311
|
-
values:
|
|
309
|
+
thumbMap: Fe,
|
|
310
|
+
thumbRefs: H,
|
|
311
|
+
values: X
|
|
312
312
|
}), [
|
|
313
|
-
|
|
314
|
-
|
|
313
|
+
W,
|
|
314
|
+
I,
|
|
315
315
|
me,
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
316
|
+
L,
|
|
317
|
+
Ne,
|
|
318
|
+
j,
|
|
319
319
|
u,
|
|
320
|
-
|
|
321
|
-
|
|
320
|
+
Je,
|
|
321
|
+
Le,
|
|
322
322
|
d,
|
|
323
|
-
|
|
323
|
+
J,
|
|
324
324
|
b,
|
|
325
325
|
h,
|
|
326
326
|
g,
|
|
327
327
|
_,
|
|
328
328
|
y,
|
|
329
|
-
|
|
329
|
+
R,
|
|
330
330
|
ge,
|
|
331
331
|
w,
|
|
332
|
+
Be,
|
|
333
|
+
Y,
|
|
332
334
|
ze,
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
Ge,
|
|
336
|
-
$,
|
|
335
|
+
Ke,
|
|
336
|
+
Q,
|
|
337
337
|
T,
|
|
338
338
|
te,
|
|
339
339
|
ce,
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
]),
|
|
343
|
-
state:
|
|
344
|
-
ref: [t,
|
|
340
|
+
Fe,
|
|
341
|
+
X
|
|
342
|
+
]), Xe = f("div", e, {
|
|
343
|
+
state: Q,
|
|
344
|
+
ref: [t, B],
|
|
345
345
|
props: [
|
|
346
346
|
{
|
|
347
|
-
"aria-labelledby":
|
|
347
|
+
"aria-labelledby": I,
|
|
348
348
|
id: pe,
|
|
349
349
|
role: "group"
|
|
350
350
|
},
|
|
351
351
|
fe,
|
|
352
|
-
(e) =>
|
|
352
|
+
(e) => j.getValidationProps(L, e)
|
|
353
353
|
],
|
|
354
|
-
stateAttributesMapping:
|
|
354
|
+
stateAttributesMapping: We
|
|
355
355
|
});
|
|
356
|
-
return /*#__PURE__*/
|
|
357
|
-
value:
|
|
358
|
-
children: /*#__PURE__*/
|
|
359
|
-
elementsRef:
|
|
360
|
-
onMapChange:
|
|
361
|
-
children:
|
|
356
|
+
return /*#__PURE__*/ q(Ge.Provider, {
|
|
357
|
+
value: Ye,
|
|
358
|
+
children: /*#__PURE__*/ q(A, {
|
|
359
|
+
elementsRef: H,
|
|
360
|
+
onMapChange: Ie,
|
|
361
|
+
children: Xe
|
|
362
362
|
})
|
|
363
363
|
});
|
|
364
364
|
});
|
|
365
|
-
process.env.NODE_ENV !== "production" && (
|
|
366
|
-
function
|
|
365
|
+
process.env.NODE_ENV !== "production" && (Je.displayName = "SliderRoot");
|
|
366
|
+
function Q(e) {
|
|
367
367
|
return e === "touch" || e === "pen";
|
|
368
368
|
}
|
|
369
|
-
function
|
|
369
|
+
function Ye(e, t) {
|
|
370
370
|
let n = e.getBoundingClientRect();
|
|
371
371
|
return t ? (n.top + n.bottom) / 2 : (n.left + n.right) / 2;
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function Xe(e) {
|
|
374
374
|
if (e === 0) return 0;
|
|
375
375
|
if (Math.abs(e) < 1) {
|
|
376
376
|
let t = e.toExponential().split("e-"), n = t[0].split(".")[1];
|
|
@@ -379,20 +379,20 @@ function Ye(e) {
|
|
|
379
379
|
let t = e.toString().split(".")[1];
|
|
380
380
|
return t ? t.length : 0;
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function Ze(e, t, n) {
|
|
383
383
|
let r = Math.round((e - n) / t) * t + n;
|
|
384
|
-
return Number(r.toFixed(Math.max(
|
|
384
|
+
return Number(r.toFixed(Math.max(Xe(t), Xe(n))));
|
|
385
385
|
}
|
|
386
|
-
function
|
|
386
|
+
function $(e, t, n, r, i, a, o, s) {
|
|
387
387
|
let c = e.slice(), l = a * o, u = c.length - 1, d = s ?? e, f = r + t * l, p = i - (u - t) * l;
|
|
388
|
-
c[t] =
|
|
388
|
+
c[t] = F(n, f, p);
|
|
389
389
|
for (let e = t + 1; e <= u; e += 1) {
|
|
390
390
|
let t = c[e - 1] + l, n = i - (u - e) * l, r = d[e], a = Math.max(c[e], t);
|
|
391
|
-
r < a && (a = Math.max(r, t)), c[e] =
|
|
391
|
+
r < a && (a = Math.max(r, t)), c[e] = F(a, t, n);
|
|
392
392
|
}
|
|
393
393
|
for (let e = t - 1; e >= 0; --e) {
|
|
394
394
|
let t = c[e + 1] - l, n = r + e * l, i = d[e], a = Math.min(c[e], t);
|
|
395
|
-
i > a && (a = Math.min(i, t)), c[e] =
|
|
395
|
+
i > a && (a = Math.min(i, t)), c[e] = F(a, n, t);
|
|
396
396
|
}
|
|
397
397
|
for (let e = 0; e <= u; e += 1) c[e] = Number(c[e].toFixed(12));
|
|
398
398
|
return c;
|
|
@@ -406,11 +406,11 @@ function Qe(e, t, n, r, i, a, o, s, c, l) {
|
|
|
406
406
|
};
|
|
407
407
|
let f = c * l;
|
|
408
408
|
if (e === "push") return {
|
|
409
|
-
value:
|
|
409
|
+
value: $(u, i, a, o, s, c, l),
|
|
410
410
|
thumbIndex: i,
|
|
411
411
|
didSwap: !1
|
|
412
412
|
};
|
|
413
|
-
let p = u.slice(), m = p[i - 1], h = p[i + 1], ee = m == null ? o : m + f, g = h == null ? s : h - f, _ = Number(
|
|
413
|
+
let p = u.slice(), m = p[i - 1], h = p[i + 1], ee = m == null ? o : m + f, g = h == null ? s : h - f, _ = Number(F(a, ee, g).toFixed(12));
|
|
414
414
|
switch (p[i] = _, e) {
|
|
415
415
|
case "swap": {
|
|
416
416
|
let e = u[i], t = 1e-7, n = a > e, r = a < e, ee = n && h != null && a >= h - t, g = r && m != null && a <= m + t;
|
|
@@ -421,11 +421,11 @@ function Qe(e, t, n, r, i, a, o, s, c, l) {
|
|
|
421
421
|
};
|
|
422
422
|
let v = ee ? i + 1 : i - 1, y = p.map((e, t) => t === i ? _ : d[t] ?? u[t]), b = a;
|
|
423
423
|
b = ee ? Math.max(a, p[v]) : Math.min(a, p[v]);
|
|
424
|
-
let x =
|
|
424
|
+
let x = $(p, v, b, o, s, c, l, y), S = ee ? v - 1 : v + 1, C = x[S - 1], w = x[S + 1], T = C == null ? o : C + f;
|
|
425
425
|
T = Math.max(T, o + S * f);
|
|
426
426
|
let te = w == null ? s : w - f;
|
|
427
427
|
te = Math.min(te, s - (x.length - 1 - S) * f);
|
|
428
|
-
let ne =
|
|
428
|
+
let ne = F(_, T, te);
|
|
429
429
|
return x[S] = Number(ne.toFixed(12)), {
|
|
430
430
|
value: x,
|
|
431
431
|
thumbIndex: v,
|
|
@@ -472,34 +472,34 @@ function tt(e, t) {
|
|
|
472
472
|
y: e.clientY
|
|
473
473
|
};
|
|
474
474
|
}
|
|
475
|
-
var nt = /*#__PURE__*/
|
|
476
|
-
let { render: i, className: a, style: o, ...s } = t, { disabled: l, dragging: u, inset: d, isArrayValue: ee, lastChangeReasonRef: b, max: x, min: S, minStepsBetweenValues: C, onValueCommitted: w, orientation: T, pressedThumbCenterOffsetRef: re, pressedThumbIndexRef: ie, pressedValuesRef: oe, registerFieldControlRef: se, renderBeforeHydration: le, setActive: de, setDragging: fe, setValue: pe, state: me, step: he, thumbCollisionBehavior: ge, thumbRefs: E, values: D } =
|
|
477
|
-
e &&
|
|
478
|
-
}),
|
|
479
|
-
function
|
|
475
|
+
var nt = /*#__PURE__*/ K.forwardRef(function(t, n) {
|
|
476
|
+
let { render: i, className: a, style: o, ...s } = t, { disabled: l, dragging: u, inset: d, isArrayValue: ee, lastChangeReasonRef: b, max: x, min: S, minStepsBetweenValues: C, onValueCommitted: w, orientation: T, pressedThumbCenterOffsetRef: re, pressedThumbIndexRef: ie, pressedValuesRef: oe, registerFieldControlRef: se, renderBeforeHydration: le, setActive: de, setDragging: fe, setValue: pe, state: me, step: he, thumbCollisionBehavior: ge, thumbRefs: E, values: D } = Ke(), _e = ue(), ve = D.length > 1, O = T === "vertical", k = K.useRef(null), ye = K.useRef(null), be = c((e) => {
|
|
477
|
+
e && ye.current == null && (ye.current = r(e).getComputedStyle(e));
|
|
478
|
+
}), A = K.useRef(null), xe = K.useRef(0), j = K.useRef(0), M = K.useRef(null), N = K.useRef(!1), P = h(D);
|
|
479
|
+
function Se(e) {
|
|
480
480
|
return e?.querySelector("input[type=\"range\"]");
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function Ce(e) {
|
|
483
483
|
ie.current = e, E.current[e] || (re.current = null);
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function we() {
|
|
486
486
|
ie.current = -1, re.current = null;
|
|
487
487
|
}
|
|
488
|
-
function
|
|
489
|
-
return e(t) ? E.current.some((n) => !e(n) || !p(n, t) ? !1 :
|
|
488
|
+
function Te(t) {
|
|
489
|
+
return e(t) ? E.current.some((n) => !e(n) || !p(n, t) ? !1 : Se(n)?.disabled === !0) : !1;
|
|
490
490
|
}
|
|
491
|
-
function
|
|
491
|
+
function I(e) {
|
|
492
492
|
let t = k.current, n = ie.current;
|
|
493
|
-
if (!t || n < 0 || n >= D.length) return n >= D.length && (
|
|
494
|
-
let { width: r, height: i, bottom: a, left: o, right: s } = t.getBoundingClientRect(), c = et(
|
|
495
|
-
return g =
|
|
493
|
+
if (!t || n < 0 || n >= D.length) return n >= D.length && (M.current = null), null;
|
|
494
|
+
let { width: r, height: i, bottom: a, left: o, right: s } = t.getBoundingClientRect(), c = et(ye.current, O), l = j.current, u = (O ? i : r) - c.start - c.end - l * 2, d = re.current ?? 0, f = e.x - d, p = e.y - d, m = O ? a - p - c.end : (_e === "rtl" ? s - f : f - o) - c.start, h = F((m - l) / u, 0, 1), g = (x - S) * h + S;
|
|
495
|
+
return g = Ze(g, he, S), g = F(g, S, x), ve ? Qe(ge, D, P.current, oe.current, n, g, S, x, he, C) : {
|
|
496
496
|
value: ee ? [g] : g,
|
|
497
497
|
thumbIndex: n,
|
|
498
498
|
didSwap: !1
|
|
499
499
|
};
|
|
500
500
|
}
|
|
501
|
-
function
|
|
502
|
-
oe.current = ve ? D.slice() : null,
|
|
501
|
+
function L(t) {
|
|
502
|
+
oe.current = ve ? D.slice() : null, M.current = null, P.current = D;
|
|
503
503
|
let n = ie.current, r = n;
|
|
504
504
|
if (n > -1 && n < D.length) {
|
|
505
505
|
if (D[n] === x) {
|
|
@@ -512,170 +512,170 @@ var nt = /*#__PURE__*/ q.forwardRef(function(t, n) {
|
|
|
512
512
|
r = -1;
|
|
513
513
|
for (let a = 0; a < E.current.length; a += 1) {
|
|
514
514
|
let o = E.current[a];
|
|
515
|
-
if (e(o) && !
|
|
516
|
-
let e =
|
|
515
|
+
if (e(o) && !Se(o)?.disabled) {
|
|
516
|
+
let e = Ye(o, O), s = Math.abs(t[n] - e);
|
|
517
517
|
(i === void 0 || s <= i) && (r = a, i = s);
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
|
-
if (r > -1 && r !== n &&
|
|
521
|
+
if (r > -1 && r !== n && Ce(r), d) {
|
|
522
522
|
let t = E.current[r];
|
|
523
523
|
if (e(t)) {
|
|
524
524
|
let e = t.getBoundingClientRect();
|
|
525
|
-
|
|
525
|
+
j.current = e[O ? "height" : "width"] / 2;
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
528
|
}
|
|
529
|
-
function
|
|
530
|
-
let t =
|
|
529
|
+
function R(e) {
|
|
530
|
+
let t = Se(E.current?.[e]);
|
|
531
531
|
t && t.focus({
|
|
532
532
|
preventScroll: !0,
|
|
533
533
|
focusVisible: !1
|
|
534
534
|
});
|
|
535
535
|
}
|
|
536
|
-
function
|
|
536
|
+
function Ee(e, t, n) {
|
|
537
537
|
let r = pe(e.value, ae(t, n, void 0, { activeThumbIndex: e.thumbIndex }));
|
|
538
|
-
return r && (
|
|
538
|
+
return r && (M.current = e.value, P.current = Array.isArray(e.value) ? e.value : [e.value], e.didSwap && (Ce(e.thumbIndex), R(e.thumbIndex))), r;
|
|
539
539
|
}
|
|
540
|
-
let
|
|
541
|
-
let t = tt(e,
|
|
540
|
+
let De = c((e) => {
|
|
541
|
+
let t = tt(e, A);
|
|
542
542
|
if (t == null) return;
|
|
543
|
-
if (
|
|
544
|
-
|
|
543
|
+
if (xe.current += 1, e.type === "pointermove" && e.buttons === 0) {
|
|
544
|
+
z(e);
|
|
545
545
|
return;
|
|
546
546
|
}
|
|
547
|
-
let n =
|
|
548
|
-
n != null &&
|
|
549
|
-
}),
|
|
550
|
-
if (tt(e,
|
|
547
|
+
let n = I(t);
|
|
548
|
+
n != null && Ue(n.value, he, C) && (!u && xe.current > $e && fe(!0), Ee(n, ce, e));
|
|
549
|
+
}), z = c((e) => {
|
|
550
|
+
if (tt(e, A) == null) return;
|
|
551
551
|
de(-1), fe(!1), re.current = null;
|
|
552
|
-
let t =
|
|
553
|
-
if (Array.isArray(t) && t.length !== D.length && (
|
|
552
|
+
let t = M.current;
|
|
553
|
+
if (Array.isArray(t) && t.length !== D.length && (M.current = null), M.current != null) {
|
|
554
554
|
let t = b.current;
|
|
555
|
-
w(
|
|
555
|
+
w(M.current, ne(t, e));
|
|
556
556
|
}
|
|
557
|
-
"pointerType" in e && k.current?.hasPointerCapture(e.pointerId) && k.current?.releasePointerCapture(e.pointerId), ie.current = -1,
|
|
558
|
-
}),
|
|
559
|
-
|
|
560
|
-
}),
|
|
561
|
-
let t =
|
|
562
|
-
if (
|
|
563
|
-
if (
|
|
564
|
-
|
|
557
|
+
"pointerType" in e && k.current?.hasPointerCapture(e.pointerId) && k.current?.releasePointerCapture(e.pointerId), ie.current = -1, V();
|
|
558
|
+
}), Oe = c((e) => {
|
|
559
|
+
A.current ?? z(e);
|
|
560
|
+
}), B = c((e) => {
|
|
561
|
+
let t = N.current;
|
|
562
|
+
if (N.current = !1, l) return;
|
|
563
|
+
if (Te(y(e))) {
|
|
564
|
+
we();
|
|
565
565
|
return;
|
|
566
566
|
}
|
|
567
567
|
let n = e.changedTouches[0];
|
|
568
568
|
if (n == null) return;
|
|
569
|
-
if (
|
|
569
|
+
if (A.current = n.identifier, !t) {
|
|
570
570
|
let t = {
|
|
571
571
|
x: n.clientX,
|
|
572
572
|
y: n.clientY
|
|
573
573
|
};
|
|
574
|
-
|
|
575
|
-
let r =
|
|
574
|
+
L(t);
|
|
575
|
+
let r = I(t);
|
|
576
576
|
if (r == null) return;
|
|
577
|
-
|
|
577
|
+
R(r.thumbIndex), Ee(r, te, e), xe.current = 0;
|
|
578
578
|
}
|
|
579
579
|
let r = m(k.current);
|
|
580
|
-
r.addEventListener("touchmove",
|
|
581
|
-
}),
|
|
580
|
+
r.addEventListener("touchmove", De, { passive: !0 }), r.addEventListener("touchend", z, { passive: !0 }), r.addEventListener("touchcancel", z, { passive: !0 });
|
|
581
|
+
}), V = c(() => {
|
|
582
582
|
let e = m(k.current);
|
|
583
|
-
e.removeEventListener("pointermove",
|
|
584
|
-
}),
|
|
585
|
-
return
|
|
583
|
+
e.removeEventListener("pointermove", De), e.removeEventListener("pointerup", z), e.removeEventListener("pointercancel", Oe), e.removeEventListener("touchmove", De), e.removeEventListener("touchend", z), e.removeEventListener("touchcancel", z), A.current = null, oe.current = null, M.current = null, N.current = !1;
|
|
584
|
+
}), H = _();
|
|
585
|
+
return K.useEffect(() => {
|
|
586
586
|
let e = k.current;
|
|
587
|
-
if (!e) return () =>
|
|
588
|
-
let t = g(e, "touchstart",
|
|
587
|
+
if (!e) return () => V();
|
|
588
|
+
let t = g(e, "touchstart", B, { passive: !0 });
|
|
589
589
|
return () => {
|
|
590
|
-
t(),
|
|
590
|
+
t(), H.cancel(), V();
|
|
591
591
|
};
|
|
592
592
|
}, [
|
|
593
|
-
|
|
594
|
-
|
|
593
|
+
V,
|
|
594
|
+
B,
|
|
595
595
|
k,
|
|
596
|
-
|
|
597
|
-
]),
|
|
598
|
-
l &&
|
|
599
|
-
}, [l,
|
|
596
|
+
H
|
|
597
|
+
]), K.useEffect(() => {
|
|
598
|
+
l && V();
|
|
599
|
+
}, [l, V]), f("div", t, {
|
|
600
600
|
state: me,
|
|
601
601
|
ref: [
|
|
602
602
|
n,
|
|
603
603
|
se,
|
|
604
604
|
k,
|
|
605
|
-
|
|
605
|
+
be
|
|
606
606
|
],
|
|
607
607
|
props: [{
|
|
608
608
|
"data-base-ui-slider-control": le ? "" : void 0,
|
|
609
609
|
onPointerDown(t) {
|
|
610
|
-
|
|
610
|
+
N.current = !1;
|
|
611
611
|
let n = k.current, r = y(t.nativeEvent);
|
|
612
612
|
if (!n || l || t.defaultPrevented || !e(r) || t.button !== 0) return;
|
|
613
|
-
if (
|
|
614
|
-
|
|
613
|
+
if (Te(r)) {
|
|
614
|
+
we();
|
|
615
615
|
return;
|
|
616
616
|
}
|
|
617
617
|
let i = {
|
|
618
618
|
x: t.clientX,
|
|
619
619
|
y: t.clientY
|
|
620
620
|
};
|
|
621
|
-
|
|
622
|
-
let a =
|
|
621
|
+
L(i);
|
|
622
|
+
let a = I(i);
|
|
623
623
|
if (a == null) return;
|
|
624
|
-
p(E.current[a.thumbIndex], v(m(n))) ? t.preventDefault() :
|
|
625
|
-
|
|
626
|
-
}), fe(!0), re.current ??
|
|
624
|
+
p(E.current[a.thumbIndex], v(m(n))) ? t.preventDefault() : H.request(() => {
|
|
625
|
+
R(a.thumbIndex);
|
|
626
|
+
}), fe(!0), re.current ?? Ee(a, te, t.nativeEvent), t.nativeEvent.pointerId && n.setPointerCapture(t.nativeEvent.pointerId), xe.current = 0, N.current = Q(t.pointerType);
|
|
627
627
|
let o = m(n);
|
|
628
|
-
o.addEventListener("pointermove",
|
|
628
|
+
o.addEventListener("pointermove", De, { passive: !0 }), o.addEventListener("pointerup", z, { once: !0 }), o.addEventListener("pointercancel", Oe, { once: !0 });
|
|
629
629
|
}
|
|
630
630
|
}, s],
|
|
631
|
-
stateAttributesMapping:
|
|
631
|
+
stateAttributesMapping: We
|
|
632
632
|
});
|
|
633
633
|
});
|
|
634
634
|
process.env.NODE_ENV !== "production" && (nt.displayName = "SliderControl");
|
|
635
|
-
var rt = /*#__PURE__*/
|
|
636
|
-
let { render: n, className: r, style: i, ...a } = e, { state: o } =
|
|
635
|
+
var rt = /*#__PURE__*/ K.forwardRef(function(e, t) {
|
|
636
|
+
let { render: n, className: r, style: i, ...a } = e, { state: o } = Ke();
|
|
637
637
|
return f("div", e, {
|
|
638
638
|
state: o,
|
|
639
639
|
ref: t,
|
|
640
640
|
props: [{ style: { position: "relative" } }, a],
|
|
641
|
-
stateAttributesMapping:
|
|
641
|
+
stateAttributesMapping: We
|
|
642
642
|
});
|
|
643
643
|
});
|
|
644
644
|
process.env.NODE_ENV !== "production" && (rt.displayName = "SliderTrack");
|
|
645
645
|
var it = "data-index", at, ot = /* @__PURE__ */ new Set([
|
|
646
|
-
...
|
|
647
|
-
|
|
648
|
-
|
|
646
|
+
...he,
|
|
647
|
+
_e,
|
|
648
|
+
pe
|
|
649
649
|
]);
|
|
650
650
|
function st(e, t, n, r) {
|
|
651
|
-
if (!(t < 0)) return e.length === 2 ? `${
|
|
651
|
+
if (!(t < 0)) return e.length === 2 ? `${L(e[t], r, n)} ${t === 0 ? "start" : "end"} range` : n ? L(e[t], r, n) : void 0;
|
|
652
652
|
}
|
|
653
653
|
function ct(e, t, n, r, i) {
|
|
654
|
-
let a = e + t * n, o = Number(a.toFixed(Math.max(
|
|
655
|
-
return
|
|
654
|
+
let a = e + t * n, o = Number(a.toFixed(Math.max(Xe(e), Xe(t), Xe(r))));
|
|
655
|
+
return F(o, r, i);
|
|
656
656
|
}
|
|
657
|
-
var lt = /*#__PURE__*/
|
|
658
|
-
let { render: i, children: o, className: l, "aria-describedby": u, "aria-label": d, "aria-labelledby": m, "aria-valuetext": h, disabled: g = !1, getAriaLabel: _, getAriaValueText: v, id: y, index: b, inputRef: x, onBlur: S, onFocus: C, onKeyDown: w, tabIndex: te, style: ne, ...re } = e, ie = oe(y), { active: ae, lastUsedThumbIndex: se, controlRef: ce, disabled: le, validation: D, format: ve, handleInputChange: O, inset:
|
|
659
|
-
|
|
660
|
-
}),
|
|
661
|
-
|
|
662
|
-
}),
|
|
663
|
-
let e = ce.current, t =
|
|
657
|
+
var lt = /*#__PURE__*/ K.forwardRef(function(e, t) {
|
|
658
|
+
let { render: i, children: o, className: l, "aria-describedby": u, "aria-label": d, "aria-labelledby": m, "aria-valuetext": h, disabled: g = !1, getAriaLabel: _, getAriaValueText: v, id: y, index: b, inputRef: x, onBlur: S, onFocus: C, onKeyDown: w, tabIndex: te, style: ne, ...re } = e, ie = oe(y), { active: ae, lastUsedThumbIndex: se, controlRef: ce, disabled: le, validation: D, format: ve, handleInputChange: O, inset: k, isArrayValue: ye, labelId: be, largeStep: A, locale: j, max: N, min: P, minStepsBetweenValues: Se, form: Ce, name: F, orientation: we, pressedThumbCenterOffsetRef: Ee, pressedThumbIndexRef: De, renderBeforeHydration: z, setActive: Oe, setIndicatorPosition: B, state: V, step: H, thumbRefs: ke, values: U } = Ke(), Ae = ue(), je = g || le, W = U.length > 1, G = we === "vertical", Me = Ae === "rtl", { setTouched: Ne, validationMode: Pe } = Te(), Fe = K.useRef(null), Ie = K.useRef(null), Le = M(je, Ie), Y = K.useRef(!1), Be = c((e) => {
|
|
659
|
+
Y.current || C?.(e);
|
|
660
|
+
}), X = c((e) => {
|
|
661
|
+
Y.current || S?.(e);
|
|
662
|
+
}), Ve = oe(), Ue = R(), Z = W ? Ve : Ue, Ge = K.useMemo(() => ({ inputId: Z }), [Z]), { ref: qe, index: Je } = xe({ metadata: Ge }), Q = W ? b ?? Je : 0, Xe = Q === U.length - 1, $ = U[Q], Qe = I($, P, N), [$e, et] = K.useState(), tt = Re(), nt = se >= 0 && se < U.length ? se : -1, rt = c(() => {
|
|
663
|
+
let e = ce.current, t = Fe.current;
|
|
664
664
|
if (!e || !t) return;
|
|
665
|
-
let n = t.getBoundingClientRect(), r = e.getBoundingClientRect(), i =
|
|
666
|
-
et(s),
|
|
665
|
+
let n = t.getBoundingClientRect(), r = e.getBoundingClientRect(), i = G ? "height" : "width", a = r[i] - n[i], o = (n[i] / 2 + a * Qe / 100) / r[i] * 100, s = Number.isFinite(o) ? o : void 0;
|
|
666
|
+
et(s), Q === 0 ? B((e) => [s, e[1]]) : Xe && B((e) => [e[0], s]);
|
|
667
667
|
});
|
|
668
668
|
n(() => {
|
|
669
|
-
|
|
670
|
-
}, [rt,
|
|
671
|
-
|
|
669
|
+
k && queueMicrotask(rt);
|
|
670
|
+
}, [rt, k]), n(() => {
|
|
671
|
+
k && rt();
|
|
672
672
|
}, [
|
|
673
673
|
rt,
|
|
674
|
-
|
|
674
|
+
k,
|
|
675
675
|
Qe
|
|
676
676
|
]), n(() => {
|
|
677
|
-
if (!
|
|
678
|
-
let e = ce.current, t =
|
|
677
|
+
if (!k) return;
|
|
678
|
+
let e = ce.current, t = Fe.current;
|
|
679
679
|
if (!e || !t) return;
|
|
680
680
|
let n = r(e).ResizeObserver;
|
|
681
681
|
if (typeof n != "function") return;
|
|
@@ -686,84 +686,84 @@ var lt = /*#__PURE__*/ q.forwardRef(function(e, t) {
|
|
|
686
686
|
}, [
|
|
687
687
|
ce,
|
|
688
688
|
rt,
|
|
689
|
-
|
|
689
|
+
k
|
|
690
690
|
]);
|
|
691
|
-
let lt =
|
|
692
|
-
|
|
691
|
+
let lt = G ? "bottom" : "insetInlineStart", ut = G ? "left" : "top", dt;
|
|
692
|
+
W ? ae === Q ? dt = 2 : nt === Q && (dt = 1) : ae === Q && (dt = 1);
|
|
693
693
|
let ft;
|
|
694
|
-
ft = !
|
|
694
|
+
ft = !k && !Number.isFinite(Qe) ? T : {
|
|
695
695
|
position: "absolute",
|
|
696
|
-
[lt]:
|
|
696
|
+
[lt]: k ? "var(--position)" : `${Qe}%`,
|
|
697
697
|
[ut]: "50%",
|
|
698
|
-
translate: `${(
|
|
698
|
+
translate: `${(G || !Me ? -1 : 1) * 50}% ${(G ? 1 : -1) * 50}%`,
|
|
699
699
|
zIndex: dt,
|
|
700
|
-
...
|
|
700
|
+
...k && {
|
|
701
701
|
"--position": `${$e ?? 0}%`,
|
|
702
|
-
visibility:
|
|
702
|
+
visibility: z && tt || $e === void 0 ? "hidden" : void 0
|
|
703
703
|
}
|
|
704
704
|
};
|
|
705
705
|
let pt;
|
|
706
|
-
|
|
707
|
-
let mt = typeof _ == "function" ? _(
|
|
706
|
+
G && (pt = Me ? "vertical-rl" : "vertical-lr");
|
|
707
|
+
let mt = typeof _ == "function" ? _(Q) : d, ht = a({
|
|
708
708
|
"aria-label": mt,
|
|
709
|
-
"aria-labelledby": m ?? (mt == null ?
|
|
709
|
+
"aria-labelledby": m ?? (mt == null ? be : void 0),
|
|
710
710
|
"aria-describedby": u,
|
|
711
|
-
"aria-orientation":
|
|
712
|
-
"aria-valuenow":
|
|
713
|
-
"aria-valuetext": typeof v == "function" ? v(
|
|
714
|
-
disabled:
|
|
715
|
-
form:
|
|
716
|
-
id:
|
|
717
|
-
max:
|
|
718
|
-
min:
|
|
719
|
-
name:
|
|
711
|
+
"aria-orientation": we,
|
|
712
|
+
"aria-valuenow": $,
|
|
713
|
+
"aria-valuetext": typeof v == "function" ? v(L($, j, ve), $, Q) : h ?? st(U, Q, ve, j),
|
|
714
|
+
disabled: je,
|
|
715
|
+
form: Ce,
|
|
716
|
+
id: Z,
|
|
717
|
+
max: N,
|
|
718
|
+
min: P,
|
|
719
|
+
name: F,
|
|
720
720
|
onChange(e) {
|
|
721
|
-
O(e.currentTarget.valueAsNumber,
|
|
721
|
+
O(e.currentTarget.valueAsNumber, Q, e);
|
|
722
722
|
},
|
|
723
723
|
onFocus(e) {
|
|
724
|
-
let t =
|
|
725
|
-
|
|
724
|
+
let t = Y.current;
|
|
725
|
+
Y.current = !1, Oe(Q), Le(!0), t && e.stopPropagation();
|
|
726
726
|
},
|
|
727
727
|
onBlur(e) {
|
|
728
|
-
|
|
728
|
+
Y.current ? e.stopPropagation() : (Oe(-1), !ke.current.some((t) => p(t, e.relatedTarget)) && (Ne(!0), Le(!1), Pe === "onBlur" && D.commit(He($, Q, P, N, ye, U))));
|
|
729
729
|
},
|
|
730
730
|
onKeyDown(e) {
|
|
731
731
|
if (e.defaultPrevented || !ot.has(e.key)) return;
|
|
732
|
-
|
|
733
|
-
let t = null, n = 0, r = e.shiftKey ?
|
|
732
|
+
he.has(e.key) && e.stopPropagation();
|
|
733
|
+
let t = null, n = 0, r = e.shiftKey ? A : H, i = Ze($, H, P);
|
|
734
734
|
switch (e.key) {
|
|
735
|
-
case he:
|
|
736
|
-
n = 1;
|
|
737
|
-
break;
|
|
738
735
|
case de:
|
|
739
|
-
n =
|
|
736
|
+
n = 1;
|
|
740
737
|
break;
|
|
741
|
-
case
|
|
742
|
-
n = -1;
|
|
738
|
+
case fe:
|
|
739
|
+
n = Me ? -1 : 1;
|
|
743
740
|
break;
|
|
744
741
|
case me:
|
|
745
|
-
n =
|
|
742
|
+
n = -1;
|
|
746
743
|
break;
|
|
747
|
-
case
|
|
748
|
-
|
|
744
|
+
case ge:
|
|
745
|
+
n = Me ? 1 : -1;
|
|
749
746
|
break;
|
|
750
747
|
case _e:
|
|
751
|
-
r =
|
|
748
|
+
r = A, n = 1;
|
|
749
|
+
break;
|
|
750
|
+
case pe:
|
|
751
|
+
r = A, n = -1;
|
|
752
752
|
break;
|
|
753
753
|
case "End":
|
|
754
|
-
t =
|
|
754
|
+
t = W && Number.isFinite(U[Q + 1]) ? U[Q + 1] - H * Se : N;
|
|
755
755
|
break;
|
|
756
|
-
case
|
|
756
|
+
case E: t = W && Number.isFinite(U[Q - 1]) ? U[Q - 1] + H * Se : P;
|
|
757
757
|
}
|
|
758
|
-
if (n !== 0 && (t = ct(i, r, n,
|
|
758
|
+
if (n !== 0 && (t = ct(i, r, n, P, N)), t !== null) {
|
|
759
759
|
let n = e.currentTarget;
|
|
760
|
-
ee(n) || (
|
|
760
|
+
ee(n) || (Y.current = !0, n.blur(), n.focus({
|
|
761
761
|
preventScroll: !0,
|
|
762
762
|
focusVisible: !0
|
|
763
|
-
})), O(t,
|
|
763
|
+
})), O(t, Q, e), e.preventDefault();
|
|
764
764
|
}
|
|
765
765
|
},
|
|
766
|
-
step:
|
|
766
|
+
step: H,
|
|
767
767
|
style: {
|
|
768
768
|
...T,
|
|
769
769
|
width: "100%",
|
|
@@ -772,41 +772,41 @@ var lt = /*#__PURE__*/ q.forwardRef(function(e, t) {
|
|
|
772
772
|
},
|
|
773
773
|
tabIndex: te,
|
|
774
774
|
type: "range",
|
|
775
|
-
value:
|
|
776
|
-
}, (e) => D.getValidationProps(
|
|
777
|
-
onFocus:
|
|
778
|
-
onBlur:
|
|
775
|
+
value: $ ?? ""
|
|
776
|
+
}, (e) => D.getValidationProps(je, e), {
|
|
777
|
+
onFocus: Be,
|
|
778
|
+
onBlur: X,
|
|
779
779
|
onKeyDown: w
|
|
780
|
-
}), gt = s(
|
|
780
|
+
}), gt = s(Ie, D.inputRef, x);
|
|
781
781
|
return f("div", e, {
|
|
782
|
-
state:
|
|
782
|
+
state: V,
|
|
783
783
|
ref: [
|
|
784
784
|
t,
|
|
785
|
-
|
|
786
|
-
|
|
785
|
+
qe,
|
|
786
|
+
Fe
|
|
787
787
|
],
|
|
788
788
|
props: [{
|
|
789
|
-
[it]:
|
|
790
|
-
children: /*#__PURE__*/
|
|
789
|
+
[it]: Q,
|
|
790
|
+
children: /*#__PURE__*/ J(K.Fragment, { children: [
|
|
791
791
|
o,
|
|
792
|
-
/*#__PURE__*/
|
|
792
|
+
/*#__PURE__*/ q("input", {
|
|
793
793
|
ref: gt,
|
|
794
794
|
...ht,
|
|
795
795
|
suppressHydrationWarning: !0
|
|
796
796
|
}),
|
|
797
|
-
|
|
797
|
+
k && Xe && z && (at ||= /*#__PURE__*/ q(ze, { script: "" }))
|
|
798
798
|
] }),
|
|
799
799
|
id: ie,
|
|
800
800
|
onPointerDown(e) {
|
|
801
|
-
if (
|
|
802
|
-
|
|
803
|
-
let t =
|
|
804
|
-
|
|
801
|
+
if (je) return;
|
|
802
|
+
De.current = Q;
|
|
803
|
+
let t = Ye(e.currentTarget, G);
|
|
804
|
+
Ee.current = (G ? e.clientY : e.clientX) - t;
|
|
805
805
|
},
|
|
806
806
|
style: ft,
|
|
807
|
-
suppressHydrationWarning:
|
|
807
|
+
suppressHydrationWarning: z || void 0
|
|
808
808
|
}, re],
|
|
809
|
-
stateAttributesMapping:
|
|
809
|
+
stateAttributesMapping: We
|
|
810
810
|
});
|
|
811
811
|
});
|
|
812
812
|
process.env.NODE_ENV !== "production" && (lt.displayName = "SliderThumb");
|
|
@@ -818,8 +818,8 @@ function ut(e, t, n, r, i, a) {
|
|
|
818
818
|
}, s = `${r ?? 0}%`, c = `${(i ?? 0) - (r ?? 0)}%`;
|
|
819
819
|
return n && (o["--start-position"] = s, s = "var(--start-position)", t && (o["--relative-size"] = c, c = "var(--relative-size)")), o[e ? "bottom" : "insetInlineStart"] = t ? s : 0, o[e ? "height" : "width"] = t ? c : s, o;
|
|
820
820
|
}
|
|
821
|
-
var dt = /*#__PURE__*/
|
|
822
|
-
let { render: n, className: r, style: i, ...a } = e, { indicatorPosition: o, inset: s, max: c, min: l, orientation: u, renderBeforeHydration: d, state: p, values: m } =
|
|
821
|
+
var dt = /*#__PURE__*/ K.forwardRef(function(e, t) {
|
|
822
|
+
let { render: n, className: r, style: i, ...a } = e, { indicatorPosition: o, inset: s, max: c, min: l, orientation: u, renderBeforeHydration: d, state: p, values: m } = Ke(), h = Re(), ee = ut(u === "vertical", m.length > 1, s, s ? o[0] : I(m[0], l, c), s ? o[1] : I(m[m.length - 1], l, c), s && d && h);
|
|
823
823
|
return f("div", e, {
|
|
824
824
|
state: p,
|
|
825
825
|
ref: t,
|
|
@@ -828,17 +828,17 @@ var dt = /*#__PURE__*/ q.forwardRef(function(e, t) {
|
|
|
828
828
|
style: ee,
|
|
829
829
|
suppressHydrationWarning: d || void 0
|
|
830
830
|
}, a],
|
|
831
|
-
stateAttributesMapping:
|
|
831
|
+
stateAttributesMapping: We
|
|
832
832
|
});
|
|
833
833
|
});
|
|
834
834
|
process.env.NODE_ENV !== "production" && (dt.displayName = "SliderIndicator");
|
|
835
|
-
var ft =
|
|
836
|
-
let l =
|
|
835
|
+
var ft = K.forwardRef(function({ className: e, defaultValue: t, value: n, min: r = 0, max: a = 100, thumbAriaLabels: o, ...s }, c) {
|
|
836
|
+
let l = K.useMemo(() => Array.isArray(n) ? n : Array.isArray(t) ? t : [r], [
|
|
837
837
|
n,
|
|
838
838
|
t,
|
|
839
839
|
r
|
|
840
840
|
]);
|
|
841
|
-
return /* @__PURE__ */
|
|
841
|
+
return /* @__PURE__ */ q(Je, {
|
|
842
842
|
ref: c,
|
|
843
843
|
className: i("ck-slider", e),
|
|
844
844
|
"data-slot": "slider",
|
|
@@ -848,16 +848,16 @@ var ft = q.forwardRef(function({ className: e, defaultValue: t, value: n, min: r
|
|
|
848
848
|
max: a,
|
|
849
849
|
thumbAlignment: "edge",
|
|
850
850
|
...s,
|
|
851
|
-
children: /* @__PURE__ */
|
|
851
|
+
children: /* @__PURE__ */ J(nt, {
|
|
852
852
|
className: "ck-slider-control",
|
|
853
|
-
children: [/* @__PURE__ */
|
|
853
|
+
children: [/* @__PURE__ */ q(rt, {
|
|
854
854
|
"data-slot": "slider-track",
|
|
855
855
|
className: "ck-slider-track",
|
|
856
|
-
children: /* @__PURE__ */
|
|
856
|
+
children: /* @__PURE__ */ q(dt, {
|
|
857
857
|
"data-slot": "slider-range",
|
|
858
858
|
className: "ck-slider-range"
|
|
859
859
|
})
|
|
860
|
-
}), Array.from({ length: l.length }, (e, t) => /* @__PURE__ */
|
|
860
|
+
}), Array.from({ length: l.length }, (e, t) => /* @__PURE__ */ q(lt, {
|
|
861
861
|
"data-slot": "slider-thumb",
|
|
862
862
|
className: "ck-slider-thumb",
|
|
863
863
|
"aria-label": o?.[t] ?? (l.length > 1 ? `Value ${t + 1} of ${l.length}` : "Value")
|
|
@@ -880,29 +880,29 @@ var ht = [
|
|
|
880
880
|
{
|
|
881
881
|
value: "pen",
|
|
882
882
|
label: "Pen",
|
|
883
|
-
icon:
|
|
883
|
+
icon: B
|
|
884
884
|
},
|
|
885
885
|
{
|
|
886
886
|
value: "line",
|
|
887
887
|
label: "Line",
|
|
888
|
-
icon:
|
|
888
|
+
icon: je
|
|
889
889
|
},
|
|
890
890
|
{
|
|
891
891
|
value: "rect",
|
|
892
892
|
label: "Rectangle",
|
|
893
|
-
icon:
|
|
893
|
+
icon: H
|
|
894
894
|
},
|
|
895
895
|
{
|
|
896
896
|
value: "circle",
|
|
897
897
|
label: "Circle",
|
|
898
|
-
icon:
|
|
898
|
+
icon: U
|
|
899
899
|
},
|
|
900
900
|
{
|
|
901
901
|
value: "arrow",
|
|
902
902
|
label: "Arrow",
|
|
903
|
-
icon:
|
|
903
|
+
icon: Ae
|
|
904
904
|
}
|
|
905
|
-
], gt =
|
|
905
|
+
], gt = K.memo(function({ tools: e, colors: t, drawing: n, onSave: r, saveDisabled: i, onCancel: a }) {
|
|
906
906
|
let o = e ? ht.filter((t) => e.includes(t.value)) : ht;
|
|
907
907
|
function s(e) {
|
|
908
908
|
let t = e[0];
|
|
@@ -912,56 +912,56 @@ var ht = [
|
|
|
912
912
|
let t = e[0];
|
|
913
913
|
t && n.setColor(t);
|
|
914
914
|
}
|
|
915
|
-
return /* @__PURE__ */
|
|
915
|
+
return /* @__PURE__ */ J("div", {
|
|
916
916
|
className: "ck-annotation-toolbar",
|
|
917
917
|
role: "toolbar",
|
|
918
918
|
"aria-label": "Annotation tools",
|
|
919
919
|
children: [
|
|
920
|
-
/* @__PURE__ */
|
|
920
|
+
/* @__PURE__ */ q(N, {
|
|
921
921
|
value: [n.tool],
|
|
922
922
|
onValueChange: s,
|
|
923
923
|
size: "sm",
|
|
924
924
|
spacing: 1,
|
|
925
925
|
"aria-label": "Drawing tool",
|
|
926
|
-
children: o.map(({ value: e, label: t, icon: n }) => /* @__PURE__ */
|
|
927
|
-
render: /* @__PURE__ */
|
|
926
|
+
children: o.map(({ value: e, label: t, icon: n }) => /* @__PURE__ */ J(S, { children: [/* @__PURE__ */ q(x, {
|
|
927
|
+
render: /* @__PURE__ */ q(be, {
|
|
928
928
|
value: e,
|
|
929
929
|
"aria-label": t
|
|
930
930
|
}),
|
|
931
|
-
children: /* @__PURE__ */
|
|
931
|
+
children: /* @__PURE__ */ q(n, {
|
|
932
932
|
size: 16,
|
|
933
933
|
stroke: 2
|
|
934
934
|
})
|
|
935
|
-
}), /* @__PURE__ */
|
|
935
|
+
}), /* @__PURE__ */ q(b, { children: t })] }, e))
|
|
936
936
|
}),
|
|
937
|
-
/* @__PURE__ */
|
|
937
|
+
/* @__PURE__ */ q(C, {
|
|
938
938
|
orientation: "vertical",
|
|
939
939
|
className: "ck-annotation-separator"
|
|
940
940
|
}),
|
|
941
|
-
/* @__PURE__ */
|
|
941
|
+
/* @__PURE__ */ q(N, {
|
|
942
942
|
value: [n.color],
|
|
943
943
|
onValueChange: c,
|
|
944
944
|
size: "sm",
|
|
945
945
|
spacing: 1,
|
|
946
946
|
"aria-label": "Stroke color",
|
|
947
|
-
children: t.map((e) => /* @__PURE__ */
|
|
948
|
-
render: /* @__PURE__ */
|
|
947
|
+
children: t.map((e) => /* @__PURE__ */ J(S, { children: [/* @__PURE__ */ q(x, {
|
|
948
|
+
render: /* @__PURE__ */ q(be, {
|
|
949
949
|
value: e.value,
|
|
950
950
|
"aria-label": e.label
|
|
951
951
|
}),
|
|
952
|
-
children: /* @__PURE__ */
|
|
952
|
+
children: /* @__PURE__ */ q("span", {
|
|
953
953
|
className: "ck-annotation-swatch",
|
|
954
954
|
style: { "--ck-bg": e.value }
|
|
955
955
|
})
|
|
956
|
-
}), /* @__PURE__ */
|
|
956
|
+
}), /* @__PURE__ */ q(b, { children: e.label })] }, e.value))
|
|
957
957
|
}),
|
|
958
|
-
/* @__PURE__ */
|
|
958
|
+
/* @__PURE__ */ q(C, {
|
|
959
959
|
orientation: "vertical",
|
|
960
960
|
className: "ck-annotation-separator"
|
|
961
961
|
}),
|
|
962
|
-
/* @__PURE__ */
|
|
962
|
+
/* @__PURE__ */ J("div", {
|
|
963
963
|
className: "ck-annotation-stroke",
|
|
964
|
-
children: [/* @__PURE__ */
|
|
964
|
+
children: [/* @__PURE__ */ q(ft, {
|
|
965
965
|
className: "ck-annotation-slider",
|
|
966
966
|
value: [n.strokeWidth],
|
|
967
967
|
onValueChange: (e) => {
|
|
@@ -972,94 +972,94 @@ var ht = [
|
|
|
972
972
|
max: 12,
|
|
973
973
|
step: 1,
|
|
974
974
|
"aria-label": "Stroke width"
|
|
975
|
-
}), /* @__PURE__ */
|
|
975
|
+
}), /* @__PURE__ */ J("span", {
|
|
976
976
|
className: "ck-annotation-stroke-label",
|
|
977
977
|
children: [n.strokeWidth, "px"]
|
|
978
978
|
})]
|
|
979
979
|
}),
|
|
980
|
-
/* @__PURE__ */
|
|
980
|
+
/* @__PURE__ */ q(C, {
|
|
981
981
|
orientation: "vertical",
|
|
982
982
|
className: "ck-annotation-separator"
|
|
983
983
|
}),
|
|
984
|
-
/* @__PURE__ */
|
|
985
|
-
/* @__PURE__ */
|
|
986
|
-
render: /* @__PURE__ */
|
|
984
|
+
/* @__PURE__ */ J(D, { children: [
|
|
985
|
+
/* @__PURE__ */ J(S, { children: [/* @__PURE__ */ q(x, {
|
|
986
|
+
render: /* @__PURE__ */ q(d, {
|
|
987
987
|
variant: "outline",
|
|
988
988
|
size: "icon-sm",
|
|
989
989
|
"aria-label": "Undo",
|
|
990
990
|
onClick: () => n.undo(),
|
|
991
991
|
disabled: !n.canUndo
|
|
992
992
|
}),
|
|
993
|
-
children: /* @__PURE__ */
|
|
993
|
+
children: /* @__PURE__ */ q(W, {
|
|
994
994
|
size: 16,
|
|
995
995
|
stroke: 2
|
|
996
996
|
})
|
|
997
|
-
}), /* @__PURE__ */
|
|
997
|
+
}), /* @__PURE__ */ q(b, { children: /* @__PURE__ */ J("span", {
|
|
998
998
|
className: "ck-annotation-tooltip",
|
|
999
999
|
children: [
|
|
1000
1000
|
"Undo",
|
|
1001
1001
|
" ",
|
|
1002
|
-
/* @__PURE__ */
|
|
1002
|
+
/* @__PURE__ */ J(O, { children: [/* @__PURE__ */ q(z, { children: "⌘" }), /* @__PURE__ */ q(z, { children: "Z" })] })
|
|
1003
1003
|
]
|
|
1004
1004
|
}) })] }),
|
|
1005
|
-
/* @__PURE__ */
|
|
1006
|
-
render: /* @__PURE__ */
|
|
1005
|
+
/* @__PURE__ */ J(S, { children: [/* @__PURE__ */ q(x, {
|
|
1006
|
+
render: /* @__PURE__ */ q(d, {
|
|
1007
1007
|
variant: "outline",
|
|
1008
1008
|
size: "icon-sm",
|
|
1009
1009
|
"aria-label": "Redo",
|
|
1010
1010
|
onClick: () => n.redo(),
|
|
1011
1011
|
disabled: !n.canRedo
|
|
1012
1012
|
}),
|
|
1013
|
-
children: /* @__PURE__ */
|
|
1013
|
+
children: /* @__PURE__ */ q(ke, {
|
|
1014
1014
|
size: 16,
|
|
1015
1015
|
stroke: 2
|
|
1016
1016
|
})
|
|
1017
|
-
}), /* @__PURE__ */
|
|
1017
|
+
}), /* @__PURE__ */ q(b, { children: /* @__PURE__ */ J("span", {
|
|
1018
1018
|
className: "ck-annotation-tooltip",
|
|
1019
1019
|
children: [
|
|
1020
1020
|
"Redo",
|
|
1021
1021
|
" ",
|
|
1022
|
-
/* @__PURE__ */
|
|
1023
|
-
/* @__PURE__ */
|
|
1024
|
-
/* @__PURE__ */
|
|
1025
|
-
/* @__PURE__ */
|
|
1022
|
+
/* @__PURE__ */ J(O, { children: [
|
|
1023
|
+
/* @__PURE__ */ q(z, { children: "⌘" }),
|
|
1024
|
+
/* @__PURE__ */ q(z, { children: "⇧" }),
|
|
1025
|
+
/* @__PURE__ */ q(z, { children: "Z" })
|
|
1026
1026
|
] })
|
|
1027
1027
|
]
|
|
1028
1028
|
}) })] }),
|
|
1029
|
-
/* @__PURE__ */
|
|
1030
|
-
render: /* @__PURE__ */
|
|
1029
|
+
/* @__PURE__ */ J(S, { children: [/* @__PURE__ */ q(x, {
|
|
1030
|
+
render: /* @__PURE__ */ q(d, {
|
|
1031
1031
|
variant: "outline",
|
|
1032
1032
|
size: "icon-sm",
|
|
1033
1033
|
"aria-label": "Clear all",
|
|
1034
1034
|
onClick: () => n.clear(),
|
|
1035
1035
|
disabled: n.paths.length === 0
|
|
1036
1036
|
}),
|
|
1037
|
-
children: /* @__PURE__ */
|
|
1037
|
+
children: /* @__PURE__ */ q(G, {
|
|
1038
1038
|
size: 16,
|
|
1039
1039
|
stroke: 2
|
|
1040
1040
|
})
|
|
1041
|
-
}), /* @__PURE__ */
|
|
1041
|
+
}), /* @__PURE__ */ q(b, { children: "Clear all" })] })
|
|
1042
1042
|
] }),
|
|
1043
|
-
/* @__PURE__ */
|
|
1043
|
+
/* @__PURE__ */ q(C, {
|
|
1044
1044
|
orientation: "vertical",
|
|
1045
1045
|
className: "ck-annotation-separator"
|
|
1046
1046
|
}),
|
|
1047
|
-
r ? /* @__PURE__ */
|
|
1048
|
-
render: /* @__PURE__ */
|
|
1047
|
+
r ? /* @__PURE__ */ J(D, { children: [/* @__PURE__ */ J(S, { children: [/* @__PURE__ */ q(x, {
|
|
1048
|
+
render: /* @__PURE__ */ q(d, {
|
|
1049
1049
|
variant: "outline",
|
|
1050
1050
|
size: "icon-sm",
|
|
1051
1051
|
"aria-label": "Cancel",
|
|
1052
1052
|
onClick: a
|
|
1053
1053
|
}),
|
|
1054
|
-
children: /* @__PURE__ */
|
|
1054
|
+
children: /* @__PURE__ */ q(V, {
|
|
1055
1055
|
size: 16,
|
|
1056
1056
|
stroke: 2
|
|
1057
1057
|
})
|
|
1058
|
-
}), /* @__PURE__ */
|
|
1058
|
+
}), /* @__PURE__ */ q(b, { children: /* @__PURE__ */ J("span", {
|
|
1059
1059
|
className: "ck-annotation-tooltip",
|
|
1060
|
-
children: ["Cancel ", /* @__PURE__ */
|
|
1061
|
-
}) })] }), /* @__PURE__ */
|
|
1062
|
-
render: /* @__PURE__ */
|
|
1060
|
+
children: ["Cancel ", /* @__PURE__ */ q(z, { children: "Esc" })]
|
|
1061
|
+
}) })] }), /* @__PURE__ */ J(S, { children: [/* @__PURE__ */ q(x, {
|
|
1062
|
+
render: /* @__PURE__ */ q(d, {
|
|
1063
1063
|
size: "icon-sm",
|
|
1064
1064
|
"aria-label": "Save drawing",
|
|
1065
1065
|
"aria-disabled": i || void 0,
|
|
@@ -1068,26 +1068,26 @@ var ht = [
|
|
|
1068
1068
|
i || r();
|
|
1069
1069
|
}
|
|
1070
1070
|
}),
|
|
1071
|
-
children: /* @__PURE__ */
|
|
1071
|
+
children: /* @__PURE__ */ q(Oe, {
|
|
1072
1072
|
size: 16,
|
|
1073
1073
|
stroke: 2
|
|
1074
1074
|
})
|
|
1075
|
-
}), /* @__PURE__ */
|
|
1076
|
-
render: /* @__PURE__ */
|
|
1075
|
+
}), /* @__PURE__ */ q(b, { children: i ? "Draw something first" : "Save drawing" })] })] }) : /* @__PURE__ */ J(S, { children: [/* @__PURE__ */ q(x, {
|
|
1076
|
+
render: /* @__PURE__ */ q(d, {
|
|
1077
1077
|
variant: "outline",
|
|
1078
1078
|
size: "icon-sm",
|
|
1079
1079
|
"aria-label": "Cancel",
|
|
1080
1080
|
onClick: a
|
|
1081
1081
|
}),
|
|
1082
|
-
children: /* @__PURE__ */
|
|
1082
|
+
children: /* @__PURE__ */ q(V, {
|
|
1083
1083
|
size: 16,
|
|
1084
1084
|
stroke: 2
|
|
1085
1085
|
})
|
|
1086
|
-
}), /* @__PURE__ */
|
|
1086
|
+
}), /* @__PURE__ */ q(b, { children: /* @__PURE__ */ J("span", {
|
|
1087
1087
|
className: "ck-annotation-tooltip",
|
|
1088
|
-
children: ["Cancel ", /* @__PURE__ */
|
|
1088
|
+
children: ["Cancel ", /* @__PURE__ */ q(z, { children: "Esc" })]
|
|
1089
1089
|
}) })] })
|
|
1090
1090
|
]
|
|
1091
1091
|
});
|
|
1092
1092
|
});
|
|
1093
|
-
export {
|
|
1093
|
+
export { X as n, Y as r, gt as t };
|