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,8 +1,6 @@
import { BaseSelection, SelectionExtension } from '@blocksuite/store';
import z from 'zod';
import { SelectionExtension } from '../../extension/selection.js';
import { BaseSelection } from '../base.js';
const BlockSelectionSchema = z.object({
blockId: z.string(),
});
@@ -1,8 +1,6 @@
import { BaseSelection, SelectionExtension } from '@blocksuite/store';
import z from 'zod';
import { SelectionExtension } from '../../extension/selection.js';
import { BaseSelection } from '../base.js';
const CursorSelectionSchema = z.object({
x: z.number(),
y: z.number(),
@@ -1,8 +1,6 @@
import { BaseSelection, SelectionExtension } from '@blocksuite/store';
import z from 'zod';
import { SelectionExtension } from '../../extension/selection.js';
import { BaseSelection } from '../base.js';
const SurfaceSelectionSchema = z.object({
blockId: z.string(),
elements: z.array(z.string()),
@@ -1,8 +1,6 @@
import { BaseSelection, SelectionExtension } from '@blocksuite/store';
import z from 'zod';
import { SelectionExtension } from '../../extension/selection.js';
import { BaseSelection } from '../base.js';
export type TextRangePoint = {
blockId: string;
index: number;