@rfkit/charts 1.5.1 → 1.6.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.
Files changed (35) hide show
  1. package/charts/Spectrum/heatmapCaptureDefaults.d.ts +2 -0
  2. package/components/Cursor/useCursorSample.d.ts +2 -0
  3. package/components/EventBus/position.d.ts +8 -0
  4. package/components/EventBus/tools.d.ts +2 -1
  5. package/components/Overlay/Popover/index.d.ts +1 -0
  6. package/components/Toolbar/icons/DeltaMeasurementIcon.d.ts +3 -0
  7. package/components/Toolbar/icons/index.d.ts +1 -0
  8. package/components/ui/cursor-follow-layer.d.ts +1 -2
  9. package/hooks/spectrum/index.d.ts +1 -0
  10. package/hooks/spectrum/waterfall.d.ts +5 -0
  11. package/index.d.ts +2 -2
  12. package/index.js +1073 -374
  13. package/modules/Heatmap/cursorValue.d.ts +38 -0
  14. package/modules/Occupancy/CursorPopover.d.ts +4 -1
  15. package/modules/Spectrum/FrequencyAllocation/model/channelModel.d.ts +16 -0
  16. package/modules/Spectrum/FrequencyAllocation/model/density.d.ts +13 -0
  17. package/modules/Spectrum/FrequencyAllocation/model/index.d.ts +4 -3
  18. package/modules/Spectrum/FrequencyAllocation/model/resolveFrequencyAllocationData.d.ts +7 -1
  19. package/modules/Spectrum/FrequencyAllocation/model/resolver.d.ts +26 -1
  20. package/modules/Spectrum/FrequencyAllocation/model/useAllocationAtCursor.d.ts +3 -1
  21. package/modules/Spectrum/FrequencyAllocation/model/useFrequencyAllocationData.d.ts +1 -0
  22. package/modules/Spectrum/FrequencyAllocation/overlays/Tooltip/index.d.ts +8 -1
  23. package/modules/Spectrum/FrequencyAllocation/presenters/AllocationInfo/index.d.ts +1 -0
  24. package/modules/Spectrum/FrequencyAllocation/presenters/AllocationSegments/index.d.ts +3 -3
  25. package/modules/Spectrum/FrequencyAllocation/tools.d.ts +11 -1
  26. package/modules/Spectrum/FrequencyAllocation/types.d.ts +3 -0
  27. package/modules/Spectrum/FrequencyDataBoard/index.d.ts +2 -0
  28. package/modules/Spectrum/Signal/index.d.ts +1 -0
  29. package/modules/Spectrum/Signal/model/index.d.ts +1 -1
  30. package/modules/Spectrum/Signal/model/resolver.d.ts +25 -0
  31. package/modules/Spectrum/Signal/model/useStationInfoAtCursor.d.ts +3 -1
  32. package/package.json +1 -1
  33. package/runtime/interaction/index.d.ts +71 -0
  34. package/types/store/frequency.d.ts +8 -0
  35. package/types/store/heatmap.d.ts +2 -0
@@ -0,0 +1,2 @@
1
+ import type { Props } from './Chart';
2
+ export declare const withSpectrumHeatmapCaptureDefaults: <TProps extends Props>(props: TProps) => TProps;
@@ -0,0 +1,2 @@
1
+ import { type CursorSampleSnapshot } from '../../runtime/interaction';
2
+ export declare const useCursorSample: (id: string) => CursorSampleSnapshot | null;
@@ -0,0 +1,8 @@
1
+ import type { TopRightBottomLeft } from '../../types';
2
+ export interface EventPositionSource {
3
+ currentTarget?: EventTarget | null;
4
+ target?: EventTarget | null;
5
+ clientX?: number;
6
+ clientY?: number;
7
+ }
8
+ export declare const calculateEventRelativePositionFromSource: (source: EventPositionSource) => TopRightBottomLeft;
@@ -1,5 +1,6 @@
1
1
  import type { TopRightBottomLeft } from '../../types';
2
2
  import { type CSMCallback } from '../../utils/subscription';
3
+ import { type EventPositionSource } from './position';
3
4
  export declare function getEID(id: string): string;
4
5
  export declare const createMoveEventManager: (id: string, name?: string, func?: CSMCallback) => (...args: any[]) => void;
5
6
  export declare const createMouseDownEventManager: (id: string, name?: string, func?: CSMCallback) => (...args: any[]) => void;
@@ -20,7 +21,7 @@ export declare const createZoomEventManager: (id: string, name?: string, func?:
20
21
  * 创建长按事件管理器
21
22
  */
22
23
  export declare const createLongPressEventManager: (id: string, name?: string, func?: CSMCallback) => (...args: any[]) => void;
23
- export declare const calculateEventRelativePosition: (e: React.MouseEvent<HTMLElement> | React.WheelEvent<HTMLElement>) => TopRightBottomLeft;
24
+ export declare const calculateEventRelativePosition: (e: React.MouseEvent<HTMLElement> | React.WheelEvent<HTMLElement> | EventPositionSource) => TopRightBottomLeft;
24
25
  export declare const EVENT_PRIORITY_LEVELS: {
25
26
  void: number;
26
27
  eventBus: number;
@@ -1,5 +1,6 @@
1
1
  import type React from 'react';
2
2
  declare const Popover: React.FC<{
3
3
  children: React.ReactNode;
4
+ id: string;
4
5
  }>;
5
6
  export default Popover;
@@ -0,0 +1,3 @@
1
+ import type React from 'react';
2
+ declare const DeltaMeasurementIcon: React.FC;
3
+ export default DeltaMeasurementIcon;
@@ -0,0 +1 @@
1
+ export { default as DeltaMeasurementIcon } from './DeltaMeasurementIcon';
@@ -1,8 +1,7 @@
1
1
  import type React from 'react';
2
- import type { CursorEventSnapshot } from '../../types/store';
3
2
  interface CursorFollowLayerProps {
4
3
  children: React.ReactNode;
5
- event?: CursorEventSnapshot | null;
4
+ interactionId: string;
6
5
  margin?: number;
7
6
  className?: string;
8
7
  }
@@ -4,3 +4,4 @@
4
4
  export type { Props as UseSpectrumChartTypeProps } from './useSpectrumChartType';
5
5
  export { default as useSpectrumChartType } from './useSpectrumChartType';
6
6
  export { default as useSpectrumRule, SET_SEGMENTS_DISPLAY } from './useSpectrumRule';
7
+ export { shouldEnableSpectrumWaterfall } from './waterfall';
@@ -0,0 +1,5 @@
1
+ import type { ChartType } from '../../config';
2
+ export declare const shouldEnableSpectrumWaterfall: ({ heatmapElementID, type }: {
3
+ heatmapElementID?: string;
4
+ type?: ChartType | string;
5
+ }) => boolean;
package/index.d.ts CHANGED
@@ -2,11 +2,11 @@ import './theme/library.css';
2
2
  export { Dial, Gauge, Heatmap, IQ, LevelStream, Occupancy, Spectrum } from './charts';
3
3
  export { ChartType, FrequencyUnit, MarkerEventType, ModuleType, OptionKey, PSType, SegmentsEvent, SeriesType, ToolbarItemType, ToolType } from './config';
4
4
  export { type EnhancedPublish, useSafePublish, withChartPublisher } from './hooks';
5
- export { setFrequencyAllocationToCache } from './modules/Spectrum/FrequencyAllocation/tools';
5
+ export { setFrequencyAllocationChannelsToCache, setFrequencyAllocationToCache } from './modules/Spectrum/FrequencyAllocation/tools';
6
6
  export { type ChartsThemeChange, type InitChartsThemeOptions, type InitChartsThemeResult, initChartsTheme } from './theme/init-charts-theme';
7
7
  export { type ChartsThemePreference, type ChartsThemeState, getChartsThemeState, subscribeChartsThemeChange } from './theme/theme-runtime';
8
8
  export type { ChartsSizeTokensConfig, ChartsThemeTokensConfig } from './theme/theme-tokens';
9
- export type { AxisXProps, AxisYRange, ChartRef, FrequencyAllocationItem, MarkerProps, MarkerType, Publish, PublishData, PublishDial, PublishGauge, PublishHeatmap, PublishIQ, PublishLevelStream, PublishOccupancy, PublishSpectrum, RecursiveFunction, // 递归方法 后期会删除
9
+ export type { AxisXProps, AxisYRange, ChartRef, FrequencyAllocationChannel, FrequencyAllocationDensity, FrequencyAllocationItem, MarkerProps, MarkerType, Publish, PublishData, PublishDial, PublishGauge, PublishHeatmap, PublishIQ, PublishLevelStream, PublishOccupancy, PublishSpectrum, RecursiveFunction, // 递归方法 后期会删除
10
10
  RecursiveObject, // 递归对象 后期会删除
11
11
  Render, Reset, SegmentsOriginal, SeriesConfig, SetAntennaFactor, SetChannels, SetMarker, SetSegments, SetSeries, SetSpectrumBandwidth, SpectrumBandwidth, SpectrumExtraData, StationInfoType } from './types';
12
12
  export { HeatmapCaptureType, MarkerMode } from './types';