@comfyorg/comfyui-frontend-types 1.41.5 → 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.
Files changed (2) hide show
  1. package/index.d.ts +48 -6
  2. 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 {
@@ -3126,7 +3146,6 @@ export declare class ComfyApp {
3126
3146
  /** Widget type (see {@link TWidgetType}) */
3127
3147
  type: TType;
3128
3148
  value?: TValue;
3129
- vueTrack?: () => void;
3130
3149
  /**
3131
3150
  * Whether the widget value is persisted in the workflow JSON
3132
3151
  * (`widgets_values`). Checked by {@link LGraphNode.serialize} and
@@ -3684,6 +3703,11 @@ export declare class ComfyApp {
3684
3703
  safeOffsetY: number;
3685
3704
  }
3686
3705
 
3706
+ declare interface IPainterWidget extends IBaseWidget<string, 'painter'> {
3707
+ type: 'painter';
3708
+ value: string;
3709
+ }
3710
+
3687
3711
  /** Options for {@link LGraphCanvas.pasteFromClipboard}. */
3688
3712
  declare interface IPasteFromClipboardOptions {
3689
3713
  /** If `true`, always attempt to connect inputs of pasted nodes - including to nodes that were not pasted. */
@@ -3873,7 +3897,7 @@ export declare class ComfyApp {
3873
3897
  * Recommend declaration merging any properties that use IWidget (e.g. {@link LGraphNode.widgets}) with a new type alias.
3874
3898
  * @see ICustomWidget
3875
3899
  */
3876
- 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;
3877
3901
 
3878
3902
  declare interface IWidgetAssetOptions extends IWidgetOptions {
3879
3903
  openModal: (widget: IBaseWidget) => void;
@@ -6506,6 +6530,11 @@ export declare class ComfyApp {
6506
6530
  type: A;
6507
6531
  }>;
6508
6532
 
6533
+ declare interface LinearData {
6534
+ inputs: [NodeId, string][];
6535
+ outputs: NodeId[];
6536
+ }
6537
+
6509
6538
  /**
6510
6539
  * Component of {@link LGraphCanvas} that handles connecting and moving links.
6511
6540
  * @see {@link LLink}
@@ -7396,6 +7425,8 @@ export declare class ComfyApp {
7396
7425
 
7397
7426
  declare type MissingNodeType = string | {
7398
7427
  type: string;
7428
+ nodeId?: string | number;
7429
+ cnrId?: string;
7399
7430
  hint?: string;
7400
7431
  action?: {
7401
7432
  text: string;
@@ -7657,6 +7688,16 @@ export declare class ComfyApp {
7657
7688
  */
7658
7689
  declare function overlapBounding(a: ReadOnlyRect, b: ReadOnlyRect): boolean;
7659
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
+
7660
7701
  /**
7661
7702
  * A dialog panel created by LGraphCanvas.createPanel().
7662
7703
  * Extends HTMLDivElement with additional properties and methods for panel management.
@@ -9357,6 +9398,7 @@ export declare class ComfyApp {
9357
9398
  imagecrop: ImageCropWidget;
9358
9399
  boundingbox: BoundingBoxWidget;
9359
9400
  curve: CurveWidget;
9401
+ painter: PainterWidget;
9360
9402
  [key: string]: BaseWidget;
9361
9403
  };
9362
9404
 
@@ -12381,6 +12423,7 @@ export declare class ComfyApp {
12381
12423
  }, z.ZodTypeAny, "passthrough"> | undefined]> | undefined;
12382
12424
  } | undefined;
12383
12425
  output?: (string | (string | number)[])[] | undefined;
12426
+ essentials_category?: string | undefined;
12384
12427
  deprecated?: boolean | undefined;
12385
12428
  help?: string | undefined;
12386
12429
  experimental?: boolean | undefined;
@@ -12405,7 +12448,6 @@ export declare class ComfyApp {
12405
12448
  };
12406
12449
  expr: string;
12407
12450
  } | undefined;
12408
- essentials_category?: string | undefined;
12409
12451
  isGlobal?: boolean | undefined;
12410
12452
  }, {
12411
12453
  name: string;
@@ -12886,6 +12928,7 @@ export declare class ComfyApp {
12886
12928
  }, z.ZodTypeAny, "passthrough"> | undefined]> | undefined;
12887
12929
  } | undefined;
12888
12930
  output?: (string | (string | number)[])[] | undefined;
12931
+ essentials_category?: string | undefined;
12889
12932
  deprecated?: boolean | undefined;
12890
12933
  help?: string | undefined;
12891
12934
  experimental?: boolean | undefined;
@@ -12910,7 +12953,6 @@ export declare class ComfyApp {
12910
12953
  input_groups?: string[] | undefined;
12911
12954
  } | undefined;
12912
12955
  } | undefined;
12913
- essentials_category?: string | undefined;
12914
12956
  isGlobal?: boolean | undefined;
12915
12957
  }>;
12916
12958
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comfyorg/comfyui-frontend-types",
3
- "version": "1.41.5",
3
+ "version": "1.41.7",
4
4
  "types": "./index.d.ts",
5
5
  "files": [
6
6
  "index.d.ts"