@react-email/link
Advanced tools
| {"version":3,"file":"index.d.mts","names":[],"sources":["../src/link.tsx"],"sourcesContent":[],"mappings":";;;KAEY,SAAA,GAAY,SAAS,KAAA,CAAM;cAE1B,MAAI,KAAA,CAAA,0BAAA,SAAA,KAAA,KAAA,CAAA,kBAAA,KAAA,CAAA,qBAAA,oBAAA,8BAAA,KAAA,CAAA,cAAA"} |
| {"version":3,"file":"index.d.ts","names":[],"sources":["../src/link.tsx"],"sourcesContent":[],"mappings":";;;KAEY,SAAA,GAAY,SAAS,KAAA,CAAM;cAE1B,MAAI,KAAA,CAAA,0BAAA,SAAA,KAAA,KAAA,CAAA,kBAAA,KAAA,CAAA,qBAAA,oBAAA,8BAAA,KAAA,CAAA,cAAA"} |
| {"version":3,"file":"index.mjs","names":[],"sources":["../src/link.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport type LinkProps = Readonly<React.ComponentPropsWithoutRef<'a'>>;\n\nexport const Link = React.forwardRef<HTMLAnchorElement, LinkProps>(\n ({ target = '_blank', style, ...props }, ref) => (\n <a\n {...props}\n ref={ref}\n style={{\n color: '#067df7',\n textDecorationLine: 'none',\n ...style,\n }}\n target={target}\n >\n {props.children}\n </a>\n ),\n);\n\nLink.displayName = 'Link';\n(Link as any).tailwindTreatAsElement = true;\n"],"mappings":";;;;AAIA,MAAa,OAAO,MAAM,YACvB,EAAE,SAAS,UAAU,MAAO,GAAG,SAAS,QACvC,oBAAC;CACC,GAAI;CACC;CACL,OAAO;EACL,OAAO;EACP,oBAAoB;EACpB,GAAG;EACJ;CACO;WAEP,MAAM;EACL,CAEP;AAED,KAAK,cAAc;AACnB,AAAC,KAAa,yBAAyB"} |
+6
-4
@@ -1,6 +0,8 @@ | ||
| import * as React from 'react'; | ||
| import * as React from "react"; | ||
| type LinkProps = Readonly<React.ComponentPropsWithoutRef<"a">>; | ||
| //#region src/link.d.ts | ||
| type LinkProps = Readonly<React.ComponentPropsWithoutRef<'a'>>; | ||
| declare const Link: React.ForwardRefExoticComponent<Readonly<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref">> & React.RefAttributes<HTMLAnchorElement>>; | ||
| export { Link, type LinkProps }; | ||
| //#endregion | ||
| export { Link, LinkProps }; | ||
| //# sourceMappingURL=index.d.mts.map |
+6
-4
@@ -1,6 +0,8 @@ | ||
| import * as React from 'react'; | ||
| import * as React from "react"; | ||
| type LinkProps = Readonly<React.ComponentPropsWithoutRef<"a">>; | ||
| //#region src/link.d.ts | ||
| type LinkProps = Readonly<React.ComponentPropsWithoutRef<'a'>>; | ||
| declare const Link: React.ForwardRefExoticComponent<Readonly<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref">> & React.RefAttributes<HTMLAnchorElement>>; | ||
| export { Link, type LinkProps }; | ||
| //#endregion | ||
| export { Link, LinkProps }; | ||
| //# sourceMappingURL=index.d.ts.map |
+34
-79
@@ -1,90 +0,45 @@ | ||
| "use strict"; | ||
| //#region rolldown:runtime | ||
| var __create = Object.create; | ||
| var __defProp = Object.defineProperty; | ||
| var __defProps = Object.defineProperties; | ||
| var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
| var __getOwnPropDescs = Object.getOwnPropertyDescriptors; | ||
| var __getOwnPropNames = Object.getOwnPropertyNames; | ||
| var __getOwnPropSymbols = Object.getOwnPropertySymbols; | ||
| var __getProtoOf = Object.getPrototypeOf; | ||
| var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
| var __propIsEnum = Object.prototype.propertyIsEnumerable; | ||
| var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; | ||
| var __spreadValues = (a, b) => { | ||
| for (var prop in b || (b = {})) | ||
| if (__hasOwnProp.call(b, prop)) | ||
| __defNormalProp(a, prop, b[prop]); | ||
| if (__getOwnPropSymbols) | ||
| for (var prop of __getOwnPropSymbols(b)) { | ||
| if (__propIsEnum.call(b, prop)) | ||
| __defNormalProp(a, prop, b[prop]); | ||
| } | ||
| return a; | ||
| }; | ||
| var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); | ||
| var __objRest = (source, exclude) => { | ||
| var target = {}; | ||
| for (var prop in source) | ||
| if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) | ||
| target[prop] = source[prop]; | ||
| if (source != null && __getOwnPropSymbols) | ||
| for (var prop of __getOwnPropSymbols(source)) { | ||
| if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) | ||
| target[prop] = source[prop]; | ||
| } | ||
| return target; | ||
| }; | ||
| var __export = (target, all) => { | ||
| for (var name in all) | ||
| __defProp(target, name, { get: all[name], enumerable: true }); | ||
| }; | ||
| var __copyProps = (to, from, except, desc) => { | ||
| if (from && typeof from === "object" || typeof from === "function") { | ||
| for (let key of __getOwnPropNames(from)) | ||
| if (!__hasOwnProp.call(to, key) && key !== except) | ||
| __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | ||
| } | ||
| return to; | ||
| if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { | ||
| key = keys[i]; | ||
| if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { | ||
| get: ((k) => from[k]).bind(null, key), | ||
| enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable | ||
| }); | ||
| } | ||
| return to; | ||
| }; | ||
| var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | ||
| // If the importer is in node compatibility mode or this is not an ESM | ||
| // file that has been converted to a CommonJS file using a Babel- | ||
| // compatible transform (i.e. "__esModule" has not been set), then set | ||
| // "default" to the CommonJS "module.exports" for node compatibility. | ||
| isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | ||
| mod | ||
| )); | ||
| var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
| var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { | ||
| value: mod, | ||
| enumerable: true | ||
| }) : target, mod)); | ||
| // src/index.ts | ||
| var src_exports = {}; | ||
| __export(src_exports, { | ||
| Link: () => Link | ||
| }); | ||
| module.exports = __toCommonJS(src_exports); | ||
| //#endregion | ||
| let react = require("react"); | ||
| react = __toESM(react); | ||
| let react_jsx_runtime = require("react/jsx-runtime"); | ||
| react_jsx_runtime = __toESM(react_jsx_runtime); | ||
| // src/link.tsx | ||
| var React = __toESM(require("react")); | ||
| var import_jsx_runtime = require("react/jsx-runtime"); | ||
| var Link = React.forwardRef( | ||
| (_a, ref) => { | ||
| var _b = _a, { target = "_blank", style } = _b, props = __objRest(_b, ["target", "style"]); | ||
| return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( | ||
| "a", | ||
| __spreadProps(__spreadValues({}, props), { | ||
| ref, | ||
| style: __spreadValues({ | ||
| color: "#067df7", | ||
| textDecorationLine: "none" | ||
| }, style), | ||
| target, | ||
| children: props.children | ||
| }) | ||
| ); | ||
| } | ||
| ); | ||
| //#region src/link.tsx | ||
| const Link = react.forwardRef(({ target = "_blank", style,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", { | ||
| ...props, | ||
| ref, | ||
| style: { | ||
| color: "#067df7", | ||
| textDecorationLine: "none", | ||
| ...style | ||
| }, | ||
| target, | ||
| children: props.children | ||
| })); | ||
| Link.displayName = "Link"; | ||
| // Annotate the CommonJS export names for ESM import in node: | ||
| 0 && (module.exports = { | ||
| Link | ||
| }); | ||
| Link.tailwindTreatAsElement = true; | ||
| //#endregion | ||
| exports.Link = Link; |
+18
-53
@@ -1,56 +0,21 @@ | ||
| var __defProp = Object.defineProperty; | ||
| var __defProps = Object.defineProperties; | ||
| var __getOwnPropDescs = Object.getOwnPropertyDescriptors; | ||
| var __getOwnPropSymbols = Object.getOwnPropertySymbols; | ||
| var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
| var __propIsEnum = Object.prototype.propertyIsEnumerable; | ||
| var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; | ||
| var __spreadValues = (a, b) => { | ||
| for (var prop in b || (b = {})) | ||
| if (__hasOwnProp.call(b, prop)) | ||
| __defNormalProp(a, prop, b[prop]); | ||
| if (__getOwnPropSymbols) | ||
| for (var prop of __getOwnPropSymbols(b)) { | ||
| if (__propIsEnum.call(b, prop)) | ||
| __defNormalProp(a, prop, b[prop]); | ||
| } | ||
| return a; | ||
| }; | ||
| var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); | ||
| var __objRest = (source, exclude) => { | ||
| var target = {}; | ||
| for (var prop in source) | ||
| if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) | ||
| target[prop] = source[prop]; | ||
| if (source != null && __getOwnPropSymbols) | ||
| for (var prop of __getOwnPropSymbols(source)) { | ||
| if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) | ||
| target[prop] = source[prop]; | ||
| } | ||
| return target; | ||
| }; | ||
| // src/link.tsx | ||
| import * as React from "react"; | ||
| import { jsx } from "react/jsx-runtime"; | ||
| var Link = React.forwardRef( | ||
| (_a, ref) => { | ||
| var _b = _a, { target = "_blank", style } = _b, props = __objRest(_b, ["target", "style"]); | ||
| return /* @__PURE__ */ jsx( | ||
| "a", | ||
| __spreadProps(__spreadValues({}, props), { | ||
| ref, | ||
| style: __spreadValues({ | ||
| color: "#067df7", | ||
| textDecorationLine: "none" | ||
| }, style), | ||
| target, | ||
| children: props.children | ||
| }) | ||
| ); | ||
| } | ||
| ); | ||
| //#region src/link.tsx | ||
| const Link = React.forwardRef(({ target = "_blank", style,...props }, ref) => /* @__PURE__ */ jsx("a", { | ||
| ...props, | ||
| ref, | ||
| style: { | ||
| color: "#067df7", | ||
| textDecorationLine: "none", | ||
| ...style | ||
| }, | ||
| target, | ||
| children: props.children | ||
| })); | ||
| Link.displayName = "Link"; | ||
| export { | ||
| Link | ||
| }; | ||
| Link.tailwindTreatAsElement = true; | ||
| //#endregion | ||
| export { Link }; | ||
| //# sourceMappingURL=index.mjs.map |
+8
-10
| { | ||
| "name": "@react-email/link", | ||
| "version": "0.0.12", | ||
| "version": "0.0.13-tailwindv4.0", | ||
| "description": "A hyperlink to web pages, email addresses, or anything else a URL can address", | ||
@@ -41,6 +41,5 @@ "sideEffects": false, | ||
| "devDependencies": { | ||
| "typescript": "5.1.6", | ||
| "tsconfig": "0.0.0", | ||
| "@react-email/render": "1.0.3", | ||
| "eslint-config-custom": "0.0.0" | ||
| "typescript": "5.8.3", | ||
| "@react-email/render": "1.3.1", | ||
| "tsconfig": "0.0.0" | ||
| }, | ||
@@ -51,9 +50,8 @@ "publishConfig": { | ||
| "scripts": { | ||
| "build": "tsup src/index.ts --format esm,cjs --dts --external react", | ||
| "build": "tsdown src/index.ts --format esm,cjs --dts --external react", | ||
| "build:watch": "tsdown src/index.ts --format esm,cjs --dts --external react --watch", | ||
| "clean": "rm -rf dist", | ||
| "dev": "tsup src/index.ts --format esm,cjs --dts --external react --watch", | ||
| "lint": "eslint .", | ||
| "test:watch": "vitest", | ||
| "test": "vitest run" | ||
| "test": "vitest run", | ||
| "test:watch": "vitest" | ||
| } | ||
| } |
+3
-4
@@ -7,7 +7,6 @@  | ||
| <div align="center"> | ||
| <a href="https://react.email">Website</a> | ||
| <a href="https://react.email">Website</a> | ||
| <span> · </span> | ||
| <a href="https://github.com/resend/react-email">GitHub</a> | ||
| <span> · </span> | ||
| <a href="https://react.email/discord">Discord</a> | ||
| <a href="https://github.com/resend/react-email">GitHub</a> | ||
| </div> | ||
@@ -14,0 +13,0 @@ |
3
-25%10
42.86%9605
-16.76%65
-55.78%59
-1.67%