chore: bump blocksuite (#7546)

## Features
- https://github.com/toeverything/BlockSuite/pull/7659 @donteatfriedrice

## Bugfix
- https://github.com/toeverything/BlockSuite/pull/7682 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7641 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7685 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7680 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7679 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7676 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7675 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7670 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7672 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7668 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7664 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7665 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7662 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7658 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7654 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7648 @undefined
- https://github.com/toeverything/BlockSuite/pull/7653 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7651 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7647 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7671 @zzj3720
- https://github.com/toeverything/BlockSuite/pull/7656 @zzj3720
- https://github.com/toeverything/BlockSuite/pull/7643 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7666 @doodlewind
- https://github.com/toeverything/BlockSuite/pull/7645 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7637 @zzj3720
- https://github.com/toeverything/BlockSuite/pull/7639 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7636 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7633 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7630 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7629 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7627 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7625 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7623 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7599 @L-Sun
- https://github.com/toeverything/BlockSuite/pull/7621 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7619 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7614 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7613 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7611 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7609 @Saul-Mirone
- https://github.com/toeverything/BlockSuite/pull/7594 @fundon
- https://github.com/toeverything/BlockSuite/pull/7593 @fundon

## Refactor
- https://github.com/toeverything/BlockSuite/pull/7634 @zzj3720
- https://github.com/toeverything/BlockSuite/pull/7616 @zzj3720
- https://github.com/toeverything/BlockSuite/pull/7617 @zzj3720
- https://github.com/toeverything/BlockSuite/pull/7603 @Saul-Mirone

## Misc
- https://github.com/toeverything/BlockSuite/pull/7604 @Saul-Mirone

## Features

## Bugfix
- https://github.com/toeverything/BlockSuite/pull/7688 @fourdim
- https://github.com/toeverything/BlockSuite/pull/7690 @Saul-Mirone

## Refactor

## Misc
This commit is contained in:
Saul-Mirone
2024-07-19 05:06:26 +00:00
parent 239de4c283
commit 6dbcb62da7
11 changed files with 119 additions and 100 deletions

View File

@@ -10,6 +10,9 @@ export async function getMarkdownFromSlice(host: EditorHost, slice: Slice) {
});
const markdownAdapter = new MarkdownAdapter(job);
const markdown = await markdownAdapter.fromSlice(slice);
if (!markdown) {
return '';
}
return markdown.file;
}
@@ -63,7 +66,9 @@ export async function insertFromMarkdown(
parent,
(index ?? 0) + i
);
models.push(model);
if (model) {
models.push(model);
}
}
return models;

View File

@@ -80,6 +80,9 @@ export async function getContentFromSlice(
middlewares: [titleMiddleware, embedSyncedDocMiddleware('content')],
});
const snapshot = await job.sliceToSnapshot(slice);
if (!snapshot) {
return '';
}
processTextInSnapshot(snapshot, host);
const adapter =
type === 'markdown' ? new MarkdownAdapter(job) : new PlainTextAdapter(job);
@@ -96,6 +99,9 @@ export async function getPlainTextFromSlice(host: EditorHost, slice: Slice) {
middlewares: [titleMiddleware],
});
const snapshot = await job.sliceToSnapshot(slice);
if (!snapshot) {
return '';
}
processTextInSnapshot(snapshot, host);
const plainTextAdapter = new PlainTextAdapter(job);
const plainText = await plainTextAdapter.fromSliceSnapshot({
@@ -158,7 +164,9 @@ export async function insertFromMarkdown(
parent,
(index ?? 0) + i
);
models.push(model);
if (model) {
models.push(model);
}
}
return models;

View File

@@ -120,14 +120,18 @@ export const WorkspaceLayoutInner = ({ children }: PropsWithChildren) => {
currentWorkspace.docCollection,
templateBlob
);
doc.resetHistory();
if (doc) {
doc.resetHistory();
}
return { doc, mode };
}).pipe(
timeout(10000 /* 10s */),
mergeMap(({ mode, doc }) => {
docsList.setMode(doc.id, mode as DocMode);
workbench.openDoc(doc.id);
if (doc) {
docsList.setMode(doc.id, mode as DocMode);
workbench.openDoc(doc.id);
}
return EMPTY;
}),
onStart(() => {

View File

@@ -96,10 +96,12 @@ export const Component = (): ReactElement => {
);
console.log(
'imported docs',
newDocs.map(doc => ({
id: doc.id,
title: doc.meta?.title,
}))
newDocs
.filter(doc => !!doc)
.map(doc => ({
id: doc.id,
title: doc.meta?.title,
}))
);
}
};