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

cyan-air

v1.2.1

Published

Framework JS ligero para crear interfaces de datos y aplicaciones web escalables y orientadas a componentes.

Readme

🟦 Cyan Air Framework

Framework JS ligero para crear interfaces de datos y aplicaciones web escalables y orientadas a componentes.

npm version License: MIT

Cyan Air permite construir dashboards y aplicaciones web modernas mediante un sistema de mensajería entre componentes y una estructura de archivos .html que encapsula lógica, estilo y estructura, eliminando la necesidad de configuraciones complejas de empaquetado.


🚀 Instalación y Uso

Opción 1: Vía CDN (Recomendado para uso directo en HTML)

Incorpora esta línea en la sección <head> de tu documento HTML:

<script src="https://unpkg.com/cyan-air/dist/cyan-air.js"></script>

Opción 2: Vía NPM (Para desarrollo con TypeScript/Node)

npm install cyan-air

✨ Características Principales

  • Componentización Real: cada componente reside en su propio archivo .html con secciones <style>, HTML y <script>, mejorando la organización y mantenibilidad.
  • Eventos Automáticos (Estilo VB6): los elementos button e input no requieren listeners manuales. Se programan mediante funciones con nombre: function NombreObjeto_OnNombreEvento() { ... }.
  • Comunicación Desacoplada: utiliza los métodos .Talk() y .Listen() para que los componentes se comuniquen mediante mensajes globales, logrando una reutilización total.
  • Validación Integrada: validación automática de datos (enteros, reales, rangos, alfanuméricos).
  • API Ready: conexión simplificada a APIs con CyanAir.AddEndPoint(MiEndPoint) y métodos GET, POST, PUT y DELETE ejecutados como MiEndPoint.GET(urlEndPoint), que al terminar llaman automáticamente a las funciones function MiEndPoint_OnReady() o function MiEndPoint_OnError(), que es donde se escribe el código para, por ejemplo, acceder a datos retornados por la API mediante el comando MiEndPoint.GetResponse(), o mostrar un mensaje si ocurrió algún error.
  • Status Bar Nativa: sistema de notificaciones integrado con constantes disponibles: Success, Unsuccess, Warning y Notice.

Para incorporar la Status Bar a una página web, escribe el siguiente código JavaScript para añadirla y luego para que reaccione imprimiendo los mensajes mediante su método SetCaption, con uno u otro color de acuerdo al valor del metaMensaje recibido:

CyanAir.AddStatusBar();

function StatusBar_Listen(idObjeto, mensaje, metaMensaje) {
    switch (metaMensaje) {
        case 'Success':
            CyanAir.StatusBar.SetCaption(mensaje, CyanAir.Const.Success);
            break;
    
        case 'Warning':
            CyanAir.StatusBar.SetCaption(mensaje, CyanAir.Const.Warning);
            break;
    
        case 'Unsuccess':
            CyanAir.StatusBar.SetCaption(mensaje, CyanAir.Const.Unsuccess);
            break;
    
        case 'Notice':
            CyanAir.StatusBar.SetCaption(mensaje, CyanAir.Const.Notice);
            break;
    }
}

🛠️ Ejemplo: ¡Hola Mundo!

Este ejemplo muestra cómo un botón en el index.html controla la visibilidad de un componente externo mediante el sistema de mensajería de Cyan Air.

1. El Componente (hola_mundo.html)

<style>
    .fondo { 
        background-color: #ddd; 
        padding: 15px; 
        border-radius: 8px; 
        font-family: 'Poppins', sans-serif; 
    }
</style>

<div class="fondo">
    <h1>Componente hola_mundo.html</h1>
    <p>¡Hola mundo!</p>
</div>

<script>
    // Método "Listen" que escucha todos los mensajes publicados
    function hola_mundo_Listen(id, mensaje, metaMensaje) {        
        switch (mensaje) {
            case "Ocultar/mostrar detalle": // Reacción al mensaje específico
                hola_mundo.SetVisibility(!hola_mundo.GetVisibility());
                break;
        }
    }
</script>

2. Archivo Principal (index.html)

<!DOCTYPE html>
<html lang="es">
<head>
    <meta charset="UTF-8" />
    <title>Mi App con Cyan Air</title>
    <script src="https://unpkg.com/cyan-air/dist/cyan-air.js"></script>
</head>
<body>
    <button id="index_btnOcultar">Ocultar/mostrar detalle</button>

    <script>
        // Importación del componente externo
        CyanAir.Import('./hola_mundo.html');

        // Indicar a Cyan Air que el elemento es un botón para habilitar sus métodos
        CyanAir.IsButton("index_btnOcultar");

        // Fijar el botón como tipo "Toggle"
        index_btnOcultar.SetToggle(true);

        // Evento Click generado automáticamente por el nombre del ID
        function index_btnOcultar_OnClick() {
            index_btnOcultar.Talk("Ocultar/mostrar detalle"); // Publicar mensaje global
        }
    </script>
</body>
</html>

🤝 Participación y Contribución

Este es un proyecto Open Source y todas las colaboraciones son bienvenidas.

Cómo colaborar:

  1. Fork: crea una copia del repositorio en tu propia cuenta de GitHub.
  2. Branch: crea una rama con un nombre descriptivo, por ejemplo: feature/nueva-validacion.
  3. Code: edita el archivo fuente en src/cyan-air.ts.
  4. Pull Request (PR): envía una solicitud detallando tus cambios para que puedan ser integrados en la rama principal.

¡Muchísimas gracias por ayudar a mejorar Cyan Air!

📜 Licencia

Este proyecto está bajo la Licencia MIT.

Copyright (c) 2025- 2026, Gabriel Lucero.