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

@revel8/core

v0.3.0

Published

Shared components, utilities, and types for Revel8 applications

Readme

@revel8/core

Shared components, utilities, and types for Revel8 applications.

Overview

This package provides common functionality shared between:

  • revel8-explorer - Web application for exploring the Intuition knowledge graph
  • intuition-extension - Browser extension for Intuition insights

Installation

# Using pnpm (recommended)
pnpm add @revel8/core

# Using npm
npm install @revel8/core

# For local development (link)
cd revel8-core && pnpm link
cd ../revel8-explorer && pnpm link @revel8/core

Usage

Utilities

import { cn, truncateId, ipfsToHttp, formatCompact } from '@revel8/core'

// Merge Tailwind classes
cn('px-4 py-2', isActive && 'bg-blue-500')

// Truncate atom/triple IDs for display
truncateId('0x123456789098765432') // '12345'

// Convert IPFS URIs to HTTP
ipfsToHttp('ipfs://QmHash123') // 'https://ipfs.io/ipfs/QmHash123'

// Format large numbers
formatCompact(1500000) // '1.5M'

Components

// UI primitives (as they are added)
import { Button, Card } from '@revel8/core/components/ui'

// Display components (as they are added)
import { AtomIcon, Avatar } from '@revel8/core/components/display'

Tailwind Configuration

Extend the shared Tailwind config in your app:

// tailwind.config.js
const sharedConfig = require('@revel8/core/tailwind.config')

module.exports = {
  presets: [sharedConfig],
  content: [
    './src/**/*.{ts,tsx}',
    './node_modules/@revel8/core/dist/**/*.js',
  ],
  // Your app-specific extensions...
}

Development

# Install dependencies
pnpm install

# Build the package
pnpm build

# Watch mode for development
pnpm dev

# Type check
pnpm typecheck

Package Structure

revel8-core/
├── src/
│   ├── index.ts              # Main entry point
│   ├── components/
│   │   ├── ui/               # shadcn/ui primitives
│   │   │   └── index.ts
│   │   └── display/          # Intuition display components
│   │       └── index.ts
│   ├── utils/
│   │   ├── index.ts
│   │   ├── cn.ts             # Class name utility
│   │   └── formatting.ts     # Formatting helpers
│   └── types/
│       └── index.ts          # Shared TypeScript types
├── tailwind.config.js        # Shared Tailwind configuration
├── tsconfig.json
├── tsup.config.ts            # Build configuration
└── package.json

Exports

The package provides multiple entry points:

| Import Path | Contents | |-------------|----------| | @revel8/core | Everything (utils, components, types) | | @revel8/core/utils | Utility functions only | | @revel8/core/components/ui | UI primitives | | @revel8/core/components/display | Display components |

Peer Dependencies

This package requires the following peer dependencies:

| Package | Version | |---------|---------| | react | ^18.0.0 || ^19.0.0 | | react-dom | ^18.0.0 || ^19.0.0 | | tailwindcss | ^3.0.0 || ^4.0.0 (optional) |

Adding New Components

  1. Create the component in the appropriate directory
  2. Export it from the directory's index.ts
  3. Rebuild the package: pnpm build
  4. Update consuming apps to use the new component

Migration Checklist

When migrating a component from a consuming app:

  • [ ] Copy component to src/components/
  • [ ] Update imports to use relative paths (no @/ or ~/ aliases)
  • [ ] Ensure it only depends on:
    • Other @revel8/core exports
    • Peer dependencies (React, etc.)
    • Direct dependencies listed in package.json
  • [ ] Add export to the appropriate barrel file
  • [ ] Test in both consuming apps
  • [ ] Remove original from consuming apps

License

ISC © Kylan Hurt