diff --git a/src/lib/litegraph/src/LGraph.ts b/src/lib/litegraph/src/LGraph.ts index 10eaf43e88..ce6d8ff849 100644 --- a/src/lib/litegraph/src/LGraph.ts +++ b/src/lib/litegraph/src/LGraph.ts @@ -18,10 +18,10 @@ import type { SerialisableGraph, SerialisableReroute, } from "./types/serialisation" -import type { UUID } from "@/utils/uuid" +import type { UUID } from "@/lib/litegraph/src/utils/uuid" -import { SUBGRAPH_INPUT_ID, SUBGRAPH_OUTPUT_ID } from "@/constants" -import { createUuidv4, zeroUuid } from "@/utils/uuid" +import { SUBGRAPH_INPUT_ID, SUBGRAPH_OUTPUT_ID } from "@/lib/litegraph/src/constants" +import { createUuidv4, zeroUuid } from "@/lib/litegraph/src/utils/uuid" import { CustomEventTarget } from "./infrastructure/CustomEventTarget" import { LGraphCanvas } from "./LGraphCanvas" diff --git a/src/lib/litegraph/src/LGraphCanvas.ts b/src/lib/litegraph/src/LGraphCanvas.ts index d5cc1d150f..9bfbe7d7c7 100644 --- a/src/lib/litegraph/src/LGraphCanvas.ts +++ b/src/lib/litegraph/src/LGraphCanvas.ts @@ -38,7 +38,7 @@ import type { PickNevers } from "./types/utility" import type { IBaseWidget } from "./types/widgets" import type { UUID } from "./utils/uuid" -import { LinkConnector } from "@/canvas/LinkConnector" +import { LinkConnector } from "@/lib/litegraph/src/canvas/LinkConnector" import { isOverNodeInput, isOverNodeOutput } from "./canvas/measureSlots" import { CanvasPointer } from "./CanvasPointer" diff --git a/src/lib/litegraph/src/LGraphGroup.ts b/src/lib/litegraph/src/LGraphGroup.ts index 5b159e9154..d79869c9ae 100644 --- a/src/lib/litegraph/src/LGraphGroup.ts +++ b/src/lib/litegraph/src/LGraphGroup.ts @@ -10,7 +10,7 @@ import type { import type { LGraph } from "./LGraph" import type { ISerialisedGroup } from "./types/serialisation" -import { NullGraphError } from "@/infrastructure/NullGraphError" +import { NullGraphError } from "@/lib/litegraph/src/infrastructure/NullGraphError" import { strokeShape } from "./draw" import { LGraphCanvas } from "./LGraphCanvas" diff --git a/src/lib/litegraph/src/LLink.ts b/src/lib/litegraph/src/LLink.ts index c78cd18587..299473598a 100644 --- a/src/lib/litegraph/src/LLink.ts +++ b/src/lib/litegraph/src/LLink.ts @@ -11,7 +11,7 @@ import type { LGraphNode, NodeId } from "./LGraphNode" import type { Reroute, RerouteId } from "./Reroute" import type { Serialisable, SerialisableLLink, SubgraphIO } from "./types/serialisation" -import { SUBGRAPH_INPUT_ID, SUBGRAPH_OUTPUT_ID } from "@/constants" +import { SUBGRAPH_INPUT_ID, SUBGRAPH_OUTPUT_ID } from "@/lib/litegraph/src/constants" import { Subgraph } from "./litegraph" diff --git a/src/lib/litegraph/src/canvas/FloatingRenderLink.ts b/src/lib/litegraph/src/canvas/FloatingRenderLink.ts index 11efefeac0..9c3749a1d8 100644 --- a/src/lib/litegraph/src/canvas/FloatingRenderLink.ts +++ b/src/lib/litegraph/src/canvas/FloatingRenderLink.ts @@ -1,17 +1,17 @@ import type { RenderLink } from "./RenderLink" -import type { CustomEventTarget } from "@/infrastructure/CustomEventTarget" -import type { LinkConnectorEventMap } from "@/infrastructure/LinkConnectorEventMap" -import type { INodeOutputSlot, LinkNetwork } from "@/interfaces" -import type { INodeInputSlot } from "@/interfaces" -import type { Point } from "@/interfaces" -import type { LGraphNode, NodeId } from "@/LGraphNode" -import type { LLink } from "@/LLink" -import type { Reroute } from "@/Reroute" -import type { SubgraphInput } from "@/subgraph/SubgraphInput" -import type { SubgraphOutput } from "@/subgraph/SubgraphOutput" +import type { CustomEventTarget } from "@/lib/litegraph/src/infrastructure/CustomEventTarget" +import type { LinkConnectorEventMap } from "@/lib/litegraph/src/infrastructure/LinkConnectorEventMap" +import type { INodeOutputSlot, LinkNetwork } from "@/lib/litegraph/src/interfaces" +import type { INodeInputSlot } from "@/lib/litegraph/src/interfaces" +import type { Point } from "@/lib/litegraph/src/interfaces" +import type { LGraphNode, NodeId } from "@/lib/litegraph/src/LGraphNode" +import type { LLink } from "@/lib/litegraph/src/LLink" +import type { Reroute } from "@/lib/litegraph/src/Reroute" +import type { SubgraphInput } from "@/lib/litegraph/src/subgraph/SubgraphInput" +import type { SubgraphOutput } from "@/lib/litegraph/src/subgraph/SubgraphOutput" -import { SUBGRAPH_INPUT_ID, SUBGRAPH_OUTPUT_ID } from "@/constants" -import { LinkDirection } from "@/types/globalEnums" +import { SUBGRAPH_INPUT_ID, SUBGRAPH_OUTPUT_ID } from "@/lib/litegraph/src/constants" +import { LinkDirection } from "@/lib/litegraph/src/types/globalEnums" /** * Represents a floating link that is currently being dragged from one slot to another. diff --git a/src/lib/litegraph/src/canvas/InputIndicators.ts b/src/lib/litegraph/src/canvas/InputIndicators.ts index 02aa68362b..71be30265e 100644 --- a/src/lib/litegraph/src/canvas/InputIndicators.ts +++ b/src/lib/litegraph/src/canvas/InputIndicators.ts @@ -1,4 +1,4 @@ -import type { LGraphCanvas } from "@/LGraphCanvas" +import type { LGraphCanvas } from "@/lib/litegraph/src/LGraphCanvas" /** * A class that can be added to the render cycle to show pointer / keyboard status symbols. diff --git a/src/lib/litegraph/src/canvas/LinkConnector.ts b/src/lib/litegraph/src/canvas/LinkConnector.ts index 349a903091..8a44a68f58 100644 --- a/src/lib/litegraph/src/canvas/LinkConnector.ts +++ b/src/lib/litegraph/src/canvas/LinkConnector.ts @@ -1,21 +1,21 @@ import type { RenderLink } from "./RenderLink" -import type { LinkConnectorEventMap } from "@/infrastructure/LinkConnectorEventMap" -import type { ConnectingLink, ItemLocator, LinkNetwork, LinkSegment } from "@/interfaces" -import type { INodeInputSlot, INodeOutputSlot } from "@/interfaces" -import type { LGraphNode } from "@/LGraphNode" -import type { Reroute } from "@/Reroute" -import type { SubgraphInput } from "@/subgraph/SubgraphInput" -import type { SubgraphOutput } from "@/subgraph/SubgraphOutput" -import type { CanvasPointerEvent } from "@/types/events" -import type { IBaseWidget } from "@/types/widgets" +import type { LinkConnectorEventMap } from "@/lib/litegraph/src/infrastructure/LinkConnectorEventMap" +import type { ConnectingLink, ItemLocator, LinkNetwork, LinkSegment } from "@/lib/litegraph/src/interfaces" +import type { INodeInputSlot, INodeOutputSlot } from "@/lib/litegraph/src/interfaces" +import type { LGraphNode } from "@/lib/litegraph/src/LGraphNode" +import type { Reroute } from "@/lib/litegraph/src/Reroute" +import type { SubgraphInput } from "@/lib/litegraph/src/subgraph/SubgraphInput" +import type { SubgraphOutput } from "@/lib/litegraph/src/subgraph/SubgraphOutput" +import type { CanvasPointerEvent } from "@/lib/litegraph/src/types/events" +import type { IBaseWidget } from "@/lib/litegraph/src/types/widgets" -import { SUBGRAPH_INPUT_ID, SUBGRAPH_OUTPUT_ID } from "@/constants" -import { CustomEventTarget } from "@/infrastructure/CustomEventTarget" -import { LLink } from "@/LLink" -import { Subgraph } from "@/subgraph/Subgraph" -import { SubgraphInputNode } from "@/subgraph/SubgraphInputNode" -import { SubgraphOutputNode } from "@/subgraph/SubgraphOutputNode" -import { LinkDirection } from "@/types/globalEnums" +import { SUBGRAPH_INPUT_ID, SUBGRAPH_OUTPUT_ID } from "@/lib/litegraph/src/constants" +import { CustomEventTarget } from "@/lib/litegraph/src/infrastructure/CustomEventTarget" +import { LLink } from "@/lib/litegraph/src/LLink" +import { Subgraph } from "@/lib/litegraph/src/subgraph/Subgraph" +import { SubgraphInputNode } from "@/lib/litegraph/src/subgraph/SubgraphInputNode" +import { SubgraphOutputNode } from "@/lib/litegraph/src/subgraph/SubgraphOutputNode" +import { LinkDirection } from "@/lib/litegraph/src/types/globalEnums" import { FloatingRenderLink } from "./FloatingRenderLink" import { MovingInputLink } from "./MovingInputLink" diff --git a/src/lib/litegraph/src/canvas/MovingInputLink.ts b/src/lib/litegraph/src/canvas/MovingInputLink.ts index 15619e1b6e..9294acb9f9 100644 --- a/src/lib/litegraph/src/canvas/MovingInputLink.ts +++ b/src/lib/litegraph/src/canvas/MovingInputLink.ts @@ -1,14 +1,14 @@ -import type { CustomEventTarget } from "@/infrastructure/CustomEventTarget" -import type { LinkConnectorEventMap } from "@/infrastructure/LinkConnectorEventMap" -import type { INodeInputSlot, INodeOutputSlot, LinkNetwork, Point } from "@/interfaces" -import type { LGraphNode } from "@/LGraphNode" -import type { LLink } from "@/LLink" -import type { Reroute } from "@/Reroute" -import type { SubgraphOutput } from "@/subgraph/SubgraphOutput" -import type { NodeLike } from "@/types/NodeLike" -import type { SubgraphIO } from "@/types/serialisation" +import type { CustomEventTarget } from "@/lib/litegraph/src/infrastructure/CustomEventTarget" +import type { LinkConnectorEventMap } from "@/lib/litegraph/src/infrastructure/LinkConnectorEventMap" +import type { INodeInputSlot, INodeOutputSlot, LinkNetwork, Point } from "@/lib/litegraph/src/interfaces" +import type { LGraphNode } from "@/lib/litegraph/src/LGraphNode" +import type { LLink } from "@/lib/litegraph/src/LLink" +import type { Reroute } from "@/lib/litegraph/src/Reroute" +import type { SubgraphOutput } from "@/lib/litegraph/src/subgraph/SubgraphOutput" +import type { NodeLike } from "@/lib/litegraph/src/types/NodeLike" +import type { SubgraphIO } from "@/lib/litegraph/src/types/serialisation" -import { LinkDirection } from "@/types/globalEnums" +import { LinkDirection } from "@/lib/litegraph/src/types/globalEnums" import { MovingLinkBase } from "./MovingLinkBase" diff --git a/src/lib/litegraph/src/canvas/MovingLinkBase.ts b/src/lib/litegraph/src/canvas/MovingLinkBase.ts index aaba42e8ab..e974faf70b 100644 --- a/src/lib/litegraph/src/canvas/MovingLinkBase.ts +++ b/src/lib/litegraph/src/canvas/MovingLinkBase.ts @@ -1,14 +1,14 @@ import type { RenderLink } from "./RenderLink" -import type { CustomEventTarget } from "@/infrastructure/CustomEventTarget" -import type { LinkConnectorEventMap } from "@/infrastructure/LinkConnectorEventMap" -import type { INodeInputSlot, INodeOutputSlot, LinkNetwork, Point } from "@/interfaces" -import type { LGraphNode, NodeId } from "@/LGraphNode" -import type { LLink } from "@/LLink" -import type { Reroute } from "@/Reroute" -import type { SubgraphInput } from "@/subgraph/SubgraphInput" -import type { SubgraphOutput } from "@/subgraph/SubgraphOutput" +import type { CustomEventTarget } from "@/lib/litegraph/src/infrastructure/CustomEventTarget" +import type { LinkConnectorEventMap } from "@/lib/litegraph/src/infrastructure/LinkConnectorEventMap" +import type { INodeInputSlot, INodeOutputSlot, LinkNetwork, Point } from "@/lib/litegraph/src/interfaces" +import type { LGraphNode, NodeId } from "@/lib/litegraph/src/LGraphNode" +import type { LLink } from "@/lib/litegraph/src/LLink" +import type { Reroute } from "@/lib/litegraph/src/Reroute" +import type { SubgraphInput } from "@/lib/litegraph/src/subgraph/SubgraphInput" +import type { SubgraphOutput } from "@/lib/litegraph/src/subgraph/SubgraphOutput" -import { LinkDirection } from "@/types/globalEnums" +import { LinkDirection } from "@/lib/litegraph/src/types/globalEnums" /** * Represents an existing link that is currently being dragged by the user from one slot to another. diff --git a/src/lib/litegraph/src/canvas/MovingOutputLink.ts b/src/lib/litegraph/src/canvas/MovingOutputLink.ts index 8d6838d650..5839042a9e 100644 --- a/src/lib/litegraph/src/canvas/MovingOutputLink.ts +++ b/src/lib/litegraph/src/canvas/MovingOutputLink.ts @@ -1,14 +1,14 @@ -import type { CustomEventTarget } from "@/infrastructure/CustomEventTarget" -import type { LinkConnectorEventMap } from "@/infrastructure/LinkConnectorEventMap" -import type { INodeInputSlot, INodeOutputSlot, LinkNetwork, Point } from "@/interfaces" -import type { LGraphNode } from "@/LGraphNode" -import type { LLink } from "@/LLink" -import type { Reroute } from "@/Reroute" -import type { SubgraphInput } from "@/subgraph/SubgraphInput" -import type { NodeLike } from "@/types/NodeLike" -import type { SubgraphIO } from "@/types/serialisation" +import type { CustomEventTarget } from "@/lib/litegraph/src/infrastructure/CustomEventTarget" +import type { LinkConnectorEventMap } from "@/lib/litegraph/src/infrastructure/LinkConnectorEventMap" +import type { INodeInputSlot, INodeOutputSlot, LinkNetwork, Point } from "@/lib/litegraph/src/interfaces" +import type { LGraphNode } from "@/lib/litegraph/src/LGraphNode" +import type { LLink } from "@/lib/litegraph/src/LLink" +import type { Reroute } from "@/lib/litegraph/src/Reroute" +import type { SubgraphInput } from "@/lib/litegraph/src/subgraph/SubgraphInput" +import type { NodeLike } from "@/lib/litegraph/src/types/NodeLike" +import type { SubgraphIO } from "@/lib/litegraph/src/types/serialisation" -import { LinkDirection } from "@/types/globalEnums" +import { LinkDirection } from "@/lib/litegraph/src/types/globalEnums" import { MovingLinkBase } from "./MovingLinkBase" diff --git a/src/lib/litegraph/src/canvas/RenderLink.ts b/src/lib/litegraph/src/canvas/RenderLink.ts index 44fd51fd14..2d6d0ef357 100644 --- a/src/lib/litegraph/src/canvas/RenderLink.ts +++ b/src/lib/litegraph/src/canvas/RenderLink.ts @@ -1,12 +1,12 @@ -import type { CustomEventTarget } from "@/infrastructure/CustomEventTarget" -import type { LinkConnectorEventMap } from "@/infrastructure/LinkConnectorEventMap" -import type { LinkNetwork, Point } from "@/interfaces" -import type { LGraphNode } from "@/LGraphNode" -import type { INodeInputSlot, INodeOutputSlot, LLink, Reroute } from "@/litegraph" -import type { SubgraphInput } from "@/subgraph/SubgraphInput" -import type { SubgraphIONodeBase } from "@/subgraph/SubgraphIONodeBase" -import type { SubgraphOutput } from "@/subgraph/SubgraphOutput" -import type { LinkDirection } from "@/types/globalEnums" +import type { CustomEventTarget } from "@/lib/litegraph/src/infrastructure/CustomEventTarget" +import type { LinkConnectorEventMap } from "@/lib/litegraph/src/infrastructure/LinkConnectorEventMap" +import type { LinkNetwork, Point } from "@/lib/litegraph/src/interfaces" +import type { LGraphNode } from "@/lib/litegraph/src/LGraphNode" +import type { INodeInputSlot, INodeOutputSlot, LLink, Reroute } from "@/lib/litegraph/src/litegraph" +import type { SubgraphInput } from "@/lib/litegraph/src/subgraph/SubgraphInput" +import type { SubgraphIONodeBase } from "@/lib/litegraph/src/subgraph/SubgraphIONodeBase" +import type { SubgraphOutput } from "@/lib/litegraph/src/subgraph/SubgraphOutput" +import type { LinkDirection } from "@/lib/litegraph/src/types/globalEnums" export interface RenderLink { /** The type of link being connected. */ diff --git a/src/lib/litegraph/src/canvas/ToInputFromIoNodeLink.ts b/src/lib/litegraph/src/canvas/ToInputFromIoNodeLink.ts index 0ed8e1b3a6..e74f0e7ec5 100644 --- a/src/lib/litegraph/src/canvas/ToInputFromIoNodeLink.ts +++ b/src/lib/litegraph/src/canvas/ToInputFromIoNodeLink.ts @@ -1,15 +1,15 @@ import type { RenderLink } from "./RenderLink" -import type { CustomEventTarget } from "@/infrastructure/CustomEventTarget" -import type { LinkConnectorEventMap } from "@/infrastructure/LinkConnectorEventMap" -import type { INodeInputSlot, LinkNetwork, Point } from "@/interfaces" -import type { LGraphNode } from "@/LGraphNode" -import type { LLink } from "@/LLink" -import type { Reroute } from "@/Reroute" -import type { SubgraphInput } from "@/subgraph/SubgraphInput" -import type { SubgraphInputNode } from "@/subgraph/SubgraphInputNode" -import type { NodeLike } from "@/types/NodeLike" +import type { CustomEventTarget } from "@/lib/litegraph/src/infrastructure/CustomEventTarget" +import type { LinkConnectorEventMap } from "@/lib/litegraph/src/infrastructure/LinkConnectorEventMap" +import type { INodeInputSlot, LinkNetwork, Point } from "@/lib/litegraph/src/interfaces" +import type { LGraphNode } from "@/lib/litegraph/src/LGraphNode" +import type { LLink } from "@/lib/litegraph/src/LLink" +import type { Reroute } from "@/lib/litegraph/src/Reroute" +import type { SubgraphInput } from "@/lib/litegraph/src/subgraph/SubgraphInput" +import type { SubgraphInputNode } from "@/lib/litegraph/src/subgraph/SubgraphInputNode" +import type { NodeLike } from "@/lib/litegraph/src/types/NodeLike" -import { LinkDirection } from "@/types/globalEnums" +import { LinkDirection } from "@/lib/litegraph/src/types/globalEnums" /** Connecting TO an input slot. */ diff --git a/src/lib/litegraph/src/canvas/ToInputRenderLink.ts b/src/lib/litegraph/src/canvas/ToInputRenderLink.ts index bdb8a08c87..e4292c7a86 100644 --- a/src/lib/litegraph/src/canvas/ToInputRenderLink.ts +++ b/src/lib/litegraph/src/canvas/ToInputRenderLink.ts @@ -1,14 +1,14 @@ import type { RenderLink } from "./RenderLink" -import type { CustomEventTarget } from "@/infrastructure/CustomEventTarget" -import type { LinkConnectorEventMap } from "@/infrastructure/LinkConnectorEventMap" -import type { INodeInputSlot, INodeOutputSlot, LinkNetwork, Point } from "@/interfaces" -import type { LGraphNode } from "@/LGraphNode" -import type { LLink } from "@/LLink" -import type { Reroute } from "@/Reroute" -import type { SubgraphOutput } from "@/subgraph/SubgraphOutput" -import type { NodeLike } from "@/types/NodeLike" +import type { CustomEventTarget } from "@/lib/litegraph/src/infrastructure/CustomEventTarget" +import type { LinkConnectorEventMap } from "@/lib/litegraph/src/infrastructure/LinkConnectorEventMap" +import type { INodeInputSlot, INodeOutputSlot, LinkNetwork, Point } from "@/lib/litegraph/src/interfaces" +import type { LGraphNode } from "@/lib/litegraph/src/LGraphNode" +import type { LLink } from "@/lib/litegraph/src/LLink" +import type { Reroute } from "@/lib/litegraph/src/Reroute" +import type { SubgraphOutput } from "@/lib/litegraph/src/subgraph/SubgraphOutput" +import type { NodeLike } from "@/lib/litegraph/src/types/NodeLike" -import { LinkDirection } from "@/types/globalEnums" +import { LinkDirection } from "@/lib/litegraph/src/types/globalEnums" /** Connecting TO an input slot. */ diff --git a/src/lib/litegraph/src/canvas/ToOutputFromIoNodeLink.ts b/src/lib/litegraph/src/canvas/ToOutputFromIoNodeLink.ts index 408dca32f7..77eadb01c6 100644 --- a/src/lib/litegraph/src/canvas/ToOutputFromIoNodeLink.ts +++ b/src/lib/litegraph/src/canvas/ToOutputFromIoNodeLink.ts @@ -1,15 +1,15 @@ import type { RenderLink } from "./RenderLink" -import type { CustomEventTarget } from "@/infrastructure/CustomEventTarget" -import type { LinkConnectorEventMap } from "@/infrastructure/LinkConnectorEventMap" -import type { INodeOutputSlot, LinkNetwork, Point } from "@/interfaces" -import type { LGraphNode } from "@/LGraphNode" -import type { Reroute } from "@/Reroute" -import type { SubgraphOutput } from "@/subgraph/SubgraphOutput" -import type { SubgraphOutputNode } from "@/subgraph/SubgraphOutputNode" -import type { NodeLike } from "@/types/NodeLike" -import type { SubgraphIO } from "@/types/serialisation" +import type { CustomEventTarget } from "@/lib/litegraph/src/infrastructure/CustomEventTarget" +import type { LinkConnectorEventMap } from "@/lib/litegraph/src/infrastructure/LinkConnectorEventMap" +import type { INodeOutputSlot, LinkNetwork, Point } from "@/lib/litegraph/src/interfaces" +import type { LGraphNode } from "@/lib/litegraph/src/LGraphNode" +import type { Reroute } from "@/lib/litegraph/src/Reroute" +import type { SubgraphOutput } from "@/lib/litegraph/src/subgraph/SubgraphOutput" +import type { SubgraphOutputNode } from "@/lib/litegraph/src/subgraph/SubgraphOutputNode" +import type { NodeLike } from "@/lib/litegraph/src/types/NodeLike" +import type { SubgraphIO } from "@/lib/litegraph/src/types/serialisation" -import { LinkDirection } from "@/types/globalEnums" +import { LinkDirection } from "@/lib/litegraph/src/types/globalEnums" /** Connecting TO an output slot. */ diff --git a/src/lib/litegraph/src/canvas/ToOutputFromRerouteLink.ts b/src/lib/litegraph/src/canvas/ToOutputFromRerouteLink.ts index ba3a6570f9..704dc2fa71 100644 --- a/src/lib/litegraph/src/canvas/ToOutputFromRerouteLink.ts +++ b/src/lib/litegraph/src/canvas/ToOutputFromRerouteLink.ts @@ -1,7 +1,7 @@ import type { LinkConnector } from "./LinkConnector" -import type { LGraphNode } from "@/LGraphNode" -import type { INodeInputSlot, INodeOutputSlot, LinkNetwork } from "@/litegraph" -import type { Reroute } from "@/Reroute" +import type { LGraphNode } from "@/lib/litegraph/src/LGraphNode" +import type { INodeInputSlot, INodeOutputSlot, LinkNetwork } from "@/lib/litegraph/src/litegraph" +import type { Reroute } from "@/lib/litegraph/src/Reroute" import { ToInputRenderLink } from "./ToInputRenderLink" import { ToOutputRenderLink } from "./ToOutputRenderLink" diff --git a/src/lib/litegraph/src/canvas/ToOutputRenderLink.ts b/src/lib/litegraph/src/canvas/ToOutputRenderLink.ts index 1f27627701..41c806076a 100644 --- a/src/lib/litegraph/src/canvas/ToOutputRenderLink.ts +++ b/src/lib/litegraph/src/canvas/ToOutputRenderLink.ts @@ -1,14 +1,14 @@ import type { RenderLink } from "./RenderLink" -import type { CustomEventTarget } from "@/infrastructure/CustomEventTarget" -import type { LinkConnectorEventMap } from "@/infrastructure/LinkConnectorEventMap" -import type { INodeInputSlot, INodeOutputSlot, LinkNetwork, Point } from "@/interfaces" -import type { LGraphNode } from "@/LGraphNode" -import type { Reroute } from "@/Reroute" -import type { SubgraphInput } from "@/subgraph/SubgraphInput" -import type { NodeLike } from "@/types/NodeLike" -import type { SubgraphIO } from "@/types/serialisation" +import type { CustomEventTarget } from "@/lib/litegraph/src/infrastructure/CustomEventTarget" +import type { LinkConnectorEventMap } from "@/lib/litegraph/src/infrastructure/LinkConnectorEventMap" +import type { INodeInputSlot, INodeOutputSlot, LinkNetwork, Point } from "@/lib/litegraph/src/interfaces" +import type { LGraphNode } from "@/lib/litegraph/src/LGraphNode" +import type { Reroute } from "@/lib/litegraph/src/Reroute" +import type { SubgraphInput } from "@/lib/litegraph/src/subgraph/SubgraphInput" +import type { NodeLike } from "@/lib/litegraph/src/types/NodeLike" +import type { SubgraphIO } from "@/lib/litegraph/src/types/serialisation" -import { LinkDirection } from "@/types/globalEnums" +import { LinkDirection } from "@/lib/litegraph/src/types/globalEnums" /** Connecting TO an output slot. */ diff --git a/src/lib/litegraph/src/canvas/measureSlots.ts b/src/lib/litegraph/src/canvas/measureSlots.ts index 3530f6dece..f3554608e4 100644 --- a/src/lib/litegraph/src/canvas/measureSlots.ts +++ b/src/lib/litegraph/src/canvas/measureSlots.ts @@ -1,7 +1,7 @@ -import type { INodeInputSlot, INodeOutputSlot, Point } from "@/interfaces" -import type { LGraphNode } from "@/LGraphNode" +import type { INodeInputSlot, INodeOutputSlot, Point } from "@/lib/litegraph/src/interfaces" +import type { LGraphNode } from "@/lib/litegraph/src/LGraphNode" -import { isInRectangle } from "@/measure" +import { isInRectangle } from "@/lib/litegraph/src/measure" export function getNodeInputOnPos(node: LGraphNode, x: number, y: number): { index: number, input: INodeInputSlot, pos: Point } | undefined { const { inputs } = node diff --git a/src/lib/litegraph/src/infrastructure/ConstrainedSize.ts b/src/lib/litegraph/src/infrastructure/ConstrainedSize.ts index 11d86955dc..0a6a8bb199 100644 --- a/src/lib/litegraph/src/infrastructure/ConstrainedSize.ts +++ b/src/lib/litegraph/src/infrastructure/ConstrainedSize.ts @@ -1,6 +1,6 @@ -import type { ReadOnlyRect, ReadOnlySize, Size } from "@/interfaces" +import type { ReadOnlyRect, ReadOnlySize, Size } from "@/lib/litegraph/src/interfaces" -import { clamp } from "@/litegraph" +import { clamp } from "@/lib/litegraph/src/litegraph" /** * Basic width and height, with min/max constraints. diff --git a/src/lib/litegraph/src/infrastructure/CustomEventTarget.ts b/src/lib/litegraph/src/infrastructure/CustomEventTarget.ts index 9008c3fa06..de3131fdeb 100644 --- a/src/lib/litegraph/src/infrastructure/CustomEventTarget.ts +++ b/src/lib/litegraph/src/infrastructure/CustomEventTarget.ts @@ -1,4 +1,4 @@ -import type { NeverNever, PickNevers } from "@/types/utility" +import type { NeverNever, PickNevers } from "@/lib/litegraph/src/types/utility" type EventListeners = { readonly [K in keyof T]: ((this: EventTarget, ev: CustomEvent) => any) | EventListenerObject | null diff --git a/src/lib/litegraph/src/infrastructure/LGraphCanvasEventMap.ts b/src/lib/litegraph/src/infrastructure/LGraphCanvasEventMap.ts index d431e90ff7..ccbf3dfceb 100644 --- a/src/lib/litegraph/src/infrastructure/LGraphCanvasEventMap.ts +++ b/src/lib/litegraph/src/infrastructure/LGraphCanvasEventMap.ts @@ -1,10 +1,10 @@ -import type { ConnectingLink } from "@/interfaces" -import type { LGraph } from "@/LGraph" -import type { LGraphButton } from "@/LGraphButton" -import type { LGraphGroup } from "@/LGraphGroup" -import type { LGraphNode } from "@/LGraphNode" -import type { Subgraph } from "@/subgraph/Subgraph" -import type { CanvasPointerEvent } from "@/types/events" +import type { ConnectingLink } from "@/lib/litegraph/src/interfaces" +import type { LGraph } from "@/lib/litegraph/src/LGraph" +import type { LGraphButton } from "@/lib/litegraph/src/LGraphButton" +import type { LGraphGroup } from "@/lib/litegraph/src/LGraphGroup" +import type { LGraphNode } from "@/lib/litegraph/src/LGraphNode" +import type { Subgraph } from "@/lib/litegraph/src/subgraph/Subgraph" +import type { CanvasPointerEvent } from "@/lib/litegraph/src/types/events" export interface LGraphCanvasEventMap { /** The active graph has changed. */ diff --git a/src/lib/litegraph/src/infrastructure/LGraphEventMap.ts b/src/lib/litegraph/src/infrastructure/LGraphEventMap.ts index 6a08a8b8d3..792fd3ff9b 100644 --- a/src/lib/litegraph/src/infrastructure/LGraphEventMap.ts +++ b/src/lib/litegraph/src/infrastructure/LGraphEventMap.ts @@ -1,8 +1,8 @@ -import type { ReadOnlyRect } from "@/interfaces" -import type { LGraph } from "@/LGraph" -import type { LLink, ResolvedConnection } from "@/LLink" -import type { Subgraph } from "@/subgraph/Subgraph" -import type { ExportedSubgraph, ISerialisedGraph, SerialisableGraph } from "@/types/serialisation" +import type { ReadOnlyRect } from "@/lib/litegraph/src/interfaces" +import type { LGraph } from "@/lib/litegraph/src/LGraph" +import type { LLink, ResolvedConnection } from "@/lib/litegraph/src/LLink" +import type { Subgraph } from "@/lib/litegraph/src/subgraph/Subgraph" +import type { ExportedSubgraph, ISerialisedGraph, SerialisableGraph } from "@/lib/litegraph/src/types/serialisation" export interface LGraphEventMap { "configuring": { diff --git a/src/lib/litegraph/src/infrastructure/LinkConnectorEventMap.ts b/src/lib/litegraph/src/infrastructure/LinkConnectorEventMap.ts index 10e4a6fc70..086c7b7a69 100644 --- a/src/lib/litegraph/src/infrastructure/LinkConnectorEventMap.ts +++ b/src/lib/litegraph/src/infrastructure/LinkConnectorEventMap.ts @@ -1,16 +1,16 @@ -import type { FloatingRenderLink } from "@/canvas/FloatingRenderLink" -import type { MovingInputLink } from "@/canvas/MovingInputLink" -import type { MovingOutputLink } from "@/canvas/MovingOutputLink" -import type { RenderLink } from "@/canvas/RenderLink" -import type { ToInputFromIoNodeLink } from "@/canvas/ToInputFromIoNodeLink" -import type { ToInputRenderLink } from "@/canvas/ToInputRenderLink" -import type { LGraphNode } from "@/LGraphNode" -import type { LLink } from "@/LLink" -import type { Reroute } from "@/Reroute" -import type { SubgraphInputNode } from "@/subgraph/SubgraphInputNode" -import type { SubgraphOutputNode } from "@/subgraph/SubgraphOutputNode" -import type { CanvasPointerEvent } from "@/types/events" -import type { IWidget } from "@/types/widgets" +import type { FloatingRenderLink } from "@/lib/litegraph/src/canvas/FloatingRenderLink" +import type { MovingInputLink } from "@/lib/litegraph/src/canvas/MovingInputLink" +import type { MovingOutputLink } from "@/lib/litegraph/src/canvas/MovingOutputLink" +import type { RenderLink } from "@/lib/litegraph/src/canvas/RenderLink" +import type { ToInputFromIoNodeLink } from "@/lib/litegraph/src/canvas/ToInputFromIoNodeLink" +import type { ToInputRenderLink } from "@/lib/litegraph/src/canvas/ToInputRenderLink" +import type { LGraphNode } from "@/lib/litegraph/src/LGraphNode" +import type { LLink } from "@/lib/litegraph/src/LLink" +import type { Reroute } from "@/lib/litegraph/src/Reroute" +import type { SubgraphInputNode } from "@/lib/litegraph/src/subgraph/SubgraphInputNode" +import type { SubgraphOutputNode } from "@/lib/litegraph/src/subgraph/SubgraphOutputNode" +import type { CanvasPointerEvent } from "@/lib/litegraph/src/types/events" +import type { IWidget } from "@/lib/litegraph/src/types/widgets" export interface LinkConnectorEventMap { "reset": boolean diff --git a/src/lib/litegraph/src/infrastructure/Rectangle.ts b/src/lib/litegraph/src/infrastructure/Rectangle.ts index 4e47dabd36..bc1bdd9896 100644 --- a/src/lib/litegraph/src/infrastructure/Rectangle.ts +++ b/src/lib/litegraph/src/infrastructure/Rectangle.ts @@ -1,6 +1,6 @@ -import type { CompassCorners, Point, ReadOnlyPoint, ReadOnlyRect, ReadOnlySize, ReadOnlyTypedArray, Size } from "@/interfaces" +import type { CompassCorners, Point, ReadOnlyPoint, ReadOnlyRect, ReadOnlySize, ReadOnlyTypedArray, Size } from "@/lib/litegraph/src/interfaces" -import { isInRectangle } from "@/measure" +import { isInRectangle } from "@/lib/litegraph/src/measure" /** * A rectangle, represented as a float64 array of 4 numbers: [x, y, width, height]. diff --git a/src/lib/litegraph/src/infrastructure/SubgraphEventMap.ts b/src/lib/litegraph/src/infrastructure/SubgraphEventMap.ts index ca433295ec..c7850659b2 100644 --- a/src/lib/litegraph/src/infrastructure/SubgraphEventMap.ts +++ b/src/lib/litegraph/src/infrastructure/SubgraphEventMap.ts @@ -1,8 +1,8 @@ import type { LGraphEventMap } from "./LGraphEventMap" -import type { SubgraphInput } from "@/subgraph/SubgraphInput" -import type { SubgraphNode } from "@/subgraph/SubgraphNode" -import type { SubgraphOutput } from "@/subgraph/SubgraphOutput" -import type { IBaseWidget } from "@/types/widgets" +import type { SubgraphInput } from "@/lib/litegraph/src/subgraph/SubgraphInput" +import type { SubgraphNode } from "@/lib/litegraph/src/subgraph/SubgraphNode" +import type { SubgraphOutput } from "@/lib/litegraph/src/subgraph/SubgraphOutput" +import type { IBaseWidget } from "@/lib/litegraph/src/types/widgets" export interface SubgraphEventMap extends LGraphEventMap { "adding-input": { diff --git a/src/lib/litegraph/src/infrastructure/SubgraphInputEventMap.ts b/src/lib/litegraph/src/infrastructure/SubgraphInputEventMap.ts index 0bc116589d..2bb3ed97e1 100644 --- a/src/lib/litegraph/src/infrastructure/SubgraphInputEventMap.ts +++ b/src/lib/litegraph/src/infrastructure/SubgraphInputEventMap.ts @@ -1,7 +1,7 @@ import type { LGraphEventMap } from "./LGraphEventMap" -import type { INodeInputSlot } from "@/litegraph" -import type { SubgraphInput } from "@/subgraph/SubgraphInput" -import type { IBaseWidget } from "@/types/widgets" +import type { INodeInputSlot } from "@/lib/litegraph/src/litegraph" +import type { SubgraphInput } from "@/lib/litegraph/src/subgraph/SubgraphInput" +import type { IBaseWidget } from "@/lib/litegraph/src/types/widgets" export interface SubgraphInputEventMap extends LGraphEventMap { "input-connected": { diff --git a/src/lib/litegraph/src/interfaces.ts b/src/lib/litegraph/src/interfaces.ts index 33290a24e4..97c38f2c1d 100644 --- a/src/lib/litegraph/src/interfaces.ts +++ b/src/lib/litegraph/src/interfaces.ts @@ -6,8 +6,8 @@ import type { SubgraphInputNode } from "./subgraph/SubgraphInputNode" import type { SubgraphOutputNode } from "./subgraph/SubgraphOutputNode" import type { LinkDirection, RenderShape } from "./types/globalEnums" import type { IBaseWidget } from "./types/widgets" -import type { Rectangle } from "@/infrastructure/Rectangle" -import type { CanvasPointerEvent } from "@/types/events" +import type { Rectangle } from "@/lib/litegraph/src/infrastructure/Rectangle" +import type { CanvasPointerEvent } from "@/lib/litegraph/src/types/events" export type Dictionary = { [key: string]: T } diff --git a/src/lib/litegraph/src/node/NodeInputSlot.ts b/src/lib/litegraph/src/node/NodeInputSlot.ts index d741dd4cc9..5ecfa0a61e 100644 --- a/src/lib/litegraph/src/node/NodeInputSlot.ts +++ b/src/lib/litegraph/src/node/NodeInputSlot.ts @@ -1,14 +1,14 @@ -import type { INodeInputSlot, INodeOutputSlot, OptionalProps, ReadOnlyPoint } from "@/interfaces" -import type { LGraphNode } from "@/LGraphNode" -import type { LinkId } from "@/LLink" -import type { SubgraphInput } from "@/subgraph/SubgraphInput" -import type { SubgraphOutput } from "@/subgraph/SubgraphOutput" -import type { IBaseWidget } from "@/types/widgets" +import type { INodeInputSlot, INodeOutputSlot, OptionalProps, ReadOnlyPoint } from "@/lib/litegraph/src/interfaces" +import type { LGraphNode } from "@/lib/litegraph/src/LGraphNode" +import type { LinkId } from "@/lib/litegraph/src/LLink" +import type { SubgraphInput } from "@/lib/litegraph/src/subgraph/SubgraphInput" +import type { SubgraphOutput } from "@/lib/litegraph/src/subgraph/SubgraphOutput" +import type { IBaseWidget } from "@/lib/litegraph/src/types/widgets" -import { LabelPosition } from "@/draw" -import { LiteGraph } from "@/litegraph" -import { type IDrawOptions, NodeSlot } from "@/node/NodeSlot" -import { isSubgraphInput } from "@/subgraph/subgraphUtils" +import { LabelPosition } from "@/lib/litegraph/src/draw" +import { LiteGraph } from "@/lib/litegraph/src/litegraph" +import { type IDrawOptions, NodeSlot } from "@/lib/litegraph/src/node/NodeSlot" +import { isSubgraphInput } from "@/lib/litegraph/src/subgraph/subgraphUtils" export class NodeInputSlot extends NodeSlot implements INodeInputSlot { link: LinkId | null diff --git a/src/lib/litegraph/src/node/NodeOutputSlot.ts b/src/lib/litegraph/src/node/NodeOutputSlot.ts index 6cf20e5733..a018f64572 100644 --- a/src/lib/litegraph/src/node/NodeOutputSlot.ts +++ b/src/lib/litegraph/src/node/NodeOutputSlot.ts @@ -1,13 +1,13 @@ -import type { INodeInputSlot, INodeOutputSlot, OptionalProps, ReadOnlyPoint } from "@/interfaces" -import type { LGraphNode } from "@/LGraphNode" -import type { LinkId } from "@/LLink" -import type { SubgraphInput } from "@/subgraph/SubgraphInput" -import type { SubgraphOutput } from "@/subgraph/SubgraphOutput" +import type { INodeInputSlot, INodeOutputSlot, OptionalProps, ReadOnlyPoint } from "@/lib/litegraph/src/interfaces" +import type { LGraphNode } from "@/lib/litegraph/src/LGraphNode" +import type { LinkId } from "@/lib/litegraph/src/LLink" +import type { SubgraphInput } from "@/lib/litegraph/src/subgraph/SubgraphInput" +import type { SubgraphOutput } from "@/lib/litegraph/src/subgraph/SubgraphOutput" -import { LabelPosition } from "@/draw" -import { LiteGraph } from "@/litegraph" -import { type IDrawOptions, NodeSlot } from "@/node/NodeSlot" -import { isSubgraphOutput } from "@/subgraph/subgraphUtils" +import { LabelPosition } from "@/lib/litegraph/src/draw" +import { LiteGraph } from "@/lib/litegraph/src/litegraph" +import { type IDrawOptions, NodeSlot } from "@/lib/litegraph/src/node/NodeSlot" +import { isSubgraphOutput } from "@/lib/litegraph/src/subgraph/subgraphUtils" export class NodeOutputSlot extends NodeSlot implements INodeOutputSlot { #node: LGraphNode diff --git a/src/lib/litegraph/src/node/NodeSlot.ts b/src/lib/litegraph/src/node/NodeSlot.ts index 46d9d2f762..0a2d9f6b2e 100644 --- a/src/lib/litegraph/src/node/NodeSlot.ts +++ b/src/lib/litegraph/src/node/NodeSlot.ts @@ -1,12 +1,12 @@ -import type { CanvasColour, DefaultConnectionColors, INodeInputSlot, INodeOutputSlot, INodeSlot, ISubgraphInput, OptionalProps, Point, ReadOnlyPoint } from "@/interfaces" -import type { LGraphNode } from "@/LGraphNode" -import type { SubgraphInput } from "@/subgraph/SubgraphInput" -import type { SubgraphOutput } from "@/subgraph/SubgraphOutput" +import type { CanvasColour, DefaultConnectionColors, INodeInputSlot, INodeOutputSlot, INodeSlot, ISubgraphInput, OptionalProps, Point, ReadOnlyPoint } from "@/lib/litegraph/src/interfaces" +import type { LGraphNode } from "@/lib/litegraph/src/LGraphNode" +import type { SubgraphInput } from "@/lib/litegraph/src/subgraph/SubgraphInput" +import type { SubgraphOutput } from "@/lib/litegraph/src/subgraph/SubgraphOutput" -import { LabelPosition, SlotShape, SlotType } from "@/draw" -import { LiteGraph, Rectangle } from "@/litegraph" -import { getCentre } from "@/measure" -import { LinkDirection, RenderShape } from "@/types/globalEnums" +import { LabelPosition, SlotShape, SlotType } from "@/lib/litegraph/src/draw" +import { LiteGraph, Rectangle } from "@/lib/litegraph/src/litegraph" +import { getCentre } from "@/lib/litegraph/src/measure" +import { LinkDirection, RenderShape } from "@/lib/litegraph/src/types/globalEnums" import { NodeInputSlot } from "./NodeInputSlot" import { SlotBase } from "./SlotBase" diff --git a/src/lib/litegraph/src/node/SlotBase.ts b/src/lib/litegraph/src/node/SlotBase.ts index 9d87b4aec4..df24090f99 100644 --- a/src/lib/litegraph/src/node/SlotBase.ts +++ b/src/lib/litegraph/src/node/SlotBase.ts @@ -1,9 +1,9 @@ -import type { CanvasColour, DefaultConnectionColors, INodeSlot, ISlotType, IWidgetLocator, Point } from "@/interfaces" -import type { LLink } from "@/LLink" -import type { RenderShape } from "@/types/globalEnums" -import type { LinkDirection } from "@/types/globalEnums" +import type { CanvasColour, DefaultConnectionColors, INodeSlot, ISlotType, IWidgetLocator, Point } from "@/lib/litegraph/src/interfaces" +import type { LLink } from "@/lib/litegraph/src/LLink" +import type { RenderShape } from "@/lib/litegraph/src/types/globalEnums" +import type { LinkDirection } from "@/lib/litegraph/src/types/globalEnums" -import { Rectangle } from "@/infrastructure/Rectangle" +import { Rectangle } from "@/lib/litegraph/src/infrastructure/Rectangle" /** Base class for all input & output slots. */ diff --git a/src/lib/litegraph/src/node/slotUtils.ts b/src/lib/litegraph/src/node/slotUtils.ts index b439d5467b..a4b805a006 100644 --- a/src/lib/litegraph/src/node/slotUtils.ts +++ b/src/lib/litegraph/src/node/slotUtils.ts @@ -1,6 +1,6 @@ -import type { IWidgetInputSlot, SharedIntersection } from "@/interfaces" -import type { INodeInputSlot, INodeOutputSlot, INodeSlot, IWidget } from "@/litegraph" -import type { ISerialisableNodeInput, ISerialisableNodeOutput } from "@/types/serialisation" +import type { IWidgetInputSlot, SharedIntersection } from "@/lib/litegraph/src/interfaces" +import type { INodeInputSlot, INodeOutputSlot, INodeSlot, IWidget } from "@/lib/litegraph/src/litegraph" +import type { ISerialisableNodeInput, ISerialisableNodeOutput } from "@/lib/litegraph/src/types/serialisation" type CommonIoSlotProps = SharedIntersection diff --git a/src/lib/litegraph/src/subgraph/EmptySubgraphInput.ts b/src/lib/litegraph/src/subgraph/EmptySubgraphInput.ts index f005bd2398..a84e173233 100644 --- a/src/lib/litegraph/src/subgraph/EmptySubgraphInput.ts +++ b/src/lib/litegraph/src/subgraph/EmptySubgraphInput.ts @@ -1,11 +1,11 @@ import type { SubgraphInputNode } from "./SubgraphInputNode" -import type { INodeInputSlot, Point } from "@/interfaces" -import type { LGraphNode } from "@/LGraphNode" -import type { RerouteId } from "@/Reroute" +import type { INodeInputSlot, Point } from "@/lib/litegraph/src/interfaces" +import type { LGraphNode } from "@/lib/litegraph/src/LGraphNode" +import type { RerouteId } from "@/lib/litegraph/src/Reroute" -import { LLink } from "@/LLink" -import { nextUniqueName } from "@/strings" -import { zeroUuid } from "@/utils/uuid" +import { LLink } from "@/lib/litegraph/src/LLink" +import { nextUniqueName } from "@/lib/litegraph/src/strings" +import { zeroUuid } from "@/lib/litegraph/src/utils/uuid" import { SubgraphInput } from "./SubgraphInput" diff --git a/src/lib/litegraph/src/subgraph/EmptySubgraphOutput.ts b/src/lib/litegraph/src/subgraph/EmptySubgraphOutput.ts index c8ccdf29a1..baafed0ffb 100644 --- a/src/lib/litegraph/src/subgraph/EmptySubgraphOutput.ts +++ b/src/lib/litegraph/src/subgraph/EmptySubgraphOutput.ts @@ -1,11 +1,11 @@ import type { SubgraphOutputNode } from "./SubgraphOutputNode" -import type { INodeOutputSlot, Point } from "@/interfaces" -import type { LGraphNode } from "@/LGraphNode" -import type { RerouteId } from "@/Reroute" +import type { INodeOutputSlot, Point } from "@/lib/litegraph/src/interfaces" +import type { LGraphNode } from "@/lib/litegraph/src/LGraphNode" +import type { RerouteId } from "@/lib/litegraph/src/Reroute" -import { LLink } from "@/LLink" -import { nextUniqueName } from "@/strings" -import { zeroUuid } from "@/utils/uuid" +import { LLink } from "@/lib/litegraph/src/LLink" +import { nextUniqueName } from "@/lib/litegraph/src/strings" +import { zeroUuid } from "@/lib/litegraph/src/utils/uuid" import { SubgraphOutput } from "./SubgraphOutput" diff --git a/src/lib/litegraph/src/subgraph/ExecutableNodeDTO.ts b/src/lib/litegraph/src/subgraph/ExecutableNodeDTO.ts index bdfd612697..685859ba37 100644 --- a/src/lib/litegraph/src/subgraph/ExecutableNodeDTO.ts +++ b/src/lib/litegraph/src/subgraph/ExecutableNodeDTO.ts @@ -1,13 +1,13 @@ import type { SubgraphNode } from "./SubgraphNode" -import type { CallbackParams, CallbackReturn, ISlotType } from "@/interfaces" -import type { LGraph } from "@/LGraph" -import type { LGraphNode, NodeId } from "@/LGraphNode" +import type { CallbackParams, CallbackReturn, ISlotType } from "@/lib/litegraph/src/interfaces" +import type { LGraph } from "@/lib/litegraph/src/LGraph" +import type { LGraphNode, NodeId } from "@/lib/litegraph/src/LGraphNode" -import { InvalidLinkError } from "@/infrastructure/InvalidLinkError" -import { NullGraphError } from "@/infrastructure/NullGraphError" -import { RecursionError } from "@/infrastructure/RecursionError" -import { SlotIndexError } from "@/infrastructure/SlotIndexError" -import { LGraphEventMode } from "@/litegraph" +import { InvalidLinkError } from "@/lib/litegraph/src/infrastructure/InvalidLinkError" +import { NullGraphError } from "@/lib/litegraph/src/infrastructure/NullGraphError" +import { RecursionError } from "@/lib/litegraph/src/infrastructure/RecursionError" +import { SlotIndexError } from "@/lib/litegraph/src/infrastructure/SlotIndexError" +import { LGraphEventMode } from "@/lib/litegraph/src/litegraph" import { Subgraph } from "./Subgraph" diff --git a/src/lib/litegraph/src/subgraph/Subgraph.ts b/src/lib/litegraph/src/subgraph/Subgraph.ts index 68facc3a9d..1ea8419a58 100644 --- a/src/lib/litegraph/src/subgraph/Subgraph.ts +++ b/src/lib/litegraph/src/subgraph/Subgraph.ts @@ -1,11 +1,11 @@ -import type { SubgraphEventMap } from "@/infrastructure/SubgraphEventMap" -import type { DefaultConnectionColors, INodeInputSlot, INodeOutputSlot } from "@/interfaces" -import type { LGraphCanvas } from "@/LGraphCanvas" -import type { ExportedSubgraph, ExposedWidget, ISerialisedGraph, Serialisable, SerialisableGraph } from "@/types/serialisation" +import type { SubgraphEventMap } from "@/lib/litegraph/src/infrastructure/SubgraphEventMap" +import type { DefaultConnectionColors, INodeInputSlot, INodeOutputSlot } from "@/lib/litegraph/src/interfaces" +import type { LGraphCanvas } from "@/lib/litegraph/src/LGraphCanvas" +import type { ExportedSubgraph, ExposedWidget, ISerialisedGraph, Serialisable, SerialisableGraph } from "@/lib/litegraph/src/types/serialisation" -import { CustomEventTarget } from "@/infrastructure/CustomEventTarget" -import { type BaseLGraph, LGraph } from "@/LGraph" -import { createUuidv4 } from "@/utils/uuid" +import { CustomEventTarget } from "@/lib/litegraph/src/infrastructure/CustomEventTarget" +import { type BaseLGraph, LGraph } from "@/lib/litegraph/src/LGraph" +import { createUuidv4 } from "@/lib/litegraph/src/utils/uuid" import { SubgraphInput } from "./SubgraphInput" import { SubgraphInputNode } from "./SubgraphInputNode" diff --git a/src/lib/litegraph/src/subgraph/SubgraphIONodeBase.ts b/src/lib/litegraph/src/subgraph/SubgraphIONodeBase.ts index 40e810cf7c..3dec40d101 100644 --- a/src/lib/litegraph/src/subgraph/SubgraphIONodeBase.ts +++ b/src/lib/litegraph/src/subgraph/SubgraphIONodeBase.ts @@ -3,15 +3,15 @@ import type { EmptySubgraphOutput } from "./EmptySubgraphOutput" import type { Subgraph } from "./Subgraph" import type { SubgraphInput } from "./SubgraphInput" import type { SubgraphOutput } from "./SubgraphOutput" -import type { LinkConnector } from "@/canvas/LinkConnector" -import type { DefaultConnectionColors, Hoverable, INodeInputSlot, INodeOutputSlot, Point, Positionable } from "@/interfaces" -import type { NodeId } from "@/LGraphNode" -import type { ExportedSubgraphIONode, Serialisable } from "@/types/serialisation" +import type { LinkConnector } from "@/lib/litegraph/src/canvas/LinkConnector" +import type { DefaultConnectionColors, Hoverable, INodeInputSlot, INodeOutputSlot, Point, Positionable } from "@/lib/litegraph/src/interfaces" +import type { NodeId } from "@/lib/litegraph/src/LGraphNode" +import type { ExportedSubgraphIONode, Serialisable } from "@/lib/litegraph/src/types/serialisation" -import { Rectangle } from "@/infrastructure/Rectangle" -import { type CanvasColour, type CanvasPointer, type CanvasPointerEvent, type IContextMenuValue, LiteGraph } from "@/litegraph" -import { snapPoint } from "@/measure" -import { CanvasItem } from "@/types/globalEnums" +import { Rectangle } from "@/lib/litegraph/src/infrastructure/Rectangle" +import { type CanvasColour, type CanvasPointer, type CanvasPointerEvent, type IContextMenuValue, LiteGraph } from "@/lib/litegraph/src/litegraph" +import { snapPoint } from "@/lib/litegraph/src/measure" +import { CanvasItem } from "@/lib/litegraph/src/types/globalEnums" export abstract class SubgraphIONodeBase implements Positionable, Hoverable, Serialisable { static margin = 10 diff --git a/src/lib/litegraph/src/subgraph/SubgraphInput.ts b/src/lib/litegraph/src/subgraph/SubgraphInput.ts index df4136e6e6..fc71d87801 100644 --- a/src/lib/litegraph/src/subgraph/SubgraphInput.ts +++ b/src/lib/litegraph/src/subgraph/SubgraphInput.ts @@ -1,15 +1,15 @@ import type { SubgraphInputNode } from "./SubgraphInputNode" import type { SubgraphOutput } from "./SubgraphOutput" -import type { SubgraphInputEventMap } from "@/infrastructure/SubgraphInputEventMap" -import type { INodeInputSlot, INodeOutputSlot, Point, ReadOnlyRect } from "@/interfaces" -import type { LGraphNode } from "@/LGraphNode" -import type { RerouteId } from "@/Reroute" -import type { IBaseWidget } from "@/types/widgets" +import type { SubgraphInputEventMap } from "@/lib/litegraph/src/infrastructure/SubgraphInputEventMap" +import type { INodeInputSlot, INodeOutputSlot, Point, ReadOnlyRect } from "@/lib/litegraph/src/interfaces" +import type { LGraphNode } from "@/lib/litegraph/src/LGraphNode" +import type { RerouteId } from "@/lib/litegraph/src/Reroute" +import type { IBaseWidget } from "@/lib/litegraph/src/types/widgets" -import { CustomEventTarget } from "@/infrastructure/CustomEventTarget" -import { LiteGraph } from "@/litegraph" -import { LLink } from "@/LLink" -import { NodeSlotType } from "@/types/globalEnums" +import { CustomEventTarget } from "@/lib/litegraph/src/infrastructure/CustomEventTarget" +import { LiteGraph } from "@/lib/litegraph/src/litegraph" +import { LLink } from "@/lib/litegraph/src/LLink" +import { NodeSlotType } from "@/lib/litegraph/src/types/globalEnums" import { SubgraphSlot } from "./SubgraphSlotBase" import { isNodeSlot, isSubgraphOutput } from "./subgraphUtils" diff --git a/src/lib/litegraph/src/subgraph/SubgraphInputNode.ts b/src/lib/litegraph/src/subgraph/SubgraphInputNode.ts index eb2684ad1b..30bbdea5f4 100644 --- a/src/lib/litegraph/src/subgraph/SubgraphInputNode.ts +++ b/src/lib/litegraph/src/subgraph/SubgraphInputNode.ts @@ -1,18 +1,18 @@ import type { SubgraphInput } from "./SubgraphInput" import type { SubgraphOutput } from "./SubgraphOutput" -import type { LinkConnector } from "@/canvas/LinkConnector" -import type { CanvasPointer } from "@/CanvasPointer" -import type { DefaultConnectionColors, INodeInputSlot, INodeOutputSlot, ISlotType, Positionable } from "@/interfaces" -import type { LGraphNode, NodeId } from "@/LGraphNode" -import type { RerouteId } from "@/Reroute" -import type { CanvasPointerEvent } from "@/types/events" -import type { NodeLike } from "@/types/NodeLike" +import type { LinkConnector } from "@/lib/litegraph/src/canvas/LinkConnector" +import type { CanvasPointer } from "@/lib/litegraph/src/CanvasPointer" +import type { DefaultConnectionColors, INodeInputSlot, INodeOutputSlot, ISlotType, Positionable } from "@/lib/litegraph/src/interfaces" +import type { LGraphNode, NodeId } from "@/lib/litegraph/src/LGraphNode" +import type { RerouteId } from "@/lib/litegraph/src/Reroute" +import type { CanvasPointerEvent } from "@/lib/litegraph/src/types/events" +import type { NodeLike } from "@/lib/litegraph/src/types/NodeLike" -import { SUBGRAPH_INPUT_ID } from "@/constants" -import { Rectangle } from "@/infrastructure/Rectangle" -import { LLink } from "@/LLink" -import { NodeSlotType } from "@/types/globalEnums" -import { findFreeSlotOfType } from "@/utils/collections" +import { SUBGRAPH_INPUT_ID } from "@/lib/litegraph/src/constants" +import { Rectangle } from "@/lib/litegraph/src/infrastructure/Rectangle" +import { LLink } from "@/lib/litegraph/src/LLink" +import { NodeSlotType } from "@/lib/litegraph/src/types/globalEnums" +import { findFreeSlotOfType } from "@/lib/litegraph/src/utils/collections" import { EmptySubgraphInput } from "./EmptySubgraphInput" import { SubgraphIONodeBase } from "./SubgraphIONodeBase" diff --git a/src/lib/litegraph/src/subgraph/SubgraphNode.ts b/src/lib/litegraph/src/subgraph/SubgraphNode.ts index c14a5347b9..02c414fab2 100644 --- a/src/lib/litegraph/src/subgraph/SubgraphNode.ts +++ b/src/lib/litegraph/src/subgraph/SubgraphNode.ts @@ -1,20 +1,20 @@ import type { SubgraphInput } from "./SubgraphInput" -import type { ISubgraphInput } from "@/interfaces" -import type { BaseLGraph, LGraph } from "@/LGraph" -import type { GraphOrSubgraph, Subgraph } from "@/subgraph/Subgraph" -import type { ExportedSubgraphInstance } from "@/types/serialisation" -import type { IBaseWidget } from "@/types/widgets" -import type { UUID } from "@/utils/uuid" +import type { ISubgraphInput } from "@/lib/litegraph/src/interfaces" +import type { BaseLGraph, LGraph } from "@/lib/litegraph/src/LGraph" +import type { GraphOrSubgraph, Subgraph } from "@/lib/litegraph/src/subgraph/Subgraph" +import type { ExportedSubgraphInstance } from "@/lib/litegraph/src/types/serialisation" +import type { IBaseWidget } from "@/lib/litegraph/src/types/widgets" +import type { UUID } from "@/lib/litegraph/src/utils/uuid" -import { RecursionError } from "@/infrastructure/RecursionError" -import { LGraphButton } from "@/LGraphButton" -import { LGraphCanvas } from "@/LGraphCanvas" -import { LGraphNode } from "@/LGraphNode" -import { type INodeInputSlot, type ISlotType, type NodeId } from "@/litegraph" -import { LLink, type ResolvedConnection } from "@/LLink" -import { NodeInputSlot } from "@/node/NodeInputSlot" -import { NodeOutputSlot } from "@/node/NodeOutputSlot" -import { toConcreteWidget } from "@/widgets/widgetMap" +import { RecursionError } from "@/lib/litegraph/src/infrastructure/RecursionError" +import { LGraphButton } from "@/lib/litegraph/src/LGraphButton" +import { LGraphCanvas } from "@/lib/litegraph/src/LGraphCanvas" +import { LGraphNode } from "@/lib/litegraph/src/LGraphNode" +import { type INodeInputSlot, type ISlotType, type NodeId } from "@/lib/litegraph/src/litegraph" +import { LLink, type ResolvedConnection } from "@/lib/litegraph/src/LLink" +import { NodeInputSlot } from "@/lib/litegraph/src/node/NodeInputSlot" +import { NodeOutputSlot } from "@/lib/litegraph/src/node/NodeOutputSlot" +import { toConcreteWidget } from "@/lib/litegraph/src/widgets/widgetMap" import { type ExecutableLGraphNode, ExecutableNodeDTO, type ExecutionId } from "./ExecutableNodeDTO" diff --git a/src/lib/litegraph/src/subgraph/SubgraphOutput.ts b/src/lib/litegraph/src/subgraph/SubgraphOutput.ts index 1a67d75ab1..c2f7c297de 100644 --- a/src/lib/litegraph/src/subgraph/SubgraphOutput.ts +++ b/src/lib/litegraph/src/subgraph/SubgraphOutput.ts @@ -1,13 +1,13 @@ import type { SubgraphInput } from "./SubgraphInput" import type { SubgraphOutputNode } from "./SubgraphOutputNode" -import type { INodeInputSlot, INodeOutputSlot, Point, ReadOnlyRect } from "@/interfaces" -import type { LGraphNode } from "@/LGraphNode" -import type { RerouteId } from "@/Reroute" +import type { INodeInputSlot, INodeOutputSlot, Point, ReadOnlyRect } from "@/lib/litegraph/src/interfaces" +import type { LGraphNode } from "@/lib/litegraph/src/LGraphNode" +import type { RerouteId } from "@/lib/litegraph/src/Reroute" -import { LiteGraph } from "@/litegraph" -import { LLink } from "@/LLink" -import { NodeSlotType } from "@/types/globalEnums" -import { removeFromArray } from "@/utils/collections" +import { LiteGraph } from "@/lib/litegraph/src/litegraph" +import { LLink } from "@/lib/litegraph/src/LLink" +import { NodeSlotType } from "@/lib/litegraph/src/types/globalEnums" +import { removeFromArray } from "@/lib/litegraph/src/utils/collections" import { SubgraphSlot } from "./SubgraphSlotBase" import { isNodeSlot, isSubgraphInput } from "./subgraphUtils" diff --git a/src/lib/litegraph/src/subgraph/SubgraphOutputNode.ts b/src/lib/litegraph/src/subgraph/SubgraphOutputNode.ts index 60786dbe21..c5ff9caa73 100644 --- a/src/lib/litegraph/src/subgraph/SubgraphOutputNode.ts +++ b/src/lib/litegraph/src/subgraph/SubgraphOutputNode.ts @@ -1,18 +1,18 @@ import type { SubgraphInput } from "./SubgraphInput" import type { SubgraphOutput } from "./SubgraphOutput" -import type { LinkConnector } from "@/canvas/LinkConnector" -import type { CanvasPointer } from "@/CanvasPointer" -import type { DefaultConnectionColors, INodeInputSlot, INodeOutputSlot, ISlotType, Positionable } from "@/interfaces" -import type { LGraphNode, NodeId } from "@/LGraphNode" -import type { LLink } from "@/LLink" -import type { RerouteId } from "@/Reroute" -import type { CanvasPointerEvent } from "@/types/events" -import type { NodeLike } from "@/types/NodeLike" -import type { SubgraphIO } from "@/types/serialisation" +import type { LinkConnector } from "@/lib/litegraph/src/canvas/LinkConnector" +import type { CanvasPointer } from "@/lib/litegraph/src/CanvasPointer" +import type { DefaultConnectionColors, INodeInputSlot, INodeOutputSlot, ISlotType, Positionable } from "@/lib/litegraph/src/interfaces" +import type { LGraphNode, NodeId } from "@/lib/litegraph/src/LGraphNode" +import type { LLink } from "@/lib/litegraph/src/LLink" +import type { RerouteId } from "@/lib/litegraph/src/Reroute" +import type { CanvasPointerEvent } from "@/lib/litegraph/src/types/events" +import type { NodeLike } from "@/lib/litegraph/src/types/NodeLike" +import type { SubgraphIO } from "@/lib/litegraph/src/types/serialisation" -import { SUBGRAPH_OUTPUT_ID } from "@/constants" -import { Rectangle } from "@/infrastructure/Rectangle" -import { findFreeSlotOfType } from "@/utils/collections" +import { SUBGRAPH_OUTPUT_ID } from "@/lib/litegraph/src/constants" +import { Rectangle } from "@/lib/litegraph/src/infrastructure/Rectangle" +import { findFreeSlotOfType } from "@/lib/litegraph/src/utils/collections" import { EmptySubgraphOutput } from "./EmptySubgraphOutput" import { SubgraphIONodeBase } from "./SubgraphIONodeBase" diff --git a/src/lib/litegraph/src/subgraph/SubgraphSlotBase.ts b/src/lib/litegraph/src/subgraph/SubgraphSlotBase.ts index ed49e611bb..20426f0e89 100644 --- a/src/lib/litegraph/src/subgraph/SubgraphSlotBase.ts +++ b/src/lib/litegraph/src/subgraph/SubgraphSlotBase.ts @@ -2,20 +2,20 @@ import type { SubgraphInput } from "./SubgraphInput" import type { SubgraphInputNode } from "./SubgraphInputNode" import type { SubgraphOutput } from "./SubgraphOutput" import type { SubgraphOutputNode } from "./SubgraphOutputNode" -import type { DefaultConnectionColors, Hoverable, INodeInputSlot, INodeOutputSlot, Point, ReadOnlyRect, ReadOnlySize } from "@/interfaces" -import type { LGraphNode } from "@/LGraphNode" -import type { LinkId, LLink } from "@/LLink" -import type { RerouteId } from "@/Reroute" -import type { CanvasPointerEvent } from "@/types/events" -import type { Serialisable, SubgraphIO } from "@/types/serialisation" +import type { DefaultConnectionColors, Hoverable, INodeInputSlot, INodeOutputSlot, Point, ReadOnlyRect, ReadOnlySize } from "@/lib/litegraph/src/interfaces" +import type { LGraphNode } from "@/lib/litegraph/src/LGraphNode" +import type { LinkId, LLink } from "@/lib/litegraph/src/LLink" +import type { RerouteId } from "@/lib/litegraph/src/Reroute" +import type { CanvasPointerEvent } from "@/lib/litegraph/src/types/events" +import type { Serialisable, SubgraphIO } from "@/lib/litegraph/src/types/serialisation" -import { SlotShape } from "@/draw" -import { ConstrainedSize } from "@/infrastructure/ConstrainedSize" -import { Rectangle } from "@/infrastructure/Rectangle" -import { LGraphCanvas } from "@/LGraphCanvas" -import { LiteGraph } from "@/litegraph" -import { SlotBase } from "@/node/SlotBase" -import { createUuidv4, type UUID } from "@/utils/uuid" +import { SlotShape } from "@/lib/litegraph/src/draw" +import { ConstrainedSize } from "@/lib/litegraph/src/infrastructure/ConstrainedSize" +import { Rectangle } from "@/lib/litegraph/src/infrastructure/Rectangle" +import { LGraphCanvas } from "@/lib/litegraph/src/LGraphCanvas" +import { LiteGraph } from "@/lib/litegraph/src/litegraph" +import { SlotBase } from "@/lib/litegraph/src/node/SlotBase" +import { createUuidv4, type UUID } from "@/lib/litegraph/src/utils/uuid" export interface SubgraphSlotDrawOptions { ctx: CanvasRenderingContext2D diff --git a/src/lib/litegraph/src/subgraph/subgraphUtils.ts b/src/lib/litegraph/src/subgraph/subgraphUtils.ts index d8036b9a8f..9a7cba1bb8 100644 --- a/src/lib/litegraph/src/subgraph/subgraphUtils.ts +++ b/src/lib/litegraph/src/subgraph/subgraphUtils.ts @@ -1,18 +1,18 @@ import type { GraphOrSubgraph } from "./Subgraph" import type { SubgraphInput } from "./SubgraphInput" import type { SubgraphOutput } from "./SubgraphOutput" -import type { INodeInputSlot, INodeOutputSlot, Positionable } from "@/interfaces" -import type { LGraph } from "@/LGraph" -import type { ISerialisedNode, SerialisableLLink, SubgraphIO } from "@/types/serialisation" -import type { UUID } from "@/utils/uuid" +import type { INodeInputSlot, INodeOutputSlot, Positionable } from "@/lib/litegraph/src/interfaces" +import type { LGraph } from "@/lib/litegraph/src/LGraph" +import type { ISerialisedNode, SerialisableLLink, SubgraphIO } from "@/lib/litegraph/src/types/serialisation" +import type { UUID } from "@/lib/litegraph/src/utils/uuid" -import { SUBGRAPH_INPUT_ID, SUBGRAPH_OUTPUT_ID } from "@/constants" -import { LGraphGroup } from "@/LGraphGroup" -import { LGraphNode } from "@/LGraphNode" -import { createUuidv4, LiteGraph } from "@/litegraph" -import { LLink, type ResolvedConnection } from "@/LLink" -import { Reroute } from "@/Reroute" -import { nextUniqueName } from "@/strings" +import { SUBGRAPH_INPUT_ID, SUBGRAPH_OUTPUT_ID } from "@/lib/litegraph/src/constants" +import { LGraphGroup } from "@/lib/litegraph/src/LGraphGroup" +import { LGraphNode } from "@/lib/litegraph/src/LGraphNode" +import { createUuidv4, LiteGraph } from "@/lib/litegraph/src/litegraph" +import { LLink, type ResolvedConnection } from "@/lib/litegraph/src/LLink" +import { Reroute } from "@/lib/litegraph/src/Reroute" +import { nextUniqueName } from "@/lib/litegraph/src/strings" import { SubgraphInputNode } from "./SubgraphInputNode" import { SubgraphOutputNode } from "./SubgraphOutputNode" diff --git a/src/lib/litegraph/src/types/NodeLike.ts b/src/lib/litegraph/src/types/NodeLike.ts index 38a9e72c0e..62ace702eb 100644 --- a/src/lib/litegraph/src/types/NodeLike.ts +++ b/src/lib/litegraph/src/types/NodeLike.ts @@ -1,6 +1,6 @@ -import type { INodeInputSlot, INodeOutputSlot } from "@/interfaces" -import type { NodeId } from "@/LGraphNode" -import type { SubgraphIO } from "@/types/serialisation" +import type { INodeInputSlot, INodeOutputSlot } from "@/lib/litegraph/src/interfaces" +import type { NodeId } from "@/lib/litegraph/src/LGraphNode" +import type { SubgraphIO } from "@/lib/litegraph/src/types/serialisation" export interface NodeLike { id: NodeId diff --git a/src/lib/litegraph/src/types/serialisation.ts b/src/lib/litegraph/src/types/serialisation.ts index 4587b3c218..627d0d48ac 100644 --- a/src/lib/litegraph/src/types/serialisation.ts +++ b/src/lib/litegraph/src/types/serialisation.ts @@ -16,7 +16,7 @@ import type { LinkId, SerialisedLLinkArray } from "../LLink" import type { FloatingRerouteSlot, RerouteId } from "../Reroute" import type { TWidgetValue } from "../types/widgets" import type { RenderShape } from "./globalEnums" -import type { UUID } from "@/utils/uuid" +import type { UUID } from "@/lib/litegraph/src/utils/uuid" /** * An object that implements custom pre-serialization logic via {@link Serialisable.asSerialisable}. diff --git a/src/lib/litegraph/src/utils/collections.ts b/src/lib/litegraph/src/utils/collections.ts index d70e6275b1..0bec845e70 100644 --- a/src/lib/litegraph/src/utils/collections.ts +++ b/src/lib/litegraph/src/utils/collections.ts @@ -1,8 +1,8 @@ import type { ConnectingLink, ISlotType, Positionable } from "../interfaces" -import type { LinkId } from "@/LLink" +import type { LinkId } from "@/lib/litegraph/src/LLink" -import { LGraphNode } from "@/LGraphNode" -import { parseSlotTypes } from "@/strings" +import { LGraphNode } from "@/lib/litegraph/src/LGraphNode" +import { parseSlotTypes } from "@/lib/litegraph/src/strings" /** * Creates a flat set of all positionable items by recursively iterating through all child items. diff --git a/src/lib/litegraph/src/utils/feedback.ts b/src/lib/litegraph/src/utils/feedback.ts index 72d2892d01..d0d55aa380 100644 --- a/src/lib/litegraph/src/utils/feedback.ts +++ b/src/lib/litegraph/src/utils/feedback.ts @@ -1,4 +1,4 @@ -import { LiteGraph } from "@/litegraph" +import { LiteGraph } from "@/lib/litegraph/src/litegraph" /** Guard against unbound allocation. */ const UNIQUE_MESSAGE_LIMIT = 10_000 diff --git a/src/lib/litegraph/src/utils/type.ts b/src/lib/litegraph/src/utils/type.ts index edd0eb7e22..21d795755f 100644 --- a/src/lib/litegraph/src/utils/type.ts +++ b/src/lib/litegraph/src/utils/type.ts @@ -1,4 +1,4 @@ -import type { IColorable } from "@/interfaces" +import type { IColorable } from "@/lib/litegraph/src/interfaces" /** * Converts a plain object to a class instance if it is not already an instance of the class. diff --git a/src/lib/litegraph/src/utils/widget.ts b/src/lib/litegraph/src/utils/widget.ts index 6201fb7522..1628a9dfdb 100644 --- a/src/lib/litegraph/src/utils/widget.ts +++ b/src/lib/litegraph/src/utils/widget.ts @@ -1,4 +1,4 @@ -import type { IWidgetOptions } from "@/types/widgets" +import type { IWidgetOptions } from "@/lib/litegraph/src/types/widgets" /** * The step value for numeric widgets. diff --git a/src/lib/litegraph/src/widgets/BaseSteppedWidget.ts b/src/lib/litegraph/src/widgets/BaseSteppedWidget.ts index 27cf4d926c..71facd9687 100644 --- a/src/lib/litegraph/src/widgets/BaseSteppedWidget.ts +++ b/src/lib/litegraph/src/widgets/BaseSteppedWidget.ts @@ -1,4 +1,4 @@ -import type { IBaseWidget } from "@/types/widgets" +import type { IBaseWidget } from "@/lib/litegraph/src/types/widgets" import { BaseWidget, type DrawWidgetOptions, type WidgetEventOptions } from "./BaseWidget" diff --git a/src/lib/litegraph/src/widgets/BaseWidget.ts b/src/lib/litegraph/src/widgets/BaseWidget.ts index ba0d9cf414..d7f9ddf116 100644 --- a/src/lib/litegraph/src/widgets/BaseWidget.ts +++ b/src/lib/litegraph/src/widgets/BaseWidget.ts @@ -1,11 +1,11 @@ -import type { Point } from "@/interfaces" -import type { CanvasPointer, LGraphCanvas, LGraphNode, Size } from "@/litegraph" -import type { CanvasPointerEvent } from "@/types/events" -import type { IBaseWidget } from "@/types/widgets" +import type { Point } from "@/lib/litegraph/src/interfaces" +import type { CanvasPointer, LGraphCanvas, LGraphNode, Size } from "@/lib/litegraph/src/litegraph" +import type { CanvasPointerEvent } from "@/lib/litegraph/src/types/events" +import type { IBaseWidget } from "@/lib/litegraph/src/types/widgets" -import { drawTextInArea } from "@/draw" -import { Rectangle } from "@/infrastructure/Rectangle" -import { LiteGraph } from "@/litegraph" +import { drawTextInArea } from "@/lib/litegraph/src/draw" +import { Rectangle } from "@/lib/litegraph/src/infrastructure/Rectangle" +import { LiteGraph } from "@/lib/litegraph/src/litegraph" export interface DrawWidgetOptions { /** The width of the node where this widget will be displayed. */ diff --git a/src/lib/litegraph/src/widgets/BooleanWidget.ts b/src/lib/litegraph/src/widgets/BooleanWidget.ts index 505358f05b..b6903528d5 100644 --- a/src/lib/litegraph/src/widgets/BooleanWidget.ts +++ b/src/lib/litegraph/src/widgets/BooleanWidget.ts @@ -1,4 +1,4 @@ -import type { IBooleanWidget } from "@/types/widgets" +import type { IBooleanWidget } from "@/lib/litegraph/src/types/widgets" import { BaseWidget, type DrawWidgetOptions, type WidgetEventOptions } from "./BaseWidget" diff --git a/src/lib/litegraph/src/widgets/ButtonWidget.ts b/src/lib/litegraph/src/widgets/ButtonWidget.ts index 7cbee2cd1b..bbee612ba1 100644 --- a/src/lib/litegraph/src/widgets/ButtonWidget.ts +++ b/src/lib/litegraph/src/widgets/ButtonWidget.ts @@ -1,5 +1,5 @@ -import type { LGraphNode } from "@/LGraphNode" -import type { IButtonWidget } from "@/types/widgets" +import type { LGraphNode } from "@/lib/litegraph/src/LGraphNode" +import type { IButtonWidget } from "@/lib/litegraph/src/types/widgets" import { BaseWidget, type DrawWidgetOptions, type WidgetEventOptions } from "./BaseWidget" diff --git a/src/lib/litegraph/src/widgets/ComboWidget.ts b/src/lib/litegraph/src/widgets/ComboWidget.ts index 79ed6edb23..56b8dbc932 100644 --- a/src/lib/litegraph/src/widgets/ComboWidget.ts +++ b/src/lib/litegraph/src/widgets/ComboWidget.ts @@ -1,9 +1,9 @@ import type { WidgetEventOptions } from "./BaseWidget" -import type { LGraphNode } from "@/LGraphNode" -import type { IComboWidget, IStringComboWidget } from "@/types/widgets" +import type { LGraphNode } from "@/lib/litegraph/src/LGraphNode" +import type { IComboWidget, IStringComboWidget } from "@/lib/litegraph/src/types/widgets" -import { clamp, LiteGraph } from "@/litegraph" -import { warnDeprecated } from "@/utils/feedback" +import { clamp, LiteGraph } from "@/lib/litegraph/src/litegraph" +import { warnDeprecated } from "@/lib/litegraph/src/utils/feedback" import { BaseSteppedWidget } from "./BaseSteppedWidget" diff --git a/src/lib/litegraph/src/widgets/KnobWidget.ts b/src/lib/litegraph/src/widgets/KnobWidget.ts index c9351e4273..6caf6fadbe 100644 --- a/src/lib/litegraph/src/widgets/KnobWidget.ts +++ b/src/lib/litegraph/src/widgets/KnobWidget.ts @@ -1,7 +1,7 @@ -import type { IKnobWidget } from "@/types/widgets" +import type { IKnobWidget } from "@/lib/litegraph/src/types/widgets" -import { clamp } from "@/litegraph" -import { getWidgetStep } from "@/utils/widget" +import { clamp } from "@/lib/litegraph/src/litegraph" +import { getWidgetStep } from "@/lib/litegraph/src/utils/widget" import { BaseWidget, type DrawWidgetOptions, type WidgetEventOptions } from "./BaseWidget" diff --git a/src/lib/litegraph/src/widgets/LegacyWidget.ts b/src/lib/litegraph/src/widgets/LegacyWidget.ts index bbf75c519a..79b107435f 100644 --- a/src/lib/litegraph/src/widgets/LegacyWidget.ts +++ b/src/lib/litegraph/src/widgets/LegacyWidget.ts @@ -1,7 +1,7 @@ -import type { LGraphNode } from "@/LGraphNode" -import type { IBaseWidget } from "@/types/widgets" +import type { LGraphNode } from "@/lib/litegraph/src/LGraphNode" +import type { IBaseWidget } from "@/lib/litegraph/src/types/widgets" -import { LiteGraph } from "@/litegraph" +import { LiteGraph } from "@/lib/litegraph/src/litegraph" import { BaseWidget, type DrawWidgetOptions } from "./BaseWidget" diff --git a/src/lib/litegraph/src/widgets/NumberWidget.ts b/src/lib/litegraph/src/widgets/NumberWidget.ts index ac88bafdca..7bbf81c75f 100644 --- a/src/lib/litegraph/src/widgets/NumberWidget.ts +++ b/src/lib/litegraph/src/widgets/NumberWidget.ts @@ -1,7 +1,7 @@ import type { WidgetEventOptions } from "./BaseWidget" -import type { INumericWidget } from "@/types/widgets" +import type { INumericWidget } from "@/lib/litegraph/src/types/widgets" -import { getWidgetStep } from "@/utils/widget" +import { getWidgetStep } from "@/lib/litegraph/src/utils/widget" import { BaseSteppedWidget } from "./BaseSteppedWidget" diff --git a/src/lib/litegraph/src/widgets/SliderWidget.ts b/src/lib/litegraph/src/widgets/SliderWidget.ts index 7e9054cf58..811910914a 100644 --- a/src/lib/litegraph/src/widgets/SliderWidget.ts +++ b/src/lib/litegraph/src/widgets/SliderWidget.ts @@ -1,6 +1,6 @@ -import type { ISliderWidget } from "@/types/widgets" +import type { ISliderWidget } from "@/lib/litegraph/src/types/widgets" -import { clamp } from "@/litegraph" +import { clamp } from "@/lib/litegraph/src/litegraph" import { BaseWidget, type DrawWidgetOptions, type WidgetEventOptions } from "./BaseWidget" diff --git a/src/lib/litegraph/src/widgets/TextWidget.ts b/src/lib/litegraph/src/widgets/TextWidget.ts index 0567fd591e..a15ce05327 100644 --- a/src/lib/litegraph/src/widgets/TextWidget.ts +++ b/src/lib/litegraph/src/widgets/TextWidget.ts @@ -1,5 +1,5 @@ -import type { LGraphNode } from "@/LGraphNode" -import type { IStringWidget } from "@/types/widgets" +import type { LGraphNode } from "@/lib/litegraph/src/LGraphNode" +import type { IStringWidget } from "@/lib/litegraph/src/types/widgets" import { BaseWidget, type DrawWidgetOptions, type WidgetEventOptions } from "./BaseWidget" diff --git a/src/lib/litegraph/src/widgets/widgetMap.ts b/src/lib/litegraph/src/widgets/widgetMap.ts index 07dc9033a6..12c39cbe8a 100644 --- a/src/lib/litegraph/src/widgets/widgetMap.ts +++ b/src/lib/litegraph/src/widgets/widgetMap.ts @@ -1,4 +1,4 @@ -import type { LGraphNode } from "@/LGraphNode" +import type { LGraphNode } from "@/lib/litegraph/src/LGraphNode" import type { IBaseWidget, IBooleanWidget, @@ -11,9 +11,9 @@ import type { IStringWidget, IWidget, TWidgetType, -} from "@/types/widgets" +} from "@/lib/litegraph/src/types/widgets" -import { toClass } from "@/utils/type" +import { toClass } from "@/lib/litegraph/src/utils/type" import { BaseWidget } from "./BaseWidget" import { BooleanWidget } from "./BooleanWidget" diff --git a/src/lib/litegraph/test/ConfigureGraph.test.ts b/src/lib/litegraph/test/ConfigureGraph.test.ts index 74f39c2fe2..61ce4eec6d 100644 --- a/src/lib/litegraph/test/ConfigureGraph.test.ts +++ b/src/lib/litegraph/test/ConfigureGraph.test.ts @@ -1,6 +1,6 @@ import { describe } from "vitest" -import { LGraph } from "@/litegraph" +import { LGraph } from "@/lib/litegraph/src/litegraph" import { dirtyTest } from "./testExtensions" diff --git a/src/lib/litegraph/test/LGraph.test.ts b/src/lib/litegraph/test/LGraph.test.ts index d77e37a775..d19c663e3a 100644 --- a/src/lib/litegraph/test/LGraph.test.ts +++ b/src/lib/litegraph/test/LGraph.test.ts @@ -1,6 +1,6 @@ import { describe } from "vitest" -import { LGraph, LiteGraph } from "@/litegraph" +import { LGraph, LiteGraph } from "@/lib/litegraph/src/litegraph" import { test } from "./testExtensions" diff --git a/src/lib/litegraph/test/LGraphButton.test.ts b/src/lib/litegraph/test/LGraphButton.test.ts index d20fea6e4d..3a8e9f1a30 100644 --- a/src/lib/litegraph/test/LGraphButton.test.ts +++ b/src/lib/litegraph/test/LGraphButton.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it, vi } from "vitest" -import { Rectangle } from "@/infrastructure/Rectangle" -import { LGraphButton } from "@/LGraphButton" +import { Rectangle } from "@/lib/litegraph/src/infrastructure/Rectangle" +import { LGraphButton } from "@/lib/litegraph/src/LGraphButton" describe("LGraphButton", () => { describe("Constructor", () => { diff --git a/src/lib/litegraph/test/LGraphCanvas.titleButtons.test.ts b/src/lib/litegraph/test/LGraphCanvas.titleButtons.test.ts index 2d7e2e1880..c5ff9df86b 100644 --- a/src/lib/litegraph/test/LGraphCanvas.titleButtons.test.ts +++ b/src/lib/litegraph/test/LGraphCanvas.titleButtons.test.ts @@ -1,7 +1,7 @@ import { beforeEach, describe, expect, it, vi } from "vitest" -import { LGraphCanvas } from "@/LGraphCanvas" -import { LGraphNode, LiteGraph } from "@/litegraph" +import { LGraphCanvas } from "@/lib/litegraph/src/LGraphCanvas" +import { LGraphNode, LiteGraph } from "@/lib/litegraph/src/litegraph" describe("LGraphCanvas Title Button Rendering", () => { let canvas: LGraphCanvas diff --git a/src/lib/litegraph/test/LGraphGroup.test.ts b/src/lib/litegraph/test/LGraphGroup.test.ts index 3a1c3202af..5c8bac5e72 100644 --- a/src/lib/litegraph/test/LGraphGroup.test.ts +++ b/src/lib/litegraph/test/LGraphGroup.test.ts @@ -1,6 +1,6 @@ import { describe, expect } from "vitest" -import { LGraphGroup } from "@/litegraph" +import { LGraphGroup } from "@/lib/litegraph/src/litegraph" import { test } from "./testExtensions" diff --git a/src/lib/litegraph/test/LGraphNode.resize.test.ts b/src/lib/litegraph/test/LGraphNode.resize.test.ts index 8f0b06acdc..3b05321031 100644 --- a/src/lib/litegraph/test/LGraphNode.resize.test.ts +++ b/src/lib/litegraph/test/LGraphNode.resize.test.ts @@ -1,6 +1,6 @@ import { beforeEach, describe, expect } from "vitest" -import { LGraphNode, LiteGraph } from "@/litegraph" +import { LGraphNode, LiteGraph } from "@/lib/litegraph/src/litegraph" import { test } from "./testExtensions" diff --git a/src/lib/litegraph/test/LGraphNode.test.ts b/src/lib/litegraph/test/LGraphNode.test.ts index 6bb5dc08c3..21c01b46c2 100644 --- a/src/lib/litegraph/test/LGraphNode.test.ts +++ b/src/lib/litegraph/test/LGraphNode.test.ts @@ -1,12 +1,12 @@ -import type { INodeInputSlot, Point } from "@/interfaces" -import type { ISerialisedNode } from "@/types/serialisation" +import type { INodeInputSlot, Point } from "@/lib/litegraph/src/interfaces" +import type { ISerialisedNode } from "@/lib/litegraph/src/types/serialisation" import { afterEach, beforeEach, describe, expect, vi } from "vitest" -import { LGraphNode, LiteGraph } from "@/litegraph" -import { LGraph } from "@/litegraph" -import { NodeInputSlot } from "@/node/NodeInputSlot" -import { NodeOutputSlot } from "@/node/NodeOutputSlot" +import { LGraphNode, LiteGraph } from "@/lib/litegraph/src/litegraph" +import { LGraph } from "@/lib/litegraph/src/litegraph" +import { NodeInputSlot } from "@/lib/litegraph/src/node/NodeInputSlot" +import { NodeOutputSlot } from "@/lib/litegraph/src/node/NodeOutputSlot" import { test } from "./testExtensions" diff --git a/src/lib/litegraph/test/LGraphNode.titleButtons.test.ts b/src/lib/litegraph/test/LGraphNode.titleButtons.test.ts index 161d88e64a..3600c95a1a 100644 --- a/src/lib/litegraph/test/LGraphNode.titleButtons.test.ts +++ b/src/lib/litegraph/test/LGraphNode.titleButtons.test.ts @@ -1,8 +1,8 @@ import { describe, expect, it, vi } from "vitest" -import { LGraphButton } from "@/LGraphButton" -import { LGraphCanvas } from "@/LGraphCanvas" -import { LGraphNode } from "@/LGraphNode" +import { LGraphButton } from "@/lib/litegraph/src/LGraphButton" +import { LGraphCanvas } from "@/lib/litegraph/src/LGraphCanvas" +import { LGraphNode } from "@/lib/litegraph/src/LGraphNode" describe("LGraphNode Title Buttons", () => { describe("addTitleButton", () => { diff --git a/src/lib/litegraph/test/LGraph_constructor.test.ts b/src/lib/litegraph/test/LGraph_constructor.test.ts index f9df1bdc0f..dfe5e29149 100644 --- a/src/lib/litegraph/test/LGraph_constructor.test.ts +++ b/src/lib/litegraph/test/LGraph_constructor.test.ts @@ -1,6 +1,6 @@ import { describe } from "vitest" -import { LGraph } from "@/litegraph" +import { LGraph } from "@/lib/litegraph/src/litegraph" import { dirtyTest } from "./testExtensions" diff --git a/src/lib/litegraph/test/LLink.test.ts b/src/lib/litegraph/test/LLink.test.ts index 120dfe9d84..fea2bd6571 100644 --- a/src/lib/litegraph/test/LLink.test.ts +++ b/src/lib/litegraph/test/LLink.test.ts @@ -1,6 +1,6 @@ import { describe, expect } from "vitest" -import { LLink } from "@/litegraph" +import { LLink } from "@/lib/litegraph/src/litegraph" import { test } from "./testExtensions" diff --git a/src/lib/litegraph/test/LinkConnector.integration.test.ts b/src/lib/litegraph/test/LinkConnector.integration.test.ts index ddfdd4cb52..6ef80b54f0 100644 --- a/src/lib/litegraph/test/LinkConnector.integration.test.ts +++ b/src/lib/litegraph/test/LinkConnector.integration.test.ts @@ -1,9 +1,9 @@ -import type { CanvasPointerEvent } from "@/types/events" +import type { CanvasPointerEvent } from "@/lib/litegraph/src/types/events" import { afterEach, describe, expect, vi } from "vitest" -import { LGraph, LGraphNode, LLink, Reroute, type RerouteId } from "@/litegraph" -import { LinkConnector } from "@/litegraph" +import { LGraph, LGraphNode, LLink, Reroute, type RerouteId } from "@/lib/litegraph/src/litegraph" +import { LinkConnector } from "@/lib/litegraph/src/litegraph" import { test as baseTest } from "./testExtensions" diff --git a/src/lib/litegraph/test/LinkConnector.test.ts b/src/lib/litegraph/test/LinkConnector.test.ts index 31437ba1fa..c7898e7550 100644 --- a/src/lib/litegraph/test/LinkConnector.test.ts +++ b/src/lib/litegraph/test/LinkConnector.test.ts @@ -1,13 +1,13 @@ -import type { MovingInputLink } from "@/canvas/MovingInputLink" -import type { LinkNetwork } from "@/interfaces" -import type { ISlotType } from "@/interfaces" +import type { MovingInputLink } from "@/lib/litegraph/src/canvas/MovingInputLink" +import type { LinkNetwork } from "@/lib/litegraph/src/interfaces" +import type { ISlotType } from "@/lib/litegraph/src/interfaces" import { describe, expect, test as baseTest, vi } from "vitest" -import { LinkConnector } from "@/canvas/LinkConnector" -import { ToInputRenderLink } from "@/canvas/ToInputRenderLink" -import { LGraph, LGraphNode, LLink, Reroute, type RerouteId } from "@/litegraph" -import { LinkDirection } from "@/types/globalEnums" +import { LinkConnector } from "@/lib/litegraph/src/canvas/LinkConnector" +import { ToInputRenderLink } from "@/lib/litegraph/src/canvas/ToInputRenderLink" +import { LGraph, LGraphNode, LLink, Reroute, type RerouteId } from "@/lib/litegraph/src/litegraph" +import { LinkDirection } from "@/lib/litegraph/src/types/globalEnums" interface TestContext { network: LinkNetwork & { add(node: LGraphNode): void } diff --git a/src/lib/litegraph/test/NodeSlot.test.ts b/src/lib/litegraph/test/NodeSlot.test.ts index a4e53e6c26..946415321a 100644 --- a/src/lib/litegraph/test/NodeSlot.test.ts +++ b/src/lib/litegraph/test/NodeSlot.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from "vitest" -import { INodeInputSlot, INodeOutputSlot } from "@/interfaces" -import { inputAsSerialisable, outputAsSerialisable } from "@/node/slotUtils" +import { INodeInputSlot, INodeOutputSlot } from "@/lib/litegraph/src/interfaces" +import { inputAsSerialisable, outputAsSerialisable } from "@/lib/litegraph/src/node/slotUtils" describe("NodeSlot", () => { describe("inputAsSerialisable", () => { diff --git a/src/lib/litegraph/test/ToOutputRenderLink.test.ts b/src/lib/litegraph/test/ToOutputRenderLink.test.ts index e6ff8eb26c..347e7646ff 100644 --- a/src/lib/litegraph/test/ToOutputRenderLink.test.ts +++ b/src/lib/litegraph/test/ToOutputRenderLink.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it, vi } from "vitest" -import { ToOutputRenderLink } from "@/canvas/ToOutputRenderLink" -import { LinkDirection } from "@/types/globalEnums" +import { ToOutputRenderLink } from "@/lib/litegraph/src/canvas/ToOutputRenderLink" +import { LinkDirection } from "@/lib/litegraph/src/types/globalEnums" describe("ToOutputRenderLink", () => { describe("connectToOutput", () => { diff --git a/src/lib/litegraph/test/assets/testGraphs.ts b/src/lib/litegraph/test/assets/testGraphs.ts index a4e57671ca..e9435b1598 100644 --- a/src/lib/litegraph/test/assets/testGraphs.ts +++ b/src/lib/litegraph/test/assets/testGraphs.ts @@ -1,4 +1,4 @@ -import type { ISerialisedGraph, SerialisableGraph } from "@/litegraph" +import type { ISerialisedGraph, SerialisableGraph } from "@/lib/litegraph/src/litegraph" export const oldSchemaGraph: ISerialisedGraph = { id: "b4e984f1-b421-4d24-b8b4-ff895793af13", diff --git a/src/lib/litegraph/test/canvas/LinkConnector.test.ts b/src/lib/litegraph/test/canvas/LinkConnector.test.ts index 0cb8d835fc..09416e6699 100644 --- a/src/lib/litegraph/test/canvas/LinkConnector.test.ts +++ b/src/lib/litegraph/test/canvas/LinkConnector.test.ts @@ -1,9 +1,9 @@ -import type { INodeInputSlot, LGraphNode } from "@/litegraph" +import type { INodeInputSlot, LGraphNode } from "@/lib/litegraph/src/litegraph" import { beforeEach, describe, expect, test, vi } from "vitest" // We don't strictly need RenderLink interface import for the mock -import { LinkConnector } from "@/litegraph" +import { LinkConnector } from "@/lib/litegraph/src/litegraph" // Mocks const mockSetConnectingLinks = vi.fn() diff --git a/src/lib/litegraph/test/infrastructure/Rectangle.resize.test.ts b/src/lib/litegraph/test/infrastructure/Rectangle.resize.test.ts index 47fb4cb4b6..877963db29 100644 --- a/src/lib/litegraph/test/infrastructure/Rectangle.resize.test.ts +++ b/src/lib/litegraph/test/infrastructure/Rectangle.resize.test.ts @@ -1,6 +1,6 @@ import { beforeEach, describe, expect, test } from "vitest" -import { Rectangle } from "@/infrastructure/Rectangle" +import { Rectangle } from "@/lib/litegraph/src/infrastructure/Rectangle" describe("Rectangle resize functionality", () => { let rect: Rectangle diff --git a/src/lib/litegraph/test/infrastructure/Rectangle.test.ts b/src/lib/litegraph/test/infrastructure/Rectangle.test.ts index 2dd00f9649..2590a9fcd5 100644 --- a/src/lib/litegraph/test/infrastructure/Rectangle.test.ts +++ b/src/lib/litegraph/test/infrastructure/Rectangle.test.ts @@ -1,8 +1,8 @@ -import type { Point, Size } from "@/interfaces" +import type { Point, Size } from "@/lib/litegraph/src/interfaces" import { describe, expect, test as baseTest, vi } from "vitest" -import { Rectangle } from "@/infrastructure/Rectangle" +import { Rectangle } from "@/lib/litegraph/src/infrastructure/Rectangle" // TODO: If there's a common test context, use it here // For now, we'll define a simple context for Rectangle tests diff --git a/src/lib/litegraph/test/litegraph.test.ts b/src/lib/litegraph/test/litegraph.test.ts index 16e3b0ef27..c898221232 100644 --- a/src/lib/litegraph/test/litegraph.test.ts +++ b/src/lib/litegraph/test/litegraph.test.ts @@ -1,7 +1,7 @@ import { beforeEach, describe, expect, vi } from "vitest" -import { clamp, LGraphCanvas, LiteGraph } from "@/litegraph" -import { LiteGraphGlobal } from "@/LiteGraphGlobal" +import { clamp, LGraphCanvas, LiteGraph } from "@/lib/litegraph/src/litegraph" +import { LiteGraphGlobal } from "@/lib/litegraph/src/LiteGraphGlobal" import { test } from "./testExtensions" diff --git a/src/lib/litegraph/test/serialise.test.ts b/src/lib/litegraph/test/serialise.test.ts index 6c4c9e9eea..807053dd4b 100644 --- a/src/lib/litegraph/test/serialise.test.ts +++ b/src/lib/litegraph/test/serialise.test.ts @@ -1,8 +1,8 @@ -import type { ISerialisedGraph } from "@/types/serialisation" +import type { ISerialisedGraph } from "@/lib/litegraph/src/types/serialisation" import { describe } from "vitest" -import { LGraph, LGraphGroup, LGraphNode } from "@/litegraph" +import { LGraph, LGraphGroup, LGraphNode } from "@/lib/litegraph/src/litegraph" import { test } from "./testExtensions" diff --git a/src/lib/litegraph/test/subgraph/ExecutableNodeDTO.test.ts b/src/lib/litegraph/test/subgraph/ExecutableNodeDTO.test.ts index 0782ff4f9d..0a32e82a71 100644 --- a/src/lib/litegraph/test/subgraph/ExecutableNodeDTO.test.ts +++ b/src/lib/litegraph/test/subgraph/ExecutableNodeDTO.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it, vi } from "vitest" -import { LGraph, LGraphNode } from "@/litegraph" -import { ExecutableNodeDTO } from "@/subgraph/ExecutableNodeDTO" +import { LGraph, LGraphNode } from "@/lib/litegraph/src/litegraph" +import { ExecutableNodeDTO } from "@/lib/litegraph/src/subgraph/ExecutableNodeDTO" import { createNestedSubgraphs, diff --git a/src/lib/litegraph/test/subgraph/Subgraph.test.ts b/src/lib/litegraph/test/subgraph/Subgraph.test.ts index af3c7d6b8d..907fddbbcb 100644 --- a/src/lib/litegraph/test/subgraph/Subgraph.test.ts +++ b/src/lib/litegraph/test/subgraph/Subgraph.test.ts @@ -8,9 +8,9 @@ import { describe, expect, it } from "vitest" -import { RecursionError } from "@/infrastructure/RecursionError" -import { LGraph, Subgraph } from "@/litegraph" -import { createUuidv4 } from "@/utils/uuid" +import { RecursionError } from "@/lib/litegraph/src/infrastructure/RecursionError" +import { LGraph, Subgraph } from "@/lib/litegraph/src/litegraph" +import { createUuidv4 } from "@/lib/litegraph/src/utils/uuid" import { subgraphTest } from "./fixtures/subgraphFixtures" import { diff --git a/src/lib/litegraph/test/subgraph/SubgraphEdgeCases.test.ts b/src/lib/litegraph/test/subgraph/SubgraphEdgeCases.test.ts index c6ee6156f7..85ee9748e2 100644 --- a/src/lib/litegraph/test/subgraph/SubgraphEdgeCases.test.ts +++ b/src/lib/litegraph/test/subgraph/SubgraphEdgeCases.test.ts @@ -7,7 +7,7 @@ import { describe, expect, it } from "vitest" -import { LGraph, LGraphNode, Subgraph } from "@/litegraph" +import { LGraph, LGraphNode, Subgraph } from "@/lib/litegraph/src/litegraph" import { createNestedSubgraphs, diff --git a/src/lib/litegraph/test/subgraph/SubgraphIO.test.ts b/src/lib/litegraph/test/subgraph/SubgraphIO.test.ts index be6679854f..5f5de89315 100644 --- a/src/lib/litegraph/test/subgraph/SubgraphIO.test.ts +++ b/src/lib/litegraph/test/subgraph/SubgraphIO.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from "vitest" -import { LGraphNode } from "@/litegraph" +import { LGraphNode } from "@/lib/litegraph/src/litegraph" import { subgraphTest } from "./fixtures/subgraphFixtures" import { diff --git a/src/lib/litegraph/test/subgraph/SubgraphMemory.test.ts b/src/lib/litegraph/test/subgraph/SubgraphMemory.test.ts index 9d3bf73544..9f81f05f11 100644 --- a/src/lib/litegraph/test/subgraph/SubgraphMemory.test.ts +++ b/src/lib/litegraph/test/subgraph/SubgraphMemory.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it, vi } from "vitest" -import { LGraph } from "@/litegraph" +import { LGraph } from "@/lib/litegraph/src/litegraph" import { subgraphTest } from "./fixtures/subgraphFixtures" import { diff --git a/src/lib/litegraph/test/subgraph/SubgraphNode.test.ts b/src/lib/litegraph/test/subgraph/SubgraphNode.test.ts index aa92ead09d..392caeaf5a 100644 --- a/src/lib/litegraph/test/subgraph/SubgraphNode.test.ts +++ b/src/lib/litegraph/test/subgraph/SubgraphNode.test.ts @@ -7,7 +7,7 @@ import { describe, expect, it, vi } from "vitest" -import { LGraph, Subgraph } from "@/litegraph" +import { LGraph, Subgraph } from "@/lib/litegraph/src/litegraph" import { subgraphTest } from "./fixtures/subgraphFixtures" import { diff --git a/src/lib/litegraph/test/subgraph/SubgraphNode.titleButton.test.ts b/src/lib/litegraph/test/subgraph/SubgraphNode.titleButton.test.ts index 7dcc0ebbcd..d43fa5650e 100644 --- a/src/lib/litegraph/test/subgraph/SubgraphNode.titleButton.test.ts +++ b/src/lib/litegraph/test/subgraph/SubgraphNode.titleButton.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it, vi } from "vitest" -import { LGraphButton } from "@/LGraphButton" -import { LGraphCanvas } from "@/LGraphCanvas" +import { LGraphButton } from "@/lib/litegraph/src/LGraphButton" +import { LGraphCanvas } from "@/lib/litegraph/src/LGraphCanvas" import { createTestSubgraph, createTestSubgraphNode } from "./fixtures/subgraphHelpers" diff --git a/src/lib/litegraph/test/subgraph/SubgraphSerialization.test.ts b/src/lib/litegraph/test/subgraph/SubgraphSerialization.test.ts index dd3ff1eb7a..087d464b7c 100644 --- a/src/lib/litegraph/test/subgraph/SubgraphSerialization.test.ts +++ b/src/lib/litegraph/test/subgraph/SubgraphSerialization.test.ts @@ -7,7 +7,7 @@ import { describe, expect, it } from "vitest" -import { LGraph, Subgraph } from "@/litegraph" +import { LGraph, Subgraph } from "@/lib/litegraph/src/litegraph" import { createTestSubgraph, diff --git a/src/lib/litegraph/test/subgraph/SubgraphSlotConnections.test.ts b/src/lib/litegraph/test/subgraph/SubgraphSlotConnections.test.ts index da9672daa8..69362d198f 100644 --- a/src/lib/litegraph/test/subgraph/SubgraphSlotConnections.test.ts +++ b/src/lib/litegraph/test/subgraph/SubgraphSlotConnections.test.ts @@ -1,12 +1,12 @@ import { describe, expect, it, vi } from "vitest" -import { LinkConnector } from "@/canvas/LinkConnector" -import { ToInputFromIoNodeLink } from "@/canvas/ToInputFromIoNodeLink" -import { SUBGRAPH_INPUT_ID } from "@/constants" -import { LGraphNode, type LinkNetwork } from "@/litegraph" -import { NodeInputSlot } from "@/node/NodeInputSlot" -import { NodeOutputSlot } from "@/node/NodeOutputSlot" -import { isSubgraphInput, isSubgraphOutput } from "@/subgraph/subgraphUtils" +import { LinkConnector } from "@/lib/litegraph/src/canvas/LinkConnector" +import { ToInputFromIoNodeLink } from "@/lib/litegraph/src/canvas/ToInputFromIoNodeLink" +import { SUBGRAPH_INPUT_ID } from "@/lib/litegraph/src/constants" +import { LGraphNode, type LinkNetwork } from "@/lib/litegraph/src/litegraph" +import { NodeInputSlot } from "@/lib/litegraph/src/node/NodeInputSlot" +import { NodeOutputSlot } from "@/lib/litegraph/src/node/NodeOutputSlot" +import { isSubgraphInput, isSubgraphOutput } from "@/lib/litegraph/src/subgraph/subgraphUtils" import { createTestSubgraph, createTestSubgraphNode } from "./fixtures/subgraphHelpers" diff --git a/src/lib/litegraph/test/subgraph/SubgraphSlotVisualFeedback.test.ts b/src/lib/litegraph/test/subgraph/SubgraphSlotVisualFeedback.test.ts index 2871edacd5..86b267f26c 100644 --- a/src/lib/litegraph/test/subgraph/SubgraphSlotVisualFeedback.test.ts +++ b/src/lib/litegraph/test/subgraph/SubgraphSlotVisualFeedback.test.ts @@ -1,6 +1,6 @@ import { beforeEach, describe, expect, it, vi } from "vitest" -import { LGraphNode } from "@/litegraph" +import { LGraphNode } from "@/lib/litegraph/src/litegraph" import { createTestSubgraph } from "./fixtures/subgraphHelpers" diff --git a/src/lib/litegraph/test/subgraph/SubgraphWidgetPromotion.test.ts b/src/lib/litegraph/test/subgraph/SubgraphWidgetPromotion.test.ts index 5af4e36be3..fdd275e92c 100644 --- a/src/lib/litegraph/test/subgraph/SubgraphWidgetPromotion.test.ts +++ b/src/lib/litegraph/test/subgraph/SubgraphWidgetPromotion.test.ts @@ -1,10 +1,10 @@ -import type { ISlotType } from "@/interfaces" -import type { TWidgetType } from "@/types/widgets" +import type { ISlotType } from "@/lib/litegraph/src/interfaces" +import type { TWidgetType } from "@/lib/litegraph/src/types/widgets" import { describe, expect, it } from "vitest" -import { LGraphNode, Subgraph } from "@/litegraph" -import { BaseWidget } from "@/widgets/BaseWidget" +import { LGraphNode, Subgraph } from "@/lib/litegraph/src/litegraph" +import { BaseWidget } from "@/lib/litegraph/src/widgets/BaseWidget" import { createEventCapture, createTestSubgraph, createTestSubgraphNode } from "./fixtures/subgraphHelpers" diff --git a/src/lib/litegraph/test/subgraph/fixtures/subgraphFixtures.ts b/src/lib/litegraph/test/subgraph/fixtures/subgraphFixtures.ts index b91772fa11..fd53bb204e 100644 --- a/src/lib/litegraph/test/subgraph/fixtures/subgraphFixtures.ts +++ b/src/lib/litegraph/test/subgraph/fixtures/subgraphFixtures.ts @@ -6,8 +6,8 @@ * setup for different testing scenarios. */ -import { LGraph, Subgraph } from "@/litegraph" -import { SubgraphNode } from "@/subgraph/SubgraphNode" +import { LGraph, Subgraph } from "@/lib/litegraph/src/litegraph" +import { SubgraphNode } from "@/lib/litegraph/src/subgraph/SubgraphNode" import { test } from "../../testExtensions" import { diff --git a/src/lib/litegraph/test/subgraph/fixtures/subgraphHelpers.ts b/src/lib/litegraph/test/subgraph/fixtures/subgraphHelpers.ts index 69c5d3ec8f..5b47184385 100644 --- a/src/lib/litegraph/test/subgraph/fixtures/subgraphHelpers.ts +++ b/src/lib/litegraph/test/subgraph/fixtures/subgraphHelpers.ts @@ -6,15 +6,15 @@ * verify their behavior. */ -import type { ISlotType, NodeId } from "@/litegraph" -import type { ExportedSubgraph, ExportedSubgraphInstance } from "@/types/serialisation" -import type { UUID } from "@/utils/uuid" +import type { ISlotType, NodeId } from "@/lib/litegraph/src/litegraph" +import type { ExportedSubgraph, ExportedSubgraphInstance } from "@/lib/litegraph/src/types/serialisation" +import type { UUID } from "@/lib/litegraph/src/utils/uuid" import { expect } from "vitest" -import { LGraph, LGraphNode, Subgraph } from "@/litegraph" -import { SubgraphNode } from "@/subgraph/SubgraphNode" -import { createUuidv4 } from "@/utils/uuid" +import { LGraph, LGraphNode, Subgraph } from "@/lib/litegraph/src/litegraph" +import { SubgraphNode } from "@/lib/litegraph/src/subgraph/SubgraphNode" +import { createUuidv4 } from "@/lib/litegraph/src/utils/uuid" export interface TestSubgraphOptions { id?: UUID diff --git a/src/lib/litegraph/test/subgraph/subgraphUtils.test.ts b/src/lib/litegraph/test/subgraph/subgraphUtils.test.ts index e8175faecf..56c45bc5a3 100644 --- a/src/lib/litegraph/test/subgraph/subgraphUtils.test.ts +++ b/src/lib/litegraph/test/subgraph/subgraphUtils.test.ts @@ -1,12 +1,12 @@ -import type { UUID } from "@/utils/uuid" +import type { UUID } from "@/lib/litegraph/src/utils/uuid" import { describe, expect, it } from "vitest" -import { LGraph } from "@/litegraph" +import { LGraph } from "@/lib/litegraph/src/litegraph" import { findUsedSubgraphIds, getDirectSubgraphIds, -} from "@/subgraph/subgraphUtils" +} from "@/lib/litegraph/src/subgraph/subgraphUtils" import { createTestSubgraph, createTestSubgraphNode } from "./fixtures/subgraphHelpers" diff --git a/src/lib/litegraph/test/testExtensions.ts b/src/lib/litegraph/test/testExtensions.ts index 49e238d60d..7e6d59d400 100644 --- a/src/lib/litegraph/test/testExtensions.ts +++ b/src/lib/litegraph/test/testExtensions.ts @@ -2,8 +2,8 @@ import type { ISerialisedGraph, SerialisableGraph } from "../src/types/serialisa import { test as baseTest } from "vitest" -import { LGraph } from "@/LGraph" -import { LiteGraph } from "@/litegraph" +import { LGraph } from "@/lib/litegraph/src/LGraph" +import { LiteGraph } from "@/lib/litegraph/src/litegraph" import floatingBranch from "./assets/floatingBranch.json" import floatingLink from "./assets/floatingLink.json" diff --git a/src/lib/litegraph/test/utils/spaceDistribution.test.ts b/src/lib/litegraph/test/utils/spaceDistribution.test.ts index 312b63fbf6..47b3b0a686 100644 --- a/src/lib/litegraph/test/utils/spaceDistribution.test.ts +++ b/src/lib/litegraph/test/utils/spaceDistribution.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from "vitest" -import { distributeSpace, type SpaceRequest } from "@/utils/spaceDistribution" +import { distributeSpace, type SpaceRequest } from "@/lib/litegraph/src/utils/spaceDistribution" describe("distributeSpace", () => { it("should distribute space according to minimum sizes when space is limited", () => { diff --git a/src/lib/litegraph/test/utils/textUtils.test.ts b/src/lib/litegraph/test/utils/textUtils.test.ts index da3db053dd..2081c2f6f1 100644 --- a/src/lib/litegraph/test/utils/textUtils.test.ts +++ b/src/lib/litegraph/test/utils/textUtils.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it, vi } from "vitest" -import { truncateText } from "@/utils/textUtils" +import { truncateText } from "@/lib/litegraph/src/utils/textUtils" describe("truncateText", () => { const createMockContext = (charWidth: number = 10) => { diff --git a/src/lib/litegraph/test/utils/widget.test.ts b/src/lib/litegraph/test/utils/widget.test.ts index 9851980e7e..1eaedabb00 100644 --- a/src/lib/litegraph/test/utils/widget.test.ts +++ b/src/lib/litegraph/test/utils/widget.test.ts @@ -1,8 +1,8 @@ -import type { IWidgetOptions } from "@/types/widgets" +import type { IWidgetOptions } from "@/lib/litegraph/src/types/widgets" import { describe, expect, test } from "vitest" -import { getWidgetStep } from "@/utils/widget" +import { getWidgetStep } from "@/lib/litegraph/src/utils/widget" describe("getWidgetStep", () => { test("should return step2 when available", () => {