@comfyorg/comfyui-frontend-types 1.35.2 → 1.35.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 +26 -17
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -21,6 +21,7 @@ import { NodeError } from '../schemas/apiSchema';
21
21
  import { NodeId as NodeId_2 } from '../platform/workflow/validation/schemas/workflowSchema';
22
22
  import { NotificationWsMessage } from '../schemas/apiSchema';
23
23
  import { PendingTaskItem } from '../schemas/apiSchema';
24
+ import { PreviewMethod } from '../schemas/apiSchema';
24
25
  import { ProgressStateWsMessage } from '../schemas/apiSchema';
25
26
  import { ProgressTextWsMessage } from '../schemas/apiSchema';
26
27
  import { ProgressWsMessage } from '../schemas/apiSchema';
@@ -1043,8 +1044,8 @@ export declare class ComfyApp {
1043
1044
  nodePreviewImages: Record<string, string[]>;
1044
1045
  private rootGraphInternal;
1045
1046
  /** @deprecated Use {@link rootGraph} instead */
1046
- get graph(): LGraph;
1047
- get rootGraph(): LGraph | undefined;
1047
+ get graph(): unknown;
1048
+ get rootGraph(): LGraph;
1048
1049
  canvas: LGraphCanvas;
1049
1050
  dragOverNode: LGraphNode | null;
1050
1051
  readonly canvasElRef: ShallowRef<HTMLCanvasElement | undefined, HTMLCanvasElement | undefined>;
@@ -1491,11 +1492,11 @@ export declare class ComfyApp {
1491
1492
  /**
1492
1493
  * @deprecated Use `settingStore.settingsById` instead.
1493
1494
  */
1494
- get settingsLookup(): Record<string, SettingParams<unknown>>;
1495
+ get settingsLookup(): Record<string, SettingParams<any>>;
1495
1496
  /**
1496
1497
  * @deprecated Use `settingStore.settingsById` instead.
1497
1498
  */
1498
- get settingsParamLookup(): Record<string, SettingParams<unknown>>;
1499
+ get settingsParamLookup(): Record<string, SettingParams<any>>;
1499
1500
  /**
1500
1501
  * @deprecated Use `settingStore.get` instead.
1501
1502
  */
@@ -2149,8 +2150,8 @@ export declare class ComfyApp {
2149
2150
  dialog: ReturnType<typeof useDialogService>;
2150
2151
  command: CommandManager;
2151
2152
  setting: {
2152
- get: (id: string) => any;
2153
- set: (id: string, value: any) => void;
2153
+ get: <T = unknown>(id: string) => T | undefined;
2154
+ set: <T = unknown>(id: string, value: T) => void;
2154
2155
  };
2155
2156
  }
2156
2157
 
@@ -2233,7 +2234,7 @@ export declare class ComfyApp {
2233
2234
  name: string;
2234
2235
  type: SettingInputType | SettingCustomRenderer;
2235
2236
  tooltip?: string;
2236
- attrs?: Record<string, any>;
2237
+ attrs?: Record<string, unknown>;
2237
2238
  options?: Array<string | SettingOption>;
2238
2239
  }
2239
2240
 
@@ -3454,7 +3455,9 @@ export declare class ComfyApp {
3454
3455
  subgraph: Subgraph;
3455
3456
  node: SubgraphNode;
3456
3457
  };
3457
- unpackSubgraph(subgraphNode: SubgraphNode): void;
3458
+ unpackSubgraph(subgraphNode: SubgraphNode, options?: {
3459
+ skipMissingNodes?: boolean;
3460
+ }): void;
3458
3461
  /**
3459
3462
  * Resolve a path of subgraph node IDs into a list of subgraph nodes.
3460
3463
  * Not intended to be run from subgraphs.
@@ -6533,6 +6536,11 @@ export declare class ComfyApp {
6533
6536
  * Format: Colon-separated path of node IDs (e.g., "123:456:789")
6534
6537
  */
6535
6538
  partialExecutionTargets?: NodeExecutionId[];
6539
+ /**
6540
+ * Override the preview method for this prompt execution.
6541
+ * 'default' uses the server's CLI setting and is not sent to backend.
6542
+ */
6543
+ previewMethod?: PreviewMethod;
6536
6544
  }
6537
6545
 
6538
6546
  declare interface ReadonlyLinkNetwork {
@@ -7091,24 +7099,24 @@ export declare class ComfyApp {
7091
7099
  type: ISlotType
7092
7100
  ];
7093
7101
 
7094
- declare type SettingCustomRenderer = (name: string, setter: (v: any) => void, value: any, attrs: any) => HTMLElement;
7102
+ declare type SettingCustomRenderer = (name: string, setter: (v: unknown) => void, value: unknown, attrs?: Record<string, unknown>) => HTMLElement;
7095
7103
 
7096
7104
  declare type SettingInputType = 'boolean' | 'number' | 'slider' | 'knob' | 'combo' | 'radio' | 'text' | 'image' | 'color' | 'url' | 'hidden' | 'backgroundImage';
7097
7105
 
7098
7106
  declare interface SettingOption {
7099
7107
  text: string;
7100
- value?: any;
7108
+ value?: string | number;
7101
7109
  }
7102
7110
 
7103
- declare interface SettingParams<TValue = unknown> extends FormItem {
7111
+ declare interface SettingParams<TValue = any> extends FormItem {
7104
7112
  id: keyof Settings_2;
7105
- defaultValue: any | (() => any);
7113
+ defaultValue: TValue | (() => TValue);
7106
7114
  defaultsByInstallVersion?: Record<`${number}.${number}.${number}`, TValue>;
7107
- onChange?: (newValue: any, oldValue?: any) => void;
7115
+ onChange?: (newValue: TValue, oldValue?: TValue) => void;
7108
7116
  category?: string[];
7109
7117
  experimental?: boolean;
7110
7118
  deprecated?: boolean;
7111
- migrateDeprecatedValue?: (value: any) => any;
7119
+ migrateDeprecatedValue?: (value: TValue) => TValue;
7112
7120
  versionAdded?: string;
7113
7121
  versionModified?: string;
7114
7122
  sortOrder?: number;
@@ -7685,7 +7693,7 @@ export declare class ComfyApp {
7685
7693
  /**
7686
7694
  * Detail content of the message.
7687
7695
  */
7688
- detail?: any | undefined;
7696
+ detail?: string;
7689
7697
  /**
7690
7698
  * Whether the message can be closed manually using the close icon.
7691
7699
  * @defaultValue true
@@ -7702,11 +7710,12 @@ export declare class ComfyApp {
7702
7710
  /**
7703
7711
  * Style class of the message.
7704
7712
  */
7705
- styleClass?: any;
7713
+ styleClass?: string | string[] | Record<string, boolean>;
7706
7714
  /**
7707
7715
  * Style class of the content.
7716
+ * Matches PrimeVue Toast API which accepts Vue class bindings.
7708
7717
  */
7709
- contentStyleClass?: any;
7718
+ contentStyleClass?: string | string[] | Record<string, boolean>;
7710
7719
  }
7711
7720
 
7712
7721
  /** Connecting TO an input slot. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comfyorg/comfyui-frontend-types",
3
- "version": "1.35.2",
3
+ "version": "1.35.4",
4
4
  "types": "./index.d.ts",
5
5
  "files": [
6
6
  "index.d.ts"