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

umchat

v1.1.0

Published

Universal chat for run Alise skills or other voice assistants on the web site

Downloads

18

Readme

umchat

umchat for run Alise skills or other voice assistants on the website

Run

Install dependencies

npm i umchat

To start a chat, use the UChat component, passing the options necessary for the correct operation

import { UMChat, IAppConfig } from "umchat";
function MyComponent() {
  const config: IAppConfig = {
    url: "...", // webhook for skill,
    userId: "local_test",
  };
  return (
    <UMChat
      config={config}
      panelTitle="skill name"
      className="UMChat_absolute"
    />
  );
}

Run project

npm start

Generate userId

To get the userId, you can use the standard generation method, or use your own solution.

import { getUserId, IAppConfig } from "umchat";

function MyComponent() {
  const config: IAppConfig = {
    url: "...", // webhook for skill,
    userId: getUserId(),
  };
  return <UMChat config={config} />;
}

You can pass an argument to the method that takes a boolean value. When passing the value true, the userId is recreated on each page opening, and all data is cleared from the storage. You should not pass this argument in a release application.

Theme

For the component, you can set up themes, for this, pass the "theme" option to the component, with the name of your theme.

And also define a class in which new values for css variables will be specified

.UMChat_themes-@{your_theme} {
  --panel_width: inherit; /* panel width */
  --panel_height: inherit; /* panel height */
  --panel_header_bg: #002d6d; /* panel heading background */
  --panel_header_height: 50px; /* panel heading height */

  --text_color: #333; /* default text color */
  --contrast_text_color: #fff; /* contrast text color */
  --unaccented_text_color: #aaa; /* unaccented text color */
  --link_text_color: #0260e8; /* link text color */
  --link_hover_text_color: #0351c1; /* hover link text color */
  --link_active_text_color: #0043a4; /* active link text color */

  --font-family: sans-serif; /* default font family */
  --font-size-s: 10px; /* small font size */
  --font-size-m: 14px; /* default font size */
  --font-size-mt: 18px; /* long font size */
  --font-size-l: 20px; /* header font size */

  --padding-s: 4px; /* very small pdding */
  --padding-st: 6px; /* small padding */
  --padding-m: 8px; /* default padding */
  --padding-mt: 10px; /* long padding */
  --padding-l: 12px; /* very long padding */

  --border-radius-xs: 2px; /* very small border radius */
  --border-radius-s: 4px; /* small border radius */
  --border-radius-m: 6px; /* default border radius */
  --border-radius-l: 8px; /* long border radius */

  --inline-height-s: 18px; /* small line height */
  --inline-height-m: 24px; /* default line height */
  --inline-height-l: 40px; /* long line height */

  --scrollbar_size: 5px; /* scrollbar size */

  --bg: #fff; /* default background */
  --danger_bg: #bc0022; /* error background */
  --unaccented_bg: #f8f8f8; /* unaccented background */
  --unaccented_hover_bg: #eff0f4; /* hover unaccented background */
  --unaccented_active_bg: #e7e9ec; /* active unaccented background */
  --unaccented_border_color: #d4dade; /* unaccented border color */
  --unaccented_active_border_color: #8f99a3; /* active unaccented border color */
  --primary_bg: #f6733c; /* primary background */
  --primary_hover_bg: #e4662f; /* hover primary background */
  --primary_active_bg: #d6551f; /* active primary background */
  --primary_same_hover_bg: #e4662f25; /* hover primary same background */
  --primary_same_active_bg: #d6551f40; /* active primary same background */
  --secondary_bg: #265fa1; /* secondary background */
  --secondary_hover_bg: #2b5688; /* hover secondary background */
  --secondary_active_bg: #274c77; /* active secondary background */
  --secondary_same_hover_bg: #2b568825; /* hover secondary same background */
  --secondary_same_active_bg: #274c7740; /* active secondary same background */
  --translucent_dark_bg: rgba(
    255,
    255,
    255,
    0.15
  ); /* close button background */
  --translucent_hover_dark_bg: rgba(
    255,
    255,
    255,
    0.25
  ); /* hover close button background */
  --translucent_active_dark_bg: rgba(
    255,
    255,
    255,
    0.35
  ); /* active close button background */
  --border_color: #8c8c8c; /* border color */

  --user_msg_bg: #e5f0ff; /* user message background */
  --bot_msg_bg: #580be4; /* bot message background */
}

Demo

Помощь и поддержка проекта

Любая помощь и поддержка приветствуется. Если будут найдены различные ошибки или предложения по улучшению, то смело пишите на почту: [email protected]