@commentkit/comment-kit 0.7.5 → 0.7.7
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 +20 -1
- package/README.md +2 -2
- package/dist/angular.es.js +2 -2
- package/dist/comment-kit.es.js +3 -3
- package/dist/demo.es.js +2 -2
- package/dist/headless.es.js +2 -2
- 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-DgqxkHy8.js → annotation-toolbar-zeiCmKIr.js} +110 -109
- package/dist/shared/{attachment-refresh-DRX7dKDI.js → attachment-refresh-DAacLaRu.js} +1 -1
- package/dist/shared/{capture-privacy-DUROnio5.js → capture-privacy-CiOrcAlt.js} +38 -14
- package/dist/shared/{comment-drawing-canvas-hSdcLShI.js → comment-drawing-canvas-Btc12IsS.js} +2 -2
- package/dist/shared/{comment-image-lightbox-4zroOCCG.js → comment-image-lightbox--QpbcAtH.js} +2 -2
- package/dist/shared/{comment-images-content-D4hTya6e.js → comment-images-content-C_r4SHM-.js} +13 -13
- package/dist/shared/{comment-kit-core-D068rcdY.js → comment-kit-core-CmLUFujd.js} +382 -348
- package/dist/shared/{comment-kit-ui-BDzNt0jv.js → comment-kit-ui-BHwYuSIi.js} +5255 -5487
- package/dist/shared/{comment-screenshot-annotator-BGnu_NgP.js → comment-screenshot-annotator-zJZyO-XM.js} +2 -2
- package/dist/shared/{comment-screenshot-overlay-BCRmojWB.js → comment-screenshot-overlay-CoKTYB0J.js} +6 -6
- package/dist/shared/{dev-export-panel-CYmUKmIV.js → dev-export-panel-Cnt6oCZU.js} +4 -4
- package/dist/shared/{dev-grab-BYsCpsGI.js → dev-grab-B85jo9AS.js} +3 -3
- package/dist/shared/{element-selector-79Oo5pit.js → element-selector-Cng84xC7.js} +349 -347
- package/dist/shared/input-UPtAj0M6.js +111 -0
- package/dist/shared/{mount-ui-DuHk132g.js → mount-ui-Dz7FB_Ak.js} +4 -4
- package/dist/shared/{pusher-3jyUauYd.js → pusher-CnhQgAvF.js} +1 -1
- package/dist/shared/{realtime-DspH16g5.js → realtime-yGLX4wMK.js} +2 -2
- package/dist/shared/{screenshot-BIuEaRiu.js → screenshot-B5-hwpmt.js} +2 -2
- package/dist/shared/{shadow-root-3-yGIhMs.js → shadow-root-B58ZI2yz.js} +1 -1
- package/dist/shared/{token-session-_Pi4fOEi.js → token-session-D92MYbNu.js} +2 -2
- package/dist/shared/useLabelableId-8n0QmH8N.js +154 -0
- package/dist/shared/{websocket-manager-CvgZSo_L.js → websocket-manager-KhH4hL0Q.js} +2 -2
- package/dist/solid.es.js +2 -2
- package/dist/svelte.es.js +2 -2
- package/dist/types/core/api-client.d.ts +2 -0
- package/dist/types/core/comment-kit-core.d.ts +4 -2
- package/dist/types/core/types.d.ts +12 -5
- package/dist/types/core/write-access.d.ts +2 -0
- package/dist/vue.es.js +2 -2
- package/docs/api-reference.md +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { u as e } from "./comment-kit-core-
|
|
1
|
+
import { u as e } from "./comment-kit-core-CmLUFujd.js";
|
|
2
2
|
import { C as t, F as n, P as r, T as i, d as a, f as o, l as s, m as c, o as l, s as u, t as d, u as f } from "./button-D4GHW6oZ.js";
|
|
3
3
|
import { $t as p, Ct as m, Et as ee, Nt as h, Ot as g, Tt as _, Zt as v, en as te, i as y, o as b, r as x, t as S, x as C, xt as ne } from "./separator-UhJb0Row.js";
|
|
4
4
|
import { E as w, M as re, S as ie, h as ae, j as oe, n as se, t as ce, u as le, y as ue } from "./useValueChanged-DKq5cMot.js";
|
|
5
5
|
import { a as de } from "./ShadowRootContext-DD6a0QaI.js";
|
|
6
|
-
import { a as fe, i as pe, l as me, n as he, o as
|
|
7
|
-
import {
|
|
6
|
+
import { a as fe, i as pe, l as me, n as he, o as T, r as ge, s as E, t as D, u as _e } from "./button-group-BVR7iT-S.js";
|
|
7
|
+
import { a as ve, c as ye, i as O, n as be, r as k, t as xe, u as Se } from "./useLabelableId-8n0QmH8N.js";
|
|
8
|
+
import { A as Ce, D as A, E as j, M, O as N, b as we, d as P, f as Te, j as F, k as I, o as L, s as R, w as Ee, x as De, y as z } from "./comment-kit-ui-BHwYuSIi.js";
|
|
8
9
|
import { a as Oe, c as ke, d as B, l as V, n as Ae, o as H, r as je, s as U, t as Me, u as W } from "./annotation-icons-Dh-bmNYK.js";
|
|
9
10
|
import * as G from "react";
|
|
10
11
|
import { jsx as K, jsxs as q } from "react/jsx-runtime";
|
|
@@ -23,7 +24,7 @@ function Re() {
|
|
|
23
24
|
return !Le();
|
|
24
25
|
}
|
|
25
26
|
function ze(e) {
|
|
26
|
-
let { script: t } = e, { nonce: n } =
|
|
27
|
+
let { script: t } = e, { nonce: n } = Te();
|
|
27
28
|
return Re() ? /*#__PURE__*/ K("script", {
|
|
28
29
|
nonce: n,
|
|
29
30
|
dangerouslySetInnerHTML: { __html: t },
|
|
@@ -36,7 +37,7 @@ function Y() {
|
|
|
36
37
|
undone: [],
|
|
37
38
|
activePath: null,
|
|
38
39
|
tool: "pen",
|
|
39
|
-
color:
|
|
40
|
+
color: Ee,
|
|
40
41
|
strokeWidth: 3
|
|
41
42
|
}), r = G.useCallback((e) => {
|
|
42
43
|
n((t) => ({
|
|
@@ -191,7 +192,7 @@ var Z = () => null, We = {
|
|
|
191
192
|
minStepsBetweenValues: Z,
|
|
192
193
|
step: Z,
|
|
193
194
|
values: Z,
|
|
194
|
-
...
|
|
195
|
+
...Se
|
|
195
196
|
}, Ge = /*#__PURE__*/ G.createContext(void 0);
|
|
196
197
|
function Ke() {
|
|
197
198
|
let e = G.useContext(Ge);
|
|
@@ -199,10 +200,10 @@ function Ke() {
|
|
|
199
200
|
return e;
|
|
200
201
|
}
|
|
201
202
|
function qe(e, t) {
|
|
202
|
-
return e === t || Array.isArray(e) && Array.isArray(t) &&
|
|
203
|
+
return e === t || Array.isArray(e) && Array.isArray(t) && De(e, t);
|
|
203
204
|
}
|
|
204
205
|
var Je = /*#__PURE__*/ G.forwardRef(function(e, t) {
|
|
205
|
-
let { "aria-labelledby": r, className: i, defaultValue: a, disabled: c = !1, id: l, format: u, largeStep: d = 10, locale: f, render: ee, max: h = 100, min: g = 0, minStepsBetweenValues: _ = 0, form: te, name: y, onValueChange: b, onValueCommitted: x, orientation: S = "horizontal", step: C = 1, thumbCollisionBehavior: ne = "push", thumbAlignment: w = "center", value: le, style: de, ...fe } = e, pe = se(l), me =
|
|
206
|
+
let { "aria-labelledby": r, className: i, defaultValue: a, disabled: c = !1, id: l, format: u, largeStep: d = 10, locale: f, render: ee, max: h = 100, min: g = 0, minStepsBetweenValues: _ = 0, form: te, name: y, onValueChange: b, onValueCommitted: x, orientation: S = "horizontal", step: C = 1, thumbCollisionBehavior: ne = "push", thumbAlignment: w = "center", value: le, style: de, ...fe } = e, pe = se(l), me = z(pe), he = o(b), T = o(x), { clearErrors: ge } = k(), { state: E, disabled: D, name: _e, setTouched: ve, setDirty: xe, validityData: Se, validation: A } = ye(), { labelId: j } = be(), [M, Te] = G.useState(), F = r ?? we(j, M), I = D || c, L = _e ?? y, [R, Ee] = Ce({
|
|
206
207
|
controlled: le,
|
|
207
208
|
default: a ?? g,
|
|
208
209
|
name: "Slider"
|
|
@@ -217,9 +218,9 @@ var Je = /*#__PURE__*/ G.forwardRef(function(e, t) {
|
|
|
217
218
|
R
|
|
218
219
|
]), Be = Y ? X : X[0];
|
|
219
220
|
O(A.inputRef, pe, Be, void 0, !I, y), ce(Be, () => {
|
|
220
|
-
|
|
221
|
-
let e =
|
|
222
|
-
t = Array.isArray(Be) && Array.isArray(e) ? !
|
|
221
|
+
ge(L), A.change(Be);
|
|
222
|
+
let e = Se.initialValue, t;
|
|
223
|
+
t = Array.isArray(Be) && Array.isArray(e) ? !De(Be, e) : Be !== e, xe(t);
|
|
223
224
|
});
|
|
224
225
|
let Z = o((e, t) => {
|
|
225
226
|
if (Number.isNaN(e) || qe(e, R)) return !1;
|
|
@@ -230,12 +231,12 @@ var Je = /*#__PURE__*/ G.forwardRef(function(e, t) {
|
|
|
230
231
|
value: e,
|
|
231
232
|
name: L
|
|
232
233
|
}
|
|
233
|
-
}), t.event = i, he(e, t), !t.isCanceled && (je.current = t.reason,
|
|
234
|
+
}), t.event = i, he(e, t), !t.isCanceled && (je.current = t.reason, Ee(e), !0);
|
|
234
235
|
}), Ke = o((e, t, n) => {
|
|
235
236
|
let r = He(e, t, g, h, Y, X);
|
|
236
237
|
if (Ue(r, C, _)) {
|
|
237
238
|
let e = "key" in n ? ue : ae, i = Z(r, oe(e, n.nativeEvent, void 0, { activeThumbIndex: t }));
|
|
238
|
-
|
|
239
|
+
ve(!0), i && T(r, re(e, n.nativeEvent));
|
|
239
240
|
}
|
|
240
241
|
});
|
|
241
242
|
n(() => {
|
|
@@ -248,7 +249,7 @@ var Je = /*#__PURE__*/ G.forwardRef(function(e, t) {
|
|
|
248
249
|
Re
|
|
249
250
|
]);
|
|
250
251
|
let Je = G.useMemo(() => ({
|
|
251
|
-
...
|
|
252
|
+
...E,
|
|
252
253
|
activeThumbIndex: U,
|
|
253
254
|
disabled: I,
|
|
254
255
|
dragging: J,
|
|
@@ -259,7 +260,7 @@ var Je = /*#__PURE__*/ G.forwardRef(function(e, t) {
|
|
|
259
260
|
step: C,
|
|
260
261
|
values: X
|
|
261
262
|
}), [
|
|
262
|
-
|
|
263
|
+
E,
|
|
263
264
|
U,
|
|
264
265
|
I,
|
|
265
266
|
J,
|
|
@@ -291,7 +292,7 @@ var Je = /*#__PURE__*/ G.forwardRef(function(e, t) {
|
|
|
291
292
|
min: g,
|
|
292
293
|
minStepsBetweenValues: _,
|
|
293
294
|
name: L,
|
|
294
|
-
onValueCommitted:
|
|
295
|
+
onValueCommitted: T,
|
|
295
296
|
orientation: S,
|
|
296
297
|
pressedThumbCenterOffsetRef: V,
|
|
297
298
|
pressedThumbIndexRef: Ae,
|
|
@@ -301,7 +302,7 @@ var Je = /*#__PURE__*/ G.forwardRef(function(e, t) {
|
|
|
301
302
|
setActive: Re,
|
|
302
303
|
setDragging: Ne,
|
|
303
304
|
setIndicatorPosition: Le,
|
|
304
|
-
setLabelId:
|
|
305
|
+
setLabelId: Te,
|
|
305
306
|
setValue: Z,
|
|
306
307
|
state: Je,
|
|
307
308
|
step: C,
|
|
@@ -327,7 +328,7 @@ var Je = /*#__PURE__*/ G.forwardRef(function(e, t) {
|
|
|
327
328
|
g,
|
|
328
329
|
_,
|
|
329
330
|
L,
|
|
330
|
-
|
|
331
|
+
T,
|
|
331
332
|
S,
|
|
332
333
|
Y,
|
|
333
334
|
ze,
|
|
@@ -355,7 +356,7 @@ var Je = /*#__PURE__*/ G.forwardRef(function(e, t) {
|
|
|
355
356
|
});
|
|
356
357
|
return /*#__PURE__*/ K(Ge.Provider, {
|
|
357
358
|
value: Q,
|
|
358
|
-
children: /*#__PURE__*/ K(
|
|
359
|
+
children: /*#__PURE__*/ K(N, {
|
|
359
360
|
elementsRef: B,
|
|
360
361
|
onMapChange: Fe,
|
|
361
362
|
children: Ye
|
|
@@ -472,61 +473,61 @@ function tt(e, t) {
|
|
|
472
473
|
};
|
|
473
474
|
}
|
|
474
475
|
var nt = /*#__PURE__*/ G.forwardRef(function(e, n) {
|
|
475
|
-
let { render: r, className: a, style: c, ...l } = e, { disabled: u, dragging: d, inset: f, isArrayValue: h, lastChangeReasonRef: y, max: b, min: x, minStepsBetweenValues: S, onValueCommitted: C, orientation: ne, pressedThumbCenterOffsetRef: ie, pressedThumbIndexRef: ae, pressedValuesRef: se, registerFieldControlRef: ce, renderBeforeHydration: ue, setActive: fe, setDragging: pe, setValue: me, state: he, step:
|
|
476
|
+
let { render: r, className: a, style: c, ...l } = e, { disabled: u, dragging: d, inset: f, isArrayValue: h, lastChangeReasonRef: y, max: b, min: x, minStepsBetweenValues: S, onValueCommitted: C, orientation: ne, pressedThumbCenterOffsetRef: ie, pressedThumbIndexRef: ae, pressedValuesRef: se, registerFieldControlRef: ce, renderBeforeHydration: ue, setActive: fe, setDragging: pe, setValue: me, state: he, step: T, thumbCollisionBehavior: ge, thumbRefs: E, values: D } = Ke(), _e = de(), ve = D.length > 1, ye = ne === "vertical", O = G.useRef(null), be = G.useRef(null), k = o((e) => {
|
|
476
477
|
e && be.current == null && (be.current = t(e).getComputedStyle(e));
|
|
477
|
-
}),
|
|
478
|
-
function
|
|
478
|
+
}), xe = G.useRef(null), Se = G.useRef(0), Ce = G.useRef(0), A = G.useRef(null), j = G.useRef(!1), M = ee(D);
|
|
479
|
+
function N(e) {
|
|
479
480
|
return e?.querySelector("input[type=\"range\"]");
|
|
480
481
|
}
|
|
481
482
|
function we(e) {
|
|
482
|
-
ae.current = e,
|
|
483
|
+
ae.current = e, E.current[e] || (ie.current = null);
|
|
483
484
|
}
|
|
484
|
-
function
|
|
485
|
+
function Te() {
|
|
485
486
|
ae.current = -1, ie.current = null;
|
|
486
487
|
}
|
|
487
|
-
function
|
|
488
|
-
return i(e) ?
|
|
488
|
+
function F(e) {
|
|
489
|
+
return i(e) ? E.current.some((t) => !i(t) || !p(t, e) ? !1 : N(t)?.disabled === !0) : !1;
|
|
489
490
|
}
|
|
490
491
|
function I(e) {
|
|
491
492
|
let t = O.current, n = ae.current;
|
|
492
|
-
if (!t || n < 0 || n >=
|
|
493
|
-
let { width: r, height: i, bottom: a, left: o, right: s } = t.getBoundingClientRect(), c = et(be.current,
|
|
494
|
-
return g = Ze(g,
|
|
493
|
+
if (!t || n < 0 || n >= D.length) return n >= D.length && (A.current = null), null;
|
|
494
|
+
let { width: r, height: i, bottom: a, left: o, right: s } = t.getBoundingClientRect(), c = et(be.current, ye), l = Ce.current, u = (ye ? i : r) - c.start - c.end - l * 2, d = ie.current ?? 0, f = e.x - d, p = e.y - d, m = ye ? a - p - c.end : (_e === "rtl" ? s - f : f - o) - c.start, ee = P((m - l) / u, 0, 1), g = (b - x) * ee + x;
|
|
495
|
+
return g = Ze(g, T, x), g = P(g, x, b), ve ? Qe(ge, D, M.current, se.current, n, g, x, b, T, S) : {
|
|
495
496
|
value: h ? [g] : g,
|
|
496
497
|
thumbIndex: n,
|
|
497
498
|
didSwap: !1
|
|
498
499
|
};
|
|
499
500
|
}
|
|
500
501
|
function L(e) {
|
|
501
|
-
se.current =
|
|
502
|
+
se.current = ve ? D.slice() : null, A.current = null, M.current = D;
|
|
502
503
|
let t = ae.current, n = t;
|
|
503
|
-
if (t > -1 && t <
|
|
504
|
-
if (
|
|
504
|
+
if (t > -1 && t < D.length) {
|
|
505
|
+
if (D[t] === b) {
|
|
505
506
|
let e = t;
|
|
506
|
-
for (; e > 0 &&
|
|
507
|
+
for (; e > 0 && D[e - 1] === b;) --e;
|
|
507
508
|
n = e;
|
|
508
509
|
}
|
|
509
510
|
} else {
|
|
510
|
-
let t =
|
|
511
|
+
let t = ye ? "y" : "x", r;
|
|
511
512
|
n = -1;
|
|
512
|
-
for (let a = 0; a <
|
|
513
|
-
let o =
|
|
514
|
-
if (i(o) && !
|
|
515
|
-
let i = Ye(o,
|
|
513
|
+
for (let a = 0; a < E.current.length; a += 1) {
|
|
514
|
+
let o = E.current[a];
|
|
515
|
+
if (i(o) && !N(o)?.disabled) {
|
|
516
|
+
let i = Ye(o, ye), s = Math.abs(e[t] - i);
|
|
516
517
|
(r === void 0 || s <= r) && (n = a, r = s);
|
|
517
518
|
}
|
|
518
519
|
}
|
|
519
520
|
}
|
|
520
521
|
if (n > -1 && n !== t && we(n), f) {
|
|
521
|
-
let e =
|
|
522
|
+
let e = E.current[n];
|
|
522
523
|
if (i(e)) {
|
|
523
524
|
let t = e.getBoundingClientRect();
|
|
524
|
-
|
|
525
|
+
Ce.current = t[ye ? "height" : "width"] / 2;
|
|
525
526
|
}
|
|
526
527
|
}
|
|
527
528
|
}
|
|
528
529
|
function R(e) {
|
|
529
|
-
let t =
|
|
530
|
+
let t = N(E.current?.[e]);
|
|
530
531
|
t && t.focus({
|
|
531
532
|
preventScroll: !0,
|
|
532
533
|
focusVisible: !1
|
|
@@ -534,38 +535,38 @@ var nt = /*#__PURE__*/ G.forwardRef(function(e, n) {
|
|
|
534
535
|
}
|
|
535
536
|
function Ee(e, t, n) {
|
|
536
537
|
let r = me(e.value, oe(t, n, void 0, { activeThumbIndex: e.thumbIndex }));
|
|
537
|
-
return r && (
|
|
538
|
+
return r && (A.current = e.value, M.current = Array.isArray(e.value) ? e.value : [e.value], e.didSwap && (we(e.thumbIndex), R(e.thumbIndex))), r;
|
|
538
539
|
}
|
|
539
540
|
let De = o((e) => {
|
|
540
|
-
let t = tt(e,
|
|
541
|
+
let t = tt(e, xe);
|
|
541
542
|
if (t == null) return;
|
|
542
|
-
if (
|
|
543
|
+
if (Se.current += 1, e.type === "pointermove" && e.buttons === 0) {
|
|
543
544
|
z(e);
|
|
544
545
|
return;
|
|
545
546
|
}
|
|
546
547
|
let n = I(t);
|
|
547
|
-
n != null && Ue(n.value,
|
|
548
|
+
n != null && Ue(n.value, T, S) && (!d && Se.current > $e && pe(!0), Ee(n, le, e));
|
|
548
549
|
}), z = o((e) => {
|
|
549
|
-
if (tt(e,
|
|
550
|
+
if (tt(e, xe) == null) return;
|
|
550
551
|
fe(-1), pe(!1), ie.current = null;
|
|
551
|
-
let t =
|
|
552
|
-
if (Array.isArray(t) && t.length !==
|
|
552
|
+
let t = A.current;
|
|
553
|
+
if (Array.isArray(t) && t.length !== D.length && (A.current = null), A.current != null) {
|
|
553
554
|
let t = y.current;
|
|
554
|
-
C(
|
|
555
|
+
C(A.current, re(t, e));
|
|
555
556
|
}
|
|
556
557
|
"pointerType" in e && O.current?.hasPointerCapture(e.pointerId) && O.current?.releasePointerCapture(e.pointerId), ae.current = -1, B();
|
|
557
558
|
}), Oe = o((e) => {
|
|
558
|
-
|
|
559
|
+
xe.current ?? z(e);
|
|
559
560
|
}), ke = o((e) => {
|
|
560
|
-
let t =
|
|
561
|
-
if (
|
|
562
|
-
if (
|
|
563
|
-
|
|
561
|
+
let t = j.current;
|
|
562
|
+
if (j.current = !1, u) return;
|
|
563
|
+
if (F(te(e))) {
|
|
564
|
+
Te();
|
|
564
565
|
return;
|
|
565
566
|
}
|
|
566
567
|
let n = e.changedTouches[0];
|
|
567
568
|
if (n == null) return;
|
|
568
|
-
if (
|
|
569
|
+
if (xe.current = n.identifier, !t) {
|
|
569
570
|
let t = {
|
|
570
571
|
x: n.clientX,
|
|
571
572
|
y: n.clientY
|
|
@@ -573,13 +574,13 @@ var nt = /*#__PURE__*/ G.forwardRef(function(e, n) {
|
|
|
573
574
|
L(t);
|
|
574
575
|
let r = I(t);
|
|
575
576
|
if (r == null) return;
|
|
576
|
-
R(r.thumbIndex), Ee(r, w, e),
|
|
577
|
+
R(r.thumbIndex), Ee(r, w, e), Se.current = 0;
|
|
577
578
|
}
|
|
578
579
|
let r = m(O.current);
|
|
579
580
|
r.addEventListener("touchmove", De, { passive: !0 }), r.addEventListener("touchend", z, { passive: !0 }), r.addEventListener("touchcancel", z, { passive: !0 });
|
|
580
581
|
}), B = o(() => {
|
|
581
582
|
let e = m(O.current);
|
|
582
|
-
e.removeEventListener("pointermove", De), e.removeEventListener("pointerup", z), e.removeEventListener("pointercancel", Oe), e.removeEventListener("touchmove", De), e.removeEventListener("touchend", z), e.removeEventListener("touchcancel", z),
|
|
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), xe.current = null, se.current = null, A.current = null, j.current = !1;
|
|
583
584
|
}), V = _();
|
|
584
585
|
return G.useEffect(() => {
|
|
585
586
|
let e = O.current;
|
|
@@ -601,16 +602,16 @@ var nt = /*#__PURE__*/ G.forwardRef(function(e, n) {
|
|
|
601
602
|
n,
|
|
602
603
|
ce,
|
|
603
604
|
O,
|
|
604
|
-
|
|
605
|
+
k
|
|
605
606
|
],
|
|
606
607
|
props: [{
|
|
607
608
|
"data-base-ui-slider-control": ue ? "" : void 0,
|
|
608
609
|
onPointerDown(e) {
|
|
609
|
-
|
|
610
|
+
j.current = !1;
|
|
610
611
|
let t = O.current, n = te(e.nativeEvent);
|
|
611
612
|
if (!t || u || e.defaultPrevented || !i(n) || e.button !== 0) return;
|
|
612
|
-
if (
|
|
613
|
-
|
|
613
|
+
if (F(n)) {
|
|
614
|
+
Te();
|
|
614
615
|
return;
|
|
615
616
|
}
|
|
616
617
|
let r = {
|
|
@@ -620,9 +621,9 @@ var nt = /*#__PURE__*/ G.forwardRef(function(e, n) {
|
|
|
620
621
|
L(r);
|
|
621
622
|
let a = I(r);
|
|
622
623
|
if (a == null) return;
|
|
623
|
-
p(
|
|
624
|
+
p(E.current[a.thumbIndex], v(m(t))) ? e.preventDefault() : V.request(() => {
|
|
624
625
|
R(a.thumbIndex);
|
|
625
|
-
}), pe(!0), ie.current ?? Ee(a, w, e.nativeEvent), e.nativeEvent.pointerId && t.setPointerCapture(e.nativeEvent.pointerId),
|
|
626
|
+
}), pe(!0), ie.current ?? Ee(a, w, e.nativeEvent), e.nativeEvent.pointerId && t.setPointerCapture(e.nativeEvent.pointerId), Se.current = 0, j.current = Q(e.pointerType);
|
|
626
627
|
let o = m(t);
|
|
627
628
|
o.addEventListener("pointermove", De, { passive: !0 }), o.addEventListener("pointerup", z, { once: !0 }), o.addEventListener("pointercancel", Oe, { once: !0 });
|
|
628
629
|
}
|
|
@@ -638,38 +639,38 @@ var nt = /*#__PURE__*/ G.forwardRef(function(e, n) {
|
|
|
638
639
|
stateAttributesMapping: We
|
|
639
640
|
});
|
|
640
641
|
}), it = "data-index", at, ot = /* @__PURE__ */ new Set([
|
|
641
|
-
...
|
|
642
|
-
|
|
642
|
+
...T,
|
|
643
|
+
_e,
|
|
643
644
|
me
|
|
644
645
|
]);
|
|
645
646
|
function st(e, t, n, r) {
|
|
646
|
-
if (!(t < 0)) return e.length === 2 ? `${
|
|
647
|
+
if (!(t < 0)) return e.length === 2 ? `${R(e[t], r, n)} ${t === 0 ? "start" : "end"} range` : n ? R(e[t], r, n) : void 0;
|
|
647
648
|
}
|
|
648
649
|
function ct(e, t, n, r, i) {
|
|
649
650
|
let a = e + t * n, o = Number(a.toFixed(Math.max(Xe(e), Xe(t), Xe(r))));
|
|
650
651
|
return P(o, r, i);
|
|
651
652
|
}
|
|
652
653
|
var lt = /*#__PURE__*/ G.forwardRef(function(e, r) {
|
|
653
|
-
let { render: i, children: a, className: l, "aria-describedby": u, "aria-label": d, "aria-labelledby": m, "aria-valuetext": ee, disabled: g = !1, getAriaLabel: _, getAriaValueText: v, id: te, index: y, inputRef: b, onBlur: x, onFocus: S, onKeyDown: C, tabIndex: w, style: re, ...ie } = e, ae = se(te), { active: oe, lastUsedThumbIndex: ce, controlRef: le, disabled: ue, validation:
|
|
654
|
+
let { render: i, children: a, className: l, "aria-describedby": u, "aria-label": d, "aria-labelledby": m, "aria-valuetext": ee, disabled: g = !1, getAriaLabel: _, getAriaValueText: v, id: te, index: y, inputRef: b, onBlur: x, onFocus: S, onKeyDown: C, tabIndex: w, style: re, ...ie } = e, ae = se(te), { active: oe, lastUsedThumbIndex: ce, controlRef: le, disabled: ue, validation: D, format: O, handleInputChange: be, inset: k, isArrayValue: Se, labelId: Ce, largeStep: A, locale: j, max: M, min: N, minStepsBetweenValues: we, form: P, name: Te, orientation: F, pressedThumbCenterOffsetRef: Ee, pressedThumbIndexRef: De, renderBeforeHydration: z, setActive: Oe, setIndicatorPosition: ke, state: B, step: V, thumbRefs: Ae, values: H } = Ke(), je = de(), U = g || ue, Me = H.length > 1, W = F === "vertical", J = je === "rtl", { setTouched: Ne, validationMode: Pe } = ye(), Fe = G.useRef(null), Ie = G.useRef(null), Le = ve(U, Ie), Y = G.useRef(!1), X = o((e) => {
|
|
654
655
|
Y.current || S?.(e);
|
|
655
656
|
}), Be = o((e) => {
|
|
656
657
|
Y.current || x?.(e);
|
|
657
|
-
}), Ve = se(), Ue =
|
|
658
|
+
}), Ve = se(), Ue = xe(), Z = Me ? Ve : Ue, Ge = G.useMemo(() => ({ inputId: Z }), [Z]), { ref: qe, index: Je } = I({ metadata: Ge }), Q = Me ? y ?? Je : 0, Xe = Q === H.length - 1, $ = H[Q], Qe = L($, N, M), [$e, et] = G.useState(), tt = Re(), nt = ce >= 0 && ce < H.length ? ce : -1, rt = o(() => {
|
|
658
659
|
let e = le.current, t = Fe.current;
|
|
659
660
|
if (!e || !t) return;
|
|
660
661
|
let n = t.getBoundingClientRect(), r = e.getBoundingClientRect(), i = W ? "height" : "width", a = r[i] - n[i], o = (n[i] / 2 + a * Qe / 100) / r[i] * 100, s = Number.isFinite(o) ? o : void 0;
|
|
661
662
|
et(s), Q === 0 ? ke((e) => [s, e[1]]) : Xe && ke((e) => [e[0], s]);
|
|
662
663
|
});
|
|
663
664
|
n(() => {
|
|
664
|
-
|
|
665
|
-
}, [rt,
|
|
666
|
-
|
|
665
|
+
k && queueMicrotask(rt);
|
|
666
|
+
}, [rt, k]), n(() => {
|
|
667
|
+
k && rt();
|
|
667
668
|
}, [
|
|
668
669
|
rt,
|
|
669
|
-
|
|
670
|
+
k,
|
|
670
671
|
Qe
|
|
671
672
|
]), n(() => {
|
|
672
|
-
if (!
|
|
673
|
+
if (!k) return;
|
|
673
674
|
let e = le.current, n = Fe.current;
|
|
674
675
|
if (!e || !n) return;
|
|
675
676
|
let r = t(e).ResizeObserver;
|
|
@@ -681,18 +682,18 @@ var lt = /*#__PURE__*/ G.forwardRef(function(e, r) {
|
|
|
681
682
|
}, [
|
|
682
683
|
le,
|
|
683
684
|
rt,
|
|
684
|
-
|
|
685
|
+
k
|
|
685
686
|
]);
|
|
686
687
|
let lt = W ? "bottom" : "insetInlineStart", ut = W ? "left" : "top", dt;
|
|
687
688
|
Me ? oe === Q ? dt = 2 : nt === Q && (dt = 1) : oe === Q && (dt = 1);
|
|
688
689
|
let ft;
|
|
689
|
-
ft = !
|
|
690
|
+
ft = !k && !Number.isFinite(Qe) ? ne : {
|
|
690
691
|
position: "absolute",
|
|
691
|
-
[lt]:
|
|
692
|
+
[lt]: k ? "var(--position)" : `${Qe}%`,
|
|
692
693
|
[ut]: "50%",
|
|
693
694
|
translate: `${(W || !J ? -1 : 1) * 50}% ${(W ? 1 : -1) * 50}%`,
|
|
694
695
|
zIndex: dt,
|
|
695
|
-
...
|
|
696
|
+
...k && {
|
|
696
697
|
"--position": `${$e ?? 0}%`,
|
|
697
698
|
visibility: z && tt || $e === void 0 ? "hidden" : void 0
|
|
698
699
|
}
|
|
@@ -701,31 +702,31 @@ var lt = /*#__PURE__*/ G.forwardRef(function(e, r) {
|
|
|
701
702
|
W && (pt = J ? "vertical-rl" : "vertical-lr");
|
|
702
703
|
let mt = typeof _ == "function" ? _(Q) : d, ht = f({
|
|
703
704
|
"aria-label": mt,
|
|
704
|
-
"aria-labelledby": m ?? (mt == null ?
|
|
705
|
+
"aria-labelledby": m ?? (mt == null ? Ce : void 0),
|
|
705
706
|
"aria-describedby": u,
|
|
706
707
|
"aria-orientation": F,
|
|
707
708
|
"aria-valuenow": $,
|
|
708
|
-
"aria-valuetext": typeof v == "function" ? v(
|
|
709
|
+
"aria-valuetext": typeof v == "function" ? v(R($, j, O), $, Q) : ee ?? st(H, Q, O, j),
|
|
709
710
|
disabled: U,
|
|
710
|
-
form:
|
|
711
|
+
form: P,
|
|
711
712
|
id: Z,
|
|
712
713
|
max: M,
|
|
713
714
|
min: N,
|
|
714
|
-
name:
|
|
715
|
+
name: Te,
|
|
715
716
|
onChange(e) {
|
|
716
|
-
|
|
717
|
+
be(e.currentTarget.valueAsNumber, Q, e);
|
|
717
718
|
},
|
|
718
719
|
onFocus(e) {
|
|
719
720
|
let t = Y.current;
|
|
720
721
|
Y.current = !1, Oe(Q), Le(!0), t && e.stopPropagation();
|
|
721
722
|
},
|
|
722
723
|
onBlur(e) {
|
|
723
|
-
Y.current ? e.stopPropagation() : (Oe(-1), !Ae.current.some((t) => p(t, e.relatedTarget)) && (Ne(!0), Le(!1), Pe === "onBlur" &&
|
|
724
|
+
Y.current ? e.stopPropagation() : (Oe(-1), !Ae.current.some((t) => p(t, e.relatedTarget)) && (Ne(!0), Le(!1), Pe === "onBlur" && D.commit(He($, Q, N, M, Se, H))));
|
|
724
725
|
},
|
|
725
726
|
onKeyDown(e) {
|
|
726
727
|
if (e.defaultPrevented || !ot.has(e.key)) return;
|
|
727
|
-
|
|
728
|
-
let t = null, n = 0, r = e.shiftKey ?
|
|
728
|
+
T.has(e.key) && e.stopPropagation();
|
|
729
|
+
let t = null, n = 0, r = e.shiftKey ? A : V, i = Ze($, V, N);
|
|
729
730
|
switch (e.key) {
|
|
730
731
|
case fe:
|
|
731
732
|
n = 1;
|
|
@@ -736,26 +737,26 @@ var lt = /*#__PURE__*/ G.forwardRef(function(e, r) {
|
|
|
736
737
|
case he:
|
|
737
738
|
n = -1;
|
|
738
739
|
break;
|
|
739
|
-
case
|
|
740
|
+
case ge:
|
|
740
741
|
n = J ? 1 : -1;
|
|
741
742
|
break;
|
|
742
|
-
case
|
|
743
|
-
r =
|
|
743
|
+
case _e:
|
|
744
|
+
r = A, n = 1;
|
|
744
745
|
break;
|
|
745
746
|
case me:
|
|
746
|
-
r =
|
|
747
|
+
r = A, n = -1;
|
|
747
748
|
break;
|
|
748
749
|
case "End":
|
|
749
|
-
t = Me && Number.isFinite(H[Q + 1]) ? H[Q + 1] - V *
|
|
750
|
+
t = Me && Number.isFinite(H[Q + 1]) ? H[Q + 1] - V * we : M;
|
|
750
751
|
break;
|
|
751
|
-
case
|
|
752
|
+
case E: t = Me && Number.isFinite(H[Q - 1]) ? H[Q - 1] + V * we : N;
|
|
752
753
|
}
|
|
753
754
|
if (n !== 0 && (t = ct(i, r, n, N, M)), t !== null) {
|
|
754
755
|
let n = e.currentTarget;
|
|
755
756
|
h(n) || (Y.current = !0, n.blur(), n.focus({
|
|
756
757
|
preventScroll: !0,
|
|
757
758
|
focusVisible: !0
|
|
758
|
-
})),
|
|
759
|
+
})), be(t, Q, e), e.preventDefault();
|
|
759
760
|
}
|
|
760
761
|
},
|
|
761
762
|
step: V,
|
|
@@ -768,11 +769,11 @@ var lt = /*#__PURE__*/ G.forwardRef(function(e, r) {
|
|
|
768
769
|
tabIndex: w,
|
|
769
770
|
type: "range",
|
|
770
771
|
value: $ ?? ""
|
|
771
|
-
}, (e) =>
|
|
772
|
+
}, (e) => D.getValidationProps(U, e), {
|
|
772
773
|
onFocus: X,
|
|
773
774
|
onBlur: Be,
|
|
774
775
|
onKeyDown: C
|
|
775
|
-
}), gt = c(Ie,
|
|
776
|
+
}), gt = c(Ie, D.inputRef, b);
|
|
776
777
|
return s("div", e, {
|
|
777
778
|
state: B,
|
|
778
779
|
ref: [
|
|
@@ -789,7 +790,7 @@ var lt = /*#__PURE__*/ G.forwardRef(function(e, r) {
|
|
|
789
790
|
...ht,
|
|
790
791
|
suppressHydrationWarning: !0
|
|
791
792
|
}),
|
|
792
|
-
|
|
793
|
+
k && Xe && z && (at ||= /*#__PURE__*/ K(ze, { script: "" }))
|
|
793
794
|
] }),
|
|
794
795
|
id: ae,
|
|
795
796
|
onPointerDown(e) {
|
|
@@ -813,7 +814,7 @@ function ut(e, t, n, r, i, a) {
|
|
|
813
814
|
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;
|
|
814
815
|
}
|
|
815
816
|
var dt = /*#__PURE__*/ G.forwardRef(function(e, t) {
|
|
816
|
-
let { render: n, className: r, style: i, ...a } = e, { indicatorPosition: o, inset: c, max: l, min: u, orientation: d, renderBeforeHydration: f, state: p, values: m } = Ke(), ee = Re(), h = ut(d === "vertical", m.length > 1, c, c ? o[0] :
|
|
817
|
+
let { render: n, className: r, style: i, ...a } = e, { indicatorPosition: o, inset: c, max: l, min: u, orientation: d, renderBeforeHydration: f, state: p, values: m } = Ke(), ee = Re(), h = ut(d === "vertical", m.length > 1, c, c ? o[0] : L(m[0], u, l), c ? o[1] : L(m[m.length - 1], u, l), c && f && ee);
|
|
817
818
|
return s("div", e, {
|
|
818
819
|
state: p,
|
|
819
820
|
ref: t,
|
|
@@ -909,14 +910,14 @@ var ht = [
|
|
|
909
910
|
role: "toolbar",
|
|
910
911
|
"aria-label": "Annotation tools",
|
|
911
912
|
children: [
|
|
912
|
-
/* @__PURE__ */ K(
|
|
913
|
+
/* @__PURE__ */ K(j, {
|
|
913
914
|
value: [n.tool],
|
|
914
915
|
onValueChange: s,
|
|
915
916
|
size: "sm",
|
|
916
917
|
spacing: 1,
|
|
917
918
|
"aria-label": "Drawing tool",
|
|
918
919
|
children: o.map(({ value: e, label: t, icon: n }) => /* @__PURE__ */ q(x, { children: [/* @__PURE__ */ K(b, {
|
|
919
|
-
render: /* @__PURE__ */ K(
|
|
920
|
+
render: /* @__PURE__ */ K(A, {
|
|
920
921
|
value: e,
|
|
921
922
|
"aria-label": t
|
|
922
923
|
}),
|
|
@@ -930,14 +931,14 @@ var ht = [
|
|
|
930
931
|
orientation: "vertical",
|
|
931
932
|
className: "ck-annotation-separator"
|
|
932
933
|
}),
|
|
933
|
-
/* @__PURE__ */ K(
|
|
934
|
+
/* @__PURE__ */ K(j, {
|
|
934
935
|
value: [n.color],
|
|
935
936
|
onValueChange: c,
|
|
936
937
|
size: "sm",
|
|
937
938
|
spacing: 1,
|
|
938
939
|
"aria-label": "Stroke color",
|
|
939
940
|
children: t.map((e) => /* @__PURE__ */ q(x, { children: [/* @__PURE__ */ K(b, {
|
|
940
|
-
render: /* @__PURE__ */ K(
|
|
941
|
+
render: /* @__PURE__ */ K(A, {
|
|
941
942
|
value: e.value,
|
|
942
943
|
"aria-label": e.label
|
|
943
944
|
}),
|
|
@@ -973,7 +974,7 @@ var ht = [
|
|
|
973
974
|
orientation: "vertical",
|
|
974
975
|
className: "ck-annotation-separator"
|
|
975
976
|
}),
|
|
976
|
-
/* @__PURE__ */ q(
|
|
977
|
+
/* @__PURE__ */ q(D, { children: [
|
|
977
978
|
/* @__PURE__ */ q(x, { children: [/* @__PURE__ */ K(b, {
|
|
978
979
|
render: /* @__PURE__ */ K(d, {
|
|
979
980
|
variant: "outline",
|
|
@@ -991,7 +992,7 @@ var ht = [
|
|
|
991
992
|
children: [
|
|
992
993
|
"Undo",
|
|
993
994
|
" ",
|
|
994
|
-
/* @__PURE__ */ q(
|
|
995
|
+
/* @__PURE__ */ q(M, { children: [/* @__PURE__ */ K(F, { children: "⌘" }), /* @__PURE__ */ K(F, { children: "Z" })] })
|
|
995
996
|
]
|
|
996
997
|
}) })] }),
|
|
997
998
|
/* @__PURE__ */ q(x, { children: [/* @__PURE__ */ K(b, {
|
|
@@ -1011,10 +1012,10 @@ var ht = [
|
|
|
1011
1012
|
children: [
|
|
1012
1013
|
"Redo",
|
|
1013
1014
|
" ",
|
|
1014
|
-
/* @__PURE__ */ q(
|
|
1015
|
-
/* @__PURE__ */ K(
|
|
1016
|
-
/* @__PURE__ */ K(
|
|
1017
|
-
/* @__PURE__ */ K(
|
|
1015
|
+
/* @__PURE__ */ q(M, { children: [
|
|
1016
|
+
/* @__PURE__ */ K(F, { children: "⌘" }),
|
|
1017
|
+
/* @__PURE__ */ K(F, { children: "⇧" }),
|
|
1018
|
+
/* @__PURE__ */ K(F, { children: "Z" })
|
|
1018
1019
|
] })
|
|
1019
1020
|
]
|
|
1020
1021
|
}) })] }),
|
|
@@ -1036,7 +1037,7 @@ var ht = [
|
|
|
1036
1037
|
orientation: "vertical",
|
|
1037
1038
|
className: "ck-annotation-separator"
|
|
1038
1039
|
}),
|
|
1039
|
-
r ? /* @__PURE__ */ q(
|
|
1040
|
+
r ? /* @__PURE__ */ q(D, { children: [/* @__PURE__ */ q(x, { children: [/* @__PURE__ */ K(b, {
|
|
1040
1041
|
render: /* @__PURE__ */ K(d, {
|
|
1041
1042
|
variant: "outline",
|
|
1042
1043
|
size: "icon-sm",
|
|
@@ -1049,7 +1050,7 @@ var ht = [
|
|
|
1049
1050
|
})
|
|
1050
1051
|
}), /* @__PURE__ */ K(y, { children: /* @__PURE__ */ q("span", {
|
|
1051
1052
|
className: "ck-annotation-tooltip",
|
|
1052
|
-
children: ["Cancel ", /* @__PURE__ */ K(
|
|
1053
|
+
children: ["Cancel ", /* @__PURE__ */ K(F, { children: "Esc" })]
|
|
1053
1054
|
}) })] }), /* @__PURE__ */ q(x, { children: [/* @__PURE__ */ K(b, {
|
|
1054
1055
|
render: /* @__PURE__ */ K(d, {
|
|
1055
1056
|
size: "icon-sm",
|
|
@@ -1077,7 +1078,7 @@ var ht = [
|
|
|
1077
1078
|
})
|
|
1078
1079
|
}), /* @__PURE__ */ K(y, { children: /* @__PURE__ */ q("span", {
|
|
1079
1080
|
className: "ck-annotation-tooltip",
|
|
1080
|
-
children: ["Cancel ", /* @__PURE__ */ K(
|
|
1081
|
+
children: ["Cancel ", /* @__PURE__ */ K(F, { children: "Esc" })]
|
|
1081
1082
|
}) })] })
|
|
1082
1083
|
]
|
|
1083
1084
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { s as e } from "./validation-3wbbbuX0.js";
|
|
2
2
|
import { n as t } from "./dist-D9A5k-N4.js";
|
|
3
3
|
import { t as n } from "./button-D4GHW6oZ.js";
|
|
4
|
-
import {
|
|
4
|
+
import { L as r } from "./comment-kit-ui-BHwYuSIi.js";
|
|
5
5
|
import * as i from "react";
|
|
6
6
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
7
|
function s(e) {
|