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

@talltydev/file-upload

v0.4.0

Published

Production-ready S3 file upload utilities and components for Tallty Kit

Downloads

53

Readme

@talltydev/file-upload

Production-ready S3 file upload utilities and components for Tallty Kit.

Features

Core Upload

  • Multipart Upload: Automatic multipart for large files (>50MB)
  • Progress Tracking: Real-time upload progress with Uppy
  • Resumable: Support for resuming interrupted uploads
  • Type-Safe: Full TypeScript support with Zod validation

File Preview Components

Enhanced file preview with built-in content viewers for common file types.

Basic Preview (Always Available)

  • Images with aspect ratio preservation
  • Videos with play/pause controls
  • Audio players
  • Document icons with metadata

Content Preview (Optional Dependencies)

PDF Preview

pnpm add react-pdf pdfjs-dist
  • Full PDF viewer with pagination
  • Zoom controls (50% - 300%)
  • Text layer and annotation support
  • 20MB file size limit (configurable)

Code Preview

pnpm add highlight.js highlightjs-line-numbers.js
  • Syntax highlighting for 30+ languages
  • Line numbers
  • Copy to clipboard
  • Auto-detect language from extension
  • 1MB file size limit (configurable)

Markdown Preview

pnpm add react-markdown remark-gfm rehype-highlight rehype-sanitize
  • GitHub Flavored Markdown (GFM)
  • Code syntax highlighting
  • XSS protection
  • External links open in new tab
  • 5MB file size limit (configurable)

Usage

Basic Preview (No Dependencies)

import { FilePreview } from '@talltydev/file-upload'

<FilePreview
  fileRef={fileRef}
  size="medium"
  showMetadata={true}
  showDownload={true}
  showView={true}
/>

Content Preview (Requires Dependencies)

// Add CSS import in your app/globals.css
@import 'highlight.js/styles/github-dark.css';

// Enable content preview
<FilePreview
  fileRef={fileRef}
  showContent={true}  // Enable inline preview for supported types
  previewMode="auto"  // 'auto' | 'metadata' | 'content'
/>

Props

interface FilePreviewProps {
  fileRef: FileRef
  size?: 'small' | 'medium' | 'large'
  showMetadata?: boolean
  showDownload?: boolean
  showView?: boolean
  showRemove?: boolean
  onRemove?: (fileRef: FileRef) => void
  onDownload?: (fileRef: FileRef) => void
  onView?: (fileRef: FileRef) => void
  className?: string
  loading?: boolean

  // Content preview options (requires optional dependencies)
  showContent?: boolean  // Enable inline content preview
  previewMode?: 'auto' | 'metadata' | 'content'
}

Supported File Types

Image: jpg, png, gif, webp, svg Video: mp4, webm, ogg Audio: mp3, wav, ogg Document: pdf, doc, docx, xls, xlsx, ppt, pptx

Content Preview:

  • PDF: .pdf
  • Markdown: .md
  • Code: .js, .ts, .py, .java, .go, .rs, and 20+ more

Configuration

PDF Preview Size Limit

<PDFPreview
  fileRef={fileRef}
  maxSizeBytes={30 * 1024 * 1024}  // 30MB
/>

Code Preview Configuration

<CodePreview
  fileRef={fileRef}
  language="typescript"  // Override auto-detection
  maxSizeBytes={2 * 1024 * 1024}  // 2MB
  showLineNumbers={true}
/>

Markdown Preview Configuration

<MarkdownPreview
  fileRef={fileRef}
  maxSizeBytes={10 * 1024 * 1024}  // 10MB
/>

Installation

pnpm add @talltydev/file-upload

Optional Preview Dependencies

Only install what you need:

# For PDF preview
pnpm add react-pdf pdfjs-dist

# For code highlighting
pnpm add highlight.js highlightjs-line-numbers.js

# For Markdown rendering
pnpm add react-markdown remark-gfm rehype-highlight rehype-sanitize

License

MIT