refactor(editor): remove global types in edgeless (#10092)

Closes: [BS-2553](https://linear.app/affine-design/issue/BS-2553/remove-global-types-in-edgeless)
This commit is contained in:
Saul-Mirone
2025-02-11 12:09:44 +00:00
parent 3062bd0771
commit dbf0f9dc20
45 changed files with 126 additions and 329 deletions
@@ -1,6 +1,7 @@
import type {
BaseElementProps,
GfxModel,
GfxPrimitiveElementModel,
PointTestOptions,
SerializedElement,
} from '@blocksuite/block-std/gfx';
@@ -44,7 +45,7 @@ export type MindmapNode = {
id: string;
detail: NodeDetail;
element: BlockSuite.SurfaceElementModel;
element: GfxPrimitiveElementModel;
children: MindmapNode[];
parent: MindmapNode | null;
@@ -836,7 +837,7 @@ export class MindmapElementModel extends GfxGroupLikeElementModel<MindmapElement
return;
}
const stashed = new Set<BlockSuite.SurfaceElementModel>();
const stashed = new Set<GfxPrimitiveElementModel>();
const traverse = (node: MindmapNode) => {
node.element.stash('xywh');
stashed.add(node.element);
@@ -975,11 +976,3 @@ export class MindmapElementModel extends GfxGroupLikeElementModel<MindmapElement
@field()
accessor style: MindmapStyle = MindmapStyle.ONE;
}
declare global {
namespace BlockSuite {
interface SurfaceGroupLikeModelMap {
mindmap: MindmapElementModel;
}
}
}