@comfyorg/comfyui-frontend-types 1.37.4 → 1.37.5

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.
Files changed (2) hide show
  1. package/index.d.ts +20 -17
  2. 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[]> {
@@ -3819,7 +3822,7 @@ export declare class ComfyApp {
3819
3822
  * @param options
3820
3823
  */
3821
3824
  constructor(canvas: HTMLCanvasElement, graph: LGraph, options?: LGraphCanvas['options']);
3822
- static onGroupAdd(info: unknown, entry: unknown, mouse_event: MouseEvent): void;
3825
+ static onGroupAdd(_info: unknown, _entry: unknown, mouse_event: MouseEvent): void;
3823
3826
  /**
3824
3827
  * @deprecated Functionality moved to {@link getBoundaryNodes}. The new function returns null on failure, instead of an object with all null properties.
3825
3828
  * Determines the furthest nodes in each direction
@@ -3834,32 +3837,32 @@ export declare class ComfyApp {
3834
3837
  * @param align_to Node to align to (if null, align to the furthest node in the given direction)
3835
3838
  */
3836
3839
  static alignNodes(nodes: Dictionary<LGraphNode>, direction: Direction, align_to?: LGraphNode): void;
3837
- static onNodeAlign(value: IContextMenuValue, options: IContextMenuOptions, event: MouseEvent, prev_menu: ContextMenu<string>, node: LGraphNode): void;
3838
- static onGroupAlign(value: IContextMenuValue, options: IContextMenuOptions, event: MouseEvent, prev_menu: ContextMenu<string>): void;
3839
- static createDistributeMenu(value: IContextMenuValue, options: IContextMenuOptions, event: MouseEvent, prev_menu: ContextMenu<string>): void;
3840
- static onMenuAdd(value: unknown, options: unknown, e: MouseEvent, prev_menu?: ContextMenu<string>, callback?: (node: LGraphNode | null) => void): boolean | undefined;
3840
+ static onNodeAlign(_value: IContextMenuValue, _options: IContextMenuOptions, event: MouseEvent, prev_menu: ContextMenu<string>, node: LGraphNode): void;
3841
+ static onGroupAlign(_value: IContextMenuValue, _options: IContextMenuOptions, event: MouseEvent, prev_menu: ContextMenu<string>): void;
3842
+ static createDistributeMenu(_value: IContextMenuValue, _options: IContextMenuOptions, event: MouseEvent, prev_menu: ContextMenu<string>): void;
3843
+ static onMenuAdd(_value: unknown, _options: unknown, e: MouseEvent, prev_menu?: ContextMenu<string>, callback?: (node: LGraphNode | null) => void): boolean | undefined;
3841
3844
  static onMenuCollapseAll(): void;
3842
3845
  static onMenuNodeEdit(): void;
3843
3846
  /** @param _options Parameter is never used */
3844
- static showMenuNodeOptionalOutputs(v: unknown,
3847
+ static showMenuNodeOptionalOutputs(_v: unknown,
3845
3848
  /** Unused - immediately overwritten */
3846
3849
  _options: INodeOutputSlot[], e: MouseEvent, prev_menu: ContextMenu<INodeSlotContextItem>, node: LGraphNode): boolean | undefined;
3847
3850
  /** @param value Parameter is never used */
3848
- static onShowMenuNodeProperties(value: NodeProperty | undefined, options: unknown, e: MouseEvent, prev_menu: ContextMenu<string>, node: LGraphNode): boolean | undefined;
3851
+ static onShowMenuNodeProperties(value: NodeProperty | undefined, _options: unknown, e: MouseEvent, prev_menu: ContextMenu<string>, node: LGraphNode): boolean | undefined;
3849
3852
  /** @deprecated */
3850
3853
  static decodeHTML(str: string): string;
3851
- static onMenuResizeNode(value: IContextMenuValue, options: IContextMenuOptions, e: MouseEvent, menu: ContextMenu, node: LGraphNode): void;
3854
+ static onMenuResizeNode(_value: IContextMenuValue, _options: IContextMenuOptions, _e: MouseEvent, _menu: ContextMenu, node: LGraphNode): void;
3852
3855
  static onShowPropertyEditor(item: {
3853
3856
  property: keyof LGraphNode;
3854
3857
  type: string;
3855
- }, options: IContextMenuOptions<string>, e: MouseEvent, menu: ContextMenu<string>, node: LGraphNode): void;
3858
+ }, _options: IContextMenuOptions<string>, e: MouseEvent, _menu: ContextMenu<string>, node: LGraphNode): void;
3856
3859
  static getPropertyPrintableValue(value: unknown, values: unknown[] | object | undefined): string | undefined;
3857
- static onMenuNodeCollapse(value: IContextMenuValue, options: IContextMenuOptions, e: MouseEvent, menu: ContextMenu, node: LGraphNode): void;
3858
- static onMenuToggleAdvanced(value: IContextMenuValue, options: IContextMenuOptions, e: MouseEvent, menu: ContextMenu, node: LGraphNode): void;
3859
- static onMenuNodeMode(value: IContextMenuValue, options: IContextMenuOptions, e: MouseEvent, menu: ContextMenu, node: LGraphNode): boolean;
3860
+ static onMenuNodeCollapse(_value: IContextMenuValue, _options: IContextMenuOptions, _e: MouseEvent, _menu: ContextMenu, node: LGraphNode): void;
3861
+ static onMenuToggleAdvanced(_value: IContextMenuValue, _options: IContextMenuOptions, _e: MouseEvent, _menu: ContextMenu, node: LGraphNode): void;
3862
+ static onMenuNodeMode(_value: IContextMenuValue, _options: IContextMenuOptions, e: MouseEvent, menu: ContextMenu, node: LGraphNode): boolean;
3860
3863
  /** @param value Parameter is never used */
3861
- static onMenuNodeColors(value: IContextMenuValue<string | null>, options: IContextMenuOptions, e: MouseEvent, menu: ContextMenu<string | null>, node: LGraphNode): boolean;
3862
- 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;
3864
+ static onMenuNodeColors(value: IContextMenuValue<string | null>, _options: IContextMenuOptions, e: MouseEvent, menu: ContextMenu<string | null>, node: LGraphNode): boolean;
3865
+ 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
3866
  static onMenuNodeRemove(): void;
3864
3867
  static onMenuNodeClone(_value: IContextMenuValue, _options: IContextMenuOptions, _e: MouseEvent, _menu: ContextMenu, node: LGraphNode): void;
3865
3868
  static cloneNodes(nodes: Positionable[]): ClipboardPasteResult | undefined;
@@ -4063,7 +4066,7 @@ export declare class ComfyApp {
4063
4066
  /**
4064
4067
  * converts a coordinate from graph coordinates to canvas2D coordinates
4065
4068
  */
4066
- convertOffsetToCanvas(pos: Point, out: Point): Point;
4069
+ convertOffsetToCanvas(pos: Point, _out?: Point): Point;
4067
4070
  /**
4068
4071
  * converts a coordinate from Canvas2D coordinates to graph space
4069
4072
  */
@@ -4182,7 +4185,7 @@ export declare class ComfyApp {
4182
4185
  /**
4183
4186
  * draws every group area in the background
4184
4187
  */
4185
- drawGroups(canvas: HTMLCanvasElement, ctx: CanvasRenderingContext2D): void;
4188
+ drawGroups(_canvas: HTMLCanvasElement, ctx: CanvasRenderingContext2D): void;
4186
4189
  /**
4187
4190
  * resizes the canvas to a given size, if no size is passed, then it tries to fill the parentNode
4188
4191
  * @todo Remove or rewrite
@@ -4698,7 +4701,7 @@ export declare class ComfyApp {
4698
4701
  onNodeInputAdd?(this: LGraphNode, value: unknown): void;
4699
4702
  onMenuNodeInputs?(this: LGraphNode, entries: (IContextMenuValue<INodeSlotContextItem> | null)[]): (IContextMenuValue<INodeSlotContextItem> | null)[];
4700
4703
  onMenuNodeOutputs?(this: LGraphNode, entries: (IContextMenuValue<INodeSlotContextItem> | null)[]): (IContextMenuValue<INodeSlotContextItem> | null)[];
4701
- onMouseUp?(this: LGraphNode, e: CanvasPointerEvent, pos: Point): void;
4704
+ onMouseUp?(this: LGraphNode, e: CanvasPointerEvent, pos: Point, canvas: LGraphCanvas): void;
4702
4705
  onMouseEnter?(this: LGraphNode, e: CanvasPointerEvent): void;
4703
4706
  /** Blocks drag if return value is truthy. @param pos Offset from {@link LGraphNode.pos}. */
4704
4707
  onMouseDown?(this: LGraphNode, e: CanvasPointerEvent, pos: Point, canvas: LGraphCanvas): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comfyorg/comfyui-frontend-types",
3
- "version": "1.37.4",
3
+ "version": "1.37.5",
4
4
  "types": "./index.d.ts",
5
5
  "files": [
6
6
  "index.d.ts"