@comfyorg/comfyui-frontend-types 1.45.19 → 1.45.20
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 +50 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -374,6 +374,27 @@ declare class BooleanWidget extends BaseWidget<IBooleanWidget> implements IBoole
|
|
|
374
374
|
|
|
375
375
|
export declare type BottomPanelExtension = VueBottomPanelExtension | CustomBottomPanelExtension;
|
|
376
376
|
|
|
377
|
+
declare interface BoundingBox {
|
|
378
|
+
x: number;
|
|
379
|
+
y: number;
|
|
380
|
+
width: number;
|
|
381
|
+
height: number;
|
|
382
|
+
metadata: BoundingBoxMetadata;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
declare class BoundingBoxesWidget extends BaseWidget<IBoundingBoxesWidget> implements IBoundingBoxesWidget {
|
|
386
|
+
type: "boundingboxes";
|
|
387
|
+
drawWidget(ctx: CanvasRenderingContext2D, options: DrawWidgetOptions): void;
|
|
388
|
+
onClick(_options: WidgetEventOptions): void;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
declare interface BoundingBoxMetadata {
|
|
392
|
+
type: RegionType;
|
|
393
|
+
text: string;
|
|
394
|
+
desc: string;
|
|
395
|
+
palette: string[];
|
|
396
|
+
}
|
|
397
|
+
|
|
377
398
|
/**
|
|
378
399
|
* Widget for defining bounding box regions.
|
|
379
400
|
* This widget only has a Vue implementation.
|
|
@@ -799,6 +820,12 @@ declare interface ColorStop {
|
|
|
799
820
|
readonly color: readonly [r: number, g: number, b: number];
|
|
800
821
|
}
|
|
801
822
|
|
|
823
|
+
declare class ColorsWidget extends BaseWidget<IColorsWidget> implements IColorsWidget {
|
|
824
|
+
type: "colors";
|
|
825
|
+
drawWidget(ctx: CanvasRenderingContext2D, options: DrawWidgetOptions): void;
|
|
826
|
+
onClick(_options: WidgetEventOptions): void;
|
|
827
|
+
}
|
|
828
|
+
|
|
802
829
|
/**
|
|
803
830
|
* Widget for displaying a color picker using native HTML color input
|
|
804
831
|
*/
|
|
@@ -3399,6 +3426,11 @@ export declare class ComfyApp {
|
|
|
3399
3426
|
left: LGraphNode;
|
|
3400
3427
|
}
|
|
3401
3428
|
|
|
3429
|
+
declare interface IBoundingBoxesWidget extends IBaseWidget<BoundingBox[], 'boundingboxes'> {
|
|
3430
|
+
type: 'boundingboxes';
|
|
3431
|
+
value: BoundingBox[];
|
|
3432
|
+
}
|
|
3433
|
+
|
|
3402
3434
|
/** Bounding box widget for defining regions with numeric inputs */
|
|
3403
3435
|
declare interface IBoundingBoxWidget extends IBaseWidget<Bounds, 'boundingbox'> {
|
|
3404
3436
|
type: 'boundingbox';
|
|
@@ -3437,6 +3469,11 @@ export declare class ComfyApp {
|
|
|
3437
3469
|
getColorOption(): ColorOption | null;
|
|
3438
3470
|
}
|
|
3439
3471
|
|
|
3472
|
+
declare interface IColorsWidget extends IBaseWidget<string[], 'colors'> {
|
|
3473
|
+
type: 'colors';
|
|
3474
|
+
value: string[];
|
|
3475
|
+
}
|
|
3476
|
+
|
|
3440
3477
|
/** Color picker widget for selecting colors */
|
|
3441
3478
|
declare interface IColorWidget extends IBaseWidget<string, 'color'> {
|
|
3442
3479
|
type: 'color';
|
|
@@ -4038,7 +4075,7 @@ export declare class ComfyApp {
|
|
|
4038
4075
|
* Recommend declaration merging any properties that use IWidget (e.g. {@link LGraphNode.widgets}) with a new type alias.
|
|
4039
4076
|
* @see ICustomWidget
|
|
4040
4077
|
*/
|
|
4041
|
-
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 | IRangeWidget;
|
|
4078
|
+
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 | IRangeWidget | IBoundingBoxesWidget | IColorsWidget;
|
|
4042
4079
|
|
|
4043
4080
|
declare interface IWidgetAssetOptions extends IWidgetOptions {
|
|
4044
4081
|
openModal: (widget: IBaseWidget) => void;
|
|
@@ -4094,6 +4131,14 @@ export declare class ComfyApp {
|
|
|
4094
4131
|
socketless?: boolean;
|
|
4095
4132
|
/** If `true`, the widget will not be rendered by the Vue renderer. */
|
|
4096
4133
|
canvasOnly?: boolean;
|
|
4134
|
+
/**
|
|
4135
|
+
* If `true`, the widget still renders on the node but is omitted from the
|
|
4136
|
+
* right side panel. Unlike {@link IWidgetOptions.canvasOnly}, the node body
|
|
4137
|
+
* keeps rendering it via the Vue renderer. Used for widgets that hold
|
|
4138
|
+
* non-syncable state (e.g. a Three.js viewport) where a second instance in
|
|
4139
|
+
* the panel would diverge from the one on the node.
|
|
4140
|
+
*/
|
|
4141
|
+
hideInPanel?: boolean;
|
|
4097
4142
|
/** Used as a temporary override for determining the asset type in vue mode*/
|
|
4098
4143
|
nodeType?: string;
|
|
4099
4144
|
/**
|
|
@@ -8315,6 +8360,8 @@ export declare class ComfyApp {
|
|
|
8315
8360
|
/* Excluded from this release type: _drawDebug */
|
|
8316
8361
|
}
|
|
8317
8362
|
|
|
8363
|
+
declare type RegionType = 'obj' | 'text';
|
|
8364
|
+
|
|
8318
8365
|
declare type RendererType = 'LG' | 'Vue' | 'Vue-corrected';
|
|
8319
8366
|
|
|
8320
8367
|
declare interface RenderLink {
|
|
@@ -46664,6 +46711,8 @@ export declare class ComfyApp {
|
|
|
46664
46711
|
curve: CurveWidget;
|
|
46665
46712
|
painter: PainterWidget;
|
|
46666
46713
|
range: RangeWidget;
|
|
46714
|
+
boundingboxes: BoundingBoxesWidget;
|
|
46715
|
+
colors: ColorsWidget;
|
|
46667
46716
|
[key: string]: BaseWidget;
|
|
46668
46717
|
};
|
|
46669
46718
|
|