open-index/open-npm huggingface dataset:
npm package: @frontend-sdk/privy
Description: Privy’s marketing platform helps merchants grow their email list and increase average order size with popups, flyouts, coupons and more.
Author: Shogun
Latest version: 0.25.1

# Privy

Privy’s marketing platform helps merchants grow their email list and increase average order size with popups, flyouts, coupons and more.

<table>
  <tbody>
    <tr>
      <td>⚠️</td>
      <td>This package runs on Shogun Frontend and is in customer Beta. It might not currently support all ecommerce platforms or cover all use cases.</td>
    </tr>
  </tbody>
</table>
<br />

[Privy website →](https://https://www.privy.com/)

<br />

## Overview

Users of Shogun Frontend can leverage `frontend-sdk/privy` package to display popups and Free Shipping components for Shopify and BigCommerce stores.

## Installation

`yarn add @frontend-sdk/privy`

`npm install @frontend-sdk/privy`

## Usage

1. Get your Privy Public App Identifier [here](https://dashboard.privy.com/settings/widget).

2. Create a new section, in the examples below we will name the new section `Privy`

3. Inject the widget into the DOM with `usePrivy(appIdentifier)` or `useAsyncPrivy(appIdentifier)`.

4. Click on the `new Campaign` [here](https://dashboard.privy.com/plays) to add a Privy Play to your store

5. Choose from the pre-built Privy plays (Welcome Discount, Mobile Signup Discount, Cart Saver, Free Shipping Bar, Exit Email Capture), or build your own.

6. Select the coupon you would like to offer and click `Continue`

7. Edit, add, and style elements using the Privy Dashboard

8. Publish the campaign to view the component in the store

#### Synchronous Widget Example

<table>
  <tbody>
    <tr>
      <td>⚠️</td>
      <td>Use the Synchronous usePrivy hook when scripts are required to be loaded and executed concurrently. This is the preferred method to install Privy, and will allow the script to load in line with all other scripts on your site.</td>
    </tr>
  </tbody>
</table>

```jsx
import { usePrivy } from '@frontend-sdk/Privy'

export const Privy = ({ appIdentifier }) => {
  usePrivy(appIdentifier)

  return <div>…</div>
}
```

#### Asynchronous Widget Example

<table>
  <tbody>
    <tr>
      <td>⚠️</td>
      <td>Use the Asynchronous useAsyncPrivy hook when scripts are required to be downloaded in parallel. This will parse the page and execute as soon as it is available.</td>
    </tr>
  </tbody>
</table>

```jsx
import { useAsyncPrivy } from '@frontend-sdk/Privy'

const Privy = ({ appIdentifier }) => {
  useAsyncPrivy(appIdentifier)

  return <div>…</div>
}
```
npm package: @frontend-sdk/rebuy
Description: Rebuy integration for Shogun Frontend.
Author: Shogun
Latest version: 0.26.0

# Rebuy

Rebuy integration for Shogun Frontend.

> Rebuy creates intelligent shopping experience with data-driven persoanlization and providing merchandizing solutions.

<table>
  <tbody>
    <tr>
      <td>⚠️</td>
      <td>This package runs on Shogun Frontend and is in customer Beta. It might not currently support all ecommerce platforms or cover all use cases.</td>
    </tr>
  </tbody>
</table>

[Rebuy website →](https://rebuyengine.com)

### Installation

`yarn add @frontend-sdk/rebuy`

`npm install @frontend-sdk/rebuy`

---

## Rebuy Widgets

Inject Rebuy's script with your Shopify domain (`….myshopify.com`):

```jsx
import { useRebuyWidget } from '@frontend-sdk/rebuy'

const RebuyWidget = ({ widgetId }) => {
  useRebuyWidget('<insert Shopify domain>')

  return (
    <div
      data-rebuy-id="widgetId"
      data-rebuy-shopify-product-ids="<Product ID>"
    </div>
  )
}
```

---

## Rebuy Data

You can also manually display data from any of [Rebuy's API endpoints](https://rebuyengine.com/api/v1/docs).

Please include an API key as a query string, e.g. `https://rebuyengine.com/api/v1/products/recommended?key={insert_key_here}`. You may view your keys [here](https://www.rebuyengine.com/account/keys). For more information, visit Rebuy's documentation [here](https://developers.rebuyengine.com/reference/recommended).

```jsx
import { useRebuyData } from '@frontend-sdk/rebuy'

const RebuyData = () => {
  const { loading, error, data } = useRebuyData('<endpoint>')

  if (loading) {
    return <h1>Loading…</h1>
  }
  if (typeof error !== 'undefined') {
    return <h1>Error</h1>
  }
  if (typeof data === 'undefined') {
    return <h1>Wrong data</h1>
  }

  return (
    <>
      <ul>
        {data.data.map((product) => (
          <li key={product.title}>{product.title}</li>
        ))}
      </ul>
    </>
  )
}
```

---

### Links

- [Help Center](https://rebuyengine.com/help/docs)
- [API Docs](https://rebuyengine.com/api/v1/docs)
npm package: @frontend-testing/vitest-browser-navigate
Description: Browser navigation command for Vitest browser mode
Latest version: 0.0.1-alpha.8

# @frontend-testing/vitest-browser-navigate

Browser navigation command for Vitest browser mode. Simulates SPA navigation by updating browser history and dispatching popstate events.

## Features

- 🧭 **SPA Navigation** - Navigate programmatically in browser tests
- 🎭 **Playwright Support** - Works with `@vitest/browser-playwright`
- 🚗 **WebdriverIO Support** - Works with `@vitest/browser-webdriverio`
- 📦 **TypeScript** - Full type support with automatic `commands.navigate()` types

## Installation

```bash
npm install -D @frontend-testing/vitest-browser-navigate
```

**Peer Dependencies:** `vitest >= 4.0.0`

## Quick Start

### 1. Configure Vitest

```typescript
// vitest.config.ts
import { navigate } from "@frontend-testing/vitest-browser-navigate";
import { defineConfig } from "vitest/config";

export default defineConfig({
  test: {
    browser: {
      enabled: true,
      provider: "playwright", // or "webdriverio"
      instances: [{ browser: "chromium" }],
      commands: { navigate },
    },
  },
});
```

### 2. Use in Tests

```typescript
import { commands } from "vitest/browser";

describe("MyPage", () => {
  it("navigates to dashboard", async () => {
    await commands.navigate("/dashboard");
    expect(window.location.pathname).toBe("/dashboard");
  });
});
```

## TypeScript Support

Types for `commands.navigate()` are included automatically. If your IDE doesn't recognize the types, add a side-effect import:

**Option A: In your test setup file (recommended)**

```typescript
// src/test/setup.ts
import "@frontend-testing/vitest-browser-navigate";
// ... rest of your setup
```

**Option B: In individual test files**

```typescript
// my-component.spec.tsx
import "@frontend-testing/vitest-browser-navigate";
import { commands } from "vitest/browser";

// Now commands.navigate() has full type support
await commands.navigate("/dashboard");
```

> **Note:** After adding the import, you may need to restart your TypeScript server (`Cmd+Shift+P` → "TypeScript: Restart TS Server").

## API

### `commands.navigate(path: string): Promise<void>`

Navigates to the specified path by:

1. Calling `window.history.pushState()`
2. Dispatching a `popstate` event (triggers SPA routers like React Router)
3. Waiting for the browser to process the navigation

```typescript
// Basic navigation
await commands.navigate("/login");

// With route parameters
await commands.navigate("/users/123");

// With query parameters
await commands.navigate("/search?q=test&page=1");
```

## How It Works

The command executes inside the browser context and simulates navigation without a full page reload - exactly how SPA routers work. This makes it perfect for testing React Router, Vue Router, or any other client-side routing solution.

## License

MIT