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

@adaptive-chatbot/widget

v0.1.3

Published

Embeddable website chatbot widget for the Adaptive Chatbot Platform.

Readme

@adaptive-chatbot/widget

Add the Adaptive Chatbot to a website with npm, React, or a script tag. The widget is a Web Component with Shadow DOM styles, lazy-loads its chat window, and is safe to import during server-side rendering.

Install

npm install @adaptive-chatbot/widget

Publish (maintainers)

From the repository root, target the widget workspace so npm packs the package in this directory rather than the private monorepo root:

pnpm --filter @adaptive-chatbot/widget exec npm publish --access public --otp=YOUR_6_DIGIT_CODE

Replace YOUR_6_DIGIT_CODE with the current six-digit code from the npm authenticator. An npm_... access token is not an OTP and must not be passed as --otp.

Create a site in the dashboard, add the site's allowed domains, and use its public pk_live_... site key. Never put a secret key or model provider key in browser code.

Plain JavaScript or TypeScript

import { initChatbot } from "@adaptive-chatbot/widget";

const chatbot = initChatbot({ siteKey: "pk_live_..." });
chatbot.open();
chatbot.close();
chatbot.destroy();
chatbot.on("message", (event) => console.log(event));

The launcher is added to the document body and the chat panel is loaded the first time it opens. The public API includes open, close, destroy, and on.

React

import { useChatbot } from "@adaptive-chatbot/widget/react";

export function SupportWidget() {
  const chatbot = useChatbot({ siteKey: "pk_live_..." });
  return <button type="button" onClick={chatbot.open}>Open support chat</button>;
}

React 18 or 19 is an optional peer dependency. The framework-neutral entry point does not load React.

CDN

<script
  src="https://cdn.jsdelivr.net/npm/@adaptive-chatbot/widget/dist/cdn/cdn.iife.global.js"
  data-site-key="pk_live_..."
></script>

The IIFE initializes itself from data-site-key and exposes window.AdaptiveChatbot.initChatbot() for manual setup. The ESM CDN entry remains available at dist/cdn/cdn.js; the package's unpkg/jsDelivr defaults point to the self-initializing IIFE.

Options and events

initChatbot requires siteKey. Optional settings include position (bottom-right or bottom-left), a partial theme, string context, and apiBaseUrl for local testing. The widget fetches appearance and bot name from /v1/config; bot names are rendered as plain text and shown with an “AI assistant” label.

The on method accepts open, close, and message events. Use the public key only. Requests are restricted by the allowed domains configured for the site.

Assistant replies support safe Markdown paragraphs, emphasis, inline code, ordered and unordered lists, and tables. Uploaded knowledge-base filenames are not shown in the visitor chat; deduplicated citations are shown only for sources with a public HTTP(S) URL.

Package contents

The package includes ESM, CommonJS, TypeScript declarations, a React entry point, and self-initializing CDN IIFE plus ESM builds. The initial-load bundles are checked against the 40 KB gzipped limit as part of packaging.

npm install @adaptive-chatbot/widget