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

@gurshaplus/sdk

v1.1.0

Published

The official SDK for GurshaPlus. Easily integrate supporting and donations into your React, Next.js, or Vanilla JS applications.

Downloads

102

Readme

GurshaPlus SDK 🤌

The official SDK for GurshaPlus. Easily integrate supporting and donations into your React, Next.js, or Vanilla JS applications.

🚀 Features

  • Lightweight: Zero dependencies (only peer-dependency on React).
  • Production Ready: Handles script loading, modal state, and payment polling.
  • Customizable: Change emojis, labels, and widget positioning.
  • SSR Safe: Designed for modern frameworks like Next.js.

📦 Installation

npm install @gurshaplus/sdk
# or
yarn add @gurshaplus/sdk

🛠️ Usage (React / Next.js)

The easiest way to integrate is using the SupportButton component. Use the variant="popup" for a centered dialog.

import { SupportButton } from "@gurshaplus/sdk";

export default function MyPage() {
  return (
    <SupportButton 
      creator="gurshaplus" 
      variant="popup" // Required: 'popup' or 'floating'
      label="Support Me" 
    />
  );
}

Props

| Prop | Type | Default | Description | | :--- | :--- | :--- | :--- | | creator | string | Required | The GurshaPlus username. | | variant | "popup" \| "floating" | Required | How the widget interacts. | | label | string | "Give a Gursha" | The label for the button and modal. | | emoji | string | "🤌" | The emoji displayed in the widget. | | position | "left" \| "right" | "right" | Widget screen position. | | className | string | "" | Additional CSS classes for the button. | | style | object | {} | Inline styles for the button. | | onSuccess | (data: { status: string, donationId: string, donation: object }) => void | undefined | Called when a donation completes successfully. | | onFailed | (data: { status: string, message: string }) => void | undefined | Called when a donation fails or errors. |


⚡ Usage (Vanilla JS / Manual)

If you aren't using React, you can still trigger the widget manually.

import { loadGurshaScript } from "@gurshaplus/sdk";

async function handleSupport() {
  await loadGurshaScript();
  
  window.GurshaPlus.support({
    creator: "gurshaplus",
    label: "Give a Gursha",
    emoji: "🎨"
  });
}

🔒 Security & Privacy

  • Payments are handled securely via GurshaPlus providers.
  • No sensitive user data is stored by the SDK.
  • Support for private messages and visibility is built-in.

📝 Changelog

v1.1.0

  • Callback Support: GurshaPlus.support() now accepts onSuccess and onFailed callback options. These fire when a donation completes or fails, receiving a payload with donation details.
    • onSuccess({ status, donationId, donation }) — called on successful payment confirmation.
    • onFailed({ status, message }) — called when payment fails or errors.
  • PostMessage Events: The widget now emits structured postMessage events to parent frames for iframe/embed integrations:
    • gursha-ready — widget is initialized and rendered.
    • gursha-open / gursha-close — modal open/close state changes.
    • gursha-success — payment succeeded, includes donationId and donation data.
    • gursha-failed — payment failed, includes error message.

v1.0.9

  • Iframe Bridge Architecture: SDK now natively bypasses third-party CORS restrictions by running the widget via a deeply integrated iframe.
  • Improved SSR Compatibility: Resolved a window is not defined crash in Next.js when rendering as a Server Component.
  • Fluid Layout: Resolved widget layout truncation by delegating overlay animations cleanly within the iframe context.

v1.0.8

  • Initial release featuring strict variant checks and robust payload handling.

📄 License

MIT © GurshaPlus