chore(editor): remove common utils in surface block (#9527)

This commit is contained in:
Saul-Mirone
2025-01-06 02:41:39 +00:00
parent 3d168ba2d2
commit c22804766d
22 changed files with 38 additions and 285 deletions
+2 -54
View File
@@ -65,34 +65,6 @@ export {
} from './utils/mindmap/layout.js';
export { RoughCanvas } from './utils/rough/canvas.js';
import {
almostEqual,
clamp,
getPointFromBoundsWithRotation,
getStroke,
getSvgPathFromStroke,
intersects,
isOverlap,
isPointIn,
lineIntersects,
linePolygonIntersects,
normalizeDegAngle,
polygonGetPointTangent,
polygonNearestPoint,
polygonPointDistance,
polyLineNearestPoint,
rotatePoints,
sign,
toDegree,
toRadian,
} from '@blocksuite/global/utils';
import { generateKeyBetween } from 'fractional-indexing';
import {
generateElementId,
getLastPropsKey,
normalizeWheelDeltaY,
} from './utils';
import {
addTree,
containsNode,
@@ -107,8 +79,10 @@ export * from './extensions';
export {
addNote,
addNoteAtPoint,
generateElementId,
getLastPropsKey,
getSurfaceBlock,
normalizeWheelDeltaY,
} from './utils';
export type { Options } from './utils/rough/core';
export { sortIndex } from './utils/sort';
@@ -132,32 +106,6 @@ export const TextUtils = {
isSameFontFamily,
};
export const CommonUtils = {
almostEqual,
clamp,
generateElementId,
generateKeyBetween,
getPointFromBoundsWithRotation,
getStroke,
getSvgPathFromStroke,
getLastPropsKey,
intersects,
isOverlap,
isPointIn,
lineIntersects,
linePolygonIntersects,
normalizeDegAngle,
normalizeWheelDeltaY,
polygonGetPointTangent,
polygonNearestPoint,
polygonPointDistance,
polyLineNearestPoint,
rotatePoints,
sign,
toDegree,
toRadian,
};
export const MindmapUtils = {
addTree,
createFromTree,