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

ec-magic-move

v1.0.1

Published

A port of shiki-magic-move as a plugin for Expressive Code

Readme

shiki-magic-move Plugin For Expressive Code

A port of shiki-magic-move for Expressive Code.

Examples

Installation

npm install ec-magic-move
# pnpm install ec-magic-move
# bun install ec-magic-move
# yarn add ec-magic-move

Usage

Add the plugin to your Expressive Code configuration:

import { defineConfig } from 'astro/config';
import { pluginMagicMove } from 'ec-magic-move';

export default defineConfig({
  integrations: [
    starlight({
      expressiveCode: {
        plugins: [pluginMagicMove()],
      },
    }),
  ],
});

In the individual code blocks, add the following two line ranges (defined by a start and an end):

  • magic-move-before
  • magic-move-after
```ts magic-move-before={1-12} magic-move-after={13-26}

[!NOTE] If there are errors in the ranges (i.e. the start of the after block is smaller than the end of the start block), an error is displayed at the bottom of the codeblock. This way, the server doesn't crash due to misconfigurations.

Configuration

The plugin accepts an optional configuration object:

pluginMagicMove({
 duration: 800, // the duration of the animation in milliseconds
 stagger: 3, // the stagger between the individual tokens, also in milliseconds
 lineNumbers: true, // whether or not to show line numbers
 theme: 'catppuccin-mocha', // the theme of the shiki highlighter
 buttonPosition: 'bottom-right', // the position of the play button
})

Options

  • duration: the duration of the animation in milliseconds (default: 800)
  • stagger: the stagger between the individual tokens, also in milliseconds (default: 3)
  • lineNumbers: whether or not to show line numbers (default: true)
  • theme: the theme of the shiki highlighter (default: catppuccin-mocha, possible values: all shiki themes)
  • buttonPosition: the position of the play button (default: bottom-right, other possible values: bottom-left, top-right, top-left)

Per-Block Customization

You can override settings for individual code blocks using meta attributes:

```js magic-move-duration="400"
// Animation takes 400ms
```js magic-move-stagger="5"
// Animation has a stagger of 5ms
```ts magic-move-line-numbers="false"
// No line numbers on this block

Available Meta Attributes

  • magic-move-duration="value": Override the animation duration for this block
  • magic-move-stagger="value": Override the animation stagger for this block
  • magic-move-line-numbers="boolean": Decide per block whether or not to show the line numbers