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

@lyric-video-maker/plugin-base

v0.5.1

Published

Plugin SDK for Lyric Video Maker

Readme

@lyric-video-maker/plugin-base

Plugin SDK for Lyric Video Maker. Provides TypeScript types, modifier contracts, the useContainerSize hook, and transform/timing helpers for building external plugins.

Install

npm install --save-dev @lyric-video-maker/plugin-base

React is a peer dependency:

npm install --save-dev react

Quick Start

Create a plugin entry point that exports an activate function:

import type {
  LyricVideoPluginActivation,
  LyricVideoPluginHost,
  SceneComponentDefinition,
} from "@lyric-video-maker/plugin-base";

interface MyOptions extends Record<string, unknown> {
  textColor: string;
}

export function activate(host: LyricVideoPluginHost): LyricVideoPluginActivation {
  const { React } = host;

  const component: SceneComponentDefinition<MyOptions> = {
    id: "myplugin.hello",
    name: "Hello World",
    options: [
      { id: "textColor", label: "Text Color", type: "color", defaultValue: "#ffffff" },
    ],
    defaultOptions: {
      textColor: "#ffffff",
    },
    Component({ options, containerRef }) {
      return React.createElement(
        "div",
        {
          ref: containerRef,
          style: {
            width: "100%",
            height: "100%",
            color: options.textColor,
            fontSize: 48,
          },
        },
        "Hello from my plugin!"
      );
    },
  };

  return { components: [component], scenes: [] };
}

Position, timing, opacity, and visibility are handled by the built-in modifier stack — users add modifiers to the component instance in the app. Plugins can also contribute their own modifier definitions.

Bundle to CommonJS (e.g. with tsup):

npx tsup src/plugin.ts --format cjs --out-dir dist --out-extension .cjs

What's Included

  • Types -- SceneComponentDefinition, SceneDefinition, LyricVideoPluginHost, render props, option schema types, lyric runtime, video settings, and more.
  • Modifier contract -- ModifierDefinition, ModifierInstance, ModifierApplyContext for building custom modifiers that plug into the per-component modifier stack.
  • useContainerSize hook -- read the pixel size of the box a modifier stack has given your component.
  • Transform / timing helpers -- computeTransformStyle(), computeTimingOpacity(), and the matching option categories and defaults — the same pure helpers that power the built-in Transform and Timing modifiers, usable in custom modifiers.
  • Plugin asset helpers -- createPluginAssetUri(), parsePluginAssetUri() for bundling images and videos with your plugin.

Documentation

Full plugin authoring guide: Plugin Development

Docs site: mrkmg.github.io/LyricVideoMaker

License

MIT