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

@mythicalos/ui-core

v0.10.6

Published

mythicalOS framework-agnostic UI core — the pure logic (class derivation, poll scheduling, dialog/toast/gauge helpers), the token-driven component stylesheet, and the <mythical-select> form-associated web component. Zero framework runtime; the Preact and

Readme

@mythicalos/ui-core

The framework-agnostic core of the mythicalOS component library — pure logic; no framework runtime. It holds the branchy, DOM-free logic that both the Preact and React bindings import, so the two frameworks derive identical classes/behavior from one source: button class derivation, the U7 poll-scheduling math + fire-time epoch guard, the confirm-dialog typed-name gate, the toast text-composition helper, and the circular-gauge geometry.

This package MUST NOT import preact or react — see test/agnostic.test.ts.

Install / Import

npm add @mythicalos/ui-core

@mythicalos/tokens is a peer dependency — load its stylesheet before this package's so the --my-* custom properties it defines are already in scope when styles.css resolves through them:

npm add @mythicalos/tokens

Three import forms, all consumable from a plain Node ESM script, a webpack/vite app, or a React/Preact bundle — ./logic ships compiled ESM + .d.ts from dist/ (not raw TypeScript source), so no consumer needs a TS loader for it:

// 1. logic — pure functions/types, zero DOM, zero framework runtime
import { buttonClass, nextPollDelay, typedNameMatches } from "@mythicalos/ui-core/logic";
// (equivalently, the package root re-exports the same thing)
import { buttonClass } from "@mythicalos/ui-core";

// 2. styles — the atom-class stylesheet; import @mythicalos/tokens' CSS first
import "@mythicalos/tokens";
import "@mythicalos/ui-core/styles.css";

// 3. the <mythical-select> web component — a registration side effect
import "@mythicalos/ui-core/select";

Usage

import { buttonClass, nextPollDelay, typedNameMatches } from "@mythicalos/ui-core/logic";

Styles

./styles.css is the component stylesheet — the atom classes the logic above derives (buttons, chips, status lines, banners, gauges, inputs/toggles/checkboxes, toasts, dialogs, empty states). Serve it AFTER @mythicalos/tokens' stylesheet; every value resolves through a --my-* custom property.

import "@mythicalos/ui-core/styles.css";

<mythical-select>

A form-associated, native-parity <select> web component — vanilla custom elements (<mythical-select>, <mythical-option>, <mythical-optgroup>), no framework runtime, which is why it lives in core rather than in a Preact/React binding. Import it once (a registration side effect) to define the elements:

import "@mythicalos/ui-core/select";

TypeScript consumers get the element's ambient DOM typings (MythicalSelectElement, HTMLElementTagNameMap augmentation, …) via the same import path's types condition.

The component ships a 354-test cross-engine Playwright parity suite (Chromium, Firefox, WebKit) covering the ARIA tree, selection/keyboard/typeahead, forms and validity, the wrapped-native contract, a strict-CSP fixture, and the no-ElementInternals fallback. Run it with:

bun run test:select

This is separate from bun test (the unit suite) on purpose — Playwright's test/ expect are not bun:test's, and test/select/** is excluded from bun's own test discovery (see bunfig.toml).

License

Apache-2.0.