mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-19 23:37:15 +08:00
feat: bump blocksuite (#5194)
Co-authored-by: AyushAgrawal-A2 <ayushagl06@gmail.com>
This commit is contained in:
@@ -13,9 +13,9 @@
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@blocksuite/blocks": "*",
|
||||
"@blocksuite/editor": "*",
|
||||
"@blocksuite/global": "*",
|
||||
"@blocksuite/icons": "2.1.34",
|
||||
"@blocksuite/presets": "*",
|
||||
"@blocksuite/store": "*"
|
||||
},
|
||||
"dependencies": {
|
||||
@@ -71,12 +71,12 @@
|
||||
"uuid": "^9.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blocksuite/blocks": "0.0.0-20231130092516-0f858b95-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20231130092516-0f858b95-nightly",
|
||||
"@blocksuite/global": "0.0.0-20231130092516-0f858b95-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20231205045113-03964196-nightly",
|
||||
"@blocksuite/global": "0.0.0-20231205045113-03964196-nightly",
|
||||
"@blocksuite/icons": "2.1.36",
|
||||
"@blocksuite/lit": "0.0.0-20231130092516-0f858b95-nightly",
|
||||
"@blocksuite/store": "0.0.0-20231130092516-0f858b95-nightly",
|
||||
"@blocksuite/lit": "0.0.0-20231205045113-03964196-nightly",
|
||||
"@blocksuite/presets": "0.0.0-20231205045113-03964196-nightly",
|
||||
"@blocksuite/store": "0.0.0-20231205045113-03964196-nightly",
|
||||
"@storybook/addon-actions": "^7.5.3",
|
||||
"@storybook/addon-essentials": "^7.5.3",
|
||||
"@storybook/addon-interactions": "^7.5.3",
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
import { rootBlockHubAtom } from '@affine/workspace/atom';
|
||||
import { useAtomValue } from 'jotai';
|
||||
import { useEffect, useRef } from 'react';
|
||||
|
||||
export const RootBlockHub = () => {
|
||||
const ref = useRef<HTMLDivElement>(null);
|
||||
const blockHub = useAtomValue(rootBlockHubAtom);
|
||||
useEffect(() => {
|
||||
if (ref.current) {
|
||||
const div = ref.current;
|
||||
if (blockHub) {
|
||||
if (div.hasChildNodes()) {
|
||||
(div.firstChild as ChildNode).remove();
|
||||
}
|
||||
div.append(blockHub);
|
||||
}
|
||||
}
|
||||
}, [blockHub]);
|
||||
return <div ref={ref} data-testid="block-hub" />;
|
||||
};
|
||||
@@ -1,5 +1,5 @@
|
||||
import { EditorContainer } from '@blocksuite/editor';
|
||||
import { assertExists } from '@blocksuite/global/utils';
|
||||
import { EditorContainer } from '@blocksuite/presets';
|
||||
import type { Page } from '@blocksuite/store';
|
||||
import clsx from 'clsx';
|
||||
import { use } from 'foxact/use';
|
||||
|
||||
Reference in New Issue
Block a user