@lit-pigeon/editor 0.3.0 → 0.3.1
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 +53 -0
- package/package.json +20 -3
package/README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# @lit-pigeon/editor
|
|
2
|
+
|
|
3
|
+
The [Lit](https://lit.dev) Web Components UI for the
|
|
4
|
+
[Lit Pigeon](https://github.com/snxstudio/lit-pigeon) email editor — canvas,
|
|
5
|
+
block palette, property panels, toolbar, drag-and-drop, layers, asset manager,
|
|
6
|
+
merge-tag picker, and keyboard shortcuts. Importing the package registers the
|
|
7
|
+
`<pigeon-editor>` custom element, so it works in any framework (or none).
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @lit-pigeon/editor
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
Import the package once to define the custom element, then drop it into your
|
|
18
|
+
markup:
|
|
19
|
+
|
|
20
|
+
```html
|
|
21
|
+
<script type="module">
|
|
22
|
+
import '@lit-pigeon/editor';
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<pigeon-editor id="editor"></pigeon-editor>
|
|
26
|
+
|
|
27
|
+
<script type="module">
|
|
28
|
+
const editor = document.querySelector('#editor');
|
|
29
|
+
|
|
30
|
+
editor.addEventListener('pigeon:change', (e) => {
|
|
31
|
+
console.log('document', e.detail.document);
|
|
32
|
+
});
|
|
33
|
+
editor.addEventListener('pigeon:ready', () => console.log('ready'));
|
|
34
|
+
</script>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`document` and `config` are set as live DOM **properties** (never stringified
|
|
38
|
+
attributes). The main component class is also exported for direct use or
|
|
39
|
+
type imports:
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
import { PigeonEditor } from '@lit-pigeon/editor';
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Prefer a framework wrapper? See
|
|
46
|
+
[`@lit-pigeon/react`](../react), [`@lit-pigeon/vue`](../vue),
|
|
47
|
+
[`@lit-pigeon/angular`](../angular), and [`@lit-pigeon/svelte`](../svelte).
|
|
48
|
+
|
|
49
|
+
Part of [Lit Pigeon](https://github.com/snxstudio/lit-pigeon) — open-source drag-and-drop email editor.
|
|
50
|
+
|
|
51
|
+
## License
|
|
52
|
+
|
|
53
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lit-pigeon/editor",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Lit Web Components UI for the Pigeon email editor",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
|
-
"dist"
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md",
|
|
18
|
+
"LICENSE"
|
|
17
19
|
],
|
|
18
20
|
"dependencies": {
|
|
19
21
|
"@tiptap/core": "^2.10.0",
|
|
@@ -26,7 +28,7 @@
|
|
|
26
28
|
"@tiptap/pm": "^2.10.0",
|
|
27
29
|
"@tiptap/starter-kit": "^2.10.0",
|
|
28
30
|
"lit": "^3.1.0",
|
|
29
|
-
"@lit-pigeon/core": "^0.3.
|
|
31
|
+
"@lit-pigeon/core": "^0.3.1"
|
|
30
32
|
},
|
|
31
33
|
"devDependencies": {
|
|
32
34
|
"happy-dom": "^20.9.0",
|
|
@@ -44,6 +46,21 @@
|
|
|
44
46
|
"directory": "packages/editor"
|
|
45
47
|
},
|
|
46
48
|
"license": "MIT",
|
|
49
|
+
"homepage": "https://github.com/snxstudio/lit-pigeon/tree/main/packages/editor#readme",
|
|
50
|
+
"bugs": "https://github.com/snxstudio/lit-pigeon/issues",
|
|
51
|
+
"author": "Lit Pigeon Contributors",
|
|
52
|
+
"keywords": [
|
|
53
|
+
"email",
|
|
54
|
+
"email-template",
|
|
55
|
+
"email-editor",
|
|
56
|
+
"mjml",
|
|
57
|
+
"html-email",
|
|
58
|
+
"lit",
|
|
59
|
+
"web-components",
|
|
60
|
+
"drag-and-drop",
|
|
61
|
+
"no-code",
|
|
62
|
+
"wysiwyg"
|
|
63
|
+
],
|
|
47
64
|
"scripts": {
|
|
48
65
|
"build": "vite build",
|
|
49
66
|
"dev": "vite build --watch",
|