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

@gizatech/luminair-react

v1.0.48

Published

React UI component library for LuminAIR proof verification

Readme

@gizatech/luminair-react

A React UI component library for LuminAIR proof verification. This library provides a customizable verifier button component that allows users to verify LuminAIR STARK proofs directly in their browser.

Installation

npm install @gizatech/luminair-react

Usage

Next.js Setup

For Next.js projects, you need to configure webpack to handle WASM files and import the CSS:

  1. Import the CSS in your main layout or page:
import '@gizatech/luminair-react/styles.css';
  1. Configure Next.js for WASM support:

Important: If you're using Next.js 15+ with Turbopack (--turbopack flag), you should disable it for better WASM compatibility. Change your dev script in package.json:

{
  "scripts": {
    "dev": "next dev"
  }
}

Then create or update your next.config.js or next.config.ts:

TypeScript (next.config.ts):

import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  webpack: (config, { isServer }) => {
    // Handle WASM files
    config.experiments = {
      ...config.experiments,
      asyncWebAssembly: true,
    };

    // Handle .wasm files
    config.module.rules.push({
      test: /\.wasm$/,
      type: "webassembly/async",
    });

    // Fallback for Node.js modules in client-side
    if (!isServer) {
      config.resolve.fallback = {
        ...config.resolve.fallback,
        fs: false,
        path: false,
        crypto: false,
      };
    }

    return config;
  },
};

export default nextConfig;

JavaScript (next.config.js):

/** @type {import('next').NextConfig} */
const nextConfig = {
  webpack: (config, { isServer }) => {
    // Handle WASM files
    config.experiments = {
      ...config.experiments,
      asyncWebAssembly: true,
    };

    // Handle .wasm files
    config.module.rules.push({
      test: /\.wasm$/,
      type: 'webassembly/async',
    });

    // Fallback for Node.js modules in client-side
    if (!isServer) {
      config.resolve.fallback = {
        ...config.resolve.fallback,
        fs: false,
        path: false,
        crypto: false,
      };
    }

    return config;
  },
};

module.exports = nextConfig;
  1. Use the component:
import { VerifyButton } from '@gizatech/luminair-react';

export default function Home() {
  return (
    <VerifyButton
      proofPath="/proof.bin"
      settingsPath="/settings.bin"
    />
  );
}

Basic Usage (Other React frameworks)

import { VerifyButton } from '@gizatech/luminair-react';
import '@gizatech/luminair-react/styles.css';

function App() {
  return (
    <VerifyButton
      proofPath="/path/to/proof.bin"
      settingsPath="/path/to/settings.bin"
    />
  );
}

Customized Usage

import { VerifyButton } from '@gizatech/luminair-react';
import '@gizatech/luminair-react/styles.css';

function App() {
  return (
    <VerifyButton
      proofPath="/proof.bin"
      settingsPath="/settings.bin"
      title="Custom Verification Title"
      buttonText="VERIFY PROOF"
      author="Your Organization"
      modelDescription="Custom AI Model"
      authorUrl="https://yourwebsite.com"
      className="custom-button-styles"
    />
  );
}

Props

| Prop | Type | Required | Default | Description | |------|------|----------|---------|-------------| | proofPath | string | ✅ | - | Path to the proof file | | settingsPath | string | ✅ | - | Path to the settings file | | title | string | ❌ | "Can't be evil." | Title displayed in the modal | | buttonText | string | ❌ | "VERIFY" | Text displayed on the button | | author | string | ❌ | "Giza" | Author name displayed in the modal | | modelDescription | string | ❌ | "Demo model" | Model description displayed in the modal | | authorUrl | string | ❌ | "https://www.gizatech.xyz/" | Author URL for the link | | className | string | ❌ | - | Custom CSS classes for the button |

Features

  • 🔒 Secure: Verification happens entirely in the browser
  • 🎨 Customizable: All text and styling can be customized
  • 📱 Responsive: Works on desktop and mobile devices
  • 🌙 Dark Mode: Built-in dark mode support
  • Fast: Optimized for performance
  • 📦 Lightweight: Minimal bundle size

Styling

The component uses Tailwind CSS for styling. Make sure your project has Tailwind CSS configured, or the styles will not work properly.

Required CSS Variables

The component relies on CSS custom properties for theming. These are included in the imported CSS file, but you can override them:

:root {
  --background: 0 0% 100%;
  --foreground: 0 0% 3.9%;
  --border: 0 0% 89.8%;
  /* ... other variables */
}

.dark {
  --background: 0 0% 3.9%;
  --foreground: 0 0% 98%;
  --border: 0 0% 14.9%;
  /* ... other variables */
}

Dependencies

This library requires the following peer dependencies:

  • react >= 16.8.0
  • react-dom >= 16.8.0

Browser Support

  • Chrome/Edge 88+
  • Firefox 78+
  • Safari 14+

Troubleshooting

Next.js Issues

If you encounter WASM-related errors in Next.js:

  1. Disable Turbopack: Remove --turbopack from your dev script in package.json
  2. Make sure you've configured next.config.js as shown above
  3. Ensure your proof files are in the public/ directory
  4. Clear cache and restart: rm -rf .next && npm run dev

CSS Not Loading

If styles are not applied:

  1. Make sure you're importing the CSS: import '@gizatech/luminair-react/styles.css'
  2. Verify Tailwind CSS is configured in your project
  3. Check that CSS custom properties are defined

Common Error Messages

  • Module not found: Can't resolve 'luminair_web_bg.wasm' → Configure Next.js webpack and disable Turbopack
  • Module not found: Can't resolve '@gizatech/luminair-react/styles.css' → Update to latest version and use correct import path

License

MIT

Contributing

Contributions are welcome! Please read our contributing guidelines before submitting a PR.

Support

For support, please open an issue on GitHub or contact us at [email protected].