chartgpu-angular 18.0.0 → 20.0.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.
@@ -1,103 +0,0 @@
1
- import { DestroyRef, ElementRef, OnDestroy } from '@angular/core';
2
- import { type ChartGPUInstance, type OHLCDataPoint } from 'chartgpu';
3
- import type { ChartgpuAppendDataOptions, ChartgpuCartesianSeriesData, ChartgpuChartHandle, ChartgpuClickEvent, ChartgpuDataAppendEvent, ChartgpuOptions, ChartgpuReadyEvent, ChartgpuResizeEvent, ChartgpuStyle, ChartgpuZoomChangeEvent, ChartgpuZoomRangeChangeEvent } from './chartgpu-angular.types';
4
- import * as i0 from "@angular/core";
5
- export declare class ChartGpuAngularComponent implements ChartgpuChartHandle, OnDestroy {
6
- private readonly destroyRef;
7
- readonly options: import("@angular/core").InputSignal<import("chartgpu").ChartGPUOptions>;
8
- readonly gpuContext: import("@angular/core").InputSignal<Readonly<{
9
- readonly device: GPUDevice;
10
- readonly adapter: GPUAdapter;
11
- readonly pipelineCache?: import("chartgpu").PipelineCache;
12
- }>>;
13
- readonly theme: import("@angular/core").InputSignal<import("chartgpu").ThemeConfig | "light" | "dark">;
14
- readonly className: import("@angular/core").InputSignal<string>;
15
- readonly style: import("@angular/core").InputSignal<ChartgpuStyle>;
16
- readonly ready: import("@angular/core").OutputEmitterRef<ChartgpuReadyEvent>;
17
- readonly chartReady: import("@angular/core").OutputEmitterRef<ChartGPUInstance>;
18
- readonly chartDispose: import("@angular/core").OutputEmitterRef<void>;
19
- readonly resize: import("@angular/core").OutputEmitterRef<ChartgpuResizeEvent>;
20
- readonly click: import("@angular/core").OutputEmitterRef<ChartgpuClickEvent>;
21
- readonly chartClick: import("@angular/core").OutputEmitterRef<Readonly<{
22
- readonly seriesIndex: number;
23
- readonly dataIndex: number;
24
- readonly value: readonly [number, number];
25
- readonly seriesName: string;
26
- readonly event: PointerEvent;
27
- }>>;
28
- readonly mouseOver: import("@angular/core").OutputEmitterRef<Readonly<{
29
- readonly seriesIndex: number;
30
- readonly dataIndex: number;
31
- readonly value: readonly [number, number];
32
- readonly seriesName: string;
33
- readonly event: PointerEvent;
34
- }>>;
35
- readonly mouseOut: import("@angular/core").OutputEmitterRef<Readonly<{
36
- readonly seriesIndex: number;
37
- readonly dataIndex: number;
38
- readonly value: readonly [number, number];
39
- readonly seriesName: string;
40
- readonly event: PointerEvent;
41
- }>>;
42
- readonly crosshairMove: import("@angular/core").OutputEmitterRef<Readonly<{
43
- readonly x: number;
44
- readonly source?: unknown;
45
- }>>;
46
- readonly dataAppend: import("@angular/core").OutputEmitterRef<ChartgpuDataAppendEvent>;
47
- readonly zoomChange: import("@angular/core").OutputEmitterRef<ChartgpuZoomChangeEvent>;
48
- readonly zoomRangeChange: import("@angular/core").OutputEmitterRef<ChartgpuZoomRangeChangeEvent>;
49
- readonly deviceLost: import("@angular/core").OutputEmitterRef<Readonly<{
50
- readonly reason: GPUDeviceLostReason;
51
- readonly message: string;
52
- }>>;
53
- readonly chartError: import("@angular/core").OutputEmitterRef<Error>;
54
- readonly host: import("@angular/core").Signal<ElementRef<HTMLDivElement>>;
55
- readonly canvasHost: import("@angular/core").Signal<ElementRef<HTMLDivElement>>;
56
- private readonly chartInstance;
57
- readonly initializationError: import("@angular/core").WritableSignal<Error>;
58
- private chartContainer?;
59
- private createdWithOptions?;
60
- private resizeTimeout?;
61
- private resizeObserver?;
62
- private removeChartListeners?;
63
- private destroying;
64
- constructor(destroyRef: DestroyRef);
65
- protected emitClick(event: MouseEvent): void;
66
- ngOnDestroy(): void;
67
- getChart(): ChartGPUInstance | null;
68
- getContainer(): HTMLDivElement | null;
69
- appendData(seriesIndex: number, newPoints: ChartgpuCartesianSeriesData | OHLCDataPoint[], options?: ChartgpuAppendDataOptions): void;
70
- renderFrame(): boolean;
71
- needsRender(): boolean;
72
- getRenderMode(): 'auto' | 'external';
73
- setRenderMode(mode: 'auto' | 'external'): void;
74
- setOption(options: ChartgpuOptions): void;
75
- setZoomRange(start: number, end: number, source?: unknown): void;
76
- setInteractionX(x: number | null, source?: unknown): void;
77
- getInteractionX(): number | null;
78
- hitTest(event: PointerEvent | MouseEvent): Readonly<{
79
- readonly isInGrid: boolean;
80
- readonly canvasX: number;
81
- readonly canvasY: number;
82
- readonly gridX: number;
83
- readonly gridY: number;
84
- readonly match: Readonly<{
85
- readonly kind: "pie" | "candlestick" | "ohlc" | "errorBar" | "impulse" | "pointCloud3d" | "surface3d" | "cartesian";
86
- readonly seriesIndex: number;
87
- readonly dataIndex: number;
88
- readonly value: readonly [number, number] | readonly [number, number, number];
89
- readonly valueChannel?: number;
90
- readonly i?: number;
91
- readonly j?: number;
92
- readonly height?: number;
93
- }>;
94
- }>;
95
- private getEffectiveOptions;
96
- private listenToChart;
97
- private emitZoomRange;
98
- private observeResize;
99
- private reportError;
100
- private disposeChart;
101
- static ɵfac: i0.ɵɵFactoryDeclaration<ChartGpuAngularComponent, never>;
102
- static ɵcmp: i0.ɵɵComponentDeclaration<ChartGpuAngularComponent, "lib-chartgpu-angular", never, { "options": { "alias": "options"; "required": true; "isSignal": true; }; "gpuContext": { "alias": "gpuContext"; "required": false; "isSignal": true; }; "theme": { "alias": "theme"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; "style": { "alias": "style"; "required": false; "isSignal": true; }; }, { "ready": "ready"; "chartReady": "chartReady"; "chartDispose": "chartDispose"; "resize": "resize"; "click": "click"; "chartClick": "chartClick"; "mouseOver": "mouseOver"; "mouseOut": "mouseOut"; "crosshairMove": "crosshairMove"; "dataAppend": "dataAppend"; "zoomChange": "zoomChange"; "zoomRangeChange": "zoomRangeChange"; "deviceLost": "deviceLost"; "chartError": "chartError"; }, never, never, true, never>;
103
- }
@@ -1,89 +0,0 @@
1
- import type { ChartGPUOptions } from 'chartgpu';
2
- import type { AnimationConfig, AnnotationConfig, AxisConfig, ChartGPUCreateContext, ChartGPUCrosshairMovePayload, ChartGPUEventPayload, ChartGPUHitTestResult, ChartGPUInstance, ChartGPUDeviceLostPayload, ChartSyncOptions, DataZoomConfig, DataPoint, OHLCDataPoint, PipelineCache, RenderMode, SeriesConfig, SeriesType, ThemeConfig, TooltipConfig } from 'chartgpu';
3
- export type ChartgpuOptions = ChartGPUOptions;
4
- export type ChartgpuSeriesType = SeriesType;
5
- export type ChartgpuSeriesData = Extract<SeriesConfig, {
6
- type: 'line';
7
- }>['data'];
8
- export type ChartgpuSeriesOptions = SeriesConfig;
9
- export type ChartgpuAxisOptions = AxisConfig;
10
- export type ChartgpuZoomOptions = DataZoomConfig;
11
- export type ChartgpuTooltipOptions = TooltipConfig;
12
- export type ChartgpuAnimationOptions = AnimationConfig | boolean;
13
- export type ChartgpuThemeOptions = ThemeConfig | 'light' | 'dark';
14
- export type ChartgpuAnnotationOptions = AnnotationConfig;
15
- export type ChartgpuThreeDOptions = Pick<ChartGPUOptions, 'coordinateSystem' | 'camera' | 'interaction3d' | 'axes3d'>;
16
- export type ChartgpuStreamingOptions = Pick<ChartGPUOptions, 'autoScroll'>;
17
- export type ChartgpuInteractionOptions = Pick<ChartGPUOptions, 'dataZoom' | 'tooltip'>;
18
- export type ChartgpuChartInstance = ChartGPUInstance;
19
- export type ChartgpuGPUContext = ChartGPUCreateContext;
20
- export type ChartgpuStyle = Record<string, string | number | null | undefined>;
21
- export type ChartgpuZoomRange = NonNullable<ReturnType<ChartGPUInstance['getZoomRange']>>;
22
- export type ChartgpuClickParams = ChartGPUEventPayload;
23
- export type ChartgpuMouseOverParams = ChartGPUEventPayload;
24
- export type ChartgpuCrosshairMoveParams = ChartGPUCrosshairMovePayload;
25
- export type ChartgpuHitTestResult = ChartGPUHitTestResult;
26
- export type ChartgpuRenderMode = RenderMode;
27
- export type ChartgpuSyncOptions = ChartSyncOptions;
28
- export type ChartgpuXYArraysData = Readonly<{
29
- x: ArrayLike<number>;
30
- y: ArrayLike<number>;
31
- size?: ArrayLike<number>;
32
- }>;
33
- export type ChartgpuInterleavedXYData = ArrayBufferView;
34
- export type ChartgpuCartesianSeriesData = ReadonlyArray<DataPoint | null> | ChartgpuXYArraysData | ChartgpuInterleavedXYData;
35
- export type ChartgpuAppendDataOptions = Readonly<{
36
- maxPoints?: number;
37
- }>;
38
- export interface ChartgpuDataAppendEvent {
39
- seriesIndex: number;
40
- count: number;
41
- xExtent: {
42
- min: number;
43
- max: number;
44
- };
45
- }
46
- export interface ChartgpuReadyEvent {
47
- container: HTMLDivElement;
48
- }
49
- export interface ChartgpuResizeEvent {
50
- width: number;
51
- height: number;
52
- container: HTMLDivElement;
53
- }
54
- export interface ChartgpuClickEvent {
55
- x: number;
56
- y: number;
57
- }
58
- export interface ChartgpuZoomChangeEvent {
59
- range: {
60
- start: number;
61
- end: number;
62
- };
63
- }
64
- export interface ChartgpuZoomRangeChangeEvent {
65
- start: number;
66
- end: number;
67
- }
68
- export interface ChartgpuGPUContextState {
69
- adapter: ChartGPUCreateContext['adapter'] | null;
70
- device: ChartGPUCreateContext['device'] | null;
71
- pipelineCache: PipelineCache | null;
72
- error: Error | null;
73
- isReady: boolean;
74
- }
75
- export interface ChartgpuChartHandle {
76
- getChart(): ChartGPUInstance | null;
77
- getContainer(): HTMLDivElement | null;
78
- appendData(seriesIndex: number, newPoints: ChartgpuCartesianSeriesData | OHLCDataPoint[], options?: ChartgpuAppendDataOptions): void;
79
- renderFrame(): boolean;
80
- needsRender(): boolean;
81
- getRenderMode(): RenderMode;
82
- setRenderMode(mode: RenderMode): void;
83
- setOption(options: ChartgpuOptions): void;
84
- setZoomRange(start: number, end: number, source?: unknown): void;
85
- setInteractionX(x: number | null, source?: unknown): void;
86
- getInteractionX(): number | null;
87
- hitTest(event: PointerEvent | MouseEvent): ChartGPUHitTestResult | null;
88
- }
89
- export type { ChartGPUCreateContext, ChartGPUCrosshairMovePayload, ChartGPUDeviceLostPayload, ChartGPUEventPayload, ChartGPUHitTestResult, ChartGPUInstance, ChartSyncOptions, DataPoint, OHLCDataPoint, PipelineCache, RenderMode, };
@@ -1,16 +0,0 @@
1
- import type { ChartGPUInstance } from 'chartgpu';
2
- import * as i0 from "@angular/core";
3
- export declare class ChartgpuConnectChartsDirective {
4
- readonly charts: import("@angular/core").InputSignal<readonly ChartGPUInstance[]>;
5
- readonly syncOptions: import("@angular/core").InputSignal<Readonly<{
6
- readonly syncCrosshair?: boolean;
7
- readonly syncZoom?: boolean;
8
- }>>;
9
- readonly connectionError: import("@angular/core").OutputEmitterRef<Error>;
10
- private readonly ids;
11
- private nextId;
12
- private signature;
13
- constructor();
14
- static ɵfac: i0.ɵɵFactoryDeclaration<ChartgpuConnectChartsDirective, never>;
15
- static ɵdir: i0.ɵɵDirectiveDeclaration<ChartgpuConnectChartsDirective, "[libChartgpuConnectCharts]", never, { "charts": { "alias": "libChartgpuConnectCharts"; "required": false; "isSignal": true; }; "syncOptions": { "alias": "syncOptions"; "required": false; "isSignal": true; }; }, { "connectionError": "connectionError"; }, never, never, true, never>;
16
- }
@@ -1 +0,0 @@
1
- export declare function provideChartGpuContext(): import("@angular/core").EnvironmentProviders;
@@ -1,20 +0,0 @@
1
- import type { ChartgpuGPUContextState } from './chartgpu-angular.types';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * Creates one shared WebGPU context and pipeline cache for charts in a dashboard.
5
- * The device is intentionally not destroyed with the service so charts can share it
6
- * for the lifetime of the application.
7
- */
8
- export declare class ChartgpuGPUContextService {
9
- readonly state: import("@angular/core").WritableSignal<ChartgpuGPUContextState>;
10
- readonly context: import("@angular/core").Signal<Readonly<{
11
- readonly device: GPUDevice;
12
- readonly adapter: GPUAdapter;
13
- readonly pipelineCache?: import("chartgpu").PipelineCache;
14
- }>>;
15
- private initialization?;
16
- initialize(): Promise<ChartgpuGPUContextState>;
17
- private createContext;
18
- static ɵfac: i0.ɵɵFactoryDeclaration<ChartgpuGPUContextService, never>;
19
- static ɵprov: i0.ɵɵInjectableDeclaration<ChartgpuGPUContextService>;
20
- }
package/public-api.d.ts DELETED
@@ -1,5 +0,0 @@
1
- export * from './lib/chartgpu-angular.component';
2
- export * from './lib/chartgpu-angular.types';
3
- export * from './lib/connect-charts.directive';
4
- export * from './lib/gpu-context.provider';
5
- export * from './lib/gpu-context.service';