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

@rajeev02/camera

v0.2.1

Published

Advanced camera capture & photo editing — filters, crop, adjust, stickers, text, drawing, beauty mode, HDR, panorama

Readme

@rajeev02/camera

npm version license

Camera capture & photo editor with HDR, 9 capture modes, 24 built-in filters, and a full editing suite — crop, adjust, text, stickers, drawing, and beauty mode.

Part of Rajeev SDK — cross-platform infrastructure libraries for building apps that work everywhere.

Why use this?

  • 9 capture modes — Photo, video, portrait, night, panorama, slow-mo, time-lapse, burst, document scan
  • 24 built-in filters — Categorized: Natural, Warm, Cool, B&W, Cinematic, Vintage — with real-time preview
  • Full photo editor — Crop (free/square/16:9/4:3), adjust (brightness, contrast, saturation, etc.), rotate, flip
  • Text & stickers — Add text overlays with fonts, colors, alignment. Add sticker packs.
  • Beauty mode — Skin smoothing, face brightening, eye enhancement — subtle defaults
  • HDR & zoom — Hardware HDR, digital zoom up to 10x, front/back camera switching
  • Event-driven — Subscribe to capture events, recording progress, focus changes

⚠️ Important: Native Camera Library Required

This package provides the camera state management, filter presets, and photo editing pipeline. It does NOT directly access camera hardware or render a camera preview.

You need a native camera library to pair with:

| Environment | Recommended library | | ----------------- | ---------------------------------------------------------------------------------------------- | | Expo | expo-camera | | Bare React Native | react-native-vision-camera | | Web | MediaDevices API |

Permissions required:

  • iOS: Add NSCameraUsageDescription and NSMicrophoneUsageDescription to Info.plist
  • Android: Add CAMERA and RECORD_AUDIO permissions to AndroidManifest.xml

What this library provides: Camera settings state machine, 24 photo filter presets, photo editor (crop/adjust/text/stickers/blur/frames), and edit history (undo/redo). Your native camera library handles the actual hardware interaction — this library manages everything around it.

Platform Support

| Platform | Engine | Status | | ---------- | ---------- | ------ | | iOS 16+ | TypeScript | ✅ | | Android 7+ | TypeScript | ✅ |

Installation

npm install @rajeev02/camera

Peer Dependencies

  • react >= 18.3.0
  • react-native >= 0.84.0 (optional)

Quick Start

Camera Capture

import { CameraController } from "@rajeev02/camera";

const camera = new CameraController({
  facing: "back",
  flash: "auto",
  mode: "photo",
  hdr: true,
});

// Listen for capture events
camera.on((event) => {
  if (event.type === "media_captured") {
    console.log("Photo saved:", event.media.uri);
  }
});

// Switch to portrait mode and capture
camera.setMode("portrait");
camera.setZoom(1.5);
camera.capturePhoto();

// Video recording
camera.setMode("video");
camera.startRecording();
// ... later
camera.stopRecording(); // → triggers "recording_stopped" event

Photo Editor

import { PhotoEditorController, getBuiltInFilters } from "@rajeev02/camera";

const editor = new PhotoEditorController("file:///photo.jpg");

// Apply a filter
editor.applyFilter("golden_hour");

// Adjust
editor.setAdjustment("brightness", 15);
editor.setAdjustment("contrast", 10);
editor.setAdjustment("saturation", -5);

// Crop to 16:9
editor.setCropAspectRatio("16:9");

// Add text overlay
editor.addText({
  text: "Summer 2026 ☀️",
  fontFamily: "Helvetica",
  fontSize: 24,
  color: "#FFFFFF",
  bold: true,
  alignment: "center",
  position: { x: 0.5, y: 0.9 },
});

// Get edit state for export
const state = editor.getEditState();

Filters

import { getBuiltInFilters, getFiltersByCategory } from "@rajeev02/camera";

const allFilters = getBuiltInFilters(); // 24 filters
const warmFilters = getFiltersByCategory("warm");
// → ["golden_hour", "sunset_glow", "amber", "warm_vintage"]

Available Filters

| Category | Filters | | --------- | ---------------------------------------------- | | Natural | vivid, soft_light, clarity, natural_hdr | | Warm | golden_hour, sunset_glow, amber, warm_vintage | | Cool | arctic, ocean_blue, moonlight, cool_breeze | | B&W | noir, silver, high_contrast_bw, film_grain | | Cinematic | teal_orange, blockbuster, moody, anamorphic | | Vintage | polaroid, retro_80s, faded_film, cross_process |

API Reference

CameraController

| Method | Description | | ------------------ | --------------------- | | capturePhoto() | Capture a photo | | startRecording() | Start video recording | | stopRecording() | Stop video recording | | setMode(mode) | Set capture mode | | setFlash(mode) | Set flash mode | | setZoom(level) | Set zoom level | | flipCamera() | Toggle front/back | | on(callback) | Subscribe to events |

PhotoEditorController

| Method | Description | | ---------------------------- | ------------------------------- | | applyFilter(id) | Apply a filter preset | | setAdjustment(type, value) | Adjust brightness/contrast/etc. | | setCropAspectRatio(ratio) | Set crop ratio | | addText(config) | Add text overlay | | addSticker(config) | Add sticker | | rotate(degrees) | Rotate image | | flip(axis) | Flip horizontal/vertical | | undo() / redo() | Undo/redo edits | | getEditState() | Get full edit state |

Full Documentation

📖 Complete API docs with all modes, filters, and editor features

License

MIT © 2026 Rajeev Kumar Joshi