@guideai/react-native 0.7.0 → 0.9.0

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 (37) hide show
  1. package/README.md +20 -1
  2. package/dist/GuideAIChat-BFu10t6D.cjs +2794 -0
  3. package/dist/GuideAIChat-BFu10t6D.cjs.map +1 -0
  4. package/dist/GuideAIChat-BQQ8lUKs.js +2795 -0
  5. package/dist/GuideAIChat-BQQ8lUKs.js.map +1 -0
  6. package/dist/GuideAIChat-Ba6n1ePs.js +2795 -0
  7. package/dist/GuideAIChat-Ba6n1ePs.js.map +1 -0
  8. package/dist/GuideAIChat-CNmEo5bZ.cjs +2794 -0
  9. package/dist/GuideAIChat-CNmEo5bZ.cjs.map +1 -0
  10. package/dist/GuideAIChat-SU0CVNby.js +2795 -0
  11. package/dist/GuideAIChat-SU0CVNby.js.map +1 -0
  12. package/dist/GuideAIChat-W8KQ4Y6i.cjs +2794 -0
  13. package/dist/GuideAIChat-W8KQ4Y6i.cjs.map +1 -0
  14. package/dist/index.cjs +1 -1
  15. package/dist/index.d.ts +91 -6
  16. package/dist/index.mjs +2 -2
  17. package/dist/ui.cjs +2 -2
  18. package/dist/ui.d.ts +11 -5
  19. package/dist/ui.mjs +3 -3
  20. package/dist/useConversations-C-OmzdeA.js +4300 -0
  21. package/dist/useConversations-C-OmzdeA.js.map +1 -0
  22. package/dist/useConversations-CJEaVqch.cjs +4290 -0
  23. package/dist/useConversations-CJEaVqch.cjs.map +1 -0
  24. package/dist/useConversations-Chn_GKOz.cjs +4299 -0
  25. package/dist/useConversations-Chn_GKOz.cjs.map +1 -0
  26. package/dist/useConversations-Ckyqbxqi.cjs +4299 -0
  27. package/dist/useConversations-Ckyqbxqi.cjs.map +1 -0
  28. package/dist/useConversations-DzhYCIiY.js +4300 -0
  29. package/dist/useConversations-DzhYCIiY.js.map +1 -0
  30. package/dist/useConversations-SbhtYN_R.js +4291 -0
  31. package/dist/useConversations-SbhtYN_R.js.map +1 -0
  32. package/dist/voice.cjs +2835 -19
  33. package/dist/voice.cjs.map +1 -1
  34. package/dist/voice.d.ts +12 -6
  35. package/dist/voice.mjs +2836 -20
  36. package/dist/voice.mjs.map +1 -1
  37. package/package.json +6 -2
package/README.md CHANGED
@@ -8,10 +8,29 @@ npm install @guideai/react-native
8
8
  npx expo install expo-audio expo-file-system
9
9
  # pictures on the whiteboard:
10
10
  npx expo install react-native-svg
11
+ # live voice that flows like a phone call (recommended):
12
+ npx expo install react-native-audio-api
11
13
  ```
12
14
 
13
15
  React ≥ 18 and React Native ≥ 0.73. No native module of its own: voice uses expo-audio and expo-file-system, which Expo apps already ship, so it works in a dev build and over OTA updates.
14
16
 
17
+ **Live voice that flows.** Pass react-native-audio-api in and live voice streams both ways, as on the web: it hears you finish in a fraction of a second, starts speaking while the answer is still being written, says something while it thinks, you can talk over it, and "yes" or "no" answers an action waiting for approval. Without it, each turn is recorded, uploaded once you go quiet, and the finished answer read aloud.
18
+
19
+ ```tsx
20
+ import * as AudioAPI from 'react-native-audio-api';
21
+
22
+ GuideAI.configure({ apiKey: 'pk_live_…', origin: 'https://app.example.com', storage: AsyncStorage, audio: AudioAPI });
23
+ ```
24
+
25
+ It is a native module: add its config plugin to app.json, then make a new development build (not Expo Go; an OTA update cannot add it).
26
+
27
+ ```json
28
+ ["react-native-audio-api", {
29
+ "iosMicrophonePermission": "Talk to the assistant.",
30
+ "androidPermissions": ["android.permission.RECORD_AUDIO", "android.permission.MODIFY_AUDIO_SETTINGS"]
31
+ }]
32
+ ```
33
+
15
34
  ## The quickest way: our chat, with voice
16
35
 
17
36
  ```tsx
@@ -147,7 +166,7 @@ function Tutor() {
147
166
 
148
167
  `<GuideAILiveVoice>` and `<GuideAILanguagePicker>` are our UI for the call and the language: pass `theme` for your colours and `labels` for your words. Or draw your own from the hook fields.
149
168
 
150
- `suggestions` appear when the agent's Blueprint has the **Suggest follow-ups** node, `whiteboard` when it has **Explain on a whiteboard**, and `images` when it has **Draw images**. The whiteboard reads each step aloud when `speech` is configured. A board shows complex things the way a teacher would: drawn by the pen from a line drawing found on the web, or as the real photo, with labels on their parts (an arrow, a ring or a box). Nothing on a board is ever generated.
169
+ `suggestions` appear when the agent's Blueprint has the **Suggest follow-ups** node, `whiteboard` when it has **Explain on a whiteboard**, and `images` when it has **Draw images**. The whiteboard reads each step aloud when `speech` is configured. A board shows complex things the way a teacher would: drawn by the pen from a line drawing found on the web, or as the real photo, with labels on their parts (an arrow, a ring or a box). Nothing on a board is ever generated. With **Animate** on in that node, a board about how something works shows it moving: a payment travelling along an arrow, gears turning, a balance counting up.
151
170
 
152
171
  ## Or a floating button
153
172