@react-email/section 0.0.12 → 0.0.13-canary.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/dist/index.d.mts CHANGED
@@ -2,6 +2,6 @@ import * as React from 'react';
2
2
 
3
3
  type RootProps = React.ComponentPropsWithoutRef<"table">;
4
4
  type SectionProps = RootProps;
5
- declare const Section: React.FC<Readonly<SectionProps>>;
5
+ declare const Section: React.ForwardRefExoticComponent<Readonly<Omit<React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, "ref">> & React.RefAttributes<HTMLTableElement>>;
6
6
 
7
7
  export { Section, SectionProps };
package/dist/index.d.ts CHANGED
@@ -2,6 +2,6 @@ import * as React from 'react';
2
2
 
3
3
  type RootProps = React.ComponentPropsWithoutRef<"table">;
4
4
  type SectionProps = RootProps;
5
- declare const Section: React.FC<Readonly<SectionProps>>;
5
+ declare const Section: React.ForwardRefExoticComponent<Readonly<Omit<React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, "ref">> & React.RefAttributes<HTMLTableElement>>;
6
6
 
7
7
  export { Section, SectionProps };
package/dist/index.js CHANGED
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __defProps = Object.defineProperties;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
7
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
8
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __getProtoOf = Object.getPrototypeOf;
8
10
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
11
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
12
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -44,6 +46,14 @@ var __copyProps = (to, from, except, desc) => {
44
46
  }
45
47
  return to;
46
48
  };
49
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
50
+ // If the importer is in node compatibility mode or this is not an ESM
51
+ // file that has been converted to a CommonJS file using a Babel-
52
+ // compatible transform (i.e. "__esModule" has not been set), then set
53
+ // "default" to the CommonJS "module.exports" for node compatibility.
54
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
55
+ mod
56
+ ));
47
57
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
48
58
 
49
59
  // src/index.ts
@@ -54,15 +64,10 @@ __export(src_exports, {
54
64
  module.exports = __toCommonJS(src_exports);
55
65
 
56
66
  // src/section.tsx
67
+ var React = __toESM(require("react"));
57
68
  var import_jsx_runtime = require("react/jsx-runtime");
58
- var Section = (_a) => {
59
- var _b = _a, {
60
- children,
61
- style
62
- } = _b, props = __objRest(_b, [
63
- "children",
64
- "style"
65
- ]);
69
+ var Section = React.forwardRef((_a, ref) => {
70
+ var _b = _a, { children, style } = _b, props = __objRest(_b, ["children", "style"]);
66
71
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
67
72
  "table",
68
73
  __spreadProps(__spreadValues({
@@ -72,12 +77,14 @@ var Section = (_a) => {
72
77
  border: 0,
73
78
  cellPadding: "0",
74
79
  cellSpacing: "0",
80
+ ref,
75
81
  role: "presentation",
76
82
  style,
77
83
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children }) }) })
78
84
  })
79
85
  );
80
- };
86
+ });
87
+ Section.displayName = "Section";
81
88
  // Annotate the CommonJS export names for ESM import in node:
82
89
  0 && (module.exports = {
83
90
  Section
package/dist/index.mjs CHANGED
@@ -31,15 +31,10 @@ var __objRest = (source, exclude) => {
31
31
  };
32
32
 
33
33
  // src/section.tsx
34
+ import * as React from "react";
34
35
  import { jsx } from "react/jsx-runtime";
35
- var Section = (_a) => {
36
- var _b = _a, {
37
- children,
38
- style
39
- } = _b, props = __objRest(_b, [
40
- "children",
41
- "style"
42
- ]);
36
+ var Section = React.forwardRef((_a, ref) => {
37
+ var _b = _a, { children, style } = _b, props = __objRest(_b, ["children", "style"]);
43
38
  return /* @__PURE__ */ jsx(
44
39
  "table",
45
40
  __spreadProps(__spreadValues({
@@ -49,12 +44,14 @@ var Section = (_a) => {
49
44
  border: 0,
50
45
  cellPadding: "0",
51
46
  cellSpacing: "0",
47
+ ref,
52
48
  role: "presentation",
53
49
  style,
54
50
  children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { children }) }) })
55
51
  })
56
52
  );
57
- };
53
+ });
54
+ Section.displayName = "Section";
58
55
  export {
59
56
  Section
60
57
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-email/section",
3
- "version": "0.0.12",
3
+ "version": "0.0.13-canary.1",
4
4
  "description": "Display a section that can be formatted using columns",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -40,9 +40,9 @@
40
40
  "devDependencies": {
41
41
  "@babel/preset-react": "7.23.3",
42
42
  "typescript": "5.1.6",
43
+ "eslint-config-custom": "0.0.0",
43
44
  "tsconfig": "0.0.0",
44
- "@react-email/render": "0.0.13",
45
- "eslint-config-custom": "0.0.0"
45
+ "@react-email/render": "0.0.17-canary.1"
46
46
  },
47
47
  "publishConfig": {
48
48
  "access": "public"