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

@accurix/centrinfo-widget

v1.0.0

Published

Embeddable Centrinfo public chat widget — a tiny, style-isolated chat client that drops onto any website.

Readme

@accurix/centrinfo-widget

The embeddable Centrinfo public chat widget — a style-isolated chat client that drops onto any website. The current standalone CDN bundle is about 35 KB gzipped and can dock bottom-right or bottom-left.

Built with Preact inside a Shadow DOM web component, so it can't break the host site's CSS and the host's CSS can't break it. It talks to the Centrinfo public chat API (see .claude/PUBLIC_CHAT.md for the backend, and .claude/PUBLIC_WIDGET_LIBRARY.md for the design).

Install

Script tag (any site — WordPress / Webflow / plain HTML)

Zero-JS, via data-* on the script:

<script
  src="https://cdn.accurix.com/centrinfo/js/sdk-centrinfo-widget-v1.0.0/centrinfo-widget.js"
  data-token="pub_8f3k…"
  defer
></script>

Or call init yourself:

<script
  src="https://cdn.accurix.com/centrinfo/js/sdk-centrinfo-widget-v1.0.0/centrinfo-widget.js"
  defer
></script>
<script>
  window.addEventListener('load', () => Centrinfo.init({ token: 'pub_8f3k…' }));
</script>

npm (React / Next / any bundler)

pnpm add @accurix/centrinfo-widget
import { init } from '@accurix/centrinfo-widget';
const widget = init({ token: 'pub_8f3k…' });
// widget.open() / .close() / .toggle() / .destroy()

Config

| Option | Type | Default | Notes | | ------------------------------------------------------------- | ----------------------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------- | | token (required) | string | — | The org's pub_* token. It is the org identity. | | apiBaseUrl | string | prod API | Override for staging / self-host. | | accentColor | string | brand green | Any CSS color — drives the launcher, header, user bubbles & send button (a darker shade for the gradient is derived automatically). | | launcherIcon | string | chat glyph | Image URL (e.g. the org's logo) shown in the launcher bubble. | | theme | 'light' \| 'dark' \| 'auto' | 'auto' | auto follows the host's prefers-color-scheme; light/dark force it. | | openByDefault | boolean | false | Open the panel on load. | | zIndex | number | very high | Stacking against the host page. | | demo | boolean | false | Use the built-in mock transport — no backend/token needed. | | onOpen / onClose / onMessage / onAction / onHandoff | function | — | Event hooks. |

Persona (agent name/avatar/greeting), the voice toggle, and which lead-gen actions appear all come from the token via GET /public-chat/bootstrap — not from the snippet.

data-* attributes for the script install: data-token, data-api-base, data-accent, data-theme, data-open, data-demo.

Environment

The default API origin is baked from VITE_API_BASE_URL (see .env.example). Copy .env.example.env (gitignored) to override locally; unset falls back to production (https://api.accurixtech.com). Local default is the local API (http://api.accurixtech.com/). A per-init apiBaseUrl always wins at runtime. Restart the dev server after editing .env.

Develop

pnpm --filter @accurix/centrinfo-widget dev      # playground host site @ :3005 (demo mode)
pnpm --filter @accurix/centrinfo-widget build    # → dist/index.{mjs,cjs,d.ts} + dist/cdn/*
pnpm --filter @accurix/centrinfo-widget check-types
pnpm --filter @accurix/centrinfo-widget test-unit
pnpm --filter @accurix/centrinfo-widget verify:release

Release Artifacts

build:npm uses tsdown to emit the npm package entrypoints:

  • dist/index.mjs
  • dist/index.cjs
  • dist/index.d.ts

build:cdn uses Vite to emit the browser script and then writes a manifest:

  • dist/cdn/centrinfo-widget.js
  • dist/cdn/manifest.json

Canonical v1 CDN URL:

https://cdn.accurix.com/centrinfo/js/sdk-centrinfo-widget-v1.0.0/centrinfo-widget.js

Status

v1 in progress — chat, streaming (SSE), citations, suggested-reply chips, session memory, handoff CTA, lead-gen actions, voice input, theming. Backend GET /public-chat/bootstrap is pending (the only backend work); the client falls back to sensible defaults until it lands.