mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-10 13:38:49 +08:00
refactor(editor): remove dependency of command global types (#9903)
Closes: [BS-2216](https://linear.app/affine-design/issue/BS-2216/remove-global-types-in-command)
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
import type { getImageSelectionsCommand } from '@blocksuite/affine-shared/commands';
|
||||
|
||||
import type { insertImagesCommand } from './commands/insert-images.js';
|
||||
import { ImageBlockFallbackCard } from './components/image-block-fallback.js';
|
||||
import { ImageBlockPageComponent } from './components/page-image-block.js';
|
||||
import { ImageBlockComponent } from './image-block.js';
|
||||
@@ -16,21 +13,6 @@ export function effects() {
|
||||
|
||||
declare global {
|
||||
namespace BlockSuite {
|
||||
interface CommandContext {
|
||||
insertedImageIds?: Promise<string[]>;
|
||||
}
|
||||
|
||||
interface Commands {
|
||||
getImageSelections: typeof getImageSelectionsCommand;
|
||||
/**
|
||||
* open file dialog to insert images before or after the current block selection
|
||||
* @param removeEmptyLine remove the current block if it is empty
|
||||
* @param place where to insert the images
|
||||
* @returns a promise that resolves to the inserted image ids
|
||||
*/
|
||||
insertImages: typeof insertImagesCommand;
|
||||
}
|
||||
|
||||
interface BlockServices {
|
||||
'affine:image': ImageBlockService;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user