open-index/open-npm huggingface dataset:
npm package: @lumerahq/ui
Description: React component library and utilities for building Lumera custom applications.
Latest version: 0.7.0

# @lumerahq/ui

React component library and utilities for building Lumera custom applications.

## Installation

```bash
npm install @lumerahq/ui
```

## Features

- **UI Components** - Buttons, cards, tables, modals, sidebar, and more (built on shadcn/ui)
- **Data Table** - Full-featured table with filtering, sorting, and pagination
- **Bridge Module** - Parent-iframe communication for embedded apps
- **API Utilities** - Lumera client with SQL, CRUD, file, and email operations
- **Automation Runner** - Start and monitor automation runs
- **React Query Integration** - Data fetching hooks

## Usage

### Components

```tsx
import { Button, Card, DataTable } from '@lumerahq/ui';
```

### API Utilities

```tsx
import { pbSql, pbList, pbGet, pbCreate } from '@lumerahq/ui/lib';

// SQL queries
const result = await pbSql<{ id: string; name: string }>({
  sql: 'SELECT id, name FROM users WHERE active = true'
});

// CRUD operations
const items = await pbList<User>('users', { filter: JSON.stringify({ status: "active" }) });
const user = await pbGet<User>('users', 'user-id');
```

### Automation Runner

```tsx
import { createRun, pollRun } from '@lumerahq/ui/lib';

const run = await createRun({
  automationId: 'my-automation-id',
  inputs: { param: 'value' },
});

const result = await pollRun(run.id);
```

## Standalone Development

For developing outside of a Lumera iframe, create a `.env.local` file:

```bash
cp .env.example .env.local
# Edit .env.local with your credentials
```

Get your auth token by running `lumera login` and copying from `.lumera/credentials.json`.

## License

MIT