mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 22:37:32 +00:00
[refactor] Migrate litegraph imports from npm package to local subtree
- Updated all imports from '@comfyorg/litegraph' to '@/lib/litegraph/src/' - Replaced deep dist imports with direct source paths - Updated CSS import in main.ts - All imports now use the @ alias consistently
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import type { LGraphNode } from '@comfyorg/litegraph'
|
||||
import { Positionable } from '@comfyorg/litegraph/dist/interfaces'
|
||||
|
||||
import { Positionable } from '@/lib/litegraph/src/interfaces'
|
||||
import type { LGraphNode } from '@/lib/litegraph/src/litegraph'
|
||||
import type { ComfyWorkflowJSON } from '@/schemas/comfyWorkflowSchema'
|
||||
import type { Keybinding } from '@/schemas/keyBindingSchema'
|
||||
import type { ComfyNodeDef } from '@/schemas/nodeDefSchema'
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import type { LGraph } from '@comfyorg/litegraph'
|
||||
|
||||
import type { LGraph } from '@/lib/litegraph/src/litegraph'
|
||||
import type {
|
||||
DeviceStats,
|
||||
EmbeddingsResponse,
|
||||
|
||||
20
src/types/litegraph-augmentation.d.ts
vendored
20
src/types/litegraph-augmentation.d.ts
vendored
@@ -1,6 +1,5 @@
|
||||
import '@comfyorg/litegraph'
|
||||
import type { LLink, Size } from '@comfyorg/litegraph'
|
||||
|
||||
import '@/lib/litegraph/src/litegraph'
|
||||
import type { LLink, Size } from '@/lib/litegraph/src/litegraph'
|
||||
import type { ComfyNodeDef as ComfyNodeDefV2 } from '@/schemas/nodeDef/nodeDefSchemaV2'
|
||||
import type { ComfyNodeDef as ComfyNodeDefV1 } from '@/schemas/nodeDefSchema'
|
||||
import type { DOMWidget, DOMWidgetOptions } from '@/scripts/domWidget'
|
||||
@@ -8,7 +7,7 @@ import type { DOMWidget, DOMWidgetOptions } from '@/scripts/domWidget'
|
||||
import type { NodeId } from '../schemas/comfyWorkflowSchema'
|
||||
|
||||
/** ComfyUI extensions of litegraph */
|
||||
declare module '@comfyorg/litegraph/dist/types/widgets' {
|
||||
declare module '@/lib/litegraph/src/types/widgets' {
|
||||
interface IWidgetOptions {
|
||||
/** Currently used by DOM widgets only. Declaring here reduces complexity. */
|
||||
onHide?: (widget: DOMWidget) => void
|
||||
@@ -59,7 +58,7 @@ declare module '@comfyorg/litegraph/dist/types/widgets' {
|
||||
/**
|
||||
* ComfyUI extensions of litegraph interfaces
|
||||
*/
|
||||
declare module '@comfyorg/litegraph/dist/interfaces' {
|
||||
declare module '@/lib/litegraph/src/interfaces' {
|
||||
interface IWidgetLocator {
|
||||
[key: symbol]: unknown
|
||||
}
|
||||
@@ -68,9 +67,12 @@ declare module '@comfyorg/litegraph/dist/interfaces' {
|
||||
/**
|
||||
* ComfyUI extensions of litegraph
|
||||
*/
|
||||
declare module '@comfyorg/litegraph' {
|
||||
import type { ExecutableLGraphNode, ExecutionId } from '@comfyorg/litegraph'
|
||||
import type { IBaseWidget } from '@comfyorg/litegraph/dist/types/widgets'
|
||||
declare module '@/lib/litegraph/src/litegraph' {
|
||||
import type {
|
||||
ExecutableLGraphNode,
|
||||
ExecutionId
|
||||
} from '@/lib/litegraph/src/litegraph'
|
||||
import type { IBaseWidget } from '@/lib/litegraph/src/types/widgets'
|
||||
|
||||
interface LGraphNodeConstructor<T extends LGraphNode = LGraphNode> {
|
||||
type?: string
|
||||
@@ -197,7 +199,7 @@ declare module '@comfyorg/litegraph' {
|
||||
/**
|
||||
* Extended types for litegraph, to be merged upstream once it has stabilized.
|
||||
*/
|
||||
declare module '@comfyorg/litegraph' {
|
||||
declare module '@/lib/litegraph/src/litegraph' {
|
||||
/**
|
||||
* widgets_values is set to LGraphNode by `LGraphNode.configure`, but it is not
|
||||
* used by litegraph internally. We should remove the dependency on it later.
|
||||
|
||||
Reference in New Issue
Block a user