@react-google-maps/api
Advanced tools
Comparing version 2.2.0 to 2.3.0
{ | ||
"name": "@react-google-maps/api", | ||
"sideEffects": false, | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"description": "React.js Google Maps API integration", | ||
@@ -16,3 +16,4 @@ "license": "MIT", | ||
"Ivan Konev <ivankonev@gmail.com> (https://github.com/ivankonev)", | ||
"Daniel K. <klenicak@gmail.com> (https://github.com/fredyc)" | ||
"Daniel K. <klenicak@gmail.com> (https://github.com/fredyc)", | ||
"Kevin Brown <kevin.brown@exogee.com> (https://github.com/thekevinbrown)" | ||
], | ||
@@ -31,6 +32,6 @@ "repository": { | ||
}, | ||
"main": "dist/index.js", | ||
"main": "dist/cjs.js", | ||
"types": "dist/index.d.ts", | ||
"unpkg": "dist/reactgooglemapsapi.umd.production.min.js", | ||
"module": "dist/reactgooglemapsapi.esm.js", | ||
"unpkg": "dist/umd.min.js", | ||
"module": "dist/esm.js", | ||
"files": [ | ||
@@ -76,3 +77,3 @@ "src/", | ||
"prebuild": "rimraf dist", | ||
"build": "npx tsdx build --name reactGoogleMapsApi --format=cjs,esm,umd", | ||
"build": "rollup --config", | ||
"clean": "rimraf ./package-lock.json ./yarn.lock ./node_modules/ && yarn", | ||
@@ -98,6 +99,7 @@ "update": "yarn-check -u", | ||
"dependencies": { | ||
"@googlemaps/js-api-loader": "1.11.4", | ||
"@react-google-maps/infobox": "2.2.0", | ||
"@react-google-maps/marker-clusterer": "2.2.0", | ||
"invariant": "2.2.4" | ||
"@googlemaps/js-api-loader": "1.12.3", | ||
"@react-google-maps/infobox": "2.3.0", | ||
"@react-google-maps/marker-clusterer": "2.3.0", | ||
"invariant": "2.2.4", | ||
"webpack": "^5.53.0" | ||
}, | ||
@@ -109,31 +111,33 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@testing-library/react": "11.2.7", | ||
"@rollup/plugin-commonjs": "20.0.0", | ||
"@rollup/plugin-node-resolve": "13.0.4", | ||
"@testing-library/react": "12.1.0", | ||
"@types/googlemaps": "3.43.3", | ||
"@types/invariant": "2.2.34", | ||
"@types/jest": "26.0.23", | ||
"@types/react": "17.0.6", | ||
"@types/react-dom": "17.0.5", | ||
"@types/invariant": "2.2.35", | ||
"@types/jest": "27.0.1", | ||
"@types/react": "17.0.22", | ||
"@types/react-dom": "17.0.9", | ||
"@types/webpack": "5.28.0", | ||
"@typescript-eslint/eslint-plugin": "4.24.0", | ||
"@typescript-eslint/parser": "4.24.0", | ||
"acorn": "8.2.4", | ||
"acorn-jsx": "5.3.1", | ||
"@typescript-eslint/eslint-plugin": "4.31.1", | ||
"@typescript-eslint/parser": "4.31.1", | ||
"acorn": "8.5.0", | ||
"acorn-jsx": "5.3.2", | ||
"awesome-typescript-loader": "5.2.1", | ||
"eslint": "7.26.0", | ||
"eslint-config-standard": "16.0.2", | ||
"eslint": "7.32.0", | ||
"eslint-config-standard": "16.0.3", | ||
"eslint-config-standard-react": "11.0.1", | ||
"eslint-import-resolver-typescript": "2.4.0", | ||
"eslint-import-resolver-typescript": "2.5.0", | ||
"eslint-plugin-ascii": "1.0.0", | ||
"eslint-plugin-babel": "5.3.1", | ||
"eslint-plugin-compat": "3.9.0", | ||
"eslint-plugin-compat": "3.13.0", | ||
"eslint-plugin-filenames": "1.3.2", | ||
"eslint-plugin-html": "6.1.2", | ||
"eslint-plugin-import": "2.23.2", | ||
"eslint-plugin-json": "3.0.0", | ||
"eslint-plugin-import": "2.24.2", | ||
"eslint-plugin-json": "3.1.0", | ||
"eslint-plugin-jsx-a11y": "6.4.1", | ||
"eslint-plugin-no-inferred-method-name": "2.0.0", | ||
"eslint-plugin-node": "11.1.0", | ||
"eslint-plugin-optimize-regex": "1.2.0", | ||
"eslint-plugin-optimize-regex": "1.2.1", | ||
"eslint-plugin-promise": "5.1.0", | ||
"eslint-plugin-react": "7.23.2", | ||
"eslint-plugin-react": "7.25.3", | ||
"eslint-plugin-react-functional-set-state": "1.2.1", | ||
@@ -145,16 +149,17 @@ "eslint-plugin-react-hooks": "4.2.0", | ||
"eslint-plugin-you-dont-need-lodash-underscore": "6.12.0", | ||
"jest": "26.6.3", | ||
"jest-cli": "26.6.3", | ||
"jest": "27.2.0", | ||
"jest-cli": "27.2.0", | ||
"react": "17.0.2", | ||
"react-docgen": "5.4.0", | ||
"react-docgen-typescript": "1.22.0", | ||
"react-docgen-typescript": "2.1.0", | ||
"react-dom": "17.0.2", | ||
"react-styleguidist": "11.1.6", | ||
"react-styleguidist": "11.1.7", | ||
"rimraf": "3.0.2", | ||
"ts-jest": "26.5.6", | ||
"tsdx": "0.14.1", | ||
"typescript": "4.2.4", | ||
"webpack": "5.37.1" | ||
"rollup": "2.56.3", | ||
"rollup-plugin-terser": "7.0.2", | ||
"rollup-plugin-ts": "1.4.2", | ||
"ts-jest": "27.0.5", | ||
"typescript": "4.4.3" | ||
}, | ||
"gitHead": "80167ddcc3d8e356dbf0b0c3a6292c6a3a989f83" | ||
} |
@@ -44,2 +44,6 @@ # Marker example | ||
```jsx | ||
const { GoogleMap, LoadScript } = require("../../"); | ||
const ScriptLoaded = require("../../docs/ScriptLoaded").default; | ||
const mapContainerStyle = { | ||
@@ -96,1 +100,53 @@ height: "400px", | ||
``` | ||
## Custom React Svg Marker Example | ||
```jsx | ||
import * as React from "react"; | ||
import { renderToStaticMarkup } from "react-dom/server"; | ||
const { GoogleMap, LoadScript } = require("../../"); | ||
const ScriptLoaded = require("../../docs/ScriptLoaded").default; | ||
const mapContainerStyle = { | ||
height: "400px", | ||
width: "800px" | ||
} | ||
const centers = [{ | ||
lat: 37.772, | ||
lng: -122.214 | ||
}]; | ||
/* Using a React component is not obligatory, you can use a simple function that returns a svg string | ||
if you don't want to use renderToStaticMarkup and "react-dom/server" */ | ||
const SvgCircleMarker = () => { | ||
/* Your component logic here */ | ||
return ( | ||
<svg viewBox="0 0 102 102"> | ||
<circle cx="51" cy="51" r="50" fill="powderblue" stroke="#333"> | ||
</svg> | ||
); | ||
} | ||
const markerSvgString = encodeURIComponent( | ||
renderToStaticMarkup(<SvgCircleMarker />) | ||
); | ||
const markerDataUri = `data:image/svg+xml,${markerSvgString}`; | ||
/* If you want to optimize your svgs, don't hesitate to use https://github.com/tigt/mini-svg-data-uri */ | ||
<ScriptLoaded> | ||
<GoogleMap | ||
id="react-marker-example" | ||
mapContainerStyle={mapContainerStyle} | ||
zoom={2} | ||
center={centers[0]} | ||
> | ||
<Marker | ||
icon={markerDataUri} | ||
position={centers[0]} | ||
/> | ||
</GoogleMap> | ||
</ScriptLoaded> | ||
``` |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
3115466
20195
6
1
7
50
97
+ Addedwebpack@^5.53.0
+ Added@googlemaps/js-api-loader@1.12.3(transitive)
+ Added@jridgewell/gen-mapping@0.3.5(transitive)
+ Added@jridgewell/resolve-uri@3.1.2(transitive)
+ Added@jridgewell/set-array@1.2.1(transitive)
+ Added@jridgewell/source-map@0.3.6(transitive)
+ Added@jridgewell/sourcemap-codec@1.5.0(transitive)
+ Added@jridgewell/trace-mapping@0.3.25(transitive)
+ Added@react-google-maps/infobox@2.3.0(transitive)
+ Added@react-google-maps/marker-clusterer@2.3.0(transitive)
+ Added@types/estree@1.0.6(transitive)
+ Added@types/json-schema@7.0.15(transitive)
+ Added@types/node@22.7.4(transitive)
+ Added@webassemblyjs/ast@1.12.1(transitive)
+ Added@webassemblyjs/floating-point-hex-parser@1.11.6(transitive)
+ Added@webassemblyjs/helper-api-error@1.11.6(transitive)
+ Added@webassemblyjs/helper-buffer@1.12.1(transitive)
+ Added@webassemblyjs/helper-numbers@1.11.6(transitive)
+ Added@webassemblyjs/helper-wasm-bytecode@1.11.6(transitive)
+ Added@webassemblyjs/helper-wasm-section@1.12.1(transitive)
+ Added@webassemblyjs/ieee754@1.11.6(transitive)
+ Added@webassemblyjs/leb128@1.11.6(transitive)
+ Added@webassemblyjs/utf8@1.11.6(transitive)
+ Added@webassemblyjs/wasm-edit@1.12.1(transitive)
+ Added@webassemblyjs/wasm-gen@1.12.1(transitive)
+ Added@webassemblyjs/wasm-opt@1.12.1(transitive)
+ Added@webassemblyjs/wasm-parser@1.12.1(transitive)
+ Added@webassemblyjs/wast-printer@1.12.1(transitive)
+ Added@xtuc/ieee754@1.2.0(transitive)
+ Added@xtuc/long@4.2.2(transitive)
+ Addedacorn@8.12.1(transitive)
+ Addedacorn-import-attributes@1.9.5(transitive)
+ Addedajv@6.12.6(transitive)
+ Addedajv-keywords@3.5.2(transitive)
+ Addedbrowserslist@4.24.0(transitive)
+ Addedbuffer-from@1.1.2(transitive)
+ Addedcaniuse-lite@1.0.30001664(transitive)
+ Addedchrome-trace-event@1.0.4(transitive)
+ Addedcommander@2.20.3(transitive)
+ Addedelectron-to-chromium@1.5.29(transitive)
+ Addedenhanced-resolve@5.17.1(transitive)
+ Addedes-module-lexer@1.5.4(transitive)
+ Addedescalade@3.2.0(transitive)
+ Addedeslint-scope@5.1.1(transitive)
+ Addedesrecurse@4.3.0(transitive)
+ Addedestraverse@4.3.05.3.0(transitive)
+ Addedevents@3.3.0(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedglob-to-regexp@0.4.1(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedhas-flag@4.0.0(transitive)
+ Addedjest-worker@27.5.1(transitive)
+ Addedjson-parse-even-better-errors@2.3.1(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedloader-runner@4.3.0(transitive)
+ Addedmerge-stream@2.0.0(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedneo-async@2.6.2(transitive)
+ Addednode-releases@2.0.18(transitive)
+ Addedpicocolors@1.1.0(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedrandombytes@2.1.0(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedschema-utils@3.3.0(transitive)
+ Addedserialize-javascript@6.0.2(transitive)
+ Addedsource-map@0.6.1(transitive)
+ Addedsource-map-support@0.5.21(transitive)
+ Addedsupports-color@8.1.1(transitive)
+ Addedtapable@2.2.1(transitive)
+ Addedterser@5.34.1(transitive)
+ Addedterser-webpack-plugin@5.3.10(transitive)
+ Addedundici-types@6.19.8(transitive)
+ Addedupdate-browserslist-db@1.1.1(transitive)
+ Addeduri-js@4.4.1(transitive)
+ Addedwatchpack@2.4.2(transitive)
+ Addedwebpack@5.95.0(transitive)
+ Addedwebpack-sources@3.2.3(transitive)
- Removed@googlemaps/js-api-loader@1.11.4(transitive)
- Removed@react-google-maps/infobox@2.2.0(transitive)
- Removed@react-google-maps/marker-clusterer@2.2.0(transitive)