mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-18 10:36:22 +08:00
feat(editor): selection as store extension (#9605)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user