@comfyorg/comfyui-frontend-types 1.41.6 → 1.41.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.
- package/index.d.ts +48 -5
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { ComfyApiWorkflow } from '../platform/workflow/validation/schemas/workfl
|
|
|
2
2
|
import { ComfyWorkflowJSON } from '../platform/workflow/validation/schemas/workflowSchema';
|
|
3
3
|
import { ComfyWorkflowJSON as ComfyWorkflowJSON_2 } from '../../validation/schemas/workflowSchema';
|
|
4
4
|
import { Component } from 'vue';
|
|
5
|
+
import { CurvePoint } from '../../../../components/curve/types';
|
|
5
6
|
import { DOMWidget } from '../scripts/domWidget';
|
|
6
7
|
import { DOMWidgetOptions } from '../scripts/domWidget';
|
|
7
8
|
import { IFuseOptions } from 'fuse.js';
|
|
@@ -77,6 +78,8 @@ declare type ApiToEventType<T = ApiCalls> = {
|
|
|
77
78
|
[K in keyof T]: K extends 'status' ? StatusWsMessageStatus : K extends 'executing' ? NodeId_2 : T[K];
|
|
78
79
|
};
|
|
79
80
|
|
|
81
|
+
declare type AppMode = 'graph' | 'app' | 'builder:select' | 'builder:arrange';
|
|
82
|
+
|
|
80
83
|
/** Wraps all properties in {@link CustomEvent}. */
|
|
81
84
|
declare type AsCustomEvents<T> = {
|
|
82
85
|
readonly [K in keyof T]: CustomEvent<T[K]>;
|
|
@@ -2302,6 +2305,23 @@ export declare class ComfyApp {
|
|
|
2302
2305
|
* Warnings deferred from load time, shown when the workflow is first focused.
|
|
2303
2306
|
*/
|
|
2304
2307
|
pendingWarnings: PendingWarnings | null;
|
|
2308
|
+
/**
|
|
2309
|
+
* Initial app mode derived from the serialized workflow (extra.linearMode).
|
|
2310
|
+
* - `undefined`: not yet resolved (first load hasn't happened)
|
|
2311
|
+
* - `null`: resolved, but no mode was set (never builder-saved)
|
|
2312
|
+
* - `AppMode`: resolved to a specific mode
|
|
2313
|
+
*/
|
|
2314
|
+
initialMode: AppMode | null | undefined;
|
|
2315
|
+
/**
|
|
2316
|
+
* Current app mode set by the user during the session.
|
|
2317
|
+
* Takes precedence over initialMode when present.
|
|
2318
|
+
*/
|
|
2319
|
+
activeMode: AppMode | null;
|
|
2320
|
+
/**
|
|
2321
|
+
* In-progress builder selections not yet persisted via save.
|
|
2322
|
+
* Preserved across tab switches, discarded on exitBuilder.
|
|
2323
|
+
*/
|
|
2324
|
+
dirtyLinearData: LinearData | null;
|
|
2305
2325
|
/**
|
|
2306
2326
|
* @param options The path, modified, and size of the workflow.
|
|
2307
2327
|
* Note: path is the full path, including the 'workflows/' prefix.
|
|
@@ -2496,8 +2516,6 @@ export declare class ComfyApp {
|
|
|
2496
2516
|
getCloserPoint(pos: Point, max_dist: number): number;
|
|
2497
2517
|
}
|
|
2498
2518
|
|
|
2499
|
-
declare type CurvePoint = [x: number, y: number];
|
|
2500
|
-
|
|
2501
2519
|
declare class CurveWidget extends BaseWidget<ICurveWidget> implements ICurveWidget {
|
|
2502
2520
|
type: "curve";
|
|
2503
2521
|
drawWidget(ctx: CanvasRenderingContext2D, options: DrawWidgetOptions): void;
|
|
@@ -2702,6 +2720,8 @@ export declare class ComfyApp {
|
|
|
2702
2720
|
showText?: boolean;
|
|
2703
2721
|
/** When true, suppresses the promoted outline color (e.g. for projected copies on SubgraphNode). */
|
|
2704
2722
|
suppressPromotedOutline?: boolean;
|
|
2723
|
+
/** Transient image source for preview widgets rendered on behalf of another node (e.g. subgraph promotion). */
|
|
2724
|
+
previewImages?: HTMLImageElement[];
|
|
2705
2725
|
}
|
|
2706
2726
|
|
|
2707
2727
|
declare interface DrawWidgetsOptions {
|
|
@@ -3683,6 +3703,11 @@ export declare class ComfyApp {
|
|
|
3683
3703
|
safeOffsetY: number;
|
|
3684
3704
|
}
|
|
3685
3705
|
|
|
3706
|
+
declare interface IPainterWidget extends IBaseWidget<string, 'painter'> {
|
|
3707
|
+
type: 'painter';
|
|
3708
|
+
value: string;
|
|
3709
|
+
}
|
|
3710
|
+
|
|
3686
3711
|
/** Options for {@link LGraphCanvas.pasteFromClipboard}. */
|
|
3687
3712
|
declare interface IPasteFromClipboardOptions {
|
|
3688
3713
|
/** If `true`, always attempt to connect inputs of pasted nodes - including to nodes that were not pasted. */
|
|
@@ -3872,7 +3897,7 @@ export declare class ComfyApp {
|
|
|
3872
3897
|
* Recommend declaration merging any properties that use IWidget (e.g. {@link LGraphNode.widgets}) with a new type alias.
|
|
3873
3898
|
* @see ICustomWidget
|
|
3874
3899
|
*/
|
|
3875
|
-
declare type IWidget = IBooleanWidget | INumericWidget | IStringWidget | IComboWidget | IStringComboWidget | ICustomWidget | ISliderWidget | IGradientSliderWidget | IButtonWidget | IKnobWidget | IFileUploadWidget | IColorWidget | IMarkdownWidget | IImageWidget | ITreeSelectWidget | IMultiSelectWidget | IChartWidget | IGalleriaWidget | IImageCompareWidget | ISelectButtonWidget | ITextareaWidget | IAssetWidget | IImageCropWidget | IBoundingBoxWidget | ICurveWidget;
|
|
3900
|
+
declare type IWidget = IBooleanWidget | INumericWidget | IStringWidget | IComboWidget | IStringComboWidget | ICustomWidget | ISliderWidget | IGradientSliderWidget | IButtonWidget | IKnobWidget | IFileUploadWidget | IColorWidget | IMarkdownWidget | IImageWidget | ITreeSelectWidget | IMultiSelectWidget | IChartWidget | IGalleriaWidget | IImageCompareWidget | ISelectButtonWidget | ITextareaWidget | IAssetWidget | IImageCropWidget | IBoundingBoxWidget | ICurveWidget | IPainterWidget;
|
|
3876
3901
|
|
|
3877
3902
|
declare interface IWidgetAssetOptions extends IWidgetOptions {
|
|
3878
3903
|
openModal: (widget: IBaseWidget) => void;
|
|
@@ -6505,6 +6530,11 @@ export declare class ComfyApp {
|
|
|
6505
6530
|
type: A;
|
|
6506
6531
|
}>;
|
|
6507
6532
|
|
|
6533
|
+
declare interface LinearData {
|
|
6534
|
+
inputs: [NodeId, string][];
|
|
6535
|
+
outputs: NodeId[];
|
|
6536
|
+
}
|
|
6537
|
+
|
|
6508
6538
|
/**
|
|
6509
6539
|
* Component of {@link LGraphCanvas} that handles connecting and moving links.
|
|
6510
6540
|
* @see {@link LLink}
|
|
@@ -7395,6 +7425,8 @@ export declare class ComfyApp {
|
|
|
7395
7425
|
|
|
7396
7426
|
declare type MissingNodeType = string | {
|
|
7397
7427
|
type: string;
|
|
7428
|
+
nodeId?: string | number;
|
|
7429
|
+
cnrId?: string;
|
|
7398
7430
|
hint?: string;
|
|
7399
7431
|
action?: {
|
|
7400
7432
|
text: string;
|
|
@@ -7656,6 +7688,16 @@ export declare class ComfyApp {
|
|
|
7656
7688
|
*/
|
|
7657
7689
|
declare function overlapBounding(a: ReadOnlyRect, b: ReadOnlyRect): boolean;
|
|
7658
7690
|
|
|
7691
|
+
/**
|
|
7692
|
+
* Widget for the Painter node canvas drawing tool.
|
|
7693
|
+
* This is a widget that only has a Vue widgets implementation.
|
|
7694
|
+
*/
|
|
7695
|
+
declare class PainterWidget extends BaseWidget<IPainterWidget> implements IPainterWidget {
|
|
7696
|
+
type: "painter";
|
|
7697
|
+
drawWidget(ctx: CanvasRenderingContext2D, options: DrawWidgetOptions): void;
|
|
7698
|
+
onClick(_options: WidgetEventOptions): void;
|
|
7699
|
+
}
|
|
7700
|
+
|
|
7659
7701
|
/**
|
|
7660
7702
|
* A dialog panel created by LGraphCanvas.createPanel().
|
|
7661
7703
|
* Extends HTMLDivElement with additional properties and methods for panel management.
|
|
@@ -9356,6 +9398,7 @@ export declare class ComfyApp {
|
|
|
9356
9398
|
imagecrop: ImageCropWidget;
|
|
9357
9399
|
boundingbox: BoundingBoxWidget;
|
|
9358
9400
|
curve: CurveWidget;
|
|
9401
|
+
painter: PainterWidget;
|
|
9359
9402
|
[key: string]: BaseWidget;
|
|
9360
9403
|
};
|
|
9361
9404
|
|
|
@@ -12380,6 +12423,7 @@ export declare class ComfyApp {
|
|
|
12380
12423
|
}, z.ZodTypeAny, "passthrough"> | undefined]> | undefined;
|
|
12381
12424
|
} | undefined;
|
|
12382
12425
|
output?: (string | (string | number)[])[] | undefined;
|
|
12426
|
+
essentials_category?: string | undefined;
|
|
12383
12427
|
deprecated?: boolean | undefined;
|
|
12384
12428
|
help?: string | undefined;
|
|
12385
12429
|
experimental?: boolean | undefined;
|
|
@@ -12404,7 +12448,6 @@ export declare class ComfyApp {
|
|
|
12404
12448
|
};
|
|
12405
12449
|
expr: string;
|
|
12406
12450
|
} | undefined;
|
|
12407
|
-
essentials_category?: string | undefined;
|
|
12408
12451
|
isGlobal?: boolean | undefined;
|
|
12409
12452
|
}, {
|
|
12410
12453
|
name: string;
|
|
@@ -12885,6 +12928,7 @@ export declare class ComfyApp {
|
|
|
12885
12928
|
}, z.ZodTypeAny, "passthrough"> | undefined]> | undefined;
|
|
12886
12929
|
} | undefined;
|
|
12887
12930
|
output?: (string | (string | number)[])[] | undefined;
|
|
12931
|
+
essentials_category?: string | undefined;
|
|
12888
12932
|
deprecated?: boolean | undefined;
|
|
12889
12933
|
help?: string | undefined;
|
|
12890
12934
|
experimental?: boolean | undefined;
|
|
@@ -12909,7 +12953,6 @@ export declare class ComfyApp {
|
|
|
12909
12953
|
input_groups?: string[] | undefined;
|
|
12910
12954
|
} | undefined;
|
|
12911
12955
|
} | undefined;
|
|
12912
|
-
essentials_category?: string | undefined;
|
|
12913
12956
|
isGlobal?: boolean | undefined;
|
|
12914
12957
|
}>;
|
|
12915
12958
|
|