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

@ux-sting/design-dna

v0.13.0

Published

Design DNA: a framework-independent, editable spec of a design identity (tokens, type scale, layout, sections) with provenance, plus deterministic generation, comparison and improvement for UX-STING Universal.

Downloads

2,554

Readme

@ux-sting/design-dna

Prototype. Design DNA is a framework-independent, editable description of a design identity: measured colors, type scale, spacing, container, section geometry and composition. Every value records whether it was observed in a rendered page, inferred from observations, chosen from a brief, taken in a remix, or edited by a person or the improvement loop.

This package is the deterministic core of UX-STING Universal (see docs/UNIVERSAL_VISION.md). It has no dependencies and does no I/O; the browser pipeline lives in scripts/design-dna/.

| Module | Does | | --- | --- | | dnaFromObservation | Turns computed-style and geometry measurements of a page into DNA, with provenance | | planDirections, scoreDirection, dnaFromDirection | Plans original directions from a brief along type × palette × composition axes, scores them, keeps ones that differ on ≥ 2 axes | | generatePage | Renders semantic, responsive HTML whose layout comes from each section's composition | | dnaToCss, dnaToDtcg, dnaToUxStingTheme | Exports tokens as CSS variables (incl. UX-STING --ui-*), W3C DTCG JSON, or a UX-STING theme config | | compareDna, compareImages | Token-level fidelity score and pixel/SSIM metrics on screenshots | | proposeFixes, applyFixes | Deterministic corrections: accessibility first, then layout, then fidelity | | remixDna | Style transfer: take facets (color, typography, …) from other DNAs, keep your sections | | validateDna | Contrast, readability, scale order and layout checks | | checkTargetUrl, isPrivateAddress | SSRF guards for anything that loads a user-supplied URL |

Run the pipeline

pnpm --filter @ux-sting/design-dna build
# Original design from a brief (three directions, each rendered, audited and improved):
pnpm dna original scripts/design-dna/briefs/salon-noor.json --out design-dna-output/noor
# Reconstruction of a site you own or may reproduce (here, a local UX-STING example):
pnpm --filter @ux-sting/example-ember build && (cd examples/ember && npx next start -p 4100 &)
pnpm dna reconstruct http://localhost:4100/ --authorized --allow-host localhost:4100 --out design-dna-output/ember

Set CHROMIUM_PATH if Playwright's bundled browser is not installed. Each run writes dna.json, generated index.html per iteration, screenshots at 1280 and 390 px, report.md and report.html.

Limits (by design, for now)

  • Screenshots and computed styles never reveal source code; the analyzer does not claim to know it.
  • Without --authorized, no text is copied: content becomes labelled placeholders. Imagery and logos are never copied; media becomes token-colored placeholders.
  • Interactive components (forms, tabs, maps, accordions) are detected only as sections; mapping them to UX-STING components is the next phase.
  • The output is a standalone HTML page. React/Next.js adapters are on the roadmap (docs/IMPLEMENTATION_ROADMAP.md).