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

@forgedevstack/torch

v1.0.0

Published

The media engine of ForgeStack — video, audio, reels, and ad players. Tracking-ready, theme-aware, fully configurable.

Downloads

120

Readme

@forgedevstack/torch

The media engine of ForgeStack: React components for video, audio, vertical reels, and ads, with a configurable TorchTracker pipeline for analytics and CMS-driven settings.

Install

npm install @forgedevstack/torch react react-dom

Import the bundled stylesheet once (Tailwind-based; required for layout and animations):

import '@forgedevstack/torch/styles.css';

Quick start

Wrap your app (or a subtree) with TorchProvider so players share accent color, default tracking, and optional icon overrides.

import { TorchProvider, TorchPlayer } from '@forgedevstack/torch';
import '@forgedevstack/torch/styles.css';

export function App() {
  return (
    <TorchProvider
      config={{
        accentColor: '#f97316',
        tracking: { enabled: true, onEvent: (e) => console.log(e) },
      }}
    >
      <TorchPlayer src="https://example.com/video.mp4" poster="https://example.com/poster.jpg" size="md" />
    </TorchProvider>
  );
}

TorchProvider

| Option | Type | Description | |--------|------|-------------| | config.accentColor | string | Default accent for controls, progress, highlights (hex/CSS color). | | config.defaultSize | 'sm' \| 'md' \| 'lg' \| 'full' | Reserved for future defaults. | | config.defaultMode | 'static' \| 'sticky' | Reserved for future defaults. | | config.tracking | TorchTrackingConfig | Global tracking defaults (see below). | | config.icons | Partial<TorchIcons> | Slot overrides for play/pause/fullscreen/etc. (optional). |

Use useTorchContext() to read { accentColor, tracking, icons } inside custom UI.


Tracking (TorchTrackingConfig + TorchTracker)

| Field | Type | Description | |-------|------|-------------| | enabled | boolean | Master switch. | | onEvent | (event: TorchEvent) => void | Fires for each tracked event. | | batchInterval | number | Ms between flushes; 0 = immediate. | | include | TorchEventName[] | Allow-list; omit = all events. | | exclude | TorchEventName[] | Deny-list. |

Event names include: play, pause, stop, ended, seek, mute, unmute, fullscreen, error, ad-impression, ad-click, ad-skip, ad-complete, reel-swipe, reel-like, reel-share, reel-follow, track-change, and others (see TorchEventName in types).

Construct TorchTracker directly when you need the same batching/filtering outside React (e.g. custom players).


TorchPlayer (standard video / audio)

| Prop | Type | Default | Description | |------|------|---------|-------------| | src | string | — | Required. Media URL. | | type | 'video' \| 'audio' | 'video' | Media kind. | | poster | string | — | Poster / cover image. | | size | 'sm' \| 'md' \| 'lg' \| 'full' | 'md' | Max width & control sizing. | | autoPlay | boolean | false | | | loop | boolean | false | With a playlist, loop is managed per track. | | muted | boolean | false | | | accentColor | string | from provider | | | centerOverlay | boolean | false | Large center play/pause on video. | | mode | 'static' \| 'sticky' | 'static' | sticky = scroll-following mini player (video). | | stickyPosition | 'top-left' \| 'top-right' \| 'bottom-left' \| 'bottom-right' | 'bottom-right' | Corner when sticky. | | stickySize | number | library default | Width of sticky frame (px). | | playlist | TorchTrack[] | — | Enables gallery + skip prev/next. | | onTrackChange | (index, track) => void | — | | | tracking | TorchTrackingConfig | from provider | | | containerStyle | CSSProperties | — | Wrapper styles. | | testId | string | — | data-testid. |

Also accepts standard HTMLAttributes<HTMLDivElement> (excluding children).


ReelPlayer (vertical feed)

| Prop | Type | Default | Description | |------|------|---------|-------------| | items | TorchReelItem[] | — | Required. Each item extends TorchTrack with optional avatar, username, description, counts, liked, following. | | startIndex | number | 0 | | | autoPlay | boolean | true | | | loop | boolean | true | Per-clip loop. | | muted | boolean | true | | | accentColor | string | from provider | | | showActions | boolean | true | Like / comment / share / follow UI (callbacks only — no network). | | callbacks | TorchReelCallbacks | — | onLike, onShare, onFollow, onComment with (index, item). | | tracking | TorchTrackingConfig | from provider | |


AdPlayer (pre/post-roll, skip, CTA)

| Prop | Type | Default | Description | |------|------|---------|-------------| | src | string | — | Required. Main content URL. | | poster | string | — | Main poster. | | type | 'video' \| 'audio' | 'video' | | | ads | TorchAdItem[] | — | Required. Each ad: src, optional poster, skipAfter (seconds until skip; -1 = no skip), clickUrl, adId, position (pre-roll | mid-roll | post-roll). | | size | 'sm' \| 'md' \| 'lg' \| 'full' | 'md' | | | autoPlay | boolean | true | | | muted | boolean | false | | | accentColor | string | from provider | | | onAdSkip | (ad) => void | — | | | onAdComplete | (ad) => void | — | | | onAdClick | (ad) => void | — | | | tracking | TorchTrackingConfig | from provider | |


Hooks

| Hook | Purpose | |------|---------| | useTorchPlayer | Shared playback state for custom TorchPlayer-like UIs (tracks, seek, playlist index). | | useTorchSticky | Scroll-following / PiP-style positioning for mode="sticky". | | useReelPlayer | Reel index, gestures, mute, progress, and tracking for ReelPlayer. |


Constants (SDK)

Re-exported from the package (see src/constants/torch.const.ts): DEFAULT_ACCENT, SIZE_MAP, REEL_ASPECT_RATIO, REEL_MAX_WIDTH, AD_SKIP_COUNTDOWN_DEFAULT, etc.


Monorepo / contributor aliases

Inside the Torch package source, imports use:

  • @torch-types/*not @types/* (reserved for DefinitelyTyped)
  • @const/*, @core/*, @hooks/*, @context/*, @utils/*, @components/*

Docs site

See forge/torch-portal for a Bear UI + Forge Compass demo (EN/ES), embed code samples, and live players.

License

MIT