@react-perfscope/ui 0.3.0 → 0.5.0
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/index.cjs +456 -202
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +456 -202
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -72,6 +72,9 @@ var en = {
|
|
|
72
72
|
sort: "Sort",
|
|
73
73
|
sortChronological: "chronological",
|
|
74
74
|
sortSeverity: "severity (worst first)",
|
|
75
|
+
filterPlaceholder: "Filter\u2026",
|
|
76
|
+
filterAria: "Filter signals",
|
|
77
|
+
filterNoMatches: "No signals match the filter.",
|
|
75
78
|
groupBy: "Group by",
|
|
76
79
|
groupChronological: "chronological",
|
|
77
80
|
groupComponent: "component",
|
|
@@ -142,7 +145,8 @@ var en = {
|
|
|
142
145
|
inputDelay: "input delay",
|
|
143
146
|
processingTime: "processing",
|
|
144
147
|
presentation: "presentation",
|
|
145
|
-
interactionThresholdHint: "Only interactions \u226540ms are shown \u2014 INP surfaces the slow ones; fast clicks are omitted."
|
|
148
|
+
interactionThresholdHint: "Only interactions \u226540ms are shown \u2014 INP surfaces the slow ones; fast clicks are omitted.",
|
|
149
|
+
layoutShiftHint: "Every layout shift, including ones triggered by your interactions. The CLS metric excludes input-driven shifts, so this is not a CLS score."
|
|
146
150
|
};
|
|
147
151
|
var KIND_LABELS_KO = {
|
|
148
152
|
render: "\uB80C\uB354",
|
|
@@ -162,6 +166,9 @@ var ko = {
|
|
|
162
166
|
sort: "\uC815\uB82C",
|
|
163
167
|
sortChronological: "\uC2DC\uAC04\uC21C",
|
|
164
168
|
sortSeverity: "\uC2EC\uAC01\uB3C4\uC21C (\uB192\uC740 \uAC83\uBD80\uD130)",
|
|
169
|
+
filterPlaceholder: "\uD544\uD130\u2026",
|
|
170
|
+
filterAria: "\uC2DC\uADF8\uB110 \uD544\uD130",
|
|
171
|
+
filterNoMatches: "\uD544\uD130\uC640 \uC77C\uCE58\uD558\uB294 \uC2DC\uADF8\uB110\uC774 \uC5C6\uC5B4\uC694.",
|
|
165
172
|
groupBy: "\uADF8\uB8F9\uD654",
|
|
166
173
|
groupChronological: "\uC2DC\uAC04\uC21C",
|
|
167
174
|
groupComponent: "\uCEF4\uD3EC\uB10C\uD2B8",
|
|
@@ -232,7 +239,8 @@ var ko = {
|
|
|
232
239
|
inputDelay: "\uC785\uB825 \uC9C0\uC5F0",
|
|
233
240
|
processingTime: "\uCC98\uB9AC",
|
|
234
241
|
presentation: "\uD654\uBA74 \uBC18\uC601",
|
|
235
|
-
interactionThresholdHint: "40ms \uC774\uC0C1 \uAC78\uB9B0 \uC0C1\uD638\uC791\uC6A9\uB9CC \uD45C\uC2DC\uB3FC\uC694 \u2014 \uB290\uB9B0 \uAC83\uB9CC INP\uB85C \uC7A1\uACE0, \uBE60\uB978 \uD074\uB9AD\uC740 \uC0DD\uB7B5\uD574\uC694."
|
|
242
|
+
interactionThresholdHint: "40ms \uC774\uC0C1 \uAC78\uB9B0 \uC0C1\uD638\uC791\uC6A9\uB9CC \uD45C\uC2DC\uB3FC\uC694 \u2014 \uB290\uB9B0 \uAC83\uB9CC INP\uB85C \uC7A1\uACE0, \uBE60\uB978 \uD074\uB9AD\uC740 \uC0DD\uB7B5\uD574\uC694.",
|
|
243
|
+
layoutShiftHint: "\uC0AC\uC6A9\uC790 \uC778\uD130\uB799\uC158\uC73C\uB85C \uC0DD\uAE34 \uAC83\uAE4C\uC9C0 \uD3EC\uD568\uD55C \uBAA8\uB4E0 \uB808\uC774\uC544\uC6C3 \uC2DC\uD504\uD2B8\uC608\uC694. CLS \uC9C0\uD45C\uB294 \uC785\uB825\uC73C\uB85C \uC778\uD55C \uC2DC\uD504\uD2B8\uB97C \uC81C\uC678\uD558\uBBC0\uB85C, \uC774\uAC74 CLS \uC810\uC218\uAC00 \uC544\uB2C8\uC5D0\uC694."
|
|
236
244
|
};
|
|
237
245
|
var STRINGS = { en, ko };
|
|
238
246
|
function isLang(v) {
|
|
@@ -1854,8 +1862,218 @@ function RenderInsights({ signals, onSelect }) {
|
|
|
1854
1862
|
);
|
|
1855
1863
|
}
|
|
1856
1864
|
|
|
1857
|
-
// src/
|
|
1865
|
+
// src/inp-episode.tsx
|
|
1866
|
+
import { correlate } from "@react-perfscope/core";
|
|
1867
|
+
|
|
1868
|
+
// src/episode-shared.tsx
|
|
1858
1869
|
import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs5 } from "preact/jsx-runtime";
|
|
1870
|
+
function memberLabel(m) {
|
|
1871
|
+
const s = m.signal;
|
|
1872
|
+
if (s.kind === "render") return `${s.component} (${s.reason})`;
|
|
1873
|
+
if (s.kind === "forced-reflow") {
|
|
1874
|
+
const top = s.stack[0];
|
|
1875
|
+
return top ? `forced reflow \xB7 ${top.file}:${top.line}` : "forced reflow";
|
|
1876
|
+
}
|
|
1877
|
+
return `layout shift ${s.value.toFixed(3)}`;
|
|
1878
|
+
}
|
|
1879
|
+
function EpisodeMemberRow({ member }) {
|
|
1880
|
+
return /* @__PURE__ */ jsxs5(
|
|
1881
|
+
"div",
|
|
1882
|
+
{
|
|
1883
|
+
"data-member-kind": member.signal.kind,
|
|
1884
|
+
style: { display: "flex", alignItems: "center", gap: "6px", padding: "1px 0", color: "#ccc" },
|
|
1885
|
+
children: [
|
|
1886
|
+
/* @__PURE__ */ jsx5("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: memberLabel(member) }),
|
|
1887
|
+
member.causedBy && /* @__PURE__ */ jsxs5("span", { style: { flex: "0 0 auto", color: "#888" }, children: [
|
|
1888
|
+
"\u2190 ",
|
|
1889
|
+
member.causedBy.component
|
|
1890
|
+
] }),
|
|
1891
|
+
member.confidence === "caused" && /* @__PURE__ */ jsx5(
|
|
1892
|
+
"span",
|
|
1893
|
+
{
|
|
1894
|
+
style: {
|
|
1895
|
+
flex: "0 0 auto",
|
|
1896
|
+
fontSize: "9px",
|
|
1897
|
+
color: "#e0a030",
|
|
1898
|
+
border: "1px solid #5a4410",
|
|
1899
|
+
borderRadius: "3px",
|
|
1900
|
+
padding: "0 4px"
|
|
1901
|
+
},
|
|
1902
|
+
children: "caused"
|
|
1903
|
+
}
|
|
1904
|
+
)
|
|
1905
|
+
]
|
|
1906
|
+
}
|
|
1907
|
+
);
|
|
1908
|
+
}
|
|
1909
|
+
function EpisodeMemberList({ members }) {
|
|
1910
|
+
if (members.length === 0) return /* @__PURE__ */ jsx5("span", { style: { color: "#555" }, children: "\u2014" });
|
|
1911
|
+
return /* @__PURE__ */ jsx5(Fragment2, { children: members.map((m, i) => /* @__PURE__ */ jsx5(EpisodeMemberRow, { member: m }, i)) });
|
|
1912
|
+
}
|
|
1913
|
+
|
|
1914
|
+
// src/inp-episode.tsx
|
|
1915
|
+
import { jsx as jsx6, jsxs as jsxs6 } from "preact/jsx-runtime";
|
|
1916
|
+
var PHASES = [
|
|
1917
|
+
{ phase: "input-delay", labelKey: "inputDelay" },
|
|
1918
|
+
{ phase: "processing", labelKey: "processingTime" },
|
|
1919
|
+
{ phase: "presentation", labelKey: "presentation" }
|
|
1920
|
+
];
|
|
1921
|
+
function worstInteractionEpisode(signals) {
|
|
1922
|
+
let worst = null;
|
|
1923
|
+
for (const ep of correlate(signals)) {
|
|
1924
|
+
if (ep.anchor.kind !== "interaction") continue;
|
|
1925
|
+
if (!worst || ep.anchor.duration > worst.anchor.duration) worst = ep;
|
|
1926
|
+
}
|
|
1927
|
+
return worst;
|
|
1928
|
+
}
|
|
1929
|
+
function phaseMs(episode, phase) {
|
|
1930
|
+
const a = episode.anchor;
|
|
1931
|
+
if (a.kind !== "interaction") return 0;
|
|
1932
|
+
return phase === "input-delay" ? a.inputDelay : phase === "processing" ? a.processing : a.presentation;
|
|
1933
|
+
}
|
|
1934
|
+
function InpEpisode({ signals }) {
|
|
1935
|
+
const { t } = useI18n();
|
|
1936
|
+
const episode = worstInteractionEpisode(signals);
|
|
1937
|
+
if (!episode || episode.anchor.kind !== "interaction") return null;
|
|
1938
|
+
const a = episode.anchor;
|
|
1939
|
+
const target = a.target ? ` on ${a.target}` : "";
|
|
1940
|
+
return /* @__PURE__ */ jsxs6(
|
|
1941
|
+
"div",
|
|
1942
|
+
{
|
|
1943
|
+
"data-inp-episode": true,
|
|
1944
|
+
style: {
|
|
1945
|
+
margin: "0 0 8px",
|
|
1946
|
+
border: "1px solid #1f1f1f",
|
|
1947
|
+
borderRadius: "6px",
|
|
1948
|
+
background: "#121212",
|
|
1949
|
+
fontFamily: "SF Mono, Menlo, Consolas, monospace",
|
|
1950
|
+
fontSize: "11px",
|
|
1951
|
+
overflow: "hidden"
|
|
1952
|
+
},
|
|
1953
|
+
children: [
|
|
1954
|
+
/* @__PURE__ */ jsxs6("div", { style: { padding: "6px 8px", borderBottom: "1px solid #1f1f1f", color: "#ddd" }, children: [
|
|
1955
|
+
/* @__PURE__ */ jsx6("strong", { children: a.eventType }),
|
|
1956
|
+
target,
|
|
1957
|
+
" \u2014 ",
|
|
1958
|
+
/* @__PURE__ */ jsxs6("strong", { children: [
|
|
1959
|
+
Math.round(a.duration),
|
|
1960
|
+
"ms"
|
|
1961
|
+
] }),
|
|
1962
|
+
" ",
|
|
1963
|
+
/* @__PURE__ */ jsx6("span", { style: { color: "#888" }, children: "INP" })
|
|
1964
|
+
] }),
|
|
1965
|
+
PHASES.map(({ phase, labelKey }) => {
|
|
1966
|
+
const members = episode.members.filter((m) => m.phase === phase);
|
|
1967
|
+
return /* @__PURE__ */ jsxs6(
|
|
1968
|
+
"div",
|
|
1969
|
+
{
|
|
1970
|
+
"data-inp-phase": phase,
|
|
1971
|
+
style: { display: "flex", gap: "8px", padding: "5px 8px", borderTop: "1px solid #1a1a1a" },
|
|
1972
|
+
children: [
|
|
1973
|
+
/* @__PURE__ */ jsxs6("div", { style: { flex: "0 0 92px", color: "#aaa" }, children: [
|
|
1974
|
+
t[labelKey],
|
|
1975
|
+
/* @__PURE__ */ jsxs6("div", { style: { color: "#666", fontSize: "10px" }, children: [
|
|
1976
|
+
Math.round(phaseMs(episode, phase)),
|
|
1977
|
+
"ms"
|
|
1978
|
+
] })
|
|
1979
|
+
] }),
|
|
1980
|
+
/* @__PURE__ */ jsx6("div", { style: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ jsx6(EpisodeMemberList, { members }) })
|
|
1981
|
+
]
|
|
1982
|
+
},
|
|
1983
|
+
phase
|
|
1984
|
+
);
|
|
1985
|
+
})
|
|
1986
|
+
]
|
|
1987
|
+
}
|
|
1988
|
+
);
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1991
|
+
// src/long-task-episode.tsx
|
|
1992
|
+
import { correlate as correlate2 } from "@react-perfscope/core";
|
|
1993
|
+
import { jsx as jsx7, jsxs as jsxs7 } from "preact/jsx-runtime";
|
|
1994
|
+
function worstLongTaskEpisode(signals) {
|
|
1995
|
+
let worst = null;
|
|
1996
|
+
for (const ep of correlate2(signals)) {
|
|
1997
|
+
if (ep.anchor.kind !== "long-task") continue;
|
|
1998
|
+
if (!worst || ep.anchor.duration > worst.anchor.duration) worst = ep;
|
|
1999
|
+
}
|
|
2000
|
+
return worst;
|
|
2001
|
+
}
|
|
2002
|
+
function LongTaskEpisode({ signals }) {
|
|
2003
|
+
const { t } = useI18n();
|
|
2004
|
+
const episode = worstLongTaskEpisode(signals);
|
|
2005
|
+
if (!episode || episode.anchor.kind !== "long-task") return null;
|
|
2006
|
+
if (episode.members.length === 0) return null;
|
|
2007
|
+
const a = episode.anchor;
|
|
2008
|
+
return /* @__PURE__ */ jsxs7(
|
|
2009
|
+
"div",
|
|
2010
|
+
{
|
|
2011
|
+
"data-long-task-episode": true,
|
|
2012
|
+
style: {
|
|
2013
|
+
margin: "0 0 8px",
|
|
2014
|
+
border: "1px solid #1f1f1f",
|
|
2015
|
+
borderRadius: "6px",
|
|
2016
|
+
background: "#121212",
|
|
2017
|
+
fontFamily: "SF Mono, Menlo, Consolas, monospace",
|
|
2018
|
+
fontSize: "11px",
|
|
2019
|
+
overflow: "hidden"
|
|
2020
|
+
},
|
|
2021
|
+
children: [
|
|
2022
|
+
/* @__PURE__ */ jsxs7("div", { style: { padding: "6px 8px", borderBottom: "1px solid #1f1f1f", color: "#ddd" }, children: [
|
|
2023
|
+
/* @__PURE__ */ jsx7("strong", { children: t.kindLabel("long-task") }),
|
|
2024
|
+
" \u2014 ",
|
|
2025
|
+
/* @__PURE__ */ jsxs7("strong", { children: [
|
|
2026
|
+
Math.round(a.duration),
|
|
2027
|
+
"ms"
|
|
2028
|
+
] })
|
|
2029
|
+
] }),
|
|
2030
|
+
/* @__PURE__ */ jsx7("div", { style: { padding: "5px 8px" }, children: /* @__PURE__ */ jsx7(EpisodeMemberList, { members: episode.members }) })
|
|
2031
|
+
]
|
|
2032
|
+
}
|
|
2033
|
+
);
|
|
2034
|
+
}
|
|
2035
|
+
|
|
2036
|
+
// src/filter.ts
|
|
2037
|
+
function signalSearchText(signal) {
|
|
2038
|
+
switch (signal.kind) {
|
|
2039
|
+
case "render": {
|
|
2040
|
+
const parts = [signal.component];
|
|
2041
|
+
if (signal.changedProps) parts.push(...signal.changedProps);
|
|
2042
|
+
if (signal.members) for (const m of signal.members) parts.push(m.component);
|
|
2043
|
+
return parts.join(" ").toLowerCase();
|
|
2044
|
+
}
|
|
2045
|
+
case "network":
|
|
2046
|
+
return signal.url.toLowerCase();
|
|
2047
|
+
case "web-vital":
|
|
2048
|
+
return signal.name.toLowerCase();
|
|
2049
|
+
case "interaction":
|
|
2050
|
+
return [signal.eventType, signal.target ?? ""].join(" ").toLowerCase();
|
|
2051
|
+
case "forced-reflow": {
|
|
2052
|
+
const f = signal.stack[0];
|
|
2053
|
+
return f ? [f.fnName ?? "", f.file].join(" ").toLowerCase() : "";
|
|
2054
|
+
}
|
|
2055
|
+
case "long-task": {
|
|
2056
|
+
const parts = [];
|
|
2057
|
+
if (signal.scripts)
|
|
2058
|
+
for (const s of signal.scripts) parts.push(s.sourceFunctionName, s.invoker, s.sourceURL);
|
|
2059
|
+
if (signal.attribution)
|
|
2060
|
+
for (const a of signal.attribution) parts.push(a.frame.fnName ?? "", a.frame.file);
|
|
2061
|
+
return parts.join(" ").toLowerCase();
|
|
2062
|
+
}
|
|
2063
|
+
case "layout-shift":
|
|
2064
|
+
return "layout-shift";
|
|
2065
|
+
default:
|
|
2066
|
+
return "";
|
|
2067
|
+
}
|
|
2068
|
+
}
|
|
2069
|
+
function signalMatchesFilter(signal, query) {
|
|
2070
|
+
const q = query.trim().toLowerCase();
|
|
2071
|
+
if (!q) return true;
|
|
2072
|
+
return signalSearchText(signal).includes(q);
|
|
2073
|
+
}
|
|
2074
|
+
|
|
2075
|
+
// src/panel.tsx
|
|
2076
|
+
import { Fragment as Fragment3, jsx as jsx8, jsxs as jsxs8 } from "preact/jsx-runtime";
|
|
1859
2077
|
var RENDER_REASON_COLOR = {
|
|
1860
2078
|
mount: "#5ac8fa",
|
|
1861
2079
|
state: "#34c759",
|
|
@@ -1879,7 +2097,7 @@ function RenderReasonTag({ reason, changedProps }) {
|
|
|
1879
2097
|
const color = RENDER_REASON_COLOR[reason];
|
|
1880
2098
|
const label = renderReasonLabel(t, reason);
|
|
1881
2099
|
const keys = reason === "props" && changedProps && changedProps.length > 0 ? `: ${changedProps.join(", ")}` : "";
|
|
1882
|
-
return /* @__PURE__ */
|
|
2100
|
+
return /* @__PURE__ */ jsxs8(
|
|
1883
2101
|
"span",
|
|
1884
2102
|
{
|
|
1885
2103
|
style: {
|
|
@@ -1935,7 +2153,7 @@ var WEB_VITAL_UNIT2 = {
|
|
|
1935
2153
|
};
|
|
1936
2154
|
function RatingDot({ rating }) {
|
|
1937
2155
|
const { t } = useI18n();
|
|
1938
|
-
return /* @__PURE__ */
|
|
2156
|
+
return /* @__PURE__ */ jsx8(
|
|
1939
2157
|
"span",
|
|
1940
2158
|
{
|
|
1941
2159
|
"data-rating": rating,
|
|
@@ -1993,18 +2211,18 @@ var monoStyle = {
|
|
|
1993
2211
|
};
|
|
1994
2212
|
function LayoutShiftDetail({ s }) {
|
|
1995
2213
|
const { t } = useI18n();
|
|
1996
|
-
return /* @__PURE__ */
|
|
1997
|
-
/* @__PURE__ */
|
|
1998
|
-
/* @__PURE__ */
|
|
1999
|
-
/* @__PURE__ */
|
|
2214
|
+
return /* @__PURE__ */ jsxs8("div", { style: { paddingLeft: "12px" }, children: [
|
|
2215
|
+
/* @__PURE__ */ jsxs8("div", { style: detailRowStyle, children: [
|
|
2216
|
+
/* @__PURE__ */ jsx8("span", { style: detailLabelStyle, children: t.value }),
|
|
2217
|
+
/* @__PURE__ */ jsx8("span", { children: s.value.toFixed(4) })
|
|
2000
2218
|
] }),
|
|
2001
|
-
s.sources.length === 0 ? /* @__PURE__ */
|
|
2002
|
-
/* @__PURE__ */
|
|
2219
|
+
s.sources.length === 0 ? /* @__PURE__ */ jsx8("div", { style: { color: "#666" }, children: t.noSourceRects }) : s.sources.map((r, i) => /* @__PURE__ */ jsxs8("div", { style: { ...detailRowStyle, ...monoStyle }, children: [
|
|
2220
|
+
/* @__PURE__ */ jsxs8("span", { style: { color: "#888" }, children: [
|
|
2003
2221
|
t.rect,
|
|
2004
2222
|
" ",
|
|
2005
2223
|
i + 1
|
|
2006
2224
|
] }),
|
|
2007
|
-
/* @__PURE__ */
|
|
2225
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
2008
2226
|
"x=",
|
|
2009
2227
|
r.x.toFixed(0),
|
|
2010
2228
|
" y=",
|
|
@@ -2019,25 +2237,25 @@ function LayoutShiftDetail({ s }) {
|
|
|
2019
2237
|
}
|
|
2020
2238
|
function NetworkDetail({ s }) {
|
|
2021
2239
|
const { t } = useI18n();
|
|
2022
|
-
return /* @__PURE__ */
|
|
2023
|
-
/* @__PURE__ */
|
|
2024
|
-
/* @__PURE__ */
|
|
2025
|
-
/* @__PURE__ */
|
|
2026
|
-
/* @__PURE__ */
|
|
2240
|
+
return /* @__PURE__ */ jsxs8("div", { style: { paddingLeft: "12px" }, children: [
|
|
2241
|
+
/* @__PURE__ */ jsx8("div", { style: { ...detailRowStyle, ...monoStyle, wordBreak: "break-all" }, children: /* @__PURE__ */ jsx8("span", { children: s.url }) }),
|
|
2242
|
+
/* @__PURE__ */ jsxs8("div", { style: detailRowStyle, children: [
|
|
2243
|
+
/* @__PURE__ */ jsx8("span", { style: detailLabelStyle, children: t.started }),
|
|
2244
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
2027
2245
|
s.startedAt.toFixed(0),
|
|
2028
2246
|
"ms"
|
|
2029
2247
|
] })
|
|
2030
2248
|
] }),
|
|
2031
|
-
/* @__PURE__ */
|
|
2032
|
-
/* @__PURE__ */
|
|
2033
|
-
/* @__PURE__ */
|
|
2249
|
+
/* @__PURE__ */ jsxs8("div", { style: detailRowStyle, children: [
|
|
2250
|
+
/* @__PURE__ */ jsx8("span", { style: detailLabelStyle, children: t.duration }),
|
|
2251
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
2034
2252
|
s.duration.toFixed(0),
|
|
2035
2253
|
"ms"
|
|
2036
2254
|
] })
|
|
2037
2255
|
] }),
|
|
2038
|
-
/* @__PURE__ */
|
|
2039
|
-
/* @__PURE__ */
|
|
2040
|
-
/* @__PURE__ */
|
|
2256
|
+
/* @__PURE__ */ jsxs8("div", { style: detailRowStyle, children: [
|
|
2257
|
+
/* @__PURE__ */ jsx8("span", { style: detailLabelStyle, children: t.size }),
|
|
2258
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
2041
2259
|
(s.size / 1024).toFixed(2),
|
|
2042
2260
|
"KB (",
|
|
2043
2261
|
s.size,
|
|
@@ -2046,69 +2264,69 @@ function NetworkDetail({ s }) {
|
|
|
2046
2264
|
")"
|
|
2047
2265
|
] })
|
|
2048
2266
|
] }),
|
|
2049
|
-
/* @__PURE__ */
|
|
2050
|
-
/* @__PURE__ */
|
|
2051
|
-
/* @__PURE__ */
|
|
2267
|
+
/* @__PURE__ */ jsxs8("div", { style: detailRowStyle, children: [
|
|
2268
|
+
/* @__PURE__ */ jsx8("span", { style: detailLabelStyle, children: t.renderBlocking }),
|
|
2269
|
+
/* @__PURE__ */ jsx8("span", { children: s.blocking ? t.yes : t.no })
|
|
2052
2270
|
] })
|
|
2053
2271
|
] });
|
|
2054
2272
|
}
|
|
2055
2273
|
function WebVitalDetail({ s }) {
|
|
2056
2274
|
const { t } = useI18n();
|
|
2057
|
-
return /* @__PURE__ */
|
|
2058
|
-
/* @__PURE__ */
|
|
2059
|
-
/* @__PURE__ */
|
|
2060
|
-
/* @__PURE__ */
|
|
2275
|
+
return /* @__PURE__ */ jsxs8("div", { style: { paddingLeft: "12px" }, children: [
|
|
2276
|
+
/* @__PURE__ */ jsxs8("div", { style: detailRowStyle, children: [
|
|
2277
|
+
/* @__PURE__ */ jsx8("span", { style: detailLabelStyle, children: t.metric }),
|
|
2278
|
+
/* @__PURE__ */ jsx8("span", { children: s.name })
|
|
2061
2279
|
] }),
|
|
2062
|
-
/* @__PURE__ */
|
|
2063
|
-
/* @__PURE__ */
|
|
2064
|
-
/* @__PURE__ */
|
|
2280
|
+
/* @__PURE__ */ jsxs8("div", { style: detailRowStyle, children: [
|
|
2281
|
+
/* @__PURE__ */ jsx8("span", { style: detailLabelStyle, children: t.value }),
|
|
2282
|
+
/* @__PURE__ */ jsx8("span", { children: s.value.toFixed(2) })
|
|
2065
2283
|
] })
|
|
2066
2284
|
] });
|
|
2067
2285
|
}
|
|
2068
2286
|
function RenderDetail({ s }) {
|
|
2069
2287
|
const { t } = useI18n();
|
|
2070
2288
|
if (s.members && s.members.length > 0) {
|
|
2071
|
-
return /* @__PURE__ */
|
|
2072
|
-
/* @__PURE__ */
|
|
2073
|
-
/* @__PURE__ */
|
|
2074
|
-
/* @__PURE__ */
|
|
2289
|
+
return /* @__PURE__ */ jsxs8("div", { style: { paddingLeft: "12px" }, children: [
|
|
2290
|
+
/* @__PURE__ */ jsxs8("div", { style: detailRowStyle, children: [
|
|
2291
|
+
/* @__PURE__ */ jsx8("span", { style: detailLabelStyle, children: t.duration }),
|
|
2292
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
2075
2293
|
s.duration.toFixed(3),
|
|
2076
2294
|
"ms"
|
|
2077
2295
|
] })
|
|
2078
2296
|
] }),
|
|
2079
|
-
/* @__PURE__ */
|
|
2080
|
-
/* @__PURE__ */
|
|
2081
|
-
/* @__PURE__ */
|
|
2297
|
+
/* @__PURE__ */ jsxs8("div", { style: detailRowStyle, children: [
|
|
2298
|
+
/* @__PURE__ */ jsx8("span", { style: detailLabelStyle, children: t.at }),
|
|
2299
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
2082
2300
|
s.at.toFixed(2),
|
|
2083
2301
|
"ms"
|
|
2084
2302
|
] })
|
|
2085
2303
|
] }),
|
|
2086
|
-
/* @__PURE__ */
|
|
2304
|
+
/* @__PURE__ */ jsx8("div", { style: { marginTop: "6px" }, children: /* @__PURE__ */ jsx8(CascadeMembers, { members: s.members }) })
|
|
2087
2305
|
] });
|
|
2088
2306
|
}
|
|
2089
|
-
return /* @__PURE__ */
|
|
2090
|
-
/* @__PURE__ */
|
|
2091
|
-
/* @__PURE__ */
|
|
2092
|
-
/* @__PURE__ */
|
|
2307
|
+
return /* @__PURE__ */ jsxs8("div", { style: { paddingLeft: "12px" }, children: [
|
|
2308
|
+
/* @__PURE__ */ jsxs8("div", { style: detailRowStyle, children: [
|
|
2309
|
+
/* @__PURE__ */ jsx8("span", { style: detailLabelStyle, children: t.component }),
|
|
2310
|
+
/* @__PURE__ */ jsx8("span", { children: s.component })
|
|
2093
2311
|
] }),
|
|
2094
|
-
/* @__PURE__ */
|
|
2095
|
-
/* @__PURE__ */
|
|
2096
|
-
/* @__PURE__ */
|
|
2312
|
+
/* @__PURE__ */ jsxs8("div", { style: detailRowStyle, children: [
|
|
2313
|
+
/* @__PURE__ */ jsx8("span", { style: detailLabelStyle, children: t.reason }),
|
|
2314
|
+
/* @__PURE__ */ jsx8(RenderReasonTag, { reason: s.reason, changedProps: s.changedProps })
|
|
2097
2315
|
] }),
|
|
2098
|
-
s.reason === "props" && s.changedProps && s.changedProps.length > 0 && /* @__PURE__ */
|
|
2099
|
-
/* @__PURE__ */
|
|
2100
|
-
/* @__PURE__ */
|
|
2316
|
+
s.reason === "props" && s.changedProps && s.changedProps.length > 0 && /* @__PURE__ */ jsxs8("div", { style: { ...detailRowStyle, ...monoStyle }, children: [
|
|
2317
|
+
/* @__PURE__ */ jsx8("span", { style: detailLabelStyle, children: t.changedProps }),
|
|
2318
|
+
/* @__PURE__ */ jsx8("span", { children: s.changedProps.join(", ") })
|
|
2101
2319
|
] }),
|
|
2102
|
-
/* @__PURE__ */
|
|
2103
|
-
/* @__PURE__ */
|
|
2104
|
-
/* @__PURE__ */
|
|
2320
|
+
/* @__PURE__ */ jsxs8("div", { style: detailRowStyle, children: [
|
|
2321
|
+
/* @__PURE__ */ jsx8("span", { style: detailLabelStyle, children: t.duration }),
|
|
2322
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
2105
2323
|
s.duration.toFixed(3),
|
|
2106
2324
|
"ms"
|
|
2107
2325
|
] })
|
|
2108
2326
|
] }),
|
|
2109
|
-
/* @__PURE__ */
|
|
2110
|
-
/* @__PURE__ */
|
|
2111
|
-
/* @__PURE__ */
|
|
2327
|
+
/* @__PURE__ */ jsxs8("div", { style: detailRowStyle, children: [
|
|
2328
|
+
/* @__PURE__ */ jsx8("span", { style: detailLabelStyle, children: t.at }),
|
|
2329
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
2112
2330
|
s.at.toFixed(2),
|
|
2113
2331
|
"ms"
|
|
2114
2332
|
] })
|
|
@@ -2138,11 +2356,11 @@ function StackFrames({
|
|
|
2138
2356
|
cancelled = true;
|
|
2139
2357
|
};
|
|
2140
2358
|
}, [raw]);
|
|
2141
|
-
return /* @__PURE__ */
|
|
2142
|
-
resolving && /* @__PURE__ */
|
|
2143
|
-
frames.length === 0 ? /* @__PURE__ */
|
|
2144
|
-
f.fnName ? /* @__PURE__ */
|
|
2145
|
-
/* @__PURE__ */
|
|
2359
|
+
return /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
2360
|
+
resolving && /* @__PURE__ */ jsx8("div", { style: { color: "#666", fontSize: "10px", marginBottom: "4px" }, children: t.resolvingSourceMaps }),
|
|
2361
|
+
frames.length === 0 ? /* @__PURE__ */ jsx8("div", { style: { color: "#666" }, children: t.noStack }) : frames.map((f, i) => /* @__PURE__ */ jsxs8("div", { style: { ...detailRowStyle, ...monoStyle }, children: [
|
|
2362
|
+
f.fnName ? /* @__PURE__ */ jsx8("span", { children: f.fnName }) : /* @__PURE__ */ jsx8("span", { style: { color: "#666" }, children: t.anonymous }),
|
|
2363
|
+
/* @__PURE__ */ jsxs8("span", { style: { color: "#888" }, children: [
|
|
2146
2364
|
f.file,
|
|
2147
2365
|
":",
|
|
2148
2366
|
f.line,
|
|
@@ -2156,7 +2374,7 @@ function ForcedReflowDetail({
|
|
|
2156
2374
|
s,
|
|
2157
2375
|
resolveFrame
|
|
2158
2376
|
}) {
|
|
2159
|
-
return /* @__PURE__ */
|
|
2377
|
+
return /* @__PURE__ */ jsx8("div", { style: { paddingLeft: "12px" }, children: /* @__PURE__ */ jsx8(StackFrames, { raw: s.stack, resolveFrame }) });
|
|
2160
2378
|
}
|
|
2161
2379
|
function HotFunctions({
|
|
2162
2380
|
attribution,
|
|
@@ -2175,26 +2393,26 @@ function HotFunctions({
|
|
|
2175
2393
|
cancelled = true;
|
|
2176
2394
|
};
|
|
2177
2395
|
}, [attribution]);
|
|
2178
|
-
return /* @__PURE__ */
|
|
2179
|
-
/* @__PURE__ */
|
|
2180
|
-
/* @__PURE__ */
|
|
2396
|
+
return /* @__PURE__ */ jsxs8("div", { style: { marginTop: "6px" }, children: [
|
|
2397
|
+
/* @__PURE__ */ jsx8("div", { style: { ...detailLabelStyle, textTransform: "uppercase", fontSize: "10px", letterSpacing: "0.5px", marginBottom: "1px", color: "#ff9f0a" }, children: t.hotFunctions }),
|
|
2398
|
+
/* @__PURE__ */ jsx8("div", { style: { color: "#666", fontSize: "10px", marginBottom: "4px" }, children: t.hotFunctionsHint }),
|
|
2181
2399
|
attribution.map((a, i) => {
|
|
2182
2400
|
const f = frames[i] ?? a.frame;
|
|
2183
2401
|
const pct = Math.round(a.selfRatio * 100);
|
|
2184
|
-
return /* @__PURE__ */
|
|
2185
|
-
/* @__PURE__ */
|
|
2186
|
-
/* @__PURE__ */
|
|
2187
|
-
/* @__PURE__ */
|
|
2402
|
+
return /* @__PURE__ */ jsxs8("div", { style: { ...monoStyle, padding: "3px 0", borderTop: i > 0 ? "1px dashed #1f1f1f" : "none" }, children: [
|
|
2403
|
+
/* @__PURE__ */ jsxs8("div", { children: [
|
|
2404
|
+
/* @__PURE__ */ jsx8("span", { style: { color: "#ff9f0a", fontWeight: 600 }, children: f.fnName || /* @__PURE__ */ jsx8("span", { style: { color: "#666" }, children: t.anonymous }) }),
|
|
2405
|
+
/* @__PURE__ */ jsxs8("span", { style: { color: SEVERITY_COLOR.medium, marginLeft: "6px" }, children: [
|
|
2188
2406
|
pct,
|
|
2189
2407
|
"%"
|
|
2190
2408
|
] }),
|
|
2191
|
-
/* @__PURE__ */
|
|
2409
|
+
/* @__PURE__ */ jsxs8("span", { style: { color: "#666", marginLeft: "6px" }, children: [
|
|
2192
2410
|
"(",
|
|
2193
2411
|
a.sampleCount,
|
|
2194
2412
|
")"
|
|
2195
2413
|
] })
|
|
2196
2414
|
] }),
|
|
2197
|
-
/* @__PURE__ */
|
|
2415
|
+
/* @__PURE__ */ jsxs8("div", { style: { color: "#888", wordBreak: "break-all" }, children: [
|
|
2198
2416
|
f.file,
|
|
2199
2417
|
":",
|
|
2200
2418
|
f.line,
|
|
@@ -2211,59 +2429,59 @@ function LongTaskDetail({
|
|
|
2211
2429
|
}) {
|
|
2212
2430
|
const { t } = useI18n();
|
|
2213
2431
|
const scripts = s.scripts ? [...s.scripts].sort((a, b) => b.duration - a.duration) : [];
|
|
2214
|
-
return /* @__PURE__ */
|
|
2215
|
-
/* @__PURE__ */
|
|
2216
|
-
/* @__PURE__ */
|
|
2217
|
-
/* @__PURE__ */
|
|
2432
|
+
return /* @__PURE__ */ jsxs8("div", { style: { paddingLeft: "12px" }, children: [
|
|
2433
|
+
/* @__PURE__ */ jsxs8("div", { style: detailRowStyle, children: [
|
|
2434
|
+
/* @__PURE__ */ jsx8("span", { style: detailLabelStyle, children: t.started }),
|
|
2435
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
2218
2436
|
s.at.toFixed(2),
|
|
2219
2437
|
"ms"
|
|
2220
2438
|
] })
|
|
2221
2439
|
] }),
|
|
2222
|
-
/* @__PURE__ */
|
|
2223
|
-
/* @__PURE__ */
|
|
2224
|
-
/* @__PURE__ */
|
|
2440
|
+
/* @__PURE__ */ jsxs8("div", { style: detailRowStyle, children: [
|
|
2441
|
+
/* @__PURE__ */ jsx8("span", { style: detailLabelStyle, children: t.ended }),
|
|
2442
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
2225
2443
|
(s.at + s.duration).toFixed(2),
|
|
2226
2444
|
"ms"
|
|
2227
2445
|
] })
|
|
2228
2446
|
] }),
|
|
2229
|
-
/* @__PURE__ */
|
|
2230
|
-
/* @__PURE__ */
|
|
2231
|
-
/* @__PURE__ */
|
|
2447
|
+
/* @__PURE__ */ jsxs8("div", { style: detailRowStyle, children: [
|
|
2448
|
+
/* @__PURE__ */ jsx8("span", { style: detailLabelStyle, children: t.duration }),
|
|
2449
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
2232
2450
|
s.duration.toFixed(2),
|
|
2233
2451
|
"ms"
|
|
2234
2452
|
] })
|
|
2235
2453
|
] }),
|
|
2236
|
-
typeof s.blockingDuration === "number" && /* @__PURE__ */
|
|
2237
|
-
/* @__PURE__ */
|
|
2238
|
-
/* @__PURE__ */
|
|
2454
|
+
typeof s.blockingDuration === "number" && /* @__PURE__ */ jsxs8("div", { style: detailRowStyle, children: [
|
|
2455
|
+
/* @__PURE__ */ jsx8("span", { style: detailLabelStyle, children: t.blockingTime }),
|
|
2456
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
2239
2457
|
s.blockingDuration.toFixed(2),
|
|
2240
2458
|
"ms"
|
|
2241
2459
|
] })
|
|
2242
2460
|
] }),
|
|
2243
|
-
s.attribution !== void 0 && s.attribution.length > 0 && /* @__PURE__ */
|
|
2244
|
-
s.scripts !== void 0 && /* @__PURE__ */
|
|
2245
|
-
/* @__PURE__ */
|
|
2246
|
-
scripts.length === 0 ? /* @__PURE__ */
|
|
2247
|
-
/* @__PURE__ */
|
|
2248
|
-
/* @__PURE__ */
|
|
2249
|
-
/* @__PURE__ */
|
|
2250
|
-
/* @__PURE__ */
|
|
2461
|
+
s.attribution !== void 0 && s.attribution.length > 0 && /* @__PURE__ */ jsx8(HotFunctions, { attribution: s.attribution, resolveFrame }),
|
|
2462
|
+
s.scripts !== void 0 && /* @__PURE__ */ jsxs8("div", { style: { marginTop: "6px" }, children: [
|
|
2463
|
+
/* @__PURE__ */ jsx8("div", { style: { ...detailLabelStyle, textTransform: "uppercase", fontSize: "10px", letterSpacing: "0.5px", marginBottom: "4px" }, children: t.scripts }),
|
|
2464
|
+
scripts.length === 0 ? /* @__PURE__ */ jsx8("div", { style: { color: "#666" }, children: t.noScripts }) : scripts.map((script, i) => /* @__PURE__ */ jsxs8("div", { style: { ...monoStyle, padding: "3px 0", borderTop: i > 0 ? "1px dashed #1f1f1f" : "none" }, children: [
|
|
2465
|
+
/* @__PURE__ */ jsxs8("div", { children: [
|
|
2466
|
+
/* @__PURE__ */ jsx8("span", { children: script.sourceFunctionName || /* @__PURE__ */ jsx8("span", { style: { color: "#666" }, children: t.anonymous }) }),
|
|
2467
|
+
/* @__PURE__ */ jsx8("span", { style: { color: "#5ac8fa", marginLeft: "6px" }, children: script.invokerType }),
|
|
2468
|
+
/* @__PURE__ */ jsxs8("span", { style: { color: SEVERITY_COLOR.medium, marginLeft: "6px" }, children: [
|
|
2251
2469
|
script.duration.toFixed(1),
|
|
2252
2470
|
"ms"
|
|
2253
2471
|
] })
|
|
2254
2472
|
] }),
|
|
2255
|
-
script.sourceURL && /* @__PURE__ */
|
|
2473
|
+
script.sourceURL && /* @__PURE__ */ jsxs8("div", { style: { color: "#888", wordBreak: "break-all" }, children: [
|
|
2256
2474
|
script.sourceURL,
|
|
2257
2475
|
script.charPosition >= 0 ? `@${script.charPosition}` : ""
|
|
2258
2476
|
] }),
|
|
2259
|
-
script.invoker && /* @__PURE__ */
|
|
2477
|
+
script.invoker && /* @__PURE__ */ jsxs8("div", { style: { color: "#666" }, children: [
|
|
2260
2478
|
t.invoker,
|
|
2261
2479
|
": ",
|
|
2262
2480
|
script.invoker
|
|
2263
2481
|
] })
|
|
2264
2482
|
] }, i))
|
|
2265
2483
|
] }),
|
|
2266
|
-
s.scripts === void 0 && s.stack.length > 0 && /* @__PURE__ */
|
|
2484
|
+
s.scripts === void 0 && s.stack.length > 0 && /* @__PURE__ */ jsx8("div", { style: { marginTop: "4px" }, children: /* @__PURE__ */ jsx8(StackFrames, { raw: s.stack, resolveFrame, limit: 5 }) })
|
|
2267
2485
|
] });
|
|
2268
2486
|
}
|
|
2269
2487
|
var INTERACTION_PHASE_COLOR = { input: "#8e8e93", processing: "#5ac8fa", presentation: "#34c759" };
|
|
@@ -2278,33 +2496,33 @@ function InteractionDetail({
|
|
|
2278
2496
|
{ label: t.processingTime, ms: s.processing, color: INTERACTION_PHASE_COLOR.processing },
|
|
2279
2497
|
{ label: t.presentation, ms: s.presentation, color: INTERACTION_PHASE_COLOR.presentation }
|
|
2280
2498
|
];
|
|
2281
|
-
return /* @__PURE__ */
|
|
2282
|
-
/* @__PURE__ */
|
|
2283
|
-
/* @__PURE__ */
|
|
2284
|
-
/* @__PURE__ */
|
|
2499
|
+
return /* @__PURE__ */ jsxs8("div", { style: { paddingLeft: "12px" }, children: [
|
|
2500
|
+
/* @__PURE__ */ jsxs8("div", { style: detailRowStyle, children: [
|
|
2501
|
+
/* @__PURE__ */ jsx8("span", { style: detailLabelStyle, children: t.interactionEvent }),
|
|
2502
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
2285
2503
|
s.eventType,
|
|
2286
2504
|
s.target ? ` \xB7 ${s.target}` : ""
|
|
2287
2505
|
] })
|
|
2288
2506
|
] }),
|
|
2289
|
-
/* @__PURE__ */
|
|
2290
|
-
/* @__PURE__ */
|
|
2291
|
-
/* @__PURE__ */
|
|
2507
|
+
/* @__PURE__ */ jsxs8("div", { style: detailRowStyle, children: [
|
|
2508
|
+
/* @__PURE__ */ jsx8("span", { style: detailLabelStyle, children: t.duration }),
|
|
2509
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
2292
2510
|
s.duration.toFixed(0),
|
|
2293
2511
|
"ms"
|
|
2294
2512
|
] })
|
|
2295
2513
|
] }),
|
|
2296
|
-
/* @__PURE__ */
|
|
2297
|
-
phases.map((p, i) => /* @__PURE__ */
|
|
2298
|
-
/* @__PURE__ */
|
|
2299
|
-
/* @__PURE__ */
|
|
2514
|
+
/* @__PURE__ */ jsx8("div", { style: { display: "flex", height: "10px", borderRadius: "3px", overflow: "hidden", margin: "5px 0 7px", background: "#1a1a1a" }, children: phases.map((p, i) => /* @__PURE__ */ jsx8("div", { style: { width: `${p.ms / total * 100}%`, background: p.color } }, i)) }),
|
|
2515
|
+
phases.map((p, i) => /* @__PURE__ */ jsxs8("div", { style: detailRowStyle, children: [
|
|
2516
|
+
/* @__PURE__ */ jsxs8("span", { style: { ...detailLabelStyle, display: "inline-flex", alignItems: "center", gap: "5px" }, children: [
|
|
2517
|
+
/* @__PURE__ */ jsx8("span", { style: { width: "7px", height: "7px", borderRadius: "2px", background: p.color, flex: "0 0 7px" } }),
|
|
2300
2518
|
p.label
|
|
2301
2519
|
] }),
|
|
2302
|
-
/* @__PURE__ */
|
|
2520
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
2303
2521
|
p.ms.toFixed(0),
|
|
2304
2522
|
"ms"
|
|
2305
2523
|
] })
|
|
2306
2524
|
] }, i)),
|
|
2307
|
-
s.attribution !== void 0 && s.attribution.length > 0 && /* @__PURE__ */
|
|
2525
|
+
s.attribution !== void 0 && s.attribution.length > 0 && /* @__PURE__ */ jsx8(HotFunctions, { attribution: s.attribution, resolveFrame })
|
|
2308
2526
|
] });
|
|
2309
2527
|
}
|
|
2310
2528
|
function SignalDetail({
|
|
@@ -2313,24 +2531,24 @@ function SignalDetail({
|
|
|
2313
2531
|
}) {
|
|
2314
2532
|
switch (s.kind) {
|
|
2315
2533
|
case "forced-reflow":
|
|
2316
|
-
return /* @__PURE__ */
|
|
2534
|
+
return /* @__PURE__ */ jsx8(ForcedReflowDetail, { s, resolveFrame });
|
|
2317
2535
|
case "layout-shift":
|
|
2318
|
-
return /* @__PURE__ */
|
|
2536
|
+
return /* @__PURE__ */ jsx8(LayoutShiftDetail, { s });
|
|
2319
2537
|
case "long-task":
|
|
2320
|
-
return /* @__PURE__ */
|
|
2538
|
+
return /* @__PURE__ */ jsx8(LongTaskDetail, { s, resolveFrame });
|
|
2321
2539
|
case "interaction":
|
|
2322
|
-
return /* @__PURE__ */
|
|
2540
|
+
return /* @__PURE__ */ jsx8(InteractionDetail, { s, resolveFrame });
|
|
2323
2541
|
case "network":
|
|
2324
|
-
return /* @__PURE__ */
|
|
2542
|
+
return /* @__PURE__ */ jsx8(NetworkDetail, { s });
|
|
2325
2543
|
case "web-vital":
|
|
2326
|
-
return /* @__PURE__ */
|
|
2544
|
+
return /* @__PURE__ */ jsx8(WebVitalDetail, { s });
|
|
2327
2545
|
case "render":
|
|
2328
|
-
return /* @__PURE__ */
|
|
2546
|
+
return /* @__PURE__ */ jsx8(RenderDetail, { s });
|
|
2329
2547
|
}
|
|
2330
2548
|
}
|
|
2331
2549
|
function SeverityDot({ sev, title }) {
|
|
2332
2550
|
const { t } = useI18n();
|
|
2333
|
-
return /* @__PURE__ */
|
|
2551
|
+
return /* @__PURE__ */ jsx8(
|
|
2334
2552
|
"span",
|
|
2335
2553
|
{
|
|
2336
2554
|
"data-severity": sev,
|
|
@@ -2353,9 +2571,9 @@ function SummaryLine({ signal }) {
|
|
|
2353
2571
|
if (signal.kind === "web-vital") {
|
|
2354
2572
|
const rating = webVitalRating(signal.name, signal.value);
|
|
2355
2573
|
const unit = WEB_VITAL_UNIT2[signal.name];
|
|
2356
|
-
return /* @__PURE__ */
|
|
2357
|
-
/* @__PURE__ */
|
|
2358
|
-
/* @__PURE__ */
|
|
2574
|
+
return /* @__PURE__ */ jsxs8("span", { children: [
|
|
2575
|
+
/* @__PURE__ */ jsx8(RatingDot, { rating }),
|
|
2576
|
+
/* @__PURE__ */ jsx8("strong", { children: signal.name }),
|
|
2359
2577
|
": ",
|
|
2360
2578
|
signal.value.toFixed(2),
|
|
2361
2579
|
unit
|
|
@@ -2364,12 +2582,12 @@ function SummaryLine({ signal }) {
|
|
|
2364
2582
|
const sev = severityForSignal(signal);
|
|
2365
2583
|
const color = SEVERITY_COLOR[sev];
|
|
2366
2584
|
if (signal.kind === "long-task") {
|
|
2367
|
-
return /* @__PURE__ */
|
|
2585
|
+
return /* @__PURE__ */ jsxs8("span", { children: [
|
|
2368
2586
|
"@ ",
|
|
2369
2587
|
signal.at.toFixed(1),
|
|
2370
2588
|
"ms \u2022 duration",
|
|
2371
2589
|
" ",
|
|
2372
|
-
/* @__PURE__ */
|
|
2590
|
+
/* @__PURE__ */ jsxs8("span", { style: { color }, children: [
|
|
2373
2591
|
signal.duration.toFixed(1),
|
|
2374
2592
|
"ms"
|
|
2375
2593
|
] })
|
|
@@ -2377,59 +2595,59 @@ function SummaryLine({ signal }) {
|
|
|
2377
2595
|
}
|
|
2378
2596
|
if (signal.kind === "forced-reflow") {
|
|
2379
2597
|
const count = signal.count ?? 1;
|
|
2380
|
-
return /* @__PURE__ */
|
|
2598
|
+
return /* @__PURE__ */ jsxs8("span", { children: [
|
|
2381
2599
|
"@ ",
|
|
2382
2600
|
signal.at.toFixed(1),
|
|
2383
2601
|
"ms \u2022 duration",
|
|
2384
2602
|
" ",
|
|
2385
|
-
/* @__PURE__ */
|
|
2603
|
+
/* @__PURE__ */ jsxs8("span", { style: { color }, children: [
|
|
2386
2604
|
signal.duration.toFixed(2),
|
|
2387
2605
|
"ms"
|
|
2388
2606
|
] }),
|
|
2389
|
-
count > 1 && /* @__PURE__ */
|
|
2607
|
+
count > 1 && /* @__PURE__ */ jsxs8("span", { style: { color: "#888" }, children: [
|
|
2390
2608
|
" \u2022 ",
|
|
2391
2609
|
t.coalescedReads(count)
|
|
2392
2610
|
] })
|
|
2393
2611
|
] });
|
|
2394
2612
|
}
|
|
2395
2613
|
if (signal.kind === "layout-shift") {
|
|
2396
|
-
return /* @__PURE__ */
|
|
2614
|
+
return /* @__PURE__ */ jsxs8("span", { children: [
|
|
2397
2615
|
"@ ",
|
|
2398
2616
|
signal.at.toFixed(1),
|
|
2399
2617
|
"ms \u2022 value",
|
|
2400
2618
|
" ",
|
|
2401
|
-
/* @__PURE__ */
|
|
2619
|
+
/* @__PURE__ */ jsx8("span", { style: { color }, children: formatCls(signal.value) }),
|
|
2402
2620
|
" \u2022 ",
|
|
2403
2621
|
t.sourceCount(signal.sources.length)
|
|
2404
2622
|
] });
|
|
2405
2623
|
}
|
|
2406
2624
|
if (signal.kind === "render") {
|
|
2407
|
-
return /* @__PURE__ */
|
|
2408
|
-
/* @__PURE__ */
|
|
2409
|
-
/* @__PURE__ */
|
|
2410
|
-
/* @__PURE__ */
|
|
2625
|
+
return /* @__PURE__ */ jsxs8("span", { style: { display: "inline-flex", alignItems: "center", gap: "6px" }, children: [
|
|
2626
|
+
/* @__PURE__ */ jsx8("strong", { children: signal.component }),
|
|
2627
|
+
/* @__PURE__ */ jsx8(RenderReasonTag, { reason: signal.reason, changedProps: signal.changedProps }),
|
|
2628
|
+
/* @__PURE__ */ jsxs8("span", { style: { color }, children: [
|
|
2411
2629
|
signal.duration.toFixed(2),
|
|
2412
2630
|
"ms"
|
|
2413
2631
|
] }),
|
|
2414
|
-
signal.count && signal.count > 1 && /* @__PURE__ */
|
|
2632
|
+
signal.count && signal.count > 1 && /* @__PURE__ */ jsx8("span", { style: { color: "#888" }, children: t.cascadeComponents(signal.count) })
|
|
2415
2633
|
] });
|
|
2416
2634
|
}
|
|
2417
2635
|
if (signal.kind === "network") {
|
|
2418
2636
|
const url = signal.url.length > 60 ? signal.url.slice(0, 57) + "..." : signal.url;
|
|
2419
|
-
return /* @__PURE__ */
|
|
2637
|
+
return /* @__PURE__ */ jsxs8("span", { children: [
|
|
2420
2638
|
url,
|
|
2421
2639
|
" \u2022 ",
|
|
2422
|
-
/* @__PURE__ */
|
|
2640
|
+
/* @__PURE__ */ jsxs8("span", { style: { color }, children: [
|
|
2423
2641
|
signal.duration.toFixed(0),
|
|
2424
2642
|
"ms"
|
|
2425
2643
|
] }),
|
|
2426
|
-
signal.blocking && /* @__PURE__ */
|
|
2644
|
+
signal.blocking && /* @__PURE__ */ jsxs8("span", { style: { color: SEVERITY_COLOR.high }, children: [
|
|
2427
2645
|
" \u2022 ",
|
|
2428
2646
|
t.blocking
|
|
2429
2647
|
] })
|
|
2430
2648
|
] });
|
|
2431
2649
|
}
|
|
2432
|
-
return /* @__PURE__ */
|
|
2650
|
+
return /* @__PURE__ */ jsx8("span", { children: summary(signal) });
|
|
2433
2651
|
}
|
|
2434
2652
|
function tabSupportsGrouping(kind) {
|
|
2435
2653
|
return kind === "render" || kind === "forced-reflow";
|
|
@@ -2503,7 +2721,7 @@ function groupSignals(signals, mode, kind) {
|
|
|
2503
2721
|
function SignalRow({ signal, expanded, onToggleExpand, onHoverGeometry, resolveFrame }) {
|
|
2504
2722
|
const hasGeometry = signal.kind === "layout-shift" && signal.sources.length > 0;
|
|
2505
2723
|
const sev = severityForSignal(signal);
|
|
2506
|
-
return /* @__PURE__ */
|
|
2724
|
+
return /* @__PURE__ */ jsxs8(
|
|
2507
2725
|
"li",
|
|
2508
2726
|
{
|
|
2509
2727
|
"aria-expanded": expanded,
|
|
@@ -2525,22 +2743,22 @@ function SignalRow({ signal, expanded, onToggleExpand, onHoverGeometry, resolveF
|
|
|
2525
2743
|
userSelect: "none"
|
|
2526
2744
|
},
|
|
2527
2745
|
children: [
|
|
2528
|
-
/* @__PURE__ */
|
|
2529
|
-
/* @__PURE__ */
|
|
2530
|
-
/* @__PURE__ */
|
|
2531
|
-
/* @__PURE__ */
|
|
2746
|
+
/* @__PURE__ */ jsxs8("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
|
|
2747
|
+
/* @__PURE__ */ jsx8("span", { style: { color: "#888", width: "10px" }, children: expanded ? "\u25BC" : "\u25B6" }),
|
|
2748
|
+
/* @__PURE__ */ jsx8(SeverityDot, { sev }),
|
|
2749
|
+
/* @__PURE__ */ jsx8(SummaryLine, { signal })
|
|
2532
2750
|
] }),
|
|
2533
|
-
expanded && /* @__PURE__ */
|
|
2751
|
+
expanded && /* @__PURE__ */ jsx8("div", { style: { marginTop: "6px", paddingTop: "6px", borderTop: "1px dashed #2a2a2a" }, children: /* @__PURE__ */ jsx8(SignalDetail, { s: signal, resolveFrame }) })
|
|
2534
2752
|
]
|
|
2535
2753
|
}
|
|
2536
2754
|
);
|
|
2537
2755
|
}
|
|
2538
2756
|
function CascadeMembers({ members }) {
|
|
2539
2757
|
const minDepth = members.reduce((m, s) => Math.min(m, s.depth), Infinity);
|
|
2540
|
-
return /* @__PURE__ */
|
|
2758
|
+
return /* @__PURE__ */ jsx8("div", { children: members.map((m, i) => {
|
|
2541
2759
|
const indent = (m.depth - minDepth) * 14;
|
|
2542
2760
|
const isCascade = m.reason === "parent";
|
|
2543
|
-
return /* @__PURE__ */
|
|
2761
|
+
return /* @__PURE__ */ jsxs8(
|
|
2544
2762
|
"div",
|
|
2545
2763
|
{
|
|
2546
2764
|
style: {
|
|
@@ -2551,10 +2769,10 @@ function CascadeMembers({ members }) {
|
|
|
2551
2769
|
gap: "6px"
|
|
2552
2770
|
},
|
|
2553
2771
|
children: [
|
|
2554
|
-
/* @__PURE__ */
|
|
2555
|
-
/* @__PURE__ */
|
|
2556
|
-
/* @__PURE__ */
|
|
2557
|
-
/* @__PURE__ */
|
|
2772
|
+
/* @__PURE__ */ jsx8("span", { style: { color: isCascade ? RENDER_REASON_COLOR.parent : "#555" }, children: m.depth > minDepth ? "\u2514" : "\u2022" }),
|
|
2773
|
+
/* @__PURE__ */ jsx8("strong", { children: m.component }),
|
|
2774
|
+
/* @__PURE__ */ jsx8(RenderReasonTag, { reason: m.reason, changedProps: m.changedProps }),
|
|
2775
|
+
/* @__PURE__ */ jsxs8("span", { style: { color: "#888" }, children: [
|
|
2558
2776
|
m.duration.toFixed(2),
|
|
2559
2777
|
"ms"
|
|
2560
2778
|
] })
|
|
@@ -2568,7 +2786,7 @@ function LanguageToggle() {
|
|
|
2568
2786
|
const { lang, setLang, t } = useI18n();
|
|
2569
2787
|
const langs = ["en", "ko"];
|
|
2570
2788
|
const labels = { en: "EN", ko: "\uD55C" };
|
|
2571
|
-
return /* @__PURE__ */
|
|
2789
|
+
return /* @__PURE__ */ jsx8(
|
|
2572
2790
|
"div",
|
|
2573
2791
|
{
|
|
2574
2792
|
role: "group",
|
|
@@ -2581,7 +2799,7 @@ function LanguageToggle() {
|
|
|
2581
2799
|
},
|
|
2582
2800
|
children: langs.map((l) => {
|
|
2583
2801
|
const active = lang === l;
|
|
2584
|
-
return /* @__PURE__ */
|
|
2802
|
+
return /* @__PURE__ */ jsx8(
|
|
2585
2803
|
"button",
|
|
2586
2804
|
{
|
|
2587
2805
|
type: "button",
|
|
@@ -2619,6 +2837,7 @@ function Panel(props) {
|
|
|
2619
2837
|
const [expandedKey, setExpandedKey] = useState3(null);
|
|
2620
2838
|
const [groupMode, setGroupMode] = useState3({});
|
|
2621
2839
|
const [sortMode, setSortMode] = useState3({});
|
|
2840
|
+
const [filterText, setFilterText] = useState3({});
|
|
2622
2841
|
const activeOverlayCount = useRef2(0);
|
|
2623
2842
|
useEffect(() => () => hideAllOverlays(), []);
|
|
2624
2843
|
function handleHover(signal) {
|
|
@@ -2674,12 +2893,12 @@ function Panel(props) {
|
|
|
2674
2893
|
flexDirection: "column",
|
|
2675
2894
|
overflow: "hidden"
|
|
2676
2895
|
};
|
|
2677
|
-
return /* @__PURE__ */
|
|
2678
|
-
/* @__PURE__ */
|
|
2679
|
-
/* @__PURE__ */
|
|
2680
|
-
/* @__PURE__ */
|
|
2681
|
-
/* @__PURE__ */
|
|
2682
|
-
/* @__PURE__ */
|
|
2896
|
+
return /* @__PURE__ */ jsxs8("div", { role: "region", "aria-label": t.panelRegion, style: panelStyle, children: [
|
|
2897
|
+
/* @__PURE__ */ jsxs8("header", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "8px" }, children: [
|
|
2898
|
+
/* @__PURE__ */ jsx8("strong", { children: "react-perfscope" }),
|
|
2899
|
+
/* @__PURE__ */ jsxs8("div", { style: { display: "flex", gap: "4px", alignItems: "center" }, children: [
|
|
2900
|
+
/* @__PURE__ */ jsx8(LanguageToggle, {}),
|
|
2901
|
+
/* @__PURE__ */ jsx8(
|
|
2683
2902
|
"button",
|
|
2684
2903
|
{
|
|
2685
2904
|
type: "button",
|
|
@@ -2698,7 +2917,7 @@ function Panel(props) {
|
|
|
2698
2917
|
children: t.save
|
|
2699
2918
|
}
|
|
2700
2919
|
),
|
|
2701
|
-
/* @__PURE__ */
|
|
2920
|
+
/* @__PURE__ */ jsx8(
|
|
2702
2921
|
"button",
|
|
2703
2922
|
{
|
|
2704
2923
|
type: "button",
|
|
@@ -2710,9 +2929,9 @@ function Panel(props) {
|
|
|
2710
2929
|
)
|
|
2711
2930
|
] })
|
|
2712
2931
|
] }),
|
|
2713
|
-
kindsPresent.length === 0 && /* @__PURE__ */
|
|
2714
|
-
kindsPresent.length > 0 && /* @__PURE__ */
|
|
2715
|
-
/* @__PURE__ */
|
|
2932
|
+
kindsPresent.length === 0 && /* @__PURE__ */ jsx8("div", { style: { color: "#888" }, children: t.noSignals }),
|
|
2933
|
+
kindsPresent.length > 0 && /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
2934
|
+
/* @__PURE__ */ jsx8(
|
|
2716
2935
|
SummaryHeader,
|
|
2717
2936
|
{
|
|
2718
2937
|
signals: result.signals,
|
|
@@ -2724,8 +2943,8 @@ function Panel(props) {
|
|
|
2724
2943
|
}
|
|
2725
2944
|
}
|
|
2726
2945
|
),
|
|
2727
|
-
/* @__PURE__ */
|
|
2728
|
-
hasTimelineSignals && /* @__PURE__ */
|
|
2946
|
+
/* @__PURE__ */ jsxs8("nav", { style: { display: "flex", gap: "4px", flexWrap: "wrap", marginBottom: "8px" }, children: [
|
|
2947
|
+
hasTimelineSignals && /* @__PURE__ */ jsx8(
|
|
2729
2948
|
"button",
|
|
2730
2949
|
{
|
|
2731
2950
|
type: "button",
|
|
@@ -2750,7 +2969,7 @@ function Panel(props) {
|
|
|
2750
2969
|
kindsPresent.map((kind) => {
|
|
2751
2970
|
const worst = worstSeverity(grouped[kind]);
|
|
2752
2971
|
const active = activeKind === kind;
|
|
2753
|
-
return /* @__PURE__ */
|
|
2972
|
+
return /* @__PURE__ */ jsxs8(
|
|
2754
2973
|
"button",
|
|
2755
2974
|
{
|
|
2756
2975
|
type: "button",
|
|
@@ -2773,7 +2992,7 @@ function Panel(props) {
|
|
|
2773
2992
|
gap: "6px"
|
|
2774
2993
|
},
|
|
2775
2994
|
children: [
|
|
2776
|
-
worst !== "low" && /* @__PURE__ */
|
|
2995
|
+
worst !== "low" && /* @__PURE__ */ jsx8(SeverityDot, { sev: worst, title: t.worstLabel(worst) }),
|
|
2777
2996
|
t.kindLabel(kind),
|
|
2778
2997
|
" ",
|
|
2779
2998
|
grouped[kind].length
|
|
@@ -2783,10 +3002,10 @@ function Panel(props) {
|
|
|
2783
3002
|
);
|
|
2784
3003
|
})
|
|
2785
3004
|
] }),
|
|
2786
|
-
activeKind && activeTab !== "timeline" && /* @__PURE__ */
|
|
2787
|
-
/* @__PURE__ */
|
|
3005
|
+
activeKind && activeTab !== "timeline" && /* @__PURE__ */ jsxs8("div", { style: { display: "flex", alignItems: "center", gap: "12px", marginBottom: "6px", fontSize: "11px", color: "#888", flexWrap: "wrap" }, children: [
|
|
3006
|
+
/* @__PURE__ */ jsxs8("label", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
|
|
2788
3007
|
t.sort,
|
|
2789
|
-
/* @__PURE__ */
|
|
3008
|
+
/* @__PURE__ */ jsxs8(
|
|
2790
3009
|
"select",
|
|
2791
3010
|
{
|
|
2792
3011
|
"aria-label": t.sort,
|
|
@@ -2798,15 +3017,15 @@ function Panel(props) {
|
|
|
2798
3017
|
},
|
|
2799
3018
|
style: { background: "#1a1a1a", color: "#e6e6e6", border: "1px solid #2a2a2a", borderRadius: "4px", padding: "2px 6px", fontSize: "11px" },
|
|
2800
3019
|
children: [
|
|
2801
|
-
/* @__PURE__ */
|
|
2802
|
-
/* @__PURE__ */
|
|
3020
|
+
/* @__PURE__ */ jsx8("option", { value: "chronological", children: t.sortChronological }),
|
|
3021
|
+
/* @__PURE__ */ jsx8("option", { value: "severity", children: t.sortSeverity })
|
|
2803
3022
|
]
|
|
2804
3023
|
}
|
|
2805
3024
|
)
|
|
2806
3025
|
] }),
|
|
2807
|
-
tabSupportsGrouping(activeKind) && /* @__PURE__ */
|
|
3026
|
+
tabSupportsGrouping(activeKind) && /* @__PURE__ */ jsxs8("label", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
|
|
2808
3027
|
t.groupBy,
|
|
2809
|
-
/* @__PURE__ */
|
|
3028
|
+
/* @__PURE__ */ jsxs8(
|
|
2810
3029
|
"select",
|
|
2811
3030
|
{
|
|
2812
3031
|
"aria-label": t.groupBy,
|
|
@@ -2818,16 +3037,30 @@ function Panel(props) {
|
|
|
2818
3037
|
},
|
|
2819
3038
|
style: { background: "#1a1a1a", color: "#e6e6e6", border: "1px solid #2a2a2a", borderRadius: "4px", padding: "2px 6px", fontSize: "11px" },
|
|
2820
3039
|
children: [
|
|
2821
|
-
/* @__PURE__ */
|
|
2822
|
-
activeKind === "render" && /* @__PURE__ */
|
|
2823
|
-
activeKind === "render" && /* @__PURE__ */
|
|
2824
|
-
activeKind === "forced-reflow" && /* @__PURE__ */
|
|
3040
|
+
/* @__PURE__ */ jsx8("option", { value: "chronological", children: t.groupChronological }),
|
|
3041
|
+
activeKind === "render" && /* @__PURE__ */ jsx8("option", { value: "commit", children: t.groupCommit }),
|
|
3042
|
+
activeKind === "render" && /* @__PURE__ */ jsx8("option", { value: "component", children: t.groupComponent }),
|
|
3043
|
+
activeKind === "forced-reflow" && /* @__PURE__ */ jsx8("option", { value: "source", children: t.groupSource })
|
|
2825
3044
|
]
|
|
2826
3045
|
}
|
|
2827
3046
|
)
|
|
2828
|
-
] })
|
|
3047
|
+
] }),
|
|
3048
|
+
/* @__PURE__ */ jsx8(
|
|
3049
|
+
"input",
|
|
3050
|
+
{
|
|
3051
|
+
type: "text",
|
|
3052
|
+
"aria-label": t.filterAria,
|
|
3053
|
+
placeholder: t.filterPlaceholder,
|
|
3054
|
+
value: filterText[activeKind] ?? "",
|
|
3055
|
+
onInput: (e) => {
|
|
3056
|
+
setFilterText({ ...filterText, [activeKind]: e.target.value });
|
|
3057
|
+
setExpandedKey(null);
|
|
3058
|
+
},
|
|
3059
|
+
style: { marginLeft: "auto", background: "#1a1a1a", color: "#e6e6e6", border: "1px solid #2a2a2a", borderRadius: "4px", padding: "2px 6px", fontSize: "11px", width: "120px" }
|
|
3060
|
+
}
|
|
3061
|
+
)
|
|
2829
3062
|
] }),
|
|
2830
|
-
activeTab === "timeline" && /* @__PURE__ */
|
|
3063
|
+
activeTab === "timeline" && /* @__PURE__ */ jsx8("div", { style: { flexGrow: 1, overflowY: "auto", paddingTop: "4px", paddingBottom: "24px" }, children: /* @__PURE__ */ jsx8(
|
|
2831
3064
|
Timeline,
|
|
2832
3065
|
{
|
|
2833
3066
|
signals: result.signals,
|
|
@@ -2843,19 +3076,18 @@ function Panel(props) {
|
|
|
2843
3076
|
}
|
|
2844
3077
|
}
|
|
2845
3078
|
) }),
|
|
2846
|
-
activeKind === "render" && activeTab !== "timeline" && /* @__PURE__ */
|
|
3079
|
+
activeKind === "render" && activeTab !== "timeline" && /* @__PURE__ */ jsx8(
|
|
2847
3080
|
RenderInsights,
|
|
2848
3081
|
{
|
|
2849
|
-
signals: grouped.render.flatMap(
|
|
2850
|
-
(s) => s.kind === "render" ? s.members ?? [s] : []
|
|
2851
|
-
),
|
|
3082
|
+
signals: grouped.render.flatMap((s) => s.kind === "render" ? s.members ?? [s] : []).filter((s) => signalMatchesFilter(s, filterText.render ?? "")),
|
|
2852
3083
|
onSelect: () => {
|
|
2853
3084
|
setGroupMode({ ...groupMode, render: "component" });
|
|
2854
3085
|
setExpandedKey(null);
|
|
2855
3086
|
}
|
|
2856
3087
|
}
|
|
2857
3088
|
),
|
|
2858
|
-
activeKind === "
|
|
3089
|
+
activeKind === "long-task" && activeTab !== "timeline" && /* @__PURE__ */ jsx8(LongTaskEpisode, { signals: result.signals }),
|
|
3090
|
+
activeKind === "layout-shift" && activeTab !== "timeline" && /* @__PURE__ */ jsx8(
|
|
2859
3091
|
"div",
|
|
2860
3092
|
{
|
|
2861
3093
|
style: {
|
|
@@ -2867,17 +3099,38 @@ function Panel(props) {
|
|
|
2867
3099
|
border: "1px solid #1f1f1f",
|
|
2868
3100
|
borderRadius: "6px"
|
|
2869
3101
|
},
|
|
2870
|
-
children: t.
|
|
3102
|
+
children: t.layoutShiftHint
|
|
2871
3103
|
}
|
|
2872
3104
|
),
|
|
2873
|
-
|
|
2874
|
-
|
|
3105
|
+
activeKind === "interaction" && activeTab !== "timeline" && /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
3106
|
+
/* @__PURE__ */ jsx8(InpEpisode, { signals: result.signals }),
|
|
3107
|
+
/* @__PURE__ */ jsx8(
|
|
3108
|
+
"div",
|
|
3109
|
+
{
|
|
3110
|
+
style: {
|
|
3111
|
+
padding: "6px 8px",
|
|
3112
|
+
marginBottom: "6px",
|
|
3113
|
+
fontSize: "11px",
|
|
3114
|
+
color: "#888",
|
|
3115
|
+
background: "#141414",
|
|
3116
|
+
border: "1px solid #1f1f1f",
|
|
3117
|
+
borderRadius: "6px"
|
|
3118
|
+
},
|
|
3119
|
+
children: t.interactionThresholdHint
|
|
3120
|
+
}
|
|
3121
|
+
)
|
|
3122
|
+
] }),
|
|
3123
|
+
/* @__PURE__ */ jsx8("ul", { style: { listStyle: "none", margin: 0, padding: 0, overflowY: "auto", flexGrow: 1, display: activeTab === "timeline" ? "none" : void 0 }, children: activeKind && (() => {
|
|
3124
|
+
const filtered = grouped[activeKind].filter(
|
|
3125
|
+
(s) => signalMatchesFilter(s, filterText[activeKind] ?? "")
|
|
3126
|
+
);
|
|
3127
|
+
const baseSignals = (sortMode[activeKind] ?? "chronological") === "severity" ? sortSignalsBySeverity(filtered) : filtered;
|
|
2875
3128
|
return groupSignals(baseSignals, groupMode[activeKind] ?? "chronological", activeKind);
|
|
2876
3129
|
})().map((g, gi) => {
|
|
2877
3130
|
const currentMode = groupMode[activeKind] ?? "chronological";
|
|
2878
3131
|
if (currentMode === "chronological") {
|
|
2879
3132
|
const key2 = `${activeKind}-${gi}`;
|
|
2880
|
-
return /* @__PURE__ */
|
|
3133
|
+
return /* @__PURE__ */ jsx8(
|
|
2881
3134
|
SignalRow,
|
|
2882
3135
|
{
|
|
2883
3136
|
signal: g.signals[0],
|
|
@@ -2894,7 +3147,7 @@ function Panel(props) {
|
|
|
2894
3147
|
const isCascade = activeKind === "render" && currentMode === "commit";
|
|
2895
3148
|
const renderMembers = g.signals.filter((s) => s.kind === "render");
|
|
2896
3149
|
const unnecessary = isCascade ? renderMembers.filter((s) => s.reason === "parent").length : 0;
|
|
2897
|
-
return /* @__PURE__ */
|
|
3150
|
+
return /* @__PURE__ */ jsxs8(
|
|
2898
3151
|
"li",
|
|
2899
3152
|
{
|
|
2900
3153
|
"aria-expanded": isOpen,
|
|
@@ -2909,33 +3162,34 @@ function Panel(props) {
|
|
|
2909
3162
|
userSelect: "none"
|
|
2910
3163
|
},
|
|
2911
3164
|
children: [
|
|
2912
|
-
/* @__PURE__ */
|
|
2913
|
-
/* @__PURE__ */
|
|
2914
|
-
/* @__PURE__ */
|
|
2915
|
-
/* @__PURE__ */
|
|
3165
|
+
/* @__PURE__ */ jsxs8("div", { style: { display: "flex", alignItems: "center", gap: "6px", flexWrap: "wrap" }, children: [
|
|
3166
|
+
/* @__PURE__ */ jsx8("span", { style: { color: "#888", width: "10px" }, children: isOpen ? "\u25BC" : "\u25B6" }),
|
|
3167
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
3168
|
+
/* @__PURE__ */ jsx8("strong", { children: g.label }),
|
|
2916
3169
|
" \xD7",
|
|
2917
3170
|
g.count
|
|
2918
3171
|
] }),
|
|
2919
|
-
isCascade && unnecessary > 0 && /* @__PURE__ */
|
|
3172
|
+
isCascade && unnecessary > 0 && /* @__PURE__ */ jsxs8("span", { style: { color: RENDER_REASON_COLOR.parent, fontSize: "10px" }, children: [
|
|
2920
3173
|
"\u26A0 ",
|
|
2921
3174
|
t.unnecessaryRenders(unnecessary)
|
|
2922
3175
|
] })
|
|
2923
3176
|
] }),
|
|
2924
|
-
isOpen && /* @__PURE__ */
|
|
2925
|
-
g.signals.slice(0, 20).map((s, si) => /* @__PURE__ */
|
|
2926
|
-
g.signals.length > 20 && /* @__PURE__ */
|
|
3177
|
+
isOpen && /* @__PURE__ */ jsx8("div", { style: { marginTop: "6px", paddingTop: "6px", borderTop: "1px dashed #2a2a2a", paddingLeft: "8px" }, children: isCascade ? /* @__PURE__ */ jsx8(CascadeMembers, { members: renderMembers }) : /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
3178
|
+
g.signals.slice(0, 20).map((s, si) => /* @__PURE__ */ jsx8("div", { style: { padding: "2px 0" }, children: /* @__PURE__ */ jsx8(SummaryLine, { signal: s }) }, si)),
|
|
3179
|
+
g.signals.length > 20 && /* @__PURE__ */ jsx8("div", { style: { color: "#888", marginTop: "4px" }, children: t.moreItems(g.signals.length - 20) })
|
|
2927
3180
|
] }) })
|
|
2928
3181
|
]
|
|
2929
3182
|
},
|
|
2930
3183
|
key
|
|
2931
3184
|
);
|
|
2932
|
-
}) })
|
|
3185
|
+
}) }),
|
|
3186
|
+
activeKind && activeTab !== "timeline" && (filterText[activeKind] ?? "").trim() !== "" && grouped[activeKind].length > 0 && grouped[activeKind].every((s) => !signalMatchesFilter(s, filterText[activeKind] ?? "")) && /* @__PURE__ */ jsx8("div", { style: { padding: "12px 8px", fontSize: "11px", color: "#888" }, children: t.filterNoMatches })
|
|
2933
3187
|
] })
|
|
2934
3188
|
] });
|
|
2935
3189
|
}
|
|
2936
3190
|
|
|
2937
3191
|
// src/app.tsx
|
|
2938
|
-
import { jsx as
|
|
3192
|
+
import { jsx as jsx9, jsxs as jsxs9 } from "preact/jsx-runtime";
|
|
2939
3193
|
function App(props) {
|
|
2940
3194
|
const { recorder, position = "bottom-right", resolveFrame, finalize } = props;
|
|
2941
3195
|
const [recording, setRecording] = useState4(false);
|
|
@@ -2981,8 +3235,8 @@ function App(props) {
|
|
|
2981
3235
|
function onClose() {
|
|
2982
3236
|
setResult(null);
|
|
2983
3237
|
}
|
|
2984
|
-
return /* @__PURE__ */
|
|
2985
|
-
result === null && /* @__PURE__ */
|
|
3238
|
+
return /* @__PURE__ */ jsxs9(I18nProvider, { children: [
|
|
3239
|
+
result === null && /* @__PURE__ */ jsx9(
|
|
2986
3240
|
Widget,
|
|
2987
3241
|
{
|
|
2988
3242
|
recording,
|
|
@@ -2991,16 +3245,16 @@ function App(props) {
|
|
|
2991
3245
|
position
|
|
2992
3246
|
}
|
|
2993
3247
|
),
|
|
2994
|
-
result !== null && /* @__PURE__ */
|
|
3248
|
+
result !== null && /* @__PURE__ */ jsx9(Panel, { result, position, onClose, resolveFrame })
|
|
2995
3249
|
] });
|
|
2996
3250
|
}
|
|
2997
3251
|
|
|
2998
3252
|
// src/mount.tsx
|
|
2999
|
-
import { jsx as
|
|
3253
|
+
import { jsx as jsx10 } from "preact/jsx-runtime";
|
|
3000
3254
|
function mount(opts) {
|
|
3001
3255
|
const { recorder, position = "bottom-right", host = document.body, resolveFrame, finalize } = opts;
|
|
3002
3256
|
return mountShadow(
|
|
3003
|
-
/* @__PURE__ */
|
|
3257
|
+
/* @__PURE__ */ jsx10(App, { recorder, position, resolveFrame, finalize }),
|
|
3004
3258
|
{ parent: host }
|
|
3005
3259
|
);
|
|
3006
3260
|
}
|