@commentkit/comment-kit 0.7.0 → 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 +41 -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 +36 -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-mQw-L7hB.js +94 -0
- package/dist/shared/{button-group-Cl9CrvvU.js → button-group-C285iSkZ.js} +14 -16
- package/dist/shared/capture-colors-CxSLsU5-.js +74 -0
- package/dist/shared/capture-privacy-DUROnio5.js +77 -0
- package/dist/shared/{comment-drawing-canvas-Dzb5YoFw.js → comment-drawing-canvas-CYFFKgCm.js} +2 -2
- package/dist/shared/{comment-utils-BycYTSxA.js → comment-icon-4SQd3nlz.js} +30 -24
- package/dist/shared/comment-image-lightbox-DmTNxuqX.js +190 -0
- package/dist/shared/comment-images-content-BX4DQ9Ol.js +214 -0
- package/dist/shared/{comment-kit-core-BaSuMzp9.js → comment-kit-core-VuIidMeu.js} +1096 -793
- package/dist/shared/{comment-kit-ui-CzfdAZs2.js → comment-kit-ui-BjJ1ZLiv.js} +6091 -6486
- package/dist/shared/{comment-screenshot-annotator-C7X-_bm6.js → comment-screenshot-annotator-CMOG1md7.js} +5 -5
- package/dist/shared/{comment-screenshot-overlay-wIrZrcRy.js → comment-screenshot-overlay-iWW-V-Iw.js} +114 -118
- package/dist/shared/comment-shortcut-groups-CfEmkitU.js +153 -0
- package/dist/shared/{dev-export-panel-FwFVdady.js → dev-export-panel-CrRENbMn.js} +9 -10
- package/dist/shared/dev-grab-Ca4MlS2Y.js +196 -0
- package/dist/shared/{element-selector-BhJm-NSs.js → element-selector-g1bTvdEA.js} +450 -408
- package/dist/shared/{mount-ui--ijs8pWT.js → mount-ui-Dz5QLq4W.js} +121 -106
- package/dist/shared/{pusher-ipHMJnO_.js → pusher-ue0D83de.js} +1 -1
- package/dist/shared/realtime-CieWAnsW.js +321 -0
- package/dist/shared/realtime-recovery-BSVMwsXJ.js +135 -0
- 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-C5v-T8lQ.js → shadow-root-Cv1aLuFf.js} +31 -31
- package/dist/shared/{styles-D3yMtaec.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/useRender-D1z_X_BY.js +5 -0
- package/dist/shared/{validation-C7QG8j7Z.js → validation-3wbbbuX0.js} +26 -1
- package/dist/shared/websocket-manager-BnK55c3U.js +381 -0
- package/dist/solid.es.js +2 -2
- package/dist/svelte.es.js +2 -2
- package/dist/types/core/api-client.d.ts +11 -2
- package/dist/types/core/comment-kit-core.d.ts +11 -5
- package/dist/types/core/types.d.ts +54 -2
- package/dist/types/core/websocket-manager.d.ts +13 -0
- package/dist/types/core/write-access.d.ts +9 -0
- package/dist/vue.es.js +2 -2
- package/docs/api-reference.md +25 -4
- package/package.json +3 -2
- package/dist/shared/annotation-toolbar-B9SxYqoF.js +0 -1093
- package/dist/shared/comment-image-lightbox-BPYJT1sB.js +0 -183
- package/dist/shared/dev-grab-DDqg0LQf.js +0 -203
- package/dist/shared/realtime-Dk41VwKg.js +0 -302
- package/dist/shared/websocket-manager-DhLWh3Jr.js +0 -302
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as a } from "./
|
|
3
|
-
import {
|
|
4
|
-
import { t as s } from "./
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
1
|
+
import { u as e } from "./comment-kit-core-VuIidMeu.js";
|
|
2
|
+
import { a as t, i as n, m as r, n as i, o as a } from "./dom-Bhf4WFtY.js";
|
|
3
|
+
import { n as o } from "./dist-De294MVF.js";
|
|
4
|
+
import { t as s } from "./button-By0hGrJK.js";
|
|
5
|
+
import { t as c } from "./createReactComponent-BZHeRbD0.js";
|
|
6
|
+
import { G as l, K as ee, S as te, V as u, n as ne } from "./comment-kit-ui-BjJ1ZLiv.js";
|
|
7
|
+
import * as d from "react";
|
|
8
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
9
|
+
var re = c("outline", "paperclip", "Paperclip", [["path", {
|
|
9
10
|
d: "M15 7l-6.5 6.5a1.5 1.5 0 0 0 3 3l6.5 -6.5a3 3 0 0 0 -6 -6l-6.5 6.5a4.5 4.5 0 0 0 9 9l6.5 -6.5",
|
|
10
11
|
key: "svg-0"
|
|
11
|
-
}]]),
|
|
12
|
+
}]]), ie = c("outline", "x", "X", [["path", {
|
|
12
13
|
d: "M18 6l-12 12",
|
|
13
14
|
key: "svg-0"
|
|
14
15
|
}], ["path", {
|
|
15
16
|
d: "M6 6l12 12",
|
|
16
17
|
key: "svg-1"
|
|
17
|
-
}]]),
|
|
18
|
-
function y() {
|
|
19
|
-
if (_ || typeof document > "u") return;
|
|
20
|
-
let e = document.createElement("style");
|
|
21
|
-
e.setAttribute(m, ""), e.textContent = h, document.head.appendChild(e), _ = e;
|
|
22
|
-
}
|
|
18
|
+
}]]), h = ".ck-element-selector{z-index:calc(var(--z-ck-fab) - 1);pointer-events:none;position:fixed;inset:0}.ck-element-selector-outline,.ck-element-selector-mark{pointer-events:none;border-radius:4px;position:fixed}.ck-element-selector-outline{z-index:calc(var(--z-ck-fab) - 1);border:2px solid var(--primary);background-color:color-mix(in oklch, var(--primary) 8%, transparent);box-shadow:0 0 0 1px color-mix(in oklch, var(--background) 95%, transparent), 0 0 0 4px color-mix(in oklch, var(--primary) 18%, transparent)}.ck-element-selector-outline[data-state=selected]{background-color:color-mix(in oklch, var(--primary) 12%, transparent);border-style:solid}.ck-element-selector-outline[data-state=multi]{border-style:dashed;border-color:color-mix(in oklch, var(--primary) 70%, var(--foreground));background-color:color-mix(in oklch, var(--primary) 6%, transparent)}.ck-element-selector-outline[data-state=multi]:before{content:attr(data-multi-index);top:-10px;background:var(--primary);min-width:20px;height:20px;color:var(--primary-foreground,white);text-align:center;border-radius:999px;padding:0 6px;font:600 11px/20px ui-monospace,SF Mono,Menlo,monospace;position:absolute;inset-inline-start:-10px;box-shadow:0 1px 3px #00000040}.ck-element-selector-multibar{bottom:24px;z-index:calc(var(--z-ck-fab) + 1);border:1px solid var(--border);background-color:var(--popover);color:var(--popover-foreground);box-shadow:0 18px 30px -12px #00000047, 0 0 0 1px color-mix(in oklch, var(--foreground) 8%, transparent);pointer-events:auto;border-radius:999px;align-items:center;gap:8px;padding:6px 10px;font:13px/1 system-ui,sans-serif;display:inline-flex;position:fixed;inset-inline-start:50%;transform:translate(-50%)}.ck-element-selector-multibar-count{color:var(--popover-foreground);padding:0 4px}.ck-element-selector-marquee{z-index:calc(var(--z-ck-fab) - 1);border:1px dashed var(--primary);background-color:color-mix(in oklch, var(--primary) 12%, transparent);pointer-events:none;border-radius:4px;position:fixed}.ck-element-selector-context-menu{z-index:calc(var(--z-ck-fab) + 2);border:1px solid var(--border);background-color:var(--popover);min-width:200px;color:var(--popover-foreground);box-shadow:0 18px 30px -12px #0000004d, 0 0 0 1px color-mix(in oklch, var(--foreground) 8%, transparent);pointer-events:auto;border-radius:8px;margin:0;padding:4px;font:13px/1 system-ui,sans-serif;list-style:none;position:fixed}.ck-element-selector-context-menu li{list-style:none}.ck-element-selector-context-menu button{width:100%;color:inherit;text-align:left;cursor:pointer;font:inherit;background:0 0;border:0;border-radius:4px;padding:8px 10px}.ck-element-selector-context-menu button:hover,.ck-element-selector-context-menu button:focus-visible{background-color:color-mix(in oklch, var(--primary) 14%, transparent);outline:none}.ck-element-selector-mark{z-index:calc(var(--z-ck-fab) - 2);border:2px solid color-mix(in oklch, var(--primary) 78%, var(--foreground));box-shadow:inset 0 0 0 1px color-mix(in oklch, var(--background) 80%, transparent), 0 0 0 3px color-mix(in oklch, var(--primary) 14%, transparent)}.ck-element-selector-composer{z-index:var(--z-ck-fab);border:1px solid var(--border);background-color:var(--popover);width:min(28rem,100vw - 1rem);color:var(--popover-foreground);box-shadow:0 22px 42px -16px #00000052, 0 0 0 1px color-mix(in oklch, var(--foreground) 8%, transparent);pointer-events:auto;border-radius:8px;align-items:stretch;gap:.625rem;padding:.75rem;display:grid;position:fixed}.ck-element-selector-input-row{min-width:0}.ck-element-selector-composer .ck-input{border-radius:7px;width:100%;min-width:0;min-height:3rem;padding-inline:.875rem;font-size:.875rem;line-height:1.25rem}.ck-element-selector-actions{align-items:center;gap:.5rem;width:100%;display:flex}.ck-element-selector-actions .ck-button{min-height:2.375rem}.ck-element-selector-attach-action{gap:.375rem;margin-inline-end:auto}.ck-element-selector-grab-action{min-width:8.75rem}.ck-element-selector-action-icon{flex:none;width:.95rem;height:.95rem}.ck-element-selector-file-input{clip:rect(0 0 0 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.ck-element-selector-attachment{border:1px solid color-mix(in oklch, var(--border) 80%, transparent);background-color:color-mix(in oklch, var(--muted) 55%, transparent);border-radius:7px;align-items:center;gap:.625rem;width:100%;min-width:0;padding:.5rem;display:flex}.ck-element-selector-attachment-image{object-fit:cover;border-radius:6px;flex:none;width:2.5rem;height:2.5rem}.ck-element-selector-attachment-meta{flex:1;gap:.125rem;min-width:0;display:grid}.ck-element-selector-attachment-name,.ck-element-selector-attachment-path,.ck-element-selector-attachment-size{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.ck-element-selector-attachment-name{color:var(--foreground);font-size:.75rem;font-weight:600;line-height:1rem}.ck-element-selector-attachment-path,.ck-element-selector-attachment-size{color:var(--muted-foreground);font-size:.6875rem;line-height:.875rem}.ck-element-selector-error{width:100%;color:var(--destructive);font-size:.75rem;line-height:1rem}@media (width<=420px){.ck-element-selector-actions{flex-wrap:wrap}.ck-element-selector-attach-action{margin-inline-end:0}.ck-element-selector-save-action,.ck-element-selector-grab-action{flex:auto}}", ae = "data-commentkit-freeze", g = "\n*, *::before, *::after {\n animation-play-state: paused !important;\n transition: none !important;\n}\n", _ = 0, v = null, y = [];
|
|
23
19
|
function b() {
|
|
24
|
-
|
|
20
|
+
if (v || typeof document > "u") return;
|
|
21
|
+
let e = document.createElement("style");
|
|
22
|
+
e.setAttribute(ae, ""), e.textContent = g, document.head.appendChild(e), v = e;
|
|
25
23
|
}
|
|
26
24
|
function x() {
|
|
27
|
-
|
|
25
|
+
v &&= (v.remove(), null);
|
|
26
|
+
}
|
|
27
|
+
function S() {
|
|
28
|
+
typeof document < "u" && typeof document.getAnimations == "function" && (y = document.getAnimations().filter((e) => {
|
|
28
29
|
if (e.playState !== "running") return !1;
|
|
29
30
|
try {
|
|
30
31
|
return e.pause(), !0;
|
|
@@ -33,63 +34,63 @@ function x() {
|
|
|
33
34
|
}
|
|
34
35
|
}));
|
|
35
36
|
}
|
|
36
|
-
function
|
|
37
|
-
for (let e of
|
|
37
|
+
function C() {
|
|
38
|
+
for (let e of y) try {
|
|
38
39
|
e.play();
|
|
39
40
|
} catch {}
|
|
40
|
-
|
|
41
|
+
y = [];
|
|
41
42
|
}
|
|
42
|
-
function
|
|
43
|
-
|
|
43
|
+
function oe() {
|
|
44
|
+
_++, _ === 1 && (b(), S());
|
|
44
45
|
let e = !1;
|
|
45
46
|
return () => {
|
|
46
|
-
e || (e = !0,
|
|
47
|
+
e || (e = !0, _ = Math.max(0, _ - 1), _ === 0 && (x(), C()));
|
|
47
48
|
};
|
|
48
49
|
}
|
|
49
|
-
var
|
|
50
|
-
function
|
|
50
|
+
var w = 448, se = 236, T = 8, E = .9, D = 1e3, O = 2147483600;
|
|
51
|
+
function k(e) {
|
|
51
52
|
return typeof Element < "u" && e instanceof Element;
|
|
52
53
|
}
|
|
53
|
-
function
|
|
54
|
+
function A() {
|
|
54
55
|
let e = document.activeElement;
|
|
55
56
|
for (; e?.shadowRoot?.activeElement;) e = e.shadowRoot.activeElement;
|
|
56
57
|
return e;
|
|
57
58
|
}
|
|
58
|
-
function
|
|
59
|
+
function ce(e) {
|
|
59
60
|
let t = typeof e.composedPath == "function" ? e.composedPath()[0] ?? e.target : e.target;
|
|
60
|
-
if (!
|
|
61
|
+
if (!k(t)) return !1;
|
|
61
62
|
let n = t.tagName.toLowerCase();
|
|
62
63
|
return n === "input" || n === "textarea" || n === "select" || t instanceof HTMLElement && t.isContentEditable;
|
|
63
64
|
}
|
|
64
|
-
function
|
|
65
|
+
function j(e) {
|
|
65
66
|
let t = e.getRootNode();
|
|
66
67
|
return !!(e.closest("[data-commentkit], [data-commentkit-host], [data-commentkit-ui], .ck-root") || typeof ShadowRoot < "u" && t instanceof ShadowRoot && t.host.matches("[data-commentkit], [data-commentkit-host], [data-commentkit-ui]"));
|
|
67
68
|
}
|
|
68
|
-
function
|
|
69
|
+
function M(e, t = V(e)) {
|
|
69
70
|
let n = e.tagName.toLowerCase();
|
|
70
|
-
if (n === "html" || n === "body" ||
|
|
71
|
+
if (n === "html" || n === "body" || j(e) || e.closest("[data-commentkit-ignore], [data-react-grab-ignore]") || !H(t)) return !1;
|
|
71
72
|
let r = window.getComputedStyle(e);
|
|
72
73
|
if (r.display === "none" || r.visibility === "hidden") return !1;
|
|
73
74
|
let i = Number.parseFloat(r.opacity || "1");
|
|
74
75
|
if (Number.isFinite(i) && i <= .01) return !1;
|
|
75
|
-
let a = Number.parseInt(r.zIndex || "", 10), o = r.position === "fixed" || r.position === "absolute", s = t.width / Math.max(window.innerWidth, 1) >=
|
|
76
|
-
return !(r.pointerEvents === "none" && r.position === "fixed" && Number.isFinite(a) && a >=
|
|
76
|
+
let a = Number.parseInt(r.zIndex || "", 10), o = r.position === "fixed" || r.position === "absolute", s = t.width / Math.max(window.innerWidth, 1) >= E && t.height / Math.max(window.innerHeight, 1) >= E;
|
|
77
|
+
return !(r.pointerEvents === "none" && r.position === "fixed" && Number.isFinite(a) && a >= O || s && o && (r.backgroundColor === "transparent" || r.backgroundColor === "rgba(0, 0, 0, 0)" || Number.isFinite(i) && i < .1 || Number.isFinite(a) && a > D));
|
|
77
78
|
}
|
|
78
|
-
function
|
|
79
|
+
function N(e) {
|
|
79
80
|
return typeof e.composedPath == "function" ? e.composedPath() : e.target ? [e.target] : [];
|
|
80
81
|
}
|
|
81
|
-
function
|
|
82
|
-
return
|
|
82
|
+
function P(e) {
|
|
83
|
+
return N(e).some((e) => k(e) && j(e));
|
|
83
84
|
}
|
|
84
|
-
function
|
|
85
|
+
function F(e, t) {
|
|
85
86
|
if (typeof document.elementsFromPoint == "function") return document.elementsFromPoint(e, t);
|
|
86
87
|
let n = document.elementFromPoint?.(e, t);
|
|
87
88
|
return n ? [n] : [];
|
|
88
89
|
}
|
|
89
|
-
function
|
|
90
|
-
return
|
|
90
|
+
function I(e, t) {
|
|
91
|
+
return F(e, t).find((e) => M(e)) ?? null;
|
|
91
92
|
}
|
|
92
|
-
function
|
|
93
|
+
function le(e) {
|
|
93
94
|
let t = Math.min(e.startX, e.x), n = Math.min(e.startY, e.y), r = Math.abs(e.x - e.startX), i = Math.abs(e.y - e.startY);
|
|
94
95
|
return {
|
|
95
96
|
left: t,
|
|
@@ -100,27 +101,27 @@ function se(e) {
|
|
|
100
101
|
bottom: n + i
|
|
101
102
|
};
|
|
102
103
|
}
|
|
103
|
-
function
|
|
104
|
+
function L(e, t) {
|
|
104
105
|
return !(e.right < t.left || e.left > t.right || e.bottom < t.top || e.top > t.bottom);
|
|
105
106
|
}
|
|
106
|
-
var
|
|
107
|
-
function
|
|
107
|
+
var R = 200, z = 5e3;
|
|
108
|
+
function B(e) {
|
|
108
109
|
let t = window.getComputedStyle(e), n = (e) => e === "hidden" || e === "clip";
|
|
109
110
|
return n(t.overflowX) || n(t.overflowY) || n(t.overflow);
|
|
110
111
|
}
|
|
111
|
-
function
|
|
112
|
+
function ue(e) {
|
|
112
113
|
let t = [];
|
|
113
114
|
if (typeof document > "u") return t;
|
|
114
115
|
let n = 0, r = document.createTreeWalker(document.body, NodeFilter.SHOW_ELEMENT, { acceptNode(r) {
|
|
115
|
-
if (n >=
|
|
116
|
+
if (n >= z || t.length >= R) return NodeFilter.FILTER_REJECT;
|
|
116
117
|
n += 1;
|
|
117
|
-
let i = r, a =
|
|
118
|
-
return !o &&
|
|
118
|
+
let i = r, a = V(i), o = H(a) && L(a, e);
|
|
119
|
+
return !o && B(i) ? NodeFilter.FILTER_REJECT : o && M(i, a) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
119
120
|
} }), i = r.nextNode();
|
|
120
|
-
for (; i && (t.push(i), !(t.length >=
|
|
121
|
+
for (; i && (t.push(i), !(t.length >= R || n >= z));) i = r.nextNode();
|
|
121
122
|
return t;
|
|
122
123
|
}
|
|
123
|
-
function
|
|
124
|
+
function V(e) {
|
|
124
125
|
let t = e.getBoundingClientRect();
|
|
125
126
|
return {
|
|
126
127
|
top: t.top,
|
|
@@ -131,38 +132,38 @@ function B(e) {
|
|
|
131
132
|
right: t.right
|
|
132
133
|
};
|
|
133
134
|
}
|
|
134
|
-
function
|
|
135
|
+
function H(e) {
|
|
135
136
|
return e.width > 0 && e.height > 0;
|
|
136
137
|
}
|
|
137
|
-
function
|
|
138
|
+
function U(e) {
|
|
138
139
|
return {
|
|
139
|
-
element:
|
|
140
|
-
selector:
|
|
141
|
-
xpath: e
|
|
142
|
-
rect:
|
|
140
|
+
element: e,
|
|
141
|
+
selector: n(e),
|
|
142
|
+
xpath: t(e),
|
|
143
|
+
rect: V(e)
|
|
143
144
|
};
|
|
144
145
|
}
|
|
145
|
-
function
|
|
146
|
+
function W(e, t, n) {
|
|
146
147
|
return Math.min(n, Math.max(t, e));
|
|
147
148
|
}
|
|
148
|
-
function
|
|
149
|
+
function G() {
|
|
149
150
|
return {
|
|
150
151
|
width: Math.max(window.innerWidth || 0, 16),
|
|
151
152
|
height: Math.max(window.innerHeight || 0, 16)
|
|
152
153
|
};
|
|
153
154
|
}
|
|
154
|
-
function
|
|
155
|
-
let t =
|
|
155
|
+
function de(e) {
|
|
156
|
+
let t = G(), n = W(e.rect.left + e.rect.width / 2, 0, t.width), i = W(e.rect.top + e.rect.height / 2, 0, t.height);
|
|
156
157
|
return {
|
|
157
|
-
...n
|
|
158
|
+
...r(n, i, t),
|
|
158
159
|
element: e.selector,
|
|
159
160
|
xpath: e.xpath
|
|
160
161
|
};
|
|
161
162
|
}
|
|
162
|
-
function
|
|
163
|
+
function fe(e) {
|
|
163
164
|
return typeof e != "number" || !Number.isFinite(e) ? "" : e < 1024 ? `${e} B` : e < 1048576 ? `${(e / 1024).toFixed(1)} KB` : `${(e / 1024 / 1024).toFixed(1)} MB`;
|
|
164
165
|
}
|
|
165
|
-
function
|
|
166
|
+
function pe(e, t) {
|
|
166
167
|
let n = e.path;
|
|
167
168
|
if (typeof n == "string" && n.trim()) return {
|
|
168
169
|
path: n.trim(),
|
|
@@ -181,9 +182,10 @@ function W(e, t) {
|
|
|
181
182
|
pathSource: "browser-fallback"
|
|
182
183
|
};
|
|
183
184
|
}
|
|
184
|
-
function
|
|
185
|
-
let { path: n, pathSource: r } =
|
|
185
|
+
function me(e, t) {
|
|
186
|
+
let { path: n, pathSource: r } = pe(e, t);
|
|
186
187
|
return {
|
|
188
|
+
file: e,
|
|
187
189
|
name: e.name,
|
|
188
190
|
path: n,
|
|
189
191
|
pathSource: r,
|
|
@@ -193,23 +195,23 @@ function fe(e, t) {
|
|
|
193
195
|
previewUrl: e.type.startsWith("image/") && typeof URL.createObjectURL == "function" ? URL.createObjectURL(e) : null
|
|
194
196
|
};
|
|
195
197
|
}
|
|
196
|
-
function
|
|
198
|
+
function K(e) {
|
|
197
199
|
e && typeof URL.revokeObjectURL == "function" && URL.revokeObjectURL(e);
|
|
198
200
|
}
|
|
199
|
-
async function
|
|
201
|
+
async function he(e, t) {
|
|
200
202
|
try {
|
|
201
203
|
if (!navigator.clipboard?.writeText) throw Error("clipboard unavailable");
|
|
202
204
|
await navigator.clipboard.writeText(e);
|
|
203
205
|
try {
|
|
204
|
-
|
|
206
|
+
o.success(`${t} copied`);
|
|
205
207
|
} catch {}
|
|
206
208
|
} catch {
|
|
207
209
|
try {
|
|
208
|
-
|
|
210
|
+
o.error(`Could not copy ${t.toLowerCase()}`);
|
|
209
211
|
} catch {}
|
|
210
212
|
}
|
|
211
213
|
}
|
|
212
|
-
function
|
|
214
|
+
function q(e) {
|
|
213
215
|
return {
|
|
214
216
|
top: e.top,
|
|
215
217
|
left: e.left,
|
|
@@ -217,39 +219,39 @@ function K(e) {
|
|
|
217
219
|
height: e.height
|
|
218
220
|
};
|
|
219
221
|
}
|
|
220
|
-
function
|
|
221
|
-
let n =
|
|
222
|
+
function ge(e, t = se) {
|
|
223
|
+
let n = G(), r = Math.max(T, n.width - w - T), i = W(e.left, T, r), a = e.bottom + T, o = e.top - t - T;
|
|
222
224
|
return {
|
|
223
225
|
left: i,
|
|
224
|
-
top: a + t <= n.height -
|
|
226
|
+
top: a + t <= n.height - T ? a : W(o, T, n.height - t - T)
|
|
225
227
|
};
|
|
226
228
|
}
|
|
227
|
-
var
|
|
228
|
-
function
|
|
229
|
-
let t =
|
|
229
|
+
var _e = 220, J = 200;
|
|
230
|
+
function ve(e) {
|
|
231
|
+
let t = G();
|
|
230
232
|
return {
|
|
231
|
-
left:
|
|
232
|
-
top:
|
|
233
|
+
left: W(e.x, T, Math.max(T, t.width - _e - T)),
|
|
234
|
+
top: W(e.y, T, Math.max(T, t.height - J - T))
|
|
233
235
|
};
|
|
234
236
|
}
|
|
235
|
-
function
|
|
237
|
+
function ye(e) {
|
|
236
238
|
return e.status === "open" && !!(e.position.element || e.position.xpath);
|
|
237
239
|
}
|
|
238
|
-
function
|
|
240
|
+
function be(e) {
|
|
239
241
|
return e.flatMap((e) => {
|
|
240
|
-
if (!
|
|
241
|
-
let t =
|
|
242
|
+
if (!ye(e)) return [];
|
|
243
|
+
let t = i(e.position.element ?? "", e.position.xpath);
|
|
242
244
|
if (!t) return [];
|
|
243
|
-
let n =
|
|
244
|
-
return
|
|
245
|
+
let n = V(t);
|
|
246
|
+
return M(t, n) ? [{
|
|
245
247
|
id: e.id,
|
|
246
248
|
rect: n
|
|
247
249
|
}] : [];
|
|
248
250
|
});
|
|
249
251
|
}
|
|
250
|
-
function
|
|
251
|
-
let [t, n] =
|
|
252
|
-
return
|
|
252
|
+
function xe(e) {
|
|
253
|
+
let [t, n] = d.useState(0);
|
|
254
|
+
return d.useEffect(() => {
|
|
253
255
|
if (!e) return;
|
|
254
256
|
let t = 0, r = () => {
|
|
255
257
|
t ||= window.requestAnimationFrame(() => {
|
|
@@ -273,59 +275,67 @@ function be(e) {
|
|
|
273
275
|
};
|
|
274
276
|
}, [e]), t;
|
|
275
277
|
}
|
|
276
|
-
var
|
|
277
|
-
let
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
}, [
|
|
281
|
-
|
|
282
|
-
}, [
|
|
283
|
-
|
|
284
|
-
}, [
|
|
285
|
-
|
|
286
|
-
}, [
|
|
287
|
-
let
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
278
|
+
var Y = d.memo(function({ core: r, state: i, active: o }) {
|
|
279
|
+
let c = u(), { canWrite: h, message: ae } = ee(), [g, _] = d.useState(null), [v, y] = d.useState(null), [b, x] = d.useState([]), [S, C] = d.useState(null), [w, T] = d.useState(null), [E, D] = d.useState(""), [O, k] = d.useState(null), [j, M] = d.useState(!1), N = d.useRef(null), [F, L] = d.useState(!1), [R, z] = d.useState(null), B = d.useRef(null), H = d.useRef(null), W = d.useRef(null), G = d.useRef(null), [pe, _e] = d.useState(se), J = a().path, Y = d.useMemo(() => i.comments.filter((e) => e.page?.path === J), [i.comments, J]), Se = Y.some(ye), Ce = xe(o || Se || !!v || b.length > 0), we = d.useRef(null), Te = d.useRef([]), Ee = d.useRef(""), De = d.useRef(null);
|
|
280
|
+
d.useEffect(() => {
|
|
281
|
+
we.current = v?.element ?? g?.element ?? null;
|
|
282
|
+
}, [g, v]), d.useEffect(() => {
|
|
283
|
+
Te.current = b;
|
|
284
|
+
}, [b]), d.useEffect(() => {
|
|
285
|
+
Ee.current = E;
|
|
286
|
+
}, [E]), d.useEffect(() => {
|
|
287
|
+
De.current = O;
|
|
288
|
+
}, [O]);
|
|
289
|
+
let Oe = d.useMemo(() => be(Y), [Y, Ce]);
|
|
290
|
+
d.useEffect(() => {
|
|
291
|
+
let e = N.current;
|
|
292
|
+
(e && (i.currentUser?.id !== e.userId || (i.activeBranch ?? null) !== e.branch || J !== e.page || !e.submitting && i.activeTool === null || i.activeTool !== null && i.activeTool !== "select") || !o && !j) && (N.current = null, _(null), y(null), x([]), T(null), D(""), k((e) => (K(e?.previewUrl), null)), M(!1), z(null), C(null), Q.current = null, $.current = !1);
|
|
293
|
+
}, [
|
|
294
|
+
o,
|
|
295
|
+
j,
|
|
296
|
+
i.activeTool,
|
|
297
|
+
i.activeBranch,
|
|
298
|
+
i.currentUser?.id,
|
|
299
|
+
J
|
|
300
|
+
]), d.useEffect(() => () => {
|
|
301
|
+
N.current = null, K(De.current?.previewUrl);
|
|
302
|
+
}, []), d.useEffect(() => {
|
|
303
|
+
if (!o) return;
|
|
294
304
|
let e = document.body.style.cursor;
|
|
295
305
|
document.body.style.cursor = "crosshair";
|
|
296
|
-
let t =
|
|
306
|
+
let t = oe();
|
|
297
307
|
return () => {
|
|
298
308
|
document.body.style.cursor = e, t();
|
|
299
309
|
};
|
|
300
|
-
}, [
|
|
301
|
-
let
|
|
302
|
-
|
|
303
|
-
if (!
|
|
304
|
-
let e =
|
|
305
|
-
return e instanceof HTMLElement && !
|
|
306
|
-
let e =
|
|
307
|
-
|
|
310
|
+
}, [o]);
|
|
311
|
+
let X = o && !!v;
|
|
312
|
+
d.useEffect(() => {
|
|
313
|
+
if (!X) return;
|
|
314
|
+
let e = A();
|
|
315
|
+
return e instanceof HTMLElement && !B.current?.contains(e) && (G.current = e), B.current?.querySelector("[data-ck-composer-input]")?.focus({ preventScroll: !0 }), () => {
|
|
316
|
+
let e = G.current;
|
|
317
|
+
G.current = null, e && e.isConnected && e.focus({ preventScroll: !0 });
|
|
308
318
|
};
|
|
309
|
-
}, [
|
|
310
|
-
let
|
|
311
|
-
|
|
312
|
-
let e = !
|
|
313
|
-
if (
|
|
314
|
-
let t =
|
|
319
|
+
}, [X]);
|
|
320
|
+
let ke = d.useRef(i.isAuthenticated);
|
|
321
|
+
d.useEffect(() => {
|
|
322
|
+
let e = !ke.current && i.isAuthenticated;
|
|
323
|
+
if (ke.current = i.isAuthenticated, !e || !X || !E.trim()) return;
|
|
324
|
+
let t = B.current?.querySelector("[data-ck-composer-input]");
|
|
315
325
|
t?.focus({ preventScroll: !0 });
|
|
316
326
|
let n = t?.value.length ?? 0;
|
|
317
|
-
t?.setSelectionRange?.(n, n),
|
|
327
|
+
t?.setSelectionRange?.(n, n), z((e) => e && e.startsWith("Sign in to save comments") ? null : e);
|
|
318
328
|
}, [
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
]),
|
|
323
|
-
if (!
|
|
324
|
-
let e =
|
|
329
|
+
i.isAuthenticated,
|
|
330
|
+
X,
|
|
331
|
+
E
|
|
332
|
+
]), d.useLayoutEffect(() => {
|
|
333
|
+
if (!X) return;
|
|
334
|
+
let e = B.current;
|
|
325
335
|
if (!e) return;
|
|
326
336
|
let t = () => {
|
|
327
337
|
let t = e.getBoundingClientRect().height;
|
|
328
|
-
t > 0 &&
|
|
338
|
+
t > 0 && _e((e) => Math.abs(e - t) > 1 ? t : e);
|
|
329
339
|
};
|
|
330
340
|
t();
|
|
331
341
|
let n = null;
|
|
@@ -336,81 +346,81 @@ var xe = l.memo(function({ core: n, state: r, active: a }) {
|
|
|
336
346
|
}
|
|
337
347
|
return () => n?.disconnect();
|
|
338
348
|
}, [
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
]),
|
|
343
|
-
if (!
|
|
349
|
+
X,
|
|
350
|
+
O,
|
|
351
|
+
R
|
|
352
|
+
]), d.useEffect(() => {
|
|
353
|
+
if (!o) return;
|
|
344
354
|
let e = () => {
|
|
345
|
-
|
|
355
|
+
y((e) => e && {
|
|
346
356
|
...e,
|
|
347
|
-
rect:
|
|
348
|
-
}),
|
|
357
|
+
rect: V(e.element)
|
|
358
|
+
}), _((e) => e && {
|
|
349
359
|
...e,
|
|
350
|
-
rect:
|
|
351
|
-
}),
|
|
360
|
+
rect: V(e.element)
|
|
361
|
+
}), x((e) => e.map((e) => ({
|
|
352
362
|
...e,
|
|
353
|
-
rect:
|
|
363
|
+
rect: V(e.element)
|
|
354
364
|
})));
|
|
355
365
|
};
|
|
356
366
|
return window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
|
|
357
367
|
window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
|
|
358
368
|
};
|
|
359
|
-
}, [
|
|
360
|
-
let
|
|
361
|
-
if (!e ||
|
|
362
|
-
|
|
369
|
+
}, [o]);
|
|
370
|
+
let Z = d.useCallback(async (e, t, n) => {
|
|
371
|
+
if (!e || F) return !1;
|
|
372
|
+
L(!0), z(null);
|
|
363
373
|
try {
|
|
364
|
-
let i = t?.trim(), a =
|
|
365
|
-
name:
|
|
366
|
-
path:
|
|
367
|
-
pathSource:
|
|
368
|
-
type:
|
|
369
|
-
size:
|
|
370
|
-
lastModified:
|
|
374
|
+
let i = t?.trim(), a = n ? [{
|
|
375
|
+
name: n.name,
|
|
376
|
+
path: n.path,
|
|
377
|
+
pathSource: n.pathSource,
|
|
378
|
+
type: n.type,
|
|
379
|
+
size: n.size,
|
|
380
|
+
lastModified: n.lastModified
|
|
371
381
|
}] : [], o = i || a.length > 0 ? {
|
|
372
382
|
...i ? { comment: i } : {},
|
|
373
383
|
...a.length > 0 ? { attachments: a } : {}
|
|
374
|
-
} : void 0, s = o ? await
|
|
375
|
-
return
|
|
384
|
+
} : void 0, s = o ? await r.grabElement(e, o) : await r.grabElement(e);
|
|
385
|
+
return L(!1), s ? (y(null), _(null), D(""), k((e) => (K(e?.previewUrl), null)), r.setTool(null), !0) : (z("Could not grab this element."), !1);
|
|
376
386
|
} catch {
|
|
377
|
-
return
|
|
387
|
+
return L(!1), z("Could not copy this element for the agent."), !1;
|
|
378
388
|
}
|
|
379
|
-
}, [
|
|
380
|
-
if (e.length === 0 ||
|
|
381
|
-
|
|
389
|
+
}, [r, F]), Ae = d.useCallback(async (e) => {
|
|
390
|
+
if (e.length === 0 || F) return !1;
|
|
391
|
+
L(!0), z(null);
|
|
382
392
|
try {
|
|
383
|
-
let t = await
|
|
384
|
-
return
|
|
393
|
+
let t = await r.grabElements(e);
|
|
394
|
+
return L(!1), t ? (x([]), y(null), _(null), D(""), k((e) => (K(e?.previewUrl), null)), r.setTool(null), !0) : (z("Could not grab these elements."), !1);
|
|
385
395
|
} catch {
|
|
386
|
-
return
|
|
396
|
+
return L(!1), z("Could not copy these elements for the agent."), !1;
|
|
387
397
|
}
|
|
388
|
-
}, [
|
|
389
|
-
let e =
|
|
390
|
-
|
|
391
|
-
}, [
|
|
392
|
-
|
|
393
|
-
}, []),
|
|
394
|
-
|
|
395
|
-
let
|
|
396
|
-
|
|
397
|
-
if (!
|
|
398
|
-
let e =
|
|
398
|
+
}, [r, F]), je = d.useCallback(() => {
|
|
399
|
+
let e = Te.current.map((e) => e.element);
|
|
400
|
+
Ae(e);
|
|
401
|
+
}, [Ae]), Me = d.useCallback(() => {
|
|
402
|
+
x([]);
|
|
403
|
+
}, []), Q = d.useRef(null), $ = d.useRef(!1), Ne = d.useRef(null);
|
|
404
|
+
Ne.current = S;
|
|
405
|
+
let Pe = d.useRef(null);
|
|
406
|
+
Pe.current = w, d.useEffect(() => {
|
|
407
|
+
if (!w) return;
|
|
408
|
+
let e = r.blockEscape();
|
|
399
409
|
return () => e();
|
|
400
|
-
}, [
|
|
401
|
-
if (!
|
|
402
|
-
let e =
|
|
403
|
-
return e instanceof HTMLElement && !
|
|
404
|
-
let e =
|
|
405
|
-
|
|
410
|
+
}, [w, r]), d.useEffect(() => {
|
|
411
|
+
if (!w) return;
|
|
412
|
+
let e = A();
|
|
413
|
+
return e instanceof HTMLElement && !W.current?.contains(e) && (G.current = e), W.current?.querySelector("[role=\"menuitem\"]")?.focus({ preventScroll: !0 }), () => {
|
|
414
|
+
let e = G.current;
|
|
415
|
+
G.current = null, e && e.isConnected && e.focus({ preventScroll: !0 });
|
|
406
416
|
};
|
|
407
|
-
}, [
|
|
408
|
-
let
|
|
409
|
-
let t =
|
|
417
|
+
}, [w]);
|
|
418
|
+
let Fe = d.useCallback((e) => {
|
|
419
|
+
let t = W.current;
|
|
410
420
|
if (!t) return;
|
|
411
421
|
let n = Array.from(t.querySelectorAll("[role=\"menuitem\"]"));
|
|
412
422
|
if (n.length === 0) return;
|
|
413
|
-
let r =
|
|
423
|
+
let r = A(), i = n.findIndex((e) => e === r), a = (e) => {
|
|
414
424
|
n[(e + n.length) % n.length]?.focus({ preventScroll: !0 });
|
|
415
425
|
};
|
|
416
426
|
switch (e.key) {
|
|
@@ -427,432 +437,464 @@ var xe = l.memo(function({ core: n, state: r, active: a }) {
|
|
|
427
437
|
e.preventDefault(), e.stopPropagation(), a(n.length - 1);
|
|
428
438
|
break;
|
|
429
439
|
case "Enter":
|
|
430
|
-
case " ": e.preventDefault(), e.stopPropagation(),
|
|
440
|
+
case " ": e.preventDefault(), e.stopPropagation(), A()?.click();
|
|
431
441
|
}
|
|
432
442
|
}, []);
|
|
433
|
-
|
|
434
|
-
if (!
|
|
435
|
-
let
|
|
436
|
-
e.button !== 0 ||
|
|
437
|
-
x:
|
|
438
|
-
y:
|
|
439
|
-
},
|
|
440
|
-
},
|
|
441
|
-
if (
|
|
442
|
-
let
|
|
443
|
-
|
|
444
|
-
element:
|
|
445
|
-
selector:
|
|
446
|
-
xpath:
|
|
447
|
-
x: n.clientX,
|
|
448
|
-
y: n.clientY
|
|
449
|
-
}));
|
|
450
|
-
}, o = null, s = null, c = () => {
|
|
451
|
-
o &&= (clearTimeout(o), null), s = null;
|
|
452
|
-
}, ee = (n) => {
|
|
453
|
-
if (N(n) || n.touches.length !== 1) return;
|
|
454
|
-
let r = n.touches[0];
|
|
455
|
-
if (!r) return;
|
|
456
|
-
let i = F(r.clientX, r.clientY);
|
|
457
|
-
i && (s = {
|
|
443
|
+
d.useEffect(() => {
|
|
444
|
+
if (!o && !j) return;
|
|
445
|
+
let i = (t) => {
|
|
446
|
+
e() || t.button !== 0 || P(t) || v || (T(null), Q.current = {
|
|
447
|
+
x: t.clientX,
|
|
448
|
+
y: t.clientY
|
|
449
|
+
}, $.current = !1);
|
|
450
|
+
}, a = (r) => {
|
|
451
|
+
if (e() || P(r)) return;
|
|
452
|
+
let i = I(r.clientX, r.clientY);
|
|
453
|
+
i && (r.preventDefault(), r.stopPropagation(), T({
|
|
454
|
+
element: i,
|
|
455
|
+
selector: n(i),
|
|
456
|
+
xpath: t(i),
|
|
458
457
|
x: r.clientX,
|
|
459
|
-
y: r.clientY
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
458
|
+
y: r.clientY
|
|
459
|
+
}));
|
|
460
|
+
}, s = null, c = null, l = () => {
|
|
461
|
+
s &&= (clearTimeout(s), null), c = null;
|
|
462
|
+
}, ee = (r) => {
|
|
463
|
+
if (e() || P(r) || r.touches.length !== 1) return;
|
|
464
|
+
let i = r.touches[0];
|
|
465
|
+
if (!i) return;
|
|
466
|
+
let a = I(i.clientX, i.clientY);
|
|
467
|
+
a && (c = {
|
|
468
|
+
x: i.clientX,
|
|
469
|
+
y: i.clientY,
|
|
470
|
+
element: a
|
|
471
|
+
}, s = setTimeout(() => {
|
|
472
|
+
c && (T({
|
|
473
|
+
element: c.element,
|
|
474
|
+
selector: n(c.element),
|
|
475
|
+
xpath: t(c.element),
|
|
476
|
+
x: c.x,
|
|
477
|
+
y: c.y
|
|
478
|
+
}), c = null, s = null);
|
|
469
479
|
}, 550));
|
|
470
480
|
}, te = (e) => {
|
|
471
|
-
if (!
|
|
481
|
+
if (!c || e.touches.length !== 1) return;
|
|
472
482
|
let t = e.touches[0];
|
|
473
483
|
if (!t) return;
|
|
474
|
-
let n = t.clientX -
|
|
475
|
-
(Math.abs(n) > 10 || Math.abs(r) > 10) &&
|
|
476
|
-
},
|
|
477
|
-
|
|
478
|
-
},
|
|
479
|
-
if (
|
|
480
|
-
let
|
|
481
|
-
if (
|
|
482
|
-
if (
|
|
484
|
+
let n = t.clientX - c.x, r = t.clientY - c.y;
|
|
485
|
+
(Math.abs(n) > 10 || Math.abs(r) > 10) && l();
|
|
486
|
+
}, u = () => {
|
|
487
|
+
l();
|
|
488
|
+
}, ne = (t) => {
|
|
489
|
+
if (e() || P(t)) return;
|
|
490
|
+
let n = Q.current;
|
|
491
|
+
if (n) {
|
|
492
|
+
if (t.pointerType === "mouse" && !(t.buttons & 1)) Q.current = null, $.current = !1, C(null);
|
|
483
493
|
else {
|
|
484
|
-
let
|
|
485
|
-
if (
|
|
486
|
-
|
|
487
|
-
startX:
|
|
488
|
-
startY:
|
|
489
|
-
x:
|
|
490
|
-
y:
|
|
491
|
-
}),
|
|
494
|
+
let e = t.clientX - n.x, r = t.clientY - n.y;
|
|
495
|
+
if (Ne.current || Math.abs(e) > 6 || Math.abs(r) > 6) {
|
|
496
|
+
$.current = !0, C({
|
|
497
|
+
startX: n.x,
|
|
498
|
+
startY: n.y,
|
|
499
|
+
x: t.clientX,
|
|
500
|
+
y: t.clientY
|
|
501
|
+
}), _(null);
|
|
492
502
|
return;
|
|
493
503
|
}
|
|
494
504
|
}
|
|
495
505
|
}
|
|
496
|
-
if (
|
|
497
|
-
let
|
|
498
|
-
|
|
506
|
+
if (v) return;
|
|
507
|
+
let r = I(t.clientX, t.clientY);
|
|
508
|
+
_(r ? U(r) : null);
|
|
499
509
|
}, d = () => {
|
|
500
|
-
|
|
501
|
-
}, f = (
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
+
Q.current = null, $.current = !1, C(null);
|
|
511
|
+
}, f = (t) => {
|
|
512
|
+
if (e()) return;
|
|
513
|
+
let n = Q.current;
|
|
514
|
+
Q.current = null;
|
|
515
|
+
let r = Ne.current;
|
|
516
|
+
if (!n || !r) return;
|
|
517
|
+
let i = le({
|
|
518
|
+
...r,
|
|
519
|
+
x: t.clientX,
|
|
520
|
+
y: t.clientY
|
|
510
521
|
});
|
|
511
|
-
if (
|
|
512
|
-
|
|
522
|
+
if (i.width < 6 || i.height < 6) {
|
|
523
|
+
C(null);
|
|
513
524
|
return;
|
|
514
525
|
}
|
|
515
|
-
let
|
|
516
|
-
if (
|
|
517
|
-
let e =
|
|
518
|
-
|
|
526
|
+
let a = ue(i);
|
|
527
|
+
if (a.length > 0) {
|
|
528
|
+
let e = a.map(U);
|
|
529
|
+
x((t) => {
|
|
519
530
|
let n = new Set(t.map((e) => e.element)), r = [...t];
|
|
520
531
|
for (let t of e) n.has(t.element) || r.push(t);
|
|
521
532
|
return r;
|
|
522
533
|
});
|
|
523
534
|
}
|
|
524
|
-
|
|
525
|
-
},
|
|
526
|
-
if (
|
|
527
|
-
if (
|
|
528
|
-
|
|
535
|
+
C(null);
|
|
536
|
+
}, p = (t) => {
|
|
537
|
+
if (e() || P(t) || j) return;
|
|
538
|
+
if ($.current) {
|
|
539
|
+
$.current = !1, t.preventDefault(), t.stopPropagation();
|
|
529
540
|
return;
|
|
530
541
|
}
|
|
531
|
-
|
|
532
|
-
let
|
|
533
|
-
|
|
534
|
-
},
|
|
535
|
-
if (e
|
|
536
|
-
|
|
537
|
-
if (
|
|
538
|
-
|
|
542
|
+
t.preventDefault(), t.stopPropagation();
|
|
543
|
+
let n = I(t.clientX, t.clientY);
|
|
544
|
+
v && !t.shiftKey ? (y(null), _(null), D(""), k((e) => (K(e?.previewUrl), null)), z(null)) : n && (t.shiftKey ? (x((e) => e.some((e) => e.element === n) ? e.filter((e) => e.element !== n) : [...v && !e.some((e) => e.element === v.element) ? [...e, v] : e, U(n)]), _(null), y(null), D(""), k((e) => (K(e?.previewUrl), null)), z(null)) : (y(U(n)), _(null), D(""), k((e) => (K(e?.previewUrl), null)), z(null)));
|
|
545
|
+
}, m = (t) => {
|
|
546
|
+
if (e()) return;
|
|
547
|
+
if (t.key === "Escape") {
|
|
548
|
+
if (t.isComposing) return;
|
|
549
|
+
if (Pe.current) {
|
|
550
|
+
t.preventDefault(), t.stopPropagation(), T(null);
|
|
539
551
|
return;
|
|
540
552
|
}
|
|
541
|
-
|
|
553
|
+
t.preventDefault(), t.stopPropagation(), N.current = null, M(!1), y(null), _(null), D(""), k((e) => (K(e?.previewUrl), null)), z(null), r.setTool(null);
|
|
542
554
|
return;
|
|
543
555
|
}
|
|
544
|
-
if (!
|
|
545
|
-
let
|
|
546
|
-
if (
|
|
547
|
-
let
|
|
548
|
-
if (
|
|
549
|
-
|
|
556
|
+
if (j || !t.metaKey && !t.ctrlKey || t.shiftKey || t.altKey || t.key !== "c" && t.key !== "C" && t.code !== "KeyC" || ce(t)) return;
|
|
557
|
+
let n = typeof window < "u" ? window.getSelection() : null;
|
|
558
|
+
if (n && !n.isCollapsed && n.toString().length > 0) return;
|
|
559
|
+
let i = Te.current;
|
|
560
|
+
if (i.length > 0) {
|
|
561
|
+
t.preventDefault(), t.stopPropagation(), Ae(i.map((e) => e.element));
|
|
550
562
|
return;
|
|
551
563
|
}
|
|
552
|
-
let
|
|
553
|
-
if (!
|
|
554
|
-
|
|
555
|
-
let
|
|
556
|
-
|
|
564
|
+
let a = we.current;
|
|
565
|
+
if (!a) return;
|
|
566
|
+
t.preventDefault(), t.stopPropagation();
|
|
567
|
+
let o = v?.element === a;
|
|
568
|
+
Z(a, o ? Ee.current : void 0, o ? De.current : null);
|
|
557
569
|
};
|
|
558
|
-
return document.addEventListener("pointerdown",
|
|
570
|
+
return document.addEventListener("pointerdown", i, !0), document.addEventListener("pointermove", ne, !0), document.addEventListener("pointerup", f, !0), document.addEventListener("pointercancel", d, !0), document.addEventListener("click", p, !0), document.addEventListener("contextmenu", a, !0), document.addEventListener("touchstart", ee, {
|
|
559
571
|
capture: !0,
|
|
560
572
|
passive: !0
|
|
561
573
|
}), document.addEventListener("touchmove", te, {
|
|
562
574
|
capture: !0,
|
|
563
575
|
passive: !0
|
|
564
|
-
}), document.addEventListener("touchend",
|
|
576
|
+
}), document.addEventListener("touchend", u, {
|
|
565
577
|
capture: !0,
|
|
566
578
|
passive: !0
|
|
567
|
-
}), document.addEventListener("touchcancel",
|
|
579
|
+
}), document.addEventListener("touchcancel", u, {
|
|
568
580
|
capture: !0,
|
|
569
581
|
passive: !0
|
|
570
|
-
}), window.addEventListener("keydown",
|
|
571
|
-
document.removeEventListener("pointerdown",
|
|
582
|
+
}), window.addEventListener("keydown", m, !0), () => {
|
|
583
|
+
document.removeEventListener("pointerdown", i, !0), document.removeEventListener("pointermove", ne, !0), document.removeEventListener("pointerup", f, !0), document.removeEventListener("pointercancel", d, !0), document.removeEventListener("click", p, !0), document.removeEventListener("contextmenu", a, !0), document.removeEventListener("touchstart", ee, !0), document.removeEventListener("touchmove", te, !0), document.removeEventListener("touchend", u, !0), document.removeEventListener("touchcancel", u, !0), window.removeEventListener("keydown", m, !0), l();
|
|
572
584
|
};
|
|
573
585
|
}, [
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
586
|
+
o,
|
|
587
|
+
j,
|
|
588
|
+
r,
|
|
589
|
+
Z,
|
|
590
|
+
Ae,
|
|
591
|
+
v
|
|
579
592
|
]);
|
|
580
|
-
let
|
|
593
|
+
let Ie = d.useCallback(async (e) => {
|
|
581
594
|
e.preventDefault();
|
|
582
|
-
let t =
|
|
583
|
-
if (
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
595
|
+
let t = E.trim();
|
|
596
|
+
if (!v || !t || j) return;
|
|
597
|
+
if (!i.currentUser) {
|
|
598
|
+
z("Sign in to save comments. You can still use Grab for agent without signing in."), r.toggleLoginModal();
|
|
599
|
+
return;
|
|
600
|
+
}
|
|
601
|
+
let n = {
|
|
602
|
+
userId: i.currentUser.id,
|
|
603
|
+
branch: i.activeBranch ?? null,
|
|
604
|
+
page: J,
|
|
605
|
+
submitting: !1
|
|
606
|
+
};
|
|
607
|
+
N.current = n;
|
|
608
|
+
let o = () => {
|
|
609
|
+
let e = r.getState();
|
|
610
|
+
return N.current === n && e.isAuthenticated && e.currentUser?.id === n.userId && (e.activeBranch ?? null) === n.branch && (e.activeTool === null || e.activeTool === "select") && a().path === n.page;
|
|
611
|
+
}, s = r.on("auth:logout", () => {
|
|
612
|
+
N.current === n && (N.current = null, M(!1));
|
|
613
|
+
});
|
|
614
|
+
M(!0), z(null);
|
|
615
|
+
try {
|
|
616
|
+
let e = await l(r, t, de(v), { files: O ? [O.file] : [] }, () => !o() || r.getState().activeTool !== "select" ? !1 : (n.submitting = !0, !0));
|
|
617
|
+
if (!o()) return;
|
|
618
|
+
if (e.status === "failed") throw Error(e.message);
|
|
619
|
+
y(null), D(""), k((e) => (K(e?.previewUrl), null)), r.setTool(null);
|
|
620
|
+
} catch {
|
|
621
|
+
if (!o()) return;
|
|
622
|
+
r.getState().activeTool === null && r.setTool("select"), z("Could not save this comment. Try again.");
|
|
623
|
+
} finally {
|
|
624
|
+
s(), N.current === n && (N.current = null, M(!1));
|
|
593
625
|
}
|
|
594
626
|
}, [
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
627
|
+
O,
|
|
628
|
+
E,
|
|
629
|
+
r,
|
|
630
|
+
J,
|
|
631
|
+
j,
|
|
632
|
+
v,
|
|
633
|
+
i.activeBranch,
|
|
634
|
+
i.currentUser
|
|
635
|
+
]), Le = d.useCallback(() => {
|
|
636
|
+
Z(v?.element ?? null, E, O);
|
|
602
637
|
}, [
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
]),
|
|
608
|
-
|
|
609
|
-
}, []),
|
|
638
|
+
O,
|
|
639
|
+
E,
|
|
640
|
+
Z,
|
|
641
|
+
v
|
|
642
|
+
]), Re = d.useCallback(() => {
|
|
643
|
+
H.current?.click();
|
|
644
|
+
}, []), ze = d.useCallback((e) => {
|
|
610
645
|
let t = e.currentTarget, n = t.files?.[0] ?? null;
|
|
611
|
-
|
|
612
|
-
}, []),
|
|
613
|
-
|
|
614
|
-
}, []),
|
|
615
|
-
return !
|
|
646
|
+
k((e) => (K(e?.previewUrl), n ? me(n, t) : null)), t.value = "";
|
|
647
|
+
}, []), Be = d.useCallback(() => {
|
|
648
|
+
k((e) => (K(e?.previewUrl), null));
|
|
649
|
+
}, []), Ve = d.useMemo(() => ne(), []);
|
|
650
|
+
return !o && !j && Oe.length === 0 ? null : /* @__PURE__ */ m("div", {
|
|
616
651
|
className: "ck-element-selector",
|
|
617
652
|
"data-testid": "ck-element-selector",
|
|
618
653
|
children: [
|
|
619
|
-
|
|
654
|
+
Oe.map((e) => /* @__PURE__ */ p("div", {
|
|
620
655
|
"aria-hidden": "true",
|
|
621
656
|
className: "ck-element-selector-mark",
|
|
622
657
|
"data-comment-id": e.id,
|
|
623
|
-
style:
|
|
658
|
+
style: q(e.rect)
|
|
624
659
|
}, e.id)),
|
|
625
|
-
|
|
660
|
+
o && g && !S && /* @__PURE__ */ p("div", {
|
|
626
661
|
"aria-hidden": "true",
|
|
627
662
|
className: "ck-element-selector-outline",
|
|
628
663
|
"data-state": "hover",
|
|
629
|
-
style:
|
|
664
|
+
style: q(g.rect)
|
|
630
665
|
}),
|
|
631
|
-
|
|
666
|
+
o && S && /* @__PURE__ */ p("div", {
|
|
632
667
|
"aria-hidden": "true",
|
|
633
668
|
className: "ck-element-selector-marquee",
|
|
634
669
|
"data-testid": "ck-element-selector-marquee",
|
|
635
670
|
style: {
|
|
636
|
-
left: Math.min(
|
|
637
|
-
top: Math.min(
|
|
638
|
-
width: Math.abs(
|
|
639
|
-
height: Math.abs(
|
|
671
|
+
left: Math.min(S.startX, S.x),
|
|
672
|
+
top: Math.min(S.startY, S.y),
|
|
673
|
+
width: Math.abs(S.x - S.startX),
|
|
674
|
+
height: Math.abs(S.y - S.startY)
|
|
640
675
|
}
|
|
641
676
|
}),
|
|
642
|
-
|
|
677
|
+
o && b.map((e, t) => /* @__PURE__ */ p("div", {
|
|
643
678
|
"aria-hidden": "true",
|
|
644
679
|
className: "ck-element-selector-outline",
|
|
645
680
|
"data-state": "multi",
|
|
646
681
|
"data-multi-index": t + 1,
|
|
647
|
-
style:
|
|
682
|
+
style: q(e.rect)
|
|
648
683
|
}, `multi-${t}-${e.selector}-${e.xpath}`)),
|
|
649
|
-
|
|
650
|
-
ref:
|
|
684
|
+
o && w && /* @__PURE__ */ m("ul", {
|
|
685
|
+
ref: W,
|
|
651
686
|
className: "ck-element-selector-context-menu",
|
|
652
687
|
"data-testid": "ck-element-selector-context-menu",
|
|
653
688
|
role: "menu",
|
|
654
689
|
"aria-label": "Element actions",
|
|
655
|
-
onKeyDown:
|
|
656
|
-
style:
|
|
690
|
+
onKeyDown: Fe,
|
|
691
|
+
style: ve(w),
|
|
657
692
|
children: [
|
|
658
|
-
/* @__PURE__ */
|
|
693
|
+
/* @__PURE__ */ p("li", { children: /* @__PURE__ */ p("button", {
|
|
659
694
|
type: "button",
|
|
660
695
|
role: "menuitem",
|
|
661
696
|
"data-testid": "ck-context-menu-grab",
|
|
662
697
|
onClick: () => {
|
|
663
|
-
let e =
|
|
664
|
-
|
|
698
|
+
let e = w.element;
|
|
699
|
+
T(null), Z(e);
|
|
665
700
|
},
|
|
666
701
|
children: "Grab for agent"
|
|
667
702
|
}) }),
|
|
668
|
-
/* @__PURE__ */
|
|
703
|
+
/* @__PURE__ */ p("li", { children: /* @__PURE__ */ p("button", {
|
|
669
704
|
type: "button",
|
|
670
705
|
role: "menuitem",
|
|
671
706
|
"data-testid": "ck-context-menu-comment",
|
|
707
|
+
disabled: !h,
|
|
672
708
|
onClick: () => {
|
|
673
|
-
let e =
|
|
674
|
-
|
|
709
|
+
let e = U(w.element);
|
|
710
|
+
T(null), y(e);
|
|
675
711
|
},
|
|
676
712
|
children: "Add comment"
|
|
677
713
|
}) }),
|
|
678
|
-
/* @__PURE__ */
|
|
714
|
+
/* @__PURE__ */ p("li", { children: /* @__PURE__ */ p("button", {
|
|
679
715
|
type: "button",
|
|
680
716
|
role: "menuitem",
|
|
681
717
|
"data-testid": "ck-context-menu-copy-selector",
|
|
682
718
|
onClick: () => {
|
|
683
|
-
let e =
|
|
684
|
-
|
|
719
|
+
let e = w.selector;
|
|
720
|
+
T(null), he(e, "CSS selector");
|
|
685
721
|
},
|
|
686
722
|
children: "Copy CSS selector"
|
|
687
723
|
}) }),
|
|
688
|
-
/* @__PURE__ */
|
|
724
|
+
/* @__PURE__ */ p("li", { children: /* @__PURE__ */ p("button", {
|
|
689
725
|
type: "button",
|
|
690
726
|
role: "menuitem",
|
|
691
727
|
"data-testid": "ck-context-menu-copy-xpath",
|
|
692
728
|
onClick: () => {
|
|
693
|
-
let e =
|
|
694
|
-
|
|
729
|
+
let e = w.xpath;
|
|
730
|
+
T(null), he(e, "XPath");
|
|
695
731
|
},
|
|
696
732
|
children: "Copy XPath"
|
|
697
733
|
}) }),
|
|
698
|
-
/* @__PURE__ */
|
|
734
|
+
/* @__PURE__ */ p("li", { children: /* @__PURE__ */ p("button", {
|
|
699
735
|
type: "button",
|
|
700
736
|
role: "menuitem",
|
|
701
737
|
"data-testid": "ck-context-menu-inspect",
|
|
702
738
|
onClick: () => {
|
|
703
|
-
console.log("[CommentKit] inspect",
|
|
739
|
+
console.log("[CommentKit] inspect", w.element), T(null);
|
|
704
740
|
},
|
|
705
741
|
children: "Inspect (log to console)"
|
|
706
742
|
}) })
|
|
707
743
|
]
|
|
708
744
|
}),
|
|
709
|
-
|
|
745
|
+
o && b.length > 0 && /* @__PURE__ */ m("div", {
|
|
710
746
|
className: "ck-element-selector-multibar",
|
|
711
747
|
"data-testid": "ck-element-selector-multibar",
|
|
712
748
|
children: [
|
|
713
|
-
/* @__PURE__ */
|
|
749
|
+
/* @__PURE__ */ m("span", {
|
|
714
750
|
className: "ck-element-selector-multibar-count",
|
|
715
|
-
children: [
|
|
751
|
+
children: [b.length, " selected"]
|
|
716
752
|
}),
|
|
717
|
-
/* @__PURE__ */
|
|
753
|
+
/* @__PURE__ */ p(s, {
|
|
718
754
|
type: "button",
|
|
719
755
|
size: "sm",
|
|
720
|
-
onClick:
|
|
721
|
-
disabled:
|
|
756
|
+
onClick: je,
|
|
757
|
+
disabled: F,
|
|
722
758
|
"data-testid": "ck-element-grab-many-button",
|
|
723
|
-
children:
|
|
759
|
+
children: F ? "Grabbing…" : `Grab ${b.length} for agent`
|
|
724
760
|
}),
|
|
725
|
-
/* @__PURE__ */
|
|
761
|
+
/* @__PURE__ */ p(s, {
|
|
726
762
|
type: "button",
|
|
727
763
|
size: "sm",
|
|
728
764
|
variant: "ghost",
|
|
729
|
-
onClick:
|
|
730
|
-
disabled:
|
|
765
|
+
onClick: Me,
|
|
766
|
+
disabled: F,
|
|
731
767
|
"data-testid": "ck-element-grab-clear-button",
|
|
732
768
|
children: "Clear"
|
|
733
769
|
})
|
|
734
770
|
]
|
|
735
771
|
}),
|
|
736
|
-
|
|
772
|
+
(o || j) && v && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", {
|
|
737
773
|
"aria-hidden": "true",
|
|
738
774
|
className: "ck-element-selector-outline",
|
|
739
775
|
"data-state": "selected",
|
|
740
|
-
style:
|
|
741
|
-
}), /* @__PURE__ */
|
|
742
|
-
ref:
|
|
776
|
+
style: q(v.rect)
|
|
777
|
+
}), /* @__PURE__ */ m("form", {
|
|
778
|
+
ref: B,
|
|
743
779
|
className: "ck-element-selector-composer",
|
|
744
|
-
style:
|
|
745
|
-
onSubmit:
|
|
780
|
+
style: ge(v.rect, pe),
|
|
781
|
+
onSubmit: Ie,
|
|
746
782
|
children: [
|
|
747
|
-
/* @__PURE__ */
|
|
783
|
+
/* @__PURE__ */ p("div", {
|
|
748
784
|
className: "ck-element-selector-input-row",
|
|
749
|
-
children: /* @__PURE__ */
|
|
785
|
+
children: /* @__PURE__ */ p(te, {
|
|
750
786
|
"data-ck-composer-input": "",
|
|
751
787
|
"aria-label": "Element comment",
|
|
752
|
-
value:
|
|
788
|
+
value: E,
|
|
753
789
|
placeholder: "Add comment",
|
|
754
|
-
disabled:
|
|
790
|
+
disabled: j || F,
|
|
755
791
|
onChange: (e) => {
|
|
756
|
-
|
|
792
|
+
D(e.currentTarget.value), R && z(null);
|
|
757
793
|
}
|
|
758
794
|
})
|
|
759
795
|
}),
|
|
760
|
-
!
|
|
761
|
-
ref:
|
|
796
|
+
!c && /* @__PURE__ */ p("input", {
|
|
797
|
+
ref: H,
|
|
762
798
|
"aria-label": "Attach file",
|
|
763
799
|
className: "ck-element-selector-file-input",
|
|
764
800
|
type: "file",
|
|
765
|
-
|
|
801
|
+
disabled: j || F,
|
|
802
|
+
onChange: ze
|
|
766
803
|
}),
|
|
767
|
-
|
|
804
|
+
O && /* @__PURE__ */ m("div", {
|
|
768
805
|
className: "ck-element-selector-attachment",
|
|
769
806
|
"data-testid": "ck-element-attachment-preview",
|
|
770
807
|
children: [
|
|
771
|
-
|
|
808
|
+
O.previewUrl && /* @__PURE__ */ p("img", {
|
|
772
809
|
alt: "",
|
|
773
810
|
"aria-hidden": "true",
|
|
774
811
|
className: "ck-element-selector-attachment-image",
|
|
775
|
-
src:
|
|
812
|
+
src: O.previewUrl
|
|
776
813
|
}),
|
|
777
|
-
/* @__PURE__ */
|
|
814
|
+
/* @__PURE__ */ m("div", {
|
|
778
815
|
className: "ck-element-selector-attachment-meta",
|
|
779
816
|
children: [
|
|
780
|
-
/* @__PURE__ */
|
|
817
|
+
/* @__PURE__ */ p("span", {
|
|
781
818
|
className: "ck-element-selector-attachment-name",
|
|
782
|
-
children:
|
|
819
|
+
children: O.name
|
|
783
820
|
}),
|
|
784
|
-
/* @__PURE__ */
|
|
821
|
+
/* @__PURE__ */ p("span", {
|
|
785
822
|
className: "ck-element-selector-attachment-path",
|
|
786
|
-
title:
|
|
787
|
-
children:
|
|
823
|
+
title: O.path,
|
|
824
|
+
children: O.path
|
|
788
825
|
}),
|
|
789
|
-
/* @__PURE__ */
|
|
826
|
+
/* @__PURE__ */ p("span", {
|
|
790
827
|
className: "ck-element-selector-attachment-size",
|
|
791
|
-
children:
|
|
828
|
+
children: fe(O.size)
|
|
792
829
|
})
|
|
793
830
|
]
|
|
794
831
|
}),
|
|
795
|
-
/* @__PURE__ */
|
|
832
|
+
/* @__PURE__ */ p(s, {
|
|
796
833
|
type: "button",
|
|
797
834
|
size: "icon-xs",
|
|
798
835
|
variant: "ghost",
|
|
799
836
|
"aria-label": "Remove attachment",
|
|
800
|
-
disabled:
|
|
801
|
-
onClick:
|
|
802
|
-
children: /* @__PURE__ */
|
|
837
|
+
disabled: j || F,
|
|
838
|
+
onClick: Be,
|
|
839
|
+
children: /* @__PURE__ */ p(ie, {
|
|
803
840
|
className: "ck-element-selector-action-icon",
|
|
804
841
|
"aria-hidden": "true"
|
|
805
842
|
})
|
|
806
843
|
})
|
|
807
844
|
]
|
|
808
845
|
}),
|
|
809
|
-
/* @__PURE__ */
|
|
846
|
+
/* @__PURE__ */ m("div", {
|
|
810
847
|
className: "ck-element-selector-actions",
|
|
811
848
|
children: [
|
|
812
|
-
!
|
|
849
|
+
!c && /* @__PURE__ */ m(s, {
|
|
813
850
|
type: "button",
|
|
814
851
|
variant: "outline",
|
|
815
852
|
className: "ck-element-selector-attach-action",
|
|
816
|
-
disabled:
|
|
817
|
-
onClick:
|
|
853
|
+
disabled: j || F,
|
|
854
|
+
onClick: Re,
|
|
818
855
|
"data-testid": "ck-element-attach-button",
|
|
819
|
-
children: [/* @__PURE__ */
|
|
856
|
+
children: [/* @__PURE__ */ p(re, {
|
|
820
857
|
className: "ck-element-selector-action-icon",
|
|
821
858
|
"aria-hidden": "true"
|
|
822
|
-
}), /* @__PURE__ */
|
|
859
|
+
}), /* @__PURE__ */ p("span", { children: "Attach" })]
|
|
823
860
|
}),
|
|
824
|
-
/* @__PURE__ */
|
|
861
|
+
/* @__PURE__ */ p(s, {
|
|
825
862
|
type: "submit",
|
|
826
863
|
className: "ck-element-selector-save-action",
|
|
827
|
-
disabled: !
|
|
828
|
-
children:
|
|
864
|
+
disabled: !h || !E.trim() || j || F,
|
|
865
|
+
children: j ? "Saving" : "Save"
|
|
829
866
|
}),
|
|
830
|
-
/* @__PURE__ */
|
|
867
|
+
/* @__PURE__ */ p(s, {
|
|
831
868
|
type: "button",
|
|
832
869
|
className: "ck-element-selector-grab-action",
|
|
833
|
-
variant:
|
|
834
|
-
disabled:
|
|
835
|
-
onClick:
|
|
836
|
-
title:
|
|
870
|
+
variant: Ve ? "default" : "outline",
|
|
871
|
+
disabled: j || F,
|
|
872
|
+
onClick: Le,
|
|
873
|
+
title: c ? "Copy element context to clipboard for your agent" : "Copy element source + screenshot to clipboard for your agent",
|
|
837
874
|
"data-testid": "ck-element-grab-button",
|
|
838
|
-
children:
|
|
875
|
+
children: F ? "Grabbing…" : "Grab for agent"
|
|
839
876
|
})
|
|
840
877
|
]
|
|
841
878
|
}),
|
|
842
|
-
|
|
879
|
+
!h && /* @__PURE__ */ p("p", {
|
|
880
|
+
role: "status",
|
|
881
|
+
className: "ck-element-selector-error",
|
|
882
|
+
children: ae
|
|
883
|
+
}),
|
|
884
|
+
R && /* @__PURE__ */ p("p", {
|
|
843
885
|
className: "ck-element-selector-error",
|
|
844
886
|
role: "alert",
|
|
845
|
-
children:
|
|
887
|
+
children: R
|
|
846
888
|
})
|
|
847
889
|
]
|
|
848
890
|
})] })
|
|
849
891
|
]
|
|
850
892
|
});
|
|
851
893
|
});
|
|
852
|
-
function
|
|
853
|
-
return /* @__PURE__ */ f
|
|
894
|
+
function Se(e) {
|
|
895
|
+
return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("style", {
|
|
854
896
|
"data-ck-tool-styles": "element-selector",
|
|
855
|
-
children:
|
|
856
|
-
}), /* @__PURE__ */
|
|
897
|
+
children: h
|
|
898
|
+
}), /* @__PURE__ */ p(Y, { ...e })] });
|
|
857
899
|
}
|
|
858
|
-
export {
|
|
900
|
+
export { Se as ElementSelector };
|