@nova-lab/charts 0.0.0-stage → 1.0.0-dev.32
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/LICENSE +202 -0
- package/README.md +158 -2
- package/dist/GeometryIndex-DDQ34Jf4.js +104 -0
- package/dist/MarkSeries-CQCAnV4s.js +245 -0
- package/dist/aggregation.d.ts +6 -0
- package/dist/aggregation.js +124 -0
- package/dist/annotations.d.ts +34 -0
- package/dist/annotations.js +71 -0
- package/dist/api/camera.d.ts +8 -0
- package/dist/api/cartesian.d.ts +21 -0
- package/dist/api/events.d.ts +13 -0
- package/dist/api/font.d.ts +3 -0
- package/dist/api/handle.d.ts +5 -0
- package/dist/api/host.d.ts +23 -0
- package/dist/api/internal.d.ts +41 -0
- package/dist/api/map-background.d.ts +12 -0
- package/dist/api/mark-paint.d.ts +5 -0
- package/dist/api/mark-style.d.ts +4 -0
- package/dist/api/navigation.d.ts +4 -0
- package/dist/api/overlay.d.ts +7 -0
- package/dist/api/partition.d.ts +11 -0
- package/dist/api/scene.d.ts +42 -0
- package/dist/api/state.d.ts +34 -0
- package/dist/api/types.d.ts +743 -0
- package/dist/area.d.ts +9 -0
- package/dist/area.js +706 -0
- package/dist/bar.d.ts +9 -0
- package/dist/bar.js +554 -0
- package/dist/brush.d.ts +17 -0
- package/dist/brush.js +86 -0
- package/dist/bubble.d.ts +8 -0
- package/dist/bubble.js +434 -0
- package/dist/camera-CUJAMfpx.js +57 -0
- package/dist/candlestick.d.ts +8 -0
- package/dist/candlestick.js +42 -0
- package/dist/cartesian-k_WIYsGp.js +1139 -0
- package/dist/chart-runtime-resolver-DwwXp3X8.js +20 -0
- package/dist/chart-series-runtime-C0P7h8Tl.js +127 -0
- package/dist/charts.js +1 -0
- package/dist/composed.d.ts +2 -0
- package/dist/composed.js +4 -0
- package/dist/crosshair.d.ts +23 -0
- package/dist/crosshair.js +60 -0
- package/dist/donut.d.ts +5 -0
- package/dist/donut.js +7 -0
- package/dist/funnel.d.ts +5 -0
- package/dist/funnel.js +40 -0
- package/dist/graph.d.ts +6 -0
- package/dist/graph.js +260 -0
- package/dist/heatmap.d.ts +8 -0
- package/dist/heatmap.js +37 -0
- package/dist/host-DLDeDU5k.js +4373 -0
- package/dist/index.d.ts +1 -0
- package/dist/internal-I5BDhahD.js +4 -0
- package/dist/layout-donut-BG4ubBtU.js +39 -0
- package/dist/line.d.ts +9 -0
- package/dist/line.js +452 -0
- package/dist/mark-paint-CMHKGegE.js +14 -0
- package/dist/mark-style-Cpl-ARQM.js +10 -0
- package/dist/model/area/create-area-series-layout.d.ts +15 -0
- package/dist/model/area/hit-test-area-layout.d.ts +2 -0
- package/dist/model/axis/ChartAxisModel.d.ts +28 -0
- package/dist/model/bar/create-bar-series-layout.d.ts +19 -0
- package/dist/model/bar/hit-test-bar-layout.d.ts +2 -0
- package/dist/model/bubble/create-bubble-series-layout.d.ts +15 -0
- package/dist/model/bubble/hit-test-bubble-layout.d.ts +2 -0
- package/dist/model/cartesian/append-line-contours.d.ts +4 -0
- package/dist/model/cartesian/axis-line-batch.d.ts +3 -0
- package/dist/model/cartesian/numeric-window.d.ts +7 -0
- package/dist/model/cartesian/point-series.d.ts +54 -0
- package/dist/model/cartesian/sample-extrema.d.ts +7 -0
- package/dist/model/cartesian/smooth-y.d.ts +4 -0
- package/dist/model/cartesian/translation-window.d.ts +17 -0
- package/dist/model/context/nova-chart-runtime.d.ts +54 -0
- package/dist/model/customization/chart-customization.d.ts +47 -0
- package/dist/model/customization/chart-presets.d.ts +6 -0
- package/dist/model/customization/chart-style-sheet.d.ts +9 -0
- package/dist/model/data/ChartDataStore.d.ts +113 -0
- package/dist/model/exploration/create-graph-layout.d.ts +11 -0
- package/dist/model/exploration/exploration-chart.types.d.ts +150 -0
- package/dist/model/exploration/force-layout.d.ts +9 -0
- package/dist/model/exploration/presets/airplane.d.ts +2 -0
- package/dist/model/exploration/presets/apartment.d.ts +2 -0
- package/dist/model/exploration/presets/botanical-park.d.ts +2 -0
- package/dist/model/exploration/presets/ferry.d.ts +2 -0
- package/dist/model/exploration/presets/ice-arena.d.ts +2 -0
- package/dist/model/exploration/presets/planetarium.d.ts +2 -0
- package/dist/model/exploration/presets/science-museum.d.ts +2 -0
- package/dist/model/exploration/presets/train.d.ts +2 -0
- package/dist/model/exploration/route-geometry.d.ts +9 -0
- package/dist/model/exploration/seat-shape.d.ts +7 -0
- package/dist/model/interaction/GeometryIndex.d.ts +14 -0
- package/dist/model/line/create-line-series-layout.d.ts +15 -0
- package/dist/model/line/hit-test-line-layout.d.ts +2 -0
- package/dist/model/novel/create-novel-layout.d.ts +5 -0
- package/dist/model/novel/hit-test-novel-layout.d.ts +3 -0
- package/dist/model/novel/layout-candlestick.d.ts +3 -0
- package/dist/model/novel/layout-donut.d.ts +3 -0
- package/dist/model/novel/layout-funnel.d.ts +3 -0
- package/dist/model/novel/layout-heatmap.d.ts +3 -0
- package/dist/model/novel/layout-input.d.ts +12 -0
- package/dist/model/novel/layout-radar.d.ts +3 -0
- package/dist/model/novel/layout-tree.d.ts +3 -0
- package/dist/model/novel/layout-treemap.d.ts +3 -0
- package/dist/model/novel/layout-values.d.ts +10 -0
- package/dist/model/novel/novel-chart.types.d.ts +140 -0
- package/dist/model/novel/novel-domains.d.ts +5 -0
- package/dist/model/scale/BandScale.d.ts +86 -0
- package/dist/model/scale/ChartScaleRegistry.d.ts +45 -0
- package/dist/model/scale/LinearScale.d.ts +48 -0
- package/dist/model/scale/TimeScale.d.ts +48 -0
- package/dist/model/scale/create-chart-scale.d.ts +3 -0
- package/dist/model/scale/resolve-chart-scale.d.ts +5 -0
- package/dist/model/scatter/create-scatter-series-layout.d.ts +14 -0
- package/dist/model/scatter/hit-test-scatter-layout.d.ts +4 -0
- package/dist/model/time/calendar-time.d.ts +16 -0
- package/dist/model/types/chart-axis.types.d.ts +43 -0
- package/dist/model/types/chart-components.types.d.ts +1393 -0
- package/dist/model/types/chart-scale.types.d.ts +78 -0
- package/dist/model/viewport-controller/viewport-controller.d.ts +5 -0
- package/dist/novel-domains-DBpA_AOT.js +24 -0
- package/dist/partition-D-0LTCr3.js +221 -0
- package/dist/presets/route-map/apartment.d.ts +2 -0
- package/dist/presets/route-map/apartment.js +116 -0
- package/dist/presets/route-map/botanical-park.d.ts +2 -0
- package/dist/presets/route-map/botanical-park.js +116 -0
- package/dist/presets/route-map/science-museum.d.ts +2 -0
- package/dist/presets/route-map/science-museum.js +45 -0
- package/dist/presets/seat-map/airplane.d.ts +2 -0
- package/dist/presets/seat-map/airplane.js +95 -0
- package/dist/presets/seat-map/ferry.d.ts +2 -0
- package/dist/presets/seat-map/ferry.js +54 -0
- package/dist/presets/seat-map/ice-arena.d.ts +2 -0
- package/dist/presets/seat-map/ice-arena.js +67 -0
- package/dist/presets/seat-map/planetarium.d.ts +2 -0
- package/dist/presets/seat-map/planetarium.js +54 -0
- package/dist/presets/seat-map/train.d.ts +2 -0
- package/dist/presets/seat-map/train.js +66 -0
- package/dist/presets.d.ts +78 -0
- package/dist/presets.js +14 -0
- package/dist/public.d.ts +2 -0
- package/dist/radar.d.ts +5 -0
- package/dist/radar.js +47 -0
- package/dist/rose.d.ts +5 -0
- package/dist/rose.js +7 -0
- package/dist/route-map.d.ts +6 -0
- package/dist/route-map.js +200 -0
- package/dist/scatter.d.ts +8 -0
- package/dist/scatter.js +433 -0
- package/dist/scene-CPvPzTaB.js +137 -0
- package/dist/seat-map.d.ts +6 -0
- package/dist/seat-map.js +84 -0
- package/dist/seat-shape--kEFiUXX.js +66 -0
- package/dist/state-C5pICb11.js +134 -0
- package/dist/sync.d.ts +82 -0
- package/dist/sync.js +326 -0
- package/dist/translation-window-Ca_rCenJ.js +57 -0
- package/dist/tree.d.ts +6 -0
- package/dist/tree.js +114 -0
- package/dist/treemap.d.ts +5 -0
- package/dist/treemap.js +85 -0
- package/dist/ui/area-series/AreaSeries.d.ts +44 -0
- package/dist/ui/area-series/area-series.config.d.ts +10 -0
- package/dist/ui/area-series/area-series.registry.d.ts +4 -0
- package/dist/ui/axis/Axis.d.ts +55 -0
- package/dist/ui/axis/axis.config.d.ts +10 -0
- package/dist/ui/axis/axis.registry.d.ts +4 -0
- package/dist/ui/bar-chart/BarChart.d.ts +124 -0
- package/dist/ui/bar-chart/bar-chart.config.d.ts +10 -0
- package/dist/ui/bar-chart/bar-chart.registry.d.ts +2 -0
- package/dist/ui/bar-series/BarSeries.d.ts +102 -0
- package/dist/ui/bar-series/bar-series.config.d.ts +10 -0
- package/dist/ui/bar-series/bar-series.registry.d.ts +4 -0
- package/dist/ui/bubble-series/BubbleSeries.d.ts +33 -0
- package/dist/ui/bubble-series/bubble-series.config.d.ts +10 -0
- package/dist/ui/bubble-series/bubble-series.registry.d.ts +4 -0
- package/dist/ui/composed-chart/ComposedChart.d.ts +41 -0
- package/dist/ui/composed-chart/composed-chart.config.d.ts +10 -0
- package/dist/ui/composed-chart/composed-chart.registry.d.ts +4 -0
- package/dist/ui/exploration-chart/ExplorationChart.d.ts +83 -0
- package/dist/ui/exploration-chart/exploration-chart.config.d.ts +7 -0
- package/dist/ui/exploration-chart/exploration-chart.registry.d.ts +6 -0
- package/dist/ui/grid/Grid.d.ts +35 -0
- package/dist/ui/grid/grid.config.d.ts +10 -0
- package/dist/ui/grid/grid.registry.d.ts +4 -0
- package/dist/ui/interaction/Interaction.d.ts +53 -0
- package/dist/ui/interaction/interaction.config.d.ts +10 -0
- package/dist/ui/interaction/interaction.registry.d.ts +4 -0
- package/dist/ui/legend/Legend.d.ts +38 -0
- package/dist/ui/legend/legend.config.d.ts +10 -0
- package/dist/ui/legend/legend.registry.d.ts +2 -0
- package/dist/ui/line-series/LineSeries.d.ts +67 -0
- package/dist/ui/line-series/line-series.config.d.ts +10 -0
- package/dist/ui/line-series/line-series.registry.d.ts +4 -0
- package/dist/ui/mark-series/MarkSeries.d.ts +55 -0
- package/dist/ui/novel-series/NovelSeries.d.ts +34 -0
- package/dist/ui/novel-series/novel-series.config.d.ts +9 -0
- package/dist/ui/novel-series/novel-series.registry.d.ts +4 -0
- package/dist/ui/partition-chart/PartitionChart.d.ts +24 -0
- package/dist/ui/partition-chart/partition-chart.config.d.ts +7 -0
- package/dist/ui/partition-chart/partition-chart.registry.d.ts +9 -0
- package/dist/ui/plot/Plot.d.ts +64 -0
- package/dist/ui/plot/plot.config.d.ts +10 -0
- package/dist/ui/plot/plot.registry.d.ts +4 -0
- package/dist/ui/root/Root.d.ts +206 -0
- package/dist/ui/root/root.config.d.ts +10 -0
- package/dist/ui/root/root.registry.d.ts +5 -0
- package/dist/ui/scale/Scale.d.ts +55 -0
- package/dist/ui/scale/scale.config.d.ts +10 -0
- package/dist/ui/scale/scale.registry.d.ts +4 -0
- package/dist/ui/scatter-series/ScatterSeries.d.ts +33 -0
- package/dist/ui/scatter-series/scatter-series.config.d.ts +10 -0
- package/dist/ui/scatter-series/scatter-series.registry.d.ts +4 -0
- package/dist/ui/shared/chart-props.d.ts +150 -0
- package/dist/ui/shared/chart-runtime-resolver.d.ts +4 -0
- package/dist/ui/shared/chart-semantic-marks.d.ts +20 -0
- package/dist/ui/shared/chart-series-runtime.d.ts +48 -0
- package/dist/ui/shared/schema-types.d.ts +34 -0
- package/dist/ui/tooltip/Tooltip.d.ts +64 -0
- package/dist/ui/tooltip/tooltip.config.d.ts +10 -0
- package/dist/ui/tooltip/tooltip.registry.d.ts +4 -0
- package/dist/ui/viewport/Viewport.d.ts +81 -0
- package/dist/ui/viewport/viewport.config.d.ts +10 -0
- package/dist/ui/viewport/viewport.registry.d.ts +2 -0
- package/dist/ui/viewport-controller/ViewportController.d.ts +30 -0
- package/dist/ui/viewport-controller/viewport-controller.config.d.ts +10 -0
- package/dist/ui/viewport-controller/viewport-controller.registry.d.ts +2 -0
- package/package.json +179 -4
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ChartDataStore } from '../data/ChartDataStore';
|
|
2
|
+
import { NovaChartFieldAccessor, NovaChartLineLayoutSegment, NovaChartPointContext, NovaChartPointRenderMode, NovaChartPointSeriesResolvedVirtualizationOptions, NovaChartSeriesKind, NovaChartSeriesMetadata } from '../types/chart-components.types';
|
|
3
|
+
import { ChartScale, ChartScaleDomain, ChartScaleValue } from '../types/chart-scale.types';
|
|
4
|
+
export declare const DEFAULT_POINT_SERIES_VIRTUALIZATION: NovaChartPointSeriesResolvedVirtualizationOptions;
|
|
5
|
+
export interface NovaChartCartesianPointInput<TData = Record<string, unknown>> {
|
|
6
|
+
dataStore: ChartDataStore<TData>;
|
|
7
|
+
xScale: ChartScale<ChartScaleValue>;
|
|
8
|
+
yScale: ChartScale<ChartScaleValue>;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
xScaleId: string;
|
|
12
|
+
yScaleId: string;
|
|
13
|
+
xField: NovaChartFieldAccessor<TData>;
|
|
14
|
+
yField: NovaChartFieldAccessor<TData, number>;
|
|
15
|
+
seriesField?: NovaChartFieldAccessor<TData>;
|
|
16
|
+
labelField?: NovaChartFieldAccessor<TData>;
|
|
17
|
+
kind: NovaChartSeriesKind;
|
|
18
|
+
fallbackLabel: string;
|
|
19
|
+
palette: Array<string>;
|
|
20
|
+
defaultColor: string;
|
|
21
|
+
colorField?: NovaChartFieldAccessor<TData>;
|
|
22
|
+
virtualization: NovaChartPointSeriesResolvedVirtualizationOptions;
|
|
23
|
+
connectNulls?: boolean;
|
|
24
|
+
defined?: (context: NovaChartPointContext<TData>) => boolean;
|
|
25
|
+
resolveColor?: (context: NovaChartPointContext<TData>, series?: NovaChartSeriesMetadata) => string | undefined;
|
|
26
|
+
}
|
|
27
|
+
export interface NovaChartCartesianPointCandidate<TData = Record<string, unknown>> {
|
|
28
|
+
key: string;
|
|
29
|
+
row?: TData;
|
|
30
|
+
rowIndex: number;
|
|
31
|
+
xValue: ChartScaleValue;
|
|
32
|
+
yValue: number;
|
|
33
|
+
rawValue?: number;
|
|
34
|
+
seriesKey: string;
|
|
35
|
+
seriesLabel: string;
|
|
36
|
+
color: string;
|
|
37
|
+
x: number;
|
|
38
|
+
y: number;
|
|
39
|
+
order: number;
|
|
40
|
+
visible: boolean;
|
|
41
|
+
segmentGroup: number;
|
|
42
|
+
}
|
|
43
|
+
export declare function createCartesianSeriesMetadata<TData>(input: NovaChartCartesianPointInput<TData>, rows?: ReadonlyArray<TData>): Array<NovaChartSeriesMetadata>;
|
|
44
|
+
export declare function resolveCartesianXDomain<TData>(input: NovaChartCartesianPointInput<TData>): ChartScaleDomain;
|
|
45
|
+
export declare function resolveCartesianYDomain<TData>(input: NovaChartCartesianPointInput<TData>): ChartScaleDomain;
|
|
46
|
+
export declare function createCartesianPointCandidates<TData>(input: NovaChartCartesianPointInput<TData>, rows?: ReadonlyArray<TData>): Array<NovaChartCartesianPointCandidate<TData>>;
|
|
47
|
+
export declare function windowCartesianPointCandidates<TData>(input: NovaChartCartesianPointInput<TData>, candidates: Array<NovaChartCartesianPointCandidate<TData>>): {
|
|
48
|
+
visibleCandidates: Array<NovaChartCartesianPointCandidate<TData>>;
|
|
49
|
+
renderedCandidates: Array<NovaChartCartesianPointCandidate<TData>>;
|
|
50
|
+
mode: NovaChartPointRenderMode;
|
|
51
|
+
};
|
|
52
|
+
export declare function createCartesianLineSegments<TData>(points: Array<NovaChartCartesianPointCandidate<TData>>, curve: 'linear' | 'step'): Array<NovaChartLineLayoutSegment>;
|
|
53
|
+
export declare function resolveCartesianXPosition(scale: ChartScale<ChartScaleValue>, xValue: ChartScaleValue): number;
|
|
54
|
+
export declare function extentDomain(values: Array<number>): ChartScaleDomain;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Сохраняет границы каждого непрерывного участка и min/max каждой корзины. */
|
|
2
|
+
export declare function sampleExtrema<T extends {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
seriesKey: string;
|
|
6
|
+
segmentGroup: number;
|
|
7
|
+
}>(points: ReadonlyArray<T>, limit: number, preserveGaps?: boolean): Array<T>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ChartScale } from '../types/chart-scale.types';
|
|
2
|
+
interface WindowInput {
|
|
3
|
+
key: string;
|
|
4
|
+
xScale: ChartScale;
|
|
5
|
+
yScale: ChartScale;
|
|
6
|
+
width: number;
|
|
7
|
+
overscanPx: number;
|
|
8
|
+
extent: readonly [number, number];
|
|
9
|
+
}
|
|
10
|
+
/** Удерживает геометрию только при переносе той же числовой шкалы внутри подготовленного окна. */
|
|
11
|
+
export declare class TranslationWindow {
|
|
12
|
+
private _snapshot;
|
|
13
|
+
clear(): void;
|
|
14
|
+
capture(input: WindowInput): void;
|
|
15
|
+
offset(key: string, xScale: ChartScale, yScale: ChartScale): number | null;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { NovaScope, NovaSemanticRegisterOptions, NovaTemplateChildSchema } from '@nova-lab/core';
|
|
2
|
+
import { NovaChartCustomizationRuntime } from '../customization/chart-customization';
|
|
3
|
+
import { ChartDataStore } from '../data/ChartDataStore';
|
|
4
|
+
import { ChartScaleRegistry } from '../scale/ChartScaleRegistry';
|
|
5
|
+
import { NovaChartBarSeriesDiagnostics, NovaChartDataListener, NovaChartInteractionListener, NovaChartInteractionState, NovaChartInteractiveSeriesRegistration, NovaChartRootApi, NovaChartRootDiagnostics, NovaChartRootResolvedProps, NovaChartScaleDomainContribution, NovaChartScaleResolvedProps, NovaChartSeriesDiagnostics, NovaChartSeriesMetadata } from '../types/chart-components.types';
|
|
6
|
+
import { ChartScale, ChartScaleDomain, ChartScaleRange, ChartScaleValue } from '../types/chart-scale.types';
|
|
7
|
+
export declare const NovaChartRuntimeToken: import('@nova-lab/core').NovaContextToken<NovaChartRuntime<Record<string, unknown>>>;
|
|
8
|
+
export interface NovaChartScaleRegistration<TData = Record<string, unknown>> {
|
|
9
|
+
id: string;
|
|
10
|
+
props: NovaChartScaleResolvedProps<TData>;
|
|
11
|
+
scale: ChartScale;
|
|
12
|
+
}
|
|
13
|
+
export interface NovaChartRuntime<TData = Record<string, unknown>> {
|
|
14
|
+
readonly id: string;
|
|
15
|
+
readonly props: NovaChartRootResolvedProps<TData>;
|
|
16
|
+
readonly dataStore: ChartDataStore<TData>;
|
|
17
|
+
readonly scales: ChartScaleRegistry;
|
|
18
|
+
readonly customization: NovaChartCustomizationRuntime<TData>;
|
|
19
|
+
refScope?: NovaScope;
|
|
20
|
+
registerScale: (registration: NovaChartScaleRegistration<TData>) => void;
|
|
21
|
+
unregisterScale: (id: string) => void;
|
|
22
|
+
refreshScale: (id: string) => void;
|
|
23
|
+
refreshScales: () => void;
|
|
24
|
+
getScale: <TValue extends ChartScaleValue = ChartScaleValue>(id: string) => ChartScale<TValue> | undefined;
|
|
25
|
+
requireScale: <TValue extends ChartScaleValue = ChartScaleValue>(id: string) => ChartScale<TValue>;
|
|
26
|
+
setScaleDomain: (id: string, domain: ChartScaleDomain) => void;
|
|
27
|
+
setScaleRange: (id: string, range: ChartScaleRange) => void;
|
|
28
|
+
getScaleSourceDomain: (id: string) => ChartScaleDomain | undefined;
|
|
29
|
+
setScaleDomainContribution: (contribution: NovaChartScaleDomainContribution) => void;
|
|
30
|
+
removeScaleDomainContribution: (id: string) => void;
|
|
31
|
+
getScaleDomainContributions: (scaleId?: string) => Array<NovaChartScaleDomainContribution>;
|
|
32
|
+
setChildren: (children: Array<NovaTemplateChildSchema>) => void;
|
|
33
|
+
refresh: (event?: string) => void;
|
|
34
|
+
registerInteractiveSeries: (registration: NovaChartInteractiveSeriesRegistration<TData>) => void;
|
|
35
|
+
unregisterInteractiveSeries: (id: string) => void;
|
|
36
|
+
getInteractiveSeries: () => Array<NovaChartInteractiveSeriesRegistration<TData>>;
|
|
37
|
+
getInteractionState: () => NovaChartInteractionState<TData>;
|
|
38
|
+
setInteractionState: (patch: Partial<Omit<NovaChartInteractionState<TData>, 'revision'>>) => void;
|
|
39
|
+
subscribeInteraction: (listener: NovaChartInteractionListener<TData>) => () => void;
|
|
40
|
+
setSeriesDiagnostics: (id: string, diagnostics: NovaChartSeriesDiagnostics | NovaChartBarSeriesDiagnostics) => void;
|
|
41
|
+
removeSeriesDiagnostics: (id: string) => void;
|
|
42
|
+
setSeriesMetadata: (id: string, metadata: Array<NovaChartSeriesMetadata>) => void;
|
|
43
|
+
removeSeriesMetadata: (id: string) => void;
|
|
44
|
+
getSeriesMetadata: () => Array<NovaChartSeriesMetadata>;
|
|
45
|
+
publishSemanticRegions: (sourceId: string, regions: Array<NovaSemanticRegisterOptions>) => void;
|
|
46
|
+
clearSemanticRegions: (sourceId: string) => void;
|
|
47
|
+
getDiagnostics: () => NovaChartRootDiagnostics<TData>;
|
|
48
|
+
subscribe: (listener: NovaChartDataListener<TData>) => () => void;
|
|
49
|
+
getApi: () => NovaChartRootApi<TData>;
|
|
50
|
+
}
|
|
51
|
+
export interface NovaChartRuntimeHost<TData = Record<string, unknown>> {
|
|
52
|
+
getNovaChartRuntime: () => NovaChartRuntime<TData>;
|
|
53
|
+
}
|
|
54
|
+
export declare function isNovaChartRuntimeHost<TData = Record<string, unknown>>(value: unknown): value is NovaChartRuntimeHost<TData>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { NovaSchema, NovaSchemaItem } from '@nova-lab/core';
|
|
2
|
+
import { NovaChartCustomizationProps, NovaChartPlugin, NovaChartPluginRenderContext, NovaChartPreset, NovaChartResolvedMarkStyle, NovaChartRuntimeBridge, NovaChartSemanticTokens, NovaChartStyleContext, NovaChartStyleLayers, NovaChartTooltipContext, NovaChartVisualPresetName, NovaChartVisualState } from '../types/chart-components.types';
|
|
3
|
+
export interface NovaChartCustomizationRuntime<TData = Record<string, unknown>> {
|
|
4
|
+
readonly revision: number;
|
|
5
|
+
readonly tokens: NovaChartSemanticTokens;
|
|
6
|
+
readonly visualPreset: NovaChartPreset<TData>;
|
|
7
|
+
readonly plugins: Array<NovaChartPlugin<TData>>;
|
|
8
|
+
readonly contextualStyles: boolean;
|
|
9
|
+
resolveMarkStyle: (context: NovaChartStyleContext<TData>, layers?: NovaChartStyleLayers<TData>) => NovaChartResolvedMarkStyle;
|
|
10
|
+
renderPluginLayer: (layer: 'underlay' | 'overlay', context: NovaChartPluginRenderContext<TData>) => NovaSchema;
|
|
11
|
+
decorateTooltip: (context: NovaChartTooltipContext<TData>, content: unknown) => unknown;
|
|
12
|
+
decorateLegend: <TSeries>(series: Array<TSeries>) => Array<TSeries>;
|
|
13
|
+
notifyInteraction: (state: Parameters<NonNullable<NovaChartPlugin<TData>['onInteractionState']>>[0]) => void;
|
|
14
|
+
dispose: () => void;
|
|
15
|
+
}
|
|
16
|
+
export declare class NovaChartCustomizationController<TData = Record<string, unknown>> implements NovaChartCustomizationRuntime<TData> {
|
|
17
|
+
private _cleanupPlugins;
|
|
18
|
+
private _styleSheet;
|
|
19
|
+
private _bridge;
|
|
20
|
+
visualPreset: NovaChartPreset<TData>;
|
|
21
|
+
tokens: NovaChartSemanticTokens;
|
|
22
|
+
plugins: Array<NovaChartPlugin<TData>>;
|
|
23
|
+
contextualStyles: boolean;
|
|
24
|
+
revision: number;
|
|
25
|
+
constructor(props: NovaChartCustomizationProps<TData>, bridge: NovaChartRuntimeBridge<TData>);
|
|
26
|
+
configure(props: NovaChartCustomizationProps<TData>, bridge: NovaChartRuntimeBridge<TData>): void;
|
|
27
|
+
resolveMarkStyle(context: NovaChartStyleContext<TData>, layers?: NovaChartStyleLayers<TData>): NovaChartResolvedMarkStyle;
|
|
28
|
+
renderPluginLayer(layer: 'underlay' | 'overlay', context: NovaChartPluginRenderContext<TData>): NovaSchema;
|
|
29
|
+
decorateTooltip(context: NovaChartTooltipContext<TData>, content: unknown): unknown;
|
|
30
|
+
decorateLegend<TSeries>(series: Array<TSeries>): Array<TSeries>;
|
|
31
|
+
notifyInteraction(state: Parameters<NonNullable<NovaChartPlugin<TData>['onInteractionState']>>[0]): void;
|
|
32
|
+
dispose(): void;
|
|
33
|
+
private _resolvePresetPartStyle;
|
|
34
|
+
}
|
|
35
|
+
export declare function defineNovaChartPlugin<TData = Record<string, unknown>>(plugin: NovaChartPlugin<TData>): NovaChartPlugin<TData>;
|
|
36
|
+
export declare function resolveVisualState(componentId: string, key: string | undefined, context: {
|
|
37
|
+
hovered?: {
|
|
38
|
+
seriesId?: string;
|
|
39
|
+
key?: string;
|
|
40
|
+
} | null;
|
|
41
|
+
attrs?: Record<string, unknown>;
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
}): NovaChartVisualState;
|
|
44
|
+
export declare function appendSchema(target: NovaSchema, input: NovaSchemaItem | NovaSchema | null | undefined): void;
|
|
45
|
+
export declare function renderWithSlot(target: NovaSchema, renderer: ((context: any) => NovaSchemaItem | NovaSchema | null | undefined) | undefined, context: Record<string, unknown>, fallback: NovaSchemaItem): void;
|
|
46
|
+
export declare function createRuntimeBridge<TData>(id: string, runtime: NovaChartRuntimeBridge<TData>): NovaChartRuntimeBridge<TData>;
|
|
47
|
+
export declare function normalizePresetName(name?: NovaChartVisualPresetName): NovaChartVisualPresetName;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { NovaChartPreset, NovaChartVisualPresetName } from '../types/chart-components.types';
|
|
2
|
+
export declare const NOVA_CHART_DEFAULT_PALETTE: readonly ["#2563eb", "#16a34a", "#f59e0b", "#dc2626", "#7c3aed", "#0891b2", "#db2777", "#475569"];
|
|
3
|
+
export declare function createNovaChartPreset<TData = Record<string, unknown>>(preset: NovaChartPreset<TData>): NovaChartPreset<TData>;
|
|
4
|
+
export declare function registerNovaChartPreset<TData = Record<string, unknown>>(preset: NovaChartPreset<TData>): void;
|
|
5
|
+
export declare function resolveNovaChartPreset<TData = Record<string, unknown>>(name?: NovaChartVisualPresetName): NovaChartPreset<TData>;
|
|
6
|
+
export declare function listNovaChartPresets(): Array<NovaChartPreset>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NovaChartMarkStyle, NovaChartResolvedMarkStyle, NovaChartStyleContext } from '../types/chart-components.types';
|
|
2
|
+
export declare class NovaChartStyleSheet {
|
|
3
|
+
private readonly _rules;
|
|
4
|
+
private readonly _cache;
|
|
5
|
+
constructor(source?: string);
|
|
6
|
+
resolve<TData>(context: NovaChartStyleContext<TData>): NovaChartResolvedMarkStyle;
|
|
7
|
+
}
|
|
8
|
+
export declare function parseNovaChartStyleSheet(source?: string): NovaChartStyleSheet;
|
|
9
|
+
export declare function styleSheetToPartStyles(source?: string): Record<string, NovaChartMarkStyle>;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { NovaChartFieldAccessor, NovaChartRowKey } from '../types/chart-components.types';
|
|
2
|
+
/**
|
|
3
|
+
* Индексирует данные chart runtime и держит быстрые производные структуры.
|
|
4
|
+
*/
|
|
5
|
+
export declare class ChartDataStore<TData = Record<string, unknown>> {
|
|
6
|
+
private _rows;
|
|
7
|
+
private _keyField?;
|
|
8
|
+
private _keyIndex;
|
|
9
|
+
private _rowKeys;
|
|
10
|
+
private _validator?;
|
|
11
|
+
private readonly _fieldCache;
|
|
12
|
+
private _revision;
|
|
13
|
+
private _filters;
|
|
14
|
+
private readonly _filterOwners;
|
|
15
|
+
private _filteredRows;
|
|
16
|
+
/**
|
|
17
|
+
* Создает экземпляр ChartDataStore и подготавливает базовое состояние.
|
|
18
|
+
*/
|
|
19
|
+
constructor(options?: {
|
|
20
|
+
data?: Array<TData>;
|
|
21
|
+
keyField?: NovaChartFieldAccessor<TData, NovaChartRowKey>;
|
|
22
|
+
});
|
|
23
|
+
/**
|
|
24
|
+
* Возвращает revision для ChartDataStore.
|
|
25
|
+
*/
|
|
26
|
+
get revision(): number;
|
|
27
|
+
/**
|
|
28
|
+
* Возвращает row Count для ChartDataStore.
|
|
29
|
+
*/
|
|
30
|
+
get rowCount(): number;
|
|
31
|
+
/**
|
|
32
|
+
* Возвращает значение состояния ChartDataStore.
|
|
33
|
+
*/
|
|
34
|
+
getData(): ReadonlyArray<TData>;
|
|
35
|
+
/** Фильтры меняют производное представление, сохраняя исходные записи и ключи. */
|
|
36
|
+
setFilters(filters: ReadonlyArray<(row: TData) => boolean>, owner?: string): void;
|
|
37
|
+
getSourceData(): ReadonlyArray<TData>;
|
|
38
|
+
/** Семейные ограничения проверяются до фиксации любой row-операции. */
|
|
39
|
+
setValidator(validate: (rows: ReadonlyArray<TData>) => void): void;
|
|
40
|
+
/** Возвращает исходную запись за постоянное время по стабильному ключу. */
|
|
41
|
+
getRow(key: NovaChartRowKey): TData | undefined;
|
|
42
|
+
/** Добавляет полные записи; проверка ключей происходит до изменения данных. */
|
|
43
|
+
appendRows(rows: ReadonlyArray<TData>, maxRows?: number): void;
|
|
44
|
+
/** Изменяет только существующие записи и запрещает смену их идентичности. */
|
|
45
|
+
patchRows(patches: ReadonlyArray<{
|
|
46
|
+
key: NovaChartRowKey;
|
|
47
|
+
changes: Partial<TData>;
|
|
48
|
+
}>): void;
|
|
49
|
+
/** Заменяет существующие записи полными и добавляет отсутствующие. */
|
|
50
|
+
upsertRows(rows: ReadonlyArray<TData>): void;
|
|
51
|
+
/**
|
|
52
|
+
* Обновляет значение состояния ChartDataStore.
|
|
53
|
+
*/
|
|
54
|
+
setData(data: ReadonlyArray<TData>, keyField?: NovaChartFieldAccessor<TData, NovaChartRowKey> | undefined): void;
|
|
55
|
+
/**
|
|
56
|
+
* Обновляет runtime-состояние ChartDataStore.
|
|
57
|
+
*/
|
|
58
|
+
updateRows(rows: Array<Partial<TData> & Record<string, unknown>>): void;
|
|
59
|
+
/**
|
|
60
|
+
* Удаляет сущность из runtime-коллекции ChartDataStore.
|
|
61
|
+
*/
|
|
62
|
+
removeRows(keys: Array<NovaChartRowKey>): void;
|
|
63
|
+
/**
|
|
64
|
+
* Возвращает значение состояния ChartDataStore.
|
|
65
|
+
*/
|
|
66
|
+
getRowKey(row: TData, index: number): NovaChartRowKey;
|
|
67
|
+
/**
|
|
68
|
+
* Выполняет действие readField в рамках ответственности ChartDataStore.
|
|
69
|
+
*/
|
|
70
|
+
readField<TValue = unknown>(row: TData, index: number, field: NovaChartFieldAccessor<TData, TValue>): TValue;
|
|
71
|
+
/**
|
|
72
|
+
* Выполняет действие numericExtent в рамках ответственности ChartDataStore.
|
|
73
|
+
*/
|
|
74
|
+
numericExtent(field: NovaChartFieldAccessor<TData>): readonly [number, number];
|
|
75
|
+
/** Типизированная колонка принадлежит store; viewport читает её без новых row objects. */
|
|
76
|
+
numericColumn(field: NovaChartFieldAccessor<TData>): {
|
|
77
|
+
values: Float64Array;
|
|
78
|
+
ordered: boolean;
|
|
79
|
+
invalidCount: number;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Выполняет действие categoryDomain в рамках ответственности ChartDataStore.
|
|
83
|
+
*/
|
|
84
|
+
categoryDomain(field: NovaChartFieldAccessor<TData>): ReadonlyArray<string>;
|
|
85
|
+
/**
|
|
86
|
+
* Выполняет действие categoryIndices в рамках ответственности ChartDataStore.
|
|
87
|
+
*/
|
|
88
|
+
categoryIndices(field: NovaChartFieldAccessor<TData>): Map<string, Array<number>>;
|
|
89
|
+
/**
|
|
90
|
+
* Выполняет действие visibleRowsByCategoryRange в рамках ответственности ChartDataStore.
|
|
91
|
+
*/
|
|
92
|
+
visibleRowsByCategoryRange(field: NovaChartFieldAccessor<TData>, domain: ReadonlyArray<string>, startIndex: number, endIndex: number): Array<number>;
|
|
93
|
+
/**
|
|
94
|
+
* Выполняет внутренний шаг readPatchKey для ChartDataStore.
|
|
95
|
+
*/
|
|
96
|
+
private _readPatchKey;
|
|
97
|
+
/**
|
|
98
|
+
* Выполняет внутренний шаг rebuildKeyIndex для ChartDataStore.
|
|
99
|
+
*/
|
|
100
|
+
private _rebuildKeyIndex;
|
|
101
|
+
private _createKeyIndex;
|
|
102
|
+
/**
|
|
103
|
+
* Помечает runtime-состояние как требующее обновления ChartDataStore.
|
|
104
|
+
*/
|
|
105
|
+
private _invalidate;
|
|
106
|
+
/**
|
|
107
|
+
* Возвращает значение состояния ChartDataStore.
|
|
108
|
+
*/
|
|
109
|
+
private _getFieldCache;
|
|
110
|
+
/** Проверяет все ключи, не меняя текущий индекс при невалидных данных. */
|
|
111
|
+
private _validateRows;
|
|
112
|
+
private _requiredKey;
|
|
113
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NovaChartGraphLink, NovaChartGraphNode } from './exploration-chart.types';
|
|
2
|
+
export interface NovaChartGraphPosition {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
category: string;
|
|
6
|
+
size: number;
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
}
|
|
10
|
+
/** Deterministic force layout for a bounded dependency graph. */
|
|
11
|
+
export declare function createGraphLayout(nodes: ReadonlyArray<NovaChartGraphNode>, links: ReadonlyArray<NovaChartGraphLink>, width: number, height: number): Array<NovaChartGraphPosition>;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { NovaUiCommonProps, NovaUiCommonResolvedProps } from '@nova-lab/ui-kit';
|
|
2
|
+
export type NovaChartExplorationKind = 'graph' | 'aggregation' | 'route-map' | 'seat-map';
|
|
3
|
+
export interface NovaChartGraphNode {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
category: string;
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface NovaChartGraphLink {
|
|
10
|
+
source: string;
|
|
11
|
+
target: string;
|
|
12
|
+
}
|
|
13
|
+
export interface NovaChartAggregationPoint {
|
|
14
|
+
id: string;
|
|
15
|
+
group: string;
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
}
|
|
19
|
+
export interface NovaChartRoutePoint {
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
}
|
|
23
|
+
export interface NovaChartRoutePath {
|
|
24
|
+
id: string;
|
|
25
|
+
points: Array<NovaChartRoutePoint>;
|
|
26
|
+
color: string;
|
|
27
|
+
width?: number;
|
|
28
|
+
opacity?: number;
|
|
29
|
+
}
|
|
30
|
+
export interface NovaChartRouteWalker {
|
|
31
|
+
id: string;
|
|
32
|
+
label?: string;
|
|
33
|
+
routeId: string;
|
|
34
|
+
color: string;
|
|
35
|
+
size?: number;
|
|
36
|
+
speed?: number;
|
|
37
|
+
startProgress?: number;
|
|
38
|
+
startDirection?: 'forward' | 'backward';
|
|
39
|
+
}
|
|
40
|
+
export interface NovaChartRouteMapPreset {
|
|
41
|
+
background: NovaChartMapBackground;
|
|
42
|
+
viewBox: {
|
|
43
|
+
width: number;
|
|
44
|
+
height: number;
|
|
45
|
+
};
|
|
46
|
+
regions?: Array<NovaChartRouteRegion>;
|
|
47
|
+
routes: Array<NovaChartRoutePath>;
|
|
48
|
+
walkers: Array<NovaChartRouteWalker>;
|
|
49
|
+
}
|
|
50
|
+
export interface NovaChartRouteRegion {
|
|
51
|
+
id: string;
|
|
52
|
+
label: string;
|
|
53
|
+
x: number;
|
|
54
|
+
y: number;
|
|
55
|
+
width: number;
|
|
56
|
+
height: number;
|
|
57
|
+
points?: Array<NovaChartRoutePoint>;
|
|
58
|
+
}
|
|
59
|
+
export type NovaChartSeatShape = {
|
|
60
|
+
type: 'rect';
|
|
61
|
+
x: number;
|
|
62
|
+
y: number;
|
|
63
|
+
width: number;
|
|
64
|
+
height: number;
|
|
65
|
+
} | {
|
|
66
|
+
type: 'polygon';
|
|
67
|
+
points: Array<{
|
|
68
|
+
x: number;
|
|
69
|
+
y: number;
|
|
70
|
+
}>;
|
|
71
|
+
} | {
|
|
72
|
+
type: 'path';
|
|
73
|
+
d: string;
|
|
74
|
+
};
|
|
75
|
+
export type NovaChartMapBackground = {
|
|
76
|
+
type: 'svg';
|
|
77
|
+
content: string;
|
|
78
|
+
} | {
|
|
79
|
+
type: 'image';
|
|
80
|
+
src: string;
|
|
81
|
+
};
|
|
82
|
+
export type NovaChartSeatBackground = NovaChartMapBackground;
|
|
83
|
+
export interface NovaChartSeatColors {
|
|
84
|
+
available: string;
|
|
85
|
+
premium: string;
|
|
86
|
+
occupied: string;
|
|
87
|
+
hover: string;
|
|
88
|
+
selected: string;
|
|
89
|
+
}
|
|
90
|
+
export interface NovaChartSeat {
|
|
91
|
+
id: string;
|
|
92
|
+
row?: number;
|
|
93
|
+
column?: string;
|
|
94
|
+
label?: string;
|
|
95
|
+
status: 'available' | 'occupied' | 'premium';
|
|
96
|
+
shape?: NovaChartSeatShape;
|
|
97
|
+
colors?: Partial<NovaChartSeatColors>;
|
|
98
|
+
x?: number;
|
|
99
|
+
y?: number;
|
|
100
|
+
width?: number;
|
|
101
|
+
height?: number;
|
|
102
|
+
}
|
|
103
|
+
export interface NovaChartSeatMapPreset {
|
|
104
|
+
background: NovaChartSeatBackground;
|
|
105
|
+
viewBox: {
|
|
106
|
+
width: number;
|
|
107
|
+
height: number;
|
|
108
|
+
};
|
|
109
|
+
seats: Array<NovaChartSeat>;
|
|
110
|
+
colors: Partial<NovaChartSeatColors>;
|
|
111
|
+
}
|
|
112
|
+
export interface NovaChartExplorationProps extends NovaUiCommonProps {
|
|
113
|
+
kind?: NovaChartExplorationKind;
|
|
114
|
+
title?: string;
|
|
115
|
+
palette?: Array<string>;
|
|
116
|
+
links?: Array<NovaChartGraphLink>;
|
|
117
|
+
svg?: string;
|
|
118
|
+
mapBackground?: NovaChartMapBackground;
|
|
119
|
+
seatColors?: Partial<NovaChartSeatColors>;
|
|
120
|
+
viewBox?: {
|
|
121
|
+
width: number;
|
|
122
|
+
height: number;
|
|
123
|
+
};
|
|
124
|
+
route?: Array<NovaChartRoutePoint>;
|
|
125
|
+
routes?: Array<NovaChartRoutePath>;
|
|
126
|
+
walkers?: Array<NovaChartRouteWalker>;
|
|
127
|
+
onSeatSelectionChange?: (seatIds: Array<string>) => void;
|
|
128
|
+
}
|
|
129
|
+
export interface NovaChartExplorationResolvedProps extends NovaUiCommonResolvedProps {
|
|
130
|
+
kind: NovaChartExplorationKind;
|
|
131
|
+
title: string;
|
|
132
|
+
palette: Array<string>;
|
|
133
|
+
links: Array<NovaChartGraphLink>;
|
|
134
|
+
svg?: string;
|
|
135
|
+
mapBackground?: NovaChartMapBackground;
|
|
136
|
+
seatColors: Partial<NovaChartSeatColors>;
|
|
137
|
+
viewBox: {
|
|
138
|
+
width: number;
|
|
139
|
+
height: number;
|
|
140
|
+
};
|
|
141
|
+
route: Array<NovaChartRoutePoint>;
|
|
142
|
+
routes: Array<NovaChartRoutePath>;
|
|
143
|
+
walkers: Array<NovaChartRouteWalker>;
|
|
144
|
+
onSeatSelectionChange?: (seatIds: Array<string>) => void;
|
|
145
|
+
}
|
|
146
|
+
export interface NovaChartExplorationApi {
|
|
147
|
+
resetView: () => void;
|
|
148
|
+
getSelectedSeats: () => Array<string>;
|
|
149
|
+
refresh: () => void;
|
|
150
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChartKey, GraphLink, Point } from '../../api/types';
|
|
2
|
+
/** Chunked spatial force layout; cancellation проверяется между итерациями и перед commit. */
|
|
3
|
+
export declare function forceLayout(initial: ReadonlyArray<Point & {
|
|
4
|
+
key: ChartKey;
|
|
5
|
+
}>, links: ReadonlyArray<GraphLink>, pinned: ReadonlySet<ChartKey>, width: number, height: number, iterations: number, signal: AbortSignal): Promise<{
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
key: ChartKey;
|
|
9
|
+
}[] | null>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Point } from '../../api/types';
|
|
2
|
+
/** Arc-length индекс сохраняет стабильную скорость и выполняет seek за O(log n). */
|
|
3
|
+
export declare class RouteGeometry {
|
|
4
|
+
readonly points: ReadonlyArray<Point>;
|
|
5
|
+
readonly lengths: Float64Array;
|
|
6
|
+
readonly length: number;
|
|
7
|
+
constructor(points: ReadonlyArray<Point>);
|
|
8
|
+
at(distance: number): Point;
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SeatShape } from '../../api/types';
|
|
2
|
+
export interface SeatPoint {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function seatShapePoints(shape: SeatShape): Array<SeatPoint> | null;
|
|
7
|
+
export declare function pointInPolygon(point: SeatPoint, polygon: ReadonlyArray<SeatPoint>): boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface IndexedBounds {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
}
|
|
7
|
+
/** Индексирует только отображаемую геометрию; большие фигуры не размножаются по сетке. */
|
|
8
|
+
export declare class GeometryIndex<T> {
|
|
9
|
+
private readonly _cellSize;
|
|
10
|
+
private readonly _cells;
|
|
11
|
+
private readonly _large?;
|
|
12
|
+
constructor(items: ReadonlyArray<T>, bounds: (item: T) => IndexedBounds, _cellSize?: number);
|
|
13
|
+
query(x: number, y: number, radius?: number): Array<T>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ChartDataStore } from '../data/ChartDataStore';
|
|
2
|
+
import { NovaChartLineLayoutPlan, NovaChartLineSeriesResolvedProps, NovaChartLineVirtualizationOptions } from '../types/chart-components.types';
|
|
3
|
+
import { ChartScale, ChartScaleDomain, ChartScaleValue } from '../types/chart-scale.types';
|
|
4
|
+
export declare const DEFAULT_LINE_VIRTUALIZATION: Required<NovaChartLineVirtualizationOptions>;
|
|
5
|
+
export interface NovaChartLineLayoutInput<TData = Record<string, unknown>> {
|
|
6
|
+
props: NovaChartLineSeriesResolvedProps<TData>;
|
|
7
|
+
dataStore: ChartDataStore<TData>;
|
|
8
|
+
xScale: ChartScale<ChartScaleValue>;
|
|
9
|
+
yScale: ChartScale<ChartScaleValue>;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function createLineSeriesLayout<TData>(input: NovaChartLineLayoutInput<TData>): NovaChartLineLayoutPlan<TData>;
|
|
14
|
+
export declare function resolveLineXDomain<TData>(input: NovaChartLineLayoutInput<TData>): ChartScaleDomain;
|
|
15
|
+
export declare function resolveLineYDomain<TData>(input: NovaChartLineLayoutInput<TData>): ChartScaleDomain;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { NovaChartHitTestInput, NovaChartHitTestResult, NovaChartLineLayoutPlan } from '../types/chart-components.types';
|
|
2
|
+
export declare function hitTestLineLayoutPlan<TData>(seriesId: string, plan: NovaChartLineLayoutPlan<TData>, input: NovaChartHitTestInput): NovaChartHitTestResult<TData> | null;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { LayoutInput } from './layout-input';
|
|
2
|
+
import { NovaChartNovelLayoutPlan } from './novel-chart.types';
|
|
3
|
+
export type { LayoutInput } from './layout-input';
|
|
4
|
+
export { resolveNovelDomains } from './novel-domains';
|
|
5
|
+
export declare function createNovelLayout<TData>(input: LayoutInput<TData>): NovaChartNovelLayoutPlan<TData>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { NovaChartNovelLayoutPlan } from './novel-chart.types';
|
|
2
|
+
import { NovaChartHitTestInput, NovaChartHitTestResult } from '../types/chart-components.types';
|
|
3
|
+
export declare function hitTestNovelLayout<TData>(seriesId: string, plan: NovaChartNovelLayoutPlan<TData>, input: NovaChartHitTestInput): NovaChartHitTestResult<TData> | null;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { NovaChartNovelSeriesResolvedProps } from './novel-chart.types';
|
|
2
|
+
import { ChartDataStore } from '../data/ChartDataStore';
|
|
3
|
+
import { ChartScale } from '../types/chart-scale.types';
|
|
4
|
+
export interface LayoutInput<TData> {
|
|
5
|
+
props: NovaChartNovelSeriesResolvedProps<TData>;
|
|
6
|
+
dataStore: ChartDataStore<TData>;
|
|
7
|
+
xScale?: ChartScale;
|
|
8
|
+
yScale?: ChartScale;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
collapsedOverrides?: ReadonlyMap<string, boolean>;
|
|
12
|
+
}
|