remove layout Dimensions declaration in favor of global

This commit is contained in:
Evan Simkowitz 2024-08-19 14:33:44 -07:00
parent bdfd7b22d9
commit 319d84d0b5
No known key found for this signature in database
4 changed files with 3 additions and 16 deletions

View File

@ -35,7 +35,7 @@ import {
TileLayoutContents, TileLayoutContents,
WritableLayoutTreeStateAtom, WritableLayoutTreeStateAtom,
} from "./types"; } from "./types";
import { Dimensions, FlexDirection, setTransform } from "./utils"; import { FlexDirection, setTransform } from "./utils";
interface ResizeContext { interface ResizeContext {
handleId: string; handleId: string;

View File

@ -3,7 +3,7 @@
import { WritableAtom } from "jotai"; import { WritableAtom } from "jotai";
import { CSSProperties } from "react"; import { CSSProperties } from "react";
import { Dimensions, DropDirection, FlexDirection } from "./utils.js"; import { DropDirection, FlexDirection } from "./utils.js";
/** /**
* Represents an operation to insert a node into a tree. * Represents an operation to insert a node into a tree.

View File

@ -4,13 +4,6 @@
import { CSSProperties } from "react"; import { CSSProperties } from "react";
import { XYCoord } from "react-dnd"; import { XYCoord } from "react-dnd";
export interface Dimensions {
width: number;
height: number;
left: number;
top: number;
}
export enum DropDirection { export enum DropDirection {
Top = 0, Top = 0,
Right = 1, Right = 1,

View File

@ -2,13 +2,7 @@
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import { assert, test } from "vitest"; import { assert, test } from "vitest";
import { import { DropDirection, FlexDirection, determineDropDirection, reverseFlexDirection } from "../lib/utils.js";
Dimensions,
DropDirection,
FlexDirection,
determineDropDirection,
reverseFlexDirection,
} from "../lib/utils.js";
test("determineDropDirection", () => { test("determineDropDirection", () => {
const dimensions: Dimensions = { const dimensions: Dimensions = {