@comfyorg/comfyui-frontend-types 1.28.4 → 1.28.6

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 +116 -60
  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;
@@ -1002,8 +1010,8 @@ export declare class ComfyApp {
1002
1010
  bodyBottom: HTMLElement;
1003
1011
  canvasContainer: HTMLElement;
1004
1012
  menu: ComfyAppMenu;
1005
- bypassBgColor: string;
1006
1013
  openClipspace: () => void;
1014
+ private positionConversion?;
1007
1015
  /**
1008
1016
  * The node errors from the previous execution.
1009
1017
  * @deprecated Use useExecutionStore().lastNodeErrors instead
@@ -1077,13 +1085,28 @@ export declare class ComfyApp {
1077
1085
  static onClipspaceEditorClosed(): void;
1078
1086
  static copyToClipspace(node: LGraphNode): void;
1079
1087
  static pasteFromClipspace(node: LGraphNode): void;
1088
+ /**
1089
+ * Adds a handler allowing drag+drop of files onto the window to load workflows
1090
+ */
1091
+ private addDropHandler;
1092
+ /**
1093
+ * Handle keypress
1094
+ */
1095
+ private addProcessKeyHandler;
1096
+ /**
1097
+ * Handles updates from the API socket
1098
+ */
1099
+ private addApiUpdateHandlers;
1100
+ /** Flag that the graph is configuring to prevent nodes from running checks while its still loading */
1101
+ private addConfigureHandler;
1080
1102
  private addAfterConfigureHandler;
1081
1103
  /**
1082
1104
  * Set up the app on the page
1083
1105
  */
1084
1106
  setup(canvasEl: HTMLCanvasElement): Promise<void>;
1085
- resizeCanvas(): void;
1107
+ private resizeCanvas;
1086
1108
  private updateVueAppNodeDefs;
1109
+ getNodeDefs(): Promise<Record<string, ComfyNodeDef>>;
1087
1110
  /**
1088
1111
  * Registers nodes with the graph
1089
1112
  */
@@ -1091,6 +1114,8 @@ export declare class ComfyApp {
1091
1114
  registerNodeDef(nodeId: string, nodeDef: ComfyNodeDef): Promise<void>;
1092
1115
  registerNodesFromDefs(defs: Record<string, ComfyNodeDef>): Promise<void>;
1093
1116
  loadTemplateData(templateData: any): void;
1117
+ private showMissingNodesError;
1118
+ private showMissingModelsError;
1094
1119
  loadGraphData(graphData?: ComfyWorkflowJSON, clean?: boolean, restore_view?: boolean, workflow?: string | null | ComfyWorkflow, { showMissingNodesDialog, showMissingModelsDialog, checkForRerouteMigration }?: {
1095
1120
  showMissingNodesDialog?: boolean | undefined;
1096
1121
  showMissingModelsDialog?: boolean | undefined;
@@ -1548,9 +1573,9 @@ export declare class ComfyApp {
1548
1573
  get desiredHeight(): number;
1549
1574
  set desiredHeight(value: number);
1550
1575
  constructor(width: number, height: number);
1551
- static fromSize(size: ReadOnlySize): ConstrainedSize;
1576
+ static fromSize(size: Readonly<Size>): ConstrainedSize;
1552
1577
  static fromRect(rect: ReadOnlyRect): ConstrainedSize;
1553
- setSize(size: ReadOnlySize): void;
1578
+ setSize(size: Readonly<Size>): void;
1554
1579
  setValues(width: number, height: number): void;
1555
1580
  toSize(): Size;
1556
1581
  }
@@ -1735,7 +1760,7 @@ export declare class ComfyApp {
1735
1760
  * @param b Point b as `x, y`
1736
1761
  * @returns Distance between point {@link a} & {@link b}
1737
1762
  */
1738
- declare function distance(a: ReadOnlyPoint, b: ReadOnlyPoint): number;
1763
+ declare function distance(a: Readonly<Point>, b: Readonly<Point>): number;
1739
1764
 
1740
1765
  /**
1741
1766
  * A DOM widget that wraps a custom HTML element as a litegraph widget.
@@ -1923,7 +1948,7 @@ export declare class ComfyApp {
1923
1948
  readonly subgraphNodePath: readonly NodeId[];
1924
1949
  /** A flattened map of all DTOs in this node network. Subgraph instances have been expanded into their inner nodes. */
1925
1950
  readonly nodesByExecutionId: Map<ExecutionId, ExecutableLGraphNode>;
1926
- /** The actual subgraph instance that contains this node, otherise undefined. */
1951
+ /** The actual subgraph instance that contains this node, otherwise undefined. */
1927
1952
  readonly subgraphNode?: SubgraphNode | undefined;
1928
1953
  applyToGraph?(...args: CallbackParams<typeof ExecutableNodeDTO.node.applyToGraph>): CallbackReturn<typeof ExecutableNodeDTO.node.applyToGraph>;
1929
1954
  /** The graph that this node is a part of. */
@@ -1934,7 +1959,7 @@ export declare class ComfyApp {
1934
1959
  type: ISlotType;
1935
1960
  }[];
1936
1961
  /**
1937
- * The path to the acutal node through subgraph instances, represented as a list of all subgraph node IDs (instances),
1962
+ * The path to the actual node through subgraph instances, represented as a list of all subgraph node IDs (instances),
1938
1963
  * followed by the actual original node ID within the subgraph. Each segment is separated by `:`.
1939
1964
  *
1940
1965
  * e.g. `1:2:3`:
@@ -1957,7 +1982,7 @@ export declare class ComfyApp {
1957
1982
  subgraphNodePath: readonly NodeId[],
1958
1983
  /** A flattened map of all DTOs in this node network. Subgraph instances have been expanded into their inner nodes. */
1959
1984
  nodesByExecutionId: Map<ExecutionId, ExecutableLGraphNode>,
1960
- /** The actual subgraph instance that contains this node, otherise undefined. */
1985
+ /** The actual subgraph instance that contains this node, otherwise undefined. */
1961
1986
  subgraphNode?: SubgraphNode | undefined);
1962
1987
  /** Returns either the DTO itself, or the DTOs of the inner nodes of the subgraph. */
1963
1988
  getInnerNodes(): ExecutableLGraphNode[];
@@ -2229,6 +2254,13 @@ export declare class ComfyApp {
2229
2254
  computedDisabled?: boolean;
2230
2255
  hidden?: boolean;
2231
2256
  advanced?: boolean;
2257
+ /**
2258
+ * This property is automatically computed on graph change
2259
+ * and should not be changed.
2260
+ * Promoted widgets have a colored border
2261
+ * @see /core/graph/subgraph/proxyWidget.registerProxyWidgets
2262
+ */
2263
+ promoted?: boolean;
2232
2264
  tooltip?: string;
2233
2265
  callback?(value: any, canvas?: LGraphCanvas, node?: LGraphNode, pos?: Point, e?: CanvasPointerEvent): void;
2234
2266
  /**
@@ -2601,7 +2633,7 @@ export declare class ComfyApp {
2601
2633
  nameLocked?: boolean;
2602
2634
  pos?: Point;
2603
2635
  /** @remarks Automatically calculated; not included in serialisation. */
2604
- boundingRect: Rect;
2636
+ boundingRect: ReadOnlyRect;
2605
2637
  /**
2606
2638
  * A list of floating link IDs that are connected to this slot.
2607
2639
  * This is calculated at runtime; it is **not** serialized.
@@ -3224,7 +3256,7 @@ export declare class ComfyApp {
3224
3256
  /**
3225
3257
  * Snaps the provided items to a grid.
3226
3258
  *
3227
- * Item positions are reounded to the nearest multiple of {@link LiteGraph.CANVAS_GRID_SIZE}.
3259
+ * Item positions are rounded to the nearest multiple of {@link LiteGraph.CANVAS_GRID_SIZE}.
3228
3260
  *
3229
3261
  * When {@link LiteGraph.alwaysSnapToGrid} is enabled
3230
3262
  * and the grid size is falsy, a default of 1 is used.
@@ -3519,7 +3551,7 @@ export declare class ComfyApp {
3519
3551
  linkMarkerShape: LinkMarkerShape;
3520
3552
  links_render_mode: number;
3521
3553
  /** 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
3554
+ * This initializes first and if we can't get the value from the settings we default to 8px
3523
3555
  */
3524
3556
  private _min_font_size_for_lod;
3525
3557
  get min_font_size_for_lod(): number;
@@ -3583,7 +3615,7 @@ export declare class ComfyApp {
3583
3615
  dirty_area?: Rect | null;
3584
3616
  /** @deprecated Unused */
3585
3617
  node_in_panel?: LGraphNode | null;
3586
- last_mouse: ReadOnlyPoint;
3618
+ last_mouse: Readonly<Point>;
3587
3619
  last_mouseclick: number;
3588
3620
  graph: LGraph | Subgraph | null;
3589
3621
  get _graph(): LGraph | Subgraph;
@@ -3711,7 +3743,7 @@ export declare class ComfyApp {
3711
3743
  * Assigns a new graph to this canvas.
3712
3744
  */
3713
3745
  setGraph(newGraph: LGraph | Subgraph): void;
3714
- openSubgraph(subgraph: Subgraph): void;
3746
+ openSubgraph(subgraph: Subgraph, fromNode: SubgraphNode): void;
3715
3747
  /**
3716
3748
  * @returns the visually active graph (in case there are more in the stack)
3717
3749
  */
@@ -3969,6 +4001,7 @@ export declare class ComfyApp {
3969
4001
  */
3970
4002
  drawSnapGuide(ctx: CanvasRenderingContext2D, item: Positionable, shape?: RenderShape): void;
3971
4003
  drawConnections(ctx: CanvasRenderingContext2D): void;
4004
+ private getNodeModeAlpha;
3972
4005
  /**
3973
4006
  * Build LinkRenderContext from canvas properties
3974
4007
  * Helper method for using LitegraphLinkAdapter
@@ -3986,13 +4019,13 @@ export declare class ComfyApp {
3986
4019
  * @param start_dir the direction enum
3987
4020
  * @param end_dir the direction enum
3988
4021
  */
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 }?: {
4022
+ 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
4023
  /** When defined, render data will be saved to this reroute instead of the {@link link}. */
3991
4024
  reroute?: Reroute;
3992
4025
  /** Offset of the bezier curve control point from {@link a point a} (output side) */
3993
- startControl?: ReadOnlyPoint;
4026
+ startControl?: Readonly<Point>;
3994
4027
  /** Offset of the bezier curve control point from {@link b point b} (input side) */
3995
- endControl?: ReadOnlyPoint;
4028
+ endControl?: Readonly<Point>;
3996
4029
  /** Number of sublines (useful to represent vec3 or rgb) @todo If implemented, refactor calculations out of the loop */
3997
4030
  num_sublines?: number;
3998
4031
  /** Whether this is a floating link segment */
@@ -4047,6 +4080,27 @@ export declare class ComfyApp {
4047
4080
  * If nothing is selected, the view is fitted around all items in the graph.
4048
4081
  */
4049
4082
  fitViewToSelectionAnimated(options?: AnimationOptions): void;
4083
+ /**
4084
+ * Calculate new position with delta
4085
+ */
4086
+ private calculateNewPosition;
4087
+ /**
4088
+ * Apply batched node position updates
4089
+ */
4090
+ private applyNodePositionUpdates;
4091
+ /**
4092
+ * Initialize layout mutations with Canvas source
4093
+ */
4094
+ private initLayoutMutations;
4095
+ /**
4096
+ * Collect all nodes that are children of groups in the selection
4097
+ */
4098
+ private collectNodesInGroups;
4099
+ /**
4100
+ * Move group children (both nodes and non-nodes)
4101
+ */
4102
+ private moveGroupChildren;
4103
+ moveChildNodesInGroupVueMode(allItems: Set<Positionable>, deltaX: number, deltaY: number): void;
4050
4104
  }
4051
4105
 
4052
4106
  declare interface LGraphCanvasEventMap {
@@ -4057,6 +4111,11 @@ export declare class ComfyApp {
4057
4111
  /** The old active graph, or `null` if there was no active graph. */
4058
4112
  oldGraph: LGraph | Subgraph | null | undefined;
4059
4113
  };
4114
+ 'subgraph-opened': {
4115
+ subgraph: Subgraph;
4116
+ closingGraph: LGraph;
4117
+ fromNode: SubgraphNode;
4118
+ };
4060
4119
  'litegraph:canvas': {
4061
4120
  subType: 'before-change' | 'after-change';
4062
4121
  } | {
@@ -4177,7 +4236,7 @@ export declare class ComfyApp {
4177
4236
  title: string;
4178
4237
  font?: string;
4179
4238
  font_size: number;
4180
- _bounding: Float32Array;
4239
+ _bounding: Rectangle;
4181
4240
  _pos: Point;
4182
4241
  _size: Size;
4183
4242
  /** @deprecated See {@link _children} */
@@ -4197,7 +4256,8 @@ export declare class ComfyApp {
4197
4256
  /** Size of the group, as width,height in graph units */
4198
4257
  get size(): Size;
4199
4258
  set size(v: Size);
4200
- get boundingRect(): Float32Array<ArrayBufferLike>;
4259
+ get boundingRect(): Rectangle;
4260
+ getBounding(): Rectangle;
4201
4261
  get nodes(): LGraphNode[];
4202
4262
  get titleHeight(): number;
4203
4263
  get children(): ReadonlySet<Positionable>;
@@ -4403,9 +4463,9 @@ export declare class ComfyApp {
4403
4463
  */
4404
4464
  get boundingRect(): ReadOnlyRectangle;
4405
4465
  /** 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;
4466
+ get boundingOffset(): Readonly<Point>;
4467
+ /** {@link pos} and {@link size} values are backed by this {@link Rectangle}. */
4468
+ _posSize: Rectangle;
4409
4469
  _pos: Point;
4410
4470
  _size: Size;
4411
4471
  get pos(): Point;
@@ -4730,7 +4790,7 @@ export declare class ComfyApp {
4730
4790
  measure(out: Rect, ctx: CanvasRenderingContext2D): void;
4731
4791
  /**
4732
4792
  * 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
4793
+ * @param out {Rect?} [optional] a place to store the output, to free garbage
4734
4794
  * @param includeExternal {boolean?} [optional] set to true to
4735
4795
  * include the shadow and connection points in the bounding calculation
4736
4796
  * @returns the bounding box in format of [topleft_cornerx, topleft_cornery, width, height]
@@ -4837,7 +4897,7 @@ export declare class ComfyApp {
4837
4897
  findOutputSlotByType<TReturn extends true>(type: ISlotType, returnObj?: TReturn, preferFreeSlot?: boolean, doNotUseOccupied?: boolean): INodeOutputSlot;
4838
4898
  /**
4839
4899
  * returns the output (or input) slot with a given type, -1 if not found
4840
- * @param input uise inputs instead of outputs
4900
+ * @param input use inputs instead of outputs
4841
4901
  * @param type the type of the slot to find
4842
4902
  * @param returnObj if the obj itself wanted
4843
4903
  * @param preferFreeSlot if we want a free slot (if not found, will return the first of the type anyway)
@@ -5041,6 +5101,7 @@ export declare class ComfyApp {
5041
5101
  * Returns `true` if the widget is visible, otherwise `false`.
5042
5102
  */
5043
5103
  isWidgetVisible(widget: IBaseWidget): boolean;
5104
+ updateComputedDisabled(): void;
5044
5105
  drawWidgets(ctx: CanvasRenderingContext2D, { lowQuality, editorAlpha }: DrawWidgetsOptions): void;
5045
5106
  /**
5046
5107
  * When {@link LGraphNode.collapsed} is `true`, this method draws the node's collapsed slots.
@@ -5369,7 +5430,7 @@ export declare class ComfyApp {
5369
5430
  /** The last canvas 2D path that was used to render this segment */
5370
5431
  path?: Path2D;
5371
5432
  /** Centre point of the {@link path}. Calculated during render only - can be inaccurate */
5372
- readonly _pos: Float32Array;
5433
+ readonly _pos: Point;
5373
5434
  /**
5374
5435
  * Y-forward along the {@link path} from its centre point, in radians.
5375
5436
  * `undefined` if using circles for link centres.
@@ -5417,6 +5478,8 @@ export declare class ComfyApp {
5417
5478
  NODE_BOX_OUTLINE_COLOR: string;
5418
5479
  NODE_ERROR_COLOUR: string;
5419
5480
  NODE_FONT: string;
5481
+ NODE_DEFAULT_BYPASS_COLOR: string;
5482
+ NODE_OPACITY: number;
5420
5483
  DEFAULT_FONT: string;
5421
5484
  DEFAULT_SHADOW_COLOR: string;
5422
5485
  DEFAULT_GROUP_FONT: number;
@@ -5424,6 +5487,7 @@ export declare class ComfyApp {
5424
5487
  GROUP_FONT: string;
5425
5488
  WIDGET_BGCOLOR: string;
5426
5489
  WIDGET_OUTLINE_COLOR: string;
5490
+ WIDGET_PROMOTED_OUTLINE_COLOR: string;
5427
5491
  WIDGET_ADVANCED_OUTLINE_COLOR: string;
5428
5492
  WIDGET_TEXT_COLOR: string;
5429
5493
  WIDGET_SECONDARY_TEXT_COLOR: string;
@@ -5570,9 +5634,9 @@ export declare class ComfyApp {
5570
5634
  * !WILL CHANGE node mode when using onTrigger (enable mode colors), onExecuted does not need this
5571
5635
  */
5572
5636
  do_add_triggers_slots: boolean;
5573
- /** [false!] being events, it is strongly reccomended to use them sequentially, one by one */
5637
+ /** [false!] being events, it is strongly recommended to use them sequentially, one by one */
5574
5638
  allow_multi_output_for_events: boolean;
5575
- /** [true!] allows to create and connect a ndoe clicking with the third button (wheel) */
5639
+ /** [true!] allows to create and connect a node clicking with the third button (wheel) */
5576
5640
  middle_click_slot_add_default_node: boolean;
5577
5641
  /** [true!] dragging a link to empty space will open a menu, add from list, search or defaults */
5578
5642
  release_link_on_empty_shows_menu: boolean;
@@ -5652,6 +5716,8 @@ export declare class ComfyApp {
5652
5716
  * @default false
5653
5717
  */
5654
5718
  vueNodesMode: boolean;
5719
+ nodeOpacity: number;
5720
+ nodeLightness: number | undefined;
5655
5721
  LGraph: typeof LGraph;
5656
5722
  LLink: typeof LLink;
5657
5723
  LGraphNode: typeof LGraphNode;
@@ -5777,14 +5843,14 @@ export declare class ComfyApp {
5777
5843
  * Direct rendering method compatible with LGraphCanvas
5778
5844
  * Converts data and delegates to pure renderer
5779
5845
  */
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?: {
5846
+ 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
5847
  reroute?: Reroute;
5782
- startControl?: ReadOnlyPoint;
5783
- endControl?: ReadOnlyPoint;
5848
+ startControl?: Readonly<Point>;
5849
+ endControl?: Readonly<Point>;
5784
5850
  num_sublines?: number;
5785
5851
  disabled?: boolean;
5786
5852
  }): void;
5787
- renderDraggingLink(ctx: CanvasRenderingContext2D, from: ReadOnlyPoint, to: ReadOnlyPoint, colour: CanvasColour, startDir: LinkDirection, endDir: LinkDirection, context: LinkRenderContext): void;
5853
+ renderDraggingLink(ctx: CanvasRenderingContext2D, from: Readonly<Point>, to: Readonly<Point>, colour: CanvasColour, startDir: LinkDirection, endDir: LinkDirection, context: LinkRenderContext): void;
5788
5854
  /**
5789
5855
  * Calculate bounding box for a link
5790
5856
  * Includes padding for line width and control points
@@ -5812,7 +5878,7 @@ export declare class ComfyApp {
5812
5878
  };
5813
5879
  _data?: unknown;
5814
5880
  /** Centre point of the link, calculated during render only - can be inaccurate */
5815
- _pos: Float32Array;
5881
+ _pos: Point;
5816
5882
  /** @todo Clean up - never implemented in comfy. */
5817
5883
  _last_time?: number;
5818
5884
  /** The last canvas 2D path that was used to render this link */
@@ -6227,7 +6293,7 @@ export declare class ComfyApp {
6227
6293
  };
6228
6294
 
6229
6295
  /** A point represented as `[x, y]` co-ordinates */
6230
- declare type Point = [x: number, y: number] | Float32Array | Float64Array;
6296
+ declare type Point = [x: number, y: number];
6231
6297
 
6232
6298
  /**
6233
6299
  * An object that can be positioned, selected, and moved.
@@ -6302,21 +6368,15 @@ export declare class ComfyApp {
6302
6368
  readonly outputNode?: SubgraphOutputNode;
6303
6369
  }
6304
6370
 
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
6371
  /** 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>;
6372
+ declare type ReadOnlyRect = readonly [x: number, y: number, width: number, height: number] | ReadOnlyTypedArray<Float64Array>;
6310
6373
 
6311
6374
  declare type ReadOnlyRectangle = Omit<ReadOnlyTypedArray<Rectangle>, 'setHeightBottomAnchored' | 'setWidthRightAnchored' | 'resizeTopLeft' | 'resizeBottomLeft' | 'resizeTopRight' | 'resizeBottomRight' | 'resizeBottomRight' | 'updateTo'>;
6312
6375
 
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'>;
6376
+ declare type ReadOnlyTypedArray<T extends Float64Array> = Omit<Readonly<T>, 'fill' | 'copyWithin' | 'reverse' | 'set' | 'sort' | 'subarray'>;
6317
6377
 
6318
6378
  /** A rectangle starting at top-left coordinates `[x, y, width, height]` */
6319
- declare type Rect = ArRect | Float32Array | Float64Array;
6379
+ declare type Rect = [x: number, y: number, width: number, height: number] | Float64Array;
6320
6380
 
6321
6381
  /**
6322
6382
  * A rectangle, represented as a float64 array of 4 numbers: [x, y, width, height].
@@ -6340,7 +6400,7 @@ export declare class ComfyApp {
6340
6400
  * @param height The height of the rectangle. Default: {@link width}
6341
6401
  * @returns A new rectangle whose centre is at {@link x}
6342
6402
  */
6343
- static fromCentre([x, y]: ReadOnlyPoint, width: number, height?: number): Rectangle;
6403
+ static fromCentre([x, y]: Readonly<Point>, width: number, height?: number): Rectangle;
6344
6404
  static ensureRect(rect: ReadOnlyRect): Rectangle;
6345
6405
  subarray(begin?: number, end?: number): Float64Array<ArrayBuffer>;
6346
6406
  /**
@@ -6349,14 +6409,14 @@ export declare class ComfyApp {
6349
6409
  * Updating the values of the returned object will update this rectangle.
6350
6410
  */
6351
6411
  get pos(): Point;
6352
- set pos(value: ReadOnlyPoint);
6412
+ set pos(value: Readonly<Point>);
6353
6413
  /**
6354
6414
  * A reference to the size of this rectangle.
6355
6415
  *
6356
6416
  * Updating the values of the returned object will update this rectangle.
6357
6417
  */
6358
6418
  get size(): Size;
6359
- set size(value: ReadOnlySize);
6419
+ set size(value: Readonly<Size>);
6360
6420
  /** The x co-ordinate of the top-left corner of this rectangle. */
6361
6421
  get x(): number;
6362
6422
  set x(value: number);
@@ -6402,7 +6462,7 @@ export declare class ComfyApp {
6402
6462
  * @param point The point to check
6403
6463
  * @returns `true` if {@link point} is inside this rectangle, otherwise `false`.
6404
6464
  */
6405
- containsPoint([x, y]: ReadOnlyPoint): boolean;
6465
+ containsPoint([x, y]: Readonly<Point>): boolean;
6406
6466
  /**
6407
6467
  * Checks if {@link other} is a smaller rectangle inside this rectangle.
6408
6468
  * One **must** be larger than the other; identical rectangles are not considered to contain each other.
@@ -6453,9 +6513,9 @@ export declare class ComfyApp {
6453
6513
  /** @returns The width and height of this rectangle, as a new {@link Size}. */
6454
6514
  getSize(): Size;
6455
6515
  /** @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;
6516
+ getOffsetTo([x, y]: Readonly<Point>): Point;
6457
6517
  /** @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;
6518
+ getOffsetFrom([x, y]: Readonly<Point>): Point;
6459
6519
  /** Resizes the rectangle without moving it, setting its top-left corner to [{@link x}, {@link y}]. */
6460
6520
  resizeTopLeft(x1: number, y1: number): void;
6461
6521
  /** Resizes the rectangle without moving it, setting its bottom-left corner to [{@link x}, {@link y}]. */
@@ -6589,7 +6649,7 @@ export declare class ComfyApp {
6589
6649
  /** @inheritdoc */
6590
6650
  _centreAngle?: number;
6591
6651
  /** @inheritdoc */
6592
- _pos: Float32Array;
6652
+ _pos: Point;
6593
6653
  /** @inheritdoc */
6594
6654
  _dragging?: boolean;
6595
6655
  /** Colour of the first link that rendered this reroute */
@@ -6864,7 +6924,7 @@ export declare class ComfyApp {
6864
6924
  declare type SimpleApiEvents = keyof PickNevers_2<ApiEventTypes>;
6865
6925
 
6866
6926
  /** A size represented as `[width, height]` */
6867
- declare type Size = [width: number, height: number] | Float32Array | Float64Array;
6927
+ declare type Size = [width: number, height: number];
6868
6928
 
6869
6929
  declare class SliderWidget extends BaseWidget<ISliderWidget> implements ISliderWidget {
6870
6930
  type: "slider";
@@ -7102,7 +7162,7 @@ export declare class ComfyApp {
7102
7162
  id: UUID;
7103
7163
  /** The data type this slot uses. Unlike nodes, this does not support legacy numeric types. */
7104
7164
  type: string;
7105
- /** Links connected to this slot, or `undefined` if not connected. An ouptut slot should only ever have one link. */
7165
+ /** Links connected to this slot, or `undefined` if not connected. An output slot should only ever have one link. */
7106
7166
  linkIds?: LinkId[];
7107
7167
  }
7108
7168
 
@@ -7307,7 +7367,7 @@ export declare class ComfyApp {
7307
7367
  onPointerMove(e: CanvasPointerEvent): void;
7308
7368
  getLinks(): LLink[];
7309
7369
  decrementSlots(inputsOrOutputs: 'inputs' | 'outputs'): void;
7310
- measure(): ReadOnlySize;
7370
+ measure(): Readonly<Size>;
7311
7371
  abstract arrange(rect: ReadOnlyRect): void;
7312
7372
  abstract connect(slot: INodeInputSlot | INodeOutputSlot, node: LGraphNode, afterRerouteId?: RerouteId): LLink | undefined;
7313
7373
  /**
@@ -7554,10 +7614,6 @@ export declare class ComfyApp {
7554
7614
 
7555
7615
  declare type TWidgetValue = IWidget['value'];
7556
7616
 
7557
- declare type TypedArrays = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array;
7558
-
7559
- declare type TypedBigIntArrays = BigInt64Array | BigUint64Array;
7560
-
7561
7617
  export { User }
7562
7618
 
7563
7619
  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.6",
4
4
  "types": "./index.d.ts",
5
5
  "files": [
6
6
  "index.d.ts"