@emabuild/react 0.7.0 → 0.7.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/LICENSE +21 -0
- package/dist/EmabuildEditor.js +4 -0
- package/package.json +13 -7
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Fabio Varrenti
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/EmabuildEditor.js
CHANGED
|
@@ -59,6 +59,9 @@ export const EmabuildEditor = forwardRef(function EmabuildEditor(props, ref) {
|
|
|
59
59
|
el.addEventListener(name, fn);
|
|
60
60
|
return [name, fn];
|
|
61
61
|
});
|
|
62
|
+
// Already ready before the listeners were attached: same as the event
|
|
63
|
+
if (el.isReady)
|
|
64
|
+
handlers.find(([name]) => name === 'editor:ready')?.[1](new CustomEvent('editor:ready'));
|
|
62
65
|
return () => handlers.forEach(([name, fn]) => el.removeEventListener(name, fn));
|
|
63
66
|
}, []);
|
|
64
67
|
// Options are a property, not an attribute
|
|
@@ -90,5 +93,6 @@ export const EmabuildEditor = forwardRef(function EmabuildEditor(props, ref) {
|
|
|
90
93
|
redo: () => elRef.current?.redo(),
|
|
91
94
|
}), []);
|
|
92
95
|
// `ref` callback keeps working on React 17/18 (no native custom-element props support needed)
|
|
96
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- custom element ref/style typing differs across React 17/18/19
|
|
93
97
|
return _jsx("mail-editor", { ref: elRef, className: props.className, style: props.style, children: props.children });
|
|
94
98
|
});
|
package/package.json
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emabuild/react",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "React wrapper component for the @emabuild/core email editor",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
7
|
-
"README.md"
|
|
7
|
+
"README.md",
|
|
8
|
+
"LICENSE"
|
|
8
9
|
],
|
|
9
10
|
"peerDependencies": {
|
|
10
11
|
"react": ">=17",
|
|
11
|
-
"@emabuild/core": "^0.
|
|
12
|
-
"@emabuild/types": "^0.
|
|
12
|
+
"@emabuild/core": "^0.8.0",
|
|
13
|
+
"@emabuild/types": "^0.8.0"
|
|
13
14
|
},
|
|
14
15
|
"devDependencies": {
|
|
15
|
-
"react": "^18.3.1",
|
|
16
16
|
"@types/react": "^18.3.12",
|
|
17
|
+
"react": "^18.3.1",
|
|
17
18
|
"typescript": "^5.7.0",
|
|
18
|
-
"@emabuild/
|
|
19
|
-
"@emabuild/
|
|
19
|
+
"@emabuild/types": "0.8.0",
|
|
20
|
+
"@emabuild/core": "0.8.0"
|
|
20
21
|
},
|
|
21
22
|
"license": "MIT",
|
|
22
23
|
"type": "module",
|
|
@@ -32,6 +33,11 @@
|
|
|
32
33
|
"publishConfig": {
|
|
33
34
|
"access": "public"
|
|
34
35
|
},
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "git+https://github.com/Fabiovarrenti/emabuild.git",
|
|
39
|
+
"directory": "wrappers/react"
|
|
40
|
+
},
|
|
35
41
|
"scripts": {
|
|
36
42
|
"build": "tsc -p tsconfig.build.json",
|
|
37
43
|
"typecheck": "tsc --noEmit -p ."
|