uilint-react 0.2.49 → 0.2.50
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/DevTool.d.ts.map +1 -1
- package/dist/devtools.js +70 -70
- package/dist/devtools.js.map +1 -1
- package/dist/index.js +81 -79
- package/dist/index.js.map +1 -1
- package/dist/ui/components/FloatingIcon.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import O, { useState as C, useRef as K, useCallback as I, useEffect as A, useMemo as W } from "react";
|
|
2
2
|
import { createPortal as U } from "react-dom";
|
|
3
3
|
import { i as an, a as un, b as dn, s as fn } from "./environment-DVxa60C6.js";
|
|
4
|
-
import { createEmptyStyleGuide as hn, createStyleSummary as gn, extractStylesFromDOM as mn, generateStyleGuideFromStyles as bn, mergeStyleGuides as xn, parseStyleGuide as vn, serializeStyles as
|
|
4
|
+
import { createEmptyStyleGuide as hn, createStyleSummary as gn, extractStylesFromDOM as mn, generateStyleGuideFromStyles as bn, mergeStyleGuides as xn, parseStyleGuide as vn, serializeStyles as yn } from "uilint-core";
|
|
5
5
|
var Y = { exports: {} }, M = {};
|
|
6
6
|
var pe;
|
|
7
7
|
function Fe() {
|
|
@@ -32,20 +32,20 @@ function Be() {
|
|
|
32
32
|
function e(l) {
|
|
33
33
|
if (l == null) return null;
|
|
34
34
|
if (typeof l == "function")
|
|
35
|
-
return l.$$typeof ===
|
|
35
|
+
return l.$$typeof === Oe ? null : l.displayName || l.name || null;
|
|
36
36
|
if (typeof l == "string") return l;
|
|
37
37
|
switch (l) {
|
|
38
38
|
case b:
|
|
39
39
|
return "Fragment";
|
|
40
40
|
case N:
|
|
41
41
|
return "Profiler";
|
|
42
|
-
case
|
|
42
|
+
case S:
|
|
43
43
|
return "StrictMode";
|
|
44
44
|
case Ae:
|
|
45
45
|
return "Suspense";
|
|
46
46
|
case _e:
|
|
47
47
|
return "SuspenseList";
|
|
48
|
-
case
|
|
48
|
+
case Le:
|
|
49
49
|
return "Activity";
|
|
50
50
|
}
|
|
51
51
|
if (typeof l == "object")
|
|
@@ -84,11 +84,11 @@ function Be() {
|
|
|
84
84
|
}
|
|
85
85
|
if (h) {
|
|
86
86
|
h = console;
|
|
87
|
-
var v = h.error,
|
|
87
|
+
var v = h.error, y = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
|
|
88
88
|
return v.call(
|
|
89
89
|
h,
|
|
90
90
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
91
|
-
|
|
91
|
+
y
|
|
92
92
|
), t(l);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
@@ -135,15 +135,15 @@ function Be() {
|
|
|
135
135
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
136
136
|
)), l = this.props.ref, l !== void 0 ? l : null;
|
|
137
137
|
}
|
|
138
|
-
function d(l, h, v,
|
|
139
|
-
var
|
|
138
|
+
function d(l, h, v, y, H, ee) {
|
|
139
|
+
var w = v.ref;
|
|
140
140
|
return l = {
|
|
141
141
|
$$typeof: R,
|
|
142
142
|
type: l,
|
|
143
143
|
key: h,
|
|
144
144
|
props: v,
|
|
145
|
-
_owner:
|
|
146
|
-
}, (
|
|
145
|
+
_owner: y
|
|
146
|
+
}, (w !== void 0 ? w : null) !== null ? Object.defineProperty(l, "ref", {
|
|
147
147
|
enumerable: !1,
|
|
148
148
|
get: u
|
|
149
149
|
}) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
|
|
@@ -168,48 +168,48 @@ function Be() {
|
|
|
168
168
|
value: ee
|
|
169
169
|
}), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
|
|
170
170
|
}
|
|
171
|
-
function f(l, h, v,
|
|
172
|
-
var
|
|
173
|
-
if (
|
|
174
|
-
if (
|
|
175
|
-
if (De(
|
|
176
|
-
for (
|
|
177
|
-
m(y
|
|
178
|
-
Object.freeze && Object.freeze(
|
|
171
|
+
function f(l, h, v, y, H, ee) {
|
|
172
|
+
var w = h.children;
|
|
173
|
+
if (w !== void 0)
|
|
174
|
+
if (y)
|
|
175
|
+
if (De(w)) {
|
|
176
|
+
for (y = 0; y < w.length; y++)
|
|
177
|
+
m(w[y]);
|
|
178
|
+
Object.freeze && Object.freeze(w);
|
|
179
179
|
} else
|
|
180
180
|
console.error(
|
|
181
181
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
182
182
|
);
|
|
183
|
-
else m(
|
|
183
|
+
else m(w);
|
|
184
184
|
if (le.call(h, "key")) {
|
|
185
|
-
|
|
186
|
-
var
|
|
185
|
+
w = e(l);
|
|
186
|
+
var L = Object.keys(h).filter(function(Me) {
|
|
187
187
|
return Me !== "key";
|
|
188
188
|
});
|
|
189
|
-
|
|
189
|
+
y = 0 < L.length ? "{key: someKey, " + L.join(": ..., ") + ": ...}" : "{key: someKey}", fe[w + y] || (L = 0 < L.length ? "{" + L.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
190
190
|
`A props object containing a "key" prop is being spread into JSX:
|
|
191
191
|
let props = %s;
|
|
192
192
|
<%s {...props} />
|
|
193
193
|
React keys must be passed directly to JSX without using spread:
|
|
194
194
|
let props = %s;
|
|
195
195
|
<%s key={someKey} {...props} />`,
|
|
196
|
-
S,
|
|
197
196
|
y,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
197
|
+
w,
|
|
198
|
+
L,
|
|
199
|
+
w
|
|
200
|
+
), fe[w + y] = !0);
|
|
201
201
|
}
|
|
202
|
-
if (
|
|
202
|
+
if (w = null, v !== void 0 && (n(v), w = "" + v), c(h) && (n(h.key), w = "" + h.key), "key" in h) {
|
|
203
203
|
v = {};
|
|
204
204
|
for (var te in h)
|
|
205
205
|
te !== "key" && (v[te] = h[te]);
|
|
206
206
|
} else v = h;
|
|
207
|
-
return
|
|
207
|
+
return w && a(
|
|
208
208
|
v,
|
|
209
209
|
typeof l == "function" ? l.displayName || l.name || "Unknown" : l
|
|
210
210
|
), d(
|
|
211
211
|
l,
|
|
212
|
-
|
|
212
|
+
w,
|
|
213
213
|
v,
|
|
214
214
|
r(),
|
|
215
215
|
H,
|
|
@@ -222,7 +222,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
222
222
|
function p(l) {
|
|
223
223
|
return typeof l == "object" && l !== null && l.$$typeof === R;
|
|
224
224
|
}
|
|
225
|
-
var g =
|
|
225
|
+
var g = O, R = /* @__PURE__ */ Symbol.for("react.transitional.element"), _ = /* @__PURE__ */ Symbol.for("react.portal"), b = /* @__PURE__ */ Symbol.for("react.fragment"), S = /* @__PURE__ */ Symbol.for("react.strict_mode"), N = /* @__PURE__ */ Symbol.for("react.profiler"), J = /* @__PURE__ */ Symbol.for("react.consumer"), Pe = /* @__PURE__ */ Symbol.for("react.context"), Te = /* @__PURE__ */ Symbol.for("react.forward_ref"), Ae = /* @__PURE__ */ Symbol.for("react.suspense"), _e = /* @__PURE__ */ Symbol.for("react.suspense_list"), Ne = /* @__PURE__ */ Symbol.for("react.memo"), X = /* @__PURE__ */ Symbol.for("react.lazy"), Le = /* @__PURE__ */ Symbol.for("react.activity"), Oe = /* @__PURE__ */ Symbol.for("react.client.reference"), Z = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, le = Object.prototype.hasOwnProperty, De = Array.isArray, Q = console.createTask ? console.createTask : function() {
|
|
226
226
|
return null;
|
|
227
227
|
};
|
|
228
228
|
g = {
|
|
@@ -235,24 +235,24 @@ React keys must be passed directly to JSX without using spread:
|
|
|
235
235
|
s
|
|
236
236
|
)(), de = Q(o(s)), fe = {};
|
|
237
237
|
F.Fragment = b, F.jsx = function(l, h, v) {
|
|
238
|
-
var
|
|
238
|
+
var y = 1e4 > Z.recentlyCreatedOwnerStacks++;
|
|
239
239
|
return f(
|
|
240
240
|
l,
|
|
241
241
|
h,
|
|
242
242
|
v,
|
|
243
243
|
!1,
|
|
244
|
-
|
|
245
|
-
|
|
244
|
+
y ? Error("react-stack-top-frame") : ue,
|
|
245
|
+
y ? Q(o(l)) : de
|
|
246
246
|
);
|
|
247
247
|
}, F.jsxs = function(l, h, v) {
|
|
248
|
-
var
|
|
248
|
+
var y = 1e4 > Z.recentlyCreatedOwnerStacks++;
|
|
249
249
|
return f(
|
|
250
250
|
l,
|
|
251
251
|
h,
|
|
252
252
|
v,
|
|
253
253
|
!0,
|
|
254
|
-
|
|
255
|
-
|
|
254
|
+
y ? Error("react-stack-top-frame") : ue,
|
|
255
|
+
y ? Q(o(l)) : de
|
|
256
256
|
);
|
|
257
257
|
};
|
|
258
258
|
})()), F;
|
|
@@ -269,11 +269,11 @@ const E = {
|
|
|
269
269
|
inspectorFloatingPosition: "uilint:inspectorFloatingPosition",
|
|
270
270
|
inspectorFloatingSize: "uilint:inspectorFloatingSize"
|
|
271
271
|
};
|
|
272
|
-
function
|
|
272
|
+
function ye() {
|
|
273
273
|
return typeof window < "u" && typeof localStorage < "u";
|
|
274
274
|
}
|
|
275
275
|
function z(e, t) {
|
|
276
|
-
if (!
|
|
276
|
+
if (!ye()) return t;
|
|
277
277
|
try {
|
|
278
278
|
const n = localStorage.getItem(e);
|
|
279
279
|
return n === null ? t : JSON.parse(n);
|
|
@@ -282,7 +282,7 @@ function z(e, t) {
|
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
function B(e, t) {
|
|
285
|
-
if (
|
|
285
|
+
if (ye())
|
|
286
286
|
try {
|
|
287
287
|
localStorage.setItem(e, JSON.stringify(t));
|
|
288
288
|
} catch (n) {
|
|
@@ -465,12 +465,12 @@ const Ue = (e) => (t, n) => ({
|
|
|
465
465
|
return a;
|
|
466
466
|
}, He = ((e) => e ? be(e) : be), Ye = (e) => e;
|
|
467
467
|
function qe(e, t = Ye) {
|
|
468
|
-
const n =
|
|
468
|
+
const n = O.useSyncExternalStore(
|
|
469
469
|
e.subscribe,
|
|
470
|
-
|
|
471
|
-
|
|
470
|
+
O.useCallback(() => t(e.getState()), [e, t]),
|
|
471
|
+
O.useCallback(() => t(e.getInitialState()), [e, t])
|
|
472
472
|
);
|
|
473
|
-
return
|
|
473
|
+
return O.useDebugValue(n), n;
|
|
474
474
|
}
|
|
475
475
|
const xe = (e) => {
|
|
476
476
|
const t = He(e), n = (o) => qe(t, o);
|
|
@@ -611,7 +611,7 @@ function Qe({ size: e = 20, color: t = "currentColor", className: n }) {
|
|
|
611
611
|
/* @__PURE__ */ i.jsx("path", { d: "M21 21l-4.35-4.35" })
|
|
612
612
|
] });
|
|
613
613
|
}
|
|
614
|
-
function
|
|
614
|
+
function we({ size: e = 20, color: t = "currentColor", className: n }) {
|
|
615
615
|
return /* @__PURE__ */ i.jsxs("svg", { width: e, height: e, viewBox: "0 0 24 24", className: n, ...k, stroke: t, children: [
|
|
616
616
|
/* @__PURE__ */ i.jsx("path", { d: "M18 6L6 18" }),
|
|
617
617
|
/* @__PURE__ */ i.jsx("path", { d: "M6 6l12 12" })
|
|
@@ -638,7 +638,7 @@ function re({ size: e = 16, color: t = "currentColor", className: n }) {
|
|
|
638
638
|
/* @__PURE__ */ i.jsx("path", { d: "M12 8h.01" })
|
|
639
639
|
] });
|
|
640
640
|
}
|
|
641
|
-
function
|
|
641
|
+
function Se({ size: e = 16, color: t = "currentColor", className: n }) {
|
|
642
642
|
return /* @__PURE__ */ i.jsxs("svg", { width: e, height: e, viewBox: "0 0 24 24", className: n, ...k, stroke: t, children: [
|
|
643
643
|
/* @__PURE__ */ i.jsx("path", { d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" }),
|
|
644
644
|
/* @__PURE__ */ i.jsx("path", { d: "M14 2v6h6" })
|
|
@@ -651,26 +651,28 @@ function Ie({ size: e = 16, color: t = "currentColor", className: n }) {
|
|
|
651
651
|
/* @__PURE__ */ i.jsx("path", { d: "M4 18h12" })
|
|
652
652
|
] });
|
|
653
653
|
}
|
|
654
|
-
|
|
654
|
+
function et() {
|
|
655
|
+
return typeof window > "u" ? { x: 0, y: 16 } : { x: window.innerWidth / 2 - 24, y: 16 };
|
|
656
|
+
}
|
|
655
657
|
function tt() {
|
|
656
658
|
const e = x((b) => b.openCommandPalette), t = x((b) => b.wsConnected), n = x((b) => b.floatingIconPosition), o = x((b) => b.setFloatingIconPosition), r = x((b) => {
|
|
657
|
-
const
|
|
658
|
-
if (!
|
|
659
|
+
const S = b.plugins?.eslint?.issues;
|
|
660
|
+
if (!S) return 0;
|
|
659
661
|
let N = 0;
|
|
660
|
-
return
|
|
662
|
+
return S.forEach((J) => {
|
|
661
663
|
N += J.length;
|
|
662
664
|
}), N;
|
|
663
|
-
}), [s, c] = C(!1), [a, u] = C({ x: 0, y: 0 }), d = K(null), f = n ?? et, m = I((b) => {
|
|
665
|
+
}), [s, c] = C(!1), [a, u] = C({ x: 0, y: 0 }), d = K(null), f = n ?? et(), m = I((b) => {
|
|
664
666
|
if (b.button !== 0) return;
|
|
665
|
-
const
|
|
666
|
-
|
|
667
|
-
x: b.clientX -
|
|
668
|
-
y: b.clientY -
|
|
667
|
+
const S = d.current?.getBoundingClientRect();
|
|
668
|
+
S && (u({
|
|
669
|
+
x: b.clientX - S.left,
|
|
670
|
+
y: b.clientY - S.top
|
|
669
671
|
}), c(!0), b.preventDefault());
|
|
670
672
|
}, []), p = I((b) => {
|
|
671
673
|
if (!s) return;
|
|
672
|
-
const
|
|
673
|
-
o({ x:
|
|
674
|
+
const S = Math.max(0, Math.min(window.innerWidth - 48, b.clientX - a.x)), N = Math.max(0, Math.min(window.innerHeight - 48, b.clientY - a.y));
|
|
675
|
+
o({ x: S, y: N });
|
|
674
676
|
}, [s, a, o]), g = I(() => {
|
|
675
677
|
c(!1);
|
|
676
678
|
}, []);
|
|
@@ -1086,7 +1088,7 @@ function ut({ issue: e, isSelected: t, onClick: n }) {
|
|
|
1086
1088
|
gap: 8
|
|
1087
1089
|
}, children: [
|
|
1088
1090
|
/* @__PURE__ */ i.jsxs("span", { style: { display: "flex", alignItems: "center", gap: 4 }, children: [
|
|
1089
|
-
/* @__PURE__ */ i.jsx(
|
|
1091
|
+
/* @__PURE__ */ i.jsx(Se, { size: 12 }),
|
|
1090
1092
|
s,
|
|
1091
1093
|
":",
|
|
1092
1094
|
e.line
|
|
@@ -1113,7 +1115,7 @@ function dt() {
|
|
|
1113
1115
|
}, [u, s]), f = I((p) => {
|
|
1114
1116
|
n("issue", { issue: p }), t();
|
|
1115
1117
|
}, [n, t]);
|
|
1116
|
-
if (
|
|
1118
|
+
if (O.useEffect(() => {
|
|
1117
1119
|
c(0);
|
|
1118
1120
|
}, [o]), !e) return null;
|
|
1119
1121
|
const m = document.getElementById("uilint-portal") || document.body;
|
|
@@ -1170,7 +1172,7 @@ function dt() {
|
|
|
1170
1172
|
padding: 4,
|
|
1171
1173
|
color: "#6b7280"
|
|
1172
1174
|
},
|
|
1173
|
-
children: /* @__PURE__ */ i.jsx(
|
|
1175
|
+
children: /* @__PURE__ */ i.jsx(we, { size: 20 })
|
|
1174
1176
|
}
|
|
1175
1177
|
)
|
|
1176
1178
|
] }),
|
|
@@ -1239,7 +1241,7 @@ function ft({ issue: e }) {
|
|
|
1239
1241
|
borderRadius: 8,
|
|
1240
1242
|
padding: 12
|
|
1241
1243
|
}, children: [
|
|
1242
|
-
/* @__PURE__ */ i.jsx(q, { icon: /* @__PURE__ */ i.jsx(
|
|
1244
|
+
/* @__PURE__ */ i.jsx(q, { icon: /* @__PURE__ */ i.jsx(Se, { size: 14 }), label: "File", value: e.filePath }),
|
|
1243
1245
|
/* @__PURE__ */ i.jsx(q, { icon: /* @__PURE__ */ i.jsx("span", { children: "📍" }), label: "Line", value: `${e.line}${e.column ? `:${e.column}` : ""}` }),
|
|
1244
1246
|
/* @__PURE__ */ i.jsx(q, { icon: /* @__PURE__ */ i.jsx(Ie, { size: 14 }), label: "Rule", value: e.ruleId }),
|
|
1245
1247
|
/* @__PURE__ */ i.jsx(q, { icon: /* @__PURE__ */ i.jsx("span", { children: "🔌" }), label: "Plugin", value: e.pluginId })
|
|
@@ -1382,7 +1384,7 @@ function ht() {
|
|
|
1382
1384
|
padding: 4,
|
|
1383
1385
|
color: "#6b7280"
|
|
1384
1386
|
},
|
|
1385
|
-
children: /* @__PURE__ */ i.jsx(
|
|
1387
|
+
children: /* @__PURE__ */ i.jsx(we, { size: 20 })
|
|
1386
1388
|
}
|
|
1387
1389
|
)
|
|
1388
1390
|
] }),
|
|
@@ -1486,7 +1488,7 @@ function vt(e) {
|
|
|
1486
1488
|
const t = e.split("/");
|
|
1487
1489
|
return t[t.length - 1] || e;
|
|
1488
1490
|
}
|
|
1489
|
-
function
|
|
1491
|
+
function yt(e) {
|
|
1490
1492
|
if (mt.has(e.tagName.toUpperCase()) || e.hasAttribute("data-ui-lint") || e.getAttribute("aria-hidden") === "true") return !0;
|
|
1491
1493
|
const t = window.getComputedStyle(e);
|
|
1492
1494
|
if (t.display === "none" || t.visibility === "hidden") return !0;
|
|
@@ -1495,10 +1497,10 @@ function St(e) {
|
|
|
1495
1497
|
}
|
|
1496
1498
|
function Vt(e = document.body, t = !0) {
|
|
1497
1499
|
const n = [], o = /* @__PURE__ */ new Map();
|
|
1498
|
-
|
|
1500
|
+
wt();
|
|
1499
1501
|
const r = e.querySelectorAll(`[${j}]`);
|
|
1500
1502
|
for (const s of r) {
|
|
1501
|
-
if (
|
|
1503
|
+
if (yt(s)) continue;
|
|
1502
1504
|
const c = bt(s);
|
|
1503
1505
|
if (!c || t && xt(c.fileName))
|
|
1504
1506
|
continue;
|
|
@@ -1540,7 +1542,7 @@ function Jt(e) {
|
|
|
1540
1542
|
}), o++;
|
|
1541
1543
|
return n.sort((r, s) => s.elements.length - r.elements.length), n;
|
|
1542
1544
|
}
|
|
1543
|
-
function
|
|
1545
|
+
function wt() {
|
|
1544
1546
|
document.querySelectorAll(`[${j}]`).forEach((t) => {
|
|
1545
1547
|
const n = t.getAttribute(j);
|
|
1546
1548
|
if (n && n.startsWith("loc:")) {
|
|
@@ -1568,7 +1570,7 @@ function Qt(e, t = "cursor", n) {
|
|
|
1568
1570
|
a
|
|
1569
1571
|
)}:${r}:${c}`;
|
|
1570
1572
|
}
|
|
1571
|
-
const D = /* @__PURE__ */ new Map(), se = 300 * 1e3,
|
|
1573
|
+
const D = /* @__PURE__ */ new Map(), se = 300 * 1e3, St = "/api/.uilint/source";
|
|
1572
1574
|
async function Ce(e) {
|
|
1573
1575
|
const t = D.get(e);
|
|
1574
1576
|
if (t && Date.now() - t.fetchedAt < se)
|
|
@@ -1578,7 +1580,7 @@ async function Ce(e) {
|
|
|
1578
1580
|
};
|
|
1579
1581
|
try {
|
|
1580
1582
|
const n = await fetch(
|
|
1581
|
-
`${
|
|
1583
|
+
`${St}?path=${encodeURIComponent(e)}`
|
|
1582
1584
|
);
|
|
1583
1585
|
if (!n.ok)
|
|
1584
1586
|
return console.warn(`[UILint] Failed to fetch source: ${n.statusText}`), null;
|
|
@@ -1796,12 +1798,12 @@ function rn(e) {
|
|
|
1796
1798
|
function Re(e) {
|
|
1797
1799
|
return document.querySelector(`[${V}="${e}"]`);
|
|
1798
1800
|
}
|
|
1799
|
-
function
|
|
1801
|
+
function Lt() {
|
|
1800
1802
|
if (typeof document > "u")
|
|
1801
1803
|
throw new Error("getUILintPortalHost() called outside of a DOM environment");
|
|
1802
1804
|
return document.querySelector(".uilint-devtool-root") ?? document.body;
|
|
1803
1805
|
}
|
|
1804
|
-
const T = "#3b82f6",
|
|
1806
|
+
const T = "#3b82f6", Ot = 14, Dt = 22, Mt = 2, Ft = 3, $ = 2;
|
|
1805
1807
|
function Bt(e, t = !1) {
|
|
1806
1808
|
const n = [];
|
|
1807
1809
|
return e.forEach((o, r) => {
|
|
@@ -1827,7 +1829,7 @@ function $t(e) {
|
|
|
1827
1829
|
}), t;
|
|
1828
1830
|
}
|
|
1829
1831
|
function zt({ rect: e }) {
|
|
1830
|
-
const [t, n] = C(!1), o = t ? Dt :
|
|
1832
|
+
const [t, n] = C(!1), o = t ? Dt : Ot, r = t ? Ft : Mt, s = t ? 10 : 6;
|
|
1831
1833
|
return /* @__PURE__ */ i.jsxs(
|
|
1832
1834
|
"div",
|
|
1833
1835
|
{
|
|
@@ -1948,14 +1950,14 @@ function sn({
|
|
|
1948
1950
|
g.forEach((_) => {
|
|
1949
1951
|
const b = Re(_);
|
|
1950
1952
|
if (!b) return;
|
|
1951
|
-
const
|
|
1953
|
+
const S = b.getBoundingClientRect();
|
|
1952
1954
|
R.push({
|
|
1953
1955
|
id: _,
|
|
1954
1956
|
rect: {
|
|
1955
|
-
top:
|
|
1956
|
-
left:
|
|
1957
|
-
width:
|
|
1958
|
-
height:
|
|
1957
|
+
top: S.top,
|
|
1958
|
+
left: S.left,
|
|
1959
|
+
width: S.width,
|
|
1960
|
+
height: S.height
|
|
1959
1961
|
}
|
|
1960
1962
|
});
|
|
1961
1963
|
}), r(R);
|
|
@@ -1980,7 +1982,7 @@ function sn({
|
|
|
1980
1982
|
!d && o.map((g) => /* @__PURE__ */ i.jsx(zt, { rect: g.rect }, g.id)),
|
|
1981
1983
|
d && s.map((g) => /* @__PURE__ */ i.jsx(Wt, { rect: g.rect, badgeNumber: g.badgeNumber }, g.id))
|
|
1982
1984
|
] });
|
|
1983
|
-
return U(p,
|
|
1985
|
+
return U(p, Lt());
|
|
1984
1986
|
}
|
|
1985
1987
|
export {
|
|
1986
1988
|
dt as CommandPalette,
|
|
@@ -1992,7 +1994,7 @@ export {
|
|
|
1992
1994
|
ht as InspectorSidebar,
|
|
1993
1995
|
qt as UILint,
|
|
1994
1996
|
Qt as buildEditorUrl,
|
|
1995
|
-
|
|
1997
|
+
wt as cleanupDataAttributes,
|
|
1996
1998
|
Ct as cleanupDataElements,
|
|
1997
1999
|
tn as clearSourceCache,
|
|
1998
2000
|
hn as createEmptyStyleGuide,
|
|
@@ -2020,7 +2022,7 @@ export {
|
|
|
2020
2022
|
on as prefetchSources,
|
|
2021
2023
|
fn as scanDOM,
|
|
2022
2024
|
Vt as scanDOMForSources,
|
|
2023
|
-
|
|
2025
|
+
yn as serializeStyles,
|
|
2024
2026
|
it as severityFromNumber,
|
|
2025
2027
|
ie as severityToColor,
|
|
2026
2028
|
Zt as updateElementRects,
|