mates-devtools 0.1.0-beta.4 → 0.1.0-beta.6
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { keyframes as Ce, globalCSS as Te, event as Me, html as
|
|
1
|
+
import { keyframes as Ce, globalCSS as Te, event as Me, html as a, nothing as k, repeat as T, atom as qt, effect as Ie, x as Be, render as Jt, isDevToolsInstalled as Le, installDevToolsHooks as Ee, interceptBefore as Ae, interceptAfter as Re, interceptError as ze } from "mates";
|
|
2
2
|
const Kt = "selected", Pe = "selected", He = Ce("mates-dt-flash", {
|
|
3
3
|
"0%": { background: "var(--dt-flash-bg)", color: "#fff" },
|
|
4
4
|
"100%": { background: "transparent", color: "var(--dt-text-muted)" }
|
|
@@ -905,7 +905,7 @@ function je() {
|
|
|
905
905
|
});
|
|
906
906
|
try {
|
|
907
907
|
n.sort((o, i) => {
|
|
908
|
-
const c = (
|
|
908
|
+
const c = (s) => s.instances.reduce(
|
|
909
909
|
(d, l) => Math.min(d, Z(l)),
|
|
910
910
|
1 / 0
|
|
911
911
|
);
|
|
@@ -987,7 +987,7 @@ function Vt(t, e = 60) {
|
|
|
987
987
|
if (n === "array") {
|
|
988
988
|
const o = t;
|
|
989
989
|
if (o.length === 0) return "[]";
|
|
990
|
-
const i = o.slice(0, 5).map((
|
|
990
|
+
const i = o.slice(0, 5).map((s) => Wt(s)).join(", "), c = o.length > 5 ? ", …" : "";
|
|
991
991
|
return `[${i}${c}] (${o.length})`;
|
|
992
992
|
}
|
|
993
993
|
if (n === "map")
|
|
@@ -1001,7 +1001,7 @@ function Vt(t, e = 60) {
|
|
|
1001
1001
|
if (n === "object") {
|
|
1002
1002
|
const o = t, i = Object.keys(o);
|
|
1003
1003
|
if (i.length === 0) return "{}";
|
|
1004
|
-
const c = i.slice(0, 4).map((l) => `${l}: ${Wt(o[l])}`).join(", "),
|
|
1004
|
+
const c = i.slice(0, 4).map((l) => `${l}: ${Wt(o[l])}`).join(", "), s = i.length > 4 ? ", …" : "", d = `{${c}${s}}`;
|
|
1005
1005
|
return d.length > e ? d.slice(0, e - 1) + "…}" : d;
|
|
1006
1006
|
}
|
|
1007
1007
|
return String(t);
|
|
@@ -1048,32 +1048,32 @@ function Ye(t) {
|
|
|
1048
1048
|
try {
|
|
1049
1049
|
switch (vt(t)) {
|
|
1050
1050
|
case "string":
|
|
1051
|
-
return
|
|
1051
|
+
return a`<span style="${f.string}">"${String(t)}"</span>`;
|
|
1052
1052
|
case "number":
|
|
1053
|
-
return
|
|
1053
|
+
return a`<span style="${f.number}">${String(t)}</span>`;
|
|
1054
1054
|
case "boolean":
|
|
1055
|
-
return
|
|
1055
|
+
return a`<span style="${f.boolean}">${String(t)}</span>`;
|
|
1056
1056
|
case "null":
|
|
1057
|
-
return
|
|
1057
|
+
return a`<span style="${f.null}">null</span>`;
|
|
1058
1058
|
case "undefined":
|
|
1059
|
-
return
|
|
1059
|
+
return a`<span style="${f.undefined}">undefined</span>`;
|
|
1060
1060
|
case "function":
|
|
1061
|
-
return
|
|
1061
|
+
return a`<span style="${f.function}"
|
|
1062
1062
|
>ƒ ${t.name || "anonymous"}()</span
|
|
1063
1063
|
>`;
|
|
1064
1064
|
case "symbol":
|
|
1065
|
-
return
|
|
1065
|
+
return a`<span style="${f.symbol}">${String(t)}</span>`;
|
|
1066
1066
|
case "date":
|
|
1067
|
-
return
|
|
1067
|
+
return a`<span style="${f.string}"
|
|
1068
1068
|
>${t.toISOString()}</span
|
|
1069
1069
|
>`;
|
|
1070
1070
|
case "regexp":
|
|
1071
|
-
return
|
|
1071
|
+
return a`<span style="${f.string}">${String(t)}</span>`;
|
|
1072
1072
|
default:
|
|
1073
|
-
return
|
|
1073
|
+
return a`<span style="${f.preview}">${String(t)}</span>`;
|
|
1074
1074
|
}
|
|
1075
1075
|
} catch {
|
|
1076
|
-
return
|
|
1076
|
+
return a``;
|
|
1077
1077
|
}
|
|
1078
1078
|
}
|
|
1079
1079
|
function Ue(t) {
|
|
@@ -1128,25 +1128,25 @@ function Ue(t) {
|
|
|
1128
1128
|
function O(t, e, n, o = "root", i = 0) {
|
|
1129
1129
|
try {
|
|
1130
1130
|
if (i > 15)
|
|
1131
|
-
return
|
|
1131
|
+
return a`
|
|
1132
1132
|
<div style="${f.row}">
|
|
1133
|
-
${e != null ?
|
|
1133
|
+
${e != null ? a`<span style="${f.key}">${e}</span
|
|
1134
1134
|
><span style="${f.colon}">:</span>` : k}
|
|
1135
1135
|
<span style="${f.preview}">[max depth]</span>
|
|
1136
1136
|
</div>
|
|
1137
1137
|
`;
|
|
1138
|
-
const c = Ge(n),
|
|
1138
|
+
const c = Ge(n), s = c && Ve(t, o);
|
|
1139
1139
|
if (!c)
|
|
1140
|
-
return
|
|
1140
|
+
return a`
|
|
1141
1141
|
<div style="${f.row}">
|
|
1142
1142
|
<span style="${f.toggle}"></span>
|
|
1143
|
-
${e != null ?
|
|
1143
|
+
${e != null ? a`<span style="${f.key}">${e}</span
|
|
1144
1144
|
><span style="${f.colon}">:</span>` : k}
|
|
1145
1145
|
${Ye(n)}
|
|
1146
1146
|
</div>
|
|
1147
1147
|
`;
|
|
1148
|
-
const d =
|
|
1149
|
-
return
|
|
1148
|
+
const d = s ? Ue(n) : [], l = vt(n);
|
|
1149
|
+
return a`
|
|
1150
1150
|
<div>
|
|
1151
1151
|
<div
|
|
1152
1152
|
style="${f.row}cursor:pointer;user-select:none;"
|
|
@@ -1157,14 +1157,14 @@ function O(t, e, n, o = "root", i = 0) {
|
|
|
1157
1157
|
}
|
|
1158
1158
|
}}
|
|
1159
1159
|
>
|
|
1160
|
-
<span style="${f.toggle}">${
|
|
1161
|
-
${e != null ?
|
|
1160
|
+
<span style="${f.toggle}">${s ? "▼" : "▶"}</span>
|
|
1161
|
+
${e != null ? a`<span style="${f.key}">${e}</span
|
|
1162
1162
|
><span style="${f.colon}">:</span>` : k}
|
|
1163
|
-
${
|
|
1163
|
+
${s ? a`<span style="${f.preview}"
|
|
1164
1164
|
>${l === "array" ? `Array(${n.length})` : l === "object" ? "{" : Vt(n)}</span
|
|
1165
|
-
>` :
|
|
1165
|
+
>` : a`<span style="${f.preview}">${Vt(n)}</span>`}
|
|
1166
1166
|
</div>
|
|
1167
|
-
${
|
|
1167
|
+
${s ? a`
|
|
1168
1168
|
<div style="${f.children}">
|
|
1169
1169
|
${d.map(
|
|
1170
1170
|
(u) => O(
|
|
@@ -1175,38 +1175,38 @@ function O(t, e, n, o = "root", i = 0) {
|
|
|
1175
1175
|
i + 1
|
|
1176
1176
|
)
|
|
1177
1177
|
)}
|
|
1178
|
-
${d.length === 0 ?
|
|
1178
|
+
${d.length === 0 ? a`<div style="${f.row}">
|
|
1179
1179
|
<span style="${f.preview}">(empty)</span>
|
|
1180
1180
|
</div>` : k}
|
|
1181
1181
|
</div>
|
|
1182
|
-
${l === "object" &&
|
|
1182
|
+
${l === "object" && s ? a`<div style="${f.row};margin-left:14px;">
|
|
1183
1183
|
<span style="${f.preview}">}</span>
|
|
1184
1184
|
</div>` : k}
|
|
1185
1185
|
` : k}
|
|
1186
1186
|
</div>
|
|
1187
1187
|
`;
|
|
1188
1188
|
} catch {
|
|
1189
|
-
return
|
|
1189
|
+
return a``;
|
|
1190
1190
|
}
|
|
1191
1191
|
}
|
|
1192
1192
|
function _r(t, e, n = "root") {
|
|
1193
1193
|
try {
|
|
1194
1194
|
const o = Object.keys(e);
|
|
1195
|
-
return o.length === 0 ?
|
|
1195
|
+
return o.length === 0 ? a`<div style="color:#777;font-size:13px;padding:2px 0;">
|
|
1196
1196
|
No data
|
|
1197
|
-
</div>` :
|
|
1197
|
+
</div>` : a`
|
|
1198
1198
|
${o.map(
|
|
1199
1199
|
(i) => O(t, i, e[i], `${n}.${i}`, 0)
|
|
1200
1200
|
)}
|
|
1201
1201
|
`;
|
|
1202
1202
|
} catch {
|
|
1203
|
-
return
|
|
1203
|
+
return a``;
|
|
1204
1204
|
}
|
|
1205
1205
|
}
|
|
1206
1206
|
function Xe(t) {
|
|
1207
1207
|
try {
|
|
1208
1208
|
const e = Object.keys(t);
|
|
1209
|
-
return e.length === 0 ?
|
|
1209
|
+
return e.length === 0 ? a`<div style="color: #777; font-size: 13px;">No props</div>` : a`
|
|
1210
1210
|
${T(
|
|
1211
1211
|
e,
|
|
1212
1212
|
(n) => n,
|
|
@@ -1214,12 +1214,12 @@ function Xe(t) {
|
|
|
1214
1214
|
)}
|
|
1215
1215
|
`;
|
|
1216
1216
|
} catch {
|
|
1217
|
-
return
|
|
1217
|
+
return a``;
|
|
1218
1218
|
}
|
|
1219
1219
|
}
|
|
1220
1220
|
function qe(t) {
|
|
1221
1221
|
try {
|
|
1222
|
-
return !t || t.size === 0 ?
|
|
1222
|
+
return !t || t.size === 0 ? a`<div style="color: #777; font-size: 13px;">No scopes</div>` : a`
|
|
1223
1223
|
${[...t?.entries() || []].map(
|
|
1224
1224
|
([e, n]) => {
|
|
1225
1225
|
try {
|
|
@@ -1234,12 +1234,12 @@ function qe(t) {
|
|
|
1234
1234
|
i[l] = "[error reading]";
|
|
1235
1235
|
}
|
|
1236
1236
|
}
|
|
1237
|
-
let
|
|
1238
|
-
for (;
|
|
1239
|
-
for (const l of Object.getOwnPropertyNames(
|
|
1237
|
+
let s = Object.getPrototypeOf(n);
|
|
1238
|
+
for (; s && s !== Object.prototype; ) {
|
|
1239
|
+
for (const l of Object.getOwnPropertyNames(s)) {
|
|
1240
1240
|
if (c.has(l) || l === "constructor" || l === "__isScope___" || l === "reset")
|
|
1241
1241
|
continue;
|
|
1242
|
-
if (Object.getOwnPropertyDescriptor(
|
|
1242
|
+
if (Object.getOwnPropertyDescriptor(s, l)?.get) {
|
|
1243
1243
|
c.add(l);
|
|
1244
1244
|
try {
|
|
1245
1245
|
i[`${l} (get)`] = n[l];
|
|
@@ -1248,10 +1248,10 @@ function qe(t) {
|
|
|
1248
1248
|
}
|
|
1249
1249
|
}
|
|
1250
1250
|
}
|
|
1251
|
-
|
|
1251
|
+
s = Object.getPrototypeOf(s);
|
|
1252
1252
|
}
|
|
1253
1253
|
const d = n;
|
|
1254
|
-
return
|
|
1254
|
+
return a`
|
|
1255
1255
|
<div style="margin-bottom:6px;">
|
|
1256
1256
|
<div
|
|
1257
1257
|
style="color:#4ec9b0;font-weight:500;font-size:13px;margin-bottom:2px;font-family:'SF Mono',Monaco,Consolas,monospace;"
|
|
@@ -1259,9 +1259,9 @@ function qe(t) {
|
|
|
1259
1259
|
${o}
|
|
1260
1260
|
</div>
|
|
1261
1261
|
<div style="margin-left:4px;">
|
|
1262
|
-
${Object.keys(i).length === 0 ?
|
|
1262
|
+
${Object.keys(i).length === 0 ? a`<div style="color:#666;font-size:13px;">
|
|
1263
1263
|
(empty scope)
|
|
1264
|
-
</div>` :
|
|
1264
|
+
</div>` : a`
|
|
1265
1265
|
${Object.keys(i).map(
|
|
1266
1266
|
(l) => O(
|
|
1267
1267
|
d,
|
|
@@ -1276,13 +1276,13 @@ function qe(t) {
|
|
|
1276
1276
|
</div>
|
|
1277
1277
|
`;
|
|
1278
1278
|
} catch {
|
|
1279
|
-
return
|
|
1279
|
+
return a``;
|
|
1280
1280
|
}
|
|
1281
1281
|
}
|
|
1282
1282
|
)}
|
|
1283
1283
|
`;
|
|
1284
1284
|
} catch {
|
|
1285
|
-
return
|
|
1285
|
+
return a``;
|
|
1286
1286
|
}
|
|
1287
1287
|
}
|
|
1288
1288
|
function Je(t) {
|
|
@@ -1307,7 +1307,7 @@ function Je(t) {
|
|
|
1307
1307
|
function Ke(t) {
|
|
1308
1308
|
try {
|
|
1309
1309
|
const e = Je(t);
|
|
1310
|
-
return e.length === 0 ?
|
|
1310
|
+
return e.length === 0 ? a`<div style="color: #777; font-size: 13px;">No atoms</div>` : a`
|
|
1311
1311
|
${T(
|
|
1312
1312
|
e,
|
|
1313
1313
|
(n) => n.id,
|
|
@@ -1318,12 +1318,12 @@ function Ke(t) {
|
|
|
1318
1318
|
)}
|
|
1319
1319
|
`;
|
|
1320
1320
|
} catch {
|
|
1321
|
-
return
|
|
1321
|
+
return a``;
|
|
1322
1322
|
}
|
|
1323
1323
|
}
|
|
1324
1324
|
function Qe(t) {
|
|
1325
1325
|
try {
|
|
1326
|
-
return !t || t.length === 0 ?
|
|
1326
|
+
return !t || t.length === 0 ? a`<div style="color: #777; font-size: 13px;">No state</div>` : a`
|
|
1327
1327
|
${t.map((e, n) => {
|
|
1328
1328
|
const o = t.length === 1 ? "state" : `state#${n + 1}`;
|
|
1329
1329
|
let i;
|
|
@@ -1336,7 +1336,7 @@ function Qe(t) {
|
|
|
1336
1336
|
})}
|
|
1337
1337
|
`;
|
|
1338
1338
|
} catch {
|
|
1339
|
-
return
|
|
1339
|
+
return a``;
|
|
1340
1340
|
}
|
|
1341
1341
|
}
|
|
1342
1342
|
function Ze(t) {
|
|
@@ -1423,31 +1423,31 @@ function Ze(t) {
|
|
|
1423
1423
|
}
|
|
1424
1424
|
function tn(t, e) {
|
|
1425
1425
|
try {
|
|
1426
|
-
return
|
|
1426
|
+
return a`
|
|
1427
1427
|
<span class="${r.hookPill}">
|
|
1428
1428
|
<span class="${r.hookPillLabel}">${t}</span>
|
|
1429
1429
|
<span class="${r.hookPillCount}">${e}</span>
|
|
1430
1430
|
</span>
|
|
1431
1431
|
`;
|
|
1432
1432
|
} catch {
|
|
1433
|
-
return
|
|
1433
|
+
return a``;
|
|
1434
1434
|
}
|
|
1435
1435
|
}
|
|
1436
1436
|
function ne(t) {
|
|
1437
1437
|
try {
|
|
1438
1438
|
const e = Ze(t), n = [];
|
|
1439
|
-
return e.onMount > 0 && n.push({ label: "onMount", count: e.onMount }), e.onCleanup > 0 && n.push({ label: "onCleanup", count: e.onCleanup }), e.onPaint > 0 && n.push({ label: "onPaint", count: e.onPaint }), e.onAllMount > 0 && n.push({ label: "onAllMount", count: e.onAllMount }), e.effects > 0 && n.push({ label: "effect", count: e.effects }), e.on > 0 && n.push({ label: "on", count: e.on }), e.setters > 0 && n.push({ label: "setter", count: e.setters }), e.useState > 0 && n.push({ label: "useState", count: e.useState }), e.atoms > 0 && n.push({ label: "atom", count: e.atoms }), e.events > 0 && n.push({ label: "event", count: e.events }), e.channels > 0 && n.push({ label: "channel", count: e.channels }), n.length === 0 ? k :
|
|
1439
|
+
return e.onMount > 0 && n.push({ label: "onMount", count: e.onMount }), e.onCleanup > 0 && n.push({ label: "onCleanup", count: e.onCleanup }), e.onPaint > 0 && n.push({ label: "onPaint", count: e.onPaint }), e.onAllMount > 0 && n.push({ label: "onAllMount", count: e.onAllMount }), e.effects > 0 && n.push({ label: "effect", count: e.effects }), e.on > 0 && n.push({ label: "on", count: e.on }), e.setters > 0 && n.push({ label: "setter", count: e.setters }), e.useState > 0 && n.push({ label: "useState", count: e.useState }), e.atoms > 0 && n.push({ label: "atom", count: e.atoms }), e.events > 0 && n.push({ label: "event", count: e.events }), e.channels > 0 && n.push({ label: "channel", count: e.channels }), n.length === 0 ? k : a`
|
|
1440
1440
|
<div class="${r.hooksSummary}">
|
|
1441
1441
|
${n.map((o) => tn(o.label, o.count))}
|
|
1442
1442
|
</div>
|
|
1443
1443
|
`;
|
|
1444
1444
|
} catch {
|
|
1445
|
-
return
|
|
1445
|
+
return a``;
|
|
1446
1446
|
}
|
|
1447
1447
|
}
|
|
1448
1448
|
function en(t, e) {
|
|
1449
1449
|
try {
|
|
1450
|
-
t.stopPropagation(),
|
|
1450
|
+
t.stopPropagation(), at(e);
|
|
1451
1451
|
} catch {
|
|
1452
1452
|
}
|
|
1453
1453
|
}
|
|
@@ -1466,7 +1466,7 @@ function re(t) {
|
|
|
1466
1466
|
try {
|
|
1467
1467
|
const e = nn(t), n = tt(t);
|
|
1468
1468
|
if (e.length === 0)
|
|
1469
|
-
return
|
|
1469
|
+
return a`
|
|
1470
1470
|
<div class="${r.inspectorBreadcrumb}">
|
|
1471
1471
|
<span class="${r.breadcrumbSegment} ${r.breadcrumbCurrent}"
|
|
1472
1472
|
>${n}</span
|
|
@@ -1476,22 +1476,22 @@ function re(t) {
|
|
|
1476
1476
|
const o = [];
|
|
1477
1477
|
for (let i = 0; i < e.length; i++)
|
|
1478
1478
|
i > 0 && o.push(
|
|
1479
|
-
|
|
1479
|
+
a`<span class="${r.breadcrumbSeparator}">›</span>`
|
|
1480
1480
|
), o.push(
|
|
1481
|
-
|
|
1481
|
+
a`<span class="${r.breadcrumbSegment}">${e[i]}</span>`
|
|
1482
1482
|
);
|
|
1483
|
-
return o.push(
|
|
1484
|
-
|
|
1483
|
+
return o.push(a`<span class="${r.breadcrumbSeparator}">›</span>`), o.push(
|
|
1484
|
+
a`<span class="${r.breadcrumbSegment} ${r.breadcrumbCurrent}"
|
|
1485
1485
|
>${n}</span
|
|
1486
1486
|
>`
|
|
1487
|
-
),
|
|
1487
|
+
), a` <div class="${r.inspectorBreadcrumb}">${o}</div> `;
|
|
1488
1488
|
} catch {
|
|
1489
|
-
return
|
|
1489
|
+
return a``;
|
|
1490
1490
|
}
|
|
1491
1491
|
}
|
|
1492
1492
|
function oe(t) {
|
|
1493
1493
|
try {
|
|
1494
|
-
return
|
|
1494
|
+
return a`
|
|
1495
1495
|
<div class="${r.instanceDetails}">
|
|
1496
1496
|
<div class="${r.sectionHeader}">Props</div>
|
|
1497
1497
|
${Xe(t._props || {})}
|
|
@@ -1507,24 +1507,24 @@ function oe(t) {
|
|
|
1507
1507
|
</div>
|
|
1508
1508
|
`;
|
|
1509
1509
|
} catch {
|
|
1510
|
-
return
|
|
1510
|
+
return a``;
|
|
1511
1511
|
}
|
|
1512
1512
|
}
|
|
1513
1513
|
function Gt() {
|
|
1514
1514
|
try {
|
|
1515
|
-
return
|
|
1515
|
+
return a`
|
|
1516
1516
|
<div class="${r.inspector}">
|
|
1517
1517
|
<div class="${r.empty}">Select a component to inspect</div>
|
|
1518
1518
|
</div>
|
|
1519
1519
|
`;
|
|
1520
1520
|
} catch {
|
|
1521
|
-
return
|
|
1521
|
+
return a``;
|
|
1522
1522
|
}
|
|
1523
1523
|
}
|
|
1524
1524
|
function Yt(t) {
|
|
1525
1525
|
try {
|
|
1526
1526
|
const e = tt(t), n = t.componentId, o = Z(t), i = xt(t);
|
|
1527
|
-
return
|
|
1527
|
+
return a`
|
|
1528
1528
|
<div class="${r.inspector}">
|
|
1529
1529
|
${re(t)}
|
|
1530
1530
|
<div class="${r.inspectorTitle}">
|
|
@@ -1564,13 +1564,13 @@ function Yt(t) {
|
|
|
1564
1564
|
</div>
|
|
1565
1565
|
`;
|
|
1566
1566
|
} catch {
|
|
1567
|
-
return
|
|
1567
|
+
return a``;
|
|
1568
1568
|
}
|
|
1569
1569
|
}
|
|
1570
1570
|
function rn(t, e, n, o) {
|
|
1571
1571
|
try {
|
|
1572
1572
|
const { name: i, instances: c } = t;
|
|
1573
|
-
return
|
|
1573
|
+
return a`
|
|
1574
1574
|
<div class="${r.inspector}">
|
|
1575
1575
|
<div class="${r.inspectorTitle}">
|
|
1576
1576
|
<span>${i}</span>
|
|
@@ -1582,10 +1582,10 @@ function rn(t, e, n, o) {
|
|
|
1582
1582
|
<ul class="${r.instanceList}">
|
|
1583
1583
|
${T(
|
|
1584
1584
|
c,
|
|
1585
|
-
(
|
|
1586
|
-
(
|
|
1587
|
-
const d =
|
|
1588
|
-
return
|
|
1585
|
+
(s) => s.componentId,
|
|
1586
|
+
(s) => {
|
|
1587
|
+
const d = s.componentId, l = Z(s), u = xt(s), y = e === d;
|
|
1588
|
+
return a`
|
|
1589
1589
|
<li class="${r.instanceGroup}">
|
|
1590
1590
|
<div
|
|
1591
1591
|
class="${r.instanceItem} ${y ? Pe : ""}"
|
|
@@ -1611,7 +1611,7 @@ function rn(t, e, n, o) {
|
|
|
1611
1611
|
class="${r.componentHighlightBtn}"
|
|
1612
1612
|
@click=${(g) => {
|
|
1613
1613
|
try {
|
|
1614
|
-
g.stopPropagation(), o(
|
|
1614
|
+
g.stopPropagation(), o(s);
|
|
1615
1615
|
} catch {
|
|
1616
1616
|
}
|
|
1617
1617
|
}}
|
|
@@ -1633,9 +1633,9 @@ function rn(t, e, n, o) {
|
|
|
1633
1633
|
</svg>
|
|
1634
1634
|
</button>
|
|
1635
1635
|
</div>
|
|
1636
|
-
${y ?
|
|
1637
|
-
${re(
|
|
1638
|
-
${oe(
|
|
1636
|
+
${y ? a`
|
|
1637
|
+
${re(s)} ${ne(s)}
|
|
1638
|
+
${oe(s)}
|
|
1639
1639
|
` : k}
|
|
1640
1640
|
</li>
|
|
1641
1641
|
`;
|
|
@@ -1645,7 +1645,7 @@ function rn(t, e, n, o) {
|
|
|
1645
1645
|
</div>
|
|
1646
1646
|
`;
|
|
1647
1647
|
} catch {
|
|
1648
|
-
return
|
|
1648
|
+
return a``;
|
|
1649
1649
|
}
|
|
1650
1650
|
}
|
|
1651
1651
|
function Ut(t) {
|
|
@@ -1660,7 +1660,7 @@ function Ut(t) {
|
|
|
1660
1660
|
i
|
|
1661
1661
|
) : Gt();
|
|
1662
1662
|
} catch {
|
|
1663
|
-
return
|
|
1663
|
+
return a``;
|
|
1664
1664
|
}
|
|
1665
1665
|
}
|
|
1666
1666
|
const I = /* @__PURE__ */ new Set();
|
|
@@ -1686,36 +1686,36 @@ function on() {
|
|
|
1686
1686
|
if (ut) return;
|
|
1687
1687
|
ut = !0, V = window.setTimeout, W = window.setInterval, G = window.clearTimeout, Y = window.clearInterval;
|
|
1688
1688
|
const t = V, e = W, n = G, o = Y;
|
|
1689
|
-
window.setTimeout = function(c,
|
|
1689
|
+
window.setTimeout = function(c, s, ...d) {
|
|
1690
1690
|
let l;
|
|
1691
1691
|
try {
|
|
1692
1692
|
if (typeof c != "function")
|
|
1693
|
-
return l = t(c,
|
|
1693
|
+
return l = t(c, s, ...d), l;
|
|
1694
1694
|
const u = c;
|
|
1695
1695
|
l = t(function(...g) {
|
|
1696
1696
|
try {
|
|
1697
1697
|
return I.delete(l) && A(), u.apply(this, g.length ? g : d);
|
|
1698
1698
|
} catch {
|
|
1699
1699
|
}
|
|
1700
|
-
},
|
|
1700
|
+
}, s, ...d), pt || (I.add(l), A());
|
|
1701
1701
|
} catch {
|
|
1702
|
-
l = t(c,
|
|
1702
|
+
l = t(c, s, ...d);
|
|
1703
1703
|
}
|
|
1704
1704
|
return l;
|
|
1705
|
-
}, window.setInterval = function(c,
|
|
1705
|
+
}, window.setInterval = function(c, s, ...d) {
|
|
1706
1706
|
let l;
|
|
1707
1707
|
try {
|
|
1708
1708
|
if (typeof c != "function")
|
|
1709
|
-
return l = e(c,
|
|
1709
|
+
return l = e(c, s, ...d), l;
|
|
1710
1710
|
const u = c;
|
|
1711
1711
|
l = e(function(...g) {
|
|
1712
1712
|
try {
|
|
1713
1713
|
return u.apply(this, g.length ? g : d);
|
|
1714
1714
|
} catch {
|
|
1715
1715
|
}
|
|
1716
|
-
},
|
|
1716
|
+
}, s, ...d), pt || (I.add(l), A());
|
|
1717
1717
|
} catch {
|
|
1718
|
-
l = e(c,
|
|
1718
|
+
l = e(c, s, ...d);
|
|
1719
1719
|
}
|
|
1720
1720
|
return l;
|
|
1721
1721
|
}, window.clearTimeout = function(c) {
|
|
@@ -1742,32 +1742,32 @@ function cn() {
|
|
|
1742
1742
|
}
|
|
1743
1743
|
}
|
|
1744
1744
|
const wt = /* @__PURE__ */ new WeakMap();
|
|
1745
|
-
let
|
|
1746
|
-
function
|
|
1747
|
-
return wt.has(t) || wt.set(t, `mdt-hl-${++
|
|
1745
|
+
let an = 0;
|
|
1746
|
+
function sn(t) {
|
|
1747
|
+
return wt.has(t) || wt.set(t, `mdt-hl-${++an}`), wt.get(t);
|
|
1748
1748
|
}
|
|
1749
1749
|
function ie(t, e, n) {
|
|
1750
1750
|
try {
|
|
1751
1751
|
const o = n.get(e), i = o !== void 0 && o !== t;
|
|
1752
1752
|
n.set(e, t);
|
|
1753
|
-
const c =
|
|
1753
|
+
const c = sn(e);
|
|
1754
1754
|
return i && U(
|
|
1755
1755
|
() => setTimeout(() => {
|
|
1756
1756
|
try {
|
|
1757
|
-
const
|
|
1758
|
-
if (!
|
|
1759
|
-
|
|
1757
|
+
const s = document.getElementById(c);
|
|
1758
|
+
if (!s) return;
|
|
1759
|
+
s.classList.remove("mdt-highlight-flash"), s.offsetWidth, s.classList.add("mdt-highlight-flash"), setTimeout(() => {
|
|
1760
1760
|
try {
|
|
1761
|
-
|
|
1761
|
+
s.classList.remove("mdt-highlight-flash");
|
|
1762
1762
|
} catch {
|
|
1763
1763
|
}
|
|
1764
1764
|
}, 600);
|
|
1765
1765
|
} catch {
|
|
1766
1766
|
}
|
|
1767
1767
|
}, 0)
|
|
1768
|
-
),
|
|
1768
|
+
), a`<span id="${c}" class="mdt-highlight">${t}</span>`;
|
|
1769
1769
|
} catch {
|
|
1770
|
-
return
|
|
1770
|
+
return a``;
|
|
1771
1771
|
}
|
|
1772
1772
|
}
|
|
1773
1773
|
const ln = /* @__PURE__ */ new WeakMap();
|
|
@@ -1813,7 +1813,7 @@ function un({
|
|
|
1813
1813
|
} catch {
|
|
1814
1814
|
}
|
|
1815
1815
|
};
|
|
1816
|
-
return
|
|
1816
|
+
return a`
|
|
1817
1817
|
<div class="${r.content}">
|
|
1818
1818
|
<div style="padding: 0 0 6px 0; flex-shrink: 0;">
|
|
1819
1819
|
<input
|
|
@@ -1824,16 +1824,16 @@ function un({
|
|
|
1824
1824
|
@input=${l}
|
|
1825
1825
|
/>
|
|
1826
1826
|
</div>
|
|
1827
|
-
${d.length === 0 ?
|
|
1827
|
+
${d.length === 0 ? a`<div class="${r.empty}">
|
|
1828
1828
|
${c ? "No matching components" : "No components mounted"}
|
|
1829
|
-
</div>` :
|
|
1829
|
+
</div>` : a`
|
|
1830
1830
|
<ul class="${r.componentList}">
|
|
1831
1831
|
${T(
|
|
1832
1832
|
d,
|
|
1833
1833
|
(u) => u.viewFn,
|
|
1834
1834
|
(u) => {
|
|
1835
1835
|
const y = dn(u), g = e === u.viewFn, b = St(u), rt = u.instances.length, Dt = u.instances[0];
|
|
1836
|
-
return
|
|
1836
|
+
return a`
|
|
1837
1837
|
<li
|
|
1838
1838
|
class="${r.componentItem} ${g ? Kt : ""}"
|
|
1839
1839
|
@click=${() => {
|
|
@@ -1851,7 +1851,7 @@ function un({
|
|
|
1851
1851
|
<span class="${r.componentName}"
|
|
1852
1852
|
>${u.name}</span
|
|
1853
1853
|
>
|
|
1854
|
-
${rt > 1 ?
|
|
1854
|
+
${rt > 1 ? a`<span
|
|
1855
1855
|
class="${r.componentCount} ${g ? r.componentCountSelected : ""}"
|
|
1856
1856
|
>×${rt}</span
|
|
1857
1857
|
>` : ""}
|
|
@@ -1895,7 +1895,7 @@ function un({
|
|
|
1895
1895
|
</div>
|
|
1896
1896
|
`;
|
|
1897
1897
|
} catch {
|
|
1898
|
-
return
|
|
1898
|
+
return a``;
|
|
1899
1899
|
}
|
|
1900
1900
|
}
|
|
1901
1901
|
const pn = /* @__PURE__ */ new WeakMap(), Ct = /* @__PURE__ */ new WeakSet();
|
|
@@ -1912,21 +1912,21 @@ function fn(t) {
|
|
|
1912
1912
|
});
|
|
1913
1913
|
const o = [];
|
|
1914
1914
|
for (const c of t) {
|
|
1915
|
-
const
|
|
1915
|
+
const s = n.get(c), d = Tt(c);
|
|
1916
1916
|
if (d && e.has(d)) {
|
|
1917
1917
|
const l = n.get(d);
|
|
1918
1918
|
if (l) {
|
|
1919
|
-
l.children.push(
|
|
1919
|
+
l.children.push(s);
|
|
1920
1920
|
continue;
|
|
1921
1921
|
}
|
|
1922
1922
|
}
|
|
1923
|
-
o.push(
|
|
1923
|
+
o.push(s);
|
|
1924
1924
|
}
|
|
1925
1925
|
const i = (c) => {
|
|
1926
1926
|
try {
|
|
1927
|
-
c.sort((
|
|
1928
|
-
for (const
|
|
1929
|
-
i(
|
|
1927
|
+
c.sort((s, d) => s.depth - d.depth || s.name.localeCompare(d.name));
|
|
1928
|
+
for (const s of c)
|
|
1929
|
+
i(s.children);
|
|
1930
1930
|
} catch {
|
|
1931
1931
|
}
|
|
1932
1932
|
};
|
|
@@ -1937,9 +1937,9 @@ function fn(t) {
|
|
|
1937
1937
|
}
|
|
1938
1938
|
function ce(t, e, n, o, i) {
|
|
1939
1939
|
try {
|
|
1940
|
-
const c = t.children.length > 0,
|
|
1940
|
+
const c = t.children.length > 0, s = Ct.has(t.component), d = xt(t.component), l = e === t.id, u = t.depth * 16, y = (b) => {
|
|
1941
1941
|
try {
|
|
1942
|
-
b.stopPropagation(),
|
|
1942
|
+
b.stopPropagation(), s ? Ct.delete(t.component) : Ct.add(t.component), i();
|
|
1943
1943
|
} catch {
|
|
1944
1944
|
}
|
|
1945
1945
|
}, g = () => {
|
|
@@ -1948,15 +1948,15 @@ function ce(t, e, n, o, i) {
|
|
|
1948
1948
|
} catch {
|
|
1949
1949
|
}
|
|
1950
1950
|
};
|
|
1951
|
-
return
|
|
1951
|
+
return a`
|
|
1952
1952
|
<li
|
|
1953
1953
|
class="${r.componentItem} ${l ? Kt : ""}"
|
|
1954
1954
|
style="margin-left: ${u}px;"
|
|
1955
1955
|
@click=${g}
|
|
1956
1956
|
>
|
|
1957
|
-
${c ?
|
|
1958
|
-
>${
|
|
1959
|
-
>` :
|
|
1957
|
+
${c ? a`<span class="${r.treeToggle}" @click=${y}
|
|
1958
|
+
>${s ? "▶" : "▼"}</span
|
|
1959
|
+
>` : a`<span class="${r.treeLeaf}">·</span>`}
|
|
1960
1960
|
${ie(d, t.component, pn)}
|
|
1961
1961
|
<span class="${r.componentName}">${t.name}</span>
|
|
1962
1962
|
<span class="${r.componentBadge}"
|
|
@@ -1990,7 +1990,7 @@ function ce(t, e, n, o, i) {
|
|
|
1990
1990
|
</svg>
|
|
1991
1991
|
</button>
|
|
1992
1992
|
</li>
|
|
1993
|
-
${c && !
|
|
1993
|
+
${c && !s ? T(
|
|
1994
1994
|
t.children,
|
|
1995
1995
|
(b) => b.component,
|
|
1996
1996
|
(b) => ce(
|
|
@@ -2003,7 +2003,7 @@ function ce(t, e, n, o, i) {
|
|
|
2003
2003
|
) : k}
|
|
2004
2004
|
`;
|
|
2005
2005
|
} catch {
|
|
2006
|
-
return
|
|
2006
|
+
return a``;
|
|
2007
2007
|
}
|
|
2008
2008
|
}
|
|
2009
2009
|
function hn({
|
|
@@ -2014,15 +2014,15 @@ function hn({
|
|
|
2014
2014
|
}) {
|
|
2015
2015
|
try {
|
|
2016
2016
|
const i = Qt(), c = fn(i);
|
|
2017
|
-
return
|
|
2017
|
+
return a`
|
|
2018
2018
|
<div class="${r.content}">
|
|
2019
|
-
${c.length === 0 ?
|
|
2019
|
+
${c.length === 0 ? a`<div class="${r.empty}">No components mounted</div>` : a`
|
|
2020
2020
|
<ul class="${r.componentList}">
|
|
2021
2021
|
${T(
|
|
2022
2022
|
c,
|
|
2023
|
-
(
|
|
2024
|
-
(
|
|
2025
|
-
|
|
2023
|
+
(s) => s.component,
|
|
2024
|
+
(s) => ce(
|
|
2025
|
+
s,
|
|
2026
2026
|
t,
|
|
2027
2027
|
e,
|
|
2028
2028
|
n,
|
|
@@ -2034,22 +2034,22 @@ function hn({
|
|
|
2034
2034
|
</div>
|
|
2035
2035
|
`;
|
|
2036
2036
|
} catch {
|
|
2037
|
-
return
|
|
2037
|
+
return a``;
|
|
2038
2038
|
}
|
|
2039
2039
|
}
|
|
2040
|
-
const
|
|
2040
|
+
const ae = () => (Ie(() => {
|
|
2041
2041
|
try {
|
|
2042
2042
|
console.log(ft());
|
|
2043
2043
|
} catch {
|
|
2044
2044
|
}
|
|
2045
2045
|
}), () => {
|
|
2046
2046
|
try {
|
|
2047
|
-
return
|
|
2047
|
+
return a`Active Timers (${ft()})`;
|
|
2048
2048
|
} catch {
|
|
2049
|
-
return
|
|
2049
|
+
return a``;
|
|
2050
2050
|
}
|
|
2051
2051
|
});
|
|
2052
|
-
|
|
2052
|
+
ae.skipDevToolsRender = !0;
|
|
2053
2053
|
function gn({
|
|
2054
2054
|
activeTab: t,
|
|
2055
2055
|
onTabChange: e,
|
|
@@ -2058,7 +2058,7 @@ function gn({
|
|
|
2058
2058
|
unreadLogCount: i
|
|
2059
2059
|
}) {
|
|
2060
2060
|
try {
|
|
2061
|
-
return
|
|
2061
|
+
return a`
|
|
2062
2062
|
<div class="${r.header}">
|
|
2063
2063
|
<div class="${r.headerLeft}">
|
|
2064
2064
|
<div class="${r.title}">🔧 Mates DevTools</div>
|
|
@@ -2084,7 +2084,7 @@ function gn({
|
|
|
2084
2084
|
}}
|
|
2085
2085
|
>
|
|
2086
2086
|
Logs
|
|
2087
|
-
${i > 0 ?
|
|
2087
|
+
${i > 0 ? a`<span class="${r.tabBadge}"
|
|
2088
2088
|
>${i > 99 ? "99+" : i}</span
|
|
2089
2089
|
>` : ""}
|
|
2090
2090
|
</button>
|
|
@@ -2102,7 +2102,7 @@ function gn({
|
|
|
2102
2102
|
</nav>
|
|
2103
2103
|
</div>
|
|
2104
2104
|
<div>
|
|
2105
|
-
<button style="margin-left: 10px">${Be(
|
|
2105
|
+
<button style="margin-left: 10px">${Be(ae)}</button>
|
|
2106
2106
|
</div>
|
|
2107
2107
|
<div class="${r.controls}">
|
|
2108
2108
|
<button
|
|
@@ -2133,7 +2133,7 @@ function gn({
|
|
|
2133
2133
|
</div>
|
|
2134
2134
|
`;
|
|
2135
2135
|
} catch {
|
|
2136
|
-
return
|
|
2136
|
+
return a``;
|
|
2137
2137
|
}
|
|
2138
2138
|
}
|
|
2139
2139
|
let it = null;
|
|
@@ -2158,12 +2158,12 @@ function wr() {
|
|
|
2158
2158
|
return v;
|
|
2159
2159
|
}
|
|
2160
2160
|
const xn = 100, R = [];
|
|
2161
|
-
let
|
|
2161
|
+
let se = 1, $t = 0;
|
|
2162
2162
|
const le = /* @__PURE__ */ new Set(["devtools", "DOMReady", "Paint"]);
|
|
2163
2163
|
function S(t, e, n) {
|
|
2164
2164
|
try {
|
|
2165
2165
|
R.length >= xn && R.shift(), R.push({
|
|
2166
|
-
id:
|
|
2166
|
+
id: se++,
|
|
2167
2167
|
ts: performance.now(),
|
|
2168
2168
|
category: t,
|
|
2169
2169
|
label: e,
|
|
@@ -2208,7 +2208,7 @@ function _n() {
|
|
|
2208
2208
|
}
|
|
2209
2209
|
function wn() {
|
|
2210
2210
|
try {
|
|
2211
|
-
R.length = 0, $t = 0,
|
|
2211
|
+
R.length = 0, $t = 0, se = 1;
|
|
2212
2212
|
} catch {
|
|
2213
2213
|
}
|
|
2214
2214
|
}
|
|
@@ -2352,7 +2352,7 @@ function Pn({ onClear: t, renderCallback: e }) {
|
|
|
2352
2352
|
try {
|
|
2353
2353
|
_n();
|
|
2354
2354
|
const n = zn();
|
|
2355
|
-
return
|
|
2355
|
+
return a`
|
|
2356
2356
|
<div class="${r.logsPanel}">
|
|
2357
2357
|
<div class="${r.logsToolbar}">
|
|
2358
2358
|
<div class="${r.logsFilterRow}">
|
|
@@ -2422,12 +2422,12 @@ function Pn({ onClear: t, renderCallback: e }) {
|
|
|
2422
2422
|
</div>
|
|
2423
2423
|
|
|
2424
2424
|
<div class="${r.logsContainer}">
|
|
2425
|
-
${n.length === 0 ?
|
|
2425
|
+
${n.length === 0 ? a`<div class="${r.empty}">
|
|
2426
2426
|
No logs yet. Interact with the app to see activity.
|
|
2427
2427
|
</div>` : T(
|
|
2428
2428
|
n,
|
|
2429
2429
|
(o) => o.id,
|
|
2430
|
-
(o) =>
|
|
2430
|
+
(o) => a`
|
|
2431
2431
|
<div class="${r.logEntry}">
|
|
2432
2432
|
<span class="${r.logTs}">${Rn(o.ts)}</span>
|
|
2433
2433
|
<span
|
|
@@ -2436,7 +2436,7 @@ function Pn({ onClear: t, renderCallback: e }) {
|
|
|
2436
2436
|
>${En[o.category]}</span
|
|
2437
2437
|
>
|
|
2438
2438
|
<span class="${r.logLabel}">${o.label}</span>
|
|
2439
|
-
${o.detail ?
|
|
2439
|
+
${o.detail ? a`<span class="${r.logDetail}"
|
|
2440
2440
|
>${o.detail}</span
|
|
2441
2441
|
>` : k}
|
|
2442
2442
|
</div>
|
|
@@ -2446,7 +2446,7 @@ function Pn({ onClear: t, renderCallback: e }) {
|
|
|
2446
2446
|
</div>
|
|
2447
2447
|
`;
|
|
2448
2448
|
} catch {
|
|
2449
|
-
return
|
|
2449
|
+
return a``;
|
|
2450
2450
|
}
|
|
2451
2451
|
}
|
|
2452
2452
|
let et = !1;
|
|
@@ -2516,8 +2516,8 @@ function Nn() {
|
|
|
2516
2516
|
for (const [e, n] of Q) {
|
|
2517
2517
|
if (n.length === 0) continue;
|
|
2518
2518
|
let o = 0, i = 0, c = 1 / 0;
|
|
2519
|
-
for (const
|
|
2520
|
-
o +=
|
|
2519
|
+
for (const s of n)
|
|
2520
|
+
o += s.durationMs, s.durationMs > i && (i = s.durationMs), s.durationMs < c && (c = s.durationMs);
|
|
2521
2521
|
t.push({
|
|
2522
2522
|
name: e,
|
|
2523
2523
|
renderCount: n.length,
|
|
@@ -2592,11 +2592,11 @@ let N = "summary";
|
|
|
2592
2592
|
function Wn(t) {
|
|
2593
2593
|
try {
|
|
2594
2594
|
if (t.length === 0)
|
|
2595
|
-
return
|
|
2595
|
+
return a`<div class="${r.empty}">
|
|
2596
2596
|
No render data yet. Interact with the app to see component performance.
|
|
2597
2597
|
</div>`;
|
|
2598
2598
|
const e = Math.max(...t.map((n) => n.totalMs));
|
|
2599
|
-
return
|
|
2599
|
+
return a`
|
|
2600
2600
|
<table class="${r.perfTable}">
|
|
2601
2601
|
<thead>
|
|
2602
2602
|
<tr>
|
|
@@ -2614,7 +2614,7 @@ function Wn(t) {
|
|
|
2614
2614
|
(n) => n.name,
|
|
2615
2615
|
(n) => {
|
|
2616
2616
|
const o = ye(n.lastMs);
|
|
2617
|
-
return
|
|
2617
|
+
return a`
|
|
2618
2618
|
<tr class="${r.perfRow}">
|
|
2619
2619
|
<td class="${r.perfCell} ${r.perfName}">
|
|
2620
2620
|
${n.name}
|
|
@@ -2653,17 +2653,17 @@ function Wn(t) {
|
|
|
2653
2653
|
</table>
|
|
2654
2654
|
`;
|
|
2655
2655
|
} catch {
|
|
2656
|
-
return
|
|
2656
|
+
return a``;
|
|
2657
2657
|
}
|
|
2658
2658
|
}
|
|
2659
2659
|
function Gn(t, e) {
|
|
2660
2660
|
try {
|
|
2661
2661
|
if (t.length === 0)
|
|
2662
|
-
return
|
|
2662
|
+
return a`<div class="${r.empty}">
|
|
2663
2663
|
No render data yet. Interact with the app to see slow renders.
|
|
2664
2664
|
</div>`;
|
|
2665
2665
|
const n = Math.max(...t.map((i) => i.durationMs)), o = !!e;
|
|
2666
|
-
return
|
|
2666
|
+
return a`
|
|
2667
2667
|
<table class="${r.perfTable}">
|
|
2668
2668
|
<thead>
|
|
2669
2669
|
<tr>
|
|
@@ -2677,16 +2677,16 @@ function Gn(t, e) {
|
|
|
2677
2677
|
t,
|
|
2678
2678
|
(i) => i.id,
|
|
2679
2679
|
(i) => {
|
|
2680
|
-
const c = ye(i.durationMs),
|
|
2680
|
+
const c = ye(i.durationMs), s = o ? () => {
|
|
2681
2681
|
try {
|
|
2682
2682
|
e(i.instanceId);
|
|
2683
2683
|
} catch {
|
|
2684
2684
|
}
|
|
2685
2685
|
} : void 0;
|
|
2686
|
-
return
|
|
2686
|
+
return a`
|
|
2687
2687
|
<tr
|
|
2688
2688
|
class="${r.perfRow} ${o ? r.perfRowClickable : ""}"
|
|
2689
|
-
@click=${
|
|
2689
|
+
@click=${s}
|
|
2690
2690
|
title=${o ? `Go to ${i.componentName} in Components tab` : ""}
|
|
2691
2691
|
>
|
|
2692
2692
|
<td class="${r.perfCell} ${r.perfName}">
|
|
@@ -2714,7 +2714,7 @@ function Gn(t, e) {
|
|
|
2714
2714
|
</table>
|
|
2715
2715
|
`;
|
|
2716
2716
|
} catch {
|
|
2717
|
-
return
|
|
2717
|
+
return a``;
|
|
2718
2718
|
}
|
|
2719
2719
|
}
|
|
2720
2720
|
function Yn({
|
|
@@ -2724,7 +2724,7 @@ function Yn({
|
|
|
2724
2724
|
}) {
|
|
2725
2725
|
try {
|
|
2726
2726
|
const o = Nn(), i = jn(30);
|
|
2727
|
-
return
|
|
2727
|
+
return a`
|
|
2728
2728
|
<div class="${r.perfPanel}">
|
|
2729
2729
|
<div class="${r.perfToolbar}">
|
|
2730
2730
|
<div class="${r.perfTabs}">
|
|
@@ -2773,7 +2773,7 @@ function Yn({
|
|
|
2773
2773
|
</div>
|
|
2774
2774
|
`;
|
|
2775
2775
|
} catch {
|
|
2776
|
-
return
|
|
2776
|
+
return a``;
|
|
2777
2777
|
}
|
|
2778
2778
|
}
|
|
2779
2779
|
let L = !1, C = !1, X = "components", M = "list", x = null, _ = null, m = null, D = [], p = null, w = null, z = 0;
|
|
@@ -2806,14 +2806,14 @@ function gt() {
|
|
|
2806
2806
|
} catch {
|
|
2807
2807
|
}
|
|
2808
2808
|
}
|
|
2809
|
-
function
|
|
2809
|
+
function at(t) {
|
|
2810
2810
|
try {
|
|
2811
2811
|
let e = function() {
|
|
2812
2812
|
try {
|
|
2813
2813
|
const c = document.createElement("div");
|
|
2814
2814
|
c.className = r.domHighlight, document.body.appendChild(c), P = c;
|
|
2815
|
-
const
|
|
2816
|
-
i ? (c.style.position = "fixed", c.style.top = `${
|
|
2815
|
+
const s = n.getBoundingClientRect();
|
|
2816
|
+
i ? (c.style.position = "fixed", c.style.top = `${s.top}px`, c.style.left = `${s.left}px`) : (c.style.top = `${s.top + window.scrollY}px`, c.style.left = `${s.left + window.scrollX}px`), c.style.width = `${s.width}px`, c.style.height = `${s.height}px`, H = U(
|
|
2817
2817
|
() => setTimeout(() => {
|
|
2818
2818
|
try {
|
|
2819
2819
|
P === c && (c.classList.add("fade-out"), H = U(
|
|
@@ -2836,9 +2836,9 @@ function st(t) {
|
|
|
2836
2836
|
if (i)
|
|
2837
2837
|
e();
|
|
2838
2838
|
else {
|
|
2839
|
-
const c = n.getBoundingClientRect(),
|
|
2840
|
-
|
|
2841
|
-
() => setTimeout(e,
|
|
2839
|
+
const c = n.getBoundingClientRect(), s = c.top >= 0 && c.bottom <= (window.innerHeight || document.documentElement.clientHeight);
|
|
2840
|
+
s || n.scrollIntoView({ behavior: "smooth", block: "center" }), H = U(
|
|
2841
|
+
() => setTimeout(e, s ? 0 : 400)
|
|
2842
2842
|
);
|
|
2843
2843
|
}
|
|
2844
2844
|
} catch {
|
|
@@ -2980,7 +2980,7 @@ function ir() {
|
|
|
2980
2980
|
function cr() {
|
|
2981
2981
|
try {
|
|
2982
2982
|
if (L) return;
|
|
2983
|
-
L = !0, C = !1, p && (p.style.display = "none"), z = Math.round(window.innerHeight * qn),
|
|
2983
|
+
L = !0, C = !1, p && (p.style.display = "none"), z = Math.round(window.innerHeight * qn), ar(), dr(), _t(), h(), Pt(), requestAnimationFrame(() => {
|
|
2984
2984
|
try {
|
|
2985
2985
|
requestAnimationFrame(() => {
|
|
2986
2986
|
try {
|
|
@@ -2994,7 +2994,7 @@ function cr() {
|
|
|
2994
2994
|
} catch {
|
|
2995
2995
|
}
|
|
2996
2996
|
}
|
|
2997
|
-
function
|
|
2997
|
+
function ar() {
|
|
2998
2998
|
try {
|
|
2999
2999
|
Hn(), q || (q = mn(() => {
|
|
3000
3000
|
try {
|
|
@@ -3017,7 +3017,7 @@ function $e() {
|
|
|
3017
3017
|
}
|
|
3018
3018
|
}
|
|
3019
3019
|
const Mt = "mates-devtools-vars";
|
|
3020
|
-
function
|
|
3020
|
+
function sr() {
|
|
3021
3021
|
try {
|
|
3022
3022
|
if (document.getElementById(Mt)) return;
|
|
3023
3023
|
const t = document.createElement("style");
|
|
@@ -3053,37 +3053,36 @@ function ar() {
|
|
|
3053
3053
|
--dt-flash-bg: rgba(0,180,100,0.45);
|
|
3054
3054
|
}
|
|
3055
3055
|
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
}
|
|
3056
|
+
:root[data-theme="light"] #mates-devtools,
|
|
3057
|
+
:root[data-theme="light"] #mates-devtools-fab {
|
|
3058
|
+
--dt-bg: #f5f5f5;
|
|
3059
|
+
--dt-bg-2: #ebebeb;
|
|
3060
|
+
--dt-bg-3: #e0e0e0;
|
|
3061
|
+
--dt-bg-input: #ffffff;
|
|
3062
|
+
--dt-bg-hover: #e8e8e8;
|
|
3063
|
+
--dt-bg-selected: #dbeafe;
|
|
3064
|
+
--dt-bg-active: rgba(59,130,246,0.12);
|
|
3065
|
+
--dt-border: #cccccc;
|
|
3066
|
+
--dt-border-2: #d4d4d4;
|
|
3067
|
+
--dt-border-3: #e4e4e4;
|
|
3068
|
+
--dt-border-selected: #3b82f6;
|
|
3069
|
+
--dt-text: #333333;
|
|
3070
|
+
--dt-text-bright: #111111;
|
|
3071
|
+
--dt-text-muted: #666666;
|
|
3072
|
+
--dt-text-dim: #888888;
|
|
3073
|
+
--dt-text-dimmer: #999999;
|
|
3074
|
+
--dt-text-selected: #1d4ed8;
|
|
3075
|
+
--dt-accent: #0077e6;
|
|
3076
|
+
--dt-accent-2: #3b82f6;
|
|
3077
|
+
--dt-scrollbar: #bbbbbb;
|
|
3078
|
+
--dt-scrollbar-hover: #999999;
|
|
3079
|
+
--dt-prop-key: #0070c1;
|
|
3080
|
+
--dt-prop-val: #a31515;
|
|
3081
|
+
--dt-scope-name: #007f6a;
|
|
3082
|
+
--dt-hook-count: #0070c1;
|
|
3083
|
+
--dt-instance-border: #3b82f6;
|
|
3084
|
+
--dt-instance-bg: #f0f4ff;
|
|
3085
|
+
--dt-flash-bg: rgba(0,160,90,0.3);
|
|
3087
3086
|
}
|
|
3088
3087
|
`, document.head.appendChild(t);
|
|
3089
3088
|
} catch {
|
|
@@ -3098,14 +3097,14 @@ function lr() {
|
|
|
3098
3097
|
function dr() {
|
|
3099
3098
|
try {
|
|
3100
3099
|
if (w) return;
|
|
3101
|
-
|
|
3100
|
+
sr(), w = document.createElement("div"), w.id = "mates-devtools", document.body.appendChild(w);
|
|
3102
3101
|
} catch {
|
|
3103
3102
|
}
|
|
3104
3103
|
}
|
|
3105
3104
|
function It() {
|
|
3106
3105
|
try {
|
|
3107
3106
|
if (!w) return;
|
|
3108
|
-
Jt(
|
|
3107
|
+
Jt(a``, w), w.remove(), w = null, lr();
|
|
3109
3108
|
} catch {
|
|
3110
3109
|
}
|
|
3111
3110
|
}
|
|
@@ -3116,7 +3115,7 @@ function h() {
|
|
|
3116
3115
|
try {
|
|
3117
3116
|
switch (X) {
|
|
3118
3117
|
case "components":
|
|
3119
|
-
return
|
|
3118
|
+
return a`
|
|
3120
3119
|
<div class="${r.body}">
|
|
3121
3120
|
<div class="${r.leftColumn}">
|
|
3122
3121
|
<div class="${r.leftTabs}">
|
|
@@ -3181,12 +3180,12 @@ function h() {
|
|
|
3181
3180
|
groups: D,
|
|
3182
3181
|
selectedViewFn: _,
|
|
3183
3182
|
onSelectGroup: Zn,
|
|
3184
|
-
onHighlight: (e) =>
|
|
3183
|
+
onHighlight: (e) => at(e),
|
|
3185
3184
|
renderCallback: h
|
|
3186
3185
|
}) : hn({
|
|
3187
3186
|
selectedComponentId: x,
|
|
3188
3187
|
onSelectComponent: Qn,
|
|
3189
|
-
onHighlight: (e) =>
|
|
3188
|
+
onHighlight: (e) => at(e),
|
|
3190
3189
|
renderCallback: h
|
|
3191
3190
|
})}
|
|
3192
3191
|
</div>
|
|
@@ -3194,7 +3193,7 @@ function h() {
|
|
|
3194
3193
|
selectedGroup: Ot(),
|
|
3195
3194
|
selectedInstanceId: m,
|
|
3196
3195
|
onSelectInstance: tr,
|
|
3197
|
-
onHighlight: (e) =>
|
|
3196
|
+
onHighlight: (e) => at(e)
|
|
3198
3197
|
} : {
|
|
3199
3198
|
selectedComponent: ve()
|
|
3200
3199
|
})}
|
|
@@ -3212,14 +3211,14 @@ function h() {
|
|
|
3212
3211
|
onNavigateToComponent: er
|
|
3213
3212
|
});
|
|
3214
3213
|
default:
|
|
3215
|
-
return
|
|
3214
|
+
return a``;
|
|
3216
3215
|
}
|
|
3217
3216
|
} catch {
|
|
3218
3217
|
}
|
|
3219
|
-
return
|
|
3218
|
+
return a``;
|
|
3220
3219
|
})();
|
|
3221
3220
|
Jt(
|
|
3222
|
-
|
|
3221
|
+
a`
|
|
3223
3222
|
<div class="${r.panel}" style="height: ${z}px;">
|
|
3224
3223
|
<div class="${r.resizeHandle}" @mousedown=${ur}></div>
|
|
3225
3224
|
${gn({
|
|
@@ -3242,10 +3241,10 @@ function ur(t) {
|
|
|
3242
3241
|
t.preventDefault();
|
|
3243
3242
|
const e = t.clientY, n = z, o = (c) => {
|
|
3244
3243
|
try {
|
|
3245
|
-
const
|
|
3244
|
+
const s = window.innerHeight * Xn;
|
|
3246
3245
|
z = Math.max(
|
|
3247
3246
|
Un,
|
|
3248
|
-
Math.min(
|
|
3247
|
+
Math.min(s, n + (e - c.clientY))
|
|
3249
3248
|
);
|
|
3250
3249
|
const d = nt();
|
|
3251
3250
|
d && (d.style.height = `${z}px`), Pt();
|
|
@@ -3264,7 +3263,7 @@ function ur(t) {
|
|
|
3264
3263
|
function pr() {
|
|
3265
3264
|
try {
|
|
3266
3265
|
if (p) return;
|
|
3267
|
-
p = document.createElement("div"), p.className = r.fab, p.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/></svg>', p.style.bottom = "50px", p.style.right = "50px", p.addEventListener("mousedown", we), p.addEventListener("click", _e), document.body.appendChild(p);
|
|
3266
|
+
p = document.createElement("div"), p.id = "mates-devtools-fab", p.className = r.fab, p.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/></svg>', p.style.bottom = "50px", p.style.right = "50px", p.addEventListener("mousedown", we), p.addEventListener("click", _e), document.body.appendChild(p);
|
|
3268
3267
|
} catch {
|
|
3269
3268
|
}
|
|
3270
3269
|
}
|
|
@@ -3328,27 +3327,27 @@ function gr() {
|
|
|
3328
3327
|
} catch {
|
|
3329
3328
|
}
|
|
3330
3329
|
}
|
|
3331
|
-
const
|
|
3330
|
+
const st = [];
|
|
3332
3331
|
let Bt = null, Lt = null, Et = null;
|
|
3333
3332
|
function mr() {
|
|
3334
3333
|
try {
|
|
3335
3334
|
Bt = Ae((t, e) => {
|
|
3336
3335
|
try {
|
|
3337
3336
|
const n = (e.method ?? "GET").toUpperCase();
|
|
3338
|
-
|
|
3337
|
+
st.push({ method: n, url: t, startTs: performance.now() });
|
|
3339
3338
|
} catch {
|
|
3340
3339
|
}
|
|
3341
3340
|
return { url: t, options: e };
|
|
3342
3341
|
}), Lt = Re((t) => {
|
|
3343
3342
|
try {
|
|
3344
|
-
const e =
|
|
3343
|
+
const e = st.shift(), n = e?.method ?? "", o = e?.url ?? t.url ?? "", i = e ? performance.now() - e.startTs : 0;
|
|
3345
3344
|
ue(n, o, t.status, i);
|
|
3346
3345
|
} catch {
|
|
3347
3346
|
}
|
|
3348
3347
|
return t;
|
|
3349
3348
|
}), Et = ze((t) => {
|
|
3350
3349
|
try {
|
|
3351
|
-
const e =
|
|
3350
|
+
const e = st.shift(), n = e ? performance.now() - e.startTs : 0;
|
|
3352
3351
|
pe(
|
|
3353
3352
|
e?.method ?? "",
|
|
3354
3353
|
e?.url ?? "",
|
|
@@ -3363,7 +3362,7 @@ function mr() {
|
|
|
3363
3362
|
}
|
|
3364
3363
|
function yr() {
|
|
3365
3364
|
try {
|
|
3366
|
-
Bt?.(), Lt?.(), Et?.(), Bt = null, Lt = null, Et = null,
|
|
3365
|
+
Bt?.(), Lt?.(), Et?.(), Bt = null, Lt = null, Et = null, st.length = 0;
|
|
3367
3366
|
} catch {
|
|
3368
3367
|
}
|
|
3369
3368
|
}
|
|
@@ -554,37 +554,36 @@
|
|
|
554
554
|
--dt-flash-bg: rgba(0,180,100,0.45);
|
|
555
555
|
}
|
|
556
556
|
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
}
|
|
557
|
+
:root[data-theme="light"] #mates-devtools,
|
|
558
|
+
:root[data-theme="light"] #mates-devtools-fab {
|
|
559
|
+
--dt-bg: #f5f5f5;
|
|
560
|
+
--dt-bg-2: #ebebeb;
|
|
561
|
+
--dt-bg-3: #e0e0e0;
|
|
562
|
+
--dt-bg-input: #ffffff;
|
|
563
|
+
--dt-bg-hover: #e8e8e8;
|
|
564
|
+
--dt-bg-selected: #dbeafe;
|
|
565
|
+
--dt-bg-active: rgba(59,130,246,0.12);
|
|
566
|
+
--dt-border: #cccccc;
|
|
567
|
+
--dt-border-2: #d4d4d4;
|
|
568
|
+
--dt-border-3: #e4e4e4;
|
|
569
|
+
--dt-border-selected: #3b82f6;
|
|
570
|
+
--dt-text: #333333;
|
|
571
|
+
--dt-text-bright: #111111;
|
|
572
|
+
--dt-text-muted: #666666;
|
|
573
|
+
--dt-text-dim: #888888;
|
|
574
|
+
--dt-text-dimmer: #999999;
|
|
575
|
+
--dt-text-selected: #1d4ed8;
|
|
576
|
+
--dt-accent: #0077e6;
|
|
577
|
+
--dt-accent-2: #3b82f6;
|
|
578
|
+
--dt-scrollbar: #bbbbbb;
|
|
579
|
+
--dt-scrollbar-hover: #999999;
|
|
580
|
+
--dt-prop-key: #0070c1;
|
|
581
|
+
--dt-prop-val: #a31515;
|
|
582
|
+
--dt-scope-name: #007f6a;
|
|
583
|
+
--dt-hook-count: #0070c1;
|
|
584
|
+
--dt-instance-border: #3b82f6;
|
|
585
|
+
--dt-instance-bg: #f0f4ff;
|
|
586
|
+
--dt-flash-bg: rgba(0,160,90,0.3);
|
|
588
587
|
}
|
|
589
588
|
`,document.head.appendChild(t)}catch{}}function or(){try{document.getElementById(Dt)?.remove()}catch{}}function ir(){try{if(S)return;rr(),S=document.createElement("div"),S.id="mates-devtools",document.body.appendChild(S)}catch{}}function Ot(){try{if(!S)return;i.render(i.html``,S),S.remove(),S=null,or()}catch{}}function g(){try{if(!S||!I)return;const t=(()=>{try{switch(Z){case"components":return i.html`
|
|
590
589
|
<div class="${r.body}">
|
|
@@ -647,4 +646,4 @@
|
|
|
647
646
|
${fe({activeTab:Z,onTabChange:Kn,onMinimise:Qn,onClose:tr,unreadLogCount:Z==="logs"?0:xe()})}
|
|
648
647
|
${t}
|
|
649
648
|
</div>
|
|
650
|
-
`,S)}catch{}}function cr(t){try{t.preventDefault();const e=t.clientY,n=D,o=l=>{try{const a=window.innerHeight*jn;D=Math.max(Nn,Math.min(a,n+(e-l.clientY)));const u=rt();u&&(u.style.height=`${D}px`),Pt()}catch{}},c=()=>{try{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",c)}catch{}};document.addEventListener("mousemove",o),document.addEventListener("mouseup",c)}catch{}}function lr(){try{if(f)return;f=document.createElement("div"),f.className=r.fab,f.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/></svg>',f.style.bottom="50px",f.style.right="50px",f.addEventListener("mousedown",Ke),f.addEventListener("click",Je),document.body.appendChild(f)}catch{}}function ar(){try{if(!f)return;f.removeEventListener("mousedown",Ke),f.removeEventListener("click",Je),f.remove(),f=null}catch{}}function Je(){try{if(ht){ht=!1;return}C?Zn():er()}catch{}}function Ke(t){try{t.preventDefault(),Ht=!0,ht=!1;const e=f.getBoundingClientRect();Ue=t.clientX-e.left,Ye=t.clientY-e.top,f.classList.add(r.fabDragging),document.addEventListener("mousemove",Qe),document.addEventListener("mouseup",Ze)}catch{}}function Qe(t){try{if(!Ht||!f)return;ht=!0,f.style.bottom="auto",f.style.right="auto",f.style.left=`${Math.max(0,Math.min(window.innerWidth-48,t.clientX-Ue))}px`,f.style.top=`${Math.max(0,Math.min(window.innerHeight-48,t.clientY-Ye))}px`}catch{}}function Ze(){try{Ht=!1,f?.classList.remove(r.fabDragging),document.removeEventListener("mousemove",Qe),document.removeEventListener("mouseup",Ze)}catch{}}function sr(){try{xn(),lr(),nt||(nt=N.__subscribe(t=>{try{t?.type==="unmount"&&($!==null&&t.component.componentId===$&&($=null),y!==null&&t.component.componentId===y&&(y=null)),yt(),bt()&&g()}catch{}})),kt(()=>{try{bt()&&g()}catch{}})}catch{}}function tn(){try{$n(),kt(null),gt(),qe(),me(),zt(),nt&&(nt(),nt=null),I=!1,C=!1,B="list",$=null,w=null,y=null,F=[],Ot(),ar()}catch{}}const vt=[];let Vt=null,Nt=null,jt=null;function dr(){try{Vt=i.interceptBefore((t,e)=>{try{const n=(e.method??"GET").toUpperCase();vt.push({method:n,url:t,startTs:performance.now()})}catch{}return{url:t,options:e}}),Nt=i.interceptAfter(t=>{try{const e=vt.shift(),n=e?.method??"",o=e?.url??t.url??"",c=e?performance.now()-e.startTs:0;Be(n,o,t.status,c)}catch{}return t}),jt=i.interceptError(t=>{try{const e=vt.shift(),n=e?performance.now()-e.startTs:0;Le(e?.method??"",e?.url??"",t.message,n)}catch{}})}catch{}}function ur(){try{Vt?.(),Nt?.(),jt?.(),Vt=null,Nt=null,jt=null,vt.length=0}catch{}}function pr(){try{if(i.isDevToolsInstalled())return;i.installDevToolsHooks({registerComponent:Gt,unregisterComponent:Ut,notifyRender:Yt,getComponentName:A,logComponentMount:we,logComponentRender:Se,logComponentUnmount:ke,logAtomSet:Ce,logAtomUpdate:Te,logEventTrigger:Me,logCleanupEventTrigger:Ee,logFetchRequest:Ln,logFetchResponse:Be,logFetchError:Le,recordRender:Rt}),ge(),dr()}catch{}}let xt=!1;function fr(){try{if(xt)return;xt=!0,pr(),sr()}catch{}}function hr(){try{if(!xt)return;xt=!1,ur(),tn()}catch{}}s.clearLogs=_e,s.clearPerfData=Ne,s.connectLogStore=ge,s.connectPerfStore=Re,s.destroyDevTools=tn,s.destroyMatesDevTools=hr,s.devToolsEvent=N,s.disconnectLogStore=me,s.disconnectPerfStore=Pe,s.getAllComponents=St,s.getComponentDepth=E,s.getComponentGroups=Xt,s.getComponentName=A,s.getComponentsByView=cn,s.getLogCount=Bn,s.getLogs=ve,s.getPerfSummaries=De,s.getRecentTimings=Dn,s.getRenderVersion=j,s.getSlowestRenders=Ve,s.getUnreadLogCount=xe,s.isLogStoreConnected=Mn,s.isPerfStoreConnected=zn,s.logAtomSet=Ce,s.logAtomUpdate=Te,s.logCleanupEventTrigger=Ee,s.logComponentMount=we,s.logComponentRender=Se,s.logComponentUnmount=ke,s.logEventTrigger=Me,s.markLogsRead=$e,s.notifyRender=Yt,s.onLogEntry=he,s.onPerfEntry=He,s.recordRender=Rt,s.registerComponent=Gt,s.renderAtomsViewer=ne,s.renderComponentInspector=Tt,s.renderComponentList=se,s.renderComponentTree=ue,s.renderHeader=fe,s.renderHooksViewer=Ct,s.renderLogsViewer=Ae,s.renderMatesDevTools=fr,s.renderPerfViewer=Ge,s.renderPropsViewer=te,s.renderScopesViewer=ee,s.renderUseStateViewer=re,s.renderValueTree=T,s.renderValueTreeEntries=fn,s.setValueTreeRenderCallback=kt,s.startRenderTiming=Fn,s.styles=r,s.unregisterComponent=Ut,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})}));
|
|
649
|
+
`,S)}catch{}}function cr(t){try{t.preventDefault();const e=t.clientY,n=D,o=l=>{try{const a=window.innerHeight*jn;D=Math.max(Nn,Math.min(a,n+(e-l.clientY)));const u=rt();u&&(u.style.height=`${D}px`),Pt()}catch{}},c=()=>{try{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",c)}catch{}};document.addEventListener("mousemove",o),document.addEventListener("mouseup",c)}catch{}}function lr(){try{if(f)return;f=document.createElement("div"),f.id="mates-devtools-fab",f.className=r.fab,f.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/></svg>',f.style.bottom="50px",f.style.right="50px",f.addEventListener("mousedown",Ke),f.addEventListener("click",Je),document.body.appendChild(f)}catch{}}function ar(){try{if(!f)return;f.removeEventListener("mousedown",Ke),f.removeEventListener("click",Je),f.remove(),f=null}catch{}}function Je(){try{if(ht){ht=!1;return}C?Zn():er()}catch{}}function Ke(t){try{t.preventDefault(),Ht=!0,ht=!1;const e=f.getBoundingClientRect();Ue=t.clientX-e.left,Ye=t.clientY-e.top,f.classList.add(r.fabDragging),document.addEventListener("mousemove",Qe),document.addEventListener("mouseup",Ze)}catch{}}function Qe(t){try{if(!Ht||!f)return;ht=!0,f.style.bottom="auto",f.style.right="auto",f.style.left=`${Math.max(0,Math.min(window.innerWidth-48,t.clientX-Ue))}px`,f.style.top=`${Math.max(0,Math.min(window.innerHeight-48,t.clientY-Ye))}px`}catch{}}function Ze(){try{Ht=!1,f?.classList.remove(r.fabDragging),document.removeEventListener("mousemove",Qe),document.removeEventListener("mouseup",Ze)}catch{}}function sr(){try{xn(),lr(),nt||(nt=N.__subscribe(t=>{try{t?.type==="unmount"&&($!==null&&t.component.componentId===$&&($=null),y!==null&&t.component.componentId===y&&(y=null)),yt(),bt()&&g()}catch{}})),kt(()=>{try{bt()&&g()}catch{}})}catch{}}function tn(){try{$n(),kt(null),gt(),qe(),me(),zt(),nt&&(nt(),nt=null),I=!1,C=!1,B="list",$=null,w=null,y=null,F=[],Ot(),ar()}catch{}}const vt=[];let Vt=null,Nt=null,jt=null;function dr(){try{Vt=i.interceptBefore((t,e)=>{try{const n=(e.method??"GET").toUpperCase();vt.push({method:n,url:t,startTs:performance.now()})}catch{}return{url:t,options:e}}),Nt=i.interceptAfter(t=>{try{const e=vt.shift(),n=e?.method??"",o=e?.url??t.url??"",c=e?performance.now()-e.startTs:0;Be(n,o,t.status,c)}catch{}return t}),jt=i.interceptError(t=>{try{const e=vt.shift(),n=e?performance.now()-e.startTs:0;Le(e?.method??"",e?.url??"",t.message,n)}catch{}})}catch{}}function ur(){try{Vt?.(),Nt?.(),jt?.(),Vt=null,Nt=null,jt=null,vt.length=0}catch{}}function pr(){try{if(i.isDevToolsInstalled())return;i.installDevToolsHooks({registerComponent:Gt,unregisterComponent:Ut,notifyRender:Yt,getComponentName:A,logComponentMount:we,logComponentRender:Se,logComponentUnmount:ke,logAtomSet:Ce,logAtomUpdate:Te,logEventTrigger:Me,logCleanupEventTrigger:Ee,logFetchRequest:Ln,logFetchResponse:Be,logFetchError:Le,recordRender:Rt}),ge(),dr()}catch{}}let xt=!1;function fr(){try{if(xt)return;xt=!0,pr(),sr()}catch{}}function hr(){try{if(!xt)return;xt=!1,ur(),tn()}catch{}}s.clearLogs=_e,s.clearPerfData=Ne,s.connectLogStore=ge,s.connectPerfStore=Re,s.destroyDevTools=tn,s.destroyMatesDevTools=hr,s.devToolsEvent=N,s.disconnectLogStore=me,s.disconnectPerfStore=Pe,s.getAllComponents=St,s.getComponentDepth=E,s.getComponentGroups=Xt,s.getComponentName=A,s.getComponentsByView=cn,s.getLogCount=Bn,s.getLogs=ve,s.getPerfSummaries=De,s.getRecentTimings=Dn,s.getRenderVersion=j,s.getSlowestRenders=Ve,s.getUnreadLogCount=xe,s.isLogStoreConnected=Mn,s.isPerfStoreConnected=zn,s.logAtomSet=Ce,s.logAtomUpdate=Te,s.logCleanupEventTrigger=Ee,s.logComponentMount=we,s.logComponentRender=Se,s.logComponentUnmount=ke,s.logEventTrigger=Me,s.markLogsRead=$e,s.notifyRender=Yt,s.onLogEntry=he,s.onPerfEntry=He,s.recordRender=Rt,s.registerComponent=Gt,s.renderAtomsViewer=ne,s.renderComponentInspector=Tt,s.renderComponentList=se,s.renderComponentTree=ue,s.renderHeader=fe,s.renderHooksViewer=Ct,s.renderLogsViewer=Ae,s.renderMatesDevTools=fr,s.renderPerfViewer=Ge,s.renderPropsViewer=te,s.renderScopesViewer=ee,s.renderUseStateViewer=re,s.renderValueTree=T,s.renderValueTreeEntries=fn,s.setValueTreeRenderCallback=kt,s.startRenderTiming=Fn,s.styles=r,s.unregisterComponent=Ut,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MatesDevTools.d.ts","sourceRoot":"","sources":["../../../../src/MatesDevTools.ts"],"names":[],"mappings":"AA0HA,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,CAmFtD;AA2HD,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAyB7D;
|
|
1
|
+
{"version":3,"file":"MatesDevTools.d.ts","sourceRoot":"","sources":["../../../../src/MatesDevTools.ts"],"names":[],"mappings":"AA0HA,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,CAmFtD;AA2HD,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAyB7D;AA6iBD,wBAAgB,cAAc,IAAI,IAAI,CAwCrC;AAED,wBAAgB,eAAe,IAAI,IAAI,CA2BtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x-x.d.ts","sourceRoot":"","sources":["../../../../../lib/Template/x-x.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"x-x.d.ts","sourceRoot":"","sources":["../../../../../lib/Template/x-x.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,gBAAgB,EAAgB,MAAM,2BAA2B,CAAC;AAahF,qBAAa,SAAU,SAAQ,WAAW;IACxC,OAAO,CAAC,MAAM,CAAsB;IAE7B,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACpC,IAAI,SAAe;IAC1B,OAAO,CAAC,KAAK,CAAM;IACnB,OAAO,CAAC,WAAW,CAEV;IACT,OAAO,CAAC,WAAW,CAAU;IAC7B,OAAO,CAAC,gBAAgB,CAAU;IAE3B,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC/B,MAAM,EAAE,GAAG,CAAC,UAAU,GAAG,EAAE,MAAM,GAAG,CAAC,CAAa;IAEzD,gFAAgF;IACzE,UAAU,EAAE;QAAE,KAAK,EAAE,GAAG,CAAC;QAAC,IAAI,EAAE,GAAG,CAAA;KAAE,EAAE,CAAM;IAEpD,QAAQ,CAAC,UAAU,EAAE,UAAU,GAAG,EAAE,KAAK,EAAE,GAAG;IAIvC,WAAW,SAAM;IAExB,iGAAiG;IAC1F,MAAM,SAAK;IAClB,sEAAsE;IAC/D,gBAAgB,EAAE,SAAS,GAAG,IAAI,CAAQ;IACjD,kFAAkF;IAC3E,cAAc,SAAK;IAE1B,+CAA+C;IACxC,cAAc,EAAE,CAAC,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC,EAAE,CAAM;IACzD,2EAA2E;IACpE,WAAW,EAAE,OAAO,CAAQ;IAG5B,qBAAqB,EAAE,GAAG,CAAC,MAAM,IAAI,CAAC,CAAa;IACnD,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI;IAKjC,aAAa,EAAE,IAAI,GAAG,gBAAgB,CAAQ;IAC9C,UAAU,EAAE,IAAI,GAAG,gBAAgB,CAAQ;;IAwBlD,IAAI,KAAK,CAAC,GAAG,qBAAA,EAGZ;IAED,IAAI,KAAK,wBAER;IAEM,OAAO,EAAE,GAAG,CAAC;IAEpB,OAAO,CAAC,cAAc,CAAS;IAM/B;;;;;;;OAOG;IACH,OAAO,CAAC,gBAAgB;IAmBxB,IAAI,IAAI,CAAC,GAAG,KAAA,EAyBX;IAED,IAAI,IAAI,QAEP;IAMD,gBAAgB;IAIhB,iBAAiB;IAgCjB,oBAAoB;IAqBpB,OAAO,CAAC,qBAAqB,CAa3B;IAEF,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ;IAazC,OAAO;IA6CP,OAAO,CAAC,eAAe;IAqFvB,OAAO,CAAC,kBAAkB;CA0E3B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mates-devtools",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.6",
|
|
4
4
|
"description": "In-app DevTools panel for the Mates framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/mates-devtools.umd.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"happy-dom": "^20.8.4",
|
|
41
|
-
"mates": "0.1.0-beta.
|
|
41
|
+
"mates": "0.1.0-beta.12",
|
|
42
42
|
"typescript": "^5.3.2",
|
|
43
43
|
"vite": "^7.3.1",
|
|
44
44
|
"vitest": "^4.0.18"
|