@comfyorg/comfyui-frontend-types 1.47.6 → 1.47.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 +76 -31
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -2340,7 +2340,6 @@ export declare class ComfyApp {
2340
2340
  'Comfy.Canvas.MouseWheelScroll'?: string | undefined;
2341
2341
  'Comfy.VueNodes.Enabled'?: boolean | undefined;
2342
2342
  'Comfy.AppBuilder.VueNodeSwitchDismissed'?: boolean | undefined;
2343
- 'Comfy.VueNodes.AutoScaleLayout'?: boolean | undefined;
2344
2343
  'Comfy.Assets.UseAssetAPI'?: boolean | undefined;
2345
2344
  'Comfy.Queue.QPOV2'?: boolean | undefined;
2346
2345
  'Comfy.Queue.ShowRunProgressBar'?: boolean | undefined;
@@ -4041,13 +4040,15 @@ export declare class ComfyApp {
4041
4040
  value: string;
4042
4041
  }
4043
4042
 
4044
- declare type ISerialisableNodeInput = Omit<INodeInputSlot, 'boundingRect' | 'widget'> & {
4043
+ declare type ISerialisableNodeInput = Omit<INodeInputSlot, 'boundingRect' | 'widget' | 'link' | '_floatingLinks'> & {
4044
+ link?: number | null;
4045
4045
  widget?: {
4046
4046
  name: string;
4047
4047
  };
4048
4048
  };
4049
4049
 
4050
- declare type ISerialisableNodeOutput = Omit<INodeOutputSlot, 'boundingRect' | '_data'> & {
4050
+ declare type ISerialisableNodeOutput = Omit<INodeOutputSlot, 'boundingRect' | '_data' | 'links' | '_floatingLinks'> & {
4051
+ links?: number[] | null;
4051
4052
  widget?: {
4052
4053
  name: string;
4053
4054
  };
@@ -4059,7 +4060,7 @@ export declare class ComfyApp {
4059
4060
  */
4060
4061
  declare interface ISerialisedGraph extends BaseExportedGraph {
4061
4062
  last_node_id: SerializedNodeId;
4062
- last_link_id: LinkId;
4063
+ last_link_id: number;
4063
4064
  nodes: ISerialisedNode[];
4064
4065
  links: SerialisedLLinkArray[];
4065
4066
  floatingLinks?: SerialisableLLink[];
@@ -4261,6 +4262,14 @@ export declare class ComfyApp {
4261
4262
  socketless?: boolean;
4262
4263
  /** If `true`, the widget will not be rendered by the Vue renderer. */
4263
4264
  canvasOnly?: boolean;
4265
+ /**
4266
+ * If `true`, the widget still renders on the node but is omitted from the
4267
+ * right side panel. Unlike {@link IWidgetOptions.canvasOnly}, the node body
4268
+ * keeps rendering it via the Vue renderer. Used for widgets that hold
4269
+ * non-syncable state (e.g. a Three.js viewport) where a second instance in
4270
+ * the panel would diverge from the one on the node.
4271
+ */
4272
+ hideInPanel?: boolean;
4264
4273
  /** Used as a temporary override for determining the asset type in vue mode*/
4265
4274
  nodeType?: string;
4266
4275
  /**
@@ -4446,8 +4455,8 @@ export declare class ComfyApp {
4446
4455
  get last_node_id(): number;
4447
4456
  set last_node_id(value: number);
4448
4457
  /** @deprecated See {@link state}.{@link LGraphState.lastLinkId lastLinkId} */
4449
- get last_link_id(): number;
4450
- set last_link_id(value: number);
4458
+ get last_link_id(): LinkId;
4459
+ set last_link_id(value: LinkId);
4451
4460
  onNodeAdded?(node: LGraphNode): void;
4452
4461
  onNodeRemoved?(node: LGraphNode): void;
4453
4462
  onTrigger?: LGraphTriggerHandler;
@@ -4687,9 +4696,9 @@ export declare class ComfyApp {
4687
4696
  * @param pos Position in graph space
4688
4697
  * @param before The existing link segment (reroute, link) that will be after this reroute,
4689
4698
  * going from the node output to input.
4690
- * @returns The newly created reroute - typically ignored.
4699
+ * @returns The newly created reroute, or undefined when the segment cannot be resolved.
4691
4700
  */
4692
- createReroute(pos: Point, before: LinkSegment): Reroute;
4701
+ createReroute(pos: Point, before: LinkSegment): Reroute | undefined;
4693
4702
  /**
4694
4703
  * Removes a reroute from the graph
4695
4704
  * @param id ID of reroute to remove
@@ -7106,7 +7115,9 @@ export declare class ComfyApp {
7106
7115
  CENTER = 5
7107
7116
  }
7108
7117
 
7109
- declare type LinkId = number;
7118
+ export declare type LinkId = number & {
7119
+ readonly __brand: 'LinkId';
7120
+ };
7110
7121
 
7111
7122
  /** The marker in the middle of a link */
7112
7123
  declare enum LinkMarkerShape {
@@ -7185,7 +7196,7 @@ export declare class ComfyApp {
7185
7196
  */
7186
7197
  declare class LiteGraphGlobal {
7187
7198
  SlotShape: typeof SlotShape;
7188
- SlotDirection: typeof SlotDirection;
7199
+ SlotDirection: typeof SlotDirection_2;
7189
7200
  SlotType: typeof SlotType;
7190
7201
  LabelPosition: typeof LabelPosition;
7191
7202
  /** Used in serialised graphs at one point. */
@@ -8227,6 +8238,8 @@ export declare class ComfyApp {
8227
8238
  localNodeId: NodeId;
8228
8239
  } | null;
8229
8240
 
8241
+ declare type PaymentIntentSource = 'subscription_required' | 'out_of_credits' | 'top_up_blocked' | 'deep_link' | 'subscribe_to_run' | 'subscribe_now_button' | 'upgrade_to_add_credits' | 'settings_billing_panel' | 'avatar_menu_plans' | 'team_members_panel' | 'invite_member_upsell' | 'upload_model_upgrade' | 'team_upgrade_resume';
8242
+
8230
8243
  declare interface PendingWarnings {
8231
8244
  missingNodeTypes?: MissingNodeType[];
8232
8245
  missingModelCandidates?: MissingModelCandidate[];
@@ -8255,7 +8268,7 @@ export declare class ComfyApp {
8255
8268
  * May contain other {@link Positionable} objects.
8256
8269
  */
8257
8270
  declare interface Positionable extends Parent<Positionable>, HasBoundingRect {
8258
- readonly id: NodeId | RerouteId | number;
8271
+ readonly id: NodeId | RerouteId | GroupId;
8259
8272
  /**
8260
8273
  * Position in graph coordinates. This may be the top-left corner,
8261
8274
  * the centre, or another point depending on concrete type.
@@ -8600,7 +8613,6 @@ export declare class ComfyApp {
8600
8613
  * and a `WeakRef` to a {@link LinkNetwork} to resolve them.
8601
8614
  */
8602
8615
  declare class Reroute implements Positionable, LinkSegment, Serialisable<SerialisableReroute> {
8603
- readonly id: RerouteId;
8604
8616
  static radius: number;
8605
8617
  /** Maximum distance from reroutes to their bezier curve control points. */
8606
8618
  static maxSplineOffset: number;
@@ -8608,6 +8620,7 @@ export declare class ComfyApp {
8608
8620
  static slotRadius: number;
8609
8621
  /** Distance from reroute centre to slot centre. */
8610
8622
  static get slotOffset(): number;
8623
+ readonly id: RerouteId;
8611
8624
  /** The network this reroute belongs to. Contains all valid links and reroutes. */
8612
8625
  private readonly network;
8613
8626
  private parentIdInternal?;
@@ -8784,7 +8797,9 @@ export declare class ComfyApp {
8784
8797
  asSerialisable(): SerialisableReroute;
8785
8798
  }
8786
8799
 
8787
- declare type RerouteId = number;
8800
+ export declare type RerouteId = number & {
8801
+ readonly __brand: 'RerouteId';
8802
+ };
8788
8803
 
8789
8804
  declare type ResolvedConnection = BaseResolvedConnection & ((ResolvedSubgraphInput & ResolvedNormalOutput) | (ResolvedNormalInput & ResolvedSubgraphOutput) | (ResolvedNormalInput & ResolvedNormalOutput));
8790
8805
 
@@ -8857,7 +8872,7 @@ export declare class ComfyApp {
8857
8872
  declare interface SerialisableGraph extends BaseExportedGraph {
8858
8873
  /** Schema version. @remarks Version bump should add to const union, which is used to narrow type during deserialise. */
8859
8874
  version: 0 | 1;
8860
- state: LGraphState;
8875
+ state: SerialisableGraphState;
8861
8876
  groups?: ISerialisedGroup[];
8862
8877
  nodes?: ISerialisedNode[];
8863
8878
  links?: SerialisableLLink[];
@@ -8866,9 +8881,16 @@ export declare class ComfyApp {
8866
8881
  extra?: LGraphExtra;
8867
8882
  }
8868
8883
 
8884
+ declare interface SerialisableGraphState {
8885
+ lastGroupId: GroupId;
8886
+ lastNodeId: number;
8887
+ lastLinkId: number;
8888
+ lastRerouteId: number;
8889
+ }
8890
+
8869
8891
  declare interface SerialisableLLink {
8870
8892
  /** Link ID */
8871
- id: LinkId;
8893
+ id: number;
8872
8894
  /** Output node ID */
8873
8895
  origin_id: SerializedNodeId;
8874
8896
  /** Output slot index */
@@ -8880,19 +8902,19 @@ export declare class ComfyApp {
8880
8902
  /** Data type of the link */
8881
8903
  type: ISlotType;
8882
8904
  /** ID of the last reroute (from input to output) that this link passes through, otherwise `undefined` */
8883
- parentId?: RerouteId;
8905
+ parentId?: number;
8884
8906
  }
8885
8907
 
8886
8908
  declare interface SerialisableReroute {
8887
- id: RerouteId;
8888
- parentId?: RerouteId;
8909
+ id: number;
8910
+ parentId?: number;
8889
8911
  pos: Point;
8890
- linkIds: LinkId[];
8912
+ linkIds: number[];
8891
8913
  floating?: FloatingRerouteSlot;
8892
8914
  }
8893
8915
 
8894
8916
  declare type SerialisedLLinkArray = [
8895
- id: LinkId,
8917
+ id: number,
8896
8918
  origin_id: SerializedNodeId,
8897
8919
  origin_slot: number,
8898
8920
  target_id: SerializedNodeId,
@@ -8916,6 +8938,7 @@ export declare class ComfyApp {
8916
8938
  defaultValue: TValue | (() => TValue);
8917
8939
  defaultsByInstallVersion?: Record<`${number}.${number}.${number}`, TValue>;
8918
8940
  onChange?(newValue: TValue, oldValue?: TValue): void;
8941
+ telemetry?: SettingTelemetryOptions;
8919
8942
  category?: string[];
8920
8943
  experimental?: boolean;
8921
8944
  deprecated?: boolean;
@@ -8928,6 +8951,14 @@ export declare class ComfyApp {
8928
8951
 
8929
8952
  export declare type Settings = z.infer<typeof zSettings>;
8930
8953
 
8954
+ declare type SettingTelemetryOptions = {
8955
+ trackChanges: false;
8956
+ includeValues?: never;
8957
+ } | {
8958
+ trackChanges?: true;
8959
+ includeValues?: boolean;
8960
+ };
8961
+
8931
8962
  declare type ShareableAssetsResponse = z.infer<typeof zShareableAssetsResponse>;
8932
8963
 
8933
8964
  declare interface ShowDialogOptions<H extends Component = Component, B extends Component = Component, F extends Component = Component> {
@@ -8999,12 +9030,19 @@ export declare class ComfyApp {
8999
9030
  renderingColor(colorContext: DefaultConnectionColors): CanvasColour;
9000
9031
  }
9001
9032
 
9033
+ export declare type SlotDirection = 'input' | 'output';
9034
+
9002
9035
  /** @see LinkDirection */
9003
- declare enum SlotDirection {
9036
+ declare enum SlotDirection_2 {
9004
9037
  }
9005
9038
 
9006
- /** Index of an input or output slot on a node. */
9007
- declare type SlotIndex = number;
9039
+ export declare type SlotId = string & {
9040
+ readonly __brand: 'SlotId';
9041
+ };
9042
+
9043
+ export declare function slotId(nodeId: NodeId, direction: SlotDirection, index: SlotIndex): SlotId;
9044
+
9045
+ export declare type SlotIndex = number;
9008
9046
 
9009
9047
  /** @see RenderShape */
9010
9048
  declare enum SlotShape {
@@ -9228,7 +9266,7 @@ export declare class ComfyApp {
9228
9266
  /** The data type this slot uses. Unlike nodes, this does not support legacy numeric types. */
9229
9267
  type: string;
9230
9268
  /** Links connected to this slot, or `undefined` if not connected. An output slot should only ever have one link. */
9231
- linkIds?: LinkId[];
9269
+ linkIds?: number[];
9232
9270
  }
9233
9271
 
9234
9272
  declare abstract class SubgraphIONodeBase<TSlot extends SubgraphInput | SubgraphOutput> implements Positionable, Hoverable, Serialisable<ExportedSubgraphIONode> {
@@ -9493,7 +9531,15 @@ export declare class ComfyApp {
9493
9531
  editorAlpha?: number;
9494
9532
  }
9495
9533
 
9496
- declare type SubscriptionDialogReason = 'subscription_required' | 'out_of_credits' | 'top_up_blocked' | 'deep_link';
9534
+ declare interface SubscriptionDialogOptions {
9535
+ reason?: PaymentIntentSource;
9536
+ /**
9537
+ * Forces the unified pricing dialog to open on a specific plan tab,
9538
+ * overriding the workspace-derived default (e.g. an "Upgrade to Team" CTA
9539
+ * always lands on the team tab even from a personal workspace).
9540
+ */
9541
+ planMode?: 'personal' | 'team';
9542
+ }
9497
9543
 
9498
9544
  export declare type SystemStats = z.infer<typeof zSystemStats>;
9499
9545
 
@@ -9694,6 +9740,8 @@ export declare class ComfyApp {
9694
9740
  connectToRerouteOutput(): void;
9695
9741
  }
9696
9742
 
9743
+ export declare function toLinkId(value: number): LinkId;
9744
+
9697
9745
  export declare function toNodeId(value: ToNodeIdInput): NodeId;
9698
9746
 
9699
9747
  declare type ToNodeIdInput = number | (string & {
@@ -9772,6 +9820,8 @@ export declare class ComfyApp {
9772
9820
  tooltip?: string;
9773
9821
  }
9774
9822
 
9823
+ export declare function toRerouteId(value: number): RerouteId;
9824
+
9775
9825
  /**
9776
9826
  * Widget for hierarchical tree selection.
9777
9827
  * This widget only has a Vue implementation.
@@ -9796,9 +9846,7 @@ export declare class ComfyApp {
9796
9846
  showApiNodesSignInDialog: (apiNodeNames: string[]) => Promise<boolean>;
9797
9847
  showSignInDialog: () => Promise<boolean>;
9798
9848
  showPublishDialog: () => Promise<void>;
9799
- showSubscriptionRequiredDialog: (options?: {
9800
- reason?: SubscriptionDialogReason;
9801
- }) => Promise<void>;
9849
+ showSubscriptionRequiredDialog: (options?: SubscriptionDialogOptions) => Promise<void>;
9802
9850
  showTopUpCreditsDialog: (options?: {
9803
9851
  isInsufficientCredits?: boolean;
9804
9852
  }) => Promise<DialogInstance | undefined>;
@@ -50099,7 +50147,6 @@ export declare class ComfyApp {
50099
50147
  'Comfy.Canvas.MouseWheelScroll': z.ZodString;
50100
50148
  'Comfy.VueNodes.Enabled': z.ZodBoolean;
50101
50149
  'Comfy.AppBuilder.VueNodeSwitchDismissed': z.ZodBoolean;
50102
- 'Comfy.VueNodes.AutoScaleLayout': z.ZodBoolean;
50103
50150
  'Comfy.Assets.UseAssetAPI': z.ZodBoolean;
50104
50151
  'Comfy.Queue.QPOV2': z.ZodBoolean;
50105
50152
  'Comfy.Queue.ShowRunProgressBar': z.ZodBoolean;
@@ -50644,7 +50691,6 @@ export declare class ComfyApp {
50644
50691
  'Comfy.Canvas.MouseWheelScroll': string;
50645
50692
  'Comfy.VueNodes.Enabled': boolean;
50646
50693
  'Comfy.AppBuilder.VueNodeSwitchDismissed': boolean;
50647
- 'Comfy.VueNodes.AutoScaleLayout': boolean;
50648
50694
  'Comfy.Assets.UseAssetAPI': boolean;
50649
50695
  'Comfy.Queue.QPOV2': boolean;
50650
50696
  'Comfy.Queue.ShowRunProgressBar': boolean;
@@ -51186,7 +51232,6 @@ export declare class ComfyApp {
51186
51232
  'Comfy.Canvas.MouseWheelScroll': string;
51187
51233
  'Comfy.VueNodes.Enabled': boolean;
51188
51234
  'Comfy.AppBuilder.VueNodeSwitchDismissed': boolean;
51189
- 'Comfy.VueNodes.AutoScaleLayout': boolean;
51190
51235
  'Comfy.Assets.UseAssetAPI': boolean;
51191
51236
  'Comfy.Queue.QPOV2': boolean;
51192
51237
  'Comfy.Queue.ShowRunProgressBar': boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comfyorg/comfyui-frontend-types",
3
- "version": "1.47.6",
3
+ "version": "1.47.7",
4
4
  "types": "./index.d.ts",
5
5
  "files": [
6
6
  "index.d.ts"