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

@joyautomation/nautilus-hmi

v0.3.1

Published

The HMI / digital-twin component layer of nautilus — Svelte 5 SCADA faceplates (Tank, Gauge, Trend, Pump, Valve…), a generic SSE realtime client, and a themeable token layer.

Downloads

203

Readme

@joyautomation/nautilus-hmi

The HMI / digital-twin layer of nautilus — a reusable Svelte 5 component library for building operator screens on top of any nautilus runtime.

It ships three things:

  1. SCADA faceplatesTank, Gauge, Trend, Pump, Valve, Pipe, StatusPill, Sparkline, Histogram, NumberField, plus ThemeSwitch / MotionSwitch. All are pure SVG/CSS, animate smoothly under streaming data, and are driven entirely by CSS custom properties (var(--…)) so they re-skin from the token layer.
  2. A generic realtime client (RealtimeClient / createRealtimeClient) — one SSE stream in, commands out over POST. It is agnostic to your frame shape: it hands you the latest parsed JSON frame (typed by a generic parameter) and tracks connection freshness rather than trusting EventSource events (which lie across a proxy failover). A TrendBuffer helper keeps a rolling, windowed history you can bind straight into Trend.
  3. A themeable token layer (theme.css) — light & dark [data-theme] tokens (surfaces, ink, grid/axis, a validated categorical chart palette, status colors, interaction tokens) plus a reduced-motion rule and optional base element styles.

It is the HMI layer of nautilus: SvelteKit + SSE, token-themed, and it works with any nautilus runtime's /api/stream endpoint (and the conventional /api/command for writes).

Install

npm install @joyautomation/nautilus-hmi svelte

Svelte 5 is a peer dependency. This kit assumes a SvelteKit (or Vite + @sveltejs/vite-plugin-svelte) host so .svelte files are compiled by the consumer.

Usage

Import the token layer once (e.g. in your root +layout.svelte or app.css):

import '@joyautomation/nautilus-hmi/theme.css';

Wire the realtime client to your runtime's SSE stream and render faceplates:

<script lang="ts">
	import { onMount } from 'svelte';
	import { Tank, Gauge, Trend, createRealtimeClient, TrendBuffer } from '@joyautomation/nautilus-hmi';

	// Describe just the fields your screen reads — the client is generic.
	type Frame = { ts: number; level: number; tempC: number; heaterPct: number };

	const level = new TrendBuffer(180); // keep 3 minutes

	const rt = createRealtimeClient<Frame>({
		url: '/api/stream',
		onFrame: (f) => level.push(f.ts, f.level)
	});

	onMount(() => {
		rt.start();
		return () => rt.stop();
	});
</script>

{#if rt.frame}
	<Tank levelPct={rt.frame.level} tempC={rt.frame.tempC} heaterPct={rt.frame.heaterPct} label="T-101" />
	<Gauge value={rt.frame.tempC} min={0} max={100} unit="°C" label="Temp" />
	<Trend series={[{ name: 'Level', color: 'var(--s1)', points: level.points }]} unit="%" />
{/if}

<span>{rt.connected ? 'live' : 'stale'}</span>

Send an operator command back to the runtime:

await rt.send('setSetpoint', { value: 42 }); // POST /api/command  { cmd, ...fields }

Theming

Every component reads tokens from theme.css. Flip the whole HMI between light and dark by stamping data-theme="light" | "dark" on <html> — the bundled theme store does this for you and persists the choice:

<script>
	import { onMount } from 'svelte';
	import { theme, ThemeSwitch } from '@joyautomation/nautilus-hmi';
	onMount(() => theme.init());
</script>

<ThemeSwitch />

Override any token (e.g. --s1, --surface, --accent) in your own stylesheet to rebrand without touching component source. The motion store / MotionSwitch do the same for reduced-motion via data-motion.

Components (props)

| Component | Key props | | --- | --- | | Tank | levelPct, tempC, heaterPct, label, width | | Gauge | value, min, max, unit, label, color, setpoint, decimals, width | | Trend | series: { name, color, points, dashed? }[], unit, height, yMin, yMax, windowS | | Pump | running, speedPct, label, width | | Valve | openPct, label, width | | Pipe | d (SVG path), flowing, rate, color — render inside an <svg> | | StatusPill | kind: 'good' \| 'warning' \| 'serious' \| 'critical' \| 'off', label | | Sparkline | values: number[], color, height, yMin, yMax | | Histogram | counts: number[], bucketWidth, unit, height, color | | NumberField | label, unit, value, min, max, step, onsubmit(v) |

Building the package

npm install
npm run package   # svelte-kit sync && svelte-package  → ./dist
npm run check     # type-check with svelte-check

License

MIT © Joy Automation