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

@kissmybutton/mc-code

v0.0.1

Published

MotorCortex code display plugin — Shiki syntax highlighting with line-level animation

Readme

@kissmybutton/mc-code

MotorCortex plugin for displaying syntax-highlighted code with line-level animation.

Installation

npm install @kissmybutton/mc-code

Peer dependency: @donkeyclip/motorcortex >= 9.24.0

Supported languages

JavaScript, TypeScript, Python, Bash, JSON, YAML, HTML, CSS. Each with language-specific keyword coloring, comment styles, and structural highlighting.

Quick start

import { HTMLClip, loadPlugin } from "@donkeyclip/motorcortex";
import Player from "@donkeyclip/motorcortex-player";
import codeDef from "@kissmybutton/mc-code";

const McCode = loadPlugin(codeDef);

const clip = new HTMLClip({
  html: '<div id="scene" style="width:100%;height:100%;"></div>',
  host: document.getElementById("clip"),
  containerParams: { width: "900px", height: "600px" },
});

const codeClip = new McCode.Clip(
  {
    code: 'function hello() {\n  return "world";\n}',
    language: "javascript",
    theme: "dark",
    fontSize: 15,
  },
  {
    selector: "#scene",
    containerParams: { width: "900px", height: "600px" },
  },
);

// Progressive write-in
codeClip.addIncident(
  new McCode.WriteCode(
    { animatedAttrs: { writeCode: 1 } },
    { selector: "!#code", duration: 2000 },
  ),
  500,
);

// Highlight line 1
codeClip.addIncident(
  new McCode.CodeHighlight(
    { animatedAttrs: { highlightLine_1: 1 }, color: "rgba(99,102,241,0.35)" },
    { selector: "!#code", duration: 800 },
  ),
  3000,
);

clip.addIncident(codeClip, 0);
new Player({ clip });

Clip attrs

| Attr | Type | Default | Description | | ---------- | ------ | -------------- | ------------------------------------ | | code | string | "" | The source code to display | | language | string | "javascript" | Language for syntax coloring | | theme | string | "dark" | Color theme: "dark" or "light" | | fontSize | number | 14 | Font size in pixels |

Incidents

WriteCode (Effect)

Progressively reveals code lines with a typewriter-style animation.

new McCode.WriteCode(
  { animatedAttrs: { writeCode: 1 } },  // 0 = hidden, 1 = fully visible
  { selector: "!#code", duration: 3000 },
);

CodeHighlight (Effect)

Pulses a line's background color with a double-pump effect. Each line needs a unique attr key highlightLine_N where N is the 0-based line index.

// Highlight line 5 (green)
new McCode.CodeHighlight(
  { animatedAttrs: { highlightLine_5: 1 }, color: "rgba(46,160,67,0.3)" },
  { selector: "!#code", duration: 800 },
);

// Multiple lines don't conflict because each has a unique key
new McCode.CodeHighlight(
  { animatedAttrs: { highlightLine_8: 1 }, color: "rgba(231,111,81,0.3)" },
  { selector: "!#code", duration: 800 },
);

Line IDs

Each line in the rendered code gets an id: line_0, line_1, line_2, etc. (0-based).

Themes

Dark (default)

Dark background (#1e1e2e) with Catppuccin-inspired token colors.

Light

Light background (#fafafa) with One Light-inspired token colors.

License

MIT