@commentkit/comment-kit 1.5.1 → 1.6.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.
- package/CHANGELOG.md +15 -0
- package/dist/npm/THIRD_PARTY_NOTICES.txt +2 -2
- package/dist/npm/chunks/{AgentSend-DjFZSC0S.js → AgentSend-2JPDseOo.js} +4 -5
- package/dist/npm/chunks/{Checklist-BEz4IZdT.js → Checklist-BpDXQebo.js} +77 -79
- package/dist/npm/chunks/Composer-CAyj-c8e.js +677 -0
- package/dist/npm/chunks/Guest-ZdFmTcXI.js +187 -0
- package/dist/npm/chunks/{MarkupEditor-CPH4yKx4.js → MarkupEditor-BFplZwFy.js} +3 -5
- package/dist/npm/chunks/{Panel-DSoUAlbQ.js → Panel-BhZ4XRDR.js} +300 -302
- package/dist/npm/chunks/{Settings-C_qV4n7J.js → Settings-SPG9EHUZ.js} +70 -72
- package/dist/npm/chunks/{Shortcuts-ChnaribX.js → Shortcuts-C28HVDw6.js} +3 -5
- package/dist/npm/chunks/{StyleEditor-DqZd6C5o.js → StyleEditor-ByZMtq10.js} +4 -5
- package/dist/npm/chunks/{StylePanel-DMC3riYK.js → StylePanel-Iwhce2tE.js} +62 -64
- package/dist/npm/chunks/{TaskFields-BfjjllMx.js → TaskFields-BsP_fVJg.js} +7 -6
- package/dist/npm/chunks/{ThreadCard-DmKAelSL.js → ThreadCard-BzVZdDCb.js} +407 -403
- package/dist/npm/chunks/{Viewer-mw69qSI5.js → Viewer-CqtGrdD8.js} +29 -31
- package/dist/npm/chunks/{agent-CqDO3JMA.js → agent-BDMQtOzH.js} +14 -15
- package/dist/npm/chunks/{anchor-OCQnjp_6.js → anchor-BsradQhn.js} +1 -2
- package/dist/npm/chunks/{ar-BQ9K9Oqf.js → ar-8tPch6W4.js} +5 -2
- package/dist/npm/chunks/{card-bits-C7bIk5KX.js → card-bits-Bna-g3Py.js} +24 -26
- package/dist/npm/chunks/{client-dZeNdizE.js → client-EFTWxHbJ.js} +76 -61
- package/dist/npm/chunks/{colors-CAjY4jxf.js → colors-CWAn_swA.js} +1 -2
- package/dist/npm/chunks/{confetti-DKeKR7-6.js → confetti-DTKpwF3O.js} +1 -2
- package/dist/npm/chunks/{de-CcPi8xdC.js → de-C63897uD.js} +5 -2
- package/dist/npm/chunks/{drafts-CpQdHhcK.js → drafts-akdBsOd0.js} +1 -2
- package/dist/npm/chunks/{es-DXgkjDCG.js → es-CI2bSpvB.js} +5 -2
- package/dist/npm/chunks/{extension-BFkXOmX5.js → extension-BST6LH1q.js} +2 -3
- package/dist/npm/chunks/{extension-Gvei3opb.js → extension-D-V3utTm.js} +3 -4
- package/dist/npm/chunks/{fr-IjJaUbWh.js → fr-rsVe-Lqk.js} +5 -2
- package/dist/npm/chunks/{hi-BhKQK2MU.js → hi-cvwbSaWP.js} +5 -2
- package/dist/npm/chunks/{html2canvas-pro.esm-lgs6tb4C.js → html2canvas-pro.esm-B7b8p5Wr.js} +608 -528
- package/dist/npm/chunks/{i18n-DAJGndZ2.js → i18n-C4v0M-6z.js} +254 -257
- package/dist/npm/chunks/{it-DKiSCkiD.js → it-C8tnV0BF.js} +5 -2
- package/dist/npm/chunks/{ja-BI1WagDg.js → ja-BWxDfC2f.js} +5 -2
- package/dist/npm/chunks/{live-MvvBdoGd.js → live-BCpJVBeN.js} +2 -3
- package/dist/npm/chunks/{lock-C82sC17d.js → lock-B1JLlOhz.js} +0 -1
- package/dist/npm/chunks/{nl-CJw3VUQ5.js → nl-DNQ6eCht.js} +5 -2
- package/dist/npm/chunks/{pick-dDDLxCDI.js → pick-CLyOdjnD.js} +3 -4
- package/dist/npm/chunks/{pt-BR-CjBolC5g.js → pt-BR-CkG7vpU2.js} +5 -2
- package/dist/npm/chunks/{realtime-D22tI_AS.js → realtime-DIo-Wth4.js} +2 -3
- package/dist/npm/chunks/{report-DoDVi1qT.js → report-BBrT3r89.js} +1 -2
- package/dist/npm/chunks/{rolldown-runtime-Y_bBpyJl.js → rolldown-runtime-QGRDbDUS.js} +1 -2
- package/dist/npm/chunks/{source-BQS2_xfB.js → source-CS7C6wJA.js} +2 -3
- package/dist/npm/chunks/{src-C_oUnL0i.js → src-C4FsVoUp.js} +22 -24
- package/dist/npm/chunks/{start-C5-rebEU.js → start-i9M-r3aH.js} +374 -357
- package/dist/npm/chunks/{upload-CzPAjktW.js → upload-DSv7EyBD.js} +2 -3
- package/dist/npm/chunks/uploads-I01kdqQF.js +1103 -0
- package/dist/npm/chunks/{zh-CN-BrZGx2S0.js → zh-CN-BKuZOLBE.js} +5 -2
- package/dist/npm/element.js +2 -3
- package/dist/npm/headless.js +2 -2
- package/dist/npm/index.js +2 -2
- package/dist/npm/react.js +2 -3
- package/dist/npm/svelte.js +2 -3
- package/dist/npm/types/core/auth.d.ts +14 -0
- package/dist/npm/vue.js +2 -3
- package/package.json +8 -8
- package/dist/npm/chunks/Composer-D1wbmdjF.js +0 -681
- package/dist/npm/chunks/Guest-CtyRy8Kz.js +0 -170
- package/dist/npm/chunks/uploads-tpLjiJdH.js +0 -541
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.6.0 (2026-11-10)
|
|
4
|
+
|
|
5
|
+
For the new notification system. Pair it with the backend that declares `timezone` and `locale` on `POST /api/v1/guest/verify`; the widget still works with an older server, which ignores both.
|
|
6
|
+
|
|
7
|
+
- **Email links that sign reviewers in:** a client email's link can carry `?ck_signin=`. The widget takes it off the address at once (no reload), keeps it only in memory (never stored or logged), and shows a short "Welcome back" note; one click opens the guest sign-in window with the email address filled in, and the code goes to that address. A forwarded email still needs that code. Works in popup and redirect sign-in. The link alone also shows the widget on a live site.
|
|
8
|
+
- **Emails at the right hour, in the right language:** when a guest confirms their code, the widget sends their time zone (from the browser) and the language the widget shows, so summaries arrive at 09:00 their time.
|
|
9
|
+
- **The code step names the email to look for:** "Look for an email from CommentKit: “Your code for {website}”", the new subject of the code email. In all 11 languages (the quoted subject stays in English, as the email is).
|
|
10
|
+
- **Voice control finds the Assign button:** in the comment box its spoken name now starts with what it shows ("Assign (Unassigned)"), as WCAG 2.5.3 asks.
|
|
11
|
+
- Dependencies updated: Preact 11.1, html2canvas-pro 2.6, MCP SDK 2.4 and the build tools.
|
|
12
|
+
- **Formatting shows as you write:** in the comment and reply box, Bold, Italic, Strikethrough and Code (toolbar or Cmd/Ctrl+B, I, Shift+X, E) now show the text formatted, like Slack or Linear, instead of adding `**`, `_` and `~~` around it. At a caret, the next letters you type get the format (press again to stop); the toolbar shows which formats are on. Drafts, quoted text and messages you edit come back formatted, pasted code still becomes a code block, and anything pasted goes in as plain text. Comments are still sent and stored as the same markdown-lite, so the dashboard, MCP server and agents read them as before. Bold, struck and italic together now display nested in threads too.
|
|
13
|
+
|
|
14
|
+
- **Markdown typed by hand turns into formatting,** like Notion or Slack: type `**bold**`, `~~strike~~`, `_italic_` or `*italic*`, or `` `code` `` and the text is formatted as soon as you type the closing marker, with the markers gone. Cmd/Ctrl+Z brings the markers back. Words like snake_case_name, list bullets (`* `), links, code and pasted text stay as they are.
|
|
15
|
+
- **Undo and redo you can rely on** in the comment and reply box: Cmd/Ctrl+Z, Cmd/Ctrl+Shift+Z, Ctrl+Y and the Edit menu step back through typing a word at a time and through each format, mention, paste, line break and deletion, up to 100 steps. Sending or opening a draft starts the history afresh.
|
|
16
|
+
- **Input methods (Japanese, Chinese, Korean, Android keyboards):** text written through an input method now gets the format you switched on at the caret, and in Firefox it replaces the selected text instead of landing next to it.
|
|
17
|
+
|
|
3
18
|
## 1.5.1 (2026-10-28)
|
|
4
19
|
|
|
5
20
|
- **Screenshots keep the page's look on every site:** the screenshot copies the page, and that copy asked the server for each linked stylesheet again without waiting for it. On a slow server or a cold CDN the screenshot came out unstyled (plain fonts, blue links). The copy now reuses the styles the page already has, in the same order, and waits briefly for any it cannot read. No Content Security Policy is touched.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
CommentKit bundles the following open-source software.
|
|
2
2
|
|
|
3
|
-
preact@11.0
|
|
3
|
+
preact@11.1.0 (MIT)
|
|
4
4
|
The MIT License (MIT)
|
|
5
5
|
|
|
6
6
|
Copyright (c) 2015-present Jason Miller
|
|
@@ -25,7 +25,7 @@ SOFTWARE.
|
|
|
25
25
|
|
|
26
26
|
---
|
|
27
27
|
|
|
28
|
-
html2canvas-pro@2.
|
|
28
|
+
html2canvas-pro@2.6.0 (MIT)
|
|
29
29
|
MIT License
|
|
30
30
|
|
|
31
31
|
Copyright (c) 2024-present yorickshan and html2canvas-pro contributors
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as e, l as t, m as n, s as r, u as i } from "./i18n-
|
|
2
|
-
import { n as a, t as o } from "./agent-
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { i as e, l as t, m as n, s as r, u as i } from "./i18n-C4v0M-6z.js";
|
|
2
|
+
import { n as a, t as o } from "./agent-BDMQtOzH.js";
|
|
3
|
+
import { b as s } from "./start-i9M-r3aH.js";
|
|
4
|
+
// src/ui/AgentSend.tsx
|
|
5
5
|
var c = {
|
|
6
6
|
cursor: "Cursor",
|
|
7
7
|
claude: "Claude Code",
|
|
@@ -60,5 +60,4 @@ function u({ client: u, threads: d, onDone: f, onError: p, onClose: m }) {
|
|
|
60
60
|
]
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
|
-
//#endregion
|
|
64
63
|
export { u as AgentSend };
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
var c = "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", l = (e, t,
|
|
1
|
+
import { _ as e, f as t, i as n, l as r, m as i, s as a } from "./i18n-C4v0M-6z.js";
|
|
2
|
+
import { f as o, v as s } from "./start-i9M-r3aH.js";
|
|
3
|
+
// src/ui/art.tsx
|
|
4
|
+
var c = "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", l = (e, t, n, i) => /* @__PURE__ */ r("path", {
|
|
5
5
|
class: i,
|
|
6
6
|
d: c,
|
|
7
|
-
transform: `translate(${e} ${t}) scale(${
|
|
7
|
+
transform: `translate(${e} ${t}) scale(${n})`
|
|
8
8
|
}), u = {
|
|
9
|
-
caughtUp: () => /* @__PURE__ */
|
|
10
|
-
/* @__PURE__ */
|
|
9
|
+
caughtUp: () => /* @__PURE__ */ r(e, { children: [
|
|
10
|
+
/* @__PURE__ */ r("path", {
|
|
11
11
|
class: "ck-art-w",
|
|
12
12
|
d: "M28 50l8-20h48l8 20v18H28z"
|
|
13
13
|
}),
|
|
14
|
-
/* @__PURE__ */
|
|
14
|
+
/* @__PURE__ */ r("path", {
|
|
15
15
|
class: "ck-art-line",
|
|
16
16
|
d: "M28 50h19l4 6h18l4-6h19"
|
|
17
17
|
}),
|
|
18
18
|
l(44, 4, .5, "ck-art-a"),
|
|
19
|
-
/* @__PURE__ */
|
|
19
|
+
/* @__PURE__ */ r("path", {
|
|
20
20
|
class: "ck-art-tick",
|
|
21
21
|
d: "M53 19l5 5 9-10"
|
|
22
22
|
})
|
|
23
23
|
] }),
|
|
24
|
-
noFeedback: () => /* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */
|
|
24
|
+
noFeedback: () => /* @__PURE__ */ r(e, { children: [
|
|
25
|
+
/* @__PURE__ */ r("rect", {
|
|
26
26
|
class: "ck-art-w",
|
|
27
27
|
x: "22",
|
|
28
28
|
y: "18",
|
|
@@ -30,23 +30,23 @@ var c = "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
|
|
|
30
30
|
height: "52",
|
|
31
31
|
rx: "7"
|
|
32
32
|
}),
|
|
33
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ r("path", {
|
|
34
34
|
class: "ck-art-line",
|
|
35
35
|
d: "M22 29h70"
|
|
36
36
|
}),
|
|
37
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ r("circle", {
|
|
38
38
|
class: "ck-art-dot",
|
|
39
39
|
cx: "29",
|
|
40
40
|
cy: "23.5",
|
|
41
41
|
r: "1.6"
|
|
42
42
|
}),
|
|
43
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ r("circle", {
|
|
44
44
|
class: "ck-art-dot",
|
|
45
45
|
cx: "35",
|
|
46
46
|
cy: "23.5",
|
|
47
47
|
r: "1.6"
|
|
48
48
|
}),
|
|
49
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ r("rect", {
|
|
50
50
|
class: "ck-art-m",
|
|
51
51
|
x: "30",
|
|
52
52
|
y: "37",
|
|
@@ -54,7 +54,7 @@ var c = "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
|
|
|
54
54
|
height: "5",
|
|
55
55
|
rx: "2.5"
|
|
56
56
|
}),
|
|
57
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ r("rect", {
|
|
58
58
|
class: "ck-art-m",
|
|
59
59
|
x: "30",
|
|
60
60
|
y: "47",
|
|
@@ -62,7 +62,7 @@ var c = "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
|
|
|
62
62
|
height: "5",
|
|
63
63
|
rx: "2.5"
|
|
64
64
|
}),
|
|
65
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ r("rect", {
|
|
66
66
|
class: "ck-art-m",
|
|
67
67
|
x: "30",
|
|
68
68
|
y: "57",
|
|
@@ -71,13 +71,13 @@ var c = "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
|
|
|
71
71
|
rx: "2.5"
|
|
72
72
|
}),
|
|
73
73
|
l(70, 6, .46, "ck-art-a"),
|
|
74
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ r("path", {
|
|
75
75
|
class: "ck-art-tick",
|
|
76
76
|
d: "M84.5 14v9M80 18.5h9"
|
|
77
77
|
})
|
|
78
78
|
] }),
|
|
79
|
-
noMatch: () => /* @__PURE__ */
|
|
80
|
-
/* @__PURE__ */
|
|
79
|
+
noMatch: () => /* @__PURE__ */ r(e, { children: [
|
|
80
|
+
/* @__PURE__ */ r("rect", {
|
|
81
81
|
class: "ck-art-m",
|
|
82
82
|
x: "22",
|
|
83
83
|
y: "22",
|
|
@@ -85,7 +85,7 @@ var c = "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
|
|
|
85
85
|
height: "6",
|
|
86
86
|
rx: "3"
|
|
87
87
|
}),
|
|
88
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ r("rect", {
|
|
89
89
|
class: "ck-art-m",
|
|
90
90
|
x: "22",
|
|
91
91
|
y: "36",
|
|
@@ -93,7 +93,7 @@ var c = "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
|
|
|
93
93
|
height: "6",
|
|
94
94
|
rx: "3"
|
|
95
95
|
}),
|
|
96
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ r("rect", {
|
|
97
97
|
class: "ck-art-m",
|
|
98
98
|
x: "22",
|
|
99
99
|
y: "50",
|
|
@@ -101,49 +101,49 @@ var c = "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
|
|
|
101
101
|
height: "6",
|
|
102
102
|
rx: "3"
|
|
103
103
|
}),
|
|
104
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ r("circle", {
|
|
105
105
|
class: "ck-art-w",
|
|
106
106
|
cx: "76",
|
|
107
107
|
cy: "42",
|
|
108
108
|
r: "15"
|
|
109
109
|
}),
|
|
110
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ r("path", {
|
|
111
111
|
class: "ck-art-line ck-art-bold",
|
|
112
112
|
d: "M87 53l11 11"
|
|
113
113
|
}),
|
|
114
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ r("path", {
|
|
115
115
|
class: "ck-art-line",
|
|
116
116
|
d: "M70 42h12"
|
|
117
117
|
})
|
|
118
118
|
] }),
|
|
119
|
-
error: () => /* @__PURE__ */
|
|
119
|
+
error: () => /* @__PURE__ */ r(e, { children: [
|
|
120
120
|
l(36, 6, .75, "ck-art-m"),
|
|
121
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ r("path", {
|
|
122
122
|
class: "ck-art-line ck-art-bold",
|
|
123
123
|
d: "M60 18v14"
|
|
124
124
|
}),
|
|
125
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ r("circle", {
|
|
126
126
|
class: "ck-art-ink",
|
|
127
127
|
cx: "60",
|
|
128
128
|
cy: "40",
|
|
129
129
|
r: "2.4"
|
|
130
130
|
}),
|
|
131
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ r("path", {
|
|
132
132
|
class: "ck-art-spark",
|
|
133
133
|
d: "M24 22l6 4M22 36h7M96 22l-6 4M98 36h-7"
|
|
134
134
|
})
|
|
135
135
|
] }),
|
|
136
|
-
gone: () => /* @__PURE__ */
|
|
136
|
+
gone: () => /* @__PURE__ */ r(e, { children: l(36, 6, .75, "ck-art-ghost") })
|
|
137
137
|
};
|
|
138
138
|
function d({ name: e }) {
|
|
139
|
-
return /* @__PURE__ */
|
|
139
|
+
return /* @__PURE__ */ r("svg", {
|
|
140
140
|
class: "ck-art",
|
|
141
141
|
viewBox: "0 0 120 80",
|
|
142
142
|
width: "120",
|
|
143
143
|
height: "80",
|
|
144
144
|
"aria-hidden": "true",
|
|
145
145
|
focusable: "false",
|
|
146
|
-
children: [/* @__PURE__ */
|
|
146
|
+
children: [/* @__PURE__ */ r("ellipse", {
|
|
147
147
|
class: "ck-art-shadow",
|
|
148
148
|
cx: "60",
|
|
149
149
|
cy: "74",
|
|
@@ -152,85 +152,84 @@ function d({ name: e }) {
|
|
|
152
152
|
}), u[e]()]
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
y.current = a;
|
|
155
|
+
// src/ui/Checklist.tsx
|
|
156
|
+
function f({ client: e, thread: n, editable: c, onChange: l, onError: u }) {
|
|
157
|
+
let [d, f] = i(!1), [p, m] = i(""), [h, g] = i(!1), _ = n.checklist ?? [], v = _.filter((e) => e.done).length, y = t(n);
|
|
158
|
+
y.current = n;
|
|
160
159
|
let b = (e) => l(y.current = {
|
|
161
160
|
...y.current,
|
|
162
161
|
checklist: e(y.current.checklist ?? [])
|
|
163
162
|
}), x = () => {
|
|
164
|
-
let
|
|
165
|
-
|
|
166
|
-
m(
|
|
163
|
+
let t = p.trim();
|
|
164
|
+
t && !h && (g(!0), m(""), e.addChecklistItem(n.id, t).then((e) => b((t) => [...t, e]), (e) => {
|
|
165
|
+
m(t), u(e);
|
|
167
166
|
}).finally(() => g(!1)));
|
|
168
|
-
}, S = (
|
|
167
|
+
}, S = (t) => {
|
|
169
168
|
let n = {
|
|
170
|
-
...
|
|
171
|
-
done: !
|
|
172
|
-
}, r = (
|
|
173
|
-
r(n),
|
|
174
|
-
r(
|
|
169
|
+
...t,
|
|
170
|
+
done: !t.done
|
|
171
|
+
}, r = (e) => b((n) => n.map((n) => n.id === t.id ? e : n));
|
|
172
|
+
r(n), e.updateChecklistItem(t.id, { done: n.done }).catch((e) => {
|
|
173
|
+
r(t), u(e);
|
|
175
174
|
});
|
|
176
|
-
}, C = (
|
|
177
|
-
let n = _.indexOf(
|
|
178
|
-
b((
|
|
179
|
-
b((
|
|
180
|
-
...
|
|
181
|
-
|
|
182
|
-
...
|
|
183
|
-
]), u(
|
|
175
|
+
}, C = (t) => {
|
|
176
|
+
let n = _.indexOf(t);
|
|
177
|
+
b((e) => e.filter((e) => e.id !== t.id)), e.deleteChecklistItem(t.id).catch((e) => {
|
|
178
|
+
b((e) => e.some((e) => e.id === t.id) ? e : [
|
|
179
|
+
...e.slice(0, n),
|
|
180
|
+
t,
|
|
181
|
+
...e.slice(n)
|
|
182
|
+
]), u(e);
|
|
184
183
|
});
|
|
185
184
|
};
|
|
186
|
-
return !_.length && !c ? null : /* @__PURE__ */
|
|
185
|
+
return !_.length && !c ? null : /* @__PURE__ */ r("div", {
|
|
187
186
|
class: "ck-extra",
|
|
188
187
|
children: [
|
|
189
|
-
_.length ? /* @__PURE__ */
|
|
188
|
+
_.length ? /* @__PURE__ */ r("div", {
|
|
190
189
|
class: "ck-checklist",
|
|
191
190
|
role: "group",
|
|
192
|
-
"aria-label":
|
|
193
|
-
children: [/* @__PURE__ */
|
|
191
|
+
"aria-label": a("checklist"),
|
|
192
|
+
children: [/* @__PURE__ */ r("div", {
|
|
194
193
|
class: "ck-checklist-head",
|
|
195
|
-
children: [/* @__PURE__ */
|
|
194
|
+
children: [/* @__PURE__ */ r("span", {
|
|
196
195
|
class: "ck-muted",
|
|
197
|
-
children:
|
|
196
|
+
children: a("checklistProgress", {
|
|
198
197
|
n: v,
|
|
199
198
|
total: _.length
|
|
200
199
|
})
|
|
201
|
-
}), /* @__PURE__ */
|
|
200
|
+
}), /* @__PURE__ */ r("span", {
|
|
202
201
|
class: "ck-checklist-bar",
|
|
203
202
|
"aria-hidden": "true",
|
|
204
|
-
children: /* @__PURE__ */
|
|
203
|
+
children: /* @__PURE__ */ r("span", { style: { width: `${Math.round(v / _.length * 100)}%` } })
|
|
205
204
|
})]
|
|
206
|
-
}), /* @__PURE__ */
|
|
205
|
+
}), /* @__PURE__ */ r("ul", { children: _.map((e) => /* @__PURE__ */ r("li", {
|
|
207
206
|
"data-done": e.done || void 0,
|
|
208
|
-
children: [/* @__PURE__ */
|
|
207
|
+
children: [/* @__PURE__ */ r("label", {
|
|
209
208
|
class: "ck-check",
|
|
210
|
-
children: [/* @__PURE__ */
|
|
209
|
+
children: [/* @__PURE__ */ r("input", {
|
|
211
210
|
type: "checkbox",
|
|
212
211
|
checked: e.done,
|
|
213
212
|
disabled: !c,
|
|
214
213
|
onChange: () => S(e)
|
|
215
|
-
}), /* @__PURE__ */
|
|
216
|
-
}), c ? /* @__PURE__ */
|
|
214
|
+
}), /* @__PURE__ */ r("bdi", { children: e.body })]
|
|
215
|
+
}), c ? /* @__PURE__ */ r("button", {
|
|
217
216
|
class: "ck-ghost ck-ghost-sm",
|
|
218
|
-
"aria-label":
|
|
217
|
+
"aria-label": a("removeItem", { item: e.body }),
|
|
219
218
|
onClick: () => C(e),
|
|
220
|
-
children: /* @__PURE__ */
|
|
219
|
+
children: /* @__PURE__ */ r(o, {
|
|
221
220
|
name: "close",
|
|
222
221
|
size: 12
|
|
223
222
|
})
|
|
224
223
|
}) : null]
|
|
225
224
|
})) })]
|
|
226
225
|
}) : null,
|
|
227
|
-
c && (d || _.length) ? /* @__PURE__ */
|
|
226
|
+
c && (d || _.length) ? /* @__PURE__ */ r("div", {
|
|
228
227
|
class: "ck-checklist-add",
|
|
229
|
-
children: /* @__PURE__ */
|
|
228
|
+
children: /* @__PURE__ */ r("input", {
|
|
230
229
|
class: "ck-input",
|
|
231
230
|
maxLength: 300,
|
|
232
|
-
placeholder:
|
|
233
|
-
"aria-label":
|
|
231
|
+
placeholder: a("checklistAdd"),
|
|
232
|
+
"aria-label": a("checklistAdd"),
|
|
234
233
|
value: p,
|
|
235
234
|
disabled: h,
|
|
236
235
|
ref: d && !_.length ? s : void 0,
|
|
@@ -240,20 +239,19 @@ function f({ client: t, thread: a, editable: c, onChange: l, onError: u }) {
|
|
|
240
239
|
}
|
|
241
240
|
})
|
|
242
241
|
}) : null,
|
|
243
|
-
c && !_.length && !d ? /* @__PURE__ */
|
|
242
|
+
c && !_.length && !d ? /* @__PURE__ */ r("div", {
|
|
244
243
|
class: "ck-extra-add",
|
|
245
|
-
children: /* @__PURE__ */
|
|
244
|
+
children: /* @__PURE__ */ r("button", {
|
|
246
245
|
class: "ck-ghost ck-ghost-sm",
|
|
247
246
|
onClick: () => f(!0),
|
|
248
|
-
children: ["+ ",
|
|
247
|
+
children: ["+ ", a("addChecklist")]
|
|
249
248
|
})
|
|
250
249
|
}) : null
|
|
251
250
|
]
|
|
252
251
|
});
|
|
253
252
|
}
|
|
254
253
|
function p(e) {
|
|
255
|
-
let
|
|
256
|
-
return
|
|
254
|
+
let t = e.checklist ?? [];
|
|
255
|
+
return t.length ? n("checklistShort", t.length, { done: t.filter((e) => e.done).length }) : null;
|
|
257
256
|
}
|
|
258
|
-
//#endregion
|
|
259
257
|
export { p as n, d as r, f as t };
|