uilint-react 0.2.51 → 0.2.52
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/components/ui-lint/heatmap-colors.d.ts +0 -10
- package/dist/components/ui-lint/heatmap-colors.d.ts.map +1 -1
- package/dist/core/plugin-system/index.d.ts +1 -1
- package/dist/core/plugin-system/index.d.ts.map +1 -1
- package/dist/core/plugin-system/loader.d.ts +5 -1
- package/dist/core/plugin-system/loader.d.ts.map +1 -1
- package/dist/core/plugin-system/registry.d.ts.map +1 -1
- package/dist/core/plugin-system/types.d.ts +5 -2
- package/dist/core/plugin-system/types.d.ts.map +1 -1
- package/dist/core/services/websocket.d.ts.map +1 -1
- package/dist/core/store/composed-store.d.ts.map +1 -1
- package/dist/devtools.js +107 -107
- package/dist/devtools.js.map +1 -1
- package/dist/index.js +1508 -981
- package/dist/index.js.map +1 -1
- package/dist/plugins/eslint/commands.d.ts.map +1 -1
- package/dist/plugins/eslint/index.d.ts.map +1 -1
- package/dist/plugins/eslint/slice.d.ts +11 -9
- package/dist/plugins/eslint/slice.d.ts.map +1 -1
- package/dist/plugins/eslint/types.d.ts +0 -4
- package/dist/plugins/eslint/types.d.ts.map +1 -1
- package/dist/plugins/vision/index.d.ts.map +1 -1
- package/dist/ui/components/CommandPalette/CommandPalette.d.ts.map +1 -1
- package/dist/ui/icons.d.ts +1 -19
- package/dist/ui/icons.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/components/Highlighter.d.ts +0 -6
- package/dist/components/Highlighter.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,338 +1,338 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { createPortal as
|
|
3
|
-
import { i as
|
|
4
|
-
import { createEmptyStyleGuide as
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
function
|
|
8
|
-
if (
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
function n(o, r,
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
|
|
15
|
-
for (var
|
|
16
|
-
|
|
17
|
-
} else
|
|
18
|
-
return r =
|
|
19
|
-
$$typeof:
|
|
1
|
+
import D, { forwardRef as Ie, createElement as oe, useState as T, useRef as J, useCallback as E, useEffect as z, useMemo as _ } from "react";
|
|
2
|
+
import { createPortal as Y } from "react-dom";
|
|
3
|
+
import { i as Fn, a as Mn, b as Bn, s as Wn } from "./environment-DVxa60C6.js";
|
|
4
|
+
import { createEmptyStyleGuide as Hn, createStyleSummary as Yn, extractStylesFromDOM as qn, generateStyleGuideFromStyles as Gn, mergeStyleGuides as Kn, parseStyleGuide as Vn, serializeStyles as Jn } from "uilint-core";
|
|
5
|
+
var G = { exports: {} }, M = {};
|
|
6
|
+
var he;
|
|
7
|
+
function He() {
|
|
8
|
+
if (he) return M;
|
|
9
|
+
he = 1;
|
|
10
|
+
var t = /* @__PURE__ */ Symbol.for("react.transitional.element"), e = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
11
|
+
function n(o, r, i) {
|
|
12
|
+
var l = null;
|
|
13
|
+
if (i !== void 0 && (l = "" + i), r.key !== void 0 && (l = "" + r.key), "key" in r) {
|
|
14
|
+
i = {};
|
|
15
|
+
for (var c in r)
|
|
16
|
+
c !== "key" && (i[c] = r[c]);
|
|
17
|
+
} else i = r;
|
|
18
|
+
return r = i.ref, {
|
|
19
|
+
$$typeof: t,
|
|
20
20
|
type: o,
|
|
21
|
-
key:
|
|
21
|
+
key: l,
|
|
22
22
|
ref: r !== void 0 ? r : null,
|
|
23
|
-
props:
|
|
23
|
+
props: i
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
return M.Fragment =
|
|
27
|
-
}
|
|
28
|
-
var
|
|
29
|
-
var
|
|
30
|
-
function
|
|
31
|
-
return
|
|
32
|
-
function
|
|
33
|
-
if (
|
|
34
|
-
if (typeof
|
|
35
|
-
return
|
|
36
|
-
if (typeof
|
|
37
|
-
switch (
|
|
38
|
-
case
|
|
26
|
+
return M.Fragment = e, M.jsx = n, M.jsxs = n, M;
|
|
27
|
+
}
|
|
28
|
+
var B = {};
|
|
29
|
+
var me;
|
|
30
|
+
function Ye() {
|
|
31
|
+
return me || (me = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
32
|
+
function t(a) {
|
|
33
|
+
if (a == null) return null;
|
|
34
|
+
if (typeof a == "function")
|
|
35
|
+
return a.$$typeof === Be ? null : a.displayName || a.name || null;
|
|
36
|
+
if (typeof a == "string") return a;
|
|
37
|
+
switch (a) {
|
|
38
|
+
case y:
|
|
39
39
|
return "Fragment";
|
|
40
|
-
case
|
|
40
|
+
case p:
|
|
41
41
|
return "Profiler";
|
|
42
|
-
case
|
|
42
|
+
case I:
|
|
43
43
|
return "StrictMode";
|
|
44
|
-
case
|
|
44
|
+
case $e:
|
|
45
45
|
return "Suspense";
|
|
46
|
-
case
|
|
46
|
+
case De:
|
|
47
47
|
return "SuspenseList";
|
|
48
|
-
case
|
|
48
|
+
case Me:
|
|
49
49
|
return "Activity";
|
|
50
50
|
}
|
|
51
|
-
if (typeof
|
|
52
|
-
switch (typeof
|
|
51
|
+
if (typeof a == "object")
|
|
52
|
+
switch (typeof a.tag == "number" && console.error(
|
|
53
53
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
54
|
-
),
|
|
55
|
-
case
|
|
54
|
+
), a.$$typeof) {
|
|
55
|
+
case R:
|
|
56
56
|
return "Portal";
|
|
57
|
-
case
|
|
58
|
-
return
|
|
59
|
-
case
|
|
60
|
-
return (
|
|
61
|
-
case
|
|
62
|
-
var
|
|
63
|
-
return
|
|
64
|
-
case
|
|
65
|
-
return
|
|
66
|
-
case
|
|
67
|
-
|
|
57
|
+
case A:
|
|
58
|
+
return a.displayName || "Context";
|
|
59
|
+
case m:
|
|
60
|
+
return (a._context.displayName || "Context") + ".Consumer";
|
|
61
|
+
case ze:
|
|
62
|
+
var g = a.render;
|
|
63
|
+
return a = a.displayName, a || (a = g.displayName || g.name || "", a = a !== "" ? "ForwardRef(" + a + ")" : "ForwardRef"), a;
|
|
64
|
+
case Fe:
|
|
65
|
+
return g = a.displayName || null, g !== null ? g : t(a.type) || "Memo";
|
|
66
|
+
case Z:
|
|
67
|
+
g = a._payload, a = a._init;
|
|
68
68
|
try {
|
|
69
|
-
return
|
|
69
|
+
return t(a(g));
|
|
70
70
|
} catch {
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
return null;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
return "" +
|
|
75
|
+
function e(a) {
|
|
76
|
+
return "" + a;
|
|
77
77
|
}
|
|
78
|
-
function n(
|
|
78
|
+
function n(a) {
|
|
79
79
|
try {
|
|
80
|
-
|
|
81
|
-
var
|
|
80
|
+
e(a);
|
|
81
|
+
var g = !1;
|
|
82
82
|
} catch {
|
|
83
|
-
|
|
83
|
+
g = !0;
|
|
84
84
|
}
|
|
85
|
-
if (
|
|
86
|
-
|
|
87
|
-
var
|
|
88
|
-
return
|
|
89
|
-
|
|
85
|
+
if (g) {
|
|
86
|
+
g = console;
|
|
87
|
+
var w = g.error, S = typeof Symbol == "function" && Symbol.toStringTag && a[Symbol.toStringTag] || a.constructor.name || "Object";
|
|
88
|
+
return w.call(
|
|
89
|
+
g,
|
|
90
90
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
91
|
-
|
|
92
|
-
),
|
|
91
|
+
S
|
|
92
|
+
), e(a);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
function o(
|
|
96
|
-
if (
|
|
97
|
-
if (typeof
|
|
95
|
+
function o(a) {
|
|
96
|
+
if (a === y) return "<>";
|
|
97
|
+
if (typeof a == "object" && a !== null && a.$$typeof === Z)
|
|
98
98
|
return "<...>";
|
|
99
99
|
try {
|
|
100
|
-
var
|
|
101
|
-
return
|
|
100
|
+
var g = t(a);
|
|
101
|
+
return g ? "<" + g + ">" : "<...>";
|
|
102
102
|
} catch {
|
|
103
103
|
return "<...>";
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
function r() {
|
|
107
|
-
var
|
|
108
|
-
return
|
|
107
|
+
var a = Q.A;
|
|
108
|
+
return a === null ? null : a.getOwner();
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function i() {
|
|
111
111
|
return Error("react-stack-top-frame");
|
|
112
112
|
}
|
|
113
|
-
function
|
|
114
|
-
if (
|
|
115
|
-
var
|
|
116
|
-
if (
|
|
113
|
+
function l(a) {
|
|
114
|
+
if (ce.call(a, "key")) {
|
|
115
|
+
var g = Object.getOwnPropertyDescriptor(a, "key").get;
|
|
116
|
+
if (g && g.isReactWarning) return !1;
|
|
117
117
|
}
|
|
118
|
-
return
|
|
118
|
+
return a.key !== void 0;
|
|
119
119
|
}
|
|
120
|
-
function a
|
|
121
|
-
function
|
|
122
|
-
|
|
120
|
+
function c(a, g) {
|
|
121
|
+
function w() {
|
|
122
|
+
ue || (ue = !0, console.error(
|
|
123
123
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
124
|
-
|
|
124
|
+
g
|
|
125
125
|
));
|
|
126
126
|
}
|
|
127
|
-
|
|
128
|
-
get:
|
|
127
|
+
w.isReactWarning = !0, Object.defineProperty(a, "key", {
|
|
128
|
+
get: w,
|
|
129
129
|
configurable: !0
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
|
-
function
|
|
133
|
-
var
|
|
134
|
-
return
|
|
132
|
+
function f() {
|
|
133
|
+
var a = t(this.type);
|
|
134
|
+
return de[a] || (de[a] = !0, console.error(
|
|
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
|
+
)), a = this.props.ref, a !== void 0 ? a : null;
|
|
137
137
|
}
|
|
138
|
-
function d(
|
|
139
|
-
var
|
|
140
|
-
return
|
|
141
|
-
$$typeof:
|
|
142
|
-
type:
|
|
143
|
-
key:
|
|
144
|
-
props:
|
|
145
|
-
_owner:
|
|
146
|
-
}, (
|
|
138
|
+
function d(a, g, w, S, q, te) {
|
|
139
|
+
var C = w.ref;
|
|
140
|
+
return a = {
|
|
141
|
+
$$typeof: k,
|
|
142
|
+
type: a,
|
|
143
|
+
key: g,
|
|
144
|
+
props: w,
|
|
145
|
+
_owner: S
|
|
146
|
+
}, (C !== void 0 ? C : null) !== null ? Object.defineProperty(a, "ref", {
|
|
147
147
|
enumerable: !1,
|
|
148
|
-
get:
|
|
149
|
-
}) : Object.defineProperty(
|
|
148
|
+
get: f
|
|
149
|
+
}) : Object.defineProperty(a, "ref", { enumerable: !1, value: null }), a._store = {}, Object.defineProperty(a._store, "validated", {
|
|
150
150
|
configurable: !1,
|
|
151
151
|
enumerable: !1,
|
|
152
152
|
writable: !0,
|
|
153
153
|
value: 0
|
|
154
|
-
}), Object.defineProperty(
|
|
154
|
+
}), Object.defineProperty(a, "_debugInfo", {
|
|
155
155
|
configurable: !1,
|
|
156
156
|
enumerable: !1,
|
|
157
157
|
writable: !0,
|
|
158
158
|
value: null
|
|
159
|
-
}), Object.defineProperty(
|
|
159
|
+
}), Object.defineProperty(a, "_debugStack", {
|
|
160
160
|
configurable: !1,
|
|
161
161
|
enumerable: !1,
|
|
162
162
|
writable: !0,
|
|
163
|
-
value:
|
|
164
|
-
}), Object.defineProperty(
|
|
163
|
+
value: q
|
|
164
|
+
}), Object.defineProperty(a, "_debugTask", {
|
|
165
165
|
configurable: !1,
|
|
166
166
|
enumerable: !1,
|
|
167
167
|
writable: !0,
|
|
168
|
-
value:
|
|
169
|
-
}), Object.freeze && (Object.freeze(
|
|
168
|
+
value: te
|
|
169
|
+
}), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
var
|
|
173
|
-
if (
|
|
174
|
-
if (
|
|
175
|
-
if (
|
|
176
|
-
for (
|
|
177
|
-
|
|
178
|
-
Object.freeze && Object.freeze(
|
|
171
|
+
function u(a, g, w, S, q, te) {
|
|
172
|
+
var C = g.children;
|
|
173
|
+
if (C !== void 0)
|
|
174
|
+
if (S)
|
|
175
|
+
if (We(C)) {
|
|
176
|
+
for (S = 0; S < C.length; S++)
|
|
177
|
+
h(C[S]);
|
|
178
|
+
Object.freeze && Object.freeze(C);
|
|
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
|
|
184
|
-
if (
|
|
185
|
-
|
|
186
|
-
var
|
|
187
|
-
return
|
|
183
|
+
else h(C);
|
|
184
|
+
if (ce.call(g, "key")) {
|
|
185
|
+
C = t(a);
|
|
186
|
+
var $ = Object.keys(g).filter(function(Ue) {
|
|
187
|
+
return Ue !== "key";
|
|
188
188
|
});
|
|
189
|
-
|
|
189
|
+
S = 0 < $.length ? "{key: someKey, " + $.join(": ..., ") + ": ...}" : "{key: someKey}", ge[C + S] || ($ = 0 < $.length ? "{" + $.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
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
),
|
|
196
|
+
S,
|
|
197
|
+
C,
|
|
198
|
+
$,
|
|
199
|
+
C
|
|
200
|
+
), ge[C + S] = !0);
|
|
201
201
|
}
|
|
202
|
-
if (
|
|
203
|
-
|
|
204
|
-
for (var
|
|
205
|
-
|
|
206
|
-
} else
|
|
207
|
-
return
|
|
208
|
-
|
|
209
|
-
typeof
|
|
202
|
+
if (C = null, w !== void 0 && (n(w), C = "" + w), l(g) && (n(g.key), C = "" + g.key), "key" in g) {
|
|
203
|
+
w = {};
|
|
204
|
+
for (var ne in g)
|
|
205
|
+
ne !== "key" && (w[ne] = g[ne]);
|
|
206
|
+
} else w = g;
|
|
207
|
+
return C && c(
|
|
208
|
+
w,
|
|
209
|
+
typeof a == "function" ? a.displayName || a.name || "Unknown" : a
|
|
210
210
|
), d(
|
|
211
|
-
|
|
211
|
+
a,
|
|
212
|
+
C,
|
|
212
213
|
w,
|
|
213
|
-
v,
|
|
214
214
|
r(),
|
|
215
|
-
|
|
216
|
-
|
|
215
|
+
q,
|
|
216
|
+
te
|
|
217
217
|
);
|
|
218
218
|
}
|
|
219
|
-
function
|
|
220
|
-
|
|
219
|
+
function h(a) {
|
|
220
|
+
x(a) ? a._store && (a._store.validated = 1) : typeof a == "object" && a !== null && a.$$typeof === Z && (a._payload.status === "fulfilled" ? x(a._payload.value) && a._payload.value._store && (a._payload.value._store.validated = 1) : a._store && (a._store.validated = 1));
|
|
221
221
|
}
|
|
222
|
-
function
|
|
223
|
-
return typeof
|
|
222
|
+
function x(a) {
|
|
223
|
+
return typeof a == "object" && a !== null && a.$$typeof === k;
|
|
224
224
|
}
|
|
225
|
-
var
|
|
225
|
+
var b = D, k = /* @__PURE__ */ Symbol.for("react.transitional.element"), R = /* @__PURE__ */ Symbol.for("react.portal"), y = /* @__PURE__ */ Symbol.for("react.fragment"), I = /* @__PURE__ */ Symbol.for("react.strict_mode"), p = /* @__PURE__ */ Symbol.for("react.profiler"), m = /* @__PURE__ */ Symbol.for("react.consumer"), A = /* @__PURE__ */ Symbol.for("react.context"), ze = /* @__PURE__ */ Symbol.for("react.forward_ref"), $e = /* @__PURE__ */ Symbol.for("react.suspense"), De = /* @__PURE__ */ Symbol.for("react.suspense_list"), Fe = /* @__PURE__ */ Symbol.for("react.memo"), Z = /* @__PURE__ */ Symbol.for("react.lazy"), Me = /* @__PURE__ */ Symbol.for("react.activity"), Be = /* @__PURE__ */ Symbol.for("react.client.reference"), Q = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ce = Object.prototype.hasOwnProperty, We = Array.isArray, ee = console.createTask ? console.createTask : function() {
|
|
226
226
|
return null;
|
|
227
227
|
};
|
|
228
|
-
|
|
229
|
-
react_stack_bottom_frame: function(
|
|
230
|
-
return
|
|
228
|
+
b = {
|
|
229
|
+
react_stack_bottom_frame: function(a) {
|
|
230
|
+
return a();
|
|
231
231
|
}
|
|
232
232
|
};
|
|
233
|
-
var
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
)(),
|
|
237
|
-
|
|
238
|
-
var
|
|
239
|
-
return
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
233
|
+
var ue, de = {}, fe = b.react_stack_bottom_frame.bind(
|
|
234
|
+
b,
|
|
235
|
+
i
|
|
236
|
+
)(), pe = ee(o(i)), ge = {};
|
|
237
|
+
B.Fragment = y, B.jsx = function(a, g, w) {
|
|
238
|
+
var S = 1e4 > Q.recentlyCreatedOwnerStacks++;
|
|
239
|
+
return u(
|
|
240
|
+
a,
|
|
241
|
+
g,
|
|
242
|
+
w,
|
|
243
243
|
!1,
|
|
244
|
-
|
|
245
|
-
|
|
244
|
+
S ? Error("react-stack-top-frame") : fe,
|
|
245
|
+
S ? ee(o(a)) : pe
|
|
246
246
|
);
|
|
247
|
-
},
|
|
248
|
-
var
|
|
249
|
-
return
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
247
|
+
}, B.jsxs = function(a, g, w) {
|
|
248
|
+
var S = 1e4 > Q.recentlyCreatedOwnerStacks++;
|
|
249
|
+
return u(
|
|
250
|
+
a,
|
|
251
|
+
g,
|
|
252
|
+
w,
|
|
253
253
|
!0,
|
|
254
|
-
|
|
255
|
-
|
|
254
|
+
S ? Error("react-stack-top-frame") : fe,
|
|
255
|
+
S ? ee(o(a)) : pe
|
|
256
256
|
);
|
|
257
257
|
};
|
|
258
|
-
})()),
|
|
258
|
+
})()), B;
|
|
259
259
|
}
|
|
260
|
-
var
|
|
261
|
-
function
|
|
262
|
-
return
|
|
260
|
+
var be;
|
|
261
|
+
function qe() {
|
|
262
|
+
return be || (be = 1, process.env.NODE_ENV === "production" ? G.exports = He() : G.exports = Ye()), G.exports;
|
|
263
263
|
}
|
|
264
|
-
var
|
|
265
|
-
const
|
|
264
|
+
var s = qe();
|
|
265
|
+
const j = {
|
|
266
266
|
floatingIconPosition: "uilint:floatingIconPosition",
|
|
267
267
|
inspectorDocked: "uilint:inspectorDocked",
|
|
268
268
|
inspectorWidth: "uilint:inspectorWidth",
|
|
269
269
|
inspectorFloatingPosition: "uilint:inspectorFloatingPosition",
|
|
270
270
|
inspectorFloatingSize: "uilint:inspectorFloatingSize"
|
|
271
271
|
};
|
|
272
|
-
function
|
|
272
|
+
function Ee() {
|
|
273
273
|
return typeof window < "u" && typeof localStorage < "u";
|
|
274
274
|
}
|
|
275
|
-
function
|
|
276
|
-
if (!
|
|
275
|
+
function H(t, e) {
|
|
276
|
+
if (!Ee()) return e;
|
|
277
277
|
try {
|
|
278
|
-
const n = localStorage.getItem(
|
|
279
|
-
return n === null ?
|
|
278
|
+
const n = localStorage.getItem(t);
|
|
279
|
+
return n === null ? e : JSON.parse(n);
|
|
280
280
|
} catch (n) {
|
|
281
|
-
return console.warn(`[UILint] Failed to load ${
|
|
281
|
+
return console.warn(`[UILint] Failed to load ${t} from localStorage:`, n), e;
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
|
-
function
|
|
285
|
-
if (
|
|
284
|
+
function W(t, e) {
|
|
285
|
+
if (Ee())
|
|
286
286
|
try {
|
|
287
|
-
localStorage.setItem(
|
|
287
|
+
localStorage.setItem(t, JSON.stringify(e));
|
|
288
288
|
} catch (n) {
|
|
289
|
-
console.warn(`[UILint] Failed to save ${
|
|
289
|
+
console.warn(`[UILint] Failed to save ${t} to localStorage:`, n);
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
|
-
const
|
|
292
|
+
const ye = {
|
|
293
293
|
open: !1,
|
|
294
294
|
query: "",
|
|
295
295
|
selectedIndex: 0,
|
|
296
296
|
filters: []
|
|
297
|
-
},
|
|
298
|
-
function
|
|
297
|
+
}, Ge = 400;
|
|
298
|
+
function Ke() {
|
|
299
299
|
return {
|
|
300
300
|
open: !1,
|
|
301
301
|
panelId: null,
|
|
302
302
|
data: null,
|
|
303
|
-
docked:
|
|
304
|
-
width:
|
|
305
|
-
floatingPosition:
|
|
306
|
-
floatingSize:
|
|
303
|
+
docked: H(j.inspectorDocked, !0),
|
|
304
|
+
width: H(j.inspectorWidth, Ge),
|
|
305
|
+
floatingPosition: H(j.inspectorFloatingPosition, null),
|
|
306
|
+
floatingSize: H(j.inspectorFloatingSize, null)
|
|
307
307
|
};
|
|
308
308
|
}
|
|
309
|
-
const
|
|
309
|
+
const Ve = (t) => (e, n) => ({
|
|
310
310
|
// ============ Floating Icon ============
|
|
311
|
-
floatingIconPosition:
|
|
312
|
-
|
|
311
|
+
floatingIconPosition: H(
|
|
312
|
+
j.floatingIconPosition,
|
|
313
313
|
null
|
|
314
314
|
),
|
|
315
315
|
setFloatingIconPosition: (o) => {
|
|
316
|
-
|
|
316
|
+
W(j.floatingIconPosition, o), e({ floatingIconPosition: o });
|
|
317
317
|
},
|
|
318
318
|
// ============ Alt Key Mode ============
|
|
319
319
|
altKeyHeld: !1,
|
|
320
320
|
setAltKeyHeld: (o) => {
|
|
321
|
-
|
|
321
|
+
e({ altKeyHeld: o });
|
|
322
322
|
},
|
|
323
323
|
// ============ Selection ============
|
|
324
324
|
selectedElementId: null,
|
|
325
325
|
hoveredElementId: null,
|
|
326
326
|
setSelectedElementId: (o) => {
|
|
327
|
-
|
|
327
|
+
e({ selectedElementId: o });
|
|
328
328
|
},
|
|
329
329
|
setHoveredElementId: (o) => {
|
|
330
|
-
|
|
330
|
+
e({ hoveredElementId: o });
|
|
331
331
|
},
|
|
332
332
|
// ============ Command Palette ============
|
|
333
|
-
commandPalette: { ...
|
|
333
|
+
commandPalette: { ...ye },
|
|
334
334
|
openCommandPalette: () => {
|
|
335
|
-
|
|
335
|
+
e({
|
|
336
336
|
commandPalette: {
|
|
337
337
|
...n().commandPalette,
|
|
338
338
|
open: !0,
|
|
@@ -342,15 +342,15 @@ const Ue = (e) => (t, n) => ({
|
|
|
342
342
|
});
|
|
343
343
|
},
|
|
344
344
|
closeCommandPalette: () => {
|
|
345
|
-
|
|
345
|
+
e({
|
|
346
346
|
commandPalette: {
|
|
347
|
-
...
|
|
347
|
+
...ye,
|
|
348
348
|
open: !1
|
|
349
349
|
}
|
|
350
350
|
});
|
|
351
351
|
},
|
|
352
352
|
setCommandPaletteQuery: (o) => {
|
|
353
|
-
|
|
353
|
+
e({
|
|
354
354
|
commandPalette: {
|
|
355
355
|
...n().commandPalette,
|
|
356
356
|
query: o,
|
|
@@ -359,7 +359,7 @@ const Ue = (e) => (t, n) => ({
|
|
|
359
359
|
});
|
|
360
360
|
},
|
|
361
361
|
setCommandPaletteSelectedIndex: (o) => {
|
|
362
|
-
|
|
362
|
+
e({
|
|
363
363
|
commandPalette: {
|
|
364
364
|
...n().commandPalette,
|
|
365
365
|
selectedIndex: o
|
|
@@ -368,7 +368,7 @@ const Ue = (e) => (t, n) => ({
|
|
|
368
368
|
},
|
|
369
369
|
addFilter: (o) => {
|
|
370
370
|
const r = n().commandPalette;
|
|
371
|
-
|
|
371
|
+
e({
|
|
372
372
|
commandPalette: {
|
|
373
373
|
...r,
|
|
374
374
|
filters: [...r.filters, o],
|
|
@@ -378,16 +378,16 @@ const Ue = (e) => (t, n) => ({
|
|
|
378
378
|
},
|
|
379
379
|
removeFilter: (o) => {
|
|
380
380
|
const r = n().commandPalette;
|
|
381
|
-
|
|
381
|
+
e({
|
|
382
382
|
commandPalette: {
|
|
383
383
|
...r,
|
|
384
|
-
filters: r.filters.filter((
|
|
384
|
+
filters: r.filters.filter((i, l) => l !== o),
|
|
385
385
|
selectedIndex: 0
|
|
386
386
|
}
|
|
387
387
|
});
|
|
388
388
|
},
|
|
389
389
|
clearFilters: () => {
|
|
390
|
-
|
|
390
|
+
e({
|
|
391
391
|
commandPalette: {
|
|
392
392
|
...n().commandPalette,
|
|
393
393
|
filters: [],
|
|
@@ -396,9 +396,9 @@ const Ue = (e) => (t, n) => ({
|
|
|
396
396
|
});
|
|
397
397
|
},
|
|
398
398
|
// ============ Inspector ============
|
|
399
|
-
inspector:
|
|
399
|
+
inspector: Ke(),
|
|
400
400
|
openInspector: (o, r) => {
|
|
401
|
-
|
|
401
|
+
e({
|
|
402
402
|
inspector: {
|
|
403
403
|
...n().inspector,
|
|
404
404
|
open: !0,
|
|
@@ -408,7 +408,7 @@ const Ue = (e) => (t, n) => ({
|
|
|
408
408
|
});
|
|
409
409
|
},
|
|
410
410
|
closeInspector: () => {
|
|
411
|
-
|
|
411
|
+
e({
|
|
412
412
|
inspector: {
|
|
413
413
|
...n().inspector,
|
|
414
414
|
open: !1,
|
|
@@ -419,7 +419,7 @@ const Ue = (e) => (t, n) => ({
|
|
|
419
419
|
},
|
|
420
420
|
toggleInspectorDocked: () => {
|
|
421
421
|
const o = n().inspector, r = !o.docked;
|
|
422
|
-
|
|
422
|
+
W(j.inspectorDocked, r), e({
|
|
423
423
|
inspector: {
|
|
424
424
|
...o,
|
|
425
425
|
docked: r
|
|
@@ -427,7 +427,7 @@ const Ue = (e) => (t, n) => ({
|
|
|
427
427
|
});
|
|
428
428
|
},
|
|
429
429
|
setInspectorWidth: (o) => {
|
|
430
|
-
|
|
430
|
+
W(j.inspectorWidth, o), e({
|
|
431
431
|
inspector: {
|
|
432
432
|
...n().inspector,
|
|
433
433
|
width: o
|
|
@@ -435,7 +435,7 @@ const Ue = (e) => (t, n) => ({
|
|
|
435
435
|
});
|
|
436
436
|
},
|
|
437
437
|
setInspectorFloatingPosition: (o) => {
|
|
438
|
-
|
|
438
|
+
W(j.inspectorFloatingPosition, o), e({
|
|
439
439
|
inspector: {
|
|
440
440
|
...n().inspector,
|
|
441
441
|
floatingPosition: o
|
|
@@ -443,7 +443,7 @@ const Ue = (e) => (t, n) => ({
|
|
|
443
443
|
});
|
|
444
444
|
},
|
|
445
445
|
setInspectorFloatingSize: (o) => {
|
|
446
|
-
|
|
446
|
+
W(j.inspectorFloatingSize, o), e({
|
|
447
447
|
inspector: {
|
|
448
448
|
...n().inspector,
|
|
449
449
|
floatingSize: o
|
|
@@ -451,33 +451,278 @@ const Ue = (e) => (t, n) => ({
|
|
|
451
451
|
});
|
|
452
452
|
},
|
|
453
453
|
// ============ Connection (delegated from websocket service) ============
|
|
454
|
-
wsConnected:
|
|
455
|
-
wsUrl:
|
|
456
|
-
}),
|
|
457
|
-
let
|
|
458
|
-
const n = /* @__PURE__ */ new Set(), o = (d,
|
|
459
|
-
const
|
|
460
|
-
if (!Object.is(
|
|
461
|
-
const
|
|
462
|
-
|
|
454
|
+
wsConnected: t.websocket.isConnected,
|
|
455
|
+
wsUrl: t.websocket.url
|
|
456
|
+
}), xe = (t) => {
|
|
457
|
+
let e;
|
|
458
|
+
const n = /* @__PURE__ */ new Set(), o = (d, u) => {
|
|
459
|
+
const h = typeof d == "function" ? d(e) : d;
|
|
460
|
+
if (!Object.is(h, e)) {
|
|
461
|
+
const x = e;
|
|
462
|
+
e = u ?? (typeof h != "object" || h === null) ? h : Object.assign({}, e, h), n.forEach((b) => b(e, x));
|
|
463
463
|
}
|
|
464
|
-
}, r = () =>
|
|
465
|
-
return
|
|
466
|
-
},
|
|
467
|
-
function
|
|
468
|
-
const n =
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
464
|
+
}, r = () => e, c = { setState: o, getState: r, getInitialState: () => f, subscribe: (d) => (n.add(d), () => n.delete(d)) }, f = e = t(o, r, c);
|
|
465
|
+
return c;
|
|
466
|
+
}, Je = ((t) => t ? xe(t) : xe), Xe = (t) => t;
|
|
467
|
+
function Ze(t, e = Xe) {
|
|
468
|
+
const n = D.useSyncExternalStore(
|
|
469
|
+
t.subscribe,
|
|
470
|
+
D.useCallback(() => e(t.getState()), [t, e]),
|
|
471
|
+
D.useCallback(() => e(t.getInitialState()), [t, e])
|
|
472
472
|
);
|
|
473
|
-
return
|
|
474
|
-
}
|
|
475
|
-
const
|
|
476
|
-
const
|
|
477
|
-
return Object.assign(n,
|
|
478
|
-
},
|
|
479
|
-
|
|
480
|
-
const
|
|
473
|
+
return D.useDebugValue(n), n;
|
|
474
|
+
}
|
|
475
|
+
const ve = (t) => {
|
|
476
|
+
const e = Je(t), n = (o) => Ze(e, o);
|
|
477
|
+
return Object.assign(n, e), n;
|
|
478
|
+
}, Qe = ((t) => t ? ve(t) : ve);
|
|
479
|
+
function we(t) {
|
|
480
|
+
const e = /* @__PURE__ */ new Map();
|
|
481
|
+
for (const l of t)
|
|
482
|
+
e.set(l.id, l);
|
|
483
|
+
const n = [], o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
484
|
+
function i(l) {
|
|
485
|
+
const c = l.id;
|
|
486
|
+
if (o.has(c))
|
|
487
|
+
return;
|
|
488
|
+
if (r.has(c))
|
|
489
|
+
throw new Error(
|
|
490
|
+
`[PluginRegistry] Circular dependency detected involving plugin: ${c}`
|
|
491
|
+
);
|
|
492
|
+
r.add(c);
|
|
493
|
+
const f = l.dependencies || [];
|
|
494
|
+
for (const d of f) {
|
|
495
|
+
const u = e.get(d);
|
|
496
|
+
u && i(u);
|
|
497
|
+
}
|
|
498
|
+
r.delete(c), o.add(c), n.push(l);
|
|
499
|
+
}
|
|
500
|
+
for (const l of t)
|
|
501
|
+
i(l);
|
|
502
|
+
return n;
|
|
503
|
+
}
|
|
504
|
+
class et {
|
|
505
|
+
plugins = /* @__PURE__ */ new Map();
|
|
506
|
+
services = null;
|
|
507
|
+
/**
|
|
508
|
+
* Register a plugin with the registry.
|
|
509
|
+
*
|
|
510
|
+
* @param plugin - The plugin to register
|
|
511
|
+
* @throws Warning if plugin with same ID already registered
|
|
512
|
+
* @throws Warning if plugin dependencies are not registered
|
|
513
|
+
*/
|
|
514
|
+
register(e) {
|
|
515
|
+
if (console.log(`[PluginRegistry] Registering plugin: ${e.id}`), this.plugins.has(e.id)) {
|
|
516
|
+
console.warn(
|
|
517
|
+
`[PluginRegistry] Plugin "${e.id}" is already registered. Skipping duplicate registration.`
|
|
518
|
+
);
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
const n = e.dependencies || [], o = [];
|
|
522
|
+
for (const r of n)
|
|
523
|
+
this.plugins.has(r) || o.push(r);
|
|
524
|
+
o.length > 0 && console.warn(
|
|
525
|
+
`[PluginRegistry] Plugin "${e.id}" has unregistered dependencies: ${o.join(", ")}. These plugins should be registered first for proper initialization order.`
|
|
526
|
+
), this.plugins.set(e.id, {
|
|
527
|
+
plugin: e,
|
|
528
|
+
initialized: !1
|
|
529
|
+
}), console.log(
|
|
530
|
+
`[PluginRegistry] Plugin "${e.id}" registered successfully`
|
|
531
|
+
);
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* Initialize all registered plugins in dependency order.
|
|
535
|
+
*
|
|
536
|
+
* @param services - Plugin services to pass to each plugin's initialize method
|
|
537
|
+
*/
|
|
538
|
+
async initializeAll(e) {
|
|
539
|
+
console.log("[PluginRegistry] Initializing all plugins..."), this.services = e;
|
|
540
|
+
const n = Array.from(this.plugins.values()).map((r) => r.plugin), o = we(n);
|
|
541
|
+
console.log(
|
|
542
|
+
`[PluginRegistry] Initialization order: ${o.map((r) => r.id).join(" -> ")}`
|
|
543
|
+
);
|
|
544
|
+
for (const r of o) {
|
|
545
|
+
const i = this.plugins.get(r.id);
|
|
546
|
+
if (i) {
|
|
547
|
+
if (i.initialized) {
|
|
548
|
+
console.log(
|
|
549
|
+
`[PluginRegistry] Plugin "${r.id}" already initialized, skipping`
|
|
550
|
+
);
|
|
551
|
+
continue;
|
|
552
|
+
}
|
|
553
|
+
try {
|
|
554
|
+
console.log(`[PluginRegistry] Initializing plugin: ${r.id}`), r.initialize && await r.initialize(e), i.initialized = !0, console.log(
|
|
555
|
+
`[PluginRegistry] Plugin "${r.id}" initialized successfully`
|
|
556
|
+
);
|
|
557
|
+
} catch (l) {
|
|
558
|
+
console.error(
|
|
559
|
+
`[PluginRegistry] Failed to initialize plugin "${r.id}":`,
|
|
560
|
+
l
|
|
561
|
+
);
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
console.log("[PluginRegistry] All plugins initialized");
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* Get all registered plugins.
|
|
569
|
+
*
|
|
570
|
+
* @returns Array of all registered plugins
|
|
571
|
+
*/
|
|
572
|
+
getPlugins() {
|
|
573
|
+
return Array.from(this.plugins.values()).map((e) => e.plugin);
|
|
574
|
+
}
|
|
575
|
+
/**
|
|
576
|
+
* Get a specific plugin by ID.
|
|
577
|
+
*
|
|
578
|
+
* @param id - The plugin ID to look up
|
|
579
|
+
* @returns The plugin if found, undefined otherwise
|
|
580
|
+
*/
|
|
581
|
+
getPlugin(e) {
|
|
582
|
+
return this.plugins.get(e)?.plugin;
|
|
583
|
+
}
|
|
584
|
+
/**
|
|
585
|
+
* Aggregate all commands from all registered plugins.
|
|
586
|
+
*
|
|
587
|
+
* @returns Array of all commands from all plugins
|
|
588
|
+
*/
|
|
589
|
+
getAllCommands() {
|
|
590
|
+
const e = [];
|
|
591
|
+
for (const { plugin: n } of this.plugins.values())
|
|
592
|
+
n.commands && e.push(...n.commands);
|
|
593
|
+
return e;
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* Aggregate all analyzers from all registered plugins.
|
|
597
|
+
*
|
|
598
|
+
* @returns Array of all analyzers from all plugins
|
|
599
|
+
*/
|
|
600
|
+
getAllAnalyzers() {
|
|
601
|
+
const e = [];
|
|
602
|
+
for (const { plugin: n } of this.plugins.values())
|
|
603
|
+
n.analyzers && e.push(...n.analyzers);
|
|
604
|
+
return e;
|
|
605
|
+
}
|
|
606
|
+
/**
|
|
607
|
+
* Aggregate all inspector panels from all registered plugins.
|
|
608
|
+
* Panels are sorted by priority (higher priority first).
|
|
609
|
+
*
|
|
610
|
+
* @returns Array of all inspector panels, sorted by priority
|
|
611
|
+
*/
|
|
612
|
+
getAllInspectorPanels() {
|
|
613
|
+
const e = [];
|
|
614
|
+
for (const { plugin: n } of this.plugins.values())
|
|
615
|
+
n.inspectorPanels && e.push(...n.inspectorPanels);
|
|
616
|
+
return e.sort((n, o) => (o.priority ?? 0) - (n.priority ?? 0));
|
|
617
|
+
}
|
|
618
|
+
/**
|
|
619
|
+
* Resolve which plugin handles a specific rule.
|
|
620
|
+
*
|
|
621
|
+
* First checks for plugins that explicitly claim the rule via ruleContributions,
|
|
622
|
+
* then falls back to matching by rule category.
|
|
623
|
+
*
|
|
624
|
+
* @param ruleId - The rule ID to look up
|
|
625
|
+
* @param ruleMeta - The rule metadata
|
|
626
|
+
* @returns The plugin that handles this rule, or a default core plugin
|
|
627
|
+
*/
|
|
628
|
+
getPluginForRule(e, n) {
|
|
629
|
+
for (const { plugin: i } of this.plugins.values())
|
|
630
|
+
if (i.ruleContributions && i.ruleContributions.find(
|
|
631
|
+
(c) => c.ruleId === e
|
|
632
|
+
))
|
|
633
|
+
return i;
|
|
634
|
+
for (const { plugin: i } of this.plugins.values())
|
|
635
|
+
if (e.startsWith(`${i.id}/`) || n.category && i.ruleCategories && i.ruleCategories.includes(n.category))
|
|
636
|
+
return i;
|
|
637
|
+
const o = this.plugins.get("core")?.plugin;
|
|
638
|
+
if (o)
|
|
639
|
+
return o;
|
|
640
|
+
const r = this.plugins.values().next().value;
|
|
641
|
+
return r ? r.plugin : {
|
|
642
|
+
id: "default",
|
|
643
|
+
name: "Default",
|
|
644
|
+
version: "1.0.0"
|
|
645
|
+
};
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* Get custom UI contribution for a specific rule.
|
|
649
|
+
*
|
|
650
|
+
* @param ruleId - The rule ID to look up
|
|
651
|
+
* @returns The rule UI contribution if found, undefined otherwise
|
|
652
|
+
*/
|
|
653
|
+
getRuleContribution(e) {
|
|
654
|
+
for (const { plugin: n } of this.plugins.values())
|
|
655
|
+
if (n.ruleContributions) {
|
|
656
|
+
const o = n.ruleContributions.find(
|
|
657
|
+
(r) => r.ruleId === e
|
|
658
|
+
);
|
|
659
|
+
if (o)
|
|
660
|
+
return o;
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
/**
|
|
664
|
+
* Dispose all plugins and clean up resources.
|
|
665
|
+
* Calls dispose on each plugin in reverse initialization order.
|
|
666
|
+
*/
|
|
667
|
+
disposeAll() {
|
|
668
|
+
console.log("[PluginRegistry] Disposing all plugins...");
|
|
669
|
+
const e = Array.from(this.plugins.values()).map((o) => o.plugin), n = we(e).reverse();
|
|
670
|
+
for (const o of n) {
|
|
671
|
+
const r = this.plugins.get(o.id);
|
|
672
|
+
if (!(!r || !r.initialized))
|
|
673
|
+
try {
|
|
674
|
+
console.log(`[PluginRegistry] Disposing plugin: ${o.id}`), o.dispose && this.services && o.dispose(this.services), r.initialized = !1, console.log(
|
|
675
|
+
`[PluginRegistry] Plugin "${o.id}" disposed successfully`
|
|
676
|
+
);
|
|
677
|
+
} catch (i) {
|
|
678
|
+
console.error(
|
|
679
|
+
`[PluginRegistry] Failed to dispose plugin "${o.id}":`,
|
|
680
|
+
i
|
|
681
|
+
);
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
this.services = null, console.log("[PluginRegistry] All plugins disposed");
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
* Check if a plugin is registered.
|
|
688
|
+
*
|
|
689
|
+
* @param id - The plugin ID to check
|
|
690
|
+
* @returns true if the plugin is registered
|
|
691
|
+
*/
|
|
692
|
+
isRegistered(e) {
|
|
693
|
+
return this.plugins.has(e);
|
|
694
|
+
}
|
|
695
|
+
/**
|
|
696
|
+
* Check if a plugin is initialized.
|
|
697
|
+
*
|
|
698
|
+
* @param id - The plugin ID to check
|
|
699
|
+
* @returns true if the plugin is initialized, false otherwise
|
|
700
|
+
*/
|
|
701
|
+
isInitialized(e) {
|
|
702
|
+
return this.plugins.get(e)?.initialized ?? !1;
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* Get the current plugin services (available after initializeAll).
|
|
706
|
+
*
|
|
707
|
+
* @returns The plugin services, or null if not yet initialized
|
|
708
|
+
*/
|
|
709
|
+
getServices() {
|
|
710
|
+
return this.services;
|
|
711
|
+
}
|
|
712
|
+
/**
|
|
713
|
+
* Clear all registered plugins.
|
|
714
|
+
* Useful for testing or resetting the registry.
|
|
715
|
+
*/
|
|
716
|
+
clear() {
|
|
717
|
+
console.log("[PluginRegistry] Clearing all plugins"), this.disposeAll(), this.plugins.clear();
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
function tt() {
|
|
721
|
+
return new et();
|
|
722
|
+
}
|
|
723
|
+
const nt = tt();
|
|
724
|
+
let L = null, ke = null;
|
|
725
|
+
const ot = () => ({
|
|
481
726
|
isConnected: !1,
|
|
482
727
|
url: "ws://localhost:9234",
|
|
483
728
|
connect: () => {
|
|
@@ -493,7 +738,7 @@ const Ke = () => ({
|
|
|
493
738
|
}),
|
|
494
739
|
onConnectionChange: () => (console.warn("[ComposedStore] WebSocket onConnectionChange called but not implemented"), () => {
|
|
495
740
|
})
|
|
496
|
-
}),
|
|
741
|
+
}), rt = () => ({
|
|
497
742
|
start: () => {
|
|
498
743
|
console.warn("[ComposedStore] DOMObserver start called but not implemented");
|
|
499
744
|
},
|
|
@@ -505,215 +750,306 @@ const Ke = () => ({
|
|
|
505
750
|
onElementsRemoved: () => (console.warn("[ComposedStore] DOMObserver onElementsRemoved called but not implemented"), () => {
|
|
506
751
|
})
|
|
507
752
|
});
|
|
508
|
-
function
|
|
509
|
-
const
|
|
753
|
+
function it(t = {}) {
|
|
754
|
+
const e = t.websocket ?? ot(), n = t.domObserver ?? rt();
|
|
510
755
|
let o;
|
|
511
|
-
|
|
756
|
+
const r = Qe()((i, l) => (o = {
|
|
512
757
|
websocket: {
|
|
513
758
|
get isConnected() {
|
|
514
|
-
return
|
|
759
|
+
return e.isConnected;
|
|
515
760
|
},
|
|
516
761
|
get url() {
|
|
517
|
-
return
|
|
762
|
+
return e.url;
|
|
518
763
|
},
|
|
519
|
-
connect:
|
|
520
|
-
disconnect:
|
|
521
|
-
send:
|
|
522
|
-
on:
|
|
523
|
-
onConnectionChange:
|
|
764
|
+
connect: e.connect.bind(e),
|
|
765
|
+
disconnect: e.disconnect.bind(e),
|
|
766
|
+
send: e.send.bind(e),
|
|
767
|
+
on: e.on.bind(e),
|
|
768
|
+
onConnectionChange: e.onConnectionChange.bind(e)
|
|
769
|
+
},
|
|
770
|
+
domObserver: {
|
|
771
|
+
start: n.start.bind(n),
|
|
772
|
+
stop: n.stop.bind(n),
|
|
773
|
+
onElementsAdded: n.onElementsAdded.bind(n),
|
|
774
|
+
onElementsRemoved: n.onElementsRemoved.bind(n)
|
|
524
775
|
},
|
|
525
|
-
|
|
526
|
-
getState: () => c(),
|
|
776
|
+
getState: () => l(),
|
|
527
777
|
setState: (d) => {
|
|
528
|
-
|
|
778
|
+
i(d);
|
|
529
779
|
},
|
|
530
|
-
openInspector: (d,
|
|
531
|
-
const
|
|
532
|
-
|
|
780
|
+
openInspector: (d, u) => {
|
|
781
|
+
const h = l();
|
|
782
|
+
u.ruleId ? h.openInspector("rule", { ruleId: u.ruleId }) : u.elementId ? h.openInspector("element", { elementId: u.elementId }) : i({
|
|
533
783
|
inspector: {
|
|
534
|
-
...
|
|
784
|
+
...h.inspector,
|
|
535
785
|
open: !0,
|
|
536
786
|
panelId: d,
|
|
537
|
-
data:
|
|
787
|
+
data: u
|
|
538
788
|
}
|
|
539
789
|
});
|
|
540
790
|
},
|
|
541
791
|
closeCommandPalette: () => {
|
|
542
|
-
|
|
792
|
+
l().closeCommandPalette();
|
|
543
793
|
}
|
|
544
794
|
}, {
|
|
545
795
|
// Core slice state and actions
|
|
546
|
-
...
|
|
547
|
-
setState:
|
|
548
|
-
getState:
|
|
549
|
-
getInitialState: () =>
|
|
796
|
+
...Ve(o)(i, l, {
|
|
797
|
+
setState: i,
|
|
798
|
+
getState: l,
|
|
799
|
+
getInitialState: () => l(),
|
|
550
800
|
subscribe: () => () => {
|
|
551
801
|
}
|
|
552
802
|
}),
|
|
553
803
|
// Plugin slices namespace (empty initially)
|
|
554
804
|
plugins: {},
|
|
555
805
|
// Actions for managing plugin slices
|
|
556
|
-
registerPluginSlice: (d,
|
|
557
|
-
console.log(`[ComposedStore] Registering plugin slice: ${String(d)}`),
|
|
806
|
+
registerPluginSlice: (d, u) => {
|
|
807
|
+
console.log(`[ComposedStore] Registering plugin slice: ${String(d)}`), i((h) => ({
|
|
558
808
|
plugins: {
|
|
559
|
-
...
|
|
560
|
-
[d]:
|
|
809
|
+
...h.plugins,
|
|
810
|
+
[d]: u
|
|
561
811
|
}
|
|
562
812
|
}));
|
|
563
813
|
},
|
|
564
814
|
unregisterPluginSlice: (d) => {
|
|
565
|
-
console.log(`[ComposedStore] Unregistering plugin slice: ${String(d)}`),
|
|
566
|
-
const { [d]:
|
|
567
|
-
return { plugins:
|
|
815
|
+
console.log(`[ComposedStore] Unregistering plugin slice: ${String(d)}`), i((u) => {
|
|
816
|
+
const { [d]: h, ...x } = u.plugins;
|
|
817
|
+
return { plugins: x };
|
|
568
818
|
});
|
|
569
819
|
},
|
|
570
|
-
getPluginSlice: (d) =>
|
|
571
|
-
setPluginSlice: (d,
|
|
572
|
-
|
|
573
|
-
const
|
|
574
|
-
return
|
|
820
|
+
getPluginSlice: (d) => l().plugins[d],
|
|
821
|
+
setPluginSlice: (d, u) => {
|
|
822
|
+
i((h) => {
|
|
823
|
+
const x = h.plugins[d];
|
|
824
|
+
return x ? {
|
|
575
825
|
plugins: {
|
|
576
|
-
...
|
|
826
|
+
...h.plugins,
|
|
577
827
|
[d]: {
|
|
578
|
-
...
|
|
579
|
-
...
|
|
828
|
+
...x,
|
|
829
|
+
...u
|
|
580
830
|
}
|
|
581
831
|
}
|
|
582
832
|
} : (console.warn(
|
|
583
833
|
`[ComposedStore] Cannot update unregistered plugin slice: ${String(d)}`
|
|
584
|
-
),
|
|
834
|
+
), h);
|
|
585
835
|
});
|
|
586
836
|
}
|
|
587
|
-
}))
|
|
837
|
+
}));
|
|
838
|
+
return e.onConnectionChange((i) => {
|
|
839
|
+
r.setState({ wsConnected: i, wsUrl: e.url });
|
|
840
|
+
}), { store: r, services: o };
|
|
588
841
|
}
|
|
589
|
-
function
|
|
590
|
-
|
|
842
|
+
function st(t) {
|
|
843
|
+
if (L)
|
|
844
|
+
return L;
|
|
845
|
+
const e = it(t);
|
|
846
|
+
return L = e.store, ke = e.services, L;
|
|
591
847
|
}
|
|
592
|
-
function
|
|
593
|
-
return
|
|
848
|
+
function v(t) {
|
|
849
|
+
return L || st(), t ? L(t) : L();
|
|
594
850
|
}
|
|
595
|
-
|
|
851
|
+
function lt() {
|
|
852
|
+
return ke;
|
|
853
|
+
}
|
|
854
|
+
const at = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), ct = (t) => t.replace(
|
|
855
|
+
/^([A-Z])|[\s-_]+(\w)/g,
|
|
856
|
+
(e, n, o) => o ? o.toUpperCase() : n.toLowerCase()
|
|
857
|
+
), Se = (t) => {
|
|
858
|
+
const e = ct(t);
|
|
859
|
+
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
860
|
+
}, Pe = (...t) => t.filter((e, n, o) => !!e && e.trim() !== "" && o.indexOf(e) === n).join(" ").trim(), ut = (t) => {
|
|
861
|
+
for (const e in t)
|
|
862
|
+
if (e.startsWith("aria-") || e === "role" || e === "title")
|
|
863
|
+
return !0;
|
|
864
|
+
};
|
|
865
|
+
var dt = {
|
|
866
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
867
|
+
width: 24,
|
|
868
|
+
height: 24,
|
|
869
|
+
viewBox: "0 0 24 24",
|
|
596
870
|
fill: "none",
|
|
597
871
|
stroke: "currentColor",
|
|
598
872
|
strokeWidth: 2,
|
|
599
873
|
strokeLinecap: "round",
|
|
600
874
|
strokeLinejoin: "round"
|
|
601
875
|
};
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
876
|
+
const ft = Ie(
|
|
877
|
+
({
|
|
878
|
+
color: t = "currentColor",
|
|
879
|
+
size: e = 24,
|
|
880
|
+
strokeWidth: n = 2,
|
|
881
|
+
absoluteStrokeWidth: o,
|
|
882
|
+
className: r = "",
|
|
883
|
+
children: i,
|
|
884
|
+
iconNode: l,
|
|
885
|
+
...c
|
|
886
|
+
}, f) => oe(
|
|
887
|
+
"svg",
|
|
888
|
+
{
|
|
889
|
+
ref: f,
|
|
890
|
+
...dt,
|
|
891
|
+
width: e,
|
|
892
|
+
height: e,
|
|
893
|
+
stroke: t,
|
|
894
|
+
strokeWidth: o ? Number(n) * 24 / Number(e) : n,
|
|
895
|
+
className: Pe("lucide", r),
|
|
896
|
+
...!i && !ut(c) && { "aria-hidden": "true" },
|
|
897
|
+
...c
|
|
898
|
+
},
|
|
899
|
+
[
|
|
900
|
+
...l.map(([d, u]) => oe(d, u)),
|
|
901
|
+
...Array.isArray(i) ? i : [i]
|
|
902
|
+
]
|
|
903
|
+
)
|
|
904
|
+
);
|
|
905
|
+
const P = (t, e) => {
|
|
906
|
+
const n = Ie(
|
|
907
|
+
({ className: o, ...r }, i) => oe(ft, {
|
|
908
|
+
ref: i,
|
|
909
|
+
iconNode: e,
|
|
910
|
+
className: Pe(
|
|
911
|
+
`lucide-${at(Se(t))}`,
|
|
912
|
+
`lucide-${t}`,
|
|
913
|
+
o
|
|
914
|
+
),
|
|
915
|
+
...r
|
|
916
|
+
})
|
|
917
|
+
);
|
|
918
|
+
return n.displayName = Se(t), n;
|
|
919
|
+
};
|
|
920
|
+
const pt = [
|
|
921
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
922
|
+
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
|
|
923
|
+
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
924
|
+
], re = P("circle-x", pt);
|
|
925
|
+
const gt = [
|
|
926
|
+
[
|
|
927
|
+
"path",
|
|
928
|
+
{
|
|
929
|
+
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
930
|
+
key: "1oefj6"
|
|
931
|
+
}
|
|
932
|
+
],
|
|
933
|
+
["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
|
|
934
|
+
], Re = P("file", gt);
|
|
935
|
+
const ht = [
|
|
936
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
937
|
+
["path", { d: "M12 16v-4", key: "1dtifu" }],
|
|
938
|
+
["path", { d: "M12 8h.01", key: "e9boi3" }]
|
|
939
|
+
], ie = P("info", ht);
|
|
940
|
+
const mt = [
|
|
941
|
+
["path", { d: "M3 5h.01", key: "18ugdj" }],
|
|
942
|
+
["path", { d: "M3 12h.01", key: "nlz23k" }],
|
|
943
|
+
["path", { d: "M3 19h.01", key: "noohij" }],
|
|
944
|
+
["path", { d: "M8 5h13", key: "1pao27" }],
|
|
945
|
+
["path", { d: "M8 12h13", key: "1za7za" }],
|
|
946
|
+
["path", { d: "M8 19h13", key: "m83p4d" }]
|
|
947
|
+
], je = P("list", mt);
|
|
948
|
+
const bt = [
|
|
949
|
+
[
|
|
950
|
+
"path",
|
|
951
|
+
{
|
|
952
|
+
d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",
|
|
953
|
+
key: "10ikf1"
|
|
954
|
+
}
|
|
955
|
+
]
|
|
956
|
+
], yt = P("play", bt);
|
|
957
|
+
const xt = [
|
|
958
|
+
["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
|
|
959
|
+
["path", { d: "M3 3v5h5", key: "1xhq8a" }]
|
|
960
|
+
], vt = P("rotate-ccw", xt);
|
|
961
|
+
const wt = [
|
|
962
|
+
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
963
|
+
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
964
|
+
], St = P("search", wt);
|
|
965
|
+
const Ct = [
|
|
966
|
+
[
|
|
967
|
+
"path",
|
|
968
|
+
{ d: "M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344", key: "2acyp4" }
|
|
969
|
+
],
|
|
970
|
+
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
|
971
|
+
], It = P("square-check-big", Ct);
|
|
972
|
+
const Et = [
|
|
973
|
+
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
|
|
974
|
+
], kt = P("square", Et);
|
|
975
|
+
const Pt = [
|
|
976
|
+
[
|
|
977
|
+
"path",
|
|
978
|
+
{
|
|
979
|
+
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
|
980
|
+
key: "wmoenq"
|
|
981
|
+
}
|
|
982
|
+
],
|
|
983
|
+
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
984
|
+
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
985
|
+
], se = P("triangle-alert", Pt);
|
|
986
|
+
const Rt = [
|
|
987
|
+
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
988
|
+
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
989
|
+
], Ae = P("x", Rt);
|
|
990
|
+
function jt() {
|
|
655
991
|
return typeof window > "u" ? { x: 0, y: 16 } : { x: window.innerWidth / 2 - 24, y: 16 };
|
|
656
992
|
}
|
|
657
|
-
function
|
|
658
|
-
const
|
|
659
|
-
const
|
|
660
|
-
if (!
|
|
661
|
-
let
|
|
662
|
-
return
|
|
663
|
-
|
|
664
|
-
}),
|
|
665
|
-
}), [
|
|
666
|
-
if (
|
|
667
|
-
const
|
|
668
|
-
|
|
669
|
-
x:
|
|
670
|
-
y:
|
|
671
|
-
}),
|
|
672
|
-
}, []),
|
|
673
|
-
if (!
|
|
674
|
-
const
|
|
675
|
-
o({ x:
|
|
676
|
-
}, [
|
|
677
|
-
|
|
993
|
+
function At() {
|
|
994
|
+
const t = v((y) => y.openCommandPalette), e = v((y) => y.wsConnected), n = v((y) => y.floatingIconPosition), o = v((y) => y.setFloatingIconPosition), r = v((y) => {
|
|
995
|
+
const I = y.plugins?.eslint?.issues;
|
|
996
|
+
if (!I) return 0;
|
|
997
|
+
let p = 0;
|
|
998
|
+
return I.forEach((m) => {
|
|
999
|
+
p += m.length;
|
|
1000
|
+
}), p;
|
|
1001
|
+
}), [i, l] = T(!1), [c, f] = T({ x: 0, y: 0 }), d = J(null), u = n ?? jt(), h = E((y) => {
|
|
1002
|
+
if (y.button !== 0) return;
|
|
1003
|
+
const I = d.current?.getBoundingClientRect();
|
|
1004
|
+
I && (f({
|
|
1005
|
+
x: y.clientX - I.left,
|
|
1006
|
+
y: y.clientY - I.top
|
|
1007
|
+
}), l(!0), y.preventDefault());
|
|
1008
|
+
}, []), x = E((y) => {
|
|
1009
|
+
if (!i) return;
|
|
1010
|
+
const I = Math.max(0, Math.min(window.innerWidth - 48, y.clientX - c.x)), p = Math.max(0, Math.min(window.innerHeight - 48, y.clientY - c.y));
|
|
1011
|
+
o({ x: I, y: p });
|
|
1012
|
+
}, [i, c, o]), b = E(() => {
|
|
1013
|
+
l(!1);
|
|
678
1014
|
}, []);
|
|
679
|
-
|
|
680
|
-
if (
|
|
681
|
-
return window.addEventListener("mousemove",
|
|
682
|
-
window.removeEventListener("mousemove",
|
|
1015
|
+
z(() => {
|
|
1016
|
+
if (i)
|
|
1017
|
+
return window.addEventListener("mousemove", x), window.addEventListener("mouseup", b), () => {
|
|
1018
|
+
window.removeEventListener("mousemove", x), window.removeEventListener("mouseup", b);
|
|
683
1019
|
};
|
|
684
|
-
}, [
|
|
685
|
-
const
|
|
686
|
-
|
|
687
|
-
}, [
|
|
688
|
-
return
|
|
689
|
-
/* @__PURE__ */
|
|
1020
|
+
}, [i, x, b]);
|
|
1021
|
+
const k = E(() => {
|
|
1022
|
+
i || t();
|
|
1023
|
+
}, [i, t]), R = document.getElementById("uilint-portal") || document.body;
|
|
1024
|
+
return Y(
|
|
1025
|
+
/* @__PURE__ */ s.jsxs(
|
|
690
1026
|
"button",
|
|
691
1027
|
{
|
|
692
1028
|
ref: d,
|
|
693
|
-
onClick:
|
|
694
|
-
onMouseDown:
|
|
1029
|
+
onClick: k,
|
|
1030
|
+
onMouseDown: h,
|
|
695
1031
|
style: {
|
|
696
1032
|
position: "fixed",
|
|
697
|
-
left:
|
|
698
|
-
top:
|
|
1033
|
+
left: u.x,
|
|
1034
|
+
top: u.y,
|
|
699
1035
|
width: 48,
|
|
700
1036
|
height: 48,
|
|
701
1037
|
borderRadius: "50%",
|
|
702
1038
|
border: "none",
|
|
703
|
-
background:
|
|
1039
|
+
background: e ? "#3b82f6" : "#6b7280",
|
|
704
1040
|
color: "white",
|
|
705
|
-
cursor:
|
|
1041
|
+
cursor: i ? "grabbing" : "grab",
|
|
706
1042
|
display: "flex",
|
|
707
1043
|
alignItems: "center",
|
|
708
1044
|
justifyContent: "center",
|
|
709
1045
|
boxShadow: "0 4px 12px rgba(0,0,0,0.15)",
|
|
710
1046
|
zIndex: 99999,
|
|
711
|
-
transition:
|
|
1047
|
+
transition: i ? "none" : "background 0.2s"
|
|
712
1048
|
},
|
|
713
|
-
title: `UILint: ${r} issues${
|
|
1049
|
+
title: `UILint: ${r} issues${e ? "" : " (disconnected)"}`,
|
|
714
1050
|
children: [
|
|
715
|
-
/* @__PURE__ */
|
|
716
|
-
r > 0 && /* @__PURE__ */
|
|
1051
|
+
/* @__PURE__ */ s.jsx(It, { size: 24 }),
|
|
1052
|
+
r > 0 && /* @__PURE__ */ s.jsx(
|
|
717
1053
|
"span",
|
|
718
1054
|
{
|
|
719
1055
|
style: {
|
|
@@ -735,7 +1071,7 @@ function tt() {
|
|
|
735
1071
|
children: r > 99 ? "99+" : r
|
|
736
1072
|
}
|
|
737
1073
|
),
|
|
738
|
-
!
|
|
1074
|
+
!e && /* @__PURE__ */ s.jsx(
|
|
739
1075
|
"span",
|
|
740
1076
|
{
|
|
741
1077
|
style: {
|
|
@@ -753,54 +1089,54 @@ function tt() {
|
|
|
753
1089
|
]
|
|
754
1090
|
}
|
|
755
1091
|
),
|
|
756
|
-
|
|
1092
|
+
R
|
|
757
1093
|
);
|
|
758
1094
|
}
|
|
759
|
-
function
|
|
760
|
-
const [
|
|
761
|
-
if (!
|
|
1095
|
+
function Tt(t) {
|
|
1096
|
+
const [e, n] = T(/* @__PURE__ */ new Map()), o = J(null), r = J(null), i = E(() => {
|
|
1097
|
+
if (!t) {
|
|
762
1098
|
n(/* @__PURE__ */ new Map());
|
|
763
1099
|
return;
|
|
764
1100
|
}
|
|
765
|
-
const
|
|
766
|
-
if (
|
|
1101
|
+
const c = t instanceof Set ? t : new Set(t.keys());
|
|
1102
|
+
if (c.size === 0) {
|
|
767
1103
|
n(/* @__PURE__ */ new Map());
|
|
768
1104
|
return;
|
|
769
1105
|
}
|
|
770
|
-
const
|
|
771
|
-
document.querySelectorAll("[data-loc]").forEach((
|
|
772
|
-
const
|
|
773
|
-
if (
|
|
774
|
-
const
|
|
775
|
-
|
|
1106
|
+
const f = /* @__PURE__ */ new Map();
|
|
1107
|
+
document.querySelectorAll("[data-loc]").forEach((u) => {
|
|
1108
|
+
const h = u.getAttribute("data-loc");
|
|
1109
|
+
if (h && c.has(h)) {
|
|
1110
|
+
const x = u.getBoundingClientRect();
|
|
1111
|
+
x.width > 0 && x.height > 0 && f.set(h, { dataLoc: h, rect: x, element: u });
|
|
776
1112
|
}
|
|
777
|
-
}), n(
|
|
778
|
-
}, [
|
|
1113
|
+
}), n(f);
|
|
1114
|
+
}, [t]), l = E(() => {
|
|
779
1115
|
r.current || (r.current = requestAnimationFrame(() => {
|
|
780
|
-
|
|
1116
|
+
i(), r.current = null;
|
|
781
1117
|
}));
|
|
782
|
-
}, [
|
|
783
|
-
return
|
|
1118
|
+
}, [i]);
|
|
1119
|
+
return z(() => (i(), window.addEventListener("scroll", l, { passive: !0 }), window.addEventListener("resize", l, { passive: !0 }), o.current = new MutationObserver(l), o.current.observe(document.body, {
|
|
784
1120
|
childList: !0,
|
|
785
1121
|
subtree: !0,
|
|
786
1122
|
attributes: !0,
|
|
787
1123
|
attributeFilter: ["data-loc"]
|
|
788
1124
|
}), () => {
|
|
789
|
-
window.removeEventListener("scroll",
|
|
790
|
-
}), [
|
|
1125
|
+
window.removeEventListener("scroll", l), window.removeEventListener("resize", l), o.current?.disconnect(), r.current && cancelAnimationFrame(r.current);
|
|
1126
|
+
}), [i, l]), e;
|
|
791
1127
|
}
|
|
792
|
-
function
|
|
793
|
-
const
|
|
794
|
-
return { filePath:
|
|
1128
|
+
function _t(t) {
|
|
1129
|
+
const e = t.split(":"), n = parseInt(e.pop() || "0", 10), o = parseInt(e.pop() || "0", 10);
|
|
1130
|
+
return { filePath: e.join(":"), line: o, column: n };
|
|
795
1131
|
}
|
|
796
|
-
function
|
|
797
|
-
return `${
|
|
1132
|
+
function Nt(t, e, n, o) {
|
|
1133
|
+
return `${t}:${e}:${n}:${o}`;
|
|
798
1134
|
}
|
|
799
|
-
function
|
|
800
|
-
return
|
|
1135
|
+
function Lt(t) {
|
|
1136
|
+
return t === 2 ? "error" : "warning";
|
|
801
1137
|
}
|
|
802
|
-
function
|
|
803
|
-
switch (
|
|
1138
|
+
function le(t) {
|
|
1139
|
+
switch (t) {
|
|
804
1140
|
case "error":
|
|
805
1141
|
return "#ef4444";
|
|
806
1142
|
// red-500
|
|
@@ -811,34 +1147,34 @@ function ie(e) {
|
|
|
811
1147
|
return "#3b82f6";
|
|
812
1148
|
}
|
|
813
1149
|
}
|
|
814
|
-
function
|
|
815
|
-
if (!
|
|
816
|
-
const n =
|
|
1150
|
+
function Sn(t, e = "eslint") {
|
|
1151
|
+
if (!t.message || !t.line) return null;
|
|
1152
|
+
const n = t.dataLoc || "", { filePath: o } = n ? _t(n) : { filePath: "" }, r = t.ruleId || "unknown", i = t.severity ? Lt(t.severity) : "warning";
|
|
817
1153
|
return {
|
|
818
|
-
id:
|
|
819
|
-
message:
|
|
820
|
-
severity:
|
|
1154
|
+
id: Nt(e, r, n, t.line),
|
|
1155
|
+
message: t.message,
|
|
1156
|
+
severity: i,
|
|
821
1157
|
dataLoc: n,
|
|
822
1158
|
ruleId: r,
|
|
823
|
-
pluginId:
|
|
1159
|
+
pluginId: e,
|
|
824
1160
|
filePath: o,
|
|
825
|
-
line:
|
|
826
|
-
column:
|
|
1161
|
+
line: t.line,
|
|
1162
|
+
column: t.column
|
|
827
1163
|
};
|
|
828
1164
|
}
|
|
829
|
-
function
|
|
830
|
-
const
|
|
831
|
-
return /* @__PURE__ */
|
|
1165
|
+
function Ot({ dataLoc: t, rect: e, issues: n, isHovered: o, showDetails: r, onClick: i }) {
|
|
1166
|
+
const l = _(() => n.some((d) => d.severity === "error") ? "error" : n.some((d) => d.severity === "warning") ? "warning" : "info", [n]), c = le(l), f = n.length;
|
|
1167
|
+
return /* @__PURE__ */ s.jsxs(
|
|
832
1168
|
"div",
|
|
833
1169
|
{
|
|
834
|
-
onClick:
|
|
1170
|
+
onClick: i,
|
|
835
1171
|
style: {
|
|
836
1172
|
position: "fixed",
|
|
837
|
-
left:
|
|
838
|
-
top:
|
|
839
|
-
width:
|
|
840
|
-
height:
|
|
841
|
-
border: `2px solid ${
|
|
1173
|
+
left: e.left - 2,
|
|
1174
|
+
top: e.top - 2,
|
|
1175
|
+
width: e.width + 4,
|
|
1176
|
+
height: e.height + 4,
|
|
1177
|
+
border: `2px solid ${c}`,
|
|
842
1178
|
borderRadius: 4,
|
|
843
1179
|
pointerEvents: "auto",
|
|
844
1180
|
cursor: "pointer",
|
|
@@ -847,7 +1183,7 @@ function st({ dataLoc: e, rect: t, issues: n, isHovered: o, showDetails: r, onCl
|
|
|
847
1183
|
zIndex: 99990
|
|
848
1184
|
},
|
|
849
1185
|
children: [
|
|
850
|
-
/* @__PURE__ */
|
|
1186
|
+
/* @__PURE__ */ s.jsx(
|
|
851
1187
|
"span",
|
|
852
1188
|
{
|
|
853
1189
|
style: {
|
|
@@ -857,7 +1193,7 @@ function st({ dataLoc: e, rect: t, issues: n, isHovered: o, showDetails: r, onCl
|
|
|
857
1193
|
minWidth: 18,
|
|
858
1194
|
height: 18,
|
|
859
1195
|
borderRadius: 9,
|
|
860
|
-
background:
|
|
1196
|
+
background: c,
|
|
861
1197
|
color: "white",
|
|
862
1198
|
fontSize: 10,
|
|
863
1199
|
fontWeight: 600,
|
|
@@ -866,10 +1202,10 @@ function st({ dataLoc: e, rect: t, issues: n, isHovered: o, showDetails: r, onCl
|
|
|
866
1202
|
justifyContent: "center",
|
|
867
1203
|
padding: "0 4px"
|
|
868
1204
|
},
|
|
869
|
-
children:
|
|
1205
|
+
children: f
|
|
870
1206
|
}
|
|
871
1207
|
),
|
|
872
|
-
r && o && /* @__PURE__ */
|
|
1208
|
+
r && o && /* @__PURE__ */ s.jsxs(
|
|
873
1209
|
"div",
|
|
874
1210
|
{
|
|
875
1211
|
style: {
|
|
@@ -888,18 +1224,18 @@ function st({ dataLoc: e, rect: t, issues: n, isHovered: o, showDetails: r, onCl
|
|
|
888
1224
|
zIndex: 99991
|
|
889
1225
|
},
|
|
890
1226
|
children: [
|
|
891
|
-
/* @__PURE__ */
|
|
892
|
-
|
|
1227
|
+
/* @__PURE__ */ s.jsxs("strong", { children: [
|
|
1228
|
+
f,
|
|
893
1229
|
" issue",
|
|
894
|
-
|
|
1230
|
+
f !== 1 ? "s" : ""
|
|
895
1231
|
] }),
|
|
896
|
-
/* @__PURE__ */
|
|
897
|
-
n.slice(0, 3).map((d,
|
|
1232
|
+
/* @__PURE__ */ s.jsxs("div", { style: { marginTop: 4, opacity: 0.8 }, children: [
|
|
1233
|
+
n.slice(0, 3).map((d, u) => /* @__PURE__ */ s.jsxs("div", { style: { marginTop: u > 0 ? 4 : 0 }, children: [
|
|
898
1234
|
"• ",
|
|
899
1235
|
d.message.slice(0, 60),
|
|
900
1236
|
d.message.length > 60 ? "..." : ""
|
|
901
|
-
] },
|
|
902
|
-
n.length > 3 && /* @__PURE__ */
|
|
1237
|
+
] }, u)),
|
|
1238
|
+
n.length > 3 && /* @__PURE__ */ s.jsxs("div", { style: { marginTop: 4, opacity: 0.6 }, children: [
|
|
903
1239
|
"+",
|
|
904
1240
|
n.length - 3,
|
|
905
1241
|
" more..."
|
|
@@ -912,15 +1248,15 @@ function st({ dataLoc: e, rect: t, issues: n, isHovered: o, showDetails: r, onCl
|
|
|
912
1248
|
}
|
|
913
1249
|
);
|
|
914
1250
|
}
|
|
915
|
-
function
|
|
916
|
-
const
|
|
917
|
-
|
|
1251
|
+
function zt() {
|
|
1252
|
+
const t = v((f) => f.altKeyHeld), e = v((f) => f.openInspector), n = v((f) => f.hoveredElementId), o = v((f) => f.setHoveredElementId), r = v((f) => f.plugins?.eslint?.issues), i = Tt(r), l = (f) => {
|
|
1253
|
+
e("element", { dataLoc: f });
|
|
918
1254
|
};
|
|
919
1255
|
if (!r || r.size === 0)
|
|
920
1256
|
return null;
|
|
921
|
-
const
|
|
922
|
-
return
|
|
923
|
-
/* @__PURE__ */
|
|
1257
|
+
const c = document.getElementById("uilint-portal") || document.body;
|
|
1258
|
+
return Y(
|
|
1259
|
+
/* @__PURE__ */ s.jsx(
|
|
924
1260
|
"div",
|
|
925
1261
|
{
|
|
926
1262
|
style: {
|
|
@@ -932,101 +1268,101 @@ function lt() {
|
|
|
932
1268
|
pointerEvents: "none",
|
|
933
1269
|
zIndex: 99990
|
|
934
1270
|
},
|
|
935
|
-
onMouseMove: (
|
|
936
|
-
const
|
|
937
|
-
o(
|
|
1271
|
+
onMouseMove: (f) => {
|
|
1272
|
+
const u = f.target.getAttribute?.("data-loc");
|
|
1273
|
+
o(u || null);
|
|
938
1274
|
},
|
|
939
|
-
children: Array.from(
|
|
940
|
-
const
|
|
941
|
-
return
|
|
942
|
-
|
|
1275
|
+
children: Array.from(i.entries()).map(([f, { rect: d }]) => {
|
|
1276
|
+
const u = r.get(f) || [];
|
|
1277
|
+
return u.length === 0 ? null : /* @__PURE__ */ s.jsx(
|
|
1278
|
+
Ot,
|
|
943
1279
|
{
|
|
944
|
-
dataLoc:
|
|
1280
|
+
dataLoc: f,
|
|
945
1281
|
rect: d,
|
|
946
|
-
issues:
|
|
947
|
-
isHovered: n ===
|
|
948
|
-
showDetails:
|
|
949
|
-
onClick: () =>
|
|
1282
|
+
issues: u,
|
|
1283
|
+
isHovered: n === f,
|
|
1284
|
+
showDetails: t,
|
|
1285
|
+
onClick: () => l(f)
|
|
950
1286
|
},
|
|
951
|
-
|
|
1287
|
+
f
|
|
952
1288
|
);
|
|
953
1289
|
})
|
|
954
1290
|
}
|
|
955
1291
|
),
|
|
956
|
-
|
|
1292
|
+
c
|
|
957
1293
|
);
|
|
958
1294
|
}
|
|
959
|
-
function
|
|
960
|
-
const
|
|
961
|
-
const
|
|
962
|
-
return
|
|
963
|
-
}, [
|
|
964
|
-
const
|
|
965
|
-
for (const
|
|
966
|
-
const
|
|
967
|
-
|
|
1295
|
+
function Te() {
|
|
1296
|
+
const t = v((l) => l.plugins?.eslint?.issues), e = _(() => {
|
|
1297
|
+
const l = [];
|
|
1298
|
+
return t?.forEach((c) => l.push(...c)), l;
|
|
1299
|
+
}, [t]), n = _(() => {
|
|
1300
|
+
const l = /* @__PURE__ */ new Map();
|
|
1301
|
+
for (const c of e) {
|
|
1302
|
+
const f = l.get(c.filePath) || [];
|
|
1303
|
+
f.push(c), l.set(c.filePath, f);
|
|
968
1304
|
}
|
|
969
|
-
return
|
|
970
|
-
}, [
|
|
971
|
-
(
|
|
972
|
-
[
|
|
973
|
-
), r =
|
|
1305
|
+
return l;
|
|
1306
|
+
}, [e]), o = E(
|
|
1307
|
+
(l) => t?.get(l) || [],
|
|
1308
|
+
[t]
|
|
1309
|
+
), r = e.length, i = _(
|
|
974
1310
|
() => ({
|
|
975
|
-
error:
|
|
976
|
-
warning:
|
|
977
|
-
info:
|
|
1311
|
+
error: e.filter((l) => l.severity === "error").length,
|
|
1312
|
+
warning: e.filter((l) => l.severity === "warning").length,
|
|
1313
|
+
info: e.filter((l) => l.severity === "info").length
|
|
978
1314
|
}),
|
|
979
|
-
[
|
|
1315
|
+
[e]
|
|
980
1316
|
);
|
|
981
1317
|
return {
|
|
982
|
-
allIssues:
|
|
1318
|
+
allIssues: e,
|
|
983
1319
|
byFile: n,
|
|
984
|
-
byDataLoc:
|
|
1320
|
+
byDataLoc: t ?? /* @__PURE__ */ new Map(),
|
|
985
1321
|
getIssuesForDataLoc: o,
|
|
986
1322
|
totalCount: r,
|
|
987
|
-
countBySeverity:
|
|
1323
|
+
countBySeverity: i
|
|
988
1324
|
};
|
|
989
1325
|
}
|
|
990
|
-
function
|
|
991
|
-
const
|
|
992
|
-
|
|
993
|
-
const r = (
|
|
994
|
-
if ((
|
|
995
|
-
|
|
1326
|
+
function $t() {
|
|
1327
|
+
const t = v((r) => r.openCommandPalette), e = v((r) => r.closeCommandPalette), n = v((r) => r.setAltKeyHeld), o = v((r) => r.commandPalette.open);
|
|
1328
|
+
z(() => {
|
|
1329
|
+
const r = (l) => {
|
|
1330
|
+
if ((l.metaKey || l.ctrlKey) && l.key === "k") {
|
|
1331
|
+
l.preventDefault(), o ? e() : t();
|
|
996
1332
|
return;
|
|
997
1333
|
}
|
|
998
|
-
if (
|
|
999
|
-
|
|
1334
|
+
if (l.key === "Escape" && o) {
|
|
1335
|
+
l.preventDefault(), e();
|
|
1000
1336
|
return;
|
|
1001
1337
|
}
|
|
1002
|
-
|
|
1003
|
-
},
|
|
1004
|
-
|
|
1338
|
+
l.key === "Alt" && n(!0);
|
|
1339
|
+
}, i = (l) => {
|
|
1340
|
+
l.key === "Alt" && n(!1);
|
|
1005
1341
|
};
|
|
1006
|
-
return window.addEventListener("keydown", r), window.addEventListener("keyup",
|
|
1007
|
-
window.removeEventListener("keydown", r), window.removeEventListener("keyup",
|
|
1342
|
+
return window.addEventListener("keydown", r), window.addEventListener("keyup", i), () => {
|
|
1343
|
+
window.removeEventListener("keydown", r), window.removeEventListener("keyup", i);
|
|
1008
1344
|
};
|
|
1009
|
-
}, [o,
|
|
1345
|
+
}, [o, t, e, n]);
|
|
1010
1346
|
}
|
|
1011
|
-
function
|
|
1012
|
-
const o =
|
|
1013
|
-
return
|
|
1347
|
+
function Dt({ value: t, onChange: e, placeholder: n = "Search issues, rules, files..." }) {
|
|
1348
|
+
const o = J(null);
|
|
1349
|
+
return z(() => {
|
|
1014
1350
|
o.current?.focus();
|
|
1015
|
-
}, []), /* @__PURE__ */
|
|
1351
|
+
}, []), /* @__PURE__ */ s.jsxs("div", { style: {
|
|
1016
1352
|
display: "flex",
|
|
1017
1353
|
alignItems: "center",
|
|
1018
1354
|
padding: "12px 16px",
|
|
1019
1355
|
borderBottom: "1px solid #e5e7eb",
|
|
1020
1356
|
gap: 12
|
|
1021
1357
|
}, children: [
|
|
1022
|
-
/* @__PURE__ */
|
|
1023
|
-
/* @__PURE__ */
|
|
1358
|
+
/* @__PURE__ */ s.jsx(St, { size: 20, color: "#9ca3af" }),
|
|
1359
|
+
/* @__PURE__ */ s.jsx(
|
|
1024
1360
|
"input",
|
|
1025
1361
|
{
|
|
1026
1362
|
ref: o,
|
|
1027
1363
|
type: "text",
|
|
1028
|
-
value:
|
|
1029
|
-
onChange: (r) =>
|
|
1364
|
+
value: t,
|
|
1365
|
+
onChange: (r) => e(r.target.value),
|
|
1030
1366
|
placeholder: n,
|
|
1031
1367
|
style: {
|
|
1032
1368
|
flex: 1,
|
|
@@ -1038,10 +1374,10 @@ function at({ value: e, onChange: t, placeholder: n = "Search issues, rules, fil
|
|
|
1038
1374
|
}
|
|
1039
1375
|
}
|
|
1040
1376
|
),
|
|
1041
|
-
|
|
1377
|
+
t && /* @__PURE__ */ s.jsx(
|
|
1042
1378
|
"button",
|
|
1043
1379
|
{
|
|
1044
|
-
onClick: () =>
|
|
1380
|
+
onClick: () => e(""),
|
|
1045
1381
|
style: {
|
|
1046
1382
|
border: "none",
|
|
1047
1383
|
background: "none",
|
|
@@ -1054,9 +1390,9 @@ function at({ value: e, onChange: t, placeholder: n = "Search issues, rules, fil
|
|
|
1054
1390
|
)
|
|
1055
1391
|
] });
|
|
1056
1392
|
}
|
|
1057
|
-
function
|
|
1058
|
-
const o =
|
|
1059
|
-
return /* @__PURE__ */
|
|
1393
|
+
function Ft({ issue: t, isSelected: e, onClick: n }) {
|
|
1394
|
+
const o = t.severity === "error" ? re : t.severity === "warning" ? se : ie, r = t.severity === "error" ? "#ef4444" : t.severity === "warning" ? "#f59e0b" : "#3b82f6", i = t.filePath.split("/").pop() || t.filePath;
|
|
1395
|
+
return /* @__PURE__ */ s.jsxs(
|
|
1060
1396
|
"div",
|
|
1061
1397
|
{
|
|
1062
1398
|
onClick: n,
|
|
@@ -1065,21 +1401,21 @@ function ut({ issue: e, isSelected: t, onClick: n }) {
|
|
|
1065
1401
|
alignItems: "flex-start",
|
|
1066
1402
|
padding: "10px 16px",
|
|
1067
1403
|
cursor: "pointer",
|
|
1068
|
-
background:
|
|
1404
|
+
background: e ? "#f3f4f6" : "transparent",
|
|
1069
1405
|
gap: 12,
|
|
1070
1406
|
borderBottom: "1px solid #f3f4f6"
|
|
1071
1407
|
},
|
|
1072
1408
|
children: [
|
|
1073
|
-
/* @__PURE__ */
|
|
1074
|
-
/* @__PURE__ */
|
|
1075
|
-
/* @__PURE__ */
|
|
1409
|
+
/* @__PURE__ */ s.jsx(o, { size: 16, color: r }),
|
|
1410
|
+
/* @__PURE__ */ s.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
1411
|
+
/* @__PURE__ */ s.jsx("div", { style: {
|
|
1076
1412
|
fontSize: 14,
|
|
1077
1413
|
color: "#111827",
|
|
1078
1414
|
overflow: "hidden",
|
|
1079
1415
|
textOverflow: "ellipsis",
|
|
1080
1416
|
whiteSpace: "nowrap"
|
|
1081
|
-
}, children:
|
|
1082
|
-
/* @__PURE__ */
|
|
1417
|
+
}, children: t.message }),
|
|
1418
|
+
/* @__PURE__ */ s.jsxs("div", { style: {
|
|
1083
1419
|
fontSize: 12,
|
|
1084
1420
|
color: "#6b7280",
|
|
1085
1421
|
marginTop: 2,
|
|
@@ -1087,15 +1423,15 @@ function ut({ issue: e, isSelected: t, onClick: n }) {
|
|
|
1087
1423
|
alignItems: "center",
|
|
1088
1424
|
gap: 8
|
|
1089
1425
|
}, children: [
|
|
1090
|
-
/* @__PURE__ */
|
|
1091
|
-
/* @__PURE__ */
|
|
1092
|
-
|
|
1426
|
+
/* @__PURE__ */ s.jsxs("span", { style: { display: "flex", alignItems: "center", gap: 4 }, children: [
|
|
1427
|
+
/* @__PURE__ */ s.jsx(Re, { size: 12 }),
|
|
1428
|
+
i,
|
|
1093
1429
|
":",
|
|
1094
|
-
|
|
1430
|
+
t.line
|
|
1095
1431
|
] }),
|
|
1096
|
-
/* @__PURE__ */
|
|
1097
|
-
/* @__PURE__ */
|
|
1098
|
-
|
|
1432
|
+
/* @__PURE__ */ s.jsxs("span", { style: { display: "flex", alignItems: "center", gap: 4 }, children: [
|
|
1433
|
+
/* @__PURE__ */ s.jsx(je, { size: 12 }),
|
|
1434
|
+
t.ruleId
|
|
1099
1435
|
] })
|
|
1100
1436
|
] })
|
|
1101
1437
|
] })
|
|
@@ -1103,24 +1439,145 @@ function ut({ issue: e, isSelected: t, onClick: n }) {
|
|
|
1103
1439
|
}
|
|
1104
1440
|
);
|
|
1105
1441
|
}
|
|
1106
|
-
function
|
|
1107
|
-
|
|
1108
|
-
|
|
1442
|
+
function Mt({
|
|
1443
|
+
command: t,
|
|
1444
|
+
isSelected: e,
|
|
1445
|
+
onClick: n
|
|
1446
|
+
}) {
|
|
1447
|
+
return /* @__PURE__ */ s.jsxs(
|
|
1448
|
+
"div",
|
|
1449
|
+
{
|
|
1450
|
+
onClick: n,
|
|
1451
|
+
style: {
|
|
1452
|
+
padding: "12px 16px",
|
|
1453
|
+
cursor: "pointer",
|
|
1454
|
+
background: e ? "#f3f4f6" : "transparent",
|
|
1455
|
+
borderBottom: "1px solid #f3f4f6",
|
|
1456
|
+
display: "flex",
|
|
1457
|
+
alignItems: "center",
|
|
1458
|
+
gap: 12
|
|
1459
|
+
},
|
|
1460
|
+
children: [
|
|
1461
|
+
/* @__PURE__ */ s.jsx(
|
|
1462
|
+
"div",
|
|
1463
|
+
{
|
|
1464
|
+
style: {
|
|
1465
|
+
width: 32,
|
|
1466
|
+
height: 32,
|
|
1467
|
+
borderRadius: 6,
|
|
1468
|
+
background: "#3b82f6",
|
|
1469
|
+
color: "white",
|
|
1470
|
+
display: "flex",
|
|
1471
|
+
alignItems: "center",
|
|
1472
|
+
justifyContent: "center",
|
|
1473
|
+
flexShrink: 0
|
|
1474
|
+
},
|
|
1475
|
+
children: t.id.includes("start") ? /* @__PURE__ */ s.jsx(yt, { size: 16 }) : t.id.includes("stop") ? /* @__PURE__ */ s.jsx(kt, { size: 16 }) : t.id.includes("clear") ? /* @__PURE__ */ s.jsx(vt, { size: 16 }) : /* @__PURE__ */ s.jsx("span", { style: { fontSize: 14 }, children: "⚡" })
|
|
1476
|
+
}
|
|
1477
|
+
),
|
|
1478
|
+
/* @__PURE__ */ s.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
1479
|
+
/* @__PURE__ */ s.jsx(
|
|
1480
|
+
"div",
|
|
1481
|
+
{
|
|
1482
|
+
style: {
|
|
1483
|
+
fontWeight: 500,
|
|
1484
|
+
color: "#111827",
|
|
1485
|
+
marginBottom: 2
|
|
1486
|
+
},
|
|
1487
|
+
children: t.title
|
|
1488
|
+
}
|
|
1489
|
+
),
|
|
1490
|
+
t.subtitle && /* @__PURE__ */ s.jsx(
|
|
1491
|
+
"div",
|
|
1492
|
+
{
|
|
1493
|
+
style: {
|
|
1494
|
+
fontSize: 12,
|
|
1495
|
+
color: "#6b7280",
|
|
1496
|
+
overflow: "hidden",
|
|
1497
|
+
textOverflow: "ellipsis",
|
|
1498
|
+
whiteSpace: "nowrap"
|
|
1499
|
+
},
|
|
1500
|
+
children: t.subtitle
|
|
1501
|
+
}
|
|
1502
|
+
)
|
|
1503
|
+
] }),
|
|
1504
|
+
/* @__PURE__ */ s.jsx(
|
|
1505
|
+
"span",
|
|
1506
|
+
{
|
|
1507
|
+
style: {
|
|
1508
|
+
fontSize: 10,
|
|
1509
|
+
fontWeight: 500,
|
|
1510
|
+
textTransform: "uppercase",
|
|
1511
|
+
background: "#dbeafe",
|
|
1512
|
+
color: "#1d4ed8",
|
|
1513
|
+
padding: "2px 6px",
|
|
1514
|
+
borderRadius: 4
|
|
1515
|
+
},
|
|
1516
|
+
children: t.category
|
|
1517
|
+
}
|
|
1518
|
+
)
|
|
1519
|
+
]
|
|
1520
|
+
}
|
|
1521
|
+
);
|
|
1522
|
+
}
|
|
1523
|
+
function Bt() {
|
|
1524
|
+
const t = v((p) => p.commandPalette.open), e = v((p) => p.closeCommandPalette), n = v((p) => p.openInspector), [o, r] = T(""), [i, l] = T(0), { allIssues: c } = Te(), f = v((p) => p), d = _(() => nt.getAllCommands().filter((m) => m.isAvailable ? m.isAvailable(f) : !0), [f]), u = _(() => {
|
|
1525
|
+
if (!o.trim()) return d;
|
|
1109
1526
|
const p = o.toLowerCase();
|
|
1110
|
-
return
|
|
1111
|
-
(
|
|
1112
|
-
)
|
|
1113
|
-
}, [
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1527
|
+
return d.filter(
|
|
1528
|
+
(m) => m.title.toLowerCase().includes(p) || m.keywords.some((A) => A.toLowerCase().includes(p)) || m.category.toLowerCase().includes(p) || m.subtitle && m.subtitle.toLowerCase().includes(p)
|
|
1529
|
+
);
|
|
1530
|
+
}, [d, o]), h = _(() => {
|
|
1531
|
+
if (!o.trim()) return c.slice(0, 50);
|
|
1532
|
+
const p = o.toLowerCase();
|
|
1533
|
+
return c.filter(
|
|
1534
|
+
(m) => m.message.toLowerCase().includes(p) || m.ruleId.toLowerCase().includes(p) || m.filePath.toLowerCase().includes(p)
|
|
1535
|
+
).slice(0, 50);
|
|
1536
|
+
}, [c, o]), x = _(() => {
|
|
1537
|
+
const p = u.map((A) => ({
|
|
1538
|
+
kind: "command",
|
|
1539
|
+
command: A
|
|
1540
|
+
})), m = h.map((A) => ({
|
|
1541
|
+
kind: "issue",
|
|
1542
|
+
issue: A
|
|
1543
|
+
}));
|
|
1544
|
+
return [...p, ...m];
|
|
1545
|
+
}, [u, h]), b = E(
|
|
1546
|
+
(p) => {
|
|
1547
|
+
p.key === "ArrowDown" ? (p.preventDefault(), l((m) => Math.min(m + 1, x.length - 1))) : p.key === "ArrowUp" ? (p.preventDefault(), l((m) => Math.max(m - 1, 0))) : p.key === "Enter" && x[i] && (p.preventDefault(), y(x[i]));
|
|
1548
|
+
},
|
|
1549
|
+
[x, i]
|
|
1550
|
+
), k = E(
|
|
1551
|
+
(p) => {
|
|
1552
|
+
n("issue", { issue: p }), e();
|
|
1553
|
+
},
|
|
1554
|
+
[n, e]
|
|
1555
|
+
), R = E(
|
|
1556
|
+
async (p) => {
|
|
1557
|
+
const m = lt();
|
|
1558
|
+
if (!m) {
|
|
1559
|
+
console.error("[CommandPalette] Plugin services not available");
|
|
1560
|
+
return;
|
|
1561
|
+
}
|
|
1562
|
+
try {
|
|
1563
|
+
await p.execute(m);
|
|
1564
|
+
} catch (A) {
|
|
1565
|
+
console.error(`[CommandPalette] Error executing command "${p.id}":`, A);
|
|
1566
|
+
}
|
|
1567
|
+
},
|
|
1568
|
+
[]
|
|
1569
|
+
), y = E(
|
|
1570
|
+
(p) => {
|
|
1571
|
+
p.kind === "command" ? R(p.command) : k(p.issue);
|
|
1572
|
+
},
|
|
1573
|
+
[R, k]
|
|
1574
|
+
);
|
|
1575
|
+
if (D.useEffect(() => {
|
|
1576
|
+
l(0);
|
|
1577
|
+
}, [o]), !t) return null;
|
|
1578
|
+
const I = document.getElementById("uilint-portal") || document.body;
|
|
1579
|
+
return Y(
|
|
1580
|
+
/* @__PURE__ */ s.jsx(
|
|
1124
1581
|
"div",
|
|
1125
1582
|
{
|
|
1126
1583
|
style: {
|
|
@@ -1134,10 +1591,10 @@ function dt() {
|
|
|
1134
1591
|
zIndex: 99998
|
|
1135
1592
|
},
|
|
1136
1593
|
onClick: (p) => {
|
|
1137
|
-
p.target === p.currentTarget &&
|
|
1594
|
+
p.target === p.currentTarget && e();
|
|
1138
1595
|
},
|
|
1139
|
-
onKeyDown:
|
|
1140
|
-
children: /* @__PURE__ */
|
|
1596
|
+
onKeyDown: b,
|
|
1597
|
+
children: /* @__PURE__ */ s.jsxs(
|
|
1141
1598
|
"div",
|
|
1142
1599
|
{
|
|
1143
1600
|
style: {
|
|
@@ -1149,106 +1606,176 @@ function dt() {
|
|
|
1149
1606
|
overflow: "hidden"
|
|
1150
1607
|
},
|
|
1151
1608
|
children: [
|
|
1152
|
-
/* @__PURE__ */
|
|
1153
|
-
|
|
1154
|
-
alignItems: "center",
|
|
1155
|
-
justifyContent: "space-between",
|
|
1156
|
-
padding: "12px 16px",
|
|
1157
|
-
borderBottom: "1px solid #e5e7eb"
|
|
1158
|
-
}, children: [
|
|
1159
|
-
/* @__PURE__ */ i.jsxs("span", { style: { fontWeight: 600, color: "#111827" }, children: [
|
|
1160
|
-
"UILint (",
|
|
1161
|
-
a.length,
|
|
1162
|
-
" issues)"
|
|
1163
|
-
] }),
|
|
1164
|
-
/* @__PURE__ */ i.jsx(
|
|
1165
|
-
"button",
|
|
1166
|
-
{
|
|
1167
|
-
onClick: t,
|
|
1168
|
-
style: {
|
|
1169
|
-
border: "none",
|
|
1170
|
-
background: "none",
|
|
1171
|
-
cursor: "pointer",
|
|
1172
|
-
padding: 4,
|
|
1173
|
-
color: "#6b7280"
|
|
1174
|
-
},
|
|
1175
|
-
children: /* @__PURE__ */ i.jsx(we, { size: 20 })
|
|
1176
|
-
}
|
|
1177
|
-
)
|
|
1178
|
-
] }),
|
|
1179
|
-
/* @__PURE__ */ i.jsx(at, { value: o, onChange: r }),
|
|
1180
|
-
/* @__PURE__ */ i.jsx("div", { style: {
|
|
1181
|
-
maxHeight: 400,
|
|
1182
|
-
overflowY: "auto"
|
|
1183
|
-
}, children: u.length === 0 ? /* @__PURE__ */ i.jsx("div", { style: {
|
|
1184
|
-
padding: 24,
|
|
1185
|
-
textAlign: "center",
|
|
1186
|
-
color: "#6b7280"
|
|
1187
|
-
}, children: o ? "No issues match your search" : "No issues found" }) : u.map((p, g) => /* @__PURE__ */ i.jsx(
|
|
1188
|
-
ut,
|
|
1609
|
+
/* @__PURE__ */ s.jsxs(
|
|
1610
|
+
"div",
|
|
1189
1611
|
{
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1612
|
+
style: {
|
|
1613
|
+
display: "flex",
|
|
1614
|
+
alignItems: "center",
|
|
1615
|
+
justifyContent: "space-between",
|
|
1616
|
+
padding: "12px 16px",
|
|
1617
|
+
borderBottom: "1px solid #e5e7eb"
|
|
1618
|
+
},
|
|
1619
|
+
children: [
|
|
1620
|
+
/* @__PURE__ */ s.jsxs("span", { style: { fontWeight: 600, color: "#111827" }, children: [
|
|
1621
|
+
"UILint",
|
|
1622
|
+
c.length > 0 && /* @__PURE__ */ s.jsxs("span", { style: { fontWeight: 400, color: "#6b7280", marginLeft: 8 }, children: [
|
|
1623
|
+
c.length,
|
|
1624
|
+
" issue",
|
|
1625
|
+
c.length !== 1 ? "s" : ""
|
|
1626
|
+
] })
|
|
1627
|
+
] }),
|
|
1628
|
+
/* @__PURE__ */ s.jsx(
|
|
1629
|
+
"button",
|
|
1630
|
+
{
|
|
1631
|
+
onClick: e,
|
|
1632
|
+
style: {
|
|
1633
|
+
border: "none",
|
|
1634
|
+
background: "none",
|
|
1635
|
+
cursor: "pointer",
|
|
1636
|
+
padding: 4,
|
|
1637
|
+
color: "#6b7280"
|
|
1638
|
+
},
|
|
1639
|
+
children: /* @__PURE__ */ s.jsx(Ae, { size: 20 })
|
|
1640
|
+
}
|
|
1641
|
+
)
|
|
1642
|
+
]
|
|
1643
|
+
}
|
|
1644
|
+
),
|
|
1645
|
+
/* @__PURE__ */ s.jsx(Dt, { value: o, onChange: r }),
|
|
1646
|
+
/* @__PURE__ */ s.jsx(
|
|
1647
|
+
"div",
|
|
1648
|
+
{
|
|
1649
|
+
style: {
|
|
1650
|
+
maxHeight: 400,
|
|
1651
|
+
overflowY: "auto"
|
|
1652
|
+
},
|
|
1653
|
+
children: x.length === 0 ? /* @__PURE__ */ s.jsx(
|
|
1654
|
+
"div",
|
|
1655
|
+
{
|
|
1656
|
+
style: {
|
|
1657
|
+
padding: 24,
|
|
1658
|
+
textAlign: "center",
|
|
1659
|
+
color: "#6b7280"
|
|
1660
|
+
},
|
|
1661
|
+
children: o ? "No results match your search" : "No commands or issues available"
|
|
1662
|
+
}
|
|
1663
|
+
) : /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1664
|
+
u.length > 0 && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1665
|
+
/* @__PURE__ */ s.jsx(
|
|
1666
|
+
"div",
|
|
1667
|
+
{
|
|
1668
|
+
style: {
|
|
1669
|
+
padding: "8px 16px",
|
|
1670
|
+
fontSize: 11,
|
|
1671
|
+
fontWeight: 600,
|
|
1672
|
+
textTransform: "uppercase",
|
|
1673
|
+
color: "#9ca3af",
|
|
1674
|
+
background: "#f9fafb"
|
|
1675
|
+
},
|
|
1676
|
+
children: "Commands"
|
|
1677
|
+
}
|
|
1678
|
+
),
|
|
1679
|
+
u.map((p, m) => /* @__PURE__ */ s.jsx(
|
|
1680
|
+
Mt,
|
|
1681
|
+
{
|
|
1682
|
+
command: p,
|
|
1683
|
+
isSelected: m === i,
|
|
1684
|
+
onClick: () => R(p)
|
|
1685
|
+
},
|
|
1686
|
+
p.id
|
|
1687
|
+
))
|
|
1688
|
+
] }),
|
|
1689
|
+
h.length > 0 && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1690
|
+
/* @__PURE__ */ s.jsx(
|
|
1691
|
+
"div",
|
|
1692
|
+
{
|
|
1693
|
+
style: {
|
|
1694
|
+
padding: "8px 16px",
|
|
1695
|
+
fontSize: 11,
|
|
1696
|
+
fontWeight: 600,
|
|
1697
|
+
textTransform: "uppercase",
|
|
1698
|
+
color: "#9ca3af",
|
|
1699
|
+
background: "#f9fafb"
|
|
1700
|
+
},
|
|
1701
|
+
children: "Issues"
|
|
1702
|
+
}
|
|
1703
|
+
),
|
|
1704
|
+
h.map((p, m) => /* @__PURE__ */ s.jsx(
|
|
1705
|
+
Ft,
|
|
1706
|
+
{
|
|
1707
|
+
issue: p,
|
|
1708
|
+
isSelected: u.length + m === i,
|
|
1709
|
+
onClick: () => k(p)
|
|
1710
|
+
},
|
|
1711
|
+
p.id
|
|
1712
|
+
))
|
|
1713
|
+
] })
|
|
1714
|
+
] })
|
|
1715
|
+
}
|
|
1716
|
+
),
|
|
1717
|
+
/* @__PURE__ */ s.jsxs(
|
|
1718
|
+
"div",
|
|
1719
|
+
{
|
|
1720
|
+
style: {
|
|
1721
|
+
padding: "8px 16px",
|
|
1722
|
+
borderTop: "1px solid #e5e7eb",
|
|
1723
|
+
fontSize: 12,
|
|
1724
|
+
color: "#9ca3af",
|
|
1725
|
+
display: "flex",
|
|
1726
|
+
gap: 16
|
|
1727
|
+
},
|
|
1728
|
+
children: [
|
|
1729
|
+
/* @__PURE__ */ s.jsx("span", { children: "↑↓ Navigate" }),
|
|
1730
|
+
/* @__PURE__ */ s.jsx("span", { children: "↵ Select" }),
|
|
1731
|
+
/* @__PURE__ */ s.jsx("span", { children: "Esc Close" })
|
|
1732
|
+
]
|
|
1733
|
+
}
|
|
1734
|
+
)
|
|
1208
1735
|
]
|
|
1209
1736
|
}
|
|
1210
1737
|
)
|
|
1211
1738
|
}
|
|
1212
1739
|
),
|
|
1213
|
-
|
|
1740
|
+
I
|
|
1214
1741
|
);
|
|
1215
1742
|
}
|
|
1216
|
-
function
|
|
1217
|
-
const
|
|
1218
|
-
return /* @__PURE__ */
|
|
1219
|
-
/* @__PURE__ */
|
|
1743
|
+
function Wt({ issue: t }) {
|
|
1744
|
+
const e = t.severity === "error" ? re : t.severity === "warning" ? se : ie;
|
|
1745
|
+
return /* @__PURE__ */ s.jsxs("div", { style: { padding: 16 }, children: [
|
|
1746
|
+
/* @__PURE__ */ s.jsxs("div", { style: {
|
|
1220
1747
|
display: "flex",
|
|
1221
1748
|
alignItems: "flex-start",
|
|
1222
1749
|
gap: 12,
|
|
1223
1750
|
marginBottom: 16
|
|
1224
1751
|
}, children: [
|
|
1225
|
-
/* @__PURE__ */
|
|
1226
|
-
/* @__PURE__ */
|
|
1227
|
-
/* @__PURE__ */
|
|
1752
|
+
/* @__PURE__ */ s.jsx(e, { size: 24, color: le(t.severity) }),
|
|
1753
|
+
/* @__PURE__ */ s.jsxs("div", { children: [
|
|
1754
|
+
/* @__PURE__ */ s.jsx("div", { style: {
|
|
1228
1755
|
fontSize: 16,
|
|
1229
1756
|
fontWeight: 600,
|
|
1230
1757
|
color: "#111827"
|
|
1231
|
-
}, children:
|
|
1232
|
-
/* @__PURE__ */
|
|
1758
|
+
}, children: t.message }),
|
|
1759
|
+
/* @__PURE__ */ s.jsx("div", { style: {
|
|
1233
1760
|
fontSize: 12,
|
|
1234
1761
|
color: "#6b7280",
|
|
1235
1762
|
marginTop: 4
|
|
1236
|
-
}, children:
|
|
1763
|
+
}, children: t.severity.toUpperCase() })
|
|
1237
1764
|
] })
|
|
1238
1765
|
] }),
|
|
1239
|
-
/* @__PURE__ */
|
|
1766
|
+
/* @__PURE__ */ s.jsxs("div", { style: {
|
|
1240
1767
|
background: "#f9fafb",
|
|
1241
1768
|
borderRadius: 8,
|
|
1242
1769
|
padding: 12
|
|
1243
1770
|
}, children: [
|
|
1244
|
-
/* @__PURE__ */
|
|
1245
|
-
/* @__PURE__ */
|
|
1246
|
-
/* @__PURE__ */
|
|
1247
|
-
/* @__PURE__ */
|
|
1771
|
+
/* @__PURE__ */ s.jsx(K, { icon: /* @__PURE__ */ s.jsx(Re, { size: 14 }), label: "File", value: t.filePath }),
|
|
1772
|
+
/* @__PURE__ */ s.jsx(K, { icon: /* @__PURE__ */ s.jsx("span", { children: "📍" }), label: "Line", value: `${t.line}${t.column ? `:${t.column}` : ""}` }),
|
|
1773
|
+
/* @__PURE__ */ s.jsx(K, { icon: /* @__PURE__ */ s.jsx(je, { size: 14 }), label: "Rule", value: t.ruleId }),
|
|
1774
|
+
/* @__PURE__ */ s.jsx(K, { icon: /* @__PURE__ */ s.jsx("span", { children: "🔌" }), label: "Plugin", value: t.pluginId })
|
|
1248
1775
|
] }),
|
|
1249
|
-
|
|
1250
|
-
/* @__PURE__ */
|
|
1251
|
-
/* @__PURE__ */
|
|
1776
|
+
t.dataLoc && /* @__PURE__ */ s.jsxs("div", { style: { marginTop: 16 }, children: [
|
|
1777
|
+
/* @__PURE__ */ s.jsx("div", { style: { fontSize: 12, color: "#6b7280", marginBottom: 4 }, children: "Data Location" }),
|
|
1778
|
+
/* @__PURE__ */ s.jsx("code", { style: {
|
|
1252
1779
|
display: "block",
|
|
1253
1780
|
padding: 8,
|
|
1254
1781
|
background: "#1f2937",
|
|
@@ -1257,27 +1784,27 @@ function ft({ issue: e }) {
|
|
|
1257
1784
|
fontSize: 12,
|
|
1258
1785
|
fontFamily: "monospace",
|
|
1259
1786
|
wordBreak: "break-all"
|
|
1260
|
-
}, children:
|
|
1787
|
+
}, children: t.dataLoc })
|
|
1261
1788
|
] })
|
|
1262
1789
|
] });
|
|
1263
1790
|
}
|
|
1264
|
-
function
|
|
1265
|
-
return /* @__PURE__ */
|
|
1791
|
+
function K({ icon: t, label: e, value: n }) {
|
|
1792
|
+
return /* @__PURE__ */ s.jsxs("div", { style: {
|
|
1266
1793
|
display: "flex",
|
|
1267
1794
|
alignItems: "center",
|
|
1268
1795
|
gap: 8,
|
|
1269
1796
|
padding: "6px 0",
|
|
1270
1797
|
borderBottom: "1px solid #e5e7eb"
|
|
1271
1798
|
}, children: [
|
|
1272
|
-
|
|
1273
|
-
/* @__PURE__ */
|
|
1274
|
-
/* @__PURE__ */
|
|
1799
|
+
t,
|
|
1800
|
+
/* @__PURE__ */ s.jsx("span", { style: { fontSize: 12, color: "#6b7280", width: 50 }, children: e }),
|
|
1801
|
+
/* @__PURE__ */ s.jsx("span", { style: { fontSize: 13, color: "#111827", flex: 1, wordBreak: "break-word" }, children: n })
|
|
1275
1802
|
] });
|
|
1276
1803
|
}
|
|
1277
|
-
function
|
|
1278
|
-
const { getIssuesForDataLoc: n } =
|
|
1279
|
-
return o.length === 0 ? /* @__PURE__ */
|
|
1280
|
-
/* @__PURE__ */
|
|
1804
|
+
function Ut({ dataLoc: t, onSelectIssue: e }) {
|
|
1805
|
+
const { getIssuesForDataLoc: n } = Te(), o = n(t);
|
|
1806
|
+
return o.length === 0 ? /* @__PURE__ */ s.jsx("div", { style: { padding: 16, textAlign: "center", color: "#6b7280" }, children: "No issues for this element" }) : /* @__PURE__ */ s.jsxs("div", { style: { padding: 16 }, children: [
|
|
1807
|
+
/* @__PURE__ */ s.jsxs("div", { style: {
|
|
1281
1808
|
fontSize: 14,
|
|
1282
1809
|
fontWeight: 600,
|
|
1283
1810
|
color: "#111827",
|
|
@@ -1288,32 +1815,32 @@ function pt({ dataLoc: e, onSelectIssue: t }) {
|
|
|
1288
1815
|
o.length !== 1 ? "s" : "",
|
|
1289
1816
|
" at this location"
|
|
1290
1817
|
] }),
|
|
1291
|
-
/* @__PURE__ */
|
|
1818
|
+
/* @__PURE__ */ s.jsx("div", { style: {
|
|
1292
1819
|
background: "#f9fafb",
|
|
1293
1820
|
borderRadius: 8,
|
|
1294
1821
|
overflow: "hidden"
|
|
1295
|
-
}, children: o.map((r,
|
|
1296
|
-
const
|
|
1297
|
-
return /* @__PURE__ */
|
|
1822
|
+
}, children: o.map((r, i) => {
|
|
1823
|
+
const l = r.severity === "error" ? re : r.severity === "warning" ? se : ie;
|
|
1824
|
+
return /* @__PURE__ */ s.jsxs(
|
|
1298
1825
|
"div",
|
|
1299
1826
|
{
|
|
1300
|
-
onClick: () =>
|
|
1827
|
+
onClick: () => e(r),
|
|
1301
1828
|
style: {
|
|
1302
1829
|
display: "flex",
|
|
1303
1830
|
alignItems: "flex-start",
|
|
1304
1831
|
gap: 10,
|
|
1305
1832
|
padding: 12,
|
|
1306
1833
|
cursor: "pointer",
|
|
1307
|
-
borderBottom:
|
|
1834
|
+
borderBottom: i < o.length - 1 ? "1px solid #e5e7eb" : void 0
|
|
1308
1835
|
},
|
|
1309
1836
|
children: [
|
|
1310
|
-
/* @__PURE__ */
|
|
1311
|
-
/* @__PURE__ */
|
|
1312
|
-
/* @__PURE__ */
|
|
1837
|
+
/* @__PURE__ */ s.jsx(l, { size: 16, color: le(r.severity) }),
|
|
1838
|
+
/* @__PURE__ */ s.jsxs("div", { style: { flex: 1 }, children: [
|
|
1839
|
+
/* @__PURE__ */ s.jsx("div", { style: {
|
|
1313
1840
|
fontSize: 13,
|
|
1314
1841
|
color: "#111827"
|
|
1315
1842
|
}, children: r.message }),
|
|
1316
|
-
/* @__PURE__ */
|
|
1843
|
+
/* @__PURE__ */ s.jsx("div", { style: {
|
|
1317
1844
|
fontSize: 11,
|
|
1318
1845
|
color: "#6b7280",
|
|
1319
1846
|
marginTop: 2
|
|
@@ -1324,31 +1851,31 @@ function pt({ dataLoc: e, onSelectIssue: t }) {
|
|
|
1324
1851
|
r.id
|
|
1325
1852
|
);
|
|
1326
1853
|
}) }),
|
|
1327
|
-
/* @__PURE__ */
|
|
1854
|
+
/* @__PURE__ */ s.jsx("div", { style: {
|
|
1328
1855
|
marginTop: 12,
|
|
1329
1856
|
fontSize: 11,
|
|
1330
1857
|
color: "#9ca3af",
|
|
1331
1858
|
wordBreak: "break-all"
|
|
1332
|
-
}, children:
|
|
1859
|
+
}, children: t })
|
|
1333
1860
|
] });
|
|
1334
1861
|
}
|
|
1335
|
-
function
|
|
1336
|
-
const
|
|
1337
|
-
if (!
|
|
1338
|
-
const
|
|
1339
|
-
|
|
1862
|
+
function Ht() {
|
|
1863
|
+
const t = v((u) => u.inspector.open), e = v((u) => u.inspector.panelId), n = v((u) => u.inspector.data), o = v((u) => u.inspector.width), r = v((u) => u.closeInspector), i = v((u) => u.openInspector);
|
|
1864
|
+
if (!t) return null;
|
|
1865
|
+
const l = (u) => {
|
|
1866
|
+
i("issue", { issue: u });
|
|
1340
1867
|
};
|
|
1341
|
-
let
|
|
1342
|
-
|
|
1343
|
-
|
|
1868
|
+
let c = null, f = "Inspector";
|
|
1869
|
+
e === "issue" && n?.issue ? (f = "Issue Details", c = /* @__PURE__ */ s.jsx(Wt, { issue: n.issue })) : e === "element" && n?.dataLoc ? (f = "Element Issues", c = /* @__PURE__ */ s.jsx(
|
|
1870
|
+
Ut,
|
|
1344
1871
|
{
|
|
1345
1872
|
dataLoc: n.dataLoc,
|
|
1346
|
-
onSelectIssue:
|
|
1873
|
+
onSelectIssue: l
|
|
1347
1874
|
}
|
|
1348
|
-
)) :
|
|
1875
|
+
)) : c = /* @__PURE__ */ s.jsx("div", { style: { padding: 16, color: "#6b7280", textAlign: "center" }, children: "Select an issue or element to inspect" });
|
|
1349
1876
|
const d = document.getElementById("uilint-portal") || document.body;
|
|
1350
|
-
return
|
|
1351
|
-
/* @__PURE__ */
|
|
1877
|
+
return Y(
|
|
1878
|
+
/* @__PURE__ */ s.jsxs(
|
|
1352
1879
|
"div",
|
|
1353
1880
|
{
|
|
1354
1881
|
style: {
|
|
@@ -1365,15 +1892,15 @@ function ht() {
|
|
|
1365
1892
|
flexDirection: "column"
|
|
1366
1893
|
},
|
|
1367
1894
|
children: [
|
|
1368
|
-
/* @__PURE__ */
|
|
1895
|
+
/* @__PURE__ */ s.jsxs("div", { style: {
|
|
1369
1896
|
display: "flex",
|
|
1370
1897
|
alignItems: "center",
|
|
1371
1898
|
justifyContent: "space-between",
|
|
1372
1899
|
padding: "12px 16px",
|
|
1373
1900
|
borderBottom: "1px solid #e5e7eb"
|
|
1374
1901
|
}, children: [
|
|
1375
|
-
/* @__PURE__ */
|
|
1376
|
-
/* @__PURE__ */
|
|
1902
|
+
/* @__PURE__ */ s.jsx("span", { style: { fontWeight: 600, color: "#111827" }, children: f }),
|
|
1903
|
+
/* @__PURE__ */ s.jsx(
|
|
1377
1904
|
"button",
|
|
1378
1905
|
{
|
|
1379
1906
|
onClick: r,
|
|
@@ -1384,33 +1911,33 @@ function ht() {
|
|
|
1384
1911
|
padding: 4,
|
|
1385
1912
|
color: "#6b7280"
|
|
1386
1913
|
},
|
|
1387
|
-
children: /* @__PURE__ */
|
|
1914
|
+
children: /* @__PURE__ */ s.jsx(Ae, { size: 20 })
|
|
1388
1915
|
}
|
|
1389
1916
|
)
|
|
1390
1917
|
] }),
|
|
1391
|
-
/* @__PURE__ */
|
|
1918
|
+
/* @__PURE__ */ s.jsx("div", { style: { flex: 1, overflowY: "auto" }, children: c })
|
|
1392
1919
|
]
|
|
1393
1920
|
}
|
|
1394
1921
|
),
|
|
1395
1922
|
d
|
|
1396
1923
|
);
|
|
1397
1924
|
}
|
|
1398
|
-
function
|
|
1925
|
+
function Yt() {
|
|
1399
1926
|
if (typeof document > "u") return;
|
|
1400
|
-
let
|
|
1401
|
-
return
|
|
1402
|
-
}
|
|
1403
|
-
function
|
|
1404
|
-
return
|
|
1405
|
-
|
|
1406
|
-
}, [
|
|
1407
|
-
/* @__PURE__ */
|
|
1408
|
-
/* @__PURE__ */
|
|
1409
|
-
/* @__PURE__ */
|
|
1410
|
-
/* @__PURE__ */
|
|
1927
|
+
let t = document.getElementById("uilint-portal");
|
|
1928
|
+
return t || (t = document.createElement("div"), t.id = "uilint-portal", t.style.cssText = "position: fixed; top: 0; left: 0; z-index: 99990; pointer-events: none;", document.body.appendChild(t)), t;
|
|
1929
|
+
}
|
|
1930
|
+
function Cn({ enabled: t = !0 }) {
|
|
1931
|
+
return $t(), z(() => {
|
|
1932
|
+
t && Yt();
|
|
1933
|
+
}, [t]), t ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1934
|
+
/* @__PURE__ */ s.jsx(At, {}),
|
|
1935
|
+
/* @__PURE__ */ s.jsx(zt, {}),
|
|
1936
|
+
/* @__PURE__ */ s.jsx(Bt, {}),
|
|
1937
|
+
/* @__PURE__ */ s.jsx(Ht, {})
|
|
1411
1938
|
] }) : null;
|
|
1412
1939
|
}
|
|
1413
|
-
const
|
|
1940
|
+
const In = [
|
|
1414
1941
|
"#3B82F6",
|
|
1415
1942
|
// blue
|
|
1416
1943
|
"#8B5CF6",
|
|
@@ -1435,10 +1962,10 @@ const Gt = [
|
|
|
1435
1962
|
// teal
|
|
1436
1963
|
"#A855F7"
|
|
1437
1964
|
// purple
|
|
1438
|
-
],
|
|
1965
|
+
], En = {
|
|
1439
1966
|
hideNodeModules: !0,
|
|
1440
1967
|
autoScanEnabled: !1
|
|
1441
|
-
},
|
|
1968
|
+
}, N = "data-loc", Ce = [
|
|
1442
1969
|
"#3B82F6",
|
|
1443
1970
|
"#8B5CF6",
|
|
1444
1971
|
"#EC4899",
|
|
@@ -1451,7 +1978,7 @@ const Gt = [
|
|
|
1451
1978
|
"#F97316",
|
|
1452
1979
|
"#14B8A6",
|
|
1453
1980
|
"#A855F7"
|
|
1454
|
-
],
|
|
1981
|
+
], qt = /* @__PURE__ */ new Set([
|
|
1455
1982
|
"SCRIPT",
|
|
1456
1983
|
"STYLE",
|
|
1457
1984
|
"SVG",
|
|
@@ -1461,131 +1988,131 @@ const Gt = [
|
|
|
1461
1988
|
"META",
|
|
1462
1989
|
"LINK"
|
|
1463
1990
|
]);
|
|
1464
|
-
function
|
|
1465
|
-
let
|
|
1466
|
-
if (!
|
|
1467
|
-
if (
|
|
1468
|
-
|
|
1469
|
-
const
|
|
1470
|
-
|
|
1991
|
+
function Gt(t) {
|
|
1992
|
+
let e = t.getAttribute(N);
|
|
1993
|
+
if (!e) return null;
|
|
1994
|
+
if (e.startsWith("loc:")) {
|
|
1995
|
+
e = e.slice(4);
|
|
1996
|
+
const c = e.lastIndexOf("#");
|
|
1997
|
+
c !== -1 && (e = e.slice(0, c));
|
|
1471
1998
|
}
|
|
1472
|
-
const n =
|
|
1999
|
+
const n = e.split(":");
|
|
1473
2000
|
if (n.length < 2) return null;
|
|
1474
|
-
const o = n[n.length - 1], r = n[n.length - 2],
|
|
1475
|
-
if (
|
|
1476
|
-
const
|
|
1477
|
-
return isNaN(
|
|
1478
|
-
} else if (
|
|
1479
|
-
const
|
|
1480
|
-
return isNaN(
|
|
2001
|
+
const o = n[n.length - 1], r = n[n.length - 2], i = /^\d+$/.test(o), l = /^\d+$/.test(r);
|
|
2002
|
+
if (i && l) {
|
|
2003
|
+
const c = parseInt(o, 10), f = parseInt(r, 10), d = n.slice(0, -2).join(":");
|
|
2004
|
+
return isNaN(f) || isNaN(c) || !d ? null : { fileName: d, lineNumber: f, columnNumber: c };
|
|
2005
|
+
} else if (i) {
|
|
2006
|
+
const c = parseInt(o, 10), f = n.slice(0, -1).join(":");
|
|
2007
|
+
return isNaN(c) || !f ? null : { fileName: f, lineNumber: c };
|
|
1481
2008
|
}
|
|
1482
2009
|
return null;
|
|
1483
2010
|
}
|
|
1484
|
-
function
|
|
1485
|
-
return
|
|
2011
|
+
function Kt(t) {
|
|
2012
|
+
return t.includes("node_modules");
|
|
1486
2013
|
}
|
|
1487
|
-
function
|
|
1488
|
-
const
|
|
1489
|
-
return
|
|
2014
|
+
function Vt(t) {
|
|
2015
|
+
const e = t.split("/");
|
|
2016
|
+
return e[e.length - 1] || t;
|
|
1490
2017
|
}
|
|
1491
|
-
function
|
|
1492
|
-
if (
|
|
1493
|
-
const
|
|
1494
|
-
if (
|
|
1495
|
-
const n =
|
|
2018
|
+
function Jt(t) {
|
|
2019
|
+
if (qt.has(t.tagName.toUpperCase()) || t.hasAttribute("data-ui-lint") || t.getAttribute("aria-hidden") === "true") return !0;
|
|
2020
|
+
const e = window.getComputedStyle(t);
|
|
2021
|
+
if (e.display === "none" || e.visibility === "hidden") return !0;
|
|
2022
|
+
const n = t.getBoundingClientRect();
|
|
1496
2023
|
return n.width === 0 || n.height === 0;
|
|
1497
2024
|
}
|
|
1498
|
-
function
|
|
2025
|
+
function kn(t = document.body, e = !0) {
|
|
1499
2026
|
const n = [], o = /* @__PURE__ */ new Map();
|
|
1500
|
-
|
|
1501
|
-
const r =
|
|
1502
|
-
for (const
|
|
1503
|
-
if (
|
|
1504
|
-
const
|
|
1505
|
-
if (!
|
|
2027
|
+
Xt();
|
|
2028
|
+
const r = t.querySelectorAll(`[${N}]`);
|
|
2029
|
+
for (const i of r) {
|
|
2030
|
+
if (Jt(i)) continue;
|
|
2031
|
+
const l = Gt(i);
|
|
2032
|
+
if (!l || e && Kt(l.fileName))
|
|
1506
2033
|
continue;
|
|
1507
|
-
let
|
|
1508
|
-
if (
|
|
1509
|
-
|
|
1510
|
-
const
|
|
1511
|
-
|
|
2034
|
+
let c = i.getAttribute(N);
|
|
2035
|
+
if (c.startsWith("loc:")) {
|
|
2036
|
+
c = c.slice(4);
|
|
2037
|
+
const u = c.lastIndexOf("#");
|
|
2038
|
+
u !== -1 && (c = c.slice(0, u));
|
|
1512
2039
|
}
|
|
1513
|
-
const
|
|
1514
|
-
o.set(
|
|
1515
|
-
const d = `loc:${
|
|
1516
|
-
|
|
2040
|
+
const f = (o.get(c) ?? 0) + 1;
|
|
2041
|
+
o.set(c, f);
|
|
2042
|
+
const d = `loc:${c}#${f}`;
|
|
2043
|
+
i.setAttribute(N, d), n.push({
|
|
1517
2044
|
id: d,
|
|
1518
|
-
element:
|
|
1519
|
-
tagName:
|
|
1520
|
-
className: typeof
|
|
1521
|
-
source:
|
|
1522
|
-
rect:
|
|
2045
|
+
element: i,
|
|
2046
|
+
tagName: i.tagName.toLowerCase(),
|
|
2047
|
+
className: typeof i.className == "string" ? i.className : "",
|
|
2048
|
+
source: l,
|
|
2049
|
+
rect: i.getBoundingClientRect()
|
|
1523
2050
|
});
|
|
1524
2051
|
}
|
|
1525
2052
|
return n;
|
|
1526
2053
|
}
|
|
1527
|
-
function
|
|
1528
|
-
const
|
|
1529
|
-
for (const r of
|
|
2054
|
+
function Pn(t) {
|
|
2055
|
+
const e = /* @__PURE__ */ new Map();
|
|
2056
|
+
for (const r of t) {
|
|
1530
2057
|
if (!r.source) continue;
|
|
1531
|
-
const
|
|
1532
|
-
|
|
2058
|
+
const i = r.source.fileName, l = e.get(i) || [];
|
|
2059
|
+
l.push(r), e.set(i, l);
|
|
1533
2060
|
}
|
|
1534
2061
|
const n = [];
|
|
1535
2062
|
let o = 0;
|
|
1536
|
-
for (const [r,
|
|
2063
|
+
for (const [r, i] of e)
|
|
1537
2064
|
n.push({
|
|
1538
2065
|
path: r,
|
|
1539
|
-
displayName:
|
|
1540
|
-
color:
|
|
1541
|
-
elements:
|
|
2066
|
+
displayName: Vt(r),
|
|
2067
|
+
color: Ce[o % Ce.length],
|
|
2068
|
+
elements: i
|
|
1542
2069
|
}), o++;
|
|
1543
|
-
return n.sort((r,
|
|
2070
|
+
return n.sort((r, i) => i.elements.length - r.elements.length), n;
|
|
1544
2071
|
}
|
|
1545
|
-
function
|
|
1546
|
-
document.querySelectorAll(`[${
|
|
1547
|
-
const n =
|
|
2072
|
+
function Xt() {
|
|
2073
|
+
document.querySelectorAll(`[${N}]`).forEach((e) => {
|
|
2074
|
+
const n = e.getAttribute(N);
|
|
1548
2075
|
if (n && n.startsWith("loc:")) {
|
|
1549
2076
|
let o = n.slice(4);
|
|
1550
2077
|
const r = o.lastIndexOf("#");
|
|
1551
|
-
r !== -1 && (o = o.slice(0, r)),
|
|
2078
|
+
r !== -1 && (o = o.slice(0, r)), e.setAttribute(N, o);
|
|
1552
2079
|
}
|
|
1553
2080
|
});
|
|
1554
2081
|
}
|
|
1555
|
-
function
|
|
1556
|
-
return document.querySelector(`[${
|
|
2082
|
+
function Rn(t) {
|
|
2083
|
+
return document.querySelector(`[${N}="${t}"]`);
|
|
1557
2084
|
}
|
|
1558
|
-
function
|
|
1559
|
-
return
|
|
1560
|
-
...
|
|
1561
|
-
rect:
|
|
2085
|
+
function jn(t) {
|
|
2086
|
+
return t.map((e) => ({
|
|
2087
|
+
...e,
|
|
2088
|
+
rect: e.element.getBoundingClientRect()
|
|
1562
2089
|
}));
|
|
1563
2090
|
}
|
|
1564
|
-
function
|
|
1565
|
-
const { fileName: o, lineNumber: r, columnNumber:
|
|
1566
|
-
let
|
|
1567
|
-
return n && !o.startsWith("/") && (
|
|
1568
|
-
|
|
1569
|
-
)}:${r}:${
|
|
1570
|
-
|
|
1571
|
-
)}:${r}:${
|
|
1572
|
-
}
|
|
1573
|
-
const
|
|
1574
|
-
async function
|
|
1575
|
-
const
|
|
1576
|
-
if (
|
|
2091
|
+
function An(t, e = "cursor", n) {
|
|
2092
|
+
const { fileName: o, lineNumber: r, columnNumber: i } = t, l = i ?? 1;
|
|
2093
|
+
let c = o;
|
|
2094
|
+
return n && !o.startsWith("/") && (c = `${n.endsWith("/") ? n.slice(0, -1) : n}/${o}`), e === "cursor" ? `cursor://file/${encodeURIComponent(
|
|
2095
|
+
c
|
|
2096
|
+
)}:${r}:${l}` : `vscode://file/${encodeURIComponent(
|
|
2097
|
+
c
|
|
2098
|
+
)}:${r}:${l}`;
|
|
2099
|
+
}
|
|
2100
|
+
const F = /* @__PURE__ */ new Map(), ae = 300 * 1e3, Zt = "/api/.uilint/source";
|
|
2101
|
+
async function _e(t) {
|
|
2102
|
+
const e = F.get(t);
|
|
2103
|
+
if (e && Date.now() - e.fetchedAt < ae)
|
|
1577
2104
|
return {
|
|
1578
|
-
content:
|
|
1579
|
-
relativePath:
|
|
2105
|
+
content: e.content,
|
|
2106
|
+
relativePath: e.relativePath
|
|
1580
2107
|
};
|
|
1581
2108
|
try {
|
|
1582
2109
|
const n = await fetch(
|
|
1583
|
-
`${
|
|
2110
|
+
`${Zt}?path=${encodeURIComponent(t)}`
|
|
1584
2111
|
);
|
|
1585
2112
|
if (!n.ok)
|
|
1586
2113
|
return console.warn(`[UILint] Failed to fetch source: ${n.statusText}`), null;
|
|
1587
2114
|
const o = await n.json();
|
|
1588
|
-
return
|
|
2115
|
+
return F.set(t, {
|
|
1589
2116
|
...o,
|
|
1590
2117
|
fetchedAt: Date.now()
|
|
1591
2118
|
}), o;
|
|
@@ -1593,40 +2120,40 @@ async function Ce(e) {
|
|
|
1593
2120
|
return console.error("[UILint] Error fetching source:", n), null;
|
|
1594
2121
|
}
|
|
1595
2122
|
}
|
|
1596
|
-
async function
|
|
1597
|
-
const n = await
|
|
2123
|
+
async function Tn(t, e = 5) {
|
|
2124
|
+
const n = await _e(t.fileName);
|
|
1598
2125
|
if (!n) return null;
|
|
1599
2126
|
const o = n.content.split(`
|
|
1600
|
-
`), r =
|
|
2127
|
+
`), r = t.lineNumber - 1, i = Math.max(0, r - e), l = Math.min(o.length, r + e + 1);
|
|
1601
2128
|
return {
|
|
1602
|
-
lines: o.slice(
|
|
1603
|
-
startLine:
|
|
2129
|
+
lines: o.slice(i, l),
|
|
2130
|
+
startLine: i + 1,
|
|
1604
2131
|
// Back to 1-indexed
|
|
1605
|
-
highlightLine:
|
|
2132
|
+
highlightLine: t.lineNumber,
|
|
1606
2133
|
relativePath: n.relativePath
|
|
1607
2134
|
};
|
|
1608
2135
|
}
|
|
1609
|
-
function
|
|
1610
|
-
|
|
2136
|
+
function _n() {
|
|
2137
|
+
F.clear();
|
|
1611
2138
|
}
|
|
1612
|
-
function
|
|
1613
|
-
const
|
|
1614
|
-
return
|
|
1615
|
-
content:
|
|
1616
|
-
relativePath:
|
|
2139
|
+
function Nn(t) {
|
|
2140
|
+
const e = F.get(t);
|
|
2141
|
+
return e ? Date.now() - e.fetchedAt >= ae ? (F.delete(t), null) : {
|
|
2142
|
+
content: e.content,
|
|
2143
|
+
relativePath: e.relativePath
|
|
1617
2144
|
} : null;
|
|
1618
2145
|
}
|
|
1619
|
-
async function
|
|
1620
|
-
const
|
|
1621
|
-
const r =
|
|
1622
|
-
return !r || Date.now() - r.fetchedAt >=
|
|
2146
|
+
async function Ln(t) {
|
|
2147
|
+
const e = [...new Set(t)].filter((o) => {
|
|
2148
|
+
const r = F.get(o);
|
|
2149
|
+
return !r || Date.now() - r.fetchedAt >= ae;
|
|
1623
2150
|
}), n = 5;
|
|
1624
|
-
for (let o = 0; o <
|
|
1625
|
-
const r =
|
|
1626
|
-
await Promise.all(r.map(
|
|
2151
|
+
for (let o = 0; o < e.length; o += n) {
|
|
2152
|
+
const r = e.slice(o, o + n);
|
|
2153
|
+
await Promise.all(r.map(_e));
|
|
1627
2154
|
}
|
|
1628
2155
|
}
|
|
1629
|
-
const
|
|
2156
|
+
const X = "data-elements", Qt = /* @__PURE__ */ new Set(["SCRIPT", "STYLE", "SVG", "NOSCRIPT", "TEMPLATE"]), en = /* @__PURE__ */ new Set([
|
|
1630
2157
|
"HEADER",
|
|
1631
2158
|
"NAV",
|
|
1632
2159
|
"MAIN",
|
|
@@ -1634,124 +2161,124 @@ const V = "data-elements", It = /* @__PURE__ */ new Set(["SCRIPT", "STYLE", "SVG
|
|
|
1634
2161
|
"SECTION",
|
|
1635
2162
|
"ARTICLE",
|
|
1636
2163
|
"ASIDE"
|
|
1637
|
-
]),
|
|
2164
|
+
]), V = {
|
|
1638
2165
|
button: /\b(btn|button)\b/i,
|
|
1639
2166
|
card: /\b(card)\b/i,
|
|
1640
2167
|
input: /\b(input|field|form-control)\b/i,
|
|
1641
2168
|
link: /\b(link)\b/i
|
|
1642
2169
|
};
|
|
1643
|
-
let
|
|
1644
|
-
function
|
|
1645
|
-
document.querySelectorAll(`[${
|
|
2170
|
+
let Ne = 0;
|
|
2171
|
+
function tn() {
|
|
2172
|
+
document.querySelectorAll(`[${X}]`).forEach((e) => e.removeAttribute(X)), Ne = 0;
|
|
1646
2173
|
}
|
|
1647
|
-
function
|
|
1648
|
-
return `el-${++
|
|
2174
|
+
function nn() {
|
|
2175
|
+
return `el-${++Ne}`;
|
|
1649
2176
|
}
|
|
1650
|
-
function
|
|
1651
|
-
const n =
|
|
1652
|
-
return n.length <=
|
|
2177
|
+
function on(t, e = 50) {
|
|
2178
|
+
const n = t.trim().replace(/\s+/g, " ");
|
|
2179
|
+
return n.length <= e ? n : n.slice(0, e - 3) + "...";
|
|
1653
2180
|
}
|
|
1654
|
-
function
|
|
1655
|
-
const n =
|
|
2181
|
+
function rn(t, e) {
|
|
2182
|
+
const n = t.getAttribute("role");
|
|
1656
2183
|
if (n) {
|
|
1657
2184
|
if (n === "button") return "button";
|
|
1658
2185
|
if (n === "link") return "link";
|
|
1659
2186
|
if (n === "textbox" || n === "searchbox") return "input";
|
|
1660
2187
|
if (n === "heading") return "heading";
|
|
1661
2188
|
}
|
|
1662
|
-
const o =
|
|
2189
|
+
const o = t.tagName.toUpperCase();
|
|
1663
2190
|
if (o === "BUTTON") return "button";
|
|
1664
2191
|
if (o === "A") return "link";
|
|
1665
2192
|
if (o === "INPUT" || o === "TEXTAREA" || o === "SELECT") return "input";
|
|
1666
2193
|
if (/^H[1-6]$/.test(o)) return "heading";
|
|
1667
|
-
const r =
|
|
2194
|
+
const r = t.getAttribute("data-ui-component");
|
|
1668
2195
|
if (r) {
|
|
1669
|
-
const
|
|
1670
|
-
if (
|
|
1671
|
-
if (
|
|
1672
|
-
if (
|
|
1673
|
-
if (
|
|
2196
|
+
const c = r.toLowerCase();
|
|
2197
|
+
if (c.includes("button")) return "button";
|
|
2198
|
+
if (c.includes("card")) return "card";
|
|
2199
|
+
if (c.includes("input") || c.includes("field")) return "input";
|
|
2200
|
+
if (c.includes("link")) return "link";
|
|
1674
2201
|
}
|
|
1675
|
-
const
|
|
1676
|
-
if (typeof
|
|
1677
|
-
if (
|
|
1678
|
-
if (
|
|
1679
|
-
if (
|
|
1680
|
-
if (
|
|
2202
|
+
const i = t.className;
|
|
2203
|
+
if (typeof i == "string") {
|
|
2204
|
+
if (V.button.test(i)) return "button";
|
|
2205
|
+
if (V.card.test(i)) return "card";
|
|
2206
|
+
if (V.input.test(i)) return "input";
|
|
2207
|
+
if (V.link.test(i)) return "link";
|
|
1681
2208
|
}
|
|
1682
|
-
if (
|
|
1683
|
-
if (
|
|
1684
|
-
const
|
|
1685
|
-
return
|
|
1686
|
-
}
|
|
1687
|
-
function
|
|
1688
|
-
if (
|
|
1689
|
-
const n =
|
|
1690
|
-
return !!(n || (o || r) &&
|
|
1691
|
-
}
|
|
1692
|
-
function
|
|
1693
|
-
const
|
|
1694
|
-
if (
|
|
1695
|
-
const n =
|
|
2209
|
+
if (sn(t, e)) return "card";
|
|
2210
|
+
if (ln(e)) return "container";
|
|
2211
|
+
const l = t.textContent?.trim() || "";
|
|
2212
|
+
return l.length > 0 && l.length < 200 ? "text" : "other";
|
|
2213
|
+
}
|
|
2214
|
+
function sn(t, e) {
|
|
2215
|
+
if (t.children.length === 0) return !1;
|
|
2216
|
+
const n = e.boxShadow && e.boxShadow !== "none", o = e.backgroundColor && e.backgroundColor !== "transparent" && e.backgroundColor !== "rgba(0, 0, 0, 0)", r = e.border && e.border !== "none" && !e.border.includes("0px"), i = e.borderRadius && e.borderRadius !== "0px";
|
|
2217
|
+
return !!(n || (o || r) && i);
|
|
2218
|
+
}
|
|
2219
|
+
function ln(t) {
|
|
2220
|
+
const e = t.display;
|
|
2221
|
+
if (e !== "flex" && e !== "grid") return !1;
|
|
2222
|
+
const n = t.gap;
|
|
1696
2223
|
if (n && n !== "normal" && n !== "0px") return !0;
|
|
1697
|
-
const o =
|
|
2224
|
+
const o = t.padding;
|
|
1698
2225
|
if (o && o !== "0px") {
|
|
1699
2226
|
const r = o.match(/(\d+)px/);
|
|
1700
2227
|
if (r && parseInt(r[1], 10) > 8) return !0;
|
|
1701
2228
|
}
|
|
1702
2229
|
return !1;
|
|
1703
2230
|
}
|
|
1704
|
-
function
|
|
1705
|
-
const
|
|
1706
|
-
let n =
|
|
1707
|
-
for (; n &&
|
|
2231
|
+
function an(t) {
|
|
2232
|
+
const e = [];
|
|
2233
|
+
let n = t.parentElement;
|
|
2234
|
+
for (; n && e.length < 3; ) {
|
|
1708
2235
|
const o = n.tagName.toUpperCase();
|
|
1709
|
-
|
|
2236
|
+
en.has(o) && e.unshift(o.toLowerCase()), n = n.parentElement;
|
|
1710
2237
|
}
|
|
1711
|
-
return
|
|
2238
|
+
return e.join(" > ") || "root";
|
|
1712
2239
|
}
|
|
1713
|
-
function
|
|
2240
|
+
function cn(t) {
|
|
1714
2241
|
return {
|
|
1715
|
-
fontSize:
|
|
1716
|
-
fontWeight:
|
|
1717
|
-
color:
|
|
1718
|
-
backgroundColor:
|
|
1719
|
-
padding:
|
|
1720
|
-
borderRadius:
|
|
1721
|
-
border:
|
|
1722
|
-
boxShadow:
|
|
1723
|
-
gap:
|
|
2242
|
+
fontSize: t.fontSize || void 0,
|
|
2243
|
+
fontWeight: t.fontWeight || void 0,
|
|
2244
|
+
color: t.color || void 0,
|
|
2245
|
+
backgroundColor: t.backgroundColor === "rgba(0, 0, 0, 0)" ? void 0 : t.backgroundColor || void 0,
|
|
2246
|
+
padding: t.padding === "0px" ? void 0 : t.padding || void 0,
|
|
2247
|
+
borderRadius: t.borderRadius === "0px" ? void 0 : t.borderRadius || void 0,
|
|
2248
|
+
border: t.border === "none" || t.border?.includes("0px") ? void 0 : t.border || void 0,
|
|
2249
|
+
boxShadow: t.boxShadow === "none" ? void 0 : t.boxShadow || void 0,
|
|
2250
|
+
gap: t.gap === "normal" || t.gap === "0px" ? void 0 : t.gap || void 0
|
|
1724
2251
|
};
|
|
1725
2252
|
}
|
|
1726
|
-
function
|
|
1727
|
-
if (
|
|
1728
|
-
const
|
|
1729
|
-
return
|
|
2253
|
+
function Le(t) {
|
|
2254
|
+
if (Qt.has(t.tagName.toUpperCase()) || t.hasAttribute("data-ui-lint-ignore") || t.getAttribute("aria-hidden") === "true") return !0;
|
|
2255
|
+
const e = window.getComputedStyle(t);
|
|
2256
|
+
return e.display === "none" || e.visibility === "hidden";
|
|
1730
2257
|
}
|
|
1731
|
-
function
|
|
1732
|
-
if (
|
|
1733
|
-
const
|
|
2258
|
+
function un(t) {
|
|
2259
|
+
if (Le(t)) return null;
|
|
2260
|
+
const e = window.getComputedStyle(t), n = rn(t, e);
|
|
1734
2261
|
if (n === "other") return null;
|
|
1735
|
-
const o =
|
|
1736
|
-
|
|
1737
|
-
const r =
|
|
2262
|
+
const o = nn();
|
|
2263
|
+
t.setAttribute(X, o);
|
|
2264
|
+
const r = t.getBoundingClientRect(), i = t.textContent?.trim().slice(0, 100) || t.getAttribute("aria-label") || "";
|
|
1738
2265
|
return {
|
|
1739
2266
|
id: o,
|
|
1740
|
-
tag:
|
|
2267
|
+
tag: t.tagName.toLowerCase(),
|
|
1741
2268
|
role: n,
|
|
1742
|
-
text:
|
|
1743
|
-
component:
|
|
1744
|
-
context:
|
|
1745
|
-
styles:
|
|
2269
|
+
text: on(i),
|
|
2270
|
+
component: t.getAttribute("data-ui-component") || void 0,
|
|
2271
|
+
context: an(t),
|
|
2272
|
+
styles: cn(e),
|
|
1746
2273
|
rect: {
|
|
1747
2274
|
width: Math.round(r.width),
|
|
1748
2275
|
height: Math.round(r.height)
|
|
1749
2276
|
}
|
|
1750
2277
|
};
|
|
1751
2278
|
}
|
|
1752
|
-
function
|
|
1753
|
-
|
|
1754
|
-
const
|
|
2279
|
+
function On(t) {
|
|
2280
|
+
tn();
|
|
2281
|
+
const e = t || document.body, n = {
|
|
1755
2282
|
buttons: [],
|
|
1756
2283
|
headings: [],
|
|
1757
2284
|
cards: [],
|
|
@@ -1759,35 +2286,35 @@ function rn(e) {
|
|
|
1759
2286
|
inputs: [],
|
|
1760
2287
|
containers: []
|
|
1761
2288
|
}, o = document.createTreeWalker(
|
|
1762
|
-
|
|
2289
|
+
e,
|
|
1763
2290
|
NodeFilter.SHOW_ELEMENT,
|
|
1764
2291
|
{
|
|
1765
|
-
acceptNode: (
|
|
2292
|
+
acceptNode: (i) => Le(i) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
|
|
1766
2293
|
}
|
|
1767
2294
|
);
|
|
1768
2295
|
let r = o.currentNode;
|
|
1769
2296
|
for (; r; ) {
|
|
1770
2297
|
if (r instanceof Element) {
|
|
1771
|
-
const
|
|
1772
|
-
if (
|
|
1773
|
-
switch (
|
|
2298
|
+
const i = un(r);
|
|
2299
|
+
if (i)
|
|
2300
|
+
switch (i.role) {
|
|
1774
2301
|
case "button":
|
|
1775
|
-
n.buttons.push(
|
|
2302
|
+
n.buttons.push(i);
|
|
1776
2303
|
break;
|
|
1777
2304
|
case "heading":
|
|
1778
|
-
n.headings.push(
|
|
2305
|
+
n.headings.push(i);
|
|
1779
2306
|
break;
|
|
1780
2307
|
case "card":
|
|
1781
|
-
n.cards.push(
|
|
2308
|
+
n.cards.push(i);
|
|
1782
2309
|
break;
|
|
1783
2310
|
case "link":
|
|
1784
|
-
n.links.push(
|
|
2311
|
+
n.links.push(i);
|
|
1785
2312
|
break;
|
|
1786
2313
|
case "input":
|
|
1787
|
-
n.inputs.push(
|
|
2314
|
+
n.inputs.push(i);
|
|
1788
2315
|
break;
|
|
1789
2316
|
case "container":
|
|
1790
|
-
n.containers.push(
|
|
2317
|
+
n.containers.push(i);
|
|
1791
2318
|
break;
|
|
1792
2319
|
}
|
|
1793
2320
|
}
|
|
@@ -1795,86 +2322,86 @@ function rn(e) {
|
|
|
1795
2322
|
}
|
|
1796
2323
|
return n;
|
|
1797
2324
|
}
|
|
1798
|
-
function
|
|
1799
|
-
return document.querySelector(`[${
|
|
2325
|
+
function Oe(t) {
|
|
2326
|
+
return document.querySelector(`[${X}="${t}"]`);
|
|
1800
2327
|
}
|
|
1801
|
-
function
|
|
2328
|
+
function dn() {
|
|
1802
2329
|
if (typeof document > "u")
|
|
1803
2330
|
throw new Error("getUILintPortalHost() called outside of a DOM environment");
|
|
1804
2331
|
return document.querySelector(".uilint-devtool-root") ?? document.body;
|
|
1805
2332
|
}
|
|
1806
|
-
const
|
|
1807
|
-
function
|
|
2333
|
+
const O = "#3b82f6", fn = 14, pn = 22, gn = 2, hn = 3, U = 2;
|
|
2334
|
+
function mn(t, e = !1) {
|
|
1808
2335
|
const n = [];
|
|
1809
|
-
return
|
|
1810
|
-
const
|
|
1811
|
-
if (!
|
|
1812
|
-
const
|
|
2336
|
+
return t.forEach((o, r) => {
|
|
2337
|
+
const i = Oe(o);
|
|
2338
|
+
if (!i) return;
|
|
2339
|
+
const l = i.getBoundingClientRect();
|
|
1813
2340
|
n.push({
|
|
1814
2341
|
id: o,
|
|
1815
2342
|
rect: {
|
|
1816
|
-
top:
|
|
1817
|
-
left:
|
|
1818
|
-
width:
|
|
1819
|
-
height:
|
|
2343
|
+
top: l.top,
|
|
2344
|
+
left: l.left,
|
|
2345
|
+
width: l.width,
|
|
2346
|
+
height: l.height
|
|
1820
2347
|
},
|
|
1821
|
-
badgeNumber:
|
|
2348
|
+
badgeNumber: e && t.length > 1 ? r + 1 : void 0
|
|
1822
2349
|
});
|
|
1823
2350
|
}), n;
|
|
1824
2351
|
}
|
|
1825
|
-
function
|
|
1826
|
-
const
|
|
1827
|
-
return
|
|
1828
|
-
n.elementIds.forEach((o) =>
|
|
1829
|
-
}),
|
|
2352
|
+
function bn(t) {
|
|
2353
|
+
const e = /* @__PURE__ */ new Set();
|
|
2354
|
+
return t.forEach((n) => {
|
|
2355
|
+
n.elementIds.forEach((o) => e.add(o));
|
|
2356
|
+
}), e;
|
|
1830
2357
|
}
|
|
1831
|
-
function
|
|
1832
|
-
const [
|
|
1833
|
-
return /* @__PURE__ */
|
|
2358
|
+
function yn({ rect: t }) {
|
|
2359
|
+
const [e, n] = T(!1), o = e ? pn : fn, r = e ? hn : gn, i = e ? 10 : 6;
|
|
2360
|
+
return /* @__PURE__ */ s.jsxs(
|
|
1834
2361
|
"div",
|
|
1835
2362
|
{
|
|
1836
2363
|
onMouseEnter: () => n(!0),
|
|
1837
2364
|
onMouseLeave: () => n(!1),
|
|
1838
2365
|
style: {
|
|
1839
2366
|
position: "fixed",
|
|
1840
|
-
top:
|
|
1841
|
-
left:
|
|
2367
|
+
top: t.top - o / 2,
|
|
2368
|
+
left: t.left + t.width - o / 2,
|
|
1842
2369
|
width: o,
|
|
1843
2370
|
height: o,
|
|
1844
|
-
borderRadius:
|
|
1845
|
-
backgroundColor:
|
|
1846
|
-
border: `${r}px solid ${
|
|
2371
|
+
borderRadius: e ? 4 : 3,
|
|
2372
|
+
backgroundColor: e ? O : "rgba(59, 130, 246, 0.15)",
|
|
2373
|
+
border: `${r}px solid ${O}`,
|
|
1847
2374
|
pointerEvents: "auto",
|
|
1848
2375
|
cursor: "pointer",
|
|
1849
2376
|
zIndex: 99997,
|
|
1850
|
-
boxShadow:
|
|
2377
|
+
boxShadow: e ? "0 2px 8px rgba(59, 130, 246, 0.4)" : "0 0 4px rgba(59, 130, 246, 0.3)",
|
|
1851
2378
|
display: "flex",
|
|
1852
2379
|
alignItems: "center",
|
|
1853
2380
|
justifyContent: "center",
|
|
1854
2381
|
transition: "all 0.15s ease-out"
|
|
1855
2382
|
},
|
|
1856
2383
|
children: [
|
|
1857
|
-
/* @__PURE__ */
|
|
2384
|
+
/* @__PURE__ */ s.jsx(
|
|
1858
2385
|
"div",
|
|
1859
2386
|
{
|
|
1860
2387
|
style: {
|
|
1861
2388
|
position: "absolute",
|
|
1862
|
-
width:
|
|
2389
|
+
width: i,
|
|
1863
2390
|
height: r,
|
|
1864
|
-
backgroundColor:
|
|
2391
|
+
backgroundColor: e ? "white" : O,
|
|
1865
2392
|
borderRadius: 1,
|
|
1866
2393
|
transition: "all 0.15s ease-out"
|
|
1867
2394
|
}
|
|
1868
2395
|
}
|
|
1869
2396
|
),
|
|
1870
|
-
/* @__PURE__ */
|
|
2397
|
+
/* @__PURE__ */ s.jsx(
|
|
1871
2398
|
"div",
|
|
1872
2399
|
{
|
|
1873
2400
|
style: {
|
|
1874
2401
|
position: "absolute",
|
|
1875
2402
|
width: r,
|
|
1876
|
-
height:
|
|
1877
|
-
backgroundColor:
|
|
2403
|
+
height: i,
|
|
2404
|
+
backgroundColor: e ? "white" : O,
|
|
1878
2405
|
borderRadius: 1,
|
|
1879
2406
|
transition: "all 0.15s ease-out"
|
|
1880
2407
|
}
|
|
@@ -1884,40 +2411,40 @@ function zt({ rect: e }) {
|
|
|
1884
2411
|
}
|
|
1885
2412
|
);
|
|
1886
2413
|
}
|
|
1887
|
-
function
|
|
1888
|
-
rect:
|
|
1889
|
-
badgeNumber:
|
|
2414
|
+
function xn({
|
|
2415
|
+
rect: t,
|
|
2416
|
+
badgeNumber: e
|
|
1890
2417
|
}) {
|
|
1891
|
-
return /* @__PURE__ */
|
|
1892
|
-
/* @__PURE__ */
|
|
2418
|
+
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2419
|
+
/* @__PURE__ */ s.jsx(
|
|
1893
2420
|
"div",
|
|
1894
2421
|
{
|
|
1895
2422
|
style: {
|
|
1896
2423
|
position: "fixed",
|
|
1897
|
-
top:
|
|
1898
|
-
left:
|
|
1899
|
-
width:
|
|
1900
|
-
height:
|
|
1901
|
-
border: `${
|
|
2424
|
+
top: t.top - U,
|
|
2425
|
+
left: t.left - U,
|
|
2426
|
+
width: t.width + U * 2,
|
|
2427
|
+
height: t.height + U * 2,
|
|
2428
|
+
border: `${U}px solid ${O}`,
|
|
1902
2429
|
borderRadius: 4,
|
|
1903
|
-
backgroundColor: `${
|
|
2430
|
+
backgroundColor: `${O}10`,
|
|
1904
2431
|
pointerEvents: "none",
|
|
1905
2432
|
zIndex: 99998,
|
|
1906
2433
|
transition: "all 0.15s ease-out"
|
|
1907
2434
|
}
|
|
1908
2435
|
}
|
|
1909
2436
|
),
|
|
1910
|
-
|
|
2437
|
+
e !== void 0 && /* @__PURE__ */ s.jsx(
|
|
1911
2438
|
"div",
|
|
1912
2439
|
{
|
|
1913
2440
|
style: {
|
|
1914
2441
|
position: "fixed",
|
|
1915
|
-
top:
|
|
1916
|
-
left:
|
|
2442
|
+
top: t.top - 12,
|
|
2443
|
+
left: t.left - 4,
|
|
1917
2444
|
minWidth: 20,
|
|
1918
2445
|
height: 20,
|
|
1919
2446
|
borderRadius: 10,
|
|
1920
|
-
backgroundColor:
|
|
2447
|
+
backgroundColor: O,
|
|
1921
2448
|
color: "white",
|
|
1922
2449
|
fontSize: 11,
|
|
1923
2450
|
fontWeight: 600,
|
|
@@ -1929,105 +2456,105 @@ function Wt({
|
|
|
1929
2456
|
zIndex: 99999,
|
|
1930
2457
|
fontFamily: "system-ui, -apple-system, sans-serif"
|
|
1931
2458
|
},
|
|
1932
|
-
children:
|
|
2459
|
+
children: e
|
|
1933
2460
|
}
|
|
1934
2461
|
)
|
|
1935
2462
|
] });
|
|
1936
2463
|
}
|
|
1937
|
-
function
|
|
1938
|
-
violations:
|
|
1939
|
-
selectedViolation:
|
|
2464
|
+
function zn({
|
|
2465
|
+
violations: t,
|
|
2466
|
+
selectedViolation: e,
|
|
1940
2467
|
lockedViolation: n
|
|
1941
2468
|
}) {
|
|
1942
|
-
const [o, r] =
|
|
2469
|
+
const [o, r] = T([]), [i, l] = T(
|
|
1943
2470
|
[]
|
|
1944
|
-
), [
|
|
2471
|
+
), [c, f] = T(!1), d = n || e, u = E(() => {
|
|
1945
2472
|
if (d) {
|
|
1946
2473
|
r([]);
|
|
1947
2474
|
return;
|
|
1948
2475
|
}
|
|
1949
|
-
const
|
|
1950
|
-
|
|
1951
|
-
const
|
|
1952
|
-
if (!
|
|
1953
|
-
const
|
|
1954
|
-
|
|
1955
|
-
id:
|
|
2476
|
+
const b = bn(t), k = [];
|
|
2477
|
+
b.forEach((R) => {
|
|
2478
|
+
const y = Oe(R);
|
|
2479
|
+
if (!y) return;
|
|
2480
|
+
const I = y.getBoundingClientRect();
|
|
2481
|
+
k.push({
|
|
2482
|
+
id: R,
|
|
1956
2483
|
rect: {
|
|
1957
|
-
top:
|
|
1958
|
-
left:
|
|
1959
|
-
width:
|
|
1960
|
-
height:
|
|
2484
|
+
top: I.top,
|
|
2485
|
+
left: I.left,
|
|
2486
|
+
width: I.width,
|
|
2487
|
+
height: I.height
|
|
1961
2488
|
}
|
|
1962
2489
|
});
|
|
1963
|
-
}), r(
|
|
1964
|
-
}, [
|
|
2490
|
+
}), r(k);
|
|
2491
|
+
}, [t, d]), h = E(() => {
|
|
1965
2492
|
if (!d) {
|
|
1966
|
-
|
|
2493
|
+
l([]);
|
|
1967
2494
|
return;
|
|
1968
2495
|
}
|
|
1969
|
-
const
|
|
1970
|
-
|
|
2496
|
+
const b = mn(d.elementIds, !0);
|
|
2497
|
+
l(b);
|
|
1971
2498
|
}, [d]);
|
|
1972
|
-
if (
|
|
1973
|
-
|
|
1974
|
-
const
|
|
1975
|
-
|
|
2499
|
+
if (z(() => (f(!0), () => f(!1)), []), z(() => {
|
|
2500
|
+
u(), h();
|
|
2501
|
+
const b = () => {
|
|
2502
|
+
u(), h();
|
|
1976
2503
|
};
|
|
1977
|
-
return window.addEventListener("scroll",
|
|
1978
|
-
window.removeEventListener("scroll",
|
|
2504
|
+
return window.addEventListener("scroll", b, !0), window.addEventListener("resize", b), () => {
|
|
2505
|
+
window.removeEventListener("scroll", b, !0), window.removeEventListener("resize", b);
|
|
1979
2506
|
};
|
|
1980
|
-
}, [
|
|
1981
|
-
const
|
|
1982
|
-
!d && o.map((
|
|
1983
|
-
d &&
|
|
2507
|
+
}, [u, h]), !c || t.length === 0) return null;
|
|
2508
|
+
const x = /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2509
|
+
!d && o.map((b) => /* @__PURE__ */ s.jsx(yn, { rect: b.rect }, b.id)),
|
|
2510
|
+
d && i.map((b) => /* @__PURE__ */ s.jsx(xn, { rect: b.rect, badgeNumber: b.badgeNumber }, b.id))
|
|
1984
2511
|
] });
|
|
1985
|
-
return
|
|
2512
|
+
return Y(x, dn());
|
|
1986
2513
|
}
|
|
1987
2514
|
export {
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2515
|
+
Bt as CommandPalette,
|
|
2516
|
+
zn as ConsistencyHighlighter,
|
|
2517
|
+
N as DATA_UILINT_ID,
|
|
2518
|
+
En as DEFAULT_SETTINGS,
|
|
2519
|
+
In as FILE_COLORS,
|
|
2520
|
+
At as FloatingIcon,
|
|
2521
|
+
Ht as InspectorSidebar,
|
|
2522
|
+
Cn as UILint,
|
|
2523
|
+
An as buildEditorUrl,
|
|
2524
|
+
Xt as cleanupDataAttributes,
|
|
2525
|
+
tn as cleanupDataElements,
|
|
2526
|
+
_n as clearSourceCache,
|
|
2527
|
+
Hn as createEmptyStyleGuide,
|
|
2528
|
+
Nt as createIssueId,
|
|
2529
|
+
On as createSnapshot,
|
|
2530
|
+
Yn as createStyleSummary,
|
|
2531
|
+
qn as extractStylesFromDOM,
|
|
2532
|
+
_e as fetchSource,
|
|
2533
|
+
Tn as fetchSourceWithContext,
|
|
2534
|
+
Sn as fromESLintIssue,
|
|
2535
|
+
Gn as generateStyleGuide,
|
|
2536
|
+
Nn as getCachedSource,
|
|
2537
|
+
Vt as getDisplayName,
|
|
2538
|
+
Rn as getElementById,
|
|
2539
|
+
Oe as getElementBySnapshotId,
|
|
2540
|
+
Gt as getSourceFromDataLoc,
|
|
2541
|
+
Pn as groupBySourceFile,
|
|
2542
|
+
Fn as isBrowser,
|
|
2543
|
+
Mn as isJSDOM,
|
|
2544
|
+
Bn as isNode,
|
|
2545
|
+
Kt as isNodeModulesPath,
|
|
2546
|
+
Kn as mergeStyleGuides,
|
|
2547
|
+
_t as parseDataLoc,
|
|
2548
|
+
Vn as parseStyleGuide,
|
|
2549
|
+
Ln as prefetchSources,
|
|
2550
|
+
Wn as scanDOM,
|
|
2551
|
+
kn as scanDOMForSources,
|
|
2552
|
+
Jn as serializeStyles,
|
|
2553
|
+
Lt as severityFromNumber,
|
|
2554
|
+
le as severityToColor,
|
|
2555
|
+
jn as updateElementRects,
|
|
2556
|
+
Tt as useElementRects,
|
|
2557
|
+
Te as useIssues,
|
|
2558
|
+
$t as useKeyboardShortcuts
|
|
2032
2559
|
};
|
|
2033
2560
|
//# sourceMappingURL=index.js.map
|