@diaryx/wasm 0.13.1-dev.9e5e63e → 0.14.1-dev.4061d41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -23
- package/diaryx_wasm.d.ts +41 -29
- package/diaryx_wasm.js +41 -17
- package/diaryx_wasm_bg.wasm.d.ts +25 -24
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,16 +5,15 @@ part_of: '[README](/crates/README.md)'
|
|
|
5
5
|
audience:
|
|
6
6
|
- developers
|
|
7
7
|
contents:
|
|
8
|
-
|
|
8
|
+
- '[README](/crates/diaryx_wasm/src/README.md)'
|
|
9
9
|
attachments:
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
- '[Cargo.toml](/crates/diaryx_wasm/Cargo.toml)'
|
|
11
|
+
- '[build.rs](/crates/diaryx_wasm/build.rs)'
|
|
12
12
|
exclude:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
- '*.lock'
|
|
14
|
+
- '*.db'
|
|
15
|
+
- pkg/**
|
|
16
16
|
---
|
|
17
|
-
|
|
18
17
|
# diaryx_wasm
|
|
19
18
|
|
|
20
19
|
WebAssembly bindings for `diaryx_core`, used by the web frontend in `apps/web`.
|
|
@@ -50,19 +49,21 @@ Current filesystem test suites live in:
|
|
|
50
49
|
|
|
51
50
|
The crate provides typed class-based APIs that wrap `diaryx_core` functionality:
|
|
52
51
|
|
|
53
|
-
|
|
54
|
-
|
|
|
55
|
-
|
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
| `
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
62
|
-
| `
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
52
|
+
|
|
53
|
+
| Class | Purpose |
|
|
54
|
+
| ----------------------- | ----------------------------------------- |
|
|
55
|
+
| `DiaryxWorkspace` | Workspace tree operations |
|
|
56
|
+
| `DiaryxEntry` | Entry CRUD operations |
|
|
57
|
+
| `DiaryxFrontmatter` | Frontmatter manipulation |
|
|
58
|
+
| `DiaryxSearch` | Workspace search |
|
|
59
|
+
| `DiaryxTemplate` | Template management |
|
|
60
|
+
| `DiaryxValidation` | Link integrity validation and fixing |
|
|
61
|
+
| `DiaryxExport` | Export with audience filtering |
|
|
62
|
+
| `DiaryxAttachment` | Attachment upload/download |
|
|
63
|
+
| `DiaryxFilesystem` | Low-level filesystem operations (sync) |
|
|
64
|
+
| `DiaryxAsyncFilesystem` | Async filesystem operations with Promises |
|
|
65
|
+
| `Diaryx` | Unified command API (includes CRDT ops) |
|
|
66
|
+
|
|
66
67
|
|
|
67
68
|
### In-Memory Filesystem
|
|
68
69
|
|
|
@@ -352,11 +353,13 @@ await diaryx.executeJs({
|
|
|
352
353
|
|
|
353
354
|
CRDT operations use `doc_type` to specify which document to operate on:
|
|
354
355
|
|
|
355
|
-
|
|
356
|
-
|
|
|
357
|
-
|
|
|
356
|
+
|
|
357
|
+
| doc_type | doc_name | Description |
|
|
358
|
+
| ----------- | --------- | ------------------------------------------ |
|
|
359
|
+
| `workspace` | `null` | The workspace file hierarchy metadata |
|
|
358
360
|
| `body` | file path | Per-file body content (e.g., `notes/a.md`) |
|
|
359
361
|
|
|
362
|
+
|
|
360
363
|
## Error Handling
|
|
361
364
|
|
|
362
365
|
All methods return `Result<T, JsValue>` for JavaScript interop. Errors are converted to JavaScript exceptions with descriptive messages.
|
package/diaryx_wasm.d.ts
CHANGED
|
@@ -160,10 +160,13 @@ export class DiaryxBackend {
|
|
|
160
160
|
/**
|
|
161
161
|
* Create a new DiaryxBackend with IndexedDB storage.
|
|
162
162
|
*
|
|
163
|
+
* When `db_name` is provided, uses `"diaryx-{db_name}"` as the database name,
|
|
164
|
+
* allowing per-workspace isolation. When `None`, uses the legacy database name.
|
|
165
|
+
*
|
|
163
166
|
* This attempts to use persistent SQLite-based CRDT storage (via sql.js).
|
|
164
167
|
* If SQLite storage is not available, falls back to in-memory CRDT storage.
|
|
165
168
|
*/
|
|
166
|
-
static createIndexedDb(): Promise<DiaryxBackend>;
|
|
169
|
+
static createIndexedDb(db_name?: string | null): Promise<DiaryxBackend>;
|
|
167
170
|
/**
|
|
168
171
|
* Create a new DiaryxBackend with OPFS storage.
|
|
169
172
|
*
|
|
@@ -177,10 +180,10 @@ export class DiaryxBackend {
|
|
|
177
180
|
* ```javascript
|
|
178
181
|
* import { initializeSqliteStorage } from './lib/storage/sqliteStorageBridge.js';
|
|
179
182
|
* await initializeSqliteStorage();
|
|
180
|
-
* const backend = await DiaryxBackend.createOpfs();
|
|
183
|
+
* const backend = await DiaryxBackend.createOpfs('My Journal');
|
|
181
184
|
* ```
|
|
182
185
|
*/
|
|
183
|
-
static createOpfs(): Promise<DiaryxBackend>;
|
|
186
|
+
static createOpfs(root_name?: string | null): Promise<DiaryxBackend>;
|
|
184
187
|
/**
|
|
185
188
|
* Create a new sync client for the given server and workspace.
|
|
186
189
|
*
|
|
@@ -374,11 +377,19 @@ export class IndexedDbFileSystem {
|
|
|
374
377
|
free(): void;
|
|
375
378
|
[Symbol.dispose](): void;
|
|
376
379
|
/**
|
|
377
|
-
* Create a new IndexedDbFileSystem.
|
|
380
|
+
* Create a new IndexedDbFileSystem with the default database name.
|
|
378
381
|
*
|
|
379
382
|
* Opens or creates the IndexedDB database with the required object stores.
|
|
380
383
|
*/
|
|
381
384
|
static create(): Promise<IndexedDbFileSystem>;
|
|
385
|
+
/**
|
|
386
|
+
* Create a new IndexedDbFileSystem with an optional custom database name.
|
|
387
|
+
*
|
|
388
|
+
* When `db_name` is provided, uses `"diaryx-{db_name}"` as the database name,
|
|
389
|
+
* allowing multiple isolated IndexedDB databases (one per workspace).
|
|
390
|
+
* When `None`, uses the legacy `"diaryx"` database name.
|
|
391
|
+
*/
|
|
392
|
+
static createWithName(db_name?: string | null): Promise<IndexedDbFileSystem>;
|
|
382
393
|
}
|
|
383
394
|
|
|
384
395
|
/**
|
|
@@ -428,7 +439,7 @@ export class OpfsFileSystem {
|
|
|
428
439
|
/**
|
|
429
440
|
* Create a new OpfsFileSystem with the default app directory.
|
|
430
441
|
*
|
|
431
|
-
* This creates a "
|
|
442
|
+
* This creates a "My Journal" directory in the origin-private file system.
|
|
432
443
|
*/
|
|
433
444
|
static create(): Promise<OpfsFileSystem>;
|
|
434
445
|
/**
|
|
@@ -561,26 +572,6 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
561
572
|
|
|
562
573
|
export interface InitOutput {
|
|
563
574
|
readonly memory: WebAssembly.Memory;
|
|
564
|
-
readonly __wbg_diaryxbackend_free: (a: number, b: number) => void;
|
|
565
|
-
readonly diaryxbackend_create: (a: number, b: number) => any;
|
|
566
|
-
readonly diaryxbackend_createFromDirectoryHandle: (a: any) => [number, number, number];
|
|
567
|
-
readonly diaryxbackend_createInMemory: () => [number, number, number];
|
|
568
|
-
readonly diaryxbackend_createIndexedDb: () => any;
|
|
569
|
-
readonly diaryxbackend_createOpfs: () => any;
|
|
570
|
-
readonly diaryxbackend_createSyncClient: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
|
|
571
|
-
readonly diaryxbackend_emitFileSystemEvent: (a: number, b: number, c: number) => [number, number];
|
|
572
|
-
readonly diaryxbackend_eventSubscriberCount: (a: number) => number;
|
|
573
|
-
readonly diaryxbackend_execute: (a: number, b: number, c: number) => any;
|
|
574
|
-
readonly diaryxbackend_executeJs: (a: number, b: any) => any;
|
|
575
|
-
readonly diaryxbackend_getConfig: (a: number) => any;
|
|
576
|
-
readonly diaryxbackend_hasNativeSync: (a: number) => number;
|
|
577
|
-
readonly diaryxbackend_isCrdtEnabled: (a: number) => number;
|
|
578
|
-
readonly diaryxbackend_offFileSystemEvent: (a: number, b: bigint) => number;
|
|
579
|
-
readonly diaryxbackend_onFileSystemEvent: (a: number, b: any) => bigint;
|
|
580
|
-
readonly diaryxbackend_readBinary: (a: number, b: number, c: number) => any;
|
|
581
|
-
readonly diaryxbackend_saveConfig: (a: number, b: any) => any;
|
|
582
|
-
readonly diaryxbackend_setCrdtEnabled: (a: number, b: number) => void;
|
|
583
|
-
readonly diaryxbackend_writeBinary: (a: number, b: number, c: number, d: any) => any;
|
|
584
575
|
readonly __wbg_jsasyncfilesystem_free: (a: number, b: number) => void;
|
|
585
576
|
readonly __wbg_wasmsyncclient_free: (a: number, b: number) => void;
|
|
586
577
|
readonly jsasyncfilesystem_has_callback: (a: number, b: number, c: number) => number;
|
|
@@ -602,7 +593,6 @@ export interface InitOutput {
|
|
|
602
593
|
readonly wasmsyncclient_queueLocalUpdate: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
603
594
|
readonly wasmsyncclient_setSessionCode: (a: number, b: number, c: number) => void;
|
|
604
595
|
readonly wasmsyncclient_unfocusFiles: (a: number, b: number, c: number) => void;
|
|
605
|
-
readonly init: () => void;
|
|
606
596
|
readonly __wbg_opfsfilesystem_free: (a: number, b: number) => void;
|
|
607
597
|
readonly opfsfilesystem_create: () => any;
|
|
608
598
|
readonly opfsfilesystem_createWithName: (a: number, b: number) => any;
|
|
@@ -610,14 +600,36 @@ export interface InitOutput {
|
|
|
610
600
|
readonly __wbg_indexeddbfilesystem_free: (a: number, b: number) => void;
|
|
611
601
|
readonly fsafilesystem_fromHandle: (a: any) => number;
|
|
612
602
|
readonly indexeddbfilesystem_create: () => any;
|
|
603
|
+
readonly indexeddbfilesystem_createWithName: (a: number, b: number) => any;
|
|
604
|
+
readonly init: () => void;
|
|
613
605
|
readonly now_timestamp: () => [number, number];
|
|
614
606
|
readonly today_formatted: (a: number, b: number) => [number, number];
|
|
615
|
-
readonly
|
|
607
|
+
readonly __wbg_diaryxbackend_free: (a: number, b: number) => void;
|
|
608
|
+
readonly diaryxbackend_create: (a: number, b: number) => any;
|
|
609
|
+
readonly diaryxbackend_createFromDirectoryHandle: (a: any) => [number, number, number];
|
|
610
|
+
readonly diaryxbackend_createInMemory: () => [number, number, number];
|
|
611
|
+
readonly diaryxbackend_createIndexedDb: (a: number, b: number) => any;
|
|
612
|
+
readonly diaryxbackend_createOpfs: (a: number, b: number) => any;
|
|
613
|
+
readonly diaryxbackend_createSyncClient: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
|
|
614
|
+
readonly diaryxbackend_emitFileSystemEvent: (a: number, b: number, c: number) => [number, number];
|
|
615
|
+
readonly diaryxbackend_eventSubscriberCount: (a: number) => number;
|
|
616
|
+
readonly diaryxbackend_execute: (a: number, b: number, c: number) => any;
|
|
617
|
+
readonly diaryxbackend_executeJs: (a: number, b: any) => any;
|
|
618
|
+
readonly diaryxbackend_getConfig: (a: number) => any;
|
|
619
|
+
readonly diaryxbackend_hasNativeSync: (a: number) => number;
|
|
620
|
+
readonly diaryxbackend_isCrdtEnabled: (a: number) => number;
|
|
621
|
+
readonly diaryxbackend_offFileSystemEvent: (a: number, b: bigint) => number;
|
|
622
|
+
readonly diaryxbackend_onFileSystemEvent: (a: number, b: any) => bigint;
|
|
623
|
+
readonly diaryxbackend_readBinary: (a: number, b: number, c: number) => any;
|
|
624
|
+
readonly diaryxbackend_saveConfig: (a: number, b: any) => any;
|
|
625
|
+
readonly diaryxbackend_setCrdtEnabled: (a: number, b: number) => void;
|
|
626
|
+
readonly diaryxbackend_writeBinary: (a: number, b: number, c: number, d: any) => any;
|
|
627
|
+
readonly wasm_bindgen__closure__destroy__h5cf84bf235290ebc: (a: number, b: number) => void;
|
|
616
628
|
readonly wasm_bindgen__closure__destroy__h54a6b627d1123dca: (a: number, b: number) => void;
|
|
617
629
|
readonly wasm_bindgen__closure__destroy__h440f08373ff30a05: (a: number, b: number) => void;
|
|
618
|
-
readonly
|
|
630
|
+
readonly wasm_bindgen__convert__closures_____invoke__hc572673c1045459b: (a: number, b: number, c: any) => [number, number];
|
|
619
631
|
readonly wasm_bindgen__convert__closures_____invoke__h4e796b59e8c15a06: (a: number, b: number, c: any, d: any) => void;
|
|
620
|
-
readonly
|
|
632
|
+
readonly wasm_bindgen__convert__closures_____invoke__ha33a9e9fcc79e021: (a: number, b: number, c: any) => void;
|
|
621
633
|
readonly wasm_bindgen__convert__closures_____invoke__h7d21c95eeb3011e3: (a: number, b: number, c: any) => void;
|
|
622
634
|
readonly wasm_bindgen__convert__closures_____invoke__h359356b1e0b37746: (a: number, b: number, c: any) => void;
|
|
623
635
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
package/diaryx_wasm.js
CHANGED
|
@@ -103,12 +103,18 @@ export class DiaryxBackend {
|
|
|
103
103
|
/**
|
|
104
104
|
* Create a new DiaryxBackend with IndexedDB storage.
|
|
105
105
|
*
|
|
106
|
+
* When `db_name` is provided, uses `"diaryx-{db_name}"` as the database name,
|
|
107
|
+
* allowing per-workspace isolation. When `None`, uses the legacy database name.
|
|
108
|
+
*
|
|
106
109
|
* This attempts to use persistent SQLite-based CRDT storage (via sql.js).
|
|
107
110
|
* If SQLite storage is not available, falls back to in-memory CRDT storage.
|
|
111
|
+
* @param {string | null} [db_name]
|
|
108
112
|
* @returns {Promise<DiaryxBackend>}
|
|
109
113
|
*/
|
|
110
|
-
static createIndexedDb() {
|
|
111
|
-
|
|
114
|
+
static createIndexedDb(db_name) {
|
|
115
|
+
var ptr0 = isLikeNone(db_name) ? 0 : passStringToWasm0(db_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
116
|
+
var len0 = WASM_VECTOR_LEN;
|
|
117
|
+
const ret = wasm.diaryxbackend_createIndexedDb(ptr0, len0);
|
|
112
118
|
return ret;
|
|
113
119
|
}
|
|
114
120
|
/**
|
|
@@ -124,12 +130,15 @@ export class DiaryxBackend {
|
|
|
124
130
|
* ```javascript
|
|
125
131
|
* import { initializeSqliteStorage } from './lib/storage/sqliteStorageBridge.js';
|
|
126
132
|
* await initializeSqliteStorage();
|
|
127
|
-
* const backend = await DiaryxBackend.createOpfs();
|
|
133
|
+
* const backend = await DiaryxBackend.createOpfs('My Journal');
|
|
128
134
|
* ```
|
|
135
|
+
* @param {string | null} [root_name]
|
|
129
136
|
* @returns {Promise<DiaryxBackend>}
|
|
130
137
|
*/
|
|
131
|
-
static createOpfs() {
|
|
132
|
-
|
|
138
|
+
static createOpfs(root_name) {
|
|
139
|
+
var ptr0 = isLikeNone(root_name) ? 0 : passStringToWasm0(root_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
140
|
+
var len0 = WASM_VECTOR_LEN;
|
|
141
|
+
const ret = wasm.diaryxbackend_createOpfs(ptr0, len0);
|
|
133
142
|
return ret;
|
|
134
143
|
}
|
|
135
144
|
/**
|
|
@@ -442,7 +451,7 @@ export class IndexedDbFileSystem {
|
|
|
442
451
|
wasm.__wbg_indexeddbfilesystem_free(ptr, 0);
|
|
443
452
|
}
|
|
444
453
|
/**
|
|
445
|
-
* Create a new IndexedDbFileSystem.
|
|
454
|
+
* Create a new IndexedDbFileSystem with the default database name.
|
|
446
455
|
*
|
|
447
456
|
* Opens or creates the IndexedDB database with the required object stores.
|
|
448
457
|
* @returns {Promise<IndexedDbFileSystem>}
|
|
@@ -451,6 +460,21 @@ export class IndexedDbFileSystem {
|
|
|
451
460
|
const ret = wasm.indexeddbfilesystem_create();
|
|
452
461
|
return ret;
|
|
453
462
|
}
|
|
463
|
+
/**
|
|
464
|
+
* Create a new IndexedDbFileSystem with an optional custom database name.
|
|
465
|
+
*
|
|
466
|
+
* When `db_name` is provided, uses `"diaryx-{db_name}"` as the database name,
|
|
467
|
+
* allowing multiple isolated IndexedDB databases (one per workspace).
|
|
468
|
+
* When `None`, uses the legacy `"diaryx"` database name.
|
|
469
|
+
* @param {string | null} [db_name]
|
|
470
|
+
* @returns {Promise<IndexedDbFileSystem>}
|
|
471
|
+
*/
|
|
472
|
+
static createWithName(db_name) {
|
|
473
|
+
var ptr0 = isLikeNone(db_name) ? 0 : passStringToWasm0(db_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
474
|
+
var len0 = WASM_VECTOR_LEN;
|
|
475
|
+
const ret = wasm.indexeddbfilesystem_createWithName(ptr0, len0);
|
|
476
|
+
return ret;
|
|
477
|
+
}
|
|
454
478
|
}
|
|
455
479
|
if (Symbol.dispose) IndexedDbFileSystem.prototype[Symbol.dispose] = IndexedDbFileSystem.prototype.free;
|
|
456
480
|
|
|
@@ -537,7 +561,7 @@ export class OpfsFileSystem {
|
|
|
537
561
|
/**
|
|
538
562
|
* Create a new OpfsFileSystem with the default app directory.
|
|
539
563
|
*
|
|
540
|
-
* This creates a "
|
|
564
|
+
* This creates a "My Journal" directory in the origin-private file system.
|
|
541
565
|
* @returns {Promise<OpfsFileSystem>}
|
|
542
566
|
*/
|
|
543
567
|
static create() {
|
|
@@ -1514,22 +1538,22 @@ function __wbg_get_imports() {
|
|
|
1514
1538
|
return ret;
|
|
1515
1539
|
}, arguments); },
|
|
1516
1540
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
1517
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1518
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1541
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 704, function: Function { arguments: [NamedExternref("Event")], shim_idx: 658, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1542
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h5cf84bf235290ebc, wasm_bindgen__convert__closures_____invoke__hc572673c1045459b);
|
|
1519
1543
|
return ret;
|
|
1520
1544
|
},
|
|
1521
1545
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
1522
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1523
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1546
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 704, function: Function { arguments: [NamedExternref("IDBVersionChangeEvent")], shim_idx: 657, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1547
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h5cf84bf235290ebc, wasm_bindgen__convert__closures_____invoke__ha33a9e9fcc79e021);
|
|
1524
1548
|
return ret;
|
|
1525
1549
|
},
|
|
1526
1550
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
1527
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1551
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 788, function: Function { arguments: [NamedExternref("Event")], shim_idx: 789, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1528
1552
|
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h54a6b627d1123dca, wasm_bindgen__convert__closures_____invoke__h7d21c95eeb3011e3);
|
|
1529
1553
|
return ret;
|
|
1530
1554
|
},
|
|
1531
1555
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
1532
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1556
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 814, function: Function { arguments: [Externref], shim_idx: 815, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1533
1557
|
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h440f08373ff30a05, wasm_bindgen__convert__closures_____invoke__h359356b1e0b37746);
|
|
1534
1558
|
return ret;
|
|
1535
1559
|
},
|
|
@@ -1574,8 +1598,8 @@ function __wbg_get_imports() {
|
|
|
1574
1598
|
};
|
|
1575
1599
|
}
|
|
1576
1600
|
|
|
1577
|
-
function
|
|
1578
|
-
wasm.
|
|
1601
|
+
function wasm_bindgen__convert__closures_____invoke__ha33a9e9fcc79e021(arg0, arg1, arg2) {
|
|
1602
|
+
wasm.wasm_bindgen__convert__closures_____invoke__ha33a9e9fcc79e021(arg0, arg1, arg2);
|
|
1579
1603
|
}
|
|
1580
1604
|
|
|
1581
1605
|
function wasm_bindgen__convert__closures_____invoke__h7d21c95eeb3011e3(arg0, arg1, arg2) {
|
|
@@ -1586,8 +1610,8 @@ function wasm_bindgen__convert__closures_____invoke__h359356b1e0b37746(arg0, arg
|
|
|
1586
1610
|
wasm.wasm_bindgen__convert__closures_____invoke__h359356b1e0b37746(arg0, arg1, arg2);
|
|
1587
1611
|
}
|
|
1588
1612
|
|
|
1589
|
-
function
|
|
1590
|
-
const ret = wasm.
|
|
1613
|
+
function wasm_bindgen__convert__closures_____invoke__hc572673c1045459b(arg0, arg1, arg2) {
|
|
1614
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__hc572673c1045459b(arg0, arg1, arg2);
|
|
1591
1615
|
if (ret[1]) {
|
|
1592
1616
|
throw takeFromExternrefTable0(ret[0]);
|
|
1593
1617
|
}
|
package/diaryx_wasm_bg.wasm.d.ts
CHANGED
|
@@ -1,26 +1,6 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export const __wbg_diaryxbackend_free: (a: number, b: number) => void;
|
|
5
|
-
export const diaryxbackend_create: (a: number, b: number) => any;
|
|
6
|
-
export const diaryxbackend_createFromDirectoryHandle: (a: any) => [number, number, number];
|
|
7
|
-
export const diaryxbackend_createInMemory: () => [number, number, number];
|
|
8
|
-
export const diaryxbackend_createIndexedDb: () => any;
|
|
9
|
-
export const diaryxbackend_createOpfs: () => any;
|
|
10
|
-
export const diaryxbackend_createSyncClient: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
|
|
11
|
-
export const diaryxbackend_emitFileSystemEvent: (a: number, b: number, c: number) => [number, number];
|
|
12
|
-
export const diaryxbackend_eventSubscriberCount: (a: number) => number;
|
|
13
|
-
export const diaryxbackend_execute: (a: number, b: number, c: number) => any;
|
|
14
|
-
export const diaryxbackend_executeJs: (a: number, b: any) => any;
|
|
15
|
-
export const diaryxbackend_getConfig: (a: number) => any;
|
|
16
|
-
export const diaryxbackend_hasNativeSync: (a: number) => number;
|
|
17
|
-
export const diaryxbackend_isCrdtEnabled: (a: number) => number;
|
|
18
|
-
export const diaryxbackend_offFileSystemEvent: (a: number, b: bigint) => number;
|
|
19
|
-
export const diaryxbackend_onFileSystemEvent: (a: number, b: any) => bigint;
|
|
20
|
-
export const diaryxbackend_readBinary: (a: number, b: number, c: number) => any;
|
|
21
|
-
export const diaryxbackend_saveConfig: (a: number, b: any) => any;
|
|
22
|
-
export const diaryxbackend_setCrdtEnabled: (a: number, b: number) => void;
|
|
23
|
-
export const diaryxbackend_writeBinary: (a: number, b: number, c: number, d: any) => any;
|
|
24
4
|
export const __wbg_jsasyncfilesystem_free: (a: number, b: number) => void;
|
|
25
5
|
export const __wbg_wasmsyncclient_free: (a: number, b: number) => void;
|
|
26
6
|
export const jsasyncfilesystem_has_callback: (a: number, b: number, c: number) => number;
|
|
@@ -42,7 +22,6 @@ export const wasmsyncclient_pollOutgoingText: (a: number) => [number, number];
|
|
|
42
22
|
export const wasmsyncclient_queueLocalUpdate: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
43
23
|
export const wasmsyncclient_setSessionCode: (a: number, b: number, c: number) => void;
|
|
44
24
|
export const wasmsyncclient_unfocusFiles: (a: number, b: number, c: number) => void;
|
|
45
|
-
export const init: () => void;
|
|
46
25
|
export const __wbg_opfsfilesystem_free: (a: number, b: number) => void;
|
|
47
26
|
export const opfsfilesystem_create: () => any;
|
|
48
27
|
export const opfsfilesystem_createWithName: (a: number, b: number) => any;
|
|
@@ -50,14 +29,36 @@ export const __wbg_fsafilesystem_free: (a: number, b: number) => void;
|
|
|
50
29
|
export const __wbg_indexeddbfilesystem_free: (a: number, b: number) => void;
|
|
51
30
|
export const fsafilesystem_fromHandle: (a: any) => number;
|
|
52
31
|
export const indexeddbfilesystem_create: () => any;
|
|
32
|
+
export const indexeddbfilesystem_createWithName: (a: number, b: number) => any;
|
|
33
|
+
export const init: () => void;
|
|
53
34
|
export const now_timestamp: () => [number, number];
|
|
54
35
|
export const today_formatted: (a: number, b: number) => [number, number];
|
|
55
|
-
export const
|
|
36
|
+
export const __wbg_diaryxbackend_free: (a: number, b: number) => void;
|
|
37
|
+
export const diaryxbackend_create: (a: number, b: number) => any;
|
|
38
|
+
export const diaryxbackend_createFromDirectoryHandle: (a: any) => [number, number, number];
|
|
39
|
+
export const diaryxbackend_createInMemory: () => [number, number, number];
|
|
40
|
+
export const diaryxbackend_createIndexedDb: (a: number, b: number) => any;
|
|
41
|
+
export const diaryxbackend_createOpfs: (a: number, b: number) => any;
|
|
42
|
+
export const diaryxbackend_createSyncClient: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
|
|
43
|
+
export const diaryxbackend_emitFileSystemEvent: (a: number, b: number, c: number) => [number, number];
|
|
44
|
+
export const diaryxbackend_eventSubscriberCount: (a: number) => number;
|
|
45
|
+
export const diaryxbackend_execute: (a: number, b: number, c: number) => any;
|
|
46
|
+
export const diaryxbackend_executeJs: (a: number, b: any) => any;
|
|
47
|
+
export const diaryxbackend_getConfig: (a: number) => any;
|
|
48
|
+
export const diaryxbackend_hasNativeSync: (a: number) => number;
|
|
49
|
+
export const diaryxbackend_isCrdtEnabled: (a: number) => number;
|
|
50
|
+
export const diaryxbackend_offFileSystemEvent: (a: number, b: bigint) => number;
|
|
51
|
+
export const diaryxbackend_onFileSystemEvent: (a: number, b: any) => bigint;
|
|
52
|
+
export const diaryxbackend_readBinary: (a: number, b: number, c: number) => any;
|
|
53
|
+
export const diaryxbackend_saveConfig: (a: number, b: any) => any;
|
|
54
|
+
export const diaryxbackend_setCrdtEnabled: (a: number, b: number) => void;
|
|
55
|
+
export const diaryxbackend_writeBinary: (a: number, b: number, c: number, d: any) => any;
|
|
56
|
+
export const wasm_bindgen__closure__destroy__h5cf84bf235290ebc: (a: number, b: number) => void;
|
|
56
57
|
export const wasm_bindgen__closure__destroy__h54a6b627d1123dca: (a: number, b: number) => void;
|
|
57
58
|
export const wasm_bindgen__closure__destroy__h440f08373ff30a05: (a: number, b: number) => void;
|
|
58
|
-
export const
|
|
59
|
+
export const wasm_bindgen__convert__closures_____invoke__hc572673c1045459b: (a: number, b: number, c: any) => [number, number];
|
|
59
60
|
export const wasm_bindgen__convert__closures_____invoke__h4e796b59e8c15a06: (a: number, b: number, c: any, d: any) => void;
|
|
60
|
-
export const
|
|
61
|
+
export const wasm_bindgen__convert__closures_____invoke__ha33a9e9fcc79e021: (a: number, b: number, c: any) => void;
|
|
61
62
|
export const wasm_bindgen__convert__closures_____invoke__h7d21c95eeb3011e3: (a: number, b: number, c: any) => void;
|
|
62
63
|
export const wasm_bindgen__convert__closures_____invoke__h359356b1e0b37746: (a: number, b: number, c: any) => void;
|
|
63
64
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@diaryx/wasm",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "WebAssembly bindings for Diaryx core functionality",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.14.1-dev.4061d41",
|
|
6
6
|
"license": "SEE LICENSE IN ../../LICENSE.md",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|