diff --git a/package.json b/package.json index 644250a..1a34ac9 100644 --- a/package.json +++ b/package.json @@ -30,9 +30,8 @@ "lodash.clonedeep": "^4.5.0", "lodash.isequal": "^4.4.0", "lodash.throttle": "^4.1.1", - "mapbox-gl": "^0.33.0", + "mapbox-gl": "^0.34.0", "mapbox-gl-inspect": "^1.2.2", - "mapbox-gl-style-spec": "^8.11.0", "mousetrap": "^1.6.0", "ol-mapbox-style": "1.0.1", "openlayers": "^3.19.1", diff --git a/src/components/App.jsx b/src/components/App.jsx index ba10485..cccd958 100644 --- a/src/components/App.jsx +++ b/src/components/App.jsx @@ -10,9 +10,9 @@ import AppLayout from './AppLayout' import MessagePanel from './MessagePanel' import { downloadGlyphsMetadata, downloadSpriteMetadata } from '../libs/metadata' -import GlSpec from 'mapbox-gl-style-spec/reference/latest.js' -import validateStyleMin from 'mapbox-gl-style-spec/lib/validate_style.min' -import formatStyle from 'mapbox-gl-style-spec/lib/format' +import GlSpec from 'mapbox-gl/src/style-spec/reference/latest' +import validateStyleMin from 'mapbox-gl/src/style-spec/validate_style.min' +import formatStyle from 'mapbox-gl/src/style-spec/format' import style from '../libs/style.js' import { initialStyleUrl, loadStyleUrl } from '../libs/urlopen' import { undoMessages, redoMessages } from '../libs/diffmessage' diff --git a/src/components/filter/FilterEditor.jsx b/src/components/filter/FilterEditor.jsx index fcfe7d8..0c8dbac 100644 --- a/src/components/filter/FilterEditor.jsx +++ b/src/components/filter/FilterEditor.jsx @@ -1,7 +1,7 @@ import React from 'react' import { combiningFilterOps } from '../../libs/filterops.js' -import GlSpec from 'mapbox-gl-style-spec/reference/latest.js' +import GlSpec from 'mapbox-gl/src/style-spec/reference/latest' import DocLabel from '../fields/DocLabel' import SelectInput from '../inputs/SelectInput' import SingleFilterEditor from './SingleFilterEditor' diff --git a/src/components/layers/LayerIdBlock.jsx b/src/components/layers/LayerIdBlock.jsx index 7cdc9d2..7404c0e 100644 --- a/src/components/layers/LayerIdBlock.jsx +++ b/src/components/layers/LayerIdBlock.jsx @@ -1,6 +1,6 @@ import React from 'react' -import GlSpec from 'mapbox-gl-style-spec/reference/latest.js' +import GlSpec from 'mapbox-gl/src/style-spec/reference/latest' import InputBlock from '../inputs/InputBlock' import StringInput from '../inputs/StringInput' diff --git a/src/components/layers/LayerSourceBlock.jsx b/src/components/layers/LayerSourceBlock.jsx index ea60b8a..2b3400f 100644 --- a/src/components/layers/LayerSourceBlock.jsx +++ b/src/components/layers/LayerSourceBlock.jsx @@ -1,6 +1,6 @@ import React from 'react' -import GlSpec from 'mapbox-gl-style-spec/reference/latest.js' +import GlSpec from 'mapbox-gl/src/style-spec/reference/latest' import InputBlock from '../inputs/InputBlock' import StringInput from '../inputs/StringInput' import SelectInput from '../inputs/SelectInput' diff --git a/src/components/layers/LayerSourceLayerBlock.jsx b/src/components/layers/LayerSourceLayerBlock.jsx index 01b05a9..f1b24ea 100644 --- a/src/components/layers/LayerSourceLayerBlock.jsx +++ b/src/components/layers/LayerSourceLayerBlock.jsx @@ -1,6 +1,6 @@ import React from 'react' -import GlSpec from 'mapbox-gl-style-spec/reference/latest.js' +import GlSpec from 'mapbox-gl/src/style-spec/reference/latest' import InputBlock from '../inputs/InputBlock' import StringInput from '../inputs/StringInput' import SelectInput from '../inputs/SelectInput' diff --git a/src/components/layers/LayerTypeBlock.jsx b/src/components/layers/LayerTypeBlock.jsx index 8286900..5817689 100644 --- a/src/components/layers/LayerTypeBlock.jsx +++ b/src/components/layers/LayerTypeBlock.jsx @@ -1,6 +1,6 @@ import React from 'react' -import GlSpec from 'mapbox-gl-style-spec/reference/latest.js' +import GlSpec from 'mapbox-gl/src/style-spec/reference/latest' import InputBlock from '../inputs/InputBlock' import SelectInput from '../inputs/SelectInput' diff --git a/src/components/layers/MaxZoomBlock.jsx b/src/components/layers/MaxZoomBlock.jsx index ecf2646..16ebb9f 100644 --- a/src/components/layers/MaxZoomBlock.jsx +++ b/src/components/layers/MaxZoomBlock.jsx @@ -1,6 +1,6 @@ import React from 'react' -import GlSpec from 'mapbox-gl-style-spec/reference/latest.js' +import GlSpec from 'mapbox-gl/src/style-spec/reference/latest' import InputBlock from '../inputs/InputBlock' import NumberInput from '../inputs/NumberInput' diff --git a/src/components/layers/MinZoomBlock.jsx b/src/components/layers/MinZoomBlock.jsx index 9585d67..aa2323c 100644 --- a/src/components/layers/MinZoomBlock.jsx +++ b/src/components/layers/MinZoomBlock.jsx @@ -1,6 +1,6 @@ import React from 'react' -import GlSpec from 'mapbox-gl-style-spec/reference/latest.js' +import GlSpec from 'mapbox-gl/src/style-spec/reference/latest' import InputBlock from '../inputs/InputBlock' import NumberInput from '../inputs/NumberInput' diff --git a/src/components/map/MapboxGlMap.jsx b/src/components/map/MapboxGlMap.jsx index 729585e..2cdb6d0 100644 --- a/src/components/map/MapboxGlMap.jsx +++ b/src/components/map/MapboxGlMap.jsx @@ -4,7 +4,7 @@ import MapboxGl from 'mapbox-gl/dist/mapbox-gl.js' import MapboxInspect from 'mapbox-gl-inspect' import FeatureLayerPopup from './FeatureLayerPopup' import FeaturePropertyPopup from './FeaturePropertyPopup' -import validateColor from 'mapbox-gl-style-spec/lib/validate/validate_color' +import validateColor from 'mapbox-gl/src/style-spec/validate/validate_color' import style from '../../libs/style.js' import tokens from '../../config/tokens.json' import colors from 'mapbox-gl-inspect/lib/colors' diff --git a/src/components/modals/ExportModal.jsx b/src/components/modals/ExportModal.jsx index 0a06571..4a33023 100644 --- a/src/components/modals/ExportModal.jsx +++ b/src/components/modals/ExportModal.jsx @@ -1,7 +1,7 @@ import React from 'react' import { saveAs } from 'file-saver' -import GlSpec from 'mapbox-gl-style-spec/reference/latest.js' +import GlSpec from 'mapbox-gl/src/style-spec/reference/latest' import InputBlock from '../inputs/InputBlock' import StringInput from '../inputs/StringInput' import SelectInput from '../inputs/SelectInput' @@ -10,7 +10,7 @@ import Button from '../Button' import Modal from './Modal' import MdFileDownload from 'react-icons/lib/md/file-download' import style from '../../libs/style.js' -import formatStyle from 'mapbox-gl-style-spec/lib/format' +import formatStyle from 'mapbox-gl/src/style-spec/format' import GitHub from 'github-api' diff --git a/src/components/modals/SettingsModal.jsx b/src/components/modals/SettingsModal.jsx index 66967c2..f3de03b 100644 --- a/src/components/modals/SettingsModal.jsx +++ b/src/components/modals/SettingsModal.jsx @@ -1,6 +1,6 @@ import React from 'react' -import GlSpec from 'mapbox-gl-style-spec/reference/latest.js' +import GlSpec from 'mapbox-gl/src/style-spec/reference/latest' import InputBlock from '../inputs/InputBlock' import StringInput from '../inputs/StringInput' import SelectInput from '../inputs/SelectInput' diff --git a/src/components/modals/SourcesModal.jsx b/src/components/modals/SourcesModal.jsx index ba4d841..0e5058a 100644 --- a/src/components/modals/SourcesModal.jsx +++ b/src/components/modals/SourcesModal.jsx @@ -1,5 +1,5 @@ import React from 'react' -import GlSpec from 'mapbox-gl-style-spec/reference/latest.js' +import GlSpec from 'mapbox-gl/src/style-spec/reference/latest' import Modal from './Modal' import Button from '../Button' import InputBlock from '../inputs/InputBlock' diff --git a/src/components/sources/SourceTypeEditor.jsx b/src/components/sources/SourceTypeEditor.jsx index 344e882..fc37e3e 100644 --- a/src/components/sources/SourceTypeEditor.jsx +++ b/src/components/sources/SourceTypeEditor.jsx @@ -1,5 +1,5 @@ import React from 'react' -import GlSpec from 'mapbox-gl-style-spec/reference/latest.js' +import GlSpec from 'mapbox-gl/src/style-spec/reference/latest' import InputBlock from '../inputs/InputBlock' import StringInput from '../inputs/StringInput' import NumberInput from '../inputs/NumberInput' diff --git a/src/libs/diffmessage.js b/src/libs/diffmessage.js index 502c59e..80b2688 100644 --- a/src/libs/diffmessage.js +++ b/src/libs/diffmessage.js @@ -1,4 +1,4 @@ -import diffStyles from 'mapbox-gl-style-spec/lib/diff' +import diffStyles from 'mapbox-gl/src/style-spec/diff' export function diffMessages(beforeStyle, afterStyle) { const changes = diffStyles(beforeStyle, afterStyle) diff --git a/src/libs/filterops.js b/src/libs/filterops.js index 65984fd..da77be8 100644 --- a/src/libs/filterops.js +++ b/src/libs/filterops.js @@ -1,4 +1,4 @@ -import GlSpec from 'mapbox-gl-style-spec/reference/latest.js' +import GlSpec from 'mapbox-gl/src/style-spec/reference/latest' export const combiningFilterOps = ['all', 'any', 'none'] export const setFilterOps = ['in', '!in'] export const otherFilterOps = Object diff --git a/src/libs/layer.js b/src/libs/layer.js index f018c46..f6418c5 100644 --- a/src/libs/layer.js +++ b/src/libs/layer.js @@ -1,4 +1,4 @@ -import GlSpec from 'mapbox-gl-style-spec/reference/latest.js' +import GlSpec from 'mapbox-gl/src/style-spec/reference/latest' export function changeType(layer, newType) { const changedPaintProps = { ...layer.paint } diff --git a/src/libs/style.js b/src/libs/style.js index 3f012d2..0fd0c1f 100644 --- a/src/libs/style.js +++ b/src/libs/style.js @@ -1,6 +1,6 @@ import React from 'react'; -import spec from 'mapbox-gl-style-spec/reference/latest.min.js' -import derefLayers from 'mapbox-gl-style-spec/lib/deref' +import spec from 'mapbox-gl/src/style-spec/reference/latest' +import derefLayers from 'mapbox-gl/src/style-spec/deref' import tokens from '../config/tokens.json' // Empty style is always used if no style could be restored or fetched diff --git a/webpack.production.config.js b/webpack.production.config.js index 185fb9a..0ad9410 100644 --- a/webpack.production.config.js +++ b/webpack.production.config.js @@ -12,8 +12,6 @@ module.exports = { vendor: [ 'file-saver', 'mapbox-gl/dist/mapbox-gl.js', - //TODO: Build failure because cannot resolve migrations file - //"mapbox-gl-style-spec", "lodash.clonedeep", "lodash.throttle", 'color',