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

@found-in-space/shadowline

v0.1.0-alpha.1

Published

Renderer-independent eclipse geometry and portable GIS exporters for Found in Space

Readme

@found-in-space/shadowline

Find solar eclipses, calculate the Moon's shadow on Earth, and export the result as map data. This is the main library behind the Found in Space eclipse tracker.

[!WARNING] Very early alpha. APIs, results, and file formats are likely to change. Use this release for learning and experimentation, not yet as a stable production dependency.

Install

Node.js 22 or later is required.

npm install @found-in-space/shadowline@alpha @found-in-space/shadowline-astronomy-engine@alpha

The astronomy package finds eclipses and supplies the Sun and Moon positions used by the geometry package.

Example

import { EclipseEngine, toGeoJson } from "@found-in-space/shadowline";
import { astronomyEngineCapabilities } from "@found-in-space/shadowline-astronomy-engine";

const engine = new EclipseEngine(astronomyEngineCapabilities());
const event = engine.events({
  startUtc: "2026-08-01T00:00:00Z",
  endUtc: "2026-09-01T00:00:00Z",
})[0];

if (!event) throw new Error("No eclipse found in that date range.");

const scene = engine.calculateEvent(event, {
  centralPath: true,
  globalVisibility: true,
  instantaneousAtUtc: [event.peakUtc],
});
const geoJson = toGeoJson(scene);

console.log(event);
console.log(`Map features: ${geoJson.features.length}`);

Save this as eclipse.mjs and run node eclipse.mjs.

Common tasks

Ask what happens at one location:

const local = engine.localCircumstances(event, {
  latitudeDeg: 41.8167,
  longitudeDeg: -3.185,
});

Prepare the result for a Web Mercator map:

const webMap = toGeoJson(scene, {
  seam: "split",
  latitudeClipDeg: 85.051128,
});

See examples/leaflet-scenes.ts for a Leaflet example.

API

| Method | Result | |---|---| | events(range) | Eclipses between two dates | | eventsForYear(year) | Eclipses in one year | | localEclipses(observer, range) | Eclipses visible from one place | | localCircumstances(event, observer) | Local begin, peak, and end times | | calculateEvent(event, options) | Complete path, visibility area, and selected shadow | | calculateInstantaneousShadow(event, utc) | Shadow at one instant |

calculateEvent() returns an EclipseScene. Its physical surface positions are WGS 84 Earth-fixed Cartesian coordinates in kilometres, with longitude and latitude included for convenience. toGeoJson, GeoJsonExporter, and KmlExporter create portable output.

Applications can supply another EclipseCapabilities implementation instead of the Astronomy Engine adapter. Geometry requires an EarthFixedEphemeris; eclipse search and observer circumstances are optional.

Accuracy

Shadowline is a planning-grade, smooth-limb model. It excludes local terrain horizons and lunar limb topography. See the project's accuracy and validation notes before using results where seconds or kilometres matter.

Licence

MIT