diff --git a/.storybook/webpack.config.js b/.storybook/webpack.config.js index 5666972b9..2d6b7626c 100644 --- a/.storybook/webpack.config.js +++ b/.storybook/webpack.config.js @@ -11,7 +11,7 @@ var cssMap = webpackPostcssTools.makeVarMap(path.join(paths.globalsSrc, 'index.c module.exports = { module: { - noParse: /node_modules\/mapbox-gl\/dist\/mapbox-gl.js/, + noParse: /node_modules\/@appearhere\/mapbox-gl\/dist\/mapbox-gl.js/, loaders: [ { test: /\.css$/, diff --git a/components/Map/BaseMap.js b/components/Map/BaseMap.js index 302e0d9fb..ba89ba63d 100644 --- a/components/Map/BaseMap.js +++ b/components/Map/BaseMap.js @@ -6,11 +6,10 @@ import mapboxgl from '../../utils/mapboxgl/mapboxgl'; import lngLat from '../../utils/propTypeValidations/lngLat'; import noop from '../../utils/noop'; -import { LONDON } from '../../constants/coordinates'; +import { DEFAULT_CENTER, DEFAULT_ZOOM } from '../../constants/mapbox'; import css from './BaseMap.css'; - export default class BaseMap extends Component { static propTypes = { allowWrap: PropTypes.bool, @@ -29,9 +28,9 @@ export default class BaseMap extends Component { static defaultProps = { allowWrap: true, - center: LONDON, + center: DEFAULT_CENTER, mapboxStyle: mapStyle, - zoom: 11, + zoom: DEFAULT_ZOOM, onClick: noop, onMapLoad: noop, onMoveEnd: noop, diff --git a/components/Map/MarkableMap.js b/components/Map/MarkableMap.js index 23163f05f..d2abed666 100644 --- a/components/Map/MarkableMap.js +++ b/components/Map/MarkableMap.js @@ -9,17 +9,36 @@ import isEqual from 'lodash/fp/isEqual'; import uniqueId from 'lodash/fp/uniqueId'; import cx from 'classnames'; +import lngLat from '../../utils/propTypeValidations/lngLat'; import minLngLatBounds from '../../utils/geoUtils/minLngLatBounds'; import mapboxgl from '../../utils/mapboxgl/mapboxgl'; import MarkerContainer from './MarkerContainer'; import BaseMap from './BaseMap'; +import { + CLUSTER_RADIUS, + CLUSTER_MAX_ZOOM, + MARKER_SOURCE, + MARKER_LAYER, + CLUSTER_LAYER, + MOVE_TO_MARKER_MAX_LAT_OFFSET, +} from '../../constants/mapbox'; + import css from './MarkableMap.css'; export default class MarkableMap extends Component { static propTypes = { - // TODO: shapeOf prop type - markers: PropTypes.array, + markers: PropTypes.arrayOf( + PropTypes.shape({ + id: React.PropTypes.oneOfType([ + PropTypes.string, + PropTypes.number, + ]).isRequired, + lngLat: lngLat.isRequired, + label: PropTypes.string.isRequired, + props: PropTypes.object, + }) + ), MarkerComponent: PropTypes.func.isRequired, autoFit: PropTypes.bool, }; @@ -39,9 +58,9 @@ export default class MarkableMap extends Component { }; componentDidMount() { - const { autoFit } = this.props; + const { autoFit, markers } = this.props; this.updateMapboxMarkerSource(); - if (autoFit) this.fitMarkers(); + if (autoFit) this.fitMarkers(markers); } componentDidUpdate(prevProps) { @@ -63,7 +82,7 @@ export default class MarkableMap extends Component { return !prevMarker || !isEqual(prevMarker.lngLat, marker.lngLat); }); const markerChange = prevMarkers.length !== markers.length || markersMoved; - if (markerChange) this.fitMarkers(); + if (markerChange) this.fitMarkers(markers); } } @@ -76,21 +95,30 @@ export default class MarkableMap extends Component { handleMapLoad = () => { const mapbox = this.getMaboxGL(); - mapbox.addSource('markers', { + mapbox.addSource(MARKER_SOURCE, { type: 'geojson', data: { type: 'FeatureCollection', features: [], }, cluster: true, - clusterRadius: 10, + clusterRadius: CLUSTER_RADIUS, + clusterMaxZoom: CLUSTER_MAX_ZOOM, }); + this.mapboxMarkerSource = mapbox.getSource(MARKER_SOURCE); + mapbox.addLayer({ - id: 'markers', + id: MARKER_LAYER, type: 'symbol', - source: 'markers', - filter: ['!=', 'active', true], + source: MARKER_SOURCE, + filter: [ + 'all', + ['!=', 'active', true], + ['!has', 'point_count'], + ], layout: { + 'icon-allow-overlap': true, + 'text-allow-overlap': true, 'icon-image': 'pin-{labellen}', 'text-field': '{label}', 'text-font': ['Open Sans Semibold', 'Arial Unicode MS Bold'], @@ -103,11 +131,27 @@ export default class MarkableMap extends Component { 'text-color': '#FFFFFF', }, }); - this.mapboxMarkerSource = mapbox.getSource('markers'); + mapbox.addLayer({ + id: CLUSTER_LAYER, + type: 'symbol', + source: MARKER_SOURCE, + filter: ['has', 'point_count'], + layout: { + 'icon-image': 'pin-cluster', + 'text-field': '{point_count}', + 'text-font': ['Open Sans Semibold', 'Arial Unicode MS Bold'], + 'text-size': 14, + }, + paint: { + 'text-color': '#FFFFFF', + }, + }); // When hovering on a marker change the cursor to a pointer mapbox.on('mousemove', (e) => { - const features = mapbox.queryRenderedFeatures(e.point, { layers: ['markers'] }); + const features = mapbox.queryRenderedFeatures(e.point, { + layers: [MARKER_LAYER, CLUSTER_LAYER], + }); mapbox.getCanvas().style.cursor = features.length ? 'pointer' : ''; }); @@ -139,24 +183,33 @@ export default class MarkableMap extends Component { handleMapClick = (e) => { const { originalEvent, point } = e; if (originalEvent.target !== this.getMaboxGL().getCanvas()) return; - const markers = this.getMaboxGL().queryRenderedFeatures(point, { layers: ['markers'] }); + const features = this.getMaboxGL().queryRenderedFeatures(point, { layers: [MARKER_LAYER] }); - if (markers.length) { - const marker = markers[0]; + if (features.length > 0) { + const marker = features[0]; this.moveToMarker(marker); this.setState({ activeMarkerId: marker.properties.id }); } else { + const clusters = this.getMaboxGL().queryRenderedFeatures(point, { + layers: [CLUSTER_LAYER], + }); this.setState({ activeMarkerId: null }); + + if (clusters.length > 0) { + const { markers } = this.props; + const clusterMarkerIds = JSON.parse(clusters[0].properties.markerids); + const clusterMarkers = markers.filter(marker => clusterMarkerIds.indexOf(marker.id) !== -1); + this.fitMarkers(clusterMarkers); + } } }; - fitMarkers = () => { - const { markers } = this.props; + fitMarkers = (markers) => { if (!markers.length) return; this.map.fitBounds( minLngLatBounds(markers.map(marker => marker.lngLat)), - { padding: 20, offset: [0, 20], maxZoom: 16 }, + { padding: { top: 20, bottom: 20, left: 50, right: 50 }, offset: [0, 20], maxZoom: 16 }, ); }; @@ -165,7 +218,7 @@ export default class MarkableMap extends Component { const [markerLng, markerLat] = geometry.coordinates; const zoom = this.getMaboxGL().getZoom(); - const nextLat = markerLat + (80 / Math.pow(2, zoom)); + const nextLat = markerLat + ((MOVE_TO_MARKER_MAX_LAT_OFFSET * 2) / Math.pow(2, zoom)); const nextCenter = new mapboxgl.LngLat(markerLng, nextLat).wrap(); this.map.easeTo({ center: nextCenter }); diff --git a/components/Map/MarkableMap.test.js b/components/Map/MarkableMap.test.js index 25546ce96..14cdce54c 100644 --- a/components/Map/MarkableMap.test.js +++ b/components/Map/MarkableMap.test.js @@ -30,7 +30,7 @@ it('it renders the active marker correctly', () => { { component = c; } } MarkerComponent={ SpaceMarker } - markers={ [{ id: 1, lngLat: [1, 0] }] } + markers={ [{ id: 1, lngLat: [1, 0], label: 'test' }] } />, div ); @@ -54,7 +54,7 @@ it('it autosizes the map correctly', () => { ReactDOM.render( , div @@ -68,8 +68,8 @@ it('it autosizes the map correctly', () => { , @@ -87,8 +87,8 @@ it('it autosizes the map correctly', () => { , @@ -106,7 +106,7 @@ it('unmounts without crashing', () => { ReactDOM.render( , div ); diff --git a/config/webpack.config.dev.js b/config/webpack.config.dev.js index 2e241aef3..f55b3c4da 100644 --- a/config/webpack.config.dev.js +++ b/config/webpack.config.dev.js @@ -90,7 +90,7 @@ module.exports = { moduleTemplates: ['*-loader'] }, module: { - noParse: /node_modules\/mapbox-gl\/dist\/mapbox-gl.js/, + noParse: /node_modules\/@appearhere\/mapbox-gl\/dist\/mapbox-gl.js/, // First, run the linter. // It's important to do this before Babel processes the JS. preLoaders: [ diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js index 68b991759..7d009a962 100644 --- a/config/webpack.config.prod.js +++ b/config/webpack.config.prod.js @@ -83,7 +83,7 @@ module.exports = { moduleTemplates: ['*-loader'] }, module: { - noParse: /node_modules\/mapbox-gl\/dist\/mapbox-gl.js/, + noParse: /node_modules\/@appearhere\/mapbox-gl\/dist\/mapbox-gl.js/, // First, run the linter. // It's important to do this before Babel processes the JS. preLoaders: [ diff --git a/constants/mapbox.js b/constants/mapbox.js new file mode 100644 index 000000000..bae481365 --- /dev/null +++ b/constants/mapbox.js @@ -0,0 +1,19 @@ +import { LONDON } from './coordinates'; + +export const DEFAULT_ZOOM = 11; +export const DEFAULT_CENTER = LONDON; + +export const CLUSTER_RADIUS = 60; +export const CLUSTER_MAX_ZOOM = 13; + +export const MARKER_SOURCE = 'markers'; +export const MARKER_LAYER = 'marker-layer'; +export const CLUSTER_LAYER = 'cluster-layer'; + +/** + * The latitude offset when calculating the next map center, this offset ensures that the active + * marker content is centred vertically + * + * The value is the maximum offset applied when the zoom level is 0 i.e. the furthest possible zoom + */ +export const MOVE_TO_MARKER_MAX_LAT_OFFSET = 40; \ No newline at end of file diff --git a/package.json b/package.json index 720749d94..8d70fdb79 100644 --- a/package.json +++ b/package.json @@ -90,6 +90,7 @@ "whatwg-fetch": "1.0.0" }, "dependencies": { + "@appearhere/mapbox-gl": "^1.1.0", "@appearhere/nuka-carousel": "^2.1.6", "@appearhere/react-input-range": "^1.1.0", "array-from": "^2.1.1", @@ -103,7 +104,6 @@ "key-mirror": "^1.0.1", "lodash": "^4.16.3", "lost": "^7.1.0", - "mapbox-gl": "^0.32.1", "moment": "^2.17.1", "moment-range": "^3.0.2", "object-fit-images": "^2.5.9", diff --git a/utils/mapboxgl/mapboxgl.js b/utils/mapboxgl/mapboxgl.js index 7d543cc03..e7a634fe6 100644 --- a/utils/mapboxgl/mapboxgl.js +++ b/utils/mapboxgl/mapboxgl.js @@ -1,6 +1,6 @@ import { canUseDOM } from 'exenv'; -const mapboxgl = canUseDOM ? require('mapbox-gl/dist/mapbox-gl') : {}; +const mapboxgl = canUseDOM ? require('@appearhere/mapbox-gl/dist/mapbox-gl') : {}; mapboxgl.accessToken = 'pk.eyJ1IjoiYXBwZWFyaGVyZSIsImEiOiJvUlJ0MWxNIn0.8_mzlmxdekKy99luyV4T7w'; diff --git a/yarn.lock b/yarn.lock index 5246cbb1b..8a71b3a2f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,34 @@ # yarn lockfile v1 +"@appearhere/mapbox-gl@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@appearhere/mapbox-gl/-/mapbox-gl-1.1.0.tgz#1e990b04fd11fc8f9a6818f7d70378412e1c8388" + dependencies: + "@mapbox/gl-matrix" "^0.0.1" + "@mapbox/shelf-pack" "^3.0.0" + "@mapbox/unitbezier" "^0.0.0" + "@mapbox/whoots-js" "^3.0.0" + brfs "^1.4.0" + bubleify "^0.7.0" + earcut "^2.0.3" + geojson-rewind "^0.1.0" + geojson-vt "^2.4.0" + grid-index "^1.0.0" + mapbox-gl-supported "^1.2.0" + package-json-versionify "^1.0.2" + pbf "^1.3.2" + point-geometry "^0.0.0" + quickselect "^1.0.0" + supercluster "^2.3.0" + through2 "^2.0.3" + tinyqueue "^1.1.0" + unassertify "^2.0.0" + unflowify "^1.0.0" + vector-tile "^1.3.0" + vt-pbf "^2.0.2" + webworkify "^1.4.0" + "@appearhere/nuka-carousel@^2.1.6": version "2.1.6" resolved "https://registry.yarnpkg.com/@appearhere/nuka-carousel/-/nuka-carousel-2.1.6.tgz#38934fc93b2bf8655e41c25788ac6539b763dba6" @@ -125,10 +153,18 @@ version "0.0.1" resolved "https://registry.yarnpkg.com/@mapbox/gl-matrix/-/gl-matrix-0.0.1.tgz#e5126aab4d64c36b81c7a97d0ae0dddde5773d2b" +"@mapbox/shelf-pack@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@mapbox/shelf-pack/-/shelf-pack-3.0.0.tgz#44e284c8336eeda1e9dbbb1d61954c70e26e5766" + "@mapbox/unitbezier@^0.0.0": version "0.0.0" resolved "https://registry.yarnpkg.com/@mapbox/unitbezier/-/unitbezier-0.0.0.tgz#15651bd553a67b8581fb398810c98ad86a34524e" +"@mapbox/whoots-js@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@mapbox/whoots-js/-/whoots-js-3.0.0.tgz#c1de4293081424da3ac30c23afa850af1019bb54" + "@types/lodash@4.14.36": version "4.14.36" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.36.tgz#a7cfd5709914cf0184388b288b684eb8baae1b76" @@ -147,10 +183,6 @@ Base64@~0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/Base64/-/Base64-0.2.1.tgz#ba3a4230708e186705065e66babdd4c35cf60028" -"JSV@>= 4.0.x": - version "4.0.2" - resolved "https://registry.yarnpkg.com/JSV/-/JSV-4.0.2.tgz#d077f6825571f82132f9dffaed587b4029feff57" - abab@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d" @@ -188,7 +220,7 @@ acorn@^1.0.3: version "1.2.2" resolved "https://registry.yarnpkg.com/acorn/-/acorn-1.2.2.tgz#c8ce27de0acc76d896d2b1fad3df588d9e82f014" -acorn@^3.0.0, acorn@^3.0.4, acorn@^3.1.0: +acorn@^3.0.0, acorn@^3.0.4, acorn@^3.1.0, acorn@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" @@ -252,10 +284,6 @@ ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" -ansi-styles@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-1.0.0.tgz#cb102df1c56f5123eab8b67cd7b98027a0279178" - ansicolors@~0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.2.1.tgz#be089599097b74a5c9c4a84a0cdbcdb62bd87aef" @@ -1172,11 +1200,11 @@ babel-types@^6.18.0, babel-types@^6.22.0: lodash "^4.2.0" to-fast-properties "^1.0.1" -babylon@^6.0.18, babylon@^6.11.0, babylon@^6.9.0: +babylon@^6.0.18, babylon@^6.11.0, babylon@^6.8.1, babylon@^6.9.0: version "6.12.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.12.0.tgz#953e6202e58062f7f5041fc8037e4bd4e17140a9" -babylon@^6.13.0, babylon@^6.15.0, babylon@^6.8.1: +babylon@^6.13.0, babylon@^6.15.0: version "6.15.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.15.0.tgz#ba65cfa1a80e1759b0e89fb562e27dccae70348e" @@ -1297,11 +1325,11 @@ bser@^1.0.2: dependencies: node-int64 "^0.4.0" -buble@^0.12.0: - version "0.12.5" - resolved "https://registry.yarnpkg.com/buble/-/buble-0.12.5.tgz#c66ffe92f9f4a3c65d3256079b711e2bd0bc5013" +buble@^0.15.1: + version "0.15.2" + resolved "https://registry.yarnpkg.com/buble/-/buble-0.15.2.tgz#547fc47483f8e5e8176d82aa5ebccb183b02d613" dependencies: - acorn "^3.1.0" + acorn "^3.3.0" acorn-jsx "^3.0.1" acorn-object-spread "^1.0.0" chalk "^1.1.3" @@ -1309,11 +1337,11 @@ buble@^0.12.0: minimist "^1.2.0" os-homedir "^1.0.1" -bubleify@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/bubleify/-/bubleify-0.5.1.tgz#f65c47cee31b80cad8b9e747bbe187d7fe51e927" +bubleify@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/bubleify/-/bubleify-0.7.0.tgz#d08ea642ffd085ff8711c8843f57072f0d5eb8f6" dependencies: - buble "^0.12.0" + buble "^0.15.1" object-assign "^4.0.1" buffer-equal@0.0.1: @@ -1421,14 +1449,6 @@ chalk@1.1.3, chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.4.0.tgz#5199a3ddcd0c1efe23bc08c1b027b06176e0c64f" - dependencies: - ansi-styles "~1.0.0" - has-color "~0.1.0" - strip-ansi "~0.1.0" - change-case@2.3.x: version "2.3.1" resolved "https://registry.yarnpkg.com/change-case/-/change-case-2.3.1.tgz#2c4fde3f063bb41d00cd68e0d5a09db61cbe894f" @@ -1862,10 +1882,6 @@ css-what@2.1: version "2.1.0" resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.0.tgz#9467d032c38cfaefb9f2d79501253062f87fa1bd" -csscolorparser@^1.0.2, csscolorparser@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/csscolorparser/-/csscolorparser-1.0.3.tgz#b34f391eea4da8f3e98231e2ccd8df9c041f171b" - cssesc@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" @@ -2623,10 +2639,6 @@ fast-levenshtein@~2.0.4: version "2.0.5" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.5.tgz#bd33145744519ab1c36c3ee9f31f08e9079b67f2" -fast-stable-stringify@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/fast-stable-stringify/-/fast-stable-stringify-0.1.1.tgz#ce758dce1cb40fb2bf0c8aef4f93e792d195b491" - fastparse@^1.0.0, fastparse@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8" @@ -2661,10 +2673,6 @@ fbjs@^0.8.1, fbjs@^0.8.4: promise "^7.1.1" ua-parser-js "^0.7.9" -feature-filter@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/feature-filter/-/feature-filter-2.2.0.tgz#3cc356015e968c362afbdf7ff1bb744ddf7fc2e0" - figures@^1.3.5: version "1.7.0" resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" @@ -2992,7 +3000,7 @@ has-ansi@^2.0.0: dependencies: ansi-regex "^2.0.0" -has-color@^0.1.7, has-color@~0.1.0: +has-color@^0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/has-color/-/has-color-0.1.7.tgz#67144a5260c34fc3cca677d041daf52fe7b78b2f" @@ -3847,13 +3855,6 @@ jsonify@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" -jsonlint-lines-primitives@~1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/jsonlint-lines-primitives/-/jsonlint-lines-primitives-1.6.0.tgz#bb89f60c8b9b612fd913ddaa236649b840d86611" - dependencies: - JSV ">= 4.0.x" - nomnom ">= 1.5.x" - jsonpointer@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.0.tgz#6661e161d2fc445f19f98430231343722e1fcbd5" @@ -3976,14 +3977,6 @@ lodash._basefor@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/lodash._basefor/-/lodash._basefor-3.0.3.tgz#7550b4e9218ef09fad24343b612021c79b4c20c2" -lodash._baseisequal@^3.0.0: - version "3.0.7" - resolved "https://registry.yarnpkg.com/lodash._baseisequal/-/lodash._baseisequal-3.0.7.tgz#d8025f76339d29342767dcc887ce5cb95a5b51f1" - dependencies: - lodash.isarray "^3.0.0" - lodash.istypedarray "^3.0.0" - lodash.keys "^3.0.0" - lodash._bindcallback@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" @@ -4080,21 +4073,10 @@ lodash.isarray@^3.0.0: version "3.0.4" resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" -lodash.isequal@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-3.0.4.tgz#1c35eb3b6ef0cd1ff51743e3ea3cf7fdffdacb64" - dependencies: - lodash._baseisequal "^3.0.0" - lodash._bindcallback "^3.0.0" - lodash.isplainobject@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" -lodash.istypedarray@^3.0.0: - version "3.0.6" - resolved "https://registry.yarnpkg.com/lodash.istypedarray/-/lodash.istypedarray-3.0.6.tgz#c9a477498607501d8e8494d283b87c39281cef62" - lodash.keys@^3.0.0, lodash.keys@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" @@ -4201,59 +4183,10 @@ mantra-core@^1.6.1: react-komposer "^1.9.0" react-simple-di "^1.2.0" -mapbox-gl-function@mapbox/mapbox-gl-function#41c6724e2bbd7bd1eb5991451bbf118b7d02b525: - version "1.3.0" - resolved "https://codeload.github.com/mapbox/mapbox-gl-function/tar.gz/41c6724e2bbd7bd1eb5991451bbf118b7d02b525" - -mapbox-gl-style-spec@mapbox/mapbox-gl-style-spec#d11f6d2775bf5b22534b3b2fb3410755b2473cdf: - version "8.11.0" - resolved "https://codeload.github.com/mapbox/mapbox-gl-style-spec/tar.gz/d11f6d2775bf5b22534b3b2fb3410755b2473cdf" - dependencies: - csscolorparser "~1.0.2" - fast-stable-stringify "^0.1.1" - jsonlint-lines-primitives "~1.6.0" - lodash.isequal "^3.0.4" - minimist "0.0.8" - rw "^0.1.4" - sort-object "^0.3.2" - mapbox-gl-supported@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mapbox-gl-supported/-/mapbox-gl-supported-1.2.0.tgz#cbd34df894206cadda9a33c8d9a4609f26bb1989" -mapbox-gl@^0.32.1: - version "0.32.1" - resolved "https://registry.yarnpkg.com/mapbox-gl/-/mapbox-gl-0.32.1.tgz#fb12d33dc97a96ef5d2ad4f0b7827ccc247a8ad2" - dependencies: - "@mapbox/gl-matrix" "^0.0.1" - "@mapbox/unitbezier" "^0.0.0" - brfs "^1.4.0" - bubleify "^0.5.1" - csscolorparser "^1.0.2" - earcut "^2.0.3" - feature-filter "^2.2.0" - geojson-rewind "^0.1.0" - geojson-vt "^2.4.0" - grid-index "^1.0.0" - mapbox-gl-function mapbox/mapbox-gl-function#41c6724e2bbd7bd1eb5991451bbf118b7d02b525 - mapbox-gl-style-spec mapbox/mapbox-gl-style-spec#d11f6d2775bf5b22534b3b2fb3410755b2473cdf - mapbox-gl-supported "^1.2.0" - package-json-versionify "^1.0.2" - pbf "^1.3.2" - pngjs "^2.2.0" - point-geometry "^0.0.0" - quickselect "^1.0.0" - request "^2.39.0" - shelf-pack "^1.0.0" - supercluster "^2.0.1" - tinyqueue "^1.1.0" - unassertify "^2.0.0" - unflowify "^1.0.0" - vector-tile "^1.3.0" - vt-pbf "^2.0.2" - webworkify "^1.4.0" - whoots-js "^2.0.0" - marked-terminal@^1.6.2: version "1.6.2" resolved "https://registry.yarnpkg.com/marked-terminal/-/marked-terminal-1.6.2.tgz#44c128d69b5d9776c848314cdf69d4ec96322973" @@ -4519,13 +4452,6 @@ node-pre-gyp@^0.6.29: tar "~2.2.0" tar-pack "~3.1.0" -"nomnom@>= 1.5.x": - version "1.8.1" - resolved "https://registry.yarnpkg.com/nomnom/-/nomnom-1.8.1.tgz#2151f722472ba79e50a76fc125bb8c8f2e4dc2a7" - dependencies: - chalk "~0.4.0" - underscore "~1.6.0" - nopt@~3.0.1: version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" @@ -4899,10 +4825,6 @@ pluralize@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" -pngjs@^2.2.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-2.3.1.tgz#11d1e12b9cb64d63e30c143a330f4c1f567da85f" - point-geometry@0.0.0, point-geometry@^0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/point-geometry/-/point-geometry-0.0.0.tgz#6fcbcad7a803b6418247dd6e49c2853c584daff7" @@ -5258,7 +5180,7 @@ q@^1.1.2: version "1.4.1" resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" -qs@6.2.0, qs@^6.1.0: +qs@6.2.0, qs@^6.1.0, qs@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.2.0.tgz#3b7848c03c2dece69a9522b0fae8c4126d745f3b" @@ -5266,7 +5188,7 @@ qs@^5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/qs/-/qs-5.2.1.tgz#801fee030e0b9450d6385adc48a4cc55b44aedfc" -qs@^6.2.0, qs@~6.3.0: +qs@~6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442" @@ -5575,7 +5497,7 @@ readable-stream@^1.0.27-1, readable-stream@^1.1.13, readable-stream@~1.1.9: isarray "0.0.1" string_decoder "~0.10.x" -"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.2, readable-stream@^2.1.5, readable-stream@~2.1.4: +"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.1.5, readable-stream@~2.1.4: version "2.1.5" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0" dependencies: @@ -5587,7 +5509,7 @@ readable-stream@^1.0.27-1, readable-stream@^1.1.13, readable-stream@~1.1.9: string_decoder "~0.10.x" util-deprecate "~1.0.1" -readable-stream@^2.0.1, readable-stream@~2.0.0: +readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@~2.0.0: version "2.0.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" dependencies: @@ -5751,7 +5673,7 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" -request@2.x, request@^2.39.0, request@^2.74.0, request@^2.79.0: +request@2.x, request@^2.74.0, request@^2.79.0: version "2.79.0" resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" dependencies: @@ -5809,11 +5731,11 @@ resolve-protobuf-schema@^2.0.0: dependencies: protocol-buffers-schema "^2.0.2" -resolve@1.1.7, resolve@^1.1.5, resolve@^1.1.6: +resolve@1.1.7, resolve@^1.1.6: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" -resolve@^1.2.0: +resolve@^1.1.5, resolve@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.2.0.tgz#9589c3f2f6149d1417a40becc1663db6ec6bc26c" @@ -5846,10 +5768,6 @@ run-async@^0.1.0: dependencies: once "^1.3.0" -rw@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/rw/-/rw-0.1.4.tgz#4903cbd80248ae0ede685bf58fd236a7a9b29a3e" - rx-lite@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" @@ -5972,10 +5890,6 @@ shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" -shelf-pack@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/shelf-pack/-/shelf-pack-1.1.0.tgz#b4679afdd00ad68dfd9bbd2b5a3e819293a74d82" - shelljs@^0.6.0: version "0.6.1" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.6.1.tgz#ec6211bed1920442088fe0f70b2837232ed2c8a8" @@ -6048,27 +5962,12 @@ sockjs@^0.3.15: faye-websocket "^0.10.0" uuid "^2.0.2" -sort-asc@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/sort-asc/-/sort-asc-0.1.0.tgz#ab799df61fc73ea0956c79c4b531ed1e9e7727e9" - -sort-desc@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/sort-desc/-/sort-desc-0.1.1.tgz#198b8c0cdeb095c463341861e3925d4ee359a9ee" - sort-keys@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" dependencies: is-plain-obj "^1.0.0" -sort-object@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/sort-object/-/sort-object-0.3.2.tgz#98e0d199ede40e07c61a84403c61d6c3b290f9e2" - dependencies: - sort-asc "^0.1.0" - sort-desc "^0.1.1" - source-list-map@^0.1.4, source-list-map@~0.1.0: version "0.1.6" resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-0.1.6.tgz#e1e6f94f0b40c4d28dcf8f5b8766e0e45636877f" @@ -6239,10 +6138,6 @@ strip-ansi@3.0.1, strip-ansi@^3.0.0, strip-ansi@^3.0.1: dependencies: ansi-regex "^2.0.0" -strip-ansi@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-0.1.1.tgz#39e8a98d044d150660abe4a6808acf70bb7bc991" - strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" @@ -6271,7 +6166,7 @@ subscribe-ui-event, subscribe-ui-event@^1.0.0: lodash "^4.0.0" raf "^3.0.0" -supercluster@^2.0.1: +supercluster@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/supercluster/-/supercluster-2.3.0.tgz#87ab56081bbea9a1d724df5351ee9e8c3af2f48b" dependencies: @@ -6384,7 +6279,7 @@ throat@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/throat/-/throat-3.0.0.tgz#e7c64c867cbb3845f10877642f7b60055b8ec0d6" -through2@^2.0.0: +through2@^2.0.0, through2@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" dependencies: @@ -6413,8 +6308,8 @@ tinycolor2@^1.1.2: resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.1.tgz#f4fad333447bc0b07d4dc8e9209d8f39a8ac77e8" tinyqueue@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/tinyqueue/-/tinyqueue-1.1.0.tgz#9c5f76f54a845f4914e754f5aa8d73ef6c011f7b" + version "1.2.2" + resolved "https://registry.yarnpkg.com/tinyqueue/-/tinyqueue-1.2.2.tgz#947229e5e4197aba988acd27751dcc582e6728ff" title-case@^1.1.0: version "1.1.2" @@ -6541,10 +6436,6 @@ unassertify@^2.0.0: through "^2.3.7" unassert "^1.3.1" -underscore@~1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.6.0.tgz#8b38b10cacdef63337b8b24e4ff86d45aea529a8" - unflowify@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/unflowify/-/unflowify-1.0.1.tgz#a2ea0d25c0affcc46955e6473575f7c5a1f4a696" @@ -6858,10 +6749,6 @@ which@^1.0.5, which@^1.1.1, which@^1.2.9: dependencies: isexe "^1.1.1" -whoots-js@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/whoots-js/-/whoots-js-2.1.0.tgz#bcb201c34e0eaf335fcce5ae2cf874579a99c487" - wide-align@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.0.tgz#40edde802a71fea1f070da3e62dcda2e7add96ad"