@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,48 @@
|
|
|
1
|
+
import { n as e } from "./git-BIXLbL3f.js";
|
|
2
|
+
import { a as t, c as n } from "./options-THop1K92.js";
|
|
3
|
+
import { i as r, n as i, r as a } from "./webpack-R2U2DLlY.js";
|
|
4
|
+
import { resolve as o } from "node:path";
|
|
5
|
+
// plugins/next.ts
|
|
6
|
+
var s = "phase-development-server", c = [
|
|
7
|
+
"*.jsx",
|
|
8
|
+
"*.tsx",
|
|
9
|
+
"*.js"
|
|
10
|
+
];
|
|
11
|
+
function l(l, u, d = {}, f = process.env) {
|
|
12
|
+
let p = o(process.cwd(), d.root ?? "."), m = u === s, h = { ...l };
|
|
13
|
+
if (t(d.buildInfo, m)) {
|
|
14
|
+
let t = e({
|
|
15
|
+
cwd: p,
|
|
16
|
+
env: f
|
|
17
|
+
});
|
|
18
|
+
h.env = { ...l.env }, t.branch && h.env.NEXT_PUBLIC_COMMENTKIT_BRANCH === void 0 && (h.env.NEXT_PUBLIC_COMMENTKIT_BRANCH = t.branch), t.commit && h.env.NEXT_PUBLIC_COMMENTKIT_COMMIT === void 0 && (h.env.NEXT_PUBLIC_COMMENTKIT_COMMIT = t.commit), h.compiler = {
|
|
19
|
+
...l.compiler,
|
|
20
|
+
define: {
|
|
21
|
+
__COMMENTKIT_BUILD__: JSON.stringify(t),
|
|
22
|
+
...l.compiler?.define
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
if (!n(d.source, m, f)) return h;
|
|
27
|
+
let g = l.webpack;
|
|
28
|
+
h.webpack = (e, t) => {
|
|
29
|
+
let n = typeof g == "function" ? g(e, t) : e;
|
|
30
|
+
return n.module ??= {}, n.module.rules ??= [], n.module.rules.unshift(a(p, d)), n;
|
|
31
|
+
};
|
|
32
|
+
let _ = i(p, d), v = { ...l.turbopack?.rules };
|
|
33
|
+
for (let e of c) v[e] === void 0 ? v[e] = {
|
|
34
|
+
condition: { not: "foreign" },
|
|
35
|
+
loaders: [{
|
|
36
|
+
loader: r(),
|
|
37
|
+
options: _
|
|
38
|
+
}]
|
|
39
|
+
} : console.warn(`[CommentKit] turbopack.rules already has "${e}"; source tagging is skipped for those files. Combine the loaders by hand to keep both.`);
|
|
40
|
+
return h.turbopack = {
|
|
41
|
+
...l.turbopack,
|
|
42
|
+
rules: v
|
|
43
|
+
}, h;
|
|
44
|
+
}
|
|
45
|
+
function u(e = {}, t = {}) {
|
|
46
|
+
return async (n, r) => l((typeof e == "function" ? await e(n, r) : e) ?? {}, n, t);
|
|
47
|
+
}
|
|
48
|
+
export { l as applyCommentKit, u as default, u as withCommentKit };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { isAbsolute as e, relative as t, sep as n } from "node:path";
|
|
2
|
+
// plugins/node-version.ts
|
|
3
|
+
var r = "22.18 or 24.11";
|
|
4
|
+
function i(e = process.versions.node) {
|
|
5
|
+
let [t = 0, n = 0] = e.split(".").map(Number);
|
|
6
|
+
return t === 22 ? n >= 18 : t === 24 ? n >= 11 : t > 24;
|
|
7
|
+
}
|
|
8
|
+
var a = !1;
|
|
9
|
+
function o(e = process.versions.node) {
|
|
10
|
+
return i(e) ? !0 : (a || (a = !0, console.warn(`[CommentKit] Source locations need Node ${r} or newer (this is Node ${e}), so elements get no data-ck-src. Your app builds as usual.`)), !1);
|
|
11
|
+
}
|
|
12
|
+
// plugins/options.ts
|
|
13
|
+
var s = /\.(?:jsx|tsx|js|mjs|vue|svelte|astro)$/;
|
|
14
|
+
function c(e = process.env) {
|
|
15
|
+
let t = e.COMMENTKIT_SOURCE?.trim().toLowerCase();
|
|
16
|
+
return t ? [
|
|
17
|
+
"1",
|
|
18
|
+
"true",
|
|
19
|
+
"yes",
|
|
20
|
+
"on"
|
|
21
|
+
].includes(t) ? !0 : ![
|
|
22
|
+
"0",
|
|
23
|
+
"false",
|
|
24
|
+
"no",
|
|
25
|
+
"off"
|
|
26
|
+
].includes(t) && null : null;
|
|
27
|
+
}
|
|
28
|
+
function l(e, t, n = process.env) {
|
|
29
|
+
return e !== !1 && (e === !0 || (c(n) ?? t)) && o();
|
|
30
|
+
}
|
|
31
|
+
function u(e, t) {
|
|
32
|
+
return e === !1 ? !1 : e !== "development" || t;
|
|
33
|
+
}
|
|
34
|
+
function d(e) {
|
|
35
|
+
let t = e.search(/[?#]/);
|
|
36
|
+
return (t === -1 ? e : e.slice(0, t)).split(n).join("/");
|
|
37
|
+
}
|
|
38
|
+
function f(r, i) {
|
|
39
|
+
let a = t(r, i).split(n).join("/");
|
|
40
|
+
return !a || e(a) || /^[a-zA-Z]:/.test(a) ? null : a;
|
|
41
|
+
}
|
|
42
|
+
function p(e, t, n) {
|
|
43
|
+
if (typeof e == "string") {
|
|
44
|
+
let t = e.replace(/\\/g, "/").replace(/^\.\//, "").replace(/\/+$/, "");
|
|
45
|
+
return n !== null && (n === t || n.startsWith(`${t}/`));
|
|
46
|
+
}
|
|
47
|
+
return e.lastIndex = 0, e.test(t);
|
|
48
|
+
}
|
|
49
|
+
function m(e) {
|
|
50
|
+
return e === void 0 ? [] : Array.isArray(e) ? [...e] : [e];
|
|
51
|
+
}
|
|
52
|
+
function h(e, t, n) {
|
|
53
|
+
let r = m(t), i = m(n);
|
|
54
|
+
return (t) => {
|
|
55
|
+
if (!t || t.startsWith("\0") || t.includes("\0")) return !1;
|
|
56
|
+
let n = d(t);
|
|
57
|
+
if (n.includes("/node_modules/") || !s.test(n)) return !1;
|
|
58
|
+
let a = f(e, n);
|
|
59
|
+
return !(r.length && !r.some((e) => p(e, n, a)) || i.some((e) => p(e, n, a)));
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function g(e) {
|
|
63
|
+
if (e !== void 0) return m(e).map((e) => typeof e == "string" ? e : {
|
|
64
|
+
regexp: e.source,
|
|
65
|
+
flags: e.flags
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function _(e) {
|
|
69
|
+
if (e) return e.map((e) => typeof e == "string" ? e : new RegExp(e.regexp, e.flags));
|
|
70
|
+
}
|
|
71
|
+
export { u as a, l as c, _ as i, o as l, d as n, f as o, h as r, g as s, s as t };
|