@ai-sdk/rsc 3.0.152 → 3.0.154

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +28 -0
  3. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @ai-sdk/rsc
2
2
 
3
+ ## 3.0.154
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [47236dd]
8
+ - Updated dependencies [c8e8866]
9
+ - Updated dependencies [e64ed82]
10
+ - Updated dependencies [1cf95c6]
11
+ - ai@7.0.154
12
+ - @ai-sdk/provider-utils@5.0.69
13
+
14
+ ## 3.0.153
15
+
16
+ ### Patch Changes
17
+
18
+ - e729d58: chore(docs): update `README.md` for consistent format and to avoid duplication
19
+ - Updated dependencies [5475347]
20
+ - Updated dependencies [e729d58]
21
+ - @ai-sdk/provider@4.0.34
22
+ - ai@7.0.153
23
+ - @ai-sdk/provider-utils@5.0.68
24
+
3
25
  ## 3.0.152
4
26
 
5
27
  ### Patch Changes
package/README.md CHANGED
@@ -1,3 +1,31 @@
1
1
  # AI SDK: React Server Components
2
2
 
3
3
  [React Server Components](https://react.dev/reference/rsc/server-components) for the [AI SDK](https://ai-sdk.dev/docs):
4
+
5
+ ## Setup
6
+
7
+ ```bash
8
+ npm i @ai-sdk/rsc
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```tsx
14
+ 'use server';
15
+
16
+ import { createStreamableUI } from '@ai-sdk/rsc';
17
+
18
+ export async function getWeather() {
19
+ const weatherUI = createStreamableUI();
20
+
21
+ weatherUI.update(<div style={{ color: 'gray' }}>Loading...</div>);
22
+
23
+ setTimeout(() => {
24
+ weatherUI.done(<div>It&apos;s a sunny day!</div>);
25
+ }, 1000);
26
+
27
+ return weatherUI.value;
28
+ }
29
+ ```
30
+
31
+ See the [React Server Components documentation](https://ai-sdk.dev/docs/ai-sdk-rsc/overview) for more information.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/rsc",
3
- "version": "3.0.152",
3
+ "version": "3.0.154",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -27,9 +27,9 @@
27
27
  "README.md"
28
28
  ],
29
29
  "dependencies": {
30
- "@ai-sdk/provider": "4.0.33",
31
- "@ai-sdk/provider-utils": "5.0.67",
32
- "ai": "7.0.152",
30
+ "@ai-sdk/provider": "4.0.34",
31
+ "@ai-sdk/provider-utils": "5.0.69",
32
+ "ai": "7.0.154",
33
33
  "jsondiffpatch": "0.7.6"
34
34
  },
35
35
  "devDependencies": {