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

@deepfrog/pangents-widget

v5.5.0

Published

Pangents AI - Embeddable AI widget for web applications

Readme

@deepfrog/pangents-widget

Pangents AI Chat Widget - An embeddable chatbot widget for web applications.

npm version CI License: MIT

Installation

npm install @deepfrog/pangents-widget
# or
yarn add @deepfrog/pangents-widget
# or
pnpm add @deepfrog/pangents-widget

Usage

React Component

import { Widget } from '@deepfrog/pangents-widget';

function App() {
  return (
    <Widget
      pangentsApiKey="Ph75vjKOsJbDuPyxR8-wW0_GYYm7ytVF0XQid2GXEZQ"
      tenantId="69386fa4a5248bcd50a4fdd2"
      email="[email protected]"    // Optional: pre-fill login email
      environment="production"    // Optional: 'development' | 'staging' | 'production'
      zIndex={9999}               // Optional: control overlay stacking order
      theme={{
        primaryColor: '#1e40af',
        headerBg: '#1e40af',
        headerText: '#ffffff',
        bubbleIcon: 'https://app.ultrashiptms.ai/icon.ico?25f91bedca5c761d',
      }}
      position="bottom-right"
      margin="20px"               // Optional: adjust bubble margin
      paddingWidgetContainer="10px 20px" // Optional: adjust popup container margin
    />
  );
}

Vanilla JavaScript (Script Tag)

<script type="module">
  import Chatbot from 'https://chat-widget-gamma-azure.vercel.app/widget.js';

  Chatbot.init({
    pangentsApiKey: '<api_key>',
    tenantId: '<tenant_id>',
    email: '[email protected]',   // Optional: pre-fill login email
    environment: 'production',   // Optional: 'development' | 'staging' | 'production'
    zIndex: 9999,                // Optional: control overlay stacking order
    theme: {
      primaryColor: '#1e40af',
      headerBg: '#1e40af',
      headerText: '#ffffff',
      bubbleIcon: 'https://app.ultrashiptms.ai/icon.ico?25f91bedca5c761d',
    },
    position: 'bottom-right',
    margin: '10px 20px',           // Optional: adjust bubble margin
    paddingWidgetContainer: '10px 20px',  // Optional: adjust popup container margin
  });
</script>

CDN Usage

<script type="module">
  import Chatbot from 'https://cdn.jsdelivr.net/npm/@deepfrog/pangents-widget/dist/widget.min.js';

  Chatbot.init({
    pangentsApiKey: '<api_key>',
    tenantId: '<tenant_id>',
    email: '[email protected]',      // Optional: pre-fill login email
    environment: 'production',      // Optional: 'development' | 'staging' | 'production'
    zIndex: 9999,                   // Optional: control overlay stacking order
    theme: {
      primaryColor: '#1e40af',
      headerBg: '#1e40af',
      headerText: '#ffffff',
      bubbleIcon: 'https://app.ultrashiptms.ai/icon.ico?25f91bedca5c761d',
    },
    position: 'bottom-right',
    margin: '10px 20px 30px 40px',    // Optional: adjust bubble margin
    paddingWidgetContainer: '10px 20px',     // Optional: adjust popup container margin
  });
</script>

Configuration Options

| Option | Type | Required | Description | |--------|------|----------|-------------| | pangentsApiKey | string | Yes | Your Pangents API key | | tenantId | string | Yes | Your tenant ID | | email | string | No | Optional email to pre-fill the login form | | environment | string | No | API environment: 'development', 'staging', or 'production'. Defaults to 'development' (or VITE_API_BASE_URL env var if set). | | theme | object | No | Theme customization options | | position | string | No | Widget position: 'bottom-right', 'bottom-left', 'top-right', 'top-left'. The popup will slide in from the corresponding side. | | margin | string | No | CSS margin for the bubble button. Supports all CSS margin formats: '10px', '10px 20px', '10px 20px 30px', '10px 20px 30px 40px' | | paddingWidgetContainer | string | No | CSS margin for the popup container. Supports all CSS margin formats. | | zIndex | number | No | CSS z-index for the widget (default: 9999) |

Environment → API Endpoint Mapping

| environment | API Base URL | |---------------|--------------| | development | https://dev.backend.pangents.ai | | staging | https://stage.backend.pangents.ai | | production | https://app.backend.pangents.ai |

If environment is not provided, the widget falls back to the VITE_API_BASE_URL environment variable, then defaults to the development endpoint.

Theme Options

interface Theme {
  primaryColor?: string;    // Primary accent color
  headerBg?: string;        // Header background color
  headerText?: string;      // Header text color
  bubbleIcon?: string;      // Bubble icon
  userBubble?: string;      // User message bubble color
  botBubble?: string;       // Bot message bubble color
  fontFamily?: string;      // Font family
}

API Methods

Chatbot.init(config)

Initialize the widget with configuration.

Chatbot.updateConfig(config)

Update widget configuration dynamically.

Example: Fetch config from an API and update at runtime

<script type="module">
  import Chatbot from 'https://cdn.jsdelivr.net/npm/@deepfrog/pangents-widget/dist/widget.min.js';

  Chatbot.init({
    pangentsApiKey: '<api_key>',
    tenantId: '<tenant_id>'
  });

  async function loadWidgetConfig() {
    const res = await fetch('https://api.example.com/widget-config?tenant=<tenant_id>');
    if (!res.ok) throw new Error('Failed to load widget config');
    const remote = await res.json();

    Chatbot.updateConfig({
      pangentsApiKey: remote.pangentsApiKey ?? '<api_key>',
      tenantId: remote.tenantId ?? '<tenant_id>',
      email: remote.email,
      theme: remote.theme,
      position: remote.position,
      margin: remote.margin,
      paddingWidgetContainer: remote.paddingWidgetContainer,
      zIndex: remote.zIndex
    });
  }

  loadWidgetConfig();
</script>
// ESM/bundlers
import Chatbot from '@deepfrog/pangents-widget/widget';

Chatbot.init({
  pangentsApiKey: '<api_key>',
  tenantId: '<tenant_id>'
});

const res = await fetch('/api/widget-config');
if (!res.ok) throw new Error('Failed to load widget config');
const cfg = await res.json();

Chatbot.updateConfig({
  pangentsApiKey: cfg.pangentsApiKey,
  tenantId: cfg.tenantId,
  email: cfg.email,
  theme: cfg.theme,
  position: cfg.position,
  margin: cfg.margin,
  paddingWidgetContainer: cfg.paddingWidgetContainer,
  zIndex: cfg.zIndex
});

Chatbot.updateTheme(theme)

Update only the theme configuration.

Chatbot.destroy()

Remove the widget from the page.

Development

# Install dependencies
npm install

# Start development server
npm run dev

# Build library
npm run build:lib

# Build standalone widget
npm run build:widget

# Build both
npm run build

# Run tests
npm run test

# Run linting
npm run lint

Publishing

The package is automatically published to npm when a new version tag is pushed:

# Patch release (1.0.0 -> 1.0.1)
npm run release:patch

# Minor release (1.0.0 -> 1.1.0)
npm run release:minor

# Major release (1.0.0 -> 2.0.0)
npm run release:major

Or manually trigger a release via GitHub Actions.

License

MIT