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

@mugglemagic/stargate-loader

v0.1.0

Published

A Stargate-style dialing loading animation as a zero-dependency Web Component. Fan project — not affiliated with MGM/Amazon.

Readme

@mugglemagic/stargate-loader

A Stargate-style dialing sequence as a loading animation. Zero-dependency Web Component: the inner ring spins, seven of the gate's nine chevrons encode Earth's canonical address, the point of origin locks under the master chevron, and the wormhole opens.

This is a fan project, not affiliated with or endorsed by MGM, Amazon, or the Stargate franchise. See Licensing.

Install

npm install @mugglemagic/stargate-loader

Or use it straight from a CDN:

<script type="module" src="https://unpkg.com/@mugglemagic/stargate-loader"></script>

Quick start

<script type="module">
  import '@mugglemagic/stargate-loader';
</script>

<!-- Indeterminate loader: dials forever -->
<gate-loader size="320"></gate-loader>

Driving it with real loading progress:

<gate-loader id="loader" mode="manual"></gate-loader>

<script type="module">
  import '@mugglemagic/stargate-loader';
  const loader = document.getElementById('loader');

  // Map your progress (0–1) straight onto the chevrons.
  // Jumps are fine — engagements queue and play sequentially.
  loader.progress = bytesLoaded / bytesTotal;

  loader.addEventListener('wormhole', () => showApp());
</script>

Or step it discretely — seven chevrons map neatly onto seven boot stages:

await initDatabase();  loader.engageNext();
await loadAssets();    loader.engageNext();
// ...
loader.complete(); // engages the rest and opens the gate

API

Attributes / properties

| Attribute | Property | Values | Default | Notes | |---|---|---|---|---| | size | — | px number or any CSS length | 320px | Also settable via the --size custom property | | mode | mode | loop | manual | loop | loop dials continuously; manual waits for you | | canon | canon | series | movie | series | Series: the top chevron clunks for every symbol. Movie: each chevron clunks itself | | address | address | seven comma-separated glyph numbers (1–39) | 28,26,5,36,11,29,1 | Earth's address, per Solitudes. Invalid input falls back to the default | | no-status | — | boolean attribute | absent | Hides the "chevron four encoded" status line | | — | progress | 01 | 0 | Manual mode. Monotonic; engages floor(progress × 7) chevrons. 1 opens the gate |

Methods

  • engageNext(): Promise<void> — engage the next chevron (manual mode)
  • complete(): Promise<void> — engage all remaining chevrons and open the gate
  • reset(): void — shut down and return to standby (restarts the loop in loop mode)

Events

  • chevron — per engagement; detail: { chevron: 1–7, glyph: 1–39, locked }
  • wormhole — the gate opened
  • cycle — loop mode started a new dial
  • resetreset() was called

Theming

CSS custom properties on the host: --size, --glyph, --amber, --amber-hot, --horizon, --metal-hi, --metal-mid, --metal-lo. Shadow parts exposed: ::part(gate), ::part(horizon), ::part(status).

Respects prefers-reduced-motion: spins collapse to sequential light-ups, and the kawoosh is skipped.

Glyphs

The 39 Milky Way glyphs are inlined at build time from Wikimedia Commons ("Stargate SG·1 symbol 01–39", CC BY-SA 3.0):

npm run build:glyphs          # regenerates src/glyphs.js
SVGO=1 npm run build:glyphs   # same, minified via svgo if installed

prepublishOnly runs this automatically, so a published package always ships with the glyphs inlined — no network requests, no hotlinking. If src/glyphs.js is the placeholder (fresh clone), the component falls back to hotlinking Commons and logs a warning; that's for local development only.

Licensing

Three layers, kept deliberately separate:

  • Code — MIT. See LICENSE.
  • Glyph artwork — the 39 glyph SVGs are derived from Wikimedia Commons uploads licensed CC BY-SA 3.0. Attribution and license details in LICENSES-GLYPHS.md, and the generated src/glyphs.js carries the notice in its header. If you redistribute modified glyph artwork, share-alike applies to it.
  • The franchise — Stargate, the gate design, and the glyph designs originate with the Stargate franchise (MGM/Amazon). This is a non-commercial fan work. Don't embed it in commercial products, and don't remove the attributions.

Accessibility

The status line is an aria-live="polite" region announcing each engagement, the glyph images are aria-hidden decoration, and reduced-motion preferences are honoured. If you hide the status line with no-status, consider announcing progress elsewhere.