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

@thinkflagship/horizon-web-shorts

v1.0.10

Published

A React web SDK for integrating short-form video content with customizable UI components and video playback capabilities

Readme

@thinkflagship/horizon-web-shorts

A React web SDK for integrating short-form video content with customizable UI components and video playback capabilities.

⚠️ Important: This SDK is a client-side only component and requires client-side rendering.

Installation

Install the package using your preferred package manager:

npm install @thinkflagship/horizon-web-shorts
yarn add @thinkflagship/horizon-web-shorts
pnpm add @thinkflagship/horizon-web-shorts

Import CSS

import "@thinkflagship/horizon-web-shorts/styles.css";

Setup

For Next.js (App Router)

  1. Create a client component wrapper (e.g., components/FlagshipProvider.tsx):
"use client";

import { FlagshipContainer } from "@thinkflagship/horizon-web-shorts";
import "@thinkflagship/horizon-web-shorts/styles.css";

export default function FlagshipProvider({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <FlagshipContainer licenseKey="your-license-key">
      {children}
    </FlagshipContainer>
  );
}
  1. Use the wrapper in your layout or page:
// app/layout.tsx or app/page.tsx
import FlagshipProvider from "@/components/FlagshipProvider";

export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <html lang="en">
      <body>
        <FlagshipProvider>{children}</FlagshipProvider>
      </body>
    </html>
  );
}
  1. Use EntryPoints in your pages:
// app/page.tsx

"use client";

import {
  EntryPoint,
  EntryPointType,
  EntryPointSize,
} from "@thinkflagship/horizon-web-shorts";

export default function Home() {
  return (
    <div>
      <h1>Welcome to My App</h1>
      <EntryPoint
        id="your-entry-point-id"
        skeletonType={EntryPointType.CIRCLE}
        skeletonSize={EntryPointSize.STANDARD}
      />
    </div>
  );
}

For Vite

Wrap your root file with FlagshipContainer (in src/App.tsx or src/main.tsx):

import {
  FlagshipContainer,
  EntryPoint,
} from "@thinkflagship/horizon-web-shorts";
import "@thinkflagship/horizon-web-shorts/styles.css";

function App() {
  return (
    <FlagshipContainer licenseKey="your-license-key">
      <div className="app">
        <h1>Welcome to My App</h1>
        <EntryPoint
          id="your-entry-point-id"
          skeletonType={EntryPointType.CIRCLE}
          skeletonSize={EntryPointSize.STANDARD}
        />
      </div>
    </FlagshipContainer>
  );
}

export default App;

Requirements

  • React: 16.8.0 or higher
  • React DOM: 16.8.0 or higher
  • Node.js: 16.0.0 or higher
  • Next.js: 13 or higher (16 in development)

API Reference

<FlagshipContainer>

Wrapper component required for all EntryPoints.

| Prop | Type | Required | Description | | ------------ | ----------------- | -------- | ------------------------------------------------ | | licenseKey | string | Yes | Your Flagship license key | | platformId | string | No | Platform identifier (defaults to current domain) | | children | React.ReactNode | Yes | Your application content |

<EntryPoint>

Renders entry points from Flagship Console.

| Prop | Type | Required | Description | | -------------- | ---------------- | -------- | --------------------------- | | id | string | Yes | Entry point ID from console | | skeletonType | EntryPointType | No | Loading skeleton type | | skeletonSize | EntryPointSize | No | Loading skeleton size |

EntryPointType: CIRCLE | RECTANGLE | BLOCK

EntryPointSize: COMPACT | STANDARD | BOLD | BLOCK_OF_2 | BLOCK_OF_4


Important Notes

  • Next.js: Must use 'use client' directive (React hooks & browser APIs required)
  • FlagshipContainer: Required wrapper for all EntryPoints
  • CSS: Import @thinkflagship/horizon-web-shorts/styles.css
  • Entry Point IDs: Configure in Flagship Console before use
  • platformId: platformId should exactly match with Console's App & website section.

Exposing Lenis on Window Object

If you use Lenis in your website for smooth scrolling, you should follow these steps to expose it on the window object for global access, debugging, and third-party integrations.

Type Declaration

Create or update globals.d.ts:

declare global {
  interface Window {
    lenis?: Lenis;
  }
}

Key Implementation Points

Expose lenis globally where lenis initialized:

// Expose lenis globally
window.lenis = lenis;

Cleanup:

return () => {
  lenis.destroy();
  delete window.lenis;
};

Complete Example

useEffect(() => {
  const lenis = new Lenis({
    duration: 0.5,
    easing: (t) => 1 - Math.pow(1 - t, 3),
    smoothWheel: true,
  });

  // Expose lenis globally
  window.lenis = lenis;

  lenis.on("scroll", ScrollTrigger.update);

  function raf(time: number) {
    lenis.raf(time);
    requestAnimationFrame(raf);
  }

  requestAnimationFrame(raf);

  return () => {
    lenis.destroy();
    delete window.lenis;
  };
}, []);

Benefits

  • DevTools Debugging - Test scroll behavior in browser console
  • Global Access - Control from any component without prop drilling
  • Third-party Integration - Let external scripts interact with Lenis