@parca/profile 0.16.416 → 0.16.417

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.
Files changed (85) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/Callgraph/index.js +3 -2
  3. package/dist/GraphTooltipArrow/Content.d.ts +1 -3
  4. package/dist/GraphTooltipArrow/Content.d.ts.map +1 -1
  5. package/dist/GraphTooltipArrow/Content.js +4 -4
  6. package/dist/GraphTooltipArrow/DockedGraphTooltip/index.js +2 -2
  7. package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.d.ts +1 -3
  8. package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.d.ts.map +1 -1
  9. package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.js +6 -16
  10. package/dist/ProfileExplorer/ProfileExplorerCompare.d.ts.map +1 -1
  11. package/dist/ProfileExplorer/ProfileExplorerCompare.js +3 -3
  12. package/dist/ProfileExplorer/ProfileExplorerSingle.d.ts.map +1 -1
  13. package/dist/ProfileExplorer/ProfileExplorerSingle.js +1 -1
  14. package/dist/ProfileExplorer/index.d.ts.map +1 -1
  15. package/dist/ProfileExplorer/index.js +1 -7
  16. package/dist/ProfileIcicleGraph/IcicleGraph/ColorStackLegend.d.ts +1 -3
  17. package/dist/ProfileIcicleGraph/IcicleGraph/ColorStackLegend.d.ts.map +1 -1
  18. package/dist/ProfileIcicleGraph/IcicleGraph/ColorStackLegend.js +2 -2
  19. package/dist/ProfileIcicleGraph/IcicleGraph/index.d.ts +0 -2
  20. package/dist/ProfileIcicleGraph/IcicleGraph/index.d.ts.map +1 -1
  21. package/dist/ProfileIcicleGraph/IcicleGraph/index.js +4 -3
  22. package/dist/ProfileIcicleGraph/IcicleGraphArrow/ColorStackLegend.d.ts +1 -3
  23. package/dist/ProfileIcicleGraph/IcicleGraphArrow/ColorStackLegend.d.ts.map +1 -1
  24. package/dist/ProfileIcicleGraph/IcicleGraphArrow/ColorStackLegend.js +8 -20
  25. package/dist/ProfileIcicleGraph/IcicleGraphArrow/ContextMenu.d.ts +1 -3
  26. package/dist/ProfileIcicleGraph/IcicleGraphArrow/ContextMenu.d.ts.map +1 -1
  27. package/dist/ProfileIcicleGraph/IcicleGraphArrow/ContextMenu.js +2 -2
  28. package/dist/ProfileIcicleGraph/IcicleGraphArrow/index.d.ts +1 -2
  29. package/dist/ProfileIcicleGraph/IcicleGraphArrow/index.d.ts.map +1 -1
  30. package/dist/ProfileIcicleGraph/IcicleGraphArrow/index.js +6 -9
  31. package/dist/ProfileIcicleGraph/index.d.ts +1 -3
  32. package/dist/ProfileIcicleGraph/index.d.ts.map +1 -1
  33. package/dist/ProfileIcicleGraph/index.js +20 -48
  34. package/dist/ProfileMetricsGraph/index.js +1 -2
  35. package/dist/ProfileView/FilterByFunctionButton.d.ts +1 -4
  36. package/dist/ProfileView/FilterByFunctionButton.d.ts.map +1 -1
  37. package/dist/ProfileView/FilterByFunctionButton.js +12 -3
  38. package/dist/ProfileView/ViewSelector.d.ts +1 -3
  39. package/dist/ProfileView/ViewSelector.d.ts.map +1 -1
  40. package/dist/ProfileView/ViewSelector.js +3 -4
  41. package/dist/ProfileView/VisualizationPanel.d.ts +0 -2
  42. package/dist/ProfileView/VisualizationPanel.d.ts.map +1 -1
  43. package/dist/ProfileView/VisualizationPanel.js +2 -2
  44. package/dist/ProfileView/index.d.ts +1 -5
  45. package/dist/ProfileView/index.d.ts.map +1 -1
  46. package/dist/ProfileView/index.js +11 -18
  47. package/dist/ProfileViewWithData.d.ts +1 -3
  48. package/dist/ProfileViewWithData.d.ts.map +1 -1
  49. package/dist/ProfileViewWithData.js +15 -12
  50. package/dist/SourceView/index.js +1 -1
  51. package/dist/SourceView/useSelectedLineRange.js +1 -1
  52. package/dist/Table/index.d.ts +1 -2
  53. package/dist/Table/index.d.ts.map +1 -1
  54. package/dist/Table/index.js +9 -25
  55. package/dist/TopTable/index.d.ts.map +1 -1
  56. package/dist/TopTable/index.js +3 -7
  57. package/dist/index.d.ts +3 -0
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/index.js +3 -0
  60. package/dist/styles.css +1 -1
  61. package/package.json +7 -7
  62. package/src/Callgraph/index.tsx +3 -3
  63. package/src/GraphTooltipArrow/Content.tsx +4 -14
  64. package/src/GraphTooltipArrow/DockedGraphTooltip/index.tsx +2 -2
  65. package/src/GraphTooltipArrow/useGraphTooltipMetaInfo/index.ts +6 -22
  66. package/src/ProfileExplorer/ProfileExplorerCompare.tsx +2 -3
  67. package/src/ProfileExplorer/ProfileExplorerSingle.tsx +1 -5
  68. package/src/ProfileExplorer/index.tsx +0 -8
  69. package/src/ProfileIcicleGraph/IcicleGraph/ColorStackLegend.tsx +2 -4
  70. package/src/ProfileIcicleGraph/IcicleGraph/index.tsx +5 -8
  71. package/src/ProfileIcicleGraph/IcicleGraphArrow/ColorStackLegend.tsx +8 -27
  72. package/src/ProfileIcicleGraph/IcicleGraphArrow/ContextMenu.tsx +2 -4
  73. package/src/ProfileIcicleGraph/IcicleGraphArrow/index.tsx +4 -17
  74. package/src/ProfileIcicleGraph/index.tsx +19 -67
  75. package/src/ProfileMetricsGraph/index.tsx +2 -2
  76. package/src/ProfileView/FilterByFunctionButton.tsx +15 -9
  77. package/src/ProfileView/ViewSelector.tsx +6 -7
  78. package/src/ProfileView/VisualizationPanel.tsx +1 -9
  79. package/src/ProfileView/index.tsx +8 -23
  80. package/src/ProfileViewWithData.tsx +15 -18
  81. package/src/SourceView/index.tsx +1 -1
  82. package/src/SourceView/useSelectedLineRange.ts +2 -2
  83. package/src/Table/index.tsx +10 -41
  84. package/src/TopTable/index.tsx +3 -8
  85. package/src/index.tsx +4 -0
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.16.417 (2024-07-29)
7
+
8
+ **Note:** Version bump only for package @parca/profile
9
+
6
10
  ## [0.16.416](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.415...@parca/profile@0.16.416) (2024-07-23)
7
11
 
8
12
  **Note:** Version bump only for package @parca/profile
@@ -39,8 +39,9 @@ const Callgraph = ({ data, svgString, profileType, width }) => {
39
39
  // ? true
40
40
  // : isSearchMatch(currentSearchString, sourceNode.functionName) &&
41
41
  // isSearchMatch(currentSearchString, targetNode.functionName);
42
- const [rawDashboardItems] = useURLState({ param: 'dashboard_items' });
43
- const dashboardItems = rawDashboardItems !== undefined ? rawDashboardItems : ['icicle'];
42
+ const [dashboardItems] = useURLState('dashboard_items', {
43
+ alwaysReturnArray: true,
44
+ });
44
45
  const isDarkMode = useAppSelector(selectDarkMode);
45
46
  const maxColor = getNewSpanColor(isDarkMode);
46
47
  const minColor = d3.scaleLinear([isDarkMode ? 'black' : 'white', maxColor])(0.3);
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Table } from 'apache-arrow';
3
3
  import { ProfileType } from '@parca/parser';
4
- import { type NavigateFunction } from '@parca/utilities';
5
4
  interface GraphTooltipArrowContentProps {
6
5
  table: Table<any>;
7
6
  profileType?: ProfileType;
@@ -11,8 +10,7 @@ interface GraphTooltipArrowContentProps {
11
10
  row: number | null;
12
11
  level: number;
13
12
  isFixed: boolean;
14
- navigateTo: NavigateFunction;
15
13
  }
16
- declare const GraphTooltipArrowContent: ({ table, profileType, unit, total, totalUnfiltered, row, level, isFixed, navigateTo, }: GraphTooltipArrowContentProps) => React.JSX.Element;
14
+ declare const GraphTooltipArrowContent: ({ table, profileType, unit, total, totalUnfiltered, row, level, isFixed, }: GraphTooltipArrowContentProps) => React.JSX.Element;
17
15
  export default GraphTooltipArrowContent;
18
16
  //# sourceMappingURL=Content.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Content.d.ts","sourceRoot":"","sources":["../../src/GraphTooltipArrow/Content.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,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,wBAAwB,CAAC"}
@@ -8,7 +8,7 @@ import { useGraphTooltipMetaInfo } from './useGraphTooltipMetaInfo';
8
8
  const NoData = () => {
9
9
  return _jsx("span", { className: "rounded bg-gray-200 px-2 dark:bg-gray-800", children: "Not available" });
10
10
  };
11
- const GraphTooltipArrowContent = ({ table, profileType, unit, total, totalUnfiltered, row, level, isFixed, navigateTo, }) => {
11
+ const GraphTooltipArrowContent = ({ table, profileType, unit, total, totalUnfiltered, row, level, isFixed, }) => {
12
12
  const graphTooltipData = useGraphTooltip({
13
13
  table,
14
14
  profileType,
@@ -26,10 +26,10 @@ const GraphTooltipArrowContent = ({ table, profileType, unit, total, totalUnfilt
26
26
  ? name
27
27
  : locationAddress !== 0n
28
28
  ? hexifyAddress(locationAddress)
29
- : 'unknown' })) }), _jsx("table", { className: "my-2 w-full table-fixed pr-0 text-gray-700 dark:text-gray-300", children: _jsxs("tbody", { children: [_jsxs("tr", { children: [_jsx("td", { className: "w-1/4", children: "Cumulative" }), _jsx("td", { className: "w-3/4", children: _jsx("div", { children: cumulativeText }) })] }), (profileType?.delta ?? false) ? (_jsxs("tr", { children: [_jsx("td", { className: "w-1/4" }), _jsx("td", { className: "w-3/4", children: _jsx("div", { children: cumulativePerSecondText }) })] })) : (_jsx(_Fragment, {})), _jsxs("tr", { children: [_jsx("td", { className: "w-1/4 pt-2", children: "Flat" }), _jsx("td", { className: "w-3/4 pt-2", children: _jsx("div", { children: flatText }) })] }), (profileType?.delta ?? false) ? (_jsxs("tr", { children: [_jsx("td", { className: "w-1/4" }), _jsx("td", { className: "w-3/4", children: _jsx("div", { children: flatPerSecondText }) })] })) : (_jsx(_Fragment, {})), diff !== 0n && (_jsxs("tr", { children: [_jsx("td", { className: "w-1/4 pt-2", children: "Diff" }), _jsx("td", { className: "w-3/4 pt-2", children: _jsx("div", { children: diffText }) })] })), _jsx(TooltipMetaInfo, { table: table, row: rowNumber, navigateTo: navigateTo })] }) })] }) }), _jsxs("div", { className: "flex w-full items-center gap-1 text-xs text-gray-500", children: [_jsx(Icon, { icon: "iconoir:mouse-button-right" }), _jsx("div", { children: "Right click to show context menu" })] })] }) }) }));
29
+ : 'unknown' })) }), _jsx("table", { className: "my-2 w-full table-fixed pr-0 text-gray-700 dark:text-gray-300", children: _jsxs("tbody", { children: [_jsxs("tr", { children: [_jsx("td", { className: "w-1/4", children: "Cumulative" }), _jsx("td", { className: "w-3/4", children: _jsx("div", { children: cumulativeText }) })] }), (profileType?.delta ?? false) ? (_jsxs("tr", { children: [_jsx("td", { className: "w-1/4" }), _jsx("td", { className: "w-3/4", children: _jsx("div", { children: cumulativePerSecondText }) })] })) : (_jsx(_Fragment, {})), _jsxs("tr", { children: [_jsx("td", { className: "w-1/4 pt-2", children: "Flat" }), _jsx("td", { className: "w-3/4 pt-2", children: _jsx("div", { children: flatText }) })] }), (profileType?.delta ?? false) ? (_jsxs("tr", { children: [_jsx("td", { className: "w-1/4" }), _jsx("td", { className: "w-3/4", children: _jsx("div", { children: flatPerSecondText }) })] })) : (_jsx(_Fragment, {})), diff !== 0n && (_jsxs("tr", { children: [_jsx("td", { className: "w-1/4 pt-2", children: "Diff" }), _jsx("td", { className: "w-3/4 pt-2", children: _jsx("div", { children: diffText }) })] })), _jsx(TooltipMetaInfo, { table: table, row: rowNumber })] }) })] }) }), _jsxs("div", { className: "flex w-full items-center gap-1 text-xs text-gray-500", children: [_jsx(Icon, { icon: "iconoir:mouse-button-right" }), _jsx("div", { children: "Right click to show context menu" })] })] }) }) }));
30
30
  };
31
- const TooltipMetaInfo = ({ table, row, navigateTo, }) => {
32
- const { labelPairs, functionFilename, file, locationAddress, mappingFile, mappingBuildID, inlined, } = useGraphTooltipMetaInfo({ table, row, navigateTo });
31
+ const TooltipMetaInfo = ({ table, row }) => {
32
+ const { labelPairs, functionFilename, file, locationAddress, mappingFile, mappingBuildID, inlined, } = useGraphTooltipMetaInfo({ table, row });
33
33
  const labels = labelPairs.map((l) => (_jsx("span", { className: "mr-3 inline-block rounded-lg bg-gray-200 px-2 py-1 text-xs font-bold text-gray-700 dark:bg-gray-700 dark:text-gray-400", children: `${l[0]}="${l[1]}"` }, l[0])));
34
34
  const isMappingBuildIDAvailable = mappingBuildID !== null && mappingBuildID !== '';
35
35
  const inlinedText = inlined === null ? 'merged' : inlined ? 'yes' : 'no';
@@ -27,7 +27,7 @@ const NoData = () => {
27
27
  };
28
28
  export const DockedGraphTooltip = ({ table, total, totalUnfiltered, row, level, profileType, unit, }) => {
29
29
  let { width } = useWindowSize();
30
- const { profileExplorer, navigateTo } = useParcaContext();
30
+ const { profileExplorer } = useParcaContext();
31
31
  const { PaddingX } = profileExplorer ?? { PaddingX: 0 };
32
32
  width = width - PaddingX - 24;
33
33
  const graphTooltipData = useGraphTooltip({
@@ -39,7 +39,7 @@ export const DockedGraphTooltip = ({ table, total, totalUnfiltered, row, level,
39
39
  row,
40
40
  level,
41
41
  });
42
- const { labelPairs, functionFilename, file, locationAddress, mappingFile, mappingBuildID, inlined, } = useGraphTooltipMetaInfo({ table, row: row ?? 0, navigateTo });
42
+ const { labelPairs, functionFilename, file, locationAddress, mappingFile, mappingBuildID, inlined, } = useGraphTooltipMetaInfo({ table, row: row ?? 0 });
43
43
  if (graphTooltipData === null) {
44
44
  return _jsx(_Fragment, {});
45
45
  }
@@ -1,9 +1,7 @@
1
1
  import { Table } from 'apache-arrow';
2
- import type { NavigateFunction } from '@parca/utilities';
3
2
  interface Props {
4
3
  table: Table<any>;
5
4
  row: number;
6
- navigateTo: NavigateFunction;
7
5
  }
8
6
  interface GraphTooltipMetaInfoData {
9
7
  labelPairs: Array<[string, string]>;
@@ -17,6 +15,6 @@ interface GraphTooltipMetaInfoData {
17
15
  mappingBuildID: string | null;
18
16
  inlined: boolean | null;
19
17
  }
20
- export declare const useGraphTooltipMetaInfo: ({ table, row, navigateTo, }: Props) => GraphTooltipMetaInfoData;
18
+ export declare const useGraphTooltipMetaInfo: ({ table, row }: Props) => GraphTooltipMetaInfoData;
21
19
  export {};
22
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/GraphTooltipArrow/useGraphTooltipMetaInfo/index.ts"],"names":[],"mappings":"AAaA,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AAInC,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAiBvD,UAAU,KAAK;IACb,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,gBAAgB,CAAC;CAC9B;AAED,UAAU,wBAAwB;IAChC,UAAU,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACpC,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;CACzB;AAED,eAAO,MAAM,uBAAuB,gCAIjC,KAAK,KAAG,wBAwGV,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/GraphTooltipArrow/useGraphTooltipMetaInfo/index.ts"],"names":[],"mappings":"AAaA,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AAoBnC,UAAU,KAAK;IACb,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,UAAU,wBAAwB;IAChC,UAAU,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACpC,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;CACzB;AAED,eAAO,MAAM,uBAAuB,mBAAkB,KAAK,KAAG,wBA8F7D,CAAC"}
@@ -16,7 +16,7 @@ import { FIELD_FUNCTION_FILE_NAME, FIELD_FUNCTION_START_LINE, FIELD_FUNCTION_SYS
16
16
  import { arrowToString } from '../../ProfileIcicleGraph/IcicleGraphArrow/utils';
17
17
  import { useProfileViewContext } from '../../ProfileView/ProfileViewContext';
18
18
  import { useQuery } from '../../useQuery';
19
- export const useGraphTooltipMetaInfo = ({ table, row, navigateTo, }) => {
19
+ export const useGraphTooltipMetaInfo = ({ table, row }) => {
20
20
  const mappingFile = arrowToString(table.getChild(FIELD_MAPPING_FILE)?.get(row));
21
21
  const mappingBuildID = arrowToString(table.getChild(FIELD_MAPPING_BUILD_ID)?.get(row));
22
22
  const locationAddress = table.getChild(FIELD_LOCATION_ADDRESS)?.get(row) ?? 0n;
@@ -54,25 +54,15 @@ export const useGraphTooltipMetaInfo = ({ table, row, navigateTo, }) => {
54
54
  arrowToString(table.getChild(field.name)?.get(row)) ?? '',
55
55
  ])
56
56
  .filter(value => value[1] !== '');
57
- const [dashboardItems, setDashboardItems] = useURLState({
58
- param: 'dashboard_items',
59
- navigateTo,
57
+ const [dashboardItems, setDashboardItems] = useURLState('dashboard_items', {
58
+ alwaysReturnArray: true,
60
59
  });
61
60
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
62
- const [unusedBuildId, setSourceBuildId] = useURLState({
63
- param: 'source_buildid',
64
- navigateTo,
65
- });
61
+ const [unusedBuildId, setSourceBuildId] = useURLState('source_buildid');
66
62
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
67
- const [unusedFilename, setSourceFilename] = useURLState({
68
- param: 'source_filename',
69
- navigateTo,
70
- });
63
+ const [unusedFilename, setSourceFilename] = useURLState('source_filename');
71
64
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
72
- const [unusedLine, setSourceLine] = useURLState({
73
- param: 'source_line',
74
- navigateTo,
75
- });
65
+ const [unusedLine, setSourceLine] = useURLState('source_line');
76
66
  const openFile = () => {
77
67
  setDashboardItems([dashboardItems[0], 'source']);
78
68
  if (mappingBuildID != null) {
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileExplorerCompare.d.ts","sourceRoot":"","sources":["../../src/ProfileExplorer/ProfileExplorerCompare.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAGjD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAoB,gBAAgB,EAAsB,MAAM,IAAI,CAAC;AAC5E,OAAwB,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAEnE,UAAU,2BAA2B;IACnC,WAAW,EAAE,kBAAkB,CAAC;IAEhC,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAClC,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAClC,YAAY,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC9C,YAAY,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC9C,cAAc,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACnD,cAAc,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACnD,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAErC,UAAU,EAAE,gBAAgB,CAAC;CAC9B;AAED,QAAA,MAAM,sBAAsB,+IAYzB,2BAA2B,KAAG,GAAG,CAAC,OAwEpC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"ProfileExplorerCompare.d.ts","sourceRoot":"","sources":["../../src/ProfileExplorer/ProfileExplorerCompare.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAGjD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAoB,gBAAgB,EAAsB,MAAM,IAAI,CAAC;AAC5E,OAAwB,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAEnE,UAAU,2BAA2B;IACnC,WAAW,EAAE,kBAAkB,CAAC;IAEhC,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAClC,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAClC,YAAY,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC9C,YAAY,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC9C,cAAc,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACnD,cAAc,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACnD,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAErC,UAAU,EAAE,gBAAgB,CAAC;CAC9B;AAED,QAAA,MAAM,sBAAsB,+IAYzB,2BAA2B,KAAG,GAAG,CAAC,OAuEpC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -10,8 +10,8 @@ const ProfileExplorerCompare = ({ queryClient, queryA, queryB, profileA, profile
10
10
  const closeProfileB = () => {
11
11
  closeProfile('B');
12
12
  };
13
- const [compareAbsolute] = useURLState({ param: 'compare_absolute', navigateTo });
14
- const [functionFilter] = useURLState({ param: 'filter_by_function', navigateTo });
15
- return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex justify-between gap-2", children: [_jsx(Card, { className: "mt-2 p-2", children: _jsx(ProfileSelector, { queryClient: queryClient, querySelection: queryA, profileSelection: profileA, selectProfile: selectProfileA, selectQuery: selectQueryA, closeProfile: closeProfileA, enforcedProfileName: '', comparing: true, navigateTo: navigateTo, suffix: "_a" }) }), _jsx(Card, { className: "mt-2 p-2", children: _jsx(ProfileSelector, { queryClient: queryClient, querySelection: queryB, profileSelection: profileB, selectProfile: selectProfileB, selectQuery: selectQueryB, closeProfile: closeProfileB, enforcedProfileName: Query.parse(queryA.expression).profileName(), comparing: true, navigateTo: navigateTo, suffix: "_b" }) })] }), _jsx("div", { className: "grid grid-cols-1", children: profileA != null && profileB != null ? (_jsx("div", { children: _jsx(Card, { className: "mt-2 px-6 py-4", children: _jsx(ProfileViewWithData, { navigateTo: navigateTo, queryClient: queryClient, profileSource: new ProfileDiffSource(profileA.ProfileSource(), profileB.ProfileSource(), Array.isArray(functionFilter) ? functionFilter[0] : functionFilter, compareAbsolute === 'true') }) }) })) : (_jsx("div", { children: _jsx("div", { className: "my-20 text-center", children: _jsx("p", { children: "Select a profile on both sides." }) }) })) })] }));
13
+ const [compareAbsolute] = useURLState('compare_absolute');
14
+ const [functionFilter] = useURLState('filter_by_function');
15
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex justify-between gap-2", children: [_jsx(Card, { className: "mt-2 p-2", children: _jsx(ProfileSelector, { queryClient: queryClient, querySelection: queryA, profileSelection: profileA, selectProfile: selectProfileA, selectQuery: selectQueryA, closeProfile: closeProfileA, enforcedProfileName: '', comparing: true, navigateTo: navigateTo, suffix: "_a" }) }), _jsx(Card, { className: "mt-2 p-2", children: _jsx(ProfileSelector, { queryClient: queryClient, querySelection: queryB, profileSelection: profileB, selectProfile: selectProfileB, selectQuery: selectQueryB, closeProfile: closeProfileB, enforcedProfileName: Query.parse(queryA.expression).profileName(), comparing: true, navigateTo: navigateTo, suffix: "_b" }) })] }), _jsx("div", { className: "grid grid-cols-1", children: profileA != null && profileB != null ? (_jsx("div", { children: _jsx(Card, { className: "mt-2 px-6 py-4", children: _jsx(ProfileViewWithData, { queryClient: queryClient, profileSource: new ProfileDiffSource(profileA.ProfileSource(), profileB.ProfileSource(), Array.isArray(functionFilter) ? functionFilter[0] : functionFilter, compareAbsolute === 'true') }) }) })) : (_jsx("div", { children: _jsx("div", { className: "my-20 text-center", children: _jsx("p", { children: "Select a profile on both sides." }) }) })) })] }));
16
16
  };
17
17
  export default ProfileExplorerCompare;
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileExplorerSingle.d.ts","sourceRoot":"","sources":["../../src/ProfileExplorer/ProfileExplorerSingle.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAEjD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAC,gBAAgB,EAAsB,MAAM,IAAI,CAAC;AACzD,OAAwB,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAEnE,UAAU,0BAA0B;IAClC,WAAW,EAAE,kBAAkB,CAAC;IAChC,KAAK,EAAE,cAAc,CAAC;IACtB,WAAW,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC7C,aAAa,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAClD,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACjC,UAAU,EAAE,gBAAgB,CAAC;CAC9B;AAED,QAAA,MAAM,qBAAqB,6EAOxB,0BAA0B,KAAG,GAAG,CAAC,OA8BnC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"ProfileExplorerSingle.d.ts","sourceRoot":"","sources":["../../src/ProfileExplorer/ProfileExplorerSingle.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAEjD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAC,gBAAgB,EAAsB,MAAM,IAAI,CAAC;AACzD,OAAwB,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAEnE,UAAU,0BAA0B;IAClC,WAAW,EAAE,kBAAkB,CAAC;IAChC,KAAK,EAAE,cAAc,CAAC;IACtB,WAAW,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC7C,aAAa,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAClD,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACjC,UAAU,EAAE,gBAAgB,CAAC;CAC9B;AAED,QAAA,MAAM,qBAAqB,6EAOxB,0BAA0B,KAAG,GAAG,CAAC,OA0BnC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -3,6 +3,6 @@ import { Card } from '@parca/components';
3
3
  import { ProfileViewWithData } from '..';
4
4
  import ProfileSelector from '../ProfileSelector';
5
5
  const ProfileExplorerSingle = ({ queryClient, query, selectQuery, selectProfile, profile, navigateTo, }) => {
6
- return (_jsxs(_Fragment, { children: [_jsx(Card, { className: "mt-2 px-6 py-4", children: _jsx(ProfileSelector, { queryClient: queryClient, querySelection: query, selectQuery: selectQuery, selectProfile: selectProfile, closeProfile: () => { }, profileSelection: profile, comparing: false, enforcedProfileName: '', navigateTo: navigateTo, suffix: "_a" }) }), profile != null ? (_jsx(Card, { className: "mt-2 px-6 py-4", children: _jsx(ProfileViewWithData, { queryClient: queryClient, profileSource: profile.ProfileSource(), navigateTo: navigateTo }) })) : (_jsx(_Fragment, {}))] }));
6
+ return (_jsxs(_Fragment, { children: [_jsx(Card, { className: "mt-2 px-6 py-4", children: _jsx(ProfileSelector, { queryClient: queryClient, querySelection: query, selectQuery: selectQuery, selectProfile: selectProfile, closeProfile: () => { }, profileSelection: profile, comparing: false, enforcedProfileName: '', navigateTo: navigateTo, suffix: "_a" }) }), profile != null ? (_jsx(Card, { className: "mt-2 px-6 py-4", children: _jsx(ProfileViewWithData, { queryClient: queryClient, profileSource: profile.ProfileSource() }) })) : (_jsx(_Fragment, {}))] }));
7
7
  };
8
8
  export default ProfileExplorerSingle;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileExplorer/index.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAGjD,OAAO,EAA4B,KAAK,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAQlF,UAAU,oBAAoB;IAC5B,WAAW,EAAE,kBAAkB,CAAC;IAChC,WAAW,EAAE,GAAG,CAAC;IACjB,UAAU,EAAE,gBAAgB,CAAC;CAC9B;AAaD,eAAO,MAAM,sBAAsB,eAAgB,MAAM,GAAG,EAAE,KAAG,MAGhE,CAAC;AAyWF,QAAA,MAAM,eAAe,8CAIlB,oBAAoB,KAAG,GAAG,CAAC,OAkB7B,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileExplorer/index.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAGjD,OAAO,EAA4B,KAAK,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAQlF,UAAU,oBAAoB;IAC5B,WAAW,EAAE,kBAAkB,CAAC;IAChC,WAAW,EAAE,GAAG,CAAC;IACjB,UAAU,EAAE,gBAAgB,CAAC;CAC9B;AAaD,eAAO,MAAM,sBAAsB,eAAgB,MAAM,GAAG,EAAE,KAAG,MAGhE,CAAC;AAiWF,QAAA,MAAM,eAAe,8CAIlB,oBAAoB,KAAG,GAAG,CAAC,OAkB7B,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -28,7 +28,6 @@ export const getExpressionAsAString = (expression) => {
28
28
  const x = Array.isArray(expression) ? expression.join() : expression;
29
29
  return x;
30
30
  };
31
- const DEFAULT_DASHBOARD_ITEMS = ['icicle'];
32
31
  /* eslint-disable @typescript-eslint/naming-convention */
33
32
  const sanitizeDateRange = (time_selection_a, from_a, to_a) => {
34
33
  const range = DateTimeRange.fromRangeKey(time_selection_a, from_a, to_a);
@@ -80,7 +79,7 @@ const ProfileExplorerApp = ({ queryClient, queryParams, navigateTo, }) => {
80
79
  }
81
80
  }, [profileTypesError, onError]);
82
81
  /* eslint-disable @typescript-eslint/naming-convention */
83
- let { from_a, to_a, merge_from_a, merge_to_a, time_selection_a, compare_a, sum_by_a, from_b, to_b, merge_from_b, merge_to_b, time_selection_b, compare_b, sum_by_b, filter_by_function, dashboard_items, } = queryParams;
82
+ let { from_a, to_a, merge_from_a, merge_to_a, time_selection_a, compare_a, sum_by_a, from_b, to_b, merge_from_b, merge_to_b, time_selection_b, compare_b, sum_by_b, filter_by_function, } = queryParams;
84
83
  // eslint-disable-next-line @typescript-eslint/naming-convention
85
84
  const expression_a = getExpressionAsAString(queryParams.expression_a);
86
85
  // eslint-disable-next-line @typescript-eslint/naming-convention
@@ -136,7 +135,6 @@ const ProfileExplorerApp = ({ queryClient, queryParams, navigateTo, }) => {
136
135
  return navigateTo('/', {
137
136
  ...queryParams,
138
137
  ...SuffixParams(p.HistoryParams(), suffix),
139
- dashboard_items: dashboard_items ?? DEFAULT_DASHBOARD_ITEMS,
140
138
  });
141
139
  };
142
140
  const selectProfileA = (p) => {
@@ -173,7 +171,6 @@ const ProfileExplorerApp = ({ queryClient, queryParams, navigateTo, }) => {
173
171
  to_a: q.to.toString(),
174
172
  time_selection_a: q.timeSelection,
175
173
  sum_by_a: sumByToParam(q.sumBy),
176
- dashboard_items: dashboard_items ?? DEFAULT_DASHBOARD_ITEMS,
177
174
  ...mergeParams,
178
175
  },
179
176
  }));
@@ -183,7 +180,6 @@ const ProfileExplorerApp = ({ queryClient, queryParams, navigateTo, }) => {
183
180
  return navigateTo('/', {
184
181
  ...queryParams,
185
182
  ...SuffixParams(p.HistoryParams(), '_a'),
186
- dashboard_items: dashboard_items ?? DEFAULT_DASHBOARD_ITEMS,
187
183
  });
188
184
  };
189
185
  return (_jsx(ProfileExplorerSingle, { queryClient: queryClient, query: queryA, profile: profileA, selectQuery: selectQuery, selectProfile: selectProfile, navigateTo: navigateTo }));
@@ -218,7 +214,6 @@ const ProfileExplorerApp = ({ queryClient, queryParams, navigateTo, }) => {
218
214
  time_selection_a: q.timeSelection,
219
215
  sum_by_a: sumByToParam(q.sumBy),
220
216
  filter_by_function: filter_by_function ?? '',
221
- dashboard_items: dashboard_items ?? DEFAULT_DASHBOARD_ITEMS,
222
217
  ...mergeParams,
223
218
  },
224
219
  }));
@@ -246,7 +241,6 @@ const ProfileExplorerApp = ({ queryClient, queryParams, navigateTo, }) => {
246
241
  time_selection_b: q.timeSelection,
247
242
  sum_by_b: sumByToParam(q.sumBy),
248
243
  filter_by_function: filter_by_function ?? '',
249
- dashboard_items: dashboard_items ?? DEFAULT_DASHBOARD_ITEMS,
250
244
  ...mergeParams,
251
245
  },
252
246
  }));
@@ -1,8 +1,6 @@
1
- import type { NavigateFunction } from '@parca/utilities';
2
1
  interface Props {
3
- navigateTo?: NavigateFunction;
4
2
  compareMode?: boolean;
5
3
  }
6
- declare const ColorStackLegend: ({ navigateTo, compareMode }: Props) => JSX.Element;
4
+ declare const ColorStackLegend: ({ compareMode }: Props) => JSX.Element;
7
5
  export default ColorStackLegend;
8
6
  //# sourceMappingURL=ColorStackLegend.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ColorStackLegend.d.ts","sourceRoot":"","sources":["../../../src/ProfileIcicleGraph/IcicleGraph/ColorStackLegend.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAEvD,UAAU,KAAK;IACb,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,QAAA,MAAM,gBAAgB,gCAAuC,KAAK,KAAG,GAAG,CAAC,OAgExE,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"ColorStackLegend.d.ts","sourceRoot":"","sources":["../../../src/ProfileIcicleGraph/IcicleGraph/ColorStackLegend.tsx"],"names":[],"mappings":"AAsBA,UAAU,KAAK;IACb,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,QAAA,MAAM,gBAAgB,oBAA2B,KAAK,KAAG,GAAG,CAAC,OAgE5D,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -17,9 +17,9 @@ import cx from 'classnames';
17
17
  import { useURLState } from '@parca/components';
18
18
  import { USER_PREFERENCES, useUserPreference } from '@parca/hooks';
19
19
  import { EVERYTHING_ELSE, selectStackColors, useAppSelector } from '@parca/store';
20
- const ColorStackLegend = ({ navigateTo, compareMode = false }) => {
20
+ const ColorStackLegend = ({ compareMode = false }) => {
21
21
  const [colorProfileName] = useUserPreference(USER_PREFERENCES.FLAMEGRAPH_COLOR_PROFILE.key);
22
- const [currentSearchString, setSearchString] = useURLState({ param: 'search_string', navigateTo });
22
+ const [currentSearchString, setSearchString] = useURLState('search_string');
23
23
  const stackColors = useAppSelector(selectStackColors);
24
24
  const stackColorArray = useMemo(() => {
25
25
  return Object.entries(stackColors).sort(([featureA], [featureB]) => {
@@ -1,6 +1,5 @@
1
1
  import { Flamegraph } from '@parca/client';
2
2
  import { ProfileType } from '@parca/parser';
3
- import { type NavigateFunction } from '@parca/utilities';
4
3
  interface IcicleGraphProps {
5
4
  graph: Flamegraph;
6
5
  total: bigint;
@@ -9,7 +8,6 @@ interface IcicleGraphProps {
9
8
  width?: number;
10
9
  curPath: string[];
11
10
  setCurPath: (path: string[]) => void;
12
- navigateTo?: NavigateFunction;
13
11
  }
14
12
  export declare const IcicleGraph: import("react").NamedExoticComponent<IcicleGraphProps>;
15
13
  export default IcicleGraph;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ProfileIcicleGraph/IcicleGraph/index.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAgC,KAAK,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAQtF,UAAU,gBAAgB;IACxB,KAAK,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACrC,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAED,eAAO,MAAM,WAAW,wDAsFtB,CAAC;AAEH,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ProfileIcicleGraph/IcicleGraph/index.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAU1C,UAAU,gBAAgB;IACxB,KAAK,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CACtC;AAED,eAAO,MAAM,WAAW,wDAmFtB,CAAC;AAEH,eAAe,WAAW,CAAC"}
@@ -12,6 +12,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
14
  import { memo, useEffect, useMemo, useRef, useState } from 'react';
15
+ import { useURLState } from '@parca/components';
15
16
  import { setHoveringNode, useAppDispatch } from '@parca/store';
16
17
  import { scaleLinear, selectQueryParam } from '@parca/utilities';
17
18
  import GraphTooltip from '../../GraphTooltip';
@@ -19,13 +20,13 @@ import { useProfileViewContext } from '../../ProfileView/ProfileViewContext';
19
20
  import ColorStackLegend from './ColorStackLegend';
20
21
  import { IcicleNode, RowHeight } from './IcicleGraphNodes';
21
22
  import useColoredGraph from './useColoredGraph';
22
- export const IcicleGraph = memo(function IcicleGraph({ graph, total, filtered, width, setCurPath, curPath, profileType, navigateTo, }) {
23
+ export const IcicleGraph = memo(function IcicleGraph({ graph, total, filtered, width, setCurPath, curPath, profileType, }) {
23
24
  const dispatch = useAppDispatch();
24
25
  const [height, setHeight] = useState(0);
25
26
  const svg = useRef(null);
26
27
  const ref = useRef(null);
27
28
  const coloredGraph = useColoredGraph(graph);
28
- const currentSearchString = selectQueryParam('search_string') ?? '';
29
+ const [currentSearchString] = useURLState('search_string');
29
30
  const { compareMode } = useProfileViewContext();
30
31
  const isColorStackLegendEnabled = selectQueryParam('color_stack_legend') === 'true';
31
32
  useEffect(() => {
@@ -42,6 +43,6 @@ export const IcicleGraph = memo(function IcicleGraph({ graph, total, filtered, w
42
43
  if (coloredGraph.root === undefined || width === undefined) {
43
44
  return _jsx(_Fragment, {});
44
45
  }
45
- return (_jsxs("div", { onMouseLeave: () => dispatch(setHoveringNode(undefined)), children: [isColorStackLegendEnabled && (_jsx(ColorStackLegend, { navigateTo: navigateTo, compareMode: compareMode })), _jsx(GraphTooltip, { unit: profileType?.sampleUnit ?? '', total: total, totalUnfiltered: total + filtered, contextElement: svg.current, strings: coloredGraph.stringTable, mappings: coloredGraph.mapping, locations: coloredGraph.locations, functions: coloredGraph.function }), _jsx("svg", { className: "font-robotoMono", width: width, height: height, preserveAspectRatio: "xMinYMid", ref: svg, children: _jsx("g", { ref: ref, children: _jsx("g", { transform: 'translate(0, 0)', children: _jsx(IcicleNode, { x: 0, y: 0, totalWidth: width, height: RowHeight, setCurPath: setCurPath, curPath: curPath, data: coloredGraph.root, strings: coloredGraph.stringTable, mappings: coloredGraph.mapping, locations: coloredGraph.locations, functions: coloredGraph.function, total: total, xScale: xScale, path: [], level: 0, isRoot: true, searchString: currentSearchString, compareMode: compareMode }) }) }) })] }));
46
+ return (_jsxs("div", { onMouseLeave: () => dispatch(setHoveringNode(undefined)), children: [isColorStackLegendEnabled && _jsx(ColorStackLegend, { compareMode: compareMode }), _jsx(GraphTooltip, { unit: profileType?.sampleUnit ?? '', total: total, totalUnfiltered: total + filtered, contextElement: svg.current, strings: coloredGraph.stringTable, mappings: coloredGraph.mapping, locations: coloredGraph.locations, functions: coloredGraph.function }), _jsx("svg", { className: "font-robotoMono", width: width, height: height, preserveAspectRatio: "xMinYMid", ref: svg, children: _jsx("g", { ref: ref, children: _jsx("g", { transform: 'translate(0, 0)', children: _jsx(IcicleNode, { x: 0, y: 0, totalWidth: width, height: RowHeight, setCurPath: setCurPath, curPath: curPath, data: coloredGraph.root, strings: coloredGraph.stringTable, mappings: coloredGraph.mapping, locations: coloredGraph.locations, functions: coloredGraph.function, total: total, xScale: xScale, path: [], level: 0, isRoot: true, searchString: currentSearchString, compareMode: compareMode }) }) }) })] }));
46
47
  });
47
48
  export default IcicleGraph;
@@ -1,11 +1,9 @@
1
1
  import React from 'react';
2
- import { type NavigateFunction } from '@parca/utilities';
3
2
  interface Props {
4
3
  mappings?: string[];
5
4
  loading?: boolean;
6
- navigateTo?: NavigateFunction;
7
5
  compareMode?: boolean;
8
6
  }
9
- declare const ColorStackLegend: ({ mappings, navigateTo, compareMode, loading, }: Props) => React.JSX.Element;
7
+ declare const ColorStackLegend: ({ mappings, compareMode, loading }: Props) => React.JSX.Element;
10
8
  export default ColorStackLegend;
11
9
  //# sourceMappingURL=ColorStackLegend.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ColorStackLegend.d.ts","sourceRoot":"","sources":["../../../src/ProfileIcicleGraph/IcicleGraphArrow/ColorStackLegend.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgB,MAAM,OAAO,CAAC;AAQrC,OAAO,EAAC,KAAK,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAKvD,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,QAAA,MAAM,gBAAgB,oDAKnB,KAAK,KAAG,KAAK,CAAC,GAAG,CAAC,OA0GpB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"ColorStackLegend.d.ts","sourceRoot":"","sources":["../../../src/ProfileIcicleGraph/IcicleGraphArrow/ColorStackLegend.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgB,MAAM,OAAO,CAAC;AAYrC,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,QAAA,MAAM,gBAAgB,uCAA8C,KAAK,KAAG,KAAK,CAAC,GAAG,CAAC,OA8FrF,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -19,13 +19,13 @@ import { USER_PREFERENCES, useCurrentColorProfile, useUserPreference } from '@pa
19
19
  import { EVERYTHING_ELSE, selectDarkMode, useAppSelector } from '@parca/store';
20
20
  import { getMappingColors } from '.';
21
21
  import useMappingList from './useMappingList';
22
- const ColorStackLegend = ({ mappings, navigateTo, compareMode = false, loading, }) => {
22
+ const ColorStackLegend = ({ mappings, compareMode = false, loading }) => {
23
23
  const isDarkMode = useAppSelector(selectDarkMode);
24
24
  const currentColorProfile = useCurrentColorProfile();
25
25
  const [colorProfileName] = useUserPreference(USER_PREFERENCES.FLAMEGRAPH_COLOR_PROFILE.key);
26
- const [currentSearchString, setSearchString] = useURLState({
27
- param: 'binary_frame_filter',
28
- navigateTo,
26
+ const [currentSearchString, setSearchString] = useURLState('binary_frame_filter', {
27
+ alwaysReturnArray: true,
28
+ defaultValue: [],
29
29
  });
30
30
  const mappingsList = useMappingList(mappings);
31
31
  const mappingColors = useMemo(() => {
@@ -52,10 +52,10 @@ const ColorStackLegend = ({ mappings, navigateTo, compareMode = false, loading,
52
52
  if (colorProfileName === 'default' || compareMode) {
53
53
  return _jsx(_Fragment, {});
54
54
  }
55
- return (_jsx("div", { className: "my-4 flex w-full flex-wrap justify-start", children: stackColorArray.map(([feature, color]) => {
55
+ return (_jsx("div", { className: "my-4 flex w-full flex-wrap justify-start column-gap-2", children: stackColorArray.map(([feature, color]) => {
56
56
  const filteringAllowed = feature !== EVERYTHING_ELSE;
57
57
  const isHighlighted = currentSearchString !== undefined ? currentSearchString.includes(feature) : false;
58
- return (_jsxs("div", { className: cx('flex-no-wrap mb-1 flex w-1/5 items-center justify-between text-ellipsis p-1', {
58
+ return (_jsxs("div", { className: cx('flex-no-wrap mb-1 flex w-[19.25%] items-center justify-between text-ellipsis p-1', {
59
59
  'cursor-pointer': filteringAllowed,
60
60
  'bg-gray-200 dark:bg-gray-800': isHighlighted,
61
61
  }), onClick: () => {
@@ -63,23 +63,11 @@ const ColorStackLegend = ({ mappings, navigateTo, compareMode = false, loading,
63
63
  return;
64
64
  }
65
65
  // Check if the current search string is defined and an array
66
- const updatedSearchString = Array.isArray(currentSearchString)
67
- ? [...currentSearchString, feature] // If array, append the feature
68
- : // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
69
- currentSearchString // If not array, preserve current value
70
- ? currentSearchString.split(',') // If string, split by commas
71
- : [feature]; // If undefined, initialize array with feature
66
+ const updatedSearchString = [...currentSearchString, feature]; // If array, append the feature
72
67
  setSearchString(updatedSearchString);
73
68
  }, children: [_jsxs("div", { className: "flex w-11/12 items-center justify-start", children: [_jsx("div", { className: "flex w-5 items-center", children: _jsx("div", { className: "mr-1 inline-block h-4 w-4", style: { backgroundColor: color } }) }), _jsx("div", { className: "shrink overflow-hidden text-ellipsis whitespace-nowrap text-sm hover:whitespace-normal", children: feature })] }), _jsx("div", { className: "flex w-1/12 justify-end", children: isHighlighted && (_jsx(Icon, { icon: "radix-icons:cross-circled", onClick: e => {
74
- let searchString = [];
75
- if (typeof currentSearchString === 'string') {
76
- searchString.push(currentSearchString);
77
- }
78
- else {
79
- searchString = currentSearchString;
80
- }
81
69
  // remove the current feature from the search string array of strings
82
- setSearchString(searchString.filter((f) => f !== feature));
70
+ setSearchString(currentSearchString.filter((f) => f !== feature));
83
71
  e.stopPropagation();
84
72
  } })) })] }, feature));
85
73
  }) }));
@@ -1,6 +1,5 @@
1
1
  import { Table } from 'apache-arrow';
2
2
  import { ProfileType } from '@parca/parser';
3
- import { type NavigateFunction } from '@parca/utilities';
4
3
  interface ContextMenuProps {
5
4
  menuId: string;
6
5
  table: Table<any>;
@@ -10,13 +9,12 @@ interface ContextMenuProps {
10
9
  totalUnfiltered: bigint;
11
10
  row: number;
12
11
  level: number;
13
- navigateTo: NavigateFunction;
14
12
  trackVisibility: (isVisible: boolean) => void;
15
13
  curPath: string[];
16
14
  setCurPath: (path: string[]) => void;
17
15
  hideMenu: () => void;
18
16
  hideBinary: (binaryToRemove: string) => void;
19
17
  }
20
- declare const ContextMenu: ({ menuId, table, total, totalUnfiltered, row, level, navigateTo, trackVisibility, curPath, setCurPath, hideMenu, profileType, unit, hideBinary, }: ContextMenuProps) => JSX.Element;
18
+ declare const ContextMenu: ({ menuId, table, total, totalUnfiltered, row, level, trackVisibility, curPath, setCurPath, hideMenu, profileType, unit, hideBinary, }: ContextMenuProps) => JSX.Element;
21
19
  export default ContextMenu;
22
20
  //# sourceMappingURL=ContextMenu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../src/ProfileIcicleGraph/IcicleGraphArrow/ContextMenu.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AAMnC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAc,KAAK,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAMpE,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,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,gBAAgB,CAAC;IAC7B,eAAe,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACrC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AAED,QAAA,MAAM,WAAW,sJAed,gBAAgB,KAAG,GAAG,CAAC,OA4JzB,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../../src/ProfileIcicleGraph/IcicleGraphArrow/ContextMenu.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AAMnC,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,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACrC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AAED,QAAA,MAAM,WAAW,0IAcd,gBAAgB,KAAG,GAAG,CAAC,OA4JzB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -20,7 +20,7 @@ import { getLastItem } from '@parca/utilities';
20
20
  import { useGraphTooltip } from '../../GraphTooltipArrow/useGraphTooltip';
21
21
  import { useGraphTooltipMetaInfo } from '../../GraphTooltipArrow/useGraphTooltipMetaInfo';
22
22
  import { hexifyAddress, truncateString } from '../../utils';
23
- const ContextMenu = ({ menuId, table, total, totalUnfiltered, row, level, navigateTo, trackVisibility, curPath, setCurPath, hideMenu, profileType, unit, hideBinary, }) => {
23
+ const ContextMenu = ({ menuId, table, total, totalUnfiltered, row, level, trackVisibility, curPath, setCurPath, hideMenu, profileType, unit, hideBinary, }) => {
24
24
  const { isDarkMode } = useParcaContext();
25
25
  const { enableSourcesView } = useParcaContext();
26
26
  const [isGraphTooltipDocked, setIsDocked] = useUserPreference(USER_PREFERENCES.GRAPH_METAINFO_DOCKED.key);
@@ -33,7 +33,7 @@ const ContextMenu = ({ menuId, table, total, totalUnfiltered, row, level, naviga
33
33
  row,
34
34
  level,
35
35
  });
36
- const { functionFilename, functionSystemName, file, openFile, isSourceAvailable, locationAddress, mappingFile, mappingBuildID, inlined, } = useGraphTooltipMetaInfo({ table, row, navigateTo });
36
+ const { functionFilename, functionSystemName, file, openFile, isSourceAvailable, locationAddress, mappingFile, mappingBuildID, inlined, } = useGraphTooltipMetaInfo({ table, row });
37
37
  if (contextMenuData === null) {
38
38
  return _jsx(_Fragment, {});
39
39
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { FlamegraphArrow } from '@parca/client';
3
3
  import { ProfileType } from '@parca/parser';
4
- import { type ColorConfig, type NavigateFunction } from '@parca/utilities';
4
+ import { type ColorConfig } from '@parca/utilities';
5
5
  import { mappingColors } from './IcicleGraphNodes';
6
6
  export declare const FIELD_LABELS_ONLY = "labels_only";
7
7
  export declare const FIELD_MAPPING_FILE = "mapping_file";
@@ -29,7 +29,6 @@ interface IcicleGraphArrowProps {
29
29
  width?: number;
30
30
  curPath: string[];
31
31
  setCurPath: (path: string[]) => void;
32
- navigateTo?: NavigateFunction;
33
32
  sortBy: string;
34
33
  flamegraphLoading: boolean;
35
34
  isHalfScreen: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ProfileIcicleGraph/IcicleGraphArrow/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgE,MAAM,OAAO,CAAC;AAKrF,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAG9C,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAQ1C,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACtB,MAAM,kBAAkB,CAAC;AAO1B,OAAO,EAAwB,aAAa,EAAC,MAAM,oBAAoB,CAAC;AAGxE,eAAO,MAAM,iBAAiB,gBAAgB,CAAC;AAC/C,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AACjD,eAAO,MAAM,sBAAsB,qBAAqB,CAAC;AACzD,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,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,OAAO,CAAC;IAC3B,YAAY,EAAE,OAAO,CAAC;IACtB,wBAAwB,EAAE,MAAM,EAAE,CAAC;CACpC;AAED,eAAO,MAAM,gBAAgB,iBACb,MAAM,EAAE,cACV,OAAO,uBACE,WAAW,KAC/B,aAQF,CAAC;AAIF,eAAO,MAAM,gBAAgB,mDA4P3B,CAAC;AAEH,eAAe,gBAAgB,CAAC"}
@@ -17,7 +17,7 @@ import { useContextMenu } from 'react-contexify';
17
17
  import { useURLState } from '@parca/components';
18
18
  import { USER_PREFERENCES, useCurrentColorProfile, useUserPreference } from '@parca/hooks';
19
19
  import { getColorForFeature, selectDarkMode, setHoveringNode, useAppDispatch, useAppSelector, } from '@parca/store';
20
- import { getLastItem, scaleLinear, selectQueryParam, } from '@parca/utilities';
20
+ import { getLastItem, scaleLinear } from '@parca/utilities';
21
21
  import GraphTooltipArrow from '../../GraphTooltipArrow';
22
22
  import GraphTooltipArrowContent from '../../GraphTooltipArrow/Content';
23
23
  import { DockedGraphTooltip } from '../../GraphTooltipArrow/DockedGraphTooltip';
@@ -52,7 +52,7 @@ export const getMappingColors = (mappingsList, isDarkMode, currentColorProfile)
52
52
  return colors;
53
53
  };
54
54
  const noop = () => { };
55
- export const IcicleGraphArrow = memo(function IcicleGraphArrow({ arrow, total, filtered, width, setCurPath, curPath, profileType, navigateTo, sortBy, flamegraphLoading, mappingsListFromMetadata, }) {
55
+ export const IcicleGraphArrow = memo(function IcicleGraphArrow({ arrow, total, filtered, width, setCurPath, curPath, profileType, sortBy, flamegraphLoading, mappingsListFromMetadata, }) {
56
56
  const [isContextMenuOpen, setIsContextMenuOpen] = useState(false);
57
57
  const dispatch = useAppDispatch();
58
58
  const [highlightSimilarStacksPreference] = useUserPreference(USER_PREFERENCES.HIGHLIGHT_SIMILAR_STACKS.key);
@@ -67,11 +67,8 @@ export const IcicleGraphArrow = memo(function IcicleGraphArrow({ arrow, total, f
67
67
  const [hoveringName, setHoveringName] = useState(null);
68
68
  const svg = useRef(null);
69
69
  const ref = useRef(null);
70
- const [binaryFrameFilter, setBinaryFrameFilter] = useURLState({
71
- param: 'binary_frame_filter',
72
- navigateTo,
73
- });
74
- const currentSearchString = selectQueryParam('search_string') ?? '';
70
+ const [binaryFrameFilter, setBinaryFrameFilter] = useURLState('binary_frame_filter');
71
+ const [currentSearchString] = useURLState('search_string');
75
72
  const { compareMode } = useProfileViewContext();
76
73
  const currentColorProfile = useCurrentColorProfile();
77
74
  const colorForSimilarNodes = currentColorProfile.colorForSimilarNodes;
@@ -155,7 +152,7 @@ export const IcicleGraphArrow = memo(function IcicleGraphArrow({ arrow, total, f
155
152
  }, []);
156
153
  // useMemo for the root graph as it otherwise renders the whole graph if the hoveringRow changes.
157
154
  const root = useMemo(() => {
158
- return (_jsx("svg", { className: "font-robotoMono", width: width, height: height, preserveAspectRatio: "xMinYMid", ref: svg, onContextMenu: displayMenu, children: _jsx("g", { ref: ref, children: _jsx("g", { transform: 'translate(0, 0)', children: _jsx(IcicleNode, { table: table, row: 0, mappingColors: mappingColors, x: 0, y: 0, totalWidth: width ?? 1, height: RowHeight, setCurPath: setCurPath, curPath: curPath, total: total, xScale: xScale, path: path, level: 0, isRoot: true, searchString: currentSearchString, setHoveringRow: setHoveringRow, setHoveringLevel: highlightSimilarStacksSetLevel, sortBy: sortBy, darkMode: isDarkMode, compareMode: compareMode, profileType: profileType, isContextMenuOpen: isContextMenuOpen, hoveringName: highlightSimilarStacksName, setHoveringName: highlightSimilarStacksSetName, hoveringRow: highlightSimilarStacksRow, colorForSimilarNodes: colorForSimilarNodes, highlightSimilarStacksPreference: highlightSimilarStacksPreference }) }) }) }));
155
+ return (_jsx("svg", { className: "font-robotoMono", width: width, height: height, preserveAspectRatio: "xMinYMid", ref: svg, onContextMenu: displayMenu, children: _jsx("g", { ref: ref, children: _jsx("g", { transform: 'translate(0, 0)', children: _jsx(IcicleNode, { table: table, row: 0, mappingColors: mappingColors, x: 0, y: 0, totalWidth: width ?? 1, height: RowHeight, setCurPath: setCurPath, curPath: curPath, total: total, xScale: xScale, path: path, level: 0, isRoot: true, searchString: currentSearchString ?? '', setHoveringRow: setHoveringRow, setHoveringLevel: highlightSimilarStacksSetLevel, sortBy: sortBy, darkMode: isDarkMode, compareMode: compareMode, profileType: profileType, isContextMenuOpen: isContextMenuOpen, hoveringName: highlightSimilarStacksName, setHoveringName: highlightSimilarStacksSetName, hoveringRow: highlightSimilarStacksRow, colorForSimilarNodes: colorForSimilarNodes, highlightSimilarStacksPreference: highlightSimilarStacksPreference }) }) }) }));
159
156
  }, [
160
157
  width,
161
158
  height,
@@ -180,6 +177,6 @@ export const IcicleGraphArrow = memo(function IcicleGraphArrow({ arrow, total, f
180
177
  highlightSimilarStacksSetLevel,
181
178
  highlightSimilarStacksSetName,
182
179
  ]);
183
- return (_jsx(_Fragment, { children: _jsxs("div", { onMouseLeave: () => dispatch(setHoveringNode(undefined)), children: [_jsx(ContextMenu, { menuId: MENU_ID, table: table, row: hoveringRow ?? 0, level: hoveringLevel ?? 0, total: total, totalUnfiltered: total + filtered, profileType: profileType, navigateTo: navigateTo, trackVisibility: trackVisibility, curPath: curPath, setCurPath: setCurPath, hideMenu: hideAll, hideBinary: hideBinary, unit: arrow.unit }), dockedMetainfo ? (_jsx(DockedGraphTooltip, { table: table, row: hoveringRow, level: hoveringLevel ?? 0, total: total, totalUnfiltered: total + filtered, profileType: profileType, unit: arrow.unit })) : (!isContextMenuOpen && (_jsx(GraphTooltipArrow, { contextElement: svg.current, isContextMenuOpen: isContextMenuOpen, children: _jsx(GraphTooltipArrowContent, { table: table, row: hoveringRow, level: hoveringLevel ?? 0, isFixed: false, total: total, totalUnfiltered: total + filtered, profileType: profileType, navigateTo: navigateTo, unit: arrow.unit }) }))), root] }) }));
180
+ return (_jsx(_Fragment, { children: _jsxs("div", { onMouseLeave: () => dispatch(setHoveringNode(undefined)), children: [_jsx(ContextMenu, { menuId: MENU_ID, table: table, row: hoveringRow ?? 0, level: hoveringLevel ?? 0, total: total, totalUnfiltered: total + filtered, profileType: profileType, trackVisibility: trackVisibility, curPath: curPath, setCurPath: setCurPath, hideMenu: hideAll, hideBinary: hideBinary, unit: arrow.unit }), dockedMetainfo ? (_jsx(DockedGraphTooltip, { table: table, row: hoveringRow, level: hoveringLevel ?? 0, total: total, totalUnfiltered: total + filtered, profileType: profileType, unit: arrow.unit })) : (!isContextMenuOpen && (_jsx(GraphTooltipArrow, { contextElement: svg.current, isContextMenuOpen: isContextMenuOpen, children: _jsx(GraphTooltipArrowContent, { table: table, row: hoveringRow, level: hoveringLevel ?? 0, isFixed: false, total: total, totalUnfiltered: total + filtered, profileType: profileType, unit: arrow.unit }) }))), root] }) }));
184
181
  });
185
182
  export default IcicleGraphArrow;
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Flamegraph, FlamegraphArrow } from '@parca/client';
3
3
  import { ProfileType } from '@parca/parser';
4
- import { type NavigateFunction } from '@parca/utilities';
5
4
  export type ResizeHandler = (width: number, height: number) => void;
6
5
  interface ProfileIcicleGraphProps {
7
6
  width: number;
@@ -12,7 +11,6 @@ interface ProfileIcicleGraphProps {
12
11
  profileType?: ProfileType;
13
12
  curPath: string[] | [];
14
13
  setNewCurPath: (path: string[]) => void;
15
- navigateTo?: NavigateFunction;
16
14
  loading: boolean;
17
15
  setActionButtons?: (buttons: React.JSX.Element) => void;
18
16
  error?: any;
@@ -20,6 +18,6 @@ interface ProfileIcicleGraphProps {
20
18
  mappings?: string[];
21
19
  mappingsLoading?: boolean;
22
20
  }
23
- declare const ProfileIcicleGraph: ({ graph, arrow, total, filtered, curPath, setNewCurPath, profileType, navigateTo, loading, setActionButtons, error, width, isHalfScreen, mappings, }: ProfileIcicleGraphProps) => JSX.Element;
21
+ declare const ProfileIcicleGraph: ({ graph, arrow, total, filtered, curPath, setNewCurPath, profileType, loading, setActionButtons, error, width, isHalfScreen, mappings, }: ProfileIcicleGraphProps) => JSX.Element;
24
22
  export default ProfileIcicleGraph;
25
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileIcicleGraph/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAKvE,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,eAAe,CAAC;AAS1D,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,kBAAkB,CAAC;AAa1B,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;AAEpE,UAAU,uBAAuB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;IACvB,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACxC,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,KAAK,IAAI,CAAC;IACxD,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAgJD,QAAA,MAAM,kBAAkB,yJAer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