@comfyorg/comfyui-frontend-types 1.29.2 → 1.30.1
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 +26 -6
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1277,6 +1277,10 @@ export declare class ComfyApp {
|
|
|
1277
1277
|
* Badges to add to the about page
|
|
1278
1278
|
*/
|
|
1279
1279
|
aboutPageBadges?: AboutPageBadge[];
|
|
1280
|
+
/**
|
|
1281
|
+
* Badges to add to the top bar
|
|
1282
|
+
*/
|
|
1283
|
+
topbarBadges?: TopbarBadge[];
|
|
1280
1284
|
/**
|
|
1281
1285
|
* Allows any initialisation, e.g. loading resources. Called after the canvas is created but before nodes are added
|
|
1282
1286
|
* @param app The ComfyUI app instance
|
|
@@ -2225,11 +2229,6 @@ export declare class ComfyApp {
|
|
|
2225
2229
|
value: string;
|
|
2226
2230
|
}
|
|
2227
2231
|
|
|
2228
|
-
declare interface IAudioRecordWidget extends IBaseWidget<string, 'audiorecord'> {
|
|
2229
|
-
type: 'audiorecord';
|
|
2230
|
-
value: string;
|
|
2231
|
-
}
|
|
2232
|
-
|
|
2233
2232
|
/**
|
|
2234
2233
|
* The base type for all widgets. Should not be implemented directly.
|
|
2235
2234
|
* @template TValue The type of value this widget holds.
|
|
@@ -2310,6 +2309,13 @@ export declare class ComfyApp {
|
|
|
2310
2309
|
* @param lowQuality Whether to draw the widget in low quality.
|
|
2311
2310
|
*/
|
|
2312
2311
|
draw?(ctx: CanvasRenderingContext2D, node: LGraphNode, widget_width: number, y: number, H: number, lowQuality?: boolean): void;
|
|
2312
|
+
/**
|
|
2313
|
+
* Compatibility method for widgets implementing the draw
|
|
2314
|
+
* method when displayed in non-canvas renderers.
|
|
2315
|
+
* Set by the current renderer implementation.
|
|
2316
|
+
* When called, performs a draw operation.
|
|
2317
|
+
*/
|
|
2318
|
+
triggerDraw?: () => void;
|
|
2313
2319
|
/**
|
|
2314
2320
|
* Compute the size of the widget. Overrides {@link IBaseWidget.computeSize}.
|
|
2315
2321
|
* @param width The width of the widget.
|
|
@@ -2933,7 +2939,7 @@ export declare class ComfyApp {
|
|
|
2933
2939
|
* Recommend declaration merging any properties that use IWidget (e.g. {@link LGraphNode.widgets}) with a new type alias.
|
|
2934
2940
|
* @see ICustomWidget
|
|
2935
2941
|
*/
|
|
2936
|
-
declare type IWidget = IBooleanWidget | INumericWidget | IStringWidget | IComboWidget | IStringComboWidget | ICustomWidget | ISliderWidget | IButtonWidget | IKnobWidget | IFileUploadWidget | IColorWidget | IMarkdownWidget | IImageWidget | ITreeSelectWidget | IMultiSelectWidget | IChartWidget | IGalleriaWidget | IImageCompareWidget | ISelectButtonWidget | ITextareaWidget | IAssetWidget
|
|
2942
|
+
declare type IWidget = IBooleanWidget | INumericWidget | IStringWidget | IComboWidget | IStringComboWidget | ICustomWidget | ISliderWidget | IButtonWidget | IKnobWidget | IFileUploadWidget | IColorWidget | IMarkdownWidget | IImageWidget | ITreeSelectWidget | IMultiSelectWidget | IChartWidget | IGalleriaWidget | IImageCompareWidget | ISelectButtonWidget | ITextareaWidget | IAssetWidget;
|
|
2937
2943
|
|
|
2938
2944
|
declare interface IWidgetKnobOptions extends IWidgetOptions<number[]> {
|
|
2939
2945
|
min: number;
|
|
@@ -3479,6 +3485,10 @@ export declare class ComfyApp {
|
|
|
3479
3485
|
state: LGraphCanvasState;
|
|
3480
3486
|
get subgraph(): Subgraph | undefined;
|
|
3481
3487
|
set subgraph(value: Subgraph | undefined);
|
|
3488
|
+
/**
|
|
3489
|
+
* The location of the fps info widget. Leaving an element unset will use the default position for that element.
|
|
3490
|
+
*/
|
|
3491
|
+
fpsInfoLocation: [x: number | null | undefined, y: number | null | undefined] | null | undefined;
|
|
3482
3492
|
/** Dispatches a custom event on the canvas. */
|
|
3483
3493
|
dispatch<T extends keyof NeverNever<LGraphCanvasEventMap>>(type: T, detail: LGraphCanvasEventMap[T]): boolean;
|
|
3484
3494
|
dispatch<T extends keyof PickNevers<LGraphCanvasEventMap>>(type: T): boolean;
|
|
@@ -3841,6 +3851,7 @@ export declare class ComfyApp {
|
|
|
3841
3851
|
*/
|
|
3842
3852
|
updateMouseOverNodes(node: LGraphNode | null, e: CanvasPointerEvent): void;
|
|
3843
3853
|
processMouseDown(e: PointerEvent): void;
|
|
3854
|
+
processWidgetClick(e: CanvasPointerEvent, node: LGraphNode, widget: IBaseWidget, pointer?: CanvasPointer): void;
|
|
3844
3855
|
/**
|
|
3845
3856
|
* Called when a mouse move event has to be processed
|
|
3846
3857
|
*/
|
|
@@ -7355,6 +7366,7 @@ export declare class ComfyApp {
|
|
|
7355
7366
|
removeWidgetByName(name: string): void;
|
|
7356
7367
|
ensureWidgetRemoved(widget: IBaseWidget): void;
|
|
7357
7368
|
onRemoved(): void;
|
|
7369
|
+
drawTitleBox(ctx: CanvasRenderingContext2D, { scale, low_quality, title_height, box_size }: DrawTitleBoxOptions): void;
|
|
7358
7370
|
/**
|
|
7359
7371
|
* Synchronizes widget values from this SubgraphNode instance to the
|
|
7360
7372
|
* corresponding widgets in the subgraph definition before serialization.
|
|
@@ -7657,6 +7669,14 @@ export declare class ComfyApp {
|
|
|
7657
7669
|
connectToRerouteInput(): void;
|
|
7658
7670
|
}
|
|
7659
7671
|
|
|
7672
|
+
declare interface TopbarBadge {
|
|
7673
|
+
text: string;
|
|
7674
|
+
/**
|
|
7675
|
+
* Optional badge label (e.g., "BETA", "ALPHA", "NEW")
|
|
7676
|
+
*/
|
|
7677
|
+
label?: string;
|
|
7678
|
+
}
|
|
7679
|
+
|
|
7660
7680
|
/**
|
|
7661
7681
|
* Widget for hierarchical tree selection
|
|
7662
7682
|
* This is a widget that only has a Vue widgets implementation
|