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

@miraiclip/react

v0.3.4

Published

React bindings for Miraiclip: providers, state hooks, playback, timeline behaviour hooks, and unstyled editor components.

Readme

@miraiclip/react

React bindings for Miraiclip: providers for a project and its preview, narrow state hooks, the timeline behaviour an editor needs, and unstyled components that carry that behaviour while you supply the look. The logic lives in @miraiclip/editor and @miraiclip/renderer; this package adapts it to React.

Install

npm install @miraiclip/core @miraiclip/renderer @miraiclip/react

Usage

import { ProjectProvider, PlaybackProvider, usePlayback, useClips, useUndoRedo } from "@miraiclip/react";

export function App() {
  return (
    <ProjectProvider init={{ width: 1920, height: 1080, fps: 30 }}>
      <PlaybackProvider volumeStorageKey="my-editor:volume">
        <Transport />
      </PlaybackProvider>
    </ProjectProvider>
  );
}

function Transport() {
  const { isPlaying, toggle } = usePlayback();
  const { canUndo, undo } = useUndoRedo();
  return (
    <>
      <button onClick={toggle}>{isPlaying ? "Pause" : "Play"}</button>
      <button disabled={!canUndo} onClick={undo}>Undo</button>
    </>
  );
}

| Area | Hooks and components | | --- | --- | | Project | ProjectProvider, ProjectSessionProvider, useProject, useProjectSession | | State | useProjectState, useSettings, useTracks, useTrack, useClips, useClip, useClipCount, useTransitions, useSelection, useSelectedClip, useDurationUs | | Playhead | usePlayheadUs (re-renders), usePlayheadRef (no re-render) | | Editing | useCommands, useUndoRedo, useGesture, useEditorShortcuts | | Preview | PlaybackProvider, usePlayback (attach a <canvas>, play, seek, volume, hit-testing) | | Timeline | useCompositorPlayhead, useVisibleRange, usePlayheadFollow, useTimelineZoom | | Components | <Timeline.*>, <Preview>, <Scrubber.*>, <Waveform> + useWaveformPeaks, <TransformBox.*> |

Components

The components render plain elements with no styles beyond layout (positions, sizes, scrolling). State shows up as data attributes, so you style them with Tailwind variants or CSS:

import { Timeline, useTracks } from "@miraiclip/react";

function Tracks({ pxPerSecond }: { pxPerSecond: number }) {
  const tracks = useTracks();
  return (
    <Timeline.Root pxPerSecond={pxPerSecond} className="h-64">
      <Timeline.Viewport className="h-full">
        <Timeline.Ruler className="h-6 border-b">
          <Timeline.Playhead className="h-full w-px bg-red-500" />
        </Timeline.Ruler>
        {tracks.map((track) => (
          <Timeline.Track key={track.id} track={track} className="h-12">
            <Timeline.Lane className="border-b data-[drop-target]:bg-sky-50">
              {(clip) => (
                <Timeline.Clip clip={clip} className="h-10 rounded bg-sky-200 data-[selected]:ring-2">
                  <Timeline.TrimHandle side="start" className="w-1.5 bg-sky-500" />
                  <Timeline.TrimHandle side="end" className="w-1.5 bg-sky-500" />
                </Timeline.Clip>
              )}
            </Timeline.Lane>
          </Timeline.Track>
        ))}
      </Timeline.Viewport>
    </Timeline.Root>
  );
}

Lanes render only the clips in view, drags snap and land as one undo step, and the playhead moves on the compositor. <Preview> with <TransformBox.*> inside gives the canvas side: select, move, scale and rotate clips with frame snapping.

Documentation: docs.miraiclip.com · Source