open-index/open-npm huggingface dataset:
npm package: @kwicai/app-bridge
Description: The **Child SDK** for the Bridge architecture. This package enables a micro-frontend (Child) to communicate securely with its container (Host) via `postMessage`.
Latest version: 1.0.4

# @kwicai/app-bridge

The **Child SDK** for the Bridge architecture. This package enables a micro-frontend (Child) to communicate securely with its container (Host) via `postMessage`.

It supports both **Web** (iFrames) and **React Native** (WebView) environments automatically.

## Installation

```bash
npm install @kwicai/app-bridge
```

## Usage (React)

The easiest way to use the SDK is via the provided React Context.

### 1. Wrap your App

Wrap your application root (or the part that needs bridge access) with `BridgeProvider`. This handles the initial handshake automatically.

```tsx
import { BridgeProvider } from '@kwicai/app-bridge'

function App() {
  return (
    <BridgeProvider>
      <YourAppContent />
    </BridgeProvider>
  )
}
```

### 2. Use the Hook

Use `useBridge()` to access the bridge instance and state.

```tsx
import { useBridge } from '@kwicai/app-bridge'
import { useEffect } from 'react'

function UserProfile() {
  const { bridge, isReady, authToken } = useBridge()

  // Example: Request navigation in the Host app
  const goHome = () => bridge.navigate('/')

  return (
    <div>
      <p>Connection: {isReady ? 'Active' : 'Connecting...'}</p>
      <button onClick={goHome}>Exit to Host Home</button>
    </div>
  )
}
```

## Usage (Vanilla JS)

If you are not using React, or need to use the bridge outside of components:

```typescript
import { bridge } from '@kwicai/app-bridge'

async function init() {
  try {
    const token = await bridge.handshake()
    console.log('Bridge ready, token:', token)
  } catch (err) {
    console.error('Handshake failed', err)
  }
}

init()
```

## API Reference

### Core
*   `handshake()`: Promise<string> - Initiates connection with Host. Returns auth token.
*   `getAuthToken()`: string | null - Returns current token if set.

### Navigation & UI
*   `navigate(path: string)`: Request Host to change its route (and effectively the URL bar).
*   `showModal(config)`: Open a modal in the Host app.
    ```ts
    bridge.showModal({ id: 'my-modal', title: 'Edit Profile', content: { ... } })
    ```
*   `setOverlay(active: boolean)`: Request Host to show/hide a full-screen overlay (e.g., for loading).
*   `setFullscreen(active: boolean)`: Request Host to enter/exit fullscreen mode for the child view.

### Features
*   `requestMedia(config)`: Request user to pick media (Image/Video) from Host's native picker.
    ```ts
    const media = await bridge.requestMedia({ type: 'image' })
    if (media) console.log(media[0].url)
    ```

## Events

Listen to events coming from the Host:

```typescript
// Route changes in Host
bridge.onNavigation((path) => {
  console.log('Host navigated to:', path)
})

// Modal actions (e.g. user clicked "Confirm" in Host modal)
bridge.onModalAction((id, action, payload) => {
  if (id === 'my-modal' && action === 'CONFIRM') {
    saveData()
  }
})
```
npm package: @kwicai/bridge-shared
Description: Shared type definitions and constants for the Bridge architecture.
Latest version: 1.0.4

# @subbusura/bridge-shared

Shared type definitions and constants for the Bridge architecture.

## Installation

```bash
npm install @subbusura/bridge-shared
```

## Usage

This package is a dependency for `@subbusura/bridge-child` and `@subbusura/bridge-host`. It exports TypeScript interfaces and types.
npm package: @kwicai/cli
Description: Kwic CLI
Latest version: 1.0.3

# KwicAI CLI

[![npm version](https://img.shields.io/npm/v/@kwicai/cli.svg)](https://www.npmjs.com/package/@kwicai/cli) [![license](https://img.shields.io/github/license/kwicai/kwicai-cli)](LICENSE)

---

## Before you begin 💡

- Install the latest LTS version of Node.js (20+ recommended) and a package manager (npm, pnpm, yarn, or bun).
- If you plan to use the CLI globally, you will want to install it globally (example below).

---

## Install the CLI 🔧

Global install:

```bash
npm install -g @kwicai/cli@latest
```

One-off use (no global install required):

```bash
npx @kwicai/cli init my-app
```

Future alternative initializers (examples):

```bash
npm init @kwicai/app@latest
pnpm create @kwicai/app@latest
yarn create @kwicai/app
bun create @kwicai/app@latest  # experimental
```

---

## Quick start — create a project 🚀

```bash
# Authenticate
kwicai login

# Scaffold a project into ./my-app
kwicai init my-app

# Change into the project and run dev
cd my-app
npm run dev
```

---

## Commands (examples) 🧭

- `kwicai help`        — display help and available commands
- `kwicai version`     — print CLI version
- `kwicai login`       — authenticate with the platform
- `kwicai init NAME`   — scaffold a new app into directory `NAME`

Example:

```bash
kwicai init my-finance-app
```

## Development & contributing

- Install deps: `npm install`
- Build: `npm run build`
- Link for local testing: `npm link` (then `kwicai` will be available globally during development)

Contributions welcome — open issues or PRs on the GitHub repo.

---

## Where to learn more

- Repository: https://github.com/kwicai/kwicai-cli
- Template repo used by `kwicai init`: https://github.com/subbusura/remote-micro-app-template-tss

---
npm package: @kwickbit/squarespace-plugin
Description: Add payment with stablecoins option to your Ecommerce website
Latest version: 1.1.5

# KwickBit Squarespace Plugin

Accept stablecoin payments on your Squarespace store using KwickBit.

## 🔧 Installation

To enable crypto payments via KwickBit on your Squarespace store:

1. Go to your Squarespace **Config > Pages > Custom Code (bottom of the page) > Code Injection**
2. Paste the following script into the **Header** section:

```html
<script src="https://cdn.jsdelivr.net/npm/@kwickbit/squarespace-plugin@latest/dist/index.min.js"></script>
<script>
  window.initKwickbit.default({
    integrationId: 'your-integration-id',
  });
</script>
```