diff options
-rw-r--r-- | README.md | 19 | ||||
-rw-r--r-- | generate-elm.js | 11 | ||||
-rw-r--r-- | package-lock.json | 393 | ||||
-rw-r--r-- | package.json | 5 | ||||
-rw-r--r-- | src/Mapbox/Element.elm | 4 | ||||
-rw-r--r-- | src/Mapbox/Expression.elm | 25 | ||||
-rw-r--r-- | src/Mapbox/Layer.elm | 24 | ||||
-rw-r--r-- | src/Mapbox/Source.elm | 8 | ||||
-rw-r--r-- | src/js/main.js | 2 |
9 files changed, 278 insertions, 213 deletions
@@ -22,6 +22,21 @@ install the accompanying npm library: npm install --save elm-mapbox +Then include the library into your page. If you don't have any JS build system setup, +probably the easiest is to add: + +```html +<script src="node_modules/elm-mapbox/dist/elm-mapbox.umd.js"></script> +``` + +If you are running a module bundler, you should be able to + +```javascript +import elmMapbox from "elm-mapbox"; +``` + +instead. + Then, when you are instantiating your Elm application, change it from: ```javascript @@ -31,8 +46,6 @@ var app = Elm.MyApp.init(); to ```javascript -import elmMapbox from "elm-mapbox"; - elmMapbox.registerCustomElement(); var app = Elm.MyApp.init(); elmMapbox.registerPorts(app); @@ -52,7 +65,7 @@ var app = Elm.MyApp.init(); elmMapbox.registerPorts(app); ``` -Next, optionally, setup a ports module. The best way to do this is to to copy [this file](examples/MapCommands.elm) into your project. +Next, optionally, setup a ports module. The best way to do this is to to copy [this file](https://github.com/gampleman/elm-mapbox/blob/master/examples/MapCommands.elm) into your project. This will allow you to easily use the commands to control parts of your map interactions imperatively. diff --git a/generate-elm.js b/generate-elm.js index 7207f4e..b910fec 100644 --- a/generate-elm.js +++ b/generate-elm.js @@ -79,7 +79,7 @@ ${Object.entries(docs) import Array exposing (Array) import Json.Encode as Encode exposing (Value) -import Mapbox.Expression as Expression exposing (Anchor, Auto, CameraExpression, Color, DataExpression, Expression, LineCap, LineJoin, Position, RasterResampling, SymbolPlacement, TextFit, TextJustify, TextTransform, FormattedText) +import Mapbox.Expression as Expression exposing (Anchor, Auto, CameraExpression, Color, DataExpression, Expression, LineCap, LineJoin, Position, RasterResampling, SymbolPlacement, TextFit, TextJustify, TextTransform, FormattedText, SymbolZOrder) {-| Represents a layer. -} type Layer @@ -333,7 +333,8 @@ const enumMap = { "bevel | round | miter": "LineJoin", "point | line | line-center": "SymbolPlacement", "none | uppercase | lowercase": "TextTransform", - "linear | nearest": "RasterResampling" + "linear | nearest": "RasterResampling", + "viewport-y | source" : "SymbolZOrder" }; const flatEnumMap = Object.assign(Object.entries(enumMap).reduce((res, [values, tipe]) => values.split(' | ').reduce((obj, value) => Object.assign({}, obj, {[value]: tipe}), res), {}), { @@ -408,9 +409,11 @@ function titleCase(str) { } function camelCase(str, type) { - if (type && reverseEnumMap[type]) { + if (type && type === 'SymbolZOrder') { + str = 'order ' + str; + } else if (type && reverseEnumMap[type]) { str = type + ' ' + str; - } else if (flatEnumMap[str]) { + } else if (flatEnumMap[str] && str !== 'source') { str = flatEnumMap[str] + ' ' + str; } else if (str === "rgba(0, 0, 0, 0)") { return "rgba 0 0 0 0" diff --git a/package-lock.json b/package-lock.json index 2ceaa05..86ea5f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "elm-mapbox", - "version": "1.0.0-rc1", + "version": "1.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -32,11 +32,6 @@ "resolved": "https://registry.npmjs.org/@mapbox/point-geometry/-/point-geometry-0.1.0.tgz", "integrity": "sha1-ioP5M1x4YO/6Lu7KJUMyqgru2PI=" }, - "@mapbox/shelf-pack": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@mapbox/shelf-pack/-/shelf-pack-3.2.0.tgz", - "integrity": "sha512-dyQxe6ukILV6qaEvxoKCIwhblgRjYp1ZGlClo4xvfbmxzFO5LYu7Tnrg2AZrRgN7VsSragsGcNjzUe9kCdKHYQ==" - }, "@mapbox/tiny-sdf": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@mapbox/tiny-sdf/-/tiny-sdf-1.1.0.tgz", @@ -52,7 +47,7 @@ "resolved": "https://registry.npmjs.org/@mapbox/vector-tile/-/vector-tile-1.3.1.tgz", "integrity": "sha512-MCEddb8u44/xfQ3oD+Srl/tNcQoqTw3goGk2oLsrFxOTc3dUp+kAnby3PvAeeBYSMSjSPD1nd1AJA6W49WnoUw==", "requires": { - "@mapbox/point-geometry": "0.1.0" + "@mapbox/point-geometry": "~0.1.0" } }, "@mapbox/whoots-js": { @@ -83,7 +78,7 @@ "integrity": "sha512-zVWV8Z8lislJoOKKqdNMOB+s6+XV5WERty8MnKBeFgwA+19XJjJHs2RP5dzM57FftIs+jQnRToLiWazKr6sSWg==", "dev": true, "requires": { - "acorn": "5.7.1" + "acorn": "^5.0.0" } }, "acorn-jsx": { @@ -92,7 +87,7 @@ "integrity": "sha512-JY+iV6r+cO21KtntVvFkD+iqjtdpRUpGqKWgfkCdZq1R+kbreEl8EcdcJR4SmiIgsIQT33s6QzheQ9a275Q8xw==", "dev": true, "requires": { - "acorn": "5.7.1" + "acorn": "^5.0.3" } }, "ansi-styles": { @@ -101,7 +96,7 @@ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "1.9.2" + "color-convert": "^1.9.0" } }, "ansicolors": { @@ -115,7 +110,7 @@ "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", "dev": true, "requires": { - "arr-flatten": "1.1.0" + "arr-flatten": "^1.0.1" } }, "arr-flatten": { @@ -136,9 +131,9 @@ "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", "dev": true, "requires": { - "expand-range": "1.8.2", - "preserve": "0.2.0", - "repeat-element": "1.1.2" + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" } }, "brfs": { @@ -146,10 +141,10 @@ "resolved": "https://registry.npmjs.org/brfs/-/brfs-1.6.1.tgz", "integrity": "sha512-OfZpABRQQf+Xsmju8XE9bDjs+uU4vLREGolP7bDgcpsI17QREyZ4Bl+2KLxxx1kCgA0fAIhKQBaBYh+PEcCqYQ==", "requires": { - "quote-stream": "1.0.2", - "resolve": "1.8.1", - "static-module": "2.2.5", - "through2": "2.0.3" + "quote-stream": "^1.0.1", + "resolve": "^1.1.5", + "static-module": "^2.2.0", + "through2": "^2.0.0" } }, "buble": { @@ -158,14 +153,14 @@ "integrity": "sha512-3B0Lcy2u6x6km0BqTz/FS3UnrOJlnIlBWsyjvtqzdtmWkqiS0+Sg4hc6L9Mmm63hZKTACpYS9vUeIoKSi1vcrQ==", "dev": true, "requires": { - "acorn": "5.7.1", - "acorn-dynamic-import": "3.0.0", - "acorn-jsx": "4.1.1", - "chalk": "2.4.1", - "magic-string": "0.22.5", - "minimist": "1.2.0", - "os-homedir": "1.0.2", - "vlq": "1.0.0" + "acorn": "^5.4.1", + "acorn-dynamic-import": "^3.0.0", + "acorn-jsx": "^4.1.1", + "chalk": "^2.3.1", + "magic-string": "^0.22.4", + "minimist": "^1.2.0", + "os-homedir": "^1.0.1", + "vlq": "^1.0.0" } }, "buffer-equal": { @@ -189,8 +184,8 @@ "resolved": "https://registry.npmjs.org/cardinal/-/cardinal-0.4.4.tgz", "integrity": "sha1-ylu2iltRG5D+k7ms6km97lwyv+I=", "requires": { - "ansicolors": "0.2.1", - "redeyed": "0.4.4" + "ansicolors": "~0.2.1", + "redeyed": "~0.4.0" } }, "chalk": { @@ -199,9 +194,9 @@ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "dev": true, "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.4.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, "color-convert": { @@ -224,16 +219,19 @@ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "requires": { - "buffer-from": "1.1.1", - "inherits": "2.0.3", - "readable-stream": "2.3.6", - "typedarray": "0.0.6" + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" } }, "convert-source-map": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", - "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=" + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", + "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "requires": { + "safe-buffer": "~5.1.1" + } }, "core-util-is": { "version": "1.0.2", @@ -255,7 +253,7 @@ "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", "requires": { - "readable-stream": "2.3.6" + "readable-stream": "^2.0.2" } }, "earcut": { @@ -274,11 +272,11 @@ "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.1.tgz", "integrity": "sha512-6hTjO1NAWkHnDk3OqQ4YrCuwwmGHL9S3nPlzBOUG/R44rda3wLNrfvQ5fkSGjyhHFKM7ALPKcKGrwvCLe0lC7Q==", "requires": { - "esprima": "3.1.3", - "estraverse": "4.2.0", - "esutils": "2.0.2", - "optionator": "0.8.2", - "source-map": "0.6.1" + "esprima": "^3.1.3", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" } }, "esprima": { @@ -308,7 +306,7 @@ "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", "dev": true, "requires": { - "is-posix-bracket": "0.1.1" + "is-posix-bracket": "^0.1.0" } }, "expand-range": { @@ -317,7 +315,7 @@ "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", "dev": true, "requires": { - "fill-range": "2.2.4" + "fill-range": "^2.1.0" } }, "expect.js": { @@ -331,7 +329,7 @@ "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "falafel": { @@ -339,10 +337,10 @@ "resolved": "https://registry.npmjs.org/falafel/-/falafel-2.1.0.tgz", "integrity": "sha1-lrsXdh2rqU9G0AFzizzt86Z/4Gw=", "requires": { - "acorn": "5.7.1", - "foreach": "2.0.5", + "acorn": "^5.0.0", + "foreach": "^2.0.5", "isarray": "0.0.1", - "object-keys": "1.0.12" + "object-keys": "^1.0.6" }, "dependencies": { "isarray": { @@ -369,11 +367,11 @@ "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", "dev": true, "requires": { - "is-number": "2.1.0", - "isobject": "2.1.0", - "randomatic": "3.0.0", - "repeat-element": "1.1.2", - "repeat-string": "1.6.1" + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" } }, "for-in": { @@ -388,7 +386,7 @@ "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", "dev": true, "requires": { - "for-in": "1.0.2" + "for-in": "^1.0.1" } }, "foreach": { @@ -407,9 +405,9 @@ "integrity": "sha1-IiQHl8hHzC8MHTE+SqDJFa+n8p0=", "requires": { "@mapbox/geojson-area": "0.2.2", - "concat-stream": "1.6.2", + "concat-stream": "~1.6.0", "minimist": "1.2.0", - "sharkdown": "0.1.0" + "sharkdown": "^0.1.0" } }, "geojson-vt": { @@ -418,9 +416,9 @@ "integrity": "sha512-qk7sEv7dMfuGzflwClsgtO1fWPut/TqCInWEEUJc/Ofn4tmqBGznnPv3eUdxtwMkulMaAwSL3osHiyN03XJd/w==" }, "gl-matrix": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-2.7.1.tgz", - "integrity": "sha512-22I6q7aO2oKNahNV0+9JavVNUhQXRTvR5jP2s8U1l93TkjcQe8RK6MeMYpM7+66R0sCVUgSdO97BL439vePyzQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-2.8.1.tgz", + "integrity": "sha512-0YCjVpE3pS5XWlN3J4X7AiAx65+nqAI54LndtVFnQZB6G/FVLkZH8y8V6R3cIoOQR4pUdfwQGd1iwyoXHJ4Qfw==" }, "glob-base": { "version": "0.3.0", @@ -428,8 +426,8 @@ "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", "dev": true, "requires": { - "glob-parent": "2.0.0", - "is-glob": "2.0.1" + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" } }, "glob-parent": { @@ -438,7 +436,7 @@ "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "dev": true, "requires": { - "is-glob": "2.0.1" + "is-glob": "^2.0.0" } }, "grid-index": { @@ -451,7 +449,7 @@ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "requires": { - "function-bind": "1.1.1" + "function-bind": "^1.1.1" } }, "has-flag": { @@ -488,7 +486,7 @@ "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", "dev": true, "requires": { - "is-primitive": "2.0.0" + "is-primitive": "^2.0.0" } }, "is-extendable": { @@ -509,7 +507,7 @@ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, "requires": { - "is-extglob": "1.0.0" + "is-extglob": "^1.0.0" } }, "is-module": { @@ -524,7 +522,7 @@ "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", "dev": true, "requires": { - "kind-of": "3.2.2" + "kind-of": "^3.0.2" } }, "is-posix-bracket": { @@ -564,7 +562,7 @@ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, "requires": { - "is-buffer": "1.1.6" + "is-buffer": "^1.1.5" } }, "levn": { @@ -572,8 +570,8 @@ "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" } }, "magic-string": { @@ -581,7 +579,7 @@ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz", "integrity": "sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==", "requires": { - "vlq": "0.2.3" + "vlq": "^0.2.2" }, "dependencies": { "vlq": { @@ -592,38 +590,39 @@ } }, "mapbox-gl": { - "version": "0.48.0", - "resolved": "https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-0.48.0.tgz", - "integrity": "sha512-ck50tWMVkcxJzo43I9veqaox5xJBkx7h0EzS393DGGFFWs6IEhEGLvpybwTtw2if2V66tT2S02sYZy2zrmpJ9g==", + "version": "0.50.0", + "resolved": "https://registry.npmjs.org/mapbox-gl/-/mapbox-gl-0.50.0.tgz", + "integrity": "sha512-rr/fP1mlsQBtAE3JaYenSFM5tYRzYaSU1j7KsrPtICSHMzAUMrsl1TlnC5JpMbcZu6nu8R2GFTJ8hYsoBsX9Bg==", "requires": { - "@mapbox/geojson-types": "1.0.2", - "@mapbox/jsonlint-lines-primitives": "2.0.2", - "@mapbox/mapbox-gl-supported": "1.4.0", - "@mapbox/point-geometry": "0.1.0", - "@mapbox/shelf-pack": "3.2.0", - "@mapbox/tiny-sdf": "1.1.0", - "@mapbox/unitbezier": "0.0.0", - "@mapbox/vector-tile": "1.3.1", - "@mapbox/whoots-js": "3.1.0", - "brfs": "1.6.1", - "csscolorparser": "1.0.3", - "earcut": "2.1.3", - "geojson-rewind": "0.3.1", - "geojson-vt": "3.2.0", - "gl-matrix": "2.7.1", - "grid-index": "1.0.0", + "@mapbox/geojson-types": "^1.0.2", + "@mapbox/jsonlint-lines-primitives": "^2.0.2", + "@mapbox/mapbox-gl-supported": "^1.4.0", + "@mapbox/point-geometry": "^0.1.0", + "@mapbox/tiny-sdf": "^1.1.0", + "@mapbox/unitbezier": "^0.0.0", + "@mapbox/vector-tile": "^1.3.1", + "@mapbox/whoots-js": "^3.1.0", + "brfs": "^1.4.4", + "csscolorparser": "~1.0.2", + "earcut": "^2.1.3", + "geojson-rewind": "^0.3.0", + "geojson-vt": "^3.2.0", + "gl-matrix": "^2.6.1", + "grid-index": "^1.0.0", "minimist": "0.0.8", - "pbf": "3.1.0", - "quickselect": "1.1.1", - "rw": "1.3.3", - "supercluster": "4.1.1", - "tinyqueue": "1.2.3", - "vt-pbf": "3.1.1" + "murmurhash-js": "^1.0.0", + "pbf": "^3.0.5", + "potpack": "^1.0.1", + "quickselect": "^1.0.0", + "rw": "^1.3.3", + "supercluster": "^4.1.1", + "tinyqueue": "^1.1.0", + "vt-pbf": "^3.0.1" }, "dependencies": { "minimist": { "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" } } @@ -639,7 +638,7 @@ "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.0.4.tgz", "integrity": "sha1-pd5GU42uhNQRTMXqArR3KmNGcB8=", "requires": { - "source-map": "0.5.7" + "source-map": "^0.5.6" }, "dependencies": { "source-map": { @@ -655,19 +654,19 @@ "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", "dev": true, "requires": { - "arr-diff": "2.0.0", - "array-unique": "0.2.1", - "braces": "1.8.5", - "expand-brackets": "0.1.5", - "extglob": "0.3.2", - "filename-regex": "2.0.1", - "is-extglob": "1.0.0", - "is-glob": "2.0.1", - "kind-of": "3.2.2", - "normalize-path": "2.1.1", - "object.omit": "2.0.1", - "parse-glob": "3.0.4", - "regex-cache": "0.4.4" + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" } }, "minimist": { @@ -675,13 +674,18 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, + "murmurhash-js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/murmurhash-js/-/murmurhash-js-1.0.0.tgz", + "integrity": "sha1-sGJ44h/Gw3+lMTcysEEry2rhX1E=" + }, "normalize-path": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "dev": true, "requires": { - "remove-trailing-separator": "1.1.0" + "remove-trailing-separator": "^1.0.1" } }, "object-inspect": { @@ -700,8 +704,8 @@ "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", "dev": true, "requires": { - "for-own": "0.1.5", - "is-extendable": "0.1.1" + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" } }, "optionator": { @@ -709,12 +713,12 @@ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", "requires": { - "deep-is": "0.1.3", - "fast-levenshtein": "2.0.6", - "levn": "0.3.0", - "prelude-ls": "1.1.2", - "type-check": "0.3.2", - "wordwrap": "1.0.0" + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" } }, "os-homedir": { @@ -729,10 +733,10 @@ "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", "dev": true, "requires": { - "glob-base": "0.3.0", - "is-dotfile": "1.0.3", - "is-extglob": "1.0.0", - "is-glob": "2.0.1" + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" } }, "path-parse": { @@ -745,10 +749,15 @@ "resolved": "https://registry.npmjs.org/pbf/-/pbf-3.1.0.tgz", "integrity": "sha512-/hYJmIsTmh7fMkHAWWXJ5b8IKLWdjdlAFb3IHkRBn1XUhIYBChVGfVwmHEAV3UfXTxsP/AKfYTXTS/dCPxJd5w==", "requires": { - "ieee754": "1.1.12", - "resolve-protobuf-schema": "2.1.0" + "ieee754": "^1.1.6", + "resolve-protobuf-schema": "^2.0.0" } }, + "potpack": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/potpack/-/potpack-1.0.1.tgz", + "integrity": "sha512-15vItUAbViaYrmaB/Pbw7z6qX2xENbFSTA7Ii4tgbPtasxm5v6ryKhKtL91tpWovDJzTiZqdwzhcFBCwiMVdVw==" + }, "prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", @@ -787,8 +796,8 @@ "integrity": "sha1-hJY/jJwmuULhU/7rU6rnRlK34LI=", "requires": { "buffer-equal": "0.0.1", - "minimist": "1.2.0", - "through2": "2.0.3" + "minimist": "^1.1.3", + "through2": "^2.0.0" } }, "randomatic": { @@ -797,9 +806,9 @@ "integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==", "dev": true, "requires": { - "is-number": "4.0.0", - "kind-of": "6.0.2", - "math-random": "1.0.1" + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" }, "dependencies": { "is-number": { @@ -818,16 +827,16 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.2", - "string_decoder": "1.1.1", - "util-deprecate": "1.0.2" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, "redeyed": { @@ -835,7 +844,7 @@ "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-0.4.4.tgz", "integrity": "sha1-N+mQpvKyGyoRwuakj9QTVpjLqX8=", "requires": { - "esprima": "1.0.4" + "esprima": "~1.0.4" }, "dependencies": { "esprima": { @@ -851,7 +860,7 @@ "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", "dev": true, "requires": { - "is-equal-shallow": "0.1.3" + "is-equal-shallow": "^0.1.3" } }, "remove-trailing-separator": { @@ -877,7 +886,7 @@ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", "requires": { - "path-parse": "1.0.5" + "path-parse": "^1.0.5" } }, "resolve-protobuf-schema": { @@ -885,7 +894,7 @@ "resolved": "https://registry.npmjs.org/resolve-protobuf-schema/-/resolve-protobuf-schema-2.1.0.tgz", "integrity": "sha512-kI5ffTiZWmJaS/huM8wZfEMer1eRd7oJQhDuxeCLe3t7N7mX3z94CN0xPxBQxFYQTSNz9T0i+v6inKqSdK8xrQ==", "requires": { - "protocol-buffers-schema": "3.3.2" + "protocol-buffers-schema": "^3.3.1" } }, "rollup": { @@ -895,7 +904,7 @@ "dev": true, "requires": { "@types/estree": "0.0.39", - "@types/node": "10.3.4" + "@types/node": "*" } }, "rollup-plugin-buble": { @@ -904,8 +913,8 @@ "integrity": "sha512-dxK0prR8j/7qhI2EZDz/evKCRuhuZMpRlUGPrRWmpg5/2V8tP1XFW+Uk0WfxyNgFfJHvy0GmxnJSTb5dIaNljQ==", "dev": true, "requires": { - "buble": "0.19.3", - "rollup-pluginutils": "2.3.0" + "buble": "^0.19.2", + "rollup-pluginutils": "^2.0.1" } }, "rollup-plugin-commonjs": { @@ -914,10 +923,10 @@ "integrity": "sha512-g91ZZKZwTW7F7vL6jMee38I8coj/Q9GBdTmXXeFL7ldgC1Ky5WJvHgbKlAiXXTh762qvohhExwUgeQGFh9suGg==", "dev": true, "requires": { - "estree-walker": "0.5.2", - "magic-string": "0.22.5", - "resolve": "1.8.1", - "rollup-pluginutils": "2.3.0" + "estree-walker": "^0.5.1", + "magic-string": "^0.22.4", + "resolve": "^1.5.0", + "rollup-pluginutils": "^2.0.1" } }, "rollup-plugin-node-resolve": { @@ -926,9 +935,9 @@ "integrity": "sha512-9zHGr3oUJq6G+X0oRMYlzid9fXicBdiydhwGChdyeNRGPcN/majtegApRKHLR5drboUvEWU+QeUmGTyEZQs3WA==", "dev": true, "requires": { - "builtin-modules": "2.0.0", - "is-module": "1.0.0", - "resolve": "1.8.1" + "builtin-modules": "^2.0.0", + "is-module": "^1.0.0", + "resolve": "^1.1.6" } }, "rollup-pluginutils": { @@ -937,8 +946,8 @@ "integrity": "sha512-xB6hsRsjdJdIYWEyYUJy/3ki5g69wrf0luHPGNK3ZSocV6HLNfio59l3dZ3TL4xUwEKgROhFi9jOCt6c5gfUWw==", "dev": true, "requires": { - "estree-walker": "0.5.2", - "micromatch": "2.3.11" + "estree-walker": "^0.5.2", + "micromatch": "^2.3.11" } }, "rw": { @@ -961,17 +970,17 @@ "resolved": "https://registry.npmjs.org/sharkdown/-/sharkdown-0.1.0.tgz", "integrity": "sha1-YdT+Up510CRCEnzJI0NiJlCZIU8=", "requires": { - "cardinal": "0.4.4", - "expect.js": "0.2.0", + "cardinal": "~0.4.2", + "expect.js": "~0.2.0", "minimist": "0.0.5", - "split": "0.2.10", - "stream-spigot": "2.1.2", - "through": "2.3.8" + "split": "~0.2.10", + "stream-spigot": "~2.1.2", + "through": "~2.3.4" }, "dependencies": { "minimist": { "version": "0.0.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.5.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.5.tgz", "integrity": "sha1-16oye87PUY+RBqxrjwA/o7zqhWY=" } } @@ -984,10 +993,10 @@ }, "split": { "version": "0.2.10", - "resolved": "https://registry.npmjs.org/split/-/split-0.2.10.tgz", + "resolved": "http://registry.npmjs.org/split/-/split-0.2.10.tgz", "integrity": "sha1-Zwl8YB1pfOE2j0GPBs0gHPBSGlc=", "requires": { - "through": "2.3.8" + "through": "2" } }, "static-eval": { @@ -995,7 +1004,7 @@ "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.0.0.tgz", "integrity": "sha512-6flshd3F1Gwm+Ksxq463LtFd1liC77N/PX1FVVc3OzL3hAmo2fwHFbuArkcfi7s9rTNsLEhcRmXGFZhlgy40uw==", "requires": { - "escodegen": "1.9.1" + "escodegen": "^1.8.1" } }, "static-module": { @@ -1003,20 +1012,20 @@ "resolved": "https://registry.npmjs.org/static-module/-/static-module-2.2.5.tgz", "integrity": "sha512-D8vv82E/Kpmz3TXHKG8PPsCPg+RAX6cbCOyvjM6x04qZtQ47EtJFVwRsdov3n5d6/6ynrOY9XB4JkaZwB2xoRQ==", "requires": { - "concat-stream": "1.6.2", - "convert-source-map": "1.5.1", - "duplexer2": "0.1.4", - "escodegen": "1.9.1", - "falafel": "2.1.0", - "has": "1.0.3", - "magic-string": "0.22.5", + "concat-stream": "~1.6.0", + "convert-source-map": "^1.5.1", + "duplexer2": "~0.1.4", + "escodegen": "~1.9.0", + "falafel": "^2.1.0", + "has": "^1.0.1", + "magic-string": "^0.22.4", "merge-source-map": "1.0.4", - "object-inspect": "1.4.1", - "quote-stream": "1.0.2", - "readable-stream": "2.3.6", - "shallow-copy": "0.0.1", - "static-eval": "2.0.0", - "through2": "2.0.3" + "object-inspect": "~1.4.0", + "quote-stream": "~1.0.2", + "readable-stream": "~2.3.3", + "shallow-copy": "~0.0.1", + "static-eval": "^2.0.0", + "through2": "~2.0.3" } }, "stream-spigot": { @@ -1024,7 +1033,7 @@ "resolved": "https://registry.npmjs.org/stream-spigot/-/stream-spigot-2.1.2.tgz", "integrity": "sha1-feFF6Bn43Q20UJDRPc9zqO08wDU=", "requires": { - "readable-stream": "1.1.14" + "readable-stream": "~1.1.0" }, "dependencies": { "isarray": { @@ -1034,13 +1043,13 @@ }, "readable-stream": { "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", "isarray": "0.0.1", - "string_decoder": "0.10.31" + "string_decoder": "~0.10.x" } }, "string_decoder": { @@ -1055,7 +1064,7 @@ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "requires": { - "safe-buffer": "5.1.2" + "safe-buffer": "~5.1.0" } }, "supercluster": { @@ -1063,7 +1072,7 @@ "resolved": "https://registry.npmjs.org/supercluster/-/supercluster-4.1.1.tgz", "integrity": "sha512-sF0FfUOPFp96DKzwWFLeQOEqqKu2PpcesxAFeFsknA/q7g7igVVn/p3NI2XHEghNSyDAqunKNKqAbqNO8+7NDQ==", "requires": { - "kdbush": "2.0.1" + "kdbush": "^2.0.1" } }, "supports-color": { @@ -1072,12 +1081,12 @@ "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { - "has-flag": "3.0.0" + "has-flag": "^3.0.0" } }, "through": { "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, "through2": { @@ -1085,8 +1094,8 @@ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", "requires": { - "readable-stream": "2.3.6", - "xtend": "4.0.1" + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" } }, "tinyqueue": { @@ -1099,7 +1108,7 @@ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "requires": { - "prelude-ls": "1.1.2" + "prelude-ls": "~1.1.2" } }, "typedarray": { @@ -1124,8 +1133,8 @@ "integrity": "sha512-pHjWdrIoxurpmTcbfBWXaPwSmtPAHS105253P1qyEfSTV2HJddqjM+kIHquaT/L6lVJIk9ltTGc0IxR/G47hYA==", "requires": { "@mapbox/point-geometry": "0.1.0", - "@mapbox/vector-tile": "1.3.1", - "pbf": "3.1.0" + "@mapbox/vector-tile": "^1.3.1", + "pbf": "^3.0.5" } }, "wgs84": { diff --git a/package.json b/package.json index 10ea767..ce2382e 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "build": "rollup -c", "dev": "rollup -c -w", "test": "node test/test.js", - "pretest": "npm run build" + "pretest": "npm run build", + "generate": "curl https://raw.githubusercontent.com/mapbox/mapbox-gl-js/master/src/style-spec/reference/v8.json | node generate-elm.js > src/Mapbox/Layer.elm" }, "repository": { "type": "git", @@ -37,6 +38,6 @@ "rollup-plugin-node-resolve": "^3.3.0" }, "dependencies": { - "mapbox-gl": "^0.48.0" + "mapbox-gl": "^0.50.0" } } diff --git a/src/Mapbox/Element.elm b/src/Mapbox/Element.elm index a54d645..f067723 100644 --- a/src/Mapbox/Element.elm +++ b/src/Mapbox/Element.elm @@ -59,7 +59,7 @@ map attrs style = {-| This is literally: <link - href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.47.0/mapbox-gl.css' + href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.50.0/mapbox-gl.css' rel='stylesheet' /> You can include the required styles yourself if it fits better with the way you deploy your assets, this is meant as a quick way to get started. @@ -67,7 +67,7 @@ You can include the required styles yourself if it fits better with the way you -} css : Html msg css = - node "link" [ attribute "href" "https://api.tiles.mapbox.com/mapbox-gl-js/v0.48.0/mapbox-gl.css", attribute "rel" "stylesheet" ] [] |