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 🙏

© 2025 – Pkg Stats / Ryan Hefner

directus-extension-typograf

v1.0.0

Published

Apply typography rules to text fields with support for 27 languages

Readme

Directus Extension Typograf

A custom interface for Directus CMS that adds a text field with a typography button. Applies language-specific typography rules using the typograf library.

Screenshot

Installation

Search for "typograf" in Settings → Extensions → Marketplace.

Or install manually:

npm install directus-extension-typograf

Features

  • 4 Editor Types: Input, Textarea, WYSIWYG (HTML), Markdown
  • 27 Languages: Full typography support for multiple languages
  • Auto Language Detection: Automatically detects language from the languages_code field in translations
  • Safe Processing: Preserves HTML and Markdown structure during typographing
  • Smart Constraints: Only Input is available for string fields; all editors for text fields

What It Does

  • Replaces straight quotes with language-appropriate quotation marks (e.g., «ёлочки» for Russian, "curly quotes" for English)
  • Converts hyphens to proper dashes where needed
  • Adds non-breaking spaces after short words
  • Fixes multiple consecutive spaces
  • And many more language-specific typography rules

Supported Languages

| Language | Code | Language | Code | | ------------ | ------- | --------- | ---- | | Belarusian | be | Italian | it | | Bulgarian | bg | Latvian | lv | | Catalan | ca | Dutch | nl | | Czech | cs | Norwegian | no | | Danish | da | Polish | pl | | German | de | Romanian | ro | | Greek | el | Russian | ru | | English (UK) | en-GB | Serbian | sr | | English (US) | en-US | Slovak | sk | | Esperanto | eo | Slovenian | sl | | Spanish | es | Swedish | sv | | Estonian | et | Turkish | tr | | Finnish | fi | Ukrainian | uk | | French | fr | | | | Hungarian | hu | | | | Irish | ga | | |

Usage

  1. Go to your collection settings in Directus Admin
  2. Create or edit a field of type string or text
  3. Select Typograf Input as the interface
  4. Configure options:
    • Editor Type: Input / Textarea / WYSIWYG / Markdown
    • Locale: Auto (from translations) or select a specific language
    • Placeholder: Optional hint text
  5. When editing an item, click the typography button to apply rules

Note: For string (VARCHAR) fields, only single-line Input is available. For text (TEXT) fields, all editor types are available.

Development

Requirements

  • Node.js 18+
  • Docker + Docker Compose

Running Locally

  1. Start Directus in Docker:
docker compose up
  1. In a separate terminal, start extension dev mode:
cd extensions/directus-extension-typograf
npm run dev
  1. Open Directus: http://localhost:8055

Building

cd extensions/directus-extension-typograf
npm run build

Technologies

  • Directus 11.5.1
  • Vue 3 (Composition API)
  • TypeScript
  • typograf 7.6.0

License

Apache-2.0