@plitzi/sdk-dev-tools 0.32.1 → 0.32.2
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/CHANGELOG.md +12 -0
- package/dist/DevToolsContainer.d.ts +1 -1
- package/dist/DevToolsContextProvider.d.ts +1 -1
- package/dist/components/DevToolsPanel/DevToolsBody.d.ts +1 -1
- package/dist/components/DevToolsPanel/DevToolsBody.mjs +24 -22
- package/dist/components/DevToolsPanel/DevToolsButton.d.ts +1 -1
- package/dist/components/DevToolsPanel/DevToolsHeader.d.ts +1 -1
- package/dist/components/DevToolsPanel/DevToolsHeader.mjs +5 -0
- package/dist/components/DevToolsPanel/DevToolsPanel.d.ts +1 -1
- package/dist/components/DevToolsPanel/DevToolsPanel.mjs +19 -12
- package/dist/components/DevToolsPanel/DevToolsSubHeader.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/ElementsViewer/DetailsAttributes.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/ElementsViewer/DetailsDefinition.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/ElementsViewer/DetailsValue.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/ElementsViewer/DetailsValue.mjs +8 -8
- package/dist/components/DevToolsPanel/tabs/ElementsViewer/ElementDetails.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/ElementsViewer/ElementsList.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/ElementsViewer/ElementsListItem.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/ElementsViewer/ElementsViewer.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/ElementsViewer/ElementsViewer.mjs +6 -6
- package/dist/components/DevToolsPanel/tabs/HistoryViewer/HistoryViewer.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/HistoryViewer/HistoryViewer.mjs +1 -1
- package/dist/components/DevToolsPanel/tabs/HistoryViewer/components/HistoryEntryItem/HistoryEntryItem.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/HistoryViewer/components/HistoryToolbar/HistoryToolbar.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/Logs/Log.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/Logs/LogStatus.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/Logs/LogStatusIcon.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/Logs/Logs.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/Logs/Logs.mjs +3 -1
- package/dist/components/DevToolsPanel/tabs/Logs/LogsSummary/LogsSummary.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/Logs/LogsSummary/LogsSummaryItem.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/BodyContent.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/BodyHeader.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/BodyHeader.mjs +15 -15
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/ExecutionTree/ExecutionTree.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/ExecutionTree/ExecutionTreeNode.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/InteractionNode/InteractionNode.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/InteractionNode/NodeHeader.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/InteractionNode/NodeMetadata.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/InteractionNode/NodeWhen.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteraction.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteractionBody.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogInteraction/LogInteractionHeader.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogNavigation/LogNavigation.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogNavigation/LogNavigationBody.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogNavigation/LogNavigationBody.mjs +4 -4
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogNavigation/LogNavigationHeader.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogStore/LogStore.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogStore/LogStoreBody.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/Logs/categories/LogStore/LogStoreHeader.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/PluginsViewer/PluginDetails.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/PluginsViewer/PluginsViewer.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/StoreViewer/StoreViewer.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/StoreViewer/StoreViewer.mjs +3 -3
- package/dist/components/DevToolsPanel/tabs/TracingViewer/TracingViewer.d.ts +2 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/TracingViewer.mjs +159 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/CommitCause/CommitCause.d.ts +10 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/CommitCause/CommitCause.mjs +52 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/CommitCause/index.d.ts +1 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/CommitCause/index.mjs +2 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/CommitStrip/CommitStrip.d.ts +9 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/CommitStrip/CommitStrip.mjs +70 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/CommitStrip/index.d.ts +1 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/CommitStrip/index.mjs +2 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/DetailSidebar/DetailSidebar.d.ts +9 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/DetailSidebar/DetailSidebar.mjs +202 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/DetailSidebar/index.d.ts +1 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/DetailSidebar/index.mjs +2 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/DurationLegend/DurationLegend.d.ts +2 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/DurationLegend/DurationLegend.mjs +38 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/DurationLegend/index.d.ts +1 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/DurationLegend/index.mjs +2 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/Flamegraph/FlameFrame.d.ts +12 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/Flamegraph/FlameFrame.mjs +29 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/Flamegraph/Flamegraph.d.ts +13 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/Flamegraph/Flamegraph.mjs +105 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/Flamegraph/index.d.ts +1 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/Flamegraph/index.mjs +2 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/HotspotSidebar/HotspotSidebar.d.ts +9 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/HotspotSidebar/HotspotSidebar.mjs +124 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/HotspotSidebar/index.d.ts +1 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/HotspotSidebar/index.mjs +2 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/HotspotsList/HotspotsList.d.ts +10 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/HotspotsList/HotspotsList.mjs +139 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/HotspotsList/index.d.ts +1 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/HotspotsList/index.mjs +2 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/MetricToggle/MetricToggle.d.ts +8 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/MetricToggle/MetricToggle.mjs +30 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/MetricToggle/index.d.ts +1 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/MetricToggle/index.mjs +2 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/RankedList/RankedList.d.ts +13 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/RankedList/RankedList.mjs +157 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/RankedList/index.d.ts +1 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/RankedList/index.mjs +2 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/SidebarShell/SidebarEmpty.d.ts +2 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/SidebarShell/SidebarEmpty.mjs +11 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/SidebarShell/SidebarShell.d.ts +6 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/SidebarShell/SidebarShell.mjs +26 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/SidebarShell/index.d.ts +2 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/SidebarShell/index.mjs +3 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/SidebarToggle/SidebarToggle.d.ts +7 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/SidebarToggle/SidebarToggle.mjs +12 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/SidebarToggle/index.d.ts +1 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/SidebarToggle/index.mjs +2 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/TracingToolbar/TracingToolbar.d.ts +11 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/TracingToolbar/TracingToolbar.mjs +66 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/TracingToolbar/index.d.ts +1 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/components/TracingToolbar/index.mjs +2 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/helpers.d.ts +86 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/helpers.mjs +175 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/index.d.ts +1 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/index.mjs +2 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/useHighlightElement.d.ts +2 -0
- package/dist/components/DevToolsPanel/tabs/TracingViewer/useHighlightElement.mjs +11 -0
- package/dist/components/DevToolsPanel/tabs/VariablesViewer/VariableValue.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/VariablesViewer/VariablesList.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/VariablesViewer/VariablesListItem.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/VariablesViewer/VariablesStyleList.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/VariablesViewer/VariablesViewer.d.ts +1 -1
- package/dist/components/DevToolsPanel/tabs/VariablesViewer/VariablesViewer.mjs +5 -5
- package/dist/components/List/List.d.ts +1 -1
- package/dist/components/List/ListItem.d.ts +1 -1
- package/package.json +181 -10
package/dist/components/DevToolsPanel/tabs/Logs/categories/LogNavigation/LogNavigationBody.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useMemo as e } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { useCommonStore as t } from "@plitzi/sdk-shared/store";
|
|
3
3
|
import { get as n } from "@plitzi/plitzi-ui/helpers";
|
|
4
4
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
5
|
import { formatDate as a } from "@plitzi/sdk-shared/helpers";
|
|
6
6
|
//#region src/components/DevToolsPanel/tabs/Logs/categories/LogNavigation/LogNavigationBody.tsx
|
|
7
7
|
var o = ({ elementId: o, startTime: s, endTime: c, duration: l }) => {
|
|
8
|
-
let
|
|
8
|
+
let [u] = t("schema.flat"), d = e(() => o ? n(u, o) : void 0, [o, u]);
|
|
9
9
|
return /* @__PURE__ */ i("div", {
|
|
10
10
|
className: "m-2 flex justify-around gap-4",
|
|
11
11
|
children: [
|
|
@@ -52,12 +52,12 @@ var o = ({ elementId: o, startTime: s, endTime: c, duration: l }) => {
|
|
|
52
52
|
children: "-"
|
|
53
53
|
})]
|
|
54
54
|
}),
|
|
55
|
-
|
|
55
|
+
d && /* @__PURE__ */ i("div", {
|
|
56
56
|
className: "flex gap-1",
|
|
57
57
|
children: [/* @__PURE__ */ r("span", { children: "Element:" }), /* @__PURE__ */ i("span", {
|
|
58
58
|
className: "cursor-pointer truncate text-blue-500",
|
|
59
59
|
children: [
|
|
60
|
-
|
|
60
|
+
d.definition.label,
|
|
61
61
|
" [",
|
|
62
62
|
o,
|
|
63
63
|
"]"
|
package/dist/components/DevToolsPanel/tabs/Logs/categories/LogNavigation/LogNavigationHeader.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ export type LogNavigationHeaderProps = {
|
|
|
6
6
|
message?: ReactNode;
|
|
7
7
|
time?: string | Date;
|
|
8
8
|
};
|
|
9
|
-
declare const LogNavigationHeader: ({ status, message, time }: LogNavigationHeaderProps) => import("react
|
|
9
|
+
declare const LogNavigationHeader: ({ status, message, time }: LogNavigationHeaderProps) => import("react").JSX.Element;
|
|
10
10
|
export default LogNavigationHeader;
|
|
@@ -5,5 +5,5 @@ export type LogStoreProps = {
|
|
|
5
5
|
params?: TLogStore['params'];
|
|
6
6
|
time?: string | Date;
|
|
7
7
|
};
|
|
8
|
-
declare const LogStore: ({ time, message, params }: LogStoreProps) => import("react
|
|
8
|
+
declare const LogStore: ({ time, message, params }: LogStoreProps) => import("react").JSX.Element;
|
|
9
9
|
export default LogStore;
|
|
@@ -22,5 +22,5 @@ export type LogStoreBodyProps = {
|
|
|
22
22
|
next?: unknown;
|
|
23
23
|
contextLines?: number;
|
|
24
24
|
};
|
|
25
|
-
declare const LogStoreBody: ({ path, prev, next, contextLines }: LogStoreBodyProps) => import("react
|
|
25
|
+
declare const LogStoreBody: ({ path, prev, next, contextLines }: LogStoreBodyProps) => import("react").JSX.Element;
|
|
26
26
|
export default LogStoreBody;
|
|
@@ -5,5 +5,5 @@ export type LogStoreHeaderProps = {
|
|
|
5
5
|
message?: ReactNode;
|
|
6
6
|
time?: string | Date;
|
|
7
7
|
};
|
|
8
|
-
declare const LogStoreHeader: ({ storeName, path, message, time }: LogStoreHeaderProps) => import("react
|
|
8
|
+
declare const LogStoreHeader: ({ storeName, path, message, time }: LogStoreHeaderProps) => import("react").JSX.Element;
|
|
9
9
|
export default LogStoreHeader;
|
|
@@ -4,5 +4,5 @@ export type PluginDetailsProps = {
|
|
|
4
4
|
author?: string;
|
|
5
5
|
settings?: Record<string, unknown>;
|
|
6
6
|
};
|
|
7
|
-
declare const PluginDetails: ({ author, settings, label, version }: PluginDetailsProps) => import("react
|
|
7
|
+
declare const PluginDetails: ({ author, settings, label, version }: PluginDetailsProps) => import("react").JSX.Element;
|
|
8
8
|
export default PluginDetails;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type PluginsViewerProps = {
|
|
2
2
|
className?: string;
|
|
3
3
|
};
|
|
4
|
-
declare const PluginsViewer: ({ className }: PluginsViewerProps) => import("react
|
|
4
|
+
declare const PluginsViewer: ({ className }: PluginsViewerProps) => import("react").JSX.Element;
|
|
5
5
|
export default PluginsViewer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type StoreViewerProps = {
|
|
2
2
|
elementSelected?: string;
|
|
3
3
|
};
|
|
4
|
-
declare const StoreViewer: ({ elementSelected }: StoreViewerProps) => import("react
|
|
4
|
+
declare const StoreViewer: ({ elementSelected }: StoreViewerProps) => import("react").JSX.Element;
|
|
5
5
|
export default StoreViewer;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { use as e } from "react";
|
|
2
2
|
import t from "@plitzi/sdk-shared/devTools/DevToolsContext";
|
|
3
|
-
import {
|
|
3
|
+
import { useCommonStore as n } from "@plitzi/sdk-shared/store";
|
|
4
4
|
import { jsx as r } from "react/jsx-runtime";
|
|
5
5
|
import i from "@uiw/react-json-view";
|
|
6
6
|
import * as a from "@uiw/react-json-view/vscode";
|
|
@@ -14,11 +14,11 @@ var s = {
|
|
|
14
14
|
padding: "8px",
|
|
15
15
|
fontSize: "14px"
|
|
16
16
|
}, c = ({ elementSelected: a }) => {
|
|
17
|
-
let { getData: c } = e(t),
|
|
17
|
+
let { getData: c } = e(t), [l] = n();
|
|
18
18
|
return /* @__PURE__ */ r("div", {
|
|
19
19
|
className: "flex h-full w-full flex-col",
|
|
20
20
|
children: /* @__PURE__ */ r(i, {
|
|
21
|
-
value: (a ? c?.(`getElementDataSource-${a}`) :
|
|
21
|
+
value: (a ? c?.(`getElementDataSource-${a}`) : l) ?? o,
|
|
22
22
|
style: s,
|
|
23
23
|
enableClipboard: !1,
|
|
24
24
|
indentWidth: 15,
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { buildFlameModel as e, commitOrigin as t } from "./helpers.mjs";
|
|
2
|
+
import n from "./components/CommitStrip/CommitStrip.mjs";
|
|
3
|
+
import r from "./components/Flamegraph/Flamegraph.mjs";
|
|
4
|
+
import i from "./components/HotspotsList/HotspotsList.mjs";
|
|
5
|
+
import a from "./components/RankedList/RankedList.mjs";
|
|
6
|
+
import o from "./components/TracingToolbar/TracingToolbar.mjs";
|
|
7
|
+
import s from "./useHighlightElement.mjs";
|
|
8
|
+
import c from "@plitzi/plitzi-ui/hooks/useStorage";
|
|
9
|
+
import { use as l, useCallback as u, useEffect as d, useMemo as f, useRef as p, useState as m } from "react";
|
|
10
|
+
import h from "@plitzi/sdk-navigation/NavigationContext";
|
|
11
|
+
import { useCommonStore as g } from "@plitzi/sdk-shared/store";
|
|
12
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
13
|
+
import { useTracing as y } from "@plitzi/sdk-shared/store/tracing";
|
|
14
|
+
//#region src/components/DevToolsPanel/tabs/TracingViewer/TracingViewer.tsx
|
|
15
|
+
var b = () => {
|
|
16
|
+
let { enabled: b, hydrated: x, commits: S, tree: C, clear: w } = y(), [T] = g("schema.flat"), { currentPageId: E } = l(h), [D, O] = c("plitzi-sdk.dev-tools.tracing.view", "ranked"), [k, A] = c("plitzi-sdk.dev-tools.tracing.persist", !1), [j, M] = c("plitzi-sdk.dev-tools.tracing.sidebar-open", !1), [N, P] = m(), [F, I] = m(), L = p(E);
|
|
17
|
+
d(() => {
|
|
18
|
+
L.current !== E && (L.current = E, k || (w(), P(void 0), I(void 0)));
|
|
19
|
+
}, [
|
|
20
|
+
E,
|
|
21
|
+
k,
|
|
22
|
+
w
|
|
23
|
+
]);
|
|
24
|
+
let R = f(() => {
|
|
25
|
+
if (!(!x || S.length === 0)) return {
|
|
26
|
+
commitId: 0,
|
|
27
|
+
timestamp: S[0].timestamp,
|
|
28
|
+
duration: 0,
|
|
29
|
+
elementCount: Object.keys(C).length,
|
|
30
|
+
elements: [],
|
|
31
|
+
causes: []
|
|
32
|
+
};
|
|
33
|
+
}, [
|
|
34
|
+
x,
|
|
35
|
+
S,
|
|
36
|
+
C
|
|
37
|
+
]), z = f(() => R ? [R, ...S] : S, [R, S]), B = S[0]?.commitId, V = f(() => {
|
|
38
|
+
if (z.length === 0) return -1;
|
|
39
|
+
let e = z.findIndex((e) => e.commitId === N);
|
|
40
|
+
return e === -1 ? z.length - 1 : e;
|
|
41
|
+
}, [z, N]), H = V === -1 ? void 0 : z[V], U = H?.commitId === 0, W = f(() => H && !U ? e(H, C, T) : void 0, [
|
|
42
|
+
H,
|
|
43
|
+
U,
|
|
44
|
+
C,
|
|
45
|
+
T
|
|
46
|
+
]), G = f(() => W?.nodes.find((e) => e.id === F), [W, F]);
|
|
47
|
+
s(G?.id);
|
|
48
|
+
let K = f(() => H ? t(H, x, H.commitId === B) : "update", [
|
|
49
|
+
H,
|
|
50
|
+
x,
|
|
51
|
+
B
|
|
52
|
+
]), q = u((e) => {
|
|
53
|
+
P(e), I(void 0);
|
|
54
|
+
}, []), J = u((e) => {
|
|
55
|
+
I(e), e && M(!0);
|
|
56
|
+
}, [M]), Y = u(() => M((e) => !e), [M]), X = u((e) => {
|
|
57
|
+
let t = V + e;
|
|
58
|
+
t >= 0 && t < z.length && (P(z[t].commitId), I(void 0));
|
|
59
|
+
}, [z, V]), Z = u((e) => {
|
|
60
|
+
e.key !== "ArrowLeft" && e.key !== "ArrowRight" || (e.preventDefault(), X(e.key === "ArrowLeft" ? -1 : 1));
|
|
61
|
+
}, [X]);
|
|
62
|
+
return b ? H ? /* @__PURE__ */ v("div", {
|
|
63
|
+
className: "flex h-full min-h-0 w-full flex-col",
|
|
64
|
+
onKeyDown: Z,
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ _(o, {
|
|
67
|
+
view: D,
|
|
68
|
+
persist: k,
|
|
69
|
+
commitCount: S.length,
|
|
70
|
+
onClear: w,
|
|
71
|
+
onViewChange: O,
|
|
72
|
+
onPersistChange: A
|
|
73
|
+
}),
|
|
74
|
+
D !== "hotspots" && /* @__PURE__ */ _(n, {
|
|
75
|
+
commits: z,
|
|
76
|
+
selectedIndex: V,
|
|
77
|
+
hydrated: x,
|
|
78
|
+
onSelect: q
|
|
79
|
+
}),
|
|
80
|
+
D !== "hotspots" && U && /* @__PURE__ */ v("div", {
|
|
81
|
+
className: "flex grow flex-col items-center justify-center gap-3 px-6 text-center text-zinc-500 dark:text-zinc-400",
|
|
82
|
+
children: [
|
|
83
|
+
/* @__PURE__ */ _("i", { className: "fa-solid fa-server text-3xl opacity-30" }),
|
|
84
|
+
/* @__PURE__ */ _("span", {
|
|
85
|
+
className: "text-sm font-medium text-zinc-600 dark:text-zinc-300",
|
|
86
|
+
children: "Server render (SSR)"
|
|
87
|
+
}),
|
|
88
|
+
/* @__PURE__ */ v("span", {
|
|
89
|
+
className: "max-w-md text-xs leading-relaxed",
|
|
90
|
+
children: [
|
|
91
|
+
"This page was rendered on the server first. React's Profiler doesn't run during server rendering, so there's no per-element timing for it — this commit marks that baseline. Commit\xA0#",
|
|
92
|
+
B,
|
|
93
|
+
" ",
|
|
94
|
+
"is the client ",
|
|
95
|
+
/* @__PURE__ */ _("span", {
|
|
96
|
+
className: "font-medium text-violet-600 dark:text-violet-400",
|
|
97
|
+
children: "hydration"
|
|
98
|
+
}),
|
|
99
|
+
" of this tree."
|
|
100
|
+
]
|
|
101
|
+
}),
|
|
102
|
+
/* @__PURE__ */ v("span", {
|
|
103
|
+
className: "text-[11px] opacity-70",
|
|
104
|
+
children: [H.elementCount, " elements in the rendered tree"]
|
|
105
|
+
})
|
|
106
|
+
]
|
|
107
|
+
}),
|
|
108
|
+
D === "ranked" && W && /* @__PURE__ */ _(a, {
|
|
109
|
+
commit: H,
|
|
110
|
+
model: W,
|
|
111
|
+
active: G,
|
|
112
|
+
origin: K,
|
|
113
|
+
sidebarOpen: j,
|
|
114
|
+
onSelectElement: J,
|
|
115
|
+
onToggleSidebar: Y
|
|
116
|
+
}),
|
|
117
|
+
D === "flamegraph" && W && /* @__PURE__ */ _(r, {
|
|
118
|
+
commit: H,
|
|
119
|
+
model: W,
|
|
120
|
+
active: G,
|
|
121
|
+
origin: K,
|
|
122
|
+
sidebarOpen: j,
|
|
123
|
+
onSelectElement: J,
|
|
124
|
+
onToggleSidebar: Y
|
|
125
|
+
}),
|
|
126
|
+
D === "hotspots" && /* @__PURE__ */ _(i, {
|
|
127
|
+
commits: S,
|
|
128
|
+
tree: C,
|
|
129
|
+
flat: T,
|
|
130
|
+
selectedId: F,
|
|
131
|
+
onSelectElement: J
|
|
132
|
+
})
|
|
133
|
+
]
|
|
134
|
+
}) : /* @__PURE__ */ v("div", {
|
|
135
|
+
className: "flex h-full min-h-0 w-full flex-col",
|
|
136
|
+
children: [/* @__PURE__ */ _(o, {
|
|
137
|
+
view: D,
|
|
138
|
+
persist: k,
|
|
139
|
+
commitCount: S.length,
|
|
140
|
+
onClear: w,
|
|
141
|
+
onViewChange: O,
|
|
142
|
+
onPersistChange: A
|
|
143
|
+
}), /* @__PURE__ */ v("div", {
|
|
144
|
+
className: "flex grow flex-col items-center justify-center gap-2 text-zinc-400 dark:text-zinc-500",
|
|
145
|
+
children: [/* @__PURE__ */ _("i", { className: "fa-solid fa-chart-column text-3xl opacity-20" }), /* @__PURE__ */ _("span", {
|
|
146
|
+
className: "text-xs",
|
|
147
|
+
children: "No commits recorded yet — interact with the page"
|
|
148
|
+
})]
|
|
149
|
+
})]
|
|
150
|
+
}) : /* @__PURE__ */ v("div", {
|
|
151
|
+
className: "flex h-full w-full flex-col items-center justify-center gap-2 text-zinc-400 dark:text-zinc-500",
|
|
152
|
+
children: [/* @__PURE__ */ _("i", { className: "fa-solid fa-gauge-high text-3xl opacity-20" }), /* @__PURE__ */ _("span", {
|
|
153
|
+
className: "text-xs",
|
|
154
|
+
children: "Enable debugMode to record render tracing"
|
|
155
|
+
})]
|
|
156
|
+
});
|
|
157
|
+
};
|
|
158
|
+
//#endregion
|
|
159
|
+
export { b as default };
|
package/dist/components/DevToolsPanel/tabs/TracingViewer/components/CommitCause/CommitCause.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FlameModel, FlameNode } from '../../helpers';
|
|
2
|
+
import { CommitEntry } from '@plitzi/sdk-shared';
|
|
3
|
+
export type CommitCauseProps = {
|
|
4
|
+
commit: CommitEntry;
|
|
5
|
+
model: FlameModel;
|
|
6
|
+
active: FlameNode | undefined;
|
|
7
|
+
onSelectElement: (id: string | undefined) => void;
|
|
8
|
+
};
|
|
9
|
+
declare const CommitCause: ({ commit, model, active, onSelectElement }: CommitCauseProps) => import("react").JSX.Element | null;
|
|
10
|
+
export default CommitCause;
|
package/dist/components/DevToolsPanel/tabs/TracingViewer/components/CommitCause/CommitCause.mjs
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import e from "clsx";
|
|
2
|
+
import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/DevToolsPanel/tabs/TracingViewer/components/CommitCause/CommitCause.tsx
|
|
4
|
+
var i = 6, a = ({ commit: a, model: o, active: s, onSelectElement: c }) => {
|
|
5
|
+
let l = o.nodes.filter((e) => e.trigger);
|
|
6
|
+
if (l.length === 0 && a.causes.length === 0) return null;
|
|
7
|
+
let u = l.slice(0, i), d = l.length - u.length, f = a.causes.slice(0, i), p = a.causes.length - f.length;
|
|
8
|
+
return /* @__PURE__ */ r(t, { children: [l.length > 0 && /* @__PURE__ */ r("span", {
|
|
9
|
+
className: "flex flex-wrap items-center gap-1",
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ n("span", {
|
|
12
|
+
className: "mr-0.5 font-medium tracking-wide text-zinc-400 uppercase dark:text-zinc-500",
|
|
13
|
+
children: "Triggered by"
|
|
14
|
+
}),
|
|
15
|
+
u.map((t) => /* @__PURE__ */ r("button", {
|
|
16
|
+
onClick: () => c(t.id === s?.id ? void 0 : t.id),
|
|
17
|
+
title: `${t.name} (${t.type}) — root-cause re-render of this commit`,
|
|
18
|
+
className: e("flex items-center gap-1 rounded px-1 py-0.5 text-violet-600 dark:text-violet-300", t.id === s?.id ? "bg-violet-500/25" : "bg-violet-500/10 hover:bg-violet-500/20"),
|
|
19
|
+
children: [/* @__PURE__ */ n("i", { className: "fa-solid fa-bolt text-[8px]" }), /* @__PURE__ */ n("span", {
|
|
20
|
+
className: "max-w-32 truncate",
|
|
21
|
+
children: t.name
|
|
22
|
+
})]
|
|
23
|
+
}, t.id)),
|
|
24
|
+
d > 0 && /* @__PURE__ */ r("span", {
|
|
25
|
+
className: "text-zinc-400 dark:text-zinc-500",
|
|
26
|
+
children: ["+", d]
|
|
27
|
+
})
|
|
28
|
+
]
|
|
29
|
+
}), a.causes.length > 0 && /* @__PURE__ */ r("span", {
|
|
30
|
+
className: "flex flex-wrap items-center gap-1",
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ n("span", {
|
|
33
|
+
className: "mr-0.5 font-medium tracking-wide text-zinc-400 uppercase dark:text-zinc-500",
|
|
34
|
+
children: "Store write"
|
|
35
|
+
}),
|
|
36
|
+
f.map((e) => /* @__PURE__ */ r("span", {
|
|
37
|
+
title: e.preview ? `${e.path}\n${e.preview}` : e.path,
|
|
38
|
+
className: "max-w-56 truncate rounded bg-zinc-500/10 px-1 py-0.5 font-mono text-[9px] text-zinc-600 dark:text-zinc-300",
|
|
39
|
+
children: [e.path, e.preview && /* @__PURE__ */ n("span", {
|
|
40
|
+
className: "ml-1 text-zinc-400 dark:text-zinc-500",
|
|
41
|
+
children: e.preview
|
|
42
|
+
})]
|
|
43
|
+
}, e.path)),
|
|
44
|
+
p > 0 && /* @__PURE__ */ r("span", {
|
|
45
|
+
className: "text-zinc-400 dark:text-zinc-500",
|
|
46
|
+
children: ["+", p]
|
|
47
|
+
})
|
|
48
|
+
]
|
|
49
|
+
})] });
|
|
50
|
+
};
|
|
51
|
+
//#endregion
|
|
52
|
+
export { a as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './CommitCause';
|
package/dist/components/DevToolsPanel/tabs/TracingViewer/components/CommitStrip/CommitStrip.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CommitEntry } from '@plitzi/sdk-shared';
|
|
2
|
+
export type CommitStripProps = {
|
|
3
|
+
commits: CommitEntry[];
|
|
4
|
+
selectedIndex: number;
|
|
5
|
+
hydrated: boolean;
|
|
6
|
+
onSelect: (commitId: number) => void;
|
|
7
|
+
};
|
|
8
|
+
declare const CommitStrip: ({ commits, selectedIndex, hydrated, onSelect }: CommitStripProps) => import("react").JSX.Element;
|
|
9
|
+
export default CommitStrip;
|
package/dist/components/DevToolsPanel/tabs/TracingViewer/components/CommitStrip/CommitStrip.mjs
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { COMMIT_ORIGIN_BADGE as e, COMMIT_ORIGIN_LABEL as t, COMMIT_ORIGIN_LEGEND as n, commitOrigin as r, durationColor as i, formatMs as a } from "../../helpers.mjs";
|
|
2
|
+
import o from "clsx";
|
|
3
|
+
import { useCallback as s, useEffect as c, useMemo as l, useRef as u } from "react";
|
|
4
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/DevToolsPanel/tabs/TracingViewer/components/CommitStrip/CommitStrip.tsx
|
|
6
|
+
var p = 6, m = ({ commits: m, selectedIndex: h, hydrated: g, onSelect: _ }) => {
|
|
7
|
+
let v = u(null), y = l(() => Math.max(1, ...m.map((e) => e.duration)), [m]), b = l(() => m.find((e) => e.commitId !== 0)?.commitId, [m]);
|
|
8
|
+
c(() => v.current?.scrollIntoView({
|
|
9
|
+
block: "nearest",
|
|
10
|
+
inline: "nearest"
|
|
11
|
+
}), [h]);
|
|
12
|
+
let x = s((e) => () => _(e), [_]);
|
|
13
|
+
return /* @__PURE__ */ f("div", {
|
|
14
|
+
className: "flex shrink-0 flex-col border-b border-zinc-200 bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-900",
|
|
15
|
+
children: [/* @__PURE__ */ d("div", {
|
|
16
|
+
role: "listbox",
|
|
17
|
+
"aria-label": "Commits, total render time",
|
|
18
|
+
"aria-orientation": "horizontal",
|
|
19
|
+
tabIndex: 0,
|
|
20
|
+
onKeyDown: s((e) => {
|
|
21
|
+
if (e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
|
|
22
|
+
e.preventDefault(), e.stopPropagation();
|
|
23
|
+
let t = h + (e.key === "ArrowLeft" ? -1 : 1);
|
|
24
|
+
t >= 0 && t < m.length && _(m[t].commitId);
|
|
25
|
+
}, [
|
|
26
|
+
m,
|
|
27
|
+
h,
|
|
28
|
+
_
|
|
29
|
+
]),
|
|
30
|
+
className: "flex h-20 items-end gap-1 overflow-x-auto px-2 pt-2 outline-none focus-visible:ring-1 focus-visible:ring-violet-400",
|
|
31
|
+
children: m.map((n, s) => {
|
|
32
|
+
let c = s === h, l = n.commitId === 0, u = l ? 100 : Math.max(6, Math.round(n.duration / y * 100)), m = r(n, g, n.commitId === b), _ = n.causes.slice(0, p).map((e) => e.path).join(", "), S = n.causes.length > p ? ` +${n.causes.length - p}` : "", C = n.causes.length > 0 ? `\nCaused by ${_}${S}` : "";
|
|
33
|
+
return /* @__PURE__ */ f("button", {
|
|
34
|
+
ref: c ? v : void 0,
|
|
35
|
+
role: "option",
|
|
36
|
+
"aria-selected": c,
|
|
37
|
+
onClick: x(n.commitId),
|
|
38
|
+
title: l ? `Commit #${n.commitId} · ${t[m]} · no client timing · ${n.elementCount} elements` : `Commit #${n.commitId} · ${t[m]} · ${a(n.duration)} total · ${n.elementCount} elements${C}`,
|
|
39
|
+
className: "flex h-full shrink-0 flex-col items-center justify-end gap-0.5 px-0.5",
|
|
40
|
+
children: [/* @__PURE__ */ d("div", {
|
|
41
|
+
style: { height: `${u}%` },
|
|
42
|
+
className: o("w-3.5 rounded-sm transition-all", l ? "bg-violet-400/40" : i(n.duration), {
|
|
43
|
+
"border border-dashed border-violet-400/70": l,
|
|
44
|
+
"opacity-100 ring-2 ring-violet-400": c,
|
|
45
|
+
"opacity-40 hover:opacity-80": !c
|
|
46
|
+
})
|
|
47
|
+
}), /* @__PURE__ */ d("span", {
|
|
48
|
+
className: o("text-[8px] leading-none font-semibold", {
|
|
49
|
+
"text-violet-600 dark:text-violet-300": m === "ssr" || m === "hydration",
|
|
50
|
+
"text-zinc-500 dark:text-zinc-400": m === "mount" || m === "mixed",
|
|
51
|
+
"text-transparent": m === "update"
|
|
52
|
+
}),
|
|
53
|
+
children: e[m]
|
|
54
|
+
})]
|
|
55
|
+
}, n.commitId);
|
|
56
|
+
})
|
|
57
|
+
}), /* @__PURE__ */ d("div", {
|
|
58
|
+
className: "flex items-center gap-x-3 gap-y-0.5 overflow-x-auto px-2 pb-1 text-[9px] text-zinc-400 dark:text-zinc-500",
|
|
59
|
+
children: n.map((t) => /* @__PURE__ */ f("span", {
|
|
60
|
+
className: "flex shrink-0 items-center gap-1",
|
|
61
|
+
children: [/* @__PURE__ */ d("span", {
|
|
62
|
+
className: "font-semibold text-zinc-500 dark:text-zinc-300",
|
|
63
|
+
children: e[t.origin]
|
|
64
|
+
}), t.label]
|
|
65
|
+
}, t.origin))
|
|
66
|
+
})]
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
//#endregion
|
|
70
|
+
export { m as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './CommitStrip';
|
package/dist/components/DevToolsPanel/tabs/TracingViewer/components/DetailSidebar/DetailSidebar.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FlameModel, FlameNode } from '../../helpers';
|
|
2
|
+
import { CommitEntry } from '@plitzi/sdk-shared';
|
|
3
|
+
export type DetailSidebarProps = {
|
|
4
|
+
node: FlameNode;
|
|
5
|
+
commit: CommitEntry;
|
|
6
|
+
model: FlameModel;
|
|
7
|
+
};
|
|
8
|
+
declare const DetailSidebar: ({ node, commit, model }: DetailSidebarProps) => import("react").JSX.Element;
|
|
9
|
+
export default DetailSidebar;
|
package/dist/components/DevToolsPanel/tabs/TracingViewer/components/DetailSidebar/DetailSidebar.mjs
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { HATCH_STYLE as e, formatMs as t, formatPercent as n, frameColor as r } from "../../helpers.mjs";
|
|
2
|
+
import i from "clsx";
|
|
3
|
+
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/DevToolsPanel/tabs/TracingViewer/components/DetailSidebar/DetailSidebar.tsx
|
|
5
|
+
var c = ({ node: c, commit: l, model: u }) => /* @__PURE__ */ s(a, { children: [
|
|
6
|
+
/* @__PURE__ */ s("div", {
|
|
7
|
+
className: "flex items-center gap-1.5",
|
|
8
|
+
children: [
|
|
9
|
+
/* @__PURE__ */ o("span", {
|
|
10
|
+
className: i("h-2.5 w-2.5 shrink-0 rounded-sm", r(c)),
|
|
11
|
+
style: c.state === "hatched" ? e : void 0
|
|
12
|
+
}),
|
|
13
|
+
/* @__PURE__ */ o("span", {
|
|
14
|
+
className: "truncate text-xs font-medium text-zinc-700 dark:text-zinc-100",
|
|
15
|
+
children: c.name
|
|
16
|
+
}),
|
|
17
|
+
!c.visible && /* @__PURE__ */ o("i", {
|
|
18
|
+
className: "fa-solid fa-eye-slash shrink-0 text-amber-500",
|
|
19
|
+
title: "Hidden via visibility"
|
|
20
|
+
})
|
|
21
|
+
]
|
|
22
|
+
}),
|
|
23
|
+
/* @__PURE__ */ o("span", {
|
|
24
|
+
className: "truncate text-zinc-400 dark:text-zinc-500",
|
|
25
|
+
children: c.type
|
|
26
|
+
}),
|
|
27
|
+
!c.visible && /* @__PURE__ */ o("span", {
|
|
28
|
+
className: "w-fit rounded bg-amber-500/15 px-1 py-0.5 text-[9px] text-amber-600 dark:text-amber-400",
|
|
29
|
+
children: "hidden (visibility)"
|
|
30
|
+
}),
|
|
31
|
+
/* @__PURE__ */ s("span", {
|
|
32
|
+
className: i("w-fit rounded px-1 py-0.5 text-[9px]", {
|
|
33
|
+
"bg-emerald-500/15 text-emerald-600 dark:text-emerald-400": c.state === "rendered",
|
|
34
|
+
"bg-zinc-500/15 text-zinc-500 dark:text-zinc-400": c.state !== "rendered"
|
|
35
|
+
}),
|
|
36
|
+
children: [
|
|
37
|
+
c.state === "rendered" && `rendered · ${c.phase ?? "update"}`,
|
|
38
|
+
c.state === "bubbled" && "a descendant rendered",
|
|
39
|
+
c.state === "hatched" && "did not render"
|
|
40
|
+
]
|
|
41
|
+
}),
|
|
42
|
+
c.trigger && /* @__PURE__ */ s("span", {
|
|
43
|
+
className: "w-fit rounded bg-violet-500/15 px-1 py-0.5 text-[9px] text-violet-600 dark:text-violet-400",
|
|
44
|
+
title: "A root cause of this commit — no ancestor re-rendered",
|
|
45
|
+
children: [/* @__PURE__ */ o("i", { className: "fa-solid fa-bolt mr-1" }), "trigger"]
|
|
46
|
+
}),
|
|
47
|
+
/* @__PURE__ */ o("div", {
|
|
48
|
+
className: "mt-1 font-medium tracking-wide text-zinc-400 uppercase dark:text-zinc-500",
|
|
49
|
+
children: "Durations"
|
|
50
|
+
}),
|
|
51
|
+
/* @__PURE__ */ s("div", {
|
|
52
|
+
className: "flex justify-between gap-2",
|
|
53
|
+
children: [/* @__PURE__ */ o("span", {
|
|
54
|
+
className: "text-zinc-400 dark:text-zinc-500",
|
|
55
|
+
children: "Self"
|
|
56
|
+
}), /* @__PURE__ */ o("span", {
|
|
57
|
+
className: "text-zinc-700 tabular-nums dark:text-zinc-200",
|
|
58
|
+
children: t(c.selfDuration)
|
|
59
|
+
})]
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ s("div", {
|
|
62
|
+
className: "flex justify-between gap-2",
|
|
63
|
+
children: [/* @__PURE__ */ o("span", {
|
|
64
|
+
className: "text-zinc-400 dark:text-zinc-500",
|
|
65
|
+
children: "Total (subtree)"
|
|
66
|
+
}), /* @__PURE__ */ o("span", {
|
|
67
|
+
className: "text-zinc-700 tabular-nums dark:text-zinc-200",
|
|
68
|
+
children: t(c.actualDuration)
|
|
69
|
+
})]
|
|
70
|
+
}),
|
|
71
|
+
/* @__PURE__ */ s("div", {
|
|
72
|
+
className: "flex justify-between gap-2",
|
|
73
|
+
children: [/* @__PURE__ */ o("span", {
|
|
74
|
+
className: "text-zinc-400 dark:text-zinc-500",
|
|
75
|
+
children: "Base"
|
|
76
|
+
}), /* @__PURE__ */ o("span", {
|
|
77
|
+
className: "text-zinc-700 tabular-nums dark:text-zinc-200",
|
|
78
|
+
children: t(c.baseDuration)
|
|
79
|
+
})]
|
|
80
|
+
}),
|
|
81
|
+
/* @__PURE__ */ s("div", {
|
|
82
|
+
className: "flex justify-between gap-2",
|
|
83
|
+
children: [/* @__PURE__ */ o("span", {
|
|
84
|
+
className: "text-zinc-400 dark:text-zinc-500",
|
|
85
|
+
children: "% of commit"
|
|
86
|
+
}), /* @__PURE__ */ o("span", {
|
|
87
|
+
className: "text-zinc-700 tabular-nums dark:text-zinc-200",
|
|
88
|
+
children: n(c.actualDuration / l.duration)
|
|
89
|
+
})]
|
|
90
|
+
}),
|
|
91
|
+
c.state === "rendered" && /* @__PURE__ */ s("div", {
|
|
92
|
+
className: "flex justify-between gap-2",
|
|
93
|
+
children: [/* @__PURE__ */ o("span", {
|
|
94
|
+
className: "text-zinc-400 dark:text-zinc-500",
|
|
95
|
+
children: "% of work"
|
|
96
|
+
}), /* @__PURE__ */ o("span", {
|
|
97
|
+
className: "text-zinc-700 tabular-nums dark:text-zinc-200",
|
|
98
|
+
children: n(u.totalSelf > 0 ? c.selfDuration / u.totalSelf : 0)
|
|
99
|
+
})]
|
|
100
|
+
}),
|
|
101
|
+
/* @__PURE__ */ s("div", {
|
|
102
|
+
className: "mt-1 font-medium tracking-wide text-zinc-400 uppercase dark:text-zinc-500",
|
|
103
|
+
children: ["Commit #", l.commitId]
|
|
104
|
+
}),
|
|
105
|
+
/* @__PURE__ */ s("div", {
|
|
106
|
+
className: "flex justify-between gap-2",
|
|
107
|
+
children: [/* @__PURE__ */ o("span", {
|
|
108
|
+
className: "text-zinc-400 dark:text-zinc-500",
|
|
109
|
+
children: "Committed at"
|
|
110
|
+
}), /* @__PURE__ */ s("span", {
|
|
111
|
+
className: "text-zinc-700 tabular-nums dark:text-zinc-200",
|
|
112
|
+
children: [(l.timestamp / 1e3).toFixed(1), "s"]
|
|
113
|
+
})]
|
|
114
|
+
}),
|
|
115
|
+
/* @__PURE__ */ s("div", {
|
|
116
|
+
className: "flex justify-between gap-2",
|
|
117
|
+
children: [/* @__PURE__ */ o("span", {
|
|
118
|
+
className: "text-zinc-400 dark:text-zinc-500",
|
|
119
|
+
children: "Total"
|
|
120
|
+
}), /* @__PURE__ */ o("span", {
|
|
121
|
+
className: "text-zinc-700 tabular-nums dark:text-zinc-200",
|
|
122
|
+
children: t(l.duration)
|
|
123
|
+
})]
|
|
124
|
+
}),
|
|
125
|
+
/* @__PURE__ */ s("div", {
|
|
126
|
+
className: "flex justify-between gap-2",
|
|
127
|
+
children: [/* @__PURE__ */ o("span", {
|
|
128
|
+
className: "text-zinc-400 dark:text-zinc-500",
|
|
129
|
+
children: "Rendered"
|
|
130
|
+
}), /* @__PURE__ */ s("span", {
|
|
131
|
+
className: "text-zinc-700 tabular-nums dark:text-zinc-200",
|
|
132
|
+
children: [
|
|
133
|
+
u.renderedCount,
|
|
134
|
+
" of ",
|
|
135
|
+
l.elementCount
|
|
136
|
+
]
|
|
137
|
+
})]
|
|
138
|
+
}),
|
|
139
|
+
/* @__PURE__ */ s("div", {
|
|
140
|
+
className: "flex justify-between gap-2",
|
|
141
|
+
children: [/* @__PURE__ */ o("span", {
|
|
142
|
+
className: "text-zinc-400 dark:text-zinc-500",
|
|
143
|
+
children: "Triggers"
|
|
144
|
+
}), /* @__PURE__ */ o("span", {
|
|
145
|
+
className: "text-zinc-700 tabular-nums dark:text-zinc-200",
|
|
146
|
+
children: u.triggers.length
|
|
147
|
+
})]
|
|
148
|
+
}),
|
|
149
|
+
c.state === "rendered" && /* @__PURE__ */ s(a, { children: [
|
|
150
|
+
/* @__PURE__ */ o("div", {
|
|
151
|
+
className: "mt-1 font-medium tracking-wide text-zinc-400 uppercase dark:text-zinc-500",
|
|
152
|
+
children: "Why it rendered"
|
|
153
|
+
}),
|
|
154
|
+
c.phase === "mount" && /* @__PURE__ */ o("span", {
|
|
155
|
+
className: "text-zinc-400 italic dark:text-zinc-500",
|
|
156
|
+
children: "first mount"
|
|
157
|
+
}),
|
|
158
|
+
c.phase !== "mount" && c.changedProps === void 0 && /* @__PURE__ */ s("span", {
|
|
159
|
+
className: "w-fit rounded bg-sky-500/15 px-1 py-0.5 text-[9px] text-sky-600 dark:text-sky-400",
|
|
160
|
+
children: [/* @__PURE__ */ o("i", { className: "fa-solid fa-microchip mr-1" }), "internal React — own state or a hook (props & store inputs unchanged)"]
|
|
161
|
+
}),
|
|
162
|
+
c.phase !== "mount" && c.changedProps?.length === 0 && c.trigger && /* @__PURE__ */ s("span", {
|
|
163
|
+
className: "w-fit rounded bg-sky-500/15 px-1 py-0.5 text-[9px] text-sky-600 dark:text-sky-400",
|
|
164
|
+
children: [/* @__PURE__ */ o("i", { className: "fa-solid fa-microchip mr-1" }), "internal — a hook or consumed context changed, not props or store"]
|
|
165
|
+
}),
|
|
166
|
+
c.phase !== "mount" && c.changedProps?.length === 0 && !c.trigger && /* @__PURE__ */ s("span", {
|
|
167
|
+
className: "w-fit rounded bg-amber-500/15 px-1 py-0.5 text-[9px] text-amber-600 dark:text-amber-400",
|
|
168
|
+
children: [/* @__PURE__ */ o("i", { className: "fa-solid fa-triangle-exclamation mr-1" }), "no input changed — re-rendered by an ancestor"]
|
|
169
|
+
}),
|
|
170
|
+
c.changedProps?.map((e) => /* @__PURE__ */ s("div", {
|
|
171
|
+
className: "flex flex-col gap-0.5 border-l border-zinc-200 pl-1.5 dark:border-zinc-700",
|
|
172
|
+
children: [/* @__PURE__ */ s("span", {
|
|
173
|
+
className: "flex flex-wrap items-center gap-1",
|
|
174
|
+
children: [/* @__PURE__ */ o("span", {
|
|
175
|
+
className: "font-mono text-[9px] font-medium break-all text-zinc-600 dark:text-zinc-300",
|
|
176
|
+
children: e.key
|
|
177
|
+
}), e.ref && /* @__PURE__ */ o("span", {
|
|
178
|
+
className: "shrink-0 rounded bg-amber-500/15 px-1 text-[8px] text-amber-600 dark:text-amber-400",
|
|
179
|
+
title: "Reference changed but the content is shallow-equal — a new object/array, likely a missing memo",
|
|
180
|
+
children: "new ref"
|
|
181
|
+
})]
|
|
182
|
+
}), /* @__PURE__ */ s("div", {
|
|
183
|
+
className: "flex flex-col gap-0.5 font-mono text-[9px] leading-snug",
|
|
184
|
+
children: [/* @__PURE__ */ s("span", {
|
|
185
|
+
className: "break-all text-zinc-400 dark:text-zinc-500",
|
|
186
|
+
children: [/* @__PURE__ */ o("span", {
|
|
187
|
+
className: "text-rose-400/70 select-none dark:text-rose-400/60",
|
|
188
|
+
children: "− "
|
|
189
|
+
}), e.prev]
|
|
190
|
+
}), /* @__PURE__ */ s("span", {
|
|
191
|
+
className: "break-all text-zinc-600 dark:text-zinc-300",
|
|
192
|
+
children: [/* @__PURE__ */ o("span", {
|
|
193
|
+
className: "text-emerald-500/80 select-none",
|
|
194
|
+
children: "+ "
|
|
195
|
+
}), e.next]
|
|
196
|
+
})]
|
|
197
|
+
})]
|
|
198
|
+
}, e.key))
|
|
199
|
+
] })
|
|
200
|
+
] });
|
|
201
|
+
//#endregion
|
|
202
|
+
export { c as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DetailSidebar';
|