juxscript 1.1.239 → 1.1.243
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/index.js +7 -137
- package/lib/components/dataframe.ts +0 -569
- package/lib/components/tag.ts +68 -0
- package/lib/styles/shadcn.css +20 -7
- package/lib/utils/idgen.ts +6 -0
- package/package.json +5 -6
- package/index.d.ts +0 -239
- package/index.d.ts.map +0 -1
- package/lib/components/alert.d.ts +0 -36
- package/lib/components/alert.d.ts.map +0 -1
- package/lib/components/alert.js +0 -172
- package/lib/components/alert.ts +0 -219
- package/lib/components/app.d.ts +0 -89
- package/lib/components/app.d.ts.map +0 -1
- package/lib/components/app.js +0 -175
- package/lib/components/app.ts +0 -247
- package/lib/components/badge.d.ts +0 -26
- package/lib/components/badge.d.ts.map +0 -1
- package/lib/components/badge.js +0 -91
- package/lib/components/badge.ts +0 -118
- package/lib/components/base/Animations.d.ts +0 -36
- package/lib/components/base/Animations.d.ts.map +0 -1
- package/lib/components/base/Animations.js +0 -70
- package/lib/components/base/Animations.ts +0 -112
- package/lib/components/base/BaseComponent.d.ts +0 -294
- package/lib/components/base/BaseComponent.d.ts.map +0 -1
- package/lib/components/base/BaseComponent.js +0 -735
- package/lib/components/base/BaseComponent.ts +0 -884
- package/lib/components/base/FormInput.d.ts +0 -77
- package/lib/components/base/FormInput.d.ts.map +0 -1
- package/lib/components/base/FormInput.js +0 -171
- package/lib/components/base/FormInput.ts +0 -237
- package/lib/components/blueprint.d.ts +0 -40
- package/lib/components/blueprint.d.ts.map +0 -1
- package/lib/components/blueprint.js +0 -327
- package/lib/components/button.d.ts +0 -70
- package/lib/components/button.d.ts.map +0 -1
- package/lib/components/button.js +0 -177
- package/lib/components/button.ts +0 -237
- package/lib/components/card.d.ts +0 -35
- package/lib/components/card.d.ts.map +0 -1
- package/lib/components/card.js +0 -130
- package/lib/components/card.ts +0 -177
- package/lib/components/chart.d.ts +0 -49
- package/lib/components/chart.d.ts.map +0 -1
- package/lib/components/chart.js +0 -205
- package/lib/components/chart.ts +0 -254
- package/lib/components/checkbox.d.ts +0 -33
- package/lib/components/checkbox.d.ts.map +0 -1
- package/lib/components/checkbox.js +0 -202
- package/lib/components/checkbox.ts +0 -260
- package/lib/components/code.d.ts +0 -52
- package/lib/components/code.d.ts.map +0 -1
- package/lib/components/code.js +0 -201
- package/lib/components/code.ts +0 -260
- package/lib/components/container.d.ts +0 -60
- package/lib/components/container.d.ts.map +0 -1
- package/lib/components/container.js +0 -195
- package/lib/components/container.ts +0 -259
- package/lib/components/data.d.ts +0 -36
- package/lib/components/data.d.ts.map +0 -1
- package/lib/components/data.js +0 -110
- package/lib/components/data.ts +0 -135
- package/lib/components/dataframe/DataFrameSource.d.ts +0 -118
- package/lib/components/dataframe/DataFrameSource.d.ts.map +0 -1
- package/lib/components/dataframe/DataFrameSource.js +0 -421
- package/lib/components/dataframe/DataFrameSource.ts +0 -532
- package/lib/components/dataframe/ImportSettingsModal.d.ts +0 -60
- package/lib/components/dataframe/ImportSettingsModal.d.ts.map +0 -1
- package/lib/components/dataframe/ImportSettingsModal.js +0 -442
- package/lib/components/dataframe/ImportSettingsModal.ts +0 -531
- package/lib/components/dataframe.d.ts +0 -110
- package/lib/components/dataframe.d.ts.map +0 -1
- package/lib/components/dataframe.js +0 -470
- package/lib/components/datepicker.d.ts +0 -40
- package/lib/components/datepicker.d.ts.map +0 -1
- package/lib/components/datepicker.js +0 -193
- package/lib/components/datepicker.ts +0 -251
- package/lib/components/dialog.d.ts +0 -39
- package/lib/components/dialog.d.ts.map +0 -1
- package/lib/components/dialog.js +0 -131
- package/lib/components/dialog.ts +0 -178
- package/lib/components/divider.d.ts +0 -31
- package/lib/components/divider.d.ts.map +0 -1
- package/lib/components/divider.js +0 -72
- package/lib/components/divider.ts +0 -104
- package/lib/components/dropdown-menu.d.ts +0 -42
- package/lib/components/dropdown-menu.d.ts.map +0 -1
- package/lib/components/dropdown-menu.js +0 -177
- package/lib/components/dropdown-menu.ts +0 -214
- package/lib/components/dropdown.d.ts +0 -41
- package/lib/components/dropdown.d.ts.map +0 -1
- package/lib/components/dropdown.js +0 -136
- package/lib/components/dropdown.ts +0 -188
- package/lib/components/element.d.ts +0 -51
- package/lib/components/element.d.ts.map +0 -1
- package/lib/components/element.js +0 -209
- package/lib/components/element.ts +0 -271
- package/lib/components/event-chain.d.ts +0 -9
- package/lib/components/event-chain.d.ts.map +0 -1
- package/lib/components/event-chain.js +0 -33
- package/lib/components/fileupload.d.ts +0 -98
- package/lib/components/fileupload.d.ts.map +0 -1
- package/lib/components/fileupload.js +0 -351
- package/lib/components/fileupload.ts +0 -449
- package/lib/components/grid.d.ts +0 -88
- package/lib/components/grid.d.ts.map +0 -1
- package/lib/components/grid.js +0 -208
- package/lib/components/grid.ts +0 -295
- package/lib/components/heading.d.ts +0 -25
- package/lib/components/heading.d.ts.map +0 -1
- package/lib/components/heading.js +0 -83
- package/lib/components/heading.ts +0 -113
- package/lib/components/helpers.d.ts +0 -9
- package/lib/components/helpers.d.ts.map +0 -1
- package/lib/components/helpers.js +0 -30
- package/lib/components/helpers.ts +0 -41
- package/lib/components/hero.d.ts +0 -60
- package/lib/components/hero.d.ts.map +0 -1
- package/lib/components/hero.js +0 -239
- package/lib/components/hero.ts +0 -302
- package/lib/components/history/StateHistory.d.ts +0 -91
- package/lib/components/history/StateHistory.d.ts.map +0 -1
- package/lib/components/history/StateHistory.js +0 -154
- package/lib/components/history/StateHistory.ts +0 -200
- package/lib/components/icon.d.ts +0 -36
- package/lib/components/icon.d.ts.map +0 -1
- package/lib/components/icon.js +0 -135
- package/lib/components/icon.ts +0 -182
- package/lib/components/icons.d.ts +0 -25
- package/lib/components/icons.d.ts.map +0 -1
- package/lib/components/icons.js +0 -440
- package/lib/components/icons.ts +0 -464
- package/lib/components/image.d.ts +0 -42
- package/lib/components/image.d.ts.map +0 -1
- package/lib/components/image.js +0 -204
- package/lib/components/image.ts +0 -260
- package/lib/components/include.d.ts +0 -86
- package/lib/components/include.d.ts.map +0 -1
- package/lib/components/include.js +0 -238
- package/lib/components/include.ts +0 -281
- package/lib/components/input.d.ts +0 -85
- package/lib/components/input.d.ts.map +0 -1
- package/lib/components/input.js +0 -362
- package/lib/components/input.ts +0 -473
- package/lib/components/layer.d.ts +0 -72
- package/lib/components/layer.d.ts.map +0 -1
- package/lib/components/layer.js +0 -219
- package/lib/components/layer.ts +0 -304
- package/lib/components/link.d.ts +0 -41
- package/lib/components/link.d.ts.map +0 -1
- package/lib/components/link.js +0 -216
- package/lib/components/link.ts +0 -268
- package/lib/components/list.d.ts +0 -83
- package/lib/components/list.d.ts.map +0 -1
- package/lib/components/list.js +0 -314
- package/lib/components/list.ts +0 -423
- package/lib/components/loading.d.ts +0 -25
- package/lib/components/loading.d.ts.map +0 -1
- package/lib/components/loading.js +0 -76
- package/lib/components/loading.ts +0 -104
- package/lib/components/menu.d.ts +0 -38
- package/lib/components/menu.d.ts.map +0 -1
- package/lib/components/menu.js +0 -205
- package/lib/components/menu.ts +0 -279
- package/lib/components/modal.d.ts +0 -97
- package/lib/components/modal.d.ts.map +0 -1
- package/lib/components/modal.js +0 -463
- package/lib/components/modal.ts +0 -576
- package/lib/components/nav.d.ts +0 -46
- package/lib/components/nav.d.ts.map +0 -1
- package/lib/components/nav.js +0 -193
- package/lib/components/nav.ts +0 -261
- package/lib/components/paragraph.d.ts +0 -30
- package/lib/components/paragraph.d.ts.map +0 -1
- package/lib/components/paragraph.js +0 -93
- package/lib/components/paragraph.ts +0 -123
- package/lib/components/pen.d.ts +0 -125
- package/lib/components/pen.d.ts.map +0 -1
- package/lib/components/pen.js +0 -443
- package/lib/components/pen.ts +0 -567
- package/lib/components/progress.d.ts +0 -40
- package/lib/components/progress.d.ts.map +0 -1
- package/lib/components/progress.js +0 -116
- package/lib/components/progress.ts +0 -163
- package/lib/components/radio.d.ts +0 -43
- package/lib/components/radio.d.ts.map +0 -1
- package/lib/components/radio.js +0 -226
- package/lib/components/radio.ts +0 -303
- package/lib/components/registry.d.ts +0 -34
- package/lib/components/registry.d.ts.map +0 -1
- package/lib/components/registry.js +0 -163
- package/lib/components/registry.ts +0 -193
- package/lib/components/req.d.ts +0 -155
- package/lib/components/req.d.ts.map +0 -1
- package/lib/components/req.js +0 -253
- package/lib/components/req.ts +0 -303
- package/lib/components/script.d.ts +0 -14
- package/lib/components/script.d.ts.map +0 -1
- package/lib/components/script.js +0 -33
- package/lib/components/script.ts +0 -41
- package/lib/components/select.d.ts +0 -42
- package/lib/components/select.d.ts.map +0 -1
- package/lib/components/select.js +0 -209
- package/lib/components/select.ts +0 -281
- package/lib/components/sidebar.d.ts +0 -59
- package/lib/components/sidebar.d.ts.map +0 -1
- package/lib/components/sidebar.js +0 -298
- package/lib/components/sidebar.ts +0 -395
- package/lib/components/stack/BaseStack.d.ts +0 -65
- package/lib/components/stack/BaseStack.d.ts.map +0 -1
- package/lib/components/stack/BaseStack.js +0 -274
- package/lib/components/stack/BaseStack.ts +0 -328
- package/lib/components/stack/HStack.d.ts +0 -18
- package/lib/components/stack/HStack.d.ts.map +0 -1
- package/lib/components/stack/HStack.js +0 -22
- package/lib/components/stack/HStack.ts +0 -25
- package/lib/components/stack/VStack.d.ts +0 -19
- package/lib/components/stack/VStack.d.ts.map +0 -1
- package/lib/components/stack/VStack.js +0 -23
- package/lib/components/stack/VStack.ts +0 -26
- package/lib/components/stack/ZStack.d.ts +0 -18
- package/lib/components/stack/ZStack.d.ts.map +0 -1
- package/lib/components/stack/ZStack.js +0 -22
- package/lib/components/stack/ZStack.ts +0 -25
- package/lib/components/style.d.ts +0 -14
- package/lib/components/style.d.ts.map +0 -1
- package/lib/components/style.js +0 -33
- package/lib/components/style.ts +0 -41
- package/lib/components/switch.d.ts +0 -34
- package/lib/components/switch.d.ts.map +0 -1
- package/lib/components/switch.js +0 -209
- package/lib/components/switch.ts +0 -272
- package/lib/components/table.d.ts +0 -137
- package/lib/components/table.d.ts.map +0 -1
- package/lib/components/table.js +0 -1019
- package/lib/components/table.ts +0 -1225
- package/lib/components/tabs.d.ts +0 -53
- package/lib/components/tabs.d.ts.map +0 -1
- package/lib/components/tabs.js +0 -275
- package/lib/components/tabs.ts +0 -349
- package/lib/components/theme-toggle.d.ts +0 -45
- package/lib/components/theme-toggle.d.ts.map +0 -1
- package/lib/components/theme-toggle.js +0 -218
- package/lib/components/theme-toggle.ts +0 -297
- package/lib/components/tooltip.d.ts +0 -31
- package/lib/components/tooltip.d.ts.map +0 -1
- package/lib/components/tooltip.js +0 -112
- package/lib/components/tooltip.ts +0 -148
- package/lib/components/watcher.d.ts +0 -195
- package/lib/components/watcher.d.ts.map +0 -1
- package/lib/components/watcher.js +0 -241
- package/lib/components/watcher.ts +0 -261
- package/lib/components/write.d.ts +0 -107
- package/lib/components/write.d.ts.map +0 -1
- package/lib/components/write.js +0 -222
- package/lib/components/write.ts +0 -272
- package/lib/data/DataPipeline.d.ts +0 -113
- package/lib/data/DataPipeline.d.ts.map +0 -1
- package/lib/data/DataPipeline.js +0 -359
- package/lib/data/DataPipeline.ts +0 -452
- package/lib/facades/dataframe.jux +0 -0
- package/lib/globals.d.ts +0 -21
- package/lib/reactivity/state.d.ts +0 -36
- package/lib/reactivity/state.d.ts.map +0 -1
- package/lib/reactivity/state.js +0 -67
- package/lib/reactivity/state.ts +0 -78
- package/lib/storage/DataFrame.d.ts +0 -284
- package/lib/storage/DataFrame.d.ts.map +0 -1
- package/lib/storage/DataFrame.js +0 -1022
- package/lib/storage/DataFrame.ts +0 -1195
- package/lib/storage/DataFrameSource.d.ts +0 -158
- package/lib/storage/DataFrameSource.d.ts.map +0 -1
- package/lib/storage/DataFrameSource.js +0 -409
- package/lib/storage/DataFrameSource.ts +0 -556
- package/lib/storage/FileStorage.d.ts +0 -53
- package/lib/storage/FileStorage.d.ts.map +0 -1
- package/lib/storage/FileStorage.js +0 -80
- package/lib/storage/FileStorage.ts +0 -95
- package/lib/storage/IndexedDBDriver.d.ts +0 -75
- package/lib/storage/IndexedDBDriver.d.ts.map +0 -1
- package/lib/storage/IndexedDBDriver.js +0 -177
- package/lib/storage/IndexedDBDriver.ts +0 -226
- package/lib/storage/TabularDriver.d.ts +0 -118
- package/lib/storage/TabularDriver.d.ts.map +0 -1
- package/lib/storage/TabularDriver.js +0 -731
- package/lib/storage/TabularDriver.ts +0 -874
- package/lib/utils/codeparser.d.ts +0 -29
- package/lib/utils/codeparser.d.ts.map +0 -1
- package/lib/utils/codeparser.js +0 -409
- package/lib/utils/fetch.d.ts +0 -176
- package/lib/utils/fetch.d.ts.map +0 -1
- package/lib/utils/fetch.js +0 -427
- package/lib/utils/formatId.d.ts +0 -16
- package/lib/utils/formatId.d.ts.map +0 -1
- package/lib/utils/formatId.js +0 -27
- package/lib/utils/path-resolver.js +0 -23
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { State } from '../reactivity/state.js';
|
|
2
|
-
import { IndexedDBDriver, StoredFile, FileQuery } from './IndexedDBDriver.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Reactive file storage — wraps IndexedDBDriver with a State<StoredFile[]>
|
|
6
|
-
* so components can subscribe to file list changes.
|
|
7
|
-
*/
|
|
8
|
-
export class FileStorage {
|
|
9
|
-
private _driver: IndexedDBDriver;
|
|
10
|
-
private _state: State<StoredFile[]>;
|
|
11
|
-
|
|
12
|
-
constructor(dbName?: string, storeName?: string) {
|
|
13
|
-
this._driver = new IndexedDBDriver(dbName, storeName);
|
|
14
|
-
this._state = new State<StoredFile[]>([]);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/** Reactive state — subscribe to file list changes */
|
|
18
|
-
get state(): State<StoredFile[]> {
|
|
19
|
-
return this._state;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/** Current file list */
|
|
23
|
-
get files(): StoredFile[] {
|
|
24
|
-
return this._state.value;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/** The underlying driver for advanced operations */
|
|
28
|
-
get driver(): IndexedDBDriver {
|
|
29
|
-
return this._driver;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Load file list from IndexedDB and update state
|
|
34
|
-
*/
|
|
35
|
-
async refresh(query?: FileQuery): Promise<StoredFile[]> {
|
|
36
|
-
const files = await this._driver.list(query);
|
|
37
|
-
this._state.set(files);
|
|
38
|
-
return files;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Store a file and update state
|
|
43
|
-
*/
|
|
44
|
-
async store(file: File, metadata?: Record<string, any>): Promise<StoredFile> {
|
|
45
|
-
const stored = await this._driver.store(file, metadata);
|
|
46
|
-
await this.refresh();
|
|
47
|
-
return stored;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Store multiple files and update state
|
|
52
|
-
*/
|
|
53
|
-
async storeAll(files: File[], metadata?: Record<string, any>): Promise<StoredFile[]> {
|
|
54
|
-
const stored = await this._driver.storeAll(files, metadata);
|
|
55
|
-
await this.refresh();
|
|
56
|
-
return stored;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Delete a file and update state
|
|
61
|
-
*/
|
|
62
|
-
async delete(id: string): Promise<void> {
|
|
63
|
-
await this._driver.delete(id);
|
|
64
|
-
await this.refresh();
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Clear all files and update state
|
|
69
|
-
*/
|
|
70
|
-
async clear(): Promise<void> {
|
|
71
|
-
await this._driver.clear();
|
|
72
|
-
this._state.set([]);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Get a stored file by ID (does not affect state)
|
|
77
|
-
*/
|
|
78
|
-
async get(id: string): Promise<StoredFile | null> {
|
|
79
|
-
return this._driver.get(id);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Get storage usage
|
|
84
|
-
*/
|
|
85
|
-
async usage(): Promise<{ count: number; bytes: number }> {
|
|
86
|
-
return this._driver.usage();
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Factory function
|
|
92
|
-
*/
|
|
93
|
-
export function fileStorage(dbName?: string, storeName?: string): FileStorage {
|
|
94
|
-
return new FileStorage(dbName, storeName);
|
|
95
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
export interface StoredFile {
|
|
2
|
-
id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
size: number;
|
|
5
|
-
type: string;
|
|
6
|
-
data: ArrayBuffer;
|
|
7
|
-
timestamp: number;
|
|
8
|
-
metadata?: Record<string, any>;
|
|
9
|
-
}
|
|
10
|
-
export interface FileQuery {
|
|
11
|
-
type?: string;
|
|
12
|
-
minSize?: number;
|
|
13
|
-
maxSize?: number;
|
|
14
|
-
since?: number;
|
|
15
|
-
limit?: number;
|
|
16
|
-
}
|
|
17
|
-
export declare class IndexedDBDriver {
|
|
18
|
-
private _dbName;
|
|
19
|
-
private _storeName;
|
|
20
|
-
private _version;
|
|
21
|
-
private _db;
|
|
22
|
-
constructor(dbName?: string, storeName?: string, version?: number);
|
|
23
|
-
/**
|
|
24
|
-
* Open the database connection
|
|
25
|
-
*/
|
|
26
|
-
open(): Promise<IDBDatabase>;
|
|
27
|
-
/**
|
|
28
|
-
* Store a File object
|
|
29
|
-
*/
|
|
30
|
-
store(file: File, metadata?: Record<string, any>): Promise<StoredFile>;
|
|
31
|
-
/**
|
|
32
|
-
* Store multiple files
|
|
33
|
-
*/
|
|
34
|
-
storeAll(files: File[], metadata?: Record<string, any>): Promise<StoredFile[]>;
|
|
35
|
-
/**
|
|
36
|
-
* Retrieve a stored file by ID
|
|
37
|
-
*/
|
|
38
|
-
get(id: string): Promise<StoredFile | null>;
|
|
39
|
-
/**
|
|
40
|
-
* Get all stored files (metadata only, no data by default)
|
|
41
|
-
*/
|
|
42
|
-
list(query?: FileQuery): Promise<StoredFile[]>;
|
|
43
|
-
/**
|
|
44
|
-
* Delete a stored file by ID
|
|
45
|
-
*/
|
|
46
|
-
delete(id: string): Promise<void>;
|
|
47
|
-
/**
|
|
48
|
-
* Delete all stored files
|
|
49
|
-
*/
|
|
50
|
-
clear(): Promise<void>;
|
|
51
|
-
/**
|
|
52
|
-
* Get total storage usage in bytes
|
|
53
|
-
*/
|
|
54
|
-
usage(): Promise<{
|
|
55
|
-
count: number;
|
|
56
|
-
bytes: number;
|
|
57
|
-
}>;
|
|
58
|
-
/**
|
|
59
|
-
* Convert a StoredFile back to a File object
|
|
60
|
-
*/
|
|
61
|
-
toFile(stored: StoredFile): File;
|
|
62
|
-
/**
|
|
63
|
-
* Convert a StoredFile to a blob URL for display/download
|
|
64
|
-
*/
|
|
65
|
-
toBlobUrl(stored: StoredFile): string;
|
|
66
|
-
/**
|
|
67
|
-
* Close the database connection
|
|
68
|
-
*/
|
|
69
|
-
close(): void;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Factory function
|
|
73
|
-
*/
|
|
74
|
-
export declare function indexedDBDriver(dbName?: string, storeName?: string): IndexedDBDriver;
|
|
75
|
-
//# sourceMappingURL=IndexedDBDriver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IndexedDBDriver.d.ts","sourceRoot":"","sources":["IndexedDBDriver.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,SAAS;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAA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,KAAK,IAAI,IAAI;CAMhB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,eAAe,CAEpF"}
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
export class IndexedDBDriver {
|
|
2
|
-
constructor(dbName = 'jux-files', storeName = 'files', version = 1) {
|
|
3
|
-
this._db = null;
|
|
4
|
-
this._dbName = dbName;
|
|
5
|
-
this._storeName = storeName;
|
|
6
|
-
this._version = version;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Open the database connection
|
|
10
|
-
*/
|
|
11
|
-
async open() {
|
|
12
|
-
if (this._db)
|
|
13
|
-
return this._db;
|
|
14
|
-
return new Promise((resolve, reject) => {
|
|
15
|
-
const request = indexedDB.open(this._dbName, this._version);
|
|
16
|
-
request.onupgradeneeded = (e) => {
|
|
17
|
-
const db = e.target.result;
|
|
18
|
-
if (!db.objectStoreNames.contains(this._storeName)) {
|
|
19
|
-
const store = db.createObjectStore(this._storeName, { keyPath: 'id' });
|
|
20
|
-
store.createIndex('name', 'name', { unique: false });
|
|
21
|
-
store.createIndex('type', 'type', { unique: false });
|
|
22
|
-
store.createIndex('timestamp', 'timestamp', { unique: false });
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
request.onsuccess = (e) => {
|
|
26
|
-
this._db = e.target.result;
|
|
27
|
-
resolve(this._db);
|
|
28
|
-
};
|
|
29
|
-
request.onerror = () => reject(request.error);
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Store a File object
|
|
34
|
-
*/
|
|
35
|
-
async store(file, metadata) {
|
|
36
|
-
const db = await this.open();
|
|
37
|
-
const data = await file.arrayBuffer();
|
|
38
|
-
const stored = {
|
|
39
|
-
id: `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`,
|
|
40
|
-
name: file.name,
|
|
41
|
-
size: file.size,
|
|
42
|
-
type: file.type,
|
|
43
|
-
data,
|
|
44
|
-
timestamp: Date.now(),
|
|
45
|
-
metadata
|
|
46
|
-
};
|
|
47
|
-
return new Promise((resolve, reject) => {
|
|
48
|
-
const tx = db.transaction(this._storeName, 'readwrite');
|
|
49
|
-
const store = tx.objectStore(this._storeName);
|
|
50
|
-
const request = store.put(stored);
|
|
51
|
-
request.onsuccess = () => resolve(stored);
|
|
52
|
-
request.onerror = () => reject(request.error);
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Store multiple files
|
|
57
|
-
*/
|
|
58
|
-
async storeAll(files, metadata) {
|
|
59
|
-
const results = [];
|
|
60
|
-
for (const file of files) {
|
|
61
|
-
results.push(await this.store(file, metadata));
|
|
62
|
-
}
|
|
63
|
-
return results;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Retrieve a stored file by ID
|
|
67
|
-
*/
|
|
68
|
-
async get(id) {
|
|
69
|
-
const db = await this.open();
|
|
70
|
-
return new Promise((resolve, reject) => {
|
|
71
|
-
const tx = db.transaction(this._storeName, 'readonly');
|
|
72
|
-
const store = tx.objectStore(this._storeName);
|
|
73
|
-
const request = store.get(id);
|
|
74
|
-
request.onsuccess = () => resolve(request.result || null);
|
|
75
|
-
request.onerror = () => reject(request.error);
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Get all stored files (metadata only, no data by default)
|
|
80
|
-
*/
|
|
81
|
-
async list(query) {
|
|
82
|
-
const db = await this.open();
|
|
83
|
-
return new Promise((resolve, reject) => {
|
|
84
|
-
const tx = db.transaction(this._storeName, 'readonly');
|
|
85
|
-
const store = tx.objectStore(this._storeName);
|
|
86
|
-
const request = store.getAll();
|
|
87
|
-
request.onsuccess = () => {
|
|
88
|
-
let results = request.result || [];
|
|
89
|
-
if (query) {
|
|
90
|
-
if (query.type) {
|
|
91
|
-
results = results.filter(f => f.type.startsWith(query.type));
|
|
92
|
-
}
|
|
93
|
-
if (query.minSize !== undefined) {
|
|
94
|
-
results = results.filter(f => f.size >= query.minSize);
|
|
95
|
-
}
|
|
96
|
-
if (query.maxSize !== undefined) {
|
|
97
|
-
results = results.filter(f => f.size <= query.maxSize);
|
|
98
|
-
}
|
|
99
|
-
if (query.since !== undefined) {
|
|
100
|
-
results = results.filter(f => f.timestamp >= query.since);
|
|
101
|
-
}
|
|
102
|
-
// Sort by timestamp descending
|
|
103
|
-
results.sort((a, b) => b.timestamp - a.timestamp);
|
|
104
|
-
if (query.limit !== undefined) {
|
|
105
|
-
results = results.slice(0, query.limit);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
resolve(results);
|
|
109
|
-
};
|
|
110
|
-
request.onerror = () => reject(request.error);
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Delete a stored file by ID
|
|
115
|
-
*/
|
|
116
|
-
async delete(id) {
|
|
117
|
-
const db = await this.open();
|
|
118
|
-
return new Promise((resolve, reject) => {
|
|
119
|
-
const tx = db.transaction(this._storeName, 'readwrite');
|
|
120
|
-
const store = tx.objectStore(this._storeName);
|
|
121
|
-
const request = store.delete(id);
|
|
122
|
-
request.onsuccess = () => resolve();
|
|
123
|
-
request.onerror = () => reject(request.error);
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Delete all stored files
|
|
128
|
-
*/
|
|
129
|
-
async clear() {
|
|
130
|
-
const db = await this.open();
|
|
131
|
-
return new Promise((resolve, reject) => {
|
|
132
|
-
const tx = db.transaction(this._storeName, 'readwrite');
|
|
133
|
-
const store = tx.objectStore(this._storeName);
|
|
134
|
-
const request = store.clear();
|
|
135
|
-
request.onsuccess = () => resolve();
|
|
136
|
-
request.onerror = () => reject(request.error);
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Get total storage usage in bytes
|
|
141
|
-
*/
|
|
142
|
-
async usage() {
|
|
143
|
-
const files = await this.list();
|
|
144
|
-
return {
|
|
145
|
-
count: files.length,
|
|
146
|
-
bytes: files.reduce((sum, f) => sum + f.size, 0)
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Convert a StoredFile back to a File object
|
|
151
|
-
*/
|
|
152
|
-
toFile(stored) {
|
|
153
|
-
return new File([stored.data], stored.name, { type: stored.type });
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Convert a StoredFile to a blob URL for display/download
|
|
157
|
-
*/
|
|
158
|
-
toBlobUrl(stored) {
|
|
159
|
-
const blob = new Blob([stored.data], { type: stored.type });
|
|
160
|
-
return URL.createObjectURL(blob);
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Close the database connection
|
|
164
|
-
*/
|
|
165
|
-
close() {
|
|
166
|
-
if (this._db) {
|
|
167
|
-
this._db.close();
|
|
168
|
-
this._db = null;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Factory function
|
|
174
|
-
*/
|
|
175
|
-
export function indexedDBDriver(dbName, storeName) {
|
|
176
|
-
return new IndexedDBDriver(dbName, storeName);
|
|
177
|
-
}
|
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
export interface StoredFile {
|
|
2
|
-
id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
size: number;
|
|
5
|
-
type: string;
|
|
6
|
-
data: ArrayBuffer;
|
|
7
|
-
timestamp: number;
|
|
8
|
-
metadata?: Record<string, any>;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface FileQuery {
|
|
12
|
-
type?: string;
|
|
13
|
-
minSize?: number;
|
|
14
|
-
maxSize?: number;
|
|
15
|
-
since?: number;
|
|
16
|
-
limit?: number;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export class IndexedDBDriver {
|
|
20
|
-
private _dbName: string;
|
|
21
|
-
private _storeName: string;
|
|
22
|
-
private _version: number;
|
|
23
|
-
private _db: IDBDatabase | null = null;
|
|
24
|
-
|
|
25
|
-
constructor(dbName: string = 'jux-files', storeName: string = 'files', version: number = 1) {
|
|
26
|
-
this._dbName = dbName;
|
|
27
|
-
this._storeName = storeName;
|
|
28
|
-
this._version = version;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Open the database connection
|
|
33
|
-
*/
|
|
34
|
-
async open(): Promise<IDBDatabase> {
|
|
35
|
-
if (this._db) return this._db;
|
|
36
|
-
|
|
37
|
-
return new Promise((resolve, reject) => {
|
|
38
|
-
const request = indexedDB.open(this._dbName, this._version);
|
|
39
|
-
|
|
40
|
-
request.onupgradeneeded = (e) => {
|
|
41
|
-
const db = (e.target as IDBOpenDBRequest).result;
|
|
42
|
-
|
|
43
|
-
if (!db.objectStoreNames.contains(this._storeName)) {
|
|
44
|
-
const store = db.createObjectStore(this._storeName, { keyPath: 'id' });
|
|
45
|
-
store.createIndex('name', 'name', { unique: false });
|
|
46
|
-
store.createIndex('type', 'type', { unique: false });
|
|
47
|
-
store.createIndex('timestamp', 'timestamp', { unique: false });
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
request.onsuccess = (e) => {
|
|
52
|
-
this._db = (e.target as IDBOpenDBRequest).result;
|
|
53
|
-
resolve(this._db);
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
request.onerror = () => reject(request.error);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Store a File object
|
|
62
|
-
*/
|
|
63
|
-
async store(file: File, metadata?: Record<string, any>): Promise<StoredFile> {
|
|
64
|
-
const db = await this.open();
|
|
65
|
-
const data = await file.arrayBuffer();
|
|
66
|
-
|
|
67
|
-
const stored: StoredFile = {
|
|
68
|
-
id: `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`,
|
|
69
|
-
name: file.name,
|
|
70
|
-
size: file.size,
|
|
71
|
-
type: file.type,
|
|
72
|
-
data,
|
|
73
|
-
timestamp: Date.now(),
|
|
74
|
-
metadata
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
return new Promise((resolve, reject) => {
|
|
78
|
-
const tx = db.transaction(this._storeName, 'readwrite');
|
|
79
|
-
const store = tx.objectStore(this._storeName);
|
|
80
|
-
const request = store.put(stored);
|
|
81
|
-
request.onsuccess = () => resolve(stored);
|
|
82
|
-
request.onerror = () => reject(request.error);
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Store multiple files
|
|
88
|
-
*/
|
|
89
|
-
async storeAll(files: File[], metadata?: Record<string, any>): Promise<StoredFile[]> {
|
|
90
|
-
const results: StoredFile[] = [];
|
|
91
|
-
for (const file of files) {
|
|
92
|
-
results.push(await this.store(file, metadata));
|
|
93
|
-
}
|
|
94
|
-
return results;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Retrieve a stored file by ID
|
|
99
|
-
*/
|
|
100
|
-
async get(id: string): Promise<StoredFile | null> {
|
|
101
|
-
const db = await this.open();
|
|
102
|
-
|
|
103
|
-
return new Promise((resolve, reject) => {
|
|
104
|
-
const tx = db.transaction(this._storeName, 'readonly');
|
|
105
|
-
const store = tx.objectStore(this._storeName);
|
|
106
|
-
const request = store.get(id);
|
|
107
|
-
request.onsuccess = () => resolve(request.result || null);
|
|
108
|
-
request.onerror = () => reject(request.error);
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Get all stored files (metadata only, no data by default)
|
|
114
|
-
*/
|
|
115
|
-
async list(query?: FileQuery): Promise<StoredFile[]> {
|
|
116
|
-
const db = await this.open();
|
|
117
|
-
|
|
118
|
-
return new Promise((resolve, reject) => {
|
|
119
|
-
const tx = db.transaction(this._storeName, 'readonly');
|
|
120
|
-
const store = tx.objectStore(this._storeName);
|
|
121
|
-
const request = store.getAll();
|
|
122
|
-
|
|
123
|
-
request.onsuccess = () => {
|
|
124
|
-
let results: StoredFile[] = request.result || [];
|
|
125
|
-
|
|
126
|
-
if (query) {
|
|
127
|
-
if (query.type) {
|
|
128
|
-
results = results.filter(f => f.type.startsWith(query.type!));
|
|
129
|
-
}
|
|
130
|
-
if (query.minSize !== undefined) {
|
|
131
|
-
results = results.filter(f => f.size >= query.minSize!);
|
|
132
|
-
}
|
|
133
|
-
if (query.maxSize !== undefined) {
|
|
134
|
-
results = results.filter(f => f.size <= query.maxSize!);
|
|
135
|
-
}
|
|
136
|
-
if (query.since !== undefined) {
|
|
137
|
-
results = results.filter(f => f.timestamp >= query.since!);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
// Sort by timestamp descending
|
|
141
|
-
results.sort((a, b) => b.timestamp - a.timestamp);
|
|
142
|
-
|
|
143
|
-
if (query.limit !== undefined) {
|
|
144
|
-
results = results.slice(0, query.limit);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
resolve(results);
|
|
149
|
-
};
|
|
150
|
-
request.onerror = () => reject(request.error);
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Delete a stored file by ID
|
|
156
|
-
*/
|
|
157
|
-
async delete(id: string): Promise<void> {
|
|
158
|
-
const db = await this.open();
|
|
159
|
-
|
|
160
|
-
return new Promise((resolve, reject) => {
|
|
161
|
-
const tx = db.transaction(this._storeName, 'readwrite');
|
|
162
|
-
const store = tx.objectStore(this._storeName);
|
|
163
|
-
const request = store.delete(id);
|
|
164
|
-
request.onsuccess = () => resolve();
|
|
165
|
-
request.onerror = () => reject(request.error);
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Delete all stored files
|
|
171
|
-
*/
|
|
172
|
-
async clear(): Promise<void> {
|
|
173
|
-
const db = await this.open();
|
|
174
|
-
|
|
175
|
-
return new Promise((resolve, reject) => {
|
|
176
|
-
const tx = db.transaction(this._storeName, 'readwrite');
|
|
177
|
-
const store = tx.objectStore(this._storeName);
|
|
178
|
-
const request = store.clear();
|
|
179
|
-
request.onsuccess = () => resolve();
|
|
180
|
-
request.onerror = () => reject(request.error);
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Get total storage usage in bytes
|
|
186
|
-
*/
|
|
187
|
-
async usage(): Promise<{ count: number; bytes: number }> {
|
|
188
|
-
const files = await this.list();
|
|
189
|
-
return {
|
|
190
|
-
count: files.length,
|
|
191
|
-
bytes: files.reduce((sum, f) => sum + f.size, 0)
|
|
192
|
-
};
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* Convert a StoredFile back to a File object
|
|
197
|
-
*/
|
|
198
|
-
toFile(stored: StoredFile): File {
|
|
199
|
-
return new File([stored.data], stored.name, { type: stored.type });
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* Convert a StoredFile to a blob URL for display/download
|
|
204
|
-
*/
|
|
205
|
-
toBlobUrl(stored: StoredFile): string {
|
|
206
|
-
const blob = new Blob([stored.data], { type: stored.type });
|
|
207
|
-
return URL.createObjectURL(blob);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Close the database connection
|
|
212
|
-
*/
|
|
213
|
-
close(): void {
|
|
214
|
-
if (this._db) {
|
|
215
|
-
this._db.close();
|
|
216
|
-
this._db = null;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* Factory function
|
|
223
|
-
*/
|
|
224
|
-
export function indexedDBDriver(dbName?: string, storeName?: string): IndexedDBDriver {
|
|
225
|
-
return new IndexedDBDriver(dbName, storeName);
|
|
226
|
-
}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { DataFrame } from './DataFrame.js';
|
|
2
|
-
export interface StoredTable {
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
columns: string[];
|
|
6
|
-
rows: any[][];
|
|
7
|
-
rowCount: number;
|
|
8
|
-
delimiter: string;
|
|
9
|
-
timestamp: number;
|
|
10
|
-
metadata?: Record<string, any>;
|
|
11
|
-
}
|
|
12
|
-
export interface ParseOptions {
|
|
13
|
-
delimiter?: string;
|
|
14
|
-
hasHeader?: boolean;
|
|
15
|
-
chunkSize?: number;
|
|
16
|
-
onProgress?: (parsed: number, total: number | null) => void;
|
|
17
|
-
maxRows?: number;
|
|
18
|
-
skipRows?: number;
|
|
19
|
-
columns?: string[];
|
|
20
|
-
sheet?: string | number;
|
|
21
|
-
maxSheetSize?: number;
|
|
22
|
-
sheetChunkSize?: number;
|
|
23
|
-
headerRow?: number;
|
|
24
|
-
autoDetectDelimiter?: boolean;
|
|
25
|
-
}
|
|
26
|
-
export declare class TabularDriver {
|
|
27
|
-
private _dbName;
|
|
28
|
-
private _storeName;
|
|
29
|
-
private _db;
|
|
30
|
-
constructor(dbName?: string, storeName?: string);
|
|
31
|
-
open(): Promise<IDBDatabase>;
|
|
32
|
-
/**
|
|
33
|
-
* ✅ NEW: Auto-detect delimiter from first N lines of CSV
|
|
34
|
-
* Checks for: , | \t ;
|
|
35
|
-
*/
|
|
36
|
-
private _detectDelimiter;
|
|
37
|
-
/**
|
|
38
|
-
* ✅ NEW: Detect which row contains the header
|
|
39
|
-
* Looks for first row with mostly string values
|
|
40
|
-
*/
|
|
41
|
-
private _detectHeaderRow;
|
|
42
|
-
/**
|
|
43
|
-
* Parse a CSV/TSV string into a DataFrame
|
|
44
|
-
*/
|
|
45
|
-
parseCSV(text: string, options?: ParseOptions): DataFrame;
|
|
46
|
-
/**
|
|
47
|
-
* Stream-parse a File into a DataFrame, with progress callback.
|
|
48
|
-
* Auto-detects XLSX/XLS and routes accordingly.
|
|
49
|
-
*/
|
|
50
|
-
streamFile(file: File, options?: ParseOptions): Promise<DataFrame>;
|
|
51
|
-
/**
|
|
52
|
-
* Parse an XLSX/XLS file into a DataFrame using ExcelJS
|
|
53
|
-
*/
|
|
54
|
-
private _parseXLSX;
|
|
55
|
-
/**
|
|
56
|
-
* Get sheet names from an XLSX file
|
|
57
|
-
*/
|
|
58
|
-
getSheetNames(file: File): Promise<string[]>;
|
|
59
|
-
/**
|
|
60
|
-
* Store a DataFrame to IndexedDB
|
|
61
|
-
*/
|
|
62
|
-
store(name: string, df: DataFrame, metadata?: Record<string, any>): Promise<string>;
|
|
63
|
-
/**
|
|
64
|
-
* Load a DataFrame from IndexedDB by ID
|
|
65
|
-
*/
|
|
66
|
-
load(id: string): Promise<DataFrame | null>;
|
|
67
|
-
/**
|
|
68
|
-
* Load the most recent table by name
|
|
69
|
-
*/
|
|
70
|
-
loadByName(name: string): Promise<DataFrame | null>;
|
|
71
|
-
/**
|
|
72
|
-
* List all stored tables (metadata only)
|
|
73
|
-
*/
|
|
74
|
-
list(): Promise<Array<{
|
|
75
|
-
id: string;
|
|
76
|
-
name: string;
|
|
77
|
-
columns: string[];
|
|
78
|
-
rowCount: number;
|
|
79
|
-
timestamp: number;
|
|
80
|
-
}>>;
|
|
81
|
-
/**
|
|
82
|
-
* Delete a stored table
|
|
83
|
-
*/
|
|
84
|
-
delete(id: string): Promise<void>;
|
|
85
|
-
clear(): Promise<void>;
|
|
86
|
-
/**
|
|
87
|
-
* Fetch and stream-parse a remote CSV/TSV file
|
|
88
|
-
*/
|
|
89
|
-
fetch(url: string, options?: ParseOptions): Promise<DataFrame>;
|
|
90
|
-
/**
|
|
91
|
-
* Read raw cell values from first sheet of an Excel file.
|
|
92
|
-
* Returns rows with their 0-based row indices.
|
|
93
|
-
* Used by both the preview UI and the parser to ensure consistency.
|
|
94
|
-
*/
|
|
95
|
-
readRawExcelRows(file: File, maxRows?: number): Promise<{
|
|
96
|
-
sheetRow: number;
|
|
97
|
-
values: any[];
|
|
98
|
-
}[]>;
|
|
99
|
-
/**
|
|
100
|
-
* Stream Excel file with optional headerRow override.
|
|
101
|
-
* headerRow is 0-based (same as sheetRow from readRawExcelRows).
|
|
102
|
-
*/
|
|
103
|
-
streamFileMultiSheet(file: File, options?: ParseOptions): Promise<Record<string, DataFrame>>;
|
|
104
|
-
/**
|
|
105
|
-
* Extract cell values from an ExcelJS row into a plain array.
|
|
106
|
-
* ExcelJS row.values is 1-based (index 0 is undefined), so we normalize.
|
|
107
|
-
*/
|
|
108
|
-
private _excelRowToArray;
|
|
109
|
-
private _splitLines;
|
|
110
|
-
private _parseLine;
|
|
111
|
-
private _autoType;
|
|
112
|
-
close(): void;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Factory
|
|
116
|
-
*/
|
|
117
|
-
export declare function tabularDriver(dbName?: string, storeName?: string): TabularDriver;
|
|
118
|
-
//# sourceMappingURL=TabularDriver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TabularDriver.d.ts","sourceRoot":"","sources":["TabularDriver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,WAAW,WAAW;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,YAAY;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5D,OAAO,CAAC,EAAE,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