@kymoscope/sdk 0.21.0 → 0.23.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.
@@ -92,3 +92,17 @@ export declare const REVIEW_ACTIONS = 5, REVIEW_SUMMARY = 3;
92
92
  * sentences citing findings or results. Every number written must be in what it rests on (an action: its own text and
93
93
  * what it cites; a reason: any finding or result). Malformed input never throws. */
94
94
  export declare function checkReview(input: ReviewCheckInput, ai: unknown): ReviewChecked;
95
+ /** A sentence of a handover or of an answer to a question, as checked: kept even when it fails, marked unverified. */
96
+ export interface CitedSentence extends AiSentence {
97
+ verified: boolean;
98
+ }
99
+ /** Most characters of a cited sentence kept (a longer one is cut, and unverified). */
100
+ export declare const CITED_CHARS = 600;
101
+ /** Sentences that each cite the items they rest on (`items`: an id and the item's text, usually its JSON): verified
102
+ * when the sentence cites at least one item, every cite exists, it fits the sentence caps and states no number its
103
+ * cited items don't (an item's negative number also counts unsigned). A sentence that fails is kept with `verified`
104
+ * false, so the reader sees it marked; one with no text is dropped. At most `max`. Malformed input never throws. */
105
+ export declare function checkCited(sentences: unknown, items: Array<{
106
+ id: string;
107
+ text: string;
108
+ }>, max: number): CitedSentence[];
@@ -3,7 +3,7 @@
3
3
  * namespace, plus the few names the app's viewer and PDF use. */
4
4
  export { buildReport, listedFindings, viewSections } from './report';
5
5
  export { AI_NOTE, AI_SENTENCES, AI_WORDS, aiInput, applyAi, type AiInput, type AiSentence, type AiText } from './ai';
6
- export { checkReview, type ReviewChecked } from './aiCheck';
6
+ export { checkCited, checkReview, type CitedSentence, type ReviewChecked } from './aiCheck';
7
7
  export { KNOWN_GROWTH, KNOWN_MAX, KNOWN_REASONS, KNOWN_REASON_TEXT, applyKnown, findingSignature, grew, type KnownFinding, type KnownReason } from './known';
8
8
  export { REVIEW_CHECKS, applyReview, parseChecks, reviewPack, runChecks, type Check, type CheckResult, type ReportReview, type ReviewPack, type ReviewVerdict } from './review';
9
9
  export { CHANNEL_ROLES, CHANNEL_ROLE_TEXT, PROCESS_MAX, completeness, confirmAll, confirmed, contextGaps, moneyGaps, emptyChannel, emptyContext, energyChannel, parseContext, roleOf, shiftOf, stopSpans, suggestedCount, type PlannedStop, type ChannelContext, type ChannelRole, type ContextGap, type ProcessContext, type Shift, } from './context';
@@ -17,7 +17,7 @@ export interface Preset {
17
17
  roles: Partial<Record<SectionId, ReportRole[]>>;
18
18
  /** The report's words in this industry, lower case, whole words or phrases ("batches" → "parts"). */
19
19
  terms: Record<string, string>;
20
- /** A regulated industry (pharma, food): a project that takes this style starts with AI writing off (a lead can turn it on). */
20
+ /** A regulated industry (pharma, food): reports in this style are worded from the fixed templates, never by the AI. */
21
21
  regulated?: true;
22
22
  }
23
23
  export declare const PRESETS: Record<PresetId, Preset>;
@@ -13,13 +13,15 @@ interface Props {
13
13
  marks?: ChartMark[];
14
14
  /** A press on a mark's top strip: its rule id. */
15
15
  onMarkSelect?: (ruleId: string) => void;
16
+ /** The rule singled out (engine.marks.focus): its spans stand out with its name, the others dim. */
17
+ markFocus?: string | null;
16
18
  }
17
19
  type Pt = [number, number];
18
20
  /** Elements outside the chart marked with this attribute keep the selection when pressed (a host's style controls). */
19
21
  export declare const ANNOTATION_CONTROLS_ATTR = "data-kymo-annotation-controls";
20
22
  /** Pixel positions of an annotation's points (null: pinned to X on a chart without an X frame now). */
21
23
  export declare function annotationPx(a: ChartAnnotation, W: number, H: number, frame: PlotFrame | null): Pt[] | null;
22
- export declare const AnnotationLayer: import("react").MemoExoticComponent<({ annotations, tool, plotFrame, onChange, onToolEnd, onSelect, marks: alertList, onMarkSelect }: Props) => import("react/jsx-runtime").JSX.Element>;
24
+ export declare const AnnotationLayer: import("react").MemoExoticComponent<({ annotations, tool, plotFrame, onChange, onToolEnd, onSelect, marks: alertList, onMarkSelect, markFocus }: Props) => import("react/jsx-runtime").JSX.Element>;
23
25
  /** A smooth path through the stroke's points (quadratic curves through the midpoints). */
24
26
  export declare function brushPath(px: Pt[]): string;
25
27
  /** Head of an arrow ending at (x1, y1): its outline and where the shaft should stop. */
@@ -9,6 +9,7 @@ import { type PanelChartSettings } from '../lib/panelChartSettings';
9
9
  import { type XYZMeshChartHandle } from '../components/XYZMeshChart';
10
10
  import { type CameraCursor, type CameraRecording } from './CameraPanel';
11
11
  import type { VideoSource } from '../lib/live/videoTrack';
12
+ import { chosenColumns } from '../lib/panelChartSettings';
12
13
  import type { LiveZoomBus } from '../lib/render/liveZoomBus';
13
14
  import { type WorksheetData } from './useWorksheetData';
14
15
  import type { LiveConnection } from '../lib/live/types';
@@ -63,7 +64,7 @@ export interface ChartBodyProps {
63
64
  * from a time column, and what `view.data()` returns); the picture no longer waits for that.
64
65
  */
65
66
  export declare function spectrogramPullsLive(settings: PanelChartSettings | undefined, loneLive: boolean): boolean;
66
- export declare function chosenColumns(settings: PanelChartSettings | undefined): string[];
67
+ export { chosenColumns };
67
68
  /** Renders the chart and reports whether it had anything to draw: an empty chart whose chosen
68
69
  * channels aren't all in this data says so ('missing'), the same for every kind. */
69
70
  export declare function renderChart(p: ChartBodyProps): {
@@ -2,6 +2,7 @@ import { type KymoscopeEngine } from '../engine/createEngine';
2
2
  import { type ChartStatus, type ContextMenuEvent } from './ChartBody';
3
3
  import { type AnnotationTool, type ChartAnnotation } from '../lib/annotations';
4
4
  import type { ChartMark } from '../engine/alerts';
5
+ import { type PanelChartSettings } from '../lib/panelChartSettings';
5
6
  import { type PlotFrame } from '../lib/render/plotFrame';
6
7
  export interface ChartStyle {
7
8
  /** Plot background (overrides the chart's own background setting). */
@@ -69,6 +70,10 @@ export declare function disposeCharts(engine: KymoscopeEngine): void;
69
70
  * The alert marks a chart shows: those of a plotted dataset or stream whose rule ran on the chart's X key (D6: a chart
70
71
  * on another axis has no time relation). Memoised on its inputs so charts don't redraw for nothing.
71
72
  */
73
+ /** The column a chart's X axis plots, for its alert marks: the worksheet's X on a multiband, the X column on an
74
+ * X-Y scatter; '' on charts whose X is no column (spectrum frequency, histogram bins, categories…). */
75
+ export declare function chartTimeX(settings: PanelChartSettings | undefined, worksheetX: string): string;
72
76
  export declare const chartMarks: (a: ChartMark[], b: string[], c: string) => ChartMark[];
77
+ export declare function marksForChart(marks: ChartMark[], settings: PanelChartSettings | undefined): ChartMark[];
73
78
  /** What PNG export paints: the alert marks (under) and the chart's annotations; open marks end at the plot's edge. */
74
79
  export declare function exportNotes(notes: ChartAnnotation[], marks: ChartMark[], frame: PlotFrame | null): ChartAnnotation[];
@@ -0,0 +1 @@
1
+ export declare function attachTouchGestures(root: HTMLElement): () => void;
@@ -28,6 +28,12 @@ import type { GanttTask } from '../components/GanttChart';
28
28
  import { type XYColumns } from '../lib/data/xyColumns';
29
29
  import { type Dataset, type DatasetRow } from '../lib/parseDataset';
30
30
  import type { DuckDbLayerSpec } from '../components/DuckDbMultiBandPanel';
31
+ /** The first plotted source that has `col`, as a column of its own or a math channel it evaluates (`okByPart`). */
32
+ export declare function firstWithColumn(sources: {
33
+ data: {
34
+ columnNames: string[];
35
+ };
36
+ }[], okByPart: string[][] | undefined, col: string): number;
31
37
  export interface WorksheetDataInput {
32
38
  worksheet: Worksheet;
33
39
  viewXRange: [number, number] | null;
@@ -104,6 +110,7 @@ export declare function useWorksheetData(input: WorksheetDataInput): {
104
110
  spectrogramDataByPanel: Record<string, {
105
111
  signal: Float64Array;
106
112
  rate: number;
113
+ times?: Float64Array;
107
114
  }>;
108
115
  heatmapDataByPanel: Record<string, {
109
116
  cells: HeatmapCell[];
@@ -12,4 +12,6 @@ export interface HistogramChartProps {
12
12
  clientY: number;
13
13
  }) => void;
14
14
  }
15
+ /** Y tick values, in counts: 1, 10, 100… up to yMax on a log axis (yMax is in decades there), else nice steps. */
16
+ export declare function histogramYTicks(maxCount: number, yMax: number, logY: boolean): number[];
15
17
  export declare function HistogramChart({ values, label, bins: binsProp, color, showNormal, logY, height, backgroundToken, onPlotContextMenu, }: HistogramChartProps): import("react/jsx-runtime").JSX.Element;
@@ -2,6 +2,11 @@ import type { AxisLineStyle } from '../lib/panelChartSettings';
2
2
  import type { PlotSeries } from '../types/plotSeries';
3
3
  import { type PointColumns } from '../lib/data/pointColumns';
4
4
  import type { LiveZoomBus } from '../lib/render/liveZoomBus';
5
+ /** For each column, the first layer (by index) that has a value of it. Each dataset (a cut's cycles: hundreds) is a
6
+ * layer with column keys of its own, so this is one pass over the layers' own columns, not layers × series. */
7
+ export declare function firstLayerOfColumns(layerColumns: Iterable<string>[], has: (layer: number, column: string) => boolean): Map<string, number>;
8
+ /** The series one layer draws, as indexes into the series in their order: `byColumn` maps a column to its series. */
9
+ export declare function layerSeries(columns: Iterable<string>, byColumn: Map<string, number[]>, has: (column: string) => boolean): number[];
5
10
  /**
6
11
  * A live feed the chart pulls straight from, every animation frame, on its own
7
12
  * rAF loop — bypassing React entirely so incoming samples never re-render the app
@@ -52,6 +57,28 @@ export interface LiveChartSource {
52
57
  /** The stream's id: charts showing the same stream share one playout (see streamPlayout), so they show one instant. */
53
58
  id?: string;
54
59
  }
60
+ interface LegendGroup {
61
+ /** Display name (base channel name, `__N` stripped). */
62
+ base: string;
63
+ /** First member — determines band position and anchor. */
64
+ leader: PlotSeries;
65
+ /** All members in their original series order. */
66
+ members: PlotSeries[];
67
+ }
68
+ /**
69
+ * Which series draw a Y axis column: one per distinct band + scale. Legend groups (the same channel of several
70
+ * datasets) draw their leader's; other series on the same band with the same scale and ticks (same unit, same
71
+ * scale) share the first one's axis. `shared`: every series whose axis column stands for more than one series.
72
+ */
73
+ /**
74
+ * Where a band's tick label sits on its tick: one at a band edge that touches another band is drawn inside its own
75
+ * band (above a bottom edge, below a top edge), so it never lands on the next band's label ("0" over "150").
76
+ */
77
+ export declare function bandTickBaseline(y: number, bandTop: number, bandBottom: number, plotTop: number, plotBottom: number): CanvasTextBaseline;
78
+ export declare function axisLeaders(groups: Pick<LegendGroup, 'leader'>[]): {
79
+ leaders: Set<string>;
80
+ shared: Set<string>;
81
+ };
55
82
  /**
56
83
  * Per-series X gap threshold: consecutive valid points farther apart than this
57
84
  * are not joined by a line. Derived from the series' OWN mean spacing so a
@@ -164,3 +191,4 @@ export interface MultiBandCanvasChartProps {
164
191
  onCursorX?: (x: number | null) => void;
165
192
  }
166
193
  export declare function MultiBandCanvasChart({ xLabel, series, points, columnUnits, height, onPlotContextMenu, backgroundToken, viewXRange, onViewXRangeChange, liveZoom, liveZoomId, fullXRange, shiftMode, xAxisLine, yAxisLine, gridLine, lineWidth, envelopes, showLatestValues, liveSource, liveWindowSeconds, onLiveWindowChange, liveZoomMode, onPlotWidthCss, onCursorX, }: MultiBandCanvasChartProps): import("react/jsx-runtime").JSX.Element;
194
+ export {};
@@ -6,6 +6,9 @@ export interface SpectrogramChartProps {
6
6
  winFunc?: 'hann' | 'rectangular';
7
7
  yMode?: 'amplitude' | 'db';
8
8
  logFreq?: boolean;
9
+ /** The time of each sample of `signal`, ascending: the time axis reads them, so a signal recorded at several rates
10
+ * (a recorder's fast window in a slow track) reads in its file's seconds. Omitted: samples / sampleRate from 0. */
11
+ times?: ArrayLike<number>;
9
12
  label?: string;
10
13
  backgroundToken?: string;
11
14
  onPlotContextMenu?: (e: {
@@ -36,4 +39,19 @@ export interface SpectrogramLive {
36
39
  /** Seconds shown, ending now (the worksheet's live window); null: everything buffered. */
37
40
  windowSeconds: number | null;
38
41
  }
39
- export declare function SpectrogramChart({ signal, sampleRate, windowSize, overlap, winFunc, yMode, logFreq, label, backgroundToken, onPlotContextMenu, live, }: SpectrogramChartProps): import("react/jsx-runtime").JSX.Element;
42
+ /**
43
+ * The time axis over `n` samples: its ends, and where (0..1 of the width) a time sits. With the samples' times the
44
+ * columns stay one per window (the picture is in samples), so a time is placed at its sample: a slow stretch of a
45
+ * multi-rate signal is narrow, a fast one wide. Without them the axis is linear from `t0` to `t1`.
46
+ */
47
+ export declare function timeAxis(times: ArrayLike<number> | null | undefined, n: number, t0: number, t1: number): {
48
+ t0: number;
49
+ t1: number;
50
+ at: (t: number) => number;
51
+ };
52
+ /** Display height (0..1) of a frequency on the log axis, and back: decades from `min` (the first bin above DC) to
53
+ * `max` (Nyquist), as the spectrum's log axis. */
54
+ export declare const logFreqY: (f: number, min: number, max: number) => number;
55
+ /** Ticks of the log frequency axis: 1, 2 and 5 of each decade in [min, max]. */
56
+ export declare function logFreqTicks(min: number, max: number): number[];
57
+ export declare function SpectrogramChart({ signal, sampleRate, windowSize, overlap, winFunc, yMode, logFreq, times, label, backgroundToken, onPlotContextMenu, live, }: SpectrogramChartProps): import("react/jsx-runtime").JSX.Element;
@@ -36,13 +36,16 @@ export declare function rectsOverlap(a: DashboardGridRect, b: DashboardGridRect)
36
36
  export declare function clampRectForKind(kind: DashboardPanelKind, r: DashboardGridRect, cols: number, rows?: number): DashboardGridRect;
37
37
  /**
38
38
  * A chart's grid rectangle after a pointer drag of (dxPx, dyPx) on a board of
39
- * `board` CSS pixels: 'move' shifts it, 'resize' moves its bottom-right corner.
39
+ * `board` CSS pixels: 'move' shifts it; 'resize' moves its bottom-right corner,
40
+ * and an edge or corner ('n', 'e', 's', 'w', 'ne', 'nw', 'se', 'sw') moves that
41
+ * one, the opposite side staying put.
40
42
  * The result stays on the grid and never shrinks below the kind's minimum; a
41
43
  * move past an edge trims the chart rather than stopping it. Call
42
44
  * it on pointermove with the rectangle from pointerdown, then store the result
43
45
  * with `charts.setLayout`.
44
46
  */
45
- export declare function dragLayout(kind: DashboardPanelKind, start: DashboardGridRect, mode: 'move' | 'resize', dxPx: number, dyPx: number, board: {
47
+ export type ResizeEdge = 'n' | 'e' | 's' | 'w' | 'ne' | 'nw' | 'se' | 'sw';
48
+ export declare function dragLayout(kind: DashboardPanelKind, start: DashboardGridRect, mode: 'move' | 'resize' | ResizeEdge, dxPx: number, dyPx: number, board: {
46
49
  width: number;
47
50
  height: number;
48
51
  }, cols?: number, rows?: number): DashboardGridRect;
@@ -14,6 +14,12 @@
14
14
  /** Ed25519 public keys (raw, base64url) by key id. "1" is the original key; a key without `kid` uses "1".
15
15
  * To rotate: add the next key here, release the SDK, then switch the server's signing key and kid. */
16
16
  export declare const KYMOSCOPE_LICENSE_PUBLIC_KEYS: Record<string, string>;
17
+ /** Kymoscope Site root public keys (raw, base64url) by kid: an on-site SDK licence carries `chain`, a site licence
18
+ * that ends at one of these and certifies the site key that signed it. r1: the production root (its private half is
19
+ * offline with the founder). */
20
+ export declare const KYMOSCOPE_SITE_ROOT_KEYS: Record<string, string>;
21
+ /** The warning days after a site licence's exp, before the install is read-only (and its SDK keys expire). */
22
+ export declare const SITE_GRACE_SEC: number;
17
23
  export type LicenseResult = {
18
24
  ok: true;
19
25
  sub: string;
@@ -24,6 +30,30 @@ export type LicenseResult = {
24
30
  };
25
31
  /** Verify against explicit public keys (by kid, or a single key used for every kid) and clock.
26
32
  * Internal: tests use it with their own keypair. */
27
- export declare function verifyLicenseWith(key: string | undefined | null, hostname: string, publicKeys: Record<string, string> | string, nowSec: number): Promise<LicenseResult>;
33
+ export declare function verifyLicenseWith(key: string | undefined | null, hostname: string, publicKeys: Record<string, string> | string, nowSec: number, siteRootKeys?: Readonly<Record<string, string>>): Promise<LicenseResult>;
28
34
  /** Check a Kymoscope license key for `hostname` (usually `location.hostname`). */
29
35
  export declare function verifyLicense(key: string | undefined | null, hostname: string): Promise<LicenseResult>;
36
+ export interface SiteLicense {
37
+ lic: string;
38
+ org: string;
39
+ plan: 'team' | 'enterprise';
40
+ mod: Record<string, unknown>;
41
+ seats: number;
42
+ site_pub: string;
43
+ exp: number;
44
+ /** Host names the install serves (exact or `*.x`); the site key signs SDK licences only within them. Absent in
45
+ * licences signed before `hosts` existed: then only intranet names (a transition rule). */
46
+ hosts?: string[];
47
+ }
48
+ export type SiteLicenseResult = {
49
+ ok: true;
50
+ licence: SiteLicense;
51
+ } | {
52
+ ok: false;
53
+ reason: 'malformed' | 'bad_signature' | 'expired' | 'issuer_scope';
54
+ };
55
+ /** Verify a site licence chain to the root (never throws). `ignoreExp` accepts a lapsed licence (a read-only
56
+ * install still signs entitlement tokens under it). */
57
+ export declare function verifySiteLicense(token: unknown, nowSec: number, rootKeys?: Readonly<Record<string, string>>, opts?: {
58
+ ignoreExp?: boolean;
59
+ }): Promise<SiteLicenseResult>;
@@ -13,7 +13,12 @@ export interface ChartMark {
13
13
  t1: number | null;
14
14
  /** From backlog data evaluated after it arrived late (alerts phase 2, D6). */
15
15
  late?: boolean;
16
+ /** The channels its rule reads (a formula: its math channel). Only charts plotting one of them draw the mark;
17
+ * absent or empty: every time chart of the target. */
18
+ channels?: string[];
16
19
  }
20
+ /** The channel names a rule reads (a formula signal: its math channel's name). */
21
+ export declare function ruleChannels(r: RuleDoc): string[];
17
22
  export interface RuleStateInfo {
18
23
  ruleId: string;
19
24
  target: RuleTarget;
@@ -65,6 +65,8 @@ export interface InternalState {
65
65
  licensed: boolean | null;
66
66
  history: EngineState['history'];
67
67
  marks: ChartMark[];
68
+ /** The rule whose marks are singled out (engine.marks.focus): its spans stand out, the others dim. */
69
+ markFocus: string | null;
68
70
  alerts: RuleStateInfo[];
69
71
  /** The rules in force (engine.alerts.rules()), here so a new set re-renders the lines linked to them. */
70
72
  alertRules: RuleDoc[];
@@ -498,6 +500,8 @@ export declare function createEngine(options?: EngineOptions): {
498
500
  /** Read-only spans on the charts from alert episodes (never stored in chart settings). */
499
501
  marks: {
500
502
  list: () => ChartMark[];
503
+ /** Single out one rule's marks on the charts (its spans stand out with its name, the others dim); null: none. */
504
+ focus: (ruleId: string | null) => void;
501
505
  };
502
506
  dispose(): void;
503
507
  };
@@ -231,6 +231,8 @@ export interface EngineState {
231
231
  };
232
232
  /** Read-only spans from alert rule episodes (engine.alerts), drawn on time charts. */
233
233
  marks: ChartMark[];
234
+ /** The rule singled out on the charts (engine.marks.focus), or null. */
235
+ markFocus: string | null;
234
236
  /** Per rule and open target: waiting (with the missing channel names), idle, pending, active, clearing… */
235
237
  alerts: RuleStateInfo[];
236
238
  }
@@ -20,6 +20,8 @@ export type { ChartKindInfo } from './engine/kinds';
20
20
  export type { ColumnsInput } from './engine/columns';
21
21
  export { verifyLicense } from './embed/license';
22
22
  export type { LicenseResult } from './embed/license';
23
+ export { verifySiteLicense, KYMOSCOPE_SITE_ROOT_KEYS } from './embed/license';
24
+ export type { SiteLicense, SiteLicenseResult } from './embed/license';
23
25
  export type { ChartView, ChartViewEvents, MountOptions, ChartStyle } from './charts/runtime';
24
26
  export type { ChartWindow, ChartWindowOptions, WindowPlacement } from './charts/chartWindow';
25
27
  export type { ChartStatus, ContextMenuEvent } from './charts/ChartBody';
@@ -30,7 +32,7 @@ export { ANNOTATION_CONTROLS_ATTR } from './charts/AnnotationLayer';
30
32
  export { colorAt, colorsCss, presetStops, type GaugeColorMode, type GaugeColorStop, type GaugePreset } from './lib/gaugeColors';
31
33
  export type { PlotSeries, AlarmLine, AlarmStyle } from './types/plotSeries';
32
34
  export { newSeriesId, clampPct } from './types/plotSeries';
33
- export type { DashboardPanel, DashboardPanelKind } from './components/dashboardGridLayout';
35
+ export type { DashboardPanel, DashboardPanelKind, ResizeEdge } from './components/dashboardGridLayout';
34
36
  export { DASHBOARD_GRID_COLS, DASHBOARD_GRID_ROWS, DASHBOARD_GRID_GAP_PX, MIN_PANEL_W, MIN_PANEL_H, clampRectForKind, dragLayout, newPanel, arrangeAutoLayout } from './components/dashboardGridLayout';
35
37
  export type { Worksheet } from './lib/savedLayout';
36
38
  export { DEFAULT_XY_POINT_RADIUS, DEFAULT_XYZ_POINT_RADIUS } from './lib/savedLayout';
@@ -26,6 +26,12 @@ export declare function xyPointAt(cols: XYColumns, i: number): XYPoint;
26
26
  export declare function rowsColumn(rows: DatasetRow[], name: string, full?: ReadonlyMap<string, Float64Array>): Float64Array | undefined;
27
27
  /** The finite values of a column, in order: the column itself when it has none missing. */
28
28
  export declare function finiteValues(rows: DatasetRow[], name: string, full?: ReadonlyMap<string, Float64Array>): Float64Array | undefined;
29
+ /** The finite values of a column and the time of each (from `timeCol`); undefined without that time column, or when
30
+ * a time is missing where a value is not. */
31
+ export declare function finiteWithTimes(rows: DatasetRow[], name: string, timeCol: string, full?: ReadonlyMap<string, Float64Array>): {
32
+ signal: Float64Array;
33
+ times: Float64Array;
34
+ } | undefined;
29
35
  /**
30
36
  * The finite values of `valueCol` split by the value of `groupCol`, groups in
31
37
  * order of first appearance (label 'unknown' for a missing group); without a
@@ -65,7 +71,8 @@ export declare function buildXyColumns(src: XySource, xCol: string, yCol: string
65
71
  max: number;
66
72
  };
67
73
  } | null;
68
- /** Several datasets on one scatter, each point carrying its dataset index and colour. */
74
+ /** Several datasets on one scatter, each point carrying its dataset index and colour. Only the datasets on the
75
+ * worksheet's X (`xKey`), as on its multiband charts: another file plotted beside them is not on this worksheet. */
69
76
  export declare function buildMultiDatasetXyColumns(sources: XySource[], xCol: string, yCol: string, opts: {
70
77
  xKey: string;
71
78
  viewXRange: [number, number] | null;
@@ -478,3 +478,5 @@ export declare function ensurePanelSettingsForPanels(panels: {
478
478
  id: string;
479
479
  kind: string;
480
480
  }[], current: Record<string, PanelChartSettings>, defaultXyColor: string, defaultXyzRadius: number): Record<string, PanelChartSettings>;
481
+ /** Every column a chart's settings pick (series, slots, lists); helper fields such as the multiband's add picker don't count. */
482
+ export declare function chosenColumns(settings: PanelChartSettings | undefined): string[];
@@ -52,6 +52,8 @@ export interface OffscreenChartRenderer {
52
52
  export declare function glWorkersAvailable(): boolean;
53
53
  /** Name of the performance mark made when a worker has drawn a canvas's first picture. */
54
54
  export declare const GL_FIRST_FRAME_MARK = "kymoscope-gl-first-frame";
55
+ /** True once `canvas`'s control went to a worker (getContext and a second transfer would throw). */
56
+ export declare function canvasTransferred(canvas: HTMLCanvasElement | null): boolean;
55
57
  export declare function createOffscreenChartRenderer(canvas: HTMLCanvasElement, lineWidth?: number,
56
58
  /** Its context was lost (Chrome dropped it): the caller makes a new canvas and renderer. */
57
59
  onLost?: () => void,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kymoscope/sdk",
3
- "version": "0.21.0",
3
+ "version": "0.23.0",
4
4
  "description": "The Kymoscope data engine and charts for the browser: import large measurement files, plot them, stream live data end-to-end encrypted.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "homepage": "https://kymoscope.com/docs/introduction",