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

@martin0309205/click-annotate

v0.2.0

Published

Click any DOM element → annotate it → generate a rich, copy-pasteable prompt for code agents.

Readme

@martin0309205/click-annotate

Click any DOM element → annotate it → generate a rich, copy-pasteable prompt for code agents (Claude, Cursor, GPT).

Zero per-component wraps. Wrap your app once, hit "Annotate", click anything, write a note. Hit Copy — the prompt lands in your clipboard with full context: selector, classes, ancestry, position, role, aria-label.

Install

npm install @martin0309205/click-annotate

Peers: react, react-dom, framer-motion, @hugeicons/react, @hugeicons/core-free-icons.

Use

// app/layout.tsx
import { AnnotateProvider } from "@martin0309205/click-annotate";

export default function RootLayout({ children }) {
  return (
    <html>
      <body>
        <AnnotateProvider>{children}</AnnotateProvider>
      </body>
    </html>
  );
}

That's it. A floating "Annotate" button appears bottom-right. Click it, then click any element on your page.

Production safety: by default the provider is enabled only in development (process.env.NODE_ENV !== "production"). In a production build it short-circuits to a passthrough — no listeners, no UI, no localStorage writes. Override with the enabled prop:

<AnnotateProvider enabled={true}>{children}</AnnotateProvider>   // force on (e.g. preview env)
<AnnotateProvider enabled={false}>{children}</AnnotateProvider>  // force off

Workflow

  1. Toggle Annotate mode (bottom-right floating button).
  2. Hover over any DOM element — see a label with tag.classes · "text content".
  3. Click → popover opens with a textarea.
  4. Type your feedback, save (Cmd/Ctrl + Enter).
  5. Repeat across your pages — annotations persist via localStorage.
  6. Click View prompt → see all annotations + the generated prompt.
  7. Click Copy entire prompt — the prompt is in your clipboard, and the annotations auto-archive (so the next prompt starts fresh).
  8. Paste in your code agent.

What gets captured

For every clicked element:

  • Tag (<button>, <div>, <h2>)
  • Stable selector (button.bg-brand.h-11.px-5)
  • All Tailwind / utility classes
  • Truncated text content
  • 4-deep parent chain (ancestry)
  • On-screen rect (x, y, width, height)
  • ARIA role + aria-label
  • Page pathname

Generated prompt format

Fix the following items. Each item shows the clicked element with its full
context — selector, classes, ancestry, on-screen position, and the change
requested. Apply the fixes in order, then summarise what you fixed.

## /design-system/foundations

### 1. `<button>` — "Book the audit"

- **Selector**: `button.bg-brand.text-text-on-brand.h-11.px-5`
- **Classes**: `astry-button.inline-flex.items-center.justify-center...`
- **Ancestry**: `header.h-16 > div.flex > nav > button`
- **Rect**: x=1280, y=120, 156×44px
- **Note**: too big relative to the logo, should be size sm

API

import {
  AnnotateProvider,        // wrap your app
  useAnnotate,             // hook for advanced control
  type Annotation,         // captured annotation type
} from "@martin0309205/click-annotate";

The provider auto-mounts the toolbar + overlay + drawer. To opt out, render null from a custom toolbar slot (advanced).

Persistence

Annotations live in localStorage under astry-ds-annotations-v2. They survive page navigation, refreshes, and tab close.

Archiving

When you copy a prompt, all active annotations are auto-archived. Archived items show in a separate fade-out section in the drawer with line-through styling. Re-archive anytime, delete forever, or clear all archived in one click.

Ignoring elements

Tag any DOM subtree with data-annotate-ignore and the system won't react to clicks or hover on it. Useful for dev overlays, third-party widgets, etc.

Keyboard

  • Escape → close popover, then exit annotate mode
  • Cmd/Ctrl + Enter → save annotation

Versions

  • v0.1 — initial release. Auto-detect, archive workflow, rich prompt generation.

License

MIT