@parca/profile 0.19.140 → 0.19.142
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 +5 -1
- package/dist/GraphTooltipArrow/Content.js +224 -30
- package/dist/GraphTooltipArrow/DockedGraphTooltip/index.js +192 -33
- package/dist/GraphTooltipArrow/ExpandOnHoverValue.js +53 -3
- package/dist/GraphTooltipArrow/index.d.ts.map +1 -1
- package/dist/GraphTooltipArrow/index.js +86 -56
- package/dist/GraphTooltipArrow/useGraphTooltip/index.js +37 -37
- package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.d.ts.map +1 -1
- package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.js +104 -72
- package/dist/MatchersInput/SuggestionItem.js +91 -12
- package/dist/MatchersInput/SuggestionsList.d.ts +2 -1
- package/dist/MatchersInput/SuggestionsList.d.ts.map +1 -1
- package/dist/MatchersInput/SuggestionsList.js +371 -157
- package/dist/MatchersInput/SuggestionsList.test.d.ts +2 -0
- package/dist/MatchersInput/SuggestionsList.test.d.ts.map +1 -0
- package/dist/MatchersInput/index.js +308 -115
- package/dist/MetricsCircle/index.js +39 -3
- package/dist/MetricsGraph/MetricsContextMenu/index.js +119 -19
- package/dist/MetricsGraph/MetricsInfoPanel/index.js +81 -20
- package/dist/MetricsGraph/MetricsTooltip/index.d.ts.map +1 -1
- package/dist/MetricsGraph/MetricsTooltip/index.js +107 -74
- package/dist/MetricsGraph/index.js +552 -203
- package/dist/MetricsGraph/useMetricsGraphDimensions.js +46 -25
- package/dist/MetricsGraph/utils/colorMapping.js +24 -17
- package/dist/MetricsSeries/index.js +70 -7
- package/dist/PreSelectedMatchers/index.d.ts.map +1 -1
- package/dist/PreSelectedMatchers/index.js +249 -102
- package/dist/ProfileExplorer/ProfileExplorerCompare.d.ts.map +1 -1
- package/dist/ProfileExplorer/ProfileExplorerCompare.js +241 -45
- package/dist/ProfileExplorer/ProfileExplorerSingle.js +98 -11
- package/dist/ProfileExplorer/index.js +183 -32
- package/dist/ProfileFlameChart/SamplesStrips/SamplesGraph/index.js +333 -148
- package/dist/ProfileFlameChart/SamplesStrips/SamplesStrips.stories.js +69 -35
- package/dist/ProfileFlameChart/SamplesStrips/index.d.ts +2 -2
- package/dist/ProfileFlameChart/SamplesStrips/index.d.ts.map +1 -1
- package/dist/ProfileFlameChart/SamplesStrips/index.js +645 -134
- package/dist/ProfileFlameChart/SamplesStrips/labelSetUtils.js +114 -55
- package/dist/ProfileFlameChart/index.d.ts.map +1 -1
- package/dist/ProfileFlameChart/index.js +267 -129
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.js +288 -89
- package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenuWrapper.js +56 -20
- package/dist/ProfileFlameGraph/FlameGraphArrow/FlameGraphNodes.js +211 -140
- package/dist/ProfileFlameGraph/FlameGraphArrow/MemoizedTooltip.js +133 -38
- package/dist/ProfileFlameGraph/FlameGraphArrow/MiniMap.js +261 -216
- package/dist/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.js +72 -47
- package/dist/ProfileFlameGraph/FlameGraphArrow/TooltipContext.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/TooltipContext.js +58 -28
- package/dist/ProfileFlameGraph/FlameGraphArrow/ZoomControls.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/ZoomControls.js +59 -8
- package/dist/ProfileFlameGraph/FlameGraphArrow/index.js +396 -179
- package/dist/ProfileFlameGraph/FlameGraphArrow/useBatchedRendering.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/FlameGraphArrow/useBatchedRendering.js +68 -50
- package/dist/ProfileFlameGraph/FlameGraphArrow/useMappingList.js +62 -38
- package/dist/ProfileFlameGraph/FlameGraphArrow/useNodeColor.js +14 -6
- package/dist/ProfileFlameGraph/FlameGraphArrow/useScrollViewport.js +124 -82
- package/dist/ProfileFlameGraph/FlameGraphArrow/useVisibleNodes.js +160 -98
- package/dist/ProfileFlameGraph/FlameGraphArrow/useZoom.js +232 -112
- package/dist/ProfileFlameGraph/FlameGraphArrow/utils.js +137 -114
- package/dist/ProfileFlameGraph/benchmarks/benchdata/populateData.js +85 -0
- package/dist/ProfileFlameGraph/index.d.ts.map +1 -1
- package/dist/ProfileFlameGraph/index.js +324 -150
- package/dist/ProfileMetricsGraph/hooks/useQueryRange.js +140 -32
- package/dist/ProfileMetricsGraph/index.d.ts.map +1 -1
- package/dist/ProfileMetricsGraph/index.js +519 -258
- package/dist/ProfileSelector/CompareButton.js +132 -12
- package/dist/ProfileSelector/MetricsGraphSection.d.ts.map +1 -1
- package/dist/ProfileSelector/MetricsGraphSection.js +236 -64
- package/dist/ProfileSelector/index.d.ts.map +1 -1
- package/dist/ProfileSelector/index.js +727 -141
- package/dist/ProfileSelector/useAutoQuerySelector.js +249 -130
- package/dist/ProfileSource.js +230 -163
- package/dist/ProfileTypeSelector/index.js +214 -125
- package/dist/ProfileView/components/ActionButtons/GroupByDropdown.js +50 -4
- package/dist/ProfileView/components/ActionButtons/SortByDropdown.d.ts.map +1 -1
- package/dist/ProfileView/components/ActionButtons/SortByDropdown.js +141 -35
- package/dist/ProfileView/components/ColorStackLegend.d.ts.map +1 -1
- package/dist/ProfileView/components/ColorStackLegend.js +185 -55
- package/dist/ProfileView/components/DashboardItems/index.js +87 -28
- package/dist/ProfileView/components/DashboardLayout/index.js +108 -16
- package/dist/ProfileView/components/DiffLegend.js +172 -29
- package/dist/ProfileView/components/GroupByLabelsDropdown/index.js +199 -55
- package/dist/ProfileView/components/InvertCallStack/index.d.ts.map +1 -1
- package/dist/ProfileView/components/InvertCallStack/index.js +100 -12
- package/dist/ProfileView/components/ProfileFilters/filterPresets.js +260 -315
- package/dist/ProfileView/components/ProfileFilters/index.js +518 -215
- package/dist/ProfileView/components/ProfileFilters/useProfileFilters.js +370 -306
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.d.ts +2 -1
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.d.ts.map +1 -1
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.js +188 -118
- package/dist/ProfileView/components/ProfileHeader/index.js +105 -11
- package/dist/ProfileView/components/ShareButton/ResultBox.js +119 -16
- package/dist/ProfileView/components/ShareButton/index.js +352 -62
- package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.d.ts.map +1 -1
- package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.js +678 -194
- package/dist/ProfileView/components/Toolbars/SwitchMenuItem.js +94 -7
- package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.d.ts.map +1 -1
- package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.js +199 -157
- package/dist/ProfileView/components/Toolbars/index.d.ts +2 -2
- package/dist/ProfileView/components/Toolbars/index.d.ts.map +1 -1
- package/dist/ProfileView/components/Toolbars/index.js +441 -21
- package/dist/ProfileView/components/ViewSelector/Dropdown.js +233 -22
- package/dist/ProfileView/components/ViewSelector/index.d.ts.map +1 -1
- package/dist/ProfileView/components/ViewSelector/index.js +212 -86
- package/dist/ProfileView/components/VisualizationContainer/index.d.ts.map +1 -1
- package/dist/ProfileView/components/VisualizationContainer/index.js +52 -7
- package/dist/ProfileView/components/VisualizationPanel.js +185 -8
- package/dist/ProfileView/context/DashboardContext.d.ts.map +1 -1
- package/dist/ProfileView/context/DashboardContext.js +85 -29
- package/dist/ProfileView/context/ProfileViewContext.js +56 -15
- package/dist/ProfileView/hooks/useAutoSelectDimension.js +71 -41
- package/dist/ProfileView/hooks/useProfileMetadata.js +50 -18
- package/dist/ProfileView/hooks/useResetFlameGraphState.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useResetFlameGraphState.js +32 -12
- package/dist/ProfileView/hooks/useResetStateOnProfileTypeChange.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useResetStateOnProfileTypeChange.js +71 -27
- package/dist/ProfileView/hooks/useResetStateOnSeriesChange.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useResetStateOnSeriesChange.js +40 -19
- package/dist/ProfileView/hooks/useVisualizationState.d.ts +3 -3
- package/dist/ProfileView/hooks/useVisualizationState.d.ts.map +1 -1
- package/dist/ProfileView/hooks/useVisualizationState.js +258 -67
- package/dist/ProfileView/index.js +383 -45
- package/dist/ProfileView/types/visualization.js +1 -13
- package/dist/ProfileView/utils/colorUtils.js +8 -7
- package/dist/ProfileViewWithData.d.ts.map +1 -1
- package/dist/ProfileViewWithData.js +332 -228
- package/dist/QueryControls/index.js +418 -47
- package/dist/Sandwich/components/CalleesSection.js +54 -4
- package/dist/Sandwich/components/CallersSection.js +97 -27
- package/dist/Sandwich/components/TableSection.js +77 -4
- package/dist/Sandwich/index.d.ts.map +1 -1
- package/dist/Sandwich/index.js +126 -14
- package/dist/Sandwich/utils/processRowData.js +48 -39
- package/dist/SelectWithRefresh/index.js +102 -28
- package/dist/SimpleMatchers/Select.js +520 -187
- package/dist/SimpleMatchers/index.js +590 -288
- package/dist/SourceView/Highlighter.js +230 -70
- package/dist/SourceView/LineNo.js +72 -17
- package/dist/SourceView/index.d.ts.map +1 -1
- package/dist/SourceView/index.js +178 -104
- package/dist/SourceView/lang-detector/ext-to-lang.json +798 -798
- package/dist/SourceView/lang-detector/index.js +28 -14
- package/dist/SourceView/useSelectedLineRange.d.ts.map +1 -1
- package/dist/SourceView/useSelectedLineRange.js +99 -23
- package/dist/Table/ColorCell.js +42 -1
- package/dist/Table/ColumnsVisibility.js +114 -6
- package/dist/Table/MoreDropdown.d.ts.map +1 -1
- package/dist/Table/MoreDropdown.js +122 -25
- package/dist/Table/TableContextMenu.d.ts.map +1 -1
- package/dist/Table/TableContextMenu.js +151 -137
- package/dist/Table/TableContextMenuWrapper.js +59 -14
- package/dist/Table/hooks/useColorManagement.js +58 -16
- package/dist/Table/hooks/useTableConfiguration.d.ts.map +1 -1
- package/dist/Table/hooks/useTableConfiguration.js +333 -169
- package/dist/Table/index.d.ts.map +1 -1
- package/dist/Table/index.js +222 -128
- package/dist/Table/utils/functions.js +169 -144
- package/dist/Table/utils/topAndBottomExpandedRowModel.js +69 -52
- package/dist/TimelineGuide/index.js +209 -16
- package/dist/TopTable/benchmarks/benchdata/populateData.js +91 -0
- package/dist/TopTable/index.d.ts.map +1 -1
- package/dist/TopTable/index.js +342 -123
- package/dist/contexts/LabelsQueryProvider.js +94 -32
- package/dist/contexts/UnifiedLabelsContext.js +114 -49
- package/dist/contexts/utils.js +37 -15
- package/dist/hooks/useCompareModeMeta.d.ts.map +1 -1
- package/dist/hooks/useCompareModeMeta.js +158 -64
- package/dist/hooks/useLabels.js +295 -52
- package/dist/hooks/useQueryState.d.ts +3 -3
- package/dist/hooks/useQueryState.d.ts.map +1 -1
- package/dist/hooks/useQueryState.js +373 -332
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -8
- package/dist/testdata/fg-diff.json +3750 -0
- package/dist/testdata/fg-simple.json +1879 -0
- package/dist/testdata/link_data.json +56 -0
- package/dist/testdata/tabular.json +30 -0
- package/dist/testdata/test_flamegraph.json +26846 -0
- package/dist/testdata/test_graph.json +53 -0
- package/dist/useDelayedLoader.js +32 -18
- package/dist/useGrpcQuery/index.js +71 -11
- package/dist/useHasProfileData.js +90 -12
- package/dist/useQuery.js +205 -64
- package/dist/useSumBy.d.ts +1 -1
- package/dist/useSumBy.d.ts.map +1 -1
- package/dist/useSumBy.js +294 -138
- package/dist/utils.js +62 -30
- package/package.json +9 -10
- package/src/GraphTooltipArrow/index.tsx +3 -0
- package/src/GraphTooltipArrow/useGraphTooltipMetaInfo/index.ts +13 -11
- package/src/MatchersInput/SuggestionsList.test.tsx +70 -0
- package/src/MatchersInput/SuggestionsList.tsx +11 -10
- package/src/MatchersInput/index.tsx +1 -1
- package/src/MetricsGraph/MetricsTooltip/index.tsx +22 -34
- package/src/PreSelectedMatchers/index.tsx +3 -0
- package/src/ProfileExplorer/ProfileExplorerCompare.tsx +9 -4
- package/src/ProfileFlameChart/SamplesStrips/index.tsx +2 -2
- package/src/ProfileFlameChart/index.tsx +28 -21
- package/src/ProfileFlameGraph/FlameGraphArrow/ContextMenu.tsx +9 -10
- package/src/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.tsx +6 -5
- package/src/ProfileFlameGraph/FlameGraphArrow/TooltipContext.tsx +3 -0
- package/src/ProfileFlameGraph/FlameGraphArrow/ZoomControls.tsx +3 -0
- package/src/ProfileFlameGraph/FlameGraphArrow/useBatchedRendering.ts +3 -0
- package/src/ProfileFlameGraph/index.tsx +9 -6
- package/src/ProfileMetricsGraph/index.tsx +8 -6
- package/src/ProfileSelector/MetricsGraphSection.tsx +10 -5
- package/src/ProfileSelector/index.tsx +61 -39
- package/src/ProfileView/components/ActionButtons/SortByDropdown.tsx +6 -10
- package/src/ProfileView/components/ColorStackLegend.tsx +4 -2
- package/src/ProfileView/components/InvertCallStack/index.tsx +4 -5
- package/src/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.test.tsx +192 -94
- package/src/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.ts +21 -21
- package/src/ProfileView/components/Toolbars/MultiLevelDropdown.tsx +28 -24
- package/src/ProfileView/components/Toolbars/TableColumnsDropdown.tsx +5 -4
- package/src/ProfileView/components/Toolbars/index.tsx +3 -3
- package/src/ProfileView/components/ViewSelector/index.tsx +16 -9
- package/src/ProfileView/components/VisualizationContainer/index.tsx +3 -0
- package/src/ProfileView/context/DashboardContext.tsx +6 -6
- package/src/ProfileView/hooks/useResetFlameGraphState.ts +4 -6
- package/src/ProfileView/hooks/useResetStateOnProfileTypeChange.ts +26 -24
- package/src/ProfileView/hooks/useResetStateOnSeriesChange.ts +8 -16
- package/src/ProfileView/hooks/useVisualizationState.ts +69 -61
- package/src/ProfileViewWithData.tsx +35 -29
- package/src/Sandwich/index.tsx +3 -4
- package/src/SourceView/index.tsx +2 -4
- package/src/SourceView/useSelectedLineRange.ts +19 -34
- package/src/Table/MoreDropdown.tsx +11 -9
- package/src/Table/TableContextMenu.tsx +13 -10
- package/src/Table/hooks/useTableConfiguration.tsx +11 -16
- package/src/Table/index.tsx +21 -12
- package/src/TopTable/index.tsx +4 -3
- package/src/hooks/useCompareModeMeta.ts +91 -61
- package/src/hooks/useQueryState.test.tsx +345 -275
- package/src/hooks/useQueryState.ts +118 -136
- package/src/index.tsx +15 -16
- package/src/useDelayedLoader.ts +10 -10
- package/src/useSumBy.ts +15 -21
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.test.js +0 -455
- package/dist/hooks/urlParsers.d.ts +0 -18
- package/dist/hooks/urlParsers.d.ts.map +0 -1
- package/dist/hooks/urlParsers.js +0 -32
- package/dist/hooks/useColorBy.d.ts +0 -5
- package/dist/hooks/useColorBy.d.ts.map +0 -1
- package/dist/hooks/useColorBy.js +0 -26
- package/dist/hooks/useDashboardItems.d.ts +0 -5
- package/dist/hooks/useDashboardItems.d.ts.map +0 -1
- package/dist/hooks/useDashboardItems.js +0 -27
- package/dist/hooks/useQueryState.test.js +0 -868
- package/src/hooks/urlParsers.ts +0 -38
- package/src/hooks/useColorBy.ts +0 -42
- package/src/hooks/useDashboardItems.ts +0 -46
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,11 @@
|
|
|
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.
|
|
6
|
+
## [0.19.142](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.141...@parca/profile@0.19.142) (2026-04-13)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @parca/profile
|
|
9
|
+
|
|
10
|
+
## [0.19.141](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.140...@parca/profile@0.19.141) (2026-04-13)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @parca/profile
|
|
9
13
|
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react-compiler-runtime";
|
|
2
|
+
// Copyright 2022 The Parca Authors
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
import React from 'react';
|
|
2
16
|
import { Icon } from '@iconify/react';
|
|
3
17
|
import { useParcaContext } from '@parca/components';
|
|
4
18
|
import { formatDateTimeDownToMS, getLastItem } from '@parca/utilities';
|
|
@@ -6,35 +20,215 @@ import { hexifyAddress, truncateString, truncateStringReverse } from '../utils';
|
|
|
6
20
|
import { ExpandOnHover } from './ExpandOnHoverValue';
|
|
7
21
|
import { useGraphTooltip } from './useGraphTooltip';
|
|
8
22
|
import { useGraphTooltipMetaInfo } from './useGraphTooltipMetaInfo';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
total,
|
|
18
|
-
totalUnfiltered,
|
|
19
|
-
row,
|
|
20
|
-
compareAbsolute,
|
|
23
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
+
var NoData = function NoData() {
|
|
25
|
+
var $ = _c(1);
|
|
26
|
+
var t0;
|
|
27
|
+
if ($[0] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
28
|
+
t0 = /*#__PURE__*/_jsx("span", {
|
|
29
|
+
className: "rounded bg-gray-200 px-2 dark:bg-gray-800",
|
|
30
|
+
children: "Not available"
|
|
21
31
|
});
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
32
|
+
$[0] = t0;
|
|
33
|
+
} else {
|
|
34
|
+
t0 = $[0];
|
|
35
|
+
}
|
|
36
|
+
return t0;
|
|
37
|
+
};
|
|
38
|
+
var GraphTooltipArrowContent = function GraphTooltipArrowContent(_ref) {
|
|
39
|
+
var table = _ref.table,
|
|
40
|
+
profileType = _ref.profileType,
|
|
41
|
+
unit = _ref.unit,
|
|
42
|
+
total = _ref.total,
|
|
43
|
+
totalUnfiltered = _ref.totalUnfiltered,
|
|
44
|
+
row = _ref.row,
|
|
45
|
+
isFixed = _ref.isFixed,
|
|
46
|
+
compareAbsolute = _ref.compareAbsolute;
|
|
47
|
+
var graphTooltipData = useGraphTooltip({
|
|
48
|
+
table: table,
|
|
49
|
+
profileType: profileType,
|
|
50
|
+
unit: unit,
|
|
51
|
+
total: total,
|
|
52
|
+
totalUnfiltered: totalUnfiltered,
|
|
53
|
+
row: row,
|
|
54
|
+
compareAbsolute: compareAbsolute
|
|
55
|
+
});
|
|
56
|
+
if (graphTooltipData === null) {
|
|
57
|
+
return /*#__PURE__*/_jsx(_Fragment, {});
|
|
58
|
+
}
|
|
59
|
+
var name = graphTooltipData.name,
|
|
60
|
+
locationAddress = graphTooltipData.locationAddress,
|
|
61
|
+
cumulativeText = graphTooltipData.cumulativeText,
|
|
62
|
+
flatText = graphTooltipData.flatText,
|
|
63
|
+
diffText = graphTooltipData.diffText,
|
|
64
|
+
diff = graphTooltipData.diff,
|
|
65
|
+
rowNumber = graphTooltipData.row;
|
|
66
|
+
return /*#__PURE__*/_jsx("div", {
|
|
67
|
+
className: "flex text-sm ".concat(isFixed ? 'w-full' : ''),
|
|
68
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
69
|
+
className: "m-auto w-full ".concat(isFixed ? 'w-full' : ''),
|
|
70
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
71
|
+
className: "flex w-auto max-w-[600px] min-w-[300px] flex-col justify-start rounded-lg border border-gray-300 bg-gray-50 p-3 shadow-lg dark:border-gray-500 dark:bg-gray-900",
|
|
72
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
73
|
+
className: "flex flex-row",
|
|
74
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
75
|
+
className: "mx-2",
|
|
76
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
77
|
+
className: "flex min-h-10 items-start justify-between gap-4 break-all font-semibold mb-2",
|
|
78
|
+
children: row === 0 ? /*#__PURE__*/_jsx("p", {
|
|
79
|
+
children: "root"
|
|
80
|
+
}) : /*#__PURE__*/_jsx("p", {
|
|
81
|
+
children: name !== '' ? name : locationAddress !== 0n ? hexifyAddress(locationAddress) : 'unknown'
|
|
82
|
+
})
|
|
83
|
+
}), /*#__PURE__*/_jsx("table", {
|
|
84
|
+
className: "my-2 w-full table-fixed pr-0 text-gray-700 dark:text-gray-300",
|
|
85
|
+
children: /*#__PURE__*/_jsxs("tbody", {
|
|
86
|
+
children: [/*#__PURE__*/_jsxs("tr", {
|
|
87
|
+
children: [/*#__PURE__*/_jsx("td", {
|
|
88
|
+
className: "w-1/4",
|
|
89
|
+
children: "Cumulative"
|
|
90
|
+
}), /*#__PURE__*/_jsx("td", {
|
|
91
|
+
className: "w-3/4",
|
|
92
|
+
children: /*#__PURE__*/_jsx("p", {
|
|
93
|
+
children: cumulativeText
|
|
94
|
+
})
|
|
95
|
+
})]
|
|
96
|
+
}), /*#__PURE__*/_jsxs("tr", {
|
|
97
|
+
children: [/*#__PURE__*/_jsx("td", {
|
|
98
|
+
className: "w-1/4 pt-2",
|
|
99
|
+
children: "Flat"
|
|
100
|
+
}), /*#__PURE__*/_jsx("td", {
|
|
101
|
+
className: "w-3/4 pt-2",
|
|
102
|
+
children: /*#__PURE__*/_jsx("p", {
|
|
103
|
+
children: flatText
|
|
104
|
+
})
|
|
105
|
+
})]
|
|
106
|
+
}), diff !== 0n && /*#__PURE__*/_jsxs("tr", {
|
|
107
|
+
children: [/*#__PURE__*/_jsx("td", {
|
|
108
|
+
className: "w-1/4 pt-2",
|
|
109
|
+
children: "Diff"
|
|
110
|
+
}), /*#__PURE__*/_jsx("td", {
|
|
111
|
+
className: "w-3/4 pt-2",
|
|
112
|
+
children: /*#__PURE__*/_jsx("p", {
|
|
113
|
+
children: diffText
|
|
114
|
+
})
|
|
115
|
+
})]
|
|
116
|
+
}), /*#__PURE__*/_jsx(TooltipMetaInfo, {
|
|
117
|
+
table: table,
|
|
118
|
+
row: rowNumber
|
|
119
|
+
})]
|
|
120
|
+
})
|
|
121
|
+
})]
|
|
122
|
+
})
|
|
123
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
124
|
+
className: "flex w-full items-center gap-1 text-xs text-gray-500",
|
|
125
|
+
children: [/*#__PURE__*/_jsx(Icon, {
|
|
126
|
+
icon: "iconoir:mouse-button-right"
|
|
127
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
128
|
+
children: "Right click to show context menu"
|
|
129
|
+
})]
|
|
130
|
+
})]
|
|
131
|
+
})
|
|
132
|
+
})
|
|
133
|
+
});
|
|
31
134
|
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
135
|
+
var TooltipMetaInfo = function TooltipMetaInfo(_ref2) {
|
|
136
|
+
var _ref3;
|
|
137
|
+
var table = _ref2.table,
|
|
138
|
+
row = _ref2.row;
|
|
139
|
+
var _useGraphTooltipMetaI = useGraphTooltipMetaInfo({
|
|
140
|
+
table: table,
|
|
141
|
+
row: row
|
|
142
|
+
}),
|
|
143
|
+
labelPairs = _useGraphTooltipMetaI.labelPairs,
|
|
144
|
+
functionFilename = _useGraphTooltipMetaI.functionFilename,
|
|
145
|
+
file = _useGraphTooltipMetaI.file,
|
|
146
|
+
locationAddress = _useGraphTooltipMetaI.locationAddress,
|
|
147
|
+
mappingFile = _useGraphTooltipMetaI.mappingFile,
|
|
148
|
+
mappingBuildID = _useGraphTooltipMetaI.mappingBuildID,
|
|
149
|
+
inlined = _useGraphTooltipMetaI.inlined,
|
|
150
|
+
timestamp = _useGraphTooltipMetaI.timestamp;
|
|
151
|
+
var _useParcaContext = useParcaContext(),
|
|
152
|
+
timezone = _useParcaContext.timezone;
|
|
153
|
+
var labels = labelPairs.map(function (l) {
|
|
154
|
+
return /*#__PURE__*/_jsx("span", {
|
|
155
|
+
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",
|
|
156
|
+
children: "".concat(l[0], "=\"").concat(l[1], "\"")
|
|
157
|
+
}, l[0]);
|
|
158
|
+
});
|
|
159
|
+
var isMappingBuildIDAvailable = mappingBuildID !== null && mappingBuildID !== '';
|
|
160
|
+
var inlinedText = inlined === null ? 'merged' : inlined ? 'yes' : 'no';
|
|
161
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
162
|
+
children: [timestamp != null && timestamp !== 0n && /*#__PURE__*/_jsxs("tr", {
|
|
163
|
+
children: [/*#__PURE__*/_jsx("td", {
|
|
164
|
+
className: "w-1/4 pt-2",
|
|
165
|
+
children: "Timestamp"
|
|
166
|
+
}), /*#__PURE__*/_jsx("td", {
|
|
167
|
+
className: "w-3/4 pt-2 break-all",
|
|
168
|
+
children: formatDateTimeDownToMS(new Date(Number(timestamp / 1000000n)), timezone)
|
|
169
|
+
})]
|
|
170
|
+
}), /*#__PURE__*/_jsxs("tr", {
|
|
171
|
+
children: [/*#__PURE__*/_jsx("td", {
|
|
172
|
+
className: "w-1/4",
|
|
173
|
+
children: "File"
|
|
174
|
+
}), /*#__PURE__*/_jsx("td", {
|
|
175
|
+
className: "w-3/4 break-all",
|
|
176
|
+
children: functionFilename === '' ? /*#__PURE__*/_jsx(NoData, {}) : /*#__PURE__*/_jsx("div", {
|
|
177
|
+
className: "flex gap-4",
|
|
178
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
179
|
+
className: "whitespace-nowrap text-left",
|
|
180
|
+
children: /*#__PURE__*/_jsx(ExpandOnHover, {
|
|
181
|
+
value: file,
|
|
182
|
+
displayValue: truncateStringReverse(file, 50)
|
|
183
|
+
})
|
|
184
|
+
})
|
|
185
|
+
})
|
|
186
|
+
})]
|
|
187
|
+
}), /*#__PURE__*/_jsxs("tr", {
|
|
188
|
+
children: [/*#__PURE__*/_jsx("td", {
|
|
189
|
+
className: "w-1/4",
|
|
190
|
+
children: "Address"
|
|
191
|
+
}), /*#__PURE__*/_jsx("td", {
|
|
192
|
+
className: "w-3/4 break-all",
|
|
193
|
+
children: locationAddress === 0n ? /*#__PURE__*/_jsx(NoData, {}) : /*#__PURE__*/_jsx("div", {
|
|
194
|
+
children: hexifyAddress(locationAddress)
|
|
195
|
+
})
|
|
196
|
+
})]
|
|
197
|
+
}), /*#__PURE__*/_jsxs("tr", {
|
|
198
|
+
children: [/*#__PURE__*/_jsx("td", {
|
|
199
|
+
className: "w-1/4",
|
|
200
|
+
children: "Inlined"
|
|
201
|
+
}), /*#__PURE__*/_jsx("td", {
|
|
202
|
+
className: "w-3/4 break-all",
|
|
203
|
+
children: inlinedText
|
|
204
|
+
})]
|
|
205
|
+
}), /*#__PURE__*/_jsxs("tr", {
|
|
206
|
+
children: [/*#__PURE__*/_jsx("td", {
|
|
207
|
+
className: "w-1/4",
|
|
208
|
+
children: "Binary"
|
|
209
|
+
}), /*#__PURE__*/_jsx("td", {
|
|
210
|
+
className: "w-3/4 break-all",
|
|
211
|
+
children: (_ref3 = mappingFile != null ? getLastItem(mappingFile) : null) !== null && _ref3 !== void 0 ? _ref3 : /*#__PURE__*/_jsx(NoData, {})
|
|
212
|
+
})]
|
|
213
|
+
}), /*#__PURE__*/_jsxs("tr", {
|
|
214
|
+
children: [/*#__PURE__*/_jsx("td", {
|
|
215
|
+
className: "w-1/4",
|
|
216
|
+
children: "Build Id"
|
|
217
|
+
}), /*#__PURE__*/_jsx("td", {
|
|
218
|
+
className: "w-3/4 break-all",
|
|
219
|
+
children: isMappingBuildIDAvailable ? /*#__PURE__*/_jsx("div", {
|
|
220
|
+
children: truncateString(mappingBuildID, 28)
|
|
221
|
+
}) : /*#__PURE__*/_jsx(NoData, {})
|
|
222
|
+
})]
|
|
223
|
+
}), labelPairs.length > 0 && /*#__PURE__*/_jsxs("tr", {
|
|
224
|
+
children: [/*#__PURE__*/_jsx("td", {
|
|
225
|
+
className: "w-1/4",
|
|
226
|
+
children: "Labels"
|
|
227
|
+
}), /*#__PURE__*/_jsx("td", {
|
|
228
|
+
className: "w-3/4 break-all",
|
|
229
|
+
children: labels
|
|
230
|
+
})]
|
|
231
|
+
})]
|
|
232
|
+
});
|
|
39
233
|
};
|
|
40
|
-
export default GraphTooltipArrowContent;
|
|
234
|
+
export default GraphTooltipArrowContent;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
4
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
|
+
import { c as _c } from "react-compiler-runtime";
|
|
2
6
|
// Copyright 2022 The Parca Authors
|
|
3
7
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
8
|
// you may not use this file except in compliance with the License.
|
|
@@ -11,6 +15,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
11
15
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
16
|
// See the License for the specific language governing permissions and
|
|
13
17
|
// limitations under the License.
|
|
18
|
+
|
|
14
19
|
import { Icon } from '@iconify/react';
|
|
15
20
|
import cx from 'classnames';
|
|
16
21
|
import { useWindowSize } from 'react-use';
|
|
@@ -19,38 +24,192 @@ import { getLastItem } from '@parca/utilities';
|
|
|
19
24
|
import { hexifyAddress, truncateString, truncateStringReverse } from '../../utils';
|
|
20
25
|
import { useGraphTooltip } from '../useGraphTooltip';
|
|
21
26
|
import { useGraphTooltipMetaInfo } from '../useGraphTooltipMetaInfo';
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
28
|
+
var InfoSection = function InfoSection(t0) {
|
|
29
|
+
var $ = _c(11);
|
|
30
|
+
var title = t0.title,
|
|
31
|
+
value = t0.value,
|
|
32
|
+
t1 = t0.minWidth;
|
|
33
|
+
var minWidth = t1 === undefined ? "" : t1;
|
|
34
|
+
var t2 = minWidth != null;
|
|
35
|
+
var t3;
|
|
36
|
+
if ($[0] !== minWidth || $[1] !== t2) {
|
|
37
|
+
t3 = cx("flex shrink-0 flex-col gap-1 p-2", _defineProperty({}, minWidth, t2));
|
|
38
|
+
$[0] = minWidth;
|
|
39
|
+
$[1] = t2;
|
|
40
|
+
$[2] = t3;
|
|
41
|
+
} else {
|
|
42
|
+
t3 = $[2];
|
|
43
|
+
}
|
|
44
|
+
var t4;
|
|
45
|
+
if ($[3] !== title) {
|
|
46
|
+
t4 = /*#__PURE__*/_jsx("p", {
|
|
47
|
+
className: "text-sm font-medium leading-5 text-gray-500 dark:text-gray-400",
|
|
48
|
+
children: title
|
|
49
|
+
});
|
|
50
|
+
$[3] = title;
|
|
51
|
+
$[4] = t4;
|
|
52
|
+
} else {
|
|
53
|
+
t4 = $[4];
|
|
54
|
+
}
|
|
55
|
+
var t5;
|
|
56
|
+
if ($[5] !== value) {
|
|
57
|
+
t5 = /*#__PURE__*/_jsx("div", {
|
|
58
|
+
className: "text-lg font-normal text-gray-900 dark:text-gray-50",
|
|
59
|
+
children: value
|
|
60
|
+
});
|
|
61
|
+
$[5] = value;
|
|
62
|
+
$[6] = t5;
|
|
63
|
+
} else {
|
|
64
|
+
t5 = $[6];
|
|
65
|
+
}
|
|
66
|
+
var t6;
|
|
67
|
+
if ($[7] !== t3 || $[8] !== t4 || $[9] !== t5) {
|
|
68
|
+
t6 = /*#__PURE__*/_jsxs("div", {
|
|
69
|
+
className: t3,
|
|
70
|
+
children: [t4, t5]
|
|
71
|
+
});
|
|
72
|
+
$[7] = t3;
|
|
73
|
+
$[8] = t4;
|
|
74
|
+
$[9] = t5;
|
|
75
|
+
$[10] = t6;
|
|
76
|
+
} else {
|
|
77
|
+
t6 = $[10];
|
|
78
|
+
}
|
|
79
|
+
return t6;
|
|
27
80
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
profileType,
|
|
36
|
-
unit,
|
|
37
|
-
total,
|
|
38
|
-
totalUnfiltered,
|
|
39
|
-
row,
|
|
40
|
-
compareAbsolute,
|
|
81
|
+
var NoData = function NoData() {
|
|
82
|
+
var $ = _c(1);
|
|
83
|
+
var t0;
|
|
84
|
+
if ($[0] === Symbol["for"]("react.memo_cache_sentinel")) {
|
|
85
|
+
t0 = /*#__PURE__*/_jsx("span", {
|
|
86
|
+
className: "rounded bg-gray-200 px-2 dark:bg-gray-800",
|
|
87
|
+
children: "Not available"
|
|
41
88
|
});
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
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])));
|
|
48
|
-
const isMappingBuildIDAvailable = mappingBuildID !== null && mappingBuildID !== '';
|
|
49
|
-
const inlinedText = inlined === null ? 'merged' : inlined ? 'yes' : 'no';
|
|
50
|
-
const addressText = locationAddress !== 0n ? hexifyAddress(locationAddress) : _jsx(NoData, {});
|
|
51
|
-
return (_jsxs("div", { className: "fixed bottom-0 z-20 overflow-hidden rounded-t-lg border-l border-r border-t border-gray-400 bg-white bg-opacity-90 px-8 py-3 dark:border-gray-600 dark:bg-black dark:bg-opacity-80", style: { width }, children: [_jsxs("div", { className: "flex flex-col gap-4", children: [_jsx("div", { className: "flex justify-between gap-4", children: row === 0 ? (_jsx("p", { children: "root" })) : (_jsx("p", { children: name !== ''
|
|
52
|
-
? name
|
|
53
|
-
: locationAddress !== 0n
|
|
54
|
-
? hexifyAddress(locationAddress)
|
|
55
|
-
: 'unknown' })) }), _jsxs("div", { className: "flex justify-between gap-3", children: [_jsx(InfoSection, { title: "Cumulative", value: cumulativeText, minWidth: "w-44" }), _jsx(InfoSection, { title: "Flat", value: flatText, minWidth: "w-44" }), diff !== 0n ? _jsx(InfoSection, { title: "Diff", value: diffText, minWidth: "w-44" }) : null, _jsx(InfoSection, { title: "File", value: functionFilename !== '' ? truncateStringReverse(file, 45) : _jsx(NoData, {}), minWidth: 'w-[460px]' }), _jsx(InfoSection, { title: "Address", value: addressText, minWidth: "w-44" }), _jsx(InfoSection, { title: "Inlined", value: inlinedText, minWidth: "w-44" }), _jsx(InfoSection, { title: "Binary", value: (mappingFile != null ? getLastItem(mappingFile) : null) ?? _jsx(NoData, {}), minWidth: "w-44" }), _jsx(InfoSection, { title: "Build ID", value: isMappingBuildIDAvailable ? (_jsx("div", { children: truncateString(mappingBuildID, 28) })) : (_jsx(NoData, {})) })] }), _jsx("div", { children: _jsx("div", { className: "flex h-5 gap-1", children: labels }) })] }), _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" })] })] }));
|
|
89
|
+
$[0] = t0;
|
|
90
|
+
} else {
|
|
91
|
+
t0 = $[0];
|
|
92
|
+
}
|
|
93
|
+
return t0;
|
|
56
94
|
};
|
|
95
|
+
export var DockedGraphTooltip = function DockedGraphTooltip(_ref) {
|
|
96
|
+
var _ref3;
|
|
97
|
+
var table = _ref.table,
|
|
98
|
+
total = _ref.total,
|
|
99
|
+
totalUnfiltered = _ref.totalUnfiltered,
|
|
100
|
+
row = _ref.row,
|
|
101
|
+
profileType = _ref.profileType,
|
|
102
|
+
unit = _ref.unit,
|
|
103
|
+
compareAbsolute = _ref.compareAbsolute;
|
|
104
|
+
var _useWindowSize = useWindowSize(),
|
|
105
|
+
width = _useWindowSize.width;
|
|
106
|
+
var _useParcaContext = useParcaContext(),
|
|
107
|
+
profileExplorer = _useParcaContext.profileExplorer;
|
|
108
|
+
var _ref2 = profileExplorer !== null && profileExplorer !== void 0 ? profileExplorer : {
|
|
109
|
+
PaddingX: 0
|
|
110
|
+
},
|
|
111
|
+
PaddingX = _ref2.PaddingX;
|
|
112
|
+
width = width - PaddingX - 24;
|
|
113
|
+
var graphTooltipData = useGraphTooltip({
|
|
114
|
+
table: table,
|
|
115
|
+
profileType: profileType,
|
|
116
|
+
unit: unit,
|
|
117
|
+
total: total,
|
|
118
|
+
totalUnfiltered: totalUnfiltered,
|
|
119
|
+
row: row,
|
|
120
|
+
compareAbsolute: compareAbsolute
|
|
121
|
+
});
|
|
122
|
+
var _useGraphTooltipMetaI = useGraphTooltipMetaInfo({
|
|
123
|
+
table: table,
|
|
124
|
+
row: row !== null && row !== void 0 ? row : 0
|
|
125
|
+
}),
|
|
126
|
+
labelPairs = _useGraphTooltipMetaI.labelPairs,
|
|
127
|
+
functionFilename = _useGraphTooltipMetaI.functionFilename,
|
|
128
|
+
file = _useGraphTooltipMetaI.file,
|
|
129
|
+
locationAddress = _useGraphTooltipMetaI.locationAddress,
|
|
130
|
+
mappingFile = _useGraphTooltipMetaI.mappingFile,
|
|
131
|
+
mappingBuildID = _useGraphTooltipMetaI.mappingBuildID,
|
|
132
|
+
inlined = _useGraphTooltipMetaI.inlined;
|
|
133
|
+
if (graphTooltipData === null) {
|
|
134
|
+
return /*#__PURE__*/_jsx(_Fragment, {});
|
|
135
|
+
}
|
|
136
|
+
var name = graphTooltipData.name,
|
|
137
|
+
cumulativeText = graphTooltipData.cumulativeText,
|
|
138
|
+
flatText = graphTooltipData.flatText,
|
|
139
|
+
diffText = graphTooltipData.diffText,
|
|
140
|
+
diff = graphTooltipData.diff;
|
|
141
|
+
var labels = labelPairs.map(function (l) {
|
|
142
|
+
return /*#__PURE__*/_jsx("span", {
|
|
143
|
+
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",
|
|
144
|
+
children: "".concat(l[0], "=\"").concat(l[1], "\"")
|
|
145
|
+
}, l[0]);
|
|
146
|
+
});
|
|
147
|
+
var isMappingBuildIDAvailable = mappingBuildID !== null && mappingBuildID !== '';
|
|
148
|
+
var inlinedText = inlined === null ? 'merged' : inlined ? 'yes' : 'no';
|
|
149
|
+
var addressText = locationAddress !== 0n ? hexifyAddress(locationAddress) : /*#__PURE__*/_jsx(NoData, {});
|
|
150
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
151
|
+
className: "fixed bottom-0 z-20 overflow-hidden rounded-t-lg border-l border-r border-t border-gray-400 bg-white bg-opacity-90 px-8 py-3 dark:border-gray-600 dark:bg-black dark:bg-opacity-80",
|
|
152
|
+
style: {
|
|
153
|
+
width: width
|
|
154
|
+
},
|
|
155
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
156
|
+
className: "flex flex-col gap-4",
|
|
157
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
158
|
+
className: "flex justify-between gap-4",
|
|
159
|
+
children: row === 0 ? /*#__PURE__*/_jsx("p", {
|
|
160
|
+
children: "root"
|
|
161
|
+
}) : /*#__PURE__*/_jsx("p", {
|
|
162
|
+
children: name !== '' ? name : locationAddress !== 0n ? hexifyAddress(locationAddress) : 'unknown'
|
|
163
|
+
})
|
|
164
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
165
|
+
className: "flex justify-between gap-3",
|
|
166
|
+
children: [/*#__PURE__*/_jsx(InfoSection, {
|
|
167
|
+
title: "Cumulative",
|
|
168
|
+
value: cumulativeText,
|
|
169
|
+
minWidth: "w-44"
|
|
170
|
+
}), /*#__PURE__*/_jsx(InfoSection, {
|
|
171
|
+
title: "Flat",
|
|
172
|
+
value: flatText,
|
|
173
|
+
minWidth: "w-44"
|
|
174
|
+
}), diff !== 0n ? /*#__PURE__*/_jsx(InfoSection, {
|
|
175
|
+
title: "Diff",
|
|
176
|
+
value: diffText,
|
|
177
|
+
minWidth: "w-44"
|
|
178
|
+
}) : null, /*#__PURE__*/_jsx(InfoSection, {
|
|
179
|
+
title: "File",
|
|
180
|
+
value: functionFilename !== '' ? truncateStringReverse(file, 45) : /*#__PURE__*/_jsx(NoData, {}),
|
|
181
|
+
minWidth: 'w-[460px]'
|
|
182
|
+
}), /*#__PURE__*/_jsx(InfoSection, {
|
|
183
|
+
title: "Address",
|
|
184
|
+
value: addressText,
|
|
185
|
+
minWidth: "w-44"
|
|
186
|
+
}), /*#__PURE__*/_jsx(InfoSection, {
|
|
187
|
+
title: "Inlined",
|
|
188
|
+
value: inlinedText,
|
|
189
|
+
minWidth: "w-44"
|
|
190
|
+
}), /*#__PURE__*/_jsx(InfoSection, {
|
|
191
|
+
title: "Binary",
|
|
192
|
+
value: (_ref3 = mappingFile != null ? getLastItem(mappingFile) : null) !== null && _ref3 !== void 0 ? _ref3 : /*#__PURE__*/_jsx(NoData, {}),
|
|
193
|
+
minWidth: "w-44"
|
|
194
|
+
}), /*#__PURE__*/_jsx(InfoSection, {
|
|
195
|
+
title: "Build ID",
|
|
196
|
+
value: isMappingBuildIDAvailable ? /*#__PURE__*/_jsx("div", {
|
|
197
|
+
children: truncateString(mappingBuildID, 28)
|
|
198
|
+
}) : /*#__PURE__*/_jsx(NoData, {})
|
|
199
|
+
})]
|
|
200
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
201
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
202
|
+
className: "flex h-5 gap-1",
|
|
203
|
+
children: labels
|
|
204
|
+
})
|
|
205
|
+
})]
|
|
206
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
207
|
+
className: "flex w-full items-center gap-1 text-xs text-gray-500",
|
|
208
|
+
children: [/*#__PURE__*/_jsx(Icon, {
|
|
209
|
+
icon: "iconoir:mouse-button-right"
|
|
210
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
211
|
+
children: "Right click to show context menu"
|
|
212
|
+
})]
|
|
213
|
+
})]
|
|
214
|
+
});
|
|
215
|
+
};
|
|
@@ -1,4 +1,54 @@
|
|
|
1
|
+
import { c as _c } from "react-compiler-runtime"; // Copyright 2022 The Parca Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
1
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
14
|
+
export var ExpandOnHover = function ExpandOnHover(t0) {
|
|
15
|
+
var $ = _c(7);
|
|
16
|
+
var value = t0.value,
|
|
17
|
+
displayValue = t0.displayValue;
|
|
18
|
+
var t1 = displayValue !== null && displayValue !== void 0 ? displayValue : value;
|
|
19
|
+
var t2;
|
|
20
|
+
if ($[0] !== t1) {
|
|
21
|
+
t2 = /*#__PURE__*/_jsx("div", {
|
|
22
|
+
className: "w-full overflow-hidden text-ellipsis whitespace-nowrap",
|
|
23
|
+
children: t1
|
|
24
|
+
});
|
|
25
|
+
$[0] = t1;
|
|
26
|
+
$[1] = t2;
|
|
27
|
+
} else {
|
|
28
|
+
t2 = $[1];
|
|
29
|
+
}
|
|
30
|
+
var t3;
|
|
31
|
+
if ($[2] !== value) {
|
|
32
|
+
t3 = /*#__PURE__*/_jsx("div", {
|
|
33
|
+
className: "absolute -inset-2 hidden h-fit max-w-[500px] whitespace-normal break-all rounded bg-gray-50 p-2 shadow-[0_0_10px_2px_rgba(0,0,0,0.3)] group-hover:flex dark:bg-gray-900 z-10",
|
|
34
|
+
children: value
|
|
35
|
+
});
|
|
36
|
+
$[2] = value;
|
|
37
|
+
$[3] = t3;
|
|
38
|
+
} else {
|
|
39
|
+
t3 = $[3];
|
|
40
|
+
}
|
|
41
|
+
var t4;
|
|
42
|
+
if ($[4] !== t2 || $[5] !== t3) {
|
|
43
|
+
t4 = /*#__PURE__*/_jsxs("div", {
|
|
44
|
+
className: "group relative w-full",
|
|
45
|
+
children: [t2, t3]
|
|
46
|
+
});
|
|
47
|
+
$[4] = t2;
|
|
48
|
+
$[5] = t3;
|
|
49
|
+
$[6] = t4;
|
|
50
|
+
} else {
|
|
51
|
+
t4 = $[6];
|
|
52
|
+
}
|
|
53
|
+
return t4;
|
|
54
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/GraphTooltipArrow/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/GraphTooltipArrow/index.tsx"],"names":[],"mappings":"AAeA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAKjD,UAAU,iBAAiB;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,cAAc,EAAE,OAAO,GAAG,IAAI,CAAC;CAChC;AAmBD,QAAA,MAAM,YAAY,GAAI,8BAA4B,iBAAiB,KAAG,KAAK,CAAC,GAAG,CAAC,OAmD/E,CAAC;AAEF,eAAe,YAAY,CAAC"}
|