mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
Closes: [BS-2282](https://linear.app/affine-design/issue/BS-2282/replace-widgetviewmapextension-with-widgetextension)
35 lines
1.2 KiB
TypeScript
35 lines
1.2 KiB
TypeScript
import { createIdentifier } from '@blocksuite/global/di';
|
|
|
|
import type { Command } from './command/index.js';
|
|
import type { EventOptions, UIEventHandler } from './event/index.js';
|
|
import type { BlockService, LifeCycleWatcher } from './extension/index.js';
|
|
import type { BlockStdScope } from './scope/index.js';
|
|
import type { BlockViewType, WidgetViewType } from './spec/type.js';
|
|
|
|
export const BlockServiceIdentifier =
|
|
createIdentifier<BlockService>('BlockService');
|
|
|
|
export const BlockFlavourIdentifier = createIdentifier<{ flavour: string }>(
|
|
'BlockFlavour'
|
|
);
|
|
|
|
export const CommandIdentifier = createIdentifier<Command>('Commands');
|
|
|
|
export const ConfigIdentifier =
|
|
createIdentifier<Record<string, unknown>>('Config');
|
|
|
|
export const BlockViewIdentifier = createIdentifier<BlockViewType>('BlockView');
|
|
|
|
export const WidgetViewIdentifier =
|
|
createIdentifier<WidgetViewType>('WidgetView');
|
|
|
|
export const LifeCycleWatcherIdentifier =
|
|
createIdentifier<LifeCycleWatcher>('LifeCycleWatcher');
|
|
|
|
export const StdIdentifier = createIdentifier<BlockStdScope>('Std');
|
|
|
|
export const KeymapIdentifier = createIdentifier<{
|
|
getter: (std: BlockStdScope) => Record<string, UIEventHandler>;
|
|
options?: EventOptions;
|
|
}>('Keymap');
|