mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-24 13:17:10 +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:
@@ -5,6 +5,10 @@ import {
|
||||
promptDocTitle,
|
||||
} from '@blocksuite/affine-block-embed';
|
||||
import { ParagraphBlockComponent } from '@blocksuite/affine-block-paragraph';
|
||||
import {
|
||||
draftSelectedModelsCommand,
|
||||
getSelectedModelsCommand,
|
||||
} from '@blocksuite/affine-shared/commands';
|
||||
import { matchFlavours } from '@blocksuite/affine-shared/utils';
|
||||
import {
|
||||
type BlockComponent,
|
||||
@@ -120,11 +124,11 @@ export class PageKeyboardManager {
|
||||
const rootComponent = this.rootComponent;
|
||||
const [_, ctx] = this.rootComponent.std.command
|
||||
.chain()
|
||||
.getSelectedModels({
|
||||
.pipe(getSelectedModelsCommand, {
|
||||
types: ['block'],
|
||||
mode: 'highest',
|
||||
})
|
||||
.draftSelectedModels()
|
||||
.pipe(draftSelectedModelsCommand)
|
||||
.run();
|
||||
const selectedModels = ctx.selectedModels?.filter(
|
||||
block =>
|
||||
|
||||
Reference in New Issue
Block a user