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

@airnauts/airside-client

v0.9.1

Published

Embeddable, self-contained commenting widget for the Airnauts commenting tool.

Readme

@airnauts/airside-client

Embeddable commenting widget for Airside. Mounts a light-DOM, self-contained commenting overlay onto any web page — no iframe, no Shadow DOM. For React hosts, use @airnauts/airside-integration-react (or @airnauts/airside-integration-next/client in Next.js).

Installation

pnpm add @airnauts/airside-client

Quick start

Vanilla JS

import { airside } from '@airnauts/airside-client'

const handle = await airside.init({
  key: 'your-secret-key',
  endpoint: '/api/airside',
})

// Later, to tear down:
handle.destroy()

API reference

init(options) / airside.init(options)

import { init, airside } from '@airnauts/airside-client'

const handle: AirsideHandle = await airside.init(options)

init is a no-op (returns a handle whose destroy is also a no-op) when no valid key is found in either the URL or localStorage. It is async by contract; in the current build the app bundle is static (no dynamic import split at the gate).

InitOptions

| Option | Type | Description | |---|---|---| | key | string | Secret key sent as x-airside-key on every API request | | endpoint | string | Base URL of the comments API (e.g. "/api/airside") | | pageKey | (url: string) => string | Override the default origin + pathname page identity | | keyParam | string | URL param the activation gate reads (default "airside-key") | | threadParam | string | URL param used for thread deep-links (default "airside-thread") | | features.screenshots | boolean | Enable screenshot capture (default off) | | features.textAnchors | boolean | Enable text-selection anchoring (default off) | | provenance | Provenance | Optional deploy metadata attached to new threads (commitSha, branch, deploymentId) |

AirsideHandle

type AirsideHandle = { destroy(): void }

Call destroy() to unmount the widget and clean up all listeners.

consumeThreadParam(param)

import { consumeThreadParam, DEFAULT_THREAD_PARAM } from '@airnauts/airside-client'

consumeThreadParam(DEFAULT_THREAD_PARAM)

Reads a ?airside-thread=<id> deep-link param from the current URL, stores the thread ID in sessionStorage so the widget opens that thread's panel on load, then strips the param from the address bar. Call this before init if you need to handle deep-links in a vanilla (non-React) context; the React <AirsideLayer> (now in @airnauts/airside-integration-react) handles it automatically.

Constants

| Export | Value | |---|---| | DEFAULT_KEY_PARAM | "airside-key" | | DEFAULT_THREAD_PARAM | "airside-thread" |

Anchor utilities (advanced)

Low-level DOM capture functions used by the widget's anchoring engine; available if you need to build custom anchoring logic.

import { captureElement, extractSignals, buildSelectors } from '@airnauts/airside-client'

| Export | Description | |---|---| | captureElement(el, point) | Build a fingerprint { selectors, signals, offset } from a DOM element and click point | | extractSignals(el) | Extract the signals bag (tag, role, textSnippet, classes, siblingIndex, ancestorTrail) | | buildSelectors(el) | Build the dual [structuralPath, classPath] selector tuple | | resolveUnique(selector, root?) | Resolve a structural selector to a single element, or null if ambiguous |

Requirements

The main entry (@airnauts/airside-client) bundles its own React and does not require the host app to have React installed.

  • Node.js ≥ 18 for server-side rendering stubs (the widget itself only runs in the browser)

Related packages

  • @airnauts/airside-integration-react<AirsideLayer/> React mount (the React host integration)
  • @airnauts/airside-server — the HTTP API the widget talks to
  • @airnauts/airside-integration-next — one-call Next.js App Router server integration
  • @airnauts/airside-core — shared types (consumed transitively)

See the integration guide for a full walkthrough, with examples/nextjs-host as the worked example.

License

MIT © Airnauts