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

@ibanzajoe/uploader

v0.2.0

Published

Drop-in React file-upload picker (drag-and-drop + dialog), headless upload client, in-picker image editor, and transform-URL builder.

Readme

@uploader/react

React picker and headless upload client for the Uploader platform.

Installation

npm install @uploader/react

Quick start — React picker

import { PickerOverlay } from '@uploader/react'
import '@uploader/react/styles.css'

function App() {
  return (
    <PickerOverlay
      apiKey="pk_your_api_key"
      apiUrl="https://your-api.example.com"
      onUploadDone={(res) => console.log(res.filesUploaded)}
    />
  )
}

Headless client (no React required)

import { UploaderClient } from '@uploader/react/core'

const client = new UploaderClient({
  apiKey: 'pk_your_api_key',
  apiUrl: 'https://your-api.example.com',
})

const result = await client.upload(file, { filename: 'photo.jpg' })
console.log(result.handle)   // e.g. "abc123def456"
console.log(result.url)      // public delivery URL

Large files (≥ 6 MiB) are automatically uploaded via multipart; smaller files use a single PUT.

Components

<PickerOverlay>

Full-screen modal picker with drag-and-drop, progress, and error UI.

| Prop | Type | Description | |---|---|---| | apiKey | string | API key (pk_…) | | apiUrl | string | Base URL of the API server | | onUploadDone | (res: PickerResponse) => void | Called when all uploads complete | | accept | string | MIME type filter (e.g. image/*) | | maxFiles | number | Maximum number of files selectable at once |

<DropPane>

Inline drop zone that can be embedded in a form.

usePicker(options)

Headless hook — returns { open, uploading, files, errors }.

Camera capture

Both <PickerOverlay> and <DropPane> can capture a photo straight from the device camera. A Take photo button appears next to Browse files whenever the browser supports getUserMedia and the picker accepts images. The capture flows through the exact same pipeline as a dropped or browsed file — it lands in the queue with a preview, can be cropped/rotated in the in-picker editor, and is then uploaded normally.

<PickerOverlay
  apikey="pk_…"
  open={open}
  onClose={() => setOpen(false)}
  pickerOptions={{
    accept: ['image/*'],
    // Sources offered to the user. Omit to offer everything supported.
    fromSources: ['local_file_system', 'camera'],
    // 'user' = front/selfie (mirrored, default) · 'environment' = rear camera
    cameraFacingMode: 'environment',
  }}
/>

Notes:

  • The camera requires a secure context (HTTPS or localhost) and user permission. Permission/no-camera errors are surfaced inline with a retry.
  • Pass fromSources: ['local_file_system'] to hide the camera even where it is supported; omit fromSources to offer it by default.
  • The <CameraCapture> component and the isCameraSupported() / shouldOfferCamera() helpers are exported for fully custom pickers.

Signed policies

When the account has requireSigned enabled, pass a signed policy on upload:

const result = await client.upload(file, {
  policy: 'base64-encoded-policy',
  signature: 'hmac-sha256-hex-signature',
})

Build signed policies via the admin dashboard (/api-keys → "Build signed policy") or directly via POST /api/admin/api-keys/:id/sign.

Building

npm run build   # outputs to dist/ (ESM + CJS + types)