@typerighter/rpc-client 0.20.1 → 0.20.3

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@typerighter/rpc-client",
4
- "version": "0.20.1",
4
+ "version": "0.20.3",
5
5
  "description": "WASM RPC client for Typedown.",
6
6
  "repository": {
7
7
  "type": "git",
@@ -51,6 +51,18 @@ export interface TdFileMetadata {
51
51
  ctime: number;
52
52
  }
53
53
 
54
+ /**
55
+ * Lightweight sidebar item (no header/content/excerpt)
56
+ */
57
+ export interface TdSidebarItem {
58
+ filepath: string;
59
+ schema?: string;
60
+ schemaLabel?: string;
61
+ label?: string;
62
+ icon?: TdIcon;
63
+ metadata: TdFileMetadata;
64
+ }
65
+
54
66
  /**
55
67
  * Lightweight summary of a content file (no body content)
56
68
  */
@@ -207,6 +219,7 @@ export class RpcClient {
207
219
  getSchema(schema: string): Promise<TdSchemaInfo>;
208
220
  listFilesGroupedBySchema(): Promise<any>;
209
221
  listSchemas(): Promise<string[]>;
222
+ listSidebar(): Promise<TdSidebarItem[]>;
210
223
  listVault(): Promise<string[]>;
211
224
  onConfigChanged(callback: Function): void;
212
225
  onContentChanged(callback: Function): void;
@@ -85,6 +85,13 @@ export class RpcClient {
85
85
  const ret = wasm.rpcclient_listSchemas(this.__wbg_ptr);
86
86
  return ret;
87
87
  }
88
+ /**
89
+ * @returns {Promise<TdSidebarItem[]>}
90
+ */
91
+ listSidebar() {
92
+ const ret = wasm.rpcclient_listSidebar(this.__wbg_ptr);
93
+ return ret;
94
+ }
88
95
  /**
89
96
  * @returns {Promise<string[]>}
90
97
  */
@@ -418,32 +425,32 @@ export function __wbg_wasClean_3c7aa2335da09e74(arg0) {
418
425
  return ret;
419
426
  }
420
427
  export function __wbindgen_cast_0000000000000001(arg0, arg1) {
421
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 268, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
428
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 276, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
422
429
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_bf4b4b12d3f72955___convert__closures_____invoke___wasm_bindgen_bf4b4b12d3f72955___JsValue__core_f0fd674eaa06beef___result__Result_____wasm_bindgen_bf4b4b12d3f72955___JsError___true_);
423
430
  return ret;
424
431
  }
425
432
  export function __wbindgen_cast_0000000000000002(arg0, arg1) {
426
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 167, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
433
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 175, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
427
434
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_bf4b4b12d3f72955___convert__closures_____invoke___web_sys_3cc68d34740d5c49___features__gen_CloseEvent__CloseEvent______true_);
428
435
  return ret;
429
436
  }
430
437
  export function __wbindgen_cast_0000000000000003(arg0, arg1) {
431
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 167, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
438
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 175, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
432
439
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_bf4b4b12d3f72955___convert__closures_____invoke___web_sys_3cc68d34740d5c49___features__gen_CloseEvent__CloseEvent______true__2);
433
440
  return ret;
434
441
  }
435
442
  export function __wbindgen_cast_0000000000000004(arg0, arg1) {
436
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 167, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
443
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 175, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
437
444
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_bf4b4b12d3f72955___convert__closures_____invoke___web_sys_3cc68d34740d5c49___features__gen_CloseEvent__CloseEvent______true__3);
438
445
  return ret;
439
446
  }
440
447
  export function __wbindgen_cast_0000000000000005(arg0, arg1) {
441
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 171, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
448
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 179, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
442
449
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_bf4b4b12d3f72955___convert__closures_____invoke_______true_);
443
450
  return ret;
444
451
  }
445
452
  export function __wbindgen_cast_0000000000000006(arg0, arg1) {
446
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 247, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
453
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 255, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
447
454
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_bf4b4b12d3f72955___convert__closures_____invoke_______true__1_);
448
455
  return ret;
449
456
  }
@@ -475,6 +482,13 @@ export function __wbindgen_cast_000000000000000b(arg0, arg1) {
475
482
  return ret;
476
483
  }
477
484
  export function __wbindgen_cast_000000000000000c(arg0, arg1) {
485
+ var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
486
+ wasm.__wbindgen_free(arg0, arg1 * 4, 4);
487
+ // Cast intrinsic for `Vector(NamedExternref("TdSidebarItem")) -> Externref`.
488
+ const ret = v0;
489
+ return ret;
490
+ }
491
+ export function __wbindgen_cast_000000000000000d(arg0, arg1) {
478
492
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
479
493
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
480
494
  // Cast intrinsic for `Vector(NamedExternref("string")) -> Externref`.
Binary file
@@ -11,6 +11,7 @@ export const rpcclient_getConfig: (a: number) => any;
11
11
  export const rpcclient_getSchema: (a: number, b: number, c: number) => any;
12
12
  export const rpcclient_listFilesGroupedBySchema: (a: number) => any;
13
13
  export const rpcclient_listSchemas: (a: number) => any;
14
+ export const rpcclient_listSidebar: (a: number) => any;
14
15
  export const rpcclient_listVault: (a: number) => any;
15
16
  export const rpcclient_onConfigChanged: (a: number, b: any) => void;
16
17
  export const rpcclient_onContentChanged: (a: number, b: any) => void;