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

@dloizides/ui-access-admin

v1.0.1

Published

Brand-agnostic React Native (RN-web) user & access administration UI — scoped capability links (mint / copy / share / revoke, always with an expiry) and subject-to-account linking. Speaks in neutral subjects, takes its API calls by injection.

Readme

@dloizides/ui-access-admin

Brand-agnostic React Native (RN-web) user & access administration UI for the dloizides.com shared kit.

The frontend counterpart to what Identity.Abstractions already shares on the backend (IUserManagementService, TenantManagedRoleSet). It ships the two screens every product ends up rebuilding:

  • AccessLinkPanel — mint, copy, share and revoke a scoped capability link for one subject, always with an expiry.
  • AccountLinkPanel — bind a subject to the account it signs in with, or unbind it.

Promoted out of kefi-web, with every Kefi noun removed.


The two rules that make it reusable

1. No host domain types in the public API. The package knows about a AccessSubject ({ id, displayName }), a CapabilityLink, and a LinkableAccount. Nothing else. A survey respondent, a menu editor and a party promoter are all subjects.

2. No API calls. Every write is an injected async callback. There is no react-query dependency and no client. You wire your own endpoints and your own cache invalidation.


Install

npm install @dloizides/ui-access-admin

Peers: @dloizides/ui-feedback, @dloizides/ui-buttons, @dloizides/ui-forms, @dloizides/ui-layout, react, react-native.

Mount a UiProvider (from @dloizides/ui-feedback) above these panels — it supplies both the theme and t.


Quick start

import { AccessLinkPanel, type CapabilityLink } from '@dloizides/ui-access-admin';

<AccessLinkPanel
  subject={{ id: promoter.externalId, displayName: promoter.name }}
  policy={{ anchorDate: eventDate, tailDays: 14, minDays: 1, maxDays: 365 }}
  links={links}                    // normalized to CapabilityLink by YOUR adapter
  linksFailed={linksQuery.isError} // never conflated with "there are none"
  mint={async ({ subject, expiresInDays }) => toCapabilityLink(
    await createLink.mutateAsync(buildRequest(subject, expiresInDays)),
  )}
  describeError={(error) => FM(mutationErrorKey(error))}
  renderLinkActions={(link) => <MyRevokeButton linkId={link.id} />}
  onClose={close}
  onResult={(message, tone) => setBanner({ message, tone })}
/>

The expiry policy

capabilityExpiryDays resolves anchorDate + tailDays, clamped into [minDays, maxDays].

There is no code path that returns "never." A missing, unparseable or past anchor yields the bare tail, not an unbounded link. These URLs are bearer tokens pasted into chat apps; the expiry is the only thing limiting the blast radius of a forward.


i18n — read this before adopting

The package is fallback-free. t is your resolver, and a missing key renders the raw dotted name to the user.

ACCESS_ADMIN_I18N is a machine-readable manifest of every key the package resolves. Bind your missing-key guard to it, the way kefi-web/src/localization/kitTranslationKeys.ts already binds LAYOUT_I18N and TABLE_I18N:

import { ACCESS_ADMIN_I18N } from '@dloizides/ui-access-admin';

const ACCESS_ADMIN_KEYS: readonly string[] = Object.values(ACCESS_ADMIN_I18N);

Then an upgrade that adds a string fails your test suite instead of shipping raw key text. accessAdminI18n.test.ts keeps the manifest itself honest: it fails if any component resolves a raw literal, and if the map carries an entry nothing uses.

The package owns the key names; you own the wording. That split is what lets one product keep warm, specific copy under a key another product reuses with its own.

Every key is namespaced under accessAdmin.*, so it drops into a locale file as one block.


testIDs

Both panels take a testIDPrefix; every child derives from it. Adopting apps already have Playwright selectors, and a shared component is not a good enough reason to rewrite an E2E suite.


Theming

Colours come from your UiProvider theme (@dloizides/design-tokens). The package defines no colour literalsuseAccessAdminPalette maps the theme onto the roles the panels need, so a rebrand reaches them for free.


API

| Export | What it is | |---|---| | AccessLinkPanel | The capability-link panel for one subject | | AccountLinkPanel | The account picker for one subject | | useCapabilityLinkMint | Mint-and-copy state (headless) | | useSubjectAccountLink | Selection + submit state for account linking (headless) | | capabilityExpiryDays / capabilityExpiryDate / daysUntilAnchor | The expiry policy | | linksForSubject / activeLinksForSubject / formatLinkDate | Pure link helpers | | buildCapabilityLinkMailto | mailto: compose URL (no recipient — see the source) | | buildAccountOptions / accountDisplayLabel | Pure picker helpers | | useAccessAdminPalette | Theme → colour roles | | ACCESS_ADMIN_I18N / ACCESS_ADMIN_TEST_IDS | The host contracts | | AccessResultTone | Success | Error |


License

MIT