mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
refactor: auto ordered imports (#9163)
All checks were successful
Tests / test (push) Successful in 4m38s
All checks were successful
Tests / test (push) Successful in 4m38s
This commit is contained in:
parent
82b9a6b464
commit
21ffaf4d76
421 changed files with 3532 additions and 2763 deletions
|
@ -1,3 +1,5 @@
|
|||
import { PRECISION } from "./utils";
|
||||
|
||||
import type {
|
||||
Degrees,
|
||||
GlobalPoint,
|
||||
|
@ -5,7 +7,6 @@ import type {
|
|||
PolarCoords,
|
||||
Radians,
|
||||
} from "./types";
|
||||
import { PRECISION } from "./utils";
|
||||
|
||||
// TODO: Simplify with modulo and fix for angles beyond 4*Math.PI and - 4*Math.PI
|
||||
export const normalizeRadians = (angle: Radians): Radians => {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import "../utils/test-utils";
|
||||
|
||||
import {
|
||||
curve,
|
||||
curveClosestPoint,
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import type { Bounds } from "../excalidraw/element/bounds";
|
||||
import { isPoint, pointDistance, pointFrom } from "./point";
|
||||
import { rectangle, rectangleIntersectLineSegment } from "./rectangle";
|
||||
|
||||
import type { Curve, GlobalPoint, LineSegment, LocalPoint } from "./types";
|
||||
import type { Bounds } from "../excalidraw/element/bounds";
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -8,6 +8,7 @@ import {
|
|||
import { line } from "./line";
|
||||
import { pointFrom } from "./point";
|
||||
import { lineSegment } from "./segment";
|
||||
|
||||
import type { Ellipse, GlobalPoint } from "./types";
|
||||
|
||||
describe("point and ellipse", () => {
|
||||
|
|
|
@ -4,13 +4,6 @@ import {
|
|||
pointFromVector,
|
||||
pointsEqual,
|
||||
} from "./point";
|
||||
import type {
|
||||
Ellipse,
|
||||
GlobalPoint,
|
||||
Line,
|
||||
LineSegment,
|
||||
LocalPoint,
|
||||
} from "./types";
|
||||
import { PRECISION } from "./utils";
|
||||
import {
|
||||
vector,
|
||||
|
@ -20,6 +13,14 @@ import {
|
|||
vectorScale,
|
||||
} from "./vector";
|
||||
|
||||
import type {
|
||||
Ellipse,
|
||||
GlobalPoint,
|
||||
Line,
|
||||
LineSegment,
|
||||
LocalPoint,
|
||||
} from "./types";
|
||||
|
||||
/**
|
||||
* Construct an Ellipse object from the parameters
|
||||
*
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { pointFrom } from "./point";
|
||||
|
||||
import type { GlobalPoint, Line, LocalPoint } from "./types";
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { pointFrom, pointRotateRads } from "./point";
|
||||
|
||||
import type { Radians } from "./types";
|
||||
|
||||
describe("rotate", () => {
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
import { degreesToRadians } from "./angle";
|
||||
import { PRECISION } from "./utils";
|
||||
import { vectorFromPoint, vectorScale } from "./vector";
|
||||
|
||||
import type {
|
||||
LocalPoint,
|
||||
GlobalPoint,
|
||||
|
@ -6,8 +9,6 @@ import type {
|
|||
Degrees,
|
||||
Vector,
|
||||
} from "./types";
|
||||
import { PRECISION } from "./utils";
|
||||
import { vectorFromPoint, vectorScale } from "./vector";
|
||||
|
||||
/**
|
||||
* Create a properly typed Point instance from the X and Y coordinates.
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import { pointsEqual } from "./point";
|
||||
import { lineSegment, pointOnLineSegment } from "./segment";
|
||||
import type { GlobalPoint, LocalPoint, Polygon } from "./types";
|
||||
import { PRECISION } from "./utils";
|
||||
|
||||
import type { GlobalPoint, LocalPoint, Polygon } from "./types";
|
||||
|
||||
export function polygon<Point extends GlobalPoint | LocalPoint>(
|
||||
...points: Point[]
|
||||
) {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { toBrandedType } from "@excalidraw/excalidraw/utils";
|
||||
|
||||
import type { InclusiveRange } from "./types";
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { pointFrom } from "./point";
|
||||
import { lineSegment, lineSegmentIntersectionPoints } from "./segment";
|
||||
|
||||
import type { GlobalPoint, LineSegment, LocalPoint, Rectangle } from "./types";
|
||||
|
||||
export function rectangle<P extends GlobalPoint | LocalPoint>(
|
||||
|
|
|
@ -5,7 +5,6 @@ import {
|
|||
pointFromVector,
|
||||
pointRotateRads,
|
||||
} from "./point";
|
||||
import type { GlobalPoint, LineSegment, LocalPoint, Radians } from "./types";
|
||||
import { PRECISION } from "./utils";
|
||||
import {
|
||||
vectorAdd,
|
||||
|
@ -15,6 +14,8 @@ import {
|
|||
vectorSubtract,
|
||||
} from "./vector";
|
||||
|
||||
import type { GlobalPoint, LineSegment, LocalPoint, Radians } from "./types";
|
||||
|
||||
/**
|
||||
* Create a line segment from two points.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue