@rfkit/charts 1.10.1 → 1.10.3

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
@@ -98,6 +98,27 @@ export function GaugeDemo() {
98
98
 
99
99
  `extraData` 默认保持完整数组设置语义;设置 `segmentedExtraData: true` 后,同一次推送中的每条额外频谱线会独立使用 `segmentOffset + offset` 拼接,并随主实时值同步缩放。
100
100
 
101
+ ## 信号标注接入
102
+
103
+ 信号标注数据由业务项目负责适配,图表只接收内部结构。外部常见的 `fromRSDBT`、`signalLevel` 字段不要原样传入:`fromRSDBT=true` 转为 `StationInfoType`,`false` 转为 `SignalData`;`signalLevel` 映射为 `level`(`-1/0/1/2`),`signalType` 映射为 `Legitimate`、`UnKnown`、`Know`、`Violation` 或 `Illegal`。有业务颜色时将 `color` 原样传入(包括 `rgba(...)`);没有显式颜色时,台站库和非合法信号使用内置类型色,信号库中的合法信号使用绿色等级色阶。
104
+
105
+ ```ts
106
+ import { PSType, SignalDataType } from '@rfkit/charts';
107
+
108
+ const { station, simple } = adaptBusinessAnnotations(items);
109
+
110
+ publish({ pstype: PSType.Signal, type: SignalDataType.Station, data: station });
111
+ publish({ pstype: PSType.Signal, type: SignalDataType.Simple, data: simple });
112
+ ```
113
+
114
+ 同一来源后续发布会替换上一批数据,发布空数组可单独清空该来源。频谱游标命中台站库时显示完整台站信息,命中信号库时显示来源、频率范围、带宽、类型,以及合法信号的等级。
115
+
116
+ 内置颜色直接复用主题的 `success`、`primary`、`warning`、`destructive` 和 `mutedForeground` 语义 token;需要整体调整时通过 `initChartsTheme({ tokens: { semantic: ... } })` 覆盖,单条业务标注仍使用 `color` 覆盖。
117
+
118
+ 筛选树色点表示分类的内置语义色;单条数据传入 `color` 后,图上标注和游标详情色点使用该实际颜色,不会反向改变整类数据的树图例。
119
+
120
+ 台站数据需要提供 `startFrequency` / `stopFrequency`(也可以由 MHz 中心频率和 kHz 带宽在业务侧计算)。
121
+
101
122
  独立 `Heatmap` 可以显式开启 X/Y 同步缩放:
102
123
 
103
124
  ```tsx
@@ -20,6 +20,9 @@ interface DropdownProps {
20
20
  showChevron?: boolean;
21
21
  triggerClassName?: string;
22
22
  contentClassName?: string;
23
+ contentAlignOffset?: number;
24
+ customContent?: React.ReactNode;
25
+ triggerTestId?: string;
23
26
  }
24
27
  declare const Dropdown: React.FC<DropdownProps>;
25
28
  export default Dropdown;
@@ -1,5 +1,7 @@
1
1
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
2
2
  import * as React from 'react';
3
3
  declare const ScrollBar: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
- declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
5
+ viewportClassName?: string;
6
+ } & React.RefAttributes<HTMLDivElement>>;
5
7
  export { ScrollArea, ScrollBar };
package/index.d.ts CHANGED
@@ -8,7 +8,7 @@ export { type ChartsThemePreference, type ChartsThemeState, getChartsThemeState,
8
8
  export type { ChartsSizeTokensConfig, ChartsThemeTokensConfig } from './theme/theme-tokens';
9
9
  export type { AxisXProps, AxisYRange, BandProps, ChartRef, FrequencyAllocationChannel, FrequencyAllocationDensity, FrequencyAllocationItem, MarkerProps, MarkerType, Publish, PublishData, PublishDial, PublishGauge, PublishHeatmap, PublishIQ, PublishLevelStream, PublishOccupancy, PublishSpectrum, RecursiveFunction, // 递归方法 后期会删除
10
10
  RecursiveObject, // 递归对象 后期会删除
11
- Render, Reset, SegmentsOriginal, SeriesConfig, SetAntennaFactor, SetChannels, SetMarker, SetSegments, SetSeries, SetSpectrumBandwidth, SpectrumBandwidth, SpectrumExtraData, StationInfoType } from './types';
11
+ Render, Reset, SegmentsOriginal, SeriesConfig, SetAntennaFactor, SetChannels, SetMarker, SetSegments, SetSeries, SetSpectrumBandwidth, SignalData, SpectrumBandwidth, SpectrumExtraData, StationInfoType } from './types';
12
12
  export { HeatmapCaptureType, MarkerMode } from './types';
13
13
  export { SignalDataType } from './types/store';
14
14
  export type { FrequencyUnitResult } from './utils';