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

@mindful-web/marko-web-prestitial-ad

v1.64.0

Published

Marko Web Prestitial Ad Component

Downloads

1,154

Readme

Mindful Web Marko Wrapper for Prestitial Ads

Installation

  1. Include @mindful-web/marko-web-prestitial-ad as a project/website dependency.

  2. Include the Browser plugin.

// your-site/browser/index.js
import PrestitialAd from '@mindful-web/marko-web-prestitial-ad/browser';

PrestitialAd(Browser);

export default Browser;
  1. Include the styles.
// your-site/server/styles/index.scss
@import "@mindful-web/marko-web-prestitial-ad/scss/prestitial-ad";

Usage

Include the <marko-web-prestitial-ad> component in your out-of-page ads template or document root.

<!-- your-site/server/components/out-of-page-ads.marko -->
$ const { site } = out.global;

<marko-web-prestitial-ad
  namespace=site.get('mindfulAds.namespace')
  ad-unit-id=site.get('mindfulAds.adUnits.prestitial._id')
  logo-src=site.get('mindfulAds.adUnits.prestitial.logo.src')
  logo-srcset=site.get('mindfulAds.adUnits.prestitial.logo.srcset')
  logo-width=site.get('mindfulAds.adUnits.prestitial.logo.width')
  logo-height=site.get('mindfulAds.adUnits.prestitial.logo.height')

  -- Optional inputs with default values
  ad-unit-sizes=site.get('mindfulAds.adUnits.prestitial.sizes', [[500, 500]])
  duration=site.get('mindfulAds.adUnits.prestitial.duration', 15)
  cookie-name=site.get('mindfulAds.adUnits.prestitial.cookieName', 'prestitialState')
  cookie-expiration-days=site.get('mindfulAds.adUnits.prestitial.cookieExpiration', 1)
/>

The component will only render when:

  • No cookie matching cookie-name is present for the current visitor
  • The configured ad unit exists and returns a filled result

Once displayed, a countdown timer is shown (default 15 seconds, configurable via duration). The visitor can dismiss the overlay at any time via the "Continue to Site" link. On dismiss (or countdown expiry), the cookie is set to suppress the ad for the configured cookie-expiration-days period (default: 1 day).

Attributes

| Attribute | Type | Required | Description | |-----------|------|----------|-------------| | ad-unit-id | String | Yes | Ad unit ID | | namespace | String | Yes | Mindful Ads namespace | | logo-src | String | Yes | Logo src displayed in the overlay header | | ad-unit-sizes | Array | No | Ad sizes (default: []) | | cookie-expiration-days | Number | No | Days to suppress after first display (default: 1) | | cookie-name | String | No | Cookie name used to suppress repeat displays (default: prestitialState) | | debug | Boolean | No | If enabled, log input (default: false) | | duration | Number | No | Countdown seconds before auto-dismiss (default: 15) | | force | Boolean | No | If enabled, bypass cookie check (default: false) | | logo-height | String | No | Logo height attribute | | logo-srcset | Array | No | Logo srcset values for HiDPI displays (default: []) | | logo-width | String | No | Logo width attribute |

Site Config Example

{
  mindfulAds: {
    namespace: 'your-namespace',
    adUnits: {
      prestitial: {
        _id: 'your-ad-unit-id',
        sizes: [[300, 250]],
        limit: 1,
        cookieExpiration: 1,
        cookieName: 'prestitialState',
        duration: 15,
        debug: false,
        logo: {
          src: 'https://example.com/logo.png',
          srcset: 'https://example.com/[email protected] 2x',
          height: '40px',
          width: '156px',
        },
      },
    },
  },
}