@ethora/chat-component 25.6.5 → 25.6.7

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.
@@ -1 +1 @@
1
- export declare function createTimeoutPromise(ms: number | undefined, unsubscribe?: () => void): Promise<unknown>;
1
+ export declare function createTimeoutPromise(ms: number | undefined, onTimeout?: () => void): Promise<unknown>;
@@ -1,41 +1,17 @@
1
1
  import { Client } from '@xmpp/client';
2
2
  import { Element } from '@xmpp/xml';
3
3
  export declare class XmppListenerManager {
4
- /**
5
- * Safely adds a stanza listener, removing any existing listener for the same key
6
- */
7
4
  static addListener(client: Client, eventType: string, listenerKey: string, handler: (stanza: Element) => void): void;
8
- /**
9
- * Removes a listener by key
10
- */
11
5
  static removeListener(listenerKey: string): boolean;
12
- /**
13
- * Removes all listeners for a specific client
14
- */
15
6
  static removeAllListenersForClient(client: Client): void;
16
- /**
17
- * Gets a unique listener key for a specific operation
18
- */
19
7
  static getListenerKey(operation: string, identifier: string): string;
20
- /**
21
- * Clears all active listeners (useful for cleanup)
22
- */
23
8
  static clearAllListeners(): void;
24
- /**
25
- * Gets the count of active listeners (useful for debugging)
26
- */
27
9
  static getActiveListenerCount(): number;
28
- /**
29
- * Gets detailed information about active listeners (for debugging)
30
- */
31
10
  static getActiveListenersInfo(): Array<{
32
11
  key: string;
33
12
  eventType: string;
34
13
  timestamp: number;
35
14
  age: number;
36
15
  }>;
37
- /**
38
- * Logs detailed information about active listeners (for debugging)
39
- */
40
16
  static logActiveListeners(): void;
41
17
  }
@@ -1,19 +1,4 @@
1
1
  import { AnyAction } from '@reduxjs/toolkit';
2
- /**
3
- * Validates that an action is a plain object with required properties
4
- * @param action - The action to validate
5
- * @returns true if valid, false otherwise
6
- */
7
2
  export declare const isValidAction: (action: any) => action is AnyAction;
8
- /**
9
- * Creates a safe dispatch wrapper that validates actions before dispatching
10
- * @param dispatch - The original dispatch function
11
- * @returns A wrapped dispatch function with validation
12
- */
13
3
  export declare const createSafeDispatch: (dispatch: any) => (action: any) => any;
14
- /**
15
- * Ensures an async function is properly wrapped for Redux dispatch
16
- * @param asyncFunction - The async function to wrap
17
- * @returns A function that can be safely dispatched
18
- */
19
4
  export declare const createAsyncAction: (asyncFunction: (...args: any[]) => Promise<any>) => (...args: any[]) => (dispatch: any, getState: any) => Promise<any>;
@@ -1,7 +1,3 @@
1
- /**
2
- * Development-only action logger for debugging Redux actions
3
- * This should only be used in development mode
4
- */
5
1
  interface ActionLogEntry {
6
2
  timestamp: number;
7
3
  action: any;
@@ -2,29 +2,11 @@ export declare class XmppMemoryMonitor {
2
2
  private static monitoringInterval;
3
3
  private static warningThreshold;
4
4
  private static criticalThreshold;
5
- /**
6
- * Start monitoring XMPP listener count
7
- */
8
5
  static startMonitoring(intervalMs?: number): void;
9
- /**
10
- * Stop monitoring
11
- */
12
6
  static stopMonitoring(): void;
13
- /**
14
- * Set warning and critical thresholds
15
- */
16
7
  static setThresholds(warning: number, critical: number): void;
17
- /**
18
- * Get current listener count
19
- */
20
8
  static getCurrentCount(): number;
21
- /**
22
- * Force cleanup of all listeners (emergency measure)
23
- */
24
9
  static forceCleanup(): void;
25
- /**
26
- * Get detailed listener information
27
- */
28
10
  static getListenerInfo(): Array<{
29
11
  key: string;
30
12
  eventType: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethora/chat-component",
3
- "version": "25.6.5",
3
+ "version": "25.6.7",
4
4
  "type": "module",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",