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

slidev-addon-picjs

v0.1.0

Published

Slidev addon that renders picjs diagrams and animations from ```picjs code blocks

Readme

slidev-addon-picjs

A Slidev addon that renders picjs diagrams and animations from fenced code blocks.

Install

npm install slidev-addon-picjs

Then enable it in your deck's headmatter:

---
addons:
  - picjs
---

Use

A static diagram:

```picjs
Palette.current = "shuksan"
box "Input" -> box "Process" fill ~b2 -> box "Output"
```

Words after picjs on the info line select a mode:

| Info line | Result | |---|---| | picjs | static SVG | | picjs animated | diagram with the picjs player (play, scrub, skip, speed) | | picjs animated autoplay | player, and the animation starts when the slide is shown | | picjs example | highlighted source on the left, diagram on the right |

A trailing {...} is bound to the <Picjs> component. width is the one prop worth knowing about; diagrams default to the full content width:

```picjs animated {width: '60%'}
...
```

Diagrams are rendered in the browser, so they follow Slidev's light/dark toggle live. The picjs language is registered with Shiki, so example blocks and ordinary code blocks marked picjs are highlighted.

How it works

  • setup/transformers.ts turns each block into a <Picjs> component with the source compressed into a prop (the same approach Slidev uses for Mermaid).
  • components/Picjs.vue renders the SVG with picjs's string renderer, or hands the container to the picjs player for animated blocks.
  • setup/shiki.ts registers syntaxes/picjs.tmLanguage.json.

Two picjs behaviours the component works around, both candidates for upstream fixes:

  1. Slidev pre-renders neighbouring slides at zero size, and picjs text laid out in a zero-size SVG is never repainted once the slide appears. Rendering is deferred until the host element has a width.
  2. The player builds its own SVG and does not emit the palette CSS that the static renderer puts inside its SVG, so shapes come out black. The component lifts that <style> out of a static render and places it beside the player.

Limitations

  • PDF export captures the first frame of an animation.
  • Animations are not yet tied to Slidev clicks (v-click); use the player controls or autoplay.

Development

npm install
npm run dev        # preview example.md
npm test           # transformer tests
npm run typecheck

Slidev compiles the .ts and .vue files itself; there is no build step.

Related projects

License

MIT