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

react-simple-maps

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-simple-maps - npm Package Compare versions

Comparing version 0.12.1 to 1.0.0-alpha.0

dist/index.es.js

67

package.json
{
"name": "react-simple-maps",
"version": "0.12.1",
"description": "An svg map component built with and for React",
"main": "lib/index.js",
"version": "1.0.0-alpha.0",
"description": "An svg map chart component built with and for React",
"main": "dist/index.js",
"module": "dist/index.es.js",
"browser": "dist/index.umd.js",
"files": [
"dist"
],
"scripts": {
"build": "babel src --out-dir lib",
"watch": "babel --watch src --out-dir lib",
"prepare": "npm run build",
"build": "rollup -c",
"watch": "rollup -cw",
"prepare": "rollup -c",
"test": "mocha './tests/**/*.spec.js' --compilers js:babel-core/register"
},
"babel": {
"presets": [
"env",
"react"
],
"plugins": [
"transform-object-rest-spread"
]
},
"repository": {

@@ -28,5 +24,6 @@ "type": "git",

"maps",
"charts",
"worldmap",
"geo",
"d3"
"usa",
"d3-geo"
],

@@ -40,21 +37,29 @@ "author": "Richard Zimerman <richard@zcreativelabs.com> (https://github.com/zimrick)",

"devDependencies": {
"babel-cli": "6.24.0",
"babel-plugin-transform-object-rest-spread": "6.26.0",
"babel-preset-env": "1.6.1",
"babel-preset-react": "6.23.0",
"expect": "1.20.2",
"mocha": "3.4.1",
"react": "15.4.2",
"react-dom": "15.4.2",
"react-test-utils": "0.0.1"
"babel-core": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babel-plugin-external-helpers": "^6.22.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-react-jsx": "^6.24.1",
"babelrc-rollup": "^3.0.0",
"rollup": "^1.17.0",
"rollup-plugin-babel": "^3.0.3",
"rollup-plugin-commonjs": "^10.0.1",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-terser": "^5.1.1",
"expect": "^23.5.0",
"mocha": "^5.2.0",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"prop-types": "^15.7.2",
"react-test-utils": "^0.0.1"
},
"peerDependencies": {
"react": "^0.14.9 || ^15.3.0 || ^16.0.0-rc || ^16.0",
"react-dom": "^0.14.9 || ^15.3.0 || ^16.0.0-rc || ^16.0"
"react": "^16.8.0",
"react-dom": "^16.8.0",
"prop-types": "^15.7.2"
},
"dependencies": {
"d3-geo": "1.6.3",
"d3-geo-projection": "1.2.2",
"topojson-client": "2.1.0"
"d3-geo": "^1.11.6",
"topojson-client": "^3.0.0"
}
}

@@ -126,3 +126,3 @@ # react-simple-maps

`<ComponentMap />` forms the wrapper around your map. It defines the dimensions of the map and sets the projection used by Geographies, Markers, and Annotations, to position elements. By default the maps use the "times" projection, but `react-simple-maps` also supports `robinson`, `eckert4`, `winkel3`, `mercator`, and `miller` projections out of the box. Additionally you can plug in a custom projection of your choice. All projections from `d3-geo-projections` are supported.
`<ComposableMap />` forms the wrapper around your map. It defines the dimensions of the map and sets the projection used by Geographies, Markers, and Annotations, to position elements. By default the maps use the "times" projection, but `react-simple-maps` also supports `robinson`, `eckert4`, `winkel3`, `mercator`, and `miller` projections out of the box. Additionally you can plug in a custom projection of your choice. All projections from `d3-geo-projections` are supported.

@@ -134,3 +134,3 @@ ##### Props

| width | Number | 800 |
| height | Array | 450 |
| height | Number | 450 |
| projection | String/Function | "times" |

@@ -298,3 +298,3 @@ | projectionConfig | Object | *see examples below |

2. A second way in which react-simple-maps can optimise maps is by setting a `cacheId` on the individual geographies. See the [`<Geography />`](#ComposableMap-component) component for more info. The unique cacheIds help to cache the paths and significantly accelerate rerenders. **This second method is the recommended way of optimising maps with react-simple-maps.**
2. A second way in which react-simple-maps can optimise maps is by setting a `cacheId` on the individual geographies. See the [`<Geography />`](#Geography-component) component for more info. The unique cacheIds help to cache the paths and significantly accelerate rerenders. **This second method is the recommended way of optimising maps with react-simple-maps.**

@@ -716,5 +716,5 @@ If you do not want `react-simple-maps` to load your topojson and pass it down automatically, you can also pass your topojson converted `features` directly into the `Geographies` component, or an object containing the topojson data.

style={{
default: { fill: "#666" },
hover: { fill: "#999" },
pressed: { fill: "#000" },
default: { stroke: "#666" },
hover: { stroke: "#999" },
pressed: { stroke: "#000" },
}}

@@ -721,0 +721,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