@lit-pigeon/angular 0.1.3 → 0.1.5
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.
- package/README.md +61 -0
- package/package.json +19 -4
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.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Angular wrapper for the Pigeon email editor web component",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -14,11 +14,13 @@
|
|
|
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.
|
|
21
|
-
"@lit-pigeon/editor": "^0.
|
|
22
|
+
"@lit-pigeon/core": "^0.3.1",
|
|
23
|
+
"@lit-pigeon/editor": "^0.3.1"
|
|
22
24
|
},
|
|
23
25
|
"peerDependencies": {
|
|
24
26
|
"@angular/core": ">=17.0.0"
|
|
@@ -42,6 +44,19 @@
|
|
|
42
44
|
"directory": "packages/angular"
|
|
43
45
|
},
|
|
44
46
|
"license": "MIT",
|
|
47
|
+
"homepage": "https://github.com/snxstudio/lit-pigeon/tree/main/packages/angular#readme",
|
|
48
|
+
"bugs": "https://github.com/snxstudio/lit-pigeon/issues",
|
|
49
|
+
"author": "Lit Pigeon Contributors",
|
|
50
|
+
"keywords": [
|
|
51
|
+
"email",
|
|
52
|
+
"email-template",
|
|
53
|
+
"email-editor",
|
|
54
|
+
"mjml",
|
|
55
|
+
"html-email",
|
|
56
|
+
"lit",
|
|
57
|
+
"web-components",
|
|
58
|
+
"angular"
|
|
59
|
+
],
|
|
45
60
|
"scripts": {
|
|
46
61
|
"build": "vite build",
|
|
47
62
|
"dev": "vite build --watch",
|