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

@excom/quark

v0.4.1

Published

CSS-like DOM orchestration language for binding, rendering, and events

Readme

quark

CSS-like orchestration for your HTML — bind attributes, render lists, and wire events without a component tree.

Quark is a derivative of CSS, written in CSS syntax. Selectors, nesting, declarations and comments are CSS's own; the few additions Quark makes, such as variables, expressions and at-rules of its own, stay compatible with that syntax, so anyone who can read a stylesheet can read a sheet. What differs is the runtime: a stylesheet paints, a Quark sheet writes State — attributes, content and variables on the elements it matches. Media queries, keyframes and the rest of the browser's style engine stay in your stylesheet.

Prefer <quark-sheet> for apps; use the Quark class when you need a programmatic host (tests, tooling).

Features

  • CSS-like sheets Selectors + nested rules that mutate the live DOM
  • $variables Scoped values that nest and resolve in expressions
  • JS writes element.quark.setProperty() hands values app JS already holds to the document as $variables
  • CSS variables Write --custom-props from state; style via var()
  • Content rendering content, template(), iterate(), dangerous-html()
  • Element properties prop("provision") reads Neutron provisions / any JS property, re-running on assignment
  • Events @on at-rules with delegation, key, timing and host options, plus prevent-default / stop-propagation
  • View transitions @view-transition commits a block's writes inside document.startViewTransition(), so CSS animates list changes, removals included
  • Delayed writes @delay 2000 { … } applies a block after a pause — flashes, toasts, undo windows — dropped if the rule stopped matching
  • Diagnostics @warn / @debug / @error report from a rule; the selector is the condition
  • Built-in modules @use "quark:math", quark:list, quark:map, quark:string, quark:date, quark:url, quark:util — pure helpers, imported like JS modules
  • Attribute helpers dataset, ariaset, class, none to clear
  • JS modules Pure functions from @use "/url", called in expressions
  • Scoped host Sheet + targets share a parent; updates follow DOM mutations
  • DevTools Quark.attachDevtools() reports rule applications and $variables to the Nucleus DevTools extension

Installation

Usage

App authors almost always load Quark through <quark-sheet>:

<section>
  <quark-sheet>
    details[open] [bind-status] {
      content: "Open";
    }
    details:not([open]) [bind-status] {
      content: "Closed";
    }
  </quark-sheet>
  <details>
    <summary>Panel</summary>
    <span bind-status></span>
  </details>
</section>

Programmatic API (tests / custom hosts):

import { Quark } from "@excom/quark";

const quark = new Quark({
  src: `span { content: "four times two equals #{twice(4)}"; }`,
});
quark.register({
  sheetElement, // host = sheetElement.parentElement
  modules: { dfault: { twice: (n) => n * 2 } },
});
// …
quark.unregister();

Documentation

Syntax

  • Sheets & scoping — <quark-sheet>, @scope, is-global, what runs
  • Syntax — rules, declarations, literals, operators, if()

Selectors

Declarations

Values & expressions

At-rules

Runtime

The grammar (EBNF, precedence, AST) is the quark-parser package's Language reference.

Examples

React to element state

Native element state drives content — no JS, no listeners:

List from a provider

prop("provision") pulls the fetch payload; iterate() renders a row per item and re-renders on every provision:

Call a module helper

<quark-sheet>
  @use "/helpers.js" as *;

  #out { content: formatPrice($amount); }
</quark-sheet>

Hand a value from app JS

App JS that already holds a rich value (feature flags, a messages dictionary) hands it to the document with element.quark.setProperty(), and every rule reading that $variable below the element re-runs. See Writing from JS.


Full documentation: https://nucleus.excom.dev/packages/quark