@comfyorg/comfyui-frontend-types 1.11.1 → 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 +11 -6
  2. package/package.json +1 -1
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
@@ -33760,12 +33760,15 @@ declare module '@comfyorg/litegraph' {
33760
33760
  */
33761
33761
  isVirtualNode?: boolean
33762
33762
 
33763
- addDOMWidget(
33763
+ addDOMWidget<
33764
+ T extends HTMLElement = HTMLElement,
33765
+ V extends object | string = string
33766
+ >(
33764
33767
  name: string,
33765
33768
  type: string,
33766
- element: HTMLElement,
33767
- options?: Record<string, any>
33768
- ): DOMWidget
33769
+ element: T,
33770
+ options?: DOMWidgetOptions<T, V>
33771
+ ): DOMWidget<T, V>
33769
33772
 
33770
33773
  animatedImages?: boolean
33771
33774
  imgs?: HTMLImageElement[]
@@ -33774,6 +33777,8 @@ declare module '@comfyorg/litegraph' {
33774
33777
  videoContainer?: HTMLElement
33775
33778
  /** Whether the node's preview media is loading */
33776
33779
  isLoading?: boolean
33780
+ /** The content type of the node's preview media */
33781
+ previewMediaType?: 'image' | 'video' | 'audio' | 'model'
33777
33782
 
33778
33783
  preview: string[]
33779
33784
  /** Index of the currently selected image on a multi-image node such as Preview Image */
@@ -33786,7 +33791,7 @@ declare module '@comfyorg/litegraph' {
33786
33791
  /** @deprecated Unused */
33787
33792
  inputHeight?: unknown
33788
33793
 
33789
- /** @deprecated Unused */
33794
+ /** The y offset of the image preview to the top of the node body. */
33790
33795
  imageOffset?: number
33791
33796
  /** Callback for pasting an image file into the node */
33792
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.1",
3
+ "version": "1.11.2",
4
4
  "types": "./index.d.ts",
5
5
  "files": [
6
6
  "index.d.ts"