pixelagent 0.1.24 → 0.1.26
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/edit/ColorPickerPopover.d.ts +4 -1
- package/dist/edit/ColorPickerPopover.d.ts.map +1 -1
- package/dist/edit/ColorTokenPopover.d.ts +11 -0
- package/dist/edit/ColorTokenPopover.d.ts.map +1 -0
- package/dist/edit/EditPropertiesPanel.d.ts.map +1 -1
- package/dist/edit/colorPresets.d.ts +23 -0
- package/dist/edit/colorPresets.d.ts.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 +1527 -1199
- package/dist/pixelagent.js.map +1 -1
- package/package.json +7 -3
package/dist/pixelagent.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState 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
|
-
import { createPortal as
|
|
6
|
-
function
|
|
5
|
+
import { createPortal as Le } from "react-dom";
|
|
6
|
+
function jt({
|
|
7
7
|
element: e,
|
|
8
8
|
selected: t,
|
|
9
9
|
multiSelected: n = [],
|
|
10
10
|
primarySelected: r = null
|
|
11
11
|
}) {
|
|
12
|
-
const [o, i] =
|
|
13
|
-
if (
|
|
14
|
-
const d = /* @__PURE__ */ new Map(),
|
|
15
|
-
e && !t && !
|
|
16
|
-
for (const
|
|
17
|
-
d.set(
|
|
12
|
+
const [o, i] = S([]), s = r ?? t;
|
|
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
18
|
if (d.size === 0) {
|
|
19
19
|
i([]);
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const m = () => {
|
|
23
23
|
i(
|
|
24
|
-
Array.from(d.entries()).map(([
|
|
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(d.keys()).map((
|
|
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
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__ */
|
|
44
|
-
o.map((d,
|
|
43
|
+
return /* @__PURE__ */ u(Z, { children: [
|
|
44
|
+
o.map((d, g) => /* @__PURE__ */ a(
|
|
45
45
|
"div",
|
|
46
46
|
{
|
|
47
47
|
className: [
|
|
@@ -57,7 +57,7 @@ function Vt({
|
|
|
57
57
|
height: d.rect.height
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
|
-
`${d.label}-${
|
|
60
|
+
`${d.label}-${g}`
|
|
61
61
|
)),
|
|
62
62
|
/* @__PURE__ */ a(
|
|
63
63
|
"div",
|
|
@@ -72,63 +72,63 @@ function Vt({
|
|
|
72
72
|
)
|
|
73
73
|
] });
|
|
74
74
|
}
|
|
75
|
-
const
|
|
76
|
-
function
|
|
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 d = p.createImageData(i, s),
|
|
83
|
-
let
|
|
84
|
-
const
|
|
85
|
-
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
|
+
const k = new Float32Array(i * s * 2);
|
|
85
|
+
let D = 0;
|
|
86
86
|
for (let w = 0; w < s; w++)
|
|
87
|
-
for (let
|
|
88
|
-
const
|
|
89
|
-
Math.abs(
|
|
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
|
-
|
|
91
|
+
if (C === 0) return null;
|
|
92
|
+
C *= 0.4 * r;
|
|
93
93
|
let x = 0;
|
|
94
|
-
for (let w = 0; w <
|
|
95
|
-
const
|
|
96
|
-
|
|
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
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
|
};
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
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));
|
|
117
117
|
}
|
|
118
|
-
const
|
|
118
|
+
const Sn = {
|
|
119
119
|
default: "blur(4px) saturate(130%)",
|
|
120
120
|
/** Toolbar — slightly stronger frost + refraction chain. */
|
|
121
121
|
enhanced: "blur(6px) saturate(138%)"
|
|
122
122
|
};
|
|
123
|
-
function
|
|
124
|
-
const n =
|
|
123
|
+
function Ln(e, t = "default") {
|
|
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
|
|
131
|
-
function
|
|
130
|
+
let En = 0;
|
|
131
|
+
function Gt({
|
|
132
132
|
shape: e = "rect",
|
|
133
133
|
cornerRadius: t,
|
|
134
134
|
tint: n = "neutral",
|
|
@@ -137,26 +137,112 @@ function Ut({
|
|
|
137
137
|
style: i,
|
|
138
138
|
children: s
|
|
139
139
|
}) {
|
|
140
|
-
const l = t ?? (e === "capsule" ? 9999 : 20), p = r === "enhanced" ?
|
|
141
|
-
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
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);
|
|
146
|
+
un(() => {
|
|
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();
|
|
157
170
|
};
|
|
158
|
-
}, [e, l, p])
|
|
159
|
-
|
|
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);
|
|
225
|
+
};
|
|
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 Ut({
|
|
|
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 Ut({
|
|
|
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 Ut({
|
|
|
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
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
|
-
...
|
|
224
|
-
|
|
309
|
+
...Ln(
|
|
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 })
|
|
@@ -251,7 +345,7 @@ function G({
|
|
|
251
345
|
}
|
|
252
346
|
);
|
|
253
347
|
}
|
|
254
|
-
function
|
|
348
|
+
function _e({
|
|
255
349
|
variant: e = "sheet",
|
|
256
350
|
side: t = "left",
|
|
257
351
|
className: n = "",
|
|
@@ -259,7 +353,7 @@ function Fe({
|
|
|
259
353
|
children: o
|
|
260
354
|
}) {
|
|
261
355
|
return /* @__PURE__ */ a(
|
|
262
|
-
|
|
356
|
+
Gt,
|
|
263
357
|
{
|
|
264
358
|
shape: "rect",
|
|
265
359
|
cornerRadius: e === "popover" ? 16 : 20,
|
|
@@ -269,65 +363,65 @@ function Fe({
|
|
|
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] =
|
|
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
397
|
const d = T(
|
|
304
|
-
(
|
|
305
|
-
if (
|
|
306
|
-
const
|
|
307
|
-
if (!
|
|
308
|
-
let
|
|
309
|
-
if (!
|
|
310
|
-
const
|
|
311
|
-
|
|
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: w, y:
|
|
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
|
}
|
|
@@ -346,14 +440,14 @@ function at({
|
|
|
346
440
|
style: c,
|
|
347
441
|
dragHandleProps: {
|
|
348
442
|
onPointerDown: d,
|
|
349
|
-
onPointerMove:
|
|
350
|
-
onPointerUp:
|
|
351
|
-
onPointerCancel:
|
|
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
|
{
|
|
@@ -378,8 +472,8 @@ function Sn({ className: e }) {
|
|
|
378
472
|
)
|
|
379
473
|
] });
|
|
380
474
|
}
|
|
381
|
-
function
|
|
382
|
-
return /* @__PURE__ */
|
|
475
|
+
function Pn({ className: e }) {
|
|
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
|
{
|
|
@@ -404,11 +498,11 @@ function Ln({ className: e }) {
|
|
|
404
498
|
)
|
|
405
499
|
] });
|
|
406
500
|
}
|
|
407
|
-
function
|
|
501
|
+
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("%")) {
|
|
@@ -418,16 +512,16 @@ function $n(e) {
|
|
|
418
512
|
const n = parseFloat(t);
|
|
419
513
|
return Number.isFinite(n) && n >= 0 && n <= 1 ? n : null;
|
|
420
514
|
}
|
|
421
|
-
function
|
|
422
|
-
const t =
|
|
515
|
+
function Kt(e) {
|
|
516
|
+
const t = qt(e);
|
|
423
517
|
if (t !== null) return t > 0;
|
|
424
|
-
const n =
|
|
518
|
+
const n = de(e);
|
|
425
519
|
return n !== null && n > 0;
|
|
426
520
|
}
|
|
427
|
-
function
|
|
521
|
+
function qt(e) {
|
|
428
522
|
const t = e.trim().split(/\s+/).filter(Boolean);
|
|
429
523
|
if (t.length === 0) return null;
|
|
430
|
-
const n = t.map((o) =>
|
|
524
|
+
const n = t.map((o) => de(o));
|
|
431
525
|
if (n.some((o) => o === null)) return null;
|
|
432
526
|
const r = n[0];
|
|
433
527
|
return n.every((o) => o === r) ? r : null;
|
|
@@ -438,15 +532,15 @@ function fe(e) {
|
|
|
438
532
|
const n = parseFloat(t[1]);
|
|
439
533
|
return Number.isFinite(n) ? { num: n, unit: t[2].toLowerCase() } : null;
|
|
440
534
|
}
|
|
441
|
-
function
|
|
535
|
+
function Jt(e) {
|
|
442
536
|
return e === "" || e === "em" || e === "rem" ? 0.1 : 1;
|
|
443
537
|
}
|
|
444
|
-
function
|
|
538
|
+
function Tn(e, t) {
|
|
445
539
|
var o;
|
|
446
540
|
const n = ((o = fe(e)) == null ? void 0 : o.unit) ?? "px";
|
|
447
|
-
return `${
|
|
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 },
|
|
@@ -460,22 +554,22 @@ const Pn = {
|
|
|
460
554
|
"border-radius": { kind: "px", min: 0, max: 48, step: 1 },
|
|
461
555
|
opacity: { kind: "opacity", min: 0, max: 1, step: 0.01 }
|
|
462
556
|
};
|
|
463
|
-
function
|
|
557
|
+
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
|
-
return
|
|
563
|
+
return de(t);
|
|
470
564
|
case "uniform-px":
|
|
471
|
-
return
|
|
565
|
+
return qt(t);
|
|
472
566
|
case "length":
|
|
473
567
|
return ((r = fe(t)) == null ? void 0 : r.num) ?? null;
|
|
474
568
|
default:
|
|
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 In(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",
|
|
@@ -506,7 +600,7 @@ const Tn = /* @__PURE__ */ new Set([
|
|
|
506
600
|
"blockquote",
|
|
507
601
|
"cite",
|
|
508
602
|
"figcaption"
|
|
509
|
-
]),
|
|
603
|
+
]), Fn = /* @__PURE__ */ new Set(["button", "input", "select", "textarea"]), Bn = /* @__PURE__ */ new Set(["img", "video", "canvas", "svg", "picture"]), _n = /* @__PURE__ */ new Set([
|
|
510
604
|
"div",
|
|
511
605
|
"section",
|
|
512
606
|
"article",
|
|
@@ -523,28 +617,28 @@ const Tn = /* @__PURE__ */ new Set([
|
|
|
523
617
|
"summary",
|
|
524
618
|
"fieldset"
|
|
525
619
|
]);
|
|
526
|
-
function
|
|
620
|
+
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
|
-
return t && t !== "none" ? !0 :
|
|
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
|
-
function
|
|
541
|
-
return
|
|
634
|
+
function Un(e, t, n) {
|
|
635
|
+
return Vn(e.tagName, t, n);
|
|
542
636
|
}
|
|
543
|
-
function
|
|
637
|
+
function jn(e, t) {
|
|
544
638
|
return e.has(t);
|
|
545
639
|
}
|
|
546
640
|
const Ce = (e, t, n) => Math.min(n, Math.max(t, e));
|
|
547
|
-
function
|
|
641
|
+
function Me(e) {
|
|
548
642
|
const t = e.trim();
|
|
549
643
|
if (!t) return null;
|
|
550
644
|
const n = t.match(/^#([0-9a-f]{6})$/i);
|
|
@@ -570,153 +664,153 @@ function rt(e) {
|
|
|
570
664
|
b: Ce(parseInt(o[3], 10), 0, 255)
|
|
571
665
|
} : null;
|
|
572
666
|
}
|
|
573
|
-
function
|
|
667
|
+
function Be(e) {
|
|
574
668
|
const t = (n) => Ce(Math.round(n), 0, 255).toString(16).padStart(2, "0");
|
|
575
669
|
return `#${t(e.r)}${t(e.g)}${t(e.b)}`;
|
|
576
670
|
}
|
|
577
|
-
function
|
|
671
|
+
function Yn(e) {
|
|
578
672
|
return `rgb(${e.r}, ${e.g}, ${e.b})`;
|
|
579
673
|
}
|
|
580
|
-
function
|
|
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
676
|
let d = 0;
|
|
583
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));
|
|
584
|
-
const
|
|
585
|
-
return { h: d, s:
|
|
678
|
+
const g = s === 0 ? 0 : p / s * 100, m = s * 100;
|
|
679
|
+
return { h: d, s: g, v: m };
|
|
586
680
|
}
|
|
587
|
-
function
|
|
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, d = 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
687
|
g: Math.round((d + l) * 255),
|
|
594
|
-
b: Math.round((
|
|
688
|
+
b: Math.round((g + l) * 255)
|
|
595
689
|
};
|
|
596
690
|
}
|
|
597
|
-
function
|
|
598
|
-
const t =
|
|
599
|
-
return t ?
|
|
691
|
+
function ht(e) {
|
|
692
|
+
const t = Me(e);
|
|
693
|
+
return t ? Zt(t) : { h: 0, s: 0, v: 45 };
|
|
600
694
|
}
|
|
601
|
-
function
|
|
695
|
+
function Xn(e) {
|
|
602
696
|
return e.replace(/^#/, "").toUpperCase().slice(0, 6);
|
|
603
697
|
}
|
|
604
|
-
function
|
|
698
|
+
function Gn(e, t) {
|
|
605
699
|
const n = e.replace(/[^0-9a-f]/gi, "").slice(0, 6);
|
|
606
|
-
return n.length < 6 ? t :
|
|
700
|
+
return n.length < 6 ? t : Me(`#${n}`) ?? t;
|
|
607
701
|
}
|
|
608
|
-
function
|
|
609
|
-
return
|
|
702
|
+
function Kn(e) {
|
|
703
|
+
return Be(Qt(e));
|
|
610
704
|
}
|
|
611
|
-
function
|
|
612
|
-
const r =
|
|
705
|
+
function qn(e, t, n) {
|
|
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
|
-
function
|
|
712
|
+
function Jn() {
|
|
619
713
|
if (typeof document > "u") return {};
|
|
620
714
|
const e = document.querySelector("[data-pixelagent-root]") ?? document.querySelector("[data-pixelagent-toolbar-portal]"), t = e == null ? void 0 : e.getAttribute("data-pa-chrome");
|
|
621
715
|
return t ? { "data-pa-chrome": t } : {};
|
|
622
716
|
}
|
|
623
|
-
function
|
|
624
|
-
const [
|
|
625
|
-
|
|
626
|
-
|
|
717
|
+
function Ke({ label: e, value: t, onChange: n, labelAction: r }) {
|
|
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
|
-
|
|
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
|
-
|
|
649
|
-
if (!
|
|
650
|
-
|
|
651
|
-
const
|
|
652
|
-
var
|
|
653
|
-
const
|
|
654
|
-
(
|
|
655
|
-
},
|
|
656
|
-
|
|
742
|
+
_(() => {
|
|
743
|
+
if (!o) return;
|
|
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
|
-
}, [
|
|
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
|
-
...
|
|
681
|
-
children: /* @__PURE__ */
|
|
774
|
+
...Jn(),
|
|
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
|
-
style: { top:
|
|
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
|
{
|
|
695
789
|
className: "pa-color-picker-preview",
|
|
696
|
-
style: { backgroundColor:
|
|
790
|
+
style: { backgroundColor: k },
|
|
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
|
-
style: { "--pa-picker-h": String(Math.round(
|
|
708
|
-
onMouseDown:
|
|
801
|
+
style: { "--pa-picker-h": String(Math.round(s.h)) },
|
|
802
|
+
onMouseDown: N,
|
|
709
803
|
children: /* @__PURE__ */ a(
|
|
710
804
|
"span",
|
|
711
805
|
{
|
|
712
806
|
className: "pa-color-picker-sb-thumb",
|
|
713
|
-
style: { left: `${
|
|
807
|
+
style: { left: `${s.s}%`, top: `${100 - s.v}%` },
|
|
714
808
|
"aria-hidden": "true"
|
|
715
809
|
}
|
|
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
|
{
|
|
@@ -724,35 +818,35 @@ function Xe({ label: e, value: t, onChange: n }) {
|
|
|
724
818
|
className: "pa-color-picker-hue-input",
|
|
725
819
|
min: 0,
|
|
726
820
|
max: 360,
|
|
727
|
-
value: Math.round(
|
|
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(
|
|
733
827
|
"span",
|
|
734
828
|
{
|
|
735
829
|
className: "pa-color-picker-hue-thumb",
|
|
736
|
-
style: { left: `${
|
|
830
|
+
style: { left: `${s.h / 360 * 100}%` },
|
|
737
831
|
"aria-hidden": "true"
|
|
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 Xe({ label: e, value: t, onChange: n }) {
|
|
|
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,22 +869,25 @@ function Xe({ label: e, value: t, onChange: n }) {
|
|
|
775
869
|
),
|
|
776
870
|
document.body
|
|
777
871
|
) : null;
|
|
778
|
-
return /* @__PURE__ */
|
|
779
|
-
/* @__PURE__ */
|
|
780
|
-
|
|
872
|
+
return /* @__PURE__ */ u("div", { className: "pa-color-field", children: [
|
|
873
|
+
r ? /* @__PURE__ */ u("div", { className: "pa-color-field-label-row", children: [
|
|
874
|
+
/* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: e }),
|
|
875
|
+
r
|
|
876
|
+
] }) : /* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: e }),
|
|
877
|
+
/* @__PURE__ */ u(
|
|
781
878
|
"button",
|
|
782
879
|
{
|
|
783
|
-
ref:
|
|
880
|
+
ref: p,
|
|
784
881
|
type: "button",
|
|
785
882
|
className: "pa-color-field-trigger",
|
|
786
|
-
"aria-expanded":
|
|
883
|
+
"aria-expanded": o,
|
|
787
884
|
"aria-haspopup": "dialog",
|
|
788
|
-
"aria-controls":
|
|
885
|
+
"aria-controls": o ? m : void 0,
|
|
789
886
|
onClick: () => {
|
|
790
|
-
|
|
887
|
+
o || A(), i((y) => !y);
|
|
791
888
|
},
|
|
792
889
|
children: [
|
|
793
|
-
/* @__PURE__ */ a("span", { className: "pa-color-field-swatch", style: { backgroundColor:
|
|
890
|
+
/* @__PURE__ */ a("span", { className: "pa-color-field-swatch", style: { backgroundColor: k }, "aria-hidden": "true" }),
|
|
794
891
|
/* @__PURE__ */ a(
|
|
795
892
|
"input",
|
|
796
893
|
{
|
|
@@ -805,10 +902,10 @@ function Xe({ label: e, value: t, onChange: n }) {
|
|
|
805
902
|
]
|
|
806
903
|
}
|
|
807
904
|
),
|
|
808
|
-
|
|
905
|
+
P
|
|
809
906
|
] });
|
|
810
907
|
}
|
|
811
|
-
function
|
|
908
|
+
function Zn(e) {
|
|
812
909
|
return Number.isFinite(e) ? Math.min(255, Math.max(0, e)) : 0;
|
|
813
910
|
}
|
|
814
911
|
function we({
|
|
@@ -818,10 +915,10 @@ function we({
|
|
|
818
915
|
badge: r,
|
|
819
916
|
headerAction: o
|
|
820
917
|
}) {
|
|
821
|
-
const [i, s] =
|
|
822
|
-
return /* @__PURE__ */
|
|
823
|
-
/* @__PURE__ */
|
|
824
|
-
/* @__PURE__ */
|
|
918
|
+
const [i, s] = S(n), l = () => s((p) => !p);
|
|
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(
|
|
825
922
|
"button",
|
|
826
923
|
{
|
|
827
924
|
type: "button",
|
|
@@ -878,63 +975,63 @@ const ye = [
|
|
|
878
975
|
{ value: "Helvetica, Arial, sans-serif", label: "Helvetica" },
|
|
879
976
|
{ value: '"JetBrains Mono", ui-monospace, monospace', label: "JetBrains Mono" },
|
|
880
977
|
{ value: "ui-monospace, monospace", label: "Monospace" }
|
|
881
|
-
],
|
|
882
|
-
function
|
|
978
|
+
], Fe = "";
|
|
979
|
+
function Pe(e) {
|
|
883
980
|
var n;
|
|
884
981
|
return (((n = e.split(",")[0]) == null ? void 0 : n.trim()) ?? "").replace(/^["']|["']$/g, "");
|
|
885
982
|
}
|
|
886
|
-
function
|
|
983
|
+
function Qn(e) {
|
|
887
984
|
const t = e.trim();
|
|
888
985
|
if (!t)
|
|
889
986
|
return {
|
|
890
|
-
selectValue:
|
|
987
|
+
selectValue: Fe,
|
|
891
988
|
options: ye
|
|
892
989
|
};
|
|
893
|
-
const n =
|
|
894
|
-
(i) => i.value === t ||
|
|
990
|
+
const n = Pe(t).toLowerCase(), r = ye.find(
|
|
991
|
+
(i) => i.value === t || Pe(i.value).toLowerCase() === n
|
|
895
992
|
);
|
|
896
993
|
if (r)
|
|
897
994
|
return { selectValue: r.value, options: ye };
|
|
898
995
|
const o = ye.find((i) => {
|
|
899
|
-
const s =
|
|
996
|
+
const s = Pe(i.value).toLowerCase();
|
|
900
997
|
return t.toLowerCase().includes(s) || s.includes(n);
|
|
901
998
|
});
|
|
902
999
|
return o ? { selectValue: o.value, options: ye } : {
|
|
903
1000
|
selectValue: t,
|
|
904
1001
|
options: [
|
|
905
1002
|
...ye,
|
|
906
|
-
{ value: t, label:
|
|
1003
|
+
{ value: t, label: Pe(t) || "Custom" }
|
|
907
1004
|
]
|
|
908
1005
|
};
|
|
909
1006
|
}
|
|
910
|
-
function
|
|
911
|
-
const { selectValue: n, options: r } =
|
|
912
|
-
() =>
|
|
1007
|
+
function ea({ value: e, onChange: t }) {
|
|
1008
|
+
const { selectValue: n, options: r } = se(
|
|
1009
|
+
() => Qn(e),
|
|
913
1010
|
[e]
|
|
914
1011
|
);
|
|
915
|
-
return /* @__PURE__ */
|
|
1012
|
+
return /* @__PURE__ */ u("label", { className: "pa-edit-stack-field", children: [
|
|
916
1013
|
/* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: "Font family" }),
|
|
917
|
-
/* @__PURE__ */
|
|
1014
|
+
/* @__PURE__ */ u(
|
|
918
1015
|
"select",
|
|
919
1016
|
{
|
|
920
1017
|
className: "pa-select pa-font-family-select",
|
|
921
|
-
value: n ||
|
|
1018
|
+
value: n || Fe,
|
|
922
1019
|
onChange: (o) => {
|
|
923
1020
|
const i = o.target.value;
|
|
924
|
-
i && i !==
|
|
1021
|
+
i && i !== Fe && t(i);
|
|
925
1022
|
},
|
|
926
1023
|
children: [
|
|
927
|
-
/* @__PURE__ */ a("option", { value:
|
|
1024
|
+
/* @__PURE__ */ a("option", { value: Fe, disabled: !0, children: "Select font style" }),
|
|
928
1025
|
r.map((o) => /* @__PURE__ */ a("option", { value: o.value, children: o.label }, o.value))
|
|
929
1026
|
]
|
|
930
1027
|
}
|
|
931
1028
|
)
|
|
932
1029
|
] });
|
|
933
1030
|
}
|
|
934
|
-
function
|
|
1031
|
+
function st(e, t, n) {
|
|
935
1032
|
return Math.min(n, Math.max(t, e));
|
|
936
1033
|
}
|
|
937
|
-
function
|
|
1034
|
+
function en({
|
|
938
1035
|
getValue: e,
|
|
939
1036
|
min: t = -1 / 0,
|
|
940
1037
|
max: n = 1 / 0,
|
|
@@ -942,40 +1039,40 @@ function Jt({
|
|
|
942
1039
|
onChange: o,
|
|
943
1040
|
pxPerStep: i = 3
|
|
944
1041
|
}) {
|
|
945
|
-
const [s, l] =
|
|
946
|
-
const
|
|
947
|
-
|
|
948
|
-
}, h = (c) => {
|
|
949
|
-
const u = p.current;
|
|
950
|
-
if (!u) return;
|
|
951
|
-
const m = Math.round((c.clientX - u.startX) / i);
|
|
952
|
-
if (m === 0) return;
|
|
953
|
-
const v = u.startValue + m * r, N = Math.round(v / r) * r;
|
|
954
|
-
o(ot(N, t, n));
|
|
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));
|
|
955
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) => {
|
|
956
1053
|
p.current && (p.current = null, l(!1), c.currentTarget.hasPointerCapture(c.pointerId) && c.currentTarget.releasePointerCapture(c.pointerId));
|
|
957
1054
|
};
|
|
958
1055
|
return {
|
|
959
1056
|
scrubbing: s,
|
|
960
1057
|
handleProps: {
|
|
961
1058
|
onPointerDown: d,
|
|
962
|
-
onPointerMove:
|
|
963
|
-
onPointerUp:
|
|
964
|
-
onPointerCancel:
|
|
1059
|
+
onPointerMove: g,
|
|
1060
|
+
onPointerUp: m,
|
|
1061
|
+
onPointerCancel: m
|
|
965
1062
|
}
|
|
966
1063
|
};
|
|
967
1064
|
}
|
|
968
|
-
function
|
|
1065
|
+
function pe({
|
|
969
1066
|
property: e,
|
|
970
1067
|
label: t,
|
|
971
1068
|
value: n,
|
|
972
1069
|
onChange: r,
|
|
973
1070
|
compact: o = !1
|
|
974
1071
|
}) {
|
|
975
|
-
var
|
|
976
|
-
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";
|
|
977
1074
|
if (!l)
|
|
978
|
-
return /* @__PURE__ */
|
|
1075
|
+
return /* @__PURE__ */ u("label", { className: p, children: [
|
|
979
1076
|
/* @__PURE__ */ a("span", { className: d, children: t }),
|
|
980
1077
|
/* @__PURE__ */ a(
|
|
981
1078
|
"input",
|
|
@@ -987,30 +1084,30 @@ function le({
|
|
|
987
1084
|
}
|
|
988
1085
|
)
|
|
989
1086
|
] });
|
|
990
|
-
const
|
|
991
|
-
c ?
|
|
992
|
-
),
|
|
993
|
-
getValue: () =>
|
|
994
|
-
min:
|
|
995
|
-
max:
|
|
996
|
-
step:
|
|
997
|
-
onChange:
|
|
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({
|
|
1090
|
+
getValue: () => Ge(e, n, i),
|
|
1091
|
+
min: g,
|
|
1092
|
+
max: m,
|
|
1093
|
+
step: f,
|
|
1094
|
+
onChange: h,
|
|
998
1095
|
pxPerStep: i.kind === "opacity" ? 2 : 3
|
|
999
|
-
}),
|
|
1096
|
+
}), k = (x) => {
|
|
1000
1097
|
if (x.key !== "ArrowUp" && x.key !== "ArrowDown") return;
|
|
1001
|
-
const w =
|
|
1098
|
+
const w = Ge(e, n, i);
|
|
1002
1099
|
if (w === null) return;
|
|
1003
1100
|
x.preventDefault();
|
|
1004
|
-
const
|
|
1005
|
-
|
|
1101
|
+
const A = x.key === "ArrowUp" ? 1 : -1;
|
|
1102
|
+
h(st(w + A * f, g, m));
|
|
1006
1103
|
};
|
|
1007
|
-
return /* @__PURE__ */
|
|
1104
|
+
return /* @__PURE__ */ u("div", { className: p, children: [
|
|
1008
1105
|
/* @__PURE__ */ a(
|
|
1009
1106
|
"span",
|
|
1010
1107
|
{
|
|
1011
|
-
className: `${d} pa-scrub-label${
|
|
1108
|
+
className: `${d} pa-scrub-label${C.scrubbing ? " pa-scrub-label--active" : ""}`,
|
|
1012
1109
|
title: "Drag to adjust",
|
|
1013
|
-
...
|
|
1110
|
+
...C.handleProps,
|
|
1014
1111
|
children: t
|
|
1015
1112
|
}
|
|
1016
1113
|
),
|
|
@@ -1021,14 +1118,14 @@ function le({
|
|
|
1021
1118
|
type: "text",
|
|
1022
1119
|
value: n,
|
|
1023
1120
|
onChange: (x) => r(x.target.value),
|
|
1024
|
-
onKeyDown:
|
|
1121
|
+
onKeyDown: k,
|
|
1025
1122
|
"aria-label": `${t} value`,
|
|
1026
1123
|
spellCheck: !1
|
|
1027
1124
|
}
|
|
1028
1125
|
)
|
|
1029
1126
|
] });
|
|
1030
1127
|
}
|
|
1031
|
-
function
|
|
1128
|
+
function ta(e) {
|
|
1032
1129
|
const t = e.trim().split(/\s+/).filter(Boolean), n = t[0] ?? "0px";
|
|
1033
1130
|
if (t.length <= 1) return { top: n, right: n, bottom: n, left: n };
|
|
1034
1131
|
const r = t[1];
|
|
@@ -1036,7 +1133,7 @@ function Zn(e) {
|
|
|
1036
1133
|
const o = t[2];
|
|
1037
1134
|
return t.length === 3 ? { top: n, right: r, bottom: o, left: r } : { top: n, right: r, bottom: o, left: t[3] };
|
|
1038
1135
|
}
|
|
1039
|
-
function
|
|
1136
|
+
function na({ top: e, right: t, bottom: n, left: r }) {
|
|
1040
1137
|
return e === t && t === n && n === r ? e : e === n && t === r ? `${e} ${t}` : t === r ? `${e} ${t} ${n}` : `${e} ${t} ${n} ${r}`;
|
|
1041
1138
|
}
|
|
1042
1139
|
function be(e) {
|
|
@@ -1047,10 +1144,10 @@ function ve(e) {
|
|
|
1047
1144
|
const t = e.trim();
|
|
1048
1145
|
return t === "" ? "0px" : /^-?\d+(?:\.\d+)?$/.test(t) ? `${t}px` : t;
|
|
1049
1146
|
}
|
|
1050
|
-
function
|
|
1147
|
+
function xt(e, t) {
|
|
1051
1148
|
return e === t ? be(e) : `${be(e)}, ${be(t)}`;
|
|
1052
1149
|
}
|
|
1053
|
-
function
|
|
1150
|
+
function bt(e, t) {
|
|
1054
1151
|
const n = e.split(",").map((r) => r.trim()).filter(Boolean);
|
|
1055
1152
|
if (n.length === 0) return [t, t];
|
|
1056
1153
|
if (n.length === 1) {
|
|
@@ -1059,41 +1156,41 @@ function mt(e, t) {
|
|
|
1059
1156
|
}
|
|
1060
1157
|
return [ve(n[0]), ve(n[1])];
|
|
1061
1158
|
}
|
|
1062
|
-
const
|
|
1063
|
-
width:
|
|
1064
|
-
height:
|
|
1159
|
+
const vt = 12, lt = {
|
|
1160
|
+
width: vt,
|
|
1161
|
+
height: vt,
|
|
1065
1162
|
viewBox: "0 0 12 12",
|
|
1066
1163
|
fill: "none",
|
|
1067
1164
|
"aria-hidden": !0
|
|
1068
1165
|
};
|
|
1069
|
-
function
|
|
1070
|
-
return /* @__PURE__ */
|
|
1166
|
+
function aa() {
|
|
1167
|
+
return /* @__PURE__ */ u("svg", { ...lt, children: [
|
|
1071
1168
|
/* @__PURE__ */ a("rect", { x: "1.5", y: "1.5", width: "9", height: "9", stroke: "currentColor", strokeOpacity: "0.35" }),
|
|
1072
1169
|
/* @__PURE__ */ a("line", { x1: "1.5", y1: "1.5", x2: "1.5", y2: "10.5", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
1073
1170
|
/* @__PURE__ */ a("line", { x1: "10.5", y1: "1.5", x2: "10.5", y2: "10.5", stroke: "currentColor", strokeWidth: "1.5" })
|
|
1074
1171
|
] });
|
|
1075
1172
|
}
|
|
1076
|
-
function
|
|
1077
|
-
return /* @__PURE__ */
|
|
1173
|
+
function ra() {
|
|
1174
|
+
return /* @__PURE__ */ u("svg", { ...lt, children: [
|
|
1078
1175
|
/* @__PURE__ */ a("rect", { x: "1.5", y: "1.5", width: "9", height: "9", stroke: "currentColor", strokeOpacity: "0.35" }),
|
|
1079
1176
|
/* @__PURE__ */ a("line", { x1: "1.5", y1: "1.5", x2: "10.5", y2: "1.5", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
1080
1177
|
/* @__PURE__ */ a("line", { x1: "1.5", y1: "10.5", x2: "10.5", y2: "10.5", stroke: "currentColor", strokeWidth: "1.5" })
|
|
1081
1178
|
] });
|
|
1082
1179
|
}
|
|
1083
|
-
function
|
|
1180
|
+
function Re({ side: e }) {
|
|
1084
1181
|
const t = {
|
|
1085
1182
|
top: { x1: 1.5, y1: 1.5, x2: 10.5, y2: 1.5 },
|
|
1086
1183
|
right: { x1: 10.5, y1: 1.5, x2: 10.5, y2: 10.5 },
|
|
1087
1184
|
bottom: { x1: 1.5, y1: 10.5, x2: 10.5, y2: 10.5 },
|
|
1088
1185
|
left: { x1: 1.5, y1: 1.5, x2: 1.5, y2: 10.5 }
|
|
1089
1186
|
}[e];
|
|
1090
|
-
return /* @__PURE__ */
|
|
1187
|
+
return /* @__PURE__ */ u("svg", { ...lt, children: [
|
|
1091
1188
|
/* @__PURE__ */ a("rect", { x: "1.5", y: "1.5", width: "9", height: "9", stroke: "currentColor", strokeOpacity: "0.35" }),
|
|
1092
1189
|
/* @__PURE__ */ a("line", { ...t, stroke: "currentColor", strokeWidth: "1.5" })
|
|
1093
1190
|
] });
|
|
1094
1191
|
}
|
|
1095
|
-
function
|
|
1096
|
-
return /* @__PURE__ */
|
|
1192
|
+
function oa() {
|
|
1193
|
+
return /* @__PURE__ */ u("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: [
|
|
1097
1194
|
/* @__PURE__ */ a("rect", { x: "2", y: "2", width: "4", height: "4", stroke: "currentColor", strokeWidth: "1.2" }),
|
|
1098
1195
|
/* @__PURE__ */ a("rect", { x: "8", y: "2", width: "4", height: "4", stroke: "currentColor", strokeWidth: "1.2" }),
|
|
1099
1196
|
/* @__PURE__ */ a("rect", { x: "2", y: "8", width: "4", height: "4", stroke: "currentColor", strokeWidth: "1.2" }),
|
|
@@ -1110,23 +1207,23 @@ function ke({
|
|
|
1110
1207
|
scrubMin: s,
|
|
1111
1208
|
onScrub: l
|
|
1112
1209
|
}) {
|
|
1113
|
-
const [p, d] =
|
|
1114
|
-
|
|
1210
|
+
const [p, d] = S(t);
|
|
1211
|
+
_(() => {
|
|
1115
1212
|
d(t);
|
|
1116
1213
|
}, [t]);
|
|
1117
|
-
const
|
|
1214
|
+
const g = en({
|
|
1118
1215
|
getValue: () => i,
|
|
1119
1216
|
min: s,
|
|
1120
1217
|
step: 1,
|
|
1121
1218
|
onChange: l
|
|
1122
|
-
}),
|
|
1123
|
-
return /* @__PURE__ */
|
|
1219
|
+
}), m = i !== null;
|
|
1220
|
+
return /* @__PURE__ */ u("label", { className: `pa-spacing-cell ${r ? "pa-spacing-cell--mixed" : ""}`, children: [
|
|
1124
1221
|
/* @__PURE__ */ a(
|
|
1125
1222
|
"span",
|
|
1126
1223
|
{
|
|
1127
|
-
className: `pa-spacing-cell-icon${
|
|
1128
|
-
title:
|
|
1129
|
-
...
|
|
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 : {},
|
|
1130
1227
|
children: e
|
|
1131
1228
|
}
|
|
1132
1229
|
),
|
|
@@ -1142,10 +1239,10 @@ function ke({
|
|
|
1142
1239
|
if (c.key === "Enter") c.target.blur();
|
|
1143
1240
|
else if (c.key === "Escape")
|
|
1144
1241
|
d(t), c.target.blur();
|
|
1145
|
-
else if (
|
|
1242
|
+
else if (m && (c.key === "ArrowUp" || c.key === "ArrowDown")) {
|
|
1146
1243
|
c.preventDefault();
|
|
1147
|
-
const
|
|
1148
|
-
l(
|
|
1244
|
+
const f = c.key === "ArrowUp" ? 1 : -1;
|
|
1245
|
+
l(st(i + f, s, 1 / 0));
|
|
1149
1246
|
}
|
|
1150
1247
|
},
|
|
1151
1248
|
"aria-label": n,
|
|
@@ -1154,13 +1251,13 @@ function ke({
|
|
|
1154
1251
|
)
|
|
1155
1252
|
] });
|
|
1156
1253
|
}
|
|
1157
|
-
function
|
|
1158
|
-
const o =
|
|
1159
|
-
r(
|
|
1160
|
-
}, p = o.left !== o.right, d = o.top !== o.bottom,
|
|
1161
|
-
return /* @__PURE__ */
|
|
1254
|
+
function wt({ property: e, label: t, value: n, onChange: r }) {
|
|
1255
|
+
const o = ta(n), [i, s] = S(!1), l = (c) => {
|
|
1256
|
+
r(na({ ...o, ...c }));
|
|
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: [
|
|
1162
1259
|
/* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: t }),
|
|
1163
|
-
/* @__PURE__ */
|
|
1260
|
+
/* @__PURE__ */ u(
|
|
1164
1261
|
"div",
|
|
1165
1262
|
{
|
|
1166
1263
|
className: `pa-spacing-control ${i ? "pa-spacing-control--split" : "pa-spacing-control--pair"}`,
|
|
@@ -1169,86 +1266,86 @@ function bt({ property: e, label: t, value: n, onChange: r }) {
|
|
|
1169
1266
|
// Grid mirrors pair-view columns:
|
|
1170
1267
|
// Col 1 (horizontal pair) → L on top, R on bottom
|
|
1171
1268
|
// Col 2 (vertical pair) → T on top, B on bottom
|
|
1172
|
-
/* @__PURE__ */
|
|
1269
|
+
/* @__PURE__ */ u("div", { className: "pa-spacing-grid", children: [
|
|
1173
1270
|
/* @__PURE__ */ a(
|
|
1174
1271
|
ke,
|
|
1175
1272
|
{
|
|
1176
|
-
icon: /* @__PURE__ */ a(
|
|
1273
|
+
icon: /* @__PURE__ */ a(Re, { side: "left" }),
|
|
1177
1274
|
display: be(o.left),
|
|
1178
1275
|
ariaLabel: `${t} left`,
|
|
1179
1276
|
onCommit: (c) => l({ left: ve(c) }),
|
|
1180
|
-
scrubValue:
|
|
1181
|
-
scrubMin:
|
|
1277
|
+
scrubValue: de(o.left),
|
|
1278
|
+
scrubMin: g,
|
|
1182
1279
|
onScrub: (c) => l({ left: `${c}px` })
|
|
1183
1280
|
}
|
|
1184
1281
|
),
|
|
1185
1282
|
/* @__PURE__ */ a(
|
|
1186
1283
|
ke,
|
|
1187
1284
|
{
|
|
1188
|
-
icon: /* @__PURE__ */ a(
|
|
1285
|
+
icon: /* @__PURE__ */ a(Re, { side: "top" }),
|
|
1189
1286
|
display: be(o.top),
|
|
1190
1287
|
ariaLabel: `${t} top`,
|
|
1191
1288
|
onCommit: (c) => l({ top: ve(c) }),
|
|
1192
|
-
scrubValue:
|
|
1193
|
-
scrubMin:
|
|
1289
|
+
scrubValue: de(o.top),
|
|
1290
|
+
scrubMin: g,
|
|
1194
1291
|
onScrub: (c) => l({ top: `${c}px` })
|
|
1195
1292
|
}
|
|
1196
1293
|
),
|
|
1197
1294
|
/* @__PURE__ */ a(
|
|
1198
1295
|
ke,
|
|
1199
1296
|
{
|
|
1200
|
-
icon: /* @__PURE__ */ a(
|
|
1297
|
+
icon: /* @__PURE__ */ a(Re, { side: "right" }),
|
|
1201
1298
|
display: be(o.right),
|
|
1202
1299
|
ariaLabel: `${t} right`,
|
|
1203
1300
|
onCommit: (c) => l({ right: ve(c) }),
|
|
1204
|
-
scrubValue:
|
|
1205
|
-
scrubMin:
|
|
1301
|
+
scrubValue: de(o.right),
|
|
1302
|
+
scrubMin: g,
|
|
1206
1303
|
onScrub: (c) => l({ right: `${c}px` })
|
|
1207
1304
|
}
|
|
1208
1305
|
),
|
|
1209
1306
|
/* @__PURE__ */ a(
|
|
1210
1307
|
ke,
|
|
1211
1308
|
{
|
|
1212
|
-
icon: /* @__PURE__ */ a(
|
|
1309
|
+
icon: /* @__PURE__ */ a(Re, { side: "bottom" }),
|
|
1213
1310
|
display: be(o.bottom),
|
|
1214
1311
|
ariaLabel: `${t} bottom`,
|
|
1215
1312
|
onCommit: (c) => l({ bottom: ve(c) }),
|
|
1216
|
-
scrubValue:
|
|
1217
|
-
scrubMin:
|
|
1313
|
+
scrubValue: de(o.bottom),
|
|
1314
|
+
scrubMin: g,
|
|
1218
1315
|
onScrub: (c) => l({ bottom: `${c}px` })
|
|
1219
1316
|
}
|
|
1220
1317
|
)
|
|
1221
1318
|
] })
|
|
1222
|
-
) : /* @__PURE__ */
|
|
1319
|
+
) : /* @__PURE__ */ u("div", { className: "pa-spacing-pair", children: [
|
|
1223
1320
|
/* @__PURE__ */ a(
|
|
1224
1321
|
ke,
|
|
1225
1322
|
{
|
|
1226
|
-
icon: /* @__PURE__ */ a(
|
|
1227
|
-
display:
|
|
1323
|
+
icon: /* @__PURE__ */ a(aa, {}),
|
|
1324
|
+
display: xt(o.left, o.right),
|
|
1228
1325
|
mixed: p,
|
|
1229
1326
|
ariaLabel: `${t} horizontal`,
|
|
1230
1327
|
onCommit: (c) => {
|
|
1231
|
-
const [
|
|
1232
|
-
l({ left:
|
|
1328
|
+
const [f, h] = bt(c, o.left);
|
|
1329
|
+
l({ left: f, right: h });
|
|
1233
1330
|
},
|
|
1234
|
-
scrubValue:
|
|
1235
|
-
scrubMin:
|
|
1331
|
+
scrubValue: m(o.left, o.right),
|
|
1332
|
+
scrubMin: g,
|
|
1236
1333
|
onScrub: (c) => l({ left: `${c}px`, right: `${c}px` })
|
|
1237
1334
|
}
|
|
1238
1335
|
),
|
|
1239
1336
|
/* @__PURE__ */ a(
|
|
1240
1337
|
ke,
|
|
1241
1338
|
{
|
|
1242
|
-
icon: /* @__PURE__ */ a(
|
|
1243
|
-
display:
|
|
1339
|
+
icon: /* @__PURE__ */ a(ra, {}),
|
|
1340
|
+
display: xt(o.top, o.bottom),
|
|
1244
1341
|
mixed: d,
|
|
1245
1342
|
ariaLabel: `${t} vertical`,
|
|
1246
1343
|
onCommit: (c) => {
|
|
1247
|
-
const [
|
|
1248
|
-
l({ top:
|
|
1344
|
+
const [f, h] = bt(c, o.top);
|
|
1345
|
+
l({ top: f, bottom: h });
|
|
1249
1346
|
},
|
|
1250
|
-
scrubValue:
|
|
1251
|
-
scrubMin:
|
|
1347
|
+
scrubValue: m(o.top, o.bottom),
|
|
1348
|
+
scrubMin: g,
|
|
1252
1349
|
onScrub: (c) => l({ top: `${c}px`, bottom: `${c}px` })
|
|
1253
1350
|
}
|
|
1254
1351
|
)
|
|
@@ -1262,7 +1359,7 @@ function bt({ property: e, label: t, value: n, onChange: r }) {
|
|
|
1262
1359
|
"aria-pressed": i,
|
|
1263
1360
|
"aria-label": i ? "Collapse to pair view" : "Expand to per-side view",
|
|
1264
1361
|
title: i ? "Collapse to pair view" : "Expand to per-side view",
|
|
1265
|
-
children: /* @__PURE__ */ a(
|
|
1362
|
+
children: /* @__PURE__ */ a(oa, {})
|
|
1266
1363
|
}
|
|
1267
1364
|
)
|
|
1268
1365
|
]
|
|
@@ -1270,7 +1367,7 @@ function bt({ property: e, label: t, value: n, onChange: r }) {
|
|
|
1270
1367
|
)
|
|
1271
1368
|
] });
|
|
1272
1369
|
}
|
|
1273
|
-
function
|
|
1370
|
+
function ia({ className: e }) {
|
|
1274
1371
|
return /* @__PURE__ */ a("svg", { className: e, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true", children: /* @__PURE__ */ a(
|
|
1275
1372
|
"path",
|
|
1276
1373
|
{
|
|
@@ -1279,7 +1376,7 @@ function aa({ className: e }) {
|
|
|
1279
1376
|
}
|
|
1280
1377
|
) });
|
|
1281
1378
|
}
|
|
1282
|
-
function
|
|
1379
|
+
function sa({ className: e }) {
|
|
1283
1380
|
return /* @__PURE__ */ a("svg", { className: e, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true", children: /* @__PURE__ */ a(
|
|
1284
1381
|
"path",
|
|
1285
1382
|
{
|
|
@@ -1288,7 +1385,7 @@ function ra({ className: e }) {
|
|
|
1288
1385
|
}
|
|
1289
1386
|
) });
|
|
1290
1387
|
}
|
|
1291
|
-
function
|
|
1388
|
+
function la({ className: e }) {
|
|
1292
1389
|
return /* @__PURE__ */ a("svg", { className: e, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true", children: /* @__PURE__ */ a(
|
|
1293
1390
|
"path",
|
|
1294
1391
|
{
|
|
@@ -1297,11 +1394,11 @@ function oa({ className: e }) {
|
|
|
1297
1394
|
}
|
|
1298
1395
|
) });
|
|
1299
1396
|
}
|
|
1300
|
-
function
|
|
1397
|
+
function ca({ className: e }) {
|
|
1301
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" }) });
|
|
1302
1399
|
}
|
|
1303
|
-
function
|
|
1304
|
-
return /* @__PURE__ */
|
|
1400
|
+
function pa({ className: e }) {
|
|
1401
|
+
return /* @__PURE__ */ u(
|
|
1305
1402
|
"svg",
|
|
1306
1403
|
{
|
|
1307
1404
|
className: e,
|
|
@@ -1321,7 +1418,7 @@ function sa({ className: e }) {
|
|
|
1321
1418
|
}
|
|
1322
1419
|
);
|
|
1323
1420
|
}
|
|
1324
|
-
function
|
|
1421
|
+
function da({ className: e }) {
|
|
1325
1422
|
return /* @__PURE__ */ a("svg", { className: e, width: "16", height: "16", viewBox: "0 0 16 16", "aria-hidden": "true", children: /* @__PURE__ */ a(
|
|
1326
1423
|
"path",
|
|
1327
1424
|
{
|
|
@@ -1330,47 +1427,47 @@ function la({ className: e }) {
|
|
|
1330
1427
|
}
|
|
1331
1428
|
) });
|
|
1332
1429
|
}
|
|
1333
|
-
const
|
|
1430
|
+
const ua = /^--(?:text|font-size)-(.+)$/, fa = ["--line-height", "--font-weight", "--letter-spacing"], ga = [
|
|
1334
1431
|
"--text-",
|
|
1335
1432
|
"--font-",
|
|
1336
1433
|
"--leading-",
|
|
1337
1434
|
"--line-height-"
|
|
1338
1435
|
];
|
|
1339
|
-
function
|
|
1436
|
+
function ha(e) {
|
|
1340
1437
|
const t = fe(e);
|
|
1341
1438
|
return t !== null && (t.unit === "px" || t.unit === "rem" || t.unit === "em");
|
|
1342
1439
|
}
|
|
1343
|
-
function
|
|
1440
|
+
function yt(e) {
|
|
1344
1441
|
return Math.round(e * 100) / 100;
|
|
1345
1442
|
}
|
|
1346
|
-
function
|
|
1443
|
+
function kt(e, t) {
|
|
1347
1444
|
const n = fe(e);
|
|
1348
|
-
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;
|
|
1349
1446
|
}
|
|
1350
|
-
function
|
|
1447
|
+
function ma(e) {
|
|
1351
1448
|
return e && e[0].toUpperCase() + e.slice(1);
|
|
1352
1449
|
}
|
|
1353
|
-
function
|
|
1354
|
-
return /^h[1-6]$/i.test(e) ? e.toUpperCase() : e.split(/[-_]/).filter(Boolean).map((n) => /^\d*x?[sl]?$|^\d*xl$|^xs$|^sm$|^md$|^lg$|^xl$/i.test(n) ? n.toUpperCase() :
|
|
1450
|
+
function xa(e) {
|
|
1451
|
+
return /^h[1-6]$/i.test(e) ? e.toUpperCase() : e.split(/[-_]/).filter(Boolean).map((n) => /^\d*x?[sl]?$|^\d*xl$|^xs$|^sm$|^md$|^lg$|^xl$/i.test(n) ? n.toUpperCase() : ma(n)).join(" ");
|
|
1355
1452
|
}
|
|
1356
|
-
function
|
|
1357
|
-
return
|
|
1453
|
+
function ba(e) {
|
|
1454
|
+
return fa.some((t) => e.endsWith(t));
|
|
1358
1455
|
}
|
|
1359
|
-
function
|
|
1456
|
+
function va(e, t = 16) {
|
|
1360
1457
|
const n = [];
|
|
1361
1458
|
for (const [r, o] of Object.entries(e)) {
|
|
1362
|
-
if (
|
|
1363
|
-
const i = r.match(
|
|
1459
|
+
if (ba(r)) continue;
|
|
1460
|
+
const i = r.match(ua);
|
|
1364
1461
|
if (!i) continue;
|
|
1365
1462
|
const s = o.trim();
|
|
1366
|
-
if (!
|
|
1463
|
+
if (!ha(s)) continue;
|
|
1367
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;
|
|
1368
1465
|
n.push({
|
|
1369
1466
|
id: l,
|
|
1370
|
-
label:
|
|
1467
|
+
label: xa(l),
|
|
1371
1468
|
varName: r,
|
|
1372
|
-
fontSize:
|
|
1373
|
-
lineHeight: p ?
|
|
1469
|
+
fontSize: kt(s, t),
|
|
1470
|
+
lineHeight: p ? kt(p.trim(), t) : null,
|
|
1374
1471
|
fontWeight: d ? d.trim() : null
|
|
1375
1472
|
});
|
|
1376
1473
|
}
|
|
@@ -1379,32 +1476,32 @@ function ma(e, t = 16) {
|
|
|
1379
1476
|
return (((i = fe(o.fontSize)) == null ? void 0 : i.num) ?? 0) - (((s = fe(r.fontSize)) == null ? void 0 : s.num) ?? 0);
|
|
1380
1477
|
}), n;
|
|
1381
1478
|
}
|
|
1382
|
-
function
|
|
1479
|
+
function wa(e) {
|
|
1383
1480
|
const t = e.fontSize.replace(/px$/, "");
|
|
1384
1481
|
return e.lineHeight ? `${t}/${e.lineHeight.replace(/px$/, "")}` : t;
|
|
1385
1482
|
}
|
|
1386
|
-
function
|
|
1483
|
+
function Te(e) {
|
|
1387
1484
|
var t;
|
|
1388
1485
|
return e ? ((t = fe(e)) == null ? void 0 : t.num) ?? null : null;
|
|
1389
1486
|
}
|
|
1390
|
-
function
|
|
1391
|
-
const r =
|
|
1487
|
+
function ya(e, t, n) {
|
|
1488
|
+
const r = Te(t);
|
|
1392
1489
|
if (r === null) return null;
|
|
1393
|
-
const o =
|
|
1394
|
-
const l =
|
|
1490
|
+
const o = Te(n), i = e.filter((s) => {
|
|
1491
|
+
const l = Te(s.fontSize);
|
|
1395
1492
|
return l !== null && Math.abs(l - r) < 0.5;
|
|
1396
1493
|
});
|
|
1397
1494
|
if (i.length === 0) return null;
|
|
1398
1495
|
if (o !== null) {
|
|
1399
1496
|
const s = i.find((l) => {
|
|
1400
|
-
const p =
|
|
1497
|
+
const p = Te(l.lineHeight);
|
|
1401
1498
|
return p !== null && Math.abs(p - o) < 0.5;
|
|
1402
1499
|
});
|
|
1403
1500
|
if (s) return s;
|
|
1404
1501
|
}
|
|
1405
1502
|
return i[0];
|
|
1406
1503
|
}
|
|
1407
|
-
function
|
|
1504
|
+
function ka(e) {
|
|
1408
1505
|
const t = /* @__PURE__ */ new Set(), n = (r) => {
|
|
1409
1506
|
if (r)
|
|
1410
1507
|
for (const o of Array.from(r)) {
|
|
@@ -1412,7 +1509,7 @@ function va(e) {
|
|
|
1412
1509
|
if (i.style)
|
|
1413
1510
|
for (let l = 0; l < i.style.length; l++) {
|
|
1414
1511
|
const p = i.style[l];
|
|
1415
|
-
p.startsWith("--") &&
|
|
1512
|
+
p.startsWith("--") && ga.some((d) => p.startsWith(d)) && t.add(p);
|
|
1416
1513
|
}
|
|
1417
1514
|
const s = o.cssRules;
|
|
1418
1515
|
s && n(s);
|
|
@@ -1425,24 +1522,24 @@ function va(e) {
|
|
|
1425
1522
|
}
|
|
1426
1523
|
return t;
|
|
1427
1524
|
}
|
|
1428
|
-
function
|
|
1525
|
+
function Na() {
|
|
1429
1526
|
if (typeof document > "u") return [];
|
|
1430
|
-
const e =
|
|
1527
|
+
const e = ka(document), t = document.documentElement, n = getComputedStyle(t), r = {};
|
|
1431
1528
|
for (const i of e) {
|
|
1432
1529
|
const s = n.getPropertyValue(i).trim();
|
|
1433
1530
|
s && (r[i] = s);
|
|
1434
1531
|
}
|
|
1435
1532
|
const o = parseFloat(n.fontSize) || 16;
|
|
1436
|
-
return
|
|
1533
|
+
return va(r, o);
|
|
1437
1534
|
}
|
|
1438
|
-
const
|
|
1439
|
-
function
|
|
1535
|
+
const Nt = 264, Ct = 360;
|
|
1536
|
+
function Ca() {
|
|
1440
1537
|
if (typeof document > "u") return {};
|
|
1441
1538
|
const e = document.querySelector("[data-pixelagent-root]") ?? document.querySelector("[data-pixelagent-toolbar-portal]"), t = e == null ? void 0 : e.getAttribute("data-pa-chrome");
|
|
1442
1539
|
return t ? { "data-pa-chrome": t } : {};
|
|
1443
1540
|
}
|
|
1444
|
-
function
|
|
1445
|
-
return /* @__PURE__ */
|
|
1541
|
+
function Ma({ className: e }) {
|
|
1542
|
+
return /* @__PURE__ */ u(
|
|
1446
1543
|
"svg",
|
|
1447
1544
|
{
|
|
1448
1545
|
className: e,
|
|
@@ -1460,60 +1557,60 @@ function ka({ className: e }) {
|
|
|
1460
1557
|
}
|
|
1461
1558
|
);
|
|
1462
1559
|
}
|
|
1463
|
-
function
|
|
1560
|
+
function Aa({
|
|
1464
1561
|
presets: e,
|
|
1465
1562
|
fontSize: t,
|
|
1466
1563
|
lineHeight: n,
|
|
1467
1564
|
onApply: r
|
|
1468
1565
|
}) {
|
|
1469
|
-
const [o, i] =
|
|
1470
|
-
() =>
|
|
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(
|
|
1567
|
+
() => ya(e, t, n),
|
|
1471
1568
|
[e, t, n]
|
|
1472
|
-
),
|
|
1569
|
+
), C = se(() => {
|
|
1473
1570
|
const x = s.trim().toLowerCase();
|
|
1474
1571
|
return x ? e.filter((w) => w.label.toLowerCase().includes(x) || w.id.toLowerCase().includes(x)) : e;
|
|
1475
|
-
}, [e, s]),
|
|
1572
|
+
}, [e, s]), k = T(() => {
|
|
1476
1573
|
const x = p.current;
|
|
1477
1574
|
if (!x) return;
|
|
1478
|
-
const w = x.getBoundingClientRect(),
|
|
1479
|
-
let
|
|
1480
|
-
|
|
1481
|
-
let
|
|
1482
|
-
|
|
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 });
|
|
1483
1580
|
}, []);
|
|
1484
|
-
if (
|
|
1485
|
-
var
|
|
1581
|
+
if (_(() => {
|
|
1582
|
+
var A;
|
|
1486
1583
|
if (!o) return;
|
|
1487
|
-
|
|
1488
|
-
const x = (
|
|
1489
|
-
var
|
|
1490
|
-
const
|
|
1491
|
-
(
|
|
1492
|
-
}, w = (
|
|
1493
|
-
|
|
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);
|
|
1494
1591
|
};
|
|
1495
|
-
return window.addEventListener("mousedown", x, !0), window.addEventListener("keydown", w), window.addEventListener("resize",
|
|
1496
|
-
window.removeEventListener("mousedown", x, !0), window.removeEventListener("keydown", w), window.removeEventListener("resize",
|
|
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);
|
|
1497
1594
|
};
|
|
1498
|
-
}, [o,
|
|
1499
|
-
const
|
|
1595
|
+
}, [o, k]), e.length === 0) return null;
|
|
1596
|
+
const D = o ? Le(
|
|
1500
1597
|
/* @__PURE__ */ a(
|
|
1501
1598
|
"div",
|
|
1502
1599
|
{
|
|
1503
1600
|
className: "pa-root pa-root--toolbar-portal pa-text-styles-portal",
|
|
1504
1601
|
"data-pixelagent-picker-portal": !0,
|
|
1505
|
-
...
|
|
1506
|
-
children: /* @__PURE__ */
|
|
1602
|
+
...Ca(),
|
|
1603
|
+
children: /* @__PURE__ */ u(
|
|
1507
1604
|
"div",
|
|
1508
1605
|
{
|
|
1509
1606
|
ref: d,
|
|
1510
|
-
id:
|
|
1607
|
+
id: m,
|
|
1511
1608
|
role: "dialog",
|
|
1512
1609
|
"aria-label": "Text styles",
|
|
1513
1610
|
className: "pa-text-styles",
|
|
1514
1611
|
style: { top: c.top, left: c.left, width: c.width },
|
|
1515
1612
|
children: [
|
|
1516
|
-
/* @__PURE__ */
|
|
1613
|
+
/* @__PURE__ */ u("header", { className: "pa-text-styles-header", children: [
|
|
1517
1614
|
/* @__PURE__ */ a("span", { className: "pa-text-styles-title", children: "Text styles" }),
|
|
1518
1615
|
/* @__PURE__ */ a(
|
|
1519
1616
|
"button",
|
|
@@ -1526,12 +1623,12 @@ function Na({
|
|
|
1526
1623
|
}
|
|
1527
1624
|
)
|
|
1528
1625
|
] }),
|
|
1529
|
-
/* @__PURE__ */
|
|
1530
|
-
/* @__PURE__ */ a(
|
|
1626
|
+
/* @__PURE__ */ u("div", { className: "pa-text-styles-search", children: [
|
|
1627
|
+
/* @__PURE__ */ a(Ma, { className: "pa-text-styles-search-icon" }),
|
|
1531
1628
|
/* @__PURE__ */ a(
|
|
1532
1629
|
"input",
|
|
1533
1630
|
{
|
|
1534
|
-
ref:
|
|
1631
|
+
ref: g,
|
|
1535
1632
|
type: "text",
|
|
1536
1633
|
className: "pa-input pa-text-styles-search-input",
|
|
1537
1634
|
placeholder: "Search",
|
|
@@ -1541,22 +1638,22 @@ function Na({
|
|
|
1541
1638
|
}
|
|
1542
1639
|
)
|
|
1543
1640
|
] }),
|
|
1544
|
-
/* @__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(
|
|
1545
1642
|
"button",
|
|
1546
1643
|
{
|
|
1547
1644
|
type: "button",
|
|
1548
1645
|
role: "option",
|
|
1549
|
-
"aria-selected": (
|
|
1550
|
-
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" : ""}`,
|
|
1551
1648
|
onClick: () => {
|
|
1552
1649
|
r(x), i(!1);
|
|
1553
1650
|
},
|
|
1554
1651
|
children: [
|
|
1555
1652
|
/* @__PURE__ */ a("span", { className: "pa-text-styles-specimen", "aria-hidden": "true", children: "Ag" }),
|
|
1556
1653
|
/* @__PURE__ */ a("span", { className: "pa-text-styles-row-label", children: x.label }),
|
|
1557
|
-
/* @__PURE__ */
|
|
1654
|
+
/* @__PURE__ */ u("span", { className: "pa-text-styles-row-metrics", children: [
|
|
1558
1655
|
"· ",
|
|
1559
|
-
|
|
1656
|
+
wa(x)
|
|
1560
1657
|
] })
|
|
1561
1658
|
]
|
|
1562
1659
|
},
|
|
@@ -1569,7 +1666,7 @@ function Na({
|
|
|
1569
1666
|
),
|
|
1570
1667
|
document.body
|
|
1571
1668
|
) : null;
|
|
1572
|
-
return /* @__PURE__ */
|
|
1669
|
+
return /* @__PURE__ */ u(Z, { children: [
|
|
1573
1670
|
/* @__PURE__ */ a(
|
|
1574
1671
|
"button",
|
|
1575
1672
|
{
|
|
@@ -1579,18 +1676,222 @@ function Na({
|
|
|
1579
1676
|
"aria-label": "Text styles",
|
|
1580
1677
|
"aria-haspopup": "dialog",
|
|
1581
1678
|
"aria-expanded": o,
|
|
1582
|
-
"aria-controls": o ?
|
|
1679
|
+
"aria-controls": o ? m : void 0,
|
|
1583
1680
|
title: "Text styles",
|
|
1584
1681
|
onClick: (x) => {
|
|
1585
|
-
x.stopPropagation(), o ||
|
|
1682
|
+
x.stopPropagation(), o || k(), i((w) => !w);
|
|
1683
|
+
},
|
|
1684
|
+
children: /* @__PURE__ */ a(pa, { className: "pa-edit-section-action-icon" })
|
|
1685
|
+
}
|
|
1686
|
+
),
|
|
1687
|
+
D
|
|
1688
|
+
] });
|
|
1689
|
+
}
|
|
1690
|
+
function za(e) {
|
|
1691
|
+
return e && e[0].toUpperCase() + e.slice(1);
|
|
1692
|
+
}
|
|
1693
|
+
function Sa(e) {
|
|
1694
|
+
return (e.replace(/^--/, "").replace(/^color-/, "") || e.replace(/^--/, "")).split(/[-_]/).filter(Boolean).map(za).join(" ");
|
|
1695
|
+
}
|
|
1696
|
+
function La(e) {
|
|
1697
|
+
const t = [];
|
|
1698
|
+
for (const [n, r] of Object.entries(e)) {
|
|
1699
|
+
const o = r.trim();
|
|
1700
|
+
!o || !Me(o) || t.push({
|
|
1701
|
+
id: n.replace(/^--/, ""),
|
|
1702
|
+
name: Sa(n),
|
|
1703
|
+
value: o,
|
|
1704
|
+
varName: n
|
|
1705
|
+
});
|
|
1706
|
+
}
|
|
1707
|
+
return t;
|
|
1708
|
+
}
|
|
1709
|
+
function Ea(e, t) {
|
|
1710
|
+
const n = Me(t);
|
|
1711
|
+
if (!n) return null;
|
|
1712
|
+
const r = Be(n);
|
|
1713
|
+
return e.find((o) => {
|
|
1714
|
+
const i = Me(o.value);
|
|
1715
|
+
return i !== null && Be(i) === r;
|
|
1716
|
+
}) ?? null;
|
|
1717
|
+
}
|
|
1718
|
+
function $a(e) {
|
|
1719
|
+
const t = /* @__PURE__ */ new Set(), n = (r) => {
|
|
1720
|
+
if (r)
|
|
1721
|
+
for (const o of Array.from(r)) {
|
|
1722
|
+
const i = o;
|
|
1723
|
+
if (i.style)
|
|
1724
|
+
for (let l = 0; l < i.style.length; l++) {
|
|
1725
|
+
const p = i.style[l];
|
|
1726
|
+
p.startsWith("--") && t.add(p);
|
|
1727
|
+
}
|
|
1728
|
+
const s = o.cssRules;
|
|
1729
|
+
s && n(s);
|
|
1730
|
+
}
|
|
1731
|
+
};
|
|
1732
|
+
for (const r of Array.from(e.styleSheets))
|
|
1733
|
+
try {
|
|
1734
|
+
n(r.cssRules);
|
|
1735
|
+
} catch {
|
|
1736
|
+
}
|
|
1737
|
+
return t;
|
|
1738
|
+
}
|
|
1739
|
+
function Pa() {
|
|
1740
|
+
if (typeof document > "u") return [];
|
|
1741
|
+
const e = $a(document), t = getComputedStyle(document.documentElement), n = {};
|
|
1742
|
+
for (const r of e) {
|
|
1743
|
+
const o = t.getPropertyValue(r).trim();
|
|
1744
|
+
o && (n[r] = o);
|
|
1745
|
+
}
|
|
1746
|
+
return La(n);
|
|
1747
|
+
}
|
|
1748
|
+
const Mt = 300, At = 360;
|
|
1749
|
+
function Ra() {
|
|
1750
|
+
if (typeof document > "u") return {};
|
|
1751
|
+
const e = document.querySelector("[data-pixelagent-root]") ?? document.querySelector("[data-pixelagent-toolbar-portal]"), t = e == null ? void 0 : e.getAttribute("data-pa-chrome");
|
|
1752
|
+
return t ? { "data-pa-chrome": t } : {};
|
|
1753
|
+
}
|
|
1754
|
+
function Ta({ className: e }) {
|
|
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: [
|
|
1756
|
+
/* @__PURE__ */ a("circle", { cx: "7", cy: "7", r: "4.5" }),
|
|
1757
|
+
/* @__PURE__ */ a("line", { x1: "10.5", y1: "10.5", x2: "14", y2: "14", strokeLinecap: "round" })
|
|
1758
|
+
] });
|
|
1759
|
+
}
|
|
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: [
|
|
1762
|
+
/* @__PURE__ */ a("circle", { cx: "6.4", cy: "6.4", r: "3.4" }),
|
|
1763
|
+
/* @__PURE__ */ a("circle", { cx: "9.8", cy: "9.8", r: "3.4" })
|
|
1764
|
+
] });
|
|
1765
|
+
}
|
|
1766
|
+
function qe({ presets: e, value: t, onApply: n, title: r = "Color" }) {
|
|
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)
|
|
1771
|
+
) : e;
|
|
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 });
|
|
1780
|
+
}, []);
|
|
1781
|
+
if (_(() => {
|
|
1782
|
+
var A;
|
|
1783
|
+
if (!o) return;
|
|
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);
|
|
1791
|
+
};
|
|
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);
|
|
1794
|
+
};
|
|
1795
|
+
}, [o, k]), e.length === 0) return null;
|
|
1796
|
+
const D = o ? Le(
|
|
1797
|
+
/* @__PURE__ */ a(
|
|
1798
|
+
"div",
|
|
1799
|
+
{
|
|
1800
|
+
className: "pa-root pa-root--toolbar-portal pa-text-styles-portal",
|
|
1801
|
+
"data-pixelagent-picker-portal": !0,
|
|
1802
|
+
...Ra(),
|
|
1803
|
+
children: /* @__PURE__ */ u(
|
|
1804
|
+
"div",
|
|
1805
|
+
{
|
|
1806
|
+
ref: d,
|
|
1807
|
+
id: m,
|
|
1808
|
+
role: "dialog",
|
|
1809
|
+
"aria-label": r,
|
|
1810
|
+
className: "pa-text-styles",
|
|
1811
|
+
style: { top: c.top, left: c.left, width: c.width },
|
|
1812
|
+
children: [
|
|
1813
|
+
/* @__PURE__ */ u("header", { className: "pa-text-styles-header", children: [
|
|
1814
|
+
/* @__PURE__ */ a("span", { className: "pa-text-styles-title", children: r }),
|
|
1815
|
+
/* @__PURE__ */ a(
|
|
1816
|
+
"button",
|
|
1817
|
+
{
|
|
1818
|
+
type: "button",
|
|
1819
|
+
className: "pa-text-styles-close",
|
|
1820
|
+
"aria-label": `Close ${r.toLowerCase()}`,
|
|
1821
|
+
onClick: () => i(!1),
|
|
1822
|
+
children: "×"
|
|
1823
|
+
}
|
|
1824
|
+
)
|
|
1825
|
+
] }),
|
|
1826
|
+
/* @__PURE__ */ u("div", { className: "pa-text-styles-search", children: [
|
|
1827
|
+
/* @__PURE__ */ a(Ta, { className: "pa-text-styles-search-icon" }),
|
|
1828
|
+
/* @__PURE__ */ a(
|
|
1829
|
+
"input",
|
|
1830
|
+
{
|
|
1831
|
+
ref: g,
|
|
1832
|
+
type: "text",
|
|
1833
|
+
className: "pa-input pa-text-styles-search-input",
|
|
1834
|
+
placeholder: "Search",
|
|
1835
|
+
value: s,
|
|
1836
|
+
spellCheck: !1,
|
|
1837
|
+
onChange: (x) => l(x.target.value)
|
|
1838
|
+
}
|
|
1839
|
+
)
|
|
1840
|
+
] }),
|
|
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(
|
|
1842
|
+
"button",
|
|
1843
|
+
{
|
|
1844
|
+
type: "button",
|
|
1845
|
+
role: "option",
|
|
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" : ""}`,
|
|
1848
|
+
onClick: () => {
|
|
1849
|
+
n(x.value), i(!1);
|
|
1850
|
+
},
|
|
1851
|
+
children: [
|
|
1852
|
+
/* @__PURE__ */ a(
|
|
1853
|
+
"span",
|
|
1854
|
+
{
|
|
1855
|
+
className: "pa-color-presets-swatch",
|
|
1856
|
+
style: { backgroundColor: x.value },
|
|
1857
|
+
"aria-hidden": "true"
|
|
1858
|
+
}
|
|
1859
|
+
),
|
|
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 })
|
|
1862
|
+
]
|
|
1863
|
+
},
|
|
1864
|
+
x.id
|
|
1865
|
+
)) })
|
|
1866
|
+
]
|
|
1867
|
+
}
|
|
1868
|
+
)
|
|
1869
|
+
}
|
|
1870
|
+
),
|
|
1871
|
+
document.body
|
|
1872
|
+
) : null;
|
|
1873
|
+
return /* @__PURE__ */ u(Z, { children: [
|
|
1874
|
+
/* @__PURE__ */ a(
|
|
1875
|
+
"button",
|
|
1876
|
+
{
|
|
1877
|
+
ref: p,
|
|
1878
|
+
type: "button",
|
|
1879
|
+
className: "pa-edit-section-action",
|
|
1880
|
+
"aria-label": `${r} tokens`,
|
|
1881
|
+
"aria-haspopup": "dialog",
|
|
1882
|
+
"aria-expanded": o,
|
|
1883
|
+
"aria-controls": o ? m : void 0,
|
|
1884
|
+
title: "Color tokens",
|
|
1885
|
+
onClick: (x) => {
|
|
1886
|
+
x.stopPropagation(), o || k(), i((w) => !w);
|
|
1586
1887
|
},
|
|
1587
|
-
children: /* @__PURE__ */ a(
|
|
1888
|
+
children: /* @__PURE__ */ a(Ia, { className: "pa-edit-section-action-icon" })
|
|
1588
1889
|
}
|
|
1589
1890
|
),
|
|
1590
|
-
|
|
1891
|
+
D
|
|
1591
1892
|
] });
|
|
1592
1893
|
}
|
|
1593
|
-
function
|
|
1894
|
+
function Da({
|
|
1594
1895
|
options: e,
|
|
1595
1896
|
value: t,
|
|
1596
1897
|
ariaLabel: n,
|
|
@@ -1610,7 +1911,7 @@ function Ca({
|
|
|
1610
1911
|
o.value
|
|
1611
1912
|
)) });
|
|
1612
1913
|
}
|
|
1613
|
-
function
|
|
1914
|
+
function Oa({
|
|
1614
1915
|
options: e,
|
|
1615
1916
|
ariaLabel: t,
|
|
1616
1917
|
onToggle: n
|
|
@@ -1629,33 +1930,33 @@ function Ma({
|
|
|
1629
1930
|
r.id
|
|
1630
1931
|
)) });
|
|
1631
1932
|
}
|
|
1632
|
-
function
|
|
1933
|
+
function tn(e) {
|
|
1633
1934
|
const t = parseInt(e.trim(), 10);
|
|
1634
1935
|
return Number.isFinite(t) ? t >= 600 : e.trim() === "bold" || e.trim() === "bolder";
|
|
1635
1936
|
}
|
|
1636
|
-
function
|
|
1637
|
-
return
|
|
1937
|
+
function Fa(e) {
|
|
1938
|
+
return tn(e) ? "400" : "700";
|
|
1638
1939
|
}
|
|
1639
|
-
function
|
|
1940
|
+
function nn(e) {
|
|
1640
1941
|
return e.trim() === "italic" || e.trim() === "oblique";
|
|
1641
1942
|
}
|
|
1642
|
-
function
|
|
1643
|
-
return
|
|
1943
|
+
function Ba(e) {
|
|
1944
|
+
return nn(e) ? "normal" : "italic";
|
|
1644
1945
|
}
|
|
1645
|
-
function
|
|
1946
|
+
function zt(e, t) {
|
|
1646
1947
|
return e.split(/\s+/).includes(t);
|
|
1647
1948
|
}
|
|
1648
|
-
function
|
|
1949
|
+
function St(e, t) {
|
|
1649
1950
|
const n = new Set(
|
|
1650
1951
|
e.trim().split(/\s+/).filter((r) => r && r !== "none")
|
|
1651
1952
|
);
|
|
1652
1953
|
return n.has(t) ? n.delete(t) : n.add(t), n.size === 0 ? "none" : Array.from(n).join(" ");
|
|
1653
1954
|
}
|
|
1654
|
-
function
|
|
1955
|
+
function _a(e) {
|
|
1655
1956
|
const t = e.trim();
|
|
1656
1957
|
return t === "center" || t === "right" || t === "justify" ? t : "left";
|
|
1657
1958
|
}
|
|
1658
|
-
const
|
|
1959
|
+
const Lt = [
|
|
1659
1960
|
"none",
|
|
1660
1961
|
"solid",
|
|
1661
1962
|
"dashed",
|
|
@@ -1665,7 +1966,7 @@ const Mt = [
|
|
|
1665
1966
|
"ridge",
|
|
1666
1967
|
"inset",
|
|
1667
1968
|
"outset"
|
|
1668
|
-
],
|
|
1969
|
+
], Et = [
|
|
1669
1970
|
"block",
|
|
1670
1971
|
"inline",
|
|
1671
1972
|
"inline-block",
|
|
@@ -1675,8 +1976,8 @@ const Mt = [
|
|
|
1675
1976
|
"inline-grid",
|
|
1676
1977
|
"none",
|
|
1677
1978
|
"contents"
|
|
1678
|
-
],
|
|
1679
|
-
function
|
|
1979
|
+
], Ha = /* @__PURE__ */ new Set(["flex", "inline-flex", "grid", "inline-grid"]);
|
|
1980
|
+
function Wa({
|
|
1680
1981
|
selectedElement: e,
|
|
1681
1982
|
values: t,
|
|
1682
1983
|
onPropertyChange: n,
|
|
@@ -1687,33 +1988,33 @@ function $a({
|
|
|
1687
1988
|
targetScope: l,
|
|
1688
1989
|
onTargetScopeChange: p,
|
|
1689
1990
|
elementState: d,
|
|
1690
|
-
onElementStateChange:
|
|
1691
|
-
instanceCount:
|
|
1991
|
+
onElementStateChange: g,
|
|
1992
|
+
instanceCount: m,
|
|
1692
1993
|
scopeHint: c,
|
|
1693
|
-
stateHint:
|
|
1994
|
+
stateHint: f
|
|
1694
1995
|
}) {
|
|
1695
|
-
var
|
|
1696
|
-
const [
|
|
1697
|
-
const
|
|
1698
|
-
b.lineHeight && (
|
|
1699
|
-
},
|
|
1700
|
-
|
|
1701
|
-
const
|
|
1702
|
-
|
|
1703
|
-
const
|
|
1704
|
-
() =>
|
|
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(
|
|
2005
|
+
() => Un(
|
|
1705
2006
|
e,
|
|
1706
2007
|
xe(e).kind,
|
|
1707
2008
|
Ne(e)
|
|
1708
2009
|
),
|
|
1709
2010
|
[e]
|
|
1710
|
-
),
|
|
1711
|
-
return /* @__PURE__ */
|
|
1712
|
-
/* @__PURE__ */
|
|
1713
|
-
/* @__PURE__ */
|
|
1714
|
-
/* @__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: [
|
|
1715
2016
|
/* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: "Scope" }),
|
|
1716
|
-
/* @__PURE__ */
|
|
2017
|
+
/* @__PURE__ */ u(
|
|
1717
2018
|
"select",
|
|
1718
2019
|
{
|
|
1719
2020
|
className: "pa-select",
|
|
@@ -1721,23 +2022,23 @@ function $a({
|
|
|
1721
2022
|
onChange: (b) => p(b.target.value),
|
|
1722
2023
|
children: [
|
|
1723
2024
|
/* @__PURE__ */ a("option", { value: "this-instance", children: "This instance" }),
|
|
1724
|
-
/* @__PURE__ */
|
|
2025
|
+
/* @__PURE__ */ u("option", { value: "all-instances", disabled: m <= 1, children: [
|
|
1725
2026
|
"All (",
|
|
1726
|
-
|
|
2027
|
+
m,
|
|
1727
2028
|
")"
|
|
1728
2029
|
] })
|
|
1729
2030
|
]
|
|
1730
2031
|
}
|
|
1731
2032
|
)
|
|
1732
2033
|
] }),
|
|
1733
|
-
/* @__PURE__ */
|
|
2034
|
+
/* @__PURE__ */ u("label", { className: "pa-edit-mini-field", children: [
|
|
1734
2035
|
/* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: "State" }),
|
|
1735
|
-
/* @__PURE__ */
|
|
2036
|
+
/* @__PURE__ */ u(
|
|
1736
2037
|
"select",
|
|
1737
2038
|
{
|
|
1738
2039
|
className: "pa-select",
|
|
1739
2040
|
value: d,
|
|
1740
|
-
onChange: (b) =>
|
|
2041
|
+
onChange: (b) => g(b.target.value),
|
|
1741
2042
|
children: [
|
|
1742
2043
|
/* @__PURE__ */ a("option", { value: "normal", children: "Normal" }),
|
|
1743
2044
|
/* @__PURE__ */ a("option", { value: "hover", children: "Hover" }),
|
|
@@ -1750,9 +2051,9 @@ function $a({
|
|
|
1750
2051
|
] })
|
|
1751
2052
|
] }),
|
|
1752
2053
|
c ? /* @__PURE__ */ a("p", { className: "pa-edit-inline-hint", children: c }) : null,
|
|
1753
|
-
|
|
2054
|
+
f ? /* @__PURE__ */ a("p", { className: "pa-edit-inline-hint", children: f }) : null
|
|
1754
2055
|
] }),
|
|
1755
|
-
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: [
|
|
1756
2057
|
/* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: "Text" }),
|
|
1757
2058
|
/* @__PURE__ */ a(
|
|
1758
2059
|
"textarea",
|
|
@@ -1765,108 +2066,108 @@ function $a({
|
|
|
1765
2066
|
}
|
|
1766
2067
|
)
|
|
1767
2068
|
] }) }),
|
|
1768
|
-
/* @__PURE__ */
|
|
2069
|
+
/* @__PURE__ */ u(
|
|
1769
2070
|
we,
|
|
1770
2071
|
{
|
|
1771
2072
|
title: "Typography",
|
|
1772
|
-
defaultOpen:
|
|
2073
|
+
defaultOpen: q("typography"),
|
|
1773
2074
|
headerAction: /* @__PURE__ */ a(
|
|
1774
|
-
|
|
2075
|
+
Aa,
|
|
1775
2076
|
{
|
|
1776
|
-
presets:
|
|
2077
|
+
presets: h,
|
|
1777
2078
|
fontSize: t["font-size"] ?? "",
|
|
1778
2079
|
lineHeight: t["line-height"] ?? "",
|
|
1779
|
-
onApply:
|
|
2080
|
+
onApply: k
|
|
1780
2081
|
}
|
|
1781
2082
|
),
|
|
1782
2083
|
children: [
|
|
1783
2084
|
/* @__PURE__ */ a(
|
|
1784
|
-
|
|
2085
|
+
ea,
|
|
1785
2086
|
{
|
|
1786
2087
|
value: t["font-family"] ?? "",
|
|
1787
2088
|
onChange: (b) => n("font-family", b)
|
|
1788
2089
|
}
|
|
1789
2090
|
),
|
|
1790
|
-
/* @__PURE__ */
|
|
2091
|
+
/* @__PURE__ */ u("div", { className: "pa-edit-field-block", children: [
|
|
1791
2092
|
/* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: "Style" }),
|
|
1792
2093
|
/* @__PURE__ */ a(
|
|
1793
|
-
|
|
2094
|
+
Oa,
|
|
1794
2095
|
{
|
|
1795
2096
|
ariaLabel: "Text style",
|
|
1796
2097
|
options: [
|
|
1797
2098
|
{
|
|
1798
2099
|
id: "bold",
|
|
1799
2100
|
title: "Bold",
|
|
1800
|
-
pressed:
|
|
2101
|
+
pressed: tn(D),
|
|
1801
2102
|
content: /* @__PURE__ */ a("span", { className: "pa-segmented-type pa-segmented-type--bold", children: "B" })
|
|
1802
2103
|
},
|
|
1803
2104
|
{
|
|
1804
2105
|
id: "italic",
|
|
1805
2106
|
title: "Italic",
|
|
1806
|
-
pressed:
|
|
2107
|
+
pressed: nn(x),
|
|
1807
2108
|
content: /* @__PURE__ */ a("span", { className: "pa-segmented-type pa-segmented-type--italic", children: "I" })
|
|
1808
2109
|
},
|
|
1809
2110
|
{
|
|
1810
2111
|
id: "underline",
|
|
1811
2112
|
title: "Underline",
|
|
1812
|
-
pressed:
|
|
2113
|
+
pressed: zt(w, "underline"),
|
|
1813
2114
|
content: /* @__PURE__ */ a("span", { className: "pa-segmented-type pa-segmented-type--underline", children: "U" })
|
|
1814
2115
|
},
|
|
1815
2116
|
{
|
|
1816
2117
|
id: "strikethrough",
|
|
1817
2118
|
title: "Strikethrough",
|
|
1818
|
-
pressed:
|
|
1819
|
-
content: /* @__PURE__ */ a(
|
|
2119
|
+
pressed: zt(w, "line-through"),
|
|
2120
|
+
content: /* @__PURE__ */ a(da, { className: "pa-segmented-icon" })
|
|
1820
2121
|
}
|
|
1821
2122
|
],
|
|
1822
2123
|
onToggle: (b) => {
|
|
1823
|
-
b === "bold" ? n("font-weight",
|
|
2124
|
+
b === "bold" ? n("font-weight", Fa(D)) : b === "italic" ? n("font-style", Ba(x)) : b === "underline" ? n(
|
|
1824
2125
|
"text-decoration",
|
|
1825
|
-
|
|
2126
|
+
St(w, "underline")
|
|
1826
2127
|
) : b === "strikethrough" && n(
|
|
1827
2128
|
"text-decoration",
|
|
1828
|
-
|
|
2129
|
+
St(w, "line-through")
|
|
1829
2130
|
);
|
|
1830
2131
|
}
|
|
1831
2132
|
}
|
|
1832
2133
|
)
|
|
1833
2134
|
] }),
|
|
1834
|
-
/* @__PURE__ */
|
|
2135
|
+
/* @__PURE__ */ u("div", { className: "pa-edit-field-block", children: [
|
|
1835
2136
|
/* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: "Align" }),
|
|
1836
2137
|
/* @__PURE__ */ a(
|
|
1837
|
-
|
|
2138
|
+
Da,
|
|
1838
2139
|
{
|
|
1839
2140
|
ariaLabel: "Text align",
|
|
1840
|
-
value:
|
|
2141
|
+
value: A,
|
|
1841
2142
|
onChange: (b) => n("text-align", b),
|
|
1842
2143
|
options: [
|
|
1843
2144
|
{
|
|
1844
2145
|
value: "left",
|
|
1845
2146
|
title: "Align left",
|
|
1846
|
-
content: /* @__PURE__ */ a(
|
|
2147
|
+
content: /* @__PURE__ */ a(ia, { className: "pa-segmented-icon" })
|
|
1847
2148
|
},
|
|
1848
2149
|
{
|
|
1849
2150
|
value: "center",
|
|
1850
2151
|
title: "Align center",
|
|
1851
|
-
content: /* @__PURE__ */ a(
|
|
2152
|
+
content: /* @__PURE__ */ a(sa, { className: "pa-segmented-icon" })
|
|
1852
2153
|
},
|
|
1853
2154
|
{
|
|
1854
2155
|
value: "right",
|
|
1855
2156
|
title: "Align right",
|
|
1856
|
-
content: /* @__PURE__ */ a(
|
|
2157
|
+
content: /* @__PURE__ */ a(la, { className: "pa-segmented-icon" })
|
|
1857
2158
|
},
|
|
1858
2159
|
{
|
|
1859
2160
|
value: "justify",
|
|
1860
2161
|
title: "Justify",
|
|
1861
|
-
content: /* @__PURE__ */ a(
|
|
2162
|
+
content: /* @__PURE__ */ a(ca, { className: "pa-segmented-icon" })
|
|
1862
2163
|
}
|
|
1863
2164
|
]
|
|
1864
2165
|
}
|
|
1865
2166
|
)
|
|
1866
2167
|
] }),
|
|
1867
|
-
/* @__PURE__ */
|
|
2168
|
+
/* @__PURE__ */ u("div", { className: "pa-edit-field-grid pa-edit-field-grid--2 pa-edit-size-row", children: [
|
|
1868
2169
|
/* @__PURE__ */ a(
|
|
1869
|
-
|
|
2170
|
+
pe,
|
|
1870
2171
|
{
|
|
1871
2172
|
compact: !0,
|
|
1872
2173
|
property: "font-size",
|
|
@@ -1876,7 +2177,7 @@ function $a({
|
|
|
1876
2177
|
}
|
|
1877
2178
|
),
|
|
1878
2179
|
/* @__PURE__ */ a(
|
|
1879
|
-
|
|
2180
|
+
pe,
|
|
1880
2181
|
{
|
|
1881
2182
|
compact: !0,
|
|
1882
2183
|
property: "line-height",
|
|
@@ -1887,20 +2188,29 @@ function $a({
|
|
|
1887
2188
|
)
|
|
1888
2189
|
] }),
|
|
1889
2190
|
/* @__PURE__ */ a(
|
|
1890
|
-
|
|
2191
|
+
Ke,
|
|
1891
2192
|
{
|
|
1892
2193
|
label: "Color",
|
|
1893
2194
|
value: t.color ?? "",
|
|
1894
|
-
onChange: (b) => n("color", b)
|
|
2195
|
+
onChange: (b) => n("color", b),
|
|
2196
|
+
labelAction: /* @__PURE__ */ a(
|
|
2197
|
+
qe,
|
|
2198
|
+
{
|
|
2199
|
+
title: "Text color",
|
|
2200
|
+
presets: C,
|
|
2201
|
+
value: t.color ?? "",
|
|
2202
|
+
onApply: (b) => n("color", b)
|
|
2203
|
+
}
|
|
2204
|
+
)
|
|
1895
2205
|
}
|
|
1896
2206
|
)
|
|
1897
2207
|
]
|
|
1898
2208
|
}
|
|
1899
2209
|
),
|
|
1900
|
-
/* @__PURE__ */
|
|
1901
|
-
/* @__PURE__ */
|
|
2210
|
+
/* @__PURE__ */ u(we, { title: "Layout", defaultOpen: q("layout"), children: [
|
|
2211
|
+
/* @__PURE__ */ u("div", { className: "pa-edit-split-fields", children: [
|
|
1902
2212
|
/* @__PURE__ */ a(
|
|
1903
|
-
|
|
2213
|
+
pe,
|
|
1904
2214
|
{
|
|
1905
2215
|
compact: !0,
|
|
1906
2216
|
property: "width",
|
|
@@ -1910,7 +2220,7 @@ function $a({
|
|
|
1910
2220
|
}
|
|
1911
2221
|
),
|
|
1912
2222
|
/* @__PURE__ */ a(
|
|
1913
|
-
|
|
2223
|
+
pe,
|
|
1914
2224
|
{
|
|
1915
2225
|
compact: !0,
|
|
1916
2226
|
property: "height",
|
|
@@ -1921,7 +2231,7 @@ function $a({
|
|
|
1921
2231
|
)
|
|
1922
2232
|
] }),
|
|
1923
2233
|
/* @__PURE__ */ a(
|
|
1924
|
-
|
|
2234
|
+
wt,
|
|
1925
2235
|
{
|
|
1926
2236
|
property: "padding",
|
|
1927
2237
|
label: "Padding",
|
|
@@ -1930,7 +2240,7 @@ function $a({
|
|
|
1930
2240
|
}
|
|
1931
2241
|
),
|
|
1932
2242
|
/* @__PURE__ */ a(
|
|
1933
|
-
|
|
2243
|
+
wt,
|
|
1934
2244
|
{
|
|
1935
2245
|
property: "margin",
|
|
1936
2246
|
label: "Margin",
|
|
@@ -1938,40 +2248,49 @@ function $a({
|
|
|
1938
2248
|
onChange: (b) => n("margin", b)
|
|
1939
2249
|
}
|
|
1940
2250
|
),
|
|
1941
|
-
|
|
2251
|
+
N && /* @__PURE__ */ u("label", { className: "pa-prop-row pa-prop-row--compact", children: [
|
|
1942
2252
|
/* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: "Display" }),
|
|
1943
2253
|
/* @__PURE__ */ a(
|
|
1944
2254
|
"select",
|
|
1945
2255
|
{
|
|
1946
2256
|
className: "pa-select",
|
|
1947
|
-
value:
|
|
2257
|
+
value: v,
|
|
1948
2258
|
onChange: (b) => n("display", b.target.value),
|
|
1949
|
-
children:
|
|
2259
|
+
children: y.map((b) => /* @__PURE__ */ a("option", { value: b, children: b }, b))
|
|
1950
2260
|
}
|
|
1951
2261
|
)
|
|
1952
2262
|
] }),
|
|
1953
|
-
|
|
1954
|
-
|
|
2263
|
+
P && /* @__PURE__ */ a(
|
|
2264
|
+
pe,
|
|
1955
2265
|
{
|
|
1956
2266
|
compact: !0,
|
|
1957
2267
|
property: "gap",
|
|
1958
2268
|
label: "Gap",
|
|
1959
|
-
value:
|
|
2269
|
+
value: z,
|
|
1960
2270
|
onChange: (b) => n("gap", b)
|
|
1961
2271
|
}
|
|
1962
2272
|
)
|
|
1963
2273
|
] }),
|
|
1964
|
-
/* @__PURE__ */
|
|
2274
|
+
/* @__PURE__ */ u(we, { title: "Fill", defaultOpen: q("fill"), children: [
|
|
1965
2275
|
/* @__PURE__ */ a(
|
|
1966
|
-
|
|
2276
|
+
Ke,
|
|
1967
2277
|
{
|
|
1968
2278
|
label: "Background",
|
|
1969
2279
|
value: t["background-color"] ?? "",
|
|
1970
|
-
onChange: (b) => n("background-color", b)
|
|
2280
|
+
onChange: (b) => n("background-color", b),
|
|
2281
|
+
labelAction: /* @__PURE__ */ a(
|
|
2282
|
+
qe,
|
|
2283
|
+
{
|
|
2284
|
+
title: "Fill color",
|
|
2285
|
+
presets: C,
|
|
2286
|
+
value: t["background-color"] ?? "",
|
|
2287
|
+
onApply: (b) => n("background-color", b)
|
|
2288
|
+
}
|
|
2289
|
+
)
|
|
1971
2290
|
}
|
|
1972
2291
|
),
|
|
1973
2292
|
/* @__PURE__ */ a(
|
|
1974
|
-
|
|
2293
|
+
pe,
|
|
1975
2294
|
{
|
|
1976
2295
|
compact: !0,
|
|
1977
2296
|
property: "opacity",
|
|
@@ -1981,29 +2300,38 @@ function $a({
|
|
|
1981
2300
|
}
|
|
1982
2301
|
)
|
|
1983
2302
|
] }),
|
|
1984
|
-
/* @__PURE__ */
|
|
2303
|
+
/* @__PURE__ */ u(we, { title: "Border", defaultOpen: q("border"), children: [
|
|
1985
2304
|
/* @__PURE__ */ a(
|
|
1986
|
-
|
|
2305
|
+
Ke,
|
|
1987
2306
|
{
|
|
1988
2307
|
label: "Border color",
|
|
1989
2308
|
value: t["border-color"] ?? "",
|
|
1990
|
-
onChange: (b) => n("border-color", b)
|
|
2309
|
+
onChange: (b) => n("border-color", b),
|
|
2310
|
+
labelAction: /* @__PURE__ */ a(
|
|
2311
|
+
qe,
|
|
2312
|
+
{
|
|
2313
|
+
title: "Border color",
|
|
2314
|
+
presets: C,
|
|
2315
|
+
value: t["border-color"] ?? "",
|
|
2316
|
+
onApply: (b) => n("border-color", b)
|
|
2317
|
+
}
|
|
2318
|
+
)
|
|
1991
2319
|
}
|
|
1992
2320
|
),
|
|
1993
|
-
/* @__PURE__ */
|
|
2321
|
+
/* @__PURE__ */ u("label", { className: "pa-edit-stack-field", children: [
|
|
1994
2322
|
/* @__PURE__ */ a("span", { className: "pa-edit-field-label", children: "Style" }),
|
|
1995
2323
|
/* @__PURE__ */ a(
|
|
1996
2324
|
"select",
|
|
1997
2325
|
{
|
|
1998
2326
|
className: "pa-select",
|
|
1999
|
-
value:
|
|
2327
|
+
value: E,
|
|
2000
2328
|
onChange: (b) => n("border-style", b.target.value),
|
|
2001
|
-
children:
|
|
2329
|
+
children: F.map((b) => /* @__PURE__ */ a("option", { value: b, children: b }, b))
|
|
2002
2330
|
}
|
|
2003
2331
|
)
|
|
2004
2332
|
] }),
|
|
2005
2333
|
/* @__PURE__ */ a(
|
|
2006
|
-
|
|
2334
|
+
pe,
|
|
2007
2335
|
{
|
|
2008
2336
|
compact: !0,
|
|
2009
2337
|
property: "border-width",
|
|
@@ -2013,7 +2341,7 @@ function $a({
|
|
|
2013
2341
|
}
|
|
2014
2342
|
),
|
|
2015
2343
|
/* @__PURE__ */ a(
|
|
2016
|
-
|
|
2344
|
+
pe,
|
|
2017
2345
|
{
|
|
2018
2346
|
compact: !0,
|
|
2019
2347
|
property: "border-radius",
|
|
@@ -2023,9 +2351,9 @@ function $a({
|
|
|
2023
2351
|
}
|
|
2024
2352
|
)
|
|
2025
2353
|
] })
|
|
2026
|
-
] },
|
|
2354
|
+
] }, j);
|
|
2027
2355
|
}
|
|
2028
|
-
const
|
|
2356
|
+
const Va = 50, Je = [
|
|
2029
2357
|
"font-family",
|
|
2030
2358
|
"font-size",
|
|
2031
2359
|
"font-weight",
|
|
@@ -2047,181 +2375,181 @@ const Ea = 50, Ge = [
|
|
|
2047
2375
|
"border-radius",
|
|
2048
2376
|
"opacity"
|
|
2049
2377
|
];
|
|
2050
|
-
function
|
|
2378
|
+
function Ua(e, t, n) {
|
|
2051
2379
|
var ge;
|
|
2052
|
-
const r =
|
|
2380
|
+
const r = W([]), o = W(/* @__PURE__ */ new Set()), i = W([]), s = W([]), l = W([]), p = W(
|
|
2053
2381
|
null
|
|
2054
|
-
), [d,
|
|
2055
|
-
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;
|
|
2056
2384
|
return {
|
|
2057
|
-
inline:
|
|
2058
|
-
text: I !== "none" ?
|
|
2385
|
+
inline: Ye($, [...Je]),
|
|
2386
|
+
text: I !== "none" ? $.map((B) => je(B, I)) : []
|
|
2059
2387
|
};
|
|
2060
|
-
}, [
|
|
2061
|
-
l.current.push(
|
|
2062
|
-
}, [
|
|
2063
|
-
(
|
|
2064
|
-
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;
|
|
2065
2393
|
if (!e) return;
|
|
2066
2394
|
const I = Array.from(o.current);
|
|
2067
|
-
|
|
2068
|
-
for (const
|
|
2069
|
-
I.includes(
|
|
2070
|
-
const
|
|
2071
|
-
r.current =
|
|
2072
|
-
const O = new Set(i.current.map((
|
|
2073
|
-
if (
|
|
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 = [
|
|
2074
2402
|
...i.current,
|
|
2075
|
-
...
|
|
2076
|
-
],
|
|
2077
|
-
const
|
|
2403
|
+
...Ye(Y, [...Je])
|
|
2404
|
+
], f !== "none")) {
|
|
2405
|
+
const H = f;
|
|
2078
2406
|
s.current = [
|
|
2079
2407
|
...s.current,
|
|
2080
|
-
...
|
|
2408
|
+
...Y.map((V) => je(V, H))
|
|
2081
2409
|
];
|
|
2082
2410
|
}
|
|
2083
|
-
|
|
2084
|
-
const
|
|
2085
|
-
if (
|
|
2086
|
-
for (const
|
|
2087
|
-
if (
|
|
2088
|
-
for (const
|
|
2089
|
-
|
|
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);
|
|
2090
2418
|
else
|
|
2091
|
-
for (const
|
|
2092
|
-
|
|
2419
|
+
for (const V of B)
|
|
2420
|
+
V.style.setProperty(H.property, H.newValue);
|
|
2093
2421
|
},
|
|
2094
|
-
[e, t, n, w,
|
|
2422
|
+
[e, t, n, w, f]
|
|
2095
2423
|
);
|
|
2096
|
-
|
|
2424
|
+
_(() => {
|
|
2097
2425
|
if (!e) {
|
|
2098
|
-
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);
|
|
2099
2427
|
return;
|
|
2100
2428
|
}
|
|
2101
|
-
const
|
|
2102
|
-
r.current =
|
|
2429
|
+
const $ = Oe(e, t);
|
|
2430
|
+
r.current = $, o.current = new Set($), i.current = Ye($, [...Je]), l.current = [], N(!1);
|
|
2103
2431
|
const I = Ne(e);
|
|
2104
|
-
|
|
2105
|
-
const
|
|
2106
|
-
|
|
2107
|
-
const O =
|
|
2108
|
-
return s.current = O !== "none" ?
|
|
2109
|
-
}, [e]),
|
|
2110
|
-
e &&
|
|
2111
|
-
}, [t]),
|
|
2112
|
-
var
|
|
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;
|
|
2113
2441
|
if (!e) return;
|
|
2114
|
-
const
|
|
2115
|
-
r.current =
|
|
2116
|
-
i.current.filter((
|
|
2442
|
+
const $ = Oe(e, t);
|
|
2443
|
+
r.current = $, Se(
|
|
2444
|
+
i.current.filter((V) => $.includes(V.element))
|
|
2117
2445
|
);
|
|
2118
|
-
const I = Ne(e),
|
|
2119
|
-
for (const [
|
|
2120
|
-
for (const he of
|
|
2121
|
-
const O = ((
|
|
2122
|
-
for (const
|
|
2123
|
-
if (!(
|
|
2124
|
-
for (const
|
|
2125
|
-
|
|
2126
|
-
const
|
|
2127
|
-
if (
|
|
2128
|
-
const
|
|
2129
|
-
for (const
|
|
2130
|
-
|
|
2131
|
-
|
|
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);
|
|
2132
2460
|
}
|
|
2133
|
-
p.current = { element: e, state: n },
|
|
2461
|
+
p.current = { element: e, state: n }, $e(Array.from(o.current)), Xe($, n), o.current = new Set($);
|
|
2134
2462
|
}, [n, e, t]);
|
|
2135
|
-
const
|
|
2136
|
-
(
|
|
2137
|
-
e &&
|
|
2138
|
-
const
|
|
2139
|
-
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;
|
|
2140
2468
|
});
|
|
2141
2469
|
},
|
|
2142
2470
|
[e, n]
|
|
2143
|
-
),
|
|
2144
|
-
(
|
|
2471
|
+
), E = T(
|
|
2472
|
+
($) => {
|
|
2145
2473
|
if (!e) return;
|
|
2146
|
-
const I = {
|
|
2147
|
-
I["border-width"] !== void 0 && !("border-style" in I) && (d["border-style"] ?? "none") === "none" &&
|
|
2148
|
-
for (const [
|
|
2149
|
-
const
|
|
2150
|
-
for (const
|
|
2151
|
-
|
|
2152
|
-
|
|
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);
|
|
2153
2481
|
}
|
|
2154
2482
|
},
|
|
2155
|
-
[e,
|
|
2156
|
-
),
|
|
2157
|
-
(
|
|
2158
|
-
|
|
2483
|
+
[e, m, d, y, z]
|
|
2484
|
+
), F = T(
|
|
2485
|
+
($, I) => {
|
|
2486
|
+
E({ [$]: I });
|
|
2159
2487
|
},
|
|
2160
|
-
[
|
|
2161
|
-
),
|
|
2162
|
-
(
|
|
2163
|
-
if (!(!e ||
|
|
2164
|
-
|
|
2488
|
+
[E]
|
|
2489
|
+
), j = T(
|
|
2490
|
+
($) => {
|
|
2491
|
+
if (!(!e || f === "none")) {
|
|
2492
|
+
y(), k($);
|
|
2165
2493
|
for (const I of r.current)
|
|
2166
|
-
|
|
2167
|
-
|
|
2494
|
+
ut(I, f, $), o.current.add(I);
|
|
2495
|
+
z(f, D, $);
|
|
2168
2496
|
}
|
|
2169
2497
|
},
|
|
2170
|
-
[e,
|
|
2498
|
+
[e, f, D, y, z]
|
|
2171
2499
|
), K = T(() => {
|
|
2172
|
-
const
|
|
2173
|
-
if (
|
|
2174
|
-
|
|
2175
|
-
for (const I of
|
|
2176
|
-
if (
|
|
2177
|
-
|
|
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));
|
|
2178
2506
|
const I = xe(e);
|
|
2179
|
-
I.kind !== "none" &&
|
|
2507
|
+
I.kind !== "none" && k(I.value);
|
|
2180
2508
|
}
|
|
2181
2509
|
}
|
|
2182
|
-
}, [e]), ae = T(() => {
|
|
2183
|
-
Ae(i.current);
|
|
2184
|
-
for (const z of s.current) Se(z);
|
|
2185
|
-
if (l.current = [], S(!1), M(/* @__PURE__ */ new Map()), e) {
|
|
2186
|
-
h(Ne(e));
|
|
2187
|
-
const z = xe(e);
|
|
2188
|
-
N(z.value);
|
|
2189
|
-
}
|
|
2190
2510
|
}, [e]), q = T(() => {
|
|
2191
|
-
|
|
2192
|
-
for (const
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
z.kind !== "none" && N(z.value);
|
|
2511
|
+
Se(i.current);
|
|
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);
|
|
2198
2517
|
}
|
|
2199
|
-
}, [
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2518
|
+
}, [e]), J = T(() => {
|
|
2519
|
+
Se(i.current);
|
|
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);
|
|
2526
|
+
}
|
|
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());
|
|
2205
2533
|
}, []);
|
|
2206
2534
|
return {
|
|
2207
2535
|
values: d,
|
|
2208
|
-
textKind:
|
|
2209
|
-
textValue:
|
|
2210
|
-
pendingChanges:
|
|
2536
|
+
textKind: f,
|
|
2537
|
+
textValue: C,
|
|
2538
|
+
pendingChanges: b,
|
|
2211
2539
|
pendingByElement: w,
|
|
2212
|
-
totalPendingCount:
|
|
2213
|
-
clearAllPending:
|
|
2214
|
-
canUndo:
|
|
2215
|
-
updateProperty:
|
|
2216
|
-
updateProperties:
|
|
2217
|
-
updateText:
|
|
2540
|
+
totalPendingCount: Q,
|
|
2541
|
+
clearAllPending: ce,
|
|
2542
|
+
canUndo: v,
|
|
2543
|
+
updateProperty: F,
|
|
2544
|
+
updateProperties: E,
|
|
2545
|
+
updateText: j,
|
|
2218
2546
|
undo: K,
|
|
2219
|
-
reset:
|
|
2220
|
-
clearPreviews:
|
|
2221
|
-
revertPreviews:
|
|
2547
|
+
reset: q,
|
|
2548
|
+
clearPreviews: le,
|
|
2549
|
+
revertPreviews: J
|
|
2222
2550
|
};
|
|
2223
2551
|
}
|
|
2224
|
-
function
|
|
2552
|
+
function ja({
|
|
2225
2553
|
selectedElement: e,
|
|
2226
2554
|
hoveredElement: t,
|
|
2227
2555
|
onSelectElement: n,
|
|
@@ -2232,82 +2560,82 @@ function Ia({
|
|
|
2232
2560
|
onElementStateChange: l,
|
|
2233
2561
|
onApply: p,
|
|
2234
2562
|
applyStatus: d,
|
|
2235
|
-
isToolbarTarget:
|
|
2236
|
-
onPreviewApi:
|
|
2563
|
+
isToolbarTarget: g,
|
|
2564
|
+
onPreviewApi: m
|
|
2237
2565
|
}) {
|
|
2238
2566
|
const {
|
|
2239
2567
|
values: c,
|
|
2240
|
-
textKind:
|
|
2241
|
-
textValue:
|
|
2242
|
-
pendingChanges:
|
|
2243
|
-
pendingByElement:
|
|
2244
|
-
totalPendingCount:
|
|
2568
|
+
textKind: f,
|
|
2569
|
+
textValue: h,
|
|
2570
|
+
pendingChanges: C,
|
|
2571
|
+
pendingByElement: k,
|
|
2572
|
+
totalPendingCount: D,
|
|
2245
2573
|
clearAllPending: x,
|
|
2246
2574
|
canUndo: w,
|
|
2247
|
-
updateProperty:
|
|
2248
|
-
updateProperties:
|
|
2249
|
-
updateText:
|
|
2250
|
-
undo:
|
|
2251
|
-
reset:
|
|
2252
|
-
clearPreviews:
|
|
2253
|
-
revertPreviews:
|
|
2254
|
-
} =
|
|
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({
|
|
2255
2583
|
computeDefaultPosition: (O) => ({
|
|
2256
2584
|
x: window.innerWidth - O.width - 16,
|
|
2257
2585
|
y: 16
|
|
2258
2586
|
})
|
|
2259
2587
|
});
|
|
2260
|
-
|
|
2261
|
-
const
|
|
2588
|
+
_(() => (m == null || m({ clearPreviews: M, revertPreviews: z }), () => m == null ? void 0 : m(null)), [m, M, z]);
|
|
2589
|
+
const q = T(
|
|
2262
2590
|
(O) => {
|
|
2263
|
-
if (
|
|
2264
|
-
const
|
|
2265
|
-
(
|
|
2591
|
+
if (g(O.target)) return;
|
|
2592
|
+
const X = document.elementsFromPoint(O.clientX, O.clientY).find(
|
|
2593
|
+
(ee) => ee instanceof Element && !ee.closest(
|
|
2266
2594
|
"[data-pixelagent-root],[data-pixelagent-toolbar-portal],[data-pixelagent-picker-portal]"
|
|
2267
2595
|
)
|
|
2268
2596
|
);
|
|
2269
|
-
r(
|
|
2597
|
+
r(X ?? null);
|
|
2270
2598
|
},
|
|
2271
|
-
[
|
|
2272
|
-
),
|
|
2599
|
+
[g, r]
|
|
2600
|
+
), J = T(
|
|
2273
2601
|
(O) => {
|
|
2274
|
-
if (
|
|
2602
|
+
if (g(O.target)) return;
|
|
2275
2603
|
O.preventDefault(), O.stopPropagation();
|
|
2276
|
-
const
|
|
2277
|
-
(
|
|
2604
|
+
const X = document.elementsFromPoint(O.clientX, O.clientY).find(
|
|
2605
|
+
(ee) => ee instanceof Element && !ee.closest(
|
|
2278
2606
|
"[data-pixelagent-root],[data-pixelagent-toolbar-portal],[data-pixelagent-picker-portal]"
|
|
2279
2607
|
)
|
|
2280
2608
|
);
|
|
2281
|
-
n(
|
|
2609
|
+
n(X ?? null);
|
|
2282
2610
|
},
|
|
2283
|
-
[
|
|
2611
|
+
[g, n]
|
|
2284
2612
|
);
|
|
2285
|
-
|
|
2286
|
-
document.removeEventListener("mousemove",
|
|
2287
|
-
}), [
|
|
2288
|
-
const
|
|
2289
|
-
if (
|
|
2290
|
-
const O = await p(
|
|
2291
|
-
O.applied && (x(), O.skipRevert ||
|
|
2292
|
-
},
|
|
2293
|
-
return /* @__PURE__ */
|
|
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]);
|
|
2616
|
+
const le = async () => {
|
|
2617
|
+
if (D === 0) return;
|
|
2618
|
+
const O = await p(k);
|
|
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: [
|
|
2294
2622
|
/* @__PURE__ */ a(
|
|
2295
|
-
|
|
2623
|
+
jt,
|
|
2296
2624
|
{
|
|
2297
2625
|
element: o === "all-instances" ? null : t,
|
|
2298
2626
|
selected: e,
|
|
2299
|
-
multiSelected:
|
|
2627
|
+
multiSelected: B,
|
|
2300
2628
|
primarySelected: e
|
|
2301
2629
|
}
|
|
2302
2630
|
),
|
|
2303
2631
|
/* @__PURE__ */ a(
|
|
2304
2632
|
"div",
|
|
2305
2633
|
{
|
|
2306
|
-
ref:
|
|
2307
|
-
className: `pa-edit-panel-float ${
|
|
2308
|
-
style:
|
|
2309
|
-
children: /* @__PURE__ */ a(
|
|
2310
|
-
/* @__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: [
|
|
2311
2639
|
/* @__PURE__ */ a(
|
|
2312
2640
|
"button",
|
|
2313
2641
|
{
|
|
@@ -2316,7 +2644,7 @@ function Ia({
|
|
|
2316
2644
|
"aria-label": "Drag edit panel",
|
|
2317
2645
|
title: "Drag to move",
|
|
2318
2646
|
...K,
|
|
2319
|
-
children: /* @__PURE__ */
|
|
2647
|
+
children: /* @__PURE__ */ u("span", { className: "pa-edit-panel-grip", "aria-hidden": "true", children: [
|
|
2320
2648
|
/* @__PURE__ */ a("span", {}),
|
|
2321
2649
|
/* @__PURE__ */ a("span", {}),
|
|
2322
2650
|
/* @__PURE__ */ a("span", {}),
|
|
@@ -2328,79 +2656,79 @@ function Ia({
|
|
|
2328
2656
|
),
|
|
2329
2657
|
/* @__PURE__ */ a("h3", { className: "pa-edit-title", children: "Edit" })
|
|
2330
2658
|
] }),
|
|
2331
|
-
e ? /* @__PURE__ */
|
|
2332
|
-
/* @__PURE__ */
|
|
2659
|
+
e ? /* @__PURE__ */ u(Z, { children: [
|
|
2660
|
+
/* @__PURE__ */ u("div", { className: "pa-edit-meta", children: [
|
|
2333
2661
|
/* @__PURE__ */ a(
|
|
2334
2662
|
"code",
|
|
2335
2663
|
{
|
|
2336
2664
|
className: "pa-edit-meta-label",
|
|
2337
|
-
title: `This instance: ${
|
|
2665
|
+
title: `This instance: ${rt(e)}
|
|
2338
2666
|
All instances: ${ge}`,
|
|
2339
|
-
children:
|
|
2667
|
+
children: at(e)
|
|
2340
2668
|
}
|
|
2341
2669
|
),
|
|
2342
|
-
((
|
|
2343
|
-
(
|
|
2344
|
-
|
|
2345
|
-
|
|
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: [
|
|
2672
|
+
b.sourceFile,
|
|
2673
|
+
b.lineNumber ? `:${b.lineNumber}` : ""
|
|
2346
2674
|
] }),
|
|
2347
|
-
|
|
2348
|
-
|
|
2675
|
+
b != null && b.sourceFile && Q ? " · " : "",
|
|
2676
|
+
Q ?? ""
|
|
2349
2677
|
] })
|
|
2350
2678
|
] }),
|
|
2351
2679
|
/* @__PURE__ */ a("div", { className: "pa-edit-panel-scroll", children: /* @__PURE__ */ a(
|
|
2352
|
-
|
|
2680
|
+
Wa,
|
|
2353
2681
|
{
|
|
2354
2682
|
selectedElement: e,
|
|
2355
2683
|
values: c,
|
|
2356
|
-
onPropertyChange:
|
|
2357
|
-
onApplyPreset:
|
|
2358
|
-
textKind:
|
|
2359
|
-
textValue:
|
|
2360
|
-
onTextChange:
|
|
2684
|
+
onPropertyChange: A,
|
|
2685
|
+
onApplyPreset: v,
|
|
2686
|
+
textKind: f,
|
|
2687
|
+
textValue: h,
|
|
2688
|
+
onTextChange: N,
|
|
2361
2689
|
targetScope: o,
|
|
2362
2690
|
onTargetScopeChange: i,
|
|
2363
2691
|
elementState: s,
|
|
2364
2692
|
onElementStateChange: l,
|
|
2365
|
-
instanceCount:
|
|
2693
|
+
instanceCount: ce,
|
|
2366
2694
|
scopeHint: I,
|
|
2367
|
-
stateHint:
|
|
2695
|
+
stateHint: $
|
|
2368
2696
|
}
|
|
2369
2697
|
) }),
|
|
2370
|
-
/* @__PURE__ */
|
|
2371
|
-
/* @__PURE__ */
|
|
2372
|
-
/* @__PURE__ */ a(G, { variant: "regular", onClick:
|
|
2373
|
-
/* @__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" }),
|
|
2374
2702
|
/* @__PURE__ */ a("span", { children: "Undo" })
|
|
2375
2703
|
] }) }),
|
|
2376
2704
|
/* @__PURE__ */ a(
|
|
2377
2705
|
G,
|
|
2378
2706
|
{
|
|
2379
2707
|
variant: "regular",
|
|
2380
|
-
onClick:
|
|
2381
|
-
disabled:
|
|
2382
|
-
children: /* @__PURE__ */
|
|
2383
|
-
/* @__PURE__ */ a(
|
|
2708
|
+
onClick: y,
|
|
2709
|
+
disabled: C.length === 0,
|
|
2710
|
+
children: /* @__PURE__ */ u("span", { className: "pa-glass-btn-inner", children: [
|
|
2711
|
+
/* @__PURE__ */ a(Pn, { className: "pa-glass-btn-icon" }),
|
|
2384
2712
|
/* @__PURE__ */ a("span", { children: "Reset" })
|
|
2385
2713
|
] })
|
|
2386
2714
|
}
|
|
2387
2715
|
)
|
|
2388
2716
|
] }),
|
|
2389
|
-
/* @__PURE__ */
|
|
2717
|
+
/* @__PURE__ */ u("div", { className: "pa-edit-footer", children: [
|
|
2390
2718
|
/* @__PURE__ */ a(
|
|
2391
2719
|
"span",
|
|
2392
2720
|
{
|
|
2393
2721
|
className: d ? /fail/i.test(d) ? "pa-change-count pa-change-count--error" : "pa-change-count pa-change-count--success" : "pa-change-count",
|
|
2394
|
-
children: d ?? `${
|
|
2722
|
+
children: d ?? `${D} pending change${D !== 1 ? "s" : ""}`
|
|
2395
2723
|
}
|
|
2396
2724
|
),
|
|
2397
2725
|
/* @__PURE__ */ a(
|
|
2398
2726
|
G,
|
|
2399
2727
|
{
|
|
2400
2728
|
variant: "glass-primary",
|
|
2401
|
-
onClick:
|
|
2402
|
-
disabled:
|
|
2403
|
-
title:
|
|
2729
|
+
onClick: le,
|
|
2730
|
+
disabled: D === 0,
|
|
2731
|
+
title: b != null && b.sourceFile ? void 0 : "No source file — Apply copies selector + changes to clipboard",
|
|
2404
2732
|
children: "Apply"
|
|
2405
2733
|
}
|
|
2406
2734
|
)
|
|
@@ -2412,7 +2740,7 @@ All instances: ${ge}`,
|
|
|
2412
2740
|
)
|
|
2413
2741
|
] });
|
|
2414
2742
|
}
|
|
2415
|
-
async function
|
|
2743
|
+
async function Ya(e, t = {}) {
|
|
2416
2744
|
if (t.onApply)
|
|
2417
2745
|
try {
|
|
2418
2746
|
const r = await t.onApply(e);
|
|
@@ -2432,11 +2760,11 @@ async function Ta(e, t = {}) {
|
|
|
2432
2760
|
} catch (r) {
|
|
2433
2761
|
return { mode: "error", message: r instanceof Error ? r.message : String(r) };
|
|
2434
2762
|
}
|
|
2435
|
-
return await
|
|
2763
|
+
return await Ht(JSON.stringify(e, null, 2)), { mode: "clipboard" };
|
|
2436
2764
|
}
|
|
2437
|
-
function
|
|
2438
|
-
const [t, n] =
|
|
2439
|
-
return
|
|
2765
|
+
function Xa(e) {
|
|
2766
|
+
const [t, n] = S(null);
|
|
2767
|
+
return _(() => {
|
|
2440
2768
|
if (!e) {
|
|
2441
2769
|
n(null);
|
|
2442
2770
|
return;
|
|
@@ -2449,8 +2777,8 @@ function Ra(e) {
|
|
|
2449
2777
|
};
|
|
2450
2778
|
}, [e]), t;
|
|
2451
2779
|
}
|
|
2452
|
-
const
|
|
2453
|
-
function
|
|
2780
|
+
const ue = 8, re = 8, Ga = 12, Ka = 300, qa = 280;
|
|
2781
|
+
function Ze(e, t, n, r) {
|
|
2454
2782
|
return {
|
|
2455
2783
|
top: e,
|
|
2456
2784
|
left: t,
|
|
@@ -2460,10 +2788,10 @@ function Ke(e, t, n, r) {
|
|
|
2460
2788
|
height: r
|
|
2461
2789
|
};
|
|
2462
2790
|
}
|
|
2463
|
-
function
|
|
2791
|
+
function tt(e, t) {
|
|
2464
2792
|
return e.left < t.right && e.right > t.left && e.top < t.bottom && e.bottom > t.top;
|
|
2465
2793
|
}
|
|
2466
|
-
function
|
|
2794
|
+
function Ja(e, t) {
|
|
2467
2795
|
return {
|
|
2468
2796
|
top: e.top - t,
|
|
2469
2797
|
left: e.left - t,
|
|
@@ -2473,88 +2801,88 @@ function Ba(e, t) {
|
|
|
2473
2801
|
height: e.height + t * 2
|
|
2474
2802
|
};
|
|
2475
2803
|
}
|
|
2476
|
-
function
|
|
2804
|
+
function Za() {
|
|
2477
2805
|
if (typeof document > "u") return null;
|
|
2478
2806
|
const e = document.querySelector(
|
|
2479
2807
|
"[data-pixelagent-toolbar-portal] .pa-toolbar-float"
|
|
2480
2808
|
);
|
|
2481
|
-
return e ?
|
|
2809
|
+
return e ? Ja(e.getBoundingClientRect(), Ga) : null;
|
|
2482
2810
|
}
|
|
2483
|
-
function
|
|
2811
|
+
function Qe(e, t) {
|
|
2484
2812
|
return Math.min(
|
|
2485
|
-
Math.max(
|
|
2486
|
-
window.innerWidth - t -
|
|
2813
|
+
Math.max(ue, e),
|
|
2814
|
+
window.innerWidth - t - ue
|
|
2487
2815
|
);
|
|
2488
2816
|
}
|
|
2489
2817
|
function Ie(e, t) {
|
|
2490
2818
|
return Math.min(
|
|
2491
|
-
Math.max(
|
|
2492
|
-
window.innerHeight - t -
|
|
2819
|
+
Math.max(ue, e),
|
|
2820
|
+
window.innerHeight - t - ue
|
|
2493
2821
|
);
|
|
2494
2822
|
}
|
|
2495
|
-
function
|
|
2496
|
-
return e.top >=
|
|
2823
|
+
function Qa(e) {
|
|
2824
|
+
return e.top >= ue && e.left >= ue && e.right <= window.innerWidth - ue && e.bottom <= window.innerHeight - ue;
|
|
2497
2825
|
}
|
|
2498
|
-
function
|
|
2499
|
-
return t &&
|
|
2826
|
+
function er(e, t) {
|
|
2827
|
+
return t && tt(e, t) ? !1 : Qa(e);
|
|
2500
2828
|
}
|
|
2501
|
-
function
|
|
2502
|
-
const r =
|
|
2503
|
-
{ placement: "above", top: e.top - n -
|
|
2504
|
-
{ placement: "below", top: e.bottom +
|
|
2505
|
-
{ placement: "right", top: e.top, left: e.right +
|
|
2506
|
-
{ placement: "left", top: e.top, left: e.left - t -
|
|
2829
|
+
function tr(e, t = Ka, n = qa) {
|
|
2830
|
+
const r = Za(), i = e.top > window.innerHeight * 0.45 ? [
|
|
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 }
|
|
2507
2835
|
] : [
|
|
2508
|
-
{ placement: "below", top: e.bottom +
|
|
2509
|
-
{ placement: "above", top: e.top - n -
|
|
2510
|
-
{ placement: "right", top: e.top, left: e.right +
|
|
2511
|
-
{ 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 }
|
|
2512
2840
|
];
|
|
2513
2841
|
for (const { top: p, left: d } of i) {
|
|
2514
|
-
const
|
|
2842
|
+
const g = Ze(
|
|
2515
2843
|
Ie(p, n),
|
|
2516
|
-
|
|
2844
|
+
Qe(d, t),
|
|
2517
2845
|
t,
|
|
2518
2846
|
n
|
|
2519
2847
|
);
|
|
2520
|
-
if (
|
|
2521
|
-
return { top:
|
|
2848
|
+
if (er(g, r))
|
|
2849
|
+
return { top: g.top, left: g.left };
|
|
2522
2850
|
}
|
|
2523
|
-
let s = Ie(e.top - n -
|
|
2851
|
+
let s = Ie(e.top - n - re, n), l = Qe(e.left, t);
|
|
2524
2852
|
if (r) {
|
|
2525
|
-
let p =
|
|
2526
|
-
|
|
2527
|
-
Math.min(e.left, r.left - t -
|
|
2853
|
+
let p = Ze(s, l, t, n);
|
|
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),
|
|
2528
2856
|
t
|
|
2529
2857
|
));
|
|
2530
2858
|
}
|
|
2531
2859
|
return { top: s, left: l };
|
|
2532
2860
|
}
|
|
2533
|
-
function
|
|
2861
|
+
function nr({
|
|
2534
2862
|
elements: e,
|
|
2535
2863
|
areaBbox: t,
|
|
2536
2864
|
onSubmit: n,
|
|
2537
2865
|
onCancel: r
|
|
2538
2866
|
}) {
|
|
2539
|
-
const [o, i] =
|
|
2540
|
-
if (
|
|
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 (_(() => {
|
|
2541
2869
|
var x;
|
|
2542
2870
|
(x = s.current) == null || x.focus();
|
|
2543
|
-
}, [e]),
|
|
2871
|
+
}, [e]), _(() => {
|
|
2544
2872
|
const x = (w) => {
|
|
2545
2873
|
w.key === "Escape" && r();
|
|
2546
2874
|
};
|
|
2547
2875
|
return document.addEventListener("keydown", x), () => document.removeEventListener("keydown", x);
|
|
2548
|
-
}, [r]), !
|
|
2549
|
-
const
|
|
2876
|
+
}, [r]), !m) return null;
|
|
2877
|
+
const C = tr(m), k = e.length > 1 ? `${e.length} selected` : p ? at(p) : "Area selection", D = (x) => {
|
|
2550
2878
|
o.trim() && n(o, x);
|
|
2551
2879
|
};
|
|
2552
2880
|
return /* @__PURE__ */ a(
|
|
2553
|
-
|
|
2881
|
+
_e,
|
|
2554
2882
|
{
|
|
2555
2883
|
variant: "popover",
|
|
2556
|
-
style: { top:
|
|
2557
|
-
children: /* @__PURE__ */
|
|
2884
|
+
style: { top: C.top, left: C.left },
|
|
2885
|
+
children: /* @__PURE__ */ u(
|
|
2558
2886
|
"div",
|
|
2559
2887
|
{
|
|
2560
2888
|
ref: l,
|
|
@@ -2563,18 +2891,18 @@ function Ua({
|
|
|
2563
2891
|
"aria-label": "Add annotation",
|
|
2564
2892
|
className: "pa-popover-body",
|
|
2565
2893
|
children: [
|
|
2566
|
-
/* @__PURE__ */ a("div", { className: "pa-popover-header", children: /* @__PURE__ */ a("span", { className: "pa-popover-selector", children:
|
|
2567
|
-
(c ||
|
|
2568
|
-
c && /* @__PURE__ */
|
|
2894
|
+
/* @__PURE__ */ a("div", { className: "pa-popover-header", children: /* @__PURE__ */ a("span", { className: "pa-popover-selector", children: k }) }),
|
|
2895
|
+
(c || h) && /* @__PURE__ */ u("div", { className: "pa-popover-context", children: [
|
|
2896
|
+
c && /* @__PURE__ */ u("p", { className: "pa-popover-context-line", children: [
|
|
2569
2897
|
/* @__PURE__ */ a("span", { className: "pa-popover-context-label", children: "Selected" }),
|
|
2570
2898
|
c
|
|
2571
2899
|
] }),
|
|
2572
|
-
|
|
2900
|
+
h && h !== c && /* @__PURE__ */ u("p", { className: "pa-popover-context-line", children: [
|
|
2573
2901
|
/* @__PURE__ */ a("span", { className: "pa-popover-context-label", children: "Element" }),
|
|
2574
|
-
|
|
2902
|
+
h
|
|
2575
2903
|
] })
|
|
2576
2904
|
] }),
|
|
2577
|
-
/* @__PURE__ */
|
|
2905
|
+
/* @__PURE__ */ u("label", { className: "pa-label", children: [
|
|
2578
2906
|
"Note",
|
|
2579
2907
|
/* @__PURE__ */ a(
|
|
2580
2908
|
"textarea",
|
|
@@ -2586,19 +2914,19 @@ function Ua({
|
|
|
2586
2914
|
placeholder: "Describe the change...",
|
|
2587
2915
|
rows: 3,
|
|
2588
2916
|
onKeyDown: (x) => {
|
|
2589
|
-
x.key === "Enter" && (x.metaKey || x.ctrlKey) && (x.preventDefault(),
|
|
2917
|
+
x.key === "Enter" && (x.metaKey || x.ctrlKey) && (x.preventDefault(), D(x.shiftKey)), x.key === "Escape" && r();
|
|
2590
2918
|
}
|
|
2591
2919
|
}
|
|
2592
2920
|
)
|
|
2593
2921
|
] }),
|
|
2594
2922
|
/* @__PURE__ */ a("p", { className: "pa-popover-hint", children: "⌘↵ Add · ⇧⌘↵ Add & next · Esc Cancel" }),
|
|
2595
|
-
/* @__PURE__ */
|
|
2923
|
+
/* @__PURE__ */ u("div", { className: "pa-popover-actions", children: [
|
|
2596
2924
|
/* @__PURE__ */ a(G, { variant: "ghost", onClick: r, children: "Cancel" }),
|
|
2597
2925
|
/* @__PURE__ */ a(
|
|
2598
2926
|
G,
|
|
2599
2927
|
{
|
|
2600
2928
|
variant: "ghost",
|
|
2601
|
-
onClick: () =>
|
|
2929
|
+
onClick: () => D(!0),
|
|
2602
2930
|
disabled: !o.trim(),
|
|
2603
2931
|
children: "Add & next"
|
|
2604
2932
|
}
|
|
@@ -2607,7 +2935,7 @@ function Ua({
|
|
|
2607
2935
|
G,
|
|
2608
2936
|
{
|
|
2609
2937
|
variant: "glass-primary",
|
|
2610
|
-
onClick: () =>
|
|
2938
|
+
onClick: () => D(!1),
|
|
2611
2939
|
disabled: !o.trim(),
|
|
2612
2940
|
children: "Add"
|
|
2613
2941
|
}
|
|
@@ -2619,7 +2947,7 @@ function Ua({
|
|
|
2619
2947
|
}
|
|
2620
2948
|
);
|
|
2621
2949
|
}
|
|
2622
|
-
function
|
|
2950
|
+
function ar({ area: e, isDragging: t }) {
|
|
2623
2951
|
return !e || e.width < 2 || e.height < 2 ? null : /* @__PURE__ */ a(
|
|
2624
2952
|
"div",
|
|
2625
2953
|
{
|
|
@@ -2634,7 +2962,7 @@ function ja({ area: e, isDragging: t }) {
|
|
|
2634
2962
|
}
|
|
2635
2963
|
);
|
|
2636
2964
|
}
|
|
2637
|
-
function
|
|
2965
|
+
function rr(e) {
|
|
2638
2966
|
const { elements: t, note: n, areaBbox: r } = e, o = t[0];
|
|
2639
2967
|
if (!o && r)
|
|
2640
2968
|
return {
|
|
@@ -2653,11 +2981,11 @@ function Ya(e) {
|
|
|
2653
2981
|
};
|
|
2654
2982
|
if (!o)
|
|
2655
2983
|
throw new Error("buildAnnotationEntry requires at least one element or areaBbox");
|
|
2656
|
-
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));
|
|
2657
2985
|
return {
|
|
2658
2986
|
id: crypto.randomUUID(),
|
|
2659
|
-
selector:
|
|
2660
|
-
selectors:
|
|
2987
|
+
selector: g[0],
|
|
2988
|
+
selectors: g.length > 1 ? g : void 0,
|
|
2661
2989
|
note: n.trim(),
|
|
2662
2990
|
position: { x: Math.round(i.x), y: Math.round(i.y) },
|
|
2663
2991
|
bbox: {
|
|
@@ -2667,17 +2995,17 @@ function Ya(e) {
|
|
|
2667
2995
|
height: Math.round(i.height)
|
|
2668
2996
|
},
|
|
2669
2997
|
areaBbox: r,
|
|
2670
|
-
domPath:
|
|
2998
|
+
domPath: hn(o),
|
|
2671
2999
|
selectedText: l,
|
|
2672
3000
|
elementText: d,
|
|
2673
3001
|
sourceFile: s.sourceFile,
|
|
2674
3002
|
lineNumber: s.lineNumber,
|
|
2675
|
-
componentName:
|
|
3003
|
+
componentName: gn(o) ?? s.componentName,
|
|
2676
3004
|
createdAt: Date.now()
|
|
2677
3005
|
};
|
|
2678
3006
|
}
|
|
2679
|
-
function
|
|
2680
|
-
const t =
|
|
3007
|
+
function or(e) {
|
|
3008
|
+
const t = Vt(e);
|
|
2681
3009
|
if (t) return t.getBoundingClientRect();
|
|
2682
3010
|
if (e.bbox) {
|
|
2683
3011
|
const { x: n, y: r, width: o, height: i } = e.bbox;
|
|
@@ -2693,60 +3021,60 @@ function Xa(e) {
|
|
|
2693
3021
|
}
|
|
2694
3022
|
return null;
|
|
2695
3023
|
}
|
|
2696
|
-
function
|
|
3024
|
+
function ir(e) {
|
|
2697
3025
|
return `${Math.round(e.top)}:${Math.round(e.left)}:${Math.round(e.width)}:${Math.round(e.height)}`;
|
|
2698
3026
|
}
|
|
2699
|
-
const
|
|
2700
|
-
function
|
|
3027
|
+
const sr = 20, lr = 96;
|
|
3028
|
+
function cr({
|
|
2701
3029
|
annotations: e,
|
|
2702
3030
|
activeId: t,
|
|
2703
3031
|
onActiveChange: n
|
|
2704
3032
|
}) {
|
|
2705
|
-
const [r, o] =
|
|
2706
|
-
if (
|
|
3033
|
+
const [r, o] = S([]);
|
|
3034
|
+
if (_(() => {
|
|
2707
3035
|
if (e.length === 0) {
|
|
2708
3036
|
o([]);
|
|
2709
3037
|
return;
|
|
2710
3038
|
}
|
|
2711
3039
|
const l = () => {
|
|
2712
|
-
const
|
|
2713
|
-
e.forEach((c,
|
|
2714
|
-
const
|
|
2715
|
-
if (!
|
|
2716
|
-
const
|
|
2717
|
-
|
|
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({
|
|
2718
3046
|
id: c.id,
|
|
2719
|
-
index:
|
|
2720
|
-
top:
|
|
2721
|
-
left:
|
|
3047
|
+
index: f + 1,
|
|
3048
|
+
top: h.top + 6 - k * sr,
|
|
3049
|
+
left: h.right - 6,
|
|
2722
3050
|
note: c.note,
|
|
2723
|
-
target:
|
|
3051
|
+
target: Ut(c).target,
|
|
2724
3052
|
rect: {
|
|
2725
|
-
top:
|
|
2726
|
-
left:
|
|
2727
|
-
width:
|
|
2728
|
-
height:
|
|
3053
|
+
top: h.top,
|
|
3054
|
+
left: h.left,
|
|
3055
|
+
width: h.width,
|
|
3056
|
+
height: h.height
|
|
2729
3057
|
}
|
|
2730
3058
|
});
|
|
2731
|
-
}), o(
|
|
3059
|
+
}), o(g);
|
|
2732
3060
|
};
|
|
2733
3061
|
l();
|
|
2734
3062
|
const p = /* @__PURE__ */ new Set();
|
|
2735
|
-
for (const
|
|
2736
|
-
const
|
|
2737
|
-
|
|
3063
|
+
for (const g of e) {
|
|
3064
|
+
const m = Vt(g);
|
|
3065
|
+
m && p.add(m);
|
|
2738
3066
|
}
|
|
2739
|
-
const d = Array.from(p).map((
|
|
2740
|
-
const
|
|
2741
|
-
return
|
|
3067
|
+
const d = Array.from(p).map((g) => {
|
|
3068
|
+
const m = new ResizeObserver(l);
|
|
3069
|
+
return m.observe(g), m;
|
|
2742
3070
|
});
|
|
2743
3071
|
return window.addEventListener("scroll", l, !0), window.addEventListener("resize", l), () => {
|
|
2744
|
-
for (const
|
|
3072
|
+
for (const g of d) g.disconnect();
|
|
2745
3073
|
window.removeEventListener("scroll", l, !0), window.removeEventListener("resize", l);
|
|
2746
3074
|
};
|
|
2747
3075
|
}, [e]), r.length === 0) return null;
|
|
2748
|
-
const i = t ? r.find((l) => l.id === t) ?? null : null, s = i ? i.rect.top <
|
|
2749
|
-
return /* @__PURE__ */
|
|
3076
|
+
const i = t ? r.find((l) => l.id === t) ?? null : null, s = i ? i.rect.top < lr : !1;
|
|
3077
|
+
return /* @__PURE__ */ u(Z, { children: [
|
|
2750
3078
|
i && /* @__PURE__ */ a(
|
|
2751
3079
|
"div",
|
|
2752
3080
|
{
|
|
@@ -2774,7 +3102,7 @@ function Ja({
|
|
|
2774
3102
|
},
|
|
2775
3103
|
l.id
|
|
2776
3104
|
)),
|
|
2777
|
-
i && /* @__PURE__ */
|
|
3105
|
+
i && /* @__PURE__ */ u(
|
|
2778
3106
|
"div",
|
|
2779
3107
|
{
|
|
2780
3108
|
className: s ? "pa-annotation-preview pa-annotation-preview--below" : "pa-annotation-preview",
|
|
@@ -2791,24 +3119,24 @@ function Ja({
|
|
|
2791
3119
|
)
|
|
2792
3120
|
] });
|
|
2793
3121
|
}
|
|
2794
|
-
const
|
|
2795
|
-
function
|
|
2796
|
-
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;
|
|
2797
3125
|
}
|
|
2798
|
-
function
|
|
3126
|
+
function $t(e, t) {
|
|
2799
3127
|
return document.elementsFromPoint(e, t).find(
|
|
2800
|
-
(r) => r instanceof Element && !r.closest(
|
|
3128
|
+
(r) => r instanceof Element && !r.closest(ct)
|
|
2801
3129
|
) ?? null;
|
|
2802
3130
|
}
|
|
2803
|
-
function
|
|
3131
|
+
function an(e) {
|
|
2804
3132
|
return e ? e === "Copied all!" || e.startsWith("Copy failed") : !1;
|
|
2805
3133
|
}
|
|
2806
|
-
function
|
|
3134
|
+
function rn({
|
|
2807
3135
|
feedback: e,
|
|
2808
3136
|
slotClassName: t,
|
|
2809
3137
|
children: n
|
|
2810
3138
|
}) {
|
|
2811
|
-
return e &&
|
|
3139
|
+
return e && an(e) ? /* @__PURE__ */ a(
|
|
2812
3140
|
"span",
|
|
2813
3141
|
{
|
|
2814
3142
|
className: `pa-status pa-copy-feedback-slot ${t}`,
|
|
@@ -2816,10 +3144,10 @@ function tn({
|
|
|
2816
3144
|
"aria-live": "polite",
|
|
2817
3145
|
children: e
|
|
2818
3146
|
}
|
|
2819
|
-
) : /* @__PURE__ */ a(
|
|
3147
|
+
) : /* @__PURE__ */ a(Z, { children: n });
|
|
2820
3148
|
}
|
|
2821
|
-
function
|
|
2822
|
-
return /* @__PURE__ */
|
|
3149
|
+
function pr() {
|
|
3150
|
+
return /* @__PURE__ */ u(
|
|
2823
3151
|
"svg",
|
|
2824
3152
|
{
|
|
2825
3153
|
width: "16",
|
|
@@ -2834,8 +3162,8 @@ function Za() {
|
|
|
2834
3162
|
}
|
|
2835
3163
|
);
|
|
2836
3164
|
}
|
|
2837
|
-
function
|
|
2838
|
-
return /* @__PURE__ */
|
|
3165
|
+
function dr() {
|
|
3166
|
+
return /* @__PURE__ */ u("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
2839
3167
|
/* @__PURE__ */ a("circle", { cx: "8", cy: "8", r: "2.75", stroke: "currentColor", strokeWidth: "1.25" }),
|
|
2840
3168
|
/* @__PURE__ */ a(
|
|
2841
3169
|
"path",
|
|
@@ -2848,7 +3176,7 @@ function Qa() {
|
|
|
2848
3176
|
)
|
|
2849
3177
|
] });
|
|
2850
3178
|
}
|
|
2851
|
-
function
|
|
3179
|
+
function ur() {
|
|
2852
3180
|
return /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ a(
|
|
2853
3181
|
"path",
|
|
2854
3182
|
{
|
|
@@ -2859,8 +3187,8 @@ function er() {
|
|
|
2859
3187
|
}
|
|
2860
3188
|
) });
|
|
2861
3189
|
}
|
|
2862
|
-
function
|
|
2863
|
-
return /* @__PURE__ */
|
|
3190
|
+
function fr() {
|
|
3191
|
+
return /* @__PURE__ */ u("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
2864
3192
|
/* @__PURE__ */ a(
|
|
2865
3193
|
"path",
|
|
2866
3194
|
{
|
|
@@ -2893,7 +3221,7 @@ function tr() {
|
|
|
2893
3221
|
)
|
|
2894
3222
|
] });
|
|
2895
3223
|
}
|
|
2896
|
-
function
|
|
3224
|
+
function gr({
|
|
2897
3225
|
annotations: e,
|
|
2898
3226
|
onClose: t,
|
|
2899
3227
|
onCopyAll: n,
|
|
@@ -2904,34 +3232,34 @@ function nr({
|
|
|
2904
3232
|
onActiveChange: l,
|
|
2905
3233
|
copyStatus: p,
|
|
2906
3234
|
copiedEntryId: d,
|
|
2907
|
-
copyAllFrom:
|
|
3235
|
+
copyAllFrom: g
|
|
2908
3236
|
}) {
|
|
2909
|
-
const [
|
|
2910
|
-
computeDefaultPosition: (
|
|
2911
|
-
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,
|
|
2912
3240
|
y: 16
|
|
2913
3241
|
})
|
|
2914
3242
|
});
|
|
2915
|
-
|
|
2916
|
-
const
|
|
2917
|
-
|
|
3243
|
+
_(() => {
|
|
3244
|
+
const v = (N) => {
|
|
3245
|
+
N.key === "Escape" && t();
|
|
2918
3246
|
};
|
|
2919
|
-
return document.addEventListener("keydown",
|
|
3247
|
+
return document.addEventListener("keydown", v), () => document.removeEventListener("keydown", v);
|
|
2920
3248
|
}, [t]);
|
|
2921
|
-
const w = (
|
|
2922
|
-
c(
|
|
2923
|
-
},
|
|
2924
|
-
|
|
3249
|
+
const w = (v) => {
|
|
3250
|
+
c(v.id), h(v.note);
|
|
3251
|
+
}, A = (v) => {
|
|
3252
|
+
f.trim() && (i(v, { note: f.trim() }), c(null));
|
|
2925
3253
|
};
|
|
2926
3254
|
return /* @__PURE__ */ a(
|
|
2927
3255
|
"div",
|
|
2928
3256
|
{
|
|
2929
|
-
ref:
|
|
2930
|
-
className: `pa-session-panel-float ${
|
|
2931
|
-
style:
|
|
2932
|
-
children: /* @__PURE__ */
|
|
2933
|
-
/* @__PURE__ */
|
|
2934
|
-
/* @__PURE__ */
|
|
3257
|
+
ref: C,
|
|
3258
|
+
className: `pa-session-panel-float ${k ? "pa-session-panel-float--dragging" : ""}`,
|
|
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: [
|
|
2935
3263
|
/* @__PURE__ */ a(
|
|
2936
3264
|
"button",
|
|
2937
3265
|
{
|
|
@@ -2940,7 +3268,7 @@ function nr({
|
|
|
2940
3268
|
"aria-label": "Drag session panel",
|
|
2941
3269
|
title: "Drag to move",
|
|
2942
3270
|
...x,
|
|
2943
|
-
children: /* @__PURE__ */
|
|
3271
|
+
children: /* @__PURE__ */ u("span", { className: "pa-session-grip", "aria-hidden": "true", children: [
|
|
2944
3272
|
/* @__PURE__ */ a("span", {}),
|
|
2945
3273
|
/* @__PURE__ */ a("span", {}),
|
|
2946
3274
|
/* @__PURE__ */ a("span", {}),
|
|
@@ -2950,18 +3278,18 @@ function nr({
|
|
|
2950
3278
|
] })
|
|
2951
3279
|
}
|
|
2952
3280
|
),
|
|
2953
|
-
/* @__PURE__ */
|
|
3281
|
+
/* @__PURE__ */ u("h3", { className: "pa-session-title", children: [
|
|
2954
3282
|
"Session (",
|
|
2955
3283
|
e.length,
|
|
2956
3284
|
")"
|
|
2957
3285
|
] })
|
|
2958
3286
|
] }),
|
|
2959
3287
|
/* @__PURE__ */ a("p", { className: "pa-session-subtitle", children: "Persists until tab close" }),
|
|
2960
|
-
/* @__PURE__ */
|
|
3288
|
+
/* @__PURE__ */ u("div", { className: "pa-session-actions", children: [
|
|
2961
3289
|
/* @__PURE__ */ a(
|
|
2962
|
-
|
|
3290
|
+
rn,
|
|
2963
3291
|
{
|
|
2964
|
-
feedback:
|
|
3292
|
+
feedback: g === "session" ? p : null,
|
|
2965
3293
|
slotClassName: "pa-copy-feedback-slot--session",
|
|
2966
3294
|
children: /* @__PURE__ */ a(
|
|
2967
3295
|
G,
|
|
@@ -2978,49 +3306,49 @@ function nr({
|
|
|
2978
3306
|
/* @__PURE__ */ a(G, { variant: "ghost", onClick: t, "aria-label": "Close session panel", children: "✕" })
|
|
2979
3307
|
] })
|
|
2980
3308
|
] }),
|
|
2981
|
-
/* @__PURE__ */
|
|
3309
|
+
/* @__PURE__ */ u("ul", { className: "pa-session-list", children: [
|
|
2982
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." }),
|
|
2983
|
-
e.map((
|
|
2984
|
-
const
|
|
3311
|
+
e.map((v) => {
|
|
3312
|
+
const N = Ut(v);
|
|
2985
3313
|
return /* @__PURE__ */ a(
|
|
2986
3314
|
"li",
|
|
2987
3315
|
{
|
|
2988
|
-
className: s ===
|
|
2989
|
-
onMouseEnter: () => l(
|
|
3316
|
+
className: s === v.id ? "pa-session-item pa-session-item--active" : "pa-session-item",
|
|
3317
|
+
onMouseEnter: () => l(v.id),
|
|
2990
3318
|
onMouseLeave: () => l(null),
|
|
2991
|
-
children:
|
|
2992
|
-
/* @__PURE__ */
|
|
3319
|
+
children: m === v.id ? /* @__PURE__ */ u("div", { className: "pa-session-edit", children: [
|
|
3320
|
+
/* @__PURE__ */ u("label", { className: "pa-label", children: [
|
|
2993
3321
|
"Note",
|
|
2994
3322
|
/* @__PURE__ */ a(
|
|
2995
3323
|
"textarea",
|
|
2996
3324
|
{
|
|
2997
3325
|
className: "pa-textarea",
|
|
2998
|
-
value:
|
|
2999
|
-
onChange: (
|
|
3326
|
+
value: f,
|
|
3327
|
+
onChange: (P) => h(P.target.value),
|
|
3000
3328
|
rows: 3
|
|
3001
3329
|
}
|
|
3002
3330
|
)
|
|
3003
3331
|
] }),
|
|
3004
|
-
/* @__PURE__ */
|
|
3332
|
+
/* @__PURE__ */ u("div", { className: "pa-session-item-actions", children: [
|
|
3005
3333
|
/* @__PURE__ */ a(G, { variant: "ghost", onClick: () => c(null), children: "Cancel" }),
|
|
3006
3334
|
/* @__PURE__ */ a(
|
|
3007
3335
|
G,
|
|
3008
3336
|
{
|
|
3009
3337
|
variant: "glass-primary",
|
|
3010
|
-
onClick: () =>
|
|
3011
|
-
disabled: !
|
|
3338
|
+
onClick: () => A(v.id),
|
|
3339
|
+
disabled: !f.trim(),
|
|
3012
3340
|
children: "Save"
|
|
3013
3341
|
}
|
|
3014
3342
|
)
|
|
3015
3343
|
] })
|
|
3016
|
-
] }) : /* @__PURE__ */
|
|
3017
|
-
/* @__PURE__ */
|
|
3018
|
-
/* @__PURE__ */ a("span", { className: "pa-session-target", children:
|
|
3019
|
-
/* @__PURE__ */ a("p", { className: "pa-session-note", children:
|
|
3020
|
-
|
|
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 })
|
|
3021
3349
|
] }),
|
|
3022
|
-
/* @__PURE__ */
|
|
3023
|
-
p === "Copied!" && d ===
|
|
3350
|
+
/* @__PURE__ */ u("div", { className: "pa-session-item-actions", children: [
|
|
3351
|
+
p === "Copied!" && d === v.id ? /* @__PURE__ */ a(
|
|
3024
3352
|
"span",
|
|
3025
3353
|
{
|
|
3026
3354
|
className: "pa-status pa-copy-feedback-slot pa-copy-feedback-slot--item",
|
|
@@ -3033,7 +3361,7 @@ function nr({
|
|
|
3033
3361
|
{
|
|
3034
3362
|
variant: "glass-primary",
|
|
3035
3363
|
className: "pa-glass-btn--sm",
|
|
3036
|
-
onClick: () => r(
|
|
3364
|
+
onClick: () => r(v.id),
|
|
3037
3365
|
"aria-label": "Copy annotation",
|
|
3038
3366
|
children: "Copy"
|
|
3039
3367
|
}
|
|
@@ -3043,7 +3371,7 @@ function nr({
|
|
|
3043
3371
|
{
|
|
3044
3372
|
variant: "ghost",
|
|
3045
3373
|
className: "pa-glass-btn--sm pa-session-action-icon",
|
|
3046
|
-
onClick: () => w(
|
|
3374
|
+
onClick: () => w(v),
|
|
3047
3375
|
"aria-label": "Edit annotation note",
|
|
3048
3376
|
children: "✎"
|
|
3049
3377
|
}
|
|
@@ -3053,15 +3381,15 @@ function nr({
|
|
|
3053
3381
|
{
|
|
3054
3382
|
variant: "ghost",
|
|
3055
3383
|
className: "pa-glass-btn--sm pa-session-action-icon",
|
|
3056
|
-
onClick: () => o(
|
|
3384
|
+
onClick: () => o(v.id),
|
|
3057
3385
|
"aria-label": "Remove annotation",
|
|
3058
|
-
children: /* @__PURE__ */ a(
|
|
3386
|
+
children: /* @__PURE__ */ a(fr, {})
|
|
3059
3387
|
}
|
|
3060
3388
|
)
|
|
3061
3389
|
] })
|
|
3062
3390
|
] })
|
|
3063
3391
|
},
|
|
3064
|
-
|
|
3392
|
+
v.id
|
|
3065
3393
|
);
|
|
3066
3394
|
})
|
|
3067
3395
|
] })
|
|
@@ -3069,34 +3397,34 @@ function nr({
|
|
|
3069
3397
|
}
|
|
3070
3398
|
);
|
|
3071
3399
|
}
|
|
3072
|
-
function
|
|
3400
|
+
function hr({
|
|
3073
3401
|
open: e,
|
|
3074
3402
|
onClose: t,
|
|
3075
3403
|
hostTheme: n,
|
|
3076
3404
|
chrome: r,
|
|
3077
3405
|
onToggleHostTheme: o
|
|
3078
3406
|
}) {
|
|
3079
|
-
const i =
|
|
3080
|
-
return
|
|
3407
|
+
const i = W(null);
|
|
3408
|
+
return _(() => {
|
|
3081
3409
|
if (!e) return;
|
|
3082
3410
|
const s = (p) => {
|
|
3083
3411
|
p.key === "Escape" && t();
|
|
3084
3412
|
}, l = (p) => {
|
|
3085
|
-
var
|
|
3413
|
+
var g, m;
|
|
3086
3414
|
const d = p.target;
|
|
3087
|
-
(
|
|
3415
|
+
(g = i.current) != null && g.contains(d) || (m = d.closest) != null && m.call(d, "[data-pa-settings-trigger]") || t();
|
|
3088
3416
|
};
|
|
3089
3417
|
return window.addEventListener("keydown", s), window.addEventListener("mousedown", l), () => {
|
|
3090
3418
|
window.removeEventListener("keydown", s), window.removeEventListener("mousedown", l);
|
|
3091
3419
|
};
|
|
3092
|
-
}, [e, t]), e ? /* @__PURE__ */ a("div", { ref: i, className: "pa-settings-menu", role: "dialog", "aria-label": "PixelAgent settings", children: /* @__PURE__ */ a(
|
|
3093
|
-
/* @__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: [
|
|
3094
3422
|
/* @__PURE__ */ a("h4", { className: "pa-settings-menu-title", children: "Settings" }),
|
|
3095
3423
|
/* @__PURE__ */ a("p", { className: "pa-settings-menu-subtitle", children: "Appearance and chrome" })
|
|
3096
3424
|
] }),
|
|
3097
|
-
/* @__PURE__ */
|
|
3425
|
+
/* @__PURE__ */ u("section", { className: "pa-settings-section", children: [
|
|
3098
3426
|
/* @__PURE__ */ a("span", { className: "pa-settings-section-label", children: "Host theme" }),
|
|
3099
|
-
/* @__PURE__ */
|
|
3427
|
+
/* @__PURE__ */ u("div", { className: "pa-settings-row", children: [
|
|
3100
3428
|
/* @__PURE__ */ a("span", { className: "pa-settings-row-value", children: n === "dark" ? "Dark canvas" : "Light canvas" }),
|
|
3101
3429
|
/* @__PURE__ */ a(
|
|
3102
3430
|
G,
|
|
@@ -3105,14 +3433,14 @@ function ar({
|
|
|
3105
3433
|
onClick: o,
|
|
3106
3434
|
"aria-label": n === "dark" ? "Switch host to light theme" : "Switch host to dark theme",
|
|
3107
3435
|
title: n === "dark" ? "Light theme" : "Dark theme",
|
|
3108
|
-
children: n === "dark" ? /* @__PURE__ */ a(
|
|
3436
|
+
children: n === "dark" ? /* @__PURE__ */ a(dr, {}) : /* @__PURE__ */ a(ur, {})
|
|
3109
3437
|
}
|
|
3110
3438
|
)
|
|
3111
3439
|
] })
|
|
3112
3440
|
] }),
|
|
3113
|
-
/* @__PURE__ */
|
|
3441
|
+
/* @__PURE__ */ u("section", { className: "pa-settings-section", children: [
|
|
3114
3442
|
/* @__PURE__ */ a("span", { className: "pa-settings-section-label", children: "Glass chrome" }),
|
|
3115
|
-
/* @__PURE__ */
|
|
3443
|
+
/* @__PURE__ */ u("p", { className: "pa-settings-hint", children: [
|
|
3116
3444
|
r === "dim" ? "Dim gray glass for readability on bright pages." : "Frosted glass for dark pages.",
|
|
3117
3445
|
" ",
|
|
3118
3446
|
"(auto)"
|
|
@@ -3120,29 +3448,29 @@ function ar({
|
|
|
3120
3448
|
] })
|
|
3121
3449
|
] }) }) }) : null;
|
|
3122
3450
|
}
|
|
3123
|
-
const
|
|
3124
|
-
function
|
|
3125
|
-
return /* @__PURE__ */
|
|
3451
|
+
const Pt = "0 0 24 24";
|
|
3452
|
+
function mr() {
|
|
3453
|
+
return /* @__PURE__ */ u(Z, { children: [
|
|
3126
3454
|
/* @__PURE__ */ a("rect", { x: "3", y: "14", width: "4", height: "4", fill: "currentColor" }),
|
|
3127
3455
|
/* @__PURE__ */ a("path", { fill: "currentColor", d: "M7 5h12v12L7 5z" })
|
|
3128
3456
|
] });
|
|
3129
3457
|
}
|
|
3130
|
-
const
|
|
3131
|
-
function
|
|
3458
|
+
const xr = "M4.5 2.5L4.5 17.25L9.1 12.9L11.35 19.15L13.55 17.95L11.05 11.85L16.85 11.85L4.5 2.5Z";
|
|
3459
|
+
function br({ size: e = 22, variant: t = "cursor" }) {
|
|
3132
3460
|
return t === "pointer" ? /* @__PURE__ */ a(
|
|
3133
3461
|
"svg",
|
|
3134
3462
|
{
|
|
3135
3463
|
className: "pa-brand-cursor pa-brand-cursor--pointer",
|
|
3136
3464
|
width: e,
|
|
3137
3465
|
height: e,
|
|
3138
|
-
viewBox:
|
|
3466
|
+
viewBox: Pt,
|
|
3139
3467
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3140
3468
|
"aria-hidden": "true",
|
|
3141
3469
|
children: /* @__PURE__ */ a(
|
|
3142
3470
|
"path",
|
|
3143
3471
|
{
|
|
3144
3472
|
fill: "currentColor",
|
|
3145
|
-
d:
|
|
3473
|
+
d: xr
|
|
3146
3474
|
}
|
|
3147
3475
|
)
|
|
3148
3476
|
}
|
|
@@ -3152,19 +3480,19 @@ function ir({ size: e = 22, variant: t = "cursor" }) {
|
|
|
3152
3480
|
className: "pa-brand-cursor pa-brand-cursor--minimal",
|
|
3153
3481
|
width: e,
|
|
3154
3482
|
height: e,
|
|
3155
|
-
viewBox:
|
|
3483
|
+
viewBox: Pt,
|
|
3156
3484
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3157
3485
|
"aria-hidden": "true",
|
|
3158
|
-
children: /* @__PURE__ */ a(
|
|
3486
|
+
children: /* @__PURE__ */ a(mr, {})
|
|
3159
3487
|
}
|
|
3160
3488
|
);
|
|
3161
3489
|
}
|
|
3162
|
-
const
|
|
3490
|
+
const vr = ["element", "area", "multi"], wr = {
|
|
3163
3491
|
element: "Click",
|
|
3164
3492
|
area: "Area",
|
|
3165
3493
|
multi: "Multi"
|
|
3166
3494
|
};
|
|
3167
|
-
function
|
|
3495
|
+
function yr({
|
|
3168
3496
|
rootAttributes: e,
|
|
3169
3497
|
hostTheme: t,
|
|
3170
3498
|
chrome: n,
|
|
@@ -3175,28 +3503,28 @@ function cr({
|
|
|
3175
3503
|
active: l,
|
|
3176
3504
|
mode: p,
|
|
3177
3505
|
captureMode: d,
|
|
3178
|
-
annotationCount:
|
|
3179
|
-
multiSelectCount:
|
|
3506
|
+
annotationCount: g,
|
|
3507
|
+
multiSelectCount: m,
|
|
3180
3508
|
copyStatus: c,
|
|
3181
|
-
copyAllFrom:
|
|
3182
|
-
onActivateAnnotate:
|
|
3183
|
-
onActivateEdit:
|
|
3184
|
-
onDeactivate:
|
|
3185
|
-
onCopyAll:
|
|
3509
|
+
copyAllFrom: f,
|
|
3510
|
+
onActivateAnnotate: h,
|
|
3511
|
+
onActivateEdit: C,
|
|
3512
|
+
onDeactivate: k,
|
|
3513
|
+
onCopyAll: D,
|
|
3186
3514
|
onCaptureModeChange: x,
|
|
3187
3515
|
onConfirmMultiSelect: w
|
|
3188
3516
|
}) {
|
|
3189
|
-
const { elementRef:
|
|
3517
|
+
const { elementRef: A, isDragging: v, style: N, dragHandleProps: P } = it(), y = /* @__PURE__ */ u(
|
|
3190
3518
|
"div",
|
|
3191
3519
|
{
|
|
3192
|
-
ref:
|
|
3193
|
-
className: `pa-toolbar-float ${
|
|
3194
|
-
style:
|
|
3520
|
+
ref: A,
|
|
3521
|
+
className: `pa-toolbar-float ${v ? "pa-toolbar-float--dragging" : ""}`,
|
|
3522
|
+
style: N,
|
|
3195
3523
|
role: "toolbar",
|
|
3196
3524
|
"aria-label": "PixelAgent",
|
|
3197
3525
|
children: [
|
|
3198
3526
|
!l && /* @__PURE__ */ a(
|
|
3199
|
-
|
|
3527
|
+
hr,
|
|
3200
3528
|
{
|
|
3201
3529
|
open: r,
|
|
3202
3530
|
onClose: i,
|
|
@@ -3205,7 +3533,7 @@ function cr({
|
|
|
3205
3533
|
onToggleHostTheme: s
|
|
3206
3534
|
}
|
|
3207
3535
|
),
|
|
3208
|
-
/* @__PURE__ */ a(
|
|
3536
|
+
/* @__PURE__ */ a(Gt, { shape: "capsule", className: "pa-toolbar-glass", intensity: "enhanced", children: /* @__PURE__ */ u("div", { className: "pa-toolbar-inner", children: [
|
|
3209
3537
|
/* @__PURE__ */ a(
|
|
3210
3538
|
"button",
|
|
3211
3539
|
{
|
|
@@ -3213,47 +3541,47 @@ function cr({
|
|
|
3213
3541
|
className: "pa-toolbar-drag",
|
|
3214
3542
|
"aria-label": "Drag PixelAgent toolbar",
|
|
3215
3543
|
title: "Drag to move",
|
|
3216
|
-
...
|
|
3217
|
-
children: /* @__PURE__ */ a(
|
|
3544
|
+
...P,
|
|
3545
|
+
children: /* @__PURE__ */ a(br, { size: 22 })
|
|
3218
3546
|
}
|
|
3219
3547
|
),
|
|
3220
3548
|
/* @__PURE__ */ a("span", { className: "pa-toolbar-divider", "aria-hidden": "true" }),
|
|
3221
|
-
l ? /* @__PURE__ */
|
|
3222
|
-
/* @__PURE__ */
|
|
3549
|
+
l ? /* @__PURE__ */ u(Z, { children: [
|
|
3550
|
+
/* @__PURE__ */ u("div", { className: "pa-toolbar-segment", children: [
|
|
3223
3551
|
/* @__PURE__ */ a("span", { className: "pa-mode-badge", children: p }),
|
|
3224
|
-
p === "annotate" && /* @__PURE__ */
|
|
3552
|
+
p === "annotate" && /* @__PURE__ */ u(Z, { children: [
|
|
3225
3553
|
/* @__PURE__ */ a(
|
|
3226
3554
|
"select",
|
|
3227
3555
|
{
|
|
3228
3556
|
className: "pa-select pa-toolbar-capture-select",
|
|
3229
3557
|
value: d,
|
|
3230
|
-
onChange: (
|
|
3558
|
+
onChange: (M) => x(M.target.value),
|
|
3231
3559
|
"aria-label": "Capture mode",
|
|
3232
|
-
children:
|
|
3560
|
+
children: vr.map((M) => /* @__PURE__ */ a("option", { value: M, children: wr[M] }, M))
|
|
3233
3561
|
}
|
|
3234
3562
|
),
|
|
3235
|
-
|
|
3563
|
+
m > 0 && /* @__PURE__ */ a(
|
|
3236
3564
|
G,
|
|
3237
3565
|
{
|
|
3238
3566
|
variant: "glass-primary",
|
|
3239
3567
|
onClick: w,
|
|
3240
3568
|
"aria-label": "Annotate selected elements",
|
|
3241
|
-
children:
|
|
3569
|
+
children: m
|
|
3242
3570
|
}
|
|
3243
3571
|
),
|
|
3244
3572
|
/* @__PURE__ */ a(
|
|
3245
|
-
|
|
3573
|
+
rn,
|
|
3246
3574
|
{
|
|
3247
|
-
feedback:
|
|
3575
|
+
feedback: f === "toolbar" ? c : null,
|
|
3248
3576
|
slotClassName: "pa-copy-feedback-slot--toolbar",
|
|
3249
3577
|
children: /* @__PURE__ */ a(
|
|
3250
3578
|
G,
|
|
3251
3579
|
{
|
|
3252
3580
|
variant: "glass-primary",
|
|
3253
|
-
onClick:
|
|
3254
|
-
disabled:
|
|
3255
|
-
"aria-label":
|
|
3256
|
-
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"
|
|
3257
3585
|
}
|
|
3258
3586
|
)
|
|
3259
3587
|
}
|
|
@@ -3265,7 +3593,7 @@ function cr({
|
|
|
3265
3593
|
{
|
|
3266
3594
|
variant: "icon",
|
|
3267
3595
|
className: "pa-toolbar-close",
|
|
3268
|
-
onClick:
|
|
3596
|
+
onClick: k,
|
|
3269
3597
|
"aria-label": "Close",
|
|
3270
3598
|
children: /* @__PURE__ */ a(
|
|
3271
3599
|
"svg",
|
|
@@ -3288,11 +3616,11 @@ function cr({
|
|
|
3288
3616
|
)
|
|
3289
3617
|
}
|
|
3290
3618
|
)
|
|
3291
|
-
] }) : /* @__PURE__ */
|
|
3292
|
-
/* @__PURE__ */ a(G, { onClick:
|
|
3293
|
-
/* @__PURE__ */ a(G, { onClick:
|
|
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" })
|
|
3294
3622
|
] }),
|
|
3295
|
-
!l && /* @__PURE__ */
|
|
3623
|
+
!l && /* @__PURE__ */ u(Z, { children: [
|
|
3296
3624
|
/* @__PURE__ */ a("span", { className: "pa-toolbar-divider", "aria-hidden": "true" }),
|
|
3297
3625
|
/* @__PURE__ */ a(
|
|
3298
3626
|
G,
|
|
@@ -3304,37 +3632,37 @@ function cr({
|
|
|
3304
3632
|
"aria-label": "PixelAgent settings",
|
|
3305
3633
|
"aria-expanded": r,
|
|
3306
3634
|
title: "Settings",
|
|
3307
|
-
children: /* @__PURE__ */ a(
|
|
3635
|
+
children: /* @__PURE__ */ a(pr, {})
|
|
3308
3636
|
}
|
|
3309
3637
|
)
|
|
3310
3638
|
] }),
|
|
3311
|
-
c && !
|
|
3639
|
+
c && !an(c) && c !== "Copied!" && /* @__PURE__ */ a("span", { className: "pa-status pa-toolbar-status", role: "status", children: c })
|
|
3312
3640
|
] }) })
|
|
3313
3641
|
]
|
|
3314
3642
|
}
|
|
3315
3643
|
);
|
|
3316
|
-
return typeof document > "u" ?
|
|
3644
|
+
return typeof document > "u" ? y : Le(
|
|
3317
3645
|
/* @__PURE__ */ a(
|
|
3318
3646
|
"div",
|
|
3319
3647
|
{
|
|
3320
3648
|
className: "pa-root pa-root--toolbar-portal",
|
|
3321
3649
|
"data-pixelagent-toolbar-portal": !0,
|
|
3322
3650
|
...e,
|
|
3323
|
-
children:
|
|
3651
|
+
children: y
|
|
3324
3652
|
}
|
|
3325
3653
|
),
|
|
3326
3654
|
document.body
|
|
3327
3655
|
);
|
|
3328
3656
|
}
|
|
3329
|
-
function
|
|
3330
|
-
const e =
|
|
3657
|
+
function kr() {
|
|
3658
|
+
const e = W(mn()), [t, n] = S(
|
|
3331
3659
|
() => {
|
|
3332
3660
|
var i;
|
|
3333
3661
|
return ((i = e.current) == null ? void 0 : i.annotations) ?? [];
|
|
3334
3662
|
}
|
|
3335
3663
|
);
|
|
3336
|
-
|
|
3337
|
-
|
|
3664
|
+
_(() => {
|
|
3665
|
+
xn({ annotations: t });
|
|
3338
3666
|
}, [t]);
|
|
3339
3667
|
const r = T((i, s) => {
|
|
3340
3668
|
n(
|
|
@@ -3350,91 +3678,91 @@ function pr() {
|
|
|
3350
3678
|
removeAnnotation: o
|
|
3351
3679
|
};
|
|
3352
3680
|
}
|
|
3353
|
-
function
|
|
3681
|
+
function Nr({
|
|
3354
3682
|
ui: e,
|
|
3355
3683
|
hostTheme: t,
|
|
3356
3684
|
onHostThemeChange: n
|
|
3357
3685
|
}) {
|
|
3358
|
-
const r =
|
|
3359
|
-
() => ({ ...
|
|
3686
|
+
const r = se(
|
|
3687
|
+
() => ({ ...bn, ...e }),
|
|
3360
3688
|
[e]
|
|
3361
|
-
), [o, i] =
|
|
3362
|
-
() => t ??
|
|
3363
|
-
), [s, l] =
|
|
3364
|
-
|
|
3689
|
+
), [o, i] = S(
|
|
3690
|
+
() => t ?? ft(r) ?? "dark"
|
|
3691
|
+
), [s, l] = S(!1), p = t ?? o;
|
|
3692
|
+
_(() => {
|
|
3365
3693
|
if (t !== void 0) return;
|
|
3366
3694
|
const c = () => {
|
|
3367
|
-
const
|
|
3368
|
-
|
|
3695
|
+
const C = ft(r);
|
|
3696
|
+
C && i(C);
|
|
3369
3697
|
};
|
|
3370
3698
|
c();
|
|
3371
|
-
const
|
|
3372
|
-
return
|
|
3699
|
+
const f = r.hostThemeAttribute, h = new MutationObserver(c);
|
|
3700
|
+
return h.observe(document.documentElement, {
|
|
3373
3701
|
attributes: !0,
|
|
3374
|
-
attributeFilter: [
|
|
3375
|
-
}), () =>
|
|
3702
|
+
attributeFilter: [f]
|
|
3703
|
+
}), () => h.disconnect();
|
|
3376
3704
|
}, [t, r]);
|
|
3377
|
-
const d =
|
|
3378
|
-
() =>
|
|
3705
|
+
const d = se(
|
|
3706
|
+
() => vn(r, p),
|
|
3379
3707
|
[r, p]
|
|
3380
|
-
),
|
|
3708
|
+
), g = T(() => {
|
|
3381
3709
|
const c = p === "dark" ? "light" : "dark";
|
|
3382
3710
|
if (n) {
|
|
3383
3711
|
n(c);
|
|
3384
3712
|
return;
|
|
3385
3713
|
}
|
|
3386
|
-
i(c),
|
|
3387
|
-
}, [p, n, r]),
|
|
3714
|
+
i(c), wn(c, r);
|
|
3715
|
+
}, [p, n, r]), m = T(() => {
|
|
3388
3716
|
l((c) => !c);
|
|
3389
3717
|
}, []);
|
|
3390
3718
|
return {
|
|
3391
3719
|
chrome: d,
|
|
3392
|
-
rootAttributes:
|
|
3720
|
+
rootAttributes: yn(d),
|
|
3393
3721
|
hostTheme: p,
|
|
3394
|
-
toggleHostTheme:
|
|
3722
|
+
toggleHostTheme: g,
|
|
3395
3723
|
settingsOpen: s,
|
|
3396
3724
|
setSettingsOpen: l,
|
|
3397
|
-
toggleSettings:
|
|
3725
|
+
toggleSettings: m,
|
|
3398
3726
|
uiSettings: r
|
|
3399
3727
|
};
|
|
3400
3728
|
}
|
|
3401
|
-
const fr = `.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-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}`, Lt = "pixelagent-base-styles";
|
|
3402
|
-
function
|
|
3403
|
-
if (typeof document > "u" || document.getElementById(
|
|
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;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-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%);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";
|
|
3730
|
+
function Mr() {
|
|
3731
|
+
if (typeof document > "u" || document.getElementById(Rt)) return;
|
|
3404
3732
|
const e = document.createElement("style");
|
|
3405
|
-
e.id =
|
|
3406
|
-
}
|
|
3407
|
-
|
|
3408
|
-
const
|
|
3409
|
-
let
|
|
3410
|
-
const
|
|
3411
|
-
function
|
|
3412
|
-
let t =
|
|
3733
|
+
e.id = Rt, e.textContent = Cr, document.head.appendChild(e);
|
|
3734
|
+
}
|
|
3735
|
+
Mr();
|
|
3736
|
+
const Tt = "/__pixelagent/apply", It = "pixelagent-runtime-styles";
|
|
3737
|
+
let Dt = 0;
|
|
3738
|
+
const et = /* @__PURE__ */ new WeakMap();
|
|
3739
|
+
function Ar(e) {
|
|
3740
|
+
let t = et.get(e);
|
|
3413
3741
|
if (t) return t;
|
|
3414
3742
|
for (const n of Array.from(e.classList))
|
|
3415
3743
|
if (n.startsWith("pa-runtime-"))
|
|
3416
|
-
return
|
|
3417
|
-
return
|
|
3744
|
+
return et.set(e, n), n;
|
|
3745
|
+
return Dt += 1, t = `pa-runtime-${Dt}`, et.set(e, t), e.classList.add(t), t;
|
|
3418
3746
|
}
|
|
3419
|
-
function
|
|
3420
|
-
let e = document.getElementById(
|
|
3421
|
-
return e || (e = document.createElement("style"), e.id =
|
|
3747
|
+
function zr() {
|
|
3748
|
+
let e = document.getElementById(It);
|
|
3749
|
+
return e || (e = document.createElement("style"), e.id = It, document.head.appendChild(e)), e;
|
|
3422
3750
|
}
|
|
3423
|
-
function
|
|
3424
|
-
const o =
|
|
3751
|
+
function Sr(e, t, n, r) {
|
|
3752
|
+
const o = zr(), i = e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), s = new RegExp(
|
|
3425
3753
|
`(\\.${i}:${t}\\s*\\{)([\\s\\S]*?)(\\})`,
|
|
3426
3754
|
"m"
|
|
3427
3755
|
), l = `${n}: ${r} !important`;
|
|
3428
3756
|
let p = o.textContent ?? "";
|
|
3429
3757
|
const d = p.match(s);
|
|
3430
3758
|
if (d) {
|
|
3431
|
-
const
|
|
3759
|
+
const g = d[2], m = new RegExp(`(\\s*${n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\s*:\\s*)[^;]+;?`);
|
|
3432
3760
|
let c;
|
|
3433
|
-
if (
|
|
3434
|
-
c =
|
|
3761
|
+
if (m.test(g))
|
|
3762
|
+
c = g.replace(m, `$1${r} !important;`);
|
|
3435
3763
|
else {
|
|
3436
|
-
const
|
|
3437
|
-
c = `${
|
|
3764
|
+
const f = g.replace(/\s+$/, ""), h = f.endsWith(";") || f === "" ? "" : ";";
|
|
3765
|
+
c = `${f}${h}
|
|
3438
3766
|
${l};
|
|
3439
3767
|
`;
|
|
3440
3768
|
}
|
|
@@ -3449,11 +3777,11 @@ function mr(e, t, n, r) {
|
|
|
3449
3777
|
`;
|
|
3450
3778
|
o.textContent = p;
|
|
3451
3779
|
}
|
|
3452
|
-
function
|
|
3780
|
+
function Ot(e) {
|
|
3453
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);
|
|
3454
3782
|
return { x: t, y: n, width: r, height: o };
|
|
3455
3783
|
}
|
|
3456
|
-
function
|
|
3784
|
+
function Lr({
|
|
3457
3785
|
ui: e,
|
|
3458
3786
|
hostTheme: t,
|
|
3459
3787
|
onHostThemeChange: n,
|
|
@@ -3461,180 +3789,180 @@ function xr({
|
|
|
3461
3789
|
onApply: o,
|
|
3462
3790
|
runtimeStateStyles: i
|
|
3463
3791
|
} = {}) {
|
|
3464
|
-
const s =
|
|
3465
|
-
|
|
3792
|
+
const s = Nr({ ui: e, hostTheme: t, onHostThemeChange: n }), [l, p] = S(null);
|
|
3793
|
+
_(() => {
|
|
3466
3794
|
if (r || o) return;
|
|
3467
|
-
let
|
|
3468
|
-
return fetch(
|
|
3469
|
-
!
|
|
3795
|
+
let L = !1;
|
|
3796
|
+
return fetch(Tt, { method: "GET" }).then((R) => {
|
|
3797
|
+
!L && R.status === 405 && p(Tt);
|
|
3470
3798
|
}).catch(() => {
|
|
3471
3799
|
}), () => {
|
|
3472
|
-
|
|
3800
|
+
L = !0;
|
|
3473
3801
|
};
|
|
3474
3802
|
}, [r, o]);
|
|
3475
|
-
const [d,
|
|
3476
|
-
annotations:
|
|
3477
|
-
setAnnotations:
|
|
3478
|
-
updateAnnotation:
|
|
3803
|
+
const [d, g] = S(!1), [m, c] = S("idle"), [f, h] = S("element"), {
|
|
3804
|
+
annotations: C,
|
|
3805
|
+
setAnnotations: k,
|
|
3806
|
+
updateAnnotation: D,
|
|
3479
3807
|
removeAnnotation: x
|
|
3480
|
-
} =
|
|
3481
|
-
(
|
|
3482
|
-
|
|
3483
|
-
I(null), O(null),
|
|
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);
|
|
3484
3812
|
}, 2500);
|
|
3485
3813
|
},
|
|
3486
3814
|
[]
|
|
3487
|
-
),
|
|
3488
|
-
async (
|
|
3489
|
-
if (
|
|
3815
|
+
), te = T(
|
|
3816
|
+
async (L, R, ne) => {
|
|
3817
|
+
if (L)
|
|
3490
3818
|
try {
|
|
3491
|
-
await
|
|
3819
|
+
await Ht(L), V(R, ne);
|
|
3492
3820
|
} catch {
|
|
3493
|
-
|
|
3821
|
+
V("Copy failed — check clipboard permissions", ne);
|
|
3494
3822
|
}
|
|
3495
3823
|
},
|
|
3496
|
-
[
|
|
3824
|
+
[V]
|
|
3497
3825
|
), he = T(
|
|
3498
|
-
(
|
|
3499
|
-
|
|
3826
|
+
(L, R) => {
|
|
3827
|
+
L.length === 0 && !R || (z({ elements: L, areaBbox: R }), N(L[0] ?? null));
|
|
3500
3828
|
},
|
|
3501
3829
|
[]
|
|
3502
|
-
),
|
|
3503
|
-
(
|
|
3504
|
-
if (!(!d ||
|
|
3505
|
-
if (
|
|
3506
|
-
|
|
3507
|
-
(
|
|
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 }
|
|
3508
3836
|
);
|
|
3509
3837
|
return;
|
|
3510
3838
|
}
|
|
3511
|
-
|
|
3839
|
+
f !== "area" && A($t(L.clientX, L.clientY));
|
|
3512
3840
|
}
|
|
3513
3841
|
},
|
|
3514
|
-
[d,
|
|
3515
|
-
),
|
|
3516
|
-
(
|
|
3517
|
-
!d ||
|
|
3518
|
-
startX:
|
|
3519
|
-
startY:
|
|
3520
|
-
currentX:
|
|
3521
|
-
currentY:
|
|
3522
|
-
}),
|
|
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));
|
|
3523
3851
|
},
|
|
3524
|
-
[d,
|
|
3525
|
-
),
|
|
3526
|
-
if (!
|
|
3527
|
-
const
|
|
3528
|
-
if (
|
|
3529
|
-
const
|
|
3530
|
-
he(
|
|
3531
|
-
}, [
|
|
3532
|
-
(
|
|
3533
|
-
if (!d ||
|
|
3534
|
-
|
|
3535
|
-
const
|
|
3536
|
-
if (!
|
|
3537
|
-
if (
|
|
3538
|
-
|
|
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);
|
|
3539
3867
|
return;
|
|
3540
3868
|
}
|
|
3541
|
-
const
|
|
3542
|
-
he(
|
|
3869
|
+
const ne = P.length > 0 ? P : [R];
|
|
3870
|
+
he(ne.includes(R) ? ne : [R]);
|
|
3543
3871
|
},
|
|
3544
|
-
[d,
|
|
3872
|
+
[d, m, f, P, he]
|
|
3545
3873
|
);
|
|
3546
|
-
|
|
3547
|
-
!
|
|
3548
|
-
}, [
|
|
3874
|
+
_(() => {
|
|
3875
|
+
!v || b !== "all-instances" || Bt(v) <= 1 && Q("this-instance");
|
|
3876
|
+
}, [v, b]), _(() => {
|
|
3549
3877
|
if (d)
|
|
3550
|
-
return document.addEventListener("mousemove",
|
|
3551
|
-
document.removeEventListener("mousemove",
|
|
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);
|
|
3552
3880
|
};
|
|
3553
|
-
}, [d,
|
|
3554
|
-
const
|
|
3555
|
-
(
|
|
3556
|
-
if (!
|
|
3557
|
-
const { elements:
|
|
3558
|
-
if (
|
|
3559
|
-
const
|
|
3560
|
-
elements:
|
|
3561
|
-
note:
|
|
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;
|
|
3887
|
+
const Ae = rr({
|
|
3888
|
+
elements: ne,
|
|
3889
|
+
note: L,
|
|
3562
3890
|
areaBbox: oe
|
|
3563
3891
|
});
|
|
3564
|
-
|
|
3892
|
+
k((U) => [...U, Ae]), K(!1), R ? (z(null), N(null)) : (z(null), N(null), y([]));
|
|
3565
3893
|
},
|
|
3566
|
-
[
|
|
3567
|
-
),
|
|
3568
|
-
|
|
3569
|
-
}, []),
|
|
3570
|
-
async (
|
|
3571
|
-
const
|
|
3572
|
-
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 });
|
|
3573
3901
|
},
|
|
3574
|
-
[
|
|
3575
|
-
),
|
|
3576
|
-
async (
|
|
3577
|
-
const
|
|
3578
|
-
|
|
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 });
|
|
3579
3907
|
},
|
|
3580
|
-
[
|
|
3581
|
-
),
|
|
3582
|
-
async (
|
|
3583
|
-
const
|
|
3584
|
-
for (const [
|
|
3585
|
-
for (const [me, ie] of
|
|
3586
|
-
ie.length > 0 &&
|
|
3587
|
-
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 };
|
|
3588
3916
|
if (i) {
|
|
3589
|
-
for (const [
|
|
3590
|
-
if (
|
|
3591
|
-
const ie =
|
|
3917
|
+
for (const [U, ae, me] of R) {
|
|
3918
|
+
if (ae === "normal") continue;
|
|
3919
|
+
const ie = Ar(U);
|
|
3592
3920
|
for (const ze of me)
|
|
3593
|
-
|
|
3921
|
+
U.style.removeProperty(ze.property), Sr(ie, ae, ze.property, ze.newValue);
|
|
3594
3922
|
}
|
|
3595
|
-
for (const [
|
|
3596
|
-
if (
|
|
3923
|
+
for (const [U, ae, me] of R)
|
|
3924
|
+
if (ae === "normal")
|
|
3597
3925
|
for (const ie of me)
|
|
3598
|
-
|
|
3599
|
-
return
|
|
3926
|
+
U.style.setProperty(ie.property, ie.newValue);
|
|
3927
|
+
return V("Change applied"), { applied: !0, skipRevert: !0 };
|
|
3600
3928
|
}
|
|
3601
|
-
const
|
|
3602
|
-
for (const [
|
|
3603
|
-
const ie =
|
|
3929
|
+
const ne = r ?? l ?? void 0, oe = [];
|
|
3930
|
+
for (const [U, ae, me] of R) {
|
|
3931
|
+
const ie = ot(U), ze = {
|
|
3604
3932
|
schemaVersion: 1,
|
|
3605
|
-
elementSelector:
|
|
3933
|
+
elementSelector: _t(U, b),
|
|
3606
3934
|
sourceFile: ie.sourceFile,
|
|
3607
3935
|
lineNumber: ie.lineNumber,
|
|
3608
|
-
targetScope:
|
|
3609
|
-
state:
|
|
3610
|
-
stylingSystem:
|
|
3936
|
+
targetScope: b,
|
|
3937
|
+
state: ae,
|
|
3938
|
+
stylingSystem: Ft(U),
|
|
3611
3939
|
changes: me
|
|
3612
3940
|
};
|
|
3613
|
-
oe.push(await
|
|
3941
|
+
oe.push(await Ya(ze, { applyEndpoint: ne, onApply: o }));
|
|
3614
3942
|
}
|
|
3615
|
-
const
|
|
3616
|
-
(
|
|
3943
|
+
const Ae = oe.every(
|
|
3944
|
+
(U) => U.mode === "mcp" && U.result.success && U.result.linesChanged.length > 0
|
|
3617
3945
|
);
|
|
3618
|
-
return
|
|
3619
|
-
|
|
3620
|
-
}), { applied:
|
|
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);
|
|
3948
|
+
}), { applied: Ae };
|
|
3621
3949
|
},
|
|
3622
|
-
[
|
|
3623
|
-
),
|
|
3624
|
-
s.setSettingsOpen(!1),
|
|
3625
|
-
},
|
|
3626
|
-
|
|
3627
|
-
},
|
|
3628
|
-
return /* @__PURE__ */
|
|
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);
|
|
3953
|
+
}, pn = () => {
|
|
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(
|
|
3629
3957
|
"div",
|
|
3630
3958
|
{
|
|
3631
|
-
ref:
|
|
3959
|
+
ref: ee,
|
|
3632
3960
|
className: "pa-root",
|
|
3633
3961
|
"data-pixelagent-root": !0,
|
|
3634
3962
|
...s.rootAttributes,
|
|
3635
3963
|
children: [
|
|
3636
3964
|
/* @__PURE__ */ a(
|
|
3637
|
-
|
|
3965
|
+
yr,
|
|
3638
3966
|
{
|
|
3639
3967
|
rootAttributes: s.rootAttributes,
|
|
3640
3968
|
hostTheme: s.hostTheme,
|
|
@@ -3644,95 +3972,95 @@ function xr({
|
|
|
3644
3972
|
onCloseSettings: () => s.setSettingsOpen(!1),
|
|
3645
3973
|
onToggleHostTheme: s.toggleHostTheme,
|
|
3646
3974
|
active: d,
|
|
3647
|
-
mode:
|
|
3648
|
-
captureMode:
|
|
3649
|
-
annotationCount:
|
|
3650
|
-
multiSelectCount:
|
|
3651
|
-
copyStatus:
|
|
3652
|
-
copyAllFrom:
|
|
3653
|
-
onActivateAnnotate: () =>
|
|
3654
|
-
onActivateEdit: () =>
|
|
3655
|
-
onDeactivate:
|
|
3656
|
-
onCopyAll: () =>
|
|
3657
|
-
onCaptureModeChange:
|
|
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"),
|
|
3983
|
+
onDeactivate: pn,
|
|
3984
|
+
onCopyAll: () => pt("toolbar"),
|
|
3985
|
+
onCaptureModeChange: h,
|
|
3658
3986
|
onConfirmMultiSelect: () => {
|
|
3659
|
-
|
|
3987
|
+
P.length > 0 && he(P);
|
|
3660
3988
|
}
|
|
3661
3989
|
}
|
|
3662
3990
|
),
|
|
3663
|
-
d &&
|
|
3991
|
+
d && m === "annotate" && /* @__PURE__ */ u(Z, { children: [
|
|
3664
3992
|
/* @__PURE__ */ a(
|
|
3665
|
-
|
|
3993
|
+
jt,
|
|
3666
3994
|
{
|
|
3667
3995
|
element: w,
|
|
3668
|
-
selected:
|
|
3669
|
-
multiSelected:
|
|
3996
|
+
selected: v,
|
|
3997
|
+
multiSelected: P
|
|
3670
3998
|
}
|
|
3671
3999
|
),
|
|
3672
4000
|
/* @__PURE__ */ a(
|
|
3673
|
-
|
|
4001
|
+
cr,
|
|
3674
4002
|
{
|
|
3675
|
-
annotations:
|
|
3676
|
-
activeId:
|
|
3677
|
-
onActiveChange:
|
|
4003
|
+
annotations: C,
|
|
4004
|
+
activeId: q,
|
|
4005
|
+
onActiveChange: J
|
|
3678
4006
|
}
|
|
3679
4007
|
),
|
|
3680
|
-
/* @__PURE__ */ a(
|
|
4008
|
+
/* @__PURE__ */ a(ar, { area: dn, isDragging: !!E })
|
|
3681
4009
|
] }),
|
|
3682
|
-
d &&
|
|
3683
|
-
|
|
4010
|
+
d && m === "annotate" && M && /* @__PURE__ */ a(
|
|
4011
|
+
nr,
|
|
3684
4012
|
{
|
|
3685
|
-
elements:
|
|
3686
|
-
areaBbox:
|
|
3687
|
-
onSubmit:
|
|
3688
|
-
onCancel:
|
|
4013
|
+
elements: M.elements,
|
|
4014
|
+
areaBbox: M.areaBbox,
|
|
4015
|
+
onSubmit: on,
|
|
4016
|
+
onCancel: sn
|
|
3689
4017
|
}
|
|
3690
4018
|
),
|
|
3691
|
-
d &&
|
|
3692
|
-
|
|
4019
|
+
d && m === "edit" && /* @__PURE__ */ a(
|
|
4020
|
+
ja,
|
|
3693
4021
|
{
|
|
3694
|
-
selectedElement:
|
|
4022
|
+
selectedElement: v,
|
|
3695
4023
|
hoveredElement: w,
|
|
3696
|
-
onSelectElement:
|
|
3697
|
-
onHoverElement:
|
|
3698
|
-
targetScope:
|
|
3699
|
-
onTargetScopeChange:
|
|
3700
|
-
elementState:
|
|
4024
|
+
onSelectElement: N,
|
|
4025
|
+
onHoverElement: A,
|
|
4026
|
+
targetScope: b,
|
|
4027
|
+
onTargetScopeChange: Q,
|
|
4028
|
+
elementState: ce,
|
|
3701
4029
|
onElementStateChange: ge,
|
|
3702
|
-
onApply:
|
|
3703
|
-
applyStatus:
|
|
3704
|
-
isToolbarTarget:
|
|
4030
|
+
onApply: cn,
|
|
4031
|
+
applyStatus: m === "edit" ? $ : null,
|
|
4032
|
+
isToolbarTarget: De
|
|
3705
4033
|
}
|
|
3706
4034
|
),
|
|
3707
|
-
|
|
3708
|
-
|
|
4035
|
+
le && /* @__PURE__ */ a(
|
|
4036
|
+
gr,
|
|
3709
4037
|
{
|
|
3710
|
-
annotations:
|
|
4038
|
+
annotations: C,
|
|
3711
4039
|
onClose: () => K(!0),
|
|
3712
|
-
onCopyAll: () =>
|
|
3713
|
-
onCopyOne:
|
|
4040
|
+
onCopyAll: () => pt("session"),
|
|
4041
|
+
onCopyOne: ln,
|
|
3714
4042
|
onRemove: x,
|
|
3715
|
-
onUpdate:
|
|
3716
|
-
activeId:
|
|
3717
|
-
onActiveChange:
|
|
3718
|
-
copyStatus:
|
|
3719
|
-
copiedEntryId:
|
|
3720
|
-
copyAllFrom:
|
|
4043
|
+
onUpdate: D,
|
|
4044
|
+
activeId: q,
|
|
4045
|
+
onActiveChange: J,
|
|
4046
|
+
copyStatus: $,
|
|
4047
|
+
copiedEntryId: B,
|
|
4048
|
+
copyAllFrom: Y
|
|
3721
4049
|
}
|
|
3722
4050
|
)
|
|
3723
4051
|
]
|
|
3724
4052
|
}
|
|
3725
4053
|
);
|
|
3726
4054
|
}
|
|
3727
|
-
function
|
|
4055
|
+
function Er() {
|
|
3728
4056
|
return typeof process < "u" && process.env.NODE_ENV !== "production";
|
|
3729
4057
|
}
|
|
3730
|
-
function
|
|
3731
|
-
return
|
|
4058
|
+
function Ir() {
|
|
4059
|
+
return Er() ? /* @__PURE__ */ a(Lr, {}) : null;
|
|
3732
4060
|
}
|
|
3733
4061
|
export {
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
4062
|
+
Lr as PixelAgent,
|
|
4063
|
+
Ir as PixelAgentDev,
|
|
4064
|
+
Er as isDevEnvironment
|
|
3737
4065
|
};
|
|
3738
4066
|
//# sourceMappingURL=pixelagent.js.map
|