@comfyorg/comfyui-frontend-types 1.6.12 → 1.6.13

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 +62 -0
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -880,6 +880,8 @@ export declare class ComfyApp {
880
880
  /** Keys (names) of API events that pass a {@link CustomEvent} `detail` object. */
881
881
  declare type ComplexApiEvents = keyof NeverNever<ApiEventTypes>;
882
882
 
883
+ declare type ConfirmationDialogType = 'default' | 'overwrite' | 'delete' | 'dirtyClose' | 'reinstall';
884
+
883
885
  declare type CustomBottomPanelExtension = BaseBottomPanelExtension & CustomExtension;
884
886
 
885
887
  declare interface CustomExtension {
@@ -910,6 +912,7 @@ export declare class ComfyApp {
910
912
  unregisterSidebarTab(id: string): void;
911
913
  getSidebarTabs(): SidebarTabExtension[];
912
914
  toast: ToastManager;
915
+ dialog: ReturnType<typeof useDialogService>;
913
916
  command: CommandManager;
914
917
  setting: {
915
918
  get: (id: string) => any;
@@ -1088,6 +1091,37 @@ export declare class ComfyApp {
1088
1091
  contentStyleClass?: any;
1089
1092
  }
1090
1093
 
1094
+ declare const useDialogService: () => {
1095
+ showLoadWorkflowWarning: (props: {
1096
+ missingNodeTypes: MissingNodeType[];
1097
+ [key: string]: any;
1098
+ }) => void;
1099
+ showMissingModelsWarning: (props: {
1100
+ missingModels: any[];
1101
+ paths: Record<string, string[]>;
1102
+ [key: string]: any;
1103
+ }) => void;
1104
+ showSettingsDialog: (panel?: "about" | "keybinding" | "extension" | "server-config") => void;
1105
+ showAboutDialog: () => void;
1106
+ showExecutionErrorDialog: (error: ExecutionErrorWsMessage) => void;
1107
+ showTemplateWorkflowsDialog: () => void;
1108
+ prompt: ({ title, message, defaultValue }: {
1109
+ title: string;
1110
+ message: string;
1111
+ defaultValue?: string;
1112
+ }) => Promise<string | null>;
1113
+ confirm: ({ title, message, type, itemList }: {
1114
+ /** Dialog heading */
1115
+ title: string;
1116
+ /** The main message body */
1117
+ message: string;
1118
+ /** Pre-configured dialog type */
1119
+ type?: ConfirmationDialogType;
1120
+ /** Displayed as an unorderd list immediately below the message body */
1121
+ itemList?: string[];
1122
+ }) => Promise<boolean | null>;
1123
+ };
1124
+
1091
1125
  declare type User = z.infer<typeof zUser>;
1092
1126
 
1093
1127
  declare type UserDataFullInfo = z.infer<typeof zUserDataFullInfo>;
@@ -14430,6 +14464,22 @@ export declare class ComfyApp {
14430
14464
  }>, "many">>;
14431
14465
  animated: z.ZodOptional<z.ZodArray<z.ZodBoolean, "many">>;
14432
14466
  }, z.ZodTypeAny, "passthrough">>>;
14467
+ meta: z.ZodOptional<z.ZodRecord<z.ZodUnion<[z.ZodNumber, z.ZodString]>, z.ZodObject<{
14468
+ node_id: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
14469
+ display_node: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
14470
+ prompt_id: z.ZodOptional<z.ZodString>;
14471
+ read_node_id: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
14472
+ }, "strip", z.ZodTypeAny, {
14473
+ prompt_id?: string;
14474
+ display_node?: string | number;
14475
+ node_id?: string | number;
14476
+ read_node_id?: string | number;
14477
+ }, {
14478
+ prompt_id?: string;
14479
+ display_node?: string | number;
14480
+ node_id?: string | number;
14481
+ read_node_id?: string | number;
14482
+ }>>>;
14433
14483
  }, "strip", z.ZodTypeAny, {
14434
14484
  outputs?: Record<string | number, z.objectOutputType<{
14435
14485
  audio: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -14460,6 +14510,12 @@ export declare class ComfyApp {
14460
14510
  }>, "many">>;
14461
14511
  animated: z.ZodOptional<z.ZodArray<z.ZodBoolean, "many">>;
14462
14512
  }, z.ZodTypeAny, "passthrough">>;
14513
+ meta?: Record<string | number, {
14514
+ prompt_id?: string;
14515
+ display_node?: string | number;
14516
+ node_id?: string | number;
14517
+ read_node_id?: string | number;
14518
+ }>;
14463
14519
  status?: {
14464
14520
  messages?: (["execution_start", {
14465
14521
  prompt_id?: string;
@@ -14697,6 +14753,12 @@ export declare class ComfyApp {
14697
14753
  }>, "many">>;
14698
14754
  animated: z.ZodOptional<z.ZodArray<z.ZodBoolean, "many">>;
14699
14755
  }, z.ZodTypeAny, "passthrough">>;
14756
+ meta?: Record<string | number, {
14757
+ prompt_id?: string;
14758
+ display_node?: string | number;
14759
+ node_id?: string | number;
14760
+ read_node_id?: string | number;
14761
+ }>;
14700
14762
  status?: {
14701
14763
  messages?: (["execution_start", {
14702
14764
  prompt_id?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comfyorg/comfyui-frontend-types",
3
- "version": "1.6.12",
3
+ "version": "1.6.13",
4
4
  "types": "./index.d.ts",
5
5
  "files": [
6
6
  "index.d.ts"