@rfkit/charts 1.16.0 → 1.17.1
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/README.md +29 -1
- package/charts/Dial/Chart.d.ts +2 -0
- package/charts/Dial/index.d.ts +4 -1
- package/components/Toolbar/primitives/styles.d.ts +3 -2
- package/hooks/useDragSelect.d.ts +2 -0
- package/index.d.ts +1 -0
- package/index.js +48 -22
- package/modules/Dial/index.d.ts +5 -1
- package/modules/Dial/render.d.ts +6 -2
- package/modules/Spectrum/BandLayer/InfoPanel.d.ts +9 -0
- package/modules/Spectrum/BandLayer/bandState.d.ts +3 -0
- package/modules/Spectrum/DeltaMeasurement/geometry.d.ts +15 -0
- package/modules/Spectrum/FrequencyDataBoard/index.d.ts +1 -0
- package/package.json +2 -2
- package/types/store/ui.d.ts +9 -0
- package/utils/index.d.ts +1 -0
package/modules/Dial/index.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { DialDirectionLabelMode } from '@rfkit/renderer';
|
|
2
|
+
interface Props {
|
|
3
|
+
directionLabelMode?: DialDirectionLabelMode;
|
|
4
|
+
}
|
|
5
|
+
declare const Dial: ({ directionLabelMode }: Props) => import("react").JSX.Element;
|
|
2
6
|
export default Dial;
|
package/modules/Dial/render.d.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import { Dial } from '@rfkit/renderer';
|
|
1
|
+
import { Dial, DialDirectionLabelMode } from '@rfkit/renderer';
|
|
2
2
|
import { CircularRenderer, type CircularRenderState } from '../base/index.js';
|
|
3
|
-
|
|
3
|
+
interface DialRenderState extends CircularRenderState<Dial> {
|
|
4
|
+
directionLabelMode: DialDirectionLabelMode;
|
|
5
|
+
}
|
|
4
6
|
interface DialRenderProps {
|
|
5
7
|
id: string;
|
|
8
|
+
directionLabelMode?: DialDirectionLabelMode;
|
|
6
9
|
}
|
|
7
10
|
export default class DialRender extends CircularRenderer<Dial, DialRenderState> {
|
|
8
11
|
constructor(props: DialRenderProps);
|
|
9
12
|
protected init(): void;
|
|
13
|
+
protected onParamsUpdated(params: Partial<DialRenderState>): void;
|
|
10
14
|
}
|
|
11
15
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AxisXProps } from '../../../types/index.js';
|
|
3
|
+
import type { BandState } from '../../../types/store/ui.js';
|
|
4
|
+
interface Props {
|
|
5
|
+
band?: BandState;
|
|
6
|
+
frequencyFormat?: AxisXProps['frequencyFormat'];
|
|
7
|
+
}
|
|
8
|
+
declare const _default: React.NamedExoticComponent<Props>;
|
|
9
|
+
export default _default;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { SegmentType } from '../../../types/common.js';
|
|
2
2
|
import { type BandState } from '../../../types/store/ui.js';
|
|
3
|
+
import { type FrequencyRange } from '../../../utils/frequencyCalculation.js';
|
|
3
4
|
export { resolveBandState } from '../../../store/bandState.js';
|
|
4
5
|
export interface BandPosition {
|
|
5
6
|
key: string;
|
|
6
7
|
left: number;
|
|
7
8
|
width: number;
|
|
8
9
|
}
|
|
10
|
+
export declare function resolveBandFrequencyRange(band: BandState, frequencyFormat?: (left: number) => string): FrequencyRange | null;
|
|
9
11
|
export declare function resolveBandPositions(band: BandState, segments: SegmentType[]): BandPosition[];
|
|
12
|
+
export declare function resolveBandAtPosition(band: BandState, segments: SegmentType[], left: number): BandState | undefined;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { RectBounds, RectPosition } from '../../../hooks/useDragSelect.js';
|
|
2
|
+
import type { AxisXRange, DeltaMeasurementData } from '../../../types/index.js';
|
|
3
|
+
export interface MeasurementViewport {
|
|
4
|
+
x: readonly [number, number];
|
|
5
|
+
y: readonly [number, number];
|
|
6
|
+
}
|
|
7
|
+
export interface MeasurementSelection {
|
|
8
|
+
x: readonly [number, number];
|
|
9
|
+
y: readonly [number, number];
|
|
10
|
+
}
|
|
11
|
+
export declare const createMeasurementViewport: (totalPoints: number, interval: AxisXRange, range: readonly number[]) => MeasurementViewport | null;
|
|
12
|
+
export declare const selectionFromRect: (rect: RectPosition, viewport: MeasurementViewport) => MeasurementSelection;
|
|
13
|
+
export declare const rectFromSelection: (selection: MeasurementSelection, viewport: MeasurementViewport) => RectPosition;
|
|
14
|
+
export declare const measurementBounds: (rect: RectPosition, viewport: MeasurementViewport) => RectBounds;
|
|
15
|
+
export declare const calculateMeasurement: (selection: MeasurementSelection, frequencyFormat: (left: number) => string, amplitudeOffset?: number) => DeltaMeasurementData | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rfkit/charts",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Chart components for wireless monitoring web applications",
|
|
6
6
|
"exports": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"types": "./index.d.ts",
|
|
15
15
|
"author": "Hxgh",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@rfkit/renderer": "^0.5.
|
|
17
|
+
"@rfkit/renderer": "^0.5.2",
|
|
18
18
|
"@rfkit/spectrum-analyzer": "^0.9.0"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
package/types/store/ui.d.ts
CHANGED
|
@@ -63,6 +63,12 @@ export interface ZoomProps {
|
|
|
63
63
|
type BandSharedProps = {
|
|
64
64
|
show?: boolean;
|
|
65
65
|
color?: string;
|
|
66
|
+
details?: {
|
|
67
|
+
name?: string;
|
|
68
|
+
organization?: string;
|
|
69
|
+
modulation?: string;
|
|
70
|
+
remark?: string;
|
|
71
|
+
};
|
|
66
72
|
};
|
|
67
73
|
type BandPositionProps = {
|
|
68
74
|
left?: number;
|
|
@@ -99,18 +105,21 @@ export type BandState = {
|
|
|
99
105
|
kind: typeof BandKind.Position;
|
|
100
106
|
show: boolean;
|
|
101
107
|
color?: string;
|
|
108
|
+
details?: BandSharedProps['details'];
|
|
102
109
|
left?: number;
|
|
103
110
|
width: number;
|
|
104
111
|
} | {
|
|
105
112
|
kind: typeof BandKind.CenterBandwidth;
|
|
106
113
|
show: boolean;
|
|
107
114
|
color?: string;
|
|
115
|
+
details?: BandSharedProps['details'];
|
|
108
116
|
frequency: number;
|
|
109
117
|
bandwidth: number;
|
|
110
118
|
} | {
|
|
111
119
|
kind: typeof BandKind.FrequencyRange;
|
|
112
120
|
show: boolean;
|
|
113
121
|
color?: string;
|
|
122
|
+
details?: BandSharedProps['details'];
|
|
114
123
|
startFrequency: number;
|
|
115
124
|
stopFrequency: number;
|
|
116
125
|
};
|
package/utils/index.d.ts
CHANGED
|
@@ -7,4 +7,5 @@ export * from './object.js';
|
|
|
7
7
|
export * from './throttle.js';
|
|
8
8
|
export * from './time.js';
|
|
9
9
|
export declare const createGUID: () => string;
|
|
10
|
+
export declare const createRuntimeID: () => string;
|
|
10
11
|
export declare const convertToTimestampedArrays: (data: number[][], timestamps?: Array<string>) => TimestampedFloat32Array[];
|