mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-21 20:16:26 +08:00
feat: bump blocksuite (#5845)
This commit is contained in:
Vendored
+2
-2
@@ -3,8 +3,8 @@
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"devDependencies": {
|
||||
"@blocksuite/global": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/store": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/global": "0.12.0-canary-202402200831-bc2769f",
|
||||
"@blocksuite/store": "0.12.0-canary-202402200831-bc2769f",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"vitest": "1.1.3"
|
||||
|
||||
Vendored
+1
@@ -7,6 +7,7 @@ import { isDesktop, isServer } from './constant.js';
|
||||
import { UaHelper } from './ua-helper.js';
|
||||
|
||||
export const blockSuiteFeatureFlags = z.object({
|
||||
enable_synced_doc_block: z.boolean(),
|
||||
enable_expand_database_block: z.boolean(),
|
||||
enable_bultin_ledits: z.boolean(),
|
||||
});
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
"@affine/debug": "workspace:*",
|
||||
"@affine/env": "workspace:*",
|
||||
"@affine/templates": "workspace:*",
|
||||
"@blocksuite/blocks": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/global": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/store": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/blocks": "0.12.0-canary-202402200831-bc2769f",
|
||||
"@blocksuite/global": "0.12.0-canary-202402200831-bc2769f",
|
||||
"@blocksuite/store": "0.12.0-canary-202402200831-bc2769f",
|
||||
"jotai": "^2.5.1",
|
||||
"jotai-effect": "^0.2.3",
|
||||
"nanoid": "^5.0.3",
|
||||
@@ -26,8 +26,8 @@
|
||||
"devDependencies": {
|
||||
"@affine-test/fixtures": "workspace:*",
|
||||
"@affine/templates": "workspace:*",
|
||||
"@blocksuite/lit": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/presets": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/lit": "0.12.0-canary-202402200831-bc2769f",
|
||||
"@blocksuite/presets": "0.12.0-canary-202402200831-bc2769f",
|
||||
"async-call-rpc": "^6.3.1",
|
||||
"react": "^18.2.0",
|
||||
"rxjs": "^7.8.1",
|
||||
|
||||
@@ -13,8 +13,8 @@ import { Map as YMap } from 'yjs';
|
||||
import { getLatestVersions } from '../migration/blocksuite';
|
||||
import { replaceIdMiddleware } from './middleware';
|
||||
|
||||
export async function initEmptyPage(page: Page, title?: string) {
|
||||
await page.load(() => {
|
||||
export function initEmptyPage(page: Page, title?: string) {
|
||||
page.load(() => {
|
||||
const pageBlockId = page.addBlock('affine:page', {
|
||||
title: new page.Text(title ?? ''),
|
||||
});
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { DebugLogger } from '@affine/debug';
|
||||
import { setupEditorFlags } from '@affine/env/global';
|
||||
import { WorkspaceFlavour } from '@affine/env/workspace';
|
||||
import { assertEquals } from '@blocksuite/global/utils';
|
||||
import type { Workspace as BlockSuiteWorkspace } from '@blocksuite/store';
|
||||
@@ -164,6 +165,8 @@ export class WorkspaceManager {
|
||||
// apply compatibility fix
|
||||
fixWorkspaceVersion(workspace.blockSuiteWorkspace.doc);
|
||||
|
||||
setupEditorFlags(workspace.blockSuiteWorkspace);
|
||||
|
||||
return workspace;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,14 +32,14 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@blocksuite/global": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/global": "0.12.0-canary-202402200831-bc2769f",
|
||||
"idb": "^8.0.0",
|
||||
"nanoid": "^5.0.3",
|
||||
"y-provider": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blocksuite/blocks": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/store": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/blocks": "0.12.0-canary-202402200831-bc2769f",
|
||||
"@blocksuite/store": "0.12.0-canary-202402200831-bc2769f",
|
||||
"fake-indexeddb": "^5.0.0",
|
||||
"vite": "^5.0.6",
|
||||
"vite-plugin-dts": "3.7.0",
|
||||
|
||||
@@ -100,7 +100,7 @@ describe('indexeddb provider', () => {
|
||||
],
|
||||
});
|
||||
const page = workspace.createPage({ id: 'page0' });
|
||||
await page.waitForLoaded();
|
||||
page.waitForLoaded();
|
||||
const pageBlockId = page.addBlock('affine:page', { title: '' });
|
||||
const frameId = page.addBlock('affine:note', {}, pageBlockId);
|
||||
page.addBlock('affine:paragraph', {}, frameId);
|
||||
@@ -129,7 +129,7 @@ describe('indexeddb provider', () => {
|
||||
| WorkspacePersist
|
||||
| undefined;
|
||||
assertExists(data);
|
||||
await testWorkspace.getPage('page0')?.waitForLoaded();
|
||||
testWorkspace.getPage('page0')?.waitForLoaded();
|
||||
data.updates.forEach(({ update }) => {
|
||||
Workspace.Y.applyUpdate(subPage, update);
|
||||
});
|
||||
@@ -148,7 +148,7 @@ describe('indexeddb provider', () => {
|
||||
expect(provider.connected).toBe(false);
|
||||
{
|
||||
const page = workspace.createPage({ id: 'page0' });
|
||||
await page.waitForLoaded();
|
||||
page.waitForLoaded();
|
||||
const pageBlockId = page.addBlock('affine:page', { title: '' });
|
||||
const frameId = page.addBlock('affine:note', {}, pageBlockId);
|
||||
page.addBlock('affine:paragraph', {}, frameId);
|
||||
@@ -203,7 +203,7 @@ describe('indexeddb provider', () => {
|
||||
provider.connect();
|
||||
{
|
||||
const page = workspace.createPage({ id: 'page0' });
|
||||
await page.waitForLoaded();
|
||||
page.waitForLoaded();
|
||||
const pageBlockId = page.addBlock('affine:page', { title: '' });
|
||||
const frameId = page.addBlock('affine:note', {}, pageBlockId);
|
||||
for (let i = 0; i < 99; i++) {
|
||||
@@ -369,14 +369,14 @@ describe('subDoc', () => {
|
||||
const page0 = workspace.createPage({
|
||||
id: 'page0',
|
||||
});
|
||||
await page0.waitForLoaded();
|
||||
page0.waitForLoaded();
|
||||
const { paragraphBlockId: paragraphBlockIdPage1 } = initEmptyPage(page0);
|
||||
const provider = createIndexedDBProvider(workspace.doc, rootDBName);
|
||||
provider.connect();
|
||||
const page1 = workspace.createPage({
|
||||
id: 'page1',
|
||||
});
|
||||
await page1.waitForLoaded();
|
||||
page1.waitForLoaded();
|
||||
const { paragraphBlockId: paragraphBlockIdPage2 } = initEmptyPage(page1);
|
||||
await setTimeout(200);
|
||||
provider.disconnect();
|
||||
@@ -390,14 +390,14 @@ describe('subDoc', () => {
|
||||
provider.connect();
|
||||
await setTimeout(200);
|
||||
const page0 = newWorkspace.getPage('page0') as Page;
|
||||
await page0.waitForLoaded();
|
||||
page0.waitForLoaded();
|
||||
await setTimeout(200);
|
||||
{
|
||||
const block = page0.getBlockById(paragraphBlockIdPage1);
|
||||
assertExists(block);
|
||||
}
|
||||
const page1 = newWorkspace.getPage('page1') as Page;
|
||||
await page1.waitForLoaded();
|
||||
page1.waitForLoaded();
|
||||
await setTimeout(200);
|
||||
{
|
||||
const block = page1.getBlockById(paragraphBlockIdPage2);
|
||||
@@ -410,7 +410,7 @@ describe('subDoc', () => {
|
||||
describe('utils', () => {
|
||||
test('download binary', async () => {
|
||||
const page = workspace.createPage({ id: 'page0' });
|
||||
await page.waitForLoaded();
|
||||
page.waitForLoaded();
|
||||
initEmptyPage(page);
|
||||
const provider = createIndexedDBProvider(workspace.doc, rootDBName);
|
||||
provider.connect();
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
"build": "vite build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blocksuite/store": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/store": "0.12.0-canary-202402200831-bc2769f",
|
||||
"vite": "^5.0.6",
|
||||
"vite-plugin-dts": "3.7.0",
|
||||
"vitest": "1.1.3",
|
||||
|
||||
@@ -73,12 +73,12 @@
|
||||
"uuid": "^9.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blocksuite/blocks": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/global": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/blocks": "0.12.0-canary-202402200831-bc2769f",
|
||||
"@blocksuite/global": "0.12.0-canary-202402200831-bc2769f",
|
||||
"@blocksuite/icons": "2.1.44",
|
||||
"@blocksuite/lit": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/presets": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/store": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/lit": "0.12.0-canary-202402200831-bc2769f",
|
||||
"@blocksuite/presets": "0.12.0-canary-202402200831-bc2769f",
|
||||
"@blocksuite/store": "0.12.0-canary-202402200831-bc2769f",
|
||||
"@storybook/addon-actions": "^7.5.3",
|
||||
"@storybook/addon-essentials": "^7.5.3",
|
||||
"@storybook/addon-interactions": "^7.5.3",
|
||||
|
||||
@@ -5,7 +5,14 @@ import { createRequire } from 'node:module';
|
||||
const require = createRequire(import.meta.url);
|
||||
const packageJson = require('../package.json');
|
||||
|
||||
const editorFlags: BlockSuiteFeatureFlags = {
|
||||
const editorFlagsStable: BlockSuiteFeatureFlags = {
|
||||
enable_synced_doc_block: false,
|
||||
enable_expand_database_block: false,
|
||||
enable_bultin_ledits: false,
|
||||
};
|
||||
|
||||
const editorFlagsCanary: BlockSuiteFeatureFlags = {
|
||||
enable_synced_doc_block: true,
|
||||
enable_expand_database_block: false,
|
||||
enable_bultin_ledits: false,
|
||||
};
|
||||
@@ -33,7 +40,7 @@ export function getRuntimeConfig(buildFlags: BuildFlags): RuntimeConfig {
|
||||
enablePayment: true,
|
||||
enablePageHistory: true,
|
||||
serverUrlPrefix: 'https://app.affine.pro',
|
||||
editorFlags,
|
||||
editorFlags: editorFlagsStable,
|
||||
appVersion: packageJson.version,
|
||||
editorVersion: packageJson.dependencies['@blocksuite/presets'],
|
||||
appBuildType: 'stable',
|
||||
@@ -75,7 +82,7 @@ export function getRuntimeConfig(buildFlags: BuildFlags): RuntimeConfig {
|
||||
enablePayment: true,
|
||||
enablePageHistory: true,
|
||||
serverUrlPrefix: 'https://affine.fail',
|
||||
editorFlags,
|
||||
editorFlags: editorFlagsCanary,
|
||||
appVersion: packageJson.version,
|
||||
editorVersion: packageJson.dependencies['@blocksuite/presets'],
|
||||
appBuildType: 'canary',
|
||||
|
||||
@@ -26,14 +26,14 @@
|
||||
"@affine/templates": "workspace:*",
|
||||
"@affine/workspace": "workspace:*",
|
||||
"@affine/workspace-impl": "workspace:*",
|
||||
"@blocksuite/block-std": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/blocks": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/global": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/block-std": "0.12.0-canary-202402200831-bc2769f",
|
||||
"@blocksuite/blocks": "0.12.0-canary-202402200831-bc2769f",
|
||||
"@blocksuite/global": "0.12.0-canary-202402200831-bc2769f",
|
||||
"@blocksuite/icons": "2.1.44",
|
||||
"@blocksuite/inline": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/lit": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/presets": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/store": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/inline": "0.12.0-canary-202402200831-bc2769f",
|
||||
"@blocksuite/lit": "0.12.0-canary-202402200831-bc2769f",
|
||||
"@blocksuite/presets": "0.12.0-canary-202402200831-bc2769f",
|
||||
"@blocksuite/store": "0.12.0-canary-202402200831-bc2769f",
|
||||
"@dnd-kit/core": "^6.0.8",
|
||||
"@dnd-kit/sortable": "^8.0.0",
|
||||
"@emotion/cache": "^11.11.0",
|
||||
|
||||
@@ -33,7 +33,7 @@ export async function createFirstAppData() {
|
||||
workspace.setPageMeta(page.id, {
|
||||
jumpOnce: true,
|
||||
});
|
||||
await initEmptyPage(page);
|
||||
initEmptyPage(page);
|
||||
}
|
||||
logger.debug('create first workspace');
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ export const CreateWorkspaceModal = ({
|
||||
workspace.setPageMeta(page.id, {
|
||||
jumpOnce: true,
|
||||
});
|
||||
await initEmptyPage(page);
|
||||
initEmptyPage(page);
|
||||
}
|
||||
logger.debug('create first workspace');
|
||||
}
|
||||
|
||||
@@ -161,12 +161,10 @@ export const useSnapshotPage = (
|
||||
});
|
||||
page.awarenessStore.setReadonly(page, true);
|
||||
const spaceDoc = page.spaceDoc;
|
||||
page
|
||||
.load(() => {
|
||||
applyUpdate(spaceDoc, new Uint8Array(snapshot));
|
||||
historyShellWorkspace.schema.upgradePage(0, {}, spaceDoc);
|
||||
})
|
||||
.catch(console.error); // must load before applyUpdate
|
||||
page.load(() => {
|
||||
applyUpdate(spaceDoc, new Uint8Array(snapshot));
|
||||
historyShellWorkspace.schema.upgradePage(0, {}, spaceDoc);
|
||||
}); // must load before applyUpdate
|
||||
}
|
||||
return page ?? undefined;
|
||||
}, [pageDocId, snapshot, ts, workspace]);
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ export type EditorProps = {
|
||||
|
||||
function usePageRoot(page: Page) {
|
||||
if (!page.ready) {
|
||||
use(page.load());
|
||||
page.load();
|
||||
}
|
||||
|
||||
if (!page.root) {
|
||||
|
||||
@@ -27,9 +27,7 @@ export const usePageHelper = (blockSuiteWorkspace: BlockSuiteWorkspace) => {
|
||||
const createPageAndOpen = useCallback(
|
||||
(mode?: 'page' | 'edgeless') => {
|
||||
const page = createPage();
|
||||
initEmptyPage(page).catch(error => {
|
||||
toast(`Failed to initialize Page: ${error.message}`);
|
||||
});
|
||||
initEmptyPage(page);
|
||||
setPageMode(page.id, mode || 'page');
|
||||
openPage(blockSuiteWorkspace.id, page.id);
|
||||
return page;
|
||||
@@ -66,10 +64,10 @@ export const usePageHelper = (blockSuiteWorkspace: BlockSuiteWorkspace) => {
|
||||
const createLinkedPageAndOpen = useAsyncCallback(
|
||||
async (pageId: string) => {
|
||||
const page = createPageAndOpen();
|
||||
await page.load();
|
||||
page.load();
|
||||
const parentPage = blockSuiteWorkspace.getPage(pageId);
|
||||
if (parentPage) {
|
||||
await parentPage.load();
|
||||
parentPage.load();
|
||||
const text = parentPage.Text.fromDelta([
|
||||
{
|
||||
insert: ' ',
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ beforeEach(async () => {
|
||||
vi.useFakeTimers({ toFake: ['requestIdleCallback'] });
|
||||
blockSuiteWorkspace = new BlockSuiteWorkspace({ id: 'test', schema });
|
||||
const initPage = async (page: Page) => {
|
||||
await page.waitForLoaded();
|
||||
page.waitForLoaded();
|
||||
expect(page).not.toBeNull();
|
||||
assertExists(page);
|
||||
const pageBlockId = page.addBlock('affine:page', {
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
import { DebugLogger } from '@affine/debug';
|
||||
import { DisposableGroup } from '@blocksuite/global/utils';
|
||||
import type { Page, Workspace } from '@blocksuite/store';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
const logger = new DebugLogger('use-block-suite-workspace-page');
|
||||
|
||||
export function useBlockSuiteWorkspacePage(
|
||||
blockSuiteWorkspace: Workspace,
|
||||
pageId: string | null
|
||||
@@ -36,9 +33,7 @@ export function useBlockSuiteWorkspacePage(
|
||||
|
||||
useEffect(() => {
|
||||
if (page && !page.loaded) {
|
||||
page.load().catch(err => {
|
||||
logger.error('Failed to load page', err);
|
||||
});
|
||||
page.load();
|
||||
}
|
||||
}, [page]);
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ const safeCurrentPageAtom = atom<Promise<Page | undefined>>(async get => {
|
||||
}
|
||||
|
||||
if (!page.loaded) {
|
||||
await page.waitForLoaded();
|
||||
page.load();
|
||||
}
|
||||
return page;
|
||||
});
|
||||
@@ -310,7 +310,7 @@ export const usePageCommands = () => {
|
||||
category: 'affine:creation',
|
||||
run: async () => {
|
||||
const page = pageHelper.createPage();
|
||||
await page.waitForLoaded();
|
||||
page.load();
|
||||
pageMetaHelper.setPageTitle(page.id, query);
|
||||
},
|
||||
icon: <PageIcon />,
|
||||
@@ -325,7 +325,7 @@ export const usePageCommands = () => {
|
||||
category: 'affine:creation',
|
||||
run: async () => {
|
||||
const page = pageHelper.createEdgeless();
|
||||
await page.waitForLoaded();
|
||||
page.load();
|
||||
pageMetaHelper.setPageTitle(page.id, query);
|
||||
},
|
||||
icon: <EdgelessIcon />,
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ export const AddFavouriteButton = ({
|
||||
createLinkedPage(pageId);
|
||||
} else {
|
||||
const page = createPage();
|
||||
await page.load();
|
||||
page.load();
|
||||
setPageMeta(page.id, { favorite: true });
|
||||
}
|
||||
},
|
||||
|
||||
@@ -115,7 +115,7 @@ export const RootAppSidebar = ({
|
||||
|
||||
const onClickNewPage = useAsyncCallback(async () => {
|
||||
const page = createPage();
|
||||
await page.waitForLoaded();
|
||||
page.waitForLoaded();
|
||||
openPage(page.id);
|
||||
}, [createPage, openPage]);
|
||||
|
||||
|
||||
@@ -30,9 +30,9 @@ beforeEach(async () => {
|
||||
|
||||
blockSuiteWorkspace.doc.emit('sync', []);
|
||||
|
||||
await initEmptyPage(blockSuiteWorkspace.createPage({ id: 'page0' }));
|
||||
await initEmptyPage(blockSuiteWorkspace.createPage({ id: 'page1' }));
|
||||
await initEmptyPage(blockSuiteWorkspace.createPage({ id: 'page2' }));
|
||||
initEmptyPage(blockSuiteWorkspace.createPage({ id: 'page0' }));
|
||||
initEmptyPage(blockSuiteWorkspace.createPage({ id: 'page1' }));
|
||||
initEmptyPage(blockSuiteWorkspace.createPage({ id: 'page2' }));
|
||||
});
|
||||
|
||||
describe('useBlockSuiteWorkspaceHelper', () => {
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ beforeEach(async () => {
|
||||
blockSuiteWorkspace.doc.emit('sync', []);
|
||||
|
||||
const initPage = async (page: Page) => {
|
||||
await page.waitForLoaded();
|
||||
page.load();
|
||||
expect(page).not.toBeNull();
|
||||
assertExists(page);
|
||||
const pageBlockId = page.addBlock('affine:page', {
|
||||
|
||||
@@ -152,7 +152,7 @@ export function useBlockSuiteMetaHelper(
|
||||
const newPage = createPage();
|
||||
const currentPage = blockSuiteWorkspace.getPage(pageId);
|
||||
|
||||
await newPage.waitForLoaded();
|
||||
newPage.waitForLoaded();
|
||||
if (!currentPageMeta || !currentPage) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
import { DebugLogger } from '@affine/debug';
|
||||
import { DisposableGroup } from '@blocksuite/global/utils';
|
||||
import type { Page, Workspace } from '@blocksuite/store';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
const logger = new DebugLogger('use-block-suite-workspace-page');
|
||||
|
||||
export function useBlockSuiteWorkspacePage(
|
||||
blockSuiteWorkspace: Workspace,
|
||||
pageId: string | null
|
||||
@@ -36,9 +33,7 @@ export function useBlockSuiteWorkspacePage(
|
||||
|
||||
useEffect(() => {
|
||||
if (page && !page.loaded) {
|
||||
page.load().catch(err => {
|
||||
logger.error('Failed to load page', err);
|
||||
});
|
||||
page.load();
|
||||
}
|
||||
}, [page]);
|
||||
|
||||
|
||||
@@ -37,9 +37,7 @@ export const useJournalHelper = (workspace: BlockSuiteWorkspace) => {
|
||||
page.workspace.setPageMeta(page.id, {
|
||||
createDate: dayjs(maybeDate).toDate().getTime(),
|
||||
});
|
||||
initEmptyPage(page, title).catch(err =>
|
||||
console.error('Failed to load journal page', err)
|
||||
);
|
||||
initEmptyPage(page, title);
|
||||
adapter.setJournalPageDateString(page.id, title);
|
||||
return page;
|
||||
},
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
"@affine-test/kit": "workspace:*",
|
||||
"@affine/env": "workspace:*",
|
||||
"@affine/native": "workspace:*",
|
||||
"@blocksuite/blocks": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/lit": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/presets": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/store": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/blocks": "0.12.0-canary-202402200831-bc2769f",
|
||||
"@blocksuite/lit": "0.12.0-canary-202402200831-bc2769f",
|
||||
"@blocksuite/presets": "0.12.0-canary-202402200831-bc2769f",
|
||||
"@blocksuite/store": "0.12.0-canary-202402200831-bc2769f",
|
||||
"@electron-forge/cli": "^7.2.0",
|
||||
"@electron-forge/core": "^7.2.0",
|
||||
"@electron-forge/core-utils": "^7.2.0",
|
||||
|
||||
@@ -40,7 +40,7 @@ describe('SyncEngine', () => {
|
||||
const page = workspace.createPage({
|
||||
id: 'page0',
|
||||
});
|
||||
await page.load();
|
||||
page.load();
|
||||
const pageBlockId = page.addBlock('affine:page', {
|
||||
title: new page.Text(''),
|
||||
});
|
||||
|
||||
@@ -34,7 +34,7 @@ describe('SyncPeer', () => {
|
||||
const page = workspace.createPage({
|
||||
id: 'page0',
|
||||
});
|
||||
await page.load();
|
||||
page.load();
|
||||
const pageBlockId = page.addBlock('affine:page', {
|
||||
title: new page.Text(''),
|
||||
});
|
||||
@@ -83,7 +83,7 @@ describe('SyncPeer', () => {
|
||||
id: 'page0',
|
||||
});
|
||||
expect(syncPeer.status.step).toBe(SyncPeerStep.LoadingSubDoc);
|
||||
await page.load();
|
||||
page.load();
|
||||
await syncPeer.waitForSynced();
|
||||
page.addBlock('affine:page', {
|
||||
title: new page.Text(''),
|
||||
|
||||
Reference in New Issue
Block a user