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

sovads-sdk

v1.0.9

Published

SovAds SDK for publisher integration - Modular ad network SDK with banner, popup, and sidebar components

Downloads

509

Readme

@sovads/sdk

SovAds SDK for publisher integration - A modular ad network SDK with banner, popup, and sidebar components.

Installation

npm install sovads-sdk@latest
# or
pnpm add sovads-sdk@latest
# or
yarn add sovads-sdk@latest

Usage

Basic Setup

import { SovAds, Banner, Popup, Sidebar } from 'sovads-sdk'

// Initialize SDK
const sovads = new SovAds({
  apiUrl: 'https://ads.sovseas.xyz', // Optional, defaults to production URL
  debug: false, // Enable debug logging
  siteId: 'your-site-id', // Optional, will auto-detect if not provided
})

// Banner Ad
const banner = new Banner(sovads, 'banner-container')
await banner.render()

// Popup Ad
const popup = new Popup(sovads)
await popup.show() // Shows after 3 seconds by default

// Bottom bar (floating banner at bottom with close button)
const bottomBar = new BottomBar(sovads)
await bottomBar.show()

// Sidebar Ad
const sidebar = new Sidebar(sovads, 'sidebar-container')
await sidebar.render()

HTML Example

<!DOCTYPE html>
<html>
<head>
  <title>My Site with SovAds</title>
</head>
<body>
  <h1>Welcome to My Site</h1>
  
  <!-- Banner Ad Container -->
  <div id="banner-container"></div>
  
  <!-- Sidebar Ad Container -->
  <div id="sidebar-container"></div>
  
  <script type="module">
    import { SovAds, Banner, Sidebar } from 'sovads-sdk'
    
    const sovads = new SovAds({ debug: true })
    const banner = new Banner(sovads, 'banner-container')
    const sidebar = new Sidebar(sovads, 'sidebar-container')
    
    banner.render()
    sidebar.render()
  </script>
</body>
</html>

API Reference

SovAds

Main SDK class for initialization and configuration.

Constructor

new SovAds(config?: SovAdsConfig)

Config Options

  • apiUrl?: string - API endpoint URL (default: https://ads.sovseas.xyz)
  • debug?: boolean - Enable debug logging (default: false)
  • siteId?: string - Site ID (optional, will auto-detect)
  • consumerId?: string - Consumer ID for targeting specific advertisers

Banner

Banner ad component.

const banner = new Banner(sovads: SovAds, containerId: string)
await banner.render(consumerId?: string)

Popup

Popup ad component.

const popup = new Popup(sovads: SovAds)
await popup.show(consumerId?: string, delay?: number)
popup.hide()

BottomBar

Floating bottom bar ad with a built-in close (×) button. Designed to sit fixed at the bottom of the viewport; click the × or the ad itself to dismiss. You can style the bar by targeting the .sovads-bottom-bar class in your CSS.

const bottomBar = new BottomBar(sovads: SovAds)
await bottomBar.show(consumerId?: string)
bottomBar.hide()

Sidebar

Sidebar ad component.

const sidebar = new Sidebar(sovads: SovAds, containerId: string)
await sidebar.render(consumerId?: string)

Features

  • ✅ Automatic site detection
  • ✅ Impression and click tracking
  • ✅ Render verification with IntersectionObserver
  • ✅ Image load error handling
  • ✅ Network retry logic
  • ✅ CORS support
  • ✅ TypeScript support
  • ✅ Debug logging
  • 🎨 Customizable styling via CSS classes (e.g. .sovads-banner, .sovads-sidebar, .sovads-popup-overlay, .sovads-bottom-bar)

License

MIT