@photonviz/core 0.1.1 → 0.2.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 ADDED
@@ -0,0 +1,70 @@
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/coredumpdev/photon/master/assets/banner.png" alt="Photon" width="100%" />
3
+ </p>
4
+
5
+ # @photonviz/core
6
+
7
+ **GPU-accelerated scientific plotting for the web — WebGL2, zero dependencies.**
8
+
9
+ <p align="center">
10
+ <img src="https://raw.githubusercontent.com/coredumpdev/photon/master/assets/streaming.gif" alt="Live streaming WebGL2 charts at 60fps" width="100%" />
11
+ </p>
12
+
13
+ <p align="center">
14
+ <img src="https://raw.githubusercontent.com/coredumpdev/photon/master/assets/gallery-full.png" alt="Photon chart gallery" width="100%" />
15
+ </p>
16
+
17
+ The framework-agnostic core of [Photon](https://github.com/coredumpdev/photon).
18
+ Renders geometry on the GPU (instanced WebGL2 + min/max decimation) and draws
19
+ axes, ticks, and labels on a crisp Canvas2D overlay — so you get both **scale**
20
+ (millions of points at 60fps) and **sharp text**.
21
+
22
+ ```bash
23
+ npm i @photonviz/core
24
+ ```
25
+
26
+ > Framework bindings: [`@photonviz/react`](https://www.npmjs.com/package/@photonviz/react) · [`@photonviz/vue`](https://www.npmjs.com/package/@photonviz/vue) · [`@photonviz/svelte`](https://www.npmjs.com/package/@photonviz/svelte)
27
+ > Vector maps: [`@photonviz/map`](https://www.npmjs.com/package/@photonviz/map)
28
+
29
+ ## Quick start
30
+
31
+ ```ts
32
+ import { Plot } from "@photonviz/core";
33
+
34
+ const plot = new Plot(document.getElementById("chart")!, {
35
+ theme: "dark",
36
+ scales: { y: { type: "log" } },
37
+ });
38
+
39
+ plot.addLine({ x: xs, y: ys, color: "#60a5fa", width: 2, name: "signal" });
40
+ // wheel to zoom · drag to pan · box-zoom + home from the toolbar · hover for tooltips
41
+ ```
42
+
43
+ ## Chart types
44
+
45
+ | Type | API |
46
+ | --- | --- |
47
+ | Line / Step | `plot.addLine({ x, y, color, width, step })` — real thick lines, round/miter/bevel joins |
48
+ | Scatter | `plot.addScatter({ x, y, size, colorBy })` — instanced, colormap by value |
49
+ | Bar | `plot.addBar({ x, y, width, offset, base })` — grouped / stacked |
50
+ | Area | `plot.addArea({ x, y, base })` |
51
+ | Histogram | `plot.addHistogram(values, { bins })` |
52
+ | Box / Violin | `plot.addBox({ groups, violin })` — Tukey quartiles, KDE |
53
+ | Heatmap | `plot.addHeatmap({ values, cols, rows, extent, colormap })` |
54
+ | Contour | `plot.addContour({ values, cols, rows, extent, levels })` |
55
+ | Hexbin | `plot.addHexbin({ x, y, radius, colormap })` |
56
+ | Error bar / Stem / Quiver / Candlestick | `plot.addErrorBar` · `addStem` · `addQuiver` · `addCandlestick` |
57
+
58
+ **Polar** — `new PolarPlot(el)` with `addLine` / `addScatter` (drag to rotate, wheel to zoom).
59
+ **3D** — `new Plot3D(el)` with `addSurface` / `addPointCloud` (orbit camera).
60
+
61
+ ## Features
62
+
63
+ - **Scales** — linear, log (decade ticks + GPU log transform), time (large epoch timestamps via per-layer reference offsets).
64
+ - **Streaming** — line/scatter/bar/area expose `setData()` to re-upload GPU buffers each frame.
65
+ - **Interaction** — wheel-zoom, pan, box/X/Y zoom, hover crosshair + tooltips, multiple Y axes, custom ticks.
66
+ - **Many charts, one context** — a single shared WebGL2 context backs every plot, so a page can hold dozens.
67
+
68
+ ## License
69
+
70
+ [MIT](https://github.com/coredumpdev/photon/blob/master/LICENSE) — full docs & source at [github.com/coredumpdev/photon](https://github.com/coredumpdev/photon).
package/dist/index.d.ts CHANGED
@@ -40,12 +40,29 @@ interface Bounds {
40
40
  /** RGBA in 0..1. */
41
41
  type Color = readonly [number, number, number, number];
42
42
 
43
+ /**
44
+ * Shared data→clip transform used by every layer's vertex shader.
45
+ *
46
+ * Two subtleties it handles:
47
+ * - **Log axes** — when `uLogX/uLogY` is set, the real coordinate is
48
+ * log10-transformed on the GPU.
49
+ * - **Float32 precision** — vertex buffers are float32 (~7 significant digits),
50
+ * which is not enough for large values like epoch-millisecond timestamps.
51
+ * Layers upload coordinates *relative to a reference* (`x - xRef`) and pass
52
+ * `uXRef`; the domain is passed in the same offset space, so the subtraction
53
+ * that computes the normalized position never suffers catastrophic
54
+ * cancellation. For log axes the reference is added back before log10.
55
+ */
56
+ declare const TRANSFORM_GLSL = "\nuniform vec2 uDomainX; // linear: (lo-ref, hi-ref) ; log: (log10 lo, log10 hi)\nuniform vec2 uDomainY;\nuniform float uXRef;\nuniform float uYRef;\nuniform float uLogX; // >0.5 => log axis\nuniform float uLogY;\n\nvec2 dataToNorm(vec2 p) {\n float cx = (uLogX > 0.5) ? log(p.x + uXRef) / 2.302585092994046 : p.x;\n float cy = (uLogY > 0.5) ? log(p.y + uYRef) / 2.302585092994046 : p.y;\n float nx = (cx - uDomainX.x) / (uDomainX.y - uDomainX.x);\n float ny = (cy - uDomainY.x) / (uDomainY.y - uDomainY.x);\n return vec2(nx, ny);\n}\n\nvec2 dataToClip(vec2 p) {\n return dataToNorm(p) * 2.0 - 1.0;\n}\n";
43
57
  /** Per-axis view state handed to a layer each frame. `lo`/`hi` are raw data-space. */
44
58
  interface AxisFrame {
45
59
  lo: number;
46
60
  hi: number;
47
61
  log: boolean;
48
62
  }
63
+ declare const TRANSFORM_UNIFORMS: readonly ["uDomainX", "uDomainY", "uXRef", "uYRef", "uLogX", "uLogY"];
64
+ /** Set the shared transform uniforms for a layer given its per-axis references. */
65
+ declare function setTransformUniforms(gl: WebGL2RenderingContext, u: Record<string, WebGLUniformLocation | null>, x: AxisFrame, y: AxisFrame, xRef: number, yRef: number): void;
49
66
 
50
67
  /** State handed to a layer each frame so it can transform data to clip space. */
51
68
  interface DrawState {
@@ -416,6 +433,26 @@ declare class HexbinLayer implements Layer {
416
433
  dispose(): void;
417
434
  }
418
435
 
436
+ /**
437
+ * Shared hover-picking used by point/series layers (line, scatter, stem).
438
+ *
439
+ * The mode decides which pixel-space distance is minimized:
440
+ * - `"x"` — nearest by horizontal distance (classic crosshair-along-x)
441
+ * - `"y"` — nearest by vertical distance
442
+ * - `"xy"` — nearest by true 2D distance (checks both axes; right for point
443
+ * clouds / maps, where an x-only match would highlight the wrong
444
+ * point)
445
+ *
446
+ * Distances are computed in pixels via `project`, so x and y are compared on
447
+ * the same footing regardless of each axis's data range.
448
+ */
449
+ type PickMode = "x" | "y" | "xy";
450
+ interface Picked {
451
+ x: number;
452
+ y: number;
453
+ index: number;
454
+ }
455
+
419
456
  /** How adjacent segments meet at a vertex. */
420
457
  type LineJoin = "round" | "miter" | "bevel" | "butt";
421
458
  interface LineOptions {
@@ -491,11 +528,7 @@ declare class LineLayer implements Layer {
491
528
  x: Range;
492
529
  y: Range;
493
530
  } | null;
494
- nearestByX(x: number): {
495
- x: number;
496
- y: number;
497
- index: number;
498
- } | null;
531
+ pick(mode: PickMode, cursorPx: number, cursorPy: number, project: (x: number, y: number) => [number, number]): Picked | null;
499
532
  /** Replace the series data and re-upload the GPU buffer (for streaming). */
500
533
  setData(x: ArrayLike<number>, y: ArrayLike<number>): void;
501
534
  /**
@@ -569,6 +602,12 @@ interface ScatterOptions {
569
602
  size?: number;
570
603
  name?: string;
571
604
  yAxis?: string;
605
+ /**
606
+ * Optional per-point text shown when a point is clicked (one entry per point,
607
+ * parallel to `x`/`y`). Lets you attach your own info instead of the default
608
+ * coordinate readout.
609
+ */
610
+ labels?: ArrayLike<string>;
572
611
  /** Color each point by a value through a colormap. */
573
612
  colorBy?: {
574
613
  values: ArrayLike<number>;
@@ -591,6 +630,7 @@ declare class ScatterLayer implements Layer {
591
630
  private size;
592
631
  private color;
593
632
  private useVertexColor;
633
+ private labels?;
594
634
  private xRef;
595
635
  private yRef;
596
636
  private xs;
@@ -602,11 +642,9 @@ declare class ScatterLayer implements Layer {
602
642
  x: Range;
603
643
  y: Range;
604
644
  } | null;
605
- nearestByX(x: number): {
606
- x: number;
607
- y: number;
608
- index: number;
609
- } | null;
645
+ pick(mode: PickMode, cursorPx: number, cursorPy: number, project: (x: number, y: number) => [number, number]): Picked | null;
646
+ /** User-supplied text for a point, shown when it is clicked. */
647
+ infoAt(index: number): string[] | null;
610
648
  /** Replace point positions and re-upload (for streaming). Keeps uniform color. */
611
649
  setData(x: ArrayLike<number>, y: ArrayLike<number>): void;
612
650
  draw(state: DrawState): void;
@@ -654,11 +692,7 @@ declare class StemLayer implements Layer {
654
692
  x: Range;
655
693
  y: Range;
656
694
  } | null;
657
- nearestByX(x: number): {
658
- x: number;
659
- y: number;
660
- index: number;
661
- } | null;
695
+ pick(mode: PickMode, cursorPx: number, cursorPy: number, project: (x: number, y: number) => [number, number]): Picked | null;
662
696
  draw(state: DrawState): void;
663
697
  dispose(): void;
664
698
  }
@@ -751,6 +785,11 @@ interface YAxisOptions extends AxisConfig {
751
785
  /** Axis + label color (secondary axes often match their series). */
752
786
  color?: string;
753
787
  }
788
+ /** One line of the hover tooltip header, produced by {@link PlotOptions.hoverReadout}. */
789
+ interface HoverReadoutRow {
790
+ label: string;
791
+ value: string;
792
+ }
754
793
  interface PlotOptions {
755
794
  scales?: {
756
795
  x?: AxisScaleOptions;
@@ -765,11 +804,47 @@ interface PlotOptions {
765
804
  /** Enable wheel-zoom and drag interaction. Default true. */
766
805
  interactive?: boolean;
767
806
  /** Show the built-in toolbar (home + pan/box/X/Y zoom modes). Default true. */
768
- toolbar?: boolean;
769
- /** Initial interaction mode. Default `"box"`. */
807
+ showToolbar?: boolean;
808
+ /** Initial interaction mode. Default `"pan"`. */
770
809
  mode?: InteractionMode;
771
810
  /** Enable hover crosshair + tooltip. Default true. */
772
811
  hover?: boolean;
812
+ /**
813
+ * How hover selects the highlighted point: `"x"` nearest by x (classic),
814
+ * `"y"` nearest by y, or `"xy"` nearest by 2D distance — the last checks both
815
+ * axes, which is what a scatter/map needs. Default `"x"`.
816
+ */
817
+ pick?: PickMode;
818
+ /**
819
+ * When a point's pinned detail box appears: `"click"` pins it on click (until
820
+ * you click empty space), `"hover"` shows it while the cursor is over a point.
821
+ * Default `"click"`.
822
+ */
823
+ pointInfo?: "hover" | "click";
824
+ /**
825
+ * Show dashed guide lines on *both* the X and Y axes at the cursor — on hover
826
+ * and while the pointer is pressed. When false, hover shows only the vertical
827
+ * (X) line and there are no press guides. Default true.
828
+ */
829
+ crosshair?: boolean;
830
+ /**
831
+ * Keep data-units-per-pixel equal on both axes so nothing is distorted (the
832
+ * looser axis is expanded to match). Essential for maps. Default false.
833
+ */
834
+ equalAspect?: boolean;
835
+ /**
836
+ * Constrain panning/zooming so the view can't move outside the data bounds
837
+ * (the union of all layers' extents). Zoom still works; the view is just
838
+ * kept inside the limits. Default false (a map turns it on).
839
+ */
840
+ boundedPan?: boolean;
841
+ /**
842
+ * Customize the tooltip header shown on hover. Given the cursor's data-space
843
+ * X and Y (primary y axis), return the lines to display above the series
844
+ * rows — e.g. a map converts world coords to `lon`/`lat`. When omitted, the
845
+ * header is the default single `x = …` line. Default undefined.
846
+ */
847
+ hoverReadout?: (dataX: number, dataY: number) => HoverReadoutRow[];
773
848
  }
774
849
  /**
775
850
  * The imperative core plot. Owns a stack of three canvases (grid / WebGL data /
@@ -805,7 +880,18 @@ declare class Plot {
805
880
  private toolbarHandle;
806
881
  private hoverEnabled;
807
882
  private hoverPx;
883
+ private pickMode;
884
+ private pointInfo;
885
+ private crosshair;
886
+ private equalAspect;
887
+ private boundedPan;
888
+ private hoverReadout?;
889
+ /** Cursor position while the pointer is pressed, when `crosshair`. */
890
+ private pressPx;
808
891
  private tooltip;
892
+ /** A point clicked to pin its details, until another click clears it. */
893
+ private selected;
894
+ private infoBox;
809
895
  constructor(container: HTMLElement, options?: PlotOptions);
810
896
  private makeCanvas;
811
897
  /** Margins grow to make room for extra y axes on each side. */
@@ -814,6 +900,22 @@ declare class Plot {
814
900
  /** Pixel x-position (and title x) for each y axis, by draw order per side. */
815
901
  private yAxisPositions;
816
902
  private register;
903
+ /**
904
+ * Register a layer built outside core (e.g. `@photonviz/map`). Use with
905
+ * {@link context} to construct the layer against this plot's WebGL2 context.
906
+ */
907
+ add<T extends Layer>(layer: T): T;
908
+ /** The shared WebGL2 context, for constructing custom layers. */
909
+ get context(): WebGL2RenderingContext;
910
+ /**
911
+ * Convert a client (screen) coordinate to data space — the shared x and the
912
+ * primary y. Returns null if the point is outside the plot region. Useful for
913
+ * custom hit-testing (e.g. map feature picking on click).
914
+ */
915
+ dataAt(clientX: number, clientY: number): {
916
+ x: number;
917
+ y: number;
918
+ } | null;
817
919
  addLine(opts: LineOptions): LineLayer;
818
920
  addScatter(opts: ScatterOptions): ScatterLayer;
819
921
  addBar(opts: BarOptions): BarLayer;
@@ -879,6 +981,26 @@ declare class Plot {
879
981
  private panY;
880
982
  private attachInteraction;
881
983
  private setHover;
984
+ /** Update the press-crosshair position and redraw. */
985
+ private setPress;
986
+ /** Nearest point (2D, within a small radius) under the cursor, or null. */
987
+ private pickPoint;
988
+ /** Click handler: in `pointInfo:"click"` mode, pin the point under the cursor. */
989
+ private handleClick;
990
+ /** Draw the pinned point's marker and position its info box (or hide it). */
991
+ private updateInfoBox;
992
+ /** Data-space x extent across all layers, or null if empty. */
993
+ private layerBoundsX;
994
+ /** Data-space y extent across the layers bound to axis `id`, or null. */
995
+ private layerBoundsY;
996
+ /** Keep the view inside the data bounds (used when `boundedPan`). */
997
+ private clampView;
998
+ /**
999
+ * Expand the looser axis so both axes share the same data-units-per-pixel,
1000
+ * preventing distortion (maps set `equalAspect`). Linear axes only; balances
1001
+ * the primary y against x, and is idempotent once balanced.
1002
+ */
1003
+ private applyAspect;
882
1004
  private drawSelection;
883
1005
  private applySelection;
884
1006
  private zoomAround;
@@ -912,6 +1034,18 @@ interface PolarOptions {
912
1034
  /** Fixed max radius. If omitted, autoscales to the data. */
913
1035
  maxRadius?: number;
914
1036
  margin?: number;
1037
+ /** Enable wheel-zoom (r scale) and drag-rotate interaction. Default true. */
1038
+ interactive?: boolean;
1039
+ /** Enable hover: highlight the nearest point + show a tooltip. Default true. */
1040
+ hover?: boolean;
1041
+ /** Show the built-in home (reset) button. Default true. */
1042
+ showToolbar?: boolean;
1043
+ /**
1044
+ * How the pinned point-info box is triggered: `"click"` pins a point until
1045
+ * empty space is clicked; `"hover"` shows the point under the cursor
1046
+ * automatically (no click). Default `"click"`.
1047
+ */
1048
+ pointInfo?: "hover" | "click";
915
1049
  }
916
1050
  interface PolarLineOptions {
917
1051
  theta: ArrayLike<number>;
@@ -926,6 +1060,8 @@ interface PolarScatterOptions {
926
1060
  r: ArrayLike<number>;
927
1061
  color?: string | Color;
928
1062
  size?: number;
1063
+ /** Optional per-point labels (one per point), shown as the title of the click-pinned info box. */
1064
+ labels?: ArrayLike<string>;
929
1065
  }
930
1066
  /** A live handle to update a polar series with new (theta, r) data. */
931
1067
  interface PolarSeries {
@@ -936,19 +1072,37 @@ declare class PolarPlot {
936
1072
  private container;
937
1073
  private gridCanvas;
938
1074
  private dataCanvas;
1075
+ private overlayCanvas;
939
1076
  private gridCtx;
940
1077
  private dataCtx;
1078
+ private overlayCtx;
941
1079
  private gl;
942
1080
  private sharedCanvas;
943
1081
  private theme;
1082
+ private isDark;
944
1083
  private toRad;
945
1084
  private fixedR?;
946
1085
  private margin;
947
1086
  private entries;
948
1087
  private R;
1088
+ private baseR;
949
1089
  private dpr;
950
1090
  private resizeObserver;
951
1091
  private frameRequested;
1092
+ private interactive;
1093
+ private hoverEnabled;
1094
+ /** Multiplier on the fitted radius: <1 zooms in (smaller r-domain), >1 out. */
1095
+ private zoom;
1096
+ /** Angular offset (radians, CCW) applied to all series + gridlines. */
1097
+ private rotation;
1098
+ private hoverPx;
1099
+ private tooltip;
1100
+ private homeButton;
1101
+ /** A point clicked to pin its details, until another click clears it. */
1102
+ private selected;
1103
+ private infoBox;
1104
+ /** Whether the info box is triggered by `"click"` (pinned) or `"hover"`. */
1105
+ private pointInfo;
952
1106
  constructor(container: HTMLElement, options?: PolarOptions);
953
1107
  private makeCanvas;
954
1108
  private toXY;
@@ -956,6 +1110,14 @@ declare class PolarPlot {
956
1110
  addScatter(opts: PolarScatterOptions): PolarSeries;
957
1111
  private handle;
958
1112
  private refit;
1113
+ /** Re-project every series with the current rotation (called when rotation changes). */
1114
+ private retransform;
1115
+ /** Reset zoom (r-domain) and rotation back to the initial view. */
1116
+ home(): void;
1117
+ /** Current rotation offset in radians (CCW). */
1118
+ getRotation(): number;
1119
+ /** Set the rotation offset (radians, CCW) and redraw. */
1120
+ setRotation(rad: number): void;
959
1121
  destroy(): void;
960
1122
  private resize;
961
1123
  requestRender(): void;
@@ -963,6 +1125,19 @@ declare class PolarPlot {
963
1125
  private square;
964
1126
  render(): void;
965
1127
  private drawGrid;
1128
+ private setHover;
1129
+ /** Nearest data point (across all series) to a cursor position, in CSS px. */
1130
+ private pickNearest;
1131
+ /** Draw a filled, white-ringed marker on the overlay at a screen position. */
1132
+ private drawPointMarker;
1133
+ private renderHover;
1134
+ /** Click handler: pin the nearest point's details, or clear on empty space. */
1135
+ private handleClick;
1136
+ /** Draw the pinned point's marker and position its info box (or hide it). */
1137
+ private updateInfoBox;
1138
+ private updateTooltip;
1139
+ private attachInteraction;
1140
+ private makeHomeButton;
966
1141
  }
967
1142
 
968
1143
  /** Minimal column-major 4×4 matrix helpers for the 3D plots (WebGL convention). */
@@ -1192,9 +1367,14 @@ interface Density {
1192
1367
  */
1193
1368
  declare function kde(values: ArrayLike<number>, lo: number, hi: number, points?: number, bandwidth?: number): Density;
1194
1369
 
1370
+ /** Compile + link a vertex/fragment program. */
1371
+ declare function createProgram(gl: WebGL2RenderingContext, vert: string, frag: string): WebGLProgram;
1372
+ /** Cache uniform locations for a program by name. */
1373
+ declare function uniformLocations(gl: WebGL2RenderingContext, program: WebGLProgram, names: string[]): Record<string, WebGLUniformLocation | null>;
1374
+
1195
1375
  /** Parse a CSS hex/rgb color string into normalized RGBA (0..1). */
1196
1376
  declare function parseColor(input: string): [number, number, number, number];
1197
1377
  /** Normalized RGBA (0..1) back to a CSS `rgba(...)` string. */
1198
1378
  declare function toColorCss(c: readonly [number, number, number, number]): string;
1199
1379
 
1200
- export { AreaLayer, type AreaOptions, Axis, type AxisConfig, type AxisFrame, type AxisScaleOptions, BarLayer, type BarOptions, type Bounds, type Bounds3, type BoxGroup, BoxLayer, type BoxOptions, type BoxStats, CandlestickLayer, type CandlestickOptions, type Color, type ColormapName, ContourLayer, type ContourOptions, type Density, type Dim, type DrawState, ErrorBarLayer, type ErrorBarOptions, HeatmapLayer, type HeatmapOptions, HexbinLayer, type HexbinOptions, type Histogram, type InteractionMode, type Layer, type Layer3D, type Layout, LineLayer, type LineOptions, LinearScale, LogScale, Plot, Plot3D, type Plot3DOptions, type PlotOptions, PointCloudLayer, type PointCloudOptions, type PolarLineOptions, type PolarOptions, PolarPlot, type PolarScatterOptions, type PolarSeries, QuiverLayer, type QuiverOptions, type RGB, type Range, type Scale, type ScaleType, ScatterLayer, type ScatterOptions, type Spectrogram, StemLayer, type StemOptions, SurfaceLayer, type SurfaceOptions, type Theme, type Tick, type TicksSpec, TimeScale, type ToolbarHost, type ToolbarTheme, type YAxisOptions, autoTicks, boxStats, colormap, createToolbar, darkTheme, defaultFormat, fft, histogram, kde, lightTheme, makeScale, parseColor, quantileSorted, resolveTicks, spectrogram, toColorCss, withMinorTicks };
1380
+ export { AreaLayer, type AreaOptions, Axis, type AxisConfig, type AxisFrame, type AxisScaleOptions, BarLayer, type BarOptions, type Bounds, type Bounds3, type BoxGroup, BoxLayer, type BoxOptions, type BoxStats, CandlestickLayer, type CandlestickOptions, type Color, type ColormapName, ContourLayer, type ContourOptions, type Density, type Dim, type DrawState, ErrorBarLayer, type ErrorBarOptions, HeatmapLayer, type HeatmapOptions, HexbinLayer, type HexbinOptions, type Histogram, type HoverReadoutRow, type InteractionMode, type Layer, type Layer3D, type Layout, LineLayer, type LineOptions, LinearScale, LogScale, type PickMode, Plot, Plot3D, type Plot3DOptions, type PlotOptions, PointCloudLayer, type PointCloudOptions, type PolarLineOptions, type PolarOptions, PolarPlot, type PolarScatterOptions, type PolarSeries, QuiverLayer, type QuiverOptions, type RGB, type Range, type Scale, type ScaleType, ScatterLayer, type ScatterOptions, type Spectrogram, StemLayer, type StemOptions, SurfaceLayer, type SurfaceOptions, TRANSFORM_GLSL, TRANSFORM_UNIFORMS, type Theme, type Tick, type TicksSpec, TimeScale, type ToolbarHost, type ToolbarTheme, type YAxisOptions, autoTicks, boxStats, colormap, createProgram, createToolbar, darkTheme, defaultFormat, fft, histogram, kde, lightTheme, makeScale, parseColor, quantileSorted, resolveTicks, setTransformUniforms, spectrogram, toColorCss, uniformLocations, withMinorTicks };