@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,7 +1,7 @@
|
|
|
1
|
-
import { s as e } from "./validation-
|
|
1
|
+
import { s as e } from "./validation-3wbbbuX0.js";
|
|
2
2
|
import { n as t } from "./dist-De294MVF.js";
|
|
3
3
|
import { t as n } from "./button-By0hGrJK.js";
|
|
4
|
-
import { q as r } from "./comment-kit-ui-
|
|
4
|
+
import { q as r } from "./comment-kit-ui-BjJ1ZLiv.js";
|
|
5
5
|
import * as i from "react";
|
|
6
6
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
7
|
function s(e) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { O as e, c as t, d as n, s as r } from "./button-By0hGrJK.js";
|
|
2
|
-
import { t as i } from "./separator-
|
|
2
|
+
import { t as i } from "./separator-aphZiRoJ.js";
|
|
3
3
|
import { t as a } from "./useRender-D1z_X_BY.js";
|
|
4
4
|
import * as o from "react";
|
|
5
5
|
import { jsx as s } from "react/jsx-runtime";
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
var e = "[data-commentkit],[data-commentkit-host],[data-commentkit-ui],[data-commentkit-panel],[data-commentkit-redact],[data-html2canvas-ignore],input[type=\"password\"],input[type=\"hidden\"]," + [
|
|
2
|
+
"current-password",
|
|
3
|
+
"new-password",
|
|
4
|
+
"one-time-code",
|
|
5
|
+
"cc-name",
|
|
6
|
+
"cc-given-name",
|
|
7
|
+
"cc-additional-name",
|
|
8
|
+
"cc-family-name",
|
|
9
|
+
"cc-number",
|
|
10
|
+
"cc-exp",
|
|
11
|
+
"cc-exp-month",
|
|
12
|
+
"cc-exp-year",
|
|
13
|
+
"cc-csc",
|
|
14
|
+
"cc-type"
|
|
15
|
+
].map((e) => `[autocomplete~="${e}" i]`).join(",");
|
|
16
|
+
function t(t) {
|
|
17
|
+
try {
|
|
18
|
+
let n = t;
|
|
19
|
+
for (; n;) {
|
|
20
|
+
if (n.closest(e)) return !0;
|
|
21
|
+
let t = n.getRootNode();
|
|
22
|
+
n = t instanceof ShadowRoot ? t.host : null;
|
|
23
|
+
}
|
|
24
|
+
return !1;
|
|
25
|
+
} catch {
|
|
26
|
+
return !0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
var n = /* @__PURE__ */ new Set([
|
|
30
|
+
"script",
|
|
31
|
+
"style",
|
|
32
|
+
"template",
|
|
33
|
+
"noscript",
|
|
34
|
+
"iframe",
|
|
35
|
+
"object",
|
|
36
|
+
"embed"
|
|
37
|
+
]), r = /* @__PURE__ */ new Set([
|
|
38
|
+
"input",
|
|
39
|
+
"textarea",
|
|
40
|
+
"select"
|
|
41
|
+
]), i = /* @__PURE__ */ new Set([
|
|
42
|
+
"id",
|
|
43
|
+
"class",
|
|
44
|
+
"role",
|
|
45
|
+
"aria-label",
|
|
46
|
+
"title",
|
|
47
|
+
"type",
|
|
48
|
+
"name"
|
|
49
|
+
]), a = 2e3, o = 100, s = 16e3;
|
|
50
|
+
function c(e) {
|
|
51
|
+
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
52
|
+
}
|
|
53
|
+
function l(e) {
|
|
54
|
+
let l = 0, u = 0, d = [], f = (e, p) => {
|
|
55
|
+
if (++l > a || p > o || u >= s) return "";
|
|
56
|
+
if (e.nodeType === 3) {
|
|
57
|
+
let t = (e.textContent ?? "").slice(0, s - u);
|
|
58
|
+
return u += t.length, d.push(t), c(t);
|
|
59
|
+
}
|
|
60
|
+
if (e.nodeType !== 1) return "";
|
|
61
|
+
let m = e, h = m.tagName.toLowerCase();
|
|
62
|
+
if (n.has(h) || t(m)) return "";
|
|
63
|
+
let g = Array.from(m.attributes).filter((e) => i.has(e.name)).map((e) => {
|
|
64
|
+
let t = e.value.slice(0, Math.max(0, s - u));
|
|
65
|
+
return u += t.length, ` ${e.name}="${c(t)}"`;
|
|
66
|
+
}).join(""), _ = r.has(h) || m.hasAttribute("contenteditable"), v = "";
|
|
67
|
+
if (!_) {
|
|
68
|
+
for (let e of m.childNodes) if (v += f(e, p + 1), l >= a || u >= s) break;
|
|
69
|
+
}
|
|
70
|
+
return `<${h}${g}>${v}</${h}>`;
|
|
71
|
+
}, p = f(e, 0);
|
|
72
|
+
return {
|
|
73
|
+
text: d.join(""),
|
|
74
|
+
html: p
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
export { l as n, t };
|
package/dist/shared/{comment-drawing-canvas-DdXlMgbF.js → comment-drawing-canvas-CYFFKgCm.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "./annotation-toolbar-
|
|
2
|
-
import { N as r, a as i, g as a, i as o } from "./comment-kit-ui-
|
|
1
|
+
import { n as e, r as t, t as n } from "./annotation-toolbar-CZI1KVdW.js";
|
|
2
|
+
import { N as r, a as i, g as a, i as o } from "./comment-kit-ui-BjJ1ZLiv.js";
|
|
3
3
|
import * as s from "react";
|
|
4
4
|
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
5
5
|
var d = ".ck-annotation-toolbar{background-color:var(--background);width:100%;max-width:100%;box-shadow:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a, 0 0 0 1px color-mix(in oklch, var(--foreground) 5%, transparent);border-radius:2rem;flex-wrap:wrap;justify-content:center;align-items:center;gap:.375rem .5rem;margin-inline:auto;padding:.375rem;display:flex}@media (width>=1024px){.ck-annotation-toolbar{width:fit-content}}.ck-annotation-separator.ck-separator[data-orientation=vertical]{height:1rem;display:none}@media (width>=1024px){.ck-annotation-separator.ck-separator[data-orientation=vertical]{display:block}}.ck-annotation-stroke{align-items:center;gap:.5rem;width:7rem;padding-inline:.25rem;display:flex}@media (width>=1024px){.ck-annotation-stroke{width:12rem}}.ck-annotation-slider{flex:auto;min-width:0}.ck-annotation-stroke-label{color:var(--muted-foreground);font-variant-numeric:tabular-nums;flex-shrink:0;font-size:.75rem;line-height:1rem}.ck-annotation-swatch{background-color:var(--ck-bg);width:.875rem;height:.875rem;box-shadow:0 0 0 1px color-mix(in oklch, var(--foreground) 5%, transparent);border-radius:999px}.ck-annotation-tooltip{align-items:center;gap:.375rem;display:inline-flex}.ck-annotation-save--disabled{opacity:.5}.ck-drawing-canvas{z-index:var(--z-ck-marker-layer);cursor:none;pointer-events:auto;flex-direction:column;padding-top:1rem;display:flex;position:fixed;inset:0}.ck-drawing-canvas-scrim{pointer-events:none;background-color:#0000004d;position:absolute;inset:0}@supports ((-webkit-backdrop-filter:blur(4px)) or (backdrop-filter:blur(4px))){.ck-drawing-canvas-scrim{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}}.ck-drawing-canvas-toolbar{z-index:1;cursor:auto;width:100%;min-width:0;margin-inline:auto;padding-inline:.75rem;position:relative}.ck-drawing-canvas-surface{z-index:0;touch-action:none;flex:auto;min-height:0;position:relative}.ck-drawing-canvas-error{border-radius:var(--radius-md);background:var(--background);width:max-content;max-width:calc(100vw - 1.5rem);color:var(--destructive);margin:.75rem auto;padding:.75rem;font-size:.875rem}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { B as e, L as t, M as n, O as r, T as i, g as a, j as o, m as s, p as c, x as l, z as u } from "./button-By0hGrJK.js";
|
|
2
|
-
import { $t as d, Ct as f, Dt as p, Et as m, J as ee, Mt as h, Ot as g, Qt as te, Tt as ne, U as _, Z as re, Zt as v, at as ie, bt as ae, cn as oe, ct as se, en as y, gt as ce, in as le, it as ue, jt as de, kt as fe, lt as pe, nn as me, nt as he, ot as ge, rn as _e, rt as ve, tn as b, tt as ye, un as x, ut as be, wt as S } from "./separator-
|
|
2
|
+
import { $t as d, Ct as f, Dt as p, Et as m, J as ee, Mt as h, Ot as g, Qt as te, Tt as ne, U as _, Z as re, Zt as v, at as ie, bt as ae, cn as oe, ct as se, en as y, gt as ce, in as le, it as ue, jt as de, kt as fe, lt as pe, nn as me, nt as he, ot as ge, rn as _e, rt as ve, tn as b, tt as ye, un as x, ut as be, wt as S } from "./separator-aphZiRoJ.js";
|
|
3
3
|
import { N as xe, P as Se, f as Ce, j as we, k as C, t as w } from "./useValueChanged-CrzfD8l-.js";
|
|
4
4
|
import * as T from "react";
|
|
5
5
|
import { jsx as E, jsxs as Te } from "react/jsx-runtime";
|
package/dist/shared/{comment-image-lightbox-B7iHjnAz.js → comment-image-lightbox-DmTNxuqX.js}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as e } from "./dist-De294MVF.js";
|
|
2
2
|
import { s as t, t as n } from "./button-By0hGrJK.js";
|
|
3
|
-
import { i as r, o as i, r as a } from "./separator-
|
|
4
|
-
import { t as o } from "./comment-icon-
|
|
5
|
-
import { t as s } from "./button-group-
|
|
6
|
-
import { c, h as l, m as u, p as d } from "./comment-kit-ui-
|
|
7
|
-
import { r as f, t as p } from "./attachment-refresh-
|
|
3
|
+
import { i as r, o as i, r as a } from "./separator-aphZiRoJ.js";
|
|
4
|
+
import { t as o } from "./comment-icon-4SQd3nlz.js";
|
|
5
|
+
import { t as s } from "./button-group-C285iSkZ.js";
|
|
6
|
+
import { c, h as l, m as u, p as d } from "./comment-kit-ui-BjJ1ZLiv.js";
|
|
7
|
+
import { r as f, t as p } from "./attachment-refresh-mQw-L7hB.js";
|
|
8
8
|
import * as m from "react";
|
|
9
9
|
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
10
10
|
var v = ".ck-dialog-content.ck-image-lightbox{width:100vw;max-width:none;height:100dvh;max-height:none;box-shadow:none;background-color:#0000;border:0;border-radius:0;justify-content:center;align-items:center;gap:0;padding:0;display:flex;inset:0;translate:none}@media (width>=640px){.ck-dialog-content.ck-image-lightbox{max-width:none}}.ck-root[data-theme=dark] .ck-dialog-content.ck-image-lightbox{box-shadow:none}.ck-image-lightbox-prev,.ck-image-lightbox-next{position:absolute}.ck-image-lightbox-prev{inset-inline-start:1rem}.ck-image-lightbox-next{inset-inline-end:1rem}.ck-image-lightbox-photo{object-fit:contain;width:auto;max-width:90vw;height:auto;max-height:90vh}.ck-image-lightbox-meta{border-radius:var(--radius-xl);background-color:var(--muted);text-align:center;max-width:90vw;color:var(--muted-foreground);padding:.25rem .625rem;font-size:.75rem;line-height:1rem;position:absolute;bottom:3.5rem;left:50%;transform:translate(-50%)}.ck-image-lightbox-actions{top:1rem;position:absolute;inset-inline-end:1rem}.ck-image-lightbox-dots{gap:.5rem;display:flex;position:absolute;bottom:1.5rem}.ck-image-lightbox-dot{cursor:pointer;background-color:color-mix(in oklch, var(--foreground) 40%, transparent);border:0;border-radius:999px;width:.625rem;height:.625rem;padding:0;transition:background-color .15s cubic-bezier(.4,0,.2,1)}.ck-image-lightbox-dot:hover{background-color:color-mix(in oklch, var(--foreground) 60%, transparent)}.ck-image-lightbox-dot--active,.ck-image-lightbox-dot--active:hover{background-color:var(--foreground)}";
|
package/dist/shared/{comment-images-content-D7YNUgo5.js → comment-images-content-BX4DQ9Ol.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { d as e, s as t, t as n } from "./button-By0hGrJK.js";
|
|
2
2
|
import { t as r } from "./useRender-D1z_X_BY.js";
|
|
3
|
-
import { c as i, j as a, l as o, r as s } from "./comment-kit-ui-
|
|
4
|
-
import { n as c, r as l, t as u } from "./attachment-refresh-
|
|
3
|
+
import { c as i, j as a, l as o, r as s } from "./comment-kit-ui-BjJ1ZLiv.js";
|
|
4
|
+
import { n as c, r as l, t as u } from "./attachment-refresh-mQw-L7hB.js";
|
|
5
5
|
import * as d from "react";
|
|
6
6
|
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
7
7
|
var h = d.forwardRef(function({ ratio: e, className: n, style: r, ...i }, a) {
|
|
@@ -92,7 +92,7 @@ var x = d.forwardRef(function({ className: n, render: i, type: a, ...o }, s) {
|
|
|
92
92
|
render: i,
|
|
93
93
|
state: { slot: "attachment-trigger" }
|
|
94
94
|
});
|
|
95
|
-
}), S = () => import("./comment-image-lightbox-
|
|
95
|
+
}), S = () => import("./comment-image-lightbox-DmTNxuqX.js"), C = 3;
|
|
96
96
|
function w(e) {
|
|
97
97
|
return e.mimeType ? e.mimeType.startsWith("image/") : e.type === "screenshot" || e.type === "drawing" || e.thumbnail ? !0 : /^data:image\//i.test(e.url) || /\.(png|jpe?g|webp|gif|avif|svg)(?:[?#]|$)/i.test(e.filename ?? e.url);
|
|
98
98
|
}
|