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

@dateline/blocks

v0.3.0

Published

Thin Block Kit wrapper for Dateline over @emdash-cms/blocks: re-exports typed builders, validateBlocks, and block/element types, plus the assertResponse plugin-route envelope guard. Safe to bundle into sandboxed plugins.

Readme

@dateline/blocks

Thin Block Kit wrapper for Dateline, rebased on @emdash-cms/blocks@^0.18. Re-exports the upstream typed builders (blocks, elements), the validateBlocks validator, and every block/element type from the React-free @emdash-cms/blocks/server subpath, so the package stays safe to bundle into sandboxed plugins. The only Dateline-specific addition is assertResponse, the plugin-route envelope guard upstream does not provide.

Usage

import { assertResponse, blocks, elements } from "@dateline/blocks";

export function settingsPage() {
  return assertResponse({
    blocks: [
      blocks.header("Event settings"),
      blocks.section("Publish this event?", {
        accessory: elements.button("publish", "Publish", { style: "primary" }),
      }),
    ],
    toast: { message: "Loaded settings", type: "info" },
  });
}

0.18 shape notes

Upstream 0.18 is the source of truth for Block Kit shapes. The pre-0.18 Dateline copy used different field names that 0.18 now rejects — use the upstream shapes:

  • Stats blocks use items (not stats): blocks.stats([{ label: "RSVPs", value: 42 }]).
  • Buttons/inputs/columns use label (not text): elements.button("save", "Save"), { key, label } table columns, submit: { label, actionId }.
  • Toasts use message (not text): { message: "Saved", type: "success" }.

assertResponse

assertResponse() enforces the EmDash plugin-route contract: the response must be exactly { blocks, toast? }. It rejects transport keys (redirect, body, headers, status) and any other unknown keys, then runs the upstream validateBlocks over the blocks array. Dateline plugin routes should validate responses with it before returning them to EmDash.

See also