@comfyorg/comfyui-frontend-types 1.28.3 → 1.28.4

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 +22 -20
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -987,7 +987,10 @@ export declare class ComfyApp {
987
987
  extensionManager: ExtensionManager;
988
988
  _nodeOutputs: Record<string, any>;
989
989
  nodePreviewImages: Record<string, string[]>;
990
+ private rootGraphInternal;
991
+ /** @deprecated Use {@link rootGraph} instead */
990
992
  get graph(): LGraph;
993
+ get rootGraph(): LGraph | undefined;
991
994
  canvas: LGraphCanvas;
992
995
  dragOverNode: LGraphNode | null;
993
996
  canvasEl: HTMLCanvasElement;
@@ -1074,6 +1077,7 @@ export declare class ComfyApp {
1074
1077
  static onClipspaceEditorClosed(): void;
1075
1078
  static copyToClipspace(node: LGraphNode): void;
1076
1079
  static pasteFromClipspace(node: LGraphNode): void;
1080
+ private addAfterConfigureHandler;
1077
1081
  /**
1078
1082
  * Set up the app on the page
1079
1083
  */
@@ -2180,6 +2184,7 @@ export declare class ComfyApp {
2180
2184
  * @see IWidget
2181
2185
  */
2182
2186
  declare interface IBaseWidget<TValue = boolean | number | string | object | undefined, TType extends string = string, TOptions extends IWidgetOptions<unknown> = IWidgetOptions<unknown>> {
2187
+ [symbol: symbol]: boolean;
2183
2188
  linkedWidgets?: IBaseWidget[];
2184
2189
  name: string;
2185
2190
  options: TOptions;
@@ -2909,6 +2914,8 @@ export declare class ComfyApp {
2909
2914
  property?: string;
2910
2915
  /** If `true`, an input socket will not be created for this widget. */
2911
2916
  socketless?: boolean;
2917
+ /** If `true`, the widget will not be rendered by the Vue renderer. */
2918
+ canvasOnly?: boolean;
2912
2919
  values?: TValues;
2913
2920
  callback?: IWidget['callback'];
2914
2921
  }
@@ -5342,13 +5349,6 @@ export declare class ComfyApp {
5342
5349
  disabledPattern?: CanvasPattern | null;
5343
5350
  }
5344
5351
 
5345
- declare interface LinkRenderOptions {
5346
- color?: CanvasColour;
5347
- flow?: boolean;
5348
- skipBorder?: boolean;
5349
- disabled?: boolean;
5350
- }
5351
-
5352
5352
  /** The path calculation that links follow */
5353
5353
  declare enum LinkRenderType {
5354
5354
  HIDDEN_LINK = -1,
@@ -5745,19 +5745,9 @@ export declare class ComfyApp {
5745
5745
  }
5746
5746
 
5747
5747
  declare class LitegraphLinkAdapter {
5748
- private graph;
5749
- private pathRenderer;
5750
- enableLayoutStoreWrites: boolean;
5751
- constructor(graph: LGraph);
5752
- /**
5753
- * Render a single link with all necessary data properly fetched
5754
- * Populates link.path for hit detection
5755
- */
5756
- renderLink(ctx: CanvasRenderingContext2D, link: LLink, context: LinkRenderContext, options?: LinkRenderOptions): void;
5757
- /**
5758
- * Convert litegraph link data to pure render format
5759
- */
5760
- private convertToLinkRenderData;
5748
+ readonly enableLayoutStoreWrites: boolean;
5749
+ private readonly pathRenderer;
5750
+ constructor(enableLayoutStoreWrites?: boolean);
5761
5751
  /**
5762
5752
  * Convert LinkDirection enum to Direction string
5763
5753
  */
@@ -6062,6 +6052,8 @@ export declare class ComfyApp {
6062
6052
  readonly inputIndex: number;
6063
6053
  readonly inputPos: Point;
6064
6054
  constructor(network: LinkNetwork, link: LLink, toType: 'input' | 'output', fromReroute?: Reroute | undefined, dragDirection?: LinkDirection);
6055
+ abstract canConnectToInput(inputNode: NodeLike, input: INodeInputSlot): boolean;
6056
+ abstract canConnectToOutput(outputNode: NodeLike, output: INodeOutputSlot): boolean;
6065
6057
  abstract connectToInput(node: LGraphNode, input: INodeInputSlot, events?: CustomEventTarget<LinkConnectorEventMap>): void;
6066
6058
  abstract connectToOutput(node: LGraphNode, output: INodeOutputSlot, events?: CustomEventTarget<LinkConnectorEventMap>): void;
6067
6059
  abstract connectToSubgraphInput(input: SubgraphInput, events?: CustomEventTarget<LinkConnectorEventMap>): void;
@@ -6503,6 +6495,16 @@ export declare class ComfyApp {
6503
6495
  readonly fromSlotIndex: number;
6504
6496
  /** The reroute that the link is being connected from. */
6505
6497
  readonly fromReroute?: Reroute;
6498
+ /**
6499
+ * Capability checks used for hit-testing and validation during drag.
6500
+ * Implementations should return `false` when a connection is not possible
6501
+ * rather than throwing.
6502
+ */
6503
+ canConnectToInput(node: NodeLike, input: INodeInputSlot): boolean;
6504
+ canConnectToOutput(node: NodeLike, output: INodeOutputSlot): boolean;
6505
+ /** Optional: only some links support validating subgraph IO or reroutes. */
6506
+ canConnectToSubgraphInput?(input: SubgraphInput): boolean;
6507
+ canConnectToReroute?(reroute: Reroute): boolean;
6506
6508
  connectToInput(node: LGraphNode, input: INodeInputSlot, events?: CustomEventTarget<LinkConnectorEventMap>): void;
6507
6509
  connectToOutput(node: LGraphNode, output: INodeOutputSlot, events?: CustomEventTarget<LinkConnectorEventMap>): void;
6508
6510
  connectToSubgraphInput(input: SubgraphInput, events?: CustomEventTarget<LinkConnectorEventMap>): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comfyorg/comfyui-frontend-types",
3
- "version": "1.28.3",
3
+ "version": "1.28.4",
4
4
  "types": "./index.d.ts",
5
5
  "files": [
6
6
  "index.d.ts"