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

paltext-embed

v1.1.9

Published

Embeddable script to use PalTextSDK React in non-React websites

Readme

PalText Embed

An embeddable script to integrate PalText AI Customer Support Chat into any website without requiring React.

Installation

You can include this script directly from the CDN:

<script src="https://unpkg.com/paltext-embed@latest/dist/paltext-embed.js"></script>

Or you can install it via npm:

npm install paltext-embed

Usage

Basic usage

<!-- Add the script to your page -->
<script src="https://unpkg.com/paltext-embed@latest/dist/paltext-embed.js"></script>

<script>
  // Initialize the chat widget
  window.PalTextEmbed.default.init({
    apiKey: 'YOUR_API_KEY',
    apiUrl: 'https://api.paltext.com',
    webSocketUrl: 'wss://api.paltext.com',
    businessId: 'YOUR_BUSINESS_ID',
    chatWindow: {
      title: 'Customer Support',
      theme: 'light',
      position: 'bottom-right',
      initialOpen: false,
      primaryColor: '#0084ff'
    }
  });

  // You can control the chat programmatically
  document.getElementById('open-chat').addEventListener('click', () => {
    window.PalTextEmbed.default.open();
  });

  document.getElementById('close-chat').addEventListener('click', () => {
    window.PalTextEmbed.default.close();
  });

  document.getElementById('toggle-chat').addEventListener('click', () => {
    window.PalTextEmbed.default.toggle();
  });
</script>

Configuration Options

| Property | Type | Description | |----------|------|-------------| | apiKey | string | Your PalText API key | | apiUrl | string | The URL of the PalText API | | webSocketUrl | string | The WebSocket URL for real-time communication | | businessId | string | Your business ID | | debug | boolean | Enable debug mode | | chatWindow | object | Configuration for the chat window |

Chat Window Options

| Property | Type | Description | |----------|------|-------------| | title | string | The title of the chat window | | theme | 'light' | 'dark' | 'auto' | The theme of the chat window | | position | 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left' | The position of the chat window | | initialOpen | boolean | Whether the chat window should be open by default | | primaryColor | string | The primary color of the chat window | | secondaryColor | string | The secondary color of the chat window |

API

  • window.PalTextEmbed.default.init(config): Initialize the chat widget
  • window.PalTextEmbed.default.open(): Open the chat widget
  • window.PalTextEmbed.default.close(): Close the chat widget
  • window.PalTextEmbed.default.toggle(): Toggle the chat widget
  • window.PalTextEmbed.default.isOpen(): Check if the chat widget is open

Example

See the included example.html file for a complete example.

License

MIT