@rfkit/charts 1.3.13 → 1.4.1
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 +169 -229
- package/{lib → charts}/index.d.ts +1 -1
- package/components/AxisY/heatmap/index.d.ts +1 -1
- package/components/AxisY/heatmap/variants/standard/index.d.ts +6 -0
- package/components/AxisY/spectrum/controls/index.d.ts +3 -0
- package/components/AxisY/spectrum/index.d.ts +3 -2
- package/components/AxisY/spectrum/{components/Ticks → presenters/TicksPanel}/index.d.ts +3 -3
- package/components/AxisY/spectrum/presenters/index.d.ts +1 -0
- package/components/AxisY/spectrum/useRanging/index.d.ts +4 -1
- package/components/AxisY/spectrum/useRanging/ranging.d.ts +3 -1
- package/components/Container/runtime.d.ts +10 -0
- package/components/Cursor/popover-support.d.ts +8 -0
- package/components/Cursor/registry.d.ts +7 -0
- package/components/DragSelectBox/index.d.ts +3 -1
- package/components/GridLines/OccupancyDashed/index.d.ts +3 -0
- package/components/{Dropdown → Overlay/Dropdown}/index.d.ts +10 -2
- package/components/{Tooltip → Overlay/Tooltip}/index.d.ts +1 -1
- package/components/Overlay/index.d.ts +4 -0
- package/components/{ToolsBar → Toolbar/controls}/SeriesControl/index.d.ts +1 -1
- package/components/Toolbar/controls/index.d.ts +4 -0
- package/components/{ToolsBar → Toolbar/decorations}/GradientRibbon/index.d.ts +1 -1
- package/components/Toolbar/decorations/index.d.ts +2 -0
- package/components/Toolbar/primitives/IconBox.d.ts +11 -0
- package/components/Toolbar/primitives/ToolbarContentBox.d.ts +11 -0
- package/components/Toolbar/primitives/ToolbarDropdown.d.ts +16 -0
- package/components/Toolbar/primitives/ToolbarGlyph.d.ts +10 -0
- package/components/Toolbar/primitives/ToolbarGroup.d.ts +10 -0
- package/components/Toolbar/primitives/ToolbarGroupIconBox.d.ts +5 -0
- package/components/Toolbar/primitives/ToolbarSurface.d.ts +15 -0
- package/components/Toolbar/primitives/index.d.ts +8 -0
- package/components/Toolbar/primitives/styles.d.ts +41 -0
- package/components/Toolbar/registry.d.ts +12 -0
- package/components/Toolbar/toggles/index.d.ts +10 -0
- package/components/Zoom/ZoomViewportLayer.d.ts +7 -0
- package/components/ui/button.d.ts +16 -0
- package/components/ui/checkbox.d.ts +4 -0
- package/components/ui/cursor-follow-layer.d.ts +10 -0
- package/components/ui/dialog.d.ts +12 -0
- package/components/ui/dropdown-menu.d.ts +9 -0
- package/components/ui/input.d.ts +1 -0
- package/components/ui/number-input.d.ts +10 -0
- package/components/ui/panel.d.ts +9 -0
- package/components/ui/popover.d.ts +7 -0
- package/components/ui/scroll-area.d.ts +5 -0
- package/components/ui/select.d.ts +11 -0
- package/components/ui/separator.d.ts +4 -0
- package/components/ui/slider.d.ts +2 -0
- package/components/ui/switch.d.ts +2 -0
- package/components/ui/tabs.d.ts +7 -0
- package/components/ui/tooltip.d.ts +7 -0
- package/components/ui/useChartsPortalContainer.d.ts +1 -0
- package/config/constants.d.ts +2 -2
- package/config/setting.d.ts +3 -3
- package/hooks/index.d.ts +2 -3
- package/hooks/module-subscription-core.d.ts +23 -0
- package/hooks/publish/enhancedPublish.d.ts +17 -0
- package/hooks/publish/index.d.ts +1 -1
- package/hooks/publish/publish-event.d.ts +9 -0
- package/hooks/publish/useSafePublish.d.ts +2 -8
- package/hooks/useChartComponent.d.ts +0 -6
- package/hooks/useDragSelect.d.ts +2 -0
- package/hooks/useLevelStreamAnalyzer.d.ts +1 -1
- package/hooks/useModuleSubscription.d.ts +21 -23
- package/index.d.ts +7 -3
- package/index.js +23912 -11942
- package/modules/Gauge/render.d.ts +0 -2
- package/{components/HeatmapCapture → modules/Heatmap/Capture}/tools.d.ts +1 -1
- package/modules/Heatmap/CursorPopover.d.ts +6 -0
- package/modules/Heatmap/render.d.ts +2 -0
- package/modules/Level/CursorPopover.d.ts +6 -0
- package/modules/Occupancy/CursorPopover.d.ts +3 -0
- package/modules/Occupancy/TotalLine/index.d.ts +1 -1
- package/modules/Occupancy/total-line-runtime.d.ts +4 -0
- package/modules/Spectrum/AxisYCanvas/index.d.ts +6 -0
- package/{components/AxisYByCanvas → modules/Spectrum/AxisYCanvas}/useCanvasAxisY.d.ts +2 -2
- package/modules/Spectrum/BandLayer/index.d.ts +5 -0
- package/modules/Spectrum/BandLayer/useBandLayerController.d.ts +2 -0
- package/{components → modules/Spectrum}/Blaze/tools.d.ts +1 -1
- package/modules/Spectrum/CursorPopover.d.ts +6 -0
- package/{components → modules/Spectrum}/FrequencyAllocation/color.d.ts +1 -1
- package/{components → modules/Spectrum}/FrequencyAllocation/index.d.ts +2 -2
- package/modules/Spectrum/FrequencyAllocation/model/index.d.ts +4 -0
- package/modules/Spectrum/FrequencyAllocation/model/resolveFrequencyAllocationData.d.ts +2 -0
- package/modules/Spectrum/FrequencyAllocation/model/resolver.d.ts +18 -0
- package/modules/Spectrum/FrequencyAllocation/model/useAllocationAtCursor.d.ts +6 -0
- package/modules/Spectrum/FrequencyAllocation/model/useFrequencyAllocationData.d.ts +1 -0
- package/modules/Spectrum/FrequencyAllocation/overlays/Tooltip/index.d.ts +4 -0
- package/modules/Spectrum/FrequencyAllocation/overlays/index.d.ts +1 -0
- package/{components/FrequencyAllocation → modules/Spectrum/FrequencyAllocation/presenters}/AllocationInfo/index.d.ts +1 -1
- package/modules/Spectrum/FrequencyAllocation/presenters/AllocationSegments/index.d.ts +12 -0
- package/modules/Spectrum/FrequencyAllocation/presenters/index.d.ts +2 -0
- package/{components → modules/Spectrum}/FrequencyAllocation/tools.d.ts +1 -1
- package/{components → modules/Spectrum}/FrequencyAllocation/types.d.ts +1 -1
- package/modules/Spectrum/FrequencyDataBoard/hooks/index.d.ts +1 -0
- package/modules/Spectrum/FrequencyDataBoard/hooks/useStationInfoAtCursor.d.ts +1 -0
- package/{components → modules/Spectrum}/FrequencyDataBoard/index.d.ts +1 -0
- package/{components/FrequencyDataBoard/StationInfo → modules/Spectrum/FrequencyDataBoard/panels/StationInfoPanel}/index.d.ts +1 -1
- package/modules/Spectrum/FrequencyDataBoard/panels/index.d.ts +1 -0
- package/{components → modules/Spectrum}/FrequencyTagLine/index.d.ts +2 -2
- package/{components → modules/Spectrum}/Markers/MarkerItem/index.d.ts +1 -1
- package/{components → modules/Spectrum}/Markers/hooks/useMarkerEvents.d.ts +1 -1
- package/{components → modules/Spectrum}/Markers/hooks/useMarkers.d.ts +2 -2
- package/{components → modules/Spectrum}/Markers/tools.d.ts +1 -1
- package/{components → modules/Spectrum}/Scope/useScope.d.ts +1 -1
- package/{components → modules/Spectrum}/Signal/index.d.ts +2 -1
- package/modules/Spectrum/Signal/metadata/index.d.ts +1 -0
- package/modules/Spectrum/Signal/model/index.d.ts +3 -0
- package/modules/Spectrum/Signal/model/resolver.d.ts +40 -0
- package/modules/Spectrum/Signal/model/useStationInfoAtCursor.d.ts +7 -0
- package/modules/Spectrum/Signal/model/useUnifiedSignals.d.ts +6 -0
- package/modules/Spectrum/Signal/presenters/SignalSegments/index.d.ts +10 -0
- package/modules/Spectrum/Signal/presenters/index.d.ts +1 -0
- package/{components → modules/Spectrum}/Signal/tools.d.ts +1 -1
- package/{components → modules/Spectrum}/Signal/useSignalDataManager.d.ts +1 -1
- package/modules/Spectrum/Signal/utils.d.ts +27 -0
- package/modules/Spectrum/render.d.ts +31 -52
- package/{hooks → modules/Spectrum}/useSpectrumAnalyzer/index.d.ts +1 -1
- package/modules/base/BaseRenderer.d.ts +63 -0
- package/modules/base/CircularRenderer.d.ts +4 -5
- package/package.json +28 -4
- package/{modules/tools.d.ts → runtime/passThrough.d.ts} +1 -1
- package/store/Params.d.ts +2 -1
- package/store/chart-store.d.ts +11 -0
- package/store/constants.d.ts +2 -3
- package/store/context.d.ts +6 -3
- package/store/globalState.d.ts +4 -0
- package/store/hooks/index.d.ts +1 -0
- package/store/hooks/useStore.d.ts +11 -1
- package/store/index.d.ts +1 -1
- package/store/reducer.d.ts +1 -67
- package/store/runtime.d.ts +16 -0
- package/tailwind-bridge.css +50 -0
- package/theme/init-charts-theme.d.ts +12 -0
- package/theme/style-scope.d.ts +20 -0
- package/theme/theme-color.d.ts +7 -0
- package/theme/theme-contract.d.ts +28 -0
- package/theme/theme-runtime.d.ts +14 -0
- package/theme/theme-styles.d.ts +10 -0
- package/theme/theme-tokens.d.ts +85 -0
- package/types/common.d.ts +1 -1
- package/types/store/index.d.ts +6 -4
- package/types/store/ui.d.ts +19 -5
- package/utils/cn.d.ts +2 -0
- package/utils/converter.d.ts +1 -1
- package/utils/cursor.d.ts +12 -0
- package/utils/frequencyCalculation.d.ts +8 -0
- package/utils/index.d.ts +1 -1
- package/utils/subscription.d.ts +18 -2
- package/components/AxisY/heatmap/type/Default/index.d.ts +0 -6
- package/components/AxisYByCanvas/index.d.ts +0 -6
- package/components/Band/index.d.ts +0 -5
- package/components/Band/useBand.d.ts +0 -2
- package/components/Cursor/Popover/index.d.ts +0 -10
- package/components/FrequencyAllocation/SegmentContainer.d.ts +0 -12
- package/components/FrequencyAllocation/Tooltip/index.d.ts +0 -8
- package/components/FrequencyAllocation/useAllocationFinder.d.ts +0 -10
- package/components/GridLines/Occdahsed/index.d.ts +0 -3
- package/components/Signal/SegmentContainer.d.ts +0 -26
- package/components/Signal/useStationFinder.d.ts +0 -12
- package/components/Signal/utils.d.ts +0 -15
- package/components/SignalAnalysis/Switch/index.d.ts +0 -3
- package/components/ToolsBar/IconBox.d.ts +0 -12
- package/components/Zoom/ZoomOffsetContainer/index.d.ts +0 -7
- package/lib/LevelStream/useAxisY.d.ts +0 -1
- package/utils/theme.d.ts +0 -18
- /package/{lib → charts}/Dial/Chart.d.ts +0 -0
- /package/{lib → charts}/Dial/index.d.ts +0 -0
- /package/{lib → charts}/Gauge/Chart.d.ts +0 -0
- /package/{lib → charts}/Gauge/index.d.ts +0 -0
- /package/{lib → charts}/Heatmap/Chart.d.ts +0 -0
- /package/{lib → charts}/Heatmap/index.d.ts +0 -0
- /package/{lib → charts}/IQ/Chart.d.ts +0 -0
- /package/{lib → charts}/IQ/index.d.ts +0 -0
- /package/{lib → charts}/LevelStream/Chart.d.ts +0 -0
- /package/{lib → charts}/LevelStream/index.d.ts +0 -0
- /package/{lib → charts}/Occupancy/Chart.d.ts +0 -0
- /package/{lib → charts}/Occupancy/index.d.ts +0 -0
- /package/{lib → charts}/SpatialSpectrum/Chart.d.ts +0 -0
- /package/{lib → charts}/SpatialSpectrum/index.d.ts +0 -0
- /package/{lib → charts}/Spectrum/Chart.d.ts +0 -0
- /package/{lib → charts}/Spectrum/index.d.ts +0 -0
- /package/components/AxisY/heatmap/{type/Default → variants/standard}/GradientRibbon/index.d.ts +0 -0
- /package/components/AxisY/occupancy/{type/Default → variants/standard}/index.d.ts +0 -0
- /package/components/AxisY/spectrum/{components/Autoranging/index.d.ts → controls/AutorangingControl.d.ts} +0 -0
- /package/components/AxisY/spectrum/{components/Step/index.d.ts → controls/StepControl.d.ts} +0 -0
- /package/components/AxisY/spectrum/{components/Unit/index.d.ts → controls/UnitControl.d.ts} +0 -0
- /package/components/{Popover → Overlay/Popover}/index.d.ts +0 -0
- /package/components/{Portal → Overlay/Portal}/index.d.ts +0 -0
- /package/components/{ToolsBar → Toolbar/controls}/Reset.d.ts +0 -0
- /package/components/{ToolsBar → Toolbar/controls}/SegmentsDisplayControl/index.d.ts +0 -0
- /package/components/{ToolsBar → Toolbar/controls}/SeriesDisplayControl/index.d.ts +0 -0
- /package/components/{ToolsBar → Toolbar/decorations}/SpacerLine.d.ts +0 -0
- /package/components/{ToolsBar → Toolbar}/index.d.ts +0 -0
- /package/{components/GuageBox/index.d.ts → modules/Gauge/InteractionSurface.d.ts} +0 -0
- /package/{components/HeatmapCapture → modules/Heatmap/Capture}/Area/index.d.ts +0 -0
- /package/{components/HeatmapCapture → modules/Heatmap/Capture}/RowIndex/index.d.ts +0 -0
- /package/{components/HeatmapCapture → modules/Heatmap/Capture}/Slider/index.d.ts +0 -0
- /package/{components/FrequencyTagLine → modules/Heatmap/Capture}/Switch/index.d.ts +0 -0
- /package/{components/HeatmapCapture → modules/Heatmap/Capture}/index.d.ts +0 -0
- /package/{components/HeatmapCapture → modules/Heatmap/TimeRange}/Switch/index.d.ts +0 -0
- /package/{components → modules/Heatmap}/TimeRange/useTimeRange.d.ts +0 -0
- /package/{components → modules/Spectrum}/Blaze/index.d.ts +0 -0
- /package/{components → modules/Spectrum}/DeltaMeasurement/Switch.d.ts +0 -0
- /package/{components → modules/Spectrum}/DeltaMeasurement/index.d.ts +0 -0
- /package/{components → modules/Spectrum}/DragFrame/index.d.ts +0 -0
- /package/{components → modules/Spectrum}/FrequencyAllocation/Switch/index.d.ts +0 -0
- /package/{components → modules/Spectrum}/FrequencyAllocation/data.d.ts +0 -0
- /package/{components → modules/Spectrum}/FrequencyTagLine/Board/index.d.ts +0 -0
- /package/{components/Limit → modules/Spectrum/FrequencyTagLine}/Switch/index.d.ts +0 -0
- /package/{components → modules/Spectrum}/Legend/index.d.ts +0 -0
- /package/{components → modules/Spectrum}/Limit/Item.d.ts +0 -0
- /package/{components/TimeRange → modules/Spectrum/Limit}/Switch/index.d.ts +0 -0
- /package/{components → modules/Spectrum}/Limit/index.d.ts +0 -0
- /package/{components → modules/Spectrum}/Markers/Switch/index.d.ts +0 -0
- /package/{components → modules/Spectrum}/Markers/index.d.ts +0 -0
- /package/{components → modules/Spectrum}/Scope/index.d.ts +0 -0
- /package/{components → modules/Spectrum}/SegmentsZebra/index.d.ts +0 -0
- /package/{components → modules/Spectrum}/Signal/Switch/index.d.ts +0 -0
- /package/{components/Signal/type.d.ts → modules/Spectrum/Signal/metadata/signalType.d.ts} +0 -0
- /package/{components → modules/Spectrum}/Stripe/Switch/index.d.ts +0 -0
- /package/{components → modules/Spectrum}/Stripe/index.d.ts +0 -0
- /package/{hooks/publish → modules/Spectrum}/useMarkerPublish.d.ts +0 -0
- /package/{hooks → modules/Spectrum}/useSpectrumAnalyzer/useTemplateComparison.d.ts +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { type ToolbarTone } from './styles';
|
|
3
|
+
import { type ToolbarSurfaceProps } from './ToolbarSurface';
|
|
4
|
+
export interface ToolbarContentBoxProps extends Pick<ToolbarSurfaceProps, 'style' | 'className' | 'title' | 'disabled' | 'onClick' | 'onDoubleClick' | 'onWheel'> {
|
|
5
|
+
contentClassName?: string;
|
|
6
|
+
active?: boolean;
|
|
7
|
+
tone?: ToolbarTone;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare const ToolbarContentBox: React.FC<ToolbarContentBoxProps>;
|
|
11
|
+
export default ToolbarContentBox;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { Dropdown } from '../../Overlay';
|
|
3
|
+
type BaseDropdownProps = React.ComponentProps<typeof Dropdown>;
|
|
4
|
+
type ToolbarDropdownProps = Omit<BaseDropdownProps, 'triggerVariant'>;
|
|
5
|
+
interface ToolbarIconDropdownProps extends Omit<BaseDropdownProps, 'triggerVariant' | 'triggerContent'> {
|
|
6
|
+
icon: React.ReactNode;
|
|
7
|
+
title?: string;
|
|
8
|
+
}
|
|
9
|
+
interface ToolbarDropdownGroupProps extends Omit<BaseDropdownProps, 'triggerVariant' | 'triggerClassName'> {
|
|
10
|
+
leading: React.ReactNode;
|
|
11
|
+
triggerClassName?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const ToolbarDropdown: React.FC<ToolbarDropdownProps>;
|
|
14
|
+
declare const ToolbarIconDropdown: React.FC<ToolbarIconDropdownProps>;
|
|
15
|
+
declare const ToolbarDropdownGroup: React.FC<ToolbarDropdownGroupProps>;
|
|
16
|
+
export { ToolbarDropdown, ToolbarDropdownGroup, ToolbarIconDropdown };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
interface ToolbarGlyphProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
opticalOffsetX?: number;
|
|
6
|
+
opticalOffsetY?: number;
|
|
7
|
+
opticalScale?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const ToolbarGlyph: React.FC<ToolbarGlyphProps>;
|
|
10
|
+
export default ToolbarGlyph;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
interface ToolbarGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}
|
|
5
|
+
interface ToolbarGroupSeparatorProps {
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const ToolbarGroup: React.FC<ToolbarGroupProps>;
|
|
9
|
+
declare const ToolbarGroupSeparator: React.FC<ToolbarGroupSeparatorProps>;
|
|
10
|
+
export { ToolbarGroup, ToolbarGroupSeparator };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type ToolbarSurfaceElement = HTMLElement;
|
|
3
|
+
export interface ToolbarSurfaceProps {
|
|
4
|
+
style?: React.CSSProperties;
|
|
5
|
+
className?: string;
|
|
6
|
+
title?: React.ReactNode;
|
|
7
|
+
active?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
onClick?: (e: React.SyntheticEvent<ToolbarSurfaceElement>) => void;
|
|
10
|
+
onDoubleClick?: (e: React.SyntheticEvent<ToolbarSurfaceElement>) => void;
|
|
11
|
+
onWheel?: (e: React.WheelEvent<ToolbarSurfaceElement>) => void;
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
declare const ToolbarSurface: React.FC<ToolbarSurfaceProps>;
|
|
15
|
+
export default ToolbarSurface;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as IconBox, type IconBoxProps } from './IconBox';
|
|
2
|
+
export * from './styles';
|
|
3
|
+
export { default as ToolbarContentBox, type ToolbarContentBoxProps } from './ToolbarContentBox';
|
|
4
|
+
export { ToolbarDropdown, ToolbarDropdownGroup, ToolbarIconDropdown } from './ToolbarDropdown';
|
|
5
|
+
export { default as ToolbarGlyph } from './ToolbarGlyph';
|
|
6
|
+
export { ToolbarGroup, ToolbarGroupSeparator } from './ToolbarGroup';
|
|
7
|
+
export { default as ToolbarGroupIconBox } from './ToolbarGroupIconBox';
|
|
8
|
+
export { default as ToolbarSurface, type ToolbarSurfaceProps } from './ToolbarSurface';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare const TOOLBAR_SHELL_CLASS_NAME = "relative flex h-10 w-full items-center justify-between pl-[var(--size-gap-base)] text-xs text-foreground";
|
|
2
|
+
export declare const TOOLBAR_SHELL_STYLE: {
|
|
3
|
+
readonly background: "linear-gradient(to bottom, color-mix(in srgb, var(--background) 100%, transparent), color-mix(in srgb, var(--background) 86%, transparent))";
|
|
4
|
+
readonly boxShadow: "0 1px 4px color-mix(in srgb, var(--border) 72%, transparent)";
|
|
5
|
+
};
|
|
6
|
+
export declare const TOOLBAR_ITEMS_CLASS_NAME = "flex h-full items-center gap-[var(--size-gap-base)]";
|
|
7
|
+
export declare const TOOLBAR_SEPARATOR_BASE_CLASS_NAME = "self-center";
|
|
8
|
+
export declare const TOOLBAR_SEPARATOR_CLASS_NAME = "self-center h-[18px]";
|
|
9
|
+
export declare const TOOLBAR_GROUP_SEPARATOR_CLASS_NAME = "self-center h-3.5";
|
|
10
|
+
export declare const TOOLBAR_SURFACE_CLASS_NAME = "pointer-events-auto box-border rounded-[var(--radius-group)] bg-secondary text-inherit transition-[background-color,color,opacity] select-none";
|
|
11
|
+
export declare const TOOLBAR_INTERACTIVE_SURFACE_CLASS_NAME = "cursor-pointer appearance-none border-0 hover:bg-accent/72 hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary/70 focus-visible:ring-offset-1 focus-visible:ring-offset-background";
|
|
12
|
+
export declare const TOOLBAR_DISABLED_SURFACE_CLASS_NAME = "cursor-not-allowed opacity-45 hover:bg-secondary";
|
|
13
|
+
export declare const TOOLBAR_TONE_CLASS_NAME_MAP: {
|
|
14
|
+
readonly default: "text-foreground";
|
|
15
|
+
readonly primary: "text-primary";
|
|
16
|
+
readonly warning: "text-warning";
|
|
17
|
+
readonly destructive: "text-destructive";
|
|
18
|
+
};
|
|
19
|
+
export declare const TOOLBAR_ACTIVE_SURFACE_CLASS_NAME_MAP: {
|
|
20
|
+
readonly default: "data-[active=true]:bg-accent/72 data-[active=true]:text-foreground data-[active=true]:shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--border)_72%,transparent)] data-[active=true]:hover:bg-accent/72";
|
|
21
|
+
readonly primary: "data-[active=true]:bg-accent/72 data-[active=true]:text-primary data-[active=true]:shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--border)_72%,transparent)] data-[active=true]:hover:bg-accent/72";
|
|
22
|
+
readonly warning: "data-[active=true]:bg-warning/10 data-[active=true]:text-warning data-[active=true]:shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--warning)_24%,transparent)] data-[active=true]:hover:bg-warning/12";
|
|
23
|
+
readonly destructive: "data-[active=true]:bg-destructive/10 data-[active=true]:text-destructive data-[active=true]:shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--destructive)_24%,transparent)] data-[active=true]:hover:bg-destructive/12";
|
|
24
|
+
};
|
|
25
|
+
export type ToolbarTone = keyof typeof TOOLBAR_TONE_CLASS_NAME_MAP;
|
|
26
|
+
export declare const TOOLBAR_ICON_TRIGGER_CLASS_NAME = "inline-flex h-[26px] min-w-[26px] shrink-0 items-center justify-center";
|
|
27
|
+
export declare const TOOLBAR_ICON_BOX_CLASS_NAME = "pointer-events-auto box-border rounded-[var(--radius-group)] bg-secondary text-inherit transition-[background-color,color,opacity] select-none inline-flex h-[26px] min-w-[26px] shrink-0 items-center justify-center px-1 [&_svg]:size-4 [&_svg]:shrink-0 [&>span]:flex [&>span]:items-center [&>span]:justify-center";
|
|
28
|
+
export declare const TOOLBAR_OUTLINED_SHELL_CLASS_NAME = "inline-flex h-[26px] shrink-0 items-stretch overflow-hidden rounded-[var(--radius-group)] border border-solid border-border/60 transition-colors";
|
|
29
|
+
export declare const TOOLBAR_OUTLINED_TRIGGER_CLASS_NAME = "inline-flex h-[26px] shrink-0 items-stretch overflow-hidden rounded-[var(--radius-group)] border border-solid border-border/60 transition-colors min-w-10 items-center justify-between gap-1 px-[calc(var(--size-gap-base)/2)] hover:bg-accent/72 hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary/70 focus-visible:ring-offset-1 focus-visible:ring-offset-background";
|
|
30
|
+
export declare const TOOLBAR_OUTLINED_TRIGGER_OPEN_CLASS_NAME = "data-[state=open]:bg-accent/72 data-[state=open]:text-foreground data-[state=open]:shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--border)_72%,transparent)] data-[state=open]:hover:bg-accent/72";
|
|
31
|
+
export declare const TOOLBAR_INLINE_TRIGGER_CLASS_NAME = "inline-flex h-full min-h-0 min-w-0 items-center gap-1 p-0 text-inherit focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary/70 focus-visible:ring-offset-1 focus-visible:ring-offset-background";
|
|
32
|
+
export declare const TOOLBAR_INLINE_INSET_CLASS_NAME = "inline-flex h-full items-center px-[calc(var(--size-gap-base)/2)] text-primary hover:bg-accent/72 data-[state=open]:bg-accent/72 data-[state=open]:hover:bg-accent/72";
|
|
33
|
+
export declare const TOOLBAR_GROUP_CHILD_CLASS_NAME = "h-full rounded-none border-0 bg-transparent shadow-none";
|
|
34
|
+
export declare const TOOLBAR_CONTENT_BOX_CLASS_NAME = "pointer-events-auto box-border rounded-[var(--radius-group)] bg-secondary text-inherit transition-[background-color,color,opacity] select-none inline-flex h-[26px] min-w-[26px] shrink-0 items-center px-1";
|
|
35
|
+
export declare const TOOLBAR_CONTENT_BODY_CLASS_NAME = "inline-flex h-[14px] min-w-0 items-center justify-center text-xs leading-none";
|
|
36
|
+
export declare const TOOLBAR_CONTENT_ICON_CLASS_NAME = "w-4 justify-center";
|
|
37
|
+
export declare const TOOLBAR_CONTENT_VALUE_CLASS_NAME = "min-w-8 justify-center text-center";
|
|
38
|
+
export declare const TOOLBAR_CONTENT_GRADIENT_CLASS_NAME = "w-[60px] justify-stretch";
|
|
39
|
+
export declare const TOOLBAR_TRIGGER_ICON_CLASS_NAME = "inline-flex h-full min-w-4 shrink-0 items-center justify-center text-primary";
|
|
40
|
+
export declare const TOOLBAR_GLYPH_CLASS_NAME = "inline-flex size-4 shrink-0 items-center justify-center [&_svg]:size-full [&_svg]:shrink-0";
|
|
41
|
+
export declare const TOOLBAR_DROPDOWN_CONTENT_CLASS_NAME = "border-border/80 bg-secondary/92 text-foreground shadow-[0_10px_28px_color-mix(in_srgb,var(--background)_60%,transparent)] backdrop-blur-xl";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { ChartType, ToolbarItemType } from '../../config';
|
|
3
|
+
export interface ToolbarItemConfig {
|
|
4
|
+
component: React.ComponentType<Record<string, unknown>>;
|
|
5
|
+
toolType: ToolbarItemType;
|
|
6
|
+
supportedCharts: ChartType[];
|
|
7
|
+
excludedCharts?: ChartType[];
|
|
8
|
+
props?: Record<string, unknown>;
|
|
9
|
+
}
|
|
10
|
+
export declare const TOOLBAR_ITEM_CONFIGS: ToolbarItemConfig[];
|
|
11
|
+
export declare const isToolbarItemVisible: (config: ToolbarItemConfig, chartType: ChartType | undefined, hiddenTools?: string[]) => boolean;
|
|
12
|
+
export declare const resolveToolbarItemProps: (config: ToolbarItemConfig, chartType: ChartType | undefined) => Record<string, unknown>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { AutorangingControl as AutorangingSwitch, UnitControl as UnitSwitch } from '../../AxisY/spectrum/controls';
|
|
2
|
+
export { default as ZoomSwitch } from '../../Zoom/Switch';
|
|
3
|
+
export { default as FluorescenceSwitch } from '../../../modules/Fluorescence/Switch';
|
|
4
|
+
export { default as HeatmapCaptureSwitch } from '../../../modules/Heatmap/Capture/Switch';
|
|
5
|
+
export { default as TimeRangeSwitch } from '../../../modules/Heatmap/TimeRange/Switch';
|
|
6
|
+
export { default as DeltaMeasurementSwitch } from '../../../modules/Spectrum/DeltaMeasurement/Switch';
|
|
7
|
+
export { default as FrequencyAllocationSwitch } from '../../../modules/Spectrum/FrequencyAllocation/Switch';
|
|
8
|
+
export { default as LimitSwitch } from '../../../modules/Spectrum/Limit/Switch';
|
|
9
|
+
export { default as MarkersSwitch } from '../../../modules/Spectrum/Markers/Switch';
|
|
10
|
+
export { default as SignalSwitch } from '../../../modules/Spectrum/Signal/Switch';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
children: React.ReactNode;
|
|
3
|
+
className?: string;
|
|
4
|
+
style?: React.CSSProperties;
|
|
5
|
+
}
|
|
6
|
+
declare const ZoomViewportLayer: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export default ZoomViewportLayer;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import type { ButtonHTMLAttributes } from 'react';
|
|
3
|
+
declare const buttonVariants: (props?: {
|
|
4
|
+
variant?: "link" | "destructive" | "secondary" | "default" | "outline" | "ghost";
|
|
5
|
+
size?: "default" | "icon" | "sm" | "lg";
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) => string;
|
|
7
|
+
export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<typeof buttonVariants> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const Button: import("react").ForwardRefExoticComponent<ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<(props?: {
|
|
11
|
+
variant?: "link" | "destructive" | "secondary" | "default" | "outline" | "ghost";
|
|
12
|
+
size?: "default" | "icon" | "sm" | "lg";
|
|
13
|
+
} & import("class-variance-authority/types").ClassProp) => string> & {
|
|
14
|
+
asChild?: boolean;
|
|
15
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
16
|
+
export { buttonVariants };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
export { Checkbox };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { CursorEventSnapshot } from '../../types/store';
|
|
3
|
+
interface CursorFollowLayerProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
event?: CursorEventSnapshot | null;
|
|
6
|
+
margin?: number;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const CursorFollowLayer: React.FC<CursorFollowLayerProps>;
|
|
10
|
+
export default CursorFollowLayer;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
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;
|
|
6
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
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;
|
|
10
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
11
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
12
|
+
export { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
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;
|
|
6
|
+
declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuPortal, DropdownMenuSeparator, DropdownMenuTrigger };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Input: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
type NativeInputProps = Omit<ComponentProps<'input'>, 'type' | 'value' | 'defaultValue' | 'onChange'>;
|
|
3
|
+
export interface NumberInputProps extends NativeInputProps {
|
|
4
|
+
value?: number | null;
|
|
5
|
+
label?: string;
|
|
6
|
+
inputClassName?: string;
|
|
7
|
+
onValueChange?: (value: number | null) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const NumberInput: import("react").ForwardRefExoticComponent<Omit<NumberInputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { type HTMLAttributes } from 'react';
|
|
3
|
+
export declare const panelVariants: (props?: {
|
|
4
|
+
variant?: "default" | "ghost" | "subtle" | "floating";
|
|
5
|
+
size?: "sm" | "lg" | "xs" | "md";
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) => string;
|
|
7
|
+
export interface PanelProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof panelVariants> {
|
|
8
|
+
}
|
|
9
|
+
export declare const Panel: import("react").ForwardRefExoticComponent<PanelProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
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;
|
|
6
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
2
|
+
import * as React from 'react';
|
|
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>>;
|
|
5
|
+
export { ScrollArea, ScrollBar };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
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;
|
|
6
|
+
declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
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;
|
|
4
|
+
export { Separator };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare function Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
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;
|
|
7
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useChartsPortalContainer: (slot: string) => HTMLElement;
|
package/config/constants.d.ts
CHANGED
|
@@ -97,7 +97,7 @@ export declare enum ToolType {
|
|
|
97
97
|
FrequencyDataBoard = "frequencyDataBoard",
|
|
98
98
|
FrequencyTagLine = "frequencyTagLine",
|
|
99
99
|
GridLines = "gridLines",
|
|
100
|
-
|
|
100
|
+
GaugeBox = "gaugeBox",
|
|
101
101
|
HeatmapCapture = "heatmapCapture",
|
|
102
102
|
Legend = "legend",
|
|
103
103
|
Limit = "limit",
|
|
@@ -112,7 +112,7 @@ export declare enum ToolType {
|
|
|
112
112
|
Frame = "frame",
|
|
113
113
|
Area = "area"
|
|
114
114
|
}
|
|
115
|
-
export declare enum
|
|
115
|
+
export declare enum ToolbarItemType {
|
|
116
116
|
AutorangingSwitch = "AutorangingSwitch",
|
|
117
117
|
UnitSwitch = "UnitSwitch",
|
|
118
118
|
StepSwitch = "StepSwitch",
|
package/config/setting.d.ts
CHANGED
|
@@ -53,9 +53,9 @@ declare const setConfig: (c?: Partial<Config>) => void;
|
|
|
53
53
|
* 获取配置
|
|
54
54
|
*
|
|
55
55
|
* @param {keyof Config} [name]
|
|
56
|
-
* @returns {Config | any}
|
|
57
56
|
*/
|
|
58
|
-
declare
|
|
57
|
+
declare function getConfig(): Config;
|
|
58
|
+
declare function getConfig<K extends keyof Config>(name: K): Config[K];
|
|
59
59
|
/**
|
|
60
60
|
* 获取series的配置
|
|
61
61
|
*
|
|
@@ -69,4 +69,4 @@ declare const getSeriesConfig: () => Config["line"];
|
|
|
69
69
|
* @returns {string[]}
|
|
70
70
|
*/
|
|
71
71
|
declare const getGradient: (i?: number) => string[];
|
|
72
|
-
export { defaultConfig,
|
|
72
|
+
export { defaultConfig, getConfig, getGradient, getSeriesConfig, setConfig };
|
package/hooks/index.d.ts
CHANGED
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
* Hooks 统一导出
|
|
3
3
|
*/
|
|
4
4
|
export { useChannel, usePoints, useSegments } from './data';
|
|
5
|
-
export {
|
|
5
|
+
export { type EnhancedPublish, PUB_SUB, usePublish, useSafePublish } from './publish';
|
|
6
6
|
export { SET_SEGMENTS_DISPLAY, type UseSpectrumChartTypeProps, useSpectrumChartType, useSpectrumRule } from './spectrum';
|
|
7
7
|
export { default as useChart } from './useChart';
|
|
8
|
-
export {
|
|
8
|
+
export { withChartPublisher } from './useChartComponent';
|
|
9
9
|
export { default as useLevelStreamAnalyzer } from './useLevelStreamAnalyzer';
|
|
10
10
|
export { useModuleSubscription } from './useModuleSubscription';
|
|
11
11
|
export { useFilteredSeries, useSeriesForComponent, useSeriesManager } from './useSeriesManager';
|
|
12
|
-
export { default as useSpectrumAnalyzer } from './useSpectrumAnalyzer';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type ModulePublishType = 'antennaFactor' | 'autoranging' | 'band' | 'channels' | 'clear' | 'dial' | 'fluorescence' | 'gauge' | 'heatmap' | 'iq' | 'levelStream' | 'marker' | 'occupancy' | 'option' | 'points' | 'render' | 'reset' | 'resize' | 'segments' | 'series' | 'signal' | 'spectrum' | 'spectrumBandwidth' | 'scope';
|
|
2
|
+
export interface ModulePublishEventBase {
|
|
3
|
+
pstype?: ModulePublishType;
|
|
4
|
+
}
|
|
5
|
+
export interface ChartSubscriptionInterface<TData = unknown> {
|
|
6
|
+
updateSeries?(data: TData, ...args: unknown[]): void;
|
|
7
|
+
reset(): void;
|
|
8
|
+
resize(): void;
|
|
9
|
+
setRange?(range: unknown): void;
|
|
10
|
+
setSeries?(config: unknown): void;
|
|
11
|
+
useRangeAutoFocus?(): void;
|
|
12
|
+
}
|
|
13
|
+
export type DataExtractor<TData, TEvent extends ModulePublishEventBase = ModulePublishEventBase> = (event: TEvent) => TData;
|
|
14
|
+
export type ModuleEventHandler<TData = unknown, TEvent extends ModulePublishEventBase = ModulePublishEventBase> = (event: TEvent, chart: ChartSubscriptionInterface<TData>) => void;
|
|
15
|
+
export interface ModuleSubscriptionHandlerOptions<TData = unknown, TEvent extends ModulePublishEventBase = ModulePublishEventBase> {
|
|
16
|
+
chart: ChartSubscriptionInterface<TData>;
|
|
17
|
+
eventHandlers?: Partial<Record<ModulePublishType, ModuleEventHandler<TData, TEvent>>>;
|
|
18
|
+
extractData?: DataExtractor<TData, TEvent>;
|
|
19
|
+
handleRender?: ModuleEventHandler<TData, TEvent>;
|
|
20
|
+
renderPSTypes?: ModulePublishType[];
|
|
21
|
+
treatMissingPSTypeAsRender?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare const handleModuleSubscriptionEvent: <TData = unknown, TEvent extends ModulePublishEventBase = ModulePublishEventBase>(event: TEvent, { chart, eventHandlers, extractData, handleRender, renderPSTypes, treatMissingPSTypeAsRender }: ModuleSubscriptionHandlerOptions<TData, TEvent>) => void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Publish, PublishData } from '../../types';
|
|
2
|
+
import { type rawData } from '../../utils/subscription.ts';
|
|
3
|
+
type ReadyCleanup = () => void;
|
|
4
|
+
type ReadyCallback = () => ReadyCleanup | undefined;
|
|
5
|
+
export interface EnhancedPublish extends Publish {
|
|
6
|
+
isReady: () => boolean;
|
|
7
|
+
onReady: (callback: ReadyCallback) => ReadyCleanup | undefined;
|
|
8
|
+
getSourceData: () => rawData;
|
|
9
|
+
}
|
|
10
|
+
export interface EnhancedPublishController {
|
|
11
|
+
attachPublish: (publish: Publish) => void;
|
|
12
|
+
dispose: () => void;
|
|
13
|
+
enhancedPublish: EnhancedPublish;
|
|
14
|
+
publish: (data: PublishData) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare function createEnhancedPublishController(): EnhancedPublishController;
|
|
17
|
+
export {};
|
package/hooks/publish/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 发布相关 hooks
|
|
3
3
|
*/
|
|
4
|
-
export {
|
|
4
|
+
export type { EnhancedPublish } from './enhancedPublish';
|
|
5
5
|
export { default as usePublish, PUB_SUB } from './usePublish';
|
|
6
6
|
export { default as useSafePublish } from './useSafePublish';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface PublishEventLike {
|
|
2
|
+
pstype?: string;
|
|
3
|
+
}
|
|
4
|
+
interface NormalizeRenderPublishEventOptions {
|
|
5
|
+
allowImplicitRender?: boolean;
|
|
6
|
+
renderPSTypes?: string[];
|
|
7
|
+
}
|
|
8
|
+
export declare const normalizeRenderPublishEvent: <T extends PublishEventLike>(event: T, options?: NormalizeRenderPublishEventOptions) => T;
|
|
9
|
+
export {};
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type
|
|
3
|
-
interface EnhancedPublish extends Publish {
|
|
4
|
-
isReady: () => boolean;
|
|
5
|
-
onReady: (callback: () => void | (() => void)) => undefined | (() => void);
|
|
6
|
-
getSourceData: () => rawData;
|
|
7
|
-
}
|
|
1
|
+
import type { PublishData } from '../../types';
|
|
2
|
+
import { type EnhancedPublish } from './enhancedPublish';
|
|
8
3
|
export interface UseSafePublishReturn {
|
|
9
4
|
publish: (data: PublishData) => void;
|
|
10
5
|
chartRef: React.RefObject<EnhancedPublish>;
|
|
11
6
|
}
|
|
12
7
|
export default function useSafePublish(): UseSafePublishReturn;
|
|
13
|
-
export {};
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import React, { type ComponentType } from 'react';
|
|
2
2
|
import type { Publish } from '../types';
|
|
3
|
-
import type { rawData } from '../utils/subscription';
|
|
4
|
-
export interface EnhancedPublish extends Publish {
|
|
5
|
-
isReady: () => boolean;
|
|
6
|
-
onReady: (callback: () => void | (() => void)) => (() => void) | undefined;
|
|
7
|
-
getSourceData: () => rawData;
|
|
8
|
-
}
|
|
9
3
|
/**
|
|
10
4
|
* 创建图表组件的高阶函数,提供安全的publish功能
|
|
11
5
|
* @param ChartComponent 要包装的图表组件
|
package/hooks/useDragSelect.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ interface levelStreamRenderData {
|
|
|
3
3
|
probabilityRangeData: Float32Array;
|
|
4
4
|
spectrumData: Float32Array;
|
|
5
5
|
}
|
|
6
|
-
export default function
|
|
6
|
+
export default function useLevelStreamAnalyzer(): {
|
|
7
7
|
analyzer: LevelStreamAnalyzer;
|
|
8
8
|
updateLevelStreamData: (renderData: levelStreamRenderData) => void;
|
|
9
9
|
};
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
import type { ModuleType } from '../config';
|
|
2
2
|
import type { PublishData } from '../types';
|
|
3
|
-
|
|
4
|
-
* 模块订阅所需的图表接口(最小化)
|
|
5
|
-
*/
|
|
6
|
-
interface ChartSubscriptionInterface<TData = unknown> {
|
|
7
|
-
updateSeries?(data: TData): void;
|
|
8
|
-
reset(): void;
|
|
9
|
-
resize(): void;
|
|
10
|
-
}
|
|
11
|
-
type DataExtractor<TData> = (d: PublishData) => TData;
|
|
12
|
-
type CustomHandler = (d: PublishData) => boolean | undefined;
|
|
3
|
+
import { type ChartSubscriptionInterface, type DataExtractor, type ModuleEventHandler, type ModulePublishType } from './module-subscription-core';
|
|
13
4
|
interface UseModuleSubscriptionOptions<TData = unknown> {
|
|
14
5
|
/**
|
|
15
6
|
* 模块类型
|
|
@@ -22,11 +13,23 @@ interface UseModuleSubscriptionOptions<TData = unknown> {
|
|
|
22
13
|
/**
|
|
23
14
|
* 从 PublishData 中提取数据(默认直接传递整个 d)
|
|
24
15
|
*/
|
|
25
|
-
extractData?: DataExtractor<TData>;
|
|
16
|
+
extractData?: DataExtractor<TData, PublishData>;
|
|
17
|
+
/**
|
|
18
|
+
* 显式声明哪些 pstype 视作当前模块的渲染主路径
|
|
19
|
+
*/
|
|
20
|
+
renderPSTypes?: ModulePublishType[];
|
|
21
|
+
/**
|
|
22
|
+
* 当事件没有 pstype 时,是否也视为 render 事件
|
|
23
|
+
*/
|
|
24
|
+
treatMissingPSTypeAsRender?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* 自定义 render 处理逻辑;未提供时走 updateSeries + extractData 默认链路
|
|
27
|
+
*/
|
|
28
|
+
handleRender?: ModuleEventHandler<TData, PublishData>;
|
|
26
29
|
/**
|
|
27
|
-
*
|
|
30
|
+
* 事件级处理器,优先级高于默认 Render/Reset/Resize 行为
|
|
28
31
|
*/
|
|
29
|
-
|
|
32
|
+
eventHandlers?: Partial<Record<ModulePublishType, ModuleEventHandler<TData, PublishData>>>;
|
|
30
33
|
}
|
|
31
34
|
/**
|
|
32
35
|
* 模块订阅 Hook
|
|
@@ -49,18 +52,13 @@ interface UseModuleSubscriptionOptions<TData = unknown> {
|
|
|
49
52
|
* });
|
|
50
53
|
*
|
|
51
54
|
* @example
|
|
52
|
-
* //
|
|
55
|
+
* // 自定义 render 类型或事件处理
|
|
53
56
|
* useModuleSubscription({
|
|
54
|
-
* moduleType: ModuleType.
|
|
57
|
+
* moduleType: ModuleType.Gauge,
|
|
55
58
|
* chart,
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* // 自定义处理
|
|
59
|
-
* return true; // 已处理
|
|
60
|
-
* }
|
|
61
|
-
* return false; // 继续默认处理
|
|
62
|
-
* }
|
|
59
|
+
* renderPSTypes: [PSType.Gauge],
|
|
60
|
+
* treatMissingPSTypeAsRender: true
|
|
63
61
|
* });
|
|
64
62
|
*/
|
|
65
|
-
export declare function useModuleSubscription<TData = unknown>({ moduleType, chart, extractData,
|
|
63
|
+
export declare function useModuleSubscription<TData = unknown>({ moduleType, chart, extractData, renderPSTypes, treatMissingPSTypeAsRender, handleRender, eventHandlers }: UseModuleSubscriptionOptions<TData>): void;
|
|
66
64
|
export default useModuleSubscription;
|
package/index.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
1
|
+
import './theme/library.css';
|
|
2
|
+
export { Dial, Gauge, Heatmap, IQ, LevelStream, Occupancy, Spectrum } from './charts';
|
|
3
|
+
export { ChartType, FrequencyUnit, MarkerEventType, ModuleType, OptionKey, PSType, SegmentsEvent, SeriesType, ToolbarItemType, ToolType } from './config';
|
|
3
4
|
export { type EnhancedPublish, useSafePublish, withChartPublisher } from './hooks';
|
|
4
|
-
export {
|
|
5
|
+
export { setFrequencyAllocationToCache } from './modules/Spectrum/FrequencyAllocation/tools';
|
|
6
|
+
export { type ChartsThemeChange, type InitChartsThemeOptions, type InitChartsThemeResult, initChartsTheme } from './theme/init-charts-theme';
|
|
7
|
+
export { type ChartsThemePreference, type ChartsThemeState, getChartsThemeState, subscribeChartsThemeChange } from './theme/theme-runtime';
|
|
8
|
+
export type { ChartsSizeTokensConfig, ChartsThemeTokensConfig } from './theme/theme-tokens';
|
|
5
9
|
export type { AxisXProps, AxisYRange, ChartRef, FrequencyAllocationItem, MarkerProps, MarkerType, Publish, PublishData, PublishDial, PublishGauge, PublishHeatmap, PublishIQ, PublishLevelStream, PublishOccupancy, PublishSpectrum, RecursiveFunction, // 递归方法 后期会删除
|
|
6
10
|
RecursiveObject, // 递归对象 后期会删除
|
|
7
11
|
Render, Reset, SegmentsOriginal, SeriesConfig, SetAntennaFactor, SetChannels, SetMarker, SetSegments, SetSeries, SetSpectrumBandwidth, SpectrumBandwidth, SpectrumExtraData, StationInfoType } from './types';
|