mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 20:08:37 +00:00
feat: bump blocksuite (#6852)
## Features - https://github.com/toeverything/BlockSuite/pull/6995 @fundon ## Bugfix - https://github.com/toeverything/BlockSuite/pull/7002 @donteatfriedrice - https://github.com/toeverything/BlockSuite/pull/7000 @regischen - https://github.com/toeverything/BlockSuite/pull/7001 @fundon - https://github.com/toeverything/BlockSuite/pull/6999 @Flrande - https://github.com/toeverything/BlockSuite/pull/6997 @donteatfriedrice - https://github.com/toeverything/BlockSuite/pull/6996 @regischen - https://github.com/toeverything/BlockSuite/pull/6994 @L-Sun ## Refactor ## Misc
This commit is contained in:
@@ -18,13 +18,13 @@
|
||||
"@affine/graphql": "workspace:*",
|
||||
"@affine/i18n": "workspace:*",
|
||||
"@affine/templates": "workspace:*",
|
||||
"@blocksuite/block-std": "0.14.0-canary-202405082235-4e0896c",
|
||||
"@blocksuite/blocks": "0.14.0-canary-202405082235-4e0896c",
|
||||
"@blocksuite/global": "0.14.0-canary-202405082235-4e0896c",
|
||||
"@blocksuite/block-std": "0.14.0-canary-202405100201-e591bb8",
|
||||
"@blocksuite/blocks": "0.14.0-canary-202405100201-e591bb8",
|
||||
"@blocksuite/global": "0.14.0-canary-202405100201-e591bb8",
|
||||
"@blocksuite/icons": "2.1.50",
|
||||
"@blocksuite/inline": "0.14.0-canary-202405082235-4e0896c",
|
||||
"@blocksuite/presets": "0.14.0-canary-202405082235-4e0896c",
|
||||
"@blocksuite/store": "0.14.0-canary-202405082235-4e0896c",
|
||||
"@blocksuite/inline": "0.14.0-canary-202405100201-e591bb8",
|
||||
"@blocksuite/presets": "0.14.0-canary-202405100201-e591bb8",
|
||||
"@blocksuite/store": "0.14.0-canary-202405100201-e591bb8",
|
||||
"@dnd-kit/core": "^6.1.0",
|
||||
"@dnd-kit/modifiers": "^7.0.0",
|
||||
"@dnd-kit/sortable": "^8.0.0",
|
||||
|
||||
@@ -19,9 +19,14 @@ const EditorChatPanel = ({ editor }: SidebarTabProps) => {
|
||||
|
||||
useEffect(() => {
|
||||
if (!editor) return;
|
||||
editor.host.spec.getService('affine:page').slots.docLinkClicked.on(() => {
|
||||
const pageService = editor.host.spec.getService('affine:page');
|
||||
|
||||
pageService.slots.docLinkClicked.on(() => {
|
||||
(chatPanelRef.current as ChatPanel).doc = editor.doc;
|
||||
});
|
||||
pageService.slots.editorModeSwitch.on(() => {
|
||||
(chatPanelRef.current as ChatPanel).host = editor.host;
|
||||
});
|
||||
}, [editor]);
|
||||
|
||||
if (!editor) {
|
||||
@@ -32,11 +37,9 @@ const EditorChatPanel = ({ editor }: SidebarTabProps) => {
|
||||
chatPanelRef.current = new ChatPanel();
|
||||
}
|
||||
|
||||
if (editor !== chatPanelRef.current?.editor) {
|
||||
(chatPanelRef.current as ChatPanel).editor = editor;
|
||||
(chatPanelRef.current as ChatPanel).doc = editor.doc;
|
||||
// (copilotPanelRef.current as CopilotPanel).fitPadding = [20, 20, 20, 20];
|
||||
}
|
||||
(chatPanelRef.current as ChatPanel).host = editor.host;
|
||||
(chatPanelRef.current as ChatPanel).doc = editor.doc;
|
||||
// (copilotPanelRef.current as CopilotPanel).fitPadding = [20, 20, 20, 20];
|
||||
|
||||
return <div className={styles.root} ref={onRefChange} />;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user