feat: new preload pages (#3674)

This commit is contained in:
Alex Yang
2023-08-10 15:56:16 -04:00
committed by GitHub
parent f06efd4d02
commit 43b35a77bb
43 changed files with 14197 additions and 6833 deletions

View File

@@ -5,22 +5,6 @@ import type { Atom } from 'jotai';
import { atom, useAtomValue } from 'jotai';
import { useMemo } from 'react';
declare module '@blocksuite/store' {
interface PageMeta {
favorite?: boolean;
subpageIds: string[];
// If a page remove to trash, and it is a subpage, it will remove from its parent `subpageIds`, 'trashRelate' is use for save it parent
trashRelate?: string;
trash?: boolean;
trashDate?: number;
updatedDate?: number;
mode?: 'page' | 'edgeless';
jumpOnce?: boolean;
// todo: support `number` in the future
isPublic?: boolean;
}
}
const weakMap = new WeakMap<Workspace, Atom<PageMeta[]>>();
export function useBlockSuitePageMeta(