@comfyorg/comfyui-frontend-types 1.38.0 → 1.38.2
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 +78 -20
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -2833,9 +2833,12 @@ export declare class ComfyApp {
|
|
|
2833
2833
|
}
|
|
2834
2834
|
|
|
2835
2835
|
declare interface INodePropertyInfo {
|
|
2836
|
-
name
|
|
2836
|
+
name?: string;
|
|
2837
2837
|
type?: string;
|
|
2838
|
-
default_value
|
|
2838
|
+
default_value?: NodeProperty;
|
|
2839
|
+
widget?: string;
|
|
2840
|
+
label?: string;
|
|
2841
|
+
values?: TWidgetValue[];
|
|
2839
2842
|
}
|
|
2840
2843
|
|
|
2841
2844
|
declare interface INodeSlot extends HasBoundingRect {
|
|
@@ -3895,9 +3898,9 @@ export declare class ComfyApp {
|
|
|
3895
3898
|
_highlight_pos?: Point;
|
|
3896
3899
|
_highlight_input?: INodeInputSlot;
|
|
3897
3900
|
/** @deprecated Panels */
|
|
3898
|
-
node_panel?:
|
|
3901
|
+
node_panel?: Panel;
|
|
3899
3902
|
/** @deprecated Panels */
|
|
3900
|
-
options_panel?:
|
|
3903
|
+
options_panel?: Panel;
|
|
3901
3904
|
_bg_img?: HTMLImageElement;
|
|
3902
3905
|
_pattern?: CanvasPattern;
|
|
3903
3906
|
_pattern_img?: HTMLImageElement;
|
|
@@ -4326,7 +4329,7 @@ export declare class ComfyApp {
|
|
|
4326
4329
|
showSearchBox(event: MouseEvent | null, searchOptions?: IShowSearchOptions): HTMLDivElement;
|
|
4327
4330
|
showEditPropertyValue(node: LGraphNode, property: string, options: IDialogOptions): IDialog | undefined;
|
|
4328
4331
|
createDialog(html: string, options: IDialogOptions): IDialog;
|
|
4329
|
-
createPanel(title: string, options: ICreatePanelOptions):
|
|
4332
|
+
createPanel(title: string, options: ICreatePanelOptions): Panel;
|
|
4330
4333
|
closePanels(): void;
|
|
4331
4334
|
showShowNodePanel(node: LGraphNode): void;
|
|
4332
4335
|
checkPanels(): void;
|
|
@@ -4790,8 +4793,8 @@ export declare class ComfyApp {
|
|
|
4790
4793
|
* If an invalid index or non-number (false, null, NaN etc) is returned, the connection will be cancelled.
|
|
4791
4794
|
*/
|
|
4792
4795
|
onBeforeConnectInput?(this: LGraphNode, target_slot: number, requested_slot?: number | string): number | false | null;
|
|
4793
|
-
onShowCustomPanelInfo?(this: LGraphNode, panel:
|
|
4794
|
-
onAddPropertyToPanel?(this: LGraphNode, pName: string, panel:
|
|
4796
|
+
onShowCustomPanelInfo?(this: LGraphNode, panel: Panel): void;
|
|
4797
|
+
onAddPropertyToPanel?(this: LGraphNode, pName: string, panel: Panel): boolean;
|
|
4795
4798
|
onWidgetChanged?(this: LGraphNode, name: string, value: unknown, old_value: unknown, w: IBaseWidget): void;
|
|
4796
4799
|
onDeselected?(this: LGraphNode): void;
|
|
4797
4800
|
onKeyUp?(this: LGraphNode, e: KeyboardEvent): void;
|
|
@@ -4818,7 +4821,7 @@ export declare class ComfyApp {
|
|
|
4818
4821
|
onInputDblClick?(this: LGraphNode, index: number, e: CanvasPointerEvent): void;
|
|
4819
4822
|
onOutputClick?(this: LGraphNode, index: number, e: CanvasPointerEvent): void;
|
|
4820
4823
|
onOutputDblClick?(this: LGraphNode, index: number, e: CanvasPointerEvent): void;
|
|
4821
|
-
onGetPropertyInfo?(this: LGraphNode, property: string):
|
|
4824
|
+
onGetPropertyInfo?(this: LGraphNode, property: string): INodePropertyInfo;
|
|
4822
4825
|
onNodeOutputAdd?(this: LGraphNode, value: unknown): void;
|
|
4823
4826
|
onNodeInputAdd?(this: LGraphNode, value: unknown): void;
|
|
4824
4827
|
onMenuNodeInputs?(this: LGraphNode, entries: (IContextMenuValue<INodeSlotContextItem> | null)[]): (IContextMenuValue<INodeSlotContextItem> | null)[];
|
|
@@ -6582,6 +6585,61 @@ export declare class ComfyApp {
|
|
|
6582
6585
|
*/
|
|
6583
6586
|
declare function overlapBounding(a: ReadOnlyRect, b: ReadOnlyRect): boolean;
|
|
6584
6587
|
|
|
6588
|
+
/**
|
|
6589
|
+
* A dialog panel created by LGraphCanvas.createPanel().
|
|
6590
|
+
* Extends HTMLDivElement with additional properties and methods for panel management.
|
|
6591
|
+
*/
|
|
6592
|
+
declare interface Panel extends HTMLDivElement {
|
|
6593
|
+
header: HTMLElement;
|
|
6594
|
+
title_element: HTMLSpanElement;
|
|
6595
|
+
content: HTMLDivElement;
|
|
6596
|
+
alt_content: HTMLDivElement;
|
|
6597
|
+
footer: HTMLDivElement;
|
|
6598
|
+
node?: LGraphNode;
|
|
6599
|
+
onOpen?: () => void;
|
|
6600
|
+
onClose?: () => void;
|
|
6601
|
+
close(): void;
|
|
6602
|
+
toggleAltContent(force?: boolean): void;
|
|
6603
|
+
toggleFooterVisibility(force?: boolean): void;
|
|
6604
|
+
clear(): void;
|
|
6605
|
+
addHTML(code: string, classname?: string, on_footer?: boolean): HTMLDivElement;
|
|
6606
|
+
addButton(name: string, callback: () => void, options?: unknown): PanelButton;
|
|
6607
|
+
addSeparator(): void;
|
|
6608
|
+
addWidget(type: string, name: string, value: TWidgetValue, options?: PanelWidgetOptions, callback?: PanelWidgetCallback): PanelWidget;
|
|
6609
|
+
inner_showCodePad?(property: string): void;
|
|
6610
|
+
}
|
|
6611
|
+
|
|
6612
|
+
/**
|
|
6613
|
+
* A button element with optional options property.
|
|
6614
|
+
*/
|
|
6615
|
+
declare interface PanelButton extends HTMLButtonElement {
|
|
6616
|
+
options?: unknown;
|
|
6617
|
+
}
|
|
6618
|
+
|
|
6619
|
+
/**
|
|
6620
|
+
* A widget element with options and value properties.
|
|
6621
|
+
*/
|
|
6622
|
+
declare interface PanelWidget extends HTMLDivElement {
|
|
6623
|
+
options?: PanelWidgetOptions;
|
|
6624
|
+
value?: TWidgetValue;
|
|
6625
|
+
}
|
|
6626
|
+
|
|
6627
|
+
/**
|
|
6628
|
+
* Callback for panel widget value changes.
|
|
6629
|
+
*/
|
|
6630
|
+
declare type PanelWidgetCallback = (name: string | undefined, value: TWidgetValue, options: PanelWidgetOptions) => void;
|
|
6631
|
+
|
|
6632
|
+
/**
|
|
6633
|
+
* Options for panel widgets.
|
|
6634
|
+
*/
|
|
6635
|
+
declare interface PanelWidgetOptions {
|
|
6636
|
+
label?: string;
|
|
6637
|
+
type?: string;
|
|
6638
|
+
widget?: string;
|
|
6639
|
+
values?: Array<string | IContextMenuValue<unknown, unknown, unknown> | null>;
|
|
6640
|
+
callback?: PanelWidgetCallback;
|
|
6641
|
+
}
|
|
6642
|
+
|
|
6585
6643
|
declare type ParamsArray<T extends Record<any, any>, K extends MethodNames<T>> = Parameters<T[K]>[1] extends undefined ? Parameters<T[K]> | Parameters<T[K]>[0] : Parameters<T[K]>;
|
|
6586
6644
|
|
|
6587
6645
|
/** An object containing a set of child objects */
|
|
@@ -10427,8 +10485,8 @@ export declare class ComfyApp {
|
|
|
10427
10485
|
}, "strip", z.ZodTypeAny, {
|
|
10428
10486
|
name: string;
|
|
10429
10487
|
description: string;
|
|
10430
|
-
display_name: string;
|
|
10431
10488
|
category: string;
|
|
10489
|
+
display_name: string;
|
|
10432
10490
|
output_node: boolean;
|
|
10433
10491
|
python_module: string;
|
|
10434
10492
|
input?: {
|
|
@@ -10875,20 +10933,20 @@ export declare class ComfyApp {
|
|
|
10875
10933
|
}, z.ZodTypeAny, "passthrough"> | undefined]> | undefined;
|
|
10876
10934
|
} | undefined;
|
|
10877
10935
|
output?: (string | (string | number)[])[] | undefined;
|
|
10936
|
+
deprecated?: boolean | undefined;
|
|
10937
|
+
help?: string | undefined;
|
|
10938
|
+
experimental?: boolean | undefined;
|
|
10878
10939
|
output_is_list?: boolean[] | undefined;
|
|
10879
10940
|
output_name?: string[] | undefined;
|
|
10880
10941
|
output_tooltips?: string[] | undefined;
|
|
10881
10942
|
output_matchtypes?: (string | undefined)[] | undefined;
|
|
10882
|
-
help?: string | undefined;
|
|
10883
|
-
deprecated?: boolean | undefined;
|
|
10884
|
-
experimental?: boolean | undefined;
|
|
10885
10943
|
api_node?: boolean | undefined;
|
|
10886
10944
|
input_order?: Record<string, string[]> | undefined;
|
|
10887
10945
|
}, {
|
|
10888
10946
|
name: string;
|
|
10889
10947
|
description: string;
|
|
10890
|
-
display_name: string;
|
|
10891
10948
|
category: string;
|
|
10949
|
+
display_name: string;
|
|
10892
10950
|
output_node: boolean;
|
|
10893
10951
|
python_module: string;
|
|
10894
10952
|
input?: {
|
|
@@ -11335,13 +11393,13 @@ export declare class ComfyApp {
|
|
|
11335
11393
|
}, z.ZodTypeAny, "passthrough"> | undefined]> | undefined;
|
|
11336
11394
|
} | undefined;
|
|
11337
11395
|
output?: (string | (string | number)[])[] | undefined;
|
|
11396
|
+
deprecated?: boolean | undefined;
|
|
11397
|
+
help?: string | undefined;
|
|
11398
|
+
experimental?: boolean | undefined;
|
|
11338
11399
|
output_is_list?: boolean[] | undefined;
|
|
11339
11400
|
output_name?: string[] | undefined;
|
|
11340
11401
|
output_tooltips?: string[] | undefined;
|
|
11341
11402
|
output_matchtypes?: (string | undefined)[] | undefined;
|
|
11342
|
-
help?: string | undefined;
|
|
11343
|
-
deprecated?: boolean | undefined;
|
|
11344
|
-
experimental?: boolean | undefined;
|
|
11345
11403
|
api_node?: boolean | undefined;
|
|
11346
11404
|
input_order?: Record<string, string[]> | undefined;
|
|
11347
11405
|
}>;
|
|
@@ -12016,14 +12074,14 @@ export declare class ComfyApp {
|
|
|
12016
12074
|
}, "strip", z.ZodTypeAny, {
|
|
12017
12075
|
key: string;
|
|
12018
12076
|
shift?: boolean | undefined;
|
|
12019
|
-
meta?: boolean | undefined;
|
|
12020
12077
|
alt?: boolean | undefined;
|
|
12078
|
+
meta?: boolean | undefined;
|
|
12021
12079
|
ctrl?: boolean | undefined;
|
|
12022
12080
|
}, {
|
|
12023
12081
|
key: string;
|
|
12024
12082
|
shift?: boolean | undefined;
|
|
12025
|
-
meta?: boolean | undefined;
|
|
12026
12083
|
alt?: boolean | undefined;
|
|
12084
|
+
meta?: boolean | undefined;
|
|
12027
12085
|
ctrl?: boolean | undefined;
|
|
12028
12086
|
}>;
|
|
12029
12087
|
targetElementId: z.ZodOptional<z.ZodString>;
|
|
@@ -12031,8 +12089,8 @@ export declare class ComfyApp {
|
|
|
12031
12089
|
combo: {
|
|
12032
12090
|
key: string;
|
|
12033
12091
|
shift?: boolean | undefined;
|
|
12034
|
-
meta?: boolean | undefined;
|
|
12035
12092
|
alt?: boolean | undefined;
|
|
12093
|
+
meta?: boolean | undefined;
|
|
12036
12094
|
ctrl?: boolean | undefined;
|
|
12037
12095
|
};
|
|
12038
12096
|
commandId: string;
|
|
@@ -12041,8 +12099,8 @@ export declare class ComfyApp {
|
|
|
12041
12099
|
combo: {
|
|
12042
12100
|
key: string;
|
|
12043
12101
|
shift?: boolean | undefined;
|
|
12044
|
-
meta?: boolean | undefined;
|
|
12045
12102
|
alt?: boolean | undefined;
|
|
12103
|
+
meta?: boolean | undefined;
|
|
12046
12104
|
ctrl?: boolean | undefined;
|
|
12047
12105
|
};
|
|
12048
12106
|
commandId: string;
|