@comfyorg/comfyui-frontend-types 1.30.2 → 1.30.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.
Files changed (2) hide show
  1. package/index.d.ts +48 -1
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -728,6 +728,10 @@ export declare class ComfyApi extends EventTarget {
728
728
  */
729
729
  user: string;
730
730
  socket: WebSocket | null;
731
+ /**
732
+ * Cache Firebase auth store composable function.
733
+ */
734
+ private authStoreComposable?;
731
735
  reportedUnknownMessageTypes: Set<string>;
732
736
  /**
733
737
  * Get feature flags supported by this frontend client.
@@ -759,6 +763,18 @@ export declare class ComfyApi extends EventTarget {
759
763
  internalURL(route: string): string;
760
764
  apiURL(route: string): string;
761
765
  fileURL(route: string): string;
766
+ /**
767
+ * Gets the Firebase auth store instance using cached composable function.
768
+ * Caches the composable function on first call, then reuses it.
769
+ * Returns null for non-cloud distributions.
770
+ * @returns The Firebase auth store instance, or null if not in cloud
771
+ */
772
+ private getAuthStore;
773
+ /**
774
+ * Waits for Firebase auth to be initialized before proceeding.
775
+ * Includes 10-second timeout to prevent infinite hanging.
776
+ */
777
+ private waitForAuthInitialization;
762
778
  fetchApi(route: string, options?: RequestInit): Promise<Response>;
763
779
  /**
764
780
  * Dispatches a custom event.
@@ -770,6 +786,11 @@ export declare class ComfyApi extends EventTarget {
770
786
  dispatchCustomEvent<T extends ComplexApiEvents>(type: T, detail: ApiEventTypes[T] | null): boolean;
771
787
  /** @deprecated Use {@link dispatchCustomEvent}. */
772
788
  dispatchEvent(event: never): boolean;
789
+ /**
790
+ * Creates and connects a WebSocket for realtime updates
791
+ * @param {boolean} isReconnect If the socket is connection is a reconnect attempt
792
+ */
793
+ private createSocket;
773
794
  /**
774
795
  * Initialises sockets and realtime updates
775
796
  */
@@ -936,6 +957,8 @@ export declare class ComfyApi extends EventTarget {
936
957
  overwrite: boolean;
937
958
  }): Promise<Response>;
938
959
  listUserDataFullInfo(dir: string): Promise<UserDataFullInfo[]>;
960
+ getGlobalSubgraphData(id: string): Promise<string>;
961
+ getGlobalSubgraphs(): Promise<Record<string, GlobalSubgraphData>>;
939
962
  getLogs(): Promise<string>;
940
963
  getRawLogs(): Promise<LogsRawResponse>;
941
964
  subscribeLogs(enabled: boolean): Promise<void>;
@@ -1534,7 +1557,7 @@ export declare class ComfyApp {
1534
1557
  */
1535
1558
  load({ force }?: {
1536
1559
  force?: boolean;
1537
- }): Promise<LoadedComfyWorkflow>;
1560
+ }): Promise<this & LoadedComfyWorkflow>;
1538
1561
  unload(): void;
1539
1562
  save(): Promise<UserFile>;
1540
1563
  /**
@@ -2193,6 +2216,14 @@ export declare class ComfyApp {
2193
2216
  onClick(_options: WidgetEventOptions): void;
2194
2217
  }
2195
2218
 
2219
+ declare type GlobalSubgraphData = {
2220
+ name: string;
2221
+ info: {
2222
+ node_pack: string;
2223
+ };
2224
+ data: string | Promise<string>;
2225
+ };
2226
+
2196
2227
  /** Internal; simplifies type definitions. */
2197
2228
  declare type GraphOrSubgraph = LGraph | Subgraph;
2198
2229
 
@@ -7675,6 +7706,22 @@ export declare class ComfyApp {
7675
7706
  * Optional badge label (e.g., "BETA", "ALPHA", "NEW")
7676
7707
  */
7677
7708
  label?: string;
7709
+ /**
7710
+ * Visual variant for the badge
7711
+ * - info: Default informational badge (white label, gray background)
7712
+ * - warning: Warning badge (orange theme, higher emphasis)
7713
+ * - error: Error/alert badge (red theme, highest emphasis)
7714
+ */
7715
+ variant?: 'info' | 'warning' | 'error';
7716
+ /**
7717
+ * Optional icon class (e.g., "pi-exclamation-triangle")
7718
+ * If not provided, variant will determine the default icon
7719
+ */
7720
+ icon?: string;
7721
+ /**
7722
+ * Optional tooltip text to show on hover
7723
+ */
7724
+ tooltip?: string;
7678
7725
  }
7679
7726
 
7680
7727
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comfyorg/comfyui-frontend-types",
3
- "version": "1.30.2",
3
+ "version": "1.30.3",
4
4
  "types": "./index.d.ts",
5
5
  "files": [
6
6
  "index.d.ts"