Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-email/heading

Package Overview
Dependencies
Maintainers
3
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-email/heading - npm Package Compare versions

Comparing version 0.0.9 to 0.0.11

30

dist/index.d.ts

@@ -27,32 +27,6 @@ import * as React$1 from 'react';

interface HeadingOwnProps {
}
type HeadingAs = As<"h1", "h2", "h3", "h4", "h5", "h6">;
type HeadingProps = HeadingAs & HeadingOwnProps & Margin;
declare const Heading: React$1.ForwardRefExoticComponent<(Pick<Readonly<Pick<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "key" | keyof React$1.HTMLAttributes<HTMLHeadingElement>> & {
ref?: ((instance: HTMLHeadingElement | null) => void) | React$1.RefObject<HTMLHeadingElement> | null | undefined;
} & {
as?: "h1" | undefined;
} & HeadingOwnProps & Margin>, "key" | keyof React$1.HTMLAttributes<HTMLHeadingElement> | "as" | keyof Margin> | Pick<Readonly<Pick<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "key" | keyof React$1.HTMLAttributes<HTMLHeadingElement>> & {
ref?: ((instance: HTMLHeadingElement | null) => void) | React$1.RefObject<HTMLHeadingElement> | null | undefined;
} & {
as: "h2";
} & HeadingOwnProps & Margin>, "key" | keyof React$1.HTMLAttributes<HTMLHeadingElement> | "as" | keyof Margin> | Pick<Readonly<Pick<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "key" | keyof React$1.HTMLAttributes<HTMLHeadingElement>> & {
ref?: ((instance: HTMLHeadingElement | null) => void) | React$1.RefObject<HTMLHeadingElement> | null | undefined;
} & {
as: "h3";
} & HeadingOwnProps & Margin>, "key" | keyof React$1.HTMLAttributes<HTMLHeadingElement> | "as" | keyof Margin> | Pick<Readonly<Pick<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "key" | keyof React$1.HTMLAttributes<HTMLHeadingElement>> & {
ref?: ((instance: HTMLHeadingElement | null) => void) | React$1.RefObject<HTMLHeadingElement> | null | undefined;
} & {
as: "h4";
} & HeadingOwnProps & Margin>, "key" | keyof React$1.HTMLAttributes<HTMLHeadingElement> | "as" | keyof Margin> | Pick<Readonly<Pick<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "key" | keyof React$1.HTMLAttributes<HTMLHeadingElement>> & {
ref?: ((instance: HTMLHeadingElement | null) => void) | React$1.RefObject<HTMLHeadingElement> | null | undefined;
} & {
as: "h5";
} & HeadingOwnProps & Margin>, "key" | keyof React$1.HTMLAttributes<HTMLHeadingElement> | "as" | keyof Margin> | Pick<Readonly<Pick<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "key" | keyof React$1.HTMLAttributes<HTMLHeadingElement>> & {
ref?: ((instance: HTMLHeadingElement | null) => void) | React$1.RefObject<HTMLHeadingElement> | null | undefined;
} & {
as: "h6";
} & HeadingOwnProps & Margin>, "key" | keyof React$1.HTMLAttributes<HTMLHeadingElement> | "as" | keyof Margin>) & React$1.RefAttributes<HTMLHeadingElement>>;
type HeadingProps = HeadingAs & Margin;
declare const Heading: React$1.FC<Readonly<HeadingProps>>;
export { Heading, HeadingAs, HeadingProps };

57

dist/index.js
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;

@@ -9,3 +8,2 @@ var __defProps = Object.defineProperties;

var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;

@@ -50,10 +48,2 @@ var __propIsEnum = Object.prototype.propertyIsEnumerable;

};
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);

@@ -70,3 +60,2 @@

var import_react_slot = require("@radix-ui/react-slot");
var React = __toESM(require("react"));

@@ -100,16 +89,34 @@ // src/utils/spaces.ts

var import_jsx_runtime = require("react/jsx-runtime");
var Heading = React.forwardRef(
(_a, forwardedRef) => {
var _b = _a, { as: Tag = "h1", children, style, m, mx, my, mt, mr, mb, ml } = _b, props = __objRest(_b, ["as", "children", "style", "m", "mx", "my", "mt", "mr", "mb", "ml"]);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
import_react_slot.Slot,
__spreadProps(__spreadValues({}, props), {
ref: forwardedRef,
style: __spreadValues(__spreadValues({}, withMargin({ m, mx, my, mt, mr, mb, ml })), style),
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tag, { children })
})
);
}
);
Heading.displayName = "Heading";
var Heading = (_a) => {
var _b = _a, {
as: Tag = "h1",
children,
style,
m,
mx,
my,
mt,
mr,
mb,
ml
} = _b, props = __objRest(_b, [
"as",
"children",
"style",
"m",
"mx",
"my",
"mt",
"mr",
"mb",
"ml"
]);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
import_react_slot.Slot,
__spreadProps(__spreadValues({}, props), {
style: __spreadValues(__spreadValues({}, withMargin({ m, mx, my, mt, mr, mb, ml })), style),
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tag, { children })
})
);
};
// Annotate the CommonJS export names for ESM import in node:

@@ -116,0 +123,0 @@ 0 && (module.exports = {

{
"name": "@react-email/heading",
"version": "0.0.9",
"version": "0.0.11",
"description": "A block of heading text",

@@ -15,3 +15,3 @@ "sideEffects": false,

"import": {
"types": "./dist/index.d.ts",
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"

@@ -26,12 +26,2 @@ },

"license": "MIT",
"scripts": {
"build": "tsup src/index.ts --format esm,cjs --dts --external react",
"dev": "tsup src/index.ts --format esm,cjs --dts --external react --watch",
"lint": "eslint",
"clean": "rm -rf dist",
"test": "jest",
"test:watch": "jest --watch",
"format:check": "prettier --check \"**/*.{ts,tsx,md}\"",
"format": "prettier --write \"**/*.{ts,tsx,md}\""
},
"repository": {

@@ -47,6 +37,8 @@ "type": "git",

"engines": {
"node": ">=16.0.0"
"node": ">=18.0.0"
},
"dependencies": {
"@radix-ui/react-slot": "1.0.2",
"@radix-ui/react-slot": "1.0.2"
},
"peerDependencies": {
"react": "18.2.0"

@@ -56,17 +48,18 @@ },

"@babel/preset-react": "7.22.5",
"@react-email/render": "0.0.6",
"@types/jest": "29.5.3",
"@types/react": "18.0.20",
"@types/react-dom": "18.0.6",
"babel-jest": "28.1.3",
"eslint": "8.45.0",
"jest": "28.1.3",
"prettier": "3.0.0",
"ts-jest": "28.0.8",
"tsup": "7.1.0",
"typescript": "5.1.6"
"typescript": "5.1.6",
"@react-email/render": "0.0.10",
"tsconfig": "0.0.0",
"eslint-config-custom": "0.0.0"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "tsup src/index.ts --format esm,cjs --dts --external react",
"clean": "rm -rf dist",
"dev": "tsup src/index.ts --format esm,cjs --dts --external react --watch",
"lint": "eslint .",
"test:watch": "vitest",
"test": "vitest run"
}
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc