feat(editor): selection as store extension (#9605)

This commit is contained in:
Saul-Mirone
2025-01-09 11:49:23 +00:00
parent c2d8c23f13
commit 126ab18967
39 changed files with 176 additions and 204 deletions
@@ -1,11 +1,12 @@
import { ImageSelection } from '@blocksuite/affine-shared/selection';
import type { BaseSelection, UIEventStateContext } from '@blocksuite/block-std';
import type { UIEventStateContext } from '@blocksuite/block-std';
import {
BlockSelection,
ShadowlessElement,
TextSelection,
} from '@blocksuite/block-std';
import { WithDisposable } from '@blocksuite/global/utils';
import type { BaseSelection } from '@blocksuite/store';
import { css, html, type PropertyValues } from 'lit';
import { property, query, state } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js';
@@ -1,4 +1,3 @@
import { ImageSelectionExtension } from '@blocksuite/affine-shared/selection';
import {
BlockViewExtension,
CommandExtension,
@@ -29,6 +28,5 @@ export const ImageBlockSpec: ExtensionType[] = [
imageToolbar: literal`affine-image-toolbar-widget`,
}),
ImageDropOption,
ImageSelectionExtension,
ImageBlockAdapterExtensions,
].flat();