@react-email/body 0.0.3 → 0.0.4

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.
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+
3
+ type RootProps = React.ComponentPropsWithoutRef<"body">;
4
+ type BodyProps = RootProps;
5
+ declare const Body: React.FC<Readonly<BodyProps>>;
6
+
7
+ export { Body, BodyProps };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,7 @@
1
1
  import * as React from 'react';
2
2
 
3
3
  type RootProps = React.ComponentPropsWithoutRef<"body">;
4
- interface BodyProps extends RootProps {
5
- }
4
+ type BodyProps = RootProps;
6
5
  declare const Body: React.FC<Readonly<BodyProps>>;
7
6
 
8
7
  export { Body, BodyProps };
package/dist/index.js CHANGED
@@ -1,8 +1,37 @@
1
1
  "use strict";
2
2
  var __defProp = Object.defineProperty;
3
+ var __defProps = Object.defineProperties;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __spreadValues = (a, b) => {
12
+ for (var prop in b || (b = {}))
13
+ if (__hasOwnProp.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ if (__getOwnPropSymbols)
16
+ for (var prop of __getOwnPropSymbols(b)) {
17
+ if (__propIsEnum.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ }
20
+ return a;
21
+ };
22
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
+ var __objRest = (source, exclude) => {
24
+ var target = {};
25
+ for (var prop in source)
26
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
27
+ target[prop] = source[prop];
28
+ if (source != null && __getOwnPropSymbols)
29
+ for (var prop of __getOwnPropSymbols(source)) {
30
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
31
+ target[prop] = source[prop];
32
+ }
33
+ return target;
34
+ };
6
35
  var __export = (target, all) => {
7
36
  for (var name in all)
8
37
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -26,16 +55,15 @@ module.exports = __toCommonJS(src_exports);
26
55
 
27
56
  // src/body.tsx
28
57
  var import_jsx_runtime = require("react/jsx-runtime");
29
- var Body = ({
30
- children,
31
- style,
32
- ...props
33
- }) => {
34
- const styleDefault = {
35
- wordSpacing: "normal",
36
- ...style
37
- };
38
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("body", { ...props, "data-id": "__react-email-body", style, children });
58
+ var Body = (_a) => {
59
+ var _b = _a, {
60
+ children,
61
+ style
62
+ } = _b, props = __objRest(_b, [
63
+ "children",
64
+ "style"
65
+ ]);
66
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("body", __spreadProps(__spreadValues({}, props), { style, children }));
39
67
  };
40
68
  Body.displayName = "Body";
41
69
  // Annotate the CommonJS export names for ESM import in node:
package/dist/index.mjs CHANGED
@@ -1,15 +1,46 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
32
+
1
33
  // src/body.tsx
2
34
  import { jsx } from "react/jsx-runtime";
3
- var Body = ({
4
- children,
5
- style,
6
- ...props
7
- }) => {
8
- const styleDefault = {
9
- wordSpacing: "normal",
10
- ...style
11
- };
12
- return /* @__PURE__ */ jsx("body", { ...props, "data-id": "__react-email-body", style, children });
35
+ var Body = (_a) => {
36
+ var _b = _a, {
37
+ children,
38
+ style
39
+ } = _b, props = __objRest(_b, [
40
+ "children",
41
+ "style"
42
+ ]);
43
+ return /* @__PURE__ */ jsx("body", __spreadProps(__spreadValues({}, props), { style, children }));
13
44
  };
14
45
  Body.displayName = "Body";
15
46
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-email/body",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "A React body component to wrap emails",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -24,30 +24,21 @@
24
24
  "license": "MIT",
25
25
  "scripts": {
26
26
  "build": "tsup src/index.ts --format esm,cjs --dts --external react",
27
- "dev": "tsup src/index.ts --format esm,cjs --dts --external react --watch",
28
- "lint": "eslint",
29
27
  "clean": "rm -rf dist",
30
- "test": "jest",
31
- "test:watch": "jest --watch",
32
- "format:check": "prettier --check \"**/*.{ts,tsx,md}\"",
33
- "format": "prettier --write \"**/*.{ts,tsx,md}\""
28
+ "dev": "tsup src/index.ts --format esm,cjs --dts --external react --watch",
29
+ "lint": "eslint .",
30
+ "test:watch": "vitest",
31
+ "test": "vitest run"
34
32
  },
35
- "dependencies": {
33
+ "peerDependencies": {
36
34
  "react": "18.2.0"
37
35
  },
38
36
  "devDependencies": {
39
37
  "@babel/core": "7.21.8",
40
38
  "@babel/preset-react": "7.22.5",
41
- "@react-email/render": "0.0.6",
42
- "@types/jest": "29.5.3",
43
- "@types/react": "18.0.20",
44
- "@types/react-dom": "18.0.6",
45
- "babel-jest": "28.1.3",
46
- "eslint": "8.45.0",
47
- "jest": "28.1.3",
48
- "prettier": "3.0.0",
49
- "ts-jest": "28.0.8",
50
- "tsup": "6.2.3",
39
+ "@react-email/render": "workspace:*",
40
+ "eslint-config-custom": "workspace:*",
41
+ "tsconfig": "workspace:*",
51
42
  "typescript": "5.1.6"
52
43
  },
53
44
  "publishConfig": {
package/readme.md CHANGED
@@ -57,7 +57,7 @@ This component was tested using the most popular email clients.
57
57
 
58
58
  | <img src="https://react.email/static/icons/gmail.svg" width="48px" height="48px" alt="Gmail logo"> | <img src="https://react.email/static/icons/apple-mail.svg" width="48px" height="48px" alt="Apple Mail"> | <img src="https://react.email/static/icons/outlook.svg" width="48px" height="48px" alt="Outlook logo"> | <img src="https://react.email/static/icons/yahoo-mail.svg" width="48px" height="48px" alt="Yahoo! Mail logo"> | <img src="https://react.email/static/icons/hey.svg" width="48px" height="48px" alt="HEY logo"> | <img src="https://react.email/static/icons/superhuman.svg" width="48px" height="48px" alt="Superhuman logo"> |
59
59
  | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
60
- | Gmail ✔ | Apple Mail ✔ | Outlook ✔ | Yahoo! Mail ✔ | HEY ✔ | Superhuman ✔ |
60
+ | Gmail ✔ | Apple Mail ✔ | Outlook ✔ | Yahoo! Mail ✔ | HEY ✔ | Superhuman ✔ |
61
61
 
62
62
  ## License
63
63