@commentkit/comment-kit 2.0.0 → 2.1.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 (92) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/README.md +123 -19
  3. package/SECURITY.md +2 -2
  4. package/dist/node/cli/api.js +61 -15
  5. package/dist/node/cli/credentials.js +8 -0
  6. package/dist/node/cli/doctor.js +152 -25
  7. package/dist/node/cli/init.js +349 -35
  8. package/dist/node/cli/main.js +310 -69
  9. package/dist/node/cli/mcp.js +187 -6
  10. package/dist/node/cli/website.js +140 -0
  11. package/dist/node/shared/dashboard-places.js +33 -0
  12. package/dist/node/types/next.d.ts +4 -4
  13. package/dist/npm/THIRD_PARTY_NOTICES.txt +47 -0
  14. package/dist/npm/chunks/{AgentSend-DxRJIYiz.js → AgentSend-pA7Ufvye.js} +16 -16
  15. package/dist/npm/chunks/Checklist-Cn9skOYK.js +269 -0
  16. package/dist/npm/chunks/Composer-D7H-pzGa.js +734 -0
  17. package/dist/npm/chunks/DatePicker-Nta5a1xD.js +161 -0
  18. package/dist/npm/chunks/{Guest-vvNPz8h-.js → Guest-Bi7hlzhs.js} +63 -59
  19. package/dist/npm/chunks/{MarkupEditor-VCOXh9d2.js → MarkupEditor-WU3USeTk.js} +46 -39
  20. package/dist/npm/chunks/Panel-DhAzbUbC.js +1210 -0
  21. package/dist/npm/chunks/{Settings-BGoZS2iV.js → Settings-BmKqPX40.js} +91 -90
  22. package/dist/npm/chunks/{Shortcuts-B2OMvczr.js → Shortcuts-Bl-c0Sez.js} +25 -23
  23. package/dist/npm/chunks/SignInFirst-CmGvSYkQ.js +35 -0
  24. package/dist/npm/chunks/{StyleEditor-CJ_d8Huf.js → StyleEditor-D6fUnlwq.js} +10 -10
  25. package/dist/npm/chunks/{StylePanel-yQzHHlY7.js → StylePanel-C-Gikxt1.js} +61 -61
  26. package/dist/npm/chunks/TaskFields-CaKi523b.js +617 -0
  27. package/dist/npm/chunks/ThreadCard-d_3pUB5V.js +1142 -0
  28. package/dist/npm/chunks/Viewer-BULQsi9-.js +115 -0
  29. package/dist/npm/chunks/{agent-C1OQzBAm.js → agent-DHdhIJ3s.js} +1 -1
  30. package/dist/npm/chunks/{ar-CAJ3XT8e.js → ar-B5UszrQp.js} +53 -12
  31. package/dist/npm/chunks/card-bits-cV8GdFWX.js +55 -0
  32. package/dist/npm/chunks/{client-kNAo2TTG.js → client-Cv8ddtuM.js} +13 -11
  33. package/dist/npm/chunks/{confetti-CkBdSu19.js → confetti-B9zlyILU.js} +1 -1
  34. package/dist/npm/chunks/{context-B8UAzve0.js → context-CsHnabaA.js} +1 -1
  35. package/dist/npm/chunks/{de-Dl18G48t.js → de-BE0Aaq8u.js} +53 -12
  36. package/dist/npm/chunks/{dialog-GO04oC3D.js → dialog-DvdIkCW0.js} +1 -1
  37. package/dist/npm/chunks/{dpop-U48QIQd7.js → dpop-CwW9ifkq.js} +1 -1
  38. package/dist/npm/chunks/entrance-Bn_5M9uO.js +90 -0
  39. package/dist/npm/chunks/{es-Dxk79lS9.js → es-BQviao4d.js} +53 -12
  40. package/dist/npm/chunks/{extension-E81hWyiT.js → extension-CnQTDC1j.js} +2 -2
  41. package/dist/npm/chunks/{extension-CKFpPWmi.js → extension-DXhz81XD.js} +1 -1
  42. package/dist/npm/chunks/{files-DyD5BZgp.js → files-DLEr_wmh.js} +2 -2
  43. package/dist/npm/chunks/{fr-8BebGKYD.js → fr-C5gu6A06.js} +53 -12
  44. package/dist/npm/chunks/{hi-BIN6Yy_p.js → hi-DXfQ5EvY.js} +53 -12
  45. package/dist/npm/chunks/{i18n-DOBt8e9U.js → i18n-Mgs9VOuk.js} +63 -58
  46. package/dist/npm/chunks/icons-_C6ZWmBY.js +141 -0
  47. package/dist/npm/chunks/{identify-CN-3xzqL.js → identify-BnQGJOa0.js} +4 -4
  48. package/dist/npm/chunks/{it-Cr6EwpPQ.js → it-BPHt13FV.js} +53 -12
  49. package/dist/npm/chunks/{ja-Iy3s5aur.js → ja-BkCqyKR0.js} +52 -11
  50. package/dist/npm/chunks/late-words-D4Oo_yhJ.js +57 -0
  51. package/dist/npm/chunks/{live-CelVeZfP.js → live-DXcxj_Af.js} +28 -22
  52. package/dist/npm/chunks/{nl-B84WHqqe.js → nl-DZxdLLMU.js} +53 -12
  53. package/dist/npm/chunks/{page-key-DepmJzC1.js → page-key-UqAozdZi.js} +1 -1
  54. package/dist/npm/chunks/{pick-yTyqtxN0.js → pick-C20RVUas.js} +1 -1
  55. package/dist/npm/chunks/{pkce-ChKGSW_4.js → pkce-BPvWoBrr.js} +1 -1
  56. package/dist/npm/chunks/{pt-BR-DOkdlfoe.js → pt-BR-lA9mJ05F.js} +53 -12
  57. package/dist/npm/chunks/{report-CrIqQZDI.js → report-BjUgUNnT.js} +1 -1
  58. package/dist/npm/chunks/show-BinoJyED.js +97 -0
  59. package/dist/npm/chunks/signin-C2jjsxz9.js +101 -0
  60. package/dist/npm/chunks/{source-pXVve2Cx.js → source-NuflODx3.js} +1 -1
  61. package/dist/npm/chunks/src-9o2Ocq8d.js +221 -0
  62. package/dist/npm/chunks/start-Cbx6rMrr.js +1904 -0
  63. package/dist/npm/chunks/states-DLMCvwes.js +3 -0
  64. package/dist/npm/chunks/{upload-MgPYqPyE.js → upload-C4NpM-jE.js} +1 -1
  65. package/dist/npm/chunks/uploads-CY4bDbaI.js +1236 -0
  66. package/dist/npm/chunks/{wrap-Bl0gbnFa.js → wrap-D-xTKIzj.js} +20 -20
  67. package/dist/npm/chunks/{zh-CN-Z5fQCb7G.js → zh-CN-yqaDHwBx.js} +53 -12
  68. package/dist/npm/element.js +7 -1
  69. package/dist/npm/headless.js +2 -2
  70. package/dist/npm/index.js +2 -2
  71. package/dist/npm/react.js +1 -1
  72. package/dist/npm/svelte.js +1 -1
  73. package/dist/npm/types/adapters/vue.d.ts +12 -0
  74. package/dist/npm/types/core/auth.d.ts +1 -0
  75. package/dist/npm/types/core/client.d.ts +5 -1
  76. package/dist/npm/types/core/types.d.ts +19 -4
  77. package/dist/npm/vue.js +5 -1
  78. package/package.json +4 -1
  79. package/dist/npm/chunks/Checklist-CnlfeSbc.js +0 -282
  80. package/dist/npm/chunks/Composer-B1bBVszY.js +0 -725
  81. package/dist/npm/chunks/Panel-F37vIL1K.js +0 -1206
  82. package/dist/npm/chunks/TaskFields-fmy6_HtK.js +0 -289
  83. package/dist/npm/chunks/ThreadCard-D51slKST.js +0 -1113
  84. package/dist/npm/chunks/Viewer-BOBadqmC.js +0 -111
  85. package/dist/npm/chunks/card-bits-CAnzrqx3.js +0 -53
  86. package/dist/npm/chunks/late-words-B2bmZceJ.js +0 -12
  87. package/dist/npm/chunks/show-BgVC8gWY.js +0 -97
  88. package/dist/npm/chunks/signin-Dd1rb2BP.js +0 -75
  89. package/dist/npm/chunks/src-BTMy4Gyc.js +0 -208
  90. package/dist/npm/chunks/start-DtVlpt7p.js +0 -1878
  91. package/dist/npm/chunks/states-sfTbjZz8.js +0 -3
  92. package/dist/npm/chunks/uploads-D49mywwz.js +0 -1146
@@ -1,4 +1,4 @@
1
- import { I as e, L as t, P as n, z as r } from "./start-DtVlpt7p.js";
1
+ import { B as e, H as t, L as n, z as r } from "./start-Cbx6rMrr.js";
2
2
  // src/capture/wrap.ts
3
3
  var i = 20, a = 200;
4
4
  function o(e) {
@@ -16,49 +16,49 @@ function o(e) {
16
16
  return "[unreadable]";
17
17
  }
18
18
  }
19
- function s(t, i) {
19
+ function s(e, i) {
20
20
  try {
21
- e(n, {
22
- level: t,
23
- message: r(i()),
21
+ r(n, {
22
+ level: e,
23
+ message: t(i()),
24
24
  at: (/* @__PURE__ */ new Date()).toISOString()
25
25
  });
26
26
  } catch {}
27
27
  }
28
- function c(e) {
28
+ function c(t) {
29
29
  let n = [], r = !0, a = (e, t, r) => {
30
30
  let i = e[t], a = r(i);
31
31
  e[t] = a, n.push(() => {
32
32
  e[t] === a && (e[t] = i);
33
33
  });
34
34
  };
35
- if (e.console) {
35
+ if (t.console) {
36
36
  for (let e of ["error", "warn"]) a(console, e, (t) => (...n) => {
37
37
  r && s(e, () => n.slice(0, i).map(o).join(" ")), t.apply(console, n);
38
38
  });
39
39
  let e = (e) => s("error", () => e.message || o(e.error)), t = (e) => s("error", () => `Unhandled promise rejection: ${o(e.reason)}`);
40
40
  addEventListener("error", e), addEventListener("unhandledrejection", t), n.push(() => removeEventListener("error", e), () => removeEventListener("unhandledrejection", t));
41
41
  }
42
- if (e.network && typeof fetch == "function" && a(window, "fetch", (e) => async (...n) => {
43
- if (!r) return e(...n);
42
+ if (t.network && typeof fetch == "function" && a(window, "fetch", (t) => async (...n) => {
43
+ if (!r) return t(...n);
44
44
  let i = performance.now(), a = (n[1]?.method ?? (n[0] instanceof Request ? n[0].method : "GET")).toUpperCase(), o = n[0] instanceof Request ? n[0].url : String(n[0]);
45
45
  try {
46
- let r = await e(...n);
47
- return r.status >= 400 && t(a, o, r.status, i), r;
48
- } catch (e) {
49
- throw t(a, o, 0, i), e;
46
+ let r = await t(...n);
47
+ return r.status >= 400 && e(a, o, r.status, i), r;
48
+ } catch (t) {
49
+ throw e(a, o, 0, i), t;
50
50
  }
51
- }), e.network && typeof XMLHttpRequest == "function") {
52
- let e = /* @__PURE__ */ new WeakMap();
53
- a(XMLHttpRequest.prototype, "open", (t) => function(n, i, ...a) {
54
- return r && e.set(this, {
51
+ }), t.network && typeof XMLHttpRequest == "function") {
52
+ let t = /* @__PURE__ */ new WeakMap();
53
+ a(XMLHttpRequest.prototype, "open", (e) => function(n, i, ...a) {
54
+ return r && t.set(this, {
55
55
  method: String(n).toUpperCase(),
56
56
  url: String(i)
57
- }), t.call(this, n, i, ...a);
57
+ }), e.call(this, n, i, ...a);
58
58
  }), a(XMLHttpRequest.prototype, "send", (n) => function(i) {
59
- let a = e.get(this), o = performance.now();
59
+ let a = t.get(this), o = performance.now();
60
60
  return a && this.addEventListener("loadend", () => {
61
- r && (this.status >= 400 || this.status === 0) && t(a.method, a.url, this.status, o);
61
+ r && (this.status >= 400 || this.status === 0) && e(a.method, a.url, this.status, o);
62
62
  }, { once: !0 }), n.call(this, i);
63
63
  });
64
64
  }
@@ -14,7 +14,7 @@ var e = {
14
14
  modeBarTouch: "轻点任意位置评论 · 照常滚动 · 先选中文字可引用",
15
15
  commentOnPage: "评论整个页面",
16
16
  commentFocused: "评论选中的部分",
17
- attach: "附加文件",
17
+ attach: "添加附件",
18
18
  screenshot: "截图",
19
19
  screenshotIncluded: "会自动附上你当前看到的画面截图。",
20
20
  screenshotRemove: "移除截图",
@@ -36,8 +36,6 @@ var e = {
36
36
  capturing: "正在截图…",
37
37
  capturingFailed: "无法截取此页面,但你的评论仍会标记位置。",
38
38
  uploadFailed: "文件没能附加。你仍然可以发送评论。",
39
- signInToSend: "最后一步:告诉我们你是谁",
40
- signInExplain: "我们会打开一个小窗口,请你确认邮箱。在这台设备上只需要做一次。",
41
39
  signIn: "继续",
42
40
  signInMember: "登录",
43
41
  signOut: "退出登录",
@@ -67,9 +65,6 @@ var e = {
67
65
  resolve: "解决",
68
66
  resolveHint: "标记为已修复",
69
67
  reopen: "重新打开",
70
- markInProgress: "开始处理",
71
- markInReview: "请求确认",
72
- closeThread: "不修复,直接关闭",
73
68
  reviewAsk: "团队认为已经修好了。你看可以吗?",
74
69
  looksGood: "可以了 — 解决",
75
70
  notYet: "还不行 — 回复",
@@ -110,7 +105,6 @@ var e = {
110
105
  readOnlyReply: "你可以查看这段对话,但目前无法回复。",
111
106
  noReplyAccess: "你可以查看这段对话,但没有回复权限。",
112
107
  notOnPage: "当前页面上找不到",
113
- more: "更多",
114
108
  allStatuses: "全部",
115
109
  markAllRead: "全部标为已读",
116
110
  messageCount: "{n} 条消息",
@@ -189,6 +183,8 @@ var e = {
189
183
  finishBody: "你打开了验证码邮件中的链接。点击按钮,即可发布你在这个网站上写的评论。",
190
184
  finishSend: "发送我的评论",
191
185
  finishExpired: "这个链接已失效。验证码邮件中的链接只能使用一次,有效期 10 分钟。如果你的评论仍在等待,请在你写评论的页面输入验证码。",
186
+ closeCardHint: "按 × 关闭,或在外部双击。",
187
+ closeCardHintTouch: "点按 × 关闭,或在外部连点两下。",
192
188
  verifyWrong: "验证码不正确。请检查邮件,或重新发送验证码。",
193
189
  verifyDifferent: "使用其他邮箱",
194
190
  verifyExpired: "此验证码已无法使用。你的评论仍保存在这台设备上。",
@@ -231,7 +227,6 @@ var e = {
231
227
  sentWithoutFiles: "已发送,但有些文件没能附加。你可以在回复中再附加。",
232
228
  replyFailed: "你的回复还没有发送。内容仍在这里,可以再试一次。",
233
229
  taskDetails: "任务详情",
234
- taskDetailsSet: "已添加任务详情",
235
230
  priority: "优先级",
236
231
  priority_none: "无优先级",
237
232
  priority_low: "低",
@@ -239,7 +234,6 @@ var e = {
239
234
  priority_high: "高",
240
235
  priority_urgent: "紧急",
241
236
  dueDate: "截止日期",
242
- dueOn: "截止 {date}",
243
237
  labels: "标签",
244
238
  noLabels: "无标签",
245
239
  mentionList: "可以提及的人",
@@ -257,7 +251,7 @@ var e = {
257
251
  detailPage: "页面",
258
252
  detailBrowser: "浏览器",
259
253
  detailWindow: "窗口",
260
- details: "信息",
254
+ details: "详细信息",
261
255
  quotedText: "选中的文字",
262
256
  replyTo: "回复 {name}",
263
257
  quoteReply: "引用回复",
@@ -291,7 +285,6 @@ var e = {
291
285
  sortPriority: "优先级最高",
292
286
  pinMoved: "{ref} 已移到这里。",
293
287
  pinMovable: "标记,拖动可移动",
294
- assign: "指派",
295
288
  modeBarNoText: "点击任意位置评论 · 拖动可框选区域 · 按 Esc 退出",
296
289
  modeBarTouchNoText: "轻点任意位置评论 · 照常滚动",
297
290
  verifyResendIn: "{n} 秒后可获取新验证码",
@@ -403,6 +396,54 @@ var e = {
403
396
  signOffNewCommit: "批准之后此页面已有改动。",
404
397
  signOffOpen: "此页面还有 {n} 条评论未解决。你仍然可以批准。",
405
398
  signOffOpen_one: "此页面还有 {n} 条评论未解决。你仍然可以批准。",
406
- signOffWithdraw: "撤回批准"
399
+ signOffWithdraw: "撤回批准",
400
+ moreFeedback: "更多反馈选项",
401
+ messagesRegion: "CommentKit 消息",
402
+ dismissMessage: "关闭消息",
403
+ moreThread: "此评论的更多操作",
404
+ closeCard: "关闭评论",
405
+ closeInbox: "关闭收件箱",
406
+ closeSettings: "关闭设置",
407
+ closeShortcuts: "关闭键盘快捷键",
408
+ closeVerify: "关闭验证码输入",
409
+ closeImage: "关闭图片",
410
+ shownAnnounce: "CommentKit 已开启。按 C 发表评论。",
411
+ shownAnnounceNoKeys: "CommentKit 已开启。",
412
+ addReaction: "添加表情回应",
413
+ fieldChange: "{field}:{value},更改",
414
+ assignee: "负责人",
415
+ dueToday: "今天",
416
+ tomorrow: "明天",
417
+ dueYesterday: "昨天",
418
+ statusHelp_open: "新建,尚未开始。",
419
+ statusHelp_in_progress: "有人正在处理。",
420
+ statusHelp_in_review: "团队已完成,等待提出者确认。",
421
+ statusHelp_resolved: "已修复并确认。",
422
+ statusHelp_closed: "不会处理。",
423
+ findTeammate: "查找团队成员",
424
+ peopleNone: "团队中没有匹配的人。",
425
+ peopleMore: "显示 {n} 人中的 {shown} 人。输入以缩小范围。",
426
+ peopleLoading: "正在加载团队…",
427
+ unassignAll: "取消所有分配",
428
+ teamMembers: "团队成员",
429
+ today: "今天",
430
+ nextWeek: "下周",
431
+ clear: "清除",
432
+ previousMonth: "上个月",
433
+ nextMonth: "下个月",
434
+ screenshotLabel: "当前视图的截图",
435
+ markupShort: "在上面绘制",
436
+ screenshotRemoveShort: "移除",
437
+ signingIn: "正在登录…",
438
+ signInWaiting: "请在打开的窗口中完成登录。你的评论已保存。",
439
+ signInCancel: "取消登录",
440
+ signedInPressSend: "你已登录。按“发送”发布你的评论。",
441
+ stillSending: "仍在发送…",
442
+ signInToComment: "登录后评论",
443
+ signInToCommentBody: "{website} 上的评论仅供其团队和受邀客户使用。请用你的 CommentKit 账户登录,然后点击需要修改的位置。",
444
+ signInToCommentBodyTouch: "{website} 上的评论仅供其团队和受邀客户使用。请用你的 CommentKit 账户登录,然后轻点需要修改的位置。",
445
+ signInToSend: "登录后发送",
446
+ signInToSendTitle: "登录后发送此评论",
447
+ signInToSendBody: "此网站上的评论来自其团队和受邀客户。登录期间,你的文字会保留在这里。"
407
448
  };
408
449
  export { e as default };
@@ -1,4 +1,4 @@
1
- import { t as e } from "./chunks/src-BTMy4Gyc.js";
1
+ import { t as e } from "./chunks/src-9o2Ocq8d.js";
2
2
  // src/element.ts
3
3
  var t, n = [
4
4
  "screenshots",
@@ -15,6 +15,8 @@ var t, n = [
15
15
  "locale",
16
16
  "theme",
17
17
  "position",
18
+ "inset-x",
19
+ "inset-y",
18
20
  "auth",
19
21
  "deployment-url",
20
22
  "hide-on-production",
@@ -49,6 +51,10 @@ var t, n = [
49
51
  locale: this.getAttribute("locale") ?? void 0,
50
52
  theme: this.getAttribute("theme") ?? void 0,
51
53
  position: this.getAttribute("position") ?? void 0,
54
+ inset: this.hasAttribute("inset-x") || this.hasAttribute("inset-y") ? {
55
+ x: Number(this.getAttribute("inset-x") ?? NaN),
56
+ y: Number(this.getAttribute("inset-y") ?? NaN)
57
+ } : void 0,
52
58
  auth: this.getAttribute("auth") ?? void 0,
53
59
  deploymentUrl: this.getAttribute("deployment-url"),
54
60
  hideOnProduction: this.getAttribute("hide-on-production") !== "false",
@@ -1,7 +1,7 @@
1
- import { h as e, i as t, l as n, m as r, o as i, r as a, t as o, v as s } from "./chunks/client-kNAo2TTG.js";
1
+ import { h as e, i as t, l as n, m as r, o as i, r as a, t as o, v as s } from "./chunks/client-Cv8ddtuM.js";
2
2
  import { i as c } from "./chunks/privacy-BWUGlHw5.js";
3
3
  import { c as l, s as u, t as d } from "./chunks/anchor-BsQNVkHj.js";
4
4
  import { n as f } from "./chunks/context-BuMl7A07.js";
5
- import { n as p, t as m } from "./chunks/page-key-DepmJzC1.js";
5
+ import { n as p, t as m } from "./chunks/page-key-UqAozdZi.js";
6
6
  f(), n(p);
7
7
  export { e as ApiClient, r as AuthManager, o as CommentKitClient, s as CommentKitError, a as EDIT_CONFLICT, t as SDK_VERSION, c as configurePrivacy, d as createAnchor, i as currentPageUrl, m as pageKey, u as resolveAnchor, l as stableSelector };
package/dist/npm/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { t as e } from "./chunks/src-BTMy4Gyc.js";
2
- import { i as t, v as n } from "./chunks/client-kNAo2TTG.js";
1
+ import { t as e } from "./chunks/src-9o2Ocq8d.js";
2
+ import { i as t, v as n } from "./chunks/client-Cv8ddtuM.js";
3
3
  export { n as CommentKitError, t as SDK_VERSION, e as init };
package/dist/npm/react.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t as e } from "./chunks/src-BTMy4Gyc.js";
2
+ import { t as e } from "./chunks/src-9o2Ocq8d.js";
3
3
  import { useEffect as t, useRef as n } from "react";
4
4
  // src/adapters/react.tsx
5
5
  function r(r) {
@@ -1,4 +1,4 @@
1
- import { t as e } from "./chunks/src-BTMy4Gyc.js";
1
+ import { t as e } from "./chunks/src-9o2Ocq8d.js";
2
2
  // src/adapters/svelte.ts
3
3
  var t = (e) => JSON.stringify([
4
4
  e?.project,
@@ -38,6 +38,10 @@ export declare const CommentKit: import("vue").DefineComponent<import("vue").Ext
38
38
  type: PropType<CommentKitOptions["position"]>;
39
39
  default: undefined;
40
40
  };
41
+ inset: {
42
+ type: PropType<CommentKitOptions["inset"]>;
43
+ default: undefined;
44
+ };
41
45
  redact: {
42
46
  type: PropType<string[]>;
43
47
  default: undefined;
@@ -103,6 +107,10 @@ export declare const CommentKit: import("vue").DefineComponent<import("vue").Ext
103
107
  type: PropType<CommentKitOptions["position"]>;
104
108
  default: undefined;
105
109
  };
110
+ inset: {
111
+ type: PropType<CommentKitOptions["inset"]>;
112
+ default: undefined;
113
+ };
106
114
  redact: {
107
115
  type: PropType<string[]>;
108
116
  default: undefined;
@@ -143,6 +151,10 @@ export declare const CommentKit: import("vue").DefineComponent<import("vue").Ext
143
151
  hideOnProduction: boolean;
144
152
  theme: "auto" | "dark" | "light" | undefined;
145
153
  position: import("../index.js").Position | undefined;
154
+ inset: {
155
+ x?: number;
156
+ y?: number;
157
+ } | undefined;
146
158
  redact: string[];
147
159
  privacy: "standard" | "strict" | undefined;
148
160
  locale: string;
@@ -73,6 +73,7 @@ export declare class AuthManager {
73
73
  signIn(options?: {
74
74
  share?: string | null;
75
75
  mode?: AuthMode;
76
+ signal?: AbortSignal;
76
77
  }): Promise<SignInResult>;
77
78
  /** Trade a one-time code (from the popup, a redirect or the browser extension) for a session. */
78
79
  exchange(code: string, verifier: string): Promise<boolean>;
@@ -84,6 +84,8 @@ export declare class CommentKitClient {
84
84
  private readonly offSession;
85
85
  /** The CommentKit server this client talks to (no trailing slash). */
86
86
  readonly endpoint: string;
87
+ /** Shown by Cmd/Ctrl+Shift+K (index.ts): the widget's entrance leads the eye to it (ui/entrance.ts). Read once by the UI. */
88
+ entrance?: "key";
87
89
  private configTag;
88
90
  /** Last known ETag per thread and per message, sent as If-Match with edits. */
89
91
  private tags;
@@ -117,7 +119,7 @@ export declare class CommentKitClient {
117
119
  loadConfig(): Promise<WidgetConfig>;
118
120
  loadSession(): Promise<Session | null>;
119
121
  /** Never rejects: anything that goes wrong (the window, the code exchange, reading the session) is "failed". */
120
- signIn(share?: string | null): Promise<SignInResult>;
122
+ signIn(share?: string | null, signal?: AbortSignal): Promise<SignInResult>;
121
123
  signOut(): Promise<void>;
122
124
  /**
123
125
  * The page's open threads: follows `next_cursor` up to MAX_PAGE_THREADS (`moreThreads` says when there
@@ -162,6 +164,8 @@ export declare class CommentKitClient {
162
164
  styleChanges?: StyleChange[];
163
165
  /** The same key for every attempt at this one comment, so a lost response never creates it twice. */
164
166
  idempotencyKey?: string;
167
+ /** Stops waiting (and retrying): the comment arrived another way, by a live update. */
168
+ signal?: AbortSignal;
165
169
  }): Promise<Thread>;
166
170
  /**
167
171
  * Reviewers may only resolve or reopen; priority, assignee, due date and labels are for members who can triage.
@@ -373,6 +373,17 @@ export interface CommentKitOptions {
373
373
  theme?: "auto" | "light" | "dark";
374
374
  /** Where the launcher sits. Defaults to the dashboard setting. */
375
375
  position?: Position;
376
+ /**
377
+ * Extra room, in CSS pixels (0 or more), between the toolbar and the edges it docks to, for a page's own fixed
378
+ * bars and buttons: `x` from the left or right edge (not used in the two centre spots), `y` from the top or
379
+ * bottom edge. The welcome note, the toolbar's menu, the inbox's gap and (docked at the bottom) the toasts move
380
+ * with it. The page can change it at any time without calling CommentKit, with the CSS custom properties
381
+ * `--commentkit-inset-x` and `--commentkit-inset-y` (lengths) on `:root`; those win over this option.
382
+ */
383
+ inset?: {
384
+ x?: number;
385
+ y?: number;
386
+ };
376
387
  /** CSS selectors whose content is never captured in screenshots, nor in the text a comment keeps to find its spot. */
377
388
  redact?: string[];
378
389
  /**
@@ -390,7 +401,9 @@ export interface CommentKitOptions {
390
401
  locale?: string;
391
402
  /**
392
403
  * How sign-in opens: "auto" (default) uses a popup on desktop and a full-page
393
- * redirect inside in-app browsers or when popups are blocked.
404
+ * redirect inside in-app browsers, when popups are blocked, and on pages sent with
405
+ * `Cross-Origin-Opener-Policy: same-origin` (which cuts a popup off from the page).
406
+ * "popup" cannot work on such a page: the widget says so once in the console.
394
407
  */
395
408
  auth?: "auto" | "popup" | "redirect";
396
409
  /**
@@ -402,7 +415,9 @@ export interface CommentKitOptions {
402
415
  /**
403
416
  * Cmd/Ctrl+Shift+K shows the widget, and while it is shown opens the inbox. Default true. Set false
404
417
  * when your site uses that combination itself; show the widget with `show()` or `comment()` instead.
405
- * While the widget is hidden the key also reaches your page's own handlers.
418
+ * When the key shows the widget or opens the inbox, your page's own handlers do not get it (so a Cmd/Ctrl+K
419
+ * search that ignores Shift does not open as well); a listener on `window`'s capture phase added before
420
+ * CommentKit still does.
406
421
  */
407
422
  toggleShortcut?: boolean;
408
423
  /**
@@ -420,8 +435,8 @@ export interface CommentKitOptions {
420
435
  checklist?: boolean;
421
436
  };
422
437
  /**
423
- * Sign the reviewer in from your website's own login ("Sign in from your website" in CommentKit, under
424
- * Settings, For developers). Your **server** signs a short-lived token (HS256 JWT, at most 10 minutes) for
438
+ * Sign the reviewer in from your website's own login ("Sign in from your website" in CommentKit, in
439
+ * the website's Settings → For developers). Your **server** signs a short-lived token (HS256 JWT, at most 10 minutes) for
425
440
  * the user who is signed in to your site, with the website's identity secret; the page passes it here.
426
441
  * Give a function to fetch a fresh token: it is called again whenever the CommentKit session ends.
427
442
  * Never put the identity secret in the page. The token is never stored, logged or put in a URL.
package/dist/npm/vue.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as e } from "./chunks/src-BTMy4Gyc.js";
1
+ import { t as e } from "./chunks/src-9o2Ocq8d.js";
2
2
  import { defineComponent as t, onBeforeUnmount as n, onMounted as r, watch as i } from "vue";
3
3
  // src/adapters/vue.ts
4
4
  function a(e) {
@@ -43,6 +43,10 @@ var o = t({
43
43
  type: String,
44
44
  default: void 0
45
45
  },
46
+ inset: {
47
+ type: Object,
48
+ default: void 0
49
+ },
46
50
  redact: {
47
51
  type: Array,
48
52
  default: void 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commentkit/comment-kit",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Figma-style comments for any website. Clients pin feedback with an automatic screenshot; developers see it on localhost and hand it to their AI agent.",
5
5
  "keywords": [
6
6
  "comments",
@@ -129,6 +129,7 @@
129
129
  "test:host-matrix": "node scripts/host-matrix.mjs",
130
130
  "test:wordpress": "node scripts/wordpress-check.mjs",
131
131
  "test:wordpress:real": "node e2e/wordpress-real/run.mjs",
132
+ "secret-scan": "node --test scripts/test/*.test.mjs && node scripts/secret-scan.mjs",
132
133
  "typecheck": "tsc -p tsconfig.json && tsc -p tsconfig.node.json",
133
134
  "typecheck:e2e": "tsc -p tsconfig.e2e.json",
134
135
  "check": "npm run typecheck && npm run test && npm run build",
@@ -155,6 +156,8 @@
155
156
  "astro": "7.4.4",
156
157
  "html2canvas-pro": "2.6.0",
157
158
  "jsdom": "30.1.3",
159
+ "laravel-vite-plugin": "3.2.0",
160
+ "lucide-static": "1.73.0",
158
161
  "magic-string": "1.4.5",
159
162
  "preact": "11.1.0",
160
163
  "pusher-js": "8.6.0",