@diaryx/wasm 0.11.0-dev.449d9b2 → 0.11.1-dev.0fde73f
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 +97 -349
- package/diaryx_wasm.js +125 -453
- package/diaryx_wasm_bg.wasm.d.ts +28 -50
- package/package.json +1 -1
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
|
-
*
|
|
188
|
-
* JavaScript manages WebSocket
|
|
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
|
-
* '
|
|
195
|
+
* 'https://sync.example.com',
|
|
195
196
|
* 'my-workspace-id',
|
|
196
197
|
* 'auth-token-optional'
|
|
197
198
|
* );
|
|
198
199
|
*
|
|
199
|
-
* // Get
|
|
200
|
-
* const
|
|
201
|
-
* const
|
|
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
|
-
*
|
|
215
|
-
*
|
|
205
|
+
* ws.onopen = async () => {
|
|
206
|
+
* await client.onConnected();
|
|
207
|
+
* // Drain outgoing messages
|
|
216
208
|
* let msg;
|
|
217
|
-
* while ((msg = client.
|
|
218
|
-
* while ((msg = client.
|
|
219
|
-
* }
|
|
209
|
+
* while ((msg = client.pollOutgoingBinary())) ws.send(msg);
|
|
210
|
+
* while ((msg = client.pollOutgoingText())) ws.send(msg);
|
|
211
|
+
* };
|
|
220
212
|
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
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
|
|
429
|
+
* WASM sync client backed by the shared SyncSession protocol handler.
|
|
540
430
|
*
|
|
541
|
-
*
|
|
542
|
-
*
|
|
543
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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
|
-
|
|
458
|
+
getWsUrl(): string;
|
|
641
459
|
/**
|
|
642
|
-
* Check if
|
|
460
|
+
* Check if there are pending events.
|
|
643
461
|
*/
|
|
644
|
-
|
|
462
|
+
hasEvents(): boolean;
|
|
645
463
|
/**
|
|
646
|
-
* Check if
|
|
464
|
+
* Check if there are pending outgoing messages or events.
|
|
647
465
|
*/
|
|
648
|
-
|
|
466
|
+
hasOutgoing(): boolean;
|
|
649
467
|
/**
|
|
650
|
-
*
|
|
468
|
+
* Inject an incoming binary WebSocket message.
|
|
651
469
|
*
|
|
652
|
-
*
|
|
470
|
+
* Returns a Promise that resolves when processing is complete.
|
|
471
|
+
* After this, poll outgoing queues.
|
|
653
472
|
*/
|
|
654
|
-
|
|
473
|
+
onBinaryMessage(data: Uint8Array): Promise<any>;
|
|
655
474
|
/**
|
|
656
|
-
*
|
|
475
|
+
* Notify that the WebSocket connected.
|
|
657
476
|
*
|
|
658
|
-
*
|
|
477
|
+
* Triggers workspace SyncStep1 and handshake. After calling this,
|
|
478
|
+
* poll `pollOutgoingBinary()` / `pollOutgoingText()` to get messages to send.
|
|
659
479
|
*/
|
|
660
|
-
|
|
480
|
+
onConnected(): Promise<any>;
|
|
661
481
|
/**
|
|
662
|
-
*
|
|
663
|
-
*
|
|
664
|
-
* Call this when the metadata WebSocket opens.
|
|
482
|
+
* Notify that the WebSocket disconnected.
|
|
665
483
|
*/
|
|
666
|
-
|
|
484
|
+
onDisconnected(): Promise<any>;
|
|
667
485
|
/**
|
|
668
|
-
*
|
|
486
|
+
* Notify that a snapshot was downloaded and imported.
|
|
669
487
|
*
|
|
670
|
-
* Call this
|
|
488
|
+
* Call this after handling a `downloadSnapshot` event.
|
|
671
489
|
*/
|
|
672
|
-
|
|
490
|
+
onSnapshotImported(): Promise<any>;
|
|
673
491
|
/**
|
|
674
|
-
*
|
|
492
|
+
* Inject an incoming text WebSocket message (JSON control message).
|
|
675
493
|
*
|
|
676
|
-
* Returns a
|
|
677
|
-
* The message is already framed with the document name.
|
|
494
|
+
* Returns a Promise that resolves when processing is complete.
|
|
678
495
|
*/
|
|
679
|
-
|
|
496
|
+
onTextMessage(text: string): Promise<any>;
|
|
680
497
|
/**
|
|
681
|
-
* Poll for
|
|
498
|
+
* Poll for a JSON-serialized event.
|
|
682
499
|
*
|
|
683
|
-
* Returns a string
|
|
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
|
-
|
|
502
|
+
pollEvent(): string | undefined;
|
|
688
503
|
/**
|
|
689
|
-
* Poll for an outgoing
|
|
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
|
-
|
|
508
|
+
pollOutgoingBinary(): Uint8Array | undefined;
|
|
719
509
|
/**
|
|
720
|
-
*
|
|
510
|
+
* Poll for an outgoing text message.
|
|
721
511
|
*
|
|
722
|
-
*
|
|
512
|
+
* Returns a string if there's a message to send, null otherwise.
|
|
723
513
|
*/
|
|
724
|
-
|
|
514
|
+
pollOutgoingText(): string | undefined;
|
|
725
515
|
/**
|
|
726
|
-
*
|
|
516
|
+
* Queue a local CRDT update for sending to the server.
|
|
727
517
|
*
|
|
728
|
-
*
|
|
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
|
-
|
|
520
|
+
queueLocalUpdate(doc_id: string, data: Uint8Array): Promise<any>;
|
|
739
521
|
/**
|
|
740
|
-
*
|
|
522
|
+
* Set a share session code.
|
|
741
523
|
*
|
|
742
|
-
*
|
|
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
|
-
|
|
526
|
+
setSessionCode(code: string): void;
|
|
746
527
|
/**
|
|
747
|
-
*
|
|
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,18 +549,37 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
779
549
|
|
|
780
550
|
export interface InitOutput {
|
|
781
551
|
readonly memory: WebAssembly.Memory;
|
|
782
|
-
readonly
|
|
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;
|
|
552
|
+
readonly init: () => void;
|
|
787
553
|
readonly __wbg_fsafilesystem_free: (a: number, b: number) => void;
|
|
554
|
+
readonly fsafilesystem_fromHandle: (a: any) => number;
|
|
555
|
+
readonly __wbg_indexeddbfilesystem_free: (a: number, b: number) => void;
|
|
788
556
|
readonly __wbg_opfsfilesystem_free: (a: number, b: number) => void;
|
|
557
|
+
readonly indexeddbfilesystem_create: () => any;
|
|
789
558
|
readonly opfsfilesystem_create: () => any;
|
|
790
559
|
readonly opfsfilesystem_createWithName: (a: number, b: number) => any;
|
|
791
|
-
readonly
|
|
560
|
+
readonly __wbg_jsasyncfilesystem_free: (a: number, b: number) => void;
|
|
561
|
+
readonly jsasyncfilesystem_has_callback: (a: number, b: number, c: number) => number;
|
|
792
562
|
readonly now_timestamp: () => [number, number];
|
|
793
563
|
readonly today_formatted: (a: number, b: number) => [number, number];
|
|
564
|
+
readonly jsasyncfilesystem_new: (a: any) => number;
|
|
565
|
+
readonly __wbg_wasmsyncclient_free: (a: number, b: number) => void;
|
|
566
|
+
readonly wasmsyncclient_focusFiles: (a: number, b: number, c: number) => void;
|
|
567
|
+
readonly wasmsyncclient_getServerUrl: (a: number) => [number, number];
|
|
568
|
+
readonly wasmsyncclient_getWorkspaceId: (a: number) => [number, number];
|
|
569
|
+
readonly wasmsyncclient_getWsUrl: (a: number) => [number, number];
|
|
570
|
+
readonly wasmsyncclient_hasEvents: (a: number) => number;
|
|
571
|
+
readonly wasmsyncclient_hasOutgoing: (a: number) => number;
|
|
572
|
+
readonly wasmsyncclient_onBinaryMessage: (a: number, b: number, c: number) => any;
|
|
573
|
+
readonly wasmsyncclient_onConnected: (a: number) => any;
|
|
574
|
+
readonly wasmsyncclient_onDisconnected: (a: number) => any;
|
|
575
|
+
readonly wasmsyncclient_onSnapshotImported: (a: number) => any;
|
|
576
|
+
readonly wasmsyncclient_onTextMessage: (a: number, b: number, c: number) => any;
|
|
577
|
+
readonly wasmsyncclient_pollEvent: (a: number) => [number, number];
|
|
578
|
+
readonly wasmsyncclient_pollOutgoingBinary: (a: number) => any;
|
|
579
|
+
readonly wasmsyncclient_pollOutgoingText: (a: number) => [number, number];
|
|
580
|
+
readonly wasmsyncclient_queueLocalUpdate: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
581
|
+
readonly wasmsyncclient_setSessionCode: (a: number, b: number, c: number) => void;
|
|
582
|
+
readonly wasmsyncclient_unfocusFiles: (a: number, b: number, c: number) => void;
|
|
794
583
|
readonly __wbg_diaryxbackend_free: (a: number, b: number) => void;
|
|
795
584
|
readonly diaryxbackend_create: (a: number, b: number) => any;
|
|
796
585
|
readonly diaryxbackend_createFromDirectoryHandle: (a: any) => [number, number, number];
|
|
@@ -802,60 +591,19 @@ export interface InitOutput {
|
|
|
802
591
|
readonly diaryxbackend_eventSubscriberCount: (a: number) => number;
|
|
803
592
|
readonly diaryxbackend_execute: (a: number, b: number, c: number) => any;
|
|
804
593
|
readonly diaryxbackend_executeJs: (a: number, b: any) => any;
|
|
805
|
-
readonly diaryxbackend_getBodySyncStep1: (a: number, b: number, c: number) => any;
|
|
806
594
|
readonly diaryxbackend_getConfig: (a: number) => any;
|
|
807
|
-
readonly diaryxbackend_getWorkspaceSyncStep1: (a: number) => any;
|
|
808
595
|
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
596
|
readonly diaryxbackend_offFileSystemEvent: (a: number, b: bigint) => number;
|
|
813
597
|
readonly diaryxbackend_onFileSystemEvent: (a: number, b: any) => bigint;
|
|
814
|
-
readonly diaryxbackend_outgoingSyncMessageCount: (a: number) => number;
|
|
815
|
-
readonly diaryxbackend_pollOutgoingSyncMessage: (a: number) => any;
|
|
816
598
|
readonly diaryxbackend_readBinary: (a: number, b: number, c: number) => any;
|
|
817
599
|
readonly diaryxbackend_saveConfig: (a: number, b: any) => any;
|
|
818
|
-
readonly diaryxbackend_startSync: (a: number) => void;
|
|
819
|
-
readonly diaryxbackend_stopSync: (a: number) => void;
|
|
820
600
|
readonly diaryxbackend_writeBinary: (a: number, b: number, c: number, d: any) => any;
|
|
821
|
-
readonly
|
|
822
|
-
readonly __wbg_wasmsyncclient_free: (a: number, b: number) => void;
|
|
823
|
-
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
|
-
readonly wasmsyncclient_getServerUrl: (a: number) => [number, number];
|
|
828
|
-
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;
|
|
852
|
-
readonly wasmsyncclient_unfocusFiles: (a: number, b: number, c: number) => void;
|
|
853
|
-
readonly wasm_bindgen__closure__destroy__h137d52471f521a66: (a: number, b: number) => void;
|
|
601
|
+
readonly wasm_bindgen__closure__destroy__h618e5e7a2f4a4844: (a: number, b: number) => void;
|
|
854
602
|
readonly wasm_bindgen__closure__destroy__h4b2a5ceca2370348: (a: number, b: number) => void;
|
|
855
603
|
readonly wasm_bindgen__closure__destroy__hf59ea51dfabf38c5: (a: number, b: number) => void;
|
|
856
|
-
readonly
|
|
604
|
+
readonly wasm_bindgen__convert__closures_____invoke__h143edeab5759fb7b: (a: number, b: number, c: any) => [number, number];
|
|
857
605
|
readonly wasm_bindgen__convert__closures_____invoke__hcef8d709b492a91f: (a: number, b: number, c: any, d: any) => void;
|
|
858
|
-
readonly
|
|
606
|
+
readonly wasm_bindgen__convert__closures_____invoke__h4f5175e7ff77e24c: (a: number, b: number, c: any) => void;
|
|
859
607
|
readonly wasm_bindgen__convert__closures_____invoke__h1598c516b2d5b326: (a: number, b: number, c: any) => void;
|
|
860
608
|
readonly wasm_bindgen__convert__closures_____invoke__ha6231ef7710d1c67: (a: number, b: number, c: any) => void;
|
|
861
609
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|