@comfyorg/comfyui-frontend-types 1.19.6 → 1.19.7

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 +12 -135
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -239,6 +239,10 @@ export declare class ComfyApi extends EventTarget {
239
239
  * custom nodes are patched.
240
240
  */
241
241
  authToken?: string;
242
+ /**
243
+ * The API key for the comfy org account if the user logged in via API key.
244
+ */
245
+ apiKey?: string;
242
246
  constructor();
243
247
  internalURL(route: string): string;
244
248
  apiURL(route: string): string;
@@ -1678,6 +1682,7 @@ export declare class ComfyApp {
1678
1682
  } | undefined;
1679
1683
  dialogComponentProps: {
1680
1684
  key?: PropertyKey;
1685
+ style?: unknown;
1681
1686
  ref?: any;
1682
1687
  ref_for?: boolean;
1683
1688
  ref_key?: string;
@@ -1688,7 +1693,6 @@ export declare class ComfyApp {
1688
1693
  onVnodeBeforeUnmount?: ((vnode: VNode) => void) | ((vnode: VNode) => void)[];
1689
1694
  onVnodeUnmounted?: ((vnode: VNode) => void) | ((vnode: VNode) => void)[];
1690
1695
  class?: unknown;
1691
- style?: unknown;
1692
1696
  maximizable?: boolean;
1693
1697
  maximized?: boolean;
1694
1698
  onClose?: () => void;
@@ -2287,6 +2291,7 @@ export declare class ComfyApp {
2287
2291
  } | undefined;
2288
2292
  dialogComponentProps: {
2289
2293
  key?: PropertyKey;
2294
+ style?: unknown;
2290
2295
  ref?: any;
2291
2296
  ref_for?: boolean;
2292
2297
  ref_key?: string;
@@ -2297,7 +2302,6 @@ export declare class ComfyApp {
2297
2302
  onVnodeBeforeUnmount?: ((vnode: VNode) => void) | ((vnode: VNode) => void)[];
2298
2303
  onVnodeUnmounted?: ((vnode: VNode) => void) | ((vnode: VNode) => void)[];
2299
2304
  class?: unknown;
2300
- style?: unknown;
2301
2305
  maximizable?: boolean;
2302
2306
  maximized?: boolean;
2303
2307
  onClose?: () => void;
@@ -2888,6 +2892,7 @@ export declare class ComfyApp {
2888
2892
  } | undefined;
2889
2893
  dialogComponentProps: {
2890
2894
  key?: PropertyKey;
2895
+ style?: unknown;
2891
2896
  ref?: any;
2892
2897
  ref_for?: boolean;
2893
2898
  ref_key?: string;
@@ -2898,7 +2903,6 @@ export declare class ComfyApp {
2898
2903
  onVnodeBeforeUnmount?: ((vnode: VNode) => void) | ((vnode: VNode) => void)[];
2899
2904
  onVnodeUnmounted?: ((vnode: VNode) => void) | ((vnode: VNode) => void)[];
2900
2905
  class?: unknown;
2901
- style?: unknown;
2902
2906
  maximizable?: boolean;
2903
2907
  maximized?: boolean;
2904
2908
  onClose?: () => void;
@@ -3489,6 +3493,7 @@ export declare class ComfyApp {
3489
3493
  } | undefined;
3490
3494
  dialogComponentProps: {
3491
3495
  key?: PropertyKey;
3496
+ style?: unknown;
3492
3497
  ref?: any;
3493
3498
  ref_for?: boolean;
3494
3499
  ref_key?: string;
@@ -3499,7 +3504,6 @@ export declare class ComfyApp {
3499
3504
  onVnodeBeforeUnmount?: ((vnode: VNode) => void) | ((vnode: VNode) => void)[];
3500
3505
  onVnodeUnmounted?: ((vnode: VNode) => void) | ((vnode: VNode) => void)[];
3501
3506
  class?: unknown;
3502
- style?: unknown;
3503
3507
  maximizable?: boolean;
3504
3508
  maximized?: boolean;
3505
3509
  onClose?: () => void;
@@ -13380,15 +13384,15 @@ declare module '@comfyorg/litegraph/dist/types/widgets' {
13380
13384
  }
13381
13385
 
13382
13386
  interface IBaseWidget {
13383
- onRemove?: () => void
13384
- beforeQueued?: () => unknown
13385
- afterQueued?: () => unknown
13387
+ onRemove?(): void
13388
+ beforeQueued?(): unknown
13389
+ afterQueued?(): unknown
13386
13390
  serializeValue?(node: LGraphNode, index: number): Promise<unknown> | unknown
13387
13391
 
13388
13392
  /**
13389
13393
  * Refreshes the widget's value or options from its remote source.
13390
13394
  */
13391
- refresh?: () => unknown
13395
+ refresh?(): unknown
13392
13396
 
13393
13397
  /**
13394
13398
  * If the widget supports dynamic prompts, this will be set to true.
@@ -13400,133 +13404,6 @@ declare module '@comfyorg/litegraph/dist/types/widgets' {
13400
13404
 
13401
13405
 
13402
13406
 
13403
- /**
13404
- * ComfyUI extensions of litegraph
13405
- */
13406
- declare module '@comfyorg/litegraph' {
13407
- interface LGraphNodeConstructor<T extends LGraphNode = LGraphNode> {
13408
- type?: string
13409
- comfyClass: string
13410
- title: string
13411
- nodeData?: ComfyNodeDefV1 & ComfyNodeDefV2
13412
- category?: string
13413
- new (): T
13414
- }
13415
-
13416
- interface TextWidget {
13417
- dynamicPrompts?: boolean
13418
- }
13419
-
13420
- interface BaseWidget {
13421
- serializeValue?(node: LGraphNode, index: number): Promise<unknown> | unknown
13422
- }
13423
-
13424
- interface LGraphNode {
13425
- constructor: LGraphNodeConstructor
13426
-
13427
- /**
13428
- * Callback fired on each node after the graph is configured
13429
- */
13430
- onAfterGraphConfigured?(): void
13431
- onGraphConfigured?(): void
13432
- onExecuted?(output: any): void
13433
- onNodeCreated?(this: LGraphNode): void
13434
- /** @deprecated groupNode */
13435
- setInnerNodes?(nodes: LGraphNode[]): void
13436
- /** Originally a group node API. */
13437
- getInnerNodes?(): LGraphNode[]
13438
- /** @deprecated groupNode */
13439
- convertToNodes?(): LGraphNode[]
13440
- recreate?(): Promise<LGraphNode>
13441
- refreshComboInNode?(defs: Record<string, ComfyNodeDef>)
13442
- /** @deprecated groupNode */
13443
- updateLink?(link: LLink): LLink | null
13444
- /**
13445
- * @deprecated primitive node.
13446
- * Used by virtual nodes (primitives) to insert their values into the graph prior to queueing.
13447
- * Externally used by
13448
- * - https://github.com/pythongosssss/ComfyUI-Custom-Scripts/blob/bbda5e52ad580c13ceaa53136d9c2bed9137bd2e/web/js/presetText.js#L160-L182
13449
- * - https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite/blob/4c7858ddd5126f7293dc3c9f6e0fc4c263cde079/web/js/VHS.core.js#L1889-L1889
13450
- */
13451
- applyToGraph?(extraLinks?: LLink[]): void
13452
- onExecutionStart?(): unknown
13453
- /**
13454
- * Callback invoked when the node is dragged over from an external source, i.e.
13455
- * a file or another HTML element.
13456
- * @param e The drag event
13457
- * @returns {boolean} True if the drag event should be handled by this node, false otherwise
13458
- */
13459
- onDragOver?(e: DragEvent): boolean
13460
- /**
13461
- * Callback invoked when the node is dropped from an external source, i.e.
13462
- * a file or another HTML element.
13463
- * @param e The drag event
13464
- * @returns {boolean} True if the drag event should be handled by this node, false otherwise
13465
- */
13466
- onDragDrop?(e: DragEvent): Promise<boolean> | boolean
13467
-
13468
- index?: number
13469
- runningInternalNodeId?: NodeId
13470
-
13471
- comfyClass?: string
13472
-
13473
- /**
13474
- * If the node is a frontend only node and should not be serialized into the prompt.
13475
- */
13476
- isVirtualNode?: boolean
13477
-
13478
- addDOMWidget<
13479
- T extends HTMLElement = HTMLElement,
13480
- V extends object | string = string
13481
- >(
13482
- name: string,
13483
- type: string,
13484
- element: T,
13485
- options?: DOMWidgetOptions<V>
13486
- ): DOMWidget<T, V>
13487
-
13488
- animatedImages?: boolean
13489
- imgs?: HTMLImageElement[]
13490
- images?: ExecutedWsMessage['output']
13491
- /** Container for the node's video preview */
13492
- videoContainer?: HTMLElement
13493
- /** Whether the node's preview media is loading */
13494
- isLoading?: boolean
13495
- /** The content type of the node's preview media */
13496
- previewMediaType?: 'image' | 'video' | 'audio' | 'model'
13497
-
13498
- preview: string[]
13499
- /** Index of the currently selected image on a multi-image node such as Preview Image */
13500
- imageIndex?: number | null
13501
- imageRects: Rect[]
13502
- overIndex?: number | null
13503
- pointerDown?: { index: number | null; pos: Point } | null
13504
- /**
13505
- * @deprecated No longer needed as we use {@link useImagePreviewWidget}
13506
- */
13507
- setSizeForImage?(force?: boolean): void
13508
- /** @deprecated Unused */
13509
- inputHeight?: unknown
13510
-
13511
- /** The y offset of the image preview to the top of the node body. */
13512
- imageOffset?: number
13513
- /** Callback for pasting an image file into the node */
13514
- pasteFile?(file: File): void
13515
- /** Callback for pasting multiple files into the node */
13516
- pasteFiles?(files: File[]): void
13517
- }
13518
- /**
13519
- * Only used by the Primitive node. Primitive node is using the widget property
13520
- * to store/access the widget config.
13521
- * We should remove this hacky solution once we have a proper solution.
13522
- */
13523
- interface INodeOutputSlot {
13524
- widget?: { name: string; [key: symbol]: unknown }
13525
- }
13526
- }
13527
-
13528
-
13529
-
13530
13407
  /**
13531
13408
  * Extended types for litegraph, to be merged upstream once it has stabilized.
13532
13409
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comfyorg/comfyui-frontend-types",
3
- "version": "1.19.6",
3
+ "version": "1.19.7",
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.15.7"
16
+ "@comfyorg/litegraph": "^0.15.8"
17
17
  },
18
18
  "peerDependencies": {
19
19
  "vue": "^3.5.13",