mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-30 00:29:46 +08:00
refactor: init package @affine/workspace (#1661)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import type { WorkspaceFlavour } from '@affine/workspace/type';
|
||||
import type { EditorContainer } from '@blocksuite/editor';
|
||||
import type { Page } from '@blocksuite/store';
|
||||
import { assertExists } from '@blocksuite/store';
|
||||
@@ -6,7 +7,7 @@ import { atomWithStorage } from 'jotai/utils';
|
||||
import { unstable_batchedUpdates } from 'react-dom';
|
||||
|
||||
import { WorkspacePlugins } from '../plugins';
|
||||
import type { RemWorkspace, RemWorkspaceFlavour } from '../shared';
|
||||
import type { RemWorkspace } from '../shared';
|
||||
// workspace necessary atoms
|
||||
export const currentWorkspaceIdAtom = atom<string | null>(null);
|
||||
export const currentPageIdAtom = atom<string | null>(null);
|
||||
@@ -37,7 +38,7 @@ export const jotaiStore = createStore();
|
||||
|
||||
type JotaiWorkspace = {
|
||||
id: string;
|
||||
flavour: RemWorkspaceFlavour;
|
||||
flavour: WorkspaceFlavour;
|
||||
};
|
||||
|
||||
export const jotaiWorkspacesAtom = atomWithStorage<JotaiWorkspace[]>(
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { createEmptyBlockSuiteWorkspace } from '@affine/workspace/utils';
|
||||
import { atom } from 'jotai/index';
|
||||
|
||||
import { BlockSuiteWorkspace } from '../../shared';
|
||||
import { apis } from '../../shared/apis';
|
||||
import { createEmptyBlockSuiteWorkspace } from '../../utils';
|
||||
|
||||
export const publicWorkspaceIdAtom = atom<string | null>(null);
|
||||
export const publicBlockSuiteAtom = atom<Promise<BlockSuiteWorkspace>>(
|
||||
|
||||
Reference in New Issue
Block a user