New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@react-email/heading

Package Overview
Dependencies
Maintainers
2
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.6 to 0.0.7

11

dist/index.d.ts
import * as React from 'react';
import { Margin } from 'utils';
interface Margin {
m?: string;
mx?: string;
my?: string;
mt?: string;
mr?: string;
mb?: string;
ml?: string;
}
interface HeadingOwnProps {

@@ -5,0 +14,0 @@ }

@@ -8,2 +8,5 @@ "use strict";

var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {

@@ -27,2 +30,265 @@ for (var name in all)

// ../utils/dist/as.js
var require_as = __commonJS({
"../utils/dist/as.js"(exports) {
"use strict";
exports.__esModule = true;
}
});
// ../utils/dist/copy-text-to-clipboard.js
var require_copy_text_to_clipboard = __commonJS({
"../utils/dist/copy-text-to-clipboard.js"(exports) {
"use strict";
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P ? value : new P(function(resolve) {
resolve(value);
});
}
return new (P || (P = Promise))(function(resolve, reject) {
function fulfilled(value) {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
}
function rejected(value) {
try {
step(generator["throw"](value));
} catch (e) {
reject(e);
}
}
function step(result) {
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
}
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = exports && exports.__generator || function(thisArg, body) {
var _ = { label: 0, sent: function() {
if (t[0] & 1)
throw t[1];
return t[1];
}, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
return this;
}), g;
function verb(n) {
return function(v) {
return step([n, v]);
};
}
function step(op) {
if (f)
throw new TypeError("Generator is already executing.");
while (_)
try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
return t;
if (y = 0, t)
op = [op[0] & 2, t.value];
switch (op[0]) {
case 0:
case 1:
t = op;
break;
case 4:
_.label++;
return { value: op[1], done: false };
case 5:
_.label++;
y = op[1];
op = [0];
continue;
case 7:
op = _.ops.pop();
_.trys.pop();
continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
_ = 0;
continue;
}
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
_.label = op[1];
break;
}
if (op[0] === 6 && _.label < t[1]) {
_.label = t[1];
t = op;
break;
}
if (t && _.label < t[2]) {
_.label = t[2];
_.ops.push(op);
break;
}
if (t[2])
_.ops.pop();
_.trys.pop();
continue;
}
op = body.call(thisArg, _);
} catch (e) {
op = [6, e];
y = 0;
} finally {
f = t = 0;
}
if (op[0] & 5)
throw op[1];
return { value: op[0] ? op[1] : void 0, done: true };
}
};
exports.__esModule = true;
exports.copyTextToClipboard = void 0;
var copyTextToClipboard = function(text) {
return __awaiter(void 0, void 0, void 0, function() {
var _a;
return __generator(this, function(_b) {
switch (_b.label) {
case 0:
_b.trys.push([0, 2, , 3]);
return [4, navigator.clipboard.writeText(text)];
case 1:
_b.sent();
return [3, 3];
case 2:
_a = _b.sent();
throw new Error("Not able to copy");
case 3:
return [2];
}
});
});
};
exports.copyTextToClipboard = copyTextToClipboard;
}
});
// ../utils/dist/px-to-pt.js
var require_px_to_pt = __commonJS({
"../utils/dist/px-to-pt.js"(exports) {
"use strict";
exports.__esModule = true;
exports.pxToPt = void 0;
var pxToPt = function(px) {
return isNaN(Number(px)) ? null : parseInt(px, 10) * 3 / 4;
};
exports.pxToPt = pxToPt;
}
});
// ../utils/dist/spaces.js
var require_spaces = __commonJS({
"../utils/dist/spaces.js"(exports) {
"use strict";
var __assign = exports && exports.__assign || function() {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s)
if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
exports.__esModule = true;
exports.withMargin = void 0;
var withMargin2 = function(props) {
return [
withSpace(props.m, ["margin"]),
withSpace(props.mx, ["marginLeft", "marginRight"]),
withSpace(props.my, ["marginTop", "marginBottom"]),
withSpace(props.mt, ["marginTop"]),
withSpace(props.mr, ["marginRight"]),
withSpace(props.mb, ["marginBottom"]),
withSpace(props.ml, ["marginLeft"])
].filter(function(s) {
return Object.keys(s).length;
})[0];
};
exports.withMargin = withMargin2;
var withSpace = function(value, properties) {
return properties.reduce(function(styles, property) {
var _a;
if (value) {
return __assign(__assign({}, styles), (_a = {}, _a[property] = "".concat(value, "px"), _a));
}
return styles;
}, {});
};
}
});
// ../utils/dist/style-to-string.js
var require_style_to_string = __commonJS({
"../utils/dist/style-to-string.js"(exports) {
"use strict";
exports.__esModule = true;
exports.styleToString = void 0;
var styleToString = function(style) {
return Object.keys(style).reduce(function(acc, key) {
return acc + key.split(/(?=[A-Z])/).join("-").toLowerCase() + ":" + style[key] + ";";
}, "");
};
exports.styleToString = styleToString;
}
});
// ../utils/dist/unreachable.js
var require_unreachable = __commonJS({
"../utils/dist/unreachable.js"(exports) {
"use strict";
exports.__esModule = true;
exports.unreachable = void 0;
var unreachable = function(condition, message) {
if (message === void 0) {
message = "Entered unreachable code. Received '".concat(condition, "'.");
}
throw new TypeError(message);
};
exports.unreachable = unreachable;
}
});
// ../utils/dist/index.js
var require_dist = __commonJS({
"../utils/dist/index.js"(exports) {
"use strict";
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
if (k2 === void 0)
k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() {
return m[k];
} };
}
Object.defineProperty(o, k2, desc);
} : function(o, m, k, k2) {
if (k2 === void 0)
k2 = k;
o[k2] = m[k];
});
var __exportStar = exports && exports.__exportStar || function(m, exports2) {
for (var p in m)
if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p))
__createBinding(exports2, m, p);
};
exports.__esModule = true;
__exportStar(require_as(), exports);
__exportStar(require_copy_text_to_clipboard(), exports);
__exportStar(require_px_to_pt(), exports);
__exportStar(require_spaces(), exports);
__exportStar(require_style_to_string(), exports);
__exportStar(require_unreachable(), exports);
}
});
// src/index.ts

@@ -38,3 +304,3 @@ var src_exports = {};

var React = __toESM(require("react"));
var import_utils = require("utils");
var import_utils = __toESM(require_dist());
var import_jsx_runtime = require("react/jsx-runtime");

@@ -41,0 +307,0 @@ var Heading = React.forwardRef(

8

package.json
{
"name": "@react-email/heading",
"version": "0.0.6",
"version": "0.0.7",
"description": "A block of heading text",

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

"type": "git",
"url": "https://github.com/zenorocha/react-email.git",
"url": "https://github.com/resendlabs/react-email.git",
"directory": "packages/heading"

@@ -34,3 +34,3 @@ },

"engines": {
"node": ">=18.0.0"
"node": ">=16.0.0"
},

@@ -59,2 +59,2 @@ "dependencies": {

}
}
}

@@ -9,3 +9,3 @@ ![React Email heading cover](https://react.email/static/covers/heading.png)

<span> · </span>
<a href="https://github.com/zenorocha/react-email">GitHub</a>
<a href="https://github.com/resendlabs/react-email">GitHub</a>
<span> · </span>

@@ -12,0 +12,0 @@ <a href="https://react.email/discord">Discord</a>

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