@tanstack/ai-svelte 0.18.1 → 0.18.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.
|
@@ -33,5 +33,7 @@ export interface CreateAudioRecorderReturn<TOutput> {
|
|
|
33
33
|
* failure (and `stop()` rejects with `Recording cancelled` if `cancel()` runs
|
|
34
34
|
* while a stop is in flight) — handle one channel, not both.
|
|
35
35
|
*/
|
|
36
|
-
export declare function createAudioRecorder<TOnComplete extends (recording: AudioRecording) => unknown>(options: CreateAudioRecorderOptions<TOnComplete>
|
|
36
|
+
export declare function createAudioRecorder<TOnComplete extends (recording: AudioRecording) => unknown>(options: CreateAudioRecorderOptions<TOnComplete> & {
|
|
37
|
+
onComplete: TOnComplete;
|
|
38
|
+
}): CreateAudioRecorderReturn<InferAudioRecordingOutput<TOnComplete>>;
|
|
37
39
|
export declare function createAudioRecorder(options?: CreateAudioRecorderOptions<undefined>): CreateAudioRecorderReturn<AudioRecording>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/ai-svelte",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.3",
|
|
4
4
|
"description": "Svelte 5 bindings for TanStack AI streaming chat, structured outputs, and media generation.",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"media-generation"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@tanstack/ai-client": "^0.
|
|
49
|
+
"@tanstack/ai-client": "^0.26.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"svelte": "^5.0.0",
|
|
53
|
-
"@tanstack/ai": "^0.
|
|
53
|
+
"@tanstack/ai": "^0.48.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@standard-schema/spec": "^1.1.0",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"svelte-check": "^4.2.0",
|
|
64
64
|
"typescript": "5.9.3",
|
|
65
65
|
"vite": "^8.2.1",
|
|
66
|
-
"@tanstack/ai": "0.
|
|
66
|
+
"@tanstack/ai": "0.48.0"
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"clean": "rm -rf ./dist",
|
|
@@ -41,10 +41,18 @@ export interface CreateAudioRecorderReturn<TOutput> {
|
|
|
41
41
|
* failure (and `stop()` rejects with `Recording cancelled` if `cancel()` runs
|
|
42
42
|
* while a stop is in flight) — handle one channel, not both.
|
|
43
43
|
*/
|
|
44
|
+
// The transforming overload requires `onComplete`. Without that constraint an
|
|
45
|
+
// options object carrying only unrelated keys (`createAudioRecorder({ onError })`)
|
|
46
|
+
// still matches it, `TOnComplete` infers as `unknown`, and `recording`/`stop()`
|
|
47
|
+
// collapse to `unknown` — so passing any option would silently cost you the
|
|
48
|
+
// `AudioRecording` type. Requiring it here sends those calls to the second
|
|
49
|
+
// overload instead (issue #1001).
|
|
44
50
|
export function createAudioRecorder<
|
|
45
51
|
TOnComplete extends (recording: AudioRecording) => unknown,
|
|
46
52
|
>(
|
|
47
|
-
options: CreateAudioRecorderOptions<TOnComplete
|
|
53
|
+
options: CreateAudioRecorderOptions<TOnComplete> & {
|
|
54
|
+
onComplete: TOnComplete
|
|
55
|
+
},
|
|
48
56
|
): CreateAudioRecorderReturn<InferAudioRecordingOutput<TOnComplete>>
|
|
49
57
|
export function createAudioRecorder(
|
|
50
58
|
options?: CreateAudioRecorderOptions<undefined>,
|