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

@traq-flavored-markdown/traq-plugin

v0.3.0

Published

traQ-specific Markdown contracts and HTML rendering.

Readme

traQ plugin

This package provides the traQ-specific Markdown extensions used by traQ. The SDK chooses their grammar order and ships the resulting presets, bindings, and application policies.

| Crate | Purpose | | -------------------------- | ------------------------------------------------------- | | markdown-traq-contracts | Nodes for stamps, references, spoilers, and blank lines | | markdown-traq-syntax | traQ syntax | | markdown-traq-text | Plain-text rendering for traQ nodes | | markdown-traq-extraction | Reference extraction |

Add the individual rule plugins to an application's GrammarBuilder or RenderPresetBuilder. The caller selects their order and decides attachment and citation URL display and how processing results are combined.

Boundaries

The TypeScript package depends only on core. It does not depend on SDK composition or distribution code.

The TypeScript package exports generated node types and HTML renderers. The Go module is github.com/traPtitech/traq-flavored-markdown/packages/plugins/traq/go; its payloads and node factories are generated from these Rust contracts. The shared AST and Wasm runtime remain in the core Go module.

Import @traq-flavored-markdown/traq-plugin/index.css for standalone spoilers, references, stamps, and animation styles. CSS custom properties control colors and stamp sizes. /nodes exports schema; pass it to createRenderer(preset, { schema }) when rendering raw documents.

/nodes also exports immutable contractValues and arrayLimits metadata from the Rust contracts. Editors can use contractValues.StampAnimation, contractValues.StampSize, and arrayLimits.StampEffects.animations.maxItems to offer valid effects without maintaining another list of names or bounds.

Spoilers render as .spoiler elements, concealed until the host adds the shown attribute. Hosts own pointer and keyboard activation, focus, and matching accessibility state for interactive spoilers. Reference classes use .message-user-link, .message-group-link, or .message-channel-link; highlighted users and groups add the corresponding -highlight class. Stamp .emoji elements and ordered .emoji-effect wrappers share the --tfm-stamp-*-size properties.

The HTML plugin accepts resolveReference(reference) and resolveStamp(namedStamp) adapters. A reference resolver returns optional href, label, and highlight; a stamp resolver returns url and optional title. Applications own user/group stores, routes, and stamp API paths. Unresolved stamps preserve their escaped original notation. URL policies are applied after resolution, independently for links and stamp images.

spacing preserves additional source blank lines in their original containers. An empty quote needs no synthetic node; the SDK display profile controls its visibility. Stamps store semantic colors (numeric RGB, RGBA, or canonical HSL) and keep their literal source separately.

Hex color stamps accept exactly 3, 4, 6, or 8 hexadecimal digits after 0x. Three-digit RGB and four-digit RGBA forms duplicate each digit, so :0xf00: is red (#ff0000) and :0xf008: is translucent red (#ff000088). Six-digit RGB keeps the existing hex_color payload; four- and eight-digit RGBA use hex_rgba_color with an unsigned 32-bit rgba value in RRGGBBAA order. HTML uses lowercase six- or eight-digit colors and labels, preserving alpha and leading zeros. Plain-text rendering retains the authored notation. Effects and sizes apply to all color forms. Other lengths and invalid hex digits remain ordinary stamp names, with no truncation or zero-padding guess.

The SDK processing crate owns the traQ composition and runnable native examples.