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

nav-wright

v0.1.1

Published

SVG renderer for vessels, navigation lights, and rules-of-the-road scenes — profile, bearing and plan views

Readme

nav-wright

SVG renderer for vessels, navigation lights, and rules-of-the-road scenes: profile, bearing (lights-only, seen from a relative bearing θ), and plan (arc sector) views. Sibling of coast-wright and wire-wright.

Status: extracted, unreleased. The renderer was built inside searoom and moved here by searoom#18; searoom becomes its first consumer once that issue's step 4 lands. Design: searoom/docs/design.md.

Install

npm install github:mark-brannan/nav-wright#<sha>

Not on npm. react is a peer dependency; colregs-engine comes along as a dependency, for the FactRecord / LightsData / Arc types the renderer is written against.

What it exports

| Export | What it is | | --- | --- | | selectHull(facts), allHulls, Hull, HullSpec, PX, PZ | the curated base-drawing set, and the profile-view coordinate mapping | | placeLights(displayLights, hull, facts, lightsData)PlacedLight[] | a lawful display turned into lights positioned on a hull | | bearingInArc(bearing, arc) | is a light visible from this relative bearing — the exam-faithful part; arcs come verbatim from the data, not from geometry invented here | | ProfileView, PlanView, BearingView, bearingLabel | the three scene components | | Glow, lightFill, LIGHT_COLORS, polar, sectorPath | the SVG primitives the views are built from | | SceneLabels, defaultSceneLabels, Aspect | the label interface |

placeLights takes its light data as an argument rather than importing it, so nothing here depends on a particular app's copy of the COLREGS data.

Labels

The scene components carry no i18n framework. Each takes an optional labels: SceneLabels prop and falls back to defaultSceneLabels, which is English. A consumer with a real catalog builds a SceneLabels from it and passes it down — that is how searoom wires its react-intl messages in. test/labels.test.tsx renders all three components with no provider around them, which is what keeps this seam honest.

Styling

The components emit their own class names and read colors from CSS custom properties; they ship no stylesheet. A consumer must define:

  • properties: --hull-fill, --hull-stroke, --rig-stroke, --sea-night, --sea-below, --waterline, --grid-line, --accent-soft
  • classes: scene-svg, scene-svg-black, plan-svg, bearing-view, bearing-empty, theta-control, theta-readout, and light-flash for the flashing-light animation

The lights themselves are literal colors, not properties, so they are correct whatever the consumer does. Everything else — hull, sea, rigging, grid — is undefined until these are set. Whether nav-wright should ship a default stylesheet is an open question, not a decision.

Development

npm ci
npm run typecheck
npm test
npm run build

npm run build is what emits dist/ with types; it also runs on install from a git ref via prepare, which is how the github: pin above works.