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

@pilmee/bragiui

v1.3.0

Published

A React component library built with Vite

Readme

BragiUI

Componentes React de presentación. Compatible con React 18 y 19. La aplicación proporciona los datos a CVESummary; la librería no realiza peticiones de red.

Instalación

npm install @pilmee/bragiui

Importa solo el componente que necesites:

import { CVESummary } from '@pilmee/bragiui/cve-summary'
import type { CVEData } from '@pilmee/bragiui'

function Vista({ data }: { data: CVEData }) {
  return <CVESummary data={data} />
}

Navbar

Navbar recibe el contenido de la barra y las secciones del menú lateral. El lateral inicia expandido y el botón hamburguesa alterna entre expandido y compacto, mostrando solo iconos en este último estado. Los enlaces usan href y las acciones usan onSelect, así que puedes conectarlos al router de tu aplicación.

import { Navbar } from '@pilmee/bragiui/navbar'

<Navbar
  brand={<a href="/">Mi aplicación</a>}
  topLeftItems={[{ id: 'projects', label: 'Proyectos', href: '/projects' }]}
  topRightItems={[{ id: 'profile', label: 'Perfil', href: '/profile' }]}
  search={{ placeholder: 'Buscar', onSubmit: query => console.log(query) }}
  sidebarSections={[
    { id: 'general', label: 'General', items: [
      { id: 'home', label: 'Inicio', href: '/', icon: '⌂' },
    ] },
    { id: 'admin', label: 'Administración', items: [
      { id: 'settings', label: 'Ajustes', href: '/settings', icon: '⚙' },
    ] },
  ]}
>
  <div>Contenido de la página</div>
</Navbar>

El estado también puede ser controlado desde la aplicación mediante collapsed/onCollapsedChange; defaultCollapsed cambia el estado inicial. El sidebar ocupa por defecto todo el alto disponible bajo la barra superior; --bragi-layout-min-height permite ajustar el alto mínimo del conjunto (por defecto 100dvh). El elemento activo del lateral usa --bragi-workspace-background, el mismo fondo del área de trabajo, y cubre la línea divisoria a su altura. Sus esquinas izquierdas usan --bragi-sidebar-active-radius (8 px por defecto); el lado derecho es recto y se integra sin bordes con el área de trabajo. El ancho, los textos y el estado activo tienen transiciones; se desactivan si el usuario prefiere reducir el movimiento. Puedes ajustar su duración con --bragi-motion-duration (220 ms por defecto) y --bragi-motion-fast (160 ms). Los demás tokens de diseño son --bragi-nav-background, --bragi-sidebar-background, --bragi-nav-active-background, --bragi-nav-active-foreground, --bragi-foreground, --bragi-border, --bragi-surface, --bragi-muted, --bragi-font-family, --bragi-navbar-height, --bragi-sidebar-width, --bragi-sidebar-collapsed-width, --bragi-nav-gap, --bragi-nav-padding y --bragi-radius-sm.

También puedes importar desde @pilmee/bragiui. El paquete publica módulos ESM separados y marca sus módulos como libres de efectos secundarios para que el bundler elimine componentes sin uso. React y React DOM son dependencias peer.

Tokens y estilos

Los componentes usan propiedades CSS personalizadas con valores por defecto. Defínelas en un ancestro, independientemente de si tu aplicación usa CSS, styled-components, Emotion o StyleX:

.myTheme {
  --bragi-border: #ccd2dc;
  --bragi-surface: #f8faff;
  --bragi-info: #2653b6;
  --bragi-space-lg: 2rem;
  --bragi-radius-lg: 12px;
}
<div className="myTheme"><CVESummary data={data} /></div>

Welcome, ColorSchemeToggle y CVESummary aceptan className y style para integrarse con wrappers y sistemas de estilos. Otros tokens disponibles: --bragi-muted, --bragi-critical, --bragi-high, --bragi-medium, --bragi-low, --bragi-error-foreground, --bragi-error-background, --bragi-error-border, --bragi-info-background, --bragi-success-background, --bragi-skeleton, --bragi-toggle-padding, --bragi-radius-sm, --bragi-toggle-light-background, --bragi-toggle-light-foreground, --bragi-toggle-dark-background, --bragi-toggle-dark-foreground, --bragi-welcome-background y --bragi-welcome-foreground.

La librería se compila con TypeScript 6, pero sus declaraciones usan sintaxis compatible con TypeScript 5.

Desarrollo

npm install
npm run check          # typecheck + eslint + biome
npm test -- --runInBand
npm run build
npm run build-storybook

El proyecto usa super-configs para ESLint 10 (eslint.config.js) y Biome (biome.json). npm run lint:fix aplica arreglos automáticos de ESLint y npm run format formatea con Biome.