@comfyorg/comfyui-frontend-types 1.19.6 → 1.19.8

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 +14 -135
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -52,6 +52,7 @@ import { PendingTaskItem } from '../schemas/apiSchema';
52
52
  import { PluralizationRules } from '@intlify/core-base';
53
53
  import { Positionable } from '@comfyorg/litegraph/dist/interfaces';
54
54
  import { PostTranslationHandler } from 'vue-i18n';
55
+ import { ProgressTextWsMessage } from '../schemas/apiSchema';
55
56
  import { ProgressWsMessage } from '../schemas/apiSchema';
56
57
  import { PromptResponse } from '../schemas/apiSchema';
57
58
  import { RenderFunction } from 'vue';
@@ -117,6 +118,7 @@ declare interface BackendApiCalls {
117
118
  logs: LogsWsMessage;
118
119
  /** Binary preview/progress data */
119
120
  b_preview: Blob;
121
+ progress_text: ProgressTextWsMessage;
120
122
  }
121
123
 
122
124
  declare interface BaseBottomPanelExtension {
@@ -239,6 +241,10 @@ export declare class ComfyApi extends EventTarget {
239
241
  * custom nodes are patched.
240
242
  */
241
243
  authToken?: string;
244
+ /**
245
+ * The API key for the comfy org account if the user logged in via API key.
246
+ */
247
+ apiKey?: string;
242
248
  constructor();
243
249
  internalURL(route: string): string;
244
250
  apiURL(route: string): string;
@@ -1678,6 +1684,7 @@ export declare class ComfyApp {
1678
1684
  } | undefined;
1679
1685
  dialogComponentProps: {
1680
1686
  key?: PropertyKey;
1687
+ style?: unknown;
1681
1688
  ref?: any;
1682
1689
  ref_for?: boolean;
1683
1690
  ref_key?: string;
@@ -1688,7 +1695,6 @@ export declare class ComfyApp {
1688
1695
  onVnodeBeforeUnmount?: ((vnode: VNode) => void) | ((vnode: VNode) => void)[];
1689
1696
  onVnodeUnmounted?: ((vnode: VNode) => void) | ((vnode: VNode) => void)[];
1690
1697
  class?: unknown;
1691
- style?: unknown;
1692
1698
  maximizable?: boolean;
1693
1699
  maximized?: boolean;
1694
1700
  onClose?: () => void;
@@ -2287,6 +2293,7 @@ export declare class ComfyApp {
2287
2293
  } | undefined;
2288
2294
  dialogComponentProps: {
2289
2295
  key?: PropertyKey;
2296
+ style?: unknown;
2290
2297
  ref?: any;
2291
2298
  ref_for?: boolean;
2292
2299
  ref_key?: string;
@@ -2297,7 +2304,6 @@ export declare class ComfyApp {
2297
2304
  onVnodeBeforeUnmount?: ((vnode: VNode) => void) | ((vnode: VNode) => void)[];
2298
2305
  onVnodeUnmounted?: ((vnode: VNode) => void) | ((vnode: VNode) => void)[];
2299
2306
  class?: unknown;
2300
- style?: unknown;
2301
2307
  maximizable?: boolean;
2302
2308
  maximized?: boolean;
2303
2309
  onClose?: () => void;
@@ -2888,6 +2894,7 @@ export declare class ComfyApp {
2888
2894
  } | undefined;
2889
2895
  dialogComponentProps: {
2890
2896
  key?: PropertyKey;
2897
+ style?: unknown;
2891
2898
  ref?: any;
2892
2899
  ref_for?: boolean;
2893
2900
  ref_key?: string;
@@ -2898,7 +2905,6 @@ export declare class ComfyApp {
2898
2905
  onVnodeBeforeUnmount?: ((vnode: VNode) => void) | ((vnode: VNode) => void)[];
2899
2906
  onVnodeUnmounted?: ((vnode: VNode) => void) | ((vnode: VNode) => void)[];
2900
2907
  class?: unknown;
2901
- style?: unknown;
2902
2908
  maximizable?: boolean;
2903
2909
  maximized?: boolean;
2904
2910
  onClose?: () => void;
@@ -3489,6 +3495,7 @@ export declare class ComfyApp {
3489
3495
  } | undefined;
3490
3496
  dialogComponentProps: {
3491
3497
  key?: PropertyKey;
3498
+ style?: unknown;
3492
3499
  ref?: any;
3493
3500
  ref_for?: boolean;
3494
3501
  ref_key?: string;
@@ -3499,7 +3506,6 @@ export declare class ComfyApp {
3499
3506
  onVnodeBeforeUnmount?: ((vnode: VNode) => void) | ((vnode: VNode) => void)[];
3500
3507
  onVnodeUnmounted?: ((vnode: VNode) => void) | ((vnode: VNode) => void)[];
3501
3508
  class?: unknown;
3502
- style?: unknown;
3503
3509
  maximizable?: boolean;
3504
3510
  maximized?: boolean;
3505
3511
  onClose?: () => void;
@@ -13380,15 +13386,15 @@ declare module '@comfyorg/litegraph/dist/types/widgets' {
13380
13386
  }
13381
13387
 
13382
13388
  interface IBaseWidget {
13383
- onRemove?: () => void
13384
- beforeQueued?: () => unknown
13385
- afterQueued?: () => unknown
13389
+ onRemove?(): void
13390
+ beforeQueued?(): unknown
13391
+ afterQueued?(): unknown
13386
13392
  serializeValue?(node: LGraphNode, index: number): Promise<unknown> | unknown
13387
13393
 
13388
13394
  /**
13389
13395
  * Refreshes the widget's value or options from its remote source.
13390
13396
  */
13391
- refresh?: () => unknown
13397
+ refresh?(): unknown
13392
13398
 
13393
13399
  /**
13394
13400
  * If the widget supports dynamic prompts, this will be set to true.
@@ -13400,133 +13406,6 @@ declare module '@comfyorg/litegraph/dist/types/widgets' {
13400
13406
 
13401
13407
 
13402
13408
 
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
13409
  /**
13531
13410
  * Extended types for litegraph, to be merged upstream once it has stabilized.
13532
13411
  */
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.8",
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",