@comfyorg/comfyui-frontend-types 1.31.1 → 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.
- package/index.d.ts +35 -9
- 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,
|
|
1143
|
-
showMissingNodesDialog?: boolean
|
|
1144
|
-
showMissingModelsDialog?: boolean
|
|
1145
|
-
checkForRerouteMigration?: boolean
|
|
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
|
/**
|
|
@@ -1335,15 +1336,15 @@ export declare class ComfyApp {
|
|
|
1335
1336
|
/**
|
|
1336
1337
|
* Allows the extension to add context menu items to canvas right-click menus
|
|
1337
1338
|
* @param canvas The canvas instance
|
|
1338
|
-
* @returns An array of context menu items to add
|
|
1339
|
+
* @returns An array of context menu items to add (null values represent separators)
|
|
1339
1340
|
*/
|
|
1340
|
-
getCanvasMenuItems?(canvas: LGraphCanvas): IContextMenuValue[];
|
|
1341
|
+
getCanvasMenuItems?(canvas: LGraphCanvas): (IContextMenuValue | null)[];
|
|
1341
1342
|
/**
|
|
1342
1343
|
* Allows the extension to add context menu items to node right-click menus
|
|
1343
1344
|
* @param node The node being right-clicked
|
|
1344
|
-
* @returns An array of context menu items to add
|
|
1345
|
+
* @returns An array of context menu items to add (null values represent separators)
|
|
1345
1346
|
*/
|
|
1346
|
-
getNodeMenuItems?(node: LGraphNode): IContextMenuValue[];
|
|
1347
|
+
getNodeMenuItems?(node: LGraphNode): (IContextMenuValue | null)[];
|
|
1347
1348
|
/**
|
|
1348
1349
|
* Allows the extension to add additional handling to the node before it is registered with **LGraph**
|
|
1349
1350
|
* @param nodeType The node class (not an instance)
|
|
@@ -4200,6 +4201,10 @@ export declare class ComfyApp {
|
|
|
4200
4201
|
closingGraph: LGraph;
|
|
4201
4202
|
fromNode: SubgraphNode;
|
|
4202
4203
|
};
|
|
4204
|
+
/** Dispatched after a group of items has been converted to a subgraph*/
|
|
4205
|
+
'subgraph-converted': {
|
|
4206
|
+
subgraphNode: SubgraphNode;
|
|
4207
|
+
};
|
|
4203
4208
|
'litegraph:canvas': {
|
|
4204
4209
|
subType: 'before-change' | 'after-change';
|
|
4205
4210
|
} | {
|
|
@@ -7432,6 +7437,7 @@ export declare class ComfyApp {
|
|
|
7432
7437
|
* This ensures nested subgraph widget values are preserved when saving.
|
|
7433
7438
|
*/
|
|
7434
7439
|
serialize(): ISerialisedNode;
|
|
7440
|
+
clone(): LGraphNode | null;
|
|
7435
7441
|
}
|
|
7436
7442
|
|
|
7437
7443
|
/**
|
|
@@ -7908,6 +7914,26 @@ export declare class ComfyApp {
|
|
|
7908
7914
|
[key: string]: BaseWidget;
|
|
7909
7915
|
};
|
|
7910
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
|
+
|
|
7911
7937
|
declare interface WorkflowTemplates {
|
|
7912
7938
|
moduleName: string;
|
|
7913
7939
|
templates: TemplateInfo[];
|