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

@genexus/kasstor-design-system

v0.1.0

Published

Design-system foundation for Kasstor: global registry of design systems and a theme-loader that fetches, caches, and shares CSSStyleSheet bundles across components.

Readme

@genexus/kasstor-design-system

Design-system foundation for Kasstor. Provides:

  • A global registry of design systems and their CSS bundle loaders.
  • A theme-loader module that fetches bundles on demand, caches them, and shares the result across all consumers as CSSStyleSheet instances.

The kst-theme component that consumes this registry lives in @genexus/kasstor-core. Use this package together with core when you need runtime-loaded design-system themes.

API Reference

Design-system registry

| API | Description | | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | registerDesignSystem(name, options) | Registers a design system in the global registry. options.bundleLoaders is a map from bundle name → URL. Already-registered systems and bundle loaders are not overwritten (a warning is logged in development). |

Theme loader

| API | Description | | -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | fetchStyleSheet(name, timeout?) | Resolves the bundle URL from the registry, fetches the CSS, builds a CSSStyleSheet, caches it, and resolves the waiters. Default timeout is 10000 ms. | | getLoadedStyleSheet(name) | Returns the cached CSSStyleSheet for a theme name, or undefined if the theme has not been loaded yet. | | setStyleSheetMapping(name, sheet) | Caches a CSSStyleSheet under name and resolves any pending waiters. Useful when the stylesheet is produced outside the standard fetch flow. | | getStyleSheetPromiseInfo(name, timeout?) | Low-level helper that returns (or creates) the promise associated with a theme name. Mostly used by kst-theme internals and by tests that need to pre-warm the promise with a custom timeout. |

Resetting state (tests, HMR)

There is intentionally no public reset API. The package's global state is held under globalThis so that test suites and HMR boundaries can clear it without going through a destructive public function:

globalThis.geneXusDesignSystemsRegistry?.clear();
globalThis.geneXusDesignSystemsLoaders?.clear();
globalThis.geneXusDesignSystemsStyleSheets?.clear();
globalThis.geneXusDesignSystemsStyleSheetPromises?.clear();

Importing anything from @genexus/kasstor-design-system brings the type declarations for these globals into scope.

Installation

npm i @genexus/kasstor-design-system

This package has no peer dependencies — it is pure ESM / DOM logic.

Quick example

import { registerDesignSystem } from "@genexus/kasstor-design-system";

registerDesignSystem("my-ds", {
  bundleLoaders: {
    "components/button": "/themes/button.css",
    "components/edit": "/themes/edit.css"
  }
});

Then, in a separate place, render a <kst-theme> (from @genexus/kasstor-core) pointing at one or more of those bundle names. See the core docs for examples.