open-index/open-npm huggingface dataset:
npm package: @sea-dev/widget
Description: ```bash npm install @sea-dev/widget ```
Latest version: 0.2.24

# sea.dev widget

## Installation

```bash
npm install @sea-dev/widget
```

## Components

The widget package exports three main React components and one initialization function for use in different scenarios.

### SeaWidget

The primary widget component that displays a full submission management interface with document upload, data extraction, and viewing capabilities.

```typescript
import { SeaWidget } from "@sea-dev/widget";
import "@sea-dev/widget/style.css";

export default function YourPage() {
  return (
    <div className="h-full">
      <SeaWidget
        apiKey="your-api-key-here"
        className="h-full"
      />
    </div>
  );
}
```

**Props:**

- `apiKey` (required): Your Sea.dev API key
- `submissionId` (optional): Pre-select a specific submission to display
- `formId` (optional): Filter submissions by form ID
- `dealId` (optional): Filter submissions by deal ID
- `className` (optional): Additional CSS classes
- `style` (optional): Inline styles

### SeaDataViewer

A read-only component for viewing extracted data from a specific submission.

```typescript
import { SeaDataViewer } from "@sea-dev/widget";
import "@sea-dev/widget/style.css";

export default function ViewSubmission() {
  return (
    <SeaDataViewer
      apiKey="your-api-key-here"
      submissionId="sub_123456"
      className="w-full"
    />
  );
}
```

**Props:**

- `apiKey` (required): Your Sea.dev API key
- `submissionId` (required): The submission ID to display
- `className` (optional): Additional CSS classes
- `style` (optional): Inline styles

### SeaFileUpload

A standalone file upload component for adding documents to an existing submission.

```typescript
import { SeaFileUpload } from "@sea-dev/widget";
import "@sea-dev/widget/style.css";

export default function UploadPage() {
  const handleUpload = () => {
    console.log("File uploaded successfully!");
  };

  return (
    <SeaFileUpload
      apiKey="your-api-key-here"
      submissionId="sub_123456"
      onUpload={handleUpload}
    />
  );
}
```

**Props:**

- `apiKey` (required): Your Sea.dev API key
- `submissionId` (required): The submission ID to upload files to
- `onUpload` (required): Callback function called after successful upload