@commentkit/comment-kit 2.0.1 → 2.1.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 (82) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/README.md +14 -6
  3. package/dist/node/cli/api.js +61 -15
  4. package/dist/node/cli/credentials.js +8 -0
  5. package/dist/node/cli/doctor.js +68 -5
  6. package/dist/node/cli/main.js +275 -52
  7. package/dist/node/cli/website.js +140 -0
  8. package/dist/node/types/next.d.ts +4 -4
  9. package/dist/npm/THIRD_PARTY_NOTICES.txt +47 -0
  10. package/dist/npm/chunks/{AgentSend-DOy3jhyF.js → AgentSend-B4rxdY68.js} +3 -3
  11. package/dist/npm/chunks/Checklist-Cy68X5qC.js +269 -0
  12. package/dist/npm/chunks/Composer-D65l6Jg4.js +734 -0
  13. package/dist/npm/chunks/DatePicker-BPzzqW3f.js +161 -0
  14. package/dist/npm/chunks/{Guest-7hcN765o.js → Guest-C-ZhARI0.js} +18 -17
  15. package/dist/npm/chunks/{MarkupEditor-6bJGpWGO.js → MarkupEditor-BOb2jFTR.js} +8 -8
  16. package/dist/npm/chunks/{Panel-ChPUB68C.js → Panel-DgdCgaC-.js} +217 -218
  17. package/dist/npm/chunks/{Settings-CB5eEKnf.js → Settings-BbWu2Rd5.js} +34 -33
  18. package/dist/npm/chunks/{Shortcuts-eAyjJ89P.js → Shortcuts-C5wEx-Mq.js} +25 -23
  19. package/dist/npm/chunks/SignInFirst-BlMbutED.js +36 -0
  20. package/dist/npm/chunks/{StyleEditor-CZTdAA5c.js → StyleEditor-BN2z7mUs.js} +4 -4
  21. package/dist/npm/chunks/{StylePanel-B4pHQUL9.js → StylePanel-BZk-r-kl.js} +3 -3
  22. package/dist/npm/chunks/TaskFields-B2-YvIwV.js +617 -0
  23. package/dist/npm/chunks/ThreadCard-xKy4JbXK.js +1142 -0
  24. package/dist/npm/chunks/{Viewer-DY6zb90M.js → Viewer-DL6M3wAT.js} +9 -8
  25. package/dist/npm/chunks/{agent-MTQHr9ei.js → agent-D1VQvc14.js} +12 -12
  26. package/dist/npm/chunks/{ar-L5cQ-NPe.js → ar-DtfC6tHi.js} +53 -12
  27. package/dist/npm/chunks/{card-bits-CTdrkYn8.js → card-bits-B94SwnS9.js} +12 -10
  28. package/dist/npm/chunks/{client-7eVxvg5j.js → client-CULjcQxz.js} +13 -11
  29. package/dist/npm/chunks/{confetti-BIs5s14P.js → confetti-K_xKxQGa.js} +1 -1
  30. package/dist/npm/chunks/{context-Cf6khm7A.js → context-0MfEgoip.js} +1 -1
  31. package/dist/npm/chunks/{de-D0C-v6tP.js → de-CSyX5Cz-.js} +53 -12
  32. package/dist/npm/chunks/{dpop-0A76OPa9.js → dpop-DpxIN5kL.js} +1 -1
  33. package/dist/npm/chunks/entrance-CO0AzUKy.js +90 -0
  34. package/dist/npm/chunks/{es-Bw4Dj9tN.js → es-D7SAi7fz.js} +53 -12
  35. package/dist/npm/chunks/{extension-DFVOvciD.js → extension-DpfiPOjC.js} +1 -1
  36. package/dist/npm/chunks/{extension-SmoH5AA4.js → extension-faFfCApb.js} +2 -2
  37. package/dist/npm/chunks/{files-4lV9YQIX.js → files-BkHuRlcW.js} +2 -2
  38. package/dist/npm/chunks/{fr-TkuQaIAa.js → fr-CIr2nUyu.js} +53 -12
  39. package/dist/npm/chunks/{hi-DXSH2U8d.js → hi-BTocxOL5.js} +53 -12
  40. package/dist/npm/chunks/{i18n-aVSu9TcJ.js → i18n-CDw_D17c.js} +17 -21
  41. package/dist/npm/chunks/icons-BJLm_C0M.js +141 -0
  42. package/dist/npm/chunks/{identify-BGYh2dVo.js → identify-963WDKul.js} +1 -1
  43. package/dist/npm/chunks/{it-CiWA_bch.js → it-DCExRo0r.js} +53 -12
  44. package/dist/npm/chunks/{ja-C-QmR3yz.js → ja-CgWpTdWi.js} +52 -11
  45. package/dist/npm/chunks/late-words-QnNheaDY.js +59 -0
  46. package/dist/npm/chunks/{live-BExWHzQ7.js → live-BI72WQBA.js} +31 -23
  47. package/dist/npm/chunks/{nl-CEmZRqjX.js → nl-DhTQ8oJ_.js} +53 -12
  48. package/dist/npm/chunks/{page-key-HSY3Lze5.js → page-key-CW8Mtf60.js} +1 -1
  49. package/dist/npm/chunks/{pick-B3sR7jtS.js → pick-BRhngGMq.js} +1 -1
  50. package/dist/npm/chunks/{pkce-CfZhiNBi.js → pkce-BEeLAZhN.js} +1 -1
  51. package/dist/npm/chunks/{pt-BR-b-a8sxO8.js → pt-BR-DrO6LV4n.js} +53 -12
  52. package/dist/npm/chunks/{report-DaVuoRYS.js → report-DAzQvgUh.js} +1 -1
  53. package/dist/npm/chunks/{show-BoN8AC-F.js → show-Ka3g4eCJ.js} +7 -7
  54. package/dist/npm/chunks/signin-Car5vP1U.js +101 -0
  55. package/dist/npm/chunks/{source-mk3rGBBQ.js → source-dd_it90W.js} +1 -1
  56. package/dist/npm/chunks/{src-C8rZFyL_.js → src-fTYV50pw.js} +21 -15
  57. package/dist/npm/chunks/start-CE5eR33Z.js +1916 -0
  58. package/dist/npm/chunks/states-DLMCvwes.js +3 -0
  59. package/dist/npm/chunks/{upload-B2mkgMeJ.js → upload-Dcv9CCly.js} +1 -1
  60. package/dist/npm/chunks/uploads-CmeoNVO2.js +1236 -0
  61. package/dist/npm/chunks/{wrap-DW6EFbVQ.js → wrap-B0mzrRhc.js} +27 -27
  62. package/dist/npm/chunks/{zh-CN-JTscW8u8.js → zh-CN-Bb8UzT1V.js} +53 -12
  63. package/dist/npm/element.js +7 -1
  64. package/dist/npm/headless.js +2 -2
  65. package/dist/npm/index.js +2 -2
  66. package/dist/npm/react.js +1 -1
  67. package/dist/npm/svelte.js +1 -1
  68. package/dist/npm/types/adapters/vue.d.ts +12 -0
  69. package/dist/npm/types/core/auth.d.ts +1 -0
  70. package/dist/npm/types/core/client.d.ts +5 -1
  71. package/dist/npm/types/core/types.d.ts +17 -2
  72. package/dist/npm/vue.js +5 -1
  73. package/package.json +2 -1
  74. package/dist/npm/chunks/Checklist-CW_SwMpS.js +0 -282
  75. package/dist/npm/chunks/Composer-Bveq5QrK.js +0 -727
  76. package/dist/npm/chunks/TaskFields-C8BX0Sgg.js +0 -289
  77. package/dist/npm/chunks/ThreadCard-B1EsX3PR.js +0 -1160
  78. package/dist/npm/chunks/late-words-80_VWt8S.js +0 -14
  79. package/dist/npm/chunks/signin-BOWr_WCo.js +0 -75
  80. package/dist/npm/chunks/start-CV4j78_q.js +0 -1894
  81. package/dist/npm/chunks/states-b9Bv3Ci7.js +0 -3
  82. package/dist/npm/chunks/uploads-8AxyRq7g.js +0 -1147
@@ -1,289 +0,0 @@
1
- import { _ as e, c as t, d as n, m as r, n as i, u as a } from "./i18n-aVSu9TcJ.js";
2
- import { r as o } from "./context-Cf6khm7A.js";
3
- import { s, v as c } from "./start-CV4j78_q.js";
4
- // src/ui/TaskFields.tsx
5
- s(".ck-task .ck-chip{cursor:default}.ck-task button.ck-chip{cursor:pointer}.ck-root .ck-date-input:focus-visible{outline:none}.ck-task{flex-wrap:wrap;gap:8px;padding:8px 16px 0;display:flex}.ck-task .ck-chip>bdi{text-overflow:ellipsis;min-width:0;overflow:hidden}.ck-card>.ck-task[data-read]{overscroll-behavior:contain;max-height:72px;overflow-y:auto}.ck-date{position:relative}.ck-date[data-set]{color:var(--ck-text)}.ck-date-input{opacity:0;cursor:pointer;border:0;width:100%;height:100%;margin:0;padding:0;position:absolute;top:0;bottom:0;left:0;right:0}.ck-date:focus-within{outline:2px solid var(--ck-ring);outline-offset:1px}.ck-task-pick{min-width:0;max-width:100%;position:relative}.ck-task-menu{z-index:2;top:calc(100% + 4px);overscroll-behavior:contain;border-radius:var(--ck-radius-md);background:var(--ck-bg);min-width:180px;max-width:min(280px,100vw - 48px);max-height:220px;box-shadow:var(--ck-shadow-sm);animation:ck-pop var(--ck-fast) var(--ck-ease);border:1px solid #0000;padding:4px;position:absolute;overflow:auto}.ck-task-menu:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:0}.ck-task-menu:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:0}.ck-task-menu:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:0}.ck-task-menu:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:0}.ck-task-menu .ck-check{border-radius:var(--ck-radius-sm);min-height:32px;color:var(--ck-text);transition:background-color var(--ck-fast);align-items:center;margin:0;padding:4px 8px}.ck-task-menu .ck-check input{margin:0}.ck-task-menu .ck-check bdi{overflow-wrap:anywhere;min-width:0}.ck-task-menu .ck-check:has(input:focus-visible){background:var(--ck-bg-hover)}.ck-swatch{border-radius:50%;flex:none;width:8px;height:8px}.ck-task-draft{border:0;margin-top:8px;padding:0}@media (hover:hover){.ck-task-menu .ck-check:hover{background:var(--ck-bg-hover)}}@media (pointer:coarse){.ck-task-menu .ck-check{min-height:44px}.ck-date-input{font-size:var(--ck-fs-lg)}}");
6
- var l = [
7
- "none",
8
- "low",
9
- "medium",
10
- "high",
11
- "urgent"
12
- ], u = /* @__PURE__ */ new WeakMap();
13
- function d(e) {
14
- let t = u.get(e);
15
- return t || (t = Promise.all([e.people().catch(() => []), e.labels().catch(() => [])]).then(([e, t]) => ({
16
- people: e.filter((e) => e.assignable && e.type === "user" && /^\d+$/.test(e.id ?? "")),
17
- labels: t
18
- })), u.set(e, t)), t;
19
- }
20
- function f(e) {
21
- return /^\d{4}-\d{2}-\d{2}/.exec(e ?? "")?.[0] ?? "";
22
- }
23
- function p(e) {
24
- let [t, n, r] = e.split("-").map(Number);
25
- try {
26
- return new Date(t, n - 1, r).toLocaleDateString(i(), {
27
- day: "numeric",
28
- month: "short",
29
- year: "numeric"
30
- });
31
- } catch {
32
- return e;
33
- }
34
- }
35
- var m = (e) => /^#[0-9a-f]{6}$/i.test(e) ? e : "transparent";
36
- function h({ thread: r, editable: i, onChange: s }, c) {
37
- let { client: u, reportError: h } = o(c), [_, b] = e(null), [x, S] = e(!1);
38
- n(() => {
39
- i && d(u).then(b);
40
- }, [i]);
41
- let C = r.labels ?? [], w = f(r.due_at), T = r.assignees ?? (r.assignee ? [r.assignee] : []);
42
- if (!i) {
43
- let e = [
44
- r.priority === "none" ? null : /* @__PURE__ */ a("span", {
45
- class: "ck-chip",
46
- children: [
47
- t("priority"),
48
- ": ",
49
- t(`priority_${r.priority}`)
50
- ]
51
- }),
52
- T.length ? /* @__PURE__ */ a("span", {
53
- class: "ck-chip",
54
- children: [
55
- t("assigneeFilter"),
56
- ": ",
57
- /* @__PURE__ */ a("bdi", {
58
- title: T.map((e) => e.name).join(", "),
59
- children: T.map((e) => e.name).join(", ")
60
- })
61
- ]
62
- }) : null,
63
- w ? /* @__PURE__ */ a("span", {
64
- class: "ck-chip",
65
- children: t("dueOn", { date: p(w) })
66
- }) : null,
67
- ...C.map((e) => /* @__PURE__ */ a("span", {
68
- class: "ck-chip",
69
- children: [/* @__PURE__ */ a("span", {
70
- class: "ck-swatch",
71
- style: { background: m(e.color) }
72
- }), /* @__PURE__ */ a("bdi", {
73
- title: e.name,
74
- children: e.name
75
- })]
76
- }))
77
- ].filter(Boolean);
78
- return e.length ? /* @__PURE__ */ a("div", {
79
- class: "ck-task",
80
- "data-read": !0,
81
- role: "group",
82
- "aria-label": t("taskDetails"),
83
- children: e
84
- }) : null;
85
- }
86
- let E = (e, t = {}) => {
87
- if (x) return;
88
- let n = r;
89
- S(!0), s({
90
- ...r,
91
- ...t
92
- }), u.updateThread(r.id, e).then(s, (e) => {
93
- s(n), h(e);
94
- }).finally(() => S(!1));
95
- }, D = _?.people ?? [], O = [...T.filter((e) => !D.some((t) => t.id === e.id)), ...D], k = T.map((e) => Number(e.id)), A = (e, t) => {
96
- let n = t ? [...k.filter((t) => t !== Number(e.id)), Number(e.id)] : k.filter((t) => t !== Number(e.id)), r = n.map((e) => O.find((t) => Number(t.id) === e)).filter(Boolean);
97
- E({ assignee_ids: n }, {
98
- assignee: r[0] ?? null,
99
- assignees: r
100
- });
101
- }, j = new Set(C.map((e) => e.id)), M = (e, t) => {
102
- let n = [...j].filter((t) => t !== e).concat(t ? [e] : []), r = [...C, ..._?.labels ?? []];
103
- E({ label_ids: n }, { labels: n.map((e) => r.find((t) => t.id === e)).filter(Boolean) });
104
- }, N = t(`priority_${r.priority}`);
105
- return /* @__PURE__ */ a("div", {
106
- class: "ck-task",
107
- role: "group",
108
- "aria-label": t("taskDetails"),
109
- "aria-busy": x || void 0,
110
- children: [
111
- /* @__PURE__ */ a(v, {
112
- label: t("priority"),
113
- summary: N,
114
- children: l.map((e) => /* @__PURE__ */ a(y, {
115
- type: "radio",
116
- name: `ck-priority-${r.id}`,
117
- checked: r.priority === e,
118
- busy: x,
119
- onPick: () => E({ priority: e }, { priority: e }),
120
- children: t(`priority_${e}`)
121
- }))
122
- }),
123
- /* @__PURE__ */ a(v, {
124
- label: t("assigneeFilter"),
125
- summary: g(T),
126
- keepOpen: !0,
127
- children: O.map((e) => /* @__PURE__ */ a(y, {
128
- type: "checkbox",
129
- checked: k.includes(Number(e.id)),
130
- busy: x,
131
- onPick: (t) => A(e, t),
132
- children: /* @__PURE__ */ a("bdi", { children: e.name })
133
- }))
134
- }),
135
- /* @__PURE__ */ a("label", {
136
- class: "ck-chip ck-date",
137
- "data-set": w ? "true" : void 0,
138
- children: [/* @__PURE__ */ a("bdi", {
139
- title: w ? t("dueOn", { date: p(w) }) : void 0,
140
- children: w ? t("dueOn", { date: p(w) }) : t("dueDate")
141
- }), /* @__PURE__ */ a("input", {
142
- class: "ck-date-input",
143
- type: "date",
144
- "aria-label": t("dueDate"),
145
- value: w,
146
- onClick: (e) => {
147
- try {
148
- e.currentTarget.showPicker?.();
149
- } catch {}
150
- },
151
- onChange: (e) => {
152
- let t = e.target, n = t.value;
153
- if (x) return void (t.value = w);
154
- let r = n || null;
155
- n !== w && E({ due_at: r }, { due_at: r });
156
- }
157
- })]
158
- }),
159
- _?.labels.length || C.length ? /* @__PURE__ */ a(v, {
160
- label: t("labels"),
161
- summary: C.length ? C.map((e) => e.name).join(", ") : t("noLabels"),
162
- keepOpen: !0,
163
- children: (_?.labels.length ? _.labels : C).map((e) => /* @__PURE__ */ a(y, {
164
- type: "checkbox",
165
- checked: j.has(e.id),
166
- busy: x,
167
- onPick: (t) => M(e.id, t),
168
- children: [/* @__PURE__ */ a("span", {
169
- class: "ck-swatch",
170
- style: { background: m(e.color) }
171
- }), /* @__PURE__ */ a("bdi", { children: e.name })]
172
- }))
173
- }) : null
174
- ]
175
- });
176
- }
177
- function g(e) {
178
- return e.length ? e.length === 1 ? e[0].name : `${e[0].name} +${e.length - 1}` : t("unassigned");
179
- }
180
- function _(e) {
181
- e?.scrollIntoView({ block: "nearest" });
182
- }
183
- function v({ label: t, summary: n, spoken: i = n, keepOpen: o = !1, children: s }) {
184
- let [l, u] = e(!1), d = r(null), f = r(null), p = () => {
185
- u(!1), f.current?.focus();
186
- };
187
- return c(l, d, () => u(!1)), /* @__PURE__ */ a("div", {
188
- class: l ? "ck-task-pick ck-pop" : "ck-task-pick",
189
- ref: d,
190
- onChange: () => !o && p(),
191
- onKeyDown: (e) => l && e.key === "Escape" && (e.stopPropagation(), p()),
192
- children: [/* @__PURE__ */ a("button", {
193
- ref: f,
194
- class: "ck-chip",
195
- "aria-expanded": l,
196
- "aria-label": x(n, `${t}: ${i}`, i),
197
- onClick: () => u(!l),
198
- children: /* @__PURE__ */ a("bdi", {
199
- title: n,
200
- children: n
201
- })
202
- }), l ? /* @__PURE__ */ a("div", {
203
- class: "ck-task-menu",
204
- role: "group",
205
- "aria-label": t,
206
- ref: _,
207
- children: s
208
- }) : null]
209
- });
210
- }
211
- function y({ type: e, name: t, checked: n, busy: r = !1, onPick: i, children: o }) {
212
- return /* @__PURE__ */ a("label", {
213
- class: "ck-check",
214
- children: [/* @__PURE__ */ a("input", {
215
- type: e,
216
- name: t,
217
- checked: n,
218
- onChange: (e) => {
219
- let t = e.target;
220
- if (r) return void (t.checked = n);
221
- i(t.checked);
222
- }
223
- }), o]
224
- });
225
- }
226
- function b({ client: r, value: i, onChange: o }) {
227
- let [s, c] = e(null);
228
- n(() => void d(r).then(c), []);
229
- let u = i.priority ?? "none", f = i.assignee_ids ?? [], p = f.map((e) => s?.people.find((t) => Number(t.id) === e)).filter((e) => !!e), h = new Set(i.label_ids ?? []), _ = (s?.labels ?? []).filter((e) => h.has(e.id));
230
- return /* @__PURE__ */ a("div", {
231
- class: "ck-task ck-task-draft",
232
- role: "group",
233
- "aria-label": t("taskDetails"),
234
- children: [
235
- /* @__PURE__ */ a(v, {
236
- label: t("priority"),
237
- summary: t(u === "none" ? "priority" : `priority_${u}`),
238
- spoken: t(`priority_${u}`),
239
- children: l.map((e) => /* @__PURE__ */ a(y, {
240
- type: "radio",
241
- name: "ck-draft-priority",
242
- checked: u === e,
243
- onPick: () => o({
244
- ...i,
245
- priority: e
246
- }),
247
- children: t(`priority_${e}`)
248
- }))
249
- }),
250
- /* @__PURE__ */ a(v, {
251
- label: t("assigneeFilter"),
252
- summary: p.length ? g(p) : t("assign"),
253
- spoken: p.length ? g(p) : t("unassigned"),
254
- keepOpen: !0,
255
- children: (s?.people ?? []).map((e) => /* @__PURE__ */ a(y, {
256
- type: "checkbox",
257
- checked: f.includes(Number(e.id)),
258
- onPick: (t) => o({
259
- ...i,
260
- assignee_ids: t ? [...f, Number(e.id)] : f.filter((t) => t !== Number(e.id))
261
- }),
262
- children: /* @__PURE__ */ a("bdi", { children: e.name })
263
- }))
264
- }),
265
- s?.labels.length ? /* @__PURE__ */ a(v, {
266
- label: t("labels"),
267
- summary: _.length ? _.map((e) => e.name).join(", ") : t("labels"),
268
- spoken: _.length ? _.map((e) => e.name).join(", ") : t("noLabels"),
269
- keepOpen: !0,
270
- children: s.labels.map((e) => /* @__PURE__ */ a(y, {
271
- type: "checkbox",
272
- checked: h.has(e.id),
273
- onPick: (t) => o({
274
- ...i,
275
- label_ids: [...h].filter((t) => t !== e.id).concat(t ? [e.id] : [])
276
- }),
277
- children: [/* @__PURE__ */ a("span", {
278
- class: "ck-swatch",
279
- style: { background: m(e.color) }
280
- }), /* @__PURE__ */ a("bdi", { children: e.name })]
281
- }))
282
- }) : null
283
- ]
284
- });
285
- }
286
- function x(e, t, n) {
287
- return t.toLowerCase().includes(e.toLowerCase()) && !/^\p{L}/u.test(t.slice(t.toLowerCase().indexOf(e.toLowerCase()) + e.length)) ? t : `${e} (${n})`;
288
- }
289
- export { b as TaskDraft, h as TaskFields };