@lit-pigeon/angular 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +61 -0
  2. package/package.json +23 -7
package/README.md ADDED
@@ -0,0 +1,61 @@
1
+ # @lit-pigeon/angular
2
+
3
+ Angular wrapper for the [Lit Pigeon](https://github.com/snxstudio/lit-pigeon)
4
+ email editor. A standalone component that renders the `<pigeon-editor>` custom
5
+ element and bridges its object-shaped inputs and DOM `CustomEvent`s into
6
+ idiomatic Angular `@Input()`s and `@Output()`s.
7
+
8
+ ## Install
9
+
10
+ ```bash
11
+ npm install @lit-pigeon/angular
12
+ ```
13
+
14
+ Requires `@angular/core` >= 17 as a peer dependency.
15
+
16
+ ## Usage
17
+
18
+ ```typescript
19
+ import { Component } from '@angular/core';
20
+ import {
21
+ PigeonEditorComponent,
22
+ type PigeonDocument,
23
+ } from '@lit-pigeon/angular';
24
+
25
+ @Component({
26
+ selector: 'app-root',
27
+ standalone: true,
28
+ imports: [PigeonEditorComponent],
29
+ template: `
30
+ <pigeon-editor-wrapper
31
+ [document]="doc"
32
+ (pigeonChange)="onChange($event)"
33
+ (pigeonReady)="onReady()"
34
+ />
35
+ `,
36
+ })
37
+ export class AppComponent {
38
+ doc?: PigeonDocument;
39
+
40
+ onChange(e: { document: PigeonDocument }) {
41
+ this.doc = e.document;
42
+ }
43
+ onReady() {
44
+ console.log('ready');
45
+ }
46
+ }
47
+ ```
48
+
49
+ ### Inputs & outputs
50
+
51
+ `@Input()` — `document`, `config`. `@Output()` — `pigeonChange`,
52
+ `pigeonSelect`, `pigeonReady`, `pigeonPreview`, `pigeonExport`,
53
+ `pigeonExportJson`, `pigeonExportMjml`, `pigeonExportHtml`. The component also
54
+ exposes imperative helpers: `getDocument()`, `loadDocument(doc)`, `undo()`,
55
+ `redo()`. Core types are re-exported for convenience.
56
+
57
+ Part of [Lit Pigeon](https://github.com/snxstudio/lit-pigeon) — open-source drag-and-drop email editor.
58
+
59
+ ## License
60
+
61
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lit-pigeon/angular",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Angular wrapper for the Pigeon email editor web component",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -8,17 +8,19 @@
8
8
  "types": "./dist/index.d.ts",
9
9
  "exports": {
10
10
  ".": {
11
+ "types": "./dist/index.d.ts",
11
12
  "import": "./dist/index.js",
12
- "require": "./dist/index.cjs",
13
- "types": "./dist/index.d.ts"
13
+ "require": "./dist/index.cjs"
14
14
  }
15
15
  },
16
16
  "files": [
17
- "dist"
17
+ "dist",
18
+ "README.md",
19
+ "LICENSE"
18
20
  ],
19
21
  "dependencies": {
20
- "@lit-pigeon/core": "^0.3.0",
21
- "@lit-pigeon/editor": "^0.3.0"
22
+ "@lit-pigeon/core": "^0.3.2",
23
+ "@lit-pigeon/editor": "^0.3.2"
22
24
  },
23
25
  "peerDependencies": {
24
26
  "@angular/core": ">=17.0.0"
@@ -29,8 +31,9 @@
29
31
  }
30
32
  },
31
33
  "devDependencies": {
34
+ "@angular/core": "^22.0.1",
32
35
  "typescript": "^5.5.0",
33
- "vite": "^5.4.0",
36
+ "vite": "^6.0.0",
34
37
  "vite-plugin-dts": "^4.0.0"
35
38
  },
36
39
  "publishConfig": {
@@ -42,6 +45,19 @@
42
45
  "directory": "packages/angular"
43
46
  },
44
47
  "license": "MIT",
48
+ "homepage": "https://github.com/snxstudio/lit-pigeon/tree/main/packages/angular#readme",
49
+ "bugs": "https://github.com/snxstudio/lit-pigeon/issues",
50
+ "author": "Lit Pigeon Contributors",
51
+ "keywords": [
52
+ "email",
53
+ "email-template",
54
+ "email-editor",
55
+ "mjml",
56
+ "html-email",
57
+ "lit",
58
+ "web-components",
59
+ "angular"
60
+ ],
45
61
  "scripts": {
46
62
  "build": "vite build",
47
63
  "dev": "vite build --watch",