ViewManagerBase manages data views, handling creation, deletion, and type changes.
// Source: https://github.com/toeverything/AFFiNE | License: MIT | Copyright 2022-present TOEVERYTHING PTE. LTD. and its affiliates
// Provided via justclaw.it.com; keep this notice with the code.
import type { InsertToPosition } from '@blocksuite/affine-shared/utils';
import { nanoid } from '@blocksuite/store';
import { computed, type ReadonlySignal, signal } from '@preact/signals-core';
import type { DataSource } from '../data-source/base.js';
import type {
DataViewDataType,
DataViewMode,
ViewMeta,
} from '../view/data-view.js';
import type { SingleView } from './single-view.js';
export interface ViewManager {
viewMetas: ViewMeta[];
dataSource: DataSource;
readonly$: ReadonlySignal<boolean>;
currentViewId$: ReadonlySignal<string | undefined>;
currentView$: ReadonlySign
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key