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

View File

@@ -1,13 +1,13 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { Vec } from '@tldraw/vec';
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 {
AlignType,
TldrawCommand,
TDShapeType,
TldrawCommand,
} from '@toeverything/components/board-types';
import { TLDR } from '@toeverything/components/board-state';
import type { TldrawApp } from '@toeverything/components/board-state';
export function alignShapes(
app: TldrawApp,

View File

@@ -1,5 +1,5 @@
import type { TldrawCommand } from '@toeverything/components/board-types';
import type { TldrawApp } from '@toeverything/components/board-state';
import type { TldrawCommand } from '@toeverything/components/board-types';
export function changePage(app: TldrawApp, pageId: string): TldrawCommand {
return {

View File

@@ -1,9 +1,9 @@
import type {
TldrawCommand,
TDPage,
} from '@toeverything/components/board-types';
import { Utils, TLPageState } from '@tldraw/core';
import { TLPageState, Utils } from '@tldraw/core';
import type { TldrawApp } from '@toeverything/components/board-state';
import type {
TDPage,
TldrawCommand,
} from '@toeverything/components/board-types';
export function createPage(
app: TldrawApp,

View File

@@ -1,10 +1,10 @@
import type { TldrawApp } from '@toeverything/components/board-state';
import type {
Patch,
TDBinding,
TDShape,
TldrawCommand,
TDBinding,
} from '@toeverything/components/board-types';
import type { TldrawApp } from '@toeverything/components/board-state';
export function createShapes(
app: TldrawApp,

View File

@@ -1,5 +1,5 @@
import type { TldrawCommand } from '@toeverything/components/board-types';
import type { TldrawApp } from '@toeverything/components/board-state';
import type { TldrawCommand } from '@toeverything/components/board-types';
export function deletePage(app: TldrawApp, pageId: string): TldrawCommand {
const {

View File

@@ -1,9 +1,9 @@
import type { TldrawApp } from '@toeverything/components/board-state';
import type {
TDAsset,
TDAssets,
TldrawCommand,
} from '@toeverything/components/board-types';
import type { TldrawApp } from '@toeverything/components/board-state';
import { removeShapesFromPage } from './shared/remove-shapes-from-page';
const removeAssetsFromDocument = (assets: TDAssets, idsToRemove: string[]) => {

View File

@@ -1,14 +1,14 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
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 {
DistributeType,
TDShape,
TldrawCommand,
TDShapeType,
TldrawCommand,
} from '@toeverything/components/board-types';
import { TLDR } from '@toeverything/components/board-state';
import Vec from '@tldraw/vec';
import type { TldrawApp } from '@toeverything/components/board-state';
export function distributeShapes(
app: TldrawApp,

View File

@@ -1,6 +1,6 @@
import type { TldrawCommand } from '@toeverything/components/board-types';
import { Utils } from '@tldraw/core';
import type { TldrawApp } from '@toeverything/components/board-state';
import type { TldrawCommand } from '@toeverything/components/board-types';
export function duplicatePage(app: TldrawApp, pageId: string): TldrawCommand {
const newId = Utils.uniqueId();

View File

@@ -1,13 +1,13 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
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 type {
PagePartial,
TldrawCommand,
TDShape,
TldrawCommand,
} from '@toeverything/components/board-types';
import type { TldrawApp } from '@toeverything/components/board-state';
export function duplicateShapes(
app: TldrawApp,

View File

@@ -1,8 +1,8 @@
import { FlipType } from '@toeverything/components/board-types';
import { TLBoundsCorner, Utils } from '@tldraw/core';
import type { TldrawCommand } from '@toeverything/components/board-types';
import type { TldrawApp } from '@toeverything/components/board-state';
import { TLDR } from '@toeverything/components/board-state';
import type { TldrawCommand } from '@toeverything/components/board-types';
import { FlipType } from '@toeverything/components/board-types';
export function flipShapes(
app: TldrawApp,

View File

@@ -1,12 +1,12 @@
import { TDShape, TDShapeType } from '@toeverything/components/board-types';
import { Utils } from '@tldraw/core';
import type {
Patch,
TldrawCommand,
TDBinding,
} from '@toeverything/components/board-types';
import type { TldrawApp } from '@toeverything/components/board-state';
import { TLDR } from '@toeverything/components/board-state';
import type {
Patch,
TDBinding,
TldrawCommand,
} from '@toeverything/components/board-types';
import { TDShape, TDShapeType } from '@toeverything/components/board-types';
export function groupShapes(
app: TldrawApp,

View File

@@ -10,10 +10,12 @@ export * from './duplicate-shapes';
export * from './flip-shapes';
export * from './group-shapes';
export * from './move-shapes-to-page';
export * from './reorder-shapes';
export * from './rename-page';
export * from './reorder-shapes';
export * from './reset-bounds';
export * from './rotate-shapes';
export * from './set-shapes-lock-status';
export * from './set-shapes-props';
export * from './stretch-shapes';
export * from './style-shapes';
export * from './toggle-shapes-decoration';
@@ -21,5 +23,3 @@ export * from './toggle-shapes-prop';
export * from './translate-shapes';
export * from './ungroup-shapes';
export * from './update-shapes';
export * from './set-shapes-props';
export * from './set-shapes-lock-status';

View File

@@ -1,14 +1,14 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { TLBounds, 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 type {
ArrowShape,
PagePartial,
TldrawCommand,
TDShape,
TldrawCommand,
} from '@toeverything/components/board-types';
import type { TldrawApp } from '@toeverything/components/board-state';
import { TLDR } from '@toeverything/components/board-state';
import { Utils, TLBounds } from '@tldraw/core';
import { Vec } from '@tldraw/vec';
export function moveShapesToPage(
app: TldrawApp,

View File

@@ -1,5 +1,5 @@
import type { TldrawCommand } from '@toeverything/components/board-types';
import type { TldrawApp } from '@toeverything/components/board-state';
import type { TldrawCommand } from '@toeverything/components/board-types';
export function renamePage(
app: TldrawApp,

View File

@@ -1,10 +1,10 @@
import type { TldrawApp } from '@toeverything/components/board-state';
import { TLDR } from '@toeverything/components/board-state';
import {
MoveType,
TDShape,
TldrawCommand,
} from '@toeverything/components/board-types';
import { TLDR } from '@toeverything/components/board-state';
import type { TldrawApp } from '@toeverything/components/board-state';
export function reorderShapes(
app: TldrawApp,

View File

@@ -1,6 +1,6 @@
import type { TldrawCommand } from '@toeverything/components/board-types';
import { TLDR } from '@toeverything/components/board-state';
import type { TldrawApp } from '@toeverything/components/board-state';
import { TLDR } from '@toeverything/components/board-state';
import type { TldrawCommand } from '@toeverything/components/board-types';
export function resetBounds(
app: TldrawApp,

View File

@@ -1,10 +1,10 @@
import { Utils } from '@tldraw/core';
import type {
TldrawCommand,
TDShape,
} from '@toeverything/components/board-types';
import { TLDR } from '@toeverything/components/board-state';
import type { TldrawApp } from '@toeverything/components/board-state';
import { TLDR } from '@toeverything/components/board-state';
import type {
TDShape,
TldrawCommand,
} from '@toeverything/components/board-types';
const PI2 = Math.PI * 2;

View File

@@ -1,8 +1,8 @@
import type { TldrawApp } from '@toeverything/components/board-state';
import type {
TDShape,
TldrawCommand,
} from '@toeverything/components/board-types';
import type { TldrawApp } from '@toeverything/components/board-state';
export function setShapesLockStatus<T extends TDShape>(
app: TldrawApp,

View File

@@ -1,8 +1,8 @@
import type { TldrawApp } from '@toeverything/components/board-state';
import type {
TDShape,
TldrawCommand,
} from '@toeverything/components/board-types';
import type { TldrawApp } from '@toeverything/components/board-state';
export function setShapesProps<T extends TDShape>(
app: TldrawApp,

View File

@@ -1,9 +1,9 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { TLBoundsCorner, Utils } from '@tldraw/core';
import { StretchType, TDShapeType } from '@toeverything/components/board-types';
import type { TldrawCommand } from '@toeverything/components/board-types';
import { TLDR } from '@toeverything/components/board-state';
import type { TldrawApp } from '@toeverything/components/board-state';
import { TLDR } from '@toeverything/components/board-state';
import type { TldrawCommand } from '@toeverything/components/board-types';
import { StretchType, TDShapeType } from '@toeverything/components/board-types';
export function stretchShapes(
app: TldrawApp,

View File

@@ -1,14 +1,11 @@
import type { TldrawApp } from '@toeverything/components/board-state';
import { TLDR } from '@toeverything/components/board-state';
import {
Patch,
ShapeStyles,
TldrawCommand,
TDShape,
// TDShapeType,
// TextShape
TldrawCommand,
} from '@toeverything/components/board-types';
import { TLDR } from '@toeverything/components/board-state';
import { Vec } from '@tldraw/vec';
import type { TldrawApp } from '@toeverything/components/board-state';
export function styleShapes(
app: TldrawApp,

View File

@@ -1,10 +1,10 @@
import { Decoration } from '@toeverything/components/board-types';
import type { TldrawApp } from '@toeverything/components/board-state';
import type {
Patch,
ArrowShape,
Patch,
TldrawCommand,
} from '@toeverything/components/board-types';
import type { TldrawApp } from '@toeverything/components/board-state';
import { Decoration } from '@toeverything/components/board-types';
export function toggleShapesDecoration(
app: TldrawApp,

View File

@@ -1,8 +1,8 @@
import type { TldrawApp } from '@toeverything/components/board-state';
import type {
TDShape,
TldrawCommand,
} from '@toeverything/components/board-types';
import type { TldrawApp } from '@toeverything/components/board-state';
export function toggleShapesProp(
app: TldrawApp,

View File

@@ -1,10 +1,10 @@
import { Vec } from '@tldraw/vec';
import type { TldrawApp } from '@toeverything/components/board-state';
import { TLDR } from '@toeverything/components/board-state';
import type {
TldrawCommand,
PagePartial,
TldrawCommand,
} from '@toeverything/components/board-types';
import type { TldrawApp } from '@toeverything/components/board-state';
export function translateShapes(
app: TldrawApp,

View File

@@ -1,12 +1,12 @@
import type { TldrawApp } from '@toeverything/components/board-state';
import { TLDR } from '@toeverything/components/board-state';
import type {
Patch,
GroupShape,
Patch,
TDBinding,
TDShape,
TldrawCommand,
} from '@toeverything/components/board-types';
import type { TldrawApp } from '@toeverything/components/board-state';
export function ungroupShapes(
app: TldrawApp,

View File

@@ -1,9 +1,9 @@
import type {
TldrawCommand,
TDShape,
} from '@toeverything/components/board-types';
import { TLDR } from '@toeverything/components/board-state';
import type { TldrawApp } from '@toeverything/components/board-state';
import { TLDR } from '@toeverything/components/board-state';
import type {
TDShape,
TldrawCommand,
} from '@toeverything/components/board-types';
export function updateShapes(
app: TldrawApp,