@parca/profile 0.19.142 → 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 (135) hide show
  1. package/CHANGELOG.md +4 -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/useSumBy.d.ts +1 -1
  91. package/dist/useSumBy.d.ts.map +1 -1
  92. package/dist/useSumBy.js +2 -2
  93. package/package.json +4 -3
  94. package/src/GraphTooltipArrow/useGraphTooltipMetaInfo/index.ts +11 -13
  95. package/src/ProfileExplorer/ProfileExplorerCompare.tsx +11 -9
  96. package/src/ProfileFlameChart/SamplesStrips/index.tsx +2 -2
  97. package/src/ProfileFlameChart/index.tsx +21 -28
  98. package/src/ProfileFlameGraph/FlameGraphArrow/ContextMenu.tsx +10 -9
  99. package/src/ProfileFlameGraph/FlameGraphArrow/TextWithEllipsis.tsx +5 -3
  100. package/src/ProfileFlameGraph/index.tsx +6 -9
  101. package/src/ProfileMetricsGraph/index.tsx +6 -8
  102. package/src/ProfileSelector/MetricsGraphSection.tsx +5 -10
  103. package/src/ProfileSelector/index.tsx +33 -33
  104. package/src/ProfileSelector/useAutoQuerySelector.ts +64 -42
  105. package/src/ProfileView/components/ActionButtons/SortByDropdown.tsx +10 -6
  106. package/src/ProfileView/components/ColorStackLegend.tsx +2 -4
  107. package/src/ProfileView/components/InvertCallStack/index.tsx +5 -4
  108. package/src/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.test.tsx +94 -192
  109. package/src/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.ts +21 -21
  110. package/src/ProfileView/components/Toolbars/MultiLevelDropdown.tsx +24 -25
  111. package/src/ProfileView/components/Toolbars/TableColumnsDropdown.tsx +4 -5
  112. package/src/ProfileView/components/Toolbars/index.tsx +3 -3
  113. package/src/ProfileView/components/ViewSelector/index.tsx +9 -16
  114. package/src/ProfileView/context/DashboardContext.tsx +6 -6
  115. package/src/ProfileView/hooks/useResetFlameGraphState.ts +6 -4
  116. package/src/ProfileView/hooks/useResetStateOnProfileTypeChange.ts +24 -26
  117. package/src/ProfileView/hooks/useResetStateOnSeriesChange.ts +16 -8
  118. package/src/ProfileView/hooks/useVisualizationState.ts +61 -69
  119. package/src/ProfileViewWithData.tsx +29 -35
  120. package/src/Sandwich/index.tsx +4 -3
  121. package/src/SourceView/index.tsx +4 -2
  122. package/src/SourceView/useSelectedLineRange.ts +34 -19
  123. package/src/Table/MoreDropdown.tsx +9 -11
  124. package/src/Table/TableContextMenu.tsx +10 -13
  125. package/src/Table/hooks/useTableConfiguration.tsx +3 -4
  126. package/src/Table/index.tsx +12 -21
  127. package/src/TopTable/index.tsx +3 -4
  128. package/src/hooks/urlParsers.ts +38 -0
  129. package/src/hooks/useColorBy.ts +42 -0
  130. package/src/hooks/useCompareModeMeta.ts +61 -91
  131. package/src/hooks/useDashboardItems.ts +46 -0
  132. package/src/hooks/useQueryState.test.tsx +275 -345
  133. package/src/hooks/useQueryState.ts +153 -120
  134. package/src/index.tsx +16 -15
  135. package/src/useSumBy.ts +3 -3
@@ -1,5 +1,4 @@
1
1
  import { ProfileTypesResponse } from '@parca/client';
2
- import { type NavigateFunction } from '@parca/utilities';
3
2
  import { QuerySelection } from '../ProfileSelector';
4
3
  interface Props {
5
4
  selectedProfileName: string;
@@ -7,10 +6,9 @@ interface Props {
7
6
  setProfileName: (name: string) => void;
8
7
  setQueryExpression: () => void;
9
8
  querySelection: QuerySelection;
10
- navigateTo: NavigateFunction;
11
9
  loading: boolean;
12
10
  defaultProfileType?: string;
13
11
  }
14
- export declare const useAutoQuerySelector: ({ selectedProfileName, profileTypesData, setProfileName, setQueryExpression, querySelection, navigateTo, loading, defaultProfileType, }: Props) => void;
12
+ export declare const useAutoQuerySelector: ({ selectedProfileName, profileTypesData, setProfileName, setQueryExpression, querySelection, loading, defaultProfileType, }: Props) => void;
15
13
  export {};
16
14
  //# sourceMappingURL=useAutoQuerySelector.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAutoQuerySelector.d.ts","sourceRoot":"","sources":["../../src/ProfileSelector/useAutoQuerySelector.ts"],"names":[],"mappings":"AAeA,OAAO,EAAC,oBAAoB,EAAC,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAC,KAAK,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAGlD,UAAU,KAAK;IACb,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gBAAgB,EAAE,oBAAoB,GAAG,SAAS,CAAC;IACnD,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,cAAc,EAAE,cAAc,CAAC;IAC/B,UAAU,EAAE,gBAAgB,CAAC;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,oBAAoB,GAAI,yIASlC,KAAK,KAAG,IAoKV,CAAC"}
1
+ {"version":3,"file":"useAutoQuerySelector.d.ts","sourceRoot":"","sources":["../../src/ProfileSelector/useAutoQuerySelector.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAC,oBAAoB,EAAC,MAAM,eAAe,CAAC;AAInD,OAAO,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAKlD,UAAU,KAAK;IACb,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gBAAgB,EAAE,oBAAoB,GAAG,SAAS,CAAC;IACnD,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,cAAc,EAAE,cAAc,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,oBAAoB,GAAI,6HAQlC,KAAK,KAAG,IAyLV,CAAC"}
@@ -1,13 +1,13 @@
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
1
  function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
3
2
  function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
4
3
  function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
5
4
  function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
6
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
7
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8
- 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; }
9
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
10
- 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
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
6
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
7
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
8
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
9
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
10
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
11
11
  import { c as _c } from "react-compiler-runtime";
12
12
  // Copyright 2022 The Parca Authors
13
13
  // Licensed under the Apache License, Version 2.0 (the "License");
@@ -23,49 +23,71 @@ import { c as _c } from "react-compiler-runtime";
23
23
  // limitations under the License.
24
24
 
25
25
  import { useEffect, useRef } from 'react';
26
+ import { useQueryStates } from 'nuqs';
26
27
  import { selectAutoQuery, setAutoQuery, useAppDispatch, useAppSelector } from '@parca/store';
27
- import { ProfileSelectionFromParams, SuffixParams } from '..';
28
+ import { ProfileSelectionFromParams } from '..';
28
29
  import { constructProfileName } from '../ProfileTypeSelector';
30
+ import { boolParam, stringParam } from '../hooks/urlParsers';
31
+ import { useDashboardItems } from '../hooks/useDashboardItems';
29
32
  export var useAutoQuerySelector = function useAutoQuerySelector(t0) {
30
- var $ = _c(42);
33
+ var $ = _c(49);
31
34
  var selectedProfileName = t0.selectedProfileName,
32
35
  profileTypesData = t0.profileTypesData,
33
36
  setProfileName = t0.setProfileName,
34
37
  setQueryExpression = t0.setQueryExpression,
35
38
  querySelection = t0.querySelection,
36
- navigateTo = t0.navigateTo,
37
39
  loading = t0.loading,
38
40
  defaultProfileType = t0.defaultProfileType;
39
41
  var autoQuery = useAppSelector(selectAutoQuery);
40
42
  var dispatch = useAppDispatch();
41
- var comparing;
42
- var expressionA;
43
+ var _useDashboardItems = useDashboardItems(),
44
+ setDashboardItems = _useDashboardItems.setDashboardItems;
43
45
  var t1;
46
+ var t2;
44
47
  if ($[0] === Symbol["for"]("react.memo_cache_sentinel")) {
45
- var queryParams = new URLSearchParams(location.search);
46
- var compareA = queryParams.get("compare_a");
47
- var compareB = queryParams.get("compare_b");
48
- comparing = compareA === "true" || compareB === "true";
49
- expressionA = queryParams.get("expression_a");
50
- t1 = queryParams.get("expression_b");
51
- $[0] = comparing;
52
- $[1] = expressionA;
53
- $[2] = t1;
48
+ t1 = {
49
+ compare_a: boolParam,
50
+ compare_b: boolParam,
51
+ expression_a: stringParam,
52
+ from_a: stringParam,
53
+ to_a: stringParam,
54
+ time_selection_a: stringParam,
55
+ sum_by_a: stringParam,
56
+ merge_from_a: stringParam,
57
+ merge_to_a: stringParam,
58
+ selection_a: stringParam,
59
+ expression_b: stringParam,
60
+ from_b: stringParam,
61
+ to_b: stringParam,
62
+ time_selection_b: stringParam,
63
+ sum_by_b: stringParam,
64
+ search_string: stringParam
65
+ };
66
+ t2 = {
67
+ history: "replace"
68
+ };
69
+ $[0] = t1;
70
+ $[1] = t2;
54
71
  } else {
55
- comparing = $[0];
56
- expressionA = $[1];
57
- t1 = $[2];
72
+ t1 = $[0];
73
+ t2 = $[1];
58
74
  }
59
- var expressionB = t1;
75
+ var _useQueryStates = useQueryStates(t1, t2),
76
+ _useQueryStates2 = _slicedToArray(_useQueryStates, 2),
77
+ compareState = _useQueryStates2[0],
78
+ setCompareParams = _useQueryStates2[1];
79
+ var comparing = compareState.compare_a === true || compareState.compare_b === true;
80
+ var expressionA = compareState.expression_a;
81
+ var expressionB = compareState.expression_b;
60
82
  var hasSetupCompareMode = useRef(false);
61
- var t2;
62
- if ($[3] !== loading || $[4] !== navigateTo || $[5] !== querySelection) {
63
- t2 = function t2() {
83
+ var t3;
84
+ if ($[2] !== comparing || $[3] !== expressionA || $[4] !== expressionB || $[5] !== loading || $[6] !== querySelection || $[7] !== setCompareParams || $[8] !== setDashboardItems) {
85
+ t3 = function t3() {
64
86
  if (loading) {
65
87
  return;
66
88
  }
67
- if (comparing && expressionA !== null && expressionA !== undefined && expressionB === null && !hasSetupCompareMode.current) {
68
- var _querySelection$merge, _querySelection$merge2, _queryA$sumBy;
89
+ if (comparing && expressionA !== null && expressionB === null && !hasSetupCompareMode.current) {
90
+ var _querySelection$merge, _querySelection$merge2, _queryA$sumBy$join, _queryA$sumBy, _profileA$HistoryPara, _profileA$HistoryPara2, _profileA$HistoryPara3;
69
91
  if (querySelection.expression === undefined) {
70
92
  return;
71
93
  }
@@ -77,55 +99,62 @@ export var useAutoQuerySelector = function useAutoQuerySelector(t0) {
77
99
  timeSelection: querySelection.timeSelection,
78
100
  sumBy: querySelection.sumBy
79
101
  };
80
- var sumBy = (_queryA$sumBy = queryA.sumBy) === null || _queryA$sumBy === void 0 ? void 0 : _queryA$sumBy.join(",");
81
- var compareQuery = {
82
- compare_a: "true",
102
+ var sumBy = (_queryA$sumBy$join = (_queryA$sumBy = queryA.sumBy) === null || _queryA$sumBy === void 0 ? void 0 : _queryA$sumBy.join(",")) !== null && _queryA$sumBy$join !== void 0 ? _queryA$sumBy$join : null;
103
+ var mergeFromA = profileA != null ? (_profileA$HistoryPara = profileA.HistoryParams().merge_from) === null || _profileA$HistoryPara === void 0 ? void 0 : _profileA$HistoryPara.toString() : null;
104
+ var mergeToA = profileA != null ? (_profileA$HistoryPara2 = profileA.HistoryParams().merge_to) === null || _profileA$HistoryPara2 === void 0 ? void 0 : _profileA$HistoryPara2.toString() : null;
105
+ var selectionA = profileA != null ? (_profileA$HistoryPara3 = profileA.HistoryParams().selection) === null || _profileA$HistoryPara3 === void 0 ? void 0 : _profileA$HistoryPara3.toString() : null;
106
+ hasSetupCompareMode.current = true;
107
+ setCompareParams({
108
+ compare_a: true,
109
+ compare_b: true,
83
110
  expression_a: queryA.expression,
84
111
  from_a: queryA.from.toString(),
85
112
  to_a: queryA.to.toString(),
86
113
  time_selection_a: queryA.timeSelection,
87
- compare_b: "true",
114
+ sum_by_a: sumBy,
115
+ merge_from_a: mergeFromA,
116
+ merge_to_a: mergeToA,
117
+ selection_a: selectionA,
88
118
  expression_b: queryA.expression,
89
119
  from_b: queryA.from.toString(),
90
120
  to_b: queryA.to.toString(),
91
- time_selection_b: queryA.timeSelection
92
- };
93
- if (sumBy != null) {
94
- compareQuery.sum_by_a = sumBy;
95
- compareQuery.sum_by_b = sumBy;
96
- }
97
- if (profileA != null) {
98
- compareQuery = _objectSpread(_objectSpread({}, SuffixParams(profileA.HistoryParams(), "_a")), compareQuery);
99
- }
100
- hasSetupCompareMode.current = true;
101
- navigateTo("/", _objectSpread(_objectSpread({}, compareQuery), {}, {
102
- search_string: "",
103
- dashboard_items: ["flamegraph"]
104
- }));
121
+ time_selection_b: queryA.timeSelection,
122
+ sum_by_b: sumBy,
123
+ search_string: null
124
+ });
125
+ setDashboardItems(["flamegraph"]);
105
126
  }
106
127
  };
107
- $[3] = loading;
108
- $[4] = navigateTo;
109
- $[5] = querySelection;
110
- $[6] = t2;
128
+ $[2] = comparing;
129
+ $[3] = expressionA;
130
+ $[4] = expressionB;
131
+ $[5] = loading;
132
+ $[6] = querySelection;
133
+ $[7] = setCompareParams;
134
+ $[8] = setDashboardItems;
135
+ $[9] = t3;
111
136
  } else {
112
- t2 = $[6];
137
+ t3 = $[9];
113
138
  }
114
- var t3;
115
- if ($[7] !== dispatch || $[8] !== loading || $[9] !== navigateTo || $[10] !== querySelection) {
116
- t3 = [comparing, querySelection, navigateTo, expressionA, expressionB, dispatch, loading];
117
- $[7] = dispatch;
118
- $[8] = loading;
119
- $[9] = navigateTo;
120
- $[10] = querySelection;
121
- $[11] = t3;
139
+ var t4;
140
+ if ($[10] !== comparing || $[11] !== dispatch || $[12] !== expressionA || $[13] !== expressionB || $[14] !== loading || $[15] !== querySelection || $[16] !== setCompareParams || $[17] !== setDashboardItems) {
141
+ t4 = [comparing, querySelection, expressionA, expressionB, dispatch, loading, setCompareParams, setDashboardItems];
142
+ $[10] = comparing;
143
+ $[11] = dispatch;
144
+ $[12] = expressionA;
145
+ $[13] = expressionB;
146
+ $[14] = loading;
147
+ $[15] = querySelection;
148
+ $[16] = setCompareParams;
149
+ $[17] = setDashboardItems;
150
+ $[18] = t4;
122
151
  } else {
123
- t3 = $[11];
152
+ t4 = $[18];
124
153
  }
125
- useEffect(t2, t3);
126
- var t4;
127
- if ($[12] !== autoQuery || $[13] !== defaultProfileType || $[14] !== dispatch || $[15] !== profileTypesData || $[16] !== selectedProfileName.length || $[17] !== setProfileName) {
128
- t4 = function t4() {
154
+ useEffect(t3, t4);
155
+ var t5;
156
+ if ($[19] !== autoQuery || $[20] !== defaultProfileType || $[21] !== dispatch || $[22] !== profileTypesData || $[23] !== selectedProfileName.length || $[24] !== setProfileName) {
157
+ t5 = function t5() {
129
158
  _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
130
159
  var profileType;
131
160
  return _regenerator().w(function (_context) {
@@ -180,34 +209,34 @@ export var useAutoQuerySelector = function useAutoQuerySelector(t0) {
180
209
  }, _callee);
181
210
  }))();
182
211
  };
183
- $[12] = autoQuery;
184
- $[13] = defaultProfileType;
185
- $[14] = dispatch;
186
- $[15] = profileTypesData;
187
- $[16] = selectedProfileName.length;
188
- $[17] = setProfileName;
189
- $[18] = t4;
190
- } else {
191
- t4 = $[18];
192
- }
193
- var t5;
194
- if ($[19] !== autoQuery || $[20] !== defaultProfileType || $[21] !== dispatch || $[22] !== profileTypesData || $[23] !== selectedProfileName || $[24] !== setProfileName || $[25] !== setQueryExpression) {
195
- t5 = [profileTypesData, selectedProfileName, autoQuery, dispatch, setQueryExpression, setProfileName, defaultProfileType];
196
212
  $[19] = autoQuery;
197
213
  $[20] = defaultProfileType;
198
214
  $[21] = dispatch;
199
215
  $[22] = profileTypesData;
200
- $[23] = selectedProfileName;
216
+ $[23] = selectedProfileName.length;
201
217
  $[24] = setProfileName;
202
- $[25] = setQueryExpression;
203
- $[26] = t5;
218
+ $[25] = t5;
204
219
  } else {
205
- t5 = $[26];
220
+ t5 = $[25];
206
221
  }
207
- useEffect(t4, t5);
208
222
  var t6;
209
- if ($[27] !== autoQuery || $[28] !== dispatch || $[29] !== loading || $[30] !== profileTypesData || $[31] !== selectedProfileName.length || $[32] !== setQueryExpression) {
210
- t6 = function t6() {
223
+ if ($[26] !== autoQuery || $[27] !== defaultProfileType || $[28] !== dispatch || $[29] !== profileTypesData || $[30] !== selectedProfileName || $[31] !== setProfileName || $[32] !== setQueryExpression) {
224
+ t6 = [profileTypesData, selectedProfileName, autoQuery, dispatch, setQueryExpression, setProfileName, defaultProfileType];
225
+ $[26] = autoQuery;
226
+ $[27] = defaultProfileType;
227
+ $[28] = dispatch;
228
+ $[29] = profileTypesData;
229
+ $[30] = selectedProfileName;
230
+ $[31] = setProfileName;
231
+ $[32] = setQueryExpression;
232
+ $[33] = t6;
233
+ } else {
234
+ t6 = $[33];
235
+ }
236
+ useEffect(t5, t6);
237
+ var t7;
238
+ if ($[34] !== autoQuery || $[35] !== dispatch || $[36] !== loading || $[37] !== profileTypesData || $[38] !== selectedProfileName.length || $[39] !== setQueryExpression) {
239
+ t7 = function t7() {
211
240
  _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
212
241
  return _regenerator().w(function (_context2) {
213
242
  while (1) switch (_context2.n) {
@@ -226,31 +255,31 @@ export var useAutoQuerySelector = function useAutoQuerySelector(t0) {
226
255
  }, _callee2);
227
256
  }))();
228
257
  };
229
- $[27] = autoQuery;
230
- $[28] = dispatch;
231
- $[29] = loading;
232
- $[30] = profileTypesData;
233
- $[31] = selectedProfileName.length;
234
- $[32] = setQueryExpression;
235
- $[33] = t6;
236
- } else {
237
- t6 = $[33];
238
- }
239
- var t7;
240
- if ($[34] !== autoQuery || $[35] !== dispatch || $[36] !== loading || $[37] !== profileTypesData || $[38] !== selectedProfileName || $[39] !== setProfileName || $[40] !== setQueryExpression) {
241
- t7 = [profileTypesData, setQueryExpression, autoQuery, setProfileName, dispatch, selectedProfileName, loading];
242
258
  $[34] = autoQuery;
243
259
  $[35] = dispatch;
244
260
  $[36] = loading;
245
261
  $[37] = profileTypesData;
246
- $[38] = selectedProfileName;
247
- $[39] = setProfileName;
248
- $[40] = setQueryExpression;
249
- $[41] = t7;
262
+ $[38] = selectedProfileName.length;
263
+ $[39] = setQueryExpression;
264
+ $[40] = t7;
265
+ } else {
266
+ t7 = $[40];
267
+ }
268
+ var t8;
269
+ if ($[41] !== autoQuery || $[42] !== dispatch || $[43] !== loading || $[44] !== profileTypesData || $[45] !== selectedProfileName || $[46] !== setProfileName || $[47] !== setQueryExpression) {
270
+ t8 = [profileTypesData, setQueryExpression, autoQuery, setProfileName, dispatch, selectedProfileName, loading];
271
+ $[41] = autoQuery;
272
+ $[42] = dispatch;
273
+ $[43] = loading;
274
+ $[44] = profileTypesData;
275
+ $[45] = selectedProfileName;
276
+ $[46] = setProfileName;
277
+ $[47] = setQueryExpression;
278
+ $[48] = t8;
250
279
  } else {
251
- t7 = $[41];
280
+ t8 = $[48];
252
281
  }
253
- useEffect(t6, t7);
282
+ useEffect(t7, t8);
254
283
  };
255
284
  function _temp(type) {
256
285
  return type.name === "parca_agent" && type.sampleType === "samples" && type.delta;
@@ -1 +1 @@
1
- {"version":3,"file":"SortByDropdown.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/ActionButtons/SortByDropdown.tsx"],"names":[],"mappings":"AAsBA,QAAA,MAAM,cAAc,QAAO,KAAK,CAAC,GAAG,CAAC,OA2DpC,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"SortByDropdown.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/ActionButtons/SortByDropdown.tsx"],"names":[],"mappings":"AAyBA,QAAA,MAAM,cAAc,QAAO,KAAK,CAAC,GAAG,CAAC,OA4DpC,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -18,25 +18,25 @@ import { c as _c } from "react-compiler-runtime";
18
18
  // See the License for the specific language governing permissions and
19
19
  // limitations under the License.
20
20
 
21
- import { Select, useURLState } from '@parca/components';
21
+ import { useQueryState } from 'nuqs';
22
+ import { Select } from '@parca/components';
22
23
  import { FIELD_CUMULATIVE, FIELD_DIFF, FIELD_FUNCTION_NAME } from '../../../ProfileFlameGraph/FlameGraphArrow';
24
+ import { stringParam } from '../../../hooks/urlParsers';
23
25
  import { useProfileViewContext } from '../../context/ProfileViewContext';
24
26
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
25
27
  var SortByDropdown = function SortByDropdown() {
26
28
  var $ = _c(13);
27
29
  var t0;
28
30
  if ($[0] === Symbol["for"]("react.memo_cache_sentinel")) {
29
- t0 = {
30
- defaultValue: FIELD_FUNCTION_NAME
31
- };
31
+ t0 = stringParam.withDefault(FIELD_FUNCTION_NAME);
32
32
  $[0] = t0;
33
33
  } else {
34
34
  t0 = $[0];
35
35
  }
36
- var _useURLState = useURLState("sort_by", t0),
37
- _useURLState2 = _slicedToArray(_useURLState, 2),
38
- storeSortBy = _useURLState2[0],
39
- setStoreSortBy = _useURLState2[1];
36
+ var _useQueryState = useQueryState("sort_by", t0),
37
+ _useQueryState2 = _slicedToArray(_useQueryState, 2),
38
+ storeSortBy = _useQueryState2[0],
39
+ setStoreSortBy = _useQueryState2[1];
40
40
  var _useProfileViewContex = useProfileViewContext(),
41
41
  compareMode = _useProfileViewContex.compareMode;
42
42
  var t1;
@@ -118,38 +118,37 @@ var SortByDropdown = function SortByDropdown() {
118
118
  } else {
119
119
  t6 = $[6];
120
120
  }
121
- var t7 = storeSortBy;
122
- var t8;
121
+ var t7;
123
122
  if ($[7] !== setStoreSortBy) {
124
- t8 = function t8(key) {
125
- return setStoreSortBy(key);
123
+ t7 = function t7(key) {
124
+ return void setStoreSortBy(key);
126
125
  };
127
126
  $[7] = setStoreSortBy;
128
- $[8] = t8;
127
+ $[8] = t7;
129
128
  } else {
130
- t8 = $[8];
129
+ t7 = $[8];
131
130
  }
132
- var t9;
133
- if ($[9] !== t6 || $[10] !== t7 || $[11] !== t8) {
134
- t9 = /*#__PURE__*/_jsxs("div", {
131
+ var t8;
132
+ if ($[9] !== storeSortBy || $[10] !== t6 || $[11] !== t7) {
133
+ t8 = /*#__PURE__*/_jsxs("div", {
135
134
  children: [t1, /*#__PURE__*/_jsx(Select, {
136
135
  className: "!px-3",
137
136
  items: t6,
138
- selectedKey: t7,
139
- onSelection: t8,
137
+ selectedKey: storeSortBy,
138
+ onSelection: t7,
140
139
  placeholder: "Sort By",
141
140
  primary: false,
142
141
  disabled: false,
143
142
  id: "h-sort-by-filter"
144
143
  })]
145
144
  });
146
- $[9] = t6;
147
- $[10] = t7;
148
- $[11] = t8;
149
- $[12] = t9;
145
+ $[9] = storeSortBy;
146
+ $[10] = t6;
147
+ $[11] = t7;
148
+ $[12] = t8;
150
149
  } else {
151
- t9 = $[12];
150
+ t8 = $[12];
152
151
  }
153
- return t9;
152
+ return t8;
154
153
  };
155
154
  export default SortByDropdown;
@@ -1 +1 @@
1
- {"version":3,"file":"ColorStackLegend.d.ts","sourceRoot":"","sources":["../../../src/ProfileView/components/ColorStackLegend.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgB,MAAM,OAAO,CAAC;AAarC,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,QAAA,MAAM,gBAAgB,GAAI,oCAA0C,KAAK,KAAG,KAAK,CAAC,GAAG,CAAC,OAuGrF,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"ColorStackLegend.d.ts","sourceRoot":"","sources":["../../../src/ProfileView/components/ColorStackLegend.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgB,MAAM,OAAO,CAAC;AAarC,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,QAAA,MAAM,gBAAgB,GAAI,oCAA0C,KAAK,KAAG,KAAK,CAAC,GAAG,CAAC,OAqGrF,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -21,11 +21,11 @@ import { c as _c } from "react-compiler-runtime";
21
21
  import React, { useMemo } from 'react';
22
22
  import { Icon } from '@iconify/react';
23
23
  import cx from 'classnames';
24
- import { useURLState } from '@parca/components';
25
24
  import { USER_PREFERENCES, useCurrentColorProfile, useUserPreference } from '@parca/hooks';
26
25
  import { EVERYTHING_ELSE, selectDarkMode, useAppSelector } from '@parca/store';
27
26
  import { getMappingColors } from '../../ProfileFlameGraph/FlameGraphArrow';
28
27
  import useMappingList from '../../ProfileFlameGraph/FlameGraphArrow/useMappingList';
28
+ import { useColorBy } from '../../hooks/useColorBy';
29
29
  import { useProfileFilters } from './ProfileFilters/useProfileFilters';
30
30
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
31
31
  var ColorStackLegend = function ColorStackLegend(t0) {
@@ -39,10 +39,8 @@ var ColorStackLegend = function ColorStackLegend(t0) {
39
39
  var _useUserPreference = useUserPreference(USER_PREFERENCES.FLAMEGRAPH_COLOR_PROFILE.key),
40
40
  _useUserPreference2 = _slicedToArray(_useUserPreference, 1),
41
41
  colorProfileName = _useUserPreference2[0];
42
- var _useURLState = useURLState("color_by"),
43
- _useURLState2 = _slicedToArray(_useURLState, 1),
44
- colorByValue = _useURLState2[0];
45
- var colorBy = colorByValue === "binary" || colorByValue === undefined ? "binary" : "filename";
42
+ var _useColorBy = useColorBy(),
43
+ colorBy = _useColorBy.colorBy;
46
44
  var _useProfileFilters = useProfileFilters(),
47
45
  appliedFilters = _useProfileFilters.appliedFilters,
48
46
  removeExcludeBinary = _useProfileFilters.removeExcludeBinary,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/InvertCallStack/index.tsx"],"names":[],"mappings":"AAoBA,QAAA,MAAM,eAAe,QAAO,GAAG,CAAC,OA0B/B,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ProfileView/components/InvertCallStack/index.tsx"],"names":[],"mappings":"AAsBA,QAAA,MAAM,eAAe,QAAO,GAAG,CAAC,OAyB/B,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -25,93 +25,93 @@ import { c as _c } from "react-compiler-runtime";
25
25
  // limitations under the License.
26
26
 
27
27
  import { Icon } from '@iconify/react';
28
- import { Button, useURLState } from '@parca/components';
28
+ import { useQueryState } from 'nuqs';
29
+ import { Button } from '@parca/components';
29
30
  import { TEST_IDS, testId } from '@parca/test-utils';
31
+ import { invertCallStackParser } from '../../../hooks/urlParsers';
30
32
  import { useResetFlameGraphState } from '../../hooks/useResetFlameGraphState';
31
33
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
32
34
  var InvertCallStack = function InvertCallStack() {
33
35
  var $ = _c(14);
34
- var _useURLState = useURLState("invert_call_stack"),
35
- _useURLState2 = _slicedToArray(_useURLState, 2),
36
- t0 = _useURLState2[0],
37
- setInvertStack = _useURLState2[1];
38
- var invertStack = t0 === undefined ? "" : t0;
39
- var isInvert = invertStack === "true";
36
+ var _useQueryState = useQueryState("invert_call_stack", invertCallStackParser),
37
+ _useQueryState2 = _slicedToArray(_useQueryState, 2),
38
+ isInvert = _useQueryState2[0],
39
+ setInvertStack = _useQueryState2[1];
40
40
  var resetFlameGraphState = useResetFlameGraphState();
41
- var t1;
41
+ var t0;
42
42
  if ($[0] !== resetFlameGraphState || $[1] !== setInvertStack) {
43
- t1 = function t1(value) {
44
- setInvertStack(value ? "true" : "");
43
+ t0 = function t0(value) {
44
+ setInvertStack(value);
45
45
  resetFlameGraphState();
46
46
  };
47
47
  $[0] = resetFlameGraphState;
48
48
  $[1] = setInvertStack;
49
- $[2] = t1;
49
+ $[2] = t0;
50
50
  } else {
51
- t1 = $[2];
51
+ t0 = $[2];
52
52
  }
53
- var handleSetInvert = t1;
54
- var t2;
53
+ var handleSetInvert = t0;
54
+ var t1;
55
55
  if ($[3] === Symbol["for"]("react.memo_cache_sentinel")) {
56
- t2 = /*#__PURE__*/_jsx("label", {
56
+ t1 = /*#__PURE__*/_jsx("label", {
57
57
  className: "text-sm",
58
58
  children: "\xA0"
59
59
  });
60
- $[3] = t2;
60
+ $[3] = t1;
61
61
  } else {
62
- t2 = $[3];
62
+ t1 = $[3];
63
63
  }
64
- var t3;
64
+ var t2;
65
65
  if ($[4] !== handleSetInvert || $[5] !== isInvert) {
66
- t3 = function t3() {
66
+ t2 = function t2() {
67
67
  return handleSetInvert(!isInvert);
68
68
  };
69
69
  $[4] = handleSetInvert;
70
70
  $[5] = isInvert;
71
- $[6] = t3;
71
+ $[6] = t2;
72
72
  } else {
73
- t3 = $[6];
73
+ t2 = $[6];
74
74
  }
75
- var t4;
75
+ var t3;
76
76
  if ($[7] === Symbol["for"]("react.memo_cache_sentinel")) {
77
- t4 = testId(TEST_IDS.INVERT_CALL_STACK_BUTTON);
78
- $[7] = t4;
77
+ t3 = testId(TEST_IDS.INVERT_CALL_STACK_BUTTON);
78
+ $[7] = t3;
79
79
  } else {
80
- t4 = $[7];
80
+ t3 = $[7];
81
81
  }
82
- var t5 = isInvert ? "ph:sort-ascending" : "ph:sort-descending";
83
- var t6;
84
- if ($[8] !== t5) {
85
- t6 = /*#__PURE__*/_jsx(Icon, {
86
- icon: t5,
82
+ var t4 = isInvert ? "ph:sort-ascending" : "ph:sort-descending";
83
+ var t5;
84
+ if ($[8] !== t4) {
85
+ t5 = /*#__PURE__*/_jsx(Icon, {
86
+ icon: t4,
87
87
  className: "h-4 w-4"
88
88
  });
89
- $[8] = t5;
90
- $[9] = t6;
89
+ $[8] = t4;
90
+ $[9] = t5;
91
91
  } else {
92
- t6 = $[9];
92
+ t5 = $[9];
93
93
  }
94
- var t7 = isInvert ? "Original" : "Invert";
95
- var t8;
96
- if ($[10] !== t3 || $[11] !== t6 || $[12] !== t7) {
97
- t8 = /*#__PURE__*/_jsxs("div", {
94
+ var t6 = isInvert ? "Original" : "Invert";
95
+ var t7;
96
+ if ($[10] !== t2 || $[11] !== t5 || $[12] !== t6) {
97
+ t7 = /*#__PURE__*/_jsxs("div", {
98
98
  className: "flex flex-col",
99
- children: [t2, /*#__PURE__*/_jsxs(Button, _objectSpread(_objectSpread({
99
+ children: [t1, /*#__PURE__*/_jsxs(Button, _objectSpread(_objectSpread({
100
100
  variant: "neutral",
101
101
  className: "flex items-center gap-2 whitespace-nowrap",
102
- onClick: t3,
102
+ onClick: t2,
103
103
  id: "h-invert-call-stack"
104
- }, t4), {}, {
105
- children: [t6, t7, " Call Stack"]
104
+ }, t3), {}, {
105
+ children: [t5, t6, " Call Stack"]
106
106
  }))]
107
107
  });
108
- $[10] = t3;
109
- $[11] = t6;
110
- $[12] = t7;
111
- $[13] = t8;
108
+ $[10] = t2;
109
+ $[11] = t5;
110
+ $[12] = t6;
111
+ $[13] = t7;
112
112
  } else {
113
- t8 = $[13];
113
+ t7 = $[13];
114
114
  }
115
- return t8;
115
+ return t7;
116
116
  };
117
117
  export default InvertCallStack;
@@ -1,9 +1,8 @@
1
- import { type ParamValueSetterCustom } from '@parca/components';
2
1
  import { type ProfileFilter } from './useProfileFilters';
3
2
  export declare const decodeProfileFilters: (encoded: string) => ProfileFilter[];
4
3
  export declare const useProfileFiltersUrlState: () => {
5
4
  appliedFilters: ProfileFilter[];
6
- setAppliedFilters: ParamValueSetterCustom<ProfileFilter[]>;
5
+ setAppliedFilters: (filters: ProfileFilter[]) => void;
7
6
  forceApplyFilters: (filters: ProfileFilter[]) => void;
8
7
  };
9
8
  //# sourceMappingURL=useProfileFiltersUrlState.d.ts.map