@commentkit/comment-kit 2.0.1 → 2.1.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 +33 -0
- package/README.md +14 -6
- package/dist/node/cli/api.js +61 -15
- package/dist/node/cli/credentials.js +8 -0
- package/dist/node/cli/doctor.js +68 -5
- package/dist/node/cli/main.js +275 -52
- package/dist/node/cli/website.js +140 -0
- package/dist/node/types/next.d.ts +4 -4
- package/dist/npm/THIRD_PARTY_NOTICES.txt +47 -0
- package/dist/npm/chunks/{AgentSend-DOy3jhyF.js → AgentSend-pA7Ufvye.js} +3 -3
- package/dist/npm/chunks/Checklist-Cn9skOYK.js +269 -0
- package/dist/npm/chunks/Composer-D7H-pzGa.js +734 -0
- package/dist/npm/chunks/DatePicker-Nta5a1xD.js +161 -0
- package/dist/npm/chunks/{Guest-7hcN765o.js → Guest-Bi7hlzhs.js} +18 -17
- package/dist/npm/chunks/{MarkupEditor-6bJGpWGO.js → MarkupEditor-WU3USeTk.js} +2 -2
- package/dist/npm/chunks/{Panel-ChPUB68C.js → Panel-DhAzbUbC.js} +308 -309
- package/dist/npm/chunks/{Settings-CB5eEKnf.js → Settings-BmKqPX40.js} +34 -33
- package/dist/npm/chunks/{Shortcuts-eAyjJ89P.js → Shortcuts-Bl-c0Sez.js} +25 -23
- package/dist/npm/chunks/SignInFirst-CmGvSYkQ.js +35 -0
- package/dist/npm/chunks/{StyleEditor-CZTdAA5c.js → StyleEditor-D6fUnlwq.js} +4 -4
- package/dist/npm/chunks/{StylePanel-B4pHQUL9.js → StylePanel-C-Gikxt1.js} +3 -3
- package/dist/npm/chunks/TaskFields-CaKi523b.js +617 -0
- package/dist/npm/chunks/ThreadCard-d_3pUB5V.js +1142 -0
- package/dist/npm/chunks/{Viewer-DY6zb90M.js → Viewer-BULQsi9-.js} +9 -8
- package/dist/npm/chunks/{agent-MTQHr9ei.js → agent-DHdhIJ3s.js} +1 -1
- package/dist/npm/chunks/{ar-L5cQ-NPe.js → ar-B5UszrQp.js} +51 -12
- package/dist/npm/chunks/{card-bits-CTdrkYn8.js → card-bits-cV8GdFWX.js} +12 -10
- package/dist/npm/chunks/{client-7eVxvg5j.js → client-Cv8ddtuM.js} +13 -11
- package/dist/npm/chunks/{confetti-BIs5s14P.js → confetti-B9zlyILU.js} +1 -1
- package/dist/npm/chunks/{context-Cf6khm7A.js → context-CsHnabaA.js} +1 -1
- package/dist/npm/chunks/{de-D0C-v6tP.js → de-BE0Aaq8u.js} +51 -12
- package/dist/npm/chunks/{dpop-0A76OPa9.js → dpop-CwW9ifkq.js} +1 -1
- package/dist/npm/chunks/entrance-Bn_5M9uO.js +90 -0
- package/dist/npm/chunks/{es-Bw4Dj9tN.js → es-BQviao4d.js} +51 -12
- package/dist/npm/chunks/{extension-SmoH5AA4.js → extension-CnQTDC1j.js} +2 -2
- package/dist/npm/chunks/{extension-DFVOvciD.js → extension-DXhz81XD.js} +1 -1
- package/dist/npm/chunks/{files-4lV9YQIX.js → files-DLEr_wmh.js} +2 -2
- package/dist/npm/chunks/{fr-TkuQaIAa.js → fr-C5gu6A06.js} +51 -12
- package/dist/npm/chunks/{hi-DXSH2U8d.js → hi-DXfQ5EvY.js} +51 -12
- package/dist/npm/chunks/{i18n-aVSu9TcJ.js → i18n-Mgs9VOuk.js} +17 -21
- package/dist/npm/chunks/icons-_C6ZWmBY.js +141 -0
- package/dist/npm/chunks/{identify-BGYh2dVo.js → identify-BnQGJOa0.js} +1 -1
- package/dist/npm/chunks/{it-CiWA_bch.js → it-BPHt13FV.js} +51 -12
- package/dist/npm/chunks/{ja-C-QmR3yz.js → ja-BkCqyKR0.js} +50 -11
- package/dist/npm/chunks/late-words-D4Oo_yhJ.js +57 -0
- package/dist/npm/chunks/{live-BExWHzQ7.js → live-DXcxj_Af.js} +28 -22
- package/dist/npm/chunks/{nl-CEmZRqjX.js → nl-DZxdLLMU.js} +51 -12
- package/dist/npm/chunks/{page-key-HSY3Lze5.js → page-key-UqAozdZi.js} +1 -1
- package/dist/npm/chunks/{pick-B3sR7jtS.js → pick-C20RVUas.js} +1 -1
- package/dist/npm/chunks/{pkce-CfZhiNBi.js → pkce-BPvWoBrr.js} +1 -1
- package/dist/npm/chunks/{pt-BR-b-a8sxO8.js → pt-BR-lA9mJ05F.js} +51 -12
- package/dist/npm/chunks/{report-DaVuoRYS.js → report-BjUgUNnT.js} +1 -1
- package/dist/npm/chunks/{show-BoN8AC-F.js → show-BinoJyED.js} +7 -7
- package/dist/npm/chunks/signin-C2jjsxz9.js +101 -0
- package/dist/npm/chunks/{source-mk3rGBBQ.js → source-NuflODx3.js} +1 -1
- package/dist/npm/chunks/{src-C8rZFyL_.js → src-9o2Ocq8d.js} +21 -15
- package/dist/npm/chunks/start-Cbx6rMrr.js +1904 -0
- package/dist/npm/chunks/states-DLMCvwes.js +3 -0
- package/dist/npm/chunks/{upload-B2mkgMeJ.js → upload-C4NpM-jE.js} +1 -1
- package/dist/npm/chunks/uploads-CY4bDbaI.js +1236 -0
- package/dist/npm/chunks/{wrap-DW6EFbVQ.js → wrap-D-xTKIzj.js} +20 -20
- package/dist/npm/chunks/{zh-CN-JTscW8u8.js → zh-CN-yqaDHwBx.js} +51 -12
- package/dist/npm/element.js +7 -1
- package/dist/npm/headless.js +2 -2
- 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/adapters/vue.d.ts +12 -0
- package/dist/npm/types/core/auth.d.ts +1 -0
- package/dist/npm/types/core/client.d.ts +5 -1
- package/dist/npm/types/core/types.d.ts +17 -2
- package/dist/npm/vue.js +5 -1
- package/package.json +2 -1
- package/dist/npm/chunks/Checklist-CW_SwMpS.js +0 -282
- package/dist/npm/chunks/Composer-Bveq5QrK.js +0 -727
- package/dist/npm/chunks/TaskFields-C8BX0Sgg.js +0 -289
- package/dist/npm/chunks/ThreadCard-B1EsX3PR.js +0 -1160
- package/dist/npm/chunks/late-words-80_VWt8S.js +0 -14
- package/dist/npm/chunks/signin-BOWr_WCo.js +0 -75
- package/dist/npm/chunks/start-CV4j78_q.js +0 -1894
- package/dist/npm/chunks/states-b9Bv3Ci7.js +0 -3
- package/dist/npm/chunks/uploads-8AxyRq7g.js +0 -1147
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./rolldown-runtime-QGRDbDUS.js";
|
|
2
|
-
// src/ui/late-words.ts
|
|
3
|
-
var t = /* @__PURE__ */ e({ LATE: () => n }), n = {
|
|
4
|
-
notLive: "Choose a plan to use comments on your live website.",
|
|
5
|
-
fileImagesOnly: "This website accepts images only.",
|
|
6
|
-
tooBig: "That’s too big to send. Try a shorter comment or a smaller file.",
|
|
7
|
-
finishTitle: "Send your comment?",
|
|
8
|
-
finishBody: "You opened the link from your code email. Press the button to publish the comment you wrote on this website.",
|
|
9
|
-
finishSend: "Send my comment",
|
|
10
|
-
finishExpired: "This link no longer works. Links in the code email work once, for 10 minutes. If your comment is still waiting, enter the code on the page where you wrote it.",
|
|
11
|
-
closeCardHint: "Press × to close, or double-click outside.",
|
|
12
|
-
closeCardHintTouch: "Tap × to close, or double-tap outside."
|
|
13
|
-
};
|
|
14
|
-
export { t as n, n as t };
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { b as e } from "./client-7eVxvg5j.js";
|
|
2
|
-
import { r as t } from "./page-key-HSY3Lze5.js";
|
|
3
|
-
import { t as n } from "./pkce-CfZhiNBi.js";
|
|
4
|
-
import { t as r } from "./locale-D8Q4Q2Nt.js";
|
|
5
|
-
// src/core/signin.ts
|
|
6
|
-
function i(e = navigator.userAgent) {
|
|
7
|
-
return /FBAN|FBAV|Instagram|Line\/|WhatsApp|Snapchat|LinkedInApp|Slack|Twitter|MicroMessenger|; wv\)|GSA\//i.test(e);
|
|
8
|
-
}
|
|
9
|
-
var a = "popup=yes,width=460,height=680,left=120,top=80", o = 500, s = 6e5, c = (e) => `commentkit:pkce:${e.projectKey}`;
|
|
10
|
-
function l() {
|
|
11
|
-
return (document.querySelector("[data-commentkit-host]")?.shadowRoot?.querySelector(".ck-root"))?.getAttribute("lang") || r();
|
|
12
|
-
}
|
|
13
|
-
async function u(t, r) {
|
|
14
|
-
let o = e(48), s = e(24), c = await n(o), u = r.mode ?? "auto", d = u === "redirect" || u === "auto" && i(), h = t.signInLink, g = l(), _ = f(t, c, s, r.share ?? null, d ? location.href : null, h, g);
|
|
15
|
-
if (d) return t.signInLink = null, p(t, _, o, s);
|
|
16
|
-
let v = window.open(_.toString(), "commentkit-signin", a);
|
|
17
|
-
if (!v) return u === "auto" ? (t.signInLink = null, p(t, f(t, c, s, r.share ?? null, location.href, h, g), o, s)) : "popup_blocked";
|
|
18
|
-
t.signInLink = null;
|
|
19
|
-
let y = await m(t, v, s);
|
|
20
|
-
return y ? await t.exchange(y, o) ? "signed_in" : "failed" : "cancelled";
|
|
21
|
-
}
|
|
22
|
-
async function d(e) {
|
|
23
|
-
let n = new URL(location.href), r = n.searchParams.get("ck_code"), i = n.searchParams.get("ck_state");
|
|
24
|
-
if (!r || !i) return !1;
|
|
25
|
-
history.replaceState(history.state, "", t(location.href, /^ck_(code|state)$/));
|
|
26
|
-
let a = null;
|
|
27
|
-
try {
|
|
28
|
-
a = JSON.parse(sessionStorage.getItem(c(e)) ?? "null"), sessionStorage.removeItem(c(e));
|
|
29
|
-
} catch {
|
|
30
|
-
return !1;
|
|
31
|
-
}
|
|
32
|
-
return !a?.verifier || a.state !== i ? !1 : e.exchange(r, a.verifier);
|
|
33
|
-
}
|
|
34
|
-
function f(e, t, n, r, i, a = null, o = l()) {
|
|
35
|
-
let s = new URL(e.authorize ?? "/widget/connect", e.endpoint), c = a ? new URL("guest", s) : s;
|
|
36
|
-
return c.search = new URLSearchParams({
|
|
37
|
-
key: e.projectKey,
|
|
38
|
-
origin: e.origin,
|
|
39
|
-
code_challenge: t,
|
|
40
|
-
code_challenge_method: "S256",
|
|
41
|
-
state: n,
|
|
42
|
-
locale: o,
|
|
43
|
-
...r ? { share: r } : {},
|
|
44
|
-
...i ? { return_to: i } : {}
|
|
45
|
-
}).toString(), a && (c.hash = `signin=${encodeURIComponent(a)}`), c;
|
|
46
|
-
}
|
|
47
|
-
function p(e, t, n, r) {
|
|
48
|
-
try {
|
|
49
|
-
sessionStorage.setItem(c(e), JSON.stringify({
|
|
50
|
-
verifier: n,
|
|
51
|
-
state: r
|
|
52
|
-
}));
|
|
53
|
-
} catch {
|
|
54
|
-
return "failed";
|
|
55
|
-
}
|
|
56
|
-
return location.assign(t.toString()), "redirecting";
|
|
57
|
-
}
|
|
58
|
-
function m(e, t, n) {
|
|
59
|
-
let r = [new URL(e.endpoint).origin, new URL(e.authorize ?? e.endpoint).origin];
|
|
60
|
-
return new Promise((e) => {
|
|
61
|
-
let i = !1, a = Date.now(), c = (t) => {
|
|
62
|
-
i || (i = !0, window.removeEventListener("message", l), clearInterval(d), e(t));
|
|
63
|
-
}, l = (e) => {
|
|
64
|
-
if (e.source !== t || !r.includes(e.origin)) return;
|
|
65
|
-
let i = e.data;
|
|
66
|
-
i?.type === "commentkit:auth" && i.state === n && typeof i.code == "string" && c(i.code);
|
|
67
|
-
};
|
|
68
|
-
window.addEventListener("message", l);
|
|
69
|
-
let u = null, d = setInterval(() => {
|
|
70
|
-
if (Date.now() - a > s) return c(null);
|
|
71
|
-
t.closed && (u ?? (u = Date.now())), u !== null && Date.now() - u > 1e3 && c(null);
|
|
72
|
-
}, o);
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
export { f as authorizeUrl, d as completeRedirect, u as signIn, l as widgetLocale };
|