react-simple-maps
Advanced tools
Comparing version 0.12.1 to 1.0.0-alpha.0
{ | ||
"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 @@ /> |
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
Network access
Supply chain riskThis module accesses the network.
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
99390
17
6
1600
2
4
+ Addedd3-geo@1.12.1(transitive)
+ Addedtopojson-client@3.1.0(transitive)
- Removedd3-geo-projection@1.2.2
- Removedd3-geo@1.6.3(transitive)
- Removedd3-geo-projection@1.2.2(transitive)
- Removedtopojson-client@2.1.0(transitive)
Updatedd3-geo@^1.11.6
Updatedtopojson-client@^3.0.0