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

@lieakks/dsh-markdown-editor

v1.1.3

Published

Inline Markdown editor for the right Sidebar's document preview, with a Typora-style instant-render mode

Readme

@lieakks/dsh-markdown-editor

Edit Markdown inside the right Sidebar preview: a Typora-style instant-render mode (Vditor IR), a split live preview, source, and preview — all saved back to the same workspace file.

English | 中文

Summary

The Sidebar's Markdown preview is the editor, with four modes:

  • WYSIWYG — the IR (instant-render) mode of the bundled Vditor 4.0.1, close to Typora: edit the rendered document directly and Markdown syntax forms as you type.
  • Split — Markdown source on the left, live rendered output on the right (this package's own renderer).
  • Source — the raw Markdown only.
  • Preview — the rendered document only.

Ctrl/Cmd+S (or Save) writes the same file on disk; a changed file turns the button into Overwrite; a disk-side change offers Reload. A leading YAML frontmatter block is split off in WYSIWYG mode and reattached unchanged, so the editor never rewrites it. Images with relative or local destinations resolve beside the source file through the same authenticated api/file route the split view uses.

The workspace file Remote (@deepseek-ai/dsh-api-workspace-files) exposes no mutation operation, so the write channel is this package's Host half. It also serves the Vditor runtime from the package itself (/markdown-inline-editor/vditor/...), so the editor is fully offline and never touches a CDN.

Where it appears

  • The preview itself — this package's Markdown implementation (extension band, selected before the built-in builtin renderer); the viewer dropdown still offers the built-in read-only renderer.
  • The toolbar — WYSIWYG / Split / Source / Preview, the unsaved marker, and Save (Overwrite after a conflict). The chosen mode is remembered.
  • Notice rows — save failures, out-of-date files (with Reload), and a failed WYSIWYG mount (with Switch to Split).

The split stacks vertically when the pane is narrower than about 620px.

Usage

  1. Open a Markdown file from the workspace tree or a file link.
  2. The last used mode opens; press WYSIWYG to edit on the rendered document (the first switch loads the ~3.7MB Lute parser from the local Host route).
  3. Ctrl/Cmd+S saves; if the file changed on disk the button reads Overwrite and the next press writes deliberately.
  4. Use Source or Split when exact formatting matters, and Preview to read.

Build and runtime

  • src/client.js is the browser half; build/build.mjs bundles it with Vditor's script and stylesheet into client.js (~372 KB) using esbuild.
  • Dependencies live in build/: cd build && npm install && node build.mjs.
  • Vditor's lazily loaded assets (Lute, i18n, icons, highlight.js, diagram/math engines) are copied to vendor/vditor/js and served by the Host route with an extension whitelist and no path escaping.
  • License: Vditor 4.0.1 is MIT; the libraries inside its runtime are listed in THIRD-PARTY-NOTICES.md.

What the Host routes require

Both editing routes ask the composition's connection service for a rejection first (Host/Origin fence and browser authentication), then require:

  • a live Session of this Host (sessions);
  • an absolute path that resolves, through its real path, inside that Session's effective working directory (workingDirectory, falling back to the Session header's project);
  • an existing regular Markdown file that is not itself a symbolic link;
  • a JSON body under 8 MiB and text under 2 MiB that is valid UTF-8.

Nothing is created: a missing file is refused. The vendor route reads only files under vendor/vditor, whitelists js/css/json/map/svg/png/gif/jpg/jpeg/webp/woff/woff2/ttf, and refuses .., backslashes, and encoded traversal.

Known Limitations

  • WYSIWYG normalizes Markdown — Vditor serializes the document itself on save, so list markers, table alignment, and some whitespace can change. Frontmatter is preserved by splitting it out; byte-identical formatting is not guaranteed. Use Source when exact formatting matters.
  • First WYSIWYG mount loads Lute (~3.7MB over the local Host route).
  • Markdown only, existing files only — no creation, rename, or delete; 2 MiB text ceiling.
  • Live Sessions only — a Session not live in this Host can be previewed but not saved.
  • No collaborative merge — a changed file is reported, not merged.
  • No cross-page drafts — unsaved text survives tab, pane, and mode switches while the page lives; a page reload discards it.