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

quizdown-extended-live-editor

v0.1.0

Published

Local live editor for Quizdown-Extended markdown quizzes with Monaco + Vite

Downloads

9

Readme

Quizdown Extended Live Editor

A Vite + React + TypeScript live editor for Quizdown-Extended markdown quizzes. Monaco on the left, quizdown-extended + Shiki preview on the right.

Install & run from npm

Global install (recommended):

npm install -g quizdown-extended-live-editor
quizdown-editor --quizzes ./quizzes --port 4173
  • --quizzes (optional) sets the directory where your markdown quizzes are read/written. Defaults to ./quizzes (created if missing).
  • --port (optional) defaults to 4173.
  • The npm package never ships user quizzes; public/quizzes is excluded from publish.

Once running, open the printed URL and use the UI to create/save files. Keyboard: ⌘/Ctrl+S saves.

Local development (from repo)

npm install
npm run dev

The dev server runs on port 4173 and enables the /__quiz-editor/* endpoints for file operations against public/quizzes (repo-local).

How it works

  • App shell: src/App.tsx manages theme, file list, active file, pane split, and buttons wired to the editor ref (save, appendQuestion).
  • Editor: src/components/Quiz/QuizMarkdownEditor.tsx lazy-loads Monaco, fetches /__quiz-editor/quizzes/<file>, tracks latestValue, handles Cmd/Ctrl+S, and uses custom github-light / github-dark Monaco themes.
  • Preview: src/components/Quiz/QuizComponent.tsx renders with quizdown-extended, registers Shiki languages (Python + local Robot grammar), chooses github-light/github-dark by theme, and builds quiz IDs from window.location.pathname + name.
  • Preview: src/components/Quiz/QuizComponent.tsx renders with quizdown-extended, registers Shiki languages (Python, Robot, plus ~40 common languages), chooses github-light/github-dark by theme, and builds quiz IDs from window.location.pathname + name.
  • File API: vite.config.ts exposes /__quiz-editor/list and /__quiz-editor/quizzes/<path> and also serves /quizzes/<path> from the configured quizzes directory (env QUIZDOWN_QUIZZES_DIR set by the CLI). Paths are sandboxed to that directory.

Quiz syntax example

---
shuffleQuestions: false
shuffleAnswers: true
---

### Choose TWO answers that best demonstrate what this editor can handle

Scenario: You need to show teammates that a single Quizdown question can mix formatting, inline code like `**bold**`, and fenced code blocks. The preview should render all of it live.

> This is a hint block with **bold** text.
> ```python
> # This is a fenced Python block inside a hint
> def greet(name):
>     return f"Hello, {name}!"
> ```

- [x] **Include a Robot snippet with comments**
   ```robot
   *** Keywords ***
   Demo Keyword
         Log    Rich formatting is supported

Rationale: Shows fenced robot blocks stay highlighted and readable.

  • [x] Mix prose, lists, and JS code

    const message = 'Monaco + Quizdown + Shiki';
    console.log(message);

    Rationale: Demonstrates multi-language highlighting and inline code.

  • [ ] Rely only on plain text without structure

    Rationale: Possible, but does not showcase the editor’s formatting capabilities.

  • [ ] Avoid rationales to keep the file short

    Rationale: Rationales are helpful for authors and are fully supported, so omitting them reduces clarity.


Use the same Quizdown-Extended syntax for frontmatter, choices, rationales, and code blocks. The editor preview reads directly from the quizzes directory you point it to.

### Syntax highlighting languages

Registered with Shiki at runtime:

Python, Robot Framework, JavaScript, TypeScript, JSON, JSONC, HTML, CSS, SCSS, Less, Bash, ShellScript, PowerShell, Dockerfile, Makefile, Markdown, YAML, TOML, SQL, GraphQL, XML, INI, Properties, Pug, Handlebars, Vue, Go, Rust, Java, Kotlin, Swift, C, C++, C#, Objective-C, PHP, Ruby, Perl, Lua, Dart, Scala, Groovy, R, F#, Diff.

## Notes & constraints

- Quizzes are always relative to the configured quizzes directory; the CLI sets `QUIZDOWN_QUIZZES_DIR`, defaulting to `./quizzes`.
- `public/quizzes` must **not** be published to npm; it is ignored via `.npmignore`.
- Theme is controlled via `data-theme`/`color-scheme`; Monaco uses custom `github-light`/`github-dark` (based on `vs`/`vs-dark`), Shiki uses `github-light`/`github-dark`.