@commentkit/comment-kit 1.6.0 → 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.
Files changed (136) hide show
  1. package/CHANGELOG.md +281 -597
  2. package/README.md +334 -154
  3. package/SECURITY.md +47 -46
  4. package/dist/node/THIRD_PARTY_NOTICES.txt +56 -0
  5. package/dist/node/browser.js +17 -0
  6. package/dist/node/cli/api.js +226 -0
  7. package/dist/node/cli/bin.js +18 -0
  8. package/dist/node/cli/credentials.js +268 -0
  9. package/dist/node/cli/doctor.js +725 -0
  10. package/dist/node/cli/format.js +54 -0
  11. package/dist/node/cli/init.js +372 -0
  12. package/dist/node/cli/main.js +519 -0
  13. package/dist/node/cli/mcp.js +114 -0
  14. package/dist/node/cli/open.js +20 -0
  15. package/dist/node/plugins/astro-B5y1Gtbf.js +31 -0
  16. package/dist/node/plugins/astro.js +26 -0
  17. package/dist/node/plugins/git-BIXLbL3f.js +92 -0
  18. package/dist/node/plugins/jsx-Bg4BdSph.js +7958 -0
  19. package/dist/node/plugins/next.js +48 -0
  20. package/dist/node/plugins/options-THop1K92.js +71 -0
  21. package/dist/node/plugins/transform-CKiAuSbk.js +1155 -0
  22. package/dist/node/plugins/vite-BdAYUW10.js +74 -0
  23. package/dist/node/plugins/vite.js +1 -0
  24. package/dist/node/plugins/webpack-R2U2DLlY.js +35 -0
  25. package/dist/node/plugins/webpack-loader.cjs +21 -0
  26. package/dist/node/plugins/webpack-loader.js +18 -0
  27. package/dist/node/plugins/webpack.js +1 -0
  28. package/dist/node/shared/endpoint.js +26 -0
  29. package/dist/node/shared/format.js +63 -0
  30. package/dist/node/types/astro.d.ts +11 -0
  31. package/dist/node/types/next.d.ts +34 -0
  32. package/dist/node/types/options.d.ts +59 -0
  33. package/dist/node/types/vite.d.ts +11 -0
  34. package/dist/node/types/webpack-loader.d.ts +22 -0
  35. package/dist/node/types/webpack.d.ts +27 -0
  36. package/dist/npm/THIRD_PARTY_NOTICES.txt +6 -6
  37. package/dist/npm/chunks/AgentSend-DxRJIYiz.js +68 -0
  38. package/dist/npm/chunks/Checklist-CnlfeSbc.js +282 -0
  39. package/dist/npm/chunks/Composer-B1bBVszY.js +725 -0
  40. package/dist/npm/chunks/Guest-vvNPz8h-.js +267 -0
  41. package/dist/npm/chunks/MarkupEditor-VCOXh9d2.js +338 -0
  42. package/dist/npm/chunks/Panel-F37vIL1K.js +1206 -0
  43. package/dist/npm/chunks/Settings-BGoZS2iV.js +231 -0
  44. package/dist/npm/chunks/Shortcuts-B2OMvczr.js +62 -0
  45. package/dist/npm/chunks/StyleEditor-CJ_d8Huf.js +46 -0
  46. package/dist/npm/chunks/StylePanel-yQzHHlY7.js +199 -0
  47. package/dist/npm/chunks/TaskFields-fmy6_HtK.js +289 -0
  48. package/dist/npm/chunks/ThreadCard-D51slKST.js +1113 -0
  49. package/dist/npm/chunks/Viewer-BOBadqmC.js +111 -0
  50. package/dist/npm/chunks/{agent-BDMQtOzH.js → agent-C1OQzBAm.js} +9 -9
  51. package/dist/npm/chunks/{anchor-BsradQhn.js → anchor-BsQNVkHj.js} +108 -85
  52. package/dist/npm/chunks/{ar-8tPch6W4.js → ar-CAJ3XT8e.js} +69 -19
  53. package/dist/npm/chunks/card-bits-CAnzrqx3.js +53 -0
  54. package/dist/npm/chunks/{client-EFTWxHbJ.js → client-kNAo2TTG.js} +282 -290
  55. package/dist/npm/chunks/confetti-CkBdSu19.js +49 -0
  56. package/dist/npm/chunks/context-B8UAzve0.js +20 -0
  57. package/dist/npm/chunks/context-BuMl7A07.js +48 -0
  58. package/dist/npm/chunks/{de-C63897uD.js → de-Dl18G48t.js} +60 -18
  59. package/dist/npm/chunks/dialog-GO04oC3D.js +3 -0
  60. package/dist/npm/chunks/dpop-U48QIQd7.js +96 -0
  61. package/dist/npm/chunks/drafts-B0ctr1g9.js +21 -0
  62. package/dist/npm/chunks/{es-CI2bSpvB.js → es-Dxk79lS9.js} +60 -18
  63. package/dist/npm/chunks/extension-CKFpPWmi.js +62 -0
  64. package/dist/npm/chunks/{extension-BST6LH1q.js → extension-E81hWyiT.js} +20 -12
  65. package/dist/npm/chunks/files-DyD5BZgp.js +114 -0
  66. package/dist/npm/chunks/{fr-rsVe-Lqk.js → fr-8BebGKYD.js} +118 -76
  67. package/dist/npm/chunks/{hi-cvwbSaWP.js → hi-BIN6Yy_p.js} +61 -19
  68. package/dist/npm/chunks/{i18n-C4v0M-6z.js → i18n-DOBt8e9U.js} +91 -56
  69. package/dist/npm/chunks/identify-CN-3xzqL.js +106 -0
  70. package/dist/npm/chunks/{it-C8tnV0BF.js → it-Cr6EwpPQ.js} +79 -37
  71. package/dist/npm/chunks/{ja-BWxDfC2f.js → ja-Iy3s5aur.js} +58 -16
  72. package/dist/npm/chunks/late-words-B2bmZceJ.js +12 -0
  73. package/dist/npm/chunks/live-CelVeZfP.js +85 -0
  74. package/dist/npm/chunks/locale-D8Q4Q2Nt.js +26 -0
  75. package/dist/npm/chunks/{nl-DNQ6eCht.js → nl-B84WHqqe.js} +61 -19
  76. package/dist/npm/chunks/page-key-DepmJzC1.js +62 -0
  77. package/dist/npm/chunks/{pick-CLyOdjnD.js → pick-yTyqtxN0.js} +45 -44
  78. package/dist/npm/chunks/pkce-ChKGSW_4.js +8 -0
  79. package/dist/npm/chunks/placement-BF_HOUDD.js +74 -0
  80. package/dist/npm/chunks/privacy-BWUGlHw5.js +57 -0
  81. package/dist/npm/chunks/{pt-BR-CkG7vpU2.js → pt-BR-DOkdlfoe.js} +60 -18
  82. package/dist/npm/chunks/{realtime-DIo-Wth4.js → realtime-C79zF50C.js} +14 -12
  83. package/dist/npm/chunks/report-CrIqQZDI.js +44 -0
  84. package/dist/npm/chunks/show-BgVC8gWY.js +97 -0
  85. package/dist/npm/chunks/signin-Dd1rb2BP.js +75 -0
  86. package/dist/npm/chunks/{source-CS7C6wJA.js → source-pXVve2Cx.js} +1 -1
  87. package/dist/npm/chunks/src-BTMy4Gyc.js +208 -0
  88. package/dist/npm/chunks/start-DtVlpt7p.js +1878 -0
  89. package/dist/npm/chunks/states-sfTbjZz8.js +3 -0
  90. package/dist/npm/chunks/upload-MgPYqPyE.js +42 -0
  91. package/dist/npm/chunks/uploads-D49mywwz.js +1146 -0
  92. package/dist/npm/chunks/wrap-Bl0gbnFa.js +69 -0
  93. package/dist/npm/chunks/{zh-CN-BKuZOLBE.js → zh-CN-Z5fQCb7G.js} +59 -17
  94. package/dist/npm/element.js +58 -21
  95. package/dist/npm/headless.js +7 -3
  96. package/dist/npm/index.js +3 -3
  97. package/dist/npm/react.js +18 -11
  98. package/dist/npm/svelte.js +28 -12
  99. package/dist/npm/types/adapters/react.d.ts +4 -1
  100. package/dist/npm/types/adapters/svelte.d.ts +4 -1
  101. package/dist/npm/types/adapters/vue.d.ts +35 -2
  102. package/dist/npm/types/anchor/index.d.ts +19 -0
  103. package/dist/npm/types/capture/privacy.d.ts +14 -0
  104. package/dist/npm/types/core/api.d.ts +20 -1
  105. package/dist/npm/types/core/auth.d.ts +40 -21
  106. package/dist/npm/types/core/client.d.ts +60 -4
  107. package/dist/npm/types/core/page-key.d.ts +42 -0
  108. package/dist/npm/types/core/types.d.ts +87 -4
  109. package/dist/npm/types/element.d.ts +17 -7
  110. package/dist/npm/types/headless.d.ts +2 -1
  111. package/dist/npm/types/index.d.ts +16 -6
  112. package/dist/npm/vue.js +44 -9
  113. package/package.json +88 -14
  114. package/dist/npm/chunks/AgentSend-2JPDseOo.js +0 -63
  115. package/dist/npm/chunks/Checklist-BpDXQebo.js +0 -257
  116. package/dist/npm/chunks/Composer-CAyj-c8e.js +0 -677
  117. package/dist/npm/chunks/Guest-ZdFmTcXI.js +0 -187
  118. package/dist/npm/chunks/MarkupEditor-BFplZwFy.js +0 -332
  119. package/dist/npm/chunks/Panel-BhZ4XRDR.js +0 -861
  120. package/dist/npm/chunks/Settings-SPG9EHUZ.js +0 -204
  121. package/dist/npm/chunks/Shortcuts-C28HVDw6.js +0 -58
  122. package/dist/npm/chunks/StyleEditor-ByZMtq10.js +0 -43
  123. package/dist/npm/chunks/StylePanel-Iwhce2tE.js +0 -197
  124. package/dist/npm/chunks/TaskFields-BsP_fVJg.js +0 -273
  125. package/dist/npm/chunks/ThreadCard-BzVZdDCb.js +0 -1030
  126. package/dist/npm/chunks/Viewer-CqtGrdD8.js +0 -108
  127. package/dist/npm/chunks/card-bits-Bna-g3Py.js +0 -124
  128. package/dist/npm/chunks/confetti-DTKpwF3O.js +0 -40
  129. package/dist/npm/chunks/drafts-akdBsOd0.js +0 -50
  130. package/dist/npm/chunks/extension-D-V3utTm.js +0 -53
  131. package/dist/npm/chunks/live-BCpJVBeN.js +0 -33
  132. package/dist/npm/chunks/report-BBrT3r89.js +0 -27
  133. package/dist/npm/chunks/src-C4FsVoUp.js +0 -148
  134. package/dist/npm/chunks/start-i9M-r3aH.js +0 -1800
  135. package/dist/npm/chunks/upload-DSv7EyBD.js +0 -41
  136. package/dist/npm/chunks/uploads-I01kdqQF.js +0 -1103
@@ -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 };