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

@wendig/qtei

v0.6.2

Published

Visualize your TEI documents easily.

Readme

QTEI

Visualize your TEI documents easily.

https://user-images.githubusercontent.com/506366/196818784-b2f81a76-97b4-46d7-abb5-804e3b12d81c.mov

Getting started

QTei works as a ES6 module, can be used with the browser directly and ships a development environment:

ES6 module

Add QTei to your javascript project with npm

npm install @wendig/qtei -D

And then use it like this

import QTei from '@wendig/qtei'
const qtei = new QTei.Viewer(...)

Directly with the browser

Include it in your page with simple html tags

<html>
  <head>
    ...
    <link
      rel="stylesheet"
      type="text/css" href="https://unpkg.com/@wendig/qtei/dist/qtei.min.css"
    />
    ...
  </head>
  <body>
    ...
    <script src="https://unpkg.com/@wendig/qtei/dist/qtei.min.js"></script>
    ...
  </body>
</html>

Development environment

This repository also ships with a development environment. This is how you set it up:

First, install git and nodejs on your workstation. Then open a terminal and clone the repository

git clone https://github.com/ieg-dhr/QTEI.git

Rename your TEI file to content.xml and move it into the data directory.

Now install all dependencies and run the development server:

cd QTEI
npm install
npm run dev

At this point, you should see your TEI file rendered at http://localhost:4000. Use whatever editor you prefer to make modifications to the viewer itself or to the TEI content, the page will immediately reflect the changes.

Usage

In general, the QTEI.js library can be used in two ways:

  • use the integrated viewer (shows TEI XML source along rendered text with a facsimile and potentially a map). It provides a pagination, column controls and some styling but it isn't as customizable
  • use just some parts of the library to build your own and integrate into your own systems

This is a example of a full html page making use of QTei:

<!DOCTYPE html>

<html>
  <head>
    <!-- when using the viewer widget, also include bootstrap to provide a
      default look, otherwise, just write your own css -->
    <link
      rel="stylesheet"
      type="text/css"
      href="https://unpkg.com/[email protected]/dist/journal/bootstrap.min.css"
    />

    <!-- include the css for highlighting the XML TEI source (highlight.js) -->
    <link
      rel="stylesheet"
      type="text/css"
      href="https://unpkg.com/@highlightjs/[email protected]/styles/github.min.css"
    />

    <link
      rel="stylesheet"
      type="text/css" href="https://unpkg.com/@wendig/qtei/dist/qtei.min.css"
    />

    <!-- include these if you intend to use the map component -->
    <link
      rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"
    />
    <script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
  </head>
  <body>
    <div is="qtei-viewer"></div>

    <script src="https://unpkg.com/@wendig/qtei/dist/qtei.min.js"></script>
    <script>
      function renderFacsimile(data) {
        // write the code here to extract the facsimile from the current page's
        // xml, data.content is a reference to the XML DOM. Have a look at the
        // src/app.js file for an example implementation
      }

      function mappify(data) {
        // write the code here to extract geo location data from your pages to
        // be rendered within the leaflet map. Have a look at the src/app.js
        // file for an example implementation
      }

      var qtei = new QTei.Viewer('[is=qtei-viewer', {
        src: "url/to/your/tei.xml",
        processors: [
          QTei.processors.wrapAll('persName', 'person-fill', 'person'),
          QTei.processors.wrapAll("rs[type='person']", 'person-fill', 'person'),
          QTei.processors.wrapAll('placeName', 'geo-alt-fill', 'place'),
          QTei.processors.wrapAll("rs[type='artwork']", 'palette-fill', 'artwork'),
          QTei.processors.renderXmlTo('#raw'),
          QTei.processors.highlightXml('#raw'),
          QTei.processors.renderContentTo('#content')
        ]
      })
    </script>
  </body>
</html>

Licenses

  • https://freesvg.org/black-book-with-many-pages
  • https://freesvg.org/tilted-grayscale-book