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

@australiansynchrotron/sci-comp-ui

v0.0.12

Published

To run the component demo/docs page (spins up page at `main.tsx`), install the dev dependencies, and run dev:

Downloads

1,040

Readme

Scientific Computing UI Component Library

To run the component demo/docs page (spins up page at main.tsx), install the dev dependencies, and run dev:

npm i
npm run dev:docs

Usage

Either add the Radix-UI required CSS variables into your consumer UI's main index.css file, or import the ones included with this package with:

import '@australiansynchrotron/sci-comp-ui/styles';

Import the components you want:

import { StepColumns } from '@australiansynchrotron/sci-comp-ui';

Development

Local Package Publishing/Installation with yalc

Install yalc globally to your node package management, e.g.:

npm i yalc -g

Build the ui component package with npm generating the ./dist folder:

npm run build

Use yalc for local deployment to a consumer frontend project (yalc simulates publish to package repository but does it locally with symlinks):

yalc publish

In your consumer frontend repo, use yalc to add the yalc package (this will point your package.json to the local yalc published package instead of the NPM published package):

yalc add @australiansynchrotron/sci-comp-ui

Update your node modules with your project package manager (npm, pnpm, yarn):

npm i

When you're done with local dev, remember to remove the local yalc package and use the publicly published package again in your consumer project:

npm remove @australiansynchrotron/sci-comp-ui
yalc remove @australiansynchrotron/sci-comp-ui
npm i @australiansynchrotron/sci-comp-ui

You can always verify which version of the package (local or deployed) in the consumer project with:

npm list -g --depth=0

Using with local docker compose

For your local yalc package to be built with docker compose, update your dev Dockerfile to copy across the yalc packages with:

# Make a .yalc directory wherever your dockerfile will run the package install command
RUN mkdir .yalc
COPY services/acquisition-ui/.yalc .yalc

# RUN npm i (or your respective package install command should happen afterwards)

Clearing node_module Cache

As with most package managers, if you're iterating on a library locally, you can run into confusion when the consumer caches to aggressively. To clear your cache:

In your consumer project, e.g. .../mex-web-ui:

cd /path/to/project/mex-web-ui

Remove the old yalc package

yalc remove @australiansynchrotron/sci-comp-ui

Clean any caches

rm -rf node_modules/.cache
rm -rf .yalc/@australiansynchrotronsci-comp-ui

Add the updated package

yalc add ../sci-comp-ui

# or
yalc add @australiansynchrotronsci-comp-ui

Reinstall dependencies to refresh everything

npm i
A document for yalc and a consumer project with pnpm

Using Vite Plugins for Source Embedding

To make sure that docs are consistent and can embed derived information like source code references and version numbers, we use vite plugins that are effectively macro expansions.

Justification

  • Build-time replacement - Version is injected during build, not runtime
  • Type-safe - Full TypeScript support with proper type definitions

Implementation Details

  • File: src/vite-plugins/package-version-plugin.ts
  • File: src/vite-plugins/embed-source-plugin.ts
  • Types: src/types/global.d.ts
  • Config: vite.config.ts

Version Embedding Usage

Use the __PACKAGE_VERSION__ macro anywhere in your TypeScript/JavaScript files:

import { Badge } from './ui/badge';

export function AppVersion() {
    return <Badge>{__PACKAGE_VERSION__}</Badge>;
}

Source Embedding Usage

Use the __SOURCE__ macro to embed source code at build time. This is particularly useful for documentation components:

import { Button } from './ui/elements/button';
import { DemoContainer } from './components/demo-container';

/* DEMO_START */
function ButtonExample() {
    return (
        <div className="flex gap-4">
            <Button variant="default">Default</Button>
            <Button variant="outline">Outline</Button>
            <Button variant="destructive">Destructive</Button>
        </div>
    );
}
/* DEMO_END */

// This gets replaced at build time with the actual source code
const buttonExampleSource = __SOURCE__;

export function ButtonDemo() {
    return <DemoContainer demo={<ButtonExample />} source={buttonExampleSource} />;
}

The __SOURCE__ macro will automatically extract the source code between /* DEMO_START */ and /* DEMO_END */ comments and replace the macro with the actual code string at build time.

Configuration

The plugin is already configured in vite.config.ts. You can customise it with these options:

packageVersionPlugin({
    macro: '__PACKAGE_VERSION__', // Custom macro name
    packageJsonPath: './package.json', // Path to package.json
    includeVPrefix: true, // Whether to prefix with 'v'
});