@comfyorg/comfyui-frontend-types 1.41.19 → 1.41.21

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 +40 -6
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -2,7 +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
+ import { CurveData } from '../../../../components/curve/types';
6
6
  import { DOMWidget } from '../scripts/domWidget';
7
7
  import { DOMWidgetOptions } from '../scripts/domWidget';
8
8
  import { IFuseOptions } from 'fuse.js';
@@ -1132,6 +1132,8 @@ export declare class ComfyApp {
1132
1132
  /** @deprecated Use {@link rootGraph} instead */
1133
1133
  get graph(): LGraph;
1134
1134
  get rootGraph(): LGraph;
1135
+ /** Whether the root graph has been initialized. Safe to check without triggering error logs. */
1136
+ get isGraphReady(): boolean;
1135
1137
  canvas: LGraphCanvas;
1136
1138
  dragOverNode: LGraphNode | null;
1137
1139
  readonly canvasElRef: ShallowRef<HTMLCanvasElement | undefined, HTMLCanvasElement | undefined>;
@@ -2067,6 +2069,7 @@ export declare class ComfyApp {
2067
2069
  'Comfy.Workflow.ShowMissingNodesWarning'?: boolean | undefined;
2068
2070
  'Comfy.Workflow.ShowMissingModelsWarning'?: boolean | undefined;
2069
2071
  'Comfy.Workflow.WarnBlueprintOverwrite'?: boolean | undefined;
2072
+ 'Comfy.Desktop.CloudNotificationShown'?: boolean | undefined;
2070
2073
  'Comfy.DisableFloatRounding'?: boolean | undefined;
2071
2074
  'Comfy.DisableSliders'?: boolean | undefined;
2072
2075
  'Comfy.DOMClippingEnabled'?: boolean | undefined;
@@ -3415,9 +3418,9 @@ export declare class ComfyApp {
3415
3418
  height?: number | string;
3416
3419
  }
3417
3420
 
3418
- declare interface ICurveWidget extends IBaseWidget<CurvePoint[], 'curve'> {
3421
+ declare interface ICurveWidget extends IBaseWidget<CurveData, 'curve'> {
3419
3422
  type: 'curve';
3420
- value: CurvePoint[];
3423
+ value: CurveData;
3421
3424
  }
3422
3425
 
3423
3426
  /**
@@ -4082,6 +4085,8 @@ export declare class ComfyApp {
4082
4085
  static serialisedSchemaVersion: 1;
4083
4086
  static STATUS_STOPPED: number;
4084
4087
  static STATUS_RUNNING: number;
4088
+ /** Generates a unique string key for a link's connection tuple. */
4089
+ static _linkTupleKey(link: LLink): string;
4085
4090
  /** List of LGraph properties that are manually handled by {@link LGraph.configure}. */
4086
4091
  static readonly ConfigureProperties: Set<string>;
4087
4092
  id: UUID;
@@ -4405,6 +4410,13 @@ export declare class ComfyApp {
4405
4410
  * Destroys a link
4406
4411
  */
4407
4412
  removeLink(link_id: LinkId): void;
4413
+ /**
4414
+ * Removes duplicate links that share the same connection tuple
4415
+ * (origin_id, origin_slot, target_id, target_slot). Keeps the link
4416
+ * referenced by input.link and removes orphaned duplicates from
4417
+ * output.links and the graph's _links map.
4418
+ */
4419
+ _removeDuplicateLinks(): void;
4408
4420
  /**
4409
4421
  * Creates a new subgraph definition, and adds it to the graph.
4410
4422
  * @param data Exported data (typically serialised) to configure the new subgraph with
@@ -4888,6 +4900,8 @@ export declare class ComfyApp {
4888
4900
  setCanvas(canvas: string | HTMLCanvasElement, skip_events?: boolean): void;
4889
4901
  /** Captures an event and prevents default - returns false. */
4890
4902
  _doNothing(e: Event): boolean;
4903
+ /** Prevents default for middle-click auxclick only. */
4904
+ _preventMiddleAuxClick(e: MouseEvent): void;
4891
4905
  /** Captures an event and prevents default - returns true. */
4892
4906
  _doReturnTrue(e: Event): boolean;
4893
4907
  /**
@@ -6550,7 +6564,7 @@ export declare class ComfyApp {
6550
6564
 
6551
6565
  declare type LGraphTriggerAction = LGraphTriggerEvent['type'];
6552
6566
 
6553
- declare type LGraphTriggerEvent = NodePropertyChangedEvent | NodeSlotErrorsChangedEvent | NodeSlotLinksChangedEvent;
6567
+ declare type LGraphTriggerEvent = NodePropertyChangedEvent | NodeSlotErrorsChangedEvent | NodeSlotLinksChangedEvent | NodeSlotLabelChangedEvent;
6554
6568
 
6555
6569
  declare type LGraphTriggerHandler = (event: LGraphTriggerEvent) => void;
6556
6570
 
@@ -7652,6 +7666,12 @@ export declare class ComfyApp {
7652
7666
  nodeId: NodeId;
7653
7667
  }
7654
7668
 
7669
+ declare interface NodeSlotLabelChangedEvent {
7670
+ type: 'node:slot-label:changed';
7671
+ nodeId: NodeId;
7672
+ slotType?: NodeSlotType;
7673
+ }
7674
+
7655
7675
  declare interface NodeSlotLinksChangedEvent {
7656
7676
  type: 'node:slot-links:changed';
7657
7677
  nodeId: NodeId;
@@ -8082,7 +8102,7 @@ export declare class ComfyApp {
8082
8102
  /* Excluded from this release type: _drawDebug */
8083
8103
  }
8084
8104
 
8085
- declare type RendererType = 'LG' | 'Vue';
8105
+ declare type RendererType = 'LG' | 'Vue' | 'Vue-corrected';
8086
8106
 
8087
8107
  declare interface RenderLink {
8088
8108
  /** The type of link being connected. */
@@ -8862,10 +8882,15 @@ export declare class ComfyApp {
8862
8882
  * lifecycle to persist.
8863
8883
  */
8864
8884
  private _pendingPromotions;
8885
+ private _cacheVersion;
8886
+ private _linkedEntriesCache?;
8887
+ private _promotedViewsCache?;
8865
8888
  widgets: IBaseWidget[];
8866
- private _resolveLinkedPromotionByInputName;
8889
+ private _resolveLinkedPromotionBySubgraphInput;
8867
8890
  private _getLinkedPromotionEntries;
8891
+ private _hasMissingBoundSourceWidget;
8868
8892
  private _getPromotedViews;
8893
+ private _invalidatePromotedViewsCache;
8869
8894
  private _syncPromotions;
8870
8895
  private _buildPromotionReconcileState;
8871
8896
  private _buildPromotionPersistenceState;
@@ -8873,6 +8898,9 @@ export declare class ComfyApp {
8873
8898
  private _shouldPersistLinkedOnly;
8874
8899
  private _toPromotionEntries;
8875
8900
  private _getFallbackStoredEntries;
8901
+ private _pruneStaleAliasFallbackEntries;
8902
+ private _resolveConcretePromotionEntryKey;
8903
+ private _getConnectedPromotionEntryKeys;
8876
8904
  private _buildLinkedReconcileEntries;
8877
8905
  private _buildDisplayNameByViewKey;
8878
8906
  private _makePromotionEntryKey;
@@ -8887,6 +8915,7 @@ export declare class ComfyApp {
8887
8915
  subgraph: Subgraph, instanceData: ExportedSubgraphInstance);
8888
8916
  onTitleButtonClick(button: LGraphButton, canvas: LGraphCanvas): void;
8889
8917
  private _addSubgraphInputListeners;
8918
+ private _rebindInputSubgraphSlots;
8890
8919
  configure(info: ExportedSubgraphInstance): void;
8891
8920
  _internalConfigureAfterSlots(): void;
8892
8921
  private _resolveInputWidget;
@@ -8902,6 +8931,8 @@ export declare class ComfyApp {
8902
8931
  * @remarks Assertion is required to instantiate empty generic POJO.
8903
8932
  */
8904
8933
  addInput<TInput extends Partial<ISubgraphInput>>(name: string, type: ISlotType, inputProperties?: TInput): INodeInputSlot & TInput;
8934
+ getSlotFromWidget(widget: IBaseWidget | undefined): INodeInputSlot | undefined;
8935
+ getWidgetFromSlot(slot: INodeInputSlot): IBaseWidget | undefined;
8905
8936
  getInputLink(slot: number): LLink | null;
8906
8937
  /**
8907
8938
  * Finds the internal links connected to the given input slot inside the subgraph, and resolves the nodes / slots.
@@ -16424,6 +16455,7 @@ export declare class ComfyApp {
16424
16455
  'Comfy.Workflow.ShowMissingNodesWarning': z.ZodBoolean;
16425
16456
  'Comfy.Workflow.ShowMissingModelsWarning': z.ZodBoolean;
16426
16457
  'Comfy.Workflow.WarnBlueprintOverwrite': z.ZodBoolean;
16458
+ 'Comfy.Desktop.CloudNotificationShown': z.ZodBoolean;
16427
16459
  'Comfy.DisableFloatRounding': z.ZodBoolean;
16428
16460
  'Comfy.DisableSliders': z.ZodBoolean;
16429
16461
  'Comfy.DOMClippingEnabled': z.ZodBoolean;
@@ -17048,6 +17080,7 @@ export declare class ComfyApp {
17048
17080
  'Comfy.Workflow.ShowMissingNodesWarning': boolean;
17049
17081
  'Comfy.Workflow.ShowMissingModelsWarning': boolean;
17050
17082
  'Comfy.Workflow.WarnBlueprintOverwrite': boolean;
17083
+ 'Comfy.Desktop.CloudNotificationShown': boolean;
17051
17084
  'Comfy.DisableFloatRounding': boolean;
17052
17085
  'Comfy.DisableSliders': boolean;
17053
17086
  'Comfy.DOMClippingEnabled': boolean;
@@ -17599,6 +17632,7 @@ export declare class ComfyApp {
17599
17632
  'Comfy.Workflow.ShowMissingNodesWarning': boolean;
17600
17633
  'Comfy.Workflow.ShowMissingModelsWarning': boolean;
17601
17634
  'Comfy.Workflow.WarnBlueprintOverwrite': boolean;
17635
+ 'Comfy.Desktop.CloudNotificationShown': boolean;
17602
17636
  'Comfy.DisableFloatRounding': boolean;
17603
17637
  'Comfy.DisableSliders': boolean;
17604
17638
  'Comfy.DOMClippingEnabled': boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comfyorg/comfyui-frontend-types",
3
- "version": "1.41.19",
3
+ "version": "1.41.21",
4
4
  "types": "./index.d.ts",
5
5
  "files": [
6
6
  "index.d.ts"