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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@madebywink/crumpet

v0.0.11

Published

Just as the melted pad of butter atop a warm crumpet makes a crumpet what it is, this toast component helps make your UX great again.

Downloads

2

Readme

Crumpet - What is it?

Just as a melted pad of butter atop a warm crumpet allows the simple crumpet to transcend the burden of mediocrity, this toast component helps make your UX great again.

In the states, we call crumpets "english muffins".

Powerful!

Setup:

Be sure to check for the latest version here: https://www.npmjs.com/package/@madebywink/crumpet

CDN: (i.e. Webflow embed)

<script src="https://cdn.jsdelivr.net/npm/@madebywink/[email protected]/dist/index.min.js"></script>
window.notificationSystem = crumpet.Crumpet(options)

Crumpet:

Setup - Webflow Usage

In Project Settings in the Custom Code tab, add the following lines of code:

  1. Head Code
<script src="https://cdn.jsdelivr.net/npm/@madebywink/[email protected]/dist/index.min.js"></script>
  1. Footer Code
<script>
window.onload = async function() {
  	window.notificationSystem = crumpet.Crumpet()
}
</script>

This attaches a notification container to the end of the Body element. By default, css causes notifications show in the lower right-hand corner of the screen.

  1. Dispatching a message
<script>
    windpw.notificationSystem.dispatch('SUCCESS', 'Congratulations! This message was dispatched!', 2000 /*ms*/)
</script>

Setup - Custom options:

<script>
    window.onload = async function() {
        window.notificationSystem = crumpet.Crumpet(makeOptions())
    }

    function makeOptions() {
        return {
            defaultDuration: 2000, //ms
            notificationTemplates: {
                'ERROR': '.js-notification-template.error',
                'LOADING': '.js-notification-template',
                'SUCCESS': '.js-notification-template.success',
                'ATTENTION': 'js-notification-template'
            },
            notificationContainer: '.js-notification-dropzone',
            cssString: defaultStyles(),
            htmlString: defaultElements()
    }
    }

    function defaultElements() {
    return `
        <div class="notification-container js-notification-dropzone">
            <div class="notification js-notification-template crumpet-hidden"></div>
            <div class="notification error js-notification-template crumpet-hidden"></div>
            <div class="notification success js-notification-template crumpet-hidden"></div>
        </div>
    `
    }

    function defaultStyles() {
    return `
        .crumpet-hidden {
            display: none !important;
        }
        .notification {
            padding: 8px 16px;
            margin: 8px 0 0 0;
            background: #FFF;
            box-shadow: '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)';
            border-radius: 0.375rem;
            border: 1px solid rgba(0,0,0,0.0125);
            min-height: 36px;
        }
        .notification-container {
            position: fixed;
            right: 0;
            bottom: 0;
            display: flex;
            flex-direction: column-reverse;
            align-items: flex-end;
            justify-content: flex-end;
            padding: 8px;
            transition-property: margin,margin-top,margin-bottom,margin-left,margin-right;
            transition-duration: 500ms;
        }
    `
    }
</script>