@parca/profile 0.16.261 → 0.16.263
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 +8 -0
- package/dist/SourceView/Highlighter.js +3 -4
- package/dist/useQuery.js +1 -1
- package/package.json +7 -7
- package/src/SourceView/Highlighter.tsx +3 -4
- package/src/useQuery.tsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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.16.263](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.262...@parca/profile@0.16.263) (2023-09-19)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @parca/profile
|
|
9
|
+
|
|
10
|
+
## [0.16.262](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.261...@parca/profile@0.16.262) (2023-09-19)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @parca/profile
|
|
13
|
+
|
|
6
14
|
## [0.16.261](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.260...@parca/profile@0.16.261) (2023-09-18)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @parca/profile
|
|
@@ -17,8 +17,7 @@ import { scaleLinear } from 'd3-scale';
|
|
|
17
17
|
import SyntaxHighlighter, { createElement } from 'react-syntax-highlighter';
|
|
18
18
|
import { atomOneDark, atomOneLight } from 'react-syntax-highlighter/dist/esm/styles/hljs';
|
|
19
19
|
import { Tooltip } from 'react-tooltip';
|
|
20
|
-
import { useURLState } from '@parca/components';
|
|
21
|
-
import { selectDarkMode, useAppSelector } from '@parca/store';
|
|
20
|
+
import { useParcaContext, useURLState } from '@parca/components';
|
|
22
21
|
import { useProfileViewContext } from '../ProfileView/ProfileViewContext';
|
|
23
22
|
import { LineNo } from './LineNo';
|
|
24
23
|
import { langaugeFromFile } from './lang-detector';
|
|
@@ -76,11 +75,11 @@ export const profileAwareRenderer = (cumulative, flat, total, filtered) => {
|
|
|
76
75
|
};
|
|
77
76
|
};
|
|
78
77
|
export const Highlighter = ({ file, content, renderer }) => {
|
|
79
|
-
const isDarkMode =
|
|
78
|
+
const { isDarkMode } = useParcaContext();
|
|
80
79
|
const language = useMemo(() => langaugeFromFile(file), [file]);
|
|
81
80
|
return (_jsxs("div", { className: "relative", children: [_jsxs("div", { className: "flex gap-2 text-xs", children: [_jsx("div", { className: cx('text-right', charsToWidth(content
|
|
82
81
|
.split(
|
|
83
82
|
// prettier-ignore
|
|
84
83
|
'\n')
|
|
85
|
-
.length.toString().length)), children: "Line" }), _jsxs("div", { className: "flex gap-3", children: [_jsx("div", { children: "Cumulative" }), _jsx("div", { children: "Flat" }), _jsx("div", { children: "Source" })] })] }), _jsx("div", { className: "text-xs", children: _jsx(SyntaxHighlighter, { language: language, style: isDarkMode ? atomOneDark : atomOneLight, showLineNumbers: true, renderer: renderer, customStyle: { padding: 0, height: '
|
|
84
|
+
.length.toString().length)), children: "Line" }), _jsxs("div", { className: "flex gap-3", children: [_jsx("div", { children: "Cumulative" }), _jsx("div", { children: "Flat" }), _jsx("div", { children: "Source" })] })] }), _jsx("div", { className: "text-xs", children: _jsx(SyntaxHighlighter, { language: language, style: isDarkMode ? atomOneDark : atomOneLight, showLineNumbers: true, renderer: renderer, customStyle: { padding: 0, height: '90vh' }, children: content }) })] }));
|
|
86
85
|
};
|
package/dist/useQuery.js
CHANGED
|
@@ -23,8 +23,8 @@ export const useQuery = (client, profileSource, reportType, options) => {
|
|
|
23
23
|
options?.nodeTrimThreshold,
|
|
24
24
|
options?.groupBy,
|
|
25
25
|
options?.sourceBuildID,
|
|
26
|
-
options?.sourceFilename,
|
|
27
26
|
options?.sourceOnly,
|
|
27
|
+
options?.sourceOnly === true ? '' : options?.sourceFilename,
|
|
28
28
|
],
|
|
29
29
|
queryFn: async () => {
|
|
30
30
|
const req = profileSource.QueryRequest();
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parca/profile",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.263",
|
|
4
4
|
"description": "Profile viewing libraries",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@parca/client": "^0.16.
|
|
7
|
-
"@parca/components": "^0.16.
|
|
6
|
+
"@parca/client": "^0.16.88",
|
|
7
|
+
"@parca/components": "^0.16.199",
|
|
8
8
|
"@parca/dynamicsize": "^0.16.54",
|
|
9
|
-
"@parca/hooks": "^0.0.
|
|
9
|
+
"@parca/hooks": "^0.0.25",
|
|
10
10
|
"@parca/parser": "^0.16.55",
|
|
11
|
-
"@parca/store": "^0.16.
|
|
12
|
-
"@parca/utilities": "^0.0.
|
|
11
|
+
"@parca/store": "^0.16.105",
|
|
12
|
+
"@parca/utilities": "^0.0.33",
|
|
13
13
|
"@tanstack/react-query": "^4.0.5",
|
|
14
14
|
"@types/react-beautiful-dnd": "^13.1.3",
|
|
15
15
|
"apache-arrow": "^12.0.0",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"access": "public",
|
|
50
50
|
"registry": "https://registry.npmjs.org/"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "930dbd2d3c97041a69d7edfc2f9531ca78388d39"
|
|
53
53
|
}
|
|
@@ -20,8 +20,7 @@ import SyntaxHighlighter, {createElement, type createElementProps} from 'react-s
|
|
|
20
20
|
import {atomOneDark, atomOneLight} from 'react-syntax-highlighter/dist/esm/styles/hljs';
|
|
21
21
|
import {Tooltip} from 'react-tooltip';
|
|
22
22
|
|
|
23
|
-
import {useURLState} from '@parca/components';
|
|
24
|
-
import {selectDarkMode, useAppSelector} from '@parca/store';
|
|
23
|
+
import {useParcaContext, useURLState} from '@parca/components';
|
|
25
24
|
|
|
26
25
|
import {useProfileViewContext} from '../ProfileView/ProfileViewContext';
|
|
27
26
|
import {LineNo} from './LineNo';
|
|
@@ -170,7 +169,7 @@ export const profileAwareRenderer = (
|
|
|
170
169
|
};
|
|
171
170
|
|
|
172
171
|
export const Highlighter = ({file, content, renderer}: HighlighterProps): JSX.Element => {
|
|
173
|
-
const isDarkMode =
|
|
172
|
+
const {isDarkMode} = useParcaContext();
|
|
174
173
|
const language = useMemo(() => langaugeFromFile(file), [file]);
|
|
175
174
|
|
|
176
175
|
return (
|
|
@@ -203,7 +202,7 @@ export const Highlighter = ({file, content, renderer}: HighlighterProps): JSX.El
|
|
|
203
202
|
style={isDarkMode ? atomOneDark : atomOneLight}
|
|
204
203
|
showLineNumbers
|
|
205
204
|
renderer={renderer}
|
|
206
|
-
customStyle={{padding: 0, height: '
|
|
205
|
+
customStyle={{padding: 0, height: '90vh'}}
|
|
207
206
|
>
|
|
208
207
|
{content}
|
|
209
208
|
</SyntaxHighlighter>
|
package/src/useQuery.tsx
CHANGED
|
@@ -50,8 +50,8 @@ export const useQuery = (
|
|
|
50
50
|
options?.nodeTrimThreshold,
|
|
51
51
|
options?.groupBy,
|
|
52
52
|
options?.sourceBuildID,
|
|
53
|
-
options?.sourceFilename,
|
|
54
53
|
options?.sourceOnly,
|
|
54
|
+
options?.sourceOnly === true ? '' : options?.sourceFilename,
|
|
55
55
|
],
|
|
56
56
|
queryFn: async () => {
|
|
57
57
|
const req = profileSource.QueryRequest();
|