@rfkit/charts 1.6.0 → 1.7.0
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/components/ui/dialog.d.ts +5 -5
- package/components/ui/dropdown-menu.d.ts +3 -3
- package/components/ui/popover.d.ts +3 -3
- package/components/ui/select.d.ts +3 -3
- package/components/ui/separator.d.ts +1 -1
- package/components/ui/tabs.d.ts +1 -1
- package/components/ui/tooltip.d.ts +4 -4
- package/hooks/useChart/index.d.ts +1 -1
- package/index.d.ts +1 -1
- package/index.js +725 -375
- package/modules/Dial/index.d.ts +1 -1
- package/modules/IQEye/index.d.ts +1 -1
- package/modules/IQPlanisphere/index.d.ts +1 -1
- package/modules/Spectrum/AxisYCanvas/index.d.ts +1 -1
- package/modules/Spectrum/BandLayer/bandState.d.ts +9 -0
- package/package.json +1 -1
- package/store/bandState.d.ts +7 -0
- package/types/publish.d.ts +2 -2
- package/types/store/index.d.ts +3 -3
- package/types/store/ui.d.ts +53 -2
- package/utils/object.d.ts +1 -1
package/modules/Dial/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const Dial: () => import("react
|
|
1
|
+
declare const Dial: () => import("react").JSX.Element;
|
|
2
2
|
export default Dial;
|
package/modules/IQEye/index.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ import { type IQChartType } from '../base';
|
|
|
2
2
|
interface IQEyeProps {
|
|
3
3
|
type?: IQChartType;
|
|
4
4
|
}
|
|
5
|
-
export default function IQEye({ type }: IQEyeProps): import("react
|
|
5
|
+
export default function IQEye({ type }: IQEyeProps): import("react").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -2,5 +2,5 @@ import { type IQChartType } from '../base';
|
|
|
2
2
|
interface IQPlanisphereProps {
|
|
3
3
|
type?: IQChartType;
|
|
4
4
|
}
|
|
5
|
-
export default function IQPlanisphere({ type }: IQPlanisphereProps): import("react
|
|
5
|
+
export default function IQPlanisphere({ type }: IQPlanisphereProps): import("react").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -2,5 +2,5 @@ import type { RenderChartType } from '../../../types';
|
|
|
2
2
|
interface AxisYCanvasProps {
|
|
3
3
|
chart: RenderChartType | null;
|
|
4
4
|
}
|
|
5
|
-
export default function AxisYCanvas(props: AxisYCanvasProps): import("react
|
|
5
|
+
export default function AxisYCanvas(props: AxisYCanvasProps): import("react").JSX.Element | null;
|
|
6
6
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SegmentType } from '../../../types/common.ts';
|
|
2
|
+
import { type BandState } from '../../../types/store/ui.ts';
|
|
3
|
+
export { resolveBandState } from '../../../store/bandState.ts';
|
|
4
|
+
export interface BandPosition {
|
|
5
|
+
key: string;
|
|
6
|
+
left: number;
|
|
7
|
+
width: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function resolveBandPositions(band: BandState, segments: SegmentType[]): BandPosition[];
|
package/package.json
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type BandState } from '../types/store/ui.ts';
|
|
2
|
+
export type BandUpdateStrategy = 'merge' | 'replace';
|
|
3
|
+
/**
|
|
4
|
+
* 将 prop / publish 的 Band 输入归一化为唯一内部状态。
|
|
5
|
+
* 无效输入返回当前状态引用,避免破坏已生效的 Band。
|
|
6
|
+
*/
|
|
7
|
+
export declare function resolveBandState(input: Record<string, unknown>, current?: BandState, strategy?: BandUpdateStrategy): BandState;
|
package/types/publish.d.ts
CHANGED
|
@@ -111,9 +111,9 @@ export interface PointsEvent {
|
|
|
111
111
|
pstype: 'points';
|
|
112
112
|
data: number[];
|
|
113
113
|
}
|
|
114
|
-
export
|
|
114
|
+
export type BandEvent = BandProps & {
|
|
115
115
|
pstype: 'band';
|
|
116
|
-
}
|
|
116
|
+
};
|
|
117
117
|
export interface ScopeEvent extends RecursiveObject {
|
|
118
118
|
pstype: 'scope';
|
|
119
119
|
frequency: number;
|
package/types/store/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ import type { HeatmapCaptureProps } from './heatmap';
|
|
|
24
24
|
import type { MarkerProps } from './marker';
|
|
25
25
|
import type { LevelStreamProps, SeriesProps } from './series';
|
|
26
26
|
import type { SignalAnalysisProps, SignalProps } from './signal';
|
|
27
|
-
import type { BandProps, BlazeProps, CursorProps, DeltaMeasurementProps, EventBusProps, FluorescenceProps, FrequencyTagLineBoardProps, LegendProps, LimitProps, ScopeProps, StripeProps, SystemConfig, ToolbarProps, ZoomProps } from './ui';
|
|
27
|
+
import type { BandProps, BandState, BlazeProps, CursorProps, DeltaMeasurementProps, EventBusProps, FluorescenceProps, FrequencyTagLineBoardProps, LegendProps, LimitProps, ScopeProps, StripeProps, SystemConfig, ToolbarProps, ZoomProps } from './ui';
|
|
28
28
|
export interface StoreState {
|
|
29
29
|
globalID: string;
|
|
30
30
|
config: unknown;
|
|
@@ -43,7 +43,7 @@ export interface StoreState {
|
|
|
43
43
|
zoom: ZoomProps;
|
|
44
44
|
signal: SignalProps;
|
|
45
45
|
signalAnalysis: SignalAnalysisProps;
|
|
46
|
-
band:
|
|
46
|
+
band: BandState;
|
|
47
47
|
scope: ScopeProps;
|
|
48
48
|
gridLines: boolean;
|
|
49
49
|
legend: LegendProps;
|
|
@@ -89,7 +89,7 @@ export interface ParamsProps {
|
|
|
89
89
|
frequencyTagLine?: Partial<FrequencyTagLineBoardProps>;
|
|
90
90
|
frequencyAllocation?: Partial<FrequencyAllocationProps>;
|
|
91
91
|
toolbar?: Partial<ToolbarProps>;
|
|
92
|
-
band?:
|
|
92
|
+
band?: BandProps;
|
|
93
93
|
levelStream?: Partial<LevelStreamProps>;
|
|
94
94
|
deltaMeasurement?: Partial<DeltaMeasurementProps>;
|
|
95
95
|
publish?: Publish;
|
package/types/store/ui.d.ts
CHANGED
|
@@ -53,12 +53,62 @@ export interface ZoomProps {
|
|
|
53
53
|
onChange: (se: [string, string], interval: AxisXRange) => void;
|
|
54
54
|
autoCloseTimeout: number;
|
|
55
55
|
}
|
|
56
|
-
|
|
56
|
+
type BandSharedProps = {
|
|
57
|
+
show?: boolean;
|
|
58
|
+
color?: string;
|
|
59
|
+
};
|
|
60
|
+
type BandPositionProps = {
|
|
61
|
+
left?: number;
|
|
62
|
+
width?: number;
|
|
63
|
+
frequency?: never;
|
|
64
|
+
bandwidth?: never;
|
|
65
|
+
startFrequency?: never;
|
|
66
|
+
stopFrequency?: never;
|
|
67
|
+
};
|
|
68
|
+
type BandCenterBandwidthProps = {
|
|
69
|
+
frequency: number;
|
|
70
|
+
bandwidth: number;
|
|
71
|
+
left?: never;
|
|
72
|
+
width?: never;
|
|
73
|
+
startFrequency?: never;
|
|
74
|
+
stopFrequency?: never;
|
|
75
|
+
};
|
|
76
|
+
type BandFrequencyRangeProps = {
|
|
77
|
+
startFrequency: number;
|
|
78
|
+
stopFrequency: number;
|
|
79
|
+
left?: never;
|
|
80
|
+
width?: never;
|
|
81
|
+
frequency?: never;
|
|
82
|
+
bandwidth?: never;
|
|
83
|
+
};
|
|
84
|
+
/** Band 对外配置:百分比、中心频率带宽、起止频率三种定位方式互斥。 */
|
|
85
|
+
export type BandProps = BandSharedProps & (BandPositionProps | BandCenterBandwidthProps | BandFrequencyRangeProps);
|
|
86
|
+
export declare const BandKind: {
|
|
87
|
+
readonly Position: "position";
|
|
88
|
+
readonly CenterBandwidth: "centerBandwidth";
|
|
89
|
+
readonly FrequencyRange: "frequencyRange";
|
|
90
|
+
};
|
|
91
|
+
export type BandKind = (typeof BandKind)[keyof typeof BandKind];
|
|
92
|
+
/** Band 内部归一化状态。 */
|
|
93
|
+
export type BandState = {
|
|
94
|
+
kind: typeof BandKind.Position;
|
|
57
95
|
show: boolean;
|
|
96
|
+
color?: string;
|
|
58
97
|
left?: number;
|
|
59
98
|
width: number;
|
|
99
|
+
} | {
|
|
100
|
+
kind: typeof BandKind.CenterBandwidth;
|
|
101
|
+
show: boolean;
|
|
60
102
|
color?: string;
|
|
61
|
-
|
|
103
|
+
frequency: number;
|
|
104
|
+
bandwidth: number;
|
|
105
|
+
} | {
|
|
106
|
+
kind: typeof BandKind.FrequencyRange;
|
|
107
|
+
show: boolean;
|
|
108
|
+
color?: string;
|
|
109
|
+
startFrequency: number;
|
|
110
|
+
stopFrequency: number;
|
|
111
|
+
};
|
|
62
112
|
export interface ScopeProps {
|
|
63
113
|
show: boolean;
|
|
64
114
|
left: number;
|
|
@@ -112,3 +162,4 @@ export interface EventBusProps {
|
|
|
112
162
|
onDoubleClick: (frequency: string, e: RecursiveObject) => void;
|
|
113
163
|
[key: string]: unknown;
|
|
114
164
|
}
|
|
165
|
+
export {};
|