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

@bugspark/widget

v0.2.4

Published

Embeddable bug reporting widget with auto screenshot, console logs, network logs, and session recording

Readme

@bugspark/widget

Embeddable bug reporting widget for any website. Automatically captures screenshots, console logs, network requests, and user session recordings.

Features

  • Auto Screenshot — captures a screenshot when users open the bug report form, with built-in annotation tools (pen, arrow, rectangle, circle, text, blur)
  • Console Logs — records the last 100 console entries (log, warn, error)
  • Network Logs — records the last 50 network requests with timing
  • Session Recording — captures the last 30 seconds of user interactions (clicks, scrolls, inputs)
  • Device Metadata — browser, viewport, screen resolution, locale, timezone, connection, Web Vitals
  • Zero Dependencies UI — all UI is injected via Shadow DOM, no CSS conflicts with your site
  • Tiny Bundle — ~229 KB (includes html2canvas)

Quick Start

Option 1: Script Tag (easiest)

Add one line before </body> — works with any website (HTML, Django, WordPress, PHP, etc.):

<script
  src="https://cdn.jsdelivr.net/npm/@bugspark/widget@latest/dist/bugspark.iife.js"
  data-api-key="YOUR_API_KEY"
  data-endpoint="https://api.bugspark.hillmanchan.com/api/v1"
  data-position="bottom-right"
  data-theme="light"
></script>

Option 2: npm install

npm install @bugspark/widget
import BugSpark from '@bugspark/widget';

BugSpark.init({
  apiKey: 'YOUR_API_KEY',
  endpoint: 'https://api.bugspark.hillmanchan.com/api/v1',
});

Configuration

Script Tag Attributes

| Attribute | Default | Description | |-----------|---------|-------------| | data-api-key | (required) | Your project API key from BugSpark Dashboard | | data-endpoint | (required) | Your BugSpark API URL | | data-position | bottom-right | Button position: bottom-right, bottom-left, top-right, top-left | | data-theme | light | Theme: light, dark, auto |

Programmatic Config

BugSpark.init({
  apiKey: 'YOUR_API_KEY',           // required
  endpoint: 'https://...',          // required
  position: 'bottom-right',        // button position
  theme: 'light',                   // light | dark | auto
  primaryColor: '#e94560',          // brand color
  enableScreenshot: true,           // auto screenshot
  enableConsoleLogs: true,          // capture console
  enableNetworkLogs: true,          // capture network
  enableSessionRecording: true,     // capture user actions
  user: {                           // optional: identify user
    id: 'user-123',
    email: '[email protected]',
    name: 'Jane Doe',
  },
  beforeSend(report) {              // filter sensitive data
    return report;
  },
  onSubmit(report) {                // callback after submit
    console.log('Bug submitted!');
  },
});

API

| Method | Description | |--------|-------------| | BugSpark.init(config) | Initialize the widget | | BugSpark.open() | Programmatically open the report form | | BugSpark.close() | Close the report form | | BugSpark.destroy() | Remove the widget and clean up | | BugSpark.identify(user) | Update user info after init |

Framework Examples

Next.js (App Router)

// app/layout.tsx
import Script from 'next/script';

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html>
      <body>
        {children}
        <Script
          src="https://cdn.jsdelivr.net/npm/@bugspark/widget@latest/dist/bugspark.iife.js"
          data-api-key="YOUR_API_KEY"
          data-endpoint="https://api.bugspark.hillmanchan.com/api/v1"
          strategy="afterInteractive"
        />
      </body>
    </html>
  );
}

React (Vite / CRA)

// src/App.tsx
import { useEffect } from 'react';

export default function App() {
  useEffect(() => {
    const script = document.createElement('script');
    script.src = 'https://cdn.jsdelivr.net/npm/@bugspark/widget@latest/dist/bugspark.iife.js';
    script.setAttribute('data-api-key', 'YOUR_API_KEY');
    script.setAttribute('data-endpoint', 'https://api.bugspark.hillmanchan.com/api/v1');
    document.body.appendChild(script);
    return () => {
      if ((window as any).BugSpark) (window as any).BugSpark.destroy();
    };
  }, []);

  return <div>Your App</div>;
}

Django

<!-- templates/base.html -->
{% load static %}
<!DOCTYPE html>
<html>
<body>
  {% block content %}{% endblock %}

  <script
    src="https://cdn.jsdelivr.net/npm/@bugspark/widget@latest/dist/bugspark.iife.js"
    data-api-key="{{ BUGSPARK_API_KEY }}"
    data-endpoint="https://api.bugspark.hillmanchan.com/api/v1"
  ></script>
</body>
</html>

Vue.js

<!-- index.html -->
<body>
  <div id="app"></div>
  <script
    src="https://cdn.jsdelivr.net/npm/@bugspark/widget@latest/dist/bugspark.iife.js"
    data-api-key="YOUR_API_KEY"
    data-endpoint="https://api.bugspark.hillmanchan.com/api/v1"
  ></script>
</body>

WordPress

// functions.php
function bugspark_widget() {
    echo '<script
      src="https://cdn.jsdelivr.net/npm/@bugspark/widget@latest/dist/bugspark.iife.js"
      data-api-key="YOUR_API_KEY"
      data-endpoint="https://api.bugspark.hillmanchan.com/api/v1"
    ></script>';
}
add_action('wp_footer', 'bugspark_widget');

Getting Your API Key

  1. Go to your BugSpark Dashboard
  2. Navigate to ProjectsCreate Project
  3. Copy the generated API key (starts with bsk_pub_)

License

MIT