@ai-sdk/svelte 3.1.0-beta.9 → 4.0.0-beta.101

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,683 @@
1
1
  # @ai-sdk/svelte
2
2
 
3
+ ## 4.0.0-beta.101
4
+
5
+ ### Patch Changes
6
+
7
+ - ai@6.0.0-beta.101
8
+
9
+ ## 4.0.0-beta.100
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [8370068]
14
+ - ai@6.0.0-beta.100
15
+
16
+ ## 4.0.0-beta.99
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies [384142c]
21
+ - ai@6.0.0-beta.99
22
+
23
+ ## 4.0.0-beta.98
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies [b681d7d]
28
+ - ai@6.0.0-beta.98
29
+ - @ai-sdk/provider-utils@4.0.0-beta.33
30
+
31
+ ## 4.0.0-beta.97
32
+
33
+ ### Patch Changes
34
+
35
+ - Updated dependencies [32d8dbb]
36
+ - @ai-sdk/provider-utils@4.0.0-beta.32
37
+ - ai@6.0.0-beta.97
38
+
39
+ ## 4.0.0-beta.96
40
+
41
+ ### Patch Changes
42
+
43
+ - Updated dependencies [a322efa]
44
+ - ai@6.0.0-beta.96
45
+
46
+ ## 4.0.0-beta.95
47
+
48
+ ### Patch Changes
49
+
50
+ - Updated dependencies [eb8d1cb]
51
+ - ai@6.0.0-beta.95
52
+
53
+ ## 4.0.0-beta.94
54
+
55
+ ### Patch Changes
56
+
57
+ - Updated dependencies [ab1087b]
58
+ - ai@6.0.0-beta.94
59
+
60
+ ## 4.0.0-beta.93
61
+
62
+ ### Patch Changes
63
+
64
+ - ai@6.0.0-beta.93
65
+ - @ai-sdk/provider-utils@4.0.0-beta.31
66
+
67
+ ## 4.0.0-beta.92
68
+
69
+ ### Patch Changes
70
+
71
+ - Updated dependencies [97b1d77]
72
+ - ai@6.0.0-beta.92
73
+
74
+ ## 4.0.0-beta.91
75
+
76
+ ### Patch Changes
77
+
78
+ - Updated dependencies [4f16c37]
79
+ - @ai-sdk/provider-utils@4.0.0-beta.30
80
+ - ai@6.0.0-beta.91
81
+
82
+ ## 4.0.0-beta.90
83
+
84
+ ### Patch Changes
85
+
86
+ - ai@6.0.0-beta.90
87
+ - @ai-sdk/provider-utils@4.0.0-beta.29
88
+
89
+ ## 4.0.0-beta.89
90
+
91
+ ### Patch Changes
92
+
93
+ - Updated dependencies [d59ce25]
94
+ - ai@6.0.0-beta.89
95
+
96
+ ## 4.0.0-beta.88
97
+
98
+ ### Patch Changes
99
+
100
+ - Updated dependencies [22ef5c6]
101
+ - ai@6.0.0-beta.88
102
+
103
+ ## 4.0.0-beta.87
104
+
105
+ ### Patch Changes
106
+
107
+ - Updated dependencies [ca13d26]
108
+ - ai@6.0.0-beta.87
109
+
110
+ ## 4.0.0-beta.86
111
+
112
+ ### Patch Changes
113
+
114
+ - Updated dependencies [36b175c]
115
+ - ai@6.0.0-beta.86
116
+
117
+ ## 4.0.0-beta.85
118
+
119
+ ### Patch Changes
120
+
121
+ - ai@6.0.0-beta.85
122
+
123
+ ## 4.0.0-beta.84
124
+
125
+ ### Patch Changes
126
+
127
+ - Updated dependencies [016b111]
128
+ - @ai-sdk/provider-utils@4.0.0-beta.28
129
+ - ai@6.0.0-beta.84
130
+
131
+ ## 4.0.0-beta.83
132
+
133
+ ### Patch Changes
134
+
135
+ - Updated dependencies [e1f6e8e]
136
+ - ai@6.0.0-beta.83
137
+
138
+ ## 4.0.0-beta.82
139
+
140
+ ### Patch Changes
141
+
142
+ - Updated dependencies [37c58a0]
143
+ - ai@6.0.0-beta.82
144
+ - @ai-sdk/provider-utils@4.0.0-beta.27
145
+
146
+ ## 4.0.0-beta.81
147
+
148
+ ### Patch Changes
149
+
150
+ - ai@6.0.0-beta.81
151
+
152
+ ## 4.0.0-beta.80
153
+
154
+ ### Patch Changes
155
+
156
+ - Updated dependencies [9524761]
157
+ - ai@6.0.0-beta.80
158
+
159
+ ## 4.0.0-beta.79
160
+
161
+ ### Patch Changes
162
+
163
+ - Updated dependencies [d1bdadb]
164
+ - ai@6.0.0-beta.79
165
+ - @ai-sdk/provider-utils@4.0.0-beta.26
166
+
167
+ ## 4.0.0-beta.78
168
+
169
+ ### Patch Changes
170
+
171
+ - ai@6.0.0-beta.78
172
+ - @ai-sdk/provider-utils@4.0.0-beta.25
173
+
174
+ ## 4.0.0-beta.77
175
+
176
+ ### Patch Changes
177
+
178
+ - Updated dependencies [0c3b58b]
179
+ - ai@6.0.0-beta.77
180
+ - @ai-sdk/provider-utils@4.0.0-beta.24
181
+
182
+ ## 4.0.0-beta.76
183
+
184
+ ### Patch Changes
185
+
186
+ - Updated dependencies [a755db5]
187
+ - ai@6.0.0-beta.76
188
+ - @ai-sdk/provider-utils@4.0.0-beta.23
189
+
190
+ ## 4.0.0-beta.75
191
+
192
+ ### Patch Changes
193
+
194
+ - Updated dependencies [58920e0]
195
+ - Updated dependencies [58920e0]
196
+ - ai@6.0.0-beta.75
197
+ - @ai-sdk/provider-utils@4.0.0-beta.22
198
+
199
+ ## 4.0.0-beta.74
200
+
201
+ ### Patch Changes
202
+
203
+ - Updated dependencies [293a6b7]
204
+ - @ai-sdk/provider-utils@4.0.0-beta.21
205
+ - ai@6.0.0-beta.74
206
+
207
+ ## 4.0.0-beta.73
208
+
209
+ ### Patch Changes
210
+
211
+ - Updated dependencies [754df61]
212
+ - ai@6.0.0-beta.73
213
+
214
+ ## 4.0.0-beta.72
215
+
216
+ ### Patch Changes
217
+
218
+ - Updated dependencies [eca63f3]
219
+ - ai@6.0.0-beta.72
220
+
221
+ ## 4.0.0-beta.71
222
+
223
+ ### Patch Changes
224
+
225
+ - Updated dependencies [077aea3]
226
+ - ai@6.0.0-beta.71
227
+
228
+ ## 4.0.0-beta.70
229
+
230
+ ### Patch Changes
231
+
232
+ - Updated dependencies [d7bae86]
233
+ - ai@6.0.0-beta.70
234
+
235
+ ## 4.0.0-beta.69
236
+
237
+ ### Patch Changes
238
+
239
+ - Updated dependencies [d5b25ee]
240
+ - ai@6.0.0-beta.69
241
+
242
+ ## 4.0.0-beta.68
243
+
244
+ ### Patch Changes
245
+
246
+ - Updated dependencies [9b83947]
247
+ - ai@6.0.0-beta.68
248
+
249
+ ## 4.0.0-beta.67
250
+
251
+ ### Patch Changes
252
+
253
+ - ai@6.0.0-beta.67
254
+
255
+ ## 4.0.0-beta.66
256
+
257
+ ### Patch Changes
258
+
259
+ - Updated dependencies [fca786b]
260
+ - Updated dependencies [fca786b]
261
+ - ai@6.0.0-beta.66
262
+ - @ai-sdk/provider-utils@4.0.0-beta.20
263
+
264
+ ## 4.0.0-beta.65
265
+
266
+ ### Patch Changes
267
+
268
+ - Updated dependencies [dce4e7b]
269
+ - ai@6.0.0-beta.65
270
+
271
+ ## 4.0.0-beta.64
272
+
273
+ ### Patch Changes
274
+
275
+ - Updated dependencies [2d28066]
276
+ - ai@6.0.0-beta.64
277
+
278
+ ## 4.0.0-beta.63
279
+
280
+ ### Patch Changes
281
+
282
+ - Updated dependencies [a7da2b6]
283
+ - ai@6.0.0-beta.63
284
+
285
+ ## 4.0.0-beta.62
286
+
287
+ ### Patch Changes
288
+
289
+ - Updated dependencies [95b77e2]
290
+ - ai@6.0.0-beta.62
291
+
292
+ ## 4.0.0-beta.61
293
+
294
+ ### Patch Changes
295
+
296
+ - Updated dependencies [c98373a]
297
+ - ai@6.0.0-beta.61
298
+
299
+ ## 4.0.0-beta.60
300
+
301
+ ### Patch Changes
302
+
303
+ - Updated dependencies [2b49dae]
304
+ - ai@6.0.0-beta.60
305
+
306
+ ## 4.0.0-beta.59
307
+
308
+ ### Patch Changes
309
+
310
+ - Updated dependencies [e062079]
311
+ - ai@6.0.0-beta.59
312
+
313
+ ## 4.0.0-beta.58
314
+
315
+ ### Patch Changes
316
+
317
+ - Updated dependencies [a417a34]
318
+ - ai@6.0.0-beta.58
319
+
320
+ ## 4.0.0-beta.57
321
+
322
+ ### Patch Changes
323
+
324
+ - Updated dependencies [61f7b0f]
325
+ - ai@6.0.0-beta.57
326
+
327
+ ## 4.0.0-beta.56
328
+
329
+ ### Patch Changes
330
+
331
+ - Updated dependencies [3794514]
332
+ - @ai-sdk/provider-utils@4.0.0-beta.19
333
+ - ai@6.0.0-beta.56
334
+
335
+ ## 4.0.0-beta.55
336
+
337
+ ### Patch Changes
338
+
339
+ - Updated dependencies [42cf7ed]
340
+ - ai@6.0.0-beta.55
341
+
342
+ ## 4.0.0-beta.54
343
+
344
+ ### Patch Changes
345
+
346
+ - Updated dependencies [9388ff1]
347
+ - ai@6.0.0-beta.54
348
+
349
+ ## 4.0.0-beta.53
350
+
351
+ ### Patch Changes
352
+
353
+ - ai@6.0.0-beta.53
354
+
355
+ ## 4.0.0-beta.52
356
+
357
+ ### Patch Changes
358
+
359
+ - ai@6.0.0-beta.52
360
+
361
+ ## 4.0.0-beta.51
362
+
363
+ ### Patch Changes
364
+
365
+ - Updated dependencies [5e313e3]
366
+ - ai@6.0.0-beta.51
367
+
368
+ ## 4.0.0-beta.50
369
+
370
+ ### Patch Changes
371
+
372
+ - Updated dependencies [4812235]
373
+ - Updated dependencies [81d4308]
374
+ - ai@6.0.0-beta.50
375
+ - @ai-sdk/provider-utils@4.0.0-beta.18
376
+
377
+ ## 4.0.0-beta.49
378
+
379
+ ### Patch Changes
380
+
381
+ - Updated dependencies [703459a]
382
+ - @ai-sdk/provider-utils@4.0.0-beta.17
383
+ - ai@6.0.0-beta.49
384
+
385
+ ## 4.0.0-beta.48
386
+
387
+ ### Patch Changes
388
+
389
+ - Updated dependencies [7f2c9b6]
390
+ - ai@6.0.0-beta.48
391
+
392
+ ## 4.0.0-beta.47
393
+
394
+ ### Patch Changes
395
+
396
+ - Updated dependencies [c62ecf0]
397
+ - ai@6.0.0-beta.47
398
+
399
+ ## 4.0.0-beta.46
400
+
401
+ ### Patch Changes
402
+
403
+ - ai@6.0.0-beta.46
404
+
405
+ ## 4.0.0-beta.45
406
+
407
+ ### Patch Changes
408
+
409
+ - Updated dependencies [48454ab]
410
+ - ai@6.0.0-beta.45
411
+
412
+ ## 4.0.0-beta.44
413
+
414
+ ### Patch Changes
415
+
416
+ - Updated dependencies [2b1bf9d]
417
+ - ai@6.0.0-beta.44
418
+
419
+ ## 4.0.0-beta.43
420
+
421
+ ### Patch Changes
422
+
423
+ - Updated dependencies [27e8c3a]
424
+ - ai@6.0.0-beta.43
425
+
426
+ ## 4.0.0-beta.42
427
+
428
+ ### Patch Changes
429
+
430
+ - Updated dependencies [6306603]
431
+ - @ai-sdk/provider-utils@4.0.0-beta.16
432
+ - ai@6.0.0-beta.42
433
+
434
+ ## 4.0.0-beta.41
435
+
436
+ ### Patch Changes
437
+
438
+ - Updated dependencies [f0b2157]
439
+ - @ai-sdk/provider-utils@4.0.0-beta.15
440
+ - ai@6.0.0-beta.41
441
+
442
+ ## 4.0.0-beta.40
443
+
444
+ ### Patch Changes
445
+
446
+ - Updated dependencies [3b1d015]
447
+ - @ai-sdk/provider-utils@4.0.0-beta.14
448
+ - ai@6.0.0-beta.40
449
+
450
+ ## 4.0.0-beta.39
451
+
452
+ ### Patch Changes
453
+
454
+ - f6f0c5a: chore: remove zod from ui packages
455
+ - Updated dependencies [f6f0c5a]
456
+ - ai@6.0.0-beta.39
457
+
458
+ ## 4.0.0-beta.38
459
+
460
+ ### Patch Changes
461
+
462
+ - Updated dependencies [d116b4b]
463
+ - @ai-sdk/provider-utils@4.0.0-beta.13
464
+ - ai@6.0.0-beta.38
465
+
466
+ ## 4.0.0-beta.37
467
+
468
+ ### Patch Changes
469
+
470
+ - Updated dependencies [7e32fea]
471
+ - @ai-sdk/provider-utils@4.0.0-beta.12
472
+ - ai@6.0.0-beta.37
473
+
474
+ ## 4.0.0-beta.36
475
+
476
+ ### Patch Changes
477
+
478
+ - ai@6.0.0-beta.36
479
+
480
+ ## 4.0.0-beta.35
481
+
482
+ ### Patch Changes
483
+
484
+ - ai@6.0.0-beta.35
485
+
486
+ ## 4.0.0-beta.34
487
+
488
+ ### Patch Changes
489
+
490
+ - Updated dependencies [bb10a89]
491
+ - ai@6.0.0-beta.34
492
+
493
+ ## 4.0.0-beta.33
494
+
495
+ ### Patch Changes
496
+
497
+ - Updated dependencies [f733285]
498
+ - ai@6.0.0-beta.33
499
+
500
+ ## 4.0.0-beta.32
501
+
502
+ ### Patch Changes
503
+
504
+ - Updated dependencies [7e4649f]
505
+ - ai@6.0.0-beta.32
506
+
507
+ ## 4.0.0-beta.31
508
+
509
+ ### Patch Changes
510
+
511
+ - 95f65c2: chore: use import \* from zod/v4
512
+ - Updated dependencies [95f65c2]
513
+ - Updated dependencies [95f65c2]
514
+ - @ai-sdk/provider-utils@4.0.0-beta.11
515
+ - ai@6.0.0-beta.31
516
+
517
+ ## 4.0.0-beta.30
518
+
519
+ ### Patch Changes
520
+
521
+ - ai@6.0.0-beta.30
522
+
523
+ ## 4.0.0-beta.29
524
+
525
+ ### Major Changes
526
+
527
+ - dee8b05: ai SDK 6 beta
528
+
529
+ ### Patch Changes
530
+
531
+ - Updated dependencies [dee8b05]
532
+ - ai@6.0.0-beta.29
533
+ - @ai-sdk/provider-utils@4.0.0-beta.10
534
+
535
+ ## 3.1.0-beta.28
536
+
537
+ ### Patch Changes
538
+
539
+ - Updated dependencies [521c537]
540
+ - @ai-sdk/provider-utils@3.1.0-beta.9
541
+ - ai@5.1.0-beta.28
542
+
543
+ ## 3.1.0-beta.27
544
+
545
+ ### Patch Changes
546
+
547
+ - Updated dependencies [e06565c]
548
+ - @ai-sdk/provider-utils@3.1.0-beta.8
549
+ - ai@5.1.0-beta.27
550
+
551
+ ## 3.1.0-beta.26
552
+
553
+ ### Patch Changes
554
+
555
+ - Updated dependencies [c99da05]
556
+ - ai@5.1.0-beta.26
557
+
558
+ ## 3.1.0-beta.25
559
+
560
+ ### Patch Changes
561
+
562
+ - Updated dependencies [457f1c6]
563
+ - ai@5.1.0-beta.25
564
+
565
+ ## 3.1.0-beta.24
566
+
567
+ ### Patch Changes
568
+
569
+ - Updated dependencies [90e5bdd]
570
+ - ai@5.1.0-beta.24
571
+
572
+ ## 3.1.0-beta.23
573
+
574
+ ### Patch Changes
575
+
576
+ - ai@5.1.0-beta.23
577
+
578
+ ## 3.1.0-beta.22
579
+
580
+ ### Patch Changes
581
+
582
+ - e8109d3: feat: tool execution approval
583
+ - Updated dependencies [046aa3b]
584
+ - Updated dependencies [e8109d3]
585
+ - Updated dependencies [a5e152d]
586
+ - Updated dependencies [21e20c0]
587
+ - ai@5.1.0-beta.22
588
+ - @ai-sdk/provider-utils@3.1.0-beta.7
589
+
590
+ ## 3.1.0-beta.21
591
+
592
+ ### Patch Changes
593
+
594
+ - ai@5.1.0-beta.21
595
+
596
+ ## 3.1.0-beta.20
597
+
598
+ ### Patch Changes
599
+
600
+ - Updated dependencies [846e80e]
601
+ - ai@5.1.0-beta.20
602
+
603
+ ## 3.1.0-beta.19
604
+
605
+ ### Patch Changes
606
+
607
+ - Updated dependencies [aa0515c]
608
+ - Updated dependencies [e7d9b00]
609
+ - Updated dependencies [b1aeea7]
610
+ - ai@5.1.0-beta.19
611
+
612
+ ## 3.1.0-beta.18
613
+
614
+ ### Patch Changes
615
+
616
+ - Updated dependencies [0adc679]
617
+ - Updated dependencies [9b8d17e]
618
+ - @ai-sdk/provider-utils@3.1.0-beta.6
619
+ - ai@5.1.0-beta.18
620
+
621
+ ## 3.1.0-beta.17
622
+
623
+ ### Patch Changes
624
+
625
+ - ai@5.1.0-beta.17
626
+
627
+ ## 3.1.0-beta.16
628
+
629
+ ### Patch Changes
630
+
631
+ - Updated dependencies [14ca35d]
632
+ - ai@5.1.0-beta.16
633
+
634
+ ## 3.1.0-beta.15
635
+
636
+ ### Patch Changes
637
+
638
+ - ai@5.1.0-beta.15
639
+
640
+ ## 3.1.0-beta.14
641
+
642
+ ### Patch Changes
643
+
644
+ - 10c1322: fix: moved dependency `@ai-sdk/test-server` to devDependencies
645
+ - Updated dependencies [7c3c216]
646
+ - Updated dependencies [8dac895]
647
+ - Updated dependencies [e0d1ea9]
648
+ - Updated dependencies [10c1322]
649
+ - ai@5.1.0-beta.14
650
+ - @ai-sdk/provider-utils@3.1.0-beta.5
651
+
652
+ ## 3.1.0-beta.13
653
+
654
+ ### Patch Changes
655
+
656
+ - Updated dependencies [1c2a4c1]
657
+ - ai@5.1.0-beta.13
658
+
659
+ ## 3.1.0-beta.12
660
+
661
+ ### Patch Changes
662
+
663
+ - ai@5.1.0-beta.12
664
+
665
+ ## 3.1.0-beta.11
666
+
667
+ ### Patch Changes
668
+
669
+ - 4616b86: chore: update zod peer depenedency version
670
+ - Updated dependencies [4616b86]
671
+ - @ai-sdk/provider-utils@3.1.0-beta.4
672
+ - ai@5.1.0-beta.11
673
+
674
+ ## 3.1.0-beta.10
675
+
676
+ ### Patch Changes
677
+
678
+ - Updated dependencies [8c98371]
679
+ - ai@5.1.0-beta.10
680
+
3
681
  ## 3.1.0-beta.9
4
682
 
5
683
  ### Patch Changes
@@ -1,14 +1,12 @@
1
- import { type FetchFunction, type InferSchema } from '@ai-sdk/provider-utils';
2
- import { type DeepPartial, type Schema } from 'ai';
3
- import type * as z3 from 'zod/v3';
4
- import type * as z4 from 'zod/v4';
5
- export type Experimental_StructuredObjectOptions<SCHEMA extends z3.Schema | z4.core.$ZodType | Schema, RESULT = InferSchema<SCHEMA>> = {
1
+ import { type FetchFunction } from '@ai-sdk/provider-utils';
2
+ import { type DeepPartial, type FlexibleSchema, type InferSchema } from 'ai';
3
+ export type Experimental_StructuredObjectOptions<SCHEMA extends FlexibleSchema, RESULT = InferSchema<SCHEMA>> = {
6
4
  /**
7
5
  * The API endpoint. It should stream JSON that matches the schema as chunked text.
8
6
  */
9
7
  api: string;
10
8
  /**
11
- * A Zod schema that defines the shape of the complete object.
9
+ * A schema that defines the shape of the complete object.
12
10
  */
13
11
  schema: SCHEMA;
14
12
  /**
@@ -55,7 +53,7 @@ export type Experimental_StructuredObjectOptions<SCHEMA extends z3.Schema | z4.c
55
53
  */
56
54
  credentials?: RequestCredentials;
57
55
  };
58
- export declare class StructuredObject<SCHEMA extends z3.Schema | z4.core.$ZodType | Schema, RESULT = InferSchema<SCHEMA>, INPUT = unknown> {
56
+ export declare class StructuredObject<SCHEMA extends FlexibleSchema, RESULT = InferSchema<SCHEMA>, INPUT = unknown> {
59
57
  #private;
60
58
  /**
61
59
  * The current value for the generated object. Updated as the API streams JSON chunks.
@@ -1 +1 @@
1
- {"version":3,"file":"structured-object.svelte.d.ts","sourceRoot":"","sources":["../src/structured-object.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,WAAW,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,MAAM,EACZ,MAAM,IAAI,CAAC;AACZ,OAAO,KAAK,KAAK,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,KAAK,KAAK,EAAE,MAAM,QAAQ,CAAC;AAQlC,MAAM,MAAM,oCAAoC,CAC9C,MAAM,SAAS,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,GAAG,MAAM,EACpD,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,IAC1B;IACF;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAEnC;;;OAGG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;QACjB;;;WAGG;QACH,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;QAE3B;;WAEG;QACH,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;KAC1B,KAAK,OAAO,CAAC,IAAI,CAAC,G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EZ;;OAEG;IACH,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAEnC;;;OAGG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;QACjB;;;WAGG;QACH,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;QAE3B;;WAEG;QACH,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;KAC1B,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAE3B;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAEjC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC;IAE3C;;;;OAIG;IACH,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAClC,CAAC;AAEF,qBAAa,gBAAgB,CAC3B,MAAM,SAAS,cAAc,EAC7B,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,EAC5B,KAAK,GAAG,OAAO;;IAWf;;OAEG;IACH,IAAI,MAAM,IAAI,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,CAE5C;IAKD,0CAA0C;IAC1C,IAAI,KAAK,sBAER;IAED;;OAEG;IACH,IAAI,OAAO,YAEV;gBAEW,OAAO,EAAE,oCAAoC,CAAC,MAAM,EAAE,MAAM,CAAC;IAUzE;;OAEG;IACH,IAAI,aASF;IAEF;;OAEG;IACH,MAAM,GAAU,OAAO,KAAK,mBAqF1B;IAEF;;OAEG;IACH,KAAK,aAGH;CAOH"}
@@ -1,8 +1,7 @@
1
1
  <script lang="ts" generics="RESULT">
2
+ import type { FlexibleSchema } from '@ai-sdk/provider-utils';
2
3
  import { createAIContext } from '../context-provider.js';
3
4
  import { StructuredObject } from '../structured-object.svelte.js';
4
- import type { Schema } from 'ai';
5
- import type { z } from 'zod';
6
5
 
7
6
  let {
8
7
  id,
@@ -11,7 +10,7 @@
11
10
  }: {
12
11
  id?: string;
13
12
  api: string;
14
- schema: z.Schema<RESULT, z.ZodTypeDef, unknown> | Schema<RESULT>;
13
+ schema: FlexibleSchema<RESULT>;
15
14
  } = $props();
16
15
 
17
16
  createAIContext();
@@ -1,18 +1,17 @@
1
+ import type { FlexibleSchema } from '@ai-sdk/provider-utils';
1
2
  import { StructuredObject } from '../structured-object.svelte.js';
2
- import type { Schema } from 'ai';
3
- import type { z } from 'zod';
4
3
  declare class __sveltets_Render<RESULT> {
5
4
  props(): {
6
5
  id?: string;
7
6
  api: string;
8
- schema: z.ZodType<RESULT, z.ZodTypeDef, unknown> | Schema<RESULT>;
7
+ schema: FlexibleSchema<RESULT>;
9
8
  };
10
9
  events(): {};
11
10
  slots(): {};
12
11
  bindings(): "";
13
12
  exports(): {
14
- object1: StructuredObject<import("zod/v4/core/schemas.js").$ZodType<unknown, unknown, import("zod/v4/core/schemas.js").$ZodTypeInternals<unknown, unknown>> | import("zod/v3/types.js").ZodType<any, import("zod/v3/types.js").ZodTypeDef, any> | Schema, any, unknown>;
15
- object2: StructuredObject<import("zod/v4/core/schemas.js").$ZodType<unknown, unknown, import("zod/v4/core/schemas.js").$ZodTypeInternals<unknown, unknown>> | import("zod/v3/types.js").ZodType<any, import("zod/v3/types.js").ZodTypeDef, any> | Schema, any, unknown>;
13
+ object1: StructuredObject<FlexibleSchema<RESULT>, RESULT, unknown>;
14
+ object2: StructuredObject<FlexibleSchema<RESULT>, RESULT, unknown>;
16
15
  };
17
16
  }
18
17
  interface $$IsomorphicComponent {
@@ -1 +1 @@
1
- {"version":3,"file":"structured-object-synchronization.svelte.d.ts","sourceRoot":"","sources":["../../src/tests/structured-object-synchronization.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AACjC,OAAO,KAAK,EAAE,CAAC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AAA,MAAM,+BAA+B,EAAE,qBAAmC,CAAC;AACzD,KAAK,+BAA+B,CAAC,MAAM,IAAI,YAAY,CAAC,OAAO,+BAA+B,CAAC,MAAM,CAAC,CAAC,CAAC;AAC9G,eAAe,+BAA+B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/svelte",
3
- "version": "3.1.0-beta.9",
3
+ "version": "4.0.0-beta.101",
4
4
  "license": "Apache-2.0",
5
5
  "files": [
6
6
  "dist",
@@ -9,7 +9,8 @@
9
9
  "src",
10
10
  "!src/**/*.test.*",
11
11
  "!src/**/*.spec.*",
12
- "CHANGELOG.md"
12
+ "CHANGELOG.md",
13
+ "README.md"
13
14
  ],
14
15
  "sideEffects": [
15
16
  "**/*.css"
@@ -27,18 +28,11 @@
27
28
  "access": "public"
28
29
  },
29
30
  "peerDependencies": {
30
- "svelte": "^5.31.0",
31
- "zod": "^3.25.76 || ^4"
32
- },
33
- "peerDependenciesMeta": {
34
- "zod": {
35
- "optional": true
36
- }
31
+ "svelte": "^5.31.0"
37
32
  },
38
33
  "dependencies": {
39
- "@ai-sdk/provider-utils": "3.1.0-beta.3",
40
- "@ai-sdk/test-server": "1.0.0-beta.0",
41
- "ai": "5.1.0-beta.9"
34
+ "@ai-sdk/provider-utils": "4.0.0-beta.33",
35
+ "ai": "6.0.0-beta.101"
42
36
  },
43
37
  "devDependencies": {
44
38
  "@eslint/compat": "^1.2.5",
@@ -60,7 +54,8 @@
60
54
  "vite": "^6.0.0",
61
55
  "vitest": "^3.0.0",
62
56
  "zod": "3.25.76",
63
- "@vercel/ai-tsconfig": "0.0.0"
57
+ "@vercel/ai-tsconfig": "0.0.0",
58
+ "@ai-sdk/test-server": "1.0.0-beta.1"
64
59
  },
65
60
  "homepage": "https://ai-sdk.dev/docs",
66
61
  "repository": {
@@ -87,6 +82,6 @@
87
82
  "test": "vitest --run",
88
83
  "test:update": "vitest --run -u",
89
84
  "test:watch": "vitest",
90
- "clean": "rm -rf dist *.tsbuildinfo"
85
+ "clean": "del-cli dist *.tsbuildinfo"
91
86
  }
92
87
  }
@@ -3,17 +3,15 @@ import {
3
3
  isAbortError,
4
4
  safeValidateTypes,
5
5
  type FetchFunction,
6
- type InferSchema,
7
6
  } from '@ai-sdk/provider-utils';
8
7
  import {
9
8
  asSchema,
10
9
  isDeepEqualData,
11
10
  parsePartialJson,
12
11
  type DeepPartial,
13
- type Schema,
12
+ type FlexibleSchema,
13
+ type InferSchema,
14
14
  } from 'ai';
15
- import type * as z3 from 'zod/v3';
16
- import type * as z4 from 'zod/v4';
17
15
  import {
18
16
  getStructuredObjectContext,
19
17
  hasStructuredObjectContext,
@@ -22,7 +20,7 @@ import {
22
20
  } from './structured-object-context.svelte.js';
23
21
 
24
22
  export type Experimental_StructuredObjectOptions<
25
- SCHEMA extends z3.Schema | z4.core.$ZodType | Schema,
23
+ SCHEMA extends FlexibleSchema,
26
24
  RESULT = InferSchema<SCHEMA>,
27
25
  > = {
28
26
  /**
@@ -31,7 +29,7 @@ export type Experimental_StructuredObjectOptions<
31
29
  api: string;
32
30
 
33
31
  /**
34
- * A Zod schema that defines the shape of the complete object.
32
+ * A schema that defines the shape of the complete object.
35
33
  */
36
34
  schema: SCHEMA;
37
35
 
@@ -88,7 +86,7 @@ export type Experimental_StructuredObjectOptions<
88
86
  };
89
87
 
90
88
  export class StructuredObject<
91
- SCHEMA extends z3.Schema | z4.core.$ZodType | Schema,
89
+ SCHEMA extends FlexibleSchema,
92
90
  RESULT = InferSchema<SCHEMA>,
93
91
  INPUT = unknown,
94
92
  > {
@@ -1,8 +1,7 @@
1
1
  <script lang="ts" generics="RESULT">
2
+ import type { FlexibleSchema } from '@ai-sdk/provider-utils';
2
3
  import { createAIContext } from '../context-provider.js';
3
4
  import { StructuredObject } from '../structured-object.svelte.js';
4
- import type { Schema } from 'ai';
5
- import type { z } from 'zod';
6
5
 
7
6
  let {
8
7
  id,
@@ -11,7 +10,7 @@
11
10
  }: {
12
11
  id?: string;
13
12
  api: string;
14
- schema: z.Schema<RESULT, z.ZodTypeDef, unknown> | Schema<RESULT>;
13
+ schema: FlexibleSchema<RESULT>;
15
14
  } = $props();
16
15
 
17
16
  createAIContext();