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

fast-draft

v0.6.39

Published

Syntax highlighting, live parser validation, and interactive canvas editor for .fd (Fast Draft) files

Readme

Fast Draft

A token-efficient file format and interactive canvas for drawing, design, and animation. Built in Rust + WASM.

What You Get

Install this extension and every .fd file lights up — syntax colors, instant error detection, and a visual canvas that renders your design in real time. Think Figma meets code.

| You write this... | ...and get this | | ---------------------------------------------- | ------------------------------ | | rect @box { w: 200 h: 100 } | A colored rectangle on canvas | | text @title "Hello" { font: "Inter" 600 24 } | Styled text, visually rendered | | anim :hover { fill: #5A4BD1 } | Hover animation metadata | | @card -> center_in: canvas | Constraint-based auto-layout |


Features

🎨 Syntax Highlighting

Rich TextMate-based syntax highlighting for .fd files:

  • Node keywordsgroup, rect, ellipse, text, path
  • Style blocksstyle accent { fill: #6C5CE7 }
  • Node IDs@login_form, @button
  • Hex colors#FF5733, #1A1A2E
  • Propertiesw:, h:, fill:, font:, layout:
  • Animationsanim :hover { ... }
  • Comments# This is a comment

✅ Live Parser Validation

Real-time error detection as you type:

  • Mismatched braces → red squiggles + Problems panel
  • Invalid hex colors like #GGG or #12345 → instant feedback
  • Debounced — validates 300ms after you stop typing (no lag)

🖼️ Interactive Canvas

A live-rendering canvas powered by Rust/WASM:

  • Bidirectional sync — change the text and the canvas updates; drag on canvas and the text updates
  • Select tool (V) — click to select nodes, drag to move
  • Rect tool (R) — click + drag to draw new rectangles
  • Undo/RedoCmd+Z / Cmd+Shift+Z
  • Resize-aware — canvas adapts to your panel size

🌳 Tree Preview

View the parsed scene graph as a structural tree:

  • Open via Command PaletteFD: Show Tree Preview
  • Shows node hierarchy: groups → children → properties
  • Updates live as you edit

Interactive Usage Guide

1. Create a new .fd file

# FD v1
# My first design

rect @hero {
  w: 400 h: 300
  corner: 16
  fill: #6C5CE7
}

@hero -> center_in: canvas

Save as hello.fd — syntax highlighting activates automatically.

2. Open the Canvas Editor

  • Right-click the file → Open With...FD Canvas
  • Or use Command PaletteFD: Open Canvas Editor

The canvas renders your design. Edit the text on the left; see changes on the right.

3. Draw on the Canvas

Switch tools with keyboard shortcuts:

| Key | Tool | Action | | ------------- | ------ | ------------------------------- | | V | Select | Click to select, drag to move | | R | Rect | Click + drag to draw rectangles | | Cmd+Z | Undo | Undo last action | | Cmd+Shift+Z | Redo | Redo last undone action |

When you draw a rectangle on canvas, the corresponding FD code is automatically generated in the text editor.

4. Inspect the Scene Graph

Open Command PaletteFD: Show Tree Preview to see:

Scene Graph
├── style accent
├── group @login_form
│   ├── text @title "Welcome Back"
│   ├── rect @email_field
│   │   └── text @email_hint "Email"
│   ├── rect @pass_field
│   │   └── text @pass_hint "Password"
│   └── rect @login_btn
│       └── text @btn_label "Sign In"
└── @login_form → center_in: canvas

5. Catch Errors Instantly

Try typing an invalid color:

rect @broken {
  fill: #GGG     # ← red squiggle: "Invalid hex color"
  w: 100 h: 50

↑ Missing } — the Problems panel shows: "1 unclosed brace(s)"


Example: Login Form

# FD v1
# A login form mockup

style base_text {
  font: "Inter" 14
  fill: #333333
}

style accent {
  fill: #6C5CE7
}

group @login_form {
  layout: column gap=16 pad=32

  text @title "Welcome Back" {
    use: base_text
    font: "Inter" 600 24
    fill: #1A1A2E
  }

  rect @email_field {
    w: 280 h: 44
    corner: 8
    stroke: #DDDDDD 1

    text @email_hint "Email" {
      use: base_text
      fill: #999999
    }
  }

  rect @login_btn {
    w: 280 h: 48
    corner: 10
    use: accent

    text @btn_label "Sign In" {
      font: "Inter" 600 16
      fill: #FFFFFF
    }

    anim :hover {
      fill: #5A4BD1
      scale: 1.02
      ease: spring 300ms
    }
  }
}

@login_form -> center_in: canvas

What this produces:

  • A vertical card with 16px gap between elements
  • A title, email input field, and a purple Sign In button
  • The button has a hover animation (color shift + subtle scale)
  • The entire form is centered on the canvas

Why FD?

| vs. SVG | vs. Figma | vs. HTML/CSS | | ----------------------------------------------- | ------------------------------------------------- | ------------------------------------------------------- | | 5× fewer tokens — AI can generate it faster | Code-first — version control, diffs, PRs | Semanticcenter_in: canvas not margin: 0 auto | | Constraint-based — no absolute coords | Open format — no vendor lock-in | GPU-rendered — Vello/wgpu pipeline | | Bidirectional — edit code or canvas | Extensible — custom nodes, styles, animations | WASM — same renderer on web, desktop, mobile |

Requirements

  • VS Code ≥ 1.85.0

Links

License

MIT