Releases: jiunshinn/react-native-focus-guide
Releases · jiunshinn/react-native-focus-guide
v0.2.0
What's new
Highlight overhaul — the tooltip and hole are now measured from real content (no more hardcoded 320×120), so topCenter / topRight / right etc. anchor to the actual size you render. Animated fade-in, native-driver.
New props
visible— drive the tooltip declarativelyoverlayColor,overlayOpacity— dim layer customizationholePadding— extra padding (dp) around the highlighted targetholeBorderColor,holeBorderWidth,holeBorderRadius— outline around the holedismissOnPress,dismissOnTargetPress— fine-grained dismiss controlanimationDuration— fade duration (0 disables)
Fixed
- Android coordinate misalignment on Expo edge-to-edge — Modal now opens with
statusBarTranslucentandnavigationBarTranslucent, plus+StatusBar.currentHeightis added to the measured Y so target and overlay share one coordinate space. - Boundary flip now preserves horizontal alignment (
topRight→ flips down but stays right-aligned). - Offset is clamped before the screen-bounds check, so it can no longer push the tooltip off-screen.
targetReftyped asReact.RefObject<View | null>instead ofRefObject<any>.- Dropped legacy
findNodeHandlein favor ofref.measureInWindow— Fabric-safe. - No more
setStateafter unmount.
Verified
- Android: 17/17 targets pixel-perfect via agent-device sweep on Pixel 10 Pro emulator.
- iOS: 17/17 targets pixel-perfect on iPhone 17 Pro simulator (SDK 55).
- 30 Jest tests covering position math + component behavior.
Other
- File renamed
HighLightToolTip.tsx→HighlightToolTip.tsx(case-correct). - Library + example bumped to React Native 0.83.6, React 19.2, Expo SDK 55.
- Exported
computeTooltipPositionhelper for advanced consumers.
See CHANGELOG.md for the full list.