@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 CHANGED
@@ -1,6 +1,6 @@
1
- # @rn-ave/core
1
+ # @rn-ave/core 🎯
2
2
 
3
- Core library for `rn-ave` - Agent Visual Edit for React Native.
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
- Add this line to the top of your `App.tsx` or `index.js`.
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 Selection**: Tap components to select them.
24
- - **Context Extraction**: Extracts component name, props, hierarchy, and source location.
25
- - **AI Agent Integration**: Sends context to Claude Code, OpenCode, or Cursor.
26
- - **Open in Cursor**: Opens the exact file and line in Cursor.
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
- ## Requirements
45
+ ## Environment Support
29
46
 
30
47
  - React Native 0.60+
31
- - Works best with Cursor editor.
48
+ - Expo and Bare workflow
49
+ - Works only when `__DEV__` is true (zero production overhead)
package/dist/editor.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  /**
2
2
  * Editor launching utilities
3
- * Only Cursor is supported.
4
3
  */
5
4
  import type { SourceLocation } from './types';
6
5
  export interface LaunchEditorOptions {
package/dist/editor.js CHANGED
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
3
  * Editor launching utilities
4
- * Only Cursor is supported.
5
4
  */
6
5
  Object.defineProperty(exports, "__esModule", { value: true });
7
6
  exports.launchEditor = launchEditor;
@@ -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>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rn-ave/core",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "React Native Agent Visual Edit - core library for visual component selection and AI agent integration",
5
5
  "publishConfig": {
6
6
  "access": "public"