@parca/profile 0.19.142 → 0.19.144

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 (137) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.d.ts.map +1 -1
  3. package/dist/GraphTooltipArrow/useGraphTooltipMetaInfo/index.js +22 -28
  4. package/dist/ProfileExplorer/ProfileExplorerCompare.d.ts.map +1 -1
  5. package/dist/ProfileExplorer/ProfileExplorerCompare.js +72 -73
  6. package/dist/ProfileFlameChart/SamplesStrips/index.d.ts +2 -2
  7. package/dist/ProfileFlameChart/SamplesStrips/index.d.ts.map +1 -1
  8. package/dist/ProfileFlameChart/index.d.ts.map +1 -1
  9. package/dist/ProfileFlameChart/index.js +20 -24
  10. package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.d.ts.map +1 -1
  11. package/dist/ProfileFlameGraph/FlameGraphArrow/ContextMenu.js +13 -14
  12. package/dist/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.d.ts.map +1 -1
  13. package/dist/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.js +6 -5
  14. package/dist/ProfileFlameGraph/index.d.ts.map +1 -1
  15. package/dist/ProfileFlameGraph/index.js +8 -7
  16. package/dist/ProfileMetricsGraph/index.d.ts.map +1 -1
  17. package/dist/ProfileMetricsGraph/index.js +6 -8
  18. package/dist/ProfileSelector/MetricsGraphSection.d.ts.map +1 -1
  19. package/dist/ProfileSelector/MetricsGraphSection.js +48 -55
  20. package/dist/ProfileSelector/index.d.ts +1 -1
  21. package/dist/ProfileSelector/index.d.ts.map +1 -1
  22. package/dist/ProfileSelector/index.js +216 -210
  23. package/dist/ProfileSelector/useAutoQuerySelector.d.ts +1 -3
  24. package/dist/ProfileSelector/useAutoQuerySelector.d.ts.map +1 -1
  25. package/dist/ProfileSelector/useAutoQuerySelector.js +133 -104
  26. package/dist/ProfileView/components/ActionButtons/SortByDropdown.d.ts.map +1 -1
  27. package/dist/ProfileView/components/ActionButtons/SortByDropdown.js +24 -25
  28. package/dist/ProfileView/components/ColorStackLegend.d.ts.map +1 -1
  29. package/dist/ProfileView/components/ColorStackLegend.js +3 -5
  30. package/dist/ProfileView/components/InvertCallStack/index.d.ts.map +1 -1
  31. package/dist/ProfileView/components/InvertCallStack/index.js +47 -47
  32. package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.d.ts +1 -2
  33. package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.d.ts.map +1 -1
  34. package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.js +37 -34
  35. package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.d.ts.map +1 -1
  36. package/dist/ProfileView/components/Toolbars/MultiLevelDropdown.js +282 -294
  37. package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.d.ts.map +1 -1
  38. package/dist/ProfileView/components/Toolbars/TableColumnsDropdown.js +7 -8
  39. package/dist/ProfileView/components/Toolbars/index.d.ts +2 -2
  40. package/dist/ProfileView/components/Toolbars/index.d.ts.map +1 -1
  41. package/dist/ProfileView/components/Toolbars/index.js +1 -1
  42. package/dist/ProfileView/components/ViewSelector/index.d.ts.map +1 -1
  43. package/dist/ProfileView/components/ViewSelector/index.js +53 -75
  44. package/dist/ProfileView/context/DashboardContext.d.ts.map +1 -1
  45. package/dist/ProfileView/context/DashboardContext.js +36 -44
  46. package/dist/ProfileView/hooks/useResetFlameGraphState.d.ts.map +1 -1
  47. package/dist/ProfileView/hooks/useResetFlameGraphState.js +8 -7
  48. package/dist/ProfileView/hooks/useResetStateOnProfileTypeChange.d.ts.map +1 -1
  49. package/dist/ProfileView/hooks/useResetStateOnProfileTypeChange.js +59 -59
  50. package/dist/ProfileView/hooks/useResetStateOnSeriesChange.d.ts.map +1 -1
  51. package/dist/ProfileView/hooks/useResetStateOnSeriesChange.js +37 -22
  52. package/dist/ProfileView/hooks/useVisualizationState.d.ts +3 -3
  53. package/dist/ProfileView/hooks/useVisualizationState.d.ts.map +1 -1
  54. package/dist/ProfileView/hooks/useVisualizationState.js +116 -147
  55. package/dist/ProfileViewWithData.d.ts.map +1 -1
  56. package/dist/ProfileViewWithData.js +35 -45
  57. package/dist/Sandwich/index.d.ts.map +1 -1
  58. package/dist/Sandwich/index.js +6 -5
  59. package/dist/SourceView/index.d.ts.map +1 -1
  60. package/dist/SourceView/index.js +6 -4
  61. package/dist/SourceView/useSelectedLineRange.d.ts.map +1 -1
  62. package/dist/SourceView/useSelectedLineRange.js +52 -76
  63. package/dist/Table/MoreDropdown.d.ts.map +1 -1
  64. package/dist/Table/MoreDropdown.js +42 -53
  65. package/dist/Table/TableContextMenu.d.ts.map +1 -1
  66. package/dist/Table/TableContextMenu.js +15 -19
  67. package/dist/Table/hooks/useTableConfiguration.d.ts.map +1 -1
  68. package/dist/Table/hooks/useTableConfiguration.js +107 -115
  69. package/dist/Table/index.d.ts.map +1 -1
  70. package/dist/Table/index.js +16 -16
  71. package/dist/TopTable/index.d.ts.map +1 -1
  72. package/dist/TopTable/index.js +112 -127
  73. package/dist/hooks/urlParsers.d.ts +18 -0
  74. package/dist/hooks/urlParsers.d.ts.map +1 -0
  75. package/dist/hooks/urlParsers.js +44 -0
  76. package/dist/hooks/useColorBy.d.ts +5 -0
  77. package/dist/hooks/useColorBy.d.ts.map +1 -0
  78. package/dist/hooks/useColorBy.js +63 -0
  79. package/dist/hooks/useCompareModeMeta.d.ts.map +1 -1
  80. package/dist/hooks/useCompareModeMeta.js +94 -138
  81. package/dist/hooks/useDashboardItems.d.ts +5 -0
  82. package/dist/hooks/useDashboardItems.d.ts.map +1 -0
  83. package/dist/hooks/useDashboardItems.js +68 -0
  84. package/dist/hooks/useQueryState.d.ts +4 -4
  85. package/dist/hooks/useQueryState.d.ts.map +1 -1
  86. package/dist/hooks/useQueryState.js +127 -122
  87. package/dist/index.d.ts +3 -2
  88. package/dist/index.d.ts.map +1 -1
  89. package/dist/index.js +3 -12
  90. package/dist/useQuery.js +2 -1
  91. package/dist/useSumBy.d.ts +1 -1
  92. package/dist/useSumBy.d.ts.map +1 -1
  93. package/dist/useSumBy.js +2 -2
  94. package/package.json +4 -3
  95. package/src/GraphTooltipArrow/useGraphTooltipMetaInfo/index.ts +11 -13
  96. package/src/ProfileExplorer/ProfileExplorerCompare.tsx +11 -9
  97. package/src/ProfileFlameChart/SamplesStrips/index.tsx +2 -2
  98. package/src/ProfileFlameChart/index.tsx +21 -28
  99. package/src/ProfileFlameGraph/FlameGraphArrow/ContextMenu.tsx +10 -9
  100. package/src/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.tsx +5 -3
  101. package/src/ProfileFlameGraph/index.tsx +6 -9
  102. package/src/ProfileMetricsGraph/index.tsx +6 -8
  103. package/src/ProfileSelector/MetricsGraphSection.tsx +5 -10
  104. package/src/ProfileSelector/index.tsx +33 -33
  105. package/src/ProfileSelector/useAutoQuerySelector.ts +64 -42
  106. package/src/ProfileView/components/ActionButtons/SortByDropdown.tsx +10 -6
  107. package/src/ProfileView/components/ColorStackLegend.tsx +2 -4
  108. package/src/ProfileView/components/InvertCallStack/index.tsx +5 -4
  109. package/src/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.test.tsx +94 -192
  110. package/src/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.ts +21 -21
  111. package/src/ProfileView/components/Toolbars/MultiLevelDropdown.tsx +24 -25
  112. package/src/ProfileView/components/Toolbars/TableColumnsDropdown.tsx +4 -5
  113. package/src/ProfileView/components/Toolbars/index.tsx +3 -3
  114. package/src/ProfileView/components/ViewSelector/index.tsx +9 -16
  115. package/src/ProfileView/context/DashboardContext.tsx +6 -6
  116. package/src/ProfileView/hooks/useResetFlameGraphState.ts +6 -4
  117. package/src/ProfileView/hooks/useResetStateOnProfileTypeChange.ts +24 -26
  118. package/src/ProfileView/hooks/useResetStateOnSeriesChange.ts +16 -8
  119. package/src/ProfileView/hooks/useVisualizationState.ts +61 -69
  120. package/src/ProfileViewWithData.tsx +29 -35
  121. package/src/Sandwich/index.tsx +4 -3
  122. package/src/SourceView/index.tsx +4 -2
  123. package/src/SourceView/useSelectedLineRange.ts +34 -19
  124. package/src/Table/MoreDropdown.tsx +9 -11
  125. package/src/Table/TableContextMenu.tsx +10 -13
  126. package/src/Table/hooks/useTableConfiguration.tsx +3 -4
  127. package/src/Table/index.tsx +12 -21
  128. package/src/TopTable/index.tsx +3 -4
  129. package/src/hooks/urlParsers.ts +38 -0
  130. package/src/hooks/useColorBy.ts +42 -0
  131. package/src/hooks/useCompareModeMeta.ts +61 -91
  132. package/src/hooks/useDashboardItems.ts +46 -0
  133. package/src/hooks/useQueryState.test.tsx +275 -345
  134. package/src/hooks/useQueryState.ts +153 -120
  135. package/src/index.tsx +16 -15
  136. package/src/useQuery.tsx +1 -1
  137. package/src/useSumBy.ts +3 -3
@@ -20,13 +20,14 @@ import { c as _c } from "react-compiler-runtime";
20
20
 
21
21
  import { useMemo } from 'react';
22
22
  import { createColumnHelper } from '@tanstack/table-core';
23
- import { useURLState } from '@parca/components';
23
+ import { useQueryState } from 'nuqs';
24
24
  import { valueFormatter } from '@parca/utilities';
25
+ import { tableColumnsParser } from '../../hooks/urlParsers';
25
26
  import { ColorCell } from '../ColorCell';
26
27
  import { addPlusSign, ratioString } from '../utils/functions';
27
28
  import { jsx as _jsx } from "react/jsx-runtime";
28
29
  export function useTableConfiguration(t0) {
29
- var $ = _c(45);
30
+ var $ = _c(44);
30
31
  var t1 = t0.unit,
31
32
  total = t0.total,
32
33
  filtered = t0.filtered,
@@ -40,20 +41,11 @@ export function useTableConfiguration(t0) {
40
41
  t2 = $[0];
41
42
  }
42
43
  var columnHelper = t2;
43
- var t3;
44
- if ($[1] === Symbol["for"]("react.memo_cache_sentinel")) {
45
- t3 = {
46
- alwaysReturnArray: true
47
- };
48
- $[1] = t3;
49
- } else {
50
- t3 = $[1];
51
- }
52
- var _useURLState = useURLState("table_columns", t3),
53
- _useURLState2 = _slicedToArray(_useURLState, 1),
54
- tableColumns = _useURLState2[0];
44
+ var _useQueryState = useQueryState("table_columns", tableColumnsParser),
45
+ _useQueryState2 = _slicedToArray(_useQueryState, 1),
46
+ tableColumns = _useQueryState2[0];
55
47
  var defaults;
56
- if ($[2] !== compareMode || $[3] !== tableColumns) {
48
+ if ($[1] !== compareMode || $[2] !== tableColumns) {
57
49
  defaults = {
58
50
  color: true,
59
51
  flat: true,
@@ -74,29 +66,29 @@ export function useTableConfiguration(t0) {
74
66
  defaults[column] = tableColumns.includes(column);
75
67
  });
76
68
  }
77
- $[2] = compareMode;
78
- $[3] = tableColumns;
79
- $[4] = defaults;
69
+ $[1] = compareMode;
70
+ $[2] = tableColumns;
71
+ $[3] = defaults;
80
72
  } else {
81
- defaults = $[4];
73
+ defaults = $[3];
82
74
  }
83
75
  var columnVisibility = defaults;
84
- var t4;
85
- if ($[5] === Symbol["for"]("react.memo_cache_sentinel")) {
86
- t4 = columnHelper.accessor("colorProperty", {
76
+ var t3;
77
+ if ($[4] === Symbol["for"]("react.memo_cache_sentinel")) {
78
+ t3 = columnHelper.accessor("colorProperty", {
87
79
  id: "color",
88
80
  header: "",
89
81
  cell: _temp,
90
82
  size: 10,
91
83
  enableSorting: false
92
84
  });
93
- $[5] = t4;
85
+ $[4] = t3;
94
86
  } else {
95
- t4 = $[5];
87
+ t3 = $[4];
96
88
  }
97
- var t5;
98
- if ($[6] !== unit) {
99
- t5 = columnHelper.accessor("flat", {
89
+ var t4;
90
+ if ($[5] !== unit) {
91
+ t4 = columnHelper.accessor("flat", {
100
92
  id: "flat",
101
93
  header: "Flat",
102
94
  cell: function cell(info_0) {
@@ -108,14 +100,14 @@ export function useTableConfiguration(t0) {
108
100
  },
109
101
  invertSorting: true
110
102
  });
111
- $[6] = unit;
112
- $[7] = t5;
103
+ $[5] = unit;
104
+ $[6] = t4;
113
105
  } else {
114
- t5 = $[7];
106
+ t4 = $[6];
115
107
  }
116
- var t6;
117
- if ($[8] !== filtered || $[9] !== total) {
118
- t6 = columnHelper.accessor("flat", {
108
+ var t5;
109
+ if ($[7] !== filtered || $[8] !== total) {
110
+ t5 = columnHelper.accessor("flat", {
119
111
  id: "flatPercentage",
120
112
  header: "Flat (%)",
121
113
  cell: function cell(info_1) {
@@ -127,15 +119,15 @@ export function useTableConfiguration(t0) {
127
119
  },
128
120
  invertSorting: true
129
121
  });
130
- $[8] = filtered;
131
- $[9] = total;
132
- $[10] = t6;
122
+ $[7] = filtered;
123
+ $[8] = total;
124
+ $[9] = t5;
133
125
  } else {
134
- t6 = $[10];
126
+ t5 = $[9];
135
127
  }
136
- var t7;
137
- if ($[11] !== unit) {
138
- t7 = columnHelper.accessor("flatDiff", {
128
+ var t6;
129
+ if ($[10] !== unit) {
130
+ t6 = columnHelper.accessor("flatDiff", {
139
131
  id: "flatDiff",
140
132
  header: "Flat Diff",
141
133
  cell: function cell(info_2) {
@@ -147,14 +139,14 @@ export function useTableConfiguration(t0) {
147
139
  },
148
140
  invertSorting: true
149
141
  });
150
- $[11] = unit;
151
- $[12] = t7;
142
+ $[10] = unit;
143
+ $[11] = t6;
152
144
  } else {
153
- t7 = $[12];
145
+ t6 = $[11];
154
146
  }
155
- var t8;
156
- if ($[13] !== filtered || $[14] !== total) {
157
- t8 = columnHelper.accessor("flatDiff", {
147
+ var t7;
148
+ if ($[12] !== filtered || $[13] !== total) {
149
+ t7 = columnHelper.accessor("flatDiff", {
158
150
  id: "flatDiffPercentage",
159
151
  header: "Flat Diff (%)",
160
152
  cell: function cell(info_3) {
@@ -166,15 +158,15 @@ export function useTableConfiguration(t0) {
166
158
  },
167
159
  invertSorting: true
168
160
  });
169
- $[13] = filtered;
170
- $[14] = total;
171
- $[15] = t8;
161
+ $[12] = filtered;
162
+ $[13] = total;
163
+ $[14] = t7;
172
164
  } else {
173
- t8 = $[15];
165
+ t7 = $[14];
174
166
  }
175
- var t9;
176
- if ($[16] !== unit) {
177
- t9 = columnHelper.accessor("cumulative", {
167
+ var t8;
168
+ if ($[15] !== unit) {
169
+ t8 = columnHelper.accessor("cumulative", {
178
170
  id: "cumulative",
179
171
  header: "Cumulative",
180
172
  cell: function cell(info_4) {
@@ -186,14 +178,14 @@ export function useTableConfiguration(t0) {
186
178
  },
187
179
  invertSorting: true
188
180
  });
189
- $[16] = unit;
190
- $[17] = t9;
181
+ $[15] = unit;
182
+ $[16] = t8;
191
183
  } else {
192
- t9 = $[17];
184
+ t8 = $[16];
193
185
  }
194
- var t10;
195
- if ($[18] !== filtered || $[19] !== total) {
196
- t10 = columnHelper.accessor("cumulative", {
186
+ var t9;
187
+ if ($[17] !== filtered || $[18] !== total) {
188
+ t9 = columnHelper.accessor("cumulative", {
197
189
  id: "cumulativePercentage",
198
190
  header: "Cumulative (%)",
199
191
  cell: function cell(info_5) {
@@ -205,15 +197,15 @@ export function useTableConfiguration(t0) {
205
197
  },
206
198
  invertSorting: true
207
199
  });
208
- $[18] = filtered;
209
- $[19] = total;
210
- $[20] = t10;
200
+ $[17] = filtered;
201
+ $[18] = total;
202
+ $[19] = t9;
211
203
  } else {
212
- t10 = $[20];
204
+ t9 = $[19];
213
205
  }
214
- var t11;
215
- if ($[21] !== unit) {
216
- t11 = columnHelper.accessor("cumulativeDiff", {
206
+ var t10;
207
+ if ($[20] !== unit) {
208
+ t10 = columnHelper.accessor("cumulativeDiff", {
217
209
  id: "cumulativeDiff",
218
210
  header: "Cumulative Diff",
219
211
  cell: function cell(info_6) {
@@ -225,14 +217,14 @@ export function useTableConfiguration(t0) {
225
217
  },
226
218
  invertSorting: true
227
219
  });
228
- $[21] = unit;
229
- $[22] = t11;
220
+ $[20] = unit;
221
+ $[21] = t10;
230
222
  } else {
231
- t11 = $[22];
223
+ t10 = $[21];
232
224
  }
233
- var t12;
234
- if ($[23] !== filtered || $[24] !== total) {
235
- t12 = columnHelper.accessor("cumulativeDiff", {
225
+ var t11;
226
+ if ($[22] !== filtered || $[23] !== total) {
227
+ t11 = columnHelper.accessor("cumulativeDiff", {
236
228
  id: "cumulativeDiffPercentage",
237
229
  header: "Cumulative Diff (%)",
238
230
  cell: function cell(info_7) {
@@ -244,92 +236,92 @@ export function useTableConfiguration(t0) {
244
236
  },
245
237
  invertSorting: true
246
238
  });
247
- $[23] = filtered;
248
- $[24] = total;
249
- $[25] = t12;
239
+ $[22] = filtered;
240
+ $[23] = total;
241
+ $[24] = t11;
250
242
  } else {
251
- t12 = $[25];
243
+ t11 = $[24];
252
244
  }
245
+ var t12;
253
246
  var t13;
254
247
  var t14;
255
248
  var t15;
256
- var t16;
257
- if ($[26] === Symbol["for"]("react.memo_cache_sentinel")) {
258
- t13 = columnHelper.accessor("name", {
249
+ if ($[25] === Symbol["for"]("react.memo_cache_sentinel")) {
250
+ t12 = columnHelper.accessor("name", {
259
251
  id: "name",
260
252
  header: "Name",
261
253
  cell: _temp2
262
254
  });
263
- t14 = columnHelper.accessor("functionSystemName", {
255
+ t13 = columnHelper.accessor("functionSystemName", {
264
256
  id: "functionSystemName",
265
257
  header: "Function System Name",
266
258
  cell: _temp3
267
259
  });
268
- t15 = columnHelper.accessor("functionFileName", {
260
+ t14 = columnHelper.accessor("functionFileName", {
269
261
  id: "functionFileName",
270
262
  header: "Function File Name",
271
263
  cell: _temp4
272
264
  });
273
- t16 = columnHelper.accessor("mappingFile", {
265
+ t15 = columnHelper.accessor("mappingFile", {
274
266
  id: "mappingFile",
275
267
  header: "Mapping File",
276
268
  cell: _temp5
277
269
  });
270
+ $[25] = t12;
278
271
  $[26] = t13;
279
272
  $[27] = t14;
280
273
  $[28] = t15;
281
- $[29] = t16;
282
274
  } else {
275
+ t12 = $[25];
283
276
  t13 = $[26];
284
277
  t14 = $[27];
285
278
  t15 = $[28];
286
- t16 = $[29];
287
279
  }
288
- var t17;
289
- if ($[30] !== t10 || $[31] !== t11 || $[32] !== t12 || $[33] !== t5 || $[34] !== t6 || $[35] !== t7 || $[36] !== t8 || $[37] !== t9) {
290
- t17 = [t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16];
291
- $[30] = t10;
292
- $[31] = t11;
293
- $[32] = t12;
294
- $[33] = t5;
295
- $[34] = t6;
296
- $[35] = t7;
297
- $[36] = t8;
298
- $[37] = t9;
299
- $[38] = t17;
280
+ var t16;
281
+ if ($[29] !== t10 || $[30] !== t11 || $[31] !== t4 || $[32] !== t5 || $[33] !== t6 || $[34] !== t7 || $[35] !== t8 || $[36] !== t9) {
282
+ t16 = [t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15];
283
+ $[29] = t10;
284
+ $[30] = t11;
285
+ $[31] = t4;
286
+ $[32] = t5;
287
+ $[33] = t6;
288
+ $[34] = t7;
289
+ $[35] = t8;
290
+ $[36] = t9;
291
+ $[37] = t16;
300
292
  } else {
301
- t17 = $[38];
293
+ t16 = $[37];
302
294
  }
303
- var baseColumns = t17;
295
+ var baseColumns = t16;
304
296
  var columns = baseColumns;
305
- var t18 = compareMode ? "flatDiff" : "flat";
306
- var t19;
307
- if ($[39] !== t18) {
308
- t19 = [{
309
- id: t18,
297
+ var t17 = compareMode ? "flatDiff" : "flat";
298
+ var t18;
299
+ if ($[38] !== t17) {
300
+ t18 = [{
301
+ id: t17,
310
302
  desc: false
311
303
  }];
304
+ $[38] = t17;
312
305
  $[39] = t18;
313
- $[40] = t19;
314
306
  } else {
315
- t19 = $[40];
307
+ t18 = $[39];
316
308
  }
317
- var initialSorting = t19;
318
- var t20;
319
- if ($[41] !== columnVisibility || $[42] !== columns || $[43] !== initialSorting) {
320
- t20 = {
309
+ var initialSorting = t18;
310
+ var t19;
311
+ if ($[40] !== columnVisibility || $[41] !== columns || $[42] !== initialSorting) {
312
+ t19 = {
321
313
  columns: columns,
322
314
  initialSorting: initialSorting,
323
315
  columnVisibility: columnVisibility
324
316
  };
325
- $[41] = columnVisibility;
326
- $[42] = columns;
327
- $[43] = initialSorting;
328
- $[44] = t20;
317
+ $[40] = columnVisibility;
318
+ $[41] = columns;
319
+ $[42] = initialSorting;
320
+ $[43] = t19;
329
321
  } else {
330
- t20 = $[44];
322
+ t19 = $[43];
331
323
  }
332
- return t20;
324
+ return t19;
333
325
  }
334
326
  function _temp5(info_11) {
335
327
  return info_11.getValue();
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Table/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgD,MAAM,OAAO,CAAC;AAErE,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B,CAAC;AAYlD,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAU1C,OAAO,EAAC,OAAO,EAAmC,MAAM,mBAAmB,CAAC;AAE5E,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AACjD,eAAO,MAAM,sBAAsB,qBAAqB,CAAC;AACzD,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AACnD,eAAO,MAAM,0BAA0B,yBAAyB,CAAC;AACjE,eAAO,MAAM,wBAAwB,uBAAuB,CAAC;AAC7D,eAAO,MAAM,UAAU,SAAS,CAAC;AACjC,eAAO,MAAM,eAAe,cAAc,CAAC;AAC3C,eAAO,MAAM,gBAAgB,eAAe,CAAC;AAC7C,eAAO,MAAM,qBAAqB,oBAAoB,CAAC;AACvD,eAAO,MAAM,aAAa,YAAY,CAAC;AACvC,eAAO,MAAM,aAAa,YAAY,CAAC;AAEvC,MAAM,MAAM,GAAG,GAAG,OAAO,CAAC;AAE1B,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,KAAK,IAAI,CAAC;IACxD,YAAY,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oBAAoB,CAA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oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAC;CACxB;AAED,eAAO,MAAM,KAAK,wCAiMhB,CAAC;AAEH,eAAe,KAAK,CAAC"}
@@ -20,11 +20,15 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
20
20
  import React, { useCallback, useEffect, useMemo, useRef } from 'react';
21
21
  import { tableFromIPC } from '@uwdata/flechette';
22
22
  import { AnimatePresence, motion } from 'framer-motion';
23
+ import { useQueryState } from 'nuqs';
23
24
  import { useContextMenu } from 'react-contexify';
24
- import { Table as TableComponent, TableSkeleton, useParcaContext, useURLState } from '@parca/components';
25
+ import { Table as TableComponent, TableSkeleton, useParcaContext } from '@parca/components';
25
26
  import { useCurrentColorProfile } from '@parca/hooks';
26
27
  import useMappingList, { useFilenamesList } from '../ProfileFlameGraph/FlameGraphArrow/useMappingList';
27
28
  import { useProfileViewContext } from '../ProfileView/context/ProfileViewContext';
29
+ import { stringParam } from '../hooks/urlParsers';
30
+ import { useColorBy } from '../hooks/useColorBy';
31
+ import { useDashboardItems } from '../hooks/useDashboardItems';
28
32
  import { alignedUint8Array } from '../utils';
29
33
  import TableContextMenuWrapper from './TableContextMenuWrapper';
30
34
  import { useColorManagement } from './hooks/useColorManagement';
@@ -53,19 +57,15 @@ export var Table = /*#__PURE__*/React.memo(function Table(_ref) {
53
57
  metadataMappingFiles = _ref.metadataMappingFiles,
54
58
  error = _ref.error;
55
59
  var currentColorProfile = useCurrentColorProfile();
56
- var _useURLState = useURLState('dashboard_items', {
57
- alwaysReturnArray: true
58
- }),
59
- _useURLState2 = _slicedToArray(_useURLState, 1),
60
- dashboardItems = _useURLState2[0];
61
- var _useURLState3 = useURLState('sandwich_function_name'),
62
- _useURLState4 = _slicedToArray(_useURLState3, 2),
63
- _ = _useURLState4[0],
64
- setSandwichFunctionName = _useURLState4[1];
65
- var _useURLState5 = useURLState('color_by'),
66
- _useURLState6 = _slicedToArray(_useURLState5, 2),
67
- colorBy = _useURLState6[0],
68
- setColorBy = _useURLState6[1];
60
+ var _useDashboardItems = useDashboardItems(),
61
+ dashboardItems = _useDashboardItems.dashboardItems;
62
+ var _useQueryState = useQueryState('sandwich_function_name', stringParam),
63
+ _useQueryState2 = _slicedToArray(_useQueryState, 2),
64
+ _ = _useQueryState2[0],
65
+ setSandwichFunctionName = _useQueryState2[1];
66
+ var _useColorBy = useColorBy(),
67
+ colorBy = _useColorBy.colorBy,
68
+ setColorBy = _useColorBy.setColorBy;
69
69
  var _useParcaContext = useParcaContext(),
70
70
  isDarkMode = _useParcaContext.isDarkMode;
71
71
  var _useProfileViewContex = useProfileViewContext(),
@@ -95,7 +95,7 @@ export var Table = /*#__PURE__*/React.memo(function Table(_ref) {
95
95
  // If there is only one mapping file, we want to color by filename by default.
96
96
  useEffect(function () {
97
97
  if (mappingsListCount === 1 && colorBy !== 'filename') {
98
- setColorBy('filename');
98
+ void setColorBy('filename');
99
99
  }
100
100
  // eslint-disable-next-line react-hooks/exhaustive-deps
101
101
  }, [mappingsListCount]);
@@ -122,7 +122,7 @@ export var Table = /*#__PURE__*/React.memo(function Table(_ref) {
122
122
  columnVisibility = tableConfig.columnVisibility;
123
123
  var selectSpan = useCallback(function (span) {
124
124
  if (!dashboardItems.includes('flamegraph')) {
125
- setSandwichFunctionName(span.trim());
125
+ void setSandwichFunctionName(span.trim());
126
126
  }
127
127
  }, [setSandwichFunctionName, dashboardItems]);
128
128
  var onRowClick = useCallback(function (row) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/TopTable/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAI7D,OAAO,EAAC,GAAG,EAAW,WAAW,EAAC,MAAM,eAAe,CAAC;AAExD,OAAO,EAKL,KAAK,gBAAgB,EACtB,MAAM,kBAAkB,CAAC;AAK1B,UAAU,aAAa;IACrB,OAAO,EAAE,OAAO,CAAC;IACj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