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

@markdy/core

v1.5.0

Published

Diagram-native MarkdyScript parser and compiler (auto-layout, edge routing, cue scheduling) — zero runtime dependencies.

Readme

@markdy/core

The zero-dependency parser, dynamic port multiplexer, and AST routing engine for MarkdyScript — a diagram-native DSL for animated architecture diagrams that AI agents generate reliably.

🚀 Try it live: Test MarkdyScript in the browser at markdy.com/playground
📚 Documentation: Complete syntax guide and examples at markdy.com/docs
🌟 Architecture Blueprints: 30+ canonical production diagrams at markdy.com/examples
💼 Enterprise & Commercial: Free under MIT. To support development or request custom architecture blueprints, explore GitHub Sponsors.

Features

  • Zero runtime dependencies — pure TypeScript, no DOM or platform APIs (~14 KB minzipped)
  • Single-pass parser — line-by-line state machine with strict ParseError line-number diagnostics
  • Dynamic Port Multiplexer & Smooth Router — obstacle-aware orthogonal Manhattan routing with balanced multi-lane fan-in/fan-out and smooth fillet curves
  • Code Provenance & Git In-Tree Grounding — anchor architecture nodes directly to source files (@src="path/file.ts#L10-L40") with automated path traversal security and bounds validation
  • Architectural Evolution & Git-Diff Matrix — deep structural and visual comparison of architecture states with auto-generated animated migration storyboards
  • Native Vector Symbol Registry — zero-dependency vector SVG icons for 20+ top cloud, database, runtime, and messaging technologies
  • 17 Specialized Layout Enginesarchitecture, flowchart, tree, sequence, state, layers, nested, swimlane, timeline, gantt, medallion, flywheel, constellation, quadrant, pyramid, radar, venn
  • 10 Semantic Themespaper, editorial, midnight, blueprint, graphite, nebula, terminal, sketchy, ink, doodle
  • Content-Adaptive Canvas Sizing — automatically calculates optimal aspect ratio and bounds based on diagram items and topology
  • Well-Architected Governance & AST Diffing — layer boundaries, deadlock cycle detection, gateway isolation, and semantic AST evolution
  • Isomorphic — runs in Node.js, Deno, Bun, edge runtimes, and the browser

Installation

pnpm add @markdy/core

Package Position

@markdy/core
  -> parser + AST types (no DOM, no runtime deps)
  -> dynamic port multiplexer & orthogonal router
  -> code provenance & git verification
  -> architectural evolution & diff matrix
  -> native vector symbol registry
  -> foundation for renderer, CLI, language server, and integrations

Usage

import { parse, ParseError, diffDiagramASTs, resolveVectorSymbol } from "@markdy/core";
import type { DiagramAST } from "@markdy/core";

const source = `
scene "Cache-Aside Architecture" theme=paper
layout LR

browser Client "Web Client"
gateway Gateway "API Gateway"
service Shortener "URL Service" @src="src/url/service.ts#L15-L80"
cache Redis "Redis Cluster" icon=redis
database Postgres "PostgreSQL 16" icon=postgresql

beat hit:
  show $nodes stagger=60ms
  Client -> Gateway "GET /x9" -> Shortener "resolve"
  Shortener -> Redis "GET slug:x9"
  Shortener <- Redis "200 Target URL"
  Client <- Gateway "301 Redirect"
`;

try {
  const ast: DiagramAST = parse(source);

  console.log(ast.meta);   // { width: 1280, height: 720, fps: 60, theme: "paper", direction: "LR", title: "Cache-Aside Architecture" }
  console.log(ast.nodes);  // { Client: { kind: "browser", ... }, Shortener: { ... } }
  console.log(ast.beats);  // [{ name: "hit", cues: [...] }]
} catch (e) {
  if (e instanceof ParseError) {
    console.error(`Line ${e.line}: ${e.message}`);
  }
}

Key API Exports

| Export | Type | Description | |---|---|---| | parse | (source, opts?) => DiagramAST | Parse MarkdyScript source into a diagram AST | | compile | (ast) => RenderPlan | Lay out nodes, route edges, and schedule cues | | routeOrthogonalEdge | (src, tgt, opts?) => RoutedPath | Compute collision-aware orthogonal waypoints with smooth fillet curves | | allocatePortLanes | (edges, boxes) => Map | Dynamic port multiplexer distributing multi-edge lanes along node perimeters | | parseCodeAnchor / extractDiagramCodeAnchors | functions | Parse and extract @src code provenance anchors from diagram nodes | | verifyCodeAnchorsWithReader | (anchors, reader) => Report | Verify code anchors against local repository files and line counts | | diffDiagramASTs | (astA, astB) => DiffResult | Compare architecture versions and generate executable migration storyboards | | resolveVectorSymbol / renderSymbolSvg | functions | Zero-dependency vector SVG icon registry (AWS, K8s, Redis, Postgres, Kafka...) | | generateThemeFromBrand | (hexColor, name?) => { light, dark } | Generate WCAG-compliant light and dark theme palettes from any brand hex color | | compressMarkdyToUrlHash / decompress | functions | Lossless URL hash state encoder for shareable playground links | | THEMES / resolveTheme | tokens / function | 10 Semantic theme palettes |

Ecosystem & Documentation

License

MIT