@commentkit/comment-kit 1.0.0-beta.2 → 1.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.
- package/CHANGELOG.md +27 -0
- package/README.md +2 -4
- package/dist/npm/chunks/{Guest-CKoV6pEK.js → Guest-CdfnuD8T.js} +46 -46
- package/dist/npm/chunks/{MarkupEditor-DAo4qppg.js → MarkupEditor-Clb17Tse.js} +2 -2
- package/dist/npm/chunks/Panel-CgvEbZXr.js +438 -0
- package/dist/npm/chunks/{Shortcuts-CHMcrjAM.js → Shortcuts-3AOERWBh.js} +2 -2
- package/dist/npm/chunks/ThreadCard-DuGKe-gE.js +817 -0
- package/dist/npm/chunks/{ar-D3SPpN1T.js → ar-BVQ4ToG2.js} +66 -39
- package/dist/npm/chunks/art-Bn9_ANNS.js +155 -0
- package/dist/npm/chunks/{client-D1NizpDK.js → client-CS5oL_LQ.js} +14 -21
- package/dist/npm/chunks/{de-C8eC6c6f.js → de-CamSq76K.js} +53 -29
- package/dist/npm/chunks/{es-Bczf42tm.js → es-BBIlcnsU.js} +52 -28
- package/dist/npm/chunks/{extension--it1LAj-.js → extension-CLm_T7Vj.js} +1 -1
- package/dist/npm/chunks/{extension-XfuRGu2o.js → extension-DWHHer7j.js} +1 -1
- package/dist/npm/chunks/{format-Bw_tNOh9.js → format-CP2xZaec.js} +2 -2
- package/dist/npm/chunks/{fr-BaQw-v2e.js → fr-BXsff0Zz.js} +64 -40
- package/dist/npm/chunks/{hi-BamV-yXv.js → hi-y-APBuxh.js} +60 -36
- package/dist/npm/chunks/{it-DC14_EjN.js → it-C5MH_Ktv.js} +53 -29
- package/dist/npm/chunks/{ja-B1mmTN7Y.js → ja-s1JJld2J.js} +57 -33
- package/dist/npm/chunks/live-CkVrNM1-.js +34 -0
- package/dist/npm/chunks/mount-VmnAiANB.js +1507 -0
- package/dist/npm/chunks/{nl-BfhqUsmX.js → nl-CFzRMEfl.js} +62 -38
- package/dist/npm/chunks/{pt-BR-CEPu4W5U.js → pt-BR-DE_r-5UM.js} +53 -29
- package/dist/npm/chunks/{report-Dh4fxd4J.js → report-DoDVi1qT.js} +5 -4
- package/dist/npm/chunks/{src-DujplxfI.js → src-DG8ehgE9.js} +96 -64
- package/dist/npm/chunks/{zh-CN-kgqjYwHQ.js → zh-CN--gibO2l7.js} +53 -29
- package/dist/npm/element.js +2 -2
- package/dist/npm/headless.js +1 -1
- package/dist/npm/index.js +2 -2
- package/dist/npm/react.js +1 -1
- package/dist/npm/svelte.js +1 -1
- package/dist/npm/types/anchor/index.d.ts +0 -1
- package/dist/npm/types/core/auth.d.ts +0 -2
- package/dist/npm/types/core/client.d.ts +7 -6
- package/dist/npm/types/core/types.d.ts +19 -0
- package/dist/npm/vue.js +1 -1
- package/package.json +2 -3
- package/dist/npm/chunks/Panel-BRBDHlGg.js +0 -399
- package/dist/npm/chunks/ThreadCard-D8FzIxbs.js +0 -570
- package/dist/npm/chunks/mount-5fFig0k6.js +0 -1447
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## 1.0.1 (2026-10-22)
|
|
6
|
+
|
|
7
|
+
- **Nothing important disappears on a timer:** an error or an Undo stays until you dismiss it or click elsewhere, and every toast is announced to screen readers. While a conversation is open, toasts show at the top so they never cover the reply box.
|
|
8
|
+
- **Typing on a phone no longer zooms the page** (text fields are 16 px on touch screens).
|
|
9
|
+
- **Finer details:** press feedback at exactly 0.96, hover styles only where a mouse can hover, scrolling stays inside cards and menus, images get a neutral outline, a visible focus ring in high-contrast mode, and the toolbar and keyboard never cover a card on phones.
|
|
10
|
+
- **Plainer errors** in every language: "That didn't work. Check your connection and try again."
|
|
11
|
+
|
|
12
|
+
## 1.0.0 (2026-10-22)
|
|
13
|
+
|
|
14
|
+
First stable release. Installs with `npm install @commentkit/comment-kit`, no `@beta` needed.
|
|
15
|
+
|
|
16
|
+
- **Pins are the CommentKit mark:** a speech drop whose tip sits exactly on the spot, numbered in its head, coloured by status.
|
|
17
|
+
- **Comment mode glows:** a soft accent frame round the window shows you are commenting, not using the page.
|
|
18
|
+
- **Cleaner, more compact design:** one spacing and type scale, one "selected" style, one focus ring, muted disabled buttons, text boxes that grow with your text, a date chip instead of the browser's date field, and an inbox that never sits behind the launcher.
|
|
19
|
+
- **Illustrated empty states** (all caught up, nothing on this page, nothing matches with Clear filters, couldn't load, gone) and skeletons shaped like the content while it loads.
|
|
20
|
+
- **Errors stay where they happened:** a conversation that cannot load explains why in the card, with Close or Try again.
|
|
21
|
+
- **Translations reviewed** in all 10 languages, with plainer English (versions, not branches).
|
|
22
|
+
- **Security:** reviewer text in agent output stays inside the untrusted-content fence in every spelling; crash reports carry a one-time load proof for the CDN canary.
|
|
23
|
+
|
|
24
|
+
## 1.0.0-beta.3 (2026-10-20)
|
|
25
|
+
|
|
26
|
+
- **Security:** the sign-in code only ever comes from the sign-in window's message; the widget never asks the server for it.
|
|
27
|
+
- **Task fields in the widget:** team members can set priority, assignee, due date and labels from a conversation. Reviewers see what is set.
|
|
28
|
+
- **Calmer live updates:** a change refetches only what is on this page or open, after a short random delay, and never your own change twice.
|
|
29
|
+
- **Plain, translated errors** for known problems; a failed screenshot upload or reply says exactly what happened and keeps your text.
|
|
30
|
+
- **Agent output:** every reviewer-written field stays inside the untrusted-content fence.
|
|
31
|
+
|
|
5
32
|
## 1.0.0-beta.2 (2026-10-20)
|
|
6
33
|
|
|
7
34
|
- **Refreshed look.** One set of design tokens (radius, elevation, motion); surfaces get a hairline ring and soft layered shadows so they read on any site; the launcher is frosted glass; the inbox tabs are a segmented control; status pills are tinted per status; buttons, inputs, chips, menus, toasts and pins have hover, press and focus states; cards and menus open with a short pop (sheets slide up on phones), and everything is still off under reduced motion. Same layout, sizes and touch targets.
|
package/README.md
CHANGED
|
@@ -21,11 +21,9 @@ Paste before `</body>`:
|
|
|
21
21
|
### npm
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
npm install @commentkit/comment-kit
|
|
24
|
+
npm install @commentkit/comment-kit
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
While 1.0 is in beta, install with `@beta` (plain `npm install` and `^1` start working with 1.0.0).
|
|
28
|
-
|
|
29
27
|
```ts
|
|
30
28
|
import { init } from "@commentkit/comment-kit";
|
|
31
29
|
|
|
@@ -247,7 +245,7 @@ To pin, use the exact version and its Subresource Integrity hash, so the browser
|
|
|
247
245
|
|
|
248
246
|
The loader then loads the rest of the widget from the same pinned folder, which is immutable. A pinned version gets no fixes: move to a newer one on purpose, and check its changelog first.
|
|
249
247
|
|
|
250
|
-
**npm**:
|
|
248
|
+
**npm**: `npm install @commentkit/comment-kit@^1` follows 1.x the same way as `/cdn/v1`; use an exact version (`--save-exact`) and your lockfile to pin. Release candidates for a future major are published under the `next` tag and are never installed by `^1`. The full rules are in [docs/VERSIONING.md](docs/VERSIONING.md).
|
|
251
249
|
|
|
252
250
|
**Support window**: each major version gets security fixes for 24 months after the next major version is released, and bug fixes until then. The end date of each major is announced in the [changelog](CHANGELOG.md) when its successor ships. Security fixes land in the latest minor of every supported major, so the moving channel and `^` ranges receive them automatically; pinned versions do not. See [SECURITY.md](SECURITY.md) to report a vulnerability.
|
|
253
251
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as t } from "./client-
|
|
3
|
-
import { d as n, f as r, h as i, n as a, p as o } from "./format-
|
|
4
|
-
import {
|
|
1
|
+
import { o as e } from "./src-DG8ehgE9.js";
|
|
2
|
+
import { c as t } from "./client-CS5oL_LQ.js";
|
|
3
|
+
import { d as n, f as r, h as i, n as a, p as o } from "./format-CP2xZaec.js";
|
|
4
|
+
import { o as s, p as c } from "./mount-VmnAiANB.js";
|
|
5
5
|
//#region src/ui/Guest.tsx
|
|
6
|
-
async function
|
|
6
|
+
async function l(n, r) {
|
|
7
7
|
try {
|
|
8
8
|
let e = await n.api.request("/guest/start", {
|
|
9
9
|
method: "POST",
|
|
@@ -22,40 +22,40 @@ async function c(n, r) {
|
|
|
22
22
|
}), "started";
|
|
23
23
|
} catch (n) {
|
|
24
24
|
if (n instanceof t && n.code === "origin_not_allowed") return "popup";
|
|
25
|
-
throw n instanceof t && n.errors?.share ? new t(
|
|
25
|
+
throw n instanceof t && (n.code === "share_expired" || n.status === 410 || n.errors?.share) ? new t(410, "share_expired", e("shareExpired")) : n;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
let [
|
|
30
|
-
r(() =>
|
|
31
|
-
let
|
|
32
|
-
if (/^\d{6}$/.test(
|
|
33
|
-
|
|
28
|
+
function u({ client: l, email: u, onDone: f, onDifferentEmail: p, onClose: m }) {
|
|
29
|
+
let [h, g] = i(""), [_, v] = i(!1), [y, b] = i(null), [x, S] = i(null), C = o(null);
|
|
30
|
+
r(() => C.current?.focus({ preventScroll: !0 }), []);
|
|
31
|
+
let w = async () => {
|
|
32
|
+
if (/^\d{6}$/.test(h) && !_) {
|
|
33
|
+
v(!0), b(null);
|
|
34
34
|
try {
|
|
35
|
-
let e = await
|
|
35
|
+
let e = await l.api.request("/guest/verify", {
|
|
36
36
|
method: "POST",
|
|
37
|
-
body: { code:
|
|
37
|
+
body: { code: h }
|
|
38
38
|
});
|
|
39
|
-
|
|
39
|
+
l.auth.adopt(e), await l.loadSession().catch(() => null), f(e.published_thread_ids ?? []);
|
|
40
40
|
} catch (n) {
|
|
41
|
-
if ((n instanceof t ? n.status : 0) === 422) return
|
|
41
|
+
if ((n instanceof t ? n.status : 0) === 422) return b({
|
|
42
42
|
text: e("verifyWrong"),
|
|
43
43
|
tone: "warning"
|
|
44
44
|
});
|
|
45
|
-
let r =
|
|
46
|
-
r && (
|
|
47
|
-
text: r ? e(r === "link" ? "verifyLinkExpired" : r === "removed" ? "verifyRemoved" : "verifyExpired") : n
|
|
45
|
+
let r = d(n);
|
|
46
|
+
r && (l.auth.setPending(null), S(r === "expired" ? "again" : "stop")), b({
|
|
47
|
+
text: r ? e(r === "link" ? "verifyLinkExpired" : r === "removed" ? "verifyRemoved" : "verifyExpired") : c(n),
|
|
48
48
|
tone: "warning"
|
|
49
49
|
});
|
|
50
50
|
} finally {
|
|
51
|
-
|
|
51
|
+
v(!1);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
},
|
|
54
|
+
}, T = async () => {
|
|
55
55
|
try {
|
|
56
|
-
await
|
|
56
|
+
await l.api.request("/guest/resend", { method: "POST" }), b({ text: e("verifyResent") });
|
|
57
57
|
} catch (n) {
|
|
58
|
-
|
|
58
|
+
b({
|
|
59
59
|
text: n instanceof t && n.status === 429 ? e("verifyWait") : e("errorGeneric"),
|
|
60
60
|
tone: "warning"
|
|
61
61
|
});
|
|
@@ -70,7 +70,7 @@ function l({ client: c, email: l, onDone: d, onDifferentEmail: f, onClose: p })
|
|
|
70
70
|
role: "dialog",
|
|
71
71
|
"aria-labelledby": "ck-verify-title",
|
|
72
72
|
"data-commentkit-ui": !0,
|
|
73
|
-
onKeyDown: (e) => e.key === "Escape" &&
|
|
73
|
+
onKeyDown: (e) => e.key === "Escape" && m(),
|
|
74
74
|
children: [
|
|
75
75
|
/* @__PURE__ */ n("div", {
|
|
76
76
|
class: "ck-card-head",
|
|
@@ -81,7 +81,7 @@ function l({ client: c, email: l, onDone: d, onDifferentEmail: f, onClose: p })
|
|
|
81
81
|
}), /* @__PURE__ */ n("button", {
|
|
82
82
|
class: "ck-ghost",
|
|
83
83
|
"aria-label": e("close"),
|
|
84
|
-
onClick:
|
|
84
|
+
onClick: m,
|
|
85
85
|
children: /* @__PURE__ */ n(a, { name: "close" })
|
|
86
86
|
})]
|
|
87
87
|
}),
|
|
@@ -90,40 +90,40 @@ function l({ client: c, email: l, onDone: d, onDifferentEmail: f, onClose: p })
|
|
|
90
90
|
children: [
|
|
91
91
|
/* @__PURE__ */ n("p", {
|
|
92
92
|
class: "ck-verify-text",
|
|
93
|
-
children: e("verifyBody", { email:
|
|
93
|
+
children: e("verifyBody", { email: u })
|
|
94
94
|
}),
|
|
95
95
|
/* @__PURE__ */ n("label", {
|
|
96
96
|
class: "ck-field",
|
|
97
97
|
children: [/* @__PURE__ */ n("span", { children: e("verifyCode") }), /* @__PURE__ */ n("input", {
|
|
98
|
-
ref:
|
|
98
|
+
ref: C,
|
|
99
99
|
class: "ck-input ck-code",
|
|
100
100
|
inputMode: "numeric",
|
|
101
101
|
autoComplete: "one-time-code",
|
|
102
102
|
pattern: "[0-9]*",
|
|
103
103
|
maxLength: 6,
|
|
104
|
-
value:
|
|
105
|
-
onInput: (e) =>
|
|
104
|
+
value: h,
|
|
105
|
+
onInput: (e) => g(e.target.value.replace(/\D/g, "").slice(0, 6)),
|
|
106
106
|
onKeyDown: (e) => {
|
|
107
|
-
e.stopPropagation(), e.key === "Enter" &&
|
|
107
|
+
e.stopPropagation(), e.key === "Enter" && w(), e.key === "Escape" && m();
|
|
108
108
|
}
|
|
109
109
|
})]
|
|
110
110
|
}),
|
|
111
|
-
|
|
111
|
+
y ? /* @__PURE__ */ n("div", {
|
|
112
112
|
class: "ck-note",
|
|
113
|
-
role:
|
|
114
|
-
"data-tone":
|
|
115
|
-
children:
|
|
113
|
+
role: y.tone ? "alert" : "status",
|
|
114
|
+
"data-tone": y.tone,
|
|
115
|
+
children: y.text
|
|
116
116
|
}) : null,
|
|
117
|
-
|
|
117
|
+
x ? null : /* @__PURE__ */ n("div", {
|
|
118
118
|
class: "ck-actions",
|
|
119
119
|
children: [/* @__PURE__ */ n("button", {
|
|
120
120
|
class: "ck-chip",
|
|
121
|
-
onClick: () => void
|
|
121
|
+
onClick: () => void T(),
|
|
122
122
|
children: e("verifyResend")
|
|
123
123
|
}), /* @__PURE__ */ n("button", {
|
|
124
124
|
class: "ck-chip",
|
|
125
125
|
onClick: () => {
|
|
126
|
-
|
|
126
|
+
l.auth.setPending(null), p();
|
|
127
127
|
},
|
|
128
128
|
children: e("verifyDifferent")
|
|
129
129
|
})]
|
|
@@ -132,26 +132,26 @@ function l({ client: c, email: l, onDone: d, onDifferentEmail: f, onClose: p })
|
|
|
132
132
|
}),
|
|
133
133
|
/* @__PURE__ */ n("div", {
|
|
134
134
|
class: "ck-card-foot",
|
|
135
|
-
children: [/* @__PURE__ */ n("span", { class: "ck-spacer" }),
|
|
135
|
+
children: [/* @__PURE__ */ n("span", { class: "ck-spacer" }), x === "again" ? /* @__PURE__ */ n("button", {
|
|
136
136
|
class: "ck-btn ck-primary",
|
|
137
|
-
onClick:
|
|
137
|
+
onClick: p,
|
|
138
138
|
children: e("writeAgain")
|
|
139
|
-
}) :
|
|
139
|
+
}) : x === "stop" ? /* @__PURE__ */ n("button", {
|
|
140
140
|
class: "ck-btn",
|
|
141
|
-
onClick:
|
|
141
|
+
onClick: m,
|
|
142
142
|
children: e("close")
|
|
143
143
|
}) : /* @__PURE__ */ n("button", {
|
|
144
144
|
class: "ck-btn ck-primary",
|
|
145
|
-
disabled:
|
|
146
|
-
onClick: () => void
|
|
147
|
-
children: e(
|
|
145
|
+
disabled: _ || h.length !== 6,
|
|
146
|
+
onClick: () => void w(),
|
|
147
|
+
children: e(_ ? "sending" : "verifyPublish")
|
|
148
148
|
})]
|
|
149
149
|
})
|
|
150
150
|
]
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function d(e) {
|
|
154
154
|
return e instanceof t ? e.code === "share_expired" || e.status === 410 ? "link" : e.code === "guest_removed" ? "removed" : e.status === 403 ? /\blink\b/i.test(e.message) ? "link" : "removed" : e.status === 409 || e.status === 401 ? "expired" : null : null;
|
|
155
155
|
}
|
|
156
156
|
//#endregion
|
|
157
|
-
export {
|
|
157
|
+
export { u as GuestVerify, l as startGuest };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as t, d as n, f as r, h as i, p as a } from "./format-
|
|
1
|
+
import { o as e } from "./src-DG8ehgE9.js";
|
|
2
|
+
import { a as t, d as n, f as r, h as i, p as a } from "./format-CP2xZaec.js";
|
|
3
3
|
//#region src/ui/MarkupEditor.tsx
|
|
4
4
|
var o = [
|
|
5
5
|
"#ff3b30",
|