@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.
Files changed (141) hide show
  1. package/CHANGELOG.md +281 -582
  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-CqDO3JMA.js → agent-C1OQzBAm.js} +20 -21
  51. package/dist/npm/chunks/{anchor-OCQnjp_6.js → anchor-BsQNVkHj.js} +109 -87
  52. package/dist/npm/chunks/{ar-BQ9K9Oqf.js → ar-CAJ3XT8e.js} +73 -20
  53. package/dist/npm/chunks/card-bits-CAnzrqx3.js +53 -0
  54. package/dist/npm/chunks/{client-dZeNdizE.js → client-kNAo2TTG.js} +292 -285
  55. package/dist/npm/chunks/{colors-CAjY4jxf.js → colors-CWAn_swA.js} +1 -2
  56. package/dist/npm/chunks/confetti-CkBdSu19.js +49 -0
  57. package/dist/npm/chunks/context-B8UAzve0.js +20 -0
  58. package/dist/npm/chunks/context-BuMl7A07.js +48 -0
  59. package/dist/npm/chunks/{de-CcPi8xdC.js → de-Dl18G48t.js} +64 -19
  60. package/dist/npm/chunks/dialog-GO04oC3D.js +3 -0
  61. package/dist/npm/chunks/dpop-U48QIQd7.js +96 -0
  62. package/dist/npm/chunks/drafts-B0ctr1g9.js +21 -0
  63. package/dist/npm/chunks/{es-DXgkjDCG.js → es-Dxk79lS9.js} +64 -19
  64. package/dist/npm/chunks/extension-CKFpPWmi.js +62 -0
  65. package/dist/npm/chunks/{extension-BFkXOmX5.js → extension-E81hWyiT.js} +21 -14
  66. package/dist/npm/chunks/files-DyD5BZgp.js +114 -0
  67. package/dist/npm/chunks/{fr-IjJaUbWh.js → fr-8BebGKYD.js} +121 -76
  68. package/dist/npm/chunks/{hi-BhKQK2MU.js → hi-BIN6Yy_p.js} +65 -20
  69. package/dist/npm/chunks/{html2canvas-pro.esm-lgs6tb4C.js → html2canvas-pro.esm-B7b8p5Wr.js} +608 -528
  70. package/dist/npm/chunks/i18n-DOBt8e9U.js +936 -0
  71. package/dist/npm/chunks/identify-CN-3xzqL.js +106 -0
  72. package/dist/npm/chunks/{it-DKiSCkiD.js → it-Cr6EwpPQ.js} +83 -38
  73. package/dist/npm/chunks/{ja-BI1WagDg.js → ja-Iy3s5aur.js} +62 -17
  74. package/dist/npm/chunks/late-words-B2bmZceJ.js +12 -0
  75. package/dist/npm/chunks/live-CelVeZfP.js +85 -0
  76. package/dist/npm/chunks/locale-D8Q4Q2Nt.js +26 -0
  77. package/dist/npm/chunks/{lock-C82sC17d.js → lock-B1JLlOhz.js} +0 -1
  78. package/dist/npm/chunks/{nl-CJw3VUQ5.js → nl-B84WHqqe.js} +65 -20
  79. package/dist/npm/chunks/page-key-DepmJzC1.js +62 -0
  80. package/dist/npm/chunks/{pick-dDDLxCDI.js → pick-yTyqtxN0.js} +46 -46
  81. package/dist/npm/chunks/pkce-ChKGSW_4.js +8 -0
  82. package/dist/npm/chunks/placement-BF_HOUDD.js +74 -0
  83. package/dist/npm/chunks/privacy-BWUGlHw5.js +57 -0
  84. package/dist/npm/chunks/{pt-BR-CjBolC5g.js → pt-BR-DOkdlfoe.js} +64 -19
  85. package/dist/npm/chunks/{realtime-D22tI_AS.js → realtime-C79zF50C.js} +16 -15
  86. package/dist/npm/chunks/report-CrIqQZDI.js +44 -0
  87. package/dist/npm/chunks/{rolldown-runtime-Y_bBpyJl.js → rolldown-runtime-QGRDbDUS.js} +1 -2
  88. package/dist/npm/chunks/show-BgVC8gWY.js +97 -0
  89. package/dist/npm/chunks/signin-Dd1rb2BP.js +75 -0
  90. package/dist/npm/chunks/{source-BQS2_xfB.js → source-pXVve2Cx.js} +2 -3
  91. package/dist/npm/chunks/src-BTMy4Gyc.js +208 -0
  92. package/dist/npm/chunks/start-DtVlpt7p.js +1878 -0
  93. package/dist/npm/chunks/states-sfTbjZz8.js +3 -0
  94. package/dist/npm/chunks/upload-MgPYqPyE.js +42 -0
  95. package/dist/npm/chunks/uploads-D49mywwz.js +1146 -0
  96. package/dist/npm/chunks/wrap-Bl0gbnFa.js +69 -0
  97. package/dist/npm/chunks/{zh-CN-BrZGx2S0.js → zh-CN-Z5fQCb7G.js} +63 -18
  98. package/dist/npm/element.js +59 -23
  99. package/dist/npm/headless.js +7 -3
  100. package/dist/npm/index.js +3 -3
  101. package/dist/npm/react.js +19 -13
  102. package/dist/npm/svelte.js +29 -14
  103. package/dist/npm/types/adapters/react.d.ts +4 -1
  104. package/dist/npm/types/adapters/svelte.d.ts +4 -1
  105. package/dist/npm/types/adapters/vue.d.ts +35 -2
  106. package/dist/npm/types/anchor/index.d.ts +19 -0
  107. package/dist/npm/types/capture/privacy.d.ts +14 -0
  108. package/dist/npm/types/core/api.d.ts +20 -1
  109. package/dist/npm/types/core/auth.d.ts +47 -14
  110. package/dist/npm/types/core/client.d.ts +60 -4
  111. package/dist/npm/types/core/page-key.d.ts +42 -0
  112. package/dist/npm/types/core/types.d.ts +87 -4
  113. package/dist/npm/types/element.d.ts +17 -7
  114. package/dist/npm/types/headless.d.ts +2 -1
  115. package/dist/npm/types/index.d.ts +16 -6
  116. package/dist/npm/vue.js +45 -11
  117. package/package.json +95 -21
  118. package/dist/npm/chunks/AgentSend-DjFZSC0S.js +0 -64
  119. package/dist/npm/chunks/Checklist-BEz4IZdT.js +0 -259
  120. package/dist/npm/chunks/Composer-D1wbmdjF.js +0 -681
  121. package/dist/npm/chunks/Guest-CtyRy8Kz.js +0 -170
  122. package/dist/npm/chunks/MarkupEditor-CPH4yKx4.js +0 -334
  123. package/dist/npm/chunks/Panel-DSoUAlbQ.js +0 -863
  124. package/dist/npm/chunks/Settings-C_qV4n7J.js +0 -206
  125. package/dist/npm/chunks/Shortcuts-ChnaribX.js +0 -60
  126. package/dist/npm/chunks/StyleEditor-DqZd6C5o.js +0 -44
  127. package/dist/npm/chunks/StylePanel-DMC3riYK.js +0 -199
  128. package/dist/npm/chunks/TaskFields-BfjjllMx.js +0 -272
  129. package/dist/npm/chunks/ThreadCard-DmKAelSL.js +0 -1026
  130. package/dist/npm/chunks/Viewer-mw69qSI5.js +0 -110
  131. package/dist/npm/chunks/card-bits-C7bIk5KX.js +0 -126
  132. package/dist/npm/chunks/confetti-DKeKR7-6.js +0 -41
  133. package/dist/npm/chunks/drafts-CpQdHhcK.js +0 -51
  134. package/dist/npm/chunks/extension-Gvei3opb.js +0 -54
  135. package/dist/npm/chunks/i18n-DAJGndZ2.js +0 -904
  136. package/dist/npm/chunks/live-MvvBdoGd.js +0 -34
  137. package/dist/npm/chunks/report-DoDVi1qT.js +0 -28
  138. package/dist/npm/chunks/src-C_oUnL0i.js +0 -150
  139. package/dist/npm/chunks/start-C5-rebEU.js +0 -1783
  140. package/dist/npm/chunks/upload-CzPAjktW.js +0 -42
  141. package/dist/npm/chunks/uploads-tpLjiJdH.js +0 -541
package/dist/npm/vue.js CHANGED
@@ -1,14 +1,14 @@
1
- import { t as e } from "./chunks/src-C_oUnL0i.js";
2
- import { defineComponent as t, onBeforeUnmount as n, onMounted as r } from "vue";
3
- //#region src/adapters/vue.ts
4
- function i(e) {
1
+ import { t as e } from "./chunks/src-BTMy4Gyc.js";
2
+ import { defineComponent as t, onBeforeUnmount as n, onMounted as r, watch as i } from "vue";
3
+ // src/adapters/vue.ts
4
+ function a(e) {
5
5
  try {
6
6
  return e();
7
7
  } catch (e) {
8
8
  return console.warn("[CommentKit] The widget could not start.", e), null;
9
9
  }
10
10
  }
11
- var a = t({
11
+ var o = t({
12
12
  name: "CommentKit",
13
13
  props: {
14
14
  project: {
@@ -47,6 +47,10 @@ var a = t({
47
47
  type: Array,
48
48
  default: void 0
49
49
  },
50
+ privacy: {
51
+ type: String,
52
+ default: void 0
53
+ },
50
54
  locale: {
51
55
  type: String,
52
56
  default: void 0
@@ -59,17 +63,47 @@ var a = t({
59
63
  type: Boolean,
60
64
  default: void 0
61
65
  },
66
+ toggleShortcut: {
67
+ type: Boolean,
68
+ default: void 0
69
+ },
62
70
  tools: {
63
71
  type: Object,
64
72
  default: void 0
73
+ },
74
+ identity: {
75
+ type: [String, Function],
76
+ default: void 0
65
77
  }
66
78
  },
67
79
  setup(t) {
68
- let a = null, o = () => Object.fromEntries(Object.entries(t).filter(([, e]) => e !== void 0));
69
- return r(() => a = i(() => e(o()))), n(() => i(() => a?.destroy())), () => null;
80
+ let o = null, s = () => Object.fromEntries(Object.entries(t).filter(([, e]) => e !== void 0)), c = !1, l, u = () => {
81
+ a(() => o?.destroy()), l = t.identity, o = a(() => e(s()));
82
+ };
83
+ return r(() => (c = !0, u())), i(() => [
84
+ t.project,
85
+ t.branch,
86
+ t.commit,
87
+ t.endpoint,
88
+ t.privacy,
89
+ t.toggleShortcut
90
+ ], () => c && u()), i(() => t.identity, (e) => {
91
+ e !== l && (l = e, typeof e == "string" && e && o?.identify(e));
92
+ }), n(() => {
93
+ c = !1, a(() => o?.destroy()), o = null;
94
+ }), () => null;
95
+ }
96
+ }), s = { install(t, n) {
97
+ if (typeof window > "u") return;
98
+ let r = a(() => e(n));
99
+ if (!r) return;
100
+ let i = () => a(() => r.destroy());
101
+ if (typeof t.onUnmount == "function") t.onUnmount(i);
102
+ else {
103
+ let e = t.unmount.bind(t);
104
+ t.unmount = () => {
105
+ i(), e();
106
+ };
70
107
  }
71
- }), o = { install(t, n) {
72
- typeof window < "u" && i(() => e(n));
73
108
  } };
74
- //#endregion
75
- export { a as CommentKit, o as CommentKitPlugin, e as init };
109
+ export { o as CommentKit, s as CommentKitPlugin, e as init };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commentkit/comment-kit",
3
- "version": "1.5.1",
3
+ "version": "2.0.0",
4
4
  "description": "Figma-style comments for any website. Clients pin feedback with an automatic screenshot; developers see it on localhost and hand it to their AI agent.",
5
5
  "keywords": [
6
6
  "comments",
@@ -11,7 +11,12 @@
11
11
  "bug reporting",
12
12
  "screenshot",
13
13
  "mcp",
14
- "ai agent"
14
+ "ai agent",
15
+ "vite-plugin",
16
+ "webpack-plugin",
17
+ "nextjs",
18
+ "astro-integration",
19
+ "cli"
15
20
  ],
16
21
  "homepage": "https://commentkit.dev",
17
22
  "license": "SEE LICENSE IN LICENSE",
@@ -22,40 +27,79 @@
22
27
  },
23
28
  "type": "module",
24
29
  "sideEffects": [
25
- "./dist/npm/element.js"
30
+ "./dist/npm/element.js",
31
+ "./dist/node/browser.js"
26
32
  ],
33
+ "bin": {
34
+ "commentkit": "dist/node/cli/bin.js"
35
+ },
27
36
  "main": "./dist/npm/index.js",
28
37
  "module": "./dist/npm/index.js",
29
38
  "types": "./dist/npm/types/index.d.ts",
30
39
  "exports": {
31
40
  ".": {
32
41
  "types": "./dist/npm/types/index.d.ts",
33
- "import": "./dist/npm/index.js"
42
+ "import": "./dist/npm/index.js",
43
+ "default": "./dist/npm/index.js"
34
44
  },
35
45
  "./react": {
36
46
  "types": "./dist/npm/types/adapters/react.d.ts",
37
- "import": "./dist/npm/react.js"
47
+ "import": "./dist/npm/react.js",
48
+ "default": "./dist/npm/react.js"
38
49
  },
39
50
  "./vue": {
40
51
  "types": "./dist/npm/types/adapters/vue.d.ts",
41
- "import": "./dist/npm/vue.js"
52
+ "import": "./dist/npm/vue.js",
53
+ "default": "./dist/npm/vue.js"
42
54
  },
43
55
  "./svelte": {
44
56
  "types": "./dist/npm/types/adapters/svelte.d.ts",
45
- "import": "./dist/npm/svelte.js"
57
+ "import": "./dist/npm/svelte.js",
58
+ "default": "./dist/npm/svelte.js"
46
59
  },
47
60
  "./element": {
48
61
  "types": "./dist/npm/types/element.d.ts",
49
- "import": "./dist/npm/element.js"
62
+ "import": "./dist/npm/element.js",
63
+ "default": "./dist/npm/element.js"
50
64
  },
51
65
  "./headless": {
52
66
  "types": "./dist/npm/types/headless.d.ts",
53
- "import": "./dist/npm/headless.js"
67
+ "import": "./dist/npm/headless.js",
68
+ "default": "./dist/npm/headless.js"
69
+ },
70
+ "./vite": {
71
+ "types": "./dist/node/types/vite.d.ts",
72
+ "browser": "./dist/node/browser.js",
73
+ "import": "./dist/node/plugins/vite.js",
74
+ "default": "./dist/node/plugins/vite.js"
75
+ },
76
+ "./next": {
77
+ "types": "./dist/node/types/next.d.ts",
78
+ "browser": "./dist/node/browser.js",
79
+ "import": "./dist/node/plugins/next.js",
80
+ "default": "./dist/node/plugins/next.js"
81
+ },
82
+ "./webpack": {
83
+ "types": "./dist/node/types/webpack.d.ts",
84
+ "browser": "./dist/node/browser.js",
85
+ "import": "./dist/node/plugins/webpack.js",
86
+ "default": "./dist/node/plugins/webpack.js"
87
+ },
88
+ "./webpack/loader": {
89
+ "browser": "./dist/node/browser.js",
90
+ "default": "./dist/node/plugins/webpack-loader.cjs"
91
+ },
92
+ "./astro": {
93
+ "types": "./dist/node/types/astro.d.ts",
94
+ "browser": "./dist/node/browser.js",
95
+ "import": "./dist/node/plugins/astro.js",
96
+ "default": "./dist/node/plugins/astro.js"
54
97
  },
55
98
  "./package.json": "./package.json"
56
99
  },
57
100
  "files": [
58
101
  "dist/npm",
102
+ "dist/node",
59
103
  "README.md",
60
104
  "CHANGELOG.md",
61
105
  "LICENSE",
@@ -66,11 +110,18 @@
66
110
  "registry": "https://registry.npmjs.org/"
67
111
  },
68
112
  "scripts": {
69
- "build": "npm run build:npm && npm run build:cdn && npm run build:types && node scripts/check-dist.mjs",
113
+ "build": "npm run build:npm && npm run build:cdn && npm run build:types && npm run build:node && node scripts/check-dist.mjs",
70
114
  "build:npm": "vp build",
71
115
  "build:cdn": "CK_BUILD=cdn vp build && CK_BUILD=loader vp build",
72
116
  "build:types": "rm -rf dist/npm/types && tsc -p tsconfig.build.json && node scripts/prune-types.mjs",
73
- "test": "vp test run",
117
+ "build:node": "npm run build:plugins && npm run build:cli",
118
+ "build:plugins": "vp build --config vite.node.config.ts && node scripts/finish-node-build.mjs && rm -rf dist/node/types && tsc -p tsconfig.plugins.json && node scripts/prune-types.mjs node",
119
+ "build:cli": "rm -rf dist/node/cli dist/node/shared && tsc -p tsconfig.cli.json",
120
+ "test": "vp test run && npm run test:node",
121
+ "test:browser": "vp test run",
122
+ "test:node": "npm run build:node && vp test run --config plugins/vitest.config.ts && node --test cli/test/*.test.mjs",
123
+ "test:plugins": "npm run build:plugins && vp test run --config plugins/vitest.config.ts",
124
+ "test:cli": "npm run build:cli && node --test cli/test/*.test.mjs",
74
125
  "test:watch": "vp test watch",
75
126
  "test:coverage": "vp test run --coverage",
76
127
  "test:e2e": "playwright test",
@@ -78,53 +129,76 @@
78
129
  "test:host-matrix": "node scripts/host-matrix.mjs",
79
130
  "test:wordpress": "node scripts/wordpress-check.mjs",
80
131
  "test:wordpress:real": "node e2e/wordpress-real/run.mjs",
81
- "typecheck": "tsc -p tsconfig.json",
132
+ "typecheck": "tsc -p tsconfig.json && tsc -p tsconfig.node.json",
133
+ "typecheck:e2e": "tsc -p tsconfig.e2e.json",
82
134
  "check": "npm run typecheck && npm run test && npm run build",
83
135
  "prepublishOnly": "npm run check && node scripts/check-pack.mjs",
84
136
  "ci": "bash scripts/ci.sh",
85
137
  "contract:sync": "bash scripts/contract-sync.sh",
86
138
  "changeset": "changeset",
87
- "version": "changeset version",
139
+ "version": "changeset version && node mcp/scripts/sync-server-json.mjs",
88
140
  "release:status": "changeset status --verbose"
89
141
  },
90
142
  "devDependencies": {
91
- "@axe-core/playwright": "4.13.0",
143
+ "@astrojs/compiler": "4.0.0",
144
+ "@axe-core/playwright": "4.14.0",
145
+ "@babel/parser": "8.0.10",
92
146
  "@changesets/cli": "3.0.3",
147
+ "@jridgewell/trace-mapping": "0.3.31",
93
148
  "@playwright/test": "1.64.1",
149
+ "@sveltejs/vite-plugin-svelte": "7.3.1",
150
+ "@types/node": "26.6.6",
94
151
  "@types/react": "19.3.0",
152
+ "@vitejs/plugin-react": "6.1.2",
153
+ "@vitejs/plugin-vue": "6.0.10",
95
154
  "@vitest/coverage-v8": "5.0.5",
96
- "html2canvas-pro": "2.5.2",
155
+ "astro": "7.4.4",
156
+ "html2canvas-pro": "2.6.0",
97
157
  "jsdom": "30.1.3",
98
- "preact": "11.0.1",
158
+ "magic-string": "1.4.5",
159
+ "preact": "11.1.0",
99
160
  "pusher-js": "8.6.0",
100
161
  "react": "19.3.1",
101
162
  "react-dom": "19.3.1",
102
- "svelte": "5.57.2",
163
+ "svelte": "5.57.3",
103
164
  "typescript": "7.0.2",
104
- "vite": "npm:@voidzero-dev/vite-plus-core@1.3.0",
105
- "vite-plus": "1.3.0",
165
+ "vite": "npm:@voidzero-dev/vite-plus-core@1.4.0",
166
+ "vite-plus": "1.4.0",
106
167
  "vitest": "5.0.5",
107
168
  "vue": "3.5.44",
169
+ "webpack": "5.112.2",
108
170
  "yaml": "2.9.1"
109
171
  },
110
172
  "peerDependencies": {
173
+ "astro": ">=4",
111
174
  "react": ">=18",
112
175
  "svelte": ">=4",
113
- "vue": ">=3"
176
+ "vite": ">=5",
177
+ "vue": ">=3",
178
+ "webpack": ">=5"
114
179
  },
115
180
  "peerDependenciesMeta": {
181
+ "astro": {
182
+ "optional": true
183
+ },
116
184
  "react": {
117
185
  "optional": true
118
186
  },
119
187
  "svelte": {
120
188
  "optional": true
121
189
  },
190
+ "vite": {
191
+ "optional": true
192
+ },
122
193
  "vue": {
123
194
  "optional": true
195
+ },
196
+ "webpack": {
197
+ "optional": true
124
198
  }
125
199
  },
126
200
  "overrides": {
127
- "vite": "npm:@voidzero-dev/vite-plus-core@1.3.0",
201
+ "vite": "npm:@voidzero-dev/vite-plus-core@1.4.0",
128
202
  "vitest": "5.0.5"
129
203
  },
130
204
  "engines": {
@@ -1,64 +0,0 @@
1
- import { i as e, l as t, m as n, s as r, u as i } from "./i18n-DAJGndZ2.js";
2
- import { n as a, t as o } from "./agent-CqDO3JMA.js";
3
- import { _ as s } from "./start-C5-rebEU.js";
4
- //#region src/ui/AgentSend.tsx
5
- var c = {
6
- cursor: "Cursor",
7
- claude: "Claude Code",
8
- codex: "Codex"
9
- }, l = "commentkit:agent";
10
- function u({ client: u, threads: d, onDone: f, onError: p, onClose: m }) {
11
- let [h, g] = n(null), _ = d.slice(0, 25);
12
- i(() => {
13
- let e = !0;
14
- return Promise.all(_.map((e) => u.allMessages(e.id).then((t) => ({
15
- thread: e,
16
- messages: t
17
- })))).then((t) => e && g(t), (t) => e && (p(t), m())), () => void (e = !1);
18
- }, []);
19
- let v = "copy";
20
- try {
21
- v = localStorage.getItem(l) ?? "copy";
22
- } catch {}
23
- let y = [
24
- "cursor",
25
- "claude",
26
- "codex",
27
- "copy"
28
- ], b = [v, ...y.filter((e) => e !== v)].filter((e) => y.includes(e)), x = (t) => {
29
- if (!h) return;
30
- let n = a(h);
31
- navigator.clipboard?.writeText(n).catch(() => void 0);
32
- try {
33
- localStorage.setItem(l, t);
34
- } catch {}
35
- if (t === "copy") return f(e("agentCopied", h.length));
36
- let { url: i, complete: s } = o(t, h, n, u.state.get().session?.repository ?? null), d = document.createElement("a");
37
- d.href = i, d.rel = "noopener noreferrer", d.click(), f(r(s ? "agentOpened" : "agentOpenedShort", { agent: c[t] }));
38
- };
39
- return /* @__PURE__ */ t("div", {
40
- class: "ck-menu ck-agent-menu",
41
- role: "menu",
42
- "aria-label": r("sendToAgent"),
43
- ref: s,
44
- onKeyDown: (e) => e.key === "Escape" && (e.stopPropagation(), m()),
45
- children: [
46
- /* @__PURE__ */ t("div", {
47
- class: "ck-menu-head",
48
- children: h ? e("agentReady", h.length) : r("agentPreparing")
49
- }),
50
- b.map((e) => /* @__PURE__ */ t("button", {
51
- role: "menuitem",
52
- disabled: !h,
53
- onClick: () => x(e),
54
- children: e === "copy" ? r("copyPrompt") : r("openIn", { agent: c[e] })
55
- })),
56
- d.length > 25 ? /* @__PURE__ */ t("p", {
57
- class: "ck-muted ck-agent-note",
58
- children: r("agentFirstOnly", { max: 25 })
59
- }) : null
60
- ]
61
- });
62
- }
63
- //#endregion
64
- export { u as AgentSend };
@@ -1,259 +0,0 @@
1
- import { f as e, i as t, l as n, m as r, s as i, v as a } from "./i18n-DAJGndZ2.js";
2
- import { d as o, h as s } from "./start-C5-rebEU.js";
3
- //#region src/ui/art.tsx
4
- var c = "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", l = (e, t, r, i) => /* @__PURE__ */ n("path", {
5
- class: i,
6
- d: c,
7
- transform: `translate(${e} ${t}) scale(${r})`
8
- }), u = {
9
- caughtUp: () => /* @__PURE__ */ n(a, { children: [
10
- /* @__PURE__ */ n("path", {
11
- class: "ck-art-w",
12
- d: "M28 50l8-20h48l8 20v18H28z"
13
- }),
14
- /* @__PURE__ */ n("path", {
15
- class: "ck-art-line",
16
- d: "M28 50h19l4 6h18l4-6h19"
17
- }),
18
- l(44, 4, .5, "ck-art-a"),
19
- /* @__PURE__ */ n("path", {
20
- class: "ck-art-tick",
21
- d: "M53 19l5 5 9-10"
22
- })
23
- ] }),
24
- noFeedback: () => /* @__PURE__ */ n(a, { children: [
25
- /* @__PURE__ */ n("rect", {
26
- class: "ck-art-w",
27
- x: "22",
28
- y: "18",
29
- width: "70",
30
- height: "52",
31
- rx: "7"
32
- }),
33
- /* @__PURE__ */ n("path", {
34
- class: "ck-art-line",
35
- d: "M22 29h70"
36
- }),
37
- /* @__PURE__ */ n("circle", {
38
- class: "ck-art-dot",
39
- cx: "29",
40
- cy: "23.5",
41
- r: "1.6"
42
- }),
43
- /* @__PURE__ */ n("circle", {
44
- class: "ck-art-dot",
45
- cx: "35",
46
- cy: "23.5",
47
- r: "1.6"
48
- }),
49
- /* @__PURE__ */ n("rect", {
50
- class: "ck-art-m",
51
- x: "30",
52
- y: "37",
53
- width: "34",
54
- height: "5",
55
- rx: "2.5"
56
- }),
57
- /* @__PURE__ */ n("rect", {
58
- class: "ck-art-m",
59
- x: "30",
60
- y: "47",
61
- width: "46",
62
- height: "5",
63
- rx: "2.5"
64
- }),
65
- /* @__PURE__ */ n("rect", {
66
- class: "ck-art-m",
67
- x: "30",
68
- y: "57",
69
- width: "26",
70
- height: "5",
71
- rx: "2.5"
72
- }),
73
- l(70, 6, .46, "ck-art-a"),
74
- /* @__PURE__ */ n("path", {
75
- class: "ck-art-tick",
76
- d: "M84.5 14v9M80 18.5h9"
77
- })
78
- ] }),
79
- noMatch: () => /* @__PURE__ */ n(a, { children: [
80
- /* @__PURE__ */ n("rect", {
81
- class: "ck-art-m",
82
- x: "22",
83
- y: "22",
84
- width: "52",
85
- height: "6",
86
- rx: "3"
87
- }),
88
- /* @__PURE__ */ n("rect", {
89
- class: "ck-art-m",
90
- x: "22",
91
- y: "36",
92
- width: "40",
93
- height: "6",
94
- rx: "3"
95
- }),
96
- /* @__PURE__ */ n("rect", {
97
- class: "ck-art-m",
98
- x: "22",
99
- y: "50",
100
- width: "46",
101
- height: "6",
102
- rx: "3"
103
- }),
104
- /* @__PURE__ */ n("circle", {
105
- class: "ck-art-w",
106
- cx: "76",
107
- cy: "42",
108
- r: "15"
109
- }),
110
- /* @__PURE__ */ n("path", {
111
- class: "ck-art-line ck-art-bold",
112
- d: "M87 53l11 11"
113
- }),
114
- /* @__PURE__ */ n("path", {
115
- class: "ck-art-line",
116
- d: "M70 42h12"
117
- })
118
- ] }),
119
- error: () => /* @__PURE__ */ n(a, { children: [
120
- l(36, 6, .75, "ck-art-m"),
121
- /* @__PURE__ */ n("path", {
122
- class: "ck-art-line ck-art-bold",
123
- d: "M60 18v14"
124
- }),
125
- /* @__PURE__ */ n("circle", {
126
- class: "ck-art-ink",
127
- cx: "60",
128
- cy: "40",
129
- r: "2.4"
130
- }),
131
- /* @__PURE__ */ n("path", {
132
- class: "ck-art-spark",
133
- d: "M24 22l6 4M22 36h7M96 22l-6 4M98 36h-7"
134
- })
135
- ] }),
136
- gone: () => /* @__PURE__ */ n(a, { children: l(36, 6, .75, "ck-art-ghost") })
137
- };
138
- function d({ name: e }) {
139
- return /* @__PURE__ */ n("svg", {
140
- class: "ck-art",
141
- viewBox: "0 0 120 80",
142
- width: "120",
143
- height: "80",
144
- "aria-hidden": "true",
145
- focusable: "false",
146
- children: [/* @__PURE__ */ n("ellipse", {
147
- class: "ck-art-shadow",
148
- cx: "60",
149
- cy: "74",
150
- rx: "34",
151
- ry: "3.5"
152
- }), u[e]()]
153
- });
154
- }
155
- //#endregion
156
- //#region src/ui/Checklist.tsx
157
- function f({ client: t, thread: a, editable: c, onChange: l, onError: u }) {
158
- let [d, f] = r(!1), [p, m] = r(""), [h, g] = r(!1), _ = a.checklist ?? [], v = _.filter((e) => e.done).length, y = e(a);
159
- y.current = a;
160
- let b = (e) => l(y.current = {
161
- ...y.current,
162
- checklist: e(y.current.checklist ?? [])
163
- }), x = () => {
164
- let e = p.trim();
165
- e && !h && (g(!0), m(""), t.addChecklistItem(a.id, e).then((e) => b((t) => [...t, e]), (t) => {
166
- m(e), u(t);
167
- }).finally(() => g(!1)));
168
- }, S = (e) => {
169
- let n = {
170
- ...e,
171
- done: !e.done
172
- }, r = (t) => b((n) => n.map((n) => n.id === e.id ? t : n));
173
- r(n), t.updateChecklistItem(e.id, { done: n.done }).catch((t) => {
174
- r(e), u(t);
175
- });
176
- }, C = (e) => {
177
- let n = _.indexOf(e);
178
- b((t) => t.filter((t) => t.id !== e.id)), t.deleteChecklistItem(e.id).catch((t) => {
179
- b((t) => t.some((t) => t.id === e.id) ? t : [
180
- ...t.slice(0, n),
181
- e,
182
- ...t.slice(n)
183
- ]), u(t);
184
- });
185
- };
186
- return !_.length && !c ? null : /* @__PURE__ */ n("div", {
187
- class: "ck-extra",
188
- children: [
189
- _.length ? /* @__PURE__ */ n("div", {
190
- class: "ck-checklist",
191
- role: "group",
192
- "aria-label": i("checklist"),
193
- children: [/* @__PURE__ */ n("div", {
194
- class: "ck-checklist-head",
195
- children: [/* @__PURE__ */ n("span", {
196
- class: "ck-muted",
197
- children: i("checklistProgress", {
198
- n: v,
199
- total: _.length
200
- })
201
- }), /* @__PURE__ */ n("span", {
202
- class: "ck-checklist-bar",
203
- "aria-hidden": "true",
204
- children: /* @__PURE__ */ n("span", { style: { width: `${Math.round(v / _.length * 100)}%` } })
205
- })]
206
- }), /* @__PURE__ */ n("ul", { children: _.map((e) => /* @__PURE__ */ n("li", {
207
- "data-done": e.done || void 0,
208
- children: [/* @__PURE__ */ n("label", {
209
- class: "ck-check",
210
- children: [/* @__PURE__ */ n("input", {
211
- type: "checkbox",
212
- checked: e.done,
213
- disabled: !c,
214
- onChange: () => S(e)
215
- }), /* @__PURE__ */ n("bdi", { children: e.body })]
216
- }), c ? /* @__PURE__ */ n("button", {
217
- class: "ck-ghost ck-ghost-sm",
218
- "aria-label": i("removeItem", { item: e.body }),
219
- onClick: () => C(e),
220
- children: /* @__PURE__ */ n(o, {
221
- name: "close",
222
- size: 12
223
- })
224
- }) : null]
225
- })) })]
226
- }) : null,
227
- c && (d || _.length) ? /* @__PURE__ */ n("div", {
228
- class: "ck-checklist-add",
229
- children: /* @__PURE__ */ n("input", {
230
- class: "ck-input",
231
- maxLength: 300,
232
- placeholder: i("checklistAdd"),
233
- "aria-label": i("checklistAdd"),
234
- value: p,
235
- disabled: h,
236
- ref: d && !_.length ? s : void 0,
237
- onInput: (e) => m(e.target.value),
238
- onKeyDown: (e) => {
239
- e.stopPropagation(), e.key === "Enter" ? (e.preventDefault(), x()) : e.key === "Escape" && !_.length && f(!1);
240
- }
241
- })
242
- }) : null,
243
- c && !_.length && !d ? /* @__PURE__ */ n("div", {
244
- class: "ck-extra-add",
245
- children: /* @__PURE__ */ n("button", {
246
- class: "ck-ghost ck-ghost-sm",
247
- onClick: () => f(!0),
248
- children: ["+ ", i("addChecklist")]
249
- })
250
- }) : null
251
- ]
252
- });
253
- }
254
- function p(e) {
255
- let n = e.checklist ?? [];
256
- return n.length ? t("checklistShort", n.length, { done: n.filter((e) => e.done).length }) : null;
257
- }
258
- //#endregion
259
- export { p as n, d as r, f as t };