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

@segmento/waitlist-ui

v0.5.0

Published

Segmento waitlist modal — pure HTML/CSS/JS with shadow DOM

Downloads

45

Readme

@segmento/waitlist-ui

Drop-in referral modal for the Segmento SDK. A shadow-DOM custom element that handles wallet connect, message signing, and lead submission — no framework required.

Installation

npm install @segmento/waitlist-ui @segmento/core @segmento/lead

Usage

import { SegmentoClient } from "@segmento/core";
import { defineSegmentoModal, SegmentoModal } from "@segmento/waitlist-ui";

// Initialise once — stored globally, no need to pass it to the modal
SegmentoClient.init("your_project_token");

// Register the custom element and set required fields
defineSegmentoModal({
  emailRequired:    true,
  walletRequired:   true,
  telegramRequired: false,
});

// Create the modal — client is resolved automatically from the global instance
const modal = new SegmentoModal({
  onSuccess: () => console.log("Lead submitted!"),
  onClose:   () => console.log("Modal closed"),
});

// Open on demand
document.getElementById("join-btn").addEventListener("click", () => modal.open());

Configuration

defineSegmentoModal(config?)

Sets defaults applied to every modal instance. Call once at app startup.

| Option | Type | Default | Description | |---|---|---|---| | emailRequired | boolean | false | Email must be filled before submitting | | telegramRequired | boolean | false | Telegram handle must be filled | | walletRequired | boolean | false | Wallet must be connected and signed |

new SegmentoModal(options)

Per-instance options (extend RequiredFieldsConfig):

| Option | Type | Required | Description | |---|---|---|---| | client | SegmentoClient | No | Client instance. Defaults to the global set by SegmentoClient.init() | | onConnectWallet | () => Promise<WalletAdapter> | No | Custom wallet connection. Defaults to window.solana | | title | string | No | Modal heading (default: "Join the waitlist") | | onSuccess | () => void | No | Called after successful submission | | onClose | () => void | No | Called when modal is dismissed |

Theming

All colors are CSS strings and optional.

| Option | Default | Description | |---|---|---| | bgColor | #0c1117 | Modal background | | primaryColor | #5ee9b5 | Submit button, focus rings, wallet button | | secondaryColor | #5ee9b5 | Success states, signed wallet button | | textColor | #f0f6fc | Headings and input values | | labelColor | #6b7f99 | Field labels and muted text |

defineSegmentoModal({
  bgColor:      "#18181b",
  primaryColor: "#6366f1",
});

Referral codes

The modal automatically reads ?ref= from the current URL and includes it in the submission. No extra setup needed.

Browser support

Uses native <dialog> (top layer) and shadow DOM. Works in all modern browsers.