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

@disclosed/widget

v0.1.0

Published

Headless SDK for Disclosed — render your own AI-disclosure UI while Disclosed supplies the wording and logs a tamper-evident record.

Readme

@disclosed/widget

Headless SDK for Disclosed — render your own AI-disclosure UI while Disclosed supplies the wording and logs a tamper-evident record that it was shown (EU AI Act Article 50 + US bot-disclosure laws).

You own the markup. Disclosed owns the disclosure text and the logged render — that's what keeps the compliance evidence valid, so there is no API to change the wording.

React

npm install @disclosed/widget

Drop-in component

The fastest path — render it near your chat and you're compliant. It shows the canonical notice, handles acknowledgement, and logs the verified render itself:

import { Disclosure } from "@disclosed/widget/react";

<Disclosure siteKey="site_live_xxxx" />

Style it with className or style; it ships legible defaults out of the box.

Custom UI (useDisclosure)

For full control over the markup, use the hook and render your own element:

import { useDisclosure } from "@disclosed/widget/react";

export function AiDisclosure() {
  const { content, ref, acknowledge } = useDisclosure({ siteKey: "site_live_xxxx" });
  if (!content) return null;
  return (
    <div ref={ref} className="my-disclosure">
      {content.notice}
      {content.requireAck && <button onClick={acknowledge}>OK</button>}
    </div>
  );
}

Attach ref to the element that contains content.notice. Disclosed verifies it's visible and legible, then logs the render. The hook is SSR-safe and re-logs once per page view.

Vanilla JS

import { createDisclosure } from "@disclosed/widget";

const d = await createDisclosure({ siteKey: "site_live_xxxx" });
d?.ready((content) => {
  const el = document.querySelector("#ai-disclosure")!;
  el.textContent = content.notice;
  d.observe(el);
});

Get your site key from the Disclosed dashboard (open a chatbot → Install snippet → Headless SDK). Brand color, position, theme, and languages are configured in the dashboard, not in code.

Local development

By default the SDK loads from the Disclosed CDN. To test against a local or staging deployment, pass scriptUrl (accepted by <Disclosure>, useDisclosure, and createDisclosure):

<Disclosure siteKey="site_live_xxxx" scriptUrl="http://localhost:3177/widget-headless.js" />