chore: bump blocksuite (#1298)

Co-authored-by: Himself65 <himself65@outlook.com>
This commit is contained in:
Yifeng Wang
2023-03-04 04:17:06 +08:00
committed by GitHub
parent 50ff9b0c5c
commit 205092180b
14 changed files with 95 additions and 95 deletions

View File

@@ -40,7 +40,7 @@
// this._ws.once('lost-connection', () => resolve());
// this._ws.once('connection-error', () => reject());
// });
// this._signals.listAdd.emit({
// this._slots.listAdd.emit({
// workspace: workspace.room,
// provider: this.id,
// locally: true,

View File

@@ -1,5 +1,5 @@
import { BlobSyncState } from '@blocksuite/store';
import { Signal } from '@blocksuite/store';
import { Slot } from '@blocksuite/store';
// eslint-disable-next-line @typescript-eslint/no-restricted-imports
import type {
BlobId,
@@ -15,8 +15,8 @@ export class IPCBlobProvider implements BlobProvider {
#workspace: string;
readonly signals = {
onBlobSyncStateChange: new Signal<BlobSyncStateChangeEvent>(),
readonly slots = {
onBlobSyncStateChange: new Slot<BlobSyncStateChangeEvent>(),
};
private constructor(workspace: string) {
@@ -43,7 +43,7 @@ export class IPCBlobProvider implements BlobProvider {
});
// Make a Blob from the bytes
const blob = new Blob([new Uint8Array(blobArray)], { type: 'image/bmp' });
this.signals.onBlobSyncStateChange.emit({
this.slots.onBlobSyncStateChange.emit({
id,
state: BlobSyncState.Success,
});
@@ -55,7 +55,7 @@ export class IPCBlobProvider implements BlobProvider {
const blobID = await this.#ipc.putBlob({
blob: Array.from(new Uint8Array(await blob.arrayBuffer())),
});
this.signals.onBlobSyncStateChange.emit({
this.slots.onBlobSyncStateChange.emit({
id: blobID,
state: BlobSyncState.Success,
});