@rn-ave/core 0.1.0 → 0.1.1
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/README.md +28 -10
- package/dist/editor.d.ts +0 -1
- package/dist/editor.js +0 -1
- package/dist/overlay/tooltip.js +0 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# @rn-ave/core
|
|
1
|
+
# @rn-ave/core 🎯
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The core library for `rn-ave` (React Native Agent Visual Edit). It provides the visual inspector UI, component selection logic, and context extraction for AI agents.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -10,22 +10,40 @@ npm install @rn-ave/core
|
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
-
The easiest way to use `rn-ave` is with auto-initialization:
|
|
13
|
+
The easiest way to use `rn-ave` is with **auto-initialization**. Import it at the **very top** of your entry file:
|
|
14
|
+
|
|
15
|
+
**For standard Expo or React Native projects:**
|
|
16
|
+
Add to `App.tsx` or `index.js`:
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
// App.tsx or index.js
|
|
20
|
+
import '@rn-ave/core/auto';
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**For Expo Router projects:**
|
|
24
|
+
Add to your **root** layout file (usually `app/_layout.tsx` or `src/app/_layout.tsx`):
|
|
14
25
|
|
|
15
26
|
```tsx
|
|
27
|
+
// app/_layout.tsx
|
|
16
28
|
import '@rn-ave/core/auto';
|
|
17
29
|
```
|
|
18
30
|
|
|
19
|
-
|
|
31
|
+
Adding this import will automatically inject the inspector button and overlay into your app when running in development mode.
|
|
20
32
|
|
|
21
33
|
## Features
|
|
22
34
|
|
|
23
|
-
- **Visual
|
|
24
|
-
- **
|
|
25
|
-
- **
|
|
26
|
-
- **
|
|
35
|
+
- **Visual Inspector**: A floating button that activates a selection overlay.
|
|
36
|
+
- **Box Model Visualization**: See real-time margin, padding, and content areas for any tapped element.
|
|
37
|
+
- **Breadcrumbs Navigation**: Traverse up the component hierarchy to select parent components for editing.
|
|
38
|
+
- **Context Extraction**: Automatically gathers:
|
|
39
|
+
- Component Name
|
|
40
|
+
- Props (sanitized)
|
|
41
|
+
- Source File & Line Number (requires `@rn-ave/babel-plugin`)
|
|
42
|
+
- JSX usage preview
|
|
43
|
+
- **Agent Bridges**: Built-in support for sending context to OpenCode, Claude Code, and Cursor servers.
|
|
27
44
|
|
|
28
|
-
##
|
|
45
|
+
## Environment Support
|
|
29
46
|
|
|
30
47
|
- React Native 0.60+
|
|
31
|
-
-
|
|
48
|
+
- Expo and Bare workflow
|
|
49
|
+
- Works only when `__DEV__` is true (zero production overhead)
|
package/dist/editor.d.ts
CHANGED
package/dist/editor.js
CHANGED
package/dist/overlay/tooltip.js
CHANGED
|
@@ -217,10 +217,6 @@ function InfoTooltip({ componentInfo, bounds, onDismiss, onSendToAgent, onOpenIn
|
|
|
217
217
|
<react_native_1.TextInput style={styles.input} placeholder={`Tell ${selectedComponent.name} what to do...`} placeholderTextColor="#636366" value={prompt} onChangeText={setPrompt} multiline numberOfLines={2}/>
|
|
218
218
|
|
|
219
219
|
<react_native_1.View style={styles.agentGrid}>
|
|
220
|
-
<react_native_1.TouchableOpacity style={[styles.agentButton, isLoading && styles.agentButtonDisabled]} onPress={() => handleSend('cursor')} disabled={isLoading}>
|
|
221
|
-
{loadingAgent === 'cursor' ? (<react_native_1.ActivityIndicator size="small" color="#8B5CF6"/>) : (<react_native_1.Text style={styles.agentButtonText}>Cursor</react_native_1.Text>)}
|
|
222
|
-
</react_native_1.TouchableOpacity>
|
|
223
|
-
|
|
224
220
|
<react_native_1.TouchableOpacity style={[styles.agentButton, isLoading && styles.agentButtonDisabled]} onPress={() => handleSend('claude-code')} disabled={isLoading}>
|
|
225
221
|
{loadingAgent === 'claude-code' ? (<react_native_1.ActivityIndicator size="small" color="#FF6B35"/>) : (<react_native_1.Text style={styles.agentButtonText}>Claude</react_native_1.Text>)}
|
|
226
222
|
</react_native_1.TouchableOpacity>
|