@diaryx/wasm 0.14.1-dev.edddcd2 → 1.0.0-dev.6cb0e0b

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 CHANGED
@@ -5,16 +5,15 @@ part_of: '[README](/crates/README.md)'
5
5
  audience:
6
6
  - developers
7
7
  contents:
8
- - '[README](/crates/diaryx_wasm/src/README.md)'
8
+ - '[README](/crates/diaryx_wasm/src/README.md)'
9
9
  attachments:
10
- - '[Cargo.toml](/crates/diaryx_wasm/Cargo.toml)'
11
- - '[build.rs](/crates/diaryx_wasm/build.rs)'
10
+ - '[Cargo.toml](/crates/diaryx_wasm/Cargo.toml)'
11
+ - '[build.rs](/crates/diaryx_wasm/build.rs)'
12
12
  exclude:
13
- - '*.lock'
14
- - '*.db'
15
- - 'pkg/**'
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
- | 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) |
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
- | doc_type | doc_name | Description |
356
- | ----------- | --------- | ---------------------------------------- |
357
- | `workspace` | `null` | The workspace file hierarchy metadata |
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
@@ -576,8 +576,6 @@ export interface InitOutput {
576
576
  readonly __wbg_wasmsyncclient_free: (a: number, b: number) => void;
577
577
  readonly jsasyncfilesystem_has_callback: (a: number, b: number, c: number) => number;
578
578
  readonly jsasyncfilesystem_new: (a: any) => number;
579
- readonly now_timestamp: () => [number, number];
580
- readonly today_formatted: (a: number, b: number) => [number, number];
581
579
  readonly wasmsyncclient_focusFiles: (a: number, b: number, c: number) => void;
582
580
  readonly wasmsyncclient_getServerUrl: (a: number) => [number, number];
583
581
  readonly wasmsyncclient_getWorkspaceId: (a: number) => [number, number];
@@ -595,7 +593,17 @@ export interface InitOutput {
595
593
  readonly wasmsyncclient_queueLocalUpdate: (a: number, b: number, c: number, d: number, e: number) => any;
596
594
  readonly wasmsyncclient_setSessionCode: (a: number, b: number, c: number) => void;
597
595
  readonly wasmsyncclient_unfocusFiles: (a: number, b: number, c: number) => void;
596
+ readonly __wbg_fsafilesystem_free: (a: number, b: number) => void;
597
+ readonly __wbg_indexeddbfilesystem_free: (a: number, b: number) => void;
598
+ readonly fsafilesystem_fromHandle: (a: any) => number;
599
+ readonly indexeddbfilesystem_create: () => any;
600
+ readonly indexeddbfilesystem_createWithName: (a: number, b: number) => any;
598
601
  readonly init: () => void;
602
+ readonly now_timestamp: () => [number, number];
603
+ readonly today_formatted: (a: number, b: number) => [number, number];
604
+ readonly __wbg_opfsfilesystem_free: (a: number, b: number) => void;
605
+ readonly opfsfilesystem_create: () => any;
606
+ readonly opfsfilesystem_createWithName: (a: number, b: number) => any;
599
607
  readonly __wbg_diaryxbackend_free: (a: number, b: number) => void;
600
608
  readonly diaryxbackend_create: (a: number, b: number) => any;
601
609
  readonly diaryxbackend_createFromDirectoryHandle: (a: any) => [number, number, number];
@@ -616,20 +624,12 @@ export interface InitOutput {
616
624
  readonly diaryxbackend_saveConfig: (a: number, b: any) => any;
617
625
  readonly diaryxbackend_setCrdtEnabled: (a: number, b: number) => void;
618
626
  readonly diaryxbackend_writeBinary: (a: number, b: number, c: number, d: any) => any;
619
- readonly __wbg_opfsfilesystem_free: (a: number, b: number) => void;
620
- readonly opfsfilesystem_create: () => any;
621
- readonly opfsfilesystem_createWithName: (a: number, b: number) => any;
622
- readonly __wbg_fsafilesystem_free: (a: number, b: number) => void;
623
- readonly __wbg_indexeddbfilesystem_free: (a: number, b: number) => void;
624
- readonly fsafilesystem_fromHandle: (a: any) => number;
625
- readonly indexeddbfilesystem_create: () => any;
626
- readonly indexeddbfilesystem_createWithName: (a: number, b: number) => any;
627
- readonly wasm_bindgen__closure__destroy__h5cf84bf235290ebc: (a: number, b: number) => void;
627
+ readonly wasm_bindgen__closure__destroy__h46bb09e97e29e99a: (a: number, b: number) => void;
628
628
  readonly wasm_bindgen__closure__destroy__h54a6b627d1123dca: (a: number, b: number) => void;
629
629
  readonly wasm_bindgen__closure__destroy__h440f08373ff30a05: (a: number, b: number) => void;
630
- readonly wasm_bindgen__convert__closures_____invoke__hc572673c1045459b: (a: number, b: number, c: any) => [number, number];
630
+ readonly wasm_bindgen__convert__closures_____invoke__h1090ee0cc08dad7c: (a: number, b: number, c: any) => [number, number];
631
631
  readonly wasm_bindgen__convert__closures_____invoke__h4e796b59e8c15a06: (a: number, b: number, c: any, d: any) => void;
632
- readonly wasm_bindgen__convert__closures_____invoke__ha33a9e9fcc79e021: (a: number, b: number, c: any) => void;
632
+ readonly wasm_bindgen__convert__closures_____invoke__he54aa79a88488277: (a: number, b: number, c: any) => void;
633
633
  readonly wasm_bindgen__convert__closures_____invoke__h7d21c95eeb3011e3: (a: number, b: number, c: any) => void;
634
634
  readonly wasm_bindgen__convert__closures_____invoke__h359356b1e0b37746: (a: number, b: number, c: any) => void;
635
635
  readonly __wbindgen_malloc: (a: number, b: number) => number;
package/diaryx_wasm.js CHANGED
@@ -1538,22 +1538,22 @@ function __wbg_get_imports() {
1538
1538
  return ret;
1539
1539
  }, arguments); },
1540
1540
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1541
- // Cast intrinsic for `Closure(Closure { dtor_idx: 574, function: Function { arguments: [NamedExternref("Event")], shim_idx: 552, 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);
1541
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 570, function: Function { arguments: [NamedExternref("Event")], shim_idx: 703, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1542
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h46bb09e97e29e99a, wasm_bindgen__convert__closures_____invoke__h1090ee0cc08dad7c);
1543
1543
  return ret;
1544
1544
  },
1545
1545
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
1546
- // Cast intrinsic for `Closure(Closure { dtor_idx: 574, function: Function { arguments: [NamedExternref("IDBVersionChangeEvent")], shim_idx: 551, 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);
1546
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 570, function: Function { arguments: [NamedExternref("IDBVersionChangeEvent")], shim_idx: 702, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1547
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h46bb09e97e29e99a, wasm_bindgen__convert__closures_____invoke__he54aa79a88488277);
1548
1548
  return ret;
1549
1549
  },
1550
1550
  __wbindgen_cast_0000000000000003: function(arg0, arg1) {
1551
- // Cast intrinsic for `Closure(Closure { dtor_idx: 785, function: Function { arguments: [NamedExternref("Event")], shim_idx: 786, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
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`.
1552
1552
  const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h54a6b627d1123dca, wasm_bindgen__convert__closures_____invoke__h7d21c95eeb3011e3);
1553
1553
  return ret;
1554
1554
  },
1555
1555
  __wbindgen_cast_0000000000000004: function(arg0, arg1) {
1556
- // Cast intrinsic for `Closure(Closure { dtor_idx: 811, function: Function { arguments: [Externref], shim_idx: 812, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
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`.
1557
1557
  const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h440f08373ff30a05, wasm_bindgen__convert__closures_____invoke__h359356b1e0b37746);
1558
1558
  return ret;
1559
1559
  },
@@ -1598,8 +1598,8 @@ function __wbg_get_imports() {
1598
1598
  };
1599
1599
  }
1600
1600
 
1601
- function wasm_bindgen__convert__closures_____invoke__ha33a9e9fcc79e021(arg0, arg1, arg2) {
1602
- wasm.wasm_bindgen__convert__closures_____invoke__ha33a9e9fcc79e021(arg0, arg1, arg2);
1601
+ function wasm_bindgen__convert__closures_____invoke__he54aa79a88488277(arg0, arg1, arg2) {
1602
+ wasm.wasm_bindgen__convert__closures_____invoke__he54aa79a88488277(arg0, arg1, arg2);
1603
1603
  }
1604
1604
 
1605
1605
  function wasm_bindgen__convert__closures_____invoke__h7d21c95eeb3011e3(arg0, arg1, arg2) {
@@ -1610,8 +1610,8 @@ function wasm_bindgen__convert__closures_____invoke__h359356b1e0b37746(arg0, arg
1610
1610
  wasm.wasm_bindgen__convert__closures_____invoke__h359356b1e0b37746(arg0, arg1, arg2);
1611
1611
  }
1612
1612
 
1613
- function wasm_bindgen__convert__closures_____invoke__hc572673c1045459b(arg0, arg1, arg2) {
1614
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__hc572673c1045459b(arg0, arg1, arg2);
1613
+ function wasm_bindgen__convert__closures_____invoke__h1090ee0cc08dad7c(arg0, arg1, arg2) {
1614
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h1090ee0cc08dad7c(arg0, arg1, arg2);
1615
1615
  if (ret[1]) {
1616
1616
  throw takeFromExternrefTable0(ret[0]);
1617
1617
  }
@@ -5,8 +5,6 @@ export const __wbg_jsasyncfilesystem_free: (a: number, b: number) => void;
5
5
  export const __wbg_wasmsyncclient_free: (a: number, b: number) => void;
6
6
  export const jsasyncfilesystem_has_callback: (a: number, b: number, c: number) => number;
7
7
  export const jsasyncfilesystem_new: (a: any) => number;
8
- export const now_timestamp: () => [number, number];
9
- export const today_formatted: (a: number, b: number) => [number, number];
10
8
  export const wasmsyncclient_focusFiles: (a: number, b: number, c: number) => void;
11
9
  export const wasmsyncclient_getServerUrl: (a: number) => [number, number];
12
10
  export const wasmsyncclient_getWorkspaceId: (a: number) => [number, number];
@@ -24,7 +22,17 @@ export const wasmsyncclient_pollOutgoingText: (a: number) => [number, number];
24
22
  export const wasmsyncclient_queueLocalUpdate: (a: number, b: number, c: number, d: number, e: number) => any;
25
23
  export const wasmsyncclient_setSessionCode: (a: number, b: number, c: number) => void;
26
24
  export const wasmsyncclient_unfocusFiles: (a: number, b: number, c: number) => void;
25
+ export const __wbg_fsafilesystem_free: (a: number, b: number) => void;
26
+ export const __wbg_indexeddbfilesystem_free: (a: number, b: number) => void;
27
+ export const fsafilesystem_fromHandle: (a: any) => number;
28
+ export const indexeddbfilesystem_create: () => any;
29
+ export const indexeddbfilesystem_createWithName: (a: number, b: number) => any;
27
30
  export const init: () => void;
31
+ export const now_timestamp: () => [number, number];
32
+ export const today_formatted: (a: number, b: number) => [number, number];
33
+ export const __wbg_opfsfilesystem_free: (a: number, b: number) => void;
34
+ export const opfsfilesystem_create: () => any;
35
+ export const opfsfilesystem_createWithName: (a: number, b: number) => any;
28
36
  export const __wbg_diaryxbackend_free: (a: number, b: number) => void;
29
37
  export const diaryxbackend_create: (a: number, b: number) => any;
30
38
  export const diaryxbackend_createFromDirectoryHandle: (a: any) => [number, number, number];
@@ -45,20 +53,12 @@ export const diaryxbackend_readBinary: (a: number, b: number, c: number) => any;
45
53
  export const diaryxbackend_saveConfig: (a: number, b: any) => any;
46
54
  export const diaryxbackend_setCrdtEnabled: (a: number, b: number) => void;
47
55
  export const diaryxbackend_writeBinary: (a: number, b: number, c: number, d: any) => any;
48
- export const __wbg_opfsfilesystem_free: (a: number, b: number) => void;
49
- export const opfsfilesystem_create: () => any;
50
- export const opfsfilesystem_createWithName: (a: number, b: number) => any;
51
- export const __wbg_fsafilesystem_free: (a: number, b: number) => void;
52
- export const __wbg_indexeddbfilesystem_free: (a: number, b: number) => void;
53
- export const fsafilesystem_fromHandle: (a: any) => number;
54
- export const indexeddbfilesystem_create: () => any;
55
- export const indexeddbfilesystem_createWithName: (a: number, b: number) => any;
56
- export const wasm_bindgen__closure__destroy__h5cf84bf235290ebc: (a: number, b: number) => void;
56
+ export const wasm_bindgen__closure__destroy__h46bb09e97e29e99a: (a: number, b: number) => void;
57
57
  export const wasm_bindgen__closure__destroy__h54a6b627d1123dca: (a: number, b: number) => void;
58
58
  export const wasm_bindgen__closure__destroy__h440f08373ff30a05: (a: number, b: number) => void;
59
- export const wasm_bindgen__convert__closures_____invoke__hc572673c1045459b: (a: number, b: number, c: any) => [number, number];
59
+ export const wasm_bindgen__convert__closures_____invoke__h1090ee0cc08dad7c: (a: number, b: number, c: any) => [number, number];
60
60
  export const wasm_bindgen__convert__closures_____invoke__h4e796b59e8c15a06: (a: number, b: number, c: any, d: any) => void;
61
- export const wasm_bindgen__convert__closures_____invoke__ha33a9e9fcc79e021: (a: number, b: number, c: any) => void;
61
+ export const wasm_bindgen__convert__closures_____invoke__he54aa79a88488277: (a: number, b: number, c: any) => void;
62
62
  export const wasm_bindgen__convert__closures_____invoke__h7d21c95eeb3011e3: (a: number, b: number, c: any) => void;
63
63
  export const wasm_bindgen__convert__closures_____invoke__h359356b1e0b37746: (a: number, b: number, c: any) => void;
64
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.14.1-dev.edddcd2",
5
+ "version": "1.0.0-dev.6cb0e0b",
6
6
  "license": "SEE LICENSE IN ../../LICENSE.md",
7
7
  "repository": {
8
8
  "type": "git",