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

@jg-stevan/scanner-ui

v0.1.0

Published

Capa React de la base de digitalización: visor táctil ZoomableVisor (pinza anclada, pan con clamps, doble toque, rueda, comparación por pulsación larga, swipe de carrusel y modo card). Componentes puros props+callbacks. Browser-only (consume vía bundler).

Readme

@jg-stevan/scanner-ui

Capa React de la base de digitalización (compañera de @jg-stevan/scanner-core).

Contrato

SOLO componentes React puros (props + callbacks). Prohibido: lógica de motor (vive en @jg-stevan/scanner-core), fetch de red, stores globales y NADA electoral. Este paquete es la BASE replicable a otros proyectos.

Instalación

bun add @jg-stevan/scanner-ui

Peers: react ^19 · framer-motion ^12.

Uso — ZoomableVisor

Visor táctil de UNA página (máquina de gestos probada en táctil real: pinza anclada al punto · pan con clamps contra el stage · doble toque 2.5× · rueda no-pasiva en escritorio · comparación por pulsación larga 350 ms).

import { ZoomableVisor } from "@jg-stevan/scanner-ui";

// Fullscreen (modal): cierre por tap-fuera inmediato o tap limpio a 1×
// diferido 320 ms (no mata el doble toque); Esc lo gestiona el consumidor.
<ZoomableVisor src={url} alt="documento" compareSrc={original} onClose={cerrar} />

// Inline en tarjeta (card): techo 3×, sin chrome (chip/hint/comparación),
// tap a 1× abre fullscreen (diferido), tap ampliado vuelve a 1×.
<ZoomableVisor mode="card" src={url} alt="documento" onOpenFullscreen={abrir} />

// Opcional — carrusel del consumidor (swipe horizontal a 1× con goma
// elástica en los bordes; la navegación la decide el consumidor):
<ZoomableVisor
  src={url}
  alt="documento"
  carousel={{ canPrev, canNext, onPrev, onNext }}
/>

Props (ZoomableVisorProps)

| Prop | Tipo | Default | Descripción | |---|---|---|---| | src | string | — | Imagen visible (procesada). El zoom se reinicia al cambiar. | | alt | string | — | Texto alternativo. | | compareSrc? | string | — | Original — solo si difiere de src (comparación por pulsación larga). Se ignora en modo card. | | mode? | "modal" \| "card" | "modal" | modal: fullscreen (stage absolute inset-0 dentro del contenedor posicionado del consumidor). card: inline en tarjeta (stage relative h-full w-full con clip de esquinas). | | onOpenFullscreen? | () => void | — | Solo card: tap simple a 1× (diferido 320 ms). | | onClose? | () => void | — | Solo modal: cierre (tap-fuera / tap limpio a 1×). | | carousel? | { canPrev; canNext; onPrev; onNext } | — | Swipe horizontal a 1× (distancia mínima 56 px, goma elástica 72 px). | | showHint? | boolean | true | Hint didáctico (6 s por montaje). El visor lo oculta al ampliar. |

Notas de integración

  • Tailwind v4: las clases del componente se generan en el build del consumidor. Si el paquete viene de node_modules, añádelo como source: @source "../../node_modules/@jg-stevan/scanner-ui"; en tu CSS de entrada.
  • El componente es "use client" (compatible Next.js App Router).