@sksat/uneri 0.1.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/LICENSE +21 -0
- package/README.md +50 -0
- package/dist/assets/chartDataWorker-DCpKMXgg.js +12 -0
- package/dist/components/TimeSeriesChart.d.ts +70 -0
- package/dist/db/IngestBuffer.d.ts +59 -0
- package/dist/db/duckdb.d.ts +6 -0
- package/dist/db/store.d.ts +94 -0
- package/dist/hooks/useDuckDB.d.ts +9 -0
- package/dist/hooks/useTimeSeriesStore.d.ts +35 -0
- package/dist/hooks/useTimeSeriesStoreWorker.d.ts +33 -0
- package/dist/index.css +2 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +10460 -0
- package/dist/types.d.ts +36 -0
- package/dist/utils/ChartBuffer.d.ts +57 -0
- package/dist/utils/alignTimeSeries.d.ts +23 -0
- package/dist/utils/chartViewport.d.ts +18 -0
- package/dist/utils/mergeChartData.d.ts +11 -0
- package/dist/worker/chartDataWorker.d.ts +11 -0
- package/dist/worker/chartDataWorkerClient.d.ts +47 -0
- package/dist/worker/multiChartDataWorker.d.ts +10 -0
- package/dist/worker/multiChartDataWorkerClient.d.ts +52 -0
- package/dist/worker/protocol.d.ts +145 -0
- package/package.json +71 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import uPlot from "uplot";
|
|
2
|
+
import "uplot/dist/uPlot.min.css";
|
|
3
|
+
/**
|
|
4
|
+
* Custom y-axis range function that prevents uPlot's axis split function
|
|
5
|
+
* from crashing with near-constant data.
|
|
6
|
+
*
|
|
7
|
+
* When all y-values are nearly identical, the default range calculation
|
|
8
|
+
* produces such a tiny axis range that the tick generation loop tries to
|
|
9
|
+
* create an impossibly large array (RangeError: Invalid array length).
|
|
10
|
+
*
|
|
11
|
+
* Enforces a minimum visible range proportional to the data's magnitude.
|
|
12
|
+
*/
|
|
13
|
+
export declare function safeYRange(_u: uPlot, dataMin: number, dataMax: number, _scaleKey: string): uPlot.Range.MinMax;
|
|
14
|
+
/**
|
|
15
|
+
* Convert Float64Array to a regular array, replacing NaN with null.
|
|
16
|
+
*
|
|
17
|
+
* uPlot cannot recognise NaN inside Float64Array as gaps — it only handles
|
|
18
|
+
* null/undefined in plain arrays. alignTimeSeries() returns Float64Array
|
|
19
|
+
* with NaN for missing points, so this bridge is needed before handing
|
|
20
|
+
* the data to uPlot.
|
|
21
|
+
*/
|
|
22
|
+
export declare function float64NanToNull(arr: Float64Array): (number | null)[];
|
|
23
|
+
/** Configuration for a single series in a multi-series chart. */
|
|
24
|
+
export interface SeriesConfig {
|
|
25
|
+
label: string;
|
|
26
|
+
color: string;
|
|
27
|
+
}
|
|
28
|
+
/** Multi-series data: shared x-axis + multiple y arrays. */
|
|
29
|
+
export interface MultiSeriesData {
|
|
30
|
+
/** Shared time axis. */
|
|
31
|
+
t: Float64Array;
|
|
32
|
+
/** One Float64Array per series (NaN for gaps). */
|
|
33
|
+
values: Float64Array[];
|
|
34
|
+
/** Config for each series (same order as values[]). */
|
|
35
|
+
series: SeriesConfig[];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Compute Grafana-style legend isolation visibility.
|
|
39
|
+
*
|
|
40
|
+
* Click a series → isolate (show only that series).
|
|
41
|
+
* Click the already-isolated series → show all.
|
|
42
|
+
*
|
|
43
|
+
* @param clickedIndex 1-based uPlot series index (0 = x-axis, ignored)
|
|
44
|
+
* @param currentShow Current visibility, indexed 0..N where 0 is x-axis
|
|
45
|
+
* @returns New visibility array (same length as currentShow)
|
|
46
|
+
*/
|
|
47
|
+
export declare function computeLegendIsolation(clickedIndex: number, currentShow: boolean[]): boolean[];
|
|
48
|
+
/**
|
|
49
|
+
* Build uPlot series config array from SeriesConfig[].
|
|
50
|
+
*
|
|
51
|
+
* spanGaps is enabled because aligned multi-series data contains null gaps
|
|
52
|
+
* (from float64NanToNull) at time points where a series has no value.
|
|
53
|
+
* Each series should render as a continuous line across those gaps.
|
|
54
|
+
*/
|
|
55
|
+
export declare function buildMultiSeriesConfig(configs: SeriesConfig[]): uPlot.Series[];
|
|
56
|
+
interface TimeSeriesChartProps {
|
|
57
|
+
title: string;
|
|
58
|
+
yLabel: string;
|
|
59
|
+
/** Single-series data: [xValues, yValues]. */
|
|
60
|
+
data?: [Float64Array, Float64Array] | null;
|
|
61
|
+
/** Multi-series data (takes precedence over `data`). */
|
|
62
|
+
multiData?: MultiSeriesData | null;
|
|
63
|
+
height?: number;
|
|
64
|
+
/** Color for single-series mode. Ignored when multiData is used. */
|
|
65
|
+
color?: string;
|
|
66
|
+
/** Called when the user zooms into a time range via drag. */
|
|
67
|
+
onZoom?: (tMin: number, tMax: number) => void;
|
|
68
|
+
}
|
|
69
|
+
export declare function TimeSeriesChart({ title, yLabel, data, multiData, height, color, onZoom, }: TimeSeriesChartProps): import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { TimePoint } from "../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Staging buffer for DuckDB ingestion.
|
|
4
|
+
*
|
|
5
|
+
* Accumulates incoming data points and provides them in batches
|
|
6
|
+
* via `drain()`. The drain pattern decouples data arrival from
|
|
7
|
+
* DuckDB insertion timing (polling interval), avoiding the need
|
|
8
|
+
* for index-based tracking.
|
|
9
|
+
*
|
|
10
|
+
* **Contract**: `t` values pushed to this buffer MUST be strictly
|
|
11
|
+
* monotonically increasing. Out-of-order data will be silently missed
|
|
12
|
+
* by incremental queries. This is guaranteed by the orts simulator
|
|
13
|
+
* (simulation time always advances). Consumers using uneri with other
|
|
14
|
+
* data sources must enforce this property.
|
|
15
|
+
*/
|
|
16
|
+
export declare class IngestBuffer<T extends TimePoint = TimePoint> {
|
|
17
|
+
private pending;
|
|
18
|
+
private _latestT;
|
|
19
|
+
private _rebuildData;
|
|
20
|
+
/** Push a single point. Must satisfy t > latestT (strictly increasing). */
|
|
21
|
+
push(point: T): void;
|
|
22
|
+
/** Push multiple points at once (appended to end). */
|
|
23
|
+
pushMany(points: T[]): void;
|
|
24
|
+
/**
|
|
25
|
+
* Prepend points to the front of the buffer.
|
|
26
|
+
* Used for re-queuing failed insert batches: since new points may have
|
|
27
|
+
* arrived in `pending` during the async insert, appending the failed
|
|
28
|
+
* batch would break t-monotonicity. Prepending preserves order.
|
|
29
|
+
*/
|
|
30
|
+
prependMany(points: T[]): void;
|
|
31
|
+
/**
|
|
32
|
+
* Drain all pending points, returning them and clearing the buffer.
|
|
33
|
+
* Returns an empty array if nothing is pending.
|
|
34
|
+
*/
|
|
35
|
+
drain(): T[];
|
|
36
|
+
/**
|
|
37
|
+
* Signal a full table rebuild. The tick loop should clear the DuckDB table
|
|
38
|
+
* and insert the returned data from `consumeRebuild()`.
|
|
39
|
+
*
|
|
40
|
+
* Clears any stale pending points to prevent duplicates (fullData is
|
|
41
|
+
* the complete replacement dataset). Points pushed after this call
|
|
42
|
+
* are treated as genuinely new and will be included by consumeRebuild().
|
|
43
|
+
*/
|
|
44
|
+
markRebuild(fullData: T[]): void;
|
|
45
|
+
/**
|
|
46
|
+
* Consume a pending rebuild signal. Returns the rebuild data merged
|
|
47
|
+
* with any points pushed since markRebuild(), or null if no rebuild
|
|
48
|
+
* is pending. The rebuild flag and pending buffer are both cleared.
|
|
49
|
+
*/
|
|
50
|
+
consumeRebuild(): T[] | null;
|
|
51
|
+
/** Number of points waiting to be drained. */
|
|
52
|
+
get pendingCount(): number;
|
|
53
|
+
/**
|
|
54
|
+
* The latest t value seen across all pushed points.
|
|
55
|
+
* Used for timeRange calculation in chart components.
|
|
56
|
+
* Returns -Infinity if no points have been pushed.
|
|
57
|
+
*/
|
|
58
|
+
get latestT(): number;
|
|
59
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { AsyncDuckDBConnection } from "@duckdb/duckdb-wasm";
|
|
2
|
+
import type { ChartDataMap, TableSchema, TimePoint } from "../types.js";
|
|
3
|
+
import type { RowTuple } from "../worker/protocol.js";
|
|
4
|
+
/**
|
|
5
|
+
* Generate a CREATE OR REPLACE TABLE statement from a schema definition.
|
|
6
|
+
*/
|
|
7
|
+
export declare function buildCreateTableSQL(schema: TableSchema): string;
|
|
8
|
+
/**
|
|
9
|
+
* Generate an INSERT INTO ... VALUES statement from pre-converted row tuples.
|
|
10
|
+
* This is the core SQL builder used by both `buildInsertSQL` (with toRow)
|
|
11
|
+
* and the chart data Worker (which receives already-converted tuples).
|
|
12
|
+
* Returns an empty string when the batch is empty.
|
|
13
|
+
*/
|
|
14
|
+
export declare function buildInsertSQLFromRows(tableName: string, rows: RowTuple[]): string;
|
|
15
|
+
/**
|
|
16
|
+
* Generate an INSERT INTO ... VALUES statement for a batch of points.
|
|
17
|
+
* Delegates to `buildInsertSQLFromRows` after converting via `schema.toRow()`.
|
|
18
|
+
* Returns an empty string when the batch is empty.
|
|
19
|
+
*/
|
|
20
|
+
export declare function buildInsertSQL<T extends TimePoint>(schema: TableSchema<T>, points: T[]): string;
|
|
21
|
+
/**
|
|
22
|
+
* Build a SELECT query for derived quantities with optional query-time
|
|
23
|
+
* downsampling via time-bucket partitioning.
|
|
24
|
+
*
|
|
25
|
+
* When maxPoints is specified and > 0, divides the time range into
|
|
26
|
+
* maxPoints equal-duration buckets and picks the first point in each
|
|
27
|
+
* bucket. This ensures even *temporal* coverage regardless of data
|
|
28
|
+
* density — critical when sparse overview data and dense streaming
|
|
29
|
+
* data coexist in the same table.
|
|
30
|
+
*/
|
|
31
|
+
export declare function buildDerivedQuery(schema: TableSchema, tMin?: number, maxPoints?: number, tMax?: number): string;
|
|
32
|
+
/**
|
|
33
|
+
* Build SQL to create a temp table of "keeper" t values from old data.
|
|
34
|
+
* Uses NTILE to divide old rows into equal-count buckets, keeping the
|
|
35
|
+
* earliest t (MIN) from each bucket as the representative point.
|
|
36
|
+
*/
|
|
37
|
+
export declare function buildCompactKeepersSQL(tableName: string, cutoffT: number, targetOldRows: number): string;
|
|
38
|
+
/**
|
|
39
|
+
* Build SQL to delete non-keeper old rows (those older than cutoff
|
|
40
|
+
* and not in the keepers temp table).
|
|
41
|
+
*/
|
|
42
|
+
export declare function buildCompactDeleteSQL(tableName: string, cutoffT: number): string;
|
|
43
|
+
/**
|
|
44
|
+
* Create (or replace) the table described by the schema.
|
|
45
|
+
*/
|
|
46
|
+
export declare function createTable(conn: AsyncDuckDBConnection, schema: TableSchema): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Insert an array of points into the table in batches of 1000.
|
|
49
|
+
*/
|
|
50
|
+
export declare function insertPoints<T extends TimePoint>(conn: AsyncDuckDBConnection, schema: TableSchema<T>, points: T[]): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Delete all rows from the table.
|
|
53
|
+
*/
|
|
54
|
+
export declare function clearTable(conn: AsyncDuckDBConnection, schema: TableSchema): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Run the derived query and return results as a ChartDataMap.
|
|
57
|
+
*/
|
|
58
|
+
export declare function queryDerived(conn: AsyncDuckDBConnection, schema: TableSchema, tMin?: number, maxPoints?: number, tMax?: number): Promise<ChartDataMap>;
|
|
59
|
+
/**
|
|
60
|
+
* Build a simple SELECT for new rows after `tAfter`, with no downsampling.
|
|
61
|
+
* Used for the hot path in cold/hot incremental updates.
|
|
62
|
+
*
|
|
63
|
+
* Relies on the monotonicity contract: t is strictly increasing, so
|
|
64
|
+
* `t > tAfter` with strict inequality avoids re-fetching the boundary point.
|
|
65
|
+
*
|
|
66
|
+
* Derived columns must be row-local (no window functions or aggregation).
|
|
67
|
+
*/
|
|
68
|
+
export declare function buildIncrementalQuery(schema: TableSchema, tAfter: number): string;
|
|
69
|
+
/**
|
|
70
|
+
* Run the incremental query and return results as a ChartDataMap.
|
|
71
|
+
* No downsampling — returns all rows matching the condition.
|
|
72
|
+
*/
|
|
73
|
+
export declare function queryDerivedIncremental(conn: AsyncDuckDBConnection, schema: TableSchema, tAfter: number): Promise<ChartDataMap>;
|
|
74
|
+
/** Configuration for periodic DuckDB compaction. */
|
|
75
|
+
export interface CompactOptions {
|
|
76
|
+
/** Compact when total rows exceed this threshold. */
|
|
77
|
+
maxRows: number;
|
|
78
|
+
/** Keep this many recent rows at full resolution. */
|
|
79
|
+
keepRecentRows: number;
|
|
80
|
+
/** Downsample old data to this many representative rows. */
|
|
81
|
+
targetOldRows: number;
|
|
82
|
+
}
|
|
83
|
+
/** Default compaction thresholds (see plan for rationale). */
|
|
84
|
+
export declare const COMPACT_DEFAULTS: CompactOptions;
|
|
85
|
+
/**
|
|
86
|
+
* Compact old data in DuckDB to control memory usage.
|
|
87
|
+
*
|
|
88
|
+
* Keeps the most recent `keepRecentRows` at full resolution and
|
|
89
|
+
* downsamples older rows to `targetOldRows` using NTILE bucketing.
|
|
90
|
+
* Returns true if compaction was performed.
|
|
91
|
+
*
|
|
92
|
+
* Assumes t values are unique (one per simulation step).
|
|
93
|
+
*/
|
|
94
|
+
export declare function compactTable(conn: AsyncDuckDBConnection, schema: TableSchema, opts?: CompactOptions): Promise<boolean>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AsyncDuckDB, AsyncDuckDBConnection } from "@duckdb/duckdb-wasm";
|
|
2
|
+
import type { TableSchema } from "../types.js";
|
|
3
|
+
export interface UseDuckDBReturn {
|
|
4
|
+
db: AsyncDuckDB | null;
|
|
5
|
+
conn: AsyncDuckDBConnection | null;
|
|
6
|
+
isReady: boolean;
|
|
7
|
+
error: string | null;
|
|
8
|
+
}
|
|
9
|
+
export declare function useDuckDB(schema: TableSchema): UseDuckDBReturn;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { AsyncDuckDBConnection } from "@duckdb/duckdb-wasm";
|
|
2
|
+
import type { IngestBuffer } from "../db/IngestBuffer.js";
|
|
3
|
+
import type { CompactOptions } from "../db/store.js";
|
|
4
|
+
import type { ChartDataMap, TableSchema, TimePoint } from "../types.js";
|
|
5
|
+
/** Maximum number of points to display in charts. Query-time downsampling
|
|
6
|
+
* keeps chart rendering fast regardless of total data in DuckDB. */
|
|
7
|
+
export declare const DISPLAY_MAX_POINTS = 2000;
|
|
8
|
+
/** Time range for chart display: null = all history, number = last N seconds. */
|
|
9
|
+
export type TimeRange = number | null;
|
|
10
|
+
/** Compute the minimum t value for a chart query given a time range window. */
|
|
11
|
+
export declare function computeTMin(timeRange: TimeRange, latestT: number): number | undefined;
|
|
12
|
+
export interface UseTimeSeriesStoreOptions<T extends TimePoint> {
|
|
13
|
+
conn: AsyncDuckDBConnection | null;
|
|
14
|
+
schema: TableSchema<T>;
|
|
15
|
+
ingestBufferRef: React.RefObject<IngestBuffer<T>>;
|
|
16
|
+
/** Show only last N seconds of data, or null for all history. */
|
|
17
|
+
timeRange?: TimeRange;
|
|
18
|
+
/** Maximum number of points to display (default: DISPLAY_MAX_POINTS). */
|
|
19
|
+
maxPoints?: number;
|
|
20
|
+
/** Polling interval in ms for realtime mode (default: 250). */
|
|
21
|
+
tickInterval?: number;
|
|
22
|
+
/** Run cold (full downsampled) refresh every Nth tick (default: 20). */
|
|
23
|
+
coldRefreshEveryN?: number;
|
|
24
|
+
/** Trigger cold refresh when hot buffer exceeds this many rows (default: 500). */
|
|
25
|
+
hotRowBudget?: number;
|
|
26
|
+
/** Run compaction check every Nth cold refresh (default: 5). */
|
|
27
|
+
compactEveryN?: number;
|
|
28
|
+
/** Compaction configuration (default: COMPACT_DEFAULTS). */
|
|
29
|
+
compactOptions?: CompactOptions;
|
|
30
|
+
}
|
|
31
|
+
export interface UseTimeSeriesStoreReturn {
|
|
32
|
+
data: ChartDataMap | null;
|
|
33
|
+
isLoading: boolean;
|
|
34
|
+
}
|
|
35
|
+
export declare function useTimeSeriesStore<T extends TimePoint>(options: UseTimeSeriesStoreOptions<T>): UseTimeSeriesStoreReturn;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Worker-based alternative to useTimeSeriesStore.
|
|
3
|
+
*
|
|
4
|
+
* Moves the entire DuckDB tick loop (insert, query, merge, trim) to a
|
|
5
|
+
* dedicated Web Worker, keeping the main thread free for rendering.
|
|
6
|
+
*
|
|
7
|
+
* Same return type as useTimeSeriesStore for drop-in replacement.
|
|
8
|
+
*/
|
|
9
|
+
import type { IngestBuffer } from "../db/IngestBuffer.js";
|
|
10
|
+
import type { TableSchema, TimePoint } from "../types.js";
|
|
11
|
+
import { ChartDataWorkerClient } from "../worker/chartDataWorkerClient.js";
|
|
12
|
+
import { type TimeRange, type UseTimeSeriesStoreReturn } from "./useTimeSeriesStore.js";
|
|
13
|
+
export interface UseTimeSeriesStoreWorkerOptions<T extends TimePoint> {
|
|
14
|
+
schema: TableSchema<T>;
|
|
15
|
+
ingestBufferRef: React.RefObject<IngestBuffer<T>>;
|
|
16
|
+
/** Show only last N seconds of data, or null for all history. */
|
|
17
|
+
timeRange?: TimeRange;
|
|
18
|
+
/** Maximum number of points to display (default: DISPLAY_MAX_POINTS). */
|
|
19
|
+
maxPoints?: number;
|
|
20
|
+
/** Polling interval in ms for draining the IngestBuffer (default: 250). */
|
|
21
|
+
drainInterval?: number;
|
|
22
|
+
/** Worker tick interval in ms (default: 250). */
|
|
23
|
+
tickInterval?: number;
|
|
24
|
+
/** Run cold (full downsampled) refresh every Nth tick (default: 20). */
|
|
25
|
+
coldRefreshEveryN?: number;
|
|
26
|
+
/** Trigger cold refresh when hot buffer exceeds this many rows (default: 500). */
|
|
27
|
+
hotRowBudget?: number;
|
|
28
|
+
/** Optional ref to receive the worker client instance (for debug queries etc.). */
|
|
29
|
+
clientRef?: React.MutableRefObject<ChartDataWorkerClient | null>;
|
|
30
|
+
/** Set to false to disable the Worker (no Worker is spawned). Default: true. */
|
|
31
|
+
enabled?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare function useTimeSeriesStoreWorker<T extends TimePoint>(options: UseTimeSeriesStoreWorkerOptions<T>): UseTimeSeriesStoreReturn;
|
package/dist/index.css
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.uplot,.uplot *,.uplot :before,.uplot :after{box-sizing:border-box}.uplot{width:min-content;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}.u-title{text-align:center;font-size:18px;font-weight:700}.u-wrap{-webkit-user-select:none;user-select:none;position:relative}.u-over,.u-under{position:absolute}.u-under{overflow:hidden}.uplot canvas{width:100%;height:100%;display:block;position:relative}.u-axis{position:absolute}.u-legend{text-align:center;margin:auto;font-size:14px}.u-inline{display:block}.u-inline *{display:inline-block}.u-inline tr{margin-right:16px}.u-legend th{font-weight:600}.u-legend th>*{vertical-align:middle;display:inline-block}.u-legend .u-marker{width:1em;height:1em;margin-right:4px;background-clip:padding-box!important}.u-inline.u-live th:after{content:":";vertical-align:middle}.u-inline:not(.u-live) .u-value{display:none}.u-series>*{padding:4px}.u-series th{cursor:pointer}.u-legend .u-off>*{opacity:.3}.u-select{pointer-events:none;background:#00000012;position:absolute}.u-cursor-x,.u-cursor-y{pointer-events:none;will-change:transform;position:absolute;top:0;left:0}.u-hz .u-cursor-x,.u-vt .u-cursor-y{border-right:1px dashed #607d8b;height:100%}.u-hz .u-cursor-y,.u-vt .u-cursor-x{border-bottom:1px dashed #607d8b;width:100%}.u-cursor-pt{pointer-events:none;will-change:transform;border:0 solid;border-radius:50%;position:absolute;top:0;left:0;background-clip:padding-box!important}.u-axis.u-off,.u-select.u-off,.u-cursor-x.u-off,.u-cursor-y.u-off,.u-cursor-pt.u-off{display:none}
|
|
2
|
+
/*$vite$:1*/
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type { MultiSeriesData, SeriesConfig, } from "./components/TimeSeriesChart.js";
|
|
2
|
+
export { buildMultiSeriesConfig, safeYRange, TimeSeriesChart, } from "./components/TimeSeriesChart.js";
|
|
3
|
+
export { initDuckDB } from "./db/duckdb.js";
|
|
4
|
+
export { IngestBuffer } from "./db/IngestBuffer.js";
|
|
5
|
+
export type { CompactOptions } from "./db/store.js";
|
|
6
|
+
export { buildCompactDeleteSQL, buildCompactKeepersSQL, buildCreateTableSQL, buildDerivedQuery, buildIncrementalQuery, buildInsertSQL, buildInsertSQLFromRows, COMPACT_DEFAULTS, clearTable, compactTable, createTable, insertPoints, queryDerived, queryDerivedIncremental, } from "./db/store.js";
|
|
7
|
+
export type { UseDuckDBReturn } from "./hooks/useDuckDB.js";
|
|
8
|
+
export { useDuckDB } from "./hooks/useDuckDB.js";
|
|
9
|
+
export type { TimeRange, UseTimeSeriesStoreOptions, UseTimeSeriesStoreReturn, } from "./hooks/useTimeSeriesStore.js";
|
|
10
|
+
export { computeTMin, DISPLAY_MAX_POINTS, useTimeSeriesStore, } from "./hooks/useTimeSeriesStore.js";
|
|
11
|
+
export type { UseTimeSeriesStoreWorkerOptions } from "./hooks/useTimeSeriesStoreWorker.js";
|
|
12
|
+
export { useTimeSeriesStoreWorker } from "./hooks/useTimeSeriesStoreWorker.js";
|
|
13
|
+
export type { ChartDataMap, ColumnDef, ColumnType, DerivedColumn, TableSchema, TimePoint, } from "./types.js";
|
|
14
|
+
export type { AlignedMultiSeries, NamedTimeSeries, } from "./utils/alignTimeSeries.js";
|
|
15
|
+
export { alignTimeSeries } from "./utils/alignTimeSeries.js";
|
|
16
|
+
export { ChartBuffer } from "./utils/ChartBuffer.js";
|
|
17
|
+
export { lowerBound, quantizeChartTime, sliceArrays, upperBound, } from "./utils/chartViewport.js";
|
|
18
|
+
export { mergeChartData, trimChartDataLeft } from "./utils/mergeChartData.js";
|
|
19
|
+
export { ChartDataWorkerClient } from "./worker/chartDataWorkerClient.js";
|
|
20
|
+
export type { RowTuple, WorkerTableSchema } from "./worker/protocol.js";
|