@strand-js/react-native 0.1.1 → 0.1.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.
Files changed (2) hide show
  1. package/README.md +35 -0
  2. package/package.json +11 -10
package/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # @strand-js/react-native
2
+
3
+ React Native transport adapter for [Strand](https://github.com/strand-js/strand).
4
+
5
+ React Native's built-in `fetch` does not support streaming response bodies. This package patches it transparently so all Strand hooks work identically to web.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install @strand-js/react-native
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```ts
16
+ // App.tsx — must be the first import
17
+ import '@strand-js/react-native'
18
+
19
+ // Everything else works as normal
20
+ import { StrandProvider } from '@strand-js/react'
21
+ ```
22
+
23
+ That's it. All hooks (`useConversation`, `useToolCall`, `useAgentSession`) work identically after this import.
24
+
25
+ ## Compatibility
26
+
27
+ | Platform | Status |
28
+ |---|---|
29
+ | React Native 0.73+ | ✅ |
30
+ | Expo SDK 50+ | ✅ |
31
+ | Expo Web | ✅ (no-op) |
32
+ | Node.js | ✅ (no-op) |
33
+ | Browsers | ✅ (no-op) |
34
+
35
+ [Full documentation →](https://github.com/strand-js/strand)
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@strand-js/react-native",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
+ "license": "MIT",
4
5
  "description": "React Native transport adapter for Strand — patches streaming fetch support",
5
6
  "main": "./dist/index.js",
6
7
  "module": "./dist/index.mjs",
@@ -15,15 +16,8 @@
15
16
  "files": [
16
17
  "dist"
17
18
  ],
18
- "scripts": {
19
- "build": "tsup src/index.ts --format esm,cjs --dts --clean",
20
- "dev": "tsup src/index.ts --format esm,cjs --dts --watch",
21
- "typecheck": "tsc --noEmit",
22
- "test": "vitest run",
23
- "lint": "eslint src"
24
- },
25
19
  "dependencies": {
26
- "@strand-js/core": "workspace:*"
20
+ "@strand-js/core": "0.1.3"
27
21
  },
28
22
  "peerDependencies": {
29
23
  "react": "^18.0.0",
@@ -36,5 +30,12 @@
36
30
  },
37
31
  "publishConfig": {
38
32
  "access": "public"
33
+ },
34
+ "scripts": {
35
+ "build": "tsup src/index.ts --format esm,cjs --dts --clean",
36
+ "dev": "tsup src/index.ts --format esm,cjs --dts --watch",
37
+ "typecheck": "tsc --noEmit",
38
+ "test": "vitest run",
39
+ "lint": "eslint src"
39
40
  }
40
- }
41
+ }