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

@trokster/l-cursor

v0.0.2

Published

Infinite-zoom radial fractal visualization for Svelte 5: one generic engine with referential rebasing, level-of-detail, and live HTML portals.

Readme

Infinite Zoom

A semantic-zoom visualization library: one generic engine driving a radial fractal you can fall into forever. As you zoom in, the camera re-bases its referential (see THEORY.md) so the scale number never escapes a ~3-decade band and floating-point precision never rots. Off-screen and sub-pixel nodes are never drawn — render cost is O(visible), independent of tree size.

Demo (npm run dev)

/zoom/radial — children ring inside each node; click to dive, wheel/pinch to zoom, drag to pan, zoom out to rise. Each node carries a live HTML portal (a real component sized in screen pixels) that swaps detail as you approach.

Architecture

  • core/engine.js — generic engine: bounded-scale camera, referential rebasing (the infinite-zoom trick), level-of-detail with ghost child previews, sibling context, and viewport culling. Display-agnostic.
  • core/{camera,rebase,interaction,tree}.js — affine camera, the pixel-exact rebase math, pointer/pinch/wheel + inertia, shared tree indexing.
  • layouts/radial.jslayout(index, rootId, opts) returning { nodes, order }. The engine is generic over any self-similar, child-contained layout; radial is the one shipped here.
  • viz/ZoomScene.svelte — the renderer: world-static SVG under a single animated transform, spring fly-to navigation, breadcrumbs, enter-fades, and resolution-adaptive HTML portals (live components inside each node's core).
import { ZoomScene, indexTree, radialLayout } from '@trokster/l-cursor';
// <ZoomScene index={indexTree(data)} layout={radialLayout} nodeStyle="rings" />

The math (rebase derivation, LOD, culling, self-similarity) lives in THEORY.md. A copy-paste integration guide for LLMs/agents is in LLM.md. Both ship in the npm tarball.

Integration notes (custom layouts / renderers)

  • Layout grammar (THEORY.md §7.1): the 0.5R core belongs to the portal; children live in the annulus outside it, fully inside the parent, and small (reference: ring 0.75R, child ≤ 0.15R). The engine doesn't enforce this — set config.validate: true (or call the exported validateLayout) in dev to catch violations loudly instead of shipping a subtly broken scene.
  • Portal sizing: portals must stay inside 0.5R; the inscribed square's side is 0.5·√2·ext ≈ 0.707·ext of the node's on-screen half-extent.
  • No svelte/store import: camera.state implements the store contract locally, so environments that externalize svelte/* through an import map need no extra mapping.

Develop

npm install
npm run dev          # SvelteKit playground at /zoom/radial
npm run test:unit -- --run   # Vitest (engine + component, headless)
npm run lint         # Prettier + ESLint
npm run build        # package the library to dist/ (svelte-package + publint)

The package is Svelte 5 (runes) and SVG-only — no canvas, WebGL, or runtime dependencies. import from @trokster/l-cursor in any SvelteKit/Vite project.