mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-11 22:18:54 +08:00
feat: bump blocksuite (#5673)
This commit is contained in:
@@ -26,14 +26,14 @@
|
||||
"@affine/templates": "workspace:*",
|
||||
"@affine/workspace": "workspace:*",
|
||||
"@affine/workspace-impl": "workspace:*",
|
||||
"@blocksuite/block-std": "0.12.0-nightly-202401190708-4e2c95a",
|
||||
"@blocksuite/blocks": "0.12.0-nightly-202401190708-4e2c95a",
|
||||
"@blocksuite/global": "0.12.0-nightly-202401190708-4e2c95a",
|
||||
"@blocksuite/block-std": "0.12.0-nightly-202401240410-02f373e",
|
||||
"@blocksuite/blocks": "0.12.0-nightly-202401240410-02f373e",
|
||||
"@blocksuite/global": "0.12.0-nightly-202401240410-02f373e",
|
||||
"@blocksuite/icons": "2.1.42",
|
||||
"@blocksuite/inline": "0.12.0-nightly-202401190708-4e2c95a",
|
||||
"@blocksuite/lit": "0.12.0-nightly-202401190708-4e2c95a",
|
||||
"@blocksuite/presets": "0.12.0-nightly-202401190708-4e2c95a",
|
||||
"@blocksuite/store": "0.12.0-nightly-202401190708-4e2c95a",
|
||||
"@blocksuite/inline": "0.12.0-nightly-202401240410-02f373e",
|
||||
"@blocksuite/lit": "0.12.0-nightly-202401240410-02f373e",
|
||||
"@blocksuite/presets": "0.12.0-nightly-202401240410-02f373e",
|
||||
"@blocksuite/store": "0.12.0-nightly-202401240410-02f373e",
|
||||
"@dnd-kit/core": "^6.0.8",
|
||||
"@dnd-kit/sortable": "^8.0.0",
|
||||
"@emotion/cache": "^11.11.0",
|
||||
|
||||
@@ -31,17 +31,15 @@ export const PresentButton = () => {
|
||||
const editorRoot = document.querySelector('editor-host');
|
||||
if (!editorRoot) return;
|
||||
|
||||
// TODO: use surfaceService subAtom
|
||||
const surfaceService = editorRoot?.spec.getService(
|
||||
'affine:surface'
|
||||
) as SurfaceService;
|
||||
const edgelessPage = editorRoot?.querySelector('affine-edgeless-page');
|
||||
if (!edgelessPage) return;
|
||||
|
||||
surfaceService.slots.edgelessToolUpdated.on(() => {
|
||||
setIsPresent(surfaceService?.currentTool?.type === 'frameNavigator');
|
||||
edgelessPage.slots.edgelessToolUpdated.on(() => {
|
||||
setIsPresent(edgelessPage.edgelessTool.type === 'frameNavigator');
|
||||
});
|
||||
|
||||
return () => {
|
||||
surfaceService.slots.edgelessToolUpdated.dispose();
|
||||
edgelessPage.slots.edgelessToolUpdated.dispose();
|
||||
};
|
||||
}, [isPresent]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user