Inplace widget to input conversion (#2588)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Chenlei Hu
2025-02-16 13:41:32 -05:00
committed by GitHub
parent 44498739fc
commit 3f4d11c63a
13 changed files with 45 additions and 19 deletions

View File

@@ -1,5 +1,5 @@
import '@comfyorg/litegraph'
import type { LLink } from '@comfyorg/litegraph'
import type { LLink, Size } from '@comfyorg/litegraph'
import type { DOMWidget } from '@/scripts/domWidget'
import type { ComfyNodeDef } from '@/types/apiTypes'
@@ -17,13 +17,26 @@ declare module '@comfyorg/litegraph/dist/types/widgets' {
onRemove?: () => void
beforeQueued?: () => unknown
afterQueued?: () => unknown
serializeValue?: (node: LGraphNode, index: number) => Promise<unknown>
serializeValue?: (
node: LGraphNode,
index: number
) => Promise<unknown> | unknown
/**
* If the widget supports dynamic prompts, this will be set to true.
* See extensions/core/dynamicPrompts.ts
*/
dynamicPrompts?: boolean
/**
* Widget conversion fields
*/
origType?: string
origComputeSize?: (width: number) => Size
origSerializeValue?: (
node: LGraphNode,
index: number
) => Promise<unknown> | unknown
}
}