npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sagepilot-ai/react-native-camera-addon

v0.3.6

Published

Optional CameraX attachment picker addon for the Sagepilot React Native SDK

Readme

@sagepilot-ai/react-native-camera-addon

Optional Android CameraX attachment picker for @sagepilot-ai/react-native-sdk.

Install this package only when you want Sagepilot to provide an in-app Android CameraX picker. Apps that do not install it can keep the smaller base SDK install.

This is not a replacement SDK. Your app always installs and configures @sagepilot-ai/react-native-sdk first, then adds this package only when it wants the optional CameraX picker.

Peer Dependency

This addon declares @sagepilot-ai/react-native-sdk as a peer dependency. It imports the base SDK's file-picker types, shared file limits, and Android camera-permission helper, but the host app must still install the base SDK directly so there is only one configured SagepilotChat instance.

For this release line, use:

npm install @sagepilot-ai/react-native-sdk@latest react-native-webview
npm install @sagepilot-ai/react-native-camera-addon@latest

Install Flow

Install the base SDK and WebView:

npm install @sagepilot-ai/react-native-sdk@latest react-native-webview

Then install the CameraX addon:

npm install @sagepilot-ai/react-native-camera-addon@latest

If your app already has the base SDK installed, run only the addon install command.

After adding this package, run a clean native Android rebuild. A Metro reload is not enough because React Native autolinking registers the new native module only during the native build:

cd android && ./gradlew clean
cd .. && npx react-native run-android

Expo apps should run a fresh native build, for example:

npx expo run:android

On device, verify the chat attachment menu shows the native addon sources: Take photo, Choose from gallery, and Browse files.

If the app was only Metro-reloaded after installing the addon, NativeModules.SagepilotInAppCamera is not registered yet. In that state createSagepilotCameraXFilePicker() returns undefined, the base SDK receives no filePicker, and the widget falls back to the WebView file input.

Configure

import { SagepilotChat } from "@sagepilot-ai/react-native-sdk";
import { createSagepilotCameraXFilePicker } from "@sagepilot-ai/react-native-camera-addon";

await SagepilotChat.configure({
  key: "workspace_id:channel_id",
  filePicker: createSagepilotCameraXFilePicker()
});

Mount SagepilotChatProvider from the base SDK once near the top of your app. The addon only supplies the filePicker adapter used by SagepilotChat.configure.

createSagepilotCameraXFilePicker() returns undefined outside Android, so cross-platform apps can call it from shared configuration code. On Android it exposes the CameraX camera source plus the addon native module's photo-library and document sources when they are linked in the host app.

iOS does not use this Android addon. If you pass createSagepilotCameraXFilePicker() from shared setup code on iOS, it returns undefined and the hosted widget uses WKWebView's native file input sheet unless your app provides a separate iOS picker through the base SDK.

Options

createSagepilotCameraXFilePicker({
  imageMaxDimension: 1920,
  imageQuality: 0.8,
  imageMaxFileSizeBytes: 15 * 1024 * 1024,
  documentMaxFileSizeBytes: 20 * 1024 * 1024,
  includeLibrary: true,
  includeDocuments: true
});