@comfyorg/comfyui-frontend-types 1.32.0 → 1.32.1

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 +26 -5
  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
  /**
@@ -7913,6 +7914,26 @@ export declare class ComfyApp {
7913
7914
  [key: string]: BaseWidget;
7914
7915
  };
7915
7916
 
7917
+ /**
7918
+ * Workflow import metadata
7919
+ */
7920
+ declare interface WorkflowImportMetadata {
7921
+ missing_node_count: number;
7922
+ missing_node_types: string[];
7923
+ /**
7924
+ * The source of the workflow open/import action
7925
+ */
7926
+ open_source?: 'file_button' | 'file_drop' | 'template' | 'unknown';
7927
+ }
7928
+
7929
+ /**
7930
+ * Workflow open metadata
7931
+ */
7932
+ /**
7933
+ * Enumerated sources for workflow open/import actions.
7934
+ */
7935
+ declare type WorkflowOpenSource = NonNullable<WorkflowImportMetadata['open_source']>;
7936
+
7916
7937
  declare interface WorkflowTemplates {
7917
7938
  moduleName: string;
7918
7939
  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.1",
4
4
  "types": "./index.d.ts",
5
5
  "files": [
6
6
  "index.d.ts"