@rfkit/charts 1.5.1 → 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.
Files changed (53) 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/components/ui/dialog.d.ts +5 -5
  10. package/components/ui/dropdown-menu.d.ts +3 -3
  11. package/components/ui/popover.d.ts +3 -3
  12. package/components/ui/select.d.ts +3 -3
  13. package/components/ui/separator.d.ts +1 -1
  14. package/components/ui/tabs.d.ts +1 -1
  15. package/components/ui/tooltip.d.ts +4 -4
  16. package/hooks/spectrum/index.d.ts +1 -0
  17. package/hooks/spectrum/waterfall.d.ts +5 -0
  18. package/hooks/useChart/index.d.ts +1 -1
  19. package/index.d.ts +2 -2
  20. package/index.js +1785 -736
  21. package/modules/Dial/index.d.ts +1 -1
  22. package/modules/Heatmap/cursorValue.d.ts +38 -0
  23. package/modules/IQEye/index.d.ts +1 -1
  24. package/modules/IQPlanisphere/index.d.ts +1 -1
  25. package/modules/Occupancy/CursorPopover.d.ts +4 -1
  26. package/modules/Spectrum/AxisYCanvas/index.d.ts +1 -1
  27. package/modules/Spectrum/BandLayer/bandState.d.ts +9 -0
  28. package/modules/Spectrum/FrequencyAllocation/model/channelModel.d.ts +16 -0
  29. package/modules/Spectrum/FrequencyAllocation/model/density.d.ts +13 -0
  30. package/modules/Spectrum/FrequencyAllocation/model/index.d.ts +4 -3
  31. package/modules/Spectrum/FrequencyAllocation/model/resolveFrequencyAllocationData.d.ts +7 -1
  32. package/modules/Spectrum/FrequencyAllocation/model/resolver.d.ts +26 -1
  33. package/modules/Spectrum/FrequencyAllocation/model/useAllocationAtCursor.d.ts +3 -1
  34. package/modules/Spectrum/FrequencyAllocation/model/useFrequencyAllocationData.d.ts +1 -0
  35. package/modules/Spectrum/FrequencyAllocation/overlays/Tooltip/index.d.ts +8 -1
  36. package/modules/Spectrum/FrequencyAllocation/presenters/AllocationInfo/index.d.ts +1 -0
  37. package/modules/Spectrum/FrequencyAllocation/presenters/AllocationSegments/index.d.ts +3 -3
  38. package/modules/Spectrum/FrequencyAllocation/tools.d.ts +11 -1
  39. package/modules/Spectrum/FrequencyAllocation/types.d.ts +3 -0
  40. package/modules/Spectrum/FrequencyDataBoard/index.d.ts +2 -0
  41. package/modules/Spectrum/Signal/index.d.ts +1 -0
  42. package/modules/Spectrum/Signal/model/index.d.ts +1 -1
  43. package/modules/Spectrum/Signal/model/resolver.d.ts +25 -0
  44. package/modules/Spectrum/Signal/model/useStationInfoAtCursor.d.ts +3 -1
  45. package/package.json +1 -1
  46. package/runtime/interaction/index.d.ts +71 -0
  47. package/store/bandState.d.ts +7 -0
  48. package/types/publish.d.ts +2 -2
  49. package/types/store/frequency.d.ts +8 -0
  50. package/types/store/heatmap.d.ts +2 -0
  51. package/types/store/index.d.ts +3 -3
  52. package/types/store/ui.d.ts +53 -2
  53. package/utils/object.d.ts +1 -1
@@ -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
  }
@@ -1,12 +1,12 @@
1
1
  import * as DialogPrimitive from '@radix-ui/react-dialog';
2
2
  import * as React from 'react';
3
- declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
- declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
- declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element | null;
3
+ declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): React.JSX.Element;
4
+ declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): React.JSX.Element;
5
+ declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): React.JSX.Element | null;
6
6
  declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
7
  declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
- declare function DialogHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
9
- declare function DialogFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
8
+ declare function DialogHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
9
+ declare function DialogFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
10
10
  declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
11
11
  declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
12
12
  export { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
@@ -1,9 +1,9 @@
1
1
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
2
2
  import * as React from 'react';
3
- declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
3
+ declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): React.JSX.Element;
4
4
  declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
5
- declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): import("react/jsx-runtime").JSX.Element | null;
6
- declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
5
+ declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): React.JSX.Element | null;
6
+ declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): React.JSX.Element;
7
7
  declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
8
  declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
9
  export { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuPortal, DropdownMenuSeparator, DropdownMenuTrigger };
@@ -1,7 +1,7 @@
1
1
  import * as PopoverPrimitive from '@radix-ui/react-popover';
2
2
  import * as React from 'react';
3
- declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
- declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
- declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): import("react/jsx-runtime").JSX.Element;
3
+ declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): React.JSX.Element;
4
+ declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): React.JSX.Element;
5
+ declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): React.JSX.Element;
6
6
  declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
7
  export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
@@ -1,8 +1,8 @@
1
1
  import * as SelectPrimitive from '@radix-ui/react-select';
2
2
  import * as React from 'react';
3
- declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
- declare function SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
5
- declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): import("react/jsx-runtime").JSX.Element;
3
+ declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): React.JSX.Element;
4
+ declare function SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>): React.JSX.Element;
5
+ declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): React.JSX.Element;
6
6
  declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
7
7
  declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
8
  declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,4 +1,4 @@
1
1
  import * as SeparatorPrimitive from '@radix-ui/react-separator';
2
2
  import type * as React from 'react';
3
- declare function Separator({ className, orientation, decorative, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
3
+ declare function Separator({ className, orientation, decorative, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root>): React.JSX.Element;
4
4
  export { Separator };
@@ -1,6 +1,6 @@
1
1
  import * as TabsPrimitive from '@radix-ui/react-tabs';
2
2
  import * as React from 'react';
3
- declare function Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
3
+ declare function Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>): React.JSX.Element;
4
4
  declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
5
  declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
6
6
  declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,7 +1,7 @@
1
1
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
2
2
  import type * as React from 'react';
3
- declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): import("react/jsx-runtime").JSX.Element;
4
- declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
5
- declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
6
- declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): import("react/jsx-runtime").JSX.Element | null;
3
+ declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): React.JSX.Element;
4
+ declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): React.JSX.Element;
5
+ declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): React.JSX.Element;
6
+ declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): React.JSX.Element | null;
7
7
  export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
@@ -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;
@@ -16,6 +16,6 @@ interface Props<T extends RenderChartType = RenderChartType> {
16
16
  declare const useChart: <T extends RenderChartType = RenderChartType>(props: Props<T>) => {
17
17
  id: string;
18
18
  chart: T | null;
19
- Chart: (e: React.HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
19
+ Chart: (e: React.HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
20
20
  };
21
21
  export default useChart;
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, BandProps, 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';