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

@vis.gl/react-google-maps

Package Overview
Dependencies
Maintainers
6
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vis.gl/react-google-maps - npm Package Compare versions

Comparing version 0.3.3 to 0.4.0

3

dist/components/pin.d.ts
/// <reference types="google.maps" />
import { PropsWithChildren } from 'react';
/**

@@ -9,2 +10,2 @@ * Props for the Pin component

*/
export declare const Pin: (props: PinProps) => null;
export declare const Pin: (props: PropsWithChildren<PinProps>) => import("react").ReactPortal;

@@ -1376,2 +1376,5 @@ (function (global, factory) {

var advancedMarker = (_useContext = React.useContext(AdvancedMarkerContext)) == null ? void 0 : _useContext.marker;
var glyphContainer = React.useMemo(function () {
return document.createElement('div');
}, []);
// Create Pin View instance

@@ -1385,8 +1388,19 @@ React.useEffect(function () {

}
if (props.glyph && props.children) {
logErrorOnce('The <Pin> component only uses children to render the glyph if both the glyph property and children are present.');
}
if (React.Children.count(props.children) > 1) {
logErrorOnce('Passing multiple children to the <Pin> component might lead to unexpected results.');
}
var pinViewOptions = _extends({}, props);
var pinElement = new google.maps.marker.PinElement(pinViewOptions);
// Set glyph to glyph container if children are present (rendered via portal).
// If both props.glyph and props.children are present, props.children takes priority.
if (props.children) {
pinElement.glyph = glyphContainer;
}
// Set content of Advanced Marker View to the Pin View element
advancedMarker.content = pinElement.element;
}, [advancedMarker, props]);
return null;
return reactDom.createPortal(props.children, glyphContainer);
};

@@ -1393,0 +1407,0 @@

{
"name": "@vis.gl/react-google-maps",
"version": "0.3.3",
"version": "0.4.0",
"description": "React components and hooks for Google Maps.",

@@ -5,0 +5,0 @@ "source": "src/index.ts",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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