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

@coffer-org/web-sdk

v1.3.0

Published

The UI contract for Coffer plugin **web bundles**. A plugin's `dist/web.js` is loaded at runtime by the host's federation loader; this package defines what that bundle declares (`ModuleUIBundle`) and the field-renderer registry it plugs into.

Readme

@coffer-org/web-sdk

The UI contract for Coffer plugin web bundles. A plugin's dist/web.js is loaded at runtime by the host's federation loader; this package defines what that bundle declares (ModuleUIBundle) and the field-renderer registry it plugs into.

What a web bundle exports

web.js default-exports a ModuleUIBundle — or an array of them:

export default ModuleUIBundle | ModuleUIBundle[];

Build one with defineModuleUI(vault, module, bundle):

import { defineModuleUI } from '@coffer-org/web-sdk';

export default defineModuleUI('myplugin', 'note', {
  // RecordView?:  custom record renderer (replaces the generic RecordContent)
  // renderers?:   FieldRenderer[] — own field-type renderers (each carries kinds[])
  // translations?: Partial<Record<'uk' | 'ru' | 'en', Record<string, unknown>>>
  translations: { en: { 'myplugin.hello': 'Hello from myplugin' } },
});

The host's federation loader applies each bundle once: it registers any RecordView for vault/module, calls registerRenderer for every entry in renderers, and merges translations into the global i18next instance. See packages/web/federation.ts for the loader.

Vendor singleton model (importmap)

Plugin web bundles must not ship their own copy of React, i18next, or @coffer-org/web-sdk — they share the host's. The host publishes one vendor bundle under /vendor/* and wires an import map so every bare specifier resolves to that single instance:

<script type="importmap">
  {
    "imports": {
      "react": "/vendor/react.js",
      "react-dom": "/vendor/react-dom.js",
      "i18next": "/vendor/i18next.js",
      "@coffer-org/web-sdk": "/vendor/web-sdk.js"
    }
  }
</script>

This keeps a single React (so hooks/context work across bundles) and a single i18next (so addResourceBundle merges into the one live instance). In dev, Vite resolves these specifiers via its own aliases, so the import map is a prod-only concern.

Supported vendor majors

| Vendor | Range | | --------------------- | ---------------------------- | | react / react-dom | 19 (>=19) | | i18next | 26 (23+ host-compatible) |

A scaffolded plugin declares these as peer dependencies (see create-coffer-plugin's package.json template), so it builds against the host's instance instead of bundling its own.

Mismatched vendor versions warn, don't block

The import map always resolves a plugin's react / react-dom / i18next / @coffer-org/web-sdk imports to the host's single instance — there is no runtime version gate that refuses to load a bundle. A vendor-major mismatch surfaces as a peer-dependency warning at install/build time, not a hard runtime failure: a plugin built against an older major still loads against the host's instance and runs as far as the shared API allows. Keep peers in range to avoid surprises; a mismatch is a warning, not a block.