@commentkit/comment-kit 0.7.5 → 0.7.6

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