There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
chore:Update blocksuite dependency version (#525)
xiaotian3b830e4c4a97
diff --git a/packages/app/package.json b/packages/app/package.jsonindex afed9b8b8f..620aa0d5af 100644--- a/packages/app/package.json+++ b/packages/app/package.json@@ -9,8 +9,8 @@"lint": "next lint"},"dependencies": {- "@blocksuite/blocks": "^0.2.24",- "@blocksuite/editor": "^0.2.24",+ "@blocksuite/blocks": "0.3.0-alpha.0",+ "@blocksuite/editor": "0.3.0-alpha.0","@emotion/css": "^11.10.0","@emotion/react": "^11.10.4","@emotion/server": "^11.10.0",diff --git a/packages/app/src/components/edgeless-toolbar/index.tsx b/packages/app/src/components/edgeless-toolbar/index.tsxindex 2865c27721..58a93e83d4 100644--- a/packages/app/src/components/edgeless-toolbar/index.tsx+++ b/packages/app/src/components/edgeless-toolbar/index.tsx@@ -78,11 +78,11 @@ const UndoRedo = () => {const { editor } = useEditor();useEffect(() => {if (!editor) return;- const { store } = editor;+ const { space } = editor;- store.signals.historyUpdated.on(() => {- setCanUndo(store.canUndo);- setCanRedo(store.canRedo);+ space.signals.historyUpdated.on(() => {+ setCanUndo(space.canUndo);+ setCanRedo(space.canRedo);});}, [editor]);@@ -92,7 +92,7 @@ const UndoRedo = () => {<StyledToolbarItemdisable={!canUndo}onClick={() => {- editor?.store?.undo();+ editor?.space?.undo();}}><UndoIcon />@@ -102,7 +102,7 @@ const UndoRedo = () => {<StyledToolbarItemdisable={!canRedo}onClick={() => {- editor?.store?.redo();+ editor?.space?.redo();}}><RedoIcon />diff --git a/packages/app/src/components/editor.tsx b/packages/app/src/components/editor.tsxindex 1735a62a57..a7ef3ff276 100644--- a/packages/app/src/components/editor.tsx+++ b/packages/app/src/components/editor.tsx@@ -38,14 +38,14 @@ export const Editor = () => {return;}setEditor(editorRef.current);- const { store } = editorRef.current as EditorContainer;- const pageId = store.addBlock({- flavour: 'page',+ const { space } = editorRef.current as EditorContainer;+ const pageId = space.addBlock({+ flavour: 'affine:page',title: 'Welcome to the AFFiNE Alpha',});- const groupId = store.addBlock({ flavour: 'group' }, pageId);+ const groupId = space.addBlock({ flavour: 'affine:group' }, pageId);editorRef.current.clipboard.importMarkdown(exampleMarkdown, `${groupId}`);- store.resetHistory();+ space.resetHistory();}, [setEditor]);useEffect(() => {diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex c0dac8dba0..032815958d 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -18,8 +18,8 @@ importers:packages/app:specifiers:- '@blocksuite/blocks': ^0.2.24- '@blocksuite/editor': ^0.2.24+ '@blocksuite/blocks': 0.3.0-alpha.0+ '@blocksuite/editor': 0.3.0-alpha.0'@emotion/css': ^11.10.0'@emotion/react': ^11.10.4'@emotion/server': ^11.10.0@@ -47,8 +47,8 @@ importers:react-dom: 18.2.0typescript: 4.8.3dependencies:- '@blocksuite/blocks': 0.2.24- '@blocksuite/editor': 0.2.24+ '@blocksuite/blocks': 0.3.0-alpha.0+ '@blocksuite/editor': 0.3.0-alpha.0'@emotion/css': 11.10.0'@emotion/react': 11.10.4_w5j4k42lgipnm43s3brx6h3c34'@emotion/server': 11.10.0_@[email protected]@@ -164,10 +164,10 @@ packages:to-fast-properties: 2.0.0dev: false- /@blocksuite/blocks/0.2.24:- resolution: {integrity: sha512-gqKD1NwjL1NroMqmM9JUgvQaJB/W8tLTqt0+em7L5ys1Y9RjrIfIPKLe5Ea4oZR7HukKGyY+gDuEkOW0mqvtvg==}+ /@blocksuite/blocks/0.3.0-alpha.0:+ resolution: {integrity: sha512-B5c6rRVISj55Vi2ijtFNOIcB5MizQdcZWr6OkZsVMpDEGSKSh446D/5WndFlORU7aQY63WLaSX1xwF+aV6jLjg==}dependencies:- '@blocksuite/store': 0.2.24+ '@blocksuite/store': 0.3.0-alpha.0hotkeys-js: 3.10.0lit: 2.4.0quill: 1.3.7@@ -178,11 +178,11 @@ packages:- utf-8-validatedev: false- /@blocksuite/editor/0.2.24:- resolution: {integrity: sha512-L5sq4eq2cMJeGZ8akGkcRIrxahS9met8unyx9I0ELBqO1u43OkUcPCxemRTW4ECfV2T7lWR3GbJg4LL1udCPSA==}+ /@blocksuite/editor/0.3.0-alpha.0:+ resolution: {integrity: sha512-Vi7YOus7XFTGX5Q8o6AuW5EM34AlpNKJtCwkjuohmLxlEVD5KbvBudJTqpnZ71FIVK+pcYYGqt/0b7VDqCOxqg==}dependencies:- '@blocksuite/blocks': 0.2.24- '@blocksuite/store': 0.2.24+ '@blocksuite/blocks': 0.3.0-alpha.0+ '@blocksuite/store': 0.3.0-alpha.0lit: 2.4.0marked: 4.1.1turndown: 7.1.1@@ -192,10 +192,11 @@ packages:- utf-8-validatedev: false- /@blocksuite/store/0.2.24:- resolution: {integrity: sha512-2eRccsokZVk1D0W6rnzIzP28YzF41JmEoRcyMmeppn5/wcXhmiWpaY1YNyVp/aSmhv+7Lmt6GOe/qx17PDXOVA==}+ /@blocksuite/store/0.3.0-alpha.0:+ resolution: {integrity: sha512-Lk6UisNL32Eys5yBT7qX5s4OKmLnhsMs/7v/aqkly3Gf3eJU+F++ukwWN4NeJN3S0k2I8mR638qzRJ9LdXPvQQ==}dependencies:lib0: 0.2.52+ y-indexeddb: [email protected]y-protocols: 1.0.5y-webrtc: 10.2.3yjs: 13.5.41@@ -3133,6 +3134,15 @@ packages:object-keys: 0.4.0dev: false+ /y-indexeddb/[email protected]:+ resolution: {integrity: sha512-GcJbiJa2eD5hankj46Hea9z4hbDnDjvh1fT62E5SpZRsv8GcEemw34l1hwI2eknGcv5Ih9JfusT37JLx9q3LFg==}+ peerDependencies:+ yjs: ^13.0.0+ dependencies:+ lib0: 0.2.52+ yjs: 13.5.41+ dev: false+/y-protocols/1.0.5:resolution: {integrity: sha512-Wil92b7cGk712lRHDqS4T90IczF6RkcvCwAD0A2OPg+adKmOe+nOiT/N2hvpQIWS3zfjmtL4CPaH5sIW1Hkm/A==}dependencies: