chore: sort imports

This commit is contained in:
DarkSky
2022-08-13 02:45:04 +08:00
parent 617f9b9bfc
commit 5462b1707f
83 changed files with 343 additions and 1481 deletions
@@ -1,21 +1,21 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { Utils } from '@tldraw/core';
import { Vec } from '@tldraw/vec';
import { shapeUtils } from '@toeverything/components/board-shapes';
import type { TldrawApp } from '@toeverything/components/board-state';
import { deepCopy, TLDR } from '@toeverything/components/board-state';
import {
ArrowBinding,
ArrowShape,
TDShape,
TDBinding,
TDStatus,
SessionType,
TDBinding,
TDShape,
TDShapeType,
TldrawPatch,
TDStatus,
TldrawCommand,
TldrawPatch,
} from '@toeverything/components/board-types';
import { Vec } from '@tldraw/vec';
import { TLDR, deepCopy } from '@toeverything/components/board-state';
import { shapeUtils } from '@toeverything/components/board-shapes';
import { BaseSession } from './base-session';
import type { TldrawApp } from '@toeverything/components/board-state';
import { Utils } from '@tldraw/core';
export class ArrowSession extends BaseSession {
type = SessionType.Arrow;
@@ -1,5 +1,5 @@
import { BaseSessionType } from '@toeverything/components/board-types';
import type { TldrawApp } from '@toeverything/components/board-state';
import { BaseSessionType } from '@toeverything/components/board-types';
export abstract class BaseSession extends BaseSessionType {
app: TldrawApp;
@@ -1,11 +1,11 @@
import { TLBounds, Utils } from '@tldraw/core';
import type { TldrawApp } from '@toeverything/components/board-state';
import {
SessionType,
TldrawPatch,
TDStatus,
TldrawCommand,
TldrawPatch,
} from '@toeverything/components/board-types';
import type { TldrawApp } from '@toeverything/components/board-state';
import { BaseSession } from './base-session';
export class BrushSession extends BaseSession {
@@ -1,13 +1,13 @@
import { Utils } from '@tldraw/core';
import { Vec } from '@tldraw/vec';
import type { TldrawApp } from '@toeverything/components/board-state';
import {
DrawShape,
SessionType,
TDStatus,
TldrawPatch,
TldrawCommand,
DrawShape,
TldrawPatch,
} from '@toeverything/components/board-types';
import type { TldrawApp } from '@toeverything/components/board-state';
import { BaseSession } from './base-session';
export class DrawSession extends BaseSession {
@@ -1,14 +1,14 @@
import { Vec } from '@tldraw/vec';
import {
SessionType,
TDStatus,
TDShape,
PagePartial,
TDBinding,
TldrawPatch,
TldrawCommand,
} from '@toeverything/components/board-types';
import type { TldrawApp } from '@toeverything/components/board-state';
import {
PagePartial,
SessionType,
TDBinding,
TDShape,
TDStatus,
TldrawCommand,
TldrawPatch,
} from '@toeverything/components/board-types';
import { BaseSession } from './base-session';
export class EraseSession extends BaseSession {
@@ -1,17 +1,16 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { TLPageState, TLBounds, Utils } from '@tldraw/core';
import { TLBounds, TLPageState, Utils } from '@tldraw/core';
import { Vec } from '@tldraw/vec';
import type { TldrawApp } from '@toeverything/components/board-state';
import {
Patch,
SessionType,
TDShape,
TDStatus,
SessionType,
TDShapeType,
TldrawPatch,
TldrawCommand,
TldrawPatch,
} from '@toeverything/components/board-types';
import { BaseSession } from './base-session';
import type { TldrawApp } from '@toeverything/components/board-state';
export class GridSession extends BaseSession {
type = SessionType.Grid;
@@ -1,14 +1,14 @@
import { Vec } from '@tldraw/vec';
import type { TldrawApp } from '@toeverything/components/board-state';
import { TLDR } from '@toeverything/components/board-state';
import {
SessionType,
ShapesWithProp,
TDStatus,
TldrawCommand,
TldrawPatch,
TDStatus,
} from '@toeverything/components/board-types';
import { TLDR } from '@toeverything/components/board-state';
import { BaseSession } from './base-session';
import type { TldrawApp } from '@toeverything/components/board-state';
export class HandleSession extends BaseSession {
type = SessionType.Handle;
+3 -3
View File
@@ -2,14 +2,14 @@ import { ExceptFirst, SessionType } from '@toeverything/components/board-types';
import { ArrowSession } from './arrow-session';
import { BrushSession } from './brush-session';
import { DrawSession } from './draw-session';
import { EraseSession } from './erase-session';
import { GridSession } from './grid-session';
import { HandleSession } from './handle-session';
import { LaserSession } from './laser-session';
import { RotateSession } from './rotate-session';
import { TransformSession } from './transform-session';
import { TransformSingleSession } from './transform-single-session';
import { TranslateSession } from './translate-session';
import { EraseSession } from './erase-session';
import { GridSession } from './grid-session';
import { LaserSession } from './laser-session';
export type TldrawSession =
| ArrowSession
@@ -1,11 +1,11 @@
import { Vec } from '@tldraw/vec';
import type { TldrawApp } from '@toeverything/components/board-state';
import {
SessionType,
TDStatus,
TldrawPatch,
TldrawCommand,
TldrawPatch,
} from '@toeverything/components/board-types';
import type { TldrawApp } from '@toeverything/components/board-state';
import { BaseSession } from './base-session';
export class LaserSession extends BaseSession {
type = SessionType.Draw;
@@ -1,16 +1,16 @@
import { Utils } from '@tldraw/core';
import { Vec } from '@tldraw/vec';
import type { TldrawApp } from '@toeverything/components/board-state';
import { TLDR } from '@toeverything/components/board-state';
import {
SessionType,
TDShape,
TDShapeType,
TDStatus,
TldrawCommand,
TldrawPatch,
TDShape,
TDStatus,
TDShapeType,
} from '@toeverything/components/board-types';
import { TLDR } from '@toeverything/components/board-state';
import { BaseSession } from './base-session';
import type { TldrawApp } from '@toeverything/components/board-state';
export class RotateSession extends BaseSession {
type = SessionType.Rotate;
@@ -1,18 +1,18 @@
import type { TLBoundsWithCenter, TLSnapLine } from '@tldraw/core';
import { TLBounds, TLBoundsCorner, TLBoundsEdge, Utils } from '@tldraw/core';
import { Vec } from '@tldraw/vec';
import type { TLSnapLine, TLBoundsWithCenter } from '@tldraw/core';
import type { TldrawApp } from '@toeverything/components/board-state';
import { TLDR } from '@toeverything/components/board-state';
import {
SessionType,
TldrawCommand,
TldrawPatch,
TDShape,
TDStatus,
SLOW_SPEED,
SNAP_DISTANCE,
TDShape,
TDStatus,
TldrawCommand,
TldrawPatch,
} from '@toeverything/components/board-types';
import { TLDR } from '@toeverything/components/board-state';
import { BaseSession } from './base-session';
import type { TldrawApp } from '@toeverything/components/board-state';
type SnapInfo =
| {
@@ -1,24 +1,24 @@
import {
TLBoundsCorner,
TLSnapLine,
TLBoundsEdge,
Utils,
TLBoundsWithCenter,
TLBounds,
TLBoundsCorner,
TLBoundsEdge,
TLBoundsWithCenter,
TLSnapLine,
Utils,
} from '@tldraw/core';
import { Vec } from '@tldraw/vec';
import type { TldrawApp } from '@toeverything/components/board-state';
import { TLDR } from '@toeverything/components/board-state';
import {
SessionType,
TldrawCommand,
TldrawPatch,
TDShape,
TDStatus,
SLOW_SPEED,
SNAP_DISTANCE,
TDShape,
TDStatus,
TldrawCommand,
TldrawPatch,
} from '@toeverything/components/board-types';
import { TLDR } from '@toeverything/components/board-state';
import { BaseSession } from './base-session';
import type { TldrawApp } from '@toeverything/components/board-state';
type SnapInfo =
| {
@@ -1,17 +1,17 @@
import type { TLBounds } from '@tldraw/core';
import type { TldrawApp } from '@toeverything/components/board-state';
import { TLDR } from '@toeverything/components/board-state';
import {
ArrowShape,
EllipseShape,
RectangleShape,
SessionType,
TDStatus,
TldrawCommand,
TldrawPatch,
TDStatus,
RectangleShape,
TriangleShape,
EllipseShape,
ArrowShape,
} from '@toeverything/components/board-types';
import { TLDR } from '@toeverything/components/board-state';
import { BaseSession } from './base-session';
import type { TldrawApp } from '@toeverything/components/board-state';
import type { TLBounds } from '@tldraw/core';
export class TranslateLabelSession extends BaseSession {
type = SessionType.Handle;
@@ -1,30 +1,30 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import {
TLPageState,
Utils,
TLBoundsWithCenter,
TLSnapLine,
TLBounds,
TLBoundsWithCenter,
TLPageState,
TLSnapLine,
Utils,
} from '@tldraw/core';
import { Vec } from '@tldraw/vec';
import type { TldrawApp } from '@toeverything/components/board-state';
import { TLDR } from '@toeverything/components/board-state';
import {
TDShape,
TDBinding,
TldrawCommand,
TDStatus,
ArrowShape,
Patch,
GroupShape,
SessionType,
ArrowBinding,
TldrawPatch,
TDShapeType,
ArrowShape,
GroupShape,
Patch,
SessionType,
SLOW_SPEED,
SNAP_DISTANCE,
TDBinding,
TDShape,
TDShapeType,
TDStatus,
TldrawCommand,
TldrawPatch,
} from '@toeverything/components/board-types';
import { TLDR } from '@toeverything/components/board-state';
import { BaseSession } from './base-session';
import type { TldrawApp } from '@toeverything/components/board-state';
type CloneInfo =
| {