@rfkit/charts 1.2.24 → 1.2.26

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.
@@ -1,4 +1,3 @@
1
- import type React from 'react';
2
1
  import type { ParamsProps } from '../../types';
3
2
  export interface Props extends ParamsProps {
4
3
  }
@@ -1,5 +1,4 @@
1
1
  import { Fluorescence as Chart } from '../../engine';
2
- import type { RecursiveObject } from '../../types';
3
2
  interface FluorescenceRenderProps {
4
3
  id: string;
5
4
  globalID: string;
@@ -21,10 +20,10 @@ export default class FluorescenceRender {
21
20
  /**
22
21
  * 更新属性
23
22
  *
24
- * @param {RecursiveObject} props
23
+ * @param props
25
24
  * @memberof FluorescenceRender
26
25
  */
27
- updateProps(props: RecursiveObject): void;
26
+ updateProps(props: Record<string, unknown>): void;
28
27
  /**
29
28
  * 更新数据
30
29
  *
package/package.json CHANGED
@@ -5,6 +5,6 @@
5
5
  "types": "index.d.ts",
6
6
  "author": "Hxgh",
7
7
  "license": "MIT",
8
- "version": "1.2.24",
8
+ "version": "1.2.26",
9
9
  "private": false
10
10
  }
package/types/common.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { GraphicType } from '../engine';
1
+ import type { GraphicType, OrientationType } from '../engine';
2
2
  import type { Publish, RecursiveObject, SetSeries } from './';
3
3
  export type AxisYRange = [number, number];
4
4
  export interface AxisXRange {
@@ -1,7 +1,8 @@
1
1
  import type { MarkerEventType, OptionKey, PSType, SegmentsEvent } from '../config';
2
2
  import type { rawData } from '../utils/subscription';
3
+ import type { RecursiveObject } from './base';
3
4
  import type { SegmentsOriginal, SeriesConfig, SpectrumBandwidth, StationInfoType } from './common';
4
- import type { MarkerType, ParamsProps, SignalData, SignalDataType } from './store';
5
+ import type { BandProps, MarkerType, ParamsProps, SignalData, SignalDataType } from './store';
5
6
  export interface SetOption {
6
7
  pstype: PSType.Option;
7
8
  key: OptionKey;
@@ -99,6 +100,22 @@ export interface PublishGauge {
99
100
  value?: number;
100
101
  limit?: number;
101
102
  }
103
+ export interface AutorangingEvent {
104
+ pstype: 'autoranging';
105
+ }
106
+ export interface PointsEvent {
107
+ pstype: 'points';
108
+ data: number[];
109
+ }
110
+ export interface BandEvent extends BandProps {
111
+ pstype: 'band';
112
+ }
113
+ export interface ScopeEvent extends RecursiveObject {
114
+ pstype: 'scope';
115
+ frequency: number;
116
+ bandwidth: number;
117
+ index?: number;
118
+ }
102
119
  export interface Reset extends Finally {
103
120
  pstype: PSType.Reset;
104
121
  }
@@ -112,7 +129,7 @@ export interface Render {
112
129
  pstype: PSType.Render;
113
130
  [key: string]: unknown;
114
131
  }
115
- export type PublishData = SetOption | SetSeries | SetSpectrumBandwidth | SetSegments | SetChannels | SetMarker | SetAntennaFactor | SetSignal | PublishSpectrum | PublishHeatmap | PublishFluorescence | PublishOccupancy | PublishLevelStream | PublishIQ | PublishDial | PublishGauge | Reset | Clear | Resize | Render;
132
+ export type PublishData = SetOption | SetSeries | SetSpectrumBandwidth | SetSegments | SetChannels | SetMarker | SetAntennaFactor | SetSignal | PublishSpectrum | PublishHeatmap | PublishFluorescence | PublishOccupancy | PublishLevelStream | PublishIQ | PublishDial | PublishGauge | AutorangingEvent | PointsEvent | BandEvent | ScopeEvent | Reset | Clear | Resize | Render;
116
133
  export type Publish = ((p: PublishData) => void) & {
117
134
  getSourceData: () => rawData;
118
135
  };
package/utils/index.d.ts CHANGED
@@ -90,7 +90,7 @@ export declare function getThemeFillStyle(): {
90
90
  * @param params 要混合的参数
91
91
  * @returns 混合后的对象
92
92
  */
93
- export declare const mergeObjects: (e: RecursiveObject, params: RecursiveObject) => RecursiveObject;
93
+ export declare const mergeObjects: <T extends RecursiveObject>(source: T, params: RecursiveObject) => T;
94
94
  export declare function getMidIndex(indexStart: number, indexEnd: number): number;
95
95
  export declare const getFrequencyToFixed: (frequency: number, fixedNum?: number) => string;
96
96
  export declare const createChartRenderID: ({ moduleType, globalID }: {