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

@bluvo/widget-svelte

v0.0.14

Published

@bluvo/widget-svelte

Downloads

6

Readme

Bluvo Widget for Svelte

A Svelte wrapper for the Bluvo widget that allows seamless integration with Svelte applications.

Installation

npm install @bluvo/widget-svelte
# or
yarn add @bluvo/widget-svelte
# or
pnpm add @bluvo/widget-svelte

Usage

Basic Usage

<script>
  import { BluvoWidget } from '@bluvo/widget-svelte';

  // Configuration options
  const widgetProps = {
    auth: {
      projectId: 'your-project-id',
      orgId: 'your-org-id',
    },
    // Optional: customize the widget
    width: 400,
    mode: 'connect', // or 'transact'
    // ... other options
  };
</script>

<BluvoWidget {...widgetProps} class="my-custom-class" />

SvelteKit Usage with Dynamic Import

For SvelteKit applications, the recommended approach is to use dynamic imports to prevent SSR issues:

<script lang="ts">
    import type { BluvoWidgetProps } from '@bluvo/widget-svelte';
    import { onMount } from 'svelte';
    let BluvoWidget: typeof import('@bluvo/widget-svelte').BluvoWidget;

    // @ts-ignore
    import { browser } from '$app/environment';

    const widgetProps: BluvoWidgetProps = {
        // Authentication
        auth: {
            orgId: 'bluvo-org-your-org-id',
            projectId: 'your-project-id',
        },
        
        // Widget configuration
        debug: true,
        storage: 'localStorage',
        showBranding: true,
        showTOS: true,
        termsOfServiceLink: 'https://bluvo.co/terms',
        privacyPolicyLink: 'https://bluvo.co/privacy',
        width: 400,
        
        // Operation mode
        mode: 'transact',
        
        // Exchanges to display
        exchanges: [
            'binance',
            'coinbase',
            'kraken',
            'kucoin',
            'bybit',
            // ...more exchanges
        ],
        
        // Connect mode settings
        connect: {
            showSearch: false,
            showSuccessDetails: true,
            ipList: [],
            useCustomIpList: false,
            exchangeList: {
                logoSize: 40,
            },
            onSuccess: (walletId: string) => {
                console.log('✅ [Connect] Wallet connected:', walletId);
            },
            onComplete: (walletId: string) => {
                console.log('✅ [Connect] User completed linking:', walletId);
            },
        },
        
        // Transaction mode settings
        transaction: {
            showSuccessDetails: true,
            ipList: [],
            useCustomIpList: false,
            display: {
                address: 'input',
                amount: 'label',
                tag: 'none',
            },
            prefill: {
                address: {
                    LTC: 'ltc1qxyz1234567890abcdefg1234567890abcdefg',
                    BTC: 'bc1qxyz1234567890abcdefg1234567890abcdefg',
                    ETH: '0x1234567890abcdef1234567890abcdef12345678',
                },
                amount: {
                    LTC: 0.01,
                    BTC: 0.001,
                    ETH: 0.01,
                },
            },
            onSuccess: (txId: string) => {
                console.log('✅ [Transact] Transaction successful:', txId);
            },
            onComplete: (txId: string) => {
                console.log('✅ [Transact] User completed transaction:', txId);
            },
        },
    };

    onMount(async () => {
        if (browser) {
            const module = await import('@bluvo/widget-svelte');
            BluvoWidget = module.BluvoWidget;
        }
    });
</script>

<main>
    <h1>Bluvo Svelte Widget Example</h1>
    <div class="widget-container">
        {#if BluvoWidget}
            <svelte:component this={BluvoWidget} {...widgetProps} class="custom-widget" />
        {:else}
            <p>Loading widget...</p>
        {/if}
    </div>
</main>

<style>
    main {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        max-width: 800px;
        margin: 0 auto;
        padding: 20px;
    }

    h1 {
        color: #333;
        text-align: center;
    }

    .widget-container {
        display: flex;
        justify-content: center;
        margin-top: 30px;
    }

    .custom-widget {
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
</style>

Configuration Options

The Bluvo widget accepts the following configuration options:

Required Properties

| Option | Type | Description | |------------------|--------|-------------------------------------| | auth | Object | Required authentication credentials | | auth.projectId | String | Your Bluvo project ID | | auth.orgId | String | Your Bluvo organization ID |

Widget-Level Configuration

| Option | Type | Description | |------------------------|----------------|--------------------------------------------------------------------| | width | Number|String | Widget width (default: 360px) | | mode | String | Widget mode: 'connect' or 'transact' | | debug | Boolean | Enable debug logging (default: false) | | storage | String | Token storage strategy: 'localStorage', 'sessionStorage' or 'none' | | showBranding | Boolean | Show Bluvo branding in footer (default: true) | | showTOS | Boolean | Show Terms of Service links in footer (default: true) | | termsOfServiceLink | String | URL for Terms of Service | | privacyPolicyLink | String | URL for Privacy Policy | | exchanges | String[] | List of exchanges to display | | theme | Object | Theming options | | theme.dark | Boolean | Use dark mode (default: true) | | theme.accentColor | String | Primary accent color | | theme.secondaryColor | String | Secondary accent color |

Connect Mode Configuration

| Option | Type | Description | |---------------------------------|----------|-----------------------------------------------------------| | connect.showSearch | Boolean | Show search filter for exchanges (default: false) | | connect.showSuccessDetails | Boolean | Show wallet details on connection success (default: true) | | connect.exchangeList.logoSize | Number | Size of exchange logos in pixels (default: 40) | | connect.ipList | String[] | List of IP addresses to whitelist | | connect.useCustomIpList | Boolean | Use custom IP list (default: false) | | connect.onSuccess | Function | Called when a wallet is connected | | connect.onComplete | Function | Called when user clicks "Done" |

Transaction Mode Configuration

| Option | Type | Description | |----------------------------------|----------|------------------------------------------------------| | transaction.defaultCoin | String | Default selected coin | | transaction.coins | String[] | List of coins available for withdrawal | | transaction.showSuccessDetails | Boolean | Show transaction details on success (default: false) | | transaction.ipList | String[] | List of IP addresses to whitelist | | transaction.useCustomIpList | Boolean | Use custom IP list (default: false) | | transaction.display.address | String | Address field display mode: 'input', 'label', 'none' | | transaction.display.tag | String | Tag field display mode: 'input', 'label', 'none' | | transaction.display.amount | String | Amount field display mode: 'input', 'label', 'none' | | transaction.prefill.address | Object | Prefilled destination addresses by coin | | transaction.prefill.tag | Object | Prefilled destination tags by coin | | transaction.prefill.amount | Object | Prefilled amounts by coin | | transaction.onSuccess | Function | Called when a transaction is successful | | transaction.onComplete | Function | Called when user clicks "Done" |

Svelte-Specific Properties

| Option | Type | Description | |---------------------|----------|---------------------------------------------| | class | String | Custom CSS class name for the container div | | style | String | Custom CSS styles for the container div | | onMountCallback | Function | Callback when component is mounted | | onDestroyCallback | Function | Callback when component is destroyed |

Working with the Token Storage

The widget provides a helper function to manage tokens outside the widget:

<script>
  import { createBluvoWidgetStore } from '@bluvo/widget-svelte';
  
  // Create a store that uses localStorage (default)
  const widgetStore = createBluvoWidgetStore();
  
  // Check if user is connected to Binance
  const isConnectedToBinance = widgetStore.hasTokens('binance');
  
  // Clear tokens for a specific exchange
  function disconnect(exchangeId) {
    widgetStore.clearTokens(exchangeId);
  }
  
  // Clear all tokens
  function disconnectAll() {
    widgetStore.clearAllTokens();
  }
</script>

{#if isConnectedToBinance}
  <button on:click={() => disconnect('binance')}>
    Disconnect from Binance
  </button>
{/if}

TypeScript Support

The package includes full TypeScript definitions for all configuration options:

import type { 
  BluvoWidgetProps, 
  BluvoWidgetConfig,
  BluvoTheme, 
  BluvoConnectOptions, 
  BluvoTransactionOptions 
} from '@bluvo/widget-svelte';

// Define typed widget props
const widgetProps: BluvoWidgetProps = {
  auth: {
    projectId: 'your-project-id',
    orgId: 'your-org-id',
  },
  // All properties are properly typed
  mode: 'connect', // TypeScript will ensure this is 'connect' or 'transact'
  // ...
};

See the full documentation for more details on configuration options.

License

MIT