@comfyorg/comfyui-frontend-types 1.28.4 → 1.28.5

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 +112 -59
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -29,6 +29,7 @@ import { RunningTaskItem } from '../schemas/apiSchema';
29
29
  import { Settings } from '../schemas/apiSchema';
30
30
  import { Settings as Settings_2 } from '../../schemas/apiSchema';
31
31
  import { Settings as Settings_3 } from '../../../schemas/apiSchema';
32
+ import { ShallowRef } from 'vue';
32
33
  import { StatusWsMessage } from '../schemas/apiSchema';
33
34
  import { StatusWsMessageStatus } from '../schemas/apiSchema';
34
35
  import { SystemStats } from '../schemas/apiSchema';
@@ -69,9 +70,6 @@ declare type ApiToEventType<T = ApiCalls> = {
69
70
  [K in keyof T]: K extends 'status' ? StatusWsMessageStatus : K extends 'executing' ? NodeId_2 : T[K];
70
71
  };
71
72
 
72
- /** A very firm array */
73
- declare type ArRect = [x: number, y: number, width: number, height: number];
74
-
75
73
  /** Wraps all properties in {@link CustomEvent}. */
76
74
  declare type AsCustomEvents<T> = {
77
75
  readonly [K in keyof T]: CustomEvent<T[K]>;
@@ -258,6 +256,7 @@ declare abstract class BaseWidget<TWidget extends IBaseWidget = IBaseWidget> imp
258
256
  computedDisabled?: boolean;
259
257
  hidden?: boolean;
260
258
  advanced?: boolean;
259
+ promoted?: boolean;
261
260
  tooltip?: string;
262
261
  element?: HTMLElement;
263
262
  callback?(value: any, canvas?: LGraphCanvas, node?: LGraphNode, pos?: Point, e?: CanvasPointerEvent): void;
@@ -971,7 +970,14 @@ export declare class ComfyApi extends EventTarget {
971
970
  }
972
971
 
973
972
  export declare class ComfyApp {
974
- #private;
973
+ /**
974
+ * List of entries to queue
975
+ */
976
+ private queueItems;
977
+ /**
978
+ * If the queue is currently being processed
979
+ */
980
+ private processingQueue;
975
981
  /**
976
982
  * Content Clipboard
977
983
  * @type {serialized node object}
@@ -993,7 +999,9 @@ export declare class ComfyApp {
993
999
  get rootGraph(): LGraph | undefined;
994
1000
  canvas: LGraphCanvas;
995
1001
  dragOverNode: LGraphNode | null;
996
- canvasEl: HTMLCanvasElement;
1002
+ readonly canvasElRef: ShallowRef<HTMLCanvasElement | undefined, HTMLCanvasElement | undefined>;
1003
+ get canvasEl(): HTMLCanvasElement;
1004
+ private configuringGraphLevel;
997
1005
  get configuringGraph(): boolean;
998
1006
  ctx: CanvasRenderingContext2D;
999
1007
  bodyTop: HTMLElement;
@@ -1004,6 +1012,7 @@ export declare class ComfyApp {
1004
1012
  menu: ComfyAppMenu;
1005
1013
  bypassBgColor: string;
1006
1014
  openClipspace: () => void;
1015
+ private positionConversion?;
1007
1016
  /**
1008
1017
  * The node errors from the previous execution.
1009
1018
  * @deprecated Use useExecutionStore().lastNodeErrors instead
@@ -1077,13 +1086,29 @@ export declare class ComfyApp {
1077
1086
  static onClipspaceEditorClosed(): void;
1078
1087
  static copyToClipspace(node: LGraphNode): void;
1079
1088
  static pasteFromClipspace(node: LGraphNode): void;
1089
+ /**
1090
+ * Adds a handler allowing drag+drop of files onto the window to load workflows
1091
+ */
1092
+ private addDropHandler;
1093
+ /**
1094
+ * Handle keypress
1095
+ */
1096
+ private addProcessKeyHandler;
1097
+ private addDrawNodeHandler;
1098
+ /**
1099
+ * Handles updates from the API socket
1100
+ */
1101
+ private addApiUpdateHandlers;
1102
+ /** Flag that the graph is configuring to prevent nodes from running checks while its still loading */
1103
+ private addConfigureHandler;
1080
1104
  private addAfterConfigureHandler;
1081
1105
  /**
1082
1106
  * Set up the app on the page
1083
1107
  */
1084
1108
  setup(canvasEl: HTMLCanvasElement): Promise<void>;
1085
- resizeCanvas(): void;
1109
+ private resizeCanvas;
1086
1110
  private updateVueAppNodeDefs;
1111
+ getNodeDefs(): Promise<Record<string, ComfyNodeDef>>;
1087
1112
  /**
1088
1113
  * Registers nodes with the graph
1089
1114
  */
@@ -1091,6 +1116,8 @@ export declare class ComfyApp {
1091
1116
  registerNodeDef(nodeId: string, nodeDef: ComfyNodeDef): Promise<void>;
1092
1117
  registerNodesFromDefs(defs: Record<string, ComfyNodeDef>): Promise<void>;
1093
1118
  loadTemplateData(templateData: any): void;
1119
+ private showMissingNodesError;
1120
+ private showMissingModelsError;
1094
1121
  loadGraphData(graphData?: ComfyWorkflowJSON, clean?: boolean, restore_view?: boolean, workflow?: string | null | ComfyWorkflow, { showMissingNodesDialog, showMissingModelsDialog, checkForRerouteMigration }?: {
1095
1122
  showMissingNodesDialog?: boolean | undefined;
1096
1123
  showMissingModelsDialog?: boolean | undefined;
@@ -1548,9 +1575,9 @@ export declare class ComfyApp {
1548
1575
  get desiredHeight(): number;
1549
1576
  set desiredHeight(value: number);
1550
1577
  constructor(width: number, height: number);
1551
- static fromSize(size: ReadOnlySize): ConstrainedSize;
1578
+ static fromSize(size: Readonly<Size>): ConstrainedSize;
1552
1579
  static fromRect(rect: ReadOnlyRect): ConstrainedSize;
1553
- setSize(size: ReadOnlySize): void;
1580
+ setSize(size: Readonly<Size>): void;
1554
1581
  setValues(width: number, height: number): void;
1555
1582
  toSize(): Size;
1556
1583
  }
@@ -1735,7 +1762,7 @@ export declare class ComfyApp {
1735
1762
  * @param b Point b as `x, y`
1736
1763
  * @returns Distance between point {@link a} & {@link b}
1737
1764
  */
1738
- declare function distance(a: ReadOnlyPoint, b: ReadOnlyPoint): number;
1765
+ declare function distance(a: Readonly<Point>, b: Readonly<Point>): number;
1739
1766
 
1740
1767
  /**
1741
1768
  * A DOM widget that wraps a custom HTML element as a litegraph widget.
@@ -1923,7 +1950,7 @@ export declare class ComfyApp {
1923
1950
  readonly subgraphNodePath: readonly NodeId[];
1924
1951
  /** A flattened map of all DTOs in this node network. Subgraph instances have been expanded into their inner nodes. */
1925
1952
  readonly nodesByExecutionId: Map<ExecutionId, ExecutableLGraphNode>;
1926
- /** The actual subgraph instance that contains this node, otherise undefined. */
1953
+ /** The actual subgraph instance that contains this node, otherwise undefined. */
1927
1954
  readonly subgraphNode?: SubgraphNode | undefined;
1928
1955
  applyToGraph?(...args: CallbackParams<typeof ExecutableNodeDTO.node.applyToGraph>): CallbackReturn<typeof ExecutableNodeDTO.node.applyToGraph>;
1929
1956
  /** The graph that this node is a part of. */
@@ -1934,7 +1961,7 @@ export declare class ComfyApp {
1934
1961
  type: ISlotType;
1935
1962
  }[];
1936
1963
  /**
1937
- * The path to the acutal node through subgraph instances, represented as a list of all subgraph node IDs (instances),
1964
+ * The path to the actual node through subgraph instances, represented as a list of all subgraph node IDs (instances),
1938
1965
  * followed by the actual original node ID within the subgraph. Each segment is separated by `:`.
1939
1966
  *
1940
1967
  * e.g. `1:2:3`:
@@ -1957,7 +1984,7 @@ export declare class ComfyApp {
1957
1984
  subgraphNodePath: readonly NodeId[],
1958
1985
  /** A flattened map of all DTOs in this node network. Subgraph instances have been expanded into their inner nodes. */
1959
1986
  nodesByExecutionId: Map<ExecutionId, ExecutableLGraphNode>,
1960
- /** The actual subgraph instance that contains this node, otherise undefined. */
1987
+ /** The actual subgraph instance that contains this node, otherwise undefined. */
1961
1988
  subgraphNode?: SubgraphNode | undefined);
1962
1989
  /** Returns either the DTO itself, or the DTOs of the inner nodes of the subgraph. */
1963
1990
  getInnerNodes(): ExecutableLGraphNode[];
@@ -2229,6 +2256,13 @@ export declare class ComfyApp {
2229
2256
  computedDisabled?: boolean;
2230
2257
  hidden?: boolean;
2231
2258
  advanced?: boolean;
2259
+ /**
2260
+ * This property is automatically computed on graph change
2261
+ * and should not be changed.
2262
+ * Promoted widgets have a colored border
2263
+ * @see /core/graph/subgraph/proxyWidget.registerProxyWidgets
2264
+ */
2265
+ promoted?: boolean;
2232
2266
  tooltip?: string;
2233
2267
  callback?(value: any, canvas?: LGraphCanvas, node?: LGraphNode, pos?: Point, e?: CanvasPointerEvent): void;
2234
2268
  /**
@@ -2601,7 +2635,7 @@ export declare class ComfyApp {
2601
2635
  nameLocked?: boolean;
2602
2636
  pos?: Point;
2603
2637
  /** @remarks Automatically calculated; not included in serialisation. */
2604
- boundingRect: Rect;
2638
+ boundingRect: ReadOnlyRect;
2605
2639
  /**
2606
2640
  * A list of floating link IDs that are connected to this slot.
2607
2641
  * This is calculated at runtime; it is **not** serialized.
@@ -3224,7 +3258,7 @@ export declare class ComfyApp {
3224
3258
  /**
3225
3259
  * Snaps the provided items to a grid.
3226
3260
  *
3227
- * Item positions are reounded to the nearest multiple of {@link LiteGraph.CANVAS_GRID_SIZE}.
3261
+ * Item positions are rounded to the nearest multiple of {@link LiteGraph.CANVAS_GRID_SIZE}.
3228
3262
  *
3229
3263
  * When {@link LiteGraph.alwaysSnapToGrid} is enabled
3230
3264
  * and the grid size is falsy, a default of 1 is used.
@@ -3519,7 +3553,7 @@ export declare class ComfyApp {
3519
3553
  linkMarkerShape: LinkMarkerShape;
3520
3554
  links_render_mode: number;
3521
3555
  /** Minimum font size in pixels before switching to low quality rendering.
3522
- * This intializes first and if we cant get the value from the settings we default to 8px
3556
+ * This initializes first and if we can't get the value from the settings we default to 8px
3523
3557
  */
3524
3558
  private _min_font_size_for_lod;
3525
3559
  get min_font_size_for_lod(): number;
@@ -3583,7 +3617,7 @@ export declare class ComfyApp {
3583
3617
  dirty_area?: Rect | null;
3584
3618
  /** @deprecated Unused */
3585
3619
  node_in_panel?: LGraphNode | null;
3586
- last_mouse: ReadOnlyPoint;
3620
+ last_mouse: Readonly<Point>;
3587
3621
  last_mouseclick: number;
3588
3622
  graph: LGraph | Subgraph | null;
3589
3623
  get _graph(): LGraph | Subgraph;
@@ -3711,7 +3745,7 @@ export declare class ComfyApp {
3711
3745
  * Assigns a new graph to this canvas.
3712
3746
  */
3713
3747
  setGraph(newGraph: LGraph | Subgraph): void;
3714
- openSubgraph(subgraph: Subgraph): void;
3748
+ openSubgraph(subgraph: Subgraph, fromNode: SubgraphNode): void;
3715
3749
  /**
3716
3750
  * @returns the visually active graph (in case there are more in the stack)
3717
3751
  */
@@ -3986,13 +4020,13 @@ export declare class ComfyApp {
3986
4020
  * @param start_dir the direction enum
3987
4021
  * @param end_dir the direction enum
3988
4022
  */
3989
- renderLink(ctx: CanvasRenderingContext2D, a: ReadOnlyPoint, b: ReadOnlyPoint, link: LLink | null, skip_border: boolean, flow: number | null, color: CanvasColour | null, start_dir: LinkDirection, end_dir: LinkDirection, { startControl, endControl, reroute, num_sublines, disabled }?: {
4023
+ renderLink(ctx: CanvasRenderingContext2D, a: Readonly<Point>, b: Readonly<Point>, link: LLink | null, skip_border: boolean, flow: number | null, color: CanvasColour | null, start_dir: LinkDirection, end_dir: LinkDirection, { startControl, endControl, reroute, num_sublines, disabled }?: {
3990
4024
  /** When defined, render data will be saved to this reroute instead of the {@link link}. */
3991
4025
  reroute?: Reroute;
3992
4026
  /** Offset of the bezier curve control point from {@link a point a} (output side) */
3993
- startControl?: ReadOnlyPoint;
4027
+ startControl?: Readonly<Point>;
3994
4028
  /** Offset of the bezier curve control point from {@link b point b} (input side) */
3995
- endControl?: ReadOnlyPoint;
4029
+ endControl?: Readonly<Point>;
3996
4030
  /** Number of sublines (useful to represent vec3 or rgb) @todo If implemented, refactor calculations out of the loop */
3997
4031
  num_sublines?: number;
3998
4032
  /** Whether this is a floating link segment */
@@ -4047,6 +4081,27 @@ export declare class ComfyApp {
4047
4081
  * If nothing is selected, the view is fitted around all items in the graph.
4048
4082
  */
4049
4083
  fitViewToSelectionAnimated(options?: AnimationOptions): void;
4084
+ /**
4085
+ * Calculate new position with delta
4086
+ */
4087
+ private calculateNewPosition;
4088
+ /**
4089
+ * Apply batched node position updates
4090
+ */
4091
+ private applyNodePositionUpdates;
4092
+ /**
4093
+ * Initialize layout mutations with Canvas source
4094
+ */
4095
+ private initLayoutMutations;
4096
+ /**
4097
+ * Collect all nodes that are children of groups in the selection
4098
+ */
4099
+ private collectNodesInGroups;
4100
+ /**
4101
+ * Move group children (both nodes and non-nodes)
4102
+ */
4103
+ private moveGroupChildren;
4104
+ moveChildNodesInGroupVueMode(allItems: Set<Positionable>, deltaX: number, deltaY: number): void;
4050
4105
  }
4051
4106
 
4052
4107
  declare interface LGraphCanvasEventMap {
@@ -4057,6 +4112,11 @@ export declare class ComfyApp {
4057
4112
  /** The old active graph, or `null` if there was no active graph. */
4058
4113
  oldGraph: LGraph | Subgraph | null | undefined;
4059
4114
  };
4115
+ 'subgraph-opened': {
4116
+ subgraph: Subgraph;
4117
+ closingGraph: LGraph;
4118
+ fromNode: SubgraphNode;
4119
+ };
4060
4120
  'litegraph:canvas': {
4061
4121
  subType: 'before-change' | 'after-change';
4062
4122
  } | {
@@ -4177,7 +4237,7 @@ export declare class ComfyApp {
4177
4237
  title: string;
4178
4238
  font?: string;
4179
4239
  font_size: number;
4180
- _bounding: Float32Array;
4240
+ _bounding: Rectangle;
4181
4241
  _pos: Point;
4182
4242
  _size: Size;
4183
4243
  /** @deprecated See {@link _children} */
@@ -4197,7 +4257,8 @@ export declare class ComfyApp {
4197
4257
  /** Size of the group, as width,height in graph units */
4198
4258
  get size(): Size;
4199
4259
  set size(v: Size);
4200
- get boundingRect(): Float32Array<ArrayBufferLike>;
4260
+ get boundingRect(): Rectangle;
4261
+ getBounding(): Rectangle;
4201
4262
  get nodes(): LGraphNode[];
4202
4263
  get titleHeight(): number;
4203
4264
  get children(): ReadonlySet<Positionable>;
@@ -4403,9 +4464,9 @@ export declare class ComfyApp {
4403
4464
  */
4404
4465
  get boundingRect(): ReadOnlyRectangle;
4405
4466
  /** The offset from {@link pos} to the top-left of {@link boundingRect}. */
4406
- get boundingOffset(): ReadOnlyPoint;
4407
- /** {@link pos} and {@link size} values are backed by this {@link Rect}. */
4408
- _posSize: Float32Array;
4467
+ get boundingOffset(): Readonly<Point>;
4468
+ /** {@link pos} and {@link size} values are backed by this {@link Rectangle}. */
4469
+ _posSize: Rectangle;
4409
4470
  _pos: Point;
4410
4471
  _size: Size;
4411
4472
  get pos(): Point;
@@ -4730,7 +4791,7 @@ export declare class ComfyApp {
4730
4791
  measure(out: Rect, ctx: CanvasRenderingContext2D): void;
4731
4792
  /**
4732
4793
  * returns the bounding of the object, used for rendering purposes
4733
- * @param out {Float32Array[4]?} [optional] a place to store the output, to free garbage
4794
+ * @param out {Rect?} [optional] a place to store the output, to free garbage
4734
4795
  * @param includeExternal {boolean?} [optional] set to true to
4735
4796
  * include the shadow and connection points in the bounding calculation
4736
4797
  * @returns the bounding box in format of [topleft_cornerx, topleft_cornery, width, height]
@@ -4837,7 +4898,7 @@ export declare class ComfyApp {
4837
4898
  findOutputSlotByType<TReturn extends true>(type: ISlotType, returnObj?: TReturn, preferFreeSlot?: boolean, doNotUseOccupied?: boolean): INodeOutputSlot;
4838
4899
  /**
4839
4900
  * returns the output (or input) slot with a given type, -1 if not found
4840
- * @param input uise inputs instead of outputs
4901
+ * @param input use inputs instead of outputs
4841
4902
  * @param type the type of the slot to find
4842
4903
  * @param returnObj if the obj itself wanted
4843
4904
  * @param preferFreeSlot if we want a free slot (if not found, will return the first of the type anyway)
@@ -5041,6 +5102,7 @@ export declare class ComfyApp {
5041
5102
  * Returns `true` if the widget is visible, otherwise `false`.
5042
5103
  */
5043
5104
  isWidgetVisible(widget: IBaseWidget): boolean;
5105
+ updateComputedDisabled(): void;
5044
5106
  drawWidgets(ctx: CanvasRenderingContext2D, { lowQuality, editorAlpha }: DrawWidgetsOptions): void;
5045
5107
  /**
5046
5108
  * When {@link LGraphNode.collapsed} is `true`, this method draws the node's collapsed slots.
@@ -5369,7 +5431,7 @@ export declare class ComfyApp {
5369
5431
  /** The last canvas 2D path that was used to render this segment */
5370
5432
  path?: Path2D;
5371
5433
  /** Centre point of the {@link path}. Calculated during render only - can be inaccurate */
5372
- readonly _pos: Float32Array;
5434
+ readonly _pos: Point;
5373
5435
  /**
5374
5436
  * Y-forward along the {@link path} from its centre point, in radians.
5375
5437
  * `undefined` if using circles for link centres.
@@ -5424,6 +5486,7 @@ export declare class ComfyApp {
5424
5486
  GROUP_FONT: string;
5425
5487
  WIDGET_BGCOLOR: string;
5426
5488
  WIDGET_OUTLINE_COLOR: string;
5489
+ WIDGET_PROMOTED_OUTLINE_COLOR: string;
5427
5490
  WIDGET_ADVANCED_OUTLINE_COLOR: string;
5428
5491
  WIDGET_TEXT_COLOR: string;
5429
5492
  WIDGET_SECONDARY_TEXT_COLOR: string;
@@ -5570,9 +5633,9 @@ export declare class ComfyApp {
5570
5633
  * !WILL CHANGE node mode when using onTrigger (enable mode colors), onExecuted does not need this
5571
5634
  */
5572
5635
  do_add_triggers_slots: boolean;
5573
- /** [false!] being events, it is strongly reccomended to use them sequentially, one by one */
5636
+ /** [false!] being events, it is strongly recommended to use them sequentially, one by one */
5574
5637
  allow_multi_output_for_events: boolean;
5575
- /** [true!] allows to create and connect a ndoe clicking with the third button (wheel) */
5638
+ /** [true!] allows to create and connect a node clicking with the third button (wheel) */
5576
5639
  middle_click_slot_add_default_node: boolean;
5577
5640
  /** [true!] dragging a link to empty space will open a menu, add from list, search or defaults */
5578
5641
  release_link_on_empty_shows_menu: boolean;
@@ -5777,14 +5840,14 @@ export declare class ComfyApp {
5777
5840
  * Direct rendering method compatible with LGraphCanvas
5778
5841
  * Converts data and delegates to pure renderer
5779
5842
  */
5780
- renderLinkDirect(ctx: CanvasRenderingContext2D, a: ReadOnlyPoint, b: ReadOnlyPoint, link: LLink | null, skip_border: boolean, flow: number | boolean | null, color: CanvasColour | null, start_dir: LinkDirection, end_dir: LinkDirection, context: LinkRenderContext, extras?: {
5843
+ renderLinkDirect(ctx: CanvasRenderingContext2D, a: Readonly<Point>, b: Readonly<Point>, link: LLink | null, skip_border: boolean, flow: number | boolean | null, color: CanvasColour | null, start_dir: LinkDirection, end_dir: LinkDirection, context: LinkRenderContext, extras?: {
5781
5844
  reroute?: Reroute;
5782
- startControl?: ReadOnlyPoint;
5783
- endControl?: ReadOnlyPoint;
5845
+ startControl?: Readonly<Point>;
5846
+ endControl?: Readonly<Point>;
5784
5847
  num_sublines?: number;
5785
5848
  disabled?: boolean;
5786
5849
  }): void;
5787
- renderDraggingLink(ctx: CanvasRenderingContext2D, from: ReadOnlyPoint, to: ReadOnlyPoint, colour: CanvasColour, startDir: LinkDirection, endDir: LinkDirection, context: LinkRenderContext): void;
5850
+ renderDraggingLink(ctx: CanvasRenderingContext2D, from: Readonly<Point>, to: Readonly<Point>, colour: CanvasColour, startDir: LinkDirection, endDir: LinkDirection, context: LinkRenderContext): void;
5788
5851
  /**
5789
5852
  * Calculate bounding box for a link
5790
5853
  * Includes padding for line width and control points
@@ -5812,7 +5875,7 @@ export declare class ComfyApp {
5812
5875
  };
5813
5876
  _data?: unknown;
5814
5877
  /** Centre point of the link, calculated during render only - can be inaccurate */
5815
- _pos: Float32Array;
5878
+ _pos: Point;
5816
5879
  /** @todo Clean up - never implemented in comfy. */
5817
5880
  _last_time?: number;
5818
5881
  /** The last canvas 2D path that was used to render this link */
@@ -6227,7 +6290,7 @@ export declare class ComfyApp {
6227
6290
  };
6228
6291
 
6229
6292
  /** A point represented as `[x, y]` co-ordinates */
6230
- declare type Point = [x: number, y: number] | Float32Array | Float64Array;
6293
+ declare type Point = [x: number, y: number];
6231
6294
 
6232
6295
  /**
6233
6296
  * An object that can be positioned, selected, and moved.
@@ -6302,21 +6365,15 @@ export declare class ComfyApp {
6302
6365
  readonly outputNode?: SubgraphOutputNode;
6303
6366
  }
6304
6367
 
6305
- /** A point represented as `[x, y]` co-ordinates that will not be modified */
6306
- declare type ReadOnlyPoint = readonly [x: number, y: number] | ReadOnlyTypedArray<Float32Array> | ReadOnlyTypedArray<Float64Array>;
6307
-
6308
6368
  /** A rectangle starting at top-left coordinates `[x, y, width, height]` that will not be modified */
6309
- declare type ReadOnlyRect = readonly [x: number, y: number, width: number, height: number] | ReadOnlyTypedArray<Float32Array> | ReadOnlyTypedArray<Float64Array>;
6369
+ declare type ReadOnlyRect = readonly [x: number, y: number, width: number, height: number] | ReadOnlyTypedArray<Float64Array>;
6310
6370
 
6311
6371
  declare type ReadOnlyRectangle = Omit<ReadOnlyTypedArray<Rectangle>, 'setHeightBottomAnchored' | 'setWidthRightAnchored' | 'resizeTopLeft' | 'resizeBottomLeft' | 'resizeTopRight' | 'resizeBottomRight' | 'resizeBottomRight' | 'updateTo'>;
6312
6372
 
6313
- /** A size represented as `[width, height]` that will not be modified */
6314
- declare type ReadOnlySize = readonly [width: number, height: number] | ReadOnlyTypedArray<Float32Array> | ReadOnlyTypedArray<Float64Array>;
6315
-
6316
- declare type ReadOnlyTypedArray<T extends TypedArrays | TypedBigIntArrays> = Omit<Readonly<T>, 'fill' | 'copyWithin' | 'reverse' | 'set' | 'sort' | 'subarray'>;
6373
+ declare type ReadOnlyTypedArray<T extends Float64Array> = Omit<Readonly<T>, 'fill' | 'copyWithin' | 'reverse' | 'set' | 'sort' | 'subarray'>;
6317
6374
 
6318
6375
  /** A rectangle starting at top-left coordinates `[x, y, width, height]` */
6319
- declare type Rect = ArRect | Float32Array | Float64Array;
6376
+ declare type Rect = [x: number, y: number, width: number, height: number] | Float64Array;
6320
6377
 
6321
6378
  /**
6322
6379
  * A rectangle, represented as a float64 array of 4 numbers: [x, y, width, height].
@@ -6340,7 +6397,7 @@ export declare class ComfyApp {
6340
6397
  * @param height The height of the rectangle. Default: {@link width}
6341
6398
  * @returns A new rectangle whose centre is at {@link x}
6342
6399
  */
6343
- static fromCentre([x, y]: ReadOnlyPoint, width: number, height?: number): Rectangle;
6400
+ static fromCentre([x, y]: Readonly<Point>, width: number, height?: number): Rectangle;
6344
6401
  static ensureRect(rect: ReadOnlyRect): Rectangle;
6345
6402
  subarray(begin?: number, end?: number): Float64Array<ArrayBuffer>;
6346
6403
  /**
@@ -6349,14 +6406,14 @@ export declare class ComfyApp {
6349
6406
  * Updating the values of the returned object will update this rectangle.
6350
6407
  */
6351
6408
  get pos(): Point;
6352
- set pos(value: ReadOnlyPoint);
6409
+ set pos(value: Readonly<Point>);
6353
6410
  /**
6354
6411
  * A reference to the size of this rectangle.
6355
6412
  *
6356
6413
  * Updating the values of the returned object will update this rectangle.
6357
6414
  */
6358
6415
  get size(): Size;
6359
- set size(value: ReadOnlySize);
6416
+ set size(value: Readonly<Size>);
6360
6417
  /** The x co-ordinate of the top-left corner of this rectangle. */
6361
6418
  get x(): number;
6362
6419
  set x(value: number);
@@ -6402,7 +6459,7 @@ export declare class ComfyApp {
6402
6459
  * @param point The point to check
6403
6460
  * @returns `true` if {@link point} is inside this rectangle, otherwise `false`.
6404
6461
  */
6405
- containsPoint([x, y]: ReadOnlyPoint): boolean;
6462
+ containsPoint([x, y]: Readonly<Point>): boolean;
6406
6463
  /**
6407
6464
  * Checks if {@link other} is a smaller rectangle inside this rectangle.
6408
6465
  * One **must** be larger than the other; identical rectangles are not considered to contain each other.
@@ -6453,9 +6510,9 @@ export declare class ComfyApp {
6453
6510
  /** @returns The width and height of this rectangle, as a new {@link Size}. */
6454
6511
  getSize(): Size;
6455
6512
  /** @returns The offset from the top-left of this rectangle to the point [{@link x}, {@link y}], as a new {@link Point}. */
6456
- getOffsetTo([x, y]: ReadOnlyPoint): Point;
6513
+ getOffsetTo([x, y]: Readonly<Point>): Point;
6457
6514
  /** @returns The offset from the point [{@link x}, {@link y}] to the top-left of this rectangle, as a new {@link Point}. */
6458
- getOffsetFrom([x, y]: ReadOnlyPoint): Point;
6515
+ getOffsetFrom([x, y]: Readonly<Point>): Point;
6459
6516
  /** Resizes the rectangle without moving it, setting its top-left corner to [{@link x}, {@link y}]. */
6460
6517
  resizeTopLeft(x1: number, y1: number): void;
6461
6518
  /** Resizes the rectangle without moving it, setting its bottom-left corner to [{@link x}, {@link y}]. */
@@ -6589,7 +6646,7 @@ export declare class ComfyApp {
6589
6646
  /** @inheritdoc */
6590
6647
  _centreAngle?: number;
6591
6648
  /** @inheritdoc */
6592
- _pos: Float32Array;
6649
+ _pos: Point;
6593
6650
  /** @inheritdoc */
6594
6651
  _dragging?: boolean;
6595
6652
  /** Colour of the first link that rendered this reroute */
@@ -6864,7 +6921,7 @@ export declare class ComfyApp {
6864
6921
  declare type SimpleApiEvents = keyof PickNevers_2<ApiEventTypes>;
6865
6922
 
6866
6923
  /** A size represented as `[width, height]` */
6867
- declare type Size = [width: number, height: number] | Float32Array | Float64Array;
6924
+ declare type Size = [width: number, height: number];
6868
6925
 
6869
6926
  declare class SliderWidget extends BaseWidget<ISliderWidget> implements ISliderWidget {
6870
6927
  type: "slider";
@@ -7102,7 +7159,7 @@ export declare class ComfyApp {
7102
7159
  id: UUID;
7103
7160
  /** The data type this slot uses. Unlike nodes, this does not support legacy numeric types. */
7104
7161
  type: string;
7105
- /** Links connected to this slot, or `undefined` if not connected. An ouptut slot should only ever have one link. */
7162
+ /** Links connected to this slot, or `undefined` if not connected. An output slot should only ever have one link. */
7106
7163
  linkIds?: LinkId[];
7107
7164
  }
7108
7165
 
@@ -7307,7 +7364,7 @@ export declare class ComfyApp {
7307
7364
  onPointerMove(e: CanvasPointerEvent): void;
7308
7365
  getLinks(): LLink[];
7309
7366
  decrementSlots(inputsOrOutputs: 'inputs' | 'outputs'): void;
7310
- measure(): ReadOnlySize;
7367
+ measure(): Readonly<Size>;
7311
7368
  abstract arrange(rect: ReadOnlyRect): void;
7312
7369
  abstract connect(slot: INodeInputSlot | INodeOutputSlot, node: LGraphNode, afterRerouteId?: RerouteId): LLink | undefined;
7313
7370
  /**
@@ -7554,10 +7611,6 @@ export declare class ComfyApp {
7554
7611
 
7555
7612
  declare type TWidgetValue = IWidget['value'];
7556
7613
 
7557
- declare type TypedArrays = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array;
7558
-
7559
- declare type TypedBigIntArrays = BigInt64Array | BigUint64Array;
7560
-
7561
7614
  export { User }
7562
7615
 
7563
7616
  export { UserData }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comfyorg/comfyui-frontend-types",
3
- "version": "1.28.4",
3
+ "version": "1.28.5",
4
4
  "types": "./index.d.ts",
5
5
  "files": [
6
6
  "index.d.ts"