@comfyorg/comfyui-frontend-types 1.44.12 → 1.44.14

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 +59 -35
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -101,7 +101,7 @@ declare class AssetWidget extends BaseWidget<IAssetWidget> implements IAssetWidg
101
101
  }
102
102
 
103
103
  declare interface AuthUserInfo {
104
- id: string;
104
+ id: UserId;
105
105
  }
106
106
 
107
107
  /** Dictionary of calls originating from ComfyUI core */
@@ -756,7 +756,7 @@ declare interface ClipboardPasteResult {
756
756
  /** Map: original reroute IDs to newly created reroutes */
757
757
  reroutes: Map<RerouteId, Reroute>;
758
758
  /** Map: original subgraph IDs to newly created subgraphs */
759
- subgraphs: Map<UUID, Subgraph>;
759
+ subgraphs: Map<SubgraphId, Subgraph>;
760
760
  }
761
761
 
762
762
  declare type Clipspace = {
@@ -1161,7 +1161,7 @@ export declare class ComfyApp {
1161
1161
  /** Whether the root graph has been initialized. Safe to check without triggering error logs. */
1162
1162
  get isGraphReady(): boolean;
1163
1163
  canvas: LGraphCanvas;
1164
- dragOverNode: LGraphNode | null;
1164
+ dragOverNode: Pick<LGraphNode, 'onDragDrop' | 'id'> | null;
1165
1165
  readonly canvasElRef: ShallowRef<HTMLCanvasElement | undefined, HTMLCanvasElement | undefined>;
1166
1166
  get canvasEl(): HTMLCanvasElement;
1167
1167
  private configuringGraphLevel;
@@ -2143,6 +2143,7 @@ export declare class ComfyApp {
2143
2143
  'Comfy.ModelLibrary.AutoLoadAll'?: boolean | undefined;
2144
2144
  'Comfy.ModelLibrary.NameFormat'?: "title" | "filename" | undefined;
2145
2145
  'Comfy.NodeSearchBoxImpl.NodePreview'?: boolean | undefined;
2146
+ 'Comfy.NodeSearchBoxImpl.FollowCursor'?: boolean | undefined;
2146
2147
  'Comfy.NodeSearchBoxImpl'?: "default" | "v1 (legacy)" | "litegraph (legacy)" | undefined;
2147
2148
  'Comfy.NodeSearchBoxImpl.ShowCategory'?: boolean | undefined;
2148
2149
  'Comfy.NodeSearchBoxImpl.ShowIdName'?: boolean | undefined;
@@ -2448,7 +2449,7 @@ export declare class ComfyApp {
2448
2449
  /** Links */
2449
2450
  declare interface ConnectingLink extends IInputOrOutput {
2450
2451
  node: LGraphNode;
2451
- slot: number;
2452
+ slot: SlotIndex;
2452
2453
  pos: Point;
2453
2454
  direction?: LinkDirection;
2454
2455
  afterRerouteId?: RerouteId;
@@ -2893,7 +2894,7 @@ export declare class ComfyApp {
2893
2894
  /** The graph that this node is a part of. */
2894
2895
  readonly graph: LGraph | Subgraph;
2895
2896
  inputs: {
2896
- linkId: number | null;
2897
+ linkId: LinkId | null;
2897
2898
  name: string;
2898
2899
  type: ISlotType;
2899
2900
  }[];
@@ -3004,7 +3005,7 @@ export declare class ComfyApp {
3004
3005
  * The ID of the actual subgraph definition.
3005
3006
  * @see {@link ExportedSubgraph.subgraphs}
3006
3007
  */
3007
- type: UUID;
3008
+ type: SubgraphId;
3008
3009
  /** Custom properties for this subgraph instance */
3009
3010
  properties?: Dictionary<NodeProperty | undefined>;
3010
3011
  }
@@ -3087,7 +3088,7 @@ export declare class ComfyApp {
3087
3088
  readonly fromSlot: INodeOutputSlot | INodeInputSlot;
3088
3089
  readonly fromPos: Point;
3089
3090
  readonly fromDirection: LinkDirection;
3090
- readonly fromSlotIndex: number;
3091
+ readonly fromSlotIndex: SlotIndex;
3091
3092
  readonly outputNodeId: NodeId;
3092
3093
  readonly outputNode?: LGraphNode;
3093
3094
  readonly outputSlot?: INodeOutputSlot;
@@ -3192,6 +3193,8 @@ export declare class ComfyApp {
3192
3193
  /** Internal; simplifies type definitions. */
3193
3194
  declare type GraphOrSubgraph = LGraph | Subgraph;
3194
3195
 
3196
+ declare type GroupId = number;
3197
+
3195
3198
  declare interface GroupNodeConfigEntry {
3196
3199
  input?: Record<string, {
3197
3200
  name?: string;
@@ -3577,7 +3580,7 @@ export declare class ComfyApp {
3577
3580
  }
3578
3581
 
3579
3582
  declare interface IFoundSlot extends IInputOrOutput {
3580
- slot: number;
3583
+ slot: SlotIndex;
3581
3584
  link_pos: Point;
3582
3585
  }
3583
3586
 
@@ -3687,7 +3690,7 @@ export declare class ComfyApp {
3687
3690
  declare interface INodeOutputSlot extends INodeSlot {
3688
3691
  links: LinkId[] | null;
3689
3692
  _data?: unknown;
3690
- slot_index?: number;
3693
+ slot_index?: SlotIndex;
3691
3694
  }
3692
3695
 
3693
3696
  declare interface INodePropertyInfo {
@@ -3876,7 +3879,7 @@ export declare class ComfyApp {
3876
3879
  */
3877
3880
  declare interface ISerialisedGraph extends BaseExportedGraph {
3878
3881
  last_node_id: NodeId;
3879
- last_link_id: number;
3882
+ last_link_id: LinkId;
3880
3883
  nodes: ISerialisedNode[];
3881
3884
  links: SerialisedLLinkArray[];
3882
3885
  floatingLinks?: SerialisableLLink[];
@@ -3887,7 +3890,7 @@ export declare class ComfyApp {
3887
3890
 
3888
3891
  /** Serialised LGraphGroup */
3889
3892
  declare interface ISerialisedGroup {
3890
- id: number;
3893
+ id: GroupId;
3891
3894
  title: string;
3892
3895
  bounding: number[];
3893
3896
  color?: string;
@@ -4213,7 +4216,7 @@ export declare class ComfyApp {
4213
4216
  get state(): LGraphState;
4214
4217
  set state(value: LGraphState);
4215
4218
  readonly events: CustomEventTarget<LGraphEventMap, "configuring" | "configured" | "subgraph-created" | "convert-to-subgraph" | "open-subgraph">;
4216
- readonly _subgraphs: Map<UUID, Subgraph>;
4219
+ readonly _subgraphs: Map<SubgraphId, Subgraph>;
4217
4220
  _nodes: (LGraphNode | SubgraphNode)[];
4218
4221
  _nodes_by_id: Record<NodeId, LGraphNode>;
4219
4222
  _nodes_in_order: LGraphNode[];
@@ -4289,7 +4292,7 @@ export declare class ComfyApp {
4289
4292
  * Removes all nodes from this graph
4290
4293
  */
4291
4294
  clear(): void;
4292
- get subgraphs(): Map<UUID, Subgraph>;
4295
+ get subgraphs(): Map<SubgraphId, Subgraph>;
4293
4296
  get nodes(): (LGraphNode | SubgraphNode)[];
4294
4297
  get groups(): LGraphGroup[];
4295
4298
  /**
@@ -5615,8 +5618,8 @@ export declare class ComfyApp {
5615
5618
  declare interface LGraphExtra extends Dictionary<unknown> {
5616
5619
  reroutes?: SerialisableReroute[];
5617
5620
  linkExtensions?: {
5618
- id: number;
5619
- parentId: number | undefined;
5621
+ id: LinkId;
5622
+ parentId: RerouteId | undefined;
5620
5623
  }[];
5621
5624
  ds?: DragAndScaleState;
5622
5625
  workflowRendererVersion?: RendererType;
@@ -5629,7 +5632,7 @@ export declare class ComfyApp {
5629
5632
  static resizeLength: number;
5630
5633
  static padding: number;
5631
5634
  static defaultColour: string;
5632
- id: number;
5635
+ id: GroupId;
5633
5636
  color?: string;
5634
5637
  title: string;
5635
5638
  font?: string;
@@ -5643,7 +5646,7 @@ export declare class ComfyApp {
5643
5646
  graph?: LGraph;
5644
5647
  flags: IGraphGroupFlags;
5645
5648
  selected?: boolean;
5646
- constructor(title?: string, id?: number);
5649
+ constructor(title?: string, id?: GroupId);
5647
5650
  /** @inheritdoc {@link IColorable.setColorOption} */
5648
5651
  setColorOption(colorOption: ColorOption | null): void;
5649
5652
  /** @inheritdoc {@link IColorable.getColorOption} */
@@ -5684,7 +5687,7 @@ export declare class ComfyApp {
5684
5687
  * @param maxDepth Maximum recursion depth for nested groups. Use 1 to skip nested group computation.
5685
5688
  * @param visited Set of already visited group IDs to prevent redundant computation.
5686
5689
  */
5687
- recomputeInsideNodes(maxDepth?: number, visited?: Set<number>): void;
5690
+ recomputeInsideNodes(maxDepth?: number, visited?: Set<GroupId>): void;
5688
5691
  /**
5689
5692
  * Resizes and moves the group to neatly fit all given {@link objects}.
5690
5693
  * @param objects All objects that should be inside the group
@@ -6036,7 +6039,7 @@ export declare class ComfyApp {
6036
6039
  /**
6037
6040
  * sets the output data type, useful when you want to be able to overwrite the data type
6038
6041
  */
6039
- setOutputDataType(slot: number, type: ISlotType): void;
6042
+ setOutputDataType(slot: SlotIndex, type: ISlotType): void;
6040
6043
  /**
6041
6044
  * Retrieves the input data (data traveling through the connection) from one slot
6042
6045
  * @param slot
@@ -6049,7 +6052,7 @@ export declare class ComfyApp {
6049
6052
  * @param slot
6050
6053
  * @returns datatype in string format
6051
6054
  */
6052
- getInputDataType(slot: number): ISlotType | null;
6055
+ getInputDataType(slot: SlotIndex): ISlotType | null;
6053
6056
  /**
6054
6057
  * Retrieves the input data from one slot using its name instead of slot number
6055
6058
  * @param slot_name
@@ -6489,7 +6492,7 @@ export declare class ComfyApp {
6489
6492
  * @param outputSlotIndex Output slot index
6490
6493
  * @returns Position of the output slot
6491
6494
  */
6492
- getOutputPos(outputSlotIndex: number): Point;
6495
+ getOutputPos(outputSlotIndex: SlotIndex): Point;
6493
6496
  /**
6494
6497
  * Get slot position using layout tree if available, fallback to node's position * Unified implementation used by both LitegraphLinkAdapter and useLinkLayoutSync
6495
6498
  * @param slotIndex The slot index
@@ -6698,10 +6701,10 @@ export declare class ComfyApp {
6698
6701
  }
6699
6702
 
6700
6703
  declare interface LGraphState {
6701
- lastGroupId: number;
6704
+ lastGroupId: GroupId;
6702
6705
  lastNodeId: number;
6703
- lastLinkId: number;
6704
- lastRerouteId: number;
6706
+ lastLinkId: LinkId;
6707
+ lastRerouteId: RerouteId;
6705
6708
  }
6706
6709
 
6707
6710
  declare type LGraphTriggerAction = LGraphTriggerEvent['type'];
@@ -6929,7 +6932,7 @@ export declare class ComfyApp {
6929
6932
  readonly links: Map<LinkId, LLink>;
6930
6933
  readonly reroutes: Map<RerouteId, Reroute>;
6931
6934
  addFloatingLink(link: LLink): LLink;
6932
- removeReroute(id: number): unknown;
6935
+ removeReroute(id: RerouteId): unknown;
6933
6936
  removeFloatingLink(link: LLink): void;
6934
6937
  }
6935
6938
 
@@ -6979,7 +6982,7 @@ export declare class ComfyApp {
6979
6982
  /** Output node ID */
6980
6983
  readonly origin_id: NodeId | undefined;
6981
6984
  /** Output slot index */
6982
- readonly origin_slot: number | undefined;
6985
+ readonly origin_slot: SlotIndex | undefined;
6983
6986
  }
6984
6987
 
6985
6988
  declare const LiteGraph_2: LiteGraphGlobal;
@@ -7671,7 +7674,7 @@ export declare class ComfyApp {
7671
7674
  readonly fromSlot: INodeOutputSlot;
7672
7675
  readonly fromPos: Point;
7673
7676
  readonly fromDirection: LinkDirection;
7674
- readonly fromSlotIndex: number;
7677
+ readonly fromSlotIndex: SlotIndex;
7675
7678
  disconnectOnDrop: boolean;
7676
7679
  readonly disconnectOrigin: Point;
7677
7680
  constructor(network: LinkNetwork, link: LLink, fromReroute?: Reroute, dragDirection?: LinkDirection, startPoint?: Point);
@@ -7713,7 +7716,7 @@ export declare class ComfyApp {
7713
7716
  abstract readonly fromSlot: INodeOutputSlot | INodeInputSlot;
7714
7717
  abstract readonly fromPos: Point;
7715
7718
  abstract readonly fromDirection: LinkDirection;
7716
- abstract readonly fromSlotIndex: number;
7719
+ abstract readonly fromSlotIndex: SlotIndex;
7717
7720
  readonly outputNodeId: NodeId;
7718
7721
  readonly outputNode: LGraphNode;
7719
7722
  readonly outputSlot: INodeOutputSlot;
@@ -7746,7 +7749,7 @@ export declare class ComfyApp {
7746
7749
  readonly fromSlot: INodeInputSlot;
7747
7750
  readonly fromPos: Point;
7748
7751
  readonly fromDirection: LinkDirection;
7749
- readonly fromSlotIndex: number;
7752
+ readonly fromSlotIndex: SlotIndex;
7750
7753
  constructor(network: LinkNetwork, link: LLink, fromReroute?: Reroute, dragDirection?: LinkDirection);
7751
7754
  canConnectToInput(): false;
7752
7755
  canConnectToOutput(outputNode: NodeLike, output: INodeOutputSlot | SubgraphIO): boolean;
@@ -8315,7 +8318,7 @@ export declare class ComfyApp {
8315
8318
  /** The slot that the link is being connected from. */
8316
8319
  readonly fromSlot: INodeOutputSlot | INodeInputSlot | SubgraphInput | SubgraphOutput;
8317
8320
  /** The index of the slot that the link is being connected from. */
8318
- readonly fromSlotIndex: number;
8321
+ readonly fromSlotIndex: SlotIndex;
8319
8322
  /** The reroute that the link is being connected from. */
8320
8323
  readonly fromReroute?: Reroute;
8321
8324
  /**
@@ -8757,6 +8760,9 @@ export declare class ComfyApp {
8757
8760
  declare enum SlotDirection {
8758
8761
  }
8759
8762
 
8763
+ /** Index of an input or output slot on a node. */
8764
+ declare type SlotIndex = number;
8765
+
8760
8766
  /** @see RenderShape */
8761
8767
  declare enum SlotShape {
8762
8768
  Box = 1,
@@ -8889,6 +8895,12 @@ export declare class ComfyApp {
8889
8895
  };
8890
8896
  }
8891
8897
 
8898
+ /**
8899
+ * Unique identifier for a subgraph definition. Structurally a {@link UUID};
8900
+ * provided as a domain-specific alias for clarity at adoption sites.
8901
+ */
8902
+ declare type SubgraphId = UUID;
8903
+
8892
8904
  /**
8893
8905
  * An input "slot" from a parent graph into a subgraph.
8894
8906
  *
@@ -9073,7 +9085,7 @@ export declare class ComfyApp {
9073
9085
  /** The definition of this subgraph; how its nodes are configured, etc. */
9074
9086
  readonly subgraph: Subgraph;
9075
9087
  inputs: (INodeInputSlot & Partial<ISubgraphInput>)[];
9076
- readonly type: UUID;
9088
+ readonly type: SubgraphId;
9077
9089
  readonly isVirtualNode: true;
9078
9090
  graph: GraphOrSubgraph | null;
9079
9091
  get rootGraph(): LGraph;
@@ -9431,7 +9443,7 @@ export declare class ComfyApp {
9431
9443
  readonly fromReroute?: Reroute | undefined;
9432
9444
  dragDirection: LinkDirection;
9433
9445
  readonly toType = "input";
9434
- readonly fromSlotIndex: number;
9446
+ readonly fromSlotIndex: SlotIndex;
9435
9447
  readonly fromPos: Point;
9436
9448
  fromDirection: LinkDirection;
9437
9449
  readonly existingLink?: LLink;
@@ -9460,7 +9472,7 @@ export declare class ComfyApp {
9460
9472
  dragDirection: LinkDirection;
9461
9473
  readonly toType = "input";
9462
9474
  readonly fromPos: Point;
9463
- readonly fromSlotIndex: number;
9475
+ readonly fromSlotIndex: SlotIndex;
9464
9476
  fromDirection: LinkDirection;
9465
9477
  constructor(network: LinkNetwork, node: LGraphNode, fromSlot: INodeOutputSlot, fromReroute?: Reroute | undefined, dragDirection?: LinkDirection);
9466
9478
  canConnectToInput(inputNode: NodeLike, input: INodeInputSlot): boolean;
@@ -9486,7 +9498,7 @@ export declare class ComfyApp {
9486
9498
  dragDirection: LinkDirection;
9487
9499
  readonly toType = "output";
9488
9500
  readonly fromPos: Point;
9489
- readonly fromSlotIndex: number;
9501
+ readonly fromSlotIndex: SlotIndex;
9490
9502
  fromDirection: LinkDirection;
9491
9503
  constructor(network: LinkNetwork, node: SubgraphOutputNode, fromSlot: SubgraphOutput, fromReroute?: Reroute | undefined, dragDirection?: LinkDirection);
9492
9504
  canConnectToInput(): false;
@@ -9509,7 +9521,7 @@ export declare class ComfyApp {
9509
9521
  dragDirection: LinkDirection;
9510
9522
  readonly toType = "output";
9511
9523
  readonly fromPos: Point;
9512
- readonly fromSlotIndex: number;
9524
+ readonly fromSlotIndex: SlotIndex;
9513
9525
  fromDirection: LinkDirection;
9514
9526
  constructor(network: LinkNetwork, node: LGraphNode, fromSlot: INodeInputSlot, fromReroute?: Reroute | undefined, dragDirection?: LinkDirection);
9515
9527
  canConnectToInput(): false;
@@ -9647,6 +9659,15 @@ export declare class ComfyApp {
9647
9659
  rename(newPath: string): Promise<UserFile>;
9648
9660
  }
9649
9661
 
9662
+ /**
9663
+ * Identifier for an authenticated user.
9664
+ *
9665
+ * Backed by the `id` claim returned from the auth provider, which is always
9666
+ * a string. This alias names that primitive at use sites (auth store,
9667
+ * workspace member APIs) without changing structural typing.
9668
+ */
9669
+ declare type UserId = string;
9670
+
9650
9671
  declare const useWorkflowStore: StoreDefinition<"workflow", Pick<{
9651
9672
  activeWorkflow: Ref< {
9652
9673
  isLoaded: true;
@@ -53547,6 +53568,7 @@ export declare class ComfyApp {
53547
53568
  'Comfy.ModelLibrary.AutoLoadAll': z.ZodBoolean;
53548
53569
  'Comfy.ModelLibrary.NameFormat': z.ZodEnum<["filename", "title"]>;
53549
53570
  'Comfy.NodeSearchBoxImpl.NodePreview': z.ZodBoolean;
53571
+ 'Comfy.NodeSearchBoxImpl.FollowCursor': z.ZodBoolean;
53550
53572
  'Comfy.NodeSearchBoxImpl': z.ZodEnum<["default", "v1 (legacy)", "litegraph (legacy)"]>;
53551
53573
  'Comfy.NodeSearchBoxImpl.ShowCategory': z.ZodBoolean;
53552
53574
  'Comfy.NodeSearchBoxImpl.ShowIdName': z.ZodBoolean;
@@ -54155,6 +54177,7 @@ export declare class ComfyApp {
54155
54177
  'Comfy.ModelLibrary.AutoLoadAll': boolean;
54156
54178
  'Comfy.ModelLibrary.NameFormat': "title" | "filename";
54157
54179
  'Comfy.NodeSearchBoxImpl.NodePreview': boolean;
54180
+ 'Comfy.NodeSearchBoxImpl.FollowCursor': boolean;
54158
54181
  'Comfy.NodeSearchBoxImpl': "default" | "v1 (legacy)" | "litegraph (legacy)";
54159
54182
  'Comfy.NodeSearchBoxImpl.ShowCategory': boolean;
54160
54183
  'Comfy.NodeSearchBoxImpl.ShowIdName': boolean;
@@ -54696,6 +54719,7 @@ export declare class ComfyApp {
54696
54719
  'Comfy.ModelLibrary.AutoLoadAll': boolean;
54697
54720
  'Comfy.ModelLibrary.NameFormat': "title" | "filename";
54698
54721
  'Comfy.NodeSearchBoxImpl.NodePreview': boolean;
54722
+ 'Comfy.NodeSearchBoxImpl.FollowCursor': boolean;
54699
54723
  'Comfy.NodeSearchBoxImpl': "default" | "v1 (legacy)" | "litegraph (legacy)";
54700
54724
  'Comfy.NodeSearchBoxImpl.ShowCategory': boolean;
54701
54725
  'Comfy.NodeSearchBoxImpl.ShowIdName': boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comfyorg/comfyui-frontend-types",
3
- "version": "1.44.12",
3
+ "version": "1.44.14",
4
4
  "types": "./index.d.ts",
5
5
  "files": [
6
6
  "index.d.ts"