@parca/profile 0.19.27 → 0.19.28
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 +4 -0
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.js +4 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenuWrapper.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenuWrapper.js +10 -5
- package/package.json +2 -2
- package/src/ProfileFlameGraph/FlameGraphArrow/ContextMenu.tsx +5 -0
- package/src/ProfileFlameGraph/FlameGraphArrow/ContextMenuWrapper.tsx +11 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.19.28](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.27...@parca/profile@0.19.28) (2025-07-22)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @parca/profile
|
|
9
|
+
|
|
6
10
|
## [0.19.27](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.26...@parca/profile@0.19.27) (2025-07-21)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @parca/profile
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../src/ProfileFlameGraph/FlameGraphArrow/ContextMenu.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AAOnC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAO1C,UAAU,gBAAgB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAClB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,QAAA,MAAM,WAAW,GAAI,kIAalB,gBAAgB,KAAG,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../src/ProfileFlameGraph/FlameGraphArrow/ContextMenu.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AAOnC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAO1C,UAAU,gBAAgB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAClB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,QAAA,MAAM,WAAW,GAAI,kIAalB,gBAAgB,KAAG,GAAG,CAAC,OAsOzB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -93,13 +93,16 @@ const ContextMenu = ({ menuId, table, total, totalUnfiltered, row, compareAbsolu
|
|
|
93
93
|
setDashboardItems([...dashboardItems, 'table']);
|
|
94
94
|
}
|
|
95
95
|
}, children: _jsxs("div", { className: "flex w-full items-center gap-2", children: [_jsx(Icon, { icon: "ph:table" }), _jsx("div", { children: "Show in table" })] }) }), enableSandwichView === true && (_jsx(Item, { id: "show-in-sandwich", onClick: () => {
|
|
96
|
+
if (functionName === '' || functionName == null) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
96
99
|
if (dashboardItems.includes('sandwich')) {
|
|
97
100
|
setSandwichFunctionName(functionName);
|
|
98
101
|
return;
|
|
99
102
|
}
|
|
100
103
|
setSandwichFunctionName(functionName);
|
|
101
104
|
setDashboardItems([...dashboardItems, 'sandwich']);
|
|
102
|
-
}, children: _jsxs("div", { className: "flex w-full items-center gap-2", children: [_jsx(Icon, { icon: "tdesign:sandwich-filled" }), _jsxs("div", { className: "relative", children: [dashboardItems.includes('sandwich')
|
|
105
|
+
}, disabled: functionName === '' || functionName == null, children: _jsxs("div", { className: "flex w-full items-center gap-2", children: [_jsx(Icon, { icon: "tdesign:sandwich-filled" }), _jsxs("div", { className: "relative", children: [dashboardItems.includes('sandwich')
|
|
103
106
|
? 'Focus sandwich on this frame.'
|
|
104
107
|
: 'Show in sandwich', _jsx("span", { className: "absolute top-[-2px] text-xs lowercase text-red-500", children: "\u00A0alpha" })] })] }) })), _jsx(Item, { id: "reset-view", onClick: handleResetView, children: _jsxs("div", { className: "flex w-full items-center gap-2", children: [_jsx(Icon, { icon: "system-uicons:reset" }), _jsx("div", { children: "Reset graph" })] }) }), _jsxs(Item, { id: "hide-binary", onClick: () => hideBinary(getLastItem(mappingFile)), disabled: mappingFile === null || mappingFile === '', children: [_jsx("div", { "data-tooltip-id": "hide-binary-help", "data-tooltip-content": "Hide all frames for this binary", children: _jsxs("div", { className: "flex w-full items-center gap-2", children: [_jsx(Icon, { icon: "bx:bxs-hide" }), _jsxs("div", { children: ["Hide binary ", mappingFile !== null && `(${getLastItem(mappingFile)})`] })] }) }), _jsx(Tooltip, { place: "left", id: "hide-binary-help" })] }), _jsx(Submenu, { label: _jsxs("div", { className: "flex w-full items-center gap-2", children: [_jsx(Icon, { icon: "ph:copy" }), _jsx("div", { children: "Copy" })] }), children: _jsx("div", { className: "max-h-[300px] overflow-scroll", children: nonEmptyValuesToCopy.map(({ id, value }) => (_jsx(Item, { id: id, onClick: () => handleCopyItem(value), className: "dark:bg-gray-800", children: _jsxs("div", { className: "flex flex-col dark:text-gray-300 hover:dark:text-gray-100", children: [_jsx("div", { className: "text-sm", children: id }), _jsx("div", { className: "text-xs", children: truncateString(value, 30) })] }) }, id))) }) }), checkDebuginfoStatusHandler !== undefined ? (_jsx(Item, { id: "check-debuginfo-status", onClick: () => checkDebuginfoStatusHandler(mappingBuildID), disabled: !isMappingBuildIDAvailable, children: _jsxs("div", { className: "flex w-full items-center gap-2", children: [_jsx(Icon, { icon: "bx:bx-info-circle" }), _jsx("div", { className: "relative pr-4", children: "Check debuginfo status" })] }) })) : null, _jsx(Separator, {}), _jsx(Item, { id: "dock-tooltip", onClick: handleDockTooltip, children: _jsxs("div", { className: "flex w-full items-center gap-2", children: [_jsx(Icon, { icon: "bx:dock-bottom" }), isGraphTooltipDocked ? 'Undock tooltip' : 'Dock tooltip'] }) })] }));
|
|
105
108
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenuWrapper.d.ts","sourceRoot":"","sources":["../../../src/ProfileFlameGraph/FlameGraphArrow/ContextMenuWrapper.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AAEnC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAI1C,UAAU,uBAAuB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CA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AAED,QAAA,MAAM,kBAAkB,2HAwBvB,CAAC;AAIF,eAAe,kBAAkB,CAAC"}
|
|
@@ -14,19 +14,24 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
14
14
|
import { forwardRef, useImperativeHandle, useState } from 'react';
|
|
15
15
|
import ContextMenu from './ContextMenu';
|
|
16
16
|
const ContextMenuWrapper = forwardRef((props, ref) => {
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
const [row, setRow] = useState(0);
|
|
17
|
+
// Initialize with null to prevent rendering with invalid data
|
|
18
|
+
const [row, setRow] = useState(null);
|
|
20
19
|
useImperativeHandle(ref, () => ({
|
|
21
20
|
setRow: (newRow, callback) => {
|
|
22
21
|
setRow(newRow);
|
|
23
22
|
// Execute callback after state update using requestAnimationFrame
|
|
24
23
|
if (callback != null) {
|
|
25
|
-
requestAnimationFrame(
|
|
24
|
+
requestAnimationFrame(() => {
|
|
25
|
+
requestAnimationFrame(callback);
|
|
26
|
+
});
|
|
26
27
|
}
|
|
27
28
|
},
|
|
28
29
|
}));
|
|
29
|
-
|
|
30
|
+
// Only render ContextMenu when we have a valid row
|
|
31
|
+
if (row === null) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
return _jsx(ContextMenu, { ...props, row: row, isSandwich: props.isInSandwichView });
|
|
30
35
|
});
|
|
31
36
|
ContextMenuWrapper.displayName = 'ContextMenuWrapper';
|
|
32
37
|
export default ContextMenuWrapper;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parca/profile",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.28",
|
|
4
4
|
"description": "Profile viewing libraries",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@floating-ui/react": "^0.27.12",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"access": "public",
|
|
79
79
|
"registry": "https://registry.npmjs.org/"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "fcd8ab30d83c0bc8f23e4c244da5e2b06aacf74a"
|
|
82
82
|
}
|
|
@@ -188,6 +188,10 @@ const ContextMenu = ({
|
|
|
188
188
|
<Item
|
|
189
189
|
id="show-in-sandwich"
|
|
190
190
|
onClick={() => {
|
|
191
|
+
if (functionName === '' || functionName == null) {
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
|
|
191
195
|
if (dashboardItems.includes('sandwich')) {
|
|
192
196
|
setSandwichFunctionName(functionName);
|
|
193
197
|
return;
|
|
@@ -196,6 +200,7 @@ const ContextMenu = ({
|
|
|
196
200
|
setSandwichFunctionName(functionName);
|
|
197
201
|
setDashboardItems([...dashboardItems, 'sandwich']);
|
|
198
202
|
}}
|
|
203
|
+
disabled={functionName === '' || functionName == null}
|
|
199
204
|
>
|
|
200
205
|
<div className="flex w-full items-center gap-2">
|
|
201
206
|
<Icon icon="tdesign:sandwich-filled" />
|
|
@@ -39,21 +39,27 @@ export interface ContextMenuWrapperRef {
|
|
|
39
39
|
|
|
40
40
|
const ContextMenuWrapper = forwardRef<ContextMenuWrapperRef, ContextMenuWrapperProps>(
|
|
41
41
|
(props, ref) => {
|
|
42
|
-
//
|
|
43
|
-
|
|
44
|
-
const [row, setRow] = useState(0);
|
|
42
|
+
// Initialize with null to prevent rendering with invalid data
|
|
43
|
+
const [row, setRow] = useState<number | null>(null);
|
|
45
44
|
|
|
46
45
|
useImperativeHandle(ref, () => ({
|
|
47
46
|
setRow: (newRow: number, callback?: () => void) => {
|
|
48
47
|
setRow(newRow);
|
|
49
48
|
// Execute callback after state update using requestAnimationFrame
|
|
50
49
|
if (callback != null) {
|
|
51
|
-
requestAnimationFrame(
|
|
50
|
+
requestAnimationFrame(() => {
|
|
51
|
+
requestAnimationFrame(callback);
|
|
52
|
+
});
|
|
52
53
|
}
|
|
53
54
|
},
|
|
54
55
|
}));
|
|
55
56
|
|
|
56
|
-
|
|
57
|
+
// Only render ContextMenu when we have a valid row
|
|
58
|
+
if (row === null) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return <ContextMenu {...props} row={row} isSandwich={props.isInSandwichView} />;
|
|
57
63
|
}
|
|
58
64
|
);
|
|
59
65
|
|