-
Notifications
You must be signed in to change notification settings - Fork 5
Releases: pablogdcr/react-native-data-detector
Releases · pablogdcr/react-native-data-detector
v0.3.0
Changes
New hooks, model status queries, and Android language selection.
- Added
useDataDetector(imperative) anduseDetectedEntities(reactive, as-you-type) hooks — both track model readiness and auto-download the model on Android. - Added
getModelStatus()andisModelReady()to query whether a language model is available (iOS always reports ready). - Added Android multi-language support —
detect,prepareModel,getModelStatus,isModelReady, and the hooks accept alanguageoption selecting one of 15 ML Kit models (defaults to'en'; ignored on iOS). - Renamed
downloadModel()toprepareModel()(now accepts a{ language }option);downloadModel()remains as a deprecated alias. - Corrected the minimum Android SDK to API 26 — required by ML Kit Entity Extraction (
entity-extraction:16.0.0-beta6). - Fixed iOS to return UTF-16 offsets so
start/endalign with JavaScript string indices. - Fixed Android to read the library version from
package.json.
Full Changelog: v0.2.0...v0.3.0
Assets 2
v0.2.0
Changes
Package renamed and repository moved to personal ownership.
- npm package renamed from
@themobilefirstcompany/react-native-data-detectortoreact-native-data-detector(unscoped) - Repository moved to
github.com/pablogdcr/react-native-data-detector - Updated README, npm badge, example app, and package metadata for the new name and ownership
Migrating
npm uninstall @themobilefirstcompany/react-native-data-detector npm install react-native-data-detector
Update imports:
- import { detect } from '@themobilefirstcompany/react-native-data-detector'; + import { detect } from 'react-native-data-detector';
The old scoped package is deprecated and will not receive further updates.
Full Changelog: v0.1.1...v0.2.0
Assets 2
v0.1.1
Changes
- Bumped ML Kit Entity Extraction to
16.0.0-beta6 - Added GitHub issue/PR templates, CI workflow, and contributing guide
- Track
package-lock.json; ignore.gradle
Full Changelog: v0.1.0...v0.1.1
Published to npm as
@themobilefirstcompany/react-native-data-detector@0.1.1(now deprecated — see v0.2.0).
Assets 2
v0.1.0
Initial Release
Cross-platform text data detection for React Native using NSDataDetector (iOS) and ML Kit Entity Extraction (Android).
Features
detect(text, options?)— Detect phone numbers, URLs, emails, addresses, and dates with structured resultsdownloadModel()— Pre-download the ML Kit model on Android for offline use- ISO 8601 date output on both platforms
- Filter by entity type
Example App
An example Expo app is included in the example/ directory demonstrating all features.
Platform Support
- iOS 15.1+ (NSDataDetector)
- Android API 24+ (ML Kit Entity Extraction)
- Expo SDK 50+ or bare React Native with
expo-modules-core