pixelagent 0.1.25 → 0.1.27
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/captureBehind-DUL_bR7u.js +970 -0
- package/dist/captureBehind-DUL_bR7u.js.map +1 -0
- package/dist/glass/GlassSurface.d.ts.map +1 -1
- package/dist/glass/captureBehind.d.ts +55 -0
- package/dist/glass/captureBehind.d.ts.map +1 -0
- package/dist/glass/displacementMap.d.ts +8 -3
- package/dist/glass/displacementMap.d.ts.map +1 -1
- package/dist/glass/glassDisplacementWebGL.d.ts +38 -0
- package/dist/glass/glassDisplacementWebGL.d.ts.map +1 -0
- package/dist/glassDisplacementWebGL-mRLN1KMg.js +119 -0
- package/dist/glassDisplacementWebGL-mRLN1KMg.js.map +1 -0
- package/dist/pixelagent.js +1184 -1090
- package/dist/pixelagent.js.map +1 -1
- package/package.json +7 -3
package/dist/pixelagent.js
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as S, useEffect as
|
|
3
|
-
import { getElementDisplayLabel as
|
|
1
|
+
import { jsxs as u, Fragment as Z, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useState as S, useEffect as _, useRef as W, useMemo as se, useLayoutEffect as un, useCallback as T, useId as nt } from "react";
|
|
3
|
+
import { getElementDisplayLabel as at, getCssSelector as rt, getRelevantComputedStyles as Ne, getEditableTextInfo as xe, captureTextSnapshot as je, captureInlineStyles as Ye, restoreInlineStyles as Se, restoreTextSnapshot as Ee, getPreviewTargets as Oe, clearTailwindStatePreview as $e, applyTailwindStatePreview as Xe, setEditableTextPreview as ut, readStateRuleDeclarations as fn, readReactSource as ot, detectStylingSystem as Ft, countElementInstances as Bt, getScopeSelector as _t, copyToClipboard as Ht, getWindowSelectionText as Wt, getNearestReactComponentName as gn, getDomPath as hn, resolveElementFromEntry as Vt, getAnnotationSessionDisplay as Ut, loadAnnotationSession as mn, saveAnnotationSession as xn, DEFAULT_PIXEL_AGENT_UI_SETTINGS as bn, readHostThemeFromDocument as ft, resolvePixelAgentChrome as vn, applyHostThemeToDocument as wn, pixelAgentRootAttributes as yn, getElementsInArea as kn, formatAllAnnotations as Nn, formatAnnotation as Cn } from "@pixelagent/shared";
|
|
4
4
|
export * from "@pixelagent/shared";
|
|
5
5
|
import { createPortal as Le } from "react-dom";
|
|
6
|
-
function
|
|
6
|
+
function jt({
|
|
7
7
|
element: e,
|
|
8
8
|
selected: t,
|
|
9
9
|
multiSelected: n = [],
|
|
10
10
|
primarySelected: r = null
|
|
11
11
|
}) {
|
|
12
12
|
const [o, i] = S([]), s = r ?? t;
|
|
13
|
-
if (
|
|
14
|
-
const
|
|
15
|
-
e && !t && !
|
|
16
|
-
for (const
|
|
17
|
-
|
|
18
|
-
if (
|
|
13
|
+
if (_(() => {
|
|
14
|
+
const d = /* @__PURE__ */ new Map(), g = n.length > 0;
|
|
15
|
+
e && !t && !g && d.set(e, !1), t && d.set(t, !0);
|
|
16
|
+
for (const f of n)
|
|
17
|
+
d.set(f, !0);
|
|
18
|
+
if (d.size === 0) {
|
|
19
19
|
i([]);
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const m = () => {
|
|
23
23
|
i(
|
|
24
|
-
Array.from(
|
|
25
|
-
rect:
|
|
26
|
-
label:
|
|
27
|
-
isSelected:
|
|
28
|
-
isPrimary: s !== null &&
|
|
24
|
+
Array.from(d.entries()).map(([f, h]) => ({
|
|
25
|
+
rect: f.getBoundingClientRect(),
|
|
26
|
+
label: at(f),
|
|
27
|
+
isSelected: h,
|
|
28
|
+
isPrimary: s !== null && f === s
|
|
29
29
|
}))
|
|
30
30
|
);
|
|
31
31
|
};
|
|
32
|
-
|
|
33
|
-
const c = Array.from(
|
|
34
|
-
const
|
|
35
|
-
return
|
|
32
|
+
m();
|
|
33
|
+
const c = Array.from(d.keys()).map((f) => {
|
|
34
|
+
const h = new ResizeObserver(m);
|
|
35
|
+
return h.observe(f), h;
|
|
36
36
|
});
|
|
37
|
-
return window.addEventListener("scroll",
|
|
38
|
-
for (const
|
|
39
|
-
window.removeEventListener("scroll",
|
|
37
|
+
return window.addEventListener("scroll", m, !0), window.addEventListener("resize", m), () => {
|
|
38
|
+
for (const f of c) f.disconnect();
|
|
39
|
+
window.removeEventListener("scroll", m, !0), window.removeEventListener("resize", m);
|
|
40
40
|
};
|
|
41
41
|
}, [e, t, n, s]), o.length === 0) return null;
|
|
42
|
-
const l = o.find((
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
-
o.map((
|
|
42
|
+
const l = o.find((d) => d.isPrimary) ?? o.find((d) => d.isSelected) ?? o[0], p = o.filter((d) => d.isSelected).length;
|
|
43
|
+
return /* @__PURE__ */ u(Z, { children: [
|
|
44
|
+
o.map((d, g) => /* @__PURE__ */ a(
|
|
45
45
|
"div",
|
|
46
46
|
{
|
|
47
47
|
className: [
|
|
48
48
|
"pa-highlight",
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
d.isSelected ? "pa-highlight-selected" : "",
|
|
50
|
+
d.isPrimary ? "pa-highlight-primary" : "",
|
|
51
|
+
d.isSelected && !d.isPrimary && p > 1 ? "pa-highlight-scope" : ""
|
|
52
52
|
].filter(Boolean).join(" "),
|
|
53
53
|
style: {
|
|
54
|
-
top:
|
|
55
|
-
left:
|
|
56
|
-
width:
|
|
57
|
-
height:
|
|
54
|
+
top: d.rect.top,
|
|
55
|
+
left: d.rect.left,
|
|
56
|
+
width: d.rect.width,
|
|
57
|
+
height: d.rect.height
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
|
-
`${
|
|
60
|
+
`${d.label}-${g}`
|
|
61
61
|
)),
|
|
62
62
|
/* @__PURE__ */ a(
|
|
63
63
|
"div",
|
|
@@ -72,32 +72,32 @@ function Yt({
|
|
|
72
72
|
)
|
|
73
73
|
] });
|
|
74
74
|
}
|
|
75
|
-
const
|
|
76
|
-
function An(e, t, n, r =
|
|
75
|
+
const Yt = 0.5, Mn = 0.65;
|
|
76
|
+
function An(e, t, n, r = Yt) {
|
|
77
77
|
if (e < 8 || t < 8) return null;
|
|
78
78
|
const o = 1, i = Math.max(1, Math.round(e * o)), s = Math.max(1, Math.round(t * o)), l = document.createElement("canvas");
|
|
79
79
|
l.width = i, l.height = s;
|
|
80
80
|
const p = l.getContext("2d");
|
|
81
81
|
if (!p) return null;
|
|
82
|
-
const
|
|
83
|
-
let
|
|
82
|
+
const d = p.createImageData(i, s), g = d.data, m = Math.min(0.5, n / Math.min(e, t)), c = 0.3, f = 0.2, h = Math.max(0.4, m + 0.1);
|
|
83
|
+
let C = 0;
|
|
84
84
|
const k = new Float32Array(i * s * 2);
|
|
85
|
-
let
|
|
86
|
-
for (let
|
|
87
|
-
for (let
|
|
88
|
-
const
|
|
89
|
-
Math.abs(
|
|
85
|
+
let D = 0;
|
|
86
|
+
for (let w = 0; w < s; w++)
|
|
87
|
+
for (let A = 0; A < i; A++) {
|
|
88
|
+
const v = A / i - 0.5, N = w / s - 0.5, P = zn(v, N, c, f, h), y = gt(0.8, 0, P - 0.15), M = gt(0, 1, y), z = (v * M + 0.5) * i - A, E = (N * M + 0.5) * s - w;
|
|
89
|
+
Math.abs(z) > C && (C = Math.abs(z)), Math.abs(E) > C && (C = Math.abs(E)), k[D++] = z, k[D++] = E;
|
|
90
90
|
}
|
|
91
|
-
if (
|
|
92
|
-
|
|
93
|
-
let
|
|
94
|
-
for (let
|
|
95
|
-
const
|
|
96
|
-
|
|
91
|
+
if (C === 0) return null;
|
|
92
|
+
C *= 0.4 * r;
|
|
93
|
+
let x = 0;
|
|
94
|
+
for (let w = 0; w < g.length; w += 4) {
|
|
95
|
+
const A = k[x++] / C + 0.5, v = k[x++] / C + 0.5;
|
|
96
|
+
g[w] = A * 255, g[w + 1] = v * 255, g[w + 2] = 0, g[w + 3] = 255;
|
|
97
97
|
}
|
|
98
|
-
return p.putImageData(
|
|
98
|
+
return p.putImageData(d, 0, 0), {
|
|
99
99
|
href: l.toDataURL("image/png"),
|
|
100
|
-
scale:
|
|
100
|
+
scale: C / o,
|
|
101
101
|
width: i,
|
|
102
102
|
height: s
|
|
103
103
|
};
|
|
@@ -106,11 +106,11 @@ function zn(e, t, n, r, o) {
|
|
|
106
106
|
const i = Math.abs(e) - n + o, s = Math.abs(t) - r + o;
|
|
107
107
|
return Math.min(Math.max(i, s), 0) + Math.hypot(Math.max(i, 0), Math.max(s, 0)) - o;
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function gt(e, t, n) {
|
|
110
110
|
const r = Math.max(0, Math.min(1, (n - e) / (t - e)));
|
|
111
111
|
return r * r * (3 - 2 * r);
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function Xt() {
|
|
114
114
|
if (typeof navigator > "u") return !1;
|
|
115
115
|
const e = navigator.userAgent;
|
|
116
116
|
return !(/AppleWebKit/i.test(e) && !/Chrome|Chromium|Edg|OPR|CriOS|FxiOS/i.test(e) || /Firefox/i.test(e));
|
|
@@ -121,13 +121,13 @@ const Sn = {
|
|
|
121
121
|
enhanced: "blur(6px) saturate(138%)"
|
|
122
122
|
};
|
|
123
123
|
function Ln(e, t = "default") {
|
|
124
|
-
const n = Sn[t], o = e !== null &&
|
|
124
|
+
const n = Sn[t], o = e !== null && Xt() ? `${n} url(#${e})` : n;
|
|
125
125
|
return {
|
|
126
126
|
backdropFilter: o,
|
|
127
127
|
WebkitBackdropFilter: o
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
|
-
let
|
|
130
|
+
let En = 0;
|
|
131
131
|
function Gt({
|
|
132
132
|
shape: e = "rect",
|
|
133
133
|
cornerRadius: t,
|
|
@@ -137,26 +137,112 @@ function Gt({
|
|
|
137
137
|
style: i,
|
|
138
138
|
children: s
|
|
139
139
|
}) {
|
|
140
|
-
const l = t ?? (e === "capsule" ? 9999 : 20), p = r === "enhanced" ? Mn :
|
|
140
|
+
const l = t ?? (e === "capsule" ? 9999 : 20), p = r === "enhanced" ? Mn : Yt, d = W(null), g = W(null), m = W(!1), c = W(null), f = se(() => `pa-lg-${++En}`, []), [h, C] = S(null), [k, D] = S(null);
|
|
141
|
+
_(() => {
|
|
142
|
+
const v = !Xt();
|
|
143
|
+
D(v), v && (import("./captureBehind-DUL_bR7u.js"), import("./glassDisplacementWebGL-mRLN1KMg.js"));
|
|
144
|
+
}, []);
|
|
145
|
+
const [x, w] = S(0);
|
|
141
146
|
un(() => {
|
|
142
|
-
const
|
|
143
|
-
if (!
|
|
144
|
-
let
|
|
145
|
-
const
|
|
146
|
-
cancelAnimationFrame(
|
|
147
|
-
const
|
|
148
|
-
if (
|
|
149
|
-
const
|
|
150
|
-
|
|
147
|
+
const v = d.current;
|
|
148
|
+
if (!v) return;
|
|
149
|
+
let N = 0;
|
|
150
|
+
const P = () => {
|
|
151
|
+
cancelAnimationFrame(N), N = requestAnimationFrame(() => {
|
|
152
|
+
const M = v.getBoundingClientRect(), z = Math.round(M.width), E = Math.round(M.height);
|
|
153
|
+
if (z < 8 || E < 8) return;
|
|
154
|
+
const F = e === "capsule" ? E / 2 : Math.min(l, z / 2, E / 2), j = An(z, E, F, p);
|
|
155
|
+
j && C(j);
|
|
151
156
|
});
|
|
152
157
|
};
|
|
153
|
-
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
|
|
158
|
+
P();
|
|
159
|
+
const y = new ResizeObserver(() => {
|
|
160
|
+
P();
|
|
161
|
+
const M = g.current;
|
|
162
|
+
if (M) {
|
|
163
|
+
const z = v.getBoundingClientRect(), E = Math.max(1, Math.round(z.width)), F = Math.max(1, Math.round(z.height));
|
|
164
|
+
M.width !== E && (M.width = E), M.height !== F && (M.height = F);
|
|
165
|
+
}
|
|
166
|
+
w((z) => z + 1);
|
|
167
|
+
});
|
|
168
|
+
return y.observe(v), () => {
|
|
169
|
+
cancelAnimationFrame(N), y.disconnect();
|
|
170
|
+
};
|
|
171
|
+
}, [e, l, p]), _(() => {
|
|
172
|
+
if (!k || !h) return;
|
|
173
|
+
const v = d.current, N = g.current;
|
|
174
|
+
if (!v || !N) return;
|
|
175
|
+
let P = !1;
|
|
176
|
+
return (async () => {
|
|
177
|
+
let y = c.current;
|
|
178
|
+
if (!y) {
|
|
179
|
+
const [z, E] = await Promise.all([
|
|
180
|
+
import("./captureBehind-DUL_bR7u.js"),
|
|
181
|
+
import("./glassDisplacementWebGL-mRLN1KMg.js")
|
|
182
|
+
]);
|
|
183
|
+
if (P) return;
|
|
184
|
+
y = {
|
|
185
|
+
captureBehind: z.captureBehind,
|
|
186
|
+
invalidateCaptureCache: z.invalidateCaptureCache,
|
|
187
|
+
renderDisplaced: E.renderDisplaced
|
|
188
|
+
}, c.current = y;
|
|
189
|
+
}
|
|
190
|
+
m.current || y.invalidateCaptureCache();
|
|
191
|
+
const M = await y.captureBehind({ surface: v });
|
|
192
|
+
P || !M || (await y.renderDisplaced({
|
|
193
|
+
background: M.canvas,
|
|
194
|
+
displacementMap: h,
|
|
195
|
+
width: M.width,
|
|
196
|
+
height: M.height,
|
|
197
|
+
canvas: N
|
|
198
|
+
}), !P && N.setAttribute("data-pa-ready", "1"));
|
|
199
|
+
})().catch(() => {
|
|
200
|
+
}), () => {
|
|
201
|
+
P = !0;
|
|
202
|
+
};
|
|
203
|
+
}, [k, h, x]), _(() => {
|
|
204
|
+
if (!k) return;
|
|
205
|
+
const v = () => w((N) => N + 1);
|
|
206
|
+
return window.addEventListener("scroll", v, { passive: !0, capture: !0 }), () => window.removeEventListener("scroll", v, !0);
|
|
207
|
+
}, [k]), _(() => {
|
|
208
|
+
if (!k) return;
|
|
209
|
+
const v = d.current;
|
|
210
|
+
if (!v) return;
|
|
211
|
+
let N = null, P = !1, y = 0;
|
|
212
|
+
const M = () => {
|
|
213
|
+
y = 0, w((K) => K + 1);
|
|
214
|
+
}, z = () => {
|
|
215
|
+
y === 0 && (y = requestAnimationFrame(M));
|
|
216
|
+
}, E = (K) => {
|
|
217
|
+
N = { x: K.clientX, y: K.clientY };
|
|
218
|
+
}, F = (K) => {
|
|
219
|
+
N && (!P && Math.hypot(K.clientX - N.x, K.clientY - N.y) > 3 && (P = !0, m.current = !0), P && z());
|
|
220
|
+
}, j = () => {
|
|
221
|
+
P && (P = !1, m.current = !1, z()), N = null;
|
|
222
|
+
};
|
|
223
|
+
return v.addEventListener("pointerdown", E), window.addEventListener("pointermove", F), window.addEventListener("pointerup", j), window.addEventListener("pointercancel", j), () => {
|
|
224
|
+
y !== 0 && cancelAnimationFrame(y), v.removeEventListener("pointerdown", E), window.removeEventListener("pointermove", F), window.removeEventListener("pointerup", j), window.removeEventListener("pointercancel", j);
|
|
157
225
|
};
|
|
158
|
-
}, [
|
|
159
|
-
|
|
226
|
+
}, [k]), _(() => {
|
|
227
|
+
if (!k) return;
|
|
228
|
+
let v = !1;
|
|
229
|
+
const N = async () => {
|
|
230
|
+
if (v) return;
|
|
231
|
+
const { invalidateCaptureCache: M } = await import("./captureBehind-DUL_bR7u.js");
|
|
232
|
+
v || (M(), w((z) => z + 1));
|
|
233
|
+
}, P = () => {
|
|
234
|
+
N();
|
|
235
|
+
};
|
|
236
|
+
window.addEventListener("resize", P);
|
|
237
|
+
const y = new MutationObserver(() => void N());
|
|
238
|
+
return y.observe(document.documentElement, {
|
|
239
|
+
attributes: !0,
|
|
240
|
+
attributeFilter: ["data-theme", "class"]
|
|
241
|
+
}), () => {
|
|
242
|
+
v = !0, window.removeEventListener("resize", P), y.disconnect();
|
|
243
|
+
};
|
|
244
|
+
}, [k]);
|
|
245
|
+
const A = h && k === !1 && typeof document < "u" ? Le(
|
|
160
246
|
/* @__PURE__ */ a(
|
|
161
247
|
"svg",
|
|
162
248
|
{
|
|
@@ -172,24 +258,24 @@ function Gt({
|
|
|
172
258
|
overflow: "hidden",
|
|
173
259
|
pointerEvents: "none"
|
|
174
260
|
},
|
|
175
|
-
children: /* @__PURE__ */ a("defs", { children: /* @__PURE__ */
|
|
261
|
+
children: /* @__PURE__ */ a("defs", { children: /* @__PURE__ */ u(
|
|
176
262
|
"filter",
|
|
177
263
|
{
|
|
178
|
-
id:
|
|
264
|
+
id: f,
|
|
179
265
|
filterUnits: "userSpaceOnUse",
|
|
180
266
|
colorInterpolationFilters: "sRGB",
|
|
181
267
|
x: "0",
|
|
182
268
|
y: "0",
|
|
183
|
-
width:
|
|
184
|
-
height:
|
|
269
|
+
width: h.width,
|
|
270
|
+
height: h.height,
|
|
185
271
|
children: [
|
|
186
272
|
/* @__PURE__ */ a(
|
|
187
273
|
"feImage",
|
|
188
274
|
{
|
|
189
|
-
href:
|
|
190
|
-
xlinkHref:
|
|
191
|
-
width:
|
|
192
|
-
height:
|
|
275
|
+
href: h.href,
|
|
276
|
+
xlinkHref: h.href,
|
|
277
|
+
width: h.width,
|
|
278
|
+
height: h.height,
|
|
193
279
|
preserveAspectRatio: "none",
|
|
194
280
|
result: "map"
|
|
195
281
|
}
|
|
@@ -199,7 +285,7 @@ function Gt({
|
|
|
199
285
|
{
|
|
200
286
|
in: "SourceGraphic",
|
|
201
287
|
in2: "map",
|
|
202
|
-
scale:
|
|
288
|
+
scale: h.scale,
|
|
203
289
|
xChannelSelector: "R",
|
|
204
290
|
yChannelSelector: "G"
|
|
205
291
|
}
|
|
@@ -211,22 +297,30 @@ function Gt({
|
|
|
211
297
|
),
|
|
212
298
|
document.body
|
|
213
299
|
) : null;
|
|
214
|
-
return /* @__PURE__ */
|
|
215
|
-
|
|
216
|
-
/* @__PURE__ */
|
|
300
|
+
return /* @__PURE__ */ u(Z, { children: [
|
|
301
|
+
A,
|
|
302
|
+
/* @__PURE__ */ u(
|
|
217
303
|
"div",
|
|
218
304
|
{
|
|
219
|
-
ref:
|
|
305
|
+
ref: d,
|
|
220
306
|
className: `pa-glass-surface pa-glass-surface--${e} pa-glass-surface--${n} ${o}`.trim(),
|
|
221
307
|
style: {
|
|
222
308
|
borderRadius: e === "capsule" ? "999px" : `${l}px`,
|
|
223
309
|
...Ln(
|
|
224
|
-
|
|
310
|
+
h && k === !1 ? f : null,
|
|
225
311
|
r
|
|
226
312
|
),
|
|
227
313
|
...i
|
|
228
314
|
},
|
|
229
315
|
children: [
|
|
316
|
+
k ? /* @__PURE__ */ a(
|
|
317
|
+
"canvas",
|
|
318
|
+
{
|
|
319
|
+
ref: g,
|
|
320
|
+
className: "pa-glass-surface-refraction",
|
|
321
|
+
"aria-hidden": "true"
|
|
322
|
+
}
|
|
323
|
+
) : null,
|
|
230
324
|
/* @__PURE__ */ a("div", { className: "pa-glass-surface-bg", "aria-hidden": "true" }),
|
|
231
325
|
/* @__PURE__ */ a("div", { className: "pa-glass-surface-shine", "aria-hidden": "true" }),
|
|
232
326
|
/* @__PURE__ */ a("div", { className: "pa-glass-surface-content", children: s })
|
|
@@ -235,7 +329,7 @@ function Gt({
|
|
|
235
329
|
)
|
|
236
330
|
] });
|
|
237
331
|
}
|
|
238
|
-
function
|
|
332
|
+
function G({
|
|
239
333
|
variant: e = "regular",
|
|
240
334
|
className: t = "",
|
|
241
335
|
children: n,
|
|
@@ -269,65 +363,65 @@ function _e({
|
|
|
269
363
|
}
|
|
270
364
|
);
|
|
271
365
|
}
|
|
272
|
-
function
|
|
366
|
+
function it({
|
|
273
367
|
defaultPosition: e = null,
|
|
274
368
|
computeDefaultPosition: t
|
|
275
369
|
} = {}) {
|
|
276
|
-
const [n, r] = S(e), [o, i] = S(!1), s =
|
|
370
|
+
const [n, r] = S(e), [o, i] = S(!1), s = W(null), l = W(null), p = T(() => {
|
|
277
371
|
if (n !== null) return;
|
|
278
|
-
const
|
|
279
|
-
if (!
|
|
280
|
-
const
|
|
372
|
+
const f = l.current;
|
|
373
|
+
if (!f) return;
|
|
374
|
+
const h = f.getBoundingClientRect();
|
|
281
375
|
r(
|
|
282
|
-
t ? t(
|
|
283
|
-
x: (window.innerWidth -
|
|
284
|
-
y: window.innerHeight -
|
|
376
|
+
t ? t(h) : {
|
|
377
|
+
x: (window.innerWidth - h.width) / 2,
|
|
378
|
+
y: window.innerHeight - h.height - 24
|
|
285
379
|
}
|
|
286
380
|
);
|
|
287
381
|
}, [n, t]);
|
|
288
|
-
|
|
382
|
+
_(() => {
|
|
289
383
|
p();
|
|
290
|
-
}, [p]),
|
|
291
|
-
const
|
|
292
|
-
r((
|
|
293
|
-
if (!
|
|
294
|
-
const
|
|
384
|
+
}, [p]), _(() => {
|
|
385
|
+
const f = () => {
|
|
386
|
+
r((h) => {
|
|
387
|
+
if (!h || !l.current) return h;
|
|
388
|
+
const C = l.current.getBoundingClientRect();
|
|
295
389
|
return {
|
|
296
|
-
x: Math.min(
|
|
297
|
-
y: Math.min(
|
|
390
|
+
x: Math.min(h.x, window.innerWidth - C.width),
|
|
391
|
+
y: Math.min(h.y, window.innerHeight - C.height)
|
|
298
392
|
};
|
|
299
393
|
});
|
|
300
394
|
};
|
|
301
|
-
return window.addEventListener("resize",
|
|
395
|
+
return window.addEventListener("resize", f), () => window.removeEventListener("resize", f);
|
|
302
396
|
}, []);
|
|
303
|
-
const
|
|
304
|
-
(
|
|
305
|
-
if (
|
|
306
|
-
const
|
|
307
|
-
if (!
|
|
308
|
-
let
|
|
309
|
-
if (!
|
|
310
|
-
const k =
|
|
311
|
-
|
|
397
|
+
const d = T(
|
|
398
|
+
(f) => {
|
|
399
|
+
if (f.button !== 0) return;
|
|
400
|
+
const h = l.current;
|
|
401
|
+
if (!h) return;
|
|
402
|
+
let C = n;
|
|
403
|
+
if (!C) {
|
|
404
|
+
const k = h.getBoundingClientRect();
|
|
405
|
+
C = { x: k.left, y: k.top }, r(C);
|
|
312
406
|
}
|
|
313
407
|
s.current = {
|
|
314
|
-
pointerId:
|
|
315
|
-
startX:
|
|
316
|
-
startY:
|
|
317
|
-
originX:
|
|
318
|
-
originY:
|
|
319
|
-
}, i(!0),
|
|
408
|
+
pointerId: f.pointerId,
|
|
409
|
+
startX: f.clientX,
|
|
410
|
+
startY: f.clientY,
|
|
411
|
+
originX: C.x,
|
|
412
|
+
originY: C.y
|
|
413
|
+
}, i(!0), f.currentTarget.setPointerCapture(f.pointerId), f.preventDefault();
|
|
320
414
|
},
|
|
321
415
|
[n]
|
|
322
|
-
),
|
|
323
|
-
if (!s.current || s.current.pointerId !==
|
|
324
|
-
const
|
|
325
|
-
r({ x:
|
|
326
|
-
}, []),
|
|
327
|
-
if (!(!s.current || s.current.pointerId !==
|
|
416
|
+
), g = T((f) => {
|
|
417
|
+
if (!s.current || s.current.pointerId !== f.pointerId) return;
|
|
418
|
+
const h = l.current, C = (h == null ? void 0 : h.offsetWidth) ?? 320, k = (h == null ? void 0 : h.offsetHeight) ?? 48, D = f.clientX - s.current.startX, x = f.clientY - s.current.startY, w = Math.max(8, Math.min(window.innerWidth - C - 8, s.current.originX + D)), A = Math.max(8, Math.min(window.innerHeight - k - 8, s.current.originY + x));
|
|
419
|
+
r({ x: w, y: A });
|
|
420
|
+
}, []), m = T((f) => {
|
|
421
|
+
if (!(!s.current || s.current.pointerId !== f.pointerId)) {
|
|
328
422
|
s.current = null, i(!1);
|
|
329
423
|
try {
|
|
330
|
-
|
|
424
|
+
f.currentTarget.releasePointerCapture(f.pointerId);
|
|
331
425
|
} catch {
|
|
332
426
|
}
|
|
333
427
|
}
|
|
@@ -345,15 +439,15 @@ function st({
|
|
|
345
439
|
isDragging: o,
|
|
346
440
|
style: c,
|
|
347
441
|
dragHandleProps: {
|
|
348
|
-
onPointerDown:
|
|
349
|
-
onPointerMove:
|
|
350
|
-
onPointerUp:
|
|
351
|
-
onPointerCancel:
|
|
442
|
+
onPointerDown: d,
|
|
443
|
+
onPointerMove: g,
|
|
444
|
+
onPointerUp: m,
|
|
445
|
+
onPointerCancel: m
|
|
352
446
|
}
|
|
353
447
|
};
|
|
354
448
|
}
|
|
355
|
-
function
|
|
356
|
-
return /* @__PURE__ */
|
|
449
|
+
function $n({ className: e }) {
|
|
450
|
+
return /* @__PURE__ */ u("svg", { className: e, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true", children: [
|
|
357
451
|
/* @__PURE__ */ a(
|
|
358
452
|
"path",
|
|
359
453
|
{
|
|
@@ -379,7 +473,7 @@ function En({ className: e }) {
|
|
|
379
473
|
] });
|
|
380
474
|
}
|
|
381
475
|
function Pn({ className: e }) {
|
|
382
|
-
return /* @__PURE__ */
|
|
476
|
+
return /* @__PURE__ */ u("svg", { className: e, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true", children: [
|
|
383
477
|
/* @__PURE__ */ a(
|
|
384
478
|
"path",
|
|
385
479
|
{
|
|
@@ -408,7 +502,7 @@ function de(e) {
|
|
|
408
502
|
const t = e.trim().match(/^(-?\d+(?:\.\d+)?)px$/i);
|
|
409
503
|
return t ? parseFloat(t[1]) : null;
|
|
410
504
|
}
|
|
411
|
-
function
|
|
505
|
+
function Rn(e) {
|
|
412
506
|
const t = e.trim();
|
|
413
507
|
if (!t) return null;
|
|
414
508
|
if (t.endsWith("%")) {
|
|
@@ -446,7 +540,7 @@ function Tn(e, t) {
|
|
|
446
540
|
const n = ((o = fe(e)) == null ? void 0 : o.unit) ?? "px";
|
|
447
541
|
return `${Jt(n) < 1 ? Math.round(t * 10) / 10 : Math.round(t)}${n}`;
|
|
448
542
|
}
|
|
449
|
-
const
|
|
543
|
+
const In = {
|
|
450
544
|
padding: { kind: "uniform-px", min: 0, max: 80, step: 1 },
|
|
451
545
|
margin: { kind: "uniform-px", min: 0, max: 80, step: 1 },
|
|
452
546
|
width: { kind: "length", min: 0 },
|
|
@@ -464,7 +558,7 @@ function Ge(e, t, n) {
|
|
|
464
558
|
var r;
|
|
465
559
|
switch (n.kind) {
|
|
466
560
|
case "opacity":
|
|
467
|
-
return
|
|
561
|
+
return Rn(t);
|
|
468
562
|
case "px":
|
|
469
563
|
return de(t);
|
|
470
564
|
case "uniform-px":
|
|
@@ -475,7 +569,7 @@ function Ge(e, t, n) {
|
|
|
475
569
|
return null;
|
|
476
570
|
}
|
|
477
571
|
}
|
|
478
|
-
function
|
|
572
|
+
function Dn(e, t, n) {
|
|
479
573
|
switch (n.kind) {
|
|
480
574
|
case "opacity":
|
|
481
575
|
return String(Math.round(t * 100) / 100);
|
|
@@ -486,7 +580,7 @@ function On(e, t, n) {
|
|
|
486
580
|
return String(t);
|
|
487
581
|
}
|
|
488
582
|
}
|
|
489
|
-
const
|
|
583
|
+
const On = /* @__PURE__ */ new Set([
|
|
490
584
|
"h1",
|
|
491
585
|
"h2",
|
|
492
586
|
"h3",
|
|
@@ -527,18 +621,18 @@ function Hn(e) {
|
|
|
527
621
|
const t = (e ?? "").trim().toLowerCase();
|
|
528
622
|
return !(!t || t === "transparent" || t === "rgba(0, 0, 0, 0)");
|
|
529
623
|
}
|
|
530
|
-
function
|
|
624
|
+
function Wn(e) {
|
|
531
625
|
const t = (e["border-style"] ?? "").trim().toLowerCase();
|
|
532
626
|
return t && t !== "none" ? !0 : Kt(e["border-width"] ?? "");
|
|
533
627
|
}
|
|
534
|
-
function
|
|
628
|
+
function Vn(e, t, n) {
|
|
535
629
|
const r = e.toLowerCase(), o = /* @__PURE__ */ new Set(), i = (s) => {
|
|
536
630
|
o.size < 2 && o.add(s);
|
|
537
631
|
};
|
|
538
|
-
return t !== "none" ? (i("content"), i("typography"), o) :
|
|
632
|
+
return t !== "none" ? (i("content"), i("typography"), o) : On.has(r) ? (i("typography"), o) : Fn.has(r) ? (i("layout"), i("typography"), o) : Bn.has(r) ? (i("layout"), o) : _n.has(r) ? (i("layout"), Wn(n) ? i("border") : Hn(n["background-color"]) && i("fill"), o) : r === "hr" ? (i("border"), o) : (i("layout"), o);
|
|
539
633
|
}
|
|
540
634
|
function Un(e, t, n) {
|
|
541
|
-
return
|
|
635
|
+
return Vn(e.tagName, t, n);
|
|
542
636
|
}
|
|
543
637
|
function jn(e, t) {
|
|
544
638
|
return e.has(t);
|
|
@@ -579,22 +673,22 @@ function Yn(e) {
|
|
|
579
673
|
}
|
|
580
674
|
function Zt({ r: e, g: t, b: n }) {
|
|
581
675
|
const r = e / 255, o = t / 255, i = n / 255, s = Math.max(r, o, i), l = Math.min(r, o, i), p = s - l;
|
|
582
|
-
let
|
|
583
|
-
p !== 0 && (s === r ?
|
|
584
|
-
const
|
|
585
|
-
return { h:
|
|
676
|
+
let d = 0;
|
|
677
|
+
p !== 0 && (s === r ? d = (o - i) / p % 6 : s === o ? d = (i - r) / p + 2 : d = (r - o) / p + 4, d *= 60, d < 0 && (d += 360));
|
|
678
|
+
const g = s === 0 ? 0 : p / s * 100, m = s * 100;
|
|
679
|
+
return { h: d, s: g, v: m };
|
|
586
680
|
}
|
|
587
681
|
function Qt({ h: e, s: t, v: n }) {
|
|
588
682
|
const r = Ce(t, 0, 100) / 100, o = Ce(n, 0, 100) / 100, i = o * r, s = i * (1 - Math.abs(e / 60 % 2 - 1)), l = o - i;
|
|
589
|
-
let p = 0,
|
|
590
|
-
const
|
|
591
|
-
return
|
|
683
|
+
let p = 0, d = 0, g = 0;
|
|
684
|
+
const m = (e % 360 + 360) % 360;
|
|
685
|
+
return m < 60 ? (p = i, d = s) : m < 120 ? (p = s, d = i) : m < 180 ? (d = i, g = s) : m < 240 ? (d = s, g = i) : m < 300 ? (p = s, g = i) : (p = i, g = s), {
|
|
592
686
|
r: Math.round((p + l) * 255),
|
|
593
|
-
g: Math.round((
|
|
594
|
-
b: Math.round((
|
|
687
|
+
g: Math.round((d + l) * 255),
|
|
688
|
+
b: Math.round((g + l) * 255)
|
|
595
689
|
};
|
|
596
690
|
}
|
|
597
|
-
function
|
|
691
|
+
function ht(e) {
|
|
598
692
|
const t = Me(e);
|
|
599
693
|
return t ? Zt(t) : { h: 0, s: 0, v: 45 };
|
|
600
694
|
}
|
|
@@ -609,10 +703,10 @@ function Kn(e) {
|
|
|
609
703
|
return Be(Qt(e));
|
|
610
704
|
}
|
|
611
705
|
function qn(e, t, n) {
|
|
612
|
-
const r =
|
|
706
|
+
const r = mt((e - n.left) / n.width), o = mt((t - n.top) / n.height);
|
|
613
707
|
return { x: r * 100, y: o * 100 };
|
|
614
708
|
}
|
|
615
|
-
function
|
|
709
|
+
function mt(e) {
|
|
616
710
|
return Math.min(1, Math.max(0, e));
|
|
617
711
|
}
|
|
618
712
|
function Jn() {
|
|
@@ -621,74 +715,74 @@ function Jn() {
|
|
|
621
715
|
return t ? { "data-pa-chrome": t } : {};
|
|
622
716
|
}
|
|
623
717
|
function Ke({ label: e, value: t, onChange: n, labelAction: r }) {
|
|
624
|
-
const [o, i] = S(!1), [s, l] = S(() =>
|
|
625
|
-
|
|
626
|
-
l(
|
|
718
|
+
const [o, i] = S(!1), [s, l] = S(() => ht(t)), p = W(null), d = W(null), g = W(null), m = nt(), [c, f] = S({ top: 0, left: 0, width: 260 }), h = Qt(s), C = Xn(Be(h)), k = Me(t) ? t : Yn(h), D = e.toLowerCase().includes("color") ? e : `${e} color`;
|
|
719
|
+
_(() => {
|
|
720
|
+
l(ht(t));
|
|
627
721
|
}, [t]);
|
|
628
|
-
const
|
|
629
|
-
(
|
|
630
|
-
l(
|
|
722
|
+
const x = T(
|
|
723
|
+
(y) => {
|
|
724
|
+
l(y), n(Kn(y));
|
|
631
725
|
},
|
|
632
726
|
[n]
|
|
633
|
-
),
|
|
634
|
-
(
|
|
635
|
-
|
|
727
|
+
), w = T(
|
|
728
|
+
(y) => {
|
|
729
|
+
x(Zt(y));
|
|
636
730
|
},
|
|
637
|
-
[
|
|
638
|
-
),
|
|
639
|
-
const
|
|
640
|
-
if (!
|
|
641
|
-
const
|
|
642
|
-
let
|
|
643
|
-
|
|
644
|
-
let
|
|
645
|
-
const
|
|
646
|
-
|
|
731
|
+
[x]
|
|
732
|
+
), A = T(() => {
|
|
733
|
+
const y = p.current;
|
|
734
|
+
if (!y) return;
|
|
735
|
+
const M = y.getBoundingClientRect(), z = 260;
|
|
736
|
+
let E = M.left;
|
|
737
|
+
E + z > window.innerWidth - 12 && (E = window.innerWidth - z - 12), E = Math.max(12, E);
|
|
738
|
+
let F = M.bottom + 8;
|
|
739
|
+
const j = 320;
|
|
740
|
+
F + j > window.innerHeight - 12 && (F = Math.max(12, M.top - j - 8)), f({ top: F, left: E, width: z });
|
|
647
741
|
}, []);
|
|
648
|
-
|
|
742
|
+
_(() => {
|
|
649
743
|
if (!o) return;
|
|
650
|
-
|
|
651
|
-
const
|
|
652
|
-
var
|
|
653
|
-
const
|
|
654
|
-
(
|
|
655
|
-
},
|
|
656
|
-
|
|
744
|
+
A();
|
|
745
|
+
const y = (z) => {
|
|
746
|
+
var F, j;
|
|
747
|
+
const E = z.target;
|
|
748
|
+
(F = p.current) != null && F.contains(E) || (j = d.current) != null && j.contains(E) || i(!1);
|
|
749
|
+
}, M = (z) => {
|
|
750
|
+
z.key === "Escape" && i(!1);
|
|
657
751
|
};
|
|
658
|
-
return window.addEventListener("mousedown",
|
|
659
|
-
window.removeEventListener("mousedown",
|
|
752
|
+
return window.addEventListener("mousedown", y, !0), window.addEventListener("keydown", M), window.addEventListener("resize", A), window.addEventListener("scroll", A, !0), () => {
|
|
753
|
+
window.removeEventListener("mousedown", y, !0), window.removeEventListener("keydown", M), window.removeEventListener("resize", A), window.removeEventListener("scroll", A, !0);
|
|
660
754
|
};
|
|
661
|
-
}, [o,
|
|
662
|
-
const
|
|
663
|
-
var
|
|
664
|
-
const
|
|
665
|
-
if (!
|
|
666
|
-
const { x:
|
|
667
|
-
|
|
668
|
-
},
|
|
669
|
-
|
|
670
|
-
const
|
|
671
|
-
window.removeEventListener("mousemove",
|
|
755
|
+
}, [o, A]);
|
|
756
|
+
const v = (y, M) => {
|
|
757
|
+
var j;
|
|
758
|
+
const z = (j = g.current) == null ? void 0 : j.getBoundingClientRect();
|
|
759
|
+
if (!z) return;
|
|
760
|
+
const { x: E, y: F } = qn(y, M, z);
|
|
761
|
+
x({ ...s, s: E, v: 100 - F });
|
|
762
|
+
}, N = (y) => {
|
|
763
|
+
y.preventDefault(), v(y.clientX, y.clientY);
|
|
764
|
+
const M = (E) => v(E.clientX, E.clientY), z = () => {
|
|
765
|
+
window.removeEventListener("mousemove", M), window.removeEventListener("mouseup", z);
|
|
672
766
|
};
|
|
673
|
-
window.addEventListener("mousemove",
|
|
674
|
-
},
|
|
767
|
+
window.addEventListener("mousemove", M), window.addEventListener("mouseup", z);
|
|
768
|
+
}, P = o ? Le(
|
|
675
769
|
/* @__PURE__ */ a(
|
|
676
770
|
"div",
|
|
677
771
|
{
|
|
678
772
|
className: "pa-root pa-root--toolbar-portal pa-color-picker-portal",
|
|
679
773
|
"data-pixelagent-picker-portal": !0,
|
|
680
774
|
...Jn(),
|
|
681
|
-
children: /* @__PURE__ */
|
|
775
|
+
children: /* @__PURE__ */ u(
|
|
682
776
|
"div",
|
|
683
777
|
{
|
|
684
|
-
ref:
|
|
685
|
-
id:
|
|
778
|
+
ref: d,
|
|
779
|
+
id: m,
|
|
686
780
|
role: "dialog",
|
|
687
|
-
"aria-label":
|
|
781
|
+
"aria-label": D,
|
|
688
782
|
className: "pa-color-picker",
|
|
689
783
|
style: { top: c.top, left: c.left, width: c.width },
|
|
690
784
|
children: [
|
|
691
|
-
/* @__PURE__ */
|
|
785
|
+
/* @__PURE__ */ u("header", { className: "pa-color-picker-header", children: [
|
|
692
786
|
/* @__PURE__ */ a(
|
|
693
787
|
"span",
|
|
694
788
|
{
|
|
@@ -697,15 +791,15 @@ function Ke({ label: e, value: t, onChange: n, labelAction: r }) {
|
|
|
697
791
|
"aria-hidden": "true"
|
|
698
792
|
}
|
|
699
793
|
),
|
|
700
|
-
/* @__PURE__ */ a("span", { className: "pa-color-picker-header-label", children:
|
|
794
|
+
/* @__PURE__ */ a("span", { className: "pa-color-picker-header-label", children: D })
|
|
701
795
|
] }),
|
|
702
796
|
/* @__PURE__ */ a(
|
|
703
797
|
"div",
|
|
704
798
|
{
|
|
705
|
-
ref:
|
|
799
|
+
ref: g,
|
|
706
800
|
className: "pa-color-picker-sb",
|
|
707
801
|
style: { "--pa-picker-h": String(Math.round(s.h)) },
|
|
708
|
-
onMouseDown:
|
|
802
|
+
onMouseDown: N,
|
|
709
803
|
children: /* @__PURE__ */ a(
|
|
710
804
|
"span",
|
|
711
805
|
{
|
|
@@ -716,7 +810,7 @@ function Ke({ label: e, value: t, onChange: n, labelAction: r }) {
|
|
|
716
810
|
)
|
|
717
811
|
}
|
|
718
812
|
),
|
|
719
|
-
/* @__PURE__ */
|
|
813
|
+
/* @__PURE__ */ u("div", { className: "pa-color-picker-hue", children: [
|
|
720
814
|
/* @__PURE__ */ a(
|
|
721
815
|
"input",
|
|
722
816
|
{
|
|
@@ -726,7 +820,7 @@ function Ke({ label: e, value: t, onChange: n, labelAction: r }) {
|
|
|
726
820
|
max: 360,
|
|
727
821
|
value: Math.round(s.h),
|
|
728
822
|
"aria-label": "Hue",
|
|
729
|
-
onChange: (
|
|
823
|
+
onChange: (y) => x({ ...s, h: parseFloat(y.target.value) })
|
|
730
824
|
}
|
|
731
825
|
),
|
|
732
826
|
/* @__PURE__ */ a(
|
|
@@ -738,21 +832,21 @@ function Ke({ label: e, value: t, onChange: n, labelAction: r }) {
|
|
|
738
832
|
}
|
|
739
833
|
)
|
|
740
834
|
] }),
|
|
741
|
-
/* @__PURE__ */
|
|
835
|
+
/* @__PURE__ */ u("label", { className: "pa-color-picker-field", children: [
|
|
742
836
|
/* @__PURE__ */ a("span", { className: "pa-color-picker-field-label", children: "Hex" }),
|
|
743
837
|
/* @__PURE__ */ a(
|
|
744
838
|
"input",
|
|
745
839
|
{
|
|
746
840
|
className: "pa-input pa-color-picker-input",
|
|
747
841
|
type: "text",
|
|
748
|
-
value:
|
|
842
|
+
value: C,
|
|
749
843
|
spellCheck: !1,
|
|
750
|
-
onChange: (
|
|
844
|
+
onChange: (y) => w(Gn(y.target.value, h))
|
|
751
845
|
}
|
|
752
846
|
)
|
|
753
847
|
] }),
|
|
754
|
-
/* @__PURE__ */ a("div", { className: "pa-color-picker-rgb", children: ["r", "g", "b"].map((
|
|
755
|
-
/* @__PURE__ */ a("span", { className: "pa-color-picker-field-label", children:
|
|
848
|
+
/* @__PURE__ */ a("div", { className: "pa-color-picker-rgb", children: ["r", "g", "b"].map((y) => /* @__PURE__ */ u("label", { className: "pa-color-picker-field pa-color-picker-field--rgb", children: [
|
|
849
|
+
/* @__PURE__ */ a("span", { className: "pa-color-picker-field-label", children: y.toUpperCase() }),
|
|
756
850
|
/* @__PURE__ */ a(
|
|
757
851
|
"input",
|
|
758
852
|
{
|
|
@@ -760,14 +854,14 @@ function Ke({ label: e, value: t, onChange: n, labelAction: r }) {
|
|
|
760
854
|
type: "number",
|
|
761
855
|
min: 0,
|
|
762
856
|
max: 255,
|
|
763
|
-
value:
|
|
764
|
-
onChange: (
|
|
765
|
-
const
|
|
766
|
-
|
|
857
|
+
value: h[y],
|
|
858
|
+
onChange: (M) => {
|
|
859
|
+
const z = Zn(parseInt(M.target.value, 10));
|
|
860
|
+
w({ ...h, [y]: z });
|
|
767
861
|
}
|
|
768
862
|
}
|
|
769
863
|
)
|
|
770
|
-
] },
|
|
864
|
+
] }, y)) })
|
|
771
865
|
]
|
|
772
866
|
}
|
|
773
867
|
)
|
|
@@ -775,12 +869,12 @@ function Ke({ label: e, value: t, onChange: n, labelAction: r }) {
|
|
|
775
869
|
),
|
|
776
870
|
document.body
|
|
777
871
|
) : null;
|
|
778
|
-
return /* @__PURE__ */
|
|
779
|
-
r ? /* @__PURE__ */
|
|
872
|
+
return /* @__PURE__ */ u("div", { className: "pa-color-field", children: [
|
|
873
|
+
r ? /* @__PURE__ */ u("div", { className: "pa-color-field-label-row", children: [
|
|
780
874
|
/* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: e }),
|
|
781
875
|
r
|
|
782
876
|
] }) : /* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: e }),
|
|
783
|
-
/* @__PURE__ */
|
|
877
|
+
/* @__PURE__ */ u(
|
|
784
878
|
"button",
|
|
785
879
|
{
|
|
786
880
|
ref: p,
|
|
@@ -788,9 +882,9 @@ function Ke({ label: e, value: t, onChange: n, labelAction: r }) {
|
|
|
788
882
|
className: "pa-color-field-trigger",
|
|
789
883
|
"aria-expanded": o,
|
|
790
884
|
"aria-haspopup": "dialog",
|
|
791
|
-
"aria-controls": o ?
|
|
885
|
+
"aria-controls": o ? m : void 0,
|
|
792
886
|
onClick: () => {
|
|
793
|
-
o ||
|
|
887
|
+
o || A(), i((y) => !y);
|
|
794
888
|
},
|
|
795
889
|
children: [
|
|
796
890
|
/* @__PURE__ */ a("span", { className: "pa-color-field-swatch", style: { backgroundColor: k }, "aria-hidden": "true" }),
|
|
@@ -808,7 +902,7 @@ function Ke({ label: e, value: t, onChange: n, labelAction: r }) {
|
|
|
808
902
|
]
|
|
809
903
|
}
|
|
810
904
|
),
|
|
811
|
-
|
|
905
|
+
P
|
|
812
906
|
] });
|
|
813
907
|
}
|
|
814
908
|
function Zn(e) {
|
|
@@ -822,9 +916,9 @@ function we({
|
|
|
822
916
|
headerAction: o
|
|
823
917
|
}) {
|
|
824
918
|
const [i, s] = S(n), l = () => s((p) => !p);
|
|
825
|
-
return /* @__PURE__ */
|
|
826
|
-
/* @__PURE__ */
|
|
827
|
-
/* @__PURE__ */
|
|
919
|
+
return /* @__PURE__ */ u("section", { className: `pa-edit-section ${i ? "pa-edit-section--open" : ""}`, children: [
|
|
920
|
+
/* @__PURE__ */ u("div", { className: "pa-edit-section-header", children: [
|
|
921
|
+
/* @__PURE__ */ u(
|
|
828
922
|
"button",
|
|
829
923
|
{
|
|
830
924
|
type: "button",
|
|
@@ -915,9 +1009,9 @@ function ea({ value: e, onChange: t }) {
|
|
|
915
1009
|
() => Qn(e),
|
|
916
1010
|
[e]
|
|
917
1011
|
);
|
|
918
|
-
return /* @__PURE__ */
|
|
1012
|
+
return /* @__PURE__ */ u("label", { className: "pa-edit-stack-field", children: [
|
|
919
1013
|
/* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: "Font family" }),
|
|
920
|
-
/* @__PURE__ */
|
|
1014
|
+
/* @__PURE__ */ u(
|
|
921
1015
|
"select",
|
|
922
1016
|
{
|
|
923
1017
|
className: "pa-select pa-font-family-select",
|
|
@@ -934,7 +1028,7 @@ function ea({ value: e, onChange: t }) {
|
|
|
934
1028
|
)
|
|
935
1029
|
] });
|
|
936
1030
|
}
|
|
937
|
-
function
|
|
1031
|
+
function st(e, t, n) {
|
|
938
1032
|
return Math.min(n, Math.max(t, e));
|
|
939
1033
|
}
|
|
940
1034
|
function en({
|
|
@@ -945,26 +1039,26 @@ function en({
|
|
|
945
1039
|
onChange: o,
|
|
946
1040
|
pxPerStep: i = 3
|
|
947
1041
|
}) {
|
|
948
|
-
const [s, l] = S(!1), p =
|
|
949
|
-
const
|
|
950
|
-
|
|
951
|
-
},
|
|
952
|
-
const
|
|
953
|
-
if (!
|
|
954
|
-
const
|
|
955
|
-
if (
|
|
956
|
-
const
|
|
957
|
-
o(
|
|
958
|
-
},
|
|
1042
|
+
const [s, l] = S(!1), p = W(null), d = (c) => {
|
|
1043
|
+
const f = e();
|
|
1044
|
+
f === null || !Number.isFinite(f) || (c.preventDefault(), p.current = { startX: c.clientX, startValue: f }, l(!0), c.currentTarget.setPointerCapture(c.pointerId));
|
|
1045
|
+
}, g = (c) => {
|
|
1046
|
+
const f = p.current;
|
|
1047
|
+
if (!f) return;
|
|
1048
|
+
const h = Math.round((c.clientX - f.startX) / i);
|
|
1049
|
+
if (h === 0) return;
|
|
1050
|
+
const C = f.startValue + h * r, k = Math.round(C / r) * r;
|
|
1051
|
+
o(st(k, t, n));
|
|
1052
|
+
}, m = (c) => {
|
|
959
1053
|
p.current && (p.current = null, l(!1), c.currentTarget.hasPointerCapture(c.pointerId) && c.currentTarget.releasePointerCapture(c.pointerId));
|
|
960
1054
|
};
|
|
961
1055
|
return {
|
|
962
1056
|
scrubbing: s,
|
|
963
1057
|
handleProps: {
|
|
964
|
-
onPointerDown:
|
|
965
|
-
onPointerMove:
|
|
966
|
-
onPointerUp:
|
|
967
|
-
onPointerCancel:
|
|
1058
|
+
onPointerDown: d,
|
|
1059
|
+
onPointerMove: g,
|
|
1060
|
+
onPointerUp: m,
|
|
1061
|
+
onPointerCancel: m
|
|
968
1062
|
}
|
|
969
1063
|
};
|
|
970
1064
|
}
|
|
@@ -975,45 +1069,45 @@ function pe({
|
|
|
975
1069
|
onChange: r,
|
|
976
1070
|
compact: o = !1
|
|
977
1071
|
}) {
|
|
978
|
-
var
|
|
979
|
-
const i =
|
|
1072
|
+
var D;
|
|
1073
|
+
const i = In[e] ?? { kind: "text" }, s = Ge(e, n, i), l = i.kind !== "text" && s !== null, p = o ? "pa-prop-row pa-prop-row--compact" : "pa-prop-row", d = o ? "pa-edit-field-label" : "pa-prop-label";
|
|
980
1074
|
if (!l)
|
|
981
|
-
return /* @__PURE__ */
|
|
982
|
-
/* @__PURE__ */ a("span", { className:
|
|
1075
|
+
return /* @__PURE__ */ u("label", { className: p, children: [
|
|
1076
|
+
/* @__PURE__ */ a("span", { className: d, children: t }),
|
|
983
1077
|
/* @__PURE__ */ a(
|
|
984
1078
|
"input",
|
|
985
1079
|
{
|
|
986
1080
|
className: "pa-input",
|
|
987
1081
|
type: "text",
|
|
988
1082
|
value: n,
|
|
989
|
-
onChange: (
|
|
1083
|
+
onChange: (x) => r(x.target.value)
|
|
990
1084
|
}
|
|
991
1085
|
)
|
|
992
1086
|
] });
|
|
993
|
-
const
|
|
994
|
-
c ? Tn(n,
|
|
995
|
-
),
|
|
1087
|
+
const g = i.min ?? -1 / 0, m = i.max ?? 1 / 0, c = i.kind === "length", f = c ? Jt(((D = fe(n)) == null ? void 0 : D.unit) ?? "") : i.step ?? 1, h = (x) => r(
|
|
1088
|
+
c ? Tn(n, x) : Dn(e, x, i)
|
|
1089
|
+
), C = en({
|
|
996
1090
|
getValue: () => Ge(e, n, i),
|
|
997
|
-
min:
|
|
998
|
-
max:
|
|
999
|
-
step:
|
|
1000
|
-
onChange:
|
|
1091
|
+
min: g,
|
|
1092
|
+
max: m,
|
|
1093
|
+
step: f,
|
|
1094
|
+
onChange: h,
|
|
1001
1095
|
pxPerStep: i.kind === "opacity" ? 2 : 3
|
|
1002
|
-
}), k = (
|
|
1003
|
-
if (
|
|
1004
|
-
const
|
|
1005
|
-
if (
|
|
1006
|
-
|
|
1007
|
-
const
|
|
1008
|
-
|
|
1096
|
+
}), k = (x) => {
|
|
1097
|
+
if (x.key !== "ArrowUp" && x.key !== "ArrowDown") return;
|
|
1098
|
+
const w = Ge(e, n, i);
|
|
1099
|
+
if (w === null) return;
|
|
1100
|
+
x.preventDefault();
|
|
1101
|
+
const A = x.key === "ArrowUp" ? 1 : -1;
|
|
1102
|
+
h(st(w + A * f, g, m));
|
|
1009
1103
|
};
|
|
1010
|
-
return /* @__PURE__ */
|
|
1104
|
+
return /* @__PURE__ */ u("div", { className: p, children: [
|
|
1011
1105
|
/* @__PURE__ */ a(
|
|
1012
1106
|
"span",
|
|
1013
1107
|
{
|
|
1014
|
-
className: `${
|
|
1108
|
+
className: `${d} pa-scrub-label${C.scrubbing ? " pa-scrub-label--active" : ""}`,
|
|
1015
1109
|
title: "Drag to adjust",
|
|
1016
|
-
...
|
|
1110
|
+
...C.handleProps,
|
|
1017
1111
|
children: t
|
|
1018
1112
|
}
|
|
1019
1113
|
),
|
|
@@ -1023,7 +1117,7 @@ function pe({
|
|
|
1023
1117
|
className: "pa-input pa-prop-scrub-value",
|
|
1024
1118
|
type: "text",
|
|
1025
1119
|
value: n,
|
|
1026
|
-
onChange: (
|
|
1120
|
+
onChange: (x) => r(x.target.value),
|
|
1027
1121
|
onKeyDown: k,
|
|
1028
1122
|
"aria-label": `${t} value`,
|
|
1029
1123
|
spellCheck: !1
|
|
@@ -1050,10 +1144,10 @@ function ve(e) {
|
|
|
1050
1144
|
const t = e.trim();
|
|
1051
1145
|
return t === "" ? "0px" : /^-?\d+(?:\.\d+)?$/.test(t) ? `${t}px` : t;
|
|
1052
1146
|
}
|
|
1053
|
-
function
|
|
1147
|
+
function xt(e, t) {
|
|
1054
1148
|
return e === t ? be(e) : `${be(e)}, ${be(t)}`;
|
|
1055
1149
|
}
|
|
1056
|
-
function
|
|
1150
|
+
function bt(e, t) {
|
|
1057
1151
|
const n = e.split(",").map((r) => r.trim()).filter(Boolean);
|
|
1058
1152
|
if (n.length === 0) return [t, t];
|
|
1059
1153
|
if (n.length === 1) {
|
|
@@ -1062,41 +1156,41 @@ function vt(e, t) {
|
|
|
1062
1156
|
}
|
|
1063
1157
|
return [ve(n[0]), ve(n[1])];
|
|
1064
1158
|
}
|
|
1065
|
-
const
|
|
1066
|
-
width:
|
|
1067
|
-
height:
|
|
1159
|
+
const vt = 12, lt = {
|
|
1160
|
+
width: vt,
|
|
1161
|
+
height: vt,
|
|
1068
1162
|
viewBox: "0 0 12 12",
|
|
1069
1163
|
fill: "none",
|
|
1070
1164
|
"aria-hidden": !0
|
|
1071
1165
|
};
|
|
1072
1166
|
function aa() {
|
|
1073
|
-
return /* @__PURE__ */
|
|
1167
|
+
return /* @__PURE__ */ u("svg", { ...lt, children: [
|
|
1074
1168
|
/* @__PURE__ */ a("rect", { x: "1.5", y: "1.5", width: "9", height: "9", stroke: "currentColor", strokeOpacity: "0.35" }),
|
|
1075
1169
|
/* @__PURE__ */ a("line", { x1: "1.5", y1: "1.5", x2: "1.5", y2: "10.5", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
1076
1170
|
/* @__PURE__ */ a("line", { x1: "10.5", y1: "1.5", x2: "10.5", y2: "10.5", stroke: "currentColor", strokeWidth: "1.5" })
|
|
1077
1171
|
] });
|
|
1078
1172
|
}
|
|
1079
1173
|
function ra() {
|
|
1080
|
-
return /* @__PURE__ */
|
|
1174
|
+
return /* @__PURE__ */ u("svg", { ...lt, children: [
|
|
1081
1175
|
/* @__PURE__ */ a("rect", { x: "1.5", y: "1.5", width: "9", height: "9", stroke: "currentColor", strokeOpacity: "0.35" }),
|
|
1082
1176
|
/* @__PURE__ */ a("line", { x1: "1.5", y1: "1.5", x2: "10.5", y2: "1.5", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
1083
1177
|
/* @__PURE__ */ a("line", { x1: "1.5", y1: "10.5", x2: "10.5", y2: "10.5", stroke: "currentColor", strokeWidth: "1.5" })
|
|
1084
1178
|
] });
|
|
1085
1179
|
}
|
|
1086
|
-
function
|
|
1180
|
+
function Re({ side: e }) {
|
|
1087
1181
|
const t = {
|
|
1088
1182
|
top: { x1: 1.5, y1: 1.5, x2: 10.5, y2: 1.5 },
|
|
1089
1183
|
right: { x1: 10.5, y1: 1.5, x2: 10.5, y2: 10.5 },
|
|
1090
1184
|
bottom: { x1: 1.5, y1: 10.5, x2: 10.5, y2: 10.5 },
|
|
1091
1185
|
left: { x1: 1.5, y1: 1.5, x2: 1.5, y2: 10.5 }
|
|
1092
1186
|
}[e];
|
|
1093
|
-
return /* @__PURE__ */
|
|
1187
|
+
return /* @__PURE__ */ u("svg", { ...lt, children: [
|
|
1094
1188
|
/* @__PURE__ */ a("rect", { x: "1.5", y: "1.5", width: "9", height: "9", stroke: "currentColor", strokeOpacity: "0.35" }),
|
|
1095
1189
|
/* @__PURE__ */ a("line", { ...t, stroke: "currentColor", strokeWidth: "1.5" })
|
|
1096
1190
|
] });
|
|
1097
1191
|
}
|
|
1098
1192
|
function oa() {
|
|
1099
|
-
return /* @__PURE__ */
|
|
1193
|
+
return /* @__PURE__ */ u("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: [
|
|
1100
1194
|
/* @__PURE__ */ a("rect", { x: "2", y: "2", width: "4", height: "4", stroke: "currentColor", strokeWidth: "1.2" }),
|
|
1101
1195
|
/* @__PURE__ */ a("rect", { x: "8", y: "2", width: "4", height: "4", stroke: "currentColor", strokeWidth: "1.2" }),
|
|
1102
1196
|
/* @__PURE__ */ a("rect", { x: "2", y: "8", width: "4", height: "4", stroke: "currentColor", strokeWidth: "1.2" }),
|
|
@@ -1113,23 +1207,23 @@ function ke({
|
|
|
1113
1207
|
scrubMin: s,
|
|
1114
1208
|
onScrub: l
|
|
1115
1209
|
}) {
|
|
1116
|
-
const [p,
|
|
1117
|
-
|
|
1118
|
-
|
|
1210
|
+
const [p, d] = S(t);
|
|
1211
|
+
_(() => {
|
|
1212
|
+
d(t);
|
|
1119
1213
|
}, [t]);
|
|
1120
|
-
const
|
|
1214
|
+
const g = en({
|
|
1121
1215
|
getValue: () => i,
|
|
1122
1216
|
min: s,
|
|
1123
1217
|
step: 1,
|
|
1124
1218
|
onChange: l
|
|
1125
|
-
}),
|
|
1126
|
-
return /* @__PURE__ */
|
|
1219
|
+
}), m = i !== null;
|
|
1220
|
+
return /* @__PURE__ */ u("label", { className: `pa-spacing-cell ${r ? "pa-spacing-cell--mixed" : ""}`, children: [
|
|
1127
1221
|
/* @__PURE__ */ a(
|
|
1128
1222
|
"span",
|
|
1129
1223
|
{
|
|
1130
|
-
className: `pa-spacing-cell-icon${
|
|
1131
|
-
title:
|
|
1132
|
-
...
|
|
1224
|
+
className: `pa-spacing-cell-icon${m ? " pa-spacing-cell-icon--scrub" : ""}${g.scrubbing ? " pa-spacing-cell-icon--active" : ""}`,
|
|
1225
|
+
title: m ? "Drag to adjust" : void 0,
|
|
1226
|
+
...m ? g.handleProps : {},
|
|
1133
1227
|
children: e
|
|
1134
1228
|
}
|
|
1135
1229
|
),
|
|
@@ -1139,16 +1233,16 @@ function ke({
|
|
|
1139
1233
|
className: "pa-input pa-spacing-cell-input",
|
|
1140
1234
|
type: "text",
|
|
1141
1235
|
value: p,
|
|
1142
|
-
onChange: (c) =>
|
|
1236
|
+
onChange: (c) => d(c.target.value),
|
|
1143
1237
|
onBlur: () => o(p),
|
|
1144
1238
|
onKeyDown: (c) => {
|
|
1145
1239
|
if (c.key === "Enter") c.target.blur();
|
|
1146
1240
|
else if (c.key === "Escape")
|
|
1147
|
-
|
|
1148
|
-
else if (
|
|
1241
|
+
d(t), c.target.blur();
|
|
1242
|
+
else if (m && (c.key === "ArrowUp" || c.key === "ArrowDown")) {
|
|
1149
1243
|
c.preventDefault();
|
|
1150
|
-
const
|
|
1151
|
-
l(
|
|
1244
|
+
const f = c.key === "ArrowUp" ? 1 : -1;
|
|
1245
|
+
l(st(i + f, s, 1 / 0));
|
|
1152
1246
|
}
|
|
1153
1247
|
},
|
|
1154
1248
|
"aria-label": n,
|
|
@@ -1157,13 +1251,13 @@ function ke({
|
|
|
1157
1251
|
)
|
|
1158
1252
|
] });
|
|
1159
1253
|
}
|
|
1160
|
-
function
|
|
1254
|
+
function wt({ property: e, label: t, value: n, onChange: r }) {
|
|
1161
1255
|
const o = ta(n), [i, s] = S(!1), l = (c) => {
|
|
1162
1256
|
r(na({ ...o, ...c }));
|
|
1163
|
-
}, p = o.left !== o.right,
|
|
1164
|
-
return /* @__PURE__ */
|
|
1257
|
+
}, p = o.left !== o.right, d = o.top !== o.bottom, g = e === "margin" ? -1 / 0 : 0, m = (c, f) => c === f ? de(c) : null;
|
|
1258
|
+
return /* @__PURE__ */ u("div", { className: "pa-prop-row pa-prop-row--compact pa-spacing-row", children: [
|
|
1165
1259
|
/* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: t }),
|
|
1166
|
-
/* @__PURE__ */
|
|
1260
|
+
/* @__PURE__ */ u(
|
|
1167
1261
|
"div",
|
|
1168
1262
|
{
|
|
1169
1263
|
className: `pa-spacing-control ${i ? "pa-spacing-control--split" : "pa-spacing-control--pair"}`,
|
|
@@ -1172,70 +1266,70 @@ function yt({ property: e, label: t, value: n, onChange: r }) {
|
|
|
1172
1266
|
// Grid mirrors pair-view columns:
|
|
1173
1267
|
// Col 1 (horizontal pair) → L on top, R on bottom
|
|
1174
1268
|
// Col 2 (vertical pair) → T on top, B on bottom
|
|
1175
|
-
/* @__PURE__ */
|
|
1269
|
+
/* @__PURE__ */ u("div", { className: "pa-spacing-grid", children: [
|
|
1176
1270
|
/* @__PURE__ */ a(
|
|
1177
1271
|
ke,
|
|
1178
1272
|
{
|
|
1179
|
-
icon: /* @__PURE__ */ a(
|
|
1273
|
+
icon: /* @__PURE__ */ a(Re, { side: "left" }),
|
|
1180
1274
|
display: be(o.left),
|
|
1181
1275
|
ariaLabel: `${t} left`,
|
|
1182
1276
|
onCommit: (c) => l({ left: ve(c) }),
|
|
1183
1277
|
scrubValue: de(o.left),
|
|
1184
|
-
scrubMin:
|
|
1278
|
+
scrubMin: g,
|
|
1185
1279
|
onScrub: (c) => l({ left: `${c}px` })
|
|
1186
1280
|
}
|
|
1187
1281
|
),
|
|
1188
1282
|
/* @__PURE__ */ a(
|
|
1189
1283
|
ke,
|
|
1190
1284
|
{
|
|
1191
|
-
icon: /* @__PURE__ */ a(
|
|
1285
|
+
icon: /* @__PURE__ */ a(Re, { side: "top" }),
|
|
1192
1286
|
display: be(o.top),
|
|
1193
1287
|
ariaLabel: `${t} top`,
|
|
1194
1288
|
onCommit: (c) => l({ top: ve(c) }),
|
|
1195
1289
|
scrubValue: de(o.top),
|
|
1196
|
-
scrubMin:
|
|
1290
|
+
scrubMin: g,
|
|
1197
1291
|
onScrub: (c) => l({ top: `${c}px` })
|
|
1198
1292
|
}
|
|
1199
1293
|
),
|
|
1200
1294
|
/* @__PURE__ */ a(
|
|
1201
1295
|
ke,
|
|
1202
1296
|
{
|
|
1203
|
-
icon: /* @__PURE__ */ a(
|
|
1297
|
+
icon: /* @__PURE__ */ a(Re, { side: "right" }),
|
|
1204
1298
|
display: be(o.right),
|
|
1205
1299
|
ariaLabel: `${t} right`,
|
|
1206
1300
|
onCommit: (c) => l({ right: ve(c) }),
|
|
1207
1301
|
scrubValue: de(o.right),
|
|
1208
|
-
scrubMin:
|
|
1302
|
+
scrubMin: g,
|
|
1209
1303
|
onScrub: (c) => l({ right: `${c}px` })
|
|
1210
1304
|
}
|
|
1211
1305
|
),
|
|
1212
1306
|
/* @__PURE__ */ a(
|
|
1213
1307
|
ke,
|
|
1214
1308
|
{
|
|
1215
|
-
icon: /* @__PURE__ */ a(
|
|
1309
|
+
icon: /* @__PURE__ */ a(Re, { side: "bottom" }),
|
|
1216
1310
|
display: be(o.bottom),
|
|
1217
1311
|
ariaLabel: `${t} bottom`,
|
|
1218
1312
|
onCommit: (c) => l({ bottom: ve(c) }),
|
|
1219
1313
|
scrubValue: de(o.bottom),
|
|
1220
|
-
scrubMin:
|
|
1314
|
+
scrubMin: g,
|
|
1221
1315
|
onScrub: (c) => l({ bottom: `${c}px` })
|
|
1222
1316
|
}
|
|
1223
1317
|
)
|
|
1224
1318
|
] })
|
|
1225
|
-
) : /* @__PURE__ */
|
|
1319
|
+
) : /* @__PURE__ */ u("div", { className: "pa-spacing-pair", children: [
|
|
1226
1320
|
/* @__PURE__ */ a(
|
|
1227
1321
|
ke,
|
|
1228
1322
|
{
|
|
1229
1323
|
icon: /* @__PURE__ */ a(aa, {}),
|
|
1230
|
-
display:
|
|
1324
|
+
display: xt(o.left, o.right),
|
|
1231
1325
|
mixed: p,
|
|
1232
1326
|
ariaLabel: `${t} horizontal`,
|
|
1233
1327
|
onCommit: (c) => {
|
|
1234
|
-
const [
|
|
1235
|
-
l({ left:
|
|
1328
|
+
const [f, h] = bt(c, o.left);
|
|
1329
|
+
l({ left: f, right: h });
|
|
1236
1330
|
},
|
|
1237
|
-
scrubValue:
|
|
1238
|
-
scrubMin:
|
|
1331
|
+
scrubValue: m(o.left, o.right),
|
|
1332
|
+
scrubMin: g,
|
|
1239
1333
|
onScrub: (c) => l({ left: `${c}px`, right: `${c}px` })
|
|
1240
1334
|
}
|
|
1241
1335
|
),
|
|
@@ -1243,15 +1337,15 @@ function yt({ property: e, label: t, value: n, onChange: r }) {
|
|
|
1243
1337
|
ke,
|
|
1244
1338
|
{
|
|
1245
1339
|
icon: /* @__PURE__ */ a(ra, {}),
|
|
1246
|
-
display:
|
|
1247
|
-
mixed:
|
|
1340
|
+
display: xt(o.top, o.bottom),
|
|
1341
|
+
mixed: d,
|
|
1248
1342
|
ariaLabel: `${t} vertical`,
|
|
1249
1343
|
onCommit: (c) => {
|
|
1250
|
-
const [
|
|
1251
|
-
l({ top:
|
|
1344
|
+
const [f, h] = bt(c, o.top);
|
|
1345
|
+
l({ top: f, bottom: h });
|
|
1252
1346
|
},
|
|
1253
|
-
scrubValue:
|
|
1254
|
-
scrubMin:
|
|
1347
|
+
scrubValue: m(o.top, o.bottom),
|
|
1348
|
+
scrubMin: g,
|
|
1255
1349
|
onScrub: (c) => l({ top: `${c}px`, bottom: `${c}px` })
|
|
1256
1350
|
}
|
|
1257
1351
|
)
|
|
@@ -1304,7 +1398,7 @@ function ca({ className: e }) {
|
|
|
1304
1398
|
return /* @__PURE__ */ a("svg", { className: e, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true", children: /* @__PURE__ */ a("path", { fill: "currentColor", d: "M2 3h12v1.5H2V3zm0 3.5h12v1.5H2V6.5zm0 3.5h12v1.5H2V10zm0 3.5h12v1.5H2V13.5z" }) });
|
|
1305
1399
|
}
|
|
1306
1400
|
function pa({ className: e }) {
|
|
1307
|
-
return /* @__PURE__ */
|
|
1401
|
+
return /* @__PURE__ */ u(
|
|
1308
1402
|
"svg",
|
|
1309
1403
|
{
|
|
1310
1404
|
className: e,
|
|
@@ -1343,12 +1437,12 @@ function ha(e) {
|
|
|
1343
1437
|
const t = fe(e);
|
|
1344
1438
|
return t !== null && (t.unit === "px" || t.unit === "rem" || t.unit === "em");
|
|
1345
1439
|
}
|
|
1346
|
-
function
|
|
1440
|
+
function yt(e) {
|
|
1347
1441
|
return Math.round(e * 100) / 100;
|
|
1348
1442
|
}
|
|
1349
|
-
function
|
|
1443
|
+
function kt(e, t) {
|
|
1350
1444
|
const n = fe(e);
|
|
1351
|
-
return n ? n.unit === "px" ? `${
|
|
1445
|
+
return n ? n.unit === "px" ? `${yt(n.num)}px` : n.unit === "rem" ? `${yt(n.num * t)}px` : e : e;
|
|
1352
1446
|
}
|
|
1353
1447
|
function ma(e) {
|
|
1354
1448
|
return e && e[0].toUpperCase() + e.slice(1);
|
|
@@ -1367,14 +1461,14 @@ function va(e, t = 16) {
|
|
|
1367
1461
|
if (!i) continue;
|
|
1368
1462
|
const s = o.trim();
|
|
1369
1463
|
if (!ha(s)) continue;
|
|
1370
|
-
const l = i[1], p = e[`${r}--line-height`] ?? e[`--leading-${l}`] ?? e[`--line-height-${l}`] ?? null,
|
|
1464
|
+
const l = i[1], p = e[`${r}--line-height`] ?? e[`--leading-${l}`] ?? e[`--line-height-${l}`] ?? null, d = e[`${r}--font-weight`] ?? e[`--font-weight-${l}`] ?? null;
|
|
1371
1465
|
n.push({
|
|
1372
1466
|
id: l,
|
|
1373
1467
|
label: xa(l),
|
|
1374
1468
|
varName: r,
|
|
1375
|
-
fontSize:
|
|
1376
|
-
lineHeight: p ?
|
|
1377
|
-
fontWeight:
|
|
1469
|
+
fontSize: kt(s, t),
|
|
1470
|
+
lineHeight: p ? kt(p.trim(), t) : null,
|
|
1471
|
+
fontWeight: d ? d.trim() : null
|
|
1378
1472
|
});
|
|
1379
1473
|
}
|
|
1380
1474
|
return n.sort((r, o) => {
|
|
@@ -1415,7 +1509,7 @@ function ka(e) {
|
|
|
1415
1509
|
if (i.style)
|
|
1416
1510
|
for (let l = 0; l < i.style.length; l++) {
|
|
1417
1511
|
const p = i.style[l];
|
|
1418
|
-
p.startsWith("--") && ga.some((
|
|
1512
|
+
p.startsWith("--") && ga.some((d) => p.startsWith(d)) && t.add(p);
|
|
1419
1513
|
}
|
|
1420
1514
|
const s = o.cssRules;
|
|
1421
1515
|
s && n(s);
|
|
@@ -1438,14 +1532,14 @@ function Na() {
|
|
|
1438
1532
|
const o = parseFloat(n.fontSize) || 16;
|
|
1439
1533
|
return va(r, o);
|
|
1440
1534
|
}
|
|
1441
|
-
const
|
|
1535
|
+
const Nt = 264, Ct = 360;
|
|
1442
1536
|
function Ca() {
|
|
1443
1537
|
if (typeof document > "u") return {};
|
|
1444
1538
|
const e = document.querySelector("[data-pixelagent-root]") ?? document.querySelector("[data-pixelagent-toolbar-portal]"), t = e == null ? void 0 : e.getAttribute("data-pa-chrome");
|
|
1445
1539
|
return t ? { "data-pa-chrome": t } : {};
|
|
1446
1540
|
}
|
|
1447
1541
|
function Ma({ className: e }) {
|
|
1448
|
-
return /* @__PURE__ */
|
|
1542
|
+
return /* @__PURE__ */ u(
|
|
1449
1543
|
"svg",
|
|
1450
1544
|
{
|
|
1451
1545
|
className: e,
|
|
@@ -1469,54 +1563,54 @@ function Aa({
|
|
|
1469
1563
|
lineHeight: n,
|
|
1470
1564
|
onApply: r
|
|
1471
1565
|
}) {
|
|
1472
|
-
const [o, i] = S(!1), [s, l] = S(""), p =
|
|
1566
|
+
const [o, i] = S(!1), [s, l] = S(""), p = W(null), d = W(null), g = W(null), m = nt(), [c, f] = S({ top: 0, left: 0, width: Nt }), h = se(
|
|
1473
1567
|
() => ya(e, t, n),
|
|
1474
1568
|
[e, t, n]
|
|
1475
|
-
),
|
|
1476
|
-
const
|
|
1477
|
-
return
|
|
1478
|
-
}, [e, s]), k =
|
|
1479
|
-
const
|
|
1480
|
-
if (!
|
|
1481
|
-
const
|
|
1482
|
-
let
|
|
1483
|
-
|
|
1484
|
-
let
|
|
1485
|
-
|
|
1569
|
+
), C = se(() => {
|
|
1570
|
+
const x = s.trim().toLowerCase();
|
|
1571
|
+
return x ? e.filter((w) => w.label.toLowerCase().includes(x) || w.id.toLowerCase().includes(x)) : e;
|
|
1572
|
+
}, [e, s]), k = T(() => {
|
|
1573
|
+
const x = p.current;
|
|
1574
|
+
if (!x) return;
|
|
1575
|
+
const w = x.getBoundingClientRect(), A = Nt;
|
|
1576
|
+
let v = w.right - A;
|
|
1577
|
+
v + A > window.innerWidth - 12 && (v = window.innerWidth - A - 12), v = Math.max(12, v);
|
|
1578
|
+
let N = w.bottom + 8;
|
|
1579
|
+
N + Ct > window.innerHeight - 12 && (N = Math.max(12, w.top - Ct - 8)), f({ top: N, left: v, width: A });
|
|
1486
1580
|
}, []);
|
|
1487
|
-
if (
|
|
1488
|
-
var
|
|
1581
|
+
if (_(() => {
|
|
1582
|
+
var A;
|
|
1489
1583
|
if (!o) return;
|
|
1490
|
-
k(), (
|
|
1491
|
-
const
|
|
1492
|
-
var
|
|
1493
|
-
const
|
|
1494
|
-
(
|
|
1495
|
-
},
|
|
1496
|
-
|
|
1584
|
+
k(), (A = g.current) == null || A.focus();
|
|
1585
|
+
const x = (v) => {
|
|
1586
|
+
var P, y;
|
|
1587
|
+
const N = v.target;
|
|
1588
|
+
(P = p.current) != null && P.contains(N) || (y = d.current) != null && y.contains(N) || i(!1);
|
|
1589
|
+
}, w = (v) => {
|
|
1590
|
+
v.key === "Escape" && i(!1);
|
|
1497
1591
|
};
|
|
1498
|
-
return window.addEventListener("mousedown",
|
|
1499
|
-
window.removeEventListener("mousedown",
|
|
1592
|
+
return window.addEventListener("mousedown", x, !0), window.addEventListener("keydown", w), window.addEventListener("resize", k), window.addEventListener("scroll", k, !0), () => {
|
|
1593
|
+
window.removeEventListener("mousedown", x, !0), window.removeEventListener("keydown", w), window.removeEventListener("resize", k), window.removeEventListener("scroll", k, !0);
|
|
1500
1594
|
};
|
|
1501
1595
|
}, [o, k]), e.length === 0) return null;
|
|
1502
|
-
const
|
|
1596
|
+
const D = o ? Le(
|
|
1503
1597
|
/* @__PURE__ */ a(
|
|
1504
1598
|
"div",
|
|
1505
1599
|
{
|
|
1506
1600
|
className: "pa-root pa-root--toolbar-portal pa-text-styles-portal",
|
|
1507
1601
|
"data-pixelagent-picker-portal": !0,
|
|
1508
1602
|
...Ca(),
|
|
1509
|
-
children: /* @__PURE__ */
|
|
1603
|
+
children: /* @__PURE__ */ u(
|
|
1510
1604
|
"div",
|
|
1511
1605
|
{
|
|
1512
|
-
ref:
|
|
1513
|
-
id:
|
|
1606
|
+
ref: d,
|
|
1607
|
+
id: m,
|
|
1514
1608
|
role: "dialog",
|
|
1515
1609
|
"aria-label": "Text styles",
|
|
1516
1610
|
className: "pa-text-styles",
|
|
1517
1611
|
style: { top: c.top, left: c.left, width: c.width },
|
|
1518
1612
|
children: [
|
|
1519
|
-
/* @__PURE__ */
|
|
1613
|
+
/* @__PURE__ */ u("header", { className: "pa-text-styles-header", children: [
|
|
1520
1614
|
/* @__PURE__ */ a("span", { className: "pa-text-styles-title", children: "Text styles" }),
|
|
1521
1615
|
/* @__PURE__ */ a(
|
|
1522
1616
|
"button",
|
|
@@ -1529,41 +1623,41 @@ function Aa({
|
|
|
1529
1623
|
}
|
|
1530
1624
|
)
|
|
1531
1625
|
] }),
|
|
1532
|
-
/* @__PURE__ */
|
|
1626
|
+
/* @__PURE__ */ u("div", { className: "pa-text-styles-search", children: [
|
|
1533
1627
|
/* @__PURE__ */ a(Ma, { className: "pa-text-styles-search-icon" }),
|
|
1534
1628
|
/* @__PURE__ */ a(
|
|
1535
1629
|
"input",
|
|
1536
1630
|
{
|
|
1537
|
-
ref:
|
|
1631
|
+
ref: g,
|
|
1538
1632
|
type: "text",
|
|
1539
1633
|
className: "pa-input pa-text-styles-search-input",
|
|
1540
1634
|
placeholder: "Search",
|
|
1541
1635
|
value: s,
|
|
1542
1636
|
spellCheck: !1,
|
|
1543
|
-
onChange: (
|
|
1637
|
+
onChange: (x) => l(x.target.value)
|
|
1544
1638
|
}
|
|
1545
1639
|
)
|
|
1546
1640
|
] }),
|
|
1547
|
-
/* @__PURE__ */ a("div", { className: "pa-text-styles-list", role: "listbox", "aria-label": "Text styles", children:
|
|
1641
|
+
/* @__PURE__ */ a("div", { className: "pa-text-styles-list", role: "listbox", "aria-label": "Text styles", children: C.length === 0 ? /* @__PURE__ */ a("p", { className: "pa-text-styles-empty", children: "No matching styles" }) : C.map((x) => /* @__PURE__ */ u(
|
|
1548
1642
|
"button",
|
|
1549
1643
|
{
|
|
1550
1644
|
type: "button",
|
|
1551
1645
|
role: "option",
|
|
1552
|
-
"aria-selected": (
|
|
1553
|
-
className: `pa-text-styles-row ${(
|
|
1646
|
+
"aria-selected": (h == null ? void 0 : h.id) === x.id,
|
|
1647
|
+
className: `pa-text-styles-row ${(h == null ? void 0 : h.id) === x.id ? "pa-text-styles-row--active" : ""}`,
|
|
1554
1648
|
onClick: () => {
|
|
1555
|
-
r(
|
|
1649
|
+
r(x), i(!1);
|
|
1556
1650
|
},
|
|
1557
1651
|
children: [
|
|
1558
1652
|
/* @__PURE__ */ a("span", { className: "pa-text-styles-specimen", "aria-hidden": "true", children: "Ag" }),
|
|
1559
|
-
/* @__PURE__ */ a("span", { className: "pa-text-styles-row-label", children:
|
|
1560
|
-
/* @__PURE__ */
|
|
1653
|
+
/* @__PURE__ */ a("span", { className: "pa-text-styles-row-label", children: x.label }),
|
|
1654
|
+
/* @__PURE__ */ u("span", { className: "pa-text-styles-row-metrics", children: [
|
|
1561
1655
|
"· ",
|
|
1562
|
-
wa(
|
|
1656
|
+
wa(x)
|
|
1563
1657
|
] })
|
|
1564
1658
|
]
|
|
1565
1659
|
},
|
|
1566
|
-
|
|
1660
|
+
x.id
|
|
1567
1661
|
)) })
|
|
1568
1662
|
]
|
|
1569
1663
|
}
|
|
@@ -1572,7 +1666,7 @@ function Aa({
|
|
|
1572
1666
|
),
|
|
1573
1667
|
document.body
|
|
1574
1668
|
) : null;
|
|
1575
|
-
return /* @__PURE__ */
|
|
1669
|
+
return /* @__PURE__ */ u(Z, { children: [
|
|
1576
1670
|
/* @__PURE__ */ a(
|
|
1577
1671
|
"button",
|
|
1578
1672
|
{
|
|
@@ -1582,15 +1676,15 @@ function Aa({
|
|
|
1582
1676
|
"aria-label": "Text styles",
|
|
1583
1677
|
"aria-haspopup": "dialog",
|
|
1584
1678
|
"aria-expanded": o,
|
|
1585
|
-
"aria-controls": o ?
|
|
1679
|
+
"aria-controls": o ? m : void 0,
|
|
1586
1680
|
title: "Text styles",
|
|
1587
|
-
onClick: (
|
|
1588
|
-
|
|
1681
|
+
onClick: (x) => {
|
|
1682
|
+
x.stopPropagation(), o || k(), i((w) => !w);
|
|
1589
1683
|
},
|
|
1590
1684
|
children: /* @__PURE__ */ a(pa, { className: "pa-edit-section-action-icon" })
|
|
1591
1685
|
}
|
|
1592
1686
|
),
|
|
1593
|
-
|
|
1687
|
+
D
|
|
1594
1688
|
] });
|
|
1595
1689
|
}
|
|
1596
1690
|
function za(e) {
|
|
@@ -1612,7 +1706,7 @@ function La(e) {
|
|
|
1612
1706
|
}
|
|
1613
1707
|
return t;
|
|
1614
1708
|
}
|
|
1615
|
-
function
|
|
1709
|
+
function Ea(e, t) {
|
|
1616
1710
|
const n = Me(t);
|
|
1617
1711
|
if (!n) return null;
|
|
1618
1712
|
const r = Be(n);
|
|
@@ -1621,7 +1715,7 @@ function $a(e, t) {
|
|
|
1621
1715
|
return i !== null && Be(i) === r;
|
|
1622
1716
|
}) ?? null;
|
|
1623
1717
|
}
|
|
1624
|
-
function
|
|
1718
|
+
function $a(e) {
|
|
1625
1719
|
const t = /* @__PURE__ */ new Set(), n = (r) => {
|
|
1626
1720
|
if (r)
|
|
1627
1721
|
for (const o of Array.from(r)) {
|
|
@@ -1644,79 +1738,79 @@ function Ea(e) {
|
|
|
1644
1738
|
}
|
|
1645
1739
|
function Pa() {
|
|
1646
1740
|
if (typeof document > "u") return [];
|
|
1647
|
-
const e =
|
|
1741
|
+
const e = $a(document), t = getComputedStyle(document.documentElement), n = {};
|
|
1648
1742
|
for (const r of e) {
|
|
1649
1743
|
const o = t.getPropertyValue(r).trim();
|
|
1650
1744
|
o && (n[r] = o);
|
|
1651
1745
|
}
|
|
1652
1746
|
return La(n);
|
|
1653
1747
|
}
|
|
1654
|
-
const
|
|
1655
|
-
function
|
|
1748
|
+
const Mt = 300, At = 360;
|
|
1749
|
+
function Ra() {
|
|
1656
1750
|
if (typeof document > "u") return {};
|
|
1657
1751
|
const e = document.querySelector("[data-pixelagent-root]") ?? document.querySelector("[data-pixelagent-toolbar-portal]"), t = e == null ? void 0 : e.getAttribute("data-pa-chrome");
|
|
1658
1752
|
return t ? { "data-pa-chrome": t } : {};
|
|
1659
1753
|
}
|
|
1660
1754
|
function Ta({ className: e }) {
|
|
1661
|
-
return /* @__PURE__ */
|
|
1755
|
+
return /* @__PURE__ */ u("svg", { className: e, width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": "true", children: [
|
|
1662
1756
|
/* @__PURE__ */ a("circle", { cx: "7", cy: "7", r: "4.5" }),
|
|
1663
1757
|
/* @__PURE__ */ a("line", { x1: "10.5", y1: "10.5", x2: "14", y2: "14", strokeLinecap: "round" })
|
|
1664
1758
|
] });
|
|
1665
1759
|
}
|
|
1666
|
-
function
|
|
1667
|
-
return /* @__PURE__ */
|
|
1760
|
+
function Ia({ className: e }) {
|
|
1761
|
+
return /* @__PURE__ */ u("svg", { className: e, width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.4", "aria-hidden": "true", children: [
|
|
1668
1762
|
/* @__PURE__ */ a("circle", { cx: "6.4", cy: "6.4", r: "3.4" }),
|
|
1669
1763
|
/* @__PURE__ */ a("circle", { cx: "9.8", cy: "9.8", r: "3.4" })
|
|
1670
1764
|
] });
|
|
1671
1765
|
}
|
|
1672
1766
|
function qe({ presets: e, value: t, onApply: n, title: r = "Color" }) {
|
|
1673
|
-
const [o, i] = S(!1), [s, l] = S(""), p =
|
|
1674
|
-
const
|
|
1675
|
-
return
|
|
1676
|
-
(
|
|
1767
|
+
const [o, i] = S(!1), [s, l] = S(""), p = W(null), d = W(null), g = W(null), m = nt(), [c, f] = S({ top: 0, left: 0, width: Mt }), h = se(() => Ea(e, t), [e, t]), C = se(() => {
|
|
1768
|
+
const x = s.trim().toLowerCase();
|
|
1769
|
+
return x ? e.filter(
|
|
1770
|
+
(w) => w.name.toLowerCase().includes(x) || w.id.toLowerCase().includes(x) || w.value.toLowerCase().includes(x)
|
|
1677
1771
|
) : e;
|
|
1678
|
-
}, [e, s]), k =
|
|
1679
|
-
const
|
|
1680
|
-
if (!
|
|
1681
|
-
const
|
|
1682
|
-
let
|
|
1683
|
-
|
|
1684
|
-
let
|
|
1685
|
-
|
|
1772
|
+
}, [e, s]), k = T(() => {
|
|
1773
|
+
const x = p.current;
|
|
1774
|
+
if (!x) return;
|
|
1775
|
+
const w = x.getBoundingClientRect(), A = Mt;
|
|
1776
|
+
let v = w.right - A;
|
|
1777
|
+
v + A > window.innerWidth - 12 && (v = window.innerWidth - A - 12), v = Math.max(12, v);
|
|
1778
|
+
let N = w.bottom + 8;
|
|
1779
|
+
N + At > window.innerHeight - 12 && (N = Math.max(12, w.top - At - 8)), f({ top: N, left: v, width: A });
|
|
1686
1780
|
}, []);
|
|
1687
|
-
if (
|
|
1688
|
-
var
|
|
1781
|
+
if (_(() => {
|
|
1782
|
+
var A;
|
|
1689
1783
|
if (!o) return;
|
|
1690
|
-
k(), (
|
|
1691
|
-
const
|
|
1692
|
-
var
|
|
1693
|
-
const
|
|
1694
|
-
(
|
|
1695
|
-
},
|
|
1696
|
-
|
|
1784
|
+
k(), (A = g.current) == null || A.focus();
|
|
1785
|
+
const x = (v) => {
|
|
1786
|
+
var P, y;
|
|
1787
|
+
const N = v.target;
|
|
1788
|
+
(P = p.current) != null && P.contains(N) || (y = d.current) != null && y.contains(N) || i(!1);
|
|
1789
|
+
}, w = (v) => {
|
|
1790
|
+
v.key === "Escape" && i(!1);
|
|
1697
1791
|
};
|
|
1698
|
-
return window.addEventListener("mousedown",
|
|
1699
|
-
window.removeEventListener("mousedown",
|
|
1792
|
+
return window.addEventListener("mousedown", x, !0), window.addEventListener("keydown", w), window.addEventListener("resize", k), window.addEventListener("scroll", k, !0), () => {
|
|
1793
|
+
window.removeEventListener("mousedown", x, !0), window.removeEventListener("keydown", w), window.removeEventListener("resize", k), window.removeEventListener("scroll", k, !0);
|
|
1700
1794
|
};
|
|
1701
1795
|
}, [o, k]), e.length === 0) return null;
|
|
1702
|
-
const
|
|
1796
|
+
const D = o ? Le(
|
|
1703
1797
|
/* @__PURE__ */ a(
|
|
1704
1798
|
"div",
|
|
1705
1799
|
{
|
|
1706
1800
|
className: "pa-root pa-root--toolbar-portal pa-text-styles-portal",
|
|
1707
1801
|
"data-pixelagent-picker-portal": !0,
|
|
1708
|
-
...
|
|
1709
|
-
children: /* @__PURE__ */
|
|
1802
|
+
...Ra(),
|
|
1803
|
+
children: /* @__PURE__ */ u(
|
|
1710
1804
|
"div",
|
|
1711
1805
|
{
|
|
1712
|
-
ref:
|
|
1713
|
-
id:
|
|
1806
|
+
ref: d,
|
|
1807
|
+
id: m,
|
|
1714
1808
|
role: "dialog",
|
|
1715
1809
|
"aria-label": r,
|
|
1716
1810
|
className: "pa-text-styles",
|
|
1717
1811
|
style: { top: c.top, left: c.left, width: c.width },
|
|
1718
1812
|
children: [
|
|
1719
|
-
/* @__PURE__ */
|
|
1813
|
+
/* @__PURE__ */ u("header", { className: "pa-text-styles-header", children: [
|
|
1720
1814
|
/* @__PURE__ */ a("span", { className: "pa-text-styles-title", children: r }),
|
|
1721
1815
|
/* @__PURE__ */ a(
|
|
1722
1816
|
"button",
|
|
@@ -1729,45 +1823,45 @@ function qe({ presets: e, value: t, onApply: n, title: r = "Color" }) {
|
|
|
1729
1823
|
}
|
|
1730
1824
|
)
|
|
1731
1825
|
] }),
|
|
1732
|
-
/* @__PURE__ */
|
|
1826
|
+
/* @__PURE__ */ u("div", { className: "pa-text-styles-search", children: [
|
|
1733
1827
|
/* @__PURE__ */ a(Ta, { className: "pa-text-styles-search-icon" }),
|
|
1734
1828
|
/* @__PURE__ */ a(
|
|
1735
1829
|
"input",
|
|
1736
1830
|
{
|
|
1737
|
-
ref:
|
|
1831
|
+
ref: g,
|
|
1738
1832
|
type: "text",
|
|
1739
1833
|
className: "pa-input pa-text-styles-search-input",
|
|
1740
1834
|
placeholder: "Search",
|
|
1741
1835
|
value: s,
|
|
1742
1836
|
spellCheck: !1,
|
|
1743
|
-
onChange: (
|
|
1837
|
+
onChange: (x) => l(x.target.value)
|
|
1744
1838
|
}
|
|
1745
1839
|
)
|
|
1746
1840
|
] }),
|
|
1747
|
-
/* @__PURE__ */ a("div", { className: "pa-text-styles-list", role: "listbox", "aria-label": "Color tokens", children:
|
|
1841
|
+
/* @__PURE__ */ a("div", { className: "pa-text-styles-list", role: "listbox", "aria-label": "Color tokens", children: C.length === 0 ? /* @__PURE__ */ a("p", { className: "pa-text-styles-empty", children: "No matching colors" }) : C.map((x) => /* @__PURE__ */ u(
|
|
1748
1842
|
"button",
|
|
1749
1843
|
{
|
|
1750
1844
|
type: "button",
|
|
1751
1845
|
role: "option",
|
|
1752
|
-
"aria-selected": (
|
|
1753
|
-
className: `pa-text-styles-row ${(
|
|
1846
|
+
"aria-selected": (h == null ? void 0 : h.id) === x.id,
|
|
1847
|
+
className: `pa-text-styles-row ${(h == null ? void 0 : h.id) === x.id ? "pa-text-styles-row--active" : ""}`,
|
|
1754
1848
|
onClick: () => {
|
|
1755
|
-
n(
|
|
1849
|
+
n(x.value), i(!1);
|
|
1756
1850
|
},
|
|
1757
1851
|
children: [
|
|
1758
1852
|
/* @__PURE__ */ a(
|
|
1759
1853
|
"span",
|
|
1760
1854
|
{
|
|
1761
1855
|
className: "pa-color-presets-swatch",
|
|
1762
|
-
style: { backgroundColor:
|
|
1856
|
+
style: { backgroundColor: x.value },
|
|
1763
1857
|
"aria-hidden": "true"
|
|
1764
1858
|
}
|
|
1765
1859
|
),
|
|
1766
|
-
/* @__PURE__ */ a("span", { className: "pa-text-styles-row-label", title:
|
|
1767
|
-
/* @__PURE__ */ a("span", { className: "pa-text-styles-row-metrics", children:
|
|
1860
|
+
/* @__PURE__ */ a("span", { className: "pa-text-styles-row-label", title: x.name, children: x.name }),
|
|
1861
|
+
/* @__PURE__ */ a("span", { className: "pa-text-styles-row-metrics", children: x.value })
|
|
1768
1862
|
]
|
|
1769
1863
|
},
|
|
1770
|
-
|
|
1864
|
+
x.id
|
|
1771
1865
|
)) })
|
|
1772
1866
|
]
|
|
1773
1867
|
}
|
|
@@ -1776,7 +1870,7 @@ function qe({ presets: e, value: t, onApply: n, title: r = "Color" }) {
|
|
|
1776
1870
|
),
|
|
1777
1871
|
document.body
|
|
1778
1872
|
) : null;
|
|
1779
|
-
return /* @__PURE__ */
|
|
1873
|
+
return /* @__PURE__ */ u(Z, { children: [
|
|
1780
1874
|
/* @__PURE__ */ a(
|
|
1781
1875
|
"button",
|
|
1782
1876
|
{
|
|
@@ -1786,18 +1880,18 @@ function qe({ presets: e, value: t, onApply: n, title: r = "Color" }) {
|
|
|
1786
1880
|
"aria-label": `${r} tokens`,
|
|
1787
1881
|
"aria-haspopup": "dialog",
|
|
1788
1882
|
"aria-expanded": o,
|
|
1789
|
-
"aria-controls": o ?
|
|
1883
|
+
"aria-controls": o ? m : void 0,
|
|
1790
1884
|
title: "Color tokens",
|
|
1791
|
-
onClick: (
|
|
1792
|
-
|
|
1885
|
+
onClick: (x) => {
|
|
1886
|
+
x.stopPropagation(), o || k(), i((w) => !w);
|
|
1793
1887
|
},
|
|
1794
|
-
children: /* @__PURE__ */ a(
|
|
1888
|
+
children: /* @__PURE__ */ a(Ia, { className: "pa-edit-section-action-icon" })
|
|
1795
1889
|
}
|
|
1796
1890
|
),
|
|
1797
|
-
|
|
1891
|
+
D
|
|
1798
1892
|
] });
|
|
1799
1893
|
}
|
|
1800
|
-
function
|
|
1894
|
+
function Da({
|
|
1801
1895
|
options: e,
|
|
1802
1896
|
value: t,
|
|
1803
1897
|
ariaLabel: n,
|
|
@@ -1817,7 +1911,7 @@ function Oa({
|
|
|
1817
1911
|
o.value
|
|
1818
1912
|
)) });
|
|
1819
1913
|
}
|
|
1820
|
-
function
|
|
1914
|
+
function Oa({
|
|
1821
1915
|
options: e,
|
|
1822
1916
|
ariaLabel: t,
|
|
1823
1917
|
onToggle: n
|
|
@@ -1849,10 +1943,10 @@ function nn(e) {
|
|
|
1849
1943
|
function Ba(e) {
|
|
1850
1944
|
return nn(e) ? "normal" : "italic";
|
|
1851
1945
|
}
|
|
1852
|
-
function
|
|
1946
|
+
function zt(e, t) {
|
|
1853
1947
|
return e.split(/\s+/).includes(t);
|
|
1854
1948
|
}
|
|
1855
|
-
function
|
|
1949
|
+
function St(e, t) {
|
|
1856
1950
|
const n = new Set(
|
|
1857
1951
|
e.trim().split(/\s+/).filter((r) => r && r !== "none")
|
|
1858
1952
|
);
|
|
@@ -1862,7 +1956,7 @@ function _a(e) {
|
|
|
1862
1956
|
const t = e.trim();
|
|
1863
1957
|
return t === "center" || t === "right" || t === "justify" ? t : "left";
|
|
1864
1958
|
}
|
|
1865
|
-
const
|
|
1959
|
+
const Lt = [
|
|
1866
1960
|
"none",
|
|
1867
1961
|
"solid",
|
|
1868
1962
|
"dashed",
|
|
@@ -1883,7 +1977,7 @@ const $t = [
|
|
|
1883
1977
|
"none",
|
|
1884
1978
|
"contents"
|
|
1885
1979
|
], Ha = /* @__PURE__ */ new Set(["flex", "inline-flex", "grid", "inline-grid"]);
|
|
1886
|
-
function
|
|
1980
|
+
function Wa({
|
|
1887
1981
|
selectedElement: e,
|
|
1888
1982
|
values: t,
|
|
1889
1983
|
onPropertyChange: n,
|
|
@@ -1893,34 +1987,34 @@ function Va({
|
|
|
1893
1987
|
onTextChange: s,
|
|
1894
1988
|
targetScope: l,
|
|
1895
1989
|
onTargetScopeChange: p,
|
|
1896
|
-
elementState:
|
|
1897
|
-
onElementStateChange:
|
|
1898
|
-
instanceCount:
|
|
1990
|
+
elementState: d,
|
|
1991
|
+
onElementStateChange: g,
|
|
1992
|
+
instanceCount: m,
|
|
1899
1993
|
scopeHint: c,
|
|
1900
|
-
stateHint:
|
|
1994
|
+
stateHint: f
|
|
1901
1995
|
}) {
|
|
1902
|
-
var
|
|
1903
|
-
const [
|
|
1904
|
-
const
|
|
1905
|
-
b.lineHeight && (
|
|
1906
|
-
},
|
|
1907
|
-
|
|
1908
|
-
const
|
|
1909
|
-
|
|
1910
|
-
const
|
|
1996
|
+
var J, le;
|
|
1997
|
+
const [h] = S(() => Na()), [C] = S(() => Pa()), k = (b) => {
|
|
1998
|
+
const Q = { "font-size": b.fontSize };
|
|
1999
|
+
b.lineHeight && (Q["line-height"] = b.lineHeight), b.fontWeight && (Q["font-weight"] = b.fontWeight), r(Q);
|
|
2000
|
+
}, D = t["font-weight"] ?? "", x = t["font-style"] ?? "normal", w = t["text-decoration"] ?? "none", A = _a(t["text-align"] ?? "left"), v = ((J = t.display) == null ? void 0 : J.trim()) ?? "", N = !!v, P = Ha.has(v), y = [...Et];
|
|
2001
|
+
v && !Et.includes(v) && y.push(v);
|
|
2002
|
+
const M = ((le = t.gap) == null ? void 0 : le.trim()) ?? "", z = M === "normal" || M === "" ? "0px" : M, E = t["border-style"] ?? "none", F = [...Lt];
|
|
2003
|
+
E && !Lt.includes(E) && F.push(E);
|
|
2004
|
+
const j = rt(e), K = se(
|
|
1911
2005
|
() => Un(
|
|
1912
2006
|
e,
|
|
1913
2007
|
xe(e).kind,
|
|
1914
2008
|
Ne(e)
|
|
1915
2009
|
),
|
|
1916
2010
|
[e]
|
|
1917
|
-
),
|
|
1918
|
-
return /* @__PURE__ */
|
|
1919
|
-
/* @__PURE__ */
|
|
1920
|
-
/* @__PURE__ */
|
|
1921
|
-
/* @__PURE__ */
|
|
2011
|
+
), q = (b) => jn(K, b);
|
|
2012
|
+
return /* @__PURE__ */ u("div", { className: "pa-edit-sections", children: [
|
|
2013
|
+
/* @__PURE__ */ u(we, { title: "Targeting", defaultOpen: q("targeting"), children: [
|
|
2014
|
+
/* @__PURE__ */ u("div", { className: "pa-edit-field-grid pa-edit-field-grid--2", children: [
|
|
2015
|
+
/* @__PURE__ */ u("label", { className: "pa-edit-mini-field", children: [
|
|
1922
2016
|
/* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: "Scope" }),
|
|
1923
|
-
/* @__PURE__ */
|
|
2017
|
+
/* @__PURE__ */ u(
|
|
1924
2018
|
"select",
|
|
1925
2019
|
{
|
|
1926
2020
|
className: "pa-select",
|
|
@@ -1928,23 +2022,23 @@ function Va({
|
|
|
1928
2022
|
onChange: (b) => p(b.target.value),
|
|
1929
2023
|
children: [
|
|
1930
2024
|
/* @__PURE__ */ a("option", { value: "this-instance", children: "This instance" }),
|
|
1931
|
-
/* @__PURE__ */
|
|
2025
|
+
/* @__PURE__ */ u("option", { value: "all-instances", disabled: m <= 1, children: [
|
|
1932
2026
|
"All (",
|
|
1933
|
-
|
|
2027
|
+
m,
|
|
1934
2028
|
")"
|
|
1935
2029
|
] })
|
|
1936
2030
|
]
|
|
1937
2031
|
}
|
|
1938
2032
|
)
|
|
1939
2033
|
] }),
|
|
1940
|
-
/* @__PURE__ */
|
|
2034
|
+
/* @__PURE__ */ u("label", { className: "pa-edit-mini-field", children: [
|
|
1941
2035
|
/* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: "State" }),
|
|
1942
|
-
/* @__PURE__ */
|
|
2036
|
+
/* @__PURE__ */ u(
|
|
1943
2037
|
"select",
|
|
1944
2038
|
{
|
|
1945
2039
|
className: "pa-select",
|
|
1946
|
-
value:
|
|
1947
|
-
onChange: (b) =>
|
|
2040
|
+
value: d,
|
|
2041
|
+
onChange: (b) => g(b.target.value),
|
|
1948
2042
|
children: [
|
|
1949
2043
|
/* @__PURE__ */ a("option", { value: "normal", children: "Normal" }),
|
|
1950
2044
|
/* @__PURE__ */ a("option", { value: "hover", children: "Hover" }),
|
|
@@ -1957,9 +2051,9 @@ function Va({
|
|
|
1957
2051
|
] })
|
|
1958
2052
|
] }),
|
|
1959
2053
|
c ? /* @__PURE__ */ a("p", { className: "pa-edit-inline-hint", children: c }) : null,
|
|
1960
|
-
|
|
2054
|
+
f ? /* @__PURE__ */ a("p", { className: "pa-edit-inline-hint", children: f }) : null
|
|
1961
2055
|
] }),
|
|
1962
|
-
o !== "none" && /* @__PURE__ */ a(we, { title: "Content", defaultOpen:
|
|
2056
|
+
o !== "none" && /* @__PURE__ */ a(we, { title: "Content", defaultOpen: q("content"), children: /* @__PURE__ */ u("label", { className: "pa-edit-stack-field", children: [
|
|
1963
2057
|
/* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: "Text" }),
|
|
1964
2058
|
/* @__PURE__ */ a(
|
|
1965
2059
|
"textarea",
|
|
@@ -1972,15 +2066,15 @@ function Va({
|
|
|
1972
2066
|
}
|
|
1973
2067
|
)
|
|
1974
2068
|
] }) }),
|
|
1975
|
-
/* @__PURE__ */
|
|
2069
|
+
/* @__PURE__ */ u(
|
|
1976
2070
|
we,
|
|
1977
2071
|
{
|
|
1978
2072
|
title: "Typography",
|
|
1979
|
-
defaultOpen:
|
|
2073
|
+
defaultOpen: q("typography"),
|
|
1980
2074
|
headerAction: /* @__PURE__ */ a(
|
|
1981
2075
|
Aa,
|
|
1982
2076
|
{
|
|
1983
|
-
presets:
|
|
2077
|
+
presets: h,
|
|
1984
2078
|
fontSize: t["font-size"] ?? "",
|
|
1985
2079
|
lineHeight: t["line-height"] ?? "",
|
|
1986
2080
|
onApply: k
|
|
@@ -1994,57 +2088,57 @@ function Va({
|
|
|
1994
2088
|
onChange: (b) => n("font-family", b)
|
|
1995
2089
|
}
|
|
1996
2090
|
),
|
|
1997
|
-
/* @__PURE__ */
|
|
2091
|
+
/* @__PURE__ */ u("div", { className: "pa-edit-field-block", children: [
|
|
1998
2092
|
/* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: "Style" }),
|
|
1999
2093
|
/* @__PURE__ */ a(
|
|
2000
|
-
|
|
2094
|
+
Oa,
|
|
2001
2095
|
{
|
|
2002
2096
|
ariaLabel: "Text style",
|
|
2003
2097
|
options: [
|
|
2004
2098
|
{
|
|
2005
2099
|
id: "bold",
|
|
2006
2100
|
title: "Bold",
|
|
2007
|
-
pressed: tn(
|
|
2101
|
+
pressed: tn(D),
|
|
2008
2102
|
content: /* @__PURE__ */ a("span", { className: "pa-segmented-type pa-segmented-type--bold", children: "B" })
|
|
2009
2103
|
},
|
|
2010
2104
|
{
|
|
2011
2105
|
id: "italic",
|
|
2012
2106
|
title: "Italic",
|
|
2013
|
-
pressed: nn(
|
|
2107
|
+
pressed: nn(x),
|
|
2014
2108
|
content: /* @__PURE__ */ a("span", { className: "pa-segmented-type pa-segmented-type--italic", children: "I" })
|
|
2015
2109
|
},
|
|
2016
2110
|
{
|
|
2017
2111
|
id: "underline",
|
|
2018
2112
|
title: "Underline",
|
|
2019
|
-
pressed:
|
|
2113
|
+
pressed: zt(w, "underline"),
|
|
2020
2114
|
content: /* @__PURE__ */ a("span", { className: "pa-segmented-type pa-segmented-type--underline", children: "U" })
|
|
2021
2115
|
},
|
|
2022
2116
|
{
|
|
2023
2117
|
id: "strikethrough",
|
|
2024
2118
|
title: "Strikethrough",
|
|
2025
|
-
pressed:
|
|
2119
|
+
pressed: zt(w, "line-through"),
|
|
2026
2120
|
content: /* @__PURE__ */ a(da, { className: "pa-segmented-icon" })
|
|
2027
2121
|
}
|
|
2028
2122
|
],
|
|
2029
2123
|
onToggle: (b) => {
|
|
2030
|
-
b === "bold" ? n("font-weight", Fa(
|
|
2124
|
+
b === "bold" ? n("font-weight", Fa(D)) : b === "italic" ? n("font-style", Ba(x)) : b === "underline" ? n(
|
|
2031
2125
|
"text-decoration",
|
|
2032
|
-
|
|
2126
|
+
St(w, "underline")
|
|
2033
2127
|
) : b === "strikethrough" && n(
|
|
2034
2128
|
"text-decoration",
|
|
2035
|
-
|
|
2129
|
+
St(w, "line-through")
|
|
2036
2130
|
);
|
|
2037
2131
|
}
|
|
2038
2132
|
}
|
|
2039
2133
|
)
|
|
2040
2134
|
] }),
|
|
2041
|
-
/* @__PURE__ */
|
|
2135
|
+
/* @__PURE__ */ u("div", { className: "pa-edit-field-block", children: [
|
|
2042
2136
|
/* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: "Align" }),
|
|
2043
2137
|
/* @__PURE__ */ a(
|
|
2044
|
-
|
|
2138
|
+
Da,
|
|
2045
2139
|
{
|
|
2046
2140
|
ariaLabel: "Text align",
|
|
2047
|
-
value:
|
|
2141
|
+
value: A,
|
|
2048
2142
|
onChange: (b) => n("text-align", b),
|
|
2049
2143
|
options: [
|
|
2050
2144
|
{
|
|
@@ -2071,7 +2165,7 @@ function Va({
|
|
|
2071
2165
|
}
|
|
2072
2166
|
)
|
|
2073
2167
|
] }),
|
|
2074
|
-
/* @__PURE__ */
|
|
2168
|
+
/* @__PURE__ */ u("div", { className: "pa-edit-field-grid pa-edit-field-grid--2 pa-edit-size-row", children: [
|
|
2075
2169
|
/* @__PURE__ */ a(
|
|
2076
2170
|
pe,
|
|
2077
2171
|
{
|
|
@@ -2103,7 +2197,7 @@ function Va({
|
|
|
2103
2197
|
qe,
|
|
2104
2198
|
{
|
|
2105
2199
|
title: "Text color",
|
|
2106
|
-
presets:
|
|
2200
|
+
presets: C,
|
|
2107
2201
|
value: t.color ?? "",
|
|
2108
2202
|
onApply: (b) => n("color", b)
|
|
2109
2203
|
}
|
|
@@ -2113,8 +2207,8 @@ function Va({
|
|
|
2113
2207
|
]
|
|
2114
2208
|
}
|
|
2115
2209
|
),
|
|
2116
|
-
/* @__PURE__ */
|
|
2117
|
-
/* @__PURE__ */
|
|
2210
|
+
/* @__PURE__ */ u(we, { title: "Layout", defaultOpen: q("layout"), children: [
|
|
2211
|
+
/* @__PURE__ */ u("div", { className: "pa-edit-split-fields", children: [
|
|
2118
2212
|
/* @__PURE__ */ a(
|
|
2119
2213
|
pe,
|
|
2120
2214
|
{
|
|
@@ -2137,7 +2231,7 @@ function Va({
|
|
|
2137
2231
|
)
|
|
2138
2232
|
] }),
|
|
2139
2233
|
/* @__PURE__ */ a(
|
|
2140
|
-
|
|
2234
|
+
wt,
|
|
2141
2235
|
{
|
|
2142
2236
|
property: "padding",
|
|
2143
2237
|
label: "Padding",
|
|
@@ -2146,7 +2240,7 @@ function Va({
|
|
|
2146
2240
|
}
|
|
2147
2241
|
),
|
|
2148
2242
|
/* @__PURE__ */ a(
|
|
2149
|
-
|
|
2243
|
+
wt,
|
|
2150
2244
|
{
|
|
2151
2245
|
property: "margin",
|
|
2152
2246
|
label: "Margin",
|
|
@@ -2154,30 +2248,30 @@ function Va({
|
|
|
2154
2248
|
onChange: (b) => n("margin", b)
|
|
2155
2249
|
}
|
|
2156
2250
|
),
|
|
2157
|
-
|
|
2251
|
+
N && /* @__PURE__ */ u("label", { className: "pa-prop-row pa-prop-row--compact", children: [
|
|
2158
2252
|
/* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: "Display" }),
|
|
2159
2253
|
/* @__PURE__ */ a(
|
|
2160
2254
|
"select",
|
|
2161
2255
|
{
|
|
2162
2256
|
className: "pa-select",
|
|
2163
|
-
value:
|
|
2257
|
+
value: v,
|
|
2164
2258
|
onChange: (b) => n("display", b.target.value),
|
|
2165
|
-
children:
|
|
2259
|
+
children: y.map((b) => /* @__PURE__ */ a("option", { value: b, children: b }, b))
|
|
2166
2260
|
}
|
|
2167
2261
|
)
|
|
2168
2262
|
] }),
|
|
2169
|
-
|
|
2263
|
+
P && /* @__PURE__ */ a(
|
|
2170
2264
|
pe,
|
|
2171
2265
|
{
|
|
2172
2266
|
compact: !0,
|
|
2173
2267
|
property: "gap",
|
|
2174
2268
|
label: "Gap",
|
|
2175
|
-
value:
|
|
2269
|
+
value: z,
|
|
2176
2270
|
onChange: (b) => n("gap", b)
|
|
2177
2271
|
}
|
|
2178
2272
|
)
|
|
2179
2273
|
] }),
|
|
2180
|
-
/* @__PURE__ */
|
|
2274
|
+
/* @__PURE__ */ u(we, { title: "Fill", defaultOpen: q("fill"), children: [
|
|
2181
2275
|
/* @__PURE__ */ a(
|
|
2182
2276
|
Ke,
|
|
2183
2277
|
{
|
|
@@ -2188,7 +2282,7 @@ function Va({
|
|
|
2188
2282
|
qe,
|
|
2189
2283
|
{
|
|
2190
2284
|
title: "Fill color",
|
|
2191
|
-
presets:
|
|
2285
|
+
presets: C,
|
|
2192
2286
|
value: t["background-color"] ?? "",
|
|
2193
2287
|
onApply: (b) => n("background-color", b)
|
|
2194
2288
|
}
|
|
@@ -2206,7 +2300,7 @@ function Va({
|
|
|
2206
2300
|
}
|
|
2207
2301
|
)
|
|
2208
2302
|
] }),
|
|
2209
|
-
/* @__PURE__ */
|
|
2303
|
+
/* @__PURE__ */ u(we, { title: "Border", defaultOpen: q("border"), children: [
|
|
2210
2304
|
/* @__PURE__ */ a(
|
|
2211
2305
|
Ke,
|
|
2212
2306
|
{
|
|
@@ -2217,22 +2311,22 @@ function Va({
|
|
|
2217
2311
|
qe,
|
|
2218
2312
|
{
|
|
2219
2313
|
title: "Border color",
|
|
2220
|
-
presets:
|
|
2314
|
+
presets: C,
|
|
2221
2315
|
value: t["border-color"] ?? "",
|
|
2222
2316
|
onApply: (b) => n("border-color", b)
|
|
2223
2317
|
}
|
|
2224
2318
|
)
|
|
2225
2319
|
}
|
|
2226
2320
|
),
|
|
2227
|
-
/* @__PURE__ */
|
|
2321
|
+
/* @__PURE__ */ u("label", { className: "pa-edit-stack-field", children: [
|
|
2228
2322
|
/* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: "Style" }),
|
|
2229
2323
|
/* @__PURE__ */ a(
|
|
2230
2324
|
"select",
|
|
2231
2325
|
{
|
|
2232
2326
|
className: "pa-select",
|
|
2233
|
-
value:
|
|
2327
|
+
value: E,
|
|
2234
2328
|
onChange: (b) => n("border-style", b.target.value),
|
|
2235
|
-
children:
|
|
2329
|
+
children: F.map((b) => /* @__PURE__ */ a("option", { value: b, children: b }, b))
|
|
2236
2330
|
}
|
|
2237
2331
|
)
|
|
2238
2332
|
] }),
|
|
@@ -2257,9 +2351,9 @@ function Va({
|
|
|
2257
2351
|
}
|
|
2258
2352
|
)
|
|
2259
2353
|
] })
|
|
2260
|
-
] },
|
|
2354
|
+
] }, j);
|
|
2261
2355
|
}
|
|
2262
|
-
const
|
|
2356
|
+
const Va = 50, Je = [
|
|
2263
2357
|
"font-family",
|
|
2264
2358
|
"font-size",
|
|
2265
2359
|
"font-weight",
|
|
@@ -2283,176 +2377,176 @@ const Wa = 50, Je = [
|
|
|
2283
2377
|
];
|
|
2284
2378
|
function Ua(e, t, n) {
|
|
2285
2379
|
var ge;
|
|
2286
|
-
const r =
|
|
2380
|
+
const r = W([]), o = W(/* @__PURE__ */ new Set()), i = W([]), s = W([]), l = W([]), p = W(
|
|
2287
2381
|
null
|
|
2288
|
-
), [
|
|
2289
|
-
const
|
|
2382
|
+
), [d, g] = S({}), [m, c] = S({}), [f, h] = S("none"), [C, k] = S(""), [D, x] = S(""), [w, A] = S(() => /* @__PURE__ */ new Map()), [v, N] = S(!1), P = T(() => {
|
|
2383
|
+
const $ = Array.from(o.current), I = f;
|
|
2290
2384
|
return {
|
|
2291
|
-
inline: Ye(
|
|
2292
|
-
text:
|
|
2385
|
+
inline: Ye($, [...Je]),
|
|
2386
|
+
text: I !== "none" ? $.map((B) => je(B, I)) : []
|
|
2293
2387
|
};
|
|
2294
|
-
}, [
|
|
2295
|
-
l.current.push(
|
|
2296
|
-
}, [
|
|
2297
|
-
(
|
|
2298
|
-
var
|
|
2388
|
+
}, [f]), y = T(() => {
|
|
2389
|
+
l.current.push(P()), l.current.length > Va && l.current.shift(), N(l.current.length > 0);
|
|
2390
|
+
}, [P]), M = T(
|
|
2391
|
+
($) => {
|
|
2392
|
+
var ee;
|
|
2299
2393
|
if (!e) return;
|
|
2300
|
-
const
|
|
2301
|
-
Se(i.current.filter((
|
|
2302
|
-
for (const
|
|
2303
|
-
|
|
2304
|
-
const
|
|
2305
|
-
r.current =
|
|
2306
|
-
const O = new Set(i.current.map((
|
|
2307
|
-
if (
|
|
2394
|
+
const I = Array.from(o.current);
|
|
2395
|
+
Se(i.current.filter((H) => I.includes(H.element)));
|
|
2396
|
+
for (const H of s.current)
|
|
2397
|
+
I.includes(H.element) && Ee(H);
|
|
2398
|
+
const B = Oe(e, t);
|
|
2399
|
+
r.current = B, o.current = new Set(B);
|
|
2400
|
+
const O = new Set(i.current.map((H) => H.element)), Y = B.filter((H) => !O.has(H));
|
|
2401
|
+
if (Y.length > 0 && (i.current = [
|
|
2308
2402
|
...i.current,
|
|
2309
|
-
...Ye(
|
|
2310
|
-
],
|
|
2311
|
-
const
|
|
2403
|
+
...Ye(Y, [...Je])
|
|
2404
|
+
], f !== "none")) {
|
|
2405
|
+
const H = f;
|
|
2312
2406
|
s.current = [
|
|
2313
2407
|
...s.current,
|
|
2314
|
-
...
|
|
2408
|
+
...Y.map((V) => je(V, H))
|
|
2315
2409
|
];
|
|
2316
2410
|
}
|
|
2317
|
-
|
|
2318
|
-
const
|
|
2319
|
-
if (
|
|
2320
|
-
for (const
|
|
2321
|
-
if (
|
|
2322
|
-
for (const
|
|
2323
|
-
|
|
2411
|
+
$e(I), Xe(B, n);
|
|
2412
|
+
const X = e ? ((ee = w.get(e)) == null ? void 0 : ee.get(n)) ?? [] : [];
|
|
2413
|
+
if ($ && X.length > 0)
|
|
2414
|
+
for (const H of X)
|
|
2415
|
+
if (H.property === "textContent" || H.property === "value")
|
|
2416
|
+
for (const V of B)
|
|
2417
|
+
ut(V, H.property, H.newValue);
|
|
2324
2418
|
else
|
|
2325
|
-
for (const
|
|
2326
|
-
|
|
2419
|
+
for (const V of B)
|
|
2420
|
+
V.style.setProperty(H.property, H.newValue);
|
|
2327
2421
|
},
|
|
2328
|
-
[e, t, n,
|
|
2422
|
+
[e, t, n, w, f]
|
|
2329
2423
|
);
|
|
2330
|
-
|
|
2424
|
+
_(() => {
|
|
2331
2425
|
if (!e) {
|
|
2332
|
-
r.current = [], o.current = /* @__PURE__ */ new Set(), i.current = [], s.current = [], l.current = [],
|
|
2426
|
+
r.current = [], o.current = /* @__PURE__ */ new Set(), i.current = [], s.current = [], l.current = [], g({}), c({}), h("none"), k(""), x(""), A(/* @__PURE__ */ new Map()), N(!1);
|
|
2333
2427
|
return;
|
|
2334
2428
|
}
|
|
2335
|
-
const
|
|
2336
|
-
r.current =
|
|
2337
|
-
const
|
|
2338
|
-
|
|
2339
|
-
const
|
|
2340
|
-
|
|
2341
|
-
const O =
|
|
2342
|
-
return s.current = O !== "none" ?
|
|
2343
|
-
}, [e]),
|
|
2344
|
-
e &&
|
|
2345
|
-
}, [t]),
|
|
2346
|
-
var
|
|
2429
|
+
const $ = Oe(e, t);
|
|
2430
|
+
r.current = $, o.current = new Set($), i.current = Ye($, [...Je]), l.current = [], N(!1);
|
|
2431
|
+
const I = Ne(e);
|
|
2432
|
+
g(I), c(I);
|
|
2433
|
+
const B = xe(e);
|
|
2434
|
+
h(B.kind), k(B.value), x(B.value);
|
|
2435
|
+
const O = B.kind;
|
|
2436
|
+
return s.current = O !== "none" ? $.map((Y) => je(Y, O)) : [], Xe($, n), () => $e($);
|
|
2437
|
+
}, [e]), _(() => {
|
|
2438
|
+
e && M(!0);
|
|
2439
|
+
}, [t]), _(() => {
|
|
2440
|
+
var H;
|
|
2347
2441
|
if (!e) return;
|
|
2348
|
-
const
|
|
2349
|
-
r.current =
|
|
2350
|
-
i.current.filter((
|
|
2442
|
+
const $ = Oe(e, t);
|
|
2443
|
+
r.current = $, Se(
|
|
2444
|
+
i.current.filter((V) => $.includes(V.element))
|
|
2351
2445
|
);
|
|
2352
|
-
const
|
|
2353
|
-
for (const [
|
|
2354
|
-
for (const he of
|
|
2355
|
-
const O = ((
|
|
2356
|
-
for (const
|
|
2357
|
-
if (!(
|
|
2358
|
-
for (const
|
|
2359
|
-
|
|
2360
|
-
const
|
|
2361
|
-
if (
|
|
2362
|
-
const
|
|
2363
|
-
for (const
|
|
2364
|
-
|
|
2365
|
-
|
|
2446
|
+
const I = Ne(e), B = n === "normal" ? {} : fn(e, n);
|
|
2447
|
+
for (const [V, te] of Object.entries(B))
|
|
2448
|
+
for (const he of $) he.style.setProperty(V, te);
|
|
2449
|
+
const O = ((H = w.get(e)) == null ? void 0 : H.get(n)) ?? [];
|
|
2450
|
+
for (const V of O)
|
|
2451
|
+
if (!(V.property === "textContent" || V.property === "value"))
|
|
2452
|
+
for (const te of $)
|
|
2453
|
+
te.style.setProperty(V.property, V.newValue);
|
|
2454
|
+
const Y = p.current, X = Y !== null && Y.element === e && Y.state !== n, ee = Y !== null && Y.element !== e && n !== "normal";
|
|
2455
|
+
if (X || ee) {
|
|
2456
|
+
const V = { ...I, ...B };
|
|
2457
|
+
for (const te of O)
|
|
2458
|
+
te.property === "textContent" || te.property === "value" || (V[te.property] = te.newValue);
|
|
2459
|
+
g(V);
|
|
2366
2460
|
}
|
|
2367
|
-
p.current = { element: e, state: n },
|
|
2461
|
+
p.current = { element: e, state: n }, $e(Array.from(o.current)), Xe($, n), o.current = new Set($);
|
|
2368
2462
|
}, [n, e, t]);
|
|
2369
|
-
const
|
|
2370
|
-
(
|
|
2371
|
-
e &&
|
|
2372
|
-
const
|
|
2373
|
-
return
|
|
2463
|
+
const z = T(
|
|
2464
|
+
($, I, B) => {
|
|
2465
|
+
e && A((O) => {
|
|
2466
|
+
const Y = new Map(O), X = new Map(Y.get(e) ?? /* @__PURE__ */ new Map()), H = (X.get(n) ?? []).filter((V) => V.property !== $);
|
|
2467
|
+
return B === I ? H.length === 0 ? X.delete(n) : X.set(n, H) : X.set(n, [...H, { property: $, oldValue: I, newValue: B }]), X.size === 0 ? Y.delete(e) : Y.set(e, X), Y;
|
|
2374
2468
|
});
|
|
2375
2469
|
},
|
|
2376
2470
|
[e, n]
|
|
2377
|
-
),
|
|
2378
|
-
(
|
|
2471
|
+
), E = T(
|
|
2472
|
+
($) => {
|
|
2379
2473
|
if (!e) return;
|
|
2380
|
-
const
|
|
2381
|
-
|
|
2382
|
-
for (const [
|
|
2383
|
-
const
|
|
2384
|
-
for (const
|
|
2385
|
-
|
|
2386
|
-
|
|
2474
|
+
const I = { ...$ };
|
|
2475
|
+
I["border-width"] !== void 0 && !("border-style" in I) && (d["border-style"] ?? "none") === "none" && Kt(I["border-width"]) && (I["border-style"] = "solid"), y(), g((B) => ({ ...B, ...I }));
|
|
2476
|
+
for (const [B, O] of Object.entries(I)) {
|
|
2477
|
+
const Y = m[B] ?? "";
|
|
2478
|
+
for (const X of r.current)
|
|
2479
|
+
X.style.setProperty(B, O), o.current.add(X);
|
|
2480
|
+
z(B, Y, O);
|
|
2387
2481
|
}
|
|
2388
2482
|
},
|
|
2389
|
-
[e,
|
|
2390
|
-
),
|
|
2391
|
-
(
|
|
2392
|
-
|
|
2483
|
+
[e, m, d, y, z]
|
|
2484
|
+
), F = T(
|
|
2485
|
+
($, I) => {
|
|
2486
|
+
E({ [$]: I });
|
|
2393
2487
|
},
|
|
2394
|
-
[
|
|
2395
|
-
),
|
|
2396
|
-
(
|
|
2397
|
-
if (!(!e ||
|
|
2398
|
-
|
|
2399
|
-
for (const
|
|
2400
|
-
|
|
2401
|
-
|
|
2488
|
+
[E]
|
|
2489
|
+
), j = T(
|
|
2490
|
+
($) => {
|
|
2491
|
+
if (!(!e || f === "none")) {
|
|
2492
|
+
y(), k($);
|
|
2493
|
+
for (const I of r.current)
|
|
2494
|
+
ut(I, f, $), o.current.add(I);
|
|
2495
|
+
z(f, D, $);
|
|
2402
2496
|
}
|
|
2403
2497
|
},
|
|
2404
|
-
[e,
|
|
2405
|
-
),
|
|
2406
|
-
const
|
|
2407
|
-
if (
|
|
2408
|
-
Se(
|
|
2409
|
-
for (const
|
|
2410
|
-
if (
|
|
2411
|
-
|
|
2412
|
-
const
|
|
2413
|
-
|
|
2498
|
+
[e, f, D, y, z]
|
|
2499
|
+
), K = T(() => {
|
|
2500
|
+
const $ = l.current.pop();
|
|
2501
|
+
if ($) {
|
|
2502
|
+
Se($.inline);
|
|
2503
|
+
for (const I of $.text) Ee(I);
|
|
2504
|
+
if (N(l.current.length > 0), e) {
|
|
2505
|
+
g(Ne(e));
|
|
2506
|
+
const I = xe(e);
|
|
2507
|
+
I.kind !== "none" && k(I.value);
|
|
2414
2508
|
}
|
|
2415
2509
|
}
|
|
2416
|
-
}, [e]),
|
|
2510
|
+
}, [e]), q = T(() => {
|
|
2417
2511
|
Se(i.current);
|
|
2418
|
-
for (const
|
|
2419
|
-
if (l.current = [],
|
|
2420
|
-
|
|
2421
|
-
const
|
|
2422
|
-
k(
|
|
2512
|
+
for (const $ of s.current) Ee($);
|
|
2513
|
+
if (l.current = [], N(!1), A(/* @__PURE__ */ new Map()), e) {
|
|
2514
|
+
g(Ne(e));
|
|
2515
|
+
const $ = xe(e);
|
|
2516
|
+
k($.value);
|
|
2423
2517
|
}
|
|
2424
|
-
}, [e]),
|
|
2518
|
+
}, [e]), J = T(() => {
|
|
2425
2519
|
Se(i.current);
|
|
2426
|
-
for (const
|
|
2427
|
-
}, []), le =
|
|
2428
|
-
if (
|
|
2429
|
-
|
|
2430
|
-
const
|
|
2431
|
-
|
|
2520
|
+
for (const $ of s.current) Ee($);
|
|
2521
|
+
}, []), le = T(() => {
|
|
2522
|
+
if (J(), $e(Array.from(o.current)), l.current = [], N(!1), A(/* @__PURE__ */ new Map()), e) {
|
|
2523
|
+
g(Ne(e));
|
|
2524
|
+
const $ = xe(e);
|
|
2525
|
+
$.kind !== "none" && k($.value);
|
|
2432
2526
|
}
|
|
2433
|
-
}, [
|
|
2434
|
-
let
|
|
2435
|
-
for (const
|
|
2436
|
-
for (const
|
|
2437
|
-
const ce =
|
|
2438
|
-
|
|
2527
|
+
}, [J, e]), b = e ? ((ge = w.get(e)) == null ? void 0 : ge.get(n)) ?? [] : [];
|
|
2528
|
+
let Q = 0;
|
|
2529
|
+
for (const $ of w.values())
|
|
2530
|
+
for (const I of $.values()) Q += I.length;
|
|
2531
|
+
const ce = T(() => {
|
|
2532
|
+
A(/* @__PURE__ */ new Map());
|
|
2439
2533
|
}, []);
|
|
2440
2534
|
return {
|
|
2441
|
-
values:
|
|
2442
|
-
textKind:
|
|
2443
|
-
textValue:
|
|
2535
|
+
values: d,
|
|
2536
|
+
textKind: f,
|
|
2537
|
+
textValue: C,
|
|
2444
2538
|
pendingChanges: b,
|
|
2445
|
-
pendingByElement:
|
|
2446
|
-
totalPendingCount:
|
|
2539
|
+
pendingByElement: w,
|
|
2540
|
+
totalPendingCount: Q,
|
|
2447
2541
|
clearAllPending: ce,
|
|
2448
|
-
canUndo:
|
|
2449
|
-
updateProperty:
|
|
2450
|
-
updateProperties:
|
|
2451
|
-
updateText:
|
|
2452
|
-
undo:
|
|
2453
|
-
reset:
|
|
2542
|
+
canUndo: v,
|
|
2543
|
+
updateProperty: F,
|
|
2544
|
+
updateProperties: E,
|
|
2545
|
+
updateText: j,
|
|
2546
|
+
undo: K,
|
|
2547
|
+
reset: q,
|
|
2454
2548
|
clearPreviews: le,
|
|
2455
|
-
revertPreviews:
|
|
2549
|
+
revertPreviews: J
|
|
2456
2550
|
};
|
|
2457
2551
|
}
|
|
2458
2552
|
function ja({
|
|
@@ -2465,83 +2559,83 @@ function ja({
|
|
|
2465
2559
|
elementState: s,
|
|
2466
2560
|
onElementStateChange: l,
|
|
2467
2561
|
onApply: p,
|
|
2468
|
-
applyStatus:
|
|
2469
|
-
isToolbarTarget:
|
|
2470
|
-
onPreviewApi:
|
|
2562
|
+
applyStatus: d,
|
|
2563
|
+
isToolbarTarget: g,
|
|
2564
|
+
onPreviewApi: m
|
|
2471
2565
|
}) {
|
|
2472
2566
|
const {
|
|
2473
2567
|
values: c,
|
|
2474
|
-
textKind:
|
|
2475
|
-
textValue:
|
|
2476
|
-
pendingChanges:
|
|
2568
|
+
textKind: f,
|
|
2569
|
+
textValue: h,
|
|
2570
|
+
pendingChanges: C,
|
|
2477
2571
|
pendingByElement: k,
|
|
2478
|
-
totalPendingCount:
|
|
2479
|
-
clearAllPending:
|
|
2480
|
-
canUndo:
|
|
2481
|
-
updateProperty:
|
|
2482
|
-
updateProperties:
|
|
2483
|
-
updateText:
|
|
2484
|
-
undo:
|
|
2485
|
-
reset:
|
|
2486
|
-
clearPreviews:
|
|
2487
|
-
revertPreviews:
|
|
2488
|
-
} = Ua(e, o, s), { elementRef:
|
|
2572
|
+
totalPendingCount: D,
|
|
2573
|
+
clearAllPending: x,
|
|
2574
|
+
canUndo: w,
|
|
2575
|
+
updateProperty: A,
|
|
2576
|
+
updateProperties: v,
|
|
2577
|
+
updateText: N,
|
|
2578
|
+
undo: P,
|
|
2579
|
+
reset: y,
|
|
2580
|
+
clearPreviews: M,
|
|
2581
|
+
revertPreviews: z
|
|
2582
|
+
} = Ua(e, o, s), { elementRef: E, isDragging: F, style: j, dragHandleProps: K } = it({
|
|
2489
2583
|
computeDefaultPosition: (O) => ({
|
|
2490
2584
|
x: window.innerWidth - O.width - 16,
|
|
2491
2585
|
y: 16
|
|
2492
2586
|
})
|
|
2493
2587
|
});
|
|
2494
|
-
|
|
2495
|
-
const
|
|
2588
|
+
_(() => (m == null || m({ clearPreviews: M, revertPreviews: z }), () => m == null ? void 0 : m(null)), [m, M, z]);
|
|
2589
|
+
const q = T(
|
|
2496
2590
|
(O) => {
|
|
2497
|
-
if (
|
|
2498
|
-
const
|
|
2499
|
-
(
|
|
2591
|
+
if (g(O.target)) return;
|
|
2592
|
+
const X = document.elementsFromPoint(O.clientX, O.clientY).find(
|
|
2593
|
+
(ee) => ee instanceof Element && !ee.closest(
|
|
2500
2594
|
"[data-pixelagent-root],[data-pixelagent-toolbar-portal],[data-pixelagent-picker-portal]"
|
|
2501
2595
|
)
|
|
2502
2596
|
);
|
|
2503
|
-
r(
|
|
2597
|
+
r(X ?? null);
|
|
2504
2598
|
},
|
|
2505
|
-
[
|
|
2506
|
-
),
|
|
2599
|
+
[g, r]
|
|
2600
|
+
), J = T(
|
|
2507
2601
|
(O) => {
|
|
2508
|
-
if (
|
|
2602
|
+
if (g(O.target)) return;
|
|
2509
2603
|
O.preventDefault(), O.stopPropagation();
|
|
2510
|
-
const
|
|
2511
|
-
(
|
|
2604
|
+
const X = document.elementsFromPoint(O.clientX, O.clientY).find(
|
|
2605
|
+
(ee) => ee instanceof Element && !ee.closest(
|
|
2512
2606
|
"[data-pixelagent-root],[data-pixelagent-toolbar-portal],[data-pixelagent-picker-portal]"
|
|
2513
2607
|
)
|
|
2514
2608
|
);
|
|
2515
|
-
n(
|
|
2609
|
+
n(X ?? null);
|
|
2516
2610
|
},
|
|
2517
|
-
[
|
|
2611
|
+
[g, n]
|
|
2518
2612
|
);
|
|
2519
|
-
|
|
2520
|
-
document.removeEventListener("mousemove",
|
|
2521
|
-
}), [
|
|
2613
|
+
_(() => (document.addEventListener("mousemove", q, !0), document.addEventListener("click", J, !0), () => {
|
|
2614
|
+
document.removeEventListener("mousemove", q, !0), document.removeEventListener("click", J, !0);
|
|
2615
|
+
}), [q, J]);
|
|
2522
2616
|
const le = async () => {
|
|
2523
|
-
if (
|
|
2617
|
+
if (D === 0) return;
|
|
2524
2618
|
const O = await p(k);
|
|
2525
|
-
O.applied && (
|
|
2526
|
-
}, b = e ?
|
|
2527
|
-
return /* @__PURE__ */
|
|
2619
|
+
O.applied && (x(), O.skipRevert || z());
|
|
2620
|
+
}, b = e ? ot(e) : null, Q = e ? Ft(e) : null, ce = e ? Bt(e) : 0, ge = e ? _t(e, "all-instances") : "", $ = s !== "normal" && Q === "tailwind" ? "Tailwind variant preview: matching hover:/focus:/… classes are applied without the prefix." : s !== "normal" ? "State preview uses focus/disabled simulation where possible." : null, I = ce > 1 ? o === "all-instances" ? `Preview & Apply on ${ce} elements (${ge}).` : `This instance only — ${ce - 1} other on page.` : o === "all-instances" ? "Only one match — scope has no effect." : null, B = se(() => !e || o !== "all-instances" ? [] : Oe(e, "all-instances"), [e, o]);
|
|
2621
|
+
return /* @__PURE__ */ u(Z, { children: [
|
|
2528
2622
|
/* @__PURE__ */ a(
|
|
2529
|
-
|
|
2623
|
+
jt,
|
|
2530
2624
|
{
|
|
2531
2625
|
element: o === "all-instances" ? null : t,
|
|
2532
2626
|
selected: e,
|
|
2533
|
-
multiSelected:
|
|
2627
|
+
multiSelected: B,
|
|
2534
2628
|
primarySelected: e
|
|
2535
2629
|
}
|
|
2536
2630
|
),
|
|
2537
2631
|
/* @__PURE__ */ a(
|
|
2538
2632
|
"div",
|
|
2539
2633
|
{
|
|
2540
|
-
ref:
|
|
2541
|
-
className: `pa-edit-panel-float ${
|
|
2542
|
-
style:
|
|
2543
|
-
children: /* @__PURE__ */ a(_e, { variant: "sheet", side: "right", className: "pa-edit-panel-glass", children: /* @__PURE__ */
|
|
2544
|
-
/* @__PURE__ */
|
|
2634
|
+
ref: E,
|
|
2635
|
+
className: `pa-edit-panel-float ${F ? "pa-edit-panel-float--dragging" : ""}`,
|
|
2636
|
+
style: j,
|
|
2637
|
+
children: /* @__PURE__ */ a(_e, { variant: "sheet", side: "right", className: "pa-edit-panel-glass", children: /* @__PURE__ */ u("div", { className: "pa-edit-panel-inner", children: [
|
|
2638
|
+
/* @__PURE__ */ u("div", { className: "pa-edit-panel-header", children: [
|
|
2545
2639
|
/* @__PURE__ */ a(
|
|
2546
2640
|
"button",
|
|
2547
2641
|
{
|
|
@@ -2549,8 +2643,8 @@ function ja({
|
|
|
2549
2643
|
className: "pa-edit-panel-drag",
|
|
2550
2644
|
"aria-label": "Drag edit panel",
|
|
2551
2645
|
title: "Drag to move",
|
|
2552
|
-
...
|
|
2553
|
-
children: /* @__PURE__ */
|
|
2646
|
+
...K,
|
|
2647
|
+
children: /* @__PURE__ */ u("span", { className: "pa-edit-panel-grip", "aria-hidden": "true", children: [
|
|
2554
2648
|
/* @__PURE__ */ a("span", {}),
|
|
2555
2649
|
/* @__PURE__ */ a("span", {}),
|
|
2556
2650
|
/* @__PURE__ */ a("span", {}),
|
|
@@ -2562,78 +2656,78 @@ function ja({
|
|
|
2562
2656
|
),
|
|
2563
2657
|
/* @__PURE__ */ a("h3", { className: "pa-edit-title", children: "Edit" })
|
|
2564
2658
|
] }),
|
|
2565
|
-
e ? /* @__PURE__ */
|
|
2566
|
-
/* @__PURE__ */
|
|
2659
|
+
e ? /* @__PURE__ */ u(Z, { children: [
|
|
2660
|
+
/* @__PURE__ */ u("div", { className: "pa-edit-meta", children: [
|
|
2567
2661
|
/* @__PURE__ */ a(
|
|
2568
2662
|
"code",
|
|
2569
2663
|
{
|
|
2570
2664
|
className: "pa-edit-meta-label",
|
|
2571
|
-
title: `This instance: ${
|
|
2665
|
+
title: `This instance: ${rt(e)}
|
|
2572
2666
|
All instances: ${ge}`,
|
|
2573
|
-
children:
|
|
2667
|
+
children: at(e)
|
|
2574
2668
|
}
|
|
2575
2669
|
),
|
|
2576
|
-
((b == null ? void 0 : b.sourceFile) ||
|
|
2577
|
-
(b == null ? void 0 : b.sourceFile) && /* @__PURE__ */
|
|
2670
|
+
((b == null ? void 0 : b.sourceFile) || Q) && /* @__PURE__ */ u("span", { className: "pa-edit-source", children: [
|
|
2671
|
+
(b == null ? void 0 : b.sourceFile) && /* @__PURE__ */ u(Z, { children: [
|
|
2578
2672
|
b.sourceFile,
|
|
2579
2673
|
b.lineNumber ? `:${b.lineNumber}` : ""
|
|
2580
2674
|
] }),
|
|
2581
|
-
b != null && b.sourceFile &&
|
|
2582
|
-
|
|
2675
|
+
b != null && b.sourceFile && Q ? " · " : "",
|
|
2676
|
+
Q ?? ""
|
|
2583
2677
|
] })
|
|
2584
2678
|
] }),
|
|
2585
2679
|
/* @__PURE__ */ a("div", { className: "pa-edit-panel-scroll", children: /* @__PURE__ */ a(
|
|
2586
|
-
|
|
2680
|
+
Wa,
|
|
2587
2681
|
{
|
|
2588
2682
|
selectedElement: e,
|
|
2589
2683
|
values: c,
|
|
2590
|
-
onPropertyChange:
|
|
2591
|
-
onApplyPreset:
|
|
2592
|
-
textKind:
|
|
2593
|
-
textValue:
|
|
2594
|
-
onTextChange:
|
|
2684
|
+
onPropertyChange: A,
|
|
2685
|
+
onApplyPreset: v,
|
|
2686
|
+
textKind: f,
|
|
2687
|
+
textValue: h,
|
|
2688
|
+
onTextChange: N,
|
|
2595
2689
|
targetScope: o,
|
|
2596
2690
|
onTargetScopeChange: i,
|
|
2597
2691
|
elementState: s,
|
|
2598
2692
|
onElementStateChange: l,
|
|
2599
2693
|
instanceCount: ce,
|
|
2600
|
-
scopeHint:
|
|
2601
|
-
stateHint:
|
|
2694
|
+
scopeHint: I,
|
|
2695
|
+
stateHint: $
|
|
2602
2696
|
}
|
|
2603
2697
|
) }),
|
|
2604
|
-
/* @__PURE__ */
|
|
2605
|
-
/* @__PURE__ */
|
|
2606
|
-
/* @__PURE__ */ a(
|
|
2607
|
-
/* @__PURE__ */ a(
|
|
2698
|
+
/* @__PURE__ */ u("div", { className: "pa-edit-panel-sticky", children: [
|
|
2699
|
+
/* @__PURE__ */ u("div", { className: "pa-edit-actions", children: [
|
|
2700
|
+
/* @__PURE__ */ a(G, { variant: "regular", onClick: P, disabled: !w, children: /* @__PURE__ */ u("span", { className: "pa-glass-btn-inner", children: [
|
|
2701
|
+
/* @__PURE__ */ a($n, { className: "pa-glass-btn-icon" }),
|
|
2608
2702
|
/* @__PURE__ */ a("span", { children: "Undo" })
|
|
2609
2703
|
] }) }),
|
|
2610
2704
|
/* @__PURE__ */ a(
|
|
2611
|
-
|
|
2705
|
+
G,
|
|
2612
2706
|
{
|
|
2613
2707
|
variant: "regular",
|
|
2614
|
-
onClick:
|
|
2615
|
-
disabled:
|
|
2616
|
-
children: /* @__PURE__ */
|
|
2708
|
+
onClick: y,
|
|
2709
|
+
disabled: C.length === 0,
|
|
2710
|
+
children: /* @__PURE__ */ u("span", { className: "pa-glass-btn-inner", children: [
|
|
2617
2711
|
/* @__PURE__ */ a(Pn, { className: "pa-glass-btn-icon" }),
|
|
2618
2712
|
/* @__PURE__ */ a("span", { children: "Reset" })
|
|
2619
2713
|
] })
|
|
2620
2714
|
}
|
|
2621
2715
|
)
|
|
2622
2716
|
] }),
|
|
2623
|
-
/* @__PURE__ */
|
|
2717
|
+
/* @__PURE__ */ u("div", { className: "pa-edit-footer", children: [
|
|
2624
2718
|
/* @__PURE__ */ a(
|
|
2625
2719
|
"span",
|
|
2626
2720
|
{
|
|
2627
|
-
className:
|
|
2628
|
-
children:
|
|
2721
|
+
className: d ? /fail/i.test(d) ? "pa-change-count pa-change-count--error" : "pa-change-count pa-change-count--success" : "pa-change-count",
|
|
2722
|
+
children: d ?? `${D} pending change${D !== 1 ? "s" : ""}`
|
|
2629
2723
|
}
|
|
2630
2724
|
),
|
|
2631
2725
|
/* @__PURE__ */ a(
|
|
2632
|
-
|
|
2726
|
+
G,
|
|
2633
2727
|
{
|
|
2634
2728
|
variant: "glass-primary",
|
|
2635
2729
|
onClick: le,
|
|
2636
|
-
disabled:
|
|
2730
|
+
disabled: D === 0,
|
|
2637
2731
|
title: b != null && b.sourceFile ? void 0 : "No source file — Apply copies selector + changes to clipboard",
|
|
2638
2732
|
children: "Apply"
|
|
2639
2733
|
}
|
|
@@ -2666,11 +2760,11 @@ async function Ya(e, t = {}) {
|
|
|
2666
2760
|
} catch (r) {
|
|
2667
2761
|
return { mode: "error", message: r instanceof Error ? r.message : String(r) };
|
|
2668
2762
|
}
|
|
2669
|
-
return await
|
|
2763
|
+
return await Ht(JSON.stringify(e, null, 2)), { mode: "clipboard" };
|
|
2670
2764
|
}
|
|
2671
2765
|
function Xa(e) {
|
|
2672
2766
|
const [t, n] = S(null);
|
|
2673
|
-
return
|
|
2767
|
+
return _(() => {
|
|
2674
2768
|
if (!e) {
|
|
2675
2769
|
n(null);
|
|
2676
2770
|
return;
|
|
@@ -2683,7 +2777,7 @@ function Xa(e) {
|
|
|
2683
2777
|
};
|
|
2684
2778
|
}, [e]), t;
|
|
2685
2779
|
}
|
|
2686
|
-
const ue = 8,
|
|
2780
|
+
const ue = 8, re = 8, Ga = 12, Ka = 300, qa = 280;
|
|
2687
2781
|
function Ze(e, t, n, r) {
|
|
2688
2782
|
return {
|
|
2689
2783
|
top: e,
|
|
@@ -2694,7 +2788,7 @@ function Ze(e, t, n, r) {
|
|
|
2694
2788
|
height: r
|
|
2695
2789
|
};
|
|
2696
2790
|
}
|
|
2697
|
-
function
|
|
2791
|
+
function tt(e, t) {
|
|
2698
2792
|
return e.left < t.right && e.right > t.left && e.top < t.bottom && e.bottom > t.top;
|
|
2699
2793
|
}
|
|
2700
2794
|
function Ja(e, t) {
|
|
@@ -2720,7 +2814,7 @@ function Qe(e, t) {
|
|
|
2720
2814
|
window.innerWidth - t - ue
|
|
2721
2815
|
);
|
|
2722
2816
|
}
|
|
2723
|
-
function
|
|
2817
|
+
function Ie(e, t) {
|
|
2724
2818
|
return Math.min(
|
|
2725
2819
|
Math.max(ue, e),
|
|
2726
2820
|
window.innerHeight - t - ue
|
|
@@ -2730,35 +2824,35 @@ function Qa(e) {
|
|
|
2730
2824
|
return e.top >= ue && e.left >= ue && e.right <= window.innerWidth - ue && e.bottom <= window.innerHeight - ue;
|
|
2731
2825
|
}
|
|
2732
2826
|
function er(e, t) {
|
|
2733
|
-
return t &&
|
|
2827
|
+
return t && tt(e, t) ? !1 : Qa(e);
|
|
2734
2828
|
}
|
|
2735
2829
|
function tr(e, t = Ka, n = qa) {
|
|
2736
2830
|
const r = Za(), i = e.top > window.innerHeight * 0.45 ? [
|
|
2737
|
-
{ placement: "above", top: e.top - n -
|
|
2738
|
-
{ placement: "below", top: e.bottom +
|
|
2739
|
-
{ placement: "right", top: e.top, left: e.right +
|
|
2740
|
-
{ placement: "left", top: e.top, left: e.left - t -
|
|
2831
|
+
{ placement: "above", top: e.top - n - re, left: e.left },
|
|
2832
|
+
{ placement: "below", top: e.bottom + re, left: e.left },
|
|
2833
|
+
{ placement: "right", top: e.top, left: e.right + re },
|
|
2834
|
+
{ placement: "left", top: e.top, left: e.left - t - re }
|
|
2741
2835
|
] : [
|
|
2742
|
-
{ placement: "below", top: e.bottom +
|
|
2743
|
-
{ placement: "above", top: e.top - n -
|
|
2744
|
-
{ placement: "right", top: e.top, left: e.right +
|
|
2745
|
-
{ placement: "left", top: e.top, left: e.left - t -
|
|
2836
|
+
{ placement: "below", top: e.bottom + re, left: e.left },
|
|
2837
|
+
{ placement: "above", top: e.top - n - re, left: e.left },
|
|
2838
|
+
{ placement: "right", top: e.top, left: e.right + re },
|
|
2839
|
+
{ placement: "left", top: e.top, left: e.left - t - re }
|
|
2746
2840
|
];
|
|
2747
|
-
for (const { top: p, left:
|
|
2748
|
-
const
|
|
2749
|
-
|
|
2750
|
-
Qe(
|
|
2841
|
+
for (const { top: p, left: d } of i) {
|
|
2842
|
+
const g = Ze(
|
|
2843
|
+
Ie(p, n),
|
|
2844
|
+
Qe(d, t),
|
|
2751
2845
|
t,
|
|
2752
2846
|
n
|
|
2753
2847
|
);
|
|
2754
|
-
if (er(
|
|
2755
|
-
return { top:
|
|
2848
|
+
if (er(g, r))
|
|
2849
|
+
return { top: g.top, left: g.left };
|
|
2756
2850
|
}
|
|
2757
|
-
let s =
|
|
2851
|
+
let s = Ie(e.top - n - re, n), l = Qe(e.left, t);
|
|
2758
2852
|
if (r) {
|
|
2759
2853
|
let p = Ze(s, l, t, n);
|
|
2760
|
-
|
|
2761
|
-
Math.min(e.left, r.left - t -
|
|
2854
|
+
tt(p, r) && (s = Ie(r.top - n - re, n), p = Ze(s, l, t, n)), tt(p, r) && (s = Ie(e.bottom + re, n), l = Qe(
|
|
2855
|
+
Math.min(e.left, r.left - t - re),
|
|
2762
2856
|
t
|
|
2763
2857
|
));
|
|
2764
2858
|
}
|
|
@@ -2770,25 +2864,25 @@ function nr({
|
|
|
2770
2864
|
onSubmit: n,
|
|
2771
2865
|
onCancel: r
|
|
2772
2866
|
}) {
|
|
2773
|
-
const [o, i] = S(""), s =
|
|
2774
|
-
if (
|
|
2775
|
-
var
|
|
2776
|
-
(
|
|
2777
|
-
}, [e]),
|
|
2778
|
-
const
|
|
2779
|
-
|
|
2867
|
+
const [o, i] = S(""), s = W(null), l = W(null), p = e[0] ?? null, d = t ? new DOMRect(t.x, t.y, t.width, t.height) : null, g = Xa(p), m = d ?? g, c = Wt(), f = p ? xe(p) : { kind: "none", value: "" }, h = f.kind !== "none" ? f.value : void 0;
|
|
2868
|
+
if (_(() => {
|
|
2869
|
+
var x;
|
|
2870
|
+
(x = s.current) == null || x.focus();
|
|
2871
|
+
}, [e]), _(() => {
|
|
2872
|
+
const x = (w) => {
|
|
2873
|
+
w.key === "Escape" && r();
|
|
2780
2874
|
};
|
|
2781
|
-
return document.addEventListener("keydown",
|
|
2782
|
-
}, [r]), !
|
|
2783
|
-
const
|
|
2784
|
-
o.trim() && n(o,
|
|
2875
|
+
return document.addEventListener("keydown", x), () => document.removeEventListener("keydown", x);
|
|
2876
|
+
}, [r]), !m) return null;
|
|
2877
|
+
const C = tr(m), k = e.length > 1 ? `${e.length} selected` : p ? at(p) : "Area selection", D = (x) => {
|
|
2878
|
+
o.trim() && n(o, x);
|
|
2785
2879
|
};
|
|
2786
2880
|
return /* @__PURE__ */ a(
|
|
2787
2881
|
_e,
|
|
2788
2882
|
{
|
|
2789
2883
|
variant: "popover",
|
|
2790
|
-
style: { top:
|
|
2791
|
-
children: /* @__PURE__ */
|
|
2884
|
+
style: { top: C.top, left: C.left },
|
|
2885
|
+
children: /* @__PURE__ */ u(
|
|
2792
2886
|
"div",
|
|
2793
2887
|
{
|
|
2794
2888
|
ref: l,
|
|
@@ -2798,17 +2892,17 @@ function nr({
|
|
|
2798
2892
|
className: "pa-popover-body",
|
|
2799
2893
|
children: [
|
|
2800
2894
|
/* @__PURE__ */ a("div", { className: "pa-popover-header", children: /* @__PURE__ */ a("span", { className: "pa-popover-selector", children: k }) }),
|
|
2801
|
-
(c ||
|
|
2802
|
-
c && /* @__PURE__ */
|
|
2895
|
+
(c || h) && /* @__PURE__ */ u("div", { className: "pa-popover-context", children: [
|
|
2896
|
+
c && /* @__PURE__ */ u("p", { className: "pa-popover-context-line", children: [
|
|
2803
2897
|
/* @__PURE__ */ a("span", { className: "pa-popover-context-label", children: "Selected" }),
|
|
2804
2898
|
c
|
|
2805
2899
|
] }),
|
|
2806
|
-
|
|
2900
|
+
h && h !== c && /* @__PURE__ */ u("p", { className: "pa-popover-context-line", children: [
|
|
2807
2901
|
/* @__PURE__ */ a("span", { className: "pa-popover-context-label", children: "Element" }),
|
|
2808
|
-
|
|
2902
|
+
h
|
|
2809
2903
|
] })
|
|
2810
2904
|
] }),
|
|
2811
|
-
/* @__PURE__ */
|
|
2905
|
+
/* @__PURE__ */ u("label", { className: "pa-label", children: [
|
|
2812
2906
|
"Note",
|
|
2813
2907
|
/* @__PURE__ */ a(
|
|
2814
2908
|
"textarea",
|
|
@@ -2816,32 +2910,32 @@ function nr({
|
|
|
2816
2910
|
ref: s,
|
|
2817
2911
|
className: "pa-textarea",
|
|
2818
2912
|
value: o,
|
|
2819
|
-
onChange: (
|
|
2913
|
+
onChange: (x) => i(x.target.value),
|
|
2820
2914
|
placeholder: "Describe the change...",
|
|
2821
2915
|
rows: 3,
|
|
2822
|
-
onKeyDown: (
|
|
2823
|
-
|
|
2916
|
+
onKeyDown: (x) => {
|
|
2917
|
+
x.key === "Enter" && (x.metaKey || x.ctrlKey) && (x.preventDefault(), D(x.shiftKey)), x.key === "Escape" && r();
|
|
2824
2918
|
}
|
|
2825
2919
|
}
|
|
2826
2920
|
)
|
|
2827
2921
|
] }),
|
|
2828
2922
|
/* @__PURE__ */ a("p", { className: "pa-popover-hint", children: "⌘↵ Add · ⇧⌘↵ Add & next · Esc Cancel" }),
|
|
2829
|
-
/* @__PURE__ */
|
|
2830
|
-
/* @__PURE__ */ a(
|
|
2923
|
+
/* @__PURE__ */ u("div", { className: "pa-popover-actions", children: [
|
|
2924
|
+
/* @__PURE__ */ a(G, { variant: "ghost", onClick: r, children: "Cancel" }),
|
|
2831
2925
|
/* @__PURE__ */ a(
|
|
2832
|
-
|
|
2926
|
+
G,
|
|
2833
2927
|
{
|
|
2834
2928
|
variant: "ghost",
|
|
2835
|
-
onClick: () =>
|
|
2929
|
+
onClick: () => D(!0),
|
|
2836
2930
|
disabled: !o.trim(),
|
|
2837
2931
|
children: "Add & next"
|
|
2838
2932
|
}
|
|
2839
2933
|
),
|
|
2840
2934
|
/* @__PURE__ */ a(
|
|
2841
|
-
|
|
2935
|
+
G,
|
|
2842
2936
|
{
|
|
2843
2937
|
variant: "glass-primary",
|
|
2844
|
-
onClick: () =>
|
|
2938
|
+
onClick: () => D(!1),
|
|
2845
2939
|
disabled: !o.trim(),
|
|
2846
2940
|
children: "Add"
|
|
2847
2941
|
}
|
|
@@ -2887,11 +2981,11 @@ function rr(e) {
|
|
|
2887
2981
|
};
|
|
2888
2982
|
if (!o)
|
|
2889
2983
|
throw new Error("buildAnnotationEntry requires at least one element or areaBbox");
|
|
2890
|
-
const i = o.getBoundingClientRect(), s =
|
|
2984
|
+
const i = o.getBoundingClientRect(), s = ot(o), l = Wt(), p = xe(o), d = p.kind !== "none" ? p.value : void 0, g = t.map((m) => rt(m));
|
|
2891
2985
|
return {
|
|
2892
2986
|
id: crypto.randomUUID(),
|
|
2893
|
-
selector:
|
|
2894
|
-
selectors:
|
|
2987
|
+
selector: g[0],
|
|
2988
|
+
selectors: g.length > 1 ? g : void 0,
|
|
2895
2989
|
note: n.trim(),
|
|
2896
2990
|
position: { x: Math.round(i.x), y: Math.round(i.y) },
|
|
2897
2991
|
bbox: {
|
|
@@ -2903,7 +2997,7 @@ function rr(e) {
|
|
|
2903
2997
|
areaBbox: r,
|
|
2904
2998
|
domPath: hn(o),
|
|
2905
2999
|
selectedText: l,
|
|
2906
|
-
elementText:
|
|
3000
|
+
elementText: d,
|
|
2907
3001
|
sourceFile: s.sourceFile,
|
|
2908
3002
|
lineNumber: s.lineNumber,
|
|
2909
3003
|
componentName: gn(o) ?? s.componentName,
|
|
@@ -2911,7 +3005,7 @@ function rr(e) {
|
|
|
2911
3005
|
};
|
|
2912
3006
|
}
|
|
2913
3007
|
function or(e) {
|
|
2914
|
-
const t =
|
|
3008
|
+
const t = Vt(e);
|
|
2915
3009
|
if (t) return t.getBoundingClientRect();
|
|
2916
3010
|
if (e.bbox) {
|
|
2917
3011
|
const { x: n, y: r, width: o, height: i } = e.bbox;
|
|
@@ -2937,50 +3031,50 @@ function cr({
|
|
|
2937
3031
|
onActiveChange: n
|
|
2938
3032
|
}) {
|
|
2939
3033
|
const [r, o] = S([]);
|
|
2940
|
-
if (
|
|
3034
|
+
if (_(() => {
|
|
2941
3035
|
if (e.length === 0) {
|
|
2942
3036
|
o([]);
|
|
2943
3037
|
return;
|
|
2944
3038
|
}
|
|
2945
3039
|
const l = () => {
|
|
2946
|
-
const
|
|
2947
|
-
e.forEach((c,
|
|
2948
|
-
const
|
|
2949
|
-
if (!
|
|
2950
|
-
const
|
|
2951
|
-
|
|
3040
|
+
const g = [], m = /* @__PURE__ */ new Map();
|
|
3041
|
+
e.forEach((c, f) => {
|
|
3042
|
+
const h = or(c);
|
|
3043
|
+
if (!h) return;
|
|
3044
|
+
const C = ir(h), k = m.get(C) ?? 0;
|
|
3045
|
+
m.set(C, k + 1), g.push({
|
|
2952
3046
|
id: c.id,
|
|
2953
|
-
index:
|
|
2954
|
-
top:
|
|
2955
|
-
left:
|
|
3047
|
+
index: f + 1,
|
|
3048
|
+
top: h.top + 6 - k * sr,
|
|
3049
|
+
left: h.right - 6,
|
|
2956
3050
|
note: c.note,
|
|
2957
|
-
target:
|
|
3051
|
+
target: Ut(c).target,
|
|
2958
3052
|
rect: {
|
|
2959
|
-
top:
|
|
2960
|
-
left:
|
|
2961
|
-
width:
|
|
2962
|
-
height:
|
|
3053
|
+
top: h.top,
|
|
3054
|
+
left: h.left,
|
|
3055
|
+
width: h.width,
|
|
3056
|
+
height: h.height
|
|
2963
3057
|
}
|
|
2964
3058
|
});
|
|
2965
|
-
}), o(
|
|
3059
|
+
}), o(g);
|
|
2966
3060
|
};
|
|
2967
3061
|
l();
|
|
2968
3062
|
const p = /* @__PURE__ */ new Set();
|
|
2969
|
-
for (const
|
|
2970
|
-
const
|
|
2971
|
-
|
|
3063
|
+
for (const g of e) {
|
|
3064
|
+
const m = Vt(g);
|
|
3065
|
+
m && p.add(m);
|
|
2972
3066
|
}
|
|
2973
|
-
const
|
|
2974
|
-
const
|
|
2975
|
-
return
|
|
3067
|
+
const d = Array.from(p).map((g) => {
|
|
3068
|
+
const m = new ResizeObserver(l);
|
|
3069
|
+
return m.observe(g), m;
|
|
2976
3070
|
});
|
|
2977
3071
|
return window.addEventListener("scroll", l, !0), window.addEventListener("resize", l), () => {
|
|
2978
|
-
for (const
|
|
3072
|
+
for (const g of d) g.disconnect();
|
|
2979
3073
|
window.removeEventListener("scroll", l, !0), window.removeEventListener("resize", l);
|
|
2980
3074
|
};
|
|
2981
3075
|
}, [e]), r.length === 0) return null;
|
|
2982
3076
|
const i = t ? r.find((l) => l.id === t) ?? null : null, s = i ? i.rect.top < lr : !1;
|
|
2983
|
-
return /* @__PURE__ */
|
|
3077
|
+
return /* @__PURE__ */ u(Z, { children: [
|
|
2984
3078
|
i && /* @__PURE__ */ a(
|
|
2985
3079
|
"div",
|
|
2986
3080
|
{
|
|
@@ -3008,7 +3102,7 @@ function cr({
|
|
|
3008
3102
|
},
|
|
3009
3103
|
l.id
|
|
3010
3104
|
)),
|
|
3011
|
-
i && /* @__PURE__ */
|
|
3105
|
+
i && /* @__PURE__ */ u(
|
|
3012
3106
|
"div",
|
|
3013
3107
|
{
|
|
3014
3108
|
className: s ? "pa-annotation-preview pa-annotation-preview--below" : "pa-annotation-preview",
|
|
@@ -3025,13 +3119,13 @@ function cr({
|
|
|
3025
3119
|
)
|
|
3026
3120
|
] });
|
|
3027
3121
|
}
|
|
3028
|
-
const
|
|
3029
|
-
function
|
|
3030
|
-
return e instanceof Element ? !!e.closest(
|
|
3122
|
+
const ct = "[data-pixelagent-root],[data-pixelagent-toolbar-portal],[data-pixelagent-picker-portal]";
|
|
3123
|
+
function De(e) {
|
|
3124
|
+
return e instanceof Element ? !!e.closest(ct) : !1;
|
|
3031
3125
|
}
|
|
3032
|
-
function
|
|
3126
|
+
function $t(e, t) {
|
|
3033
3127
|
return document.elementsFromPoint(e, t).find(
|
|
3034
|
-
(r) => r instanceof Element && !r.closest(
|
|
3128
|
+
(r) => r instanceof Element && !r.closest(ct)
|
|
3035
3129
|
) ?? null;
|
|
3036
3130
|
}
|
|
3037
3131
|
function an(e) {
|
|
@@ -3050,10 +3144,10 @@ function rn({
|
|
|
3050
3144
|
"aria-live": "polite",
|
|
3051
3145
|
children: e
|
|
3052
3146
|
}
|
|
3053
|
-
) : /* @__PURE__ */ a(
|
|
3147
|
+
) : /* @__PURE__ */ a(Z, { children: n });
|
|
3054
3148
|
}
|
|
3055
3149
|
function pr() {
|
|
3056
|
-
return /* @__PURE__ */
|
|
3150
|
+
return /* @__PURE__ */ u(
|
|
3057
3151
|
"svg",
|
|
3058
3152
|
{
|
|
3059
3153
|
width: "16",
|
|
@@ -3069,7 +3163,7 @@ function pr() {
|
|
|
3069
3163
|
);
|
|
3070
3164
|
}
|
|
3071
3165
|
function dr() {
|
|
3072
|
-
return /* @__PURE__ */
|
|
3166
|
+
return /* @__PURE__ */ u("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
3073
3167
|
/* @__PURE__ */ a("circle", { cx: "8", cy: "8", r: "2.75", stroke: "currentColor", strokeWidth: "1.25" }),
|
|
3074
3168
|
/* @__PURE__ */ a(
|
|
3075
3169
|
"path",
|
|
@@ -3094,7 +3188,7 @@ function ur() {
|
|
|
3094
3188
|
) });
|
|
3095
3189
|
}
|
|
3096
3190
|
function fr() {
|
|
3097
|
-
return /* @__PURE__ */
|
|
3191
|
+
return /* @__PURE__ */ u("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
3098
3192
|
/* @__PURE__ */ a(
|
|
3099
3193
|
"path",
|
|
3100
3194
|
{
|
|
@@ -3137,35 +3231,35 @@ function gr({
|
|
|
3137
3231
|
activeId: s,
|
|
3138
3232
|
onActiveChange: l,
|
|
3139
3233
|
copyStatus: p,
|
|
3140
|
-
copiedEntryId:
|
|
3141
|
-
copyAllFrom:
|
|
3234
|
+
copiedEntryId: d,
|
|
3235
|
+
copyAllFrom: g
|
|
3142
3236
|
}) {
|
|
3143
|
-
const [
|
|
3144
|
-
computeDefaultPosition: (
|
|
3145
|
-
x: window.innerWidth -
|
|
3237
|
+
const [m, c] = S(null), [f, h] = S(""), { elementRef: C, isDragging: k, style: D, dragHandleProps: x } = it({
|
|
3238
|
+
computeDefaultPosition: (v) => ({
|
|
3239
|
+
x: window.innerWidth - v.width - 16,
|
|
3146
3240
|
y: 16
|
|
3147
3241
|
})
|
|
3148
3242
|
});
|
|
3149
|
-
|
|
3150
|
-
const
|
|
3151
|
-
|
|
3243
|
+
_(() => {
|
|
3244
|
+
const v = (N) => {
|
|
3245
|
+
N.key === "Escape" && t();
|
|
3152
3246
|
};
|
|
3153
|
-
return document.addEventListener("keydown",
|
|
3247
|
+
return document.addEventListener("keydown", v), () => document.removeEventListener("keydown", v);
|
|
3154
3248
|
}, [t]);
|
|
3155
|
-
const
|
|
3156
|
-
c(
|
|
3157
|
-
},
|
|
3158
|
-
|
|
3249
|
+
const w = (v) => {
|
|
3250
|
+
c(v.id), h(v.note);
|
|
3251
|
+
}, A = (v) => {
|
|
3252
|
+
f.trim() && (i(v, { note: f.trim() }), c(null));
|
|
3159
3253
|
};
|
|
3160
3254
|
return /* @__PURE__ */ a(
|
|
3161
3255
|
"div",
|
|
3162
3256
|
{
|
|
3163
|
-
ref:
|
|
3257
|
+
ref: C,
|
|
3164
3258
|
className: `pa-session-panel-float ${k ? "pa-session-panel-float--dragging" : ""}`,
|
|
3165
|
-
style:
|
|
3166
|
-
children: /* @__PURE__ */
|
|
3167
|
-
/* @__PURE__ */
|
|
3168
|
-
/* @__PURE__ */
|
|
3259
|
+
style: D,
|
|
3260
|
+
children: /* @__PURE__ */ u(_e, { variant: "sheet", side: "right", children: [
|
|
3261
|
+
/* @__PURE__ */ u("div", { className: "pa-session-header", children: [
|
|
3262
|
+
/* @__PURE__ */ u("div", { className: "pa-session-header-main", children: [
|
|
3169
3263
|
/* @__PURE__ */ a(
|
|
3170
3264
|
"button",
|
|
3171
3265
|
{
|
|
@@ -3173,8 +3267,8 @@ function gr({
|
|
|
3173
3267
|
className: "pa-session-drag",
|
|
3174
3268
|
"aria-label": "Drag session panel",
|
|
3175
3269
|
title: "Drag to move",
|
|
3176
|
-
...
|
|
3177
|
-
children: /* @__PURE__ */
|
|
3270
|
+
...x,
|
|
3271
|
+
children: /* @__PURE__ */ u("span", { className: "pa-session-grip", "aria-hidden": "true", children: [
|
|
3178
3272
|
/* @__PURE__ */ a("span", {}),
|
|
3179
3273
|
/* @__PURE__ */ a("span", {}),
|
|
3180
3274
|
/* @__PURE__ */ a("span", {}),
|
|
@@ -3184,21 +3278,21 @@ function gr({
|
|
|
3184
3278
|
] })
|
|
3185
3279
|
}
|
|
3186
3280
|
),
|
|
3187
|
-
/* @__PURE__ */
|
|
3281
|
+
/* @__PURE__ */ u("h3", { className: "pa-session-title", children: [
|
|
3188
3282
|
"Session (",
|
|
3189
3283
|
e.length,
|
|
3190
3284
|
")"
|
|
3191
3285
|
] })
|
|
3192
3286
|
] }),
|
|
3193
3287
|
/* @__PURE__ */ a("p", { className: "pa-session-subtitle", children: "Persists until tab close" }),
|
|
3194
|
-
/* @__PURE__ */
|
|
3288
|
+
/* @__PURE__ */ u("div", { className: "pa-session-actions", children: [
|
|
3195
3289
|
/* @__PURE__ */ a(
|
|
3196
3290
|
rn,
|
|
3197
3291
|
{
|
|
3198
|
-
feedback:
|
|
3292
|
+
feedback: g === "session" ? p : null,
|
|
3199
3293
|
slotClassName: "pa-copy-feedback-slot--session",
|
|
3200
3294
|
children: /* @__PURE__ */ a(
|
|
3201
|
-
|
|
3295
|
+
G,
|
|
3202
3296
|
{
|
|
3203
3297
|
variant: "glass-primary",
|
|
3204
3298
|
className: "pa-glass-btn--sm",
|
|
@@ -3209,52 +3303,52 @@ function gr({
|
|
|
3209
3303
|
)
|
|
3210
3304
|
}
|
|
3211
3305
|
),
|
|
3212
|
-
/* @__PURE__ */ a(
|
|
3306
|
+
/* @__PURE__ */ a(G, { variant: "ghost", onClick: t, "aria-label": "Close session panel", children: "✕" })
|
|
3213
3307
|
] })
|
|
3214
3308
|
] }),
|
|
3215
|
-
/* @__PURE__ */
|
|
3309
|
+
/* @__PURE__ */ u("ul", { className: "pa-session-list", children: [
|
|
3216
3310
|
e.length === 0 && /* @__PURE__ */ a("li", { className: "pa-session-empty", children: "No annotations yet. Click an element, drag an area, or Shift+click for multi-select." }),
|
|
3217
|
-
e.map((
|
|
3218
|
-
const
|
|
3311
|
+
e.map((v) => {
|
|
3312
|
+
const N = Ut(v);
|
|
3219
3313
|
return /* @__PURE__ */ a(
|
|
3220
3314
|
"li",
|
|
3221
3315
|
{
|
|
3222
|
-
className: s ===
|
|
3223
|
-
onMouseEnter: () => l(
|
|
3316
|
+
className: s === v.id ? "pa-session-item pa-session-item--active" : "pa-session-item",
|
|
3317
|
+
onMouseEnter: () => l(v.id),
|
|
3224
3318
|
onMouseLeave: () => l(null),
|
|
3225
|
-
children:
|
|
3226
|
-
/* @__PURE__ */
|
|
3319
|
+
children: m === v.id ? /* @__PURE__ */ u("div", { className: "pa-session-edit", children: [
|
|
3320
|
+
/* @__PURE__ */ u("label", { className: "pa-label", children: [
|
|
3227
3321
|
"Note",
|
|
3228
3322
|
/* @__PURE__ */ a(
|
|
3229
3323
|
"textarea",
|
|
3230
3324
|
{
|
|
3231
3325
|
className: "pa-textarea",
|
|
3232
|
-
value:
|
|
3233
|
-
onChange: (
|
|
3326
|
+
value: f,
|
|
3327
|
+
onChange: (P) => h(P.target.value),
|
|
3234
3328
|
rows: 3
|
|
3235
3329
|
}
|
|
3236
3330
|
)
|
|
3237
3331
|
] }),
|
|
3238
|
-
/* @__PURE__ */
|
|
3239
|
-
/* @__PURE__ */ a(
|
|
3332
|
+
/* @__PURE__ */ u("div", { className: "pa-session-item-actions", children: [
|
|
3333
|
+
/* @__PURE__ */ a(G, { variant: "ghost", onClick: () => c(null), children: "Cancel" }),
|
|
3240
3334
|
/* @__PURE__ */ a(
|
|
3241
|
-
|
|
3335
|
+
G,
|
|
3242
3336
|
{
|
|
3243
3337
|
variant: "glass-primary",
|
|
3244
|
-
onClick: () =>
|
|
3245
|
-
disabled: !
|
|
3338
|
+
onClick: () => A(v.id),
|
|
3339
|
+
disabled: !f.trim(),
|
|
3246
3340
|
children: "Save"
|
|
3247
3341
|
}
|
|
3248
3342
|
)
|
|
3249
3343
|
] })
|
|
3250
|
-
] }) : /* @__PURE__ */
|
|
3251
|
-
/* @__PURE__ */
|
|
3252
|
-
/* @__PURE__ */ a("span", { className: "pa-session-target", children:
|
|
3253
|
-
/* @__PURE__ */ a("p", { className: "pa-session-note", children:
|
|
3254
|
-
|
|
3344
|
+
] }) : /* @__PURE__ */ u(Z, { children: [
|
|
3345
|
+
/* @__PURE__ */ u("div", { className: "pa-session-content", children: [
|
|
3346
|
+
/* @__PURE__ */ a("span", { className: "pa-session-target", children: N.target }),
|
|
3347
|
+
/* @__PURE__ */ a("p", { className: "pa-session-note", children: N.note }),
|
|
3348
|
+
N.meta && /* @__PURE__ */ a("p", { className: "pa-session-meta-line", children: N.meta })
|
|
3255
3349
|
] }),
|
|
3256
|
-
/* @__PURE__ */
|
|
3257
|
-
p === "Copied!" &&
|
|
3350
|
+
/* @__PURE__ */ u("div", { className: "pa-session-item-actions", children: [
|
|
3351
|
+
p === "Copied!" && d === v.id ? /* @__PURE__ */ a(
|
|
3258
3352
|
"span",
|
|
3259
3353
|
{
|
|
3260
3354
|
className: "pa-status pa-copy-feedback-slot pa-copy-feedback-slot--item",
|
|
@@ -3263,31 +3357,31 @@ function gr({
|
|
|
3263
3357
|
children: "Copied!"
|
|
3264
3358
|
}
|
|
3265
3359
|
) : /* @__PURE__ */ a(
|
|
3266
|
-
|
|
3360
|
+
G,
|
|
3267
3361
|
{
|
|
3268
3362
|
variant: "glass-primary",
|
|
3269
3363
|
className: "pa-glass-btn--sm",
|
|
3270
|
-
onClick: () => r(
|
|
3364
|
+
onClick: () => r(v.id),
|
|
3271
3365
|
"aria-label": "Copy annotation",
|
|
3272
3366
|
children: "Copy"
|
|
3273
3367
|
}
|
|
3274
3368
|
),
|
|
3275
3369
|
/* @__PURE__ */ a(
|
|
3276
|
-
|
|
3370
|
+
G,
|
|
3277
3371
|
{
|
|
3278
3372
|
variant: "ghost",
|
|
3279
3373
|
className: "pa-glass-btn--sm pa-session-action-icon",
|
|
3280
|
-
onClick: () => v
|
|
3374
|
+
onClick: () => w(v),
|
|
3281
3375
|
"aria-label": "Edit annotation note",
|
|
3282
3376
|
children: "✎"
|
|
3283
3377
|
}
|
|
3284
3378
|
),
|
|
3285
3379
|
/* @__PURE__ */ a(
|
|
3286
|
-
|
|
3380
|
+
G,
|
|
3287
3381
|
{
|
|
3288
3382
|
variant: "ghost",
|
|
3289
3383
|
className: "pa-glass-btn--sm pa-session-action-icon",
|
|
3290
|
-
onClick: () => o(
|
|
3384
|
+
onClick: () => o(v.id),
|
|
3291
3385
|
"aria-label": "Remove annotation",
|
|
3292
3386
|
children: /* @__PURE__ */ a(fr, {})
|
|
3293
3387
|
}
|
|
@@ -3295,7 +3389,7 @@ function gr({
|
|
|
3295
3389
|
] })
|
|
3296
3390
|
] })
|
|
3297
3391
|
},
|
|
3298
|
-
|
|
3392
|
+
v.id
|
|
3299
3393
|
);
|
|
3300
3394
|
})
|
|
3301
3395
|
] })
|
|
@@ -3310,30 +3404,30 @@ function hr({
|
|
|
3310
3404
|
chrome: r,
|
|
3311
3405
|
onToggleHostTheme: o
|
|
3312
3406
|
}) {
|
|
3313
|
-
const i =
|
|
3314
|
-
return
|
|
3407
|
+
const i = W(null);
|
|
3408
|
+
return _(() => {
|
|
3315
3409
|
if (!e) return;
|
|
3316
3410
|
const s = (p) => {
|
|
3317
3411
|
p.key === "Escape" && t();
|
|
3318
3412
|
}, l = (p) => {
|
|
3319
|
-
var
|
|
3320
|
-
const
|
|
3321
|
-
(
|
|
3413
|
+
var g, m;
|
|
3414
|
+
const d = p.target;
|
|
3415
|
+
(g = i.current) != null && g.contains(d) || (m = d.closest) != null && m.call(d, "[data-pa-settings-trigger]") || t();
|
|
3322
3416
|
};
|
|
3323
3417
|
return window.addEventListener("keydown", s), window.addEventListener("mousedown", l), () => {
|
|
3324
3418
|
window.removeEventListener("keydown", s), window.removeEventListener("mousedown", l);
|
|
3325
3419
|
};
|
|
3326
|
-
}, [e, t]), e ? /* @__PURE__ */ a("div", { ref: i, className: "pa-settings-menu", role: "dialog", "aria-label": "PixelAgent settings", children: /* @__PURE__ */ a(_e, { variant: "popover", className: "pa-settings-menu-panel", children: /* @__PURE__ */
|
|
3327
|
-
/* @__PURE__ */
|
|
3420
|
+
}, [e, t]), e ? /* @__PURE__ */ a("div", { ref: i, className: "pa-settings-menu", role: "dialog", "aria-label": "PixelAgent settings", children: /* @__PURE__ */ a(_e, { variant: "popover", className: "pa-settings-menu-panel", children: /* @__PURE__ */ u("div", { className: "pa-settings-menu-inner", children: [
|
|
3421
|
+
/* @__PURE__ */ u("header", { className: "pa-settings-menu-header", children: [
|
|
3328
3422
|
/* @__PURE__ */ a("h4", { className: "pa-settings-menu-title", children: "Settings" }),
|
|
3329
3423
|
/* @__PURE__ */ a("p", { className: "pa-settings-menu-subtitle", children: "Appearance and chrome" })
|
|
3330
3424
|
] }),
|
|
3331
|
-
/* @__PURE__ */
|
|
3425
|
+
/* @__PURE__ */ u("section", { className: "pa-settings-section", children: [
|
|
3332
3426
|
/* @__PURE__ */ a("span", { className: "pa-settings-section-label", children: "Host theme" }),
|
|
3333
|
-
/* @__PURE__ */
|
|
3427
|
+
/* @__PURE__ */ u("div", { className: "pa-settings-row", children: [
|
|
3334
3428
|
/* @__PURE__ */ a("span", { className: "pa-settings-row-value", children: n === "dark" ? "Dark canvas" : "Light canvas" }),
|
|
3335
3429
|
/* @__PURE__ */ a(
|
|
3336
|
-
|
|
3430
|
+
G,
|
|
3337
3431
|
{
|
|
3338
3432
|
variant: "icon",
|
|
3339
3433
|
onClick: o,
|
|
@@ -3344,9 +3438,9 @@ function hr({
|
|
|
3344
3438
|
)
|
|
3345
3439
|
] })
|
|
3346
3440
|
] }),
|
|
3347
|
-
/* @__PURE__ */
|
|
3441
|
+
/* @__PURE__ */ u("section", { className: "pa-settings-section", children: [
|
|
3348
3442
|
/* @__PURE__ */ a("span", { className: "pa-settings-section-label", children: "Glass chrome" }),
|
|
3349
|
-
/* @__PURE__ */
|
|
3443
|
+
/* @__PURE__ */ u("p", { className: "pa-settings-hint", children: [
|
|
3350
3444
|
r === "dim" ? "Dim gray glass for readability on bright pages." : "Frosted glass for dark pages.",
|
|
3351
3445
|
" ",
|
|
3352
3446
|
"(auto)"
|
|
@@ -3354,9 +3448,9 @@ function hr({
|
|
|
3354
3448
|
] })
|
|
3355
3449
|
] }) }) }) : null;
|
|
3356
3450
|
}
|
|
3357
|
-
const
|
|
3451
|
+
const Pt = "0 0 24 24";
|
|
3358
3452
|
function mr() {
|
|
3359
|
-
return /* @__PURE__ */
|
|
3453
|
+
return /* @__PURE__ */ u(Z, { children: [
|
|
3360
3454
|
/* @__PURE__ */ a("rect", { x: "3", y: "14", width: "4", height: "4", fill: "currentColor" }),
|
|
3361
3455
|
/* @__PURE__ */ a("path", { fill: "currentColor", d: "M7 5h12v12L7 5z" })
|
|
3362
3456
|
] });
|
|
@@ -3369,7 +3463,7 @@ function br({ size: e = 22, variant: t = "cursor" }) {
|
|
|
3369
3463
|
className: "pa-brand-cursor pa-brand-cursor--pointer",
|
|
3370
3464
|
width: e,
|
|
3371
3465
|
height: e,
|
|
3372
|
-
viewBox:
|
|
3466
|
+
viewBox: Pt,
|
|
3373
3467
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3374
3468
|
"aria-hidden": "true",
|
|
3375
3469
|
children: /* @__PURE__ */ a(
|
|
@@ -3386,7 +3480,7 @@ function br({ size: e = 22, variant: t = "cursor" }) {
|
|
|
3386
3480
|
className: "pa-brand-cursor pa-brand-cursor--minimal",
|
|
3387
3481
|
width: e,
|
|
3388
3482
|
height: e,
|
|
3389
|
-
viewBox:
|
|
3483
|
+
viewBox: Pt,
|
|
3390
3484
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3391
3485
|
"aria-hidden": "true",
|
|
3392
3486
|
children: /* @__PURE__ */ a(mr, {})
|
|
@@ -3408,24 +3502,24 @@ function yr({
|
|
|
3408
3502
|
onToggleHostTheme: s,
|
|
3409
3503
|
active: l,
|
|
3410
3504
|
mode: p,
|
|
3411
|
-
captureMode:
|
|
3412
|
-
annotationCount:
|
|
3413
|
-
multiSelectCount:
|
|
3505
|
+
captureMode: d,
|
|
3506
|
+
annotationCount: g,
|
|
3507
|
+
multiSelectCount: m,
|
|
3414
3508
|
copyStatus: c,
|
|
3415
|
-
copyAllFrom:
|
|
3416
|
-
onActivateAnnotate:
|
|
3417
|
-
onActivateEdit:
|
|
3509
|
+
copyAllFrom: f,
|
|
3510
|
+
onActivateAnnotate: h,
|
|
3511
|
+
onActivateEdit: C,
|
|
3418
3512
|
onDeactivate: k,
|
|
3419
|
-
onCopyAll:
|
|
3420
|
-
onCaptureModeChange:
|
|
3421
|
-
onConfirmMultiSelect:
|
|
3513
|
+
onCopyAll: D,
|
|
3514
|
+
onCaptureModeChange: x,
|
|
3515
|
+
onConfirmMultiSelect: w
|
|
3422
3516
|
}) {
|
|
3423
|
-
const { elementRef:
|
|
3517
|
+
const { elementRef: A, isDragging: v, style: N, dragHandleProps: P } = it(), y = /* @__PURE__ */ u(
|
|
3424
3518
|
"div",
|
|
3425
3519
|
{
|
|
3426
|
-
ref:
|
|
3427
|
-
className: `pa-toolbar-float ${
|
|
3428
|
-
style:
|
|
3520
|
+
ref: A,
|
|
3521
|
+
className: `pa-toolbar-float ${v ? "pa-toolbar-float--dragging" : ""}`,
|
|
3522
|
+
style: N,
|
|
3429
3523
|
role: "toolbar",
|
|
3430
3524
|
"aria-label": "PixelAgent",
|
|
3431
3525
|
children: [
|
|
@@ -3439,7 +3533,7 @@ function yr({
|
|
|
3439
3533
|
onToggleHostTheme: s
|
|
3440
3534
|
}
|
|
3441
3535
|
),
|
|
3442
|
-
/* @__PURE__ */ a(Gt, { shape: "capsule", className: "pa-toolbar-glass", intensity: "enhanced", children: /* @__PURE__ */
|
|
3536
|
+
/* @__PURE__ */ a(Gt, { shape: "capsule", className: "pa-toolbar-glass", intensity: "enhanced", children: /* @__PURE__ */ u("div", { className: "pa-toolbar-inner", children: [
|
|
3443
3537
|
/* @__PURE__ */ a(
|
|
3444
3538
|
"button",
|
|
3445
3539
|
{
|
|
@@ -3447,47 +3541,47 @@ function yr({
|
|
|
3447
3541
|
className: "pa-toolbar-drag",
|
|
3448
3542
|
"aria-label": "Drag PixelAgent toolbar",
|
|
3449
3543
|
title: "Drag to move",
|
|
3450
|
-
...
|
|
3544
|
+
...P,
|
|
3451
3545
|
children: /* @__PURE__ */ a(br, { size: 22 })
|
|
3452
3546
|
}
|
|
3453
3547
|
),
|
|
3454
3548
|
/* @__PURE__ */ a("span", { className: "pa-toolbar-divider", "aria-hidden": "true" }),
|
|
3455
|
-
l ? /* @__PURE__ */
|
|
3456
|
-
/* @__PURE__ */
|
|
3549
|
+
l ? /* @__PURE__ */ u(Z, { children: [
|
|
3550
|
+
/* @__PURE__ */ u("div", { className: "pa-toolbar-segment", children: [
|
|
3457
3551
|
/* @__PURE__ */ a("span", { className: "pa-mode-badge", children: p }),
|
|
3458
|
-
p === "annotate" && /* @__PURE__ */
|
|
3552
|
+
p === "annotate" && /* @__PURE__ */ u(Z, { children: [
|
|
3459
3553
|
/* @__PURE__ */ a(
|
|
3460
3554
|
"select",
|
|
3461
3555
|
{
|
|
3462
3556
|
className: "pa-select pa-toolbar-capture-select",
|
|
3463
|
-
value:
|
|
3464
|
-
onChange: (
|
|
3557
|
+
value: d,
|
|
3558
|
+
onChange: (M) => x(M.target.value),
|
|
3465
3559
|
"aria-label": "Capture mode",
|
|
3466
|
-
children: vr.map((
|
|
3560
|
+
children: vr.map((M) => /* @__PURE__ */ a("option", { value: M, children: wr[M] }, M))
|
|
3467
3561
|
}
|
|
3468
3562
|
),
|
|
3469
|
-
|
|
3470
|
-
|
|
3563
|
+
m > 0 && /* @__PURE__ */ a(
|
|
3564
|
+
G,
|
|
3471
3565
|
{
|
|
3472
3566
|
variant: "glass-primary",
|
|
3473
|
-
onClick:
|
|
3567
|
+
onClick: w,
|
|
3474
3568
|
"aria-label": "Annotate selected elements",
|
|
3475
|
-
children:
|
|
3569
|
+
children: m
|
|
3476
3570
|
}
|
|
3477
3571
|
),
|
|
3478
3572
|
/* @__PURE__ */ a(
|
|
3479
3573
|
rn,
|
|
3480
3574
|
{
|
|
3481
|
-
feedback:
|
|
3575
|
+
feedback: f === "toolbar" ? c : null,
|
|
3482
3576
|
slotClassName: "pa-copy-feedback-slot--toolbar",
|
|
3483
3577
|
children: /* @__PURE__ */ a(
|
|
3484
|
-
|
|
3578
|
+
G,
|
|
3485
3579
|
{
|
|
3486
3580
|
variant: "glass-primary",
|
|
3487
|
-
onClick:
|
|
3488
|
-
disabled:
|
|
3489
|
-
"aria-label":
|
|
3490
|
-
children:
|
|
3581
|
+
onClick: D,
|
|
3582
|
+
disabled: g === 0,
|
|
3583
|
+
"aria-label": g > 0 ? `Copy all annotations (${g})` : "Copy all annotations",
|
|
3584
|
+
children: g > 0 ? `Copy (${g})` : "Copy"
|
|
3491
3585
|
}
|
|
3492
3586
|
)
|
|
3493
3587
|
}
|
|
@@ -3495,7 +3589,7 @@ function yr({
|
|
|
3495
3589
|
] })
|
|
3496
3590
|
] }),
|
|
3497
3591
|
/* @__PURE__ */ a(
|
|
3498
|
-
|
|
3592
|
+
G,
|
|
3499
3593
|
{
|
|
3500
3594
|
variant: "icon",
|
|
3501
3595
|
className: "pa-toolbar-close",
|
|
@@ -3522,14 +3616,14 @@ function yr({
|
|
|
3522
3616
|
)
|
|
3523
3617
|
}
|
|
3524
3618
|
)
|
|
3525
|
-
] }) : /* @__PURE__ */
|
|
3526
|
-
/* @__PURE__ */ a(
|
|
3527
|
-
/* @__PURE__ */ a(
|
|
3619
|
+
] }) : /* @__PURE__ */ u("div", { className: "pa-toolbar-segment", children: [
|
|
3620
|
+
/* @__PURE__ */ a(G, { onClick: h, children: "Annotate" }),
|
|
3621
|
+
/* @__PURE__ */ a(G, { onClick: C, children: "Edit" })
|
|
3528
3622
|
] }),
|
|
3529
|
-
!l && /* @__PURE__ */
|
|
3623
|
+
!l && /* @__PURE__ */ u(Z, { children: [
|
|
3530
3624
|
/* @__PURE__ */ a("span", { className: "pa-toolbar-divider", "aria-hidden": "true" }),
|
|
3531
3625
|
/* @__PURE__ */ a(
|
|
3532
|
-
|
|
3626
|
+
G,
|
|
3533
3627
|
{
|
|
3534
3628
|
variant: "icon",
|
|
3535
3629
|
className: "pa-toolbar-settings",
|
|
@@ -3547,34 +3641,34 @@ function yr({
|
|
|
3547
3641
|
]
|
|
3548
3642
|
}
|
|
3549
3643
|
);
|
|
3550
|
-
return typeof document > "u" ?
|
|
3644
|
+
return typeof document > "u" ? y : Le(
|
|
3551
3645
|
/* @__PURE__ */ a(
|
|
3552
3646
|
"div",
|
|
3553
3647
|
{
|
|
3554
3648
|
className: "pa-root pa-root--toolbar-portal",
|
|
3555
3649
|
"data-pixelagent-toolbar-portal": !0,
|
|
3556
3650
|
...e,
|
|
3557
|
-
children:
|
|
3651
|
+
children: y
|
|
3558
3652
|
}
|
|
3559
3653
|
),
|
|
3560
3654
|
document.body
|
|
3561
3655
|
);
|
|
3562
3656
|
}
|
|
3563
3657
|
function kr() {
|
|
3564
|
-
const e =
|
|
3658
|
+
const e = W(mn()), [t, n] = S(
|
|
3565
3659
|
() => {
|
|
3566
3660
|
var i;
|
|
3567
3661
|
return ((i = e.current) == null ? void 0 : i.annotations) ?? [];
|
|
3568
3662
|
}
|
|
3569
3663
|
);
|
|
3570
|
-
|
|
3664
|
+
_(() => {
|
|
3571
3665
|
xn({ annotations: t });
|
|
3572
3666
|
}, [t]);
|
|
3573
|
-
const r =
|
|
3667
|
+
const r = T((i, s) => {
|
|
3574
3668
|
n(
|
|
3575
3669
|
(l) => l.map((p) => p.id === i ? { ...p, ...s } : p)
|
|
3576
3670
|
);
|
|
3577
|
-
}, []), o =
|
|
3671
|
+
}, []), o = T((i) => {
|
|
3578
3672
|
n((s) => s.filter((l) => l.id !== i));
|
|
3579
3673
|
}, []);
|
|
3580
3674
|
return {
|
|
@@ -3593,53 +3687,53 @@ function Nr({
|
|
|
3593
3687
|
() => ({ ...bn, ...e }),
|
|
3594
3688
|
[e]
|
|
3595
3689
|
), [o, i] = S(
|
|
3596
|
-
() => t ??
|
|
3690
|
+
() => t ?? ft(r) ?? "dark"
|
|
3597
3691
|
), [s, l] = S(!1), p = t ?? o;
|
|
3598
|
-
|
|
3692
|
+
_(() => {
|
|
3599
3693
|
if (t !== void 0) return;
|
|
3600
3694
|
const c = () => {
|
|
3601
|
-
const
|
|
3602
|
-
|
|
3695
|
+
const C = ft(r);
|
|
3696
|
+
C && i(C);
|
|
3603
3697
|
};
|
|
3604
3698
|
c();
|
|
3605
|
-
const
|
|
3606
|
-
return
|
|
3699
|
+
const f = r.hostThemeAttribute, h = new MutationObserver(c);
|
|
3700
|
+
return h.observe(document.documentElement, {
|
|
3607
3701
|
attributes: !0,
|
|
3608
|
-
attributeFilter: [
|
|
3609
|
-
}), () =>
|
|
3702
|
+
attributeFilter: [f]
|
|
3703
|
+
}), () => h.disconnect();
|
|
3610
3704
|
}, [t, r]);
|
|
3611
|
-
const
|
|
3705
|
+
const d = se(
|
|
3612
3706
|
() => vn(r, p),
|
|
3613
3707
|
[r, p]
|
|
3614
|
-
),
|
|
3708
|
+
), g = T(() => {
|
|
3615
3709
|
const c = p === "dark" ? "light" : "dark";
|
|
3616
3710
|
if (n) {
|
|
3617
3711
|
n(c);
|
|
3618
3712
|
return;
|
|
3619
3713
|
}
|
|
3620
3714
|
i(c), wn(c, r);
|
|
3621
|
-
}, [p, n, r]),
|
|
3715
|
+
}, [p, n, r]), m = T(() => {
|
|
3622
3716
|
l((c) => !c);
|
|
3623
3717
|
}, []);
|
|
3624
3718
|
return {
|
|
3625
|
-
chrome:
|
|
3626
|
-
rootAttributes: yn(
|
|
3719
|
+
chrome: d,
|
|
3720
|
+
rootAttributes: yn(d),
|
|
3627
3721
|
hostTheme: p,
|
|
3628
|
-
toggleHostTheme:
|
|
3722
|
+
toggleHostTheme: g,
|
|
3629
3723
|
settingsOpen: s,
|
|
3630
3724
|
setSettingsOpen: l,
|
|
3631
|
-
toggleSettings:
|
|
3725
|
+
toggleSettings: m,
|
|
3632
3726
|
uiSettings: r
|
|
3633
3727
|
};
|
|
3634
3728
|
}
|
|
3635
|
-
const Cr = `.pa-root{--pa-glass-blur: 4px;--pa-glass-saturate: 130%;--pa-glass-opacity: .78;--pa-glass-tint: rgba(255, 255, 255, .08);--pa-glass-tint-accent: rgba(99, 102, 241, .32);--pa-glass-border: rgba(255, 255, 255, .28);--pa-glass-rim: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 0 0 1px rgba(255, 255, 255, .06), inset 1px 0 0 rgba(255, 255, 255, .18), inset -1px 0 0 rgba(255, 255, 255, .18), inset 0 -1px 1px rgba(0, 0, 0, .18);--pa-glass-shadow: 0 1px 1px rgba(0, 0, 0, .06), 0 4px 12px rgba(0, 0, 0, .14), 0 12px 40px rgba(0, 0, 0, .32);--pa-glass-specular: radial-gradient( ellipse 65% 45% at 22% 14%, rgba(255, 255, 255, .38) 0%, rgba(255, 255, 255, .08) 38%, transparent 72% );--pa-glass-underglow: radial-gradient( ellipse 95% 38% at 50% 100%, rgba(129, 140, 248, .18) 0%, transparent 60% );--pa-glass-radius-bar: 999px;--pa-glass-radius-panel: 20px;--pa-glass-radius-popover: 16px;--pa-glass-radius-control: 10px;--pa-glass-group-gap: 10px;--pa-glass-morph-duration: .32s;--pa-glass-morph-easing: cubic-bezier(.4, 0, .2, 1);--pa-glass-fallback-bg: rgba(28, 28, 30, .94);--pa-glass-fallback-border: rgba(255, 255, 255, .12);--pa-glass-surface-fill: rgba(255, 255, 255, .06);--pa-glass-control-hover: rgba(255, 255, 255, .12);--pa-glass-control-active: rgba(255, 255, 255, .18);--pa-divider: rgba(255, 255, 255, .08);--pa-tooltip-bg: rgba(20, 20, 24, .82);--pa-tooltip-border: rgba(255, 255, 255, .14);--pa-toolbar-segment-bg: rgba(0, 0, 0, .28);--pa-toolbar-segment-border: rgba(255, 255, 255, .06);--pa-toolbar-divider-color: rgba(255, 255, 255, .12);--pa-text: rgba(255, 255, 255, .92);--pa-text-secondary: rgba(255, 255, 255, .62);--pa-accent: #818cf8;--pa-accent-bright: #a5b4fc;--pa-success: #6ee7b7;--pa-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--pa-font-mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, monospace;--pa-z: 2147483640;--pa-field-bg: rgba(255, 255, 255, .04);--pa-field-bg-hover: rgba(255, 255, 255, .06);--pa-field-border: rgba(255, 255, 255, .12);--pa-field-border-hover: rgba(255, 255, 255, .2);--pa-field-border-focus: rgba(255, 255, 255, .32);--pa-field-radius: 8px}@media(prefers-reduced-transparency:reduce){.pa-root{--pa-glass-blur: 0px;--pa-glass-saturate: 100%;--pa-glass-opacity: 1;--pa-glass-tint: var(--pa-glass-fallback-bg);--pa-glass-tint-accent: rgba(99, 102, 241, .85);--pa-glass-border: var(--pa-glass-fallback-border);--pa-glass-rim: none;--pa-glass-specular: none;--pa-glass-underglow: none}}@media(prefers-reduced-motion:reduce){.pa-root{--pa-glass-morph-duration: 0ms}}.pa-root[data-pa-chrome=dim],.pa-root--toolbar-portal[data-pa-chrome=dim]{--pa-glass-blur: 16px;--pa-glass-saturate: 125%;--pa-glass-opacity: .88;--pa-glass-tint: rgba(92, 92, 96, .68);--pa-glass-tint-accent: rgba(100, 100, 104, .74);--pa-glass-surface-fill: rgba(96, 96, 100, .64);--pa-glass-border: rgba(255, 255, 255, .2);--pa-glass-rim: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 0 0 1px rgba(255, 255, 255, .05), inset 1px 0 0 rgba(255, 255, 255, .08), inset -1px 0 0 rgba(255, 255, 255, .08), inset 0 -1px 1px rgba(0, 0, 0, .22);--pa-glass-shadow: 0 2px 4px rgba(0, 0, 0, .08), 0 10px 32px rgba(0, 0, 0, .14), 0 24px 48px rgba(0, 0, 0, .1);--pa-glass-specular: radial-gradient( ellipse 68% 48% at 22% 10%, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .1) 40%, transparent 72% );--pa-glass-underglow: none;--pa-glass-fallback-bg: rgba(82, 82, 86, .96);--pa-glass-fallback-border: rgba(255, 255, 255, .12);--pa-glass-control-hover: rgba(255, 255, 255, .1);--pa-glass-control-active: rgba(255, 255, 255, .16);--pa-divider: rgba(255, 255, 255, .1);--pa-tooltip-bg: rgba(82, 82, 86, .96);--pa-tooltip-border: rgba(255, 255, 255, .18);--pa-toolbar-segment-bg: rgba(0, 0, 0, .18);--pa-toolbar-segment-border: rgba(255, 255, 255, .08);--pa-toolbar-divider-color: rgba(255, 255, 255, .14);--pa-text: rgba(255, 255, 255, .94);--pa-text-secondary: rgba(255, 255, 255, .58);--pa-accent: #a5b4fc;--pa-accent-bright: #c7d2fe;--pa-success: #6ee7b7;--pa-field-bg: rgba(255, 255, 255, .06);--pa-field-bg-hover: rgba(255, 255, 255, .09);--pa-field-border: rgba(255, 255, 255, .14);--pa-field-border-hover: rgba(255, 255, 255, .22);--pa-field-border-focus: rgba(255, 255, 255, .32)}.pa-glass-surface{position:relative;overflow:hidden;background:var(--pa-glass-surface-fill);border:1px solid var(--pa-glass-border);box-shadow:var(--pa-glass-shadow),var(--pa-glass-rim);border-radius:inherit;backdrop-filter:blur(4px) saturate(130%);-webkit-backdrop-filter:blur(4px) saturate(130%);will-change:backdrop-filter}.pa-glass-surface.pa-toolbar-glass{backdrop-filter:blur(6px) saturate(138%);-webkit-backdrop-filter:blur(6px) saturate(138%)}.pa-glass-surface-blur{display:none}.pa-glass-surface-bg{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;border-radius:inherit;background:linear-gradient(180deg,#ffffff1a,#fff0 28%),linear-gradient(0deg,#ffffff08,#fff0 22%);pointer-events:none}@media(prefers-reduced-transparency:reduce){.pa-glass-surface{backdrop-filter:none;-webkit-backdrop-filter:none;background:var(--pa-glass-fallback-bg);border-color:var(--pa-glass-fallback-border);box-shadow:none}.pa-glass-surface-bg{filter:none;background:transparent}}.pa-glass-surface--accent{background:var(--pa-glass-tint-accent)}.pa-glass-surface-shine{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;border-radius:inherit;pointer-events:none;background:var(--pa-glass-specular);mix-blend-mode:screen}.pa-glass-surface:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;border-radius:inherit;pointer-events:none;background:var(--pa-glass-underglow);mix-blend-mode:screen}@media(prefers-reduced-transparency:reduce){.pa-glass-surface-shine,.pa-glass-surface:after{display:none}}.pa-glass-surface-content{position:relative;z-index:3}.pa-glass-container{display:flex;align-items:center;gap:var(--pa-glass-group-gap);font-family:var(--pa-font)}.pa-toolbar-float{position:fixed;bottom:24px;left:50%;margin-left:-150px;z-index:var(--pa-z);touch-action:none}.pa-toolbar-float--dragging{-webkit-user-select:none;user-select:none}.pa-toolbar-inner{display:flex;align-items:center;gap:6px;padding:6px 10px 6px 6px}.pa-toolbar-drag{all:unset;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;color:var(--pa-text);cursor:grab;touch-action:none;flex-shrink:0;transition:background .15s ease}.pa-toolbar-drag:hover{background:var(--pa-glass-control-hover)}.pa-brand-cursor{display:block;flex-shrink:0;pointer-events:none}.pa-brand-cursor--pointer{margin-top:-2px;margin-left:-1px}.pa-brand-cursor--minimal{display:block}.pa-toolbar-float--dragging .pa-toolbar-drag{cursor:grabbing;background:#ffffff24}.pa-toolbar-divider{width:1px;height:24px;background:var(--pa-toolbar-divider-color);flex-shrink:0}.pa-toolbar-segment{display:flex;align-items:center;gap:4px;padding:3px 4px;border-radius:999px;background:var(--pa-toolbar-segment-bg);border:1px solid var(--pa-toolbar-segment-border)}.pa-toolbar-capture-select{width:auto;min-width:76px;padding:6px 28px 6px 10px;font-size:12px;font-weight:500;letter-spacing:0;text-transform:none;border-radius:999px;cursor:pointer}.pa-toolbar-close{margin-left:2px;flex-shrink:0}.pa-toolbar-status{font-size:11px;padding:0 8px;white-space:nowrap}.pa-settings-menu{position:absolute;right:8px;bottom:calc(100% + 12px);z-index:2;width:min(280px,calc(100vw - 32px));pointer-events:auto}.pa-settings-menu-panel{width:100%}.pa-settings-menu-inner{padding:14px 16px 16px}.pa-settings-menu-header{margin-bottom:14px}.pa-settings-menu-title{margin:0;font-size:14px;font-weight:600;color:var(--pa-text)}.pa-settings-menu-subtitle{margin:4px 0 0;font-size:11px;color:var(--pa-text-secondary)}.pa-settings-section{padding:12px 0;border-top:1px solid var(--pa-divider)}.pa-settings-section:first-of-type{border-top:none;padding-top:0}.pa-settings-section-label{display:block;font-size:10px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--pa-text-secondary);margin-bottom:8px}.pa-settings-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.pa-settings-row-value{font-size:12px;color:var(--pa-text)}.pa-settings-hint{margin:0;font-size:11px;line-height:1.45;color:var(--pa-text-secondary)}.pa-glass-group{flex-shrink:0}.pa-glass-group-inner{display:flex;align-items:center;gap:2px;padding:4px 6px}.pa-glass-group--brand .pa-glass-group-inner{padding:6px 14px}.pa-glass-btn{all:unset;box-sizing:border-box;cursor:pointer;font-family:var(--pa-font);font-size:12px;font-weight:500;color:var(--pa-text);padding:6px 12px;border-radius:var(--pa-glass-radius-control);white-space:nowrap;transition:background var(--pa-glass-morph-duration) var(--pa-glass-morph-easing),transform .12s ease,color var(--pa-glass-morph-duration) ease}.pa-glass-btn:hover:not(:disabled){background:var(--pa-glass-control-hover)}.pa-glass-btn:active:not(:disabled){transform:scale(.97);background:var(--pa-glass-control-active)}.pa-glass-btn:disabled{opacity:.38;cursor:not-allowed}.pa-glass-btn--glass-primary,.pa-glass-btn--prominent{position:relative;color:#fff;font-weight:600;padding:8px 16px;background:#ffffff1a;backdrop-filter:blur(12px) saturate(140%);-webkit-backdrop-filter:blur(12px) saturate(140%);border:1px solid rgba(255,255,255,.28);box-shadow:inset 0 1px #fff6,0 4px 16px #00000026}.pa-glass-btn--glass-primary:before,.pa-glass-btn--prominent:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:inherit;background:linear-gradient(135deg,rgba(255,255,255,.22) 0%,transparent 45%,transparent 100%);pointer-events:none}.pa-glass-btn--glass-primary:hover:not(:disabled),.pa-glass-btn--prominent:hover:not(:disabled){background:#ffffff29;border-color:#ffffff61;box-shadow:inset 0 1px #ffffff73,0 6px 20px #0003}@media(prefers-reduced-transparency:reduce){.pa-glass-btn--glass-primary,.pa-glass-btn--prominent{backdrop-filter:none;-webkit-backdrop-filter:none;background:#3c3c46e6}}.pa-glass-btn--icon{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border-radius:50%;color:#ffffffbf;background:#ffffff0f;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.14);box-shadow:inset 0 1px #ffffff1f}.pa-glass-btn--icon:hover:not(:disabled){color:#fff;background:#ffffff1f;border-color:#ffffff38}.pa-glass-btn--ghost{color:var(--pa-text-secondary);padding:6px 10px}.pa-glass-btn--ghost:hover:not(:disabled){color:var(--pa-text);background:#ffffff14}.pa-glass-btn--active{background:#6366f173;color:#fff}.pa-glass-btn--sm{padding:2px 8px;font-size:11px}.pa-glass-panel{font-family:var(--pa-font);color:var(--pa-text)}.pa-glass-panel--sheet.pa-glass-panel--left{position:fixed;top:16px;left:16px;z-index:var(--pa-z);width:288px;max-height:calc(100vh - 100px)}.pa-glass-panel--sheet.pa-glass-panel--right{position:fixed;top:16px;right:16px;z-index:var(--pa-z);width:360px;max-height:60vh}.pa-glass-panel--popover{position:fixed;z-index:calc(var(--pa-z) + 2);width:300px}.pa-glass-panel .pa-glass-surface-content{padding:14px;display:flex;flex-direction:column;gap:10px}.pa-glass-panel--sheet .pa-glass-surface-content{padding:14px;overflow-y:auto;max-height:inherit}.pa-glass-panel--sheet.pa-glass-panel--right:not(.pa-edit-panel-glass) .pa-glass-surface-content{padding:0;gap:0}.pa-toolbar-brand{font-weight:600;font-size:12px;color:var(--pa-accent-bright);letter-spacing:-.01em}.pa-mode-badge{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--pa-text-secondary);padding:4px 10px}.pa-status{font-size:11px;font-weight:500;color:var(--pa-success);padding:4px 10px;animation:pa-status-in .28s var(--pa-glass-morph-easing)}.pa-copy-feedback-slot{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;font-size:12px;font-weight:600;white-space:nowrap;border-radius:999px;flex-shrink:0;animation:pa-status-in .28s var(--pa-glass-morph-easing)}.pa-copy-feedback-slot--toolbar{padding:8px 16px;min-height:34px}.pa-copy-feedback-slot--session{padding:8px 14px;min-height:34px}.pa-copy-feedback-slot--item{padding:6px 10px;min-width:44px;min-height:28px;font-size:11px}@keyframes pa-status-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.pa-status{animation:none}}.pa-glass-divider{width:1px;height:16px;background:#ffffff26;margin:0 2px;flex-shrink:0}.pa-root{all:initial;font-family:var(--pa-font);font-size:13px;line-height:1.4;color:var(--pa-text)}.pa-root--toolbar-portal{all:unset;position:static;font-family:var(--pa-font);font-size:13px;line-height:1.4;color:var(--pa-text);pointer-events:none}.pa-root--toolbar-portal .pa-toolbar-float{pointer-events:auto}.pa-root *,.pa-root *:before,.pa-root *:after{box-sizing:border-box}.pa-highlight{position:fixed;pointer-events:none;z-index:calc(var(--pa-z) - 2);border:2px solid var(--pa-accent);background:#6366f11f;border-radius:4px;box-shadow:0 0 0 1px #6366f140;transition:top .05s,left .05s,width .05s,height .05s,background var(--pa-glass-morph-duration) ease}.pa-highlight-selected{background:#6366f138;border-color:var(--pa-accent-bright);box-shadow:0 0 0 2px #6366f159,0 0 20px #6366f126}.pa-highlight-scope{background:#6366f129;border-style:dashed}.pa-highlight-primary{border-width:2px;background:#6366f147;box-shadow:0 0 0 3px #6366f173,0 0 24px #6366f133}.pa-annotation-badge{position:fixed;pointer-events:auto;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;z-index:calc(var(--pa-z) - 1);min-width:22px;height:22px;padding:0 6px;display:inline-flex;align-items:center;justify-content:center;font-family:var(--pa-font);font-size:12px;font-weight:700;line-height:1;color:#fff;background:#6669f8;border:none;border-radius:999px;box-shadow:0 2px 10px #37348c52;transform:translate(-50%,-50%);transition:top .05s,left .05s,transform .08s ease,background .08s ease,box-shadow .08s ease}.pa-annotation-badge:hover,.pa-annotation-badge--active{background:#7c7ffa;transform:translate(-50%,-50%) scale(1.18);box-shadow:0 0 0 3px #6366f173,0 2px 14px #37348c73}.pa-annotation-preview{position:fixed;pointer-events:none;z-index:calc(var(--pa-z) - 1);transform:translateY(-100%);display:flex;flex-direction:column;gap:3px;max-width:260px;padding:8px 10px;border-radius:8px;font-family:var(--pa-font);background:var(--pa-tooltip-bg);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--pa-tooltip-border);box-shadow:0 6px 24px #00000047}.pa-annotation-preview--below{transform:none}.pa-annotation-preview-target{font-family:var(--pa-font-mono, ui-monospace, monospace);font-size:10px;font-weight:600;letter-spacing:-.01em;color:var(--pa-accent-bright);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pa-annotation-preview-note{font-size:12px;font-weight:500;line-height:1.4;color:var(--pa-text);word-break:break-word;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}@media(prefers-reduced-transparency:reduce){.pa-annotation-preview{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--pa-glass-fallback-bg);border-color:var(--pa-glass-fallback-border)}}.pa-tooltip{position:fixed;pointer-events:none;z-index:calc(var(--pa-z) - 1);font-family:var(--pa-font);font-size:12px;font-weight:600;letter-spacing:-.01em;color:var(--pa-text);padding:4px 8px;border-radius:6px;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:var(--pa-tooltip-bg);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--pa-tooltip-border)}@media(prefers-reduced-transparency:reduce){.pa-tooltip{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--pa-glass-fallback-bg);border-color:var(--pa-glass-fallback-border)}}.pa-label{display:flex;flex-direction:column;gap:6px;font-size:11px;font-weight:500;letter-spacing:.04em;text-transform:uppercase;color:var(--pa-text-secondary);font-family:var(--pa-font)}.pa-select,.pa-input,.pa-textarea{font-family:var(--pa-font);font-size:12px;font-weight:400;line-height:1.4;color:var(--pa-text);background-color:var(--pa-field-bg);border:1px solid var(--pa-field-border);border-radius:var(--pa-field-radius);padding:8px 10px;outline:none;width:100%;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease}.pa-select{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;padding-right:28px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='rgba(255,255,255,0.45)' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center}.pa-select:hover:not(:focus),.pa-input:hover:not(:focus),.pa-textarea:hover:not(:focus){background-color:var(--pa-field-bg-hover);border-color:var(--pa-field-border-hover)}.pa-select:focus,.pa-input:focus,.pa-textarea:focus{background-color:#ffffff0d;border-color:var(--pa-field-border-focus);box-shadow:inset 0 1px #ffffff0f}.pa-textarea{resize:vertical;min-height:64px;line-height:1.5}@media(prefers-reduced-transparency:reduce){.pa-select,.pa-input,.pa-textarea{background-color:var(--pa-glass-fallback-bg);border-color:var(--pa-glass-fallback-border)}.pa-select:focus,.pa-input:focus,.pa-textarea:focus{border-color:var(--pa-accent)}}.pa-popover-header{display:flex;flex-direction:column;gap:3px}.pa-popover-selector{font-size:11px;font-weight:500;color:var(--pa-accent-bright);word-break:break-all}.pa-popover-actions{display:flex;justify-content:flex-end;gap:6px;margin-top:2px}.pa-edit-panel-float{position:fixed;right:16px;top:16px;z-index:calc(var(--pa-z) + 4);width:312px;max-height:calc(100vh - 32px)}.pa-edit-panel-float--dragging{-webkit-user-select:none;user-select:none}.pa-edit-panel-float .pa-glass-panel--sheet{position:relative;top:auto;left:auto;right:auto;width:100%;max-height:calc(100vh - 32px)}.pa-edit-panel-glass .pa-glass-surface-content{display:flex;flex-direction:column;min-height:0;max-height:calc(100vh - 32px);padding:14px 14px 12px}.pa-edit-panel-inner{display:flex;flex-direction:column;min-height:0;flex:1;gap:10px}.pa-edit-panel-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;margin:0 -4px;padding:0 4px;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.2) transparent}.pa-edit-panel-sticky{flex-shrink:0;padding-top:4px;border-top:1px solid rgba(255,255,255,.08)}.pa-edit-panel-header{display:flex;align-items:center;gap:8px}.pa-edit-panel-drag{all:unset;display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;cursor:grab;touch-action:none;flex-shrink:0;color:#ffffff73;transition:background .15s ease,color .15s ease}.pa-edit-panel-drag:hover{background:#ffffff1a;color:#ffffffd9}.pa-edit-panel-float--dragging .pa-edit-panel-drag{cursor:grabbing}.pa-edit-panel-grip{display:grid;grid-template-columns:repeat(2,4px);gap:3px}.pa-edit-panel-grip span{display:block;width:4px;height:4px;border-radius:50%;background:currentColor}.pa-edit-title{all:unset;display:block;font-size:14px;font-weight:600;letter-spacing:-.02em;flex:1}.pa-edit-hint{font-size:12px;color:var(--pa-text-secondary);margin:0;line-height:1.5}.pa-edit-state-hint{font-size:11px;color:var(--pa-text-secondary);margin:0 0 8px;line-height:1.45}.pa-edit-actions{display:flex;gap:8px;margin-top:8px}.pa-edit-actions .pa-glass-btn{display:inline-flex;align-items:center;justify-content:center}.pa-glass-btn-inner{display:inline-flex;align-items:center;gap:6px}.pa-glass-btn-icon{width:14px;height:14px;flex-shrink:0;opacity:.92}.pa-preview-disabled{opacity:.55;pointer-events:none}.pa-edit-meta{display:flex;flex-direction:column;gap:3px;margin-bottom:4px}.pa-edit-meta code,.pa-edit-meta-label{font-size:12px;font-weight:500;color:var(--pa-accent-bright);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pa-edit-source{font-size:10px;color:var(--pa-text-secondary)}.pa-edit-source--warn{color:var(--pa-warning, #e8a838);line-height:1.4}.pa-edit-text-input{min-height:72px;font-size:13px;line-height:1.55}.pa-edit-sections{display:flex;flex-direction:column}.pa-edit-section{border-bottom:1px solid rgba(255,255,255,.06)}.pa-edit-section:last-child{border-bottom:none}.pa-edit-section-header{box-sizing:border-box;display:flex;align-items:center;gap:6px;width:100%;padding:10px 2px 8px;color:#ffffffb8}.pa-edit-section-header-toggle,.pa-edit-section-chevron-btn{all:unset;box-sizing:border-box;display:flex;align-items:center;cursor:pointer}.pa-edit-section-header-toggle{flex:1;min-width:0;gap:8px}.pa-edit-section-header:hover{color:#ffffffeb}.pa-edit-section-title{font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;text-align:left}.pa-edit-section-action{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;flex-shrink:0;border-radius:6px;cursor:pointer;color:#ffffff8c;transition:color .14s ease,background .14s ease}.pa-edit-section-action:hover,.pa-edit-section-action[aria-expanded=true]{color:#fffffff2;background:#ffffff14}.pa-edit-section-action-icon{width:15px;height:15px}.pa-edit-section-chevron-btn{flex-shrink:0;padding:2px;margin-left:6px}.pa-edit-section-badge{font-size:10px;color:var(--pa-text-secondary)}.pa-edit-section-chevron{width:16px;height:16px;transform:rotate(-180deg);transition:transform .16s ease;opacity:.55}.pa-edit-section:not(.pa-edit-section--open) .pa-edit-section-chevron{transform:rotate(0)}.pa-edit-section-body{display:flex;flex-direction:column;gap:10px;padding:0 2px 12px}.pa-edit-field-label{display:block;font-size:10px;font-weight:500;letter-spacing:.04em;color:var(--pa-text-secondary);margin-bottom:5px}.pa-edit-stack-field{display:flex;flex-direction:column}.pa-edit-field-block{display:flex;flex-direction:column;gap:6px}.pa-edit-field-grid{display:grid;gap:10px}.pa-edit-field-grid--2{grid-template-columns:1fr 1fr}.pa-edit-mini-field{display:flex;flex-direction:column;min-width:0}.pa-edit-mini-field .pa-select{font-size:12px;padding:7px 8px}.pa-edit-inline-hint{font-size:10px;line-height:1.45;color:var(--pa-text-secondary);margin:0}.pa-edit-split-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px 10px}.pa-edit-split-fields .pa-prop-row{grid-template-columns:1fr;gap:4px}.pa-segmented{display:flex;width:100%;border-radius:10px;border:1px solid rgba(255,255,255,.14);background:#00000047;overflow:hidden}.pa-segmented-btn{all:unset;box-sizing:border-box;flex:1;display:inline-flex;align-items:center;justify-content:center;min-width:0;height:34px;color:#ffffff80;border-right:1px solid rgba(255,255,255,.1);cursor:pointer;transition:background .12s ease,color .12s ease}.pa-segmented-btn:last-child{border-right:none}.pa-segmented-btn:hover{background:#ffffff0f;color:#ffffffd1}.pa-segmented-btn--on{background:#ffffff24;color:#fffffff2}.pa-segmented-icon{display:block;width:16px;height:16px;flex-shrink:0}.pa-segmented-type{font-size:13px;font-weight:600;line-height:1;font-family:var(--pa-font, system-ui, sans-serif)}.pa-segmented-type--bold{font-weight:700}.pa-segmented-type--italic{font-style:italic;font-weight:600}.pa-segmented-type--underline{text-decoration:underline;text-underline-offset:2px}.pa-font-family-select{width:100%;font-size:13px;padding:9px 32px 9px 10px;color:#ffffffe0;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff99' d='M3 4.5 6 8l3-3.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center}.pa-font-family-select:invalid,.pa-font-family-select option[value=""]{color:#ffffff73}.pa-edit-size-row .pa-prop-row{grid-template-columns:1fr;gap:4px}.pa-edit-size-row .pa-prop-scrub-value{width:100%}.pa-color-field{display:flex;flex-direction:column;gap:6px}.pa-color-field-trigger{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:10px;width:100%;padding:6px 8px;border-radius:10px;border:1px solid rgba(255,255,255,.12);background:#00000038;cursor:pointer;transition:border-color .14s ease,background .14s ease}.pa-color-field-trigger:hover{border-color:#ffffff38;background:#ffffff0f}.pa-color-field-trigger[aria-expanded=true]{border-color:#818cf873;background:#6366f11f}.pa-color-field-swatch{width:28px;height:28px;flex-shrink:0;border-radius:8px;border:1px solid rgba(255,255,255,.2);box-shadow:inset 0 0 0 1px #00000026}.pa-color-field-hex{flex:1;min-width:0;pointer-events:none;font-family:var(--pa-font-mono);font-size:12px}.pa-color-picker-portal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:calc(var(--pa-z) + 50);pointer-events:none}.pa-color-picker-portal .pa-color-picker{pointer-events:auto}.pa-color-picker{position:fixed;z-index:calc(var(--pa-z) + 50);box-sizing:border-box;padding:14px;border-radius:14px;border:1px solid rgba(255,255,255,.14);background:#121214f0;backdrop-filter:blur(20px) saturate(140%);-webkit-backdrop-filter:blur(20px) saturate(140%);box-shadow:0 4px 6px #0000001f,0 16px 40px #00000073,inset 0 1px #ffffff14;display:flex;flex-direction:column;gap:12px}.pa-color-picker-header{display:flex;align-items:center;gap:10px}.pa-color-picker-preview{width:22px;height:22px;flex-shrink:0;border-radius:6px;border:1px solid rgba(255,255,255,.18);box-shadow:inset 0 0 0 1px #0000001f}.pa-color-picker-header-label{font-size:13px;font-weight:500;color:#ffffff8c;letter-spacing:-.01em}.pa-color-picker-sb{position:relative;width:100%;height:148px;border-radius:10px;border:1px solid rgba(255,255,255,.1);overflow:hidden;cursor:crosshair;touch-action:none;background:linear-gradient(to bottom,transparent,#000),linear-gradient(to right,#fff,hsl(var(--pa-picker-h, 0) 100% 50%))}.pa-color-picker-sb-thumb{position:absolute;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px #00000059,0 2px 6px #00000059;pointer-events:none}.pa-color-picker-hue{position:relative;height:14px;border-radius:999px;border:1px solid rgba(255,255,255,.08);background:linear-gradient(90deg,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.pa-color-picker-hue-input{position:absolute;top:-4px;right:0;bottom:-4px;left:0;width:100%;height:calc(100% + 8px);margin:0;opacity:0;cursor:pointer}.pa-color-picker-hue-thumb{position:absolute;top:50%;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px #0000004d,0 1px 4px #00000059;pointer-events:none}.pa-color-picker-field{display:flex;flex-direction:column;gap:6px}.pa-color-picker-field--rgb{flex:1;min-width:0}.pa-color-picker-field-label{font-size:11px;font-weight:500;color:#ffffff73;letter-spacing:.02em}.pa-color-picker-input{width:100%;font-family:var(--pa-font-mono);font-size:12px;padding:8px 10px!important;border-radius:8px;border:1px solid rgba(255,255,255,.12)!important;background:#00000059!important;color:#ffffffe6!important;transition:border-color .14s ease,box-shadow .14s ease}.pa-color-picker-input:hover{border-color:#fff3!important}.pa-color-picker-input:focus{outline:none;border-color:#818cf88c!important;box-shadow:0 0 0 2px #6366f140}.pa-color-picker-rgb{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.pa-color-picker-field--rgb .pa-color-picker-input{text-align:center;padding-left:6px!important;padding-right:6px!important}.pa-color-picker-input[type=number]::-webkit-inner-spin-button,.pa-color-picker-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.pa-text-styles-portal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:calc(var(--pa-z) + 50);pointer-events:none}.pa-text-styles{pointer-events:auto;position:fixed;z-index:calc(var(--pa-z) + 50);box-sizing:border-box;display:flex;flex-direction:column;padding:8px;gap:8px;border-radius:14px;border:1px solid rgba(255,255,255,.14);background:#121214f0;backdrop-filter:blur(20px) saturate(140%);-webkit-backdrop-filter:blur(20px) saturate(140%);box-shadow:0 4px 6px #0000001f,0 16px 40px #00000073,inset 0 1px #ffffff14}.pa-text-styles-header{display:flex;align-items:center;justify-content:space-between;padding:2px 4px 0}.pa-text-styles-title{font-size:13px;font-weight:600;color:#ffffffeb;letter-spacing:-.01em}.pa-text-styles-close{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:6px;cursor:pointer;font-size:18px;line-height:1;color:#ffffff8c;transition:color .14s ease,background .14s ease}.pa-text-styles-close:hover{color:#fffffff2;background:#ffffff14}.pa-text-styles-search{position:relative;display:flex;align-items:center}.pa-text-styles-search-icon{position:absolute;left:10px;color:#fff6;pointer-events:none}.pa-text-styles-search-input{width:100%;font-size:13px;padding:8px 10px 8px 30px!important;border-radius:8px;border:1px solid rgba(255,255,255,.12)!important;background:#00000059!important;color:#ffffffe6!important;transition:border-color .14s ease,box-shadow .14s ease}.pa-text-styles-search-input:focus{outline:none;border-color:#818cf88c!important;box-shadow:0 0 0 2px #6366f140}.pa-text-styles-list{display:flex;flex-direction:column;max-height:260px;overflow-y:auto;margin:0 -2px;padding:0 2px}.pa-text-styles-row{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:12px;width:100%;padding:8px 10px;border-radius:8px;cursor:pointer;color:#ffffffe6;transition:background .12s ease}.pa-text-styles-row:hover{background:#ffffff0f}.pa-text-styles-row--active{background:#ffffff1a}.pa-text-styles-specimen{flex-shrink:0;width:26px;font-size:18px;line-height:1;font-weight:500;text-align:center;color:#ffffffeb}.pa-text-styles-row-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.pa-text-styles-row-metrics{flex-shrink:0;font-size:12px;color:#ffffff73}.pa-text-styles-empty{margin:0;padding:16px 10px;text-align:center;font-size:12px;color:#ffffff73}.pa-color-field-label-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:5px}.pa-color-field-label-row .pa-edit-field-label{margin-bottom:0}.pa-color-presets-swatch{flex-shrink:0;width:18px;height:18px;border-radius:5px;border:1px solid rgba(255,255,255,.18);box-shadow:inset 0 0 0 1px #0000001f}.pa-prop-row{display:grid;grid-template-columns:88px minmax(0,1fr);align-items:center;gap:10px;padding:2px 0}.pa-prop-row--compact{grid-template-columns:72px minmax(0,1fr)}.pa-prop-label{font-size:10px;font-weight:500;letter-spacing:.06em;text-transform:uppercase;color:var(--pa-text-secondary)}.pa-scrub-label{cursor:ew-resize;-webkit-user-select:none;user-select:none;touch-action:none}.pa-scrub-label:hover,.pa-scrub-label--active{color:var(--pa-text)}.pa-prop-scrub-value{width:100%;text-align:left}.pa-spacing-control{display:flex;align-items:stretch;gap:6px;min-width:0}.pa-spacing-pair,.pa-spacing-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px;flex:1;min-width:0}.pa-spacing-grid{grid-template-rows:1fr 1fr}.pa-spacing-cell{position:relative;display:flex;align-items:center;min-width:0}.pa-spacing-cell-icon{position:absolute;left:7px;top:50%;transform:translateY(-50%);display:inline-flex;color:#ffffff8c;pointer-events:none}.pa-spacing-cell-icon--scrub{pointer-events:auto;cursor:ew-resize;touch-action:none}.pa-spacing-cell-icon--scrub:hover,.pa-spacing-cell-icon--active{color:var(--pa-text)}.pa-spacing-cell-input{width:100%;padding:6px 6px 6px 24px!important;text-align:left;font-family:var(--pa-font-mono);font-size:11px}.pa-spacing-cell--mixed .pa-spacing-cell-input{color:#ffffffb3}.pa-spacing-cell--mixed .pa-spacing-cell-icon{color:#fff6}.pa-spacing-toggle{all:unset;display:inline-flex;align-items:center;justify-content:center;width:26px;min-height:26px;border-radius:6px;border:1px solid rgba(255,255,255,.08);color:#ffffff8c;cursor:pointer;flex-shrink:0;transition:background .12s ease,color .12s ease,border-color .12s ease}.pa-spacing-toggle:hover:not(:disabled){background:#ffffff0f;color:#ffffffe6}.pa-spacing-toggle--on{background:#ffffff1f;color:#fffffff2;border-color:#ffffff2e}.pa-spacing-toggle:disabled{opacity:.4;cursor:not-allowed}.pa-edit-panel-glass .pa-prop-row .pa-input{font-family:var(--pa-font-mono);font-size:11px;padding:6px 8px;border-radius:6px;color:#ffffffe0}.pa-edit-panel-glass .pa-select,.pa-edit-panel-glass .pa-textarea{border-radius:var(--pa-field-radius)}.pa-edit-footer{display:flex;align-items:center;justify-content:space-between;margin-top:8px;padding-top:10px}.pa-change-count{font-size:11px;color:var(--pa-text-secondary)}.pa-change-count--success{color:var(--pa-success)}.pa-change-count--error{color:#fca5a5}.pa-popover-body{display:flex;flex-direction:column;gap:10px}.pa-popover-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px}.pa-popover-context{display:flex;flex-direction:column;gap:4px;padding:8px 10px;border-radius:var(--pa-field-radius);background:#0003;border:1px solid rgba(255,255,255,.08)}.pa-popover-context-line{margin:0;font-size:11px;line-height:1.45;color:var(--pa-text)}.pa-popover-context-label{display:inline-block;min-width:52px;margin-right:6px;font-size:10px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--pa-text-secondary)}.pa-popover-hint{margin:0;font-size:10px;color:var(--pa-text-secondary)}.pa-area-select{position:fixed;pointer-events:none;z-index:calc(var(--pa-z) - 3);border:2px dashed var(--pa-accent-bright);background:#6366f114;border-radius:4px}.pa-area-select--dragging{background:#6366f124}.pa-session-panel-float{position:fixed;top:16px;right:16px;z-index:calc(var(--pa-z) + 3);width:360px}.pa-session-panel-float--dragging{-webkit-user-select:none;user-select:none}.pa-session-panel-float .pa-glass-panel--sheet{position:relative;top:auto;right:auto;left:auto;width:100%}.pa-session-drag{all:unset;display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;cursor:grab;touch-action:none;flex-shrink:0;color:#ffffff73;transition:background .15s ease,color .15s ease}.pa-session-drag:hover{background:#ffffff1a;color:#ffffffd9}.pa-session-panel-float--dragging .pa-session-drag{cursor:grabbing}.pa-session-grip{display:grid;grid-template-columns:repeat(2,4px);gap:3px}.pa-session-grip span{display:block;width:4px;height:4px;border-radius:50%;background:currentColor}.pa-session-header{display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;gap:4px 8px;align-items:center;padding:14px;border-bottom:1px solid rgba(255,255,255,.1)}.pa-session-header-main{display:flex;align-items:center;gap:4px;grid-column:1;min-width:0}.pa-session-title{all:unset;font-size:14px;font-weight:600;letter-spacing:-.02em}.pa-session-subtitle{grid-column:1;margin:0;font-size:10px;color:var(--pa-text-secondary)}.pa-session-actions{grid-column:2;grid-row:1 / span 2}.pa-session-status{margin:0;padding:8px 14px 0;font-size:11px;color:var(--pa-accent-bright)}.pa-session-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.pa-session-target{font-size:11px;font-weight:600;font-family:var(--pa-font-mono, ui-monospace, monospace);color:var(--pa-accent-bright);letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pa-session-note{margin:0;font-size:13px;font-weight:500;line-height:1.4;color:var(--pa-text);word-break:break-word}.pa-session-meta-line{margin:0;font-size:10px;line-height:1.35;color:var(--pa-text-secondary);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.pa-session-meta{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}.pa-session-badge{font-size:9px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;padding:1px 6px;border-radius:999px;color:var(--pa-text-secondary);background:#ffffff14}.pa-session-edit{flex:1;display:flex;flex-direction:column;gap:8px}.pa-session-item-actions{display:flex;flex-shrink:0;flex-direction:row;align-items:center;gap:2px}.pa-session-action-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;padding-left:0;padding-right:0}.pa-session-list{list-style:none;margin:0;padding:10px;overflow-y:auto;display:flex;flex-direction:column;gap:6px;max-height:calc(60vh - 60px)}.pa-session-item{display:flex;align-items:flex-start;gap:8px;padding:10px;background:#0000002e;border:1px solid rgba(255,255,255,.08);border-radius:var(--pa-glass-radius-control);transition:background .08s ease,border-color .08s ease,box-shadow .08s ease}.pa-session-item--active{border-color:var(--pa-accent-bright);background:#6366f129;box-shadow:0 0 0 1px #6366f159}.pa-session-empty{font-size:12px;color:var(--pa-text-secondary);padding:16px;text-align:center;line-height:1.5}`, Tt = "pixelagent-base-styles";
|
|
3729
|
+
const Cr = `.pa-root{--pa-glass-blur: 4px;--pa-glass-saturate: 130%;--pa-glass-opacity: .78;--pa-glass-tint: rgba(255, 255, 255, .08);--pa-glass-tint-accent: rgba(99, 102, 241, .32);--pa-glass-border: rgba(255, 255, 255, .28);--pa-glass-rim: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 0 0 1px rgba(255, 255, 255, .06), inset 1px 0 0 rgba(255, 255, 255, .18), inset -1px 0 0 rgba(255, 255, 255, .18), inset 0 -1px 1px rgba(0, 0, 0, .18);--pa-glass-shadow: 0 1px 1px rgba(0, 0, 0, .06), 0 4px 12px rgba(0, 0, 0, .14), 0 12px 40px rgba(0, 0, 0, .32);--pa-glass-specular: radial-gradient( ellipse 65% 45% at 22% 14%, rgba(255, 255, 255, .38) 0%, rgba(255, 255, 255, .08) 38%, transparent 72% );--pa-glass-underglow: radial-gradient( ellipse 95% 38% at 50% 100%, rgba(129, 140, 248, .18) 0%, transparent 60% );--pa-glass-radius-bar: 999px;--pa-glass-radius-panel: 20px;--pa-glass-radius-popover: 16px;--pa-glass-radius-control: 10px;--pa-glass-group-gap: 10px;--pa-glass-morph-duration: .32s;--pa-glass-morph-easing: cubic-bezier(.4, 0, .2, 1);--pa-glass-fallback-bg: rgba(28, 28, 30, .94);--pa-glass-fallback-border: rgba(255, 255, 255, .12);--pa-glass-surface-fill: rgba(255, 255, 255, .06);--pa-glass-control-hover: rgba(255, 255, 255, .12);--pa-glass-control-active: rgba(255, 255, 255, .18);--pa-divider: rgba(255, 255, 255, .08);--pa-tooltip-bg: rgba(20, 20, 24, .82);--pa-tooltip-border: rgba(255, 255, 255, .14);--pa-toolbar-segment-bg: rgba(0, 0, 0, .28);--pa-toolbar-segment-border: rgba(255, 255, 255, .06);--pa-toolbar-divider-color: rgba(255, 255, 255, .12);--pa-text: rgba(255, 255, 255, .92);--pa-text-secondary: rgba(255, 255, 255, .62);--pa-accent: #818cf8;--pa-accent-bright: #a5b4fc;--pa-success: #6ee7b7;--pa-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--pa-font-mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, monospace;--pa-z: 2147483640;--pa-field-bg: rgba(255, 255, 255, .04);--pa-field-bg-hover: rgba(255, 255, 255, .06);--pa-field-border: rgba(255, 255, 255, .12);--pa-field-border-hover: rgba(255, 255, 255, .2);--pa-field-border-focus: rgba(255, 255, 255, .32);--pa-field-radius: 8px}@media(prefers-reduced-transparency:reduce){.pa-root{--pa-glass-blur: 0px;--pa-glass-saturate: 100%;--pa-glass-opacity: 1;--pa-glass-tint: var(--pa-glass-fallback-bg);--pa-glass-tint-accent: rgba(99, 102, 241, .85);--pa-glass-border: var(--pa-glass-fallback-border);--pa-glass-rim: none;--pa-glass-specular: none;--pa-glass-underglow: none}}@media(prefers-reduced-motion:reduce){.pa-root{--pa-glass-morph-duration: 0ms}}.pa-root[data-pa-chrome=dim],.pa-root--toolbar-portal[data-pa-chrome=dim]{--pa-glass-blur: 16px;--pa-glass-saturate: 125%;--pa-glass-opacity: .88;--pa-glass-tint: rgba(92, 92, 96, .68);--pa-glass-tint-accent: rgba(100, 100, 104, .74);--pa-glass-surface-fill: rgba(96, 96, 100, .64);--pa-glass-border: rgba(255, 255, 255, .2);--pa-glass-rim: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 0 0 1px rgba(255, 255, 255, .05), inset 1px 0 0 rgba(255, 255, 255, .08), inset -1px 0 0 rgba(255, 255, 255, .08), inset 0 -1px 1px rgba(0, 0, 0, .22);--pa-glass-shadow: 0 2px 4px rgba(0, 0, 0, .08), 0 10px 32px rgba(0, 0, 0, .14), 0 24px 48px rgba(0, 0, 0, .1);--pa-glass-specular: radial-gradient( ellipse 68% 48% at 22% 10%, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .1) 40%, transparent 72% );--pa-glass-underglow: none;--pa-glass-fallback-bg: rgba(82, 82, 86, .96);--pa-glass-fallback-border: rgba(255, 255, 255, .12);--pa-glass-control-hover: rgba(255, 255, 255, .1);--pa-glass-control-active: rgba(255, 255, 255, .16);--pa-divider: rgba(255, 255, 255, .1);--pa-tooltip-bg: rgba(82, 82, 86, .96);--pa-tooltip-border: rgba(255, 255, 255, .18);--pa-toolbar-segment-bg: rgba(0, 0, 0, .18);--pa-toolbar-segment-border: rgba(255, 255, 255, .08);--pa-toolbar-divider-color: rgba(255, 255, 255, .14);--pa-text: rgba(255, 255, 255, .94);--pa-text-secondary: rgba(255, 255, 255, .58);--pa-accent: #a5b4fc;--pa-accent-bright: #c7d2fe;--pa-success: #6ee7b7;--pa-field-bg: rgba(255, 255, 255, .06);--pa-field-bg-hover: rgba(255, 255, 255, .09);--pa-field-border: rgba(255, 255, 255, .14);--pa-field-border-hover: rgba(255, 255, 255, .22);--pa-field-border-focus: rgba(255, 255, 255, .32)}.pa-glass-surface{position:relative;overflow:hidden;border:1px solid var(--pa-glass-border);box-shadow:var(--pa-glass-shadow),var(--pa-glass-rim);border-radius:inherit;backdrop-filter:blur(4px) saturate(130%);-webkit-backdrop-filter:blur(4px) saturate(130%);will-change:backdrop-filter}.pa-glass-surface.pa-toolbar-glass{backdrop-filter:blur(6px) saturate(138%);-webkit-backdrop-filter:blur(6px) saturate(138%)}.pa-glass-surface-blur{display:none}.pa-glass-surface-refraction{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;z-index:0;border-radius:inherit;pointer-events:none;opacity:0;transition:opacity .2s ease-out}.pa-glass-surface-refraction[data-pa-ready="1"]{opacity:1}.pa-glass-surface-bg{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;border-radius:inherit;background:linear-gradient(180deg,#ffffff1a,#fff0 28%),linear-gradient(0deg,#ffffff08,#fff0 22%),var(--pa-glass-surface-fill);pointer-events:none}@media(prefers-reduced-transparency:reduce){.pa-glass-surface{backdrop-filter:none;-webkit-backdrop-filter:none;background:var(--pa-glass-fallback-bg);border-color:var(--pa-glass-fallback-border);box-shadow:none}.pa-glass-surface-bg{filter:none;background:transparent}}.pa-glass-surface--accent{background:var(--pa-glass-tint-accent)}.pa-glass-surface-shine{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;border-radius:inherit;pointer-events:none;background:var(--pa-glass-specular);mix-blend-mode:screen}.pa-glass-surface:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;border-radius:inherit;pointer-events:none;background:var(--pa-glass-underglow);mix-blend-mode:screen}@media(prefers-reduced-transparency:reduce){.pa-glass-surface-shine,.pa-glass-surface:after{display:none}}.pa-glass-surface-content{position:relative;z-index:3}.pa-glass-container{display:flex;align-items:center;gap:var(--pa-glass-group-gap);font-family:var(--pa-font)}.pa-toolbar-float{position:fixed;bottom:24px;left:50%;margin-left:-150px;z-index:var(--pa-z);touch-action:none}.pa-toolbar-float--dragging{-webkit-user-select:none;user-select:none}.pa-toolbar-inner{display:flex;align-items:center;gap:6px;padding:6px 10px 6px 6px}.pa-toolbar-drag{all:unset;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;color:var(--pa-text);cursor:grab;touch-action:none;flex-shrink:0;transition:background .15s ease}.pa-toolbar-drag:hover{background:var(--pa-glass-control-hover)}.pa-brand-cursor{display:block;flex-shrink:0;pointer-events:none}.pa-brand-cursor--pointer{margin-top:-2px;margin-left:-1px}.pa-brand-cursor--minimal{display:block}.pa-toolbar-float--dragging .pa-toolbar-drag{cursor:grabbing;background:#ffffff24}.pa-toolbar-divider{width:1px;height:24px;background:var(--pa-toolbar-divider-color);flex-shrink:0}.pa-toolbar-segment{display:flex;align-items:center;gap:4px;padding:3px 4px;border-radius:999px;background:var(--pa-toolbar-segment-bg);border:1px solid var(--pa-toolbar-segment-border)}.pa-toolbar-capture-select{width:auto;min-width:76px;padding:6px 28px 6px 10px;font-size:12px;font-weight:500;letter-spacing:0;text-transform:none;border-radius:999px;cursor:pointer}.pa-toolbar-close{margin-left:2px;flex-shrink:0}.pa-toolbar-status{font-size:11px;padding:0 8px;white-space:nowrap}.pa-settings-menu{position:absolute;right:8px;bottom:calc(100% + 12px);z-index:2;width:min(280px,calc(100vw - 32px));pointer-events:auto}.pa-settings-menu-panel{width:100%}.pa-settings-menu-inner{padding:14px 16px 16px}.pa-settings-menu-header{margin-bottom:14px}.pa-settings-menu-title{margin:0;font-size:14px;font-weight:600;color:var(--pa-text)}.pa-settings-menu-subtitle{margin:4px 0 0;font-size:11px;color:var(--pa-text-secondary)}.pa-settings-section{padding:12px 0;border-top:1px solid var(--pa-divider)}.pa-settings-section:first-of-type{border-top:none;padding-top:0}.pa-settings-section-label{display:block;font-size:10px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--pa-text-secondary);margin-bottom:8px}.pa-settings-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.pa-settings-row-value{font-size:12px;color:var(--pa-text)}.pa-settings-hint{margin:0;font-size:11px;line-height:1.45;color:var(--pa-text-secondary)}.pa-glass-group{flex-shrink:0}.pa-glass-group-inner{display:flex;align-items:center;gap:2px;padding:4px 6px}.pa-glass-group--brand .pa-glass-group-inner{padding:6px 14px}.pa-glass-btn{all:unset;box-sizing:border-box;cursor:pointer;font-family:var(--pa-font);font-size:12px;font-weight:500;color:var(--pa-text);padding:6px 12px;border-radius:var(--pa-glass-radius-control);white-space:nowrap;transition:background var(--pa-glass-morph-duration) var(--pa-glass-morph-easing),transform .12s ease,color var(--pa-glass-morph-duration) ease}.pa-glass-btn:hover:not(:disabled){background:var(--pa-glass-control-hover)}.pa-glass-btn:active:not(:disabled){transform:scale(.97);background:var(--pa-glass-control-active)}.pa-glass-btn:disabled{opacity:.38;cursor:not-allowed}.pa-glass-btn--glass-primary,.pa-glass-btn--prominent{position:relative;color:#fff;font-weight:600;padding:8px 16px;background:#ffffff1a;backdrop-filter:blur(12px) saturate(140%);-webkit-backdrop-filter:blur(12px) saturate(140%);border:1px solid rgba(255,255,255,.28);box-shadow:inset 0 1px #fff6,0 4px 16px #00000026}.pa-glass-btn--glass-primary:before,.pa-glass-btn--prominent:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:inherit;background:linear-gradient(135deg,rgba(255,255,255,.22) 0%,transparent 45%,transparent 100%);pointer-events:none}.pa-glass-btn--glass-primary:hover:not(:disabled),.pa-glass-btn--prominent:hover:not(:disabled){background:#ffffff29;border-color:#ffffff61;box-shadow:inset 0 1px #ffffff73,0 6px 20px #0003}@media(prefers-reduced-transparency:reduce){.pa-glass-btn--glass-primary,.pa-glass-btn--prominent{backdrop-filter:none;-webkit-backdrop-filter:none;background:#3c3c46e6}}.pa-glass-btn--icon{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border-radius:50%;color:#ffffffbf;background:#ffffff0f;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.14);box-shadow:inset 0 1px #ffffff1f}.pa-glass-btn--icon:hover:not(:disabled){color:#fff;background:#ffffff1f;border-color:#ffffff38}.pa-glass-btn--ghost{color:var(--pa-text-secondary);padding:6px 10px}.pa-glass-btn--ghost:hover:not(:disabled){color:var(--pa-text);background:#ffffff14}.pa-glass-btn--active{background:#6366f173;color:#fff}.pa-glass-btn--sm{padding:2px 8px;font-size:11px}.pa-glass-panel{font-family:var(--pa-font);color:var(--pa-text)}.pa-glass-panel--sheet.pa-glass-panel--left{position:fixed;top:16px;left:16px;z-index:var(--pa-z);width:288px;max-height:calc(100vh - 100px)}.pa-glass-panel--sheet.pa-glass-panel--right{position:fixed;top:16px;right:16px;z-index:var(--pa-z);width:360px;max-height:60vh}.pa-glass-panel--popover{position:fixed;z-index:calc(var(--pa-z) + 2);width:300px}.pa-glass-panel .pa-glass-surface-content{padding:14px;display:flex;flex-direction:column;gap:10px}.pa-glass-panel--sheet .pa-glass-surface-content{padding:14px;overflow-y:auto;max-height:inherit}.pa-glass-panel--sheet.pa-glass-panel--right:not(.pa-edit-panel-glass) .pa-glass-surface-content{padding:0;gap:0}.pa-toolbar-brand{font-weight:600;font-size:12px;color:var(--pa-accent-bright);letter-spacing:-.01em}.pa-mode-badge{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--pa-text-secondary);padding:4px 10px}.pa-status{font-size:11px;font-weight:500;color:var(--pa-success);padding:4px 10px;animation:pa-status-in .28s var(--pa-glass-morph-easing)}.pa-copy-feedback-slot{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;font-size:12px;font-weight:600;white-space:nowrap;border-radius:999px;flex-shrink:0;animation:pa-status-in .28s var(--pa-glass-morph-easing)}.pa-copy-feedback-slot--toolbar{padding:8px 16px;min-height:34px}.pa-copy-feedback-slot--session{padding:8px 14px;min-height:34px}.pa-copy-feedback-slot--item{padding:6px 10px;min-width:44px;min-height:28px;font-size:11px}@keyframes pa-status-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.pa-status{animation:none}}.pa-glass-divider{width:1px;height:16px;background:#ffffff26;margin:0 2px;flex-shrink:0}.pa-root{all:initial;font-family:var(--pa-font);font-size:13px;line-height:1.4;color:var(--pa-text)}.pa-root--toolbar-portal{all:unset;position:static;font-family:var(--pa-font);font-size:13px;line-height:1.4;color:var(--pa-text);pointer-events:none}.pa-root--toolbar-portal .pa-toolbar-float{pointer-events:auto}.pa-root *,.pa-root *:before,.pa-root *:after{box-sizing:border-box}.pa-highlight{position:fixed;pointer-events:none;z-index:calc(var(--pa-z) - 2);border:2px solid var(--pa-accent);background:#6366f11f;border-radius:4px;box-shadow:0 0 0 1px #6366f140;transition:top .05s,left .05s,width .05s,height .05s,background var(--pa-glass-morph-duration) ease}.pa-highlight-selected{background:#6366f138;border-color:var(--pa-accent-bright);box-shadow:0 0 0 2px #6366f159,0 0 20px #6366f126}.pa-highlight-scope{background:#6366f129;border-style:dashed}.pa-highlight-primary{border-width:2px;background:#6366f147;box-shadow:0 0 0 3px #6366f173,0 0 24px #6366f133}.pa-annotation-badge{position:fixed;pointer-events:auto;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;z-index:calc(var(--pa-z) - 1);min-width:22px;height:22px;padding:0 6px;display:inline-flex;align-items:center;justify-content:center;font-family:var(--pa-font);font-size:12px;font-weight:700;line-height:1;color:#fff;background:#6669f8;border:none;border-radius:999px;box-shadow:0 2px 10px #37348c52;transform:translate(-50%,-50%);transition:top .05s,left .05s,transform .08s ease,background .08s ease,box-shadow .08s ease}.pa-annotation-badge:hover,.pa-annotation-badge--active{background:#7c7ffa;transform:translate(-50%,-50%) scale(1.18);box-shadow:0 0 0 3px #6366f173,0 2px 14px #37348c73}.pa-annotation-preview{position:fixed;pointer-events:none;z-index:calc(var(--pa-z) - 1);transform:translateY(-100%);display:flex;flex-direction:column;gap:3px;max-width:260px;padding:8px 10px;border-radius:8px;font-family:var(--pa-font);background:var(--pa-tooltip-bg);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--pa-tooltip-border);box-shadow:0 6px 24px #00000047}.pa-annotation-preview--below{transform:none}.pa-annotation-preview-target{font-family:var(--pa-font-mono, ui-monospace, monospace);font-size:10px;font-weight:600;letter-spacing:-.01em;color:var(--pa-accent-bright);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pa-annotation-preview-note{font-size:12px;font-weight:500;line-height:1.4;color:var(--pa-text);word-break:break-word;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}@media(prefers-reduced-transparency:reduce){.pa-annotation-preview{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--pa-glass-fallback-bg);border-color:var(--pa-glass-fallback-border)}}.pa-tooltip{position:fixed;pointer-events:none;z-index:calc(var(--pa-z) - 1);font-family:var(--pa-font);font-size:12px;font-weight:600;letter-spacing:-.01em;color:var(--pa-text);padding:4px 8px;border-radius:6px;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:var(--pa-tooltip-bg);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--pa-tooltip-border)}@media(prefers-reduced-transparency:reduce){.pa-tooltip{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--pa-glass-fallback-bg);border-color:var(--pa-glass-fallback-border)}}.pa-label{display:flex;flex-direction:column;gap:6px;font-size:11px;font-weight:500;letter-spacing:.04em;text-transform:uppercase;color:var(--pa-text-secondary);font-family:var(--pa-font)}.pa-select,.pa-input,.pa-textarea{font-family:var(--pa-font);font-size:12px;font-weight:400;line-height:1.4;color:var(--pa-text);background-color:var(--pa-field-bg);border:1px solid var(--pa-field-border);border-radius:var(--pa-field-radius);padding:8px 10px;outline:none;width:100%;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease}.pa-select{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;padding-right:28px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='rgba(255,255,255,0.45)' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center}.pa-select:hover:not(:focus),.pa-input:hover:not(:focus),.pa-textarea:hover:not(:focus){background-color:var(--pa-field-bg-hover);border-color:var(--pa-field-border-hover)}.pa-select:focus,.pa-input:focus,.pa-textarea:focus{background-color:#ffffff0d;border-color:var(--pa-field-border-focus);box-shadow:inset 0 1px #ffffff0f}.pa-textarea{resize:vertical;min-height:64px;line-height:1.5}@media(prefers-reduced-transparency:reduce){.pa-select,.pa-input,.pa-textarea{background-color:var(--pa-glass-fallback-bg);border-color:var(--pa-glass-fallback-border)}.pa-select:focus,.pa-input:focus,.pa-textarea:focus{border-color:var(--pa-accent)}}.pa-popover-header{display:flex;flex-direction:column;gap:3px}.pa-popover-selector{font-size:11px;font-weight:500;color:var(--pa-accent-bright);word-break:break-all}.pa-popover-actions{display:flex;justify-content:flex-end;gap:6px;margin-top:2px}.pa-edit-panel-float{position:fixed;right:16px;top:16px;z-index:calc(var(--pa-z) + 4);width:312px;max-height:calc(100vh - 32px)}.pa-edit-panel-float--dragging{-webkit-user-select:none;user-select:none}.pa-edit-panel-float .pa-glass-panel--sheet{position:relative;top:auto;left:auto;right:auto;width:100%;max-height:calc(100vh - 32px)}.pa-edit-panel-glass .pa-glass-surface-content{display:flex;flex-direction:column;min-height:0;max-height:calc(100vh - 32px);padding:14px 14px 12px}.pa-edit-panel-inner{display:flex;flex-direction:column;min-height:0;flex:1;gap:10px}.pa-edit-panel-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;margin:0 -4px;padding:0 4px;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.2) transparent}.pa-edit-panel-sticky{flex-shrink:0;padding-top:4px;border-top:1px solid rgba(255,255,255,.08)}.pa-edit-panel-header{display:flex;align-items:center;gap:8px}.pa-edit-panel-drag{all:unset;display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;cursor:grab;touch-action:none;flex-shrink:0;color:#ffffff73;transition:background .15s ease,color .15s ease}.pa-edit-panel-drag:hover{background:#ffffff1a;color:#ffffffd9}.pa-edit-panel-float--dragging .pa-edit-panel-drag{cursor:grabbing}.pa-edit-panel-grip{display:grid;grid-template-columns:repeat(2,4px);gap:3px}.pa-edit-panel-grip span{display:block;width:4px;height:4px;border-radius:50%;background:currentColor}.pa-edit-title{all:unset;display:block;font-size:14px;font-weight:600;letter-spacing:-.02em;flex:1}.pa-edit-hint{font-size:12px;color:var(--pa-text-secondary);margin:0;line-height:1.5}.pa-edit-state-hint{font-size:11px;color:var(--pa-text-secondary);margin:0 0 8px;line-height:1.45}.pa-edit-actions{display:flex;gap:8px;margin-top:8px}.pa-edit-actions .pa-glass-btn{display:inline-flex;align-items:center;justify-content:center}.pa-glass-btn-inner{display:inline-flex;align-items:center;gap:6px}.pa-glass-btn-icon{width:14px;height:14px;flex-shrink:0;opacity:.92}.pa-preview-disabled{opacity:.55;pointer-events:none}.pa-edit-meta{display:flex;flex-direction:column;gap:3px;margin-bottom:4px}.pa-edit-meta code,.pa-edit-meta-label{font-size:12px;font-weight:500;color:var(--pa-accent-bright);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pa-edit-source{font-size:10px;color:var(--pa-text-secondary)}.pa-edit-source--warn{color:var(--pa-warning, #e8a838);line-height:1.4}.pa-edit-text-input{min-height:72px;font-size:13px;line-height:1.55}.pa-edit-sections{display:flex;flex-direction:column}.pa-edit-section{border-bottom:1px solid rgba(255,255,255,.06)}.pa-edit-section:last-child{border-bottom:none}.pa-edit-section-header{box-sizing:border-box;display:flex;align-items:center;gap:6px;width:100%;padding:10px 2px 8px;color:#ffffffb8}.pa-edit-section-header-toggle,.pa-edit-section-chevron-btn{all:unset;box-sizing:border-box;display:flex;align-items:center;cursor:pointer}.pa-edit-section-header-toggle{flex:1;min-width:0;gap:8px}.pa-edit-section-header:hover{color:#ffffffeb}.pa-edit-section-title{font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;text-align:left}.pa-edit-section-action{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;flex-shrink:0;border-radius:6px;cursor:pointer;color:#ffffff8c;transition:color .14s ease,background .14s ease}.pa-edit-section-action:hover,.pa-edit-section-action[aria-expanded=true]{color:#fffffff2;background:#ffffff14}.pa-edit-section-action-icon{width:15px;height:15px}.pa-edit-section-chevron-btn{flex-shrink:0;padding:2px;margin-left:6px}.pa-edit-section-badge{font-size:10px;color:var(--pa-text-secondary)}.pa-edit-section-chevron{width:16px;height:16px;transform:rotate(-180deg);transition:transform .16s ease;opacity:.55}.pa-edit-section:not(.pa-edit-section--open) .pa-edit-section-chevron{transform:rotate(0)}.pa-edit-section-body{display:flex;flex-direction:column;gap:10px;padding:0 2px 12px}.pa-edit-field-label{display:block;font-size:10px;font-weight:500;letter-spacing:.04em;color:var(--pa-text-secondary);margin-bottom:5px}.pa-edit-stack-field{display:flex;flex-direction:column}.pa-edit-field-block{display:flex;flex-direction:column;gap:6px}.pa-edit-field-grid{display:grid;gap:10px}.pa-edit-field-grid--2{grid-template-columns:1fr 1fr}.pa-edit-mini-field{display:flex;flex-direction:column;min-width:0}.pa-edit-mini-field .pa-select{font-size:12px;padding:7px 8px}.pa-edit-inline-hint{font-size:10px;line-height:1.45;color:var(--pa-text-secondary);margin:0}.pa-edit-split-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px 10px}.pa-edit-split-fields .pa-prop-row{grid-template-columns:1fr;gap:4px}.pa-segmented{display:flex;width:100%;border-radius:10px;border:1px solid rgba(255,255,255,.14);background:#00000047;overflow:hidden}.pa-segmented-btn{all:unset;box-sizing:border-box;flex:1;display:inline-flex;align-items:center;justify-content:center;min-width:0;height:34px;color:#ffffff80;border-right:1px solid rgba(255,255,255,.1);cursor:pointer;transition:background .12s ease,color .12s ease}.pa-segmented-btn:last-child{border-right:none}.pa-segmented-btn:hover{background:#ffffff0f;color:#ffffffd1}.pa-segmented-btn--on{background:#ffffff24;color:#fffffff2}.pa-segmented-icon{display:block;width:16px;height:16px;flex-shrink:0}.pa-segmented-type{font-size:13px;font-weight:600;line-height:1;font-family:var(--pa-font, system-ui, sans-serif)}.pa-segmented-type--bold{font-weight:700}.pa-segmented-type--italic{font-style:italic;font-weight:600}.pa-segmented-type--underline{text-decoration:underline;text-underline-offset:2px}.pa-font-family-select{width:100%;font-size:13px;padding:9px 32px 9px 10px;color:#ffffffe0;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff99' d='M3 4.5 6 8l3-3.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center}.pa-font-family-select:invalid,.pa-font-family-select option[value=""]{color:#ffffff73}.pa-edit-size-row .pa-prop-row{grid-template-columns:1fr;gap:4px}.pa-edit-size-row .pa-prop-scrub-value{width:100%}.pa-color-field{display:flex;flex-direction:column;gap:6px}.pa-color-field-trigger{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:10px;width:100%;padding:6px 8px;border-radius:10px;border:1px solid rgba(255,255,255,.12);background:#00000038;cursor:pointer;transition:border-color .14s ease,background .14s ease}.pa-color-field-trigger:hover{border-color:#ffffff38;background:#ffffff0f}.pa-color-field-trigger[aria-expanded=true]{border-color:#818cf873;background:#6366f11f}.pa-color-field-swatch{width:28px;height:28px;flex-shrink:0;border-radius:8px;border:1px solid rgba(255,255,255,.2);box-shadow:inset 0 0 0 1px #00000026}.pa-color-field-hex{flex:1;min-width:0;pointer-events:none;font-family:var(--pa-font-mono);font-size:12px}.pa-color-picker-portal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:calc(var(--pa-z) + 50);pointer-events:none}.pa-color-picker-portal .pa-color-picker{pointer-events:auto}.pa-color-picker{position:fixed;z-index:calc(var(--pa-z) + 50);box-sizing:border-box;padding:14px;border-radius:14px;border:1px solid rgba(255,255,255,.14);background:#121214f0;backdrop-filter:blur(20px) saturate(140%);-webkit-backdrop-filter:blur(20px) saturate(140%);box-shadow:0 4px 6px #0000001f,0 16px 40px #00000073,inset 0 1px #ffffff14;display:flex;flex-direction:column;gap:12px}.pa-color-picker-header{display:flex;align-items:center;gap:10px}.pa-color-picker-preview{width:22px;height:22px;flex-shrink:0;border-radius:6px;border:1px solid rgba(255,255,255,.18);box-shadow:inset 0 0 0 1px #0000001f}.pa-color-picker-header-label{font-size:13px;font-weight:500;color:#ffffff8c;letter-spacing:-.01em}.pa-color-picker-sb{position:relative;width:100%;height:148px;border-radius:10px;border:1px solid rgba(255,255,255,.1);overflow:hidden;cursor:crosshair;touch-action:none;background:linear-gradient(to bottom,transparent,#000),linear-gradient(to right,#fff,hsl(var(--pa-picker-h, 0) 100% 50%))}.pa-color-picker-sb-thumb{position:absolute;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px #00000059,0 2px 6px #00000059;pointer-events:none}.pa-color-picker-hue{position:relative;height:14px;border-radius:999px;border:1px solid rgba(255,255,255,.08);background:linear-gradient(90deg,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.pa-color-picker-hue-input{position:absolute;top:-4px;right:0;bottom:-4px;left:0;width:100%;height:calc(100% + 8px);margin:0;opacity:0;cursor:pointer}.pa-color-picker-hue-thumb{position:absolute;top:50%;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px #0000004d,0 1px 4px #00000059;pointer-events:none}.pa-color-picker-field{display:flex;flex-direction:column;gap:6px}.pa-color-picker-field--rgb{flex:1;min-width:0}.pa-color-picker-field-label{font-size:11px;font-weight:500;color:#ffffff73;letter-spacing:.02em}.pa-color-picker-input{width:100%;font-family:var(--pa-font-mono);font-size:12px;padding:8px 10px!important;border-radius:8px;border:1px solid rgba(255,255,255,.12)!important;background:#00000059!important;color:#ffffffe6!important;transition:border-color .14s ease,box-shadow .14s ease}.pa-color-picker-input:hover{border-color:#fff3!important}.pa-color-picker-input:focus{outline:none;border-color:#818cf88c!important;box-shadow:0 0 0 2px #6366f140}.pa-color-picker-rgb{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.pa-color-picker-field--rgb .pa-color-picker-input{text-align:center;padding-left:6px!important;padding-right:6px!important}.pa-color-picker-input[type=number]::-webkit-inner-spin-button,.pa-color-picker-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.pa-text-styles-portal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:calc(var(--pa-z) + 50);pointer-events:none}.pa-text-styles{pointer-events:auto;position:fixed;z-index:calc(var(--pa-z) + 50);box-sizing:border-box;display:flex;flex-direction:column;padding:8px;gap:8px;border-radius:14px;border:1px solid rgba(255,255,255,.14);background:#121214f0;backdrop-filter:blur(20px) saturate(140%);-webkit-backdrop-filter:blur(20px) saturate(140%);box-shadow:0 4px 6px #0000001f,0 16px 40px #00000073,inset 0 1px #ffffff14}.pa-text-styles-header{display:flex;align-items:center;justify-content:space-between;padding:2px 4px 0}.pa-text-styles-title{font-size:13px;font-weight:600;color:#ffffffeb;letter-spacing:-.01em}.pa-text-styles-close{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:6px;cursor:pointer;font-size:18px;line-height:1;color:#ffffff8c;transition:color .14s ease,background .14s ease}.pa-text-styles-close:hover{color:#fffffff2;background:#ffffff14}.pa-text-styles-search{position:relative;display:flex;align-items:center}.pa-text-styles-search-icon{position:absolute;left:10px;color:#fff6;pointer-events:none}.pa-text-styles-search-input{width:100%;font-size:13px;padding:8px 10px 8px 30px!important;border-radius:8px;border:1px solid rgba(255,255,255,.12)!important;background:#00000059!important;color:#ffffffe6!important;transition:border-color .14s ease,box-shadow .14s ease}.pa-text-styles-search-input:focus{outline:none;border-color:#818cf88c!important;box-shadow:0 0 0 2px #6366f140}.pa-text-styles-list{display:flex;flex-direction:column;max-height:260px;overflow-y:auto;margin:0 -2px;padding:0 2px}.pa-text-styles-row{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:12px;width:100%;padding:8px 10px;border-radius:8px;cursor:pointer;color:#ffffffe6;transition:background .12s ease}.pa-text-styles-row:hover{background:#ffffff0f}.pa-text-styles-row--active{background:#ffffff1a}.pa-text-styles-specimen{flex-shrink:0;width:26px;font-size:18px;line-height:1;font-weight:500;text-align:center;color:#ffffffeb}.pa-text-styles-row-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.pa-text-styles-row-metrics{flex-shrink:0;font-size:12px;color:#ffffff73}.pa-text-styles-empty{margin:0;padding:16px 10px;text-align:center;font-size:12px;color:#ffffff73}.pa-color-field-label-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:5px}.pa-color-field-label-row .pa-edit-field-label{margin-bottom:0}.pa-color-presets-swatch{flex-shrink:0;width:18px;height:18px;border-radius:5px;border:1px solid rgba(255,255,255,.18);box-shadow:inset 0 0 0 1px #0000001f}.pa-prop-row{display:grid;grid-template-columns:88px minmax(0,1fr);align-items:center;gap:10px;padding:2px 0}.pa-prop-row--compact{grid-template-columns:72px minmax(0,1fr)}.pa-prop-label{font-size:10px;font-weight:500;letter-spacing:.06em;text-transform:uppercase;color:var(--pa-text-secondary)}.pa-scrub-label{cursor:ew-resize;-webkit-user-select:none;user-select:none;touch-action:none}.pa-scrub-label:hover,.pa-scrub-label--active{color:var(--pa-text)}.pa-prop-scrub-value{width:100%;text-align:left}.pa-spacing-control{display:flex;align-items:stretch;gap:6px;min-width:0}.pa-spacing-pair,.pa-spacing-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px;flex:1;min-width:0}.pa-spacing-grid{grid-template-rows:1fr 1fr}.pa-spacing-cell{position:relative;display:flex;align-items:center;min-width:0}.pa-spacing-cell-icon{position:absolute;left:7px;top:50%;transform:translateY(-50%);display:inline-flex;color:#ffffff8c;pointer-events:none}.pa-spacing-cell-icon--scrub{pointer-events:auto;cursor:ew-resize;touch-action:none}.pa-spacing-cell-icon--scrub:hover,.pa-spacing-cell-icon--active{color:var(--pa-text)}.pa-spacing-cell-input{width:100%;padding:6px 6px 6px 24px!important;text-align:left;font-family:var(--pa-font-mono);font-size:11px}.pa-spacing-cell--mixed .pa-spacing-cell-input{color:#ffffffb3}.pa-spacing-cell--mixed .pa-spacing-cell-icon{color:#fff6}.pa-spacing-toggle{all:unset;display:inline-flex;align-items:center;justify-content:center;width:26px;min-height:26px;border-radius:6px;border:1px solid rgba(255,255,255,.08);color:#ffffff8c;cursor:pointer;flex-shrink:0;transition:background .12s ease,color .12s ease,border-color .12s ease}.pa-spacing-toggle:hover:not(:disabled){background:#ffffff0f;color:#ffffffe6}.pa-spacing-toggle--on{background:#ffffff1f;color:#fffffff2;border-color:#ffffff2e}.pa-spacing-toggle:disabled{opacity:.4;cursor:not-allowed}.pa-edit-panel-glass .pa-prop-row .pa-input{font-family:var(--pa-font-mono);font-size:11px;padding:6px 8px;border-radius:6px;color:#ffffffe0}.pa-edit-panel-glass .pa-select,.pa-edit-panel-glass .pa-textarea{border-radius:var(--pa-field-radius)}.pa-edit-footer{display:flex;align-items:center;justify-content:space-between;margin-top:8px;padding-top:10px}.pa-change-count{font-size:11px;color:var(--pa-text-secondary)}.pa-change-count--success{color:var(--pa-success)}.pa-change-count--error{color:#fca5a5}.pa-popover-body{display:flex;flex-direction:column;gap:10px}.pa-popover-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px}.pa-popover-context{display:flex;flex-direction:column;gap:4px;padding:8px 10px;border-radius:var(--pa-field-radius);background:#0003;border:1px solid rgba(255,255,255,.08)}.pa-popover-context-line{margin:0;font-size:11px;line-height:1.45;color:var(--pa-text)}.pa-popover-context-label{display:inline-block;min-width:52px;margin-right:6px;font-size:10px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--pa-text-secondary)}.pa-popover-hint{margin:0;font-size:10px;color:var(--pa-text-secondary)}.pa-area-select{position:fixed;pointer-events:none;z-index:calc(var(--pa-z) - 3);border:2px dashed var(--pa-accent-bright);background:#6366f114;border-radius:4px}.pa-area-select--dragging{background:#6366f124}.pa-session-panel-float{position:fixed;top:16px;right:16px;z-index:calc(var(--pa-z) + 3);width:360px}.pa-session-panel-float--dragging{-webkit-user-select:none;user-select:none}.pa-session-panel-float .pa-glass-panel--sheet{position:relative;top:auto;right:auto;left:auto;width:100%}.pa-session-drag{all:unset;display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;cursor:grab;touch-action:none;flex-shrink:0;color:#ffffff73;transition:background .15s ease,color .15s ease}.pa-session-drag:hover{background:#ffffff1a;color:#ffffffd9}.pa-session-panel-float--dragging .pa-session-drag{cursor:grabbing}.pa-session-grip{display:grid;grid-template-columns:repeat(2,4px);gap:3px}.pa-session-grip span{display:block;width:4px;height:4px;border-radius:50%;background:currentColor}.pa-session-header{display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;gap:4px 8px;align-items:center;padding:14px;border-bottom:1px solid rgba(255,255,255,.1)}.pa-session-header-main{display:flex;align-items:center;gap:4px;grid-column:1;min-width:0}.pa-session-title{all:unset;font-size:14px;font-weight:600;letter-spacing:-.02em}.pa-session-subtitle{grid-column:1;margin:0;font-size:10px;color:var(--pa-text-secondary)}.pa-session-actions{grid-column:2;grid-row:1 / span 2}.pa-session-status{margin:0;padding:8px 14px 0;font-size:11px;color:var(--pa-accent-bright)}.pa-session-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.pa-session-target{font-size:11px;font-weight:600;font-family:var(--pa-font-mono, ui-monospace, monospace);color:var(--pa-accent-bright);letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pa-session-note{margin:0;font-size:13px;font-weight:500;line-height:1.4;color:var(--pa-text);word-break:break-word}.pa-session-meta-line{margin:0;font-size:10px;line-height:1.35;color:var(--pa-text-secondary);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.pa-session-meta{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}.pa-session-badge{font-size:9px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;padding:1px 6px;border-radius:999px;color:var(--pa-text-secondary);background:#ffffff14}.pa-session-edit{flex:1;display:flex;flex-direction:column;gap:8px}.pa-session-item-actions{display:flex;flex-shrink:0;flex-direction:row;align-items:center;gap:2px}.pa-session-action-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;padding-left:0;padding-right:0}.pa-session-list{list-style:none;margin:0;padding:10px;overflow-y:auto;display:flex;flex-direction:column;gap:6px;max-height:calc(60vh - 60px)}.pa-session-item{display:flex;align-items:flex-start;gap:8px;padding:10px;background:#0000002e;border:1px solid rgba(255,255,255,.08);border-radius:var(--pa-glass-radius-control);transition:background .08s ease,border-color .08s ease,box-shadow .08s ease}.pa-session-item--active{border-color:var(--pa-accent-bright);background:#6366f129;box-shadow:0 0 0 1px #6366f159}.pa-session-empty{font-size:12px;color:var(--pa-text-secondary);padding:16px;text-align:center;line-height:1.5}`, Rt = "pixelagent-base-styles";
|
|
3636
3730
|
function Mr() {
|
|
3637
|
-
if (typeof document > "u" || document.getElementById(
|
|
3731
|
+
if (typeof document > "u" || document.getElementById(Rt)) return;
|
|
3638
3732
|
const e = document.createElement("style");
|
|
3639
|
-
e.id =
|
|
3733
|
+
e.id = Rt, e.textContent = Cr, document.head.appendChild(e);
|
|
3640
3734
|
}
|
|
3641
3735
|
Mr();
|
|
3642
|
-
const
|
|
3736
|
+
const Tt = "/__pixelagent/apply", It = "pixelagent-runtime-styles";
|
|
3643
3737
|
let Dt = 0;
|
|
3644
3738
|
const et = /* @__PURE__ */ new WeakMap();
|
|
3645
3739
|
function Ar(e) {
|
|
@@ -3651,8 +3745,8 @@ function Ar(e) {
|
|
|
3651
3745
|
return Dt += 1, t = `pa-runtime-${Dt}`, et.set(e, t), e.classList.add(t), t;
|
|
3652
3746
|
}
|
|
3653
3747
|
function zr() {
|
|
3654
|
-
let e = document.getElementById(
|
|
3655
|
-
return e || (e = document.createElement("style"), e.id =
|
|
3748
|
+
let e = document.getElementById(It);
|
|
3749
|
+
return e || (e = document.createElement("style"), e.id = It, document.head.appendChild(e)), e;
|
|
3656
3750
|
}
|
|
3657
3751
|
function Sr(e, t, n, r) {
|
|
3658
3752
|
const o = zr(), i = e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), s = new RegExp(
|
|
@@ -3660,15 +3754,15 @@ function Sr(e, t, n, r) {
|
|
|
3660
3754
|
"m"
|
|
3661
3755
|
), l = `${n}: ${r} !important`;
|
|
3662
3756
|
let p = o.textContent ?? "";
|
|
3663
|
-
const
|
|
3664
|
-
if (
|
|
3665
|
-
const
|
|
3757
|
+
const d = p.match(s);
|
|
3758
|
+
if (d) {
|
|
3759
|
+
const g = d[2], m = new RegExp(`(\\s*${n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\s*:\\s*)[^;]+;?`);
|
|
3666
3760
|
let c;
|
|
3667
|
-
if (
|
|
3668
|
-
c =
|
|
3761
|
+
if (m.test(g))
|
|
3762
|
+
c = g.replace(m, `$1${r} !important;`);
|
|
3669
3763
|
else {
|
|
3670
|
-
const
|
|
3671
|
-
c = `${
|
|
3764
|
+
const f = g.replace(/\s+$/, ""), h = f.endsWith(";") || f === "" ? "" : ";";
|
|
3765
|
+
c = `${f}${h}
|
|
3672
3766
|
${l};
|
|
3673
3767
|
`;
|
|
3674
3768
|
}
|
|
@@ -3683,7 +3777,7 @@ function Sr(e, t, n, r) {
|
|
|
3683
3777
|
`;
|
|
3684
3778
|
o.textContent = p;
|
|
3685
3779
|
}
|
|
3686
|
-
function
|
|
3780
|
+
function Ot(e) {
|
|
3687
3781
|
const t = Math.min(e.startX, e.currentX), n = Math.min(e.startY, e.currentY), r = Math.abs(e.currentX - e.startX), o = Math.abs(e.currentY - e.startY);
|
|
3688
3782
|
return { x: t, y: n, width: r, height: o };
|
|
3689
3783
|
}
|
|
@@ -3696,173 +3790,173 @@ function Lr({
|
|
|
3696
3790
|
runtimeStateStyles: i
|
|
3697
3791
|
} = {}) {
|
|
3698
3792
|
const s = Nr({ ui: e, hostTheme: t, onHostThemeChange: n }), [l, p] = S(null);
|
|
3699
|
-
|
|
3793
|
+
_(() => {
|
|
3700
3794
|
if (r || o) return;
|
|
3701
|
-
let
|
|
3702
|
-
return fetch(
|
|
3703
|
-
!
|
|
3795
|
+
let L = !1;
|
|
3796
|
+
return fetch(Tt, { method: "GET" }).then((R) => {
|
|
3797
|
+
!L && R.status === 405 && p(Tt);
|
|
3704
3798
|
}).catch(() => {
|
|
3705
3799
|
}), () => {
|
|
3706
|
-
|
|
3800
|
+
L = !0;
|
|
3707
3801
|
};
|
|
3708
3802
|
}, [r, o]);
|
|
3709
|
-
const [
|
|
3710
|
-
annotations:
|
|
3803
|
+
const [d, g] = S(!1), [m, c] = S("idle"), [f, h] = S("element"), {
|
|
3804
|
+
annotations: C,
|
|
3711
3805
|
setAnnotations: k,
|
|
3712
|
-
updateAnnotation:
|
|
3713
|
-
removeAnnotation:
|
|
3714
|
-
} = kr(), [
|
|
3715
|
-
(
|
|
3716
|
-
|
|
3717
|
-
|
|
3806
|
+
updateAnnotation: D,
|
|
3807
|
+
removeAnnotation: x
|
|
3808
|
+
} = kr(), [w, A] = S(null), [v, N] = S(null), [P, y] = S([]), [M, z] = S(null), [E, F] = S(null), [j, K] = S(!1), [q, J] = S(null), le = d && m === "annotate" && C.length > 0 && !j, [b, Q] = S("this-instance"), [ce, ge] = S("normal"), [$, I] = S(null), [B, O] = S(null), [Y, X] = S(null), ee = W(null), H = W(null), V = T(
|
|
3809
|
+
(L, R) => {
|
|
3810
|
+
H.current && clearTimeout(H.current), I(L), O((R == null ? void 0 : R.entryId) ?? null), X((R == null ? void 0 : R.copyAllFrom) ?? null), H.current = setTimeout(() => {
|
|
3811
|
+
I(null), O(null), X(null);
|
|
3718
3812
|
}, 2500);
|
|
3719
3813
|
},
|
|
3720
3814
|
[]
|
|
3721
|
-
),
|
|
3722
|
-
async (
|
|
3723
|
-
if (
|
|
3815
|
+
), te = T(
|
|
3816
|
+
async (L, R, ne) => {
|
|
3817
|
+
if (L)
|
|
3724
3818
|
try {
|
|
3725
|
-
await
|
|
3819
|
+
await Ht(L), V(R, ne);
|
|
3726
3820
|
} catch {
|
|
3727
|
-
|
|
3821
|
+
V("Copy failed — check clipboard permissions", ne);
|
|
3728
3822
|
}
|
|
3729
3823
|
},
|
|
3730
|
-
[
|
|
3731
|
-
), he =
|
|
3732
|
-
(
|
|
3733
|
-
|
|
3824
|
+
[V]
|
|
3825
|
+
), he = T(
|
|
3826
|
+
(L, R) => {
|
|
3827
|
+
L.length === 0 && !R || (z({ elements: L, areaBbox: R }), N(L[0] ?? null));
|
|
3734
3828
|
},
|
|
3735
3829
|
[]
|
|
3736
|
-
), He =
|
|
3737
|
-
(
|
|
3738
|
-
if (!(!
|
|
3739
|
-
if (
|
|
3740
|
-
|
|
3741
|
-
(
|
|
3830
|
+
), He = T(
|
|
3831
|
+
(L) => {
|
|
3832
|
+
if (!(!d || m !== "annotate" || De(L.target))) {
|
|
3833
|
+
if (E) {
|
|
3834
|
+
F(
|
|
3835
|
+
(R) => R && { ...R, currentX: L.clientX, currentY: L.clientY }
|
|
3742
3836
|
);
|
|
3743
3837
|
return;
|
|
3744
3838
|
}
|
|
3745
|
-
|
|
3839
|
+
f !== "area" && A($t(L.clientX, L.clientY));
|
|
3746
3840
|
}
|
|
3747
3841
|
},
|
|
3748
|
-
[
|
|
3749
|
-
),
|
|
3750
|
-
(
|
|
3751
|
-
!
|
|
3752
|
-
startX:
|
|
3753
|
-
startY:
|
|
3754
|
-
currentX:
|
|
3755
|
-
currentY:
|
|
3756
|
-
}),
|
|
3842
|
+
[d, m, E, f]
|
|
3843
|
+
), We = T(
|
|
3844
|
+
(L) => {
|
|
3845
|
+
!d || m !== "annotate" || De(L.target) || f !== "area" || L.button !== 0 || (L.preventDefault(), L.stopPropagation(), F({
|
|
3846
|
+
startX: L.clientX,
|
|
3847
|
+
startY: L.clientY,
|
|
3848
|
+
currentX: L.clientX,
|
|
3849
|
+
currentY: L.clientY
|
|
3850
|
+
}), z(null));
|
|
3757
3851
|
},
|
|
3758
|
-
[
|
|
3759
|
-
),
|
|
3760
|
-
if (!
|
|
3761
|
-
const
|
|
3762
|
-
if (
|
|
3763
|
-
const
|
|
3764
|
-
he(
|
|
3765
|
-
}, [
|
|
3766
|
-
(
|
|
3767
|
-
if (!
|
|
3768
|
-
|
|
3769
|
-
const
|
|
3770
|
-
if (!
|
|
3771
|
-
if (
|
|
3772
|
-
|
|
3852
|
+
[d, m, f]
|
|
3853
|
+
), Ve = T(() => {
|
|
3854
|
+
if (!E) return;
|
|
3855
|
+
const L = Ot(E);
|
|
3856
|
+
if (F(null), L.width < 8 || L.height < 8) return;
|
|
3857
|
+
const R = kn(L, ct);
|
|
3858
|
+
he(R, L);
|
|
3859
|
+
}, [E, he]), Ue = T(
|
|
3860
|
+
(L) => {
|
|
3861
|
+
if (!d || m !== "annotate" || De(L.target) || f === "area") return;
|
|
3862
|
+
L.preventDefault(), L.stopPropagation();
|
|
3863
|
+
const R = $t(L.clientX, L.clientY);
|
|
3864
|
+
if (!R) return;
|
|
3865
|
+
if (L.shiftKey || f === "multi") {
|
|
3866
|
+
y((oe) => oe.includes(R) ? oe.filter((U) => U !== R) : [...oe, R]), N(R);
|
|
3773
3867
|
return;
|
|
3774
3868
|
}
|
|
3775
|
-
const
|
|
3776
|
-
he(
|
|
3869
|
+
const ne = P.length > 0 ? P : [R];
|
|
3870
|
+
he(ne.includes(R) ? ne : [R]);
|
|
3777
3871
|
},
|
|
3778
|
-
[
|
|
3872
|
+
[d, m, f, P, he]
|
|
3779
3873
|
);
|
|
3780
|
-
|
|
3781
|
-
!
|
|
3782
|
-
}, [
|
|
3783
|
-
if (
|
|
3784
|
-
return document.addEventListener("mousemove", He, !0), document.addEventListener("mousedown",
|
|
3785
|
-
document.removeEventListener("mousemove", He, !0), document.removeEventListener("mousedown",
|
|
3874
|
+
_(() => {
|
|
3875
|
+
!v || b !== "all-instances" || Bt(v) <= 1 && Q("this-instance");
|
|
3876
|
+
}, [v, b]), _(() => {
|
|
3877
|
+
if (d)
|
|
3878
|
+
return document.addEventListener("mousemove", He, !0), document.addEventListener("mousedown", We, !0), document.addEventListener("mouseup", Ve, !0), document.addEventListener("click", Ue, !0), () => {
|
|
3879
|
+
document.removeEventListener("mousemove", He, !0), document.removeEventListener("mousedown", We, !0), document.removeEventListener("mouseup", Ve, !0), document.removeEventListener("click", Ue, !0);
|
|
3786
3880
|
};
|
|
3787
|
-
}, [
|
|
3788
|
-
const on =
|
|
3789
|
-
(
|
|
3790
|
-
if (!
|
|
3791
|
-
const { elements:
|
|
3792
|
-
if (
|
|
3881
|
+
}, [d, He, We, Ve, Ue]);
|
|
3882
|
+
const on = T(
|
|
3883
|
+
(L, R) => {
|
|
3884
|
+
if (!M || !L.trim()) return;
|
|
3885
|
+
const { elements: ne, areaBbox: oe } = M;
|
|
3886
|
+
if (ne.length === 0 && !oe) return;
|
|
3793
3887
|
const Ae = rr({
|
|
3794
|
-
elements:
|
|
3795
|
-
note:
|
|
3888
|
+
elements: ne,
|
|
3889
|
+
note: L,
|
|
3796
3890
|
areaBbox: oe
|
|
3797
3891
|
});
|
|
3798
|
-
k((
|
|
3892
|
+
k((U) => [...U, Ae]), K(!1), R ? (z(null), N(null)) : (z(null), N(null), y([]));
|
|
3799
3893
|
},
|
|
3800
|
-
[
|
|
3801
|
-
), sn =
|
|
3802
|
-
|
|
3803
|
-
}, []),
|
|
3804
|
-
async (
|
|
3805
|
-
const
|
|
3806
|
-
await
|
|
3894
|
+
[M, k]
|
|
3895
|
+
), sn = T(() => {
|
|
3896
|
+
z(null), N(null);
|
|
3897
|
+
}, []), pt = T(
|
|
3898
|
+
async (L) => {
|
|
3899
|
+
const R = Nn(C);
|
|
3900
|
+
await te(R, "Copied all!", { copyAllFrom: L });
|
|
3807
3901
|
},
|
|
3808
|
-
[
|
|
3809
|
-
), ln =
|
|
3810
|
-
async (
|
|
3811
|
-
const
|
|
3812
|
-
|
|
3902
|
+
[C, te]
|
|
3903
|
+
), ln = T(
|
|
3904
|
+
async (L) => {
|
|
3905
|
+
const R = C.find((ne) => ne.id === L);
|
|
3906
|
+
R && await te(Cn(R), "Copied!", { entryId: L });
|
|
3813
3907
|
},
|
|
3814
|
-
[
|
|
3815
|
-
), cn =
|
|
3816
|
-
async (
|
|
3817
|
-
const
|
|
3818
|
-
for (const [
|
|
3819
|
-
for (const [me, ie] of
|
|
3820
|
-
ie.length > 0 &&
|
|
3821
|
-
if (
|
|
3908
|
+
[C, te]
|
|
3909
|
+
), cn = T(
|
|
3910
|
+
async (L) => {
|
|
3911
|
+
const R = [];
|
|
3912
|
+
for (const [U, ae] of L)
|
|
3913
|
+
for (const [me, ie] of ae)
|
|
3914
|
+
ie.length > 0 && R.push([U, me, ie]);
|
|
3915
|
+
if (R.length === 0) return { applied: !1 };
|
|
3822
3916
|
if (i) {
|
|
3823
|
-
for (const [
|
|
3824
|
-
if (
|
|
3825
|
-
const ie = Ar(
|
|
3917
|
+
for (const [U, ae, me] of R) {
|
|
3918
|
+
if (ae === "normal") continue;
|
|
3919
|
+
const ie = Ar(U);
|
|
3826
3920
|
for (const ze of me)
|
|
3827
|
-
|
|
3921
|
+
U.style.removeProperty(ze.property), Sr(ie, ae, ze.property, ze.newValue);
|
|
3828
3922
|
}
|
|
3829
|
-
for (const [
|
|
3830
|
-
if (
|
|
3923
|
+
for (const [U, ae, me] of R)
|
|
3924
|
+
if (ae === "normal")
|
|
3831
3925
|
for (const ie of me)
|
|
3832
|
-
|
|
3833
|
-
return
|
|
3926
|
+
U.style.setProperty(ie.property, ie.newValue);
|
|
3927
|
+
return V("Change applied"), { applied: !0, skipRevert: !0 };
|
|
3834
3928
|
}
|
|
3835
|
-
const
|
|
3836
|
-
for (const [
|
|
3837
|
-
const ie =
|
|
3929
|
+
const ne = r ?? l ?? void 0, oe = [];
|
|
3930
|
+
for (const [U, ae, me] of R) {
|
|
3931
|
+
const ie = ot(U), ze = {
|
|
3838
3932
|
schemaVersion: 1,
|
|
3839
|
-
elementSelector:
|
|
3933
|
+
elementSelector: _t(U, b),
|
|
3840
3934
|
sourceFile: ie.sourceFile,
|
|
3841
3935
|
lineNumber: ie.lineNumber,
|
|
3842
3936
|
targetScope: b,
|
|
3843
|
-
state:
|
|
3844
|
-
stylingSystem:
|
|
3937
|
+
state: ae,
|
|
3938
|
+
stylingSystem: Ft(U),
|
|
3845
3939
|
changes: me
|
|
3846
3940
|
};
|
|
3847
|
-
oe.push(await Ya(ze, { applyEndpoint:
|
|
3941
|
+
oe.push(await Ya(ze, { applyEndpoint: ne, onApply: o }));
|
|
3848
3942
|
}
|
|
3849
3943
|
const Ae = oe.every(
|
|
3850
|
-
(
|
|
3944
|
+
(U) => U.mode === "mcp" && U.result.success && U.result.linesChanged.length > 0
|
|
3851
3945
|
);
|
|
3852
|
-
return
|
|
3853
|
-
|
|
3946
|
+
return V(Ae ? "Change applied" : "Apply failed"), oe.forEach((U, ae) => {
|
|
3947
|
+
U.mode === "error" ? console.error(`[pixelagent] Apply #${ae} failed:`, U.message) : U.mode === "clipboard" ? console.warn(`[pixelagent] Apply #${ae} fell back to clipboard`) : U.mode === "mcp" && !U.result.success && console.warn(`[pixelagent] Apply #${ae} reported no changes:`, U.result);
|
|
3854
3948
|
}), { applied: Ae };
|
|
3855
3949
|
},
|
|
3856
|
-
[b, r, l, o, i,
|
|
3857
|
-
),
|
|
3858
|
-
s.setSettingsOpen(!1),
|
|
3950
|
+
[b, r, l, o, i, V]
|
|
3951
|
+
), dt = (L) => {
|
|
3952
|
+
s.setSettingsOpen(!1), g(!0), c(L), N(null), A(null), z(null), y([]), F(null), J(null), L === "annotate" && K(!1);
|
|
3859
3953
|
}, pn = () => {
|
|
3860
|
-
|
|
3861
|
-
}, dn =
|
|
3862
|
-
return /* @__PURE__ */
|
|
3954
|
+
g(!1), c("idle"), N(null), A(null), z(null), y([]), F(null), K(!1), J(null);
|
|
3955
|
+
}, dn = E ? Ot(E) : null;
|
|
3956
|
+
return /* @__PURE__ */ u(
|
|
3863
3957
|
"div",
|
|
3864
3958
|
{
|
|
3865
|
-
ref:
|
|
3959
|
+
ref: ee,
|
|
3866
3960
|
className: "pa-root",
|
|
3867
3961
|
"data-pixelagent-root": !0,
|
|
3868
3962
|
...s.rootAttributes,
|
|
@@ -3877,96 +3971,96 @@ function Lr({
|
|
|
3877
3971
|
onToggleSettings: s.toggleSettings,
|
|
3878
3972
|
onCloseSettings: () => s.setSettingsOpen(!1),
|
|
3879
3973
|
onToggleHostTheme: s.toggleHostTheme,
|
|
3880
|
-
active:
|
|
3881
|
-
mode:
|
|
3882
|
-
captureMode:
|
|
3883
|
-
annotationCount:
|
|
3884
|
-
multiSelectCount:
|
|
3885
|
-
copyStatus:
|
|
3886
|
-
copyAllFrom:
|
|
3887
|
-
onActivateAnnotate: () =>
|
|
3888
|
-
onActivateEdit: () =>
|
|
3974
|
+
active: d,
|
|
3975
|
+
mode: m,
|
|
3976
|
+
captureMode: f,
|
|
3977
|
+
annotationCount: C.length,
|
|
3978
|
+
multiSelectCount: P.length,
|
|
3979
|
+
copyStatus: $,
|
|
3980
|
+
copyAllFrom: Y,
|
|
3981
|
+
onActivateAnnotate: () => dt("annotate"),
|
|
3982
|
+
onActivateEdit: () => dt("edit"),
|
|
3889
3983
|
onDeactivate: pn,
|
|
3890
|
-
onCopyAll: () =>
|
|
3891
|
-
onCaptureModeChange:
|
|
3984
|
+
onCopyAll: () => pt("toolbar"),
|
|
3985
|
+
onCaptureModeChange: h,
|
|
3892
3986
|
onConfirmMultiSelect: () => {
|
|
3893
|
-
|
|
3987
|
+
P.length > 0 && he(P);
|
|
3894
3988
|
}
|
|
3895
3989
|
}
|
|
3896
3990
|
),
|
|
3897
|
-
|
|
3991
|
+
d && m === "annotate" && /* @__PURE__ */ u(Z, { children: [
|
|
3898
3992
|
/* @__PURE__ */ a(
|
|
3899
|
-
|
|
3993
|
+
jt,
|
|
3900
3994
|
{
|
|
3901
|
-
element:
|
|
3902
|
-
selected:
|
|
3903
|
-
multiSelected:
|
|
3995
|
+
element: w,
|
|
3996
|
+
selected: v,
|
|
3997
|
+
multiSelected: P
|
|
3904
3998
|
}
|
|
3905
3999
|
),
|
|
3906
4000
|
/* @__PURE__ */ a(
|
|
3907
4001
|
cr,
|
|
3908
4002
|
{
|
|
3909
|
-
annotations:
|
|
3910
|
-
activeId:
|
|
3911
|
-
onActiveChange:
|
|
4003
|
+
annotations: C,
|
|
4004
|
+
activeId: q,
|
|
4005
|
+
onActiveChange: J
|
|
3912
4006
|
}
|
|
3913
4007
|
),
|
|
3914
|
-
/* @__PURE__ */ a(ar, { area: dn, isDragging: !!
|
|
4008
|
+
/* @__PURE__ */ a(ar, { area: dn, isDragging: !!E })
|
|
3915
4009
|
] }),
|
|
3916
|
-
|
|
4010
|
+
d && m === "annotate" && M && /* @__PURE__ */ a(
|
|
3917
4011
|
nr,
|
|
3918
4012
|
{
|
|
3919
|
-
elements:
|
|
3920
|
-
areaBbox:
|
|
4013
|
+
elements: M.elements,
|
|
4014
|
+
areaBbox: M.areaBbox,
|
|
3921
4015
|
onSubmit: on,
|
|
3922
4016
|
onCancel: sn
|
|
3923
4017
|
}
|
|
3924
4018
|
),
|
|
3925
|
-
|
|
4019
|
+
d && m === "edit" && /* @__PURE__ */ a(
|
|
3926
4020
|
ja,
|
|
3927
4021
|
{
|
|
3928
|
-
selectedElement:
|
|
3929
|
-
hoveredElement:
|
|
3930
|
-
onSelectElement:
|
|
3931
|
-
onHoverElement:
|
|
4022
|
+
selectedElement: v,
|
|
4023
|
+
hoveredElement: w,
|
|
4024
|
+
onSelectElement: N,
|
|
4025
|
+
onHoverElement: A,
|
|
3932
4026
|
targetScope: b,
|
|
3933
|
-
onTargetScopeChange:
|
|
4027
|
+
onTargetScopeChange: Q,
|
|
3934
4028
|
elementState: ce,
|
|
3935
4029
|
onElementStateChange: ge,
|
|
3936
4030
|
onApply: cn,
|
|
3937
|
-
applyStatus:
|
|
3938
|
-
isToolbarTarget:
|
|
4031
|
+
applyStatus: m === "edit" ? $ : null,
|
|
4032
|
+
isToolbarTarget: De
|
|
3939
4033
|
}
|
|
3940
4034
|
),
|
|
3941
4035
|
le && /* @__PURE__ */ a(
|
|
3942
4036
|
gr,
|
|
3943
4037
|
{
|
|
3944
|
-
annotations:
|
|
3945
|
-
onClose: () =>
|
|
3946
|
-
onCopyAll: () =>
|
|
4038
|
+
annotations: C,
|
|
4039
|
+
onClose: () => K(!0),
|
|
4040
|
+
onCopyAll: () => pt("session"),
|
|
3947
4041
|
onCopyOne: ln,
|
|
3948
|
-
onRemove:
|
|
3949
|
-
onUpdate:
|
|
3950
|
-
activeId:
|
|
3951
|
-
onActiveChange:
|
|
3952
|
-
copyStatus:
|
|
3953
|
-
copiedEntryId:
|
|
3954
|
-
copyAllFrom:
|
|
4042
|
+
onRemove: x,
|
|
4043
|
+
onUpdate: D,
|
|
4044
|
+
activeId: q,
|
|
4045
|
+
onActiveChange: J,
|
|
4046
|
+
copyStatus: $,
|
|
4047
|
+
copiedEntryId: B,
|
|
4048
|
+
copyAllFrom: Y
|
|
3955
4049
|
}
|
|
3956
4050
|
)
|
|
3957
4051
|
]
|
|
3958
4052
|
}
|
|
3959
4053
|
);
|
|
3960
4054
|
}
|
|
3961
|
-
function
|
|
4055
|
+
function Er() {
|
|
3962
4056
|
return typeof process < "u" && process.env.NODE_ENV !== "production";
|
|
3963
4057
|
}
|
|
3964
|
-
function
|
|
3965
|
-
return
|
|
4058
|
+
function Ir() {
|
|
4059
|
+
return Er() ? /* @__PURE__ */ a(Lr, {}) : null;
|
|
3966
4060
|
}
|
|
3967
4061
|
export {
|
|
3968
4062
|
Lr as PixelAgent,
|
|
3969
|
-
|
|
3970
|
-
|
|
4063
|
+
Ir as PixelAgentDev,
|
|
4064
|
+
Er as isDevEnvironment
|
|
3971
4065
|
};
|
|
3972
4066
|
//# sourceMappingURL=pixelagent.js.map
|