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

@xngui/core

v0.0.5

Published

Shared types, configuration, and utilities for @xngui

Downloads

875

Readme

@xngui/core

Shared design-system contracts for every @xngui/* package.

Install

pnpm add @xngui/core

Usually installed alongside @xngui/components — most apps import types and provideX() from here.

Main entry — @xngui/core

Typed unions, event payloads, data-pipeline shapes, and capability interfaces.

import type { XSize, XVariant, XDataQuery, XOpenBound } from '@xngui/core';

| Area | File | Examples | | ------------ | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------- | | Visual | types/visual.ts | XVariant, XColor, XAppearance, XDensity | | Size | types/size.ts | XSize, XWidth, XHeight | | Tokens | types/tokens.ts | XSpacingStep, XRadiusStep, XSemanticToken | | Layout | types/layout.ts | XPlacement, XOrientation, XOverlayLayer | | State | types/state.ts | XStatus, XLoadingMode, XDisabled | | Interaction | types/interaction.ts | XTrigger, XActivation, XScrollStrategy | | Capabilities | types/capabilities.ts | XDisableable, XOpenBound, XToastHost — signal implements contracts; some are aspirational until adopted by components | | Form | types/form.ts | XOption, XValidateOn, XValidationState | | Typography | types/typography.ts | XTextSize, XFontWeight, XTextOverflow | | Data | types/data.ts | XDataQuery, XFilter, XDataLoader | | Events | types/events.ts | XChangeEvent, XPageEvent, XSortEvent | | Media | types/media.ts | XIconPosition, XIconSize, XImageFit |

Theme mode types (XThemeMode, XResolvedTheme) live in @xngui/theme.

X_STORAGE_KEYS and browser persistence services live in @xngui/core/storage.

Capability contracts

types/capabilities.ts defines signal-based implements shapes for interactive components. Shipped adopters include XOpenBound (dialog, drawer, alert-dialog), XToastHost (toast), and XCollapsible (sidebar). Others (XPaginated, XSortable, XPlayback, …) are forward-looking contracts — prefer them when adding or refactoring the matching component.

Secondary entries

| Import | Purpose | | --------------------- | ------------------------------------------------------------------------------------------------- | | @xngui/core/config | provideX, provideXConfig, XConfigService, XConfig | | @xngui/core/i18n | XLocaleService, XTranslationService, XIntlService, XTranslatePipe, provideXTranslations | | @xngui/core/errors | provideXErrorHandler, XErrorHandlerService, domain errors | | @xngui/core/files | XFileService, XFileSource, pick/validate/resolve/download helpers, XFileError | | @xngui/core/logging | provideXLogger, XLoggerService, XLogger | | @xngui/core/storage | XLocalStorageService, XIndexedDbService, X_STORAGE_KEYS |

App bootstrap

import { provideX } from '@xngui/core/config';

export const appConfig = {
  providers: [
    provideX({
      config: { size: 'md', validateOn: 'touched' },
      locale: 'en-US',
    }),
  ],
};

provideX registers config defaults, optional logger/error handler overrides, locale, and optional translation packs from component i18n.ts catalogs.

Browser persistence

import { inject } from '@angular/core';
import { XLocalStorageService, XIndexedDbService, X_STORAGE_KEYS } from '@xngui/core/storage';

const local = inject(XLocalStorageService);
local.set(X_STORAGE_KEYS.theme, 'dark');

const db = inject(XIndexedDbService);
await db.open('my-app', { version: 1, stores: [{ name: 'drafts' }] });
await db.set('my-app', 'drafts', 'page-1', { title: 'Notes' });