@comfyorg/comfyui-frontend-types 1.37.4 → 1.37.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +22 -17
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -2128,6 +2128,8 @@ export declare class ComfyApp {
|
|
|
2128
2128
|
* @see {@link ExportedSubgraph.subgraphs}
|
|
2129
2129
|
*/
|
|
2130
2130
|
type: UUID;
|
|
2131
|
+
/** Custom properties for this subgraph instance */
|
|
2132
|
+
properties?: Dictionary<NodeProperty | undefined>;
|
|
2131
2133
|
}
|
|
2132
2134
|
|
|
2133
2135
|
declare interface ExportedSubgraphIONode {
|
|
@@ -3037,6 +3039,7 @@ export declare class ComfyApp {
|
|
|
3037
3039
|
*/
|
|
3038
3040
|
declare interface IWidgetLocator {
|
|
3039
3041
|
name: string;
|
|
3042
|
+
type?: string;
|
|
3040
3043
|
}
|
|
3041
3044
|
|
|
3042
3045
|
declare interface IWidgetOptions<TValues = unknown[]> {
|
|
@@ -3062,6 +3065,8 @@ export declare class ComfyApp {
|
|
|
3062
3065
|
socketless?: boolean;
|
|
3063
3066
|
/** If `true`, the widget will not be rendered by the Vue renderer. */
|
|
3064
3067
|
canvasOnly?: boolean;
|
|
3068
|
+
/** Used as a temporary override for determining the asset type in vue mode*/
|
|
3069
|
+
nodeType?: string;
|
|
3065
3070
|
values?: TValues;
|
|
3066
3071
|
/** Optional function to format values for display (e.g., hash → human-readable name) */
|
|
3067
3072
|
getOptionLabel?: (value?: string | null) => string;
|
|
@@ -3819,7 +3824,7 @@ export declare class ComfyApp {
|
|
|
3819
3824
|
* @param options
|
|
3820
3825
|
*/
|
|
3821
3826
|
constructor(canvas: HTMLCanvasElement, graph: LGraph, options?: LGraphCanvas['options']);
|
|
3822
|
-
static onGroupAdd(
|
|
3827
|
+
static onGroupAdd(_info: unknown, _entry: unknown, mouse_event: MouseEvent): void;
|
|
3823
3828
|
/**
|
|
3824
3829
|
* @deprecated Functionality moved to {@link getBoundaryNodes}. The new function returns null on failure, instead of an object with all null properties.
|
|
3825
3830
|
* Determines the furthest nodes in each direction
|
|
@@ -3834,32 +3839,32 @@ export declare class ComfyApp {
|
|
|
3834
3839
|
* @param align_to Node to align to (if null, align to the furthest node in the given direction)
|
|
3835
3840
|
*/
|
|
3836
3841
|
static alignNodes(nodes: Dictionary<LGraphNode>, direction: Direction, align_to?: LGraphNode): void;
|
|
3837
|
-
static onNodeAlign(
|
|
3838
|
-
static onGroupAlign(
|
|
3839
|
-
static createDistributeMenu(
|
|
3840
|
-
static onMenuAdd(
|
|
3842
|
+
static onNodeAlign(_value: IContextMenuValue, _options: IContextMenuOptions, event: MouseEvent, prev_menu: ContextMenu<string>, node: LGraphNode): void;
|
|
3843
|
+
static onGroupAlign(_value: IContextMenuValue, _options: IContextMenuOptions, event: MouseEvent, prev_menu: ContextMenu<string>): void;
|
|
3844
|
+
static createDistributeMenu(_value: IContextMenuValue, _options: IContextMenuOptions, event: MouseEvent, prev_menu: ContextMenu<string>): void;
|
|
3845
|
+
static onMenuAdd(_value: unknown, _options: unknown, e: MouseEvent, prev_menu?: ContextMenu<string>, callback?: (node: LGraphNode | null) => void): boolean | undefined;
|
|
3841
3846
|
static onMenuCollapseAll(): void;
|
|
3842
3847
|
static onMenuNodeEdit(): void;
|
|
3843
3848
|
/** @param _options Parameter is never used */
|
|
3844
|
-
static showMenuNodeOptionalOutputs(
|
|
3849
|
+
static showMenuNodeOptionalOutputs(_v: unknown,
|
|
3845
3850
|
/** Unused - immediately overwritten */
|
|
3846
3851
|
_options: INodeOutputSlot[], e: MouseEvent, prev_menu: ContextMenu<INodeSlotContextItem>, node: LGraphNode): boolean | undefined;
|
|
3847
3852
|
/** @param value Parameter is never used */
|
|
3848
|
-
static onShowMenuNodeProperties(value: NodeProperty | undefined,
|
|
3853
|
+
static onShowMenuNodeProperties(value: NodeProperty | undefined, _options: unknown, e: MouseEvent, prev_menu: ContextMenu<string>, node: LGraphNode): boolean | undefined;
|
|
3849
3854
|
/** @deprecated */
|
|
3850
3855
|
static decodeHTML(str: string): string;
|
|
3851
|
-
static onMenuResizeNode(
|
|
3856
|
+
static onMenuResizeNode(_value: IContextMenuValue, _options: IContextMenuOptions, _e: MouseEvent, _menu: ContextMenu, node: LGraphNode): void;
|
|
3852
3857
|
static onShowPropertyEditor(item: {
|
|
3853
3858
|
property: keyof LGraphNode;
|
|
3854
3859
|
type: string;
|
|
3855
|
-
},
|
|
3860
|
+
}, _options: IContextMenuOptions<string>, e: MouseEvent, _menu: ContextMenu<string>, node: LGraphNode): void;
|
|
3856
3861
|
static getPropertyPrintableValue(value: unknown, values: unknown[] | object | undefined): string | undefined;
|
|
3857
|
-
static onMenuNodeCollapse(
|
|
3858
|
-
static onMenuToggleAdvanced(
|
|
3859
|
-
static onMenuNodeMode(
|
|
3862
|
+
static onMenuNodeCollapse(_value: IContextMenuValue, _options: IContextMenuOptions, _e: MouseEvent, _menu: ContextMenu, node: LGraphNode): void;
|
|
3863
|
+
static onMenuToggleAdvanced(_value: IContextMenuValue, _options: IContextMenuOptions, _e: MouseEvent, _menu: ContextMenu, node: LGraphNode): void;
|
|
3864
|
+
static onMenuNodeMode(_value: IContextMenuValue, _options: IContextMenuOptions, e: MouseEvent, menu: ContextMenu, node: LGraphNode): boolean;
|
|
3860
3865
|
/** @param value Parameter is never used */
|
|
3861
|
-
static onMenuNodeColors(value: IContextMenuValue<string | null>,
|
|
3862
|
-
static onMenuNodeShapes(
|
|
3866
|
+
static onMenuNodeColors(value: IContextMenuValue<string | null>, _options: IContextMenuOptions, e: MouseEvent, menu: ContextMenu<string | null>, node: LGraphNode): boolean;
|
|
3867
|
+
static onMenuNodeShapes(_value: IContextMenuValue<(typeof LiteGraph.VALID_SHAPES)[number]>, _options: IContextMenuOptions<(typeof LiteGraph.VALID_SHAPES)[number]>, e: MouseEvent, menu?: ContextMenu<(typeof LiteGraph.VALID_SHAPES)[number]>, node?: LGraphNode): boolean;
|
|
3863
3868
|
static onMenuNodeRemove(): void;
|
|
3864
3869
|
static onMenuNodeClone(_value: IContextMenuValue, _options: IContextMenuOptions, _e: MouseEvent, _menu: ContextMenu, node: LGraphNode): void;
|
|
3865
3870
|
static cloneNodes(nodes: Positionable[]): ClipboardPasteResult | undefined;
|
|
@@ -4063,7 +4068,7 @@ export declare class ComfyApp {
|
|
|
4063
4068
|
/**
|
|
4064
4069
|
* converts a coordinate from graph coordinates to canvas2D coordinates
|
|
4065
4070
|
*/
|
|
4066
|
-
convertOffsetToCanvas(pos: Point,
|
|
4071
|
+
convertOffsetToCanvas(pos: Point, _out?: Point): Point;
|
|
4067
4072
|
/**
|
|
4068
4073
|
* converts a coordinate from Canvas2D coordinates to graph space
|
|
4069
4074
|
*/
|
|
@@ -4182,7 +4187,7 @@ export declare class ComfyApp {
|
|
|
4182
4187
|
/**
|
|
4183
4188
|
* draws every group area in the background
|
|
4184
4189
|
*/
|
|
4185
|
-
drawGroups(
|
|
4190
|
+
drawGroups(_canvas: HTMLCanvasElement, ctx: CanvasRenderingContext2D): void;
|
|
4186
4191
|
/**
|
|
4187
4192
|
* resizes the canvas to a given size, if no size is passed, then it tries to fill the parentNode
|
|
4188
4193
|
* @todo Remove or rewrite
|
|
@@ -4698,7 +4703,7 @@ export declare class ComfyApp {
|
|
|
4698
4703
|
onNodeInputAdd?(this: LGraphNode, value: unknown): void;
|
|
4699
4704
|
onMenuNodeInputs?(this: LGraphNode, entries: (IContextMenuValue<INodeSlotContextItem> | null)[]): (IContextMenuValue<INodeSlotContextItem> | null)[];
|
|
4700
4705
|
onMenuNodeOutputs?(this: LGraphNode, entries: (IContextMenuValue<INodeSlotContextItem> | null)[]): (IContextMenuValue<INodeSlotContextItem> | null)[];
|
|
4701
|
-
onMouseUp?(this: LGraphNode, e: CanvasPointerEvent, pos: Point): void;
|
|
4706
|
+
onMouseUp?(this: LGraphNode, e: CanvasPointerEvent, pos: Point, canvas: LGraphCanvas): void;
|
|
4702
4707
|
onMouseEnter?(this: LGraphNode, e: CanvasPointerEvent): void;
|
|
4703
4708
|
/** Blocks drag if return value is truthy. @param pos Offset from {@link LGraphNode.pos}. */
|
|
4704
4709
|
onMouseDown?(this: LGraphNode, e: CanvasPointerEvent, pos: Point, canvas: LGraphCanvas): boolean;
|