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

@qubiq/web

v0.0.0

Published

Shared React components, hooks, and utilities for QubicKit web clients (coming soon).

Downloads

90

Readme

QubicKit Web Components

@qubiq/web provides React hooks and headless UI primitives built on top of @qubiq/core. It helps dashboards, operations consoles, and governance tools embed live balances, tick info, and CCF proposal data without rewriting the plumbing each time.

Status: first toolkit release – API may evolve as we collect feedback from integrators.

Installation

bun add @qubiq/web @qubiq/core react react-dom

The package ships ESM output (Node 18+/Bun-ready) and expects React 18+ as a peer dependency.

Usage

import { BalanceCard, TickInfoCard, ProposalList, QubiQProvider } from "@qubiq/web";

export function Dashboard({ identity }: { identity: string }) {
  return (
    <QubiQProvider>
      <div className="grid">
        <BalanceCard identity={identity} pollIntervalMs={15_000} />
        <TickInfoCard pollIntervalMs={10_000} />
        <ProposalList status="active" pollIntervalMs={60_000} />
      </div>
    </QubiQProvider>
  );
}

All components and hooks accept an optional client prop. Pass your own LiveServiceClient if you don’t want to use the provider:

import { LiveServiceClient } from "@qubiq/core";
import { useTickInfo } from "@qubiq/web";

const client = new LiveServiceClient({ baseUrl: "https://api.qubic.org" });
const state = useTickInfo({ client });

Hooks

Prefer to build your own UI? Import the hooks directly:

  • useLiveBalance – polls /v1/balances/:identity and returns the parsed BalanceRecord.
  • useTickInfo – polls /v1/tick-info.
  • useBlockHeight – watches /v1/block-height and exposes the latest height.
  • useIdentityAssets – fetches issued/owned/possessed asset lists for a given identity.
  • useCcfProposals – fetches the latest CCF proposals using the smart-contract helper from @qubiq/core.
  • useContractFunctionCall – executes any smart contract function binding returned by useContractBinding.

Each hook exposes { data, loading, error, refresh, lastUpdated } so you can render custom states.

Provider & Contract Hooks

When you need smart contract helpers in React, wrap your app with the QubiQProvider. It wires up shared clients and the ContractToolkit from @qubiq/sdk, so your components can grab them via hooks. The provider also supplies the default LiveServiceClient for the hooks listed above.

import { QubiQProvider, useContractBinding, useContractFunctionCall } from "@qubiq/web";
import type { ContractName } from "@qubiq/sdk";

function App() {
  return (
    <QubiQProvider>
      <ProposalInspector />
    </QubiQProvider>
  );
}

function ProposalInspector() {
  const ccf = useContractBinding("ComputorControlledFund");
  const { data, loading } = useContractFunctionCall({
    binding: ccf,
    functionName: "GetProposal",
    params: { proposalIndex: 1 },
  });

  if (loading) return <p>Loading…</p>;
  return <pre>{JSON.stringify(data, null, 2)}</pre>;
}

Available helpers:

  • QubiQProvider / useQubiQClients – share configured Live/Archive/Query clients.
  • useContractToolkit / useContractBinding – read contract metadata and bindings.
  • useContractFunctionCall – call any contract function and track loading/error states.

Components

All components are “unstyled” headless cards. They output semantic markup with qubiq-* class names so you can attach your own design system or utility classes:

  • BalanceCard
  • TickInfoCard
  • ProposalList

Pass render* props to override the default layout, or use the exported hooks with your own design entirely.

Development

bun install
bun run build

The build step runs tsc to emit dist/. Linting is handled via biome check src.

Next steps

Upcoming iterations will add chart-ready primitives, wallet connect helpers, and storybook examples once the core API stabilizes. Contributions and issue reports are welcome!