Skip to content

v0.2.0 — Selection flow fix + AST StyleSheet resolution

Choose a tag to compare

@dgutierrezd dgutierrezd released this 05 Apr 01:58

Highlights

🎯 Selection now actually works on Fabric (RN 0.76+)

The old legacy UIManager.findSubviewIn approach silently failed on Fabric. Replaced with React Native's built-in getInspectorDataForViewAtPoint API, which works on both architectures.

🔀 Walks the fiber .return chain for the nearest user-code source

Previous hierarchy-based approach always returned the deepest host's props, pointing edits at node_modules/react-native/Libraries/Text/Text.js. Now walks each fiber individually and skips anything in node_modules or react-native/Libraries.

✨ AST engine resolves style={styles.foo} references

Tapping <Text style={styles.title}> now locates the matching entry in const styles = StyleSheet.create({...}) and upserts the new value directly. Falls back to style={[styles.title, { newKey: newValue }]} array overrides if resolution fails. No more silent no-op successes — matched-but-not-mutated now throws a real error.

🪶 No reanimated dependency

InspectorPanel now uses the stock Animated API. Consumers no longer need react-native-reanimated or the worklets babel plugin. Hard peer dependencies on react-native-reanimated and react-native-gesture-handler removed.

📜 Scrollable panel

All three tabs (Styles / Tree / Props) are now properly scrollable inside a flex: 1, minHeight: 0 tab body wrapper.

🎨 Minimal indigo accent

#C6F135 (harsh lime) → #7C9BFF (soft indigo). Consistent across bubble, highlight box, inspector chrome, active tab, StyleEditor caret, and component tree names.

Breaking changes

None for correctly set-up consumers. The peer dependency loosening (reanimated/gesture-handler no longer required) is strictly additive.

Install

```bash
npm install rn-studio@0.2.0
```