# AeroPivot SDK

A high-performance, framework-agnostic pivot table web component built for speed and massive datasets.

## Features
- **Massive Data Support**: Handle millions of rows with smooth virtual scrolling and multi-threaded Web Worker processing.
- **Framework Agnostic**: Native Web Component that works with React, Vue, Angular, or Vanilla JS.
- **Advanced Aggregations**: Sum, Count, Average, Min, Max, and more across multiple levels.
- **Premium Themes**: Polished light and dark modes out of the box.

## Installation

### Via NPM
```bash
npm install @kasmav/aeropivot
```

### Via ZIP Download
If you downloaded the SDK as a ZIP file, you can find the pre-built bundles in the `dist-wc` folder.

## Quick Start

### 1. Import the Component and Styles
If you are using a bundler (Vite, Webpack, etc.):
```javascript
import '@kasmav/aeropivot';
import '@kasmav/aeropivot/style.css';
```

For Vanilla HTML:
```html
<link rel="stylesheet" href="path/to/pivot-themes.css">
<script type="module" src="path/to/pivot-table.es.js"></script>
```

### 2. Configure the Background Worker
AeroPivot uses a Web Worker to keep the UI responsive during data processing. You must provide the path to the worker file:

```html
<pivot-table 
  id="pivot" 
  worker-path="/assets/pivot.worker.js">
</pivot-table>
```
> **Note**: If you installed via NPM, the worker file is located in `node_modules/@kasmav/aeropivot/assets/pivot.worker.js`. Ensure your build tool or server serves this file correctly.

### 3. Initialize with Data
```javascript
const pivot = document.getElementById('pivot');
pivot.data = [
  { Category: 'Furniture', Sales: 1500, Region: 'East' },
  { Category: 'Technology', Sales: 2500, Region: 'West' },
];
```

## Examples & Demos
The SDK includes a comprehensive set of examples demonstrating various integration patterns (CSV streaming, API integration, Event handling, etc.).

*   **ZIP Download Users**: You can find all examples in the `demo/` folder within your SDK package. Simply serve the `dist-wc` folder using any local web server to run them.
*   **NPM Users**: Examples are excluded from the NPM package to keep the install size minimal. You can download the full SDK with examples from our [official website](https://www.kasmav.com/download).

## Documentation
For the full API reference and framework-specific integration guides (React, Angular, Vue), visit [kasmav.com/docs](https://www.kasmav.com/docs).

## License
Copyright (c) 2026 Kasmav.com. All rights reserved. Commercial License.
Please see the details on the [LICENSE](https://www.kasmav.com).
