@comfyorg/comfyui-frontend-types 1.59.1 → 1.60.0
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.
- package/index.d.ts +59 -15
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1095,6 +1095,8 @@ export declare class ComfyApi extends EventTarget {
|
|
|
1095
1095
|
private nodeDefsPrefetch?;
|
|
1096
1096
|
/** Start fetching `/object_info` so the next `getNodeDefs()` can reuse it. */
|
|
1097
1097
|
prefetchNodeDefs(): void;
|
|
1098
|
+
/** The `/object_info` response, the prefetched one when there is one, whatever its HTTP status. */
|
|
1099
|
+
fetchNodeDefs(): Promise<Response>;
|
|
1098
1100
|
getNodeDefs(): Promise<Record<string, ComfyNodeDef>>;
|
|
1099
1101
|
/**
|
|
1100
1102
|
* Queues a prompt to be executed
|
|
@@ -1313,12 +1315,6 @@ export declare class ComfyApi extends EventTarget {
|
|
|
1313
1315
|
|
|
1314
1316
|
declare type ComfyApiWorkflow = z.infer<typeof zComfyApiWorkflow>;
|
|
1315
1317
|
|
|
1316
|
-
/**
|
|
1317
|
-
* The public surface of the application singleton created in
|
|
1318
|
-
* `@/scripts/app`. Modules that the app itself imports reach the running
|
|
1319
|
-
* instance through `useApp()` from `@/scripts/appInstance`; only the
|
|
1320
|
-
* composition root imports the class.
|
|
1321
|
-
*/
|
|
1322
1318
|
export declare interface ComfyApp {
|
|
1323
1319
|
vueAppReady: boolean;
|
|
1324
1320
|
readonly api: ComfyApi;
|
|
@@ -1373,6 +1369,7 @@ export declare interface ComfyApp {
|
|
|
1373
1369
|
getRandParam(): string;
|
|
1374
1370
|
setup(canvasEl: HTMLCanvasElement): Promise<void>;
|
|
1375
1371
|
getNodeDefs(): Promise<Record<string, ComfyNodeDef>>;
|
|
1372
|
+
fetchNodeDefs(): Promise<NodeDefsFetch>;
|
|
1376
1373
|
registerNodes(): Promise<void>;
|
|
1377
1374
|
registerNodeDef(nodeId: string, nodeDef: ComfyNodeDef): Promise<void>;
|
|
1378
1375
|
registerNodesFromDefs(defs: Record<string, ComfyNodeDef>): Promise<void>;
|
|
@@ -1410,7 +1407,7 @@ export declare interface ComfyApp {
|
|
|
1410
1407
|
registerExtension(extension: ComfyExtension): void;
|
|
1411
1408
|
collectCanvasMenuItems(canvas: LGraphCanvas): IContextMenuValue[];
|
|
1412
1409
|
collectNodeMenuItems(node: LGraphNode): IContextMenuValue[];
|
|
1413
|
-
reloadNodeDefs(): Promise<
|
|
1410
|
+
reloadNodeDefs(defs?: Record<string, ComfyNodeDef>): Promise<boolean>;
|
|
1414
1411
|
refreshComboInNodes(): Promise<void>;
|
|
1415
1412
|
clean(): void;
|
|
1416
1413
|
clientPosToCanvasPos(pos: Vector2): Vector2;
|
|
@@ -1515,6 +1512,7 @@ export declare interface ComfyExtension {
|
|
|
1515
1512
|
* The name of the extension
|
|
1516
1513
|
*/
|
|
1517
1514
|
name: string;
|
|
1515
|
+
provenance?: ExtensionProvenance;
|
|
1518
1516
|
/**
|
|
1519
1517
|
* The commands defined by the extension
|
|
1520
1518
|
*/
|
|
@@ -2474,10 +2472,13 @@ declare type ConfirmOptions = BaseConfirmOptions & ({
|
|
|
2474
2472
|
type: 'dirtyClose';
|
|
2475
2473
|
/** Override the deny button label. Defaults to `g.no`. */
|
|
2476
2474
|
denyLabel?: string;
|
|
2475
|
+
/** Override the save button label. Defaults to `g.save`. */
|
|
2476
|
+
confirmLabel?: string;
|
|
2477
2477
|
} | {
|
|
2478
2478
|
/** Pre-configured dialog type */
|
|
2479
2479
|
type?: Exclude<ConfirmationDialogType, 'dirtyClose'>;
|
|
2480
2480
|
denyLabel?: never;
|
|
2481
|
+
confirmLabel?: never;
|
|
2481
2482
|
});
|
|
2482
2483
|
|
|
2483
2484
|
declare interface ConnectByTypeOptions {
|
|
@@ -2772,10 +2773,10 @@ declare interface DefaultConnectionColors {
|
|
|
2772
2773
|
getDisconnectedColor(type: ISlotType): CanvasColour;
|
|
2773
2774
|
}
|
|
2774
2775
|
|
|
2775
|
-
declare
|
|
2776
|
+
declare interface DeselectAllOptions {
|
|
2776
2777
|
keepSelected?: Positionable;
|
|
2777
2778
|
notify?: boolean;
|
|
2778
|
-
}
|
|
2779
|
+
}
|
|
2779
2780
|
|
|
2780
2781
|
/** `switchWorkspace` is absent on Desktop builds before Comfy-Desktop #1671. */
|
|
2781
2782
|
export declare type DesktopHostAuthBridge = Omit<ComfyDesktop2AuthBridge, 'switchWorkspace'> & Partial<Pick<ComfyDesktop2AuthBridge, 'switchWorkspace'>>;
|
|
@@ -3319,6 +3320,13 @@ export declare interface ExtensionManager {
|
|
|
3319
3320
|
|
|
3320
3321
|
declare type ExtensionPayload = Record<string, unknown>;
|
|
3321
3322
|
|
|
3323
|
+
declare interface ExtensionProvenance {
|
|
3324
|
+
createdBy: 'comfy-agent';
|
|
3325
|
+
threadId?: string;
|
|
3326
|
+
createdAt?: string;
|
|
3327
|
+
summary?: string;
|
|
3328
|
+
}
|
|
3329
|
+
|
|
3322
3330
|
export { ExtensionsResponse }
|
|
3323
3331
|
|
|
3324
3332
|
declare type FeatureFlagsWsMessage = Record<string, unknown>;
|
|
@@ -5401,6 +5409,7 @@ export declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasE
|
|
|
5401
5409
|
onSelectionChange?: (selected: Dictionary<Positionable>) => void;
|
|
5402
5410
|
private selectionNotificationDepth;
|
|
5403
5411
|
private withSelectionNotificationsSuppressed;
|
|
5412
|
+
private notifySelectionChange;
|
|
5404
5413
|
/** called when rendering a tooltip */
|
|
5405
5414
|
onDrawLinkTooltip?: (ctx: CanvasRenderingContext2D, link: LLink | null, canvas?: LGraphCanvas) => boolean;
|
|
5406
5415
|
/** to render foreground objects not affected by transform (for GUIs) */
|
|
@@ -5688,6 +5697,7 @@ export declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasE
|
|
|
5688
5697
|
/**
|
|
5689
5698
|
* Selects a {@link Positionable} item.
|
|
5690
5699
|
* @param item The canvas item to add to the selection.
|
|
5700
|
+
* @param options.notify `false` skips the {@link onSelectionChange} report; selection hooks still run.
|
|
5691
5701
|
*/
|
|
5692
5702
|
select<TPositionable extends Positionable = LGraphNode>(item: TPositionable, { notify, selectGroupChildren }?: {
|
|
5693
5703
|
notify?: boolean;
|
|
@@ -5696,6 +5706,7 @@ export declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasE
|
|
|
5696
5706
|
/**
|
|
5697
5707
|
* Deselects a {@link Positionable} item.
|
|
5698
5708
|
* @param item The canvas item to remove from the selection.
|
|
5709
|
+
* @param options.notify `false` skips the {@link onSelectionChange} report; selection hooks still run.
|
|
5699
5710
|
*/
|
|
5700
5711
|
deselect<TPositionable extends Positionable = LGraphNode>(item: TPositionable, { notify }?: {
|
|
5701
5712
|
notify?: boolean;
|
|
@@ -5719,7 +5730,6 @@ export declare class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasE
|
|
|
5719
5730
|
selectNodes(nodes?: LGraphNode[], add_to_current_selection?: boolean): void;
|
|
5720
5731
|
/** @deprecated See {@link LGraphCanvas.deselect} */
|
|
5721
5732
|
deselectNode(node: LGraphNode): void;
|
|
5722
|
-
/** Deselects all items on the canvas. */
|
|
5723
5733
|
deselectAll(options?: DeselectAllOptions): void;
|
|
5724
5734
|
/** @deprecated Pass `{ keepSelected }` instead. */
|
|
5725
5735
|
deselectAll(keepSelected?: Positionable): void;
|
|
@@ -7768,28 +7778,47 @@ export declare class LiteGraphGlobal {
|
|
|
7768
7778
|
* if dont want this, calculate once and set registered_slot_[in/out]_types and slot_types_[in/out]
|
|
7769
7779
|
*/
|
|
7770
7780
|
auto_load_slot_types: boolean;
|
|
7781
|
+
private registeredSlotInTypes;
|
|
7782
|
+
private registeredSlotOutTypes;
|
|
7783
|
+
private slotTypesOut;
|
|
7784
|
+
private slotTypesDefaultIn;
|
|
7785
|
+
private slotTypesDefaultOut;
|
|
7786
|
+
private fillSlotTypeTables?;
|
|
7771
7787
|
/** slot types for nodeclass */
|
|
7772
|
-
registered_slot_in_types: Record<string, {
|
|
7788
|
+
get registered_slot_in_types(): Record<string, {
|
|
7773
7789
|
nodes: string[];
|
|
7774
7790
|
}>;
|
|
7791
|
+
set registered_slot_in_types(value: Record<string, {
|
|
7792
|
+
nodes: string[];
|
|
7793
|
+
}>);
|
|
7775
7794
|
/** slot types for nodeclass */
|
|
7776
|
-
registered_slot_out_types: Record<string, {
|
|
7795
|
+
get registered_slot_out_types(): Record<string, {
|
|
7777
7796
|
nodes: string[];
|
|
7778
7797
|
}>;
|
|
7798
|
+
set registered_slot_out_types(value: Record<string, {
|
|
7799
|
+
nodes: string[];
|
|
7800
|
+
}>);
|
|
7779
7801
|
/** slot types IN */
|
|
7780
7802
|
slot_types_in: string[];
|
|
7781
7803
|
/** slot types OUT */
|
|
7782
|
-
slot_types_out: string[];
|
|
7804
|
+
get slot_types_out(): string[];
|
|
7805
|
+
set slot_types_out(value: string[]);
|
|
7783
7806
|
/**
|
|
7784
7807
|
* specify for each IN slot type a(/many) default node(s), use single string, array, or object
|
|
7785
7808
|
* (with node, title, parameters, ..) like for search
|
|
7786
7809
|
*/
|
|
7787
|
-
slot_types_default_in: Record<string, SlotTypeDefault>;
|
|
7810
|
+
get slot_types_default_in(): Record<string, SlotTypeDefault>;
|
|
7811
|
+
set slot_types_default_in(value: Record<string, SlotTypeDefault>);
|
|
7788
7812
|
/**
|
|
7789
7813
|
* specify for each OUT slot type a(/many) default node(s), use single string, array, or object
|
|
7790
7814
|
* (with node, title, parameters, ..) like for search
|
|
7791
7815
|
*/
|
|
7792
|
-
slot_types_default_out: Record<string, SlotTypeDefault>;
|
|
7816
|
+
get slot_types_default_out(): Record<string, SlotTypeDefault>;
|
|
7817
|
+
set slot_types_default_out(value: Record<string, SlotTypeDefault>);
|
|
7818
|
+
/** Defers filling the slot type tables until one is read or {@link flushSlotTypeTables} runs. */
|
|
7819
|
+
deferSlotTypeTables(fill: () => void): void;
|
|
7820
|
+
/** Runs the fill passed to {@link deferSlotTypeTables}, if it has not run yet. */
|
|
7821
|
+
flushSlotTypeTables(): void;
|
|
7793
7822
|
/** [true!] very handy, ALT click to clone and drag the new node */
|
|
7794
7823
|
alt_drag_do_clone_nodes: boolean;
|
|
7795
7824
|
/**
|
|
@@ -8492,6 +8521,21 @@ declare interface NodeBindable {
|
|
|
8492
8521
|
setNodeId(nodeId: NodeId): void;
|
|
8493
8522
|
}
|
|
8494
8523
|
|
|
8524
|
+
/**
|
|
8525
|
+
* The public surface of the application singleton created in
|
|
8526
|
+
* `@/scripts/app`. Modules that the app itself imports reach the running
|
|
8527
|
+
* instance through `useApp()` from `@/scripts/appInstance`; only the
|
|
8528
|
+
* composition root imports the class.
|
|
8529
|
+
*/
|
|
8530
|
+
/** The node definitions, or the HTTP status of the server's refusal. */
|
|
8531
|
+
declare type NodeDefsFetch = {
|
|
8532
|
+
ok: true;
|
|
8533
|
+
defs: Record<string, ComfyNodeDef>;
|
|
8534
|
+
} | {
|
|
8535
|
+
ok: false;
|
|
8536
|
+
status: number;
|
|
8537
|
+
};
|
|
8538
|
+
|
|
8495
8539
|
export declare type NodeError = {
|
|
8496
8540
|
errors: (PromptError & {
|
|
8497
8541
|
extra_info?: {
|