@rfkit/charts 1.2.23 → 1.2.25

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 CHANGED
@@ -187,7 +187,7 @@ export interface PublishSpectrum {
187
187
  templateData?: Float32Array;
188
188
  extraData?: SpectrumExtraData;
189
189
  // 瀑布图可选参数
190
- timestamp?: number;
190
+ timestamp?: string;
191
191
  // 扫描可选参数
192
192
  offset?: number; // 当前段的点偏移量
193
193
  segmentOffset?: number; // 当前段的索引
@@ -1,7 +1,7 @@
1
- import type React from 'react';
1
+ import React from 'react';
2
2
  interface Props {
3
3
  id: string;
4
4
  inside?: boolean;
5
5
  }
6
- declare const Ticks: React.FC<Props>;
7
- export default Ticks;
6
+ declare const _default: React.NamedExoticComponent<Props>;
7
+ export default _default;
@@ -14,12 +14,8 @@ export declare const defaultAreaInfoResult: {
14
14
  endIndex: number;
15
15
  startCol: number;
16
16
  endCol: number;
17
- startTimestamp: number;
18
- startTimestampFormat: string;
19
- endTimestamp: number;
20
- endTimestampFormat: string;
21
- duration: number;
22
- durationFormat: string;
17
+ startTimestamp: string;
18
+ endTimestamp: string;
23
19
  startFrequency: number;
24
20
  startFrequencyFormat: string;
25
21
  endFrequency: number;
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
+ type TooltipTriggerProps = React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>;
3
+ type TooltipTriggerElement = React.ReactElement<TooltipTriggerProps>;
2
4
  interface TooltipProps {
3
- children: React.ReactNode;
5
+ children: TooltipTriggerElement;
4
6
  content: React.ReactNode;
5
7
  delay?: number;
6
8
  duration?: number;
@@ -1,9 +1,8 @@
1
- import type { RecursiveObject } from '../types';
2
1
  import type { StateProps } from './type';
3
2
  export default class Engine {
4
3
  state: StateProps;
5
4
  constructor(props: StateProps);
6
- updateProps(e: RecursiveObject): void;
5
+ updateProps(e: Partial<StateProps>): void;
7
6
  init(p: StateProps): void;
8
7
  clearRect(): void;
9
8
  resize(draw?: boolean): void;
@@ -1,9 +1,8 @@
1
- import type { AxisYRange, RecursiveObject } from '../types';
2
1
  import Engine from './engine';
3
- import type { StateProps } from './type';
2
+ import type { AxisYRange, StateProps } from './type';
4
3
  export default class Fluorescence extends Engine {
5
4
  init(props: StateProps): void;
6
- updateProps(e: RecursiveObject): void;
5
+ updateProps(e: Partial<StateProps>): void;
7
6
  clearImageData(): void;
8
7
  clearRect(): void;
9
8
  clear(): void;
@@ -1,9 +1,8 @@
1
- import type { AxisYRange } from '../types';
2
1
  import Engine from './engine';
3
- import type { StateProps } from './type';
2
+ import type { AxisYRange, StateProps } from './type';
4
3
  export default class Heatmap extends Engine {
5
4
  init(props: StateProps): void;
6
- updateProps(e: any): void;
5
+ updateProps(e: Partial<StateProps>): void;
7
6
  clearImageData(): void;
8
7
  clearRect(): void;
9
8
  clear(): void;
package/engine/index.d.ts CHANGED
@@ -6,8 +6,6 @@ import IQ from './iq';
6
6
  import IQEye from './iqEye';
7
7
  import Radar from './radar';
8
8
  import Series from './series';
9
- import { GraphicType, OrientationType, type StateProps } from './type';
10
- import WebGLEngine from './webglEngine';
11
- import WebGLSeries from './webglSeries';
12
- export { Heatmap, Fluorescence, Series, IQ, IQEye, OrientationType, GraphicType, Dial, Radar, Gauge, WebGLEngine, WebGLSeries };
13
- export type { StateProps };
9
+ import { GraphicType, OrientationType, type AxisYRange, type SeriesConfig, type StateProps } from './type';
10
+ export { Dial, Fluorescence, Gauge, GraphicType, Heatmap, IQ, IQEye, OrientationType, Radar, Series };
11
+ export type { AxisYRange, SeriesConfig, StateProps };
@@ -1,9 +1,8 @@
1
- import type { AxisYRange, RecursiveObject, SeriesConfig } from '../types';
2
1
  import Engine from './engine';
3
- import { type StateProps } from './type';
2
+ import type { AxisYRange, SeriesConfig, StateProps } from './type';
4
3
  export default class Series extends Engine {
5
4
  init(props: StateProps): void;
6
- updateProps(e: RecursiveObject): void;
5
+ updateProps(e: Partial<StateProps>): void;
7
6
  clear(): void;
8
7
  setRange(range: AxisYRange): void;
9
8
  setIntervel(interval: number): void;
package/engine/type.d.ts CHANGED
@@ -17,3 +17,16 @@ export interface StateProps {
17
17
  fluorescenceMaxCount?: number;
18
18
  [key: string]: any;
19
19
  }
20
+ /** Y轴范围 [min, max] */
21
+ export type AxisYRange = [number, number];
22
+ /** Series 配置 */
23
+ export interface SeriesConfig {
24
+ readonly name: string;
25
+ label?: string;
26
+ color?: string;
27
+ display?: boolean;
28
+ data?: Float32Array;
29
+ type?: GraphicType;
30
+ thickness?: number;
31
+ orientation?: OrientationType;
32
+ }
@@ -0,0 +1,2 @@
1
+ /** 检查值是否为有效数字 */
2
+ export declare const isNumberAlias: (n: unknown) => n is number;
@@ -1,5 +1,5 @@
1
- import type { SeriesConfig } from '../types';
2
- import { WebGLSeries } from './index';
1
+ import type { SeriesConfig } from './type';
2
+ import WebGLSeries from './webglSeries';
3
3
  /**
4
4
  * WebGL Series 使用示例
5
5
  *
@@ -1,12 +1,11 @@
1
- import type { AxisYRange, RecursiveObject, SeriesConfig } from '../types';
2
- import { type StateProps } from './type';
1
+ import type { AxisYRange, SeriesConfig, StateProps } from './type';
3
2
  import WebGLEngine from './webglEngine';
4
3
  export default class WebGLSeries extends WebGLEngine {
5
4
  private vertexData;
6
5
  private colorData;
7
6
  private throttledDraw;
8
7
  init(props: StateProps): void;
9
- updateProps(e: RecursiveObject): void;
8
+ updateProps(e: Partial<StateProps>): void;
10
9
  clear(): void;
11
10
  setRange(range: AxisYRange): void;
12
11
  setIntervel(interval: number): void;