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

@visx/clip-path

Package Overview
Dependencies
Maintainers
4
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@visx/clip-path - npm Package Compare versions

Comparing version 3.0.0-alpha.0 to 3.0.0

16

esm/clip-paths/CircleClipPath.js
import _pt from "prop-types";
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["id", "cx", "cy", "r"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';
import ClipPath from './ClipPath';
/** ClipPath for clipping to the shape of a `<circle />`, pass any `<circle />` props you want. */
export default function CircleClipPath(_ref) {
var id = _ref.id,
cx = _ref.cx,
cy = _ref.cy,
r = _ref.r,
restProps = _objectWithoutPropertiesLoose(_ref, ["id", "cx", "cy", "r"]);
cx = _ref.cx,
cy = _ref.cy,
r = _ref.r,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
return /*#__PURE__*/React.createElement(ClipPath, {

@@ -19,0 +15,0 @@ id: id

import _pt from "prop-types";
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["id", "children"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';
/** Handles rendering of <defs> and <clipPath> elements for you, with any children you want. */
export default function ClipPath(_ref) {
var id = _ref.id,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, ["id", "children"]);
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
return /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", _extends({

@@ -16,0 +12,0 @@ id: id

import _pt from "prop-types";
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _excluded = ["id", "x", "y", "width", "height"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
import React from 'react';

@@ -11,12 +9,11 @@ import ClipPath from './ClipPath';

var id = _ref.id,
_ref$x = _ref.x,
x = _ref$x === void 0 ? 0 : _ref$x,
_ref$y = _ref.y,
y = _ref$y === void 0 ? 0 : _ref$y,
_ref$width = _ref.width,
width = _ref$width === void 0 ? 1 : _ref$width,
_ref$height = _ref.height,
height = _ref$height === void 0 ? 1 : _ref$height,
restProps = _objectWithoutPropertiesLoose(_ref, ["id", "x", "y", "width", "height"]);
_ref$x = _ref.x,
x = _ref$x === void 0 ? 0 : _ref$x,
_ref$y = _ref.y,
y = _ref$y === void 0 ? 0 : _ref$y,
_ref$width = _ref.width,
width = _ref$width === void 0 ? 1 : _ref$width,
_ref$height = _ref.height,
height = _ref$height === void 0 ? 1 : _ref$height,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
return /*#__PURE__*/React.createElement(ClipPath, {

@@ -23,0 +20,0 @@ id: id

@@ -5,23 +5,16 @@ "use strict";

exports.default = CircleClipPath;
var _propTypes = _interopRequireDefault(require("prop-types"));
var _react = _interopRequireDefault(require("react"));
var _ClipPath = _interopRequireDefault(require("./ClipPath"));
var _excluded = ["id", "cx", "cy", "r"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
/** ClipPath for clipping to the shape of a `<circle />`, pass any `<circle />` props you want. */
function CircleClipPath(_ref) {
var id = _ref.id,
cx = _ref.cx,
cy = _ref.cy,
r = _ref.r,
restProps = _objectWithoutPropertiesLoose(_ref, ["id", "cx", "cy", "r"]);
cx = _ref.cx,
cy = _ref.cy,
r = _ref.r,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
return /*#__PURE__*/_react.default.createElement(_ClipPath.default, {

@@ -35,3 +28,2 @@ id: id

}
CircleClipPath.propTypes = {

@@ -38,0 +30,0 @@ id: _propTypes.default.string.isRequired,

@@ -5,19 +5,13 @@ "use strict";

exports.default = ClipPath;
var _propTypes = _interopRequireDefault(require("prop-types"));
var _react = _interopRequireDefault(require("react"));
var _excluded = ["id", "children"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
/** Handles rendering of <defs> and <clipPath> elements for you, with any children you want. */
function ClipPath(_ref) {
var id = _ref.id,
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, ["id", "children"]);
children = _ref.children,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
return /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("clipPath", _extends({

@@ -27,3 +21,2 @@ id: id

}
ClipPath.propTypes = {

@@ -30,0 +23,0 @@ id: _propTypes.default.string.isRequired,

@@ -5,27 +5,20 @@ "use strict";

exports.default = RectClipPath;
var _propTypes = _interopRequireDefault(require("prop-types"));
var _react = _interopRequireDefault(require("react"));
var _ClipPath = _interopRequireDefault(require("./ClipPath"));
var _excluded = ["id", "x", "y", "width", "height"];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function RectClipPath(_ref) {
var id = _ref.id,
_ref$x = _ref.x,
x = _ref$x === void 0 ? 0 : _ref$x,
_ref$y = _ref.y,
y = _ref$y === void 0 ? 0 : _ref$y,
_ref$width = _ref.width,
width = _ref$width === void 0 ? 1 : _ref$width,
_ref$height = _ref.height,
height = _ref$height === void 0 ? 1 : _ref$height,
restProps = _objectWithoutPropertiesLoose(_ref, ["id", "x", "y", "width", "height"]);
_ref$x = _ref.x,
x = _ref$x === void 0 ? 0 : _ref$x,
_ref$y = _ref.y,
y = _ref$y === void 0 ? 0 : _ref$y,
_ref$width = _ref.width,
width = _ref$width === void 0 ? 1 : _ref$width,
_ref$height = _ref.height,
height = _ref$height === void 0 ? 1 : _ref$height,
restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
return /*#__PURE__*/_react.default.createElement(_ClipPath.default, {

@@ -40,3 +33,2 @@ id: id

}
RectClipPath.propTypes = {

@@ -43,0 +35,0 @@ id: _propTypes.default.string.isRequired,

"use strict";
exports.__esModule = true;
exports.RectClipPath = exports.CircleClipPath = exports.ClipPath = void 0;
exports.RectClipPath = exports.ClipPath = exports.CircleClipPath = void 0;
var _ClipPath = _interopRequireDefault(require("./clip-paths/ClipPath"));
exports.ClipPath = _ClipPath.default;
var _CircleClipPath = _interopRequireDefault(require("./clip-paths/CircleClipPath"));
exports.CircleClipPath = _CircleClipPath.default;
var _RectClipPath = _interopRequireDefault(require("./clip-paths/RectClipPath"));
exports.RectClipPath = _RectClipPath.default;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
{
"name": "@visx/clip-path",
"version": "3.0.0-alpha.0",
"version": "3.0.0",
"description": "visx clip-path",

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

"peerDependencies": {
"react": "^16.0.0-0 || ^17.0.0-0"
"react": "^16.0.0-0 || ^17.0.0-0 || ^18.0.0-0"
},

@@ -42,3 +42,3 @@ "publishConfig": {

},
"gitHead": "2f2fb26030b5f1328803b2bd7de171d66e088aff"
"gitHead": "2fbffbaee80b88302274266112f8ad9a241def33"
}
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