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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@pnsdomains/widgets

v1.0.5

Published

React components for interacting with the PulseChain Name Service

Downloads

1

Readme

PNS Widgets

npm

A small, configurable React component for interacting with the PulseChain Name Service.

Installation

Install the widgets library and its peer dependencies via npm or yarn.

yarn add @pnsdomains/widgets ethers wagmi
npm install @pnsdomains/widgets ethers wagmi

Name Registration Widget

pns-widgets

This component assumes your app is already wrapped in <WagmiConfig> and either a RainbowKit or ConnectKit provider.

Required props:

Optional props:

  • hasContainer: if true (default), the widget will be wrapped in a container with padding and a border
  • hasHeader: if true (default), the widget will have a header with a title and link to pulse.domains
  • name: a preset name to register
  • onStatusUpdate: a callback that gives you access to the status of the registration process
  • shadowless: if true, the widget will not have a shadow
  • theme: easily choose between dark and light mode (defaults to light)
  • trackingCode: an PNS name that will be hashed and included in the transaction for on-chain analytics according to ENSIP-14
import { RegistrationWidget } from '@pnsdomains/widgets'
import { useConnectModal } from '@rainbow-me/rainbowkit'

export default function Page() {
  const { openConnectModal } = useConnectModal()

  return <RegistrationWidget connectAction={openConnectModal} />
}

Running examples

Clone this repo and install dependencies

git clone https://github.com/pulsedomains/pns-widgets.git
cd pns-widgets
yarn install

Start the code bundler for the component and the example Vite app

yarn dev:vite # or dev:next for a Next.js example
# then in another terminal window:
yarn dev:widget

Any changes to packages/widget or examples/vite will auto-reload the page.