@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.
- package/CHANGELOG.md +14 -0
- package/README.md +10 -6
- package/SECURITY.md +14 -6
- package/dist/angular.es.js +2 -2
- package/dist/comment-kit.es.js +5 -5
- package/dist/demo.es.js +35 -34
- package/dist/headless.es.js +3 -3
- package/dist/preact.es.js +2 -2
- package/dist/qwik.qwik.mjs +2 -2
- package/dist/react.es.js +2 -2
- package/dist/shared/{ShadowRootContext-Bv-4aElu.js → ShadowRootContext-CjciYxVN.js} +4 -4
- package/dist/shared/annotation-toolbar-CZI1KVdW.js +1094 -0
- package/dist/shared/{attachment-refresh-CzQFXHkL.js → attachment-refresh-mQw-L7hB.js} +2 -2
- package/dist/shared/{button-group-CWdKaOlC.js → button-group-C285iSkZ.js} +1 -1
- package/dist/shared/capture-privacy-DUROnio5.js +77 -0
- package/dist/shared/{comment-drawing-canvas-DdXlMgbF.js → comment-drawing-canvas-CYFFKgCm.js} +2 -2
- package/dist/shared/{comment-icon-Dg9ZWpz-.js → comment-icon-4SQd3nlz.js} +1 -1
- package/dist/shared/{comment-image-lightbox-B7iHjnAz.js → comment-image-lightbox-DmTNxuqX.js} +5 -5
- package/dist/shared/{comment-images-content-D7YNUgo5.js → comment-images-content-BX4DQ9Ol.js} +3 -3
- package/dist/shared/{comment-kit-core-C862uNAm.js → comment-kit-core-VuIidMeu.js} +786 -703
- package/dist/shared/{comment-kit-ui-0vd-DY4S.js → comment-kit-ui-BjJ1ZLiv.js} +4429 -4620
- package/dist/shared/{comment-screenshot-annotator-DcaSSuWB.js → comment-screenshot-annotator-CMOG1md7.js} +2 -2
- package/dist/shared/{comment-screenshot-overlay-D_nFoJmM.js → comment-screenshot-overlay-iWW-V-Iw.js} +113 -118
- package/dist/shared/comment-shortcut-groups-CfEmkitU.js +153 -0
- package/dist/shared/{dev-export-panel-pWBlhlse.js → dev-export-panel-CrRENbMn.js} +3 -4
- package/dist/shared/dev-grab-Ca4MlS2Y.js +196 -0
- package/dist/shared/{element-selector-DC-_XJ0k.js → element-selector-g1bTvdEA.js} +408 -405
- package/dist/shared/{mount-ui-B68j8r6I.js → mount-ui-Dz5QLq4W.js} +121 -106
- package/dist/shared/{pusher-C1FHQGXV.js → pusher-ue0D83de.js} +1 -1
- package/dist/shared/realtime-CieWAnsW.js +321 -0
- package/dist/shared/{realtime-recovery-DJ_adc-H.js → realtime-recovery-BSVMwsXJ.js} +1 -1
- package/dist/shared/request-activity-DQrAUwfA.js +11 -0
- package/dist/shared/{separator-XDBsaWyw.js → separator-aphZiRoJ.js} +1 -1
- package/dist/shared/{shadow-root-CrO75sED.js → shadow-root-Cv1aLuFf.js} +31 -31
- package/dist/shared/{styles-C9Jwvm0Q.js → styles-CnYsLS2f.js} +1 -1
- package/dist/shared/text-B4HHZNaa.js +23 -0
- package/dist/shared/token-session-CPQpt3-u.js +25 -0
- package/dist/shared/{validation-D-8u4M7I.js → validation-3wbbbuX0.js} +14 -2
- package/dist/shared/{websocket-manager-CFak_YHy.js → websocket-manager-BnK55c3U.js} +136 -116
- package/dist/solid.es.js +2 -2
- package/dist/svelte.es.js +2 -2
- package/dist/types/core/api-client.d.ts +3 -1
- package/dist/types/core/comment-kit-core.d.ts +2 -5
- package/dist/types/core/types.d.ts +22 -5
- package/dist/types/core/websocket-manager.d.ts +1 -0
- package/dist/vue.es.js +2 -2
- package/docs/api-reference.md +19 -4
- package/package.json +1 -1
- package/dist/shared/annotation-toolbar-cGC1p-SP.js +0 -1093
- package/dist/shared/dev-grab-eQ9EgEGY.js +0 -210
- 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-
|
|
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-
|
|
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) {
|
package/docs/api-reference.md
CHANGED
|
@@ -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,
|
|
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.
|
|
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",
|