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

chuijs

v3.2.3

Published

component framework chUiJS

Downloads

410

Readme

chuijs

CHROME_SANDBOX FIX

cd node_modules/electron/dist
sudo chown root chrome-sandbox
sudo chmod 4755 chrome-sandbox

Структура

exampleApp / app / views / main.js

const { Page, Button, TextInput, Notification } = require('chuijs');
class MainPage extends Page {
    constructor() {
        super();
        this.setTitle('Сказать привет!');
        this.setMain(false)

        let name = new TextInput({
            title: 'Введите ваше имя',
            placeholder: 'Введите ваше имя',
            required: false
        });
        let hello = new Button({
            title: "Сказать привет!",
            clickEvent: () => {
                if (name.getValue() !== "") {
                    new Notification({
                        title: `Привет, ${name.getValue()}!`, text: `Привет, ${name.getValue()}!`,
                        style: Notification.STYLE.SUCCESS, showTime: 5000
                    }).show();
                } else {
                    new Notification({
                        title: `Привет мир!`, text: `Привет мир!`,
                        style: Notification.STYLE.SUCCESS, showTime: 5000
                    }).show();
                }
            }
        })
        this.add(name, hello)
    }
}
exports.MainPage = MainPage

exampleApp / app / app.js

/** RENDERER ПРОЦЕСС */
/** ИМПОРТЫ */
const { AppLayout, render } = require('chuijs');
/** СТРАНИЦЫ */
const { MainPage } = require('../app/views/main');
class App extends AppLayout {
    constructor() {
        super();
        /** РОУТЫ */
        this.setRoute(new MainPage());
    }
}
render(() => new App()).catch(err => console.log(err))

exampleApp / main.js

/** main.js */
const { Main, MenuItem } = require('chuijs');
const main = new Main({
    name: "exampleApp",
    width: 1366,
    height: 768,
    render: `${__dirname}/app/app.js`,
    devTools: true
    /** icon: `${__dirname}/resources/icons/app/icon.png` */
});
main.start({
    tray: [
        new MenuItem().button('Показать \ Скрыть', () => main.hideAndShow()),
        new MenuItem().separator(),
        new MenuItem().toggleDevTools('Консоль разработчика'),
        new MenuItem().separator(),
        new MenuItem().quit("Выход")
    ]
})

Donwload Session в main.js

const { App } = require('chuijs');
App.get().on('session-created', (session) => {
    session.on('will-download', (e, item, contents) => {
        // ...
    });
});

TelegramBot API

const { TelegramBot } = require('chuijs');
let bot = new TelegramBot("token");
bot.setToken("token");

// Функции
async function run() {
    await bot.getMe();
    await bot.getUpdates();
    await bot.getChat("id");
    /* ... */
}

Модули

| Компонент | Версия | Описание | |--------------------------------------|--------|-----------------------| | Автоматическое обновление приложения | 1.0.0 | только AppImage, NSIS | | Themes | 1.0.0 | Зависит от системы | | Route | 1.0.0 | | | Page | 1.0.0 | | | ElectronTray | 1.0.0 | | | TelegramBot API | 1.0.0 | |

Компоненты

| Компонент | Версия | Описание | |---------------------------------|--------|----------| | AppLayout | 1.0.0 | | | DateInput | 1.0.0 | | | NumberInput | 1.0.0 | | | EmailInput | 1.0.0 | | | TextArea | 1.0.0 | | | PasswordInput | 1.0.0 | | | FileInput | 1.0.0 | | | H1, H2, H3, H4, H5, H6 | 1.0.0 | | | Label | 1.0.0 | | | Paragraph | 1.0.0 | | | Button | 1.0.0 | | | CheckBox | 1.0.0 | | | ComboBox | 1.0.0 | | | SelectBox | 1.0.0 | | | ContentBlock | 1.0.0 | | | Details | 1.0.0 | | | Dialogs | 1.0.0 | | | RadioButton | 1.0.0 | | | Table | 1.0.0 | | | ProgressBar | 1.0.0 | | | Toggle | 1.0.0 | | | Tabs | 1.0.0 | | | Notification | 1.0.0 | | | Badge | 1.0.0 | | | Image | 1.0.0 | | | Icons | 1.0.0 | | | WebView | 1.0.0 | | | Spinner | 1.0.0 | | | GroupRadio | 1.0.0 | | | Accordion | 1.0.0 | | | Pre | 1.0.0 | | | HtmlBlock | 1.0.0 | | | TreeView | 1.0.0 | | | SlideShow | 1.0.0 | | | TextEditor | 1.0.0 | | | FieldSet | 1.0.0 | | | Popups (Alert, Confirm, Prompt) | 1.0.0 | | | Forms | 1.0.0 | |

В разработке

| Компонент | Версия | Описание | |-------------------------|--------|----------| | VideoPlayer | dev | - | | AudioPlayer | dev | - | | Graphs (Bar, Pie) | dev | - | | Дочерние BrowserWindows | dev | - |