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

@fntio/infra-client-plugin-ui

v0.2.0

Published

Theme helpers and an Angular-compatible HTTP interceptor for infra-client plugin frontends.

Readme

@fntio/infra-client-plugin-ui

Theme helpers, the portal's component styles, and an HTTP interceptor for Angular plugins. Private until publishing is enabled.

Theme

import { applyPluginTheme, pluginThemeCss } from "@fntio/infra-client-plugin-ui";

Re-exports of the SDK's browser entry for plugins that only want the tokens; the rules are documented there (SDK README, "Browser SDK", Theme). connectToInfraClient already applies the theme on init and themeChanged.

Components

Tokens alone leave every plugin author re-inventing buttons, tables and headers, and landing somewhere close but visibly foreign. These classes reproduce the portal's shipped control scale, type roles and surface treatments, so a plugin page reads as part of the app without copying anything from it.

import { applyPluginUi } from "@fntio/infra-client-plugin-ui";

applyPluginUi(document);   // once, alongside connectToInfraClient()

applyPluginUi also sets the page itself up: a see-through background (the portal's own surface shows behind the frame, in light and dark), no body margin, and the portal's text colour and typeface. Leave html and body without a background of your own; painting var(--background) there gives a flat slab that does not match the rest of the portal. Your own rules still win over these defaults.

<div class="ic-card">
  <div class="ic-card-head">
    <h2 class="ic-card-title">3 parameters</h2>
    <span class="ic-caption">/myapp/prod</span>
  </div>
  <div class="ic-table-wrap">
    <table class="ic-table">…</table>
  </div>
</div>

| Class | For | | --- | --- | | ic-page, ic-header, ic-actions | page scaffolding | | ic-title, ic-subtitle, ic-card-title, ic-caption, ic-muted, ic-mono | the portal's type roles | | ic-card, ic-card-head | a panel | | ic-table, ic-table-wrap | a table, scrolling in its own box so the frame never scrolls the portal sideways | | ic-btn + ic-btn-primary\|secondary\|outline\|ghost\|danger, ic-btn-sm\|lg | buttons, on the 24/32/36px control scale inputs share | | ic-field, ic-label, ic-input, ic-select | forms | | ic-badge + ic-badge-brand\|green\|amber\|red | status pills; keep plain ic-badge for a type or a label, and colour for a state | | ic-empty, ic-error, ic-skeleton | the three states every page needs |

Every value resolves from a theme token, so a customer's branding and the viewer's light or dark choice carry through, and a test fails if a colour literal creeps in. pluginUiCss() returns the stylesheet for a plugin that manages its own document.

Angular

import { bootstrapApplication } from "@angular/platform-browser";
import { provideHttpClient, withInterceptors } from "@angular/common/http";
import { InjectionToken } from "@angular/core";
import { connectToInfraClient, PluginContext } from "@fntio/infra-client-plugin-sdk/browser";
import { createPluginInterceptor } from "@fntio/infra-client-plugin-ui/angular";

export const PLUGIN = new InjectionToken<PluginContext>("infra-client plugin");

const context = await connectToInfraClient();
await bootstrapApplication(AppComponent, {
  providers: [
    { provide: PLUGIN, useValue: context },
    provideHttpClient(withInterceptors([createPluginInterceptor(context)])),
  ],
});

createPluginInterceptor(context) attaches the current bearer token to requests whose URL starts with context.plugin.apiBaseUrl (build them with context.api.url(path)), leaves other URLs untouched, and after an authentication-layer 401 renews through the host and retries once under the SDK's shared rule (canRetryAfterUnauthorized): never after 403, 5xx or a timeout, never with a streamed body, never for an account in the request path that is no longer in context.accounts(), never with the same token again. Like context.api, a 403 asks the host to refresh discovery unless accessRefreshOnForbidden: false. The match is a plain prefix test, so absolute URLs are not tokenised: place this interceptor after any base-URL-rewriting one. It needs only plugin, accounts, session and requestAccessRefresh from the context (PluginInterceptorContext).

The function is typed structurally against HttpInterceptorFn, so this entry depends on rxjs only and no Angular version is pinned by the package; src/__tests__/angular-typecheck.ts holds the shape to the real Angular type at tsc --noEmit time.

Develop

cd packages/infra-client-plugin-ui
npx tsc --noEmit && npm test

Same arrangement as the CDK package: checks resolve the SDK from src/, the build from dist/ (npm run build:plugins at the repository root). The Angular packages are dev dependencies for the type check only.