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

@clearestimates/embed

v0.0.20

Published

This package provides an easy way to embed the Clear Estimates widget into any website using a simple script tag.

Readme

Clear Estimates Embed Package

This package provides an easy way to embed the Clear Estimates widget into any website using a simple script tag.

Overview

The embed package creates a JavaScript bundle that can be loaded directly in the browser without requiring a build step or React in your host application. It dynamically injects the widget into your page.

Usage

Basic Installation

Add this script to your HTML page:

<script 
  src="https://cdn.clearestimates.com/embed/estimate-builder.js" 
  data-estimate-embed-api-key="your-api-key-here"
  data-estimate-embed-api-url="https://api.clearestimates.com"
  data-estimate-embed-style="inline"
></script>

<!-- Add an element where you want the widget to appear -->
<div id="estimate-builder-container"></div>

Configuration Attributes

All configuration is done through data attributes on the script tag:

| Attribute | Description | Required | |-----------|-------------|----------| | data-estimate-embed-api-key | Your Clear Estimates API key | Yes | | data-estimate-embed-api-url | API endpoint URL | Yes | | data-estimate-embed-style | Display mode: "inline" or "popover" | No (defaults to "inline") |

Display Modes

Inline Mode

The widget will be rendered directly in your page:

<script 
  src="https://cdn.clearestimates.com/embed/estimate-builder.js" 
  data-estimate-embed-api-key="your-api-key"
  data-estimate-embed-api-url="your-api-url"
  data-estimate-embed-style="inline"
></script>

Popover Mode

The widget will appear as a button that opens a popover dialog when clicked:

<script 
  src="https://cdn.clearestimates.com/embed/estimate-builder.js" 
  data-estimate-embed-api-key="your-api-key"
  data-estimate-embed-api-url="your-api-url"
  data-estimate-embed-style="popover"
></script>

Development

Prerequisites

  • Node.js 18+
  • pnpm

Commands

  • pnpm dev: Start development server
  • pnpm build: Build for production
  • pnpm preview: Preview the build locally
  • pnpm clean: Clean build artifacts

Project Structure

src/
├── index.tsx    # Main entry point
└── utils.ts     # Utility functions for configuration

Performance Considerations

The embed script is optimized for performance, but keep these best practices in mind:

  1. Place the script near the end of your <body> tag to avoid blocking page rendering
  2. Consider using the async attribute on the script tag
  3. The "popover" mode has less impact on initial page load time

Troubleshooting

Script Not Loading

  • Check that the URL to the script is correct
  • Ensure there are no network errors in your browser's console

Widget Not Appearing

  • Verify that all required data attributes are set correctly
  • Check for any JavaScript errors in the browser console
  • Ensure you have an element with the ID estimate-builder-container for inline mode