mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-25 14:28:51 +08:00
feat: bump blocksuite (#6541)
## Features - https://github.com/toeverything/BlockSuite/pull/6737 @Saul-Mirone - https://github.com/toeverything/BlockSuite/pull/6735 @pengx17 - https://github.com/toeverything/BlockSuite/pull/6740 @regischen ## Bugfix - https://github.com/toeverything/BlockSuite/pull/6744 @donteatfriedrice - https://github.com/toeverything/BlockSuite/pull/6742 @doouding ## Refactor ## Misc - https://github.com/toeverything/BlockSuite/pull/6741 @fundon
This commit is contained in:
@@ -155,7 +155,7 @@ export const useSnapshotPage = (
|
||||
page = historyShellWorkspace.createDoc({
|
||||
id: pageId,
|
||||
});
|
||||
page.awarenessStore.setReadonly(page, true);
|
||||
page.awarenessStore.setReadonly(page.blockCollection, true);
|
||||
const spaceDoc = page.spaceDoc;
|
||||
page.load(() => {
|
||||
applyUpdate(spaceDoc, new Uint8Array(snapshot));
|
||||
|
||||
@@ -186,7 +186,6 @@ export function setupAIProvider() {
|
||||
return textToText({
|
||||
...options,
|
||||
promptName: 'Make it real',
|
||||
// @ts-expect-error todo: fix this after blocksuite bump
|
||||
params: options.params,
|
||||
content:
|
||||
options.content ||
|
||||
|
||||
@@ -100,7 +100,7 @@ const ImagePreviewModalImpl = (
|
||||
const block = page.getBlockById(blockId);
|
||||
assertExists(block);
|
||||
const nextBlock = page
|
||||
.getNextSiblings(block)
|
||||
.getNexts(block)
|
||||
.find(
|
||||
(block): block is ImageBlockModel => block.flavour === 'affine:image'
|
||||
);
|
||||
@@ -120,7 +120,7 @@ const ImagePreviewModalImpl = (
|
||||
const block = page.getBlockById(blockId);
|
||||
assertExists(block);
|
||||
const prevBlock = page
|
||||
.getPreviousSiblings(block)
|
||||
.getPrevs(block)
|
||||
.findLast(
|
||||
(block): block is ImageBlockModel => block.flavour === 'affine:image'
|
||||
);
|
||||
@@ -142,14 +142,14 @@ const ImagePreviewModalImpl = (
|
||||
assertExists(block);
|
||||
if (
|
||||
page
|
||||
.getPreviousSiblings(block)
|
||||
.getPrevs(block)
|
||||
.some(
|
||||
(block): block is ImageBlockModel =>
|
||||
block.flavour === 'affine:image'
|
||||
)
|
||||
) {
|
||||
const prevBlock = page
|
||||
.getPreviousSiblings(block)
|
||||
.getPrevs(block)
|
||||
.findLast(
|
||||
(block): block is ImageBlockModel =>
|
||||
block.flavour === 'affine:image'
|
||||
@@ -159,14 +159,14 @@ const ImagePreviewModalImpl = (
|
||||
}
|
||||
} else if (
|
||||
page
|
||||
.getNextSiblings(block)
|
||||
.getNexts(block)
|
||||
.some(
|
||||
(block): block is ImageBlockModel =>
|
||||
block.flavour === 'affine:image'
|
||||
)
|
||||
) {
|
||||
const nextBlock = page
|
||||
.getNextSiblings(block)
|
||||
.getNexts(block)
|
||||
.find(
|
||||
(block): block is ImageBlockModel =>
|
||||
block.flavour === 'affine:image'
|
||||
@@ -516,7 +516,7 @@ export const ImagePreviewModal = (
|
||||
|
||||
if (event.key === 'ArrowLeft') {
|
||||
const prevBlock = page
|
||||
.getPreviousSiblings(block)
|
||||
.getPrevs(block)
|
||||
.findLast(
|
||||
(block): block is ImageBlockModel =>
|
||||
block.flavour === 'affine:image'
|
||||
@@ -526,7 +526,7 @@ export const ImagePreviewModal = (
|
||||
}
|
||||
} else if (event.key === 'ArrowRight') {
|
||||
const nextBlock = page
|
||||
.getNextSiblings(block)
|
||||
.getNexts(block)
|
||||
.find(
|
||||
(block): block is ImageBlockModel =>
|
||||
block.flavour === 'affine:image'
|
||||
|
||||
Reference in New Issue
Block a user