@commentkit/comment-kit 0.7.4 → 0.7.5

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +2 -2
  3. package/SECURITY.md +1 -1
  4. package/dist/angular.es.js +2 -2
  5. package/dist/comment-kit.es.js +3 -3
  6. package/dist/demo.es.js +24 -15
  7. package/dist/headless.es.js +2 -2
  8. package/dist/preact.es.js +2 -2
  9. package/dist/qwik.qwik.mjs +2 -2
  10. package/dist/react.es.js +2 -2
  11. package/dist/shared/ShadowRootContext-DD6a0QaI.js +11 -0
  12. package/dist/shared/annotation-toolbar-DgqxkHy8.js +1085 -0
  13. package/dist/shared/{attachment-refresh-DmVkfPtl.js → attachment-refresh-DRX7dKDI.js} +3 -3
  14. package/dist/shared/{button-By0hGrJK.js → button-D4GHW6oZ.js} +133 -164
  15. package/dist/shared/{button-group-C285iSkZ.js → button-group-BVR7iT-S.js} +13 -13
  16. package/dist/shared/{comment-drawing-canvas-zIPS1dnW.js → comment-drawing-canvas-hSdcLShI.js} +2 -2
  17. package/dist/shared/{comment-icon-4SQd3nlz.js → comment-icon-D8JTCEJ7.js} +109 -110
  18. package/dist/shared/{comment-image-lightbox-CdMNf0_y.js → comment-image-lightbox-4zroOCCG.js} +7 -7
  19. package/dist/shared/{comment-images-content-DqeqmQnb.js → comment-images-content-D4hTya6e.js} +28 -28
  20. package/dist/shared/{comment-kit-core-C-0JJS2i.js → comment-kit-core-D068rcdY.js} +467 -503
  21. package/dist/shared/{comment-kit-ui-CBaz7L3u.js → comment-kit-ui-BDzNt0jv.js} +5077 -5253
  22. package/dist/shared/{comment-screenshot-annotator-CuYmKafz.js → comment-screenshot-annotator-BGnu_NgP.js} +2 -2
  23. package/dist/shared/{comment-screenshot-overlay-Dw81osel.js → comment-screenshot-overlay-BCRmojWB.js} +4 -4
  24. package/dist/shared/{dev-export-panel-D08M2LKD.js → dev-export-panel-CYmUKmIV.js} +3 -3
  25. package/dist/shared/{dev-grab-BJLZZ2xU.js → dev-grab-BYsCpsGI.js} +48 -47
  26. package/dist/shared/dist-D9A5k-N4.js +617 -0
  27. package/dist/shared/{element-selector-Biyn2cpR.js → element-selector-79Oo5pit.js} +4 -4
  28. package/dist/shared/{mount-ui-DXdL3p9b.js → mount-ui-DuHk132g.js} +4 -4
  29. package/dist/shared/{pusher-D4M5K6Dk.js → pusher-3jyUauYd.js} +1 -1
  30. package/dist/shared/{realtime-BTqYEy8s.js → realtime-DspH16g5.js} +41 -28
  31. package/dist/shared/{realtime-recovery-BSVMwsXJ.js → realtime-recovery-BjlV-ewc.js} +57 -30
  32. package/dist/shared/screenshot-BIuEaRiu.js +199 -0
  33. package/dist/shared/{separator-aphZiRoJ.js → separator-UhJb0Row.js} +1222 -1288
  34. package/dist/shared/{shadow-root-C58Ap5Nu.js → shadow-root-3-yGIhMs.js} +3 -5
  35. package/dist/shared/{token-session-D0Y_HZw0.js → token-session-_Pi4fOEi.js} +1 -1
  36. package/dist/shared/{useRender-D1z_X_BY.js → useRender-Uxk1OPK-.js} +1 -1
  37. package/dist/shared/{useValueChanged-CrzfD8l-.js → useValueChanged-DKq5cMot.js} +13 -13
  38. package/dist/shared/{websocket-manager-BFKa95TO.js → websocket-manager-CvgZSo_L.js} +2 -2
  39. package/dist/solid.es.js +2 -2
  40. package/dist/svelte.es.js +2 -2
  41. package/dist/types/core/api-client.d.ts +17 -9
  42. package/dist/types/core/comment-kit-core.d.ts +4 -2
  43. package/dist/types/core/types.d.ts +37 -4
  44. package/dist/vue.es.js +2 -2
  45. package/docs/api-reference.md +29 -17
  46. package/package.json +1 -1
  47. package/dist/shared/ShadowRootContext-CjciYxVN.js +0 -13
  48. package/dist/shared/annotation-toolbar-CpPKy0oq.js +0 -1094
  49. package/dist/shared/dist-De294MVF.js +0 -623
@@ -1,7 +1,7 @@
1
1
  import { s as e } from "./validation-3wbbbuX0.js";
2
- import { n as t } from "./dist-De294MVF.js";
3
- import { t as n } from "./button-By0hGrJK.js";
4
- import { q as r } from "./comment-kit-ui-CBaz7L3u.js";
2
+ import { n as t } from "./dist-D9A5k-N4.js";
3
+ import { t as n } from "./button-D4GHW6oZ.js";
4
+ import { q as r } from "./comment-kit-ui-BDzNt0jv.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) {
@@ -41,7 +41,7 @@ function v(e) {
41
41
  return !d() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof p(e).ShadowRoot;
42
42
  }
43
43
  function y(e) {
44
- let { overflow: t, overflowX: n, overflowY: r, display: i } = C(e);
44
+ let { overflow: t, overflowX: n, overflowY: r, display: i } = E(e);
45
45
  return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
46
46
  }
47
47
  function ee(e) {
@@ -57,30 +57,30 @@ function b(e) {
57
57
  return !1;
58
58
  }
59
59
  }
60
- var te = /transform|translate|scale|rotate|perspective|filter/, ne = /paint|layout|strict|content/, x = (e) => !!e && e !== "none", re;
61
- function ie(e) {
62
- let t = g(e) ? C(e) : e;
63
- return x(t.transform) || x(t.translate) || x(t.scale) || x(t.rotate) || x(t.perspective) || !oe() && (x(t.backdropFilter) || x(t.filter)) || te.test(t.willChange || "") || ne.test(t.contain || "");
60
+ var te = /transform|translate|scale|rotate|perspective|filter/, ne = /paint|layout|strict|content/, x = (e) => !!e && e !== "none", S;
61
+ function C(e) {
62
+ let t = g(e) ? E(e) : e;
63
+ return x(t.transform) || x(t.translate) || x(t.scale) || x(t.rotate) || x(t.perspective) || !w() && (x(t.backdropFilter) || x(t.filter)) || te.test(t.willChange || "") || ne.test(t.contain || "");
64
64
  }
65
- function ae(e) {
66
- let t = w(e);
67
- for (; _(t) && !S(t);) {
68
- if (ie(t)) return t;
65
+ function re(e) {
66
+ let t = D(e);
67
+ for (; _(t) && !T(t);) {
68
+ if (C(t)) return t;
69
69
  if (b(t)) return null;
70
- t = w(t);
70
+ t = D(t);
71
71
  }
72
72
  return null;
73
73
  }
74
- function oe() {
75
- return re ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), re;
74
+ function w() {
75
+ return S ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), S;
76
76
  }
77
- function S(e) {
77
+ function T(e) {
78
78
  return /^(html|body|#document)$/.test(f(e));
79
79
  }
80
- function C(e) {
80
+ function E(e) {
81
81
  return p(e).getComputedStyle(e);
82
82
  }
83
- function se(e) {
83
+ function ie(e) {
84
84
  return g(e) ? {
85
85
  scrollLeft: e.scrollLeft,
86
86
  scrollTop: e.scrollTop
@@ -89,54 +89,54 @@ function se(e) {
89
89
  scrollTop: e.scrollY
90
90
  };
91
91
  }
92
- function w(e) {
92
+ function D(e) {
93
93
  if (f(e) === "html") return e;
94
94
  let t = e.assignedSlot || e.parentNode || v(e) && e.host || m(e);
95
95
  return v(t) ? t.host : t;
96
96
  }
97
- function ce(e) {
98
- let t = w(e);
99
- return S(t) ? (e.ownerDocument || e).body : _(t) && y(t) ? t : ce(t);
97
+ function O(e) {
98
+ let t = D(e);
99
+ return T(t) ? (e.ownerDocument || e).body : _(t) && y(t) ? t : O(t);
100
100
  }
101
- function T(e, t, n) {
101
+ function k(e, t, n) {
102
102
  t === void 0 && (t = []), n === void 0 && (n = !0);
103
- let r = ce(e), i = r === e.ownerDocument?.body, a = p(r);
103
+ let r = O(e), i = r === e.ownerDocument?.body, a = p(r);
104
104
  if (i) {
105
- let e = E(a);
106
- return t.concat(a, a.visualViewport || [], y(r) ? r : [], e && n ? T(e) : []);
105
+ let e = A(a);
106
+ return t.concat(a, a.visualViewport || [], y(r) ? r : [], e && n ? k(e) : []);
107
107
  }
108
- return t.concat(r, T(r, [], n));
108
+ return t.concat(r, k(r, [], n));
109
109
  }
110
- function E(e) {
110
+ function A(e) {
111
111
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
112
112
  }
113
- function D(e, t, n, r) {
114
- let a = i(O).current;
115
- return ue(a, e, t, n, r) && k(a, [
113
+ function j(e, t, n, r) {
114
+ let a = i(M).current;
115
+ return oe(a, e, t, n, r) && N(a, [
116
116
  e,
117
117
  t,
118
118
  n,
119
119
  r
120
120
  ]), a.callback;
121
121
  }
122
- function le(e) {
123
- let t = i(O).current;
124
- return de(t, e) && k(t, e), t.callback;
122
+ function ae(e) {
123
+ let t = i(M).current;
124
+ return se(t, e) && N(t, e), t.callback;
125
125
  }
126
- function O() {
126
+ function M() {
127
127
  return {
128
128
  callback: null,
129
129
  cleanup: null,
130
130
  refs: []
131
131
  };
132
132
  }
133
- function ue(e, t, n, r, i) {
133
+ function oe(e, t, n, r, i) {
134
134
  return e.refs[0] !== t || e.refs[1] !== n || e.refs[2] !== r || e.refs[3] !== i;
135
135
  }
136
- function de(e, t) {
136
+ function se(e, t) {
137
137
  return e.refs.length !== t.length || e.refs.some((e, n) => e !== t[n]);
138
138
  }
139
- function k(e, t) {
139
+ function N(e, t) {
140
140
  e.refs = t, e.callback = t.every((e) => e == null) ? null : (n) => {
141
141
  if (e.cleanup &&= (e.cleanup(), null), n != null) {
142
142
  let r = Array(t.length).fill(null);
@@ -167,15 +167,15 @@ function k(e, t) {
167
167
  }
168
168
  };
169
169
  }
170
- var A = { ...e }, j = A.useInsertionEffect, fe = j && j !== A.useLayoutEffect ? j : (e) => e();
171
- function pe(e) {
172
- let t = i(me).current;
173
- return t.next = e, fe(t.effect), t.trampoline;
170
+ var P = { ...e }, F = P.useInsertionEffect, ce = F && F !== P.useLayoutEffect ? F : (e) => e();
171
+ function le(e) {
172
+ let t = i(ue).current;
173
+ return t.next = e, ce(t.effect), t.trampoline;
174
174
  }
175
- function me() {
175
+ function ue() {
176
176
  let e = {
177
177
  next: void 0,
178
- callback: he,
178
+ callback: de,
179
179
  trampoline: (...t) => e.callback?.(...t),
180
180
  effect: () => {
181
181
  e.callback = e.next;
@@ -183,19 +183,17 @@ function me() {
183
183
  };
184
184
  return e;
185
185
  }
186
- function he() {
187
- if (process.env.NODE_ENV !== "production") throw Error("Base UI: Cannot call an event handler while rendering.");
188
- }
189
- var ge = parseInt(e.version, 10);
190
- function _e(e) {
191
- return ge >= e;
186
+ function de() {}
187
+ var fe = parseInt(e.version, 10);
188
+ function pe(e) {
189
+ return fe >= e;
192
190
  }
193
- function ve(t) {
191
+ function I(t) {
194
192
  if (!/*#__PURE__*/ e.isValidElement(t)) return null;
195
193
  let n = t, r = n.props;
196
- return (_e(19) ? r?.ref : n.ref) ?? null;
194
+ return (pe(19) ? r?.ref : n.ref) ?? null;
197
195
  }
198
- function M(e, t) {
196
+ function L(e, t) {
199
197
  if (e && !t) return e;
200
198
  if (!e && t) return t;
201
199
  if (e || t) return {
@@ -203,18 +201,7 @@ function M(e, t) {
203
201
  ...t
204
202
  };
205
203
  }
206
- var N;
207
- process.env.NODE_ENV !== "production" && (N = /* @__PURE__ */ new Set());
208
- function P(e, t) {
209
- return function(...n) {
210
- if (process.env.NODE_ENV !== "production") {
211
- let r = n.join(" "), i = t ? `${t}: ${r}` : r, a = `${e}:${i}`;
212
- N.has(a) || (N.add(a), e === "warn" ? console.warn(i) : console.error(i));
213
- }
214
- };
215
- }
216
- var F = P("warn", "Base UI");
217
- function ye(e, t) {
204
+ function me(e, t) {
218
205
  let n = {};
219
206
  for (let r in e) {
220
207
  let i = e[r];
@@ -225,135 +212,126 @@ function ye(e, t) {
225
212
  }
226
213
  return n;
227
214
  }
228
- function be(e, t) {
215
+ function he(e, t) {
229
216
  return typeof e == "function" ? e(t) : e;
230
217
  }
231
- function xe(e, t) {
218
+ function ge(e, t) {
232
219
  return typeof e == "function" ? e(t) : e;
233
220
  }
234
- var I = {};
235
- function L(e, t, n, r, i) {
236
- if (!n && !r && !i && !e) return R(t);
237
- let a = R(e);
238
- return t && (a = z(a, t)), n && (a = z(a, n)), r && (a = z(a, r)), i && (a = z(a, i)), a;
221
+ var R = {};
222
+ function z(e, t, n, r, i) {
223
+ if (!n && !r && !i && !e) return B(t);
224
+ let a = B(e);
225
+ return t && (a = V(a, t)), n && (a = V(a, n)), r && (a = V(a, r)), i && (a = V(a, i)), a;
239
226
  }
240
- function Se(e) {
241
- if (e.length === 0) return I;
242
- if (e.length === 1) return R(e[0]);
243
- let t = R(e[0]);
244
- for (let n = 1; n < e.length; n += 1) t = z(t, e[n]);
227
+ function _e(e) {
228
+ if (e.length === 0) return R;
229
+ if (e.length === 1) return B(e[0]);
230
+ let t = B(e[0]);
231
+ for (let n = 1; n < e.length; n += 1) t = V(t, e[n]);
245
232
  return t;
246
233
  }
247
- function R(e) {
248
- return V(e) ? { ...e(I) } : Ce(e);
234
+ function B(e) {
235
+ return U(e) ? { ...e(R) } : ve(e);
249
236
  }
250
- function z(e, t) {
251
- return V(t) ? t(e) : we(e, t);
237
+ function V(e, t) {
238
+ return U(t) ? t(e) : ye(e, t);
252
239
  }
253
- function Ce(e) {
240
+ function ve(e) {
254
241
  let t = { ...e };
255
242
  for (let e in t) {
256
243
  let n = t[e];
257
- B(e, n) && (t[e] = H(n));
244
+ H(e, n) && (t[e] = W(n));
258
245
  }
259
246
  return t;
260
247
  }
261
- function we(e, t) {
248
+ function ye(e, t) {
262
249
  if (!t) return e;
263
250
  for (let n in t) {
264
251
  let r = t[n];
265
252
  switch (n) {
266
253
  case "style":
267
- e[n] = M(e.style, r);
254
+ e[n] = L(e.style, r);
268
255
  break;
269
256
  case "className":
270
- e[n] = W(e.className, r);
257
+ e[n] = K(e.className, r);
271
258
  break;
272
- default: e[n] = B(n, r) ? Te(e[n], r) : r;
259
+ default: e[n] = H(n, r) ? be(e[n], r) : r;
273
260
  }
274
261
  }
275
262
  return e;
276
263
  }
277
- function B(e, t) {
264
+ function H(e, t) {
278
265
  let n = e.charCodeAt(0), r = e.charCodeAt(1), i = e.charCodeAt(2);
279
266
  return n === 111 && r === 110 && i >= 65 && i <= 90 && (typeof t == "function" || t === void 0);
280
267
  }
281
- function V(e) {
268
+ function U(e) {
282
269
  return typeof e == "function";
283
270
  }
284
- function Te(e, t) {
271
+ function be(e, t) {
285
272
  return t ? e ? (...n) => {
286
273
  let r = n[0];
287
- if (G(r)) {
274
+ if (q(r)) {
288
275
  let i = r;
289
- U(i);
276
+ G(i);
290
277
  let a = t(...n);
291
278
  return i.baseUIHandlerPrevented || e?.(...n), a;
292
279
  }
293
280
  let i = t(...n);
294
281
  return e?.(...n), i;
295
- } : H(t) : e;
282
+ } : W(t) : e;
296
283
  }
297
- function H(e) {
284
+ function W(e) {
298
285
  return e && ((...t) => {
299
286
  let n = t[0];
300
- return G(n) && U(n), e(...t);
287
+ return q(n) && G(n), e(...t);
301
288
  });
302
289
  }
303
- function U(e) {
290
+ function G(e) {
304
291
  return e.preventBaseUIHandler = () => {
305
292
  e.baseUIHandlerPrevented = !0;
306
293
  }, e;
307
294
  }
308
- function W(e, t) {
295
+ function K(e, t) {
309
296
  return t ? e ? t + " " + e : t : e;
310
297
  }
311
- function G(e) {
298
+ function q(e) {
312
299
  return typeof e == "object" && !!e && "nativeEvent" in e;
313
300
  }
314
- function K(e, t, n = {}) {
301
+ function J(e, t, n = {}) {
315
302
  let r = t.render;
316
- n.enabled !== !1 && (r = q(r));
317
- let i = Ee(t, n, r);
303
+ n.enabled !== !1 && (r = Y(r));
304
+ let i = xe(t, n, r);
318
305
  if (n.enabled === !1) return null;
319
306
  let a = n.state ?? s;
320
- return je(e, r, i, a);
307
+ return we(e, r, i, a);
321
308
  }
322
- function Ee(e, t, n) {
323
- let { className: r, style: i } = e, { state: a = s, ref: o, props: c, stateAttributesMapping: l, enabled: u = !0 } = t, d = u ? be(r, a) : void 0, f = u ? xe(i, a) : void 0, p = u ? ye(a, l) : s, m = u && c ? De(c) : void 0, h = u ? M(p, m) ?? {} : s;
324
- return typeof document < "u" && (u ? h.ref = Array.isArray(o) ? le([
309
+ function xe(e, t, n) {
310
+ let { className: r, style: i } = e, { state: a = s, ref: o, props: c, stateAttributesMapping: l, enabled: u = !0 } = t, d = u ? he(r, a) : void 0, f = u ? ge(i, a) : void 0, p = u ? me(a, l) : s, m = u && c ? Se(c) : void 0, h = u ? L(p, m) ?? {} : s;
311
+ return typeof document < "u" && (u ? h.ref = Array.isArray(o) ? ae([
325
312
  h.ref,
326
- ve(n),
313
+ I(n),
327
314
  ...o
328
- ]) : D(h.ref, ve(n), o) : D(null, null)), u ? (d !== void 0 && (h.className = W(h.className, d)), f !== void 0 && (h.style = M(h.style, f)), h) : s;
315
+ ]) : j(h.ref, I(n), o) : j(null, null)), u ? (d !== void 0 && (h.className = K(h.className, d)), f !== void 0 && (h.style = L(h.style, f)), h) : s;
329
316
  }
330
- function De(e) {
331
- return Array.isArray(e) ? Se(e) : L(void 0, e);
317
+ function Se(e) {
318
+ return Array.isArray(e) ? _e(e) : z(void 0, e);
332
319
  }
333
- var Oe = Symbol.for("react.lazy"), ke = /^[A-Z][A-Za-z0-9$]*$/, Ae = /[a-z]/;
334
- function q(t) {
335
- if (t?.$$typeof !== Oe) return t;
320
+ var Ce = Symbol.for("react.lazy");
321
+ function Y(t) {
322
+ if (t?.$$typeof !== Ce) return t;
336
323
  let n = e.Children.toArray(t)[0];
337
324
  return /*#__PURE__*/ e.isValidElement(n) ? n : t;
338
325
  }
339
- function je(t, n, r, i) {
326
+ function we(t, n, r, i) {
340
327
  if (n) {
341
- if (typeof n == "function") return process.env.NODE_ENV !== "production" && Me(n), n(r, i);
342
- let t = L(r, n.props);
343
- if (t.ref = r.ref, process.env.NODE_ENV !== "production" && !/*#__PURE__*/ e.isValidElement(n)) throw Error([
344
- "Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.",
345
- "A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.",
346
- "https://base-ui.com/r/invalid-render-prop"
347
- ].join("\n"));
348
- return /*#__PURE__*/ e.cloneElement(n, t);
328
+ if (typeof n == "function") return n(r, i);
329
+ let t = z(r, n.props);
330
+ return t.ref = r.ref, /*#__PURE__*/ e.cloneElement(n, t);
349
331
  }
350
- return Ne(t, r);
332
+ return Te(t, r);
351
333
  }
352
- function Me(e) {
353
- let t = e.name;
354
- t.length !== 0 && ke.test(t) && Ae.test(t) && F(`The \`render\` prop received a function named \`${t}\` that starts with an uppercase letter.`, "This usually means a React component was passed directly as `render={Component}`.", "Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.", "If this is an intentional render callback, rename it to start with a lowercase letter.", "Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.", "https://base-ui.com/r/invalid-render-prop");
355
- }
356
- function Ne(n, r) {
334
+ function Te(n, r) {
357
335
  return n === "button" ? /*#__PURE__*/ t("button", {
358
336
  type: "button",
359
337
  ...r,
@@ -364,28 +342,27 @@ function Ne(n, r) {
364
342
  key: r.key
365
343
  }) : /*#__PURE__*/ e.createElement(n, r);
366
344
  }
367
- function J(...e) {
345
+ function X(...e) {
368
346
  let t = [];
369
347
  for (let n of e) if (n) {
370
348
  if (typeof n == "string") t.push(n);
371
349
  else if (Array.isArray(n)) {
372
- let e = J(...n);
350
+ let e = X(...n);
373
351
  e && t.push(e);
374
352
  }
375
353
  }
376
354
  return t.join(" ");
377
355
  }
378
- function Pe(e, t) {
379
- return typeof t == "function" ? (n) => J(e, t(n)) : J(e, t);
356
+ function Z(e, t) {
357
+ return typeof t == "function" ? (n) => X(e, t(n)) : X(e, t);
380
358
  }
381
- var Y = P("error", "Base UI"), X = /*#__PURE__*/ e.createContext(void 0);
382
- process.env.NODE_ENV !== "production" && (X.displayName = "CompositeRootContext");
383
- function Fe(t = !1) {
384
- let n = e.useContext(X);
385
- if (n === void 0 && !t) throw Error(process.env.NODE_ENV === "production" ? u(16) : "Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.");
359
+ var Ee = /*#__PURE__*/ e.createContext(void 0);
360
+ function De(t = !1) {
361
+ let n = e.useContext(Ee);
362
+ if (n === void 0 && !t) throw Error(u(16));
386
363
  return n;
387
364
  }
388
- function Ie(t) {
365
+ function Oe(t) {
389
366
  let { focusableWhenDisabled: n, disabled: r, composite: i = !1, tabIndex: a = 0, isNativeButton: o } = t, s = i && n !== !1, c = i && n === !1;
390
367
  return { props: e.useMemo(() => {
391
368
  let e = { onKeyDown(e) {
@@ -402,7 +379,7 @@ function Ie(t) {
402
379
  a
403
380
  ]) };
404
381
  }
405
- function Z(e, t, { detail: n = 0, pointerType: r = "" } = {}) {
382
+ function Q(e, t, { detail: n = 0, pointerType: r = "" } = {}) {
406
383
  e.dispatchEvent(new (p(e)).PointerEvent("click", {
407
384
  bubbles: !0,
408
385
  cancelable: !0,
@@ -415,22 +392,16 @@ function Z(e, t, { detail: n = 0, pointerType: r = "" } = {}) {
415
392
  metaKey: t.metaKey
416
393
  }));
417
394
  }
418
- function Le(t = {}) {
419
- let { disabled: n = !1, focusableWhenDisabled: r, tabIndex: i = 0, native: a = !0, composite: o } = t, s = e.useRef(null), l = Fe(!0), u = o ?? l !== void 0, { props: d } = Ie({
395
+ function ke(t = {}) {
396
+ let { disabled: n = !1, focusableWhenDisabled: r, tabIndex: i = 0, native: a = !0, composite: o } = t, s = e.useRef(null), l = De(!0), u = o ?? l !== void 0, { props: d } = Oe({
420
397
  focusableWhenDisabled: r,
421
398
  disabled: n,
422
399
  composite: u,
423
400
  tabIndex: i,
424
401
  isNativeButton: a
425
- });
426
- process.env.NODE_ENV !== "production" && e.useEffect(() => {
427
- if (!s.current) return;
428
- let e = Q(s.current);
429
- a ? e || Y(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${A.captureOwnerStack?.() || ""}`) : e && Y(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${A.captureOwnerStack?.() || ""}`);
430
- }, [a]);
431
- let f = e.useCallback(() => {
402
+ }), f = e.useCallback(() => {
432
403
  let e = s.current;
433
- Q(e) && u && n && d.disabled === void 0 && e.disabled && (e.disabled = !1);
404
+ $(e) && u && n && d.disabled === void 0 && e.disabled && (e.disabled = !1);
434
405
  }, [
435
406
  n,
436
407
  d.disabled,
@@ -439,7 +410,7 @@ function Le(t = {}) {
439
410
  return c(f, [f]), {
440
411
  getButtonProps: e.useCallback((e = {}) => {
441
412
  let { onClick: t, onMouseDown: r, onKeyUp: i, onKeyDown: o, onPointerDown: s, ...c } = e;
442
- return L({
413
+ return z({
443
414
  onClick(e) {
444
415
  n ? e.preventDefault() : t?.(e);
445
416
  },
@@ -447,15 +418,15 @@ function Le(t = {}) {
447
418
  n || r?.(e);
448
419
  },
449
420
  onKeyDown(e) {
450
- if (n || (U(e), o?.(e), e.baseUIHandlerPrevented)) return;
451
- let t = e.target === e.currentTarget, r = e.currentTarget, i = Q(r), s = !a && Re(r), c = t && (a ? i : !s), l = e.key === "Enter", d = e.key === " ", f = r.getAttribute("role"), p = f?.startsWith("menuitem") || f === "option" || f === "gridcell";
421
+ if (n || (G(e), o?.(e), e.baseUIHandlerPrevented)) return;
422
+ let t = e.target === e.currentTarget, r = e.currentTarget, i = $(r), s = !a && Ae(r), c = t && (a ? i : !s), l = e.key === "Enter", d = e.key === " ", f = r.getAttribute("role"), p = f?.startsWith("menuitem") || f === "option" || f === "gridcell";
452
423
  if (t && u && d) {
453
424
  if (e.defaultPrevented && p) return;
454
- e.preventDefault(), (!a || i) && (e.preventBaseUIHandler(), Z(r, e));
455
- } else !c || a || !d && !l ? t && s && d && e.preventDefault() : e.defaultPrevented || (e.preventDefault(), l && (e.preventBaseUIHandler(), Z(r, e)));
425
+ e.preventDefault(), (!a || i) && (e.preventBaseUIHandler(), Q(r, e));
426
+ } else !c || a || !d && !l ? t && s && d && e.preventDefault() : e.defaultPrevented || (e.preventDefault(), l && (e.preventBaseUIHandler(), Q(r, e)));
456
427
  },
457
428
  onKeyUp(e) {
458
- n || (U(e), i?.(e), e.target === e.currentTarget && a && u && Q(e.currentTarget) && e.key === " " ? e.preventDefault() : e.baseUIHandlerPrevented || e.target === e.currentTarget && !a && !u && !e.defaultPrevented && e.key === " " && (e.preventBaseUIHandler(), Z(e.currentTarget, e)));
429
+ n || (G(e), i?.(e), e.target === e.currentTarget && a && u && $(e.currentTarget) && e.key === " " ? e.preventDefault() : e.baseUIHandlerPrevented || e.target === e.currentTarget && !a && !u && !e.defaultPrevented && e.key === " " && (e.preventBaseUIHandler(), Q(e.currentTarget, e)));
459
430
  },
460
431
  onPointerDown(e) {
461
432
  n ? e.preventDefault() : s?.(e);
@@ -467,39 +438,37 @@ function Le(t = {}) {
467
438
  u,
468
439
  a
469
440
  ]),
470
- buttonRef: pe((e) => {
441
+ buttonRef: le((e) => {
471
442
  s.current = e, f();
472
443
  })
473
444
  };
474
445
  }
475
- function Q(e) {
446
+ function $(e) {
476
447
  return _(e) && e.tagName === "BUTTON";
477
448
  }
478
- function Re(e) {
449
+ function Ae(e) {
479
450
  return _(e) && e.tagName === "A" && !!e.href;
480
451
  }
481
- var $ = /*#__PURE__*/ e.forwardRef(function(e, t) {
482
- let { render: n, className: r, disabled: i = !1, focusableWhenDisabled: a = !1, nativeButton: o = !0, style: s, ...c } = e, { getButtonProps: l, buttonRef: u } = Le({
452
+ var je = /*#__PURE__*/ e.forwardRef(function(e, t) {
453
+ let { render: n, className: r, disabled: i = !1, focusableWhenDisabled: a = !1, nativeButton: o = !0, style: s, ...c } = e, { getButtonProps: l, buttonRef: u } = ke({
483
454
  disabled: i,
484
455
  focusableWhenDisabled: a,
485
456
  native: o
486
457
  });
487
- return K("button", e, {
458
+ return J("button", e, {
488
459
  state: { disabled: i },
489
460
  ref: [t, u],
490
461
  props: [c, l]
491
462
  });
492
- });
493
- process.env.NODE_ENV !== "production" && ($.displayName = "Button");
494
- var ze = e.forwardRef(function({ className: e, variant: t = "default", size: r = "default", ...i }, a) {
495
- return /* @__PURE__ */ n($, {
463
+ }), Me = e.forwardRef(function({ className: e, variant: t = "default", size: r = "default", ...i }, a) {
464
+ return /* @__PURE__ */ n(je, {
496
465
  ref: a,
497
466
  "data-slot": "button",
498
467
  "data-variant": t,
499
468
  "data-size": r,
500
- className: Pe("ck-button", e),
469
+ className: Z("ck-button", e),
501
470
  ...i
502
471
  });
503
472
  });
504
- ze.displayName = "Button";
505
- export { h as A, a as B, T as C, g as D, ie as E, oe as F, u as I, c as L, v as M, ee as N, _ as O, b as P, o as R, se as S, p as T, i as V, C as _, Fe as a, E as b, Pe as c, L as d, F as f, D as g, A as h, X as i, y as j, S as k, q as l, pe as m, Le as n, Y as o, _e as p, Z as r, J as s, ze as t, K as u, ae as v, w, f as x, m as y, s as z };
473
+ Me.displayName = "Button";
474
+ export { v as A, p as C, T as D, _ as E, c as F, o as I, s as L, b as M, w as N, h as O, u as P, a as R, D as S, g as T, m as _, De as a, ie as b, Y as c, pe as d, le as f, re as g, E as h, Ee as i, ee as j, y as k, J as l, j as m, ke as n, X as o, P as p, Q as r, Z as s, Me as t, z as u, A as v, C as w, k as x, f as y, i as z };
@@ -1,6 +1,6 @@
1
- import { O as e, c as t, d as n, s as r } from "./button-By0hGrJK.js";
2
- import { t as i } from "./separator-aphZiRoJ.js";
3
- import { t as a } from "./useRender-D1z_X_BY.js";
1
+ import { E as e, o as t, s as n, u as r } from "./button-D4GHW6oZ.js";
2
+ import { t as i } from "./separator-UhJb0Row.js";
3
+ import { t as a } from "./useRender-Uxk1OPK-.js";
4
4
  import * as o from "react";
5
5
  import { jsx as s } from "react/jsx-runtime";
6
6
  var c = "ArrowUp", l = "ArrowDown", u = "ArrowLeft", d = "ArrowRight", f = "Home", p = "PageUp", m = "PageDown", h = /* @__PURE__ */ new Set([
@@ -57,33 +57,33 @@ function x(e) {
57
57
  scrollPaddingLeft: parseFloat(t.scrollPaddingLeft) || 0
58
58
  };
59
59
  }
60
- var S = o.forwardRef(function({ className: e, orientation: t = "horizontal", ...n }, i) {
60
+ var S = o.forwardRef(function({ className: e, orientation: n = "horizontal", ...r }, i) {
61
61
  return /* @__PURE__ */ s("div", {
62
62
  ref: i,
63
63
  role: "group",
64
64
  "data-slot": "button-group",
65
- "data-orientation": t,
66
- className: r("ck-button-group", e),
67
- ...n
65
+ "data-orientation": n,
66
+ className: t("ck-button-group", e),
67
+ ...r
68
68
  });
69
69
  });
70
70
  S.displayName = "ButtonGroup";
71
- var C = o.forwardRef(function({ className: e, render: t, ...i }, o) {
71
+ var C = o.forwardRef(function({ className: e, render: n, ...i }, o) {
72
72
  return a({
73
73
  defaultTagName: "div",
74
74
  ref: o,
75
- props: n({ className: r("ck-button-group-text", e) }, i),
76
- render: t,
75
+ props: r({ className: t("ck-button-group-text", e) }, i),
76
+ render: n,
77
77
  state: { slot: "button-group-text" }
78
78
  });
79
79
  });
80
80
  C.displayName = "ButtonGroupText";
81
- var w = o.forwardRef(function({ className: e, orientation: n = "vertical", ...r }, a) {
81
+ var w = o.forwardRef(function({ className: e, orientation: t = "vertical", ...r }, a) {
82
82
  return /* @__PURE__ */ s(i, {
83
83
  ref: a,
84
84
  "data-slot": "button-group-separator",
85
- orientation: n,
86
- className: t("ck-button-group-separator", e),
85
+ orientation: t,
86
+ className: n("ck-button-group-separator", e),
87
87
  ...r
88
88
  });
89
89
  });
@@ -1,5 +1,5 @@
1
- import { n as e, r as t, t as n } from "./annotation-toolbar-CpPKy0oq.js";
2
- import { N as r, a as i, g as a, i as o } from "./comment-kit-ui-CBaz7L3u.js";
1
+ import { n as e, r as t, t as n } from "./annotation-toolbar-DgqxkHy8.js";
2
+ import { N as r, a as i, g as a, i as o } from "./comment-kit-ui-BDzNt0jv.js";
3
3
  import * as s from "react";
4
4
  import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
5
5
  var d = ".ck-annotation-toolbar{background-color:var(--background);width:100%;max-width:100%;box-shadow:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a, 0 0 0 1px color-mix(in oklch, var(--foreground) 5%, transparent);border-radius:2rem;flex-wrap:wrap;justify-content:center;align-items:center;gap:.375rem .5rem;margin-inline:auto;padding:.375rem;display:flex}@media (width>=1024px){.ck-annotation-toolbar{width:fit-content}}.ck-annotation-separator.ck-separator[data-orientation=vertical]{height:1rem;display:none}@media (width>=1024px){.ck-annotation-separator.ck-separator[data-orientation=vertical]{display:block}}.ck-annotation-stroke{align-items:center;gap:.5rem;width:7rem;padding-inline:.25rem;display:flex}@media (width>=1024px){.ck-annotation-stroke{width:12rem}}.ck-annotation-slider{flex:auto;min-width:0}.ck-annotation-stroke-label{color:var(--muted-foreground);font-variant-numeric:tabular-nums;flex-shrink:0;font-size:.75rem;line-height:1rem}.ck-annotation-swatch{background-color:var(--ck-bg);width:.875rem;height:.875rem;box-shadow:0 0 0 1px color-mix(in oklch, var(--foreground) 5%, transparent);border-radius:999px}.ck-annotation-tooltip{align-items:center;gap:.375rem;display:inline-flex}.ck-annotation-save--disabled{opacity:.5}.ck-drawing-canvas{z-index:var(--z-ck-marker-layer);cursor:none;pointer-events:auto;flex-direction:column;padding-top:1rem;display:flex;position:fixed;inset:0}.ck-drawing-canvas-scrim{pointer-events:none;background-color:#0000004d;position:absolute;inset:0}@supports ((-webkit-backdrop-filter:blur(4px)) or (backdrop-filter:blur(4px))){.ck-drawing-canvas-scrim{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}}.ck-drawing-canvas-toolbar{z-index:1;cursor:auto;width:100%;min-width:0;margin-inline:auto;padding-inline:.75rem;position:relative}.ck-drawing-canvas-surface{z-index:0;touch-action:none;flex:auto;min-height:0;position:relative}.ck-drawing-canvas-error{border-radius:var(--radius-md);background:var(--background);width:max-content;max-width:calc(100vw - 1.5rem);color:var(--destructive);margin:.75rem auto;padding:.75rem;font-size:.875rem}";