@parca/profile 0.19.140 → 0.19.143

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 (182) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/dist/GraphTooltipArrow/Content.js +224 -30
  3. package/dist/GraphTooltipArrow/DockedGraphTooltip/index.js +192 -33
  4. package/dist/GraphTooltipArrow/ExpandOnHoverValue.js +53 -3
  5. package/dist/GraphTooltipArrow/index.d.ts.map +1 -1
  6. package/dist/GraphTooltipArrow/index.js +86 -56
  7. package/dist/GraphTooltipArrow/useGraphTooltip/index.js +37 -37
  8. package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.js +94 -68
  9. package/dist/MatchersInput/SuggestionItem.js +91 -12
  10. package/dist/MatchersInput/SuggestionsList.d.ts +2 -1
  11. package/dist/MatchersInput/SuggestionsList.d.ts.map +1 -1
  12. package/dist/MatchersInput/SuggestionsList.js +371 -157
  13. package/dist/MatchersInput/SuggestionsList.test.d.ts +2 -0
  14. package/dist/MatchersInput/SuggestionsList.test.d.ts.map +1 -0
  15. package/dist/MatchersInput/index.js +308 -115
  16. package/dist/MetricsCircle/index.js +39 -3
  17. package/dist/MetricsGraph/MetricsContextMenu/index.js +119 -19
  18. package/dist/MetricsGraph/MetricsInfoPanel/index.js +81 -20
  19. package/dist/MetricsGraph/MetricsTooltip/index.d.ts.map +1 -1
  20. package/dist/MetricsGraph/MetricsTooltip/index.js +107 -74
  21. package/dist/MetricsGraph/index.js +552 -203
  22. package/dist/MetricsGraph/useMetricsGraphDimensions.js +46 -25
  23. package/dist/MetricsGraph/utils/colorMapping.js +24 -17
  24. package/dist/MetricsSeries/index.js +70 -7
  25. package/dist/PreSelectedMatchers/index.d.ts.map +1 -1
  26. package/dist/PreSelectedMatchers/index.js +249 -102
  27. package/dist/ProfileExplorer/ProfileExplorerCompare.d.ts.map +1 -1
  28. package/dist/ProfileExplorer/ProfileExplorerCompare.js +240 -45
  29. package/dist/ProfileExplorer/ProfileExplorerSingle.js +98 -11
  30. package/dist/ProfileExplorer/index.js +183 -32
  31. package/dist/ProfileFlameChart/SamplesStrips/SamplesGraph/index.js +333 -148
  32. package/dist/ProfileFlameChart/SamplesStrips/SamplesStrips.stories.js +69 -35
  33. package/dist/ProfileFlameChart/SamplesStrips/index.js +645 -134
  34. package/dist/ProfileFlameChart/SamplesStrips/labelSetUtils.js +114 -55
  35. package/dist/ProfileFlameChart/index.js +260 -126
  36. package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.js +283 -85
  37. package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenuWrapper.js +56 -20
  38. package/dist/ProfileFlameGraph/FlameGraphArrow/FlameGraphNodes.js +211 -140
  39. package/dist/ProfileFlameGraph/FlameGraphArrow/MemoizedTooltip.js +133 -38
  40. package/dist/ProfileFlameGraph/FlameGraphArrow/MiniMap.js +261 -216
  41. package/dist/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.d.ts.map +1 -1
  42. package/dist/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.js +71 -45
  43. package/dist/ProfileFlameGraph/FlameGraphArrow/TooltipContext.d.ts.map +1 -1
  44. package/dist/ProfileFlameGraph/FlameGraphArrow/TooltipContext.js +58 -28
  45. package/dist/ProfileFlameGraph/FlameGraphArrow/ZoomControls.d.ts.map +1 -1
  46. package/dist/ProfileFlameGraph/FlameGraphArrow/ZoomControls.js +59 -8
  47. package/dist/ProfileFlameGraph/FlameGraphArrow/index.js +396 -179
  48. package/dist/ProfileFlameGraph/FlameGraphArrow/useBatchedRendering.d.ts.map +1 -1
  49. package/dist/ProfileFlameGraph/FlameGraphArrow/useBatchedRendering.js +68 -50
  50. package/dist/ProfileFlameGraph/FlameGraphArrow/useMappingList.js +62 -38
  51. package/dist/ProfileFlameGraph/FlameGraphArrow/useNodeColor.js +14 -6
  52. package/dist/ProfileFlameGraph/FlameGraphArrow/useScrollViewport.js +124 -82
  53. package/dist/ProfileFlameGraph/FlameGraphArrow/useVisibleNodes.js +160 -98
  54. package/dist/ProfileFlameGraph/FlameGraphArrow/useZoom.js +232 -112
  55. package/dist/ProfileFlameGraph/FlameGraphArrow/utils.js +137 -114
  56. package/dist/ProfileFlameGraph/benchmarks/benchdata/populateData.js +85 -0
  57. package/dist/ProfileFlameGraph/index.js +322 -147
  58. package/dist/ProfileMetricsGraph/hooks/useQueryRange.js +140 -32
  59. package/dist/ProfileMetricsGraph/index.js +515 -256
  60. package/dist/ProfileSelector/CompareButton.js +132 -12
  61. package/dist/ProfileSelector/MetricsGraphSection.js +228 -63
  62. package/dist/ProfileSelector/index.d.ts +1 -1
  63. package/dist/ProfileSelector/index.d.ts.map +1 -1
  64. package/dist/ProfileSelector/index.js +734 -142
  65. package/dist/ProfileSelector/useAutoQuerySelector.d.ts +1 -3
  66. package/dist/ProfileSelector/useAutoQuerySelector.d.ts.map +1 -1
  67. package/dist/ProfileSelector/useAutoQuerySelector.js +280 -132
  68. package/dist/ProfileSource.js +230 -163
  69. package/dist/ProfileTypeSelector/index.js +214 -125
  70. package/dist/ProfileView/components/ActionButtons/GroupByDropdown.js +50 -4
  71. package/dist/ProfileView/components/ActionButtons/SortByDropdown.js +137 -32
  72. package/dist/ProfileView/components/ColorStackLegend.js +182 -54
  73. package/dist/ProfileView/components/DashboardItems/index.js +87 -28
  74. package/dist/ProfileView/components/DashboardLayout/index.js +108 -16
  75. package/dist/ProfileView/components/DiffLegend.js +172 -29
  76. package/dist/ProfileView/components/GroupByLabelsDropdown/index.js +199 -55
  77. package/dist/ProfileView/components/InvertCallStack/index.js +97 -9
  78. package/dist/ProfileView/components/ProfileFilters/filterPresets.js +260 -315
  79. package/dist/ProfileView/components/ProfileFilters/index.js +518 -215
  80. package/dist/ProfileView/components/ProfileFilters/useProfileFilters.js +370 -306
  81. package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.js +191 -118
  82. package/dist/ProfileView/components/ProfileHeader/index.js +105 -11
  83. package/dist/ProfileView/components/ShareButton/ResultBox.js +119 -16
  84. package/dist/ProfileView/components/ShareButton/index.js +352 -62
  85. package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.d.ts.map +1 -1
  86. package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.js +664 -192
  87. package/dist/ProfileView/components/Toolbars/SwitchMenuItem.js +94 -7
  88. package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.js +196 -155
  89. package/dist/ProfileView/components/Toolbars/index.js +441 -21
  90. package/dist/ProfileView/components/ViewSelector/Dropdown.js +233 -22
  91. package/dist/ProfileView/components/ViewSelector/index.js +186 -82
  92. package/dist/ProfileView/components/VisualizationContainer/index.d.ts.map +1 -1
  93. package/dist/ProfileView/components/VisualizationContainer/index.js +52 -7
  94. package/dist/ProfileView/components/VisualizationPanel.js +185 -8
  95. package/dist/ProfileView/context/DashboardContext.js +74 -26
  96. package/dist/ProfileView/context/ProfileViewContext.js +56 -15
  97. package/dist/ProfileView/hooks/useAutoSelectDimension.js +71 -41
  98. package/dist/ProfileView/hooks/useProfileMetadata.js +50 -18
  99. package/dist/ProfileView/hooks/useResetFlameGraphState.js +31 -10
  100. package/dist/ProfileView/hooks/useResetStateOnProfileTypeChange.js +71 -27
  101. package/dist/ProfileView/hooks/useResetStateOnSeriesChange.js +53 -17
  102. package/dist/ProfileView/hooks/useVisualizationState.js +229 -69
  103. package/dist/ProfileView/index.js +383 -45
  104. package/dist/ProfileView/types/visualization.js +1 -13
  105. package/dist/ProfileView/utils/colorUtils.js +8 -7
  106. package/dist/ProfileViewWithData.js +319 -225
  107. package/dist/QueryControls/index.js +418 -47
  108. package/dist/Sandwich/components/CalleesSection.js +54 -4
  109. package/dist/Sandwich/components/CallersSection.js +97 -27
  110. package/dist/Sandwich/components/TableSection.js +77 -4
  111. package/dist/Sandwich/index.js +125 -12
  112. package/dist/Sandwich/utils/processRowData.js +48 -39
  113. package/dist/SelectWithRefresh/index.js +102 -28
  114. package/dist/SimpleMatchers/Select.js +520 -187
  115. package/dist/SimpleMatchers/index.js +590 -288
  116. package/dist/SourceView/Highlighter.js +230 -70
  117. package/dist/SourceView/LineNo.js +72 -17
  118. package/dist/SourceView/index.js +177 -101
  119. package/dist/SourceView/lang-detector/ext-to-lang.json +798 -798
  120. package/dist/SourceView/lang-detector/index.js +28 -14
  121. package/dist/SourceView/useSelectedLineRange.js +72 -20
  122. package/dist/Table/ColorCell.js +42 -1
  123. package/dist/Table/ColumnsVisibility.js +114 -6
  124. package/dist/Table/MoreDropdown.js +107 -21
  125. package/dist/Table/TableContextMenu.js +144 -134
  126. package/dist/Table/TableContextMenuWrapper.js +59 -14
  127. package/dist/Table/hooks/useColorManagement.js +58 -16
  128. package/dist/Table/hooks/useTableConfiguration.d.ts.map +1 -1
  129. package/dist/Table/hooks/useTableConfiguration.js +323 -167
  130. package/dist/Table/index.js +217 -123
  131. package/dist/Table/utils/functions.js +169 -144
  132. package/dist/Table/utils/topAndBottomExpandedRowModel.js +69 -52
  133. package/dist/TimelineGuide/index.js +209 -16
  134. package/dist/TopTable/benchmarks/benchdata/populateData.js +91 -0
  135. package/dist/TopTable/index.js +325 -121
  136. package/dist/contexts/LabelsQueryProvider.js +94 -32
  137. package/dist/contexts/UnifiedLabelsContext.js +114 -49
  138. package/dist/contexts/utils.js +37 -15
  139. package/dist/hooks/urlParsers.js +27 -15
  140. package/dist/hooks/useColorBy.js +47 -10
  141. package/dist/hooks/useCompareModeMeta.js +112 -62
  142. package/dist/hooks/useDashboardItems.js +52 -11
  143. package/dist/hooks/useLabels.js +295 -52
  144. package/dist/hooks/useQueryState.d.ts +1 -1
  145. package/dist/hooks/useQueryState.d.ts.map +1 -1
  146. package/dist/hooks/useQueryState.js +375 -329
  147. package/dist/index.js +11 -6
  148. package/dist/testdata/fg-diff.json +3750 -0
  149. package/dist/testdata/fg-simple.json +1879 -0
  150. package/dist/testdata/link_data.json +56 -0
  151. package/dist/testdata/tabular.json +30 -0
  152. package/dist/testdata/test_flamegraph.json +26846 -0
  153. package/dist/testdata/test_graph.json +53 -0
  154. package/dist/useDelayedLoader.js +32 -18
  155. package/dist/useGrpcQuery/index.js +71 -11
  156. package/dist/useHasProfileData.js +90 -12
  157. package/dist/useQuery.js +205 -64
  158. package/dist/useSumBy.d.ts.map +1 -1
  159. package/dist/useSumBy.js +294 -138
  160. package/dist/utils.js +62 -30
  161. package/package.json +9 -9
  162. package/src/GraphTooltipArrow/index.tsx +3 -0
  163. package/src/MatchersInput/SuggestionsList.test.tsx +70 -0
  164. package/src/MatchersInput/SuggestionsList.tsx +11 -10
  165. package/src/MatchersInput/index.tsx +1 -1
  166. package/src/MetricsGraph/MetricsTooltip/index.tsx +22 -34
  167. package/src/PreSelectedMatchers/index.tsx +3 -0
  168. package/src/ProfileExplorer/ProfileExplorerCompare.tsx +9 -2
  169. package/src/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.tsx +3 -0
  170. package/src/ProfileFlameGraph/FlameGraphArrow/TooltipContext.tsx +3 -0
  171. package/src/ProfileFlameGraph/FlameGraphArrow/ZoomControls.tsx +3 -0
  172. package/src/ProfileFlameGraph/FlameGraphArrow/useBatchedRendering.ts +3 -0
  173. package/src/ProfileSelector/index.tsx +31 -9
  174. package/src/ProfileSelector/useAutoQuerySelector.ts +64 -42
  175. package/src/ProfileView/components/Toolbars/MultiLevelDropdown.tsx +3 -0
  176. package/src/ProfileView/components/VisualizationContainer/index.tsx +3 -0
  177. package/src/Table/hooks/useTableConfiguration.tsx +7 -13
  178. package/src/hooks/useQueryState.ts +18 -3
  179. package/src/useDelayedLoader.ts +10 -10
  180. package/src/useSumBy.ts +12 -18
  181. package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.test.js +0 -455
  182. package/dist/hooks/useQueryState.test.js +0 -868
package/CHANGELOG.md CHANGED
@@ -3,7 +3,15 @@
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.140 (2026-04-13)
6
+ ## 0.19.143 (2026-04-16)
7
+
8
+ **Note:** Version bump only for package @parca/profile
9
+
10
+ ## [0.19.142](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.141...@parca/profile@0.19.142) (2026-04-13)
11
+
12
+ **Note:** Version bump only for package @parca/profile
13
+
14
+ ## [0.19.141](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.140...@parca/profile@0.19.141) (2026-04-13)
7
15
 
8
16
  **Note:** Version bump only for package @parca/profile
9
17
 
@@ -1,4 +1,18 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
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
- const NoData = () => {
10
- return _jsx("span", { className: "rounded bg-gray-200 px-2 dark:bg-gray-800", children: "Not available" });
11
- };
12
- const GraphTooltipArrowContent = ({ table, profileType, unit, total, totalUnfiltered, row, isFixed, compareAbsolute, }) => {
13
- const graphTooltipData = useGraphTooltip({
14
- table,
15
- profileType,
16
- unit,
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
- if (graphTooltipData === null) {
23
- return _jsx(_Fragment, {});
24
- }
25
- const { name, locationAddress, cumulativeText, flatText, diffText, diff, row: rowNumber, } = graphTooltipData;
26
- return (_jsx("div", { className: `flex text-sm ${isFixed ? 'w-full' : ''}`, children: _jsx("div", { className: `m-auto w-full ${isFixed ? 'w-full' : ''}`, children: _jsxs("div", { 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", children: [_jsx("div", { className: "flex flex-row", children: _jsxs("div", { className: "mx-2", children: [_jsx("div", { className: "flex min-h-10 items-start justify-between gap-4 break-all font-semibold mb-2", children: row === 0 ? (_jsx("p", { children: "root" })) : (_jsx("p", { children: name !== ''
27
- ? name
28
- : locationAddress !== 0n
29
- ? hexifyAddress(locationAddress)
30
- : '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("p", { children: cumulativeText }) })] }), _jsxs("tr", { children: [_jsx("td", { className: "w-1/4 pt-2", children: "Flat" }), _jsx("td", { className: "w-3/4 pt-2", children: _jsx("p", { children: flatText }) })] }), 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("p", { 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" })] })] }) }) }));
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
- const TooltipMetaInfo = ({ table, row }) => {
33
- const { labelPairs, functionFilename, file, locationAddress, mappingFile, mappingBuildID, inlined, timestamp, } = useGraphTooltipMetaInfo({ table, row });
34
- const { timezone } = useParcaContext();
35
- 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])));
36
- const isMappingBuildIDAvailable = mappingBuildID !== null && mappingBuildID !== '';
37
- const inlinedText = inlined === null ? 'merged' : inlined ? 'yes' : 'no';
38
- return (_jsxs(_Fragment, { children: [timestamp != null && timestamp !== 0n && (_jsxs("tr", { children: [_jsx("td", { className: "w-1/4 pt-2", children: "Timestamp" }), _jsx("td", { className: "w-3/4 pt-2 break-all", children: formatDateTimeDownToMS(new Date(Number(timestamp / 1000000n)), timezone) })] })), _jsxs("tr", { children: [_jsx("td", { className: "w-1/4", children: "File" }), _jsx("td", { className: "w-3/4 break-all", children: functionFilename === '' ? (_jsx(NoData, {})) : (_jsx("div", { className: "flex gap-4", children: _jsx("div", { className: "whitespace-nowrap text-left", children: _jsx(ExpandOnHover, { value: file, displayValue: truncateStringReverse(file, 50) }) }) })) })] }), _jsxs("tr", { children: [_jsx("td", { className: "w-1/4", children: "Address" }), _jsx("td", { className: "w-3/4 break-all", children: locationAddress === 0n ? _jsx(NoData, {}) : _jsx("div", { children: hexifyAddress(locationAddress) }) })] }), _jsxs("tr", { children: [_jsx("td", { className: "w-1/4", children: "Inlined" }), _jsx("td", { className: "w-3/4 break-all", children: inlinedText })] }), _jsxs("tr", { children: [_jsx("td", { className: "w-1/4", children: "Binary" }), _jsx("td", { className: "w-3/4 break-all", children: (mappingFile != null ? getLastItem(mappingFile) : null) ?? _jsx(NoData, {}) })] }), _jsxs("tr", { children: [_jsx("td", { className: "w-1/4", children: "Build Id" }), _jsx("td", { className: "w-3/4 break-all", children: isMappingBuildIDAvailable ? _jsx("div", { children: truncateString(mappingBuildID, 28) }) : _jsx(NoData, {}) })] }), labelPairs.length > 0 && (_jsxs("tr", { children: [_jsx("td", { className: "w-1/4", children: "Labels" }), _jsx("td", { className: "w-3/4 break-all", children: labels })] }))] }));
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
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
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
- const InfoSection = ({ title, value, minWidth = '', }) => {
23
- return (_jsxs("div", { className: cx('flex shrink-0 flex-col gap-1 p-2', { [minWidth]: minWidth != null }), children: [_jsx("p", { className: "text-sm font-medium leading-5 text-gray-500 dark:text-gray-400", children: title }), _jsx("div", { className: "text-lg font-normal text-gray-900 dark:text-gray-50", children: value })] }));
24
- };
25
- const NoData = () => {
26
- return _jsx("span", { className: "rounded bg-gray-200 px-2 dark:bg-gray-800", children: "Not available" });
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
- export const DockedGraphTooltip = ({ table, total, totalUnfiltered, row, profileType, unit, compareAbsolute, }) => {
29
- let { width } = useWindowSize();
30
- const { profileExplorer } = useParcaContext();
31
- const { PaddingX } = profileExplorer ?? { PaddingX: 0 };
32
- width = width - PaddingX - 24;
33
- const graphTooltipData = useGraphTooltip({
34
- table,
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
- const { labelPairs, functionFilename, file, locationAddress, mappingFile, mappingBuildID, inlined, } = useGraphTooltipMetaInfo({ table, row: row ?? 0 });
43
- if (graphTooltipData === null) {
44
- return _jsx(_Fragment, {});
45
- }
46
- const { name, cumulativeText, flatText, diffText, diff } = graphTooltipData;
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 const ExpandOnHover = ({ value, displayValue }) => {
3
- return (_jsxs("div", { className: "group relative w-full", children: [_jsx("div", { className: "w-full overflow-hidden text-ellipsis whitespace-nowrap", children: displayValue ?? value }), _jsx("div", { 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", children: value })] }));
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":"AAaA,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,OAkD/E,CAAC;AAEF,eAAe,YAAY,CAAC"}
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"}