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

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