@commentkit/comment-kit 0.7.5 → 0.7.7

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 (40) hide show
  1. package/CHANGELOG.md +20 -1
  2. package/README.md +2 -2
  3. package/dist/angular.es.js +2 -2
  4. package/dist/comment-kit.es.js +3 -3
  5. package/dist/demo.es.js +2 -2
  6. package/dist/headless.es.js +2 -2
  7. package/dist/preact.es.js +2 -2
  8. package/dist/qwik.qwik.mjs +2 -2
  9. package/dist/react.es.js +2 -2
  10. package/dist/shared/{annotation-toolbar-DgqxkHy8.js → annotation-toolbar-zeiCmKIr.js} +110 -109
  11. package/dist/shared/{attachment-refresh-DRX7dKDI.js → attachment-refresh-DAacLaRu.js} +1 -1
  12. package/dist/shared/{capture-privacy-DUROnio5.js → capture-privacy-CiOrcAlt.js} +38 -14
  13. package/dist/shared/{comment-drawing-canvas-hSdcLShI.js → comment-drawing-canvas-Btc12IsS.js} +2 -2
  14. package/dist/shared/{comment-image-lightbox-4zroOCCG.js → comment-image-lightbox--QpbcAtH.js} +2 -2
  15. package/dist/shared/{comment-images-content-D4hTya6e.js → comment-images-content-C_r4SHM-.js} +13 -13
  16. package/dist/shared/{comment-kit-core-D068rcdY.js → comment-kit-core-CmLUFujd.js} +382 -348
  17. package/dist/shared/{comment-kit-ui-BDzNt0jv.js → comment-kit-ui-BHwYuSIi.js} +5255 -5487
  18. package/dist/shared/{comment-screenshot-annotator-BGnu_NgP.js → comment-screenshot-annotator-zJZyO-XM.js} +2 -2
  19. package/dist/shared/{comment-screenshot-overlay-BCRmojWB.js → comment-screenshot-overlay-CoKTYB0J.js} +6 -6
  20. package/dist/shared/{dev-export-panel-CYmUKmIV.js → dev-export-panel-Cnt6oCZU.js} +4 -4
  21. package/dist/shared/{dev-grab-BYsCpsGI.js → dev-grab-B85jo9AS.js} +3 -3
  22. package/dist/shared/{element-selector-79Oo5pit.js → element-selector-Cng84xC7.js} +349 -347
  23. package/dist/shared/input-UPtAj0M6.js +111 -0
  24. package/dist/shared/{mount-ui-DuHk132g.js → mount-ui-Dz7FB_Ak.js} +4 -4
  25. package/dist/shared/{pusher-3jyUauYd.js → pusher-CnhQgAvF.js} +1 -1
  26. package/dist/shared/{realtime-DspH16g5.js → realtime-yGLX4wMK.js} +2 -2
  27. package/dist/shared/{screenshot-BIuEaRiu.js → screenshot-B5-hwpmt.js} +2 -2
  28. package/dist/shared/{shadow-root-3-yGIhMs.js → shadow-root-B58ZI2yz.js} +1 -1
  29. package/dist/shared/{token-session-_Pi4fOEi.js → token-session-D92MYbNu.js} +2 -2
  30. package/dist/shared/useLabelableId-8n0QmH8N.js +154 -0
  31. package/dist/shared/{websocket-manager-CvgZSo_L.js → websocket-manager-KhH4hL0Q.js} +2 -2
  32. package/dist/solid.es.js +2 -2
  33. package/dist/svelte.es.js +2 -2
  34. package/dist/types/core/api-client.d.ts +2 -0
  35. package/dist/types/core/comment-kit-core.d.ts +4 -2
  36. package/dist/types/core/types.d.ts +12 -5
  37. package/dist/types/core/write-access.d.ts +2 -0
  38. package/dist/vue.es.js +2 -2
  39. package/docs/api-reference.md +1 -1
  40. package/package.json +1 -1
@@ -0,0 +1,111 @@
1
+ import { F as e, f as t, l as n, o as r } from "./button-D4GHW6oZ.js";
2
+ import { P as i, S as a, j as o, t as s } from "./useValueChanged-DKq5cMot.js";
3
+ import { a as c, c as l, i as u, n as d, r as f, t as p, u as m } from "./useLabelableId-8n0QmH8N.js";
4
+ import * as h from "react";
5
+ import { createContext as g, useContext as _ } from "react";
6
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
7
+ var b = h.createContext({
8
+ canWrite: !0,
9
+ canManageComments: !1,
10
+ planRequired: !1,
11
+ message: ""
12
+ });
13
+ function x() {
14
+ return h.useContext(b);
15
+ }
16
+ function S() {
17
+ let e = x();
18
+ return e.canWrite ? null : /* @__PURE__ */ y("div", {
19
+ className: "ck-read-only-notice",
20
+ role: "status",
21
+ children: [/* @__PURE__ */ v("p", { children: e.message }), e.planRequired ? /* @__PURE__ */ v("a", {
22
+ href: "https://commentkit.dev/pricing",
23
+ target: "_blank",
24
+ rel: "noopener noreferrer",
25
+ children: "View plans"
26
+ }) : null]
27
+ });
28
+ }
29
+ var C = g(!1);
30
+ function w() {
31
+ return _(C);
32
+ }
33
+ var T = /*#__PURE__*/ h.forwardRef(function(r, g) {
34
+ let { render: _, className: v, id: y, name: b, value: x, disabled: S = !1, onValueChange: C, defaultValue: w, autoFocus: T = !1, style: E, ...D } = r, { state: O, name: k, disabled: A, setTouched: j, setDirty: M, validityData: N, setFilled: P, validationMode: F, validation: I } = l(), { clearErrors: L, elementRef: R, submitCountRef: z } = f(), B = A || S, V = k ?? b, H = {
35
+ ...O,
36
+ disabled: B
37
+ }, { labelId: U } = d(), W = p({ id: y }), G = x !== void 0, K = x == null ? void 0 : String(x), q = t(() => I.inputRef.current?.value);
38
+ u(I.inputRef, W, K, q, !B, b), e(() => {
39
+ let e = K ?? I.inputRef.current?.value;
40
+ e !== void 0 && P(e !== "");
41
+ }, [
42
+ K,
43
+ w,
44
+ I.inputRef,
45
+ P
46
+ ]), s(K, () => {
47
+ K !== void 0 && (L(V), M(K !== (N.initialValue ?? "")), I.change(K));
48
+ });
49
+ let J = h.useRef(null), Y = c(B, J), X = i();
50
+ return n("input", r, {
51
+ ref: [g, J],
52
+ state: H,
53
+ props: [
54
+ {
55
+ id: W,
56
+ disabled: B,
57
+ name: V,
58
+ ref: I.inputRef,
59
+ "aria-labelledby": U,
60
+ autoFocus: T,
61
+ ...G ? { value: x } : { defaultValue: w },
62
+ onChange(e) {
63
+ let t = e.currentTarget.value, n = o(a, e.nativeEvent);
64
+ C?.(t, n), !G && (M(t !== (N.initialValue ?? "")), P(t !== ""), !e.nativeEvent.defaultPrevented && !n.isCanceled && (L(V), I.change(t)));
65
+ },
66
+ onFocus() {
67
+ Y(!0);
68
+ },
69
+ onBlur(e) {
70
+ if (j(!0), Y(!1), F === "onBlur") {
71
+ let t = e.currentTarget.value;
72
+ I.commit(t), G && queueMicrotask(() => {
73
+ let e = I.inputRef.current?.value;
74
+ e !== void 0 && e !== t && e !== (N.initialValue ?? "") && I.commit(e);
75
+ });
76
+ }
77
+ },
78
+ onKeyDown(e) {
79
+ if (e.currentTarget.tagName === "INPUT" && e.key === "Enter") {
80
+ j(!0);
81
+ let t = e.currentTarget.value, n = e.currentTarget.form;
82
+ if (n && n === R.current && !e.defaultPrevented) {
83
+ let t = e.currentTarget, n = z.current;
84
+ X.start(0, () => {
85
+ z.current === n && I.commit(t.value);
86
+ });
87
+ } else I.commit(t);
88
+ }
89
+ }
90
+ },
91
+ D,
92
+ (e) => I.getValidationProps(B, e)
93
+ ],
94
+ stateAttributesMapping: m
95
+ });
96
+ }), E = /*#__PURE__*/ h.forwardRef(function(e, t) {
97
+ return /*#__PURE__*/ v(T, {
98
+ ref: t,
99
+ ...e
100
+ });
101
+ }), D = h.forwardRef(function({ className: e, type: t, ...n }, i) {
102
+ return /* @__PURE__ */ v(E, {
103
+ ref: i,
104
+ type: t,
105
+ "data-slot": "input",
106
+ className: r("ck-input", e),
107
+ ...n
108
+ });
109
+ });
110
+ D.displayName = "Input";
111
+ export { b as a, S as i, C as n, x as o, w as r, D as t };
@@ -1,5 +1,5 @@
1
- import { o as e } from "./websocket-manager-CvgZSo_L.js";
2
- import { u as t } from "./comment-kit-core-D068rcdY.js";
1
+ import { o as e } from "./websocket-manager-KhH4hL0Q.js";
2
+ import { u as t } from "./comment-kit-core-CmLUFujd.js";
3
3
  import { n } from "./errors-Bu5ajEmB.js";
4
4
  var r = null, i = /* @__PURE__ */ new Set();
5
5
  function a() {
@@ -150,9 +150,9 @@ async function b(e, r = {}) {
150
150
  import("react"),
151
151
  import("react-dom/client"),
152
152
  import("./styles-CnYsLS2f.js"),
153
- import("./shadow-root-3-yGIhMs.js"),
153
+ import("./shadow-root-B58ZI2yz.js"),
154
154
  import("./error-boundary-D3PD74vI.js"),
155
- import("./comment-kit-ui-BDzNt0jv.js").then((e) => e.t)
155
+ import("./comment-kit-ui-BHwYuSIi.js").then((e) => e.t)
156
156
  ]);
157
157
  if (!h || t !== w) return;
158
158
  let f = g(n, "createElement"), p = g(r, "createRoot"), m = l.ShadowContainer, _ = u.ErrorBoundary;
@@ -1,4 +1,4 @@
1
- import { a as e } from "./websocket-manager-CvgZSo_L.js";
1
+ import { a as e } from "./websocket-manager-KhH4hL0Q.js";
2
2
  var t = /* @__PURE__ */ e(((e, t) => {
3
3
  (function(n, r) {
4
4
  typeof e == "object" && typeof t == "object" ? t.exports = r() : typeof define == "function" && define.amd ? define([], r) : typeof e == "object" ? e.Pusher = r() : n.Pusher = r();
@@ -1,6 +1,6 @@
1
- import { i as e, n as t, r as n, t as r } from "./websocket-manager-CvgZSo_L.js";
1
+ import { i as e, n as t, r as n, t as r } from "./websocket-manager-KhH4hL0Q.js";
2
2
  import { a as i, d as a, i as o, l as s, o as c } from "./validation-3wbbbuX0.js";
3
- import { s as l } from "./comment-kit-core-D068rcdY.js";
3
+ import { s as l } from "./comment-kit-core-CmLUFujd.js";
4
4
  import { o as u } from "./dom-Bhf4WFtY.js";
5
5
  import { i as d } from "./text-B4HHZNaa.js";
6
6
  var f = l.ID, p = l.CONTENT, m = l.NAME, h = l.EMAIL, g = l.PAGE, _ = l.EMOJI, v = l.ONLINE_USERS, y = l.REACTION_COUNT, b = 33, x = 1e3, S = l.CURSOR_EMITS_PER_SEC;
@@ -1,7 +1,7 @@
1
1
  import { a as e, n as t, o as n, t as r } from "./validation-3wbbbuX0.js";
2
- import { r as i } from "./comment-kit-core-D068rcdY.js";
2
+ import { r as i } from "./comment-kit-core-CmLUFujd.js";
3
3
  import { o as a, r as o } from "./dom-Bhf4WFtY.js";
4
- import { t as s } from "./capture-privacy-DUROnio5.js";
4
+ import { t as s } from "./capture-privacy-CiOrcAlt.js";
5
5
  var c = /* @__PURE__ */ new WeakMap(), l = 1e4, u = 2048, d = 10485760, f = 20971520, p = 16384, m = 32e6, h = 10, g = 10485760, _ = 26214400, v = /* @__PURE__ */ new Set([
6
6
  "jpg",
7
7
  "jpeg",
@@ -1,4 +1,4 @@
1
- import { o as e, r as t } from "./mount-ui-DuHk132g.js";
1
+ import { o as e, r as t } from "./mount-ui-Dz7FB_Ak.js";
2
2
  import { i as n, n as r, t as i } from "./ShadowRootContext-DD6a0QaI.js";
3
3
  import * as a from "react";
4
4
  import { useCallback as o, useEffect as s, useMemo as c, useRef as l, useState as u } from "react";
@@ -1,5 +1,5 @@
1
1
  import { f as e } from "./validation-3wbbbuX0.js";
2
- import { _ as t, a as n, i as r, o as i } from "./comment-kit-core-D068rcdY.js";
2
+ import { _ as t, a as n, i as r, o as i } from "./comment-kit-core-CmLUFujd.js";
3
3
  async function a(a, o, s, c) {
4
4
  if (!s()) return !1;
5
5
  if (!e(o, 4096)) throw Error("Invalid member session token");
@@ -8,7 +8,7 @@ async function a(a, o, s, c) {
8
8
  let d = await u.verifySession();
9
9
  if (!s()) return !1;
10
10
  if (d.success !== !0 || d.verified !== !0 || !n(d.user) || !r(d.project) || d.project.id !== a.config.projectId) throw Error("Member session could not be verified");
11
- return a.apiClient.setAuthToken(l), a.apiClient.setUserEmail(d.user.email), c && i(a.config.projectId, {
11
+ return a.apiClient.setAuthToken(l), a.apiClient.setUserEmail(d.user.email), a.config.inviteToken = void 0, c && i(a.config.projectId, {
12
12
  token: l,
13
13
  email: d.user.email,
14
14
  user: d.user
@@ -0,0 +1,154 @@
1
+ import { F as e, L as t, P as n, R as r, f as i, z as a } from "./button-D4GHW6oZ.js";
2
+ import { n as o } from "./useValueChanged-DKq5cMot.js";
3
+ import * as s from "react";
4
+ var c = "data-valid", l = "data-invalid", u = {
5
+ badInput: !1,
6
+ customError: !1,
7
+ patternMismatch: !1,
8
+ rangeOverflow: !1,
9
+ rangeUnderflow: !1,
10
+ stepMismatch: !1,
11
+ tooLong: !1,
12
+ tooShort: !1,
13
+ typeMismatch: !1,
14
+ valid: null,
15
+ valueMissing: !1
16
+ }, d = {
17
+ valid: null,
18
+ touched: !1,
19
+ dirty: !1,
20
+ filled: !1,
21
+ focused: !1
22
+ }, f = {
23
+ disabled: !1,
24
+ ...d
25
+ }, p = { valid(e) {
26
+ return e === null ? null : e ? { [c]: "" } : { [l]: "" };
27
+ } }, m = {
28
+ invalid: void 0,
29
+ name: void 0,
30
+ validityData: {
31
+ state: u,
32
+ errors: [],
33
+ error: "",
34
+ value: "",
35
+ initialValue: null
36
+ },
37
+ setValidityData: r,
38
+ disabled: void 0,
39
+ setTouched: r,
40
+ setDirty: r,
41
+ setFilled: r,
42
+ setFocused: r,
43
+ focusOwnerRef: { current: void 0 },
44
+ validationMode: "onSubmit",
45
+ shouldValidateOnChange: () => !1,
46
+ state: f,
47
+ registerFieldControl: r,
48
+ validation: {
49
+ getValidationProps: (e, n = t) => n,
50
+ inputRef: { current: null },
51
+ registeredInputs: /* @__PURE__ */ new Map(),
52
+ registerInput: r,
53
+ getInputControl: () => null,
54
+ commit: async () => {},
55
+ change: r
56
+ }
57
+ }, h = /*#__PURE__*/ s.createContext(m);
58
+ function g(e = !0) {
59
+ let t = s.useContext(h);
60
+ if (t.setValidityData === r && !e) throw Error(n(28));
61
+ return t;
62
+ }
63
+ function _(t, n, r) {
64
+ let { setFocused: a, focusOwnerRef: o } = g(), s = i((e) => {
65
+ (e ? !t : o.current === s) && (o.current = e && s, r?.(e), a(e));
66
+ });
67
+ return e(() => {
68
+ let e = n.current;
69
+ return e?.getRootNode()?.activeElement === e && s(!0), () => s(!1);
70
+ }, [
71
+ t,
72
+ n,
73
+ s
74
+ ]), s;
75
+ }
76
+ function v(t, n, r, i, o = !0, s) {
77
+ let { registerFieldControl: c } = g(), l = a(() => Symbol());
78
+ e(() => {
79
+ let e = l.current;
80
+ o ? c(e, {
81
+ controlRef: t,
82
+ getValue: i,
83
+ id: n,
84
+ name: s,
85
+ value: r
86
+ }) : c(e, void 0);
87
+ }, [
88
+ t,
89
+ o,
90
+ i,
91
+ n,
92
+ s,
93
+ c,
94
+ l,
95
+ r
96
+ ]), e(() => {
97
+ let e = l.current;
98
+ return () => {
99
+ c(e, void 0);
100
+ };
101
+ }, [c, l]);
102
+ }
103
+ var y = /*#__PURE__*/ s.createContext({
104
+ elementRef: { current: null },
105
+ formRef: { current: { fields: /* @__PURE__ */ new Map() } },
106
+ errors: {},
107
+ clearErrors: r,
108
+ validationMode: "onSubmit",
109
+ submitCountRef: { current: 0 }
110
+ });
111
+ function b() {
112
+ return s.useContext(y);
113
+ }
114
+ var x = /*#__PURE__*/ s.createContext({
115
+ controlId: void 0,
116
+ registerControlId: r,
117
+ resetControlId: r,
118
+ labelId: void 0,
119
+ setLabelId: r,
120
+ messageIds: [],
121
+ setMessageIds: r,
122
+ getDescriptionProps: (e) => e
123
+ });
124
+ function S() {
125
+ return s.useContext(x);
126
+ }
127
+ function C(t = {}) {
128
+ let { id: n, enabled: c = !0 } = t, { controlId: l, registerControlId: u, resetControlId: d } = S(), f = o(), p = a(() => Symbol()), m = s.useRef(!1), h = s.useRef(!1), g = i(() => {
129
+ m.current && u !== r && (m.current = !1, u(p.current, void 0));
130
+ });
131
+ return e(() => {
132
+ if (!c || u === r) {
133
+ g();
134
+ return;
135
+ }
136
+ let e;
137
+ if (n !== void 0) h.current = !0, e = n;
138
+ else if (h.current) e = f;
139
+ else {
140
+ d();
141
+ return;
142
+ }
143
+ e === void 0 ? g() : (m.current = !0, u(p.current, e));
144
+ }, [
145
+ n,
146
+ c,
147
+ u,
148
+ d,
149
+ f,
150
+ p,
151
+ g
152
+ ]), e(() => g, [g]), (c ? l : void 0) ?? n ?? f;
153
+ }
154
+ export { _ as a, g as c, v as i, d as l, S as n, m as o, b as r, h as s, C as t, p as u };
@@ -1,5 +1,5 @@
1
1
  import { d as e, f as t, i as n, l as r, o as i, p as a } from "./validation-3wbbbuX0.js";
2
- import { s as o } from "./comment-kit-core-D068rcdY.js";
2
+ import { s as o } from "./comment-kit-core-CmLUFujd.js";
3
3
  import { i as s } from "./text-B4HHZNaa.js";
4
4
  var c = Object.create, l = Object.defineProperty, u = Object.getOwnPropertyDescriptor, d = Object.getOwnPropertyNames, f = Object.getPrototypeOf, p = Object.prototype.hasOwnProperty, m = (e, t) => () => (t || (e((t = { exports: {} }).exports, t, t.exports), e = null), t.exports), h = (e, t) => {
5
5
  let n = {};
@@ -57,7 +57,7 @@ function S(e) {
57
57
  }
58
58
  var C = null;
59
59
  function w() {
60
- return C ||= import("./pusher-3jyUauYd.js").then((e) => /* @__PURE__ */ _(e.default, 1)).then((e) => e.default ?? e), C;
60
+ return C ||= import("./pusher-CnhQgAvF.js").then((e) => /* @__PURE__ */ _(e.default, 1)).then((e) => e.default ?? e), C;
61
61
  }
62
62
  var T = o.ID, E = o.NAME, D = o.EMAIL, O = o.PAGE, k = o.COLOR, A = o.DRAWING_PATH_DATA, j = o.DRAWING_TEXT, M = o.ONLINE_USERS, N = {
63
63
  id: "unknown",
package/dist/solid.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as e } from "./shared/comment-kit-core-D068rcdY.js";
1
+ import { t as e } from "./shared/comment-kit-core-CmLUFujd.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 { createMemo as o, createSignal as s, onCleanup as c, onMount as l } from "solid-js";
@@ -24,7 +24,7 @@ function u(u) {
24
24
  }
25
25
  }, K = async (e) => {
26
26
  try {
27
- let { mountCommentKitUI: t } = await import("./shared/mount-ui-DuHk132g.js").then((e) => e.n);
27
+ let { mountCommentKitUI: t } = await import("./shared/mount-ui-Dz7FB_Ak.js").then((e) => e.n);
28
28
  if (w || x !== e) return;
29
29
  let n = await t(e);
30
30
  if (w || x !== e) {
package/dist/svelte.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as e } from "./shared/comment-kit-core-D068rcdY.js";
1
+ import { t as e } from "./shared/comment-kit-core-CmLUFujd.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 { onDestroy as o } from "svelte";
@@ -23,7 +23,7 @@ function d(o) {
23
23
  } catch {}
24
24
  }, B = async (e) => {
25
25
  try {
26
- let { mountCommentKitUI: t } = await import("./shared/mount-ui-DuHk132g.js").then((e) => e.n);
26
+ let { mountCommentKitUI: t } = await import("./shared/mount-ui-Dz7FB_Ak.js").then((e) => e.n);
27
27
  if (I || c(d) !== e) return;
28
28
  let n = await t(e);
29
29
  if (I || c(d) !== e) {
@@ -7,6 +7,8 @@ export declare class ApiClient {
7
7
  private userEmail;
8
8
  private authToken;
9
9
  private authRevision;
10
+ private pendingInvite;
11
+ private inviteRevision;
10
12
  private environment;
11
13
  private onAuthExpired;
12
14
  constructor(config: ResolvedConfig);
@@ -101,8 +101,8 @@ export declare class CommentKitCore extends EventEmitter {
101
101
  getConfig(): Readonly<CommentKitConfig>;
102
102
  /**
103
103
  * Validate a member invite token + email against the backend.
104
- * If valid, the user is created/added to the org, and the normal OTP flow
105
- * (triggered automatically on success) can proceed.
104
+ * Validation prepares the invitation challenge; OTP and enrolled MFA must
105
+ * still complete before the backend grants access.
106
106
  */
107
107
  validateInvite(email: string): Promise<void>;
108
108
  /**
@@ -166,6 +166,7 @@ export declare class CommentKitCore extends EventEmitter {
166
166
  addReply(commentId: string, content: string, options?: ReplyOptions): Promise<void>;
167
167
  updateReply(commentId: string, replyId: string, content: string, options?: ReplyOptions): Promise<void>;
168
168
  deleteReply(commentId: string, replyId: string): Promise<void>;
169
+ private requireThreadStatus;
169
170
  resolveComment(commentId: string): Promise<void>;
170
171
  unresolveComment(commentId: string): Promise<void>;
171
172
  selectComment(comment: Comment | null): void;
@@ -216,6 +217,7 @@ export declare class CommentKitCore extends EventEmitter {
216
217
  * For source-resolved output (file:line:col + component stack), use
217
218
  * `getAgentContextAsync` instead, which awaits source resolution when available.
218
219
  */
220
+ private requireAgentExport;
219
221
  getAgentContext(options?: AgentContextOptions): AgentContextExport;
220
222
  /**
221
223
  * Same as `getAgentContext` but also resolves each comment's element to a
@@ -190,7 +190,7 @@ export interface Organization {
190
190
  slug: string;
191
191
  owner: User;
192
192
  members: OrganizationMember[];
193
- plan: "none" | "pro" | "ltd";
193
+ plan: "none" | "pro" | "ltd" | null;
194
194
  createdAt: string;
195
195
  updatedAt: string;
196
196
  }
@@ -198,7 +198,7 @@ export interface Organization {
198
198
  export interface OrganizationMember {
199
199
  id: string;
200
200
  user: User;
201
- role: "owner" | "admin" | "member";
201
+ role: "owner" | "admin" | "member" | "reviewer";
202
202
  joinedAt: string;
203
203
  }
204
204
  export interface Project {
@@ -244,16 +244,16 @@ export interface ProjectContext {
244
244
  organization: {
245
245
  id: string;
246
246
  name: string;
247
- plan: "none" | "pro" | "ltd";
247
+ plan: "none" | "pro" | "ltd" | null;
248
248
  };
249
249
  members: Array<User & {
250
- role: "owner" | "admin" | "member";
250
+ role: "owner" | "admin" | "member" | "reviewer";
251
251
  }>;
252
252
  usage: {
253
253
  used: number;
254
254
  limit: number | null;
255
255
  label: string;
256
- };
256
+ } | null;
257
257
  branches: Array<{
258
258
  name: string;
259
259
  }>;
@@ -261,6 +261,11 @@ export interface ProjectContext {
261
261
  canManageComments: boolean;
262
262
  canInvite: boolean;
263
263
  canWriteComments?: boolean;
264
+ canTriage?: boolean;
265
+ canComplete?: boolean;
266
+ canExportAgentContext?: boolean;
267
+ canUseMcp?: boolean;
268
+ accessScope?: "workspace" | "project";
264
269
  writeRestriction?: "plan_required" | "feature_disabled" | null;
265
270
  };
266
271
  }
@@ -637,6 +642,8 @@ export interface SessionVerificationResponse {
637
642
  project: Project;
638
643
  }
639
644
  export interface InviteValidationResponse {
645
+ accessScope?: "workspace" | "project";
646
+ invitationChallenge?: string | null;
640
647
  success: boolean;
641
648
  message: string;
642
649
  user: User;
@@ -2,6 +2,8 @@ import type { CommentKitState, ResolvedConfig } from "./types";
2
2
  export interface CommentWriteAccess {
3
3
  canWrite: boolean;
4
4
  canManageComments: boolean;
5
+ canTriage?: boolean;
6
+ canComplete?: boolean;
5
7
  planRequired: boolean;
6
8
  message: string;
7
9
  }
package/dist/vue.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as e } from "./shared/comment-kit-core-D068rcdY.js";
1
+ import { t as e } from "./shared/comment-kit-core-CmLUFujd.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-DuHk132g.js").then((e) => e.n);
22
+ let { mountCommentKitUI: t } = await import("./shared/mount-ui-Dz7FB_Ak.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) {
@@ -367,7 +367,7 @@ import type {
367
367
 
368
368
  **`Comment`** — A comment thread with author, position, replies, reactions, attachments, and task metadata.
369
369
 
370
- **`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.
370
+ **`ProjectContext`** — Authenticated project/organization identity, members and roles, storage usage (`limit: null` for unlimited), branch names and permissions. `canManageComments` identifies owner/admin moderation; `canTriage`, `canComplete`, `canExportAgentContext`, `canUseMcp` and `accessScope` distinguish internal members from project reviewers. External reviewers receive `organization.plan: null`, `usage: null` and no participant email directory. These optional capabilities preserve compatibility with earlier servers. `project.isPlayground` is a server-owned presentation flag; it never grants permissions.
371
371
 
372
372
  **`ReplyOptions`** — Optional attachment IDs, mentions and a typed quote target for reply creation/editing.
373
373
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commentkit/comment-kit",
3
- "version": "0.7.5",
3
+ "version": "0.7.7",
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",