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

@theorem/react

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@theorem/react - npm Package Compare versions

Comparing version 5.0.0 to 6.0.0

6

CHANGELOG.md

@@ -0,1 +1,7 @@

# 6.0.0
- ActionArea: improve rels and referrer
- ActionArea: nicer error message when action is missing
- permanence: renders children on the screen even without parent
# 5.0.0

@@ -2,0 +8,0 @@

28

dist/ActionArea/ActionArea.js

@@ -39,4 +39,6 @@ var __assign = (this && this.__assign) || function () {

export function ActionArea(props) {
var action = props.action, children = props.children, title = props.title, style = props.style;
var children = props.children, title = props.title, style = props.style;
var className = props.className || "";
// Make sure we handle a common error well
var action = props.action;
var button = function (opts) {

@@ -57,8 +59,3 @@ var onClick = opts.onClick, onMouseDown = opts.onMouseDown, type = opts.type;

return span("current");
var external = url.startsWith("http://") || url.startsWith("https://");
var rels = [
newWindow ? "noopener" : "",
external ? "noreferrer" : "",
].filter(function (s) { return s; });
return (_jsx("a", __assign({ className: baseStyles + " " + className, download: download, href: url, rel: rels.join(" "), target: newWindow ? "_blank" : undefined, title: title, style: style }, { children: children }), void 0));
return (_jsx("a", __assign({ className: baseStyles + " " + className, download: download, href: url, rel: newWindow ? "noopener" : undefined, referrerPolicy: "strict-origin-when-cross-origin", target: newWindow ? "_blank" : undefined, title: title, style: style }, { children: children }), void 0));
};

@@ -73,9 +70,12 @@ if (action === "disabled")

return link(action);
if ("download" in action)
return link(action.url, { download: action.download });
if ("mousedown" in action)
return button({ onMouseDown: action.mousedown });
if ("newWindow" in action)
return link(action.newWindow, { newWindow: true });
throw new Error("Unexpected action");
if (action) {
if ("download" in action)
return link(action.url, { download: action.download });
if ("mousedown" in action)
return button({ onMouseDown: action.mousedown });
if ("newWindow" in action)
return link(action.newWindow, { newWindow: true });
}
console.error("Props for the last ActionArea:", props);
throw new Error("ActionArea received an invalid action: " + action);
}

@@ -21,22 +21,20 @@ {

"dependencies": {
"@types/color-convert": "^2.0.0",
"@types/findup-sync": "^2.0.2",
"color-convert": "^2.0.1",
"commander": "^2.20.3",
"commander": "^7.0.0",
"findup-sync": "^4.0.0",
"license-checker-webpack-plugin": "=0.2.0",
"license-checker-webpack-plugin": "=0.2.1",
"parse-css-color": "^0.1.2",
"use-memo-one": "^1.1.1"
"use-memo-one": "^1.1.2"
},
"devDependencies": {
"@theorem/eslint-plugin": "^6.2.1",
"@types/license-checker-webpack-plugin": "^0.0.2",
"@types/license-checker-webpack-plugin": "^0.0.3",
"@types/react": "^17.0.0",
"@types/react-test-renderer": "^17.0.0",
"ava": "^3.13.0",
"eslint": "^7.15.0",
"ava": "^3.15.0",
"eslint": "^7.18.0",
"prettier": "^2.2.1",
"react": "^17.0.1",
"react-test-renderer": "^17.0.1",
"ts-node": "^9.1.0",
"ts-node": "^9.1.1",
"typescript": "^4.1.3"

@@ -62,3 +60,3 @@ },

"types": "dist/index.js",
"version": "5.0.0"
"version": "6.0.0"
}

@@ -9,2 +9,2 @@ import { ReactNode } from "react";

children: ReactNode;
}) => null];
}) => {} | null | undefined];

@@ -18,3 +18,3 @@ var __assign = (this && this.__assign) || function () {

export function makePermanence() {
var context = createContext(function () { });
var context = createContext("no-parent");
return [

@@ -30,5 +30,9 @@ function Parent(props) {

useLayoutEffect(function () {
if (setDeepChildren === "no-parent")
return;
setDeepChildren(children);
return function () { return setDeepChildren(null); };
});
if (setDeepChildren === "no-parent")
return children;
return null;

@@ -35,0 +39,0 @@ },

@@ -21,22 +21,20 @@ {

"dependencies": {
"@types/color-convert": "^2.0.0",
"@types/findup-sync": "^2.0.2",
"color-convert": "^2.0.1",
"commander": "^2.20.3",
"commander": "^7.0.0",
"findup-sync": "^4.0.0",
"license-checker-webpack-plugin": "=0.2.0",
"license-checker-webpack-plugin": "=0.2.1",
"parse-css-color": "^0.1.2",
"use-memo-one": "^1.1.1"
"use-memo-one": "^1.1.2"
},
"devDependencies": {
"@theorem/eslint-plugin": "^6.2.1",
"@types/license-checker-webpack-plugin": "^0.0.2",
"@types/license-checker-webpack-plugin": "^0.0.3",
"@types/react": "^17.0.0",
"@types/react-test-renderer": "^17.0.0",
"ava": "^3.13.0",
"eslint": "^7.15.0",
"ava": "^3.15.0",
"eslint": "^7.18.0",
"prettier": "^2.2.1",
"react": "^17.0.1",
"react-test-renderer": "^17.0.1",
"ts-node": "^9.1.0",
"ts-node": "^9.1.1",
"typescript": "^4.1.3"

@@ -62,3 +60,3 @@ },

"types": "dist/index.js",
"version": "5.0.0"
"version": "6.0.0"
}
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