@commentkit/comment-kit 0.7.7 → 1.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/README.md +172 -732
  3. package/SECURITY.md +24 -14
  4. package/dist/npm/THIRD_PARTY_NOTICES.txt +73 -0
  5. package/dist/npm/chunks/Guest-CKoV6pEK.js +157 -0
  6. package/dist/npm/chunks/MarkupEditor-DAo4qppg.js +199 -0
  7. package/dist/npm/chunks/Panel-BRBDHlGg.js +399 -0
  8. package/dist/npm/chunks/Shortcuts-CHMcrjAM.js +56 -0
  9. package/dist/npm/chunks/ThreadCard-D8FzIxbs.js +570 -0
  10. package/dist/npm/chunks/anchor-DT-Ynhh1.js +270 -0
  11. package/dist/npm/chunks/ar-D3SPpN1T.js +195 -0
  12. package/dist/npm/chunks/client-D1NizpDK.js +627 -0
  13. package/dist/{shared/capture-colors-D0uLr-vZ.js → npm/chunks/colors-CX-IPjvb.js} +2 -0
  14. package/dist/npm/chunks/de-C8eC6c6f.js +187 -0
  15. package/dist/npm/chunks/es-Bczf42tm.js +187 -0
  16. package/dist/npm/chunks/extension--it1LAj-.js +54 -0
  17. package/dist/npm/chunks/extension-XfuRGu2o.js +26 -0
  18. package/dist/npm/chunks/format-Bw_tNOh9.js +524 -0
  19. package/dist/npm/chunks/fr-BaQw-v2e.js +187 -0
  20. package/dist/npm/chunks/hi-BamV-yXv.js +187 -0
  21. package/dist/npm/chunks/html2canvas-DfGb8yka.js +4024 -0
  22. package/dist/npm/chunks/it-DC14_EjN.js +187 -0
  23. package/dist/npm/chunks/ja-B1mmTN7Y.js +187 -0
  24. package/dist/npm/chunks/mount-5fFig0k6.js +1447 -0
  25. package/dist/npm/chunks/nl-BfhqUsmX.js +187 -0
  26. package/dist/npm/chunks/privacy-DLhezjyi.js +30 -0
  27. package/dist/npm/chunks/pt-BR-CEPu4W5U.js +187 -0
  28. package/dist/{shared/pusher-CnhQgAvF.js → npm/chunks/pusher-BSsQoE1K.js} +224 -222
  29. package/dist/npm/chunks/realtime-CBRW9BB3.js +34 -0
  30. package/dist/npm/chunks/report-Dh4fxd4J.js +27 -0
  31. package/dist/npm/chunks/rolldown-runtime-Y_bBpyJl.js +20 -0
  32. package/dist/npm/chunks/src-DujplxfI.js +517 -0
  33. package/dist/npm/chunks/zh-CN-kgqjYwHQ.js +187 -0
  34. package/dist/npm/element.js +41 -0
  35. package/dist/npm/headless.js +3 -0
  36. package/dist/npm/index.js +3 -0
  37. package/dist/npm/react.js +26 -0
  38. package/dist/npm/svelte.js +17 -0
  39. package/dist/npm/types/adapters/react.d.ts +11 -0
  40. package/dist/npm/types/adapters/svelte.d.ts +9 -0
  41. package/dist/npm/types/adapters/vue.d.ts +118 -0
  42. package/dist/npm/types/anchor/index.d.ts +49 -0
  43. package/dist/npm/types/core/api.d.ts +31 -0
  44. package/dist/npm/types/core/auth.d.ts +87 -0
  45. package/dist/npm/types/core/client.d.ts +114 -0
  46. package/dist/npm/types/core/store.d.ts +7 -0
  47. package/dist/npm/types/core/types.d.ts +303 -0
  48. package/dist/npm/types/element.d.ts +13 -0
  49. package/dist/npm/types/headless.d.ts +7 -0
  50. package/dist/npm/types/index.d.ts +32 -0
  51. package/dist/npm/vue.js +71 -0
  52. package/package.json +71 -173
  53. package/dist/THIRD_PARTY_NOTICES.txt +0 -284
  54. package/dist/angular.es.js +0 -321
  55. package/dist/comment-kit.es.js +0 -218
  56. package/dist/demo.es.js +0 -483
  57. package/dist/headless.es.js +0 -4
  58. package/dist/preact.es.js +0 -117
  59. package/dist/qwik.es.js +0 -1
  60. package/dist/qwik.qwik.mjs +0 -114
  61. package/dist/react.es.js +0 -98
  62. package/dist/shared/ShadowRootContext-DD6a0QaI.js +0 -11
  63. package/dist/shared/annotation-icons-Dh-bmNYK.js +0 -172
  64. package/dist/shared/annotation-toolbar-zeiCmKIr.js +0 -1086
  65. package/dist/shared/attachment-refresh-DAacLaRu.js +0 -94
  66. package/dist/shared/bridge-CJoGYngu.js +0 -177
  67. package/dist/shared/button-D4GHW6oZ.js +0 -474
  68. package/dist/shared/button-group-BVR7iT-S.js +0 -91
  69. package/dist/shared/capture-privacy-CiOrcAlt.js +0 -101
  70. package/dist/shared/comment-drawing-canvas-Btc12IsS.js +0 -124
  71. package/dist/shared/comment-icon-D8JTCEJ7.js +0 -607
  72. package/dist/shared/comment-image-lightbox--QpbcAtH.js +0 -190
  73. package/dist/shared/comment-images-content-C_r4SHM-.js +0 -214
  74. package/dist/shared/comment-kit-core-CmLUFujd.js +0 -3682
  75. package/dist/shared/comment-kit-ui-BHwYuSIi.js +0 -19391
  76. package/dist/shared/comment-screenshot-annotator-zJZyO-XM.js +0 -151
  77. package/dist/shared/comment-screenshot-overlay-CoKTYB0J.js +0 -205
  78. package/dist/shared/comment-shortcut-groups-CfEmkitU.js +0 -153
  79. package/dist/shared/createReactComponent-BZHeRbD0.js +0 -45
  80. package/dist/shared/dev-export-panel-Cnt6oCZU.js +0 -207
  81. package/dist/shared/dev-grab-B85jo9AS.js +0 -197
  82. package/dist/shared/dist-D9A5k-N4.js +0 -617
  83. package/dist/shared/dom-Bhf4WFtY.js +0 -223
  84. package/dist/shared/element-selector-Cng84xC7.js +0 -902
  85. package/dist/shared/error-boundary-D3PD74vI.js +0 -21
  86. package/dist/shared/errors-Bu5ajEmB.js +0 -22
  87. package/dist/shared/icons-nzMOLzrm.js +0 -266
  88. package/dist/shared/input-UPtAj0M6.js +0 -111
  89. package/dist/shared/mount-ui-Dz7FB_Ak.js +0 -208
  90. package/dist/shared/realtime-recovery-BjlV-ewc.js +0 -162
  91. package/dist/shared/realtime-yGLX4wMK.js +0 -334
  92. package/dist/shared/request-activity-DQrAUwfA.js +0 -11
  93. package/dist/shared/screenshot-B5-hwpmt.js +0 -199
  94. package/dist/shared/separator-UhJb0Row.js +0 -3955
  95. package/dist/shared/shadow-root-B58ZI2yz.js +0 -133
  96. package/dist/shared/styles-CnYsLS2f.js +0 -2
  97. package/dist/shared/text-B4HHZNaa.js +0 -23
  98. package/dist/shared/token-session-D92MYbNu.js +0 -25
  99. package/dist/shared/useLabelableId-8n0QmH8N.js +0 -154
  100. package/dist/shared/useRender-Uxk1OPK-.js +0 -5
  101. package/dist/shared/useValueChanged-DKq5cMot.js +0 -92
  102. package/dist/shared/validation-3wbbbuX0.js +0 -70
  103. package/dist/shared/websocket-manager-KhH4hL0Q.js +0 -381
  104. package/dist/solid.es.js +0 -98
  105. package/dist/svelte.es.js +0 -130
  106. package/dist/types/adapters/bridge.d.ts +0 -122
  107. package/dist/types/angular/index.d.ts +0 -145
  108. package/dist/types/core/agent-context.d.ts +0 -17
  109. package/dist/types/core/api-client.d.ts +0 -155
  110. package/dist/types/core/comment-kit-core.d.ts +0 -254
  111. package/dist/types/core/local-demo.d.ts +0 -60
  112. package/dist/types/core/types.d.ts +0 -770
  113. package/dist/types/core/websocket-manager.d.ts +0 -125
  114. package/dist/types/core/write-access.d.ts +0 -11
  115. package/dist/types/demo.d.ts +0 -17
  116. package/dist/types/headless.d.ts +0 -8
  117. package/dist/types/index.d.ts +0 -87
  118. package/dist/types/preact/index.d.ts +0 -25
  119. package/dist/types/qwik/index.d.ts +0 -73
  120. package/dist/types/react/client.d.ts +0 -31
  121. package/dist/types/react/index.d.ts +0 -4
  122. package/dist/types/solid/index.d.ts +0 -37
  123. package/dist/types/svelte/index.d.ts +0 -55
  124. package/dist/types/utils/dom.d.ts +0 -59
  125. package/dist/types/utils/event-emitter.d.ts +0 -11
  126. package/dist/types/vue/index.d.ts +0 -87
  127. package/dist/vue.es.js +0 -148
  128. package/docs/api-reference.md +0 -405
  129. package/docs/local-demo.md +0 -60
@@ -1,474 +0,0 @@
1
- import * as e from "react";
2
- import { createElement as t } from "react";
3
- import { jsx as n } from "react/jsx-runtime";
4
- var r = {};
5
- function i(t, n) {
6
- let i = e.useRef(r);
7
- return i.current === r && (i.current = t(n)), i;
8
- }
9
- function a() {}
10
- var o = Object.freeze([]), s = Object.freeze({}), c = typeof document < "u" ? e.useLayoutEffect : () => {};
11
- function l(e, t) {
12
- return function(n, ...r) {
13
- let i = new URL(e);
14
- return i.searchParams.set("code", n.toString()), r.forEach((e) => i.searchParams.append("args[]", e)), `${t} error #${n}; visit ${i} for the full message.`;
15
- };
16
- }
17
- var u = l("https://base-ui.com/production-error", "Base UI");
18
- function d() {
19
- return typeof window < "u";
20
- }
21
- function f(e) {
22
- return h(e) ? (e.nodeName || "").toLowerCase() : "#document";
23
- }
24
- function p(e) {
25
- var t;
26
- return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
27
- }
28
- function m(e) {
29
- return ((h(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
30
- }
31
- function h(e) {
32
- return d() ? e instanceof Node || e instanceof p(e).Node : !1;
33
- }
34
- function g(e) {
35
- return d() ? e instanceof Element || e instanceof p(e).Element : !1;
36
- }
37
- function _(e) {
38
- return d() ? e instanceof HTMLElement || e instanceof p(e).HTMLElement : !1;
39
- }
40
- function v(e) {
41
- return !d() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof p(e).ShadowRoot;
42
- }
43
- function y(e) {
44
- let { overflow: t, overflowX: n, overflowY: r, display: i } = E(e);
45
- return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
46
- }
47
- function ee(e) {
48
- return /^(table|td|th)$/.test(f(e));
49
- }
50
- function b(e) {
51
- try {
52
- if (e.matches(":popover-open")) return !0;
53
- } catch {}
54
- try {
55
- return e.matches(":modal");
56
- } catch {
57
- return !1;
58
- }
59
- }
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
- }
65
- function re(e) {
66
- let t = D(e);
67
- for (; _(t) && !T(t);) {
68
- if (C(t)) return t;
69
- if (b(t)) return null;
70
- t = D(t);
71
- }
72
- return null;
73
- }
74
- function w() {
75
- return S ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), S;
76
- }
77
- function T(e) {
78
- return /^(html|body|#document)$/.test(f(e));
79
- }
80
- function E(e) {
81
- return p(e).getComputedStyle(e);
82
- }
83
- function ie(e) {
84
- return g(e) ? {
85
- scrollLeft: e.scrollLeft,
86
- scrollTop: e.scrollTop
87
- } : {
88
- scrollLeft: e.scrollX,
89
- scrollTop: e.scrollY
90
- };
91
- }
92
- function D(e) {
93
- if (f(e) === "html") return e;
94
- let t = e.assignedSlot || e.parentNode || v(e) && e.host || m(e);
95
- return v(t) ? t.host : t;
96
- }
97
- function O(e) {
98
- let t = D(e);
99
- return T(t) ? (e.ownerDocument || e).body : _(t) && y(t) ? t : O(t);
100
- }
101
- function k(e, t, n) {
102
- t === void 0 && (t = []), n === void 0 && (n = !0);
103
- let r = O(e), i = r === e.ownerDocument?.body, a = p(r);
104
- if (i) {
105
- let e = A(a);
106
- return t.concat(a, a.visualViewport || [], y(r) ? r : [], e && n ? k(e) : []);
107
- }
108
- return t.concat(r, k(r, [], n));
109
- }
110
- function A(e) {
111
- return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
112
- }
113
- function j(e, t, n, r) {
114
- let a = i(M).current;
115
- return oe(a, e, t, n, r) && N(a, [
116
- e,
117
- t,
118
- n,
119
- r
120
- ]), a.callback;
121
- }
122
- function ae(e) {
123
- let t = i(M).current;
124
- return se(t, e) && N(t, e), t.callback;
125
- }
126
- function M() {
127
- return {
128
- callback: null,
129
- cleanup: null,
130
- refs: []
131
- };
132
- }
133
- function oe(e, t, n, r, i) {
134
- return e.refs[0] !== t || e.refs[1] !== n || e.refs[2] !== r || e.refs[3] !== i;
135
- }
136
- function se(e, t) {
137
- return e.refs.length !== t.length || e.refs.some((e, n) => e !== t[n]);
138
- }
139
- function N(e, t) {
140
- e.refs = t, e.callback = t.every((e) => e == null) ? null : (n) => {
141
- if (e.cleanup &&= (e.cleanup(), null), n != null) {
142
- let r = Array(t.length).fill(null);
143
- for (let e = 0; e < t.length; e += 1) {
144
- let i = t[e];
145
- if (i != null) switch (typeof i) {
146
- case "function": {
147
- let t = i(n);
148
- typeof t == "function" && (r[e] = t);
149
- break;
150
- }
151
- case "object": i.current = n;
152
- }
153
- }
154
- e.cleanup = () => {
155
- for (let e = 0; e < t.length; e += 1) {
156
- let n = t[e];
157
- if (n != null) switch (typeof n) {
158
- case "function": {
159
- let t = r[e];
160
- typeof t == "function" ? t() : n(null);
161
- break;
162
- }
163
- case "object": n.current = null;
164
- }
165
- }
166
- };
167
- }
168
- };
169
- }
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
- }
175
- function ue() {
176
- let e = {
177
- next: void 0,
178
- callback: de,
179
- trampoline: (...t) => e.callback?.(...t),
180
- effect: () => {
181
- e.callback = e.next;
182
- }
183
- };
184
- return e;
185
- }
186
- function de() {}
187
- var fe = parseInt(e.version, 10);
188
- function pe(e) {
189
- return fe >= e;
190
- }
191
- function I(t) {
192
- if (!/*#__PURE__*/ e.isValidElement(t)) return null;
193
- let n = t, r = n.props;
194
- return (pe(19) ? r?.ref : n.ref) ?? null;
195
- }
196
- function L(e, t) {
197
- if (e && !t) return e;
198
- if (!e && t) return t;
199
- if (e || t) return {
200
- ...e,
201
- ...t
202
- };
203
- }
204
- function me(e, t) {
205
- let n = {};
206
- for (let r in e) {
207
- let i = e[r];
208
- if (t?.hasOwnProperty(r)) {
209
- let e = t[r](i);
210
- e != null && Object.assign(n, e);
211
- } else i === !0 ? n[`data-${r.toLowerCase()}`] = "" : i && (n[`data-${r.toLowerCase()}`] = i.toString());
212
- }
213
- return n;
214
- }
215
- function he(e, t) {
216
- return typeof e == "function" ? e(t) : e;
217
- }
218
- function ge(e, t) {
219
- return typeof e == "function" ? e(t) : e;
220
- }
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;
226
- }
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]);
232
- return t;
233
- }
234
- function B(e) {
235
- return U(e) ? { ...e(R) } : ve(e);
236
- }
237
- function V(e, t) {
238
- return U(t) ? t(e) : ye(e, t);
239
- }
240
- function ve(e) {
241
- let t = { ...e };
242
- for (let e in t) {
243
- let n = t[e];
244
- H(e, n) && (t[e] = W(n));
245
- }
246
- return t;
247
- }
248
- function ye(e, t) {
249
- if (!t) return e;
250
- for (let n in t) {
251
- let r = t[n];
252
- switch (n) {
253
- case "style":
254
- e[n] = L(e.style, r);
255
- break;
256
- case "className":
257
- e[n] = K(e.className, r);
258
- break;
259
- default: e[n] = H(n, r) ? be(e[n], r) : r;
260
- }
261
- }
262
- return e;
263
- }
264
- function H(e, t) {
265
- let n = e.charCodeAt(0), r = e.charCodeAt(1), i = e.charCodeAt(2);
266
- return n === 111 && r === 110 && i >= 65 && i <= 90 && (typeof t == "function" || t === void 0);
267
- }
268
- function U(e) {
269
- return typeof e == "function";
270
- }
271
- function be(e, t) {
272
- return t ? e ? (...n) => {
273
- let r = n[0];
274
- if (q(r)) {
275
- let i = r;
276
- G(i);
277
- let a = t(...n);
278
- return i.baseUIHandlerPrevented || e?.(...n), a;
279
- }
280
- let i = t(...n);
281
- return e?.(...n), i;
282
- } : W(t) : e;
283
- }
284
- function W(e) {
285
- return e && ((...t) => {
286
- let n = t[0];
287
- return q(n) && G(n), e(...t);
288
- });
289
- }
290
- function G(e) {
291
- return e.preventBaseUIHandler = () => {
292
- e.baseUIHandlerPrevented = !0;
293
- }, e;
294
- }
295
- function K(e, t) {
296
- return t ? e ? t + " " + e : t : e;
297
- }
298
- function q(e) {
299
- return typeof e == "object" && !!e && "nativeEvent" in e;
300
- }
301
- function J(e, t, n = {}) {
302
- let r = t.render;
303
- n.enabled !== !1 && (r = Y(r));
304
- let i = xe(t, n, r);
305
- if (n.enabled === !1) return null;
306
- let a = n.state ?? s;
307
- return we(e, r, i, a);
308
- }
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([
312
- h.ref,
313
- I(n),
314
- ...o
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;
316
- }
317
- function Se(e) {
318
- return Array.isArray(e) ? _e(e) : z(void 0, e);
319
- }
320
- var Ce = Symbol.for("react.lazy");
321
- function Y(t) {
322
- if (t?.$$typeof !== Ce) return t;
323
- let n = e.Children.toArray(t)[0];
324
- return /*#__PURE__*/ e.isValidElement(n) ? n : t;
325
- }
326
- function we(t, n, r, i) {
327
- if (n) {
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);
331
- }
332
- return Te(t, r);
333
- }
334
- function Te(n, r) {
335
- return n === "button" ? /*#__PURE__*/ t("button", {
336
- type: "button",
337
- ...r,
338
- key: r.key
339
- }) : n === "img" ? /*#__PURE__*/ t("img", {
340
- alt: "",
341
- ...r,
342
- key: r.key
343
- }) : /*#__PURE__*/ e.createElement(n, r);
344
- }
345
- function X(...e) {
346
- let t = [];
347
- for (let n of e) if (n) {
348
- if (typeof n == "string") t.push(n);
349
- else if (Array.isArray(n)) {
350
- let e = X(...n);
351
- e && t.push(e);
352
- }
353
- }
354
- return t.join(" ");
355
- }
356
- function Z(e, t) {
357
- return typeof t == "function" ? (n) => X(e, t(n)) : X(e, t);
358
- }
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));
363
- return n;
364
- }
365
- function Oe(t) {
366
- let { focusableWhenDisabled: n, disabled: r, composite: i = !1, tabIndex: a = 0, isNativeButton: o } = t, s = i && n !== !1, c = i && n === !1;
367
- return { props: e.useMemo(() => {
368
- let e = { onKeyDown(e) {
369
- r && n && e.key !== "Tab" && e.preventDefault();
370
- } };
371
- return i || (e.tabIndex = a, !o && r && (e.tabIndex = n ? a : -1)), (o && (n || s) || !o && r) && (e["aria-disabled"] = r), o && (!n || c) && (e.disabled = r), e;
372
- }, [
373
- i,
374
- r,
375
- n,
376
- s,
377
- c,
378
- o,
379
- a
380
- ]) };
381
- }
382
- function Q(e, t, { detail: n = 0, pointerType: r = "" } = {}) {
383
- e.dispatchEvent(new (p(e)).PointerEvent("click", {
384
- bubbles: !0,
385
- cancelable: !0,
386
- composed: !0,
387
- detail: n,
388
- pointerType: r,
389
- shiftKey: t.shiftKey,
390
- ctrlKey: t.ctrlKey,
391
- altKey: t.altKey,
392
- metaKey: t.metaKey
393
- }));
394
- }
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({
397
- focusableWhenDisabled: r,
398
- disabled: n,
399
- composite: u,
400
- tabIndex: i,
401
- isNativeButton: a
402
- }), f = e.useCallback(() => {
403
- let e = s.current;
404
- $(e) && u && n && d.disabled === void 0 && e.disabled && (e.disabled = !1);
405
- }, [
406
- n,
407
- d.disabled,
408
- u
409
- ]);
410
- return c(f, [f]), {
411
- getButtonProps: e.useCallback((e = {}) => {
412
- let { onClick: t, onMouseDown: r, onKeyUp: i, onKeyDown: o, onPointerDown: s, ...c } = e;
413
- return z({
414
- onClick(e) {
415
- n ? e.preventDefault() : t?.(e);
416
- },
417
- onMouseDown(e) {
418
- n || r?.(e);
419
- },
420
- onKeyDown(e) {
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";
423
- if (t && u && d) {
424
- if (e.defaultPrevented && p) return;
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)));
427
- },
428
- onKeyUp(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)));
430
- },
431
- onPointerDown(e) {
432
- n ? e.preventDefault() : s?.(e);
433
- }
434
- }, a ? { type: "button" } : { role: "button" }, d, c);
435
- }, [
436
- n,
437
- d,
438
- u,
439
- a
440
- ]),
441
- buttonRef: le((e) => {
442
- s.current = e, f();
443
- })
444
- };
445
- }
446
- function $(e) {
447
- return _(e) && e.tagName === "BUTTON";
448
- }
449
- function Ae(e) {
450
- return _(e) && e.tagName === "A" && !!e.href;
451
- }
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({
454
- disabled: i,
455
- focusableWhenDisabled: a,
456
- native: o
457
- });
458
- return J("button", e, {
459
- state: { disabled: i },
460
- ref: [t, u],
461
- props: [c, l]
462
- });
463
- }), Me = e.forwardRef(function({ className: e, variant: t = "default", size: r = "default", ...i }, a) {
464
- return /* @__PURE__ */ n(je, {
465
- ref: a,
466
- "data-slot": "button",
467
- "data-variant": t,
468
- "data-size": r,
469
- className: Z("ck-button", e),
470
- ...i
471
- });
472
- });
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,91 +0,0 @@
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
- import * as o from "react";
5
- import { jsx as s } from "react/jsx-runtime";
6
- var c = "ArrowUp", l = "ArrowDown", u = "ArrowLeft", d = "ArrowRight", f = "Home", p = "PageUp", m = "PageDown", h = /* @__PURE__ */ new Set([
7
- c,
8
- l,
9
- u,
10
- d,
11
- f,
12
- "End"
13
- ]), g = [
14
- "Shift",
15
- "Control",
16
- "Alt",
17
- "Meta"
18
- ];
19
- function _(t) {
20
- return e(t) && t.tagName === "INPUT";
21
- }
22
- function v(t) {
23
- return !!(_(t) && t.selectionStart != null || e(t) && t.tagName === "TEXTAREA");
24
- }
25
- function y(e, t, n, r) {
26
- if (!e || !t || !t.scrollTo) return;
27
- let i = e.scrollLeft, a = e.scrollTop, o = e.clientWidth < e.scrollWidth, s = e.clientHeight < e.scrollHeight;
28
- if (o && r !== "vertical") {
29
- let r = b(e, t, "left"), a = x(e), o = x(t);
30
- n === "ltr" && (r + t.offsetWidth + o.scrollMarginRight > e.scrollLeft + e.clientWidth - a.scrollPaddingRight ? i = r + t.offsetWidth + o.scrollMarginRight - e.clientWidth + a.scrollPaddingRight : r - o.scrollMarginLeft < e.scrollLeft + a.scrollPaddingLeft && (i = r - o.scrollMarginLeft - a.scrollPaddingLeft)), n === "rtl" && (r - o.scrollMarginLeft < e.scrollLeft + a.scrollPaddingLeft ? i = r - o.scrollMarginLeft - a.scrollPaddingLeft : r + t.offsetWidth + o.scrollMarginRight > e.scrollLeft + e.clientWidth - a.scrollPaddingRight && (i = r + t.offsetWidth + o.scrollMarginRight - e.clientWidth + a.scrollPaddingRight));
31
- }
32
- if (s && r !== "horizontal") {
33
- let n = b(e, t, "top"), r = x(e), i = x(t);
34
- n - i.scrollMarginTop < e.scrollTop + r.scrollPaddingTop ? a = n - i.scrollMarginTop - r.scrollPaddingTop : n + t.offsetHeight + i.scrollMarginBottom > e.scrollTop + e.clientHeight - r.scrollPaddingBottom && (a = n + t.offsetHeight + i.scrollMarginBottom - e.clientHeight + r.scrollPaddingBottom);
35
- }
36
- e.scrollTo({
37
- left: i,
38
- top: a,
39
- behavior: "auto"
40
- });
41
- }
42
- function b(e, t, n) {
43
- let r = n === "left" ? "offsetLeft" : "offsetTop", i = 0;
44
- for (; t.offsetParent && (i += t[r], t.offsetParent !== e);) t = t.offsetParent;
45
- return i;
46
- }
47
- function x(e) {
48
- let t = getComputedStyle(e);
49
- return {
50
- scrollMarginTop: parseFloat(t.scrollMarginTop) || 0,
51
- scrollMarginRight: parseFloat(t.scrollMarginRight) || 0,
52
- scrollMarginBottom: parseFloat(t.scrollMarginBottom) || 0,
53
- scrollMarginLeft: parseFloat(t.scrollMarginLeft) || 0,
54
- scrollPaddingTop: parseFloat(t.scrollPaddingTop) || 0,
55
- scrollPaddingRight: parseFloat(t.scrollPaddingRight) || 0,
56
- scrollPaddingBottom: parseFloat(t.scrollPaddingBottom) || 0,
57
- scrollPaddingLeft: parseFloat(t.scrollPaddingLeft) || 0
58
- };
59
- }
60
- var S = o.forwardRef(function({ className: e, orientation: n = "horizontal", ...r }, i) {
61
- return /* @__PURE__ */ s("div", {
62
- ref: i,
63
- role: "group",
64
- "data-slot": "button-group",
65
- "data-orientation": n,
66
- className: t("ck-button-group", e),
67
- ...r
68
- });
69
- });
70
- S.displayName = "ButtonGroup";
71
- var C = o.forwardRef(function({ className: e, render: n, ...i }, o) {
72
- return a({
73
- defaultTagName: "div",
74
- ref: o,
75
- props: r({ className: t("ck-button-group-text", e) }, i),
76
- render: n,
77
- state: { slot: "button-group-text" }
78
- });
79
- });
80
- C.displayName = "ButtonGroupText";
81
- var w = o.forwardRef(function({ className: e, orientation: t = "vertical", ...r }, a) {
82
- return /* @__PURE__ */ s(i, {
83
- ref: a,
84
- "data-slot": "button-group-separator",
85
- orientation: t,
86
- className: n("ck-button-group-separator", e),
87
- ...r
88
- });
89
- });
90
- w.displayName = "ButtonGroupSeparator";
91
- export { c as a, g as c, v as d, y as f, d as i, m as l, l as n, h as o, u as r, f as s, S as t, p as u };
@@ -1,101 +0,0 @@
1
- var e = "iframe,[data-commentkit],[data-commentkit-host],[data-commentkit-ui],[data-commentkit-panel],[data-commentkit-redact],[data-html2canvas-ignore],input[type=\"password\"],input[type=\"hidden\"]," + [
2
- "current-password",
3
- "new-password",
4
- "one-time-code",
5
- "cc-name",
6
- "cc-given-name",
7
- "cc-additional-name",
8
- "cc-family-name",
9
- "cc-number",
10
- "cc-exp",
11
- "cc-exp-month",
12
- "cc-exp-year",
13
- "cc-csc",
14
- "cc-type"
15
- ].map((e) => `[autocomplete~="${e}" i]`).join(",");
16
- function t(t) {
17
- try {
18
- let n = t;
19
- for (; n;) {
20
- if (n.closest(e)) return !0;
21
- let t = n.getRootNode();
22
- n = t instanceof ShadowRoot ? t.host : null;
23
- }
24
- return !1;
25
- } catch {
26
- return !0;
27
- }
28
- }
29
- var n = /* @__PURE__ */ new Set([
30
- "script",
31
- "style",
32
- "template",
33
- "noscript",
34
- "iframe",
35
- "object",
36
- "embed"
37
- ]), r = /* @__PURE__ */ new Set([
38
- "input",
39
- "textarea",
40
- "select"
41
- ]), i = /* @__PURE__ */ new Set([
42
- "id",
43
- "class",
44
- "role",
45
- "aria-label",
46
- "title",
47
- "type",
48
- "name"
49
- ]), a = 2e3, o = 100, s = 16e3;
50
- function c(e) {
51
- return r.has(e.tagName.toLowerCase()) || e.hasAttribute("contenteditable");
52
- }
53
- function l(e) {
54
- try {
55
- let t = e;
56
- for (;;) {
57
- let e = t.parentElement;
58
- if (e) t = e;
59
- else {
60
- let e = t.getRootNode();
61
- if (!(e instanceof ShadowRoot)) return !1;
62
- t = e.host;
63
- }
64
- if (c(t)) return !0;
65
- }
66
- } catch {
67
- return !0;
68
- }
69
- }
70
- function u(e) {
71
- return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
72
- }
73
- function d(e) {
74
- if (l(e)) return {
75
- text: "",
76
- html: ""
77
- };
78
- let r = 0, d = 0, f = [], p = (e, l) => {
79
- if (++r > a || l > o || d >= s) return "";
80
- if (e.nodeType === 3) {
81
- let t = (e.textContent ?? "").slice(0, s - d);
82
- return d += t.length, f.push(t), u(t);
83
- }
84
- if (e.nodeType !== 1) return "";
85
- let m = e, h = m.tagName.toLowerCase();
86
- if (n.has(h) || t(m)) return "";
87
- let g = Array.from(m.attributes).filter((e) => i.has(e.name)).map((e) => {
88
- let t = e.value.slice(0, Math.max(0, s - d));
89
- return d += t.length, ` ${e.name}="${u(t)}"`;
90
- }).join(""), _ = c(m), v = "";
91
- if (!_) {
92
- for (let e of m.childNodes) if (v += p(e, l + 1), r >= a || d >= s) break;
93
- }
94
- return `<${h}${g}>${v}</${h}>`;
95
- }, m = p(e, 0);
96
- return {
97
- text: f.join(""),
98
- html: m
99
- };
100
- }
101
- export { d as n, t };