@comfyorg/comfyui-frontend-types 1.19.8 → 1.20.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.
Files changed (2) hide show
  1. package/index.d.ts +32 -5
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -162,8 +162,6 @@ declare class ChangeTracker {
162
162
  offset: [number, number];
163
163
  };
164
164
  nodeOutputs?: Record<string, any>;
165
- static app?: ComfyApp;
166
- get app(): ComfyApp;
167
165
  constructor(
168
166
  /**
169
167
  * The workflow that this change tracker is tracking
@@ -187,8 +185,8 @@ declare class ChangeTracker {
187
185
  undoRedo(e: KeyboardEvent): Promise<true | undefined>;
188
186
  beforeChange(): void;
189
187
  afterChange(): void;
190
- static init(app: ComfyApp): void;
191
- static bindInput(_app: ComfyApp, activeEl: Element | null): boolean;
188
+ static init(): void;
189
+ static bindInput(activeEl: Element | null): boolean;
192
190
  static graphEqual(a: ComfyWorkflowJSON, b: ComfyWorkflowJSON): boolean;
193
191
  private static graphDiff;
194
192
  }
@@ -7162,18 +7160,21 @@ export declare class ComfyApp {
7162
7160
  parentId: z.ZodOptional<z.ZodNumber>;
7163
7161
  }, z.ZodTypeAny, "passthrough">>, "many">>;
7164
7162
  groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
7163
+ id: z.ZodOptional<z.ZodNumber>;
7165
7164
  title: z.ZodString;
7166
7165
  bounding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
7167
7166
  color: z.ZodOptional<z.ZodString>;
7168
7167
  font_size: z.ZodOptional<z.ZodNumber>;
7169
7168
  locked: z.ZodOptional<z.ZodBoolean>;
7170
7169
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
7170
+ id: z.ZodOptional<z.ZodNumber>;
7171
7171
  title: z.ZodString;
7172
7172
  bounding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
7173
7173
  color: z.ZodOptional<z.ZodString>;
7174
7174
  font_size: z.ZodOptional<z.ZodNumber>;
7175
7175
  locked: z.ZodOptional<z.ZodBoolean>;
7176
7176
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
7177
+ id: z.ZodOptional<z.ZodNumber>;
7177
7178
  title: z.ZodString;
7178
7179
  bounding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
7179
7180
  color: z.ZodOptional<z.ZodString>;
@@ -8111,18 +8112,21 @@ export declare class ComfyApp {
8111
8112
  parentId: z.ZodOptional<z.ZodNumber>;
8112
8113
  }, z.ZodTypeAny, "passthrough">>, "many">>;
8113
8114
  groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
8115
+ id: z.ZodOptional<z.ZodNumber>;
8114
8116
  title: z.ZodString;
8115
8117
  bounding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
8116
8118
  color: z.ZodOptional<z.ZodString>;
8117
8119
  font_size: z.ZodOptional<z.ZodNumber>;
8118
8120
  locked: z.ZodOptional<z.ZodBoolean>;
8119
8121
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
8122
+ id: z.ZodOptional<z.ZodNumber>;
8120
8123
  title: z.ZodString;
8121
8124
  bounding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
8122
8125
  color: z.ZodOptional<z.ZodString>;
8123
8126
  font_size: z.ZodOptional<z.ZodNumber>;
8124
8127
  locked: z.ZodOptional<z.ZodBoolean>;
8125
8128
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
8129
+ id: z.ZodOptional<z.ZodNumber>;
8126
8130
  title: z.ZodString;
8127
8131
  bounding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
8128
8132
  color: z.ZodOptional<z.ZodString>;
@@ -9060,18 +9064,21 @@ export declare class ComfyApp {
9060
9064
  parentId: z.ZodOptional<z.ZodNumber>;
9061
9065
  }, z.ZodTypeAny, "passthrough">>, "many">>;
9062
9066
  groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
9067
+ id: z.ZodOptional<z.ZodNumber>;
9063
9068
  title: z.ZodString;
9064
9069
  bounding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
9065
9070
  color: z.ZodOptional<z.ZodString>;
9066
9071
  font_size: z.ZodOptional<z.ZodNumber>;
9067
9072
  locked: z.ZodOptional<z.ZodBoolean>;
9068
9073
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
9074
+ id: z.ZodOptional<z.ZodNumber>;
9069
9075
  title: z.ZodString;
9070
9076
  bounding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
9071
9077
  color: z.ZodOptional<z.ZodString>;
9072
9078
  font_size: z.ZodOptional<z.ZodNumber>;
9073
9079
  locked: z.ZodOptional<z.ZodBoolean>;
9074
9080
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
9081
+ id: z.ZodOptional<z.ZodNumber>;
9075
9082
  title: z.ZodString;
9076
9083
  bounding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
9077
9084
  color: z.ZodOptional<z.ZodString>;
@@ -9536,18 +9543,21 @@ export declare class ComfyApp {
9536
9543
  lastRerouteId: z.ZodOptional<z.ZodNumber>;
9537
9544
  }, z.ZodTypeAny, "passthrough">>;
9538
9545
  groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
9546
+ id: z.ZodOptional<z.ZodNumber>;
9539
9547
  title: z.ZodString;
9540
9548
  bounding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
9541
9549
  color: z.ZodOptional<z.ZodString>;
9542
9550
  font_size: z.ZodOptional<z.ZodNumber>;
9543
9551
  locked: z.ZodOptional<z.ZodBoolean>;
9544
9552
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
9553
+ id: z.ZodOptional<z.ZodNumber>;
9545
9554
  title: z.ZodString;
9546
9555
  bounding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
9547
9556
  color: z.ZodOptional<z.ZodString>;
9548
9557
  font_size: z.ZodOptional<z.ZodNumber>;
9549
9558
  locked: z.ZodOptional<z.ZodBoolean>;
9550
9559
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
9560
+ id: z.ZodOptional<z.ZodNumber>;
9551
9561
  title: z.ZodString;
9552
9562
  bounding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
9553
9563
  color: z.ZodOptional<z.ZodString>;
@@ -10596,18 +10606,21 @@ export declare class ComfyApp {
10596
10606
  lastRerouteId: z.ZodOptional<z.ZodNumber>;
10597
10607
  }, z.ZodTypeAny, "passthrough">>;
10598
10608
  groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
10609
+ id: z.ZodOptional<z.ZodNumber>;
10599
10610
  title: z.ZodString;
10600
10611
  bounding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
10601
10612
  color: z.ZodOptional<z.ZodString>;
10602
10613
  font_size: z.ZodOptional<z.ZodNumber>;
10603
10614
  locked: z.ZodOptional<z.ZodBoolean>;
10604
10615
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
10616
+ id: z.ZodOptional<z.ZodNumber>;
10605
10617
  title: z.ZodString;
10606
10618
  bounding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
10607
10619
  color: z.ZodOptional<z.ZodString>;
10608
10620
  font_size: z.ZodOptional<z.ZodNumber>;
10609
10621
  locked: z.ZodOptional<z.ZodBoolean>;
10610
10622
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
10623
+ id: z.ZodOptional<z.ZodNumber>;
10611
10624
  title: z.ZodString;
10612
10625
  bounding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
10613
10626
  color: z.ZodOptional<z.ZodString>;
@@ -11656,18 +11669,21 @@ export declare class ComfyApp {
11656
11669
  lastRerouteId: z.ZodOptional<z.ZodNumber>;
11657
11670
  }, z.ZodTypeAny, "passthrough">>;
11658
11671
  groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
11672
+ id: z.ZodOptional<z.ZodNumber>;
11659
11673
  title: z.ZodString;
11660
11674
  bounding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
11661
11675
  color: z.ZodOptional<z.ZodString>;
11662
11676
  font_size: z.ZodOptional<z.ZodNumber>;
11663
11677
  locked: z.ZodOptional<z.ZodBoolean>;
11664
11678
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
11679
+ id: z.ZodOptional<z.ZodNumber>;
11665
11680
  title: z.ZodString;
11666
11681
  bounding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
11667
11682
  color: z.ZodOptional<z.ZodString>;
11668
11683
  font_size: z.ZodOptional<z.ZodNumber>;
11669
11684
  locked: z.ZodOptional<z.ZodBoolean>;
11670
11685
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
11686
+ id: z.ZodOptional<z.ZodNumber>;
11671
11687
  title: z.ZodString;
11672
11688
  bounding: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
11673
11689
  color: z.ZodOptional<z.ZodString>;
@@ -13348,7 +13364,12 @@ export declare class ComfyApp {
13348
13364
 
13349
13365
 
13350
13366
  declare global {
13351
- const app: ComfyApp;
13367
+ interface Window {
13368
+ /** For use by extensions and in the browser console. Where possible, import `app` from '@/scripts/app' instead. */
13369
+ app?: ComfyApp;
13370
+ /** For use by extensions and in the browser console. Where possible, import `app` and access via `app.graph` instead. */
13371
+ graph?: LGraph;
13372
+ }
13352
13373
  }
13353
13374
 
13354
13375
  /// <reference types="vite/client" />
@@ -13383,6 +13404,12 @@ declare module '@comfyorg/litegraph/dist/types/widgets' {
13383
13404
  * The minimum size of the node if the widget is present.
13384
13405
  */
13385
13406
  minNodeSize?: Size
13407
+
13408
+ /** If the widget is advanced, this will be set to true. */
13409
+ advanced?: boolean
13410
+
13411
+ /** If the widget is hidden, this will be set to true. */
13412
+ hidden?: boolean
13386
13413
  }
13387
13414
 
13388
13415
  interface IBaseWidget {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comfyorg/comfyui-frontend-types",
3
- "version": "1.19.8",
3
+ "version": "1.20.0",
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.8"
16
+ "@comfyorg/litegraph": "^0.15.9"
17
17
  },
18
18
  "peerDependencies": {
19
19
  "vue": "^3.5.13",