mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
11 lines
348 B
TypeScript
11 lines
348 B
TypeScript
import { SurfaceSelection } from '@blocksuite/std';
|
|
|
|
import type { GetSelectionCommand } from './types';
|
|
|
|
export const getSurfaceSelectionCommand: GetSelectionCommand = (ctx, next) => {
|
|
const currentSurfaceSelection = ctx.std.selection.filter(SurfaceSelection)[0];
|
|
if (!currentSurfaceSelection) return;
|
|
|
|
next({ currentSurfaceSelection });
|
|
};
|