@comfyorg/comfyui-frontend-types 1.26.2 → 1.26.3
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 +30 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -212,9 +212,10 @@ declare interface BaseResolvedConnection {
|
|
|
212
212
|
declare interface BaseSidebarTabExtension {
|
|
213
213
|
id: string;
|
|
214
214
|
title: string;
|
|
215
|
-
icon?: string;
|
|
215
|
+
icon?: string | Component;
|
|
216
216
|
iconBadge?: string | (() => string | null);
|
|
217
217
|
tooltip?: string;
|
|
218
|
+
label?: string;
|
|
218
219
|
}
|
|
219
220
|
|
|
220
221
|
/**
|
|
@@ -454,6 +455,17 @@ declare class CanvasPointer {
|
|
|
454
455
|
/** Maximum offset from click location */
|
|
455
456
|
static get maxClickDrift(): number;
|
|
456
457
|
static set maxClickDrift(value: number);
|
|
458
|
+
/** Assume that "wheel" events with both deltaX and deltaY less than this value are trackpad gestures. */
|
|
459
|
+
static trackpadThreshold: number;
|
|
460
|
+
/**
|
|
461
|
+
* The minimum time between "wheel" events to allow switching between trackpad
|
|
462
|
+
* and mouse modes.
|
|
463
|
+
*
|
|
464
|
+
* This prevents trackpad "flick" panning from registering as regular mouse wheel.
|
|
465
|
+
* After a flick gesture is complete, the automatic wheel events are sent with
|
|
466
|
+
* reduced frequency, but much higher deltaX and deltaY values.
|
|
467
|
+
*/
|
|
468
|
+
static trackpadMaxGap: number;
|
|
457
469
|
/** The element this PointerState should capture input against when dragging. */
|
|
458
470
|
element: Element;
|
|
459
471
|
/** Pointer ID used by drag capture. */
|
|
@@ -481,6 +493,8 @@ declare class CanvasPointer {
|
|
|
481
493
|
eMove?: CanvasPointerEvent;
|
|
482
494
|
/** The last pointerup event for the primary button */
|
|
483
495
|
eUp?: CanvasPointerEvent;
|
|
496
|
+
/** The last pointermove event that was treated as a trackpad gesture. */
|
|
497
|
+
lastTrackpadEvent?: WheelEvent;
|
|
484
498
|
/**
|
|
485
499
|
* If set, as soon as the mouse moves outside the click drift threshold, this action is run once.
|
|
486
500
|
* @param pointer [DEPRECATED] This parameter will be removed in a future release.
|
|
@@ -535,6 +549,12 @@ declare class CanvasPointer {
|
|
|
535
549
|
* @param e The `pointerup` event
|
|
536
550
|
*/
|
|
537
551
|
up(e: CanvasPointerEvent): boolean;
|
|
552
|
+
/**
|
|
553
|
+
* Checks if the given wheel event is part of a trackpad gesture.
|
|
554
|
+
* @param e The wheel event to check
|
|
555
|
+
* @returns `true` if the event is part of a trackpad gesture, otherwise `false`
|
|
556
|
+
*/
|
|
557
|
+
isTrackpadGesture(e: WheelEvent): boolean;
|
|
538
558
|
/**
|
|
539
559
|
* Resets the state of this {@link CanvasPointer} instance.
|
|
540
560
|
*
|
|
@@ -1149,6 +1169,7 @@ export declare class ComfyApp {
|
|
|
1149
1169
|
versionAdded?: string;
|
|
1150
1170
|
confirmation?: string;
|
|
1151
1171
|
source?: string;
|
|
1172
|
+
active?: () => boolean;
|
|
1152
1173
|
category?: 'essentials' | 'view-controls';
|
|
1153
1174
|
}
|
|
1154
1175
|
|
|
@@ -2047,6 +2068,7 @@ export declare class ComfyApp {
|
|
|
2047
2068
|
canConnectToInput(): boolean;
|
|
2048
2069
|
canConnectToOutput(): boolean;
|
|
2049
2070
|
canConnectToReroute(reroute: Reroute): boolean;
|
|
2071
|
+
canConnectToSubgraphInput(input: SubgraphInput): boolean;
|
|
2050
2072
|
connectToInput(node: LGraphNode, input: INodeInputSlot, _events?: CustomEventTarget<LinkConnectorEventMap>): void;
|
|
2051
2073
|
connectToOutput(node: LGraphNode, output: INodeOutputSlot, _events?: CustomEventTarget<LinkConnectorEventMap>): void;
|
|
2052
2074
|
connectToSubgraphInput(input: SubgraphInput, _events?: CustomEventTarget<LinkConnectorEventMap>): void;
|
|
@@ -3167,6 +3189,7 @@ export declare class ComfyApp {
|
|
|
3167
3189
|
subgraph: Subgraph;
|
|
3168
3190
|
node: SubgraphNode;
|
|
3169
3191
|
};
|
|
3192
|
+
unpackSubgraph(subgraphNode: SubgraphNode): void;
|
|
3170
3193
|
/**
|
|
3171
3194
|
* Resolve a path of subgraph node IDs into a list of subgraph nodes.
|
|
3172
3195
|
* Not intended to be run from subgraphs.
|
|
@@ -5033,6 +5056,7 @@ export declare class ComfyApp {
|
|
|
5033
5056
|
connectToNode(node: LGraphNode, event: CanvasPointerEvent): void;
|
|
5034
5057
|
isInputValidDrop(node: LGraphNode, input: INodeInputSlot): boolean;
|
|
5035
5058
|
isNodeValidDrop(node: LGraphNode): boolean;
|
|
5059
|
+
isSubgraphInputValidDrop(input: SubgraphInput): boolean;
|
|
5036
5060
|
/**
|
|
5037
5061
|
* Checks if a reroute is a valid drop target for any of the links being connected.
|
|
5038
5062
|
* @param reroute The reroute that would be dropped on.
|
|
@@ -5405,6 +5429,7 @@ export declare class ComfyApp {
|
|
|
5405
5429
|
*/
|
|
5406
5430
|
onDeprecationWarning: ((message: string, source?: object) => void)[];
|
|
5407
5431
|
/**
|
|
5432
|
+
* @deprecated Removed; has no effect.
|
|
5408
5433
|
* If `true`, mouse wheel events will be interpreted as trackpad gestures.
|
|
5409
5434
|
* Tested on MacBook M4 Pro.
|
|
5410
5435
|
* @default false
|
|
@@ -5412,6 +5437,7 @@ export declare class ComfyApp {
|
|
|
5412
5437
|
*/
|
|
5413
5438
|
macTrackpadGestures: boolean;
|
|
5414
5439
|
/**
|
|
5440
|
+
* @deprecated Removed; has no effect.
|
|
5415
5441
|
* If both this setting and {@link macTrackpadGestures} are `true`, trackpad gestures will
|
|
5416
5442
|
* only be enabled when the browser user agent includes "Mac".
|
|
5417
5443
|
* @default true
|
|
@@ -5802,6 +5828,7 @@ export declare class ComfyApp {
|
|
|
5802
5828
|
canConnectToInput(): false;
|
|
5803
5829
|
canConnectToOutput(outputNode: NodeLike, output: INodeOutputSlot | SubgraphIO): boolean;
|
|
5804
5830
|
canConnectToReroute(reroute: Reroute): boolean;
|
|
5831
|
+
canConnectToSubgraphInput(input: SubgraphInput): boolean;
|
|
5805
5832
|
connectToInput(): never;
|
|
5806
5833
|
connectToOutput(outputNode: LGraphNode, output: INodeOutputSlot, events: CustomEventTarget<LinkConnectorEventMap>): LLink | null | undefined;
|
|
5807
5834
|
connectToSubgraphInput(input: SubgraphInput, events?: CustomEventTarget<LinkConnectorEventMap>): void;
|
|
@@ -7214,6 +7241,7 @@ export declare class ComfyApp {
|
|
|
7214
7241
|
canConnectToInput(): false;
|
|
7215
7242
|
canConnectToOutput(outputNode: NodeLike, output: INodeOutputSlot | SubgraphIO): boolean;
|
|
7216
7243
|
canConnectToReroute(reroute: Reroute): boolean;
|
|
7244
|
+
canConnectToSubgraphInput(input: SubgraphInput): boolean;
|
|
7217
7245
|
connectToOutput(node: LGraphNode, output: INodeOutputSlot, events: CustomEventTarget<LinkConnectorEventMap>): void;
|
|
7218
7246
|
connectToSubgraphInput(input: SubgraphInput, events?: CustomEventTarget<LinkConnectorEventMap>): void;
|
|
7219
7247
|
connectToRerouteOutput(reroute: Reroute, outputNode: LGraphNode, output: INodeOutputSlot, events: CustomEventTarget<LinkConnectorEventMap>): void;
|
|
@@ -13407,7 +13435,7 @@ declare global {
|
|
|
13407
13435
|
}
|
|
13408
13436
|
}
|
|
13409
13437
|
|
|
13410
|
-
|
|
13438
|
+
|
|
13411
13439
|
|
|
13412
13440
|
declare global {
|
|
13413
13441
|
interface Window {
|