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

@pixerate/markdown-conformance

v0.2.0

Published

Shared Markdown editing fixtures and format-command manifest

Readme

@pixerate/markdown-conformance

Shared Markdown editing fixtures and format-command manifest.

This data-only package serves as the single source of truth for Markdown editing behaviour and format commands shared between @pixerate/editor (web / TipTap / ProseMirror) and Swash (a native Swift Markdown editor).

Contents

  • manifest.json: Single source of truth for formatting commands (ids, labels, groups, shortcuts, surfaces, conditions) and supported code languages.
  • schema/: JSON Schemas for validating manifest.json and fixture files.
    • manifest.schema.json
    • fixture.schema.json
  • fixtures/: Test fixtures specifying "this Markdown + this selection + this command → this Markdown + this selection":
    • inline-toggle.json: Bold, italic, strikethrough, inline code.
    • links.json: Link wrapping, modifying URL, unwrapping.
    • blocks.json: Headings 1–6, paragraphs, blockquotes, lists, task lists.
    • code-blocks.json: Fenced code blocks with/without language tags.
    • newline.json: Return/Enter key behavior (list continuation, empty list exit, split paragraph).
    • indent-outdent.json: List indent and outdent (Tab / Shift+Tab).
    • backspace.json: Backspace behavior at block boundaries and selections.

Selection Markers

Selections are represented inline using distinct Unicode markers rather than character offsets:

  • ‸ (U+2038 CARET): Collapsed caret position.
  • ⟦ (U+27E6 MATHEMATICAL LEFT WHITE SQUARE BRACKET) and ⟧ (U+27E7 MATHEMATICAL RIGHT WHITE SQUARE BRACKET): Selection range boundaries.

Every input and expected string must contain exactly one selection (either a single ‸ or a single matching ⟦...⟧ pair).

Manifest Format

The manifest describes formatting commands exposed in UI surfaces (such as bubble menus, format menus, command palettes, and keyboard shortcut bars):

{
  "commands": [
    {
      "id": "format.bold",
      "label": "Bold",
      "group": "Format",
      "shortcut": "Mod+B",
      "surfaces": ["bubble", "menu"],
      "enabledWhen": ["notInCode"]
    }
  ],
  "codeLanguages": [
    { "id": "javascript", "label": "JavaScript", "shortLabel": "JS" }
  ]
}

Surfaces

  • bubble: Contextual bubble/floating menu over selection.
  • menu: Application or format menubar.
  • palette: Command palette.
  • keyboardBar: Mobile or touch keyboard accessory bar.

EnabledWhen Conditions

  • notInCode: Enabled when selection/cursor is not inside inline code or a code block.
  • inTable: Enabled when cursor is inside a table cell.
  • hasSelection: Enabled only when a non-empty text selection exists.

Fixture Format

{
  "$schema": "../schema/fixture.schema.json",
  "cases": [
    {
      "id": "bold-partial-word",
      "description": "Bolding part of a word wraps just the selection",
      "command": "format.bold",
      "input": "Hello ⟦wor⟧ld",
      "expected": "Hello **⟦wor⟧**ld"
    }
  ]
}

Fields

  • id (required): Unique kebab-case identifier within the entire corpus.
  • command (required): A command id from manifest.json (e.g. format.bold) or the edit.* editing namespace (edit.newline, edit.indent, edit.outdent, edit.backspace).
  • params (optional): Arguments passed to the command, conforming to the command's parameter schema.
  • input (required): Starting Markdown document with inline selection marker.
  • expected (required): Expected resulting Markdown document with inline selection marker.
  • expectedNoop (optional): true if the command should make no change.
  • description (optional): Human-readable summary of the test case.
  • skip (optional): { "editor"?: string, "swash"?: string } reasons why an editor skips this fixture.
  • variants (optional): { "editor"?: string, "swash"?: string } alternate expected output if the implementation intentionally differs.

How Consumers Run It

In @pixerate/editor (TypeScript / Vitest)

The test runner in packages/core/tests/markdown-conformance.test.ts:

  1. Loads each fixture file.
  2. Imports the input string into a TipTap editor configured with createRichTextPreset({ markdown: true }).
  3. Resolves the marker positions and sets the ProseMirror selection.
  4. Executes the command matching command via the editor's command registry or TipTap chain.
  5. Serializes the result via getEditorMarkdown(editor) and restores selection markers.
  6. Asserts equality against variants.editor ?? expected (or skips if skip.editor is present).

In Swash (Swift / XCTest)

A Swift test suite imports this package from npm, parses each JSON fixture, initializes a SwashDocument, applies the corresponding action, and compares the resulting source and selection.