@medplum/react 5.1.14 → 5.1.15

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.
@@ -2588,12 +2588,18 @@ export declare interface UseThreadInboxReturn {
2588
2588
  refreshThreadMessages: () => Promise<void>;
2589
2589
  }
2590
2590
 
2591
- export declare function useWhisper({ language, model, onTranscript, }: UseWhisperOptions): UseWhisperResult;
2591
+ export declare function useWhisper({ language, model, onTranscript, idleTimeoutMs, }: UseWhisperOptions): UseWhisperResult;
2592
2592
 
2593
2593
  export declare type UseWhisperOptions = {
2594
2594
  language?: string;
2595
2595
  model?: string;
2596
2596
  onTranscript?: (text: string) => void;
2597
+ /**
2598
+ * How long to keep the WebSocket warm after stop() before fully closing it, in milliseconds.
2599
+ * Defaults to 120000 (2 minutes). Set to 0 or a non-finite value to keep the socket warm
2600
+ * until unmount (the previous behavior).
2601
+ */
2602
+ idleTimeoutMs?: number;
2597
2603
  };
2598
2604
 
2599
2605
  export declare type UseWhisperResult = {
@@ -2588,12 +2588,18 @@ export declare interface UseThreadInboxReturn {
2588
2588
  refreshThreadMessages: () => Promise<void>;
2589
2589
  }
2590
2590
 
2591
- export declare function useWhisper({ language, model, onTranscript, }: UseWhisperOptions): UseWhisperResult;
2591
+ export declare function useWhisper({ language, model, onTranscript, idleTimeoutMs, }: UseWhisperOptions): UseWhisperResult;
2592
2592
 
2593
2593
  export declare type UseWhisperOptions = {
2594
2594
  language?: string;
2595
2595
  model?: string;
2596
2596
  onTranscript?: (text: string) => void;
2597
+ /**
2598
+ * How long to keep the WebSocket warm after stop() before fully closing it, in milliseconds.
2599
+ * Defaults to 120000 (2 minutes). Set to 0 or a non-finite value to keep the socket warm
2600
+ * until unmount (the previous behavior).
2601
+ */
2602
+ idleTimeoutMs?: number;
2597
2603
  };
2598
2604
 
2599
2605
  export declare type UseWhisperResult = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medplum/react",
3
- "version": "5.1.14",
3
+ "version": "5.1.15",
4
4
  "description": "Medplum React Component Library",
5
5
  "keywords": [
6
6
  "medplum",
@@ -73,11 +73,11 @@
73
73
  "@mantine/hooks": "8.3.18",
74
74
  "@mantine/notifications": "8.3.18",
75
75
  "@mantine/spotlight": "8.3.18",
76
- "@medplum/core": "5.1.14",
77
- "@medplum/definitions": "5.1.14",
78
- "@medplum/fhirtypes": "5.1.14",
79
- "@medplum/mock": "5.1.14",
80
- "@medplum/react-hooks": "5.1.14",
76
+ "@medplum/core": "5.1.15",
77
+ "@medplum/definitions": "5.1.15",
78
+ "@medplum/fhirtypes": "5.1.15",
79
+ "@medplum/mock": "5.1.15",
80
+ "@medplum/react-hooks": "5.1.15",
81
81
  "@storybook/addon-docs": "10.4.1",
82
82
  "@storybook/addon-links": "10.4.1",
83
83
  "@storybook/builder-vite": "10.4.1",
@@ -111,8 +111,8 @@
111
111
  "@mantine/hooks": "^8.0.0",
112
112
  "@mantine/notifications": "^8.0.0",
113
113
  "@mantine/spotlight": "^8.0.0",
114
- "@medplum/core": "5.1.14",
115
- "@medplum/react-hooks": "5.1.14",
114
+ "@medplum/core": "5.1.15",
115
+ "@medplum/react-hooks": "5.1.15",
116
116
  "react": "^18.0.0 || ^19.0.0",
117
117
  "react-dom": "^18.0.0 || ^19.0.0",
118
118
  "rfc6902": "^5.0.1",