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

@auth-mesh/angular-ui

v0.1.0

Published

Componentes visuais do AuthMesh para Angular: menu de conta, acesso negado e consentimento. Usa o @auth-mesh/angular.

Readme

@auth-mesh/angular-ui

Componentes visuais do AuthMesh para Angular, sobre o @auth-mesh/angular (que precisa estar instalado).

  • <authmesh-user-menu>: avatar com as iniciais, menu com nome, e-mail, papéis, Conta (opcional) e Sair. Sem sessão mostra Entrar (login hospedado).
  • <authmesh-access-denied>: tela de acesso negado (selo 403, ícone, mensagem e botão de volta).
  • <authmesh-consent>: autorização de um cliente dinâmico (MCP, agente). Recebe o request_id do AuthMesh.
npm install @auth-mesh/angular @auth-mesh/angular-ui

Menu de conta

import { AuthMeshUserMenuComponent } from '@auth-mesh/angular-ui';

@Component({
  imports: [AuthMeshUserMenuComponent],
  template: `<authmesh-user-menu accountUrl="/minha-conta" />`,
})
export class Header {}

| Entrada | Padrão | O que faz | |---|---|---| | accountUrl | (sem valor) | Destino do item Conta: rota da sua SPA (/minha-conta) ou URL https, como a do portal do AuthMesh (Autenticação & JWT › URLs & Redirecionamentos › Portal do usuário no console). Sem valor, o item não aparece. Aceita só caminho interno ou https (http só em localhost). | | showAccount | true | false esconde o item Conta. | | showRoles | true | Mostra os papéis do token no menu. | | autoLogin | false | Inicia o login hospedado assim que a sessão for lida, sem botão Entrar. | | align | end | Lado em que o menu abre (start ou end). | | loginLabel · accountLabel · logoutLabel | Entrar · Conta · Sair | Textos. |

Navegação por teclado (setas, Home, End, Esc, Tab), ARIA de menu, tema claro/escuro automático e prefers-reduced-motion.

Consentimento

Use em uma rota que tenha authMeshGuard. O AuthMesh redireciona para ela com ?request_id=…:

{ path: 'autorizar', canActivate: [authMeshGuard], component: ConsentPage }
// ConsentPage
import { AuthMeshConsentComponent } from '@auth-mesh/angular-ui';

@Component({
  imports: [AuthMeshConsentComponent],
  template: `<authmesh-consent [requestId]="requestId()" />`,
})
export class ConsentPage {
  readonly requestId = input<string>(); // com withComponentInputBinding() no provideRouter
}

Mostra o nome do cliente e o host de destino do retorno (texto, nunca HTML). Autorizar ou Negar vai ao AuthMesh com o token da sessão e segue para o endereço devolvido.

Acesso negado

<authmesh-access-denied message="Fale com o administrador para liberar esta área." actionUrl="/painel" actionLabel="Voltar ao painel" />

Entradas: title, message, code (selo; vazio esconde), actionLabel e actionUrl (caminho interno ou URL https; vazio esconde o botão). Cores extras: --authmesh-danger e --authmesh-danger-bg.

Personalização (variáveis CSS)

No elemento ou em um ancestral:

authmesh-user-menu, authmesh-consent {
  --authmesh-accent: #0ea5e9;
  --authmesh-accent-contrast: #fff;
  --authmesh-surface: #ffffff;
  --authmesh-text: #0f172a;
  --authmesh-muted: #64748b;
  --authmesh-border: rgba(100, 116, 139, .3);
  --authmesh-hover: rgba(14, 165, 233, .1);
  --authmesh-radius: 12px;
}

Segurança

  • Os componentes mostram nomes e destinos como texto, sem innerHTML.
  • O consentimento envia o access token da sessão só ao AuthMesh da aplicação (o issuer configurado no provideAuthMesh).
  • Condições de interface não substituem a validação da sua API.

Licença

MIT.