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

@nulib/clover-illustration-detector-plugin

v1.1.1

Published

Clover IIIF plugin to detect illustrated pages using a lightweight client-side model.

Readme

Clover Illustration Detector Plugin

A plugin for @samvera/clover-iiif that adds an Information Panel tab to classify IIIF canvases as illustrated or not-illustrated using a lightweight Hugging Face image classification model.

Install

In a Clover host app, install both Clover and this plugin:

npm install @samvera/clover-iiif@latest @nulib/clover-illustration-detector-plugin

@samvera/clover-iiif is declared as a peer dependency (>=3.3.8 <5) so the host app controls the Clover version while satisfying plugin compatibility.

How To Use In A Clover App

Register the plugin with your existing Clover viewer.

import Viewer from "@samvera/clover-iiif/viewer";
import { createIllustrationDetectorPlugin } from "@nulib/clover-illustration-detector-plugin";

const plugins = [
  createIllustrationDetectorPlugin({
    id: "illustration-detector",
    tabLabelByLanguage: {
      en: "Illustrations",
      fr: "Illustrations",
      es: "Ilustraciones",
    },
    translations: {
      fr: {
        classifyManifest: "Classifier le manifeste",
        classifying: "Classification...",
        summaryPending: "En attente",
      },
      es: {
        classifyManifest: "Clasificar manifiesto",
        classifying: "Clasificando...",
        summaryPending: "Pendientes",
      },
    },
  }),
];

export function ManifestViewer({ manifestUrl }: { manifestUrl: string }) {
  return (
    <Viewer
      iiifContent={manifestUrl}
      plugins={plugins}
      options={{
        informationPanel: { open: true },
      }}
    />
  );
}

Plugin options:

  • id (optional): custom plugin id. Default: illustration-detector.
  • tabLabel (optional): fallback Information Panel tab label (none locale). Default: Illustrations.
  • tabLabelByLanguage (optional): localized Information Panel tab labels by language code.
  • translations (optional): UI translation overrides by language code for in-panel strings.

i18n Notes

  • Clover controls active language via its i18next setup.
  • This plugin registers its own namespace (illustrationDetector) and includes default English strings.
  • This plugin also includes built-in fr and es translations for core UI/status text.
  • Provide translations to override/add strings for your supported locales.

Common translation keys:

  • classifyManifest, classifying
  • summaryClassified, summaryPending, summaryErrors
  • statusPending, statusClassifying, statusClassified, statusError, statusSkipped
  • labelIllustrated, labelNotIllustrated
  • confidenceThresholdLabel, noThumbnail, navigateToCanvasAriaLabel

Screenshot

Clover Illustration Detector Plugin screenshot

Features

  • Adds an Information Panel tab (Illustrations by default)
  • Classifies every canvas in the active manifest
  • Shows translated status, predicted label, and illustrated confidence per canvas
  • Includes icon-based visual cues for summary counts and per-canvas status/labels
  • Supports confidence threshold filtering in the panel UI
  • Lets users click a result to navigate to that canvas

Development

npm install

Run local dev viewer (Vite, port 3003):

npm run dev

Build distributable output (dist/, ESM + CJS + types):

npm run build

Watch library build:

npm run watch

Type-check:

npm run typecheck

Test App (Temporary)

This repo includes a disposable integration app in /test-app for real-world verification against the published package.

cd test-app
npm install
npm run dev

Delete /test-app after verification and documentation are complete.

Publish

npm publish

The prepublishOnly script runs typecheck and build before publishing.

Notes

  • The classifier model is loaded from Hugging Face:
    small-models-for-glam/historical-illustration-detector
  • Classification runs client-side and processes canvases concurrently.
  • Canvases without an image body/thumbnail are marked as skipped.