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

quantum-component-library

v1.4.63

Published

A modular React component library built with TypeScript and Vite, featuring code splitting for optimal bundle sizes.

Downloads

976

Readme

Quantum Component Library

A modular React component library built with TypeScript and Vite, featuring code splitting for optimal bundle sizes.

Installation

npm install quantum-component-library

Usage

Full Library Import (Default)

// Import everything (not recommended for production)
import * from 'quantum-component-library';

Modular Imports (Recommended)

The library is split into several modules for optimal tree-shaking and bundle sizes:

Components

// Import only UI components
import { UpsertActivityForm, ParameterEditList } from 'quantum-component-library/components';

Hooks

// Import only custom hooks
import { useGraphqlClient, useJointsForLimbIds } from 'quantum-component-library/hooks';

Types

// Import only type definitions
import type { Activity, Analysis, Human } from 'quantum-component-library/types';

Authentication

// Import only auth utilities
import { useAuthContext, useIsAuthenticated } from 'quantum-component-library/auth';

GraphQL

// Import only GraphQL fragments and operations
import { ActivityFragment, SessionQueries } from 'quantum-component-library/graphql';

Generated GraphQL Code

// Import only generated GraphQL types and utilities
import { FragmentMasking, gql } from 'quantum-component-library/generated';

Utilities

// Import only utility functions
import { convertUnits, memoizeWithExpiry } from 'quantum-component-library/utils';

Services

// Import only service functions
import { humanService } from 'quantum-component-library/services';

Code Splitting Benefits

  • Reduced Bundle Size: Import only what you need
  • Better Tree Shaking: Webpack and other bundlers can eliminate unused code more effectively
  • Faster Loading: Smaller initial bundles load faster
  • Better Caching: Changes to one module don't invalidate others

Build Configuration

This library uses Vite with multiple entry points and manual chunk splitting:

  • Multiple Entry Points: Each module has its own entry point for granular imports
  • Manual Chunk Splitting: Vendor dependencies are split into logical chunks (UI, GraphQL, React, etc.)
  • Automatic Type Generation: TypeScript definitions are generated for all entry points

Available Modules

| Module | Entry Point | Description | |--------|-------------|-------------| | components | src/components/index.ts | UI components | | hooks | src/lib/hooks/index.ts | Custom React hooks | | types | src/lib/types/index.ts | TypeScript type definitions | | auth | src/lib/auth/index.ts | Authentication utilities | | graphql | src/graphql/index.ts | GraphQL fragments and operations | | generated | src/generated/index.ts | Generated GraphQL code | | utils | src/lib/utils/index.ts | Utility functions | | services | src/lib/services/index.ts | Service functions |

Development

# Install dependencies
npm install

# Start development server
npm run dev

# Build the library
npm run build

# Build for specific environments
npm run build:admin-prod
npm run build:client-qa