@diaryx/wasm 0.11.0 → 0.11.1-dev.193efc4

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/diaryx_wasm.d.ts CHANGED
@@ -184,42 +184,43 @@ export class DiaryxBackend {
184
184
  /**
185
185
  * Create a new sync client for the given server and workspace.
186
186
  *
187
- * This creates a `WasmSyncClient` that wraps `SyncClient<CallbackTransport>`.
188
- * JavaScript manages WebSocket connections while Rust handles all sync logic.
187
+ * Creates a `WasmSyncClient` backed by the shared `SyncSession` protocol
188
+ * handler. JavaScript manages the WebSocket while Rust handles all sync
189
+ * protocol logic (handshake, message routing, framing).
189
190
  *
190
191
  * ## Example
191
192
  *
192
193
  * ```javascript
193
194
  * const client = backend.createSyncClient(
194
- * 'wss://sync.example.com/sync',
195
+ * 'https://sync.example.com',
195
196
  * 'my-workspace-id',
196
197
  * 'auth-token-optional'
197
198
  * );
198
199
  *
199
- * // Get URLs and create WebSocket connections
200
- * const metaUrl = client.getMetadataUrl();
201
- * const bodyUrl = client.getBodyUrl();
202
- *
203
- * // Create WebSockets and connect them to the client
204
- * const metaWs = new WebSocket(metaUrl);
205
- * metaWs.binaryType = 'arraybuffer';
206
- * metaWs.onopen = () => client.markMetadataConnected();
207
- * metaWs.onclose = () => client.markMetadataDisconnected();
208
- * metaWs.onmessage = async (e) => {
209
- * const response = await client.injectMetadataMessage(new Uint8Array(e.data));
210
- * if (response) metaWs.send(response);
211
- * };
212
- * // Similar for body WebSocket...
200
+ * // Get the WebSocket URL
201
+ * const wsUrl = client.getWsUrl();
202
+ * const ws = new WebSocket(wsUrl);
203
+ * ws.binaryType = 'arraybuffer';
213
204
  *
214
- * // Poll for outgoing messages
215
- * setInterval(() => {
205
+ * ws.onopen = async () => {
206
+ * await client.onConnected();
207
+ * // Drain outgoing messages
216
208
  * let msg;
217
- * while ((msg = client.pollMetadataOutgoing())) metaWs.send(msg);
218
- * while ((msg = client.pollBodyOutgoing())) bodyWs.send(msg);
219
- * }, 50);
209
+ * while ((msg = client.pollOutgoingBinary())) ws.send(msg);
210
+ * while ((msg = client.pollOutgoingText())) ws.send(msg);
211
+ * };
220
212
  *
221
- * // Start sync
222
- * await client.start();
213
+ * ws.onmessage = async (e) => {
214
+ * if (typeof e.data === 'string') {
215
+ * await client.onTextMessage(e.data);
216
+ * } else {
217
+ * await client.onBinaryMessage(new Uint8Array(e.data));
218
+ * }
219
+ * // Drain outgoing messages and events
220
+ * let msg;
221
+ * while ((msg = client.pollOutgoingBinary())) ws.send(msg);
222
+ * while ((msg = client.pollOutgoingText())) ws.send(msg);
223
+ * };
223
224
  * ```
224
225
  */
225
226
  createSyncClient(server_url: string, workspace_id: string, auth_token?: string | null): WasmSyncClient;
@@ -265,37 +266,11 @@ export class DiaryxBackend {
265
266
  * This avoids JSON serialization overhead for better performance.
266
267
  */
267
268
  executeJs(command: any): Promise<any>;
268
- /**
269
- * Get initial body sync step1 message for a document.
270
- *
271
- * Returns a Uint8Array containing the Y-sync step1 message for
272
- * the specified document's body content.
273
- *
274
- * ## Example
275
- * ```javascript
276
- * const step1 = backend.getBodySyncStep1("notes/my-note.md");
277
- * // Frame it for multiplexed connection and send
278
- * ```
279
- */
280
- getBodySyncStep1(doc_name: string): Uint8Array;
281
269
  /**
282
270
  * Get the current configuration from root index frontmatter.
283
271
  * Config keys are stored as `diaryx_*` properties.
284
272
  */
285
273
  getConfig(): Promise<any>;
286
- /**
287
- * Get initial workspace sync step1 message.
288
- *
289
- * Returns a Uint8Array containing the Y-sync step1 message to send
290
- * over the WebSocket to initiate workspace metadata sync.
291
- *
292
- * ## Example
293
- * ```javascript
294
- * const step1 = backend.getWorkspaceSyncStep1();
295
- * ws.send(step1);
296
- * ```
297
- */
298
- getWorkspaceSyncStep1(): Uint8Array;
299
274
  /**
300
275
  * Check if this backend has native sync support.
301
276
  *
@@ -303,42 +278,6 @@ export class DiaryxBackend {
303
278
  * provides a unified approach that works across all platforms.
304
279
  */
305
280
  hasNativeSync(): boolean;
306
- /**
307
- * Check if there are pending outgoing sync messages.
308
- */
309
- hasOutgoingSyncMessages(): boolean;
310
- /**
311
- * Inject an incoming body sync message.
312
- *
313
- * Call this when the WebSocket receives a message for a body document.
314
- * The message should already be unframed (doc_name extracted separately).
315
- * Returns a response message to send back, or null if no response is needed.
316
- *
317
- * ## Example
318
- * ```javascript
319
- * // After unframing the multiplexed message:
320
- * const response = await backend.injectBodySyncMessage(docName, data, true);
321
- * if (response) ws.send(frameBodyMessage(docName, response));
322
- * ```
323
- */
324
- injectBodySyncMessage(doc_name: string, message: Uint8Array, write_to_disk: boolean): Promise<any>;
325
- /**
326
- * Inject an incoming workspace sync message.
327
- *
328
- * Call this when the WebSocket receives a message for the workspace
329
- * (metadata) connection. Returns a response message to send back,
330
- * or null if no response is needed.
331
- *
332
- * ## Example
333
- * ```javascript
334
- * ws.onmessage = (event) => {
335
- * const data = new Uint8Array(event.data);
336
- * const response = backend.injectWorkspaceSyncMessage(data, true);
337
- * if (response) ws.send(response);
338
- * };
339
- * ```
340
- */
341
- injectWorkspaceSyncMessage(message: Uint8Array, write_to_disk: boolean): Promise<any>;
342
281
  /**
343
282
  * Unsubscribe from filesystem events.
344
283
  *
@@ -375,35 +314,6 @@ export class DiaryxBackend {
375
314
  * ```
376
315
  */
377
316
  onFileSystemEvent(callback: Function): bigint;
378
- /**
379
- * Get count of pending outgoing sync messages.
380
- */
381
- outgoingSyncMessageCount(): number;
382
- /**
383
- * Poll for an outgoing sync message.
384
- *
385
- * Returns the next outgoing message as a JavaScript object with:
386
- * - `docName`: Document name ("workspace" or file path)
387
- * - `message`: Uint8Array message data
388
- * - `isBody`: Boolean indicating body (true) or workspace (false)
389
- *
390
- * Returns null if no messages are queued.
391
- *
392
- * ## Example
393
- * ```javascript
394
- * setInterval(() => {
395
- * let msg;
396
- * while ((msg = backend.pollOutgoingSyncMessage()) !== null) {
397
- * if (msg.isBody) {
398
- * bodyWs.send(frameBodyMessage(msg.docName, msg.message));
399
- * } else {
400
- * workspaceWs.send(msg.message);
401
- * }
402
- * }
403
- * }, 50);
404
- * ```
405
- */
406
- pollOutgoingSyncMessage(): any;
407
317
  /**
408
318
  * Read binary file.
409
319
  *
@@ -415,26 +325,6 @@ export class DiaryxBackend {
415
325
  * Config keys are stored as `diaryx_*` properties.
416
326
  */
417
327
  saveConfig(config_js: any): Promise<any>;
418
- /**
419
- * Start sync session and set up event bridge.
420
- *
421
- * This wires up the sync manager's event callback to queue outgoing
422
- * messages. Call this before connecting WebSocket.
423
- *
424
- * ## Example
425
- * ```javascript
426
- * backend.startSync();
427
- * const ws = new WebSocket(url);
428
- * // ... rest of setup
429
- * ```
430
- */
431
- startSync(): void;
432
- /**
433
- * Stop sync session.
434
- *
435
- * Clears the outgoing message queue. Call after disconnecting WebSocket.
436
- */
437
- stopSync(): void;
438
328
  /**
439
329
  * Write binary file.
440
330
  *
@@ -536,57 +426,22 @@ export class OpfsFileSystem {
536
426
  }
537
427
 
538
428
  /**
539
- * WASM sync client wrapper for JavaScript integration.
429
+ * WASM sync client backed by the shared SyncSession protocol handler.
540
430
  *
541
- * This struct wraps a `SyncClient<CallbackTransport>` and exposes its
542
- * functionality to JavaScript via wasm-bindgen. It manages two transports
543
- * (metadata and body) and provides methods for:
544
- *
545
- * - Getting WebSocket URLs for connection
546
- * - Notifying connection status changes
547
- * - Injecting incoming messages
548
- * - Polling for outgoing messages
549
- * - Starting and stopping sync
431
+ * JavaScript feeds WebSocket events in via `onConnected()`, `onBinaryMessage()`,
432
+ * etc. The client processes them through `SyncSession` and queues outgoing
433
+ * messages/events for JavaScript to poll.
550
434
  */
551
435
  export class WasmSyncClient {
552
436
  private constructor();
553
437
  free(): void;
554
438
  [Symbol.dispose](): void;
555
439
  /**
556
- * Focus on specific files for sync.
557
- *
558
- * Sends a focus message to the server indicating which files the client
559
- * is currently interested in syncing. Other clients will receive a
560
- * `focus_list_changed` notification and can subscribe to sync updates
561
- * for these files.
440
+ * Send a focus message for specific files.
562
441
  *
563
- * Call this when a file is opened in the editor.
564
- *
565
- * ## Example
566
- * ```javascript
567
- * // User opens a file
568
- * client.focusFiles(["workspace/notes.md"]);
569
- * ```
442
+ * Other clients will be notified which files this client is interested in.
570
443
  */
571
444
  focusFiles(files: string[]): void;
572
- /**
573
- * Get the initial SyncStep1 message for a body document.
574
- *
575
- * Returns a Uint8Array containing the framed message to send via WebSocket.
576
- */
577
- getBodySyncStep1(doc_name: string): Uint8Array;
578
- /**
579
- * Get the WebSocket URL for the body connection.
580
- *
581
- * Returns null if sync hasn't been configured.
582
- */
583
- getBodyUrl(): string | undefined;
584
- /**
585
- * Get the WebSocket URL for the metadata connection.
586
- *
587
- * Returns null if sync hasn't been configured.
588
- */
589
- getMetadataUrl(): string | undefined;
590
445
  /**
591
446
  * Get the server URL.
592
447
  */
@@ -596,166 +451,81 @@ export class WasmSyncClient {
596
451
  */
597
452
  getWorkspaceId(): string;
598
453
  /**
599
- * Get the initial SyncStep1 message for workspace sync.
600
- *
601
- * Returns a Uint8Array containing the message to send via WebSocket.
602
- */
603
- getWorkspaceSyncStep1(): Uint8Array;
604
- /**
605
- * Check if there are pending body outgoing messages.
606
- */
607
- hasBodyOutgoing(): boolean;
608
- /**
609
- * Check if there are pending body outgoing text messages.
610
- */
611
- hasBodyOutgoingText(): boolean;
612
- /**
613
- * Check if there are pending metadata outgoing messages.
614
- */
615
- hasMetadataOutgoing(): boolean;
616
- /**
617
- * Inject an incoming body message.
618
- *
619
- * Call this when the body WebSocket receives a message.
620
- * The message should already be unframed (doc_name extracted separately).
621
- * Returns a Promise that resolves to a Uint8Array response (or null).
622
- */
623
- injectBodyMessage(doc_name: string, message: Uint8Array): Promise<any>;
624
- /**
625
- * Inject an incoming metadata message.
454
+ * Get the WebSocket URL for the v2 sync connection.
626
455
  *
627
- * Call this when the metadata WebSocket receives a message.
628
- * Returns a Promise that resolves to a Uint8Array response (or null).
629
- *
630
- * The response should be sent back via the WebSocket if not null.
631
- */
632
- injectMetadataMessage(message: Uint8Array): Promise<any>;
633
- /**
634
- * Check if the body connection is established.
635
- */
636
- isBodyConnected(): boolean;
637
- /**
638
- * Check if both connections are established.
456
+ * Returns a URL like `wss://sync.example.com/sync2?token=...&session=...`
639
457
  */
640
- isConnected(): boolean;
458
+ getWsUrl(): string;
641
459
  /**
642
- * Check if the metadata connection is established.
460
+ * Check if there are pending events.
643
461
  */
644
- isMetadataConnected(): boolean;
462
+ hasEvents(): boolean;
645
463
  /**
646
- * Check if the sync client is running.
464
+ * Check if there are pending outgoing messages or events.
647
465
  */
648
- isRunning(): boolean;
466
+ hasOutgoing(): boolean;
649
467
  /**
650
- * Mark the body connection as connected.
468
+ * Inject an incoming binary WebSocket message.
651
469
  *
652
- * Call this when the body WebSocket opens.
470
+ * Returns a Promise that resolves when processing is complete.
471
+ * After this, poll outgoing queues.
653
472
  */
654
- markBodyConnected(): void;
473
+ onBinaryMessage(data: Uint8Array): Promise<any>;
655
474
  /**
656
- * Mark the body connection as disconnected.
475
+ * Notify that the WebSocket connected.
657
476
  *
658
- * Call this when the body WebSocket closes.
477
+ * Triggers workspace SyncStep1 and handshake. After calling this,
478
+ * poll `pollOutgoingBinary()` / `pollOutgoingText()` to get messages to send.
659
479
  */
660
- markBodyDisconnected(): void;
480
+ onConnected(): Promise<any>;
661
481
  /**
662
- * Mark the metadata connection as connected.
663
- *
664
- * Call this when the metadata WebSocket opens.
482
+ * Notify that the WebSocket disconnected.
665
483
  */
666
- markMetadataConnected(): void;
484
+ onDisconnected(): Promise<any>;
667
485
  /**
668
- * Mark the metadata connection as disconnected.
486
+ * Notify that a snapshot was downloaded and imported.
669
487
  *
670
- * Call this when the metadata WebSocket closes.
488
+ * Call this after handling a `downloadSnapshot` event.
671
489
  */
672
- markMetadataDisconnected(): void;
490
+ onSnapshotImported(): Promise<any>;
673
491
  /**
674
- * Poll for an outgoing body message.
492
+ * Inject an incoming text WebSocket message (JSON control message).
675
493
  *
676
- * Returns a Uint8Array if there's a message to send, null otherwise.
677
- * The message is already framed with the document name.
494
+ * Returns a Promise that resolves when processing is complete.
678
495
  */
679
- pollBodyOutgoing(): Uint8Array | undefined;
496
+ onTextMessage(text: string): Promise<any>;
680
497
  /**
681
- * Poll for an outgoing body text message (for focus/unfocus).
498
+ * Poll for a JSON-serialized event.
682
499
  *
683
- * Returns a string if there's a text message to send, null otherwise.
684
- * JavaScript should call this in a polling loop and send any messages
685
- * via the body WebSocket as text frames.
500
+ * Returns a JSON string representing a SyncEvent, or null.
686
501
  */
687
- pollBodyOutgoingText(): string | undefined;
502
+ pollEvent(): string | undefined;
688
503
  /**
689
- * Poll for an outgoing metadata message.
504
+ * Poll for an outgoing binary message.
690
505
  *
691
506
  * Returns a Uint8Array if there's a message to send, null otherwise.
692
- * JavaScript should call this in a polling loop and send any messages
693
- * via the metadata WebSocket.
694
- */
695
- pollMetadataOutgoing(): Uint8Array | undefined;
696
- /**
697
- * Queue a body update message for sending.
698
- *
699
- * This creates a Y-sync Update message for the given document
700
- * and queues it for sending via the body WebSocket.
701
- */
702
- queueBodyUpdate(doc_name: string, content: string): void;
703
- /**
704
- * Queue a workspace update message for sending.
705
- *
706
- * This creates a Y-sync Update message from the current workspace state
707
- * and queues it for sending via the metadata WebSocket.
708
- */
709
- queueWorkspaceUpdate(): void;
710
- /**
711
- * Start the sync session.
712
- *
713
- * This should be called after both WebSocket connections are established.
714
- * It sends the initial SyncStep1 messages and subscribes to all body docs.
715
- *
716
- * Returns a Promise that resolves when initial sync messages are sent.
717
507
  */
718
- start(): Promise<any>;
508
+ pollOutgoingBinary(): Uint8Array | undefined;
719
509
  /**
720
- * Stop the sync session.
510
+ * Poll for an outgoing text message.
721
511
  *
722
- * Clears all pending messages and resets state.
512
+ * Returns a string if there's a message to send, null otherwise.
723
513
  */
724
- stop(): void;
514
+ pollOutgoingText(): string | undefined;
725
515
  /**
726
- * Subscribe to body sync for the currently focused files.
516
+ * Queue a local CRDT update for sending to the server.
727
517
  *
728
- * This sends SyncStep1 messages for all files in the provided list.
729
- * Call this after receiving a `focus_list_changed` message from the server.
730
- *
731
- * ## Example
732
- * ```javascript
733
- * // Received focus_list_changed event
734
- * const files = event.files;
735
- * client.subscribeBodies(files);
736
- * ```
518
+ * Call this when local CRDT changes need to be synced.
737
519
  */
738
- subscribeBodies(files: string[]): void;
520
+ queueLocalUpdate(doc_id: string, data: Uint8Array): Promise<any>;
739
521
  /**
740
- * Subscribe to body sync for a specific document.
522
+ * Set a share session code.
741
523
  *
742
- * This queues a SyncStep1 message for the given document.
743
- * Call this when a new file is created or when opening a file for editing.
524
+ * Call this before connecting to join a share session.
744
525
  */
745
- subscribeBody(doc_name: string): void;
526
+ setSessionCode(code: string): void;
746
527
  /**
747
- * Unfocus specific files.
748
- *
749
- * Sends an unfocus message to the server indicating the client is no
750
- * longer interested in syncing these files.
751
- *
752
- * Call this when a file is closed in the editor.
753
- *
754
- * ## Example
755
- * ```javascript
756
- * // User closes a file
757
- * client.unfocusFiles(["workspace/notes.md"]);
758
- * ```
528
+ * Send an unfocus message for specific files.
759
529
  */
760
530
  unfocusFiles(files: string[]): void;
761
531
  }
@@ -779,19 +549,8 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
779
549
 
780
550
  export interface InitOutput {
781
551
  readonly memory: WebAssembly.Memory;
782
- readonly __wbg_indexeddbfilesystem_free: (a: number, b: number) => void;
783
- readonly __wbg_jsasyncfilesystem_free: (a: number, b: number) => void;
784
- readonly indexeddbfilesystem_create: () => any;
785
- readonly jsasyncfilesystem_has_callback: (a: number, b: number, c: number) => number;
786
- readonly jsasyncfilesystem_new: (a: any) => number;
787
- readonly __wbg_fsafilesystem_free: (a: number, b: number) => void;
788
- readonly __wbg_opfsfilesystem_free: (a: number, b: number) => void;
789
- readonly opfsfilesystem_create: () => any;
790
- readonly opfsfilesystem_createWithName: (a: number, b: number) => any;
791
- readonly fsafilesystem_fromHandle: (a: any) => number;
792
- readonly now_timestamp: () => [number, number];
793
- readonly today_formatted: (a: number, b: number) => [number, number];
794
552
  readonly __wbg_diaryxbackend_free: (a: number, b: number) => void;
553
+ readonly __wbg_jsasyncfilesystem_free: (a: number, b: number) => void;
795
554
  readonly diaryxbackend_create: (a: number, b: number) => any;
796
555
  readonly diaryxbackend_createFromDirectoryHandle: (a: any) => [number, number, number];
797
556
  readonly diaryxbackend_createInMemory: () => [number, number, number];
@@ -802,62 +561,51 @@ export interface InitOutput {
802
561
  readonly diaryxbackend_eventSubscriberCount: (a: number) => number;
803
562
  readonly diaryxbackend_execute: (a: number, b: number, c: number) => any;
804
563
  readonly diaryxbackend_executeJs: (a: number, b: any) => any;
805
- readonly diaryxbackend_getBodySyncStep1: (a: number, b: number, c: number) => any;
806
564
  readonly diaryxbackend_getConfig: (a: number) => any;
807
- readonly diaryxbackend_getWorkspaceSyncStep1: (a: number) => any;
808
565
  readonly diaryxbackend_hasNativeSync: (a: number) => number;
809
- readonly diaryxbackend_hasOutgoingSyncMessages: (a: number) => number;
810
- readonly diaryxbackend_injectBodySyncMessage: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
811
- readonly diaryxbackend_injectWorkspaceSyncMessage: (a: number, b: number, c: number, d: number) => any;
812
566
  readonly diaryxbackend_offFileSystemEvent: (a: number, b: bigint) => number;
813
567
  readonly diaryxbackend_onFileSystemEvent: (a: number, b: any) => bigint;
814
- readonly diaryxbackend_outgoingSyncMessageCount: (a: number) => number;
815
- readonly diaryxbackend_pollOutgoingSyncMessage: (a: number) => any;
816
568
  readonly diaryxbackend_readBinary: (a: number, b: number, c: number) => any;
817
569
  readonly diaryxbackend_saveConfig: (a: number, b: any) => any;
818
- readonly diaryxbackend_startSync: (a: number) => void;
819
- readonly diaryxbackend_stopSync: (a: number) => void;
820
570
  readonly diaryxbackend_writeBinary: (a: number, b: number, c: number, d: any) => any;
571
+ readonly jsasyncfilesystem_has_callback: (a: number, b: number, c: number) => number;
572
+ readonly jsasyncfilesystem_new: (a: any) => number;
821
573
  readonly init: () => void;
574
+ readonly __wbg_indexeddbfilesystem_free: (a: number, b: number) => void;
575
+ readonly __wbg_opfsfilesystem_free: (a: number, b: number) => void;
576
+ readonly indexeddbfilesystem_create: () => any;
577
+ readonly opfsfilesystem_create: () => any;
578
+ readonly opfsfilesystem_createWithName: (a: number, b: number) => any;
579
+ readonly now_timestamp: () => [number, number];
580
+ readonly today_formatted: (a: number, b: number) => [number, number];
581
+ readonly __wbg_fsafilesystem_free: (a: number, b: number) => void;
822
582
  readonly __wbg_wasmsyncclient_free: (a: number, b: number) => void;
823
583
  readonly wasmsyncclient_focusFiles: (a: number, b: number, c: number) => void;
824
- readonly wasmsyncclient_getBodySyncStep1: (a: number, b: number, c: number) => any;
825
- readonly wasmsyncclient_getBodyUrl: (a: number) => [number, number];
826
- readonly wasmsyncclient_getMetadataUrl: (a: number) => [number, number];
827
584
  readonly wasmsyncclient_getServerUrl: (a: number) => [number, number];
828
585
  readonly wasmsyncclient_getWorkspaceId: (a: number) => [number, number];
829
- readonly wasmsyncclient_getWorkspaceSyncStep1: (a: number) => any;
830
- readonly wasmsyncclient_hasBodyOutgoing: (a: number) => number;
831
- readonly wasmsyncclient_hasBodyOutgoingText: (a: number) => number;
832
- readonly wasmsyncclient_hasMetadataOutgoing: (a: number) => number;
833
- readonly wasmsyncclient_injectBodyMessage: (a: number, b: number, c: number, d: number, e: number) => any;
834
- readonly wasmsyncclient_injectMetadataMessage: (a: number, b: number, c: number) => any;
835
- readonly wasmsyncclient_isBodyConnected: (a: number) => number;
836
- readonly wasmsyncclient_isConnected: (a: number) => number;
837
- readonly wasmsyncclient_isMetadataConnected: (a: number) => number;
838
- readonly wasmsyncclient_isRunning: (a: number) => number;
839
- readonly wasmsyncclient_markBodyConnected: (a: number) => void;
840
- readonly wasmsyncclient_markBodyDisconnected: (a: number) => void;
841
- readonly wasmsyncclient_markMetadataConnected: (a: number) => void;
842
- readonly wasmsyncclient_markMetadataDisconnected: (a: number) => void;
843
- readonly wasmsyncclient_pollBodyOutgoing: (a: number) => any;
844
- readonly wasmsyncclient_pollBodyOutgoingText: (a: number) => [number, number];
845
- readonly wasmsyncclient_pollMetadataOutgoing: (a: number) => any;
846
- readonly wasmsyncclient_queueBodyUpdate: (a: number, b: number, c: number, d: number, e: number) => [number, number];
847
- readonly wasmsyncclient_queueWorkspaceUpdate: (a: number) => [number, number];
848
- readonly wasmsyncclient_start: (a: number) => any;
849
- readonly wasmsyncclient_stop: (a: number) => void;
850
- readonly wasmsyncclient_subscribeBodies: (a: number, b: number, c: number) => void;
851
- readonly wasmsyncclient_subscribeBody: (a: number, b: number, c: number) => void;
586
+ readonly wasmsyncclient_getWsUrl: (a: number) => [number, number];
587
+ readonly wasmsyncclient_hasEvents: (a: number) => number;
588
+ readonly wasmsyncclient_hasOutgoing: (a: number) => number;
589
+ readonly wasmsyncclient_onBinaryMessage: (a: number, b: number, c: number) => any;
590
+ readonly wasmsyncclient_onConnected: (a: number) => any;
591
+ readonly wasmsyncclient_onDisconnected: (a: number) => any;
592
+ readonly wasmsyncclient_onSnapshotImported: (a: number) => any;
593
+ readonly wasmsyncclient_onTextMessage: (a: number, b: number, c: number) => any;
594
+ readonly wasmsyncclient_pollEvent: (a: number) => [number, number];
595
+ readonly wasmsyncclient_pollOutgoingBinary: (a: number) => any;
596
+ readonly wasmsyncclient_pollOutgoingText: (a: number) => [number, number];
597
+ readonly wasmsyncclient_queueLocalUpdate: (a: number, b: number, c: number, d: number, e: number) => any;
598
+ readonly wasmsyncclient_setSessionCode: (a: number, b: number, c: number) => void;
852
599
  readonly wasmsyncclient_unfocusFiles: (a: number, b: number, c: number) => void;
853
- readonly wasm_bindgen__closure__destroy__h28df2ee661749669: (a: number, b: number) => void;
854
- readonly wasm_bindgen__closure__destroy__h5cf44c247c58c7e4: (a: number, b: number) => void;
855
- readonly wasm_bindgen__closure__destroy__h9e8d4146731933b4: (a: number, b: number) => void;
856
- readonly wasm_bindgen__convert__closures_____invoke__ha897f5a6ec9291db: (a: number, b: number, c: any) => [number, number];
857
- readonly wasm_bindgen__convert__closures_____invoke__h4ffe3e306d53c3fd: (a: number, b: number, c: any, d: any) => void;
858
- readonly wasm_bindgen__convert__closures_____invoke__h841a77a6e340370c: (a: number, b: number, c: any) => void;
859
- readonly wasm_bindgen__convert__closures_____invoke__h5baa53a7fa33b538: (a: number, b: number, c: any) => void;
860
- readonly wasm_bindgen__convert__closures_____invoke__h5ab46734fc677051: (a: number, b: number, c: any) => void;
600
+ readonly fsafilesystem_fromHandle: (a: any) => number;
601
+ readonly wasm_bindgen__closure__destroy__h07a67dc9810a4be6: (a: number, b: number) => void;
602
+ readonly wasm_bindgen__closure__destroy__h54a6b627d1123dca: (a: number, b: number) => void;
603
+ readonly wasm_bindgen__closure__destroy__h440f08373ff30a05: (a: number, b: number) => void;
604
+ readonly wasm_bindgen__convert__closures_____invoke__h599d65e67049bef4: (a: number, b: number, c: any) => [number, number];
605
+ readonly wasm_bindgen__convert__closures_____invoke__h4e796b59e8c15a06: (a: number, b: number, c: any, d: any) => void;
606
+ readonly wasm_bindgen__convert__closures_____invoke__h41872df2b19d108c: (a: number, b: number, c: any) => void;
607
+ readonly wasm_bindgen__convert__closures_____invoke__h7d21c95eeb3011e3: (a: number, b: number, c: any) => void;
608
+ readonly wasm_bindgen__convert__closures_____invoke__h359356b1e0b37746: (a: number, b: number, c: any) => void;
861
609
  readonly __wbindgen_malloc: (a: number, b: number) => number;
862
610
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
863
611
  readonly __wbindgen_exn_store: (a: number) => void;