@parca/profile 0.19.76 → 0.19.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.19.77](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.76...@parca/profile@0.19.77) (2025-11-19)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @parca/profile
|
|
9
|
+
|
|
6
10
|
## [0.19.76](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.75...@parca/profile@0.19.76) (2025-11-19)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @parca/profile
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useQueryState.d.ts","sourceRoot":"","sources":["../../src/hooks/useQueryState.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAC,KAAK,EAAC,MAAM,eAAe,CAAC;AAEpC,OAAO,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAC,gBAAgB,EAA8B,aAAa,EAAC,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"useQueryState.d.ts","sourceRoot":"","sources":["../../src/hooks/useQueryState.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAC,KAAK,EAAC,MAAM,eAAe,CAAC;AAEpC,OAAO,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAC,gBAAgB,EAA8B,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAI7F,UAAU,oBAAoB;IAC5B,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,UAAU,mBAAmB;IAE3B,cAAc,EAAE,cAAc,CAAC;IAG/B,cAAc,EAAE,cAAc,CAAC;IAG/B,kBAAkB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACnE,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7E,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,SAAS,KAAK,IAAI,CAAC;IACrD,mBAAmB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAG7C,WAAW,EAAE,CAAC,kBAAkB,CAAC,EAAE;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAC,KAAK,IAAI,CAAC;IAG9F,gBAAgB,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAG1C,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IAGpC,mBAAmB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAGhF,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,aAAa,GAAI,UAAS,oBAAyB,KAAG,mBAmWlE,CAAC"}
|
|
@@ -14,12 +14,14 @@ import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
14
14
|
import { DateTimeRange, useParcaContext, useURLState, useURLStateBatch } from '@parca/components';
|
|
15
15
|
import { Query } from '@parca/parser';
|
|
16
16
|
import { ProfileSelectionFromParams } from '../ProfileSource';
|
|
17
|
+
import { useResetFlameGraphState } from '../ProfileView/hooks/useResetFlameGraphState';
|
|
17
18
|
import { sumByToParam, useSumBy, useSumByFromParams } from '../useSumBy';
|
|
18
19
|
export const useQueryState = (options = {}) => {
|
|
19
20
|
const { queryServiceClient: queryClient } = useParcaContext();
|
|
20
21
|
const { suffix = '', defaultExpression = '', defaultTimeSelection = 'relative:minute|15', // Default to 15 minutes relative
|
|
21
22
|
defaultFrom, defaultTo, comparing = false, } = options;
|
|
22
23
|
const batchUpdates = useURLStateBatch();
|
|
24
|
+
const resetFlameGraphState = useResetFlameGraphState();
|
|
23
25
|
// URL state hooks with appropriate suffixes
|
|
24
26
|
const [expression, setExpressionState] = useURLState(`expression${suffix}`, {
|
|
25
27
|
defaultValue: defaultExpression,
|
|
@@ -204,6 +206,7 @@ export const useQueryState = (options = {}) => {
|
|
|
204
206
|
// Clear ProfileSelection for non-delta profiles
|
|
205
207
|
setSelectionParam(undefined);
|
|
206
208
|
}
|
|
209
|
+
resetFlameGraphState();
|
|
207
210
|
});
|
|
208
211
|
}, [
|
|
209
212
|
batchUpdates,
|
|
@@ -223,6 +226,7 @@ export const useQueryState = (options = {}) => {
|
|
|
223
226
|
setMergeFromState,
|
|
224
227
|
setMergeToState,
|
|
225
228
|
setSelectionParam,
|
|
229
|
+
resetFlameGraphState,
|
|
226
230
|
]);
|
|
227
231
|
// Draft setters (update local state only, or commit directly if specified)
|
|
228
232
|
const setDraftExpressionCallback = useCallback((newExpression, commit = false) => {
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parca/profile",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.77",
|
|
4
4
|
"description": "Profile viewing libraries",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@floating-ui/react": "^0.27.12",
|
|
7
7
|
"@headlessui/react": "^1.7.19",
|
|
8
8
|
"@iconify/react": "^4.0.0",
|
|
9
9
|
"@parca/client": "0.17.8",
|
|
10
|
-
"@parca/components": "0.16.
|
|
10
|
+
"@parca/components": "0.16.382",
|
|
11
11
|
"@parca/dynamicsize": "0.16.67",
|
|
12
12
|
"@parca/hooks": "0.0.108",
|
|
13
13
|
"@parca/icons": "0.16.74",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"access": "public",
|
|
80
80
|
"registry": "https://registry.npmjs.org/"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "c09ced4875b54404d8d2f7738137ad8c2d7774f2"
|
|
83
83
|
}
|
|
@@ -18,6 +18,7 @@ import {Query} from '@parca/parser';
|
|
|
18
18
|
|
|
19
19
|
import {QuerySelection} from '../ProfileSelector';
|
|
20
20
|
import {ProfileSelection, ProfileSelectionFromParams, ProfileSource} from '../ProfileSource';
|
|
21
|
+
import {useResetFlameGraphState} from '../ProfileView/hooks/useResetFlameGraphState';
|
|
21
22
|
import {sumByToParam, useSumBy, useSumByFromParams} from '../useSumBy';
|
|
22
23
|
|
|
23
24
|
interface UseQueryStateOptions {
|
|
@@ -71,6 +72,7 @@ export const useQueryState = (options: UseQueryStateOptions = {}): UseQueryState
|
|
|
71
72
|
} = options;
|
|
72
73
|
|
|
73
74
|
const batchUpdates = useURLStateBatch();
|
|
75
|
+
const resetFlameGraphState = useResetFlameGraphState();
|
|
74
76
|
|
|
75
77
|
// URL state hooks with appropriate suffixes
|
|
76
78
|
const [expression, setExpressionState] = useURLState<string>(`expression${suffix}`, {
|
|
@@ -304,6 +306,7 @@ export const useQueryState = (options: UseQueryStateOptions = {}): UseQueryState
|
|
|
304
306
|
// Clear ProfileSelection for non-delta profiles
|
|
305
307
|
setSelectionParam(undefined);
|
|
306
308
|
}
|
|
309
|
+
resetFlameGraphState();
|
|
307
310
|
});
|
|
308
311
|
},
|
|
309
312
|
[
|
|
@@ -324,6 +327,7 @@ export const useQueryState = (options: UseQueryStateOptions = {}): UseQueryState
|
|
|
324
327
|
setMergeFromState,
|
|
325
328
|
setMergeToState,
|
|
326
329
|
setSelectionParam,
|
|
330
|
+
resetFlameGraphState,
|
|
327
331
|
]
|
|
328
332
|
);
|
|
329
333
|
|