mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-23 21:06:22 +08:00
fix: modify with new blocksuite version about subpage (#2060)
This commit is contained in:
@@ -45,11 +45,11 @@
|
||||
"react-is": "^18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blocksuite/blocks": "0.0.0-20230420160324-857b396c-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20230420160324-857b396c-nightly",
|
||||
"@blocksuite/global": "0.0.0-20230420160324-857b396c-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20230420210727-85b7de79-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20230420210727-85b7de79-nightly",
|
||||
"@blocksuite/global": "0.0.0-20230420210727-85b7de79-nightly",
|
||||
"@blocksuite/icons": "^2.1.10",
|
||||
"@blocksuite/store": "0.0.0-20230420160324-857b396c-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230420210727-85b7de79-nightly",
|
||||
"@storybook/addon-actions": "^7.0.5",
|
||||
"@storybook/addon-coverage": "^0.0.8",
|
||||
"@storybook/addon-essentials": "^7.0.5",
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import type {
|
||||
DragEndEvent} from '@dnd-kit/core';
|
||||
import type { DragEndEvent } from '@dnd-kit/core';
|
||||
import {
|
||||
closestCenter,
|
||||
DndContext,
|
||||
DragOverlay,
|
||||
PointerSensor,
|
||||
useSensor,
|
||||
useSensors
|
||||
useSensors,
|
||||
} from '@dnd-kit/core';
|
||||
import { useCallback, useState } from 'react';
|
||||
|
||||
@@ -47,7 +46,7 @@ export const TreeView = <RenderProps,>({
|
||||
const { active, over } = e;
|
||||
const position = over?.data.current?.position;
|
||||
const dropId = over?.data.current?.node.id;
|
||||
|
||||
setDraggingId(undefined);
|
||||
if (!over || !active || !position) {
|
||||
return;
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -4,7 +4,7 @@
|
||||
"main": "./src/index.ts",
|
||||
"module": "./src/index.ts",
|
||||
"devDependencies": {
|
||||
"@blocksuite/global": "0.0.0-20230420160324-857b396c-nightly",
|
||||
"@blocksuite/global": "0.0.0-20230420210727-85b7de79-nightly",
|
||||
"next": "=13.2.3",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
|
||||
@@ -10,9 +10,9 @@ import { useMemo } from 'react';
|
||||
export function useBlockSuiteWorkspaceHelper(blockSuiteWorkspace: Workspace) {
|
||||
return useMemo(
|
||||
() => ({
|
||||
createPage: (pageId: string, parentId?: string): Page => {
|
||||
createPage: (pageId: string): Page => {
|
||||
assertExists(blockSuiteWorkspace);
|
||||
return blockSuiteWorkspace.createPage(pageId, parentId);
|
||||
return blockSuiteWorkspace.createPage(pageId);
|
||||
},
|
||||
markMilestone: async (name: string) => {
|
||||
assertExists(blockSuiteWorkspace);
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
"jotai": "^2.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blocksuite/blocks": "0.0.0-20230420160324-857b396c-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20230420160324-857b396c-nightly",
|
||||
"@blocksuite/global": "0.0.0-20230420160324-857b396c-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230420160324-857b396c-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20230420210727-85b7de79-nightly",
|
||||
"@blocksuite/editor": "0.0.0-20230420210727-85b7de79-nightly",
|
||||
"@blocksuite/global": "0.0.0-20230420210727-85b7de79-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230420210727-85b7de79-nightly",
|
||||
"lottie-web": "^5.11.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
"idb": "^7.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blocksuite/blocks": "0.0.0-20230420160324-857b396c-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230420160324-857b396c-nightly",
|
||||
"@blocksuite/blocks": "0.0.0-20230420210727-85b7de79-nightly",
|
||||
"@blocksuite/store": "0.0.0-20230420210727-85b7de79-nightly",
|
||||
"vite": "^4.2.1",
|
||||
"vite-plugin-dts": "^2.2.0",
|
||||
"y-indexeddb": "^9.0.10"
|
||||
|
||||
Reference in New Issue
Block a user