{"_id":"@ayberkmogol/react-native-haptic-library","_rev":"5-7ca3ee5b1d686dba478a85f16430146b","name":"@ayberkmogol/react-native-haptic-library","dist-tags":{"latest":"0.1.6"},"versions":{"0.1.2":{"name":"@ayberkmogol/react-native-haptic-library","version":"0.1.2","keywords":["react-native","haptics","haptic-feedback","ios","android","corehaptics"],"author":{"name":"Ayberk Mogol"},"license":"MIT","_id":"@ayberkmogol/react-native-haptic-library@0.1.2","maintainers":[{"name":"ayberkmogol","email":"ayberk.m@yandex.com"}],"homepage":"https://github.com/ayberkmogol/react-native-haptic-library#readme","bugs":{"url":"https://github.com/ayberkmogol/react-native-haptic-library/issues"},"dist":{"shasum":"0dd0e882c3815a7845e327447b1dd3fcd10c343c","tarball":"https://registry.npmjs.org/@ayberkmogol/react-native-haptic-library/-/react-native-haptic-library-0.1.2.tgz","fileCount":71,"integrity":"sha512-ZIHtYG0sSsHPJYq3+9ISx4mCCViXT55/r5DcwlUkM72IkYqDHtMSszCOHi/NCPWIZ3pX9mzoG3WkE41osq8V6g==","signatures":[{"sig":"MEYCIQC/m09SFq9X/wc0nCQKuySKSWsBn6/C8YJ0gfWgTIFJqAIhAOWH2GfZExKv4vie8z2ociuzzO05edOjXiS+cEuf28Oy","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5943059},"main":"./lib/module/index.js","types":"./lib/typescript/src/index.d.ts","source":"./src/index.ts","gitHead":"08760a4aeb89dc6bcb86839849f12f238b3b63f5","scripts":{"lint":"eslint \"src/**/*.{ts,tsx}\"","test":"jest","build":"bob build","prepack":"bob build","typecheck":"tsc --noEmit","example:ios":"npm --prefix example run ios","example:test":"npm --prefix example run test -- --runInBand","example:start":"npm --prefix example run start","example:android":"npm --prefix example run android","example:typecheck":"npm --prefix example run typecheck","generate:visualizations":"node scripts/generate-visualizations.mjs","example:android:assemble":"npm --prefix example run android:assemble","generate:android-patterns":"node scripts/generate-android-patterns.mjs"},"_npmUser":{"name":"ayberkmogol","email":"ayberk.m@yandex.com"},"prettier":{"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git+https://github.com/ayberkmogol/react-native-haptic-library.git","type":"git"},"_npmVersion":"10.9.2","description":"A React Native haptic feedback library with typed presets and native iOS and Android playback.","directories":{},"sideEffects":false,"_nodeVersion":"23.7.0","codegenConfig":{"name":"RNHapticLibrarySpec","type":"modules","android":{"javaPackageName":"com.ayberkmogol.hapticlibrary"},"jsSrcsDir":"src"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","react":"^19.1.0","eslint":"^9.35.0","prettier":"^3.6.2","typescript":"^5.9.2","@types/jest":"^29.5.14","@types/react":"^19.1.0","react-native":"^0.81.1","react-native-builder-bob":"^0.40.13","@typescript-eslint/parser":"^8.61.1","@react-native/babel-preset":"^0.81.1","@react-native-community/cli":"^20.0.1","@react-native/eslint-config":"^0.81.1"},"peerDependencies":{"react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-haptic-library_0.1.2_1782133628985_0.8990234253686948","host":"s3://npm-registry-packages-npm-production"},"react-native-builder-bob":{"output":"lib","source":"src","targets":[["module",{"esm":true}],["typescript",{"project":"tsconfig.build.json"}]]},"create-react-native-library":{"type":"turbo-module","languages":"kotlin-objc"}},"0.1.3":{"name":"@ayberkmogol/react-native-haptic-library","version":"0.1.3","keywords":["react-native","haptics","haptic-feedback","ios","android","corehaptics"],"author":{"name":"Ayberk Mogol"},"license":"MIT","_id":"@ayberkmogol/react-native-haptic-library@0.1.3","maintainers":[{"name":"ayberkmogol","email":"ayberk.m@yandex.com"}],"homepage":"https://github.com/ayberkmogol/react-native-haptic-library#readme","bugs":{"url":"https://github.com/ayberkmogol/react-native-haptic-library/issues"},"dist":{"shasum":"3f5a0946f56d4e0c79ba3503e951e69fc21f77f1","tarball":"https://registry.npmjs.org/@ayberkmogol/react-native-haptic-library/-/react-native-haptic-library-0.1.3.tgz","fileCount":71,"integrity":"sha512-Rn38GBfaJvDY5tbcJG2o7JMPq5RMurQXtDs2KXjqeVMIKpE5hO22a39HOPdbQvdHyCbmjigcwQ5AY/Li0oKHwg==","signatures":[{"sig":"MEUCIQCr2bk7H8eBX+5w+D92ql84uQc/EW6gegHSFdPAyUn5zAIgbGh+AjUMWht9RfoeQbSF3p2qUQxGi67y5IexOdwlAXs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5949176},"main":"./lib/module/index.js","types":"./lib/typescript/src/index.d.ts","source":"./src/index.ts","gitHead":"0827fd346c6054493115727080c5d3784b2912bd","scripts":{"lint":"eslint \"src/**/*.{ts,tsx}\"","test":"jest","build":"bob build","prepack":"bob build","typecheck":"tsc --noEmit","example:ios":"npm --prefix example run ios","example:test":"npm --prefix example run test -- --runInBand","example:start":"npm --prefix example run start","example:android":"npm --prefix example run android","example:typecheck":"npm --prefix example run typecheck","generate:visualizations":"node scripts/generate-visualizations.mjs","example:android:assemble":"npm --prefix example run android:assemble","generate:android-patterns":"node scripts/generate-android-patterns.mjs"},"_npmUser":{"name":"ayberkmogol","email":"ayberk.m@yandex.com"},"prettier":{"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git+https://github.com/ayberkmogol/react-native-haptic-library.git","type":"git"},"_npmVersion":"10.9.2","description":"A React Native haptic feedback library with typed presets and native iOS and Android playback.","directories":{},"sideEffects":false,"_nodeVersion":"23.7.0","codegenConfig":{"name":"RNHapticLibrarySpec","type":"modules","android":{"javaPackageName":"com.ayberkmogol.hapticlibrary"},"jsSrcsDir":"src"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","react":"^19.1.0","eslint":"^9.35.0","prettier":"^3.6.2","typescript":"^5.9.2","@types/jest":"^29.5.14","@types/react":"^19.1.0","react-native":"^0.81.1","react-native-builder-bob":"^0.40.13","@typescript-eslint/parser":"^8.61.1","@react-native/babel-preset":"^0.81.1","@react-native-community/cli":"^20.0.1","@react-native/eslint-config":"^0.81.1"},"peerDependencies":{"react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-haptic-library_0.1.3_1782214326337_0.8215234554173361","host":"s3://npm-registry-packages-npm-production"},"react-native-builder-bob":{"output":"lib","source":"src","targets":[["module",{"esm":true}],["typescript",{"project":"tsconfig.build.json"}]]},"create-react-native-library":{"type":"turbo-module","languages":"kotlin-objc"}},"0.1.4":{"name":"@ayberkmogol/react-native-haptic-library","version":"0.1.4","keywords":["react-native","haptics","haptic-feedback","ios","android","corehaptics"],"author":{"name":"Ayberk Mogol"},"license":"MIT","_id":"@ayberkmogol/react-native-haptic-library@0.1.4","maintainers":[{"name":"ayberkmogol","email":"ayberk.m@yandex.com"}],"homepage":"https://github.com/ayberkmogol/react-native-haptic-library#readme","bugs":{"url":"https://github.com/ayberkmogol/react-native-haptic-library/issues"},"dist":{"shasum":"75033c25094a54f520511ae4ca2d0de98f6de162","tarball":"https://registry.npmjs.org/@ayberkmogol/react-native-haptic-library/-/react-native-haptic-library-0.1.4.tgz","fileCount":71,"integrity":"sha512-SDwcSo90/dovgO0WDT4S3dM54Fypo/jNZWnAyRmi/d/eNzd3P0nk3yHVQhbYN22sqVcsMe4HV1H6AydSXXgQgw==","signatures":[{"sig":"MEUCIHtK33T6pgBk9Ntq2vtdSllTZxdr3oVekBt1gxLGEkq8AiEA8/NLiRkJpTrlZRFtHoCbOGX5pzRa04byu6sbZGQG/PE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5948919},"main":"./lib/module/index.js","types":"./lib/typescript/src/index.d.ts","source":"./src/index.ts","gitHead":"2081627c1658f7da27733cc07c7f8902cb98549f","scripts":{"lint":"eslint \"src/**/*.{ts,tsx}\"","test":"jest","build":"bob build","prepack":"bob build","typecheck":"tsc --noEmit","example:ios":"npm --prefix example run ios","example:test":"npm --prefix example run test -- --runInBand","example:start":"npm --prefix example run start","example:android":"npm --prefix example run android","example:typecheck":"npm --prefix example run typecheck","generate:visualizations":"node scripts/generate-visualizations.mjs","example:android:assemble":"npm --prefix example run android:assemble","generate:android-patterns":"node scripts/generate-android-patterns.mjs"},"_npmUser":{"name":"ayberkmogol","email":"ayberk.m@yandex.com"},"prettier":{"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git+https://github.com/ayberkmogol/react-native-haptic-library.git","type":"git"},"_npmVersion":"10.9.2","description":"A React Native haptic feedback library with typed presets and native iOS and Android playback.","directories":{},"sideEffects":false,"_nodeVersion":"23.7.0","codegenConfig":{"name":"RNHapticLibrarySpec","type":"modules","android":{"javaPackageName":"com.ayberkmogol.hapticlibrary"},"jsSrcsDir":"src"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","react":"^19.1.0","eslint":"^9.35.0","prettier":"^3.6.2","typescript":"^5.9.2","@types/jest":"^29.5.14","@types/react":"^19.1.0","react-native":"^0.81.1","react-native-builder-bob":"^0.40.13","@typescript-eslint/parser":"^8.61.1","@react-native/babel-preset":"^0.81.1","@react-native-community/cli":"^20.0.1","@react-native/eslint-config":"^0.81.1"},"peerDependencies":{"react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-haptic-library_0.1.4_1782214621533_0.3156439590469178","host":"s3://npm-registry-packages-npm-production"},"react-native-builder-bob":{"output":"lib","source":"src","targets":[["module",{"esm":true}],["typescript",{"project":"tsconfig.build.json"}]]},"create-react-native-library":{"type":"turbo-module","languages":"kotlin-objc"}},"0.1.5":{"name":"@ayberkmogol/react-native-haptic-library","version":"0.1.5","keywords":["react-native","haptics","haptic-feedback","ios","android","corehaptics"],"author":{"name":"Ayberk Mogol"},"license":"MIT","_id":"@ayberkmogol/react-native-haptic-library@0.1.5","maintainers":[{"name":"ayberkmogol","email":"ayberk.m@yandex.com"}],"homepage":"https://github.com/ayberkmogol/react-native-haptic-library#readme","bugs":{"url":"https://github.com/ayberkmogol/react-native-haptic-library/issues"},"dist":{"shasum":"a46bf71da5e0a09940efea821ebda024cd4d99c4","tarball":"https://registry.npmjs.org/@ayberkmogol/react-native-haptic-library/-/react-native-haptic-library-0.1.5.tgz","fileCount":71,"integrity":"sha512-6QWCpXk+p06bZfLmcYsik0uCXS4TlB/3/M+yceH4Nf6JLDyhcokD7YLRHYTTN7EkO5ZGIc/pvMgv21R3Mcb10Q==","signatures":[{"sig":"MEUCICRPi/AD1qWXTz3cZB6OWLWJqB+FZwZY294x9DdYTYjIAiEAqbFlO2mc/AORJDSNJVmIAGefjB9QGezcjq92vjKDn9k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5951932},"main":"./lib/module/index.js","types":"./lib/typescript/src/index.d.ts","source":"./src/index.ts","gitHead":"717c01f7a7ecb3013a97a3682cd4628283b8a155","scripts":{"lint":"eslint \"src/**/*.{ts,tsx}\"","test":"jest","build":"bob build","prepack":"bob build","typecheck":"tsc --noEmit","example:ios":"npm --prefix example run ios","example:test":"npm --prefix example run test -- --runInBand","example:start":"npm --prefix example run start","example:android":"npm --prefix example run android","example:typecheck":"npm --prefix example run typecheck","generate:visualizations":"node scripts/generate-visualizations.mjs","example:android:assemble":"npm --prefix example run android:assemble","generate:android-patterns":"node scripts/generate-android-patterns.mjs"},"_npmUser":{"name":"ayberkmogol","email":"ayberk.m@yandex.com"},"prettier":{"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git+https://github.com/ayberkmogol/react-native-haptic-library.git","type":"git"},"_npmVersion":"10.9.2","description":"A React Native haptic feedback library with typed presets and native iOS and Android playback.","directories":{},"sideEffects":false,"_nodeVersion":"23.7.0","codegenConfig":{"name":"RNHapticLibrarySpec","type":"modules","android":{"javaPackageName":"com.ayberkmogol.hapticlibrary"},"jsSrcsDir":"src"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","react":"^19.1.0","eslint":"^9.35.0","prettier":"^3.6.2","typescript":"^5.9.2","@types/jest":"^29.5.14","@types/react":"^19.1.0","react-native":"^0.81.1","react-native-builder-bob":"^0.40.13","@typescript-eslint/parser":"^8.61.1","@react-native/babel-preset":"^0.81.1","@react-native-community/cli":"^20.0.1","@react-native/eslint-config":"^0.81.1"},"peerDependencies":{"react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-haptic-library_0.1.5_1782217215287_0.0073163321141860305","host":"s3://npm-registry-packages-npm-production"},"react-native-builder-bob":{"output":"lib","source":"src","targets":[["module",{"esm":true}],["typescript",{"project":"tsconfig.build.json"}]]},"create-react-native-library":{"type":"turbo-module","languages":"kotlin-objc"}},"0.1.6":{"name":"@ayberkmogol/react-native-haptic-library","version":"0.1.6","description":"A React Native haptic feedback library with typed presets and native iOS and Android playback.","main":"./lib/module/index.js","types":"./lib/typescript/src/index.d.ts","source":"./src/index.ts","scripts":{"build":"bob build","example:android":"npm --prefix example run android","example:android:assemble":"npm --prefix example run android:assemble","example:ios":"npm --prefix example run ios","example:start":"npm --prefix example run start","example:test":"npm --prefix example run test -- --runInBand","example:typecheck":"npm --prefix example run typecheck","generate:android-patterns":"node scripts/generate-android-patterns.mjs","generate:visualizations":"node scripts/generate-visualizations.mjs","typecheck":"tsc --noEmit","test":"jest","lint":"eslint \"src/**/*.{ts,tsx}\"","web:build":"npm --prefix web run build","web:dev":"npm --prefix web run dev","web:preview":"npm --prefix web run preview","prepack":"bob build"},"keywords":["react-native","haptics","haptic-feedback","ios","android","corehaptics"],"repository":{"type":"git","url":"git+https://github.com/ayberkmogol/react-native-haptic-library.git"},"homepage":"https://github.com/ayberkmogol/react-native-haptic-library#readme","bugs":{"url":"https://github.com/ayberkmogol/react-native-haptic-library/issues"},"author":{"name":"Ayberk Mogol"},"license":"MIT","publishConfig":{"registry":"https://registry.npmjs.org/"},"sideEffects":false,"peerDependencies":{"react":"*","react-native":"*"},"devDependencies":{"@react-native-community/cli":"^20.0.1","@react-native/babel-preset":"^0.81.1","@react-native/eslint-config":"^0.81.1","@types/jest":"^29.5.14","@types/react":"^19.1.0","@typescript-eslint/parser":"^8.61.1","eslint":"^9.35.0","jest":"^29.7.0","prettier":"^3.6.2","react":"^19.1.0","react-native":"^0.81.1","react-native-builder-bob":"^0.40.13","typescript":"^5.9.2"},"prettier":{"singleQuote":true,"trailingComma":"es5"},"react-native-builder-bob":{"source":"src","output":"lib","targets":[["module",{"esm":true}],["typescript",{"project":"tsconfig.build.json"}]]},"codegenConfig":{"name":"RNHapticLibrarySpec","type":"modules","jsSrcsDir":"src","android":{"javaPackageName":"com.ayberkmogol.hapticlibrary"}},"create-react-native-library":{"type":"turbo-module","languages":"kotlin-objc"},"_id":"@ayberkmogol/react-native-haptic-library@0.1.6","_integrity":"sha512-Ldc8mh28q0ciM3OopAyYuNlD/9JBSb1H1WO6b7G2FyiG/ZTI8hkT17K1wZCOAxtoM/UZSTkCGWT6NsMKVp84SA==","_resolved":"/Users/ayberkmogol/Projects/react-native-haptic-library/ayberkmogol-react-native-haptic-library-0.1.6.tgz","_from":"file:ayberkmogol-react-native-haptic-library-0.1.6.tgz","_nodeVersion":"23.7.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-Ldc8mh28q0ciM3OopAyYuNlD/9JBSb1H1WO6b7G2FyiG/ZTI8hkT17K1wZCOAxtoM/UZSTkCGWT6NsMKVp84SA==","shasum":"f0867bcee7f652d063be1ba1d6fb1effc392bb01","tarball":"https://registry.npmjs.org/@ayberkmogol/react-native-haptic-library/-/react-native-haptic-library-0.1.6.tgz","fileCount":71,"unpackedSize":5938019,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD8BQBEpMUPez0dl1FRHFR7tEqhG5gEAuXDRDzfBCPYLgIhAJFrR+Yb97HfvsFYhif+ka59YnDrOE82n8a+8gsFXROU"}]},"_npmUser":{"name":"ayberkmogol","email":"ayberk.m@yandex.com"},"directories":{},"maintainers":[{"name":"ayberkmogol","email":"ayberk.m@yandex.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-native-haptic-library_0.1.6_1782388499582_0.9222225573282568"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-22T13:07:08.874Z","modified":"2026-06-25T11:55:00.037Z","0.1.2":"2026-06-22T13:07:09.276Z","0.1.3":"2026-06-23T11:32:06.564Z","0.1.4":"2026-06-23T11:37:01.781Z","0.1.5":"2026-06-23T12:20:15.552Z","0.1.6":"2026-06-25T11:54:59.845Z"},"bugs":{"url":"https://github.com/ayberkmogol/react-native-haptic-library/issues"},"author":{"name":"Ayberk Mogol"},"license":"MIT","homepage":"https://github.com/ayberkmogol/react-native-haptic-library#readme","keywords":["react-native","haptics","haptic-feedback","ios","android","corehaptics"],"repository":{"type":"git","url":"git+https://github.com/ayberkmogol/react-native-haptic-library.git"},"description":"A React Native haptic feedback library with typed presets and native iOS and Android playback.","maintainers":[{"name":"ayberkmogol","email":"ayberk.m@yandex.com"}],"readme":"![@ayberkmogol/react-native-haptic-library header](./assets/haptic-header.png)\n\n# @ayberkmogol/react-native-haptic-library\n\nA React Native haptic feedback library with a typed preset API, native iOS playback, and Android vibration mappings.\n\n## Web Playground\n\nExplore the preset catalog and audition haptic patterns in your browser:\n\n[https://ayberkmogol.dev/react-native-haptic-library/](https://ayberkmogol.dev/react-native-haptic-library/)\n\n## Installation\n\n```sh\nnpm install @ayberkmogol/react-native-haptic-library\ncd ios && pod install\n```\n\nReact Native autolinking loads the iOS pod and Android Gradle library automatically. Android consumers must allow the merged `android.permission.VIBRATE` permission, which this library declares in its manifest.\n\n## Quick Start\n\n```ts\nimport { Haptics, Presets } from '@ayberkmogol/react-native-haptic-library';\n\nPresets.success();\nPresets.coinCollectSingle({ duration: 0.15 });\nHaptics.play('explosionMassive', { duration: 1.8 });\n\nHaptics.prepare(['success', 'coinCollectSingle']);\nHaptics.setEnabled(true);\nHaptics.stop();\n```\n\n## Haptic Categories\n\nThe library ships 225 named presets grouped by interaction intent. Use the `Presets` helpers for autocomplete, or pass the same names to `Haptics.play(name)`.\n\n| Category | Count | Example presets |\n| --- | ---: | --- |\n| Basic Haptics | 9 | `selection`, `soft`, `rigid`, `light`, `medium`, `heavy`, `success`, `error`, `warning` |\n| Gaming | 25 | `lightningStrikeQuick`, `coinCollectSingle`, `coinCollectJackpot`, `swordSlashHeavy`, `explosionMassive`, `machineGun` |\n| Educational | 77 | `achievementUnlocked`, `levelUp`, `starRating`, `badgeEarned`, `perfectScore`, `lessonComplete` |\n| UI Interaction | 41 | `doubleTapLike`, `messageSent`, `notificationPop`, `pullToRefresh`, `toggleSwitch`, `swipeAction` |\n| Special Effect | 12 | `magicSparkle`, `waterDrop`, `specialEarthquake`, `laserBeam`, `typewriter`, `heartbeat` |\n| Wellness | 8 | `breathingGuide`, `calmPulse`, `meditationBell`, `relaxationWave`, `zenNotification`, `timeWarning30s` |\n| Productivity | 5 | `timerComplete`, `taskCheck`, `focusStart`, `breakReminder`, `productivityFocusReminder` |\n| Finance | 4 | `paymentSuccess`, `paymentProcessing`, `transactionAlert`, `receiptSaved` |\n| Emotional | 5 | `excitementBuild`, `disappointment`, `surprise`, `joy`, `anticipation` |\n| Intense Gamification | 33 | `fireBurst`, `iceShard`, `earthquakeRumble`, `windTornado`, `thunderStorm`, `meteorImpact` |\n| Ratings & Feedback | 4 | `starRating1`, `starRating3`, `starRating5`, `socialNotification` |\n| Tools & Writing | 2 | `pencilWrite`, `eraserUse` |\n\n```ts\nPresets.paymentSuccess();\nPresets.pullToRefresh();\nPresets.fireBurst({ duration: 0.9 });\nHaptics.play('breathingGuide');\n```\n\nUse `patternNames` and `patternMetadata` to inspect the full generated catalog at runtime.\n\n## Example App\n\nThe repository includes a runnable React Native app in `example/` for trying every generated pattern on device.\n\n```sh\nnpm install\nnpm --prefix example install\n\nnpm run example:start\nnpm run example:android\n# or\nnpm run example:ios\n```\n\nThe Android Gradle wrapper lives in the example app, which is the normal place for a React Native library consumer build:\n\n```sh\nnpm run example:android:assemble\n# equivalent to: cd example/android && ./gradlew :app:assembleDebug\n```\n\nThe example app starts with haptic categories. Open a category to search, prepare, and play the presets in that group.\n\n## API\n\n- `Haptics.play(name, options?)` plays any generated preset by name.\n- `Haptics.prepare(name | name[])` preloads native resources where supported.\n- `Haptics.stop()` stops active haptics and releases prepared state.\n- `Haptics.setEnabled(enabled)` toggles playback.\n- `Haptics.isSupported()` reports whether native haptic playback is available.\n- `Presets.<patternName>(options?)` exposes generated functions for every bundled haptic preset.\n\n## Platform Notes\n\n### iOS\n\nThe iOS implementation routes preset names to native UIKit feedback generators and CoreHaptics patterns on iOS 13+.\n\n### Android\n\nAndroid playback requires Android 8.0 / API 26 or newer and uses `VibrationEffect` equivalents for the bundled preset catalog. The engine prefers predefined system effects for basic feedback, primitive composition on Android 11+ when possible, amplitude waveforms on Android 8+, and timing waveforms as a final fallback. Device hardware variance means Android output can vary across manufacturers and OS versions.\n\nThis package intentionally does not ship a root-level Gradle wrapper. The Android library is compiled by the consuming React Native application; this repo's `example/android/gradlew` is provided for local development and verification.\n\n## Development\n\nAndroid preset data is generated from the vendored iOS CoreHaptics catalog:\n\n```sh\nnpm run generate:android-patterns\n```\n\nThe command compiles the Swift pattern catalog, exports each CoreHaptics pattern, writes `generated/core-haptics.patterns.json`, and refreshes the Android Kotlin catalog.\n\n## Credits\n\nMany of the bundled haptic preset ideas and CoreHaptics pattern definitions were adapted from [SwiftfulHaptics](https://github.com/SwiftfulThinking/SwiftfulHaptics) by SwiftfulThinking, which is available under the MIT license.\n","readmeFilename":"README.md"}