mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-07 01:09:54 +08:00
chore(editor): remove common utils in surface block (#9527)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user