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

@x-decisions/svelte-agent

v1.0.2

Published

A beautiful AI chat widget for Svelte applications with fixed bottom-right positioning

Readme

AI Chat Widget - Svelte

A beautiful AI chat widget component for Svelte applications.

🚀 Quick Start

Installation

npm install

Configuration

  1. Copy .env.example to .env:
cp .env.example .env
  1. Edit .env and set your API credentials:
VITE_CHAT_API_KEY=your_api_key_here
VITE_CHAT_API_URL=http://localhost:8000

Run Development Server

npm run dev

Open http://localhost:5173 to see the demo.


📦 Usage in Your Svelte App

Import the Component

<script lang="ts">
  import { AIChatWidget } from 'x-decision-ai-chat-widget-svelte';
</script>

<AIChatWidget
  apiEndpoint="http://localhost:8000"
  apiKey="your-api-key"
  title="AI Assistant"
  suggestions={[
    'I want your best products',
    'What is your return policy?'
  ]}
/>

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | apiEndpoint | string | required | Your API endpoint URL | | apiKey | string | '' | API key for authentication | | title | string | 'AI Assistant' | Chat widget title | | placeholder | string | 'Type a message...' | Input placeholder text | | theme | 'light' \| 'dark' | 'light' | Color theme | | primaryColor | string | '#6366f1' | Primary color (hex) | | suggestions | string[] | [] | Quick suggestion buttons | | logo | string | undefined | Logo URL | | zIndex | number | 9999 | Z-index for positioning |


✨ Features

  • ✅ Multiple chat sessions
  • ✅ Session history with delete
  • ✅ Message persistence (localStorage)
  • ✅ Markdown rendering in assistant messages
  • ✅ Product cards support
  • ✅ Light/dark themes
  • ✅ Custom branding
  • ✅ Responsive design
  • ✅ TypeScript support

🛠 Development

Build Library

npm run build

Output will be in dist/ directory.

Project Structure

svelte/
├── src/
│   ├── lib/              # Widget components
│   │   ├── AIChatWidget.svelte
│   │   ├── ChatWindow.svelte
│   │   ├── MessageList.svelte
│   │   └── ...
│   ├── App.svelte        # Demo app
│   └── main.ts           # Entry point
├── dist/                 # Build output
└── package.json

📝 License

ISC