npm package: @pexelize/editor-types
Description: TypeScript type definitions for the Pexelize Editor SDK
Author: Pexelize
Latest version: 1.0.5

<p align="center">
  <a href="https://pexelize.com">
    <img src="https://assets.pexelize.com/assets/pexelize-logo-full.png" alt="Pexelize" width="300" />
  </a>
</p>

<p align="center">
  <a href="https://www.npmjs.com/package/@pexelize/editor-types"><img src="https://img.shields.io/npm/v/@pexelize/editor-types.svg" alt="npm version" /></a>
  <a href="https://github.com/Pexelize/pexelize-types/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="license" /></a>
</p>

# @pexelize/editor-types

Shared TypeScript type definitions for the [Pexelize Editor](https://pexelize.com) SDK. This is the **single source of truth** for all public API types used by the framework wrappers:

- [`@pexelize/react-email-editor`](https://www.npmjs.com/package/@pexelize/react-email-editor)
- [`@pexelize/vue-email-editor`](https://www.npmjs.com/package/@pexelize/vue-email-editor)
- [`@pexelize/angular-email-editor`](https://www.npmjs.com/package/@pexelize/angular-email-editor)

[Website](https://pexelize.com) | [Documentation](https://docs.pexelize.com) | [Dashboard](https://developers.pexelize.com)

## Installation

```bash
# npm
npm install @pexelize/editor-types

# yarn
yarn add @pexelize/editor-types

# pnpm
pnpm add @pexelize/editor-types
```

> **Note:** You typically don't need to install this package directly. It's included as a dependency of the framework wrappers (`@pexelize/react-email-editor`, `@pexelize/vue-email-editor`, `@pexelize/angular-email-editor`), and all types are re-exported from those packages.

## Usage

Import types directly when you need fine-grained control:

```typescript
import type {
  PexelizeSDK,
  PexelizeConfig,
  EditorOptions,
  DesignJson,
  EditorMode,
  ExportHtmlOptions,
  MergeTag,
  MergeTagGroup,
  Module,
  AIConfig,
  AppearanceConfig,
  ToolsConfig,
  FeaturesConfig,
  EditorEventName,
} from "@pexelize/editor-types";
```

Or import from a framework wrapper (they re-export everything):

```typescript
// React
import type { EditorOptions, DesignJson } from "@pexelize/react-email-editor";

// Vue
import type { EditorOptions, DesignJson } from "@pexelize/vue-email-editor";

// Angular
import type { EditorOptions, DesignJson } from "@pexelize/angular-email-editor";
```

## What's Included

This package exports 200+ types covering the entire Pexelize Editor SDK surface:

| Category | Key Types |
|----------|-----------|
| **Core** | `EditorMode`, `ThemeMode`, `ViewMode`, `TextDirection`, `AccentColor`, `LocaleCode` |
| **Configuration** | `PexelizeConfig`, `EditorOptions`, `AppearanceConfig`, `ToolsConfig`, `FeaturesConfig`, `AIConfig` |
| **Design data** | `DesignJson`, `RowData`, `ColumnData`, `ContentData`, `BodyValues` |
| **Export** | `ExportHtmlOptions`, `ExportImageOptions`, `ExportImageData`, `ExportPdfOptions`, `ExportPdfData`, `ExportZipOptions`, `ExportZipData` |
| **Merge tags** | `MergeTag`, `MergeTagGroup`, `MergeTagsConfig` |
| **Special links** | `SpecialLink`, `SpecialLinkGroup`, `SpecialLinksConfig` |
| **Modules** | `Module`, `ModuleData`, `ModuleMetadata`, `ModuleType` |
| **Popup** | `PopupConfig`, `PopupValues`, `PopupPosition`, `PopupOverlay` |
| **Collaboration** | `CollaborationFeaturesConfig`, `CommentAction`, `UserInfo` |
| **Custom tools** | `PexelizeToolConfig`, `PexelizeWidgetConfig`, `CustomToolConfig` |
| **Asset storage** | `ExternalStorageConfig`, `ExternalAsset`, `ExternalFolder` |
| **Events & callbacks** | `EditorEventName`, `PexelizeCallbacks` |
| **Validation** | `AuditResult`, `AuditOptions`, `ValidatorFunction` |
| **SDK interface** | `PexelizeSDK` (full interface for all public methods) |

## Project Structure

```
pexelize-editor-types/
  src/
    index.ts          # All type definitions (single-file source of truth)
  dist/               # Build output (declarations + JS)
  tsconfig.json       # TypeScript configuration
```

## Scripts

| Script | Description |
|--------|-------------|
| `npm run build` | Compile TypeScript to `dist/` |
| `npm run clean` | Remove the `dist/` directory |

## Contributing

See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines on how to contribute to this project.

## License

[MIT](./LICENSE)