feat(renderers): Add React Native renderer#430
feat(renderers): Add React Native renderer#430sivamrudram-eng wants to merge 4 commits intogoogle:mainfrom
Conversation
Add first React Native implementation of A2UI renderer with: - Core A2UIRenderer component for rendering A2UI specs - 8 MVP components: Text, Button, Image, Row, Column, Card, List, TextField - JSONL stream parser for real-time updates - Message dispatcher for A2UI protocol messages - Surface registry and component buffer for state management - Data binding support with BoundValue resolution - useA2UIStream hook for streaming from agent servers - Full TypeScript support Implements google#428
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
I have signed the CLA. Please re-check. |
Added new components matching Angular renderer: - Modal, Tabs, Checkbox, Slider, DateTimeInput - MultipleChoice, Icon, Divider, Video, AudioPlayer Added theming system with light/dark themes. Added example apps demonstrating all components. Updated README with full documentation.
- Add Jest configuration with ts-jest for TypeScript ESM support - Add JSONL parser tests (basic parsing, chunked input, error handling) - Add data model store tests (type guards, path operations, resolvers) - Add message dispatcher tests (message routing, lifecycle hooks) - Add component buffer tests (CRUD ops, tree traversal, search) - Add surface registry tests (surface lifecycle, subscriptions) - Update ESLint config to recognize Jest test environment - 130 tests covering all core modules
|
Nice work @sivamrudram-eng @ataibarkai is leading the effort for an A2UI react renderer. Atai and CopilotKit team, can you please review this PR and see what you might want for the official implementation? Regardless of the outcome (because I think Atai and team are kind of far into their work) we would welcome your future contributions and refinements to make the A2UI react renderer better. We also have a v0.9 spec ~done and there will be improvements to each of these renderers to support v0.9, possibly backwards compatibility, certainly better decoupling of transport and shared library functions... lots more stuff to do :) |
|
Thanks for this substantial contribution @sivamrudram-eng — 21k lines with 44 files is serious work! A few notes on where this fits:
If you're interested in that path, we're happy to link to it from the official docs as a community renderer. Let us know what you think! Appreciate you pushing the A2UI ecosystem forward! 🙌 |
Summary
This PR adds the first React Native implementation of the A2UI renderer, enabling A2UI-compliant agents to generate native mobile UIs on iOS and Android.
Features
Core Components
MVP Components (8 of 16)
<Text><Pressable><Image><View flexDirection="row"><View><View>with shadow<FlatList><TextInput>Infrastructure
Usage Example
Roadmap
@a2ui/react-nativeImplements #428
Standalone Repository
This renderer is also available as a standalone package at:
https://github.com/sivamrudram-eng/a2ui-react-native