Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/graph/GraphCanvas.vue
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ import type {
NodeState,
VueNodeData
} from '@/composables/graph/useGraphNodeManager'
import { useLayout } from '@/composables/graph/useLayout'
import { useLayoutSync } from '@/composables/graph/useLayoutSync'
import { useNodeBadge } from '@/composables/node/useNodeBadge'
import { useCanvasDrop } from '@/composables/useCanvasDrop'
import { useContextMenuTranslation } from '@/composables/useContextMenuTranslation'
Expand All @@ -149,6 +147,9 @@ import { useWorkflowPersistence } from '@/composables/useWorkflowPersistence'
import { CORE_SETTINGS } from '@/constants/coreSettings'
import { i18n, t } from '@/i18n'
import type { LGraphCanvas, LGraphNode } from '@/lib/litegraph/src/litegraph'
import { layoutStore } from '@/renderer/core/layout/store/LayoutStore'
import { useLayout } from '@/renderer/core/layout/sync/useLayout'
import { useLayoutSync } from '@/renderer/core/layout/sync/useLayoutSync'
import { UnauthorizedError, api } from '@/scripts/api'
import { app as comfyApp } from '@/scripts/app'
import { ChangeTracker } from '@/scripts/changeTracker'
Expand All @@ -159,7 +160,6 @@ import { useWorkflowService } from '@/services/workflowService'
import { useCommandStore } from '@/stores/commandStore'
import { useExecutionStore } from '@/stores/executionStore'
import { useCanvasStore } from '@/stores/graphStore'
import { layoutStore } from '@/stores/layoutStore'
import { useNodeDefStore } from '@/stores/nodeDefStore'
import { useSettingStore } from '@/stores/settingStore'
import { useToastStore } from '@/stores/toastStore'
Expand Down
2 changes: 1 addition & 1 deletion src/components/graph/vueNodes/LGraphNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ import { computed, onErrorCaptured, ref, toRef, watch } from 'vue'
// Import the VueNodeData type
import type { VueNodeData } from '@/composables/graph/useGraphNodeManager'
import { LODLevel, useLOD } from '@/composables/graph/useLOD'
import { useNodeLayout } from '@/composables/graph/useNodeLayout'
import { useErrorHandling } from '@/composables/useErrorHandling'
import { useNodeLayout } from '@/renderer/extensions/vue-nodes/composables/useNodeLayout'

import { LiteGraph } from '../../../lib/litegraph/src/litegraph'
import NodeContent from './NodeContent.vue'
Expand Down
2 changes: 1 addition & 1 deletion src/composables/graph/useGraphNodeManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
import { nextTick, reactive, readonly } from 'vue'

import { layoutMutations } from '@/services/layoutMutations'
import { layoutMutations } from '@/renderer/core/layout/operations/LayoutMutations'
import type { WidgetValue } from '@/types/simplifiedWidget'
import type { SpatialIndexDebugInfo } from '@/types/spatialIndex'

Expand Down
2 changes: 1 addition & 1 deletion src/composables/graph/useNodeChangeDetection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { reactive } from 'vue'

import type { LGraph, LGraphNode } from '@/lib/litegraph/src/litegraph'
import { layoutMutations } from '@/services/layoutMutations'
import { layoutMutations } from '@/renderer/core/layout/operations/LayoutMutations'

export interface ChangeDetectionMetrics {
updateTime: number
Expand Down
2 changes: 1 addition & 1 deletion src/composables/graph/useNodeState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
*/
import { nextTick, reactive, readonly } from 'vue'

import { PERFORMANCE_CONFIG } from '@/constants/layout'
import type { LGraphNode } from '@/lib/litegraph/src/litegraph'
import { PERFORMANCE_CONFIG } from '@/renderer/core/layout/constants'

import type { SafeWidgetData, VueNodeData, WidgetValue } from './useNodeWidgets'

Expand Down
2 changes: 1 addition & 1 deletion src/lib/litegraph/src/LGraphCanvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { LinkConnector } from '@/lib/litegraph/src/canvas/LinkConnector'
import {
type LinkRenderContext,
LitegraphLinkAdapter
} from '@/rendering/adapters/LitegraphLinkAdapter'
} from '@/renderer/core/canvas/litegraph/LitegraphLinkAdapter'

import { CanvasPointer } from './CanvasPointer'
import type { ContextMenu } from './ContextMenu'
Expand Down
2 changes: 1 addition & 1 deletion src/lib/litegraph/src/LGraphNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
calculateInputSlotPos,
calculateInputSlotPosFromSlot,
calculateOutputSlotPos
} from '@/utils/slotCalculations'
} from '@/renderer/core/canvas/litegraph/SlotCalculations'

import type { DragAndScale } from './DragAndScale'
import type { LGraph } from './LGraph'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ import {
type RenderContext as PathRenderContext,
type Point,
type RenderMode
} from '@/rendering/canvas/PathRenderer'
import { layoutStore } from '@/stores/layoutStore'
} from '@/renderer/core/canvas/PathRenderer'
import {
type SlotPositionContext,
calculateInputSlotPos,
calculateOutputSlotPos
} from '@/utils/slotCalculations'
} from '@/renderer/core/canvas/litegraph/SlotCalculations'
import { layoutStore } from '@/renderer/core/layout/store/LayoutStore'

export interface LinkRenderContext {
// Canvas settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
*
* Simple in-memory implementation for testing without CRDT overhead.
*/
import type { LayoutOperation } from '@/types/layoutOperations'
import type { NodeId, NodeLayout } from '@/types/layoutTypes'
import type { LayoutOperation } from '@/renderer/core/layout/types'
import type { NodeId, NodeLayout } from '@/renderer/core/layout/types'

import type { AdapterChange, LayoutAdapter } from './layoutAdapter'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
*/
import * as Y from 'yjs'

import type { LayoutOperation } from '@/types/layoutOperations'
import type { Bounds, NodeId, NodeLayout, Point } from '@/types/layoutTypes'
import type { LayoutOperation } from '@/renderer/core/layout/types'
import type {
Bounds,
NodeId,
NodeLayout,
Point
} from '@/renderer/core/layout/types'

import type { AdapterChange, LayoutAdapter } from './layoutAdapter'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* Abstracts the underlying CRDT implementation to allow for different
* backends (Yjs, Automerge, etc.) and easier testing.
*/
import type { LayoutOperation } from '@/types/layoutOperations'
import type { NodeId, NodeLayout } from '@/types/layoutTypes'
import type { LayoutOperation } from '@/renderer/core/layout/types'
import type { NodeId, NodeLayout } from '@/renderer/core/layout/types'

/**
* Change event emitted by the adapter
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
* Provides a clean API for layout operations that are CRDT-ready.
* Operations are synchronous and applied directly to the store.
*/
import { layoutStore } from '@/stores/layoutStore'
import { layoutStore } from '@/renderer/core/layout/store/LayoutStore'
import type {
LayoutMutations,
NodeId,
NodeLayout,
Point,
Size
} from '@/types/layoutTypes'
} from '@/renderer/core/layout/types'

class LayoutMutationsImpl implements LayoutMutations {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ import log from 'loglevel'
import { type ComputedRef, type Ref, computed, customRef } from 'vue'
import * as Y from 'yjs'

import { ACTOR_CONFIG, DEBUG_CONFIG } from '@/constants/layout'
import { SpatialIndexManager } from '@/services/spatialIndexManager'
import { ACTOR_CONFIG, DEBUG_CONFIG } from '@/renderer/core/layout/constants'
import type {
CreateNodeOperation,
DeleteNodeOperation,
LayoutOperation,
MoveNodeOperation,
ResizeNodeOperation,
SetNodeZIndexOperation
} from '@/types/layoutOperations'
} from '@/renderer/core/layout/types'
import type {
Bounds,
LayoutChange,
LayoutStore,
NodeId,
NodeLayout,
Point
} from '@/types/layoutTypes'
} from '@/renderer/core/layout/types'
import { SpatialIndexManager } from '@/renderer/core/spatial/SpatialIndex'

// Create logger for layout store
const logger = log.getLogger(DEBUG_CONFIG.STORE_LOGGER_NAME)
Expand Down Expand Up @@ -662,4 +662,4 @@ class LayoutStoreImpl implements LayoutStore {
export const layoutStore = new LayoutStoreImpl()

// Export types for convenience
export type { LayoutStore } from '@/types/layoutTypes'
export type { LayoutStore } from '@/renderer/core/layout/types'
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*
* Provides unified access to the layout store and mutation API.
*/
import { layoutMutations } from '@/services/layoutMutations'
import { layoutStore } from '@/stores/layoutStore'
import type { Bounds, NodeId, Point } from '@/types/layoutTypes'
import { layoutMutations } from '@/renderer/core/layout/operations/LayoutMutations'
import { layoutStore } from '@/renderer/core/layout/store/LayoutStore'
import type { Bounds, NodeId, Point } from '@/renderer/core/layout/types'

/**
* Main composable for accessing the layout system
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import log from 'loglevel'
import { onUnmounted } from 'vue'

import { layoutStore } from '@/stores/layoutStore'
import { layoutStore } from '@/renderer/core/layout/store/LayoutStore'

// Create a logger for layout debugging
const logger = log.getLogger('layout')
Expand Down
Loading
Loading