mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-23 21:11:51 +03:00
chore:Update blocksuite dependency version (#525)
This commit is contained in:
parent
1ccc46ec72
commit
3b830e4c4a
@ -9,8 +9,8 @@
|
|||||||
"lint": "next lint"
|
"lint": "next lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@blocksuite/blocks": "^0.2.24",
|
"@blocksuite/blocks": "0.3.0-alpha.0",
|
||||||
"@blocksuite/editor": "^0.2.24",
|
"@blocksuite/editor": "0.3.0-alpha.0",
|
||||||
"@emotion/css": "^11.10.0",
|
"@emotion/css": "^11.10.0",
|
||||||
"@emotion/react": "^11.10.4",
|
"@emotion/react": "^11.10.4",
|
||||||
"@emotion/server": "^11.10.0",
|
"@emotion/server": "^11.10.0",
|
||||||
|
@ -78,11 +78,11 @@ const UndoRedo = () => {
|
|||||||
const { editor } = useEditor();
|
const { editor } = useEditor();
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!editor) return;
|
if (!editor) return;
|
||||||
const { store } = editor;
|
const { space } = editor;
|
||||||
|
|
||||||
store.signals.historyUpdated.on(() => {
|
space.signals.historyUpdated.on(() => {
|
||||||
setCanUndo(store.canUndo);
|
setCanUndo(space.canUndo);
|
||||||
setCanRedo(store.canRedo);
|
setCanRedo(space.canRedo);
|
||||||
});
|
});
|
||||||
}, [editor]);
|
}, [editor]);
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ const UndoRedo = () => {
|
|||||||
<StyledToolbarItem
|
<StyledToolbarItem
|
||||||
disable={!canUndo}
|
disable={!canUndo}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
editor?.store?.undo();
|
editor?.space?.undo();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<UndoIcon />
|
<UndoIcon />
|
||||||
@ -102,7 +102,7 @@ const UndoRedo = () => {
|
|||||||
<StyledToolbarItem
|
<StyledToolbarItem
|
||||||
disable={!canRedo}
|
disable={!canRedo}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
editor?.store?.redo();
|
editor?.space?.redo();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<RedoIcon />
|
<RedoIcon />
|
||||||
|
@ -38,14 +38,14 @@ export const Editor = () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setEditor(editorRef.current);
|
setEditor(editorRef.current);
|
||||||
const { store } = editorRef.current as EditorContainer;
|
const { space } = editorRef.current as EditorContainer;
|
||||||
const pageId = store.addBlock({
|
const pageId = space.addBlock({
|
||||||
flavour: 'page',
|
flavour: 'affine:page',
|
||||||
title: 'Welcome to the AFFiNE Alpha',
|
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}`);
|
editorRef.current.clipboard.importMarkdown(exampleMarkdown, `${groupId}`);
|
||||||
store.resetHistory();
|
space.resetHistory();
|
||||||
}, [setEditor]);
|
}, [setEditor]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -18,8 +18,8 @@ importers:
|
|||||||
|
|
||||||
packages/app:
|
packages/app:
|
||||||
specifiers:
|
specifiers:
|
||||||
'@blocksuite/blocks': ^0.2.24
|
'@blocksuite/blocks': 0.3.0-alpha.0
|
||||||
'@blocksuite/editor': ^0.2.24
|
'@blocksuite/editor': 0.3.0-alpha.0
|
||||||
'@emotion/css': ^11.10.0
|
'@emotion/css': ^11.10.0
|
||||||
'@emotion/react': ^11.10.4
|
'@emotion/react': ^11.10.4
|
||||||
'@emotion/server': ^11.10.0
|
'@emotion/server': ^11.10.0
|
||||||
@ -47,8 +47,8 @@ importers:
|
|||||||
react-dom: 18.2.0
|
react-dom: 18.2.0
|
||||||
typescript: 4.8.3
|
typescript: 4.8.3
|
||||||
dependencies:
|
dependencies:
|
||||||
'@blocksuite/blocks': 0.2.24
|
'@blocksuite/blocks': 0.3.0-alpha.0
|
||||||
'@blocksuite/editor': 0.2.24
|
'@blocksuite/editor': 0.3.0-alpha.0
|
||||||
'@emotion/css': 11.10.0
|
'@emotion/css': 11.10.0
|
||||||
'@emotion/react': 11.10.4_w5j4k42lgipnm43s3brx6h3c34
|
'@emotion/react': 11.10.4_w5j4k42lgipnm43s3brx6h3c34
|
||||||
'@emotion/server': 11.10.0_@emotion+css@11.10.0
|
'@emotion/server': 11.10.0_@emotion+css@11.10.0
|
||||||
@ -164,10 +164,10 @@ packages:
|
|||||||
to-fast-properties: 2.0.0
|
to-fast-properties: 2.0.0
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@blocksuite/blocks/0.2.24:
|
/@blocksuite/blocks/0.3.0-alpha.0:
|
||||||
resolution: {integrity: sha512-gqKD1NwjL1NroMqmM9JUgvQaJB/W8tLTqt0+em7L5ys1Y9RjrIfIPKLe5Ea4oZR7HukKGyY+gDuEkOW0mqvtvg==}
|
resolution: {integrity: sha512-B5c6rRVISj55Vi2ijtFNOIcB5MizQdcZWr6OkZsVMpDEGSKSh446D/5WndFlORU7aQY63WLaSX1xwF+aV6jLjg==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@blocksuite/store': 0.2.24
|
'@blocksuite/store': 0.3.0-alpha.0
|
||||||
hotkeys-js: 3.10.0
|
hotkeys-js: 3.10.0
|
||||||
lit: 2.4.0
|
lit: 2.4.0
|
||||||
quill: 1.3.7
|
quill: 1.3.7
|
||||||
@ -178,11 +178,11 @@ packages:
|
|||||||
- utf-8-validate
|
- utf-8-validate
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@blocksuite/editor/0.2.24:
|
/@blocksuite/editor/0.3.0-alpha.0:
|
||||||
resolution: {integrity: sha512-L5sq4eq2cMJeGZ8akGkcRIrxahS9met8unyx9I0ELBqO1u43OkUcPCxemRTW4ECfV2T7lWR3GbJg4LL1udCPSA==}
|
resolution: {integrity: sha512-Vi7YOus7XFTGX5Q8o6AuW5EM34AlpNKJtCwkjuohmLxlEVD5KbvBudJTqpnZ71FIVK+pcYYGqt/0b7VDqCOxqg==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@blocksuite/blocks': 0.2.24
|
'@blocksuite/blocks': 0.3.0-alpha.0
|
||||||
'@blocksuite/store': 0.2.24
|
'@blocksuite/store': 0.3.0-alpha.0
|
||||||
lit: 2.4.0
|
lit: 2.4.0
|
||||||
marked: 4.1.1
|
marked: 4.1.1
|
||||||
turndown: 7.1.1
|
turndown: 7.1.1
|
||||||
@ -192,10 +192,11 @@ packages:
|
|||||||
- utf-8-validate
|
- utf-8-validate
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@blocksuite/store/0.2.24:
|
/@blocksuite/store/0.3.0-alpha.0:
|
||||||
resolution: {integrity: sha512-2eRccsokZVk1D0W6rnzIzP28YzF41JmEoRcyMmeppn5/wcXhmiWpaY1YNyVp/aSmhv+7Lmt6GOe/qx17PDXOVA==}
|
resolution: {integrity: sha512-Lk6UisNL32Eys5yBT7qX5s4OKmLnhsMs/7v/aqkly3Gf3eJU+F++ukwWN4NeJN3S0k2I8mR638qzRJ9LdXPvQQ==}
|
||||||
dependencies:
|
dependencies:
|
||||||
lib0: 0.2.52
|
lib0: 0.2.52
|
||||||
|
y-indexeddb: 9.0.9_yjs@13.5.41
|
||||||
y-protocols: 1.0.5
|
y-protocols: 1.0.5
|
||||||
y-webrtc: 10.2.3
|
y-webrtc: 10.2.3
|
||||||
yjs: 13.5.41
|
yjs: 13.5.41
|
||||||
@ -3133,6 +3134,15 @@ packages:
|
|||||||
object-keys: 0.4.0
|
object-keys: 0.4.0
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/y-indexeddb/9.0.9_yjs@13.5.41:
|
||||||
|
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:
|
/y-protocols/1.0.5:
|
||||||
resolution: {integrity: sha512-Wil92b7cGk712lRHDqS4T90IczF6RkcvCwAD0A2OPg+adKmOe+nOiT/N2hvpQIWS3zfjmtL4CPaH5sIW1Hkm/A==}
|
resolution: {integrity: sha512-Wil92b7cGk712lRHDqS4T90IczF6RkcvCwAD0A2OPg+adKmOe+nOiT/N2hvpQIWS3zfjmtL4CPaH5sIW1Hkm/A==}
|
||||||
dependencies:
|
dependencies:
|
||||||
|
Loading…
Reference in New Issue
Block a user