@commentkit/comment-kit 0.7.1 → 0.7.2

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 (51) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +10 -6
  3. package/SECURITY.md +14 -6
  4. package/dist/angular.es.js +2 -2
  5. package/dist/comment-kit.es.js +5 -5
  6. package/dist/demo.es.js +35 -34
  7. package/dist/headless.es.js +3 -3
  8. package/dist/preact.es.js +2 -2
  9. package/dist/qwik.qwik.mjs +2 -2
  10. package/dist/react.es.js +2 -2
  11. package/dist/shared/{ShadowRootContext-Bv-4aElu.js → ShadowRootContext-CjciYxVN.js} +4 -4
  12. package/dist/shared/annotation-toolbar-CZI1KVdW.js +1094 -0
  13. package/dist/shared/{attachment-refresh-CzQFXHkL.js → attachment-refresh-mQw-L7hB.js} +2 -2
  14. package/dist/shared/{button-group-CWdKaOlC.js → button-group-C285iSkZ.js} +1 -1
  15. package/dist/shared/capture-privacy-DUROnio5.js +77 -0
  16. package/dist/shared/{comment-drawing-canvas-DdXlMgbF.js → comment-drawing-canvas-CYFFKgCm.js} +2 -2
  17. package/dist/shared/{comment-icon-Dg9ZWpz-.js → comment-icon-4SQd3nlz.js} +1 -1
  18. package/dist/shared/{comment-image-lightbox-B7iHjnAz.js → comment-image-lightbox-DmTNxuqX.js} +5 -5
  19. package/dist/shared/{comment-images-content-D7YNUgo5.js → comment-images-content-BX4DQ9Ol.js} +3 -3
  20. package/dist/shared/{comment-kit-core-C862uNAm.js → comment-kit-core-VuIidMeu.js} +786 -703
  21. package/dist/shared/{comment-kit-ui-0vd-DY4S.js → comment-kit-ui-BjJ1ZLiv.js} +4429 -4620
  22. package/dist/shared/{comment-screenshot-annotator-DcaSSuWB.js → comment-screenshot-annotator-CMOG1md7.js} +2 -2
  23. package/dist/shared/{comment-screenshot-overlay-D_nFoJmM.js → comment-screenshot-overlay-iWW-V-Iw.js} +113 -118
  24. package/dist/shared/comment-shortcut-groups-CfEmkitU.js +153 -0
  25. package/dist/shared/{dev-export-panel-pWBlhlse.js → dev-export-panel-CrRENbMn.js} +3 -4
  26. package/dist/shared/dev-grab-Ca4MlS2Y.js +196 -0
  27. package/dist/shared/{element-selector-DC-_XJ0k.js → element-selector-g1bTvdEA.js} +408 -405
  28. package/dist/shared/{mount-ui-B68j8r6I.js → mount-ui-Dz5QLq4W.js} +121 -106
  29. package/dist/shared/{pusher-C1FHQGXV.js → pusher-ue0D83de.js} +1 -1
  30. package/dist/shared/realtime-CieWAnsW.js +321 -0
  31. package/dist/shared/{realtime-recovery-DJ_adc-H.js → realtime-recovery-BSVMwsXJ.js} +1 -1
  32. package/dist/shared/request-activity-DQrAUwfA.js +11 -0
  33. package/dist/shared/{separator-XDBsaWyw.js → separator-aphZiRoJ.js} +1 -1
  34. package/dist/shared/{shadow-root-CrO75sED.js → shadow-root-Cv1aLuFf.js} +31 -31
  35. package/dist/shared/{styles-C9Jwvm0Q.js → styles-CnYsLS2f.js} +1 -1
  36. package/dist/shared/text-B4HHZNaa.js +23 -0
  37. package/dist/shared/token-session-CPQpt3-u.js +25 -0
  38. package/dist/shared/{validation-D-8u4M7I.js → validation-3wbbbuX0.js} +14 -2
  39. package/dist/shared/{websocket-manager-CFak_YHy.js → websocket-manager-BnK55c3U.js} +136 -116
  40. package/dist/solid.es.js +2 -2
  41. package/dist/svelte.es.js +2 -2
  42. package/dist/types/core/api-client.d.ts +3 -1
  43. package/dist/types/core/comment-kit-core.d.ts +2 -5
  44. package/dist/types/core/types.d.ts +22 -5
  45. package/dist/types/core/websocket-manager.d.ts +1 -0
  46. package/dist/vue.es.js +2 -2
  47. package/docs/api-reference.md +19 -4
  48. package/package.json +1 -1
  49. package/dist/shared/annotation-toolbar-cGC1p-SP.js +0 -1093
  50. package/dist/shared/dev-grab-eQ9EgEGY.js +0 -210
  51. package/dist/shared/realtime-Diqz7G_y.js +0 -317
package/dist/vue.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as e } from "./shared/comment-kit-core-C862uNAm.js";
1
+ import { t as e } from "./shared/comment-kit-core-VuIidMeu.js";
2
2
  import { n as t, r as n, t as r } from "./shared/bridge-CJoGYngu.js";
3
3
  import { n as i, t as a } from "./shared/errors-Bu5ajEmB.js";
4
4
  import { computed as o, h as s, onMounted as c, onUnmounted as l, shallowRef as u, watch as d } from "vue";
@@ -19,7 +19,7 @@ function f(s) {
19
19
  } catch {}
20
20
  }, V = async (e) => {
21
21
  try {
22
- let { mountCommentKitUI: t } = await import("./shared/mount-ui-B68j8r6I.js").then((e) => e.n);
22
+ let { mountCommentKitUI: t } = await import("./shared/mount-ui-Dz5QLq4W.js").then((e) => e.n);
23
23
  if (L || _.value !== e) return;
24
24
  let n = await t(e);
25
25
  if (L || _.value !== e) {
@@ -355,13 +355,28 @@ import type {
355
355
 
356
356
  **`Comment`** — A comment thread with author, position, replies, reactions, attachments, and task metadata.
357
357
 
358
- **`ProjectContext`** — Authenticated project/organization identity, members and roles, storage usage (`limit: null` for unlimited), branch names and `canManageComments`/`canInvite` capabilities.
358
+ **`ProjectContext`** — Authenticated project/organization identity, members and roles, storage usage (`limit: null` for unlimited), branch names and `canManageComments`/`canInvite` capabilities. `project.isPlayground` is an optional server-owned presentation flag; it never changes the returned plan or permissions.
359
359
 
360
360
  **`ReplyOptions`** — Optional attachment IDs, mentions and a typed quote target for reply creation/editing.
361
361
 
362
362
  **`User`** — A user with id, name, email, optional avatar, and optional organizationId.
363
363
 
364
- **`CommentKitConfig`** — Configuration object passed to the SDK constructor. Includes `apiKey`, optional `baseUrl`, `branch`, `enabled`, `screenshotProvider`, `ui` (theme, position, activation) and realtime options.
364
+ **`CommentKitConfig`** — Configuration object passed to the SDK constructor. Includes `apiKey`, optional `baseUrl`, `branch`, `enabled`, `screenshotProvider`, `ui` (theme, position, activation) and realtime options. A trusted host can provide `authToken` from its backend; the SDK verifies it with `GET /auth/me` under the project API key before emitting `auth:login` or loading private comments. Do not put the token in a URL. Use `persistence: "memory"` for temporary sessions: the SDK neither restores/saves bearer credentials in sessionStorage nor reads/writes its offline queue in localStorage. The default `"session"` preserves standard OTP in-tab restoration and offline replay. `getConfig()` never returns `authToken`.
365
+
366
+ ```ts
367
+ const kit = new CommentKit({
368
+ apiKey: session.projectKey,
369
+ baseUrl: `${location.origin}/api`,
370
+ authToken: session.sdkToken,
371
+ persistence: "memory",
372
+ });
373
+ kit.on("auth:login", (user) => {
374
+ // The server verified this member; private comments load afterward.
375
+ });
376
+ kit.on("error", (error) => {
377
+ // Handle an expired or rejected member token.
378
+ });
379
+ ```
365
380
 
366
381
  **`CommentKitState`** — The full state tree. Includes auth, `projectContext`, `activeBranch`, UI, comments, realtime, offline queue, pagination and activities.
367
382
 
@@ -369,9 +384,9 @@ import type {
369
384
 
370
385
  **`ApiError`** — Structured error with `error` code, `message`, and HTTP `code`, plus an optional `details` object.
371
386
 
372
- **`AgentContextExport`** — The bundle returned by `getAgentContext` / `getAgentContextAsync`. Versioned, includes per-comment element + source frames + replies plus a `sourceResolved` flag.
387
+ **`AgentContextExport`** — The bundle returned by `getAgentContext` / `getAgentContextAsync`. Versioned, with element and source context, replies, and a `sourceResolved` flag. Page credentials and signed attachment URLs are redacted; attachment IDs and metadata remain available.
373
388
 
374
- **`DevGrabResult`** — Result of `grabElement`. Element context, HTML, optional screenshot data URL, and the Markdown payload that hit the clipboard.
389
+ **`DevGrabResult`** — Result of `grabElement`. Element context, HTML, optional screenshot data URL, and the Markdown payload that hit the clipboard. Page credentials are redacted in results, events, and Markdown.
375
390
 
376
391
  **`DevGrabBundle`** — Result of `grabElements`. An array of `DevGrabResult` plus one bundled Markdown payload.
377
392
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commentkit/comment-kit",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "Figma-style collaborative commenting, drawing, and feedback tools for any website. Works with React, Vue, Svelte, Angular, and Vanilla JS.",
5
5
  "keywords": [
6
6
  "angular",