Skip to content

Commit

Permalink
chore: some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
draedful committed Dec 9, 2024
1 parent 2fa4493 commit 8779558
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, TComponentContext, TComponentProps, TComponentState } from "../lib/Component";
import { Component, TComponentContext, TComponentProps, TComponentState } from "../../../lib/Component";

type TEventedComponentListener = Component | ((e: Event) => void);

Expand Down
2 changes: 1 addition & 1 deletion src/components/canvas/anchors/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { AnchorState, EAnchorType } from "../../../store/anchor/Anchor";
import { TBlockId } from "../../../store/block/Block";
import { selectBlockAnchor } from "../../../store/block/selectors";
import { TPoint } from "../../../utils/types/shapes";
import { GraphComponent } from "../graphComponent";
import { GraphComponent } from "../GraphComponent";

Check failure on line 7 in src/components/canvas/anchors/index.ts

View workflow job for this annotation

GitHub Actions / Verify Files

Cannot find module '../GraphComponent' or its corresponding type declarations.
import { GraphLayer, TGraphLayerContext } from "../layers/graphLayer/GraphLayer";

export type TAnchor = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/canvas/blocks/Block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import { TMeasureTextOptions } from "../../../utils/functions/text";
import { TTExtRect, renderText } from "../../../utils/renderers/text";
import { EVENTS } from "../../../utils/types/events";
import { TPoint, TRect } from "../../../utils/types/shapes";
import { GraphComponent } from "../GraphComponent";
import { Anchor, TAnchor } from "../anchors";
import { GraphComponent } from "../graphComponent";
import { GraphLayer, TGraphLayerContext } from "../layers/graphLayer/GraphLayer";

import { BlockController } from "./controllers/BlockController";
Expand Down
2 changes: 1 addition & 1 deletion src/components/canvas/connections/BaseConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { TComponentState } from "../../../lib/Component";
import { ConnectionState, TConnection, TConnectionId } from "../../../store/connection/ConnectionState";
import { selectConnectionById } from "../../../store/connection/selectors";
import { TPoint } from "../../../utils/types/shapes";
import { GraphComponent, GraphComponentContext } from "../GraphComponent";
import { TAnchor } from "../anchors";
import { Block } from "../blocks/Block";
import { GraphComponent, GraphComponentContext } from "../graphComponent";

export type TBaseConnectionProps = {
id: TConnectionId;
Expand Down
2 changes: 1 addition & 1 deletion src/components/canvas/graphComponent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { Signal } from "@preact/signals-core";
import { Graph } from "../../../graph";
import { Component } from "../../../lib";
import { TComponentContext, TComponentProps, TComponentState } from "../../../lib/Component";
import { EventedComponent } from "../../../mixins/withEvents";
import { HitBox, HitBoxData } from "../../../services/HitTest";
import { EventedComponent } from "../EventedComponent/EventedComponent";
import { TGraphLayerContext } from "../layers/graphLayer/GraphLayer";


Expand Down
2 changes: 1 addition & 1 deletion src/components/canvas/layers/graphLayer/GraphLayer.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Graph } from "../../../../graph";
import { GraphMouseEventNames, isNativeGraphEventName } from "../../../../graphEvents";
import { Component } from "../../../../lib/Component";
import { EventedComponent } from "../../../../mixins/withEvents";
import { Layer, LayerContext, LayerProps } from "../../../../services/Layer";
import { Camera, TCameraProps } from "../../../../services/camera/Camera";
import { ICamera } from "../../../../services/camera/CameraService";
import { getEventDelta } from "../../../../utils/functions";
import { EventedComponent } from "../../EventedComponent/EventedComponent";
import { Blocks } from "../../blocks/Blocks";
import { BlockConnection } from "../../connections/BlockConnection";
import { BlockConnections } from "../../connections/BlockConnections";
Expand Down
2 changes: 1 addition & 1 deletion src/components/canvas/layers/graphLayer/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GraphComponent } from "../../graphComponent";
import { GraphComponent } from "../../GraphComponent";

export class DrawBelow extends GraphComponent {
protected shouldUpdateChildren = false;
Expand Down
2 changes: 1 addition & 1 deletion src/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { batch, signal } from "@preact/signals-core";
import merge from "lodash/merge";

import { PublicGraphApi, ZoomConfig } from "./api/PublicGraphApi";
import { GraphComponent } from "./components/canvas/GraphComponent";
import { TBlock } from "./components/canvas/blocks/Block";
import { GraphComponent } from "./components/canvas/graphComponent";
import { BelowLayer } from "./components/canvas/layers/belowLayer/BelowLayer";
import { GraphLayer } from "./components/canvas/layers/graphLayer/GraphLayer";
import { OverLayer } from "./components/canvas/layers/overLayer/OverLayer";
Expand Down
2 changes: 1 addition & 1 deletion src/graphEvents.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { EventedComponent } from "./components/canvas/EventedComponent/EventedComponent";
import { GraphState } from "./graph";
import { TGraphColors, TGraphConstants } from "./graphConfig";
import { EventedComponent } from "./mixins/withEvents";
import { TCameraState } from "./services/camera/CameraService";

export type GraphMouseEvent<E extends Event = Event> = CustomEvent<{
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { cache } from "./utils";
type TIterator = (node: Tree) => boolean;

export interface ITree {
iterate(): void;
iterate(): boolean;
}

export class Tree<T extends ITree = ITree> {
Expand Down
2 changes: 1 addition & 1 deletion src/services/camera/Camera.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { EventedComponent } from "../../components/canvas/EventedComponent/EventedComponent";
import { TGraphLayerContext } from "../../components/canvas/layers/graphLayer/GraphLayer";
import { Component } from "../../lib";
import { EventedComponent } from "../../mixins/withEvents";
import { getXY, isMetaKeyEvent, isTrackpadWheelEvent, isWindows } from "../../utils/functions";
import { clamp } from "../../utils/functions/clamp";
import { dragListener } from "../../utils/functions/dragListener";
Expand Down

0 comments on commit 8779558

Please sign in to comment.