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

@leuria/connect

v0.1.5

Published

Leuria's Connect UI as web components: the "Connect your AI" button, the AI status and the Leuria badge, in Leuria Pearl, for any framework.

Readme

@leuria/connect

Leuria's Connect UI as web components, in the Leuria Pearl design system: the pieces a site shows so visitors can bring their own AI. They work in any page and any framework. React apps can use @leuria/react-connect instead.

<leuria-connect-button></leuria-connect-button>
<leuria-ai-status></leuria-ai-status>
<leuria-badge></leuria-badge>

<script type="module">
  import { leuria, promptAPI, createAI, setDefaultClient } from "@leuria/connect/standalone"
  setDefaultClient(createAI({ providers: [leuria({ app: "My shop" }), promptAPI()] }))
</script>

With a bundler, import the client from @leuria/client and the elements from @leuria/connect. Without one, @leuria/connect/standalone is a single file with both (e.g. https://cdn.jsdelivr.net/npm/@leuria/connect/dist/standalone.js).

| Element | What | | --- | --- | | <leuria-connect-button> | "Connect your AI", one per page. Waiting for your approval → Connected (with the visitor's AI, and a menu to disconnect the site), or Not connected · Try again. A click opens Leuria with a leuria://connect link; when Leuria doesn't answer, a dialog offers Download Leuria first, Try again, and, small, the other AIs the visitor may use instead for this page. Attributes: size (1, 2 or 3), hide-byline. Event: leuria-disconnect | | <leuria-ai-status> | Which AI answers right now, as a dot and words: "Your AI · Codex", "This browser's AI", "No AI yet". Property: labels | | <leuria-badge> | A small footer link, "Runs on your AI · leuria". Its content replaces the text. Attribute: href |

Every element takes appearance (light or dark; the visitor's system by default) and uses the client given to setDefaultClient, or its own (element.client = ai). The connect flow is connection() from @leuria/client, so every piece of UI on the page, these elements included, shows the same attempt.

Inside someone else's page. Each element keeps Pearl's tokens and styles in its own shadow root: the host page's CSS neither reaches it nor is changed by it. Hosts may position and size the elements, not recolour them. The font (Plus Jakarta Sans, SIL OFL, in fonts/) is declared once on the page under its own family name, Leuria Sans, and loaded from the package, never from a third party.

src/tokens.ts and fonts/ are generated from packages/pearl/src/tokens.css and @fontsource-variable/plus-jakarta-sans by scripts/prepare.mjs (run on build). Apache-2.0.