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

@nfdi4plants/swate-components

v2.0.4

Published

Customizable React components for ontology annotation, based on Swate and the ARC.

Readme

Components

Local Dev

Tests

  1. Once: npm test
  2. Watch: npm run test:watch

Playground

npm start

Run Storybook

npm run storybook

Build Storybook

npm run build:storybook

Build Npm Package

npm run build

Test Npm Package

npm pack can be used to locally test the npm package before publishing it. It creates a .tgz file in the ./src folder. MUST run npm run build first to transpile the f# code and bundle the js code.

Can be references like this in a react test repo after moving the .tgz file to the test repo:

"dependencies": {
    "@nfdi4plants/swate-components": "file:./nfdi4plants-swate-components-2.0.2.tgz",
    "react": "^19.1.0",
    "react-dom": "^19.1.0"
  },

Build .NET Package

npm run build:net

Release

.NET

  1. Update version in ./src/Components.fsproj
  2. npm run build:net (creates tailwind style css and packs nuget package)
  3. Upload nuget package from ./src/bin/Releases

NPM

  1. Release normally and copy <new_version> from console output.
  2. npm version <new_version> --no-git-tag-version
  3. npm run build (transpiles with fable, creates tsc types, and bundles with rollup)
  4. (Due to #701) replace @layer base with @layer swt-base in dist/swate-components.css
  5. npm publish --access public [--tag next] (Use --tag next for prerelease)
Background info:
  1. Library MUST include swate styling via .css file.
  2. Library MUST be readable code (not minified) for easier debugging.
  3. Library MUST be tree-shakeable.
  4. Library MUST include proper TypeScript types.
  5. Library MUST preserve individual files to support dynamic imports in larger components (keyword preserveModules).

Question: Why transpile to src/dist, instead of using the fable transpiled files next to the f# files?

Answer: Because otherwise the vite tsc compiler cannot find the f# code from Swate.Components.Shared. By giving fable a specific output dir src/dist, all code, including the f# code from Swate.Components.Shared, is in one place and tsc can find it.

Question: Why use a bundler, instead of uploading raw files.

Answer: some F# fable libraries use native .js files. These are difficult to copy to the correct locations using tsc or other "bundle" mechanisms without actually bundling the files. Rollup (used by vite) is a bundler that can handle this and also supports tree-shaking and other optimizations.