@commentkit/comment-kit 1.5.1 → 2.0.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 +281 -582
- package/README.md +334 -154
- package/SECURITY.md +47 -46
- package/dist/node/THIRD_PARTY_NOTICES.txt +56 -0
- package/dist/node/browser.js +17 -0
- package/dist/node/cli/api.js +226 -0
- package/dist/node/cli/bin.js +18 -0
- package/dist/node/cli/credentials.js +268 -0
- package/dist/node/cli/doctor.js +725 -0
- package/dist/node/cli/format.js +54 -0
- package/dist/node/cli/init.js +372 -0
- package/dist/node/cli/main.js +519 -0
- package/dist/node/cli/mcp.js +114 -0
- package/dist/node/cli/open.js +20 -0
- package/dist/node/plugins/astro-B5y1Gtbf.js +31 -0
- package/dist/node/plugins/astro.js +26 -0
- package/dist/node/plugins/git-BIXLbL3f.js +92 -0
- package/dist/node/plugins/jsx-Bg4BdSph.js +7958 -0
- package/dist/node/plugins/next.js +48 -0
- package/dist/node/plugins/options-THop1K92.js +71 -0
- package/dist/node/plugins/transform-CKiAuSbk.js +1155 -0
- package/dist/node/plugins/vite-BdAYUW10.js +74 -0
- package/dist/node/plugins/vite.js +1 -0
- package/dist/node/plugins/webpack-R2U2DLlY.js +35 -0
- package/dist/node/plugins/webpack-loader.cjs +21 -0
- package/dist/node/plugins/webpack-loader.js +18 -0
- package/dist/node/plugins/webpack.js +1 -0
- package/dist/node/shared/endpoint.js +26 -0
- package/dist/node/shared/format.js +63 -0
- package/dist/node/types/astro.d.ts +11 -0
- package/dist/node/types/next.d.ts +34 -0
- package/dist/node/types/options.d.ts +59 -0
- package/dist/node/types/vite.d.ts +11 -0
- package/dist/node/types/webpack-loader.d.ts +22 -0
- package/dist/node/types/webpack.d.ts +27 -0
- package/dist/npm/THIRD_PARTY_NOTICES.txt +6 -6
- package/dist/npm/chunks/AgentSend-DxRJIYiz.js +68 -0
- package/dist/npm/chunks/Checklist-CnlfeSbc.js +282 -0
- package/dist/npm/chunks/Composer-B1bBVszY.js +725 -0
- package/dist/npm/chunks/Guest-vvNPz8h-.js +267 -0
- package/dist/npm/chunks/MarkupEditor-VCOXh9d2.js +338 -0
- package/dist/npm/chunks/Panel-F37vIL1K.js +1206 -0
- package/dist/npm/chunks/Settings-BGoZS2iV.js +231 -0
- package/dist/npm/chunks/Shortcuts-B2OMvczr.js +62 -0
- package/dist/npm/chunks/StyleEditor-CJ_d8Huf.js +46 -0
- package/dist/npm/chunks/StylePanel-yQzHHlY7.js +199 -0
- package/dist/npm/chunks/TaskFields-fmy6_HtK.js +289 -0
- package/dist/npm/chunks/ThreadCard-D51slKST.js +1113 -0
- package/dist/npm/chunks/Viewer-BOBadqmC.js +111 -0
- package/dist/npm/chunks/{agent-CqDO3JMA.js → agent-C1OQzBAm.js} +20 -21
- package/dist/npm/chunks/{anchor-OCQnjp_6.js → anchor-BsQNVkHj.js} +109 -87
- package/dist/npm/chunks/{ar-BQ9K9Oqf.js → ar-CAJ3XT8e.js} +73 -20
- package/dist/npm/chunks/card-bits-CAnzrqx3.js +53 -0
- package/dist/npm/chunks/{client-dZeNdizE.js → client-kNAo2TTG.js} +292 -285
- package/dist/npm/chunks/{colors-CAjY4jxf.js → colors-CWAn_swA.js} +1 -2
- package/dist/npm/chunks/confetti-CkBdSu19.js +49 -0
- package/dist/npm/chunks/context-B8UAzve0.js +20 -0
- package/dist/npm/chunks/context-BuMl7A07.js +48 -0
- package/dist/npm/chunks/{de-CcPi8xdC.js → de-Dl18G48t.js} +64 -19
- package/dist/npm/chunks/dialog-GO04oC3D.js +3 -0
- package/dist/npm/chunks/dpop-U48QIQd7.js +96 -0
- package/dist/npm/chunks/drafts-B0ctr1g9.js +21 -0
- package/dist/npm/chunks/{es-DXgkjDCG.js → es-Dxk79lS9.js} +64 -19
- package/dist/npm/chunks/extension-CKFpPWmi.js +62 -0
- package/dist/npm/chunks/{extension-BFkXOmX5.js → extension-E81hWyiT.js} +21 -14
- package/dist/npm/chunks/files-DyD5BZgp.js +114 -0
- package/dist/npm/chunks/{fr-IjJaUbWh.js → fr-8BebGKYD.js} +121 -76
- package/dist/npm/chunks/{hi-BhKQK2MU.js → hi-BIN6Yy_p.js} +65 -20
- package/dist/npm/chunks/{html2canvas-pro.esm-lgs6tb4C.js → html2canvas-pro.esm-B7b8p5Wr.js} +608 -528
- package/dist/npm/chunks/i18n-DOBt8e9U.js +936 -0
- package/dist/npm/chunks/identify-CN-3xzqL.js +106 -0
- package/dist/npm/chunks/{it-DKiSCkiD.js → it-Cr6EwpPQ.js} +83 -38
- package/dist/npm/chunks/{ja-BI1WagDg.js → ja-Iy3s5aur.js} +62 -17
- package/dist/npm/chunks/late-words-B2bmZceJ.js +12 -0
- package/dist/npm/chunks/live-CelVeZfP.js +85 -0
- package/dist/npm/chunks/locale-D8Q4Q2Nt.js +26 -0
- package/dist/npm/chunks/{lock-C82sC17d.js → lock-B1JLlOhz.js} +0 -1
- package/dist/npm/chunks/{nl-CJw3VUQ5.js → nl-B84WHqqe.js} +65 -20
- package/dist/npm/chunks/page-key-DepmJzC1.js +62 -0
- package/dist/npm/chunks/{pick-dDDLxCDI.js → pick-yTyqtxN0.js} +46 -46
- package/dist/npm/chunks/pkce-ChKGSW_4.js +8 -0
- package/dist/npm/chunks/placement-BF_HOUDD.js +74 -0
- package/dist/npm/chunks/privacy-BWUGlHw5.js +57 -0
- package/dist/npm/chunks/{pt-BR-CjBolC5g.js → pt-BR-DOkdlfoe.js} +64 -19
- package/dist/npm/chunks/{realtime-D22tI_AS.js → realtime-C79zF50C.js} +16 -15
- package/dist/npm/chunks/report-CrIqQZDI.js +44 -0
- package/dist/npm/chunks/{rolldown-runtime-Y_bBpyJl.js → rolldown-runtime-QGRDbDUS.js} +1 -2
- package/dist/npm/chunks/show-BgVC8gWY.js +97 -0
- package/dist/npm/chunks/signin-Dd1rb2BP.js +75 -0
- package/dist/npm/chunks/{source-BQS2_xfB.js → source-pXVve2Cx.js} +2 -3
- package/dist/npm/chunks/src-BTMy4Gyc.js +208 -0
- package/dist/npm/chunks/start-DtVlpt7p.js +1878 -0
- package/dist/npm/chunks/states-sfTbjZz8.js +3 -0
- package/dist/npm/chunks/upload-MgPYqPyE.js +42 -0
- package/dist/npm/chunks/uploads-D49mywwz.js +1146 -0
- package/dist/npm/chunks/wrap-Bl0gbnFa.js +69 -0
- package/dist/npm/chunks/{zh-CN-BrZGx2S0.js → zh-CN-Z5fQCb7G.js} +63 -18
- package/dist/npm/element.js +59 -23
- package/dist/npm/headless.js +7 -3
- package/dist/npm/index.js +3 -3
- package/dist/npm/react.js +19 -13
- package/dist/npm/svelte.js +29 -14
- package/dist/npm/types/adapters/react.d.ts +4 -1
- package/dist/npm/types/adapters/svelte.d.ts +4 -1
- package/dist/npm/types/adapters/vue.d.ts +35 -2
- package/dist/npm/types/anchor/index.d.ts +19 -0
- package/dist/npm/types/capture/privacy.d.ts +14 -0
- package/dist/npm/types/core/api.d.ts +20 -1
- package/dist/npm/types/core/auth.d.ts +47 -14
- package/dist/npm/types/core/client.d.ts +60 -4
- package/dist/npm/types/core/page-key.d.ts +42 -0
- package/dist/npm/types/core/types.d.ts +87 -4
- package/dist/npm/types/element.d.ts +17 -7
- package/dist/npm/types/headless.d.ts +2 -1
- package/dist/npm/types/index.d.ts +16 -6
- package/dist/npm/vue.js +45 -11
- package/package.json +95 -21
- package/dist/npm/chunks/AgentSend-DjFZSC0S.js +0 -64
- package/dist/npm/chunks/Checklist-BEz4IZdT.js +0 -259
- package/dist/npm/chunks/Composer-D1wbmdjF.js +0 -681
- package/dist/npm/chunks/Guest-CtyRy8Kz.js +0 -170
- package/dist/npm/chunks/MarkupEditor-CPH4yKx4.js +0 -334
- package/dist/npm/chunks/Panel-DSoUAlbQ.js +0 -863
- package/dist/npm/chunks/Settings-C_qV4n7J.js +0 -206
- package/dist/npm/chunks/Shortcuts-ChnaribX.js +0 -60
- package/dist/npm/chunks/StyleEditor-DqZd6C5o.js +0 -44
- package/dist/npm/chunks/StylePanel-DMC3riYK.js +0 -199
- package/dist/npm/chunks/TaskFields-BfjjllMx.js +0 -272
- package/dist/npm/chunks/ThreadCard-DmKAelSL.js +0 -1026
- package/dist/npm/chunks/Viewer-mw69qSI5.js +0 -110
- package/dist/npm/chunks/card-bits-C7bIk5KX.js +0 -126
- package/dist/npm/chunks/confetti-DKeKR7-6.js +0 -41
- package/dist/npm/chunks/drafts-CpQdHhcK.js +0 -51
- package/dist/npm/chunks/extension-Gvei3opb.js +0 -54
- package/dist/npm/chunks/i18n-DAJGndZ2.js +0 -904
- package/dist/npm/chunks/live-MvvBdoGd.js +0 -34
- package/dist/npm/chunks/report-DoDVi1qT.js +0 -28
- package/dist/npm/chunks/src-C_oUnL0i.js +0 -150
- package/dist/npm/chunks/start-C5-rebEU.js +0 -1783
- package/dist/npm/chunks/upload-CzPAjktW.js +0 -42
- package/dist/npm/chunks/uploads-tpLjiJdH.js +0 -541
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import { a as e, c as t, f as n, g as r, p as i, u as a, y as o } from "./i18n-DOBt8e9U.js";
|
|
2
|
+
import { r as s } from "./context-B8UAzve0.js";
|
|
3
|
+
import { C as c, k as l, s as u } from "./start-DtVlpt7p.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__ */ a("path", {
|
|
7
|
+
class: r,
|
|
8
|
+
d,
|
|
9
|
+
transform: `translate(${e} ${t}) scale(${n})`
|
|
10
|
+
}), p = {
|
|
11
|
+
caughtUp: () => /* @__PURE__ */ a(o, { children: [
|
|
12
|
+
/* @__PURE__ */ a("path", {
|
|
13
|
+
class: "ck-art-w",
|
|
14
|
+
d: "M28 50l8-20h48l8 20v18H28z"
|
|
15
|
+
}),
|
|
16
|
+
/* @__PURE__ */ a("path", {
|
|
17
|
+
class: "ck-art-line",
|
|
18
|
+
d: "M28 50h19l4 6h18l4-6h19"
|
|
19
|
+
}),
|
|
20
|
+
f(44, 4, .5, "ck-art-a"),
|
|
21
|
+
/* @__PURE__ */ a("path", {
|
|
22
|
+
class: "ck-art-tick",
|
|
23
|
+
d: "M53 19l5 5 9-10"
|
|
24
|
+
})
|
|
25
|
+
] }),
|
|
26
|
+
noFeedback: () => /* @__PURE__ */ a(o, { children: [
|
|
27
|
+
/* @__PURE__ */ a("rect", {
|
|
28
|
+
class: "ck-art-w",
|
|
29
|
+
x: "22",
|
|
30
|
+
y: "18",
|
|
31
|
+
width: "70",
|
|
32
|
+
height: "52",
|
|
33
|
+
rx: "7"
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ a("path", {
|
|
36
|
+
class: "ck-art-line",
|
|
37
|
+
d: "M22 29h70"
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ a("circle", {
|
|
40
|
+
class: "ck-art-dot",
|
|
41
|
+
cx: "29",
|
|
42
|
+
cy: "23.5",
|
|
43
|
+
r: "1.6"
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ a("circle", {
|
|
46
|
+
class: "ck-art-dot",
|
|
47
|
+
cx: "35",
|
|
48
|
+
cy: "23.5",
|
|
49
|
+
r: "1.6"
|
|
50
|
+
}),
|
|
51
|
+
/* @__PURE__ */ a("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__ */ a("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__ */ a("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__ */ a("path", {
|
|
77
|
+
class: "ck-art-tick",
|
|
78
|
+
d: "M84.5 14v9M80 18.5h9"
|
|
79
|
+
})
|
|
80
|
+
] }),
|
|
81
|
+
noMatch: () => /* @__PURE__ */ a(o, { children: [
|
|
82
|
+
/* @__PURE__ */ a("rect", {
|
|
83
|
+
class: "ck-art-m",
|
|
84
|
+
x: "22",
|
|
85
|
+
y: "22",
|
|
86
|
+
width: "52",
|
|
87
|
+
height: "6",
|
|
88
|
+
rx: "3"
|
|
89
|
+
}),
|
|
90
|
+
/* @__PURE__ */ a("rect", {
|
|
91
|
+
class: "ck-art-m",
|
|
92
|
+
x: "22",
|
|
93
|
+
y: "36",
|
|
94
|
+
width: "40",
|
|
95
|
+
height: "6",
|
|
96
|
+
rx: "3"
|
|
97
|
+
}),
|
|
98
|
+
/* @__PURE__ */ a("rect", {
|
|
99
|
+
class: "ck-art-m",
|
|
100
|
+
x: "22",
|
|
101
|
+
y: "50",
|
|
102
|
+
width: "46",
|
|
103
|
+
height: "6",
|
|
104
|
+
rx: "3"
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ a("circle", {
|
|
107
|
+
class: "ck-art-w",
|
|
108
|
+
cx: "76",
|
|
109
|
+
cy: "42",
|
|
110
|
+
r: "15"
|
|
111
|
+
}),
|
|
112
|
+
/* @__PURE__ */ a("path", {
|
|
113
|
+
class: "ck-art-line ck-art-bold",
|
|
114
|
+
d: "M87 53l11 11"
|
|
115
|
+
}),
|
|
116
|
+
/* @__PURE__ */ a("path", {
|
|
117
|
+
class: "ck-art-line",
|
|
118
|
+
d: "M70 42h12"
|
|
119
|
+
})
|
|
120
|
+
] }),
|
|
121
|
+
error: () => /* @__PURE__ */ a(o, { children: [
|
|
122
|
+
f(36, 6, .75, "ck-art-m"),
|
|
123
|
+
/* @__PURE__ */ a("path", {
|
|
124
|
+
class: "ck-art-line ck-art-bold",
|
|
125
|
+
d: "M60 18v14"
|
|
126
|
+
}),
|
|
127
|
+
/* @__PURE__ */ a("circle", {
|
|
128
|
+
class: "ck-art-ink",
|
|
129
|
+
cx: "60",
|
|
130
|
+
cy: "40",
|
|
131
|
+
r: "2.4"
|
|
132
|
+
}),
|
|
133
|
+
/* @__PURE__ */ a("path", {
|
|
134
|
+
class: "ck-art-spark",
|
|
135
|
+
d: "M24 22l6 4M22 36h7M96 22l-6 4M98 36h-7"
|
|
136
|
+
})
|
|
137
|
+
] }),
|
|
138
|
+
gone: () => /* @__PURE__ */ a(o, { children: f(36, 6, .75, "ck-art-ghost") })
|
|
139
|
+
};
|
|
140
|
+
function m({ name: e }) {
|
|
141
|
+
return /* @__PURE__ */ a("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__ */ a("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: e, editable: o, addable: u = !0, onChange: d }, f) {
|
|
159
|
+
let { client: p, reportError: m } = s(f), [h, g] = r(!1), [_, v] = r(""), [y, b] = r(!1), x = i(null), [S, C] = r(0);
|
|
160
|
+
n(() => {
|
|
161
|
+
S && x.current?.querySelector(".ck-checklist-add input, .ck-extra-add button")?.focus({ preventScroll: !0 });
|
|
162
|
+
}, [S]);
|
|
163
|
+
let w = e.checklist ?? [], T = w.filter((e) => e.done).length, E = i(e);
|
|
164
|
+
E.current = e;
|
|
165
|
+
let D = (e) => d(E.current = {
|
|
166
|
+
...E.current,
|
|
167
|
+
checklist: e(E.current.checklist ?? [])
|
|
168
|
+
}), O = () => {
|
|
169
|
+
let t = _.trim();
|
|
170
|
+
t && !y && (b(!0), v(""), p.addChecklistItem(e.id, t).then((e) => D((t) => [...t, e]), (e) => {
|
|
171
|
+
v((e) => e ? `${t} ${e}` : t), m(e);
|
|
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 && !(o && u) ? null : /* @__PURE__ */ a("div", {
|
|
192
|
+
class: "ck-extra",
|
|
193
|
+
ref: x,
|
|
194
|
+
children: [
|
|
195
|
+
w.length ? /* @__PURE__ */ a("div", {
|
|
196
|
+
class: "ck-checklist",
|
|
197
|
+
role: "group",
|
|
198
|
+
"aria-label": t("checklist"),
|
|
199
|
+
children: [/* @__PURE__ */ a("div", {
|
|
200
|
+
class: "ck-checklist-head",
|
|
201
|
+
children: [/* @__PURE__ */ a("span", {
|
|
202
|
+
class: "ck-muted",
|
|
203
|
+
children: t("checklistProgress", {
|
|
204
|
+
n: T,
|
|
205
|
+
total: w.length
|
|
206
|
+
})
|
|
207
|
+
}), /* @__PURE__ */ a("span", {
|
|
208
|
+
class: "ck-checklist-bar",
|
|
209
|
+
"aria-hidden": "true",
|
|
210
|
+
children: /* @__PURE__ */ a("span", { style: { scale: `${T / w.length} 1` } })
|
|
211
|
+
})]
|
|
212
|
+
}), /* @__PURE__ */ a("ul", { children: w.map((e) => /* @__PURE__ */ a("li", {
|
|
213
|
+
"data-done": e.done || void 0,
|
|
214
|
+
children: [/* @__PURE__ */ a("label", {
|
|
215
|
+
class: "ck-check",
|
|
216
|
+
children: [/* @__PURE__ */ a("input", {
|
|
217
|
+
type: "checkbox",
|
|
218
|
+
checked: e.done,
|
|
219
|
+
disabled: !o,
|
|
220
|
+
onChange: () => k(e)
|
|
221
|
+
}), /* @__PURE__ */ a("bdi", { children: e.body })]
|
|
222
|
+
}), o ? /* @__PURE__ */ a("button", {
|
|
223
|
+
class: "ck-ghost ck-ghost-sm",
|
|
224
|
+
"aria-label": t("removeItem", { item: e.body }),
|
|
225
|
+
onClick: () => A(e),
|
|
226
|
+
children: /* @__PURE__ */ a(c, {
|
|
227
|
+
name: "close",
|
|
228
|
+
size: 12
|
|
229
|
+
})
|
|
230
|
+
}) : null]
|
|
231
|
+
})) })]
|
|
232
|
+
}) : null,
|
|
233
|
+
o && (h || w.length) ? /* @__PURE__ */ a("div", {
|
|
234
|
+
class: "ck-checklist-add",
|
|
235
|
+
children: [/* @__PURE__ */ a("input", {
|
|
236
|
+
class: "ck-input",
|
|
237
|
+
maxLength: 300,
|
|
238
|
+
placeholder: t("checklistAdd"),
|
|
239
|
+
"aria-label": t("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__ */ a("button", {
|
|
249
|
+
class: "ck-ghost",
|
|
250
|
+
"aria-label": t("checklistAdd"),
|
|
251
|
+
title: t("checklistAdd"),
|
|
252
|
+
"aria-disabled": y || void 0,
|
|
253
|
+
onClick: () => !y && O(),
|
|
254
|
+
children: /* @__PURE__ */ a("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__ */ a("path", { d: "M12 5v14M5 12h14" })
|
|
264
|
+
})
|
|
265
|
+
}) : null]
|
|
266
|
+
}) : null,
|
|
267
|
+
o && u && !w.length && !h ? /* @__PURE__ */ a("div", {
|
|
268
|
+
class: "ck-extra-add",
|
|
269
|
+
children: /* @__PURE__ */ a("button", {
|
|
270
|
+
class: "ck-ghost ck-ghost-sm",
|
|
271
|
+
onClick: () => g(!0),
|
|
272
|
+
children: ["+ ", t("addChecklist")]
|
|
273
|
+
})
|
|
274
|
+
}) : null
|
|
275
|
+
]
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
function g(t) {
|
|
279
|
+
let n = t.checklist ?? [];
|
|
280
|
+
return n.length ? e("checklistShort", n.length, { done: n.filter((e) => e.done).length }) : null;
|
|
281
|
+
}
|
|
282
|
+
export { g as n, m as r, h as t };
|