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

mogh_ui

v3.0.1

Published

Common UI components and styling used across Mogh apps.

Readme

mogh_ui

Common UI components and styling used across Mogh apps (Mantine + React), including the pages and components of mogh_auth (login, profile, login providers, trusted issuers).

Requirements

mogh_ui is published as ESM source for a bundler, and is built and tested with Vite. It can't be loaded by Node directly (and has no CommonJS build):

  • Components import .module.scss files, so the app needs a Sass compiler: sass-embedded (or sass) in its dev dependencies.
  • The Monaco editor loads its workers with Vite's ?worker imports.
  • Relative imports are extensionless, left for the bundler to resolve.

Install the peer dependencies next to it (npm does this by default), prettier included: the editor formats yaml / typescript with it (Alt + Shift + F), loaded only when used.

import "mogh_ui/index.scss";
import { ThemeProvider } from "mogh_ui";

Notes

  • The auth pages and hooks (LoginPage, useAuthState, authClient, ...) keep the user's tokens in the default MoghAuth.LOGIN_TOKENS store of mogh_auth_client, and the app has to read them from there. A store with its own key (createLoginTokens({ key })) isn't used by them.
  • Config shows one confirm dialog behind all of its Save buttons. Ctrl / Cmd + Enter (outside of text inputs) opens it while there are changes, and Enter in the open dialog saves. ConfirmUpdate does the same for a single Save button. When several are mounted, only the first one takes a key press, and none opens while a confirm dialog is open.
  • useKeyListener / useShiftKeyListener / useCtrlKeyListener: a handler returning false declines the press, which then keeps its browser default (eg. Enter on a focused button).

Development

npm install
npm run typecheck
npm test        # unit tests (node --test)
npm run build

The example app uses the local build (file: dependency), and its Playwright suite exercises the auth pages end to end.