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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@buni.ai/chatbot-core

v1.0.14

Published

Core functionality for BuniAI chat widget adapters

Readme

@buni.ai/chatbot-core

npm version License: MIT

Core functionality for BuniAI Chat Widget adapters - provides framework-agnostic utilities and API for seamless chatbot integration.

Features

  • 🚀 Framework Agnostic - Works with any JavaScript framework or vanilla JS
  • 📦 TypeScript Ready - Full type definitions included
  • 🎯 Event-Driven - Comprehensive event system for real-time updates
  • 🔧 Configurable - Extensive customization options
  • 📱 Mobile Friendly - Responsive design and touch support
  • 🎨 Themeable - Multiple built-in themes and custom styling options

Installation

npm install @buni.ai/chatbot-core

Quick Start

import { BuniChatWidget } from '@buni.ai/chatbot-core';

// Initialize the widget
const widget = new BuniChatWidget();

await widget.initialize({
  token: 'your-embed-token',
  config: {
    theme: 'default',
    position: 'bottom-right',
    welcomeMessage: 'Hello! How can we help you today?'
  }
});

// Control the widget
widget.show();
widget.hide();
widget.toggle();

// Set customer data
widget.setCustomerData({
  name: 'John Doe',
  email: '[email protected]',
  userId: 'user123'
});

// Listen for events
widget.on('new_message', (data) => {
  console.log('New message:', data.message);
});

widget.on('visibility_changed', (data) => {
  console.log('Widget visibility:', data.visibility);
});

API Reference

Configuration Options

interface BuniChatConfig {
  theme?: 'default' | 'dark' | 'light' | 'corporate' | 'friendly' | 'minimal';
  primaryColor?: string;
  secondaryColor?: string;
  companyName?: string;
  customAvatar?: string;
  welcomeMessage?: string;
  position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
  width?: number;
  height?: number;
  triggerText?: string;
  autoOpen?: boolean;
  showMinimize?: boolean;
  showBranding?: boolean;
  enableMobile?: boolean;
}

Widget Methods

  • initialize(options) - Initialize the widget with configuration
  • destroy() - Clean up and remove the widget
  • show() - Show the chat widget
  • hide() - Hide the chat widget
  • toggle() - Toggle widget visibility
  • minimize() - Minimize the widget
  • maximize() - Maximize the widget
  • setCustomerData(data) - Set customer information
  • getCustomerData() - Get current customer data
  • setSessionVariables(variables) - Set session variables
  • sendMessage(message) - Send a message programmatically
  • clearChat() - Clear chat history

Events

  • ready - Widget is loaded and ready
  • visibility_changed - Widget visibility changed
  • new_message - New message received
  • minimized - Widget was minimized
  • maximized - Widget was maximized
  • error - An error occurred

TypeScript Support

This package includes comprehensive TypeScript definitions:

import { 
  BuniChatWidget, 
  BuniChatOptions, 
  BuniChatConfig,
  CustomerData,
  SessionVariables 
} from '@buni.ai/chatbot-core';

Framework Adapters

For framework-specific implementations, use these packages:

  • React: @buni.ai/chatbot-react
  • Vue: @buni.ai/chatbot-vue
  • Angular: @buni.ai/chatbot-angular

License

MIT © BuniAI Team