@commentkit/comment-kit 0.7.6 → 1.0.0-beta.0

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 (109) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +108 -762
  3. package/SECURITY.md +19 -14
  4. package/dist/npm/THIRD_PARTY_NOTICES.txt +73 -0
  5. package/dist/npm/chunks/anchor-DT-Ynhh1.js +270 -0
  6. package/dist/npm/chunks/client-D1vrh_5G.js +590 -0
  7. package/dist/{shared/capture-colors-D0uLr-vZ.js → npm/chunks/colors-CX-IPjvb.js} +2 -0
  8. package/dist/npm/chunks/html2canvas-_mjSRP3G.js +4011 -0
  9. package/dist/npm/chunks/mount-Ce1MZrcm.js +2485 -0
  10. package/dist/{shared/pusher-BUaiCkDJ.js → npm/chunks/pusher-DRKlokR8.js} +224 -222
  11. package/dist/npm/chunks/realtime-5SvAvTUU.js +23 -0
  12. package/dist/npm/chunks/rolldown-runtime-VHNaYcLd.js +13 -0
  13. package/dist/npm/chunks/src-DJjfvVsa.js +330 -0
  14. package/dist/npm/element.js +24 -0
  15. package/dist/npm/headless.js +3 -0
  16. package/dist/npm/index.js +3 -0
  17. package/dist/npm/react.js +17 -0
  18. package/dist/npm/svelte.js +8 -0
  19. package/dist/npm/types/adapters/react.d.ts +9 -0
  20. package/dist/npm/types/adapters/svelte.d.ts +9 -0
  21. package/dist/npm/types/adapters/vue.d.ts +46 -0
  22. package/dist/npm/types/anchor/index.d.ts +49 -0
  23. package/dist/npm/types/core/api.d.ts +29 -0
  24. package/dist/npm/types/core/auth.d.ts +48 -0
  25. package/dist/npm/types/core/client.d.ts +100 -0
  26. package/dist/npm/types/core/store.d.ts +7 -0
  27. package/dist/npm/types/core/types.d.ts +278 -0
  28. package/dist/npm/types/element.d.ts +10 -0
  29. package/dist/npm/types/headless.d.ts +7 -0
  30. package/dist/npm/types/index.d.ts +30 -0
  31. package/dist/npm/vue.js +32 -0
  32. package/package.json +65 -173
  33. package/dist/THIRD_PARTY_NOTICES.txt +0 -284
  34. package/dist/angular.es.js +0 -321
  35. package/dist/comment-kit.es.js +0 -218
  36. package/dist/demo.es.js +0 -483
  37. package/dist/headless.es.js +0 -4
  38. package/dist/preact.es.js +0 -117
  39. package/dist/qwik.es.js +0 -1
  40. package/dist/qwik.qwik.mjs +0 -114
  41. package/dist/react.es.js +0 -98
  42. package/dist/shared/ShadowRootContext-DD6a0QaI.js +0 -11
  43. package/dist/shared/annotation-icons-Dh-bmNYK.js +0 -172
  44. package/dist/shared/annotation-toolbar-RSrb0Nku.js +0 -1086
  45. package/dist/shared/attachment-refresh-CSTYwRW-.js +0 -94
  46. package/dist/shared/bridge-CJoGYngu.js +0 -177
  47. package/dist/shared/button-D4GHW6oZ.js +0 -474
  48. package/dist/shared/button-group-BVR7iT-S.js +0 -91
  49. package/dist/shared/capture-privacy-DUROnio5.js +0 -77
  50. package/dist/shared/comment-drawing-canvas-DbuXP54N.js +0 -124
  51. package/dist/shared/comment-icon-D8JTCEJ7.js +0 -607
  52. package/dist/shared/comment-image-lightbox-zlIGEVA-.js +0 -190
  53. package/dist/shared/comment-images-content-aYbJb79_.js +0 -214
  54. package/dist/shared/comment-kit-core-B0k7XsMz.js +0 -3680
  55. package/dist/shared/comment-kit-ui-BXLJcZYQ.js +0 -19391
  56. package/dist/shared/comment-screenshot-annotator-ChWwYJzO.js +0 -151
  57. package/dist/shared/comment-screenshot-overlay-Bufg3rHz.js +0 -205
  58. package/dist/shared/comment-shortcut-groups-CfEmkitU.js +0 -153
  59. package/dist/shared/createReactComponent-BZHeRbD0.js +0 -45
  60. package/dist/shared/dev-export-panel-DAZenvgD.js +0 -207
  61. package/dist/shared/dev-grab-O8q25zar.js +0 -197
  62. package/dist/shared/dist-D9A5k-N4.js +0 -617
  63. package/dist/shared/dom-Bhf4WFtY.js +0 -223
  64. package/dist/shared/element-selector-CYkwzfEr.js +0 -902
  65. package/dist/shared/error-boundary-D3PD74vI.js +0 -21
  66. package/dist/shared/errors-Bu5ajEmB.js +0 -22
  67. package/dist/shared/icons-nzMOLzrm.js +0 -266
  68. package/dist/shared/input-UPtAj0M6.js +0 -111
  69. package/dist/shared/mount-ui-BKaWBhKq.js +0 -208
  70. package/dist/shared/realtime-C0Z8dXXH.js +0 -334
  71. package/dist/shared/realtime-recovery-BjlV-ewc.js +0 -162
  72. package/dist/shared/request-activity-DQrAUwfA.js +0 -11
  73. package/dist/shared/screenshot-B-ZfFItT.js +0 -199
  74. package/dist/shared/separator-UhJb0Row.js +0 -3955
  75. package/dist/shared/shadow-root-Cd3SLHyj.js +0 -133
  76. package/dist/shared/styles-CnYsLS2f.js +0 -2
  77. package/dist/shared/text-B4HHZNaa.js +0 -23
  78. package/dist/shared/token-session-DplW5QDx.js +0 -25
  79. package/dist/shared/useLabelableId-8n0QmH8N.js +0 -154
  80. package/dist/shared/useRender-Uxk1OPK-.js +0 -5
  81. package/dist/shared/useValueChanged-DKq5cMot.js +0 -92
  82. package/dist/shared/validation-3wbbbuX0.js +0 -70
  83. package/dist/shared/websocket-manager-798cRDyL.js +0 -381
  84. package/dist/solid.es.js +0 -98
  85. package/dist/svelte.es.js +0 -130
  86. package/dist/types/adapters/bridge.d.ts +0 -122
  87. package/dist/types/angular/index.d.ts +0 -145
  88. package/dist/types/core/agent-context.d.ts +0 -17
  89. package/dist/types/core/api-client.d.ts +0 -155
  90. package/dist/types/core/comment-kit-core.d.ts +0 -254
  91. package/dist/types/core/local-demo.d.ts +0 -60
  92. package/dist/types/core/types.d.ts +0 -770
  93. package/dist/types/core/websocket-manager.d.ts +0 -125
  94. package/dist/types/core/write-access.d.ts +0 -11
  95. package/dist/types/demo.d.ts +0 -17
  96. package/dist/types/headless.d.ts +0 -8
  97. package/dist/types/index.d.ts +0 -87
  98. package/dist/types/preact/index.d.ts +0 -25
  99. package/dist/types/qwik/index.d.ts +0 -73
  100. package/dist/types/react/client.d.ts +0 -31
  101. package/dist/types/react/index.d.ts +0 -4
  102. package/dist/types/solid/index.d.ts +0 -37
  103. package/dist/types/svelte/index.d.ts +0 -55
  104. package/dist/types/utils/dom.d.ts +0 -59
  105. package/dist/types/utils/event-emitter.d.ts +0 -11
  106. package/dist/types/vue/index.d.ts +0 -87
  107. package/dist/vue.es.js +0 -148
  108. package/docs/api-reference.md +0 -405
  109. package/docs/local-demo.md +0 -60
@@ -1,321 +0,0 @@
1
- import { t as e } from "./shared/comment-kit-core-B0k7XsMz.js";
2
- import { n as t, r as n, t as r } from "./shared/bridge-CJoGYngu.js";
3
- import { n as i, t as a } from "./shared/errors-Bu5ajEmB.js";
4
- import { Inject as o, Injectable as s, InjectionToken as c, Optional as l } from "@angular/core";
5
- import { BehaviorSubject as u } from "rxjs";
6
- import { distinctUntilChanged as d, map as f } from "rxjs/operators";
7
- function p(e, t) {
8
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, t);
9
- }
10
- function m(e, t) {
11
- return function(n, r) {
12
- t(n, r, e);
13
- };
14
- }
15
- function h(e, t, n, r) {
16
- var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
17
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
18
- else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
19
- return i > 3 && a && Object.defineProperty(t, n, a), a;
20
- }
21
- var g = new c("COMMENT_KIT_CONFIG");
22
- function _() {
23
- return typeof document < "u";
24
- }
25
- var v = class {
26
- constructor(e) {
27
- this.config = e, this.core = null, this.unsubscribers = [], this.mountedUI = null, this.lifecycleId = 0, this.coreSubject = new u(null), this.stateSubject = new u(null), this.isReadySubject = new u(!1), this.isLoadingSubject = new u(!0), this.errorSubject = new u(null), this.bridge = t(() => this.core, (e) => this.errorSubject.next(a(e))), this.core$ = this.coreSubject.asObservable(), this.state$ = this.stateSubject.asObservable(), this.isReady$ = this.isReadySubject.asObservable(), this.isLoading$ = this.isLoadingSubject.asObservable(), this.error$ = this.errorSubject.asObservable(), this.isAuthenticated$ = this.state$.pipe(f(r.isAuthenticated), d()), this.isOverlayVisible$ = this.state$.pipe(f(r.isOverlayVisible), d()), this.isSidebarVisible$ = this.state$.pipe(f(r.isSidebarVisible), d()), this.currentUser$ = this.state$.pipe(f(r.currentUser), d()), this.comments$ = this.state$.pipe(f(r.comments), d()), this.activeTool$ = this.state$.pipe(f(r.activeTool), d()), this.otpStep$ = this.state$.pipe(f(r.otpStep), d()), this.otpEmail$ = this.state$.pipe(f(r.otpEmail), d()), this.pendingMutationCount$ = this.state$.pipe(f(r.pendingMutationCount), d()), this.isOnline$ = this.state$.pipe(f(r.isOnline), d()), this.selectedComment$ = this.state$.pipe(f(r.selectedComment), d()), this.connectionStatus$ = this.state$.pipe(f(r.connectionStatus), d()), this.panelView$ = this.state$.pipe(f(r.panelView), d()), this.isShortcutsOverlayVisible$ = this.state$.pipe(f(r.isShortcutsOverlayVisible), d()), this.activeDrawing$ = this.state$.pipe(f(r.activeDrawing), d()), this.activeScreenshot$ = this.state$.pipe(f(r.activeScreenshot), d()), this.readyNotified = !1, this.config && _() && this.initialize(this.config).catch(() => {});
28
- }
29
- async initialize(t) {
30
- let r = null;
31
- try {
32
- this.isLoadingSubject.next(!0), this.errorSubject.next(null), this.core && this.destroy();
33
- let i = ++this.lifecycleId;
34
- r = new e(t), this.core = r, this.coreSubject.next(r), n(this.bridge), this.setupEventListeners(r, t), t.enabled !== !1 && _() && this.mountSharedUI(r, i, t);
35
- let a = r.getState();
36
- this.stateSubject.next(a), this.isReadySubject.next(!0), this.isLoadingSubject.next(!1), a.isAuthenticated && this.notifyAuthenticated(t);
37
- } catch (e) {
38
- let n = a(e);
39
- if (r && this.core === r) {
40
- this.core = null, this.coreSubject.next(null), this.clearSubscriptions();
41
- try {
42
- r.destroy();
43
- } catch {}
44
- }
45
- throw this.isLoadingSubject.next(!1), this.reportError(n, t), e;
46
- }
47
- }
48
- assertReady() {
49
- if (!this.core) throw Error("CommentKit not initialized");
50
- }
51
- assertReadyAsync() {
52
- if (!this.core) return Promise.reject(/* @__PURE__ */ Error("CommentKit not initialized"));
53
- }
54
- validateInvite(e) {
55
- return this.assertReadyAsync() ?? this.bridge.validateInvite(e);
56
- }
57
- login(e) {
58
- return this.assertReadyAsync() ?? (this.errorSubject.next(null), this.bridge.login(e));
59
- }
60
- verifyOtp(e) {
61
- return this.assertReadyAsync() ?? (this.errorSubject.next(null), this.bridge.verifyOtp(e));
62
- }
63
- cancelOtp() {
64
- this.assertReady(), this.bridge.cancelOtp();
65
- }
66
- resendOtp() {
67
- return this.assertReadyAsync() ?? this.bridge.resendOtp();
68
- }
69
- logout() {
70
- this.assertReady(), this.bridge.logout();
71
- }
72
- toggleLoginModal() {
73
- this.assertReady(), this.bridge.toggleLoginModal();
74
- }
75
- toggleOverlay() {
76
- this.assertReady(), this.bridge.toggleOverlay();
77
- }
78
- toggleSidebar() {
79
- this.assertReady(), this.bridge.toggleSidebar();
80
- }
81
- setTool(e) {
82
- this.assertReady(), this.bridge.setTool(e);
83
- }
84
- toggleShortcutsOverlay() {
85
- this.assertReady(), this.bridge.toggleShortcutsOverlay();
86
- }
87
- setPanelView(e) {
88
- this.assertReady(), this.bridge.setPanelView(e);
89
- }
90
- loadMoreComments() {
91
- return this.assertReadyAsync() ?? this.bridge.loadMoreComments();
92
- }
93
- reloadComments() {
94
- return this.assertReadyAsync() ?? this.bridge.reloadComments();
95
- }
96
- setBranch(...e) {
97
- return this.assertReadyAsync() ?? this.bridge.setBranch(...e);
98
- }
99
- reloadProjectContext() {
100
- return this.assertReadyAsync() ?? this.bridge.reloadProjectContext();
101
- }
102
- getProjectMembers() {
103
- return this.assertReadyAsync() ?? this.bridge.getProjectMembers();
104
- }
105
- createComment(...e) {
106
- return this.assertReadyAsync() ?? this.bridge.createComment(...e);
107
- }
108
- updateComment(...e) {
109
- return this.assertReadyAsync() ?? this.bridge.updateComment(...e);
110
- }
111
- deleteComment(e) {
112
- return this.assertReadyAsync() ?? this.bridge.deleteComment(e);
113
- }
114
- resolveComment(e) {
115
- return this.assertReadyAsync() ?? this.bridge.resolveComment(e);
116
- }
117
- unresolveComment(e) {
118
- return this.assertReadyAsync() ?? this.bridge.unresolveComment(e);
119
- }
120
- completeComment(e) {
121
- return this.assertReadyAsync() ?? this.bridge.completeComment(e);
122
- }
123
- selectComment(...e) {
124
- this.assertReady(), this.bridge.selectComment(...e);
125
- }
126
- addReply(...e) {
127
- return this.assertReadyAsync() ?? this.bridge.addReply(...e);
128
- }
129
- updateReply(...e) {
130
- return this.assertReadyAsync() ?? this.bridge.updateReply(...e);
131
- }
132
- deleteReply(e, t) {
133
- return this.assertReadyAsync() ?? this.bridge.deleteReply(e, t);
134
- }
135
- reactToComment(...e) {
136
- return this.assertReadyAsync() ?? this.bridge.reactToComment(...e);
137
- }
138
- updateCommentPosition(e, t, n) {
139
- return this.assertReadyAsync() ?? this.bridge.updateCommentPosition(e, t, n);
140
- }
141
- createHighlight(...e) {
142
- return this.assertReadyAsync() ?? this.bridge.createHighlight(...e);
143
- }
144
- createDrawing(...e) {
145
- return this.assertReadyAsync() ?? this.bridge.createDrawing(...e);
146
- }
147
- setActiveDrawing(...e) {
148
- this.assertReady(), this.bridge.setActiveDrawing(...e);
149
- }
150
- sendDrawingStroke(...e) {
151
- this.assertReady(), this.bridge.sendDrawingStroke(...e);
152
- }
153
- captureScreenshot(...e) {
154
- return this.assertReadyAsync() ?? this.bridge.captureScreenshot(...e);
155
- }
156
- uploadScreenshot(...e) {
157
- return this.assertReadyAsync() ?? this.bridge.uploadScreenshot(...e);
158
- }
159
- setActiveScreenshot(...e) {
160
- this.assertReady(), this.bridge.setActiveScreenshot(...e);
161
- }
162
- uploadFiles(...e) {
163
- return this.assertReadyAsync() ?? this.bridge.uploadFiles(...e);
164
- }
165
- markThreadSeen(e) {
166
- this.assertReady(), this.bridge.markThreadSeen(e);
167
- }
168
- isThreadNew(e) {
169
- return this.assertReady(), this.bridge.isThreadNew(e);
170
- }
171
- markAllActivitiesRead() {
172
- this.assertReady(), this.bridge.markAllActivitiesRead();
173
- }
174
- getUnreadActivityCount() {
175
- return this.assertReady(), this.bridge.getUnreadActivityCount();
176
- }
177
- getPendingMutationCount() {
178
- return this.assertReady(), this.bridge.getPendingMutationCount();
179
- }
180
- getOnlineUsers() {
181
- return this.assertReady(), this.bridge.getOnlineUsers();
182
- }
183
- getAgentContext(...e) {
184
- return this.assertReady(), this.bridge.getAgentContext(...e);
185
- }
186
- getAgentContextAsync(...e) {
187
- return this.assertReadyAsync() ?? this.bridge.getAgentContextAsync(...e);
188
- }
189
- formatAgentContext(...e) {
190
- return this.assertReady(), this.bridge.formatAgentContext(...e);
191
- }
192
- formatAgentContextAsync(...e) {
193
- return this.assertReadyAsync() ?? this.bridge.formatAgentContextAsync(...e);
194
- }
195
- copyAgentContext(...e) {
196
- return this.assertReadyAsync() ?? this.bridge.copyAgentContext(...e);
197
- }
198
- grabElement(...e) {
199
- return this.assertReadyAsync() ?? this.bridge.grabElement(...e);
200
- }
201
- grabElements(...e) {
202
- return this.assertReadyAsync() ?? this.bridge.grabElements(...e);
203
- }
204
- onSlice(...e) {
205
- return this.bridge.onSlice(...e);
206
- }
207
- select(...e) {
208
- return this.bridge.select(...e);
209
- }
210
- on(...e) {
211
- return this.bridge.on(...e);
212
- }
213
- off(...e) {
214
- this.bridge.off(...e);
215
- }
216
- getCurrentState() {
217
- return this.core?.getState() ?? null;
218
- }
219
- setupEventListeners(e, t) {
220
- this.clearSubscriptions(), this.unsubscribers.push(e.on("state:changed", (n) => {
221
- this.core === e && (this.stateSubject.next(n), n.isAuthenticated && this.notifyAuthenticated(t));
222
- })), this.unsubscribers.push(e.on("error", (n) => {
223
- this.core === e && this.reportError(n, t);
224
- }));
225
- }
226
- clearSubscriptions() {
227
- for (; this.unsubscribers.length > 0;) {
228
- let e = this.unsubscribers.pop();
229
- try {
230
- e?.();
231
- } catch {}
232
- }
233
- }
234
- notifyAuthenticated(e) {
235
- if (!this.readyNotified) {
236
- this.readyNotified = !0;
237
- try {
238
- e.onReady?.();
239
- } catch {}
240
- }
241
- }
242
- reportError(e, t) {
243
- this.errorSubject.next(e);
244
- try {
245
- t?.onError?.(e);
246
- } catch {}
247
- }
248
- async mountSharedUI(e, t, n) {
249
- try {
250
- let { mountCommentKitUI: n } = await import("./shared/mount-ui-BKaWBhKq.js").then((e) => e.n);
251
- if (this.core !== e || this.lifecycleId !== t) return;
252
- let r = await n(e);
253
- if (this.core !== e || this.lifecycleId !== t) {
254
- try {
255
- r.unmount();
256
- } catch {}
257
- return;
258
- }
259
- this.mountedUI = r;
260
- } catch (r) {
261
- this.core === e && this.lifecycleId === t && this.reportError(i(r), n);
262
- }
263
- }
264
- ngOnDestroy() {
265
- this.destroy(), this.coreSubject.complete(), this.stateSubject.complete(), this.isReadySubject.complete(), this.isLoadingSubject.complete(), this.errorSubject.complete();
266
- }
267
- destroy() {
268
- this.lifecycleId++, this.clearSubscriptions();
269
- try {
270
- this.mountedUI?.unmount();
271
- } catch {}
272
- this.mountedUI = null;
273
- let e = this.core;
274
- if (this.core = null, e) try {
275
- e.destroy();
276
- } catch {}
277
- this.coreSubject.next(null), this.stateSubject.next(null), this.isReadySubject.next(!1), this.isLoadingSubject.next(!0), this.errorSubject.next(null), this.readyNotified = !1;
278
- }
279
- };
280
- v = h([
281
- s({ providedIn: "root" }),
282
- m(0, l()),
283
- m(0, o(g)),
284
- p("design:paramtypes", [Object])
285
- ], v);
286
- function y() {
287
- return new v();
288
- }
289
- function b(e) {
290
- return [{
291
- provide: v,
292
- useFactory: (e) => new v(e),
293
- deps: [g]
294
- }, {
295
- provide: g,
296
- useValue: e
297
- }];
298
- }
299
- function x(e, t) {
300
- let n = new v();
301
- return n.initialize(t).catch((e) => {
302
- console.error("CommentKit initialization failed:", e);
303
- }), {
304
- destroy() {
305
- n.destroy();
306
- },
307
- update(e) {
308
- n.initialize(e).catch((e) => {
309
- console.error("CommentKit re-initialization failed:", e);
310
- });
311
- }
312
- };
313
- }
314
- var S = {
315
- CommentKitService: v,
316
- commentKitDirective: x,
317
- createCommentKitService: y,
318
- provideCommentKit: b,
319
- COMMENT_KIT_CONFIG: g
320
- };
321
- export { g as COMMENT_KIT_CONFIG, v as CommentKitService, x as commentKitDirective, y as createCommentKitService, S as default, b as provideCommentKit };
@@ -1,218 +0,0 @@
1
- import { t as e } from "./shared/websocket-manager-798cRDyL.js";
2
- import { _ as t, b as n, h as r, l as i, m as a, n as o, t as s, x as c, y as l } from "./shared/comment-kit-core-B0k7XsMz.js";
3
- import { a as u, c as d, d as f, f as p, i as m, l as h, m as g, n as _, o as v, p as y, r as b, s as x, t as S, u as C } from "./shared/dom-Bhf4WFtY.js";
4
- import "./headless.es.js";
5
- async function w(e) {
6
- return (await import("./demo.es.js")).createCommentKitDemo(e);
7
- }
8
- var T = typeof window < "u", E = class {
9
- constructor(e) {
10
- /* v8 ignore start -- isBrowser always true in jsdom */
11
- this.mountedUI = null, this.destroyed = !1, this.core = new s(e), e.enabled !== !1 && T && this.mount();
12
- /* v8 ignore stop */
13
- }
14
- async mount() {
15
- let e = this.core;
16
- try {
17
- let { mountCommentKitUI: t } = await import("./shared/mount-ui-BKaWBhKq.js").then((e) => e.n);
18
- if (this.destroyed) return;
19
- let n = await t(e);
20
- if (this.destroyed) {
21
- n.unmount();
22
- return;
23
- }
24
- this.mountedUI = n;
25
- } catch (e) {
26
- if (this.destroyed) return;
27
- console.error("[CommentKit] Failed to mount UI:", e), this.core.emit("error", {
28
- error: "mount_failed",
29
- message: "Failed to mount CommentKit UI",
30
- code: 500
31
- });
32
- }
33
- }
34
- getState() {
35
- return this.core.getState();
36
- }
37
- getConfig() {
38
- return this.core.getConfig();
39
- }
40
- getFeatures() {
41
- return this.core.getFeatures();
42
- }
43
- validateInvite(e) {
44
- return this.core.validateInvite(e);
45
- }
46
- login(e) {
47
- return this.core.login(e);
48
- }
49
- verifyOtp(e) {
50
- return this.core.verifyOtp(e);
51
- }
52
- cancelOtp() {
53
- this.core.cancelOtp();
54
- }
55
- resendOtp() {
56
- return this.core.resendOtp();
57
- }
58
- logout() {
59
- this.core.logout();
60
- }
61
- toggleLoginModal() {
62
- this.core.toggleLoginModal();
63
- }
64
- toggleOverlay() {
65
- this.core.toggleOverlay();
66
- }
67
- toggleSidebar() {
68
- this.core.toggleSidebar();
69
- }
70
- setTool(e) {
71
- this.core.setTool(e);
72
- }
73
- createComment(...e) {
74
- return this.core.createComment(...e);
75
- }
76
- updateComment(...e) {
77
- return this.core.updateComment(...e);
78
- }
79
- deleteComment(e) {
80
- return this.core.deleteComment(e);
81
- }
82
- resolveComment(e) {
83
- return this.core.resolveComment(e);
84
- }
85
- unresolveComment(e) {
86
- return this.core.unresolveComment(e);
87
- }
88
- completeComment(e) {
89
- return this.core.completeComment(e);
90
- }
91
- selectComment(e) {
92
- this.core.selectComment(e);
93
- }
94
- addReply(...e) {
95
- return this.core.addReply(...e);
96
- }
97
- updateReply(...e) {
98
- return this.core.updateReply(...e);
99
- }
100
- deleteReply(e, t) {
101
- return this.core.deleteReply(e, t);
102
- }
103
- reactToComment(...e) {
104
- return this.core.reactToComment(...e);
105
- }
106
- updateCommentPosition(e, t, n) {
107
- return this.core.updateCommentPosition(e, t, n);
108
- }
109
- setBranch(e) {
110
- return this.core.setBranch(e);
111
- }
112
- reloadProjectContext() {
113
- return this.core.reloadProjectContext();
114
- }
115
- reloadComments() {
116
- return this.core.reloadComments();
117
- }
118
- loadMoreComments() {
119
- return this.core.loadMoreComments();
120
- }
121
- createHighlight(...e) {
122
- return this.core.createHighlight(...e);
123
- }
124
- createDrawing(...e) {
125
- return this.core.createDrawing(...e);
126
- }
127
- setActiveDrawing(e) {
128
- this.core.setActiveDrawing(e);
129
- }
130
- sendDrawingStroke(e) {
131
- this.core.sendDrawingStroke(e);
132
- }
133
- captureScreenshot(e) {
134
- return this.core.captureScreenshot(e);
135
- }
136
- uploadScreenshot(...e) {
137
- return this.core.uploadScreenshot(...e);
138
- }
139
- setActiveScreenshot(e) {
140
- this.core.setActiveScreenshot(e);
141
- }
142
- uploadFiles(...e) {
143
- return this.core.uploadFiles(...e);
144
- }
145
- getOnlineUsers() {
146
- return this.core.getOnlineUsers();
147
- }
148
- getProjectMembers() {
149
- return this.core.getProjectMembers();
150
- }
151
- toggleShortcutsOverlay() {
152
- this.core.toggleShortcutsOverlay();
153
- }
154
- markThreadSeen(e) {
155
- this.core.markThreadSeen(e);
156
- }
157
- isThreadNew(e) {
158
- return this.core.isThreadNew(e);
159
- }
160
- blockEscape() {
161
- return this.core.blockEscape();
162
- }
163
- setPanelView(e) {
164
- this.core.setPanelView(e);
165
- }
166
- markAllActivitiesRead() {
167
- this.core.markAllActivitiesRead();
168
- }
169
- getUnreadActivityCount() {
170
- return this.core.getUnreadActivityCount();
171
- }
172
- getPendingMutationCount() {
173
- return this.core.getPendingMutationCount();
174
- }
175
- getAgentContext(...e) {
176
- return this.core.getAgentContext(...e);
177
- }
178
- getAgentContextAsync(...e) {
179
- return this.core.getAgentContextAsync(...e);
180
- }
181
- formatAgentContext(...e) {
182
- return this.core.formatAgentContext(...e);
183
- }
184
- formatAgentContextAsync(...e) {
185
- return this.core.formatAgentContextAsync(...e);
186
- }
187
- copyAgentContext(...e) {
188
- return this.core.copyAgentContext(...e);
189
- }
190
- grabElement(...e) {
191
- return this.core.grabElement(...e);
192
- }
193
- grabElements(...e) {
194
- return this.core.grabElements(...e);
195
- }
196
- on(e, t) {
197
- return this.core.on(e, t);
198
- }
199
- off(e, t) {
200
- this.core.off(e, t);
201
- }
202
- onSlice(...e) {
203
- return this.core.onSlice(...e);
204
- }
205
- select(...e) {
206
- return this.core.select(...e);
207
- }
208
- getCore() {
209
- return this.core;
210
- }
211
- destroy() {
212
- this.destroyed || (this.destroyed = !0, this.mountedUI?.unmount(), this.mountedUI = null, this.core.destroy(), T && window.CommentKitInstance === this && (window.CommentKitInstance = void 0));
213
- }
214
- };
215
- /* v8 ignore start */
216
- T && (window.CommentKit = E, window.CommentKitConfig && !window.CommentKitInstance && (window.CommentKitInstance = new E(window.CommentKitConfig)));
217
- /* v8 ignore stop */
218
- export { t as ApiClient, E as CommentKit, s as CommentKitCore, i as EventEmitter, o as SDK_VERSION, e as WebSocketManager, a as createAgentContext, w as createCommentKitDemo, S as debounce, _ as findElement, r as formatAgentContext, l as formatMention, b as generateId, m as generateSelector, u as generateXPath, v as getCurrentPage, x as getElementBounds, d as getSelectionRange, h as getSelectionText, C as isElementVisible, f as isInteractiveElement, n as parseMentions, p as percentageToViewport, c as stripMentionMarkup, y as throttle, g as viewportToPercentage };