npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dearj/angular

v0.0.1

Published

The official Angular wrapper for DearJ's powerful drag-and-drop email editor. Easily integrate professional email editing capabilities into your Angular applications.

Readme

@dearj/angular - Angular Component for DearJ Drag & Drop Email Editor

🌟 Overview

The official Angular wrapper for DearJ's powerful drag-and-drop email editor. Easily integrate professional email editing capabilities into your Angular applications.


🚀 Features

  • Seamless Angular Integration: Native Angular component with proper lifecycle handling
  • Type Safety: Built with TypeScript and compatible with @dearj/types
  • Template Management: Load, edit, and export email templates
  • Event Handling: Built-in event system for editor interactions
  • Lightweight: Minimal dependencies, optimized for Angular

📦 Installation

npm install @dearj/angular

or

yarn add @dearj/angular

🚀 Basic Usage

1. Import Module

import { EmailEditorModule } from "@dearj/angular";

@NgModule({
  imports: [
    // ... other modules
    EmailEditorModule,
  ],
})
export class AppModule {}

2. Component Template

<email-editor
  #emailEditor
  [options]="editorOptions"
  [design]="templateDesign"
  (loaded)="onEditorLoaded()"
></email-editor>

<button (click)="exportHtml()">Export HTML</button>
<button (click)="exportJson()">Export JSON</button>

3. Component Class

import { Component, ViewChild } from "@angular/core";
import { EmailEditor, EditorConfig, Template } from "@dearj/angular";

@Component({
  selector: "app-email-editor",
  templateUrl: "./email-editor.component.html",
})
export class EmailEditorComponent {
  @ViewChild("emailEditor") emailEditor!: EmailEditor;

  editorOptions: EditorConfig = {
    authorization: "your-auth-token-here", // Required
    version: "latest", // Optional
  };

  templateDesign: Template | null = null; // Initial template (optional)

  onEditorLoaded() {
    console.log("Editor ready!");
  }

  async exportHtml() {
    try {
      const html = await this.emailEditor.exportHtml();
      console.log("Exported HTML:", html);
      // Handle HTML export
    } catch (error) {
      console.error("Export failed:", error);
    }
  }

  async exportJson() {
    try {
      const json = await this.emailEditor.exportJson();
      console.log("Exported JSON:", json);
      // Handle JSON export
    } catch (error) {
      console.error("Export failed:", error);
    }
  }
}

⚙️ Component API

Inputs

| Input | Type | Required | Description | | --------- | ------------------ | -------- | -------------------------------------------- | | options | EditorConfig | Yes | Editor configuration including authorization | | design | Template \| null | No | Initial template to load |

Outputs

| Event | Type | Description | | --------- | -------------------- | ---------------------------------------------- | | loaded | EventEmitter<void> | Emitted when editor finishes loading design | | updated | EventEmitter<void> | Emitted when editor finishes design is updated |

Methods

| Method | Returns | Description | | -------------- | ------------------- | --------------------------------------- | | exportHtml() | Promise<string> | Exports current design as HTML string | | exportJson() | Promise<Template> | Exports current design as JSON template |

🔒 Security Configuration

The authorization token is required for editor functionality. Handle tokens securely:

// Recommended approach - fetch from secure storage
editorOptions: EditorConfig = {
  authorization: "YOUR_AUTHORIZATION_TOKEN" || "",
  version: "latest",
};

📝 License

DearJ is available under the BSD-3-CLAUSE License.