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

yupee-dialogs

v1.1.0

Published

This is simple inner dialogs for the yuppe framework, it can be used for electron

Readme

yupee-dialogs

This is a simple dialogs framework for the Yupee library. It can be used without the Yupee Library too (look at the test folder).

This framework can be used for electron usage.

You have 3 default dialogs usage :

$$.dialogs.alert
$$.dialogs.prompt
$$.dialogs.confirm
$$.dialogs.panel

Each dialog is asynchronous for general usage like electron usage. Here a very simple case for a prompt value.

async myPrompt() {
    const news = await $$.dialogs.prompt( "What's new ?", "default value..." );
    console.log( news );
}

You have two dialogs types :

Native dialogs

This is the default dialogs for Yupee. You just have to put the yupee-native-dialogs.js after the yupee.js library.

<!DOCTYPE html>
<html>
    <head>
        <script src='yupee.js'></script>
        <script src='yupee-native-dialogs.js'></script>
    </head>
    ...
</html>

Inner dialogs

This is inner dialogs for Yupee. You just have to put the yupee-inner-dialogs.js after the yupee.js library.

This is very useful for electron usage.

<!DOCTYPE html>
<html>
    <head>
        <script src='yupee.js'></script>
        <script src='yupee-inner-dialogs.js'></script>
    </head>
    ...
</html>

Updating the look and feel

Your inner dialog adds a yupee_dialog class for the dialog panel. Thus you may update the look like in this sample for having blue dialog. You may also update the look for any fields like button/input...

Inner1

Here an example for the blue background

<style type="text/css">
	div.yupee_dialog * {
		background-color:blue;
		color:white;
	}
	div.yupee_dialog button {
	}
</style>

Inner2

Here an example for default electron background

<style type="text/css">
	div.yupee_dialog, div.yupee_dialog div {
    		border-radius: 10px;    
	}

	div.yupee_dialog,div.yupee_dialog * {
		 background-color:#2c2c2c !important;    
		color:white;
	}

	div.yupee_dialog button, div.yupee_dialog input {
		background:#373737 !important;
		color:white;
	}
</style>

Calling inner dialogs without yupee

In this example, we use the yupee-dialogs without usage of the yupee library. By default, all the dialogs are stored inside the window.dialogs object.

<!DOCTYPE html>
<html>
    <head>
        <style type="text/css">
            div.yupee_dialog, div.yupee_dialog div {
                    border-radius: 10px;    
            }

            div.yupee_dialog,div.yupee_dialog * {
                background-color:#2c2c2c !important;    
                color:white;
            }

            div.yupee_dialog button, div.yupee_dialog input {
                background:#373737 !important;
                color:white;
            }
        </style>
        <script src="../src/yupee-inner-dialogs.js"></script>
        <script>
            const init = async () => {
                console.log( await dialogs.confirm( "Are you sure ?" ) );
                console.log( await dialogs.prompt( "Your value ?", "default value" ) );
                console.log( await dialogs.alert( "Hello World" ) );
            };
            document.addEventListener( "DOMContentLoaded", init )
        </script>
    </head>
    <body>

        <h1>Hello world</h1>

        <p>
            This is a simple page with 3 inner dialogs
        </p>

    </body>
</html>

Using a panel

A panel is a free container element, like a "DIV". You can put anything inside like a complex form. You can choose the default "Ok", "Cancel" actions or set your own actions. You can also control the way the container is displayed with your own CSS properties.

In this example, we have a panel with two fields "firstname" and "lastname". In the first dialog, we use the default actions "Ok" and "Cancel". In the second dialog, we update the size and the actions.

Inner3


const panel = document.createElement( "DIV" );
panel.innerHTML = "<div><label>First Name</label><input type='text' name='firstname'></div>";
panel.innerHTML += "<div><label>Last Name</label><input type='text' name='lastname'></div>";


const button = await dialogs.panel( panel );
if ( button == "OK" ) {
    alert( "Hello " + panel.querySelector( "[name=firstname]").value + "," +
        panel.querySelector( "[name=lastname]").value );
}

// We update the default CSS config of the main container
const button2 = await dialogs.panel( panel.cloneNode(true), { actions: [ "Yes", "No" ], minWidth:"300px", minHeight:"300px", top:"300px" } );
if ( button2 == "Yes" ) {
    alert( "OK Mister" );
} else
if ( button2 == "No" ) {
    alert( "Oh Really ?" );
}

(c) 2026 Alexandre Brillant