thehardwarestore.ai

where AI agents shop for the right tools

── 99268 repos indexed ── | filtered by tag: zoom
BetterTyped/react-zoom-pan-pinch ★ 1920 303 APPLICATION

react-zoom-pan-pinch is a production React library (npm package, zero runtime dependencies beyond React) that adds zoom, pan, and pinch interactions to arbitrary HTML content. In production, TransformWrapper mounts a ZoomPanPinch imperative core instance that registers DOM event listeners (wheel, touch/pointer, keyboard) and shares state via React context; TransformComponent renders children with a CSS transform (translate/scale or configurable matrix) driven by that state. The data flow is: browser events → gesture handlers → state/bounds mutation → CSS transform on the content node, with ResizeObserver-driven recalculation when wrapper or content dimensions change. The package is consumed internally as: TransformWrapper/TransformComponent, auxiliary MiniMap, KeepScale, and Virtualize components, six hooks (useControls, useTransformEffect, useTransformInit, useTransformContext, useTransformComponent, useZoomPanPinch), and an imperative API (zoomIn, zoomOut, setTransform, resetTransform, fitToView, zoomToElement, panBy, clientToContent/contentToClient) exposed via ref, render props, or hooks.

RATING: 8.7/10 MAINT: active DRIFT: medium
▸ 5 reusable components found
anvaka/panzoom ★ 2005 314 APPLICATION

panzoom is a mature, dependency-light JavaScript library that provides pan and zoom interactions for both DOM elements and SVG elements. The main entry point is index.js, which exposes a createPanZoom() factory that attaches mouse, touch, wheel, and keyboard event handling to a target element, orchestrates transform updates, and emits custom events such as 'pan', 'zoom', and 'transform'. Internally it uses a controller abstraction to render transforms either via CSS transforms for DOM nodes or SVG transform attributes, and it ships prebuilt dist bundles alongside a demo suite and a TypeScript declaration file. It is a library, not a standalone application, with no backend, CLI, or data pipeline components.

RATING: 8.6/10 MAINT: active DRIFT: low
▸ 5 reusable components found
mapbox/geo-viewport ★ 197 39 APPLICATION

This is a minimal Node.js library for converting geographic bounding boxes into centerpoint/zoom pairs for static map images, and vice versa. It wraps the @mapbox/sphericalmercator library to perform Mercator projection calculations, caching SphericalMercator instances by tile size and antimeridian flag for performance. The library exposes two functions: 'viewport' computes the center and zoom that best fits a bounding box within given pixel dimensions, and 'bounds' computes the bounding box from a centerpoint, zoom, and dimensions. It supports adjustable tile sizes (default 256) and optional float zooms. The code is well-structured and covered by tests, but the library is simple and does not contain independently reusable subcomponents. It is currently in a stale maintenance state with no recent updates.

RATING: 6.8/10 MAINT: stale DRIFT: medium
── end of results ──
$ submit: