feat: update blocksuite version & perfect file system function

This commit is contained in:
QiShaoXuan
2022-12-13 15:11:05 +08:00
parent ee59381c38
commit c753a23a98
8 changed files with 199 additions and 155 deletions
@@ -0,0 +1,28 @@
import { Page } from '@blocksuite/store';
import { QueryContent } from '@blocksuite/store/dist/workspace/search';
export interface PageMeta {
id: string;
title: string;
favorite: boolean;
trash: boolean;
createDate: number;
trashDate: number | null;
}
export type EditorHandlers = {
createPage: (pageId?: string) => Promise<Page>;
openPage: (
pageId: string,
query?: { [key: string]: string }
) => Promise<boolean>;
getPageMeta: (pageId: string) => PageMeta | void;
deletePage: (pageId: string) => void;
recyclePage: (pageId: string) => void;
toggleDeletePage: (pageId: string) => void;
favoritePage: (pageId: string) => void;
unFavoritePage: (pageId: string) => void;
toggleFavoritePage: (pageId: string) => void;
permanentlyDeletePage: (pageId: string) => void;
search: (query: QueryContent) => any;
};