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

@edrlab/thorium-web

v1.0.9

Published

Play with the capabilities of the Readium Web toolkit

Readme

Thorium Web

Thorium Web is a web-based reader for EPUB and other digital publications, built using Next.js and modern web technologies. It is designed to provide a fast, responsive, and accessible reading experience.

Features

  • Supports EPUB
  • Fast and responsive rendering of publications using Next.js
  • Accessible design for readers with disabilities
  • Customizable reading experience with themes, adjustable font sizes, line heights, word- and letter-spacing, etc.

Getting Started

There are two ways to get started with Thorium Web:

  • Using the Next.JS App as is
  • Using the Thorium Web package in your own project

You can take a look at the Implementers’ Guide for more details.

Using the Next.JS App as is

To get started with Thorium Web, follow these steps:

  • Fork or clone the repository: git clone https://github.com/edrlab/thorium-web.git
  • Install dependencies: pnpm install
  • Start the development server: pnpm dev
  • Open the reader in your web browser: http://localhost:3000

The development server will automatically reload the page when you make changes to the code.

Using the Thorium Web package in your own project

To use Thorium Web in your own project, install the package and its peer dependencies:

npm install @edrlab/thorium-web @readium/css @readium/navigator @readium/navigator-html-injectables @readium/shared react-redux @reduxjs/toolkit i18next i18next-browser-languagedetector i18next-http-backend motion react-aria react-aria-components react-stately react-modal-sheet react-resizable-panels 

Then you can import and use the components in your own code:

import { StatefulReader } from "@edrlab/thorium-web/epub"

const MyApp = () => {
  // ... fetch the manifest and get its self link href
  return (
    <StatefulReader
      rawManifest={ manifestObject }
      selfHref={ manifestSelfHref }
    />
  )
}

You can use the StatefulReader component to use the same exact Reader component as the one in the Next.JS App, but with your own plugins, store and preferences. Or you can use its components to build your own custom reader.

[!IMPORTANT] At this point in time, when using components from @edrlab/thorium-web/epub, you have to import the store/lib, hooks and Preferences Provider from the same path, otherwise your custom app will use another instance.

Customizing

You can customize this project extensively through Preferences: breakpoints, which and how to display actions, themes provided to users, configuration of the docking system, sizes and offsets of icons, etc.

See Customization in docs for further details.

Building and Deploying

To build and deploy Thorium Web, run the following commands:

pnpm build
pnpm run deploy

This will create a production-ready build of the reader and deploy it to the specified hosting platform.

This repository is using the following configuration:

  • Go-Toolkit on Google Cloud Run
  • Thorium Web App on CloudFlare Pages
  • Assets e.g. demo EPUBs stored on Google Cloud Storage

To deploy, the following script is run:

npx @cloudflare/next-on-pages && npx wrangler pages deploy

It’s running with defaults, which means a commit triggers a build and deploy for the current branch to preview. You can then access the app from a subdomain using this branch name.

More details in the @cloudflare/next-on-pages repo.

Known Issues

  • Fullscreen is not available on iOS and very limited on iPadOS. We encountered so many issues on iPadOS that it has been disabled for the time being.
  • on iPadOS, when the app is requested in its desktop version, some interventions are implemented in Safari to provide users with a “desktop-class experience.” Unfortunately, one of this intervention is impacting the font-size setting, and requires a flag to be toggled in the Preferences API in order to apply a patch. However, this patch may not catch all edge cases.

Contributing

We welcome contributions to Thorium web! If you're interested in helping out, please fork this repository and submit a pull request with your changes.

License

Thorium Web is licensed under the BSD-3-Clause license.

Acknowledgments

Thorium Web is built using a number of open-source libraries and frameworks, including Readium, React, React Aria, and Material Symbols and Icons. We are grateful for the contributions of the developers and maintainers of these projects.