mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 09:36:17 +08:00
refactor(editor): remove legacy block service spec slots (#11013)
This commit is contained in:
@@ -1,2 +1 @@
|
||||
export * from './slots.js';
|
||||
export * from './type.js';
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
import { Subject } from 'rxjs';
|
||||
|
||||
import type { BlockService } from '../extension/service.js';
|
||||
import type { BlockComponent, WidgetComponent } from '../view/index.js';
|
||||
|
||||
export type BlockSpecSlots<Service extends BlockService = BlockService> = {
|
||||
mounted: Subject<{ service: Service }>;
|
||||
unmounted: Subject<{ service: Service }>;
|
||||
viewConnected: Subject<{ component: BlockComponent; service: Service }>;
|
||||
viewDisconnected: Subject<{ component: BlockComponent; service: Service }>;
|
||||
widgetConnected: Subject<{ component: WidgetComponent; service: Service }>;
|
||||
widgetDisconnected: Subject<{
|
||||
component: WidgetComponent;
|
||||
service: Service;
|
||||
}>;
|
||||
};
|
||||
|
||||
export const getSlots = (): BlockSpecSlots => {
|
||||
return {
|
||||
mounted: new Subject(),
|
||||
unmounted: new Subject(),
|
||||
viewConnected: new Subject(),
|
||||
viewDisconnected: new Subject(),
|
||||
widgetConnected: new Subject(),
|
||||
widgetDisconnected: new Subject(),
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user