{"_id":"@abeman/react-native-nitro-webbrowser","_rev":"3-cd3b65bae76fe77d730e00be128a1270","name":"@abeman/react-native-nitro-webbrowser","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@abeman/react-native-nitro-webbrowser","version":"0.1.0","keywords":["react-native","ios","android"],"author":{"url":"https://github.com/huynq1175","name":"huynq2","email":"99823149+huynq1175@users.noreply.github.com"},"license":"MIT","_id":"@abeman/react-native-nitro-webbrowser@0.1.0","maintainers":[{"name":"huynq1175","email":"huynq1175@gmail.com"}],"homepage":"https://github.com/huynq1175/react-native-nitro-webbrowser#readme","bugs":{"url":"https://github.com/huynq1175/react-native-nitro-webbrowser/issues"},"dist":{"shasum":"594c081000b6f1c1ab38c5f51919f367f3b0705e","tarball":"https://registry.npmjs.org/@abeman/react-native-nitro-webbrowser/-/react-native-nitro-webbrowser-0.1.0.tgz","fileCount":79,"integrity":"sha512-n7Xppk3Z+UPJMVl7euYiWln1PH2AjYR9F5DwBOFnNRDR2M4W2Tz0PXXXf2Z2PPvgf7qWw6Wc+ETR/KNHNSOn/g==","signatures":[{"sig":"MEUCIC3769jTYTynL278aJjoU3n9hHvL22oLV9PIor4CDb7VAiEA0hlQOP+2OGIMQA0ZhY+/uZwRDOP6HxqAF0XAmV0N/qo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":245015},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"main":"./lib/module/index.js","types":"./lib/typescript/src/index.d.ts","exports":{".":{"types":"./lib/typescript/src/index.d.ts","source":"./src/index.tsx","default":"./lib/module/index.js"},"./package.json":"./package.json"},"gitHead":"dbb38fe4a8b56876a1e32066466500f5842d3a1a","scripts":{"lint":"eslint \"**/*.{js,ts,tsx}\"","test":"jest","clean":"del-cli android/build example/android/build example/android/app/build example/ios/build lib","example":"yarn workspace react-native-nitro-webbrowser-example","prepare":"bob build","release":"release-it --only-version","nitrogen":"nitrogen","typecheck":"tsc"},"_npmUser":{"name":"huynq1175","email":"huynq1175@gmail.com"},"prettier":{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"tagName":"v${version}","commitMessage":"chore: release ${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":{"name":"angular"}}}},"repository":{"url":"git+https://github.com/huynq1175/react-native-nitro-webbrowser.git","type":"git"},"workspaces":["example"],"_npmVersion":"11.11.1","description":"InAppBrowser for React Native","directories":{},"_nodeVersion":"24.8.0","publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"packageManager":"yarn@4.11.0","devDependencies":{"jest":"^29.7.0","react":"19.2.0","turbo":"^2.5.6","eslint":"^9.35.0","del-cli":"^6.0.0","lefthook":"^2.0.3","nitrogen":"^0.35.2","prettier":"^2.8.8","@eslint/js":"^9.35.0","commitlint":"^19.8.1","release-it":"^19.0.4","typescript":"^5.9.2","@types/jest":"^29.5.14","@types/react":"^19.2.0","react-native":"0.83.0","@eslint/compat":"^1.3.2","@eslint/eslintrc":"^3.3.1","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","react-native-builder-bob":"^0.40.13","@react-native/babel-preset":"0.83.0","react-native-nitro-modules":"^0.35.2","@react-native/eslint-config":"0.83.0","@commitlint/config-conventional":"^19.8.1","@release-it/conventional-changelog":"^10.0.1"},"peerDependencies":{"react":"*","react-native":"*","react-native-nitro-modules":"^0.35.2"},"_npmOperationalInternal":{"tmp":"tmp/react-native-nitro-webbrowser_0.1.0_1773688364794_0.18575277865946505","host":"s3://npm-registry-packages-npm-production"},"react-native-builder-bob":{"output":"lib","source":"src","targets":[["custom",{"clean":"nitrogen/","script":"nitrogen"}],["module",{"esm":true}],["typescript",{"project":"tsconfig.build.json"}]]},"create-react-native-library":{"type":"nitro-module","tools":["jest","lefthook","release-it","eslint"],"version":"0.57.2","languages":"kotlin-swift"}},"0.1.1":{"name":"@abeman/react-native-nitro-webbrowser","version":"0.1.1","keywords":["react-native","ios","android"],"author":{"url":"https://github.com/huynq1175","name":"huynq2","email":"99823149+huynq1175@users.noreply.github.com"},"license":"MIT","_id":"@abeman/react-native-nitro-webbrowser@0.1.1","maintainers":[{"name":"huynq1175","email":"huynq1175@gmail.com"}],"homepage":"https://github.com/huynq1175/react-native-nitro-webbrowser#readme","bugs":{"url":"https://github.com/huynq1175/react-native-nitro-webbrowser/issues"},"dist":{"shasum":"825e7671ab1a063acb1140ed6c49f3d2a3e72815","tarball":"https://registry.npmjs.org/@abeman/react-native-nitro-webbrowser/-/react-native-nitro-webbrowser-0.1.1.tgz","fileCount":79,"integrity":"sha512-tfJds4zytJUOV1c8rUOgtKQQbR1LIgvbOYi0Dj3Uq8ZeNYAaV4/B8mEhgRhj5XsP5KRXfzG0Or7UlW4AKOdo5A==","signatures":[{"sig":"MEUCIQC60NTjAMI6C6MJJYhDZK8i3J2LbVBZJZIHkIQ+Qt9QVQIgUBkKQL7x1QxDgVRp7n9bB2nGr7vYzsHU8K4IMbIysYs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":245015},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"main":"./lib/module/index.js","types":"./lib/typescript/src/index.d.ts","exports":{".":{"types":"./lib/typescript/src/index.d.ts","source":"./src/index.tsx","default":"./lib/module/index.js"},"./package.json":"./package.json"},"gitHead":"dbb38fe4a8b56876a1e32066466500f5842d3a1a","scripts":{"lint":"eslint \"**/*.{js,ts,tsx}\"","test":"jest","clean":"del-cli android/build example/android/build example/android/app/build example/ios/build lib","example":"yarn workspace react-native-nitro-webbrowser-example","prepare":"bob build","release":"release-it --only-version","nitrogen":"nitrogen","typecheck":"tsc"},"_npmUser":{"name":"huynq1175","email":"huynq1175@gmail.com"},"prettier":{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"tagName":"v${version}","commitMessage":"chore: release ${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":{"name":"angular"}}}},"repository":{"url":"git+https://github.com/huynq1175/react-native-nitro-webbrowser.git","type":"git"},"workspaces":["example"],"_npmVersion":"11.11.1","description":"InAppBrowser for React Native","directories":{},"_nodeVersion":"24.8.0","publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"packageManager":"yarn@4.11.0","devDependencies":{"jest":"^29.7.0","react":"19.2.0","turbo":"^2.5.6","eslint":"^9.35.0","del-cli":"^6.0.0","lefthook":"^2.0.3","nitrogen":"^0.35.2","prettier":"^2.8.8","@eslint/js":"^9.35.0","commitlint":"^19.8.1","release-it":"^19.0.4","typescript":"^5.9.2","@types/jest":"^29.5.14","@types/react":"^19.2.0","react-native":"0.83.0","@eslint/compat":"^1.3.2","@eslint/eslintrc":"^3.3.1","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","react-native-builder-bob":"^0.40.13","@react-native/babel-preset":"0.83.0","react-native-nitro-modules":"^0.35.2","@react-native/eslint-config":"0.83.0","@commitlint/config-conventional":"^19.8.1","@release-it/conventional-changelog":"^10.0.1"},"peerDependencies":{"react":"*","react-native":"*","react-native-nitro-modules":"^0.35.2"},"_npmOperationalInternal":{"tmp":"tmp/react-native-nitro-webbrowser_0.1.1_1773688701151_0.43229488187670917","host":"s3://npm-registry-packages-npm-production"},"react-native-builder-bob":{"output":"lib","source":"src","targets":[["custom",{"clean":"nitrogen/","script":"nitrogen"}],["module",{"esm":true}],["typescript",{"project":"tsconfig.build.json"}]]},"create-react-native-library":{"type":"nitro-module","tools":["jest","lefthook","release-it","eslint"],"version":"0.57.2","languages":"kotlin-swift"}},"0.1.2":{"name":"@abeman/react-native-nitro-webbrowser","version":"0.1.2","description":"InAppBrowser for React Native","main":"./lib/module/index.js","types":"./lib/typescript/src/index.d.ts","exports":{".":{"source":"./src/index.tsx","types":"./lib/typescript/src/index.d.ts","default":"./lib/module/index.js"},"./package.json":"./package.json"},"scripts":{"example":"yarn workspace react-native-nitro-webbrowser-example","clean":"del-cli android/build example/android/build example/android/app/build example/ios/build lib","prepare":"bob build","nitrogen":"nitrogen","typecheck":"tsc","test":"jest","release":"release-it --only-version","lint":"eslint \"**/*.{js,ts,tsx}\""},"keywords":["react-native","ios","android"],"repository":{"type":"git","url":"git+https://github.com/huynq1175/react-native-nitro-webbrowser.git"},"author":{"name":"huynq2","email":"99823149+huynq1175@users.noreply.github.com","url":"https://github.com/huynq1175"},"license":"MIT","bugs":{"url":"https://github.com/huynq1175/react-native-nitro-webbrowser/issues"},"homepage":"https://github.com/huynq1175/react-native-nitro-webbrowser#readme","publishConfig":{"registry":"https://registry.npmjs.org/"},"devDependencies":{"@commitlint/config-conventional":"^19.8.1","@eslint/compat":"^1.3.2","@eslint/eslintrc":"^3.3.1","@eslint/js":"^9.35.0","@react-native/babel-preset":"0.83.0","@react-native/eslint-config":"0.83.0","@release-it/conventional-changelog":"^10.0.1","@types/jest":"^29.5.14","@types/react":"^19.2.0","commitlint":"^19.8.1","del-cli":"^6.0.0","eslint":"^9.35.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","jest":"^29.7.0","lefthook":"^2.0.3","nitrogen":"^0.35.2","prettier":"^2.8.8","react":"19.2.0","react-native":"0.83.0","react-native-builder-bob":"^0.40.13","react-native-nitro-modules":"^0.35.2","release-it":"^19.0.4","turbo":"^2.5.6","typescript":"^5.9.2"},"peerDependencies":{"react":"*","react-native":"*","react-native-nitro-modules":"^0.35.2"},"workspaces":["example"],"packageManager":"yarn@4.11.0","react-native-builder-bob":{"source":"src","output":"lib","targets":[["custom",{"script":"nitrogen","clean":"nitrogen/"}],["module",{"esm":true}],["typescript",{"project":"tsconfig.build.json"}]]},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"commitMessage":"chore: release ${version}","tagName":"v${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":{"name":"angular"}}}},"prettier":{"quoteProps":"consistent","singleQuote":true,"tabWidth":2,"trailingComma":"es5","useTabs":false},"create-react-native-library":{"type":"nitro-module","languages":"kotlin-swift","tools":["jest","lefthook","release-it","eslint"],"version":"0.57.2"},"gitHead":"ac9f3345780c25b31ef37098af62fc19a51c33ef","_id":"@abeman/react-native-nitro-webbrowser@0.1.2","_nodeVersion":"24.8.0","_npmVersion":"11.11.1","dist":{"integrity":"sha512-SefOGTnzB6CoBcBXQ1vsrCcNmVkIVyBxZChPpFVOAyQwbwdPAMM8QzltEg51xDqunFYnlbMc57gRoGEpvXotNw==","shasum":"424a7d0dfa62e943bdd19797470932da5564ff7c","tarball":"https://registry.npmjs.org/@abeman/react-native-nitro-webbrowser/-/react-native-nitro-webbrowser-0.1.2.tgz","fileCount":79,"unpackedSize":243618,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHD0VhEokc0GhXkfPIdolXrCLkmdPttaLR8F/oRza5+1AiAgMzBcXNxHsYMLiWkrCkhSBHycfJefvd9Bty/nh0YIrA=="}]},"_npmUser":{"name":"huynq1175","email":"huynq1175@gmail.com"},"directories":{},"maintainers":[{"name":"huynq1175","email":"huynq1175@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-native-nitro-webbrowser_0.1.2_1774531037335_0.23508318415660345"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-16T19:12:44.657Z","modified":"2026-03-26T13:17:17.639Z","0.1.0":"2026-03-16T19:12:44.970Z","0.1.1":"2026-03-16T19:18:21.296Z","0.1.2":"2026-03-26T13:17:17.492Z"},"bugs":{"url":"https://github.com/huynq1175/react-native-nitro-webbrowser/issues"},"author":{"name":"huynq2","email":"99823149+huynq1175@users.noreply.github.com","url":"https://github.com/huynq1175"},"license":"MIT","homepage":"https://github.com/huynq1175/react-native-nitro-webbrowser#readme","keywords":["react-native","ios","android"],"repository":{"type":"git","url":"git+https://github.com/huynq1175/react-native-nitro-webbrowser.git"},"description":"InAppBrowser for React Native","maintainers":[{"name":"huynq1175","email":"huynq1175@gmail.com"}],"readme":"# @abeman/react-native-nitro-webbrowser\n\nIn-app browser for React Native, powered by [Nitro Modules](https://nitro.margelo.com/).\n\n- **iOS**: `SFSafariViewController` + `ASWebAuthenticationSession`\n- **Android**: Chrome Custom Tabs\n\n## Installation\n\n```sh\nnpm install @abeman/react-native-nitro-webbrowser react-native-nitro-modules\n```\n\n> `react-native-nitro-modules` is a required peer dependency.\n\n### iOS\n\n```sh\ncd ios && pod install\n```\n\n### Android\n\nNo additional setup required.\n\n## Usage\n\n### Open a URL in the in-app browser\n\n```tsx\nimport InAppBrowser from '@abeman/react-native-nitro-webbrowser';\n\nconst result = await InAppBrowser.open('https://example.com', {\n  // iOS\n  dismissButtonStyle: 'done',\n  preferredBarTintColor: '#453AA4',\n  preferredControlTintColor: '#FFFFFF',\n  readerMode: false,\n  animated: true,\n  modalEnabled: true,\n  modalPresentationStyle: 'fullScreen',\n  enableBarCollapsing: false,\n  // Android\n  showTitle: true,\n  toolbarColor: '#453AA4',\n  enableUrlBarHiding: true,\n  enableDefaultShare: true,\n  forceCloseOnRedirection: false,\n  hasBackButton: true,\n  showInRecents: false,\n  includeReferrer: true,\n});\n\n// result.type: 'cancel' | 'dismiss'\n```\n\n### Authentication (OAuth)\n\n```tsx\nimport InAppBrowser from '@abeman/react-native-nitro-webbrowser';\n\nconst result = await InAppBrowser.openAuth(\n  'https://auth.example.com/authorize?client_id=xxx&redirect_uri=myapp://callback',\n  'myapp://callback',\n  {\n    ephemeralWebSession: true, // iOS: don't share cookies with Safari\n    // Android: show as bottom sheet (Partial Custom Tabs, Chrome 107+)\n    bottomSheet: true,\n    bottomSheetHeightRatio: 0.9,\n    showTitle: true,\n    toolbarColor: '#453AA4',\n  }\n);\n\nif (result.type === 'success') {\n  console.log('Redirect URL:', result.url);\n} else {\n  console.log('Cancelled');\n}\n```\n\nOn Android with `bottomSheet: true`, the auth browser appears as a bottom sheet overlay (similar to iOS `ASWebAuthenticationSession`). Share, bookmarks, and download buttons are automatically hidden for a clean auth experience. Falls back to full-screen if the browser doesn't support Partial Custom Tabs.\n\n### Close the browser programmatically\n\n```tsx\nInAppBrowser.close();     // Close in-app browser\nInAppBrowser.closeAuth(); // Close auth session\n```\n\n### Check availability\n\n```tsx\nconst available = await InAppBrowser.isAvailable();\n```\n\n### Pre-warm the browser (Android only)\n\n```tsx\n// Bind to Chrome Custom Tabs service for faster launch\nawait InAppBrowser.warmup();\n\n// Hint a likely URL for pre-fetching\nInAppBrowser.mayLaunchUrl('https://example.com', [\n  'https://example.com/about',\n]);\n```\n\n## API\n\n### `InAppBrowser.open(url, options?)`\n\nOpens a URL in the in-app browser. Returns `Promise<BrowserResult>`.\n\n### `InAppBrowser.openAuth(url, redirectUrl, options?)`\n\nOpens an authentication session. Returns `Promise<BrowserResult>` with the redirect URL on success.\n\n- **iOS**: Uses `ASWebAuthenticationSession` (native bottom sheet)\n- **Android**: Uses Chrome Custom Tabs. Set `bottomSheet: true` for a bottom sheet presentation (Partial Custom Tabs, requires Chrome 107+). Automatically hides share, bookmarks, and download buttons for a minimal auth UI. Falls back to full-screen on unsupported browsers.\n\n### `InAppBrowser.close()`\n\nDismisses the currently open in-app browser.\n\n### `InAppBrowser.closeAuth()`\n\nCancels the current authentication session.\n\n### `InAppBrowser.isAvailable()`\n\nReturns `Promise<boolean>` indicating if the in-app browser is available.\n\n### `InAppBrowser.warmup()`\n\nAndroid only. Binds to the Chrome Custom Tabs service for faster browser launch. Returns `Promise<boolean>`.\n\n### `InAppBrowser.mayLaunchUrl(mostLikelyUrl, otherUrls?)`\n\nAndroid only. Hints the browser to pre-fetch the given URL.\n\n## Options\n\n### iOS Options\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `dismissButtonStyle` | `'done' \\| 'close' \\| 'cancel'` | Style of the dismiss button |\n| `preferredBarTintColor` | `string` | Hex color for the toolbar background |\n| `preferredControlTintColor` | `string` | Hex color for toolbar controls |\n| `readerMode` | `boolean` | Enter Reader mode if available |\n| `animated` | `boolean` | Animate presentation/dismissal (default: `true`) |\n| `modalEnabled` | `boolean` | Present in a modal navigation controller |\n| `modalPresentationStyle` | `string` | Modal presentation style |\n| `modalTransitionStyle` | `string` | Modal transition animation |\n| `enableBarCollapsing` | `boolean` | Allow toolbar to collapse on scroll |\n| `ephemeralWebSession` | `boolean` | Don't share cookies with Safari (auth only) |\n| `formSheetPreferredContentSize` | `{ width, height }` | Size for form sheet presentation |\n\n### Android Options\n\n| Option | Type | Description |\n|--------|------|-------------|\n| `showTitle` | `boolean` | Show the page title in the toolbar |\n| `toolbarColor` | `string` | Hex color for the toolbar |\n| `secondaryToolbarColor` | `string` | Hex color for the secondary toolbar |\n| `navigationBarColor` | `string` | Hex color for the navigation bar |\n| `navigationBarDividerColor` | `string` | Hex color for navigation bar divider |\n| `enableUrlBarHiding` | `boolean` | Hide URL bar on scroll |\n| `enableDefaultShare` | `boolean` | Add default share action |\n| `forceCloseOnRedirection` | `boolean` | Close on external redirect |\n| `hasBackButton` | `boolean` | Show a back arrow instead of X |\n| `browserPackage` | `string` | Package name of the browser to use |\n| `showInRecents` | `boolean` | Show in recent apps |\n| `includeReferrer` | `boolean` | Include referrer header |\n| `headers` | `Record<string, string>` | Custom HTTP headers |\n| `animations` | `BrowserAnimations` | Custom enter/exit animations |\n| `bottomSheet` | `boolean` | Show as bottom sheet (Partial Custom Tabs, auth only) |\n| `bottomSheetHeightRatio` | `number` | Bottom sheet height ratio 0-1 (default: `0.7`) |\n\n### BrowserResult\n\n```typescript\ninterface BrowserResult {\n  type: string;    // 'success' | 'cancel' | 'dismiss'\n  message?: string;\n  url?: string;    // Redirect URL (auth only)\n}\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}