@comfyorg/comfyui-frontend-types 1.37.5 → 1.37.7

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 +13 -7
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -285,7 +285,7 @@ declare abstract class BaseWidget<TWidget extends IBaseWidget = IBaseWidget> imp
285
285
  promoted?: boolean;
286
286
  tooltip?: string;
287
287
  element?: HTMLElement;
288
- callback?(value: any, canvas?: LGraphCanvas, node?: LGraphNode, pos?: Point, e?: CanvasPointerEvent): void;
288
+ callback?(value: TWidget['value'], canvas?: LGraphCanvas, node?: LGraphNode, pos?: Point, e?: CanvasPointerEvent): void;
289
289
  mouse?(event: CanvasPointerEvent, pointerOffset: Point, node: LGraphNode): boolean;
290
290
  computeSize?(width?: number): Size;
291
291
  onPointerDown?(pointer: CanvasPointer, node: LGraphNode, canvas: LGraphCanvas): boolean;
@@ -2370,7 +2370,7 @@ export declare class ComfyApp {
2370
2370
  */
2371
2371
  promoted?: boolean;
2372
2372
  tooltip?: string;
2373
- callback?(value: any, canvas?: LGraphCanvas, node?: LGraphNode, pos?: Point, e?: CanvasPointerEvent): void;
2373
+ callback?(value: unknown, canvas?: LGraphCanvas, node?: LGraphNode, pos?: Point, e?: CanvasPointerEvent): void;
2374
2374
  /**
2375
2375
  * Simple callback for pointer events, allowing custom widgets to events relevant to them.
2376
2376
  * @param event The pointer event that triggered this callback
@@ -3065,6 +3065,8 @@ export declare class ComfyApp {
3065
3065
  socketless?: boolean;
3066
3066
  /** If `true`, the widget will not be rendered by the Vue renderer. */
3067
3067
  canvasOnly?: boolean;
3068
+ /** Used as a temporary override for determining the asset type in vue mode*/
3069
+ nodeType?: string;
3068
3070
  values?: TValues;
3069
3071
  /** Optional function to format values for display (e.g., hash → human-readable name) */
3070
3072
  getOptionLabel?: (value?: string | null) => string;
@@ -5301,7 +5303,7 @@ export declare class ComfyApp {
5301
5303
  size?: Size;
5302
5304
  min_height?: number;
5303
5305
  slot_start_y?: number;
5304
- widgets_info?: any;
5306
+ widgets_info?: Record<string, unknown>;
5305
5307
  collapsable?: boolean;
5306
5308
  color?: string;
5307
5309
  bgcolor?: string;
@@ -5334,7 +5336,7 @@ export declare class ComfyApp {
5334
5336
  * Custom toJSON method for JSON.stringify
5335
5337
  * Returns undefined to exclude from serialization since we only use defaults
5336
5338
  */
5337
- toJSON(): any;
5339
+ toJSON(): undefined;
5338
5340
  }
5339
5341
 
5340
5342
  declare interface LGraphState {
@@ -5655,7 +5657,7 @@ export declare class ComfyApp {
5655
5657
  DEFAULT_FONT: string;
5656
5658
  DEFAULT_SHADOW_COLOR: string;
5657
5659
  DEFAULT_GROUP_FONT: number;
5658
- DEFAULT_GROUP_FONT_SIZE?: any;
5660
+ DEFAULT_GROUP_FONT_SIZE: number;
5659
5661
  GROUP_FONT: string;
5660
5662
  WIDGET_BGCOLOR: string;
5661
5663
  WIDGET_OUTLINE_COLOR: string;
@@ -5966,7 +5968,7 @@ export declare class ComfyApp {
5966
5968
  * @returns true if they can be connected
5967
5969
  */
5968
5970
  isValidConnection(type_a: ISlotType, type_b: ISlotType): boolean;
5969
- getParameterNames(func: (...args: any) => any): string[];
5971
+ getParameterNames(func: (...args: unknown[]) => unknown): string[];
5970
5972
  pointerListenerAdd(oDOM: Node, sEvIn: string, fCall: (e: Event) => boolean | void, capture?: boolean): void;
5971
5973
  pointerListenerRemove(oDOM: Node, sEvent: string, fCall: (e: Event) => boolean | void, capture?: boolean): void;
5972
5974
  getTime(): number;
@@ -5979,7 +5981,11 @@ export declare class ComfyApp {
5979
5981
  hex2num(hex: string): number[];
5980
5982
  num2hex(triplet: number[]): string;
5981
5983
  closeAllContextMenus(ref_window?: Window): void;
5982
- extendClass(target: any, origin: any): void;
5984
+ extendClass(target: Record<string, unknown> & {
5985
+ prototype?: object;
5986
+ }, origin: Record<string, unknown> & {
5987
+ prototype?: object;
5988
+ }): void;
5983
5989
  }
5984
5990
 
5985
5991
  declare class LitegraphLinkAdapter {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comfyorg/comfyui-frontend-types",
3
- "version": "1.37.5",
3
+ "version": "1.37.7",
4
4
  "types": "./index.d.ts",
5
5
  "files": [
6
6
  "index.d.ts"