mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-17 14:27:02 +08:00
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:
4
packages/common/env/package.json
vendored
4
packages/common/env/package.json
vendored
@@ -3,8 +3,8 @@
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"devDependencies": {
|
||||
"@blocksuite/global": "0.16.0-canary-202407170801-6efe525",
|
||||
"@blocksuite/store": "0.16.0-canary-202407170801-6efe525",
|
||||
"@blocksuite/global": "0.16.0-canary-202407190406-c44f7e8",
|
||||
"@blocksuite/store": "0.16.0-canary-202407190406-c44f7e8",
|
||||
"react": "18.3.1",
|
||||
"react-dom": "18.3.1",
|
||||
"vitest": "1.6.0"
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
"@affine/debug": "workspace:*",
|
||||
"@affine/env": "workspace:*",
|
||||
"@affine/templates": "workspace:*",
|
||||
"@blocksuite/blocks": "0.16.0-canary-202407170801-6efe525",
|
||||
"@blocksuite/global": "0.16.0-canary-202407170801-6efe525",
|
||||
"@blocksuite/store": "0.16.0-canary-202407170801-6efe525",
|
||||
"@blocksuite/blocks": "0.16.0-canary-202407190406-c44f7e8",
|
||||
"@blocksuite/global": "0.16.0-canary-202407190406-c44f7e8",
|
||||
"@blocksuite/store": "0.16.0-canary-202407190406-c44f7e8",
|
||||
"@datastructures-js/binary-search-tree": "^5.3.2",
|
||||
"foxact": "^0.2.33",
|
||||
"fuse.js": "^7.0.0",
|
||||
@@ -33,8 +33,8 @@
|
||||
"devDependencies": {
|
||||
"@affine-test/fixtures": "workspace:*",
|
||||
"@affine/templates": "workspace:*",
|
||||
"@blocksuite/block-std": "0.16.0-canary-202407170801-6efe525",
|
||||
"@blocksuite/presets": "0.16.0-canary-202407170801-6efe525",
|
||||
"@blocksuite/block-std": "0.16.0-canary-202407190406-c44f7e8",
|
||||
"@blocksuite/presets": "0.16.0-canary-202407190406-c44f7e8",
|
||||
"@testing-library/react": "^16.0.0",
|
||||
"async-call-rpc": "^6.4.0",
|
||||
"fake-indexeddb": "^6.0.0",
|
||||
|
||||
@@ -78,12 +78,12 @@
|
||||
"zod": "^3.22.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blocksuite/block-std": "0.16.0-canary-202407170801-6efe525",
|
||||
"@blocksuite/blocks": "0.16.0-canary-202407170801-6efe525",
|
||||
"@blocksuite/global": "0.16.0-canary-202407170801-6efe525",
|
||||
"@blocksuite/block-std": "0.16.0-canary-202407190406-c44f7e8",
|
||||
"@blocksuite/blocks": "0.16.0-canary-202407190406-c44f7e8",
|
||||
"@blocksuite/global": "0.16.0-canary-202407190406-c44f7e8",
|
||||
"@blocksuite/icons": "2.1.59",
|
||||
"@blocksuite/presets": "0.16.0-canary-202407170801-6efe525",
|
||||
"@blocksuite/store": "0.16.0-canary-202407170801-6efe525",
|
||||
"@blocksuite/presets": "0.16.0-canary-202407190406-c44f7e8",
|
||||
"@blocksuite/store": "0.16.0-canary-202407190406-c44f7e8",
|
||||
"@storybook/addon-actions": "^7.6.17",
|
||||
"@storybook/addon-essentials": "^7.6.17",
|
||||
"@storybook/addon-interactions": "^7.6.17",
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
"@affine/graphql": "workspace:*",
|
||||
"@affine/i18n": "workspace:*",
|
||||
"@affine/templates": "workspace:*",
|
||||
"@blocksuite/block-std": "0.16.0-canary-202407170801-6efe525",
|
||||
"@blocksuite/blocks": "0.16.0-canary-202407170801-6efe525",
|
||||
"@blocksuite/global": "0.16.0-canary-202407170801-6efe525",
|
||||
"@blocksuite/block-std": "0.16.0-canary-202407190406-c44f7e8",
|
||||
"@blocksuite/blocks": "0.16.0-canary-202407190406-c44f7e8",
|
||||
"@blocksuite/global": "0.16.0-canary-202407190406-c44f7e8",
|
||||
"@blocksuite/icons": "2.1.59",
|
||||
"@blocksuite/inline": "0.16.0-canary-202407170801-6efe525",
|
||||
"@blocksuite/presets": "0.16.0-canary-202407170801-6efe525",
|
||||
"@blocksuite/store": "0.16.0-canary-202407170801-6efe525",
|
||||
"@blocksuite/inline": "0.16.0-canary-202407190406-c44f7e8",
|
||||
"@blocksuite/presets": "0.16.0-canary-202407190406-c44f7e8",
|
||||
"@blocksuite/store": "0.16.0-canary-202407190406-c44f7e8",
|
||||
"@dnd-kit/core": "^6.1.0",
|
||||
"@dnd-kit/modifiers": "^7.0.0",
|
||||
"@dnd-kit/sortable": "^8.0.0",
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
@@ -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,
|
||||
}))
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
"@affine/env": "workspace:*",
|
||||
"@affine/i18n": "workspace:*",
|
||||
"@affine/native": "workspace:*",
|
||||
"@blocksuite/block-std": "0.16.0-canary-202407170801-6efe525",
|
||||
"@blocksuite/blocks": "0.16.0-canary-202407170801-6efe525",
|
||||
"@blocksuite/presets": "0.16.0-canary-202407170801-6efe525",
|
||||
"@blocksuite/store": "0.16.0-canary-202407170801-6efe525",
|
||||
"@blocksuite/block-std": "0.16.0-canary-202407190406-c44f7e8",
|
||||
"@blocksuite/blocks": "0.16.0-canary-202407190406-c44f7e8",
|
||||
"@blocksuite/presets": "0.16.0-canary-202407190406-c44f7e8",
|
||||
"@blocksuite/store": "0.16.0-canary-202407190406-c44f7e8",
|
||||
"@electron-forge/cli": "^7.3.0",
|
||||
"@electron-forge/core": "^7.3.0",
|
||||
"@electron-forge/core-utils": "^7.3.0",
|
||||
|
||||
Reference in New Issue
Block a user