@comfyorg/comfyui-frontend-types 1.11.0 → 1.11.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 +22 -6
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -457,7 +457,7 @@ export declare class ComfyApp {
457
457
  * @deprecated Use {@link isImageNode} from @/utils/litegraphUtil instead
458
458
  */
459
459
  static isImageNode(node: LGraphNode): node is LGraphNode & {
460
- imgs: HTMLImageElement[];
460
+ imgs: HTMLImageElement[] | undefined;
461
461
  };
462
462
  /**
463
463
  * Resets the canvas view to the default
@@ -33657,6 +33657,12 @@ declare module '@comfyorg/litegraph/dist/types/widgets' {
33657
33657
  interface IWidgetOptions {
33658
33658
  /** Currently used by DOM widgets only. Declaring here reduces complexity. */
33659
33659
  onHide?: (widget: DOMWidget) => void
33660
+ /**
33661
+ * Controls whether the widget's value is included in the API workflow/prompt.
33662
+ * - If false, the value will be excluded from the API workflow but still serialized as part of the graph state
33663
+ * - If true or undefined, the value will be included in both the API workflow and graph state
33664
+ */
33665
+ serialize?: boolean
33660
33666
  }
33661
33667
 
33662
33668
  interface IBaseWidget {
@@ -33716,12 +33722,17 @@ declare module '@comfyorg/litegraph' {
33716
33722
  onGraphConfigured?(): void
33717
33723
  onExecuted?(output: any): void
33718
33724
  onNodeCreated?(this: LGraphNode): void
33725
+ /** @deprecated groupNode */
33719
33726
  setInnerNodes?(nodes: LGraphNode[]): void
33727
+ /** Originally a group node API. */
33720
33728
  getInnerNodes?(): LGraphNode[]
33729
+ /** @deprecated groupNode */
33721
33730
  convertToNodes?(): LGraphNode[]
33722
33731
  recreate?(): Promise<LGraphNode>
33723
33732
  refreshComboInNode?(defs: Record<string, ComfyNodeDef>)
33733
+ /** Used by virtual nodes (primitives) to insert their values into the graph prior to queueing. */
33724
33734
  applyToGraph?(extraLinks?: LLink[]): void
33735
+ /** @deprecated groupNode */
33725
33736
  updateLink?(link: LLink): LLink | null
33726
33737
  onExecutionStart?(): unknown
33727
33738
  /**
@@ -33749,12 +33760,15 @@ declare module '@comfyorg/litegraph' {
33749
33760
  */
33750
33761
  isVirtualNode?: boolean
33751
33762
 
33752
- addDOMWidget(
33763
+ addDOMWidget<
33764
+ T extends HTMLElement = HTMLElement,
33765
+ V extends object | string = string
33766
+ >(
33753
33767
  name: string,
33754
33768
  type: string,
33755
- element: HTMLElement,
33756
- options?: Record<string, any>
33757
- ): DOMWidget
33769
+ element: T,
33770
+ options?: DOMWidgetOptions<T, V>
33771
+ ): DOMWidget<T, V>
33758
33772
 
33759
33773
  animatedImages?: boolean
33760
33774
  imgs?: HTMLImageElement[]
@@ -33763,6 +33777,8 @@ declare module '@comfyorg/litegraph' {
33763
33777
  videoContainer?: HTMLElement
33764
33778
  /** Whether the node's preview media is loading */
33765
33779
  isLoading?: boolean
33780
+ /** The content type of the node's preview media */
33781
+ previewMediaType?: 'image' | 'video' | 'audio' | 'model'
33766
33782
 
33767
33783
  preview: string[]
33768
33784
  /** Index of the currently selected image on a multi-image node such as Preview Image */
@@ -33775,7 +33791,7 @@ declare module '@comfyorg/litegraph' {
33775
33791
  /** @deprecated Unused */
33776
33792
  inputHeight?: unknown
33777
33793
 
33778
- /** @deprecated Unused */
33794
+ /** The y offset of the image preview to the top of the node body. */
33779
33795
  imageOffset?: number
33780
33796
  /** Callback for pasting an image file into the node */
33781
33797
  pasteFile?(file: File): void
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comfyorg/comfyui-frontend-types",
3
- "version": "1.11.0",
3
+ "version": "1.11.2",
4
4
  "types": "./index.d.ts",
5
5
  "files": [
6
6
  "index.d.ts"
@@ -13,7 +13,7 @@
13
13
  "description": "TypeScript definitions for @comfyorg/comfyui-frontend",
14
14
  "license": "GPL-3.0-only",
15
15
  "dependencies": {
16
- "@comfyorg/litegraph": "^0.8.92"
16
+ "@comfyorg/litegraph": "^0.8.94"
17
17
  },
18
18
  "peerDependencies": {
19
19
  "vue": "^3.5.13",