mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-27 02:42:25 +08:00
chore: bump blocksuite (#1298)
Co-authored-by: Himself65 <himself65@outlook.com>
This commit is contained in:
@@ -14,11 +14,11 @@
|
||||
"@affine/debug": "workspace:*",
|
||||
"@affine/env": "workspace:*",
|
||||
"@affine/i18n": "workspace:*",
|
||||
"@blocksuite/blocks": "0.5.0-20230302205056-4385b7a",
|
||||
"@blocksuite/editor": "0.5.0-20230302205056-4385b7a",
|
||||
"@blocksuite/blocks": "0.5.0-20230303192351-13b0dd7",
|
||||
"@blocksuite/editor": "0.5.0-20230303192351-13b0dd7",
|
||||
"@blocksuite/icons": "2.0.17",
|
||||
"@blocksuite/react": "0.5.0-20230302205056-4385b7a",
|
||||
"@blocksuite/store": "0.5.0-20230302205056-4385b7a",
|
||||
"@blocksuite/react": "0.5.0-20230303192351-13b0dd7",
|
||||
"@blocksuite/store": "0.5.0-20230303192351-13b0dd7",
|
||||
"@emotion/cache": "^11.10.5",
|
||||
"@emotion/css": "^11.10.6",
|
||||
"@emotion/react": "^11.10.6",
|
||||
|
||||
@@ -41,7 +41,7 @@ beforeEach(async () => {
|
||||
})
|
||||
.register(builtInSchemas)
|
||||
.register(__unstableSchemas);
|
||||
blockSuiteWorkspace.signals.pageAdded.on(pageId => {
|
||||
blockSuiteWorkspace.slots.pageAdded.on(pageId => {
|
||||
setTimeout(() => {
|
||||
const page = blockSuiteWorkspace.getPage(pageId);
|
||||
expect(page).not.toBeNull();
|
||||
|
||||
@@ -22,7 +22,7 @@ beforeEach(() => {
|
||||
})
|
||||
.register(builtInSchemas)
|
||||
.register(__unstableSchemas);
|
||||
blockSuiteWorkspace.signals.pageAdded.on(pageId => {
|
||||
blockSuiteWorkspace.slots.pageAdded.on(pageId => {
|
||||
const page = blockSuiteWorkspace.getPage(pageId) as Page;
|
||||
const pageBlockId = page.addBlockByFlavour('affine:page', { title: '' });
|
||||
const frameId = page.addBlockByFlavour('affine:frame', {}, pageBlockId);
|
||||
|
||||
@@ -11,7 +11,7 @@ export function useBlockSuiteWorkspaceHelper(
|
||||
createPage: (pageId: string, title?: string): Promise<string> => {
|
||||
return new Promise(resolve => {
|
||||
assertExists(blockSuiteWorkspace);
|
||||
const dispose = blockSuiteWorkspace.signals.pageAdded.on(id => {
|
||||
const dispose = blockSuiteWorkspace.slots.pageAdded.on(id => {
|
||||
if (id === pageId) {
|
||||
dispose.dispose();
|
||||
// Fixme: https://github.com/toeverything/blocksuite/issues/1350
|
||||
|
||||
@@ -33,7 +33,7 @@ const PreviewPage: NextPage<PreviewPageProps> = ({
|
||||
'preview',
|
||||
(_: string) => undefined
|
||||
);
|
||||
blockSuiteWorkspace.signals.pageAdded.once(() => {
|
||||
blockSuiteWorkspace.slots.pageAdded.once(() => {
|
||||
setBlockSuiteWorkspace(blockSuiteWorkspace);
|
||||
});
|
||||
blockSuiteWorkspace.createPage('preview');
|
||||
|
||||
@@ -30,7 +30,7 @@ const WorkspaceDetail: React.FC = () => {
|
||||
const [, rerender] = useState(false);
|
||||
// fixme(himself65): this is a hack
|
||||
useEffect(() => {
|
||||
const dispose = currentWorkspace?.blockSuiteWorkspace.signals.pageAdded.on(
|
||||
const dispose = currentWorkspace?.blockSuiteWorkspace.slots.pageAdded.on(
|
||||
id => {
|
||||
if (pageId === id) {
|
||||
rerender(prev => !prev);
|
||||
@@ -40,7 +40,7 @@ const WorkspaceDetail: React.FC = () => {
|
||||
return () => {
|
||||
dispose?.dispose();
|
||||
};
|
||||
}, [currentWorkspace?.blockSuiteWorkspace.signals.pageAdded, pageId]);
|
||||
}, [currentWorkspace?.blockSuiteWorkspace.slots.pageAdded, pageId]);
|
||||
useEffect(() => {
|
||||
if (currentWorkspace) {
|
||||
enableFullFlags(currentWorkspace.blockSuiteWorkspace);
|
||||
|
||||
Reference in New Issue
Block a user