feat: support for view management (#2892)

This commit is contained in:
3720
2023-06-30 13:40:00 +08:00
committed by GitHub
parent d3393cb0fc
commit 9d0db78f64
45 changed files with 1936 additions and 477 deletions

View File

@@ -25,8 +25,11 @@ export type Filter = {
args: Literal[];
};
export type View = {
export type Collection = {
id: string;
name: string;
pinned?: boolean;
filterList: Filter[];
allowList?: string[];
excludeList?: string[];
};

7
packages/env/src/page-info.ts vendored Normal file
View File

@@ -0,0 +1,7 @@
export type PageInfo = {
isEdgeless: boolean;
title: string;
id: string;
};
export type GetPageInfoById = (id: string) => PageInfo | undefined;

View File

@@ -7,7 +7,7 @@ import type {
} from '@blocksuite/store';
import type { FC, PropsWithChildren } from 'react';
import type { View } from './filter';
import type { Collection } from './filter';
import type { Workspace as RemoteWorkspace } from './workspace/legacy-cloud';
export enum WorkspaceVersion {
@@ -185,7 +185,7 @@ type PageDetailProps<Flavour extends keyof WorkspaceRegistry> =
type PageListProps<_Flavour extends keyof WorkspaceRegistry> = {
blockSuiteWorkspace: BlockSuiteWorkspace;
onOpenPage: (pageId: string, newTab?: boolean) => void;
view: View;
collection: Collection;
};
export interface WorkspaceUISchema<Flavour extends keyof WorkspaceRegistry> {