@comfyorg/comfyui-frontend-types 1.42.3 → 1.42.5

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 +47 -10
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -2249,6 +2249,7 @@ export declare class ComfyApp {
2249
2249
  'Comfy.RightSidePanel.IsOpen'?: boolean | undefined;
2250
2250
  'Comfy.RightSidePanel.ShowErrorsTab'?: boolean | undefined;
2251
2251
  'Comfy.Node.AlwaysShowAdvancedWidgets'?: boolean | undefined;
2252
+ 'LiteGraph.Group.SelectChildrenOnClick'?: boolean | undefined;
2252
2253
  'Comfy.Canvas.BackgroundImage'?: string | undefined;
2253
2254
  'test.setting'?: any;
2254
2255
  'main.sub.setting.name'?: any;
@@ -4103,6 +4104,8 @@ export declare class ComfyApp {
4103
4104
  static serialisedSchemaVersion: 1;
4104
4105
  static STATUS_STOPPED: number;
4105
4106
  static STATUS_RUNNING: number;
4107
+ /** Generates a unique string key for a link's connection tuple. */
4108
+ static _linkTupleKey(link: LLink): string;
4106
4109
  /** List of LGraph properties that are manually handled by {@link LGraph.configure}. */
4107
4110
  static readonly ConfigureProperties: Set<string>;
4108
4111
  id: UUID;
@@ -4426,6 +4429,13 @@ export declare class ComfyApp {
4426
4429
  * Destroys a link
4427
4430
  */
4428
4431
  removeLink(link_id: LinkId): void;
4432
+ /**
4433
+ * Removes duplicate links that share the same connection tuple
4434
+ * (origin_id, origin_slot, target_id, target_slot). Keeps the link
4435
+ * referenced by input.link and removes orphaned duplicates from
4436
+ * output.links and the graph's _links map.
4437
+ */
4438
+ _removeDuplicateLinks(): void;
4429
4439
  /**
4430
4440
  * Creates a new subgraph definition, and adds it to the graph.
4431
4441
  * @param data Exported data (typically serialised) to configure the new subgraph with
@@ -4553,6 +4563,7 @@ export declare class ComfyApp {
4553
4563
  * Valid callbacks are: onNodeSelected, onNodeDeselected, onShowNodePanel, onNodeDblClicked
4554
4564
  */
4555
4565
  declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasEventMap> {
4566
+ #private;
4556
4567
  static DEFAULT_BACKGROUND_IMAGE: string;
4557
4568
  static DEFAULT_EVENT_LINK_COLOR: string;
4558
4569
  /** Link type to colour dictionary. */
@@ -4660,6 +4671,7 @@ export declare class ComfyApp {
4660
4671
  allow_dragnodes: boolean;
4661
4672
  allow_interaction: boolean;
4662
4673
  multi_select: boolean;
4674
+ groupSelectChildren: boolean;
4663
4675
  allow_searchbox: boolean;
4664
4676
  allow_reconnect_links: boolean;
4665
4677
  align_to_grid: boolean;
@@ -4911,6 +4923,8 @@ export declare class ComfyApp {
4911
4923
  setCanvas(canvas: string | HTMLCanvasElement, skip_events?: boolean): void;
4912
4924
  /** Captures an event and prevents default - returns false. */
4913
4925
  _doNothing(e: Event): boolean;
4926
+ /** Prevents default for middle-click auxclick only. */
4927
+ _preventMiddleAuxClick(e: MouseEvent): void;
4914
4928
  /** Captures an event and prevents default - returns true. */
4915
4929
  _doReturnTrue(e: Event): boolean;
4916
4930
  /**
@@ -6573,7 +6587,7 @@ export declare class ComfyApp {
6573
6587
 
6574
6588
  declare type LGraphTriggerAction = LGraphTriggerEvent['type'];
6575
6589
 
6576
- declare type LGraphTriggerEvent = NodePropertyChangedEvent | NodeSlotErrorsChangedEvent | NodeSlotLinksChangedEvent;
6590
+ declare type LGraphTriggerEvent = NodePropertyChangedEvent | NodeSlotErrorsChangedEvent | NodeSlotLinksChangedEvent | NodeSlotLabelChangedEvent;
6577
6591
 
6578
6592
  declare type LGraphTriggerHandler = (event: LGraphTriggerEvent) => void;
6579
6593
 
@@ -7675,6 +7689,12 @@ export declare class ComfyApp {
7675
7689
  nodeId: NodeId;
7676
7690
  }
7677
7691
 
7692
+ declare interface NodeSlotLabelChangedEvent {
7693
+ type: 'node:slot-label:changed';
7694
+ nodeId: NodeId;
7695
+ slotType?: NodeSlotType;
7696
+ }
7697
+
7678
7698
  declare interface NodeSlotLinksChangedEvent {
7679
7699
  type: 'node:slot-links:changed';
7680
7700
  nodeId: NodeId;
@@ -8105,7 +8125,7 @@ export declare class ComfyApp {
8105
8125
  /* Excluded from this release type: _drawDebug */
8106
8126
  }
8107
8127
 
8108
- declare type RendererType = 'LG' | 'Vue';
8128
+ declare type RendererType = 'LG' | 'Vue' | 'Vue-corrected';
8109
8129
 
8110
8130
  declare interface RenderLink {
8111
8131
  /** The type of link being connected. */
@@ -8585,7 +8605,7 @@ export declare class ComfyApp {
8585
8605
 
8586
8606
  /** A subgraph definition. */
8587
8607
  declare class Subgraph extends LGraph implements BaseLGraph, Serialisable<ExportedSubgraph> {
8588
- readonly events: CustomEventTarget<SubgraphEventMap, "configuring" | "configured" | "subgraph-created" | "convert-to-subgraph" | "open-subgraph" | "adding-input" | "adding-output" | "input-added" | "output-added" | "removing-input" | "removing-output" | "renaming-input" | "renaming-output" | "widget-promoted" | "widget-demoted">;
8608
+ readonly events: CustomEventTarget<SubgraphEventMap, "adding-input" | "adding-output" | "input-added" | "output-added" | "removing-input" | "removing-output" | "renaming-input" | "renaming-output" | "widget-promoted" | "widget-demoted" | "configuring" | "configured" | "subgraph-created" | "convert-to-subgraph" | "open-subgraph">;
8589
8609
  /** Limits the number of levels / depth that subgraphs may be nested. Prevents uncontrolled programmatic nesting. */
8590
8610
  static MAX_NESTED_SUBGRAPHS: number;
8591
8611
  /** The display name of the subgraph. */
@@ -8885,10 +8905,15 @@ export declare class ComfyApp {
8885
8905
  * lifecycle to persist.
8886
8906
  */
8887
8907
  private _pendingPromotions;
8908
+ private _cacheVersion;
8909
+ private _linkedEntriesCache?;
8910
+ private _promotedViewsCache?;
8888
8911
  widgets: IBaseWidget[];
8889
- private _resolveLinkedPromotionByInputName;
8912
+ private _resolveLinkedPromotionBySubgraphInput;
8890
8913
  private _getLinkedPromotionEntries;
8914
+ private _hasMissingBoundSourceWidget;
8891
8915
  private _getPromotedViews;
8916
+ private _invalidatePromotedViewsCache;
8892
8917
  private _syncPromotions;
8893
8918
  private _buildPromotionReconcileState;
8894
8919
  private _buildPromotionPersistenceState;
@@ -8896,6 +8921,9 @@ export declare class ComfyApp {
8896
8921
  private _shouldPersistLinkedOnly;
8897
8922
  private _toPromotionEntries;
8898
8923
  private _getFallbackStoredEntries;
8924
+ private _pruneStaleAliasFallbackEntries;
8925
+ private _resolveConcretePromotionEntryKey;
8926
+ private _getConnectedPromotionEntryKeys;
8899
8927
  private _buildLinkedReconcileEntries;
8900
8928
  private _buildDisplayNameByViewKey;
8901
8929
  private _makePromotionEntryKey;
@@ -8910,6 +8938,7 @@ export declare class ComfyApp {
8910
8938
  subgraph: Subgraph, instanceData: ExportedSubgraphInstance);
8911
8939
  onTitleButtonClick(button: LGraphButton, canvas: LGraphCanvas): void;
8912
8940
  private _addSubgraphInputListeners;
8941
+ private _rebindInputSubgraphSlots;
8913
8942
  configure(info: ExportedSubgraphInstance): void;
8914
8943
  _internalConfigureAfterSlots(): void;
8915
8944
  private _resolveInputWidget;
@@ -8925,6 +8954,8 @@ export declare class ComfyApp {
8925
8954
  * @remarks Assertion is required to instantiate empty generic POJO.
8926
8955
  */
8927
8956
  addInput<TInput extends Partial<ISubgraphInput>>(name: string, type: ISlotType, inputProperties?: TInput): INodeInputSlot & TInput;
8957
+ getSlotFromWidget(widget: IBaseWidget | undefined): INodeInputSlot | undefined;
8958
+ getWidgetFromSlot(slot: INodeInputSlot): IBaseWidget | undefined;
8928
8959
  getInputLink(slot: number): LLink | null;
8929
8960
  /**
8930
8961
  * Finds the internal links connected to the given input slot inside the subgraph, and resolves the nodes / slots.
@@ -15042,12 +15073,15 @@ export declare class ComfyApp {
15042
15073
  declare const zProgressTextWsMessage: z.ZodObject<{
15043
15074
  nodeId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
15044
15075
  text: z.ZodString;
15076
+ prompt_id: z.ZodOptional<z.ZodString>;
15045
15077
  }, "strip", z.ZodTypeAny, {
15046
15078
  text: string;
15047
15079
  nodeId: string | number;
15080
+ prompt_id?: string | undefined;
15048
15081
  }, {
15049
15082
  text: string;
15050
15083
  nodeId: string | number;
15084
+ prompt_id?: string | undefined;
15051
15085
  }>;
15052
15086
 
15053
15087
  declare const zProgressWsMessage: z.ZodObject<{
@@ -15164,9 +15198,6 @@ export declare class ComfyApp {
15164
15198
  }, z.ZodTypeAny, "passthrough"> | undefined;
15165
15199
  };
15166
15200
  prompt_id?: string | undefined;
15167
- exec_info?: {
15168
- queue_remaining?: number | undefined;
15169
- } | undefined;
15170
15201
  node_errors?: Record<string | number, {
15171
15202
  class_type: string;
15172
15203
  errors: {
@@ -15179,6 +15210,9 @@ export declare class ComfyApp {
15179
15210
  }[];
15180
15211
  dependent_outputs: any[];
15181
15212
  }> | undefined;
15213
+ exec_info?: {
15214
+ queue_remaining?: number | undefined;
15215
+ } | undefined;
15182
15216
  }, {
15183
15217
  error: string | {
15184
15218
  type: string;
@@ -15189,9 +15223,6 @@ export declare class ComfyApp {
15189
15223
  }, z.ZodTypeAny, "passthrough"> | undefined;
15190
15224
  };
15191
15225
  prompt_id?: string | undefined;
15192
- exec_info?: {
15193
- queue_remaining?: number | undefined;
15194
- } | undefined;
15195
15226
  node_errors?: Record<string | number, {
15196
15227
  class_type: string;
15197
15228
  errors: {
@@ -15204,6 +15235,9 @@ export declare class ComfyApp {
15204
15235
  }[];
15205
15236
  dependent_outputs: any[];
15206
15237
  }> | undefined;
15238
+ exec_info?: {
15239
+ queue_remaining?: number | undefined;
15240
+ } | undefined;
15207
15241
  }>;
15208
15242
 
15209
15243
  /**
@@ -16802,6 +16836,7 @@ export declare class ComfyApp {
16802
16836
  'Comfy.RightSidePanel.IsOpen': z.ZodBoolean;
16803
16837
  'Comfy.RightSidePanel.ShowErrorsTab': z.ZodBoolean;
16804
16838
  'Comfy.Node.AlwaysShowAdvancedWidgets': z.ZodBoolean;
16839
+ 'LiteGraph.Group.SelectChildrenOnClick': z.ZodBoolean;
16805
16840
  }, "strip", z.ZodTypeAny, {
16806
16841
  'Comfy.ColorPalette': string;
16807
16842
  'Comfy.CustomColorPalettes': Record<string, z.objectOutputType<{
@@ -17349,6 +17384,7 @@ export declare class ComfyApp {
17349
17384
  'Comfy.RightSidePanel.IsOpen': boolean;
17350
17385
  'Comfy.RightSidePanel.ShowErrorsTab': boolean;
17351
17386
  'Comfy.Node.AlwaysShowAdvancedWidgets': boolean;
17387
+ 'LiteGraph.Group.SelectChildrenOnClick': boolean;
17352
17388
  'Comfy.Canvas.BackgroundImage'?: string | undefined;
17353
17389
  'test.setting'?: any;
17354
17390
  'main.sub.setting.name'?: any;
@@ -17900,6 +17936,7 @@ export declare class ComfyApp {
17900
17936
  'Comfy.RightSidePanel.IsOpen': boolean;
17901
17937
  'Comfy.RightSidePanel.ShowErrorsTab': boolean;
17902
17938
  'Comfy.Node.AlwaysShowAdvancedWidgets': boolean;
17939
+ 'LiteGraph.Group.SelectChildrenOnClick': boolean;
17903
17940
  'Comfy.Canvas.BackgroundImage'?: string | undefined;
17904
17941
  'test.setting'?: any;
17905
17942
  'main.sub.setting.name'?: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comfyorg/comfyui-frontend-types",
3
- "version": "1.42.3",
3
+ "version": "1.42.5",
4
4
  "types": "./index.d.ts",
5
5
  "files": [
6
6
  "index.d.ts"