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

@web-hig/core

v1.12.5

Published

Shared evaluator engine for The Web HIG conformance tooling

Readme

@web-hig/core

Shared evaluator engine for The Web HIG — load the rule registry, parse project contracts, and build multidimensional conformance reports.

This package is not a UI library. It implements tooling around the HIG behavioural contract (accessibility, motion, SSR, tokens, and related rule IDs).


Install

npm install @web-hig/core

Most teams install @web-hig/cli instead, which depends on this package. Use @web-hig/core when building custom CI, editors, or agent integrations.


Prerequisites

The engine reads rules/registry.yaml from a HIG contract tree on disk. It does not embed the full registry in the npm tarball.

| Setup | WEB_HIG_ROOT | | --- | --- | | @web-hig/install with practical or full profile | docs/hig (contains rules/registry.yaml) | | Git clone of frozonfreak/hig | repository root | | Custom vendor layout | directory that contains rules/registry.yaml |

export WEB_HIG_ROOT=docs/hig   # typical product repo after init

If unset, resolveHigRoot() walks up from process.cwd() looking for rules/registry.yaml.


Quick start

import {
  resolveHigRoot,
  loadRegistry,
  loadProjectConfig,
  filterRulesByContract,
  createReport,
  printTerminalReport,
  severityBucketForRule,
} from '@web-hig/core';

const higRoot = resolveHigRoot(process.cwd());
if (!higRoot) throw new Error('Set WEB_HIG_ROOT or vendor docs/hig from @web-hig/install');

const registry = loadRegistry(higRoot);
const { config } = loadProjectConfig(process.cwd());
const profile = config?.profile ?? 'practical';
const archetype = config?.archetype ?? 'application';

const staticRules = filterRulesByContract(registry, { profile, archetype });

const report = createReport({
  higVersion: registry.version,
  profile,
  archetype,
  framework: config?.framework?.name ?? null,
  findings: [],
});

console.log(printTerminalReport(report));
console.log(`Applicable static rules: ${staticRules.length}`);

API

Registry

| Export | Description | | --- | --- | | resolveHigRoot(startDir?) | Find directory containing rules/registry.yaml | | loadRegistry(higRoot) | Load parsed registry (version, rules Map) | | parseRegistryYaml(string) | Parse registry YAML text | | filterRulesByContract(registry, { profile, archetype }) | Rules with static evaluation for profile + archetype |

Profiles: quick · practical · full
Archetypes: content · commerce · application · auth

Project contract

| Export | Description | | --- | --- | | loadProjectConfig(cwd, fileName?) | Parse web-hig.yaml (default name) | | defaultProjectConfig(higVersion) | Defaults when no config file exists |

See web-hig.example.yaml.

Reports (Layer 8 / evaluator)

| Export | Description | | --- | --- | | createReport({ higVersion, profile, archetype, framework, findings }) | Report object with severity_counts | | printTerminalReport(report) | Human-readable summary | | severityBucketForRule(severity) | Maps error → blocking, warning → warnings, info → observations |

Finding shape aligns with EVALUATOR.md:

{
  "rule_id": "HIG-MOT-001",
  "dimension": "motion",
  "severity_bucket": "blocking",
  "message": "Application CSS uses transition: all.",
  "location": "src/app.css:12",
  "evaluation": "static"
}

Rule metadata

Each registry entry includes:

  • severity — error | warning | info
  • requirement — short normative summary
  • profiles, archetypes, evaluation — applicability
  • autofix — safe | unsafe | none
  • module, hig_section — links into the spec
  • eslint_rule — planned linter id (when present)

Normative source: HIG.md · Registry: rules/registry.yaml


Related packages

| Package | Role | | --- | --- | | @web-hig/cli | web-hig check, explain, init | | @web-hig/install | Pin HIG docs and agent rules into your repo |

Architecture: NPM-TOOLING.md


License

MIT · The Web HIG