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

@faclon-labs/app-sdk

v0.2.0

Published

IOSense sign-in, plant data and maps for React apps: the launchpad SSO session, UNS latest values and series, the signed-in user, requests to IOSense's APIs, and the Map Engine on UNS (./map).

Readme

@faclon-labs/app-sdk

IOSense sign-in and plant data for React apps.

npm install @faclon-labs/app-sdk

Sign-in

Wrap the app in <IOSenseApp>. It takes the session IOSense hands over — the launchpad's SSO token (?token=, exchanged once), a bearer on the URL, or the .iosense.io cookie — takes the token out of the address, and keeps it in this browser. With no session it shows a sign-in screen.

import { IOSenseApp } from '@faclon-labs/app-sdk';

createRoot(document.getElementById('root')!).render(
  <IOSenseApp name="Kiln monitor">
    <App />
  </IOSenseApp>,
);

| auth | With no session | |---|---| | "required" (default) | the sign-in screen | | "optional" | the app opens; plant data is sample data | | "none" | no IOSense sign-in at all |

useIOSense() gives { token, apiBaseUrl, sample, signOut }. Another region or stack: <IOSenseApp apiBaseUrl="https://appserver.us.iosense.io"> or configure({ apiBaseUrl }).

Plant data (UNS)

Topics are uns:<workspace>://<path>:<aggregation>, the same strings io-lens dashboards use. uns:design://… topics, and every topic while sample is true, return steady sample values.

const { data } = useLatest(['uns:ws_1://plant/kiln/feed:last']);            // polls every 60 s
const { data: trend } = useSeries(['uns:ws_1://plant/kiln/power:average'], { hours: 24, bucket: 'hour' });

The viewer and IOSense's APIs

const { user } = useUser(); // { id, email, name, organisation }
const devices = await request(`${apiBaseUrl}/api/account/devices`, { auth: 'iosense' });
const { data, loading, error } = useRequest(url, { auth: 'iosense' });

auth: 'iosense' adds the viewer's token and is refused for any host that is not IOSense's.

Maps (@faclon-labs/app-sdk/map)

The IO Studio Map Engine on UNS data: a declarative MapConfig, the React MapView, the MapLibre renderer, the UNS provider, and the agent commands. Install MapLibre next to the SDK:

npm install @faclon-labs/app-sdk maplibre-gl
import 'maplibre-gl/dist/maplibre-gl.css';
import { MapView, MapLibreRenderer, useUnsMapSource, type MapConfig } from '@faclon-labs/app-sdk/map';
// Vite: without this line the map stays empty (the engine warns after 8 s).
import workerUrl from 'maplibre-gl/dist/maplibre-gl-worker.mjs?worker&url';

function PlantMap({ config }: { config: MapConfig }) {
  const source = useUnsMapSource({ workspace: 'ws_…' }); // the viewer's session; the UNS decides what they see
  return <MapView style={{ height: '100vh' }} config={config} {...source.props} createRenderer={() => new MapLibreRenderer({ workerUrl })} />;
}
  • source.uns.listDatasets() lists every spatial class in the workspace with its properties.
  • On sample data (auth="optional", nobody signed in) the map shows sample records you pass to useUnsMapSource. @faclon-labs/app-sdk/map/testing has fixtures and an in-memory provider.
  • The UNS host is configure({ unsBaseUrl }), else worked out from apiBaseUrl (appserver.X → uns-backend-server.X). The UNS backend answers only IOSense's own origins (CORS): an app served from elsewhere needs a pass-through that allows it, set as unsBaseUrl.
  • 3D globe: npm install cesium, then import { CesiumRenderer } from '@faclon-labs/app-sdk/map/globe' and createRenderer={() => new CesiumRenderer()}. A 2D app never downloads Cesium.

The engine comes from the MapEngine repo: npm run build copies it into vendor/ (set MAP_ENGINE_DIR if the checkout is not next to io-lens-mfe). scripts/smoke-map.sh installs the packed SDK into a fresh app and checks it.

Peer dependencies: React 18 or later; maplibre-gl (v5+) for ./map; cesium for ./map/globe.