@commentkit/comment-kit 1.6.0 → 2.0.1

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 (137) hide show
  1. package/CHANGELOG.md +298 -590
  2. package/README.md +421 -145
  3. package/SECURITY.md +47 -46
  4. package/dist/node/THIRD_PARTY_NOTICES.txt +56 -0
  5. package/dist/node/browser.js +17 -0
  6. package/dist/node/cli/api.js +226 -0
  7. package/dist/node/cli/bin.js +18 -0
  8. package/dist/node/cli/credentials.js +268 -0
  9. package/dist/node/cli/doctor.js +789 -0
  10. package/dist/node/cli/format.js +54 -0
  11. package/dist/node/cli/init.js +686 -0
  12. package/dist/node/cli/main.js +537 -0
  13. package/dist/node/cli/mcp.js +295 -0
  14. package/dist/node/cli/open.js +20 -0
  15. package/dist/node/plugins/astro-B5y1Gtbf.js +31 -0
  16. package/dist/node/plugins/astro.js +26 -0
  17. package/dist/node/plugins/git-BIXLbL3f.js +92 -0
  18. package/dist/node/plugins/jsx-Bg4BdSph.js +7958 -0
  19. package/dist/node/plugins/next.js +48 -0
  20. package/dist/node/plugins/options-THop1K92.js +71 -0
  21. package/dist/node/plugins/transform-CKiAuSbk.js +1155 -0
  22. package/dist/node/plugins/vite-BdAYUW10.js +74 -0
  23. package/dist/node/plugins/vite.js +1 -0
  24. package/dist/node/plugins/webpack-R2U2DLlY.js +35 -0
  25. package/dist/node/plugins/webpack-loader.cjs +21 -0
  26. package/dist/node/plugins/webpack-loader.js +18 -0
  27. package/dist/node/plugins/webpack.js +1 -0
  28. package/dist/node/shared/dashboard-places.js +33 -0
  29. package/dist/node/shared/endpoint.js +26 -0
  30. package/dist/node/shared/format.js +63 -0
  31. package/dist/node/types/astro.d.ts +11 -0
  32. package/dist/node/types/next.d.ts +34 -0
  33. package/dist/node/types/options.d.ts +59 -0
  34. package/dist/node/types/vite.d.ts +11 -0
  35. package/dist/node/types/webpack-loader.d.ts +22 -0
  36. package/dist/node/types/webpack.d.ts +27 -0
  37. package/dist/npm/THIRD_PARTY_NOTICES.txt +6 -6
  38. package/dist/npm/chunks/AgentSend-DOy3jhyF.js +68 -0
  39. package/dist/npm/chunks/Checklist-CW_SwMpS.js +282 -0
  40. package/dist/npm/chunks/Composer-Bveq5QrK.js +727 -0
  41. package/dist/npm/chunks/Guest-7hcN765o.js +270 -0
  42. package/dist/npm/chunks/MarkupEditor-6bJGpWGO.js +345 -0
  43. package/dist/npm/chunks/Panel-ChPUB68C.js +1211 -0
  44. package/dist/npm/chunks/Settings-CB5eEKnf.js +231 -0
  45. package/dist/npm/chunks/Shortcuts-eAyjJ89P.js +62 -0
  46. package/dist/npm/chunks/StyleEditor-CZTdAA5c.js +46 -0
  47. package/dist/npm/chunks/StylePanel-B4pHQUL9.js +199 -0
  48. package/dist/npm/chunks/TaskFields-C8BX0Sgg.js +289 -0
  49. package/dist/npm/chunks/ThreadCard-B1EsX3PR.js +1160 -0
  50. package/dist/npm/chunks/Viewer-DY6zb90M.js +114 -0
  51. package/dist/npm/chunks/{agent-BDMQtOzH.js → agent-MTQHr9ei.js} +9 -9
  52. package/dist/npm/chunks/{anchor-BsradQhn.js → anchor-BsQNVkHj.js} +108 -85
  53. package/dist/npm/chunks/{ar-8tPch6W4.js → ar-L5cQ-NPe.js} +71 -19
  54. package/dist/npm/chunks/card-bits-CTdrkYn8.js +53 -0
  55. package/dist/npm/chunks/{client-EFTWxHbJ.js → client-7eVxvg5j.js} +282 -290
  56. package/dist/npm/chunks/confetti-BIs5s14P.js +49 -0
  57. package/dist/npm/chunks/context-BuMl7A07.js +48 -0
  58. package/dist/npm/chunks/context-Cf6khm7A.js +20 -0
  59. package/dist/npm/chunks/{de-C63897uD.js → de-D0C-v6tP.js} +62 -18
  60. package/dist/npm/chunks/dialog-DvdIkCW0.js +3 -0
  61. package/dist/npm/chunks/dpop-0A76OPa9.js +96 -0
  62. package/dist/npm/chunks/drafts-B0ctr1g9.js +21 -0
  63. package/dist/npm/chunks/{es-CI2bSpvB.js → es-Bw4Dj9tN.js} +62 -18
  64. package/dist/npm/chunks/extension-DFVOvciD.js +62 -0
  65. package/dist/npm/chunks/{extension-BST6LH1q.js → extension-SmoH5AA4.js} +20 -12
  66. package/dist/npm/chunks/files-4lV9YQIX.js +114 -0
  67. package/dist/npm/chunks/{fr-rsVe-Lqk.js → fr-TkuQaIAa.js} +120 -76
  68. package/dist/npm/chunks/{hi-cvwbSaWP.js → hi-DXSH2U8d.js} +63 -19
  69. package/dist/npm/chunks/{i18n-C4v0M-6z.js → i18n-aVSu9TcJ.js} +136 -92
  70. package/dist/npm/chunks/identify-BGYh2dVo.js +106 -0
  71. package/dist/npm/chunks/{it-C8tnV0BF.js → it-CiWA_bch.js} +81 -37
  72. package/dist/npm/chunks/{ja-BWxDfC2f.js → ja-C-QmR3yz.js} +60 -16
  73. package/dist/npm/chunks/late-words-80_VWt8S.js +14 -0
  74. package/dist/npm/chunks/live-BExWHzQ7.js +85 -0
  75. package/dist/npm/chunks/locale-D8Q4Q2Nt.js +26 -0
  76. package/dist/npm/chunks/{nl-DNQ6eCht.js → nl-CEmZRqjX.js} +63 -19
  77. package/dist/npm/chunks/page-key-HSY3Lze5.js +62 -0
  78. package/dist/npm/chunks/{pick-CLyOdjnD.js → pick-B3sR7jtS.js} +45 -44
  79. package/dist/npm/chunks/pkce-CfZhiNBi.js +8 -0
  80. package/dist/npm/chunks/placement-BF_HOUDD.js +74 -0
  81. package/dist/npm/chunks/privacy-BWUGlHw5.js +57 -0
  82. package/dist/npm/chunks/{pt-BR-CkG7vpU2.js → pt-BR-b-a8sxO8.js} +62 -18
  83. package/dist/npm/chunks/{realtime-DIo-Wth4.js → realtime-C79zF50C.js} +14 -12
  84. package/dist/npm/chunks/report-DaVuoRYS.js +44 -0
  85. package/dist/npm/chunks/show-BoN8AC-F.js +97 -0
  86. package/dist/npm/chunks/signin-BOWr_WCo.js +75 -0
  87. package/dist/npm/chunks/{source-CS7C6wJA.js → source-mk3rGBBQ.js} +1 -1
  88. package/dist/npm/chunks/src-C8rZFyL_.js +215 -0
  89. package/dist/npm/chunks/start-CV4j78_q.js +1894 -0
  90. package/dist/npm/chunks/states-b9Bv3Ci7.js +3 -0
  91. package/dist/npm/chunks/upload-B2mkgMeJ.js +42 -0
  92. package/dist/npm/chunks/uploads-8AxyRq7g.js +1147 -0
  93. package/dist/npm/chunks/wrap-DW6EFbVQ.js +69 -0
  94. package/dist/npm/chunks/{zh-CN-BKuZOLBE.js → zh-CN-JTscW8u8.js} +61 -17
  95. package/dist/npm/element.js +58 -21
  96. package/dist/npm/headless.js +7 -3
  97. package/dist/npm/index.js +3 -3
  98. package/dist/npm/react.js +18 -11
  99. package/dist/npm/svelte.js +28 -12
  100. package/dist/npm/types/adapters/react.d.ts +4 -1
  101. package/dist/npm/types/adapters/svelte.d.ts +4 -1
  102. package/dist/npm/types/adapters/vue.d.ts +35 -2
  103. package/dist/npm/types/anchor/index.d.ts +19 -0
  104. package/dist/npm/types/capture/privacy.d.ts +14 -0
  105. package/dist/npm/types/core/api.d.ts +20 -1
  106. package/dist/npm/types/core/auth.d.ts +40 -21
  107. package/dist/npm/types/core/client.d.ts +60 -4
  108. package/dist/npm/types/core/page-key.d.ts +42 -0
  109. package/dist/npm/types/core/types.d.ts +87 -4
  110. package/dist/npm/types/element.d.ts +17 -7
  111. package/dist/npm/types/headless.d.ts +2 -1
  112. package/dist/npm/types/index.d.ts +16 -6
  113. package/dist/npm/vue.js +44 -9
  114. package/package.json +90 -14
  115. package/dist/npm/chunks/AgentSend-2JPDseOo.js +0 -63
  116. package/dist/npm/chunks/Checklist-BpDXQebo.js +0 -257
  117. package/dist/npm/chunks/Composer-CAyj-c8e.js +0 -677
  118. package/dist/npm/chunks/Guest-ZdFmTcXI.js +0 -187
  119. package/dist/npm/chunks/MarkupEditor-BFplZwFy.js +0 -332
  120. package/dist/npm/chunks/Panel-BhZ4XRDR.js +0 -861
  121. package/dist/npm/chunks/Settings-SPG9EHUZ.js +0 -204
  122. package/dist/npm/chunks/Shortcuts-C28HVDw6.js +0 -58
  123. package/dist/npm/chunks/StyleEditor-ByZMtq10.js +0 -43
  124. package/dist/npm/chunks/StylePanel-Iwhce2tE.js +0 -197
  125. package/dist/npm/chunks/TaskFields-BsP_fVJg.js +0 -273
  126. package/dist/npm/chunks/ThreadCard-BzVZdDCb.js +0 -1030
  127. package/dist/npm/chunks/Viewer-CqtGrdD8.js +0 -108
  128. package/dist/npm/chunks/card-bits-Bna-g3Py.js +0 -124
  129. package/dist/npm/chunks/confetti-DTKpwF3O.js +0 -40
  130. package/dist/npm/chunks/drafts-akdBsOd0.js +0 -50
  131. package/dist/npm/chunks/extension-D-V3utTm.js +0 -53
  132. package/dist/npm/chunks/live-BCpJVBeN.js +0 -33
  133. package/dist/npm/chunks/report-BBrT3r89.js +0 -27
  134. package/dist/npm/chunks/src-C4FsVoUp.js +0 -148
  135. package/dist/npm/chunks/start-i9M-r3aH.js +0 -1800
  136. package/dist/npm/chunks/upload-DSv7EyBD.js +0 -41
  137. package/dist/npm/chunks/uploads-I01kdqQF.js +0 -1103
@@ -0,0 +1,282 @@
1
+ import { _ as e, a as t, b as n, c as r, f as i, m as a, u as o } from "./i18n-aVSu9TcJ.js";
2
+ import { r as s } from "./context-Cf6khm7A.js";
3
+ import { C as c, k as l, s as u } from "./start-CV4j78_q.js";
4
+ // src/ui/art.tsx
5
+ u(".ck-art{margin:0 auto 12px;display:block;overflow:visible}.ck-art *{vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-linejoin:round}.ck-art-w,.ck-art-a,path.ck-art-m{stroke:var(--ck-text);stroke-width:2px}.ck-art-w{fill:var(--ck-bg)}.ck-art-a{fill:var(--ck-accent)}.ck-art-m{fill:var(--ck-bg-hover)}.ck-art-line{fill:none;stroke:var(--ck-text);stroke-width:2px}.ck-art-bold{stroke-width:4.5px}.ck-art-tick{fill:none;stroke:var(--ck-accent-ink);stroke-width:2.6px}.ck-art-dot{fill:var(--ck-border)}.ck-art-ink{fill:var(--ck-text)}.ck-art-spark{fill:none;stroke:var(--ck-accent);stroke-width:2.4px}.ck-art-ghost{fill:none;stroke:var(--ck-text-muted);stroke-width:2px;stroke-dasharray:5 5}.ck-art-shadow{fill:var(--ck-bg-hover)}");
6
+ var d = "M31.5 4.8C17.3 4.4 7 15.2 7 29c0 13 8.5 21.2 20.9 23 1.6.2 2.1 1.2 2.1 2.5v6.9c0 1.7 1.2 2.1 2.5.9 5.7-4.9 16-13.6 21.1-22.1 3.5-5.8 4.7-11.8 3.2-18.1C54.3 11.5 44.7 4.6 31.5 4.8Z", f = (e, t, n, r) => /* @__PURE__ */ o("path", {
7
+ class: r,
8
+ d,
9
+ transform: `translate(${e} ${t}) scale(${n})`
10
+ }), p = {
11
+ caughtUp: () => /* @__PURE__ */ o(n, { children: [
12
+ /* @__PURE__ */ o("path", {
13
+ class: "ck-art-w",
14
+ d: "M28 50l8-20h48l8 20v18H28z"
15
+ }),
16
+ /* @__PURE__ */ o("path", {
17
+ class: "ck-art-line",
18
+ d: "M28 50h19l4 6h18l4-6h19"
19
+ }),
20
+ f(44, 4, .5, "ck-art-a"),
21
+ /* @__PURE__ */ o("path", {
22
+ class: "ck-art-tick",
23
+ d: "M53 19l5 5 9-10"
24
+ })
25
+ ] }),
26
+ noFeedback: () => /* @__PURE__ */ o(n, { children: [
27
+ /* @__PURE__ */ o("rect", {
28
+ class: "ck-art-w",
29
+ x: "22",
30
+ y: "18",
31
+ width: "70",
32
+ height: "52",
33
+ rx: "7"
34
+ }),
35
+ /* @__PURE__ */ o("path", {
36
+ class: "ck-art-line",
37
+ d: "M22 29h70"
38
+ }),
39
+ /* @__PURE__ */ o("circle", {
40
+ class: "ck-art-dot",
41
+ cx: "29",
42
+ cy: "23.5",
43
+ r: "1.6"
44
+ }),
45
+ /* @__PURE__ */ o("circle", {
46
+ class: "ck-art-dot",
47
+ cx: "35",
48
+ cy: "23.5",
49
+ r: "1.6"
50
+ }),
51
+ /* @__PURE__ */ o("rect", {
52
+ class: "ck-art-m",
53
+ x: "30",
54
+ y: "37",
55
+ width: "34",
56
+ height: "5",
57
+ rx: "2.5"
58
+ }),
59
+ /* @__PURE__ */ o("rect", {
60
+ class: "ck-art-m",
61
+ x: "30",
62
+ y: "47",
63
+ width: "46",
64
+ height: "5",
65
+ rx: "2.5"
66
+ }),
67
+ /* @__PURE__ */ o("rect", {
68
+ class: "ck-art-m",
69
+ x: "30",
70
+ y: "57",
71
+ width: "26",
72
+ height: "5",
73
+ rx: "2.5"
74
+ }),
75
+ f(70, 6, .46, "ck-art-a"),
76
+ /* @__PURE__ */ o("path", {
77
+ class: "ck-art-tick",
78
+ d: "M84.5 14v9M80 18.5h9"
79
+ })
80
+ ] }),
81
+ noMatch: () => /* @__PURE__ */ o(n, { children: [
82
+ /* @__PURE__ */ o("rect", {
83
+ class: "ck-art-m",
84
+ x: "22",
85
+ y: "22",
86
+ width: "52",
87
+ height: "6",
88
+ rx: "3"
89
+ }),
90
+ /* @__PURE__ */ o("rect", {
91
+ class: "ck-art-m",
92
+ x: "22",
93
+ y: "36",
94
+ width: "40",
95
+ height: "6",
96
+ rx: "3"
97
+ }),
98
+ /* @__PURE__ */ o("rect", {
99
+ class: "ck-art-m",
100
+ x: "22",
101
+ y: "50",
102
+ width: "46",
103
+ height: "6",
104
+ rx: "3"
105
+ }),
106
+ /* @__PURE__ */ o("circle", {
107
+ class: "ck-art-w",
108
+ cx: "76",
109
+ cy: "42",
110
+ r: "15"
111
+ }),
112
+ /* @__PURE__ */ o("path", {
113
+ class: "ck-art-line ck-art-bold",
114
+ d: "M87 53l11 11"
115
+ }),
116
+ /* @__PURE__ */ o("path", {
117
+ class: "ck-art-line",
118
+ d: "M70 42h12"
119
+ })
120
+ ] }),
121
+ error: () => /* @__PURE__ */ o(n, { children: [
122
+ f(36, 6, .75, "ck-art-m"),
123
+ /* @__PURE__ */ o("path", {
124
+ class: "ck-art-line ck-art-bold",
125
+ d: "M60 18v14"
126
+ }),
127
+ /* @__PURE__ */ o("circle", {
128
+ class: "ck-art-ink",
129
+ cx: "60",
130
+ cy: "40",
131
+ r: "2.4"
132
+ }),
133
+ /* @__PURE__ */ o("path", {
134
+ class: "ck-art-spark",
135
+ d: "M24 22l6 4M22 36h7M96 22l-6 4M98 36h-7"
136
+ })
137
+ ] }),
138
+ gone: () => /* @__PURE__ */ o(n, { children: f(36, 6, .75, "ck-art-ghost") })
139
+ };
140
+ function m({ name: e }) {
141
+ return /* @__PURE__ */ o("svg", {
142
+ class: "ck-art",
143
+ viewBox: "0 0 120 80",
144
+ width: "120",
145
+ height: "80",
146
+ "aria-hidden": "true",
147
+ focusable: "false",
148
+ children: [/* @__PURE__ */ o("ellipse", {
149
+ class: "ck-art-shadow",
150
+ cx: "60",
151
+ cy: "74",
152
+ rx: "34",
153
+ ry: "3.5"
154
+ }), p[e]()]
155
+ });
156
+ }
157
+ // src/ui/Checklist.tsx
158
+ function h({ thread: t, editable: n, addable: u = !0, onChange: d }, f) {
159
+ let { client: p, reportError: m } = s(f), [h, g] = e(!1), [_, v] = e(""), [y, b] = e(!1), x = a(null), [S, C] = e(0);
160
+ i(() => {
161
+ S && x.current?.querySelector(".ck-checklist-add input, .ck-extra-add button")?.focus({ preventScroll: !0 });
162
+ }, [S]);
163
+ let w = t.checklist ?? [], T = w.filter((e) => e.done).length, E = a(t);
164
+ E.current = t;
165
+ let D = (e) => d(E.current = {
166
+ ...E.current,
167
+ checklist: e(E.current.checklist ?? [])
168
+ }), O = () => {
169
+ let e = _.trim();
170
+ e && !y && (b(!0), v(""), p.addChecklistItem(t.id, e).then((e) => D((t) => [...t, e]), (t) => {
171
+ v((t) => t ? `${e} ${t}` : e), m(t);
172
+ }).finally(() => b(!1)));
173
+ }, k = (e) => {
174
+ let t = {
175
+ ...e,
176
+ done: !e.done
177
+ }, n = (t) => D((n) => n.map((n) => n.id === e.id ? t : n));
178
+ n(t), p.updateChecklistItem(e.id, { done: t.done }).catch((t) => {
179
+ n(e), m(t);
180
+ });
181
+ }, A = (e) => {
182
+ let t = w.indexOf(e);
183
+ D((t) => t.filter((t) => t.id !== e.id)), C((e) => e + 1), p.deleteChecklistItem(e.id).catch((n) => {
184
+ D((n) => n.some((t) => t.id === e.id) ? n : [
185
+ ...n.slice(0, t),
186
+ e,
187
+ ...n.slice(t)
188
+ ]), m(n);
189
+ });
190
+ };
191
+ return !w.length && !(n && u) ? null : /* @__PURE__ */ o("div", {
192
+ class: "ck-extra",
193
+ ref: x,
194
+ children: [
195
+ w.length ? /* @__PURE__ */ o("div", {
196
+ class: "ck-checklist",
197
+ role: "group",
198
+ "aria-label": r("checklist"),
199
+ children: [/* @__PURE__ */ o("div", {
200
+ class: "ck-checklist-head",
201
+ children: [/* @__PURE__ */ o("span", {
202
+ class: "ck-muted",
203
+ children: r("checklistProgress", {
204
+ n: T,
205
+ total: w.length
206
+ })
207
+ }), /* @__PURE__ */ o("span", {
208
+ class: "ck-checklist-bar",
209
+ "aria-hidden": "true",
210
+ children: /* @__PURE__ */ o("span", { style: { scale: `${T / w.length} 1` } })
211
+ })]
212
+ }), /* @__PURE__ */ o("ul", { children: w.map((e) => /* @__PURE__ */ o("li", {
213
+ "data-done": e.done || void 0,
214
+ children: [/* @__PURE__ */ o("label", {
215
+ class: "ck-check",
216
+ children: [/* @__PURE__ */ o("input", {
217
+ type: "checkbox",
218
+ checked: e.done,
219
+ disabled: !n,
220
+ onChange: () => k(e)
221
+ }), /* @__PURE__ */ o("bdi", { children: e.body })]
222
+ }), n ? /* @__PURE__ */ o("button", {
223
+ class: "ck-ghost ck-ghost-sm",
224
+ "aria-label": r("removeItem", { item: e.body }),
225
+ onClick: () => A(e),
226
+ children: /* @__PURE__ */ o(c, {
227
+ name: "close",
228
+ size: 12
229
+ })
230
+ }) : null]
231
+ })) })]
232
+ }) : null,
233
+ n && (h || w.length) ? /* @__PURE__ */ o("div", {
234
+ class: "ck-checklist-add",
235
+ children: [/* @__PURE__ */ o("input", {
236
+ class: "ck-input",
237
+ maxLength: 300,
238
+ placeholder: r("checklistAdd"),
239
+ "aria-label": r("checklistAdd"),
240
+ value: _,
241
+ "aria-busy": y || void 0,
242
+ enterKeyHint: "done",
243
+ ref: h && !w.length ? l : void 0,
244
+ onInput: (e) => v(e.target.value),
245
+ onKeyDown: (e) => {
246
+ e.stopPropagation(), e.key === "Enter" ? (e.preventDefault(), O()) : e.key === "Escape" && !w.length && g(!1);
247
+ }
248
+ }), _.trim() ? /* @__PURE__ */ o("button", {
249
+ class: "ck-ghost",
250
+ "aria-label": r("checklistAdd"),
251
+ title: r("checklistAdd"),
252
+ "aria-disabled": y || void 0,
253
+ onClick: () => !y && O(),
254
+ children: /* @__PURE__ */ o("svg", {
255
+ width: "16",
256
+ height: "16",
257
+ viewBox: "0 0 24 24",
258
+ fill: "none",
259
+ stroke: "currentColor",
260
+ "stroke-width": "2",
261
+ "stroke-linecap": "round",
262
+ "aria-hidden": "true",
263
+ children: /* @__PURE__ */ o("path", { d: "M12 5v14M5 12h14" })
264
+ })
265
+ }) : null]
266
+ }) : null,
267
+ n && u && !w.length && !h ? /* @__PURE__ */ o("div", {
268
+ class: "ck-extra-add",
269
+ children: /* @__PURE__ */ o("button", {
270
+ class: "ck-ghost ck-ghost-sm",
271
+ onClick: () => g(!0),
272
+ children: ["+ ", r("addChecklist")]
273
+ })
274
+ }) : null
275
+ ]
276
+ });
277
+ }
278
+ function g(e) {
279
+ let n = e.checklist ?? [];
280
+ return n.length ? t("checklistShort", n.length, { done: n.filter((e) => e.done).length }) : null;
281
+ }
282
+ export { g as n, m as r, h as t };