pixelagent 0.1.16 → 0.1.18
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/dist/edit/useEditPreview.d.ts.map +1 -1
- package/dist/pixelagent.js +466 -457
- package/dist/pixelagent.js.map +1 -1
- package/package.json +3 -3
package/dist/pixelagent.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as d, Fragment as K, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { getElementDisplayLabel as Xe, captureTextSnapshot as tt, captureInlineStyles as nt, restoreInlineStyles as
|
|
2
|
+
import { useState as A, useEffect as H, useRef as X, useMemo as ke, useLayoutEffect as Kt, useCallback as E, useId as jt } from "react";
|
|
3
|
+
import { getElementDisplayLabel as Xe, captureTextSnapshot as tt, captureInlineStyles as nt, restoreInlineStyles as Ne, restoreTextSnapshot as Me, getPreviewTargets as Te, clearTailwindStatePreview as Ae, applyTailwindStatePreview as ze, setEditableTextPreview as rt, getRelevantComputedStyles as Se, getEditableTextInfo as fe, readReactSource as Ge, detectStylingSystem as kt, countElementInstances as Ct, getScopeSelector as Mt, getCssSelector as At, copyToClipboard as St, getWindowSelectionText as Lt, getNearestReactComponentName as qt, getDomPath as Jt, resolveElementFromEntry as Et, getAnnotationSessionDisplay as Zt, loadAnnotationSession as Qt, saveAnnotationSession as en, DEFAULT_PIXEL_AGENT_UI_SETTINGS as tn, readHostThemeFromDocument as it, resolvePixelAgentChrome as nn, applyHostThemeToDocument as rn, pixelAgentRootAttributes as an, getElementsInArea as on, formatAllAnnotations as sn, formatAnnotation as ln } from "@pixelagent/shared";
|
|
4
4
|
export * from "@pixelagent/shared";
|
|
5
5
|
import { createPortal as Ke } from "react-dom";
|
|
6
6
|
function $t({
|
|
@@ -9,7 +9,7 @@ function $t({
|
|
|
9
9
|
multiSelected: i = [],
|
|
10
10
|
primarySelected: r = null
|
|
11
11
|
}) {
|
|
12
|
-
const [a, s] =
|
|
12
|
+
const [a, s] = A([]), o = r ?? t;
|
|
13
13
|
if (H(() => {
|
|
14
14
|
const l = /* @__PURE__ */ new Map(), f = i.length > 0;
|
|
15
15
|
e && !t && !f && l.set(e, !1), t && l.set(t, !0);
|
|
@@ -80,24 +80,24 @@ function dn(e, t, i, r = It) {
|
|
|
80
80
|
const u = c.getContext("2d");
|
|
81
81
|
if (!u) return null;
|
|
82
82
|
const l = u.createImageData(s, o), f = l.data, p = Math.min(0.5, i / Math.min(e, t)), v = 0.3, m = 0.2, g = Math.max(0.4, p + 0.1);
|
|
83
|
-
let
|
|
84
|
-
const
|
|
85
|
-
let
|
|
86
|
-
for (let
|
|
83
|
+
let y = 0;
|
|
84
|
+
const S = new Float32Array(s * o * 2);
|
|
85
|
+
let w = 0;
|
|
86
|
+
for (let N = 0; N < o; N++)
|
|
87
87
|
for (let $ = 0; $ < s; $++) {
|
|
88
|
-
const
|
|
89
|
-
Math.abs(h) >
|
|
88
|
+
const _ = $ / s - 0.5, R = N / o - 0.5, x = un(_, R, v, m, g), I = at(0.8, 0, x - 0.15), L = at(0, 1, I), h = (_ * L + 0.5) * s - $, F = (R * L + 0.5) * o - N;
|
|
89
|
+
Math.abs(h) > y && (y = Math.abs(h)), Math.abs(F) > y && (y = Math.abs(F)), S[w++] = h, S[w++] = F;
|
|
90
90
|
}
|
|
91
|
-
if (
|
|
92
|
-
|
|
93
|
-
let
|
|
94
|
-
for (let
|
|
95
|
-
const $ =
|
|
96
|
-
f[
|
|
91
|
+
if (y === 0) return null;
|
|
92
|
+
y *= 0.4 * r;
|
|
93
|
+
let k = 0;
|
|
94
|
+
for (let N = 0; N < f.length; N += 4) {
|
|
95
|
+
const $ = S[k++] / y + 0.5, _ = S[k++] / y + 0.5;
|
|
96
|
+
f[N] = $ * 255, f[N + 1] = _ * 255, f[N + 2] = 0, f[N + 3] = 255;
|
|
97
97
|
}
|
|
98
98
|
return u.putImageData(l, 0, 0), {
|
|
99
99
|
href: c.toDataURL("image/png"),
|
|
100
|
-
scale:
|
|
100
|
+
scale: y / a,
|
|
101
101
|
width: s,
|
|
102
102
|
height: o
|
|
103
103
|
};
|
|
@@ -137,23 +137,23 @@ function Tt({
|
|
|
137
137
|
style: s,
|
|
138
138
|
children: o
|
|
139
139
|
}) {
|
|
140
|
-
const c = t ?? (e === "capsule" ? 9999 : 20), u = r === "enhanced" ? cn : It, l =
|
|
140
|
+
const c = t ?? (e === "capsule" ? 9999 : 20), u = r === "enhanced" ? cn : It, l = X(null), f = ke(() => `pa-lg-${++fn}`, []), [p, v] = A(null);
|
|
141
141
|
Kt(() => {
|
|
142
142
|
const g = l.current;
|
|
143
143
|
if (!g) return;
|
|
144
|
-
let
|
|
145
|
-
const
|
|
146
|
-
cancelAnimationFrame(
|
|
147
|
-
const
|
|
148
|
-
if (
|
|
149
|
-
const
|
|
144
|
+
let y = 0;
|
|
145
|
+
const S = () => {
|
|
146
|
+
cancelAnimationFrame(y), y = requestAnimationFrame(() => {
|
|
147
|
+
const k = g.getBoundingClientRect(), N = Math.round(k.width), $ = Math.round(k.height);
|
|
148
|
+
if (N < 8 || $ < 8) return;
|
|
149
|
+
const _ = e === "capsule" ? $ / 2 : Math.min(c, N / 2, $ / 2), R = dn(N, $, _, u);
|
|
150
150
|
R && v(R);
|
|
151
151
|
});
|
|
152
152
|
};
|
|
153
|
-
|
|
154
|
-
const
|
|
155
|
-
return
|
|
156
|
-
cancelAnimationFrame(
|
|
153
|
+
S();
|
|
154
|
+
const w = new ResizeObserver(S);
|
|
155
|
+
return w.observe(g), () => {
|
|
156
|
+
cancelAnimationFrame(y), w.disconnect();
|
|
157
157
|
};
|
|
158
158
|
}, [e, c, u]);
|
|
159
159
|
const m = p && Ue() && typeof document < "u" ? Ke(
|
|
@@ -251,7 +251,7 @@ function V({
|
|
|
251
251
|
}
|
|
252
252
|
);
|
|
253
253
|
}
|
|
254
|
-
function
|
|
254
|
+
function Pe({
|
|
255
255
|
variant: e = "sheet",
|
|
256
256
|
side: t = "left",
|
|
257
257
|
className: i = "",
|
|
@@ -273,7 +273,7 @@ function Rt({
|
|
|
273
273
|
defaultPosition: e = null,
|
|
274
274
|
computeDefaultPosition: t
|
|
275
275
|
} = {}) {
|
|
276
|
-
const [i, r] =
|
|
276
|
+
const [i, r] = A(e), [a, s] = A(!1), o = X(null), c = X(null), u = E(() => {
|
|
277
277
|
if (i !== null) return;
|
|
278
278
|
const m = c.current;
|
|
279
279
|
if (!m) return;
|
|
@@ -291,10 +291,10 @@ function Rt({
|
|
|
291
291
|
const m = () => {
|
|
292
292
|
r((g) => {
|
|
293
293
|
if (!g || !c.current) return g;
|
|
294
|
-
const
|
|
294
|
+
const y = c.current.getBoundingClientRect();
|
|
295
295
|
return {
|
|
296
|
-
x: Math.min(g.x, window.innerWidth -
|
|
297
|
-
y: Math.min(g.y, window.innerHeight -
|
|
296
|
+
x: Math.min(g.x, window.innerWidth - y.width),
|
|
297
|
+
y: Math.min(g.y, window.innerHeight - y.height)
|
|
298
298
|
};
|
|
299
299
|
});
|
|
300
300
|
};
|
|
@@ -305,24 +305,24 @@ function Rt({
|
|
|
305
305
|
if (m.button !== 0) return;
|
|
306
306
|
const g = c.current;
|
|
307
307
|
if (!g) return;
|
|
308
|
-
let
|
|
309
|
-
if (!
|
|
310
|
-
const
|
|
311
|
-
|
|
308
|
+
let y = i;
|
|
309
|
+
if (!y) {
|
|
310
|
+
const S = g.getBoundingClientRect();
|
|
311
|
+
y = { x: S.left, y: S.top }, r(y);
|
|
312
312
|
}
|
|
313
313
|
o.current = {
|
|
314
314
|
pointerId: m.pointerId,
|
|
315
315
|
startX: m.clientX,
|
|
316
316
|
startY: m.clientY,
|
|
317
|
-
originX:
|
|
318
|
-
originY:
|
|
317
|
+
originX: y.x,
|
|
318
|
+
originY: y.y
|
|
319
319
|
}, s(!0), m.currentTarget.setPointerCapture(m.pointerId), m.preventDefault();
|
|
320
320
|
},
|
|
321
321
|
[i]
|
|
322
322
|
), f = E((m) => {
|
|
323
323
|
if (!o.current || o.current.pointerId !== m.pointerId) return;
|
|
324
|
-
const g = c.current,
|
|
325
|
-
r({ x:
|
|
324
|
+
const g = c.current, y = (g == null ? void 0 : g.offsetWidth) ?? 320, S = (g == null ? void 0 : g.offsetHeight) ?? 48, w = m.clientX - o.current.startX, k = m.clientY - o.current.startY, N = Math.max(8, Math.min(window.innerWidth - y - 8, o.current.originX + w)), $ = Math.max(8, Math.min(window.innerHeight - S - 8, o.current.originY + k));
|
|
325
|
+
r({ x: N, y: $ });
|
|
326
326
|
}, []), p = E((m) => {
|
|
327
327
|
if (!(!o.current || o.current.pointerId !== m.pointerId)) {
|
|
328
328
|
o.current = null, s(!1);
|
|
@@ -482,56 +482,56 @@ function Nn() {
|
|
|
482
482
|
return t ? { "data-pa-chrome": t } : {};
|
|
483
483
|
}
|
|
484
484
|
function _e({ label: e, value: t, onChange: i }) {
|
|
485
|
-
const [r, a] =
|
|
485
|
+
const [r, a] = A(!1), [s, o] = A(() => ot(t)), c = X(null), u = X(null), l = X(null), f = jt(), [p, v] = A({ top: 0, left: 0, width: 260 }), m = Ot(s), g = bn(Pt(m)), y = je(t) ? t : vn(m), S = e.toLowerCase().includes("color") ? e : `${e} color`;
|
|
486
486
|
H(() => {
|
|
487
487
|
o(ot(t));
|
|
488
488
|
}, [t]);
|
|
489
|
-
const
|
|
489
|
+
const w = E(
|
|
490
490
|
(x) => {
|
|
491
491
|
o(x), i(wn(x));
|
|
492
492
|
},
|
|
493
493
|
[i]
|
|
494
|
-
),
|
|
494
|
+
), k = E(
|
|
495
495
|
(x) => {
|
|
496
|
-
|
|
496
|
+
w(Dt(x));
|
|
497
497
|
},
|
|
498
|
-
[
|
|
499
|
-
),
|
|
498
|
+
[w]
|
|
499
|
+
), N = E(() => {
|
|
500
500
|
const x = c.current;
|
|
501
501
|
if (!x) return;
|
|
502
|
-
const I = x.getBoundingClientRect(),
|
|
502
|
+
const I = x.getBoundingClientRect(), L = 260;
|
|
503
503
|
let h = I.left;
|
|
504
|
-
h +
|
|
505
|
-
let
|
|
504
|
+
h + L > window.innerWidth - 12 && (h = window.innerWidth - L - 12), h = Math.max(12, h);
|
|
505
|
+
let F = I.bottom + 8;
|
|
506
506
|
const U = 320;
|
|
507
|
-
|
|
507
|
+
F + U > window.innerHeight - 12 && (F = Math.max(12, I.top - U - 8)), v({ top: F, left: h, width: L });
|
|
508
508
|
}, []);
|
|
509
509
|
H(() => {
|
|
510
510
|
if (!r) return;
|
|
511
|
-
|
|
512
|
-
const x = (
|
|
513
|
-
var
|
|
514
|
-
const h =
|
|
515
|
-
(
|
|
516
|
-
}, I = (
|
|
517
|
-
|
|
511
|
+
N();
|
|
512
|
+
const x = (L) => {
|
|
513
|
+
var F, U;
|
|
514
|
+
const h = L.target;
|
|
515
|
+
(F = c.current) != null && F.contains(h) || (U = u.current) != null && U.contains(h) || a(!1);
|
|
516
|
+
}, I = (L) => {
|
|
517
|
+
L.key === "Escape" && a(!1);
|
|
518
518
|
};
|
|
519
|
-
return window.addEventListener("mousedown", x, !0), window.addEventListener("keydown", I), window.addEventListener("resize",
|
|
520
|
-
window.removeEventListener("mousedown", x, !0), window.removeEventListener("keydown", I), window.removeEventListener("resize",
|
|
519
|
+
return window.addEventListener("mousedown", x, !0), window.addEventListener("keydown", I), window.addEventListener("resize", N), window.addEventListener("scroll", N, !0), () => {
|
|
520
|
+
window.removeEventListener("mousedown", x, !0), window.removeEventListener("keydown", I), window.removeEventListener("resize", N), window.removeEventListener("scroll", N, !0);
|
|
521
521
|
};
|
|
522
|
-
}, [r,
|
|
522
|
+
}, [r, N]);
|
|
523
523
|
const $ = (x, I) => {
|
|
524
524
|
var U;
|
|
525
|
-
const
|
|
526
|
-
if (!
|
|
527
|
-
const { x: h, y:
|
|
528
|
-
|
|
529
|
-
},
|
|
525
|
+
const L = (U = l.current) == null ? void 0 : U.getBoundingClientRect();
|
|
526
|
+
if (!L) return;
|
|
527
|
+
const { x: h, y: F } = xn(x, I, L);
|
|
528
|
+
w({ ...s, s: h, v: 100 - F });
|
|
529
|
+
}, _ = (x) => {
|
|
530
530
|
x.preventDefault(), $(x.clientX, x.clientY);
|
|
531
|
-
const I = (h) => $(h.clientX, h.clientY),
|
|
532
|
-
window.removeEventListener("mousemove", I), window.removeEventListener("mouseup",
|
|
531
|
+
const I = (h) => $(h.clientX, h.clientY), L = () => {
|
|
532
|
+
window.removeEventListener("mousemove", I), window.removeEventListener("mouseup", L);
|
|
533
533
|
};
|
|
534
|
-
window.addEventListener("mousemove", I), window.addEventListener("mouseup",
|
|
534
|
+
window.addEventListener("mousemove", I), window.addEventListener("mouseup", L);
|
|
535
535
|
}, R = r ? Ke(
|
|
536
536
|
/* @__PURE__ */ n(
|
|
537
537
|
"div",
|
|
@@ -545,7 +545,7 @@ function _e({ label: e, value: t, onChange: i }) {
|
|
|
545
545
|
ref: u,
|
|
546
546
|
id: f,
|
|
547
547
|
role: "dialog",
|
|
548
|
-
"aria-label":
|
|
548
|
+
"aria-label": S,
|
|
549
549
|
className: "pa-color-picker",
|
|
550
550
|
style: { top: p.top, left: p.left, width: p.width },
|
|
551
551
|
children: [
|
|
@@ -554,11 +554,11 @@ function _e({ label: e, value: t, onChange: i }) {
|
|
|
554
554
|
"span",
|
|
555
555
|
{
|
|
556
556
|
className: "pa-color-picker-preview",
|
|
557
|
-
style: { backgroundColor:
|
|
557
|
+
style: { backgroundColor: y },
|
|
558
558
|
"aria-hidden": "true"
|
|
559
559
|
}
|
|
560
560
|
),
|
|
561
|
-
/* @__PURE__ */ n("span", { className: "pa-color-picker-header-label", children:
|
|
561
|
+
/* @__PURE__ */ n("span", { className: "pa-color-picker-header-label", children: S })
|
|
562
562
|
] }),
|
|
563
563
|
/* @__PURE__ */ n(
|
|
564
564
|
"div",
|
|
@@ -566,7 +566,7 @@ function _e({ label: e, value: t, onChange: i }) {
|
|
|
566
566
|
ref: l,
|
|
567
567
|
className: "pa-color-picker-sb",
|
|
568
568
|
style: { "--pa-picker-h": String(Math.round(s.h)) },
|
|
569
|
-
onMouseDown:
|
|
569
|
+
onMouseDown: _,
|
|
570
570
|
children: /* @__PURE__ */ n(
|
|
571
571
|
"span",
|
|
572
572
|
{
|
|
@@ -587,7 +587,7 @@ function _e({ label: e, value: t, onChange: i }) {
|
|
|
587
587
|
max: 360,
|
|
588
588
|
value: Math.round(s.h),
|
|
589
589
|
"aria-label": "Hue",
|
|
590
|
-
onChange: (x) =>
|
|
590
|
+
onChange: (x) => w({ ...s, h: parseFloat(x.target.value) })
|
|
591
591
|
}
|
|
592
592
|
),
|
|
593
593
|
/* @__PURE__ */ n(
|
|
@@ -608,7 +608,7 @@ function _e({ label: e, value: t, onChange: i }) {
|
|
|
608
608
|
type: "text",
|
|
609
609
|
value: g,
|
|
610
610
|
spellCheck: !1,
|
|
611
|
-
onChange: (x) =>
|
|
611
|
+
onChange: (x) => k(yn(x.target.value, m))
|
|
612
612
|
}
|
|
613
613
|
)
|
|
614
614
|
] }),
|
|
@@ -623,8 +623,8 @@ function _e({ label: e, value: t, onChange: i }) {
|
|
|
623
623
|
max: 255,
|
|
624
624
|
value: m[x],
|
|
625
625
|
onChange: (I) => {
|
|
626
|
-
const
|
|
627
|
-
|
|
626
|
+
const L = kn(parseInt(I.target.value, 10));
|
|
627
|
+
k({ ...m, [x]: L });
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
630
|
)
|
|
@@ -648,10 +648,10 @@ function _e({ label: e, value: t, onChange: i }) {
|
|
|
648
648
|
"aria-haspopup": "dialog",
|
|
649
649
|
"aria-controls": r ? f : void 0,
|
|
650
650
|
onClick: () => {
|
|
651
|
-
r ||
|
|
651
|
+
r || N(), a((x) => !x);
|
|
652
652
|
},
|
|
653
653
|
children: [
|
|
654
|
-
/* @__PURE__ */ n("span", { className: "pa-color-field-swatch", style: { backgroundColor:
|
|
654
|
+
/* @__PURE__ */ n("span", { className: "pa-color-field-swatch", style: { backgroundColor: y }, "aria-hidden": "true" }),
|
|
655
655
|
/* @__PURE__ */ n(
|
|
656
656
|
"input",
|
|
657
657
|
{
|
|
@@ -673,7 +673,7 @@ function kn(e) {
|
|
|
673
673
|
return Number.isFinite(e) ? Math.min(255, Math.max(0, e)) : 0;
|
|
674
674
|
}
|
|
675
675
|
function ue({ title: e, children: t, defaultOpen: i = !0, badge: r }) {
|
|
676
|
-
const [a, s] =
|
|
676
|
+
const [a, s] = A(i);
|
|
677
677
|
return /* @__PURE__ */ d("section", { className: `pa-edit-section ${a ? "pa-edit-section--open" : ""}`, children: [
|
|
678
678
|
/* @__PURE__ */ d(
|
|
679
679
|
"button",
|
|
@@ -705,8 +705,8 @@ const pe = [
|
|
|
705
705
|
{ value: "Helvetica, Arial, sans-serif", label: "Helvetica" },
|
|
706
706
|
{ value: '"JetBrains Mono", ui-monospace, monospace', label: "JetBrains Mono" },
|
|
707
707
|
{ value: "ui-monospace, monospace", label: "Monospace" }
|
|
708
|
-
],
|
|
709
|
-
function
|
|
708
|
+
], Re = "";
|
|
709
|
+
function Le(e) {
|
|
710
710
|
var i;
|
|
711
711
|
return (((i = e.split(",")[0]) == null ? void 0 : i.trim()) ?? "").replace(/^["']|["']$/g, "");
|
|
712
712
|
}
|
|
@@ -714,28 +714,28 @@ function Cn(e) {
|
|
|
714
714
|
const t = e.trim();
|
|
715
715
|
if (!t)
|
|
716
716
|
return {
|
|
717
|
-
selectValue:
|
|
717
|
+
selectValue: Re,
|
|
718
718
|
options: pe
|
|
719
719
|
};
|
|
720
|
-
const i =
|
|
721
|
-
(s) => s.value === t ||
|
|
720
|
+
const i = Le(t).toLowerCase(), r = pe.find(
|
|
721
|
+
(s) => s.value === t || Le(s.value).toLowerCase() === i
|
|
722
722
|
);
|
|
723
723
|
if (r)
|
|
724
724
|
return { selectValue: r.value, options: pe };
|
|
725
725
|
const a = pe.find((s) => {
|
|
726
|
-
const o =
|
|
726
|
+
const o = Le(s.value).toLowerCase();
|
|
727
727
|
return t.toLowerCase().includes(o) || o.includes(i);
|
|
728
728
|
});
|
|
729
729
|
return a ? { selectValue: a.value, options: pe } : {
|
|
730
730
|
selectValue: t,
|
|
731
731
|
options: [
|
|
732
732
|
...pe,
|
|
733
|
-
{ value: t, label:
|
|
733
|
+
{ value: t, label: Le(t) || "Custom" }
|
|
734
734
|
]
|
|
735
735
|
};
|
|
736
736
|
}
|
|
737
737
|
function Mn({ value: e, onChange: t }) {
|
|
738
|
-
const { selectValue: i, options: r } =
|
|
738
|
+
const { selectValue: i, options: r } = ke(
|
|
739
739
|
() => Cn(e),
|
|
740
740
|
[e]
|
|
741
741
|
);
|
|
@@ -745,13 +745,13 @@ function Mn({ value: e, onChange: t }) {
|
|
|
745
745
|
"select",
|
|
746
746
|
{
|
|
747
747
|
className: "pa-select pa-font-family-select",
|
|
748
|
-
value: i ||
|
|
748
|
+
value: i || Re,
|
|
749
749
|
onChange: (a) => {
|
|
750
750
|
const s = a.target.value;
|
|
751
|
-
s && s !==
|
|
751
|
+
s && s !== Re && t(s);
|
|
752
752
|
},
|
|
753
753
|
children: [
|
|
754
|
-
/* @__PURE__ */ n("option", { value:
|
|
754
|
+
/* @__PURE__ */ n("option", { value: Re, disabled: !0, children: "Select font style" }),
|
|
755
755
|
r.map((a) => /* @__PURE__ */ n("option", { value: a.value, children: a.label }, a.value))
|
|
756
756
|
]
|
|
757
757
|
}
|
|
@@ -928,7 +928,7 @@ function Pn() {
|
|
|
928
928
|
/* @__PURE__ */ n("line", { x1: "1.5", y1: "10.5", x2: "10.5", y2: "10.5", stroke: "currentColor", strokeWidth: "1.5" })
|
|
929
929
|
] });
|
|
930
930
|
}
|
|
931
|
-
function
|
|
931
|
+
function Ee({ side: e }) {
|
|
932
932
|
const t = {
|
|
933
933
|
top: { x1: 1.5, y1: 1.5, x2: 10.5, y2: 1.5 },
|
|
934
934
|
right: { x1: 10.5, y1: 1.5, x2: 10.5, y2: 10.5 },
|
|
@@ -949,7 +949,7 @@ function Dn() {
|
|
|
949
949
|
] });
|
|
950
950
|
}
|
|
951
951
|
function he({ icon: e, display: t, ariaLabel: i, mixed: r, onCommit: a }) {
|
|
952
|
-
const [s, o] =
|
|
952
|
+
const [s, o] = A(t);
|
|
953
953
|
return H(() => {
|
|
954
954
|
o(t);
|
|
955
955
|
}, [t]), /* @__PURE__ */ d("label", { className: `pa-spacing-cell ${r ? "pa-spacing-cell--mixed" : ""}`, children: [
|
|
@@ -972,7 +972,7 @@ function he({ icon: e, display: t, ariaLabel: i, mixed: r, onCommit: a }) {
|
|
|
972
972
|
] });
|
|
973
973
|
}
|
|
974
974
|
function ut({ label: e, value: t, onChange: i }) {
|
|
975
|
-
const r = In(t), [a, s] =
|
|
975
|
+
const r = In(t), [a, s] = A(!1), o = (l) => {
|
|
976
976
|
i(Tn({ ...r, ...l }));
|
|
977
977
|
}, c = r.left !== r.right, u = r.top !== r.bottom;
|
|
978
978
|
return /* @__PURE__ */ d("div", { className: "pa-prop-row pa-prop-row--compact pa-spacing-row", children: [
|
|
@@ -990,7 +990,7 @@ function ut({ label: e, value: t, onChange: i }) {
|
|
|
990
990
|
/* @__PURE__ */ n(
|
|
991
991
|
he,
|
|
992
992
|
{
|
|
993
|
-
icon: /* @__PURE__ */ n(
|
|
993
|
+
icon: /* @__PURE__ */ n(Ee, { side: "left" }),
|
|
994
994
|
display: le(r.left),
|
|
995
995
|
ariaLabel: `${e} left`,
|
|
996
996
|
onCommit: (l) => o({ left: ce(l) })
|
|
@@ -999,7 +999,7 @@ function ut({ label: e, value: t, onChange: i }) {
|
|
|
999
999
|
/* @__PURE__ */ n(
|
|
1000
1000
|
he,
|
|
1001
1001
|
{
|
|
1002
|
-
icon: /* @__PURE__ */ n(
|
|
1002
|
+
icon: /* @__PURE__ */ n(Ee, { side: "top" }),
|
|
1003
1003
|
display: le(r.top),
|
|
1004
1004
|
ariaLabel: `${e} top`,
|
|
1005
1005
|
onCommit: (l) => o({ top: ce(l) })
|
|
@@ -1008,7 +1008,7 @@ function ut({ label: e, value: t, onChange: i }) {
|
|
|
1008
1008
|
/* @__PURE__ */ n(
|
|
1009
1009
|
he,
|
|
1010
1010
|
{
|
|
1011
|
-
icon: /* @__PURE__ */ n(
|
|
1011
|
+
icon: /* @__PURE__ */ n(Ee, { side: "right" }),
|
|
1012
1012
|
display: le(r.right),
|
|
1013
1013
|
ariaLabel: `${e} right`,
|
|
1014
1014
|
onCommit: (l) => o({ right: ce(l) })
|
|
@@ -1017,7 +1017,7 @@ function ut({ label: e, value: t, onChange: i }) {
|
|
|
1017
1017
|
/* @__PURE__ */ n(
|
|
1018
1018
|
he,
|
|
1019
1019
|
{
|
|
1020
|
-
icon: /* @__PURE__ */ n(
|
|
1020
|
+
icon: /* @__PURE__ */ n(Ee, { side: "bottom" }),
|
|
1021
1021
|
display: le(r.bottom),
|
|
1022
1022
|
ariaLabel: `${e} bottom`,
|
|
1023
1023
|
onCommit: (l) => o({ bottom: ce(l) })
|
|
@@ -1208,10 +1208,10 @@ function Gn({
|
|
|
1208
1208
|
scopeHint: f,
|
|
1209
1209
|
stateHint: p
|
|
1210
1210
|
}) {
|
|
1211
|
-
var I,
|
|
1212
|
-
const v = e["font-weight"] ?? "", m = e["font-style"] ?? "normal", g = e["text-decoration"] ?? "none",
|
|
1213
|
-
|
|
1214
|
-
const $ = ((
|
|
1211
|
+
var I, L;
|
|
1212
|
+
const v = e["font-weight"] ?? "", m = e["font-style"] ?? "normal", g = e["text-decoration"] ?? "none", y = Yn(e["text-align"] ?? "left"), S = ((I = e.display) == null ? void 0 : I.trim()) ?? "", w = !!S, k = Xn.has(S), N = [...mt];
|
|
1213
|
+
S && !mt.includes(S) && N.push(S);
|
|
1214
|
+
const $ = ((L = e.gap) == null ? void 0 : L.trim()) ?? "", _ = $ === "normal" || $ === "" ? "0px" : $, R = e["border-style"] ?? "none", x = [...ft];
|
|
1215
1215
|
return R && !ft.includes(R) && x.push(R), /* @__PURE__ */ d("div", { className: "pa-edit-sections", children: [
|
|
1216
1216
|
/* @__PURE__ */ d(ue, { title: "Targeting", defaultOpen: !0, children: [
|
|
1217
1217
|
/* @__PURE__ */ d("div", { className: "pa-edit-field-grid pa-edit-field-grid--2", children: [
|
|
@@ -1327,7 +1327,7 @@ function Gn({
|
|
|
1327
1327
|
On,
|
|
1328
1328
|
{
|
|
1329
1329
|
ariaLabel: "Text align",
|
|
1330
|
-
value:
|
|
1330
|
+
value: y,
|
|
1331
1331
|
onChange: (h) => t("text-align", h),
|
|
1332
1332
|
options: [
|
|
1333
1333
|
{
|
|
@@ -1426,25 +1426,25 @@ function Gn({
|
|
|
1426
1426
|
onChange: (h) => t("margin", h)
|
|
1427
1427
|
}
|
|
1428
1428
|
),
|
|
1429
|
-
|
|
1429
|
+
w && /* @__PURE__ */ d("label", { className: "pa-prop-row pa-prop-row--compact", children: [
|
|
1430
1430
|
/* @__PURE__ */ n("span", { className: "pa-edit-field-label", children: "Display" }),
|
|
1431
1431
|
/* @__PURE__ */ n(
|
|
1432
1432
|
"select",
|
|
1433
1433
|
{
|
|
1434
1434
|
className: "pa-select",
|
|
1435
|
-
value:
|
|
1435
|
+
value: S,
|
|
1436
1436
|
onChange: (h) => t("display", h.target.value),
|
|
1437
|
-
children:
|
|
1437
|
+
children: N.map((h) => /* @__PURE__ */ n("option", { value: h, children: h }, h))
|
|
1438
1438
|
}
|
|
1439
1439
|
)
|
|
1440
1440
|
] }),
|
|
1441
|
-
|
|
1441
|
+
k && /* @__PURE__ */ n(
|
|
1442
1442
|
ie,
|
|
1443
1443
|
{
|
|
1444
1444
|
compact: !0,
|
|
1445
1445
|
property: "gap",
|
|
1446
1446
|
label: "Gap",
|
|
1447
|
-
value:
|
|
1447
|
+
value: _,
|
|
1448
1448
|
onChange: (h) => t("gap", h)
|
|
1449
1449
|
}
|
|
1450
1450
|
)
|
|
@@ -1536,136 +1536,145 @@ const Kn = 50, gt = [
|
|
|
1536
1536
|
"opacity"
|
|
1537
1537
|
];
|
|
1538
1538
|
function jn(e, t, i) {
|
|
1539
|
-
var
|
|
1540
|
-
const r =
|
|
1541
|
-
|
|
1539
|
+
var oe;
|
|
1540
|
+
const r = X([]), a = X(/* @__PURE__ */ new Set()), s = X([]), o = X(null), c = X([]), u = X(
|
|
1541
|
+
null
|
|
1542
|
+
), [l, f] = A({}), [p, v] = A({}), [m, g] = A("none"), [y, S] = A(""), [w, k] = A(""), [N, $] = A(() => /* @__PURE__ */ new Map()), [_, R] = A(!1), x = E(() => {
|
|
1543
|
+
const C = Array.from(a.current);
|
|
1542
1544
|
return {
|
|
1543
|
-
inline: nt(
|
|
1544
|
-
text: e &&
|
|
1545
|
+
inline: nt(C, [...gt]),
|
|
1546
|
+
text: e && m !== "none" ? tt(e, m) : null
|
|
1545
1547
|
};
|
|
1546
|
-
}, [e,
|
|
1547
|
-
c.current.push(
|
|
1548
|
-
}, [
|
|
1549
|
-
(
|
|
1550
|
-
var
|
|
1548
|
+
}, [e, m]), I = E(() => {
|
|
1549
|
+
c.current.push(x()), c.current.length > Kn && c.current.shift(), R(c.current.length > 0);
|
|
1550
|
+
}, [x]), L = E(
|
|
1551
|
+
(C) => {
|
|
1552
|
+
var Y;
|
|
1551
1553
|
if (!e) return;
|
|
1552
|
-
const
|
|
1553
|
-
|
|
1554
|
-
const
|
|
1555
|
-
r.current =
|
|
1556
|
-
const
|
|
1557
|
-
if (
|
|
1558
|
-
for (const
|
|
1559
|
-
if (
|
|
1560
|
-
for (const
|
|
1561
|
-
rt(
|
|
1554
|
+
const P = Array.from(a.current);
|
|
1555
|
+
Ne(s.current.filter((T) => P.includes(T.element))), o.current && Me(o.current);
|
|
1556
|
+
const O = Te(e, t);
|
|
1557
|
+
r.current = O, a.current = new Set(O), Ae(P), ze(O, i);
|
|
1558
|
+
const D = e ? ((Y = N.get(e)) == null ? void 0 : Y.get(i)) ?? [] : [];
|
|
1559
|
+
if (C && D.length > 0)
|
|
1560
|
+
for (const T of D)
|
|
1561
|
+
if (T.property === "textContent" || T.property === "value")
|
|
1562
|
+
for (const z of O)
|
|
1563
|
+
rt(z, T.property, T.newValue);
|
|
1562
1564
|
else
|
|
1563
|
-
for (const
|
|
1564
|
-
|
|
1565
|
+
for (const z of O)
|
|
1566
|
+
z.style.setProperty(T.property, T.newValue);
|
|
1565
1567
|
},
|
|
1566
|
-
[e, t, i,
|
|
1568
|
+
[e, t, i, N]
|
|
1567
1569
|
);
|
|
1568
1570
|
H(() => {
|
|
1569
1571
|
if (!e) {
|
|
1570
|
-
r.current = [], a.current = /* @__PURE__ */ new Set(), s.current = [], o.current = null, c.current = [],
|
|
1572
|
+
r.current = [], a.current = /* @__PURE__ */ new Set(), s.current = [], o.current = null, c.current = [], f({}), v({}), g("none"), S(""), k(""), $(/* @__PURE__ */ new Map()), R(!1);
|
|
1571
1573
|
return;
|
|
1572
1574
|
}
|
|
1573
|
-
const
|
|
1574
|
-
r.current =
|
|
1575
|
-
const
|
|
1576
|
-
|
|
1577
|
-
const
|
|
1578
|
-
return
|
|
1575
|
+
const C = Te(e, t);
|
|
1576
|
+
r.current = C, a.current = new Set(C), s.current = nt(C, [...gt]), c.current = [], R(!1);
|
|
1577
|
+
const P = Se(e);
|
|
1578
|
+
f(P), v(P);
|
|
1579
|
+
const O = fe(e);
|
|
1580
|
+
return g(O.kind), S(O.value), k(O.value), o.current = O.kind !== "none" ? tt(e, O.kind) : null, ze(C, i), () => Ae(C);
|
|
1579
1581
|
}, [e]), H(() => {
|
|
1580
|
-
e &&
|
|
1582
|
+
e && L(!0);
|
|
1581
1583
|
}, [t]), H(() => {
|
|
1582
|
-
var
|
|
1584
|
+
var Y;
|
|
1583
1585
|
if (!e) return;
|
|
1584
|
-
const
|
|
1585
|
-
r.current =
|
|
1586
|
-
s.current.filter((
|
|
1586
|
+
const C = Te(e, t);
|
|
1587
|
+
r.current = C, Ne(
|
|
1588
|
+
s.current.filter((T) => C.includes(T.element))
|
|
1587
1589
|
);
|
|
1588
|
-
const
|
|
1589
|
-
for (const
|
|
1590
|
-
if (!(
|
|
1591
|
-
for (const
|
|
1592
|
-
|
|
1593
|
-
|
|
1590
|
+
const P = ((Y = N.get(e)) == null ? void 0 : Y.get(i)) ?? [];
|
|
1591
|
+
for (const T of P)
|
|
1592
|
+
if (!(T.property === "textContent" || T.property === "value"))
|
|
1593
|
+
for (const z of C)
|
|
1594
|
+
z.style.setProperty(T.property, T.newValue);
|
|
1595
|
+
const O = u.current;
|
|
1596
|
+
if (O !== null && O.element === e && O.state !== i) {
|
|
1597
|
+
const T = { ...p };
|
|
1598
|
+
for (const z of P)
|
|
1599
|
+
z.property === "textContent" || z.property === "value" || (T[z.property] = z.newValue);
|
|
1600
|
+
f(T);
|
|
1601
|
+
}
|
|
1602
|
+
u.current = { element: e, state: i }, Ae(Array.from(a.current)), ze(C, i), a.current = new Set(C);
|
|
1594
1603
|
}, [i, e, t]);
|
|
1595
|
-
const
|
|
1596
|
-
(
|
|
1597
|
-
e &&
|
|
1598
|
-
const
|
|
1599
|
-
return
|
|
1604
|
+
const h = E(
|
|
1605
|
+
(C, P, O) => {
|
|
1606
|
+
e && $((D) => {
|
|
1607
|
+
const Y = new Map(D), T = new Map(Y.get(e) ?? /* @__PURE__ */ new Map()), ve = (T.get(i) ?? []).filter((be) => be.property !== C);
|
|
1608
|
+
return O === P ? ve.length === 0 ? T.delete(i) : T.set(i, ve) : T.set(i, [...ve, { property: C, oldValue: P, newValue: O }]), T.size === 0 ? Y.delete(e) : Y.set(e, T), Y;
|
|
1600
1609
|
});
|
|
1601
1610
|
},
|
|
1602
1611
|
[e, i]
|
|
1603
|
-
),
|
|
1604
|
-
(
|
|
1612
|
+
), F = E(
|
|
1613
|
+
(C, P) => {
|
|
1605
1614
|
if (!e) return;
|
|
1606
|
-
const
|
|
1607
|
-
|
|
1608
|
-
for (const [
|
|
1609
|
-
const
|
|
1610
|
-
for (const
|
|
1611
|
-
|
|
1612
|
-
|
|
1615
|
+
const O = { [C]: P };
|
|
1616
|
+
C === "border-width" && (l["border-style"] ?? "none") === "none" && Sn(P) && (O["border-style"] = "solid"), I(), f((D) => ({ ...D, ...O }));
|
|
1617
|
+
for (const [D, Y] of Object.entries(O)) {
|
|
1618
|
+
const T = p[D] ?? "";
|
|
1619
|
+
for (const z of r.current)
|
|
1620
|
+
z.style.setProperty(D, Y), a.current.add(z);
|
|
1621
|
+
h(D, T, Y);
|
|
1613
1622
|
}
|
|
1614
1623
|
},
|
|
1615
|
-
[e,
|
|
1616
|
-
),
|
|
1617
|
-
(
|
|
1618
|
-
if (!(!e ||
|
|
1619
|
-
|
|
1620
|
-
for (const
|
|
1621
|
-
rt(
|
|
1622
|
-
|
|
1624
|
+
[e, p, l, I, h]
|
|
1625
|
+
), U = E(
|
|
1626
|
+
(C) => {
|
|
1627
|
+
if (!(!e || m === "none")) {
|
|
1628
|
+
I(), S(C);
|
|
1629
|
+
for (const P of r.current)
|
|
1630
|
+
rt(P, m, C), a.current.add(P);
|
|
1631
|
+
h(m, w, C);
|
|
1623
1632
|
}
|
|
1624
1633
|
},
|
|
1625
|
-
[e,
|
|
1626
|
-
),
|
|
1627
|
-
const
|
|
1628
|
-
if (
|
|
1629
|
-
|
|
1630
|
-
const
|
|
1631
|
-
|
|
1634
|
+
[e, m, w, I, h]
|
|
1635
|
+
), ge = E(() => {
|
|
1636
|
+
const C = c.current.pop();
|
|
1637
|
+
if (C && (Ne(C.inline), C.text && Me(C.text), R(c.current.length > 0), e)) {
|
|
1638
|
+
f(Se(e));
|
|
1639
|
+
const P = fe(e);
|
|
1640
|
+
P.kind !== "none" && S(P.value);
|
|
1632
1641
|
}
|
|
1633
|
-
}, [e]),
|
|
1634
|
-
if (
|
|
1635
|
-
|
|
1636
|
-
const
|
|
1637
|
-
|
|
1642
|
+
}, [e]), Z = E(() => {
|
|
1643
|
+
if (Ne(s.current), o.current && Me(o.current), c.current = [], R(!1), $(/* @__PURE__ */ new Map()), e) {
|
|
1644
|
+
f(Se(e));
|
|
1645
|
+
const C = fe(e);
|
|
1646
|
+
S(C.value);
|
|
1638
1647
|
}
|
|
1639
|
-
}, [e]),
|
|
1640
|
-
|
|
1641
|
-
}, []),
|
|
1642
|
-
if (
|
|
1643
|
-
|
|
1644
|
-
const
|
|
1645
|
-
|
|
1648
|
+
}, [e]), te = E(() => {
|
|
1649
|
+
Ne(s.current), o.current && Me(o.current);
|
|
1650
|
+
}, []), re = E(() => {
|
|
1651
|
+
if (te(), Ae(Array.from(a.current)), c.current = [], R(!1), $(/* @__PURE__ */ new Map()), e) {
|
|
1652
|
+
f(Se(e));
|
|
1653
|
+
const C = fe(e);
|
|
1654
|
+
C.kind !== "none" && S(C.value);
|
|
1646
1655
|
}
|
|
1647
|
-
}, [
|
|
1648
|
-
let
|
|
1649
|
-
for (const
|
|
1650
|
-
for (const
|
|
1651
|
-
const
|
|
1652
|
-
|
|
1656
|
+
}, [te, e]), W = e ? ((oe = N.get(e)) == null ? void 0 : oe.get(i)) ?? [] : [];
|
|
1657
|
+
let G = 0;
|
|
1658
|
+
for (const C of N.values())
|
|
1659
|
+
for (const P of C.values()) G += P.length;
|
|
1660
|
+
const ne = E(() => {
|
|
1661
|
+
$(/* @__PURE__ */ new Map());
|
|
1653
1662
|
}, []);
|
|
1654
1663
|
return {
|
|
1655
|
-
values:
|
|
1656
|
-
textKind:
|
|
1657
|
-
textValue:
|
|
1658
|
-
pendingChanges:
|
|
1659
|
-
pendingByElement:
|
|
1660
|
-
totalPendingCount:
|
|
1661
|
-
clearAllPending:
|
|
1662
|
-
canUndo:
|
|
1663
|
-
updateProperty:
|
|
1664
|
-
updateText:
|
|
1665
|
-
undo:
|
|
1666
|
-
reset:
|
|
1667
|
-
clearPreviews:
|
|
1668
|
-
revertPreviews:
|
|
1664
|
+
values: l,
|
|
1665
|
+
textKind: m,
|
|
1666
|
+
textValue: y,
|
|
1667
|
+
pendingChanges: W,
|
|
1668
|
+
pendingByElement: N,
|
|
1669
|
+
totalPendingCount: G,
|
|
1670
|
+
clearAllPending: ne,
|
|
1671
|
+
canUndo: _,
|
|
1672
|
+
updateProperty: F,
|
|
1673
|
+
updateText: U,
|
|
1674
|
+
undo: ge,
|
|
1675
|
+
reset: Z,
|
|
1676
|
+
clearPreviews: re,
|
|
1677
|
+
revertPreviews: te
|
|
1669
1678
|
};
|
|
1670
1679
|
}
|
|
1671
1680
|
function qn({
|
|
@@ -1686,63 +1695,63 @@ function qn({
|
|
|
1686
1695
|
values: v,
|
|
1687
1696
|
textKind: m,
|
|
1688
1697
|
textValue: g,
|
|
1689
|
-
pendingChanges:
|
|
1690
|
-
pendingByElement:
|
|
1691
|
-
totalPendingCount:
|
|
1692
|
-
clearAllPending:
|
|
1693
|
-
canUndo:
|
|
1698
|
+
pendingChanges: y,
|
|
1699
|
+
pendingByElement: S,
|
|
1700
|
+
totalPendingCount: w,
|
|
1701
|
+
clearAllPending: k,
|
|
1702
|
+
canUndo: N,
|
|
1694
1703
|
updateProperty: $,
|
|
1695
|
-
updateText:
|
|
1704
|
+
updateText: _,
|
|
1696
1705
|
undo: R,
|
|
1697
1706
|
reset: x,
|
|
1698
1707
|
clearPreviews: I,
|
|
1699
|
-
revertPreviews:
|
|
1700
|
-
} = jn(e, a, o), { elementRef: h, isDragging:
|
|
1701
|
-
computeDefaultPosition: (
|
|
1702
|
-
x: window.innerWidth -
|
|
1708
|
+
revertPreviews: L
|
|
1709
|
+
} = jn(e, a, o), { elementRef: h, isDragging: F, style: U, dragHandleProps: ge } = Rt({
|
|
1710
|
+
computeDefaultPosition: (D) => ({
|
|
1711
|
+
x: window.innerWidth - D.width - 16,
|
|
1703
1712
|
y: 16
|
|
1704
1713
|
})
|
|
1705
1714
|
});
|
|
1706
|
-
H(() => (p == null || p({ clearPreviews: I, revertPreviews:
|
|
1707
|
-
const
|
|
1708
|
-
(
|
|
1709
|
-
if (f(
|
|
1710
|
-
const
|
|
1711
|
-
(
|
|
1715
|
+
H(() => (p == null || p({ clearPreviews: I, revertPreviews: L }), () => p == null ? void 0 : p(null)), [p, I, L]);
|
|
1716
|
+
const Z = E(
|
|
1717
|
+
(D) => {
|
|
1718
|
+
if (f(D.target)) return;
|
|
1719
|
+
const T = document.elementsFromPoint(D.clientX, D.clientY).find(
|
|
1720
|
+
(z) => z instanceof Element && !z.closest(
|
|
1712
1721
|
"[data-pixelagent-root],[data-pixelagent-toolbar-portal],[data-pixelagent-picker-portal]"
|
|
1713
1722
|
)
|
|
1714
1723
|
);
|
|
1715
|
-
r(
|
|
1724
|
+
r(T ?? null);
|
|
1716
1725
|
},
|
|
1717
1726
|
[f, r]
|
|
1718
|
-
),
|
|
1719
|
-
(
|
|
1720
|
-
if (f(
|
|
1721
|
-
|
|
1722
|
-
const
|
|
1723
|
-
(
|
|
1727
|
+
), te = E(
|
|
1728
|
+
(D) => {
|
|
1729
|
+
if (f(D.target)) return;
|
|
1730
|
+
D.preventDefault(), D.stopPropagation();
|
|
1731
|
+
const T = document.elementsFromPoint(D.clientX, D.clientY).find(
|
|
1732
|
+
(z) => z instanceof Element && !z.closest(
|
|
1724
1733
|
"[data-pixelagent-root],[data-pixelagent-toolbar-portal],[data-pixelagent-picker-portal]"
|
|
1725
1734
|
)
|
|
1726
1735
|
);
|
|
1727
|
-
i(
|
|
1736
|
+
i(T ?? null);
|
|
1728
1737
|
},
|
|
1729
1738
|
[f, i]
|
|
1730
1739
|
);
|
|
1731
|
-
H(() => (document.addEventListener("mousemove",
|
|
1732
|
-
document.removeEventListener("mousemove",
|
|
1733
|
-
}), [
|
|
1740
|
+
H(() => (document.addEventListener("mousemove", Z, !0), document.addEventListener("click", te, !0), () => {
|
|
1741
|
+
document.removeEventListener("mousemove", Z, !0), document.removeEventListener("click", te, !0);
|
|
1742
|
+
}), [Z, te]);
|
|
1734
1743
|
const re = async () => {
|
|
1735
|
-
if (
|
|
1736
|
-
const
|
|
1737
|
-
|
|
1738
|
-
}, W = e ? Ge(e) : null, G = e ? kt(e) : null,
|
|
1744
|
+
if (w === 0) return;
|
|
1745
|
+
const D = await u(S);
|
|
1746
|
+
D.applied && (k(), D.skipRevert || L());
|
|
1747
|
+
}, W = e ? Ge(e) : null, G = e ? kt(e) : null, ne = e ? Ct(e) : 0, oe = e ? Mt(e, "all-instances") : "", C = o !== "normal" && G === "tailwind" ? "Tailwind variant preview: matching hover:/focus:/… classes are applied without the prefix." : o !== "normal" ? "State preview uses focus/disabled simulation where possible." : null, P = ne > 1 ? a === "all-instances" ? `Preview & Apply on ${ne} elements (${oe}).` : `This instance only — ${ne - 1} other on page.` : a === "all-instances" ? "Only one match — scope has no effect." : null, O = ke(() => !e || a !== "all-instances" ? [] : Te(e, "all-instances"), [e, a]);
|
|
1739
1748
|
return /* @__PURE__ */ d(K, { children: [
|
|
1740
1749
|
/* @__PURE__ */ n(
|
|
1741
1750
|
$t,
|
|
1742
1751
|
{
|
|
1743
1752
|
element: a === "all-instances" ? null : t,
|
|
1744
1753
|
selected: e,
|
|
1745
|
-
multiSelected:
|
|
1754
|
+
multiSelected: O,
|
|
1746
1755
|
primarySelected: e
|
|
1747
1756
|
}
|
|
1748
1757
|
),
|
|
@@ -1750,9 +1759,9 @@ function qn({
|
|
|
1750
1759
|
"div",
|
|
1751
1760
|
{
|
|
1752
1761
|
ref: h,
|
|
1753
|
-
className: `pa-edit-panel-float ${
|
|
1762
|
+
className: `pa-edit-panel-float ${F ? "pa-edit-panel-float--dragging" : ""}`,
|
|
1754
1763
|
style: U,
|
|
1755
|
-
children: /* @__PURE__ */ n(
|
|
1764
|
+
children: /* @__PURE__ */ n(Pe, { variant: "sheet", side: "right", className: "pa-edit-panel-glass", children: /* @__PURE__ */ d("div", { className: "pa-edit-panel-inner", children: [
|
|
1756
1765
|
/* @__PURE__ */ d("div", { className: "pa-edit-panel-header", children: [
|
|
1757
1766
|
/* @__PURE__ */ n(
|
|
1758
1767
|
"button",
|
|
@@ -1781,7 +1790,7 @@ function qn({
|
|
|
1781
1790
|
{
|
|
1782
1791
|
className: "pa-edit-meta-label",
|
|
1783
1792
|
title: `This instance: ${At(e)}
|
|
1784
|
-
All instances: ${
|
|
1793
|
+
All instances: ${oe}`,
|
|
1785
1794
|
children: Xe(e)
|
|
1786
1795
|
}
|
|
1787
1796
|
),
|
|
@@ -1801,19 +1810,19 @@ All instances: ${M}`,
|
|
|
1801
1810
|
onPropertyChange: $,
|
|
1802
1811
|
textKind: m,
|
|
1803
1812
|
textValue: g,
|
|
1804
|
-
onTextChange:
|
|
1813
|
+
onTextChange: _,
|
|
1805
1814
|
targetScope: a,
|
|
1806
1815
|
onTargetScopeChange: s,
|
|
1807
1816
|
elementState: o,
|
|
1808
1817
|
onElementStateChange: c,
|
|
1809
|
-
instanceCount:
|
|
1810
|
-
scopeHint:
|
|
1811
|
-
stateHint:
|
|
1818
|
+
instanceCount: ne,
|
|
1819
|
+
scopeHint: P,
|
|
1820
|
+
stateHint: C
|
|
1812
1821
|
}
|
|
1813
1822
|
) }),
|
|
1814
1823
|
/* @__PURE__ */ d("div", { className: "pa-edit-panel-sticky", children: [
|
|
1815
1824
|
/* @__PURE__ */ d("div", { className: "pa-edit-actions", children: [
|
|
1816
|
-
/* @__PURE__ */ n(V, { variant: "regular", onClick: R, disabled: !
|
|
1825
|
+
/* @__PURE__ */ n(V, { variant: "regular", onClick: R, disabled: !N, children: /* @__PURE__ */ d("span", { className: "pa-glass-btn-inner", children: [
|
|
1817
1826
|
/* @__PURE__ */ n(mn, { className: "pa-glass-btn-icon" }),
|
|
1818
1827
|
/* @__PURE__ */ n("span", { children: "Undo" })
|
|
1819
1828
|
] }) }),
|
|
@@ -1822,7 +1831,7 @@ All instances: ${M}`,
|
|
|
1822
1831
|
{
|
|
1823
1832
|
variant: "regular",
|
|
1824
1833
|
onClick: x,
|
|
1825
|
-
disabled:
|
|
1834
|
+
disabled: y.length === 0,
|
|
1826
1835
|
children: /* @__PURE__ */ d("span", { className: "pa-glass-btn-inner", children: [
|
|
1827
1836
|
/* @__PURE__ */ n(gn, { className: "pa-glass-btn-icon" }),
|
|
1828
1837
|
/* @__PURE__ */ n("span", { children: "Reset" })
|
|
@@ -1835,7 +1844,7 @@ All instances: ${M}`,
|
|
|
1835
1844
|
"span",
|
|
1836
1845
|
{
|
|
1837
1846
|
className: l ? /fail/i.test(l) ? "pa-change-count pa-change-count--error" : "pa-change-count pa-change-count--success" : "pa-change-count",
|
|
1838
|
-
children: l ?? `${
|
|
1847
|
+
children: l ?? `${w} pending change${w !== 1 ? "s" : ""}`
|
|
1839
1848
|
}
|
|
1840
1849
|
),
|
|
1841
1850
|
/* @__PURE__ */ n(
|
|
@@ -1843,7 +1852,7 @@ All instances: ${M}`,
|
|
|
1843
1852
|
{
|
|
1844
1853
|
variant: "glass-primary",
|
|
1845
1854
|
onClick: re,
|
|
1846
|
-
disabled:
|
|
1855
|
+
disabled: w === 0,
|
|
1847
1856
|
title: W != null && W.sourceFile ? void 0 : "No source file — Apply copies selector + changes to clipboard",
|
|
1848
1857
|
children: "Apply"
|
|
1849
1858
|
}
|
|
@@ -1879,7 +1888,7 @@ async function Jn(e, t = {}) {
|
|
|
1879
1888
|
return await St(JSON.stringify(e, null, 2)), { mode: "clipboard" };
|
|
1880
1889
|
}
|
|
1881
1890
|
function Zn(e) {
|
|
1882
|
-
const [t, i] =
|
|
1891
|
+
const [t, i] = A(null);
|
|
1883
1892
|
return H(() => {
|
|
1884
1893
|
if (!e) {
|
|
1885
1894
|
i(null);
|
|
@@ -1893,7 +1902,7 @@ function Zn(e) {
|
|
|
1893
1902
|
};
|
|
1894
1903
|
}, [e]), t;
|
|
1895
1904
|
}
|
|
1896
|
-
const ae = 8,
|
|
1905
|
+
const ae = 8, J = 8, Qn = 12, er = 300, tr = 280;
|
|
1897
1906
|
function He(e, t, i, r) {
|
|
1898
1907
|
return {
|
|
1899
1908
|
top: e,
|
|
@@ -1930,7 +1939,7 @@ function Ve(e, t) {
|
|
|
1930
1939
|
window.innerWidth - t - ae
|
|
1931
1940
|
);
|
|
1932
1941
|
}
|
|
1933
|
-
function
|
|
1942
|
+
function $e(e, t) {
|
|
1934
1943
|
return Math.min(
|
|
1935
1944
|
Math.max(ae, e),
|
|
1936
1945
|
window.innerHeight - t - ae
|
|
@@ -1944,19 +1953,19 @@ function ar(e, t) {
|
|
|
1944
1953
|
}
|
|
1945
1954
|
function or(e, t = er, i = tr) {
|
|
1946
1955
|
const r = rr(), s = e.top > window.innerHeight * 0.45 ? [
|
|
1947
|
-
{ placement: "above", top: e.top - i -
|
|
1948
|
-
{ placement: "below", top: e.bottom +
|
|
1949
|
-
{ placement: "right", top: e.top, left: e.right +
|
|
1950
|
-
{ placement: "left", top: e.top, left: e.left - t -
|
|
1956
|
+
{ placement: "above", top: e.top - i - J, left: e.left },
|
|
1957
|
+
{ placement: "below", top: e.bottom + J, left: e.left },
|
|
1958
|
+
{ placement: "right", top: e.top, left: e.right + J },
|
|
1959
|
+
{ placement: "left", top: e.top, left: e.left - t - J }
|
|
1951
1960
|
] : [
|
|
1952
|
-
{ placement: "below", top: e.bottom +
|
|
1953
|
-
{ placement: "above", top: e.top - i -
|
|
1954
|
-
{ placement: "right", top: e.top, left: e.right +
|
|
1955
|
-
{ placement: "left", top: e.top, left: e.left - t -
|
|
1961
|
+
{ placement: "below", top: e.bottom + J, left: e.left },
|
|
1962
|
+
{ placement: "above", top: e.top - i - J, left: e.left },
|
|
1963
|
+
{ placement: "right", top: e.top, left: e.right + J },
|
|
1964
|
+
{ placement: "left", top: e.top, left: e.left - t - J }
|
|
1956
1965
|
];
|
|
1957
1966
|
for (const { top: u, left: l } of s) {
|
|
1958
1967
|
const f = He(
|
|
1959
|
-
|
|
1968
|
+
$e(u, i),
|
|
1960
1969
|
Ve(l, t),
|
|
1961
1970
|
t,
|
|
1962
1971
|
i
|
|
@@ -1964,11 +1973,11 @@ function or(e, t = er, i = tr) {
|
|
|
1964
1973
|
if (ar(f, r))
|
|
1965
1974
|
return { top: f.top, left: f.left };
|
|
1966
1975
|
}
|
|
1967
|
-
let o =
|
|
1976
|
+
let o = $e(e.top - i - J, i), c = Ve(e.left, t);
|
|
1968
1977
|
if (r) {
|
|
1969
1978
|
let u = He(o, c, t, i);
|
|
1970
|
-
Ye(u, r) && (o =
|
|
1971
|
-
Math.min(e.left, r.left - t -
|
|
1979
|
+
Ye(u, r) && (o = $e(r.top - i - J, i), u = He(o, c, t, i)), Ye(u, r) && (o = $e(e.bottom + J, i), c = Ve(
|
|
1980
|
+
Math.min(e.left, r.left - t - J),
|
|
1972
1981
|
t
|
|
1973
1982
|
));
|
|
1974
1983
|
}
|
|
@@ -1980,24 +1989,24 @@ function sr({
|
|
|
1980
1989
|
onSubmit: i,
|
|
1981
1990
|
onCancel: r
|
|
1982
1991
|
}) {
|
|
1983
|
-
const [a, s] =
|
|
1992
|
+
const [a, s] = A(""), o = X(null), c = X(null), u = e[0] ?? null, l = t ? new DOMRect(t.x, t.y, t.width, t.height) : null, f = Zn(u), p = l ?? f, v = Lt(), m = u ? fe(u) : { kind: "none", value: "" }, g = m.kind !== "none" ? m.value : void 0;
|
|
1984
1993
|
if (H(() => {
|
|
1985
|
-
var
|
|
1986
|
-
(
|
|
1994
|
+
var k;
|
|
1995
|
+
(k = o.current) == null || k.focus();
|
|
1987
1996
|
}, [e]), H(() => {
|
|
1988
|
-
const
|
|
1989
|
-
|
|
1997
|
+
const k = (N) => {
|
|
1998
|
+
N.key === "Escape" && r();
|
|
1990
1999
|
};
|
|
1991
|
-
return document.addEventListener("keydown",
|
|
2000
|
+
return document.addEventListener("keydown", k), () => document.removeEventListener("keydown", k);
|
|
1992
2001
|
}, [r]), !p) return null;
|
|
1993
|
-
const
|
|
1994
|
-
a.trim() && i(a,
|
|
2002
|
+
const y = or(p), S = e.length > 1 ? `${e.length} selected` : u ? Xe(u) : "Area selection", w = (k) => {
|
|
2003
|
+
a.trim() && i(a, k);
|
|
1995
2004
|
};
|
|
1996
2005
|
return /* @__PURE__ */ n(
|
|
1997
|
-
|
|
2006
|
+
Pe,
|
|
1998
2007
|
{
|
|
1999
2008
|
variant: "popover",
|
|
2000
|
-
style: { top:
|
|
2009
|
+
style: { top: y.top, left: y.left },
|
|
2001
2010
|
children: /* @__PURE__ */ d(
|
|
2002
2011
|
"div",
|
|
2003
2012
|
{
|
|
@@ -2007,7 +2016,7 @@ function sr({
|
|
|
2007
2016
|
"aria-label": "Add annotation",
|
|
2008
2017
|
className: "pa-popover-body",
|
|
2009
2018
|
children: [
|
|
2010
|
-
/* @__PURE__ */ n("div", { className: "pa-popover-header", children: /* @__PURE__ */ n("span", { className: "pa-popover-selector", children:
|
|
2019
|
+
/* @__PURE__ */ n("div", { className: "pa-popover-header", children: /* @__PURE__ */ n("span", { className: "pa-popover-selector", children: S }) }),
|
|
2011
2020
|
(v || g) && /* @__PURE__ */ d("div", { className: "pa-popover-context", children: [
|
|
2012
2021
|
v && /* @__PURE__ */ d("p", { className: "pa-popover-context-line", children: [
|
|
2013
2022
|
/* @__PURE__ */ n("span", { className: "pa-popover-context-label", children: "Selected" }),
|
|
@@ -2026,11 +2035,11 @@ function sr({
|
|
|
2026
2035
|
ref: o,
|
|
2027
2036
|
className: "pa-textarea",
|
|
2028
2037
|
value: a,
|
|
2029
|
-
onChange: (
|
|
2038
|
+
onChange: (k) => s(k.target.value),
|
|
2030
2039
|
placeholder: "Describe the change...",
|
|
2031
2040
|
rows: 3,
|
|
2032
|
-
onKeyDown: (
|
|
2033
|
-
|
|
2041
|
+
onKeyDown: (k) => {
|
|
2042
|
+
k.key === "Enter" && (k.metaKey || k.ctrlKey) && (k.preventDefault(), w(k.shiftKey)), k.key === "Escape" && r();
|
|
2034
2043
|
}
|
|
2035
2044
|
}
|
|
2036
2045
|
)
|
|
@@ -2042,7 +2051,7 @@ function sr({
|
|
|
2042
2051
|
V,
|
|
2043
2052
|
{
|
|
2044
2053
|
variant: "ghost",
|
|
2045
|
-
onClick: () =>
|
|
2054
|
+
onClick: () => w(!0),
|
|
2046
2055
|
disabled: !a.trim(),
|
|
2047
2056
|
children: "Add & next"
|
|
2048
2057
|
}
|
|
@@ -2051,7 +2060,7 @@ function sr({
|
|
|
2051
2060
|
V,
|
|
2052
2061
|
{
|
|
2053
2062
|
variant: "glass-primary",
|
|
2054
|
-
onClick: () =>
|
|
2063
|
+
onClick: () => w(!1),
|
|
2055
2064
|
disabled: !a.trim(),
|
|
2056
2065
|
children: "Add"
|
|
2057
2066
|
}
|
|
@@ -2142,7 +2151,7 @@ function ur(e) {
|
|
|
2142
2151
|
}
|
|
2143
2152
|
const pr = 20;
|
|
2144
2153
|
function hr({ annotations: e }) {
|
|
2145
|
-
const [t, i] =
|
|
2154
|
+
const [t, i] = A([]);
|
|
2146
2155
|
return H(() => {
|
|
2147
2156
|
if (e.length === 0) {
|
|
2148
2157
|
i([]);
|
|
@@ -2188,7 +2197,7 @@ function hr({ annotations: e }) {
|
|
|
2188
2197
|
)) });
|
|
2189
2198
|
}
|
|
2190
2199
|
const Ze = "[data-pixelagent-root],[data-pixelagent-toolbar-portal],[data-pixelagent-picker-portal]";
|
|
2191
|
-
function
|
|
2200
|
+
function Ie(e) {
|
|
2192
2201
|
return e instanceof Element ? !!e.closest(Ze) : !1;
|
|
2193
2202
|
}
|
|
2194
2203
|
function vt(e, t) {
|
|
@@ -2227,20 +2236,20 @@ function fr({
|
|
|
2227
2236
|
copiedEntryId: l,
|
|
2228
2237
|
copyAllFrom: f
|
|
2229
2238
|
}) {
|
|
2230
|
-
const [p, v] =
|
|
2239
|
+
const [p, v] = A(null), [m, g] = A("");
|
|
2231
2240
|
H(() => {
|
|
2232
|
-
const
|
|
2233
|
-
|
|
2241
|
+
const w = (k) => {
|
|
2242
|
+
k.key === "Escape" && (t ? r() : i());
|
|
2234
2243
|
};
|
|
2235
|
-
return document.addEventListener("keydown",
|
|
2244
|
+
return document.addEventListener("keydown", w), () => document.removeEventListener("keydown", w);
|
|
2236
2245
|
}, [t, r, i]);
|
|
2237
|
-
const
|
|
2238
|
-
v(
|
|
2239
|
-
},
|
|
2240
|
-
m.trim() && (c(
|
|
2246
|
+
const y = (w) => {
|
|
2247
|
+
v(w.id), g(w.note);
|
|
2248
|
+
}, S = (w) => {
|
|
2249
|
+
m.trim() && (c(w, { note: m.trim() }), v(null));
|
|
2241
2250
|
};
|
|
2242
2251
|
return /* @__PURE__ */ d(
|
|
2243
|
-
|
|
2252
|
+
Pe,
|
|
2244
2253
|
{
|
|
2245
2254
|
variant: "sheet",
|
|
2246
2255
|
side: "right",
|
|
@@ -2289,9 +2298,9 @@ function fr({
|
|
|
2289
2298
|
] }),
|
|
2290
2299
|
!t && /* @__PURE__ */ d("ul", { className: "pa-session-list", children: [
|
|
2291
2300
|
e.length === 0 && /* @__PURE__ */ n("li", { className: "pa-session-empty", children: "No annotations yet. Click an element, drag an area, or Shift+click for multi-select." }),
|
|
2292
|
-
e.map((
|
|
2293
|
-
const
|
|
2294
|
-
return /* @__PURE__ */ n("li", { className: "pa-session-item", children: p ===
|
|
2301
|
+
e.map((w) => {
|
|
2302
|
+
const k = Zt(w);
|
|
2303
|
+
return /* @__PURE__ */ n("li", { className: "pa-session-item", children: p === w.id ? /* @__PURE__ */ d("div", { className: "pa-session-edit", children: [
|
|
2295
2304
|
/* @__PURE__ */ d("label", { className: "pa-label", children: [
|
|
2296
2305
|
"Note",
|
|
2297
2306
|
/* @__PURE__ */ n(
|
|
@@ -2299,7 +2308,7 @@ function fr({
|
|
|
2299
2308
|
{
|
|
2300
2309
|
className: "pa-textarea",
|
|
2301
2310
|
value: m,
|
|
2302
|
-
onChange: (
|
|
2311
|
+
onChange: (N) => g(N.target.value),
|
|
2303
2312
|
rows: 3
|
|
2304
2313
|
}
|
|
2305
2314
|
)
|
|
@@ -2310,7 +2319,7 @@ function fr({
|
|
|
2310
2319
|
V,
|
|
2311
2320
|
{
|
|
2312
2321
|
variant: "glass-primary",
|
|
2313
|
-
onClick: () =>
|
|
2322
|
+
onClick: () => S(w.id),
|
|
2314
2323
|
disabled: !m.trim(),
|
|
2315
2324
|
children: "Save"
|
|
2316
2325
|
}
|
|
@@ -2318,12 +2327,12 @@ function fr({
|
|
|
2318
2327
|
] })
|
|
2319
2328
|
] }) : /* @__PURE__ */ d(K, { children: [
|
|
2320
2329
|
/* @__PURE__ */ d("div", { className: "pa-session-content", children: [
|
|
2321
|
-
/* @__PURE__ */ n("span", { className: "pa-session-target", children:
|
|
2322
|
-
/* @__PURE__ */ n("p", { className: "pa-session-note", children:
|
|
2323
|
-
|
|
2330
|
+
/* @__PURE__ */ n("span", { className: "pa-session-target", children: k.target }),
|
|
2331
|
+
/* @__PURE__ */ n("p", { className: "pa-session-note", children: k.note }),
|
|
2332
|
+
k.meta && /* @__PURE__ */ n("p", { className: "pa-session-meta-line", children: k.meta })
|
|
2324
2333
|
] }),
|
|
2325
2334
|
/* @__PURE__ */ d("div", { className: "pa-session-item-actions", children: [
|
|
2326
|
-
u === "Copied!" && l ===
|
|
2335
|
+
u === "Copied!" && l === w.id ? /* @__PURE__ */ n(
|
|
2327
2336
|
"span",
|
|
2328
2337
|
{
|
|
2329
2338
|
className: "pa-status pa-copy-feedback-slot pa-copy-feedback-slot--item",
|
|
@@ -2336,7 +2345,7 @@ function fr({
|
|
|
2336
2345
|
{
|
|
2337
2346
|
variant: "glass-primary",
|
|
2338
2347
|
className: "pa-glass-btn--sm",
|
|
2339
|
-
onClick: () => s(
|
|
2348
|
+
onClick: () => s(w.id),
|
|
2340
2349
|
"aria-label": "Copy annotation",
|
|
2341
2350
|
children: "Copy"
|
|
2342
2351
|
}
|
|
@@ -2346,7 +2355,7 @@ function fr({
|
|
|
2346
2355
|
{
|
|
2347
2356
|
variant: "ghost",
|
|
2348
2357
|
className: "pa-glass-btn--sm",
|
|
2349
|
-
onClick: () =>
|
|
2358
|
+
onClick: () => y(w),
|
|
2350
2359
|
"aria-label": "Edit annotation note",
|
|
2351
2360
|
children: "✎"
|
|
2352
2361
|
}
|
|
@@ -2356,13 +2365,13 @@ function fr({
|
|
|
2356
2365
|
{
|
|
2357
2366
|
variant: "ghost",
|
|
2358
2367
|
className: "pa-glass-btn--sm",
|
|
2359
|
-
onClick: () => o(
|
|
2368
|
+
onClick: () => o(w.id),
|
|
2360
2369
|
"aria-label": "Remove annotation",
|
|
2361
2370
|
children: "✕"
|
|
2362
2371
|
}
|
|
2363
2372
|
)
|
|
2364
2373
|
] })
|
|
2365
|
-
] }) },
|
|
2374
|
+
] }) }, w.id);
|
|
2366
2375
|
})
|
|
2367
2376
|
] })
|
|
2368
2377
|
]
|
|
@@ -2422,7 +2431,7 @@ function br({
|
|
|
2422
2431
|
chrome: r,
|
|
2423
2432
|
onToggleHostTheme: a
|
|
2424
2433
|
}) {
|
|
2425
|
-
const s =
|
|
2434
|
+
const s = X(null);
|
|
2426
2435
|
return H(() => {
|
|
2427
2436
|
if (!e) return;
|
|
2428
2437
|
const o = (u) => {
|
|
@@ -2435,7 +2444,7 @@ function br({
|
|
|
2435
2444
|
return window.addEventListener("keydown", o), window.addEventListener("mousedown", c), () => {
|
|
2436
2445
|
window.removeEventListener("keydown", o), window.removeEventListener("mousedown", c);
|
|
2437
2446
|
};
|
|
2438
|
-
}, [e, t]), e ? /* @__PURE__ */ n("div", { ref: s, className: "pa-settings-menu", role: "dialog", "aria-label": "PixelAgent settings", children: /* @__PURE__ */ n(
|
|
2447
|
+
}, [e, t]), e ? /* @__PURE__ */ n("div", { ref: s, className: "pa-settings-menu", role: "dialog", "aria-label": "PixelAgent settings", children: /* @__PURE__ */ n(Pe, { variant: "popover", className: "pa-settings-menu-panel", children: /* @__PURE__ */ d("div", { className: "pa-settings-menu-inner", children: [
|
|
2439
2448
|
/* @__PURE__ */ d("header", { className: "pa-settings-menu-header", children: [
|
|
2440
2449
|
/* @__PURE__ */ n("h4", { className: "pa-settings-menu-title", children: "Settings" }),
|
|
2441
2450
|
/* @__PURE__ */ n("p", { className: "pa-settings-menu-subtitle", children: "Appearance and chrome" })
|
|
@@ -2526,17 +2535,17 @@ function Cr({
|
|
|
2526
2535
|
copyStatus: v,
|
|
2527
2536
|
copyAllFrom: m,
|
|
2528
2537
|
onActivateAnnotate: g,
|
|
2529
|
-
onActivateEdit:
|
|
2530
|
-
onDeactivate:
|
|
2531
|
-
onCopyAll:
|
|
2532
|
-
onCaptureModeChange:
|
|
2533
|
-
onConfirmMultiSelect:
|
|
2538
|
+
onActivateEdit: y,
|
|
2539
|
+
onDeactivate: S,
|
|
2540
|
+
onCopyAll: w,
|
|
2541
|
+
onCaptureModeChange: k,
|
|
2542
|
+
onConfirmMultiSelect: N
|
|
2534
2543
|
}) {
|
|
2535
|
-
const { elementRef: $, isDragging:
|
|
2544
|
+
const { elementRef: $, isDragging: _, style: R, dragHandleProps: x } = Rt(), I = /* @__PURE__ */ d(
|
|
2536
2545
|
"div",
|
|
2537
2546
|
{
|
|
2538
2547
|
ref: $,
|
|
2539
|
-
className: `pa-toolbar-float ${
|
|
2548
|
+
className: `pa-toolbar-float ${_ ? "pa-toolbar-float--dragging" : ""}`,
|
|
2540
2549
|
style: R,
|
|
2541
2550
|
role: "toolbar",
|
|
2542
2551
|
"aria-label": "PixelAgent",
|
|
@@ -2573,16 +2582,16 @@ function Cr({
|
|
|
2573
2582
|
{
|
|
2574
2583
|
className: "pa-select pa-toolbar-capture-select",
|
|
2575
2584
|
value: l,
|
|
2576
|
-
onChange: (
|
|
2585
|
+
onChange: (L) => k(L.target.value),
|
|
2577
2586
|
"aria-label": "Capture mode",
|
|
2578
|
-
children: Nr.map((
|
|
2587
|
+
children: Nr.map((L) => /* @__PURE__ */ n("option", { value: L, children: kr[L] }, L))
|
|
2579
2588
|
}
|
|
2580
2589
|
),
|
|
2581
2590
|
p > 0 && /* @__PURE__ */ n(
|
|
2582
2591
|
V,
|
|
2583
2592
|
{
|
|
2584
2593
|
variant: "glass-primary",
|
|
2585
|
-
onClick:
|
|
2594
|
+
onClick: N,
|
|
2586
2595
|
"aria-label": "Annotate selected elements",
|
|
2587
2596
|
children: p
|
|
2588
2597
|
}
|
|
@@ -2596,7 +2605,7 @@ function Cr({
|
|
|
2596
2605
|
V,
|
|
2597
2606
|
{
|
|
2598
2607
|
variant: "glass-primary",
|
|
2599
|
-
onClick:
|
|
2608
|
+
onClick: w,
|
|
2600
2609
|
disabled: f === 0,
|
|
2601
2610
|
"aria-label": f > 0 ? `Copy all annotations (${f})` : "Copy all annotations",
|
|
2602
2611
|
children: f > 0 ? `Copy (${f})` : "Copy"
|
|
@@ -2611,7 +2620,7 @@ function Cr({
|
|
|
2611
2620
|
{
|
|
2612
2621
|
variant: "icon",
|
|
2613
2622
|
className: "pa-toolbar-close",
|
|
2614
|
-
onClick:
|
|
2623
|
+
onClick: S,
|
|
2615
2624
|
"aria-label": "Close",
|
|
2616
2625
|
children: /* @__PURE__ */ n(
|
|
2617
2626
|
"svg",
|
|
@@ -2636,7 +2645,7 @@ function Cr({
|
|
|
2636
2645
|
)
|
|
2637
2646
|
] }) : /* @__PURE__ */ d("div", { className: "pa-toolbar-segment", children: [
|
|
2638
2647
|
/* @__PURE__ */ n(V, { onClick: g, children: "Annotate" }),
|
|
2639
|
-
/* @__PURE__ */ n(V, { onClick:
|
|
2648
|
+
/* @__PURE__ */ n(V, { onClick: y, children: "Edit" })
|
|
2640
2649
|
] }),
|
|
2641
2650
|
!c && /* @__PURE__ */ d(K, { children: [
|
|
2642
2651
|
/* @__PURE__ */ n("span", { className: "pa-toolbar-divider", "aria-hidden": "true" }),
|
|
@@ -2673,7 +2682,7 @@ function Cr({
|
|
|
2673
2682
|
);
|
|
2674
2683
|
}
|
|
2675
2684
|
function Mr() {
|
|
2676
|
-
const e =
|
|
2685
|
+
const e = X(Qt()), [t, i] = A(
|
|
2677
2686
|
() => {
|
|
2678
2687
|
var s;
|
|
2679
2688
|
return ((s = e.current) == null ? void 0 : s.annotations) ?? [];
|
|
@@ -2701,17 +2710,17 @@ function Ar({
|
|
|
2701
2710
|
hostTheme: t,
|
|
2702
2711
|
onHostThemeChange: i
|
|
2703
2712
|
}) {
|
|
2704
|
-
const r =
|
|
2713
|
+
const r = ke(
|
|
2705
2714
|
() => ({ ...tn, ...e }),
|
|
2706
2715
|
[e]
|
|
2707
|
-
), [a, s] =
|
|
2716
|
+
), [a, s] = A(
|
|
2708
2717
|
() => t ?? it(r) ?? "dark"
|
|
2709
|
-
), [o, c] =
|
|
2718
|
+
), [o, c] = A(!1), u = t ?? a;
|
|
2710
2719
|
H(() => {
|
|
2711
2720
|
if (t !== void 0) return;
|
|
2712
2721
|
const v = () => {
|
|
2713
|
-
const
|
|
2714
|
-
|
|
2722
|
+
const y = it(r);
|
|
2723
|
+
y && s(y);
|
|
2715
2724
|
};
|
|
2716
2725
|
v();
|
|
2717
2726
|
const m = r.hostThemeAttribute, g = new MutationObserver(v);
|
|
@@ -2720,7 +2729,7 @@ function Ar({
|
|
|
2720
2729
|
attributeFilter: [m]
|
|
2721
2730
|
}), () => g.disconnect();
|
|
2722
2731
|
}, [t, r]);
|
|
2723
|
-
const l =
|
|
2732
|
+
const l = ke(
|
|
2724
2733
|
() => nn(r, u),
|
|
2725
2734
|
[r, u]
|
|
2726
2735
|
), f = E(() => {
|
|
@@ -2800,174 +2809,174 @@ function $r({
|
|
|
2800
2809
|
onApply: a,
|
|
2801
2810
|
runtimeStateStyles: s
|
|
2802
2811
|
} = {}) {
|
|
2803
|
-
const o = Ar({ ui: e, hostTheme: t, onHostThemeChange: i }), [c, u] =
|
|
2812
|
+
const o = Ar({ ui: e, hostTheme: t, onHostThemeChange: i }), [c, u] = A(null);
|
|
2804
2813
|
H(() => {
|
|
2805
2814
|
if (r || a) return;
|
|
2806
|
-
let
|
|
2807
|
-
return fetch(yt, { method: "GET" }).then((
|
|
2808
|
-
!
|
|
2815
|
+
let b = !1;
|
|
2816
|
+
return fetch(yt, { method: "GET" }).then((M) => {
|
|
2817
|
+
!b && M.status === 405 && u(yt);
|
|
2809
2818
|
}).catch(() => {
|
|
2810
2819
|
}), () => {
|
|
2811
|
-
|
|
2820
|
+
b = !0;
|
|
2812
2821
|
};
|
|
2813
2822
|
}, [r, a]);
|
|
2814
|
-
const [l, f] =
|
|
2815
|
-
annotations:
|
|
2816
|
-
setAnnotations:
|
|
2817
|
-
updateAnnotation:
|
|
2818
|
-
removeAnnotation:
|
|
2819
|
-
} = Mr(), [
|
|
2820
|
-
(
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
+
const [l, f] = A(!1), [p, v] = A("idle"), [m, g] = A("element"), {
|
|
2824
|
+
annotations: y,
|
|
2825
|
+
setAnnotations: S,
|
|
2826
|
+
updateAnnotation: w,
|
|
2827
|
+
removeAnnotation: k
|
|
2828
|
+
} = Mr(), [N, $] = A(null), [_, R] = A(null), [x, I] = A([]), [L, h] = A(null), [F, U] = A(null), [ge, Z] = A(!1), [te, re] = A(!1), W = l && p === "annotate" && y.length > 0 && !ge, [G, ne] = A("this-instance"), [oe, C] = A("normal"), [P, O] = A(null), [D, Y] = A(null), [T, z] = A(null), ve = X(null), be = X(null), de = E(
|
|
2829
|
+
(b, M) => {
|
|
2830
|
+
be.current && clearTimeout(be.current), O(b), Y((M == null ? void 0 : M.entryId) ?? null), z((M == null ? void 0 : M.copyAllFrom) ?? null), be.current = setTimeout(() => {
|
|
2831
|
+
O(null), Y(null), z(null);
|
|
2823
2832
|
}, 2500);
|
|
2824
2833
|
},
|
|
2825
2834
|
[]
|
|
2826
|
-
),
|
|
2827
|
-
async (
|
|
2828
|
-
if (
|
|
2835
|
+
), Ce = E(
|
|
2836
|
+
async (b, M, j) => {
|
|
2837
|
+
if (b)
|
|
2829
2838
|
try {
|
|
2830
|
-
await St(
|
|
2839
|
+
await St(b), de(M, j);
|
|
2831
2840
|
} catch {
|
|
2832
|
-
de("Copy failed — check clipboard permissions",
|
|
2841
|
+
de("Copy failed — check clipboard permissions", j);
|
|
2833
2842
|
}
|
|
2834
2843
|
},
|
|
2835
2844
|
[de]
|
|
2836
|
-
),
|
|
2837
|
-
(
|
|
2838
|
-
|
|
2845
|
+
), ye = E(
|
|
2846
|
+
(b, M) => {
|
|
2847
|
+
b.length === 0 && !M || (h({ elements: b, areaBbox: M }), R(b[0] ?? null));
|
|
2839
2848
|
},
|
|
2840
2849
|
[]
|
|
2841
2850
|
), De = E(
|
|
2842
|
-
(
|
|
2843
|
-
if (!(!l || p !== "annotate" ||
|
|
2844
|
-
if (
|
|
2851
|
+
(b) => {
|
|
2852
|
+
if (!(!l || p !== "annotate" || Ie(b.target))) {
|
|
2853
|
+
if (F) {
|
|
2845
2854
|
U(
|
|
2846
|
-
(
|
|
2855
|
+
(M) => M && { ...M, currentX: b.clientX, currentY: b.clientY }
|
|
2847
2856
|
);
|
|
2848
2857
|
return;
|
|
2849
2858
|
}
|
|
2850
|
-
m !== "area" && $(vt(
|
|
2859
|
+
m !== "area" && $(vt(b.clientX, b.clientY));
|
|
2851
2860
|
}
|
|
2852
2861
|
},
|
|
2853
|
-
[l, p,
|
|
2862
|
+
[l, p, F, m]
|
|
2854
2863
|
), Oe = E(
|
|
2855
|
-
(
|
|
2856
|
-
!l || p !== "annotate" ||
|
|
2857
|
-
startX:
|
|
2858
|
-
startY:
|
|
2859
|
-
currentX:
|
|
2860
|
-
currentY:
|
|
2864
|
+
(b) => {
|
|
2865
|
+
!l || p !== "annotate" || Ie(b.target) || m !== "area" || b.button !== 0 || (b.preventDefault(), b.stopPropagation(), U({
|
|
2866
|
+
startX: b.clientX,
|
|
2867
|
+
startY: b.clientY,
|
|
2868
|
+
currentX: b.clientX,
|
|
2869
|
+
currentY: b.clientY
|
|
2861
2870
|
}), h(null));
|
|
2862
2871
|
},
|
|
2863
2872
|
[l, p, m]
|
|
2864
2873
|
), Fe = E(() => {
|
|
2865
|
-
if (!
|
|
2866
|
-
const
|
|
2867
|
-
if (U(null),
|
|
2868
|
-
const
|
|
2869
|
-
|
|
2870
|
-
}, [
|
|
2871
|
-
(
|
|
2872
|
-
if (!l || p !== "annotate" ||
|
|
2873
|
-
|
|
2874
|
-
const
|
|
2875
|
-
if (!
|
|
2876
|
-
if (
|
|
2877
|
-
I((
|
|
2874
|
+
if (!F) return;
|
|
2875
|
+
const b = Nt(F);
|
|
2876
|
+
if (U(null), b.width < 8 || b.height < 8) return;
|
|
2877
|
+
const M = on(b, Ze);
|
|
2878
|
+
ye(M, b);
|
|
2879
|
+
}, [F, ye]), Be = E(
|
|
2880
|
+
(b) => {
|
|
2881
|
+
if (!l || p !== "annotate" || Ie(b.target) || m === "area") return;
|
|
2882
|
+
b.preventDefault(), b.stopPropagation();
|
|
2883
|
+
const M = vt(b.clientX, b.clientY);
|
|
2884
|
+
if (!M) return;
|
|
2885
|
+
if (b.shiftKey || m === "multi") {
|
|
2886
|
+
I((Q) => Q.includes(M) ? Q.filter((B) => B !== M) : [...Q, M]), R(M);
|
|
2878
2887
|
return;
|
|
2879
2888
|
}
|
|
2880
|
-
const
|
|
2881
|
-
|
|
2889
|
+
const j = x.length > 0 ? x : [M];
|
|
2890
|
+
ye(j.includes(M) ? j : [M]);
|
|
2882
2891
|
},
|
|
2883
|
-
[l, p, m, x,
|
|
2892
|
+
[l, p, m, x, ye]
|
|
2884
2893
|
);
|
|
2885
2894
|
H(() => {
|
|
2886
|
-
!
|
|
2887
|
-
}, [
|
|
2895
|
+
!_ || G !== "all-instances" || Ct(_) <= 1 && ne("this-instance");
|
|
2896
|
+
}, [_, G]), H(() => {
|
|
2888
2897
|
if (l)
|
|
2889
2898
|
return document.addEventListener("mousemove", De, !0), document.addEventListener("mousedown", Oe, !0), document.addEventListener("mouseup", Fe, !0), document.addEventListener("click", Be, !0), () => {
|
|
2890
2899
|
document.removeEventListener("mousemove", De, !0), document.removeEventListener("mousedown", Oe, !0), document.removeEventListener("mouseup", Fe, !0), document.removeEventListener("click", Be, !0);
|
|
2891
2900
|
};
|
|
2892
2901
|
}, [l, De, Oe, Fe, Be]);
|
|
2893
2902
|
const Vt = E(
|
|
2894
|
-
(
|
|
2895
|
-
if (!
|
|
2896
|
-
const { elements:
|
|
2897
|
-
if (
|
|
2898
|
-
const
|
|
2899
|
-
elements:
|
|
2900
|
-
note:
|
|
2901
|
-
areaBbox:
|
|
2903
|
+
(b, M) => {
|
|
2904
|
+
if (!L || !b.trim()) return;
|
|
2905
|
+
const { elements: j, areaBbox: Q } = L;
|
|
2906
|
+
if (j.length === 0 && !Q) return;
|
|
2907
|
+
const we = cr({
|
|
2908
|
+
elements: j,
|
|
2909
|
+
note: b,
|
|
2910
|
+
areaBbox: Q
|
|
2902
2911
|
});
|
|
2903
|
-
|
|
2912
|
+
S((B) => [...B, we]), Z(!1), re(!1), M ? (h(null), R(null)) : (h(null), R(null), I([]));
|
|
2904
2913
|
},
|
|
2905
|
-
[
|
|
2914
|
+
[L, S]
|
|
2906
2915
|
), Wt = E(() => {
|
|
2907
2916
|
h(null), R(null);
|
|
2908
2917
|
}, []), Qe = E(
|
|
2909
|
-
async (
|
|
2910
|
-
const
|
|
2911
|
-
await
|
|
2918
|
+
async (b) => {
|
|
2919
|
+
const M = sn(y);
|
|
2920
|
+
await Ce(M, "Copied all!", { copyAllFrom: b });
|
|
2912
2921
|
},
|
|
2913
|
-
[
|
|
2922
|
+
[y, Ce]
|
|
2914
2923
|
), Ut = E(
|
|
2915
|
-
async (
|
|
2916
|
-
const
|
|
2917
|
-
|
|
2924
|
+
async (b) => {
|
|
2925
|
+
const M = y.find((j) => j.id === b);
|
|
2926
|
+
M && await Ce(ln(M), "Copied!", { entryId: b });
|
|
2918
2927
|
},
|
|
2919
|
-
[
|
|
2928
|
+
[y, Ce]
|
|
2920
2929
|
), Yt = E(
|
|
2921
|
-
async (
|
|
2922
|
-
const
|
|
2923
|
-
for (const [B,
|
|
2924
|
-
for (const [se,
|
|
2925
|
-
|
|
2926
|
-
if (
|
|
2930
|
+
async (b) => {
|
|
2931
|
+
const M = [];
|
|
2932
|
+
for (const [B, q] of b)
|
|
2933
|
+
for (const [se, ee] of q)
|
|
2934
|
+
ee.length > 0 && M.push([B, se, ee]);
|
|
2935
|
+
if (M.length === 0) return { applied: !1 };
|
|
2927
2936
|
if (s) {
|
|
2928
|
-
for (const [B,
|
|
2929
|
-
if (
|
|
2930
|
-
const
|
|
2931
|
-
for (const
|
|
2932
|
-
B.style.removeProperty(
|
|
2937
|
+
for (const [B, q, se] of M) {
|
|
2938
|
+
if (q === "normal") continue;
|
|
2939
|
+
const ee = Sr(B);
|
|
2940
|
+
for (const xe of se)
|
|
2941
|
+
B.style.removeProperty(xe.property), Er(ee, q, xe.property, xe.newValue);
|
|
2933
2942
|
}
|
|
2934
|
-
for (const [B,
|
|
2935
|
-
if (
|
|
2936
|
-
for (const
|
|
2937
|
-
B.style.setProperty(
|
|
2943
|
+
for (const [B, q, se] of M)
|
|
2944
|
+
if (q === "normal")
|
|
2945
|
+
for (const ee of se)
|
|
2946
|
+
B.style.setProperty(ee.property, ee.newValue);
|
|
2938
2947
|
return de("Change applied"), { applied: !0, skipRevert: !0 };
|
|
2939
2948
|
}
|
|
2940
|
-
const
|
|
2941
|
-
for (const [B,
|
|
2942
|
-
const
|
|
2949
|
+
const j = r ?? c ?? void 0, Q = [];
|
|
2950
|
+
for (const [B, q, se] of M) {
|
|
2951
|
+
const ee = Ge(B), xe = {
|
|
2943
2952
|
schemaVersion: 1,
|
|
2944
2953
|
elementSelector: Mt(B, G),
|
|
2945
|
-
sourceFile:
|
|
2946
|
-
lineNumber:
|
|
2954
|
+
sourceFile: ee.sourceFile,
|
|
2955
|
+
lineNumber: ee.lineNumber,
|
|
2947
2956
|
targetScope: G,
|
|
2948
|
-
state:
|
|
2957
|
+
state: q,
|
|
2949
2958
|
stylingSystem: kt(B),
|
|
2950
2959
|
changes: se
|
|
2951
2960
|
};
|
|
2952
|
-
|
|
2961
|
+
Q.push(await Jn(xe, { applyEndpoint: j, onApply: a }));
|
|
2953
2962
|
}
|
|
2954
|
-
const
|
|
2963
|
+
const we = Q.every(
|
|
2955
2964
|
(B) => B.mode === "mcp" && B.result.success && B.result.linesChanged.length > 0
|
|
2956
2965
|
);
|
|
2957
|
-
return de(
|
|
2958
|
-
B.mode === "error" ? console.error(`[pixelagent] Apply #${
|
|
2959
|
-
}), { applied:
|
|
2966
|
+
return de(we ? "Change applied" : "Apply failed"), Q.forEach((B, q) => {
|
|
2967
|
+
B.mode === "error" ? console.error(`[pixelagent] Apply #${q} failed:`, B.message) : B.mode === "clipboard" ? console.warn(`[pixelagent] Apply #${q} fell back to clipboard`) : B.mode === "mcp" && !B.result.success && console.warn(`[pixelagent] Apply #${q} reported no changes:`, B.result);
|
|
2968
|
+
}), { applied: we };
|
|
2960
2969
|
},
|
|
2961
2970
|
[G, r, c, a, s, de]
|
|
2962
|
-
), et = (
|
|
2963
|
-
o.setSettingsOpen(!1), f(!0), v(
|
|
2971
|
+
), et = (b) => {
|
|
2972
|
+
o.setSettingsOpen(!1), f(!0), v(b), R(null), $(null), h(null), I([]), U(null), b === "annotate" && Z(!1);
|
|
2964
2973
|
}, Xt = () => {
|
|
2965
|
-
f(!1), v("idle"), R(null), $(null), h(null), I([]), U(null),
|
|
2966
|
-
}, Gt =
|
|
2974
|
+
f(!1), v("idle"), R(null), $(null), h(null), I([]), U(null), Z(!1), re(!1);
|
|
2975
|
+
}, Gt = F ? Nt(F) : null;
|
|
2967
2976
|
return /* @__PURE__ */ d(
|
|
2968
2977
|
"div",
|
|
2969
2978
|
{
|
|
2970
|
-
ref:
|
|
2979
|
+
ref: ve,
|
|
2971
2980
|
className: "pa-root",
|
|
2972
2981
|
"data-pixelagent-root": !0,
|
|
2973
2982
|
...o.rootAttributes,
|
|
@@ -2985,17 +2994,17 @@ function $r({
|
|
|
2985
2994
|
active: l,
|
|
2986
2995
|
mode: p,
|
|
2987
2996
|
captureMode: m,
|
|
2988
|
-
annotationCount:
|
|
2997
|
+
annotationCount: y.length,
|
|
2989
2998
|
multiSelectCount: x.length,
|
|
2990
|
-
copyStatus:
|
|
2991
|
-
copyAllFrom:
|
|
2999
|
+
copyStatus: P,
|
|
3000
|
+
copyAllFrom: T,
|
|
2992
3001
|
onActivateAnnotate: () => et("annotate"),
|
|
2993
3002
|
onActivateEdit: () => et("edit"),
|
|
2994
3003
|
onDeactivate: Xt,
|
|
2995
3004
|
onCopyAll: () => Qe("toolbar"),
|
|
2996
3005
|
onCaptureModeChange: g,
|
|
2997
3006
|
onConfirmMultiSelect: () => {
|
|
2998
|
-
x.length > 0 &&
|
|
3007
|
+
x.length > 0 && ye(x);
|
|
2999
3008
|
}
|
|
3000
3009
|
}
|
|
3001
3010
|
),
|
|
@@ -3003,19 +3012,19 @@ function $r({
|
|
|
3003
3012
|
/* @__PURE__ */ n(
|
|
3004
3013
|
$t,
|
|
3005
3014
|
{
|
|
3006
|
-
element:
|
|
3007
|
-
selected:
|
|
3015
|
+
element: N,
|
|
3016
|
+
selected: _,
|
|
3008
3017
|
multiSelected: x
|
|
3009
3018
|
}
|
|
3010
3019
|
),
|
|
3011
|
-
/* @__PURE__ */ n(hr, { annotations:
|
|
3012
|
-
/* @__PURE__ */ n(lr, { area: Gt, isDragging: !!
|
|
3020
|
+
/* @__PURE__ */ n(hr, { annotations: y }),
|
|
3021
|
+
/* @__PURE__ */ n(lr, { area: Gt, isDragging: !!F })
|
|
3013
3022
|
] }),
|
|
3014
|
-
l && p === "annotate" &&
|
|
3023
|
+
l && p === "annotate" && L && /* @__PURE__ */ n(
|
|
3015
3024
|
sr,
|
|
3016
3025
|
{
|
|
3017
|
-
elements:
|
|
3018
|
-
areaBbox:
|
|
3026
|
+
elements: L.elements,
|
|
3027
|
+
areaBbox: L.areaBbox,
|
|
3019
3028
|
onSubmit: Vt,
|
|
3020
3029
|
onCancel: Wt
|
|
3021
3030
|
}
|
|
@@ -3023,35 +3032,35 @@ function $r({
|
|
|
3023
3032
|
l && p === "edit" && /* @__PURE__ */ n(
|
|
3024
3033
|
qn,
|
|
3025
3034
|
{
|
|
3026
|
-
selectedElement:
|
|
3027
|
-
hoveredElement:
|
|
3035
|
+
selectedElement: _,
|
|
3036
|
+
hoveredElement: N,
|
|
3028
3037
|
onSelectElement: R,
|
|
3029
3038
|
onHoverElement: $,
|
|
3030
3039
|
targetScope: G,
|
|
3031
|
-
onTargetScopeChange:
|
|
3032
|
-
elementState:
|
|
3033
|
-
onElementStateChange:
|
|
3040
|
+
onTargetScopeChange: ne,
|
|
3041
|
+
elementState: oe,
|
|
3042
|
+
onElementStateChange: C,
|
|
3034
3043
|
onApply: Yt,
|
|
3035
|
-
applyStatus: p === "edit" ?
|
|
3036
|
-
isToolbarTarget:
|
|
3044
|
+
applyStatus: p === "edit" ? P : null,
|
|
3045
|
+
isToolbarTarget: Ie
|
|
3037
3046
|
}
|
|
3038
3047
|
),
|
|
3039
3048
|
W && /* @__PURE__ */ n(
|
|
3040
3049
|
fr,
|
|
3041
3050
|
{
|
|
3042
|
-
annotations:
|
|
3043
|
-
collapsed:
|
|
3044
|
-
onToggleCollapsed: () => re((
|
|
3051
|
+
annotations: y,
|
|
3052
|
+
collapsed: te,
|
|
3053
|
+
onToggleCollapsed: () => re((b) => !b),
|
|
3045
3054
|
onClose: () => {
|
|
3046
|
-
|
|
3055
|
+
Z(!0), re(!1);
|
|
3047
3056
|
},
|
|
3048
3057
|
onCopyAll: () => Qe("session"),
|
|
3049
3058
|
onCopyOne: Ut,
|
|
3050
|
-
onRemove:
|
|
3051
|
-
onUpdate:
|
|
3052
|
-
copyStatus:
|
|
3053
|
-
copiedEntryId:
|
|
3054
|
-
copyAllFrom:
|
|
3059
|
+
onRemove: k,
|
|
3060
|
+
onUpdate: w,
|
|
3061
|
+
copyStatus: P,
|
|
3062
|
+
copiedEntryId: D,
|
|
3063
|
+
copyAllFrom: T
|
|
3055
3064
|
}
|
|
3056
3065
|
)
|
|
3057
3066
|
]
|