@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { A as e, B as t, C as n, D as r, E as i, F as a, I as o, L as s, M as c, N as l, O as u, P as d, S as f, T as p, V as m, _ as h, b as g, c as _, d as v, j as y, k as b, m as x, p as S, u as C, v as w, w as T, x as E, y as D, z as O } from "./button-By0hGrJK.js";
|
|
2
2
|
import { C as k, D as A, F as j, N as M, O as N, P, S as ee, d as te, i as F, j as I, k as L, l as ne, n as re, p as R, r as z } from "./useValueChanged-CrzfD8l-.js";
|
|
3
|
-
import {
|
|
3
|
+
import { a as ie, r as ae } from "./ShadowRootContext-CjciYxVN.js";
|
|
4
4
|
import * as B from "react";
|
|
5
5
|
import { useDebugValue as V, useEffect as oe, useLayoutEffect as H, useMemo as se, useRef as ce, useSyncExternalStore as le, useSyncExternalStore as U } from "react";
|
|
6
6
|
import { jsx as W, jsxs as ue } from "react/jsx-runtime";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { o as e, r as t } from "./mount-ui-
|
|
2
|
-
import {
|
|
3
|
-
import * as
|
|
4
|
-
import { useCallback as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { createPortal as
|
|
7
|
-
var
|
|
8
|
-
let { direction: t = "ltr" } = e, r =
|
|
9
|
-
return /*#__PURE__*/
|
|
1
|
+
import { o as e, r as t } from "./mount-ui-Dz5QLq4W.js";
|
|
2
|
+
import { i as n, n as r, t as i } from "./ShadowRootContext-CjciYxVN.js";
|
|
3
|
+
import * as a from "react";
|
|
4
|
+
import { useCallback as o, useEffect as s, useMemo as c, useRef as l, useState as u } from "react";
|
|
5
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
6
|
+
import { createPortal as m } from "react-dom";
|
|
7
|
+
var h = function(e) {
|
|
8
|
+
let { direction: t = "ltr" } = e, r = a.useMemo(() => ({ direction: t }), [t]);
|
|
9
|
+
return /*#__PURE__*/ f(n.Provider, {
|
|
10
10
|
value: r,
|
|
11
11
|
children: e.children
|
|
12
12
|
});
|
|
13
13
|
};
|
|
14
|
-
process.env.NODE_ENV !== "production" && (
|
|
15
|
-
var
|
|
16
|
-
function
|
|
14
|
+
process.env.NODE_ENV !== "production" && (h.displayName = "DirectionProvider");
|
|
15
|
+
var g = "https://fonts.googleapis.com/css2?family=Geist:wght@100..900&family=Geist+Mono:wght@100..900&display=swap";
|
|
16
|
+
function _() {
|
|
17
17
|
/* v8 ignore stop */
|
|
18
18
|
if (typeof document > "u" || document.querySelector("link[data-commentkit-font]")) return;
|
|
19
19
|
let e = getComputedStyle(document.documentElement);
|
|
@@ -25,12 +25,12 @@ function g() {
|
|
|
25
25
|
t.rel = "preconnect", t.href = "https://fonts.gstatic.com", t.crossOrigin = "anonymous", document.head.appendChild(t);
|
|
26
26
|
}
|
|
27
27
|
let t = document.createElement("link");
|
|
28
|
-
t.rel = "stylesheet", t.href =
|
|
28
|
+
t.rel = "stylesheet", t.href = g, t.setAttribute("data-commentkit-font", "geist"), document.head.appendChild(t);
|
|
29
29
|
}
|
|
30
|
-
var
|
|
31
|
-
let
|
|
32
|
-
|
|
33
|
-
let e =
|
|
30
|
+
var v = ({ children: n, styles: i, config: a }) => {
|
|
31
|
+
let g = l(null), [v, y] = u(null), [b, x] = u(null), [S, C] = u(!1), [w, T] = u("ltr"), E = a?.ui?.loadRemoteFonts === !0, D = a?.ui?.theme;
|
|
32
|
+
s(() => {
|
|
33
|
+
let e = g.current;
|
|
34
34
|
/* v8 ignore start -- ref always set when useEffect fires */
|
|
35
35
|
if (e) {
|
|
36
36
|
/* v8 ignore stop */
|
|
@@ -42,11 +42,11 @@ var _ = ({ children: n, styles: i, config: h }) => {
|
|
|
42
42
|
y(t);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
}, []),
|
|
46
|
-
E &&
|
|
47
|
-
}, [E]),
|
|
45
|
+
}, []), s(() => {
|
|
46
|
+
E && _();
|
|
47
|
+
}, [E]), s(() => {
|
|
48
48
|
let n = document.documentElement, r = window.matchMedia("(prefers-color-scheme: dark)"), i = () => {
|
|
49
|
-
T(getComputedStyle(
|
|
49
|
+
T(getComputedStyle(g.current || n).direction === "rtl" ? "rtl" : "ltr");
|
|
50
50
|
let e = t();
|
|
51
51
|
if (e) {
|
|
52
52
|
C(e === "dark");
|
|
@@ -81,7 +81,7 @@ var _ = ({ children: n, styles: i, config: h }) => {
|
|
|
81
81
|
o(), a.disconnect(), r.removeEventListener("change", i);
|
|
82
82
|
};
|
|
83
83
|
}, [D]);
|
|
84
|
-
let O =
|
|
84
|
+
let O = o(() => {
|
|
85
85
|
/* v8 ignore start -- SSR guard unreachable in jsdom */
|
|
86
86
|
if (typeof window > "u") return "";
|
|
87
87
|
/* v8 ignore stop */
|
|
@@ -89,8 +89,8 @@ var _ = ({ children: n, styles: i, config: h }) => {
|
|
|
89
89
|
if (!a && !o && !i) return "";
|
|
90
90
|
let s = [];
|
|
91
91
|
return a && s.push(t ? `--font-sans: ${a}, ui-sans-serif, sans-serif` : `--font-sans: ${a}, "DM Sans", "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`), o && s.push(n ? `--font-heading: ${o}, ui-sans-serif, sans-serif` : `--font-heading: ${o}, var(--font-sans)`), i && s.push(`--font-mono: ${i}, "Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace`), `:host { ${s.join("; ")}; }`;
|
|
92
|
-
}, []), [k, A] =
|
|
93
|
-
|
|
92
|
+
}, []), [k, A] = u(() => O());
|
|
93
|
+
s(() => {
|
|
94
94
|
let e = !1, t = () => {
|
|
95
95
|
if (e) return;
|
|
96
96
|
let t = O();
|
|
@@ -102,9 +102,9 @@ var _ = ({ children: n, styles: i, config: h }) => {
|
|
|
102
102
|
e = !0, clearTimeout(n);
|
|
103
103
|
};
|
|
104
104
|
}, [O]);
|
|
105
|
-
let j =
|
|
106
|
-
return /* @__PURE__ */
|
|
107
|
-
ref:
|
|
105
|
+
let j = c(() => i + "\n" + k, [i, k]);
|
|
106
|
+
return /* @__PURE__ */ f("div", {
|
|
107
|
+
ref: g,
|
|
108
108
|
"data-commentkit-host": !0,
|
|
109
109
|
"data-ck-dark": S || void 0,
|
|
110
110
|
style: {
|
|
@@ -117,14 +117,14 @@ var _ = ({ children: n, styles: i, config: h }) => {
|
|
|
117
117
|
zIndex: 2147483647,
|
|
118
118
|
pointerEvents: "none"
|
|
119
119
|
},
|
|
120
|
-
children: v &&
|
|
120
|
+
children: v && m(/* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("style", { children: j }), /* @__PURE__ */ f(r.Provider, {
|
|
121
121
|
value: b,
|
|
122
|
-
children: /* @__PURE__ */
|
|
122
|
+
children: /* @__PURE__ */ f("div", {
|
|
123
123
|
ref: x,
|
|
124
124
|
className: "ck-root",
|
|
125
125
|
"data-commentkit-ui": !0,
|
|
126
126
|
"data-theme": S ? "dark" : "light",
|
|
127
|
-
children: b ? /* @__PURE__ */
|
|
127
|
+
children: b ? /* @__PURE__ */ f(h, {
|
|
128
128
|
direction: w,
|
|
129
129
|
children: n
|
|
130
130
|
}) : null
|
|
@@ -132,4 +132,4 @@ var _ = ({ children: n, styles: i, config: h }) => {
|
|
|
132
132
|
})] }), v)
|
|
133
133
|
});
|
|
134
134
|
};
|
|
135
|
-
export {
|
|
135
|
+
export { i as HostModalContext, v as ShadowContainer };
|