JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 44
  • Score
    100M100P100Q90202F
  • License MIT

TypeScript type definitions for the Dragble Editor SDK

Package Exports

  • dragble-types

Readme

Dragble Email Editor - React Email Template Builder

npm version license

dragble-types

Shared TypeScript type definitions for the Dragble Editor SDK. This is the single source of truth for all public API types used by the framework wrappers:

Website | Documentation | Dashboard

Installation

# npm
npm install dragble-types

# yarn
yarn add dragble-types

# pnpm
pnpm add dragble-types

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

Usage

Import types directly when you need fine-grained control:

import type {
  DragbleSDK,
  DragbleConfig,
  EditorOptions,
  DesignJson,
  EditorMode,
  ExportHtmlOptions,
  MergeTag,
  MergeTagGroup,
  Module,
  AIConfig,
  AppearanceConfig,
  ToolsConfig,
  FeaturesConfig,
  EditorEventName,
} from "dragble-types";

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

// React
import type { EditorOptions, DesignJson } from "dragble-react-editor";

// Vue
import type { EditorOptions, DesignJson } from "dragble-vue-editor";

// Angular
import type { EditorOptions, DesignJson } from "dragble-angular-editor";

What's Included

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

Category Key Types
Core EditorMode, ThemeMode, ViewMode, TextDirection, AccentColor, LocaleCode
Configuration DragbleConfig, 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 DragbleToolConfig, DragbleWidgetConfig, CustomToolConfig
Asset storage ExternalStorageConfig, ExternalAsset, ExternalFolder
Events & callbacks EditorEventName, DragbleCallbacks
Validation AuditResult, AuditOptions, ValidatorFunction
SDK interface DragbleSDK (full interface for all public methods)

Project Structure

dragble-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 for guidelines on how to contribute to this project.

License

MIT