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

@uiw/react-amap-polygon

Package Overview
Dependencies
Maintainers
2
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uiw/react-amap-polygon - npm Package Compare versions

Comparing version 5.0.11 to 5.0.12

1

cjs/index.d.ts

@@ -5,2 +5,3 @@ /// <reference types="@uiw/react-amap-types" />

export * from './usePolygon';
export declare const PolygonContext: import("react").Context<AMap.Polygon | undefined>;
export interface PolygonProps extends OverlayProps, AMap.PolygonEvents, AMap.PolygonOptions {

@@ -7,0 +8,0 @@ /** 覆盖物是否可见 */

18

cjs/index.js

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

var _exportNames = {
PolygonContext: true,
Polygon: true
};
exports.Polygon = void 0;
exports.PolygonContext = exports.Polygon = void 0;
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));

@@ -26,2 +27,5 @@ var _react = require("react");

});
var _jsxRuntime = require("react/jsx-runtime");
var PolygonContext = /*#__PURE__*/(0, _react.createContext)(undefined);
exports.PolygonContext = PolygonContext;
var Polygon = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {

@@ -36,11 +40,7 @@ var children = props.children;

}, [polygon]);
if (children && /*#__PURE__*/(0, _react.isValidElement)(children) && polygon) {
var oProps = {
polygon: polygon,
polyElement: polygon
};
return /*#__PURE__*/(0, _react.cloneElement)(children, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, props), oProps));
}
return null;
return /*#__PURE__*/(0, _jsxRuntime.jsx)(PolygonContext.Provider, {
value: polygon,
children: children
});
});
exports.Polygon = Polygon;

@@ -47,3 +47,3 @@ "use strict";

};
}, [map, polygon]);
}, [map]);
(0, _react.useEffect)(function () {

@@ -50,0 +50,0 @@ if (polygon) {

@@ -5,2 +5,3 @@ /// <reference types="@uiw/react-amap-types" />

export * from './usePolygon';
export declare const PolygonContext: import("react").Context<AMap.Polygon | undefined>;
export interface PolygonProps extends OverlayProps, AMap.PolygonEvents, AMap.PolygonOptions {

@@ -7,0 +8,0 @@ /** 覆盖物是否可见 */

import _extends from "@babel/runtime/helpers/extends";
import { useImperativeHandle, forwardRef, isValidElement, cloneElement } from 'react';
import { useImperativeHandle, forwardRef, createContext } from 'react';
import { usePolygon } from './usePolygon';
import { jsx as _jsx } from "react/jsx-runtime";
export * from './usePolygon';
export var PolygonContext = /*#__PURE__*/createContext(undefined);
export var Polygon = /*#__PURE__*/forwardRef((props, ref) => {

@@ -15,10 +17,6 @@ var {

}), [polygon]);
if (children && /*#__PURE__*/isValidElement(children) && polygon) {
var oProps = {
polygon,
polyElement: polygon
};
return /*#__PURE__*/cloneElement(children, _extends({}, props, oProps));
}
return null;
return /*#__PURE__*/_jsx(PolygonContext.Provider, {
value: polygon,
children: children
});
});

@@ -41,3 +41,3 @@ import _extends from "@babel/runtime/helpers/extends";

};
}, [map, polygon]);
}, [map]);
useEffect(() => {

@@ -44,0 +44,0 @@ if (polygon) {

{
"name": "@uiw/react-amap-polygon",
"version": "5.0.11",
"version": "5.0.12",
"description": "构造多边形对象,通过 PolygonOptions 指定多边形样式。",

@@ -37,4 +37,4 @@ "homepage": "https://uiwjs.github.io/react-amap/#/polygon",

"dependencies": {
"@uiw/react-amap-map": "5.0.11",
"@uiw/react-amap-utils": "5.0.11"
"@uiw/react-amap-map": "5.0.12",
"@uiw/react-amap-utils": "5.0.12"
},

@@ -41,0 +41,0 @@ "devDependencies": {

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