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

@w5-ui/fleet

v0.2.3

Published

Fleet-board: a grouped SvelteFlow topology canvas + drill-down panel for operator dashboards, driven by an injectable backend contract. Part of Webber's design systems.

Readme

@w5-ui/fleet

A grouped SvelteFlow topology board plus a drill-down panel for operator dashboards. You supply the topology data (components, groups, scenarios) and point the board at a backend that implements the FleetApi contract; the package owns the canvas, the layout maths, and the panel chrome.

Part of Dash UI, Webber's design systems.

Install

yarn add @w5-ui/fleet @w5-ui/tokens @xyflow/svelte svelte

svelte (^5) and @xyflow/svelte (^1) are peer dependencies. The components use @w5-ui/tokens CSS variables and Tailwind utility classes, so your app's Tailwind build must scan @w5-ui/fleet (and your own topology data file, which carries any per-group accent class strings).

Concepts

  • Component - one node on the board: { id, label, zone, kind, group, upstreams, health, ... }.
  • Group - a fieldset lane: { id, label, logo?, stackBelow?, maxCols?, accent? }. GroupId is an opaque string; you define your own set.
  • Scenario - a multi-step operator macro surfaced as a button in a component's drill-down: { id, label, description?, attachedTo }. The steps run server-side; the board only starts a run and polls its progress.
  • FleetApi - the backend contract the drill-down calls: fetchStatus, runAction, fetchLogs, runScenario, getScenarioRun, plus optional fetchProcesses, fetchResources, setAutoStart.

Usage

<script lang="ts">
  import { FleetBoard, DrillDown, createHttpFleetApi } from '@w5-ui/fleet'
  import type { Component, Group, ComponentId, CheckResult } from '@w5-ui/fleet'
  import '@w5-ui/tokens/tokens.css'

  const api = createHttpFleetApi('/api') // GET/POST against your aggregator
  let report = $state<Awaited<ReturnType<typeof api.fetchStatus>>>(null)
  // poll api.fetchStatus() into `report` on an interval you own

  const statusFor = (id: ComponentId): CheckResult =>
    report?.components?.[id] ?? { status: 'unknown', message: 'no report yet' }

  let selected = $state<ComponentId | null>(null)
</script>

<FleetBoard {components} {groups} {statusFor} onSelect={(id) => (selected = id)} />

{#if selected}
  <DrillDown
    component={components.find((c) => c.id === selected)!}
    result={statusFor(selected)}
    scenarios={scenariosFor(selected)}
    {api}
    onClose={() => (selected = null)}
  />
{/if}

The backend contract (FleetApi)

createHttpFleetApi(baseUrl, fetch?) speaks this canonical REST shape (all bodies JSON, all decoders tolerant of a malformed response):

| Method | Path | Body / query | Returns | | ------ | --------------------------------- | ------------- | -------------------------------- | | GET | {base}/status | | StatusReport | | GET | {base}/processes | | { processes: ProcessRow[] } | | GET | {base}/resources | | { snapshot: ResourceSnapshot } | | POST | {base}/components/:id/action | { action } | ActionResult | | GET | {base}/components/:id/logs | ?lines=N | LogsResult | | PATCH | {base}/components/:id/autostart | { enabled } | AutoStartResult | | POST | {base}/scenarios/:id/run | | 202 { runId } | | GET | {base}/scenarios/runs/:runId | | ScenarioRunResponse |

Implement FleetApi yourself if your backend differs; only fetchStatus, runAction, fetchLogs, runScenario and getScenarioRun are required. Omitting setAutoStart hides the auto-start toggle; omitting fetchResources/fetchProcesses simply means those panels stay empty.

Softening a routinely-disconnected group

Pass displayStatusFor(groupId, status) to FleetBoard to clamp colour only (the rollup pill label stays truthful). Useful for a group of edge devices that are often legitimately offline:

<FleetBoard
  {...}
  displayStatusFor={(g, s) => (g === 'devices' && s === 'down' ? 'unknown' : s)}
/>

Per-card extras

cardExtras(component, result) lets you attach an openUrl and/or a chips strip to a card without shipping your own node component:

<FleetBoard
  {...}
  cardExtras={(c, r) => ({
    openUrl: openUrlFor(c),
    chips: c.id === 'worker' ? parseInstances(r.details).map((i) => ({ label: i.kind })) : [],
  })}
/>

Exports

Components: FleetBoard, DrillDown, TopologyCard, GroupFieldset, KindIcon. Helpers: groupedComponents, rollupStatus, groupCounts, statusToColor, buildGroupedTopology, buildTopologyNodes, buildTopologyEdges, computeDepths, the scenario-progress helpers. Client: createHttpFleetApi, decodeStatusReport, and the FleetApi type. Plus every domain type (Component, Group, CheckResult, StatusReport, Scenario, ...).

Licence

MIT