@kymoscope/sdk 0.20.0 → 0.21.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.
- package/dist/assets/importer.worker-jzXF4fDD.js +1040 -0
- package/dist/importer-DhJq-CnQ.js +12 -0
- package/dist/importers-C8Byhb42.js +1036 -0
- package/dist/kymoscope-embed.js +104 -72
- package/dist/kymoscope-sdk.js +86 -86
- package/dist/types/engine/createEngine.d.ts +2 -0
- package/dist/types/engine/types.d.ts +2 -0
- package/dist/types/lib/beacon.d.ts +6 -0
- package/dist/types/lib/importers/ccsds/format.d.ts +2 -0
- package/dist/types/lib/importers/ccsds/frames.d.ts +67 -0
- package/dist/types/lib/importers/ccsds/importer.d.ts +2 -0
- package/dist/types/lib/importers/ccsds/packets.d.ts +49 -0
- package/dist/types/lib/importers/ccsds/xtce.d.ts +79 -0
- package/dist/types/lib/importers/ch10/format.d.ts +10 -0
- package/dist/types/lib/importers/ch10/importer.d.ts +2 -0
- package/dist/types/lib/importers/ch10/packets.d.ts +46 -0
- package/dist/types/lib/importers/ch10/pcm.d.ts +59 -0
- package/dist/types/lib/importers/ch10/tmats.d.ts +93 -0
- package/dist/types/lib/importers/combine.d.ts +2 -1
- package/dist/types/lib/importers/formats.d.ts +2 -0
- package/dist/types/lib/importers/iena/format.d.ts +9 -0
- package/dist/types/lib/importers/iena/importer.d.ts +2 -0
- package/dist/types/lib/importers/iena/layout.d.ts +58 -0
- package/dist/types/lib/importers/iena/pcap.d.ts +48 -0
- package/dist/types/lib/importers/iena/xidml.d.ts +29 -0
- package/dist/types/lib/importers/pqdif/records.d.ts +29 -9
- package/dist/types/lib/importers/table/long.d.ts +7 -0
- package/dist/types/lib/importers/table/table.d.ts +7 -0
- package/dist/types/lib/importers/types.d.ts +7 -1
- package/dist/types/types/loadedDataset.d.ts +4 -0
- package/package.json +3 -1
- package/dist/assets/importer.worker-B4rzpZKn.js +0 -1006
- package/dist/importer-D_Rxf-9b.js +0 -12
- package/dist/importers-D4cCElZQ.js +0 -1004
|
@@ -22,20 +22,32 @@ export interface El {
|
|
|
22
22
|
/** Values in a vector (1 for a scalar). */
|
|
23
23
|
size: number;
|
|
24
24
|
kids: El[];
|
|
25
|
+
/** The value's bytes: a scalar's; a vector's values up to SMALL bytes (larger ones: null until `load`). */
|
|
26
|
+
bytes: Uint8Array | null;
|
|
25
27
|
}
|
|
26
|
-
/**
|
|
27
|
-
export
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
/** Bytes [at, at + length) of a record body. */
|
|
29
|
+
export type Read = (at: number, length: number) => Promise<Uint8Array>;
|
|
30
|
+
/**
|
|
31
|
+
* The element tree of a record body of `size` bytes, read through `read`: collections, scalars and small vectors,
|
|
32
|
+
* never the series values (a body may hold the whole file). Every link stays inside the body, depth ≤ 32,
|
|
33
|
+
* elements ≤ body / 28.
|
|
34
|
+
*/
|
|
35
|
+
export declare function decodeBody(read: Read, size: number): Promise<El[]>;
|
|
36
|
+
/** A vector's values, read now if decoding left them (series values). */
|
|
37
|
+
export declare function load(read: Read, e: El): Promise<Uint8Array>;
|
|
38
|
+
/** A value of physical type `phys` at byte `o` of `v` as a number (NaN for complex, GUID, timestamp). */
|
|
39
|
+
export declare function numAt(v: DataView, phys: number, o: number): number;
|
|
40
|
+
/** Value `i` of a numeric scalar or (loaded) vector as a number (NaN for complex, GUID, timestamp). */
|
|
41
|
+
export declare const num: (e: El, i?: number) => number;
|
|
32
42
|
/** A timestamp scalar or vector value: days since 1900-01-01 (PQDIF's count) and seconds since midnight. */
|
|
33
|
-
export declare const stamp: (
|
|
43
|
+
export declare const stamp: (e: El, i?: number) => [number, number];
|
|
34
44
|
/** Seconds since 1970 of a PQDIF timestamp (the standard's 25569-day offset, as Gemstone reads it). */
|
|
35
45
|
export declare const unixOf: ([days, sec]: [number, number]) => number;
|
|
36
46
|
/** A Char1 / Char2 vector as text, up to its first NUL. */
|
|
37
|
-
export declare function text(
|
|
38
|
-
export declare const guidOf: (
|
|
47
|
+
export declare function text(e: El | undefined): string;
|
|
48
|
+
export declare const guidOf: (e: El | undefined) => string;
|
|
49
|
+
export declare const find: (els: El[] | undefined, tag: string) => El | undefined;
|
|
50
|
+
export declare const findAll: (els: El[] | undefined, tag: string) => El[];
|
|
39
51
|
export interface RecordRef {
|
|
40
52
|
type: string;
|
|
41
53
|
body: number;
|
|
@@ -48,3 +60,11 @@ export interface RecordRef {
|
|
|
48
60
|
export declare function records(io: BlobReader): Promise<RecordRef[]>;
|
|
49
61
|
/** A record's body bytes, inflated when the file compresses each record (zlib). */
|
|
50
62
|
export declare function body(io: BlobReader, r: RecordRef, compressed: boolean): Promise<Uint8Array>;
|
|
63
|
+
/**
|
|
64
|
+
* A record body to decode: inflated whole when compressed (ponytail: as `body`), else read from the file as needed
|
|
65
|
+
* (1 MiB cached pages), so a body holding the file's series values is never read whole.
|
|
66
|
+
*/
|
|
67
|
+
export declare function bodyReader(io: BlobReader, r: RecordRef, compressed: boolean): Promise<{
|
|
68
|
+
read: Read;
|
|
69
|
+
size: number;
|
|
70
|
+
}>;
|
|
@@ -13,9 +13,16 @@ export interface LongScan {
|
|
|
13
13
|
tags: string[];
|
|
14
14
|
units: string[];
|
|
15
15
|
rows: number;
|
|
16
|
+
/** Distinct times: the rows reading makes (sorted tables; an unsorted one says `rows`, an upper bound). */
|
|
17
|
+
times: number;
|
|
16
18
|
sorted: boolean;
|
|
17
19
|
/** The smallest time. */
|
|
18
20
|
start: number;
|
|
21
|
+
/**
|
|
22
|
+
* Rows repeating a (time, tag) already seen (reading keeps the first). ponytail: counted in a sorted table only (the
|
|
23
|
+
* tag's last time); an unsorted one says 0. A set per tag if unsorted files with repeats matter.
|
|
24
|
+
*/
|
|
25
|
+
repeated: number;
|
|
19
26
|
}
|
|
20
27
|
/**
|
|
21
28
|
* The long-form shape of these columns, or null: exactly one time column, one number column and one or two text
|
|
@@ -9,6 +9,11 @@ export interface TableColumn {
|
|
|
9
9
|
kind: TableKind;
|
|
10
10
|
/** A 'time' column of dates (Unix seconds); else seconds of the file's own clock. */
|
|
11
11
|
absolute?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Dates as seconds after this Unix second (set by the first read at the latest): sub-second steps stay exact,
|
|
14
|
+
* which Unix seconds as doubles (~0.2 µs apart today) cannot keep.
|
|
15
|
+
*/
|
|
16
|
+
origin?: number;
|
|
12
17
|
}
|
|
13
18
|
/** Rows of some columns: numbers and times as Float64Array (NaN: empty), text as strings (null: empty). */
|
|
14
19
|
export interface TableBatch {
|
|
@@ -40,5 +45,7 @@ export declare function isoSeconds(s: string): number;
|
|
|
40
45
|
* timestamps), in the viewer's time zone. `asUtc`: that wall clock read as if it were UTC.
|
|
41
46
|
*/
|
|
42
47
|
export declare function wallClock(asUtc: number): number;
|
|
48
|
+
/** Whole seconds a wall clock without a zone is ahead of UTC at this instant (`asUtc` as in `wallClock`). */
|
|
49
|
+
export declare const wallOffset: (asUtc: number) => number;
|
|
43
50
|
/** The first non-empty value of a number or time column (NaN when it has none). */
|
|
44
51
|
export declare function firstValue(t: Table, column: number, signal?: AbortSignal): Promise<number>;
|
|
@@ -138,10 +138,14 @@ export interface DatasetFileInfo {
|
|
|
138
138
|
}[];
|
|
139
139
|
/** What this dataset holds. */
|
|
140
140
|
selection: GroupSelection[];
|
|
141
|
-
/**
|
|
141
|
+
/**
|
|
142
|
+
* Several groups on one time base: how many, the base rate, and whether several groups' timestamps make it
|
|
143
|
+
* (irregular groups joined; absent before 2026-11-25).
|
|
144
|
+
*/
|
|
142
145
|
combined: {
|
|
143
146
|
groups: number;
|
|
144
147
|
rateHz: number | null;
|
|
148
|
+
merged?: boolean;
|
|
145
149
|
} | null;
|
|
146
150
|
/** Datasets split from one file share this key. */
|
|
147
151
|
splitKey: string | null;
|
|
@@ -149,6 +153,8 @@ export interface DatasetFileInfo {
|
|
|
149
153
|
notes: string[];
|
|
150
154
|
meta: Record<string, string>;
|
|
151
155
|
events: FileEvent[];
|
|
156
|
+
/** The dataset's true first rows, when its rows are a reduced sample (out of core). */
|
|
157
|
+
preview?: Record<string, number | string | null>[];
|
|
152
158
|
}
|
|
153
159
|
/** What `chooseChannels` is asked before a large or ambiguous binary file is read. */
|
|
154
160
|
export interface ChannelRequest {
|
|
@@ -36,6 +36,10 @@ export interface LoadedDataset {
|
|
|
36
36
|
fromColumns?: boolean;
|
|
37
37
|
/** Arrays a column was replaced from, reused by the next writeColumns (engine internal). */
|
|
38
38
|
columnSpares?: Map<string, Float64Array>;
|
|
39
|
+
/** Opened as a table from a long-form file (datasets.openAsTable): the importer that reads it as one channel per tag. */
|
|
40
|
+
fromLong?: {
|
|
41
|
+
importer: string;
|
|
42
|
+
};
|
|
39
43
|
/** Beacon lap split; when set, the dataset is shown/selected as its laps. */
|
|
40
44
|
beacon?: BeaconConfig;
|
|
41
45
|
/** Cut into cycles by a rule (datasets.cut): shown and selected as its cycles and their phases, as laps are. Wins over `beacon`. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kymoscope/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.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",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"@foxglove/rosmsg2-serialization": "3.1.2",
|
|
46
46
|
"@mcap/core": "2.4.0",
|
|
47
47
|
"@msgpack/msgpack": "^3.1.3",
|
|
48
|
+
"@types/js-yaml": "4.0.9",
|
|
48
49
|
"apache-arrow": "17.0.0",
|
|
49
50
|
"delaunator": "^5.1.0",
|
|
50
51
|
"fflate": "^0.8.3",
|
|
@@ -52,6 +53,7 @@
|
|
|
52
53
|
"h5wasm": "0.10.3",
|
|
53
54
|
"hyparquet": "1.33.1",
|
|
54
55
|
"hyparquet-compressors": "1.1.3",
|
|
56
|
+
"js-yaml": "4.1.1",
|
|
55
57
|
"mathjs": "^15.2.0"
|
|
56
58
|
},
|
|
57
59
|
"scripts": {
|