@comfyorg/comfyui-frontend-types 1.32.0 → 1.32.2

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 +38 -8
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1139,10 +1139,11 @@ export declare class ComfyApp {
1139
1139
  loadTemplateData(templateData: any): void;
1140
1140
  private showMissingNodesError;
1141
1141
  private showMissingModelsError;
1142
- loadGraphData(graphData?: ComfyWorkflowJSON, clean?: boolean, restore_view?: boolean, workflow?: string | null | ComfyWorkflow, { showMissingNodesDialog, showMissingModelsDialog, checkForRerouteMigration }?: {
1143
- showMissingNodesDialog?: boolean | undefined;
1144
- showMissingModelsDialog?: boolean | undefined;
1145
- checkForRerouteMigration?: boolean | undefined;
1142
+ loadGraphData(graphData?: ComfyWorkflowJSON, clean?: boolean, restore_view?: boolean, workflow?: string | null | ComfyWorkflow, options?: {
1143
+ showMissingNodesDialog?: boolean;
1144
+ showMissingModelsDialog?: boolean;
1145
+ checkForRerouteMigration?: boolean;
1146
+ openSource?: WorkflowOpenSource;
1146
1147
  }): Promise<void>;
1147
1148
  graphToPrompt(graph?: LGraph): Promise<{
1148
1149
  workflow: ComfyWorkflowJSON;
@@ -1154,7 +1155,7 @@ export declare class ComfyApp {
1154
1155
  * Loads workflow data from the specified file
1155
1156
  * @param {File} file
1156
1157
  */
1157
- handleFile(file: File): Promise<void>;
1158
+ handleFile(file: File, openSource?: WorkflowOpenSource): Promise<void>;
1158
1159
  isApiJson(data: unknown): boolean;
1159
1160
  loadApiJson(apiData: ComfyApiWorkflow, fileName: string): void;
1160
1161
  /**
@@ -1245,7 +1246,7 @@ export declare class ComfyApp {
1245
1246
 
1246
1247
  declare interface ComfyCommand {
1247
1248
  id: string;
1248
- function: () => void | Promise<void>;
1249
+ function: (metadata?: Record<string, unknown>) => void | Promise<void>;
1249
1250
  label?: string | (() => string);
1250
1251
  icon?: string | (() => string);
1251
1252
  tooltip?: string | (() => string);
@@ -1581,7 +1582,10 @@ export declare class ComfyApp {
1581
1582
 
1582
1583
  export declare interface CommandManager {
1583
1584
  commands: ComfyCommand[];
1584
- execute(command: string, errorHandler?: (error: any) => void): void;
1585
+ execute(command: string, options?: {
1586
+ errorHandler?: (error: unknown) => void;
1587
+ metadata?: Record<string, unknown>;
1588
+ }): void;
1585
1589
  }
1586
1590
 
1587
1591
  /** Resize handle positions (compass points) */
@@ -3025,6 +3029,8 @@ export declare class ComfyApp {
3025
3029
  /** If `true`, the widget will not be rendered by the Vue renderer. */
3026
3030
  canvasOnly?: boolean;
3027
3031
  values?: TValues;
3032
+ /** Optional function to format values for display (e.g., hash → human-readable name) */
3033
+ getOptionLabel?: (value?: string | null) => string;
3028
3034
  callback?: IWidget['callback'];
3029
3035
  }
3030
3036
 
@@ -3893,7 +3899,7 @@ export declare class ComfyApp {
3893
3899
  * @param e MouseEvent that is triggering this
3894
3900
  */
3895
3901
  updateMouseOverNodes(node: LGraphNode | null, e: CanvasPointerEvent): void;
3896
- processMouseDown(e: PointerEvent): void;
3902
+ processMouseDown(e: MouseEvent): void;
3897
3903
  processWidgetClick(e: CanvasPointerEvent, node: LGraphNode, widget: IBaseWidget, pointer?: CanvasPointer): void;
3898
3904
  /**
3899
3905
  * Called when a mouse move event has to be processed
@@ -7558,6 +7564,10 @@ export declare class ComfyApp {
7558
7564
  */
7559
7565
  vram?: number;
7560
7566
  size?: number;
7567
+ /**
7568
+ * Whether this template uses open source models. When false, indicates partner/API node templates.
7569
+ */
7570
+ openSource?: boolean;
7561
7571
  }
7562
7572
 
7563
7573
  export { TerminalSize }
@@ -7913,6 +7923,26 @@ export declare class ComfyApp {
7913
7923
  [key: string]: BaseWidget;
7914
7924
  };
7915
7925
 
7926
+ /**
7927
+ * Workflow import metadata
7928
+ */
7929
+ declare interface WorkflowImportMetadata {
7930
+ missing_node_count: number;
7931
+ missing_node_types: string[];
7932
+ /**
7933
+ * The source of the workflow open/import action
7934
+ */
7935
+ open_source?: 'file_button' | 'file_drop' | 'template' | 'unknown';
7936
+ }
7937
+
7938
+ /**
7939
+ * Workflow open metadata
7940
+ */
7941
+ /**
7942
+ * Enumerated sources for workflow open/import actions.
7943
+ */
7944
+ declare type WorkflowOpenSource = NonNullable<WorkflowImportMetadata['open_source']>;
7945
+
7916
7946
  declare interface WorkflowTemplates {
7917
7947
  moduleName: string;
7918
7948
  templates: TemplateInfo[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comfyorg/comfyui-frontend-types",
3
- "version": "1.32.0",
3
+ "version": "1.32.2",
4
4
  "types": "./index.d.ts",
5
5
  "files": [
6
6
  "index.d.ts"