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

@cue-vin/player

v0.1.3

Published

Standalone embeddable demo player for cue SDK

Downloads

612

Readme

@cue-vin/player

Standalone embeddable demo player for the cue SDK. Renders a DemoScript as a complete interactive player with screenshot slides, animated pointer, hotspots, annotations, caption, progress indicator, and navigation. Available as a React component or a web component (<cue-embed>).

Install

npm install @cue-vin/player

Peer dependencies: react >=18.0.0, react-dom >=18.0.0.

Quick Start

React Component

import { CuePlayer } from "@cue-vin/player";
import type { DemoScript } from "@cue-vin/core";

const script: DemoScript = {
  id: "product-tour",
  title: "Product Tour",
  steps: [
    { id: "step-1", screen: "/screens/dashboard.png", caption: "Dashboard overview", pointer: { x: 0.25, y: 0.3 }, duration: 5000, hotspots: [{ id: "h1", x: 0.25, y: 0.3, label: "Revenue", alwaysShow: true }] },
    { id: "step-2", screen: "/screens/upload.png", caption: "Upload your data", pointer: { x: 0.5, y: 0.5 }, hotspots: [{ id: "h2", x: 0.5, y: 0.5, label: "Drop zone" }] },
  ],
  loop: true,
  theme: { accent: "#3b82f6", bg: "#0a0a0a" },
};

export default function DemoPage() {
  return (
    <CuePlayer
      script={script}
      width={840}
      height={520}
      autoPlay
      loop
      onStepChange={(step, total) => console.log(`Step ${step + 1}/${total}`)}
      onComplete={() => console.log("Demo complete")}
    />
  );
}

Web Component (HTML snippet)

<script type="module" src="https://unpkg.com/@cue-vin/player/dist/cue-player.iife.js"></script>

<cue-embed src="/demos/product-tour.json" width="840" height="520" loop autoplay></cue-embed>

<script type="module">
  const player = document.querySelector("cue-embed");
  player.addEventListener("stepchange", (e) => console.log(e.detail));
</script>

Programmatic Init

import { initCue } from "@cue-vin/player";
initCue(); // registers <cue-embed> custom element

Export to Standalone HTML

import { exportToHtml } from "@cue-vin/player";
import { writeFileSync } from "fs";

const html = exportToHtml({ script, title: "My Demo", width: 840, height: 520 });
writeFileSync("demo.html", html);
// Or with inline JS for offline use:
// exportToHtml({ script, playerJsInline: true })

Exports

| Export | Kind | Description | |--------|------|-------------| | CuePlayer | Component | React component that renders a DemoScript. | | CuePlayerProps | Type | { script: DemoScript, width?, height?, autoPlay?, loop?, onComplete?, onStepChange? } | | CueEmbed | Class | Custom Element class (<cue-embed>). Attributes: src (URL), data (inline JSON), width, height, autoplay, loop. Dispatches stepchange and complete events. | | initCue | Function | Registers <cue-embed> custom element. Call once before using <cue-embed> in HTML. | | exportToHtml | Function | (options: ExportOptions) => string — generates a self-contained HTML file. Options: { script, title?, playerJsInline?, cdnUrl?, width?, height? }. | | ExportOptions | Type | Options for exportToHtml. |

CuePlayer Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | script | DemoScript | required | DemoScript configuration to render. | | width | number | 840 | Slide width in pixels. | | height | number | 520 | Slide height in pixels. | | autoPlay | boolean | false | Auto-advance steps using step.duration. | | loop | boolean | false | Loop back to step 0 after last step. | | onComplete | () => void | — | Fired when demo reaches last step and cannot advance. | | onStepChange | (step: number, total: number) => void | — | Fired when current step changes. |

<cue-embed> Attributes

| Attribute | Description | |-----------|-------------| | src | URL to fetch DemoScript JSON from. | | data | Inline DemoScript JSON string. | | width | Artboard width (default: 840). | | height | Artboard height (default: 520). | | autoplay | Boolean attribute — auto-advance steps. | | loop | Boolean attribute — loop after last step. |

Dependencies

  • @cue-vin/coreDemoScript, DemoStep, DemoHotspot, DemoAnnotation, PointerState, validateDemoScript
  • @cue-vin/reactScreenSlide, ScriptedPointer, HotspotOverlay, AnnotationLayer, StepProgress, ChapterNav, Annotation