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

@postnikdaniil/vue-annotator

v0.1.9

Published

Visual annotation tool for Vue 2.7+/3 apps

Readme

@postnikdaniil/vue-annotator

Dev-only visual annotation tool for Vue 2.7+ / Vue 3 apps. Click any element, leave a comment, export as markdown. No server required — everything stays in localStorage.

Install

npm install @postnikdaniil/vue-annotator

Quick Start

Plugin (recommended)

Auto-mounts the toolbar into document.body:

// main.ts
import { createApp } from 'vue'
import { VueAnnotatorPlugin } from '@postnikdaniil/vue-annotator'
import App from './App.vue'

const app = createApp(App)

if (import.meta.env.DEV) {
  app.use(VueAnnotatorPlugin)
}

app.mount('#app')

Component

If you need more control over placement:

<script setup>
import { VueAnnotator } from '@postnikdaniil/vue-annotator'
</script>

<template>
  <VueAnnotator />
</template>

Vue 2.7

Works the same way via vue-demi:

// main.js
import Vue from 'vue'
import { VueAnnotatorPlugin } from '@postnikdaniil/vue-annotator'

if (process.env.NODE_ENV === 'development') {
  Vue.use(VueAnnotatorPlugin)
}

How It Works

  1. Click the inspect button (target icon) in the toolbar
  2. Hover over any element — it highlights with component name tooltip
  3. Click an element to select it
  4. Type your annotation in the popup, press Cmd/Ctrl+Enter or click Add
  5. Numbered markers appear on annotated elements
  6. Click Export to copy all annotations as markdown

Toolbar Buttons

| Button | Action | |--------|--------| | Target | Toggle inspect mode | | Clipboard | Export annotations to clipboard as markdown | | Trash | Clear all annotations on current page | | Minus | Hide toolbar (click eye icon to restore) |

Keyboard Shortcuts

  • Escape — cancel inspect mode or close popup
  • Cmd/Ctrl+Enter — submit annotation

Export Format

Annotations are exported as markdown:

## Annotations (2)

1. <ProductCard> (div.product-card, section.catalog > div.product-card:nth-child(1)): "increase bottom padding"
2. <AddToCartButton> (button.btn-primary "Buy", div.product > button.btn-primary): "make it green"

Each line includes: component name, element description, CSS selector, and your comment.

Features

  • Vue 2.7+ and Vue 3 — uses vue-demi for compatibility
  • Component detection — shows Vue component names and hierarchy (<App> -> <ProductPage> -> <AddToCartButton>)
  • Unique selectors — generates CSS selectors with :nth-child() for disambiguation
  • localStorage persistence — annotations survive page reload
  • SPA navigation — annotations are scoped per route (pathname + hash)
  • Detached annotations — if an annotated element disappears from DOM, annotations are shown in a separate panel
  • Self-contained — CSS-in-JS, no external stylesheets needed
  • Dev-only — designed to be tree-shaken in production builds

API

Exports

import { VueAnnotator, VueAnnotatorPlugin } from '@postnikdaniil/vue-annotator'
import type { Annotation, InspectorTarget } from '@postnikdaniil/vue-annotator'

VueAnnotatorPlugin

Vue plugin. Call app.use(VueAnnotatorPlugin) to auto-mount the toolbar.

VueAnnotator

The toolbar Vue component. Use directly if you need manual control over mounting.

Types

interface Annotation {
  id: string
  comment: string
  element: string        // "button.btn-primary"
  elementPath: string    // unique CSS selector
  componentName: string  // "<AddToCartButton>"
  componentChain: string // "<App> -> <ProductPage> -> <AddToCartButton>"
  timestamp: number
}

interface InspectorTarget {
  el: HTMLElement
  element: string
  elementPath: string
  componentName: string
  componentChain: string
  rect: DOMRect
}

Requirements

  • Vue >= 2.7 or Vue >= 3.0
  • Browser with localStorage support
  • Dev mode only — Vue component detection relies on internal properties (__vueParentComponent, __vue__) that are stripped in production builds

License

MIT